diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 0000000..9a3255b --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,34 @@ +{ + "projectOwner": "workhorsy", + "projectName": "comic_book_reader", + "files": ["README.md"], + "imageSize": 100, + "commit": false, + "contributorsPerLine": 4, + "contributors": [ + { + "login": "workhorsy", + "name": "Matthew Brennan Jones", + "avatar_url": "https://avatars3.githubusercontent.com/u/2733986?v=4", + "profile": "http://workhorsy.org", + "contributions": [ + "code", + "translation", + "bug", + "question" + ] + }, + { + "login": "btzr-io", + "name": "Baltazar Gomez", + "avatar_url": "https://avatars1.githubusercontent.com/u/14793624?v=4", + "profile": "http://codepen.io/btzr-io", + "contributions": [ + "design", + "platform", + "code" + ] + } + ], + "repoType": "github" +} diff --git a/.huskyrc b/.huskyrc new file mode 100644 index 0000000..2b6e817 --- /dev/null +++ b/.huskyrc @@ -0,0 +1,5 @@ +{ + "hooks": { + "pre-commit": "yarn pretty-quick --staged" + } +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..efb93b0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +node_modules +bin +dist +test +build +/src/assets +/src/lib +*.lock +*.log diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..3e71de2 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "printWidth": 100, + "singleQuote": true, + "semi": false +} diff --git a/ChangeLog b/CHANGELOG.md similarity index 100% rename from ChangeLog rename to CHANGELOG.md diff --git a/README.md b/README.md index fd11792..63f321e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ http://comic-book-reader.com -Warning -=================== -This branch is a port to Preact, and does not work yet! +> ### :warning: Warning +> This branch is a port to Preact, and does not work yet! + +# Comic Book Reader -Comic Book Reader -=================== * Can read CBR, CBZ, CBT, and PDF files * Runs in the browser as a JavaScript and HTML web page * Works well on a touch device or desktop @@ -13,19 +12,29 @@ Comic Book Reader * Works when offline thanks to Service Workers. * Regularly tested in Firefox, Chrome, and Internet Explorer -# Install Requirements +### Install Requirements + ```bash npm install ``` -# Run for development +### Run for development + ```bash -npm start +yarn dev ``` - -# Install git hooks to automatically generate src/lib/version_date.js file on commit +### Format code ```bash -./bin/install_hooks.sh +yarn format ``` +## Contributors + +This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. + + + +| [
Matthew Brennan Jones](http://workhorsy.org)
[💻](https://github.com/workhorsy/comic_book_reader/commits?author=workhorsy "Code") [🌍](#translation-workhorsy "Translation") [🐛](https://github.com/workhorsy/comic_book_reader/issues?q=author%3Aworkhorsy "Bug reports") [💬](#question-workhorsy "Answering Questions") | [
Baltazar Gomez](http://codepen.io/btzr-io)
[🎨](#design-btzr-io "Design") [📦](#platform-btzr-io "Packaging/porting to new platform") [💻](https://github.com/workhorsy/comic_book_reader/commits?author=btzr-io "Code") | +| :---: | :---: | + diff --git a/bin/install_hooks.sh b/bin/install_hooks.sh deleted file mode 100755 index 8a7cf96..0000000 --- a/bin/install_hooks.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cd .git/hooks/ -rm -f pre-commit -ln -s ../../bin/pre-commit pre-commit diff --git a/bin/pre-commit b/bin/pre-commit deleted file mode 100755 index 3ffe0e4..0000000 --- a/bin/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -printf "function getVersionDate() { return \"`date +"%B %d, %Y - %T"`\"; }\r\n" > src/lib/version_date.js -git add src/lib/version_date.js diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index adddd07..0000000 Binary files a/favicon.ico and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 958f32a..0000000 --- a/index.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - Comic Book Reader - - - - - - - - - - - - - - - - - - - - - - -
-
-

Comic Book Reader

-

- A touch friendly HTML5 comic book reader that reads CBR, CBZ, CBT, and PDF files. -

-

- -

- -
-
- - - - diff --git a/invalid_image.png b/invalid_image.png deleted file mode 100644 index 5b2442a..0000000 Binary files a/invalid_image.png and /dev/null differ diff --git a/main.js b/main.js deleted file mode 100644 index 783f2b2..0000000 --- a/main.js +++ /dev/null @@ -1,975 +0,0 @@ -// Copyright (c) 2017 Matthew Brennan Jones -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - -const g_use_service_worker = true; -let g_is_terminated = false; -let g_file_name = null; -let g_image_index = 0; -let g_image_count = 0; -let g_titles = {}; -let g_are_page_previews_loading = false; -let g_use_higher_quality_previews = false; -let g_screen_width = 0; -let g_screen_height = 0; -let g_top_menu_visible = 1.0; -let g_bottom_menu_visible = 0.0; - -function requireBrowserFeatures(cb) { - let errors = []; - if ( !('transform' in document.body.style)) { - errors.push('CSS transform'); - } - if (typeof Blob === 'undefined') { - errors.push('Blob'); - } - if (typeof Object === 'undefined' || typeof Object.defineProperty === 'undefined') { - errors.push('Object defineProperty'); - } - if (typeof Object === 'undefined' || typeof Object.hasOwnProperty === 'undefined') { - errors.push('Object hasOwnProperty'); - } - if (typeof window.HTMLCanvasElement === 'undefined' || - typeof window.HTMLCanvasElement.prototype.getContext === 'undefined') { - errors.push('Canvas Context'); - } - if (typeof Uint8Array === 'undefined') { - errors.push('Uint8Array'); - } - if (typeof indexedDB === 'undefined') { - errors.push('Indexed DB'); - } - if (typeof localStorage === 'undefined') { - errors.push('Local Storage'); - } - if (typeof Worker === 'undefined') { - errors.push('Web Worker'); - } - if (typeof URL === 'undefined' || typeof URL.createObjectURL === 'undefined') { - errors.push('Create Object URL'); - } - if (typeof URL === 'undefined' || typeof URL.revokeObjectURL === 'undefined') { - errors.push('Revoke Object URL'); - } - if (typeof JSON === 'undefined' || typeof JSON.stringify === 'undefined') { - errors.push('JSON Stringify'); - } - if (typeof JSON === 'undefined' || typeof JSON.parse === 'undefined') { - errors.push('JSON Parse'); - } - if (typeof FileReader === 'undefined') { - errors.push('File Reader'); - } - if (typeof document.documentElement.requestFullscreen === 'undefined' && - typeof document.documentElement.msRequestFullscreen === 'undefined' && - typeof document.documentElement.mozRequestFullScreen === 'undefined' && - typeof document.documentElement.webkitRequestFullscreen === 'undefined') { - errors.push('Request Full Screen'); - } - - function hasErrors(errors) { - if (errors.length > 0) { - let message = '
'; - message += '

Your browser is missing features required to run this program:

'; - for (let i=0; i'); - } - message += '
'; - document.body.innerHTML = message; - return true; - } - - return false; - } - - if (! hasErrors(errors)) { - // Test the Web Workers requirements - let worker = new Worker('js/test_requirements_worker.js'); - worker.onmessage = function(e) { - if (e.data.action === 'test_requirements') { - let errors = e.data.errors; - if (! hasErrors(errors)) { - // Test Web Workers for transferable objects - let array_buffer = new ArrayBuffer(1); - let message = { - action: 'test_transferable_objects', - array_buffer: array_buffer - }; - worker.postMessage(message, [array_buffer]); - if (array_buffer.byteLength !== 0) { - errors = ['Transferable Object']; - hasErrors(errors); - } - } - } - }; - - let message = { - action: 'test_requirements' - }; - worker.postMessage(message); - } - - cb(); -} - -function hideAllMenus(is_instant) { - hideTopMenu(is_instant); - hideBottomMenu(is_instant); -} - -function hideTopMenu(is_instant) { - let speed = is_instant ? '0.0s' : '0.3s'; - - // Hide the top menus - hide('#settingsMenu'); - hide('#libraryMenu'); - $('#libraryMenu').innerHTML = ''; - show('#bottomMenu'); - - // Remove glow from top and bottom menu - $('#topMenuPanel').classList.remove('menuWithGlow'); - - // Hide the top menu - let top_menu_panel = $('#topMenuPanel'); - let top_menu = $('#topMenu'); - let style = top_menu.style; - let height = top_menu_panel.offsetHeight + 15; - style.transitionDuration = speed; - style.transform = 'translate3d(0px, -' + height + 'px, 0px)'; - - g_top_menu_visible = 0.0; - $('#wallPaper').style.opacity = 1.0; -} - -function hideBottomMenu(is_instant) { - let speed = is_instant ? '0.0s' : '0.3s'; - - // Remove glow from top and bottom menu - let bottom_menu_panel = $('#bottomMenuPanel'); - bottom_menu_panel.classList.remove('menuWithGlow'); - - // Hide the bottom menu - bottom_menu_panel.innerHTML = ''; - let height = bottom_menu_panel.offsetHeight; - let bottom = $('#bottomMenu'); - bottom.style.transitionDuration = speed; - bottom.style.transform = 'translate3d(0px, ' + height + 'px, 0px)'; - - g_are_page_previews_loading = false; - g_bottom_menu_visible = 0.0; - $('#wallPaper').style.opacity = 1.0; -} - -function setWallPaperOpacity() { - let visible = 0; - if (g_top_menu_visible > g_bottom_menu_visible) { - visible = g_top_menu_visible; - } else { - visible = g_bottom_menu_visible; - } - $('#wallPaper').style.opacity = 1.0 - (0.9 * visible); -} - -function showTopMenu(y_offset, is_instant) { - // Move the top menu - let speed = is_instant ? '0.0s' : '0.1s'; - let height = $('#topMenu').offsetHeight * 1.0; - let offset = (-height + (height * y_offset)) - 15; - let style = $('#topMenu').style; - style.transitionDuration = speed; - style.transform = 'translate3d(0px, ' + offset + 'px, 0px)'; - g_top_menu_visible = y_offset; - - // Show the wall paper - setWallPaperOpacity(); - $('#topMenuPanel').classList.add('menuWithGlow'); -} - -function loadPagePreview() { - if (! g_are_page_previews_loading && g_bottom_menu_visible === 1.0) { - //console.info('Loading page previews .....................'); - g_are_page_previews_loading = true; - let menu = $('#bottomMenuPanel'); - menu.innerHTML = ''; - - let curr_image_index = g_image_index; - let length = Object.keys(g_titles).length; - let loadNextPagePreview = function(i) { - if (i >= length) { - // Scroll to the current page - let selected = document.querySelector('.comicPreviewBoxSelected'); - selected.scrollIntoView({block: "start", behavior: "smooth"}); - return; - } - - let file_name = g_titles[i]; - getCachedFile('small', file_name, function(blob) { - //console.info('Loading page preview #' + (i + 1)); - let url = null; - if (blob) { - url = URL.createObjectURL(blob); - //console.log('>>>>>>>>>>>>>>>>>>> createObjectURL: ' + url); - } - - let img = document.createElement('img'); - img.className = 'comicPreviewPortrait'; - img.title = g_titles[i]; - img.onclick = function(e) { - $('#comicPanel').scrollLeft = i * g_screen_width; - hideAllMenus(false); - let old_i = g_image_index; - g_image_index = i; - overlayShow(); - - // Unload the previous images - $('#page_' + old_i).src = ''; - if (old_i < g_image_count - 1) $('#page_' + (old_i+1)).src = ''; - if (old_i > 0) $('#page_' + (old_i-1)).src = ''; - - // Load the big page images - //console.info('load', i); - let img = $('#page_' + i); - img.src = img.src_big; - if (i < g_image_count - 1) { - img = $('#page_' + (i+1)); - img.src = img.src_big; - } - if (i > 0) { - img = $('#page_' + (i-1)); - img.src = img.src_big; - } - }; - - // The image loads successfully - img.onload = function() { - if (url) { - URL.revokeObjectURL(url); - //console.log('<<<<<<<<<<<<<<<<<<<< revokeObjectURL: ' + url); - } - - // Make the image twice as wide if it is in landscape mode - if (this.naturalWidth > this.naturalHeight) { - this.className = 'comicPreviewLandscape'; - } - loadNextPagePreview(i + 1); - }; - // The image fails to load - img.onerror = function() { - if (url) { - URL.revokeObjectURL(url); - //console.log('<<<<<<<<<<<<<<<<<<<< revokeObjectURL: ' + url); - } - - img.onload = null; - img.onerror = null; - img.src = 'invalid_image.png'; - - loadNextPagePreview(i + 1); - }; - - if (url) { - img.src = url; - } else { - img.src ='invalid_image.png'; - } - - let container = document.createElement('div'); - if (i === curr_image_index) { - container.className = 'comicPreviewBox comicPreviewBoxSelected'; - } else { - container.className = 'comicPreviewBox'; - } - let caption = document.createElement('span'); - caption.innerHTML = i + 1; - container.appendChild(img); - container.appendChild(document.createElement('br')); - container.appendChild(caption); - menu.appendChild(container); - }); - }; - - loadNextPagePreview(0); - } else { - // Scroll to the current page - let selected = document.querySelector('.comicPreviewBoxSelected'); - selected.scrollIntoView({block: "start", behavior: "smooth"}); - } -} - -function showLibrary() { - hide('#settingsMenu'); - hide('#bottomMenu'); - - let libraryMenu = $('#libraryMenu'); - libraryMenu.innerHTML = ''; - let is_visible = libraryMenu.style.display !== 'none'; - if (is_visible) { - libraryMenu.style.display = 'none'; - return; - } else { - libraryMenu.style.display = ''; - } - - let onStart = function(count) { - if (count === 0) { - libraryMenu.innerHTML = L('Library is empty'); - } - }; - let onEach = function(filename, pagename, blob) { - let container = document.createElement('div'); - container.className = 'comicPreviewBox'; - - let img = new Image(); - img.title = filename; - img.className = 'comicPreviewPortrait'; - - if (pagename && blob) { - let url = URL.createObjectURL(blob); - //console.log('>>>>>>>>>>>>>>>>>>> createObjectURL: ' + url); - //console.info(pagename); - container.onclick = function(e) { - this.classList.add('comicPreviewBoxSelected'); - libraryMenu.style.display = 'none'; - libraryMenu.innerHTML = ''; - show('#bottomMenu'); - - onLoaded(null, filename); - }; - img.onload = function() { - URL.revokeObjectURL(this.src); - //console.log('<<<<<<<<<<<<<<<<<<<< revokeObjectURL: ' + this.src); - - // Make the image twice as wide if it is in landscape mode - if (this.naturalWidth > this.naturalHeight) { - this.className = 'comicPreviewLandscape'; - } - }; - img.onerror = function() { - URL.revokeObjectURL(this.src); - //console.log('<<<<<<<<<<<<<<<<<<<< revokeObjectURL: ' + this.src); - }; - img.src = url; - } else { - container.onclick = function(e) { - this.classList.add('comicPreviewBoxSelected'); - libraryMenu.style.display = 'none'; - libraryMenu.innerHTML = ''; - show('#bottomMenu'); - - onLoaded(null, filename); - }; - img.src = 'invalid_image.png'; - } - - container.appendChild(img); - libraryMenu.appendChild(container); - - if (filename === g_file_name) { - container.classList.add('comicPreviewBoxSelected'); - container.scrollIntoView({block: "start", behavior: "smooth"}); - } - }; - getAllCachedFirstPages(onStart, onEach); -} - -function loadComic() { - // Just return if there is no file selected - let file_input = $('#fileInput'); - if (file_input.files.length === 0) { - return; - } - - // Get the file's info - let file = file_input.files[0]; - let filename = file.name; - - onLoaded(file, filename); -} - -function friendlyPageNumber() { - return '(' + (g_image_index + 1) + ' ' + L('of') + ' ' + g_image_count + ')'; -} - -function loadImage(page, index, cb) { - let filename = g_titles[index]; - - // Just return if there is no index - if (! filename) { - console.info('!!!!!!!!!!!!!!! Missing url for index:' + index); - return; - } - - page.innerHTML = ''; - - let img = document.createElement('img'); - img.id = 'page_' + index; - img.className = 'comicPage unselectable'; - img.alt = ''; - img.ondragstart = function() { return false; }; - img.draggable = false; - img.onload = function() { - img.onload = null; - img.onerror = null; - - cb(index); - }; - img.onerror = function() { - img.onload = null; - img.onerror = null; - - img.alt = 'Invalid Image'; - img.src = 'invalid_image.png'; - cb(index); - }; - - getCachedFile('big', filename, function(blob) { - if (blob) { - img.src_big = URL.createObjectURL(blob); - console.info(' ' + img.src_big); - } - getCachedFile('small', filename, function(blob) { - if (blob) { - img.src_small = URL.createObjectURL(blob); - console.info(' ' + img.src_small); - } - - if (index <= 1) { - console.info('load', index); - img.src = img.src_big; - } - page.appendChild(img); - }); - }); -} - -function setComicData(name) { - g_file_name = name; - $('#nameValue').textContent = name; -} - -function clearComicData() { - // Reset the UI - document.title = 'Comic Book Reader'; - hide('#loadError'); - setComicData(''); - $('#bottomMenuPanel').innerHTML = ''; - $('#horizontalScroller').innerHTML = ''; - $('#comicPanel').scrollLeft = 0; - - // Close the connection to indexedDB - dbClose(); - - // Remove all the old images, compressed file entries, and object urls - g_image_index = 0; - g_image_count = 0; - g_titles = {}; - g_are_page_previews_loading = false; -} - -function onLoaded(blob, filename) { - document.body.style.backgroundColor = 'black'; - - // Clear everything - $('#btnFileLoad').disabled = true; - $('#btnLibrary').disabled = true; - $('#btnSettings').disabled = true; - hideAllMenus(false); - clearComicData(); - setComicData(filename); - - // Read the file - show('#comicPanel'); - - // Get the names of all the cached comics - g_use_higher_quality_previews = settings_get_use_higher_quality_previews(); - loaderLoadFile(blob, filename); -} - -function onError(msg) { - hide('#comicPanel'); - setComicData(''); - $('#loadError').textContent = L('Error') + ': ' + L(msg); - show('#loadError'); - showTopMenu(1.0, true); - - $('#btnFileLoad').disabled = false; - $('#btnLibrary').disabled = false; - $('#btnSettings').disabled = false; -} - -function onResize() { - g_screen_width = window.innerWidth; - g_screen_height = window.innerHeight; - //console.info(g_screen_width); - - let new_left = g_image_index * g_screen_width; - $('#comicPanel').scrollLeft = new_left; - - let height = $('#topMenuPanel').offsetHeight; - let new_y = - (height - (g_top_menu_visible * height)); - let top = $('#topMenu'); - top.style.transitionDuration = '0.0s'; - top.style.transform = 'translate3d(0px, ' + new_y + 'px, 0px)'; - - if (g_bottom_menu_visible > 0) { - let bottom = $('#bottomMenu'); - bottom.style.transitionDuration = '0.0s'; - bottom.style.transform = 'translate3d(0px, 0px, 0px)'; - } else { - let height = $('#bottomMenuPanel').offsetHeight; - let new_y = height - (g_bottom_menu_visible * height); - let bottom = $('#bottomMenu'); - bottom.style.transitionDuration = '0.0s'; - bottom.style.transform = 'translate3d(0px, ' + new_y + 'px, 0px)'; - } -} - -function overlayShow() { - // Update the page number - let number = friendlyPageNumber(); - $('#overlayPageNumber').innerHTML = number; - document.title = number + ' "' + g_file_name + '"'; - - // Restart the animation - let overlay = $('#overlayPageNumber'); - overlay.style.display = ''; - animateCSS(overlay, "opacity: 0.5", "opacity: 0.0", "5600ms", - function() { - overlay.style.display = 'none'; - }); -} - -function monitorTotalUsersOnline() { - console.info("Getting total users online ..."); - let update_timeout = 1000 * 60 * 5; // 5 minutes - let user_id = settings_get_user_id(); - let url = "//comic-book-reader.com/server/count.php?id=" + user_id; - - httpGet(url, function(data, status) { - if (data && status === 200) { - show('#lblTotalUsersOnline'); - $('#totalUsersOnline').textContent = ": " + parseInt(data); - } else { - console.info(data); - console.info(status); - } - }); - setTimeout(monitorTotalUsersOnline, update_timeout); -} - -function onStorageFull(filename) { - if (g_is_terminated) { - return; - } - - // Terminate the worker - g_is_terminated = true; - killWorker(); - - // Close the connection to the database - dbClose(); - - // Reload the page with a "storage is full" message - localStorage.setItem('storage_is_full', JSON.stringify(true)); - window.location.reload(); -} - -function onKeyDown(event) { - let code = event.keyCode || event.which; - //console.info(code); - - let comic_panel = null; - let i = -1; - let vertical_scroller = null; - - switch (code) { - // F11: Toggle full screen - case 122: - event.preventDefault(); - toggleFullScreen(); - break; - // Left: Move to previous page - case 37: - onChangePage(false); - break; - // Right: Move to next page - case 39: - onChangePage(true); - break; - // Up: Scroll up - case 38: - comic_panel = $('#comicPanel'); - i = Math.round(comic_panel.scrollLeft / g_screen_width); - vertical_scroller = $('#horizontalScroller').children[i]; - vertical_scroller.scrollTop -= 20; - break; - // Down: Scroll down - case 40: - comic_panel = $('#comicPanel'); - i = Math.round(comic_panel.scrollLeft / g_screen_width); - vertical_scroller = $('#horizontalScroller').children[i]; - vertical_scroller.scrollTop += 20; - break; - } -} - -function onMouseClick(e) { - // Detect left clicks only - if (g_top_menu_visible === 1.0 || g_bottom_menu_visible === 1.0) { - hideAllMenus(false); - return; - } - - let comic_panel = $('#comicPanel'); - // Get the current page - let x = e.clientX; - let y = e.clientY; - - // Open top menu - if (y < 200) { - showTopMenu(1.0, false); - // Open bottom menu - } else if (y > (g_screen_height - 200)) { - // FIXME: Make this a showBottomMenu function - let bottom = $('#bottomMenu'); - bottom.style.transitionDuration = '0.3s'; - bottom.style.transform = 'translate3d(0px, 0px, 0px)'; - g_bottom_menu_visible = 1.0; - setWallPaperOpacity(); - $('#bottomMenuPanel').classList.add('menuWithGlow'); - loadPagePreview(); - // Move page right or left - } else { - // Figure out if the click was on the right or left - let is_right = (x > (g_screen_width / 2)); - onChangePage(is_right); - } -} - -function onChangePage(is_right) { - let comic_panel = $('#comicPanel'); - let i = Math.round(comic_panel.scrollLeft / g_screen_width); - - // Next page - let old_i = -1; - if (is_right) { - if (i < g_image_count - 1) i++; - if (i >= 2) old_i = i - 2; - // Prev page - } else { - if (i > 0) i--; - if (i <= g_image_count - 2) old_i = i + 2; - } - - // Scroll the page into position - let new_left = i * g_screen_width; - g_image_index = i; - overlayShow(); - - // Animate the scroll bar - animateValue(function(trans_value) { - comic_panel.scrollLeft = trans_value; - - // The scroll bar is done moving - if (trans_value === new_left) { - // Unload the previous image - if (old_i !== -1 && i !== old_i) { - console.info('unload', old_i); - let img = $('#page_' + old_i); - img.src = ''; - } - // Load the right page - if (i < g_image_count - 1) { - console.info('load', i+1); - let img = $('#page_' + (i+1)); - img.src = img.src_big; - } - // Load the left page - if (i > 0) { - console.info('load', i-1); - let img = $('#page_' + (i-1)); - img.src = img.src_big; - } - } - }, comic_panel.scrollLeft, new_left, 600); -} - -function main() { - translateElementLanguages(); - - // Show the welcome screen if this is the first run - if (settings_get_is_first_run()) { - show('#welcomeScreen'); - // Otherwise show the touch UI - } else { - show('#mainUI'); - hideBottomMenu(true); - showTopMenu(true); - } - - $('#btnInputTouch').addEventListener('click', function () { - hide('#welcomeScreen'); - show('#mainUI'); - hideBottomMenu(true); - showTopMenu(true); - settings_set_is_first_run(false); - }); -/* - window.onerror = function(messageOrEvent, source, lineno, colno, error) { - console.error('Error!'); - console.error(messageOrEvent); - console.error(source + ' (' + lineno + ', ' + colno + ')'); - console.error(error); - }; -*/ - // Stop the right click menu from popping up - document.addEventListener('contextmenu', function(e) { - if (! settings_get_right_click_enabled()) { - e.preventDefault(); - } - }); - - // Resize everything when the browser resizes - window.addEventListener('resize', function() { - let width = window.innerWidth; - let height = window.innerHeight; - onResize(width, height); - }); - - // Toggle full screen - $('#btnFullScreen').addEventListener('click', function () { - toggleFullScreen(); - }); - - // Open github in a new tab - $('#btnHomepage').addEventListener('click', function () { - let url = "https://github.com/workhorsy/comic_book_reader"; - window.open(url, '_blank'); - }); - - // Show the settings menu - $('#btnSettings').addEventListener('click', function () { - hide('#libraryMenu'); - $('#libraryMenu').innerHTML = ''; - - let is_visible = $('#settingsMenu').style.display !== 'none'; - if (is_visible) { - hide('#settingsMenu'); - show('#bottomMenu'); - } else { - // Update the DB size - $('#totalDBSize').textContent = '. . .'; - getTotalSize(function(length) { - $('#totalDBSize').textContent = toFriendlySize(length); - }); - - // Show the menu - show('#settingsMenu'); - hide('#bottomMenu'); - } - }); - - // Set the default selected language, if it is in the supported list - Array.from($('#btnSelectLanguage').options).forEach(function(option) { - if (option.value === g_lang) { - $('#btnSelectLanguage').value = g_lang; - } - }); - - // Language Select - $('#btnSelectLanguage').addEventListener('change', function() { - const prev_lang = g_lang; - g_lang = $('#btnSelectLanguage').value; - - const all = document.querySelectorAll("*[translatable=true]"); - for (let i=0; i 0) { - let db_name = db_names.pop(); - deleteCachedFileStorage(db_name, function() { - deleteNextDB(); - }); - } else { - settings_delete_all(); - $('#btnDisableRightClick').checked = settings_get_right_click_enabled(); - $('#btnEnableInstallUpdates').checked = settings_get_install_updates_enabled(); - $('#btnUseHigherQualityPreviews').checked = settings_get_use_higher_quality_previews(); - $('#btnUseSmoothingWhenResizingImages').checked = settings_get_use_smoothing_when_resizing_images(); - - $('#totalDBSize').textContent = '. . .'; - getTotalSize(function(length) { - $('#totalDBSize').textContent = toFriendlySize(length); - alert(L('Done clearing all data')); - }); - } - } - deleteNextDB(); - }); - - $('#btnLibrary').addEventListener('click', function() { - showLibrary(); - }); - - // Open the file selection box - $('#btnFileLoad').addEventListener('click', function() { - $('#fileInput').click(); - }); - - // Load the selected file - $('#fileInput').addEventListener('change', function() { - loadComic(); - }); - - // Key events - document.addEventListener('keydown', onKeyDown, false); - - // Mouse events for the page container - let comic_panel = $('#comicPanel'); - comic_panel.addEventListener('click', onMouseClick, false); - - // Reset everything - hide('#comicPanel'); - - // Fire the resize event - try { - // Firefox/Chrome - let event = new Event('resize'); - window.dispatchEvent(event); - } catch (e) { - // IE 11 - let event = document.createEvent('HTMLEvents'); - event.initEvent('resize', false, true); - window.dispatchEvent(event); - } - - clearComicData(); - $('#btnFileLoad').disabled = false; - $('#btnLibrary').disabled = false; - $('#btnSettings').disabled = false; - - // Warn the user if indexedDB is full - let storage_is_full = localStorage.getItem('storage_is_full'); - if (storage_is_full && JSON.parse(storage_is_full)) { - localStorage.removeItem('storage_is_full'); - alert('Storage is full! Remove data from indexedDB, or free up disk space.'); - } - - // FIXME: Check if indexedDB is full - - startWorker(); - $('#versionDate').textContent = getVersionDate(); - monitorTotalUsersOnline(); -} - -documentOnReady(function() { - hide('#welcomeScreen'); - hide('#settingsMenu'); - hide('#libraryMenu'); - - // Show an error message if any required browser features are missing - requireBrowserFeatures(function() { - // Start the service worker - if (g_use_service_worker && 'serviceWorker' in navigator) { - navigator.serviceWorker.register('service_worker.js', { scope: '/' }).then(function(reg) { - if (reg.installing) { - console.log('Service worker installing'); - } else if (reg.waiting) { - console.log('Service worker installed'); - } else if (reg.active) { - console.log('Service worker active'); - } - - show('#btnCheckForUpdatesNow'); - $('#btnCheckForUpdatesNow').addEventListener('click', function() { - reg.update(); - - window.caches.keys().then(function(cacheNames) { - return Promise.all( - cacheNames.map(function(cacheName) { - console.log('Deleting cache:', cacheName); - return window.caches.delete(cacheName); - }) - ).then(function() { - console.log('Caches deleted.'); - location.reload(); - }); - }); - }); - - main(); - }).catch(function(error) { - console.error('Failed to register service worker: '); - console.error(error); - }); - } else { - console.info('Service workers are not supported ...'); - PDFJS.disableWorker = true; - main(); - } - }); -}); diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index c46ba5d..0000000 --- a/package-lock.json +++ /dev/null @@ -1,10465 +0,0 @@ -{ - "name": "comic_book_reader", - "version": "0.1.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/configstore": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@types/configstore/-/configstore-2.1.1.tgz", - "integrity": "sha1-zR6FU2M60xhcPy8jns/10mQ+krY=", - "dev": true - }, - "@types/debug": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.29.tgz", - "integrity": "sha1-oeUUrfvZLwOiJLpU1pMRHb8fN1Q=", - "dev": true - }, - "@types/get-port": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@types/get-port/-/get-port-0.0.4.tgz", - "integrity": "sha1-62u3Qj2fiItjJmDcfS/T5po1ZD4=", - "dev": true - }, - "@types/glob": { - "version": "5.0.30", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.30.tgz", - "integrity": "sha1-ECZAnFYlqGiQdGAoCNCCsoZ7ilE=", - "dev": true, - "requires": { - "@types/minimatch": "2.0.29", - "@types/node": "7.0.37" - } - }, - "@types/minimatch": { - "version": "2.0.29", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-2.0.29.tgz", - "integrity": "sha1-UALhT3Xi1x5WQoHfBDHIwbSio2o=", - "dev": true - }, - "@types/mkdirp": { - "version": "0.3.29", - "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.3.29.tgz", - "integrity": "sha1-fyrX7FX5FEgvybHsS7GuYCjUYGY=", - "dev": true - }, - "@types/node": { - "version": "7.0.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.37.tgz", - "integrity": "sha512-Sbq77AHszzU3VuvMLsZ5+sziYDJg3CmIzIIR9J61uBp34dIHjpbjNoQb03G130F+HfbOJ8d74qZp2pCLZaZlcQ==", - "dev": true - }, - "@types/tmp": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.0.32.tgz", - "integrity": "sha1-DTyzECL4Qn6ljACK8yuA2hJspOM=", - "dev": true - }, - "@webpack-blocks/core": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@webpack-blocks/core/-/core-0.4.0.tgz", - "integrity": "sha1-qSJc2q/sBldnE6VSzXjg7gVIKKk=", - "dev": true, - "requires": { - "webpack-merge": "2.6.1" - } - }, - "@webpack-blocks/css-modules": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@webpack-blocks/css-modules/-/css-modules-0.4.0.tgz", - "integrity": "sha1-EO5Z8z1y0/Uejb+RB1M0fjGhqHI=", - "dev": true, - "requires": { - "css-loader": "0.25.0", - "style-loader": "0.13.2" - } - }, - "@webpack-blocks/dev-server2": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@webpack-blocks/dev-server2/-/dev-server2-0.4.0.tgz", - "integrity": "sha1-+vsWw8vASsUYnBPWpmx7RwttJ3U=", - "dev": true, - "requires": { - "@webpack-blocks/webpack-common": "0.4.0", - "webpack": "2.7.0", - "webpack-dev-server": "2.5.1" - } - }, - "@webpack-blocks/extract-text2": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@webpack-blocks/extract-text2/-/extract-text2-0.4.0.tgz", - "integrity": "sha1-meEAq7H3icXJHAwtutX6OqjRWoo=", - "dev": true, - "requires": { - "@webpack-blocks/webpack-common": "0.4.0", - "extract-text-webpack-plugin": "2.1.2" - } - }, - "@webpack-blocks/postcss": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@webpack-blocks/postcss/-/postcss-0.4.3.tgz", - "integrity": "sha1-FpDYlM0Igs1ojV6pyK0uzsgorNI=", - "dev": true, - "requires": { - "postcss-loader": "1.3.3" - } - }, - "@webpack-blocks/webpack-common": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@webpack-blocks/webpack-common/-/webpack-common-0.4.0.tgz", - "integrity": "sha1-UVOx2vhjPY3RDzo+u3XgRveHBzM=", - "dev": true - }, - "@webpack-blocks/webpack2": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@webpack-blocks/webpack2/-/webpack2-0.4.0.tgz", - "integrity": "sha1-vyV2dqz+hXyrrOCyL8juVBDFgzI=", - "dev": true, - "requires": { - "@webpack-blocks/core": "0.4.0", - "@webpack-blocks/webpack-common": "0.4.0", - "css-loader": "0.25.0", - "file-loader": "0.9.0", - "style-loader": "0.13.2", - "url-loader": "0.5.9", - "webpack": "2.7.0" - }, - "dependencies": { - "file-loader": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-0.9.0.tgz", - "integrity": "sha1-HS2t3UJM5tGwfP4/eXMb7TYXq0I=", - "dev": true, - "requires": { - "loader-utils": "0.2.17" - } - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } - } - }, - "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", - "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", - "dev": true, - "requires": { - "mime-types": "2.1.15", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.1.tgz", - "integrity": "sha512-vOk6uEMctu0vQrvuSqFdJyqj1Q0S5VTDL79qtjo+DhRr+1mmaD+tluFSCZqhvi/JUhXSzoZN2BhtstaPEeE8cw==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", - "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", - "dev": true, - "requires": { - "acorn": "4.0.13" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - } - } - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "dev": true, - "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } - } - }, - "ajv": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz", - "integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=", - "dev": true, - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "json-schema-traverse": "0.3.1", - "json-stable-stringify": "1.0.1" - } - }, - "ajv-keywords": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", - "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" - } - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "ansi-align": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-1.1.0.tgz", - "integrity": "sha1-LwwWWIKXOa3V67FeawxuNCPwFro=", - "dev": true, - "requires": { - "string-width": "1.0.2" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "ansi-escapes": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", - "integrity": "sha1-W65SvkJIeN2Xg+iRDj/Cki6DyBs=", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "anymatch": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", - "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=", - "dev": true, - "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11" - } - }, - "archive-type": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-3.2.0.tgz", - "integrity": "sha1-nNnABpV+vpX62tW9YJiUKoE3N/Y=", - "dev": true, - "requires": { - "file-type": "3.9.0" - } - }, - "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", - "dev": true, - "requires": { - "sprintf-js": "1.0.3" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "1.1.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "1.0.3" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true, - "optional": true - }, - "asn1.js": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", - "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true, - "optional": true - }, - "async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", - "dev": true, - "requires": { - "lodash": "4.17.4" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-each-series": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-1.1.0.tgz", - "integrity": "sha1-9C/YFV048hpbjqB8KOBj7RcAsTg=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true, - "optional": true - }, - "autoprefixer": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.1.2.tgz", - "integrity": "sha1-++rwfUj9h44Ggr98vurecorbKxg=", - "dev": true, - "requires": { - "browserslist": "2.2.0", - "caniuse-lite": "1.0.30000701", - "normalize-range": "0.1.2", - "num2fraction": "1.2.2", - "postcss": "6.0.7", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "browserslist": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.2.0.tgz", - "integrity": "sha512-t09UuOv/4/hrL1y4wZ871+kKE6E2bkdMD6duZtV7FZIHFpsmdQfW63BH3bAjkfpkbP/eFKyenUbDUKigV/VmRw==", - "dev": true, - "requires": { - "caniuse-lite": "1.0.30000701", - "electron-to-chromium": "1.3.15" - } - }, - "chalk": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", - "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", - "dev": true, - "requires": { - "ansi-styles": "3.1.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.2.0" - } - }, - "postcss": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.7.tgz", - "integrity": "sha512-8h/GrGLLyxM5ZvzpCH2XTYPysaSL3Ku5kWD7tKXeKRj8NVg1tyldHFCQGF4NTvRUDvjQfmcCRuowHHFFlAURUg==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "source-map": "0.5.6", - "supports-color": "4.2.0" - } - }, - "supports-color": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.0.tgz", - "integrity": "sha512-Ts0Mu/A1S1aZxEJNG88I4Oc9rcZSBFNac5e27yh4j2mqbhZSSzR1Ah79EYwSn9Zuh7lrlGD2cVGzw1RKGzyLSg==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", - "dev": true, - "optional": true - }, - "babel-code-frame": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", - "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-core": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.25.0.tgz", - "integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=", - "dev": true, - "requires": { - "babel-code-frame": "6.22.0", - "babel-generator": "6.25.0", - "babel-helpers": "6.24.1", - "babel-messages": "6.23.0", - "babel-register": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", - "convert-source-map": "1.5.0", - "debug": "2.6.8", - "json5": "0.5.1", - "lodash": "4.17.4", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.7", - "slash": "1.0.0", - "source-map": "0.5.6" - } - }, - "babel-eslint": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.2.3.tgz", - "integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=", - "dev": true, - "requires": { - "babel-code-frame": "6.22.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4" - } - }, - "babel-generator": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.25.0.tgz", - "integrity": "sha1-M6GvcNXyiQrrRlpKd5PB32qeqfw=", - "dev": true, - "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.6", - "trim-right": "1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - } - } - }, - "babel-helper-bindify-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", - "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, - "requires": { - "babel-helper-explode-assignable-expression": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-builder-react-jsx": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.24.1.tgz", - "integrity": "sha1-CteRfjPI11HmRtrKTnfMGTd9LLw=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", - "esutils": "2.0.2" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-define-map": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz", - "integrity": "sha1-epdH8ljYlH0y1RX2qhx70CIEoIA=", - "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", - "lodash": "4.17.4" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-explode-class": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", - "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", - "dev": true, - "requires": { - "babel-helper-bindify-decorators": "6.24.1", - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz", - "integrity": "sha1-024i+rEAjXnYhkjjIRaGgShFbOg=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", - "lodash": "4.17.4" - } - }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", - "dev": true, - "requires": { - "babel-helper-optimise-call-expression": "6.24.1", - "babel-messages": "6.23.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-loader": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.1.tgz", - "integrity": "sha1-uHE0yLEuPkwqlOBUYIW8aAorhIg=", - "dev": true, - "requires": { - "find-cache-dir": "1.0.0", - "loader-utils": "1.1.0", - "mkdirp": "0.5.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-jsx-pragmatic": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-1.0.2.tgz", - "integrity": "sha1-QeK+uGQiNfNLKnqxLKOeByAbjlk=", - "dev": true, - "requires": { - "babel-plugin-syntax-jsx": "6.18.0" - } - }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-async-generators": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", - "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", - "dev": true - }, - "babel-plugin-syntax-class-constructor-call": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", - "integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=", - "dev": true - }, - "babel-plugin-syntax-class-properties": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", - "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", - "dev": true - }, - "babel-plugin-syntax-decorators": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", - "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", - "dev": true - }, - "babel-plugin-syntax-do-expressions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz", - "integrity": "sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0=", - "dev": true - }, - "babel-plugin-syntax-dynamic-import": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", - "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", - "dev": true - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true - }, - "babel-plugin-syntax-export-extensions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", - "integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE=", - "dev": true - }, - "babel-plugin-syntax-function-bind": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz", - "integrity": "sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y=", - "dev": true - }, - "babel-plugin-syntax-jsx": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=", - "dev": true - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", - "dev": true - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", - "dev": true - }, - "babel-plugin-transform-async-generator-functions": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", - "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "6.24.1", - "babel-plugin-syntax-async-generators": "6.13.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "6.24.1", - "babel-plugin-syntax-async-functions": "6.13.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-class-constructor-call": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", - "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", - "dev": true, - "requires": { - "babel-plugin-syntax-class-constructor-call": "6.18.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-plugin-transform-class-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", - "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", - "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-plugin-syntax-class-properties": "6.13.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-plugin-transform-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", - "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", - "dev": true, - "requires": { - "babel-helper-explode-class": "6.24.1", - "babel-plugin-syntax-decorators": "6.13.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-decorators-legacy": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators-legacy/-/babel-plugin-transform-decorators-legacy-1.3.4.tgz", - "integrity": "sha1-dBtY9sW86eYCfgiC2cmU8E82aSU=", - "dev": true, - "requires": { - "babel-plugin-syntax-decorators": "6.13.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-plugin-transform-do-expressions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz", - "integrity": "sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs=", - "dev": true, - "requires": { - "babel-plugin-syntax-do-expressions": "6.13.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz", - "integrity": "sha1-dsKV3DpHQbFmWt/TFnIV3P8ypXY=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "lodash": "4.17.4" - } - }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", - "dev": true, - "requires": { - "babel-helper-define-map": "6.24.1", - "babel-helper-function-name": "6.24.1", - "babel-helper-optimise-call-expression": "6.24.1", - "babel-helper-replace-supers": "6.24.1", - "babel-messages": "6.23.0", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz", - "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=", - "dev": true, - "requires": { - "babel-plugin-transform-strict-mode": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-amd": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0" - } - }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", - "dev": true, - "requires": { - "babel-helper-replace-supers": "6.24.1", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "dev": true, - "requires": { - "babel-helper-call-delegate": "6.24.1", - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.23.0", - "babel-template": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "dev": true, - "requires": { - "babel-helper-regex": "6.24.1", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", - "dev": true, - "requires": { - "babel-helper-regex": "6.24.1", - "babel-runtime": "6.23.0", - "regexpu-core": "2.0.0" - }, - "dependencies": { - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "dev": true, - "requires": { - "regenerate": "1.3.2", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" - } - } - } - }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "dev": true, - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", - "babel-plugin-syntax-exponentiation-operator": "6.13.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-export-extensions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz", - "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", - "dev": true, - "requires": { - "babel-plugin-syntax-export-extensions": "6.13.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-function-bind": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz", - "integrity": "sha1-xvuOlqwpajELjPjqQBRiQH3fapc=", - "dev": true, - "requires": { - "babel-plugin-syntax-function-bind": "6.13.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-object-assign": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz", - "integrity": "sha1-+Z0vZvGgsNSY40bFNZaEdAyqILo=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz", - "integrity": "sha1-h11ryb52HFiirj/u5dxIldjH+SE=", - "dev": true, - "requires": { - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-react-constant-elements": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-constant-elements/-/babel-plugin-transform-react-constant-elements-6.23.0.tgz", - "integrity": "sha1-LxGb9NLN1F65uqrldAU8YE9hR90=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-react-jsx": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", - "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=", - "dev": true, - "requires": { - "babel-helper-builder-react-jsx": "6.24.1", - "babel-plugin-syntax-jsx": "6.18.0", - "babel-runtime": "6.23.0" - } - }, - "babel-plugin-transform-react-remove-prop-types": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.6.tgz", - "integrity": "sha1-w9IP9Ol/sI+mPoapey2qtq02Whk=", - "dev": true, - "requires": { - "babel-traverse": "6.25.0" - } - }, - "babel-plugin-transform-regenerator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz", - "integrity": "sha1-uNowWtQ8PJm0hI5P5AN7dw0jxBg=", - "dev": true, - "requires": { - "regenerator-transform": "0.9.11" - } - }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0" - } - }, - "babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", - "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "core-js": "2.4.1", - "regenerator-runtime": "0.10.5" - } - }, - "babel-preset-env": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.0.tgz", - "integrity": "sha512-OVgtQRuOZKckrILgMA5rvctvFZPv72Gua9Rt006AiPoB0DJKGN07UmaQA+qRrYgK71MVct8fFhT0EyNWYorVew==", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "6.22.0", - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-es2015-arrow-functions": "6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", - "babel-plugin-transform-es2015-block-scoping": "6.24.1", - "babel-plugin-transform-es2015-classes": "6.24.1", - "babel-plugin-transform-es2015-computed-properties": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", - "babel-plugin-transform-es2015-for-of": "6.23.0", - "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-literals": "6.22.0", - "babel-plugin-transform-es2015-modules-amd": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", - "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", - "babel-plugin-transform-es2015-modules-umd": "6.24.1", - "babel-plugin-transform-es2015-object-super": "6.24.1", - "babel-plugin-transform-es2015-parameters": "6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", - "babel-plugin-transform-es2015-spread": "6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "6.24.1", - "babel-plugin-transform-es2015-template-literals": "6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "babel-plugin-transform-regenerator": "6.24.1", - "browserslist": "2.1.4", - "invariant": "2.2.2", - "semver": "5.3.0" - } - }, - "babel-preset-stage-0": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz", - "integrity": "sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo=", - "dev": true, - "requires": { - "babel-plugin-transform-do-expressions": "6.22.0", - "babel-plugin-transform-function-bind": "6.22.0", - "babel-preset-stage-1": "6.24.1" - } - }, - "babel-preset-stage-1": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", - "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", - "dev": true, - "requires": { - "babel-plugin-transform-class-constructor-call": "6.24.1", - "babel-plugin-transform-export-extensions": "6.22.0", - "babel-preset-stage-2": "6.24.1" - } - }, - "babel-preset-stage-2": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", - "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", - "dev": true, - "requires": { - "babel-plugin-syntax-dynamic-import": "6.18.0", - "babel-plugin-transform-class-properties": "6.24.1", - "babel-plugin-transform-decorators": "6.24.1", - "babel-preset-stage-3": "6.24.1" - } - }, - "babel-preset-stage-3": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", - "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", - "dev": true, - "requires": { - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-generator-functions": "6.24.1", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "babel-plugin-transform-object-rest-spread": "6.23.0" - } - }, - "babel-register": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.1.tgz", - "integrity": "sha1-fhDhOi9xBlvfrVoXh7pFvKbe118=", - "dev": true, - "requires": { - "babel-core": "6.25.0", - "babel-runtime": "6.23.0", - "core-js": "2.4.1", - "home-or-tmp": "2.0.0", - "lodash": "4.17.4", - "mkdirp": "0.5.1", - "source-map-support": "0.4.15" - } - }, - "babel-runtime": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", - "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=", - "dev": true, - "requires": { - "core-js": "2.4.1", - "regenerator-runtime": "0.10.5" - } - }, - "babel-template": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", - "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", - "lodash": "4.17.4" - } - }, - "babel-traverse": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz", - "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", - "dev": true, - "requires": { - "babel-code-frame": "6.22.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", - "debug": "2.6.8", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" - } - }, - "babel-types": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", - "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" - } - }, - "babylon": { - "version": "6.17.4", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz", - "integrity": "sha512-kChlV+0SXkjE0vUn9OZ7pBMWRFd8uq3mZe8x1K6jhuNcAFAtEnjchFAqB+dYEXKyd+JpT6eppRR78QAr5gTsUw==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "big.js": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.1.3.tgz", - "integrity": "sha1-TK2iGTZS6zyp7I5VyQFWacmAaXg=", - "dev": true - }, - "bin-build": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-2.2.0.tgz", - "integrity": "sha1-EfjdYfcP/Por3KpbRvXo/t1CIcw=", - "dev": true, - "requires": { - "archive-type": "3.2.0", - "decompress": "3.0.0", - "download": "4.4.3", - "exec-series": "1.0.3", - "rimraf": "2.6.1", - "tempfile": "1.1.1", - "url-regex": "3.2.0" - } - }, - "bin-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-2.0.0.tgz", - "integrity": "sha1-hvjm9CU4k99g3DFpV/WvAqywWTA=", - "dev": true, - "requires": { - "executable": "1.1.0" - } - }, - "bin-version": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-1.0.4.tgz", - "integrity": "sha1-nrSY7m/Xb3q5p8FgQ2+JV5Q1144=", - "dev": true, - "requires": { - "find-versions": "1.2.1" - } - }, - "bin-version-check": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-2.1.0.tgz", - "integrity": "sha1-5OXfKQuQaffRETJAMe/BP90RpbA=", - "dev": true, - "requires": { - "bin-version": "1.0.4", - "minimist": "1.2.0", - "semver": "4.3.6", - "semver-truncate": "1.1.2" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - } - } - }, - "bin-wrapper": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-3.0.2.tgz", - "integrity": "sha1-Z9MwYmLksaXy+I7iNGT2plVneus=", - "dev": true, - "requires": { - "bin-check": "2.0.0", - "bin-version-check": "2.1.0", - "download": "4.4.3", - "each-async": "1.1.1", - "lazy-req": "1.1.0", - "os-filter-obj": "1.0.3" - } - }, - "binary-extensions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz", - "integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=", - "dev": true - }, - "bl": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "bluebird": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=", - "dev": true - }, - "bn.js": { - "version": "4.11.7", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.7.tgz", - "integrity": "sha512-LxFiV5mefv0ley0SzqkOPR1bC4EbpPx8LkOz5vMe/Yi15t5hzwgO/G+tc7wOtL4PZTYjwHu8JnEiSLumuSjSfA==", - "dev": true - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "2.1.1", - "deep-equal": "1.0.1", - "dns-equal": "1.0.0", - "dns-txt": "2.0.2", - "multicast-dns": "6.1.1", - "multicast-dns-service-types": "1.1.0" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "boxen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-0.6.0.tgz", - "integrity": "sha1-g2TUJIrDT/DvGy8r9JpsYM4NgbY=", - "dev": true, - "requires": { - "ansi-align": "1.1.0", - "camelcase": "2.1.1", - "chalk": "1.1.3", - "cli-boxes": "1.0.0", - "filled-array": "1.1.0", - "object-assign": "4.1.1", - "repeating": "2.0.1", - "string-width": "1.0.2", - "widest-line": "1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "dev": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", - "integrity": "sha1-Xncl297x/Vkw1OurSFZ85FHEigo=", - "dev": true, - "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.0", - "inherits": "2.0.3" - } - }, - "browserify-cipher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", - "dev": true, - "requires": { - "browserify-aes": "1.0.6", - "browserify-des": "1.0.0", - "evp_bytestokey": "1.0.0" - } - }, - "browserify-des": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", - "dev": true, - "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.3" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "randombytes": "2.0.5" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "elliptic": "6.4.0", - "inherits": "2.0.3", - "parse-asn1": "5.1.0" - } - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, - "requires": { - "pako": "0.2.9" - } - }, - "browserslist": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.1.4.tgz", - "integrity": "sha1-zFJq9KExK30uBWU+VtDIq3DA4FM=", - "dev": true, - "requires": { - "caniuse-lite": "1.0.30000701", - "electron-to-chromium": "1.3.15" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8", - "isarray": "1.0.0" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.0.tgz", - "integrity": "sha1-9U9kfE9OJSKLqmVqLlfkPV8nCYI=", - "dev": true - }, - "buffer-to-vinyl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz", - "integrity": "sha1-APFfruOreh3aLN5tkSG//dB7ImI=", - "dev": true, - "requires": { - "file-type": "3.9.0", - "readable-stream": "2.3.3", - "uuid": "2.0.3", - "vinyl": "1.2.0" - } - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "bytes": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.5.0.tgz", - "integrity": "sha1-TJQj6i0lLCcMQbK97+/5u2tiwGo=", - "dev": true - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "2.3.1", - "upper-case": "1.1.3" - } - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - } - } - }, - "caniuse-api": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", - "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", - "dev": true, - "requires": { - "browserslist": "1.7.7", - "caniuse-db": "1.0.30000671", - "lodash.memoize": "4.1.2", - "lodash.uniq": "4.5.0" - }, - "dependencies": { - "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", - "dev": true, - "requires": { - "caniuse-db": "1.0.30000671", - "electron-to-chromium": "1.3.15" - } - } - } - }, - "caniuse-db": { - "version": "1.0.30000671", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000671.tgz", - "integrity": "sha1-nwcbvHuWmUY4zLr0eCnVihV3qO0=", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30000701", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000701.tgz", - "integrity": "sha1-nWc89rdNyz1cIdITF2sBGsakW6o=", - "dev": true - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true, - "optional": true - }, - "caw": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/caw/-/caw-1.2.0.tgz", - "integrity": "sha1-/7Im/n78VHKI3GLuPpcHPCEtEDQ=", - "dev": true, - "requires": { - "get-proxy": "1.1.0", - "is-obj": "1.0.1", - "object-assign": "3.0.0", - "tunnel-agent": "0.4.3" - }, - "dependencies": { - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - } - } - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "1.3.0", - "async-each": "1.0.1", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - }, - "circular-json": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz", - "integrity": "sha1-vos2rvzN6LPKeqLWr8B6NyQsDS0=", - "dev": true - }, - "clap": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.0.tgz", - "integrity": "sha1-WckP4+E3EEdG/xlGmiemNP9oyFc=", - "dev": true, - "requires": { - "chalk": "1.1.3" - } - }, - "clean-css": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.7.tgz", - "integrity": "sha1-ua6k+FZ5iJzz6ui0A0nsTr390DI=", - "dev": true, - "requires": { - "source-map": "0.5.6" - } - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "2.0.0" - } - }, - "cli-spinners": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.0.0.tgz", - "integrity": "sha1-75h+09SDkaw9q5GAtAanQhgNbmo=", - "dev": true - }, - "cli-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz", - "integrity": "sha1-sjTKIJsp72b8UY2bmNWEewDt8Ao=", - "dev": true - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - } - } - }, - "clone": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "coa": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", - "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", - "dev": true, - "requires": { - "q": "1.5.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "color": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", - "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", - "dev": true, - "requires": { - "clone": "1.0.2", - "color-convert": "1.9.0", - "color-string": "0.3.0" - } - }, - "color-convert": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", - "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-string": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", - "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "colormin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", - "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", - "dev": true, - "requires": { - "color": "0.11.4", - "css-color-names": "0.0.4", - "has": "1.0.1" - } - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "command-exists": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.2.tgz", - "integrity": "sha1-EoGcZPr5VEbsCuB/5sr7brNwiyI=", - "dev": true - }, - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "dev": true, - "requires": { - "graceful-readlink": "1.0.1" - } - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "compressible": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.10.tgz", - "integrity": "sha1-/tocf3YXkScyspv4zyYlKiC57s0=", - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "compression": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.0.tgz", - "integrity": "sha1-AwyfGY8WQ6BX13anOOki2kNzAS0=", - "dev": true, - "requires": { - "accepts": "1.3.3", - "bytes": "2.5.0", - "compressible": "2.0.10", - "debug": "2.6.8", - "on-headers": "1.0.1", - "safe-buffer": "5.1.1", - "vary": "1.1.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" - } - }, - "configstore": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.0.tgz", - "integrity": "sha1-Rd+QcHPibfoc9LLVL1tgVF6qEdE=", - "dev": true, - "requires": { - "dot-prop": "4.1.1", - "graceful-fs": "4.1.11", - "make-dir": "1.0.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.1.0", - "xdg-basedir": "3.0.0" - } - }, - "connect-history-api-fallback": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz", - "integrity": "sha1-5R0X+PDvDbkKZP20feMFFVbp8Wk=", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "0.1.4" - } - }, - "console-stream": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", - "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", - "dev": true - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", - "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=", - "dev": true - }, - "convert-source-map": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", - "dev": true - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.0.1.tgz", - "integrity": "sha1-lyjjg7lDFgUNDHRjlY8rhcCqggA=", - "dev": true, - "requires": { - "bluebird": "2.11.0", - "fs-extra": "0.26.7", - "glob": "6.0.4", - "is-glob": "3.1.0", - "loader-utils": "0.2.17", - "lodash": "4.17.4", - "minimatch": "3.0.4", - "node-dir": "0.1.17" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "2.1.1" - } - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } - } - }, - "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.1.3.tgz", - "integrity": "sha1-lSdx6w3dwcs/ovb75RpSLpOz7go=", - "dev": true, - "requires": { - "is-directory": "0.3.1", - "js-yaml": "3.9.0", - "minimist": "1.2.0", - "object-assign": "4.1.1", - "os-homedir": "1.0.2", - "parse-json": "2.2.0", - "require-from-string": "1.2.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "create-ecdh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "elliptic": "6.4.0" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "1.0.0" - } - }, - "create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", - "dev": true, - "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "sha.js": "2.4.8" - } - }, - "create-hmac": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", - "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", - "dev": true, - "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.8" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.2.14" - } - }, - "cross-spawn-promise": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/cross-spawn-promise/-/cross-spawn-promise-0.10.1.tgz", - "integrity": "sha1-25y0xQxgtyoVvgSbeBIs44LYexA=", - "dev": true, - "requires": { - "cross-spawn": "5.1.0" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1" - } - }, - "crypto-browserify": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.1.tgz", - "integrity": "sha512-Na7ZlwCOqoaW5RwUK1WpXws2kv8mNhWdTlzob0UXulk6G9BDbyiJaGTYBIX61Ozn9l1EPPJpICZb4DaOpT9NlQ==", - "dev": true, - "requires": { - "browserify-cipher": "1.0.0", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.0", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "diffie-hellman": "5.0.2", - "inherits": "2.0.3", - "pbkdf2": "3.0.12", - "public-encrypt": "4.0.0", - "randombytes": "2.0.5" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-loader": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.25.0.tgz", - "integrity": "sha1-w/68jOKPTINXa2sTcH9H+Qw5AiM=", - "dev": true, - "requires": { - "babel-code-frame": "6.22.0", - "css-selector-tokenizer": "0.6.0", - "cssnano": "3.10.0", - "loader-utils": "0.2.17", - "lodash.camelcase": "3.0.1", - "object-assign": "4.1.1", - "postcss": "5.2.17", - "postcss-modules-extract-imports": "1.1.0", - "postcss-modules-local-by-default": "1.2.0", - "postcss-modules-scope": "1.1.0", - "postcss-modules-values": "1.3.0", - "source-list-map": "0.1.8" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } - } - }, - "css-modules-require-hook": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/css-modules-require-hook/-/css-modules-require-hook-4.0.6.tgz", - "integrity": "sha1-cKA7DKN4TjblodwaqCugaNUySL8=", - "dev": true, - "requires": { - "debug": "2.6.8", - "generic-names": "1.0.2", - "glob-to-regexp": "0.1.0", - "icss-replace-symbols": "1.1.0", - "lodash": "4.17.4", - "postcss": "5.2.17", - "postcss-modules-extract-imports": "1.1.0", - "postcss-modules-local-by-default": "1.2.0", - "postcss-modules-parser": "1.1.1", - "postcss-modules-scope": "1.1.0", - "postcss-modules-values": "1.3.0", - "seekout": "1.0.2" - } - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "1.0.0", - "css-what": "2.1.0", - "domutils": "1.5.1", - "nth-check": "1.0.1" - } - }, - "css-selector-tokenizer": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.6.0.tgz", - "integrity": "sha1-ZEX1gseTDSQdzFAHpD1vy48HMVI=", - "dev": true, - "requires": { - "cssesc": "0.1.0", - "fastparse": "1.1.1", - "regexpu-core": "1.0.0" - } - }, - "css-what": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", - "dev": true - }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "cssnano": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", - "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", - "dev": true, - "requires": { - "autoprefixer": "6.7.7", - "decamelize": "1.2.0", - "defined": "1.0.0", - "has": "1.0.1", - "object-assign": "4.1.1", - "postcss": "5.2.17", - "postcss-calc": "5.3.1", - "postcss-colormin": "2.2.2", - "postcss-convert-values": "2.6.1", - "postcss-discard-comments": "2.0.4", - "postcss-discard-duplicates": "2.1.0", - "postcss-discard-empty": "2.1.0", - "postcss-discard-overridden": "0.1.1", - "postcss-discard-unused": "2.2.3", - "postcss-filter-plugins": "2.0.2", - "postcss-merge-idents": "2.1.7", - "postcss-merge-longhand": "2.0.2", - "postcss-merge-rules": "2.1.2", - "postcss-minify-font-values": "1.0.5", - "postcss-minify-gradients": "1.0.5", - "postcss-minify-params": "1.2.2", - "postcss-minify-selectors": "2.1.1", - "postcss-normalize-charset": "1.1.1", - "postcss-normalize-url": "3.0.8", - "postcss-ordered-values": "2.2.3", - "postcss-reduce-idents": "2.4.0", - "postcss-reduce-initial": "1.0.1", - "postcss-reduce-transforms": "1.0.4", - "postcss-svgo": "2.1.6", - "postcss-unique-selectors": "2.0.2", - "postcss-value-parser": "3.3.0", - "postcss-zindex": "2.2.0" - }, - "dependencies": { - "autoprefixer": { - "version": "6.7.7", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", - "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", - "dev": true, - "requires": { - "browserslist": "1.7.7", - "caniuse-db": "1.0.30000671", - "normalize-range": "0.1.2", - "num2fraction": "1.2.2", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", - "dev": true, - "requires": { - "caniuse-db": "1.0.30000671", - "electron-to-chromium": "1.3.15" - } - } - } - }, - "csso": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", - "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", - "dev": true, - "requires": { - "clap": "1.2.0", - "source-map": "0.5.6" - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "1.0.2" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true - } - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "dateformat": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", - "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=", - "dev": true - }, - "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decompress": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-3.0.0.tgz", - "integrity": "sha1-rx3VDQbjv8QyRh033hGzjA2ZG+0=", - "dev": true, - "requires": { - "buffer-to-vinyl": "1.1.0", - "concat-stream": "1.6.0", - "decompress-tar": "3.1.0", - "decompress-tarbz2": "3.1.0", - "decompress-targz": "3.1.0", - "decompress-unzip": "3.4.0", - "stream-combiner2": "1.1.1", - "vinyl-assign": "1.2.1", - "vinyl-fs": "2.4.4" - } - }, - "decompress-tar": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-3.1.0.tgz", - "integrity": "sha1-IXx4n5uURQ76rcXF5TeXj8MzxGY=", - "dev": true, - "requires": { - "is-tar": "1.0.0", - "object-assign": "2.1.1", - "strip-dirs": "1.1.1", - "tar-stream": "1.5.4", - "through2": "0.6.5", - "vinyl": "0.4.6" - }, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "object-assign": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", - "dev": true - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "0.2.0", - "clone-stats": "0.0.1" - } - } - } - }, - "decompress-tarbz2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz", - "integrity": "sha1-iyOTVoE1X58YnYclag+L3ZbZZm0=", - "dev": true, - "requires": { - "is-bzip2": "1.0.0", - "object-assign": "2.1.1", - "seek-bzip": "1.0.5", - "strip-dirs": "1.1.1", - "tar-stream": "1.5.4", - "through2": "0.6.5", - "vinyl": "0.4.6" - }, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "object-assign": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", - "dev": true - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "0.2.0", - "clone-stats": "0.0.1" - } - } - } - }, - "decompress-targz": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-3.1.0.tgz", - "integrity": "sha1-ssE9+YFmJomRtxXWRH9kLpaW9aA=", - "dev": true, - "requires": { - "is-gzip": "1.0.0", - "object-assign": "2.1.1", - "strip-dirs": "1.1.1", - "tar-stream": "1.5.4", - "through2": "0.6.5", - "vinyl": "0.4.6" - }, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "object-assign": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", - "dev": true - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "0.2.0", - "clone-stats": "0.0.1" - } - } - } - }, - "decompress-unzip": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-3.4.0.tgz", - "integrity": "sha1-YUdbQVIGa74/7hL51inRX+ZHjus=", - "dev": true, - "requires": { - "is-zip": "1.0.0", - "read-all-stream": "3.1.0", - "stat-mode": "0.2.2", - "strip-dirs": "1.1.1", - "through2": "2.0.3", - "vinyl": "1.2.0", - "yauzl": "2.8.0" - }, - "dependencies": { - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - } - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "dev": true, - "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "depd": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", - "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, - "detect-node": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", - "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", - "dev": true - }, - "devcert-san": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/devcert-san/-/devcert-san-0.3.3.tgz", - "integrity": "sha1-qnckR0Gy2DF3HAEfIu4l45atS6k=", - "dev": true, - "requires": { - "@types/configstore": "2.1.1", - "@types/debug": "0.0.29", - "@types/get-port": "0.0.4", - "@types/glob": "5.0.30", - "@types/mkdirp": "0.3.29", - "@types/node": "7.0.37", - "@types/tmp": "0.0.32", - "command-exists": "1.2.2", - "configstore": "3.1.0", - "debug": "2.6.8", - "eol": "0.8.1", - "get-port": "3.1.0", - "glob": "7.1.2", - "mkdirp": "0.5.1", - "tmp": "0.0.31", - "tslib": "1.7.1" - } - }, - "diffie-hellman": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "miller-rabin": "4.0.0", - "randombytes": "2.0.5" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.1.1.tgz", - "integrity": "sha1-I2nUUDivBF84mOb6VoYq7T9AKWw=", - "dev": true, - "requires": { - "ip": "1.1.5", - "safe-buffer": "5.1.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "1.1.0" - } - }, - "doctrine": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", - "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", - "dev": true, - "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" - } - }, - "dom-converter": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", - "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", - "dev": true, - "requires": { - "utila": "0.3.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "dom-urls": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/dom-urls/-/dom-urls-1.1.0.tgz", - "integrity": "sha1-AB3fgWKM0ecGElxxdvU8zsVdkY4=", - "dev": true, - "requires": { - "urijs": "1.18.10" - } - }, - "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", - "dev": true - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", - "dev": true - }, - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "dev": true, - "requires": { - "domelementtype": "1.3.0" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" - } - }, - "dot-prop": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.1.1.tgz", - "integrity": "sha1-qEk/C3te7sglJbXHWH+n3nyoWcE=", - "dev": true, - "requires": { - "is-obj": "1.0.1" - } - }, - "download": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/download/-/download-4.4.3.tgz", - "integrity": "sha1-qlX9rTktldS2jowr4D4MKqIbqaw=", - "dev": true, - "requires": { - "caw": "1.2.0", - "concat-stream": "1.6.0", - "each-async": "1.1.1", - "filenamify": "1.2.1", - "got": "5.7.1", - "gulp-decompress": "1.2.0", - "gulp-rename": "1.2.2", - "is-url": "1.2.2", - "object-assign": "4.1.1", - "read-all-stream": "3.1.0", - "readable-stream": "2.3.3", - "stream-combiner2": "1.1.1", - "vinyl": "1.2.0", - "vinyl-fs": "2.4.4", - "ware": "1.3.0" - } - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "duplexify": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.0.tgz", - "integrity": "sha1-GqdzAC4VeEV+nZ1KULDMquvL1gQ=", - "dev": true, - "requires": { - "end-of-stream": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "stream-shift": "1.0.0" - }, - "dependencies": { - "end-of-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.0.0.tgz", - "integrity": "sha1-1FlucCc0qT5A6a+GQxnqvZn/Lw4=", - "dev": true, - "requires": { - "once": "1.3.3" - } - }, - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - } - } - }, - "each-async": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz", - "integrity": "sha1-3uUim98KtrogEqOV4bhpq/iBNHM=", - "dev": true, - "requires": { - "onetime": "1.1.0", - "set-immediate-shim": "1.0.1" - }, - "dependencies": { - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - } - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.6.tgz", - "integrity": "sha1-R5Y2v6P+Ox3r1SCH8KyyBLTxnIg=", - "dev": true - }, - "ejs-loader": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/ejs-loader/-/ejs-loader-0.3.0.tgz", - "integrity": "sha1-aHNv3CMaSQ7fkZpkRq2dkFWlh74=", - "dev": true, - "requires": { - "loader-utils": "0.2.17", - "lodash": "3.10.1" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true - } - } - }, - "electron-to-chromium": { - "version": "1.3.15", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.15.tgz", - "integrity": "sha1-CDl5NIkcvPrrvRi4KpW1pIETg2k=", - "dev": true - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" - } - }, - "emitter-mixin": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/emitter-mixin/-/emitter-mixin-0.0.3.tgz", - "integrity": "sha1-WUjLKG8uSO3DslGnz8H3iDOW1lw=", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", - "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=", - "dev": true - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "0.4.18" - } - }, - "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", - "dev": true, - "requires": { - "once": "1.4.0" - } - }, - "enhanced-resolve": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.3.0.tgz", - "integrity": "sha512-2qbxE7ek3YxPJ1ML6V+satHkzHpJQKWkRHmRx6mfAoW59yP8YH8BFplbegSP+u2hBd6B6KCOpvJQ3dZAP+hkpg==", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.4.1", - "object-assign": "4.1.1", - "tapable": "0.2.6" - } - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", - "dev": true - }, - "eol": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/eol/-/eol-0.8.1.tgz", - "integrity": "sha1-3vwyJJkMfspzuzRGGlbPncJHYdA=", - "dev": true - }, - "errno": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", - "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", - "dev": true, - "requires": { - "prr": "0.0.0" - } - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, - "requires": { - "is-arrayish": "0.2.1" - } - }, - "es6-promise": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", - "integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "4.1.1" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.2.0.tgz", - "integrity": "sha1-orMYQRGxmOAunH88ymJaXgHFaz0=", - "dev": true, - "requires": { - "ajv": "5.2.2", - "babel-code-frame": "6.22.0", - "chalk": "1.1.3", - "concat-stream": "1.6.0", - "debug": "2.6.8", - "doctrine": "2.0.0", - "eslint-scope": "3.7.1", - "espree": "3.4.3", - "esquery": "1.0.0", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "glob": "7.1.2", - "globals": "9.18.0", - "ignore": "3.3.3", - "imurmurhash": "0.1.4", - "inquirer": "3.2.0", - "is-resolvable": "1.0.0", - "js-yaml": "3.9.0", - "json-stable-stringify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.4", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "4.0.0", - "progress": "2.0.0", - "require-uncached": "1.0.3", - "strip-json-comments": "2.0.1", - "table": "4.0.1", - "text-table": "0.2.0" - } - }, - "eslint-config-synacor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-synacor/-/eslint-config-synacor-1.0.1.tgz", - "integrity": "sha1-hTajG1jouW8SIybXeCE5dl105F0=", - "dev": true, - "requires": { - "babel-eslint": "7.2.3", - "eslint-plugin-compat": "1.0.4", - "eslint-plugin-mocha": "4.11.0", - "eslint-plugin-react": "7.1.0" - } - }, - "eslint-plugin-compat": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-compat/-/eslint-plugin-compat-1.0.4.tgz", - "integrity": "sha512-16yjDdjrivRQT7/Kov+3O6DMvfg8WYC1JKPAsvf/UNtdLBeMXVYATohAM4nOak1ynGP69mKUlOjw7nroUqY9Sg==", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "browserslist": "2.1.4", - "caniuse-db": "1.0.30000671", - "requireindex": "1.1.0" - } - }, - "eslint-plugin-mocha": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-4.11.0.tgz", - "integrity": "sha1-kRk6L1XiCl41l0BUoAidMBmO5Xg=", - "dev": true, - "requires": { - "ramda": "0.24.1" - } - }, - "eslint-plugin-react": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz", - "integrity": "sha1-J3cKzzn1/UnNCvQIPOWBBOs5DUw=", - "dev": true, - "requires": { - "doctrine": "2.0.0", - "has": "1.0.1", - "jsx-ast-utils": "1.4.1" - } - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true, - "requires": { - "esrecurse": "4.2.0", - "estraverse": "4.2.0" - } - }, - "espree": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.3.tgz", - "integrity": "sha1-KRC1zNSc6JPC//+qtP2LOjG4I3Q=", - "dev": true, - "requires": { - "acorn": "5.1.1", - "acorn-jsx": "3.0.1" - } - }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", - "dev": true - }, - "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", - "dev": true, - "requires": { - "estraverse": "4.2.0" - } - }, - "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", - "dev": true, - "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", - "integrity": "sha1-b2Ma7zNtbEY2K1F2QETOIWvjwFE=", - "dev": true - }, - "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "dev": true, - "requires": { - "duplexer": "0.1.1", - "from": "0.1.7", - "map-stream": "0.1.0", - "pause-stream": "0.0.11", - "split": "0.3.3", - "stream-combiner": "0.0.4", - "through": "2.3.8" - } - }, - "eventemitter3": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", - "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", - "dev": true - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "eventsource": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", - "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", - "dev": true, - "requires": { - "original": "1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz", - "integrity": "sha1-SXtmrZ/vZc18CKYYCCS6FHa2blM=", - "dev": true, - "requires": { - "create-hash": "1.1.3" - } - }, - "exec-series": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/exec-series/-/exec-series-1.0.3.tgz", - "integrity": "sha1-bSV6m+rEgqhyx3g7yGFYOfx3FDo=", - "dev": true, - "requires": { - "async-each-series": "1.1.0", - "object-assign": "4.1.1" - } - }, - "execa": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.5.1.tgz", - "integrity": "sha1-3j+4XLjW6RyFvLzrFkWBeFy1ezY=", - "dev": true, - "requires": { - "cross-spawn": "4.0.2", - "get-stream": "2.3.1", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "which": "1.2.14" - } - } - } - }, - "executable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/executable/-/executable-1.1.0.tgz", - "integrity": "sha1-h3mA6REvM5EGbaNyZd562ENKtNk=", - "dev": true, - "requires": { - "meow": "3.7.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "2.2.3" - } - }, - "express": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", - "integrity": "sha1-urZdDwOqgMNYQIly/HAPkWlEtmI=", - "dev": true, - "requires": { - "accepts": "1.3.3", - "array-flatten": "1.1.1", - "content-disposition": "0.5.2", - "content-type": "1.0.2", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.7", - "depd": "1.1.0", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.0", - "finalhandler": "1.0.3", - "fresh": "0.5.0", - "merge-descriptors": "1.0.1", - "methods": "1.1.2", - "on-finished": "2.3.0", - "parseurl": "1.3.1", - "path-to-regexp": "0.1.7", - "proxy-addr": "1.1.4", - "qs": "6.4.0", - "range-parser": "1.2.0", - "send": "0.15.3", - "serve-static": "1.12.3", - "setprototypeof": "1.0.3", - "statuses": "1.3.1", - "type-is": "1.6.15", - "utils-merge": "1.0.0", - "vary": "1.1.1" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - }, - "external-editor": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.4.tgz", - "integrity": "sha1-HtkZnanL/i7y96MbL96LDRI2iXI=", - "dev": true, - "requires": { - "iconv-lite": "0.4.18", - "jschardet": "1.5.0", - "tmp": "0.0.31" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "extract-text-webpack-plugin": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.2.tgz", - "integrity": "sha1-dW7076gVXDaBgz+8NNpTuUF0bWw=", - "dev": true, - "requires": { - "async": "2.5.0", - "loader-utils": "1.1.0", - "schema-utils": "0.3.0", - "webpack-sources": "1.0.1" - } - }, - "extsprintf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", - "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", - "dev": true - }, - "fancy-log": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", - "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "time-stamp": "1.1.0" - } - }, - "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastparse": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", - "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": "0.6.5" - } - }, - "fbjs": { - "version": "0.8.12", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.12.tgz", - "integrity": "sha1-ELXZL3bUVXX9Y6IX1OoCvqL47QQ=", - "requires": { - "core-js": "1.2.7", - "isomorphic-fetch": "2.2.1", - "loose-envify": "1.3.1", - "object-assign": "4.1.1", - "promise": "7.3.1", - "setimmediate": "1.0.5", - "ua-parser-js": "0.7.13" - }, - "dependencies": { - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - } - } - }, - "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", - "dev": true, - "requires": { - "pend": "1.2.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "requires": { - "flat-cache": "1.2.2", - "object-assign": "4.1.1" - } - }, - "file-loader": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-0.11.2.tgz", - "integrity": "sha512-N+uhF3mswIFeziHQjGScJ/yHXYt3DiLBeC+9vWW+WjUBiClMSOlV1YrXQi+7KM2aA3Rn4Bybgv+uXFQbfkzpvg==", - "dev": true, - "requires": { - "loader-utils": "1.1.0" - } - }, - "file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", - "dev": true - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "filename-reserved-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", - "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=", - "dev": true - }, - "filenamify": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", - "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", - "dev": true, - "requires": { - "filename-reserved-regex": "1.0.0", - "strip-outer": "1.0.0", - "trim-repeated": "1.0.0" - } - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "dev": true, - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - } - }, - "filled-array": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz", - "integrity": "sha1-w8T2xmO5I0WamqKZEtLQMfFQf4Q=", - "dev": true - }, - "finalhandler": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", - "integrity": "sha1-70fneVDpmXgOhgIqVg4yF+DQzIk=", - "dev": true, - "requires": { - "debug": "2.6.7", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.1", - "statuses": "1.3.1", - "unpipe": "1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "1.0.1", - "make-dir": "1.0.0", - "pkg-dir": "2.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "find-versions": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-1.2.1.tgz", - "integrity": "sha1-y96fEuOFdaCvG+G5osXV/Y8Ya2I=", - "dev": true, - "requires": { - "array-uniq": "1.0.3", - "get-stdin": "4.0.1", - "meow": "3.7.0", - "semver-regex": "1.0.0" - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, - "flat-cache": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", - "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", - "dev": true, - "requires": { - "circular-json": "0.3.1", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" - } - }, - "flatten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", - "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "1.0.2" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "forwarded": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", - "integrity": "sha1-Ge+YdMSuHCl7zweP3mOgm2aoQ2M=", - "dev": true - }, - "fresh": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", - "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=", - "dev": true - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, - "fs-extra": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "2.4.0", - "klaw": "1.3.1", - "path-is-absolute": "1.0.1", - "rimraf": "2.6.1" - } - }, - "fs.promised": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/fs.promised/-/fs.promised-3.0.0.tgz", - "integrity": "sha1-q3c3n3wa0JOeEmKows7ZP6bDnTs=", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=", - "dev": true - }, - "generic-names": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-1.0.2.tgz", - "integrity": "sha1-4lt/7OtbWo8o9flyp8z+V+Virc0=", - "dev": true, - "requires": { - "loader-utils": "0.2.17" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } - } - }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true - }, - "get-port": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.1.0.tgz", - "integrity": "sha1-7wGxioTKZIaXD/meVERhQac//T4=", - "dev": true - }, - "get-proxy": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-1.1.0.tgz", - "integrity": "sha1-iUhUSRvFkbDxR9euVw9cZ4tyVus=", - "dev": true, - "requires": { - "rc": "1.2.1" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "pinkie-promise": "2.0.1" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "2.0.1" - } - }, - "glob-stream": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", - "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", - "dev": true, - "requires": { - "extend": "3.0.1", - "glob": "5.0.15", - "glob-parent": "3.1.0", - "micromatch": "2.3.11", - "ordered-read-streams": "0.3.0", - "through2": "0.6.5", - "to-absolute-glob": "0.1.1", - "unique-stream": "2.2.1" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "2.1.1" - } - } - } - }, - "glob-to-regexp": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.1.0.tgz", - "integrity": "sha1-4DadQmV4/UVtR9wjsJ3gXB2p6l0=", - "dev": true - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "glogg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", - "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", - "dev": true, - "requires": { - "sparkles": "1.0.0" - } - }, - "got": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", - "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", - "dev": true, - "requires": { - "create-error-class": "3.0.2", - "duplexer2": "0.1.4", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "node-status-codes": "1.0.0", - "object-assign": "4.1.1", - "parse-json": "2.2.0", - "pinkie-promise": "2.0.1", - "read-all-stream": "3.1.0", - "readable-stream": "2.3.3", - "timed-out": "3.1.3", - "unzip-response": "1.0.2", - "url-parse-lax": "1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, - "gulp-decompress": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gulp-decompress/-/gulp-decompress-1.2.0.tgz", - "integrity": "sha1-jutlpeAV+O2FMsr+KEVJYGJvDcc=", - "dev": true, - "requires": { - "archive-type": "3.2.0", - "decompress": "3.0.0", - "gulp-util": "3.0.8", - "readable-stream": "2.3.3" - } - }, - "gulp-rename": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz", - "integrity": "sha1-OtRCh2PwXidk3sHGfYaNsnVoeBc=", - "dev": true - }, - "gulp-sourcemaps": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", - "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", - "dev": true, - "requires": { - "convert-source-map": "1.5.0", - "graceful-fs": "4.1.11", - "strip-bom": "2.0.0", - "through2": "2.0.3", - "vinyl": "1.2.0" - }, - "dependencies": { - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - } - } - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "array-differ": "1.0.0", - "array-uniq": "1.0.3", - "beeper": "1.1.1", - "chalk": "1.1.3", - "dateformat": "2.0.0", - "fancy-log": "1.3.0", - "gulplog": "1.0.0", - "has-gulplog": "0.1.0", - "lodash._reescape": "3.0.0", - "lodash._reevaluate": "3.0.0", - "lodash._reinterpolate": "3.0.0", - "lodash.template": "3.6.2", - "minimist": "1.2.0", - "multipipe": "0.1.2", - "object-assign": "3.0.0", - "replace-ext": "0.0.1", - "through2": "2.0.3", - "vinyl": "0.5.3" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "1.0.2", - "clone-stats": "0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "1.0.0" - } - }, - "handle-thing": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - } - } - }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", - "dev": true, - "requires": { - "function-bind": "1.1.0" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "1.0.0" - } - }, - "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "obuf": "1.1.1", - "readable-stream": "2.3.3", - "wbuf": "1.7.2" - } - }, - "html-comment-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", - "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=", - "dev": true - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "html-minifier": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.2.tgz", - "integrity": "sha1-1zvD/0SJQkCIGM5gm/P7DqfvTrc=", - "dev": true, - "requires": { - "camel-case": "3.0.0", - "clean-css": "4.1.7", - "commander": "2.9.0", - "he": "1.1.1", - "ncname": "1.0.0", - "param-case": "2.1.1", - "relateurl": "0.2.7", - "uglify-js": "3.0.25" - }, - "dependencies": { - "uglify-js": { - "version": "3.0.25", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.25.tgz", - "integrity": "sha512-JO1XE0WZ9m6UpDkN7WCyPNAWI6EN3K0g40ekcoJKejViYmryJ0BaLxXjvra1IsAeIlJfq72scTbhl0jknsT2GA==", - "dev": true, - "requires": { - "commander": "2.9.0", - "source-map": "0.5.6" - } - } - } - }, - "html-webpack-exclude-assets-plugin": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/html-webpack-exclude-assets-plugin/-/html-webpack-exclude-assets-plugin-0.0.5.tgz", - "integrity": "sha1-Qa9lAD837zM/BE9J5q2opNP4KVk=", - "dev": true - }, - "html-webpack-plugin": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.29.0.tgz", - "integrity": "sha1-6Yf0IYU9O2k4yMTIFxhC5f0XryM=", - "dev": true, - "requires": { - "bluebird": "3.5.0", - "html-minifier": "3.5.2", - "loader-utils": "0.2.17", - "lodash": "4.17.4", - "pretty-error": "2.1.1", - "toposort": "1.0.3" - }, - "dependencies": { - "bluebird": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", - "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } - } - }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "dev": true, - "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.1.0", - "domutils": "1.1.6", - "readable-stream": "1.0.34" - }, - "dependencies": { - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "dev": true, - "requires": { - "domelementtype": "1.3.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", - "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=", - "dev": true, - "requires": { - "depd": "1.1.0", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.3.1" - } - }, - "http-proxy": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz", - "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=", - "dev": true, - "requires": { - "eventemitter3": "1.2.0", - "requires-port": "1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz", - "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=", - "dev": true, - "requires": { - "http-proxy": "1.16.2", - "is-glob": "3.1.0", - "lodash": "4.17.4", - "micromatch": "2.3.11" - }, - "dependencies": { - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "2.1.1" - } - } - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.1" - } - }, - "https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", - "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", - "dev": true - }, - "if-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/if-env/-/if-env-1.0.0.tgz", - "integrity": "sha1-bgkILN0/LM+3W68CKkqXFWX2AHw=", - "dev": true, - "requires": { - "npm-run-all": "1.4.0" - } - }, - "ignore": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz", - "integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0=", - "dev": true - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "immutability-helper": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/immutability-helper/-/immutability-helper-2.3.0.tgz", - "integrity": "sha1-6Jd0HB2ilUGoYeoWvb+QkmXi61U=", - "requires": { - "invariant": "2.2.2" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", - "dev": true - }, - "inquirer": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.2.0.tgz", - "integrity": "sha512-4CyUYMP7lOBkiUU1rR24WGrfRX6SucwbY2Mqb1PdApU24wnTIk4TsnkQwV72dDdIKZ2ycLP+fWCV+tA7wwgoew==", - "dev": true, - "requires": { - "ansi-escapes": "2.0.0", - "chalk": "2.0.1", - "cli-cursor": "2.1.0", - "cli-width": "2.1.0", - "external-editor": "2.0.4", - "figures": "2.0.0", - "lodash": "4.17.4", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.0", - "strip-ansi": "4.0.0", - "through": "2.3.8" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", - "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", - "dev": true, - "requires": { - "ansi-styles": "3.1.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.2.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.0.tgz", - "integrity": "sha512-Ts0Mu/A1S1aZxEJNG88I4Oc9rcZSBFNac5e27yh4j2mqbhZSSzR1Ah79EYwSn9Zuh7lrlGD2cVGzw1RKGzyLSg==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "internal-ip": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", - "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", - "dev": true, - "requires": { - "meow": "3.7.0" - } - }, - "interpret": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", - "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=", - "dev": true - }, - "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", - "requires": { - "loose-envify": "1.3.1" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz", - "integrity": "sha1-3FiQdvZZ9BnCIgOaMzFvHHOH7/0=", - "dev": true - }, - "ipaddr.js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", - "integrity": "sha1-HgOlL9rYOou7KyXL9JmLTP/NPew=", - "dev": true - }, - "is-absolute": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz", - "integrity": "sha1-hHSREZ/MtftDYhfMc39/qtUPYD8=", - "dev": true, - "requires": { - "is-relative": "0.1.3" - } - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "1.8.0" - } - }, - "is-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-bzip2": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-bzip2/-/is-bzip2-1.0.0.tgz", - "integrity": "sha1-XuWOqlounIDiFAe+3yOuWsCRs/w=", - "dev": true - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-gzip": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-gzip/-/is-gzip-1.0.0.tgz", - "integrity": "sha1-bKiwe5nHeZgCWQDlVc7Y7YCHmoM=", - "dev": true - }, - "is-natural-number": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-2.1.1.tgz", - "integrity": "sha1-fUxXKDd+84bD4ZSpkRv1fG3DNec=", - "dev": true - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "3.2.2" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "dev": true, - "requires": { - "is-path-inside": "1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", - "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", - "dev": true, - "requires": { - "path-is-inside": "1.0.2" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-relative": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz", - "integrity": "sha1-kF/uiuhvRbPsYUvDwVyGnfCHboI=", - "dev": true - }, - "is-resolvable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", - "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", - "dev": true, - "requires": { - "tryit": "1.0.3" - } - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-svg": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", - "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", - "dev": true, - "requires": { - "html-comment-regex": "1.1.1" - } - }, - "is-tar": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-tar/-/is-tar-1.0.0.tgz", - "integrity": "sha1-L2suF5LB9bs2UZrKqdZcDSb+hT0=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true, - "optional": true - }, - "is-url": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", - "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", - "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", - "dev": true - }, - "is-zip": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-zip/-/is-zip-1.0.0.tgz", - "integrity": "sha1-R7Co/004p2QxzP2ZqOFaTIa6IyU=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "requires": { - "node-fetch": "1.7.1", - "whatwg-fetch": "2.0.3" - } - }, - "isomorphic-unfetch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-2.0.0.tgz", - "integrity": "sha1-9QFApMFj11grXzfxWRloxPgJpkU=", - "dev": true, - "requires": { - "node-fetch": "1.7.1", - "unfetch": "3.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true, - "optional": true - }, - "js-base64": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.1.9.tgz", - "integrity": "sha1-8OgK4DmkvWVLXygfyT8EqRSn/M4=", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "js-yaml": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.9.0.tgz", - "integrity": "sha512-0LoUNELX4S+iofCT8f4uEHIiRBR+c2AINyC8qRWfC6QNruLtxVZRJaPcu/xwMgFIgDxF25tGHaDjvxzJCNE9yw==", - "dev": true, - "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "jschardet": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.0.tgz", - "integrity": "sha512-+Q8JsoEQbrdE+a/gg1F9XO92gcKXgpE5UACqr0sIubjDmBEkd+OOWPGzQeMrWSLxd73r4dHxBeRW7edHu5LmJQ==", - "dev": true - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "json-loader": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.4.tgz", - "integrity": "sha1-i6oTZaYy9Yo8RtIBdfxgAsluN94=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true, - "optional": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true, - "optional": true - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsprim": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", - "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true - } - } - }, - "jsx-ast-utils": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", - "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=", - "dev": true - }, - "junk": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/junk/-/junk-1.0.3.tgz", - "integrity": "sha1-h75jSIZJy9ym9Tqzm+yczSNH9ZI=", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.5" - } - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11" - } - }, - "latest-version": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz", - "integrity": "sha1-VvjWE5YghHuAF/jx9NeOIRMkFos=", - "dev": true, - "requires": { - "package-json": "2.4.0" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - }, - "lazy-req": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/lazy-req/-/lazy-req-1.1.0.tgz", - "integrity": "sha1-va6+rTD42CQDnODOFJ1Nqge6H6w=", - "dev": true - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "1.0.0" - } - }, - "less": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/less/-/less-2.7.2.tgz", - "integrity": "sha1-No1sxz4fsDmBGDKAkYdDxdz5s98=", - "dev": true, - "requires": { - "errno": "0.1.4", - "graceful-fs": "4.1.11", - "image-size": "0.5.5", - "mime": "1.3.4", - "mkdirp": "0.5.1", - "promise": "7.3.1", - "request": "2.81.0", - "source-map": "0.5.6" - } - }, - "less-loader": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.5.tgz", - "integrity": "sha1-rhVadAbKxqzSk9eFWH/P8PR4xN0=", - "dev": true, - "requires": { - "clone": "2.1.1", - "loader-utils": "1.1.0", - "pify": "2.3.0" - }, - "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", - "dev": true - } - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "lodash-es": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz", - "integrity": "sha1-3MHXVS4VCgZABzupyzHXDwMpUOc=" - }, - "lodash._arrayeach": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz", - "integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._baseeach": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz", - "integrity": "sha1-z4cGVyyhROjZ11InyZDamC+TKvM=", - "dev": true, - "requires": { - "lodash.keys": "3.1.2" - } - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._bindcallback": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", - "dev": true - }, - "lodash._createcompounder": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._createcompounder/-/lodash._createcompounder-3.0.0.tgz", - "integrity": "sha1-XdLLVTctbnDg4jkvsjBNZjEJEHU=", - "dev": true, - "requires": { - "lodash.deburr": "3.2.0", - "lodash.words": "3.2.0" - } - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.camelcase": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-3.0.1.tgz", - "integrity": "sha1-kyyLh/ikN3iXxnGXUzKC+Xrqwpg=", - "dev": true, - "requires": { - "lodash._createcompounder": "3.0.0" - } - }, - "lodash.deburr": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-3.2.0.tgz", - "integrity": "sha1-baj1QzSjZqfPTEx2742Aqhs2XtU=", - "dev": true, - "requires": { - "lodash._root": "3.0.1" - } - }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "3.0.1" - } - }, - "lodash.foreach": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-3.0.3.tgz", - "integrity": "sha1-b9fvt5aRrs1n/erCdhyY5wHWw5o=", - "dev": true, - "requires": { - "lodash._arrayeach": "3.0.0", - "lodash._baseeach": "3.0.4", - "lodash._bindcallback": "3.0.1", - "lodash.isarray": "3.0.4" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "3.9.1", - "lodash.isarguments": "3.1.0", - "lodash.isarray": "3.0.4" - } - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "3.0.1", - "lodash._basetostring": "3.0.1", - "lodash._basevalues": "3.0.0", - "lodash._isiterateecall": "3.0.9", - "lodash._reinterpolate": "3.0.0", - "lodash.escape": "3.2.0", - "lodash.keys": "3.1.2", - "lodash.restparam": "3.6.1", - "lodash.templatesettings": "3.1.1" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.escape": "3.2.0" - } - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "lodash.words": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.words/-/lodash.words-3.2.0.tgz", - "integrity": "sha1-TiqGSbwIdFsXxpWxo86P7llmI7M=", - "dev": true, - "requires": { - "lodash._root": "3.0.1" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "1.1.3" - } - }, - "logalot": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", - "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", - "dev": true, - "requires": { - "figures": "1.7.0", - "squeak": "1.3.0" - }, - "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" - } - } - } - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "requires": { - "js-tokens": "3.0.2" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true - }, - "lpad-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", - "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", - "dev": true, - "requires": { - "get-stdin": "4.0.1", - "indent-string": "2.1.0", - "longest": "1.0.1", - "meow": "3.7.0" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "dev": true, - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "macaddress": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz", - "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=", - "dev": true - }, - "make-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", - "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", - "dev": true, - "requires": { - "pify": "2.3.0" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", - "dev": true - }, - "math-expression-evaluator": { - "version": "1.2.17", - "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", - "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", - "dev": true - }, - "maximatch": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/maximatch/-/maximatch-0.1.0.tgz", - "integrity": "sha1-hs2NawTJ8wfAWmuUGZBtA2D7E6I=", - "dev": true, - "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "1.1.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "0.1.4", - "readable-stream": "2.3.3" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.3" - } - }, - "miller-rabin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", - "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "brorand": "1.1.0" - } - }, - "mime": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", - "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=", - "dev": true - }, - "mime-db": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", - "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multicast-dns": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.1.1.tgz", - "integrity": "sha1-bn3oalcIcqsXBYrepxYLvsqBTd4=", - "dev": true, - "requires": { - "dns-packet": "1.1.1", - "thunky": "0.1.0" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - }, - "dependencies": { - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "1.1.14" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "ncname": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz", - "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=", - "dev": true, - "requires": { - "xml-char-classes": "1.0.0" - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "no-case": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.1.tgz", - "integrity": "sha1-euuhxzpSGEJlVUt9wDuvcg34AIE=", - "dev": true, - "requires": { - "lower-case": "1.1.4" - } - }, - "node-dir": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", - "integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=", - "dev": true, - "requires": { - "minimatch": "3.0.4" - } - }, - "node-fetch": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz", - "integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==", - "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" - } - }, - "node-forge": { - "version": "0.6.33", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.33.tgz", - "integrity": "sha1-RjgRh59XPUUVWtap9D3ClujoXrw=", - "dev": true - }, - "node-libs-browser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.0.0.tgz", - "integrity": "sha1-o6WeyXAkmFtG6Vg3lkb5bEthZkY=", - "dev": true, - "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.1.4", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.11.1", - "domain-browser": "1.1.7", - "events": "1.1.1", - "https-browserify": "0.0.1", - "os-browserify": "0.2.1", - "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.3", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "0.10.31", - "timers-browserify": "2.0.2", - "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "node-status-codes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz", - "integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=", - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.3.0", - "validate-npm-package-license": "3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "1.0.2" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "prepend-http": "1.0.4", - "query-string": "4.3.4", - "sort-keys": "1.1.2" - } - }, - "npm-run-all": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-1.4.0.tgz", - "integrity": "sha1-pGm7n+q+W/OqmRaDO69ndlguiUg=", - "dev": true, - "requires": { - "babel-polyfill": "6.23.0", - "minimatch": "3.0.4", - "ps-tree": "1.1.0", - "shell-quote": "1.6.1", - "which": "1.2.14" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "2.0.1" - } - }, - "nth-check": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", - "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", - "dev": true, - "requires": { - "boolbase": "1.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", - "dev": true - }, - "object.assign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.0.4.tgz", - "integrity": "sha1-scnMBE7xuf5jYG/BQau7MuFHMMw=", - "dev": true, - "requires": { - "define-properties": "1.1.2", - "function-bind": "1.1.0", - "object-keys": "1.0.11" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, - "obuf": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.1.tgz", - "integrity": "sha1-EEEktsYCxnlogaBCVB0220OlJk4=", - "dev": true - }, - "offline-plugin": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/offline-plugin/-/offline-plugin-4.8.3.tgz", - "integrity": "sha1-npW9NC6irINrABuB8gTEBjhpTWw=", - "dev": true, - "requires": { - "deep-extend": "0.4.2", - "ejs": "2.5.6", - "loader-utils": "0.2.17", - "minimatch": "3.0.4", - "slash": "1.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "1.1.0" - } - }, - "opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "pinkie-promise": "2.0.1" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "ora": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-1.3.0.tgz", - "integrity": "sha1-gAeN0rkqk0r2ajrXKluRBpTt5Ro=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "cli-cursor": "2.1.0", - "cli-spinners": "1.0.0", - "log-symbols": "1.0.2" - } - }, - "ordered-read-streams": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", - "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", - "dev": true, - "requires": { - "is-stream": "1.1.0", - "readable-stream": "2.3.3" - } - }, - "original": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", - "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", - "dev": true, - "requires": { - "url-parse": "1.0.5" - }, - "dependencies": { - "url-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz", - "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", - "dev": true, - "requires": { - "querystringify": "0.0.4", - "requires-port": "1.0.0" - } - } - } - }, - "os-browserify": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", - "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=", - "dev": true - }, - "os-filter-obj": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-1.0.3.tgz", - "integrity": "sha1-WRUzDZDs7VV9LZOKMcbdIU2cY60=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "dev": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", - "dev": true - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "1.1.0" - } - }, - "p-map": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.1.1.tgz", - "integrity": "sha1-BfXkrpegaDcbwqXMhr+9vBnErno=", - "dev": true - }, - "package-json": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz", - "integrity": "sha1-DRW9Z9HLvduyyiIv8u24a8sxqLs=", - "dev": true, - "requires": { - "got": "5.7.1", - "registry-auth-token": "3.3.1", - "registry-url": "3.1.0", - "semver": "5.3.0" - } - }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "2.3.1" - } - }, - "parse-asn1": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", - "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", - "dev": true, - "requires": { - "asn1.js": "4.9.1", - "browserify-aes": "1.0.6", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.0", - "pbkdf2": "3.0.12" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "1.3.1" - } - }, - "parseurl": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", - "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "dev": true, - "requires": { - "through": "2.3.8" - } - }, - "pbkdf2": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.12.tgz", - "integrity": "sha1-vjZ4XFBn6kjYBv+SMojF91C2uKI=", - "dev": true, - "requires": { - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.8" - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true, - "optional": true - }, - "persist-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/persist-path/-/persist-path-1.0.2.tgz", - "integrity": "sha1-t7lHU2W1zPA4qvpVrxKw3YxBjXo=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - } - } - }, - "pluralize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-4.0.0.tgz", - "integrity": "sha1-WbcIwcAZCi9pLxx2GMRGsFL9F2I=", - "dev": true - }, - "portfinder": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", - "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", - "dev": true, - "requires": { - "async": "1.5.2", - "debug": "2.6.8", - "mkdirp": "0.5.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "postcss": { - "version": "5.2.17", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", - "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "js-base64": "2.1.9", - "source-map": "0.5.6", - "supports-color": "3.2.3" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "1.0.0" - } - } - } - }, - "postcss-calc": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", - "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", - "dev": true, - "requires": { - "postcss": "5.2.17", - "postcss-message-helpers": "2.0.0", - "reduce-css-calc": "1.3.0" - } - }, - "postcss-colormin": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", - "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", - "dev": true, - "requires": { - "colormin": "1.1.2", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-convert-values": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", - "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", - "dev": true, - "requires": { - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-discard-comments": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", - "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-discard-duplicates": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", - "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-discard-empty": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", - "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-discard-overridden": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", - "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-discard-unused": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", - "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", - "dev": true, - "requires": { - "postcss": "5.2.17", - "uniqs": "2.0.0" - } - }, - "postcss-filter-plugins": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz", - "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=", - "dev": true, - "requires": { - "postcss": "5.2.17", - "uniqid": "4.1.1" - } - }, - "postcss-less": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-0.16.1.tgz", - "integrity": "sha1-3xee0kNlpg9mWOE5gW26x4ruUEM=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-load-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", - "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", - "dev": true, - "requires": { - "cosmiconfig": "2.1.3", - "object-assign": "4.1.1", - "postcss-load-options": "1.2.0", - "postcss-load-plugins": "2.3.0" - } - }, - "postcss-load-options": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", - "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", - "dev": true, - "requires": { - "cosmiconfig": "2.1.3", - "object-assign": "4.1.1" - } - }, - "postcss-load-plugins": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", - "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", - "dev": true, - "requires": { - "cosmiconfig": "2.1.3", - "object-assign": "4.1.1" - } - }, - "postcss-loader": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-1.3.3.tgz", - "integrity": "sha1-piHqH6KQYqg5cqRvVEhncTAZFus=", - "dev": true, - "requires": { - "loader-utils": "1.1.0", - "object-assign": "4.1.1", - "postcss": "5.2.17", - "postcss-load-config": "1.2.0" - } - }, - "postcss-merge-idents": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", - "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", - "dev": true, - "requires": { - "has": "1.0.1", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-merge-longhand": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", - "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-merge-rules": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", - "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", - "dev": true, - "requires": { - "browserslist": "1.7.7", - "caniuse-api": "1.6.1", - "postcss": "5.2.17", - "postcss-selector-parser": "2.2.3", - "vendors": "1.0.1" - }, - "dependencies": { - "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", - "dev": true, - "requires": { - "caniuse-db": "1.0.30000671", - "electron-to-chromium": "1.3.15" - } - } - } - }, - "postcss-message-helpers": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", - "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", - "dev": true - }, - "postcss-minify-font-values": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", - "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-minify-gradients": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", - "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", - "dev": true, - "requires": { - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-minify-params": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", - "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", - "dev": true, - "requires": { - "alphanum-sort": "1.0.2", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0", - "uniqs": "2.0.0" - } - }, - "postcss-minify-selectors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", - "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", - "dev": true, - "requires": { - "alphanum-sort": "1.0.2", - "has": "1.0.1", - "postcss": "5.2.17", - "postcss-selector-parser": "2.2.3" - } - }, - "postcss-modules-extract-imports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz", - "integrity": "sha1-thTJcgvmgW6u41+zpfqh26agXds=", - "dev": true, - "requires": { - "postcss": "6.0.7" - }, - "dependencies": { - "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", - "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", - "dev": true, - "requires": { - "ansi-styles": "3.1.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.2.0" - } - }, - "postcss": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.7.tgz", - "integrity": "sha512-8h/GrGLLyxM5ZvzpCH2XTYPysaSL3Ku5kWD7tKXeKRj8NVg1tyldHFCQGF4NTvRUDvjQfmcCRuowHHFFlAURUg==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "source-map": "0.5.6", - "supports-color": "4.2.0" - } - }, - "supports-color": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.0.tgz", - "integrity": "sha512-Ts0Mu/A1S1aZxEJNG88I4Oc9rcZSBFNac5e27yh4j2mqbhZSSzR1Ah79EYwSn9Zuh7lrlGD2cVGzw1RKGzyLSg==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "postcss-modules-local-by-default": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", - "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", - "dev": true, - "requires": { - "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.7" - }, - "dependencies": { - "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", - "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", - "dev": true, - "requires": { - "ansi-styles": "3.1.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.2.0" - } - }, - "css-selector-tokenizer": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", - "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", - "dev": true, - "requires": { - "cssesc": "0.1.0", - "fastparse": "1.1.1", - "regexpu-core": "1.0.0" - } - }, - "postcss": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.7.tgz", - "integrity": "sha512-8h/GrGLLyxM5ZvzpCH2XTYPysaSL3Ku5kWD7tKXeKRj8NVg1tyldHFCQGF4NTvRUDvjQfmcCRuowHHFFlAURUg==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "source-map": "0.5.6", - "supports-color": "4.2.0" - } - }, - "supports-color": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.0.tgz", - "integrity": "sha512-Ts0Mu/A1S1aZxEJNG88I4Oc9rcZSBFNac5e27yh4j2mqbhZSSzR1Ah79EYwSn9Zuh7lrlGD2cVGzw1RKGzyLSg==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "postcss-modules-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/postcss-modules-parser/-/postcss-modules-parser-1.1.1.tgz", - "integrity": "sha1-lfca15FvDzkge7gcQBM2yNJFc4w=", - "dev": true, - "requires": { - "icss-replace-symbols": "1.1.0", - "lodash.foreach": "3.0.3", - "postcss": "5.2.17" - } - }, - "postcss-modules-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", - "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", - "dev": true, - "requires": { - "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.7" - }, - "dependencies": { - "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", - "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", - "dev": true, - "requires": { - "ansi-styles": "3.1.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.2.0" - } - }, - "css-selector-tokenizer": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", - "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", - "dev": true, - "requires": { - "cssesc": "0.1.0", - "fastparse": "1.1.1", - "regexpu-core": "1.0.0" - } - }, - "postcss": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.7.tgz", - "integrity": "sha512-8h/GrGLLyxM5ZvzpCH2XTYPysaSL3Ku5kWD7tKXeKRj8NVg1tyldHFCQGF4NTvRUDvjQfmcCRuowHHFFlAURUg==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "source-map": "0.5.6", - "supports-color": "4.2.0" - } - }, - "supports-color": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.0.tgz", - "integrity": "sha512-Ts0Mu/A1S1aZxEJNG88I4Oc9rcZSBFNac5e27yh4j2mqbhZSSzR1Ah79EYwSn9Zuh7lrlGD2cVGzw1RKGzyLSg==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "postcss-modules-values": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", - "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", - "dev": true, - "requires": { - "icss-replace-symbols": "1.1.0", - "postcss": "6.0.7" - }, - "dependencies": { - "ansi-styles": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.1.0.tgz", - "integrity": "sha1-CcIC1ckX7CMYjKpcnLkXnNlUd1A=", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", - "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", - "dev": true, - "requires": { - "ansi-styles": "3.1.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.2.0" - } - }, - "postcss": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.7.tgz", - "integrity": "sha512-8h/GrGLLyxM5ZvzpCH2XTYPysaSL3Ku5kWD7tKXeKRj8NVg1tyldHFCQGF4NTvRUDvjQfmcCRuowHHFFlAURUg==", - "dev": true, - "requires": { - "chalk": "2.0.1", - "source-map": "0.5.6", - "supports-color": "4.2.0" - } - }, - "supports-color": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.0.tgz", - "integrity": "sha512-Ts0Mu/A1S1aZxEJNG88I4Oc9rcZSBFNac5e27yh4j2mqbhZSSzR1Ah79EYwSn9Zuh7lrlGD2cVGzw1RKGzyLSg==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "postcss-normalize-charset": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", - "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-normalize-url": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", - "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", - "dev": true, - "requires": { - "is-absolute-url": "2.1.0", - "normalize-url": "1.9.1", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-ordered-values": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", - "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", - "dev": true, - "requires": { - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-reduce-idents": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", - "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", - "dev": true, - "requires": { - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-reduce-initial": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", - "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", - "dev": true, - "requires": { - "postcss": "5.2.17" - } - }, - "postcss-reduce-transforms": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", - "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", - "dev": true, - "requires": { - "has": "1.0.1", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", - "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", - "dev": true, - "requires": { - "flatten": "1.0.2", - "indexes-of": "1.0.1", - "uniq": "1.0.1" - } - }, - "postcss-svgo": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", - "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", - "dev": true, - "requires": { - "is-svg": "2.1.0", - "postcss": "5.2.17", - "postcss-value-parser": "3.3.0", - "svgo": "0.7.2" - } - }, - "postcss-unique-selectors": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", - "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", - "dev": true, - "requires": { - "alphanum-sort": "1.0.2", - "postcss": "5.2.17", - "uniqs": "2.0.0" - } - }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", - "dev": true - }, - "postcss-zindex": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", - "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", - "dev": true, - "requires": { - "has": "1.0.1", - "postcss": "5.2.17", - "uniqs": "2.0.0" - } - }, - "preact": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-8.2.1.tgz", - "integrity": "sha1-Z0JD3wyEeITQGYNARKovzTEecu0=" - }, - "preact-cli": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/preact-cli/-/preact-cli-1.3.0.tgz", - "integrity": "sha1-GHbZY26S0P7VuHo1AXqBLhSHF7o=", - "dev": true, - "requires": { - "@webpack-blocks/css-modules": "0.4.0", - "@webpack-blocks/dev-server2": "0.4.0", - "@webpack-blocks/extract-text2": "0.4.0", - "@webpack-blocks/postcss": "0.4.3", - "@webpack-blocks/webpack2": "0.4.0", - "autoprefixer": "7.1.2", - "babel-loader": "7.1.1", - "babel-plugin-jsx-pragmatic": "1.0.2", - "babel-plugin-transform-decorators-legacy": "1.3.4", - "babel-plugin-transform-object-assign": "6.22.0", - "babel-plugin-transform-react-constant-elements": "6.23.0", - "babel-plugin-transform-react-jsx": "6.24.1", - "babel-plugin-transform-react-remove-prop-types": "0.4.6", - "babel-preset-env": "1.6.0", - "babel-preset-stage-0": "6.24.1", - "babel-register": "6.24.1", - "copy-webpack-plugin": "4.0.1", - "cross-spawn-promise": "0.10.1", - "css-modules-require-hook": "4.0.6", - "devcert-san": "0.3.3", - "ejs-loader": "0.3.0", - "es6-promisify": "5.0.0", - "file-loader": "0.11.2", - "fs.promised": "3.0.0", - "html-webpack-exclude-assets-plugin": "0.0.5", - "html-webpack-plugin": "2.29.0", - "isomorphic-unfetch": "2.0.0", - "json-loader": "0.5.4", - "less": "2.7.2", - "less-loader": "4.0.5", - "loader-utils": "1.1.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "offline-plugin": "4.8.3", - "ora": "1.3.0", - "persist-path": "1.0.2", - "postcss-less": "0.16.1", - "preact": "8.2.1", - "preact-compat": "3.16.0", - "preact-render-to-string": "3.6.3", - "preact-router": "2.5.5", - "progress-bar-webpack-plugin": "1.10.0", - "promise-polyfill": "6.0.2", - "raw-loader": "0.5.1", - "recursive-copy": "2.0.6", - "require-relative": "0.8.7", - "rimraf": "2.6.1", - "script-ext-html-webpack-plugin": "1.8.5", - "simplehttp2server": "2.0.0", - "sw-precache-webpack-plugin": "0.11.4", - "tmp": "0.0.31", - "unfetch": "3.0.0", - "url-loader": "0.5.9", - "webpack": "2.7.0", - "webpack-dev-server": "2.5.1", - "webpack-plugin-replace": "1.1.1", - "which": "1.2.14", - "yargs": "8.0.2" - } - }, - "preact-compat": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/preact-compat/-/preact-compat-3.16.0.tgz", - "integrity": "sha1-zyvBsvj8oUkA1oCU+eELizKcxB4=", - "requires": { - "immutability-helper": "2.3.0", - "preact-render-to-string": "3.6.3", - "preact-transition-group": "1.1.1", - "prop-types": "15.5.10", - "standalone-react-addons-pure-render-mixin": "0.1.1" - } - }, - "preact-redux": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/preact-redux/-/preact-redux-2.0.2.tgz", - "integrity": "sha1-chQpBvc1Za3fXQtf18b+HMWgJqU=" - }, - "preact-render-to-string": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-3.6.3.tgz", - "integrity": "sha1-SB0NW9rJGS0zR1V0N9XNAKoxIEM=", - "requires": { - "pretty-format": "3.8.0" - } - }, - "preact-router": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/preact-router/-/preact-router-2.5.5.tgz", - "integrity": "sha1-0YanQF78cPfJt3WRdHaea1a/kyQ=" - }, - "preact-transition-group": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/preact-transition-group/-/preact-transition-group-1.1.1.tgz", - "integrity": "sha1-8KSTJ+pRXs406ivoZMSn0p5dbhA=" - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "pretty-bytes": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", - "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "2.0.1", - "utila": "0.4.0" - } - }, - "pretty-format": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", - "integrity": "sha1-v77VbV6ad2ZF9LH/eqGjrE+jw4U=" - }, - "private": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", - "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", - "dev": true - }, - "progress-bar-webpack-plugin": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/progress-bar-webpack-plugin/-/progress-bar-webpack-plugin-1.10.0.tgz", - "integrity": "sha1-4LEGOqA8eeKYqTQFmFkLth7++aQ=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "object.assign": "4.0.4", - "progress": "1.1.8" - }, - "dependencies": { - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", - "dev": true - } - } - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "requires": { - "asap": "2.0.6" - } - }, - "promise-polyfill": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.0.2.tgz", - "integrity": "sha1-2chtPcTcLfkBboiUbe/Wm0m0EWI=", - "dev": true - }, - "prop-types": { - "version": "15.5.10", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", - "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=", - "requires": { - "fbjs": "0.8.12", - "loose-envify": "1.3.1" - } - }, - "proxy-addr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", - "integrity": "sha1-J+VF9pYKRKYn2bREZ+NcG2tM4vM=", - "dev": true, - "requires": { - "forwarded": "0.1.0", - "ipaddr.js": "1.3.0" - } - }, - "prr": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", - "dev": true - }, - "ps-tree": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", - "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", - "dev": true, - "requires": { - "event-stream": "3.3.4" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", - "dev": true, - "requires": { - "bn.js": "4.11.7", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", - "randombytes": "2.0.5" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "q": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true - }, - "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz", - "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=", - "dev": true - }, - "ramda": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", - "integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=", - "dev": true - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "dev": true, - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "1.1.5" - } - } - } - }, - "randombytes": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", - "dev": true - }, - "rc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", - "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", - "dev": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "read-all-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", - "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1", - "readable-stream": "2.3.3" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - } - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.3", - "set-immediate-shim": "1.0.1" - } - }, - "recursive-copy": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/recursive-copy/-/recursive-copy-2.0.6.tgz", - "integrity": "sha1-1ZD5618WW5ahuAvI+cvLXG+ciek=", - "dev": true, - "requires": { - "del": "2.2.2", - "emitter-mixin": "0.0.3", - "errno": "0.1.4", - "graceful-fs": "4.1.11", - "junk": "1.0.3", - "maximatch": "0.1.0", - "mkdirp": "0.5.1", - "pify": "2.3.0", - "promise": "7.3.1", - "slash": "1.0.0" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" - } - }, - "reduce-css-calc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", - "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", - "dev": true, - "requires": { - "balanced-match": "0.4.2", - "math-expression-evaluator": "1.2.17", - "reduce-function-call": "1.0.2" - }, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true - } - } - }, - "reduce-function-call": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", - "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", - "dev": true, - "requires": { - "balanced-match": "0.4.2" - }, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true - } - } - }, - "redux": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", - "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==", - "requires": { - "lodash": "4.17.4", - "lodash-es": "4.17.4", - "loose-envify": "1.3.1", - "symbol-observable": "1.0.4" - } - }, - "regenerate": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", - "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=", - "dev": true - }, - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", - "dev": true - }, - "regenerator-transform": { - "version": "0.9.11", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz", - "integrity": "sha1-On0GdSDLe3F2dp61/4aGkb7+EoM=", - "dev": true, - "requires": { - "babel-runtime": "6.23.0", - "babel-types": "6.25.0", - "private": "0.1.7" - } - }, - "regex-cache": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", - "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", - "dev": true, - "requires": { - "is-equal-shallow": "0.1.3", - "is-primitive": "2.0.0" - } - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "1.3.2", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" - } - }, - "registry-auth-token": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", - "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", - "dev": true, - "requires": { - "rc": "1.2.1", - "safe-buffer": "5.1.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "1.2.1" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "0.5.0" - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", - "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=", - "dev": true - }, - "renderkid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", - "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", - "dev": true, - "requires": { - "css-select": "1.2.0", - "dom-converter": "0.1.4", - "htmlparser2": "3.3.0", - "strip-ansi": "3.0.1", - "utila": "0.3.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" - }, - "dependencies": { - "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", - "dev": true, - "optional": true - } - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "require-relative": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", - "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", - "dev": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" - } - }, - "requireindex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.1.0.tgz", - "integrity": "sha1-5UBLgVV+91225JxacgBIk/4D4WI=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" - } - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "requires": { - "align-text": "0.1.4" - } - }, - "rimraf": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", - "dev": true, - "requires": { - "hash-base": "2.0.2", - "inherits": "2.0.3" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "2.1.0" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "requires": { - "rx-lite": "4.0.8" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "5.2.2" - } - }, - "script-ext-html-webpack-plugin": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-1.8.5.tgz", - "integrity": "sha512-nAp3kwwevY2n1lIh7P2l+DJGe25nGVqrLxabA22UpWo5OqcawQYwAwPsEarAdCS3DQqxI3NC03wBzBJjn8I1Yw==", - "dev": true, - "requires": { - "debug": "2.6.8" - } - }, - "seek-bzip": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", - "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", - "dev": true, - "requires": { - "commander": "2.8.1" - }, - "dependencies": { - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "dev": true, - "requires": { - "graceful-readlink": "1.0.1" - } - } - } - }, - "seekout": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/seekout/-/seekout-1.0.2.tgz", - "integrity": "sha1-CbqfG9W0b7sTRxjrGaaDgsuxuck=", - "dev": true - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.9.1.tgz", - "integrity": "sha1-zdpEktcNSGVw+HxlVGAjVY4d+lo=", - "dev": true, - "requires": { - "node-forge": "0.6.33" - } - }, - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true, - "requires": { - "semver": "5.3.0" - } - }, - "semver-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-1.0.0.tgz", - "integrity": "sha1-kqSWkGX5xwxpR1PVUkj8aPj2Usk=", - "dev": true - }, - "semver-truncate": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", - "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", - "dev": true, - "requires": { - "semver": "5.3.0" - } - }, - "send": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", - "integrity": "sha1-UBP5+ZAj31DRvZiSwZ4979HVMwk=", - "dev": true, - "requires": { - "debug": "2.6.7", - "depd": "1.1.0", - "destroy": "1.0.4", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.0", - "fresh": "0.5.0", - "http-errors": "1.6.1", - "mime": "1.3.4", - "ms": "2.0.0", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.3.1" - }, - "dependencies": { - "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "serve-index": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.0.tgz", - "integrity": "sha1-0rKA/FYNYW7oG0i/D6gqvtJIXOc=", - "dev": true, - "requires": { - "accepts": "1.3.3", - "batch": "0.6.1", - "debug": "2.6.8", - "escape-html": "1.0.3", - "http-errors": "1.6.1", - "mime-types": "2.1.15", - "parseurl": "1.3.1" - } - }, - "serve-static": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", - "integrity": "sha1-n0uhni8wMMVH+K+ZEHg47DjVseI=", - "dev": true, - "requires": { - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "parseurl": "1.3.1", - "send": "0.15.3" - } - }, - "serviceworker-cache-polyfill": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serviceworker-cache-polyfill/-/serviceworker-cache-polyfill-4.0.0.tgz", - "integrity": "sha1-3hnuc77yGrPAdAo3sz22JGS6ves=", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true - }, - "sha.js": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", - "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "0.0.1", - "array-map": "0.0.0", - "array-reduce": "0.0.0", - "jsonify": "0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "simplehttp2server": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simplehttp2server/-/simplehttp2server-2.0.0.tgz", - "integrity": "sha512-qLWYYBUZ5BXmgEQIAzJYzxkZ3dwvG3yyfDf+OJ8+Ppy8SKorwnOCorwEOLZcJrU67A/nozrnE5rvVukRzR90Yg==", - "dev": true, - "requires": { - "bin-build": "2.2.0", - "bin-wrapper": "3.0.2", - "logalot": "2.1.0" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "optional": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sockjs": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.18.tgz", - "integrity": "sha1-2bKJMWyn33dZXvKZ4HXw+TfrQgc=", - "dev": true, - "requires": { - "faye-websocket": "0.10.0", - "uuid": "2.0.3" - } - }, - "sockjs-client": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.2.tgz", - "integrity": "sha1-8CEqhVDkyUaMjM6u79LjSTwDOtU=", - "dev": true, - "requires": { - "debug": "2.6.8", - "eventsource": "0.1.6", - "faye-websocket": "0.11.1", - "inherits": "2.0.3", - "json3": "3.3.2", - "url-parse": "1.1.9" - }, - "dependencies": { - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": "0.6.5" - } - } - } - }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "requires": { - "is-plain-obj": "1.1.0" - } - }, - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", - "dev": true - }, - "source-map-support": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", - "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", - "dev": true, - "requires": { - "source-map": "0.5.6" - } - }, - "sparkles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", - "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", - "dev": true - }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true, - "requires": { - "spdx-license-ids": "1.2.2" - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true - }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", - "dev": true, - "requires": { - "debug": "2.6.8", - "handle-thing": "1.2.5", - "http-deceiver": "1.2.7", - "safe-buffer": "5.1.1", - "select-hose": "2.0.0", - "spdy-transport": "2.0.20" - } - }, - "spdy-transport": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", - "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=", - "dev": true, - "requires": { - "debug": "2.6.8", - "detect-node": "2.0.3", - "hpack.js": "2.1.6", - "obuf": "1.1.1", - "readable-stream": "2.3.3", - "safe-buffer": "5.1.1", - "wbuf": "1.7.2" - } - }, - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "dev": true, - "requires": { - "through": "2.3.8" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "squeak": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", - "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "console-stream": "0.1.1", - "lpad-align": "1.1.2" - } - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true - } - } - }, - "standalone-react-addons-pure-render-mixin": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/standalone-react-addons-pure-render-mixin/-/standalone-react-addons-pure-render-mixin-0.1.1.tgz", - "integrity": "sha1-PHQJ9MecQN6axyxhbPZ5qZTzdVE=" - }, - "stat-mode": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz", - "integrity": "sha1-5sgLYjEj19gM8TLOU480YokHJQI=", - "dev": true - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "dev": true, - "requires": { - "duplexer": "0.1.1" - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "requires": { - "duplexer2": "0.1.4", - "readable-stream": "2.3.3" - } - }, - "stream-http": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", - "dev": true, - "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "string-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-bom-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", - "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", - "dev": true, - "requires": { - "first-chunk-stream": "1.0.0", - "strip-bom": "2.0.0" - } - }, - "strip-dirs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz", - "integrity": "sha1-lgu9EoeETzl1pFWKoQOoJV4kVqA=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "get-stdin": "4.0.1", - "is-absolute": "0.1.7", - "is-natural-number": "2.1.1", - "minimist": "1.2.0", - "sum-up": "1.0.3" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "strip-outer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.0.tgz", - "integrity": "sha1-qsC6YNLpDF1PJ1/Yhp/ZotMQ/7g=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "style-loader": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.2.tgz", - "integrity": "sha1-dFMzhM9pjHEEx5URULSXF63C87s=", - "dev": true, - "requires": { - "loader-utils": "1.1.0" - } - }, - "sum-up": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sum-up/-/sum-up-1.0.3.tgz", - "integrity": "sha1-HGYfZnBX9jvLeHWqFDi8FiUlFW4=", - "dev": true, - "requires": { - "chalk": "1.1.3" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "svgo": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", - "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", - "dev": true, - "requires": { - "coa": "1.0.4", - "colors": "1.1.2", - "csso": "2.3.2", - "js-yaml": "3.7.0", - "mkdirp": "0.5.1", - "sax": "1.2.4", - "whet.extend": "0.9.9" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "js-yaml": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", - "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", - "dev": true, - "requires": { - "argparse": "1.0.9", - "esprima": "2.7.3" - } - } - } - }, - "sw-precache": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/sw-precache/-/sw-precache-5.2.0.tgz", - "integrity": "sha512-sKctdX+5hUxkqJ/1DM88ubQ+QRvyw7CnxWdk909N2DgvxMqc1gcQFrwL7zpVc87wFmCA/OvRQd0iMC2XdFopYg==", - "dev": true, - "requires": { - "dom-urls": "1.1.0", - "es6-promise": "4.1.1", - "glob": "7.1.2", - "lodash.defaults": "4.2.0", - "lodash.template": "4.4.0", - "meow": "3.7.0", - "mkdirp": "0.5.1", - "pretty-bytes": "4.0.2", - "sw-toolbox": "3.6.0", - "update-notifier": "1.0.3" - }, - "dependencies": { - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "dev": true, - "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.1.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "dev": true, - "requires": { - "lodash._reinterpolate": "3.0.0" - } - } - } - }, - "sw-precache-webpack-plugin": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/sw-precache-webpack-plugin/-/sw-precache-webpack-plugin-0.11.4.tgz", - "integrity": "sha1-ppUBflTu1XVVFJOlGdwdqNotxeA=", - "dev": true, - "requires": { - "del": "2.2.2", - "sw-precache": "5.2.0", - "uglify-js": "3.0.25" - }, - "dependencies": { - "uglify-js": { - "version": "3.0.25", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.25.tgz", - "integrity": "sha512-JO1XE0WZ9m6UpDkN7WCyPNAWI6EN3K0g40ekcoJKejViYmryJ0BaLxXjvra1IsAeIlJfq72scTbhl0jknsT2GA==", - "dev": true, - "requires": { - "commander": "2.9.0", - "source-map": "0.5.6" - } - } - } - }, - "sw-toolbox": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/sw-toolbox/-/sw-toolbox-3.6.0.tgz", - "integrity": "sha1-Jt8dHHA0hljk3qKIQxkUm3sxg7U=", - "dev": true, - "requires": { - "path-to-regexp": "1.7.0", - "serviceworker-cache-polyfill": "4.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - } - } - }, - "symbol-observable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" - }, - "table": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", - "integrity": "sha1-qBFsEz+sLGH0pCCrbN9cTWHw5DU=", - "dev": true, - "requires": { - "ajv": "4.11.8", - "ajv-keywords": "1.5.1", - "chalk": "1.1.3", - "lodash": "4.17.4", - "slice-ansi": "0.0.4", - "string-width": "2.1.0" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - } - } - }, - "tapable": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.6.tgz", - "integrity": "sha1-IGvo4YiGC1FEJTdebxrom/sB/Y0=", - "dev": true - }, - "tar-stream": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", - "integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", - "dev": true, - "requires": { - "bl": "1.2.1", - "end-of-stream": "1.4.0", - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - }, - "tempfile": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-1.1.1.tgz", - "integrity": "sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I=", - "dev": true, - "requires": { - "os-tmpdir": "1.0.2", - "uuid": "2.0.3" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": "1.0.34", - "xtend": "4.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "through2-filter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", - "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", - "dev": true, - "requires": { - "through2": "2.0.3", - "xtend": "4.0.1" - }, - "dependencies": { - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - } - } - }, - "thunky": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", - "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=", - "dev": true - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "timed-out": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz", - "integrity": "sha1-lYYL/MXHbCd/j4Mm/Q9bLiDrohc=", - "dev": true - }, - "timers-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz", - "integrity": "sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y=", - "dev": true, - "requires": { - "setimmediate": "1.0.5" - } - }, - "tmp": { - "version": "0.0.31", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", - "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", - "dev": true, - "requires": { - "os-tmpdir": "1.0.2" - } - }, - "to-absolute-glob": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", - "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", - "dev": true, - "requires": { - "extend-shallow": "2.0.1" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "toposort": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.3.tgz", - "integrity": "sha1-8CzYp0vYvi/A6YYRw7rLlaFxhpw=", - "dev": true - }, - "tough-cookie": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "tryit": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", - "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", - "dev": true - }, - "tslib": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz", - "integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=", - "dev": true - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "1.1.2" - } - }, - "type-is": { - "version": "1.6.15", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "2.1.15" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "ua-parser-js": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.13.tgz", - "integrity": "sha1-zZ3S+GSTs/RNvu7zeA/adMXuFL4=" - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "requires": { - "source-map": "0.5.6", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "unfetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-3.0.0.tgz", - "integrity": "sha1-jR4FE6Ts0OX/LUGmund3Gq6LZII=", - "dev": true - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqid": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/uniqid/-/uniqid-4.1.1.tgz", - "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=", - "dev": true, - "requires": { - "macaddress": "0.2.8" - } - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "unique-stream": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", - "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", - "dev": true, - "requires": { - "json-stable-stringify": "1.0.1", - "through2-filter": "2.0.0" - } - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true, - "requires": { - "crypto-random-string": "1.0.0" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unzip-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", - "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=", - "dev": true - }, - "update-notifier": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-1.0.3.tgz", - "integrity": "sha1-j5LFFUgr1oMbfJMBPnD4dVLHz1o=", - "dev": true, - "requires": { - "boxen": "0.6.0", - "chalk": "1.1.3", - "configstore": "2.1.0", - "is-npm": "1.0.0", - "latest-version": "2.0.0", - "lazy-req": "1.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "2.0.0" - }, - "dependencies": { - "configstore": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz", - "integrity": "sha1-c3o6cDbpiGECqmCZ5HuzOrGroaE=", - "dev": true, - "requires": { - "dot-prop": "3.0.0", - "graceful-fs": "4.1.11", - "mkdirp": "0.5.1", - "object-assign": "4.1.1", - "os-tmpdir": "1.0.2", - "osenv": "0.1.4", - "uuid": "2.0.3", - "write-file-atomic": "1.3.4", - "xdg-basedir": "2.0.0" - } - }, - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", - "dev": true, - "requires": { - "is-obj": "1.0.1" - } - }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" - } - }, - "xdg-basedir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", - "integrity": "sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=", - "dev": true, - "requires": { - "os-homedir": "1.0.2" - } - } - } - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "urijs": { - "version": "1.18.10", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.18.10.tgz", - "integrity": "sha1-uURj6rpZoaeWA2pGe7YzxmfyIas=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-loader": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.5.9.tgz", - "integrity": "sha512-B7QYFyvv+fOBqBVeefsxv6koWWtjmHaMFT6KZWti4KRw8YUD/hOU+3AECvXuzyVawIBx3z7zQRejXCDSO5kk1Q==", - "dev": true, - "requires": { - "loader-utils": "1.1.0", - "mime": "1.3.4" - } - }, - "url-parse": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.1.9.tgz", - "integrity": "sha1-xn8dd11R8KGJEd17P/rSe7nlvRk=", - "dev": true, - "requires": { - "querystringify": "1.0.0", - "requires-port": "1.0.0" - }, - "dependencies": { - "querystringify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz", - "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=", - "dev": true - } - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "1.0.4" - } - }, - "url-regex": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-3.2.0.tgz", - "integrity": "sha1-260eDJ4p4QXdCx8J9oYvf9tIJyQ=", - "dev": true, - "requires": { - "ip-regex": "1.0.3" - } - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", - "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=", - "dev": true - }, - "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", - "dev": true - }, - "vali-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true, - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "vary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", - "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc=", - "dev": true - }, - "vendors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz", - "integrity": "sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI=", - "dev": true - }, - "verror": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "1.0.2", - "clone-stats": "0.0.1", - "replace-ext": "0.0.1" - } - }, - "vinyl-assign": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/vinyl-assign/-/vinyl-assign-1.2.1.tgz", - "integrity": "sha1-TRmIkbVRWRHXcajNnFSApGoHSkU=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "readable-stream": "2.3.3" - } - }, - "vinyl-fs": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", - "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", - "dev": true, - "requires": { - "duplexify": "3.5.0", - "glob-stream": "5.3.5", - "graceful-fs": "4.1.11", - "gulp-sourcemaps": "1.6.0", - "is-valid-glob": "0.3.0", - "lazystream": "1.0.0", - "lodash.isequal": "4.5.0", - "merge-stream": "1.0.1", - "mkdirp": "0.5.1", - "object-assign": "4.1.1", - "readable-stream": "2.3.3", - "strip-bom": "2.0.0", - "strip-bom-stream": "1.0.0", - "through2": "2.0.3", - "through2-filter": "2.0.0", - "vali-date": "1.0.0", - "vinyl": "1.2.0" - }, - "dependencies": { - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - } - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "ware": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ware/-/ware-1.3.0.tgz", - "integrity": "sha1-0bFPOdLiy0q4xAmPdW/ksWTkc9Q=", - "dev": true, - "requires": { - "wrap-fn": "0.1.5" - } - }, - "watchpack": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", - "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", - "dev": true, - "requires": { - "async": "2.5.0", - "chokidar": "1.7.0", - "graceful-fs": "4.1.11" - } - }, - "wbuf": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.2.tgz", - "integrity": "sha1-1pe5nx9ZUS3ydRvkJ2nBWAtYAf4=", - "dev": true, - "requires": { - "minimalistic-assert": "1.0.0" - } - }, - "webpack": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.7.0.tgz", - "integrity": "sha512-MjAA0ZqO1ba7ZQJRnoCdbM56mmFpipOPUv/vQpwwfSI42p5PVDdoiuK2AL2FwFUVgT859Jr43bFZXRg/LNsqvg==", - "dev": true, - "requires": { - "acorn": "5.1.1", - "acorn-dynamic-import": "2.0.2", - "ajv": "4.11.8", - "ajv-keywords": "1.5.1", - "async": "2.5.0", - "enhanced-resolve": "3.3.0", - "interpret": "1.0.3", - "json-loader": "0.5.4", - "json5": "0.5.1", - "loader-runner": "2.3.0", - "loader-utils": "0.2.17", - "memory-fs": "0.4.1", - "mkdirp": "0.5.1", - "node-libs-browser": "2.0.0", - "source-map": "0.5.6", - "supports-color": "3.2.3", - "tapable": "0.2.6", - "uglify-js": "2.8.29", - "watchpack": "1.4.0", - "webpack-sources": "1.0.1", - "yargs": "6.6.0" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "1.0.0" - } - }, - "yargs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", - "dev": true, - "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "4.2.1" - } - } - } - }, - "webpack-dev-middleware": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.11.0.tgz", - "integrity": "sha1-CWkdCXOjCtH4Ksc6EuIIfwpHVPk=", - "dev": true, - "requires": { - "memory-fs": "0.4.1", - "mime": "1.3.4", - "path-is-absolute": "1.0.1", - "range-parser": "1.2.0" - } - }, - "webpack-dev-server": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.5.1.tgz", - "integrity": "sha1-oC5yaoe7YD211xq7fW0mSb8Qx2k=", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "3.5.0", - "chokidar": "1.7.0", - "compression": "1.7.0", - "connect-history-api-fallback": "1.3.0", - "del": "3.0.0", - "express": "4.15.3", - "html-entities": "1.2.1", - "http-proxy-middleware": "0.17.4", - "internal-ip": "1.2.0", - "opn": "4.0.2", - "portfinder": "1.0.13", - "selfsigned": "1.9.1", - "serve-index": "1.9.0", - "sockjs": "0.3.18", - "sockjs-client": "1.1.2", - "spdy": "3.4.7", - "strip-ansi": "3.0.1", - "supports-color": "3.2.3", - "webpack-dev-middleware": "1.11.0", - "yargs": "6.6.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "6.1.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "p-map": "1.1.1", - "pify": "3.0.0", - "rimraf": "2.6.1" - } - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "1.0.0" - } - }, - "yargs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", - "dev": true, - "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "4.2.1" - } - } - } - }, - "webpack-merge": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-2.6.1.tgz", - "integrity": "sha1-8dgB0sXTn4P/7J8RkkCz476ZShw=", - "dev": true, - "requires": { - "lodash": "4.17.4" - } - }, - "webpack-plugin-replace": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/webpack-plugin-replace/-/webpack-plugin-replace-1.1.1.tgz", - "integrity": "sha1-mBZkf+/Jin0XAPk/K0tvSBzyAWE=", - "dev": true - }, - "webpack-sources": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz", - "integrity": "sha512-05tMxipUCwHqYaVS8xc7sYPTly8PzXayRCB4dTxLhWTqlKUiwH6ezmEe0OSreL1c30LAuA3Zqmc+uEBUGFJDjw==", - "dev": true, - "requires": { - "source-list-map": "2.0.0", - "source-map": "0.5.6" - }, - "dependencies": { - "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", - "dev": true - } - } - }, - "websocket-driver": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", - "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", - "dev": true, - "requires": { - "websocket-extensions": "0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", - "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=", - "dev": true - }, - "whatwg-fetch": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", - "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" - }, - "whet.extend": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", - "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=", - "dev": true - }, - "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", - "dev": true, - "requires": { - "isexe": "2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "widest-line": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", - "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", - "dev": true, - "requires": { - "string-width": "1.0.2" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "wrap-fn": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/wrap-fn/-/wrap-fn-0.1.5.tgz", - "integrity": "sha1-8htuQQFv9KfjFyDbxjoJAWvfmEU=", - "dev": true, - "requires": { - "co": "3.1.0" - }, - "dependencies": { - "co": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz", - "integrity": "sha1-TqVOpaCJOBUxheFSEMaNkJK8G3g=", - "dev": true - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "requires": { - "mkdirp": "0.5.1" - } - }, - "write-file-atomic": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.1.0.tgz", - "integrity": "sha512-0TZ20a+xcIl4u0+Mj5xDH2yOWdmQiXlKf9Hm+TgDXjTMsEYb+gDrmb8e8UNAzMCitX8NBqG4Z/FUQIyzv/R1JQ==", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - }, - "xml-char-classes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", - "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", - "dev": true, - "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.0.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.0", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - } - }, - "os-locale": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.0.0.tgz", - "integrity": "sha1-FZGN7VEFIrge565aMJ1U9jn8OaQ=", - "dev": true, - "requires": { - "execa": "0.5.1", - "lcid": "1.0.0", - "mem": "1.1.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "2.3.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "dev": true, - "requires": { - "camelcase": "4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, - "requires": { - "camelcase": "3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yauzl": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz", - "integrity": "sha1-eUUK/yKyqcWkHvVOAtuQfM+/nuI=", - "dev": true, - "requires": { - "buffer-crc32": "0.2.13", - "fd-slicer": "1.0.1" - } - } - } -} diff --git a/package.json b/package.json index 1f95dea..30f2ef6 100644 --- a/package.json +++ b/package.json @@ -1,64 +1,61 @@ { - "name": "comic_book_reader", - "version": "0.1.0", - "description": "A browser based touch friendly comic book reader", - "homepage": "https://github.com/workhorsy/comic_book_reader", - "keywords": [ - "comics" - ], - "author": "Matthew Brennan Jones ", - "license": "AGPL-3.0", - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/workhorsy/comic_book_reader.git" - }, - "scripts": { - "test": "eslint src && preact test", - "start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev", - "build": "preact build", - "serve": "preact build && preact serve", - "dev": "preact watch", - "lint": "eslint src" - }, - "eslintConfig": { - "extends": "eslint-config-synacor", - "rules": { - "react/self-closing-comp": 0, - "react/prefer-stateless-function": 0, - "brace-style": 0, - "no-console": 0 - }, - "parserOptions": { - "ecmaVersion": 7, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - } - }, - "eslintIgnore": [ - "src/lib/pdf.js", - "src/lib/pdf.worker.js", - "src/lib/compatibility.js", - "src/lib/uncompress.js", - "src/lib/jszip.js", - "src/lib/libunrar.js", - "src/lib/libunrar.js.mem", - "src/lib/ibuntar.js", - "src/lib/pica.js" - ], - "devDependencies": { - "eslint": "^4.2.0", - "eslint-config-synacor": "^1.0.1", - "if-env": "^1.0.0", - "preact-cli": "^1.3.0" - }, - "dependencies": { - "preact": "^8.2.1", - "preact-compat": "^3.16.0", - "preact-redux": "^2.0.2", - "preact-router": "^2.5.5", - "redux": "^3.7.2" - } + "name": "comic_book_reader", + "version": "0.1.0", + "description": "A browser based touch friendly comic book reader", + "homepage": "https://github.com/workhorsy/comic_book_reader", + "keywords": ["comics"], + "author": "Matthew Brennan Jones ", + "contributors": ["Baltazar Gomez (https://github.com/btzr-io)"], + "license": "AGPL-3.0", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/workhorsy/comic_book_reader.git" + }, + "scripts": { + "test": "eslint src && preact test", + "start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev", + "build": "preact build --template src/index.html", + "serve": "npm run build && preact serve", + "dev": "preact watch --template src/index.html", + "lint": "eslint src", + "format": "pretty-quick --branch preact", + "contributors:add": "all-contributors add", + "contributors:generate": "all-contributors generate" + }, + "eslintConfig": { + "extends": "eslint-config-synacor", + "rules": { + "react/self-closing-comp": 0, + "react/prefer-stateless-function": 0, + "brace-style": 0, + "no-console": 0 + }, + "parserOptions": { + "ecmaVersion": 7, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + } + }, + "eslintIgnore": ["src/lib/*"], + "devDependencies": { + "all-contributors-cli": "^4.11.1", + "eslint": "^4.2.0", + "eslint-config-synacor": "^1.0.1", + "husky": "^0.14.3", + "if-env": "^1.0.4", + "less": "^3.0.1", + "less-loader": "^4.1.0", + "preact-cli": "^2.2.1", + "prettier": "^1.11.1", + "pretty-quick": "^1.4.1" + }, + "dependencies": { + "preact": "^8.2.7", + "preact-compat": "^3.18.0", + "preact-router": "^2.6.0", + "unistore": "^3.0.4" + } } diff --git a/server/count.php b/server/count.php deleted file mode 100644 index ab4df0c..0000000 --- a/server/count.php +++ /dev/null @@ -1,69 +0,0 @@ - -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader - -header("Access-Control-Allow-Origin: *"); - -// Make sure it is a HTTP Get request -if ($_SERVER['REQUEST_METHOD'] !== "GET") { - header("HTTP/1.1 405 Method Not Allowed"); - return; -} - -// Make sure the ID is a number, if it exists -$id = null; -if (array_key_exists("id", $_GET)) { - if (! is_numeric($_GET["id"])) { - header("HTTP/1.1 406 Not Acceptable"); - return; - } - $id = intval($_GET["id"]); -} - -// Get all the parameters -$file_name = "user_count.txt"; -$now = time(); -$cut_off_time = $now - (60 * 10); // 10 minutes ago - -// Read the db from file -$db = array(); -if (file_exists($file_name)) { - $fd = fopen($file_name, "r"); - $string_db = fread($fd, filesize($file_name)); - $db = unserialize($string_db); - //print_r($db); - fclose($fd); -} - -// Save this user's time -if ($id !== null) { - $db[$id] = $now; -} - -// Remove users that have not visited in 10 minutes -foreach ($db as $db_id => $db_time) { -// echo "

" . $db_id . ":" . $db_time . ", " . ($db_time - $cut_off_time) . "

"; - if ($db_time < $cut_off_time) { - unset($db[$db_id]); - } -} - -// Print everything -/* -echo "

now: " . $now . "

"; -echo "

id: " . $id . "

"; -echo "

user db: "; -print_r($db); -echo "

"; -*/ -// Write the db to file -$string_db = serialize($db); -$fd = fopen($file_name, "w"); -fwrite($fd, $string_db); -fclose($fd); - -header('Content-Type: application/json'); -echo(count($db)); -?> diff --git a/service_worker.js b/service_worker.js deleted file mode 100644 index fd40f7f..0000000 --- a/service_worker.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2017 Matthew Brennan Jones -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - - -const PRECACHE = 'precache-v9'; -const RUNTIME = 'runtime'; - -const PRECACHE_URLS = [ - 'index.html', - 'styles.css', - 'favicon.ico', - 'invalid_image.png', - 'main.js', - 'service_worker.js', - 'js/compatibility.js', - 'js/db.js', - 'js/i18n.js', - 'js/jszip.js', - 'js/languages.js', - 'js/libunrar.js', - 'js/libunrar.js.mem', - 'js/libuntar.js', - 'js/loader.js', - 'js/no_more_jquery.js', - 'js/pdf.js', - 'js/pdf.worker.js', - 'js/pica.js', - 'js/polyfill.js', - 'js/settings.js', - 'js/test_requirements_worker.js', - 'js/uncompress.js', - 'js/utility.js', - 'js/version_date.js', - 'js/web_worker.js', -]; - -// The install handler takes care of precaching the resources we always need. -self.addEventListener('install', event => { - event.waitUntil( - caches.open(PRECACHE) - .then(cache => cache.addAll(PRECACHE_URLS)) - .then(self.skipWaiting()) - .then(() => console.log('WORKER: install completed')) - ); -}); - -// The activate handler takes care of cleaning up old caches. -self.addEventListener('activate', event => { - const currentCaches = [PRECACHE, RUNTIME]; - event.waitUntil( - caches.keys().then(cacheNames => { - return cacheNames.filter(cacheName => !currentCaches.includes(cacheName)); - }).then(cachesToDelete => { - return Promise.all(cachesToDelete.map(cacheToDelete => { - return caches.delete(cacheToDelete); - })); - }).then(() => self.clients.claim()) - ); -}); - -// The fetch handler serves responses for same-origin resources from a cache. -// If no response is found, it populates the runtime cache with the response -// from the network before returning it to the page. -self.addEventListener('fetch', event => { - // Skip cross-origin requests, like those for Google Analytics. - if (event.request.url.startsWith(self.location.origin)) { - event.respondWith( - caches.match(event.request).then(cachedResponse => { - if (cachedResponse) { - return cachedResponse; - } - - return caches.open(RUNTIME).then(cache => { - return fetch(event.request).then(response => { - // Put a copy of the response in the runtime cache. - return cache.put(event.request, response.clone()).then(() => { - return response; - }); - }); - }); - }) - ); - } -}); diff --git a/src/actions.js b/src/actions.js deleted file mode 100644 index 3a96d50..0000000 --- a/src/actions.js +++ /dev/null @@ -1,14 +0,0 @@ - -export function addComic(text) { - return { - type: 'ADD_COMIC', - text - }; -} - -export function removeComic(comic) { - return { - type: 'REMOVE_COMIC', - comic - }; -} diff --git a/src/components/app.js b/src/components/app.js deleted file mode 100644 index f5792de..0000000 --- a/src/components/app.js +++ /dev/null @@ -1,22 +0,0 @@ -import { h, Component } from 'preact'; -import { Router } from 'preact-router'; - -import Welcome from '../routes/welcome'; -import ShowComics from '../routes/show-comics'; - -export default class App extends Component { - handleRoute = e => { - this.currentUrl = e.url; - }; - - render() { - return ( -
- - - - -
- ); - } -} diff --git a/src/components/app/index.js b/src/components/app/index.js new file mode 100644 index 0000000..b75913b --- /dev/null +++ b/src/components/app/index.js @@ -0,0 +1,4 @@ +import { connect } from 'unistore/preact' +import App from './view.jsx'; + +export default connect('settings')(App); diff --git a/src/components/app/style.less b/src/components/app/style.less new file mode 100644 index 0000000..ab04c09 --- /dev/null +++ b/src/components/app/style.less @@ -0,0 +1,25 @@ +.app { + background: var(--bg-color); + color: var(--text-color); + /* transition: background 0.15s ease; */ +} + +.themeDark { + /* Css vars */ + --main-color: #1976d2; + --bg-color: #2f3542; + --link-color: #34ace0; + --text-color: white; + --text-message-color: #a4b0be; + --menu-bg-color: #1f232b; +} + +.themeLight { + /* Css vars */ + --main-color: #1976d2; + --bg-color: #fff; + --link-color: #34ace0; + --text-color: #3c3d3f; + --text-message-color: #727b85; + --menu-bg-color: #eee; +} diff --git a/src/components/app/view.jsx b/src/components/app/view.jsx new file mode 100644 index 0000000..8e06f4a --- /dev/null +++ b/src/components/app/view.jsx @@ -0,0 +1,77 @@ +import { h, Component } from 'preact' +import { Router, route } from 'preact-router' +import { requireBrowserFeatures } from '../../utils/browser' + +// Routes +import Files from '../../routes/files' +import Welcome from '../../routes/welcome' +import Library from '../../routes/library' +import Settings from '../../routes/settings' + +// Errors +import Unsupported from '../../routes/unsupported' + +// Components +import Menu from '../menu' +import style from './style' + +export default class App extends Component { + state = { + currentRoute: null, + compatible: true, + } + + constructor(props) { + super(props) + } + + componentDidMount() { + // Test settings + console.log('Init settings:', this.props.settings) + this.hasErrors() + } + + shouldComponentUpdate(props, state) { + if (props.settings.night_mode_enabled !== this.props.settings.night_mode_enabled) { + // Update theme + return true + } + return false + } + + hasErrors = () => { + // Test browser features + requireBrowserFeatures((errors, warnings) => { + errors.length > 0 && this.setState({ compatible: false }) + }) + } + + handleRoute = page => { + const { compatible } = this.state + this.setState({ currentRoute: page }) + // Redirect to error + !compatible && route('/unsupported') + // Redirect to welcome page + page.url === '/unsupported' && compatible && route('/') + } + + render() { + const { settings } = this.props + + // Select theme + const theme = settings.night_mode_enabled ? style.themeDark : style.themeLight + + return ( +
+ {this.state.compatible && } + + + + + + + +
+ ) + } +} diff --git a/src/components/button/index.js b/src/components/button/index.js new file mode 100644 index 0000000..c3b7ff5 --- /dev/null +++ b/src/components/button/index.js @@ -0,0 +1,29 @@ +import { h, Component } from 'preact' +import style from './style' + +import Icon from '../../components/icon' + +export default class Button extends Component { + state = {} + + handleMouseUp = event => { + //console.log(this.props.children[0]); + this.props.onClick && this.props.onClick(event) + } + + componentDidMount() { + //console.log(this.props.text); + } + + render() { + const { props, state } = this + const type = props.type ? style[props.type] : '' + return ( + + ) + } +} diff --git a/src/components/button/style.less b/src/components/button/style.less new file mode 100644 index 0000000..431857d --- /dev/null +++ b/src/components/button/style.less @@ -0,0 +1,22 @@ +.comic_button { + border: 0; + appearance: none; + padding: 16px; + margin: 16px; + cursor: pointer; + word-wrap: break-word; + color: white; + background: var(--main-color); + font-weight: bold; + font-family: inherit; + font-size: 1em; + max-width: 250px; +} + +.comic_button i { + margin-right: 16px; +} + +.secondary { + background: #57606f; +} diff --git a/src/components/checkbox/index.js b/src/components/checkbox/index.js new file mode 100644 index 0000000..f3e9735 --- /dev/null +++ b/src/components/checkbox/index.js @@ -0,0 +1,32 @@ +import { h, Component } from 'preact' +import style from './style' + +export default class ComicCheckBox extends Component { + state = { + checked: this.props.checked || false, + } + + componentDidMount() {} + + handleInputChange = event => { + const { onChange } = this.props + const { checked } = event.target + onChange && onChange(checked) + this.setState({ checked }) + } + + render() { + let { props, state } = this + return ( + + ) + } +} diff --git a/src/components/checkbox/style.less b/src/components/checkbox/style.less new file mode 100644 index 0000000..6bfb79c --- /dev/null +++ b/src/components/checkbox/style.less @@ -0,0 +1,70 @@ +.checkbox { + --checkbox-bg-color: rgba(164, 176, 190, 0.5); + position: relative; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.checkbox:disabled { + opacity: 0.25; +} + +.checkbox input { + position: absolute; + opacity: 0; + cursor: pointer; +} + +.checkbox .label { + padding: 16px; + display: inline-block; + vertical-align: middle; +} + +.mark { + position: relative; + display: inline-block; + vertical-align: middle; + height: 24px; + width: 24px; + margin: 0; + padding: 0; + border-radius: 3px; + background-color: var(--checkbox-bg-color); + margin: 12px 0; + float: left; + /* transition: background-color 0.2s; */ +} + +.checkbox input:checked ~ .mark { + background-color: var(--main-color); +} + +/* Add the following css rule: */ +.checkbox input:checked ~ .label { + color: var(--text-color); +} + +.checkbox input:checked ~ .mark:after { + opacity: 1; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.checkbox .mark:after { + position: absolute; + left: 7px; + top: 2px; + width: 10px; + height: 16px; + border: solid white; + border-width: 0 3px 3px 0; + content: ''; + opacity: 0; + /* transition: all 0.2s ease; */ + +} diff --git a/src/components/comic-button/index.js b/src/components/comic-button/index.js deleted file mode 100644 index 3d052b5..0000000 --- a/src/components/comic-button/index.js +++ /dev/null @@ -1,29 +0,0 @@ -import { h, Component } from 'preact'; -//import { Link } from 'preact-router/match'; -import style from './style'; - -export default class ComicButton extends Component { - state = { - }; - - handleMouseUp = (event) => { - //console.log(this.props.children[0]); - this.props.onClick && this.props.onClick(event); - }; - - componentDidMount() { - //console.log(this.props.text); - } - - render() { - let { props, state } = this; - return ( - - ); - } -} diff --git a/src/components/comic-button/style.less b/src/components/comic-button/style.less deleted file mode 100644 index b75bcd7..0000000 --- a/src/components/comic-button/style.less +++ /dev/null @@ -1,9 +0,0 @@ -@import '~style/helpers'; - -.comic_button { - appearance: none; - border: 2px solid white; - background-color: #61AFEF; - cursor: pointer; - word-wrap: break-word; -} diff --git a/src/components/comic-check-box/index.js b/src/components/comic-check-box/index.js deleted file mode 100644 index 62f3894..0000000 --- a/src/components/comic-check-box/index.js +++ /dev/null @@ -1,23 +0,0 @@ -import { h, Component } from 'preact'; -//import { Link } from 'preact-router/match'; -import style from './style'; - -export default class ComicCheckBox extends Component { - state = { - }; - - componentDidMount() { - } - - render() { - let { props, state } = this; - return ( -
- - -
- ); - } -} diff --git a/src/components/comic-check-box/style.less b/src/components/comic-check-box/style.less deleted file mode 100644 index 92734d1..0000000 --- a/src/components/comic-check-box/style.less +++ /dev/null @@ -1,59 +0,0 @@ -@import '~style/helpers'; - -.comic_check_box { - -} - -.comic_check_box label { - display: block; - position: relative; - margin: 10px 0; - padding-left: 5vmin; - font-size: 4vmin; - cursor: pointer; -} - -.comic_check_box label::before, .comic_check_box label::after { - position: absolute; - top: 0; - left: 0; - content: ''; -} - -.comic_check_box label::before { - display: block; - width: 3.5vmin; - height: 3.5vmin; - border: 0.5vmin solid white; - margin: 0; - padding: 0; -} - -.comic_check_box label::after { - display: none; - width: 2vmin; - height: 2vmin; - margin: 0; - padding: 0; - top: 0.75vmin; - left: 0.75vmin; - background-color: #61AFEF; -} - -.comic_check_box input[type=radio] + label::before, -.comic_check_box input[type=radio] + label::after { - border-radius: 50%; -} - -.comic_check_box input[type=checkbox] { - position: absolute; - left: -999px; -} - -.comic_check_box input:focus + label::before { - border-color: #61AFEF; -} - -.comic_check_box input:checked + label::after { - display: block; -} diff --git a/src/components/comic-library/index.js b/src/components/comic-library/index.js deleted file mode 100644 index a9b6c56..0000000 --- a/src/components/comic-library/index.js +++ /dev/null @@ -1,56 +0,0 @@ -import { h, Component } from 'preact'; -import style from './style'; - -class Item extends Component { - - static defaultProps = { - cover: './assets/invalid_image.png' - } - - state = { - cover: this.props.cover, - loaded: false - } - - componentDidUpdate() { - //this.state.loaded && console.log("Loaded!"); - } - - handleImageLoaded() { - this.setState({loaded: true}); - } - - handleError(err) { - this.setState({cover: './assets/invalid_image.png'}); - } - - render() { - let {props, state} = this; - return ( -
- -

{ props.title }

-
- ); - } -} - -export default class ComicLibrary extends Component { - - static defaultProps = { - items: [] - } - - render() { - let { props, state } = this; - return ( -
- { props.items.map((i, k) => ) } -
- ); - } -} diff --git a/src/components/comic-library/style.less b/src/components/comic-library/style.less deleted file mode 100644 index 8a228f9..0000000 --- a/src/components/comic-library/style.less +++ /dev/null @@ -1,22 +0,0 @@ -@import '~style/helpers'; - -.library { - height: 400px; - overflow: hidden; - overflow-y: scroll; - clear: both; - border: 1px solid #ABB2BF; -} - -.library .item { - display: inline-block; - margin: 10px; - float: left; -} - -.library .item img { - border: 1px solid #ABB2BF; - height: auto; - width: 8vw; - min-width: 100px; -} diff --git a/src/components/comic-menu/index.js b/src/components/comic-menu/index.js deleted file mode 100644 index 303126b..0000000 --- a/src/components/comic-menu/index.js +++ /dev/null @@ -1,82 +0,0 @@ -import { h, Component } from 'preact'; -//import { Link } from 'preact-router/match'; -import { connect } from 'preact-redux'; -import { bindActions } from '../../util'; -import reduce from '../../reducers'; -import style from './style'; -import * as actions from '../../actions'; -import { toggleFullScreen } from '../../lib/utility'; - -import ComicSettings from '../comic-settings'; -import ComicLibrary from '../comic-library'; -import ComicButton from '../comic-button'; - -//Test data for ComicLibrary ( remove this ) -const TestData = { - items: [ - { title: 'Issue #1', cover: './assets/undefined.png' }, - { title: 'Issue #2', cover: './assets/undefined.png' }, - { title: 'Issue #3', cover: './assets/undefined.png' }, - { title: 'Issue #4', cover: './assets/undefined.png' }, - { title: 'Issue #5', cover: './assets/undefined.png' } - ] -} - -@connect(reduce, bindActions(actions)) -export default class ComicMenu extends Component { - state = { - is_showing_settings: false, - is_showing_library: false - }; - - onBtnFullScreen = () => { - toggleFullScreen(); - } - - onbtnOpenFile = () => { - alert("FIXME: onbtnOpenFile"); - this.setState({ text: 'ADD_COMIC' }); - console.log(this.state.text); - } - - onBtnSettings = () => { - this.setState(prevState => ({ is_showing_settings: !prevState.is_showing_settings })); - this.setState({ is_showing_library: false }); - } - - onBtnLibrary = () => { - this.setState(prevState => ({ is_showing_library: !prevState.is_showing_library })); - this.setState({ is_showing_settings: false }); - } - - render() { - let { props, state } = this; - return ( -
-
-
- Open comic file - Library - Full Screen - Settings -
- -

-
-
-
- -
- -
- - { state.is_showing_settings && } - { state.is_showing_library && } - -
-
- ); - } -} diff --git a/src/components/comic-menu/style.less b/src/components/comic-menu/style.less deleted file mode 100644 index 99cfcf9..0000000 --- a/src/components/comic-menu/style.less +++ /dev/null @@ -1,56 +0,0 @@ -@import '~style/helpers'; - -.comic_menu { - box-sizing: border-box; - opacity: 0.9; - position: fixed; - width: 100%; - top: 0px; - z-index: 1000; - margin: 0px; - padding: 0px; - text-align: center; - color: white; -} - -.comic_menu #topMenuPanel { - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #61AFEF; - border-top: 0px; - margin: 0px; - padding: 0px; - background-color: rgba(0, 0, 0, 0.6); - text-align: center; -} - -.comic_menu #topMenuButtons { - box-sizing: border-box; - overflow: hidden; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; -} - -@media (min-width: 1px) and (max-width: 379px) { - .comic_menu #topMenuButtons button { - width: 100%; - height: 40px; - font-size: 18px; - } -} -@media (min-width: 380px) and (max-width: 900px) { - .comic_menu #topMenuButtons button { - width: 20%; - font-size: 5vw; - } -} -@media (min-width: 901px) { - .comic_menu #topMenuButtons button { - width: 18%; - height: 180px; - font-size: 46px; - margin: 1%; - } -} diff --git a/src/components/comic-settings/index.js b/src/components/comic-settings/index.js deleted file mode 100644 index 28867eb..0000000 --- a/src/components/comic-settings/index.js +++ /dev/null @@ -1,65 +0,0 @@ -import { h, Component } from 'preact'; -//import { Link } from 'preact-router/match'; -import style from './style'; - -import ComicButton from '../comic-button'; -import ComicCheckBox from '../comic-check-box'; - -export default class ComicSettings extends Component { - render() { - return ( -
-
-
-

- - -

-
-

- Allow right click -

-

- Check for updates -

-

- Use higher quality page previews -

-

- Use smoothing when resizing images -

-
-

- - . . . -

-

- Clear all data -

-
-

- - ... -

-

- -

-

- Visit home page at github -

-
-
-
- ); - } -} diff --git a/src/components/comic-settings/style.less b/src/components/comic-settings/style.less deleted file mode 100644 index 37462b7..0000000 --- a/src/components/comic-settings/style.less +++ /dev/null @@ -1,30 +0,0 @@ -@import '~style/helpers'; - -.comic_settings { - -} - -.comic_settings #settingsMenu { - text-align: left; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - clear: both; - border: 1px solid #ABB2BF; -} - -.comic_settings #settingsMenu label, .comic_settings #settingsMenu span, .comic_settings #settingsMenu button { - font-size: 4vmin; -} - -@media (min-width: 1px) and (max-width: 379px) { - .comic_settings #settingsMenu p { - magin: 0px; - padding: 0px; - } - - .comic_settings #settingsMenu label, .comic_settings #settingsMenu span { - display: block; - } -} diff --git a/src/components/empty-state/index.js b/src/components/empty-state/index.js new file mode 100644 index 0000000..efe7dd9 --- /dev/null +++ b/src/components/empty-state/index.js @@ -0,0 +1,31 @@ +import { h, Component } from 'preact' +import style from './style' + +import Icon from '../../components/icon' + +export default class EmptyState extends Component { + state = {} + + componentDidMount() { + //console.log(this.props.text); + } + + render() { + const { props, state } = this + const Message = props.message + const type = props.type ? style[props.type] : '' + + return ( +
+

+ +
{props.title}
+

+

+ {Message && } +

+
+
+ ) + } +} diff --git a/src/components/empty-state/style.less b/src/components/empty-state/style.less new file mode 100644 index 0000000..619f866 --- /dev/null +++ b/src/components/empty-state/style.less @@ -0,0 +1,39 @@ +.view { + position: absolute; + top: 0px; + bottom: 0px; + left: 0; + right: 0; + padding: 0 5%; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 1em; +} + +.view .message { + margin: 0px; + color: var(--text-message-color); + margin: 0 15%; +} + +.view .title { + font-size: 1.25em; +} + +.view h1 i { + display: block; + margin-bottom: 32px; + font-size: 2.5em; + color: var(--text-message-color); + opacity: 0.5; +} + +.actions { +} + +.view button { + width: 100%; +} diff --git a/src/components/footer/index.js b/src/components/footer/index.js new file mode 100644 index 0000000..ce250c8 --- /dev/null +++ b/src/components/footer/index.js @@ -0,0 +1,19 @@ +import { h, Component } from 'preact' +import style from './style' + +export default class Footer extends Component { + state = {} + + componentDidMount() { + //console.log(this.props.text); + } + + render() { + const { props, state } = this + const year = (new Date()).getFullYear() + + return ( +
Copyright © 2017 - {year} Comic Book Reader Developers
+ ) + } +} diff --git a/src/components/footer/style.less b/src/components/footer/style.less new file mode 100644 index 0000000..ecc9854 --- /dev/null +++ b/src/components/footer/style.less @@ -0,0 +1,40 @@ +.view { + position: absolute; + top: 0px; + bottom: 0px; + left: 0; + right: 0; + padding: 0 5%; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + color: white; + font-size: 1em; +} + +.view .message { + margin: 0px; + color: var(--text-message-color); + margin: 0 15%; +} + +.view .title { + font-size: 1.25em; +} + +.view h1 i { + display: block; + margin-bottom: 32px; + font-size: 2.5em; + color: var(--text-message-color); + opacity: 0.5; +} + +.actions { +} + +.view button { + width: 100%; +} diff --git a/src/components/icon/index.js b/src/components/icon/index.js new file mode 100644 index 0000000..5949250 --- /dev/null +++ b/src/components/icon/index.js @@ -0,0 +1,6 @@ +import style from './style' + +console.log(style.icon) +const Icon = ({ name }) => + +export default Icon diff --git a/src/components/icon/style.less b/src/components/icon/style.less new file mode 100644 index 0000000..142d629 --- /dev/null +++ b/src/components/icon/style.less @@ -0,0 +1,4 @@ +.icon { + padding: 0; + margin: 0; +} diff --git a/src/components/menu/index.js b/src/components/menu/index.js new file mode 100644 index 0000000..dbca87f --- /dev/null +++ b/src/components/menu/index.js @@ -0,0 +1,79 @@ +import { h, Component } from 'preact' +import { Link } from 'preact-router/match' +import style from './style' +import Icon from '../../components/icon' + +const Item = ({ id, label, icon, href, onClick }) => { + const action = event => onClick && onClick(event) + return ( + + {icon && } + {label} + + ) +} + +const Slider = props => { + return ( +
+
+ + + + +
+
+ ) +} + +// Internal button +const Button = ({ label, icon, onClick }) => { + const action = event => onClick && onClick(event) + return ( + + ) +} + +//Test data for ComicLibrary ( remove this ) +const TestData = { + items: [ + { title: 'Issue #1', cover: './assets/undefined.png' }, + { title: 'Issue #2', cover: './assets/undefined.png' }, + { title: 'Issue #3', cover: './assets/undefined.png' }, + { title: 'Issue #4', cover: './assets/undefined.png' }, + { title: 'Issue #5', cover: './assets/undefined.png' }, + ], +} + +export default class Menu extends Component { + state = { + openSlider: false, + } + + onBtnFullScreen = () => { + toggleFullScreen() + } + + toggleSlider = () => { + this.setState(prevState => ({ openSlider: !prevState.openSlider })) + } + + closeSlider = () => { + this.setState({ openSlider: false }) + } + + render() { + let { props, state } = this + return ( + + ) + } +} diff --git a/src/components/menu/style.less b/src/components/menu/style.less new file mode 100644 index 0000000..b907f24 --- /dev/null +++ b/src/components/menu/style.less @@ -0,0 +1,126 @@ +.comic_menu { + background: transparent; + box-sizing: border-box; + width: 100%; + margin: 0; + position: fixed; + display: flex; + justify-content: space-between; + align-items: center; + font-size: 1.25em; + height: 64px; + padding: 0 16px; + z-index: 1; +} + +#appName { + font-weight: bold; +} + +.button { + padding: 0; + margin: 0; + display: flex; + justify-content: space-around; + align-items: center; +} + +.item { + color: inherit; + display: inline-block; + text-decoration: none; +} + +.button { + border: 0; + cursor: pointer; + font-size: 1em; + color: inherit; + background: transparent; + opacity: 0.5; + transition: opacity 0.3s ease; +} + +.button i { + display: block; + padding: 0; + margin: 0; +} + +.button:hover { + opacity: 1; +} + +.tab .line { + height: 2px; + width: 0%; + opacity: 0; + background: white; + margin: 0; +} + +.tab:active .line { + animation-name: active; + animation-duration: 0.3s; + animation-fill-mode: forwards; + animation-timing-function: ease; +} + +.overlay { + background: var(--bg-color); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0.75; +} + +.slider { + position: fixed; + top: 0; + bottom: 0; + right: 0; + height: 100%; + min-width: 250px; + background: var(--menu-bg-color); + z-index: 1; + text-align: left; + transform: translateX(250px); + transition: all 0.3s ease; + display: flex; + align-items: flex-start; + flex-direction: column; + justify-content: space-around; +} + +.slider.open { + transform: translateX(0px); +} + +.slider .item { + margin: 64px 32px; + opacity: 0.5; + display: block; + transition: all 0.3s ease; +} + +.slider .item.active, +.slider .item:hover { + opacity: 1; +} + +.slider .item i { + margin-right: 16px; +} + +@keyframes active { + from { + opacity: 0; + width: 0; + } + to { + opacity: 1; + width: 100%; + } +} diff --git a/src/components/switch/index.js b/src/components/switch/index.js new file mode 100644 index 0000000..50b90b3 --- /dev/null +++ b/src/components/switch/index.js @@ -0,0 +1,27 @@ +import { h, Component } from 'preact' +import style from './style' + +export default class Switch extends Component { + state = { + checked: this.props.checked || false, + } + + handleInputChange = event => { + const { onChange } = this.props + const { checked } = event.target + onChange && onChange(checked) + console.log(checked) + this.setState({ checked }) + } + + render() { + let { props, state } = this + return ( + + ) + } +} diff --git a/src/components/switch/style.less b/src/components/switch/style.less new file mode 100644 index 0000000..bc58a95 --- /dev/null +++ b/src/components/switch/style.less @@ -0,0 +1,64 @@ +.switch { + --switch-size: 24px; + --switch-padding: 2px; + --switch-slider-size: calc(var(--switch-size) - 2 * var(--switch-padding)); + --switch-bg-color: rgba(164, 176, 190, 0.5); + cursor: pointer; + display: inline-block; + margin: 16px 0; +} + +.switch input { + display: none; +} + +.slider { + position: relative; + width: calc(2 * (var(--switch-size) - var(--switch-padding))); + height: var(--switch-size); + display: inline-block; + vertical-align: middle; + background-color: var(--switch-bg-color); + border-radius: var(--switch-size); + /* -webkit-transition: 0.3s ease; + transition: 0.3s ease; + */ +} + +.slider:before { + position: absolute; + content: ''; + height: var(--switch-slider-size); + width: var(--switch-slider-size); + left: var(--switch-padding); + bottom: var(--switch-padding); + background-color: white; + border-radius: 50%; + -webkit-transition: 0.3s ease; + transition: 0.3s ease; +} + +.label { + display: inline-block; + vertical-align: middle; + margin: 16px; + color: var(--text-message-color); +} + +.switch input:checked + .slider { + background-color: var(--main-color); +} + +.switch input:focus + .slider { + box-shadow: 0 0 1px var(--main-color); +} + +.switch input:checked + .slider + .label { + color: var(--text-color); +} + +.switch input:checked + .slider:before { + -webkit-transform: translateX(var(--switch-slider-size)); + -ms-transform: translateX(var(--switch-slider-size)); + transform: translateX(var(--switch-slider-size)); +} diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..dd84c5c --- /dev/null +++ b/src/index.html @@ -0,0 +1,36 @@ + + + + + + Comic Book Reader + + + + + +
+ + + + diff --git a/src/index.js b/src/index.js index 09c4dcf..485ab09 100644 --- a/src/index.js +++ b/src/index.js @@ -1,14 +1,14 @@ -import { h, render } from 'preact'; -import { Provider } from 'preact-redux'; -import store from './store'; -import App from './components/app'; -import './style'; - -render(( -
- - - -
-), document.body); +import { h, render } from 'preact' +import { Provider } from 'unistore/preact' +import store from './unistore/store' +import App from './components/app' +import './style' +render( +
+ + + +
, + document.body +) diff --git a/src/lib/compatibility.js b/src/lib/compatibility.js deleted file mode 100644 index df626a7..0000000 --- a/src/lib/compatibility.js +++ /dev/null @@ -1,639 +0,0 @@ -/* Copyright 2012 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* eslint strict: ["error", "function"] */ -/* eslint-disable no-extend-native */ -/* globals VBArray, PDFJS */ - -(function compatibilityWrapper() { - 'use strict'; - -var userAgent = navigator.userAgent; - -var isAndroid = /Android/.test(userAgent); -var isAndroidPre3 = /Android\s[0-2][^\d]/.test(userAgent); -var isAndroidPre5 = /Android\s[0-4][^\d]/.test(userAgent); -var isChrome = userAgent.indexOf('Chrom') >= 0; -var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(userAgent); -var isIE = userAgent.indexOf('Trident') >= 0; -var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent); -var isOpera = userAgent.indexOf('Opera') >= 0; -var isSafari = /Safari\//.test(userAgent) && - !/(Chrome\/|Android\s)/.test(userAgent); - -// Initializing PDFJS global object here, it case if we need to change/disable -// some PDF.js features, e.g. range requests -if (typeof PDFJS === 'undefined') { - (typeof window !== 'undefined' ? window : this).PDFJS = {}; -} - -// Checking if the typed arrays are supported -// Support: iOS<6.0 (subarray), IE<10, Android<4.0 -(function checkTypedArrayCompatibility() { - if (typeof Uint8Array !== 'undefined') { - // Support: iOS<6.0 - if (typeof Uint8Array.prototype.subarray === 'undefined') { - Uint8Array.prototype.subarray = function subarray(start, end) { - return new Uint8Array(this.slice(start, end)); - }; - Float32Array.prototype.subarray = function subarray(start, end) { - return new Float32Array(this.slice(start, end)); - }; - } - - // Support: Android<4.1 - if (typeof Float64Array === 'undefined') { - window.Float64Array = Float32Array; - } - return; - } - - function subarray(start, end) { - return new TypedArray(this.slice(start, end)); - } - - function setArrayOffset(array, offset) { - if (arguments.length < 2) { - offset = 0; - } - for (var i = 0, n = array.length; i < n; ++i, ++offset) { - this[offset] = array[i] & 0xFF; - } - } - - function TypedArray(arg1) { - var result, i, n; - if (typeof arg1 === 'number') { - result = []; - for (i = 0; i < arg1; ++i) { - result[i] = 0; - } - } else if ('slice' in arg1) { - result = arg1.slice(0); - } else { - result = []; - for (i = 0, n = arg1.length; i < n; ++i) { - result[i] = arg1[i]; - } - } - - result.subarray = subarray; - result.buffer = result; - result.byteLength = result.length; - result.set = setArrayOffset; - - if (typeof arg1 === 'object' && arg1.buffer) { - result.buffer = arg1.buffer; - } - return result; - } - - window.Uint8Array = TypedArray; - window.Int8Array = TypedArray; - - // we don't need support for set, byteLength for 32-bit array - // so we can use the TypedArray as well - window.Uint32Array = TypedArray; - window.Int32Array = TypedArray; - window.Uint16Array = TypedArray; - window.Float32Array = TypedArray; - window.Float64Array = TypedArray; -})(); - -// URL = URL || webkitURL -// Support: Safari<7, Android 4.2+ -(function normalizeURLObject() { - if (!window.URL) { - window.URL = window.webkitURL; - } -})(); - -// Object.defineProperty()? -// Support: Android<4.0, Safari<5.1 -(function checkObjectDefinePropertyCompatibility() { - if (typeof Object.defineProperty !== 'undefined') { - var definePropertyPossible = true; - try { - // some browsers (e.g. safari) cannot use defineProperty() on DOM objects - // and thus the native version is not sufficient - Object.defineProperty(new Image(), 'id', { value: 'test' }); - // ... another test for android gb browser for non-DOM objects - var Test = function Test() {}; - Test.prototype = { get id() { } }; - Object.defineProperty(new Test(), 'id', - { value: '', configurable: true, enumerable: true, writable: false }); - } catch (e) { - definePropertyPossible = false; - } - if (definePropertyPossible) { - return; - } - } - - Object.defineProperty = function objectDefineProperty(obj, name, def) { - delete obj[name]; - if ('get' in def) { - obj.__defineGetter__(name, def['get']); - } - if ('set' in def) { - obj.__defineSetter__(name, def['set']); - } - if ('value' in def) { - obj.__defineSetter__(name, function objectDefinePropertySetter(value) { - this.__defineGetter__(name, function objectDefinePropertyGetter() { - return value; - }); - return value; - }); - obj[name] = def.value; - } - }; -})(); - - -// No XMLHttpRequest#response? -// Support: IE<11, Android <4.0 -(function checkXMLHttpRequestResponseCompatibility() { - var xhrPrototype = XMLHttpRequest.prototype; - var xhr = new XMLHttpRequest(); - if (!('overrideMimeType' in xhr)) { - // IE10 might have response, but not overrideMimeType - // Support: IE10 - Object.defineProperty(xhrPrototype, 'overrideMimeType', { - value: function xmlHttpRequestOverrideMimeType(mimeType) {} - }); - } - if ('responseType' in xhr) { - return; - } - - // The worker will be using XHR, so we can save time and disable worker. - PDFJS.disableWorker = true; - - Object.defineProperty(xhrPrototype, 'responseType', { - get: function xmlHttpRequestGetResponseType() { - return this._responseType || 'text'; - }, - set: function xmlHttpRequestSetResponseType(value) { - if (value === 'text' || value === 'arraybuffer') { - this._responseType = value; - if (value === 'arraybuffer' && - typeof this.overrideMimeType === 'function') { - this.overrideMimeType('text/plain; charset=x-user-defined'); - } - } - } - }); - - // Support: IE9 - if (typeof VBArray !== 'undefined') { - Object.defineProperty(xhrPrototype, 'response', { - get: function xmlHttpRequestResponseGet() { - if (this.responseType === 'arraybuffer') { - return new Uint8Array(new VBArray(this.responseBody).toArray()); - } - return this.responseText; - } - }); - return; - } - - Object.defineProperty(xhrPrototype, 'response', { - get: function xmlHttpRequestResponseGet() { - if (this.responseType !== 'arraybuffer') { - return this.responseText; - } - var text = this.responseText; - var i, n = text.length; - var result = new Uint8Array(n); - for (i = 0; i < n; ++i) { - result[i] = text.charCodeAt(i) & 0xFF; - } - return result.buffer; - } - }); -})(); - -// window.btoa (base64 encode function) ? -// Support: IE<10 -(function checkWindowBtoaCompatibility() { - if ('btoa' in window) { - return; - } - - var digits = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - - window.btoa = function windowBtoa(chars) { - var buffer = ''; - var i, n; - for (i = 0, n = chars.length; i < n; i += 3) { - var b1 = chars.charCodeAt(i) & 0xFF; - var b2 = chars.charCodeAt(i + 1) & 0xFF; - var b3 = chars.charCodeAt(i + 2) & 0xFF; - var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4); - var d3 = i + 1 < n ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64; - var d4 = i + 2 < n ? (b3 & 0x3F) : 64; - buffer += (digits.charAt(d1) + digits.charAt(d2) + - digits.charAt(d3) + digits.charAt(d4)); - } - return buffer; - }; -})(); - -// window.atob (base64 encode function)? -// Support: IE<10 -(function checkWindowAtobCompatibility() { - if ('atob' in window) { - return; - } - - // https://github.com/davidchambers/Base64.js - var digits = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - window.atob = function (input) { - input = input.replace(/=+$/, ''); - if (input.length % 4 === 1) { - throw new Error('bad atob input'); - } - for ( - // initialize result and counters - var bc = 0, bs, buffer, idx = 0, output = ''; - // get next character - (buffer = input.charAt(idx++)); - // character found in table? - // initialize bit storage and add its ascii value - ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, - // and if not first of each 4 characters, - // convert the first 8 bits to one ascii character - bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 - ) { - // try to find character in table (0-63, not found => -1) - buffer = digits.indexOf(buffer); - } - return output; - }; -})(); - -// Function.prototype.bind? -// Support: Android<4.0, iOS<6.0 -(function checkFunctionPrototypeBindCompatibility() { - if (typeof Function.prototype.bind !== 'undefined') { - return; - } - - Function.prototype.bind = function functionPrototypeBind(obj) { - var fn = this, headArgs = Array.prototype.slice.call(arguments, 1); - var bound = function functionPrototypeBindBound() { - var args = headArgs.concat(Array.prototype.slice.call(arguments)); - return fn.apply(obj, args); - }; - return bound; - }; -})(); - -// HTMLElement dataset property -// Support: IE<11, Safari<5.1, Android<4.0 -(function checkDatasetProperty() { - var div = document.createElement('div'); - if ('dataset' in div) { - return; // dataset property exists - } - - Object.defineProperty(HTMLElement.prototype, 'dataset', { - get: function() { - if (this._dataset) { - return this._dataset; - } - - var dataset = {}; - for (var j = 0, jj = this.attributes.length; j < jj; j++) { - var attribute = this.attributes[j]; - if (attribute.name.substring(0, 5) !== 'data-') { - continue; - } - var key = attribute.name.substring(5).replace(/\-([a-z])/g, - function(all, ch) { - return ch.toUpperCase(); - }); - dataset[key] = attribute.value; - } - - Object.defineProperty(this, '_dataset', { - value: dataset, - writable: false, - enumerable: false - }); - return dataset; - }, - enumerable: true - }); -})(); - -// HTMLElement classList property -// Support: IE<10, Android<4.0, iOS<5.0 -(function checkClassListProperty() { - var div = document.createElement('div'); - if ('classList' in div) { - return; // classList property exists - } - - function changeList(element, itemName, add, remove) { - var s = element.className || ''; - var list = s.split(/\s+/g); - if (list[0] === '') { - list.shift(); - } - var index = list.indexOf(itemName); - if (index < 0 && add) { - list.push(itemName); - } - if (index >= 0 && remove) { - list.splice(index, 1); - } - element.className = list.join(' '); - return (index >= 0); - } - - var classListPrototype = { - add: function(name) { - changeList(this.element, name, true, false); - }, - contains: function(name) { - return changeList(this.element, name, false, false); - }, - remove: function(name) { - changeList(this.element, name, false, true); - }, - toggle: function(name) { - changeList(this.element, name, true, true); - } - }; - - Object.defineProperty(HTMLElement.prototype, 'classList', { - get: function() { - if (this._classList) { - return this._classList; - } - - var classList = Object.create(classListPrototype, { - element: { - value: this, - writable: false, - enumerable: true - } - }); - Object.defineProperty(this, '_classList', { - value: classList, - writable: false, - enumerable: false - }); - return classList; - }, - enumerable: true - }); -})(); - -// Check console compatibility -// In older IE versions the console object is not available -// unless console is open. -// Support: IE<10 -(function checkConsoleCompatibility() { - if (!('console' in window)) { - window.console = { - log: function() {}, - error: function() {}, - warn: function() {} - }; - } else if (!('bind' in console.log)) { - // native functions in IE9 might not have bind - console.log = (function(fn) { - return function(msg) { return fn(msg); }; - })(console.log); - console.error = (function(fn) { - return function(msg) { return fn(msg); }; - })(console.error); - console.warn = (function(fn) { - return function(msg) { return fn(msg); }; - })(console.warn); - } -})(); - -// Check onclick compatibility in Opera -// Support: Opera<15 -(function checkOnClickCompatibility() { - // workaround for reported Opera bug DSK-354448: - // onclick fires on disabled buttons with opaque content - function ignoreIfTargetDisabled(event) { - if (isDisabled(event.target)) { - event.stopPropagation(); - } - } - function isDisabled(node) { - return node.disabled || (node.parentNode && isDisabled(node.parentNode)); - } - if (isOpera) { - // use browser detection since we cannot feature-check this bug - document.addEventListener('click', ignoreIfTargetDisabled, true); - } -})(); - -// Checks if possible to use URL.createObjectURL() -// Support: IE -(function checkOnBlobSupport() { - // sometimes IE loosing the data created with createObjectURL(), see #3977 - if (isIE) { - PDFJS.disableCreateObjectURL = true; - } -})(); - -// Checks if navigator.language is supported -(function checkNavigatorLanguage() { - if ('language' in navigator) { - return; - } - PDFJS.locale = navigator.userLanguage || 'en-US'; -})(); - -// Support: Safari 6.0+, Android<3.0, Chrome 39/40, iOS -(function checkRangeRequests() { - // Safari has issues with cached range requests see: - // https://github.com/mozilla/pdf.js/issues/3260 - // Last tested with version 6.0.4. - - // Older versions of Android (pre 3.0) has issues with range requests, see: - // https://github.com/mozilla/pdf.js/issues/3381. - // Make sure that we only match webkit-based Android browsers, - // since Firefox/Fennec works as expected. - - // Range requests are broken in Chrome 39 and 40, https://crbug.com/442318 - if (isSafari || isAndroidPre3 || isChromeWithRangeBug || isIOS) { - PDFJS.disableRange = true; - PDFJS.disableStream = true; - } -})(); - -// Check if the browser supports manipulation of the history. -// Support: IE<10, Android<4.2 -(function checkHistoryManipulation() { - // Android 2.x has so buggy pushState support that it was removed in - // Android 3.0 and restored as late as in Android 4.2. - // Support: Android 2.x - if (!history.pushState || isAndroidPre3) { - PDFJS.disableHistory = true; - } -})(); - -// Support: IE<11, Chrome<21, Android<4.4, Safari<6 -(function checkSetPresenceInImageData() { - // IE < 11 will use window.CanvasPixelArray which lacks set function. - if (window.CanvasPixelArray) { - if (typeof window.CanvasPixelArray.prototype.set !== 'function') { - window.CanvasPixelArray.prototype.set = function(arr) { - for (var i = 0, ii = this.length; i < ii; i++) { - this[i] = arr[i]; - } - }; - } - } else { - // Old Chrome and Android use an inaccessible CanvasPixelArray prototype. - // Because we cannot feature detect it, we rely on user agent parsing. - var polyfill = false, versionMatch; - if (isChrome) { - versionMatch = userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); - // Chrome < 21 lacks the set function. - polyfill = versionMatch && parseInt(versionMatch[2]) < 21; - } else if (isAndroid) { - // Android < 4.4 lacks the set function. - // Android >= 4.4 will contain Chrome in the user agent, - // thus pass the Chrome check above and not reach this block. - polyfill = isAndroidPre5; - } else if (isSafari) { - versionMatch = userAgent. - match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//); - // Safari < 6 lacks the set function. - polyfill = versionMatch && parseInt(versionMatch[1]) < 6; - } - - if (polyfill) { - var contextPrototype = window.CanvasRenderingContext2D.prototype; - var createImageData = contextPrototype.createImageData; - contextPrototype.createImageData = function(w, h) { - var imageData = createImageData.call(this, w, h); - imageData.data.set = function(arr) { - for (var i = 0, ii = this.length; i < ii; i++) { - this[i] = arr[i]; - } - }; - return imageData; - }; - // this closure will be kept referenced, so clear its vars - contextPrototype = null; - } - } -})(); - -// Support: IE<10, Android<4.0, iOS -(function checkRequestAnimationFrame() { - function fakeRequestAnimationFrame(callback) { - window.setTimeout(callback, 20); - } - - if (isIOS) { - // requestAnimationFrame on iOS is broken, replacing with fake one. - window.requestAnimationFrame = fakeRequestAnimationFrame; - return; - } - if ('requestAnimationFrame' in window) { - return; - } - window.requestAnimationFrame = - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - fakeRequestAnimationFrame; -})(); - -// Support: Android, iOS -(function checkCanvasSizeLimitation() { - if (isIOS || isAndroid) { - // 5MP - PDFJS.maxCanvasPixels = 5242880; - } -})(); - -// Disable fullscreen support for certain problematic configurations. -// Support: IE11+ (when embedded). -(function checkFullscreenSupport() { - if (isIE && window.parent !== window) { - PDFJS.disableFullscreen = true; - } -})(); - -// Provides document.currentScript support -// Support: IE, Chrome<29. -(function checkCurrentScript() { - if ('currentScript' in document) { - return; - } - Object.defineProperty(document, 'currentScript', { - get: function () { - var scripts = document.getElementsByTagName('script'); - return scripts[scripts.length - 1]; - }, - enumerable: true, - configurable: true - }); -})(); - -// Provides `input.type = 'type'` runtime failure protection. -// Support: IE9,10. -(function checkInputTypeNumberAssign() { - var el = document.createElement('input'); - try { - el.type = 'number'; - } catch (ex) { - var inputProto = el.constructor.prototype; - var typeProperty = Object.getOwnPropertyDescriptor(inputProto, 'type'); - Object.defineProperty(inputProto, 'type', { - get: function () { return typeProperty.get.call(this); }, - set: function (value) { - typeProperty.set.call(this, value === 'number' ? 'text' : value); - }, - enumerable: true, - configurable: true - }); - } -})(); - -// Provides correct document.readyState value for legacy browsers. -// Support: IE9,10. -(function checkDocumentReadyState() { - if (!document.attachEvent) { - return; - } - var documentProto = document.constructor.prototype; - var readyStateProto = Object.getOwnPropertyDescriptor(documentProto, - 'readyState'); - Object.defineProperty(documentProto, 'readyState', { - get: function () { - var value = readyStateProto.get.call(this); - return value === 'interactive' ? 'loading' : value; - }, - set: function (value) { readyStateProto.set.call(this, value); }, - enumerable: true, - configurable: true - }); -})(); - -}).call((typeof window === 'undefined') ? this : window); diff --git a/src/lib/db.js b/src/lib/db.js deleted file mode 100644 index a083fe4..0000000 --- a/src/lib/db.js +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) 2017 Matthew Brennan Jones -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - -let g_db = null; - -// FIXME: All the functions in this file are named inconsistently -function getAllCachedFirstPages(onStart, onEach) { - let db_names = settings_get_db_names(); - onStart(db_names.length); - - let nextElement = function() { - if (db_names.length <= 0) { - return; - } - - let m_db = null; - let filename = db_names.shift(); - //console.info('!!!!!!!' + filename); - let request = indexedDB.open(filename, 1); - request.onerror = function(event) { - console.error('Failed to open database for "' + filename + '", :' + event.target.errorCode); - }; - request.onupgradeneeded = function(event) { - console.error('Database does not exist for "' + filename + '".'); - event.target.transaction.abort(); - if (m_db) { - m_db.close(); - m_db = null; - } - nextElement(); - }; - request.onsuccess = function(event) { - console.info('Opening "' + filename + '" database'); - m_db = event.target.result; - - let trans = m_db.transaction('small', IDBTransaction.READ_ONLY); - let store = trans.objectStore('small'); - - let countRequest = store.count(); - countRequest.onsuccess = function() { - let count = countRequest.result; - - trans.oncomplete = function(evt) { - m_db.close(); - }; - - let cursorRequest = store.openCursor(); - - cursorRequest.onerror = function(error) { - console.error(error); - m_db.close(); - }; - - cursorRequest.onsuccess = function(evt) { - let cursor = evt.target.result; - - // DB has files - if (cursor) { - // console.info(cursor.key); - // console.info(cursor.value); - onEach(filename, cursor.key, cursor.value); - // DB has no files - } else { - onEach(filename, null, null); - } - - trans.abort(); - m_db.close(); - nextElement(); - }; - }; - }; - }; - nextElement(); -} - -// FIXME: This only gets the size of the big pages. -// It needs to get the size of the small pages too. -function getTotalSize(onEnd) { - let db_names = settings_get_db_names(); - let total_comics = db_names.length; - let total_size = 0; - let m_db = null; - - let nextElement = function() { - if (db_names.length <= 0) { - onEnd(total_size); - return; - } - - let filename = db_names.shift(); - let request = indexedDB.open(filename, 1); - request.onerror = function(event) { - console.error('Failed to open database for "' + filename + '", :' + event.target.errorCode); - }; - request.onupgradeneeded = function(event) { - console.error('Database does not exist for "' + filename + '".'); - event.target.transaction.abort(); - if (m_db) { - m_db.close(); - m_db = null; - } - nextElement(); - }; - request.onsuccess = function(event) { - m_db = event.target.result; - total_size += filename.length; - - let trans = m_db.transaction('big', IDBTransaction.READ_ONLY); - let store = trans.objectStore('big'); - - let countRequest = store.count(); - countRequest.onsuccess = function() { - let count = countRequest.result; - - trans.oncomplete = function(evt) { - m_db.close(); - nextElement(); - }; - - let cursorRequest = store.openCursor(); - - cursorRequest.onerror = function(error) { - console.error(error); - m_db.close(); - }; - - cursorRequest.onsuccess = function(evt) { - let cursor = evt.target.result; - if (cursor) { - total_size += cursor.key.length; - total_size += cursor.value.size; - cursor.continue(); - } - }; - }; - }; - }; - nextElement(); -} - -function getAllCachedPages(filename, onStart, onEach, onEnd) { - let m_db = null; - let request = indexedDB.open(filename, 1); - request.onerror = function(event) { - console.error('Failed to open database for "' + filename + '", :' + event.target.errorCode); - }; - request.onsuccess = function(event) { - console.info('Opening "' + filename + '" database'); - m_db = event.target.result; - - let trans = m_db.transaction('big', IDBTransaction.READ_ONLY); - let store = trans.objectStore('big'); - - let countRequest = store.count(); - countRequest.onsuccess = function() { - let count = countRequest.result; - onStart(count); - - trans.oncomplete = function(evt) { - onEnd(); - m_db.close(); - }; - - let cursorRequest = store.openCursor(); - - cursorRequest.onerror = function(error) { - console.error(error); - m_db.close(); - }; - - cursorRequest.onsuccess = function(evt) { - let cursor = evt.target.result; - if (cursor) { - // console.info(cursor.key); - // console.info(cursor.value); - onEach(cursor.key, cursor.value); - cursor.continue(); - } - }; - }; - }; -} - -// FIXME: What do we do when this fails to write from lack of space? -function initCachedFileStorage(db_name, cb) { - // Just return if already connected - if (g_db) { - cb(); - return; - } - - let request = indexedDB.open(db_name, 1); - request.onerror = function(event) { - console.error('Failed to create database for "' + db_name + '", :' + event.target.errorCode); - }; - request.onsuccess = function(event) { - console.info('Opening "' + db_name + '" database'); - g_db = event.target.result; - cb(); - }; - request.onupgradeneeded = function(event) { - console.info('Creating/Upgrading "' + db_name + '" database'); - let db = event.target.result; - let objectStore = db.createObjectStore('big', { autoIncrement : true }); - objectStore = db.createObjectStore('small', { autoIncrement : true }); - }; -} - -function deleteCachedFileStorage(db_name, cb) { - let req = indexedDB.deleteDatabase(db_name); - req.onsuccess = function() { - console.info('Deleted "' + db_name + '" database'); - cb(); - }; - req.onerror = function() { - console.info('Failed to deleted "' + db_name + '" database'); - cb(); - }; -} - -function dbClose() { - if (g_db) { - g_db.close(); - g_db = null; - } -} - -function getCachedFile(name, file_name, cb) { - let store = g_db.transaction(name, 'readwrite').objectStore(name); - let request = store.get(file_name); - request.onerror = function(event) { - console.warn(event); - }; - request.onsuccess = function(event) { - //console.info('????????? Get worked: ' + name + ', ' + file_name); - let blob = event.target.result; - cb(blob); - }; -} - -function setCachedFile(name, file_name, blob, cb) { - let store = g_db.transaction(name, 'readwrite').objectStore(name); - - let request = null; - try { - request = store.put(blob, file_name); - } catch (e) { - dbClose(); -// console.error(e); - if (e.name === 'QUOTA_EXCEEDED_ERR') { - cb(false); - } - } - - request.onerror = function(event) { -// console.error(event); - cb(false); - }; - request.onsuccess = function(event) { - //console.info('????????? Put worked: ' + name + ', ' + file_name); - cb(true); - }; -} diff --git a/src/lib/i18n.js b/src/lib/i18n.js deleted file mode 100644 index 508890c..0000000 --- a/src/lib/i18n.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2017 Matthew Brennan Jones -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - - -let g_lang = (window.navigator.userLanguage || window.navigator.language).split('-')[0].trim(); -const g_lang_default = 'en'; - - -function translateElementLanguages() { - const all = document.querySelectorAll("*[translatable=true]"); - for (let i=0; i Translated - if (g_i18n_storage.hasOwnProperty(trimmed) && g_i18n_storage[trimmed].hasOwnProperty(curr_lang)) { - return g_i18n_storage[trimmed][curr_lang]; - } - - // Translated -> Translated - let keys = Object.keys(g_i18n_storage); - for (let i=0; i English - keys = Object.keys(g_i18n_storage); - for (let i=0; i -// This software is licensed under a MIT License -// https://github.com/workhorsy/uncompress.js - -"use strict"; - -// Based on the information from: -// https://en.wikipedia.org/wiki/Tar_(computing) - - -(function() { - -var TAR_TYPE_FILE = 0; -var TAR_TYPE_DIR = 5; - -var TAR_HEADER_SIZE = 512; -var TAR_TYPE_OFFSET = 156; -var TAR_TYPE_SIZE = 1; -var TAR_SIZE_OFFSET = 124; -var TAR_SIZE_SIZE = 12; -var TAR_NAME_OFFSET = 0; -var TAR_NAME_SIZE = 100; - -function _tarRead(view, offset, size) { - return view.slice(offset, offset + size); -} - -function tarGetEntries(filename, array_buffer) { - var view = new Uint8Array(array_buffer); - var offset = 0; - var entries = []; - - while (offset + TAR_HEADER_SIZE < view.byteLength) { - // Get entry name - var entry_name = saneMap(_tarRead(view, offset + TAR_NAME_OFFSET, TAR_NAME_SIZE), String.fromCharCode); - entry_name = entry_name.join('').replace(/\0/g, ''); - - // No entry name, so probably the last block - if (entry_name.length === 0) { - break; - } - - // Get entry size - var entry_size = parseInt(saneJoin(saneMap(_tarRead(view, offset + TAR_SIZE_OFFSET, TAR_SIZE_SIZE), String.fromCharCode), ''), 8); - var entry_type = saneMap(_tarRead(view, offset + TAR_TYPE_OFFSET, TAR_TYPE_SIZE), String.fromCharCode) | 0; - - // Save this as en entry if it is a file or directory - if (entry_type === TAR_TYPE_FILE || entry_type === TAR_TYPE_DIR) { - var entry = { - name: entry_name, - size: entry_size, - is_file: entry_type == TAR_TYPE_FILE, - offset: offset - }; - entries.push(entry); - } - - // Round the offset up to be divisible by TAR_HEADER_SIZE - offset += (entry_size + TAR_HEADER_SIZE); - if (offset % TAR_HEADER_SIZE > 0) { - var even = (offset / TAR_HEADER_SIZE) | 0; // number of times it goes evenly into TAR_HEADER_SIZE - offset = (even + 1) * TAR_HEADER_SIZE; - } - } - - return entries; -} - -function tarGetEntryData(entry, array_buffer) { - var view = new Uint8Array(array_buffer); - var offset = entry.offset; - var size = entry.size; - - // Get entry data - var entry_data = _tarRead(view, offset + TAR_HEADER_SIZE, size); - return entry_data; -} - -// Figure out if we are running in a Window or Web Worker -var scope = null; -if (typeof window === 'object') { - scope = window; -} else if (typeof importScripts === 'function') { - scope = self; -} - -// Set exports -scope.tarGetEntries = tarGetEntries; -scope.tarGetEntryData = tarGetEntryData; -})(); diff --git a/src/lib/jszip.js b/src/lib/jszip.js deleted file mode 100644 index 1546d7f..0000000 --- a/src/lib/jszip.js +++ /dev/null @@ -1,9155 +0,0 @@ -/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/master/LICENSE -*/ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSZip=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } - else if (isNaN(chr3)) { - enc4 = 64; - } - - output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); - - } - - return output; -}; - -// public method for decoding -exports.decode = function(input, utf8) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - while (i < input.length) { - - enc1 = _keyStr.indexOf(input.charAt(i++)); - enc2 = _keyStr.indexOf(input.charAt(i++)); - enc3 = _keyStr.indexOf(input.charAt(i++)); - enc4 = _keyStr.indexOf(input.charAt(i++)); - - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - - output = output + String.fromCharCode(chr1); - - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - - } - - return output; - -}; - -},{}],2:[function(_dereq_,module,exports){ -'use strict'; -function CompressedObject() { - this.compressedSize = 0; - this.uncompressedSize = 0; - this.crc32 = 0; - this.compressionMethod = null; - this.compressedContent = null; -} - -CompressedObject.prototype = { - /** - * Return the decompressed content in an unspecified format. - * The format will depend on the decompressor. - * @return {Object} the decompressed content. - */ - getContent: function() { - return null; // see implementation - }, - /** - * Return the compressed content in an unspecified format. - * The format will depend on the compressed conten source. - * @return {Object} the compressed content. - */ - getCompressedContent: function() { - return null; // see implementation - } -}; -module.exports = CompressedObject; - -},{}],3:[function(_dereq_,module,exports){ -'use strict'; -exports.STORE = { - magic: "\x00\x00", - compress: function(content, compressionOptions) { - return content; // no compression - }, - uncompress: function(content) { - return content; // no compression - }, - compressInputType: null, - uncompressInputType: null -}; -exports.DEFLATE = _dereq_('./flate'); - -},{"./flate":8}],4:[function(_dereq_,module,exports){ -'use strict'; - -var utils = _dereq_('./utils'); - -var table = [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, - 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, - 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, - 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, - 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, - 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, - 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, - 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, - 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, - 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, - 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, - 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, - 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, - 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, - 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, - 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, - 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, - 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, - 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, - 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, - 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, - 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, - 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, - 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, - 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, - 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, - 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, - 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, - 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, - 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, - 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, - 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, - 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, - 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, - 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, - 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, - 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, - 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, - 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, - 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, - 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, - 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, - 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, - 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, - 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, - 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, - 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, - 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, - 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, - 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, - 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, - 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, - 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, - 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, - 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, - 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D -]; - -/** - * - * Javascript crc32 - * http://www.webtoolkit.info/ - * - */ -module.exports = function crc32(input, crc) { - if (typeof input === "undefined" || !input.length) { - return 0; - } - - var isArray = utils.getTypeOf(input) !== "string"; - - if (typeof(crc) == "undefined") { - crc = 0; - } - var x = 0; - var y = 0; - var b = 0; - - crc = crc ^ (-1); - for (var i = 0, iTop = input.length; i < iTop; i++) { - b = isArray ? input[i] : input.charCodeAt(i); - y = (crc ^ b) & 0xFF; - x = table[y]; - crc = (crc >>> 8) ^ x; - } - - return crc ^ (-1); -}; -// vim: set shiftwidth=4 softtabstop=4: - -},{"./utils":21}],5:[function(_dereq_,module,exports){ -'use strict'; -var utils = _dereq_('./utils'); - -function DataReader(data) { - this.data = null; // type : see implementation - this.length = 0; - this.index = 0; -} -DataReader.prototype = { - /** - * Check that the offset will not go too far. - * @param {string} offset the additional offset to check. - * @throws {Error} an Error if the offset is out of bounds. - */ - checkOffset: function(offset) { - this.checkIndex(this.index + offset); - }, - /** - * Check that the specifed index will not be too far. - * @param {string} newIndex the index to check. - * @throws {Error} an Error if the index is out of bounds. - */ - checkIndex: function(newIndex) { - if (this.length < newIndex || newIndex < 0) { - throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?"); - } - }, - /** - * Change the index. - * @param {number} newIndex The new index. - * @throws {Error} if the new index is out of the data. - */ - setIndex: function(newIndex) { - this.checkIndex(newIndex); - this.index = newIndex; - }, - /** - * Skip the next n bytes. - * @param {number} n the number of bytes to skip. - * @throws {Error} if the new index is out of the data. - */ - skip: function(n) { - this.setIndex(this.index + n); - }, - /** - * Get the byte at the specified index. - * @param {number} i the index to use. - * @return {number} a byte. - */ - byteAt: function(i) { - // see implementations - }, - /** - * Get the next number with a given byte size. - * @param {number} size the number of bytes to read. - * @return {number} the corresponding number. - */ - readInt: function(size) { - var result = 0, - i; - this.checkOffset(size); - for (i = this.index + size - 1; i >= this.index; i--) { - result = (result << 8) + this.byteAt(i); - } - this.index += size; - return result; - }, - /** - * Get the next string with a given byte size. - * @param {number} size the number of bytes to read. - * @return {string} the corresponding string. - */ - readString: function(size) { - return utils.transformTo("string", this.readData(size)); - }, - /** - * Get raw data without conversion, bytes. - * @param {number} size the number of bytes to read. - * @return {Object} the raw data, implementation specific. - */ - readData: function(size) { - // see implementations - }, - /** - * Find the last occurence of a zip signature (4 bytes). - * @param {string} sig the signature to find. - * @return {number} the index of the last occurence, -1 if not found. - */ - lastIndexOfSignature: function(sig) { - // see implementations - }, - /** - * Get the next date. - * @return {Date} the date. - */ - readDate: function() { - var dostime = this.readInt(4); - return new Date( - ((dostime >> 25) & 0x7f) + 1980, // year - ((dostime >> 21) & 0x0f) - 1, // month - (dostime >> 16) & 0x1f, // day - (dostime >> 11) & 0x1f, // hour - (dostime >> 5) & 0x3f, // minute - (dostime & 0x1f) << 1); // second - } -}; -module.exports = DataReader; - -},{"./utils":21}],6:[function(_dereq_,module,exports){ -'use strict'; -exports.base64 = false; -exports.binary = false; -exports.dir = false; -exports.createFolders = false; -exports.date = null; -exports.compression = null; -exports.compressionOptions = null; -exports.comment = null; -exports.unixPermissions = null; -exports.dosPermissions = null; - -},{}],7:[function(_dereq_,module,exports){ -'use strict'; -var utils = _dereq_('./utils'); - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.string2binary = function(str) { - return utils.string2binary(str); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.string2Uint8Array = function(str) { - return utils.transformTo("uint8array", str); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.uint8Array2String = function(array) { - return utils.transformTo("string", array); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.string2Blob = function(str) { - var buffer = utils.transformTo("arraybuffer", str); - return utils.arrayBuffer2Blob(buffer); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.arrayBuffer2Blob = function(buffer) { - return utils.arrayBuffer2Blob(buffer); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.transformTo = function(outputType, input) { - return utils.transformTo(outputType, input); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.getTypeOf = function(input) { - return utils.getTypeOf(input); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.checkSupport = function(type) { - return utils.checkSupport(type); -}; - -/** - * @deprecated - * This value will be removed in a future version without replacement. - */ -exports.MAX_VALUE_16BITS = utils.MAX_VALUE_16BITS; - -/** - * @deprecated - * This value will be removed in a future version without replacement. - */ -exports.MAX_VALUE_32BITS = utils.MAX_VALUE_32BITS; - - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.pretty = function(str) { - return utils.pretty(str); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.findCompression = function(compressionMethod) { - return utils.findCompression(compressionMethod); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.isRegExp = function (object) { - return utils.isRegExp(object); -}; - - -},{"./utils":21}],8:[function(_dereq_,module,exports){ -'use strict'; -var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined'); - -var pako = _dereq_("pako"); -exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array"; -exports.compressInputType = USE_TYPEDARRAY ? "uint8array" : "array"; - -exports.magic = "\x08\x00"; -exports.compress = function(input, compressionOptions) { - return pako.deflateRaw(input, { - level : compressionOptions.level || -1 // default compression - }); -}; -exports.uncompress = function(input) { - return pako.inflateRaw(input); -}; - -},{"pako":24}],9:[function(_dereq_,module,exports){ -'use strict'; - -var base64 = _dereq_('./base64'); - -/** -Usage: - zip = new JSZip(); - zip.file("hello.txt", "Hello, World!").file("tempfile", "nothing"); - zip.folder("images").file("smile.gif", base64Data, {base64: true}); - zip.file("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")}); - zip.remove("tempfile"); - - base64zip = zip.generate(); - -**/ - -/** - * Representation a of zip file in js - * @constructor - * @param {String=|ArrayBuffer=|Uint8Array=} data the data to load, if any (optional). - * @param {Object=} options the options for creating this objects (optional). - */ -function JSZip(data, options) { - // if this constructor is used without `new`, it adds `new` before itself: - if(!(this instanceof JSZip)) return new JSZip(data, options); - - // object containing the files : - // { - // "folder/" : {...}, - // "folder/data.txt" : {...} - // } - this.files = {}; - - this.comment = null; - - // Where we are in the hierarchy - this.root = ""; - if (data) { - this.load(data, options); - } - this.clone = function() { - var newObj = new JSZip(); - for (var i in this) { - if (typeof this[i] !== "function") { - newObj[i] = this[i]; - } - } - return newObj; - }; -} -JSZip.prototype = _dereq_('./object'); -JSZip.prototype.load = _dereq_('./load'); -JSZip.support = _dereq_('./support'); -JSZip.defaults = _dereq_('./defaults'); - -/** - * @deprecated - * This namespace will be removed in a future version without replacement. - */ -JSZip.utils = _dereq_('./deprecatedPublicUtils'); - -JSZip.base64 = { - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - encode : function(input) { - return base64.encode(input); - }, - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - decode : function(input) { - return base64.decode(input); - } -}; -JSZip.compressions = _dereq_('./compressions'); -module.exports = JSZip; - -},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(_dereq_,module,exports){ -'use strict'; -var base64 = _dereq_('./base64'); -var ZipEntries = _dereq_('./zipEntries'); -module.exports = function(data, options) { - var files, zipEntries, i, input; - options = options || {}; - if (options.base64) { - data = base64.decode(data); - } - - zipEntries = new ZipEntries(data, options); - files = zipEntries.files; - for (i = 0; i < files.length; i++) { - input = files[i]; - this.file(input.fileName, input.decompressed, { - binary: true, - optimizedBinaryString: true, - date: input.date, - dir: input.dir, - comment : input.fileComment.length ? input.fileComment : null, - unixPermissions : input.unixPermissions, - dosPermissions : input.dosPermissions, - createFolders: options.createFolders - }); - } - if (zipEntries.zipComment.length) { - this.comment = zipEntries.zipComment; - } - - return this; -}; - -},{"./base64":1,"./zipEntries":22}],11:[function(_dereq_,module,exports){ -(function (Buffer){ -'use strict'; -module.exports = function(data, encoding){ - return new Buffer(data, encoding); -}; -module.exports.test = function(b){ - return Buffer.isBuffer(b); -}; - -}).call(this,(typeof Buffer !== "undefined" ? Buffer : undefined)) -},{}],12:[function(_dereq_,module,exports){ -'use strict'; -var Uint8ArrayReader = _dereq_('./uint8ArrayReader'); - -function NodeBufferReader(data) { - this.data = data; - this.length = this.data.length; - this.index = 0; -} -NodeBufferReader.prototype = new Uint8ArrayReader(); - -/** - * @see DataReader.readData - */ -NodeBufferReader.prototype.readData = function(size) { - this.checkOffset(size); - var result = this.data.slice(this.index, this.index + size); - this.index += size; - return result; -}; -module.exports = NodeBufferReader; - -},{"./uint8ArrayReader":18}],13:[function(_dereq_,module,exports){ -'use strict'; -var support = _dereq_('./support'); -var utils = _dereq_('./utils'); -var crc32 = _dereq_('./crc32'); -var signature = _dereq_('./signature'); -var defaults = _dereq_('./defaults'); -var base64 = _dereq_('./base64'); -var compressions = _dereq_('./compressions'); -var CompressedObject = _dereq_('./compressedObject'); -var nodeBuffer = _dereq_('./nodeBuffer'); -var utf8 = _dereq_('./utf8'); -var StringWriter = _dereq_('./stringWriter'); -var Uint8ArrayWriter = _dereq_('./uint8ArrayWriter'); - -/** - * Returns the raw data of a ZipObject, decompress the content if necessary. - * @param {ZipObject} file the file to use. - * @return {String|ArrayBuffer|Uint8Array|Buffer} the data. - */ -var getRawData = function(file) { - if (file._data instanceof CompressedObject) { - file._data = file._data.getContent(); - file.options.binary = true; - file.options.base64 = false; - - if (utils.getTypeOf(file._data) === "uint8array") { - var copy = file._data; - // when reading an arraybuffer, the CompressedObject mechanism will keep it and subarray() a Uint8Array. - // if we request a file in the same format, we might get the same Uint8Array or its ArrayBuffer (the original zip file). - file._data = new Uint8Array(copy.length); - // with an empty Uint8Array, Opera fails with a "Offset larger than array size" - if (copy.length !== 0) { - file._data.set(copy, 0); - } - } - } - return file._data; -}; - -/** - * Returns the data of a ZipObject in a binary form. If the content is an unicode string, encode it. - * @param {ZipObject} file the file to use. - * @return {String|ArrayBuffer|Uint8Array|Buffer} the data. - */ -var getBinaryData = function(file) { - var result = getRawData(file), - type = utils.getTypeOf(result); - if (type === "string") { - if (!file.options.binary) { - // unicode text ! - // unicode string => binary string is a painful process, check if we can avoid it. - if (support.nodebuffer) { - return nodeBuffer(result, "utf-8"); - } - } - return file.asBinary(); - } - return result; -}; - -/** - * Transform this._data into a string. - * @param {function} filter a function String -> String, applied if not null on the result. - * @return {String} the string representing this._data. - */ -var dataToString = function(asUTF8) { - var result = getRawData(this); - if (result === null || typeof result === "undefined") { - return ""; - } - // if the data is a base64 string, we decode it before checking the encoding ! - if (this.options.base64) { - result = base64.decode(result); - } - if (asUTF8 && this.options.binary) { - // JSZip.prototype.utf8decode supports arrays as input - // skip to array => string step, utf8decode will do it. - result = out.utf8decode(result); - } - else { - // no utf8 transformation, do the array => string step. - result = utils.transformTo("string", result); - } - - if (!asUTF8 && !this.options.binary) { - result = utils.transformTo("string", out.utf8encode(result)); - } - return result; -}; -/** - * A simple object representing a file in the zip file. - * @constructor - * @param {string} name the name of the file - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data - * @param {Object} options the options of the file - */ -var ZipObject = function(name, data, options) { - this.name = name; - this.dir = options.dir; - this.date = options.date; - this.comment = options.comment; - this.unixPermissions = options.unixPermissions; - this.dosPermissions = options.dosPermissions; - - this._data = data; - this.options = options; - - /* - * This object contains initial values for dir and date. - * With them, we can check if the user changed the deprecated metadata in - * `ZipObject#options` or not. - */ - this._initialMetadata = { - dir : options.dir, - date : options.date - }; -}; - -ZipObject.prototype = { - /** - * Return the content as UTF8 string. - * @return {string} the UTF8 string. - */ - asText: function() { - return dataToString.call(this, true); - }, - /** - * Returns the binary content. - * @return {string} the content as binary. - */ - asBinary: function() { - return dataToString.call(this, false); - }, - /** - * Returns the content as a nodejs Buffer. - * @return {Buffer} the content as a Buffer. - */ - asNodeBuffer: function() { - var result = getBinaryData(this); - return utils.transformTo("nodebuffer", result); - }, - /** - * Returns the content as an Uint8Array. - * @return {Uint8Array} the content as an Uint8Array. - */ - asUint8Array: function() { - var result = getBinaryData(this); - return utils.transformTo("uint8array", result); - }, - /** - * Returns the content as an ArrayBuffer. - * @return {ArrayBuffer} the content as an ArrayBufer. - */ - asArrayBuffer: function() { - return this.asUint8Array().buffer; - } -}; - -/** - * Transform an integer into a string in hexadecimal. - * @private - * @param {number} dec the number to convert. - * @param {number} bytes the number of bytes to generate. - * @returns {string} the result. - */ -var decToHex = function(dec, bytes) { - var hex = "", - i; - for (i = 0; i < bytes; i++) { - hex += String.fromCharCode(dec & 0xff); - dec = dec >>> 8; - } - return hex; -}; - -/** - * Merge the objects passed as parameters into a new one. - * @private - * @param {...Object} var_args All objects to merge. - * @return {Object} a new object with the data of the others. - */ -var extend = function() { - var result = {}, i, attr; - for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers - for (attr in arguments[i]) { - if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") { - result[attr] = arguments[i][attr]; - } - } - } - return result; -}; - -/** - * Transforms the (incomplete) options from the user into the complete - * set of options to create a file. - * @private - * @param {Object} o the options from the user. - * @return {Object} the complete set of options. - */ -var prepareFileAttrs = function(o) { - o = o || {}; - if (o.base64 === true && (o.binary === null || o.binary === undefined)) { - o.binary = true; - } - o = extend(o, defaults); - o.date = o.date || new Date(); - if (o.compression !== null) o.compression = o.compression.toUpperCase(); - - return o; -}; - -/** - * Add a file in the current folder. - * @private - * @param {string} name the name of the file - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file - * @param {Object} o the options of the file - * @return {Object} the new file. - */ -var fileAdd = function(name, data, o) { - // be sure sub folders exist - var dataType = utils.getTypeOf(data), - parent; - - o = prepareFileAttrs(o); - - if (typeof o.unixPermissions === "string") { - o.unixPermissions = parseInt(o.unixPermissions, 8); - } - - // UNX_IFDIR 0040000 see zipinfo.c - if (o.unixPermissions && (o.unixPermissions & 0x4000)) { - o.dir = true; - } - // Bit 4 Directory - if (o.dosPermissions && (o.dosPermissions & 0x0010)) { - o.dir = true; - } - - if (o.dir) { - name = forceTrailingSlash(name); - } - - if (o.createFolders && (parent = parentFolder(name))) { - folderAdd.call(this, parent, true); - } - - if (o.dir || data === null || typeof data === "undefined") { - o.base64 = false; - o.binary = false; - data = null; - dataType = null; - } - else if (dataType === "string") { - if (o.binary && !o.base64) { - // optimizedBinaryString == true means that the file has already been filtered with a 0xFF mask - if (o.optimizedBinaryString !== true) { - // this is a string, not in a base64 format. - // Be sure that this is a correct "binary string" - data = utils.string2binary(data); - } - } - } - else { // arraybuffer, uint8array, ... - o.base64 = false; - o.binary = true; - - if (!dataType && !(data instanceof CompressedObject)) { - throw new Error("The data of '" + name + "' is in an unsupported format !"); - } - - // special case : it's way easier to work with Uint8Array than with ArrayBuffer - if (dataType === "arraybuffer") { - data = utils.transformTo("uint8array", data); - } - } - - var object = new ZipObject(name, data, o); - this.files[name] = object; - return object; -}; - -/** - * Find the parent folder of the path. - * @private - * @param {string} path the path to use - * @return {string} the parent folder, or "" - */ -var parentFolder = function (path) { - if (path.slice(-1) == '/') { - path = path.substring(0, path.length - 1); - } - var lastSlash = path.lastIndexOf('/'); - return (lastSlash > 0) ? path.substring(0, lastSlash) : ""; -}; - - -/** - * Returns the path with a slash at the end. - * @private - * @param {String} path the path to check. - * @return {String} the path with a trailing slash. - */ -var forceTrailingSlash = function(path) { - // Check the name ends with a / - if (path.slice(-1) != "/") { - path += "/"; // IE doesn't like substr(-1) - } - return path; -}; -/** - * Add a (sub) folder in the current folder. - * @private - * @param {string} name the folder's name - * @param {boolean=} [createFolders] If true, automatically create sub - * folders. Defaults to false. - * @return {Object} the new folder. - */ -var folderAdd = function(name, createFolders) { - createFolders = (typeof createFolders !== 'undefined') ? createFolders : false; - - name = forceTrailingSlash(name); - - // Does this folder already exist? - if (!this.files[name]) { - fileAdd.call(this, name, null, { - dir: true, - createFolders: createFolders - }); - } - return this.files[name]; -}; - -/** - * Generate a JSZip.CompressedObject for a given zipOject. - * @param {ZipObject} file the object to read. - * @param {JSZip.compression} compression the compression to use. - * @param {Object} compressionOptions the options to use when compressing. - * @return {JSZip.CompressedObject} the compressed result. - */ -var generateCompressedObjectFrom = function(file, compression, compressionOptions) { - var result = new CompressedObject(), - content; - - // the data has not been decompressed, we might reuse things ! - if (file._data instanceof CompressedObject) { - result.uncompressedSize = file._data.uncompressedSize; - result.crc32 = file._data.crc32; - - if (result.uncompressedSize === 0 || file.dir) { - compression = compressions['STORE']; - result.compressedContent = ""; - result.crc32 = 0; - } - else if (file._data.compressionMethod === compression.magic) { - result.compressedContent = file._data.getCompressedContent(); - } - else { - content = file._data.getContent(); - // need to decompress / recompress - result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions); - } - } - else { - // have uncompressed data - content = getBinaryData(file); - if (!content || content.length === 0 || file.dir) { - compression = compressions['STORE']; - content = ""; - } - result.uncompressedSize = content.length; - result.crc32 = crc32(content); - result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions); - } - - result.compressedSize = result.compressedContent.length; - result.compressionMethod = compression.magic; - - return result; -}; - - - - -/** - * Generate the UNIX part of the external file attributes. - * @param {Object} unixPermissions the unix permissions or null. - * @param {Boolean} isDir true if the entry is a directory, false otherwise. - * @return {Number} a 32 bit integer. - * - * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute : - * - * TTTTsstrwxrwxrwx0000000000ADVSHR - * ^^^^____________________________ file type, see zipinfo.c (UNX_*) - * ^^^_________________________ setuid, setgid, sticky - * ^^^^^^^^^________________ permissions - * ^^^^^^^^^^______ not used ? - * ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only - */ -var generateUnixExternalFileAttr = function (unixPermissions, isDir) { - - var result = unixPermissions; - if (!unixPermissions) { - // I can't use octal values in strict mode, hence the hexa. - // 040775 => 0x41fd - // 0100664 => 0x81b4 - result = isDir ? 0x41fd : 0x81b4; - } - - return (result & 0xFFFF) << 16; -}; - -/** - * Generate the DOS part of the external file attributes. - * @param {Object} dosPermissions the dos permissions or null. - * @param {Boolean} isDir true if the entry is a directory, false otherwise. - * @return {Number} a 32 bit integer. - * - * Bit 0 Read-Only - * Bit 1 Hidden - * Bit 2 System - * Bit 3 Volume Label - * Bit 4 Directory - * Bit 5 Archive - */ -var generateDosExternalFileAttr = function (dosPermissions, isDir) { - - // the dir flag is already set for compatibility - - return (dosPermissions || 0) & 0x3F; -}; - -/** - * Generate the various parts used in the construction of the final zip file. - * @param {string} name the file name. - * @param {ZipObject} file the file content. - * @param {JSZip.CompressedObject} compressedObject the compressed object. - * @param {number} offset the current offset from the start of the zip file. - * @param {String} platform let's pretend we are this platform (change platform dependents fields) - * @return {object} the zip parts. - */ -var generateZipParts = function(name, file, compressedObject, offset, platform) { - var data = compressedObject.compressedContent, - utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)), - comment = file.comment || "", - utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)), - useUTF8ForFileName = utfEncodedFileName.length !== file.name.length, - useUTF8ForComment = utfEncodedComment.length !== comment.length, - o = file.options, - dosTime, - dosDate, - extraFields = "", - unicodePathExtraField = "", - unicodeCommentExtraField = "", - dir, date; - - - // handle the deprecated options.dir - if (file._initialMetadata.dir !== file.dir) { - dir = file.dir; - } else { - dir = o.dir; - } - - // handle the deprecated options.date - if(file._initialMetadata.date !== file.date) { - date = file.date; - } else { - date = o.date; - } - - var extFileAttr = 0; - var versionMadeBy = 0; - if (dir) { - // dos or unix, we set the dos dir flag - extFileAttr |= 0x00010; - } - if(platform === "UNIX") { - versionMadeBy = 0x031E; // UNIX, version 3.0 - extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir); - } else { // DOS or other, fallback to DOS - versionMadeBy = 0x0014; // DOS, version 2.0 - extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir); - } - - // date - // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html - // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html - // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html - - dosTime = date.getHours(); - dosTime = dosTime << 6; - dosTime = dosTime | date.getMinutes(); - dosTime = dosTime << 5; - dosTime = dosTime | date.getSeconds() / 2; - - dosDate = date.getFullYear() - 1980; - dosDate = dosDate << 4; - dosDate = dosDate | (date.getMonth() + 1); - dosDate = dosDate << 5; - dosDate = dosDate | date.getDate(); - - if (useUTF8ForFileName) { - // set the unicode path extra field. unzip needs at least one extra - // field to correctly handle unicode path, so using the path is as good - // as any other information. This could improve the situation with - // other archive managers too. - // This field is usually used without the utf8 flag, with a non - // unicode path in the header (winrar, winzip). This helps (a bit) - // with the messy Windows' default compressed folders feature but - // breaks on p7zip which doesn't seek the unicode path extra field. - // So for now, UTF-8 everywhere ! - unicodePathExtraField = - // Version - decToHex(1, 1) + - // NameCRC32 - decToHex(crc32(utfEncodedFileName), 4) + - // UnicodeName - utfEncodedFileName; - - extraFields += - // Info-ZIP Unicode Path Extra Field - "\x75\x70" + - // size - decToHex(unicodePathExtraField.length, 2) + - // content - unicodePathExtraField; - } - - if(useUTF8ForComment) { - - unicodeCommentExtraField = - // Version - decToHex(1, 1) + - // CommentCRC32 - decToHex(this.crc32(utfEncodedComment), 4) + - // UnicodeName - utfEncodedComment; - - extraFields += - // Info-ZIP Unicode Path Extra Field - "\x75\x63" + - // size - decToHex(unicodeCommentExtraField.length, 2) + - // content - unicodeCommentExtraField; - } - - var header = ""; - - // version needed to extract - header += "\x0A\x00"; - // general purpose bit flag - // set bit 11 if utf8 - header += (useUTF8ForFileName || useUTF8ForComment) ? "\x00\x08" : "\x00\x00"; - // compression method - header += compressedObject.compressionMethod; - // last mod file time - header += decToHex(dosTime, 2); - // last mod file date - header += decToHex(dosDate, 2); - // crc-32 - header += decToHex(compressedObject.crc32, 4); - // compressed size - header += decToHex(compressedObject.compressedSize, 4); - // uncompressed size - header += decToHex(compressedObject.uncompressedSize, 4); - // file name length - header += decToHex(utfEncodedFileName.length, 2); - // extra field length - header += decToHex(extraFields.length, 2); - - - var fileRecord = signature.LOCAL_FILE_HEADER + header + utfEncodedFileName + extraFields; - - var dirRecord = signature.CENTRAL_FILE_HEADER + - // version made by (00: DOS) - decToHex(versionMadeBy, 2) + - // file header (common to file and central directory) - header + - // file comment length - decToHex(utfEncodedComment.length, 2) + - // disk number start - "\x00\x00" + - // internal file attributes TODO - "\x00\x00" + - // external file attributes - decToHex(extFileAttr, 4) + - // relative offset of local header - decToHex(offset, 4) + - // file name - utfEncodedFileName + - // extra field - extraFields + - // file comment - utfEncodedComment; - - return { - fileRecord: fileRecord, - dirRecord: dirRecord, - compressedObject: compressedObject - }; -}; - - -// return the actual prototype of JSZip -var out = { - /** - * Read an existing zip and merge the data in the current JSZip object. - * The implementation is in jszip-load.js, don't forget to include it. - * @param {String|ArrayBuffer|Uint8Array|Buffer} stream The stream to load - * @param {Object} options Options for loading the stream. - * options.base64 : is the stream in base64 ? default : false - * @return {JSZip} the current JSZip object - */ - load: function(stream, options) { - throw new Error("Load method is not defined. Is the file jszip-load.js included ?"); - }, - - /** - * Filter nested files/folders with the specified function. - * @param {Function} search the predicate to use : - * function (relativePath, file) {...} - * It takes 2 arguments : the relative path and the file. - * @return {Array} An array of matching elements. - */ - filter: function(search) { - var result = [], - filename, relativePath, file, fileClone; - for (filename in this.files) { - if (!this.files.hasOwnProperty(filename)) { - continue; - } - file = this.files[filename]; - // return a new object, don't let the user mess with our internal objects :) - fileClone = new ZipObject(file.name, file._data, extend(file.options)); - relativePath = filename.slice(this.root.length, filename.length); - if (filename.slice(0, this.root.length) === this.root && // the file is in the current root - search(relativePath, fileClone)) { // and the file matches the function - result.push(fileClone); - } - } - return result; - }, - - /** - * Add a file to the zip file, or search a file. - * @param {string|RegExp} name The name of the file to add (if data is defined), - * the name of the file to find (if no data) or a regex to match files. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded - * @param {Object} o File options - * @return {JSZip|Object|Array} this JSZip object (when adding a file), - * a file (when searching by string) or an array of files (when searching by regex). - */ - file: function(name, data, o) { - if (arguments.length === 1) { - if (utils.isRegExp(name)) { - var regexp = name; - return this.filter(function(relativePath, file) { - return !file.dir && regexp.test(relativePath); - }); - } - else { // text - return this.filter(function(relativePath, file) { - return !file.dir && relativePath === name; - })[0] || null; - } - } - else { // more than one argument : we have data ! - name = this.root + name; - fileAdd.call(this, name, data, o); - } - return this; - }, - - /** - * Add a directory to the zip file, or search. - * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. - * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. - */ - folder: function(arg) { - if (!arg) { - return this; - } - - if (utils.isRegExp(arg)) { - return this.filter(function(relativePath, file) { - return file.dir && arg.test(relativePath); - }); - } - - // else, name is a new folder - var name = this.root + arg; - var newFolder = folderAdd.call(this, name); - - // Allow chaining by returning a new object with this folder as the root - var ret = this.clone(); - ret.root = newFolder.name; - return ret; - }, - - /** - * Delete a file, or a directory and all sub-files, from the zip - * @param {string} name the name of the file to delete - * @return {JSZip} this JSZip object - */ - remove: function(name) { - name = this.root + name; - var file = this.files[name]; - if (!file) { - // Look for any folders - if (name.slice(-1) != "/") { - name += "/"; - } - file = this.files[name]; - } - - if (file && !file.dir) { - // file - delete this.files[name]; - } else { - // maybe a folder, delete recursively - var kids = this.filter(function(relativePath, file) { - return file.name.slice(0, name.length) === name; - }); - for (var i = 0; i < kids.length; i++) { - delete this.files[kids[i].name]; - } - } - - return this; - }, - - /** - * Generate the complete zip file - * @param {Object} options the options to generate the zip file : - * - base64, (deprecated, use type instead) true to generate base64. - * - compression, "STORE" by default. - * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. - * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file - */ - generate: function(options) { - options = extend(options || {}, { - base64: true, - compression: "STORE", - compressionOptions : null, - type: "base64", - platform: "DOS", - comment: null, - mimeType: 'application/zip' - }); - - utils.checkSupport(options.type); - - // accept nodejs `process.platform` - if( - options.platform === 'darwin' || - options.platform === 'freebsd' || - options.platform === 'linux' || - options.platform === 'sunos' - ) { - options.platform = "UNIX"; - } - if (options.platform === 'win32') { - options.platform = "DOS"; - } - - var zipData = [], - localDirLength = 0, - centralDirLength = 0, - writer, i, - utfEncodedComment = utils.transformTo("string", this.utf8encode(options.comment || this.comment || "")); - - // first, generate all the zip parts. - for (var name in this.files) { - if (!this.files.hasOwnProperty(name)) { - continue; - } - var file = this.files[name]; - - var compressionName = file.options.compression || options.compression.toUpperCase(); - var compression = compressions[compressionName]; - if (!compression) { - throw new Error(compressionName + " is not a valid compression method !"); - } - var compressionOptions = file.options.compressionOptions || options.compressionOptions || {}; - - var compressedObject = generateCompressedObjectFrom.call(this, file, compression, compressionOptions); - - var zipPart = generateZipParts.call(this, name, file, compressedObject, localDirLength, options.platform); - localDirLength += zipPart.fileRecord.length + compressedObject.compressedSize; - centralDirLength += zipPart.dirRecord.length; - zipData.push(zipPart); - } - - var dirEnd = ""; - - // end of central dir signature - dirEnd = signature.CENTRAL_DIRECTORY_END + - // number of this disk - "\x00\x00" + - // number of the disk with the start of the central directory - "\x00\x00" + - // total number of entries in the central directory on this disk - decToHex(zipData.length, 2) + - // total number of entries in the central directory - decToHex(zipData.length, 2) + - // size of the central directory 4 bytes - decToHex(centralDirLength, 4) + - // offset of start of central directory with respect to the starting disk number - decToHex(localDirLength, 4) + - // .ZIP file comment length - decToHex(utfEncodedComment.length, 2) + - // .ZIP file comment - utfEncodedComment; - - - // we have all the parts (and the total length) - // time to create a writer ! - var typeName = options.type.toLowerCase(); - if(typeName==="uint8array"||typeName==="arraybuffer"||typeName==="blob"||typeName==="nodebuffer") { - writer = new Uint8ArrayWriter(localDirLength + centralDirLength + dirEnd.length); - }else{ - writer = new StringWriter(localDirLength + centralDirLength + dirEnd.length); - } - - for (i = 0; i < zipData.length; i++) { - writer.append(zipData[i].fileRecord); - writer.append(zipData[i].compressedObject.compressedContent); - } - for (i = 0; i < zipData.length; i++) { - writer.append(zipData[i].dirRecord); - } - - writer.append(dirEnd); - - var zip = writer.finalize(); - - - - switch(options.type.toLowerCase()) { - // case "zip is an Uint8Array" - case "uint8array" : - case "arraybuffer" : - case "nodebuffer" : - return utils.transformTo(options.type.toLowerCase(), zip); - case "blob" : - return utils.arrayBuffer2Blob(utils.transformTo("arraybuffer", zip), options.mimeType); - // case "zip is a string" - case "base64" : - return (options.base64) ? base64.encode(zip) : zip; - default : // case "string" : - return zip; - } - - }, - - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - crc32: function (input, crc) { - return crc32(input, crc); - }, - - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - utf8encode: function (string) { - return utils.transformTo("string", utf8.utf8encode(string)); - }, - - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - utf8decode: function (input) { - return utf8.utf8decode(input); - } -}; -module.exports = out; - -},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(_dereq_,module,exports){ -'use strict'; -exports.LOCAL_FILE_HEADER = "PK\x03\x04"; -exports.CENTRAL_FILE_HEADER = "PK\x01\x02"; -exports.CENTRAL_DIRECTORY_END = "PK\x05\x06"; -exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07"; -exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06"; -exports.DATA_DESCRIPTOR = "PK\x07\x08"; - -},{}],15:[function(_dereq_,module,exports){ -'use strict'; -var DataReader = _dereq_('./dataReader'); -var utils = _dereq_('./utils'); - -function StringReader(data, optimizedBinaryString) { - this.data = data; - if (!optimizedBinaryString) { - this.data = utils.string2binary(this.data); - } - this.length = this.data.length; - this.index = 0; -} -StringReader.prototype = new DataReader(); -/** - * @see DataReader.byteAt - */ -StringReader.prototype.byteAt = function(i) { - return this.data.charCodeAt(i); -}; -/** - * @see DataReader.lastIndexOfSignature - */ -StringReader.prototype.lastIndexOfSignature = function(sig) { - return this.data.lastIndexOf(sig); -}; -/** - * @see DataReader.readData - */ -StringReader.prototype.readData = function(size) { - this.checkOffset(size); - // this will work because the constructor applied the "& 0xff" mask. - var result = this.data.slice(this.index, this.index + size); - this.index += size; - return result; -}; -module.exports = StringReader; - -},{"./dataReader":5,"./utils":21}],16:[function(_dereq_,module,exports){ -'use strict'; - -var utils = _dereq_('./utils'); - -/** - * An object to write any content to a string. - * @constructor - */ -var StringWriter = function() { - this.data = []; -}; -StringWriter.prototype = { - /** - * Append any content to the current string. - * @param {Object} input the content to add. - */ - append: function(input) { - input = utils.transformTo("string", input); - this.data.push(input); - }, - /** - * Finalize the construction an return the result. - * @return {string} the generated string. - */ - finalize: function() { - return this.data.join(""); - } -}; - -module.exports = StringWriter; - -},{"./utils":21}],17:[function(_dereq_,module,exports){ -(function (Buffer){ -'use strict'; -exports.base64 = true; -exports.array = true; -exports.string = true; -exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; -// contains true if JSZip can read/generate nodejs Buffer, false otherwise. -// Browserify will provide a Buffer implementation for browsers, which is -// an augmented Uint8Array (i.e., can be used as either Buffer or U8). -exports.nodebuffer = typeof Buffer !== "undefined"; -// contains true if JSZip can read/generate Uint8Array, false otherwise. -exports.uint8array = typeof Uint8Array !== "undefined"; - -if (typeof ArrayBuffer === "undefined") { - exports.blob = false; -} -else { - var buffer = new ArrayBuffer(0); - try { - exports.blob = new Blob([buffer], { - type: "application/zip" - }).size === 0; - } - catch (e) { - try { - var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder; - var builder = new Builder(); - builder.append(buffer); - exports.blob = builder.getBlob('application/zip').size === 0; - } - catch (e) { - exports.blob = false; - } - } -} - -}).call(this,(typeof Buffer !== "undefined" ? Buffer : undefined)) -},{}],18:[function(_dereq_,module,exports){ -'use strict'; -var DataReader = _dereq_('./dataReader'); - -function Uint8ArrayReader(data) { - if (data) { - this.data = data; - this.length = this.data.length; - this.index = 0; - } -} -Uint8ArrayReader.prototype = new DataReader(); -/** - * @see DataReader.byteAt - */ -Uint8ArrayReader.prototype.byteAt = function(i) { - return this.data[i]; -}; -/** - * @see DataReader.lastIndexOfSignature - */ -Uint8ArrayReader.prototype.lastIndexOfSignature = function(sig) { - var sig0 = sig.charCodeAt(0), - sig1 = sig.charCodeAt(1), - sig2 = sig.charCodeAt(2), - sig3 = sig.charCodeAt(3); - for (var i = this.length - 4; i >= 0; --i) { - if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) { - return i; - } - } - - return -1; -}; -/** - * @see DataReader.readData - */ -Uint8ArrayReader.prototype.readData = function(size) { - this.checkOffset(size); - if(size === 0) { - // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of []. - return new Uint8Array(0); - } - var result = this.data.subarray(this.index, this.index + size); - this.index += size; - return result; -}; -module.exports = Uint8ArrayReader; - -},{"./dataReader":5}],19:[function(_dereq_,module,exports){ -'use strict'; - -var utils = _dereq_('./utils'); - -/** - * An object to write any content to an Uint8Array. - * @constructor - * @param {number} length The length of the array. - */ -var Uint8ArrayWriter = function(length) { - this.data = new Uint8Array(length); - this.index = 0; -}; -Uint8ArrayWriter.prototype = { - /** - * Append any content to the current array. - * @param {Object} input the content to add. - */ - append: function(input) { - if (input.length !== 0) { - // with an empty Uint8Array, Opera fails with a "Offset larger than array size" - input = utils.transformTo("uint8array", input); - this.data.set(input, this.index); - this.index += input.length; - } - }, - /** - * Finalize the construction an return the result. - * @return {Uint8Array} the generated array. - */ - finalize: function() { - return this.data; - } -}; - -module.exports = Uint8ArrayWriter; - -},{"./utils":21}],20:[function(_dereq_,module,exports){ -'use strict'; - -var utils = _dereq_('./utils'); -var support = _dereq_('./support'); -var nodeBuffer = _dereq_('./nodeBuffer'); - -/** - * The following functions come from pako, from pako/lib/utils/strings - * released under the MIT license, see pako https://github.com/nodeca/pako/ - */ - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new Array(256); -for (var i=0; i<256; i++) { - _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - -// convert string to array (typed, when possible) -var string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - if (support.uint8array) { - buf = new Uint8Array(buf_len); - } else { - buf = new Array(buf_len); - } - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -var utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -// convert array to string -var buf2string = function (buf) { - var str, i, out, c, c_len; - var len = buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - // shrinkBuf(utf16buf, out) - if (utf16buf.length !== out) { - if(utf16buf.subarray) { - utf16buf = utf16buf.subarray(0, out); - } else { - utf16buf.length = out; - } - } - - // return String.fromCharCode.apply(null, utf16buf); - return utils.applyFromCharCode(utf16buf); -}; - - -// That's all for the pako functions. - - -/** - * Transform a javascript string into an array (typed if possible) of bytes, - * UTF-8 encoded. - * @param {String} str the string to encode - * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string. - */ -exports.utf8encode = function utf8encode(str) { - if (support.nodebuffer) { - return nodeBuffer(str, "utf-8"); - } - - return string2buf(str); -}; - - -/** - * Transform a bytes array (or a representation) representing an UTF-8 encoded - * string into a javascript string. - * @param {Array|Uint8Array|Buffer} buf the data de decode - * @return {String} the decoded string. - */ -exports.utf8decode = function utf8decode(buf) { - if (support.nodebuffer) { - return utils.transformTo("nodebuffer", buf).toString("utf-8"); - } - - buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf); - - // return buf2string(buf); - // Chrome prefers to work with "small" chunks of data - // for the method buf2string. - // Firefox and Chrome has their own shortcut, IE doesn't seem to really care. - var result = [], k = 0, len = buf.length, chunk = 65536; - while (k < len) { - var nextBoundary = utf8border(buf, Math.min(k + chunk, len)); - if (support.uint8array) { - result.push(buf2string(buf.subarray(k, nextBoundary))); - } else { - result.push(buf2string(buf.slice(k, nextBoundary))); - } - k = nextBoundary; - } - return result.join(""); - -}; -// vim: set shiftwidth=4 softtabstop=4: - -},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(_dereq_,module,exports){ -'use strict'; -var support = _dereq_('./support'); -var compressions = _dereq_('./compressions'); -var nodeBuffer = _dereq_('./nodeBuffer'); -/** - * Convert a string to a "binary string" : a string containing only char codes between 0 and 255. - * @param {string} str the string to transform. - * @return {String} the binary string. - */ -exports.string2binary = function(str) { - var result = ""; - for (var i = 0; i < str.length; i++) { - result += String.fromCharCode(str.charCodeAt(i) & 0xff); - } - return result; -}; -exports.arrayBuffer2Blob = function(buffer, mimeType) { - exports.checkSupport("blob"); - mimeType = mimeType || 'application/zip'; - - try { - // Blob constructor - return new Blob([buffer], { - type: mimeType - }); - } - catch (e) { - - try { - // deprecated, browser only, old way - var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder; - var builder = new Builder(); - builder.append(buffer); - return builder.getBlob(mimeType); - } - catch (e) { - - // well, fuck ?! - throw new Error("Bug : can't construct the Blob."); - } - } - - -}; -/** - * The identity function. - * @param {Object} input the input. - * @return {Object} the same input. - */ -function identity(input) { - return input; -} - -/** - * Fill in an array with a string. - * @param {String} str the string to use. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated). - * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array. - */ -function stringToArrayLike(str, array) { - for (var i = 0; i < str.length; ++i) { - array[i] = str.charCodeAt(i) & 0xFF; - } - return array; -} - -/** - * Transform an array-like object to a string. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. - * @return {String} the result. - */ -function arrayLikeToString(array) { - // Performances notes : - // -------------------- - // String.fromCharCode.apply(null, array) is the fastest, see - // see http://jsperf.com/converting-a-uint8array-to-a-string/2 - // but the stack is limited (and we can get huge arrays !). - // - // result += String.fromCharCode(array[i]); generate too many strings ! - // - // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2 - var chunk = 65536; - var result = [], - len = array.length, - type = exports.getTypeOf(array), - k = 0, - canUseApply = true; - try { - switch(type) { - case "uint8array": - String.fromCharCode.apply(null, new Uint8Array(0)); - break; - case "nodebuffer": - String.fromCharCode.apply(null, nodeBuffer(0)); - break; - } - } catch(e) { - canUseApply = false; - } - - // no apply : slow and painful algorithm - // default browser on android 4.* - if (!canUseApply) { - var resultStr = ""; - for(var i = 0; i < array.length;i++) { - resultStr += String.fromCharCode(array[i]); - } - return resultStr; - } - while (k < len && chunk > 1) { - try { - if (type === "array" || type === "nodebuffer") { - result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len)))); - } - else { - result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len)))); - } - k += chunk; - } - catch (e) { - chunk = Math.floor(chunk / 2); - } - } - return result.join(""); -} - -exports.applyFromCharCode = arrayLikeToString; - - -/** - * Copy the data from an array-like to an other array-like. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated. - * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array. - */ -function arrayLikeToArrayLike(arrayFrom, arrayTo) { - for (var i = 0; i < arrayFrom.length; i++) { - arrayTo[i] = arrayFrom[i]; - } - return arrayTo; -} - -// a matrix containing functions to transform everything into everything. -var transform = {}; - -// string to ? -transform["string"] = { - "string": identity, - "array": function(input) { - return stringToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return transform["string"]["uint8array"](input).buffer; - }, - "uint8array": function(input) { - return stringToArrayLike(input, new Uint8Array(input.length)); - }, - "nodebuffer": function(input) { - return stringToArrayLike(input, nodeBuffer(input.length)); - } -}; - -// array to ? -transform["array"] = { - "string": arrayLikeToString, - "array": identity, - "arraybuffer": function(input) { - return (new Uint8Array(input)).buffer; - }, - "uint8array": function(input) { - return new Uint8Array(input); - }, - "nodebuffer": function(input) { - return nodeBuffer(input); - } -}; - -// arraybuffer to ? -transform["arraybuffer"] = { - "string": function(input) { - return arrayLikeToString(new Uint8Array(input)); - }, - "array": function(input) { - return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength)); - }, - "arraybuffer": identity, - "uint8array": function(input) { - return new Uint8Array(input); - }, - "nodebuffer": function(input) { - return nodeBuffer(new Uint8Array(input)); - } -}; - -// uint8array to ? -transform["uint8array"] = { - "string": arrayLikeToString, - "array": function(input) { - return arrayLikeToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return input.buffer; - }, - "uint8array": identity, - "nodebuffer": function(input) { - return nodeBuffer(input); - } -}; - -// nodebuffer to ? -transform["nodebuffer"] = { - "string": arrayLikeToString, - "array": function(input) { - return arrayLikeToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return transform["nodebuffer"]["uint8array"](input).buffer; - }, - "uint8array": function(input) { - return arrayLikeToArrayLike(input, new Uint8Array(input.length)); - }, - "nodebuffer": identity -}; - -/** - * Transform an input into any type. - * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer. - * If no output type is specified, the unmodified input will be returned. - * @param {String} outputType the output type. - * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert. - * @throws {Error} an Error if the browser doesn't support the requested output type. - */ -exports.transformTo = function(outputType, input) { - if (!input) { - // undefined, null, etc - // an empty string won't harm. - input = ""; - } - if (!outputType) { - return input; - } - exports.checkSupport(outputType); - var inputType = exports.getTypeOf(input); - var result = transform[inputType][outputType](input); - return result; -}; - -/** - * Return the type of the input. - * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer. - * @param {Object} input the input to identify. - * @return {String} the (lowercase) type of the input. - */ -exports.getTypeOf = function(input) { - if (typeof input === "string") { - return "string"; - } - if (Object.prototype.toString.call(input) === "[object Array]") { - return "array"; - } - if (support.nodebuffer && nodeBuffer.test(input)) { - return "nodebuffer"; - } - if (support.uint8array && input instanceof Uint8Array) { - return "uint8array"; - } - if (support.arraybuffer && input instanceof ArrayBuffer) { - return "arraybuffer"; - } -}; - -/** - * Throw an exception if the type is not supported. - * @param {String} type the type to check. - * @throws {Error} an Error if the browser doesn't support the requested type. - */ -exports.checkSupport = function(type) { - var supported = support[type.toLowerCase()]; - if (!supported) { - throw new Error(type + " is not supported by this browser"); - } -}; -exports.MAX_VALUE_16BITS = 65535; -exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1 - -/** - * Prettify a string read as binary. - * @param {string} str the string to prettify. - * @return {string} a pretty string. - */ -exports.pretty = function(str) { - var res = '', - code, i; - for (i = 0; i < (str || "").length; i++) { - code = str.charCodeAt(i); - res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase(); - } - return res; -}; - -/** - * Find a compression registered in JSZip. - * @param {string} compressionMethod the method magic to find. - * @return {Object|null} the JSZip compression object, null if none found. - */ -exports.findCompression = function(compressionMethod) { - for (var method in compressions) { - if (!compressions.hasOwnProperty(method)) { - continue; - } - if (compressions[method].magic === compressionMethod) { - return compressions[method]; - } - } - return null; -}; -/** -* Cross-window, cross-Node-context regular expression detection -* @param {Object} object Anything -* @return {Boolean} true if the object is a regular expression, -* false otherwise -*/ -exports.isRegExp = function (object) { - return Object.prototype.toString.call(object) === "[object RegExp]"; -}; - - -},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(_dereq_,module,exports){ -'use strict'; -var StringReader = _dereq_('./stringReader'); -var NodeBufferReader = _dereq_('./nodeBufferReader'); -var Uint8ArrayReader = _dereq_('./uint8ArrayReader'); -var utils = _dereq_('./utils'); -var sig = _dereq_('./signature'); -var ZipEntry = _dereq_('./zipEntry'); -var support = _dereq_('./support'); -var jszipProto = _dereq_('./object'); -// class ZipEntries {{{ -/** - * All the entries in the zip file. - * @constructor - * @param {String|ArrayBuffer|Uint8Array} data the binary stream to load. - * @param {Object} loadOptions Options for loading the stream. - */ -function ZipEntries(data, loadOptions) { - this.files = []; - this.loadOptions = loadOptions; - if (data) { - this.load(data); - } -} -ZipEntries.prototype = { - /** - * Check that the reader is on the speficied signature. - * @param {string} expectedSignature the expected signature. - * @throws {Error} if it is an other signature. - */ - checkSignature: function(expectedSignature) { - var signature = this.reader.readString(4); - if (signature !== expectedSignature) { - throw new Error("Corrupted zip or bug : unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")"); - } - }, - /** - * Read the end of the central directory. - */ - readBlockEndOfCentral: function() { - this.diskNumber = this.reader.readInt(2); - this.diskWithCentralDirStart = this.reader.readInt(2); - this.centralDirRecordsOnThisDisk = this.reader.readInt(2); - this.centralDirRecords = this.reader.readInt(2); - this.centralDirSize = this.reader.readInt(4); - this.centralDirOffset = this.reader.readInt(4); - - this.zipCommentLength = this.reader.readInt(2); - // warning : the encoding depends of the system locale - // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded. - // On a windows machine, this field is encoded with the localized windows code page. - this.zipComment = this.reader.readString(this.zipCommentLength); - // To get consistent behavior with the generation part, we will assume that - // this is utf8 encoded. - this.zipComment = jszipProto.utf8decode(this.zipComment); - }, - /** - * Read the end of the Zip 64 central directory. - * Not merged with the method readEndOfCentral : - * The end of central can coexist with its Zip64 brother, - * I don't want to read the wrong number of bytes ! - */ - readBlockZip64EndOfCentral: function() { - this.zip64EndOfCentralSize = this.reader.readInt(8); - this.versionMadeBy = this.reader.readString(2); - this.versionNeeded = this.reader.readInt(2); - this.diskNumber = this.reader.readInt(4); - this.diskWithCentralDirStart = this.reader.readInt(4); - this.centralDirRecordsOnThisDisk = this.reader.readInt(8); - this.centralDirRecords = this.reader.readInt(8); - this.centralDirSize = this.reader.readInt(8); - this.centralDirOffset = this.reader.readInt(8); - - this.zip64ExtensibleData = {}; - var extraDataSize = this.zip64EndOfCentralSize - 44, - index = 0, - extraFieldId, - extraFieldLength, - extraFieldValue; - while (index < extraDataSize) { - extraFieldId = this.reader.readInt(2); - extraFieldLength = this.reader.readInt(4); - extraFieldValue = this.reader.readString(extraFieldLength); - this.zip64ExtensibleData[extraFieldId] = { - id: extraFieldId, - length: extraFieldLength, - value: extraFieldValue - }; - } - }, - /** - * Read the end of the Zip 64 central directory locator. - */ - readBlockZip64EndOfCentralLocator: function() { - this.diskWithZip64CentralDirStart = this.reader.readInt(4); - this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8); - this.disksCount = this.reader.readInt(4); - if (this.disksCount > 1) { - throw new Error("Multi-volumes zip are not supported"); - } - }, - /** - * Read the local files, based on the offset read in the central part. - */ - readLocalFiles: function() { - var i, file; - for (i = 0; i < this.files.length; i++) { - file = this.files[i]; - this.reader.setIndex(file.localHeaderOffset); - this.checkSignature(sig.LOCAL_FILE_HEADER); - file.readLocalPart(this.reader); - file.handleUTF8(); - file.processAttributes(); - } - }, - /** - * Read the central directory. - */ - readCentralDir: function() { - var file; - - this.reader.setIndex(this.centralDirOffset); - while (this.reader.readString(4) === sig.CENTRAL_FILE_HEADER) { - file = new ZipEntry({ - zip64: this.zip64 - }, this.loadOptions); - file.readCentralPart(this.reader); - this.files.push(file); - } - }, - /** - * Read the end of central directory. - */ - readEndOfCentral: function() { - var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END); - if (offset === -1) { - // Check if the content is a truncated zip or complete garbage. - // A "LOCAL_FILE_HEADER" is not required at the beginning (auto - // extractible zip for example) but it can give a good hint. - // If an ajax request was used without responseType, we will also - // get unreadable data. - var isGarbage = true; - try { - this.reader.setIndex(0); - this.checkSignature(sig.LOCAL_FILE_HEADER); - isGarbage = false; - } catch (e) {} - - if (isGarbage) { - throw new Error("Can't find end of central directory : is this a zip file ? " + - "If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"); - } else { - throw new Error("Corrupted zip : can't find end of central directory"); - } - } - this.reader.setIndex(offset); - this.checkSignature(sig.CENTRAL_DIRECTORY_END); - this.readBlockEndOfCentral(); - - - /* extract from the zip spec : - 4) If one of the fields in the end of central directory - record is too small to hold required data, the field - should be set to -1 (0xFFFF or 0xFFFFFFFF) and the - ZIP64 format record should be created. - 5) The end of central directory record and the - Zip64 end of central directory locator record must - reside on the same disk when splitting or spanning - an archive. - */ - if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) { - this.zip64 = true; - - /* - Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from - the zip file can fit into a 32bits integer. This cannot be solved : Javascript represents - all numbers as 64-bit double precision IEEE 754 floating point numbers. - So, we have 53bits for integers and bitwise operations treat everything as 32bits. - see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators - and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5 - */ - - // should look for a zip64 EOCD locator - offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); - if (offset === -1) { - throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator"); - } - this.reader.setIndex(offset); - this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); - this.readBlockZip64EndOfCentralLocator(); - - // now the zip64 EOCD record - this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir); - this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); - this.readBlockZip64EndOfCentral(); - } - }, - prepareReader: function(data) { - var type = utils.getTypeOf(data); - if (type === "string" && !support.uint8array) { - this.reader = new StringReader(data, this.loadOptions.optimizedBinaryString); - } - else if (type === "nodebuffer") { - this.reader = new NodeBufferReader(data); - } - else { - this.reader = new Uint8ArrayReader(utils.transformTo("uint8array", data)); - } - }, - /** - * Read a zip file and create ZipEntries. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. - */ - load: function(data) { - this.prepareReader(data); - this.readEndOfCentral(); - this.readCentralDir(); - this.readLocalFiles(); - } -}; -// }}} end of ZipEntries -module.exports = ZipEntries; - -},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(_dereq_,module,exports){ -'use strict'; -var StringReader = _dereq_('./stringReader'); -var utils = _dereq_('./utils'); -var CompressedObject = _dereq_('./compressedObject'); -var jszipProto = _dereq_('./object'); - -var MADE_BY_DOS = 0x00; -var MADE_BY_UNIX = 0x03; - -// class ZipEntry {{{ -/** - * An entry in the zip file. - * @constructor - * @param {Object} options Options of the current file. - * @param {Object} loadOptions Options for loading the stream. - */ -function ZipEntry(options, loadOptions) { - this.options = options; - this.loadOptions = loadOptions; -} -ZipEntry.prototype = { - /** - * say if the file is encrypted. - * @return {boolean} true if the file is encrypted, false otherwise. - */ - isEncrypted: function() { - // bit 1 is set - return (this.bitFlag & 0x0001) === 0x0001; - }, - /** - * say if the file has utf-8 filename/comment. - * @return {boolean} true if the filename/comment is in utf-8, false otherwise. - */ - useUTF8: function() { - // bit 11 is set - return (this.bitFlag & 0x0800) === 0x0800; - }, - /** - * Prepare the function used to generate the compressed content from this ZipFile. - * @param {DataReader} reader the reader to use. - * @param {number} from the offset from where we should read the data. - * @param {number} length the length of the data to read. - * @return {Function} the callback to get the compressed content (the type depends of the DataReader class). - */ - prepareCompressedContent: function(reader, from, length) { - return function() { - var previousIndex = reader.index; - reader.setIndex(from); - var compressedFileData = reader.readData(length); - reader.setIndex(previousIndex); - - return compressedFileData; - }; - }, - /** - * Prepare the function used to generate the uncompressed content from this ZipFile. - * @param {DataReader} reader the reader to use. - * @param {number} from the offset from where we should read the data. - * @param {number} length the length of the data to read. - * @param {JSZip.compression} compression the compression used on this file. - * @param {number} uncompressedSize the uncompressed size to expect. - * @return {Function} the callback to get the uncompressed content (the type depends of the DataReader class). - */ - prepareContent: function(reader, from, length, compression, uncompressedSize) { - return function() { - - var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent()); - var uncompressedFileData = compression.uncompress(compressedFileData); - - if (uncompressedFileData.length !== uncompressedSize) { - throw new Error("Bug : uncompressed data size mismatch"); - } - - return uncompressedFileData; - }; - }, - /** - * Read the local part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readLocalPart: function(reader) { - var compression, localExtraFieldsLength; - - // we already know everything from the central dir ! - // If the central dir data are false, we are doomed. - // On the bright side, the local part is scary : zip64, data descriptors, both, etc. - // The less data we get here, the more reliable this should be. - // Let's skip the whole header and dash to the data ! - reader.skip(22); - // in some zip created on windows, the filename stored in the central dir contains \ instead of /. - // Strangely, the filename here is OK. - // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes - // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators... - // Search "unzip mismatching "local" filename continuing with "central" filename version" on - // the internet. - // - // I think I see the logic here : the central directory is used to display - // content and the local directory is used to extract the files. Mixing / and \ - // may be used to display \ to windows users and use / when extracting the files. - // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394 - this.fileNameLength = reader.readInt(2); - localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir - this.fileName = reader.readString(this.fileNameLength); - reader.skip(localExtraFieldsLength); - - if (this.compressedSize == -1 || this.uncompressedSize == -1) { - throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize == -1 || uncompressedSize == -1)"); - } - - compression = utils.findCompression(this.compressionMethod); - if (compression === null) { // no compression found - throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + this.fileName + ")"); - } - this.decompressed = new CompressedObject(); - this.decompressed.compressedSize = this.compressedSize; - this.decompressed.uncompressedSize = this.uncompressedSize; - this.decompressed.crc32 = this.crc32; - this.decompressed.compressionMethod = this.compressionMethod; - this.decompressed.getCompressedContent = this.prepareCompressedContent(reader, reader.index, this.compressedSize, compression); - this.decompressed.getContent = this.prepareContent(reader, reader.index, this.compressedSize, compression, this.uncompressedSize); - - // we need to compute the crc32... - if (this.loadOptions.checkCRC32) { - this.decompressed = utils.transformTo("string", this.decompressed.getContent()); - if (jszipProto.crc32(this.decompressed) !== this.crc32) { - throw new Error("Corrupted zip : CRC32 mismatch"); - } - } - }, - - /** - * Read the central part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readCentralPart: function(reader) { - this.versionMadeBy = reader.readInt(2); - this.versionNeeded = reader.readInt(2); - this.bitFlag = reader.readInt(2); - this.compressionMethod = reader.readString(2); - this.date = reader.readDate(); - this.crc32 = reader.readInt(4); - this.compressedSize = reader.readInt(4); - this.uncompressedSize = reader.readInt(4); - this.fileNameLength = reader.readInt(2); - this.extraFieldsLength = reader.readInt(2); - this.fileCommentLength = reader.readInt(2); - this.diskNumberStart = reader.readInt(2); - this.internalFileAttributes = reader.readInt(2); - this.externalFileAttributes = reader.readInt(4); - this.localHeaderOffset = reader.readInt(4); - - if (this.isEncrypted()) { - throw new Error("Encrypted zip are not supported"); - } - - this.fileName = reader.readString(this.fileNameLength); - this.readExtraFields(reader); - this.parseZIP64ExtraField(reader); - this.fileComment = reader.readString(this.fileCommentLength); - }, - - /** - * Parse the external file attributes and get the unix/dos permissions. - */ - processAttributes: function () { - this.unixPermissions = null; - this.dosPermissions = null; - var madeBy = this.versionMadeBy >> 8; - - // Check if we have the DOS directory flag set. - // We look for it in the DOS and UNIX permissions - // but some unknown platform could set it as a compatibility flag. - this.dir = this.externalFileAttributes & 0x0010 ? true : false; - - if(madeBy === MADE_BY_DOS) { - // first 6 bits (0 to 5) - this.dosPermissions = this.externalFileAttributes & 0x3F; - } - - if(madeBy === MADE_BY_UNIX) { - this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF; - // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8); - } - - // fail safe : if the name ends with a / it probably means a folder - if (!this.dir && this.fileName.slice(-1) === '/') { - this.dir = true; - } - }, - - /** - * Parse the ZIP64 extra field and merge the info in the current ZipEntry. - * @param {DataReader} reader the reader to use. - */ - parseZIP64ExtraField: function(reader) { - - if (!this.extraFields[0x0001]) { - return; - } - - // should be something, preparing the extra reader - var extraReader = new StringReader(this.extraFields[0x0001].value); - - // I really hope that these 64bits integer can fit in 32 bits integer, because js - // won't let us have more. - if (this.uncompressedSize === utils.MAX_VALUE_32BITS) { - this.uncompressedSize = extraReader.readInt(8); - } - if (this.compressedSize === utils.MAX_VALUE_32BITS) { - this.compressedSize = extraReader.readInt(8); - } - if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) { - this.localHeaderOffset = extraReader.readInt(8); - } - if (this.diskNumberStart === utils.MAX_VALUE_32BITS) { - this.diskNumberStart = extraReader.readInt(4); - } - }, - /** - * Read the central part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readExtraFields: function(reader) { - var start = reader.index, - extraFieldId, - extraFieldLength, - extraFieldValue; - - this.extraFields = this.extraFields || {}; - - while (reader.index < start + this.extraFieldsLength) { - extraFieldId = reader.readInt(2); - extraFieldLength = reader.readInt(2); - extraFieldValue = reader.readString(extraFieldLength); - - this.extraFields[extraFieldId] = { - id: extraFieldId, - length: extraFieldLength, - value: extraFieldValue - }; - } - }, - /** - * Apply an UTF8 transformation if needed. - */ - handleUTF8: function() { - if (this.useUTF8()) { - this.fileName = jszipProto.utf8decode(this.fileName); - this.fileComment = jszipProto.utf8decode(this.fileComment); - } else { - var upath = this.findExtraFieldUnicodePath(); - if (upath !== null) { - this.fileName = upath; - } - var ucomment = this.findExtraFieldUnicodeComment(); - if (ucomment !== null) { - this.fileComment = ucomment; - } - } - }, - - /** - * Find the unicode path declared in the extra field, if any. - * @return {String} the unicode path, null otherwise. - */ - findExtraFieldUnicodePath: function() { - var upathField = this.extraFields[0x7075]; - if (upathField) { - var extraReader = new StringReader(upathField.value); - - // wrong version - if (extraReader.readInt(1) !== 1) { - return null; - } - - // the crc of the filename changed, this field is out of date. - if (jszipProto.crc32(this.fileName) !== extraReader.readInt(4)) { - return null; - } - - return jszipProto.utf8decode(extraReader.readString(upathField.length - 5)); - } - return null; - }, - - /** - * Find the unicode comment declared in the extra field, if any. - * @return {String} the unicode comment, null otherwise. - */ - findExtraFieldUnicodeComment: function() { - var ucommentField = this.extraFields[0x6375]; - if (ucommentField) { - var extraReader = new StringReader(ucommentField.value); - - // wrong version - if (extraReader.readInt(1) !== 1) { - return null; - } - - // the crc of the comment changed, this field is out of date. - if (jszipProto.crc32(this.fileComment) !== extraReader.readInt(4)) { - return null; - } - - return jszipProto.utf8decode(extraReader.readString(ucommentField.length - 5)); - } - return null; - } -}; -module.exports = ZipEntry; - -},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(_dereq_,module,exports){ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = _dereq_('./lib/utils/common').assign; - -var deflate = _dereq_('./lib/deflate'); -var inflate = _dereq_('./lib/inflate'); -var constants = _dereq_('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; -},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(_dereq_,module,exports){ -'use strict'; - - -var zlib_deflate = _dereq_('./zlib/deflate.js'); -var utils = _dereq_('./utils/common'); -var strings = _dereq_('./utils/strings'); -var msg = _dereq_('./zlib/messages'); -var zstream = _dereq_('./zlib/zstream'); - - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -var Deflate = function(options) { - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } -}; - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|String): input data. Strings will be converted to - * utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That flush internal pending buffers and call - * [[Deflate#onEnd]]. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && _mode === Z_FINISH)) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that input stream complete - * or error happenned. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function(status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate alrorythm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; -},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(_dereq_,module,exports){ -'use strict'; - - -var zlib_inflate = _dereq_('./zlib/inflate.js'); -var utils = _dereq_('./utils/common'); -var strings = _dereq_('./utils/strings'); -var c = _dereq_('./zlib/constants'); -var msg = _dereq_('./zlib/messages'); -var zstream = _dereq_('./zlib/zstream'); -var gzheader = _dereq_('./zlib/gzheader'); - - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -var Inflate = function(options) { - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new gzheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -}; - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That flush internal pending buffers and call - * [[Inflate#onEnd]]. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - var next_out_utf8, tail, utf8str; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && _mode === c.Z_FINISH)) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell inflate that input stream complete - * or error happenned. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function(status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(_dereq_,module,exports){ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof(source) !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (source.hasOwnProperty(p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs+len), dest_offs); - return; - } - // Fallback to ordinary array - for(var i=0; i= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for(var i=0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function(buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function(str) { - var buf = new utils.Buf8(str.length); - for(var i=0, len=buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":27}],29:[function(_dereq_,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0 - , s2 = ((adler >>> 16) & 0xffff) |0 - , n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; -},{}],30:[function(_dereq_,module,exports){ -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; -},{}],31:[function(_dereq_,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for(var n =0; n < 256; n++){ - c = n; - for(var k =0; k < 8; k++){ - c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable - , end = pos + len; - - crc = crc ^ (-1); - - for (var i = pos; i < end; i++ ) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; -},{}],32:[function(_dereq_,module,exports){ -'use strict'; - -var utils = _dereq_('../utils/common'); -var trees = _dereq_('./trees'); -var adler32 = _dereq_('./adler32'); -var crc32 = _dereq_('./crc32'); -var msg = _dereq_('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only (s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH-1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length-1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH-1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -var Config = function (good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -}; - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2*D_CODES+1) * 2); - this.bl_tree = new utils.Buf16((2*BL_CODES+1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS+1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2*L_CODES+1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - s.d_buf = s.lit_bufsize >> 1; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg){ - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state - */ -//function deflateCopy(dest, source) { -// -//} - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ -},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(_dereq_,module,exports){ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; -},{}],34:[function(_dereq_,module,exports){ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - var window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],35:[function(_dereq_,module,exports){ -'use strict'; - - -var utils = _dereq_('../utils/common'); -var adler32 = _dereq_('./adler32'); -var crc32 = _dereq_('./crc32'); -var inflate_fast = _dereq_('./inffast'); -var inflate_table = _dereq_('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function ZSWAP32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {bits: 9}); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {bits: 5}); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window,src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window,src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = ZSWAP32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = {bits: state.lenbits}; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = {bits: state.lenbits}; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = {bits: state.distbits}; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) -1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too - if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ -},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(_dereq_,module,exports){ -'use strict'; - - -var utils = _dereq_('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i=0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":27}],37:[function(_dereq_,module,exports){ -'use strict'; - -module.exports = { - '2': 'need dictionary', /* Z_NEED_DICT 2 */ - '1': 'stream end', /* Z_STREAM_END 1 */ - '0': '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; -},{}],38:[function(_dereq_,module,exports){ -'use strict'; - - -var utils = _dereq_('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES+2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH-MIN_MATCH+1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -}; - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -var TreeDesc = function(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -}; - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short (s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max+1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n*2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n-base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length-1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits+1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m*2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/; - tree[m*2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for ( ; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n*2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n*2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n*2 + 1]/*.Len*/ = 5; - static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n*2; - var _m2 = m*2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j+1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code+LITERALS+1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n*2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node*2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6*2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10*2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138*2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count-3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count-3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count-11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3*(max_blindex+1) + 5+5+4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes-1, 5); - send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len+3+7) >>> 3; - static_lenb = (s.static_len+3+7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len+4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc*2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize-1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; -},{"../utils/common":27}],39:[function(_dereq_,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; -},{}]},{},[9]) -(9) -}); \ No newline at end of file diff --git a/src/lib/languages.js b/src/lib/languages.js deleted file mode 100644 index ababe35..0000000 --- a/src/lib/languages.js +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) 2017 Matthew Brennan Jones -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - - -const g_i18n_storage = { - "A touch friendly HTML5 comic book reader that reads CBR, CBZ, CBT, and PDF files.": { - "ar": "لمسة ودية HTML5 قارئ الكتاب الهزلي الذي يقرأ كبر، كبز، كبت، وملفات بدف.", - "de": "Ein berührungsfreier HTML5-Comic-Leser, der CBR-, CBZ-, CBT- und PDF-Dateien liest.", - "es": "Un lector de cómics HTML5 amigable al tacto que lee CBR, CBZ, CBT y archivos PDF", - "fr": "Un lecteur de bande dessinée HTML5 convivial qui lit les fichiers CBR, CBZ, CBT et PDF.", - "ja": "CBR、CBZ、CBT、およびPDFファイルを読み取るタッチフレンドリーなHTML5コミックブックリーダーです。", - "pt": "Um leitor de quadrinhos HTML5 amigável ao toque que lê os arquivos CBR, CBZ, CBT e PDF.", - "ru": "Удобный в обращении читатель комиксов HTML5, который читает файлы CBR, CBZ, CBT и PDF.", - "zh": "一个触摸友好的HTML5漫画书阅读器,读取CBR,CBZ,CBT和PDF文件。", - }, - "Allow right click": { - "ar": "السماح بالنقر بزر الماوس الأيمن", - "de": "Klicken Sie mit der rechten Maustaste", - "es": "Permitir clic derecho", - "fr": "Autoriser le clic droit", - "ja": "右クリックを許可する", - "pt": "Permitir clique direito", - "ru": "Разрешить правый щелчок", - "zh": "允许右键单击", - }, - "Archive contains no images.": { - "ar": "لا يحتوي الأرشيف على أية صور.", - "de": "Archiv enthält keine Bilder.", - "es": "El archivo no contiene imágenes.", - "fr": "Archive ne contient aucune image.", - "ja": "アーカイブに画像がありません。", - "pt": "O arquivo não contém imagens.", - "ru": "Архив не содержит изображений.", - "zh": "存档不包含图像。", - }, - "Check for updates": { - "ar": "تحقق من التحديثات", - "de": "Auf Updates prüfen", - "es": "Buscar actualizaciones", - "fr": "Vérifier les mises à jour", - "ja": "アップデートを確認", - "pt": "Verifique atualizações", - "ru": "Проверить наличие обновлений", - "zh": "检查更新", - }, - "Check for updates now": { - "ar": "تحقق من وجود تحديثات الآن", - "de": "Überprüfen Sie jetzt auf Updates", - "es": "Buscar actualizaciones ahora", - "fr": "Vérifier les mises à jour", - "ja": "今すぐ更新を確認する", - "pt": "Verifique se há atualizações agora", - "ru": "Проверить наличие обновлений", - "zh": "现在检查更新", - }, - "Clear all data": { - "ar": "محو جميع البيانات", - "de": "Löschen Sie alle Daten", - "es": "Borrar todos los datos", - "fr": "Effacer toutes les données", - "ja": "すべてのデータを消去する", - "pt": "Limpe todos os dados", - "ru": "Очистить все данные", - "zh": "清除所有数据", - }, - "Comic Book Reader": { - "ar": "قارئ الكتاب الهزلي", - "de": "Comic-Leser", - "es": "Lector de Cómic", - "fr": "Lecteur de bande dessinée", - "ja": "コミックブックリーダー", - "pt": "Leitor de quadrinhos", - "ru": "Читатель комиксов", - "zh": "漫画书阅读器", - }, - "Done clearing all data": { - "ar": "تم محو جميع البيانات", - "de": "Löschen aller Daten", - "es": "Hecho borrar todos los datos", - "fr": "Terminé de supprimer toutes les données", - "ja": "すべてのデータの消去を完了", - "pt": "Feito eliminando todos os dados", - "ru": "Выполнено очистка всех данных", - "zh": "完成清除所有数据", - }, - "Error": { - "ar": "خطأ", - "de": "Fehler", - "es": "Error", - "fr": "Erreur", - "ja": "エラー", - "pt": "Erro", - "ru": "ошибка", - "zh": "错误", - }, - "Failed to open 'rar' archive.": { - "ar": "أخفق فتح أرشيف 'رار'.", - "de": "Das 'rar'-Archiv konnte nicht geöffnet werden.", - "es": "Error al abrir archivo 'rar'.", - "fr": "Impossible d'ouvrir l'archive 'rar'.", - "ja": "'rar'アーカイブを開けませんでした。", - "pt": "Falha ao abrir o arquivo 'rar'.", - "ru": "Не удалось открыть архив «rar».", - "zh": "无法打开“rar”存档。", - }, - "Failed to open 'tar' archive.": { - "ar": "أخفق فتح أرشيف 'تار'.", - "de": "Das 'tar'-Archiv konnte nicht geöffnet werden.", - "es": "Error al abrir archivo 'tar'.", - "fr": "Impossible d'ouvrir l'archive 'tar'.", - "ja": "'tar'アーカイブを開けませんでした。", - "pt": "Falha ao abrir o arquivo 'tar'.", - "ru": "Не удалось открыть архив «tar».", - "zh": "无法打开“tar”存档。", - }, - "Failed to open 'zip' archive.": { - "ar": "أخفق فتح أرشيف 'زيب'.", - "de": "Das 'zip'-Archiv konnte nicht geöffnet werden.", - "es": "Error al abrir archivo 'zip'.", - "fr": "Impossible d'ouvrir l'archive 'zip'.", - "ja": "'zip'アーカイブを開けませんでした。", - "pt": "Falha ao abrir o arquivo 'zip'.", - "ru": "Не удалось открыть архив «zip».", - "zh": "无法打开“zip”存档。", - }, - "Full Screen": { - "ar": "تكبير الشاشة", - "de": "Vollbild", - "es": "Pantalla completa", - "fr": "Plein écran", - "ja": "全画面表示", - "pt": "Tela cheia", - "ru": "Полноэкранный", - "zh": "全屏", - }, - "Language:": { - "ar": "لغة:", - "de": "Sprache:", - "es": "Idioma:", - "fr": "La langue:", - "ja": "言語:", - "pt": "Língua:", - "ru": "Язык:", - "zh": "语言:", - }, - "Library": { - "ar": "مكتبة", - "de": "Bibliothek", - "es": "Biblioteca", - "fr": "Bibliothèque", - "ja": "としょうかん", - "pt": "Biblioteca", - "ru": "Библиотека", - "zh": "图书馆", - }, - "Library is empty": { - "ar": "المكتبة فارغة", - "de": "Bibliothek ist leer", - "es": "La biblioteca está vacía", - "fr": "La bibliothèque est vide", - "ja": "ライブラリが空です", - "pt": "A biblioteca está vazia", - "ru": "Библиотека пуста", - "zh": "图书馆是空的", - }, - "Loading": { - "ar": "جار التحميل", - "de": "Laden", - "es": "Cargando", - "fr": "Chargement", - "ja": "読み込み中", - "pt": "Carregando", - "ru": "загрузка", - "zh": "载入中", - }, - "None": { - "ar": "لا شيء", - "de": "Keiner", - "es": "Ninguna", - "fr": "Aucun", - "ja": "なし", - "pt": "Nenhum", - "ru": "Никто", - "zh": "没有", - }, - "of": { - "ar": "من", - "de": "von", - "es": "de", - "fr": "de", - "ja": "の", - "pt": "do", - "ru": "из", - "zh": "的", - }, - "Open comic file": { - "ar": "فتح ملف فكاهي", - "de": "Comic-Datei öffnen", - "es": "Abrir archivo cómico", - "fr": "Ouvrir un fichier comique", - "ja": "コミックファイルを開く", - "pt": "Abrir arquivo de quadrinhos", - "ru": "Открыть комический файл", - "zh": "打开漫画档案", - }, - "Settings": { - "ar": "إعدادات", - "de": "Einstellungen", - "es": "Ajustes", - "fr": "Paramètres", - "ja": "設定", - "pt": "Configurações", - "ru": "настройки", - "zh": "设置", - }, - "Software Version:": { - "ar": "إصدار البرنامج:", - "de": "Softwareversion:", - "es": "Versión del software:", - "fr": "Une version de logiciel:", - "ja": "ソフトウェアバージョン:", - "pt": "Versão do software:", - "ru": "Версия ПО:", - "zh": "软件版本:", - }, - "Start": { - "ar": "بداية", - "de": "Anfang", - "es": "Comienzo", - "fr": "Début", - "ja": "開始", - "pt": "Começar", - "ru": "Начало", - "zh": "开始", - }, - "Storage used:": { - "ar": "التخزين المستخدم:", - "de": "Verwendete Lagerung:", - "es": "Almacenamiento utilizado:", - "fr": "Stockage utilisé:", - "ja": "使用されたストレージ:", - "pt": "Armazenamento utilizado:", - "ru": "Используемое хранилище:", - "zh": "存储使用:", - }, - "The archive type is unknown": { - "ar": "نوع الأرشيف غير معروف", - "de": "Der Archivtyp ist unbekannt", - "es": "El tipo de archivo es desconocido", - "fr": "Stockage utilisé:", - "ja": "アーカイブタイプが不明です", - "pt": "O tipo de arquivo é desconhecido", - "ru": "Тип архива неизвестен", - "zh": "存档类型未知", - }, - "Total users online": { - "ar": "إجمالي المستخدمين عبر الإنترنت", - "de": "Alle Benutzer online", - "es": "Total de usuarios en línea", - "fr": "Nombre total d'utilisateurs en ligne", - "ja": "オンラインユーザー総数", - "pt": "Total de usuários on-line", - "ru": "Всего пользователей онлайн", - "zh": "在线用户总数", - }, - "Use higher quality page previews": { - "ar": "استخدام معاينات صفحة عالية الجودة", - "de": "Verwenden Sie höherwertige Seitenvorschau", - "es": "Utilizar previsualizaciones de páginas de mayor calidad", - "fr": "Utilisez des aperçus de page de meilleure qualité", - "ja": "より高品質のページプレビューを使用する", - "pt": "Use visualizações de página de qualidade superior", - "ru": "Используйте более качественные предварительные просмотры страниц", - "zh": "使用更高质量的页面预览", - }, - "Use smoothing when resizing images": { - "ar": "استخدام تمهيد عند تغيير حجم الصور", - "de": "Verwenden Sie Glättung bei der Größenänderung von Bildern", - "es": "Utilizar el suavizado al cambiar el tamaño de las imágenes", - "fr": "Utiliser le lissage lors du redimensionnement des images", - "ja": "画像のサイズを変更するときにスムージングを使用する", - "pt": "Use o alisamento ao redimensionar imagens", - "ru": "Сглаживание при изменении размера изображений", - "zh": "调整图像大小时使用平滑", - }, - "Visit home page at github": { - "ar": "زيارة الصفحة الرئيسية في جيثب", - "de": "Besuchen Sie die Homepage bei github", - "es": "Visita la página de inicio en github", - "fr": "Visiter la page d'accueil chez github", - "ja": "githubでホームページをご覧ください", - "pt": "Visite a página inicial no github", - "ru": "Посетить домашнюю страницу github", - "zh": "访问github主页", - }, -}; - diff --git a/src/lib/libunrar.js b/src/lib/libunrar.js deleted file mode 100644 index e275129..0000000 --- a/src/lib/libunrar.js +++ /dev/null @@ -1,421 +0,0 @@ - -// https://github.com/wcchoi/libunrar-js - -var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function";var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);if(!ret&&filename!=nodePath["resolve"](filename)){filename=path.join(__dirname,"..","src",filename);ret=nodeFS["readFileSync"](filename)}if(ret&&!binary)ret=ret.toString();return ret};Module["readBinary"]=function readBinary(filename){return Module["read"](filename,true)};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}))}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available (jsc?)"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.log(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}var Runtime={setTempRet0:(function(value){tempRet0=value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){if(!args.splice)args=Array.prototype.slice.call(args);args.splice(0,0,ptr);return Module["dynCall_"+sig].apply(null,args)}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[null,null,null,null,null],addFunction:(function(func){for(var i=0;i=TOTAL_MEMORY){var success=enlargeMemory();if(!success)return 0}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;function jsCall(){var args=Array.prototype.slice.call(arguments);return Runtime.functionPointers[args[0]].apply(null,args.slice(1))}var __THREW__=0;var ABORT=false;var EXITSTATUS=0;var undef=0;var tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat;var tempI64,tempI64b;var tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var globalScope=this;function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var JSfuncs={"stackSave":(function(){Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore()}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc((str.length<<2)+1);writeStringToMemory(str,ret)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;function UTF8ArrayToString(u8Array,idx){var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;function UTF16ToString(ptr){var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit)}}Module["UTF16ToString"]=UTF16ToString;function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}Module["stringToUTF16"]=stringToUTF16;function lengthBytesUTF16(str){return str.length*2}Module["lengthBytesUTF16"]=lengthBytesUTF16;function UTF32ToString(ptr){var i=0;var str="";while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}}Module["UTF32ToString"]=UTF32ToString;function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}Module["stringToUTF32"]=stringToUTF32;function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}Module["lengthBytesUTF32"]=lengthBytesUTF32;function demangle(func){var hasLibcxxabi=!!Module["___cxa_demangle"];if(hasLibcxxabi){try{var buf=_malloc(func.length);writeStringToMemory(func.substr(1),buf);var status=_malloc(4);var ret=Module["___cxa_demangle"](buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}}var i=3;var basicTypes={"v":"void","b":"bool","c":"char","s":"short","i":"int","l":"long","f":"float","d":"double","w":"wchar_t","a":"signed char","h":"unsigned char","t":"unsigned short","j":"unsigned int","m":"unsigned long","x":"long long","y":"unsigned long long","z":"..."};var subs=[];var first=true;function dump(x){if(x)Module.print(x);Module.print(func);var pre="";for(var a=0;a"}else{ret=name}paramLoop:while(i0){var c=func[i++];if(c in basicTypes){list.push(basicTypes[c])}else{switch(c){case"P":list.push(parse(true,1,true)[0]+"*");break;case"R":list.push(parse(true,1,true)[0]+"&");break;case"L":{i++;var end=func.indexOf("E",i);var size=end-i;list.push(func.substr(i,size));i+=size+2;break};case"A":{var size=parseInt(func.substr(i));i+=size.toString().length;if(func[i]!=="_")throw"?";i++;list.push(parse(true,1,true)[0]+" ["+size+"]");break};case"E":break paramLoop;default:ret+="?"+c;break paramLoop}}}if(!allowVoid&&list.length===1&&list[0]==="void")list=[];if(rawList){if(ret){list.push(ret+"?")}return list}else{return ret+flushList()}}var parsed=func;try{if(func=="Object._main"||func=="_main"){return"main()"}if(typeof func==="number")func=Pointer_stringify(func);if(func[0]!=="_")return func;if(func[1]!=="_")return func;if(func[2]!=="Z")return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()"}parsed=parse()}catch(e){parsed+="?"}if(parsed.indexOf("?")>=0&&!hasLibcxxabi){Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling")}return parsed}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module["stackTrace"]=stackTrace;var PAGE_SIZE=4096;function alignMemoryPage(x){if(x%4096>0){x+=4096-x%4096}return x}var HEAP;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){var OLD_TOTAL_MEMORY=TOTAL_MEMORY;var LIMIT=Math.pow(2,31);if(DYNAMICTOP>=LIMIT)return false;while(TOTAL_MEMORY<=DYNAMICTOP){if(TOTAL_MEMORY=LIMIT)return false;try{if(ArrayBuffer.transfer){buffer=ArrayBuffer.transfer(buffer,TOTAL_MEMORY)}else{var oldHEAP8=HEAP8;buffer=new ArrayBuffer(TOTAL_MEMORY)}}catch(e){return false}var success=_emscripten_replace_memory(buffer);if(!success)return false;Module["buffer"]=buffer;Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer);if(!ArrayBuffer.transfer){HEAP8.set(oldHEAP8)}return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=(function(buffer){return buffer.byteLength})}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var totalMemory=64*1024;while(totalMemory0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Runtime.dynCall("v",func)}else{Runtime.dynCall("vi",func,[callback.arg])}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=Module.addOnPreRun=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=Module.addOnInit=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=Module.addOnPreMain=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=Module.addOnExit=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=Module.addOnPostRun=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<=half&&(bits<=32||value>half)){value=-2*half+value}return value}if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];if(!Math["clz32"])Math["clz32"]=(function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32});Math.clz32=Math["clz32"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_min=Math.min;var Math_clz32=Math.clz32;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;STATIC_BASE=8;STATICTOP=STATIC_BASE+63088;__ATINIT__.push({func:(function(){__GLOBAL__sub_I_global_cpp()})},{func:(function(){__GLOBAL__sub_I_crc_cpp()})},{func:(function(){__GLOBAL__sub_I_threadpool_cpp()})});var memoryInitializer=unrarMemoryFileLocation;var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function copyTempFloat(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3]}function copyTempDouble(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3];HEAP8[tempDoublePtr+4]=HEAP8[ptr+4];HEAP8[tempDoublePtr+5]=HEAP8[ptr+5];HEAP8[tempDoublePtr+6]=HEAP8[ptr+6];HEAP8[tempDoublePtr+7]=HEAP8[ptr+7]}function _atexit(func,arg){__ATEXIT__.unshift({func:func,arg:arg})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}Module["_i64Subtract"]=_i64Subtract;Module["_i64Add"]=_i64Add;var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var ___errno_state=0;function ___setErrNo(value){HEAP32[___errno_state>>2]=value;return value}var PATH={splitPath:(function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)}),normalizeArray:(function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}),normalize:(function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path}),dirname:(function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir}),basename:(function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)}),extname:(function(path){return PATH.splitPath(path)[3]}),join:(function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))}),join2:(function(l,r){return PATH.normalize(l+"/"+r)}),resolve:(function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter((function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."}),relative:(function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()}),put_char:(function(tty,val){if(val===null||val===10){Module["print"](UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}}),flush:(function(tty){if(tty.output&&tty.output.length>0){Module["print"](UTF8ArrayToString(tty.output,0));tty.output=[]}})},default_tty1_ops:{put_char:(function(tty,val){if(val===null||val===10){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}}),flush:(function(tty){if(tty.output&&tty.output.length>0){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[]}})}};var MEMFS={ops_table:null,mount:(function(mount){return MEMFS.createNode(null,"/",16384|511,0)}),createNode:(function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node}),getFileDataAsRegularArray:(function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;inode.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.lengthnewSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}}));var remove=[];Object.keys(dst.entries).forEach((function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}}));if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=(function(e){done(this.error);e.preventDefault()});create.sort().forEach((function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}))}else{IDBFS.loadLocalEntry(path,(function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)}))}}));remove.sort().reverse().forEach((function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}}))})};var NODEFS={isWindows:false,staticInit:(function(){NODEFS.isWindows=!!process.platform.match(/^win/)}),mount:(function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)}),createNode:(function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node}),getMode:(function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&146)>>1}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode}),realPath:(function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)}),flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:(function(flags){if(flags in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[flags]}else{return flags}}),node_ops:{getattr:(function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}}),setattr:(function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),lookup:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)}),mknod:(function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node}),rename:(function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),unlink:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),rmdir:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readdir:(function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),symlink:(function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readlink:(function(node){var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}})},stream_ops:{open:(function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),close:(function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),read:(function(stream,buffer,offset,length,position){if(length===0)return 0;var nbuffer=new Buffer(length);var res;try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0){for(var i=0;i8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var parts=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:current_path,node:current}}),getPath:(function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}}),hashName:(function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length}),hashAddNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node}),hashRemoveNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}}),lookupNode:(function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)}),createNode:(function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=(function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev});FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:(function(){return(this.mode&readMode)===readMode}),set:(function(val){val?this.mode|=readMode:this.mode&=~readMode})},write:{get:(function(){return(this.mode&writeMode)===writeMode}),set:(function(val){val?this.mode|=writeMode:this.mode&=~writeMode})},isFolder:{get:(function(){return FS.isDir(this.mode)})},isDevice:{get:(function(){return FS.isChrdev(this.mode)})}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node}),destroyNode:(function(node){FS.hashRemoveNode(node)}),isRoot:(function(node){return node===node.parent}),isMountpoint:(function(node){return!!node.mounted}),isFile:(function(mode){return(mode&61440)===32768}),isDir:(function(mode){return(mode&61440)===16384}),isLink:(function(mode){return(mode&61440)===40960}),isChrdev:(function(mode){return(mode&61440)===8192}),isBlkdev:(function(mode){return(mode&61440)===24576}),isFIFO:(function(mode){return(mode&61440)===4096}),isSocket:(function(mode){return(mode&49152)===49152}),flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:(function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags}),flagsToPermissionString:(function(flag){var accmode=flag&2097155;var perms=["r","w","rw"][accmode];if(flag&512){perms+="w"}return perms}),nodePermissions:(function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES}return 0}),mayLookup:(function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return ERRNO_CODES.EACCES;return 0}),mayCreate:(function(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")}),mayDelete:(function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR}}return 0}),mayOpen:(function(node,flags){if(!node){return ERRNO_CODES.ENOENT}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP}else if(FS.isDir(node.mode)){if((flags&2097155)!==0||flags&512){return ERRNO_CODES.EISDIR}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))}),MAX_OPEN_FDS:4096,nextfd:(function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)}),getStream:(function(fd){return FS.streams[fd]}),createStream:(function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=(function(){});FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:(function(){return this.node}),set:(function(val){this.node=val})},isRead:{get:(function(){return(this.flags&2097155)!==1})},isWrite:{get:(function(){return(this.flags&2097155)!==0})},isAppend:{get:(function(){return this.flags&1024})}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream}),closeStream:(function(fd){FS.streams[fd]=null}),getStreamFromPtr:(function(ptr){return FS.streams[ptr-1]}),getPtrForStream:(function(stream){return stream?stream.fd+1:0}),chrdev_stream_ops:{open:(function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}}),llseek:(function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)})},major:(function(dev){return dev>>8}),minor:(function(dev){return dev&255}),makedev:(function(ma,mi){return ma<<8|mi}),registerDevice:(function(dev,ops){FS.devices[dev]={stream_ops:ops}}),getDevice:(function(dev){return FS.devices[dev]}),getMounts:(function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts}),syncfs:(function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}var mounts=FS.getMounts(FS.root.mount);var completed=0;function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=mounts.length){callback(null)}}mounts.forEach((function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)}))}),mount:(function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot}),unmount:(function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach((function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}}));node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)}),lookup:(function(parent,name){return parent.node_ops.lookup(parent,name)}),mknod:(function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.mknod(parent,name,mode,dev)}),create:(function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)}),mkdir:(function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)}),mkdev:(function(path,mode,dev){if(typeof dev==="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)}),symlink:(function(oldpath,newpath){if(!PATH.resolve(oldpath)){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.symlink(parent,newname,oldpath)}),rename:(function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!old_dir||!new_dir)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}relative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err)}err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(new_dir!==old_dir){err=FS.nodePermissions(old_dir,"w");if(err){throw new FS.ErrnoError(err)}}try{if(FS.trackingDelegate["willMovePath"]){FS.trackingDelegate["willMovePath"](old_path,new_path)}}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate["onMovePath"])FS.trackingDelegate["onMovePath"](old_path,new_path)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}}),rmdir:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}return node.node_ops.readdir(node)}),unlink:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){if(err===ERRNO_CODES.EISDIR)err=ERRNO_CODES.EPERM;throw new FS.ErrnoError(err)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readlink:(function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!link.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return PATH.resolve(FS.getPath(lookup.node.parent),link.node_ops.readlink(link))}),stat:(function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!node.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return node.node_ops.getattr(node)}),lstat:(function(path){return FS.stat(path,true)}),chmod:(function(path,mode,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})}),lchmod:(function(path,mode){FS.chmod(path,mode,true)}),fchmod:(function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chmod(stream.node,mode)}),chown:(function(path,uid,gid,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{timestamp:Date.now()})}),lchown:(function(path,uid,gid){FS.chown(path,uid,gid,true)}),fchown:(function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chown(stream.node,uid,gid)}),truncate:(function(path,len){if(len<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.nodePermissions(node,"w");if(err){throw new FS.ErrnoError(err)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})}),ftruncate:(function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}FS.truncate(stream.node,len)}),utime:(function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})}),open:(function(path,flags,mode,fd_start,fd_end){if(path===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}flags=typeof flags==="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode==="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path==="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(FS.isChrdev(node.mode)){flags&=~512}if(!created){var err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err)}}if(flags&512){FS.truncate(node,0)}flags&=~(128|512);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;Module["printErr"]("read file: "+path)}}try{if(FS.trackingDelegate["onOpenFile"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate["onOpenFile"](path,trackingFlags)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message)}return stream}),close:(function(stream){try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}}),llseek:(function(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position}),read:(function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead}),write:(function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if(stream.flags&1024){FS.llseek(stream,0,2)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate["onWriteToFile"])FS.trackingDelegate["onWriteToFile"](stream.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return bytesWritten}),allocate:(function(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}stream.stream_ops.allocate(stream,offset,length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags)}),ioctl:(function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)}return stream.stream_ops.ioctl(stream,cmd,arg)}),readFile:(function(path,opts){opts=opts||{};opts.flags=opts.flags||"r";opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret}),writeFile:(function(path,data,opts){opts=opts||{};opts.flags=opts.flags||"w";opts.encoding=opts.encoding||"utf8";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var stream=FS.open(path,opts.flags,opts.mode);if(opts.encoding==="utf8"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,0,opts.canOwn)}else if(opts.encoding==="binary"){FS.write(stream,data,0,data.length,0,opts.canOwn)}FS.close(stream)}),cwd:(function(){return FS.currentPath}),chdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var err=FS.nodePermissions(lookup.node,"x");if(err){throw new FS.ErrnoError(err)}FS.currentPath=lookup.path}),createDefaultDirectories:(function(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")}),createDefaultDevices:(function(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:(function(){return 0}),write:(function(){return 0})});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device;if(typeof crypto!=="undefined"){var randomBuffer=new Uint8Array(1);random_device=(function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]})}else if(ENVIRONMENT_IS_NODE){random_device=(function(){return require("crypto").randomBytes(1)[0]})}else{random_device=(function(){return Math.random()*256|0})}FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")}),createStandardStreams:(function(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin","r");HEAP32[_stdin>>2]=FS.getPtrForStream(stdin);assert(stdin.fd===0,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");HEAP32[_stdout>>2]=FS.getPtrForStream(stdout);assert(stdout.fd===1,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");HEAP32[_stderr>>2]=FS.getPtrForStream(stderr);assert(stderr.fd===2,"invalid handle for stderr ("+stderr.fd+")")}),ensureErrnoError:(function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=(function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}});this.setErrno(errno);this.message=ERRNO_MESSAGES[errno]};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach((function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""}))}),staticInit:(function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices()}),init:(function(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()}),quit:(function(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}});var lazyArray=this;lazyArray.setDataGetter((function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]}));this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperty(lazyArray,"length",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._length})});Object.defineProperty(lazyArray,"chunkSize",{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize})});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperty(node,"usedBytes",{get:(function(){return this.contents.length})});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach((function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i0);info.refcount--;if(info.refcount===0){if(info.destructor){Runtime.dynCall("vi",info.destructor,[ptr])}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}EXCEPTIONS.clearRef(EXCEPTIONS.deAdjust(ptr));throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(asm["setTempRet0"](0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(asm["setTempRet0"](0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i>2];info.adjusted=thrown;return(asm["setTempRet0"](typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(asm["setTempRet0"](throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_begin_catch(ptr){__ZSt18uncaught_exceptionv.uncaught_exception--;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function _close(fildes){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{FS.close(stream);return 0}catch(e){FS.handleFSError(e);return-1}}function _fsync(fildes){var stream=FS.getStream(fildes);if(stream){return 0}else{___setErrNo(ERRNO_CODES.EBADF);return-1}}function _fileno(stream){stream=FS.getStreamFromPtr(stream);if(!stream)return-1;return stream.fd}function _fclose(stream){var fd=_fileno(stream);_fsync(fd);return _close(fd)}function _chmod(path,mode,dontResolveLastLink){path=typeof path!=="string"?Pointer_stringify(path):path;try{FS.chmod(path,mode);return 0}catch(e){FS.handleFSError(e);return-1}}function _pthread_mutex_lock(){}function _pthread_create(){Module["printErr"]("missing function: pthread_create");abort(-1)}function _open(path,oflag,varargs){var mode=HEAP32[varargs>>2];path=Pointer_stringify(path);try{var stream=FS.open(path,oflag,mode);return stream.fd}catch(e){FS.handleFSError(e);return-1}}function _fopen(filename,mode){var flags;mode=Pointer_stringify(mode);if(mode[0]=="r"){if(mode.indexOf("+")!=-1){flags=2}else{flags=0}}else if(mode[0]=="w"){if(mode.indexOf("+")!=-1){flags=2}else{flags=1}flags|=64;flags|=512}else if(mode[0]=="a"){if(mode.indexOf("+")!=-1){flags=2}else{flags=1}flags|=64;flags|=1024}else{___setErrNo(ERRNO_CODES.EINVAL);return 0}var fd=_open(filename,flags,allocate([511,0,0,0],"i32",ALLOC_STACK));return fd===-1?0:FS.getPtrForStream(FS.getStream(fd))}Module["_strncpy"]=_strncpy;function _mkport(){throw"TODO"}var SOCKFS={mount:(function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=(function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this});Module["websocket"].emit=(function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}});return FS.createNode(null,"/",16384|511,0)}),createSocket:(function(family,type,protocol){var streaming=type==1;if(protocol){assert(streaming==(protocol==6))}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:FS.modeStringToFlags("r+"),seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock}),getSocket:(function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock}),stream_ops:{poll:(function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)}),ioctl:(function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)}),read:(function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length}),write:(function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)}),close:(function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)})},nextname:(function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current++ +"]"}),websocket_sock_ops:{createPeer:(function(sock,addr,port){var ws;if(typeof addr==="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);var opts=ENVIRONMENT_IS_NODE?{"protocol":subProtocols.toString()}:subProtocols;var WebSocket=ENVIRONMENT_IS_NODE?require("ws"):window["WebSocket"];ws=new WebSocket(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!=="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer}),getPeer:(function(sock,addr,port){return sock.peers[addr+":"+port]}),addPeer:(function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer}),removePeer:(function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]}),handlePeerEvents:(function(sock,peer){var first=true;var handleOpen=(function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}});function handleMessage(data){assert(typeof data!=="string"&&data.byteLength!==undefined);data=new Uint8Array(data);var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",(function(data,flags){if(!flags.binary){return}handleMessage((new Uint8Array(data)).buffer)}));peer.socket.on("close",(function(){Module["websocket"].emit("close",sock.stream.fd)}));peer.socket.on("error",(function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}))}else{peer.socket.onopen=handleOpen;peer.socket.onclose=(function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=(function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}}),poll:(function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask}),ioctl:(function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return ERRNO_CODES.EINVAL}}),close:(function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>0]=chr;var fd=_fileno(stream);var ret=_write(fd,_fputc.ret,1);if(ret==-1){var streamObj=FS.getStreamFromPtr(stream);if(streamObj)streamObj.error=true;return-1}else{return chr}}function ___assert_fail(condition,filename,line,func){ABORT=true;throw"Assertion failed: "+Pointer_stringify(condition)+", at: "+[filename?Pointer_stringify(filename):"unknown filename",line,func?Pointer_stringify(func):"unknown function"]+" at "+stackTrace()}function _fdopen(fildes,mode){mode=Pointer_stringify(mode);var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return 0}if(mode.indexOf("w")!=-1&&!stream.isWrite||mode.indexOf("r")!=-1&&!stream.isRead||mode.indexOf("a")!=-1&&!stream.isAppend||mode.indexOf("+")!=-1&&(!stream.isRead||!stream.isWrite)){___setErrNo(ERRNO_CODES.EINVAL);return 0}else{stream.error=false;stream.eof=false;return FS.getPtrForStream(stream)}}function _fwrite(ptr,size,nitems,stream){var bytesToWrite=nitems*size;if(bytesToWrite==0)return 0;var fd=_fileno(stream);var bytesWritten=_write(fd,ptr,bytesToWrite);if(bytesWritten==-1){var streamObj=FS.getStreamFromPtr(stream);if(streamObj)streamObj.error=true;return 0}else{return bytesWritten/size|0}}function _umask(newMask){if(_umask.cmask===undefined)_umask.cmask=511;var oldMask=_umask.cmask;_umask.cmask=newMask;return oldMask}function _pthread_mutex_init(){}var _tzname=allocate(8,"i32*",ALLOC_STATIC);var _daylight=allocate(1,"i32*",ALLOC_STATIC);var _timezone=allocate(1,"i32*",ALLOC_STATIC);function _tzset(){if(_tzset.called)return;_tzset.called=true;HEAP32[_timezone>>2]=-(new Date).getTimezoneOffset()*60;var winter=new Date(2e3,0,1);var summer=new Date(2e3,6,1);HEAP32[_daylight>>2]=Number(winter.getTimezoneOffset()!=summer.getTimezoneOffset());function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocate(intArrayFromString(winterName),"i8",ALLOC_NORMAL);var summerNamePtr=allocate(intArrayFromString(summerName),"i8",ALLOC_NORMAL);if(summer.getTimezoneOffset()>2]=winterNamePtr;HEAP32[_tzname+4>>2]=summerNamePtr}else{HEAP32[_tzname>>2]=summerNamePtr;HEAP32[_tzname+4>>2]=winterNamePtr}}function _mktime(tmPtr){_tzset();var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=(new Date(2e3,6,1)).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(winterOffset!=guessedOffset)}else if(dst>0!=(winterOffset!=guessedOffset)){var summerOffset=(new Date(date.getFullYear(),6,1)).getTimezoneOffset();var trueOffset=dst>0?summerOffset:winterOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;return date.getTime()/1e3|0}var PROCINFO={ppid:1,pid:42,sid:42,pgid:42};function _getpid(){return PROCINFO.pid}function _fcntl(fildes,cmd,varargs,dup2){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}switch(cmd){case 0:var arg=HEAP32[varargs>>2];if(arg<0){___setErrNo(ERRNO_CODES.EINVAL);return-1}var newStream;try{newStream=FS.open(stream.path,stream.flags,0,arg)}catch(e){FS.handleFSError(e);return-1}return newStream.fd;case 1:case 2:return 0;case 3:return stream.flags;case 4:var arg=HEAP32[varargs>>2];stream.flags|=arg;return 0;case 12:case 12:var arg=HEAP32[varargs>>2];var offset=0;HEAP16[arg+offset>>1]=2;return 0;case 13:case 14:case 13:case 14:return 0;case 8:case 9:___setErrNo(ERRNO_CODES.EINVAL);return-1;default:___setErrNo(ERRNO_CODES.EINVAL);return-1}return-1}function _dup(fildes){return _fcntl(fildes,0,allocate([0,0,0,0],"i32",ALLOC_STACK))}var ___tm_current=allocate(44,"i8",ALLOC_STATIC);var ___tm_timezone=allocate(intArrayFromString("GMT"),"i8",ALLOC_STATIC);function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=(new Date(2e3,6,1)).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=date.getTimezoneOffset()==Math.min(winterOffset,summerOffset)|0;HEAP32[tmPtr+32>>2]=dst;var zonePtr=HEAP32[_tzname+(dst?Runtime.QUANTUM_SIZE:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function _localtime(time){return _localtime_r(time,___tm_current)}Module["_bitshift64Lshr"]=_bitshift64Lshr;Module["_memset"]=_memset;function _isatty(fildes){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return 0}if(!stream.tty){___setErrNo(ERRNO_CODES.ENOTTY);return 0}return 1}var _BDtoILow=true;var _BDtoIHigh=true;function _pthread_cond_broadcast(){return 0}function _link(path1,path2){___setErrNo(ERRNO_CODES.EMLINK);return-1}Module["_strlen"]=_strlen;function __reallyNegative(x){return x<0||x===0&&1/x===-Infinity}function __formatString(format,varargs){var textIndex=format;var argIndex=0;function getNextArg(type){var ret;if(type==="double"){ret=(HEAP32[tempDoublePtr>>2]=HEAP32[varargs+argIndex>>2],HEAP32[tempDoublePtr+4>>2]=HEAP32[varargs+(argIndex+4)>>2],+HEAPF64[tempDoublePtr>>3])}else if(type=="i64"){ret=[HEAP32[varargs+argIndex>>2],HEAP32[varargs+(argIndex+4)>>2]]}else{type="i32";ret=HEAP32[varargs+argIndex>>2]}argIndex+=Runtime.getNativeFieldSize(type);return ret}var ret=[];var curr,next,currArg;while(1){var startTextIndex=textIndex;curr=HEAP8[textIndex>>0];if(curr===0)break;next=HEAP8[textIndex+1>>0];if(curr==37){var flagAlwaysSigned=false;var flagLeftAlign=false;var flagAlternative=false;var flagZeroPad=false;var flagPadSign=false;flagsLoop:while(1){switch(next){case 43:flagAlwaysSigned=true;break;case 45:flagLeftAlign=true;break;case 35:flagAlternative=true;break;case 48:if(flagZeroPad){break flagsLoop}else{flagZeroPad=true;break};case 32:flagPadSign=true;break;default:break flagsLoop}textIndex++;next=HEAP8[textIndex+1>>0]}var width=0;if(next==42){width=getNextArg("i32");textIndex++;next=HEAP8[textIndex+1>>0]}else{while(next>=48&&next<=57){width=width*10+(next-48);textIndex++;next=HEAP8[textIndex+1>>0]}}var precisionSet=false,precision=-1;if(next==46){precision=0;precisionSet=true;textIndex++;next=HEAP8[textIndex+1>>0];if(next==42){precision=getNextArg("i32");textIndex++}else{while(1){var precisionChr=HEAP8[textIndex+1>>0];if(precisionChr<48||precisionChr>57)break;precision=precision*10+(precisionChr-48);textIndex++}}next=HEAP8[textIndex+1>>0]}if(precision<0){precision=6;precisionSet=false}var argSize;switch(String.fromCharCode(next)){case"h":var nextNext=HEAP8[textIndex+2>>0];if(nextNext==104){textIndex++;argSize=1}else{argSize=2}break;case"l":var nextNext=HEAP8[textIndex+2>>0];if(nextNext==108){textIndex++;argSize=8}else{argSize=4}break;case"L":case"q":case"j":argSize=8;break;case"z":case"t":case"I":argSize=4;break;default:argSize=null}if(argSize)textIndex++;next=HEAP8[textIndex+1>>0];switch(String.fromCharCode(next)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var signed=next==100||next==105;argSize=argSize||4;var currArg=getNextArg("i"+argSize*8);var origArg=currArg;var argText;if(argSize==8){currArg=Runtime.makeBigInt(currArg[0],currArg[1],next==117)}if(argSize<=4){var limit=Math.pow(256,argSize)-1;currArg=(signed?reSign:unSign)(currArg&limit,argSize*8)}var currAbsArg=Math.abs(currArg);var prefix="";if(next==100||next==105){if(argSize==8&&i64Math)argText=i64Math.stringify(origArg[0],origArg[1],null);else argText=reSign(currArg,8*argSize,1).toString(10)}else if(next==117){if(argSize==8&&i64Math)argText=i64Math.stringify(origArg[0],origArg[1],true);else argText=unSign(currArg,8*argSize,1).toString(10);currArg=Math.abs(currArg)}else if(next==111){argText=(flagAlternative?"0":"")+currAbsArg.toString(8)}else if(next==120||next==88){prefix=flagAlternative&&currArg!=0?"0x":"";if(argSize==8&&i64Math){if(origArg[1]){argText=(origArg[1]>>>0).toString(16);var lower=(origArg[0]>>>0).toString(16);while(lower.length<8)lower="0"+lower;argText+=lower}else{argText=(origArg[0]>>>0).toString(16)}}else if(currArg<0){currArg=-currArg;argText=(currAbsArg-1).toString(16);var buffer=[];for(var i=0;i=0){if(flagAlwaysSigned){prefix="+"+prefix}else if(flagPadSign){prefix=" "+prefix}}if(argText.charAt(0)=="-"){prefix="-"+prefix;argText=argText.substr(1)}while(prefix.length+argText.lengthexponent&&exponent>=-4){next=(next==103?"f":"F").charCodeAt(0);precision-=exponent+1}else{next=(next==103?"e":"E").charCodeAt(0);precision--}effectivePrecision=Math.min(precision,20)}if(next==101||next==69){argText=currArg.toExponential(effectivePrecision);if(/[eE][-+]\d$/.test(argText)){argText=argText.slice(0,-1)+"0"+argText.slice(-1)}}else if(next==102||next==70){argText=currArg.toFixed(effectivePrecision);if(currArg===0&&__reallyNegative(currArg)){argText="-"+argText}}var parts=argText.split("e");if(isGeneral&&!flagAlternative){while(parts[0].length>1&&parts[0].indexOf(".")!=-1&&(parts[0].slice(-1)=="0"||parts[0].slice(-1)==".")){parts[0]=parts[0].slice(0,-1)}}else{if(flagAlternative&&argText.indexOf(".")==-1)parts[0]+=".";while(precision>effectivePrecision++)parts[0]+="0"}argText=parts[0]+(parts.length>1?"e"+parts[1]:"");if(next==69)argText=argText.toUpperCase();if(currArg>=0){if(flagAlwaysSigned){argText="+"+argText}else if(flagPadSign){argText=" "+argText}}}while(argText.length>0])}}else{ret=ret.concat(intArrayFromString("(null)".substr(0,argLength),true))}if(flagLeftAlign){while(argLength0){ret.push(32)}if(!flagLeftAlign)ret.push(getNextArg("i8"));break};case"n":{var ptr=getNextArg("i32*");HEAP32[ptr>>2]=ret.length;break};case"%":{ret.push(curr);break};default:{for(var i=startTextIndex;i>0])}}}textIndex+=2}else{ret.push(curr);textIndex+=1}}return ret}function _fprintf(stream,format,varargs){var result=__formatString(format,varargs);var stack=Runtime.stackSave();var ret=_fwrite(allocate(result,"i8",ALLOC_STACK),1,result.length,stream);Runtime.stackRestore(stack);return ret}function _vfprintf(s,f,va_arg){return _fprintf(s,f,HEAP32[va_arg>>2])}function _pthread_mutex_unlock(){}function _getpwnam(){throw"getpwnam: TODO"}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;function _utime(path,times){var time;if(times){var offset=4;time=HEAP32[times+offset>>2];time*=1e3}else{time=Date.now()}path=Pointer_stringify(path);try{FS.utime(path,time,time);return 0}catch(e){FS.handleFSError(e);return-1}}function _sbrk(bytes){var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);self.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=(function(){abort("cannot dynamically allocate, sbrk now has control")})}var ret=DYNAMICTOP;if(bytes!=0){var success=self.alloc(bytes);if(!success)return-1>>>0}return ret}Module["_bitshift64Shl"]=_bitshift64Shl;Module["_memmove"]=_memmove;function ___errno_location(){return ___errno_state}function _strerror_r(errnum,strerrbuf,buflen){if(errnum in ERRNO_MESSAGES){if(ERRNO_MESSAGES[errnum].length>buflen-1){return ___setErrNo(ERRNO_CODES.ERANGE)}else{var msg=ERRNO_MESSAGES[errnum];writeAsciiToMemory(msg,strerrbuf);return 0}}else{return ___setErrNo(ERRNO_CODES.EINVAL)}}function _strerror(errnum){if(!_strerror.buffer)_strerror.buffer=_malloc(256);_strerror_r(errnum,_strerror.buffer,256);return _strerror.buffer}function _pthread_mutex_destroy(){}function _pthread_cond_wait(){return 0}Module["_llvm_bswap_i32"]=_llvm_bswap_i32;function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}___setErrNo(ERRNO_CODES.EINVAL);return-1}function _recv(fd,buf,len,flags){var sock=SOCKFS.getSocket(fd);if(!sock){___setErrNo(ERRNO_CODES.EBADF);return-1}return _read(fd,buf,len)}function _pread(fildes,buf,nbyte,offset){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{var slab=HEAP8;return FS.read(stream,slab,buf,nbyte,offset)}catch(e){FS.handleFSError(e);return-1}}function _read(fildes,buf,nbyte){var stream=FS.getStream(fildes);if(!stream){___setErrNo(ERRNO_CODES.EBADF);return-1}try{var slab=HEAP8;return FS.read(stream,slab,buf,nbyte)}catch(e){FS.handleFSError(e);return-1}}function _fread(ptr,size,nitems,stream){var bytesToRead=nitems*size;if(bytesToRead==0){return 0}var bytesRead=0;var streamObj=FS.getStreamFromPtr(stream);if(!streamObj){___setErrNo(ERRNO_CODES.EBADF);return 0}while(streamObj.ungotten.length&&bytesToRead>0){HEAP8[ptr++>>0]=streamObj.ungotten.pop();bytesToRead--;bytesRead++}var err=_read(streamObj.fd,ptr,bytesToRead);if(err==-1){if(streamObj)streamObj.error=true;return 0}bytesRead+=err;if(bytesRead0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();setTimeout(Browser.mainLoop.runner,0);return}if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}if(Browser.mainLoop.method==="timeout"&&Module.ctx){Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter((function(){if(typeof arg!=="undefined"){Runtime.dynCall("vi",func,[arg])}else{Runtime.dynCall("v",func)}}));if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:(function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++}),resume:(function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()}),updateStatus:(function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout((function(){finish(audio)}),1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);var canvas=Module["canvas"];function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===canvas||document["mozPointerLockElement"]===canvas||document["webkitPointerLockElement"]===canvas||document["msPointerLockElement"]===canvas}if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(function(){});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(function(){});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",(function(ev){if(!Browser.pointerLock&&canvas.requestPointerLock){canvas.requestPointerLock();ev.preventDefault()}}),false)}}}),createContext:(function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}canvas.style.backgroundColor="black"}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach((function(callback){callback()}));Browser.init()}return ctx}),destroyContext:(function(canvas,useWebGL,setInModule){}),fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:(function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullScreenChange(){Browser.isFullScreen=false;var canvasContainer=canvas.parentNode;if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.cancelFullScreen=document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||document["msExitFullscreen"]||document["exitFullscreen"]||(function(){});canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document);if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullScreen=true;if(Browser.resizeCanvas)Browser.setFullScreenCanvasSize()}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas)Browser.setWindowedCanvasSize()}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullScreen);Browser.updateCanvasDimensions(canvas)}if(!Browser.fullScreenHandlersInstalled){Browser.fullScreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullScreenChange,false);document.addEventListener("mozfullscreenchange",fullScreenChange,false);document.addEventListener("webkitfullscreenchange",fullScreenChange,false);document.addEventListener("MSFullscreenChange",fullScreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullScreen=canvasContainer["requestFullScreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullScreen"]?(function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}):null);if(vrDevice){canvasContainer.requestFullScreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullScreen()}}),nextRAF:0,fakeRequestAnimationFrame:(function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)}),requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:(function(func){return(function(){if(!ABORT)return func.apply(null,arguments)})}),allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:(function(){Browser.allowAsyncCallbacks=false}),resumeAsyncCallbacks:(function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach((function(func){func()}))}}),safeRequestAnimationFrame:(function(func){return Browser.requestAnimationFrame((function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}}))}),safeSetTimeout:(function(func,timeout){Module["noExitRuntime"]=true;return setTimeout((function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}}),timeout)}),safeSetInterval:(function(func,timeout){Module["noExitRuntime"]=true;return setInterval((function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}}),timeout)}),getMimetype:(function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]}),getUserMedia:(function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)}),getMovementX:(function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0}),getMovementY:(function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0}),getMouseWheelDelta:(function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=event.wheelDelta;break;case"wheel":delta=event["deltaY"];break;default:throw"unrecognized mouse wheel event: "+event.type}return delta}),mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:(function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){Browser.lastTouches[touch.identifier]=Browser.touches[touch.identifier];Browser.touches[touch.identifier]={x:adjustedX,y:adjustedY}}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}}),xhrLoad:(function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)}),asyncLoad:(function(url,onload,onerror,noRunDep){Browser.xhrLoad(url,(function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(!noRunDep)removeRunDependency("al "+url)}),(function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}}));if(!noRunDep)addRunDependency("al "+url)}),resizeListeners:[],updateResizeListeners:(function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach((function(listener){listener(canvas.width,canvas.height)}))}),setCanvasSize:(function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()}),windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags|8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),setWindowedCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags&~8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),updateCanvasDimensions:(function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;HEAP32[buf+36>>2]=stat.size;HEAP32[buf+40>>2]=4096;HEAP32[buf+44>>2]=stat.blocks;HEAP32[buf+48>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+52>>2]=0;HEAP32[buf+56>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ino;return 0}catch(e){if(e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){e.setErrno(ERRNO_CODES.ENOTDIR)}FS.handleFSError(e);return-1}}function _lstat(path,buf){return _stat(path,buf,true)}function _ferror(stream){stream=FS.getStreamFromPtr(stream);return Number(stream&&stream.error)}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}function _getcwd(buf,size){if(size==0){___setErrNo(ERRNO_CODES.EINVAL);return 0}var cwd=FS.cwd();if(size>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}var ___dso_handle=allocate(1,"i32*",ALLOC_STATIC);FS.staticInit();__ATINIT__.unshift({func:(function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init()})});__ATMAIN__.push({func:(function(){FS.ignorePermissions=false})});__ATEXIT__.push({func:(function(){FS.quit()})});Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;___errno_state=Runtime.staticAlloc(4);HEAP32[___errno_state>>2]=0;__ATINIT__.unshift({func:(function(){TTY.init()})});__ATEXIT__.push({func:(function(){TTY.shutdown()})});if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}_fputc.ret=allocate([0],"i8",ALLOC_STATIC);__ATINIT__.push({func:(function(){SOCKFS.root=FS.mount(SOCKFS,{},null)})});Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE2147483648)return false;i=new a(newBuffer);j=new b(newBuffer);k=new c(newBuffer);l=new d(newBuffer);m=new e(newBuffer);n=new f(newBuffer);o=new g(newBuffer);p=new h(newBuffer);buffer=newBuffer;return true} -// EMSCRIPTEN_START_FUNCS -function tc(a){a=a|0;var b=0;b=r;r=r+a|0;r=r+15&-16;return b|0}function uc(){return r|0}function vc(a){a=a|0;r=a}function wc(a,b){a=a|0;b=b|0;if(!z){z=a;A=b}}function xc(a){a=a|0;i[t>>0]=i[a>>0];i[t+1>>0]=i[a+1>>0];i[t+2>>0]=i[a+2>>0];i[t+3>>0]=i[a+3>>0]}function yc(a){a=a|0;i[t>>0]=i[a>>0];i[t+1>>0]=i[a+1>>0];i[t+2>>0]=i[a+2>>0];i[t+3>>0]=i[a+3>>0];i[t+4>>0]=i[a+4>>0];i[t+5>>0]=i[a+5>>0];i[t+6>>0]=i[a+6>>0];i[t+7>>0]=i[a+7>>0]}function zc(a){a=a|0;O=a}function Ac(){return O|0}function Bc(a){a=a|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+20>>2]=0;k[a+88>>2]=0;return}function Cc(a){a=a|0;var b=0;k[a+16>>2]=0;b=k[a>>2]|0;if(b){ym(b);k[a>>2]=0}k[a+4>>2]=0;k[a+8>>2]=0;k[a+20>>2]=0;k[a+88>>2]=0;return}function Dc(a){a=a|0;k[a+16>>2]=0;return}function Ec(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=r;r=r+16|0;f=j;g=(b|0)==0?8:b;e=a+4|0;h=k[e>>2]|0;b=(kk(g)|0)+1|0;b=b+(k[e>>2]|0)|0;k[e>>2]=b;i=a+8|0;c=k[i>>2]|0;if(b>>>0<=c>>>0){f=k[a>>2]|0;h=f+(h<<2)|0;ik(h,g)|0;h=a+20|0;f=k[h>>2]|0;f=f+1|0;k[h>>2]=f;r=j;return}d=k[a+12>>2]|0;if((d|0)!=0&b>>>0>d>>>0){k[f>>2]=d;Jf(32944,53104,f);Af(32944);c=k[i>>2]|0;b=k[e>>2]|0}c=c+32+(c>>>2)|0;b=b>>>0>c>>>0?b:c;c=zm(k[a>>2]|0,b<<2)|0;if(!c)Af(32944);k[a>>2]=c;k[i>>2]=b;f=c;h=f+(h<<2)|0;ik(h,g)|0;h=a+20|0;f=k[h>>2]|0;f=f+1|0;k[h>>2]=f;r=j;return}function Fc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=a+16|0;e=k[d>>2]|0;if(e>>>0>=(k[a+4>>2]|0)>>>0){a=0;return a|0}a=(k[a>>2]|0)+(e<<2)|0;e=(kk(a)|0)+1|0;k[d>>2]=e+(k[d>>2]|0);Lc(b,a,c)|0;a=1;return a|0}function Gc(a){a=a|0;var b=0,c=0;b=a+16|0;c=k[b>>2]|0;if(c>>>0>=(k[a+4>>2]|0)>>>0){a=0;return a|0}a=(k[a>>2]|0)+(c<<2)|0;c=(kk(a)|0)+1|0;k[b>>2]=c+(k[b>>2]|0);return a|0}function Hc(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)==(a|0)|(c|0)==0)return;c=c+-1|0;Wm(b|0,a|0,c|0)|0;i[b+c>>0]=0;return}function Ic(a,b,c){a=a|0;b=b|0;c=c|0;if(!c)return a|0;c=c+-1|0;Wm(a|0,b|0,c|0)|0;i[a+c>>0]=0;return a|0}function Jc(a){a=a|0;return (a+-48|0)>>>0<10|0}function Kc(a,b){a=a|0;b=b|0;return hk(a,b)|0}function Lc(a,b,c){a=a|0;b=b|0;c=c|0;if(!c)return a|0;c=c+-1|0;nk(a,b,c)|0;k[a+(c<<2)>>2]=0;return a|0}function Mc(a,b,c){a=a|0;b=b|0;c=c|0;c=c-(kk(a)|0)+-1|0;if((c|0)<=0)return a|0;lk(a,b,c)|0;return a|0}function Nc(a){a=a|0;var b=0,c=0;c=(k[8196]|0)+1|0;c=c>>>0>3?0:c;k[8196]=c;b=16+(c<<13)|0;ne(a,b,2048)|0;k[8204+(c<<13)>>2]=0;return b|0}function Oc(a){a=a|0;var b=0,c=0,d=0;b=kk(a)|0;while(1){c=b+-1|0;if((b|0)<=0){d=5;break}if((k[a+(c<<2)>>2]|0)==47)break;else b=c}if((d|0)==5)return a|0;c=a+(b<<2)|0;return c|0}function Pc(a){a=a|0;return (a|0)==47|0}function Qc(a){a=a|0;return 0}function Rc(a){a=a|0;var b=0;b=kk(a)|0;if(!b)return a|0;a=a+(b+-1<<2)|0;return a|0}function Sc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=r;r=r+8192|0;g=i;c=a;a:while(1){d=a;while(1){a=k[d>>2]|0;if(!a)break a;else if((a|0)!=47){d=d+4|0;continue}a=d+4|0;if((k[a>>2]|0)!=46){d=a;continue}if((k[d+8>>2]|0)==46)break;else d=a}c=(k[d+12>>2]|0)==47?d+16|0:c}while(1){a=k[c>>2]|0;if((a|0)==92)if((k[c+4>>2]|0)==92?(f=gk(c+8|0,92)|0,(f|0)!=0):0){a=gk(f+4|0,92)|0;a=(a|0)==0?c:a+4|0}else a=c;else if(!a)break;else a=c;b:while(1){e=a;while(1){d=k[e>>2]|0;if((d|0)==47){a=e;break}else if((d|0)!=46)break b;e=e+4|0}a=a+4|0}if((a|0)==(c|0)){h=17;break}else c=a}if((h|0)==17)if((k[c>>2]|0)==46?(k[c+4>>2]|0)==46:0){f=c+8|0;c=(k[f>>2]|0)==0?f:c}if(!b){r=i;return c|0}Lc(g,c,2048)|0;ik(b,g)|0;r=i;return c|0}function Tc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(!a)return;if(!(k[a>>2]|0))return;d=kk(a)|0;while(1){e=d+-1|0;if((d|0)<=0){d=a;break}if((k[a+(e<<2)>>2]|0)==47){f=6;break}else d=e}if((f|0)==6)d=a+(d<<2)|0;d=pk(d,46)|0;if(d)k[d>>2]=0;if(!b)return;Mc(a,32792,c)|0;Mc(a,b,c)|0;return}function Uc(a){a=a|0;if(!a){a=0;return a|0}a=(ok(a,41640)|0)!=0;return a|0}function Vc(a,b){a=a|0;b=b|0;var c=0;c=kk(a)|0;if(!c)return;if(!((c+1|0)>>>0>>0?(k[a+(c+-1<<2)>>2]|0)!=47:0))return;fk(a,32816)|0;return}function Wc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(!c)return;c=c+-1|0;d=kk(a)|0;while(1){e=d+-1|0;if((d|0)<=0){d=a;break}if((k[a+(e<<2)>>2]|0)==47){f=5;break}else d=e}if((f|0)==5)d=a+(d<<2)|0;e=a;if(c>>>0>=d-e>>2>>>0){c=kk(a)|0;while(1){d=c+-1|0;if((c|0)<=0){c=a;break}if((k[a+(d<<2)>>2]|0)==47){f=10;break}else c=d}if((f|0)==10)c=a+(c<<2)|0;c=c-e>>2}nk(b,a,c)|0;k[b+(c<<2)>>2]=0;return}function Xc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((b|0)!=0?(k[b>>2]|0)!=0:0){if((c|0)!=(b|0))nk(c,b,d)|0}else e=5;do if((e|0)==5)if(!a){k[c>>2]=0;break}else{ne(a,c,d)|0;break}while(0);if(!d)return c|0;k[c+(d+-1<<2)>>2]=0;return c|0}function Yc(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=a+((kk(a)|0)+-1<<2)|0;while(1)if(b>>>0>a>>>0&((Jc(k[b>>2]|0)|0)^1))b=b+-4|0;else break;d=b;while(1){c=d>>>0>a>>>0;if((Jc(k[d>>2]|0)|0)&c)d=d+-4|0;else break}if(!c)return b|0;while(1){c=k[d>>2]|0;if((c|0)==46){f=14;break}if(Jc(c)|0){f=9;break}d=d+-4|0;if(d>>>0<=a>>>0){f=14;break}}if((f|0)==9){c=kk(a)|0;while(1){e=c+-1|0;if((c|0)<=0)break;if((k[a+(e<<2)>>2]|0)==47){f=12;break}else c=e}if((f|0)==12)a=a+(c<<2)|0;f=gk(a,46)|0;return ((f|0)!=0&f>>>0>>0?d:b)|0}else if((f|0)==14)return b|0;return 0}function Zc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;do if(a){g=kk(a)|0;while(1){f=g+-1|0;if((g|0)<=0){d=a;break}if((k[a+(f<<2)>>2]|0)==47){h=g;o=6;break}else g=f}if((o|0)==6)d=a+(h<<2)|0;f=pk(d,46)|0;if(!f){Mc(a,32824,b)|0;f=kk(a)|0;while(1){d=f+-1|0;if((f|0)<=0){i=a;break}if((k[a+(d<<2)>>2]|0)==47){j=f;o=11;break}else f=d}if((o|0)==11)i=a+(j<<2)|0;f=pk(i,46)|0;break}else{d=f+4|0;if(!((k[d>>2]|0)==0?(kk(a)|0)>>>0<(b+-3|0)>>>0:0))o=15;if(((o|0)==15?(se(d,32848)|0)!=0:0)?(se(d,32800)|0)!=0:0)break;ik(d,32864)|0;break}}else{Mc(0,32824,b)|0;f=0}while(0);if(!c){e=Yc(a)|0;while(1){n=(k[e>>2]|0)+1|0;k[e>>2]=n;if((n|0)!=58){o=33;break}k[e>>2]=48;d=e+-4|0;if(d>>>0>>0){l=d;m=e;break}if(Jc(k[d>>2]|0)|0)e=d;else{l=d;m=e;break}}if((o|0)==33)return;d=a+((kk(a)|0)<<2)|0;if((d|0)!=(l|0))while(1){k[d+4>>2]=k[d>>2];if((d|0)==(m|0))break;else d=d+-4|0}k[m>>2]=49;return}d=f+8|0;if(Jc(k[d>>2]|0)|0?(e=f+12|0,Jc(k[e>>2]|0)|0):0){m=(k[e>>2]|0)+1|0;k[e>>2]=m;if((m|0)!=58)return;while(1){f=e;e=e+-4|0;d=k[e>>2]|0;if((d|0)==46){n=f;break}k[f>>2]=48;m=d+1|0;k[e>>2]=m;if((m|0)!=58){o=33;break}}if((o|0)==33)return;k[n>>2]=65;return}ik(d,32880)|0;return}function _c(a){a=a|0;if(!(k[a>>2]|0)){a=0;return a|0}a=(ok(a,32896)|0)==0;return a|0}function $c(a,b){a=a|0;b=b|0;var c=0,d=0;c=k[a>>2]|0;if(!c)return;d=b?32896:32928;if(!b){do{if(gk(d,c)|0)k[a>>2]=95;a=a+4|0;c=k[a>>2]|0}while((c|0)!=0);return}do{if(!((gk(d,c)|0)==0?(k[a>>2]|0)>>>0>=32:0))k[a>>2]=95;a=a+4|0;c=k[a>>2]|0}while((c|0)!=0);return}function ad(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=c+-1|0;a:do if(!e)c=0;else{c=0;do{d=i[a+c>>0]|0;if(!(d<<24>>24))break a;i[b+c>>0]=d<<24>>24==92?47:d;c=c+1|0}while(c>>>0>>0)}while(0);i[b+c>>0]=0;return}function bd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=c+-1|0;a:do if(!e)c=0;else{c=0;do{d=k[a+(c<<2)>>2]|0;if(!d)break a;k[b+(c<<2)>>2]=(d|0)==92?47:d;c=c+1|0}while(c>>>0>>0)}while(0);k[b+(c<<2)>>2]=0;return}function cd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;f=r;r=r+2048|0;e=f;do if(a){d=k[a>>2]|0;if(!d)break;else if((d|0)!=47){if(!(rb(e|0,2048)|0))i[e>>0]=0;ne(e,b,c)|0;e=kk(b)|0;if((e|0)!=0?((e+1|0)>>>0>>0?(k[b+(e+-1<<2)>>2]|0)!=47:0):0)fk(b,32816)|0}else k[b>>2]=0;Mc(b,a,c)|0;r=f;return}while(0);if(!c){r=f;return}k[b>>2]=0;r=f;return}function dd(a){a=a|0;return (k[a>>2]|0)==47|0}function ed(a){a=a|0;return (k[a>>2]|0)==47|0}function fd(a,b){a=a|0;b=b|0;var c=0;c=pk(a,59)|0;if(c){a=we(c+4|0)|0;if(b)k[c>>2]=0}else a=0;return a|0}function gd(a){a=a|0;Ha(a|0)|0;Hk()}function hd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((d|0)<(b|0)|(d|0)==(b|0)&c>>>0>>0){c=100;return c|0}if((c|0)==0&(d|0)==0){c=0;return c|0}b=jn(a|0,b|0,100,0)|0;c=gn(b|0,O|0,c|0,d|0)|0;return c|0}function id(){zf(32944);return}function jd(a){a=a|0;var b=0;k[a>>2]=32968;k[a+4>>2]=0;k[a+24>>2]=0;i[a+8>>0]=0;b=a+12|0;k[a+8216>>2]=0;i[a+21>>0]=0;k[b+0>>2]=0;j[b+4>>1]=0;i[b+6>>0]=0;i[a+19>>0]=1;i[a+20>>0]=1;return}function kd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=32968;b=a+4|0;c=k[b>>2]|0;if(!c)return;if(i[a+16>>0]|0)return;if(!(i[a+18>>0]|0)){d=(Ib(c|0)|0)==-1;k[b>>2]=0;k[a+12>>2]=0;if(!d)return;if(!(i[a+20>>0]|0))return;Cf(32944,a+24|0);return}d=a+12|0;if(k[d>>2]|0)return;c=(Ib(c|0)|0)==-1;k[b>>2]=0;k[d>>2]=0;if(c?(i[a+20>>0]|0)!=0:0)Cf(32944,a+24|0);if(!(i[a+19>>0]|0))return;Md(a+24|0)|0;return}function ld(a){a=a|0;var b=0,c=0;b=a+4|0;c=k[b>>2]|0;do if(c){if(i[a+16>>0]|0){k[b>>2]=0;k[a+12>>2]=0;b=1;break}c=(Ib(c|0)|0)==-1;k[b>>2]=0;k[a+12>>2]=0;if(c)if(!(i[a+20>>0]|0))b=0;else{Cf(32944,a+24|0);b=0}else b=1}else{k[a+12>>2]=0;b=1}while(0);return b|0}function md(a){a=a|0;kd(a);Ak(a);return}function nd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;j=r;r=r+2064|0;e=j+8|0;f=a+8216|0;k[f>>2]=0;if(!(i[a+21>>0]|0))g=(c&4|0)==0;else g=0;h=(c&1|0)!=0;if(h)c=2;else c=c>>>1&1;me(b,e,2048)|0;c=Rb(e|0,c|0,j|0)|0;if(g&(h&(c|0)>-1)?(za(c|0,6)|0)==-1:0){La(c|0)|0;b=0;r=j;return b|0}if(!((c|0)!=-1?(d=Eb(c|0,(h?32992:33e3)|0)|0,(d|0)!=0):0)){g=ac()|0;if((k[g>>2]|0)==2){k[f>>2]=1;d=0}else d=0}i[a+18>>0]=0;k[a+12>>2]=0;i[a+16>>0]=0;if(!d){b=0;r=j;return b|0}k[a+4>>2]=d;Lc(a+24|0,b,2048)|0;b=1;r=j;return b|0}function od(a,b){a=a|0;b=b|0;if(kc[k[(k[a>>2]|0)+8>>2]&31](a,b,0)|0){a=1;return a|0}Lf(32944,b);a=0;return a|0}function pd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=r;r=r+2048|0;e=d;me(b,e,2048)|0;e=ib(e|0,((c&2|0)!=0?33008:57816)|0)|0;c=a+4|0;k[c>>2]=e;i[a+18>>0]=1;k[a+12>>2]=0;i[a+16>>0]=0;Lc(a+24|0,b,2048)|0;r=d;return (k[c>>2]|0)!=0|0}function qd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;if(!c){c=1;return c|0}d=a+12|0;g=a+4|0;if((k[d>>2]|0)==1?(k[g>>2]|0)==0:0){h=Eb(Bb(1)|0,33008)|0;k[g>>2]=h}h=a+20|0;e=a+24|0;while(1){f=mb(b|0,1,c|0,k[g>>2]|0)|0;if((f|0)==(c|0)?(Ma(k[g>>2]|0)|0)==0:0){d=1;break}if(!(i[h>>0]|0)){d=0;break}if(k[d>>2]|0){d=0;break}if(!(Hf(32944,e,0)|0)){j=13;break}cc(k[g>>2]|0);if(!(f>>>0>>0&(f|0)>0))continue;m=k[a>>2]|0;l=k[m+16>>2]|0;m=nc[k[m+20>>2]&15](a)|0;f=Um(m|0,O|0,f|0,((f|0)<0)<<31>>31|0)|0;sc[l&15](a,f,O,0)}if((j|0)==13){Gf(32944,0,e);d=0}i[a+8>>0]=1;m=d;return m|0}function rd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;e=a+17|0;if(!(i[e>>0]|0)){m=0;n=0}else{m=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;n=O}o=a+12|0;p=k[y>>2]|0;j=a+4|0;l=a+8|0;f=a+8216|0;g=a+20|0;h=a+24|0;while(1){if((k[o>>2]|0)==1)k[j>>2]=p;if(i[l>>0]|0){Sb(k[j>>2]|0)|0;i[l>>0]=0}cc(k[j>>2]|0);d=Aa(b|0,1,c|0,k[j>>2]|0)|0;if(!((d|0)==-1|(Ma(k[j>>2]|0)|0)!=0)){e=21;break}k[f>>2]=2;if(!(i[g>>0]|0)){d=-1;e=21;break}if(i[e>>0]|0){e=11;break}if(k[o>>2]|0){e=20;break}if(!(Ff(32944,h)|0)){e=20;break}}if((e|0)==11){if(!c){a=0;return a|0}f=0;d=0;do{h=k[(k[a>>2]|0)+16>>2]|0;e=Vm(f|0,0,m|0,n|0)|0;sc[h&15](a,e,O,0);e=c-f|0;if((k[o>>2]|0)==1)k[j>>2]=p;if(i[l>>0]|0){Sb(k[j>>2]|0)|0;i[l>>0]=0}cc(k[j>>2]|0);h=Aa(b|0,1,(e>>>0<512?e:512)|0,k[j>>2]|0)|0;e=(Ma(k[j>>2]|0)|0)==0;h=e?h:-1;d=((h|0)==-1?512:h)+d|0;f=f+512|0}while(f>>>0>>0);return d|0}else if((e|0)==20){Ef(32944,h);a=-1;return a|0}else if((e|0)==21)return d|0;return 0}function sd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(td(a,b,c,d)|0)return;if(!(i[a+20>>0]|0))return;If(32944,a+24|0);return}function td(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;g=a+4|0;e=k[g>>2]|0;if(!e){a=1;return a|0}if((c|0)<0&(d|0)!=0){f=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;e=O;if((d|0)!=1){sc[k[(k[a>>2]|0)+16>>2]&15](a,0,0,2);h=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;d=O;sc[k[(k[a>>2]|0)+16>>2]&15](a,f,e,0);f=h;e=d}b=Vm(f|0,e|0,b|0,c|0)|0;d=0;e=k[g>>2]|0}i[a+8>>0]=0;a=(Wb(e|0,b|0,d|0)|0)==0;return a|0}function ud(a){a=a|0;var b=0,c=0,d=0,e=0;e=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;d=O;sc[k[(k[a>>2]|0)+16>>2]&15](a,0,0,2);b=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;c=O;sc[k[(k[a>>2]|0)+16>>2]&15](a,e,d,0);O=c;return b|0}function vd(a){a=a|0;var b=0,c=0;c=a+4|0;b=k[c>>2]|0;do if(!b)if(!(i[a+20>>0]|0)){c=-1;a=-1;O=c;return a|0}else{If(32944,a+24|0);b=k[c>>2]|0;break}while(0);a=Mb(b|0)|0;c=((a|0)<0)<<31>>31;O=c;return a|0}function wd(a,b,c){a=a|0;b=b|0;c=c|0;return}function xd(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;i[b>>0]=0;kc[k[(k[a>>2]|0)+12>>2]&31](a,b,1)|0;r=c;return i[b>>0]|0}function yd(a){a=a|0;return 0}function zd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return}function Ad(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+2064|0;g=h;f=h+8|0;if(!b)d=0;else{d=b;d=(k[d>>2]|0)!=0|(k[d+4>>2]|0)!=0}if(!c)e=0;else{e=c;e=(k[e>>2]|0)!=0|(k[e+4>>2]|0)!=0}if(!(d|e)){r=h;return}if(d)d=ff(b)|0;else d=ff(c)|0;k[g+4>>2]=d;if(e)d=ff(c)|0;k[g>>2]=d;me(a+24|0,f,2048)|0;Ka(f|0,g|0)|0;r=h;return}function Bd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+2064|0;g=h;f=h+8|0;if(!b)d=0;else{d=b;d=(k[d>>2]|0)!=0|(k[d+4>>2]|0)!=0}if(!c)e=0;else{e=c;e=(k[e>>2]|0)!=0|(k[e+4>>2]|0)!=0}if(!(d|e)){r=h;return}if(d)d=ff(b)|0;else d=ff(c)|0;k[g+4>>2]=d;if(e)d=ff(c)|0;k[g>>2]=d;me(a,f,2048)|0;Ka(f|0,g|0)|0;r=h;return}function Cd(a){a=a|0;a=k[a+4>>2]|0;if(!a){a=0;return a|0}a=(Oa(Vb(a|0)|0)|0)!=0;return a|0}function Dd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=r;r=r+2048|0;e=d;me(a,e,2048)|0;if((Wa(e|0,(b?c:511)|0)|0)!=-1){e=0;r=d;return e|0}e=ac()|0;e=(k[e>>2]|0)==2?2:1;r=d;return e|0}function Ed(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=r;r=r+10240|0;i=j+8192|0;h=j;if(!a){i=0;r=j;return i|0}c=k[a>>2]|0;if(!c){i=0;r=j;return i|0}g=a;e=c;c=1;f=a;do{d=f-g>>2;if(d>>>0>2047)break;if((Pc(e)|0)&f>>>0>a>>>0){nk(h,a,d)|0;k[h+(d<<2)>>2]=0;me(h,i,2048)|0;if((Wa(i|0,511)|0)==-1)c=0;else c=1}f=f+4|0;e=k[f>>2]|0}while((e|0)!=0);if(b){i=c;r=j;return i|0}g=Rc(a)|0;if(Pc(k[g>>2]|0)|0){i=c;r=j;return i|0}me(a,i,2048)|0;i=(Wa(i|0,511)|0)!=-1;r=j;return i|0}function Fd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Bd(a,b,d);return}function Gd(a){a=a|0;var b=0,c=0;b=r;r=r+2048|0;c=b;me(a,c,2048)|0;a=(ub(c|0,0)|0)==0;r=b;return a|0}function Hd(a){a=a|0;return (a&61440|0)==16384|0}function Id(a){a=a|0;return (a&61440|0)==40960|0}function Jd(a){a=a|0;var b=0,c=0;c=r;r=r+2048|0;b=c;if(!a){r=c;return}me(a,b,2048)|0;Ya(b|0,448)|0;r=c;return}function Kd(a){a=a|0;var b=0,c=0,d=0;c=r;r=r+2128|0;d=c+80|0;b=c;me(a,d,2048)|0;if(jb(d|0,b|0)|0){d=0;r=c;return d|0}d=k[b+12>>2]|0;r=c;return d|0}function Ld(a,b){a=a|0;b=b|0;var c=0,d=0;c=r;r=r+2048|0;d=c;me(a,d,2048)|0;a=(Ya(d|0,b|0)|0)==0;r=c;return a|0}function Md(a){a=a|0;var b=0,c=0;b=r;r=r+2048|0;c=b;me(a,c,2048)|0;a=(Cb(c|0)|0)==0;r=b;return a|0}function Nd(a,b,c,d,e,f,g,h,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0;k=(e|0)!=0;if(k)i[e>>0]=0;a:do if(Gd(c)|0){l=(b|0)==0&1;while(1){m=xi(a,c,d,f,g,h,l)|0;if(!m)break a;else if((m|0)==6)Bf(32944,255);else if((m|0)==1)break;if(!(Gd(c)|0))break a}if(!k){b=0;return b|0}i[e>>0]=1;b=0;return b|0}while(0);f=j?18:17;if(!b){Ed(c,1)|0;b=Md(c)|0;return b|0}if(pd(b,c,f)|0){b=1;return b|0}Ed(c,1)|0;b=pd(b,c,f)|0;return b|0}function Od(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;u=r;r=r+80864|0;q=u+80704|0;d=u+80788|0;p=u+59112|0;n=u;h=u+80780|0;g=u+80784|0;if(!(i[a+78270>>0]|0)){a=0;r=u;return a|0}s=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;t=O;e=a+78264|0;do if((k[e>>2]|0)!=1){c=k[(k[a>>2]|0)+16>>2]|0;if(!(i[a+42740>>0]|0)){q=ke(a)|0;sc[c&15](a,q,O,0);if(!(fe(a,33112)|0)){c=0;break}c=Pd(a,b)|0;break}sc[c&15](a,(k[a+78280>>2]|0)+20|0,0,0);ae(a)|0;if(!(i[a+78284>>0]|0)){c=(k[a+77212>>2]|0)+65523|0;f=10;break}else{k[p+68>>2]=0;k[p+72>>2]=57;k[p+64>>2]=1;k[p>>2]=a+24;c=0;break}}else{sc[k[(k[a>>2]|0)+16>>2]&15](a,(k[a+78280>>2]|0)+7|0,0,0);c=xd(a)|0;c=((xd(a)|0)&255)<<8|c&255;f=10}while(0);do if((f|0)==10){if((k[e>>2]|0)==1)if(!(i[a+42741>>0]|0))f=35;else f=15;else if((i[a+77223>>0]|0)!=48){if(((i[a+77222>>0]|0)+-15&255)>14){c=0;break}if((l[a+77223>>0]|0)>53){c=0;break}else f=15}else f=35;if((f|0)==15){nf(p);i[p+41>>0]=1;if((k[e>>2]|0)==1){f=xd(a)|0;o=xd(a)|0;uf(p);i[a+77222>>0]=15;c=c+-2|0;f=(o&255)<<8|f&255}else f=m[a+77220>>1]|0;rf(p,a,0);i[p+40>>0]=0;o=p+32|0;k[o>>2]=c&65535;k[o+4>>2]=0;c=p+18672|0;Eg(c,2,1);Sh(n,p);Uh(n,65536,0);o=n+19520|0;k[o>>2]=f;k[o+4>>2]=0;i[n+19544>>0]=0;Vh(n,l[a+77222>>0]|0,0);if((k[e>>2]|0)!=1?(e=Hg(c)|0,(j[a+77224>>1]|0)!=(e&65535)<<16>>16):0){k[d+68>>2]=0;k[d+72>>2]=57;k[d+64>>2]=1;k[d>>2]=a+24;c=1}else{sf(p,h,g);c=(k[g>>2]|0)+1|0;o=b+8|0;f=k[o>>2]|0;e=b+4|0;k[e>>2]=c;if(f>>>0>>0){d=k[b+12>>2]|0;if((d|0)!=0&d>>>0>>0){k[q>>2]=d;Jf(32944,53104,q);Af(32944);f=k[o>>2]|0;c=k[e>>2]|0}f=f+32+(f>>>2)|0;c=c>>>0>f>>>0?c:f;f=zm(k[b>>2]|0,c<<2)|0;if(!f)Af(32944);k[b>>2]=f;k[o>>2]=c;c=k[e>>2]|0}else f=k[b>>2]|0;Ym(f|0,0,c<<2|0)|0;ne(k[h>>2]|0,k[b>>2]|0,k[g>>2]|0)|0;c=kk(k[b>>2]|0)|0;d=k[o>>2]|0;k[e>>2]=c;if(d>>>0>>0){f=k[b+12>>2]|0;if((f|0)!=0&f>>>0>>0){k[q>>2]=f;Jf(32944,53104,q);Af(32944);d=k[o>>2]|0;c=k[e>>2]|0}d=d+32+(d>>>2)|0;c=c>>>0>d>>>0?c:d;d=zm(k[b>>2]|0,c<<2)|0;if(!d)Af(32944);k[b>>2]=d;k[o>>2]=c;c=0}else c=0}Th(n);$d(p);if(c){c=0;break}}else if((f|0)==35){h=c&65535;if(h){d=h>>>0>32?h:32;c=zm(0,d)|0;if(!c){Af(32944);c=0}}else{c=0;d=0}kc[k[(k[a>>2]|0)+12>>2]&31](a,c,h)|0;if((k[e>>2]|0)!=1?(n=j[a+77224>>1]|0,(n&65535|0)!=((Me(-1,c,h)|0)&65535^65535|0)):0){k[q+68>>2]=0;k[q+72>>2]=57;k[q+64>>2]=1;k[q>>2]=a+24;d=1}else{g=h+1|0;o=b+8|0;f=k[o>>2]|0;n=b+4|0;k[n>>2]=g;if(f>>>0>>0){e=k[b+12>>2]|0;if((e|0)!=0&e>>>0>>0){k[q>>2]=e;Jf(32944,53104,q);Af(32944);f=k[o>>2]|0;e=k[n>>2]|0}else e=g;f=f+32+(f>>>2)|0;f=e>>>0>f>>>0?e:f;e=zm(k[b>>2]|0,f<<2)|0;if(!e)Af(32944);k[b>>2]=e;k[o>>2]=f}if(g>>>0>d>>>0){p=d+32+(d>>>2)|0;c=zm(c,g>>>0>p>>>0?g:p)|0;if(!c){Af(32944);c=0}}i[c+h>>0]=0;ne(c,k[b>>2]|0,h)|0;d=kk(k[b>>2]|0)|0;e=k[o>>2]|0;k[n>>2]=d;if(e>>>0>>0){f=k[b+12>>2]|0;if((f|0)!=0&f>>>0>>0){k[q>>2]=f;Jf(32944,53104,q);Af(32944);e=k[o>>2]|0;d=k[n>>2]|0}e=e+32+(e>>>2)|0;d=d>>>0>e>>>0?d:e;e=zm(k[b>>2]|0,d<<2)|0;if(!e)Af(32944);k[b>>2]=e;k[o>>2]=d;d=0}else d=0}if(c)ym(c);if(d){c=0;break}}c=(k[b+4>>2]|0)!=0}while(0);sc[k[(k[a>>2]|0)+16>>2]&15](a,s,t,0);a=c;r=u;return a|0}function Pd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;n=r;r=r+32|0;l=n;m=n+8|0;k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;k[m+12>>2]=0;if(le(a,m,0)|0){e=m+4|0;j=k[e>>2]|0;g=j+1|0;k[e>>2]=g;f=m+8|0;c=k[f>>2]|0;if(g>>>0>c>>>0){d=k[m+12>>2]|0;if((d|0)!=0&g>>>0>d>>>0){k[l>>2]=d;Jf(32944,53104,l);Af(32944);c=k[f>>2]|0;d=k[e>>2]|0}else d=g;c=c+32+(c>>>2)|0;d=d>>>0>c>>>0?d:c;c=zm(k[m>>2]|0,d)|0;if(!c)Af(32944);k[m>>2]=c;k[f>>2]=d;d=k[e>>2]|0}else{d=g;c=k[m>>2]|0}i[c+(d+-1)>>0]=0;h=b+8|0;c=k[h>>2]|0;f=b+4|0;k[f>>2]=g;if(c>>>0>>0){d=k[b+12>>2]|0;if((d|0)!=0&d>>>0>>0){k[l>>2]=d;Jf(32944,53104,l);Af(32944);d=k[h>>2]|0;c=k[f>>2]|0}else{d=c;c=g}d=d+32+(d>>>2)|0;c=c>>>0>d>>>0?c:d;d=zm(k[b>>2]|0,c<<2)|0;if(!d)Af(32944);k[b>>2]=d;k[h>>2]=c}do if((k[a+78264>>2]|0)!=3){c=k[m>>2]|0;d=k[b>>2]|0;if(!(k[a+60076>>2]&1)){ne(c,d,k[f>>2]|0)|0;break}else{j=j>>>1;pe(c,d,j)|0;k[(k[b>>2]|0)+(j<<2)>>2]=0;break}}else re(k[m>>2]|0,k[b>>2]|0,k[f>>2]|0)|0;while(0);c=kk(k[b>>2]|0)|0;d=k[h>>2]|0;k[f>>2]=c;if(d>>>0>>0){e=k[b+12>>2]|0;if((e|0)!=0&e>>>0>>0){k[l>>2]=e;Jf(32944,53104,l);Af(32944);d=k[h>>2]|0;c=k[f>>2]|0}d=d+32+(d>>>2)|0;c=c>>>0>d>>>0?c:d;d=zm(k[b>>2]|0,c<<2)|0;if(!d)Af(32944);k[b>>2]=d;k[h>>2]=c;d=1}else d=1}else d=0;c=k[m>>2]|0;if(!c){r=n;return d|0}ym(c);r=n;return d|0}function Qd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;jd(a);k[a>>2]=33040;He(a+8220|0);nf(a+14576|0);d=a+36192|0;c=d;k[c>>2]=0;k[c+4>>2]=0;Li(a+36216|0);c=a+51056|0;e=c+40|0;do{k[c>>2]=0;c=c+4|0}while((c|0)<(e|0));c=a+68272|0;e=c+40|0;do{k[c>>2]=0;c=c+4|0}while((c|0)<(e|0));c=a+36172|0;k[c>>2]=0;e=(b|0)==0;i[a+36168>>0]=e&1;if(e){b=yk(75200)|0;wf(b)}k[c>>2]=b;i[a+21>>0]=i[b+49821>>0]|0;k[a+78264>>2]=2;k[a+78280>>2]=0;c=d;k[c>>2]=0;k[c+4>>2]=0;i[a+78285>>0]=0;i[a+78284>>0]=0;k[a+36200>>2]=0;c=a+78248|0;b=a+36176|0;k[c+0>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;k[c+12>>2]=0;c=a+78268|0;e=c+9|0;do{i[c>>0]=0;c=c+1|0}while((c|0)<(e|0));k[b>>2]=-1;k[b+4>>2]=-1;k[a+36184>>2]=-1;b=a+59984|0;k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;k[b+28>>2]=0;k[a+78304>>2]=0;b=a+78312|0;k[a+78340>>2]=0;i[a+78302>>0]=0;i[a+36208>>0]=0;c=a+42712|0;e=c+116|0;do{k[c>>2]=0;c=c+4|0}while((c|0)<(e|0));k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;i[b+24>>0]=0;return}function Rd(a){a=a|0;var b=0;k[a>>2]=33040;if((i[a+36168>>0]|0)!=0?(b=k[a+36172>>2]|0,(b|0)!=0):0){yf(b);Ak(b)}b=k[a+68272>>2]|0;if(b)ym(b);b=k[a+51056>>2]|0;if(b)ym(b);Ni(a+36216|0);$d(a+14576|0);Ie(a+8220|0);kd(a);return}function Sd(a){a=a|0;Rd(a);Ak(a);return}function Td(a,b){a=a|0;b=b|0;var c=0,d=0;d=r;r=r+80|0;c=d;if(Ud(a,b)|0){r=d;return}if(!(i[a+78285>>0]|0)){k[c+68>>2]=0;k[c+72>>2]=56;k[c+64>>2]=1;k[c>>2]=a+24}Bf(32944,2);r=d;return}function Ud(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=r;r=r+80|0;w=y;u=a+78276|0;i[u>>0]=0;v=a+78284|0;i[v>>0]=0;if(Cd(a)|0){a=a+24|0;k[w+68>>2]=0;k[w+72>>2]=58;k[w>>2]=a;k[w+64>>2]=2;k[w+4>>2]=a;a=0;r=y;return a|0}s=a+42700|0;if((kc[k[(k[a>>2]|0)+12>>2]&31](a,s,7)|0)!=7){a=0;r=y;return a|0}t=a+78280|0;k[t>>2]=0;do if((i[s>>0]|0)==82){c=i[a+42701>>0]|0;if(c<<24>>24==69){if((i[a+42702>>0]|0)!=126){x=17;break}if((i[a+42703>>0]|0)!=94){x=17;break}c=a+78264|0;k[c>>2]=1;t=k[a>>2]|0;s=k[t+16>>2]|0;t=nc[k[t+20>>2]&15](a)|0;t=Vm(t|0,O|0,-7,-1)|0;sc[s&15](a,t,O,0);break}else if(c<<24>>24!=97){x=17;break}if((((i[a+42702>>0]|0)==114?(i[a+42703>>0]|0)==33:0)?(i[a+42704>>0]|0)==26:0)?(i[a+42705>>0]|0)==7:0){c=i[a+42706>>0]|0;if(c<<24>>24==1)c=3;else if(c<<24>>24)if(c<<24>>24==2)c=4;else{x=17;break}else c=2;t=a+78264|0;k[t>>2]=c;c=t}else x=17}else x=17;while(0);do if((x|0)==17){p=zm(0,1048576)|0;q=(p|0)==0;if(q)Af(32944);n=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;j=kc[k[(k[a>>2]|0)+12>>2]&31](a,p,1048560)|0;a:do if((j|0)>0){o=a+78264|0;f=(j|0)>31;h=28-n|0;d=p+h|0;e=p+(h+1)|0;m=p+(h+2)|0;h=p+(h+3)|0;b:do if((n|0)<28){c=0;c:while(1){do if((i[p+c>>0]|0)==82?(g=j-c|0,g>>>0>=4):0){l=i[p+(c+1)>>0]|0;if(l<<24>>24==69){if((i[p+(c+2)>>0]|0)!=126)break;if((i[p+(c+3)>>0]|0)==94){k[o>>2]=1;if(!((c|0)>0&f))break b;if((i[d>>0]|0)!=82)break;if((i[e>>0]|0)!=83)break;if((i[m>>0]|0)!=70)break;if((i[h>>0]|0)==88)break b;else break}}if((((g>>>0>6&l<<24>>24==97?(i[p+(c+2)>>0]|0)==114:0)?(i[p+(c+3)>>0]|0)==33:0)?(i[p+(c+4)>>0]|0)==26:0)?(i[p+(c+5)>>0]|0)==7:0){l=i[p+(c+6)>>0]|0;if(!(l<<24>>24)){d=2;x=33;break c}else if(l<<24>>24==1){d=3;break c}if(l<<24>>24==2){d=4;x=33;break c}}}while(0);c=c+1|0;if((j|0)<=(c|0))break a}k[o>>2]=d}else{c=0;d:while(1){do if((i[p+c>>0]|0)==82?(l=j-c|0,l>>>0>=4):0){d=i[p+(c+1)>>0]|0;if(d<<24>>24==69){if((i[p+(c+2)>>0]|0)!=126)break;if((i[p+(c+3)>>0]|0)==94){d=1;x=53;break d}}if((((l>>>0>6&d<<24>>24==97?(i[p+(c+2)>>0]|0)==114:0)?(i[p+(c+3)>>0]|0)==33:0)?(i[p+(c+4)>>0]|0)==26:0)?(i[p+(c+5)>>0]|0)==7:0){d=i[p+(c+6)>>0]|0;if(!(d<<24>>24)){d=2;x=53;break d}else if(d<<24>>24==1){d=3;break d}if(d<<24>>24==2){d=4;x=53;break d}}}while(0);c=c+1|0;if((j|0)<=(c|0))break a}k[o>>2]=d}while(0);n=c+n|0;k[t>>2]=n;sc[k[(k[a>>2]|0)+16>>2]&15](a,n,0,0);if((k[o>>2]&-2|0)==2)kc[k[(k[a>>2]|0)+12>>2]&31](a,s,7)|0}while(0);c=(k[t>>2]|0)==0;if(!q)ym(p);if(c){a=0;r=y;return a|0}else{c=a+78264|0;break}}while(0);c=k[c>>2]|0;do if((c|0)==4){k[w+68>>2]=0;k[w+72>>2]=59;k[w+64>>2]=1;k[w>>2]=a+24;a=0;r=y;return a|0}else if((c|0)==3){t=a+42707|0;kc[k[(k[a>>2]|0)+12>>2]&31](a,t,1)|0;if(!(i[t>>0]|0)){k[a+42708>>2]=8;break}else{a=0;r=y;return a|0}}else k[a+42708>>2]=7;while(0);if(!(k[(k[a+36172>>2]|0)+75184>>2]|0))i[a+36208>>0]=1;s=a+36204|0;e:do if(ae(a)|0){c=a+36208|0;d=a+78256|0;do{e=k[s>>2]|0;if((e|0)==1)break e;if((i[c>>0]|0)!=0&(e|0)==4)break e;t=d;sc[k[(k[a>>2]|0)+16>>2]&15](a,k[t>>2]|0,k[t+4>>2]|0,0)}while((ae(a)|0)!=0)}while(0);if(!((i[a+78285>>0]|0)==0|b)){a=0;r=y;return a|0}q=a+78256|0;t=q;sc[k[(k[a>>2]|0)+16>>2]&15](a,k[t>>2]|0,k[t+4>>2]|0,0);if((i[v>>0]|0)!=0?(k[w+68>>2]=0,k[w+72>>2]=25,k[w+64>>2]=1,k[w>>2]=a+24,!b):0){a=0;r=y;return a|0}i[a+78270>>0]=i[a+42740>>0]|0;if((i[a+36208>>0]|0)!=0?(i[u>>0]|0)!=0:0)c=a+78269|0;else{f=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;g=O;h=a+78248|0;l=h;j=k[l>>2]|0;l=k[l+4>>2]|0;n=q;m=k[n>>2]|0;n=k[n+4>>2]|0;o=k[s>>2]|0;c=a+78269|0;p=a+78273|0;e=a+68376|0;while(1){if(!(ae(a)|0))break;d=k[s>>2]|0;if((d|0)==3){if(!(i[c>>0]|0))d=0;else d=i[e>>0]^1;i[p>>0]=d}else if((d|0)==2){x=86;break}w=q;sc[k[(k[a>>2]|0)+16>>2]&15](a,k[w>>2]|0,k[w+4>>2]|0,0)}if((x|0)==86){if(!(i[c>>0]|0))d=0;else d=i[a+51160>>0]^1;i[p>>0]=d}x=h;k[x>>2]=j;k[x+4>>2]=l;x=q;k[x>>2]=m;k[x+4>>2]=n;k[s>>2]=o;sc[k[(k[a>>2]|0)+16>>2]&15](a,f,g,0)}if((i[c>>0]|0)!=0?(i[a+78273>>0]|0)==0:0){a=1;r=y;return a|0}ik(a+78340|0,a+24|0)|0;a=1;r=y;return a|0}function Vd(a){a=a|0;var b=0;b=a+78256|0;sc[k[(k[a>>2]|0)+16>>2]&15](a,k[b>>2]|0,k[b+4>>2]|0,0);return}function Wd(a,b){a=a|0;b=b|0;if(!(i[a+78276>>0]|0)){a=b;return a|0}b=(0-b&15)+b|0;if((k[a+78264>>2]|0)==3){a=b+16|0;return a|0}else{a=b+8|0;return a|0}return 0}function Xd(a,b,c){a=a|0;b=b|0;c=c|0;i[a+42592>>0]=0;return nd(a,b,c)|0}function Yd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+16|0;d=e;if(Qi(a+36216|0,b,c,d)|0){c=k[d>>2]|0;r=e;return c|0}else{c=rd(a,b,c)|0;r=e;return c|0}return 0}function Zd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Si(a+36216|0,b,c,d)|0)return;sd(a,b,c,d);return}function _d(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;if(Ti(a+36216|0,b)|0){a=b;b=k[a+4>>2]|0;a=k[a>>2]|0;O=b;r=c;return a|0}else{a=vd(a)|0;b=O;O=b;r=c;return a|0}return 0}function $d(a){a=a|0;Dg(a+18672|0);Dg(a+15756|0);Dg(a+12840|0);Ie(a+6416|0);Ie(a+64|0);return}function ae(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;h=r;r=r+80|0;f=h;if(i[a+78285>>0]|0){g=0;r=h;return g|0}c=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;d=O;e=a+78248|0;b=e;k[b>>2]=c;k[b+4>>2]=d;b=k[a+78264>>2]|0;if((b|0)==1){b=be(a)|0;g=6}else if((b|0)==2){b=ce(a)|0;g=6}else if((b|0)==3){b=de(a)|0;g=6}else b=0;do if((g|0)==6)if(!b){g=0;r=h;return g|0}else{c=e;d=k[c+4>>2]|0;c=k[c>>2]|0;break}while(0);g=a+78256|0;e=k[g+4>>2]|0;if((e|0)>(d|0)|((e|0)==(d|0)?(k[g>>2]|0)>>>0>c>>>0:0)){g=b;r=h;return g|0}k[f+68>>2]=0;k[f+72>>2]=24;k[f+64>>2]=1;k[f>>2]=a+24;i[a+78284>>0]=1;Kf(32944,3);g=0;r=h;return g|0}function be(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;j=r;r=r+2096|0;h=j;b=j+2080|0;e=j+32|0;Qe(h,a);g=a+78248|0;f=g;d=k[f+4>>2]|0;if((d|0)>0|((d|0)==0?(k[f>>2]|0)>>>0>(k[a+78280>>2]|0)>>>0:0)){Re(h,21)|0;di(a+42832|0,0);k[a+42836>>2]=2;d=Ve(h)|0;m=a+42852|0;k[m>>2]=d;d=Ve(h)|0;b=a+51104|0;k[b>>2]=d;k[b+4>>2]=0;k[a+51120>>2]=1;b=(Ue(h)|0)&65535;k[a+51124>>2]=b;b=(Ue(h)|0)&65535;d=a+42844|0;k[d>>2]=b;b=Ve(h)|0;c=(Te(h)|0)&255;k[a+42860>>2]=c;c=(Te(h)|0)&255|32768;f=a+42840|0;k[f>>2]=c;c=(Te(h)|0)<<24>>24==2;i[a+42857>>0]=c?13:10;c=(Te(h)|0)&255;l=Te(h)|0;i[a+42858>>0]=l;f=k[f>>2]|0;i[a+51160>>0]=f&1;i[a+51161>>0]=f>>>1&1;f=f>>>2&1;i[a+51163>>0]=f;k[a+51164>>2]=f;f=a+51096|0;l=f;k[l>>2]=k[m>>2];k[l+4>>2]=0;k[a+51252>>2]=65536;lf(a+51072|0,b);Re(h,c)|0;Ze(h,e,c)|0;i[e+c>>0]=0;Hc(e,e,2048);c=a+42864|0;ne(e,c,2048)|0;e=a+36172|0;b=k[(k[e>>2]|0)+49804>>2]|0;if((b|0)==1){ue(c)|0;b=k[(k[e>>2]|0)+49804>>2]|0}if((b|0)==2)te(c)|0;if(!(k[h+20>>2]|0)){d=a+78256|0;e=g;b=k[e>>2]|0;e=k[e+4>>2]|0;c=k[d>>2]|0;d=k[d+4>>2]|0}else{e=g;b=k[e>>2]|0;e=k[e+4>>2]|0;d=Vm(k[d>>2]|0,0,b|0,e|0)|0;c=f;c=Vm(d|0,O|0,k[c>>2]|0,k[c+4>>2]|0)|0;d=O;m=a+78256|0;k[m>>2]=c;k[m+4>>2]=d}k[a+36204>>2]=2}else{Re(h,7)|0;ei(a+42712|0);Ze(h,b,4)|0;c=Ue(h)|0;m=Te(h)|0;e=g;b=k[e>>2]|0;e=k[e+4>>2]|0;c=Vm(b|0,e|0,c&65535|0,0)|0;d=O;l=a+78256|0;k[l>>2]=c;k[l+4>>2]=d;k[a+36204>>2]=1;m=m&255;i[a+78269>>0]=m&1;i[a+78268>>0]=m>>>3&1;i[a+78271>>0]=m>>>2&1;i[a+42740>>0]=m>>>1&1;i[a+42741>>0]=m>>>4&1}if((d|0)>(e|0)|(d|0)==(e|0)&c>>>0>b>>>0)c=k[h+20>>2]|0;else c=0;b=k[h>>2]|0;if(!b){r=j;return c|0}ym(b);r=j;return c|0}function ce(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,R=0,S=0;S=r;r=r+10512|0;Q=S;G=S+184|0;R=S+152|0;b=S+10504|0;y=S+2312|0;w=S+76|0;x=S+264|0;I=S+96|0;H=S+112|0;Qe(R,a);d=a+78276|0;do if((i[d>>0]|0)!=0?(e=a+78248|0,K=e,M=k[K>>2]|0,K=k[K+4>>2]|0,N=Vm(k[a+78280>>2]|0,0,7,0)|0,L=O,(K|0)>(L|0)|(K|0)==(L|0)&M>>>0>N>>>0):0){if(!(ge(a)|0)){i[a+78285>>0]=1;c=0;break}if((kc[k[(k[a>>2]|0)+12>>2]&31](a,b,8)|0)==8){P=a+8220|0;Ke(P,0,4,(k[a+36172>>2]|0)+40996|0,b,0,0,0,0)|0;k[R+28>>2]=P;P=1;D=10;break}b=ud(a)|0;c=O;N=e;if(((k[N>>2]|0)==(b|0)?(k[N+4>>2]|0)==(c|0):0)?(N=a+78256|0,(k[N>>2]|0)==(b|0)?(k[N+4>>2]|0)==(c|0):0):0){c=0;break}k[Q+68>>2]=0;k[Q+72>>2]=55;k[Q+64>>2]=1;k[Q>>2]=a+24;Kf(32944,1);c=0}else{P=0;D=10}while(0);a:do if((D|0)==10){Re(R,7)|0;N=R+20|0;if(!(k[N>>2]|0)){b=ud(a)|0;c=O;N=a+78248|0;if(((k[N>>2]|0)==(b|0)?(k[N+4>>2]|0)==(c|0):0)?(N=a+78256|0,(k[N>>2]|0)==(b|0)?(k[N+4>>2]|0)==(c|0):0):0){c=0;break}k[Q+68>>2]=0;k[Q+72>>2]=55;k[Q+64>>2]=1;k[Q>>2]=a+24;Kf(32944,1);c=0;break}M=(Ue(R)|0)&65535;J=a+42680|0;k[J>>2]=M;M=a+42696|0;i[M>>0]=0;b=(Te(R)|0)&255;e=(Ue(R)|0)&65535;c=a+42688|0;k[c>>2]=e;i[M>>0]=e>>>14&1;M=Ue(R)|0;e=M&65535;n=a+42692|0;k[n>>2]=e;K=a+42684|0;k[K>>2]=b;if((M&65535)<7){k[Q+68>>2]=0;k[Q+72>>2]=24;k[Q+64>>2]=1;k[Q>>2]=a+24;i[a+78284>>0]=1;Kf(32944,3);c=0;break}do if((b|0)==122){k[K>>2]=3;b=3;D=21}else if((b|0)==123){k[K>>2]=5;b=5;D=21}else if((b|0)==116){k[K>>2]=2;b=2;D=21}else if((b|0)==115){k[K>>2]=1;k[a+36204>>2]=1;D=24}else{k[a+36204>>2]=b;if((b|0)==1){D=24;break}else if((b|0)!=117){D=26;break}Re(R,6)|0}while(0);if((D|0)==21){k[a+36204>>2]=b;D=26}else if((D|0)==24)if(!(k[c>>2]&2))D=26;else Re(R,6)|0;if((D|0)==26)Re(R,e+-7|0)|0;M=a+78248|0;F=M;L=k[F>>2]|0;F=k[F+4>>2]|0;F=Vm(Wd(a,k[n>>2]|0)|0,0,L|0,F|0)|0;L=a+78256|0;b=L;k[b>>2]=F;k[b+4>>2]=O;b=k[K>>2]|0;b:do switch(b|0){case 1:{H=a+42712|0;ei(H);k[H+0>>2]=k[J+0>>2];k[H+4>>2]=k[J+4>>2];k[H+8>>2]=k[J+8>>2];k[H+12>>2]=k[J+12>>2];k[H+16>>2]=k[J+16>>2];H=Ue(R)|0;b=a+42732|0;j[b>>1]=H;H=Ve(R)|0;k[a+42736>>2]=H;c=k[a+42720>>2]|0;i[a+78269>>0]=c&1;i[a+78268>>0]=c>>>3&1;i[a+78271>>0]=c>>>2&1;i[a+78275>>0]=c>>>6&1;i[d>>0]=c>>>7&1;if(!H)b=(j[b>>1]|0)!=0&1;else b=1;i[a+78272>>0]=b;i[a+42740>>0]=c>>>1&1;i[a+78273>>0]=c>>>8&1;i[a+78274>>0]=c>>>4&1;break}case 3:case 2:{s=(b|0)==2;F=s?a+42832|0:a+60048|0;di(F,0);k[F+0>>2]=k[J+0>>2];k[F+4>>2]=k[J+4>>2];k[F+8>>2]=k[J+8>>2];k[F+12>>2]=k[J+12>>2];k[F+16>>2]=k[J+16>>2];C=F+8|0;n=k[C>>2]|0;i[F+8328>>0]=n&1;i[F+8329>>0]=n>>>1&1;c=F+8331|0;i[c>>0]=n>>>2&1;i[F+8336>>0]=n>>>10&1;if(s){i[F+8416>>0]=n>>>4&1;b=0}else{i[F+8416>>0]=0;b=n>>>4&1}i[F+8426>>0]=b;E=(n&224|0)==224;v=F+8417|0;i[v>>0]=E&1;if(E)b=0;else b=65536<<(n>>>5&7);k[F+8420>>2]=b;E=F+8418|0;i[E>>0]=n>>>3&1;i[F+8419>>0]=n>>>11&1;f=Ve(R)|0;g=F+20|0;k[g>>2]=f;f=Ve(R)|0;z=Te(R)|0;e=F+24|0;i[e>>0]=z;k[F+8288>>2]=2;z=Ve(R)|0;k[F+8292>>2]=z;z=Ve(R)|0;h=Te(R)|0;t=F+25|0;i[t>>0]=h;h=((Te(R)|0)&255)+208&255;i[F+26>>0]=h;h=(Ue(R)|0)&65535;d=Ve(R)|0;u=F+28|0;k[u>>2]=d;n=F+8332|0;k[n>>2]=0;do if(i[c>>0]|0){b=l[t>>0]|0;if((b|0)==26|(b|0)==20){k[n>>2]=3;break}else if((b|0)==13){k[n>>2]=1;break}else if((b|0)==15){k[n>>2]=2;break}else{k[n>>2]=4;break}}while(0);o=F+8428|0;k[o>>2]=2;b=i[e>>0]|0;if(!(b<<24>>24==5|b<<24>>24==3))if((b&255)<6){q=0;D=45}else k[F+8432>>2]=0;else{q=1;D=45}if((D|0)==45?(k[o>>2]=q,p=F+8432|0,k[p>>2]=0,b<<24>>24==3&(d&61440|0)==40960):0){k[p>>2]=1;k[F+8436>>2]=0}if(s)b=0;else b=d>>>31&255;i[F+8424>>0]=b;q=(k[C>>2]|0)>>>8&1;i[F+8425>>0]=q;if(!q){n=(f|0)==-1&1;i[F+8330>>0]=n;d=0;b=0;c=0;e=0}else{b=Ve(R)|0;e=Ve(R)|0;if((f|0)==-1)n=(e|0)==-1&1;else n=0;i[F+8330>>0]=n;d=0;c=0}p=F+8264|0;q=p;k[q>>2]=k[g>>2]|d;k[q+4>>2]=b;g=n<<24>>24==0;q=F+8272|0;k[q>>2]=g?c|f:2147483647;k[q+4>>2]=g?e:2147483647;q=h>>>0<8191?h:8191;Ze(R,y,q)|0;i[y+q>>0]=0;c:do if(!s){f=F+32|0;ne(y,f,2048)|0;c=(k[F+12>>2]|0)-h+-40+((k[C>>2]|0)>>>7&8^8)|0;if((c|0)>0){d=F+8224|0;g=F+8232|0;b=k[g>>2]|0;e=F+8228|0;k[e>>2]=c;if(b>>>0>>0){n=k[F+8236>>2]|0;if((n|0)!=0&c>>>0>n>>>0){k[Q>>2]=n;Jf(32944,53104,Q);Af(32944);n=k[g>>2]|0;b=k[e>>2]|0}else{n=b;b=c}e=n+32+(n>>>2)|0;b=b>>>0>e>>>0?b:e;e=zm(k[d>>2]|0,b)|0;if(!e)Af(32944);k[d>>2]=e;k[g>>2]=b}Ze(R,k[d>>2]|0,c)|0;if((hk(f,33096)|0)==0?(D=k[d>>2]|0,y=a+36176|0,D=$m(l[D+9>>0]<<8|l[D+8>>0]|l[D+10>>0]<<16|l[D+11>>0]<<24|0,0,9)|0,B=y,k[B>>2]=D,k[B+4>>2]=O,B=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0,D=O,x=y,x=hd(k[x>>2]|0,k[x+4>>2]|0,B,D)|0,A=a+36184|0,k[A>>2]=x,y,x=k[y>>2]|0,y=k[y+4>>2]|0,w=gn(B|0,D|0,200,0)|0,y=Vm(w|0,O|0,x|0,y|0)|0,D=hd(y,O,B,D)|0,B=k[A>>2]|0,(D|0)>(B|0)):0)k[A>>2]=B+1}if(!(hk(f,33112)|0))i[a+78270>>0]=1}else{if(!(k[C>>2]&512))k[F+32>>2]=0;else{af(w);B=(Zm(y|0)|0)+1|0;bf(w,y,y+B|0,h-B|0,F+32|0,2048)}Hc(y,x,2048);d=F+32|0;Xc(x,d,d,2048)|0;e=a+36172|0;b=k[(k[e>>2]|0)+49804>>2]|0;if((b|0)==1){ue(d)|0;b=k[(k[e>>2]|0)+49804>>2]|0}if((b|0)==2)te(d)|0;b=k[a+78264>>2]|0;if(((b|0)==2?(l[t>>0]|0)<20:0)?(k[u>>2]&16|0)!=0:0)i[v>>0]=1;c=k[o>>2]|0;do if((c|0)==2)if(!(i[v>>0]|0)){k[u>>2]=32;c=2;break}else{k[u>>2]=16;c=2;break}while(0);while(1){e=k[d>>2]|0;do if((e|0)==92){if((b|0)!=3){D=74;break}if(c){e=c;b=3;break}k[d>>2]=95;e=0;b=3}else if(!e)break c;else if((e|0)==47)D=74;else e=c;while(0);if((D|0)==74){D=0;k[d>>2]=47;e=c}c=e;d=d+4|0}}while(0);if(k[C>>2]&1024)Ze(R,F+8337|0,8)|0;lf(F+8240|0,z);d:do if(k[C>>2]&4096){f=Ue(R)|0;n=a+51072|0;k[I>>2]=n;k[I+4>>2]=a+51080;k[I+8>>2]=a+51088;k[I+12>>2]=0;f=f&65535;g=H+24|0;h=H+20|0;b=0;while(1){e=f>>>(3-b<<2);if(!((e&8|0)==0|(n|0)==0)){if(b)lf(n,Ve(R)|0);gf(n,H);if(e&4)k[h>>2]=(k[h>>2]|0)+1;k[g>>2]=0;e=e&3;if(e){c=e^3;d=0;do{D=((Te(R)|0)&255)<<(c+d<<3);k[g>>2]=k[g>>2]|D;d=d+1|0}while((d|0)<(e|0))}hf(n,H)}b=b+1|0;if((b|0)>=4)break d;n=k[I+(b<<2)>>2]|0}}while(0);D=p;H=L;D=Vm(k[H>>2]|0,k[H+4>>2]|0,k[D>>2]|0,k[D+4>>2]|0)|0;H=L;k[H>>2]=D;k[H+4>>2]=O;H=_e(R,(i[E>>0]|0)!=0)|0;if((k[F>>2]|0)!=(H&65535|0)?(i[a+78284>>0]=1,Kf(32944,1),!P):0){k[G+68>>2]=0;k[G+72>>2]=26;k[G>>2]=a+24;k[G+64>>2]=2;k[G+4>>2]=F+32}break}case 121:{H=a+77296|0;k[H+0>>2]=k[J+0>>2];k[H+4>>2]=k[J+4>>2];k[H+8>>2]=k[J+8>>2];k[H+12>>2]=k[J+12>>2];k[H+16>>2]=k[J+16>>2];H=Ve(R)|0;k[a+77316>>2]=H;H=Ue(R)|0;j[a+77320>>1]=H;H=Ue(R)|0;j[a+77322>>1]=H;break}case 119:{b=a+60016|0;k[b+0>>2]=k[J+0>>2];k[b+4>>2]=k[J+4>>2];k[b+8>>2]=k[J+8>>2];k[b+12>>2]=k[J+12>>2];k[b+16>>2]=k[J+16>>2];H=Ve(R)|0;k[a+60036>>2]=H;G=L;H=Vm(k[G>>2]|0,k[G+4>>2]|0,H|0,0)|0;G=L;k[G>>2]=H;k[G+4>>2]=O;G=Ue(R)|0;H=a+60040|0;j[H>>1]=G;G=Te(R)|0;i[a+60042>>0]=G;switch(m[H>>1]|0){case 257:{c=a+77324|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[c+12>>2]=k[b+12>>2];k[c+16>>2]=k[b+16>>2];k[c+20>>2]=k[b+20>>2];j[c+24>>1]=j[b+24>>1]|0;i[c+26>>0]=i[b+26>>0]|0;c=Ue(R)|0;e=a+77352|0;j[e>>1]=c;c=Ue(R)|0;d=a+77354|0;j[d>>1]=c;b=j[e>>1]|0;if((b&65535)>255){j[e>>1]=255;b=255}if((c&65535)>255)j[d>>1]=255;Ze(R,a+77356|0,b&65535)|0;Ze(R,a+77612|0,m[d>>1]|0)|0;i[a+(m[e>>1]|0)+77356>>0]=0;i[a+(m[d>>1]|0)+77612>>0]=0;break b}case 258:{H=a+77868|0;k[H+0>>2]=k[b+0>>2];k[H+4>>2]=k[b+4>>2];k[H+8>>2]=k[b+8>>2];k[H+12>>2]=k[b+12>>2];k[H+16>>2]=k[b+16>>2];k[H+20>>2]=k[b+20>>2];j[H+24>>1]=j[b+24>>1]|0;i[H+26>>0]=i[b+26>>0]|0;H=Ve(R)|0;k[a+77896>>2]=H;H=Ve(R)|0;k[a+77900>>2]=H;break b}case 260:case 259:case 256:{H=a+77904|0;k[H+0>>2]=k[b+0>>2];k[H+4>>2]=k[b+4>>2];k[H+8>>2]=k[b+8>>2];k[H+12>>2]=k[b+12>>2];k[H+16>>2]=k[b+16>>2];k[H+20>>2]=k[b+20>>2];j[H+24>>1]=j[b+24>>1]|0;i[H+26>>0]=i[b+26>>0]|0;H=Ve(R)|0;k[a+77932>>2]=H;H=Te(R)|0;i[a+77936>>0]=H;H=Te(R)|0;i[a+77937>>0]=H;H=Ve(R)|0;k[a+77940>>2]=H;break b}case 261:{G=a+77944|0;k[G+0>>2]=k[b+0>>2];k[G+4>>2]=k[b+4>>2];k[G+8>>2]=k[b+8>>2];k[G+12>>2]=k[b+12>>2];k[G+16>>2]=k[b+16>>2];k[G+20>>2]=k[b+20>>2];j[G+24>>1]=j[b+24>>1]|0;i[G+26>>0]=i[b+26>>0]|0;G=Ve(R)|0;k[a+77972>>2]=G;G=Te(R)|0;i[a+77976>>0]=G;G=Te(R)|0;i[a+77977>>0]=G;G=Ve(R)|0;k[a+77980>>2]=G;G=Ue(R)|0;H=a+77984|0;G=(G&65535)>259?259:G;j[H>>1]=G;Ze(R,a+77986|0,G&65535)|0;i[a+(m[H>>1]|0)+77986>>0]=0;break b}default:break b}}case 118:{H=a+77268|0;k[H+0>>2]=k[J+0>>2];k[H+4>>2]=k[J+4>>2];k[H+8>>2]=k[J+8>>2];k[H+12>>2]=k[J+12>>2];k[H+16>>2]=k[J+16>>2];H=Te(R)|0;i[a+77288>>0]=H;H=Te(R)|0;i[a+77289>>0]=H;H=Te(R)|0;i[a+77290>>0]=H;H=Ve(R)|0;k[a+77292>>2]=H;break}case 117:{H=a+77200|0;k[H+0>>2]=k[J+0>>2];k[H+4>>2]=k[J+4>>2];k[H+8>>2]=k[J+8>>2];k[H+12>>2]=k[J+12>>2];k[H+16>>2]=k[J+16>>2];H=Ue(R)|0;j[a+77220>>1]=H;H=Te(R)|0;i[a+77222>>0]=H;H=Te(R)|0;i[a+77223>>0]=H;H=Ue(R)|0;j[a+77224>>1]=H;break}case 5:{b=a+59984|0;k[b+0>>2]=k[J+0>>2];k[b+4>>2]=k[J+4>>2];k[b+8>>2]=k[J+8>>2];k[b+12>>2]=k[J+12>>2];k[b+16>>2]=k[J+16>>2];b=k[a+59992>>2]|0;i[a+60012>>0]=b&1;H=b>>>1&1;i[a+60013>>0]=H;i[a+60014>>0]=b>>>2&1;c=a+60015|0;b=b>>>3&1;i[c>>0]=b;if(H<<24>>24){b=Ve(R)|0;k[a+60004>>2]=b;b=i[c>>0]|0}if(b<<24>>24){H=(Ue(R)|0)&65535;k[a+60008>>2]=H;k[a+78304>>2]=H}break}case 120:{H=a+77228|0;k[H+0>>2]=k[J+0>>2];k[H+4>>2]=k[J+4>>2];k[H+8>>2]=k[J+8>>2];k[H+12>>2]=k[J+12>>2];k[H+16>>2]=k[J+16>>2];H=Ve(R)|0;F=a+77248|0;k[F>>2]=H;H=Te(R)|0;i[a+77252>>0]=H;H=Ue(R)|0;G=a+77254|0;j[G>>1]=H;H=Ve(R)|0;k[a+77256>>2]=H;Ze(R,a+77260|0,8)|0;H=L;F=Vm(k[H>>2]|0,k[H+4>>2]|0,k[F>>2]|0,0)|0;H=L;k[H>>2]=F;k[H+4>>2]=O;H=a+36176|0;k[H>>2]=m[G>>1]<<9;k[H+4>>2]=0;break}default:if(k[c>>2]&32768){G=Ve(R)|0;H=L;G=Vm(k[H>>2]|0,k[H+4>>2]|0,G|0,0)|0;H=L;k[H>>2]=G;k[H+4>>2]=O}}while(0);H=_e(R,0)|0;do if((k[J>>2]|0)!=(H&65535|0)){b=k[K>>2]|0;if((b|0)==118|(b|0)==121)break;else if((b|0)==5?(i[a+60014>>0]|0)!=0:0){d=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;e=O;c=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;b=k[(k[a>>2]|0)+16>>2]|0;c=Vm(c|0,O|0,-7,-1)|0;sc[b&15](a,c,O,0);c=0;b=1;do{K=(xd(a)|0)<<24>>24==0;b=K?b:0;c=c+1|0}while((c|0)<7);sc[k[(k[a>>2]|0)+16>>2]&15](a,d,e,0);if(b&1)break}i[a+78284>>0]=1;Kf(32944,3);if(P){c=a+24|0;k[Q+68>>2]=0;k[Q+72>>2]=4;k[Q>>2]=c;k[Q+64>>2]=2;k[Q+4>>2]=c;i[a+78285>>0]=1;c=0;break a}}while(0);J=k[L+4>>2]|0;K=k[M+4>>2]|0;if((J|0)>(K|0)|((J|0)==(K|0)?(k[L>>2]|0)>>>0>(k[M>>2]|0)>>>0:0)){c=k[N>>2]|0;break}else{k[Q+68>>2]=0;k[Q+72>>2]=24;k[Q+64>>2]=1;k[Q>>2]=a+24;i[a+78284>>0]=1;Kf(32944,3);c=0;break}}while(0);b=k[R>>2]|0;if(!b){r=S;return c|0}ym(b);r=S;return c|0}function de(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=r;r=r+8480|0;B=D;z=D+144|0;C=D+112|0;c=D+8464|0;d=D+224|0;o=D+232|0;n=D+240|0;u=D+272|0;Qe(C,a);h=a+78276|0;do if((i[h>>0]|0)!=0?(e=a+78248|0,v=e,x=k[v>>2]|0,v=k[v+4>>2]|0,y=Vm(k[a+78280>>2]|0,0,8,0)|0,w=O,(v|0)>(w|0)|(v|0)==(w|0)&x>>>0>y>>>0):0){if(!(ge(a)|0)){i[a+78285>>0]=1;c=0;break}if((kc[k[(k[a>>2]|0)+12>>2]&31](a,c,16)|0)!=16){b=ud(a)|0;c=O;z=e;if(((k[z>>2]|0)==(b|0)?(k[z+4>>2]|0)==(c|0):0)?(z=a+78256|0,(k[z>>2]|0)==(b|0)?(k[z+4>>2]|0)==(c|0):0):0){c=0;break}k[B+68>>2]=0;k[B+72>>2]=55;k[B+64>>2]=1;k[B>>2]=a+24;Kf(32944,1);c=0;break}b=a+8220|0;Ke(b,0,5,(k[a+36172>>2]|0)+40996|0,a+42804|0,c,k[a+42800>>2]|0,0,d)|0;if((i[a+42796>>0]|0)!=0?(Mm(d,a+42820|0,8)|0)!=0:0){k[B+68>>2]=0;k[B+72>>2]=6;k[B+64>>2]=1;k[B>>2]=a+24;i[a+78285>>0]=1;Kf(32944,11);c=0;break}k[C+28>>2]=b;f=1;A=13}else{f=0;A=13}while(0);a:do if((A|0)==13){if((Re(C,7)|0)>>>0<7){b=ud(a)|0;c=O;A=a+78248|0;if(((k[A>>2]|0)==(b|0)?(k[A+4>>2]|0)==(c|0):0)?(A=a+78256|0,(k[A>>2]|0)==(b|0)?(k[A+4>>2]|0)==(c|0):0):0){c=0;break}k[B+68>>2]=0;k[B+72>>2]=55;k[B+64>>2]=1;k[B>>2]=a+24;Kf(32944,1);c=0;break}m=a+42680|0;d=a+42696|0;i[d>>0]=0;b=Ve(C)|0;k[m>>2]=b;b=Ye(C,4)|0;e=Xe(C)|0;if((e|0)==0&(O|0)==0|(b|0)==0){k[B+68>>2]=0;k[B+72>>2]=24;k[B+64>>2]=1;k[B>>2]=a+24;i[a+78284>>0]=1;Kf(32944,3);c=0;break}c=b+-3+e|0;e=b+4+e|0;if((c|0)<0|e>>>0<7){k[B+68>>2]=0;k[B+72>>2]=24;k[B+64>>2]=1;k[B>>2]=a+24;i[a+78284>>0]=1;Kf(32944,3);c=0;break}Re(C,c)|0;y=C+20|0;if((k[y>>2]|0)>>>0>>0){b=ud(a)|0;c=O;A=a+78248|0;if(((k[A>>2]|0)==(b|0)?(k[A+4>>2]|0)==(c|0):0)?(A=a+78256|0,(k[A>>2]|0)==(b|0)?(k[A+4>>2]|0)==(c|0):0):0){c=0;break}k[B+68>>2]=0;k[B+72>>2]=55;k[B+64>>2]=1;k[B>>2]=a+24;Kf(32944,1);c=0;break}w=$e(C)|0;b=Xe(C)|0;g=a+42684|0;k[g>>2]=b;b=Xe(C)|0;q=a+42688|0;k[q>>2]=b;i[d>>0]=b>>>2&1;d=a+42692|0;k[d>>2]=e;j=a+36204|0;k[j>>2]=k[g>>2];w=(k[m>>2]|0)!=(w|0);do if(w){b=a+24|0;k[B+68>>2]=0;k[B+72>>2]=24;k[B+64>>2]=1;k[B>>2]=b;x=a+78284|0;i[x>>0]=1;Kf(32944,3);i[x>>0]=1;Kf(32944,3);if(f){k[B+68>>2]=0;k[B+72>>2]=4;k[B>>2]=b;k[B+64>>2]=2;k[B+4>>2]=b;i[a+78285>>0]=1;c=0;break a}else{b=k[q>>2]|0;break}}while(0);do if(b&1){e=Xe(C)|0;c=O;if(c>>>0<0|((c|0)==0?e>>>0<(k[d>>2]|0)>>>0:0)){b=k[q>>2]|0;t=e;s=c;break}else{k[B+68>>2]=0;k[B+72>>2]=24;k[B+64>>2]=1;k[B>>2]=a+24;i[a+78284>>0]=1;Kf(32944,3);c=0;break a}}else{t=0;s=0}while(0);if(!(b&2)){e=0;c=0}else{e=Xe(C)|0;c=O}x=a+78248|0;v=x;b=k[v>>2]|0;v=k[v+4>>2]|0;f=Wd(a,k[d>>2]|0)|0;v=Vm(b|0,v|0,e|0,c|0)|0;f=Vm(v|0,O|0,f|0,0)|0;v=a+78256|0;b=v;k[b>>2]=f;k[b+4>>2]=O;b=k[g>>2]|0;switch(b|0){case 4:{A=a+42776|0;k[A+0>>2]=k[m+0>>2];k[A+4>>2]=k[m+4>>2];k[A+8>>2]=k[m+8>>2];k[A+12>>2]=k[m+12>>2];k[A+16>>2]=k[m+16>>2];if(Xe(C)|0){c=a+24|0;k[B+68>>2]=0;k[B+72>>2]=32;k[B>>2]=c;k[B+64>>2]=2;k[B+4>>2]=c;Kf(32944,1);c=0;break a}A=Xe(C)|0;b=a+42796|0;i[b>>0]=A&1;A=Te(C)|0;k[a+42800>>2]=A&255;if((A&255)>24){c=a+24|0;k[B+68>>2]=0;k[B+72>>2]=32;k[B>>2]=c;k[B+64>>2]=2;k[B+4>>2]=c;Kf(32944,1);c=0;break a}Ze(C,a+42804|0,16)|0;if(i[b>>0]|0){A=a+42820|0;Ze(C,A,8)|0;Ze(C,o,4)|0;rg(B);sg(B,A,8);tg(B,n);A=(Mm(o,n,4)|0)==0&1;i[b>>0]=A}i[h>>0]=1;break}case 3:case 2:{n=(b|0)==2?a+42832|0:a+60048|0;di(n,0);k[n+0>>2]=k[m+0>>2];k[n+4>>2]=k[m+4>>2];k[n+8>>2]=k[m+8>>2];k[n+12>>2]=k[m+12>>2];k[n+16>>2]=k[m+16>>2];m=(k[g>>2]|0)==2;i[n+8425>>0]=1;d=n+8264|0;b=d;k[b>>2]=e;k[b+4>>2]=c;b=Xe(C)|0;f=n+8324|0;k[f>>2]=b;b=Xe(C)|0;e=O;c=n+8272|0;p=c;k[p>>2]=b;k[p+4>>2]=e;p=(k[f>>2]|0)>>>3&1;i[n+8330>>0]=p;if(p){e=c;k[e>>2]=2147483647;k[e+4>>2]=2147483647;e=2147483647;b=2147483647}p=d;h=k[p>>2]|0;p=k[p+4>>2]|0;o=(p|0)>(e|0)|(p|0)==(e|0)&h>>>0>b>>>0;j=n+8280|0;k[j>>2]=o?h:b;k[j+4>>2]=o?p:e;b=Xe(C)|0;j=n+28|0;k[j>>2]=b;b=k[f>>2]|0;if(b&2){ef(n+8240|0,Ve(C)|0)|0;b=k[f>>2]|0}e=n+8288|0;k[e>>2]=0;if(b&4){k[e>>2]=2;p=Ve(C)|0;k[n+8292>>2]=p}k[n+8432>>2]=0;e=Xe(C)|0;i[n+26>>0]=e>>>7&7;g=n+25|0;i[g>>0]=e&63;c=Xe(C)|0;b=n+24|0;i[b>>0]=c;c=Xe(C)|0;i[n+8424>>0]=(k[q>>2]|0)>>>6&1;d=n+8428|0;k[d>>2]=2;b=i[b>>0]|0;if(b<<24>>24==1)k[d>>2]=1;else if(!(b<<24>>24))k[d>>2]=0;q=k[n+8>>2]|0;i[n+8328>>0]=q>>>3&1;i[n+8329>>0]=q>>>4&1;i[n+8426>>0]=q>>>5&1;if(m)b=e>>>6&1;else b=0;i[n+8416>>0]=b;q=k[f>>2]&1;f=n+8417|0;i[f>>0]=q;if(!q)b=131072<<(e>>>10&15);else b=0;k[n+8420>>2]=b;k[n+8332>>2]=(i[n+8331>>0]|0)!=0?5:0;h=c>>>0<8191?c:8191;Ze(C,u,h)|0;i[u+h>>0]=0;h=n+32|0;re(u,h,2048)|0;if(!((t|0)==0&(s|0)==0))he(a,C,t,n);b:do if(!m){if(!(hk(h,33112)|0))i[a+78270>>0]=1}else{e=a+36172|0;b=k[(k[e>>2]|0)+49804>>2]|0;if((b|0)==1){ue(h)|0;b=k[(k[e>>2]|0)+49804>>2]|0}if((b|0)==2)te(h)|0;b=k[a+78264>>2]|0;do if((b|0)==2){if((l[g>>0]|0)>=20)break;if(!(k[j>>2]&16))break;i[f>>0]=1}while(0);d=k[d>>2]|0;do if((d|0)==2)if(!(i[f>>0]|0)){k[j>>2]=32;d=2;e=h;break}else{k[j>>2]=16;d=2;e=h;break}else e=h;while(0);while(1){c=k[e>>2]|0;do if((c|0)==92){if((b|0)!=3){A=86;break}if(d){b=3;break}k[e>>2]=95;d=0;b=3}else if((c|0)==47)A=86;else if(!c)break b;while(0);if((A|0)==86){A=0;k[e>>2]=47}e=e+4|0}}while(0);if(w){k[z+68>>2]=0;k[z+72>>2]=26;k[z>>2]=a+24;k[z+64>>2]=2;k[z+4>>2]=h}break}case 1:{e=a+42712|0;ei(e);k[e+0>>2]=k[m+0>>2];k[e+4>>2]=k[m+4>>2];k[e+8>>2]=k[m+8>>2];k[e+12>>2]=k[m+12>>2];k[e+16>>2]=k[m+16>>2];A=Xe(C)|0;b=a+78269|0;c=A&1;i[b>>0]=c;i[a+78268>>0]=A>>>2&1;i[a+78271>>0]=A>>>4&1;i[a+78275>>0]=A>>>3&1;i[a+78272>>0]=0;i[a+78274>>0]=1;if(!(A&2)){k[a+78304>>2]=0;b=0}else{A=Xe(C)|0;k[a+78304>>2]=A;c=i[b>>0]|0;b=A}if(!(c<<24>>24))b=0;else b=(b|0)==0&1;i[a+78273>>0]=b;if(!((t|0)==0&(s|0)==0))he(a,C,t,e);if(((i[a+42742>>0]|0)!=0?(p=a+42744|0,A=p,!((k[A>>2]|0)==0&(k[A+4>>2]|0)==0)):0)?(k[(k[a+36172>>2]|0)+16400>>2]|0)!=0:0){t=x;s=k[t>>2]|0;t=k[t+4>>2]|0;w=v;u=k[w>>2]|0;w=k[w+4>>2]|0;A=k[j>>2]|0;q=a+36216|0;Mi(q,a,0);z=p;Oi(q,k[z>>2]|0,k[z+4>>2]|0);z=x;k[z>>2]=s;k[z+4>>2]=t;z=v;k[z>>2]=u;k[z+4>>2]=w;k[j>>2]=A}break}case 5:{A=a+59984|0;k[A+0>>2]=k[m+0>>2];k[A+4>>2]=k[m+4>>2];k[A+8>>2]=k[m+8>>2];k[A+12>>2]=k[m+12>>2];k[A+16>>2]=k[m+16>>2];A=Xe(C)|0;i[a+60012>>0]=A&1;i[a+60015>>0]=0;i[a+60013>>0]=0;i[a+60014>>0]=0;break}default:{}}z=v;w=k[z+4>>2]|0;A=x;x=k[A+4>>2]|0;if((w|0)>(x|0)|((w|0)==(x|0)?(k[z>>2]|0)>>>0>(k[A>>2]|0)>>>0:0)){c=k[y>>2]|0;break}else{k[B+68>>2]=0;k[B+72>>2]=24;k[B+64>>2]=1;k[B>>2]=a+24;i[a+78284>>0]=1;Kf(32944,3);c=0;break}}while(0);b=k[C>>2]|0;if(!b){r=D;return c|0}ym(b);r=D;return c|0}function ee(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;e=a+36204|0;c=ae(a)|0;if(!c){a=0;return a|0}if((b|0)==5){d=1;while(1){if(!(d&127))xe();if((k[e>>2]|0)==5){d=12;break}Vd(a);c=ae(a)|0;if(!c){c=0;d=12;break}else d=d+1|0}if((d|0)==12)return c|0}else{f=c;g=1}while(1){if((k[e>>2]|0)==5){c=0;d=12;break}if(!(g&127))xe();if((k[e>>2]|0)==(b|0)){c=f;d=12;break}Vd(a);f=ae(a)|0;if(!f){c=0;d=12;break}else g=g+1|0}if((d|0)==12)return c|0;return 0}function fe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;e=a+60080|0;c=ae(a)|0;if(!c){a=0;return a|0}f=a+36204|0;while(1){d=k[f>>2]|0;if((d|0)==3){if(!(hk(e,b)|0)){d=6;break}}else if((d|0)==5){c=0;d=6;break}Vd(a);c=ae(a)|0;if(!c){c=0;d=6;break}}if((d|0)==6)return c|0;return 0}function ge(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;g=r;r=r+640|0;e=g;d=g+512|0;b=a+36172|0;a=k[b>>2]|0;if(i[a+41508>>0]|0){f=1;r=g;return f|0}c=k[a+75184>>2]|0;if(c){k[e>>2]=0;if((pc[c&15](4,k[a+75180>>2]|0,e,128)|0)!=-1){if(!(k[e>>2]|0))f=6}else{k[e>>2]=0;f=6}if((f|0)==6){i[d>>0]=0;f=k[b>>2]|0;if((pc[k[f+75184>>2]&15](2,k[f+75180>>2]|0,d,128)|0)==-1)i[d>>0]=0;Xc(d,0,e,128)|0;_f(d,128)}Yf((k[b>>2]|0)+40996|0,e);_f(e,512);a=k[b>>2]|0;if(i[a+41508>>0]|0){i[a+41513>>0]=1;f=1;r=g;return f|0}}k[a+75176>>2]=22;f=0;r=g;return f|0}function he(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;ma=r;r=r+8320|0;la=ma;ka=ma+8304|0;ia=ma+8272|0;ja=ma+8192|0;ca=b+20|0;e=(k[ca>>2]|0)-c|0;fa=b+24|0;if(e>>>0<(k[fa>>2]|0)>>>0){r=ma;return}k[fa>>2]=e;if(c>>>0<=1){r=ma;return}$=d+4|0;aa=d+30|0;ba=a+78248|0;A=d+48|0;B=d+32|0;C=d+8369|0;D=d+8378|0;E=d+8412|0;F=a+24|0;G=la+64|0;H=la+68|0;I=la+72|0;J=la+4|0;K=d+8337|0;L=d+8353|0;M=d+8336|0;N=d+8332|0;P=d+8331|0;Q=d+8370|0;R=la+64|0;S=la+68|0;T=la+72|0;U=la+4|0;V=d+8288|0;W=V+4|0;X=d+8256|0;Y=d+8248|0;Z=d+8240|0;_=d+8419|0;o=a+42864|0;p=d+8432|0;q=d+16628|0;s=d+8436|0;t=d+16630|0;u=d+16631|0;v=d+16888|0;w=d+16632|0;x=d+16629|0;y=d+17148|0;z=d+17144|0;j=d+8224|0;l=j+8|0;m=j+4|0;n=j+12|0;while(1){e=Xe(b)|0;d=O;if((e|0)==0&(d|0)==0){e=67;break}h=k[ca>>2]|0;c=k[fa>>2]|0;if((h|0)==(c|0)|((d|0)>0|(d|0)==0&e>>>0>(h-c|0)>>>0)){e=67;break}h=Vm(c|0,0,e|0,d|0)|0;e=Xe(b)|0;d=O;c=k[ca>>2]|0;a=k[fa>>2]|0;g=c-a|0;if((k[$>>2]|0)==1&((e|0)==1&(d|0)==0)){i[aa>>0]=1;f=Xe(b)|0;if((f&1|0)!=0?(ga=Xe(b)|0,ha=O,!((ga|0)==0&(ha|0)==0)):0){oa=ba;oa=Vm(k[oa>>2]|0,k[oa+4>>2]|0,ga|0,ha|0)|0;na=B;k[na>>2]=oa;k[na+4>>2]=O}if((f&2|0)!=0?(da=Xe(b)|0,ea=O,!((da|0)==0&(ea|0)==0)):0){oa=ba;oa=Vm(k[oa>>2]|0,k[oa+4>>2]|0,da|0,ea|0)|0;na=A;k[na>>2]=oa;k[na+4>>2]=O}}a:do if((k[$>>2]&-2|0)==2)switch(e|0){case 3:{if(d)break a;if(g>>>0<=8)break a;e=Xe(b)|0;do if(e&2)if((e&1|0)==0&0==0){na=We(b)|0;jf(Z,na,O);break}else{ef(Z,Ve(b)|0)|0;break}while(0);do if(e&4)if((e&1|0)==0&0==0){na=We(b)|0;jf(Y,na,O);break}else{ef(Y,Ve(b)|0)|0;break}while(0);if(!(e&8))break a;if((e&1|0)==0&0==0){na=We(b)|0;jf(X,na,O);break a}else{ef(X,Ve(b)|0)|0;break a}}case 6:{if(d)break a;e=Xe(b)|0;i[t>>0]=e>>>2&1;i[u>>0]=e>>>3&1;i[v>>0]=0;i[w>>0]=0;if(e&1){na=Xe(b)|0;na=na>>>0<255?na:255;Ze(b,w,na)|0;i[w+na>>0]=0}if(e&2){na=Xe(b)|0;na=na>>>0<255?na:255;Ze(b,v,na)|0;i[v+na>>0]=0}if(i[t>>0]|0){na=Xe(b)|0;k[z>>2]=na}if(i[u>>0]|0){na=Xe(b)|0;k[y>>2]=na}i[x>>0]=1;break a}case 7:{if(d)break a;e=k[l>>2]|0;k[m>>2]=g;if(e>>>0>>0){d=k[n>>2]|0;if((d|0)!=0&g>>>0>d>>>0){k[la>>2]=d;Jf(32944,53104,la);Af(32944);e=k[l>>2]|0;d=k[m>>2]|0}else d=g;e=e+32+(e>>>2)|0;e=d>>>0>e>>>0?d:e;d=zm(k[j>>2]|0,e)|0;if(!d)Af(32944);k[j>>2]=d;k[l>>2]=e}Ze(b,k[j>>2]|0,g)|0;break a}case 4:{if(d)break a;if((c|0)==(a|0))break a;Xe(b)|0;e=Xe(b)|0;if(!e)break a;i[_>>0]=1;k[la>>2]=e;bk(ja,20,33128,la)|0;Mc(o,ja,2048)|0;break a}case 2:{if(d)break a;if(Xe(b)|0)break a;k[V>>2]=3;Ze(b,W,32)|0;break a}case 5:{if(d)break a;e=Xe(b)|0;k[p>>2]=e;e=Xe(b)|0;i[q>>0]=e&1;e=Xe(b)|0;i[la>>0]=0;if(e>>>0<8191){Ze(b,la,e)|0;i[la+e>>0]=0}re(la,s,2048)|0;break a}case 1:{if(d)break a;if(Xe(b)|0){k[S>>2]=0;k[T>>2]=32;k[la>>2]=F;k[R>>2]=2;k[U>>2]=B;Kf(32944,1);break a}na=Xe(b)|0;i[C>>0]=na&1;i[D>>0]=na>>>1&1;na=Te(b)|0;k[E>>2]=na&255;if((na&255)>24){k[H>>2]=0;k[I>>2]=32;k[la>>2]=F;k[G>>2]=2;k[J>>2]=B;Kf(32944,1)}Ze(b,K,16)|0;Ze(b,L,16)|0;if(i[C>>0]|0){Ze(b,Q,8)|0;Ze(b,ka,4)|0;rg(la);sg(la,Q,8);tg(la,ia);na=(Mm(ka,ia,4)|0)==0&1;i[C>>0]=na}i[M>>0]=1;k[N>>2]=5;i[P>>0]=1;break a}default:break a}while(0);k[fa>>2]=h;if(((k[ca>>2]|0)-h|0)>>>0<=1){e=67;break}}if((e|0)==67){r=ma;return}}function ie(a){a=a|0;return (i[a+51249>>0]|0)!=0|0}function je(a){a=a|0;var b=0,c=0;if((k[8286]|0)==-1){c=Pa(18)|0;k[8286]=c;Pa(c|0)|0}b=k[a+51260>>2]|0;if((b|0)==1)return;else if(!b){a=a+42860|0;c=k[a>>2]|0;if(c&16){k[a>>2]=k[8286]&511^511;return}b=~k[8286];if(!(c&1)){k[a>>2]=b&438;return}else{k[a>>2]=b&292;return}}else{b=~k[8286];if(!(i[a+51249>>0]|0)){k[a+42860>>2]=b&33206;return}else{k[a+42860>>2]=b&16895;return}}}function ke(a){a=a|0;var b=0,c=0,d=0;c=(k[a+42708>>2]|0)+(k[a+78280>>2]|0)|0;b=k[a+42724>>2]|0;if((k[a+78264>>2]|0)!=2){d=k[a+42788>>2]|0;b=(Wd(a,b)|0)+d|0}c=Vm(b|0,0,c|0,0)|0;return c|0}function le(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;u=r;r=r+59200|0;s=u+59112|0;t=u;if(i[a+78284>>0]|0){k[s+68>>2]=0;k[s+72>>2]=27;k[s+64>>2]=1;k[s>>2]=a+24;Kf(32944,3);t=0;r=u;return t|0}n=a+60048|0;q=a+60074|0;if((l[q>>0]|0)<=5?(o=a+60073|0,(l[o>>0]|0)>>>0<=((k[a+78264>>2]|0)==3?0:29)>>>0):0){m=a+68312|0;p=m;if((k[p>>2]|0)==0&(k[p+4>>2]|0)==0?(i[a+68377>>0]|0)==0:0){t=1;r=u;return t|0}p=a+14576|0;of(p);Sh(t,p);Uh(t,k[a+68468>>2]|0,0);do if(!c){j=a+68320|0;h=j;d=k[h>>2]|0;h=k[h+4>>2]|0;if((h|0)>0|(h|0)==0&d>>>0>16777216){k[s+68>>2]=0;k[s+72>>2]=28;k[s+64>>2]=1;k[s>>2]=a+24;d=0;break}h=b+8|0;g=k[h>>2]|0;f=b+4|0;k[f>>2]=d;if(g>>>0>>0){e=k[b+12>>2]|0;if((e|0)!=0&d>>>0>e>>>0){k[s>>2]=e;Jf(32944,53104,s);Af(32944);g=k[h>>2]|0;d=k[f>>2]|0}g=g+32+(g>>>2)|0;d=d>>>0>g>>>0?d:g;g=zm(k[b>>2]|0,d)|0;if(!g)Af(32944);k[b>>2]=g;k[h>>2]=d;d=k[j>>2]|0}vf(p,k[b>>2]|0,d);g=18}else g=18;while(0);do if((g|0)==18){if(i[a+68379>>0]|0){d=k[a+36172>>2]|0;if(!(i[d+41508>>0]|0)){d=0;break}tf(p,0,k[a+68380>>2]|0,d+40996|0,(i[a+68384>>0]|0)==0?0:a+68385|0,a+68401|0,k[a+68460>>2]|0,a+68418|0,a+68427|0)}f=a+33248|0;g=a+68336|0;Eg(f,k[g>>2]|0,1);d=k[m+4>>2]|0;e=a+14608|0;k[e>>2]=k[m>>2];k[e+4>>2]=d;i[a+14616>>0]=0;rf(p,a,c);i[a+27353>>0]=i[a+68377>>0]|0;k[a+14632>>2]=n;k[a+14636>>2]=0;e=a+68320|0;d=k[e>>2]|0;e=k[e+4>>2]|0;m=t+19520|0;k[m>>2]=d;k[m+4>>2]=e;i[t+19544>>0]=0;if(!(i[q>>0]|0))bh(p,d,e);else Vh(t,l[o>>0]|0,0);if(!(Ig(f,g,(i[a+68426>>0]|0)==0?0:a+68427|0)|0)){k[s+68>>2]=0;k[s+72>>2]=29;k[s>>2]=a+24;k[s+64>>2]=2;k[s+4>>2]=a+60080;Kf(32944,3);if(!b)d=0;else{d=k[b>>2]|0;if(d){ym(d);k[b>>2]=0}k[b+4>>2]=0;k[b+8>>2]=0;d=0}}else d=1}while(0);Th(t);t=d;r=u;return t|0}k[s+68>>2]=0;k[s+72>>2]=28;k[s+64>>2]=1;k[s>>2]=a+24;t=0;r=u;return t|0}function me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;l=r;r=r+32|0;j=l+8|0;e=l;d=l+16|0;i[b>>0]=0;a:do if(!(gk(a,65534)|0)){h=e;k[h>>2]=0;k[h+4>>2]=0;k[d>>2]=a;d=ak(b,d,c,e)|0;if(!d){d=(k[a>>2]|0)==0&1;break}else if((d|0)==-1){d=0;break}else{d=1;break}}else{h=c+-4|0;if(!h)d=1;else{d=1;e=0;f=0;b:while(1){while(1){g=k[a+(f<<2)>>2]|0;if(!g)break b;else if((g|0)!=65534)break;f=f+1|0}if((g&-128|0)==57472){i[b+e>>0]=g;e=e+1|0}else{n=j;k[n>>2]=0;k[n+4>>2]=0;n=b+e|0;m=(Fm(n,g,j)|0)==-1;g=j;k[g>>2]=0;k[g+4>>2]=0;g=Xj(n,4,j)|0;d=m?0:d;e=((g|0)>1?g:1)+e|0}if(e>>>0>>0)f=f+1|0;else break a}i[b+e>>0]=0}}while(0);if(!c){n=d<<24>>24!=0;r=l;return n|0}i[b+(c+-1)>>0]=0;n=d<<24>>24!=0;r=l;return n|0}function ne(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;m=r;r=r+32|0;l=m+8|0;d=m;h=m+16|0;k[b>>2]=0;j=d;k[j>>2]=0;k[j+4>>2]=0;k[h>>2]=a;d=Zj(b,h,c,d)|0;if((d|0)==-1)e=3;else if((d|0)==0?(i[a>>0]|0)!=0:0)e=3;else d=1;a:do if((e|0)==3)if(c>>>0>1){g=0;j=0;e=0;b:while(1){d=g;h=e;while(1){f=a+h|0;if(!(i[f>>0]|0))break b;e=l;k[e>>2]=0;k[e+4>>2]=0;e=b+(d<<2)|0;if((Yj(e,f,4,l)|0)==-1){g=f;break}e=l;k[e>>2]=0;k[e+4>>2]=0;e=Xj(f,4,l)|0;d=d+1|0;if(d>>>0>=c>>>0){d=0;break a}else h=((e|0)>1?e:1)+h|0}f=i[g>>0]|0;if(f<<24>>24>=0){d=0;break a}if(!j){d=d+1|0;k[e>>2]=65534;if(d>>>0>=c>>>0){d=0;break a}f=i[g>>0]|0}g=d+1|0;k[b+(d<<2)>>2]=f&255|57344;if(g>>>0>=c>>>0){d=0;break a}else{j=1;e=h+1|0}}k[b+(d<<2)>>2]=0;d=1}else d=0;while(0);if(!c){c=d<<24>>24!=0;r=m;return c|0}k[b+(c+-1<<2)>>2]=0;c=d<<24>>24!=0;r=m;return c|0}function oe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(!c)return b|0;else d=0;while(1){e=d<<1;i[b+e>>0]=k[a>>2];i[b+(e|1)>>0]=(k[a>>2]|0)>>>8;if(!(k[a>>2]|0)){a=4;break}d=d+1|0;if(d>>>0>=c>>>0){a=4;break}else a=a+4|0}if((a|0)==4)return b|0;return 0}function pe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(!c)return b|0;else d=0;do{e=d<<1;e=(l[a+(e|1)>>0]|0)<<8|(l[a+e>>0]|0);k[b+(d<<2)>>2]=e;d=d+1|0}while((e|0)!=0&d>>>0>>0);return b|0}function qe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=k[a>>2]|0;if(!d){g=b;i[g>>0]=0;return}c=c+-1|0;a:while(1){while(1){e=c+-1|0;if((c|0)<=0){f=21;break a}f=a+4|0;if(d>>>0<128){a=f;c=e;f=6;break}if(d>>>0<2048){c=c+-2|0;if((c|0)>-1){a=f;f=10;break}}else c=e;if((d&-1024|0)==55296?(g=k[f>>2]|0,(g&-1024|0)==56320):0){a=a+8|0;d=(d<<10)+-56613888+g|0}else a=f;if(d>>>0<65536){c=c+-2|0;if((c|0)>-1){f=16;break}}if(d>>>0<2097152){c=c+-3|0;if((c|0)>-1){f=20;break}}d=k[a>>2]|0;if(!d){f=21;break a}}if((f|0)==6){i[b>>0]=d;b=b+1|0}else if((f|0)==10){i[b>>0]=d>>>6|192;i[b+1>>0]=d&63|128;b=b+2|0}else if((f|0)==16){i[b>>0]=d>>>12|224;i[b+1>>0]=d>>>6&63|128;i[b+2>>0]=d&63|128;b=b+3|0}else if((f|0)==20){i[b>>0]=d>>>18|240;i[b+1>>0]=d>>>12&63|128;i[b+2>>0]=d>>>6&63|128;i[b+3>>0]=d&63|128;b=b+4|0}d=k[a>>2]|0;if(!d){f=21;break}}if((f|0)==21){i[b>>0]=0;return}}function re(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;d=a;a=1;j=c+-1|0;a:while(1){m=(b|0)!=0;b:do if(m){h=j;while(1){c=i[d>>0]|0;if(!(c<<24>>24)){l=41;break a}e=d+1|0;g=c&255;do if(c<<24>>24>-1){d=e;c=g}else{if((g&224|0)==192){c=i[e>>0]|0;if((c&192|0)!=128){a=0;l=41;break a}d=d+2|0;c=c&63|g<<6&1984;break}if((g&240|0)==224){c=i[e>>0]|0;if((c&192|0)!=128){a=0;l=41;break a}f=i[d+2>>0]|0;if((f&192|0)!=128){a=0;l=41;break a}d=d+3|0;c=c<<6&4032|g<<12&61440|f&63;break}if((g&248|0)!=240){a=0;l=41;break a}c=i[e>>0]|0;if((c&192|0)!=128){a=0;l=41;break a}f=i[d+2>>0]|0;if((f&192|0)!=128){a=0;l=41;break a}e=i[d+3>>0]|0;if((e&192|0)!=128){a=0;l=41;break a}d=d+4|0;c=c<<12&258048|g<<18&1835008|f<<6&4032|e&63}while(0);if((h|0)<1)break a;if(c>>>0<=65535){e=h+-1|0;l=39;break b}e=h+-2|0;if((h|0)<2)break a;if(c>>>0>1114111){a=0;h=e}else{l=37;break}}}else{g=d;while(1){c=i[g>>0]|0;if(!(c<<24>>24)){l=43;break a}d=g+1|0;h=c&255;if(c<<24>>24>-1){c=h;e=j;l=39;break b}do if((h&224|0)==192){c=i[d>>0]|0;if((c&192|0)!=128){a=0;l=43;break a}d=g+2|0;c=c&63|h<<6&1984}else{if((h&240|0)==224){c=i[d>>0]|0;if((c&192|0)!=128){a=0;l=43;break a}e=i[g+2>>0]|0;if((e&192|0)!=128){a=0;l=43;break a}d=g+3|0;c=c<<6&4032|h<<12&61440|e&63;break}if((h&248|0)!=240){a=0;l=43;break a}c=i[d>>0]|0;if((c&192|0)!=128){a=0;l=43;break a}e=i[g+2>>0]|0;if((e&192|0)!=128){a=0;l=43;break a}f=i[g+3>>0]|0;if((f&192|0)!=128){a=0;l=43;break a}d=g+4|0;c=c<<12&258048|h<<18&1835008|e<<6&4032|f&63}while(0);if(c>>>0<=65535){e=j;l=39;break b}if(c>>>0>1114111){g=d;a=0}else{e=j;l=37;break}}}while(0);if((l|0)==37){l=0;if(!m){b=0;j=e;continue}k[b>>2]=c;b=b+4|0;j=e;continue}else if((l|0)==39){l=0;if(!m){b=0;j=e;continue}k[b>>2]=c;b=b+4|0;j=e;continue}}if((l|0)==41){if(!b){m=a;return m|0}}else if((l|0)==43)return a|0;k[b>>2]=0;m=a;return m|0}function se(a,b){a=a|0;b=b|0;var c=0,d=0;d=Uj(k[a>>2]|0)|0;c=Uj(k[b>>2]|0)|0;a:do if((d|0)==(c|0)){while(1){if(!(k[a>>2]|0)){c=0;break}a=a+4|0;b=b+4|0;d=Uj(k[a>>2]|0)|0;c=Uj(k[b>>2]|0)|0;if((d|0)!=(c|0)){b=d;break a}}return c|0}else b=d;while(0);d=(b|0)<(c|0)?-1:1;return d|0}function te(a){a=a|0;var b=0,c=0,d=0;b=k[a>>2]|0;if(!b)return a|0;else c=a;do{d=Vj(b)|0;k[c>>2]=d;c=c+4|0;b=k[c>>2]|0}while((b|0)!=0);return a|0}function ue(a){a=a|0;var b=0,c=0,d=0;b=k[a>>2]|0;if(!b)return a|0;else c=a;do{d=Uj(b)|0;k[c>>2]=d;c=c+4|0;b=k[c>>2]|0}while((b|0)!=0);return a|0}function ve(a){a=a|0;return Uj(a)|0}function we(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;f=(k[a>>2]|0)==45;a=f?a+4|0:a;e=f?-1:1;f=f?-1:0;b=k[a>>2]|0;if((b+-48|0)>>>0<10){d=b;b=0;c=0}else{d=0;c=0;f=jn(d|0,c|0,e|0,f|0)|0;return f|0}do{b=jn(b|0,c|0,10,0)|0;c=d+-48|0;b=Vm(c|0,((c|0)<0)<<31>>31|0,b|0,O|0)|0;c=O;a=a+4|0;d=k[a>>2]|0}while((d+-48|0)>>>0<10);a=c;f=jn(b|0,a|0,e|0,f|0)|0;return f|0}function xe(){if(!(i[32955]|0))return;Bf(32944,255);return}function ye(a){a=a|0;k[a+4776>>2]=1;i[a+6340>>0]=0;i[a+6341>>0]=7;i[a+6342>>0]=77;return}function ze(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;p=r;r=r+128|0;o=p;Le(a+5044|0);Ic(o,b,128)|0;n=Zm(o|0)|0;k[a+6324>>2]=-744245127;k[a+6328>>2]=1064112887;k[a+6332>>2]=1964352053;k[a+6336>>2]=-1528303325;_m(a+6068|0,33152,256)|0;m=(n|0)==0;if(m){c=0;do c=c+1|0;while((c|0)!=256)}else{g=0;do{f=0;do{c=k[a+(((l[b+f>>0]|0)-g&255)<<2)+5044>>2]|0;e=k[a+(((l[b+(f|1)>>0]|0)+g&255)<<2)+5044>>2]&255;d=c&255;if((d|0)!=(e|0)){h=1;while(1){t=a+d+6068|0;q=a+(c+f+h&255)+6068|0;s=i[t>>0]|0;i[t>>0]=i[q>>0]|0;i[q>>0]=s;c=d+1|0;d=c&255;if((d|0)==(e|0))break;else h=h+1|0}}f=f+2|0}while(f>>>0>>0);g=g+1|0}while((g|0)!=256)}if((n&15|0)!=0?(j=n|15,n>>>0<=j>>>0):0){c=n;do{i[o+c>>0]=0;c=c+1|0}while(c>>>0<=j>>>0)}if(m){r=p;return}else c=0;do{Ae(a,o+c|0);c=c+16|0}while(c>>>0>>0);r=p;return}function Ae(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;n=b+1|0;A=b+2|0;h=b+3|0;j=a+6324|0;m=k[j>>2]|0;o=b+4|0;p=b+5|0;q=b+6|0;r=b+7|0;s=a+6328|0;t=b+8|0;u=b+9|0;v=b+10|0;w=b+11|0;x=a+6332|0;y=b+12|0;z=b+13|0;B=b+14|0;C=b+15|0;D=a+6336|0;d=((l[n>>0]|0)<<8|(l[b>>0]|0)|(l[A>>0]|0)<<16|(l[h>>0]|0)<<24)^m;e=((l[p>>0]|0)<<8|(l[o>>0]|0)|(l[q>>0]|0)<<16|(l[r>>0]|0)<<24)^k[s>>2];g=((l[u>>0]|0)<<8|(l[t>>0]|0)|(l[v>>0]|0)<<16|(l[w>>0]|0)<<24)^k[x>>2];c=((l[z>>0]|0)<<8|(l[y>>0]|0)|(l[B>>0]|0)<<16|(l[C>>0]|0)<<24)^k[D>>2];f=0;while(1){E=k[a+((f&3)<<2)+6324>>2]|0;F=E^(c<<11|c>>>21)+g;d=((l[a+(F>>>8&255)+6068>>0]|0)<<8|(l[a+(F&255)+6068>>0]|0)|(l[a+(F>>>16&255)+6068>>0]|0)<<16|(l[a+(F>>>24)+6068>>0]|0)<<24)^d;E=E+((g<<17|g>>>15)^c)|0;e=((l[a+(E>>>8&255)+6068>>0]|0)<<8|(l[a+(E&255)+6068>>0]|0)|(l[a+(E>>>16&255)+6068>>0]|0)<<16|(l[a+(E>>>24)+6068>>0]|0)<<24)^e;f=f+1|0;if((f|0)==32){f=d;d=g;break}else{E=c;F=g;g=d;c=e;e=E;d=F}}E=m^f;i[b>>0]=E;i[n>>0]=E>>>8;i[A>>0]=E>>>16;i[h>>0]=E>>>24;g=k[s>>2]^e;i[o>>0]=g;i[p>>0]=g>>>8;i[q>>0]=g>>>16;i[r>>0]=g>>>24;g=k[x>>2]^d;i[t>>0]=g;i[u>>0]=g>>>8;i[v>>0]=g>>>16;i[w>>0]=g>>>24;g=k[D>>2]^c;i[y>>0]=g;i[z>>0]=g>>>8;i[B>>0]=g>>>16;i[C>>0]=g>>>24;g=k[s>>2]|0;b=k[x>>2]|0;F=k[D>>2]|0;e=k[a+((E&255)<<2)+5044>>2]^k[j>>2];k[j>>2]=e;g=k[a+((l[n>>0]|0)<<2)+5044>>2]^g;k[s>>2]=g;b=k[a+((l[A>>0]|0)<<2)+5044>>2]^b;k[x>>2]=b;F=k[a+((l[h>>0]|0)<<2)+5044>>2]^F;k[D>>2]=F;o=k[a+((l[o>>0]|0)<<2)+5044>>2]^e;k[j>>2]=o;A=k[a+((l[p>>0]|0)<<2)+5044>>2]^g;k[s>>2]=A;b=k[a+((l[q>>0]|0)<<2)+5044>>2]^b;k[x>>2]=b;F=k[a+((l[r>>0]|0)<<2)+5044>>2]^F;k[D>>2]=F;t=k[a+((l[t>>0]|0)<<2)+5044>>2]^o;k[j>>2]=t;A=k[a+((l[u>>0]|0)<<2)+5044>>2]^A;k[s>>2]=A;b=k[a+((l[v>>0]|0)<<2)+5044>>2]^b;k[x>>2]=b;F=k[a+((l[w>>0]|0)<<2)+5044>>2]^F;k[D>>2]=F;k[j>>2]=k[a+((l[y>>0]|0)<<2)+5044>>2]^t;k[s>>2]=k[a+((l[z>>0]|0)<<2)+5044>>2]^A;k[x>>2]=k[a+((l[B>>0]|0)<<2)+5044>>2]^b;k[D>>2]=k[a+((l[C>>0]|0)<<2)+5044>>2]^F;return}function Be(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;I=r;r=r+16|0;H=I;p=b+1|0;D=b+2|0;m=b+3|0;n=a+6324|0;o=k[n>>2]|0;f=((l[p>>0]|0)<<8|(l[b>>0]|0)|(l[D>>0]|0)<<16|(l[m>>0]|0)<<24)^o;q=b+4|0;s=b+5|0;t=b+6|0;u=b+7|0;v=a+6328|0;j=((l[s>>0]|0)<<8|(l[q>>0]|0)|(l[t>>0]|0)<<16|(l[u>>0]|0)<<24)^k[v>>2];w=b+8|0;x=b+9|0;y=b+10|0;z=b+11|0;A=a+6332|0;d=((l[x>>0]|0)<<8|(l[w>>0]|0)|(l[y>>0]|0)<<16|(l[z>>0]|0)<<24)^k[A>>2];B=b+12|0;C=b+13|0;E=b+14|0;F=b+15|0;G=a+6336|0;c=((l[C>>0]|0)<<8|(l[B>>0]|0)|(l[E>>0]|0)<<16|(l[F>>0]|0)<<24)^k[G>>2];e=H+0|0;g=b+0|0;h=e+16|0;do{i[e>>0]=i[g>>0]|0;e=e+1|0;g=g+1|0}while((e|0)<(h|0));g=31;while(1){e=k[a+((g&3)<<2)+6324>>2]|0;h=e^(c<<11|c>>>21)+d;f=((l[a+(h>>>8&255)+6068>>0]|0)<<8|(l[a+(h&255)+6068>>0]|0)|(l[a+(h>>>16&255)+6068>>0]|0)<<16|(l[a+(h>>>24)+6068>>0]|0)<<24)^f;e=e+((d<<17|d>>>15)^c)|0;e=((l[a+(e>>>8&255)+6068>>0]|0)<<8|(l[a+(e&255)+6068>>0]|0)|(l[a+(e>>>16&255)+6068>>0]|0)<<16|(l[a+(e>>>24)+6068>>0]|0)<<24)^j;if((g|0)>0){j=c;h=d;d=f;c=e;g=g+-1|0;f=h}else break}o=o^f;i[b>>0]=o;i[p>>0]=o>>>8;i[D>>0]=o>>>16;i[m>>0]=o>>>24;D=k[v>>2]^e;i[q>>0]=D;i[s>>0]=D>>>8;i[t>>0]=D>>>16;i[u>>0]=D>>>24;D=k[A>>2]^d;i[w>>0]=D;i[x>>0]=D>>>8;i[y>>0]=D>>>16;i[z>>0]=D>>>24;D=k[G>>2]^c;i[B>>0]=D;i[C>>0]=D>>>8;i[E>>0]=D>>>16;i[F>>0]=D>>>24;D=k[v>>2]|0;E=k[A>>2]|0;F=k[G>>2]|0;C=k[a+((l[H>>0]|0)<<2)+5044>>2]^k[n>>2];k[n>>2]=C;D=k[a+((l[H+1>>0]|0)<<2)+5044>>2]^D;k[v>>2]=D;E=k[a+((l[H+2>>0]|0)<<2)+5044>>2]^E;k[A>>2]=E;F=k[a+((l[H+3>>0]|0)<<2)+5044>>2]^F;k[G>>2]=F;C=k[a+((l[H+4>>0]|0)<<2)+5044>>2]^C;k[n>>2]=C;D=k[a+((l[H+5>>0]|0)<<2)+5044>>2]^D;k[v>>2]=D;E=k[a+((l[H+6>>0]|0)<<2)+5044>>2]^E;k[A>>2]=E;F=k[a+((l[H+7>>0]|0)<<2)+5044>>2]^F;k[G>>2]=F;C=k[a+((l[H+8>>0]|0)<<2)+5044>>2]^C;k[n>>2]=C;D=k[a+((l[H+9>>0]|0)<<2)+5044>>2]^D;k[v>>2]=D;E=k[a+((l[H+10>>0]|0)<<2)+5044>>2]^E;k[A>>2]=E;F=k[a+((l[H+11>>0]|0)<<2)+5044>>2]^F;k[G>>2]=F;k[n>>2]=k[a+((l[H+12>>0]|0)<<2)+5044>>2]^C;k[v>>2]=k[a+((l[H+13>>0]|0)<<2)+5044>>2]^D;k[A>>2]=k[a+((l[H+14>>0]|0)<<2)+5044>>2]^E;k[G>>2]=k[a+((l[H+15>>0]|0)<<2)+5044>>2]^F;r=I;return}function Ce(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;w=r;r=r+656|0;v=w+640|0;u=w+624|0;t=w+360|0;o=w+176|0;n=w+352|0;s=w+20|0;p=w;q=w+332|0;a:do if(!e){f=0;do{if(bg(a+(f*560|0)|0,c)|0?(i[a+(f*560|0)+556>>0]|0)==0:0){g=8;break a}f=f+1|0}while(f>>>0<4)}else{f=0;do{if((bg(a+(f*560|0)|0,c)|0?(i[a+(f*560|0)+556>>0]|0)!=0:0)?(Mm(a+(f*560|0)+516|0,e,8)|0)==0:0){g=8;break a}f=f+1|0}while(f>>>0<4)}while(0);if((g|0)==8){g=v+0|0;h=a+(f*560|0)+524|0;d=g+16|0;do{i[g>>0]=i[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(d|0));g=u+0|0;h=a+(f*560|0)+540|0;d=g+16|0;do{i[g>>0]=i[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(d|0));a=a+4780|0;eg(a,b,v,128,u);_f(v,16);_f(u,16);r=w;return}oe(d,t,264)|0;f=(kk(d)|0)<<1;m=(e|0)!=0;if(m){h=e;d=h;d=l[d>>0]|l[d+1>>0]<<8|l[d+2>>0]<<16|l[d+3>>0]<<24;h=h+4|0;h=l[h>>0]|l[h+1>>0]<<8|l[h+2>>0]<<16|l[h+3>>0]<<24;j=t+f|0;g=j;i[g>>0]=d;i[g+1>>0]=d>>8;i[g+2>>0]=d>>16;i[g+3>>0]=d>>24;j=j+4|0;i[j>>0]=h;i[j+1>>0]=h>>8;i[j+2>>0]=h>>16;i[j+3>>0]=h>>24;f=f+8|0}og(o);d=n+1|0;g=n+2|0;h=p+16|0;j=0;do{pg(o,t,f,0);i[n>>0]=j;i[d>>0]=j>>>8;i[g>>0]=j>>>16;pg(o,n,3,0);if(!(j&16383)){_m(s|0,o|0,156)|0;qg(s,p,0);i[u+((j|0)/16384|0)>>0]=k[h>>2]}j=j+1|0}while((j|0)!=262144);qg(o,q,0);j=k[q>>2]|0;i[v>>0]=j;i[v+1>>0]=j>>>8;i[v+2>>0]=j>>>16;i[v+3>>0]=j>>>24;j=k[q+4>>2]|0;i[v+4>>0]=j;i[v+5>>0]=j>>>8;i[v+6>>0]=j>>>16;i[v+7>>0]=j>>>24;j=k[q+8>>2]|0;i[v+8>>0]=j;i[v+9>>0]=j>>>8;i[v+10>>0]=j>>>16;i[v+11>>0]=j>>>24;j=k[q+12>>2]|0;i[v+12>>0]=j;i[v+13>>0]=j>>>8;i[v+14>>0]=j>>>16;i[v+15>>0]=j>>>24;j=a+2240|0;_m(a+((k[j>>2]|0)*560|0)|0,c|0,514)|0;f=k[j>>2]|0;i[a+(f*560|0)+556>>0]=m&1;if(m){c=e;q=c;q=l[q>>0]|l[q+1>>0]<<8|l[q+2>>0]<<16|l[q+3>>0]<<24;c=c+4|0;c=l[c>>0]|l[c+1>>0]<<8|l[c+2>>0]<<16|l[c+3>>0]<<24;e=a+(f*560|0)+516|0;s=e;i[s>>0]=q;i[s+1>>0]=q>>8;i[s+2>>0]=q>>16;i[s+3>>0]=q>>24;e=e+4|0;i[e>>0]=c;i[e+1>>0]=c>>8;i[e+2>>0]=c>>16;i[e+3>>0]=c>>24}g=a+(f*560|0)+524|0;h=v+0|0;d=g+16|0;do{i[g>>0]=i[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(d|0));g=a+((k[j>>2]|0)*560|0)+540|0;h=u+0|0;d=g+16|0;do{i[g>>0]=i[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(d|0));k[j>>2]=(k[j>>2]|0)+1&3;_f(t,264);a=a+4780|0;eg(a,b,v,128,u);_f(v,16);_f(u,16);r=w;return}function De(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=r;r=r+400|0;f=q+368|0;o=q;m=q+112|0;n=q+336|0;p=q+224|0;if(b>>>0<=64)if(!b){b=0;f=a;a=o;h=1;k=6}else{f=a;g=o;k=4}else{rg(o);sg(o,a,b);tg(o,f);b=32;g=o;k=4}if((k|0)==4){a=0;do{i[o+a>>0]=(l[f+a>>0]|0)^54;a=a+1|0}while((a|0)!=(b|0));if(b>>>0<64){a=g;h=0;k=6}else{j=b;a=g;g=0;b=0}}if((k|0)==6){Ym(o+b|0,54,64-b|0)|0;j=b;g=1;b=h}rg(m);sg(m,a,64);sg(m,c,d);tg(m,n);rg(p);if(!b){b=0;do{i[o+b>>0]=(l[f+b>>0]|0)^92;b=b+1|0}while((b|0)!=(j|0))}if(!g){sg(p,a,64);sg(p,n,32);tg(p,e);r=q;return}Ym(o+j|0,92,64-j|0)|0;sg(p,a,64);sg(p,n,32);tg(p,e);r=q;return}function Ee(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0;p=r;r=r+176|0;m=p+96|0;n=p;l=p+32|0;o=p+64|0;_m(m|0,c|0,(d>>>0<64?d:64)|0)|0;i[m+d>>0]=0;i[m+(d+1)>>0]=0;i[m+(d+2)>>0]=0;i[m+(d+3)>>0]=1;De(a,b,m,d+4|0,n);c=l+0|0;j=n+0|0;k=c+32|0;do{i[c>>0]=i[j>>0]|0;c=c+1|0;j=j+1|0}while((c|0)<(k|0));d=h+-1|0;if(d){h=0;do{De(a,b,n,32,o);c=n+0|0;j=o+0|0;k=c+32|0;do{i[c>>0]=i[j>>0]|0;c=c+1|0;j=j+1|0}while((c|0)<(k|0));c=0;do{k=l+c|0;i[k>>0]=i[k>>0]^i[n+c>>0];c=c+1|0}while((c|0)!=32);h=h+1|0}while(h>>>0>>0)}c=e+0|0;j=l+0|0;k=c+32|0;do{i[c>>0]=i[j>>0]|0;c=c+1|0;j=j+1|0}while((c|0)<(k|0));d=0;do{De(a,b,n,32,o);c=n+0|0;j=o+0|0;k=c+32|0;do{i[c>>0]=i[j>>0]|0;c=c+1|0;j=j+1|0}while((c|0)<(k|0));c=0;do{k=l+c|0;i[k>>0]=i[k>>0]^i[n+c>>0];c=c+1|0}while((c|0)!=32);d=d+1|0}while(d>>>0<16);c=f+0|0;j=l+0|0;k=c+32|0;do{i[c>>0]=i[j>>0]|0;c=c+1|0;j=j+1|0}while((c|0)<(k|0));d=0;do{De(a,b,n,32,o);c=n+0|0;j=o+0|0;k=c+32|0;do{i[c>>0]=i[j>>0]|0;c=c+1|0;j=j+1|0}while((c|0)<(k|0));c=0;do{f=l+c|0;i[f>>0]=i[f>>0]^i[n+c>>0];c=c+1|0}while((c|0)!=32);d=d+1|0}while(d>>>0<16);c=g+0|0;j=l+0|0;k=c+32|0;do{i[c>>0]=i[j>>0]|0;c=c+1|0;j=j+1|0}while((c|0)<(k|0));_f(m,68);_f(l,32);_f(n,32);_f(o,32);r=p;return}function Fe(a,b,c,d,e,f,g,h,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var l=0,m=0,n=0,o=0,p=0,q=0;q=r;r=r+608|0;l=q+576|0;p=q;o=q+32|0;n=q+64|0;if(g>>>0>24){r=q;return}else m=0;while(1){if(((k[a+(m*632|0)+2808>>2]|0)==(g|0)?bg(a+(m*632|0)+2244|0,c)|0:0)?(Mm(a+(m*632|0)+2760|0,e,16)|0)==0:0){n=m;m=5;break}m=m+1|0;if(m>>>0>=4){m=7;break}}if((m|0)==5){m=a+(n*632|0)+2776|0;$f(m,32,0,0);c=l+0|0;d=m+0|0;g=c+32|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0));$f(m,32,1,0);c=p+0|0;d=a+(n*632|0)+2812|0;g=c+32|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0));c=o+0|0;d=a+(n*632|0)+2844|0;g=c+32|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0))}else if((m|0)==7){qe(d,n,512);Ee(n,Zm(n|0)|0,e,16,l,o,p,1<>2]|0;k[d>>2]=n+1;n=n&3;k[a+(n*632|0)+2808>>2]=g;_m(a+(n*632|0)+2244|0,c|0,514)|0;c=a+(n*632|0)+2760|0;d=e+0|0;g=c+16|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0));m=a+(n*632|0)+2776|0;c=m+0|0;d=l+0|0;g=c+32|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0));c=a+(n*632|0)+2812|0;d=p+0|0;g=c+32|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0));c=a+(n*632|0)+2844|0;d=o+0|0;g=c+32|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0));$f(m,32,1,0)}if(h){c=h+0|0;d=o+0|0;g=c+32|0;do{i[c>>0]=i[d>>0]|0;c=c+1|0;d=d+1|0}while((c|0)<(g|0))}if(j){m=j;e=m;i[e>>0]=0;i[e+1>>0]=0;i[e+2>>0]=0;i[e+3>>0]=0;m=m+4|0;i[m>>0]=0;i[m+1>>0]=0;i[m+2>>0]=0;i[m+3>>0]=0;m=0;do{e=j+(m&7)|0;i[e>>0]=i[e>>0]^i[p+m>>0];m=m+1|0}while((m|0)!=32);_f(p,32)}if(f)eg(a+4780|0,b,l,256,f);_f(l,32);r=q;return}function Ge(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;h=r;r=r+80|0;d=h+64|0;f=h;g=h+32|0;c=k[a>>2]|0;if((c|0)==2){e=a+4|0;c=k[e>>2]|0;i[d>>0]=c;i[d+1>>0]=c>>>8;i[d+2>>0]=c>>>16;i[d+3>>0]=c>>>24;De(b,32,d,4,f);k[e>>2]=0;c=0;d=0;do{c=(l[f+d>>0]|0)<<(d<<3&24)^c;d=d+1|0}while((d|0)!=32);k[e>>2]=c;c=k[a>>2]|0}if((c|0)!=3){r=h;return}e=a+4|0;De(b,32,e,32,g);e=e+0|0;c=g+0|0;d=e+32|0;do{i[e>>0]=i[c>>0]|0;e=e+1|0;c=c+1|0}while((e|0)<(d|0));r=h;return}function He(a){a=a|0;var b=0,c=0;b=a+2240|0;c=a;do{Xf(c);c=c+560|0}while((c|0)!=(b|0));b=a+4772|0;c=a+2244|0;do{Xf(c);c=c+632|0}while((c|0)!=(b|0));cg(a+4780|0);Ym(a+5044|0,0,1024)|0;Ym(a|0,0,4780)|0;return}function Ie(a){a=a|0;var b=0,c=0;_f(a,2240);b=a+2244|0;_f(b,2528);c=a+4772|0;do{c=c+-632|0;Zf(c)}while((c|0)!=(b|0));b=a+2240|0;do{b=b+-560|0;Zf(b)}while((b|0)!=(a|0));return}function Je(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0;switch(k[a+4776>>2]|0){case 1:{if(!c)return;f=a+6342|0;g=a+6341|0;e=a+6340|0;d=c;while(1){d=d+-1|0;a=(l[g>>0]|0)+(l[f>>0]|0)|0;i[g>>0]=a;a=(l[e>>0]|0)+a|0;i[e>>0]=a;i[b>>0]=(l[b>>0]|0)-a;if(!d)break;else b=b+1|0}return}case 2:{if(!c)return;f=a+6344|0;e=a+6346|0;g=a+6348|0;h=a+6350|0;d=c;while(1){d=d+-1|0;c=(m[f>>1]|0)+4660|0;j[f>>1]=c;n=a+((c>>>1&255)<<2)+5044|0;o=(m[e>>1]|0)^k[n>>2];j[e>>1]=o;n=(m[g>>1]|0)-((k[n>>2]|0)>>>16)|0;j[g>>1]=n;p=m[h>>1]|0;o=(p<<15&32768|p>>>1)^o&65535;o=o>>>1|o<<15;j[h>>1]=o;c=o^(n^c)&65535;j[f>>1]=c;i[b>>0]=c>>>8^(l[b>>0]|0);if(!d)break;else b=b+1|0}return}case 3:{if(!c)return;else d=0;do{Be(a,b+d|0);d=d+16|0}while(d>>>0>>0);return}case 5:case 4:{hg(a+4780|0,b,c,b);return}default:return}}function Ke(a,b,c,d,e,f,g,h,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;l=l|0;var m=0,n=0,o=0;o=r;r=r+640|0;n=o;m=o+512|0;if((c|0)==0|(i[d+512>>0]|0)==0){n=0;r=o;return n|0}k[a+4776>>2]=c;ag(d,n,128);me(n,m,128)|0;switch(c|0){case 2:{Le(a+5044|0);d=Me(-1,m,Zm(m|0)|0)|0;j[a+6344>>1]=d;j[a+6346>>1]=d>>>16;d=a+6350|0;j[d>>1]=0;c=a+6348|0;j[c>>1]=0;b=i[m>>0]|0;if(b<<24>>24){f=0;g=0;h=0;do{e=b&255;l=a+(e<<2)+5044|0;f=e^f&65535^k[l>>2];j[c>>1]=f;g=e+(g&65535)+((k[l>>2]|0)>>>16)|0;j[d>>1]=g;h=h+1|0;b=i[m+h>>0]|0}while(b<<24>>24!=0)}break}case 1:{d=a+6342|0;i[d>>0]=0;l=a+6341|0;i[l>>0]=0;c=a+6340|0;i[c>>0]=0;b=i[m>>0]|0;if(b<<24>>24){h=0;f=0;e=0;g=0;do{a=b&255;h=a+(h&255)|0;f=b^f;e=a+e&255;e=e<<1|e>>>7;g=g+1|0;b=i[m+g>>0]|0}while(b<<24>>24!=0);b=e;i[c>>0]=h;i[l>>0]=f;i[d>>0]=b}break}case 3:{ze(a,m);break}case 5:{Fe(a,b,d,n,e,f,g,h,l);break}case 4:{Ce(a,b,d,n,e);break}default:{}}_f(m,128);_f(n,512);n=1;r=o;return n|0}function Le(a){a=a|0;var b=0,c=0,d=0;if(!(k[a+4>>2]|0))b=0;else return;do{d=b>>>1;d=(b&1|0)!=0?d^-306674912:d;c=d>>>1;c=(d&1|0)!=0?c^-306674912:c;d=c>>>1;d=(c&1|0)!=0?d^-306674912:d;c=d>>>1;c=(d&1|0)!=0?c^-306674912:c;d=c>>>1;d=(c&1|0)!=0?d^-306674912:d;c=d>>>1;c=(d&1|0)!=0?c^-306674912:c;d=c>>>1;d=(c&1|0)!=0?d^-306674912:d;c=d>>>1;k[a+(b<<2)>>2]=(d&1|0)!=0?c^-306674912:c;b=b+1|0}while((b|0)!=256);return}function Me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;if(!c){f=a;return f|0}else d=b;while(1){if(!(d&7)){b=c;break}a=k[33416+(((l[d>>0]|0)^a&255)<<2)>>2]^a>>>8;c=c+-1|0;if(!c){f=10;break}else d=d+1|0}if((f|0)==10)return a|0;if(b>>>0>7){e=b+-8|0;f=e&-8;c=d+(f+8)|0;while(1){g=k[d>>2]^a;a=k[d+4>>2]|0;a=k[39560+((g>>>8&255)<<2)>>2]^k[40584+((g&255)<<2)>>2]^k[38536+((g>>>16&255)<<2)>>2]^k[37512+(g>>>24<<2)>>2]^k[36488+((a&255)<<2)>>2]^k[35464+((a>>>8&255)<<2)>>2]^k[34440+((a>>>16&255)<<2)>>2]^k[33416+(a>>>24<<2)>>2];b=b+-8|0;if(b>>>0<=7)break;else d=d+8|0}b=e-f|0}else c=d;if(!b){g=a;return g|0}while(1){a=k[33416+(((l[c>>0]|0)^a&255)<<2)>>2]^a>>>8;b=b+-1|0;if(!b)break;else c=c+1|0}return a|0}function Ne(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(!c){b=a;return b|0}else d=0;do{a=(l[b+d>>0]|0)+(a&65535)&65535;a=(a<<1|a>>>15)&65535;d=d+1|0}while((d|0)!=(c|0));return a|0}function Oe(){Pe(33408);return}function Pe(a){a=a|0;var b=0,c=0;if(!(k[8355]|0)){a=0;do{c=a>>>1;c=(a&1|0)!=0?c^-306674912:c;b=c>>>1;b=(c&1|0)!=0?b^-306674912:b;c=b>>>1;c=(b&1|0)!=0?c^-306674912:c;b=c>>>1;b=(c&1|0)!=0?b^-306674912:b;c=b>>>1;c=(b&1|0)!=0?c^-306674912:c;b=c>>>1;b=(c&1|0)!=0?b^-306674912:b;c=b>>>1;c=(b&1|0)!=0?c^-306674912:c;b=c>>>1;k[33416+(a<<2)>>2]=(c&1|0)!=0?b^-306674912:b;a=a+1|0}while((a|0)!=256);a=0}else a=0;do{c=k[33416+(a<<2)>>2]|0;c=k[33416+((c&255)<<2)>>2]^c>>>8;k[34440+(a<<2)>>2]=c;c=c>>>8^k[33416+((c&255)<<2)>>2];k[35464+(a<<2)>>2]=c;c=c>>>8^k[33416+((c&255)<<2)>>2];k[36488+(a<<2)>>2]=c;c=c>>>8^k[33416+((c&255)<<2)>>2];k[37512+(a<<2)>>2]=c;c=c>>>8^k[33416+((c&255)<<2)>>2];k[38536+(a<<2)>>2]=c;c=c>>>8^k[33416+((c&255)<<2)>>2];k[39560+(a<<2)>>2]=c;k[40584+(a<<2)>>2]=c>>>8^k[33416+((c&255)<<2)>>2];a=a+1|0}while((a|0)!=256);return}function Qe(a,b){a=a|0;b=b|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=b;k[a+4>>2]=0;k[a+24>>2]=0;k[a+20>>2]=0;k[a+28>>2]=0;return}function Re(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;n=r;r=r+16|0;m=n;i=a+28|0;if(!(k[i>>2]|0)){if(!b){a=0;r=n;return a|0}f=a+4|0;c=(k[f>>2]|0)+b|0;k[f>>2]=c;g=a+8|0;d=k[g>>2]|0;if(c>>>0>d>>>0){e=k[a+12>>2]|0;if((e|0)!=0&c>>>0>e>>>0){k[m>>2]=e;Jf(32944,53104,m);Af(32944);d=k[g>>2]|0;c=k[f>>2]|0}d=d+32+(d>>>2)|0;d=c>>>0>d>>>0?c:d;c=zm(k[a>>2]|0,d)|0;if(!c)Af(32944);k[a>>2]=c;k[g>>2]=d}else c=k[a>>2]|0;i=k[a+16>>2]|0;m=a+20|0;a=kc[k[(k[i>>2]|0)+12>>2]&31](i,c+(k[m>>2]|0)|0,b)|0;k[m>>2]=(k[m>>2]|0)+a;r=n;return a|0}e=a+4|0;j=k[e>>2]|0;l=a+20|0;c=k[l>>2]|0;f=j-c|0;if(f>>>0>=b>>>0){k[l>>2]=c+b;a=b;r=n;return a|0}h=b-f|0;h=(0-h&15)+h|0;c=h+j|0;k[e>>2]=c;g=a+8|0;f=k[g>>2]|0;if(c>>>0>f>>>0){d=k[a+12>>2]|0;if((d|0)!=0&c>>>0>d>>>0){k[m>>2]=d;Jf(32944,53104,m);Af(32944);f=k[g>>2]|0;c=k[e>>2]|0}d=f+32+(f>>>2)|0;d=c>>>0>d>>>0?c:d;c=zm(k[a>>2]|0,d)|0;if(!c)Af(32944);k[a>>2]=c;k[g>>2]=d}else c=k[a>>2]|0;m=k[a+16>>2]|0;m=kc[k[(k[m>>2]|0)+12>>2]&31](m,c+j|0,h)|0;Je(k[i>>2]|0,(k[a>>2]|0)+j|0,h);k[l>>2]=(k[l>>2]|0)+((m|0)==0?0:b);a=m;r=n;return a|0}function Se(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=r;r=r+16|0;g=j;if(!c){r=j;return}h=a+4|0;d=(k[h>>2]|0)+c|0;k[h>>2]=d;i=a+8|0;e=k[i>>2]|0;if(d>>>0>e>>>0){f=k[a+12>>2]|0;if((f|0)!=0&d>>>0>f>>>0){k[g>>2]=f;Jf(32944,53104,g);Af(32944);e=k[i>>2]|0;d=k[h>>2]|0}e=e+32+(e>>>2)|0;e=d>>>0>e>>>0?d:e;d=zm(k[a>>2]|0,e)|0;if(!d)Af(32944);k[a>>2]=d;k[i>>2]=e}else d=k[a>>2]|0;h=a+20|0;_m(d+(k[h>>2]|0)|0,b|0,c|0)|0;k[h>>2]=(k[h>>2]|0)+c;r=j;return}function Te(a){a=a|0;var b=0,c=0;b=a+24|0;c=k[b>>2]|0;if(c>>>0>=(k[a+20>>2]|0)>>>0){a=0;return a|0}k[b>>2]=c+1;a=i[(k[a>>2]|0)+c>>0]|0;return a|0}function Ue(a){a=a|0;var b=0,c=0,d=0;b=a+24|0;c=k[b>>2]|0;d=c+1|0;if(d>>>0>=(k[a+20>>2]|0)>>>0){d=0;return d|0}a=k[a>>2]|0;d=((l[a+d>>0]|0)<<8|(l[a+c>>0]|0))&65535;k[b>>2]=c+2;return d|0}function Ve(a){a=a|0;var b=0,c=0,d=0;b=a+24|0;c=k[b>>2]|0;d=c+3|0;if(d>>>0>=(k[a+20>>2]|0)>>>0){d=0;return d|0}a=k[a>>2]|0;d=(l[a+(c+1)>>0]|0)<<8|(l[a+c>>0]|0)|(l[a+(c+2)>>0]|0)<<16|(l[a+d>>0]|0)<<24;k[b>>2]=c+4;return d|0}function We(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=a+24|0;b=k[f>>2]|0;c=b+3|0;g=k[a+20>>2]|0;if(c>>>0>>0){d=k[a>>2]|0;d=(l[d+(b+1)>>0]|0)<<8|(l[d+b>>0]|0)|(l[d+(b+2)>>0]|0)<<16|(l[d+c>>0]|0)<<24;b=b+4|0;k[f>>2]=b;e=0}else{d=0;e=0}c=b+3|0;if(c>>>0>=g>>>0){a=0;g=0;a=a|d;g=g|e;O=g;return a|0}g=k[a>>2]|0;g=(l[g+(b+1)>>0]|0)<<8|(l[g+b>>0]|0)|(l[g+(b+2)>>0]|0)<<16|(l[g+c>>0]|0)<<24;k[f>>2]=b+4;a=0;a=a|d;g=g|e;O=g;return a|0}function Xe(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=a+24|0;b=k[f>>2]|0;g=k[a+20>>2]|0;if(b>>>0>=g>>>0){f=0;g=0;O=f;return g|0}e=k[a>>2]|0;a=0;c=0;d=0;while(1){h=b;b=b+1|0;k[f>>2]=b;h=l[e+h>>0]|0;i=$m(h&127|0,0,d|0)|0;a=Vm(i|0,O|0,a|0,c|0)|0;c=O;if(!(h&128)){b=5;break}if(b>>>0>=g>>>0){c=0;a=0;b=5;break}else d=d+7|0}if((b|0)==5){O=c;return a|0}return 0}function Ye(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=k[a+20>>2]|0;if(d>>>0<=b>>>0){e=0;return e|0}c=k[a>>2]|0;a=b;while(1){if((i[c+a>>0]|0)>-1)break;a=a+1|0;if(a>>>0>=d>>>0){a=0;e=6;break}}if((e|0)==6)return a|0;e=1-b+a|0;return e|0}function Ze(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;e=a+24|0;f=k[e>>2]|0;d=(k[a+20>>2]|0)-f|0;g=d>>>0>>0;d=g?d:c;if(d)_m(b|0,(k[a>>2]|0)+f|0,d|0)|0;if(!g){a=k[e>>2]|0;a=a+d|0;k[e>>2]=a;return d|0}Ym(b+d|0,0,c-d|0)|0;a=k[e>>2]|0;a=a+d|0;k[e>>2]=a;return d|0}function _e(a,b){a=a|0;b=b|0;var c=0;c=a+20|0;if((k[c>>2]|0)>>>0<3){a=0;return a|0}a=(Me(-1,(k[a>>2]|0)+2|0,(k[(b?a+24|0:c)>>2]|0)+-2|0)|0)&65535^65535;return a|0}function $e(a){a=a|0;var b=0;b=k[a+20>>2]|0;if(b>>>0<5){a=-1;return a|0}a=~(Me(-1,(k[a>>2]|0)+4|0,b+-4|0)|0);return a|0}function af(a){a=a|0;i[a+4>>0]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;return}function bf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=(f|0)!=0;if(!(d>>>0>1&g)){d=g;b=0;f=f+-1|0;f=d?b:f;e=e+(f<<2)|0;k[e>>2]=0;return}s=a+8|0;q=a+4|0;r=l[c>>0]<<8;j=k[s>>2]|0;a=0;g=1;while(1){if(!j){h=i[c+g>>0]|0;i[q>>0]=h;k[s>>2]=8;j=8;m=g+1|0}else{h=i[q>>0]|0;m=g}p=h&255;g=p>>>6;do if((g|0)==1){k[e+(a<<2)>>2]=l[c+m>>0]|r;g=a+1|0;h=m+1|0}else if((g|0)==3){o=m+1|0;n=i[c+m>>0]|0;g=n&255;if(!(g&128)){if(a>>>0>=f>>>0){g=a;h=o;break}m=-2-g|0;m=((m|0)>-1?-3-m|0:-2)-g|0;g=a-f|0;g=a-(m>>>0>g>>>0?m:g)|0;do{k[e+(a<<2)>>2]=i[b+a>>0];a=a+1|0}while((a|0)!=(g|0));h=o}else{h=m+2|0;if(a>>>0>=f>>>0){g=a;break}m=l[c+o>>0]|0;o=n&127;g=-2-o|0;o=((g|0)>-1?-3-g|0:-2)-o|0;g=a-f|0;g=a-(o>>>0>g>>>0?o:g)|0;do{k[e+(a<<2)>>2]=(l[b+a>>0]|0)+m&255|r;a=a+1|0}while((a|0)!=(g|0))}}else if(!g){k[e+(a<<2)>>2]=l[c+m>>0];g=a+1|0;h=m+1|0}else if((g|0)==2){k[e+(a<<2)>>2]=l[c+(m+1)>>0]<<8|l[c+m>>0];g=a+1|0;h=m+2|0}else{g=a;h=m}while(0);i[q>>0]=p<<2;j=j+-2|0;k[s>>2]=j;a=g>>>0>>0;if(!(h>>>0>>0&a))break;else{a=g;g=h}}f=f+-1|0;f=a?g:f;e=e+(f<<2)|0;k[e>>2]=0;return}function cf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=r;r=r+16384|0;f=j+8192|0;g=j;h=c>>>31;i=c&65535;do if(i){d=kk(a)|0;e=c&65534;c=(e|0)==2;if((!c?(mk(a,b,d)|0)==0:0)?(d=k[b+(d<<2)>>2]|0,(d|0)==0|(d|0)==47|(d|0)==92):0){b=1;r=j;return b|0}if((i|0)==1){b=0;r=j;return b|0}Wc(a,f,2048);Wc(b,g,2048);if(c){if(!h)c=Kc(f,g)|0;else c=hk(f,g)|0;if(c){b=0;r=j;return b|0}}c=(i|0)==4;if((e|0)==4){if(Uc(f)|0){b=df(a,b,(h|0)!=0)|0;r=j;return b|0}if(!c?!(Uc(a)|0):0){if(!h)c=Kc(f,g)|0;else c=hk(f,g)|0;if(!c)break;else c=0;r=j;return c|0}if((k[f>>2]|0)!=0?(mk(f,g,kk(f)|0)|0)!=0:0){b=0;r=j;return b|0}}}while(0);e=Oc(a)|0;d=Oc(b)|0;if(!(mk(41608,d,6)|0)){b=0;r=j;return b|0}c=(h|0)!=0;if((i|0)!=2){b=df(e,d,c)|0;r=j;return b|0}if(c)c=hk(e,d)|0;else c=Kc(e,d)|0;b=(c|0)==0;r=j;return b|0}function df(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=a;a:while(1){a=k[b>>2]|0;b:do if(!a){e=d;while(1){d=e+4|0;f=k[e>>2]|0;if((f|0)==46)e=d;else if((f|0)==63){g=8;break}else if((f|0)==42){g=9;break a}else if(!f){a=0;g=7;break a}else{a=0;break a}}}else if((a|0)==46){a=d+4|0;e=k[d>>2]|0;if((e|0)==42){e=d;d=a;g=9;break a}else if(!((e|0)==46|(e|0)==63))if(!e){a=46;g=7;break a}else{a=0;break a}}else if((a|0)==92){e=d;while(1){d=e+4|0;switch(k[e>>2]|0){case 63:{g=8;break b}case 46:{e=d;break}case 42:{g=9;break a}case 92:{a=d;break b}case 0:{a=92;g=7;break a}default:{a=0;break a}}}}else while(1){e=d;d=d+4|0;f=k[e>>2]|0;if((f|0)==63){g=8;break b}else if((f|0)==42){g=9;break a}else if(!f){g=7;break a}if((f|0)==(a|0)){a=d;break b}if((f|0)!=46){a=0;break a}if(!((a|0)==0|(a|0)==46|(a|0)==92)){a=0;break a}}while(0);if((g|0)==8){g=0;if(!a){a=0;break}else a=d}d=a;b=b+4|0}c:do if((g|0)==7)a=(a|0)==0;else if((g|0)==9){a=k[d>>2]|0;if((a|0)==46){f=e+8|0;if((k[f>>2]|0)==42?(k[e+12>>2]|0)==0:0){a=1;break}a=gk(b,46)|0;e=(a|0)==0;if(!(k[f>>2]|0)){if(e){a=1;break}a=(k[a+4>>2]|0)==0;break}if(!e){if((ok(d,41640)|0)==0?(h=a+4|0,(gk(h,46)|0)==0):0){if(c)a=hk(f,h)|0;else a=Kc(f,h)|0;a=(a|0)==0;break}}else a=b}else if(!a){a=1;break}else a=b;while(1){if(!(k[a>>2]|0)){a=0;break c}if(df(d,a,c)|0){a=1;break}else a=a+4|0}}while(0);return a|0}function ef(a,b){a=a|0;b=b|0;var c=0;c=jn(b|0,((b|0)<0)<<31>>31|0,1e7,0)|0;c=Vm(c|0,O|0,-717324288,27111902)|0;b=a;k[b>>2]=c;k[b+4>>2]=O;return a|0}function ff(a){a=a|0;a=Vm(k[a>>2]|0,k[a+4>>2]|0,717324288,-27111903)|0;a=kn(a|0,O|0,1e7,0)|0;return a|0}function gf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=r;r=r+16|0;d=c;e=a;e=Vm(k[e>>2]|0,k[e+4>>2]|0,717324288,-27111903)|0;e=kn(e|0,O|0,1e7,0)|0;k[d>>2]=e;d=Pb(d|0)|0;k[b>>2]=(k[d+20>>2]|0)+1900;k[b+4>>2]=(k[d+16>>2]|0)+1;k[b+8>>2]=k[d+12>>2];k[b+12>>2]=k[d+8>>2];k[b+16>>2]=k[d+4>>2];k[b+20>>2]=k[d>>2];a=ln(k[a>>2]|0,k[a+4>>2]|0,1e7,0)|0;k[b+24>>2]=a;k[b+28>>2]=k[d+24>>2];k[b+32>>2]=k[d+28>>2];r=c;return}function hf(a,b){a=a|0;b=b|0;var c=0,d=0;c=r;r=r+48|0;d=c;k[d>>2]=k[b+20>>2];k[d+4>>2]=k[b+16>>2];k[d+8>>2]=k[b+12>>2];k[d+12>>2]=k[b+8>>2];k[d+16>>2]=(k[b+4>>2]|0)+-1;k[d+20>>2]=(k[b>>2]|0)+-1900;k[d+32>>2]=-1;d=gb(d|0)|0;d=jn(d|0,((d|0)<0)<<31>>31|0,1e7,0)|0;d=Vm(d|0,O|0,-717324288,27111902)|0;b=Vm(d|0,O|0,k[b+24>>2]|0,0)|0;k[a>>2]=b;k[a+4>>2]=O;r=c;return}function jf(a,b,c){a=a|0;b=b|0;c=c|0;k[a>>2]=b;k[a+4>>2]=c;return}function kf(a){a=a|0;var b=0,c=0;b=r;r=r+16|0;c=b;a=Vm(k[a>>2]|0,k[a+4>>2]|0,717324288,-27111903)|0;a=kn(a|0,O|0,1e7,0)|0;k[c>>2]=a;a=Pb(c|0)|0;r=b;return k[a+12>>2]<<16|(k[a+20>>2]<<25)+1610612736|(k[a+16>>2]<<21)+2097152|k[a+8>>2]<<11|k[a+4>>2]<<5|(k[a>>2]|0)>>>1|0}function lf(a,b){a=a|0;b=b|0;var c=0,d=0;c=r;r=r+48|0;d=c;k[d>>2]=b<<1&62;k[d+4>>2]=b>>>5&63;k[d+8>>2]=b>>>11&31;k[d+12>>2]=b>>>16&31;k[d+16>>2]=(b>>>21&15)+-1;k[d+20>>2]=(b>>>25)+80;k[d+32>>2]=-1;b=gb(d|0)|0;b=jn(b|0,((b|0)<0)<<31>>31|0,1e7,0)|0;b=Vm(b|0,O|0,-717324288,27111902)|0;k[a>>2]=b;k[a+4>>2]=O;r=c;return}function mf(a){a=a|0;var b=0,c=0;b=r;r=r+16|0;c=b;nb(c|0)|0;c=k[c>>2]|0;c=jn(c|0,((c|0)<0)<<31>>31|0,1e7,0)|0;c=Vm(c|0,O|0,-717324288,27111902)|0;k[a>>2]=c;k[a+4>>2]=O;r=b;return}function nf(a){a=a|0;var b=0;He(a+64|0);He(a+6416|0);Cg(a+12840|0);Cg(a+15756|0);Cg(a+18672|0);i[a>>0]=0;i[a+12>>0]=0;b=a+32|0;k[b>>2]=0;k[b+4>>2]=0;i[a+40>>0]=1;i[a+41>>0]=0;i[a+42>>0]=0;i[a+12776>>0]=0;i[a+12777>>0]=0;i[a+12778>>0]=0;k[a+44>>2]=0;k[a+48>>2]=0;k[a+24>>2]=0;k[a+52>>2]=0;i[a+21588>>0]=0;i[a+21589>>0]=0;b=a+12792|0;k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;k[b+28>>2]=0;k[a+12768>>2]=-1;k[a+56>>2]=0;k[a+60>>2]=0;k[a+12772>>2]=0;a=a+12824|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;return}function of(a){a=a|0;var b=0;i[a>>0]=0;i[a+12>>0]=0;b=a+32|0;k[b>>2]=0;k[b+4>>2]=0;i[a+40>>0]=1;i[a+41>>0]=0;i[a+42>>0]=0;i[a+12776>>0]=0;i[a+12777>>0]=0;i[a+12778>>0]=0;k[a+44>>2]=0;k[a+48>>2]=0;k[a+24>>2]=0;k[a+52>>2]=0;i[a+21588>>0]=0;i[a+21589>>0]=0;b=a+12792|0;k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;k[b+28>>2]=0;k[a+12768>>2]=-1;k[a+56>>2]=0;k[a+60>>2]=0;k[a+12772>>2]=0;a=a+12824|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;return}function pf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;w=a+21589|0;u=a+44|0;q=a+32|0;r=a+12777|0;s=a+56|0;t=a+12840|0;v=a+12808|0;n=a+12772|0;o=a+8|0;p=a+4|0;g=(i[w>>0]|0)==0?c:c&-16;m=b;d=0;c=0;while(1){if(!g){l=d;d=19;break}j=k[u>>2]|0;if(!(i[a>>0]|0)){l=q;e=k[l>>2]|0;l=k[l+4>>2]|0;l=0>(l|0)|0==(l|0)&g>>>0>e>>>0;e=l?e:g;if(e){if((i[r>>0]|0)!=0?!((i[w>>0]|0)==0|l^1):0){d=e-(e+c&15)|0;d=(d|0)>0?d:e}else d=e;if(!(k[j+4>>2]|0)){c=-1;d=30;break}d=kc[k[(k[j>>2]|0)+12>>2]&31](j,m,d)|0;e=k[s>>2]|0;if(!e)e=j+42832|0;if(i[e+8329>>0]|0)Fg(t,m,d)}}else{_m(b|0,k[o>>2]|0,k[p>>2]|0)|0;d=k[p>>2]|0;k[p>>2]=0}e=((d|0)<0)<<31>>31;y=v;y=Vm(k[y>>2]|0,k[y+4>>2]|0,d|0,e|0)|0;l=v;k[l>>2]=y;k[l+4>>2]=O;c=d+c|0;m=m+d|0;g=g-d|0;l=q;y=k[l>>2]|0;l=k[l+4>>2]|0;A=Um(y|0,l|0,d|0,e|0)|0;z=q;k[z>>2]=A;k[z+4>>2]=O;if(!((i[r>>0]|0)!=0&((y|0)==(d|0)&(l|0)==(e|0)))){l=d;d=19;break}if((d|0)!=0?(i[w>>0]|0)==0|(c&15|0)==0:0){l=d;d=19;break}if(!(ch(j,a,1,k[n>>2]|0)|0)){d=18;break}}if((d|0)==18){i[a+12778>>0]=1;A=-1;return A|0}else if((d|0)==19){j=k[u>>2]|0;if((j|0)!=0?(h=j+78248|0,f=v,h=Vm(k[f>>2]|0,k[f+4>>2]|0,k[h>>2]|0,k[h+4>>2]|0)|0,f=O,(i[a+40>>0]|0)!=0):0){g=a+12784|0;d=a+12832|0;e=k[d>>2]|0;d=k[d+4>>2]|0;if((e|0)==0&(d|0)==0){e=k[g>>2]|0;d=k[g+4>>2]|0}else{A=a+12824|0;h=Vm(k[A>>2]|0,k[A+4>>2]|0,h|0,f|0)|0;f=O}A=k[j+36172>>2]|0;d=hd(h,f,e,d)|0;if((i[A+49736>>0]|0)==0?(x=a+12768|0,(d|0)!=(k[x>>2]|0)):0)k[x>>2]=d}if((l|0)!=-1){if(i[w>>0]|0)Je(a+6416|0,b,c)}else c=-1;xe();A=c;return A|0}else if((d|0)==30)return c|0;return 0}function qf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=k[(k[a+44>>2]|0)+36172>>2]|0;if(k[d+75172>>2]|0){e=k[d+75184>>2]|0;if((e|0)!=0?(pc[e&15](1,k[d+75180>>2]|0,b,c)|0)==-1:0)Bf(32944,255);d=k[d+75192>>2]|0;if((d|0)!=0?(rc[d&15](b,c)|0)==0:0)Bf(32944,255)}k[a+28>>2]=b;k[a+24>>2]=c;if(!(i[a+12>>0]|0)){if(!(i[a+41>>0]|0))qd(k[a+48>>2]|0,b,c)|0}else{d=a+16|0;if((k[d>>2]|0)>>>0>=c>>>0){e=a+20|0;_m(k[e>>2]|0,b|0,c|0)|0;k[e>>2]=(k[e>>2]|0)+c;k[d>>2]=(k[d>>2]|0)-c}}e=a+12816|0;d=e;d=Vm(k[d>>2]|0,k[d+4>>2]|0,c|0,0)|0;k[e>>2]=d;k[e+4>>2]=O;if(i[a+42>>0]|0){xe();return}Fg(a+18672|0,b,c);xe();return}function rf(a,b,c){a=a|0;b=b|0;c=c|0;if(b)k[a+44>>2]=b;if(c)k[a+48>>2]=c;k[a+12768>>2]=-1;return}function sf(a,b,c){a=a|0;b=b|0;c=c|0;k[b>>2]=k[a+28>>2];k[c>>2]=k[a+24>>2];return}function tf(a,b,c,d,e,f,g,h,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;if(b){h=(Ke(a+64|0,1,c,d,e,f,g,j,h)|0)&1;i[a+21588>>0]=h;return}else{h=(Ke(a+6416|0,0,c,d,e,f,g,j,h)|0)&1;i[a+21589>>0]=h;return}}function uf(a){a=a|0;i[a+21589>>0]=1;ye(a+6416|0);return}function vf(a,b,c){a=a|0;b=b|0;c=c|0;i[a+12>>0]=1;k[a+20>>2]=b;k[a+16>>2]=c;return}function wf(a){a=a|0;var b=0;Xf(a+40996|0);Ym(a|0,0,75200)|0;k[a+12>>2]=33554432;k[a+49716>>2]=0;k[a+49720>>2]=3;k[a+49708>>2]=0;k[a+49804>>2]=0;k[a+58772>>2]=4;b=a+50360|0;k[b>>2]=2147483647;k[b+4>>2]=2147483647;b=a+50368|0;k[b>>2]=2147483647;k[b+4>>2]=2147483647;k[a+49724>>2]=2;b=hi()|0;k[a+66976>>2]=b;k[a+16400>>2]=1;return}function xf(a){a=a|0;var b=0;Ym(a|0,0,75200)|0;k[a+12>>2]=33554432;k[a+49716>>2]=0;k[a+49720>>2]=3;k[a+49708>>2]=0;k[a+49804>>2]=0;k[a+58772>>2]=4;b=a+50360|0;k[b>>2]=2147483647;k[b+4>>2]=2147483647;b=a+50368|0;k[b>>2]=2147483647;k[b+4>>2]=2147483647;k[a+49724>>2]=2;b=hi()|0;k[a+66976>>2]=b;k[a+16400>>2]=1;return}function yf(a){a=a|0;Ym(a|0,0,75200)|0;Zf(a+40996|0);return}function zf(a){a=a|0;k[a>>2]=0;k[a+4>>2]=0;i[a+8>>0]=1;a=a+9|0;i[a>>0]=0;i[a+1>>0]=0;i[a+2>>0]=0;i[a+3>>0]=0;return}function Af(a){a=a|0;var b=0;b=r;r=r+80|0;k[b+64>>2]=0;k[b+68>>2]=0;k[b+72>>2]=7;k[a>>2]=8;b=a+4|0;k[b>>2]=(k[b>>2]|0)+1;k[a>>2]=8;k[b>>2]=(k[b>>2]|0)+1;a=xb(4)|0;k[a>>2]=8;ec(a|0,41672,0)}function Bf(a,b){a=a|0;b=b|0;var c=0;if((b|0)==255)if(!(i[a+8>>0]|0))return;else c=3;else if((b|0)==1)c=3;else if((b|0)==2){if((k[a>>2]|0)>>>0<2)k[a>>2]=2}else if((b|0)==3){if((k[a>>2]|0)!=11)k[a>>2]=3}else k[a>>2]=b;if((c|0)==3?(k[a>>2]|0)==0:0)k[a>>2]=b;c=a+4|0;k[c>>2]=(k[c>>2]|0)+1;c=xb(4)|0;k[c>>2]=b;ec(c|0,41672,0)}function Cf(a,b){a=a|0;b=b|0;var c=0;c=r;r=r+80|0;if(!(i[a+11>>0]|0)){k[c+68>>2]=0;k[c+72>>2]=10;k[c+64>>2]=1;k[c>>2]=b}if((k[a>>2]|0)>>>0<2)k[a>>2]=2;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;a=xb(4)|0;k[a>>2]=2;ec(a|0,41672,0)}function Df(a){a=a|0;return}function Ef(a,b){a=a|0;b=b|0;if((k[a>>2]|0)>>>0<2)k[a>>2]=2;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;a=xb(4)|0;k[a>>2]=2;ec(a|0,41672,0)}function Ff(a,b){a=a|0;b=b|0;return 0}function Gf(a,b,c){a=a|0;b=b|0;c=c|0;k[a>>2]=5;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;a=xb(4)|0;k[a>>2]=5;ec(a|0,41672,0)}function Hf(a,b,c){a=a|0;b=b|0;c=c|0;return 0}function If(a,b){a=a|0;b=b|0;var c=0;c=r;r=r+80|0;if(!(i[a+11>>0]|0)){k[c+68>>2]=0;k[c+72>>2]=11;k[c+64>>2]=1;k[c>>2]=b}if((k[a>>2]|0)>>>0<2)k[a>>2]=2;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;a=xb(4)|0;k[a>>2]=2;ec(a|0,41672,0)}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;a=r;r=r+4192|0;d=a+4112|0;f=a;e=a+16|0;k[f>>2]=c;dk(e,1024,b,f)|0;k[d+68>>2]=0;k[d+72>>2]=1;k[d+64>>2]=1;k[d>>2]=e;r=a;return}function Kf(a,b){a=a|0;b=b|0;if((b|0)==2){if((k[a>>2]|0)>>>0<2)k[a>>2]=2}else if((b|0)==3){if((k[a>>2]|0)!=11)k[a>>2]=3}else if(!((b|0)==255|(b|0)==1?(k[a>>2]|0)!=0:0))k[a>>2]=b;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;return}function Lf(a,b){a=a|0;b=b|0;var c=0,d=0;c=r;r=r+80|0;d=c;k[d+68>>2]=0;k[d+72>>2]=8;k[d>>2]=0;k[d+64>>2]=2;k[d+4>>2]=b;k[a>>2]=6;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;r=c;return}function Mf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=r;r=r+80|0;e=d;k[e+68>>2]=0;k[e+72>>2]=9;k[e>>2]=b;k[e+64>>2]=2;k[e+4>>2]=c;k[a>>2]=9;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;r=d;return}function Nf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a=r;r=r+80|0;d=a;k[d+68>>2]=0;k[d+72>>2]=31;k[d>>2]=b;k[d+64>>2]=2;k[d+4>>2]=c;if((k[8236]|0)>>>0<2)k[8236]=2;k[8237]=(k[8237]|0)+1;r=a;return}function Of(a){a=a|0;ig(a,1);k[a+16>>2]=0;return}function Pf(a){a=a|0;var b=0;b=k[a+16>>2]|0;if(b)Bk(b);jg(a);return}function Qf(a){a=a|0;var b=0;a=a+16|0;if(k[a>>2]|0)return;b=zk(262148)|0;k[a>>2]=b;return}function Rf(a,b,c){a=a|0;b=b|0;c=c|0;i[b>>0]=c;i[b+1>>0]=c>>>8;i[b+2>>0]=c>>>16;i[b+3>>0]=c>>>24;return}function Sf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,m=0,n=0;n=r;r=r+16|0;h=n;m=a+20|0;i=b+56|0;k[m+0>>2]=k[i+0>>2];k[m+4>>2]=k[i+4>>2];k[m+8>>2]=k[i+8>>2];k[m+12>>2]=k[i+12>>2];k[m+16>>2]=k[i+16>>2];k[m+20>>2]=k[i+20>>2];k[m+24>>2]=k[i+24>>2];m=b+24|0;i=b+28|0;c=k[i>>2]|0;if(c>>>0<8192)if(!c)c=0;else j=3;else{c=8192;j=3}if((j|0)==3)_m((k[a+16>>2]|0)+245760|0,k[m>>2]|0,c|0)|0;g=k[b+44>>2]|0;d=8192-c|0;d=g>>>0>>0?g:d;if(d)_m((k[a+16>>2]|0)+(c+245760)|0,k[b+40>>2]|0,d|0)|0;k[a+48>>2]=262144;k[a+52>>2]=0;c=k[b+16>>2]|0;if(!c)c=k[b>>2]|0;g=a+16|0;a:do if((k[b+20>>2]|0)>0){while(1){e=k[c>>2]|0;if((e|0)==40)break;else if((e|0)==22)break a;c=c+40|0}Tf(a,k[c+12>>2]|0)}while(0);a=k[g>>2]|0;d=(l[a+245793>>0]|0)<<8|(l[a+245792>>0]|0)|(l[a+245794>>0]|0)<<16&196608;c=(l[a+245789>>0]|0)<<8|(l[a+245788>>0]|0)|(l[a+245790>>0]|0)<<16&196608;f=(c+d|0)>>>0>262143;k[b+84>>2]=a+(f?0:d);k[b+88>>2]=f?0:c;c=k[m>>2]|0;if(c){ym(c);k[m>>2]=0;a=k[g>>2]|0}k[i>>2]=0;f=b+32|0;k[f>>2]=0;c=(l[a+245809>>0]|0)<<8|(l[a+245808>>0]|0)|(l[a+245810>>0]|0)<<16|(l[a+245811>>0]|0)<<24;do if(c>>>0<8128)if(c){c=c+64|0;k[i>>2]=c;if(!c){d=0;c=0;break}else{j=18;break}}else{r=n;return}else{k[i>>2]=8192;c=8192;j=18}while(0);if((j|0)==18){d=k[b+36>>2]|0;if((d|0)!=0&c>>>0>d>>>0){k[h>>2]=d;Jf(32944,53104,h);Af(32944);a=k[f>>2]|0;d=k[i>>2]|0;e=k[m>>2]|0}else{a=0;d=c;e=0}a=a+32+(a>>>2)|0;a=d>>>0>a>>>0?d:a;d=zm(e,a)|0;if(!d)Af(32944);k[m>>2]=d;k[f>>2]=a;a=k[g>>2]|0}_m(d|0,a+245760|0,c|0)|0;r=n;return}function Tf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;switch(b|0){case 2:case 1:{c=k[a+36>>2]|0;m=k[a+44>>2]|0;if(c>>>0>245759|(c|0)<4)return;g=a+16|0;f=c+-4|0;if((f|0)<=0)return;a=(b|0)==2?233:232;j=0;c=k[g>>2]|0;while(1){h=c+1|0;z=i[c>>0]|0;b=j+1|0;if(z<<24>>24==-24|(z&255|0)==(a|0)){d=b+m|0;e=k[g>>2]|0;e=h>>>0>=e>>>0&h>>>0<(e+262144|0)>>>0;if(e)b=(l[c+2>>0]|0)<<8|(l[h>>0]|0)|(l[c+3>>0]|0)<<16|(l[c+4>>0]|0)<<24;else b=k[h>>2]|0;do if((b|0)<0){if((b+d|0)>-1){b=b+16777216|0;if(e){i[h>>0]=b;i[c+2>>0]=b>>>8;i[c+3>>0]=b>>>16;i[c+4>>0]=b>>>24;break}else{k[h>>2]=b;break}}}else if((b|0)<16777216){b=b-d|0;if(e){i[h>>0]=b;i[c+2>>0]=b>>>8;i[c+3>>0]=b>>>16;i[c+4>>0]=b>>>24;break}else{k[h>>2]=b;break}}while(0);b=j+5|0;c=c+5|0}else c=h;if((b|0)<(f|0))j=b;else break}return}case 4:{s=k[a+36>>2]|0;m=(k[a+20>>2]|0)+-3|0;c=k[a+24>>2]|0;n=k[a+16>>2]|0;i[n+245792>>0]=s;i[n+245793>>0]=s>>>8;i[n+245794>>0]=s>>>16;i[n+245795>>0]=s>>>24;if(s>>>0>122879|(m|0)<0|(c|0)<0)return;else{f=0;b=n;g=s}do{g=g+-1|0;e=(g>>>0)/3|0;if((f|0)<(s|0)){j=f;h=0;a=b;while(1){d=j-m|0;if((d|0)>2?(p=d+s|0,o=l[n+p>>0]|0,p=l[n+(p+-3)>>0]|0,r=o+h-p|0,z=r-h|0,z=(z|0)>-1?z:0-z|0,q=r-o|0,q=(q|0)>-1?q:0-q|0,r=r-p|0,r=(r|0)>-1?r:0-r|0,(z|0)>(q|0)|(z|0)>(r|0)):0)h=(q|0)>(r|0)?p:o;h=h-(l[a>>0]|0)|0;i[n+(j+s)>>0]=h;j=j+3|0;if((j|0)>=(s|0))break;else{h=h&255;a=a+1|0}}b=b+(e+1)|0}f=f+1|0}while((f|0)!=3);d=s+-2|0;if((c|0)>=(d|0))return;e=s+1|0;b=s+2|0;do{y=l[n+(e+c)>>0]|0;z=n+(c+s)|0;i[z>>0]=(l[z>>0]|0)+y;z=n+(b+c)|0;i[z>>0]=(l[z>>0]|0)+y;c=c+3|0}while((c|0)<(d|0));return}case 5:{y=k[a+36>>2]|0;z=k[a+20>>2]|0;w=k[a+16>>2]|0;i[w+245792>>0]=y;i[w+245793>>0]=y>>>8;i[w+245794>>0]=y>>>16;i[w+245795>>0]=y>>>24;if(y>>>0<122880&(z|0)>0){x=0;c=w}else return;do{if((x|0)<(y|0)){o=0;j=0;f=0;a=0;e=0;p=0;h=0;r=0;b=0;s=0;t=x;g=0;m=0;n=0;u=0;v=0;d=c;while(1){A=s;s=v-b|0;B=((ka(g,v)|0)+(u<<3)+(ka(m,s)|0)+(ka(n,A)|0)|0)>>>3&255;c=d+1|0;d=i[d>>0]|0;q=u;u=B-(d&255)|0;i[w+(t+y)>>0]=u;q=u-q<<24>>24;B=d<<24>>24<<3;d=(d<<24>>24>-1?B:0-B|0)+o|0;b=B-v|0;j=((b|0)>-1?b:0-b|0)+j|0;b=B+v|0;f=((b|0)>-1?b:0-b|0)+f|0;b=B-s|0;a=((b|0)>-1?b:0-b|0)+a|0;b=B+s|0;e=e+((b|0)>-1?b:0-b|0)|0;b=B-A|0;b=p+((b|0)>-1?b:0-b|0)|0;p=B+A|0;h=h+((p|0)>-1?p:0-p|0)|0;a:do if(!(r&31)){B=j>>>0>>0;o=B?j:d;A=f>>>0>>0;o=A?f:o;p=a>>>0>>0;a=p?a:o;o=e>>>0>>0;a=o?e:a;f=b>>>0>>0;switch((h>>>0<(f?b:a)>>>0?6:f?5:o?4:p?3:A?2:B&1)|0){case 2:{h=0;b=0;e=0;a=0;f=0;j=0;d=0;g=((g|0)<16&1)+g|0;break a}case 1:{h=0;b=0;e=0;a=0;f=0;j=0;d=0;g=(((g|0)>-17)<<31>>31)+g|0;break a}case 4:{h=0;b=0;e=0;a=0;f=0;j=0;d=0;m=((m|0)<16&1)+m|0;break a}case 5:{h=0;b=0;e=0;a=0;f=0;j=0;d=0;n=(((n|0)>-17)<<31>>31)+n|0;break a}case 3:{h=0;b=0;e=0;a=0;f=0;j=0;d=0;m=(((m|0)>-17)<<31>>31)+m|0;break a}case 6:{h=0;b=0;e=0;a=0;f=0;j=0;d=0;n=((n|0)<16&1)+n|0;break a}default:{h=0;b=0;e=0;a=0;f=0;j=0;d=0;break a}}}while(0);t=t+z|0;if((t|0)>=(y|0))break;else{B=v;o=d;p=b;r=r+1|0;v=q;d=c;b=B}}}x=x+1|0}while((x|0)!=(z|0));return}case 6:{g=k[a+36>>2]|0;h=k[a+20>>2]|0;j=g<<1;f=a+16|0;B=k[f>>2]|0;i[B+245792>>0]=g;i[B+245793>>0]=g>>>8;i[B+245794>>0]=g>>>16;i[B+245795>>0]=g>>>24;if(g>>>0<122880&(h|0)>0){a=0;c=0}else return;do{d=a+g|0;if((d|0)<(j|0)){e=0;b=c;while(1){c=b+1|0;B=k[f>>2]|0;e=(e&255)-(l[B+b>>0]|0)|0;i[B+d>>0]=e;d=d+h|0;if((d|0)>=(j|0))break;else b=c}}a=a+1|0}while((a|0)!=(h|0));return}case 3:{c=k[a+36>>2]|0;if(c>>>0>245759|(c|0)<21)return;d=c+-21|0;if((d|0)<=0)return;e=0;f=k[a+16>>2]|0;b=(k[a+44>>2]|0)>>>4;while(1){c=((l[f>>0]|0)&31)+-16|0;if((c|0)>-1?(h=l[41752+c>>0]|0,(13263>>>c&1|0)!=0):0){c=0;do{if((1<>0]|0)<<8|(l[f+A>>0]|0)|(l[f+(A+2)>>0]|0)<<16|(l[f+(A+3)>>0]|0)<<24)>>>(B&7)&15|0)==5):0){y=j+18|0;B=(y|0)/8|0;y=y&7;t=f+B|0;s=l[t>>0]|0;v=f+(B+1)|0;u=l[v>>0]|0;x=f+(B+2)|0;w=l[x>>0]|0;B=f+(B+3)|0;z=l[B>>0]|0;A=~(1048575<>>y)-b&1048575)<>0]=y|s&A;i[v>>0]=y>>>8|u&A>>>8;i[x>>0]=y>>>16|w&A>>>16;i[B>>0]=y>>>24|z&A>>>24}c=c+1|0}while((c|0)!=3)}e=e+16|0;if((e|0)>=(d|0))break;else{f=f+16|0;b=b+1|0}}return}default:return}}function Uf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+16|0;h=l;k[a+4>>2]=0;k[a>>2]=0;_m(k[a+12>>2]|0,b|0,(c>>>0<32768?c:32768)|0)|0;if(c>>>0>1){f=1;e=0;do{e=i[b+f>>0]^e;f=f+1|0}while((f|0)!=(c|0))}else e=0;kg(a,8);j=d+20|0;k[j>>2]=0;a:do if(e<<24>>24==(i[b>>0]|0)){a=~(Me(-1,b,c)|0);e=0;while(1){if((k[41684+(e*12|0)>>2]|0)==(a|0)?(k[41680+(e*12|0)>>2]|0)==(c|0):0)break;e=e+1|0;if(e>>>0>=6)break a}g=k[41688+(e*12|0)>>2]|0;b=d+4|0;e=(k[b>>2]|0)+1|0;k[b>>2]=e;c=d+8|0;f=k[c>>2]|0;if(e>>>0>f>>>0){a=k[d+12>>2]|0;if((a|0)!=0&e>>>0>a>>>0){k[h>>2]=a;Jf(32944,53104,h);Af(32944);f=k[c>>2]|0;e=k[b>>2]|0}a=f+32+(f>>>2)|0;a=e>>>0>a>>>0?e:a;e=zm(k[d>>2]|0,a*40|0)|0;if(!e)Af(32944);k[d>>2]=e;k[c>>2]=a}else e=k[d>>2]|0;h=k[j>>2]|0;k[j>>2]=h+1;k[e+(h*40|0)>>2]=40;c=e+(h*40|0)+12|0;k[c>>2]=g;k[e+(h*40|0)+20>>2]=c;k[e+(h*40|0)+36>>2]=e+(h*40|0)+28;k[e+(h*40|0)+24>>2]=3;k[e+(h*40|0)+8>>2]=3;r=l;return}while(0);b=d+4|0;e=(k[b>>2]|0)+1|0;k[b>>2]=e;c=d+8|0;f=k[c>>2]|0;if(e>>>0>f>>>0){a=k[d+12>>2]|0;if((a|0)!=0&e>>>0>a>>>0){k[h>>2]=a;Jf(32944,53104,h);Af(32944);f=k[c>>2]|0;e=k[b>>2]|0}a=f+32+(f>>>2)|0;e=e>>>0>a>>>0?e:a;a=zm(k[d>>2]|0,e*40|0)|0;if(!a)Af(32944);k[d>>2]=a;k[c>>2]=e}else a=k[d>>2]|0;h=k[j>>2]|0;f=h+1|0;k[j>>2]=f;k[a+(h*40|0)>>2]=22;k[a+(h*40|0)+20>>2]=a+(h*40|0)+12;k[a+(h*40|0)+36>>2]=a+(h*40|0)+28;k[a+(h*40|0)+24>>2]=3;k[a+(h*40|0)+8>>2]=3;if((h|0)>-1)b=0;else{r=l;return}do{e=a+(b*40|0)+20|0;if(!(k[e>>2]|0))k[e>>2]=a+(b*40|0)+12;e=a+(b*40|0)+36|0;if(!(k[e>>2]|0))k[e>>2]=a+(b*40|0)+28;b=b+1|0}while((b|0)<(f|0));r=l;return}function Vf(a){a=a|0;var b=0,c=0;b=lg(a)|0;c=b&49152;if((c|0)==32768){kg(a,2);c=lg(a)|0;kg(a,16);a=c;return a|0}else if(!c){kg(a,6);a=b>>>10&15;return a|0}else if((c|0)==16384)if(!(b&15360)){kg(a,14);a=b>>>2|-256;return a|0}else{kg(a,10);a=b>>>6&255;return a|0}else{kg(a,2);c=(lg(a)|0)<<16;kg(a,16);c=lg(a)|0|c;kg(a,16);a=c;return a|0}return 0}function Wf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(b>>>0>=262144)return;a=(k[a+16>>2]|0)+b|0;if((a|0)==(c|0))return;b=262144-b|0;an(a|0,c|0,(b>>>0>d>>>0?d:b)|0)|0;return}function Xf(a){a=a|0;Ym(a|0,0,514)|0;return}function Yf(a,b){a=a|0;b=b|0;var c=0,d=0;if(!(k[b>>2]|0)){Ym(a|0,0,513)|0;return}i[a+512>>0]=1;c=(kk(b)|0)+1|0;_m(a|0,b|0,(c>>>0<128?c<<2:512)|0)|0;b=(eb()|0)+75|0;c=0;do{d=a+c|0;i[d>>0]=(l[d>>0]|0)^b+c;c=c+1|0}while((c|0)!=512);return}function Zf(a){a=a|0;var b=0;i[a+512>>0]=0;b=0;do{i[a+b>>0]=0;b=b+1|0}while((b|0)!=512);return}function _f(a,b){a=a|0;b=b|0;var c=0;if(!b)return;else c=0;do{i[a+c>>0]=0;c=c+1|0}while((c|0)!=(b|0));return}function $f(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;d=eb()|0;if(!b)return;d=d+75|0;c=0;do{e=a+c|0;i[e>>0]=(l[e>>0]|0)^d+c;c=c+1|0}while((c|0)!=(b|0));return}function ag(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(!(i[a+512>>0]|0)){k[b>>2]=0;return}e=c<<2;_m(b|0,a|0,(c>>>0>128?512:e)|0)|0;a=eb()|0;if(e){a=a+75|0;d=0;do{f=b+d|0;i[f>>0]=l[f>>0]^a+d;d=d+1|0}while((d|0)!=(e|0))}k[b+(c+-1<<2)>>2]=0;return}function bg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;f=r;r=r+1024|0;d=f+512|0;e=f;if(!(i[a+512>>0]|0))k[d>>2]=0;else{_m(d|0,a|0,512)|0;a=(eb()|0)+75|0;c=0;do{g=d+c|0;i[g>>0]=l[g>>0]^a+c;c=c+1|0}while((c|0)!=512);k[d+508>>2]=0}if(!(i[b+512>>0]|0))k[e>>2]=0;else{_m(e|0,b|0,512)|0;a=(eb()|0)+75|0;c=0;do{g=e+c|0;i[g>>0]=l[g>>0]^a+c;c=c+1|0}while((c|0)!=512);k[e+508>>2]=0}a=hk(d,e)|0;c=0;do{i[d+c>>0]=0;c=c+1|0}while((c|0)!=128);a=(a|0)==0;c=0;do{i[e+c>>0]=0;c=c+1|0}while((c|0)!=128);r=f;return a|0}function cg(a){a=a|0;if(!(i[41768]|0))dg(0);i[a>>0]=1;return}function dg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;h=r;r=r+768|0;g=h+256|0;f=h;a=0;b=1;while(1){e=b&255;i[g+a>>0]=e;i[g+(a+255)>>0]=e;i[f+b>>0]=a;b=b<<1^b^((b&128|0)!=0?283:0);if((b|0)==1){a=0;b=1;break}else a=a+1|0}while(1){i[46376+a>>0]=b;a=a+1|0;if((a|0)==30){e=0;break}else b=((b&128|0)!=0?283:0)^b<<1}do{if(!((e&255)<<24>>24))a=0;else a=l[g+((l[f+e>>0]|0)^255)>>0]|0;c=a<<1^a<<2^a<<3^a<<4;i[41768+e>>0]=a^99^c^c>>>8;a=e<<1^e<<3^e<<6;a=a^5^a>>>8;if((a&255)<<24>>24){a=i[g+((l[f+(a&255)>>0]|0)^255)>>0]|0;i[46120+e>>0]=a;if(!(a<<24>>24)){d=0;b=0;a=0}else{d=1;b=i[g+((l[f+(a&255)>>0]|0)+104)>>0]|0}}else{i[46120+e>>0]=0;d=0;b=0;a=0}i[45098+(e<<2)>>0]=b;i[44073+(e<<2)>>0]=b;i[43048+(e<<2)>>0]=b;i[42027+(e<<2)>>0]=b;c=a&255;i[49482+(c<<2)>>0]=b;i[48457+(c<<2)>>0]=b;i[47432+(c<<2)>>0]=b;i[46411+(c<<2)>>0]=b;if(d)a=i[g+((l[f+c>>0]|0)+199)>>0]|0;else a=0;i[45096+(e<<2)>>0]=a;i[44075+(e<<2)>>0]=a;i[43050+(e<<2)>>0]=a;i[42025+(e<<2)>>0]=a;i[49480+(c<<2)>>0]=a;i[48459+(c<<2)>>0]=a;i[47434+(c<<2)>>0]=a;i[46409+(c<<2)>>0]=a;if(d)a=i[g+((l[f+c>>0]|0)+238)>>0]|0;else a=0;i[45097+(e<<2)>>0]=a;i[44072+(e<<2)>>0]=a;i[43051+(e<<2)>>0]=a;i[42026+(e<<2)>>0]=a;i[49481+(c<<2)>>0]=a;i[48456+(c<<2)>>0]=a;i[47435+(c<<2)>>0]=a;i[46410+(c<<2)>>0]=a;if(d)a=i[g+((l[f+c>>0]|0)+223)>>0]|0;else a=0;i[45099+(e<<2)>>0]=a;i[44074+(e<<2)>>0]=a;i[43049+(e<<2)>>0]=a;i[42024+(e<<2)>>0]=a;i[49483+(c<<2)>>0]=a;i[48458+(c<<2)>>0]=a;i[47433+(c<<2)>>0]=a;i[46408+(c<<2)>>0]=a;e=e+1|0}while((e|0)!=256);r=h;return}function eg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;j=r;r=r+32|0;h=j;if((d|0)==192){k[a+4>>2]=12;f=24;g=5}else if((d|0)==128){k[a+4>>2]=10;f=16;g=5}else if((d|0)==256){k[a+4>>2]=14;f=32;g=5}if((g|0)==5){d=0;do{i[(d&3)+(h+(d>>>2<<2))>>0]=i[c+d>>0]|0;d=d+1|0}while((d|0)!=(f|0))}if(!e){d=a+8|0;f=d+16|0;do{i[d>>0]=0;d=d+1|0}while((d|0)<(f|0))}else{i[a+8>>0]=i[e>>0]|0;i[a+9>>0]=i[e+1>>0]|0;i[a+10>>0]=i[e+2>>0]|0;i[a+11>>0]=i[e+3>>0]|0;i[a+12>>0]=i[e+4>>0]|0;i[a+13>>0]=i[e+5>>0]|0;i[a+14>>0]=i[e+6>>0]|0;i[a+15>>0]=i[e+7>>0]|0;i[a+16>>0]=i[e+8>>0]|0;i[a+17>>0]=i[e+9>>0]|0;i[a+18>>0]=i[e+10>>0]|0;i[a+19>>0]=i[e+11>>0]|0;i[a+20>>0]=i[e+12>>0]|0;i[a+21>>0]=i[e+13>>0]|0;i[a+22>>0]=i[e+14>>0]|0;i[a+23>>0]=i[e+15>>0]|0}fg(a,h);if(b){r=j;return}gg(a);r=j;return}function fg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;D=r;r=r+32|0;C=D;A=a+4|0;m=k[A>>2]|0;B=m+-6|0;d=C+0|0;b=b+0|0;c=d+32|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(c|0));z=(B|0)>0;a:do if(z){j=6-m|0;b=m;f=0;h=0;g=0;while(1){if((h|0)>(b|0)){e=h;c=g;break a}if((f|0)<(B|0)&(g|0)<4){b=j+f|0;e=g+-4|0;e=b>>>0>e>>>0?b:e;b=g-e|0;c=0-e|0;d=0;do{y=a+(h<<4)+(g+d<<2)+24|0;x=C+(f+d<<2)|0;x=l[x>>0]|l[x+1>>0]<<8|l[x+2>>0]<<16|l[x+3>>0]<<24;i[y>>0]=x;i[y+1>>0]=x>>8;i[y+2>>0]=x>>16;i[y+3>>0]=x>>24;d=d+1|0}while((d|0)!=(c|0));d=f-e|0}else{d=f;b=g}c=(b|0)==4;e=(c&1)+h|0;c=c?0:b;b=k[A>>2]|0;if((d|0)<(B|0)){f=d;h=e;g=c}else break}}else{b=m;e=0;c=0}while(0);if((e|0)>(b|0)){r=D;return}u=m+-7|0;o=C+(u<<2)+1|0;p=C+(u<<2)+2|0;q=C+1|0;s=C+(u<<2)+3|0;t=C+2|0;u=C+(u<<2)|0;v=C+3|0;w=(B|0)==8;x=(B|0)/2|0;y=(B|0)>1;n=6-m|0;m=0;do{j=i[C>>0]^i[41768+(l[o>>0]|0)>>0];i[C>>0]=j;g=i[q>>0]^i[41768+(l[p>>0]|0)>>0];i[q>>0]=g;f=i[t>>0]^i[41768+(l[s>>0]|0)>>0];i[t>>0]=f;d=i[v>>0]^i[41768+(l[u>>0]|0)>>0];i[v>>0]=d;j=j^i[46376+m>>0];m=m+1|0;i[C>>0]=j;if(w){h=g;g=1;do{E=C+(g<<2)|0;j=i[E>>0]^j;i[E>>0]=j;E=C+(g<<2)+1|0;h=i[E>>0]^h;i[E>>0]=h;E=C+(g<<2)+2|0;f=i[E>>0]^f;i[E>>0]=f;E=C+(g<<2)+3|0;d=i[E>>0]^d;i[E>>0]=d;g=g+1|0}while((g|0)<(x|0));f=x+-1|0;d=C+(x<<2)|0;j=i[d>>0]^i[41768+(l[C+(f<<2)>>0]|0)>>0];i[d>>0]=j;d=C+(x<<2)+1|0;g=i[d>>0]^i[41768+(l[C+(f<<2)+1>>0]|0)>>0];i[d>>0]=g;d=C+(x<<2)+2|0;h=i[d>>0]^i[41768+(l[C+(f<<2)+2>>0]|0)>>0];i[d>>0]=h;d=C+(x<<2)+3|0;f=i[d>>0]^i[41768+(l[C+(f<<2)+3>>0]|0)>>0];i[d>>0]=f;d=x+1|0;if((d|0)<8)do{E=C+(d<<2)|0;j=i[E>>0]^j;i[E>>0]=j;E=C+(d<<2)+1|0;g=i[E>>0]^g;i[E>>0]=g;E=C+(d<<2)+2|0;h=i[E>>0]^h;i[E>>0]=h;E=C+(d<<2)+3|0;f=i[E>>0]^f;i[E>>0]=f;d=d+1|0}while((d|0)!=8)}else if(y){h=g;g=1;do{E=C+(g<<2)|0;j=i[E>>0]^j;i[E>>0]=j;E=C+(g<<2)+1|0;h=i[E>>0]^h;i[E>>0]=h;E=C+(g<<2)+2|0;f=i[E>>0]^f;i[E>>0]=f;E=C+(g<<2)+3|0;d=i[E>>0]^d;i[E>>0]=d;g=g+1|0}while((g|0)!=(B|0))}b:do if(z){f=0;while(1){if((e|0)>(b|0))break b;if((f|0)<(B|0)&(c|0)<4){g=n+f|0;d=c+-4|0;d=g>>>0>d>>>0?g:d;g=c-d|0;b=0-d|0;j=0;do{E=a+(e<<4)+(c+j<<2)+24|0;h=C+(f+j<<2)|0;h=l[h>>0]|l[h+1>>0]<<8|l[h+2>>0]<<16|l[h+3>>0]<<24;i[E>>0]=h;i[E+1>>0]=h>>8;i[E+2>>0]=h>>16;i[E+3>>0]=h>>24;j=j+1|0}while((j|0)!=(b|0));j=f-d|0;c=g}else j=f;b=(c|0)==4;e=(b&1)+e|0;c=b?0:c;b=k[A>>2]|0;if((j|0)<(B|0))f=j;else break}}while(0)}while((e|0)<=(b|0));r=D;return}function gg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=r;r=r+16|0;x=z;w=a+4|0;if((k[w>>2]|0)<=1){r=z;return}y=1;do{u=a+(y<<4)+24|0;b=i[a+(y<<4)+25>>0]|0;s=i[a+(y<<4)+26>>0]|0;t=i[a+(y<<4)+27>>0]|0;c=i[a+(y<<4)+28>>0]|0;d=i[a+(y<<4)+29>>0]|0;e=i[a+(y<<4)+30>>0]|0;f=i[a+(y<<4)+31>>0]|0;g=i[a+(y<<4)+32>>0]|0;h=i[a+(y<<4)+33>>0]|0;j=i[a+(y<<4)+34>>0]|0;l=i[a+(y<<4)+35>>0]|0;m=i[a+(y<<4)+36>>0]|0;n=i[a+(y<<4)+37>>0]|0;o=i[a+(y<<4)+38>>0]|0;p=i[a+(y<<4)+39>>0]|0;q=i[u>>0]|0;v=0;do{i[x+v>>0]=i[47432+((b&255)<<2)+v>>0]^i[46408+((q&255)<<2)+v>>0]^i[48456+((s&255)<<2)+v>>0]^i[49480+((t&255)<<2)+v>>0];i[x+v+4>>0]=i[47432+((d&255)<<2)+v>>0]^i[46408+((c&255)<<2)+v>>0]^i[48456+((e&255)<<2)+v>>0]^i[49480+((f&255)<<2)+v>>0];i[x+v+8>>0]=i[47432+((h&255)<<2)+v>>0]^i[46408+((g&255)<<2)+v>>0]^i[48456+((j&255)<<2)+v>>0]^i[49480+((l&255)<<2)+v>>0];i[x+v+12>>0]=i[47432+((n&255)<<2)+v>>0]^i[46408+((m&255)<<2)+v>>0]^i[48456+((o&255)<<2)+v>>0]^i[49480+((p&255)<<2)+v>>0];v=v+1|0}while((v|0)!=4);b=u+0|0;c=x+0|0;d=b+16|0;do{i[b>>0]=i[c>>0]|0;b=b+1|0;c=c+1|0}while((b|0)<(d|0));y=y+1|0}while((y|0)<(k[w>>2]|0));r=z;return}function hg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0;ua=r;r=r+48|0;ra=ua+32|0;sa=ua;ta=ua+16|0;if(!c){r=ua;return}g=c>>>4;qa=a+8|0;c=sa+0|0;e=qa+0|0;f=c+16|0;do{i[c>>0]=i[e>>0]|0;c=c+1|0;e=e+1|0}while((c|0)<(f|0));if(g){aa=a+4|0;la=ta+13|0;ma=ta+10|0;na=ta+7|0;oa=ra+1|0;pa=ra+2|0;y=ra+3|0;z=ra+4|0;A=ta+4|0;B=ta+1|0;C=ta+14|0;D=ta+11|0;E=ra+5|0;F=ra+6|0;G=ra+7|0;H=ra+8|0;I=ta+8|0;J=ta+5|0;K=ta+2|0;L=ta+15|0;M=ra+9|0;N=ra+10|0;O=ra+11|0;P=ra+12|0;Q=ta+12|0;R=ta+9|0;S=ta+6|0;T=ta+3|0;U=ra+13|0;V=ra+14|0;W=ra+15|0;X=sa+1|0;Y=sa+2|0;Z=sa+3|0;_=sa+4|0;$=sa+5|0;ba=sa+6|0;ca=sa+7|0;da=sa+8|0;ea=sa+9|0;fa=sa+10|0;ga=sa+11|0;ha=sa+12|0;ia=sa+13|0;ja=sa+14|0;ka=sa+15|0;while(1){c=k[aa>>2]|0;e=0;do{i[ta+e>>0]=i[a+(c<<4)+e+24>>0]^i[b+e>>0];e=e+1|0}while((e|0)!=16);c=l[ta>>0]|0;x=l[la>>0]|0;w=l[ma>>0]|0;v=l[na>>0]|0;i[ra>>0]=i[43048+(x<<2)>>0]^i[42024+(c<<2)>>0]^i[44072+(w<<2)>>0]^i[45096+(v<<2)>>0];i[oa>>0]=i[43049+(x<<2)>>0]^i[42025+(c<<2)>>0]^i[44073+(w<<2)>>0]^i[45097+(v<<2)>>0];i[pa>>0]=i[43050+(x<<2)>>0]^i[42026+(c<<2)>>0]^i[44074+(w<<2)>>0]^i[45098+(v<<2)>>0];i[y>>0]=i[43051+(x<<2)>>0]^i[42027+(c<<2)>>0]^i[44075+(w<<2)>>0]^i[45099+(v<<2)>>0];v=l[A>>0]|0;w=l[B>>0]|0;c=l[C>>0]|0;x=l[D>>0]|0;i[z>>0]=i[43048+(w<<2)>>0]^i[42024+(v<<2)>>0]^i[44072+(c<<2)>>0]^i[45096+(x<<2)>>0];i[E>>0]=i[43049+(w<<2)>>0]^i[42025+(v<<2)>>0]^i[44073+(c<<2)>>0]^i[45097+(x<<2)>>0];i[F>>0]=i[43050+(w<<2)>>0]^i[42026+(v<<2)>>0]^i[44074+(c<<2)>>0]^i[45098+(x<<2)>>0];i[G>>0]=i[43051+(w<<2)>>0]^i[42027+(v<<2)>>0]^i[44075+(c<<2)>>0]^i[45099+(x<<2)>>0];x=l[I>>0]|0;c=l[J>>0]|0;v=l[K>>0]|0;w=l[L>>0]|0;i[H>>0]=i[43048+(c<<2)>>0]^i[42024+(x<<2)>>0]^i[44072+(v<<2)>>0]^i[45096+(w<<2)>>0];i[M>>0]=i[43049+(c<<2)>>0]^i[42025+(x<<2)>>0]^i[44073+(v<<2)>>0]^i[45097+(w<<2)>>0];i[N>>0]=i[43050+(c<<2)>>0]^i[42026+(x<<2)>>0]^i[44074+(v<<2)>>0]^i[45098+(w<<2)>>0];i[O>>0]=i[43051+(c<<2)>>0]^i[42027+(x<<2)>>0]^i[44075+(v<<2)>>0]^i[45099+(w<<2)>>0];w=l[Q>>0]|0;v=l[R>>0]|0;x=l[S>>0]|0;c=l[T>>0]|0;i[P>>0]=i[43048+(v<<2)>>0]^i[42024+(w<<2)>>0]^i[44072+(x<<2)>>0]^i[45096+(c<<2)>>0];i[U>>0]=i[43049+(v<<2)>>0]^i[42025+(w<<2)>>0]^i[44073+(x<<2)>>0]^i[45097+(c<<2)>>0];i[V>>0]=i[43050+(v<<2)>>0]^i[42026+(w<<2)>>0]^i[44074+(x<<2)>>0]^i[45098+(c<<2)>>0];i[W>>0]=i[43051+(v<<2)>>0]^i[42027+(w<<2)>>0]^i[44075+(x<<2)>>0]^i[45099+(c<<2)>>0];c=(k[aa>>2]|0)+-1|0;if((c|0)>1){do{e=0;do{i[ta+e>>0]=i[a+(c<<4)+e+24>>0]^i[ra+e>>0];e=e+1|0}while((e|0)!=16);x=l[ta>>0]|0;w=l[la>>0]|0;v=l[ma>>0]|0;u=l[na>>0]|0;i[ra>>0]=i[43048+(w<<2)>>0]^i[42024+(x<<2)>>0]^i[44072+(v<<2)>>0]^i[45096+(u<<2)>>0];i[oa>>0]=i[43049+(w<<2)>>0]^i[42025+(x<<2)>>0]^i[44073+(v<<2)>>0]^i[45097+(u<<2)>>0];i[pa>>0]=i[43050+(w<<2)>>0]^i[42026+(x<<2)>>0]^i[44074+(v<<2)>>0]^i[45098+(u<<2)>>0];i[y>>0]=i[43051+(w<<2)>>0]^i[42027+(x<<2)>>0]^i[44075+(v<<2)>>0]^i[45099+(u<<2)>>0];u=l[A>>0]|0;v=l[B>>0]|0;x=l[C>>0]|0;w=l[D>>0]|0;i[z>>0]=i[43048+(v<<2)>>0]^i[42024+(u<<2)>>0]^i[44072+(x<<2)>>0]^i[45096+(w<<2)>>0];i[E>>0]=i[43049+(v<<2)>>0]^i[42025+(u<<2)>>0]^i[44073+(x<<2)>>0]^i[45097+(w<<2)>>0];i[F>>0]=i[43050+(v<<2)>>0]^i[42026+(u<<2)>>0]^i[44074+(x<<2)>>0]^i[45098+(w<<2)>>0];i[G>>0]=i[43051+(v<<2)>>0]^i[42027+(u<<2)>>0]^i[44075+(x<<2)>>0]^i[45099+(w<<2)>>0];w=l[I>>0]|0;x=l[J>>0]|0;u=l[K>>0]|0;v=l[L>>0]|0;i[H>>0]=i[43048+(x<<2)>>0]^i[42024+(w<<2)>>0]^i[44072+(u<<2)>>0]^i[45096+(v<<2)>>0];i[M>>0]=i[43049+(x<<2)>>0]^i[42025+(w<<2)>>0]^i[44073+(u<<2)>>0]^i[45097+(v<<2)>>0];i[N>>0]=i[43050+(x<<2)>>0]^i[42026+(w<<2)>>0]^i[44074+(u<<2)>>0]^i[45098+(v<<2)>>0];i[O>>0]=i[43051+(x<<2)>>0]^i[42027+(w<<2)>>0]^i[44075+(u<<2)>>0]^i[45099+(v<<2)>>0];v=l[Q>>0]|0;u=l[R>>0]|0;w=l[S>>0]|0;x=l[T>>0]|0;i[P>>0]=i[43048+(u<<2)>>0]^i[42024+(v<<2)>>0]^i[44072+(w<<2)>>0]^i[45096+(x<<2)>>0];i[U>>0]=i[43049+(u<<2)>>0]^i[42025+(v<<2)>>0]^i[44073+(w<<2)>>0]^i[45097+(x<<2)>>0];i[V>>0]=i[43050+(u<<2)>>0]^i[42026+(v<<2)>>0]^i[44074+(w<<2)>>0]^i[45098+(x<<2)>>0];i[W>>0]=i[43051+(u<<2)>>0]^i[42027+(v<<2)>>0]^i[44075+(w<<2)>>0]^i[45099+(x<<2)>>0];c=c+-1|0}while((c|0)>1);c=0}else c=0;do{i[ta+c>>0]=i[a+c+40>>0]^i[ra+c>>0];c=c+1|0}while((c|0)!=16);e=i[46120+(l[la>>0]|0)>>0]|0;f=i[46120+(l[ma>>0]|0)>>0]|0;h=i[46120+(l[na>>0]|0)>>0]|0;j=i[46120+(l[A>>0]|0)>>0]|0;m=i[46120+(l[B>>0]|0)>>0]|0;n=i[46120+(l[C>>0]|0)>>0]|0;o=i[46120+(l[D>>0]|0)>>0]|0;p=i[46120+(l[I>>0]|0)>>0]|0;q=i[46120+(l[J>>0]|0)>>0]|0;s=i[46120+(l[K>>0]|0)>>0]|0;t=i[46120+(l[L>>0]|0)>>0]|0;u=i[46120+(l[Q>>0]|0)>>0]|0;v=i[46120+(l[R>>0]|0)>>0]|0;w=i[46120+(l[S>>0]|0)>>0]|0;x=i[46120+(l[T>>0]|0)>>0]|0;c=i[a+24>>0]^i[46120+(l[ta>>0]|0)>>0];i[ra>>0]=c;e=i[a+25>>0]^e;i[oa>>0]=e;f=i[a+26>>0]^f;i[pa>>0]=f;h=i[a+27>>0]^h;i[y>>0]=h;j=i[a+28>>0]^j;i[z>>0]=j;m=i[a+29>>0]^m;i[E>>0]=m;n=i[a+30>>0]^n;i[F>>0]=n;o=i[a+31>>0]^o;i[G>>0]=o;p=i[a+32>>0]^p;i[H>>0]=p;q=i[a+33>>0]^q;i[M>>0]=q;s=i[a+34>>0]^s;i[N>>0]=s;t=i[a+35>>0]^t;i[O>>0]=t;u=i[a+36>>0]^u;i[P>>0]=u;v=i[a+37>>0]^v;i[U>>0]=v;w=i[a+38>>0]^w;i[V>>0]=w;x=i[a+39>>0]^x;i[W>>0]=x;if(i[a>>0]|0){c=i[sa>>0]^c;i[ra>>0]=c;i[oa>>0]=i[X>>0]^e;i[pa>>0]=i[Y>>0]^f;i[y>>0]=i[Z>>0]^h;i[z>>0]=i[_>>0]^j;i[E>>0]=i[$>>0]^m;i[F>>0]=i[ba>>0]^n;i[G>>0]=i[ca>>0]^o;i[H>>0]=i[da>>0]^p;i[M>>0]=i[ea>>0]^q;i[N>>0]=i[fa>>0]^s;i[O>>0]=i[ga>>0]^t;i[P>>0]=i[ha>>0]^u;i[U>>0]=i[ia>>0]^v;i[V>>0]=i[ja>>0]^w;i[W>>0]=i[ka>>0]^x}i[sa>>0]=i[b>>0]|0;i[X>>0]=i[b+1>>0]|0;i[Y>>0]=i[b+2>>0]|0;i[Z>>0]=i[b+3>>0]|0;i[_>>0]=i[b+4>>0]|0;i[$>>0]=i[b+5>>0]|0;i[ba>>0]=i[b+6>>0]|0;i[ca>>0]=i[b+7>>0]|0;i[da>>0]=i[b+8>>0]|0;i[ea>>0]=i[b+9>>0]|0;i[fa>>0]=i[b+10>>0]|0;i[ga>>0]=i[b+11>>0]|0;i[ha>>0]=i[b+12>>0]|0;i[ia>>0]=i[b+13>>0]|0;i[ja>>0]=i[b+14>>0]|0;i[ka>>0]=i[b+15>>0]|0;i[d>>0]=c;i[d+1>>0]=i[oa>>0]|0;i[d+2>>0]=i[pa>>0]|0;i[d+3>>0]=i[y>>0]|0;i[d+4>>0]=i[z>>0]|0;i[d+5>>0]=i[E>>0]|0;i[d+6>>0]=i[F>>0]|0;i[d+7>>0]=i[G>>0]|0;i[d+8>>0]=i[H>>0]|0;i[d+9>>0]=i[M>>0]|0;i[d+10>>0]=i[N>>0]|0;i[d+11>>0]=i[O>>0]|0;i[d+12>>0]=i[P>>0]|0;i[d+13>>0]=i[U>>0]|0;i[d+14>>0]=i[V>>0]|0;i[d+15>>0]=i[W>>0]|0;g=g+-1|0;if(!g)break;else{d=d+16|0;b=b+16|0}}}c=qa+0|0;e=sa+0|0;f=c+16|0;do{i[c>>0]=i[e>>0]|0;c=c+1|0;e=e+1|0}while((c|0)<(f|0));r=ua;return}function ig(a,b){a=a|0;b=b|0;i[a+8>>0]=0;if(b){b=zk(32771)|0;k[a+12>>2]=b;Ym(b|0,0,32771)|0;return}else{k[a+12>>2]=0;return}}function jg(a){a=a|0;if(i[a+8>>0]|0)return;a=k[a+12>>2]|0;if(!a)return;Bk(a);return}function kg(a,b){a=a|0;b=b|0;var c=0;c=a+4|0;b=(k[c>>2]|0)+b|0;k[a>>2]=(b>>>3)+(k[a>>2]|0);k[c>>2]=b&7;return}function lg(a){a=a|0;var b=0,c=0;b=k[a>>2]|0;c=k[a+12>>2]|0;return ((l[c+(b+1)>>0]|0)<<8|(l[c+b>>0]|0)<<16|(l[c+(b+2)>>0]|0))>>>(8-(k[a+4>>2]|0)|0)&65535|0}function mg(a,b){a=a|0;b=b|0;var c=0,d=0;c=a+12|0;d=k[c>>2]|0;a=a+8|0;if((d|0)!=0?(i[a>>0]|0)==0:0)Bk(d);k[c>>2]=b;i[a>>0]=1;return} -function Dh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=r;r=r+1056|0;m=D+1028|0;C=D;A=a+4|0;c=k[A>>2]|0;B=a+120|0;d=k[B>>2]|0;if((c|0)>(d+-25|0)){b=d-c|0;if((b|0)<0){a=0;r=D;return a|0}h=a+136|0;g=a+128|0;k[g>>2]=(k[h>>2]|0)-c+(k[g>>2]|0);if((c|0)>16384){if((b|0)>0){z=k[a+16>>2]|0;an(z|0,z+c|0,b|0)|0}k[A>>2]=0;k[B>>2]=b}else b=d;if((b|0)!=32768){c=pf(k[a>>2]|0,(k[a+16>>2]|0)+b|0,32768-b|0)|0;b=k[B>>2]|0;if((c|0)>0){b=b+c|0;k[B>>2]=b;f=c}else f=c}else{b=32768;f=0}d=b+-30|0;e=a+124|0;k[e>>2]=d;c=k[A>>2]|0;k[h>>2]=c;b=k[g>>2]|0;if((b|0)!=-1){z=c+-1+b|0;k[e>>2]=(d|0)<(z|0)?d:z}if((f|0)==-1){a=0;r=D;return a|0}}x=a+16|0;g=k[x>>2]|0;y=a+8|0;f=k[y>>2]|0;e=((l[g+(c+1)>>0]|0)<<8|(l[g+c>>0]|0)<<16|(l[g+(c+2)>>0]|0))>>>(8-f|0);d=e&32768;z=a+38728|0;k[z>>2]=d;if(!(e&16384))Ym(a+37700|0,0,1028)|0;w=f+2|0;b=(w>>>3)+c|0;k[A>>2]=b;c=w&7;k[y>>2]=c;if(!d)w=374;else{d=(e>>>12&3)+1|0;k[a+38732>>2]=d;e=a+38736|0;if((k[e>>2]|0)>=(d|0))k[e>>2]=0;b=((c+2|0)>>>3)+b|0;k[A>>2]=b;c=f+4&7;k[y>>2]=c;w=d*257|0}e=0;do{i[m+e>>0]=((l[g+(b+1)>>0]|0)<<8|(l[g+b>>0]|0)<<16|(l[g+(b+2)>>0]|0))>>>(8-c|0)>>>12&15;v=c+4|0;b=(v>>>3)+b|0;k[A>>2]=b;c=v&7;k[y>>2]=c;e=e+1|0}while((e|0)!=19);v=a+15428|0;Gh(0,m,v,19);q=a+136|0;s=a+128|0;t=a+124|0;u=a+15560|0;b=k[A>>2]|0;d=k[B>>2]|0;e=0;a:while(1){o=(e|0)<(w|0);p=(e|0)>0;f=d;c=d;while(1){if(!o){m=51;break a}if((b|0)>(c+-5|0)){g=c-b|0;if((g|0)<0){b=0;m=57;break a}k[s>>2]=(k[q>>2]|0)-b+(k[s>>2]|0);if((b|0)>16384){if((g|0)>0){h=k[x>>2]|0;an(h|0,h+b|0,g|0)|0}k[A>>2]=0;k[B>>2]=g;d=g;c=g}else d=f;if((c|0)!=32768){g=pf(k[a>>2]|0,(k[x>>2]|0)+c|0,32768-c|0)|0;b=k[B>>2]|0;if((g|0)>0){c=b+g|0;k[B>>2]=c;d=c}else{d=b;c=b}}else{c=32768;g=0}f=c+-30|0;k[t>>2]=f;b=k[A>>2]|0;k[q>>2]=b;h=k[s>>2]|0;if((h|0)!=-1){h=b+-1+h|0;k[t>>2]=(f|0)<(h|0)?f:h}if((g|0)==-1){b=0;m=57;break a}}else d=f;n=k[x>>2]|0;f=k[y>>2]|0;h=((l[n+(b+1)>>0]|0)<<8|(l[n+b>>0]|0)<<16|(l[n+(b+2)>>0]|0))>>>(8-f|0)&65534;g=k[u>>2]|0;if(h>>>0<(k[a+(g<<2)+15432>>2]|0)>>>0){g=h>>>(16-g|0);h=(l[a+g+15564>>0]|0)+f|0;b=(h>>>3)+b|0;k[A>>2]=b;h=h&7;k[y>>2]=h;g=a+(g<<1)+16588|0}else{do{g=g+1|0;if(g>>>0>=15){g=15;break}}while(h>>>0>=(k[a+(g<<2)+15432>>2]|0)>>>0);f=g+f|0;b=(f>>>3)+b|0;k[A>>2]=b;f=f&7;k[y>>2]=f;g=((h-(k[a+(g+-1<<2)+15432>>2]|0)|0)>>>(16-g|0))+(k[a+(g<<2)+15496>>2]|0)|0;g=a+((g>>>0>=(k[v>>2]|0)>>>0?0:g)<<1)+18636|0;h=f}m=j[g>>1]|0;if((m&65535)<16){c=m;m=43;break}if(m<<16>>16!=16){g=h;c=n;f=d;d=m;m=48;break}f=i[n+b>>0]|0;g=i[n+(b+1)>>0]|0;m=i[n+(b+2)>>0]|0;n=h+2|0;b=(n>>>3)+b|0;k[A>>2]=b;k[y>>2]=n&7;if(p){c=m;m=46;break}else f=d}if((m|0)==43){i[C+e>>0]=(l[a+e+37700>>0]|0)+(c&65535)&15;e=e+1|0;continue}else if((m|0)==46){p=((g&255)<<8|(f&255)<<16|c&255)>>>(8-h|0)>>>14&3;c=-3-p|0;p=((c|0)>-1?-4-c|0:-3)-p|0;c=e-w|0;c=e-(p>>>0>c>>>0?p:c)|0;while(1){i[C+e>>0]=i[C+(e+-1)>>0]|0;e=e+1|0;if((e|0)==(c|0)){e=c;continue a}}}else if((m|0)==48){c=((l[c+(b+1)>>0]|0)<<8|(l[c+b>>0]|0)<<16|(l[c+(b+2)>>0]|0))>>>(8-g|0)&65535;if(d<<16>>16==17){d=g+3|0;c=(c>>>13)+3|0}else{d=g+7|0;c=(c>>>9)+11|0}b=(d>>>3)+b|0;k[A>>2]=b;k[y>>2]=d&7;d=e-w|0;p=0-c|0;p=~(c+((p|0)>-1?p:-1));p=d>>>0>p>>>0?d:p;Ym(C+e|0,0,0-p|0)|0;d=f;e=e-p|0;continue}}if((m|0)==51){if((c|0)<(b|0)){a=1;r=D;return a|0}if(k[z>>2]|0){b=a+38732|0;if((k[b>>2]|0)>0){c=0;do{Gh(0,C+(c*257|0)|0,a+(c*3820|0)+22420|0,257);c=c+1|0}while((c|0)<(k[b>>2]|0))}}else{Gh(0,C,a+148|0,298);Gh(0,C+298|0,a+3968|0,48);Gh(0,C+346|0,a+11608|0,28)}_m(a+37700|0,C|0,1028)|0;a=1;r=D;return a|0}else if((m|0)==57){r=D;return b|0}return 0}function Eh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=k[a+38736>>2]|0;t=a+(y*92|0)+38828|0;k[t>>2]=(k[t>>2]|0)+1;w=a+(y*92|0)+38772|0;j=k[w>>2]|0;l=a+(y*92|0)+38776|0;k[l>>2]=j;n=a+(y*92|0)+38768|0;i=k[n>>2]|0;k[w>>2]=i;w=a+(y*92|0)+38780|0;e=k[w>>2]|0;u=a+(y*92|0)+38764|0;g=e-(k[u>>2]|0)|0;k[n>>2]=g;k[u>>2]=e;u=a+(y*92|0)+38832|0;n=a+(y*92|0)+38744|0;s=(ka(k[n>>2]|0,e)|0)+(k[u>>2]<<3)|0;o=a+(y*92|0)+38748|0;s=s+(ka(g,k[o>>2]|0)|0)|0;p=a+(y*92|0)+38752|0;s=s+(ka(i,k[p>>2]|0)|0)|0;q=a+(y*92|0)+38756|0;s=s+(ka(j,k[q>>2]|0)|0)|0;r=a+(y*92|0)+38760|0;v=a+38740|0;s=((s+(ka(k[v>>2]|0,k[r>>2]|0)|0)|0)>>>3&255)-b|0;b=b<<24;x=b>>21;c=a+(y*92|0)+38784|0;k[c>>2]=(k[c>>2]|0)+((b|0)>-2097152?x:0-x|0);b=x-e|0;d=a+(y*92|0)+38788|0;k[d>>2]=((b|0)>-1?b:0-b|0)+(k[d>>2]|0);b=e+x|0;e=a+(y*92|0)+38792|0;k[e>>2]=((b|0)>-1?b:0-b|0)+(k[e>>2]|0);b=x-g|0;f=a+(y*92|0)+38796|0;k[f>>2]=((b|0)>-1?b:0-b|0)+(k[f>>2]|0);b=g+x|0;g=a+(y*92|0)+38800|0;k[g>>2]=((b|0)>-1?b:0-b|0)+(k[g>>2]|0);b=x-i|0;h=a+(y*92|0)+38804|0;k[h>>2]=((b|0)>-1?b:0-b|0)+(k[h>>2]|0);b=i+x|0;i=a+(y*92|0)+38808|0;k[i>>2]=((b|0)>-1?b:0-b|0)+(k[i>>2]|0);b=x-j|0;j=a+(y*92|0)+38812|0;k[j>>2]=((b|0)>-1?b:0-b|0)+(k[j>>2]|0);b=(k[l>>2]|0)+x|0;l=a+(y*92|0)+38816|0;k[l>>2]=((b|0)>-1?b:0-b|0)+(k[l>>2]|0);b=x-(k[v>>2]|0)|0;m=a+(y*92|0)+38820|0;k[m>>2]=((b|0)>-1?b:0-b|0)+(k[m>>2]|0);x=(k[v>>2]|0)+x|0;b=a+(y*92|0)+38824|0;k[b>>2]=((x|0)>-1?x:0-x|0)+(k[b>>2]|0);a=s-(k[u>>2]|0)<<24>>24;k[w>>2]=a;k[v>>2]=a;k[u>>2]=s;if(k[t>>2]&31){y=s&255;return y|0}u=k[c>>2]|0;k[c>>2]=0;v=k[d>>2]|0;y=v>>>0>>0;u=y?v:u;k[d>>2]=0;v=k[e>>2]|0;x=v>>>0>>0;u=x?v:u;k[e>>2]=0;v=k[f>>2]|0;w=v>>>0>>0;u=w?v:u;k[f>>2]=0;f=k[g>>2]|0;v=f>>>0>>0;f=v?f:u;k[g>>2]=0;g=k[h>>2]|0;u=g>>>0>>0;f=u?g:f;k[h>>2]=0;g=k[i>>2]|0;t=g>>>0>>0;f=t?g:f;k[i>>2]=0;g=k[j>>2]|0;a=g>>>0>>0;f=a?g:f;k[j>>2]=0;g=k[l>>2]|0;h=g>>>0>>0;f=h?g:f;k[l>>2]=0;g=k[m>>2]|0;l=g>>>0>>0;k[m>>2]=0;y=(k[b>>2]|0)>>>0<(l?g:f)>>>0?10:l?9:h?8:a?7:t?6:u?5:v?4:w?3:x?2:y&1;k[b>>2]=0;do switch(y|0){case 6:{b=k[p>>2]|0;if((b|0)>=16){y=s&255;return y|0}k[p>>2]=b+1;y=s&255;return y|0}case 10:{b=k[r>>2]|0;if((b|0)>=16){y=s&255;return y|0}k[r>>2]=b+1;y=s&255;return y|0}case 4:{b=k[o>>2]|0;if((b|0)>=16){y=s&255;return y|0}k[o>>2]=b+1;y=s&255;return y|0}case 7:{b=k[q>>2]|0;if((b|0)<=-17){y=s&255;return y|0}k[q>>2]=b+-1;y=s&255;return y|0}case 2:{b=k[n>>2]|0;if((b|0)>=16){y=s&255;return y|0}k[n>>2]=b+1;y=s&255;return y|0}case 8:{b=k[q>>2]|0;if((b|0)>=16){y=s&255;return y|0}k[q>>2]=b+1;y=s&255;return y|0}case 9:{b=k[r>>2]|0;if((b|0)<=-17){y=s&255;return y|0}k[r>>2]=b+-1;y=s&255;return y|0}case 1:{b=k[n>>2]|0;if((b|0)<=-17){y=s&255;return y|0}k[n>>2]=b+-1;y=s&255;return y|0}case 5:{b=k[p>>2]|0;if((b|0)<=-17){y=s&255;return y|0}k[p>>2]=b+-1;y=s&255;return y|0}case 3:{b=k[o>>2]|0;if((b|0)<=-17){y=s&255;return y|0}k[o>>2]=b+-1;y=s&255;return y|0}default:{y=s&255;return y|0}}while(0);return 0}function Fh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;g=a+4|0;h=k[g>>2]|0;if((k[a+120>>2]|0)<(h+5|0))return;if(!(k[a+38728>>2]|0)){e=k[a+16>>2]|0;c=a+8|0;d=k[c>>2]|0;e=(l[e+(h+1)>>0]<<8|l[e+h>>0]<<16|l[e+(h+2)>>0])>>>(8-d|0)&65534;b=k[a+280>>2]|0;if(e>>>0<(k[a+(b<<2)+152>>2]|0)>>>0){b=e>>>(16-b|0);f=(l[a+b+284>>0]|0)+d|0;k[g>>2]=(f>>>3)+h;k[c>>2]=f&7;b=a+(b<<1)+1308|0}else{do{b=b+1|0;if(b>>>0>=15){b=15;break}}while(e>>>0>=(k[a+(b<<2)+152>>2]|0)>>>0);f=b+d|0;k[g>>2]=(f>>>3)+h;k[c>>2]=f&7;b=((e-(k[a+(b+-1<<2)+152>>2]|0)|0)>>>(16-b|0))+(k[a+(b<<2)+216>>2]|0)|0;b=a+((b>>>0>=(k[a+148>>2]|0)>>>0?0:b)<<1)+3356|0}if((j[b>>1]|0)!=269)return;Dh(a)|0;return}else{e=k[a+38736>>2]|0;f=k[a+16>>2]|0;c=a+8|0;d=k[c>>2]|0;f=(l[f+(h+1)>>0]<<8|l[f+h>>0]<<16|l[f+(h+2)>>0])>>>(8-d|0)&65534;b=k[a+(e*3820|0)+22552>>2]|0;if(f>>>0<(k[a+(e*3820|0)+(b<<2)+22424>>2]|0)>>>0){b=f>>>(16-b|0);f=(l[a+(e*3820|0)+b+22556>>0]|0)+d|0;k[g>>2]=(f>>>3)+h;k[c>>2]=f&7;b=a+(e*3820|0)+(b<<1)+23580|0}else{do{b=b+1|0;if(b>>>0>=15){b=15;break}}while(f>>>0>=(k[a+(e*3820|0)+(b<<2)+22424>>2]|0)>>>0);d=b+d|0;k[g>>2]=(d>>>3)+h;k[c>>2]=d&7;b=((f-(k[a+(e*3820|0)+(b+-1<<2)+22424>>2]|0)|0)>>>(16-b|0))+(k[a+(e*3820|0)+(b<<2)+22488>>2]|0)|0;b=a+(e*3820|0)+((b>>>0>=(k[a+(e*3820|0)+22420>>2]|0)>>>0?0:b)<<1)+25628|0}if((j[b>>1]|0)!=256)return;Dh(a)|0;return}}function Gh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,m=0,n=0,o=0,p=0,q=0,s=0;q=r;r=r+128|0;m=q+64|0;o=q;k[c>>2]=d;e=m+0|0;g=e+64|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));n=(d|0)==0;if(!n){a=0;do{h=m+(((l[b+a>>0]|0)&15)<<2)|0;k[h>>2]=(k[h>>2]|0)+1;a=a+1|0}while((a|0)!=(d|0))}k[m>>2]=0;Ym(c+3208|0,0,d<<1|0)|0;h=c+68|0;k[h>>2]=0;k[c+4>>2]=0;g=0;e=0;f=1;a=0;while(1){s=g;g=k[m+(f<<2)>>2]|0;a=g+a|0;k[c+(f<<2)+4>>2]=a<<16-f;e=s+e|0;k[c+(f<<2)+68>>2]=e;f=f+1|0;if((f|0)==16)break;else a=a<<1}e=o+0|0;a=h+0|0;g=e+64|0;do{k[e>>2]=k[a>>2];e=e+4|0;a=a+4|0}while((e|0)<(g|0));if(!n){e=0;do{a=(l[b+e>>0]|0)&15;if(a){s=o+(a<<2)|0;n=k[s>>2]|0;j[c+(n<<1)+3208>>1]=e;k[s>>2]=n+1}e=e+1|0}while((e|0)!=(d|0));if((d|0)==299|(d|0)==298|(d|0)==306){k[c+132>>2]=10;a=10}else p=11}else p=11;if((p|0)==11){k[c+132>>2]=7;a=7}h=c+132|0;m=1<>>0<16?g>>>0>=(k[c+(a<<2)+4>>2]|0)>>>0:0)a=a+1|0;else{f=a;break}i[c+e+136>>0]=f;a=((g-(k[c+(f+-1<<2)+4>>2]|0)|0)>>>(16-f|0))+(k[c+(f<<2)+68>>2]|0)|0;if(a>>>0>>0)a=j[c+(a<<1)+3208>>1]|0;else a=0;j[c+(e<<1)+1160>>1]=a;e=e+1|0;if(e>>>0>=m>>>0)break;a=k[h>>2]|0}r=q;return}function Hh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;if(!(k[13051]|0)){c=0;o=0;p=0;while(1){while(1){if((c|0)!=17)break;c=c+1|0}d=1<>2]|0;n=(e|0)>1?e:1;Ym(52456+p|0,c&255|0,n|0)|0;f=o;o=o+(n<>2]=f;g=g+1|0;if((g|0)>=(e|0))break;else{f=f+d|0;h=h+1|0}}c=c+1|0;if((c|0)==19)break;else p=p+n|0}}U=a+19544|0;i[U>>0]=1;V=a+19528|0;do if(!(i[V>>0]|0)){if(b)c=1;else{Ym(a+148|0,0,19100)|0;c=a+59100|0;d=a+84|0;e=d+36|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));c=k[c>>2]|0;k[a+19248>>2]=(c>>>0<4194304?c:4194304)&k[a+59104>>2];c=a+68|0;d=k[c>>2]|0;if(d){ym(d);k[c>>2]=0}k[a+72>>2]=0;k[a+76>>2]=0;c=0}p=a+8|0;k[p>>2]=0;g=a+4|0;k[g>>2]=0;h=a+19536|0;o=h;k[o>>2]=0;k[o+4>>2]=0;o=a+120|0;k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;k[o+12>>2]=0;k[o+16>>2]=0;k[o+20>>2]=0;k[o+24>>2]=0;k[a+128>>2]=-1;if(c){d=0;e=0}else{k[a+38736>>2]=0;k[a+38740>>2]=0;k[a+38728>>2]=0;k[a+38732>>2]=1;Ym(a+38744|0,0,368)|0;Ym(a+22420|0,0,16308)|0;i[a+58972>>0]=0;Ym(a+58564|0,0,404)|0;k[a+58560>>2]=2;k[a+58968>>2]=0;Nh(a);d=k[o>>2]|0;e=k[g>>2]|0}c=d-e|0;if((c|0)<0)return;if((e|0)>16384){if((c|0)>0){Q=k[a+16>>2]|0;an(Q|0,Q+e|0,c|0)|0}k[g>>2]=0;k[o>>2]=c}else c=d;f=a+16|0;c=pf(k[a>>2]|0,(k[f>>2]|0)+c|0,32768-c|0)|0;d=k[o>>2]|0;if((c|0)<=0){k[a+124>>2]=d+-30;if((c|0)==-1)return}else{Q=d+c|0;k[o>>2]=Q;k[a+124>>2]=Q+-30}if(b?(i[a+58972>>0]|0)!=0:0){S=a;break}if(Ih(a)|0)S=a;else return}else{o=a+120|0;f=a+16|0;S=a;p=a+8|0;h=a+19536|0;g=a+4|0}while(0);A=a+59104|0;B=a+112|0;C=a+124|0;D=a+116|0;E=a+58968|0;F=a+39120|0;G=a+58560|0;H=a+19252|0;I=a+280|0;J=a+4100|0;K=a+92|0;L=a+96|0;M=a+88|0;N=a+84|0;O=a+104|0;P=a+39116|0;Q=a+39112|0;R=a+7920|0;u=a+7788|0;v=a+3968|0;w=a+11740|0;x=a+11608|0;T=a+58972|0;y=a+148|0;z=a+19520|0;t=0;a:while(1){k[B>>2]=k[B>>2]&k[A>>2];d=k[g>>2]|0;do if((d|0)>(k[C>>2]|0)){e=k[o>>2]|0;c=e-d|0;if((c|0)<0)break a;if((d|0)>16384){if((c|0)>0){s=k[f>>2]|0;an(s|0,s+d|0,c|0)|0}k[g>>2]=0;k[o>>2]=c}else c=e;c=pf(k[S>>2]|0,(k[f>>2]|0)+c|0,32768-c|0)|0;d=k[o>>2]|0;if((c|0)<=0){k[C>>2]=d+-30;if((c|0)==-1)break a;else break}else{s=d+c|0;k[o>>2]=s;k[C>>2]=s+-30;break}}while(0);r=k[D>>2]|0;s=k[B>>2]|0;if(!((r|0)==(s|0)?1:(r-s&k[A>>2])>>>0>259)){Jh(a);r=h;b=k[r+4>>2]|0;s=z;q=k[s+4>>2]|0;if((b|0)>(q|0)|((b|0)==(q|0)?(k[r>>2]|0)>>>0>(k[s>>2]|0)>>>0:0)){W=113;break}if(i[V>>0]|0){W=40;break}}if((k[E>>2]|0)==1){c=kh(F)|0;if((c|0)==-1){W=43;break}b:do if((c|0)==(k[G>>2]|0))switch(kh(F)|0){case -1:{W=46;break a}case 0:if(Ih(a)|0){s=t;t=s;continue a}else break a;case 4:{c=0;e=0;while(1){d=kh(F)|0;if((d|0)==-1){W=50;break a}if((e|0)==3){W=53;break}c=d&255|c<<8;if((e|0)>2){d=t;break}else e=e+1|0}if((W|0)==53){W=0;d=d&255}ai(a,d+32|0,c+2|0);t=d;continue a}case 5:{c=kh(F)|0;if((c|0)==-1){W=56;break a}ai(a,c+4|0,1);s=t;t=s;continue a}case 3:if(Kh(a)|0){s=t;t=s;continue a}else break a;case 2:break a;default:break b}while(0);s=k[B>>2]|0;k[B>>2]=s+1;i[(k[H>>2]|0)+s>>0]=c;s=t;t=s;continue}d=k[g>>2]|0;s=k[f>>2]|0;e=k[p>>2]|0;n=(l[s+(d+1)>>0]<<8|l[s+d>>0]<<16|l[s+(d+2)>>0])>>>(8-e|0)&65534;c=k[I>>2]|0;if(n>>>0<(k[a+(c<<2)+152>>2]|0)>>>0){c=n>>>(16-c|0);e=(l[a+c+284>>0]|0)+e|0;d=(e>>>3)+d|0;k[g>>2]=d;e=e&7;k[p>>2]=e;c=a+(c<<1)+1308|0}else{do{c=c+1|0;if(c>>>0>=15){c=15;break}}while(n>>>0>=(k[a+(c<<2)+152>>2]|0)>>>0);e=c+e|0;d=(e>>>3)+d|0;k[g>>2]=d;e=e&7;k[p>>2]=e;c=((n-(k[a+(c+-1<<2)+152>>2]|0)|0)>>>(16-c|0))+(k[a+(c<<2)+216>>2]|0)|0;c=a+((c>>>0>=(k[y>>2]|0)>>>0?0:c)<<1)+3356|0}c=j[c>>1]|0;b=c&65535;if((c&65535)<256){s=k[B>>2]|0;k[B>>2]=s+1;i[(k[H>>2]|0)+s>>0]=c;s=t;t=s;continue}if((c&65535)<=270)if((b|0)==256){c=(l[s+(d+1)>>0]<<8|l[s+d>>0]<<16|l[s+(d+2)>>0])>>>(8-e|0);if(!(c&32768)){W=94;break}s=e+1|0;k[g>>2]=(s>>>3)+d;k[p>>2]=s&7;i[T>>0]=0;if(Ih(a)|0){s=t;t=s;continue}else break}else if((b|0)==257)if(Lh(a)|0){s=t;t=s;continue}else break;else if((b|0)==258){c=k[O>>2]|0;if(!c){s=t;t=s;continue}ai(a,c,k[N>>2]|0);s=t;t=s;continue}else{if((c&65535)>=263){q=b+-263|0;r=l[52608+q>>0]|0;s=(l[52600+q>>0]|0)+1+(((l[s+(d+1)>>0]<<8|l[s+d>>0]<<16|l[s+(d+2)>>0])>>>(8-e|0)&65535)>>>(16-r|0))|0;r=e+r|0;k[g>>2]=(r>>>3)+d;k[p>>2]=r&7;k[L>>2]=k[K>>2];k[K>>2]=k[M>>2];k[M>>2]=k[N>>2];k[N>>2]=s;k[O>>2]=2;ai(a,2,s);s=t;t=s;continue}c=b+-259|0;q=k[a+(c<<2)+84>>2]|0;if((c|0)>0){do{s=c;c=c+-1|0;k[a+(s<<2)+84>>2]=k[a+(c<<2)+84>>2]}while((c|0)>0);b=k[f>>2]|0;d=k[g>>2]|0;e=k[p>>2]|0}else b=s;k[N>>2]=q;n=(l[b+(d+1)>>0]<<8|l[b+d>>0]<<16|l[b+(d+2)>>0])>>>(8-e|0)&65534;c=k[w>>2]|0;if(n>>>0<(k[a+(c<<2)+11612>>2]|0)>>>0){c=n>>>(16-c|0);n=(l[a+c+11744>>0]|0)+e|0;e=(n>>>3)+d|0;k[g>>2]=e;n=n&7;k[p>>2]=n;c=a+(c<<1)+12768|0}else{do{c=c+1|0;if(c>>>0>=15){c=15;break}}while(n>>>0>=(k[a+(c<<2)+11612>>2]|0)>>>0);s=c+e|0;e=(s>>>3)+d|0;k[g>>2]=e;s=s&7;k[p>>2]=s;c=((n-(k[a+(c+-1<<2)+11612>>2]|0)|0)>>>(16-c|0))+(k[a+(c<<2)+11676>>2]|0)|0;c=a+((c>>>0>=(k[x>>2]|0)>>>0?0:c)<<1)+14816|0;n=s}s=m[c>>1]|0;c=(l[52136+s>>0]|0)+2|0;d=l[52168+s>>0]|0;if((s+-8|0)>>>0<20){c=(((l[b+(e+1)>>0]<<8|l[b+e>>0]<<16|l[b+(e+2)>>0])>>>(8-n|0)&65535)>>>(16-d|0))+c|0;s=n+d|0;k[g>>2]=(s>>>3)+e;k[p>>2]=s&7}k[O>>2]=c;ai(a,c,q);s=t;t=s;continue}n=b+-271|0;c=(l[52136+n>>0]|0)+3|0;n=l[52168+n>>0]|0;if((b+-279|0)>>>0<20){c=(((l[s+(d+1)>>0]<<8|l[s+d>>0]<<16|l[s+(d+2)>>0])>>>(8-e|0)&65535)>>>(16-n|0))+c|0;e=e+n|0;d=(e>>>3)+d|0;k[g>>2]=d;e=e&7;k[p>>2]=e}b=(l[s+(d+1)>>0]<<8|l[s+d>>0]<<16|l[s+(d+2)>>0])>>>(8-e|0)&65534;n=k[J>>2]|0;if(b>>>0<(k[a+(n<<2)+3972>>2]|0)>>>0){b=b>>>(16-n|0);r=(l[a+b+4104>>0]|0)+e|0;q=(r>>>3)+d|0;k[g>>2]=q;r=r&7;k[p>>2]=r;d=a+(b<<1)+5128|0}else{do{n=n+1|0;if(n>>>0>=15){n=15;break}}while(b>>>0>=(k[a+(n<<2)+3972>>2]|0)>>>0);r=n+e|0;q=(r>>>3)+d|0;k[g>>2]=q;r=r&7;k[p>>2]=r;d=((b-(k[a+(n+-1<<2)+3972>>2]|0)|0)>>>(16-n|0))+(k[a+(n<<2)+4036>>2]|0)|0;d=a+((d>>>0>=(k[v>>2]|0)>>>0?0:d)<<1)+7176|0}e=j[d>>1]|0;n=e&65535;d=(k[52200+(n<<2)>>2]|0)+1|0;n=i[52456+n>>0]|0;b=n&255;do if(n<<24>>24){if((e&65535)<=9){d=(((l[s+(q+1)>>0]<<8|l[s+q>>0]<<16|l[s+(q+2)>>0])>>>(8-r|0)&65535)>>>(16-b|0))+d|0;s=r+b|0;k[g>>2]=(s>>>3)+q;k[p>>2]=s&7;break}if((n&255)>4){n=(((l[s+(q+1)>>0]<<8|l[s+q>>0]<<16|l[s+(q+2)>>0])>>>(8-r|0)&65535)>>>(20-b|0)<<4)+d|0;r=b+-4+r|0;q=(r>>>3)+q|0;k[g>>2]=q;r=r&7;k[p>>2]=r}else n=d;d=k[P>>2]|0;if((d|0)>0){k[P>>2]=d+-1;d=(k[Q>>2]|0)+n|0;break}e=(l[s+(q+1)>>0]<<8|l[s+q>>0]<<16|l[s+(q+2)>>0])>>>(8-r|0)&65534;d=k[R>>2]|0;if(e>>>0<(k[a+(d<<2)+7792>>2]|0)>>>0){d=e>>>(16-d|0);s=(l[a+d+7924>>0]|0)+r|0;k[g>>2]=(s>>>3)+q;k[p>>2]=s&7;d=a+(d<<1)+8948|0}else{do{d=d+1|0;if(d>>>0>=15){d=15;break}}while(e>>>0>=(k[a+(d<<2)+7792>>2]|0)>>>0);s=d+r|0;k[g>>2]=(s>>>3)+q;k[p>>2]=s&7;d=((e-(k[a+(d+-1<<2)+7792>>2]|0)|0)>>>(16-d|0))+(k[a+(d<<2)+7856>>2]|0)|0;d=a+((d>>>0>=(k[u>>2]|0)>>>0?0:d)<<1)+10996|0}s=j[d>>1]|0;d=s&65535;if(s<<16>>16==16){k[P>>2]=15;d=(k[Q>>2]|0)+n|0;break}else{k[Q>>2]=d;d=d+n|0;break}}while(0);if(d>>>0>8191)c=(d>>>0>262143?2:1)+c|0;k[L>>2]=k[K>>2];k[K>>2]=k[M>>2];k[M>>2]=k[N>>2];k[N>>2]=d;k[O>>2]=c;ai(a,c,d);s=t;t=s}if((W|0)==40){i[U>>0]=0;return}else if((W|0)==43){ih(F);k[E>>2]=0}else if((W|0)==46){ih(F);k[E>>2]=0}else if((W|0)==50){ih(F);k[E>>2]=0}else if((W|0)==56){ih(F);k[E>>2]=0}else if((W|0)==94){W=e+2|0;k[g>>2]=(W>>>3)+d;k[p>>2]=W&7;i[T>>0]=c>>>14&1^1}else if((W|0)==113)return;Jh(a);return}function Ih(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;w=r;r=r+432|0;f=w+404|0;v=w;t=a+4|0;c=k[t>>2]|0;u=a+120|0;d=k[u>>2]|0;do if((c|0)>(d+-25|0)){e=a+4|0;b=d-c|0;if((b|0)<0){a=0;r=w;return a|0}if((c|0)>16384){if((b|0)>0){s=k[a+16>>2]|0;an(s|0,s+c|0,b|0)|0}k[e>>2]=0;k[u>>2]=b}else b=d;b=pf(k[a>>2]|0,(k[a+16>>2]|0)+b|0,32768-b|0)|0;c=k[u>>2]|0;if((b|0)>0){s=c+b|0;k[u>>2]=s;k[a+124>>2]=s+-30;break}k[a+124>>2]=c+-30;if((b|0)==-1){a=0;r=w;return a|0}}while(0);s=a+8|0;kg(t,0-(k[s>>2]|0)&7);b=lg(t)|0;c=a+58968|0;if(b&32768){k[c>>2]=1;a=jh(a+39120|0,a,a+58560|0)|0;r=w;return a|0}k[c>>2]=0;k[a+39112>>2]=0;k[a+39116>>2]=0;if(!(b&16384))Ym(a+58564|0,0,404)|0;kg(t,2);b=0;do{c=(lg(t)|0)>>>12;kg(t,4);do if((c&255|0)==15){c=(lg(t)|0)>>>12;kg(t,4);if(!(c&255)){i[f+b>>0]=15;break}if(b>>>0<20){p=c&255;q=-2-p|0;p=((q|0)>-1?-3-q|0:-2)-p|0;q=b+-20|0;q=p>>>0>q>>>0?p:q;Ym(f+b|0,0,0-q|0)|0;b=b-q|0}b=b+-1|0}else i[f+b>>0]=c;while(0);b=b+1|0}while(b>>>0<20);q=a+15428|0;Gh(0,f,q,20);m=a+4|0;n=a+16|0;o=a+124|0;p=a+15560|0;b=0;a:while(1){g=(b|0)<404;h=(b|0)>0;while(1){if(!g){c=53;break a}c=k[t>>2]|0;d=k[u>>2]|0;do if((c|0)>(d+-5|0)){e=d-c|0;if((e|0)<0){b=0;c=55;break a}if((c|0)>16384){if((e|0)>0){f=k[n>>2]|0;an(f|0,f+c|0,e|0)|0}k[m>>2]=0;k[u>>2]=e}else e=d;e=pf(k[a>>2]|0,(k[n>>2]|0)+e|0,32768-e|0)|0;c=k[u>>2]|0;if((e|0)<=0){k[o>>2]=c+-30;if((e|0)==-1){b=0;c=55;break a}else break}else{f=c+e|0;k[u>>2]=f;k[o>>2]=f+-30;break}}while(0);c=k[t>>2]|0;f=k[n>>2]|0;d=k[s>>2]|0;f=((l[f+(c+1)>>0]|0)<<8|(l[f+c>>0]|0)<<16|(l[f+(c+2)>>0]|0))>>>(8-d|0)&65534;e=k[p>>2]|0;if(f>>>0<(k[a+(e<<2)+15432>>2]|0)>>>0){e=f>>>(16-e|0);f=(l[a+e+15564>>0]|0)+d|0;k[t>>2]=(f>>>3)+c;k[s>>2]=f&7;e=a+(e<<1)+16588|0}else{do{e=e+1|0;if(e>>>0>=15){e=15;break}}while(f>>>0>=(k[a+(e<<2)+15432>>2]|0)>>>0);d=e+d|0;k[t>>2]=(d>>>3)+c;k[s>>2]=d&7;e=((f-(k[a+(e+-1<<2)+15432>>2]|0)|0)>>>(16-e|0))+(k[a+(e<<2)+15496>>2]|0)|0;e=a+((e>>>0>=(k[q>>2]|0)>>>0?0:e)<<1)+18636|0}e=j[e>>1]|0;if((e&65535)<16){c=42;break}if((e&65535)>=18){c=50;break}c=lg(t)|0;if(e<<16>>16==16){kg(t,3);e=(c>>>13)+3|0}else{kg(t,7);e=(c>>>9)+11|0}if(h){c=48;break}}if((c|0)==42){i[v+b>>0]=(l[a+b+58564>>0]|0)+(e&65535)&15;b=b+1|0;continue}else if((c|0)==48){h=0-e|0;h=~(e+((h|0)>-1?h:-1));e=b+-404|0;e=b-(e>>>0>>0?h:e)|0;while(1){i[v+b>>0]=i[v+(b+-1)>>0]|0;b=b+1|0;if((b|0)==(e|0)){b=e;continue a}}}else if((c|0)==50){c=lg(t)|0;if(e<<16>>16==18){kg(t,3);e=(c>>>13)+3|0}else{kg(t,7);e=(c>>>9)+11|0}f=0-e|0;f=~(e+((f|0)>-1?f:-1));h=b+-404|0;h=h>>>0>>0?f:h;Ym(v+b|0,0,0-h|0)|0;b=b-h|0;continue}}if((c|0)==53){i[a+58972>>0]=1;if((k[t>>2]|0)>(k[u>>2]|0)){a=0;r=w;return a|0}Gh(0,v,a+148|0,299);Gh(0,v+299|0,a+3968|0,60);Gh(0,v+359|0,a+7788|0,17);Gh(0,v+376|0,a+11608|0,28);_m(a+58564|0,v|0,404)|0;a=1;r=w;return a|0}else if((c|0)==55){r=w;return b|0}return 0}function Jh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=r;r=r+16|0;C=J;I=a+116|0;b=k[I>>2]|0;E=a+112|0;B=a+59104|0;F=a+59068|0;e=k[F>>2]|0;f=k[E>>2]|0;a:do if(!e)c=f;else{g=k[B>>2]|0;G=a+59064|0;u=a+59100|0;w=a+58976|0;x=a+19252|0;y=a+59048|0;z=a+19530|0;A=a+19536|0;h=g;c=f;d=0;g=f-b&g;b:while(1){p=k[(k[G>>2]|0)+(d<<2)>>2]|0;do if(p){f=p+12|0;if(i[f>>0]|0){i[f>>0]=0;f=h;break}q=k[p>>2]|0;f=k[p+4>>2]|0;if((h&q-b)>>>0>>0){if((q|0)==(b|0)){c=h;e=g}else{Oh(a,b,q);e=k[B>>2]|0;c=e;e=(k[E>>2]|0)-q&e;b=q}if(f>>>0>e>>>0)break b;b=c&f+q;if((b+-1|0)>>>0>>0){o=(k[u>>2]|0)-q|0;Wf(w,0,(k[x>>2]|0)+q|0,o);Wf(w,o,k[x>>2]|0,b)}else Wf(w,0,(k[x>>2]|0)+q|0,f);m=k[(k[y>>2]|0)+(k[p+16>>2]<<2)>>2]|0;l=p+20|0;o=m+44|0;n=m+48|0;e=k[n>>2]|0;if(e>>>0>64){j=p+44|0;h=p+52|0;c=k[h>>2]|0;g=p+48|0;k[g>>2]=e;if(c>>>0>>0){f=k[p+56>>2]|0;if((f|0)!=0&f>>>0>>0){k[C>>2]=f;Jf(32944,53104,C);Af(32944);c=k[h>>2]|0;e=k[g>>2]|0}c=c+32+(c>>>2)|0;c=e>>>0>c>>>0?e:c;e=zm(k[j>>2]|0,c)|0;if(!e)Af(32944);k[j>>2]=e;k[h>>2]=c}else e=k[j>>2]|0;_m(e+64|0,(k[o>>2]|0)+64|0,(k[n>>2]|0)+-64|0)|0}else g=p+48|0;if((k[g>>2]|0)!=0?(h=k[A>>2]|0,k[p+100>>2]=h,s=p+44|0,Rf(w,(k[s>>2]|0)+36|0,h),Rf(w,(k[s>>2]|0)+40|0,k[A+4>>2]|0),Sf(w,l),s=k[g>>2]|0,s>>>0>64):0){if((k[n>>2]|0)>>>0>>0?(t=m+52|0,v=k[t>>2]|0,k[n>>2]=s,v>>>0>>0):0){e=k[m+56>>2]|0;if((e|0)!=0&e>>>0>>0){k[C>>2]=e;Jf(32944,53104,C);Af(32944);c=k[t>>2]|0;e=k[n>>2]|0}else{c=v;e=s}c=c+32+(c>>>2)|0;e=e>>>0>c>>>0?e:c;c=zm(k[o>>2]|0,e)|0;if(!c)Af(32944);k[o>>2]=c;k[t>>2]=e}_m((k[o>>2]|0)+64|0,(k[p+44>>2]|0)+64|0,(k[g>>2]|0)+-64|0)|0}else{e=k[o>>2]|0;if(e){ym(e);k[o>>2]=0}k[n>>2]=0;k[m+52>>2]=0}g=k[p+104>>2]|0;c=k[p+108>>2]|0;e=k[G>>2]|0;f=k[e+(d<<2)>>2]|0;if(f){e=k[f+60>>2]|0;if(e)ym(e);e=k[f+44>>2]|0;if(e)ym(e);e=k[f+20>>2]|0;if(e)ym(e);Ak(f);e=k[G>>2]|0}k[e+(d<<2)>>2]=0;e=d+1|0;c:do if(e>>>0<(k[F>>2]|0)>>>0){f=g;while(1){p=k[(k[G>>2]|0)+(e<<2)>>2]|0;if(!p)break c;if((k[p>>2]|0)!=(q|0))break c;if((k[p+4>>2]|0)!=(c|0))break c;if(i[p+12>>0]|0)break c;Wf(w,0,f,c);m=k[(k[y>>2]|0)+(k[p+16>>2]<<2)>>2]|0;l=p+20|0;o=m+44|0;n=m+48|0;c=k[n>>2]|0;if(c>>>0>64){f=p+44|0;j=p+52|0;d=k[j>>2]|0;h=p+48|0;k[h>>2]=c;if(d>>>0>>0){g=k[p+56>>2]|0;if((g|0)!=0&g>>>0>>0){k[C>>2]=g;Jf(32944,53104,C);Af(32944);d=k[j>>2]|0;c=k[h>>2]|0}d=d+32+(d>>>2)|0;d=c>>>0>d>>>0?c:d;c=zm(k[f>>2]|0,d)|0;if(!c)Af(32944);k[f>>2]=c;k[j>>2]=d}else c=k[f>>2]|0;_m(c+64|0,(k[o>>2]|0)+64|0,(k[n>>2]|0)+-64|0)|0}else h=p+48|0;do if(!(k[h>>2]|0))D=71;else{f=k[A>>2]|0;k[p+100>>2]=f;c=p+44|0;Rf(w,(k[c>>2]|0)+36|0,f);Rf(w,(k[c>>2]|0)+40|0,k[A+4>>2]|0);Sf(w,l);c=k[h>>2]|0;if(c>>>0<=64){D=71;break}do if((k[n>>2]|0)>>>0>>0){g=m+52|0;f=k[g>>2]|0;k[n>>2]=c;if(f>>>0>=c>>>0)break;d=k[m+56>>2]|0;if((d|0)!=0&d>>>0>>0){k[C>>2]=d;Jf(32944,53104,C);Af(32944);d=k[g>>2]|0;c=k[n>>2]|0}else d=f;d=d+32+(d>>>2)|0;c=c>>>0>d>>>0?c:d;d=zm(k[o>>2]|0,c)|0;if(!d)Af(32944);k[o>>2]=d;k[g>>2]=c}while(0);_m((k[o>>2]|0)+64|0,(k[p+44>>2]|0)+64|0,(k[h>>2]|0)+-64|0)|0}while(0);if((D|0)==71){D=0;c=k[o>>2]|0;if(c){ym(c);k[o>>2]=0}k[n>>2]=0;k[m+52>>2]=0}f=k[p+104>>2]|0;g=k[p+108>>2]|0;c=k[G>>2]|0;d=k[c+(e<<2)>>2]|0;if(d){c=k[d+60>>2]|0;if(c)ym(c);c=k[d+44>>2]|0;if(c)ym(c);c=k[d+20>>2]|0;if(c)ym(c);Ak(d);c=k[G>>2]|0}k[c+(e<<2)>>2]=0;c=e+1|0;if(c>>>0<(k[F>>2]|0)>>>0){d=e;e=c;c=g}else{c=g;d=e;break}}}else f=g;while(0);qf(k[a>>2]|0,f,c);i[z>>0]=1;g=A;g=Vm(k[g>>2]|0,k[g+4>>2]|0,c|0,0)|0;q=A;k[q>>2]=g;k[q+4>>2]=O;q=k[E>>2]|0;g=k[B>>2]|0;e=k[F>>2]|0;f=g;c=q;g=q-b&g}else f=h}else f=h;while(0);d=d+1|0;if(d>>>0>=e>>>0)break a;else h=f}f=k[F>>2]|0;if(d>>>0>=f>>>0){H=b;k[I>>2]=H;r=J;return}e=k[G>>2]|0;do{c=k[e+(d<<2)>>2]|0;if((c|0)!=0?(H=c+12|0,(i[H>>0]|0)!=0):0)i[H>>0]=0;d=d+1|0}while(d>>>0>>0);k[I>>2]=b;r=J;return}while(0);Oh(a,b,c);H=k[E>>2]|0;k[I>>2]=H;r=J;return}function Kh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;g=a+39120|0;h=kh(g)|0;if((h|0)==-1){ih(g);k[a+58968>>2]=0;h=0;return h|0}b=h&7;c=b+1|0;do if((b|0)==6){b=kh(g)|0;if((b|0)!=-1){c=b+7|0;f=12;break}ih(g);k[a+58968>>2]=0;h=0;return h|0}else if((b|0)==7){b=kh(g)|0;if((b|0)==-1){ih(g);k[a+58968>>2]=0;h=0;return h|0}c=kh(g)|0;if((c|0)!=-1){c=c+(b<<8)|0;f=12;break}ih(g);k[a+58968>>2]=0;h=0;return h|0}else f=13;while(0);if((f|0)==12)if(!c){b=0;c=0;f=19}else f=13;a:do if((f|0)==13){b=zm(0,c>>>0>32?c:32)|0;if(!b){Af(32944);b=0}if((c|0)>0){e=0;while(1){d=kh(g)|0;if((d|0)==-1)break;i[b+e>>0]=d;e=e+1|0;if((e|0)>=(c|0)){f=19;break a}}ih(g);k[a+58968>>2]=0;c=0}else f=19}while(0);if((f|0)==19)c=Mh(a,h,b,c)|0;if(!b){h=c;return h|0}ym(b);h=c;return h|0}function Lh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;o=a+4|0;b=k[o>>2]|0;q=a+16|0;e=k[q>>2]|0;p=a+8|0;f=k[p>>2]|0;d=((l[e+(b+1)>>0]|0)<<8|(l[e+b>>0]|0)<<16|(l[e+(b+2)>>0]|0))>>>(8-f|0)>>>8;r=d&255;f=f+8|0;b=(f>>>3)+b|0;k[o>>2]=b;f=f&7;k[p>>2]=f;d=d&7;c=d+1|0;if((d|0)==6){n=b+1|0;c=(((l[e+n>>0]|0)<<8|(l[e+b>>0]|0)<<16|(l[e+(b+2)>>0]|0))>>>(8-f|0)>>>8&255)+7|0;k[o>>2]=n;k[p>>2]=f;n=4}else if((d|0)==7){n=b+2|0;c=((l[e+(b+1)>>0]|0)<<8|(l[e+b>>0]|0)<<16|(l[e+n>>0]|0))>>>(8-f|0)&65535;k[o>>2]=n;k[p>>2]=f;if(!c){b=0;c=0;n=20}else n=4}else n=4;a:do if((n|0)==4){b=zm(0,c>>>0>32?c:32)|0;if(!b){Af(32944);b=0}if((c|0)>0){g=a+120|0;h=c+-1|0;j=a+124|0;f=k[g>>2]|0;d=k[o>>2]|0;m=0;while(1){if((d|0)<(f+-1|0))e=f;else{e=f-d|0;if((e|0)<0){d=1;e=f}else{if((d|0)>16384){if((e|0)>0){f=k[q>>2]|0;an(f|0,f+d|0,e|0)|0}k[o>>2]=0;k[g>>2]=e}else e=f;d=pf(k[a>>2]|0,(k[q>>2]|0)+e|0,32768-e|0)|0;e=k[g>>2]|0;if((d|0)>0){e=e+d|0;k[g>>2]=e}k[j>>2]=e+-30;d=(d|0)==-1}if(d&(m|0)<(h|0)){c=0;break a}d=k[o>>2]|0}s=k[q>>2]|0;f=k[p>>2]|0;i[b+m>>0]=((l[s+(d+1)>>0]|0)<<8|(l[s+d>>0]|0)<<16|(l[s+(d+2)>>0]|0))>>>(8-f|0)>>>8;f=f+8|0;d=(f>>>3)+d|0;k[o>>2]=d;k[p>>2]=f&7;m=m+1|0;if((m|0)>=(c|0)){n=20;break}else f=e}}else n=20}while(0);if((n|0)==20)c=Mh(a,r,b,c)|0;if(!b)return c|0;ym(b);return c|0}function Mh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=r;r=r+16|0;w=z;y=a+59032|0;k[a+59036>>2]=0;k[y>>2]=0;_m(k[a+59044>>2]|0,c|0,((d|0)>32768?32768:d)|0)|0;v=a+58976|0;Qf(v);do if(b&128){c=Vf(y)|0;if(!c){Nh(a);f=a+59052|0;c=a+59084|0;d=k[f>>2]|0;g=0;break}else{g=c+-1|0;o=6;break}}else{g=k[a+59096>>2]|0;o=6}while(0);if((o|0)==6){f=a+59052|0;d=k[f>>2]|0;if(g>>>0>d>>>0){y=0;r=z;return y|0}c=a+59084|0;if(g>>>0>(k[c>>2]|0)>>>0){y=0;r=z;return y|0}}m=a+59048|0;q=a+59080|0;k[a+59096>>2]=g;u=yk(112)|0;k[u+108>>2]=0;l=u+20|0;j=l+56|0;do{k[l>>2]=0;l=l+4|0}while((l|0)<(j|0));s=(g|0)==(d|0);if(s){if(g>>>0>1024){Ak(u);y=0;r=z;return y|0}d=g+1|0;k[f>>2]=d;l=a+59056|0;h=k[l>>2]|0;if(d>>>0>h>>>0){j=k[a+59060>>2]|0;if((j|0)!=0&d>>>0>j>>>0){k[w>>2]=j;Jf(32944,53104,w);Af(32944);h=k[l>>2]|0;d=k[f>>2]|0}h=h+32+(h>>>2)|0;d=d>>>0>h>>>0?d:h;h=zm(k[m>>2]|0,d<<2)|0;if(!h)Af(32944);k[m>>2]=h;k[l>>2]=d;d=k[f>>2]|0}else h=k[m>>2]|0;f=yk(112)|0;k[f+108>>2]=0;l=f+20|0;j=l+56|0;do{k[l>>2]=0;l=l+4|0}while((l|0)<(j|0));t=d+-1|0;k[h+(t<<2)>>2]=f;k[u+16>>2]=t;bi(q,0);k[f+8>>2]=0;t=f}else{t=k[(k[m>>2]|0)+(g<<2)>>2]|0;k[u+16>>2]=g;p=t+8|0;k[p>>2]=(k[p>>2]|0)+1}n=a+59064|0;m=a+59068|0;d=k[m>>2]|0;if(d){f=0;j=0;do{h=k[n>>2]|0;k[h+(j-f<<2)>>2]=k[h+(j<<2)>>2];h=(k[n>>2]|0)+(j<<2)|0;f=((k[h>>2]|0)==0&1)+f|0;if((f|0)>0)k[h>>2]=0;j=j+1|0}while(j>>>0>>0);if(!f){d=d+1|0;o=26}}else{d=1;o=26}if((o|0)==26){k[m>>2]=d;l=a+59072|0;f=k[l>>2]|0;if(d>>>0>f>>>0){h=k[a+59076>>2]|0;if((h|0)!=0&d>>>0>h>>>0){k[w>>2]=h;Jf(32944,53104,w);Af(32944);f=k[l>>2]|0;d=k[m>>2]|0}f=f+32+(f>>>2)|0;f=d>>>0>f>>>0?d:f;d=zm(k[n>>2]|0,f<<2)|0;if(!d)Af(32944);k[n>>2]=d;k[l>>2]=f;d=k[m>>2]|0;f=1}else f=1}k[(k[n>>2]|0)+(d-f<<2)>>2]=u;p=u+8|0;k[p>>2]=k[t+8>>2];h=Vf(y)|0;h=(b&64|0)==0?h:h+258|0;d=a+112|0;f=k[d>>2]|0;j=a+59104|0;k[u>>2]=h+f&k[j>>2];if(!(b&32)){if(g>>>0<(k[c>>2]|0)>>>0)c=k[(k[q>>2]|0)+(g<<2)>>2]|0;else c=0;k[u+4>>2]=c}else{f=Vf(y)|0;k[u+4>>2]=f;k[(k[q>>2]|0)+(g<<2)>>2]=f;f=k[d>>2]|0}c=k[a+116>>2]|0;if((c|0)==(f|0))c=0;else c=(k[j>>2]&c-f)>>>0<=h>>>0&1;i[u+12>>0]=c;n=u+76|0;k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;k[n+12>>2]=0;k[n+16>>2]=0;k[n+20>>2]=0;k[n+24>>2]=0;k[u+88>>2]=245760;o=u+4|0;k[u+92>>2]=k[o>>2];k[u+96>>2]=k[p>>2];if(b&16){c=(lg(y)|0)>>>9;kg(y,7);if(c&1){a=Vf(y)|0;k[n>>2]=a}if(c&2){a=Vf(y)|0;k[u+80>>2]=a}if(c&4){a=Vf(y)|0;k[u+84>>2]=a}if(c&8){a=Vf(y)|0;k[u+88>>2]=a}if(c&16){a=Vf(y)|0;k[u+92>>2]=a}if(c&32){a=Vf(y)|0;k[u+96>>2]=a}if(c&64){a=Vf(y)|0;k[u+100>>2]=a}}if(s){d=Vf(y)|0;if((d+-1|0)>>>0>65534){y=0;r=z;return y|0}a:do if(!d)c=0;else{c=zm(0,d>>>0>32?d:32)|0;if(!c){Af(32944);c=0}f=0;while(1){if(((k[y>>2]|0)+3|0)>>>0>32767)break;a=(lg(y)|0)>>>8&255;i[c+f>>0]=a;kg(y,8);f=f+1|0;if(f>>>0>=d>>>0)break a}if(!c){y=0;r=z;return y|0}ym(c);y=0;r=z;return y|0}while(0);Uf(v,c,d,t+20|0);if(c)ym(c)}k[u+36>>2]=k[t+20>>2];k[u+40>>2]=k[t+40>>2];l=k[t+64>>2]|0;if((l|0)!=0&l>>>0<8192){g=u+60|0;h=u+64|0;c=(k[h>>2]|0)+l|0;k[h>>2]=c;j=u+68|0;f=k[j>>2]|0;if(c>>>0>f>>>0){d=k[u+72>>2]|0;if((d|0)!=0&c>>>0>d>>>0){k[w>>2]=d;Jf(32944,53104,w);Af(32944);f=k[j>>2]|0;c=k[h>>2]|0}f=f+32+(f>>>2)|0;f=c>>>0>f>>>0?c:f;c=zm(k[g>>2]|0,f)|0;if(!c)Af(32944);k[g>>2]=c;k[j>>2]=f}else c=k[g>>2]|0;_m(c|0,k[t+60>>2]|0,l|0)|0}m=u+44|0;g=u+48|0;c=k[m>>2]|0;if((k[g>>2]|0)>>>0<64){if(c){ym(c);k[m>>2]=0}h=u+52|0;k[h>>2]=0;k[g>>2]=64;c=k[u+56>>2]|0;if((c|0)!=0&c>>>0<64){k[w>>2]=c;Jf(32944,53104,w);Af(32944);c=k[h>>2]|0;f=k[g>>2]|0;d=k[m>>2]|0}else{c=0;f=64;d=0}c=c+32+(c>>>2)|0;f=f>>>0>c>>>0?f:c;c=zm(d,f)|0;if(!c)Af(32944);k[m>>2]=c;k[h>>2]=f}Rf(v,c,k[n>>2]|0);Rf(v,c+4|0,k[u+80>>2]|0);Rf(v,c+8|0,k[u+84>>2]|0);Rf(v,c+12|0,k[u+88>>2]|0);Rf(v,c+16|0,k[u+92>>2]|0);Rf(v,c+20|0,k[u+96>>2]|0);Rf(v,c+24|0,k[u+100>>2]|0);Rf(v,c+28|0,k[o>>2]|0);Rf(v,c+32|0,0);Rf(v,c+44|0,k[p>>2]|0);l=c+48|0;j=l+16|0;do{i[l>>0]=0;l=l+1|0}while((l|0)<(j|0));if(!(b&8)){y=1;r=z;return y|0}if(((k[y>>2]|0)+3|0)>>>0>32767){y=0;r=z;return y|0}f=Vf(y)|0;if(f>>>0>8128){y=0;r=z;return y|0}c=f+64|0;if(c>>>0>(k[g>>2]|0)>>>0?(k[g>>2]=c,x=u+52|0,e=k[x>>2]|0,c>>>0>e>>>0):0){d=k[u+56>>2]|0;if((d|0)!=0&c>>>0>d>>>0){k[w>>2]=d;Jf(32944,53104,w);Af(32944);e=k[x>>2]|0;c=k[g>>2]|0}e=e+32+(e>>>2)|0;c=c>>>0>e>>>0?c:e;e=zm(k[m>>2]|0,c)|0;if(!e)Af(32944);k[m>>2]=e;k[x>>2]=c}c=k[m>>2]|0;if(!f){y=1;r=z;return y|0}else e=0;while(1){if(((k[y>>2]|0)+3|0)>>>0>32767){c=0;o=85;break}x=(lg(y)|0)>>>8&255;i[c+(e+64)>>0]=x;kg(y,8);e=e+1|0;if(e>>>0>=f>>>0){c=1;o=85;break}}if((o|0)==85){r=z;return c|0}return 0}function Nh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=a+59080|0;c=k[b>>2]|0;if(c){ym(c);k[b>>2]=0}k[a+59084>>2]=0;k[a+59088>>2]=0;k[a+59096>>2]=0;g=a+59052|0;c=k[g>>2]|0;f=a+59048|0;b=k[f>>2]|0;if(c){e=0;do{d=k[b+(e<<2)>>2]|0;if(d){b=k[d+60>>2]|0;if(b)ym(b);b=k[d+44>>2]|0;if(b)ym(b);b=k[d+20>>2]|0;if(b)ym(b);Ak(d);c=k[g>>2]|0;b=k[f>>2]|0}e=e+1|0}while(e>>>0>>0)}if(b){ym(b);k[f>>2]=0}k[g>>2]=0;k[a+59056>>2]=0;f=a+59068|0;c=k[f>>2]|0;g=a+59064|0;b=k[g>>2]|0;if(c){e=0;do{d=k[b+(e<<2)>>2]|0;if(d){b=k[d+60>>2]|0;if(b)ym(b);b=k[d+44>>2]|0;if(b)ym(b);b=k[d+20>>2]|0;if(b)ym(b);Ak(d);c=k[f>>2]|0;b=k[g>>2]|0}e=e+1|0}while(e>>>0>>0)}if(!b){k[f>>2]=0;a=a+59072|0;k[a>>2]=0;return}ym(b);k[g>>2]=0;k[f>>2]=0;a=a+59072|0;k[a>>2]=0;return}function Oh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((c|0)!=(b|0))i[a+19530>>0]=1;d=c>>>0>>0;if(d)i[a+19529>>0]=1;if(!(i[a+19512>>0]|0)){l=a+19252|0;m=(k[l>>2]|0)+b|0;if(!d){d=c-b|0;b=a+19536|0;f=b;e=k[f>>2]|0;f=k[f+4>>2]|0;h=a+19520|0;g=k[h>>2]|0;h=k[h+4>>2]|0;if(!((h|0)>(f|0)|(h|0)==(f|0)&g>>>0>e>>>0))return;r=Um(g|0,h|0,e|0,f|0)|0;q=O;qf(k[a>>2]|0,m,0>(q|0)|0==(q|0)&d>>>0>r>>>0?r:d);r=b;r=Vm(k[r>>2]|0,k[r+4>>2]|0,d|0,0)|0;a=b;k[a>>2]=r;k[a+4>>2]=O;return}h=(k[a+59100>>2]|0)-b|0;j=a+19536|0;b=j;d=k[b>>2]|0;b=k[b+4>>2]|0;g=a+19520|0;e=g;f=k[e>>2]|0;e=k[e+4>>2]|0;if((e|0)>(b|0)|(e|0)==(b|0)&f>>>0>d>>>0){d=Um(f|0,e|0,d|0,b|0)|0;b=O;qf(k[a>>2]|0,m,0>(b|0)|0==(b|0)&h>>>0>d>>>0?d:h);d=j;d=Vm(k[d>>2]|0,k[d+4>>2]|0,h|0,0)|0;b=O;f=j;k[f>>2]=d;k[f+4>>2]=b;f=g;e=k[f+4>>2]|0;f=k[f>>2]|0}if(!((e|0)>(b|0)|(e|0)==(b|0)&f>>>0>d>>>0))return;p=k[l>>2]|0;r=Um(f|0,e|0,d|0,b|0)|0;q=O;qf(k[a>>2]|0,p,0>(q|0)|0==(q|0)&c>>>0>r>>>0?r:c);r=j;r=Vm(k[r>>2]|0,k[r+4>>2]|0,c|0,0)|0;a=j;k[a>>2]=r;k[a+4>>2]=O;return}q=a+59104|0;f=k[q>>2]|0;d=f&c-b;if(!d)return;c=a+19384|0;n=a+19256|0;o=a+19536|0;p=a+19520|0;j=b;m=d;while(1){b=0;while(1){d=k[a+(b<<2)+19384>>2]|0;b=b+1|0;if(d>>>0>j>>>0){r=11;break}if(b>>>0>=32){l=0;break}}if((r|0)==11){r=0;l=d-j|0;l=l>>>0>>0?l:m}do if((k[c>>2]|0)>>>0<=j>>>0){d=1;while(1){if((k[a+(d<<2)+19384>>2]|0)>>>0>j>>>0){r=16;break}d=d+1|0;if(d>>>0>=32){r=17;break}}if((r|0)==16){r=0;d=(k[a+(d<<2)+19256>>2]|0)+(j-(k[a+(d+-1<<2)+19384>>2]|0))|0;break}else if((r|0)==17){r=0;d=k[n>>2]|0;break}}else d=(k[n>>2]|0)+j|0;while(0);e=o;b=k[e>>2]|0;e=k[e+4>>2]|0;g=p;h=k[g>>2]|0;g=k[g+4>>2]|0;if((g|0)>(e|0)|(g|0)==(e|0)&h>>>0>b>>>0){g=Um(h|0,g|0,b|0,e|0)|0;h=O;qf(k[a>>2]|0,d,0>(h|0)|0==(h|0)&l>>>0>g>>>0?g:l);g=o;g=Vm(k[g>>2]|0,k[g+4>>2]|0,l|0,0)|0;d=o;k[d>>2]=g;k[d+4>>2]=O;d=k[q>>2]|0}else d=f;if((m|0)==(l|0))break;else{j=d&l+j;f=d;m=m-l|0}}return}function Ph(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;ca=r;r=r+16|0;ba=ca;$=a+19544|0;i[$>>0]=1;aa=a+19528|0;if(!(i[aa>>0]|0)){if(b)b=1;else{Ym(a+148|0,0,19100)|0;b=a+59100|0;c=a+84|0;d=c+36|0;do{k[c>>2]=0;c=c+4|0}while((c|0)<(d|0));b=k[b>>2]|0;k[a+19248>>2]=(b>>>0<4194304?b:4194304)&k[a+59104>>2];b=a+68|0;c=k[b>>2]|0;if(c){ym(c);k[b>>2]=0}k[a+72>>2]=0;k[a+76>>2]=0;b=0}g=a+8|0;k[g>>2]=0;p=a+4|0;k[p>>2]=0;h=a+19536|0;o=h;k[o>>2]=0;k[o+4>>2]=0;o=a+120|0;q=a+128|0;k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;k[o+12>>2]=0;k[o+16>>2]=0;k[o+20>>2]=0;k[o+24>>2]=0;k[q>>2]=-1;if(b){c=0;d=0}else{k[a+38736>>2]=0;k[a+38740>>2]=0;k[a+38728>>2]=0;k[a+38732>>2]=1;Ym(a+38744|0,0,368)|0;Ym(a+22420|0,0,16308)|0;i[a+58972>>0]=0;Ym(a+58564|0,0,404)|0;k[a+58560>>2]=2;k[a+58968>>2]=0;Nh(a);c=k[o>>2]|0;d=k[p>>2]|0}b=c-d|0;if((b|0)<0){r=ca;return}n=a+136|0;k[q>>2]=(k[n>>2]|0)-d+(k[q>>2]|0);if((d|0)>16384){if((b|0)>0){_=k[a+16>>2]|0;an(_|0,_+d|0,b|0)|0}k[p>>2]=0;k[o>>2]=b}else b=c;if((b|0)!=32768){c=pf(k[a>>2]|0,(k[a+16>>2]|0)+b|0,32768-b|0)|0;b=k[o>>2]|0;if((c|0)>0){b=b+c|0;k[o>>2]=b}}else{b=32768;c=0}b=b+-30|0;f=a+124|0;k[f>>2]=b;d=k[p>>2]|0;k[n>>2]=d;e=k[q>>2]|0;if((e|0)!=-1){_=d+-1+e|0;k[f>>2]=(b|0)<(_|0)?b:_}if((c|0)==-1){r=ca;return}c=a+4|0;b=a+128|0;if(!(ph(a,c,b)|0)){r=ca;return}e=a+148|0;if(!(th(a,c,b,e)|0)){r=ca;return}}else{f=a+124|0;g=a+8|0;h=a+19536|0;b=a+128|0;n=a+136|0;e=a+148|0;o=a+120|0;p=a+4|0;q=a+128|0;c=a+4|0}D=a+59104|0;E=a+112|0;F=a+4|0;G=a+19248|0;H=a+16|0;I=a+280|0;J=a+19512|0;K=a+19252|0;L=a+19384|0;M=a+19256|0;N=a+4100|0;O=a+92|0;P=a+96|0;Q=a+88|0;R=a+84|0;S=a+104|0;T=a+19256|0;U=a+7920|0;V=a+7788|0;W=a+3968|0;X=a+11740|0;Y=a+11608|0;Z=a+148|0;_=a+19520|0;A=a+128|0;B=a+144|0;C=a+132|0;a:while(1){t=k[D>>2]|0;d=k[E>>2]&t;k[E>>2]=d;s=k[F>>2]|0;if((s|0)>=(k[f>>2]|0)){while(1){u=k[n>>2]|0;t=k[A>>2]|0;d=u+-1+t|0;if((s|0)<=(d|0)){if((s|0)!=(d|0))break;if((k[g>>2]|0)<(k[C>>2]|0))break}if(i[B>>0]|0){y=155;break a}if(!(ph(a,c,b)|0)){y=156;break a}if(!(th(a,c,b,e)|0)){y=156;break a}s=k[F>>2]|0}v=k[o>>2]|0;d=v-s|0;if((d|0)<0){y=155;break}k[q>>2]=u-s+t;if((s|0)>16384){if((d|0)>0){z=k[H>>2]|0;an(z|0,z+s|0,d|0)|0}k[p>>2]=0;k[o>>2]=d}else d=v;if((d|0)!=32768){s=pf(k[a>>2]|0,(k[H>>2]|0)+d|0,32768-d|0)|0;d=k[o>>2]|0;if((s|0)>0){d=d+s|0;k[o>>2]=d}}else{d=32768;s=0}d=d+-30|0;k[f>>2]=d;u=k[p>>2]|0;k[n>>2]=u;t=k[q>>2]|0;if((t|0)!=-1){z=u+-1+t|0;k[f>>2]=(d|0)<(z|0)?d:z}if((s|0)==-1){y=155;break}d=k[E>>2]|0;t=k[D>>2]|0;s=u}z=k[G>>2]|0;if(!((z-d&t)>>>0>4099|(z|0)==(d|0))){sh(a);y=h;w=k[y+4>>2]|0;z=_;x=k[z+4>>2]|0;if((w|0)>(x|0)|((w|0)==(x|0)?(k[y>>2]|0)>>>0>(k[z>>2]|0)>>>0:0)){y=156;break}if(i[aa>>0]|0){y=47;break}s=k[F>>2]|0}z=k[H>>2]|0;t=k[g>>2]|0;u=(l[z+(s+1)>>0]<<8|l[z+s>>0]<<16|l[z+(s+2)>>0])>>>(8-t|0)&65534;d=k[I>>2]|0;if(u>>>0<(k[a+(d<<2)+152>>2]|0)>>>0){d=u>>>(16-d|0);v=(l[a+d+284>>0]|0)+t|0;u=(v>>>3)+s|0;k[F>>2]=u;v=v&7;k[g>>2]=v;d=a+(d<<1)+1308|0}else{do{d=d+1|0;if(d>>>0>=15){d=15;break}}while(u>>>0>=(k[a+(d<<2)+152>>2]|0)>>>0);v=d+t|0;y=(v>>>3)+s|0;k[F>>2]=y;v=v&7;k[g>>2]=v;d=((u-(k[a+(d+-1<<2)+152>>2]|0)|0)>>>(16-d|0))+(k[a+(d<<2)+216>>2]|0)|0;d=a+((d>>>0>=(k[Z>>2]|0)>>>0?0:d)<<1)+3356|0;u=y}d=j[d>>1]|0;s=d&65535;if((d&65535)<256){z=(i[J>>0]|0)==0;t=d&255;s=k[E>>2]|0;k[E>>2]=s+1;if(z){i[(k[K>>2]|0)+s>>0]=t;continue}do if((k[L>>2]|0)>>>0<=s>>>0){d=1;while(1){if((k[a+(d<<2)+19384>>2]|0)>>>0>s>>>0){y=59;break}d=d+1|0;if(d>>>0>=32){y=60;break}}if((y|0)==59){d=(k[a+(d<<2)+19256>>2]|0)+(s-(k[a+(d+-1<<2)+19384>>2]|0))|0;break}else if((y|0)==60){d=k[M>>2]|0;break}}else d=(k[M>>2]|0)+s|0;while(0);i[d>>0]=t;continue}if((d&65535)>261){d=s+-262|0;if(d>>>0>=8){s=d>>>2;t=s+-1|0;d=((d&3|4)<>0]<<8|l[z+u>>0]<<16|l[z+(u+2)>>0])>>>(8-v|0)&65535)>>>(17-s|0))+d|0;t=v+t|0;u=(t>>>3)+u|0;k[F>>2]=u;t=t&7;k[g>>2]=t}}else{t=v;x=s+-260|0}s=(l[z+(u+1)>>0]<<8|l[z+u>>0]<<16|l[z+(u+2)>>0])>>>(8-t|0)&65534;d=k[N>>2]|0;if(s>>>0<(k[a+(d<<2)+3972>>2]|0)>>>0){d=s>>>(16-d|0);w=(l[a+d+4104>>0]|0)+t|0;v=(w>>>3)+u|0;k[F>>2]=v;w=w&7;k[g>>2]=w;d=a+(d<<1)+5128|0}else{do{d=d+1|0;if(d>>>0>=15){d=15;break}}while(s>>>0>=(k[a+(d<<2)+3972>>2]|0)>>>0);w=d+t|0;v=(w>>>3)+u|0;k[F>>2]=v;w=w&7;k[g>>2]=w;d=((s-(k[a+(d+-1<<2)+3972>>2]|0)|0)>>>(16-d|0))+(k[a+(d<<2)+4036>>2]|0)|0;d=a+((d>>>0>=(k[W>>2]|0)>>>0?0:d)<<1)+7176|0}y=j[d>>1]|0;d=y&65535;do if((y&65535)>=4){s=d>>>1;u=s+-1|0;t=((d&1|2)<>>0<=3){t=(((l[z+(v+1)>>0]<<16|l[z+v>>0]<<24|l[z+(v+2)>>0]<<8|l[z+(v+3)>>0])<>0]|0)>>>(8-w|0))>>>(33-s|0))+t|0;z=w+u|0;k[F>>2]=(z>>>3)+v;k[g>>2]=z&7;break}if(u>>>0>4){t=(((l[z+(v+1)>>0]<<16|l[z+v>>0]<<24|l[z+(v+2)>>0]<<8|l[z+(v+3)>>0])<>0]|0)>>>(8-w|0))>>>(37-s|0)<<4)+t|0;w=s+-5+w|0;v=(w>>>3)+v|0;k[F>>2]=v;w=w&7;k[g>>2]=w}s=(l[z+(v+1)>>0]<<8|l[z+v>>0]<<16|l[z+(v+2)>>0])>>>(8-w|0)&65534;d=k[U>>2]|0;if(s>>>0<(k[a+(d<<2)+7792>>2]|0)>>>0){d=s>>>(16-d|0);z=(l[a+d+7924>>0]|0)+w|0;k[F>>2]=(z>>>3)+v;k[g>>2]=z&7;d=a+(d<<1)+8948|0}else{do{d=d+1|0;if(d>>>0>=15){d=15;break}}while(s>>>0>=(k[a+(d<<2)+7792>>2]|0)>>>0);z=d+w|0;k[F>>2]=(z>>>3)+v;k[g>>2]=z&7;d=((s-(k[a+(d+-1<<2)+7792>>2]|0)|0)>>>(16-d|0))+(k[a+(d<<2)+7856>>2]|0)|0;d=a+((d>>>0>=(k[V>>2]|0)>>>0?0:d)<<1)+10996|0}t=(m[d>>1]|0)+t|0}}else t=d+1|0;while(0);if(t>>>0>256)if(t>>>0>8192)d=(t>>>0>262144?3:2)+x|0;else d=x+1|0;else d=x;k[P>>2]=k[O>>2];k[O>>2]=k[Q>>2];k[Q>>2]=k[R>>2];k[R>>2]=t;k[S>>2]=d;if(!(i[J>>0]|0)){ai(a,d,t);continue}x=k[D>>2]|0;if(!d)continue;z=k[E>>2]|0;s=z;t=z-t|0;while(1){d=d+-1|0;w=t+1|0;u=t&x;v=k[L>>2]|0;do if(v>>>0<=u>>>0){t=1;while(1){if((k[a+(t<<2)+19384>>2]|0)>>>0>u>>>0){y=96;break}t=t+1|0;if(t>>>0>=32){y=97;break}}if((y|0)==96){t=(k[a+(t<<2)+19256>>2]|0)+(u-(k[a+(t+-1<<2)+19384>>2]|0))|0;break}else if((y|0)==97){t=k[T>>2]|0;break}}else t=(k[T>>2]|0)+u|0;while(0);u=i[t>>0]|0;do if(v>>>0<=s>>>0){t=1;while(1){if((k[a+(t<<2)+19384>>2]|0)>>>0>s>>>0){y=102;break}t=t+1|0;if(t>>>0>=32){y=103;break}}if((y|0)==102){s=(k[a+(t<<2)+19256>>2]|0)+(s-(k[a+(t+-1<<2)+19384>>2]|0))|0;break}else if((y|0)==103){s=k[T>>2]|0;break}}else s=(k[T>>2]|0)+s|0;while(0);i[s>>0]=u;s=(k[E>>2]|0)+1&x;k[E>>2]=s;if(!d)continue a;else t=w}}if((s|0)==257){d=k[S>>2]|0;if(!d)continue;s=k[R>>2]|0;if(!(i[J>>0]|0)){ai(a,d,s);continue}x=k[D>>2]|0;z=k[E>>2]|0;v=z;s=z-s|0;while(1){d=d+-1|0;w=s+1|0;t=s&x;u=k[L>>2]|0;do if(u>>>0<=t>>>0){s=1;while(1){if((k[a+(s<<2)+19384>>2]|0)>>>0>t>>>0){y=116;break}s=s+1|0;if(s>>>0>=32){y=117;break}}if((y|0)==116){s=(k[a+(s<<2)+19256>>2]|0)+(t-(k[a+(s+-1<<2)+19384>>2]|0))|0;break}else if((y|0)==117){s=k[T>>2]|0;break}}else s=(k[T>>2]|0)+t|0;while(0);t=i[s>>0]|0;do if(u>>>0<=v>>>0){s=1;while(1){if((k[a+(s<<2)+19384>>2]|0)>>>0>v>>>0){y=122;break}s=s+1|0;if(s>>>0>=32){y=123;break}}if((y|0)==122){s=(k[a+(s<<2)+19256>>2]|0)+(v-(k[a+(s+-1<<2)+19384>>2]|0))|0;break}else if((y|0)==123){s=k[T>>2]|0;break}}else s=(k[T>>2]|0)+v|0;while(0);i[s>>0]=t;s=(k[E>>2]|0)+1&x;k[E>>2]=s;if(!d)continue a;else{v=s;s=w}}}else if((s|0)==256){if(!(uh(a,c,ba)|0)){y=155;break}vh(a,ba)|0;continue}else{d=s+-258|0;y=k[a+(d<<2)+84>>2]|0;if(!d){w=z;s=v}else{do{z=d;d=d+-1|0;k[a+(z<<2)+84>>2]=k[a+(d<<2)+84>>2]}while((d|0)!=0);w=k[H>>2]|0;u=k[F>>2]|0;s=k[g>>2]|0}k[R>>2]=y;t=(l[w+(u+1)>>0]<<8|l[w+u>>0]<<16|l[w+(u+2)>>0])>>>(8-s|0)&65534;d=k[X>>2]|0;if(t>>>0<(k[a+(d<<2)+11612>>2]|0)>>>0){d=t>>>(16-d|0);v=(l[a+d+11744>>0]|0)+s|0;u=(v>>>3)+u|0;k[F>>2]=u;v=v&7;k[g>>2]=v;d=a+(d<<1)+12768|0}else{do{d=d+1|0;if(d>>>0>=15){d=15;break}}while(t>>>0>=(k[a+(d<<2)+11612>>2]|0)>>>0);v=d+s|0;u=(v>>>3)+u|0;k[F>>2]=u;v=v&7;k[g>>2]=v;d=((t-(k[a+(d+-1<<2)+11612>>2]|0)|0)>>>(16-d|0))+(k[a+(d<<2)+11676>>2]|0)|0;d=a+((d>>>0>=(k[Y>>2]|0)>>>0?0:d)<<1)+14816|0}z=j[d>>1]|0;d=z&65535;if((z&65535)>=8){s=d>>>2;t=s+-1|0;d=((d&3|4)<>0]<<8|l[w+u>>0]<<16|l[w+(u+2)>>0])>>>(8-v|0)&65535)>>>(17-s|0))+d|0;z=v+t|0;k[F>>2]=(z>>>3)+u;k[g>>2]=z&7}}else d=d+2|0;k[S>>2]=d;if(!(i[J>>0]|0)){ai(a,d,y);continue}x=k[D>>2]|0;if(!d)continue;t=k[E>>2]|0;s=t;t=t-y|0;while(1){d=d+-1|0;w=t+1|0;u=t&x;v=k[L>>2]|0;do if(v>>>0<=u>>>0){t=1;while(1){if((k[a+(t<<2)+19384>>2]|0)>>>0>u>>>0){y=145;break}t=t+1|0;if(t>>>0>=32){y=146;break}}if((y|0)==145){t=(k[a+(t<<2)+19256>>2]|0)+(u-(k[a+(t+-1<<2)+19384>>2]|0))|0;break}else if((y|0)==146){t=k[T>>2]|0;break}}else t=(k[T>>2]|0)+u|0;while(0);u=i[t>>0]|0;do if(v>>>0<=s>>>0){t=1;while(1){if((k[a+(t<<2)+19384>>2]|0)>>>0>s>>>0){y=151;break}t=t+1|0;if(t>>>0>=32){y=152;break}}if((y|0)==151){s=(k[a+(t<<2)+19256>>2]|0)+(s-(k[a+(t+-1<<2)+19384>>2]|0))|0;break}else if((y|0)==152){s=k[T>>2]|0;break}}else s=(k[T>>2]|0)+s|0;while(0);i[s>>0]=u;s=(k[E>>2]|0)+1&x;k[E>>2]=s;if(!d)continue a;else t=w}}}if((y|0)==47){i[$>>0]=0;r=ca;return}else if((y|0)==155){sh(a);r=ca;return}else if((y|0)==156){r=ca;return}}function Qh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0;p=r;r=r+16|0;g=p;f=i[d>>0]|0;e=f&255;if((e|0)==2|(e|0)==1){o=k[a+19536>>2]|0;c=c+-4|0;if((c|0)<=0){r=p;return b|0}n=f<<24>>24==2?233:232;d=b;e=0;do{a=d+1|0;m=i[d>>0]|0;f=e+1|0;if(m<<24>>24==-24|(m&255|0)==(n|0)){f=f+o&16777215;g=d+2|0;j=d+3|0;h=d+4|0;m=l[g>>0]<<8|l[a>>0]|l[j>>0]<<16|l[h>>0]<<24;if((m|0)<0){if((m+f|0)>-1){m=m+16777216|0;i[a>>0]=m;i[g>>0]=m>>>8;i[j>>0]=m>>>16;i[h>>0]=m>>>24}}else if((m+-16777216|0)<0){m=m-f|0;i[a>>0]=m;i[g>>0]=m>>>8;i[j>>0]=m>>>16;i[h>>0]=m>>>24}d=d+5|0;e=e+5|0}else{d=a;e=f}}while((e|0)<(c|0));e=b;r=p;return e|0}else if((e|0)==3){d=k[a+19536>>2]|0;e=c+-3|0;if((e|0)>0)g=0;else{r=p;return b|0}do{f=b+g|0;if((i[b+(g|3)>>0]|0)==-21){m=b+(g|1)|0;o=b+(g|2)|0;c=(l[m>>0]<<8|l[f>>0]|l[o>>0]<<16)-((g+d|0)>>>2)|0;i[f>>0]=c;i[m>>0]=c>>>8;i[o>>0]=c>>>16}g=g+4|0}while((g|0)<(e|0));e=b;r=p;return e|0}else if(!e){n=i[d+12>>0]|0;m=n&255;j=a+52|0;h=a+60|0;d=k[h>>2]|0;f=a+56|0;k[f>>2]=c;if(d>>>0>>0){e=k[a+64>>2]|0;if((e|0)!=0&e>>>0>>0){k[g>>2]=e;Jf(32944,53104,g);Af(32944);d=k[h>>2]|0;e=k[f>>2]|0}else e=c;d=d+32+(d>>>2)|0;d=e>>>0>d>>>0?e:d;e=zm(k[j>>2]|0,d)|0;if(!e)Af(32944);k[j>>2]=e;k[h>>2]=d}else e=k[j>>2]|0;if(!(n<<24>>24)){b=e;r=p;return b|0}else{j=0;d=0}do{if(j>>>0>>0){g=j;h=0;f=d;while(1){d=f+1|0;h=(h&255)-(l[b+f>>0]|0)|0;i[e+g>>0]=h;g=g+m|0;if(g>>>0>=c>>>0)break;else f=d}}j=j+1|0}while((j|0)!=(m|0));r=p;return e|0}else{b=0;r=p;return b|0}return 0}function Rh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;e=0;do{c=a+(e<<2)|0;d=k[c>>2]|0;if(d){ym(d);k[c>>2]=0}e=e+1|0}while((e|0)!=32);if(!b)return;else{f=0;g=0}a:while(1){c=b-g|0;e=(c>>>0)/((32-f|0)>>>0)|0;e=e>>>0>4194304?e:4194304;if(c>>>0>>0){c=9;break}while(1){d=xm(c)|0;if(d)break;c=c-(c>>>5)|0;if(c>>>0>>0){c=9;break a}}Ym(d|0,0,c|0)|0;k[a+(f<<2)>>2]=d;g=c+g|0;k[a+(f<<2)+128>>2]=g;f=f+1|0;d=g>>>0>>0;if(!(d&f>>>0<32)){c=11;break}}if((c|0)==9){a=xb(4)|0;Ck(a);ec(a|0,61344,16)}else if((c|0)==11)if(d){a=xb(4)|0;Ck(a);ec(a|0,61344,16)}else return}function Sh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;ig(a+4|0,1);Ym(a+19256|0,0,256)|0;k[a+58208>>2]=0;k[a+40728>>2]=0;k[a+40736>>2]=0;k[a+40732>>2]=0;c=a+58976|0;d=a+36|0;e=d+48|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));Of(c);ig(a+59032|0,1);d=a+59048|0;e=d+48|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));k[a>>2]=b;k[a+19252>>2]=0;i[a+19512>>0]=0;i[a+19528>>0]=0;i[a+19529>>0]=0;i[a+19530>>0]=0;k[a+28>>2]=1;c=fi()|0;k[a+20>>2]=c;k[a+32>>2]=0;k[a+24>>2]=0;k[a+59100>>2]=0;k[a+59104>>2]=0;c=a+148|0;d=a+84|0;e=d+36|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));b=a+68|0;Ym(c|0,0,19104)|0;c=k[b>>2]|0;if(c){ym(c);k[b>>2]=0}k[a+72>>2]=0;k[a+76>>2]=0;k[a+8>>2]=0;k[a+4>>2]=0;c=a+19536|0;k[c>>2]=0;k[c+4>>2]=0;c=a+120|0;k[c+0>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;k[c+12>>2]=0;k[c+16>>2]=0;k[c+20>>2]=0;k[c+24>>2]=0;k[a+128>>2]=-1;k[a+38736>>2]=0;k[a+38740>>2]=0;k[a+38728>>2]=0;k[a+38732>>2]=1;Ym(a+38744|0,0,368)|0;Ym(a+22420|0,0,16308)|0;i[a+58972>>0]=0;Ym(a+58564|0,0,404)|0;k[a+58560>>2]=2;k[a+58968>>2]=0;Nh(a);d=a+22372|0;k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;k[d+12>>2]=0;k[d+16>>2]=0;k[d+20>>2]=0;k[a+22368>>2]=13568;k[a+22416>>2]=8193;k[a+22412>>2]=128;k[a+22408>>2]=128;k[a+22404>>2]=0;k[a+22364>>2]=0;k[a+22396>>2]=0;k[a+22400>>2]=0;k[c>>2]=0;c=0;do{d=c<<8&65535;j[a+(c<<1)+20570>>1]=d;j[a+(c<<1)+19546>>1]=d;j[a+(c<<1)+20058>>1]=c;j[a+(c<<1)+21082>>1]=0-c<<8;c=c+1|0}while((c|0)!=256);Ym(a+21594|0,0,768)|0;Bh(0,a+20570|0,a+21850|0);return}function Th(a){a=a|0;var b=0,c=0,d=0,e=0;Nh(a);b=k[a+19252>>2]|0;if(b)ym(b);gi(k[a+20>>2]|0);b=k[a+32>>2]|0;if(b)Bk(b);e=k[a+24>>2]|0;if(e){d=e+-4|0;b=k[d>>2]|0;if(b){b=e+(b*19172|0)|0;do{c=k[b+-16>>2]|0;if(c)ym(c);jg(b+-19168|0);b=b+-19172|0}while((b|0)!=(e|0))}Bk(d)}b=k[a+59080>>2]|0;if(b)ym(b);b=k[a+59064>>2]|0;if(b)ym(b);b=k[a+59048>>2]|0;if(b)ym(b);jg(a+59032|0);Pf(a+58976|0);b=a+58208|0;if(!(k[b>>2]|0))d=0;else{k[b>>2]=0;ym(k[a+58380>>2]|0);d=0}do{b=a+(d<<2)+19256|0;c=k[b>>2]|0;if(c){ym(c);k[b>>2]=0}d=d+1|0}while((d|0)!=32);b=k[a+68>>2]|0;if(b)ym(b);b=k[a+52>>2]|0;if(b)ym(b);b=k[a+36>>2]|0;if(!b){a=a+4|0;jg(a);return}ym(b);a=a+4|0;jg(a);return}function Uh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;if(!b)Af(32944);j=b>>>0<262144?262144:b;l=a+59100|0;g=k[l>>2]|0;if(j>>>0<=g>>>0)return;b=(i[a+19512>>0]|0)==0;do if(c)if(b){b=(k[a+19252>>2]|0)!=0;c=a+19512|0;h=9;break}else{a=xb(4)|0;Ck(a);ec(a|0,61344,16)}else{c=a+19512|0;if(b){b=0;h=9}else{b=0;d=c;h=10}}while(0);if((h|0)==9){f=xm(j)|0;if(!f){d=c;h=10}else{Ym(f|0,0,j|0)|0;if(b&g>>>0>1){d=j+-1|0;b=k[a+112>>2]|0;c=k[a+19252>>2]|0;e=1;do{m=b-e|0;i[f+(m&d)>>0]=i[c+(m&g+-1)>>0]|0;e=e+1|0}while(e>>>0>>0)}b=a+19252|0;c=k[b>>2]|0;if(c)ym(c);k[b>>2]=f}}if((h|0)==10){if(b|j>>>0<16777216){m=xb(4)|0;Ck(m);ec(m|0,61344,16)}b=a+19252|0;c=k[b>>2]|0;if(c){ym(c);k[b>>2]=0}Rh(a+19256|0,j);i[d>>0]=1}k[l>>2]=j;k[a+59104>>2]=j+-1;return}function Vh(a,b,c){a=a|0;b=b|0;c=c|0;switch(b|0){case 0:{if((k[a+28>>2]|0)>>>0>1?(i[a+19512>>0]|0)==0:0){oh(a,c);return}Ph(a,c);return}case 26:case 20:{Ch(a,c);return}case 15:{wh(a,c);return}case 29:{Hh(a,c);return}default:return}}function Wh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;i=a+4|0;b=k[i>>2]|0;if((b|0)>32738?(f=a+120|0,c=(k[f>>2]|0)-b|0,(c|0)>=0):0){g=a+136|0;h=a+128|0;k[h>>2]=(k[g>>2]|0)-b+(k[h>>2]|0);if((c|0)>0){e=a+16|0;j=k[e>>2]|0;an(j|0,j+b|0,c|0)|0;k[i>>2]=0;k[f>>2]=c;if((c|0)==32768)b=32768;else{b=e;d=6}}else{k[i>>2]=0;k[f>>2]=c;b=a+16|0;d=6}if((d|0)==6){c=pf(k[a>>2]|0,(k[b>>2]|0)+c|0,32768-c|0)|0;b=k[f>>2]|0;if((c|0)>0){b=b+c|0;k[f>>2]=b}}d=b+-30|0;e=a+124|0;k[e>>2]=d;b=k[i>>2]|0;k[g>>2]=b;c=k[h>>2]|0;if((c|0)!=-1){j=b+-1+c|0;k[e>>2]=(d|0)<(j|0)?d:j}}k[i>>2]=b+1;return l[(k[a+16>>2]|0)+b>>0]|0|0}function Xh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0;p=r;r=r+16|0;o=p;b=k[a+176>>2]|0;if((b|0)!=(k[a+180>>2]|0))i[b>>0]=0;k[o+8>>2]=o;n=o+4|0;k[n>>2]=o;e=o;g=0;while(1){f=a+(g<<2)+184|0;b=k[f>>2]|0;if(!b)b=e;else{d=a+g+4|0;while(1){c=k[b>>2]|0;k[f>>2]=c;k[b+8>>2]=o;k[b+4>>2]=e;k[e+8>>2]=b;k[n>>2]=b;j[b>>1]=-1;j[b+2>>1]=l[d>>0]|0;if(!c)break;else{e=b;b=c}}}g=g+1|0;if((g|0)==38)break;else e=b}if((b|0)==(o|0)){r=p;return}do{g=b+2|0;f=j[g>>1]|0;e=f&65535;c=e<<4;a:do if((j[b+c>>1]|0)==-1)do{d=m[b+(c|2)>>1]|0;if((d+e|0)>=65536)break a;e=b+(c|4)|0;h=k[b+(c|8)>>2]|0;k[h+4>>2]=k[e>>2];k[(k[e>>2]|0)+8>>2]=h;e=(f&65535)+d|0;f=e&65535;j[g>>1]=f;e=e&65535;c=e<<4}while((j[b+c>>1]|0)==-1);while(0);b=k[b+4>>2]|0}while((b|0)!=(o|0));b=k[n>>2]|0;if((b|0)==(o|0)){r=p;return}h=a+332|0;do{f=b+4|0;e=k[b+8>>2]|0;k[e+4>>2]=k[f>>2];k[(k[f>>2]|0)+8>>2]=e;f=j[b+2>>1]|0;e=f&65535;if((f&65535)>128){g=127-e|0;g=(((g|0)>-129?g:-129)+e|0)>>>7;f=b+2048+(g<<9<<2)|0;g=g<<7;d=k[h>>2]|0;c=e;while(1){k[b>>2]=d;k[h>>2]=b;c=c+-128|0;if((c|0)<=128)break;else{d=b;b=b+2048|0}}b=f;e=e+-128-g|0}d=e+-1|0;c=l[a+d+42>>0]|0;if((l[a+c+4>>0]|0)!=(e|0)){c=c+-1|0;f=l[a+c+4>>0]|0;g=b+(f<<4)|0;f=a+(d-f<<2)+184|0;k[g>>2]=k[f>>2];k[f>>2]=g}f=a+(c<<2)+184|0;k[b>>2]=k[f>>2];k[f>>2]=b;b=k[n>>2]|0}while((b|0)!=(o|0));r=p;return}function Yh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;r=a+4|0;s=m[r>>1]|0;t=b+19072|0;q=b+19080|0;k[q>>2]=s;e=k[a+8>>2]|0;u=(k[b+19064>>2]|0)-(k[b+19060>>2]|0)|0;n=b+19068|0;o=((k[n>>2]|0)>>>0)/(s>>>0)|0;k[n>>2]=o;o=(u>>>0)/(o>>>0)|0;if((o|0)>=(s|0)){b=0;return b|0}c=e+1|0;d=l[c>>0]|0;if((o|0)<(d|0)){k[b+19076>>2]=d;u=d<<1>>>0>s>>>0;i[b+2673>>0]=u&1;v=b+1640|0;k[v>>2]=(u&1)+(k[v>>2]|0);v=d+4|0;k[b+1620>>2]=e;i[c>>0]=v;j[r>>1]=s+4;if(v>>>0>124)hh(a,b);k[t>>2]=0;b=1;return b|0}u=b+1620|0;p=k[u>>2]|0;if(!p){b=0;return b|0}i[b+2673>>0]=0;f=d;n=(m[a>>1]|0)+-1|0;while(1){c=e+8|0;h=e+9|0;g=l[h>>0]|0;d=g+f|0;if((d|0)>(o|0))break;n=n+-1|0;if(!n){v=10;break}else{f=d;e=c}}if((v|0)==10){i[b+2674>>0]=i[b+(l[p>>0]|0)+2416>>0]|0;k[t>>2]=d;e=b+2672|0;i[b+(l[c>>0]|0)+1648>>0]=i[e>>0]|0;d=m[a>>1]|0;k[b+1624>>2]=d;k[u>>2]=0;d=d+-1|0;do{c=c+-8|0;i[b+(l[c>>0]|0)+1648>>0]=i[e>>0]|0;d=d+-1|0}while((d|0)!=0);k[b+19076>>2]=k[q>>2];b=1;return b|0}k[b+19076>>2]=d;k[t>>2]=f;k[u>>2]=c;v=g+4&255;i[h>>0]=v;j[r>>1]=s+4;if((v&255)<=(l[e+1>>0]|0)){b=1;return b|0}v=c;t=k[v>>2]|0;v=k[v+4>>2]|0;q=e;r=k[q+4>>2]|0;s=c;k[s>>2]=k[q>>2];k[s+4>>2]=r;s=e;k[s>>2]=t;k[s+4>>2]=v;k[u>>2]=e;v=Xm(t|0,v|0,8)|0;if((v&255)<=124){b=1;return b|0}hh(a,b);b=1;return b|0}function Zh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;e=b+1620|0;r=i[b+(l[k[e>>2]>>0]|0)+2416>>0]|0;i[b+2674>>0]=r;p=b+2673|0;f=l[d>>0]|0;g=b+1640|0;h=d+1|0;n=i[h>>0]|0;o=n&255;a=b+(o+-1<<7)+((l[p>>0]|0)+(r&255)+(l[b+((m[k[a+12>>2]>>1]|0)+-1)+2160>>0]|0)+((l[b+f+2416>>0]|0)<<1)+((k[g>>2]|0)>>>26&32)<<1)+2676|0;r=(k[b+19064>>2]|0)-(k[b+19060>>2]|0)|0;c=b+19068|0;q=(k[c>>2]|0)>>>14;k[c>>2]=q;c=m[a>>1]|0;if(((r>>>0)/(q>>>0)|0)>>>0>>0){k[e>>2]=d;i[h>>0]=((n&255)>>>7&255^1)+o;k[b+19072>>2]=0;k[b+19076>>2]=m[a>>1];r=m[a>>1]|0;j[a>>1]=r+128-((r+32|0)>>>7);i[p>>0]=1;k[g>>2]=(k[g>>2]|0)+1;return}else{k[b+19072>>2]=c;r=m[a>>1]|0;j[a>>1]=r-((r+32|0)>>>7);k[b+19076>>2]=16384;k[b+1628>>2]=l[52616+((m[a>>1]|0)>>>10)>>0];k[b+1624>>2]=1;i[b+f+1648>>0]=i[b+2672>>0]|0;i[p>>0]=0;k[e>>2]=0;return}}function _h(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;v=r;r=r+1024|0;g=v;u=j[a>>1]|0;c=u&65535;q=b+1624|0;d=k[q>>2]|0;h=c-d|0;if(u<<16>>16==256){o=1;u=b+1602|0}else{n=l[b+(h+-1)+1904>>0]|0;o=(((m[k[a+12>>2]>>1]|0)-c|0)>(h|0)|((d|0)>(h|0)&1)<<2|((m[a+4>>1]|0)>>>0<(c*11|0)>>>0&1)<<1)+(l[b+2674>>0]|0)|0;u=b+(n<<6)+(o<<2)+2|0;t=m[u>>1]|0;o=t>>>(l[b+(n<<6)+(o<<2)+4>>0]|0);j[u>>1]=t-o;o=((o|0)==0&1)+o|0}p=b+19080|0;k[p>>2]=o;t=b+2672|0;e=i[t>>0]|0;f=0;c=(k[a+8>>2]|0)+-8|0;n=g;while(1){d=c;while(1){c=d+8|0;if((i[b+(l[c>>0]|0)+1648>>0]|0)==e<<24>>24)d=c;else break}f=(l[d+9>>0]|0)+f|0;k[n>>2]=c;h=h+-1|0;if(!h)break;else n=n+4|0}n=b+19072|0;c=o+f|0;k[p>>2]=c;h=(k[b+19064>>2]|0)-(k[b+19060>>2]|0)|0;d=b+19068|0;o=((k[d>>2]|0)>>>0)/(c>>>0)|0;k[d>>2]=o;o=(h>>>0)/(o>>>0)|0;if((o|0)>=(c|0)){a=0;r=v;return a|0}if((o|0)>=(f|0)){k[n>>2]=f;k[b+19076>>2]=c;c=(m[a>>1]|0)-(k[q>>2]|0)|0;d=g+-4|0;while(1){d=d+4|0;i[b+(l[k[d>>2]>>0]|0)+1648>>0]=e;c=c+-1|0;if(!c)break;e=i[t>>0]|0}j[u>>1]=(m[u>>1]|0)+(k[p>>2]|0);k[q>>2]=m[a>>1];a=1;r=v;return a|0}f=k[g>>2]|0;c=f+1|0;e=i[c>>0]|0;d=e&255;if((d|0)>(o|0)){h=c;c=e}else{do{g=g+4|0;f=k[g>>2]|0;e=f+1|0;c=i[e>>0]|0;d=(c&255)+d|0}while((d|0)<=(o|0));h=e}k[b+19076>>2]=d;e=c&255;k[n>>2]=d-e;c=u+2|0;d=i[c>>0]|0;if((d&255)<7?(s=u+3|0,q=(i[s>>0]|0)+-1<<24>>24,i[s>>0]=q,q<<24>>24==0):0){j[u>>1]=m[u>>1]<<1;i[c>>0]=d+1<<24>>24;i[s>>0]=3<<(d&255)}k[b+1620>>2]=f;u=e+4&255;i[h>>0]=u;s=a+4|0;j[s>>1]=(m[s>>1]|0)+4;if((u&255)>124)hh(a,b);i[t>>0]=(i[t>>0]|0)+1<<24>>24;k[b+1640>>2]=k[b+1644>>2];a=1;r=v;return a|0}function $h(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;f=a+1620|0;g=k[f>>2]|0;C=j[g>>1]|0;D=C&255;C=(C&65535)>>>8;g=k[g+4>>2]|0;n=C&65535;do if((C&255)<31?(b=k[(k[a+1608>>2]|0)+12>>2]|0,(b|0)!=0):0){e=b+4|0;if((j[b>>1]|0)==1){b=e+1|0;C=i[b>>0]|0;i[b>>0]=((C&255)<32&1)+(C&255);b=e;break}b=k[b+8>>2]|0;if((i[b>>0]|0)!=D<<24>>24){while(1){c=b+8|0;if((i[c>>0]|0)==D<<24>>24)break;else b=c}if((l[b+9>>0]|0)<(l[b+1>>0]|0))b=c;else{B=c;A=k[B>>2]|0;B=k[B+4>>2]|0;y=b;z=k[y+4>>2]|0;C=c;k[C>>2]=k[y>>2];k[C+4>>2]=z;C=b;k[C>>2]=A;k[C+4>>2]=B}}c=b+1|0;d=i[c>>0]|0;if((d&255)<115){i[c>>0]=(d&255)+2;j[e>>1]=(m[e>>1]|0)+2}}else b=0;while(0);c=a+1632|0;a:do if(!(k[c>>2]|0)){D=ci(a,1,b)|0;k[(k[f>>2]|0)+4>>2]=D;k[a+1616>>2]=D;k[a+1608>>2]=D;if(D)return}else{C=a+19088|0;d=a+19424|0;e=k[d>>2]|0;k[d>>2]=e+1;i[e>>0]=D;e=k[d>>2]|0;if(e>>>0<(k[a+19436>>2]|0)>>>0){do if(g){if(g>>>0<=e>>>0){b=ci(a,0,b)|0;if(!b)break a}else b=g;B=(k[c>>2]|0)+-1|0;k[c>>2]=B;if(!B){e=k[a+1608>>2]|0;k[d>>2]=(k[d>>2]|0)+(((k[a+1616>>2]|0)!=(e|0))<<31>>31);d=e;e=b;B=b;break}else{d=k[a+1608>>2]|0;B=b;break}}else{k[(k[f>>2]|0)+4>>2]=e;B=k[a+1608>>2]|0;d=B}while(0);u=a+1608|0;b=j[d>>1]|0;v=b&65535;w=a+1616|0;c=k[w>>2]|0;b:do if((c|0)!=(d|0)){x=a+19130|0;y=a+19264|0;z=a+19268|0;A=a+1628|0;s=(b&65535)>3&1;t=n<<1;r=1-n+(m[d+4>>1]|0)-v|0;c:while(1){p=j[c>>1]|0;q=p&65535;if(p<<16>>16==1){f=l[x>>0]|0;b=a+(f<<2)+19272|0;d=k[b>>2]|0;if(!d){d=k[y>>2]|0;b=a+f+19092|0;g=l[b>>0]<<4;p=d+g|0;k[y>>2]=p;if(p>>>0>(k[z>>2]|0)>>>0){k[y>>2]=d+(g-(l[b>>0]<<4));d=fh(C,f)|0}}else k[b>>2]=k[d>>2];if(!d)break a;g=c+4|0;b=g;p=k[b>>2]|0;b=k[b+4>>2]|0;h=d;k[h>>2]=p;k[h+4>>2]=b;k[c+8>>2]=d;b=Xm(p|0,b|0,8)|0;if((b&255)<30){b=$m(b|0,O|0,1)|0;b=b&255}else b=120;i[d+1>>0]=b;h=(k[A>>2]|0)+s+(b&255)|0;j[g>>1]=h;f=c+4|0}else{do if(!(q&1)){b=c+8|0;n=k[b>>2]|0;o=q>>>1;h=i[a+(o+-1)+19130>>0]|0;p=h&255;d=i[a+o+19130>>0]|0;if(h<<24>>24==d<<24>>24){k[b>>2]=n;if(!n)break a;else break}h=d&255;g=a+(h<<2)+19272|0;d=k[g>>2]|0;if(!d){d=k[y>>2]|0;g=a+h+19092|0;f=l[g>>0]<<4;E=d+f|0;k[y>>2]=E;if(E>>>0>(k[z>>2]|0)>>>0){k[y>>2]=d+(f-(l[g>>0]<<4));d=fh(C,h)|0}}else k[g>>2]=k[d>>2];if(!d)break c;_m(d|0,n|0,o<<4|0)|0;E=a+(p<<2)+19272|0;k[n>>2]=k[E>>2];k[E>>2]=n;k[b>>2]=d}while(0);f=c+4|0;h=m[f>>1]|0;h=((q<<2>>>0<=v>>>0&h>>>0<=q<<3>>>0&1)<<1|q<<1>>>0>>0)+h|0;j[f>>1]=h}d=h&65535;b=ka(d+6|0,t)|0;d=r+d|0;if(b>>>0<(d*6|0)>>>0){g=3;b=(b>>>0>d>>>0?2:1)+(b>>>0>=d<<2>>>0&1)|0}else{b=(b>>>0>=(d*15|0)>>>0&1)+(b>>>0>=(d*12|0)>>>0&1)+(b>>>0>=(d*9|0)>>>0|4)|0;g=b}j[f>>1]=g+h;E=k[c+8>>2]|0;k[E+(q<<3)+4>>2]=e;i[E+(q<<3)>>0]=D;i[E+(q<<3)+1>>0]=b;j[c>>1]=q+1;c=k[c+12>>2]|0;if((c|0)==(k[u>>2]|0))break b}k[b>>2]=0;break a}while(0);k[u>>2]=B;k[w>>2]=B;return}}while(0);gh(a);i[a+2672>>0]=0;return}function ai(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;g=a+112|0;d=k[g>>2]|0;h=d-c|0;f=(k[a+59100>>2]|0)+-4097|0;if(!(h>>>0>>0&d>>>0>>0)){if(!b)return;c=a+59104|0;f=a+19252|0;e=b;b=k[c>>2]|0;a=h;while(1){e=e+-1|0;j=k[f>>2]|0;i[j+d>>0]=i[j+(b&a)>>0]|0;b=k[c>>2]|0;d=(k[g>>2]|0)+1&b;k[g>>2]=d;if(!e)break;else a=a+1|0}return}j=k[a+19252>>2]|0;a=j+h|0;e=j+d|0;k[g>>2]=d+b;if(b>>>0>7){f=b+-8|0;g=f&-8;h=d+g+8|0;c=h-c|0;while(1){i[e>>0]=i[a>>0]|0;i[e+1>>0]=i[a+1>>0]|0;i[e+2>>0]=i[a+2>>0]|0;i[e+3>>0]=i[a+3>>0]|0;i[e+4>>0]=i[a+4>>0]|0;i[e+5>>0]=i[a+5>>0]|0;i[e+6>>0]=i[a+6>>0]|0;i[e+7>>0]=i[a+7>>0]|0;b=b+-8|0;if(b>>>0<=7)break;else{e=e+8|0;a=a+8|0}}b=f-g|0;f=c;d=h;e=j+h|0;a=j+c|0}else f=h;if(!b)return;i[e>>0]=i[a>>0]|0;if(b>>>0<=1)return;i[j+(d+1)>>0]=i[j+(f+1)>>0]|0;if(b>>>0<=2)return;i[j+(d+2)>>0]=i[j+(f+2)>>0]|0;if(b>>>0<=3)return;i[j+(d+3)>>0]=i[j+(f+3)>>0]|0;if(b>>>0<=4)return;i[j+(d+4)>>0]=i[j+(f+4)>>0]|0;if(b>>>0<=5)return;i[j+(d+5)>>0]=i[j+(f+5)>>0]|0;if(b>>>0<=6)return;i[j+(d+6)>>0]=i[j+(f+6)>>0]|0;return}function bi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=r;r=r+16|0;f=i;g=a+4|0;c=(k[g>>2]|0)+1|0;k[g>>2]=c;h=a+8|0;d=k[h>>2]|0;if(c>>>0<=d>>>0){g=c;h=k[a>>2]|0;g=g+-1|0;g=h+(g<<2)|0;k[g>>2]=b;r=i;return}e=k[a+12>>2]|0;if((e|0)!=0&c>>>0>e>>>0){k[f>>2]=e;Jf(32944,53104,f);Af(32944);d=k[h>>2]|0;c=k[g>>2]|0}d=d+32+(d>>>2)|0;c=c>>>0>d>>>0?c:d;d=zm(k[a>>2]|0,c<<2)|0;if(!d)Af(32944);k[a>>2]=d;k[h>>2]=c;g=k[g>>2]|0;h=d;g=g+-1|0;g=h+(g<<2)|0;k[g>>2]=b;r=i;return}function ci(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;u=r;r=r+256|0;t=u;d=k[a+1608>>2]|0;h=a+1620|0;e=k[h>>2]|0;n=k[e+4>>2]|0;if(!b){b=t+4|0;k[t>>2]=e;if(k[d+12>>2]|0)s=3}else{b=t;s=3}if((s|0)==3){d=k[d+12>>2]|0;if(c)s=8;a:while(1){if((s|0)==8){s=0;e=k[c+4>>2]|0;if((e|0)!=(n|0)){c=e;break}e=b+4|0;k[b>>2]=c;b=k[d+12>>2]|0;if(!b){c=d;b=e;break}else{d=b;b=e}}if((j[d>>1]|0)==1){c=d+4|0;s=8;continue}c=k[d+8>>2]|0;e=i[k[h>>2]>>0]|0;if((i[c>>0]|0)==e<<24>>24){s=8;continue}while(1){c=c+8|0;if((i[c>>0]|0)==e<<24>>24){s=8;continue a}}}if((b|0)==(t|0)){t=c;r=u;return t|0}else d=c}g=i[n>>0]|0;h=n+1|0;c=j[d>>1]|0;if(c<<16>>16==1)e=i[d+5>>0]|0;else{if(d>>>0<=(k[a+19424>>2]|0)>>>0){t=0;r=u;return t|0}e=k[d+8>>2]|0;if((i[e>>0]|0)!=g<<24>>24)do e=e+8|0;while((i[e>>0]|0)!=g<<24>>24);e=l[e+1>>0]|0;f=e+-1|0;e=(m[d+4>>1]|0)-(c&65535)+(1-e)|0;c=f<<1;if(c>>>0>e>>>0)c=((c+-1+(e*3|0)|0)>>>0)/(e<<1>>>0)|0;else c=(f*5|0)>>>0>e>>>0&1;e=c+1&255}o=a+19088|0;p=a+19268|0;q=a+19264|0;n=a+19272|0;a=$m(e&255|0,0,8)|0;a=g&255|a;g=h|O;f=b;while(1){f=f+-4|0;c=k[f>>2]|0;b=k[p>>2]|0;if((b|0)==(k[q>>2]|0)){b=k[n>>2]|0;if(!b)b=fh(o,0)|0;else k[n>>2]=k[b>>2];if(b){e=b;s=27}}else{b=b+-16|0;k[p>>2]=b;e=b;s=27}if((s|0)==27){s=0;j[e>>1]=1;h=e+4|0;k[h>>2]=a;k[h+4>>2]=g;k[e+12>>2]=d;k[c+4>>2]=b}if(!b){b=0;s=30;break}if((f|0)==(t|0)){s=30;break}else d=b}if((s|0)==30){r=u;return b|0}return 0}function di(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;f=h;g=a+8232|0;c=k[g>>2]|0;d=a+8228|0;k[d>>2]=b;if(c>>>0>>0){e=k[a+8236>>2]|0;if((e|0)!=0&e>>>0>>0){k[f>>2]=e;Jf(32944,53104,f);Af(32944);b=k[d>>2]|0;c=k[g>>2]|0}c=c+32+(c>>>2)|0;c=b>>>0>c>>>0?b:c;b=a+8224|0;d=zm(k[b>>2]|0,c)|0;if(!d)Af(32944);k[b>>2]=d;k[g>>2]=c}i[a+16>>0]=0;Bg(a+8288|0,0);c=a+8240|0;k[a+28>>2]=0;i[a+8369>>0]=0;i[a+8378>>0]=0;d=a+8412|0;k[a+8432>>2]=0;i[a+16629>>0]=0;k[c+0>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;k[c+12>>2]=0;k[c+16>>2]=0;k[c+20>>2]=0;c=a+8328|0;b=c+9|0;do{i[c>>0]=0;c=c+1|0}while((c|0)<(b|0));k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;j[d+12>>1]=0;i[d+14>>0]=0;r=h;return}function ei(a){a=a|0;var b=0;j[a+20>>1]=0;b=a+24|0;a=a+32|0;k[b+0>>2]=0;j[b+4>>1]=0;i[b+6>>0]=0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+20>>2]=0;k[a+24>>2]=0;k[a+28>>2]=0;return}function fi(){var a=0,b=0;Tb(52632)|0;b=k[13164]|0;a=b+1|0;k[13164]=a;if(!b){a=yk(584)|0;ii(a,32);k[13166]=a;a=k[13164]|0}if(a>>>0>1){b=yk(584)|0;ii(b,32);Xb(52632)|0;return b|0}else{Xb(52632)|0;b=k[13166]|0;return b|0}return 0}function gi(a){a=a|0;var b=0,c=0;Tb(52632)|0;do if(a){b=k[13166]|0;c=k[13164]|0;if((b|0)==(a|0)&(c|0)!=0){c=c+-1|0;k[13164]=c;if(c)break;ji(a);Ak(a);b=k[13166]|0}if((b|0)!=(a|0)){ji(a);Ak(a)}}while(0);Xb(52632)|0;return}function hi(){var a=0;a=Ja(84)|0;a=(a|0)==0?1:a;return (a>>>0>32?32:a)|0}function ii(a,b){a=a|0;b=b|0;var c=0,d=0;d=r;r=r+16|0;c=d;b=b>>>0>32?32:b;k[a>>2]=(b|0)==0?1:b;k[a+132>>2]=0;i[a+404>>0]=0;b=(ic(a+560|0,0)|0)==0;i[a+484>>0]=0;k[a+408>>2]=0;if((((b?(ab(a+488|0,0)|0)==0:0)?(ic(a+536|0,0)|0)==0:0)?(ab(a+412|0,0)|0)==0:0)?(ic(a+460|0,0)|0)==0:0){c=a+396|0;k[c>>2]=0;c=a+400|0;k[c>>2]=0;c=a+136|0;k[c>>2]=0;r=d;return}Jf(32944,52672,c);Bf(32944,2);c=a+396|0;k[c>>2]=0;c=a+400|0;k[c>>2]=0;c=a+136|0;k[c>>2]=0;r=d;return}function ji(a){a=a|0;var b=0,c=0,d=0,e=0;ki(a);i[a+404>>0]=1;b=a+460|0;Tb(b|0)|0;c=a+408|0;k[c>>2]=(k[c>>2]|0)+32;Xb(b|0)|0;c=a+412|0;Kb(c|0)|0;d=a+132|0;if(k[d>>2]|0){e=0;do{pb(k[a+(e<<2)+4>>2]|0,0)|0;e=e+1|0}while(e>>>0<(k[d>>2]|0)>>>0)}Hb(a+560|0)|0;Ua(a+488|0)|0;Hb(a+536|0)|0;Ua(c|0)|0;Hb(b|0)|0;return}function ki(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=r;r=r+16|0;e=f;c=(k[a+396>>2]|0)-(k[a+400>>2]|0)&31;b=a+136|0;k[b>>2]=c;if(!c){r=f;return}d=a+484|0;i[d>>0]=1;c=a+460|0;Tb(c|0)|0;g=a+408|0;k[g>>2]=(k[g>>2]|0)+(k[b>>2]|0);Xb(c|0)|0;Kb(a+412|0)|0;c=a+536|0;Tb(c|0)|0;if(i[d>>0]|0){b=a+488|0;do{a=Qb(b|0,c|0)|0;if(a){k[e>>2]=a;Jf(32944,52816,e);Bf(32944,2)}}while((i[d>>0]|0)!=0)}Xb(c|0)|0;r=f;return}function li(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;h=r;r=r+416|0;g=h;f=h+408|0;e=h+8|0;if(!(k[a>>2]|0)){r=h;return}b=a+132|0;d=0;do{c=_b(f|0,0,15,a|0)|0;if(c){k[g>>2]=c;bk(e,100,52928,g)|0;Jf(32944,e,g);Bf(32944,2)}k[a+(d<<2)+4>>2]=k[f>>2];k[b>>2]=(k[b>>2]|0)+1;d=d+1|0}while(d>>>0<(k[a>>2]|0)>>>0);r=h;return}function mi(a){a=a|0;ni(a);return 0}function ni(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=r;r=r+16|0;h=j;if(!(oi(a,h)|0)){r=j;return}b=h+4|0;c=a+560|0;d=a+136|0;e=a+536|0;f=a+484|0;g=a+488|0;do{mc[k[h>>2]&31](k[b>>2]|0);Tb(c|0)|0;l=(k[d>>2]|0)+-1|0;k[d>>2]=l;if(!l){Tb(e|0)|0;i[f>>0]=0;Fb(g|0)|0;Xb(e|0)|0}Xb(c|0)|0}while(oi(a,h)|0);r=j;return}function oi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;e=h;f=a+460|0;Tb(f|0)|0;g=a+408|0;c=k[g>>2]|0;if(!c){d=a+412|0;do{c=Qb(d|0,f|0)|0;if(c){k[e>>2]=c;Jf(32944,52816,e);Bf(32944,2)}c=k[g>>2]|0}while((c|0)==0)}k[g>>2]=c+-1;Xb(f|0)|0;if(i[a+404>>0]|0){a=0;r=h;return a|0}g=a+560|0;Tb(g|0)|0;e=a+400|0;d=a+(k[e>>2]<<3)+140|0;f=k[d+4>>2]|0;a=b;k[a>>2]=k[d>>2];k[a+4>>2]=f;k[e>>2]=(k[e>>2]|0)+1&31;Xb(g|0)|0;a=1;r=h;return a|0}function pi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(!(k[a+132>>2]|0))li(a);e=a+396|0;d=k[e>>2]|0;if((d+1&31|0)==(k[a+400>>2]|0)){ki(a);d=k[e>>2]|0}k[a+(d<<3)+140>>2]=b;b=k[e>>2]|0;k[a+(b<<3)+144>>2]=c;k[e>>2]=b+1&31;return}function qi(){ic(52632,0)|0;Ta(26,52632,w|0)|0;return}function ri(a){a=a|0;Hb(a|0)|0;return}function si(a){a=a|0;wf(a);Bc(a+91656|0);Bc(a+91748|0);Bc(a+91840|0);Bc(a+91932|0);Bc(a+92024|0);ti(a);return}function ti(a){a=a|0;var b=0,c=0;xf(a);k[a+75208>>2]=0;k[a+83464>>2]=0;i[a+75196>>0]=0;k[a+75200>>2]=0;i[a+75204>>0]=0;Cc(a+91656|0);Cc(a+91748|0);Cc(a+91840|0);Cc(a+92024|0);Cc(a+91932|0);b=a+49776|0;c=k[b>>2]|0;if(!c){c=a+49780|0;k[c>>2]=0;a=a+49784|0;k[a>>2]=0;return}ym(c);k[b>>2]=0;c=a+49780|0;k[c>>2]=0;a=a+49784|0;k[a>>2]=0;return}function ui(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;p=r;r=r+24592|0;m=p+16400|0;l=p;n=p+8200|0;g=Sc(d,0)|0;k[m>>2]=0;Dc(b);if(!(Fc(b,l,2048)|0)){f=0;r=p;return f|0}h=l+4|0;i=n+4|0;j=n+8|0;if(!c){while(1){o=Rc(l)|0;if(Pc(k[o>>2]|0)|0)fk(l,53064)|0;if(e?dd(l)|0:0){if(!(k[m>>2]|0))cd(d,m,2048);if(cf(l,m,f)|0){a=1;o=28;break}}else{if((k[l>>2]|0)==42?Pc(k[h>>2]|0)|0:0){k[n>>2]=46;k[i>>2]=47;Lc(j,g,2048)|0;a=n}else a=g;if(cf(Sc(l,0)|0,a,f)|0){a=1;o=28;break}}if(!(Fc(b,l,2048)|0)){a=0;o=28;break}}if((o|0)==28){r=p;return a|0}}a:while(1){a=Rc(l)|0;if(!(Pc(k[a>>2]|0)|0)){if(!(Uc(Oc(l)|0)|0))o=6}else{k[a>>2]=0;o=6}do if((o|0)==6){o=0;if(e?dd(l)|0:0){if(!(k[m>>2]|0))cd(d,m,2048);if(cf(l,m,f)|0){a=1;o=28;break a}else break}if((k[l>>2]|0)==42?Pc(k[h>>2]|0)|0:0){k[n>>2]=46;k[i>>2]=47;Lc(j,g,2048)|0;a=n}else a=g;if(cf(Sc(l,0)|0,a,f)|0){a=1;o=28;break a}}while(0);if(!(Fc(b,l,2048)|0)){a=0;o=28;break}}if((o|0)==28){r=p;return a|0}return 0}function vi(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=(e|0)!=0;if(m&(f|0)!=0)k[e>>2]=0;n=b+32|0;if((kk(n)|0)>>>0>2047){o=0;return o|0}l=(i[b+8417>>0]|0)!=0;if(ui(0,a+91748|0,l,n,0,5)|0){o=0;return o|0}if((k[a+91860>>2]|0)!=0?!(ui(0,a+91840|0,l,n,0,5)|0):0){o=0;return o|0}j=b+8240|0;h=a+50344|0;g=k[h>>2]|0;h=k[h+4>>2]|0;if(!((g|0)==0&(h|0)==0)?(p=j,q=k[p+4>>2]|0,!(q>>>0>>0|((q|0)==(h|0)?(k[p>>2]|0)>>>0>>0:0))):0){q=0;return q|0}h=a+50352|0;g=k[h>>2]|0;h=k[h+4>>2]|0;if(!((g|0)==0&(h|0)==0)?(q=j,p=k[q+4>>2]|0,!(p>>>0>h>>>0|((p|0)==(h|0)?(k[q>>2]|0)>>>0>g>>>0:0))):0){q=0;return q|0}g=k[b+28>>2]|0;if(k[a>>2]&g){q=0;return q|0}if((i[a+8>>0]|0)!=0?(k[a+4>>2]&g|0)==0:0){q=0;return q|0}if(!l){h=b+8272|0;g=k[h>>2]|0;h=k[h+4>>2]|0;p=a+50360|0;q=k[p>>2]|0;p=k[p+4>>2]|0;if(!((q|0)==2147483647&(p|0)==2147483647|((p|0)>(h|0)|(p|0)==(h|0)&q>>>0>g>>>0))){q=0;return q|0}q=a+50368|0;p=k[q>>2]|0;q=k[q+4>>2]|0;if(((q|0)>(h|0)|(q|0)==(h|0)&p>>>0>=g>>>0)&((p|0)!=2147483647|(q|0)!=2147483647)){q=0;return q|0}}j=a+91656|0;Dc(j);h=Gc(j)|0;if(!h){q=0;return q|0}else g=1;while(1){if(cf(h,n,d)|0)break;h=Gc(j)|0;if(!h){g=0;o=24;break}else g=g+1|0}if((o|0)==24)return g|0;if(c){q=(Kc(h,n)|0)==0&1;i[c>>0]=q}if(!m){q=g;return q|0}Lc(e,h,f)|0;q=g;return q|0}function wi(a,b){a=a|0;b=b|0;Ec(a+91932|0,b);return}function xi(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;e=r;r=r+8192|0;d=k[a+49716>>2]|0;if((d|0)==2){b=1;r=e;return b|0}if((i[a+49796>>0]|0)!=0|(d|0)==1){Jd(b);b=0;r=e;return b|0}else{Lc(e,b,2048)|0;Jd(b);b=0;r=e;return b|0}return 0}function yi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return 1}function zi(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return}function Ai(a){a=a|0;return}function Bi(a){a=a|0;return}function Ci(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0;n=r;r=r+10256|0;d=n+8208|0;e=n;j=n+8192|0;f=a+12|0;i[f>>0]=0;i[f+1>>0]=0;i[f+2>>0]=0;i[f+3>>0]=0;m=yk(216688)|0;si(m);g=m+92120|0;Qd(g,m);h=m+178656|0;Ug(h,m);b=m+75176|0;k[b>>2]=0;c=a+8|0;k[m+216680>>2]=l[c>>0]|l[c+1>>0]<<8|l[c+2>>0]<<16|l[c+3>>0]<<24;Ec(m+91656|0,53064);i[d>>0]=0;c=l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24;if(c)Ic(d,c,2048)|0;c=a+4|0;Xc(d,l[c>>0]|l[c+1>>0]<<8|l[c+2>>0]<<16|l[c+3>>0]<<24,e,2048)|0;wi(m,e);k[m+49716>>2]=1;k[m+58764>>2]=1;d=a+36|0;k[m+75184>>2]=l[d>>0]|l[d+1>>0]<<8|l[d+2>>0]<<16|l[d+3>>0]<<24;d=a+40|0;k[m+75180>>2]=l[d>>0]|l[d+1>>0]<<8|l[d+2>>0]<<16|l[d+3>>0]<<24;i[m+49821>>0]=1;if(!(Xd(g,e,4)|0)){i[f>>0]=15;i[f+1>>0]=0;i[f+2>>0]=0;i[f+3>>0]=0;Ki(m);Ak(m);m=0;r=n;return m|0}if(!(Ud(g,0)|0)){b=k[b>>2]|0;do if(!b){b=k[8236]|0;if(b>>>0<=1){i[f>>0]=13;i[f+1>>0]=0;i[f+2>>0]=0;i[f+3>>0]=0;break}switch(b|0){case 8:{b=11;break}case 11:{b=24;break}case 6:{b=15;break}case 3:{b=12;break}case 5:{b=19;break}case 2:{b=18;break}case 9:{b=16;break}default:b=21}i[f>>0]=b;i[f+1>>0]=b>>8;i[f+2>>0]=b>>16;i[f+3>>0]=b>>24}else{i[f>>0]=b;i[f+1>>0]=b>>8;i[f+2>>0]=b>>16;i[f+3>>0]=b>>24}while(0);Ki(m);Ak(m);m=0;r=n;return m|0}c=a+32|0;b=l[m+170389>>0]|0;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24;if(i[m+170391>>0]|0){b=b|4;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24}if(i[m+170388>>0]|0){b=b|8;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24}if(i[m+170394>>0]|0){b=b|16;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24}if(i[m+170392>>0]|0){b=b|32;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24}if(i[m+170395>>0]|0){b=b|64;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24}if(i[m+170396>>0]|0){b=b|128;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24}if(i[m+170393>>0]|0){f=b|256;i[c>>0]=f;i[c+1>>0]=f>>8;i[c+2>>0]=f>>16;i[c+3>>0]=f>>24};k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;k[j+12>>2]=0;e=a+20|0;if((l[e>>0]|l[e+1>>0]<<8|l[e+2>>0]<<16|l[e+3>>0]<<24|0)!=0?Od(g,j)|0:0){b=k[j+4>>2]<<2|1;d=zm(0,b>>>0>32?b:32)|0;f=(d|0)==0;if(f)Af(32944);Ym(d|0,0,b|0)|0;me(k[j>>2]|0,d,b+-1|0)|0;o=(Zm(d|0)|0)+1|0;p=l[c>>0]|l[c+1>>0]<<8|l[c+2>>0]<<16|l[c+3>>0]<<24|2;i[c>>0]=p;i[c+1>>0]=p>>8;i[c+2>>0]=p>>16;i[c+3>>0]=p>>24;p=l[e>>0]|l[e+1>>0]<<8|l[e+2>>0]<<16|l[e+3>>0]<<24;b=o>>>0>p>>>0?20:1;c=a+28|0;i[c>>0]=b;i[c+1>>0]=b>>8;i[c+2>>0]=b>>16;i[c+3>>0]=b>>24;p=o>>>0

>>0?o:p;c=a+24|0;i[c>>0]=p;i[c+1>>0]=p>>8;i[c+2>>0]=p>>16;i[c+3>>0]=p>>24;b=a+16|0;_m(l[b>>0]|l[b+1>>0]<<8|l[b+2>>0]<<16|l[b+3>>0]<<24|0,d|0,p+-1|0)|0;if(o>>>0<=(l[e>>0]|l[e+1>>0]<<8|l[e+2>>0]<<16|l[e+3>>0]<<24)>>>0)i[(l[b>>0]|l[b+1>>0]<<8|l[b+2>>0]<<16|l[b+3>>0]<<24)+((l[c>>0]|l[c+1>>0]<<8|l[c+2>>0]<<16|l[c+3>>0]<<24)+-1)>>0]=0;if(!f)ym(d)}else{p=a+24|0;i[p>>0]=0;i[p+1>>0]=0;i[p+2>>0]=0;i[p+3>>0]=0;p=a+28|0;i[p>>0]=0;i[p+1>>0]=0;i[p+2>>0]=0;i[p+3>>0]=0}Wg(h,g);b=k[j>>2]|0;if(!b){p=m;r=n;return p|0}ym(b);p=m;r=n;return p|0}function Di(a){a=a|0;var b=0;if(!a){a=17;return a|0}b=ld(a+92120|0)|0;Ki(a);Ak(a);a=b?0:17;return a|0}function Ei(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=a+92120|0;d=ee(c,2)|0;k[a+216684>>2]=d;if((d|0)<1){if(((i[a+170389>>0]|0)!=0?(k[a+128324>>2]|0)==5:0)?(i[a+152132>>0]|0)!=0:0){if(!(ch(c,0,0,76)|0)){a=15;return a|0}d=a+170368|0;Zd(c,k[d>>2]|0,k[d+4>>2]|0,0);a=Ei(a,b)|0;return a|0}if(i[a+170404>>0]|0){a=12;return a|0}a=(i[a+170405>>0]|0)==0?10:24;return a|0}if((k[a+216680>>2]|0)==0?(i[a+143280>>0]|0)!=0:0){c=Fi(a,0,0,0,0,0)|0;if(c){a=c;return a|0}a=Ei(a,b)|0;return a|0}d=b+1024|0;nk(d,a+92144|0,1024)|0;me(d,b,1024)|0;d=b+6144|0;nk(d,a+134984|0,1024)|0;me(d,b+5120|0,1024)|0;d=b+10240|0;c=l[a+143280>>0]|0;i[d>>0]=c;i[d+1>>0]=c>>8;i[d+2>>0]=c>>16;i[d+3>>0]=c>>24;if(i[a+143281>>0]|0){c=c|2;i[d>>0]=c;i[d+1>>0]=c>>8;i[d+2>>0]=c>>16;i[d+3>>0]=c>>24}if(i[a+143283>>0]|0){c=c|4;i[d>>0]=c;i[d+1>>0]=c>>8;i[d+2>>0]=c>>16;i[d+3>>0]=c>>24}if(i[a+143368>>0]|0){c=c|16;i[d>>0]=c;i[d+1>>0]=c>>8;i[d+2>>0]=c>>16;i[d+3>>0]=c>>24}if(i[a+143369>>0]|0){c=c|32;i[d>>0]=c;i[d+1>>0]=c>>8;i[d+2>>0]=c>>16;i[d+3>>0]=c>>24}e=a+143216|0;d=k[e>>2]|0;e=k[e+4>>2]|0;c=b+10244|0;i[c>>0]=d;i[c+1>>0]=d>>8;i[c+2>>0]=d>>16;i[c+3>>0]=d>>24;c=b+10248|0;i[c>>0]=e;i[c+1>>0]=e>>8;i[c+2>>0]=e>>16;i[c+3>>0]=e>>24;c=a+143224|0;e=k[c>>2]|0;c=k[c+4>>2]|0;d=b+10252|0;i[d>>0]=e;i[d+1>>0]=e>>8;i[d+2>>0]=e>>16;i[d+3>>0]=e>>24;d=b+10256|0;i[d>>0]=c;i[d+1>>0]=c>>8;i[d+2>>0]=c>>16;i[d+3>>0]=c>>24;d=(k[a+143380>>2]|0)==0?2:3;c=b+10260|0;i[c>>0]=d;i[c+1>>0]=d>>8;i[c+2>>0]=d>>16;i[c+3>>0]=d>>24;c=i[a+134977>>0]|0;if((k[a+170384>>2]|0)==3)c=c<<24>>24==0?50:200;else c=c&255;d=b+10272|0;i[d>>0]=c;i[d+1>>0]=c>>8;i[d+2>>0]=c>>16;i[d+3>>0]=c>>24;d=a+143244|0;e=k[d>>2]|0;c=b+10264|0;i[c>>0]=e;i[c+1>>0]=e>>8;i[c+2>>0]=e>>16;i[c+3>>0]=e>>24;c=kf(a+143192|0)|0;e=b+10268|0;i[e>>0]=c;i[e+1>>0]=c>>8;i[e+2>>0]=c>>16;i[e+3>>0]=c>>24;e=(l[a+134978>>0]|0)+48|0;c=b+10276|0;i[c>>0]=e;i[c+1>>0]=e>>8;i[c+2>>0]=e>>16;i[c+3>>0]=e>>24;c=k[a+134980>>2]|0;e=b+10280|0;i[e>>0]=c;i[e+1>>0]=c>>8;i[e+2>>0]=c>>16;i[e+3>>0]=c>>24;e=b+10292|0;i[e>>0]=0;i[e+1>>0]=0;i[e+2>>0]=0;i[e+3>>0]=0;e=b+10296|0;i[e>>0]=0;i[e+1>>0]=0;i[e+2>>0]=0;i[e+3>>0]=0;e=(k[a+143372>>2]|0)>>>10;c=b+10300|0;i[c>>0]=e;i[c+1>>0]=e>>8;i[c+2>>0]=e>>16;i[c+3>>0]=e>>24;c=k[a+143240>>2]|0;if((c|0)==2|(c|0)==1){e=b+10304|0;i[e>>0]=1;i[e+1>>0]=0;i[e+2>>0]=0;i[e+3>>0]=0;e=0;return e|0}else if((c|0)==3){a=b+10304|0;i[a>>0]=2;i[a+1>>0]=0;i[a+2>>0]=0;i[a+3>>0]=0;a=b+10308|0;c=d+0|0;d=a+32|0;do{i[a>>0]=i[c>>0]|0;a=a+1|0;c=c+1|0}while((a|0)<(d|0));e=0;return e|0}else{e=b+10304|0;i[e>>0]=0;i[e+1>>0]=0;i[e+2>>0]=0;i[e+3>>0]=0;e=0;return e|0}return 0}function Fi(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;p=r;r=r+4112|0;l=p+2056|0;h=p;m=p+2048|0;o=a+75176|0;k[o>>2]=0;j=k[a+216680>>2]|0;do if((j|0)==2|(j|0)==0)n=4;else{if((b|0)==0?(i[a+170388>>0]|0)==0:0){n=4;break}k[a+75172>>2]=b;g=a+16408|0;k[g>>2]=0;j=a+66980|0;k[j>>2]=0;if(c){Ic(l,c,2046)|0;ne(l,g,2048)|0;Vc(g,2048)}if(d){Ic(h,d,2046)|0;ne(h,j,2048)|0}if(e){nk(g,e,2048)|0;Vc(g,2048)}if(f)Lc(j,f,2048)|0;ik(a+75208|0,(b|0)==2?53072:53080)|0;i[a+50377>>0]=(b|0)!=2&1;i[m>>0]=0;g=a+178656|0;d=a+92120|0;h=a+216684|0;Xg(g,d,k[h>>2]|0,m)|0;j=a+92124|0;f=a+128324|0;while(1){if(!(k[j>>2]|0))break;if(!(ae(d)|0))break;if((k[f>>2]|0)!=3)break;Xg(g,d,k[h>>2]|0,m)|0;Vd(d)}a=a+170368|0;Zd(d,k[a>>2]|0,k[a+4>>2]|0,0)}while(0);if((n|0)==4){g=a+92120|0;if(((i[a+170389>>0]|0)!=0?(k[a+128324>>2]|0)==2:0)?(i[a+143281>>0]|0)!=0:0){if(!(ch(g,0,0,76)|0)){a=15;r=p;return a|0}a=a+170368|0;Zd(g,k[a>>2]|0,k[a+4>>2]|0,0);a=0;r=p;return a|0}Vd(g)}a=k[o>>2]|0;r=p;return a|0}function Gi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Fi(a,b,0,0,c,d)|0}function Hi(a,b,c){a=a|0;b=b|0;c=c|0;k[a+75184>>2]=b;k[a+75180>>2]=c;return}function Ii(a,b){a=a|0;b=b|0;var c=0,d=0;c=r;r=r+512|0;d=c;Xc(b,0,d,128)|0;Yf(a+40996|0,d);_f(d,512);r=c;return}function Ji(){return 6}function Ki(a){a=a|0;var b=0;Vg(a+178656|0);Rd(a+92120|0);b=k[a+92024>>2]|0;if(b)ym(b);b=k[a+91932>>2]|0;if(b)ym(b);b=k[a+91840>>2]|0;if(b)ym(b);b=k[a+91748>>2]|0;if(b)ym(b);b=k[a+91656>>2]|0;if(!b){yf(a);return}ym(b);yf(a);return}function Li(a){a=a|0;var b=0,c=0;He(a+24|0);b=a+6424|0;k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;b=a+16|0;k[b>>2]=0;k[a>>2]=0;i[a+4>>0]=0;k[a+8>>2]=0;k[a+12>>2]=0;c=zk(65536)|0;k[b>>2]=c;k[a+20>>2]=0;i[a+6376>>0]=0;return}function Mi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=a+8|0;if((b|0)!=0?(d=k[g>>2]|0,(d|0)!=0):0)do{f=d;d=k[d+16>>2]|0;e=k[f>>2]|0;if(e)Bk(e);Ak(f)}while((d|0)!=0);k[a>>2]=b;i[a+4>>0]=c&1;k[g>>2]=0;k[a+12>>2]=0;d=a+16|0;if(k[d>>2]|0){c=a+20|0;k[c>>2]=0;a=a+6376|0;i[a>>0]=0;return}c=zk(65536)|0;k[d>>2]=c;c=a+20|0;k[c>>2]=0;a=a+6376|0;i[a>>0]=0;return}function Ni(a){a=a|0;var b=0,c=0,d=0;b=k[a+8>>2]|0;if(b)do{d=b;b=k[b+16>>2]|0;c=k[d>>2]|0;if(c)Bk(c);Ak(d)}while((b|0)!=0);b=k[a+16>>2]|0;if(b)Bk(b);b=k[a+6424>>2]|0;if(!b){d=a+24|0;Ie(d);return}ym(b);d=a+24|0;Ie(d);return}function Oi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;e=a+6376|0;do if(!(i[e>>0]|0)){f=k[a>>2]|0;f=nc[k[(k[f>>2]|0)+20>>2]&15](f)|0;d=a+6448|0;k[d>>2]=f;k[d+4>>2]=O;i[a+6456>>0]=0;d=k[a>>2]|0;f=nc[k[(k[d>>2]|0)+20>>2]&15](d)|0;g=O;j=k[a>>2]|0;sc[k[(k[j>>2]|0)+16>>2]&15](j,b,c,0);if(((ae(k[a>>2]|0)|0)!=0?(h=k[a>>2]|0,(k[h+36204>>2]|0)==3):0)?(hk(h+60080|0,53088)|0)==0:0){j=k[a>>2]|0;b=j+78248|0;h=k[b+4>>2]|0;c=a+6384|0;k[c>>2]=k[b>>2];k[c+4>>2]=h;j=nc[k[(k[j>>2]|0)+20>>2]&15](j)|0;c=a+6392|0;k[c>>2]=j;k[c+4>>2]=O;c=(k[a>>2]|0)+68320|0;j=k[c+4>>2]|0;h=a+6400|0;k[h>>2]=k[c>>2];k[h+4>>2]=j;i[e>>0]=1;sc[k[(k[d>>2]|0)+16>>2]&15](d,f,g,0);break}sc[k[(k[d>>2]|0)+16>>2]&15](d,f,g,0);return}while(0);b=k[a>>2]|0;do if(i[b+68379>>0]|0){c=k[b+36172>>2]|0;if(!(i[c+41508>>0]|0))return;else{Ke(a+24|0,0,5,c+40996|0,b+68385|0,b+68401|0,k[b+68460>>2]|0,b+68427|0,b+68418|0)|0;break}}while(0);c=a+6408|0;b=a+6424|0;k[c+0>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;k[c+12>>2]=0;c=k[b>>2]|0;if(c){ym(c);k[b>>2]=0}k[a+6428>>2]=0;k[a+6432>>2]=0;h=a+6440|0;k[h>>2]=0;k[h+4>>2]=0;Pi(a)|0;return}function Pi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;e=k[a>>2]|0;h=nc[k[(k[e>>2]|0)+20>>2]&15](e)|0;j=O;d=k[a>>2]|0;l=a+6392|0;f=a+6408|0;g=f;l=Vm(k[g>>2]|0,k[g+4>>2]|0,k[l>>2]|0,k[l+4>>2]|0)|0;sd(d,l,O,0);l=a+6400|0;d=f;d=Um(k[l>>2]|0,k[l+4>>2]|0,k[d>>2]|0,k[d+4>>2]|0)|0;l=O;g=a+6416|0;c=k[g>>2]|0;b=65536-c|0;b=l>>>0<0|(l|0)==0&d>>>0>>0?d:b;d=k[a>>2]|0;b=(i[d+68379>>0]|0)==0?b:b&-16;if(!b){a=0;f=k[e>>2]|0;f=f+16|0;f=k[f>>2]|0;sc[f&15](e,h,j,0);return a|0}l=a+16|0;b=rd(d,(k[l>>2]|0)+c|0,b)|0;if((b|0)<1){a=0;f=k[e>>2]|0;f=f+16|0;f=k[f>>2]|0;sc[f&15](e,h,j,0);return a|0}if(i[(k[a>>2]|0)+68379>>0]|0)Je(a+24|0,(k[l>>2]|0)+(k[g>>2]|0)|0,b&-16);l=f;l=Vm(k[l>>2]|0,k[l+4>>2]|0,b|0,((b|0)<0)<<31>>31|0)|0;a=f;k[a>>2]=l;k[a+4>>2]=O;k[g>>2]=(k[g>>2]|0)+b;a=b;f=k[e>>2]|0;f=f+16|0;f=k[f>>2]|0;sc[f&15](e,h,j,0);return a|0}function Qi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;l=a+6376|0;if(!(i[l>>0]|0)){d=0;return d|0}e=a+6440|0;g=a+6428|0;m=a+6448|0;do{f=e;f=Vm(k[g>>2]|0,0,k[f>>2]|0,k[f+4>>2]|0)|0;n=O;j=m;h=k[j+4>>2]|0;if(n>>>0>h>>>0|((n|0)==(h|0)?f>>>0>(k[j>>2]|0)>>>0:0))break}while(Ri(a)|0);if(!(i[l>>0]|0)){if(!(i[a+6456>>0]|0)){n=0;return n|0}n=m;sd(k[a>>2]|0,k[n>>2]|0,k[n+4>>2]|0,0);n=0;return n|0}j=m;h=k[j>>2]|0;j=k[j+4>>2]|0;f=e;e=k[f>>2]|0;f=k[f+4>>2]|0;if(!(j>>>0>>0|(j|0)==(f|0)&h>>>0>>0)?(o=Vm(h|0,j|0,c|0,0)|0,p=O,n=Vm(k[g>>2]|0,0,e|0,f|0)|0,g=O,!(p>>>0>g>>>0|(p|0)==(g|0)&o>>>0>n>>>0)):0){o=Um(h|0,j|0,e|0,f|0)|0;_m(b|0,(k[a+6424>>2]|0)+o|0,c|0)|0;k[d>>2]=c;o=m;o=Vm(k[o>>2]|0,k[o+4>>2]|0,c|0,0)|0;p=m;k[p>>2]=o;k[p+4>>2]=O;i[a+6456>>0]=1;p=1;return p|0}e=a+6456|0;if(i[e>>0]|0){sd(k[a>>2]|0,h,j,0);i[e>>0]=0}e=rd(k[a>>2]|0,b,c)|0;if((e|0)<0){i[l>>0]=0;p=0;return p|0}else{k[d>>2]=e;o=m;o=Vm(k[o>>2]|0,k[o+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;p=m;k[p>>2]=o;k[p+4>>2]=O;p=1;return p|0}return 0}function Ri(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0;m=r;r=r+48|0;d=m;l=m+8|0;Qe(l,0);if(Ui(a,l)|0){Xe(l)|0;f=Xe(l)|0;g=O;h=Xe(l)|0;i=a+6424|0;j=a+6432|0;c=k[j>>2]|0;e=a+6428|0;k[e>>2]=h;if(c>>>0>>0){b=k[a+6436>>2]|0;if((b|0)!=0&h>>>0>b>>>0){k[d>>2]=b;Jf(32944,53104,d);Af(32944);c=k[j>>2]|0;b=k[e>>2]|0}else b=h;c=c+32+(c>>>2)|0;b=b>>>0>c>>>0?b:c;c=zm(k[i>>2]|0,b)|0;if(!c)Af(32944);k[i>>2]=c;k[j>>2]=b}Ze(l,k[i>>2]|0,h)|0;h=a+6384|0;h=Um(k[h>>2]|0,k[h+4>>2]|0,f|0,g|0)|0;c=a+6440|0;k[c>>2]=h;k[c+4>>2]=O;c=1}else c=0;b=k[l>>2]|0;if(!b){r=m;return c|0}ym(b);r=m;return c|0}function Si(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;if(!(i[a+6376>>0]|0)){a=0;return a|0}if((d|0)==1)f=7;else if(!d){e=a+6448|0;g=e;h=k[g+4>>2]|0;if(h>>>0>c>>>0|((h|0)==(c|0)?(k[g>>2]|0)>>>0>b>>>0:0)?(g=a+6440|0,h=k[g+4>>2]|0,h>>>0>c>>>0|((h|0)==(c|0)?(k[g>>2]|0)>>>0>b>>>0:0)):0){g=a+6384|0;Oi(a,k[g>>2]|0,k[g+4>>2]|0)}g=e;k[g>>2]=b;k[g+4>>2]=c;if((d|0)==1)f=7}if((f|0)==7){g=a+6448|0;d=g;d=Vm(k[d>>2]|0,k[d+4>>2]|0,b|0,c|0)|0;k[g>>2]=d;k[g+4>>2]=O;i[a+6456>>0]=1;g=1;return g|0}e=a+6456|0;i[e>>0]=1;if((d|0)!=2){g=1;return g|0}sd(k[a>>2]|0,b,c,2);d=vd(k[a>>2]|0)|0;g=a+6448|0;k[g>>2]=d;k[g+4>>2]=O;i[e>>0]=0;g=1;return g|0}function Ti(a,b){a=a|0;b=b|0;var c=0,d=0;if(!(i[a+6376>>0]|0)){a=0;return a|0}d=a+6448|0;c=k[d+4>>2]|0;a=b;k[a>>2]=k[d>>2];k[a+4>>2]=c;a=1;return a|0}function Ui(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;h=a+6420|0;c=k[h>>2]|0;j=a+6416|0;if((65536-c|0)>>>0<256){g=(k[j>>2]|0)-c|0;e=k[a+16>>2]|0;_m(e|0,e+c|0,g|0)|0;k[h>>2]=0;k[j>>2]=g;Pi(a)|0;c=k[h>>2]|0}if((c+7|0)>>>0>(k[j>>2]|0)>>>0){j=0;return j|0}g=a+16|0;Se(b,(k[g>>2]|0)+c|0,7);k[h>>2]=(k[h>>2]|0)+7;e=Ve(b)|0;c=Ye(b,4)|0;f=Xe(b)|0;d=c+-3+f|0;if((d|0)<0|(c|0)==0|(f|0)==0&(O|0)==0){i[a+6376>>0]=0;j=0;return j|0}c=k[h>>2]|0;f=(k[j>>2]|0)-c|0;a:do if((d|0)>0){while(1){l=f>>>0>>0?f:d;Se(b,(k[g>>2]|0)+c|0,l);k[h>>2]=(k[h>>2]|0)+l;d=d-l|0;if((d|0)<=0)break a;k[h>>2]=0;k[j>>2]=0;if(!(Pi(a)|0)){c=0;break}c=k[h>>2]|0}return c|0}while(0);l=(e|0)==($e(b)|0);return l|0}function Vi(){var a=0;a=yk(156)|0;Ym(a|0,0,156)|0;return a|0}function Wi(a){a=a|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Xi(a,b){a=a|0;b=b|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function Yi(a){a=a|0;a=a+4|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Zi(a,b){a=a|0;b=b|0;a=a+4|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function _i(a){a=a|0;a=a+8|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function $i(a,b){a=a|0;b=b|0;a=a+8|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function aj(a){a=a|0;a=a+12|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function bj(a){a=a|0;a=a+16|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function cj(a,b){a=a|0;b=b|0;a=a+16|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function dj(a){a=a|0;a=a+20|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function ej(a,b){a=a|0;b=b|0;a=a+20|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function fj(a){a=a|0;a=a+24|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function gj(a){a=a|0;a=a+28|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function hj(a){a=a|0;a=a+32|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function ij(a){a=a|0;a=a+36|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function jj(a,b){a=a|0;b=b|0;a=a+36|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function kj(a){a=a|0;a=a+40|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function lj(a,b){a=a|0;b=b|0;a=a+40|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function mj(a,b){a=a|0;b=b|0;a=a+(b<<2)+44|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function nj(a,b,c){a=a|0;b=b|0;c=c|0;a=a+(b<<2)+44|0;i[a>>0]=c;i[a+1>>0]=c>>8;i[a+2>>0]=c>>16;i[a+3>>0]=c>>24;return}function oj(a){a=a|0;if(!a)return;Ak(a);return}function pj(){var a=0;a=yk(14396)|0;Ym(a|0,0,14396)|0;return a|0}function qj(a,b){a=a|0;b=b|0;return i[a+b>>0]|0}function rj(a,b){a=a|0;b=b|0;a=a+(b<<2)+1024|0;return (l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24)&65535|0}function sj(a,b){a=a|0;b=b|0;return i[a+b+5120>>0]|0}function tj(a,b){a=a|0;b=b|0;a=a+(b<<2)+6144|0;return (l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24)&65535|0}function uj(a){a=a|0;a=a+10240|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function vj(a){a=a|0;a=a+10244|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function wj(a){a=a|0;a=a+10248|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function xj(a){a=a|0;a=a+10252|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function yj(a){a=a|0;a=a+10256|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function zj(a){a=a|0;a=a+10260|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Aj(a){a=a|0;a=a+10264|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Bj(a){a=a|0;a=a+10268|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Cj(a){a=a|0;a=a+10272|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Dj(a){a=a|0;a=a+10276|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Ej(a){a=a|0;a=a+10280|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Fj(a){a=a|0;a=a+10284|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Gj(a,b){a=a|0;b=b|0;a=a+10284|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function Hj(a){a=a|0;a=a+10288|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Ij(a,b){a=a|0;b=b|0;a=a+10288|0;i[a>>0]=b;i[a+1>>0]=b>>8;i[a+2>>0]=b>>16;i[a+3>>0]=b>>24;return}function Jj(a){a=a|0;a=a+10292|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Kj(a){a=a|0;a=a+10296|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Lj(a){a=a|0;a=a+10300|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Mj(a){a=a|0;a=a+10304|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Nj(a,b){a=a|0;b=b|0;return i[a+b+10308>>0]|0}function Oj(a,b){a=a|0;b=b|0;a=a+(b<<2)+10340|0;return l[a>>0]|l[a+1>>0]<<8|l[a+2>>0]<<16|l[a+3>>0]<<24|0}function Pj(a,b,c){a=a|0;b=b|0;c=c|0;a=a+(b<<2)+10340|0;i[a>>0]=c;i[a+1>>0]=c>>8;i[a+2>>0]=c>>16;i[a+3>>0]=c>>24;return}function Qj(a){a=a|0;if(!a)return;Ak(a);return}function Rj(a){a=a|0;if(!a)return;Ak(a);return}function Sj(a){a=a|0;if(a>>>0<131072){a=(l[53280+((l[53280+(a>>>8)>>0]|0)<<5|a>>>3&31)>>0]|0)>>>(a&7)&1;return a|0}else{a=a>>>0<196606&1;return a|0}return 0}function Tj(a){a=a|0;return (a+-48|0)>>>0<10|0}function Uj(a){a=a|0;return tk(a,0)|0}function Vj(a){a=a|0;return tk(a,1)|0}function Wj(a){a=a|0;return (a>>>0<128?a:-1)|0}function Xj(a,b,c){a=a|0;b=b|0;c=c|0;return Yj(0,a,b,(c|0)!=0?c:57208)|0}function Yj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;h=r;r=r+16|0;e=h;k[e>>2]=a;g=(d|0)==0?57216:d;d=k[g>>2]|0;a:do if(!b){if(!d){c=0;r=h;return c|0}}else{if(!a){k[e>>2]=e;a=e}if(!c){c=-2;r=h;return c|0}do if(!d){d=i[b>>0]|0;e=d&255;if(d<<24>>24>-1){k[a>>2]=e;c=d<<24>>24!=0&1;r=h;return c|0}else{d=e+-194|0;if(d>>>0>50)break a;e=c+-1|0;d=k[57e3+(d<<2)>>2]|0;b=b+1|0;break}}else e=c;while(0);b:do if(e){f=i[b>>0]|0;j=(f&255)>>>3;if((j+-16|j+(d>>26))>>>0>7)break a;while(1){b=b+1|0;d=(f&255)+-128|d<<6;e=e+-1|0;if((d|0)>=0)break;if(!e)break b;f=i[b>>0]|0;if((f&-64)<<24>>24!=-128)break a}k[g>>2]=0;k[a>>2]=d;c=c-e|0;r=h;return c|0}while(0);k[g>>2]=d;c=-2;r=h;return c|0}while(0);k[g>>2]=0;c=ac()|0;k[c>>2]=84;c=-1;r=h;return c|0}function Zj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=k[b>>2]|0;if((d|0)!=0?(f=k[d>>2]|0,(f|0)!=0):0)if(!a){d=c;g=e;j=16}else{k[d>>2]=0;d=c;g=f;h=e;j=36}else if(!a){d=c;j=7}else{d=c;j=6}a:while(1)if((j|0)==6){if(!d){j=26;break}while(1){f=i[e>>0]|0;b:do if(((f&255)+-1|0)>>>0<127?(e&3|0)==0&d>>>0>4:0){while(1){f=k[e>>2]|0;if((f+-16843009|f)&-2139062144){f=f&255;break b}k[a>>2]=f&255;k[a+4>>2]=l[e+1>>0];k[a+8>>2]=l[e+2>>0];f=e+4|0;g=a+16|0;k[a+12>>2]=l[e+3>>0];d=d+-4|0;if(d>>>0>4){a=g;e=f}else{e=f;a=g;break}}f=i[e>>0]|0}while(0);f=f&255;if((f+-1|0)>>>0>=127)break;e=e+1|0;k[a>>2]=f;d=d+-1|0;if(!d){j=26;break a}else a=a+4|0}f=f+-194|0;if(f>>>0>50){j=47;break}g=k[57e3+(f<<2)>>2]|0;h=e+1|0;j=36;continue}else if((j|0)==7){f=i[e>>0]|0;if(((f&255)+-1|0)>>>0<127?(e&3|0)==0:0){f=k[e>>2]|0;if(!((f+-16843009|f)&-2139062144))do{e=e+4|0;d=d+-4|0;f=k[e>>2]|0}while(((f+-16843009|f)&-2139062144|0)==0);f=f&255}f=f&255;if((f+-1|0)>>>0<127){d=d+-1|0;e=e+1|0;j=7;continue}f=f+-194|0;if(f>>>0>50){j=47;break}f=k[57e3+(f<<2)>>2]|0;g=e+1|0;j=16;continue}else if((j|0)==16){j=(l[g>>0]|0)>>>3;if((j+-16|j+(f>>26))>>>0>7){j=17;break}e=g+1|0;if(f&33554432){if((i[e>>0]&-64)<<24>>24!=-128){j=20;break}e=g+2|0;if(f&524288){if((i[e>>0]&-64)<<24>>24!=-128){j=23;break}e=g+3|0}}d=d+-1|0;j=7;continue}else if((j|0)==36){f=l[h>>0]|0;j=f>>>3;if((j+-16|j+(g>>26))>>>0>7){j=37;break}e=h+1|0;g=f+-128|g<<6;if((g|0)<0){f=l[e>>0]|0;if((f&192|0)!=128){j=40;break}e=h+2|0;f=f+-128|g<<6;if((f|0)<0){e=l[e>>0]|0;if((e&192|0)!=128){j=43;break}f=e+-128|f<<6;e=h+3|0}}else f=g;k[a>>2]=f;a=a+4|0;d=d+-1|0;j=6;continue}if((j|0)==17){e=g+-1|0;j=46}else if((j|0)==20){e=g+-1|0;j=46}else if((j|0)==23){e=g+-1|0;j=46}else if((j|0)==26){k[b>>2]=e;j=c;return j|0}else if((j|0)==37){f=g;e=h+-1|0;j=46}else if((j|0)==40){f=g;e=h+-1|0;j=46}else if((j|0)==43){e=h+-1|0;j=46}if((j|0)==46)if(!f)j=47;if((j|0)==47)if(!(i[e>>0]|0)){if(a){k[a>>2]=0;k[b>>2]=0}j=c-d|0;return j|0}j=ac()|0;k[j>>2]=84;if(!a){j=-1;return j|0}k[b>>2]=e;j=-1;return j|0}function _j(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=r;r=r+16|0;e=d;k[e>>2]=b;a=Zj(a,e,c,0)|0;r=d;return a|0}function $j(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+16|0;d=g;k[d>>2]=a;if(!b){b=0;r=g;return b|0}do if(c){if(!a){k[d>>2]=d;f=d}else f=a;d=i[b>>0]|0;a=d&255;if(d<<24>>24>-1){k[f>>2]=a;b=d<<24>>24!=0&1;r=g;return b|0}d=a+-194|0;if(d>>>0<=50){a=b+1|0;e=k[57e3+(d<<2)>>2]|0;if(c>>>0<4?(e&-2147483648>>>((c*6|0)+-6|0)|0)!=0:0)break;d=l[a>>0]|0;c=d>>>3;if((c+-16|c+(e>>26))>>>0<=7){d=d+-128|e<<6;if((d|0)>=0){k[f>>2]=d;b=2;r=g;return b|0}a=l[b+2>>0]|0;if((a&192|0)==128){a=a+-128|d<<6;if((a|0)>=0){k[f>>2]=a;b=3;r=g;return b|0}d=l[b+3>>0]|0;if((d&192|0)==128){k[f>>2]=d+-128|a<<6;b=4;r=g;return b|0}}}}}while(0);b=ac()|0;k[b>>2]=84;b=-1;r=g;return b|0}function ak(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+16|0;m=n;if(!a){e=k[b>>2]|0;d=k[e>>2]|0;if(!d){b=0;r=n;return b|0}else f=0;while(1){if(d>>>0>127){d=Fm(m,d,0)|0;if((d|0)==-1){l=-1;g=26;break}}else d=1;f=d+f|0;e=e+4|0;d=k[e>>2]|0;if(!d){l=f;g=26;break}}if((g|0)==26){r=n;return l|0}}a:do if(c>>>0>3){d=c;f=k[b>>2]|0;while(1){e=k[f>>2]|0;if((e+-1|0)>>>0>126){if(!e){h=a;j=d;break}e=Fm(a,e,0)|0;if((e|0)==-1){l=-1;g=26;break}a=a+e|0;d=d-e|0}else{i[a>>0]=e;a=a+1|0;d=d+-1|0;f=k[b>>2]|0}f=f+4|0;k[b>>2]=f;if(d>>>0<=3)break a}if((g|0)==26){r=n;return l|0}i[h>>0]=0;k[b>>2]=0;b=c-j|0;r=n;return b|0}else d=c;while(0);if(!d){b=c;r=n;return b|0}e=k[b>>2]|0;while(1){f=k[e>>2]|0;if((f+-1|0)>>>0>126){if(!f){o=a;p=d;g=19;break}f=Fm(m,f,0)|0;if((f|0)==-1){l=-1;g=26;break}if(d>>>0>>0){q=d;g=22;break}Fm(a,k[e>>2]|0,0)|0;a=a+f|0;d=d-f|0}else{i[a>>0]=f;a=a+1|0;d=d+-1|0;e=k[b>>2]|0}e=e+4|0;k[b>>2]=e;if(!d){l=c;g=26;break}}if((g|0)==19){i[o>>0]=0;k[b>>2]=0;b=c-p|0;r=n;return b|0}else if((g|0)==22){b=c-q|0;r=n;return b|0}else if((g|0)==26){r=n;return l|0}return 0}function bk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;a=dk(a,b,c,f)|0;r=e;return a|0}function ck(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=r;r=r+128|0;d=h+112|0;f=h+72|0;e=h;g=f+0|0;i=g+36|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(i|0));k[d>>2]=k[c>>2];if((uk(0,b,d,e,f)|0)<0){g=-1;r=h;return g|0}else{g=uk(a,b,d,e,f)|0;r=h;return g|0}return 0}function dk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=r;e=k[14442]|0;if(!e){e=ib(57776,57816)|0;k[14442]=e}d=ck(e,c,d)|0;Na(k[14442]|0);c=r;r=r+((1*(d+1|0)|0)+15&-16)|0;Aa(c|0,1,d|0,k[14442]|0)|0;Na(k[14442]|0);i[c+d>>0]=0;a=_j(a,c,b)|0;r=f;return (a>>>0>=b>>>0?-1:a)|0}function ek(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=r;r=r+16|0;e=f;a:do if(a>>>0>=128){c=Em(e,a)|0;if((c|0)>=0){if((c|0)>0){d=0;do{if((dc(i[e+d>>0]|0,b|0)|0)==-1){a=-1;break a}d=d+1|0}while((d|0)<(c|0))}}else a=-1}else a=dc(a|0,b|0)|0;while(0);r=f;return a|0}function fk(a,b){a=a|0;b=b|0;ik(a+((kk(a)|0)<<2)|0,b)|0;return a|0}function gk(a,b){a=a|0;b=b|0;var c=0;if(!b){b=a+((kk(a)|0)<<2)|0;return b|0}else c=a;while(1){a=k[c>>2]|0;if((a|0)==0|(a|0)==(b|0))break;else c=c+4|0}b=(a|0)!=0?c:0;return b|0}function hk(a,b){a=a|0;b=b|0;var c=0,d=0;c=k[a>>2]|0;d=k[b>>2]|0;if((c|0)!=(d|0)|(c|0)==0|(d|0)==0){a=c;b=d;b=a-b|0;return b|0}do{a=a+4|0;b=b+4|0;d=k[a>>2]|0;c=k[b>>2]|0}while(!((d|0)!=(c|0)|(d|0)==0|(c|0)==0));b=d-c|0;return b|0}function ik(a,b){a=a|0;b=b|0;var c=0,d=0;c=a;while(1){d=k[b>>2]|0;k[c>>2]=d;if(!d)break;else{c=c+4|0;b=b+4|0}}return a|0}function jk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=k[b>>2]|0;if(!c){a=kk(a)|0;return a|0}if(!(k[b+4>>2]|0)){c=gk(a,c)|0;if(!c){a=kk(a)|0;return a|0}else{a=c-a>>2;return a|0}}else{c=k[a>>2]|0;a:do if(!c)c=a;else{e=a;d=c;while(1){c=e+4|0;if(gk(b,d)|0){c=e;break a}d=k[c>>2]|0;if(!d)break;else e=c}}while(0);a=c-a>>2;return a|0}return 0}function kk(a){a=a|0;var b=0;b=a;while(1)if(!(k[b>>2]|0))break;else b=b+4|0;return b-a>>2|0}function lk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=a+((kk(a)|0)<<2)|0;a:do if(c){e=d;while(1){f=k[b>>2]|0;if(!f){d=e;break a}c=c+-1|0;d=e+4|0;k[e>>2]=f;if(!c)break;else{b=b+4|0;e=d}}}while(0);k[d>>2]=0;return a|0}function mk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(!c){f=0;return f|0}else{e=c;d=b}while(1){b=k[a>>2]|0;c=k[d>>2]|0;if((b|0)!=(c|0)|(b|0)==0|(c|0)==0)break;e=e+-1|0;if(!e){c=0;f=5;break}else{d=d+4|0;a=a+4|0}}if((f|0)==5)return c|0;f=b-c|0;return f|0}function nk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;a:do if(!c){b=a;c=0}else{d=b;e=a;while(1){f=k[d>>2]|0;if(!f){b=e;break a}c=c+-1|0;b=e+4|0;k[e>>2]=f;if(!c){c=0;break}else{d=d+4|0;e=b}}}while(0);sk(b,0,c)|0;return a|0}function ok(a,b){a=a|0;b=b|0;a=a+((jk(a,b)|0)<<2)|0;return ((k[a>>2]|0)!=0?a:0)|0}function pk(a,b){a=a|0;b=b|0;var c=0;c=kk(a)|0;a:do if((c|0)>-1){c=a+(c<<2)|0;while(1){if((k[c>>2]|0)==(b|0))break a;c=c+-4|0;if(c>>>0>>0){c=0;break}}}else c=0;while(0);return c|0}function qk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=k[a>>2]|0;a:do if(!c)c=a;else{e=a;d=c;while(1){c=e+4|0;if(!(gk(b,d)|0)){c=e;break a}d=k[c>>2]|0;if(!d)break;else e=c}}while(0);return c-a>>2|0}function rk(a,b,c){a=a|0;b=b|0;c=c|0;a:do if(!c)a=0;else while(1){if((k[a>>2]|0)==(b|0))break a;c=c+-1|0;if(!c){a=0;break}else a=a+4|0}while(0);return a|0}function sk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(!c)return a|0;else d=a;while(1){c=c+-1|0;k[d>>2]=b;if(!c)break;else d=d+4|0}return a|0}function tk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,k=0;h=(b<<1)+-1|0;g=b+-1|0;if((Sj(a)|0)==0|(a+-1536|0)>>>0<2560|(a+-11776|0)>>>0<30784|(a+-43008|0)>>>0<22272){k=a;return k|0}c=(b|0)!=0;if(c&(a+-4256|0)>>>0<46){if((a|0)>4293?!((a|0)==4295|(a|0)==4301):0){k=a;return k|0}k=a+7264|0;return k|0}if((a+-11520|0)>>>0<38&(c^1)){if((a|0)>11557?!((a|0)==11559|(a|0)==11565):0){k=a;return k|0}k=a+-7264|0;return k|0}else f=0;do{e=i[56258+(f<<2)>>0]|0;d=e<<24>>24;c=a-(m[56256+(f<<2)>>1]|0)|0;if((c-(d&g)|0)>>>0<(l[56259+(f<<2)>>0]|0)>>>0){k=13;break}f=f+1|0}while((f|0)!=61);if((k|0)==13)if(e<<24>>24==1){k=b+a-(c&1)|0;return k|0}else{k=(ka(d,h)|0)+a|0;return k|0}e=1-b|0;c=j[56504+(e<<1)>>1]|0;a:do if(c<<16>>16){d=c;c=0;while(1){if((d&65535|0)==(a|0))break;c=c+1|0;d=j[56504+(c<<2)+(e<<1)>>1]|0;if(!(d<<16>>16))break a}k=m[56504+(c<<2)+(b<<1)>>1]|0;return k|0}while(0);if((a+-66600+(b*40|0)|0)>>>0>=40){k=a;return k|0}k=a+-40+(b*80|0)|0;return k|0}function uk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,q=0,s=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0.0;Q=r;r=r+48|0;L=Q;I=Q+32|0;M=Q+28|0;A=(a|0)!=0;x=0;y=0;f=0;h=0;l=0;a:while(1){do if((f|0)>-1){if((h|0)<=(2147483647-f|0)){z=h+f|0;break}if(!(k[a>>2]&32)){z=ac()|0;k[z>>2]=75;z=-1}else z=-1}else z=f;while(0);f=k[b>>2]|0;if(!f){J=z;K=l;N=97;break}else h=b;while(1){if((f|0)==37|(f|0)==0)break;w=h+4|0;f=k[w>>2]|0;h=w}w=(qk(h,57224)|0)>>>1;m=w<<1;g=h+(m<<2)|0;w=h+(w<<2)-b>>2;if(A){if(w){f=w;while(1){f=f+-1|0;ek(k[b>>2]|0,a)|0;if(!f){N=13;break}else b=b+4|0}}}else N=13;if((N|0)==13?(N=0,(w|0)!=0):0){f=z;b=g;h=w;continue}b=h+((m|1)<<2)|0;if((Tj(k[b>>2]|0)|0)!=0?(k[h+(m+2<<2)>>2]|0)==36:0){u=(k[b>>2]|0)+-48|0;l=1;h=h+(m+3<<2)|0}else{u=-1;h=b}b=k[h>>2]|0;b:do if((b&-32|0)==32){g=0;while(1){f=1<>2]|0;if((b&-32|0)==32)g=f;else break}}else f=0;while(0);do if((b|0)==42){b=h+4|0;if((Tj(k[b>>2]|0)|0)!=0?(k[h+8>>2]|0)==36:0){k[e+((k[b>>2]|0)+-48<<2)>>2]=10;g=1;h=h+12|0;b=k[d+((k[b>>2]|0)+-48<<3)>>2]|0}else{if(l){O=-1;N=115;break a}if(!A){s=f;h=b;v=0;q=0;break}g=k[c>>2]|0;v=k[g>>2]|0;k[c>>2]=g+4;g=0;h=b;b=v}if((b|0)<0){s=f|8192;v=g;q=0-b|0}else{s=f;v=g;q=b}}else if(Tj(b)|0){b=0;do{b=(b*10|0)+-48+(k[h>>2]|0)|0;h=h+4|0}while((Tj(k[h>>2]|0)|0)!=0);if((b|0)<0){O=-1;N=115;break a}else{s=f;v=l;q=b}}else{s=f;v=l;q=0}while(0);c:do if((k[h>>2]|0)==46){f=h+4|0;b=k[f>>2]|0;if((b|0)!=42){if(!(Tj(b)|0)){h=f;f=0;break}else{b=f;f=0}while(1){f=(f*10|0)+-48+(k[b>>2]|0)|0;h=h+8|0;if(!(Tj(k[h>>2]|0)|0))break c;else{n=b;b=h;h=n}}}f=h+8|0;b=(k[f>>2]|0)+-48|0;if(b>>>0<10?(k[h+12>>2]|0)==36:0){k[e+(b<<2)>>2]=10;h=h+16|0;f=k[d+((k[f>>2]|0)+-48<<3)>>2]|0;break}if(v){O=-1;N=115;break a}if(A){h=k[c>>2]|0;n=k[h>>2]|0;k[c>>2]=h+4;h=f;f=n}else{h=f;f=0}}else f=-1;while(0);l=0;while(1){m=k[h>>2]|0;g=m+-65|0;if(g>>>0>57){O=-1;N=115;break a}b=h+4|0;g=i[57232+(l*58|0)+g>>0]|0;n=g&255;if((n+-1|0)>>>0<8){h=b;l=n}else{o=g;break}}if(!(o<<24>>24)){O=-1;N=115;break}g=(u|0)>-1;d:do if(o<<24>>24==19)if(g){O=-1;N=115;break a}else{E=x;F=y;N=63}else{if(g){k[e+(u<<2)>>2]=n;F=d+(u<<3)|0;E=k[F>>2]|0;F=k[F+4>>2]|0;N=63;break}if(!A){O=0;N=115;break a}if((o&255)>20){B=m;C=x;D=y}else do switch(n|0){case 9:{G=k[c>>2]|0;H=k[G>>2]|0;k[c>>2]=G+4;G=y;N=64;break d}case 10:{G=k[c>>2]|0;H=k[G>>2]|0;k[c>>2]=G+4;G=((H|0)<0)<<31>>31;N=64;break d}case 12:{N=k[c>>2]|0;G=N;H=k[G>>2]|0;G=k[G+4>>2]|0;k[c>>2]=N+8;N=64;break d}case 14:{G=k[c>>2]|0;H=k[G>>2]|0;k[c>>2]=G+4;G=0;H=H&65535;N=64;break d}case 13:{G=k[c>>2]|0;H=k[G>>2]|0;k[c>>2]=G+4;G=(((H&65535)<<16>>16|0)<0)<<31>>31;H=H<<16>>16;N=64;break d}case 15:{G=k[c>>2]|0;H=k[G>>2]|0;k[c>>2]=G+4;G=(((H&255)<<24>>24|0)<0)<<31>>31;H=H<<24>>24;N=64;break d}case 16:{G=k[c>>2]|0;H=k[G>>2]|0;k[c>>2]=G+4;G=0;H=H&255;N=64;break d}case 17:{G=k[c>>2]|0;k[t>>2]=k[G>>2];k[t+4>>2]=k[G+4>>2];R=+p[t>>3];k[c>>2]=G+8;p[t>>3]=R;G=k[t+4>>2]|0;H=k[t>>2]|0;N=64;break d}case 11:{G=k[c>>2]|0;H=k[G>>2]|0;k[c>>2]=G+4;G=0;N=64;break d}case 18:{E=k[c>>2]|0;k[t>>2]=k[E>>2];k[t+4>>2]=k[E+4>>2];R=+p[t>>3];k[c>>2]=E+8;p[t>>3]=R;E=k[t>>2]|0;F=k[t+4>>2]|0;N=63;break d}default:{G=y;H=x;N=64;break d}}while(0)}while(0);if((N|0)==63){N=0;if(A){G=F;H=E;N=64}else{x=E;y=F;f=z;h=w;l=v;continue}}if((N|0)==64){N=0;B=k[h>>2]|0;C=H;D=G}h=(l|0)!=0&(B&15|0)==3?B&-33:B;switch(h|0){case 99:{ek(Wj(C)|0,a)|0;x=C;y=D;f=z;h=1;l=v;continue a}case 115:{n=C;g=(f|0)<0?2147483647:f;if((g|0)>0){l=n;h=0;while(1){f=$j(M,l,4)|0;if((f|0)<=0)break;h=h+1|0;if((h|0)<(g|0))l=l+f|0;else break}if((f|0)<0){O=-1;N=115;break a}else m=h}else m=0;h=(q|0)<(m|0)?m:q;l=(s&8192|0)!=0;if(!l){k[L>>2]=h-m;k[L+4>>2]=60248;ob(a|0,57696,L|0)|0}if(m){f=n;g=m;do{g=g+-1|0;f=f+($j(M,f,4)|0)|0;ek(k[M>>2]|0,a)|0}while((g|0)!=0)}if(!l){x=C;y=D;f=z;l=v;continue a}k[L>>2]=h-m;k[L+4>>2]=60248;ob(a|0,57696,L|0)|0;x=C;y=D;f=z;l=v;continue a}case 110:switch(l|0){case 1:{k[C>>2]=z;x=C;y=D;f=z;h=w;l=v;continue a}case 7:{x=C;k[x>>2]=z;k[x+4>>2]=((z|0)<0)<<31>>31;x=C;y=D;f=z;h=w;l=v;continue a}case 3:{j[C>>1]=z;x=C;y=D;f=z;h=w;l=v;continue a}case 4:{i[C>>0]=z;x=C;y=D;f=z;h=w;l=v;continue a}case 0:{k[C>>2]=z;x=C;y=D;f=z;h=w;l=v;continue a}case 2:{x=C;k[x>>2]=z;k[x+4>>2]=((z|0)<0)<<31>>31;x=C;y=D;f=z;h=w;l=v;continue a}case 6:{k[C>>2]=z;x=C;y=D;f=z;h=w;l=v;continue a}default:{x=C;y=D;f=z;h=w;l=v;continue a}}case 83:{g=C;h=rk(g,0,f)|0;if(h)f=h-C>>2;m=(q|0)<(f|0)?f:q;if(!(s&8192)){k[L>>2]=m-f;k[L+4>>2]=60248;ob(a|0,57696,L|0)|0;if(!f){x=C;y=D;f=z;h=m;l=v;continue a}while(1){f=f+-1|0;ek(k[g>>2]|0,a)|0;if(!f){x=C;y=D;f=z;h=m;l=v;continue a}else g=g+4|0}}if(f){h=f;while(1){h=h+-1|0;ek(k[g>>2]|0,a)|0;if(!h)break;else g=g+4|0}}k[L>>2]=m-f;k[L+4>>2]=60248;ob(a|0,57696,L|0)|0;x=C;y=D;f=z;h=m;l=v;continue a}case 67:{ek(C,a)|0;x=C;y=D;f=z;h=1;l=v;continue a}default:{y=h|32;x=i[57744+(y+-97)>>0]|0;k[L>>2]=57728+(s>>>3&1^1);k[L+4>>2]=58616+(s>>>11&1^1);k[L+8>>2]=58528+(s>>>13&1^1);k[L+12>>2]=58320+(s&1^1);k[L+16>>2]=57736+(s>>>16&1^1);k[L+20>>2]=x;k[L+24>>2]=h;Im(I,16,57704,L)|0;switch(y|0){case 103:case 102:case 101:case 97:{k[t>>2]=C;k[t+4>>2]=D;R=+p[t>>3];k[L>>2]=q;k[L+4>>2]=f;x=L+8|0;p[t>>3]=R;k[x>>2]=k[t>>2];k[x+4>>2]=k[t+4>>2];x=C;y=D;f=z;h=ob(a|0,I|0,L|0)|0;l=v;continue a}case 112:case 120:case 117:case 111:case 105:case 100:{k[L>>2]=q;k[L+4>>2]=f;x=L+8|0;k[x>>2]=C;k[x+4>>2]=D;x=C;y=D;f=z;h=ob(a|0,I|0,L|0)|0;l=v;continue a}default:{x=C;y=D;f=z;h=w;l=v;continue a}}}}}if((N|0)==97){if(a){e=J;r=Q;return e|0}if(!K){e=0;r=Q;return e|0}else g=1;while(1){b=k[e+(g<<2)>>2]|0;if(!b){P=g;break}f=d+(g<<3)|0;e:do if(b>>>0<=20)do switch(b|0){case 15:{M=k[c>>2]|0;L=k[M>>2]|0;k[c>>2]=M+4;L=(L&255)<<24>>24;M=f;k[M>>2]=L;k[M+4>>2]=((L|0)<0)<<31>>31;break e}case 16:{M=k[c>>2]|0;L=k[M>>2]|0;k[c>>2]=M+4;M=f;k[M>>2]=L&255;k[M+4>>2]=0;break e}case 11:{M=k[c>>2]|0;L=k[M>>2]|0;k[c>>2]=M+4;M=f;k[M>>2]=L;k[M+4>>2]=0;break e}case 10:{M=k[c>>2]|0;L=k[M>>2]|0;k[c>>2]=M+4;M=f;k[M>>2]=L;k[M+4>>2]=((L|0)<0)<<31>>31;break e}case 14:{M=k[c>>2]|0;L=k[M>>2]|0;k[c>>2]=M+4;M=f;k[M>>2]=L&65535;k[M+4>>2]=0;break e}case 17:{M=k[c>>2]|0;k[t>>2]=k[M>>2];k[t+4>>2]=k[M+4>>2];R=+p[t>>3];k[c>>2]=M+8;p[f>>3]=R;break e}case 12:{M=k[c>>2]|0;L=M;a=k[L>>2]|0;L=k[L+4>>2]|0;k[c>>2]=M+8;M=f;k[M>>2]=a;k[M+4>>2]=L;break e}case 13:{M=k[c>>2]|0;L=k[M>>2]|0;k[c>>2]=M+4;L=(L&65535)<<16>>16;M=f;k[M>>2]=L;k[M+4>>2]=((L|0)<0)<<31>>31;break e}case 9:{L=k[c>>2]|0;M=k[L>>2]|0;k[c>>2]=L+4;k[f>>2]=M;break e}case 18:{M=k[c>>2]|0;k[t>>2]=k[M>>2];k[t+4>>2]=k[M+4>>2];R=+p[t>>3];k[c>>2]=M+8;p[f>>3]=R;break e}default:break e}while(0);while(0);g=g+1|0;if((g|0)>=10){O=1;N=115;break}}if((N|0)==115){r=Q;return O|0}while(1){if(k[e+(P<<2)>>2]|0){O=-1;N=115;break}P=P+1|0;if((P|0)>=10){O=1;N=115;break}}if((N|0)==115){r=Q;return O|0}}else if((N|0)==115){r=Q;return O|0}return 0}function vk(a,b){a=a|0;b=b|0;var c=0;c=r;r=r+16|0;k[c>>2]=b;b=k[x>>2]|0;vb(b|0,a|0,c|0)|0;dc(10,b|0)|0;Ob()}function wk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;w=r;r=r+4208|0;f=w+4180|0;h=w;u=w+4112|0;v=w+4176|0;if((a|0)!=0?(g=(b|0)!=0,q=(c|0)==0,!(g&q)):0){if(g)p=k[c>>2]|0;else p=0;k[h+4096>>2]=h;k[u>>2]=0;t=u+4|0;k[t>>2]=0;k[u+8>>2]=0;k[u+12>>2]=h;n=u+16|0;k[n>>2]=0;o=u+20|0;k[o>>2]=0;k[u+24>>2]=0;k[u+28>>2]=h;k[u+32>>2]=0;j=u+36|0;k[j>>2]=0;k[u+40>>2]=0;k[u+44>>2]=h;m=u+48|0;l=u+61|0;k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;i[m+12>>0]=0;i[l>>0]=1;m=u+32|0;dl(f,1,0,u+44|0);g=f+8|0;e=k[g>>2]|0;if(e){k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=h}k[g>>2]=e+16;el(m,f);fl(f);f=u+62|0;i[f>>0]=0;i[u+63>>0]=1;k[v>>2]=0;h=a+(Zm(a|0)|0)|0;gl(a,h,u,v);e=k[v>>2]|0;do if(!((e|0)!=0|(i[f>>0]|0)==0)){e=k[m>>2]|0;if((e|0)!=(k[j>>2]|0)?(k[e>>2]|0)!=(k[e+4>>2]|0):0){i[f>>0]=0;i[l>>0]=0;e=k[u>>2]|0;g=k[t>>2]|0;if((g|0)!=(e|0))do{l=g+-24|0;k[t>>2]=l;hl(l);g=k[t>>2]|0}while((g|0)!=(e|0));e=k[n>>2]|0;g=k[o>>2]|0;if((g|0)!=(e|0))do{l=g+-16|0;k[o>>2]=l;il(l);g=k[o>>2]|0}while((g|0)!=(e|0));gl(a,h,u,v);if(!(i[f>>0]|0)){e=k[v>>2]|0;s=19;break}else{k[v>>2]=-2;b=0;break}}else s=20}else s=19;while(0);if((s|0)==19)if(!e)s=20;else b=0;do if((s|0)==20){e=k[t>>2]|0;g=i[e+-24>>0]|0;if(!(g&1))f=(g&255)>>>1;else f=k[e+-20>>2]|0;g=i[e+-12>>0]|0;if(!(g&1))g=(g&255)>>>1;else g=k[e+-8>>2]|0;m=g+f|0;g=m+1|0;if(g>>>0>p>>>0){b=zm(b,g)|0;if(!b){k[v>>2]=-1;b=0;break}if(!q){k[c>>2]=g;s=31}}else s=31;if((s|0)==31)if(!b){b=0;break}h=k[t>>2]|0;e=h+-12|0;g=i[e>>0]|0;if(!(g&1)){f=e+1|0;e=(g&255)>>>1}else{f=k[h+-4>>2]|0;e=k[h+-8>>2]|0}jl(h+-24|0,f,e)|0;e=k[t>>2]|0;f=e+-24|0;if(!(i[f>>0]&1))e=f+1|0;else e=k[e+-16>>2]|0;_m(b|0,e|0,m|0)|0;i[b+m>>0]=0}while(0);if(d)k[d>>2]=k[v>>2];kl(u)}else if(!d)b=0;else{k[d>>2]=-3;b=0}r=w;return b|0}function xk(){var a=0,b=0;a=r;r=r+16|0;if(!(hb(61112,13)|0)){b=Db(k[15276]|0)|0;r=a;return b|0}else vk(61120,a);return 0}function yk(a){a=a|0;var b=0;b=(a|0)==0?1:a;a=xm(b)|0;a:do if(!a){while(1){a=Ik()|0;if(!a)break;oc[a&15]();a=xm(b)|0;if(a)break a}b=xb(4)|0;k[b>>2]=61296;ec(b|0,61344,16)}while(0);return a|0}function zk(a){a=a|0;return yk(a)|0}function Ak(a){a=a|0;ym(a);return}function Bk(a){a=a|0;Ak(a);return}function Ck(a){a=a|0;k[a>>2]=61296;return}function Dk(a){a=a|0;return}function Ek(a){a=a|0;Ak(a);return}function Fk(a){a=a|0;return 61312}function Gk(a){a=a|0;var b=0;b=r;r=r+16|0;oc[a&15]();vk(61360,b)}function Hk(){var a=0,b=0;a=xk()|0;if(((a|0)!=0?(b=k[a>>2]|0,(b|0)!=0):0)?(a=b+48|0,(k[a>>2]&-256|0)==1126902528?(k[a+4>>2]|0)==1129074247:0):0)Gk(k[b+12>>2]|0);b=k[14456]|0;k[14456]=b+0;Gk(b)}function Ik(){var a=0;a=k[15350]|0;k[15350]=a+0;return a|0}function Jk(a){a=a|0;return}function Kk(a){a=a|0;return}function Lk(a){a=a|0;return}function Mk(a){a=a|0;return}function Nk(a){a=a|0;return}function Ok(a){a=a|0;Ak(a);return}function Pk(a){a=a|0;Ak(a);return}function Qk(a){a=a|0;Ak(a);return}function Rk(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function Sk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+64|0;f=g;if((a|0)!=(b|0))if((b|0)!=0?(e=Wk(b,61496,61552,0)|0,(e|0)!=0):0){b=f+0|0;d=b+56|0;do{k[b>>2]=0;b=b+4|0}while((b|0)<(d|0));k[f>>2]=e;k[f+8>>2]=a;k[f+12>>2]=-1;k[f+48>>2]=1;sc[k[(k[e>>2]|0)+28>>2]&15](e,f,k[c>>2]|0,1);if((k[f+24>>2]|0)==1){k[c>>2]=k[f+16>>2];b=1}else b=0}else b=0;else b=1;r=g;return b|0}function Tk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;a=b+16|0;e=k[a>>2]|0;do if(e){if((e|0)!=(c|0)){d=b+36|0;k[d>>2]=(k[d>>2]|0)+1;k[b+24>>2]=2;i[b+54>>0]=1;break}a=b+24|0;if((k[a>>2]|0)==2)k[a>>2]=d}else{k[a>>2]=c;k[b+24>>2]=d;k[b+36>>2]=1}while(0);return}function Uk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((k[b+8>>2]|0)==(a|0))Tk(0,b,c,d);return}function Vk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)==(k[b+8>>2]|0))Tk(0,b,c,d);else{a=k[a+8>>2]|0;sc[k[(k[a>>2]|0)+28>>2]&15](a,b,c,d)}return}function Wk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=r;r=r+64|0;p=q;o=k[a>>2]|0;n=a+(k[o+-8>>2]|0)|0;o=k[o+-4>>2]|0;k[p>>2]=c;k[p+4>>2]=a;k[p+8>>2]=b;k[p+12>>2]=d;e=p+16|0;f=p+20|0;g=p+24|0;h=p+28|0;l=p+32|0;m=p+40|0;d=(o|0)==(c|0);a=e+0|0;b=a+36|0;do{k[a>>2]=0;a=a+4|0}while((a|0)<(b|0));j[e+36>>1]=0;i[e+38>>0]=0;do if(d){k[p+48>>2]=1;qc[k[(k[o>>2]|0)+20>>2]&15](o,p,n,n,1,0);d=(k[g>>2]|0)==1?n:0}else{lc[k[(k[o>>2]|0)+24>>2]&15](o,p,n,1,0);d=k[p+36>>2]|0;if(!d){d=(k[m>>2]|0)==1&(k[h>>2]|0)==1&(k[l>>2]|0)==1?k[f>>2]|0:0;break}else if((d|0)!=1){d=0;break}if((k[g>>2]|0)!=1?!((k[m>>2]|0)==0&(k[h>>2]|0)==1&(k[l>>2]|0)==1):0){d=0;break}d=k[e>>2]|0}while(0);r=q;return d|0}function Xk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;i[b+53>>0]=1;do if((k[b+4>>2]|0)==(d|0)){i[b+52>>0]=1;d=b+16|0;a=k[d>>2]|0;if(!a){k[d>>2]=c;k[b+24>>2]=e;k[b+36>>2]=1;if(!((e|0)==1?(k[b+48>>2]|0)==1:0))break;i[b+54>>0]=1;break}if((a|0)!=(c|0)){c=b+36|0;k[c>>2]=(k[c>>2]|0)+1;i[b+54>>0]=1;break}a=b+24|0;d=k[a>>2]|0;if((d|0)==2){k[a>>2]=e;d=e}if((d|0)==1?(k[b+48>>2]|0)==1:0)i[b+54>>0]=1}while(0);return}function Yk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;a:do if((a|0)==(k[b+8>>2]|0)){if((k[b+4>>2]|0)==(c|0)?(f=b+28|0,(k[f>>2]|0)!=1):0)k[f>>2]=d}else{if((a|0)!=(k[b>>2]|0)){g=k[a+8>>2]|0;lc[k[(k[g>>2]|0)+24>>2]&15](g,b,c,d,e);break}if((k[b+16>>2]|0)!=(c|0)?(g=b+20|0,(k[g>>2]|0)!=(c|0)):0){k[b+32>>2]=d;d=b+44|0;if((k[d>>2]|0)==4)break;f=b+52|0;i[f>>0]=0;j=b+53|0;i[j>>0]=0;a=k[a+8>>2]|0;qc[k[(k[a>>2]|0)+20>>2]&15](a,b,c,c,1,e);if(i[j>>0]|0){if(!(i[f>>0]|0)){f=1;h=13}}else{f=0;h=13}do if((h|0)==13){k[g>>2]=c;g=b+40|0;k[g>>2]=(k[g>>2]|0)+1;if((k[b+36>>2]|0)==1?(k[b+24>>2]|0)==2:0){i[b+54>>0]=1;if(f)break}else h=16;if((h|0)==16?f:0)break;k[d>>2]=4;break a}while(0);k[d>>2]=3;break}if((d|0)==1)k[b+32>>2]=1}while(0);return}function Zk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;do if((k[b+8>>2]|0)==(a|0)){if((k[b+4>>2]|0)==(c|0)?(g=b+28|0,(k[g>>2]|0)!=1):0)k[g>>2]=d}else if((k[b>>2]|0)==(a|0)){if((k[b+16>>2]|0)!=(c|0)?(f=b+20|0,(k[f>>2]|0)!=(c|0)):0){k[b+32>>2]=d;k[f>>2]=c;e=b+40|0;k[e>>2]=(k[e>>2]|0)+1;if((k[b+36>>2]|0)==1?(k[b+24>>2]|0)==2:0)i[b+54>>0]=1;k[b+44>>2]=4;break}if((d|0)==1)k[b+32>>2]=1}while(0);return}function _k(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if((a|0)==(k[b+8>>2]|0))Xk(0,b,c,d,e);else{a=k[a+8>>2]|0;qc[k[(k[a>>2]|0)+20>>2]&15](a,b,c,d,e,f)}return}function $k(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if((k[b+8>>2]|0)==(a|0))Xk(0,b,c,d,e);return}function al(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+16|0;d=e;k[d>>2]=k[c>>2];a=kc[k[(k[a>>2]|0)+16>>2]&31](a,b,d)|0;if(a)k[c>>2]=k[d>>2];r=e;return a&1|0}function bl(a){a=a|0;if(!a)a=0;else a=(Wk(a,61496,61664,0)|0)!=0;return a&1|0}function cl(){var a=0,b=0,c=0,d=0,e=0;d=r;r=r+16|0;e=d;d=d+12|0;a=xk()|0;if((a|0)!=0?(c=k[a>>2]|0,(c|0)!=0):0){a=c+48|0;b=k[a>>2]|0;a=k[a+4>>2]|0;if(!((b&-256|0)==1126902528&(a|0)==1129074247)){k[e>>2]=k[14458];vk(57952,e)}if((b|0)==1126902529&(a|0)==1129074247)a=k[c+44>>2]|0;else a=c+80|0;k[d>>2]=a;c=k[c>>2]|0;a=k[c+4>>2]|0;if(kc[k[(k[61424>>2]|0)+16>>2]&31](61424,c,d)|0){c=k[d>>2]|0;d=k[14458]|0;c=nc[k[(k[c>>2]|0)+8>>2]&15](c)|0;k[e>>2]=d;k[e+4>>2]=a;k[e+8>>2]=c;vk(57856,e)}else{k[e>>2]=k[14458];k[e+4>>2]=a;vk(57904,e)}}vk(57992,e)}function dl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+12|0;k[e>>2]=0;k[a+16>>2]=d;if(!b)d=0;else d=ml(k[d>>2]|0,b<<4)|0;k[a>>2]=d;c=d+(c<<4)|0;k[a+8>>2]=c;k[a+4>>2]=c;k[e>>2]=d+(b<<4);return}function el(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0;d=k[a>>2]|0;f=a+4|0;e=k[f>>2]|0;g=b+4|0;c=k[g>>2]|0;if((e|0)!=(d|0)){do{h=e;e=e+-16|0;l=c+-16|0;k[l>>2]=0;j=c+-12|0;k[j>>2]=0;m=k[h+-4>>2]|0;i=c+-8|0;k[i>>2]=0;k[c+-4>>2]=m;k[l>>2]=k[e>>2];c=h+-12|0;k[j>>2]=k[c>>2];h=h+-8|0;k[i>>2]=k[h>>2];k[h>>2]=0;k[c>>2]=0;k[e>>2]=0;c=(k[g>>2]|0)+-16|0;k[g>>2]=c}while((e|0)!=(d|0));d=k[a>>2]|0}k[a>>2]=c;k[g>>2]=d;j=b+8|0;m=k[f>>2]|0;k[f>>2]=k[j>>2];k[j>>2]=m;j=a+8|0;m=b+12|0;l=k[j>>2]|0;k[j>>2]=k[m>>2];k[m>>2]=l;k[b>>2]=k[g>>2];return}function fl(a){a=a|0;var b=0,c=0,d=0,e=0;c=k[a+4>>2]|0;d=a+8|0;b=k[d>>2]|0;if((b|0)!=(c|0))do{e=b+-16|0;k[d>>2]=e;nl(e);b=k[d>>2]|0}while((b|0)!=(c|0));b=k[a>>2]|0;if(b)ol(k[k[a+16>>2]>>2]|0,b,(k[a+12>>2]|0)-b|0);return}function gl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+48|0;l=o+24|0;m=o;n=o+12|0;a:do if(a>>>0>>0){do if((i[a>>0]|0)!=95){if((ul(a,b,c)|0)!=(b|0)){k[d>>2]=-2;break a}}else{h=b;if((h-a|0)<=3){k[d>>2]=-2;break a}e=i[a+1>>0]|0;if(e<<24>>24==95)f=22;else if(e<<24>>24==90){j=a+2|0;a=pl(j,b,c)|0;if((!((a|0)==(j|0)|(a|0)==(b|0))?(i[a>>0]|0)==46:0)?(g=k[c+4>>2]|0,(k[c>>2]|0)!=(g|0)):0){j=g+-24|0;f=h-a|0;if(f>>>0>4294967279)ql(n);if(f>>>0<11){i[n>>0]=f<<1;h=n+1|0}else{g=f+16&-16;h=xm(g)|0;k[n+8>>2]=h;k[n>>2]=g|1;k[n+4>>2]=f}i[h>>0]=46;e=a+1|0;if((e|0)!=(b|0)){g=a;a=h;while(1){a=a+1|0;i[a>>0]=i[e>>0]|0;g=g+2|0;if((g|0)==(b|0))break;else{p=e;e=g;g=p}}}i[h+f>>0]=0;e=rl(n,0,58232)|0;k[m+0>>2]=k[e+0>>2];k[m+4>>2]=k[e+4>>2];k[m+8>>2]=k[e+8>>2];k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;e=sl(m,58240)|0;k[l+0>>2]=k[e+0>>2];k[l+4>>2]=k[e+4>>2];k[l+8>>2]=k[e+8>>2];k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;e=i[l>>0]|0;if(!(e&1)){a=l+1|0;e=(e&255)>>>1}else{a=k[l+8>>2]|0;e=k[l+4>>2]|0}jl(j,a,e)|0;tl(l);tl(m);tl(n);break}if((a|0)==(b|0))break;k[d>>2]=-2;break a}if(((f|0)==22?(i[a+2>>0]|0)==95:0)?(i[a+3>>0]|0)==90:0){p=a+4|0;g=pl(p,b,c)|0;if((g|0)==(p|0)|(g|0)==(b|0)){k[d>>2]=-2;break a}b:do if((h-g|0)>12){a=0;f=g;while(1){if((i[f>>0]|0)!=(i[60800+a>>0]|0)){e=g;break b}a=a+1|0;e=f+1|0;if((a|0)>=13){a=f;break}else f=e}c:do if((e|0)!=(b|0)){if((i[e>>0]|0)==95){e=a+2|0;if((e|0)==(b|0)){e=g;break b}if(((i[e>>0]|0)+-48|0)>>>0>=10){e=g;break b}e=a+3|0}if((e|0)!=(b|0))while(1){if(((i[e>>0]|0)+-48|0)>>>0>=10)break c;e=e+1|0;if((e|0)==(b|0)){e=b;break}}else e=b}else e=b;while(0);a=k[c+4>>2]|0;if((k[c>>2]|0)!=(a|0))rl(a+-24|0,0,60816)|0;else e=g}else e=g;while(0);if((e|0)==(b|0))break;k[d>>2]=-2;break a}k[d>>2]=-2;break a}while(0);if((k[d>>2]|0)==0?(k[c>>2]|0)==(k[c+4>>2]|0):0)k[d>>2]=-2}else k[d>>2]=-2;while(0);r=o;return}function hl(a){a=a|0;tl(a+12|0);tl(a);return}function il(a){a=a|0;var b=0,c=0,d=0,e=0;b=k[a>>2]|0;if(b){d=a+4|0;c=k[d>>2]|0;if((c|0)!=(b|0)){do{e=c+-24|0;k[d>>2]=e;hl(e);c=k[d>>2]|0}while((c|0)!=(b|0));b=k[a>>2]|0}ol(k[a+12>>2]|0,b,(k[a+8>>2]|0)-b|0)}return}function jl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))e=10;else{d=k[a>>2]|0;e=(d&-2)+-1|0;d=d&255}if(!(d&1))f=(d&255)>>>1;else f=k[a+4>>2]|0;if((e-f|0)>>>0>=c>>>0){if(c){if(!(d&1))e=a+1|0;else e=k[a+8>>2]|0;_m(e+f|0,b|0,c|0)|0;d=f+c|0;if(!(i[a>>0]&1))i[a>>0]=d<<1;else k[a+4>>2]=d;i[e+d>>0]=0}}else vl(a,e,c-e+f|0,f,f,0,c,b);return a|0}function kl(a){a=a|0;wl(a+32|0);nl(a+16|0);il(a);return}function ll(){var a=0;a=r;r=r+16|0;if(!(Jb(61104,27)|0)){r=a;return}else vk(61176,a)}function ml(a,b){a=a|0;b=b|0;var c=0,d=0;c=b+15&-16;d=a+4096|0;b=k[d>>2]|0;if((a+4096-b|0)>>>0>>0)b=xm(c)|0;else k[d>>2]=b+c;return b|0}function nl(a){a=a|0;var b=0,c=0,d=0,e=0;b=k[a>>2]|0;if(b){d=a+4|0;c=k[d>>2]|0;if((c|0)!=(b|0)){do{e=c+-16|0;k[d>>2]=e;il(e);c=k[d>>2]|0}while((c|0)!=(b|0));b=k[a>>2]|0}ol(k[a+12>>2]|0,b,(k[a+8>>2]|0)-b|0)}return}function ol(a,b,c){a=a|0;b=b|0;c=c|0;if(a>>>0<=b>>>0&(a+4096|0)>>>0>=b>>>0){a=a+4096|0;if((b+(c+15&-16)|0)==(k[a>>2]|0))k[a>>2]=b}else ym(b);return} -function sm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;da=r;r=r+1136|0;ca=da+1104|0;q=da+1080|0;s=da+1056|0;y=da+1032|0;H=da+1008|0;Y=da+984|0;aa=da+960|0;ba=da+936|0;n=da+912|0;P=da+888|0;p=da+864|0;t=da+840|0;u=da+816|0;Q=da+792|0;R=da+768|0;S=da+744|0;T=da+720|0;U=da+696|0;v=da+672|0;w=da+648|0;x=da+624|0;h=da+600|0;z=da+576|0;A=da+552|0;B=da+240|0;C=da+216|0;D=da+192|0;E=da+168|0;j=da+144|0;F=da+120|0;G=da+72|0;I=da+48|0;l=da+24|0;V=da;W=da+96|0;X=da+264|0;m=da+288|0;J=da+312|0;K=da+336|0;L=da+360|0;M=da+384|0;N=da+408|0;O=da+432|0;Z=da+456|0;_=da+480|0;$=da+504|0;o=da+528|0;a:do if((b-a|0)>1)do switch(i[a>>0]|0){case 112:switch(i[a+1>>0]|0){case 109:{em(m,59432);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[m+0>>2];k[d+4>>2]=k[m+4>>2];k[d+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;$=d+12|0;d=m+12|0;k[$+0>>2]=k[d+0>>2];k[$+4>>2]=k[d+4>>2];k[$+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;g=(d-e|0)/24|0;f=g+1|0;if((f|0)<0)Fl(c);d=(b-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[m+0>>2];k[e+4>>2]=k[m+4>>2];k[e+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;_=e+12|0;$=m+12|0;k[_+0>>2]=k[$+0>>2];k[_+4>>2]=k[$+4>>2];k[_+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(m);d=a+2|0;break a}case 112:{i[L>>0]=20;d=L+1|0;b=59480;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[L+11>>0]=0;h=L+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[L+0>>2];k[d+4>>2]=k[L+4>>2];k[d+8>>2]=k[L+8>>2];k[L+0>>2]=0;k[L+4>>2]=0;k[L+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[L+0>>2];k[e+4>>2]=k[L+4>>2];k[e+8>>2]=k[L+8>>2];k[L+0>>2]=0;k[L+4>>2]=0;k[L+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(L);d=a+2|0;break a}case 116:{i[N>>0]=20;d=N+1|0;b=59496;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[N+11>>0]=0;h=N+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[N+0>>2];k[d+4>>2]=k[N+4>>2];k[d+8>>2]=k[N+8>>2];k[N+0>>2]=0;k[N+4>>2]=0;k[N+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[N+0>>2];k[e+4>>2]=k[N+4>>2];k[e+8>>2]=k[N+8>>2];k[N+0>>2]=0;k[N+4>>2]=0;k[N+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(N);d=a+2|0;break a}case 115:{i[M>>0]=18;d=M+1|0;b=59448;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[M+10>>0]=0;h=M+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[M+0>>2];k[d+4>>2]=k[M+4>>2];k[d+8>>2]=k[M+8>>2];k[M+0>>2]=0;k[M+4>>2]=0;k[M+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[M+0>>2];k[e+4>>2]=k[M+4>>2];k[e+8>>2]=k[M+8>>2];k[M+0>>2]=0;k[M+4>>2]=0;k[M+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(M);d=a+2|0;break a}case 76:{i[K>>0]=20;d=K+1|0;b=59464;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[K+11>>0]=0;h=K+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[K+0>>2];k[d+4>>2]=k[K+4>>2];k[d+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[K+0>>2];k[e+4>>2]=k[K+4>>2];k[e+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(K);d=a+2|0;break a}case 108:{i[J>>0]=18;d=J+1|0;b=59448;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[J+10>>0]=0;h=J+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[J+0>>2];k[d+4>>2]=k[J+4>>2];k[d+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[J+0>>2];k[e+4>>2]=k[J+4>>2];k[e+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(J);d=a+2|0;break a}default:{d=a;break a}}case 111:{d=i[a+1>>0]|0;if((d|0)==114){i[W>>0]=18;d=W+1|0;b=59400;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[W+10>>0]=0;h=W+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[W+0>>2];k[d+4>>2]=k[W+4>>2];k[d+8>>2]=k[W+8>>2];k[W+0>>2]=0;k[W+4>>2]=0;k[W+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[W+0>>2];k[e+4>>2]=k[W+4>>2];k[e+8>>2]=k[W+8>>2];k[W+0>>2]=0;k[W+4>>2]=0;k[W+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(W);d=a+2|0;break a}else if((d|0)==82){i[X>>0]=20;d=X+1|0;b=59416;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[X+11>>0]=0;h=X+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[X+0>>2];k[d+4>>2]=k[X+4>>2];k[d+8>>2]=k[X+8>>2];k[X+0>>2]=0;k[X+4>>2]=0;k[X+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[X+0>>2];k[e+4>>2]=k[X+4>>2];k[e+8>>2]=k[X+8>>2];k[X+0>>2]=0;k[X+4>>2]=0;k[X+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(X);d=a+2|0;break a}else if((d|0)==111){i[V>>0]=20;d=V+1|0;b=59384;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[V+11>>0]=0;h=V+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[V+0>>2];k[d+4>>2]=k[V+4>>2];k[d+8>>2]=k[V+8>>2];k[V+0>>2]=0;k[V+4>>2]=0;k[V+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[V+0>>2];k[e+4>>2]=k[V+4>>2];k[e+8>>2]=k[V+8>>2];k[V+0>>2]=0;k[V+4>>2]=0;k[V+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(V);d=a+2|0;break a}else{d=a;break a}}case 97:switch(i[a+1>>0]|0){case 97:{i[q>>0]=20;d=q+1|0;b=58864;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[q+11>>0]=0;h=q+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[q+0>>2];k[d+4>>2]=k[q+4>>2];k[d+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[q+0>>2];k[e+4>>2]=k[q+4>>2];k[e+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(q);d=a+2|0;break a}case 78:{i[y>>0]=20;d=y+1|0;b=58896;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[y+11>>0]=0;h=y+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[y+0>>2];k[d+4>>2]=k[y+4>>2];k[d+8>>2]=k[y+8>>2];k[y+0>>2]=0;k[y+4>>2]=0;k[y+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[y+0>>2];k[e+4>>2]=k[y+4>>2];k[e+8>>2]=k[y+8>>2];k[y+0>>2]=0;k[y+4>>2]=0;k[y+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(y);d=a+2|0;break a}case 110:case 100:{i[s>>0]=18;d=s+1|0;b=58880;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[s+10>>0]=0;h=s+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;g=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[s+0>>2];k[d+4>>2]=k[s+4>>2];k[d+8>>2]=k[s+8>>2];k[s+0>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;f=(d-b|0)/24|0;e=f+1|0;if((e|0)<0)Fl(c);d=(g-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,f,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[s+0>>2];k[e+4>>2]=k[s+4>>2];k[e+8>>2]=k[s+8>>2];k[s+0>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(s);d=a+2|0;break a}case 83:{i[H>>0]=18;d=H+1|0;b=58912;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[H+10>>0]=0;h=H+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[H+0>>2];k[d+4>>2]=k[H+4>>2];k[d+8>>2]=k[H+8>>2];k[H+0>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[H+0>>2];k[e+4>>2]=k[H+4>>2];k[e+8>>2]=k[H+8>>2];k[H+0>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(H);d=a+2|0;break a}default:{d=a;break a}}case 99:{d=i[a+1>>0]|0;if((d|0)==108){i[Y>>0]=20;d=Y+1|0;b=58928;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[Y+11>>0]=0;h=Y+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[Y+0>>2];k[d+4>>2]=k[Y+4>>2];k[d+8>>2]=k[Y+8>>2];k[Y+0>>2]=0;k[Y+4>>2]=0;k[Y+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[Y+0>>2];k[e+4>>2]=k[Y+4>>2];k[e+8>>2]=k[Y+8>>2];k[Y+0>>2]=0;k[Y+4>>2]=0;k[Y+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(Y);d=a+2|0;break a}else if((d|0)==111){i[ba>>0]=18;d=ba+1|0;b=58960;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[ba+10>>0]=0;h=ba+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[ba+0>>2];k[d+4>>2]=k[ba+4>>2];k[d+8>>2]=k[ba+8>>2];k[ba+0>>2]=0;k[ba+4>>2]=0;k[ba+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[ba+0>>2];k[e+4>>2]=k[ba+4>>2];k[e+8>>2]=k[ba+8>>2];k[ba+0>>2]=0;k[ba+4>>2]=0;k[ba+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(ba);d=a+2|0;break a}else if((d|0)==118){_=c+63|0;Y=i[_>>0]|0;i[_>>0]=0;$=a+2|0;d=ul($,b,c)|0;i[_>>0]=Y;if((d|0)==($|0)){d=a;break a}e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}rl(e+-24|0,0,58976)|0;i[c+60>>0]=1;break a}else if((d|0)==109){i[aa>>0]=18;d=aa+1|0;b=58944;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[aa+10>>0]=0;h=aa+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[aa+0>>2];k[d+4>>2]=k[aa+4>>2];k[d+8>>2]=k[aa+8>>2];k[aa+0>>2]=0;k[aa+4>>2]=0;k[aa+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[aa+0>>2];k[e+4>>2]=k[aa+4>>2];k[e+8>>2]=k[aa+8>>2];k[aa+0>>2]=0;k[aa+4>>2]=0;k[aa+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(aa);d=a+2|0;break a}else{d=a;break a}}case 100:switch(i[a+1>>0]|0){case 97:{im(n,58992);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[n+0>>2];k[d+4>>2]=k[n+4>>2];k[d+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;$=d+12|0;d=n+12|0;k[$+0>>2]=k[d+0>>2];k[$+4>>2]=k[d+4>>2];k[$+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;g=(d-e|0)/24|0;f=g+1|0;if((f|0)<0)Fl(c);d=(b-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[n+0>>2];k[e+4>>2]=k[n+4>>2];k[e+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;_=e+12|0;$=n+12|0;k[_+0>>2]=k[$+0>>2];k[_+4>>2]=k[$+4>>2];k[_+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(n);d=a+2|0;break a}case 101:{i[P>>0]=18;d=P+1|0;b=59016;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[P+10>>0]=0;h=P+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[P+0>>2];k[d+4>>2]=k[P+4>>2];k[d+8>>2]=k[P+8>>2];k[P+0>>2]=0;k[P+4>>2]=0;k[P+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[P+0>>2];k[e+4>>2]=k[P+4>>2];k[e+8>>2]=k[P+8>>2];k[P+0>>2]=0;k[P+4>>2]=0;k[P+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(P);d=a+2|0;break a}case 108:{Ol(p,59032,15);h=p+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[p+0>>2];k[d+4>>2]=k[p+4>>2];k[d+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[p+0>>2];k[e+4>>2]=k[p+4>>2];k[e+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(p);d=a+2|0;break a}case 118:{i[t>>0]=18;d=t+1|0;b=59048;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[t+10>>0]=0;h=t+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[t+0>>2];k[d+4>>2]=k[t+4>>2];k[d+8>>2]=k[t+8>>2];k[t+0>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[t+0>>2];k[e+4>>2]=k[t+4>>2];k[e+8>>2]=k[t+8>>2];k[t+0>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(t);d=a+2|0;break a}case 86:{i[u>>0]=20;d=u+1|0;b=59064;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[u+11>>0]=0;h=u+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[u+0>>2];k[d+4>>2]=k[u+4>>2];k[d+8>>2]=k[u+8>>2];k[u+0>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[u+0>>2];k[e+4>>2]=k[u+4>>2];k[e+8>>2]=k[u+8>>2];k[u+0>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(u);d=a+2|0;break a}default:{d=a;break a}}case 101:{d=i[a+1>>0]|0;if((d|0)==111){i[Q>>0]=18;d=Q+1|0;b=59080;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[Q+10>>0]=0;h=Q+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[Q+0>>2];k[d+4>>2]=k[Q+4>>2];k[d+8>>2]=k[Q+8>>2];k[Q+0>>2]=0;k[Q+4>>2]=0;k[Q+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[Q+0>>2];k[e+4>>2]=k[Q+4>>2];k[e+8>>2]=k[Q+8>>2];k[Q+0>>2]=0;k[Q+4>>2]=0;k[Q+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(Q);d=a+2|0;break a}else if((d|0)==79){i[R>>0]=20;d=R+1|0;b=59096;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[R+11>>0]=0;h=R+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[R+0>>2];k[d+4>>2]=k[R+4>>2];k[d+8>>2]=k[R+8>>2];k[R+0>>2]=0;k[R+4>>2]=0;k[R+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[R+0>>2];k[e+4>>2]=k[R+4>>2];k[e+8>>2]=k[R+8>>2];k[R+0>>2]=0;k[R+4>>2]=0;k[R+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(R);d=a+2|0;break a}else if((d|0)==113){i[S>>0]=20;d=S+1|0;b=59112;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[S+11>>0]=0;h=S+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[S+0>>2];k[d+4>>2]=k[S+4>>2];k[d+8>>2]=k[S+8>>2];k[S+0>>2]=0;k[S+4>>2]=0;k[S+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[S+0>>2];k[e+4>>2]=k[S+4>>2];k[e+8>>2]=k[S+8>>2];k[S+0>>2]=0;k[S+4>>2]=0;k[S+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(S);d=a+2|0;break a}else{d=a;break a}}case 105:{if((i[a+1>>0]|0)!=120){d=a;break a}i[v>>0]=20;d=v+1|0;b=59160;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[v+11>>0]=0;h=v+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[v+0>>2];k[d+4>>2]=k[v+4>>2];k[d+8>>2]=k[v+8>>2];k[v+0>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[v+0>>2];k[e+4>>2]=k[v+4>>2];k[e+8>>2]=k[v+8>>2];k[v+0>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(v);d=a+2|0;break a}case 103:{d=i[a+1>>0]|0;if((d|0)==116){i[U>>0]=18;d=U+1|0;b=59144;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[U+10>>0]=0;h=U+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[U+0>>2];k[d+4>>2]=k[U+4>>2];k[d+8>>2]=k[U+8>>2];k[U+0>>2]=0;k[U+4>>2]=0;k[U+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[U+0>>2];k[e+4>>2]=k[U+4>>2];k[e+8>>2]=k[U+8>>2];k[U+0>>2]=0;k[U+4>>2]=0;k[U+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(U);d=a+2|0;break a}else if((d|0)==101){i[T>>0]=20;d=T+1|0;b=59128;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[T+11>>0]=0;h=T+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[T+0>>2];k[d+4>>2]=k[T+4>>2];k[d+8>>2]=k[T+8>>2];k[T+0>>2]=0;k[T+4>>2]=0;k[T+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[T+0>>2];k[e+4>>2]=k[T+4>>2];k[e+8>>2]=k[T+8>>2];k[T+0>>2]=0;k[T+4>>2]=0;k[T+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(T);d=a+2|0;break a}else{d=a;break a}}case 108:switch(i[a+1>>0]|0){case 101:{i[w>>0]=20;d=w+1|0;b=59176;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[w+11>>0]=0;h=w+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[w+0>>2];k[d+4>>2]=k[w+4>>2];k[d+8>>2]=k[w+8>>2];k[w+0>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[w+0>>2];k[e+4>>2]=k[w+4>>2];k[e+8>>2]=k[w+8>>2];k[w+0>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(w);d=a+2|0;break a}case 115:{i[x>>0]=20;d=x+1|0;b=59208;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[x+11>>0]=0;h=x+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[x+0>>2];k[d+4>>2]=k[x+4>>2];k[d+8>>2]=k[x+8>>2];k[x+0>>2]=0;k[x+4>>2]=0;k[x+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[x+0>>2];k[e+4>>2]=k[x+4>>2];k[e+8>>2]=k[x+8>>2];k[x+0>>2]=0;k[x+4>>2]=0;k[x+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(x);d=a+2|0;break a}case 83:{em(h,59224);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;$=d+12|0;d=h+12|0;k[$+0>>2]=k[d+0>>2];k[$+4>>2]=k[d+4>>2];k[$+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;g=(d-e|0)/24|0;f=g+1|0;if((f|0)<0)Fl(c);d=(b-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[h+0>>2];k[e+4>>2]=k[h+4>>2];k[e+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;_=e+12|0;$=h+12|0;k[_+0>>2]=k[$+0>>2];k[_+4>>2]=k[$+4>>2];k[_+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(h);d=a+2|0;break a}case 105:{$=a+2|0;d=Ul($,b,c)|0;if((d|0)==($|0)){d=a;break a}e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}rl(e+-24|0,0,59192)|0;break a}case 116:{i[z>>0]=18;d=z+1|0;b=59240;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[z+10>>0]=0;h=z+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[z+0>>2];k[d+4>>2]=k[z+4>>2];k[d+8>>2]=k[z+8>>2];k[z+0>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[z+0>>2];k[e+4>>2]=k[z+4>>2];k[e+8>>2]=k[z+8>>2];k[z+0>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(z);d=a+2|0;break a}default:{d=a;break a}}case 109:switch(i[a+1>>0]|0){case 105:{i[A>>0]=18;d=A+1|0;b=59256;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[A+10>>0]=0;h=A+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[A+0>>2];k[d+4>>2]=k[A+4>>2];k[d+8>>2]=k[A+8>>2];k[A+0>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[A+0>>2];k[e+4>>2]=k[A+4>>2];k[e+8>>2]=k[A+8>>2];k[A+0>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(A);d=a+2|0;break a}case 73:{i[B>>0]=20;d=B+1|0;b=59272;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[B+11>>0]=0;h=B+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[B+0>>2];k[d+4>>2]=k[B+4>>2];k[d+8>>2]=k[B+8>>2];k[B+0>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[B+0>>2];k[e+4>>2]=k[B+4>>2];k[e+8>>2]=k[B+8>>2];k[B+0>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(B);d=a+2|0;break a}case 109:{i[E>>0]=20;d=E+1|0;b=59304;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[E+11>>0]=0;h=E+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[E+0>>2];k[d+4>>2]=k[E+4>>2];k[d+8>>2]=k[E+8>>2];k[E+0>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[E+0>>2];k[e+4>>2]=k[E+4>>2];k[e+8>>2]=k[E+8>>2];k[E+0>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(E);d=a+2|0;break a}case 76:{i[D>>0]=20;d=D+1|0;b=59288;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[D+11>>0]=0;h=D+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[D+0>>2];k[d+4>>2]=k[D+4>>2];k[d+8>>2]=k[D+8>>2];k[D+0>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[D+0>>2];k[e+4>>2]=k[D+4>>2];k[e+8>>2]=k[D+8>>2];k[D+0>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(D);d=a+2|0;break a}case 108:{i[C>>0]=18;d=C+1|0;b=59016;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[C+10>>0]=0;h=C+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[C+0>>2];k[d+4>>2]=k[C+4>>2];k[d+8>>2]=k[C+8>>2];k[C+0>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[C+0>>2];k[e+4>>2]=k[C+4>>2];k[e+8>>2]=k[C+8>>2];k[C+0>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(C);d=a+2|0;break a}default:{d=a;break a}}case 110:switch(i[a+1>>0]|0){case 103:{i[G>>0]=18;d=G+1|0;b=59256;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[G+10>>0]=0;h=G+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[G+0>>2];k[d+4>>2]=k[G+4>>2];k[d+8>>2]=k[G+8>>2];k[G+0>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[G+0>>2];k[e+4>>2]=k[G+4>>2];k[e+8>>2]=k[G+8>>2];k[G+0>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(G);d=a+2|0;break a}case 119:{hm(l,59368);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;$=d+12|0;d=l+12|0;k[$+0>>2]=k[d+0>>2];k[$+4>>2]=k[d+4>>2];k[$+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;g=(d-e|0)/24|0;f=g+1|0;if((f|0)<0)Fl(c);d=(b-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[l+0>>2];k[e+4>>2]=k[l+4>>2];k[e+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;_=e+12|0;$=l+12|0;k[_+0>>2]=k[$+0>>2];k[_+4>>2]=k[$+4>>2];k[_+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(l);d=a+2|0;break a}case 116:{i[I>>0]=18;d=I+1|0;b=59352;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[I+10>>0]=0;h=I+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[I+0>>2];k[d+4>>2]=k[I+4>>2];k[d+8>>2]=k[I+8>>2];k[I+0>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[I+0>>2];k[e+4>>2]=k[I+4>>2];k[e+8>>2]=k[I+8>>2];k[I+0>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(I);d=a+2|0;break a}case 97:{gm(j,59320);e=c+4|0;d=k[e>>2]|0;g=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;$=d+12|0;d=j+12|0;k[$+0>>2]=k[d+0>>2];k[$+4>>2]=k[d+4>>2];k[$+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{f=k[c>>2]|0;b=(d-f|0)/24|0;e=b+1|0;if((e|0)<0)Fl(c);d=(g-f|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,b,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[j+0>>2];k[e+4>>2]=k[j+4>>2];k[e+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;_=e+12|0;$=j+12|0;k[_+0>>2]=k[$+0>>2];k[_+4>>2]=k[$+4>>2];k[_+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(j);d=a+2|0;break a}case 101:{i[F>>0]=20;d=F+1|0;b=59336;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[F+11>>0]=0;h=F+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[F+0>>2];k[d+4>>2]=k[F+4>>2];k[d+8>>2]=k[F+8>>2];k[F+0>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[F+0>>2];k[e+4>>2]=k[F+4>>2];k[e+8>>2]=k[F+8>>2];k[F+0>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(F);d=a+2|0;break a}default:{d=a;break a}}case 114:{d=i[a+1>>0]|0;if((d|0)==83){em(o,59576);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[o+0>>2];k[d+4>>2]=k[o+4>>2];k[d+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;$=d+12|0;d=o+12|0;k[$+0>>2]=k[d+0>>2];k[$+4>>2]=k[d+4>>2];k[$+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;g=(d-e|0)/24|0;f=g+1|0;if((f|0)<0)Fl(c);d=(b-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[o+0>>2];k[e+4>>2]=k[o+4>>2];k[e+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;_=e+12|0;$=o+12|0;k[_+0>>2]=k[$+0>>2];k[_+4>>2]=k[$+4>>2];k[_+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(o);d=a+2|0;break a}else if((d|0)==115){i[$>>0]=20;d=$+1|0;b=59560;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[$+11>>0]=0;h=$+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[$+0>>2];k[d+4>>2]=k[$+4>>2];k[d+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[$+0>>2];k[e+4>>2]=k[$+4>>2];k[e+8>>2]=k[$+8>>2];k[$+0>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0;_=e+12|0;k[_+0>>2]=k[h+0>>2];k[_+4>>2]=k[h+4>>2];k[_+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl($);d=a+2|0;break a}else if((d|0)==77){i[_>>0]=20;d=_+1|0;b=59544;e=d+10|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[_+11>>0]=0;h=_+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[_+0>>2];k[d+4>>2]=k[_+4>>2];k[d+8>>2]=k[_+8>>2];k[_+0>>2]=0;k[_+4>>2]=0;k[_+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[_+0>>2];k[e+4>>2]=k[_+4>>2];k[e+8>>2]=k[_+8>>2];k[_+0>>2]=0;k[_+4>>2]=0;k[_+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(_);d=a+2|0;break a}else if((d|0)==109){i[Z>>0]=18;d=Z+1|0;b=59528;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[Z+10>>0]=0;h=Z+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[Z+0>>2];k[d+4>>2]=k[Z+4>>2];k[d+8>>2]=k[Z+8>>2];k[Z+0>>2]=0;k[Z+4>>2]=0;k[Z+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[Z+0>>2];k[e+4>>2]=k[Z+4>>2];k[e+8>>2]=k[Z+8>>2];k[Z+0>>2]=0;k[Z+4>>2]=0;k[Z+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(Z);d=a+2|0;break a}else{d=a;break a}}case 113:{if((i[a+1>>0]|0)!=117){d=a;break a}i[O>>0]=18;d=O+1|0;b=59512;e=d+9|0;do{i[d>>0]=i[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(e|0));i[O+10>>0]=0;h=O+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[O+0>>2];k[d+4>>2]=k[O+4>>2];k[d+8>>2]=k[O+8>>2];k[O+0>>2]=0;k[O+4>>2]=0;k[O+8>>2]=0;d=d+12|0;k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{b=k[c>>2]|0;g=(d-b|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(f-b|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(ca,d,g,c+12|0);d=ca+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[O+0>>2];k[e+4>>2]=k[O+4>>2];k[e+8>>2]=k[O+8>>2];k[O+0>>2]=0;k[O+4>>2]=0;k[O+8>>2]=0;$=e+12|0;k[$+0>>2]=k[h+0>>2];k[$+4>>2]=k[h+4>>2];k[$+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[d>>2]=e+24;Ml(c,ca);Ll(ca)}hl(O);d=a+2|0;break a}case 118:{if(((i[a+1>>0]|0)+-48|0)>>>0>=10){d=a;break a}$=a+2|0;d=Ul($,b,c)|0;if((d|0)==($|0)){d=a;break a}e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}rl(e+-24|0,0,58976)|0;break a}default:{d=a;break a}}while(0);else d=a;while(0);r=da;return d|0}function tm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;p=r;r=r+80|0;n=p+48|0;j=p;l=p+24|0;m=p+36|0;o=zl(a,b)|0;if(!((o|0)==(a|0)|(o|0)==(b|0))?(i[o>>0]|0)==69:0){b=i[c>>0]|0;if(!(b&1))b=(b&255)>>>1;else b=k[c+4>>2]|0;do if(b>>>0>3){Zl(m,58248,c);g=sl(m,58240)|0;k[l+0>>2]=k[g+0>>2];k[l+4>>2]=k[g+4>>2];k[l+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[j+0>>2]=k[l+0>>2];k[j+4>>2]=k[l+4>>2];k[j+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;g=j+12|0;k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;f=d+4|0;b=k[f>>2]|0;e=k[d+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[j+0>>2];k[b+4>>2]=k[j+4>>2];k[b+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;b=b+12|0;k[b+0>>2]=k[g+0>>2];k[b+4>>2]=k[g+4>>2];k[b+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;b=k[f>>2]|0}k[f>>2]=b+24}else{f=k[d>>2]|0;h=(b-f|0)/24|0;b=h+1|0;if((b|0)<0)Fl(d);f=(e-f|0)/24|0;if(f>>>0<1073741823){f=f<<1;f=f>>>0>>0?b:f}else f=2147483647;Kl(n,f,h,d+12|0);f=n+8|0;b=k[f>>2]|0;if(b){k[b+0>>2]=k[j+0>>2];k[b+4>>2]=k[j+4>>2];k[b+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;h=b+12|0;k[h+0>>2]=k[g+0>>2];k[h+4>>2]=k[g+4>>2];k[h+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0}k[f>>2]=b+24;Ml(d,n);Ll(n)}hl(j);tl(l);tl(m)}else{e=d+4|0;b=k[e>>2]|0;g=k[d+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24;break}e=k[d>>2]|0;h=(b-e|0)/24|0;f=h+1|0;if((f|0)<0)Fl(d);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?f:b}else b=2147483647;Kl(n,b,h,d+12|0);b=n+8|0;e=k[b>>2]|0;if(e){k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[e+16>>2]=0;k[e+20>>2]=0}k[b>>2]=e+24;Ml(d,n);Ll(n)}while(0);f=d+4|0;if((i[a>>0]|0)==110){Cl((k[f>>2]|0)+-24|0,45);a=a+1|0}rm((k[f>>2]|0)+-24|0,a,o);e=i[c>>0]|0;a=(e&1)==0;if(a)b=(e&255)>>>1;else b=k[c+4>>2]|0;if(b>>>0<4){if(a){b=c+1|0;a=(e&255)>>>1}else{b=k[c+8>>2]|0;a=k[c+4>>2]|0}jl((k[f>>2]|0)+-24|0,b,a)|0}a=o+1|0}r=p;return a|0}function um(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l+12|0;j=l;do if((b-a|0)>1){d=i[a>>0]|0;if(d<<24>>24==100|d<<24>>24==111?(i[a+1>>0]|0)==110:0){f=a+2|0;if(d<<24>>24!=111){if((f|0)!=(b|0)){d=vm(f,b,c)|0;if((d|0)==(f|0))d=wm(f,b,c)|0;if((d|0)!=(f|0)?(g=k[c+4>>2]|0,(k[c>>2]|0)!=(g|0)):0)rl(g+-24|0,0,58408)|0;else d=f}else d=b;r=l;return ((d|0)==(f|0)?a:d)|0}e=sm(f,b,c)|0;if((e|0)==(f|0)){d=a;break}d=Tl(e,b,c)|0;if((d|0)==(e|0)){d=e;break}g=c+4|0;e=k[g>>2]|0;if(((e-(k[c>>2]|0)|0)/24|0)>>>0<2)break;Al(h,e+-24|0);b=k[g>>2]|0;e=b+-24|0;f=b;do{a=f+-24|0;k[g>>2]=a;hl(a);f=k[g>>2]|0}while((f|0)!=(e|0));e=i[h>>0]|0;if(!(e&1)){f=h+1|0;e=(e&255)>>>1}else{f=k[h+8>>2]|0;e=k[h+4>>2]|0}jl(b+-48|0,f,e)|0;tl(h);break}d=wm(a,b,c)|0;if((d|0)==(a|0)){e=sm(a,b,c)|0;if((e|0)!=(a|0)){d=Tl(e,b,c)|0;if((d|0)!=(e|0)){g=c+4|0;e=k[g>>2]|0;if(((e-(k[c>>2]|0)|0)/24|0)>>>0>=2){Al(j,e+-24|0);b=k[g>>2]|0;e=b+-24|0;f=b;do{h=f+-24|0;k[g>>2]=h;hl(h);f=k[g>>2]|0}while((f|0)!=(e|0));e=i[j>>0]|0;if(!(e&1)){f=j+1|0;e=(e&255)>>>1}else{f=k[j+8>>2]|0;e=k[j+4>>2]|0}jl(b+-48|0,f,e)|0;tl(j)}}else d=e}else d=a}}else d=a;while(0);r=l;return d|0}function vm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+96|0;n=o+68|0;m=o;g=o+16|0;j=o+24|0;f=o+40|0;l=o+48|0;h=o+64|0;a:do if((a|0)!=(b|0)){d=i[a>>0]|0;if((d|0)==83){d=Xl(a,b,c)|0;if((d|0)!=(a|0))break;if((b-a|0)<=2){d=a;break}if((i[a+1>>0]|0)!=116){d=a;break}m=a+2|0;d=am(m,b,c)|0;if((d|0)==(m|0)){d=a;break}e=c+4|0;b=k[e>>2]|0;if((k[c>>2]|0)==(b|0)){d=a;break}rl(b+-24|0,0,58856)|0;a=c+16|0;e=(k[e>>2]|0)+-24|0;k[h>>2]=k[c+12>>2];Rl(l,e,h);e=c+20|0;b=k[e>>2]|0;g=k[c+24>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+12>>2]=k[l+12>>2];k[b>>2]=k[l>>2];n=l+4|0;k[b+4>>2]=k[n>>2];c=l+8|0;k[b+8>>2]=k[c>>2];k[c>>2]=0;k[n>>2]=0;k[l>>2]=0;b=k[e>>2]|0}k[e>>2]=b+16}else{f=k[a>>2]|0;h=b-f>>4;e=h+1|0;if((e|0)<0)Fl(a);b=g-f|0;if(b>>4>>>0<1073741823){b=b>>3;b=b>>>0>>0?e:b}else b=2147483647;Gl(n,b,h,c+28|0);b=n+8|0;e=k[b>>2]|0;if(e){k[e+12>>2]=k[l+12>>2];k[e>>2]=k[l>>2];c=l+4|0;k[e+4>>2]=k[c>>2];m=l+8|0;k[e+8>>2]=k[m>>2];k[m>>2]=0;k[c>>2]=0;k[l>>2]=0}k[b>>2]=e+16;Hl(a,n);Il(n)}il(l);break}else if((d|0)==68){d=Yl(a,b,c)|0;if((d|0)==(a|0)){d=a;break}b=k[c+4>>2]|0;if((k[c>>2]|0)==(b|0)){d=a;break}a=c+16|0;k[f>>2]=k[c+12>>2];Rl(j,b+-24|0,f);e=c+20|0;b=k[e>>2]|0;h=k[c+24>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+12>>2]=k[j+12>>2];k[b>>2]=k[j>>2];n=j+4|0;k[b+4>>2]=k[n>>2];c=j+8|0;k[b+8>>2]=k[c>>2];k[c>>2]=0;k[n>>2]=0;k[j>>2]=0;b=k[e>>2]|0}k[e>>2]=b+16}else{e=k[a>>2]|0;g=b-e>>4;f=g+1|0;if((f|0)<0)Fl(a);b=h-e|0;if(b>>4>>>0<1073741823){b=b>>3;b=b>>>0>>0?f:b}else b=2147483647;Gl(n,b,g,c+28|0);b=n+8|0;e=k[b>>2]|0;if(e){k[e+12>>2]=k[j+12>>2];k[e>>2]=k[j>>2];c=j+4|0;k[e+4>>2]=k[c>>2];m=j+8|0;k[e+8>>2]=k[m>>2];k[m>>2]=0;k[c>>2]=0;k[j>>2]=0}k[b>>2]=e+16;Hl(a,n);Il(n)}il(j);break}else if((d|0)==84){h=c+4|0;f=((k[h>>2]|0)-(k[c>>2]|0)|0)/24|0;d=Sl(a,b,c)|0;e=k[h>>2]|0;b=(e-(k[c>>2]|0)|0)/24|0;if(!((d|0)!=(a|0)&(b|0)==(f+1|0))){if((b|0)==(f|0)){d=a;break}while(1){d=e;e=e+-24|0;do{n=d+-24|0;k[h>>2]=n;hl(n);d=k[h>>2]|0}while((d|0)!=(e|0));b=b+-1|0;if((b|0)==(f|0)){d=a;break a}}}a=c+16|0;k[g>>2]=k[c+12>>2];Rl(m,e+-24|0,g);e=c+20|0;b=k[e>>2]|0;h=k[c+24>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+12>>2]=k[m+12>>2];k[b>>2]=k[m>>2];n=m+4|0;k[b+4>>2]=k[n>>2];c=m+8|0;k[b+8>>2]=k[c>>2];k[c>>2]=0;k[n>>2]=0;k[m>>2]=0;b=k[e>>2]|0}k[e>>2]=b+16}else{f=k[a>>2]|0;g=b-f>>4;e=g+1|0;if((e|0)<0)Fl(a);b=h-f|0;if(b>>4>>>0<1073741823){b=b>>3;b=b>>>0>>0?e:b}else b=2147483647;Gl(n,b,g,c+28|0);b=n+8|0;e=k[b>>2]|0;if(e){k[e+12>>2]=k[m+12>>2];k[e>>2]=k[m>>2];c=m+4|0;k[e+4>>2]=k[c>>2];g=m+8|0;k[e+8>>2]=k[g>>2];k[g>>2]=0;k[c>>2]=0;k[m>>2]=0}k[b>>2]=e+16;Hl(a,n);Il(n)}il(m);break}else{d=a;break}}else d=a;while(0);r=o;return d|0}function wm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;g=r;r=r+16|0;f=g;if((a|0)!=(b|0)?(d=Ul(a,b,c)|0,(d|0)!=(a|0)):0){b=Tl(d,b,c)|0;if((b|0)!=(d|0)){e=c+4|0;d=k[e>>2]|0;if(((d-(k[c>>2]|0)|0)/24|0)>>>0<2)b=a;else{Al(f,d+-24|0);a=k[e>>2]|0;d=a+-24|0;c=a;do{h=c+-24|0;k[e>>2]=h;hl(h);c=k[e>>2]|0}while((c|0)!=(d|0));d=i[f>>0]|0;if(!(d&1)){c=f+1|0;d=(d&255)>>>1}else{c=k[f+8>>2]|0;d=k[f+4>>2]|0}jl(a+-48|0,c,d)|0;tl(f)}}else b=d}else b=a;r=g;return b|0}function xm(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;do if(a>>>0<245){if(a>>>0<11)o=16;else o=a+11&-8;a=o>>>3;j=k[15476]|0;d=j>>>a;if(d&3){b=(d&1^1)+a|0;d=b<<1;c=61944+(d<<2)|0;d=61944+(d+2<<2)|0;e=k[d>>2]|0;f=e+8|0;g=k[f>>2]|0;do if((c|0)!=(g|0)){if(g>>>0<(k[15480]|0)>>>0)Ob();a=g+12|0;if((k[a>>2]|0)==(e|0)){k[a>>2]=c;k[d>>2]=g;break}else Ob()}else k[15476]=j&~(1<>2]=L|3;L=e+(L|4)|0;k[L>>2]=k[L>>2]|1;L=f;return L|0}g=k[15478]|0;if(o>>>0>g>>>0){if(d){c=2<>>12&16;c=c>>>i;f=c>>>5&8;c=c>>>f;e=c>>>2&4;c=c>>>e;b=c>>>1&2;c=c>>>b;d=c>>>1&1;d=(f|i|e|b|d)+(c>>>d)|0;c=d<<1;b=61944+(c<<2)|0;c=61944+(c+2<<2)|0;e=k[c>>2]|0;i=e+8|0;f=k[i>>2]|0;do if((b|0)!=(f|0)){if(f>>>0<(k[15480]|0)>>>0)Ob();a=f+12|0;if((k[a>>2]|0)==(e|0)){k[a>>2]=b;k[c>>2]=f;l=k[15478]|0;break}else Ob()}else{k[15476]=j&~(1<>2]=o|3;h=e+o|0;k[e+(o|4)>>2]=g|1;k[e+L>>2]=g;if(l){f=k[15481]|0;b=l>>>3;a=b<<1;c=61944+(a<<2)|0;d=k[15476]|0;b=1<>2]|0;if(a>>>0<(k[15480]|0)>>>0)Ob();else{m=d;n=a}}else{k[15476]=d|b;m=61944+(a+2<<2)|0;n=c}k[m>>2]=f;k[n+12>>2]=f;k[f+8>>2]=n;k[f+12>>2]=c}k[15478]=g;k[15481]=h;L=i;return L|0}a=k[15477]|0;if(a){b=(a&0-a)+-1|0;K=b>>>12&16;b=b>>>K;H=b>>>5&8;b=b>>>H;L=b>>>2&4;b=b>>>L;d=b>>>1&2;b=b>>>d;c=b>>>1&1;c=k[62208+((H|K|L|d|c)+(b>>>c)<<2)>>2]|0;b=(k[c+4>>2]&-8)-o|0;d=c;while(1){a=k[d+16>>2]|0;if(!a){a=k[d+20>>2]|0;if(!a){j=b;break}}d=(k[a+4>>2]&-8)-o|0;L=d>>>0>>0;b=L?d:b;d=a;c=L?a:c}h=k[15480]|0;if(c>>>0>>0)Ob();g=c+o|0;if(c>>>0>=g>>>0)Ob();i=k[c+24>>2]|0;b=k[c+12>>2]|0;do if((b|0)==(c|0)){d=c+20|0;a=k[d>>2]|0;if(!a){d=c+16|0;a=k[d>>2]|0;if(!a){e=0;break}}while(1){b=a+20|0;f=k[b>>2]|0;if(f){a=f;d=b;continue}b=a+16|0;f=k[b>>2]|0;if(!f)break;else{a=f;d=b}}if(d>>>0>>0)Ob();else{k[d>>2]=0;e=a;break}}else{f=k[c+8>>2]|0;if(f>>>0>>0)Ob();a=f+12|0;if((k[a>>2]|0)!=(c|0))Ob();d=b+8|0;if((k[d>>2]|0)==(c|0)){k[a>>2]=b;k[d>>2]=f;e=b;break}else Ob()}while(0);do if(i){a=k[c+28>>2]|0;d=62208+(a<<2)|0;if((c|0)==(k[d>>2]|0)){k[d>>2]=e;if(!e){k[15477]=k[15477]&~(1<>>0<(k[15480]|0)>>>0)Ob();a=i+16|0;if((k[a>>2]|0)==(c|0))k[a>>2]=e;else k[i+20>>2]=e;if(!e)break}d=k[15480]|0;if(e>>>0>>0)Ob();k[e+24>>2]=i;a=k[c+16>>2]|0;do if(a)if(a>>>0>>0)Ob();else{k[e+16>>2]=a;k[a+24>>2]=e;break}while(0);a=k[c+20>>2]|0;if(a)if(a>>>0<(k[15480]|0)>>>0)Ob();else{k[e+20>>2]=a;k[a+24>>2]=e;break}}while(0);if(j>>>0<16){L=j+o|0;k[c+4>>2]=L|3;L=c+(L+4)|0;k[L>>2]=k[L>>2]|1}else{k[c+4>>2]=o|3;k[c+(o|4)>>2]=j|1;k[c+(j+o)>>2]=j;a=k[15478]|0;if(a){e=k[15481]|0;b=a>>>3;a=b<<1;f=61944+(a<<2)|0;d=k[15476]|0;b=1<>2]|0;if(d>>>0<(k[15480]|0)>>>0)Ob();else{p=a;q=d}}else{k[15476]=d|b;p=61944+(a+2<<2)|0;q=f}k[p>>2]=e;k[q+12>>2]=e;k[e+8>>2]=q;k[e+12>>2]=f}k[15478]=j;k[15481]=g}L=c+8|0;return L|0}else q=o}else q=o}else if(a>>>0<=4294967231){a=a+11|0;m=a&-8;l=k[15477]|0;if(l){c=0-m|0;a=a>>>8;if(a)if(m>>>0>16777215)j=31;else{p=(a+1048320|0)>>>16&8;q=a<>>16&4;q=q<>>16&2;j=14-(n|p|j)+(q<>>15)|0;j=m>>>(j+7|0)&1|j<<1}else j=0;i=k[62208+(j<<2)>>2]|0;a:do if(!i){a=0;d=0}else{if((j|0)==31)d=0;else d=25-(j>>>1)|0;e=c;a=0;g=m<>2]&-8;c=f-m|0;if(c>>>0>>0)if((f|0)==(m|0)){a=i;d=i;break a}else d=i;else c=e;q=k[i+20>>2]|0;i=k[i+(g>>>31<<2)+16>>2]|0;a=(q|0)==0|(q|0)==(i|0)?a:q;if(!i)break;else{e=c;g=g<<1}}}while(0);if((a|0)==0&(d|0)==0){a=2<>>12&16;q=q>>>l;j=q>>>5&8;q=q>>>j;n=q>>>2&4;q=q>>>n;p=q>>>1&2;q=q>>>p;a=q>>>1&1;a=k[62208+((j|l|n|p|a)+(q>>>a)<<2)>>2]|0}if(!a){e=c;g=d}else while(1){q=(k[a+4>>2]&-8)-m|0;i=q>>>0>>0;c=i?q:c;d=i?a:d;i=k[a+16>>2]|0;if(i){a=i;continue}a=k[a+20>>2]|0;if(!a){e=c;g=d;break}}if((g|0)!=0?e>>>0<((k[15478]|0)-m|0)>>>0:0){h=k[15480]|0;if(g>>>0>>0)Ob();f=g+m|0;if(g>>>0>=f>>>0)Ob();i=k[g+24>>2]|0;b=k[g+12>>2]|0;do if((b|0)==(g|0)){d=g+20|0;a=k[d>>2]|0;if(!a){d=g+16|0;a=k[d>>2]|0;if(!a){o=0;break}}while(1){b=a+20|0;c=k[b>>2]|0;if(c){a=c;d=b;continue}b=a+16|0;c=k[b>>2]|0;if(!c)break;else{a=c;d=b}}if(d>>>0>>0)Ob();else{k[d>>2]=0;o=a;break}}else{c=k[g+8>>2]|0;if(c>>>0>>0)Ob();a=c+12|0;if((k[a>>2]|0)!=(g|0))Ob();d=b+8|0;if((k[d>>2]|0)==(g|0)){k[a>>2]=b;k[d>>2]=c;o=b;break}else Ob()}while(0);do if(i){a=k[g+28>>2]|0;d=62208+(a<<2)|0;if((g|0)==(k[d>>2]|0)){k[d>>2]=o;if(!o){k[15477]=k[15477]&~(1<>>0<(k[15480]|0)>>>0)Ob();a=i+16|0;if((k[a>>2]|0)==(g|0))k[a>>2]=o;else k[i+20>>2]=o;if(!o)break}d=k[15480]|0;if(o>>>0>>0)Ob();k[o+24>>2]=i;a=k[g+16>>2]|0;do if(a)if(a>>>0>>0)Ob();else{k[o+16>>2]=a;k[a+24>>2]=o;break}while(0);a=k[g+20>>2]|0;if(a)if(a>>>0<(k[15480]|0)>>>0)Ob();else{k[o+20>>2]=a;k[a+24>>2]=o;break}}while(0);b:do if(e>>>0>=16){k[g+4>>2]=m|3;k[g+(m|4)>>2]=e|1;k[g+(e+m)>>2]=e;a=e>>>3;if(e>>>0<256){d=a<<1;c=61944+(d<<2)|0;b=k[15476]|0;a=1<>2]|0;if(d>>>0>=(k[15480]|0)>>>0){s=a;t=d;break}Ob()}while(0);k[s>>2]=f;k[t+12>>2]=f;k[g+(m+8)>>2]=t;k[g+(m+12)>>2]=c;break}a=e>>>8;if(a)if(e>>>0>16777215)c=31;else{K=(a+1048320|0)>>>16&8;L=a<>>16&4;L=L<>>16&2;c=14-(H|K|c)+(L<>>15)|0;c=e>>>(c+7|0)&1|c<<1}else c=0;a=62208+(c<<2)|0;k[g+(m+28)>>2]=c;k[g+(m+20)>>2]=0;k[g+(m+16)>>2]=0;d=k[15477]|0;b=1<>2]=f;k[g+(m+24)>>2]=a;k[g+(m+12)>>2]=f;k[g+(m+8)>>2]=f;break}a=k[a>>2]|0;if((c|0)==31)b=0;else b=25-(c>>>1)|0;c:do if((k[a+4>>2]&-8|0)!=(e|0)){c=e<>>31<<2)+16|0;d=k[b>>2]|0;if(!d)break;if((k[d+4>>2]&-8|0)==(e|0)){z=d;break c}else{c=c<<1;a=d}}if(b>>>0<(k[15480]|0)>>>0)Ob();else{k[b>>2]=f;k[g+(m+24)>>2]=a;k[g+(m+12)>>2]=f;k[g+(m+8)>>2]=f;break b}}else z=a;while(0);a=z+8|0;b=k[a>>2]|0;L=k[15480]|0;if(z>>>0>=L>>>0&b>>>0>=L>>>0){k[b+12>>2]=f;k[a>>2]=f;k[g+(m+8)>>2]=b;k[g+(m+12)>>2]=z;k[g+(m+24)>>2]=0;break}else Ob()}else{L=e+m|0;k[g+4>>2]=L|3;L=g+(L+4)|0;k[L>>2]=k[L>>2]|1}while(0);L=g+8|0;return L|0}else q=m}else q=m}else q=-1;while(0);d=k[15478]|0;if(d>>>0>=q>>>0){a=d-q|0;b=k[15481]|0;if(a>>>0>15){k[15481]=b+q;k[15478]=a;k[b+(q+4)>>2]=a|1;k[b+d>>2]=a;k[b+4>>2]=q|3}else{k[15478]=0;k[15481]=0;k[b+4>>2]=d|3;L=b+(d+4)|0;k[L>>2]=k[L>>2]|1}L=b+8|0;return L|0}a=k[15479]|0;if(a>>>0>q>>>0){K=a-q|0;k[15479]=K;L=k[15482]|0;k[15482]=L+q;k[L+(q+4)>>2]=K|1;k[L+4>>2]=q|3;L=L+8|0;return L|0}do if(!(k[15594]|0)){a=Ja(30)|0;if(!(a+-1&a)){k[15596]=a;k[15595]=a;k[15597]=-1;k[15598]=-1;k[15599]=0;k[15587]=0;z=(nb(0)|0)&-16^1431655768;k[15594]=z;break}else Ob()}while(0);j=q+48|0;g=k[15596]|0;l=q+47|0;e=g+l|0;g=0-g|0;m=e&g;if(m>>>0<=q>>>0){L=0;return L|0}a=k[15586]|0;if((a|0)!=0?(t=k[15584]|0,z=t+m|0,z>>>0<=t>>>0|z>>>0>a>>>0):0){L=0;return L|0}d:do if(!(k[15587]&4)){a=k[15482]|0;e:do if(a){i=62352|0;while(1){d=k[i>>2]|0;if(d>>>0<=a>>>0?(r=i+4|0,(d+(k[r>>2]|0)|0)>>>0>a>>>0):0){f=i;c=r;a=i;break}i=k[i+8>>2]|0;if(!i){E=181;break e}}if(a){a=e-(k[15479]|0)&g;if(a>>>0<2147483647){d=Ga(a|0)|0;if((d|0)==((k[f>>2]|0)+(k[c>>2]|0)|0))E=190;else E=191}else a=0}else E=181}else E=181;while(0);do if((E|0)==181){d=Ga(0)|0;if((d|0)!=(-1|0)){a=d;c=k[15595]|0;i=c+-1|0;if(!(i&a))a=m;else a=m-a+(i+a&0-c)|0;c=k[15584]|0;i=c+a|0;if(a>>>0>q>>>0&a>>>0<2147483647){z=k[15586]|0;if((z|0)!=0?i>>>0<=c>>>0|i>>>0>z>>>0:0){a=0;break}c=Ga(a|0)|0;if((c|0)==(d|0))E=190;else{d=c;E=191}}else a=0}else a=0}while(0);f:do if((E|0)==190){if((d|0)!=(-1|0)){v=d;p=a;E=201;break d}}else if((E|0)==191){c=0-a|0;do if((d|0)!=(-1|0)&a>>>0<2147483647&j>>>0>a>>>0?(u=k[15596]|0,u=l-a+u&0-u,u>>>0<2147483647):0)if((Ga(u|0)|0)==(-1|0)){Ga(c|0)|0;a=0;break f}else{a=u+a|0;break}while(0);if((d|0)==(-1|0))a=0;else{v=d;p=a;E=201;break d}}while(0);k[15587]=k[15587]|4;E=198}else{a=0;E=198}while(0);if((((E|0)==198?m>>>0<2147483647:0)?(v=Ga(m|0)|0,w=Ga(0)|0,(v|0)!=(-1|0)&(w|0)!=(-1|0)&v>>>0>>0):0)?(x=w-v|0,y=x>>>0>(q+40|0)>>>0,y):0){p=y?x:a;E=201}if((E|0)==201){a=(k[15584]|0)+p|0;k[15584]=a;if(a>>>0>(k[15585]|0)>>>0)k[15585]=a;f=k[15482]|0;g:do if(f){i=62352|0;do{a=k[i>>2]|0;d=i+4|0;c=k[d>>2]|0;if((v|0)==(a+c|0)){A=a;B=d;C=c;D=i;E=213;break}i=k[i+8>>2]|0}while((i|0)!=0);if(((E|0)==213?(k[D+12>>2]&8|0)==0:0)?f>>>0>=A>>>0&f>>>0>>0:0){k[B>>2]=C+p;b=(k[15479]|0)+p|0;a=f+8|0;if(!(a&7))a=0;else a=0-a&7;L=b-a|0;k[15482]=f+a;k[15479]=L;k[f+(a+4)>>2]=L|1;k[f+(b+4)>>2]=40;k[15483]=k[15598];break}a=k[15480]|0;if(v>>>0>>0){k[15480]=v;l=v}else l=a;a=v+p|0;d=62352|0;do{if((k[d>>2]|0)==(a|0)){F=d;G=d;E=223;break}d=k[d+8>>2]|0}while((d|0)!=0);if((E|0)==223?(k[G+12>>2]&8|0)==0:0){k[F>>2]=v;a=G+4|0;k[a>>2]=(k[a>>2]|0)+p;a=v+8|0;if(!(a&7))o=0;else o=0-a&7;a=v+(p+8)|0;if(!(a&7))g=0;else g=0-a&7;a=v+(g+p)|0;m=o+q|0;n=v+m|0;j=a-(v+o)-q|0;k[v+(o+4)>>2]=q|3;h:do if((a|0)!=(f|0)){if((a|0)==(k[15481]|0)){L=(k[15478]|0)+j|0;k[15478]=L;k[15481]=n;k[v+(m+4)>>2]=L|1;k[v+(L+m)>>2]=L;break}f=p+4|0;h=k[v+(f+g)>>2]|0;if((h&3|0)==1){e=h&-8;c=h>>>3;i:do if(h>>>0>=256){i=k[v+((g|24)+p)>>2]|0;b=k[v+(p+12+g)>>2]|0;do if((b|0)==(a|0)){b=g|16;d=v+(f+b)|0;h=k[d>>2]|0;if(!h){d=v+(b+p)|0;h=k[d>>2]|0;if(!h){L=0;break}}while(1){b=h+20|0;c=k[b>>2]|0;if(c){h=c;d=b;continue}b=h+16|0;c=k[b>>2]|0;if(!c)break;else{h=c;d=b}}if(d>>>0>>0)Ob();else{k[d>>2]=0;L=h;break}}else{c=k[v+((g|8)+p)>>2]|0;if(c>>>0>>0)Ob();h=c+12|0;if((k[h>>2]|0)!=(a|0))Ob();d=b+8|0;if((k[d>>2]|0)==(a|0)){k[h>>2]=b;k[d>>2]=c;L=b;break}else Ob()}while(0);if(!i)break;h=k[v+(p+28+g)>>2]|0;d=62208+(h<<2)|0;do if((a|0)!=(k[d>>2]|0)){if(i>>>0<(k[15480]|0)>>>0)Ob();h=i+16|0;if((k[h>>2]|0)==(a|0))k[h>>2]=L;else k[i+20>>2]=L;if(!L)break i}else{k[d>>2]=L;if(L)break;k[15477]=k[15477]&~(1<>>0>>0)Ob();k[L+24>>2]=i;a=g|16;h=k[v+(a+p)>>2]|0;do if(h)if(h>>>0>>0)Ob();else{k[L+16>>2]=h;k[h+24>>2]=L;break}while(0);a=k[v+(f+a)>>2]|0;if(!a)break;if(a>>>0<(k[15480]|0)>>>0)Ob();else{k[L+20>>2]=a;k[a+24>>2]=L;break}}else{d=k[v+((g|8)+p)>>2]|0;b=k[v+(p+12+g)>>2]|0;h=61944+(c<<1<<2)|0;do if((d|0)!=(h|0)){if(d>>>0>>0)Ob();if((k[d+12>>2]|0)==(a|0))break;Ob()}while(0);if((b|0)==(d|0)){k[15476]=k[15476]&~(1<>>0>>0)Ob();h=b+8|0;if((k[h>>2]|0)==(a|0)){H=h;break}Ob()}while(0);k[d+12>>2]=b;k[H>>2]=d}while(0);a=v+((e|g)+p)|0;h=e+j|0}else h=j;a=a+4|0;k[a>>2]=k[a>>2]&-2;k[v+(m+4)>>2]=h|1;k[v+(h+m)>>2]=h;a=h>>>3;if(h>>>0<256){d=a<<1;c=61944+(d<<2)|0;b=k[15476]|0;a=1<>2]|0;if(d>>>0>=(k[15480]|0)>>>0){M=a;N=d;break}Ob()}while(0);k[M>>2]=n;k[N+12>>2]=n;k[v+(m+8)>>2]=N;k[v+(m+12)>>2]=c;break}a=h>>>8;do if(!a)c=0;else{if(h>>>0>16777215){c=31;break}K=(a+1048320|0)>>>16&8;L=a<>>16&4;L=L<>>16&2;c=14-(H|K|c)+(L<>>15)|0;c=h>>>(c+7|0)&1|c<<1}while(0);a=62208+(c<<2)|0;k[v+(m+28)>>2]=c;k[v+(m+20)>>2]=0;k[v+(m+16)>>2]=0;d=k[15477]|0;b=1<>2]=n;k[v+(m+24)>>2]=a;k[v+(m+12)>>2]=n;k[v+(m+8)>>2]=n;break}a=k[a>>2]|0;if((c|0)==31)d=0;else d=25-(c>>>1)|0;j:do if((k[a+4>>2]&-8|0)!=(h|0)){c=h<>>31<<2)+16|0;d=k[b>>2]|0;if(!d)break;if((k[d+4>>2]&-8|0)==(h|0)){O=d;break j}else{c=c<<1;a=d}}if(b>>>0<(k[15480]|0)>>>0)Ob();else{k[b>>2]=n;k[v+(m+24)>>2]=a;k[v+(m+12)>>2]=n;k[v+(m+8)>>2]=n;break h}}else O=a;while(0);a=O+8|0;b=k[a>>2]|0;L=k[15480]|0;if(O>>>0>=L>>>0&b>>>0>=L>>>0){k[b+12>>2]=n;k[a>>2]=n;k[v+(m+8)>>2]=b;k[v+(m+12)>>2]=O;k[v+(m+24)>>2]=0;break}else Ob()}else{L=(k[15479]|0)+j|0;k[15479]=L;k[15482]=n;k[v+(m+4)>>2]=L|1}while(0);L=v+(o|8)|0;return L|0}d=62352|0;while(1){a=k[d>>2]|0;if(a>>>0<=f>>>0?(b=k[d+4>>2]|0,h=a+b|0,h>>>0>f>>>0):0)break;d=k[d+8>>2]|0}d=a+(b+-39)|0;if(!(d&7))d=0;else d=0-d&7;b=a+(b+-47+d)|0;b=b>>>0<(f+16|0)>>>0?f:b;d=b+8|0;a=v+8|0;if(!(a&7))a=0;else a=0-a&7;L=p+-40-a|0;k[15482]=v+a;k[15479]=L;k[v+(a+4)>>2]=L|1;k[v+(p+-36)>>2]=40;k[15483]=k[15598];k[b+4>>2]=27;k[d+0>>2]=k[15588];k[d+4>>2]=k[15589];k[d+8>>2]=k[15590];k[d+12>>2]=k[15591];k[15588]=v;k[15589]=p;k[15591]=0;k[15590]=d;a=b+28|0;k[a>>2]=7;if((b+32|0)>>>0>>0)do{L=a;a=a+4|0;k[a>>2]=7}while((L+8|0)>>>0>>0);if((b|0)!=(f|0)){h=b-f|0;a=f+(h+4)|0;k[a>>2]=k[a>>2]&-2;k[f+4>>2]=h|1;k[f+h>>2]=h;a=h>>>3;if(h>>>0<256){d=a<<1;c=61944+(d<<2)|0;b=k[15476]|0;a=1<>2]|0;if(b>>>0>=(k[15480]|0)>>>0){I=a;J=b;break}Ob()}while(0);k[I>>2]=f;k[J+12>>2]=f;k[f+8>>2]=J;k[f+12>>2]=c;break}a=h>>>8;if(a)if(h>>>0>16777215)d=31;else{H=(a+1048320|0)>>>16&8;L=a<>>16&4;L=L<>>16&2;d=14-(G|H|d)+(L<>>15)|0;d=h>>>(d+7|0)&1|d<<1}else d=0;a=62208+(d<<2)|0;k[f+28>>2]=d;k[f+20>>2]=0;k[f+16>>2]=0;b=k[15477]|0;c=1<>2]=f;k[f+24>>2]=a;k[f+12>>2]=f;k[f+8>>2]=f;break}a=k[a>>2]|0;if((d|0)==31)b=0;else b=25-(d>>>1)|0;k:do if((k[a+4>>2]&-8|0)!=(h|0)){d=h<>>31<<2)+16|0;c=k[b>>2]|0;if(!c)break;if((k[c+4>>2]&-8|0)==(h|0)){K=c;break k}else{d=d<<1;a=c}}if(b>>>0<(k[15480]|0)>>>0)Ob();else{k[b>>2]=f;k[f+24>>2]=a;k[f+12>>2]=f;k[f+8>>2]=f;break g}}else K=a;while(0);a=K+8|0;b=k[a>>2]|0;L=k[15480]|0;if(K>>>0>=L>>>0&b>>>0>=L>>>0){k[b+12>>2]=f;k[a>>2]=f;k[f+8>>2]=b;k[f+12>>2]=K;k[f+24>>2]=0;break}else Ob()}}else{L=k[15480]|0;if((L|0)==0|v>>>0>>0)k[15480]=v;k[15588]=v;k[15589]=p;k[15591]=0;k[15485]=k[15594];k[15484]=-1;a=0;do{L=a<<1;K=61944+(L<<2)|0;k[61944+(L+3<<2)>>2]=K;k[61944+(L+2<<2)>>2]=K;a=a+1|0}while((a|0)!=32);a=v+8|0;if(!(a&7))a=0;else a=0-a&7;L=p+-40-a|0;k[15482]=v+a;k[15479]=L;k[v+(a+4)>>2]=L|1;k[v+(p+-36)>>2]=40;k[15483]=k[15598]}while(0);a=k[15479]|0;if(a>>>0>q>>>0){K=a-q|0;k[15479]=K;L=k[15482]|0;k[15482]=L+q;k[L+(q+4)>>2]=K|1;k[L+4>>2]=q|3;L=L+8|0;return L|0}}L=ac()|0;k[L>>2]=12;L=0;return L|0}function ym(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if(!a)return;b=a+-8|0;h=k[15480]|0;if(b>>>0>>0)Ob();e=k[a+-4>>2]|0;c=e&3;if((c|0)==1)Ob();o=e&-8;q=a+(o+-8)|0;do if(!(e&1)){b=k[b>>2]|0;if(!c)return;i=-8-b|0;l=a+i|0;m=b+o|0;if(l>>>0>>0)Ob();if((l|0)==(k[15481]|0)){b=a+(o+-4)|0;e=k[b>>2]|0;if((e&3|0)!=3){u=l;f=m;break}k[15478]=m;k[b>>2]=e&-2;k[a+(i+4)>>2]=m|1;k[q>>2]=m;return}d=b>>>3;if(b>>>0<256){c=k[a+(i+8)>>2]|0;e=k[a+(i+12)>>2]|0;b=61944+(d<<1<<2)|0;if((c|0)!=(b|0)){if(c>>>0>>0)Ob();if((k[c+12>>2]|0)!=(l|0))Ob()}if((e|0)==(c|0)){k[15476]=k[15476]&~(1<>>0>>0)Ob();b=e+8|0;if((k[b>>2]|0)==(l|0))g=b;else Ob()}else g=e+8|0;k[c+12>>2]=e;k[g>>2]=c;u=l;f=m;break}g=k[a+(i+24)>>2]|0;c=k[a+(i+12)>>2]|0;do if((c|0)==(l|0)){e=a+(i+20)|0;b=k[e>>2]|0;if(!b){e=a+(i+16)|0;b=k[e>>2]|0;if(!b){j=0;break}}while(1){c=b+20|0;d=k[c>>2]|0;if(d){b=d;e=c;continue}c=b+16|0;d=k[c>>2]|0;if(!d)break;else{b=d;e=c}}if(e>>>0>>0)Ob();else{k[e>>2]=0;j=b;break}}else{d=k[a+(i+8)>>2]|0;if(d>>>0>>0)Ob();b=d+12|0;if((k[b>>2]|0)!=(l|0))Ob();e=c+8|0;if((k[e>>2]|0)==(l|0)){k[b>>2]=c;k[e>>2]=d;j=c;break}else Ob()}while(0);if(g){b=k[a+(i+28)>>2]|0;e=62208+(b<<2)|0;if((l|0)==(k[e>>2]|0)){k[e>>2]=j;if(!j){k[15477]=k[15477]&~(1<>>0<(k[15480]|0)>>>0)Ob();b=g+16|0;if((k[b>>2]|0)==(l|0))k[b>>2]=j;else k[g+20>>2]=j;if(!j){u=l;f=m;break}}e=k[15480]|0;if(j>>>0>>0)Ob();k[j+24>>2]=g;b=k[a+(i+16)>>2]|0;do if(b)if(b>>>0>>0)Ob();else{k[j+16>>2]=b;k[b+24>>2]=j;break}while(0);b=k[a+(i+20)>>2]|0;if(b)if(b>>>0<(k[15480]|0)>>>0)Ob();else{k[j+20>>2]=b;k[b+24>>2]=j;u=l;f=m;break}else{u=l;f=m}}else{u=l;f=m}}else{u=b;f=o}while(0);if(u>>>0>=q>>>0)Ob();b=a+(o+-4)|0;e=k[b>>2]|0;if(!(e&1))Ob();if(!(e&2)){if((q|0)==(k[15482]|0)){t=(k[15479]|0)+f|0;k[15479]=t;k[15482]=u;k[u+4>>2]=t|1;if((u|0)!=(k[15481]|0))return;k[15481]=0;k[15478]=0;return}if((q|0)==(k[15481]|0)){t=(k[15478]|0)+f|0;k[15478]=t;k[15481]=u;k[u+4>>2]=t|1;k[u+t>>2]=t;return}f=(e&-8)+f|0;d=e>>>3;do if(e>>>0>=256){g=k[a+(o+16)>>2]|0;b=k[a+(o|4)>>2]|0;do if((b|0)==(q|0)){e=a+(o+12)|0;b=k[e>>2]|0;if(!b){e=a+(o+8)|0;b=k[e>>2]|0;if(!b){p=0;break}}while(1){c=b+20|0;d=k[c>>2]|0;if(d){b=d;e=c;continue}c=b+16|0;d=k[c>>2]|0;if(!d)break;else{b=d;e=c}}if(e>>>0<(k[15480]|0)>>>0)Ob();else{k[e>>2]=0;p=b;break}}else{e=k[a+o>>2]|0;if(e>>>0<(k[15480]|0)>>>0)Ob();c=e+12|0;if((k[c>>2]|0)!=(q|0))Ob();d=b+8|0;if((k[d>>2]|0)==(q|0)){k[c>>2]=b;k[d>>2]=e;p=b;break}else Ob()}while(0);if(g){b=k[a+(o+20)>>2]|0;e=62208+(b<<2)|0;if((q|0)==(k[e>>2]|0)){k[e>>2]=p;if(!p){k[15477]=k[15477]&~(1<>>0<(k[15480]|0)>>>0)Ob();b=g+16|0;if((k[b>>2]|0)==(q|0))k[b>>2]=p;else k[g+20>>2]=p;if(!p)break}e=k[15480]|0;if(p>>>0>>0)Ob();k[p+24>>2]=g;b=k[a+(o+8)>>2]|0;do if(b)if(b>>>0>>0)Ob();else{k[p+16>>2]=b;k[b+24>>2]=p;break}while(0);b=k[a+(o+12)>>2]|0;if(b)if(b>>>0<(k[15480]|0)>>>0)Ob();else{k[p+20>>2]=b;k[b+24>>2]=p;break}}}else{c=k[a+o>>2]|0;e=k[a+(o|4)>>2]|0;b=61944+(d<<1<<2)|0;if((c|0)!=(b|0)){if(c>>>0<(k[15480]|0)>>>0)Ob();if((k[c+12>>2]|0)!=(q|0))Ob()}if((e|0)==(c|0)){k[15476]=k[15476]&~(1<>>0<(k[15480]|0)>>>0)Ob();b=e+8|0;if((k[b>>2]|0)==(q|0))n=b;else Ob()}else n=e+8|0;k[c+12>>2]=e;k[n>>2]=c}while(0);k[u+4>>2]=f|1;k[u+f>>2]=f;if((u|0)==(k[15481]|0)){k[15478]=f;return}}else{k[b>>2]=e&-2;k[u+4>>2]=f|1;k[u+f>>2]=f}b=f>>>3;if(f>>>0<256){c=b<<1;e=61944+(c<<2)|0;d=k[15476]|0;b=1<>2]|0;if(c>>>0<(k[15480]|0)>>>0)Ob();else{r=b;s=c}}else{k[15476]=d|b;r=61944+(c+2<<2)|0;s=e}k[r>>2]=u;k[s+12>>2]=u;k[u+8>>2]=s;k[u+12>>2]=e;return}b=f>>>8;if(b)if(f>>>0>16777215)e=31;else{r=(b+1048320|0)>>>16&8;s=b<>>16&4;s=s<>>16&2;e=14-(q|r|e)+(s<>>15)|0;e=f>>>(e+7|0)&1|e<<1}else e=0;b=62208+(e<<2)|0;k[u+28>>2]=e;k[u+20>>2]=0;k[u+16>>2]=0;c=k[15477]|0;d=1<>2]|0;if((e|0)==31)c=0;else c=25-(e>>>1)|0;b:do if((k[b+4>>2]&-8|0)!=(f|0)){e=f<>>31<<2)+16|0;d=k[c>>2]|0;if(!d)break;if((k[d+4>>2]&-8|0)==(f|0)){t=d;break b}else{e=e<<1;b=d}}if(c>>>0<(k[15480]|0)>>>0)Ob();else{k[c>>2]=u;k[u+24>>2]=b;k[u+12>>2]=u;k[u+8>>2]=u;break a}}else t=b;while(0);b=t+8|0;c=k[b>>2]|0;s=k[15480]|0;if(t>>>0>=s>>>0&c>>>0>=s>>>0){k[c+12>>2]=u;k[b>>2]=u;k[u+8>>2]=c;k[u+12>>2]=t;k[u+24>>2]=0;break}else Ob()}else{k[15477]=c|d;k[b>>2]=u;k[u+24>>2]=b;k[u+12>>2]=u;k[u+8>>2]=u}while(0);u=(k[15484]|0)+-1|0;k[15484]=u;if(!u)b=62360|0;else return;while(1){b=k[b>>2]|0;if(!b)break;else b=b+8|0}k[15484]=-1;return}function zm(a,b){a=a|0;b=b|0;var c=0,d=0;if(!a){a=xm(b)|0;return a|0}if(b>>>0>4294967231){a=ac()|0;k[a>>2]=12;a=0;return a|0}if(b>>>0<11)c=16;else c=b+11&-8;c=Pm(a+-8|0,c)|0;if(c){a=c+8|0;return a|0}c=xm(b)|0;if(!c){a=0;return a|0}d=k[a+-4>>2]|0;d=(d&-8)-((d&3|0)==0?8:4)|0;_m(c|0,a|0,(d>>>0>>0?d:b)|0)|0;ym(a);a=c;return a|0}function Am(a){a=a|0;return (a+-65|0)>>>0<26|0}function Bm(a){a=a|0;if((a+-48|0)>>>0<10){a=1;a=a&1;return a|0}a=((a|32)+-97|0)>>>0<6;a=a&1;return a|0}function Cm(a,b){a=+a;b=b|0;var c=0,d=0,e=0;p[t>>3]=a;c=k[t>>2]|0;d=k[t+4>>2]|0;e=Xm(c|0,d|0,52)|0;e=e&2047;if(!e){if(a!=0.0){a=+Cm(a*18446744073709552.0e3,b);c=(k[b>>2]|0)+-64|0}else c=0;k[b>>2]=c;return +a}else if((e|0)==2047)return +a;else{k[b>>2]=e+-1022;k[t>>2]=c;k[t+4>>2]=d&-2146435073|1071644672;a=+p[t>>3];return +a}return 0.0}function Dm(a,b){a=+a;b=b|0;return +(+Cm(a,b))}function Em(a,b){a=a|0;b=b|0;if(!a)a=0;else a=Fm(a,b,0)|0;return a|0}function Fm(a,b,c){a=a|0;b=b|0;c=c|0;if(!a){b=1;return b|0}if(b>>>0<128){i[a>>0]=b;b=1;return b|0}if(b>>>0<2048){i[a>>0]=b>>>6|192;i[a+1>>0]=b&63|128;b=2;return b|0}if(b>>>0<55296|(b&-8192|0)==57344){i[a>>0]=b>>>12|224;i[a+1>>0]=b>>>6&63|128;i[a+2>>0]=b&63|128;b=3;return b|0}if((b+-65536|0)>>>0<1048576){i[a>>0]=b>>>18|240;i[a+1>>0]=b>>>12&63|128;i[a+2>>0]=b>>>6&63|128;i[a+3>>0]=b&63|128;b=4;return b|0}else{b=ac()|0;k[b>>2]=84;b=-1;return b|0}return 0}function Gm(a){a=a|0;var b=0,c=0;b=a+74|0;c=i[b>>0]|0;i[b>>0]=c+255|c;b=k[a>>2]|0;if(!(b&8)){k[a+8>>2]=0;k[a+4>>2]=0;c=k[a+44>>2]|0;k[a+28>>2]=c;k[a+20>>2]=c;k[a+16>>2]=c+(k[a+48>>2]|0);c=0;return c|0}else{k[a>>2]=b|32;c=-1;return c|0}return 0}function Hm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=c+16|0;e=k[d>>2]|0;do if(!e)if(!(Gm(c)|0)){e=k[d>>2]|0;break}else{g=0;return g|0}while(0);g=c+20|0;f=k[g>>2]|0;if((e-f|0)>>>0>>0){g=kc[k[c+36>>2]&31](c,a,b)|0;return g|0}a:do if((i[c+75>>0]|0)>-1){d=b;while(1){if(!d){e=f;d=0;break a}e=d+-1|0;if((i[a+e>>0]|0)==10)break;else d=e}if((kc[k[c+36>>2]&31](c,a,d)|0)>>>0>>0){g=d;return g|0}else{b=b-d|0;a=a+d|0;e=k[g>>2]|0;break}}else{e=f;d=0}while(0);_m(e|0,a|0,b|0)|0;k[g>>2]=(k[g>>2]|0)+b;g=d+b|0;return g|0}function Im(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;a=Km(a,b,c,f)|0;r=e;return a|0}function Jm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+224|0;j=o+120|0;n=o+80|0;m=o;l=o+136|0;d=n+0|0;e=d+40|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));k[j>>2]=k[c>>2];if((Rm(0,b,j,m,n)|0)<0){a=-1;r=o;return a|0}e=a+48|0;if(!(k[e>>2]|0)){f=a+44|0;g=k[f>>2]|0;k[f>>2]=l;h=a+28|0;k[h>>2]=l;i=a+20|0;k[i>>2]=l;k[e>>2]=80;d=a+16|0;k[d>>2]=l+80;c=Rm(a,b,j,m,n)|0;if(g){kc[k[a+36>>2]&31](a,0,0)|0;c=(k[i>>2]|0)==0?-1:c;k[f>>2]=g;k[e>>2]=0;k[d>>2]=0;k[h>>2]=0;k[i>>2]=0}}else c=Rm(a,b,j,m,n)|0;a=c;r=o;return a|0}function Km(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+128|0;e=l+112|0;j=l;f=j+0|0;g=62968|0;h=f+112|0;do{k[f>>2]=k[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));if((b+-1|0)>>>0>2147483646)if(!b){a=e;b=1}else{d=ac()|0;k[d>>2]=75;d=-1;r=l;return d|0}g=-2-a|0;g=b>>>0>g>>>0?g:b;k[j+48>>2]=g;e=j+20|0;k[e>>2]=a;k[j+44>>2]=a;b=a+g|0;a=j+16|0;k[a>>2]=b;k[j+28>>2]=b;b=Jm(j,c,d)|0;if(!g){d=b;r=l;return d|0}d=k[e>>2]|0;i[d+(((d|0)==(k[a>>2]|0))<<31>>31)>>0]=0;d=b;r=l;return d|0}function Lm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;f=b&255;d=(c|0)!=0;a:do if((a&3|0)!=0&d){e=b&255;while(1){if((i[a>>0]|0)==e<<24>>24){e=6;break a}a=a+1|0;c=c+-1|0;d=(c|0)!=0;if(!((a&3|0)!=0&d)){e=5;break}}}else e=5;while(0);if((e|0)==5)if(d)e=6;else c=0;b:do if((e|0)==6){e=b&255;if((i[a>>0]|0)!=e<<24>>24){d=ka(f,16843009)|0;c:do if(c>>>0>3)do{f=k[a>>2]^d;if((f&-2139062144^-2139062144)&f+-16843009)break c;a=a+4|0;c=c+-4|0}while(c>>>0>3);while(0);if(!c)c=0;else while(1){if((i[a>>0]|0)==e<<24>>24)break b;a=a+1|0;c=c+-1|0;if(!c){c=0;break}}}}while(0);return ((c|0)!=0?a:0)|0}function Mm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(!c){f=0;return f|0}else{e=c;d=a}while(1){a=i[d>>0]|0;c=i[b>>0]|0;if(a<<24>>24!=c<<24>>24)break;e=e+-1|0;if(!e){c=0;f=5;break}else{d=d+1|0;b=b+1|0}}if((f|0)==5)return c|0;f=(a&255)-(c&255)|0;return f|0}function Nm(a,b){a=a|0;b=b|0;var c=0,d=0;d=i[a>>0]|0;c=i[b>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=c<<24>>24)b=d;else{do{a=a+1|0;b=b+1|0;d=i[a>>0]|0;c=i[b>>0]|0}while(!(d<<24>>24==0?1:d<<24>>24!=c<<24>>24));b=d}return (b&255)-(c&255)|0}function Om(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(!c){d=0;return d|0}d=i[a>>0]|0;a:do if(!(d<<24>>24))d=0;else while(1){c=c+-1|0;e=i[b>>0]|0;if(!(e<<24>>24!=0&(c|0)!=0&d<<24>>24==e<<24>>24))break a;a=a+1|0;b=b+1|0;d=i[a>>0]|0;if(!(d<<24>>24)){d=0;break}}while(0);e=(d&255)-(l[b>>0]|0)|0;return e|0}function Pm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;o=a+4|0;p=k[o>>2]|0;i=p&-8;l=a+i|0;h=k[15480]|0;c=p&3;if(!((c|0)!=1&a>>>0>=h>>>0&a>>>0>>0))Ob();d=a+(i|4)|0;f=k[d>>2]|0;if(!(f&1))Ob();if(!c){if(b>>>0<256){a=0;return a|0}if(i>>>0>=(b+4|0)>>>0?(i-b|0)>>>0<=k[15596]<<1>>>0:0)return a|0;a=0;return a|0}if(i>>>0>=b>>>0){c=i-b|0;if(c>>>0<=15)return a|0;k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=c|3;k[d>>2]=k[d>>2]|1;Qm(a+b|0,c);return a|0}if((l|0)==(k[15482]|0)){c=(k[15479]|0)+i|0;if(c>>>0<=b>>>0){a=0;return a|0}n=c-b|0;k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=n|1;k[15482]=a+b;k[15479]=n;return a|0}if((l|0)==(k[15481]|0)){d=(k[15478]|0)+i|0;if(d>>>0>>0){a=0;return a|0}c=d-b|0;if(c>>>0>15){k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=c|1;k[a+d>>2]=c;d=a+(d+4)|0;k[d>>2]=k[d>>2]&-2;d=a+b|0}else{k[o>>2]=p&1|d|2;d=a+(d+4)|0;k[d>>2]=k[d>>2]|1;d=0;c=0}k[15478]=c;k[15481]=d;return a|0}if(f&2){a=0;return a|0}m=(f&-8)+i|0;if(m>>>0>>0){a=0;return a|0}n=m-b|0;e=f>>>3;do if(f>>>0>=256){g=k[a+(i+24)>>2]|0;f=k[a+(i+12)>>2]|0;do if((f|0)==(l|0)){d=a+(i+20)|0;c=k[d>>2]|0;if(!c){d=a+(i+16)|0;c=k[d>>2]|0;if(!c){j=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}f=c+16|0;e=k[f>>2]|0;if(!e)break;else{c=e;d=f}}if(d>>>0>>0)Ob();else{k[d>>2]=0;j=c;break}}else{e=k[a+(i+8)>>2]|0;if(e>>>0>>0)Ob();c=e+12|0;if((k[c>>2]|0)!=(l|0))Ob();d=f+8|0;if((k[d>>2]|0)==(l|0)){k[c>>2]=f;k[d>>2]=e;j=f;break}else Ob()}while(0);if(g){c=k[a+(i+28)>>2]|0;d=62208+(c<<2)|0;if((l|0)==(k[d>>2]|0)){k[d>>2]=j;if(!j){k[15477]=k[15477]&~(1<>>0<(k[15480]|0)>>>0)Ob();c=g+16|0;if((k[c>>2]|0)==(l|0))k[c>>2]=j;else k[g+20>>2]=j;if(!j)break}d=k[15480]|0;if(j>>>0>>0)Ob();k[j+24>>2]=g;c=k[a+(i+16)>>2]|0;do if(c)if(c>>>0>>0)Ob();else{k[j+16>>2]=c;k[c+24>>2]=j;break}while(0);c=k[a+(i+20)>>2]|0;if(c)if(c>>>0<(k[15480]|0)>>>0)Ob();else{k[j+20>>2]=c;k[c+24>>2]=j;break}}}else{f=k[a+(i+8)>>2]|0;d=k[a+(i+12)>>2]|0;c=61944+(e<<1<<2)|0;if((f|0)!=(c|0)){if(f>>>0>>0)Ob();if((k[f+12>>2]|0)!=(l|0))Ob()}if((d|0)==(f|0)){k[15476]=k[15476]&~(1<>>0>>0)Ob();c=d+8|0;if((k[c>>2]|0)==(l|0))g=c;else Ob()}else g=d+8|0;k[f+12>>2]=d;k[g>>2]=f}while(0);if(n>>>0<16){k[o>>2]=m|p&1|2;b=a+(m|4)|0;k[b>>2]=k[b>>2]|1;return a|0}else{k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=n|3;p=a+(m|4)|0;k[p>>2]=k[p>>2]|1;Qm(a+b|0,n);return a|0}return 0}function Qm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;q=a+b|0;c=k[a+4>>2]|0;do if(!(c&1)){j=k[a>>2]|0;if(!(c&3))return;n=a+(0-j)|0;m=j+b|0;i=k[15480]|0;if(n>>>0>>0)Ob();if((n|0)==(k[15481]|0)){f=a+(b+4)|0;c=k[f>>2]|0;if((c&3|0)!=3){t=n;g=m;break}k[15478]=m;k[f>>2]=c&-2;k[a+(4-j)>>2]=m|1;k[q>>2]=m;return}e=j>>>3;if(j>>>0<256){d=k[a+(8-j)>>2]|0;f=k[a+(12-j)>>2]|0;c=61944+(e<<1<<2)|0;if((d|0)!=(c|0)){if(d>>>0>>0)Ob();if((k[d+12>>2]|0)!=(n|0))Ob()}if((f|0)==(d|0)){k[15476]=k[15476]&~(1<>>0>>0)Ob();c=f+8|0;if((k[c>>2]|0)==(n|0))h=c;else Ob()}else h=f+8|0;k[d+12>>2]=f;k[h>>2]=d;t=n;g=m;break}h=k[a+(24-j)>>2]|0;d=k[a+(12-j)>>2]|0;do if((d|0)==(n|0)){d=16-j|0;f=a+(d+4)|0;c=k[f>>2]|0;if(!c){f=a+d|0;c=k[f>>2]|0;if(!c){l=0;break}}while(1){d=c+20|0;e=k[d>>2]|0;if(e){c=e;f=d;continue}d=c+16|0;e=k[d>>2]|0;if(!e)break;else{c=e;f=d}}if(f>>>0>>0)Ob();else{k[f>>2]=0;l=c;break}}else{e=k[a+(8-j)>>2]|0;if(e>>>0>>0)Ob();c=e+12|0;if((k[c>>2]|0)!=(n|0))Ob();f=d+8|0;if((k[f>>2]|0)==(n|0)){k[c>>2]=d;k[f>>2]=e;l=d;break}else Ob()}while(0);if(h){c=k[a+(28-j)>>2]|0;f=62208+(c<<2)|0;if((n|0)==(k[f>>2]|0)){k[f>>2]=l;if(!l){k[15477]=k[15477]&~(1<>>0<(k[15480]|0)>>>0)Ob();c=h+16|0;if((k[c>>2]|0)==(n|0))k[c>>2]=l;else k[h+20>>2]=l;if(!l){t=n;g=m;break}}d=k[15480]|0;if(l>>>0>>0)Ob();k[l+24>>2]=h;c=16-j|0;f=k[a+c>>2]|0;do if(f)if(f>>>0>>0)Ob();else{k[l+16>>2]=f;k[f+24>>2]=l;break}while(0);c=k[a+(c+4)>>2]|0;if(c)if(c>>>0<(k[15480]|0)>>>0)Ob();else{k[l+20>>2]=c;k[c+24>>2]=l;t=n;g=m;break}else{t=n;g=m}}else{t=n;g=m}}else{t=a;g=b}while(0);i=k[15480]|0;if(q>>>0>>0)Ob();c=a+(b+4)|0;f=k[c>>2]|0;if(!(f&2)){if((q|0)==(k[15482]|0)){s=(k[15479]|0)+g|0;k[15479]=s;k[15482]=t;k[t+4>>2]=s|1;if((t|0)!=(k[15481]|0))return;k[15481]=0;k[15478]=0;return}if((q|0)==(k[15481]|0)){s=(k[15478]|0)+g|0;k[15478]=s;k[15481]=t;k[t+4>>2]=s|1;k[t+s>>2]=s;return}g=(f&-8)+g|0;e=f>>>3;do if(f>>>0>=256){h=k[a+(b+24)>>2]|0;d=k[a+(b+12)>>2]|0;do if((d|0)==(q|0)){f=a+(b+20)|0;c=k[f>>2]|0;if(!c){f=a+(b+16)|0;c=k[f>>2]|0;if(!c){p=0;break}}while(1){d=c+20|0;e=k[d>>2]|0;if(e){c=e;f=d;continue}d=c+16|0;e=k[d>>2]|0;if(!e)break;else{c=e;f=d}}if(f>>>0>>0)Ob();else{k[f>>2]=0;p=c;break}}else{e=k[a+(b+8)>>2]|0;if(e>>>0>>0)Ob();c=e+12|0;if((k[c>>2]|0)!=(q|0))Ob();f=d+8|0;if((k[f>>2]|0)==(q|0)){k[c>>2]=d;k[f>>2]=e;p=d;break}else Ob()}while(0);if(h){c=k[a+(b+28)>>2]|0;f=62208+(c<<2)|0;if((q|0)==(k[f>>2]|0)){k[f>>2]=p;if(!p){k[15477]=k[15477]&~(1<>>0<(k[15480]|0)>>>0)Ob();c=h+16|0;if((k[c>>2]|0)==(q|0))k[c>>2]=p;else k[h+20>>2]=p;if(!p)break}f=k[15480]|0;if(p>>>0>>0)Ob();k[p+24>>2]=h;c=k[a+(b+16)>>2]|0;do if(c)if(c>>>0>>0)Ob();else{k[p+16>>2]=c;k[c+24>>2]=p;break}while(0);c=k[a+(b+20)>>2]|0;if(c)if(c>>>0<(k[15480]|0)>>>0)Ob();else{k[p+20>>2]=c;k[c+24>>2]=p;break}}}else{d=k[a+(b+8)>>2]|0;f=k[a+(b+12)>>2]|0;c=61944+(e<<1<<2)|0;if((d|0)!=(c|0)){if(d>>>0>>0)Ob();if((k[d+12>>2]|0)!=(q|0))Ob()}if((f|0)==(d|0)){k[15476]=k[15476]&~(1<>>0>>0)Ob();c=f+8|0;if((k[c>>2]|0)==(q|0))o=c;else Ob()}else o=f+8|0;k[d+12>>2]=f;k[o>>2]=d}while(0);k[t+4>>2]=g|1;k[t+g>>2]=g;if((t|0)==(k[15481]|0)){k[15478]=g;return}}else{k[c>>2]=f&-2;k[t+4>>2]=g|1;k[t+g>>2]=g}c=g>>>3;if(g>>>0<256){f=c<<1;e=61944+(f<<2)|0;d=k[15476]|0;c=1<>2]|0;if(d>>>0<(k[15480]|0)>>>0)Ob();else{r=c;s=d}}else{k[15476]=d|c;r=61944+(f+2<<2)|0;s=e}k[r>>2]=t;k[s+12>>2]=t;k[t+8>>2]=s;k[t+12>>2]=e;return}c=g>>>8;if(c)if(g>>>0>16777215)f=31;else{r=(c+1048320|0)>>>16&8;s=c<>>16&4;s=s<>>16&2;f=14-(q|r|f)+(s<>>15)|0;f=g>>>(f+7|0)&1|f<<1}else f=0;c=62208+(f<<2)|0;k[t+28>>2]=f;k[t+20>>2]=0;k[t+16>>2]=0;d=k[15477]|0;e=1<>2]=t;k[t+24>>2]=c;k[t+12>>2]=t;k[t+8>>2]=t;return}c=k[c>>2]|0;if((f|0)==31)d=0;else d=25-(f>>>1)|0;a:do if((k[c+4>>2]&-8|0)!=(g|0)){f=g<>>31<<2)+16|0;e=k[d>>2]|0;if(!e)break;if((k[e+4>>2]&-8|0)==(g|0)){c=e;break a}else{f=f<<1;c=e}}if(d>>>0<(k[15480]|0)>>>0)Ob();k[d>>2]=t;k[t+24>>2]=c;k[t+12>>2]=t;k[t+8>>2]=t;return}while(0);d=c+8|0;e=k[d>>2]|0;s=k[15480]|0;if(!(c>>>0>=s>>>0&e>>>0>=s>>>0))Ob();k[e+12>>2]=t;k[d>>2]=t;k[t+8>>2]=e;k[t+12>>2]=c;k[t+24>>2]=0;return}function Rm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,m=0,n=0,o=0.0,q=0,s=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0;hb=r;r=r+864|0;Pa=hb+16|0;Sa=hb;Qa=hb+832|0;la=Qa;Ma=hb+816|0;Za=hb+520|0;Ia=hb+776|0;db=hb+8|0;Wa=hb+828|0;ma=(a|0)!=0;Da=Ia+40|0;Ha=Da;Ia=Ia+39|0;Ja=db+4|0;Ka=db;La=Ma+12|0;Ma=Ma+11|0;Na=La;na=Na-la|0;va=-2-la|0;wa=Na+2|0;xa=Pa+288|0;ya=Qa+9|0;za=ya;Aa=Qa+8|0;B=0;C=0;q=0;h=0;u=0;a:while(1){do if((q|0)>-1)if((h|0)>(2147483647-q|0)){$=ac()|0;k[$>>2]=75;$=-1;break}else{$=h+q|0;break}else $=q;while(0);h=i[b>>0]|0;if(!(h<<24>>24)){Ra=$;Va=u;N=351;break}else m=b;while(1){if(!(h<<24>>24)){ia=m;ea=m;break}else if(h<<24>>24==37){Ua=m;eb=m;N=9;break}L=m+1|0;h=i[L>>0]|0;m=L}b:do if((N|0)==9)while(1){N=0;if((i[Ua+1>>0]|0)!=37){ia=Ua;ea=eb;break b}m=eb+1|0;h=Ua+2|0;if((i[h>>0]|0)==37){Ua=h;eb=m}else{ia=h;ea=m;break}}while(0);h=ea-b|0;if(ma)Hm(b,h,a)|0;if((ea|0)!=(b|0)){q=$;b=ia;continue}q=ia+1|0;n=i[q>>0]|0;m=(n<<24>>24)+-48|0;if(m>>>0<10){L=(i[ia+2>>0]|0)==36;q=L?ia+3|0:q;n=i[q>>0]|0;A=L?m:-1;u=L?1:u}else A=-1;m=n<<24>>24;c:do if((m&-32|0)==32){s=0;do{if(!(1<>24)+-32|s;q=q+1|0;n=i[q>>0]|0;m=n<<24>>24}while((m&-32|0)==32)}else s=0;while(0);do if(n<<24>>24==42){m=q+1|0;n=(i[m>>0]|0)+-48|0;if(n>>>0<10?(i[q+2>>0]|0)==36:0){k[e+(n<<2)>>2]=10;u=1;n=q+3|0;q=k[d+((i[m>>0]|0)+-48<<3)>>2]|0}else{if(u){fb=-1;N=369;break a}if(!ma){n=m;u=0;M=0;break}u=k[c>>2]|0;q=k[u>>2]|0;k[c>>2]=u+4;u=0;n=m}if((q|0)<0){s=s|8192;M=0-q|0}else M=q}else{m=(n<<24>>24)+-48|0;if(m>>>0<10){n=q;q=0;do{q=(q*10|0)+m|0;n=n+1|0;m=(i[n>>0]|0)+-48|0}while(m>>>0<10);if((q|0)<0){fb=-1;N=369;break a}else M=q}else{n=q;M=0}}while(0);d:do if((i[n>>0]|0)==46){m=n+1|0;q=i[m>>0]|0;if(q<<24>>24!=42){v=(q<<24>>24)+-48|0;if(v>>>0<10)q=0;else{n=m;D=0;break}while(1){q=(q*10|0)+v|0;n=n+2|0;v=(i[n>>0]|0)+-48|0;if(v>>>0>=10){D=q;break d}else{L=m;m=n;n=L}}}m=n+2|0;q=(i[m>>0]|0)+-48|0;if(q>>>0<10?(i[n+3>>0]|0)==36:0){k[e+(q<<2)>>2]=10;n=n+4|0;D=k[d+((i[m>>0]|0)+-48<<3)>>2]|0;break}if(u){fb=-1;N=369;break a}if(ma){n=k[c>>2]|0;D=k[n>>2]|0;k[c>>2]=n+4;n=m}else{n=m;D=0}}else D=-1;while(0);z=0;while(1){m=i[n>>0]|0;q=(m<<24>>24)+-65|0;if(q>>>0>57){fb=-1;N=369;break a}v=n+1|0;q=i[62400+(z*58|0)+q>>0]|0;w=q&255;if((w+-1|0)>>>0<8){n=v;z=w}else{L=v;y=q;v=w;w=z;break}}if(!(y<<24>>24)){fb=-1;N=369;break}q=(A|0)>-1;e:do if(y<<24>>24==19)if(q){fb=-1;N=369;break a}else{oa=B;pa=C;N=62}else{if(q){k[e+(A<<2)>>2]=v;pa=d+(A<<3)|0;oa=k[pa>>2]|0;pa=k[pa+4>>2]|0;N=62;break}if(!ma){fb=0;N=369;break a}if((y&255)>20){Ba=m;Ca=B;Ea=C}else do switch(v|0){case 18:{oa=k[c>>2]|0;k[t>>2]=k[oa>>2];k[t+4>>2]=k[oa+4>>2];x=+p[t>>3];k[c>>2]=oa+8;p[t>>3]=x;oa=k[t>>2]|0;pa=k[t+4>>2]|0;N=62;break e}case 17:{qa=k[c>>2]|0;k[t>>2]=k[qa>>2];k[t+4>>2]=k[qa+4>>2];x=+p[t>>3];k[c>>2]=qa+8;p[t>>3]=x;qa=k[t+4>>2]|0;ra=k[t>>2]|0;N=63;break e}case 9:{qa=k[c>>2]|0;ra=k[qa>>2]|0;k[c>>2]=qa+4;qa=C;N=63;break e}case 12:{N=k[c>>2]|0;qa=N;ra=k[qa>>2]|0;qa=k[qa+4>>2]|0;k[c>>2]=N+8;N=63;break e}case 13:{qa=k[c>>2]|0;ra=k[qa>>2]|0;k[c>>2]=qa+4;qa=(((ra&65535)<<16>>16|0)<0)<<31>>31;ra=ra<<16>>16;N=63;break e}case 15:{qa=k[c>>2]|0;ra=k[qa>>2]|0;k[c>>2]=qa+4;qa=(((ra&255)<<24>>24|0)<0)<<31>>31;ra=ra<<24>>24;N=63;break e}case 10:{qa=k[c>>2]|0;ra=k[qa>>2]|0;k[c>>2]=qa+4;qa=((ra|0)<0)<<31>>31;N=63;break e}case 11:{qa=k[c>>2]|0;ra=k[qa>>2]|0;k[c>>2]=qa+4;qa=0;N=63;break e}case 14:{qa=k[c>>2]|0;ra=k[qa>>2]|0;k[c>>2]=qa+4;qa=0;ra=ra&65535;N=63;break e}case 16:{qa=k[c>>2]|0;ra=k[qa>>2]|0;k[c>>2]=qa+4;qa=0;ra=ra&255;N=63;break e}default:{qa=C;ra=B;N=63;break e}}while(0)}while(0);if((N|0)==62){N=0;if(ma){qa=pa;ra=oa;N=63}else{B=oa;C=pa;q=$;b=L;continue}}if((N|0)==63){N=0;Ba=i[n>>0]|0;Ca=ra;Ea=qa}E=Ba<<24>>24;E=(w|0)!=0&(E&15|0)==3?E&-33:E;q=s&-65537;K=(s&8192|0)==0?s:q;f:do switch(E|0){case 105:case 100:{if((Ea|0)<0){Ga=Um(0,0,Ca|0,Ea|0)|0;Fa=O;_a=1;$a=62864;N=85;break f}if(!(K&2048)){$a=K&1;Fa=Ea;Ga=Ca;_a=$a;$a=($a|0)==0?62864:62866;N=85}else{Fa=Ea;Ga=Ca;_a=1;$a=62865;N=85}break}case 67:{k[db>>2]=Ca;k[Ja>>2]=0;sa=db;ta=Ka;Ya=-1;N=100;break}case 83:{b=Ca;if(!D){Z=Ca;_=b;Y=0;N=105}else{sa=b;ta=Ca;Ya=D;N=100}break}case 111:{m=(Ca|0)==0&(Ea|0)==0;if(m)f=Da;else{f=Da;b=Ca;h=Ea;do{f=f+-1|0;i[f>>0]=b&7|48;b=Xm(b|0,h|0,3)|0;h=O}while(!((b|0)==0&(h|0)==0))}S=(K&8|0)==0|m;T=Ca;U=Ea;P=K;Q=D;R=S&1^1;S=S?62864:62869;N=90;break}case 110:switch(w|0){case 4:{i[Ca>>0]=$;B=Ca;C=Ea;q=$;b=L;continue a}case 7:{B=Ca;k[B>>2]=$;k[B+4>>2]=(($|0)<0)<<31>>31;B=Ca;C=Ea;q=$;b=L;continue a}case 2:{B=Ca;k[B>>2]=$;k[B+4>>2]=(($|0)<0)<<31>>31;B=Ca;C=Ea;q=$;b=L;continue a}case 3:{j[Ca>>1]=$;B=Ca;C=Ea;q=$;b=L;continue a}case 6:{k[Ca>>2]=$;B=Ca;C=Ea;q=$;b=L;continue a}case 0:{k[Ca>>2]=$;B=Ca;C=Ea;q=$;b=L;continue a}case 1:{k[Ca>>2]=$;B=Ca;C=Ea;q=$;b=L;continue a}default:{B=Ca;C=Ea;q=$;b=L;continue a}}case 117:{Fa=Ea;Ga=Ca;_a=0;$a=62864;N=85;break}case 109:{Oa=ac()|0;Oa=fc(k[Oa>>2]|0)|0;N=95;break}case 88:case 120:{Ta=K;Xa=D;cb=E;N=74;break}case 99:{i[Ia>>0]=Ca;fa=Ca;ga=Ea;ha=Ia;g=q;ba=1;ca=0;da=62864;aa=Da;break}case 112:{Ta=K|8;Xa=D>>>0>8?D:8;cb=120;N=74;break}case 115:{Oa=(Ca|0)==0?62880:Ca;N=95;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{k[t>>2]=Ca;k[t+4>>2]=Ea;o=+p[t>>3];k[Sa>>2]=0;if((Ea|0)>=0)if(!(K&2048)){I=K&1;s=I;I=(I|0)==0?62889:62894}else{s=1;I=62891}else{o=-o;s=1;I=62888}p[t>>3]=o;J=k[t+4>>2]&2146435072;if(!(J>>>0<2146435072|(J|0)==2146435072&0<0)){b=(E&32|0)!=0;if(o!=o|0.0!=0.0){s=0;q=b?62928:62936}else q=b?62912:62920;n=s+3|0;m=(M|0)>(n|0);if((K&8192|0)==0&m){b=M-n|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}Hm(I,s,a)|0;Hm(q,3,a)|0;if((K&73728|0)==8192&m){b=M-n|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}B=Ca;C=Ea;q=$;b=L;h=m?M:n;continue a}x=+Dm(o,Sa)*2.0;q=x!=0.0;if(q)k[Sa>>2]=(k[Sa>>2]|0)+-1;C=E|32;if((C|0)==97){n=E&32;A=(n|0)==0?I:I+9|0;z=s|2;b=D>>>0>11?0:12-D|0;do if(b){o=8.0;do{b=b+-1|0;o=o*16.0}while((b|0)!=0);if((i[A>>0]|0)==45){o=-(o+(-x-o));break}else{o=x+o-o;break}}else o=x;while(0);q=k[Sa>>2]|0;q=(q|0)<0?0-q|0:q;if((q|0)<0){b=La;s=q;h=((q|0)<0)<<31>>31;while(1){q=ln(s|0,h|0,10,0)|0;b=b+-1|0;i[b>>0]=q|48;q=kn(s|0,h|0,10,0)|0;if(h>>>0>9|(h|0)==9&s>>>0>4294967295){s=q;h=O}else break}}else b=La;if(q)while(1){b=b+-1|0;i[b>>0]=(q>>>0)%10|0|48;if(q>>>0<10)break;else q=(q>>>0)/10|0}if((b|0)==(La|0)){i[Ma>>0]=48;b=Ma}i[b+-1>>0]=(k[Sa>>2]>>31&2)+43;y=b+-2|0;i[y>>0]=E+15;if((D|0)<1)if(!(K&8)){b=Qa;do{J=~~o;q=b+1|0;i[b>>0]=l[62944+J>>0]|n;o=(o-+(J|0))*16.0;if((q-la|0)!=1|o==0.0)b=q;else{i[q>>0]=46;b=b+2|0}}while(o!=0.0)}else{b=Qa;do{J=~~o;q=b+1|0;i[b>>0]=l[62944+J>>0]|n;o=(o-+(J|0))*16.0;if((q-la|0)==1){i[q>>0]=46;b=b+2|0}else b=q}while(o!=0.0)}else{b=Qa;do{J=~~o;q=b+1|0;i[b>>0]=l[62944+J>>0]|n;o=(o-+(J|0))*16.0;if((q-la|0)==1){i[q>>0]=46;b=b+2|0}else b=q}while(o!=0.0)}h=y;if((D|0)!=0&(va+b|0)<(D|0))s=wa+D-h|0;else s=na-h+b|0;w=s+z|0;m=K&73728;v=(M|0)>(w|0);if((m|0)==0&v){q=M-w|0;Ym(Za|0,32,(q>>>0>256?256:q)|0)|0;if(q>>>0>255){h=q;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);q=q&255}Hm(Za,q,a)|0}Hm(A,z,a)|0;if((m|0)==65536&v){h=M-w|0;Ym(Za|0,48,(h>>>0>256?256:h)|0)|0;if(h>>>0>255){n=h;do{Hm(Za,256,a)|0;n=n+-256|0}while(n>>>0>255);h=h&255}Hm(Za,h,a)|0}b=b-la|0;Hm(Qa,b,a)|0;q=Na-y|0;b=s-q-b|0;if((b|0)>0){Ym(Za|0,48,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}Hm(y,q,a)|0;if((m|0)==8192&v){b=M-w|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}B=Ca;C=Ea;q=$;b=L;h=v?M:w;continue a}b=(D|0)<0?6:D;if(q){q=(k[Sa>>2]|0)+-28|0;k[Sa>>2]=q;o=x*268435456.0}else{o=x;q=k[Sa>>2]|0}J=(q|0)<0?Pa:xa;H=J;q=J;do{G=~~o>>>0;k[q>>2]=G;q=q+4|0;o=(o-+(G>>>0))*1.0e9}while(o!=0.0);n=q;q=k[Sa>>2]|0;if((q|0)>0){h=q;q=J;do{w=(h|0)>29?29:h;m=n+-4|0;do if(m>>>0>=q>>>0){v=n;h=0;while(1){G=$m(k[m>>2]|0,0,w|0)|0;G=Vm(G|0,O|0,h|0,0)|0;h=O;F=ln(G|0,h|0,1e9,0)|0;k[m>>2]=F;h=kn(G|0,h|0,1e9,0)|0;v=v+-8|0;if(v>>>0>>0)break;else{G=m;m=v;v=G}}if(!h)break;q=q+-4|0;k[q>>2]=h}while(0);while(1){if(n>>>0<=q>>>0)break;h=n+-4|0;if(!(k[h>>2]|0))n=h;else break}h=(k[Sa>>2]|0)-w|0;k[Sa>>2]=h}while((h|0)>0)}else{h=q;q=J}g:do if((h|0)<0){A=((b+25|0)/9|0)+1|0;if((C|0)==102){z=J+(A<<2)|0;while(1){y=(h|0)<-9?9:0-h|0;do if(q>>>0>>0){m=(1<>>y;h=0;w=q;do{G=k[w>>2]|0;k[w>>2]=(G>>>y)+h;h=ka(G&m,v)|0;w=w+4|0}while(w>>>0>>0);q=(k[q>>2]|0)==0?q+4|0:q;if(!h)break;k[n>>2]=h;n=n+4|0}else q=(k[q>>2]|0)==0?q+4|0:q;while(0);n=(n-H>>2|0)>(A|0)?z:n;h=(k[Sa>>2]|0)+y|0;k[Sa>>2]=h;if((h|0)>=0){A=n;break g}}}do{y=(h|0)<-9?9:0-h|0;do if(q>>>0>>0){m=(1<>>y;h=0;w=q;do{G=k[w>>2]|0;k[w>>2]=(G>>>y)+h;h=ka(G&m,v)|0;w=w+4|0}while(w>>>0>>0);q=(k[q>>2]|0)==0?q+4|0:q;if(!h)break;k[n>>2]=h;n=n+4|0}else q=(k[q>>2]|0)==0?q+4|0:q;while(0);if((n-q>>2|0)>(A|0))n=q+(A<<2)|0;h=(k[Sa>>2]|0)+y|0;k[Sa>>2]=h}while((h|0)<0);A=n}else A=n;while(0);do if(q>>>0>>0){h=(H-q>>2)*9|0;m=k[q>>2]|0;if(m>>>0<10){z=h;break}else n=10;do{n=n*10|0;h=h+1|0}while(m>>>0>=n>>>0);z=h}else z=0;while(0);B=(C|0)==103;h=b-((C|0)!=102?z:0)+((B&(b|0)!=0)<<31>>31)|0;if((h|0)<(((A-H>>2)*9|0)+-9|0)){m=h+9216|0;w=(m|0)/9|0;h=J+(w+-1023<<2)|0;m=((m|0)%9|0)+1|0;if((m|0)<9){n=10;do{n=n*10|0;m=m+1|0}while((m|0)!=9);y=n}else y=10;m=k[h>>2]|0;v=(m>>>0)%(y>>>0)|0;if((v|0)==0?(J+(w+-1022<<2)|0)==(A|0):0){X=q;W=h;V=z}else N=231;do if((N|0)==231){N=0;x=(((m>>>0)/(y>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;n=(y|0)/2|0;do if(v>>>0>>0)o=.5;else{if((v|0)==(n|0)?(J+(w+-1022<<2)|0)==(A|0):0){o=1.0;break}o=1.5}while(0);do if(s){if((i[I>>0]|0)!=45)break;x=-x;o=-o}while(0);n=m-v|0;k[h>>2]=n;if(!(x+o!=x)){X=q;W=h;V=z;break}W=n+y|0;k[h>>2]=W;if(W>>>0>999999999)while(1){n=h+-4|0;k[h>>2]=0;if(n>>>0>>0){q=q+-4|0;k[q>>2]=0}W=(k[n>>2]|0)+1|0;k[n>>2]=W;if(W>>>0>999999999)h=n;else{h=n;break}}n=(H-q>>2)*9|0;v=k[q>>2]|0;if(v>>>0<10){X=q;W=h;V=n;break}else m=10;do{m=m*10|0;n=n+1|0}while(v>>>0>=m>>>0);X=q;W=h;V=n}while(0);h=W+4|0;q=X;z=V;h=A>>>0>h>>>0?h:A}else h=A;D=q;w=0-z|0;while(1){if(h>>>0<=q>>>0){C=0;G=h;break}n=h+-4|0;if(!(k[n>>2]|0))h=n;else{C=1;G=h;break}}do if(B){b=((b|0)==0&1)+b|0;if((b|0)>(z|0)&(z|0)>-5){v=E+-1|0;b=b+-1-z|0}else{v=E+-2|0;b=b+-1|0}if(K&8)break;do if(C){h=k[G+-4>>2]|0;if(!h){n=9;break}if(!((h>>>0)%10|0)){m=10;n=0}else{n=0;break}do{m=m*10|0;n=n+1|0}while(((h>>>0)%(m>>>0)|0|0)==0)}else n=9;while(0);h=((G-H>>2)*9|0)+-9|0;if((v|32|0)==102){F=h-n|0;F=(F|0)<0?0:F;b=(b|0)<(F|0)?b:F;break}else{F=h+z-n|0;F=(F|0)<0?0:F;b=(b|0)<(F|0)?b:F;break}}else v=E;while(0);B=(b|0)!=0;if(B)h=1;else h=(K&8|0)!=0;y=h&1;A=(v|32|0)==102;if(A){h=(z|0)>0?z:0;z=0}else{n=(z|0)<0?w:z;if((n|0)<0){h=La;w=n;m=((n|0)<0)<<31>>31;while(1){n=ln(w|0,m|0,10,0)|0;h=h+-1|0;i[h>>0]=n|48;n=kn(w|0,m|0,10,0)|0;if(m>>>0>9|(m|0)==9&w>>>0>4294967295){w=n;m=O}else break}}else h=La;if(n)while(1){h=h+-1|0;i[h>>0]=(n>>>0)%10|0|48;if(n>>>0<10)break;else n=(n>>>0)/10|0}if((Na-h|0)<2)do{h=h+-1|0;i[h>>0]=48}while((Na-h|0)<2);i[h+-1>>0]=(z>>31&2)+43;z=h+-2|0;i[z>>0]=v;h=Na-z|0}E=s+1+b+y+h|0;y=K&73728;F=(M|0)>(E|0);if((y|0)==0&F){h=M-E|0;Ym(Za|0,32,(h>>>0>256?256:h)|0)|0;if(h>>>0>255){n=h;do{Hm(Za,256,a)|0;n=n+-256|0}while(n>>>0>255);h=h&255}Hm(Za,h,a)|0}Hm(I,s,a)|0;if((y|0)==65536&F){h=M-E|0;Ym(Za|0,48,(h>>>0>256?256:h)|0)|0;if(h>>>0>255){s=h;do{Hm(Za,256,a)|0;s=s+-256|0}while(s>>>0>255);h=h&255}Hm(Za,h,a)|0}do if(A){m=q>>>0>J>>>0?J:q;q=~H;n=~D;n=q>>>0>n>>>0?q:n;q=3-n|0;v=J+1|0;v=(q>>>0>v>>>0?q:v)+n|0;n=~n;q=m;do{s=k[q>>2]|0;if(!s)h=ya;else{h=ya;while(1){h=h+-1|0;i[h>>0]=(s>>>0)%10|0|48;if(s>>>0<10)break;else s=(s>>>0)/10|0}}do if((q|0)==(m|0)){if((h|0)!=(ya|0))break;i[Aa>>0]=48;h=Aa}else{if(h>>>0<=Qa>>>0)break;do{h=h+-1|0;i[h>>0]=48}while(h>>>0>Qa>>>0)}while(0);Hm(h,za-h|0,a)|0;q=q+4|0}while(q>>>0<=J>>>0);if(!((K&8|0)==0&(B^1)))Hm(62960,1,a)|0;if(q>>>0>>0&(b|0)>0){s=(v&-4)+n|0;n=q;while(1){q=k[n>>2]|0;if(q){h=ya;while(1){h=h+-1|0;i[h>>0]=(q>>>0)%10|0|48;if(q>>>0<10)break;else q=(q>>>0)/10|0}if(h>>>0>Qa>>>0){ab=h;N=300}else ja=h}else{ab=ya;N=300}if((N|0)==300)while(1){N=0;h=ab+-1|0;i[h>>0]=48;if(h>>>0>Qa>>>0)ab=h;else{ja=h;break}}Hm(ja,(b|0)>9?9:b,a)|0;q=s+8|0;b=b+-9|0;if(q>>>0>>0&(b|0)>0){s=n;n=q}else break}}if((b|0)<=0)break;Ym(Za|0,48,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}else{w=C?G:q+4|0;do if((b|0)>-1){v=(K&8|0)==0;m=q;do{h=k[m>>2]|0;if(h){s=ya;n=h;while(1){h=s+-1|0;i[h>>0]=(n>>>0)%10|0|48;if(n>>>0<10)break;else{s=h;n=(n>>>0)/10|0}}if((h|0)!=(ya|0)){ua=s;bb=h}else N=312}else N=312;if((N|0)==312){N=0;i[Aa>>0]=48;ua=ya;bb=Aa}do if((m|0)==(q|0)){Hm(bb,1,a)|0;if((b|0)<1&v){h=ua;break}Hm(62960,1,a)|0;h=ua}else{if(bb>>>0>Qa>>>0)h=bb;else{h=bb;break}do{h=h+-1|0;i[h>>0]=48}while(h>>>0>Qa>>>0)}while(0);K=za-h|0;Hm(h,(b|0)>(K|0)?K:b,a)|0;b=b-K|0;m=m+4|0}while(m>>>0>>0&(b|0)>-1);if((b|0)<=0)break;Ym(Za|0,48,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}while(0);Hm(z,Na-z|0,a)|0}while(0);if((y|0)==8192&F){b=M-E|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}B=Ca;C=Ea;q=$;b=L;h=F?M:E;continue a}default:{fa=Ca;ga=Ea;ha=b;g=K;ba=D;ca=0;da=62864;aa=Da}}while(0);do if((N|0)==74){f=cb&32;if(!((Ca|0)==0&(Ea|0)==0)){b=Da;h=Ca;m=Ea;do{b=b+-1|0;i[b>>0]=l[62944+(h&15)>>0]|f;h=Xm(h|0,m|0,4)|0;m=O}while(!((h|0)==0&(m|0)==0));if(!(Ta&8)){T=Ca;U=Ea;f=b;P=Ta;Q=Xa;R=0;S=62864;N=90}else{T=Ca;U=Ea;f=b;P=Ta;Q=Xa;R=2;S=62864+(cb>>4)|0;N=90}}else{T=Ca;U=Ea;f=Da;P=Ta;Q=Xa;R=0;S=62864;N=90}}else if((N|0)==85){if(Fa>>>0>0|(Fa|0)==0&Ga>>>0>4294967295){f=Da;h=Ga;m=Fa;while(1){b=ln(h|0,m|0,10,0)|0;f=f+-1|0;i[f>>0]=b|48;b=kn(h|0,m|0,10,0)|0;if(m>>>0>9|(m|0)==9&h>>>0>4294967295){h=b;m=O}else break}}else{f=Da;b=Ga}if(!b){T=Ga;U=Fa;P=K;Q=D;R=_a;S=$a;N=90}else while(1){f=f+-1|0;i[f>>0]=(b>>>0)%10|0|48;if(b>>>0<10){T=Ga;U=Fa;P=K;Q=D;R=_a;S=$a;N=90;break}else b=(b>>>0)/10|0}}else if((N|0)==95){N=0;b=Lm(Oa,0,D)|0;if(!b){fa=Ca;ga=Ea;ha=Oa;g=q;ba=D;ca=0;da=62864;aa=Oa+D|0;break}else{fa=Ca;ga=Ea;ha=Oa;g=q;ba=b-Oa|0;ca=0;da=62864;aa=b;break}}else if((N|0)==100){h=0;b=0;n=sa;while(1){m=k[n>>2]|0;if(!m)break;b=Em(Wa,m)|0;if((b|0)<0|b>>>0>(Ya-h|0)>>>0)break;h=b+h|0;if(Ya>>>0>h>>>0)n=n+4|0;else break}if((b|0)<0){fb=-1;N=369;break a}else{Z=ta;_=sa;Y=h;N=105}}while(0);if((N|0)==90){N=0;g=(Q|0)>-1?P&-65537:P;b=(T|0)!=0|(U|0)!=0;if(b|(Q|0)!=0){ba=(b&1^1)+(Ha-f)|0;fa=T;ga=U;ha=f;ba=(Q|0)>(ba|0)?Q:ba;ca=R;da=S;aa=Da}else{fa=T;ga=U;ha=Da;ba=0;ca=R;da=S;aa=Da}}else if((N|0)==105){N=0;q=K&73728;s=(M|0)>(Y|0);if((q|0)==0&s){b=M-Y|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}h:do if(Y){h=0;n=_;while(1){b=k[n>>2]|0;if(!b)break h;b=Em(Wa,b)|0;h=b+h|0;if((h|0)>(Y|0))break h;Hm(Wa,b,a)|0;if(h>>>0>=Y>>>0)break;else n=n+4|0}}while(0);if((q|0)==8192&s){b=M-Y|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}B=Z;C=Ea;q=$;b=L;h=s?M:Y;continue}m=aa-ha|0;q=(ba|0)<(m|0)?m:ba;v=ca+q|0;w=(M|0)<(v|0)?v:M;s=g&73728;n=(w|0)>(v|0);if((s|0)==0&n){b=w-v|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}Hm(da,ca,a)|0;if((s|0)==65536&n){b=w-v|0;Ym(Za|0,48,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}if((q|0)>(m|0)){b=q-m|0;Ym(Za|0,48,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0}Hm(ha,m,a)|0;if(!((s|0)==8192&n)){B=fa;C=ga;q=$;b=L;h=w;continue}b=w-v|0;Ym(Za|0,32,(b>>>0>256?256:b)|0)|0;if(b>>>0>255){h=b;do{Hm(Za,256,a)|0;h=h+-256|0}while(h>>>0>255);b=b&255}Hm(Za,b,a)|0;B=fa;C=ga;q=$;b=L;h=w}if((N|0)==351){if(a){e=Ra;r=hb;return e|0}if(!Va){e=0;r=hb;return e|0}else g=1;while(1){b=k[e+(g<<2)>>2]|0;if(!b){gb=g;break}f=d+(g<<3)|0;i:do if(b>>>0<=20)do switch(b|0){case 15:{eb=k[c>>2]|0;db=k[eb>>2]|0;k[c>>2]=eb+4;db=(db&255)<<24>>24;eb=f;k[eb>>2]=db;k[eb+4>>2]=((db|0)<0)<<31>>31;break i}case 10:{eb=k[c>>2]|0;db=k[eb>>2]|0;k[c>>2]=eb+4;eb=f;k[eb>>2]=db;k[eb+4>>2]=((db|0)<0)<<31>>31;break i}case 12:{eb=k[c>>2]|0;db=eb;bb=k[db>>2]|0;db=k[db+4>>2]|0;k[c>>2]=eb+8;eb=f;k[eb>>2]=bb;k[eb+4>>2]=db;break i}case 18:{eb=k[c>>2]|0;k[t>>2]=k[eb>>2];k[t+4>>2]=k[eb+4>>2];x=+p[t>>3];k[c>>2]=eb+8;p[f>>3]=x;break i}case 11:{eb=k[c>>2]|0;db=k[eb>>2]|0;k[c>>2]=eb+4;eb=f;k[eb>>2]=db;k[eb+4>>2]=0;break i}case 13:{eb=k[c>>2]|0;db=k[eb>>2]|0;k[c>>2]=eb+4;db=(db&65535)<<16>>16;eb=f;k[eb>>2]=db;k[eb+4>>2]=((db|0)<0)<<31>>31;break i}case 17:{eb=k[c>>2]|0;k[t>>2]=k[eb>>2];k[t+4>>2]=k[eb+4>>2];x=+p[t>>3];k[c>>2]=eb+8;p[f>>3]=x;break i}case 14:{eb=k[c>>2]|0;db=k[eb>>2]|0;k[c>>2]=eb+4;eb=f;k[eb>>2]=db&65535;k[eb+4>>2]=0;break i}case 9:{db=k[c>>2]|0;eb=k[db>>2]|0;k[c>>2]=db+4;k[f>>2]=eb;break i}case 16:{eb=k[c>>2]|0;db=k[eb>>2]|0;k[c>>2]=eb+4;eb=f;k[eb>>2]=db&255;k[eb+4>>2]=0;break i}default:break i}while(0);while(0);g=g+1|0;if((g|0)>=10){fb=1;N=369;break}}if((N|0)==369){r=hb;return fb|0}while(1){if(k[e+(gb<<2)>>2]|0){fb=-1;N=369;break}gb=gb+1|0;if((gb|0)>=10){fb=1;N=369;break}}if((N|0)==369){r=hb;return fb|0}}else if((N|0)==369){r=hb;return fb|0}return 0}function Sm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=a+20|0;e=k[d>>2]|0;a=(k[a+16>>2]|0)-e|0;a=a>>>0>c>>>0?c:a;_m(e|0,b|0,a|0)|0;k[d>>2]=(k[d>>2]|0)+a;return c|0}function Tm(){}function Um(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (O=d,a-c>>>0|0)|0}function Vm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (O=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function Wm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;while((d|0)<(c|0)){i[a+d>>0]=e?0:i[b+d>>0]|0;e=e?1:(i[b+d>>0]|0)==0;d=d+1|0}return a|0}function Xm(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){O=b>>>c;return a>>>c|(b&(1<>>c-32|0}function Ym(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=a+c|0;if((c|0)>=20){b=b&255;f=a&3;g=b|b<<8|b<<16|b<<24;e=d&~3;if(f){f=a+4-f|0;while((a|0)<(f|0)){i[a>>0]=b;a=a+1|0}}while((a|0)<(e|0)){k[a>>2]=g;a=a+4|0}}while((a|0)<(d|0)){i[a>>0]=b;a=a+1|0}return a-c|0}function Zm(a){a=a|0;var b=0;b=a;while(i[b>>0]|0)b=b+1|0;return b-a|0}function _m(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c|0)>=4096)return Ia(a|0,b|0,c|0)|0;d=a|0;if((a&3)==(b&3)){while(a&3){if(!c)return d|0;i[a>>0]=i[b>>0]|0;a=a+1|0;b=b+1|0;c=c-1|0}while((c|0)>=4){k[a>>2]=k[b>>2];a=a+4|0;b=b+4|0;c=c-4|0}}while((c|0)>0){i[a>>0]=i[b>>0]|0;a=a+1|0;b=b+1|0;c=c-1|0}return d|0}function $m(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){O=b<>>32-c;return a<0){a=a-1|0;b=b-1|0;c=c-1|0;i[a>>0]=i[b>>0]|0}a=d}else _m(a,b,c)|0;return a|0}function bn(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function cn(a,b){a=a|0;b=b|0;var c=0;do{i[a+c>>0]=i[b+c>>0];c=c+1|0}while(i[b+(c-1)>>0]|0);return a|0}function dn(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){O=b>>c;return a>>>c|(b&(1<>c-32|0}function en(a){a=a|0;var b=0;b=i[v+(a&255)>>0]|0;if((b|0)<8)return b|0;b=i[v+(a>>8&255)>>0]|0;if((b|0)<8)return b+8|0;b=i[v+(a>>16&255)>>0]|0;if((b|0)<8)return b+16|0;return (i[v+(a>>>24)>>0]|0)+24|0}function fn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=ka(e,f)|0;d=a>>>16;a=(c>>>16)+(ka(e,d)|0)|0;e=b>>>16;b=ka(e,f)|0;return (O=(a>>>16)+(ka(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function gn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=Um(j^a,i^b,j,i)|0;g=O;a=f^j;b=e^i;c=Um((mn(h,g,Um(f^c,e^d,f,e)|0,O,0)|0)^a,O^b,a,b)|0;return c|0}function hn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=r;r=r+8|0;h=e|0;g=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;j=d>>31|((d|0)<0?-1:0)<<1;i=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;a=Um(g^a,f^b,g,f)|0;b=O;mn(a,b,Um(j^c,i^d,j,i)|0,O,h)|0;c=Um(k[h>>2]^g,k[h+4>>2]^f,g,f)|0;d=O;r=e;return (O=d,c)|0}function jn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=fn(e,f)|0;a=O;return (O=(ka(b,f)|0)+(ka(d,e)|0)+a|a&0,c|0|0)|0}function kn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=mn(a,b,c,d,0)|0;return c|0}function ln(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=r;r=r+8|0;e=f|0;mn(a,b,c,d,e)|0;r=f;return (O=k[e+4>>2]|0,k[e>>2]|0)|0}function mn(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;n=a;m=b;l=m;h=c;o=d;g=o;if(!l){f=(e|0)!=0;if(!g){if(f){k[e>>2]=(n>>>0)%(h>>>0);k[e+4>>2]=0}o=0;e=(n>>>0)/(h>>>0)>>>0;return (O=o,e)|0}else{if(!f){o=0;e=0;return (O=o,e)|0}k[e>>2]=a|0;k[e+4>>2]=b&0;o=0;e=0;return (O=o,e)|0}}f=(g|0)==0;do if(h){if(!f){f=(ma(g|0)|0)-(ma(l|0)|0)|0;if(f>>>0<=31){b=f+1|0;g=31-f|0;j=f-31>>31;h=b;i=n>>>(b>>>0)&j|l<>>(b>>>0)&j;f=0;g=n<>2]=a|0;k[e+4>>2]=m|b&0;o=0;e=0;return (O=o,e)|0}f=h-1|0;if(f&h){g=(ma(h|0)|0)+33-(ma(l|0)|0)|0;p=64-g|0;b=32-g|0;a=b>>31;m=g-32|0;j=m>>31;h=g;i=b-1>>31&l>>>(m>>>0)|(l<>>(g>>>0))&j;j=j&l>>>(g>>>0);f=n<>>(m>>>0))&a|n<>31;break}if(e){k[e>>2]=f&n;k[e+4>>2]=0}if((h|0)==1){e=m|b&0;p=a|0|0;return (O=e,p)|0}else{p=en(h|0)|0;e=l>>>(p>>>0)|0;p=l<<32-p|n>>>(p>>>0)|0;return (O=e,p)|0}}else{if(f){if(e){k[e>>2]=(l>>>0)%(h>>>0);k[e+4>>2]=0}e=0;p=(l>>>0)/(h>>>0)>>>0;return (O=e,p)|0}if(!n){if(e){k[e>>2]=0;k[e+4>>2]=(l>>>0)%(g>>>0)}e=0;p=(l>>>0)/(g>>>0)>>>0;return (O=e,p)|0}f=g-1|0;if(!(f&g)){if(e){k[e>>2]=a|0;k[e+4>>2]=f&l|b&0}e=0;p=l>>>((en(g|0)|0)>>>0);return (O=e,p)|0}f=(ma(g|0)|0)-(ma(l|0)|0)|0;if(f>>>0<=30){j=f+1|0;g=31-f|0;h=j;i=l<>>(j>>>0);j=l>>>(j>>>0);f=0;g=n<>2]=a|0;k[e+4>>2]=m|b&0;e=0;p=0;return (O=e,p)|0}while(0);if(!h){m=g;h=0;a=0}else{c=c|0|0;b=o|d&0;l=Vm(c,b,-1,-1)|0;m=O;a=0;do{n=g;g=f>>>31|g<<1;f=a|f<<1;n=i<<1|n>>>31|0;d=i>>>31|j<<1|0;Um(l,m,n,d)|0;p=O;o=p>>31|((p|0)<0?-1:0)<<1;a=o&1;i=Um(n,d,o&c,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&b)|0;j=O;h=h-1|0}while((h|0)!=0);m=g;h=0}g=0;if(e){k[e>>2]=i;k[e+4>>2]=j}e=(f|0)>>>31|(m|g)<<1|(g<<1|f>>>31)&0|h;p=(f<<1|0>>>31)&-2|a;return (O=e,p)|0}function nn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return kc[a&31](b|0,c|0,d|0)|0}function on(a,b,c){a=a|0;b=b|0;c=c|0;return pa(0,a|0,b|0,c|0)|0}function pn(a,b,c){a=a|0;b=b|0;c=c|0;return pa(1,a|0,b|0,c|0)|0}function qn(a,b,c){a=a|0;b=b|0;c=c|0;return pa(2,a|0,b|0,c|0)|0}function rn(a,b,c){a=a|0;b=b|0;c=c|0;return pa(3,a|0,b|0,c|0)|0}function sn(a,b,c){a=a|0;b=b|0;c=c|0;return pa(4,a|0,b|0,c|0)|0}function tn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;lc[a&15](b|0,c|0,d|0,e|0,f|0)}function un(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;pa(0,a|0,b|0,c|0,d|0,e|0)}function vn(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;pa(1,a|0,b|0,c|0,d|0,e|0)}function wn(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;pa(2,a|0,b|0,c|0,d|0,e|0)}function xn(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;pa(3,a|0,b|0,c|0,d|0,e|0)}function yn(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;pa(4,a|0,b|0,c|0,d|0,e|0)}function zn(a,b){a=a|0;b=b|0;mc[a&31](b|0)}function An(a){a=a|0;pa(0,a|0)}function Bn(a){a=a|0;pa(1,a|0)}function Cn(a){a=a|0;pa(2,a|0)}function Dn(a){a=a|0;pa(3,a|0)}function En(a){a=a|0;pa(4,a|0)}function Fn(a,b){a=a|0;b=b|0;return nc[a&15](b|0)|0}function Gn(a){a=a|0;return pa(0,a|0)|0}function Hn(a){a=a|0;return pa(1,a|0)|0}function In(a){a=a|0;return pa(2,a|0)|0}function Jn(a){a=a|0;return pa(3,a|0)|0}function Kn(a){a=a|0;return pa(4,a|0)|0}function Ln(a){a=a|0;oc[a&15]()}function Mn(){pa(0)}function Nn(){pa(1)}function On(){pa(2)}function Pn(){pa(3)}function Qn(){pa(4)}function Rn(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return pc[a&15](b|0,c|0,d|0,e|0)|0}function Sn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return pa(0,a|0,b|0,c|0,d|0)|0}function Tn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return pa(1,a|0,b|0,c|0,d|0)|0}function Un(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return pa(2,a|0,b|0,c|0,d|0)|0}function Vn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return pa(3,a|0,b|0,c|0,d|0)|0}function Wn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return pa(4,a|0,b|0,c|0,d|0)|0}function Xn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;qc[a&15](b|0,c|0,d|0,e|0,f|0,g|0)}function Yn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;pa(0,a|0,b|0,c|0,d|0,e|0,f|0)}function Zn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;pa(1,a|0,b|0,c|0,d|0,e|0,f|0)}function _n(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;pa(2,a|0,b|0,c|0,d|0,e|0,f|0)}function $n(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;pa(3,a|0,b|0,c|0,d|0,e|0,f|0)}function ao(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;pa(4,a|0,b|0,c|0,d|0,e|0,f|0)}function bo(a,b,c){a=a|0;b=b|0;c=c|0;return rc[a&15](b|0,c|0)|0}function co(a,b){a=a|0;b=b|0;return pa(0,a|0,b|0)|0}function eo(a,b){a=a|0;b=b|0;return pa(1,a|0,b|0)|0}function fo(a,b){a=a|0;b=b|0;return pa(2,a|0,b|0)|0}function go(a,b){a=a|0;b=b|0;return pa(3,a|0,b|0)|0}function ho(a,b){a=a|0;b=b|0;return pa(4,a|0,b|0)|0}function io(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;sc[a&15](b|0,c|0,d|0,e|0)}function jo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;pa(0,a|0,b|0,c|0,d|0)}function ko(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;pa(1,a|0,b|0,c|0,d|0)}function lo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;pa(2,a|0,b|0,c|0,d|0)}function mo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;pa(3,a|0,b|0,c|0,d|0)}function no(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;pa(4,a|0,b|0,c|0,d|0)}function oo(a,b,c){a=a|0;b=b|0;c=c|0;na(0);return 0}function po(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;na(1)}function qo(a){a=a|0;na(2)}function ro(a){a=a|0;na(3);return 0}function so(){na(4)}function to(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;na(5);return 0}function uo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;na(6)}function vo(a,b){a=a|0;b=b|0;na(7);return 0}function wo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;na(8)} -function ng(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;if(d){e=b+0|0;d=c+0|0;c=e+64|0;do{i[e>>0]=i[d>>0]|0;e=e+1|0;d=d+1|0}while((e|0)<(c|0))}else b=c;z=k[a>>2]|0;h=a+4|0;B=k[h>>2]|0;f=a+8|0;D=k[f>>2]|0;d=a+12|0;F=k[d>>2]|0;c=a+16|0;o=k[c>>2]|0;v=bn(k[b>>2]|0)|0;k[b>>2]=v;v=(z<<5|z>>>27)+1518500249+o+v+((F^D)&B^F)|0;B=B<<30|B>>>2;o=b+4|0;q=bn(k[o>>2]|0)|0;k[o>>2]=q;q=F+1518500249+((B^D)&z^D)+q+(v<<5|v>>>27)|0;z=z<<30|z>>>2;F=b+8|0;u=bn(k[F>>2]|0)|0;k[F>>2]=u;u=D+1518500249+u+(v&(B^z)^B)+(q<<5|q>>>27)|0;v=v<<30|v>>>2;D=b+12|0;p=bn(k[D>>2]|0)|0;k[D>>2]=p;p=B+1518500249+p+(q&(v^z)^z)+(u<<5|u>>>27)|0;q=q<<30|q>>>2;B=b+16|0;g=bn(k[B>>2]|0)|0;k[B>>2]=g;g=z+1518500249+g+(u&(q^v)^v)+(p<<5|p>>>27)|0;u=u<<30|u>>>2;z=b+20|0;j=bn(k[z>>2]|0)|0;k[z>>2]=j;j=v+1518500249+j+(p&(u^q)^q)+(g<<5|g>>>27)|0;p=p<<30|p>>>2;v=b+24|0;r=bn(k[v>>2]|0)|0;k[v>>2]=r;r=q+1518500249+r+(g&(p^u)^u)+(j<<5|j>>>27)|0;g=g<<30|g>>>2;q=b+28|0;w=bn(k[q>>2]|0)|0;k[q>>2]=w;w=u+1518500249+w+(j&(g^p)^p)+(r<<5|r>>>27)|0;j=j<<30|j>>>2;u=b+32|0;s=bn(k[u>>2]|0)|0;k[u>>2]=s;s=p+1518500249+s+(r&(j^g)^g)+(w<<5|w>>>27)|0;r=r<<30|r>>>2;p=b+36|0;m=bn(k[p>>2]|0)|0;k[p>>2]=m;m=g+1518500249+m+(w&(r^j)^j)+(s<<5|s>>>27)|0;w=w<<30|w>>>2;g=b+40|0;e=bn(k[g>>2]|0)|0;k[g>>2]=e;e=j+1518500249+e+(s&(w^r)^r)+(m<<5|m>>>27)|0;s=s<<30|s>>>2;j=b+44|0;l=bn(k[j>>2]|0)|0;k[j>>2]=l;r=l+1518500249+r+(m&(s^w)^w)+(e<<5|e>>>27)|0;m=m<<30|m>>>2;l=b+48|0;x=bn(k[l>>2]|0)|0;k[l>>2]=x;w=x+1518500249+w+(e&(m^s)^s)+(r<<5|r>>>27)|0;e=e<<30|e>>>2;x=b+52|0;G=bn(k[x>>2]|0)|0;k[x>>2]=G;s=G+1518500249+s+(r&(e^m)^m)+(w<<5|w>>>27)|0;r=r<<30|r>>>2;t=b+56|0;E=bn(k[t>>2]|0)|0;k[t>>2]=E;m=E+1518500249+m+(w&(r^e)^e)+(s<<5|s>>>27)|0;w=w<<30|w>>>2;n=b+60|0;H=bn(k[n>>2]|0)|0;k[n>>2]=H;e=H+1518500249+e+(s&(w^r)^r)+(m<<5|m>>>27)|0;s=s<<30|s>>>2;C=k[F>>2]|0;G=k[u>>2]^G^C^k[b>>2];G=G<<1|G>>>31;k[b>>2]=G;r=G+1518500249+r+(m&(s^w)^w)+(e<<5|e>>>27)|0;m=m<<30|m>>>2;A=k[D>>2]|0;E=k[p>>2]^E^A^k[o>>2];E=E<<1|E>>>31;k[o>>2]=E;w=w+1518500249+E+(e&(m^s)^s)+(r<<5|r>>>27)|0;e=e<<30|e>>>2;y=k[B>>2]|0;C=k[g>>2]^H^y^C;C=C<<1|C>>>31;k[F>>2]=C;s=s+1518500249+C+(r&(e^m)^m)+(w<<5|w>>>27)|0;r=r<<30|r>>>2;H=k[z>>2]|0;A=k[j>>2]^G^H^A;A=A<<1|A>>>31;k[D>>2]=A;m=m+1518500249+A+(w&(r^e)^e)+(s<<5|s>>>27)|0;w=w<<30|w>>>2;G=k[v>>2]|0;y=k[l>>2]^E^G^y;y=y<<1|y>>>31;k[B>>2]=y;e=e+1859775393+y+(w^r^s)+(m<<5|m>>>27)|0;s=s<<30|s>>>2;E=k[q>>2]|0;H=k[x>>2]^C^E^H;H=H<<1|H>>>31;k[z>>2]=H;r=r+1859775393+H+(s^w^m)+(e<<5|e>>>27)|0;m=m<<30|m>>>2;C=k[u>>2]|0;G=k[t>>2]^A^C^G;G=G<<1|G>>>31;k[v>>2]=G;w=w+1859775393+G+(m^s^e)+(r<<5|r>>>27)|0;e=e<<30|e>>>2;A=k[p>>2]|0;E=k[n>>2]^y^A^E;E=E<<1|E>>>31;k[q>>2]=E;s=s+1859775393+E+(e^m^r)+(w<<5|w>>>27)|0;r=r<<30|r>>>2;y=k[g>>2]|0;C=k[b>>2]^H^y^C;C=C<<1|C>>>31;k[u>>2]=C;m=m+1859775393+C+(r^e^w)+(s<<5|s>>>27)|0;w=w<<30|w>>>2;H=k[j>>2]|0;A=k[o>>2]^G^H^A;A=A<<1|A>>>31;k[p>>2]=A;e=e+1859775393+(w^r^s)+A+(m<<5|m>>>27)|0;s=s<<30|s>>>2;G=k[l>>2]|0;y=k[F>>2]^E^G^y;y=y<<1|y>>>31;k[g>>2]=y;r=r+1859775393+(s^w^m)+y+(e<<5|e>>>27)|0;m=m<<30|m>>>2;E=k[x>>2]|0;H=k[D>>2]^C^E^H;H=H<<1|H>>>31;k[j>>2]=H;w=w+1859775393+(m^s^e)+H+(r<<5|r>>>27)|0;e=e<<30|e>>>2;C=k[t>>2]|0;G=k[B>>2]^A^C^G;G=G<<1|G>>>31;k[l>>2]=G;s=s+1859775393+(e^m^r)+G+(w<<5|w>>>27)|0;r=r<<30|r>>>2;A=k[n>>2]|0;E=k[z>>2]^y^A^E;E=E<<1|E>>>31;k[x>>2]=E;m=m+1859775393+(r^e^w)+E+(s<<5|s>>>27)|0;w=w<<30|w>>>2;y=k[b>>2]|0;C=k[v>>2]^H^y^C;C=C<<1|C>>>31;k[t>>2]=C;e=e+1859775393+(w^r^s)+C+(m<<5|m>>>27)|0;s=s<<30|s>>>2;H=k[o>>2]|0;A=k[q>>2]^G^H^A;A=A<<1|A>>>31;k[n>>2]=A;r=r+1859775393+(s^w^m)+A+(e<<5|e>>>27)|0;m=m<<30|m>>>2;G=k[F>>2]|0;y=k[u>>2]^E^G^y;y=y<<1|y>>>31;k[b>>2]=y;w=w+1859775393+(m^s^e)+y+(r<<5|r>>>27)|0;e=e<<30|e>>>2;E=k[D>>2]|0;H=k[p>>2]^C^E^H;H=H<<1|H>>>31;k[o>>2]=H;s=s+1859775393+(e^m^r)+H+(w<<5|w>>>27)|0;r=r<<30|r>>>2;C=k[B>>2]|0;G=k[g>>2]^A^C^G;G=G<<1|G>>>31;k[F>>2]=G;m=m+1859775393+(r^e^w)+G+(s<<5|s>>>27)|0;w=w<<30|w>>>2;A=k[z>>2]|0;E=k[j>>2]^y^A^E;E=E<<1|E>>>31;k[D>>2]=E;e=e+1859775393+(w^r^s)+E+(m<<5|m>>>27)|0;s=s<<30|s>>>2;y=k[v>>2]|0;C=k[l>>2]^H^y^C;C=C<<1|C>>>31;k[B>>2]=C;r=r+1859775393+(s^w^m)+C+(e<<5|e>>>27)|0;m=m<<30|m>>>2;H=k[q>>2]|0;A=k[x>>2]^G^H^A;A=A<<1|A>>>31;k[z>>2]=A;w=w+1859775393+(m^s^e)+A+(r<<5|r>>>27)|0;e=e<<30|e>>>2;G=k[u>>2]|0;y=k[t>>2]^E^G^y;y=y<<1|y>>>31;k[v>>2]=y;s=s+1859775393+(e^m^r)+y+(w<<5|w>>>27)|0;r=r<<30|r>>>2;E=k[p>>2]|0;H=k[n>>2]^C^E^H;H=H<<1|H>>>31;k[q>>2]=H;m=m+1859775393+(r^e^w)+H+(s<<5|s>>>27)|0;w=w<<30|w>>>2;C=k[g>>2]|0;G=k[b>>2]^A^C^G;G=G<<1|G>>>31;k[u>>2]=G;e=e+-1894007588+((s|w)&r|s&w)+G+(m<<5|m>>>27)|0;s=s<<30|s>>>2;A=k[j>>2]|0;E=k[o>>2]^y^A^E;E=E<<1|E>>>31;k[p>>2]=E;r=r+-1894007588+((m|s)&w|m&s)+E+(e<<5|e>>>27)|0;m=m<<30|m>>>2;y=k[l>>2]|0;C=k[F>>2]^H^y^C;C=C<<1|C>>>31;k[g>>2]=C;w=w+-1894007588+((e|m)&s|e&m)+C+(r<<5|r>>>27)|0;e=e<<30|e>>>2;H=k[x>>2]|0;A=k[D>>2]^G^H^A;A=A<<1|A>>>31;k[j>>2]=A;s=s+-1894007588+((r|e)&m|r&e)+A+(w<<5|w>>>27)|0;r=r<<30|r>>>2;G=k[t>>2]|0;y=k[B>>2]^E^G^y;y=y<<1|y>>>31;k[l>>2]=y;m=m+-1894007588+((w|r)&e|w&r)+y+(s<<5|s>>>27)|0;w=w<<30|w>>>2;E=k[n>>2]|0;H=k[z>>2]^C^E^H;H=H<<1|H>>>31;k[x>>2]=H;e=e+-1894007588+((s|w)&r|s&w)+H+(m<<5|m>>>27)|0;s=s<<30|s>>>2;C=k[b>>2]|0;G=k[v>>2]^A^C^G;G=G<<1|G>>>31;k[t>>2]=G;r=r+-1894007588+((m|s)&w|m&s)+G+(e<<5|e>>>27)|0;m=m<<30|m>>>2;A=k[o>>2]|0;E=k[q>>2]^y^A^E;E=E<<1|E>>>31;k[n>>2]=E;w=w+-1894007588+((e|m)&s|e&m)+E+(r<<5|r>>>27)|0;e=e<<30|e>>>2;y=k[F>>2]|0;C=k[u>>2]^H^y^C;C=C<<1|C>>>31;k[b>>2]=C;s=s+-1894007588+((r|e)&m|r&e)+C+(w<<5|w>>>27)|0;r=r<<30|r>>>2;H=k[D>>2]|0;A=k[p>>2]^G^H^A;A=A<<1|A>>>31;k[o>>2]=A;m=m+-1894007588+((w|r)&e|w&r)+A+(s<<5|s>>>27)|0;w=w<<30|w>>>2;G=k[B>>2]|0;y=k[g>>2]^E^G^y;y=y<<1|y>>>31;k[F>>2]=y;e=e+-1894007588+((s|w)&r|s&w)+y+(m<<5|m>>>27)|0;s=s<<30|s>>>2;E=k[z>>2]|0;H=k[j>>2]^C^E^H;H=H<<1|H>>>31;k[D>>2]=H;r=r+-1894007588+((m|s)&w|m&s)+H+(e<<5|e>>>27)|0;m=m<<30|m>>>2;C=k[v>>2]|0;G=k[l>>2]^A^C^G;G=G<<1|G>>>31;k[B>>2]=G;w=w+-1894007588+((e|m)&s|e&m)+G+(r<<5|r>>>27)|0;e=e<<30|e>>>2;A=k[q>>2]|0;E=k[x>>2]^y^A^E;E=E<<1|E>>>31;k[z>>2]=E;s=s+-1894007588+((r|e)&m|r&e)+E+(w<<5|w>>>27)|0;r=r<<30|r>>>2;y=k[u>>2]|0;C=k[t>>2]^H^y^C;C=C<<1|C>>>31;k[v>>2]=C;m=m+-1894007588+((w|r)&e|w&r)+C+(s<<5|s>>>27)|0;w=w<<30|w>>>2;H=k[p>>2]|0;A=k[n>>2]^G^H^A;A=A<<1|A>>>31;k[q>>2]=A;e=e+-1894007588+((s|w)&r|s&w)+A+(m<<5|m>>>27)|0;s=s<<30|s>>>2;G=k[g>>2]|0;y=k[b>>2]^E^G^y;y=y<<1|y>>>31;k[u>>2]=y;r=r+-1894007588+((m|s)&w|m&s)+y+(e<<5|e>>>27)|0;m=m<<30|m>>>2;E=k[j>>2]|0;H=k[o>>2]^C^E^H;H=H<<1|H>>>31;k[p>>2]=H;w=w+-1894007588+((e|m)&s|e&m)+H+(r<<5|r>>>27)|0;e=e<<30|e>>>2;C=k[l>>2]|0;G=k[F>>2]^A^C^G;G=G<<1|G>>>31;k[g>>2]=G;s=s+-1894007588+((r|e)&m|r&e)+G+(w<<5|w>>>27)|0;r=r<<30|r>>>2;A=k[x>>2]|0;E=k[D>>2]^y^A^E;E=E<<1|E>>>31;k[j>>2]=E;m=m+-1894007588+((w|r)&e|w&r)+E+(s<<5|s>>>27)|0;w=w<<30|w>>>2;y=k[t>>2]|0;C=k[B>>2]^H^y^C;C=C<<1|C>>>31;k[l>>2]=C;e=e+-899497514+(w^r^s)+C+(m<<5|m>>>27)|0;s=s<<30|s>>>2;H=k[n>>2]|0;A=k[z>>2]^G^H^A;A=A<<1|A>>>31;k[x>>2]=A;r=r+-899497514+(s^w^m)+A+(e<<5|e>>>27)|0;m=m<<30|m>>>2;G=k[b>>2]|0;y=k[v>>2]^E^G^y;y=y<<1|y>>>31;k[t>>2]=y;w=w+-899497514+(m^s^e)+y+(r<<5|r>>>27)|0;e=e<<30|e>>>2;E=k[o>>2]|0;H=k[q>>2]^C^E^H;H=H<<1|H>>>31;k[n>>2]=H;s=s+-899497514+(e^m^r)+H+(w<<5|w>>>27)|0;r=r<<30|r>>>2;C=k[F>>2]|0;G=k[u>>2]^A^C^G;G=G<<1|G>>>31;k[b>>2]=G;m=m+-899497514+(r^e^w)+G+(s<<5|s>>>27)|0;w=w<<30|w>>>2;A=k[D>>2]|0;E=k[p>>2]^y^A^E;E=E<<1|E>>>31;k[o>>2]=E;e=e+-899497514+(w^r^s)+E+(m<<5|m>>>27)|0;s=s<<30|s>>>2;y=k[B>>2]|0;C=k[g>>2]^H^y^C;C=C<<1|C>>>31;k[F>>2]=C;r=r+-899497514+(s^w^m)+C+(e<<5|e>>>27)|0;m=m<<30|m>>>2;H=k[z>>2]|0;A=k[j>>2]^G^H^A;A=A<<1|A>>>31;k[D>>2]=A;w=w+-899497514+(m^s^e)+A+(r<<5|r>>>27)|0;e=e<<30|e>>>2;G=k[v>>2]|0;y=k[l>>2]^E^G^y;y=y<<1|y>>>31;k[B>>2]=y;s=s+-899497514+(e^m^r)+y+(w<<5|w>>>27)|0;r=r<<30|r>>>2;E=k[q>>2]|0;H=k[x>>2]^C^E^H;H=H<<1|H>>>31;k[z>>2]=H;m=m+-899497514+(r^e^w)+H+(s<<5|s>>>27)|0;w=w<<30|w>>>2;C=k[u>>2]|0;G=k[t>>2]^A^C^G;G=G<<1|G>>>31;k[v>>2]=G;e=e+-899497514+(w^r^s)+G+(m<<5|m>>>27)|0;s=s<<30|s>>>2;A=k[p>>2]|0;E=k[n>>2]^y^A^E;E=E<<1|E>>>31;k[q>>2]=E;r=r+-899497514+(s^w^m)+E+(e<<5|e>>>27)|0;m=m<<30|m>>>2;y=k[g>>2]|0;C=k[b>>2]^H^y^C;C=C<<1|C>>>31;k[u>>2]=C;w=w+-899497514+(m^s^e)+C+(r<<5|r>>>27)|0;e=e<<30|e>>>2;u=k[j>>2]|0;A=k[o>>2]^G^u^A;A=A<<1|A>>>31;k[p>>2]=A;s=s+-899497514+(e^m^r)+A+(w<<5|w>>>27)|0;r=r<<30|r>>>2;p=k[l>>2]|0;y=k[F>>2]^E^p^y;y=y<<1|y>>>31;k[g>>2]=y;m=m+-899497514+(r^e^w)+y+(s<<5|s>>>27)|0;w=w<<30|w>>>2;g=k[x>>2]|0;u=k[D>>2]^C^g^u;u=u<<1|u>>>31;k[j>>2]=u;e=e+-899497514+(w^r^s)+u+(m<<5|m>>>27)|0;s=s<<30|s>>>2;j=k[t>>2]|0;p=k[B>>2]^A^j^p;p=p<<1|p>>>31;k[l>>2]=p;r=r+-899497514+(s^w^m)+p+(e<<5|e>>>27)|0;m=m<<30|m>>>2;l=k[n>>2]|0;g=k[z>>2]^y^l^g;g=g<<1|g>>>31;k[x>>2]=g;g=w+-899497514+(m^s^e)+g+(r<<5|r>>>27)|0;e=e<<30|e>>>2;j=k[v>>2]^u^k[b>>2]^j;j=j<<1|j>>>31;k[t>>2]=j;j=s+-899497514+(e^m^r)+j+(g<<5|g>>>27)|0;b=r<<30|r>>>2;l=k[q>>2]^p^k[o>>2]^l;l=l<<1|l>>>31;k[n>>2]=l;k[a>>2]=m+-899497514+(b^e^g)+(k[a>>2]|0)+l+(j<<5|j>>>27);k[h>>2]=(k[h>>2]|0)+j;k[f>>2]=(k[f>>2]|0)+(g<<30|g>>>2);k[d>>2]=(k[d>>2]|0)+b;k[c>>2]=(k[c>>2]|0)+e;return}function og(a){a=a|0;k[a>>2]=1732584193;k[a+4>>2]=-271733879;k[a+8>>2]=-1732584194;k[a+12>>2]=271733878;k[a+16>>2]=-1009589776;k[a+24>>2]=0;k[a+20>>2]=0;return}function pg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0;m=r;r=r+64|0;l=m;g=a+20|0;h=k[g>>2]|0;e=h>>>3&63;j=h+(c<<3)|0;k[g>>2]=j;g=a+24|0;f=k[g>>2]|0;if(j>>>0>>0){f=f+1|0;k[g>>2]=f}k[a+24>>2]=f+(c>>>29);if((e+c|0)>>>0>63){f=64-e|0;_m(a+e+28|0,b|0,f|0)|0;j=a+92|0;ng(a,j,a+28|0,d);if((f+63|0)>>>0>>0)if(d){e=f;while(1){f=l+0|0;g=b+e+0|0;h=f+64|0;do{i[f>>0]=i[g>>0]|0;f=f+1|0;g=g+1|0}while((f|0)<(h|0));ng(a,j,l,1);f=e+64|0;if((e+127|0)>>>0>>0)e=f;else{e=0;break}}}else{d=f;while(1){e=b+d|0;f=l+0|0;g=e+0|0;h=f+64|0;do{i[f>>0]=i[g>>0]|0;f=f+1|0;g=g+1|0}while((f|0)<(h|0));ng(a,j,l,0);f=e+0|0;g=l+0|0;h=f+64|0;do{i[f>>0]=i[g>>0]|0;f=f+1|0;g=g+1|0}while((f|0)<(h|0));f=d+64|0;if((d+127|0)>>>0>>0)d=f;else{e=0;break}}}else e=0}else f=0;if(f>>>0>=c>>>0){r=m;return}_m(a+e+28|0,b+f|0,c-f|0)|0;r=m;return}function qg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=r;r=r+32|0;g=j+4|0;h=j;f=j+16|0;e=j+8|0;d=k[a+24>>2]|0;i[f>>0]=d>>>24;i[f+1>>0]=d>>>16;i[f+2>>0]=d>>>8;i[f+3>>0]=d;d=a+20|0;l=k[d>>2]|0;i[f+4>>0]=l>>>24;i[f+5>>0]=l>>>16;i[f+6>>0]=l>>>8;i[f+7>>0]=l;k[g>>2]=8;i[e>>0]=-128;pg(a,e,1,c);if((k[d>>2]&504|0)!=448)do{i[e>>0]=0;pg(a,e,1,c)}while((k[d>>2]&504|0)!=448);pg(a,f,8,c);k[b>>2]=k[a>>2];k[b+4>>2]=k[a+4>>2];k[b+8>>2]=k[a+8>>2];k[b+12>>2]=k[a+12>>2];k[b+16>>2]=k[a+16>>2];k[g>>2]=5;_f(g,4);_f(h,4);_f(a+28|0,64);_f(a,20);_f(d,8);_f(f,8);if(!c){r=j;return}d=a+92|0;e=d+64|0;do{i[d>>0]=0;d=d+1|0}while((d|0)<(e|0));r=j;return}function rg(a){a=a|0;k[a>>2]=1779033703;k[a+4>>2]=-1150833019;k[a+8>>2]=1013904242;k[a+12>>2]=-1521486534;k[a+16>>2]=1359893119;k[a+20>>2]=-1694144372;k[a+24>>2]=528734635;k[a+28>>2]=1541459225;a=a+32|0;k[a>>2]=0;k[a+4>>2]=0;return}function sg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=r;r=r+288|0;h=j+32|0;i=j;f=a+32|0;g=f;d=k[g>>2]|0;g=Vm(d|0,k[g+4>>2]|0,c|0,0)|0;k[f>>2]=g;k[f+4>>2]=O;if(!c){_f(i,32);_f(h,256);r=j;return}f=a+40|0;g=a+44|0;d=d&63;while(1){e=64-d|0;e=c>>>0>e>>>0?e:c;if((e|0)==64)k[f>>2]=b;else{k[f>>2]=g;_m(a+d+44|0,b|0,e|0)|0}d=e+d|0;if((d|0)==64){ug(a);d=0}if((c|0)==(e|0))break;else{c=c-e|0;b=b+e|0}}_f(i,32);_f(h,256);r=j;return}function tg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+288|0;h=l+32|0;j=l;f=a+44|0;k[a+40>>2]=f;g=a+32|0;e=g;d=k[e>>2]|0;e=k[e+4>>2]|0;c=d&63;i[a+c+44>>0]=-128;c=c+1|0;if((c|0)!=56)while(1){c=c&63;if(c){i[a+c+44>>0]=0;c=c+1|0;if((c|0)==56)break;else continue}else{ug(a);i[a+c+44>>0]=0;c=c+1|0;continue}}c=Xm(d|0,e|0,53)|0;i[a+100>>0]=c;c=Xm(d|0,e|0,45)|0;i[a+101>>0]=c;c=Xm(d|0,e|0,37)|0;i[a+102>>0]=c;c=Xm(d|0,e|0,29)|0;i[a+103>>0]=c;c=Xm(d|0,e|0,21)|0;i[a+104>>0]=c;c=Xm(d|0,e|0,13)|0;i[a+105>>0]=c;c=Xm(d|0,e|0,5)|0;i[a+106>>0]=c;c=$m(d|0,e|0,3)|0;i[a+107>>0]=c;ug(a);c=0;do{i[b+c>>0]=(k[a+(c>>>2<<2)>>2]|0)>>>(c<<3&24^24);c=c+1|0}while((c|0)!=32);k[a>>2]=1779033703;k[a+4>>2]=-1150833019;k[a+8>>2]=1013904242;k[a+12>>2]=-1521486534;k[a+16>>2]=1359893119;k[a+20>>2]=-1694144372;k[a+24>>2]=528734635;k[a+28>>2]=1541459225;k[g>>2]=0;k[g+4>>2]=0;_f(j,32);_f(h,256);_f(f,64);r=l;return}function ug(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0;L=r;r=r+288|0;m=L+32|0;K=L;if(!a){_f(K,32);_f(m,256);r=L;return}b=a+40|0;c=k[b>>2]|0;k[m>>2]=(l[c+1>>0]|0)<<16|(l[c>>0]|0)<<24|(l[c+2>>0]|0)<<8|(l[c+3>>0]|0);k[m+4>>2]=(l[c+5>>0]|0)<<16|(l[c+4>>0]|0)<<24|(l[c+6>>0]|0)<<8|(l[c+7>>0]|0);k[m+8>>2]=(l[c+9>>0]|0)<<16|(l[c+8>>0]|0)<<24|(l[c+10>>0]|0)<<8|(l[c+11>>0]|0);k[m+12>>2]=(l[c+13>>0]|0)<<16|(l[c+12>>0]|0)<<24|(l[c+14>>0]|0)<<8|(l[c+15>>0]|0);k[m+16>>2]=(l[c+17>>0]|0)<<16|(l[c+16>>0]|0)<<24|(l[c+18>>0]|0)<<8|(l[c+19>>0]|0);c=k[b>>2]|0;k[m+20>>2]=(l[c+21>>0]|0)<<16|(l[c+20>>0]|0)<<24|(l[c+22>>0]|0)<<8|(l[c+23>>0]|0);k[m+24>>2]=(l[c+25>>0]|0)<<16|(l[c+24>>0]|0)<<24|(l[c+26>>0]|0)<<8|(l[c+27>>0]|0);k[m+28>>2]=(l[c+29>>0]|0)<<16|(l[c+28>>0]|0)<<24|(l[c+30>>0]|0)<<8|(l[c+31>>0]|0);k[m+32>>2]=(l[c+33>>0]|0)<<16|(l[c+32>>0]|0)<<24|(l[c+34>>0]|0)<<8|(l[c+35>>0]|0);k[m+36>>2]=(l[c+37>>0]|0)<<16|(l[c+36>>0]|0)<<24|(l[c+38>>0]|0)<<8|(l[c+39>>0]|0);c=k[b>>2]|0;k[m+40>>2]=(l[c+41>>0]|0)<<16|(l[c+40>>0]|0)<<24|(l[c+42>>0]|0)<<8|(l[c+43>>0]|0);k[m+44>>2]=(l[c+45>>0]|0)<<16|(l[c+44>>0]|0)<<24|(l[c+46>>0]|0)<<8|(l[c+47>>0]|0);k[m+48>>2]=(l[c+49>>0]|0)<<16|(l[c+48>>0]|0)<<24|(l[c+50>>0]|0)<<8|(l[c+51>>0]|0);k[m+52>>2]=(l[c+53>>0]|0)<<16|(l[c+52>>0]|0)<<24|(l[c+54>>0]|0)<<8|(l[c+55>>0]|0);k[m+56>>2]=(l[c+57>>0]|0)<<16|(l[c+56>>0]|0)<<24|(l[c+58>>0]|0)<<8|(l[c+59>>0]|0);b=k[b>>2]|0;k[m+60>>2]=(l[b+61>>0]|0)<<16|(l[b+60>>0]|0)<<24|(l[b+62>>0]|0)<<8|(l[b+63>>0]|0);b=k[m>>2]|0;c=16;do{J=k[m+(c+-2<<2)>>2]|0;I=b;b=k[m+(c+-15<<2)>>2]|0;k[m+(c<<2)>>2]=I+(k[m+(c+-7<<2)>>2]|0)+((J>>>19|J<<13)^J>>>10^(J>>>17|J<<15))+((b>>>18|b<<14)^b>>>3^(b>>>7|b<<25));c=c+1|0}while((c|0)!=64);n=k[a>>2]|0;k[K>>2]=n;o=a+4|0;p=k[o>>2]|0;q=K+4|0;k[q>>2]=p;s=a+8|0;t=k[s>>2]|0;u=K+8|0;k[u>>2]=t;v=a+12|0;w=k[v>>2]|0;x=K+12|0;k[x>>2]=w;y=a+16|0;z=k[y>>2]|0;A=K+16|0;k[A>>2]=z;B=a+20|0;C=k[B>>2]|0;D=K+20|0;k[D>>2]=C;E=a+24|0;F=k[E>>2]|0;G=K+24|0;k[G>>2]=F;H=a+28|0;I=k[H>>2]|0;J=K+28|0;k[J>>2]=I;d=z;e=C;f=F;b=I;c=w;j=n;g=t;i=p;h=0;while(1){b=(k[50504+(h<<2)>>2]|0)+b+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(f&~d^e&d)+(k[m+(h<<2)>>2]|0)|0;c=c+b|0;b=((j>>>2|j<<30)^(j>>>13|j<<19)^(j>>>22|j<<10))+b+((g^i)&j^g&i)|0;h=h+1|0;if((h|0)==64){h=j;break}else{P=j;O=i;N=g;M=d;d=c;j=b;i=P;g=O;c=N;b=f;f=e;e=M}}k[J>>2]=f;k[A>>2]=c;k[D>>2]=d;k[G>>2]=e;k[x>>2]=g;k[K>>2]=b;k[q>>2]=h;k[u>>2]=i;k[a>>2]=n+b;k[o>>2]=p+h;k[s>>2]=t+i;k[v>>2]=w+g;k[y>>2]=z+c;k[B>>2]=C+d;k[E>>2]=F+e;k[H>>2]=I+f;r=L;return}function vg(a){a=a|0;var b=0,c=0,d=0;Ym(a+2112|0,0,240)|0;k[a+2368>>2]=0;b=a+2372|0;i[b>>0]=0;Ym(a+2376|0,0,516)|0;c=k[a+2356>>2]|0;k[c+4>>2]=-1150833019;k[c+16>>2]=1359893119;k[c+20>>2]=-1694144372;k[c+24>>2]=528734635;k[c+28>>2]=1541459225;k[c>>2]=1744954951;k[c+8>>2]=1013904242;k[c+12>>2]=-2058422982;c=0;do{Ym(a+(c*264|0)|0,0,240)|0;k[a+(c*264|0)+256>>2]=0;i[a+(c*264|0)+260>>0]=0;d=k[a+(c*264|0)+244>>2]|0;k[d+4>>2]=-1150833019;k[d+16>>2]=1359893119;k[d+20>>2]=-1694144372;k[d+24>>2]=528734635;k[d+28>>2]=1541459225;k[d>>2]=1744954951;k[d+8>>2]=c^1013904242;k[d+12>>2]=-2058357446;c=c+1|0}while((c|0)!=8);i[b>>0]=1;i[a+2108>>0]=1;return}function wg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;b=k[a+8>>2]|0;if(b>>>0<=511)return;o=k[a+4>>2]|0;while(1){h=k[a>>2]|0;n=h+256|0;j=h+240|0;m=h+248|0;e=64;d=o;c=k[n>>2]|0;while(1){l=128-c|0;c=(k[j>>2]|0)+c|0;if(e>>>0<=l>>>0){p=5;break}_m(c|0,d|0,l|0)|0;k[n>>2]=(k[n>>2]|0)+l;f=k[m>>2]|0;c=k[f>>2]|0;k[f>>2]=c+64;f=f+4|0;k[f>>2]=(c>>>0>4294967231&1)+(k[f>>2]|0);zg(h,k[j>>2]|0);f=k[j>>2]|0;c=f+0|0;f=f+64|0;g=c+64|0;do{i[c>>0]=i[f>>0]|0;c=c+1|0;f=f+1|0}while((c|0)<(g|0));c=(k[n>>2]|0)+-64|0;k[n>>2]=c;if((e|0)==(l|0))break;else{e=e-l|0;d=d+l|0}}if((p|0)==5){p=0;_m(c|0,d|0,e|0)|0;k[n>>2]=(k[n>>2]|0)+e}b=b+-512|0;if(b>>>0<=511)break;else o=o+512|0}return}function xg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;H=r;r=r+96|0;E=H;G=a+2888|0;d=k[G>>2]|0;o=512-d|0;if((d|0)==0|o>>>0>c>>>0)D=d;else{_m(a+d+2376|0,b|0,o|0)|0;n=0;do{j=a+(n*264|0)|0;m=a+(n*264|0)+256|0;g=a+(n*264|0)+240|0;l=a+(n*264|0)+248|0;f=64;e=a+(n<<6)+2376|0;d=k[m>>2]|0;while(1){h=128-d|0;d=(k[g>>2]|0)+d|0;if(f>>>0<=h>>>0){F=5;break}_m(d|0,e|0,h|0)|0;k[m>>2]=(k[m>>2]|0)+h;x=k[l>>2]|0;w=k[x>>2]|0;k[x>>2]=w+64;x=x+4|0;k[x>>2]=(w>>>0>4294967231&1)+(k[x>>2]|0);zg(j,k[g>>2]|0);x=k[g>>2]|0;w=x+0|0;x=x+64|0;y=w+64|0;do{i[w>>0]=i[x>>0]|0;w=w+1|0;x=x+1|0}while((w|0)<(y|0));d=(k[m>>2]|0)+-64|0;k[m>>2]=d;if((f|0)==(h|0))break;else{f=f-h|0;e=e+h|0}}if((F|0)==5){F=0;_m(d|0,e|0,f|0)|0;k[m>>2]=(k[m>>2]|0)+f}n=n+1|0}while((n|0)!=8);b=b+o|0;c=c-o|0;D=0}if(c>>>0<4096)d=1;else d=k[a+2896>>2]|0;C=(d&-2|0)==6?4:d;z=(C|0)!=0;A=C>>>0>1;B=a+2892|0;C=0-C|0;e=0;do{if(z&e>>>0<8){v=e+-8|0;v=v>>>0>>0?C:v;u=0-v|0;if(A){d=0;f=e;while(1){y=E+(d*12|0)|0;k[E+(d*12|0)+8>>2]=c;k[E+(d*12|0)+4>>2]=b+(f<<6);k[y>>2]=a+(f*264|0);pi(k[B>>2]|0,24,y);d=d+1|0;if((d|0)==(u|0))break;else f=f+1|0}}else{s=0;t=e;while(1){k[E+(s*12|0)+8>>2]=c;g=b+(t<<6)|0;k[E+(s*12|0)+4>>2]=g;d=a+(t*264|0)|0;q=E+(s*12|0)|0;k[q>>2]=d;a:do if(c>>>0>511){f=c;while(1){p=d+256|0;h=d+240|0;o=d+248|0;n=64;m=g;j=k[p>>2]|0;while(1){l=128-j|0;j=(k[h>>2]|0)+j|0;if(n>>>0<=l>>>0){d=j;F=18;break}_m(j|0,m|0,l|0)|0;k[p>>2]=(k[p>>2]|0)+l;x=k[o>>2]|0;w=k[x>>2]|0;k[x>>2]=w+64;x=x+4|0;k[x>>2]=(w>>>0>4294967231&1)+(k[x>>2]|0);zg(d,k[h>>2]|0);x=k[h>>2]|0;w=x+0|0;x=x+64|0;y=w+64|0;do{i[w>>0]=i[x>>0]|0;w=w+1|0;x=x+1|0}while((w|0)<(y|0));j=(k[p>>2]|0)+-64|0;k[p>>2]=j;if((n|0)==(l|0))break;else{n=n-l|0;m=m+l|0}}if((F|0)==18){F=0;_m(d|0,m|0,n|0)|0;k[p>>2]=(k[p>>2]|0)+n}f=f+-512|0;if(f>>>0<=511)break a;d=k[q>>2]|0;g=g+512|0}}while(0);s=s+1|0;if((s|0)==(u|0))break;else t=t+1|0}}e=e-v|0}d=k[B>>2]|0;if(d)ki(d)}while(e>>>0<8);d=c&511;if(!d){a=d+D|0;k[G>>2]=a;r=H;return}_m(a+D+2376|0,b+(c-d)|0,d|0)|0;a=d+D|0;k[G>>2]=a;r=H;return}function yg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;u=r;r=r+256|0;s=u;m=a+2888|0;q=0;do{c=k[m>>2]|0;e=q<<6;a:do if(c>>>0>e>>>0){d=c-e|0;d=d>>>0>64?64:d;c=a+(q*264|0)|0;if(d){l=a+(q*264|0)+256|0;h=a+(q*264|0)+240|0;j=a+(q*264|0)+248|0;f=d;e=a+e+2376|0;d=k[l>>2]|0;while(1){g=128-d|0;d=(k[h>>2]|0)+d|0;if(f>>>0<=g>>>0)break;_m(d|0,e|0,g|0)|0;k[l>>2]=(k[l>>2]|0)+g;o=k[j>>2]|0;n=k[o>>2]|0;k[o>>2]=n+64;o=o+4|0;k[o>>2]=(n>>>0>4294967231&1)+(k[o>>2]|0);zg(c,k[h>>2]|0);o=k[h>>2]|0;n=o+0|0;o=o+64|0;p=n+64|0;do{i[n>>0]=i[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));d=(k[l>>2]|0)+-64|0;k[l>>2]=d;if((f|0)==(g|0))break a;else{f=f-g|0;e=e+g|0}}_m(d|0,e|0,f|0)|0;k[l>>2]=(k[l>>2]|0)+f}}else c=a+(q*264|0)|0;while(0);Ag(c,s+(q<<5)|0);q=q+1|0}while((q|0)!=8);j=a+2112|0;l=a+2368|0;m=a+2352|0;h=a+2360|0;c=k[l>>2]|0;g=0;do{f=32;d=s+(g<<5)|0;while(1){e=128-c|0;c=(k[m>>2]|0)+c|0;if(f>>>0<=e>>>0){t=13;break}_m(c|0,d|0,e|0)|0;k[l>>2]=(k[l>>2]|0)+e;o=k[h>>2]|0;n=k[o>>2]|0;k[o>>2]=n+64;o=o+4|0;k[o>>2]=(n>>>0>4294967231&1)+(k[o>>2]|0);zg(j,k[m>>2]|0);o=k[m>>2]|0;n=o+0|0;o=o+64|0;p=n+64|0;do{i[n>>0]=i[o>>0]|0;n=n+1|0;o=o+1|0}while((n|0)<(p|0));c=(k[l>>2]|0)+-64|0;k[l>>2]=c;if((f|0)==(e|0))break;else{f=f-e|0;d=d+e|0}}if((t|0)==13){t=0;_m(c|0,d|0,f|0)|0;c=(k[l>>2]|0)+f|0;k[l>>2]=c}g=g+1|0}while((g|0)!=8);Ag(j,b);r=u;return}function zg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=r;r=r+128|0;u=M+64|0;L=M;c=0;do{J=c<<2;k[u+(c<<2)>>2]=(l[b+(J|1)>>0]|0)<<8|(l[b+J>>0]|0)|(l[b+(J|2)>>0]|0)<<16|(l[b+(J|3)>>0]|0)<<24;c=c+1|0}while((c|0)!=16);x=a+244|0;h=k[x>>2]|0;g=k[h>>2]|0;k[L>>2]=g;s=k[h+4>>2]|0;J=L+4|0;k[J>>2]=s;n=k[h+8>>2]|0;K=L+8|0;k[K>>2]=n;e=k[h+12>>2]|0;y=L+12|0;k[y>>2]=e;b=k[h+16>>2]|0;z=L+16|0;k[z>>2]=b;p=k[h+20>>2]|0;A=L+20|0;k[A>>2]=p;o=k[h+24>>2]|0;B=L+24|0;k[B>>2]=o;h=k[h+28>>2]|0;C=L+28|0;k[C>>2]=h;D=L+32|0;k[D>>2]=1779033703;E=L+36|0;k[E>>2]=-1150833019;F=L+40|0;k[F>>2]=1013904242;G=L+44|0;k[G>>2]=-1521486534;j=k[a+248>>2]|0;q=k[j>>2]^1359893119;H=L+48|0;k[H>>2]=q;j=k[j+4>>2]^-1694144372;I=L+52|0;k[I>>2]=j;f=k[a+252>>2]|0;a=k[f>>2]^528734635;v=L+56|0;k[v>>2]=a;f=k[f+4>>2]^1541459225;w=L+60|0;k[w>>2]=f;i=1779033703;c=-1150833019;m=1013904242;d=-1521486534;t=0;do{g=b+g+(k[u+((l[50760+(t<<4)>>0]|0)<<2)>>2]|0)|0;q=q^g;q=q<<16|q>>>16;i=q+i|0;b=i^b;b=b<<20|b>>>12;g=(k[u+((l[50761+(t<<4)>>0]|0)<<2)>>2]|0)+g+b|0;q=g^q;q=q<<24|q>>>8;i=q+i|0;b=i^b;b=b<<25|b>>>7;s=p+s+(k[u+((l[50762+(t<<4)>>0]|0)<<2)>>2]|0)|0;j=j^s;j=j<<16|j>>>16;c=j+c|0;p=c^p;p=p<<20|p>>>12;s=(k[u+((l[50763+(t<<4)>>0]|0)<<2)>>2]|0)+s+p|0;j=s^j;j=j<<24|j>>>8;c=j+c|0;p=c^p;p=p<<25|p>>>7;n=o+n+(k[u+((l[50764+(t<<4)>>0]|0)<<2)>>2]|0)|0;a=a^n;a=a<<16|a>>>16;m=a+m|0;o=m^o;o=o<<20|o>>>12;n=(k[u+((l[50765+(t<<4)>>0]|0)<<2)>>2]|0)+n+o|0;a=n^a;a=a<<24|a>>>8;m=a+m|0;o=m^o;o=o<<25|o>>>7;e=h+e+(k[u+((l[50766+(t<<4)>>0]|0)<<2)>>2]|0)|0;f=f^e;f=f<<16|f>>>16;d=f+d|0;h=d^h;h=h<<20|h>>>12;e=(k[u+((l[50767+(t<<4)>>0]|0)<<2)>>2]|0)+e+h|0;f=e^f;f=f<<24|f>>>8;d=f+d|0;h=d^h;h=h<<25|h>>>7;g=p+g+(k[u+((l[50768+(t<<4)>>0]|0)<<2)>>2]|0)|0;f=f^g;f=f<<16|f>>>16;m=f+m|0;p=m^p;p=p<<20|p>>>12;g=(k[u+((l[50769+(t<<4)>>0]|0)<<2)>>2]|0)+g+p|0;f=g^f;f=f<<24|f>>>8;m=f+m|0;p=m^p;p=p<<25|p>>>7;s=o+s+(k[u+((l[50770+(t<<4)>>0]|0)<<2)>>2]|0)|0;q=q^s;q=q<<16|q>>>16;d=q+d|0;o=d^o;o=o<<20|o>>>12;s=(k[u+((l[50771+(t<<4)>>0]|0)<<2)>>2]|0)+s+o|0;q=s^q;q=q<<24|q>>>8;d=q+d|0;o=d^o;o=o<<25|o>>>7;n=h+n+(k[u+((l[50772+(t<<4)>>0]|0)<<2)>>2]|0)|0;j=j^n;j=j<<16|j>>>16;i=j+i|0;h=i^h;h=h<<20|h>>>12;n=(k[u+((l[50773+(t<<4)>>0]|0)<<2)>>2]|0)+n+h|0;j=n^j;j=j<<24|j>>>8;i=j+i|0;h=i^h;h=h<<25|h>>>7;e=b+e+(k[u+((l[50774+(t<<4)>>0]|0)<<2)>>2]|0)|0;a=a^e;a=a<<16|a>>>16;c=a+c|0;b=c^b;b=b<<20|b>>>12;e=(k[u+((l[50775+(t<<4)>>0]|0)<<2)>>2]|0)+e+b|0;a=e^a;a=a<<24|a>>>8;c=a+c|0;b=c^b;b=b<<25|b>>>7;t=t+1|0}while((t|0)!=10);k[L>>2]=g;k[z>>2]=b;k[H>>2]=q;k[D>>2]=i;k[J>>2]=s;k[A>>2]=p;k[I>>2]=j;k[E>>2]=c;k[K>>2]=n;k[B>>2]=o;k[v>>2]=a;k[F>>2]=m;k[y>>2]=e;k[C>>2]=h;k[w>>2]=f;k[G>>2]=d;D=k[x>>2]|0;k[D>>2]=g^k[D>>2]^i;C=D+4|0;k[C>>2]=k[J>>2]^k[C>>2]^k[E>>2];J=D+8|0;k[J>>2]=k[K>>2]^k[J>>2]^k[F>>2];J=D+12|0;k[J>>2]=k[y>>2]^k[J>>2]^k[G>>2];J=D+16|0;k[J>>2]=k[z>>2]^k[J>>2]^k[H>>2];J=D+20|0;k[J>>2]=k[A>>2]^k[J>>2]^k[I>>2];J=D+24|0;k[J>>2]=o^k[J>>2]^a;J=D+28|0;k[J>>2]=h^k[J>>2]^f;r=M;return}function Ag(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;e=a+256|0;c=k[e>>2]|0;d=a+248|0;if(c>>>0>64){f=k[d>>2]|0;c=k[f>>2]|0;k[f>>2]=c+64;f=f+4|0;k[f>>2]=(c>>>0>4294967231&1)+(k[f>>2]|0);f=a+240|0;zg(a,k[f>>2]|0);c=(k[e>>2]|0)+-64|0;k[e>>2]=c;f=k[f>>2]|0;_m(f|0,f+64|0,c|0)|0;c=k[e>>2]|0}g=k[d>>2]|0;f=k[g>>2]|0;d=f+c|0;k[g>>2]=d;c=g+4|0;k[c>>2]=(d>>>0>>0&1)+(k[c>>2]|0);c=k[a+252>>2]|0;if(i[a+260>>0]|0)k[c+4>>2]=-1;k[c>>2]=-1;c=a+240|0;d=k[e>>2]|0;Ym((k[c>>2]|0)+d|0,0,128-d|0)|0;zg(a,k[c>>2]|0);c=a+244|0;d=0;do{f=k[(k[c>>2]|0)+(d<<2)>>2]|0;g=d<<2;i[b+g>>0]=f;i[b+(g|1)>>0]=f>>>8;i[b+(g|2)>>0]=f>>>16;i[b+(g|3)>>0]=f>>>24;d=d+1|0}while((d|0)!=8);return}function Bg(a,b){a=a|0;b=b|0;var c=0;k[a>>2]=b;if((b+-1|0)>>>0<2){k[a+4>>2]=0;return}if((b|0)!=3)return;b=a+4|0;a=50920|0;c=b+32|0;do{i[b>>0]=i[a>>0]|0;b=b+1|0;a=a+1|0}while((b|0)<(c|0));return}function Cg(a){a=a|0;var b=0;b=a+8|0;b=(0-b&63)+b|0;k[a+248>>2]=b;k[a+252>>2]=b+128;k[a+256>>2]=b+160;k[a+260>>2]=b+168;b=a+272|0;b=(0-b&63)+b|0;k[a+512>>2]=b;k[a+516>>2]=b+128;k[a+520>>2]=b+160;k[a+524>>2]=b+168;b=a+536|0;b=(0-b&63)+b|0;k[a+776>>2]=b;k[a+780>>2]=b+128;k[a+784>>2]=b+160;k[a+788>>2]=b+168;b=a+800|0;b=(0-b&63)+b|0;k[a+1040>>2]=b;k[a+1044>>2]=b+128;k[a+1048>>2]=b+160;k[a+1052>>2]=b+168;b=a+1064|0;b=(0-b&63)+b|0;k[a+1304>>2]=b;k[a+1308>>2]=b+128;k[a+1312>>2]=b+160;k[a+1316>>2]=b+168;b=a+1328|0;b=(0-b&63)+b|0;k[a+1568>>2]=b;k[a+1572>>2]=b+128;k[a+1576>>2]=b+160;k[a+1580>>2]=b+168;b=a+1592|0;b=(0-b&63)+b|0;k[a+1832>>2]=b;k[a+1836>>2]=b+128;k[a+1840>>2]=b+160;k[a+1844>>2]=b+168;b=a+1856|0;b=(0-b&63)+b|0;k[a+2096>>2]=b;k[a+2100>>2]=b+128;k[a+2104>>2]=b+160;k[a+2108>>2]=b+168;b=a+2120|0;b=(0-b&63)+b|0;k[a+2360>>2]=b;k[a+2364>>2]=b+128;k[a+2368>>2]=b+160;k[a+2372>>2]=b+168;k[a>>2]=0;k[a+2908>>2]=0;k[a+2912>>2]=0;return}function Dg(a){a=a|0;gi(k[a+2908>>2]|0);_f(a+8|0,2900);_f(a+4|0,4);return}function Eg(a,b,c){a=a|0;b=b|0;c=c|0;k[a>>2]=b;if((b|0)==3)vg(a+8|0);else if((b|0)==2)k[a+4>>2]=-1;else if((b|0)==1)k[a+4>>2]=0;k[a+2912>>2]=c>>>0<8?c:8;return}function Fg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=k[a>>2]|0;if((d|0)==1){d=a+4|0;f=(Ne(k[d>>2]&65535,b,c)|0)&65535;k[d>>2]=f;d=k[a>>2]|0}if((d|0)==2){d=a+4|0;f=Me(k[d>>2]|0,b,c)|0;k[d>>2]=f;d=k[a>>2]|0}if((d|0)!=3)return;g=a+2912|0;d=k[g>>2]|0;e=a+2908|0;f=k[e>>2]|0;if(d>>>0>1&(f|0)==0){f=fi()|0;k[e>>2]=f;d=k[g>>2]|0}k[a+2900>>2]=f;k[a+2904>>2]=d;xg(a+8|0,b,c);return}function Gg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;f=r;r=r+2912|0;e=f;c=k[a>>2]|0;k[b>>2]=c;if((c|0)==2){k[b+4>>2]=~k[a+4>>2];r=f;return}else if((c|0)==3){d=(e|0)==(a+8|0);if(d){c=e;c=(0-c&60)+c|0;k[e+240>>2]=c;k[e+244>>2]=c+128;k[e+248>>2]=c+160;k[e+252>>2]=c+168;c=e+264|0;c=(0-c&60)+c|0;k[e+504>>2]=c;k[e+508>>2]=c+128;k[e+512>>2]=c+160;k[e+516>>2]=c+168;c=e+528|0;c=(0-c&60)+c|0;k[e+768>>2]=c;k[e+772>>2]=c+128;k[e+776>>2]=c+160;k[e+780>>2]=c+168;c=e+792|0;c=(0-c&60)+c|0;k[e+1032>>2]=c;k[e+1036>>2]=c+128;k[e+1040>>2]=c+160;k[e+1044>>2]=c+168;c=e+1056|0;c=(0-c&60)+c|0;k[e+1296>>2]=c;k[e+1300>>2]=c+128;k[e+1304>>2]=c+160;k[e+1308>>2]=c+168;c=e+1320|0;c=(0-c&60)+c|0;k[e+1560>>2]=c;k[e+1564>>2]=c+128;k[e+1568>>2]=c+160;k[e+1572>>2]=c+168;c=e+1584|0;c=(0-c&60)+c|0;k[e+1824>>2]=c;k[e+1828>>2]=c+128;k[e+1832>>2]=c+160;k[e+1836>>2]=c+168;c=e+1848|0;c=(0-c&60)+c|0;k[e+2088>>2]=c;k[e+2092>>2]=c+128;k[e+2096>>2]=c+160;k[e+2100>>2]=c+168}else{c=0;do{g=e+(c*264|0)|0;g=(0-g&60)+g|0;k[e+(c*264|0)+240>>2]=g;k[e+(c*264|0)+244>>2]=g+128;k[e+(c*264|0)+248>>2]=g+160;k[e+(c*264|0)+252>>2]=g+168;_m(g|0,k[a+(c*264|0)+248>>2]|0,176)|0;k[e+(c*264|0)+256>>2]=k[a+(c*264|0)+264>>2];i[e+(c*264|0)+260>>0]=i[a+(c*264|0)+268>>0]|0;c=c+1|0}while((c|0)!=8)}c=e+2112|0;c=(0-c&60)+c|0;k[e+2352>>2]=c;k[e+2356>>2]=c+128;k[e+2360>>2]=c+160;k[e+2364>>2]=c+168;if(!d){_m(c|0,k[a+2360>>2]|0,176)|0;k[e+2368>>2]=k[a+2376>>2];i[e+2372>>0]=i[a+2380>>0]|0}_m(e+2376|0,a+2384|0,524)|0;yg(e,b+4|0);r=f;return}else if((c|0)==1){k[b+4>>2]=k[a+4>>2];r=f;return}else{r=f;return}}function Hg(a){a=a|0;if((k[a>>2]|0)!=2){a=0;return a|0}a=~k[a+4>>2];return a|0}function Ig(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+48|0;d=e;Gg(a,d);if(c)Ge(d,c);c=k[d>>2]|0;if(!c){b=1;r=e;return b|0}a=k[b>>2]|0;if(!a){b=1;r=e;return b|0}if(!((c|0)==1&(a|0)==1)?!((c|0)==2&(a|0)==2):0){if(!((c|0)==3&(a|0)==3)){b=0;r=e;return b|0}b=(Mm(d+4|0,b+4|0,32)|0)==0;r=e;return b|0}b=(k[d+4>>2]|0)==(k[b+4>>2]|0);r=e;return b|0}function Jg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+4176|0;f=g;d=g+2128|0;e=g+80|0;bd(b,b,c);if(!(Gd(b)|0)){f=0;r=g;return f|0}Ed(a,1)|0;me(b,d,2048)|0;me(a,e,2048)|0;if(!(tb(d|0,e|0)|0)){f=1;r=g;return f|0}k[f+68>>2]=0;k[f+72>>2]=21;k[f+64>>2]=1;k[f>>2]=a;Kf(32944,9);f=0;r=g;return f|0}function Kg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;j=r;r=r+2128|0;h=j;g=j+80|0;me(b,g,2048)|0;if(i[a+78284>>0]|0){k[h+68>>2]=0;k[h+72>>2]=86;k[h>>2]=a+24;k[h+64>>2]=2;k[h+4>>2]=b;Kf(32944,3);r=j;return}e=ac()|0;k[e>>2]=0;d=a+77356|0;c=kb(d|0)|0;if(!c){g=Nc(d)|0;k[h+68>>2]=0;k[h+72>>2]=87;k[h>>2]=a+24;k[h+64>>2]=2;k[h+4>>2]=g;Kf(32944,1);r=j;return}f=k[c+8>>2]|0;k[e>>2]=0;c=a+77612|0;d=qb(c|0)|0;if(!d){g=Nc(c)|0;k[h+68>>2]=0;k[h+72>>2]=88;k[h>>2]=a+24;k[h+64>>2]=2;k[h+4>>2]=g;Kf(32944,3);r=j;return}c=Kd(b)|0;if(Ba(g|0,f|0,k[d+8>>2]|0)|0){k[h+68>>2]=0;k[h+72>>2]=89;k[h>>2]=a+24;k[h+64>>2]=2;k[h+4>>2]=b;Kf(32944,9)}Ld(b,c)|0;r=j;return}function Lg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;j=r;r=r+4176|0;h=j;g=j+2128|0;f=j+80|0;me(b,g,2048)|0;c=k[a+68272>>2]|0;e=(Zm(c|0)|0)+1|0;d=(k[a+68276>>2]|0)-e|0;Wm(f|0,c+e|0,d|0)|0;i[f+d>>0]=0;d=kb(c|0)|0;if(!d){g=Nc(c)|0;k[h+68>>2]=0;k[h+72>>2]=87;k[h>>2]=a+24;k[h+64>>2]=2;k[h+4>>2]=g;Kf(32944,1);r=j;return}d=k[d+8>>2]|0;e=qb(f|0)|0;if(!e){g=Nc(f)|0;k[h+68>>2]=0;k[h+72>>2]=88;k[h>>2]=a+24;k[h+64>>2]=2;k[h+4>>2]=g;Kf(32944,1);r=j;return}c=Kd(b)|0;if(Ba(g|0,d|0,k[e+8>>2]|0)|0){k[h+68>>2]=0;k[h+72>>2]=89;k[h>>2]=a+24;k[h+64>>2]=2;k[h+4>>2]=b;Kf(32944,9)}Ld(b,c)|0;r=j;return}function Mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;g=r;r=r+2128|0;f=g;e=g+80|0;me(b,e,2048)|0;c=a+59464|0;do if(i[c>>0]|0){d=kb(c|0)|0;if(d){k[a+59976>>2]=k[d+8>>2];break}if(!(i[a+59462>>0]|0)){e=Nc(c)|0;k[f+68>>2]=0;k[f+72>>2]=87;k[f>>2]=a+24;k[f+64>>2]=2;k[f+4>>2]=e;Kf(32944,1);r=g;return}}while(0);c=a+59720|0;do if(i[c>>0]|0){d=qb(c|0)|0;if(d){k[a+59980>>2]=k[d+8>>2];break}if(!(i[a+59463>>0]|0)){e=Nc(c)|0;k[f+68>>2]=0;k[f+72>>2]=88;k[f>>2]=a+24;k[f+64>>2]=2;k[f+4>>2]=e;Kf(32944,1);r=g;return}}while(0);if(!(Ba(e|0,k[a+59976>>2]|0,k[a+59980>>2]|0)|0)){r=g;return}k[f+68>>2]=0;k[f+72>>2]=89;k[f>>2]=a+24;k[f+64>>2]=2;k[f+4>>2]=b;Kf(32944,9);r=g;return}function Ng(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;f=r;r=r+2048|0;e=f;if(!(Id(k[c+42860>>2]|0)|0)){e=0;r=f;return e|0}h=c+51096|0;g=k[h>>2]|0;h=k[h+4>>2]|0;g=(h|0)<0|(h|0)==0&g>>>0<2047?g:2047;pf(b,e,g)|0;i[e+g>>0]=0;g=b+18672|0;b=c+51120|0;Eg(g,k[b>>2]|0,1);Fg(g,e,Zm(e|0)|0);Gg(g,b);if(!(Ig(g,b,(i[c+51210>>0]|0)==0?0:c+51211|0)|0)){g=1;r=f;return g|0}if(!(i[a+49811>>0]|0)){if((i[e>>0]|0)==47){g=0;r=f;return g|0}if(!(Og(c+42864|0,c+51268|0)|0)){g=0;r=f;return g|0}}g=Tg(e,d)|0;r=f;return g|0}function Og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;if(ed(a)|0){g=0;return g|0}c=k[a>>2]|0;if(!c)a=0;else{f=a;a=0;do{d=f;f=f+4|0;a:do if((Pc(c)|0?(g=k[f>>2]|0,(g|0)!=0):0)?!(Pc(g)|0):0){do if((k[f>>2]|0)==46){c=d+8|0;if(Pc(k[c>>2]|0)|0)e=1;else e=(k[c>>2]|0)==0;if((k[f>>2]|0)==46?(k[c>>2]|0)==46:0){c=d+12|0;if(!(Pc(k[c>>2]|0)|0))if(e)break a;else{c=(k[c>>2]|0)==0;break}else c=1}else c=0;if(e)break a}else c=0;while(0);a=(c&1^1)+a|0}while(0);c=k[f>>2]|0}while((c|0)!=0)}if(ed(b)|0){g=0;return g|0}else e=0;b:while(1){c=k[b>>2]|0;do if((c|0)==46){c=b+4|0;if((k[c>>2]|0)==46){d=b+8|0;if(!(Pc(k[d>>2]|0)|0)?(k[d>>2]|0)!=0:0){d=0;break}if(!e)d=1;else d=Pc(k[b+-4>>2]|0)|0}else d=0}else if(!c)break b;else{c=b+4|0;d=0}while(0);b=c;a=(d<<31>>31)+a|0;e=e+1|0}g=(a|0)>-1;return g|0}function Pg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;f=r;r=r+2048|0;e=f;d=c+8436|0;me(d,e,2048)|0;do if((k[c+8432>>2]&-2|0)==2){if(!(Om(e,50952,4)|0)){c=0;r=f;return c|0}if(!(Om(e,50960,4)|0)){c=0;r=f;return c|0}else{ad(e,e,2048);break}}while(0);if(!(i[a+49811>>0]|0)){if((i[e>>0]|0)==47){c=0;r=f;return c|0}if(!(Og(c+32|0,d)|0)){c=0;r=f;return c|0}}c=Tg(e,b)|0;r=f;return c|0}function Qg(a,b,c){a=a|0;b=b|0;c=c|0;if((j[b+60040>>1]|0)!=257)return;if(!(i[a+49808>>0]|0))return;Kg(b,c);return}function Rg(a,b,c){a=a|0;b=b|0;c=c|0;if(!(i[a+49808>>0]|0))return;if((k[b+78264>>2]|0)!=2)return;if(hk(b+60080|0,50968)|0)return;Lg(b,c);return}function Sg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[c+78264>>2]|0;if((e|0)==3){d=Pg(a,d,c+42832|0)|0;return d|0}else if((e|0)==2){d=Ng(a,b,c,d)|0;return d|0}else{d=0;return d|0}return 0}function Tg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=r;r=r+2128|0;c=d;e=d+80|0;Ed(b,1)|0;Md(b)|0;me(b,e,2048)|0;if((Nb(a|0,e|0)|0)!=-1){e=1;r=d;return e|0}e=ac()|0;if((k[e>>2]|0)==17){k[c+68>>2]=0;k[c+72>>2]=91;k[c+64>>2]=1;k[c>>2]=b;e=0;r=d;return e|0}else{k[c+68>>2]=0;k[c+72>>2]=20;k[c>>2]=0;k[c+64>>2]=2;k[c+4>>2]=b;Kf(32944,1);e=0;r=d;return e|0}return 0}function Ug(a,b){a=a|0;b=b|0;var c=0,d=0;d=a;k[d>>2]=0;k[d+4>>2]=0;d=a+16|0;nf(d);k[a+8>>2]=b;k[a+21628>>2]=0;k[a+29824>>2]=0;k[a+21612>>2]=0;c=yk(59112)|0;Sh(c,d);k[a+21608>>2]=c;a=k[b+66976>>2]|0;k[c+28>>2]=a>>>0<8?a:8;return}function Vg(a){a=a|0;var b=0;b=k[a+21608>>2]|0;if(b){Th(b);Ak(b)}$d(a+16|0);return}function Wg(a,b){a=a|0;b=b|0;var c=0;c=ud(b)|0;b=a+12800|0;k[b>>2]=c;k[b+4>>2]=O;k[a+21616>>2]=0;k[a+21620>>2]=0;i[a+21624>>0]=1;i[a+29820>>0]=i[(k[a+8>>2]|0)+41508>>0]|0;i[a+12793>>0]=0;i[a+29821>>0]=0;i[a+21625>>0]=1;i[a+21626>>0]=0;i[a+21627>>0]=0;mf(a);return}function Xg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,R=0;Q=r;r=r+41872|0;C=Q+41780|0;G=Q+41704|0;F=Q+41628|0;N=Q+41552|0;f=Q+41865|0;e=Q+25168|0;E=Q+16976|0;g=Q;P=Q+8240|0;l=Q+41864|0;M=Q+16460|0;j=Q+41856|0;B=Q+33360|0;K=a+8|0;H=k[(k[K>>2]|0)+75208>>2]|0;if(!c){if(!(i[a+12793>>0]|0)){a=0;r=Q;return a|0}if(!(ch(b,a+16|0,0,H)|0)){Kf(32944,1);a=0;r=Q;return a|0}}d=k[b+36204>>2]|0;if((d|0)==5){if(!(i[b+60012>>0]|0)){a=0;r=Q;return a|0}if(ch(b,a+16|0,0,H)|0){a=b+78248|0;sc[k[(k[b>>2]|0)+16>>2]&15](b,k[a>>2]|0,k[a+4>>2]|0,0);a=1;r=Q;return a|0}else{Kf(32944,1);a=0;r=Q;return a|0}}else if((d|0)==3){if(i[a+29821>>0]|0)Rg(k[K>>2]|0,b,a+29824|0)}else if((d|0)==2){J=a+29821|0;i[J>>0]=0;d=k[K>>2]|0;if(((k[d+49760>>2]|0)==0?(k[a+21620>>2]|0)>>>0>=(k[d+91676>>2]|0)>>>0:0)?(i[a+21625>>0]|0)!=0:0){a=0;r=Q;return a|0}i[f>>0]=0;c=(vi(d,b+42832|0,f,5,e,2048)|0)!=0;d=k[K>>2]|0;if((k[d+49756>>2]|0)==2?(Lc(d+32804|0,e,2048)|0,L=Oc((k[K>>2]|0)+32804|0)|0,k[L>>2]=0,Uc((k[K>>2]|0)+32804|0)|0):0)k[(k[K>>2]|0)+32804>>2]=0;if(c&(i[f>>0]|0)==0)i[a+21625>>0]=0;je(b);Sc(b+42864|0,E)|0;if(!(i[b+51251>>0]|0)){if(!(ie(b)|0))c=c&(k[(k[K>>2]|0)+58764>>2]|0)>>>0<2}else{d=k[(k[K>>2]|0)+58764>>2]|0;if((d|0)!=1&(i[f>>0]|0)==0){L=fd(E,0)|0;if(((k[(k[K>>2]|0)+58764>>2]|0)+-1|0)==(L|0)){fd(E,1)|0;c=c&(d|0)!=0}else c=0}}D=b+51161|0;y=a+16|0;i[a+12793>>0]=i[D>>0]|0;L=a+12794|0;i[L>>0]=0;I=k[(k[b>>2]|0)+16>>2]|0;A=b+78256|0;s=b+51096|0;d=s;d=Um(k[A>>2]|0,k[A+4>>2]|0,k[d>>2]|0,k[d+4>>2]|0)|0;sc[I&15](b,d,O,0);d=a+21624|0;a:do if(!(i[d>>0]|0)){i[d>>0]=0;if(c){I=1;d=0;h=39}else h=38}else{do if(c)if(!(i[b+51160>>0]|0)){i[d>>0]=0;I=1;d=0;h=39;break a}else{k[C+68>>2]=0;k[C+72>>2]=69;k[C>>2]=b+24;k[C+64>>2]=2;k[C+4>>2]=E;k[(k[K>>2]|0)+75176>>2]=12;Kf(32944,6);break}else if(i[b+78268>>0]|0){i[d>>0]=0;h=38;break a}while(0);i[d>>0]=0;h=38}while(0);if((h|0)==38){d=i[b+78268>>0]|0;if(!(d<<24>>24)){e=0;d=1}else{I=0;h=39}}if((h|0)==39){A=(i[(k[K>>2]|0)+50377>>0]|0)!=0;c=d<<24>>24!=0;if(!(yi(E,A^1,A&(H|0)!=73,c)|0)){a=0;r=Q;return a|0}t=a+29824|0;Yg(a,b,E,t,2048);if(!c?(k[t>>2]|0)!=0:0)e=i[b+51160>>0]^1;else e=0;A=k[K>>2]|0;if(!((i[A+49751>>0]|0)==0?(i[A+49752>>0]|0)==0:0))h=45;do if((h|0)==45)if((H|0)==69|(H|0)==88){c=g+8208|0;k[c+0>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;k[c+12>>2]=0;k[c+16>>2]=0;k[c+20>>2]=0;if(!(dh(t,g,0)|0)){e=(i[(k[K>>2]|0)+49751>>0]|0)==0?e:0;break}f=c;c=k[f>>2]|0;f=k[f+4>>2]|0;A=b+51072|0;z=k[A+4>>2]|0;if(!(f>>>0>>0|((f|0)==(z|0)?c>>>0<(k[A>>2]|0)>>>0:0))){if((i[g+8204>>0]|0)!=0?(A=a,z=k[A+4>>2]|0,!(f>>>0>>0|((f|0)==(z|0)?c>>>0<(k[A>>2]|0)>>>0:0))):0)break;e=0}}while(0);z=b+51163|0;do if(i[z>>0]|0){A=Zg(a)|0;c=k[K>>2]|0;if(A){if(i[c+41508>>0]|0)break;Kf(32944,1);c=k[K>>2]|0;k[c+75176>>2]=22;e=0;break}else{k[c+75176>>2]=22;a=0;r=Q;return a|0}}else c=k[K>>2]|0;while(0);c=c+66980|0;if(k[c>>2]|0)Lc(t,c,2048)|0;A=b+78264|0;o=b+42857|0;c=i[o>>0]|0;if((k[A>>2]|0)==3)c=c<<24>>24!=0;else c=(c+-13&255)>16;u=b+42858|0;if(c&(i[u>>0]|0)!=0){e=b+24|0;Nf(32944,e,E);k[C+68>>2]=0;k[C+72>>2]=34;k[C+64>>2]=1;k[C>>2]=e;Kf(32944,2);k[(k[K>>2]|0)+75176>>2]=14;e=0}jd(P);v=b+51264|0;x=k[v>>2]|0;w=(x|0)!=0;do if((x|0)==5|w^1){c=(e&1)!=0;if(!(ie(b)|0)){if(!c){h=78;break}e=($g(a,b,P)|0)&1;h=78;break}if(c?!((H|0)==69|(H|0)==73|(H|0)==80):0){if((k[(k[K>>2]|0)+49756>>2]|0)==1){f=1;c=0;break}f=a+21612|0;k[f>>2]=(k[f>>2]|0)+1;_g(a,b,E);f=1;c=0}else{f=1;c=0}}else if((e&1)!=0&(H|0)!=80?(i[(k[K>>2]|0)+50377>>0]|0)==0:0){i[l>>0]=0;x=Gd(t)|0;c=i[l>>0]|0;if(x&c<<24>>24==0){c=b+51104|0;Nd(k[K>>2]|0,0,t,2048,l,k[c>>2]|0,k[c+4>>2]|0,b+51072|0,0)|0;c=i[l>>0]|0}e=c<<24>>24==0?e:0;h=78}else h=78;while(0);do if((h|0)==78){if(!(e&1)){if(!(i[b+78268>>0]|0)){f=0;c=1;break}if(yi(E,0,0,1)|0){e=1;x=1}else{f=0;c=0;e=1;d=1;break}}else x=d;d=k[K>>2]|0;c=x&1;f=c|i[d+50377>>0];g=f<<24>>24!=0;q=c<<24>>24!=0;if(!q){do if((H|0)!=80&(g^1)){if(!(Cd(P)|0))break;p=b+24|0;k[C+68>>2]=0;k[C+72>>2]=58;k[C>>2]=p;k[C+64>>2]=2;k[C+4>>2]=t;Gf(32944,p,t)}while(0);d=a+21612|0;k[d>>2]=(k[d>>2]|0)+1;d=k[K>>2]|0}h=a+21616|0;k[h>>2]=(k[h>>2]|0)+1;_m(M|0,d+40996|0,516)|0;m=b+51211|0;tf(y,0,k[b+51164>>2]|0,M,(i[b+51168>>0]|0)==0?0:b+51169|0,b+51185|0,k[b+51244>>2]|0,j,m);do if(!(i[z>>0]|0))p=0;else{if(!(i[b+51201>>0]|0)){p=0;break}if(!(Mm(b+51202|0,j,8)|0)){p=0;break}if(i[b+78284>>0]|0){p=0;break}k[C+68>>2]=0;k[C+72>>2]=6;k[C+64>>2]=1;k[C>>2]=b+24;Kf(32944,11);p=1}while(0);R=a+12824|0;j=a+18688|0;l=b+51120|0;k[R+0>>2]=0;k[R+4>>2]=0;k[R+8>>2]=0;k[R+12>>2]=0;Eg(j,k[l>>2]|0,k[(k[K>>2]|0)+66976>>2]|0);Eg(a+12856|0,k[l>>2]|0,k[(k[K>>2]|0)+66976>>2]|0);R=s;d=k[R+4>>2]|0;n=a+48|0;k[n>>2]=k[R>>2];k[n+4>>2]=d;rf(y,b,P);i[a+57>>0]=f;i[a+58>>0]=c;n=g|p;do if(!n){if(i[b+78284>>0]|0)break;R=s;R=$m(k[R>>2]|0,k[R+4>>2]|0,11)|0;f=O;c=b+51104|0;d=k[c>>2]|0;c=k[c+4>>2]|0;if(!((f|0)>(c|0)|(f|0)==(c|0)&R>>>0>d>>>0))break;if(!((c|0)<0|(c|0)==0&d>>>0<1e8)?(f=ud(b)|0,c=O,R=s,s=k[R+4>>2]|0,!((c|0)>(s|0)|((c|0)==(s|0)?f>>>0>(k[R>>2]|0)>>>0:0))):0)break}while(0);f=k[K>>2]|0;i[P+19>>0]=i[f+49820>>0]^1;if(g)g=0;else g=(H|0)!=80&(q^1);do if(w){d=k[v>>2]|0;c=(d|0)==4;do if((d&-2|0)==4){Yg(a,b,b+51268|0,B,2048);if((k[B>>2]|0)==0|g^1){d=1;h=111;break}if(c){d=Jg(t,B,2048)|0;h=110;break}else{d=ah(a,P,b+24|0,t,B,2048)|0;h=110;break}}else{if((d+-1|0)>>>0>=3){k[C+68>>2]=0;k[C+72>>2]=70;k[C>>2]=b+24;k[C+64>>2]=2;k[C+4>>2]=t;d=0;h=112;break}if(!g){d=1;h=111;break}d=Sg(f,y,b,t)|0;h=110}while(0);if((h|0)==110)if(d){d=d&1;h=111}else{d=0;h=112}if((h|0)==111)if((k[A>>2]|0)!=2|g)c=1;else h=112;if((h|0)==112)c=0;i[J>>0]=g?d:0;f=d<<24>>24==0}else{if((i[b+51160>>0]|0)!=0|p){f=0;c=1;break}if(!(i[u>>0]|0)){f=b+51104|0;bh(y,k[f>>2]|0,k[f+4>>2]|0);f=0;c=1;break}f=a+21608|0;c=b+51248|0;Uh(k[f>>2]|0,k[b+51252>>2]|0,(i[c>>0]|0)!=0);f=k[f>>2]|0;B=b+51104|0;C=k[B+4>>2]|0;d=f+19520|0;k[d>>2]=k[B>>2];k[d+4>>2]=C;i[f+19544>>0]=0;d=i[o>>0]|0;if(!((k[A>>2]|0)!=3&(d&255)<16)){Vh(f,d&255,(i[c>>0]|0)!=0);f=0;c=1;break}if((k[h>>2]|0)>>>0>1)d=(i[b+78268>>0]|0)!=0;else d=0;Vh(f,15,d);f=0;c=1}while(0);Vd(b);if(!(i[D>>0]|0))d=Ig(j,l,(i[b+51210>>0]|0)==0?0:m)|0;else d=0;do if(!(i[b+51248>>0]|0))i[a+21627>>0]=0;else{if(!(i[u>>0]|0))break;D=b+51104|0;C=k[D+4>>2]|0;if((C|0)<0|(C|0)==0&(k[D>>2]|0)>>>0<1|d^1)break;i[a+21627>>0]=1}while(0);do if(c&(q^1)&(p|d^1)){b:do if(!p){do if(i[z>>0]|0){if((i[b+51201>>0]|0)!=0?(i[b+78284>>0]|0)==0:0)break;if(i[a+21627>>0]|0)break;k[G+68>>2]=0;k[G+72>>2]=4;k[G>>2]=b+24;k[G+64>>2]=2;k[G+4>>2]=E;break b}while(0);k[F+68>>2]=0;k[F+72>>2]=3;k[F>>2]=b+24;k[F+64>>2]=2;k[F+4>>2]=E}while(0);Kf(32944,3);d=(k[K>>2]|0)+75176|0;if((k[d>>2]|0)==15){d=1;break}k[d>>2]=p?24:12;d=1}else d=0;while(0);do if(!n){if(!((H|0)==69|(H|0)==88))break;if(w?(k[v>>2]|0)!=5|f:0)break;if(d?(i[(k[K>>2]|0)+49820>>0]|0)==0:0)break;c=b+51072|0;f=b+51088|0;ld(P)|0;d=k[K>>2]|0;do if((i[d+49808>>0]|0)!=0&(k[A>>2]|0)==3){if(!(i[b+59461>>0]|0))break;Mg(b,P+24|0);d=k[K>>2]|0}while(0);Ad(P,(k[d+58772>>2]|0)==0?0:c,(k[d+58780>>2]|0)==0?0:f);do if(!(i[(k[K>>2]|0)+50340>>0]|0)){d=P+24|0;if(Ld(d,k[b+42860>>2]|0)|0)break;k[N+68>>2]=0;k[N+72>>2]=16;k[N>>2]=b+24;k[N+64>>2]=2;k[N+4>>2]=d}while(0);i[J>>0]=1}while(0);Zf(M);f=0;c=1;d=x}while(0);kd(P);e=(e&1)!=0;if(!c){a=f;r=Q;return a|0}d=(d&1)==0;if(I){a=a+21620|0;k[a>>2]=(k[a>>2]|0)+1}}if(i[L>>0]|0){a=0;r=Q;return a|0}do if(!e){if(!(i[b+78268>>0]|0)){Vd(b);break}if(d){a=0;r=Q;return a|0}}while(0);a=1;r=Q;return a|0}else if((d|0)==119?(i[a+29821>>0]|0)!=0:0)Qg(k[K>>2]|0,b,a+29824|0);Vd(b);a=1;r=Q;return a|0}function Yg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;f=a+8|0;Lc(d,(k[f>>2]|0)+16408|0,e)|0;a=(k[f>>2]|0)+16408|0;if((k[a>>2]|0)!=0?(a=Rc(a)|0,!(Pc(k[a>>2]|0)|0)):0)Vc(d,e);a=k[f>>2]|0;if(i[a+58768>>0]|0){Mc(d,Oc(b+78340|0)|0,e)|0;Tc(d,0,e);Vc(d,e);a=k[f>>2]|0}a=kk(a+32804|0)|0;a:do if(a){b=kk(c)|0;c=c+((a>>>0>>0?a:b)<<2)|0;while(1){a=k[c>>2]|0;if(!a)break;else if((a|0)!=47)break a;c=c+4|0}k[d>>2]=0;return}while(0);b=k[f>>2]|0;a=k[b+75208>>2]|0;if(((a|0)==88?(k[b+49756>>2]|0)==4:0)?Qc(58)|0:0){k[d>>2]=0;b=1}else b=0;if((a|0)!=69?(k[(k[f>>2]|0)+49756>>2]|0)!=1:0)Mc(d,c,e)|0;else Mc(d,Oc(c)|0,e)|0;a=ve(k[d>>2]|0)|0;if(!b)return;c=d+4|0;if((k[c>>2]|0)==95?(Pc(k[d+8>>2]|0)|0)&(a|0)>64&(a|0)<91:0){k[c>>2]=58;return}if((k[d>>2]|0)!=95)return;if((k[c>>2]|0)!=95)return;k[d>>2]=47;k[c>>2]=47;return}function Zg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;g=r;r=r+640|0;e=g;d=g+512|0;a=a+8|0;b=k[a>>2]|0;if(!(i[b+41508>>0]|0)){c=k[b+75184>>2]|0;if(!c){f=0;r=g;return f|0}k[e>>2]=0;if((pc[c&15](4,k[b+75180>>2]|0,e,128)|0)!=-1){if(!(k[e>>2]|0))f=6}else{k[e>>2]=0;f=6}if((f|0)==6){i[d>>0]=0;f=k[a>>2]|0;if((pc[k[f+75184>>2]&15](2,k[f+75180>>2]|0,d,128)|0)==-1)i[d>>0]=0;Xc(d,0,e,128)|0;_f(d,128)}Yf((k[a>>2]|0)+40996|0,e);_f(e,512);f=k[a>>2]|0;i[f+41513>>0]=1;if(!(i[f+41508>>0]|0)){f=0;r=g;return f|0}}f=1;r=g;return f|0}function _g(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;l=r;r=r+8272|0;j=l+8192|0;d=l+8268|0;h=l;e=a+8|0;c=k[e>>2]|0;if(i[c+50377>>0]|0){r=l;return}f=a+29824|0;g=b+42860|0;c=Dd(f,(i[c+50340>>0]|0)==0,k[g>>2]|0)|0;a:do if(c){do if(Gd(f)|0){if(!(Hd(Kd(f)|0)|0)){c=b+51104|0;Nd(k[e>>2]|0,0,f,2048,d,k[c>>2]|0,k[c+4>>2]|0,b+51072|0,0)|0;break}if(!c){m=10;break a}if(!(i[(k[e>>2]|0)+50340>>0]|0))Ld(f,k[g>>2]|0)|0;i[a+29821>>0]=1;break a}while(0);Ed(f,1)|0;if(Dd(f,(i[(k[e>>2]|0)+50340>>0]|0)==0,k[g>>2]|0)|0){Lc(h,f,2048)|0;$c(f,1);Ed(f,1)|0;c=b+24|0;if(!(Dd(f,(i[(k[e>>2]|0)+50340>>0]|0)==0,k[g>>2]|0)|0)){k[j+68>>2]=0;k[j+72>>2]=33;k[j>>2]=c;k[j+4>>2]=h;k[j+64>>2]=3;k[j+8>>2]=f;m=10;break}k[j+68>>2]=0;k[j+72>>2]=19;k[j>>2]=c;k[j+64>>2]=2;k[j+4>>2]=f;k[(k[e>>2]|0)+75176>>2]=16;Kf(32944,9);if(!(i[a+29821>>0]|0)){r=l;return}}else m=10}else m=10;while(0);if((m|0)==10)i[a+29821>>0]=1;m=k[e>>2]|0;Fd(f,(k[m+58772>>2]|0)==0?0:b+51072|0,(k[m+58776>>2]|0)==0?0:b+51080|0,(k[m+58780>>2]|0)==0?0:b+51088|0);r=l;return}function $g(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;n=r;r=r+8272|0;l=n+8192|0;m=n+8268|0;j=n;h=a+8|0;g=k[h>>2]|0;d=k[g+75208>>2]|0;if((d|0)==69|(d|0)==88){if(i[g+50377>>0]|0){m=1;r=n;return m|0}e=a+29824|0;f=b+51104|0;d=f;a=b+51072|0;if(Nd(g,c,e,2048,m,k[d>>2]|0,k[d+4>>2]|0,a,1)|0){m=1;r=n;return m|0}if(i[m>>0]|0){m=0;r=n;return m|0}d=b+24|0;Mf(32944,d,e);k[(k[h>>2]|0)+75176>>2]=16;if(_c(e)|0){m=0;r=n;return m|0}k[l+68>>2]=0;k[l+72>>2]=106;k[l+64>>2]=1;k[l>>2]=d;Lc(j,e,2048)|0;$c(e,1);Ed(e,1)|0;g=f;if(Nd(k[h>>2]|0,c,e,2048,m,k[g>>2]|0,k[g+4>>2]|0,a,1)|0){k[l+68>>2]=0;k[l+72>>2]=33;k[l>>2]=d;k[l+4>>2]=j;k[l+64>>2]=3;k[l+8>>2]=e;m=1;r=n;return m|0}else{Mf(32944,d,e);m=0;r=n;return m|0}}else if((d|0)==80){k[c+12>>2]=1;m=1;r=n;return m|0}else{m=1;r=n;return m|0}return 0}function ah(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;i=r;r=r+8304|0;g=i+8220|0;h=i;bd(e,e,f);jd(h);if(!(od(h,e)|0)){k[g+68>>2]=0;k[g+72>>2]=17;k[g>>2]=c;k[g+4>>2]=e;k[g+64>>2]=3;k[g+8>>2]=d;k[g+68>>2]=0;k[g+72>>2]=18;k[g+64>>2]=1;k[g>>2]=c;k[(k[a+8>>2]|0)+75176>>2]=23;g=0;kd(h);r=i;return g|0}c=zm(0,1048576)|0;e=(c|0)==0;if(e)Af(32944);while(1){xe();f=rd(h,c,1048576)|0;if(!f)break;qd(b,c,f)|0}if(e){g=1;kd(h);r=i;return g|0}ym(c);g=1;kd(h);r=i;return g|0}function bh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;g=zm(0,262144)|0;h=(g|0)==0;if(h)Af(32944);while(1){if(!((c|0)>-1|(c|0)==-1&b>>>0>4294967295)){e=b;d=b;f=4;break}d=pf(a,g,262144)|0;if((d|0)==0|(d|0)==-1)break;d=0<(c|0)|0==(c|0)&d>>>0>>0?d:b;qf(a,g,d);d=Um(b|0,c|0,d|0,0)|0;c=O;b=d}a:do if((f|0)==4)while(1){b=pf(a,g,262144)|0;if((b|0)==0|(b|0)==-1)break a;qf(a,g,0<(c|0)|0==(c|0)&b>>>0>>0?b:e)}while(0);if(h)return;ym(g);return}function ch(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;F=r;r=r+30800|0;v=F+24576|0;t=F;u=F+28752|0;s=F+26704|0;A=F+24656|0;z=F+16384|0;q=F+8192|0;B=k[a+36172>>2]|0;C=a+36204|0;D=k[C>>2]|0;E=(D|0)==3?a+60048|0:a+42832|0;do if((D&-2|0)==2){d=(i[E+8329>>0]|0)!=0;f=(b|0)!=0;if(f&d){if((k[a+78264>>2]|0)!=3){if((l[E+25>>0]|0)<=19){y=1;x=1;break}if((k[E+8292>>2]|0)==-1){y=1;x=1;break}}if(Ig(b+12840|0,E+8288|0,(i[E+8378>>0]|0)==0?0:E+8379|0)|0){y=1;x=1}else{k[v+68>>2]=0;k[v+72>>2]=5;k[v>>2]=a+24;k[v+64>>2]=2;k[v+4>>2]=E+32;y=1;x=1}}else{y=d;x=f}}else{y=0;x=(b|0)!=0}while(0);e=nc[k[(k[a>>2]|0)+20>>2]&15](a)|0;g=O;if(x){o=ud(a)|0;p=b+12824|0;j=p;o=Vm(k[j>>2]|0,k[j+4>>2]|0,o|0,O|0)|0;k[p>>2]=o;k[p+4>>2]=O}ld(a)|0;h=a+24|0;ik(z,h)|0;Zc(z,2048,(i[a+78274>>0]|0)==0);j=(i[B+49821>>0]|0)!=0?4:0;a:do if(kc[k[(k[a>>2]|0)+8>>2]&31](a,z,j)|0){d=B+75184|0;f=A}else{c=b+12832|0;d=B+75184|0;m=B+75188|0;n=B+75180|0;o=z;p=A;b:do if(x){f=c;k[f>>2]=0;k[f+4>>2]=0;ik(q,h)|0;Zc(q,2048,1);if(kc[k[(k[a>>2]|0)+8>>2]&31](a,q,j)|0)w=28;else while(1){if(k[d>>2]|0){ik(t,z)|0;if((pc[k[d>>2]&15](3,k[n>>2]|0,o,0)|0)!=-1){if(!(hk(t,z)|0)){me(z,A,2048)|0;cn(u|0,A|0)|0;if((pc[k[d>>2]&15](0,k[n>>2]|0,p,0)|0)!=-1)if(!(Nm(u,A)|0)){f=0;w=22}else ne(A,z,2048)|0;else{f=1;w=22}}}else{f=1;w=22}}else{f=0;w=22}do if((w|0)==22){w=0;if(!(k[m>>2]|0))if(f)break b;else break;me(z,s,2048)|0;if(!(rc[k[m>>2]&15](s,0)|0))break b;ne(s,z,2048)|0;if(f)break b}while(0);if(kc[k[(k[a>>2]|0)+8>>2]&31](a,z,j)|0){f=A;break a}q=c;k[q>>2]=0;k[q+4>>2]=0}}else{ik(q,h)|0;Zc(q,2048,1);if(kc[k[(k[a>>2]|0)+8>>2]&31](a,q,j)|0)w=28;else while(1){if(k[d>>2]|0){ik(t,z)|0;if((pc[k[d>>2]&15](3,k[n>>2]|0,o,0)|0)!=-1){if(!(hk(t,z)|0)){me(z,A,2048)|0;cn(u|0,A|0)|0;if((pc[k[d>>2]&15](0,k[n>>2]|0,p,0)|0)!=-1)if(!(Nm(u,A)|0)){f=0;w=35}else ne(A,z,2048)|0;else{f=1;w=35}}}else{f=1;w=35}}else{f=0;w=35}do if((w|0)==35){w=0;if(!(k[m>>2]|0))if(f)break b;else break;me(z,s,2048)|0;if(!(rc[k[m>>2]&15](s,0)|0))break b;ne(s,z,2048)|0;if(f)break b}while(0);if(kc[k[(k[a>>2]|0)+8>>2]&31](a,z,j)|0){f=A;break a}}}while(0);if((w|0)==28){ik(z,q)|0;f=A;break}k[B+75176>>2]=15;k[v+68>>2]=0;k[v+72>>2]=68;k[v+64>>2]=1;k[v>>2]=z;kc[k[(k[a>>2]|0)+8>>2]&31](a,h,j)|0;sc[k[(k[a>>2]|0)+16>>2]&15](a,e,g,0);a=0;r=F;return a|0}while(0);Td(a,1);me(z,f,2048)|0;c=k[d>>2]|0;if(c){e=B+75180|0;if((pc[c&15](3,k[e>>2]|0,z,1)|0)==-1){a=0;r=F;return a|0}if((pc[k[d>>2]&15](0,k[e>>2]|0,A,1)|0)==-1){a=0;r=F;return a|0}}d=k[B+75188>>2]|0;if((d|0)!=0?(rc[d&15](f,1)|0)==0:0){a=0;r=F;return a|0}if(y)ee(a,D)|0;else ae(a)|0;if((k[C>>2]|0)==2){je(a);A=k[(k[a>>2]|0)+16>>2]|0;z=a+78256|0;C=a+51096|0;C=Um(k[z>>2]|0,k[z+4>>2]|0,k[C>>2]|0,k[C+4>>2]|0)|0;sc[A&15](a,C,O,0)}if(!x){a=1;r=F;return a|0}if((D|0)==5)i[b+12777>>0]=0;else{i[b+12777>>0]=i[E+8329>>0]|0;C=E+8264|0;D=k[C+4>>2]|0;a=b+32|0;k[a>>2]=k[C>>2];k[a+4>>2]=D}a=b+12808|0;k[a>>2]=0;k[a+4>>2]=0;Eg(b+12840|0,k[E+8288>>2]|0,k[B+66976>>2]|0);a=1;r=F;return a|0}function dh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+2128|0;e=g+80|0;f=g;d=b+8236|0;i[d>>0]=0;me(a,e,2048)|0;if(c){if(bb(e|0,f|0)|0){f=ac()|0;i[d>>0]=(k[f>>2]|0)!=2&1;f=0;r=g;return f|0}}else if(jb(e|0,f|0)|0){f=ac()|0;i[d>>0]=(k[f>>2]|0)!=2&1;f=0;r=g;return f|0}e=b+8200|0;k[e>>2]=k[f+12>>2];d=k[f+36>>2]|0;c=b+8192|0;k[c>>2]=d;k[c+4>>2]=((d|0)<0)<<31>>31;ef(b+8208|0,k[f+56>>2]|0)|0;ef(b+8224|0,k[f+48>>2]|0)|0;ef(b+8216|0,k[f+64>>2]|0)|0;Lc(b,a,2048)|0;k[b+8232>>2]=0;f=(Hd(k[e>>2]|0)|0)&1;i[b+8204>>0]=f;f=(Id(k[e>>2]|0)|0)&1;i[b+8205>>0]=f;f=1;r=g;return f|0}function eh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;Ym(a+184|0,0,152)|0;d=k[a+172>>2]|0;k[a+336>>2]=d;e=k[a>>2]|0;b=((((e|0)/8|0)>>>0)/12|0)*84|0;e=e-b|0;c=(((e>>>0)/12|0)<<4)+16|0;f=d+c|0;k[a+340>>2]=f;k[a+176>>2]=f;k[a+348>>2]=d+e;k[a+180>>2]=d+(c+(((b>>>0)/12|0)<<4));i[a+4>>0]=1;i[a+5>>0]=2;i[a+6>>0]=3;i[a+7>>0]=4;i[a+8>>0]=6;i[a+9>>0]=8;i[a+10>>0]=10;i[a+11>>0]=12;i[a+12>>0]=15;i[a+13>>0]=18;i[a+14>>0]=21;i[a+15>>0]=24;b=12;c=28;while(1){i[a+b+4>>0]=c;b=b+1|0;if((b|0)==38)break;else c=c+4|0}i[a+170>>0]=0;b=0;c=0;do{f=c;c=c+1|0;b=((l[a+b+4>>0]|0|0)<(c|0)&1)+b|0;i[a+f+42>>0]=b}while((c|0)!=128);return}function fh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;e=a+170|0;if((i[e>>0]|0)==0?(i[e>>0]=-1,Xh(a),c=a+(b<<2)+184|0,f=k[c>>2]|0,(f|0)!=0):0){k[c>>2]=k[f>>2];a=f;return a|0}else c=b;while(1){c=c+1|0;if((c|0)==38){d=5;break}f=a+(c<<2)+184|0;d=k[f>>2]|0;if(d){g=d;d=8;break}}if((d|0)==5){i[e>>0]=(i[e>>0]|0)+-1<<24>>24;c=l[a+b+4>>0]|0;d=c*12|0;e=a+348|0;f=k[e>>2]|0;if((f-(k[a+336>>2]|0)|0)<=(d|0)){a=0;return a|0}k[e>>2]=f+(0-d);b=a+340|0;a=(k[b>>2]|0)+(0-(c<<4))|0;k[b>>2]=a;return a|0}else if((d|0)==8){k[f>>2]=k[g>>2];e=l[a+b+4>>0]|0;f=(l[a+c+4>>0]|0)-e|0;e=e<<4;c=g+e|0;d=l[a+(f+-1)+42>>0]|0;if((l[a+d+4>>0]|0)!=(f|0)){b=d+-1|0;d=a+(b<<2)+184|0;k[c>>2]=k[d>>2];k[d>>2]=c;c=l[a+b+4>>0]|0;f=f-c|0;c=g+((c<<4)+e)|0}a=a+(l[a+(f+-1)+42>>0]<<2)+184|0;k[c>>2]=k[a>>2];k[a>>2]=c;a=g;return a|0}return 0}function gh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0;Ym(a+1648|0,0,256)|0;g=a+19088|0;eh(g);e=a+1636|0;b=k[e>>2]|0;o=a+1644|0;k[o>>2]=(b|0)<12?~b:-13;h=a+19268|0;c=k[h>>2]|0;n=a+19264|0;do if((c|0)==(k[n>>2]|0)){c=a+19272|0;d=k[c>>2]|0;if(!d){d=fh(g,0)|0;b=k[e>>2]|0;break}else{k[c>>2]=k[d>>2];break}}else{d=c+-16|0;k[h>>2]=d}while(0);k[a+1616>>2]=d;f=a+1608|0;k[f>>2]=d;k[d+12>>2]=0;k[a+1632>>2]=b;j[d>>1]=256;j[d+4>>1]=257;e=l[a+19257>>0]|0;b=a+(e<<2)+19272|0;c=k[b>>2]|0;if(!c){c=k[n>>2]|0;b=a+e+19092|0;d=(l[b>>0]|0)<<4;p=c+d|0;k[n>>2]=p;if(p>>>0>(k[h>>2]|0)>>>0){k[n>>2]=c+(d-((l[b>>0]|0)<<4));c=fh(g,e)|0}}else k[b>>2]=k[c>>2];k[(k[f>>2]|0)+8>>2]=c;k[a+1620>>2]=c;k[a+1640>>2]=k[o>>2];i[a+2673>>0]=0;b=0;do{i[c+(b<<3)>>0]=b;i[c+(b<<3)+1>>0]=1;k[c+(b<<3)+4>>2]=0;b=b+1|0}while((b|0)!=256);c=0;do{b=c+2|0;d=0;do{p=16384-((m[50984+(d<<1)>>1]|0|0)/(b|0)|0)&65535;j[a+(c<<7)+(d<<1)+2676>>1]=p;j[a+(c<<7)+(d+8<<1)+2676>>1]=p;j[a+(c<<7)+(d+16<<1)+2676>>1]=p;j[a+(c<<7)+(d+24<<1)+2676>>1]=p;j[a+(c<<7)+(d+32<<1)+2676>>1]=p;j[a+(c<<7)+(d+40<<1)+2676>>1]=p;j[a+(c<<7)+(d+48<<1)+2676>>1]=p;j[a+(c<<7)+(d+56<<1)+2676>>1]=p;d=d+1|0}while((d|0)!=8);c=c+1|0}while((c|0)!=128);b=0;do{p=(b*40|0)+80&65535;i[a+(b<<6)+4>>0]=3;j[a+(b<<6)+2>>1]=p;i[a+(b<<6)+5>>0]=4;i[a+(b<<6)+8>>0]=3;j[a+(b<<6)+6>>1]=p;i[a+(b<<6)+9>>0]=4;i[a+(b<<6)+12>>0]=3;j[a+(b<<6)+10>>1]=p;i[a+(b<<6)+13>>0]=4;i[a+(b<<6)+16>>0]=3;j[a+(b<<6)+14>>1]=p;i[a+(b<<6)+17>>0]=4;i[a+(b<<6)+20>>0]=3;j[a+(b<<6)+18>>1]=p;i[a+(b<<6)+21>>0]=4;i[a+(b<<6)+24>>0]=3;j[a+(b<<6)+22>>1]=p;i[a+(b<<6)+25>>0]=4;i[a+(b<<6)+28>>0]=3;j[a+(b<<6)+26>>1]=p;i[a+(b<<6)+29>>0]=4;i[a+(b<<6)+32>>0]=3;j[a+(b<<6)+30>>1]=p;i[a+(b<<6)+33>>0]=4;i[a+(b<<6)+36>>0]=3;j[a+(b<<6)+34>>1]=p;i[a+(b<<6)+37>>0]=4;i[a+(b<<6)+40>>0]=3;j[a+(b<<6)+38>>1]=p;i[a+(b<<6)+41>>0]=4;i[a+(b<<6)+44>>0]=3;j[a+(b<<6)+42>>1]=p;i[a+(b<<6)+45>>0]=4;i[a+(b<<6)+48>>0]=3;j[a+(b<<6)+46>>1]=p;i[a+(b<<6)+49>>0]=4;i[a+(b<<6)+52>>0]=3;j[a+(b<<6)+50>>1]=p;i[a+(b<<6)+53>>0]=4;i[a+(b<<6)+56>>0]=3;j[a+(b<<6)+54>>1]=p;i[a+(b<<6)+57>>0]=4;i[a+(b<<6)+60>>0]=3;j[a+(b<<6)+58>>1]=p;i[a+(b<<6)+61>>0]=4;i[a+(b<<6)+64>>0]=3;j[a+(b<<6)+62>>1]=p;i[a+(b<<6)+65>>0]=4;b=b+1|0}while((b|0)!=25);return}function hh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+16|0;t=A+6|0;v=A;w=m[a>>1]|0;u=w+-1|0;z=b+1620|0;c=k[z>>2]|0;x=a+4|0;y=a+8|0;if((c|0)==(k[y>>2]|0))s=c;else{e=c;d=k[e>>2]|0;e=k[e+4>>2]|0;while(1){f=c+-8|0;n=f;q=k[n+4>>2]|0;s=c;k[s>>2]=k[n>>2];k[s+4>>2]=q;s=f;k[s>>2]=d;k[s+4>>2]=e;if((f|0)==(k[y>>2]|0)){s=f;break}else c=f}}q=s+1|0;i[q>>0]=(l[q>>0]|0)+4;q=s+1|0;d=l[q>>0]|0;c=((m[x>>1]|0)+4&65535)-d|0;n=(k[b+1632>>2]|0)!=0&1;d=(n+d|0)>>>1;e=d&255;i[q>>0]=e;d=d&255;j[x>>1]=d;q=s+(w<<3)|0;f=u;p=s;while(1){o=p+8|0;B=p+9|0;h=l[B>>0]|0;c=c-h|0;h=(h+n|0)>>>1;g=h&255;i[B>>0]=g;j[x>>1]=(h&255)+(d&65535);if((g&255)>(e&255)){h=i[o>>0]|0;e=o+2|0;j[t+0>>1]=j[e+0>>1]|0;j[t+2>>1]=j[e+2>>1]|0;j[t+4>>1]=j[e+4>>1]|0;e=o;while(1){d=e+-8|0;D=d;C=k[D+4>>2]|0;B=e;k[B>>2]=k[D>>2];k[B+4>>2]=C;if((d|0)==(k[y>>2]|0))break;if((g&255)>(l[e+-15>>0]|0))e=d;else break}i[d>>0]=h;i[e+-7>>0]=g;D=d+2|0;j[D+0>>1]=j[t+0>>1]|0;j[D+2>>1]=j[t+2>>1]|0;j[D+4>>1]=j[t+4>>1]|0}f=f+-1|0;if(!f)break;d=j[x>>1]|0;e=i[p+9>>0]|0;p=o}if(!(i[q+-7>>0]|0)){f=0;d=s+(u<<3)|0;while(1){f=f+1|0;if(!(i[d+-7>>0]|0))d=d+-8|0;else break}c=f+c|0;D=(m[a>>1]|0)-f|0;d=D&65535;j[a>>1]=d;if((D&65535|0)==1){d=k[y>>2]|0;f=j[d>>1]|0;e=f&255;D=d+2|0;j[v+0>>1]=j[D+0>>1]|0;j[v+2>>1]=j[D+2>>1]|0;j[v+4>>1]=j[D+4>>1]|0;f=(f&65535)>>>8&65535;do{f=f&255;f=f-(f>>>1)|0;c=c>>1}while((c|0)>1);c=f;D=b+(l[b+(((w+1|0)>>>1)+-1)+19130>>0]<<2)+19272|0;k[d>>2]=k[D>>2];k[D>>2]=d;k[z>>2]=x;i[x>>0]=e;i[x+1>>0]=c;D=a+6|0;j[D+0>>1]=j[v+0>>1]|0;j[D+2>>1]=j[v+2>>1]|0;j[D+4>>1]=j[v+4>>1]|0;r=A;return}}else d=j[a>>1]|0;j[x>>1]=c-(c>>>1)+(m[x>>1]|0);c=(w+1|0)>>>1;g=((d&65535)+1|0)>>>1;h=k[y>>2]|0;if((c|0)==(g|0))c=h;else{C=i[b+(c+-1)+19130>>0]|0;d=C&255;D=i[b+(g+-1)+19130>>0]|0;e=D&255;do if(C<<24>>24==D<<24>>24)c=h;else{f=b+(e<<2)+19272|0;c=k[f>>2]|0;if(c){k[f>>2]=k[c>>2];_m(c|0,h|0,g<<4|0)|0;D=b+(d<<2)+19272|0;k[h>>2]=k[D>>2];k[D>>2]=h;break}f=l[b+e+19092>>0]|0;d=(l[b+d+19092>>0]|0)-f|0;f=f<<4;c=h+f|0;e=l[b+(d+-1)+19130>>0]|0;if((l[b+e+19092>>0]|0)!=(d|0)){D=e+-1|0;C=b+(D<<2)+19272|0;k[c>>2]=k[C>>2];k[C>>2]=c;c=l[b+D+19092>>0]|0;d=d-c|0;c=h+((c<<4)+f)|0}D=b+(l[b+(d+-1)+19130>>0]<<2)+19272|0;k[c>>2]=k[D>>2];k[D>>2]=c;c=h}while(0);k[y>>2]=c}k[z>>2]=c;r=A;return}function ih(a){a=a|0;var b=0,c=0,d=0,e=0;e=a+19088|0;do if(!(k[e>>2]|0)){c=a+19260|0;d=5}else{k[e>>2]=0;c=a+19260|0;ym(k[c>>2]|0);b=k[e>>2]|0;if((b|0)==1048576)break;else if(!b){d=5;break}k[e>>2]=0;ym(k[c>>2]|0);d=5}while(0);do if((d|0)==5){b=xm(1398128)|0;k[c>>2]=b;if(!b){Af(32944);break}else{k[a+19432>>2]=b+1398112;k[e>>2]=1048576;break}}while(0);i[a+2672>>0]=1;k[a+1636>>2]=2;gh(a);i[a+2160>>0]=0;i[a+2161>>0]=2;b=a+2162|0;c=b+9|0;do{i[b>>0]=4;b=b+1|0}while((b|0)<(c|0));Ym(a+2171|0,6,245)|0;i[a+1904>>0]=0;i[a+1905>>0]=1;i[a+1906>>0]=2;e=1;d=3;b=1;c=3;do{i[a+d+1904>>0]=c;b=b+-1|0;if(!b){b=e+1|0;e=b;c=c+1|0}d=d+1|0}while((d|0)!=256);b=a+2416|0;c=b+64|0;do{i[b>>0]=0;b=b+1|0}while((b|0)<(c|0));Ym(a+2480|0,8,192)|0;i[a+1604>>0]=7;return}function jh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=Wh(b)|0;e=(d&32|0)!=0;if(!e)if(!(k[a+19088>>2]|0)){a=0;return a|0}else g=0;else g=((Wh(b)|0)<<20)+1048576|0;if(d&64){f=Wh(b)|0;k[c>>2]=f}h=a+19084|0;k[h>>2]=b;f=a+19064|0;k[f>>2]=0;k[a+19060>>2]=0;k[a+19068>>2]=-1;c=Wh(b)|0;k[f>>2]=c;c=Wh(k[h>>2]|0)|0|c<<8;k[f>>2]=c;c=Wh(k[h>>2]|0)|0|c<<8;k[f>>2]=c;c=Wh(k[h>>2]|0)|0|c<<8;k[f>>2]=c;if(e){d=d&31;e=d+1|0;if(e>>>0>16)e=(d*3|0)+-29|0;f=a+19088|0;d=k[f>>2]|0;if((e|0)==1){if(!d){a=0;return a|0}k[f>>2]=0;ym(k[a+19260>>2]|0);a=0;return a|0}do if((d|0)!=(g|0)){if(!d)d=a+19260|0;else{k[f>>2]=0;d=a+19260|0;ym(k[d>>2]|0)}b=((g>>>0)/12|0)<<4;c=xm(b+32|0)|0;k[d>>2]=c;if(!c){Af(32944);break}else{k[a+19432>>2]=c+(b+16);k[f>>2]=g;break}}while(0);i[a+2672>>0]=1;k[a+1636>>2]=e;gh(a);i[a+2160>>0]=0;i[a+2161>>0]=2;d=a+2162|0;e=d+9|0;do{i[d>>0]=4;d=d+1|0}while((d|0)<(e|0));Ym(a+2171|0,6,245)|0;i[a+1904>>0]=0;i[a+1905>>0]=1;i[a+1906>>0]=2;b=1;c=3;d=1;e=3;do{i[a+c+1904>>0]=e;d=d+-1|0;if(!d){d=b+1|0;b=d;e=e+1|0}c=c+1|0}while((c|0)!=256);d=a+2416|0;e=d+64|0;do{i[d>>0]=0;d=d+1|0}while((d|0)<(e|0));Ym(a+2480|0,8,192)|0;i[a+1604>>0]=7}a=(k[a+1608>>2]|0)!=0;return a|0}function kh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;w=a+1608|0;b=k[w>>2]|0;r=a+19424|0;e=k[r>>2]|0;if(b>>>0<=e>>>0){x=-1;return x|0}q=a+19432|0;c=k[q>>2]|0;if(b>>>0>c>>>0){x=-1;return x|0}if((j[b>>1]|0)!=1){v=k[b+8>>2]|0;if(v>>>0<=e>>>0|v>>>0>c>>>0){x=-1;return x|0}if(!(Yh(b,a)|0)){x=-1;return x|0}}else Zh(b,a);u=a+19068|0;d=k[u>>2]|0;n=a+19072|0;p=k[n>>2]|0;b=ka(p,d)|0;v=a+19060|0;b=(k[v>>2]|0)+b|0;k[v>>2]=b;o=a+19076|0;d=ka((k[o>>2]|0)-p|0,d)|0;k[u>>2]=d;p=a+1620|0;c=k[p>>2]|0;a:do if(!c){f=a+19064|0;g=a+19084|0;e=a+1632|0;h=a+1624|0;b:while(1){do if((d+b^b)>>>0>=16777216){if(d>>>0<32768){k[u>>2]=0-b&32767;break}d=k[r>>2]|0;c=k[e>>2]|0;b=k[w>>2]|0;do{c=c+1|0;b=k[b+12>>2]|0;if(b>>>0<=d>>>0)break b;if(b>>>0>(k[q>>2]|0)>>>0)break b}while((m[b>>1]|0)==(k[h>>2]|0));k[e>>2]=c;k[w>>2]=b;if(!(_h(b,a)|0)){b=-1;x=31;break b}d=k[u>>2]|0;c=k[n>>2]|0;b=ka(c,d)|0;b=(k[v>>2]|0)+b|0;k[v>>2]=b;d=ka((k[o>>2]|0)-c|0,d)|0;k[u>>2]=d;c=k[p>>2]|0;if(!c)continue b;else break a}while(0);d=k[f>>2]<<8;d=Wh(k[g>>2]|0)|0|d;k[f>>2]=d;d=k[u>>2]<<8;k[u>>2]=d;b=k[v>>2]<<8;k[v>>2]=b}if((x|0)==31)return b|0;k[e>>2]=c;k[w>>2]=b;x=-1;return x|0}else e=a+1632|0;while(0);b=l[c>>0]|0;if((k[e>>2]|0)==0?(s=k[c+4>>2]|0,s>>>0>(k[r>>2]|0)>>>0):0){k[a+1616>>2]=s;k[w>>2]=s}else x=23;if((x|0)==23?($h(a),t=a+2672|0,(i[t>>0]|0)==0):0){i[t>>0]=1;Ym(a+1648|0,0,256)|0}f=a+19064|0;c=a+19084|0;d=k[u>>2]|0;e=k[v>>2]|0;while(1){if((d+e^e)>>>0>=16777216){if(d>>>0>=32768)break;k[u>>2]=0-e&32767}d=k[f>>2]<<8;d=Wh(k[c>>2]|0)|0|d;k[f>>2]=d;d=k[u>>2]<<8;k[u>>2]=d;e=k[v>>2]<<8;k[v>>2]=e}return b|0}function lh(a){a=a|0;var b=0,c=0,d=0;b=a+4|0;if(!(k[b>>2]|0))return;c=0;do{d=k[a>>2]|0;mh(k[d>>2]|0,d+(c*19172|0)|0);c=c+1|0}while(c>>>0<(k[b>>2]|0)>>>0);return}function mh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;V=r;r=r+16|0;U=V;c=b+44|0;if(!(i[c>>0]|0)){i[c>>0]=1;c=b+4|0;if(!(th(a,c,b+24|0,b+48|0)|0)){i[b+19152>>0]=1;r=V;return}}else c=b+4|0;Q=b+4|0;e=k[Q>>2]|0;d=k[b+24>>2]|0;if((e|0)>(d+(k[b+36>>2]|0)|0)){i[b+19152>>0]=1;r=V;return}P=b+19160|0;k[P>>2]=0;u=(k[b+32>>2]|0)+-1+d|0;v=b+19148|0;w=(k[v>>2]|0)+-16|0;x=(u|0)<(w|0)?u:w;y=b+19164|0;z=b+19156|0;A=b+16|0;B=b+8|0;C=b+180|0;D=b+4e3|0;E=b+7820|0;F=b+7688|0;G=b+3868|0;H=b+11640|0;I=b+11508|0;J=U+4|0;K=U+12|0;L=U+8|0;M=b+48|0;N=b+28|0;O=b+19154|0;d=e;while(1){if((d|0)>=(x|0)){if((d|0)>(u|0)){c=69;break}if((d|0)==(u|0)?(k[B>>2]|0)>=(k[N>>2]|0):0){c=69;break}if(!(((i[O>>0]|0)!=0|(d|0)<(w|0))&(d|0)<(k[v>>2]|0))){c=13;break}}d=k[y>>2]|0;if((k[P>>2]|0)>>>0>(d+-8|0)>>>0?(k[y>>2]=d<<1,t=zm(k[z>>2]|0,d*24|0)|0,k[z>>2]=t,(t|0)==0):0)Af(32944);s=k[z>>2]|0;t=k[P>>2]|0;g=t+1|0;k[P>>2]=g;p=s+(t*12|0)|0;d=k[Q>>2]|0;q=k[A>>2]|0;e=k[B>>2]|0;h=(l[q+(d+1)>>0]<<8|l[q+d>>0]<<16|l[q+(d+2)>>0])>>>(8-e|0)&65534;f=k[C>>2]|0;if(h>>>0<(k[b+(f<<2)+52>>2]|0)>>>0){n=h>>>(16-f|0);h=(l[b+n+184>>0]|0)+e|0;o=(h>>>3)+d|0;k[Q>>2]=o;h=h&7;k[B>>2]=h;d=b+(n<<1)+1208|0}else{do{f=f+1|0;if(f>>>0>=15){f=15;break}}while(h>>>0>=(k[b+(f<<2)+52>>2]|0)>>>0);n=f+e|0;o=(n>>>3)+d|0;k[Q>>2]=o;n=n&7;k[B>>2]=n;d=((h-(k[b+(f+-1<<2)+52>>2]|0)|0)>>>(16-f|0))+(k[b+(f<<2)+116>>2]|0)|0;d=b+((d>>>0>=(k[M>>2]|0)>>>0?0:d)<<1)+3256|0;h=n}d=j[d>>1]|0;e=d&65535;do if((d&65535)<256){if((g>>>0>1?(R=t+-1|0,(k[s+(R*12|0)>>2]|0)==0):0)?(S=s+(R*12|0)+4|0,T=j[S>>1]|0,(T&65535)<3):0){t=T+1<<16>>16;j[S>>1]=t;i[s+(R*12|0)+8+(t&65535)>>0]=d;k[P>>2]=(k[P>>2]|0)+-1;break}k[p>>2]=0;i[s+(t*12|0)+8>>0]=d;j[s+(t*12|0)+4>>1]=0}else{if((d&65535)<=261)if((e|0)==256){uh(a,c,U)|0;k[p>>2]=4;j[s+(t*12|0)+4>>1]=l[U>>0]|0;k[s+(t*12|0)+8>>2]=k[J>>2];s=k[z>>2]|0;t=k[P>>2]|0;k[P>>2]=t+1;k[s+(t*12|0)>>2]=4;j[s+(t*12|0)+4>>1]=l[K>>0]|0;k[s+(t*12|0)+8>>2]=k[L>>2];break}else if((e|0)==257){k[p>>2]=2;break}else{k[p>>2]=3;k[s+(t*12|0)+8>>2]=e+-258;f=k[Q>>2]|0;e=k[B>>2]|0;g=(l[q+(f+1)>>0]<<8|l[q+f>>0]<<16|l[q+(f+2)>>0])>>>(8-e|0)&65534;d=k[H>>2]|0;if(g>>>0<(k[b+(d<<2)+11512>>2]|0)>>>0){d=g>>>(16-d|0);h=(l[b+d+11644>>0]|0)+e|0;g=(h>>>3)+f|0;k[Q>>2]=g;h=h&7;k[B>>2]=h;d=b+(d<<1)+12668|0}else{do{d=d+1|0;if(d>>>0>=15){d=15;break}}while(g>>>0>=(k[b+(d<<2)+11512>>2]|0)>>>0);h=d+e|0;n=(h>>>3)+f|0;k[Q>>2]=n;h=h&7;k[B>>2]=h;d=((g-(k[b+(d+-1<<2)+11512>>2]|0)|0)>>>(16-d|0))+(k[b+(d<<2)+11576>>2]|0)|0;d=b+((d>>>0>=(k[I>>2]|0)>>>0?0:d)<<1)+14716|0;g=n}n=j[d>>1]|0;d=n&65535;if((n&65535)>=8){e=d>>>2;f=e+-1|0;d=((d&3|4)<>0]<<8|l[q+g>>0]<<16|l[q+(g+2)>>0])>>>(8-h|0)&65535)>>>(17-e|0))+d|0;q=h+f|0;k[Q>>2]=(q>>>3)+g;k[B>>2]=q&7}}else d=d+2|0;j[s+(t*12|0)+4>>1]=d;break}f=e+-262|0;if(f>>>0>=8){e=f>>>2;g=e+-1|0;d=((f&3|4)<>0]<<8|l[q+o>>0]<<16|l[q+(o+2)>>0])>>>(8-h|0)&65535)>>>(17-e|0))+d|0;h=h+g|0;o=(h>>>3)+o|0;k[Q>>2]=o;h=h&7;k[B>>2]=h}}else d=e+-260|0;f=(l[q+(o+1)>>0]<<8|l[q+o>>0]<<16|l[q+(o+2)>>0])>>>(8-h|0)&65534;e=k[D>>2]|0;if(f>>>0<(k[b+(e<<2)+3872>>2]|0)>>>0){e=f>>>(16-e|0);g=(l[b+e+4004>>0]|0)+h|0;n=(g>>>3)+o|0;k[Q>>2]=n;o=g&7;k[B>>2]=o;e=b+(e<<1)+5028|0}else{do{e=e+1|0;if(e>>>0>=15){e=15;break}}while(f>>>0>=(k[b+(e<<2)+3872>>2]|0)>>>0);g=e+h|0;n=(g>>>3)+o|0;k[Q>>2]=n;o=g&7;k[B>>2]=o;e=((f-(k[b+(e+-1<<2)+3872>>2]|0)|0)>>>(16-e|0))+(k[b+(e<<2)+3936>>2]|0)|0;e=b+((e>>>0>=(k[G>>2]|0)>>>0?0:e)<<1)+7076|0}g=j[e>>1]|0;f=g&65535;do if((g&65535)>=4){h=f>>>1;g=h+-1|0;e=((f&1|2)<>>0<=3){e=(((l[q+(n+1)>>0]<<16|l[q+n>>0]<<24|l[q+(n+2)>>0]<<8|l[q+(n+3)>>0])<>0]|0)>>>(8-o|0))>>>(33-h|0))+e|0;q=o+g|0;k[Q>>2]=(q>>>3)+n;k[B>>2]=q&7;break}if(g>>>0>4){g=(((l[q+(n+1)>>0]<<16|l[q+n>>0]<<24|l[q+(n+2)>>0]<<8|l[q+(n+3)>>0])<>0]|0)>>>(8-o|0))>>>(37-h|0)<<4)+e|0;o=h+-5+o|0;n=(o>>>3)+n|0;k[Q>>2]=n;o=o&7;k[B>>2]=o;h=g}else h=e;f=(l[q+(n+1)>>0]<<8|l[q+n>>0]<<16|l[q+(n+2)>>0])>>>(8-o|0)&65534;e=k[E>>2]|0;if(f>>>0<(k[b+(e<<2)+7692>>2]|0)>>>0){e=f>>>(16-e|0);q=(l[b+e+7824>>0]|0)+o|0;k[Q>>2]=(q>>>3)+n;k[B>>2]=q&7;e=b+(e<<1)+8848|0}else{do{e=e+1|0;if(e>>>0>=15){e=15;break}}while(f>>>0>=(k[b+(e<<2)+7692>>2]|0)>>>0);q=e+o|0;k[Q>>2]=(q>>>3)+n;k[B>>2]=q&7;e=((f-(k[b+(e+-1<<2)+7692>>2]|0)|0)>>>(16-e|0))+(k[b+(e<<2)+7756>>2]|0)|0;e=b+((e>>>0>=(k[F>>2]|0)>>>0?0:e)<<1)+10896|0}e=(m[e>>1]|0)+h|0}}else e=f+1|0;while(0);if(e>>>0>256)if(e>>>0>8192)d=(e>>>0>262144?3:2)+d|0;else d=d+1|0;k[p>>2]=1;j[s+(t*12|0)+4>>1]=d;k[s+(t*12|0)+8>>2]=e}while(0);d=k[Q>>2]|0}if((c|0)==13){i[b+19155>>0]=1;r=V;return}else if((c|0)==69){r=V;return}}function nh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=a+32|0;if(!(k[b>>2]|0)){f=zk(4195328)|0;k[b>>2]=f;Ym(f|0,0,4195328)|0}f=a+24|0;if(k[f>>2]|0)return;e=k[a+28>>2]|0;b=e<<1;c=b*19172|0;c=zk(b>>>0>224022|c>>>0>4294967291?-1:c+4|0)|0;k[c>>2]=b;c=c+4|0;d=(b|0)==0;if(d){k[f>>2]=c;Ym(c|0,0,e*38344|0)|0;return}b=c+(b*19172|0)|0;a=c;do{ig(a+4|0,0);k[a+19156>>2]=0;a=a+19172|0}while((a|0)!=(b|0));k[f>>2]=c;Ym(c|0,0,e*38344|0)|0;if(d)return;d=e<<1;b=0;while(1){a=c+(b*19172|0)+19156|0;if((k[a>>2]|0)==0?(k[c+(b*19172|0)+19164>>2]=16640,e=xm(199680)|0,k[a>>2]=e,(e|0)==0):0)Af(32944);b=b+1|0;if((b|0)==(d|0))break;c=k[f>>2]|0}return}function oh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=r;r=r+256|0;w=y;nh(a);if(b)b=1;else{Ym(a+148|0,0,19100)|0;b=a+59100|0;c=a+84|0;d=c+36|0;do{k[c>>2]=0;c=c+4|0}while((c|0)<(d|0));c=k[b>>2]|0;k[a+19248>>2]=(c>>>0<4194304?c:4194304)&k[a+59104>>2];c=a+68|0;b=k[c>>2]|0;if(b){ym(b);k[c>>2]=0}k[a+72>>2]=0;k[a+76>>2]=0;b=0}k[a+8>>2]=0;k[a+4>>2]=0;v=a+19536|0;k[v>>2]=0;k[v+4>>2]=0;v=a+120|0;k[v+0>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;k[v+12>>2]=0;k[v+16>>2]=0;k[v+20>>2]=0;k[v+24>>2]=0;k[a+128>>2]=-1;if(!b){k[a+38736>>2]=0;k[a+38740>>2]=0;k[a+38728>>2]=0;k[a+38732>>2]=1;Ym(a+38744|0,0,368)|0;Ym(a+22420|0,0,16308)|0;i[a+58972>>0]=0;Ym(a+58564|0,0,404)|0;k[a+58560>>2]=2;k[a+58968>>2]=0;Nh(a)}u=a+28|0;b=k[u>>2]|0;v=a+24|0;d=k[v>>2]|0;if(b&2147483647){b=b<<1;c=0;do{i[d+(c*19172|0)+19153>>0]=0;i[d+(c*19172|0)+19155>>0]=0;c=c+1|0}while(c>>>0>>0)}t=d+24|0;s=a+128|0;k[t+0>>2]=k[s+0>>2];k[t+4>>2]=k[s+4>>2];k[t+8>>2]=k[s+8>>2];k[t+12>>2]=k[s+12>>2];k[t+16>>2]=k[s+16>>2];t=a+148|0;_m((k[v>>2]|0)+48|0,t|0,19100)|0;p=a+32|0;q=a+20|0;j=0;d=0;e=0;b=0;a:while(1){do{c=pf(k[a>>2]|0,(k[p>>2]|0)+d|0,4194304-d&-16)|0;if((c|0)<0)break a;d=c+d|0;if(!d)break a}while((c|0)>0&(d|0)<1024);n=(c|0)==0&1;c=j;b:while(1){if((c|0)<(d|0)){h=0;f=0}else{j=c;continue a}while(1){if(h>>>0>=k[u>>2]<<1>>>0){m=h;l=f;j=c;c=0;break}j=k[v>>2]|0;k[j+(h*19172|0)>>2]=a;b=j+(h*19172|0)+19155|0;if(i[b>>0]|0){k[j+(h*19172|0)+19148>>2]=d;o=(i[j+(h*19172|0)+20>>0]|0)==0;i[j+(h*19172|0)+19154>>0]=n;i[b>>0]=0;k[j+(h*19172|0)+19168>>2]=h;if(o)x=23}else{o=j+(h*19172|0)+4|0;mg(o,(k[p>>2]|0)+c|0);k[j+(h*19172|0)+8>>2]=0;k[o>>2]=0;k[j+(h*19172|0)+19148>>2]=d-c;if((d|0)==(c|0)){m=h;l=f;j=d;c=0;b=h;break}i[j+(h*19172|0)+19152>>0]=0;i[j+(h*19172|0)+20>>0]=0;i[j+(h*19172|0)+44>>0]=0;i[j+(h*19172|0)+19154>>0]=n;i[b>>0]=0;k[j+(h*19172|0)+19168>>2]=h;x=23}if((x|0)==23?(x=0,i[j+(h*19172|0)+20>>0]=1,!(ph(a,j+(h*19172|0)+4|0,j+(h*19172|0)+24|0)|0)):0){m=h;l=f;j=c;c=1;b=h;break}b=k[j+(h*19172|0)+24>>2]|0;if(e|(b|0)>131072){i[j+(h*19172|0)+19153>>0]=1;e=1}else{f=f+1|0;e=0}g=(k[j+(h*19172|0)+36>>2]|0)+c+b|0;b=h+1|0;c=d-g|0;if((c|0)<=-1){m=b;l=f;j=g;c=0;b=h;break}if((c|0)<1024?1:(i[j+(h*19172|0)+40>>0]|0)!=0){m=b;l=f;j=g;c=0;b=h;break}else{o=h;h=b;c=g;b=o}}h=k[u>>2]|0;h=(((l>>>0)%(h>>>0)|0|0)!=0&1)+((l>>>0)/(h>>>0)|0)|0;if(l)if((m|0)==1){f=0;g=0;while(1){o=(k[v>>2]|0)+(f*19172|0)|0;k[w+(g<<3)>>2]=o;z=l-f|0;k[w+(g<<3)+4>>2]=h>>>0>>0?h:z;mh(a,o);f=f+h|0;if(l>>>0<=f>>>0)break;else g=g+1|0}}else{f=0;g=0;while(1){z=w+(g<<3)|0;k[z>>2]=(k[v>>2]|0)+(f*19172|0);o=l-f|0;k[w+(g<<3)+4>>2]=h>>>0>>0?h:o;pi(k[q>>2]|0,25,z);f=f+h|0;if(l>>>0<=f>>>0)break;else g=g+1|0}}if(!m)break;ki(k[q>>2]|0);l=0;do{g=k[v>>2]|0;h=g+(l*19172|0)|0;f=g+(l*19172|0)+19153|0;if(!(i[f>>0]|0)){if(!(qh(a,h)|0))break a;if(i[f>>0]|0)x=39}else x=39;if((x|0)==39?(x=0,!(rh(a,h)|0)):0)break a;if(i[g+(l*19172|0)+19152>>0]|0)break a;f=g+(l*19172|0)+19155|0;if(i[f>>0]|0){o=l;x=42;break b}if(i[g+(l*19172|0)+40>>0]|0)break a;l=l+1|0}while(l>>>0>>0);if(c)break a;c=d-j|0;if((c|0)<1024){d=c;c=j;x=48;break}else c=j}if((x|0)==42){x=0;j=g+(o*19172|0)+16|0;l=g+(o*19172|0)+4|0;m=k[p>>2]|0;n=(k[j>>2]|0)+(k[l>>2]|0)-m|0;if((d|0)<=(n|0))break;d=d-n|0;an(m|0,m+n|0,d|0)|0;z=g+(o*19172|0)+32|0;n=g+(o*19172|0)+24|0;k[n>>2]=(k[z>>2]|0)-(k[l>>2]|0)+(k[n>>2]|0);k[g+(o*19172|0)+36>>2]=0;k[z>>2]=0;k[j>>2]=k[p>>2];k[l>>2]=0;if(o){z=k[v>>2]|0;n=k[z+19156>>2]|0;o=k[z+19164>>2]|0;_m(z|0,h|0,19172)|0;z=k[v>>2]|0;k[z+19156>>2]=n;k[z+19164>>2]=o;i[f>>0]=0;if(c)break;else{j=0;continue}}else j=0}else if((x|0)==48){x=0;if((d|0)<0)break;if((d|0)<=0){j=0;d=0;continue}j=k[p>>2]|0;an(j|0,j+c|0,d|0)|0;j=0;continue}if(c)break}sh(a);z=k[v>>2]|0;a=z+(b*19172|0)+24|0;k[s+0>>2]=k[a+0>>2];k[s+4>>2]=k[a+4>>2];k[s+8>>2]=k[a+8>>2];k[s+12>>2]=k[a+12>>2];k[s+16>>2]=k[a+16>>2];_m(t|0,z+(b*19172|0)+48|0,19100)|0;r=y;return}function ph(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;n=c+12|0;k[n>>2]=0;if((i[b+8>>0]|0)==0?(g=a+120|0,f=k[g>>2]|0,(k[b>>2]|0)>(f+-7|0)):0){m=a+4|0;e=k[m>>2]|0;d=f-e|0;if((d|0)<0){a=0;return a|0}j=a+136|0;l=a+128|0;k[l>>2]=(k[j>>2]|0)-e+(k[l>>2]|0);if((e|0)>16384){if((d|0)>0){h=k[a+16>>2]|0;an(h|0,h+e|0,d|0)|0}k[m>>2]=0;k[g>>2]=d}else d=f;if((d|0)!=32768){e=pf(k[a>>2]|0,(k[a+16>>2]|0)+d|0,32768-d|0)|0;d=k[g>>2]|0;if((e|0)>0){d=d+e|0;k[g>>2]=d}}else{d=32768;e=0}g=d+-30|0;h=a+124|0;k[h>>2]=g;f=k[m>>2]|0;k[j>>2]=f;d=k[l>>2]|0;if((d|0)!=-1){l=f+-1+d|0;k[h>>2]=(g|0)<(l|0)?g:l}if((e|0)==-1){a=0;return a|0}}h=b+4|0;kg(b,0-(k[h>>2]|0)&7);l=lg(b)|0;m=l>>>8;kg(b,8);e=l>>>11;d=e&3;if((d|0)==3){a=0;return a|0}k[n>>2]=d+3;k[c+4>>2]=(m&7)+1;j=lg(b)|0;kg(b,8);g=e&3;e=0;f=0;while(1){e=((lg(b)|0)>>>8<<(f<<3))+e|0;n=(k[h>>2]|0)+8|0;d=(n>>>3)+(k[b>>2]|0)|0;k[b>>2]=d;k[h>>2]=n&7;if((f|0)==(g|0))break;else f=f+1|0}k[c>>2]=e;if((m^90^j>>>8^e^e>>>8^e>>>16)&255){a=0;return a|0}k[c+8>>2]=d;a=a+124|0;h=k[a>>2]|0;b=d+-1+e|0;k[a>>2]=(h|0)<(b|0)?h:b;i[c+16>>0]=l>>>14&1;i[c+17>>0]=l>>>15&1;a=1;return a|0}function qh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;A=r;r=r+16|0;z=A;c=k[b+19156>>2]|0;y=k[b+19160>>2]|0;u=c+(y*12|0)|0;if((y|0)<=0){a=1;r=A;return a|0}v=a+59104|0;w=a+112|0;x=a+19248|0;y=a+92|0;f=a+96|0;g=a+88|0;h=a+84|0;l=a+104|0;n=z+4|0;o=z+12|0;p=z+8|0;q=a+19252|0;s=a+19536|0;t=a+19520|0;b=c;while(1){e=k[v>>2]|0;d=k[w>>2]&e;k[w>>2]=d;c=k[x>>2]|0;if(!((c-d&e)>>>0>4099|(c|0)==(d|0))?(sh(a),c=s,B=k[c+4>>2]|0,d=t,e=k[d+4>>2]|0,(B|0)>(e|0)|((B|0)==(e|0)?(k[c>>2]|0)>>>0>(k[d>>2]|0)>>>0:0)):0){b=0;c=16;break}switch(k[b>>2]|0){case 0:{c=b+4|0;d=b+8|0;e=0;do{C=i[d+e>>0]|0;B=k[w>>2]|0;k[w>>2]=B+1;i[(k[q>>2]|0)+(k[v>>2]&B)>>0]=C;e=e+1|0}while(e>>>0<=(m[c>>1]|0)>>>0);break}case 3:{c=k[b+8>>2]|0;d=k[a+(c<<2)+84>>2]|0;if(c)do{C=c;c=c+-1|0;k[a+(C<<2)+84>>2]=k[a+(c<<2)+84>>2]}while((c|0)!=0);k[h>>2]=d;C=m[b+4>>1]|0;k[l>>2]=C;ai(a,C,d);break}case 2:{c=k[l>>2]|0;if(c)ai(a,c,k[h>>2]|0);break}case 4:{i[z>>0]=j[b+4>>1];k[n>>2]=k[b+8>>2];i[o>>0]=j[b+16>>1];k[p>>2]=k[b+20>>2];vh(a,z)|0;b=b+12|0;break}case 1:{C=b+8|0;B=k[C>>2]|0;k[f>>2]=k[y>>2];k[y>>2]=k[g>>2];k[g>>2]=k[h>>2];k[h>>2]=B;B=m[b+4>>1]|0;k[l>>2]=B;ai(a,B,k[C>>2]|0);break}default:{}}b=b+12|0;if(b>>>0>=u>>>0){b=1;c=16;break}}if((c|0)==16){r=A;return b|0}return 0}function rh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;U=r;r=r+16|0;T=U;c=b+44|0;if(!(i[c>>0]|0)){i[c>>0]=1;c=b+4|0;if(!(th(a,c,b+24|0,b+48|0)|0)){i[b+19152>>0]=1;S=0;r=U;return S|0}}else c=b+4|0;S=b+4|0;e=k[S>>2]|0;d=k[b+24>>2]|0;if((e|0)>(d+(k[b+36>>2]|0)|0)){i[b+19152>>0]=1;S=0;r=U;return S|0}q=d+-1+(k[b+32>>2]|0)|0;s=b+19148|0;t=(k[s>>2]|0)+-16|0;u=(q|0)<(t|0)?q:t;v=a+59104|0;w=a+112|0;x=a+19248|0;y=b+16|0;z=b+8|0;A=b+180|0;B=a+19252|0;C=b+4e3|0;D=a+92|0;E=a+96|0;F=a+88|0;G=a+84|0;H=a+104|0;I=b+7820|0;J=b+7688|0;K=b+3868|0;L=b+11640|0;M=b+11508|0;N=b+48|0;O=a+19536|0;P=a+19520|0;Q=b+28|0;R=b+19154|0;a:while(1){d=k[v>>2]|0;f=k[w>>2]&d;k[w>>2]=f;if((e|0)>=(u|0)){if((e|0)>(q|0)){c=1;d=69;break}if((e|0)==(q|0)?(k[z>>2]|0)>=(k[Q>>2]|0):0){c=1;d=69;break}e=k[S>>2]|0;if(!(((i[R>>0]|0)!=0|(e|0)<(t|0))&(e|0)<(k[s>>2]|0))){d=13;break}}n=k[x>>2]|0;if(!((n-f&d)>>>0>4099|(n|0)==(f|0))){sh(a);g=O;p=k[g+4>>2]|0;n=P;h=k[n+4>>2]|0;if((p|0)>(h|0)|((p|0)==(h|0)?(k[g>>2]|0)>>>0>(k[n>>2]|0)>>>0:0)){c=0;d=69;break}e=k[S>>2]|0}p=k[y>>2]|0;f=k[z>>2]|0;g=(l[p+(e+1)>>0]<<8|l[p+e>>0]<<16|l[p+(e+2)>>0])>>>(8-f|0)&65534;d=k[A>>2]|0;if(g>>>0<(k[b+(d<<2)+52>>2]|0)>>>0){d=g>>>(16-d|0);o=(l[b+d+184>>0]|0)+f|0;h=(o>>>3)+e|0;k[S>>2]=h;o=o&7;k[z>>2]=o;d=b+(d<<1)+1208|0}else{do{d=d+1|0;if(d>>>0>=15){d=15;break}}while(g>>>0>=(k[b+(d<<2)+52>>2]|0)>>>0);o=d+f|0;h=(o>>>3)+e|0;k[S>>2]=h;o=o&7;k[z>>2]=o;d=((g-(k[b+(d+-1<<2)+52>>2]|0)|0)>>>(16-d|0))+(k[b+(d<<2)+116>>2]|0)|0;d=b+((d>>>0>=(k[N>>2]|0)>>>0?0:d)<<1)+3256|0}d=j[d>>1]|0;e=d&65535;do if((d&65535)<256){n=k[w>>2]|0;k[w>>2]=n+1;i[(k[B>>2]|0)+n>>0]=d}else{if((d&65535)<=261)if((e|0)==256){if(!(uh(a,c,T)|0)){c=1;d=69;break a}vh(a,T)|0;break}else if((e|0)==257){d=k[H>>2]|0;if(!d)break;ai(a,d,k[G>>2]|0);break}else{d=e+-258|0;o=k[a+(d<<2)+84>>2]|0;if(d)do{n=d;d=d+-1|0;k[a+(n<<2)+84>>2]=k[a+(d<<2)+84>>2]}while((d|0)!=0);k[G>>2]=o;d=k[S>>2]|0;e=k[z>>2]|0;h=(l[p+(d+1)>>0]<<8|l[p+d>>0]<<16|l[p+(d+2)>>0])>>>(8-e|0)&65534;f=k[L>>2]|0;if(h>>>0<(k[b+(f<<2)+11512>>2]|0)>>>0){h=h>>>(16-f|0);n=(l[b+h+11644>>0]|0)+e|0;g=(n>>>3)+d|0;k[S>>2]=g;n=n&7;k[z>>2]=n;d=b+(h<<1)+12668|0}else{do{f=f+1|0;if(f>>>0>=15){f=15;break}}while(h>>>0>=(k[b+(f<<2)+11512>>2]|0)>>>0);n=f+e|0;g=(n>>>3)+d|0;k[S>>2]=g;n=n&7;k[z>>2]=n;d=((h-(k[b+(f+-1<<2)+11512>>2]|0)|0)>>>(16-f|0))+(k[b+(f<<2)+11576>>2]|0)|0;d=b+((d>>>0>=(k[M>>2]|0)>>>0?0:d)<<1)+14716|0}h=j[d>>1]|0;f=h&65535;if((h&65535)>=8){e=f>>>2;h=e+-1|0;d=((f&3|4)<>0]<<8|l[p+g>>0]<<16|l[p+(g+2)>>0])>>>(8-n|0)&65535)>>>(17-e|0))+d|0;n=n+h|0;k[S>>2]=(n>>>3)+g;k[z>>2]=n&7}}else d=f+2|0;k[H>>2]=d;ai(a,d,o);break}f=e+-262|0;if(f>>>0>=8){e=f>>>2;g=e+-1|0;d=((f&3|4)<>0]<<8|l[p+h>>0]<<16|l[p+(h+2)>>0])>>>(8-o|0)&65535)>>>(17-e|0))+d|0;o=o+g|0;h=(o>>>3)+h|0;k[S>>2]=h;o=o&7;k[z>>2]=o}}else d=e+-260|0;e=(l[p+(h+1)>>0]<<8|l[p+h>>0]<<16|l[p+(h+2)>>0])>>>(8-o|0)&65534;f=k[C>>2]|0;if(e>>>0<(k[b+(f<<2)+3872>>2]|0)>>>0){e=e>>>(16-f|0);o=(l[b+e+4004>>0]|0)+o|0;n=(o>>>3)+h|0;k[S>>2]=n;o=o&7;k[z>>2]=o;e=b+(e<<1)+5028|0}else{do{f=f+1|0;if(f>>>0>=15){f=15;break}}while(e>>>0>=(k[b+(f<<2)+3872>>2]|0)>>>0);o=f+o|0;n=(o>>>3)+h|0;k[S>>2]=n;o=o&7;k[z>>2]=o;e=((e-(k[b+(f+-1<<2)+3872>>2]|0)|0)>>>(16-f|0))+(k[b+(f<<2)+3936>>2]|0)|0;e=b+((e>>>0>=(k[K>>2]|0)>>>0?0:e)<<1)+7076|0}g=j[e>>1]|0;f=g&65535;do if((g&65535)>=4){g=f>>>1;h=g+-1|0;e=((f&1|2)<>>0<=3){e=(((l[p+(n+1)>>0]<<16|l[p+n>>0]<<24|l[p+(n+2)>>0]<<8|l[p+(n+3)>>0])<>0]|0)>>>(8-o|0))>>>(33-g|0))+e|0;g=o+h|0;k[S>>2]=(g>>>3)+n;k[z>>2]=g&7;break}if(h>>>0>4){h=(((l[p+(n+1)>>0]<<16|l[p+n>>0]<<24|l[p+(n+2)>>0]<<8|l[p+(n+3)>>0])<>0]|0)>>>(8-o|0))>>>(37-g|0)<<4)+e|0;o=g+-5+o|0;n=(o>>>3)+n|0;k[S>>2]=n;o=o&7;k[z>>2]=o}else h=e;e=(l[p+(n+1)>>0]<<8|l[p+n>>0]<<16|l[p+(n+2)>>0])>>>(8-o|0)&65534;f=k[I>>2]|0;if(e>>>0<(k[b+(f<<2)+7692>>2]|0)>>>0){e=e>>>(16-f|0);g=(l[b+e+7824>>0]|0)+o|0;k[S>>2]=(g>>>3)+n;k[z>>2]=g&7;e=b+(e<<1)+8848|0}else{do{f=f+1|0;if(f>>>0>=15){f=15;break}}while(e>>>0>=(k[b+(f<<2)+7692>>2]|0)>>>0);g=f+o|0;k[S>>2]=(g>>>3)+n;k[z>>2]=g&7;e=((e-(k[b+(f+-1<<2)+7692>>2]|0)|0)>>>(16-f|0))+(k[b+(f<<2)+7756>>2]|0)|0;e=b+((e>>>0>=(k[J>>2]|0)>>>0?0:e)<<1)+10896|0}e=(m[e>>1]|0)+h|0}}else e=f+1|0;while(0);if(e>>>0>256)if(e>>>0>8192)d=(e>>>0>262144?3:2)+d|0;else d=d+1|0;k[E>>2]=k[D>>2];k[D>>2]=k[F>>2];k[F>>2]=k[G>>2];k[G>>2]=e;k[H>>2]=d;ai(a,d,e)}while(0);e=k[S>>2]|0}if((d|0)==13){i[b+19155>>0]=1;S=1;r=U;return S|0}else if((d|0)==69){r=U;return c|0}return 0}function sh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=r;r=r+16|0;D=L;K=a+116|0;b=k[K>>2]|0;I=a+112|0;J=a+59104|0;d=k[J>>2]|0;C=(k[I>>2]|0)-b&d;H=a+68|0;E=a+72|0;a:do if(!(k[E>>2]|0))F=71;else{p=a+44|0;q=a+40|0;s=a+48|0;t=a+36|0;u=a+59100|0;v=a+19512|0;w=a+19252|0;x=a+19384|0;y=a+19256|0;z=a+19530|0;A=a+19536|0;B=a+19256|0;f=d;d=0;h=C;b:while(1){j=k[H>>2]|0;o=j+(d<<4)|0;do if((i[o>>0]|0)!=8){g=j+(d<<4)+13|0;m=k[j+(d<<4)+4>>2]|0;if(i[g>>0]|0){if((m-(k[K>>2]|0)&f)>>>0>C>>>0){j=f;g=h;break}i[g>>0]=0;j=f;g=h;break}n=k[j+(d<<4)+8>>2]|0;if((f&m-b)>>>0>>0){if((m|0)==(b|0)){j=f;g=h}else{Oh(a,b,m);g=k[J>>2]|0;j=g;g=(k[I>>2]|0)-m&g;b=m}if(n>>>0>g>>>0){F=50;break b}if(n){b=j&n+m;j=k[p>>2]|0;k[q>>2]=n;if(j>>>0>>0){g=k[s>>2]|0;if((g|0)!=0&g>>>0>>0){k[D>>2]=g;Jf(32944,53104,D);Af(32944);j=k[p>>2]|0;g=k[q>>2]|0}else g=n;j=j+32+(j>>>2)|0;j=g>>>0>j>>>0?g:j;g=zm(k[t>>2]|0,j)|0;if(!g)Af(32944);k[t>>2]=g;k[p>>2]=j}else g=k[t>>2]|0;do if((b+-1|0)>>>0>>0){j=k[u>>2]|0;l=j-m|0;if(!(i[v>>0]|0)){_m(g|0,(k[w>>2]|0)+m|0,l|0)|0;_m(g+l|0,k[w>>2]|0,b|0)|0;break}if((j|0)!=(m|0)){h=0;do{f=h+m|0;do if((k[x>>2]|0)>>>0<=f>>>0){j=1;while(1){if((k[a+(j<<2)+19384>>2]|0)>>>0>f>>>0){F=35;break}j=j+1|0;if(j>>>0>=32){F=36;break}}if((F|0)==35){F=0;j=(k[a+(j<<2)+19256>>2]|0)+(f-(k[a+(j+-1<<2)+19384>>2]|0))|0;break}else if((F|0)==36){F=0;j=k[y>>2]|0;break}}else j=(k[y>>2]|0)+f|0;while(0);i[g+h>>0]=i[j>>0]|0;h=h+1|0}while((h|0)!=(l|0))}if(b){f=0;do{do if((k[x>>2]|0)>>>0<=f>>>0){j=1;while(1){if((k[a+(j<<2)+19384>>2]|0)>>>0>f>>>0){F=43;break}j=j+1|0;if(j>>>0>=32){F=44;break}}if((F|0)==43){F=0;j=(k[a+(j<<2)+19256>>2]|0)+(f-(k[a+(j+-1<<2)+19384>>2]|0))|0;break}else if((F|0)==44){F=0;j=k[y>>2]|0;break}}else j=(k[y>>2]|0)+f|0;while(0);i[g+(f+l)>>0]=i[j>>0]|0;f=f+1|0}while((f|0)!=(b|0))}}else{if(!(i[v>>0]|0)){_m(g|0,(k[w>>2]|0)+m|0,n|0)|0;break}else h=0;do{f=h+m|0;do if((k[x>>2]|0)>>>0<=f>>>0){j=1;while(1){if((k[a+(j<<2)+19384>>2]|0)>>>0>f>>>0){F=25;break}j=j+1|0;if(j>>>0>=32){F=26;break}}if((F|0)==25){F=0;j=(k[a+(j<<2)+19256>>2]|0)+(f-(k[a+(j+-1<<2)+19384>>2]|0))|0;break}else if((F|0)==26){F=0;j=k[B>>2]|0;break}}else j=(k[B>>2]|0)+f|0;while(0);i[g+h>>0]=i[j>>0]|0;h=h+1|0}while((h|0)!=(n|0))}while(0);j=Qh(a,g,n,o)|0;i[(k[H>>2]|0)+(d<<4)>>0]=8;if(j)qf(k[a>>2]|0,j,n);i[z>>0]=1;j=A;j=Vm(k[j>>2]|0,k[j+4>>2]|0,n|0,0)|0;g=A;k[g>>2]=j;k[g+4>>2]=O;g=k[J>>2]|0;j=g;g=(k[I>>2]|0)-b&g}}else{j=f;g=h}}else{j=f;g=h}while(0);d=d+1|0;f=k[E>>2]|0;if(d>>>0>=f>>>0){j=0;break}else{f=j;h=g}}if((F|0)==50){k[K>>2]=b;f=k[E>>2]|0;if(d>>>0>>0){g=k[H>>2]|0;do{if((i[g+(d<<4)>>0]|0)!=8)i[g+(d<<4)+13>>0]=0;d=d+1|0}while(d>>>0>>0);j=1}else j=1}do if(!f){if(!j){F=71;break a}}else{d=0;g=0;h=0;do{if(d){C=k[H>>2]|0;f=C+(h-g<<4)|0;C=C+(h<<4)|0;k[f+0>>2]=k[C+0>>2];k[f+4>>2]=k[C+4>>2];k[f+8>>2]=k[C+8>>2];k[f+12>>2]=k[C+12>>2];f=k[E>>2]|0}g=((i[(k[H>>2]|0)+(h<<4)>>0]|0)==8&1)+g|0;h=h+1|0;d=(g|0)!=0}while(h>>>0>>0);if(d?(e=f-g|0,G=a+76|0,c=k[G>>2]|0,k[E>>2]=e,c>>>0>>0):0){d=k[a+80>>2]|0;if((d|0)!=0&e>>>0>d>>>0){k[D>>2]=d;Jf(32944,53104,D);Af(32944);c=k[G>>2]|0;e=k[E>>2]|0}c=c+32+(c>>>2)|0;e=e>>>0>c>>>0?e:c;c=zm(k[H>>2]|0,e<<4)|0;if(!c)Af(32944);k[H>>2]=c;k[G>>2]=e;if(j)break;else{F=71;break a}}if(!j){F=71;break a}}while(0);f=k[I>>2]|0}while(0);if((F|0)==71){Oh(a,b,k[I>>2]|0);f=k[I>>2]|0;k[K>>2]=f}e=k[a+59100>>2]|0;d=k[J>>2]|0;e=(e>>>0<4194304?e:4194304)+f&d;c=a+19248|0;k[c>>2]=e;b=k[K>>2]|0;if((e|0)!=(f|0)){if((b|0)==(f|0)){r=L;return}if((d&b-f)>>>0>=(d&e-f)>>>0){r=L;return}}k[c>>2]=b;r=L;return}function th(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=r;r=r+464|0;p=C+432|0;B=C;if(!(i[c+17>>0]|0)){a=1;r=C;return a|0}z=b+8|0;if((i[z>>0]|0)==0?(f=a+120|0,g=k[f>>2]|0,(k[b>>2]|0)>(g+-25|0)):0){m=a+4|0;e=k[m>>2]|0;c=g-e|0;if((c|0)<0){a=0;r=C;return a|0}n=a+136|0;o=a+128|0;k[o>>2]=(k[n>>2]|0)-e+(k[o>>2]|0);if((e|0)>16384){if((c|0)>0){y=k[a+16>>2]|0;an(y|0,y+e|0,c|0)|0}k[m>>2]=0;k[f>>2]=c}else c=g;if((c|0)!=32768){e=pf(k[a>>2]|0,(k[a+16>>2]|0)+c|0,32768-c|0)|0;c=k[f>>2]|0;if((e|0)>0){c=c+e|0;k[f>>2]=c}}else{c=32768;e=0}g=c+-30|0;h=a+124|0;k[h>>2]=g;f=k[m>>2]|0;k[n>>2]=f;c=k[o>>2]|0;if((c|0)!=-1){y=f+-1+c|0;k[h>>2]=(g|0)<(y|0)?g:y}if((e|0)==-1){a=0;r=C;return a|0}else c=0}else c=0;do{e=(lg(b)|0)>>>12;kg(b,4);do if((e&255|0)==15){e=(lg(b)|0)>>>12;kg(b,4);if(!(e&255)){i[p+c>>0]=15;break}if(c>>>0<20){x=e&255;y=-2-x|0;x=((y|0)>-1?-3-y|0:-2)-x|0;y=c+-20|0;y=x>>>0>y>>>0?x:y;Ym(p+c|0,0,0-y|0)|0;c=c-y|0}c=c+-1|0}else i[p+c>>0]=e;while(0);c=c+1|0}while(c>>>0<20);y=d+15280|0;Gh(0,p,y,20);h=b+12|0;n=b+4|0;q=d+15412|0;s=a+120|0;t=a+4|0;u=a+136|0;v=a+128|0;w=a+16|0;x=a+124|0;c=0;a:while(1){p=(c|0)<430;m=(c|0)>0;while(1){g=(i[z>>0]|0)!=0;if(!p){o=57;break a}if(!g?(A=k[s>>2]|0,(k[b>>2]|0)>(A+-5|0)):0){e=k[t>>2]|0;g=A-e|0;if((g|0)<0){c=0;o=60;break a}k[v>>2]=(k[u>>2]|0)-e+(k[v>>2]|0);if((e|0)>16384){if((g|0)>0){f=k[w>>2]|0;an(f|0,f+e|0,g|0)|0}k[t>>2]=0;k[s>>2]=g}else g=A;if((g|0)!=32768){e=pf(k[a>>2]|0,(k[w>>2]|0)+g|0,32768-g|0)|0;g=k[s>>2]|0;if((e|0)>0){g=g+e|0;k[s>>2]=g}}else{g=32768;e=0}o=g+-30|0;k[x>>2]=o;g=k[t>>2]|0;k[u>>2]=g;f=k[v>>2]|0;if((f|0)!=-1){f=g+-1+f|0;k[x>>2]=(o|0)<(f|0)?o:f}if((e|0)==-1){c=0;o=60;break a}}g=k[b>>2]|0;f=k[h>>2]|0;e=k[n>>2]|0;f=(l[f+(g+1)>>0]<<8|l[f+g>>0]<<16|l[f+(g+2)>>0])>>>(8-e|0)&65534;o=k[q>>2]|0;if(f>>>0<(k[d+(o<<2)+15284>>2]|0)>>>0){f=f>>>(16-o|0);e=(l[d+f+15416>>0]|0)+e|0;k[b>>2]=(e>>>3)+g;k[n>>2]=e&7;g=d+(f<<1)+16440|0}else{do{o=o+1|0;if(o>>>0>=15){o=15;break}}while(f>>>0>=(k[d+(o<<2)+15284>>2]|0)>>>0);e=o+e|0;k[b>>2]=(e>>>3)+g;k[n>>2]=e&7;g=((f-(k[d+(o+-1<<2)+15284>>2]|0)|0)>>>(16-o|0))+(k[d+(o<<2)+15348>>2]|0)|0;g=d+((g>>>0>=(k[y>>2]|0)>>>0?0:g)<<1)+18488|0}g=j[g>>1]|0;if((g&65535)<16){o=46;break}if((g&65535)>=18){o=54;break}e=lg(b)|0;if(g<<16>>16==16){kg(b,3);g=(e>>>13)+3|0}else{kg(b,7);g=(e>>>9)+11|0}if(m){o=52;break}}if((o|0)==46){i[B+c>>0]=g;c=c+1|0;continue}else if((o|0)==52){m=0-g|0;m=~(g+((m|0)>-1?m:-1));g=c+-430|0;g=c-(g>>>0>>0?m:g)|0;while(1){i[B+c>>0]=i[B+(c+-1)>>0]|0;c=c+1|0;if((c|0)==(g|0)){c=g;continue a}}}else if((o|0)==54){e=lg(b)|0;if(g<<16>>16==18){kg(b,3);g=(e>>>13)+3|0}else{kg(b,7);g=(e>>>9)+11|0}p=0-g|0;p=~(g+((p|0)>-1?p:-1));m=c+-430|0;m=m>>>0

>>0?p:m;Ym(B+c|0,0,0-m|0)|0;c=c-m|0;continue}}if((o|0)==57){if(!g?(k[b>>2]|0)>(k[s>>2]|0):0){a=0;r=C;return a|0}Gh(0,B,d,306);Gh(0,B+306|0,d+3820|0,64);Gh(0,B+370|0,d+7640|0,16);Gh(0,B+386|0,d+11460|0,44);a=1;r=C;return a|0}else if((o|0)==60){r=C;return c|0}return 0}function uh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;if((i[b+8>>0]|0)==0?(g=a+120|0,e=k[g>>2]|0,(k[b>>2]|0)>(e+-16|0)):0){j=a+4|0;f=k[j>>2]|0;d=e-f|0;if((d|0)<0){b=0;return b|0}l=a+136|0;m=a+128|0;k[m>>2]=(k[l>>2]|0)-f+(k[m>>2]|0);if((f|0)>16384){if((d|0)>0){h=k[a+16>>2]|0;an(h|0,h+f|0,d|0)|0}k[j>>2]=0;k[g>>2]=d}else d=e;if((d|0)!=32768){e=pf(k[a>>2]|0,(k[a+16>>2]|0)+d|0,32768-d|0)|0;d=k[g>>2]|0;if((e|0)>0){d=d+e|0;k[g>>2]=d;h=e}else h=e}else{d=32768;h=0}g=d+-30|0;f=a+124|0;k[f>>2]=g;e=k[j>>2]|0;k[l>>2]=e;d=k[m>>2]|0;if((d|0)!=-1){j=e+-1+d|0;k[f>>2]=(g|0)<(j|0)?g:j}if((h|0)==-1){b=0;return b|0}}e=lg(b)|0;g=b+4|0;d=(k[g>>2]|0)+2|0;k[b>>2]=(d>>>3)+(k[b>>2]|0);k[g>>2]=d&7;e=e>>>14;d=0;f=0;while(1){d=((lg(b)|0)>>>8<<(f<<3))+d|0;j=(k[g>>2]|0)+8|0;k[b>>2]=(j>>>3)+(k[b>>2]|0);k[g>>2]=j&7;if((f|0)==(e|0))break;else f=f+1|0}k[c+4>>2]=d;e=lg(b)|0;d=(k[g>>2]|0)+2|0;k[b>>2]=(d>>>3)+(k[b>>2]|0);k[g>>2]=d&7;e=e>>>14;d=0;f=0;while(1){d=((lg(b)|0)>>>8<<(f<<3))+d|0;j=(k[g>>2]|0)+8|0;k[b>>2]=(j>>>3)+(k[b>>2]|0);k[g>>2]=j&7;if((f|0)==(e|0))break;else f=f+1|0}k[c+8>>2]=d;j=(lg(b)|0)>>>13&255;i[c>>0]=j;kg(b,3);if(i[c>>0]|0){b=1;return b|0}j=((lg(b)|0)>>>11)+1&255;i[c+12>>0]=j;kg(b,5);b=1;return b|0}function vh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;m=r;r=r+32|0;g=m+16|0;h=m;j=a+68|0;l=a+72|0;if((k[l>>2]|0)>>>0>8190)sh(a);c=k[a+116>>2]|0;f=k[a+112>>2]|0;if((c|0)==(f|0)){c=0;d=k[b+4>>2]|0;e=k[a+59104>>2]|0}else{e=k[a+59104>>2]|0;d=k[b+4>>2]|0;c=(e&c-f)>>>0<=d>>>0&1}i[b+13>>0]=c;k[b+4>>2]=f+d&e;k[h+0>>2]=k[b+0>>2];k[h+4>>2]=k[b+4>>2];k[h+8>>2]=k[b+8>>2];k[h+12>>2]=k[b+12>>2];c=(k[l>>2]|0)+1|0;k[l>>2]=c;f=a+76|0;d=k[f>>2]|0;if(c>>>0<=d>>>0){l=c;g=k[j>>2]|0;l=l+-1|0;l=g+(l<<4)|0;k[l+0>>2]=k[h+0>>2];k[l+4>>2]=k[h+4>>2];k[l+8>>2]=k[h+8>>2];k[l+12>>2]=k[h+12>>2];r=m;return 1}e=k[a+80>>2]|0;if((e|0)!=0&c>>>0>e>>>0){k[g>>2]=e;Jf(32944,53104,g);Af(32944);d=k[f>>2]|0;c=k[l>>2]|0}d=d+32+(d>>>2)|0;c=c>>>0>d>>>0?c:d;d=zm(k[j>>2]|0,c<<4)|0;if(!d)Af(32944);k[j>>2]=d;k[f>>2]=c;l=k[l>>2]|0;g=d;l=l+-1|0;l=g+(l<<4)|0;k[l+0>>2]=k[h+0>>2];k[l+4>>2]=k[h+4>>2];k[l+8>>2]=k[h+8>>2];k[l+12>>2]=k[h+12>>2];r=m;return 1}function wh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;if(b)c=1;else{Ym(a+148|0,0,19100)|0;c=a+59100|0;d=a+84|0;e=d+36|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));d=k[c>>2]|0;k[a+19248>>2]=(d>>>0<4194304?d:4194304)&k[a+59104>>2];d=a+68|0;c=k[d>>2]|0;if(c){ym(c);k[d>>2]=0}k[a+72>>2]=0;k[a+76>>2]=0;c=0}k[a+8>>2]=0;r=a+4|0;k[r>>2]=0;s=a+19536|0;k[s>>2]=0;k[s+4>>2]=0;s=a+120|0;t=a+128|0;k[s+0>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;k[s+12>>2]=0;k[s+16>>2]=0;k[s+20>>2]=0;k[s+24>>2]=0;k[t>>2]=-1;if(!c){k[a+38736>>2]=0;k[a+38740>>2]=0;k[a+38728>>2]=0;k[a+38732>>2]=1;Ym(a+38744|0,0,368)|0;Ym(a+22420|0,0,16308)|0;i[a+58972>>0]=0;Ym(a+58564|0,0,404)|0;k[a+58560>>2]=2;k[a+58968>>2]=0;Nh(a)}if(!b){q=a+22372|0;k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;k[q+12>>2]=0;k[q+16>>2]=0;k[q+20>>2]=0;k[a+22368>>2]=13568;k[a+22416>>2]=8193;k[a+22412>>2]=128;k[a+22408>>2]=128}o=a+22404|0;k[o>>2]=0;p=a+22364|0;k[p>>2]=0;q=a+22396|0;k[q>>2]=0;k[a+22400>>2]=0;k[s>>2]=0;c=k[r>>2]|0;if((c|0)<=0){l=a+136|0;k[t>>2]=(k[l>>2]|0)-c+(k[t>>2]|0);f=pf(k[a>>2]|0,k[a+16>>2]|0,32768)|0;c=k[s>>2]|0;if((f|0)>0){c=c+f|0;k[s>>2]=c}f=c+-30|0;d=a+124|0;k[d>>2]=f;e=k[r>>2]|0;k[l>>2]=e;c=k[t>>2]|0;if((c|0)!=-1){h=e+-1+c|0;k[d>>2]=(f|0)<(h|0)?f:h}}if(b)k[a+112>>2]=k[a+116>>2];else{c=0;do{h=c<<8&65535;j[a+(c<<1)+20570>>1]=h;j[a+(c<<1)+19546>>1]=h;j[a+(c<<1)+20058>>1]=c;j[a+(c<<1)+21082>>1]=0-c<<8;c=c+1|0}while((c|0)!=256);Ym(a+21594|0,0,768)|0;Bh(0,a+20570|0,a+21850|0);k[a+112>>2]=0}m=a+19520|0;g=m;h=k[g>>2]|0;g=k[g+4>>2]|0;c=Vm(h|0,g|0,-1,-1)|0;f=O;b=m;k[b>>2]=c;k[b+4>>2]=f;if((g|0)>0|(g|0)==0&h>>>0>0){xh(a);k[o>>2]=8;n=20}while(1){if((n|0)==20){n=0;c=m;f=k[c+4>>2]|0;c=k[c>>2]|0}if(!((f|0)>-1|(f|0)==-1&c>>>0>4294967295)){n=22;break}g=a+59104|0;f=k[g>>2]|0;h=a+112|0;c=k[h>>2]&f;k[h>>2]=c;l=k[r>>2]|0;d=k[s>>2]|0;if((l|0)>(d+-30|0)){c=d-l|0;if((c|0)<0)break;b=a+136|0;k[t>>2]=(k[b>>2]|0)-l+(k[t>>2]|0);if((l|0)>16384){if((c|0)>0){e=k[a+16>>2]|0;an(e|0,e+l|0,c|0)|0}k[r>>2]=0;k[s>>2]=c}else c=d;if((c|0)!=32768){f=pf(k[a>>2]|0,(k[a+16>>2]|0)+c|0,32768-c|0)|0;c=k[s>>2]|0;if((f|0)>0){c=c+f|0;k[s>>2]=c}}else{c=32768;f=0}l=c+-30|0;d=a+124|0;k[d>>2]=l;e=k[r>>2]|0;k[b>>2]=e;c=k[t>>2]|0;if((c|0)!=-1){b=e+-1+c|0;k[d>>2]=(l|0)<(b|0)?l:b}if((f|0)==-1)break;c=k[h>>2]|0;f=k[g>>2]|0}d=a+116|0;e=k[d>>2]|0;if(!((e-c&f)>>>0>269|(e|0)==(c|0))){i[a+19530>>0]=1;b=k[a>>2]|0;g=a+19252|0;l=(k[g>>2]|0)+e|0;if(c>>>0>>0){qf(b,l,f&0-e);qf(k[a>>2]|0,k[g>>2]|0,k[h>>2]|0);i[a+19529>>0]=1}else qf(b,l,c-e|0);k[d>>2]=k[h>>2]}if(k[q>>2]|0){yh(a);n=20;continue}n=k[o>>2]|0;c=n+-1|0;k[o>>2]=c;if((n|0)<1){xh(a);k[o>>2]=7;c=7}n=k[p>>2]|0;f=n<<1;k[p>>2]=f;if(n&128)if((k[a+22412>>2]|0)>>>0>(k[a+22408>>2]|0)>>>0){zh(a);n=20;continue}else{yh(a);n=20;continue}k[o>>2]=c+-1;if((c|0)<1){xh(a);k[o>>2]=7;c=k[p>>2]|0}else c=f;k[p>>2]=c<<1;if(!(c&128)){Ah(a);n=20;continue}if((k[a+22412>>2]|0)>>>0>(k[a+22408>>2]|0)>>>0){yh(a);n=20;continue}else{zh(a);n=20;continue}}if((n|0)==22)h=a+112|0;c=k[h>>2]|0;d=a+116|0;e=k[d>>2]|0;if((c|0)!=(e|0))i[a+19530>>0]=1;f=k[a>>2]|0;g=a+19252|0;b=(k[g>>2]|0)+e|0;if(c>>>0>>0){qf(f,b,k[a+59104>>2]&0-e);qf(k[a>>2]|0,k[g>>2]|0,k[h>>2]|0);i[a+19529>>0]=1;a=k[h>>2]|0;k[d>>2]=a;return}else{qf(f,b,c-e|0);a=k[h>>2]|0;k[d>>2]=a;return}}function xh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;d=a+4|0;g=(lg(d)|0)&65520;if((k[12864]|0)>>>0<=g>>>0){c=5;e=0;while(1){c=c+1|0;b=e+1|0;if((k[51456+(b<<2)>>2]|0)>>>0>g>>>0)break;else e=b}kg(d,c);if(!b)b=0;else b=k[51456+(e<<2)>>2]|0}else{kg(d,5);c=5;b=0}g=a+(((g-b|0)>>>(16-c|0))+(k[51488+(c<<2)>>2]|0)<<1)+21082|0;d=m[g>>1]|0;f=a+22364|0;k[f>>2]=d>>>8;b=d+1|0;d=a+(d&255)+22106|0;c=i[d>>0]|0;i[d>>0]=c+1<<24>>24;if(b&255){f=b;d=c;d=d&255;a=a+(d<<1)+21082|0;d=j[a>>1]|0;j[g>>1]=d;g=f&65535;j[a>>1]=g;return}d=a+21082|0;e=a+22106|0;do{Bh(0,d,e);h=m[g>>1]|0;k[f>>2]=h>>>8;c=h+1|0;h=a+(h&255)+22106|0;b=i[h>>0]|0;i[h>>0]=b+1<<24>>24}while((c&255|0)==0);f=b&255;a=a+(f<<1)+21082|0;f=j[a>>1]|0;j[g>>1]=f;g=c&65535;j[a>>1]=g;return}function yh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0;n=a+4|0;g=lg(n)|0;f=a+22368|0;b=k[f>>2]|0;do if(b>>>0<=30207){if(b>>>0>24063){d=g&65520;if((k[12952]|0)>>>0<=d>>>0){e=6;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51808+(b<<2)>>2]|0)>>>0>d>>>0)break;else c=b}kg(n,e);if(!b)b=0;else b=k[51808+(c<<2)>>2]|0}else{kg(n,6);e=6;b=0}b=((d-b|0)>>>(16-e|0))+(k[51840+(e<<2)>>2]|0)|0;break}if(b>>>0>13823){d=g&65520;if((k[12864]|0)>>>0<=d>>>0){e=5;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51456+(b<<2)>>2]|0)>>>0>d>>>0)break;else c=b}kg(n,e);if(!b)b=0;else b=k[51456+(c<<2)>>2]|0}else{kg(n,5);e=5;b=0}b=((d-b|0)>>>(16-e|0))+(k[51488+(e<<2)>>2]|0)|0;break}l=g&65520;if(b>>>0>3583){if((k[12886]|0)>>>0<=l>>>0){e=5;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51544+(b<<2)>>2]|0)>>>0>l>>>0)break;else c=b}kg(n,e);if(!b)b=0;else b=k[51544+(c<<2)>>2]|0}else{kg(n,5);e=5;b=0}b=((l-b|0)>>>(16-e|0))+(k[51576+(e<<2)>>2]|0)|0;break}else{if((k[12908]|0)>>>0<=l>>>0){e=4;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51632+(b<<2)>>2]|0)>>>0>l>>>0)break;else c=b}kg(n,e);if(!b)b=0;else b=k[51632+(c<<2)>>2]|0}else{kg(n,4);e=4;b=0}b=((l-b|0)>>>(16-e|0))+(k[51672+(e<<2)>>2]|0)|0;break}}else{d=g&65520;if((k[12932]|0)>>>0<=d>>>0){e=8;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51728+(b<<2)>>2]|0)>>>0>d>>>0)break;else c=b}kg(n,e);if(!b)b=0;else b=k[51728+(c<<2)>>2]|0}else{kg(n,8);e=8;b=0}b=((d-b|0)>>>(16-e|0))+(k[51752+(e<<2)>>2]|0)|0}while(0);c=b&255;e=a+22396|0;if(!(k[e>>2]|0)){g=a+22392|0;h=k[g>>2]|0;k[g>>2]=h+1;if((h|0)>15?(k[a+22404>>2]|0)==0:0)k[e>>2]=1}else{h=(c|0)==0&g>>>0>4095?256:c;c=h+-1|0;if(!h){b=lg(n)|0;kg(n,1);if(b&32768){k[e>>2]=0;k[a+22392>>2]=0;return}l=(b>>>14&1)+3|0;kg(n,1);d=(lg(n)|0)&65520;if((k[12864]|0)>>>0<=d>>>0){e=5;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51456+(b<<2)>>2]|0)>>>0>d>>>0)break;else c=b}kg(n,e);if(!b)b=0;else b=k[51456+(c<<2)>>2]|0}else{kg(n,5);e=5;b=0}h=((d-b|0)>>>(16-e|0))+(k[51488+(e<<2)>>2]|0)<<5;h=h|(lg(n)|0)>>>11;kg(n,5);f=a+19520|0;g=f;g=Um(k[g>>2]|0,k[g+4>>2]|0,l|0,0)|0;k[f>>2]=g;k[f+4>>2]=O;f=a+112|0;g=a+59104|0;d=a+19252|0;b=l;e=k[f>>2]|0;c=k[g>>2]|0;do{b=b+-1|0;a=k[d>>2]|0;i[a+e>>0]=i[a+(e-h&c)>>0]|0;c=k[g>>2]|0;e=(k[f>>2]|0)+1&c;k[f>>2]=e}while((b|0)!=0);return}}b=(k[f>>2]|0)+c|0;k[f>>2]=b-(b>>>8);b=a+22408|0;h=(k[b>>2]|0)+16|0;k[b>>2]=h;if(h>>>0>255){k[b>>2]=144;h=a+22412|0;k[h>>2]=(k[h>>2]|0)>>>1}g=a+(c<<1)+19546|0;c=(m[g>>1]|0)>>>8&255;b=a+112|0;h=k[b>>2]|0;k[b>>2]=h+1;i[(k[a+19252>>2]|0)+h>>0]=c;h=a+19520|0;c=h;c=Vm(k[c>>2]|0,k[c+4>>2]|0,-1,-1)|0;k[h>>2]=c;k[h+4>>2]=O;h=m[g>>1]|0;c=h+1|0;h=a+(h&255)+21594|0;b=i[h>>0]|0;i[h>>0]=b+1<<24>>24;if((c&254)>>>0>161){d=a+19546|0;e=a+21594|0;do{Bh(0,d,e);h=m[g>>1]|0;c=h+1|0;h=a+(h&255)+21594|0;b=i[h>>0]|0;i[h>>0]=b+1<<24>>24}while((c&254)>>>0>161)}a=a+((b&255)<<1)+19546|0;j[g>>1]=j[a>>1]|0;j[a>>1]=c;return}function zh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0;k[a+22392>>2]=0;b=a+22412|0;o=(k[b>>2]|0)+16|0;k[b>>2]=o;if(o>>>0>255){k[b>>2]=144;o=a+22408|0;k[o>>2]=(k[o>>2]|0)>>>1}g=a+22380|0;o=k[g>>2]|0;l=a+4|0;e=lg(l)|0;b=k[g>>2]|0;do if(b>>>0>121){d=e&65520;if((k[12814]|0)>>>0<=d>>>0){e=3;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51256+(b<<2)>>2]|0)>>>0>d>>>0)break;else c=b}kg(l,e);if(!b)b=0;else b=k[51256+(c<<2)>>2]|0}else{kg(l,3);e=3;b=0}b=((d-b|0)>>>(16-e|0))+(k[51296+(e<<2)>>2]|0)|0}else{if(b>>>0<=63){if(e>>>0<256){kg(l,16);b=e;break}else b=0;while(1){c=b+1|0;if(!(32768>>>b&e))b=c;else break}kg(l,c);break}d=e&65520;if((k[12838]|0)>>>0<=d>>>0){e=2;c=0;while(1){e=e+1|0;b=c+1|0;if((k[51352+(b<<2)>>2]|0)>>>0>d>>>0)break;else c=b}kg(l,e);if(!b)b=0;else b=k[51352+(c<<2)>>2]|0}else{kg(l,2);e=2;b=0}b=((d-b|0)>>>(16-e|0))+(k[51400+(e<<2)>>2]|0)|0}while(0);e=(k[g>>2]|0)+b|0;k[g>>2]=e-(e>>>5);e=lg(l)|0;f=a+22372|0;c=k[f>>2]|0;do if(c>>>0<=10495){g=e&65520;if(c>>>0>1791){if((k[12886]|0)>>>0<=g>>>0){c=5;d=0;while(1){c=c+1|0;e=d+1|0;if((k[51544+(e<<2)>>2]|0)>>>0>g>>>0)break;else d=e}kg(l,c);if(!e)e=0;else e=k[51544+(d<<2)>>2]|0}else{kg(l,5);c=5;e=0}h=((g-e|0)>>>(16-c|0))+(k[51576+(c<<2)>>2]|0)|0;break}else{if((k[12908]|0)>>>0<=g>>>0){c=4;d=0;while(1){c=c+1|0;e=d+1|0;if((k[51632+(e<<2)>>2]|0)>>>0>g>>>0)break;else d=e}kg(l,c);if(!e)e=0;else e=k[51632+(d<<2)>>2]|0}else{kg(l,4);c=4;e=0}h=((g-e|0)>>>(16-c|0))+(k[51672+(c<<2)>>2]|0)|0;break}}else{g=e&65520;if((k[12864]|0)>>>0<=g>>>0){c=5;d=0;while(1){c=c+1|0;e=d+1|0;if((k[51456+(e<<2)>>2]|0)>>>0>g>>>0)break;else d=e}kg(l,c);if(!e)e=0;else e=k[51456+(d<<2)>>2]|0}else{kg(l,5);c=5;e=0}h=((g-e|0)>>>(16-c|0))+(k[51488+(c<<2)>>2]|0)|0}while(0);g=(k[f>>2]|0)+h|0;k[f>>2]=g-(g>>>8);f=a+((h&255)<<1)+20570|0;g=m[f>>1]|0;e=g+1|0;g=a+(g&255)+21850|0;c=i[g>>0]|0;i[g>>0]=c+1<<24>>24;if(!(e&255)){d=a+20570|0;g=a+21850|0;do{Bh(0,d,g);p=m[f>>1]|0;e=p+1|0;p=a+(p&255)+21850|0;c=i[p>>0]|0;i[p>>0]=c+1<<24>>24}while((e&255|0)==0)}d=a+((c&255)<<1)+20570|0;j[a+(h<<1)+20570>>1]=j[d>>1]|0;j[d>>1]=e;d=(lg(l)|0)>>>8|e&65280;h=d>>>1;kg(l,7);c=a+22384|0;g=k[c>>2]|0;if(!b)if(h>>>0>(k[a+22416>>2]|0)>>>0)n=47;else{p=g+1|0;k[c>>2]=p-(p>>>8)}else if(!((b|0)==1|(b|0)==4))n=47;if((n|0)==47?(g|0)!=0:0)k[c>>2]=g+-1;e=a+22416|0;c=(h>>>0<(k[e>>2]|0)>>>0?3:4)+b|0;c=d>>>0<514?c+8|0:c;if(g>>>0>176)b=32512;else b=(o>>>0<64?(k[a+22368>>2]|0)>>>0>10751:0)?32512:8193;k[e>>2]=b;p=a+100|0;o=k[p>>2]|0;k[p>>2]=o+1;k[a+(o<<2)+84>>2]=h;k[p>>2]=k[p>>2]&3;k[a+104>>2]=c;k[a+108>>2]=h;p=a+19520|0;o=p;o=Um(k[o>>2]|0,k[o+4>>2]|0,c|0,0)|0;k[p>>2]=o;k[p+4>>2]=O;if(!c)return;f=a+112|0;g=a+59104|0;e=a+19252|0;b=c;c=k[f>>2]|0;d=k[g>>2]|0;do{b=b+-1|0;p=k[e>>2]|0;i[p+c>>0]=i[p+(c-h&d)>>0]|0;d=k[g>>2]|0;c=(k[f>>2]|0)+1&d;k[f>>2]=c}while((b|0)!=0);return}function Ah(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,l=0,m=0;k[a+22392>>2]=0;m=a+4|0;b=lg(m)|0;h=a+22400|0;do if((k[h>>2]|0)==2){kg(m,1);if(b>>>0<=32767){k[h>>2]=0;b=b<<1;break}h=k[a+108>>2]|0;b=k[a+104>>2]|0;f=a+19520|0;g=f;g=Um(k[g>>2]|0,k[g+4>>2]|0,b|0,0)|0;k[f>>2]=g;k[f+4>>2]=O;if(!b)return;g=a+112|0;f=a+59104|0;e=a+19252|0;c=k[g>>2]|0;d=k[f>>2]|0;do{b=b+-1|0;a=k[e>>2]|0;i[a+c>>0]=i[a+(c-h&d)>>0]|0;d=k[f>>2]|0;c=(k[g>>2]|0)+1&d;k[g>>2]=c}while((b|0)!=0);return}while(0);d=b>>>8;f=a+22376|0;g=a+22388|0;if((k[f>>2]|0)>>>0<37){c=0;while(1){b=(c|0)==1;if(b)e=(k[g>>2]|0)+3|0;else e=k[51e3+(c<<2)>>2]|0;if(!((k[51064+(c<<2)>>2]^d)&~(255>>>e)))break;else c=c+1|0}if(b)b=(k[g>>2]|0)+3|0;else b=k[51e3+(c<<2)>>2]|0;kg(m,b);l=c}else{c=0;while(1){b=(c|0)==3;if(b)e=(k[g>>2]|0)+3|0;else e=k[51128+(c<<2)>>2]|0;if(!((k[51192+(c<<2)>>2]^d)&~(255>>>e)))break;else c=c+1|0}if(b)b=(k[g>>2]|0)+3|0;else b=k[51128+(c<<2)>>2]|0;kg(m,b);l=c}if(l>>>0<=8){k[h>>2]=0;d=(k[f>>2]|0)+l|0;k[f>>2]=d-(d>>>4);d=(lg(m)|0)&65520;if((k[12864]|0)>>>0<=d>>>0){c=5;e=0;while(1){c=c+1|0;b=e+1|0;if((k[51456+(b<<2)>>2]|0)>>>0>d>>>0)break;else e=b}kg(m,c);if(!b)b=0;else b=k[51456+(e<<2)>>2]|0}else{kg(m,5);c=5;b=0}b=((d-b|0)>>>(16-c|0))+(k[51488+(c<<2)>>2]|0)&255;c=a+(b<<1)+20058|0;d=j[c>>1]|0;if(b){h=a+(b+-1<<1)+20058|0;j[c>>1]=j[h>>1]|0;j[h>>1]=d}b=l+2|0;g=(d&65535)+1|0;h=a+100|0;f=k[h>>2]|0;k[h>>2]=f+1;k[a+(f<<2)+84>>2]=g;k[h>>2]=k[h>>2]&3;k[a+104>>2]=b;k[a+108>>2]=g;h=a+19520|0;f=h;f=Um(k[f>>2]|0,k[f+4>>2]|0,b|0,0)|0;k[h>>2]=f;k[h+4>>2]=O;if(!b)return;f=a+112|0;h=a+59104|0;e=a+19252|0;c=k[f>>2]|0;d=k[h>>2]|0;do{b=b+-1|0;a=k[e>>2]|0;i[a+c>>0]=i[a+(c-g&d)>>0]|0;d=k[h>>2]|0;c=(k[f>>2]|0)+1&d;k[f>>2]=c}while((b|0)!=0);return}if((l|0)==9){k[h>>2]=(k[h>>2]|0)+1;h=k[a+108>>2]|0;b=k[a+104>>2]|0;f=a+19520|0;g=f;g=Um(k[g>>2]|0,k[g+4>>2]|0,b|0,0)|0;k[f>>2]=g;k[f+4>>2]=O;if(!b)return;f=a+112|0;g=a+59104|0;e=a+19252|0;c=k[f>>2]|0;d=k[g>>2]|0;do{b=b+-1|0;a=k[e>>2]|0;i[a+c>>0]=i[a+(c-h&d)>>0]|0;d=k[g>>2]|0;c=(k[f>>2]|0)+1&d;k[f>>2]=c}while((b|0)!=0);return}k[h>>2]=0;if((l|0)==14){e=(lg(m)|0)&65520;if((k[12814]|0)>>>0<=e>>>0){c=3;d=0;while(1){c=c+1|0;b=d+1|0;if((k[51256+(b<<2)>>2]|0)>>>0>e>>>0)break;else d=b}kg(m,c);if(!b)b=0;else b=k[51256+(d<<2)>>2]|0}else{kg(m,3);c=3;b=0}b=(k[51296+(c<<2)>>2]|0)+5+((e-b|0)>>>(16-c|0))|0;h=(lg(m)|0)>>>1|32768;kg(m,15);k[a+104>>2]=b;k[a+108>>2]=h;f=a+19520|0;g=f;g=Um(k[g>>2]|0,k[g+4>>2]|0,b|0,0)|0;k[f>>2]=g;k[f+4>>2]=O;if(!b)return;g=a+112|0;f=a+59104|0;e=a+19252|0;c=k[g>>2]|0;d=k[f>>2]|0;do{b=b+-1|0;a=k[e>>2]|0;i[a+c>>0]=i[a+(c-h&d)>>0]|0;d=k[f>>2]|0;c=(k[g>>2]|0)+1&d;k[g>>2]=c}while((b|0)!=0);return}g=a+100|0;h=k[a+((-3-l+(k[g>>2]|0)&3)<<2)+84>>2]|0;d=(lg(m)|0)&65520;if((k[12838]|0)>>>0<=d>>>0){c=2;e=0;while(1){c=c+1|0;b=e+1|0;if((k[51352+(b<<2)>>2]|0)>>>0>d>>>0)break;else e=b}kg(m,c);if(!b)b=0;else b=k[51352+(e<<2)>>2]|0}else{kg(m,2);c=2;b=0}b=((d-b|0)>>>(16-c|0))+(k[51400+(c<<2)>>2]|0)|0;c=b+2|0;if((c|0)==257&(l|0)==10){a=a+22388|0;k[a>>2]=k[a>>2]^1;return}b=(h>>>0>=(k[a+22416>>2]|0)>>>0&1)+(h>>>0>256?b+3|0:c)|0;f=k[g>>2]|0;k[g>>2]=f+1;k[a+(f<<2)+84>>2]=h;k[g>>2]=k[g>>2]&3;k[a+104>>2]=b;k[a+108>>2]=h;f=a+19520|0;g=f;g=Um(k[g>>2]|0,k[g+4>>2]|0,b|0,0)|0;k[f>>2]=g;k[f+4>>2]=O;if(!b)return;g=a+112|0;f=a+59104|0;e=a+19252|0;c=k[g>>2]|0;d=k[f>>2]|0;do{b=b+-1|0;a=k[e>>2]|0;i[a+c>>0]=i[a+(c-h&d)>>0]|0;d=k[f>>2]|0;c=(k[g>>2]|0)+1&d;k[g>>2]=c}while((b|0)!=0);return}function Bh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a=b;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280|7;d=d+1|0;if((d|0)==32)break;else a=a+2|0}a=b+64|0;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280|6;d=d+1|0;if((d|0)==32)break;else a=a+2|0}a=b+128|0;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280|5;d=d+1|0;if((d|0)==32)break;else a=a+2|0}a=b+192|0;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280|4;d=d+1|0;if((d|0)==32)break;else a=a+2|0}a=b+256|0;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280|3;d=d+1|0;if((d|0)==32)break;else a=a+2|0}a=b+320|0;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280|2;d=d+1|0;if((d|0)==32)break;else a=a+2|0}a=b+384|0;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280|1;d=d+1|0;if((d|0)==32)break;else a=a+2|0}a=b+448|0;d=0;while(1){j[a>>1]=(m[a>>1]|0)&65280;d=d+1|0;if((d|0)==32)break;else a=a+2|0}Ym(c|0,0,256)|0;i[c+6>>0]=32;i[c+5>>0]=64;i[c+4>>0]=96;i[c+3>>0]=-128;i[c+2>>0]=-96;i[c+1>>0]=-64;i[c>>0]=-32;return}function Ch(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0;Q=a+19528|0;if(!(i[Q>>0]|0)){if(b)c=1;else{Ym(a+148|0,0,19100)|0;c=a+59100|0;d=a+84|0;e=d+36|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));c=k[c>>2]|0;k[a+19248>>2]=(c>>>0<4194304?c:4194304)&k[a+59104>>2];c=a+68|0;d=k[c>>2]|0;if(d){ym(d);k[c>>2]=0}k[a+72>>2]=0;k[a+76>>2]=0;c=0}k[a+8>>2]=0;g=a+4|0;k[g>>2]=0;e=a+19536|0;k[e>>2]=0;k[e+4>>2]=0;e=a+120|0;o=a+128|0;k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[e+16>>2]=0;k[e+20>>2]=0;k[e+24>>2]=0;k[o>>2]=-1;if(c){f=0;d=0}else{k[a+38736>>2]=0;k[a+38740>>2]=0;k[a+38728>>2]=0;k[a+38732>>2]=1;Ym(a+38744|0,0,368)|0;Ym(a+22420|0,0,16308)|0;i[a+58972>>0]=0;Ym(a+58564|0,0,404)|0;k[a+58560>>2]=2;k[a+58968>>2]=0;Nh(a);f=k[e>>2]|0;d=k[g>>2]|0}c=f-d|0;if((c|0)<0)return;n=a+136|0;k[o>>2]=(k[n>>2]|0)-d+(k[o>>2]|0);if((d|0)>16384){if((c|0)>0){M=k[a+16>>2]|0;an(M|0,M+d|0,c|0)|0}k[g>>2]=0;k[e>>2]=c}else c=f;if((c|0)!=32768){f=pf(k[a>>2]|0,(k[a+16>>2]|0)+c|0,32768-c|0)|0;c=k[e>>2]|0;if((f|0)>0){c=c+f|0;k[e>>2]=c}}else{c=32768;f=0}e=c+-30|0;h=a+124|0;k[h>>2]=e;d=k[g>>2]|0;k[n>>2]=d;c=k[o>>2]|0;if((c|0)!=-1){M=d+-1+c|0;k[h>>2]=(e|0)<(M|0)?e:M}if((f|0)==-1)return;if(!b?!(Dh(a)|0):0)return;M=a+19520|0;d=M;d=Vm(k[d>>2]|0,k[d+4>>2]|0,-1,-1)|0;c=O;k[M>>2]=d;k[M+4>>2]=c}else{k[a+112>>2]=k[a+116>>2];d=a+19520|0;c=k[d+4>>2]|0;d=k[d>>2]|0}P=a+19520|0;a:do if((c|0)>-1|(c|0)==-1&d>>>0>4294967295){r=a+59104|0;c=a+112|0;s=a+4|0;t=a+120|0;u=a+136|0;v=a+128|0;w=a+16|0;x=a+124|0;n=a+116|0;y=a+38728|0;z=a+8|0;A=a+280|0;B=a+19252|0;C=a+4100|0;D=a+100|0;E=a+108|0;F=a+104|0;G=a+3968|0;H=a+11740|0;I=a+11608|0;J=a+148|0;K=a+38736|0;L=a+38732|0;M=a+19529|0;N=a+19530|0;while(1){f=k[r>>2]|0;o=k[c>>2]&f;k[c>>2]=o;d=k[s>>2]|0;e=k[t>>2]|0;if((d|0)>(e+-30|0)){o=e-d|0;if((o|0)<0)break a;k[v>>2]=(k[u>>2]|0)-d+(k[v>>2]|0);if((d|0)>16384){if((o|0)>0){p=k[w>>2]|0;an(p|0,p+d|0,o|0)|0}k[s>>2]=0;k[t>>2]=o}else o=e;if((o|0)!=32768){f=pf(k[a>>2]|0,(k[w>>2]|0)+o|0,32768-o|0)|0;o=k[t>>2]|0;if((f|0)>0){o=o+f|0;k[t>>2]=o}}else{o=32768;f=0}o=o+-30|0;k[x>>2]=o;d=k[s>>2]|0;k[u>>2]=d;e=k[v>>2]|0;if((e|0)!=-1){p=d+-1+e|0;k[x>>2]=(o|0)<(p|0)?o:p}if((f|0)==-1)break a;o=k[c>>2]|0;f=k[r>>2]|0}d=k[n>>2]|0;if(!((d-o&f)>>>0>269|(d|0)==(o|0))){i[N>>0]=1;e=k[a>>2]|0;b=(k[B>>2]|0)+d|0;if(o>>>0>>0){qf(e,b,f&0-d);qf(k[a>>2]|0,k[B>>2]|0,k[c>>2]|0);i[M>>0]=1}else qf(e,b,o-d|0);o=k[c>>2]|0;k[n>>2]=o;if(i[Q>>0]|0)break}do if(!(k[y>>2]|0)){d=k[s>>2]|0;p=k[w>>2]|0;e=k[z>>2]|0;b=(l[p+(d+1)>>0]<<8|l[p+d>>0]<<16|l[p+(d+2)>>0])>>>(8-e|0)&65534;f=k[A>>2]|0;if(b>>>0<(k[a+(f<<2)+152>>2]|0)>>>0){f=b>>>(16-f|0);e=(l[a+f+284>>0]|0)+e|0;b=(e>>>3)+d|0;k[s>>2]=b;e=e&7;k[z>>2]=e;f=a+(f<<1)+1308|0}else{do{f=f+1|0;if(f>>>0>=15){f=15;break}}while(b>>>0>=(k[a+(f<<2)+152>>2]|0)>>>0);e=f+e|0;g=(e>>>3)+d|0;k[s>>2]=g;e=e&7;k[z>>2]=e;f=((b-(k[a+(f+-1<<2)+152>>2]|0)|0)>>>(16-f|0))+(k[a+(f<<2)+216>>2]|0)|0;f=a+((f>>>0>=(k[J>>2]|0)>>>0?0:f)<<1)+3356|0;b=g}f=j[f>>1]|0;d=f&65535;if((f&65535)<256){k[c>>2]=o+1;i[(k[B>>2]|0)+o>>0]=f;f=P;f=Vm(k[f>>2]|0,k[f+4>>2]|0,-1,-1)|0;o=O;p=P;k[p>>2]=f;k[p+4>>2]=o;break}if((f&65535)>269){f=d+-270|0;o=(l[52136+f>>0]|0)+3|0;f=l[52168+f>>0]|0;if((d+-278|0)>>>0<20){o=(((l[p+(b+1)>>0]<<8|l[p+b>>0]<<16|l[p+(b+2)>>0])>>>(8-e|0)&65535)>>>(16-f|0))+o|0;e=e+f|0;b=(e>>>3)+b|0;k[s>>2]=b;e=e&7;k[z>>2]=e}d=(l[p+(b+1)>>0]<<8|l[p+b>>0]<<16|l[p+(b+2)>>0])>>>(8-e|0)&65534;f=k[C>>2]|0;if(d>>>0<(k[a+(f<<2)+3972>>2]|0)>>>0){f=d>>>(16-f|0);q=(l[a+f+4104>>0]|0)+e|0;e=(q>>>3)+b|0;k[s>>2]=e;b=q&7;k[z>>2]=b;f=a+(f<<1)+5128|0}else{do{f=f+1|0;if(f>>>0>=15){f=15;break}}while(d>>>0>=(k[a+(f<<2)+3972>>2]|0)>>>0);q=f+e|0;e=(q>>>3)+b|0;k[s>>2]=e;b=q&7;k[z>>2]=b;f=((d-(k[a+(f+-1<<2)+3972>>2]|0)|0)>>>(16-f|0))+(k[a+(f<<2)+4036>>2]|0)|0;f=a+((f>>>0>=(k[G>>2]|0)>>>0?0:f)<<1)+7176|0}q=m[f>>1]|0;f=(k[51896+(q<<2)>>2]|0)+1|0;d=l[52088+q>>0]|0;if((q+-4|0)>>>0<44){f=(((l[p+(e+1)>>0]<<8|l[p+e>>0]<<16|l[p+(e+2)>>0])>>>(8-b|0)&65535)>>>(16-d|0))+f|0;q=b+d|0;k[s>>2]=(q>>>3)+e;k[z>>2]=q&7}if(f>>>0>8191)o=(f>>>0>262143?2:1)+o|0;p=k[D>>2]|0;k[D>>2]=p+1;k[a+((p&3)<<2)+84>>2]=f;k[E>>2]=f;k[F>>2]=o;p=P;p=Um(k[p>>2]|0,k[p+4>>2]|0,o|0,0)|0;q=P;k[q>>2]=p;k[q+4>>2]=O;ai(a,o,f);q=53;break}if((d|0)==256){p=k[F>>2]|0;q=k[E>>2]|0;h=k[D>>2]|0;k[D>>2]=h+1;k[a+((h&3)<<2)+84>>2]=q;k[E>>2]=q;k[F>>2]=p;h=P;h=Um(k[h>>2]|0,k[h+4>>2]|0,p|0,0)|0;g=P;k[g>>2]=h;k[g+4>>2]=O;ai(a,p,q);q=53;break}else if((d|0)==269)if(Dh(a)|0){q=53;break}else break a;else{if((f&65535)>=261){q=d+-261|0;g=l[52608+q>>0]|0;q=(l[52600+q>>0]|0)+1+(((l[p+(b+1)>>0]<<8|l[p+b>>0]<<16|l[p+(b+2)>>0])>>>(8-e|0)&65535)>>>(16-g|0))|0;g=e+g|0;k[s>>2]=(g>>>3)+b;k[z>>2]=g&7;g=k[D>>2]|0;k[D>>2]=g+1;k[a+((g&3)<<2)+84>>2]=q;k[E>>2]=q;k[F>>2]=2;g=P;g=Vm(k[g>>2]|0,k[g+4>>2]|0,-2,-1)|0;p=P;k[p>>2]=g;k[p+4>>2]=O;ai(a,2,q);q=53;break}g=k[D>>2]|0;h=k[a+((g-d&3)<<2)+84>>2]|0;f=(l[p+(b+1)>>0]<<8|l[p+b>>0]<<16|l[p+(b+2)>>0])>>>(8-e|0)&65534;o=k[H>>2]|0;if(f>>>0<(k[a+(o<<2)+11612>>2]|0)>>>0){o=f>>>(16-o|0);e=(l[a+o+11744>>0]|0)+e|0;d=(e>>>3)+b|0;k[s>>2]=d;e=e&7;k[z>>2]=e;o=a+(o<<1)+12768|0}else{do{o=o+1|0;if(o>>>0>=15){o=15;break}}while(f>>>0>=(k[a+(o<<2)+11612>>2]|0)>>>0);e=o+e|0;d=(e>>>3)+b|0;k[s>>2]=d;e=e&7;k[z>>2]=e;o=((f-(k[a+(o+-1<<2)+11612>>2]|0)|0)>>>(16-o|0))+(k[a+(o<<2)+11676>>2]|0)|0;o=a+((o>>>0>=(k[I>>2]|0)>>>0?0:o)<<1)+14816|0}q=m[o>>1]|0;o=(l[52136+q>>0]|0)+2|0;f=l[52168+q>>0]|0;if((q+-8|0)>>>0<20){o=(((l[p+(d+1)>>0]<<8|l[p+d>>0]<<16|l[p+(d+2)>>0])>>>(8-e|0)&65535)>>>(16-f|0))+o|0;q=e+f|0;k[s>>2]=(q>>>3)+d;k[z>>2]=q&7}if(h>>>0>256)if(h>>>0>8191)o=o+(h>>>0>262143?3:2)|0;else o=o+1|0;k[D>>2]=g+1;k[a+((g&3)<<2)+84>>2]=h;k[E>>2]=h;k[F>>2]=o;p=P;p=Um(k[p>>2]|0,k[p+4>>2]|0,o|0,0)|0;q=P;k[q>>2]=p;k[q+4>>2]=O;ai(a,o,h);q=53;break}}else{f=k[K>>2]|0;d=k[s>>2]|0;b=k[w>>2]|0;e=k[z>>2]|0;b=(l[b+(d+1)>>0]<<8|l[b+d>>0]<<16|l[b+(d+2)>>0])>>>(8-e|0)&65534;o=k[a+(f*3820|0)+22552>>2]|0;if(b>>>0<(k[a+(f*3820|0)+(o<<2)+22424>>2]|0)>>>0){o=b>>>(16-o|0);p=(l[a+(f*3820|0)+o+22556>>0]|0)+e|0;k[s>>2]=(p>>>3)+d;k[z>>2]=p&7;o=a+(f*3820|0)+(o<<1)+23580|0}else{do{o=o+1|0;if(o>>>0>=15){o=15;break}}while(b>>>0>=(k[a+(f*3820|0)+(o<<2)+22424>>2]|0)>>>0);p=o+e|0;k[s>>2]=(p>>>3)+d;k[z>>2]=p&7;o=((b-(k[a+(f*3820|0)+(o+-1<<2)+22424>>2]|0)|0)>>>(16-o|0))+(k[a+(f*3820|0)+(o<<2)+22488>>2]|0)|0;o=a+(f*3820|0)+((o>>>0>=(k[a+(f*3820|0)+22420>>2]|0)>>>0?0:o)<<1)+25628|0}o=j[o>>1]|0;if(o<<16>>16==256)if(Dh(a)|0){q=53;break}else break a;else{o=Eh(a,o&65535)|0;f=k[c>>2]|0;k[c>>2]=f+1;i[(k[B>>2]|0)+f>>0]=o;f=(k[K>>2]|0)+1|0;k[K>>2]=(f|0)==(k[L>>2]|0)?0:f;f=P;f=Vm(k[f>>2]|0,k[f+4>>2]|0,-1,-1)|0;o=O;p=P;k[p>>2]=f;k[p+4>>2]=o;break}}while(0);if((q|0)==53){q=0;f=P;o=k[f+4>>2]|0;f=k[f>>2]|0}if(!((o|0)>-1|(o|0)==-1&f>>>0>4294967295))break a}return}else{n=a+116|0;c=a+112|0}while(0);Fh(a);d=k[c>>2]|0;e=k[n>>2]|0;if((d|0)!=(e|0))i[a+19530>>0]=1;f=k[a>>2]|0;g=a+19252|0;h=(k[g>>2]|0)+e|0;if(d>>>0>>0){qf(f,h,k[a+59104>>2]&0-e);qf(k[a>>2]|0,k[g>>2]|0,k[c>>2]|0);i[a+19529>>0]=1}else qf(f,h,d-e|0);k[n>>2]=k[c>>2];return} -function Ql(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0;pc=r;r=r+2160|0;oc=pc+2128|0;Zb=pc+2116|0;_b=pc+2104|0;pb=pc+2092|0;qb=pc+2080|0;rb=pc+2068|0;ib=pc+2056|0;Ya=pc+2032|0;Za=pc+2020|0;_a=pc+2008|0;$a=pc+1996|0;Ea=pc+1984|0;Fa=pc+1972|0;Mb=pc+1960|0;dc=pc+1948|0;Yb=pc+1936|0;Sb=pc+1912|0;Tb=pc+1900|0;Ub=pc+1888|0;Vb=pc+1876|0;Wb=pc+1864|0;Xb=pc+1852|0;hb=pc+1840|0;Ga=pc+1816|0;Ha=pc+1800|0;Ia=pc+1788|0;Ja=pc+1776|0;Ka=pc+1764|0;La=pc+1752|0;Ba=pc+1740|0;za=pc+1728|0;Ca=pc+1716|0;Aa=pc+1704|0;mc=pc+1692|0;ob=pc+1680|0;nc=pc+1668|0;lc=pc+1656|0;Kb=pc+1644|0;kc=pc+1632|0;Pb=pc+1620|0;Qb=pc+1608|0;$b=pc+1596|0;ac=pc+1584|0;ic=pc+1560|0;jc=pc+1544|0;Da=pc+1532|0;gb=pc+1520|0;Ma=pc+1496|0;Na=pc+1484|0;Oa=pc+1472|0;Pa=pc+1460|0;Qa=pc+1448|0;Ra=pc+1436|0;fb=pc+1424|0;Sa=pc+1400|0;Ta=pc+1384|0;Ua=pc+1372|0;Va=pc+1360|0;Wa=pc+1348|0;Xa=pc+1336|0;X=pc+1312|0;Y=pc+1296|0;Z=pc+1284|0;_=pc+1272|0;$=pc+1248|0;aa=pc+1232|0;ba=pc+1220|0;ca=pc+1208|0;ua=pc+1184|0;va=pc+1168|0;wa=pc+1156|0;xa=pc+1144|0;la=pc+1120|0;ma=pc+1108|0;na=pc+1096|0;pa=pc+1072|0;qa=pc+1060|0;ra=pc+1048|0;sa=pc+1036|0;gc=pc+1024|0;nb=pc+472|0;Nb=pc+460|0;Ob=pc+448|0;ec=pc+424|0;fc=pc+408|0;x=pc+396|0;y=pc+384|0;z=pc+372|0;A=pc+360|0;B=pc+348|0;C=pc+336|0;D=pc+324|0;Cb=pc+312|0;Db=pc+300|0;Eb=pc+288|0;Fb=pc+276|0;E=pc+264|0;Gb=pc+252|0;Hb=pc+240|0;Ib=pc+228|0;Jb=pc+84|0;F=pc;G=pc+12|0;Q=pc+24|0;R=pc+36|0;S=pc+48|0;T=pc+60|0;U=pc+72|0;kb=pc+96|0;jb=pc+108|0;ab=pc+120|0;bb=pc+144|0;cb=pc+156|0;db=pc+168|0;eb=pc+180|0;V=pc+192|0;I=pc+204|0;J=pc+216|0;K=pc+484|0;d=pc+496|0;g=pc+508|0;e=pc+520|0;f=pc+532|0;L=pc+544|0;da=pc+560|0;ea=pc+584|0;fa=pc+596|0;ga=pc+608|0;n=pc+620|0;j=pc+632|0;h=pc+644|0;M=pc+656|0;N=pc+668|0;O=pc+680|0;l=pc+692|0;o=pc+704|0;p=pc+716|0;P=pc+728|0;ha=pc+744|0;ia=pc+768|0;ja=pc+780|0;ka=pc+792|0;q=pc+804|0;Bb=pc+816|0;Ab=pc+828|0;zb=pc+840|0;sb=pc+856|0;tb=pc+880|0;ub=pc+892|0;vb=pc+904|0;wb=pc+916|0;xb=pc+928|0;yb=pc+940|0;s=pc+952|0;t=pc+964|0;u=pc+976|0;v=pc+988|0;mb=pc+1e3|0;lb=b;W=lb-a|0;a:do if((W|0)>1){w=(W|0)>3;if(w?(i[a>>0]|0)==103:0){H=(i[a+1>>0]|0)==115;ya=H;H=H?a+2|0:a}else{ya=0;H=a}do switch(i[H>>0]|0){case 115:switch(i[H+1>>0]|0){case 99:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=115){d=a;break a}if((i[a+1>>0]|0)!=99){d=a;break a}nc=a+2|0;g=ul(nc,b,c)|0;if((g|0)==(nc|0)){d=a;break a}d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}j=c+4|0;g=k[j>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(fb,g+-24|0);g=k[j>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[j>>2]=a;hl(a);f=k[j>>2]|0}while((f|0)!=(e|0));e=g+-48|0;Al(Xa,e);g=rl(Xa,0,58760)|0;k[Wa+0>>2]=k[g+0>>2];k[Wa+4>>2]=k[g+4>>2];k[Wa+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(Wa,58776)|0;k[Va+0>>2]=k[g+0>>2];k[Va+4>>2]=k[g+4>>2];k[Va+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[fb>>0]|0;if(!(g&1)){f=fb+1|0;g=(g&255)>>>1}else{f=k[fb+8>>2]|0;g=k[fb+4>>2]|0}a=jl(Va,f,g)|0;k[Ua+0>>2]=k[a+0>>2];k[Ua+4>>2]=k[a+4>>2];k[Ua+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(Ua,58240)|0;k[Ta+0>>2]=k[a+0>>2];k[Ta+4>>2]=k[a+4>>2];k[Ta+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[Sa+0>>2]=k[Ta+0>>2];k[Sa+4>>2]=k[Ta+4>>2];k[Sa+8>>2]=k[Ta+8>>2];k[Ta+0>>2]=0;k[Ta+4>>2]=0;k[Ta+8>>2]=0;a=Sa+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(e,Sa);hl(Sa);tl(Ta);tl(Ua);tl(Va);tl(Wa);tl(Xa);tl(fb);break a}case 114:{d=nm(a,b,c)|0;break a}case 116:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=115){d=a;break a}if((i[a+1>>0]|0)!=116){d=a;break a}nc=a+2|0;d=ul(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}a=g+-24|0;Al(_,a);nc=rl(_,0,58744)|0;k[Z+0>>2]=k[nc+0>>2];k[Z+4>>2]=k[nc+4>>2];k[Z+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;nc=sl(Z,58240)|0;k[Y+0>>2]=k[nc+0>>2];k[Y+4>>2]=k[nc+4>>2];k[Y+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;k[X+0>>2]=k[Y+0>>2];k[X+4>>2]=k[Y+4>>2];k[X+8>>2]=k[Y+8>>2];k[Y+0>>2]=0;k[Y+4>>2]=0;k[Y+8>>2]=0;nc=X+12|0;k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;Wl(a,X);hl(X);tl(Y);tl(Z);tl(_);break a}case 122:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=115){d=a;break a}if((i[a+1>>0]|0)!=122){d=a;break a}nc=a+2|0;d=Ql(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}a=g+-24|0;Al(ca,a);nc=rl(ca,0,58744)|0;k[ba+0>>2]=k[nc+0>>2];k[ba+4>>2]=k[nc+4>>2];k[ba+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;nc=sl(ba,58240)|0;k[aa+0>>2]=k[nc+0>>2];k[aa+4>>2]=k[nc+4>>2];k[aa+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;k[$+0>>2]=k[aa+0>>2];k[$+4>>2]=k[aa+4>>2];k[$+8>>2]=k[aa+8>>2];k[aa+0>>2]=0;k[aa+4>>2]=0;k[aa+8>>2]=0;nc=$+12|0;k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;Wl(a,$);hl($);tl(aa);tl(ba);tl(ca);break a}case 112:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=115){d=a;break a}if((i[a+1>>0]|0)!=112){d=a;break a}nc=a+2|0;d=Ql(nc,b,c)|0;d=(d|0)==(nc|0)?a:d;break a}case 90:{if((lb-H|0)<=2){d=a;break a}d=i[H+2>>0]|0;if((d|0)==102){if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=115){d=a;break a}if((i[a+1>>0]|0)!=90){d=a;break a}g=a+2|0;if((i[g>>0]|0)!=102){d=a;break a}d=km(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}a=g+-24|0;Al(sa,a);nc=rl(sa,0,58720)|0;k[ra+0>>2]=k[nc+0>>2];k[ra+4>>2]=k[nc+4>>2];k[ra+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;nc=sl(ra,58240)|0;k[qa+0>>2]=k[nc+0>>2];k[qa+4>>2]=k[nc+4>>2];k[qa+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;k[pa+0>>2]=k[qa+0>>2];k[pa+4>>2]=k[qa+4>>2];k[pa+8>>2]=k[qa+8>>2];k[qa+0>>2]=0;k[qa+4>>2]=0;k[qa+8>>2]=0;nc=pa+12|0;k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;Wl(a,pa);hl(pa);tl(qa);tl(ra);tl(sa);break a}else if((d|0)!=84){d=a;break a}if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=115){d=a;break a}if((i[a+1>>0]|0)!=90){d=a;break a}g=a+2|0;if((i[g>>0]|0)!=84){d=a;break a}p=c+4|0;o=((k[p>>2]|0)-(k[c>>2]|0)|0)/24|0;d=Sl(g,b,c)|0;n=k[c>>2]|0;f=((k[p>>2]|0)-n|0)/24|0;if((d|0)==(g|0)){d=a;break a}i[gc>>0]=20;m=gc+1|0;g=58720;e=m+10|0;do{i[m>>0]=i[g>>0]|0;m=m+1|0;g=g+1|0}while((m|0)<(e|0));i[gc+11>>0]=0;l=(o|0)==(f|0);if(!l){Al(nb,n+(o*24|0)|0);g=i[nb>>0]|0;if(!(g&1)){e=nb+1|0;g=(g&255)>>>1}else{e=k[nb+8>>2]|0;g=k[nb+4>>2]|0}jl(gc,e,g)|0;tl(nb);m=o+1|0;if((m|0)!=(f|0)){n=Nb+1|0;j=Nb+8|0;h=Nb+4|0;do{Al(Ob,(k[c>>2]|0)+(m*24|0)|0);g=rl(Ob,0,58736)|0;k[Nb+0>>2]=k[g+0>>2];k[Nb+4>>2]=k[g+4>>2];k[Nb+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[Nb>>0]|0;if(!(g&1)){e=n;g=(g&255)>>>1}else{e=k[j>>2]|0;g=k[h>>2]|0}jl(gc,e,g)|0;tl(Nb);tl(Ob);m=m+1|0}while((m|0)!=(f|0))}}sl(gc,58240)|0;g=k[p>>2]|0;if(!l){j=o-f|0;h=g;do{e=h;h=h+-24|0;do{a=e+-24|0;k[p>>2]=a;hl(a);e=k[p>>2]|0}while((e|0)!=(h|0));f=f+-1|0}while((f|0)!=(o|0));g=g+(j*24|0)|0};k[fc+0>>2]=k[gc+0>>2];k[fc+4>>2]=k[gc+4>>2];k[fc+8>>2]=k[gc+8>>2];k[gc+0>>2]=0;k[gc+4>>2]=0;k[gc+8>>2]=0;k[ec+0>>2]=k[fc+0>>2];k[ec+4>>2]=k[fc+4>>2];k[ec+8>>2]=k[fc+8>>2];k[fc+0>>2]=0;k[fc+4>>2]=0;k[fc+8>>2]=0;m=ec+12|0;k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;h=k[c+8>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g+0>>2]=k[ec+0>>2];k[g+4>>2]=k[ec+4>>2];k[g+8>>2]=k[ec+8>>2];k[ec+0>>2]=0;k[ec+4>>2]=0;k[ec+8>>2]=0;g=g+12|0;k[g+0>>2]=k[m+0>>2];k[g+4>>2]=k[m+4>>2];k[g+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;g=k[p>>2]|0}k[p>>2]=g+24}else{e=k[c>>2]|0;j=(g-e|0)/24|0;f=j+1|0;if((f|0)<0)Fl(c);g=(h-e|0)/24|0;if(g>>>0<1073741823){g=g<<1;g=g>>>0>>0?f:g}else g=2147483647;Kl(oc,g,j,c+12|0);g=oc+8|0;e=k[g>>2]|0;if(e){k[e+0>>2]=k[ec+0>>2];k[e+4>>2]=k[ec+4>>2];k[e+8>>2]=k[ec+8>>2];k[ec+0>>2]=0;k[ec+4>>2]=0;k[ec+8>>2]=0;a=e+12|0;k[a+0>>2]=k[m+0>>2];k[a+4>>2]=k[m+4>>2];k[a+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0}k[g>>2]=e+24;Ml(c,oc);Ll(oc)}hl(ec);tl(fc);tl(gc);break a}default:{d=a;break a}}case 114:switch(i[H+1>>0]|0){case 83:{mc=a+2|0;Ol(v,58688,3);nc=lm(mc,b,v,c)|0;tl(v);r=pc;return ((nc|0)==(mc|0)?a:nc)|0}case 109:{nc=a+2|0;Ol(s,58664,1);d=lm(nc,b,s,c)|0;tl(s);d=(d|0)==(nc|0)?a:d;break a}case 115:{nc=a+2|0;Ol(u,58680,2);d=lm(nc,b,u,c)|0;tl(u);d=(d|0)==(nc|0)?a:d;break a}case 77:{nc=a+2|0;Ol(t,58672,2);d=lm(nc,b,t,c)|0;tl(t);d=(d|0)==(nc|0)?a:d;break a}case 99:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=114){d=a;break a}if((i[a+1>>0]|0)!=99){d=a;break a}nc=a+2|0;g=ul(nc,b,c)|0;if((g|0)==(nc|0)){d=a;break a}d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}j=c+4|0;g=k[j>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(gb,g+-24|0);g=k[j>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[j>>2]=a;hl(a);f=k[j>>2]|0}while((f|0)!=(e|0));e=g+-48|0;Al(Ra,e);g=rl(Ra,0,58784)|0;k[Qa+0>>2]=k[g+0>>2];k[Qa+4>>2]=k[g+4>>2];k[Qa+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(Qa,58776)|0;k[Pa+0>>2]=k[g+0>>2];k[Pa+4>>2]=k[g+4>>2];k[Pa+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[gb>>0]|0;if(!(g&1)){f=gb+1|0;g=(g&255)>>>1}else{f=k[gb+8>>2]|0;g=k[gb+4>>2]|0}a=jl(Pa,f,g)|0;k[Oa+0>>2]=k[a+0>>2];k[Oa+4>>2]=k[a+4>>2];k[Oa+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(Oa,58240)|0;k[Na+0>>2]=k[a+0>>2];k[Na+4>>2]=k[a+4>>2];k[Na+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[Ma+0>>2]=k[Na+0>>2];k[Ma+4>>2]=k[Na+4>>2];k[Ma+8>>2]=k[Na+8>>2];k[Na+0>>2]=0;k[Na+4>>2]=0;k[Na+8>>2]=0;a=Ma+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(e,Ma);hl(Ma);tl(Na);tl(Oa);tl(Pa);tl(Qa);tl(Ra);tl(gb);break a}default:{d=a;break a}}case 108:{d=i[H+1>>0]|0;if((d|0)==116){nc=a+2|0;Ol(K,58328,1);d=lm(nc,b,K,c)|0;tl(K);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==83){nc=a+2|0;Ol(J,58520,3);d=lm(nc,b,J,c)|0;tl(J);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==101){nc=a+2|0;Ol(V,58504,2);d=lm(nc,b,V,c)|0;tl(V);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==115){nc=a+2|0;Ol(I,58512,2);d=lm(nc,b,I,c)|0;tl(I);d=(d|0)==(nc|0)?a:d;break a}else{d=a;break a}}case 103:{d=i[H+1>>0]|0;if((d|0)==101){nc=a+2|0;Ol(T,58488,2);d=lm(nc,b,T,c)|0;tl(T);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==116){nc=a+2|0;Ol(U,58336,1);d=lm(nc,b,U,c)|0;tl(U);d=(d|0)==(nc|0)?a:d;break a}else{d=a;break a}}case 109:switch(i[H+1>>0]|0){case 105:{mc=a+2|0;Ol(d,58528,1);nc=lm(mc,b,d,c)|0;tl(d);d=(nc|0)==(mc|0)?a:nc;break a}case 108:{nc=a+2|0;Ol(e,58280,1);d=lm(nc,b,e,c)|0;tl(e);d=(d|0)==(nc|0)?a:d;break a}case 76:{nc=a+2|0;Ol(f,58544,2);d=lm(nc,b,f,c)|0;tl(f);d=(d|0)==(nc|0)?a:d;break a}case 109:{g=a+2|0;if((g|0)!=(b|0)?(i[g>>0]|0)==95:0){nc=a+3|0;Ol(L,58552,2);d=mm(nc,b,L,c)|0;tl(L);d=(d|0)==(nc|0)?a:d;break a}d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}a=g+-24|0;Al(ga,a);nc=rl(ga,0,58248)|0;k[fa+0>>2]=k[nc+0>>2];k[fa+4>>2]=k[nc+4>>2];k[fa+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;nc=sl(fa,58560)|0;k[ea+0>>2]=k[nc+0>>2];k[ea+4>>2]=k[nc+4>>2];k[ea+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;k[da+0>>2]=k[ea+0>>2];k[da+4>>2]=k[ea+4>>2];k[da+8>>2]=k[ea+8>>2];k[ea+0>>2]=0;k[ea+4>>2]=0;k[ea+8>>2]=0;nc=da+12|0;k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;Wl(a,da);hl(da);tl(ea);tl(fa);tl(ga);break a}case 73:{nc=a+2|0;Ol(g,58536,2);d=lm(nc,b,g,c)|0;tl(g);d=(d|0)==(nc|0)?a:d;break a}default:{d=a;break a}}case 101:{d=i[H+1>>0]|0;if((d|0)==79){nc=a+2|0;Ol(R,58472,2);d=lm(nc,b,R,c)|0;tl(R);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==113){nc=a+2|0;Ol(S,58480,2);d=lm(nc,b,S,c)|0;tl(S);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==111){nc=a+2|0;Ol(Q,58464,1);d=lm(nc,b,Q,c)|0;tl(Q);d=(d|0)==(nc|0)?a:d;break a}else{d=a;break a}}case 105:{if((i[H+1>>0]|0)!=120){d=a;break a}nc=a+2|0;g=Ql(nc,b,c)|0;if((g|0)==(nc|0)){d=a;break a}d=Ql(g,b,c)|0;m=c+4|0;f=k[m>>2]|0;if((d|0)==(g|0)){e=f+-24|0;d=f;while(1){nc=d+-24|0;k[m>>2]=nc;hl(nc);d=k[m>>2]|0;if((d|0)==(e|0)){d=a;break a}}}if(((f-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(kb,f+-24|0);g=k[m>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[m>>2]=a;hl(a);f=k[m>>2]|0}while((f|0)!=(e|0));Al(jb,g+-48|0);e=(k[m>>2]|0)+-24|0;Zl(eb,58248,jb);g=sl(eb,58496)|0;k[db+0>>2]=k[g+0>>2];k[db+4>>2]=k[g+4>>2];k[db+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[kb>>0]|0;if(!(g&1)){f=kb+1|0;g=(g&255)>>>1}else{f=k[kb+8>>2]|0;g=k[kb+4>>2]|0}a=jl(db,f,g)|0;k[cb+0>>2]=k[a+0>>2];k[cb+4>>2]=k[a+4>>2];k[cb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(cb,58360)|0;k[bb+0>>2]=k[a+0>>2];k[bb+4>>2]=k[a+4>>2];k[bb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[ab+0>>2]=k[bb+0>>2];k[ab+4>>2]=k[bb+4>>2];k[ab+8>>2]=k[bb+8>>2];k[bb+0>>2]=0;k[bb+4>>2]=0;k[bb+8>>2]=0;a=ab+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(e,ab);hl(ab);tl(bb);tl(cb);tl(db);tl(eb);tl(jb);tl(kb);break a}case 110:switch(i[H+1>>0]|0){case 119:case 97:{do if(w){d=i[a>>0]|0;if(d<<24>>24==103){j=(i[a+1>>0]|0)==115;g=j?a+2|0:a;d=i[g>>0]|0}else{j=0;g=a}if(d<<24>>24==110?(ta=i[g+1>>0]|0,ta<<24>>24==97|ta<<24>>24==119):0){n=ta<<24>>24==97;d=g+2|0;if((d|0)==(b|0)){d=a;break a}else g=0;while(1){if((i[d>>0]|0)==95){f=g;break}dc=d;d=Ql(d,b,c)|0;if((d|0)==(dc|0)|(d|0)==(b|0)){d=a;break a}else g=1}dc=d+1|0;d=ul(dc,b,c)|0;if((d|0)==(dc|0)|(d|0)==(b|0)){d=a;break a}g=i[d>>0]|0;if((lb-d|0)>2&g<<24>>24==112){if((i[d+1>>0]|0)!=105){d=a;break a}d=d+2|0;while(1){if((i[d>>0]|0)==69){e=d;break}dc=d;d=Ql(d,b,c)|0;if((d|0)==(dc|0)|(d|0)==(b|0)){d=a;break a}}k[mc+0>>2]=0;k[mc+4>>2]=0;k[mc+8>>2]=0;g=c+4|0;d=k[g>>2]|0;if((k[c>>2]|0)!=(d|0)){Al(ob,d+-24|0);k[mc+0>>2]=k[ob+0>>2];k[mc+4>>2]=k[ob+4>>2];k[mc+8>>2]=k[ob+8>>2];k[ob+0>>2]=0;k[ob+4>>2]=0;k[ob+8>>2]=0;tl(ob);d=k[g>>2]|0;m=d+-24|0;do{hc=d+-24|0;k[g>>2]=hc;hl(hc);d=k[g>>2]|0}while((d|0)!=(m|0));bc=c;Rb=1;hc=e;Lb=303}}else{if(g<<24>>24!=69){d=a;break a};k[mc+0>>2]=0;k[mc+4>>2]=0;k[mc+8>>2]=0;bc=c;m=k[c+4>>2]|0;Rb=0;hc=d;Lb=303}if((Lb|0)==303?(cc=c+4|0,(k[bc>>2]|0)!=(m|0)):0){Al(nc,m+-24|0);d=k[cc>>2]|0;m=d+-24|0;g=d;do{dc=g+-24|0;k[cc>>2]=dc;hl(dc);g=k[cc>>2]|0}while((g|0)!=(m|0));k[lc+0>>2]=0;k[lc+4>>2]=0;k[lc+8>>2]=0;if(f)if((k[bc>>2]|0)==(m|0)){d=a;g=1}else{Al(Kb,d+-48|0);k[lc+0>>2]=k[Kb+0>>2];k[lc+4>>2]=k[Kb+4>>2];k[lc+8>>2]=k[Kb+8>>2];k[Kb+0>>2]=0;k[Kb+4>>2]=0;k[Kb+8>>2]=0;tl(Kb);m=k[cc>>2]|0;d=m+-24|0;do{dc=m+-24|0;k[cc>>2]=dc;hl(dc);m=k[cc>>2]|0}while((m|0)!=(d|0));Lb=310}else Lb=310;if((Lb|0)==310){k[kc+0>>2]=0;k[kc+4>>2]=0;k[kc+8>>2]=0;if(j)_l(kc,58416,2);if(n)sl(kc,58832)|0;else sl(kc,58320)|0;if(f){Zl(Qb,58248,lc);d=sl(Qb,58840)|0;k[Pb+0>>2]=k[d+0>>2];k[Pb+4>>2]=k[d+4>>2];k[Pb+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=i[Pb>>0]|0;if(!(d&1)){m=Pb+1|0;d=(d&255)>>>1}else{m=k[Pb+8>>2]|0;d=k[Pb+4>>2]|0}jl(kc,m,d)|0;tl(Pb);tl(Qb)}d=i[nc>>0]|0;if(!(d&1)){m=nc+1|0;d=(d&255)>>>1}else{m=k[nc+8>>2]|0;d=k[nc+4>>2]|0}jl(kc,m,d)|0;if(Rb){Zl(ac,58232,mc);d=sl(ac,58240)|0;k[$b+0>>2]=k[d+0>>2];k[$b+4>>2]=k[d+4>>2];k[$b+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=i[$b>>0]|0;if(!(d&1)){m=$b+1|0;d=(d&255)>>>1}else{m=k[$b+8>>2]|0;d=k[$b+4>>2]|0}jl(kc,m,d)|0;tl($b);tl(ac)};k[jc+0>>2]=k[kc+0>>2];k[jc+4>>2]=k[kc+4>>2];k[jc+8>>2]=k[kc+8>>2];k[kc+0>>2]=0;k[kc+4>>2]=0;k[kc+8>>2]=0;k[ic+0>>2]=k[jc+0>>2];k[ic+4>>2]=k[jc+4>>2];k[ic+8>>2]=k[jc+8>>2];k[jc+0>>2]=0;k[jc+4>>2]=0;k[jc+8>>2]=0;n=ic+12|0;k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;d=k[cc>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[ic+0>>2];k[d+4>>2]=k[ic+4>>2];k[d+8>>2]=k[ic+8>>2];k[ic+0>>2]=0;k[ic+4>>2]=0;k[ic+8>>2]=0;d=d+12|0;k[d+0>>2]=k[n+0>>2];k[d+4>>2]=k[n+4>>2];k[d+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;d=k[cc>>2]|0}k[cc>>2]=d+24}else{g=k[bc>>2]|0;m=(d-g|0)/24|0;e=m+1|0;if((e|0)<0)Fl(c);d=(f-g|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(oc,d,m,c+12|0);d=oc+8|0;g=k[d>>2]|0;if(g){k[g+0>>2]=k[ic+0>>2];k[g+4>>2]=k[ic+4>>2];k[g+8>>2]=k[ic+8>>2];k[ic+0>>2]=0;k[ic+4>>2]=0;k[ic+8>>2]=0;dc=g+12|0;k[dc+0>>2]=k[n+0>>2];k[dc+4>>2]=k[n+4>>2];k[dc+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0}k[d>>2]=g+24;Ml(c,oc);Ll(oc)}hl(ic);tl(jc);tl(kc);d=hc+1|0;g=0}tl(lc);tl(nc);tl(mc);if(g){d=a;break a}else break}tl(mc);d=a;break a}else d=a}else d=a;while(0);break a}case 120:{q=a+2|0;d=Ql(q,b,c)|0;if((d|0)!=(q|0)?(oa=k[c+4>>2]|0,(k[c>>2]|0)!=(oa|0)):0){p=oa+-24|0;Al(_b,p);nc=rl(_b,0,58816)|0;k[Zb+0>>2]=k[nc+0>>2];k[Zb+4>>2]=k[nc+4>>2];k[Zb+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;nc=sl(Zb,58240)|0;k[oc+0>>2]=k[nc+0>>2];k[oc+4>>2]=k[nc+4>>2];k[oc+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;do if(i[p>>0]&1){o=oa+-16|0;i[k[o>>2]>>0]=0;n=oa+-20|0;k[n>>2]=0;g=i[p>>0]|0;if(!(g&1))j=10;else{j=k[p>>2]|0;g=j&255;j=(j&-2)+-1|0}if(!(g&1)){e=(g&255)>>>1;if((g&255)<22){m=10;h=e;l=1}else{m=(e+16&240)+-1|0;h=e;l=1}}else{m=10;h=0;l=0}if((m|0)!=(j|0)){if((m|0)==10){f=p+1|0;e=k[o>>2]|0;if(l){_m(f|0,e|0,((g&255)>>>1)+1|0)|0;ym(e)}else{i[f>>0]=i[e>>0]|0;ym(e)}i[p>>0]=h<<1;break}e=m+1|0;f=xm(e)|0;if(!(m>>>0<=j>>>0&(f|0)==0)){if(l)_m(f|0,p+1|0,((g&255)>>>1)+1|0)|0;else{nc=k[o>>2]|0;i[f>>0]=i[nc>>0]|0;ym(nc)}k[p>>2]=e|1;k[n>>2]=h;k[o>>2]=f}}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[oc+0>>2];k[p+4>>2]=k[oc+4>>2];k[p+8>>2]=k[oc+8>>2];k[oc+0>>2]=0;k[oc+4>>2]=0;k[oc+8>>2]=0;tl(oc);tl(Zb);tl(_b)}else d=q;d=(d|0)==(q|0)?a:d;break a}case 101:{nc=a+2|0;Ol(n,58568,2);d=lm(nc,b,n,c)|0;tl(n);d=(d|0)==(nc|0)?a:d;break a}case 103:{nc=a+2|0;Ol(j,58528,1);d=mm(nc,b,j,c)|0;tl(j);d=(d|0)==(nc|0)?a:d;break a}case 116:{nc=a+2|0;Ol(h,58576,1);d=mm(nc,b,h,c)|0;tl(h);d=(d|0)==(nc|0)?a:d;break a}default:{d=a;break a}}case 113:{if((i[H+1>>0]|0)!=117){d=a;break a}nc=a+2|0;d=Ql(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}m=Ql(d,b,c)|0;if((m|0)==(d|0)){d=c+4|0;f=k[d>>2]|0;e=f+-24|0;while(1){nc=f+-24|0;k[d>>2]=nc;hl(nc);f=k[d>>2]|0;if((f|0)==(e|0)){d=a;break a}}}d=Ql(m,b,c)|0;n=c+4|0;g=k[n>>2]|0;if((d|0)==(m|0)){d=g+-24|0;e=g;do{nc=e+-24|0;k[n>>2]=nc;hl(nc);e=k[n>>2]|0}while((e|0)!=(d|0));e=g+-48|0;while(1){nc=d+-24|0;k[n>>2]=nc;hl(nc);d=k[n>>2]|0;if((d|0)==(e|0)){d=a;break a}}}if(((g-(k[c>>2]|0)|0)/24|0)>>>0<3){d=a;break a}Al(Bb,g+-24|0);g=k[n>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[n>>2]=a;hl(a);f=k[n>>2]|0}while((f|0)!=(e|0));Al(Ab,g+-48|0);g=k[n>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[n>>2]=a;hl(a);f=k[n>>2]|0}while((f|0)!=(e|0));Al(zb,g+-48|0);m=(k[n>>2]|0)+-24|0;Zl(yb,58248,zb);g=sl(yb,58648)|0;k[xb+0>>2]=k[g+0>>2];k[xb+4>>2]=k[g+4>>2];k[xb+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[Ab>>0]|0;if(!(g&1)){e=Ab+1|0;g=(g&255)>>>1}else{e=k[Ab+8>>2]|0;g=k[Ab+4>>2]|0}g=jl(xb,e,g)|0;k[wb+0>>2]=k[g+0>>2];k[wb+4>>2]=k[g+4>>2];k[wb+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(wb,58656)|0;k[vb+0>>2]=k[g+0>>2];k[vb+4>>2]=k[g+4>>2];k[vb+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[Bb>>0]|0;if(!(g&1)){e=Bb+1|0;g=(g&255)>>>1}else{e=k[Bb+8>>2]|0;g=k[Bb+4>>2]|0}a=jl(vb,e,g)|0;k[ub+0>>2]=k[a+0>>2];k[ub+4>>2]=k[a+4>>2];k[ub+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(ub,58240)|0;k[tb+0>>2]=k[a+0>>2];k[tb+4>>2]=k[a+4>>2];k[tb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[sb+0>>2]=k[tb+0>>2];k[sb+4>>2]=k[tb+4>>2];k[sb+8>>2]=k[tb+8>>2];k[tb+0>>2]=0;k[tb+4>>2]=0;k[tb+8>>2]=0;a=sb+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(m,sb);hl(sb);tl(tb);tl(ub);tl(vb);tl(wb);tl(xb);tl(yb);tl(zb);tl(Ab);tl(Bb);break a}case 111:{d=i[H+1>>0]|0;if((d|0)==114){nc=a+2|0;Ol(N,58592,1);d=lm(nc,b,N,c)|0;tl(N);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==111){nc=a+2|0;Ol(M,58584,2);d=lm(nc,b,M,c)|0;tl(M);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==82){nc=a+2|0;Ol(O,58600,2);d=lm(nc,b,O,c)|0;tl(O);d=(d|0)==(nc|0)?a:d;break a}else if((d|0)==110){d=nm(a,b,c)|0;break a}else{d=a;break a}}case 112:switch(i[H+1>>0]|0){case 109:{nc=a+2|0;Ol(l,58608,3);d=lm(nc,b,l,c)|0;tl(l);d=(d|0)==(nc|0)?a:d;break a}case 115:{nc=a+2|0;Ol(q,58616,1);d=mm(nc,b,q,c)|0;tl(q);d=(d|0)==(nc|0)?a:d;break a}case 76:{nc=a+2|0;Ol(p,58624,2);d=lm(nc,b,p,c)|0;tl(p);d=(d|0)==(nc|0)?a:d;break a}case 116:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=112){d=a;break a}if((i[a+1>>0]|0)!=116){d=a;break a}nc=a+2|0;e=Ql(nc,b,c)|0;if((e|0)==(nc|0)){d=a;break a}d=Ql(e,b,c)|0;if((d|0)==(e|0)){d=a;break a}h=c+4|0;e=k[h>>2]|0;if(((e-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(Da,e+-24|0);e=k[h>>2]|0;f=e+-24|0;g=e;do{a=g+-24|0;k[h>>2]=a;hl(a);g=k[h>>2]|0}while((g|0)!=(f|0));sl(e+-48|0,58808)|0;e=i[Da>>0]|0;if(!(e&1)){g=Da+1|0;e=(e&255)>>>1}else{g=k[Da+8>>2]|0;e=k[Da+4>>2]|0}jl((k[h>>2]|0)+-24|0,g,e)|0;tl(Da);break a}case 108:{nc=a+2|0;Ol(o,58616,1);d=lm(nc,b,o,c)|0;tl(o);d=(d|0)==(nc|0)?a:d;break a}case 112:{g=a+2|0;if((g|0)!=(b|0)?(i[g>>0]|0)==95:0){nc=a+3|0;Ol(P,58632,2);d=mm(nc,b,P,c)|0;tl(P);d=(d|0)==(nc|0)?a:d;break a}d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}a=g+-24|0;Al(ka,a);nc=rl(ka,0,58248)|0;k[ja+0>>2]=k[nc+0>>2];k[ja+4>>2]=k[nc+4>>2];k[ja+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;nc=sl(ja,58640)|0;k[ia+0>>2]=k[nc+0>>2];k[ia+4>>2]=k[nc+4>>2];k[ia+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;k[ha+0>>2]=k[ia+0>>2];k[ha+4>>2]=k[ia+4>>2];k[ha+8>>2]=k[ia+8>>2];k[ia+0>>2]=0;k[ia+4>>2]=0;k[ia+8>>2]=0;nc=ha+12|0;k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;Wl(a,ha);hl(ha);tl(ia);tl(ja);tl(ka);break a}default:{d=a;break a}}case 84:{d=Sl(a,b,c)|0;break a}case 102:{d=km(a,b,c)|0;break a}case 76:{d=jm(a,b,c)|0;break a}case 97:switch(i[H+1>>0]|0){case 78:{nc=a+2|0;Ol(A,58384,2);d=lm(nc,b,A,c)|0;tl(A);d=(d|0)==(nc|0)?a:d;break a}case 97:{nc=a+2|0;Ol(x,58256,2);d=lm(nc,b,x,c)|0;tl(x);d=(d|0)==(nc|0)?a:d;break a}case 122:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=97){d=a;break a}if((i[a+1>>0]|0)!=122){d=a;break a}nc=a+2|0;d=Ql(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}p=g+-24|0;Al(rb,p);a=rl(rb,0,60144)|0;k[qb+0>>2]=k[a+0>>2];k[qb+4>>2]=k[a+4>>2];k[qb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(qb,58240)|0;k[pb+0>>2]=k[a+0>>2];k[pb+4>>2]=k[a+4>>2];k[pb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;do if(i[p>>0]&1){o=g+-16|0;i[k[o>>2]>>0]=0;m=g+-20|0;k[m>>2]=0;g=i[p>>0]|0;if(!(g&1))h=10;else{h=k[p>>2]|0;g=h&255;h=(h&-2)+-1|0}if(!(g&1)){e=(g&255)>>>1;if((g&255)<22){n=1;j=10;l=e}else{n=1;j=(e+16&240)+-1|0;l=e}}else{n=0;j=10;l=0}if((j|0)!=(h|0)){if((j|0)==10){f=p+1|0;e=k[o>>2]|0;if(n){_m(f|0,e|0,((g&255)>>>1)+1|0)|0;ym(e)}else{i[f>>0]=i[e>>0]|0;ym(e)}i[p>>0]=l<<1;break}e=j+1|0;f=xm(e)|0;if(!(j>>>0<=h>>>0&(f|0)==0)){if(n)_m(f|0,p+1|0,((g&255)>>>1)+1|0)|0;else{a=k[o>>2]|0;i[f>>0]=i[a>>0]|0;ym(a)}k[p>>2]=e|1;k[m>>2]=l;k[o>>2]=f}}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[pb+0>>2];k[p+4>>2]=k[pb+4>>2];k[p+8>>2]=k[pb+8>>2];k[pb+0>>2]=0;k[pb+4>>2]=0;k[pb+8>>2]=0;tl(pb);tl(qb);tl(rb);break a}case 110:{nc=a+2|0;Ol(z,58296,1);d=lm(nc,b,z,c)|0;tl(z);d=(d|0)==(nc|0)?a:d;break a}case 83:{nc=a+2|0;Ol(B,58392,1);d=lm(nc,b,B,c)|0;tl(B);d=(d|0)==(nc|0)?a:d;break a}case 100:{nc=a+2|0;Ol(y,58296,1);d=mm(nc,b,y,c)|0;tl(y);d=(d|0)==(nc|0)?a:d;break a}case 116:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=97){d=a;break a}if((i[a+1>>0]|0)!=116){d=a;break a}nc=a+2|0;d=ul(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}p=g+-24|0;Al(_b,p);a=rl(_b,0,60144)|0;k[Zb+0>>2]=k[a+0>>2];k[Zb+4>>2]=k[a+4>>2];k[Zb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(Zb,58240)|0;k[oc+0>>2]=k[a+0>>2];k[oc+4>>2]=k[a+4>>2];k[oc+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;do if(i[p>>0]&1){o=g+-16|0;i[k[o>>2]>>0]=0;l=g+-20|0;k[l>>2]=0;g=i[p>>0]|0;if(!(g&1))h=10;else{h=k[p>>2]|0;g=h&255;h=(h&-2)+-1|0}if(!(g&1)){e=(g&255)>>>1;if((g&255)<22){n=1;j=10;m=e}else{n=1;j=(e+16&240)+-1|0;m=e}}else{n=0;j=10;m=0}if((j|0)!=(h|0)){if((j|0)==10){f=p+1|0;e=k[o>>2]|0;if(n){_m(f|0,e|0,((g&255)>>>1)+1|0)|0;ym(e)}else{i[f>>0]=i[e>>0]|0;ym(e)}i[p>>0]=m<<1;break}e=j+1|0;f=xm(e)|0;if(!(j>>>0<=h>>>0&(f|0)==0)){if(n)_m(f|0,p+1|0,((g&255)>>>1)+1|0)|0;else{a=k[o>>2]|0;i[f>>0]=i[a>>0]|0;ym(a)}k[p>>2]=e|1;k[l>>2]=m;k[o>>2]=f}}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[oc+0>>2];k[p+4>>2]=k[oc+4>>2];k[p+8>>2]=k[oc+8>>2];k[oc+0>>2]=0;k[oc+4>>2]=0;k[oc+8>>2]=0;tl(oc);tl(Zb);tl(_b);break a}default:{d=a;break a}}case 99:switch(i[H+1>>0]|0){case 108:{if(!w){d=a;break a}if((i[a>>0]|0)!=99){d=a;break a}if((i[a+1>>0]|0)!=108){d=a;break a}nc=a+2|0;e=Ql(nc,b,c)|0;if((e|0)==(nc|0)|(e|0)==(b|0)){d=a;break a}q=c+4|0;h=k[q>>2]|0;if((k[c>>2]|0)==(h|0)){d=a;break a}d=h+-12|0;g=i[d>>0]|0;if(!(g&1)){f=d+1|0;d=(g&255)>>>1}else{f=k[h+-4>>2]|0;d=k[h+-8>>2]|0}jl(h+-24|0,f,d)|0;d=k[q>>2]|0;p=d+-12|0;k[Mb+0>>2]=0;k[Mb+4>>2]=0;k[Mb+8>>2]=0;do if(i[p>>0]&1){o=d+-4|0;i[k[o>>2]>>0]=0;j=d+-8|0;k[j>>2]=0;d=i[p>>0]|0;if(!(d&1))n=10;else{n=k[p>>2]|0;d=n&255;n=(n&-2)+-1|0}if(!(d&1)){g=(d&255)>>>1;if((d&255)<22){l=1;f=10;h=g}else{l=1;f=(g+16&240)+-1|0;h=g}}else{l=0;f=10;h=0}if((f|0)!=(n|0)){if((f|0)==10){f=p+1|0;g=k[o>>2]|0;if(l){_m(f|0,g|0,((d&255)>>>1)+1|0)|0;ym(g)}else{i[f>>0]=i[g>>0]|0;ym(g)}i[p>>0]=h<<1;break}m=f+1|0;g=xm(m)|0;if(!(f>>>0<=n>>>0&(g|0)==0)){if(l)_m(g|0,p+1|0,((d&255)>>>1)+1|0)|0;else{nc=k[o>>2]|0;i[g>>0]=i[nc>>0]|0;ym(nc)}k[p>>2]=m|1;k[j>>2]=h;k[o>>2]=g}}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[Mb+0>>2];k[p+4>>2]=k[Mb+4>>2];k[p+8>>2]=k[Mb+8>>2];k[Mb+0>>2]=0;k[Mb+4>>2]=0;k[Mb+8>>2]=0;tl(Mb);sl((k[q>>2]|0)+-24|0,58248)|0;b:do if((i[e>>0]|0)!=69){n=dc+1|0;h=dc+8|0;l=dc+4|0;d=e;while(1){e=Ql(d,b,c)|0;if((e|0)==(d|0)|(e|0)==(b|0)){d=a;break a}d=k[q>>2]|0;if((k[c>>2]|0)==(d|0)){d=a;break a}Al(dc,d+-24|0);m=k[q>>2]|0;f=m+-24|0;d=m;do{nc=d+-24|0;k[q>>2]=nc;hl(nc);d=k[q>>2]|0}while((d|0)!=(f|0));j=i[dc>>0]|0;d=(j&1)==0;if(d)g=(j&255)>>>1;else g=k[l>>2]|0;if(g){if((k[c>>2]|0)==(f|0))break;if(d){g=n;d=(j&255)>>>1}else{g=k[h>>2]|0;d=k[l>>2]|0}jl(m+-48|0,g,d)|0}tl(dc);if((i[e>>0]|0)==69)break b;else d=e}tl(dc);d=a;break a}while(0);d=k[q>>2]|0;if((k[c>>2]|0)==(d|0)){d=a;break a}sl(d+-24|0,58240)|0;d=e+1|0;break a}case 99:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=99){d=a;break a}if((i[a+1>>0]|0)!=99){d=a;break a}nc=a+2|0;g=ul(nc,b,c)|0;if((g|0)==(nc|0)){d=a;break a}d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}j=c+4|0;g=k[j>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(ib,g+-24|0);g=k[j>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[j>>2]=a;hl(a);f=k[j>>2]|0}while((f|0)!=(e|0));e=g+-48|0;Al(Fa,e);g=rl(Fa,0,60128)|0;k[Ea+0>>2]=k[g+0>>2];k[Ea+4>>2]=k[g+4>>2];k[Ea+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(Ea,58776)|0;k[$a+0>>2]=k[g+0>>2];k[$a+4>>2]=k[g+4>>2];k[$a+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[ib>>0]|0;if(!(g&1)){f=ib+1|0;g=(g&255)>>>1}else{f=k[ib+8>>2]|0;g=k[ib+4>>2]|0}a=jl($a,f,g)|0;k[_a+0>>2]=k[a+0>>2];k[_a+4>>2]=k[a+4>>2];k[_a+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(_a,58240)|0;k[Za+0>>2]=k[a+0>>2];k[Za+4>>2]=k[a+4>>2];k[Za+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[Ya+0>>2]=k[Za+0>>2];k[Ya+4>>2]=k[Za+4>>2];k[Ya+8>>2]=k[Za+8>>2];k[Za+0>>2]=0;k[Za+4>>2]=0;k[Za+8>>2]=0;a=Ya+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(e,Ya);hl(Ya);tl(Za);tl(_a);tl($a);tl(Ea);tl(Fa);tl(ib);break a}case 111:{nc=a+2|0;Ol(D,58408,1);d=mm(nc,b,D,c)|0;tl(D);d=(d|0)==(nc|0)?a:d;break a}case 118:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=99){d=a;break a}if((i[a+1>>0]|0)!=118){d=a;break a}mc=c+63|0;lc=i[mc>>0]|0;i[mc>>0]=0;nc=a+2|0;g=ul(nc,b,c)|0;i[mc>>0]=lc;if((g|0)==(nc|0)|(g|0)==(b|0)){d=a;break a}if((i[g>>0]|0)!=95){d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}}else{d=g+1|0;if((d|0)==(b|0)){d=a;break a}g=i[d>>0]|0;c:do if(g<<24>>24==69){e=c+4|0;g=k[e>>2]|0;f=k[c+8>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;g=k[e>>2]|0}k[e>>2]=g+24;break}m=k[c>>2]|0;n=(g-m|0)/24|0;e=n+1|0;if((e|0)<0)Fl(c);g=(f-m|0)/24|0;if(g>>>0<1073741823){g=g<<1;g=g>>>0>>0?e:g}else g=2147483647;Kl(oc,g,n,c+12|0);g=oc+8|0;e=k[g>>2]|0;if(e){k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[e+16>>2]=0;k[e+20>>2]=0}k[g>>2]=e+24;Ml(c,oc);Ll(oc)}else while(1){if(g<<24>>24==69)break c;e=Ql(d,b,c)|0;if((e|0)==(d|0)|(e|0)==(b|0)){d=a;break a}g=i[e>>0]|0;d=e}while(0);d=d+1|0}j=c+4|0;g=k[j>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(Yb,g+-24|0);g=k[j>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[j>>2]=a;hl(a);f=k[j>>2]|0}while((f|0)!=(e|0));e=g+-48|0;Al(Xb,e);g=rl(Xb,0,58248)|0;k[Wb+0>>2]=k[g+0>>2];k[Wb+4>>2]=k[g+4>>2];k[Wb+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(Wb,60008)|0;k[Vb+0>>2]=k[g+0>>2];k[Vb+4>>2]=k[g+4>>2];k[Vb+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[Yb>>0]|0;if(!(g&1)){f=Yb+1|0;g=(g&255)>>>1}else{f=k[Yb+8>>2]|0;g=k[Yb+4>>2]|0}a=jl(Vb,f,g)|0;k[Ub+0>>2]=k[a+0>>2];k[Ub+4>>2]=k[a+4>>2];k[Ub+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(Ub,58240)|0;k[Tb+0>>2]=k[a+0>>2];k[Tb+4>>2]=k[a+4>>2];k[Tb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[Sb+0>>2]=k[Tb+0>>2];k[Sb+4>>2]=k[Tb+4>>2];k[Sb+8>>2]=k[Tb+8>>2];k[Tb+0>>2]=0;k[Tb+4>>2]=0;k[Tb+8>>2]=0;a=Sb+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(e,Sb);hl(Sb);tl(Tb);tl(Ub);tl(Vb);tl(Wb);tl(Xb);tl(Yb);break a}case 109:{nc=a+2|0;Ol(C,58400,1);d=lm(nc,b,C,c)|0;tl(C);d=(d|0)==(nc|0)?a:d;break a}default:{d=a;break a}}case 100:switch(i[H+1>>0]|0){case 116:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=100){d=a;break a}if((i[a+1>>0]|0)!=116){d=a;break a}nc=a+2|0;g=Ql(nc,b,c)|0;if((g|0)==(nc|0)){d=a;break a}d=nm(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}f=c+4|0;g=k[f>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(Ca,g+-24|0);h=k[f>>2]|0;g=h+-24|0;e=h;do{a=e+-24|0;k[f>>2]=a;hl(a);e=k[f>>2]|0}while((e|0)!=(g|0));Zl(Aa,62960,Ca);g=i[Aa>>0]|0;if(!(g&1)){e=Aa+1|0;g=(g&255)>>>1}else{e=k[Aa+8>>2]|0;g=k[Aa+4>>2]|0}jl(h+-48|0,e,g)|0;tl(Aa);tl(Ca);break a}case 118:{nc=a+2|0;Ol(F,58448,1);d=lm(nc,b,F,c)|0;tl(F);d=(d|0)==(nc|0)?a:d;break a}case 86:{nc=a+2|0;Ol(G,58456,2);d=lm(nc,b,G,c)|0;tl(G);d=(d|0)==(nc|0)?a:d;break a}case 97:{nc=H+2|0;d=Ql(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}g=c+4|0;f=k[g>>2]|0;if((k[c>>2]|0)==(f|0)){d=a;break a}p=f+-24|0;if(ya)Ol(Eb,58416,2);else{k[Eb+0>>2]=0;k[Eb+4>>2]=0;k[Eb+8>>2]=0}a=sl(Eb,58424)|0;k[Db+0>>2]=k[a+0>>2];k[Db+4>>2]=k[a+4>>2];k[Db+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Al(Fb,(k[g>>2]|0)+-24|0);g=i[Fb>>0]|0;if(!(g&1)){e=Fb+1|0;g=(g&255)>>>1}else{e=k[Fb+8>>2]|0;g=k[Fb+4>>2]|0}a=jl(Db,e,g)|0;k[Cb+0>>2]=k[a+0>>2];k[Cb+4>>2]=k[a+4>>2];k[Cb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;do if(i[p>>0]&1){o=f+-16|0;i[k[o>>2]>>0]=0;n=f+-20|0;k[n>>2]=0;g=i[p>>0]|0;if(!(g&1))j=10;else{j=k[p>>2]|0;g=j&255;j=(j&-2)+-1|0}if(!(g&1)){e=(g&255)>>>1;if((g&255)<22){l=1;m=10;h=e}else{l=1;m=(e+16&240)+-1|0;h=e}}else{l=0;m=10;h=0}if((m|0)!=(j|0)){if((m|0)==10){f=p+1|0;e=k[o>>2]|0;if(l){_m(f|0,e|0,((g&255)>>>1)+1|0)|0;ym(e)}else{i[f>>0]=i[e>>0]|0;ym(e)}i[p>>0]=h<<1;break}e=m+1|0;f=xm(e)|0;if(!(m>>>0<=j>>>0&(f|0)==0)){if(l)_m(f|0,p+1|0,((g&255)>>>1)+1|0)|0;else{a=k[o>>2]|0;i[f>>0]=i[a>>0]|0;ym(a)}k[p>>2]=e|1;k[n>>2]=h;k[o>>2]=f}}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[Cb+0>>2];k[p+4>>2]=k[Cb+4>>2];k[p+8>>2]=k[Cb+8>>2];k[Cb+0>>2]=0;k[Cb+4>>2]=0;k[Cb+8>>2]=0;tl(Cb);tl(Fb);tl(Db);tl(Eb);break a}case 108:{nc=H+2|0;d=Ql(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}g=c+4|0;f=k[g>>2]|0;if((k[c>>2]|0)==(f|0)){d=a;break a}p=f+-24|0;if(ya)Ol(Ib,58416,2);else{k[Ib+0>>2]=0;k[Ib+4>>2]=0;k[Ib+8>>2]=0}a=sl(Ib,58440)|0;k[Hb+0>>2]=k[a+0>>2];k[Hb+4>>2]=k[a+4>>2];k[Hb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Al(Jb,(k[g>>2]|0)+-24|0);g=i[Jb>>0]|0;if(!(g&1)){e=Jb+1|0;g=(g&255)>>>1}else{e=k[Jb+8>>2]|0;g=k[Jb+4>>2]|0}a=jl(Hb,e,g)|0;k[Gb+0>>2]=k[a+0>>2];k[Gb+4>>2]=k[a+4>>2];k[Gb+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;do if(i[p>>0]&1){o=f+-16|0;i[k[o>>2]>>0]=0;n=f+-20|0;k[n>>2]=0;g=i[p>>0]|0;if(!(g&1))j=10;else{j=k[p>>2]|0;g=j&255;j=(j&-2)+-1|0}if(!(g&1)){e=(g&255)>>>1;if((g&255)<22){l=1;m=10;h=e}else{l=1;m=(e+16&240)+-1|0;h=e}}else{l=0;m=10;h=0}if((m|0)!=(j|0)){if((m|0)==10){f=p+1|0;e=k[o>>2]|0;if(l){_m(f|0,e|0,((g&255)>>>1)+1|0)|0;ym(e)}else{i[f>>0]=i[e>>0]|0;ym(e)}i[p>>0]=h<<1;break}e=m+1|0;f=xm(e)|0;if(!(m>>>0<=j>>>0&(f|0)==0)){if(l)_m(f|0,p+1|0,((g&255)>>>1)+1|0)|0;else{a=k[o>>2]|0;i[f>>0]=i[a>>0]|0;ym(a)}k[p>>2]=e|1;k[n>>2]=h;k[o>>2]=f}}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[Gb+0>>2];k[p+4>>2]=k[Gb+4>>2];k[p+8>>2]=k[Gb+8>>2];k[Gb+0>>2]=0;k[Gb+4>>2]=0;k[Gb+8>>2]=0;tl(Gb);tl(Jb);tl(Hb);tl(Ib);break a}case 99:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=100){d=a;break a}if((i[a+1>>0]|0)!=99){d=a;break a}nc=a+2|0;g=ul(nc,b,c)|0;if((g|0)==(nc|0)){d=a;break a}d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}j=c+4|0;g=k[j>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(hb,g+-24|0);g=k[j>>2]|0;e=g+-24|0;f=g;do{a=f+-24|0;k[j>>2]=a;hl(a);f=k[j>>2]|0}while((f|0)!=(e|0));e=g+-48|0;Al(La,e);g=rl(La,0,59992)|0;k[Ka+0>>2]=k[g+0>>2];k[Ka+4>>2]=k[g+4>>2];k[Ka+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(Ka,58776)|0;k[Ja+0>>2]=k[g+0>>2];k[Ja+4>>2]=k[g+4>>2];k[Ja+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[hb>>0]|0;if(!(g&1)){f=hb+1|0;g=(g&255)>>>1}else{f=k[hb+8>>2]|0;g=k[hb+4>>2]|0}a=jl(Ja,f,g)|0;k[Ia+0>>2]=k[a+0>>2];k[Ia+4>>2]=k[a+4>>2];k[Ia+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(Ia,58240)|0;k[Ha+0>>2]=k[a+0>>2];k[Ha+4>>2]=k[a+4>>2];k[Ha+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[Ga+0>>2]=k[Ha+0>>2];k[Ga+4>>2]=k[Ha+4>>2];k[Ga+8>>2]=k[Ha+8>>2];k[Ha+0>>2]=0;k[Ha+4>>2]=0;k[Ha+8>>2]=0;a=Ga+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(e,Ga);hl(Ga);tl(Ha);tl(Ia);tl(Ja);tl(Ka);tl(La);tl(hb);break a}case 110:{d=nm(a,b,c)|0;break a}case 115:{if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=100){d=a;break a}if((i[a+1>>0]|0)!=115){d=a;break a}nc=a+2|0;g=Ql(nc,b,c)|0;if((g|0)==(nc|0)){d=a;break a}d=Ql(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}f=c+4|0;g=k[f>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(Ba,g+-24|0);h=k[f>>2]|0;g=h+-24|0;e=h;do{a=e+-24|0;k[f>>2]=a;hl(a);e=k[f>>2]|0}while((e|0)!=(g|0));Zl(za,58848,Ba);g=i[za>>0]|0;if(!(g&1)){e=za+1|0;g=(g&255)>>>1}else{e=k[za+8>>2]|0;g=k[za+4>>2]|0}jl(h+-48|0,e,g)|0;tl(za);tl(Ba);break a}case 101:{nc=a+2|0;Ol(E,58280,1);d=mm(nc,b,E,c)|0;tl(E);d=(d|0)==(nc|0)?a:d;break a}default:{d=a;break a}}case 116:{d=i[H+1>>0]|0;if((d|0)==105|(d|0)==101){if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=116){d=a;break a}d=i[a+1>>0]|0;if(!(d<<24>>24==105|d<<24>>24==101)){d=a;break a}g=a+2|0;if(d<<24>>24==101)d=Ql(g,b,c)|0;else d=ul(g,b,c)|0;if((d|0)==(g|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}a=g+-24|0;Al(xa,a);nc=rl(xa,0,58712)|0;k[wa+0>>2]=k[nc+0>>2];k[wa+4>>2]=k[nc+4>>2];k[wa+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;nc=sl(wa,58240)|0;k[va+0>>2]=k[nc+0>>2];k[va+4>>2]=k[nc+4>>2];k[va+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;k[ua+0>>2]=k[va+0>>2];k[ua+4>>2]=k[va+4>>2];k[ua+8>>2]=k[va+8>>2];k[va+0>>2]=0;k[va+4>>2]=0;k[va+8>>2]=0;nc=ua+12|0;k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;Wl(a,ua);hl(ua);tl(va);tl(wa);tl(xa);break a}else if((d|0)==119){if((W|0)<=2){d=a;break a}if((i[a>>0]|0)!=116){d=a;break a}if((i[a+1>>0]|0)!=119){d=a;break a}nc=a+2|0;d=Ql(nc,b,c)|0;if((d|0)==(nc|0)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}a=g+-24|0;Al(na,a);nc=rl(na,0,58704)|0;k[ma+0>>2]=k[nc+0>>2];k[ma+4>>2]=k[nc+4>>2];k[ma+8>>2]=k[nc+8>>2];k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;k[la+0>>2]=k[ma+0>>2];k[la+4>>2]=k[ma+4>>2];k[la+8>>2]=k[ma+8>>2];k[ma+0>>2]=0;k[ma+4>>2]=0;k[ma+8>>2]=0;nc=la+12|0;k[nc+0>>2]=0;k[nc+4>>2]=0;k[nc+8>>2]=0;Wl(a,la);hl(la);tl(ma);tl(na);break a}else if((d|0)==114){i[mb>>0]=10;j=mb+1|0;i[j+0>>0]=i[58696]|0;i[j+1>>0]=i[58697]|0;i[j+2>>0]=i[58698]|0;i[j+3>>0]=i[58699]|0;i[j+4>>0]=i[58700]|0;i[mb+6>>0]=0;j=mb+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;g=c+4|0;d=k[g>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[mb+0>>2];k[d+4>>2]=k[mb+4>>2];k[d+8>>2]=k[mb+8>>2];k[mb+0>>2]=0;k[mb+4>>2]=0;k[mb+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[g>>2]|0}k[g>>2]=d+24}else{g=k[c>>2]|0;h=(d-g|0)/24|0;e=h+1|0;if((e|0)<0)Fl(c);d=(f-g|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(oc,d,h,c+12|0);d=oc+8|0;g=k[d>>2]|0;if(g){k[g+0>>2]=k[mb+0>>2];k[g+4>>2]=k[mb+4>>2];k[g+8>>2]=k[mb+8>>2];k[mb+0>>2]=0;k[mb+4>>2]=0;k[mb+8>>2]=0;nc=g+12|0;k[nc+0>>2]=k[j+0>>2];k[nc+4>>2]=k[j+4>>2];k[nc+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=g+24;Ml(c,oc);Ll(oc)}hl(mb);d=a+2|0;break a}else{d=a;break a}}case 57:case 56:case 55:case 54:case 53:case 52:case 51:case 50:case 49:{d=nm(a,b,c)|0;break a}default:{d=a;break a}}while(0)}else d=a;while(0);r=pc;return d|0}function Rl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;k[a>>2]=0;d=a+4|0;k[d>>2]=0;c=k[c>>2]|0;e=a+8|0;k[e>>2]=0;k[a+12>>2]=c;c=ml(c,24)|0;k[d>>2]=c;k[a>>2]=c;k[e>>2]=c+24;if(!c)c=0;else{Jl(c,b);Jl(c+12|0,b+12|0);c=k[d>>2]|0}k[d>>2]=c+24;return}function Sl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+80|0;q=s+60|0;l=s;o=s+24|0;p=s+48|0;j=a;a:do if((b-j|0)>1?(i[a>>0]|0)==84:0){d=i[a+1>>0]|0;if(d<<24>>24==95){d=k[c+36>>2]|0;if((k[c+32>>2]|0)==(d|0)){d=a;break}e=k[d+-16>>2]|0;if((e|0)==(k[d+-12>>2]|0)){i[l>>0]=4;j=l+1|0;i[j>>0]=84;i[j+1>>0]=95;i[l+3>>0]=0;j=l+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;e=c+4|0;d=k[e>>2]|0;g=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;h=(d-e|0)/24|0;f=h+1|0;if((f|0)<0)Fl(c);d=(g-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(q,d,h,c+12|0);d=q+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[l+0>>2];k[e+4>>2]=k[l+4>>2];k[e+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;p=e+12|0;k[p+0>>2]=k[j+0>>2];k[p+4>>2]=k[j+4>>2];k[p+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=e+24;Ml(c,q);Ll(q)}hl(l);i[c+62>>0]=1;d=a+2|0;break}d=k[e>>2]|0;b=k[e+4>>2]|0;b:do if((d|0)!=(b|0)){j=c+4|0;h=c+8|0;l=c+12|0;m=q+8|0;while(1){e=k[j>>2]|0;if((e|0)==(k[h>>2]|0)){f=(e-(k[c>>2]|0)|0)/24|0;g=f+1|0;if((g|0)<0)break;if(f>>>0<1073741823){e=f<<1;e=e>>>0>>0?g:e}else e=2147483647;Kl(q,e,f,l);e=k[m>>2]|0;if(e){Jl(e,d);Jl(e+12|0,d+12|0)}k[m>>2]=e+24;Ml(c,q);Ll(q)}else{if(!e)e=0;else{Jl(e,d);Jl(e+12|0,d+12|0);e=k[j>>2]|0}k[j>>2]=e+24}d=d+24|0;if((d|0)==(b|0))break b}Fl(c)}while(0);d=a+2|0;break}d=(d<<24>>24)+-48|0;if(d>>>0<10?(g=a+2|0,(g|0)!=(b|0)):0){f=g;while(1){g=i[f>>0]|0;e=(g<<24>>24)+-48|0;if(e>>>0>=10){n=f;break}f=f+1|0;if((f|0)==(b|0)){d=a;break a}else d=e+(d*10|0)|0}if(g<<24>>24==95?(m=k[c+36>>2]|0,(k[c+32>>2]|0)!=(m|0)):0){d=d+1|0;e=k[m+-16>>2]|0;if(d>>>0<(k[m+-12>>2]|0)-e>>4>>>0){f=k[e+(d<<4)>>2]|0;e=k[e+(d<<4)+4>>2]|0;c:do if((f|0)!=(e|0)){j=c+4|0;h=c+8|0;l=c+12|0;b=q+8|0;while(1){d=k[j>>2]|0;if((d|0)==(k[h>>2]|0)){g=(d-(k[c>>2]|0)|0)/24|0;d=g+1|0;if((d|0)<0)break;if(g>>>0<1073741823){a=g<<1;d=a>>>0>>0?d:a}else d=2147483647;Kl(q,d,g,l);d=k[b>>2]|0;if(d){Jl(d,f);Jl(d+12|0,f+12|0)}k[b>>2]=d+24;Ml(c,q);Ll(q)}else{if(!d)d=0;else{Jl(d,f);Jl(d+12|0,f+12|0);d=k[j>>2]|0}k[j>>2]=d+24}f=f+24|0;if((f|0)==(e|0))break c}Fl(c)}while(0);d=n+1|0;break}d=n+1|0;h=d-j|0;if(h>>>0>4294967279)ql(p);if(h>>>0<11){i[p>>0]=h<<1;e=p+1|0}else{l=h+16&-16;e=xm(l)|0;k[p+8>>2]=e;k[p>>2]=l|1;k[p+4>>2]=h}if((d|0)!=(a|0)){g=a;f=84;j=e;while(1){i[j>>0]=f;f=g+1|0;if((g|0)==(n|0))break;g=f;f=i[f>>0]|0;j=j+1|0}e=e+h|0}i[e>>0]=0;k[o+0>>2]=k[p+0>>2];k[o+4>>2]=k[p+4>>2];k[o+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;b=o+12|0;k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;f=c+4|0;e=k[f>>2]|0;h=k[c+8>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+0>>2]=k[o+0>>2];k[e+4>>2]=k[o+4>>2];k[e+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;e=e+12|0;k[e+0>>2]=k[b+0>>2];k[e+4>>2]=k[b+4>>2];k[e+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;e=k[f>>2]|0}k[f>>2]=e+24}else{f=k[c>>2]|0;j=(e-f|0)/24|0;g=j+1|0;if((g|0)<0)Fl(c);e=(h-f|0)/24|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e}else e=2147483647;Kl(q,e,j,c+12|0);e=q+8|0;f=k[e>>2]|0;if(f){k[f+0>>2]=k[o+0>>2];k[f+4>>2]=k[o+4>>2];k[f+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;a=f+12|0;k[a+0>>2]=k[b+0>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0}k[e>>2]=f+24;Ml(c,q);Ll(q)}hl(o);tl(p);i[c+62>>0]=1}else d=a}else d=a}else d=a;while(0);r=s;return d|0}function Tl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=r;r=r+80|0;I=M+60|0;L=M;E=M+12|0;J=M+24|0;K=M+48|0;a:do if((b-a|0)>1?(i[a>>0]|0)==73:0){F=c+61|0;if((i[F>>0]|0)!=0?(e=k[c+36>>2]|0,d=k[e+-16>>2]|0,e=e+-12|0,f=k[e>>2]|0,(f|0)!=(d|0)):0)do{D=f+-16|0;k[e>>2]=D;il(D);f=k[e>>2]|0}while((f|0)!=(d|0));f=a+1|0;Ol(L,58328,1);b:do if((i[f>>0]|0)!=69){q=c+4|0;s=c+36|0;t=c+12|0;u=I+8|0;v=I+8|0;w=E+1|0;x=E+8|0;y=E+4|0;z=L+4|0;D=c+32|0;A=c+40|0;B=c+44|0;C=I+8|0;c:while(1){do if(i[F>>0]|0){l=k[t>>2]|0;d=k[s>>2]|0;e=k[A>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;k[d+12>>2]=l;d=k[s>>2]|0}k[s>>2]=d+16;break}h=k[D>>2]|0;j=d-h>>4;g=j+1|0;if((g|0)<0){f=16;break c}d=e-h|0;if(d>>4>>>0<1073741823){d=d>>3;d=d>>>0>>0?g:d}else d=2147483647;dl(I,d,j,B);d=k[C>>2]|0;if(d){k[d>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;k[d+12>>2]=l}k[C>>2]=d+16;el(D,I);fl(I)}while(0);p=((k[q>>2]|0)-(k[c>>2]|0)|0)/24|0;o=om(f,b,c)|0;d=((k[q>>2]|0)-(k[c>>2]|0)|0)/24|0;if(i[F>>0]|0){h=k[s>>2]|0;e=h+-16|0;do{n=h+-16|0;k[s>>2]=n;nl(n);h=k[s>>2]|0}while((h|0)!=(e|0))}if((o|0)==(f|0)|(o|0)==(b|0)){f=26;break}if(i[F>>0]|0){j=k[s>>2]|0;n=j+-16|0;m=k[t>>2]|0;e=j+-12|0;f=k[e>>2]|0;h=k[j+-8>>2]|0;if(f>>>0>>0){if(!f)f=0;else{k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=m;f=k[e>>2]|0}k[e>>2]=f+16}else{l=k[n>>2]|0;g=f-l>>4;e=g+1|0;if((e|0)<0){a=n;f=33;break}f=h-l|0;if(f>>4>>>0<1073741823){f=f>>3;f=f>>>0>>0?e:f}else f=2147483647;Gl(I,f,g,j+-4|0);f=k[u>>2]|0;if(f){k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=m}k[u>>2]=f+16;Hl(n,I);Il(I)}if(p>>>0>>0){m=p;do{e=k[(k[s>>2]|0)+-12>>2]|0;h=e+-16|0;g=k[c>>2]|0;j=g+(m*24|0)|0;l=e+-12|0;f=k[l>>2]|0;if((f|0)==(k[e+-8>>2]|0)){l=(f-(k[h>>2]|0)|0)/24|0;f=l+1|0;if((f|0)<0){a=h;f=46;break c}if(l>>>0<1073741823){n=l<<1;f=n>>>0>>0?f:n}else f=2147483647;Kl(I,f,l,e+-4|0);f=k[v>>2]|0;if(f){Jl(f,j);Jl(f+12|0,g+(m*24|0)+12|0)}k[v>>2]=f+24;Ml(h,I);Ll(I)}else{if(!f)f=0;else{Jl(f,j);Jl(f+12|0,g+(m*24|0)+12|0);f=k[l>>2]|0}k[l>>2]=f+24}m=m+1|0}while(m>>>0>>0)}}if(p>>>0>>0){h=p;do{f=i[L>>0]|0;if(!(f&1))f=(f&255)>>>1;else f=k[z>>2]|0;if(f>>>0>1)sl(L,58736)|0;Al(E,(k[c>>2]|0)+(h*24|0)|0);f=i[E>>0]|0;if(!(f&1)){e=w;f=(f&255)>>>1}else{e=k[x>>2]|0;f=k[y>>2]|0}jl(L,e,f)|0;tl(E);h=h+1|0}while(h>>>0>>0)}if((d|0)!=(p|0)){e=k[q>>2]|0;do{f=e;e=e+-24|0;do{n=f+-24|0;k[q>>2]=n;hl(n);f=k[q>>2]|0}while((f|0)!=(e|0));d=d+-1|0}while((d|0)!=(p|0))}if((i[o>>0]|0)==69){H=L;G=o;break b}else f=o}if((f|0)==16)Fl(D);else if((f|0)==26){tl(L);break a}else if((f|0)==33)Fl(a);else if((f|0)==46)Fl(a)}else{H=L;G=f}while(0);a=G+1|0;d=i[H>>0]|0;if(!(d&1)){d=(d&255)>>>1;e=L+1|0}else{d=k[L+4>>2]|0;e=k[L+8>>2]|0}if((i[e+(d+-1)>>0]|0)==62)sl(L,60488)|0;else sl(L,58336)|0;k[K+0>>2]=k[H+0>>2];k[K+4>>2]=k[H+4>>2];k[K+8>>2]=k[H+8>>2];k[H+0>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;j=J+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;e=c+4|0;d=k[e>>2]|0;g=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[J+0>>2];k[d+4>>2]=k[J+4>>2];k[d+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;h=(d-e|0)/24|0;f=h+1|0;if((f|0)<0)Fl(c);d=(g-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(I,d,h,c+12|0);d=I+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[J+0>>2];k[e+4>>2]=k[J+4>>2];k[e+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;H=e+12|0;k[H+0>>2]=k[j+0>>2];k[H+4>>2]=k[j+4>>2];k[H+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=e+24;Ml(c,I);Ll(I)}hl(J);tl(K);tl(L)}while(0);r=M;return a|0}function Ul(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;t=r;r=r+112|0;q=t+84|0;s=t;j=t+12|0;l=t+24|0;m=t+48|0;n=t+72|0;a:do if(((a|0)!=(b|0)?(e=(i[a>>0]|0)+-48|0,e>>>0<10):0)?(f=a+1|0,(f|0)!=(b|0)):0){d=(i[f>>0]|0)+-48|0;if(d>>>0<10){g=a;h=f;while(1){f=g+2|0;if((f|0)==(b|0))break a;e=d+(e*10|0)|0;d=(i[f>>0]|0)+-48|0;if(d>>>0>=10){p=h;o=e;break}else{g=h;h=f}}}else{p=a;o=e}if((b-f|0)>>>0>=o>>>0){Ol(s,f,o);a=i[s>>0]|0;if(!(a&1)){a=(a&255)>>>1;d=s+1|0}else{a=k[s+4>>2]|0;d=k[s+8>>2]|0}Ol(j,d,a>>>0<10?a:10);a=i[j>>0]|0;if(!(a&1)){a=(a&255)>>>1;d=j+1|0}else{a=k[j+4>>2]|0;d=k[j+8>>2]|0}b=a>>>0>10;g=(Mm(d,60448,b?10:a)|0)!=0|a>>>0<10;tl(j);if(g|b){k[n+0>>2]=k[s+0>>2];k[n+4>>2]=k[s+4>>2];k[n+8>>2]=k[s+8>>2];k[s+0>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;k[m+0>>2]=k[n+0>>2];k[m+4>>2]=k[n+4>>2];k[m+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;h=m+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=c+4|0;a=k[d>>2]|0;e=k[c+8>>2]|0;if(a>>>0>>0){if(!a)a=0;else{k[a+0>>2]=k[m+0>>2];k[a+4>>2]=k[m+4>>2];k[a+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;a=a+12|0;k[a+0>>2]=k[h+0>>2];k[a+4>>2]=k[h+4>>2];k[a+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;a=k[d>>2]|0}k[d>>2]=a+24}else{f=k[c>>2]|0;g=(a-f|0)/24|0;d=g+1|0;if((d|0)<0)Fl(c);a=(e-f|0)/24|0;if(a>>>0<1073741823){a=a<<1;a=a>>>0>>0?d:a}else a=2147483647;Kl(q,a,g,c+12|0);a=q+8|0;d=k[a>>2]|0;if(d){k[d+0>>2]=k[m+0>>2];k[d+4>>2]=k[m+4>>2];k[d+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;b=d+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[a>>2]=d+24;Ml(c,q);Ll(q)}hl(m);tl(n)}else{Ol(l,60464,21);h=l+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=c+4|0;a=k[d>>2]|0;f=k[c+8>>2]|0;if(a>>>0>>0){if(!a)a=0;else{k[a+0>>2]=k[l+0>>2];k[a+4>>2]=k[l+4>>2];k[a+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;a=a+12|0;k[a+0>>2]=k[h+0>>2];k[a+4>>2]=k[h+4>>2];k[a+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;a=k[d>>2]|0}k[d>>2]=a+24}else{d=k[c>>2]|0;g=(a-d|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);a=(f-d|0)/24|0;if(a>>>0<1073741823){a=a<<1;a=a>>>0>>0?e:a}else a=2147483647;Kl(q,a,g,c+12|0);a=q+8|0;d=k[a>>2]|0;if(d){k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;n=d+12|0;k[n+0>>2]=k[h+0>>2];k[n+4>>2]=k[h+4>>2];k[n+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[a>>2]=d+24;Ml(c,q);Ll(q)}hl(l)}tl(s);a=p+(o+1)|0}}while(0);r=t;return a|0}function Vl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;d=i[b>>0]|0;if(!(d&1)){f=Zm(c|0)|0;e=(d&255)>>>1;d=b+1|0}else{e=k[b+4>>2]|0;f=Zm(c|0)|0;d=k[b+8>>2]|0}pm(a,d,e,f+e|0);jl(a,c,f)|0;return}function Wl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;do if(i[a>>0]&1){m=a+8|0;i[k[m>>2]>>0]=0;j=a+4|0;k[j>>2]=0;c=i[a>>0]|0;if(!(c&1))g=10;else{g=k[a>>2]|0;c=g&255;g=(g&-2)+-1|0}if(!(c&1)){d=(c&255)>>>1;if((c&255)<22){f=10;h=d;l=1}else{f=(d+16&240)+-1|0;h=d;l=1}}else{f=10;h=0;l=0}if((f|0)!=(g|0)){if((f|0)==10){e=a+1|0;d=k[m>>2]|0;if(l){_m(e|0,d|0,((c&255)>>>1)+1|0)|0;ym(d)}else{i[e>>0]=i[d>>0]|0;ym(d)}i[a>>0]=h<<1;break}d=f+1|0;e=xm(d)|0;if(!(f>>>0<=g>>>0&(e|0)==0)){if(l)_m(e|0,a+1|0,((c&255)>>>1)+1|0)|0;else{n=k[m>>2]|0;i[e>>0]=i[n>>0]|0;ym(n)}k[a>>2]=d|1;k[j>>2]=h;k[m>>2]=e}}}else{i[a+1>>0]=0;i[a>>0]=0}while(0);k[a+0>>2]=k[b+0>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;n=a+12|0;b=b+12|0;do if(i[n>>0]&1){m=a+20|0;i[k[m>>2]>>0]=0;h=a+16|0;k[h>>2]=0;c=i[n>>0]|0;if(!(c&1))g=10;else{g=k[n>>2]|0;c=g&255;g=(g&-2)+-1|0}if(!(c&1)){d=(c&255)>>>1;if((c&255)<22){f=10;j=d;l=1}else{f=(d+16&240)+-1|0;j=d;l=1}}else{f=10;j=0;l=0}if((f|0)!=(g|0)){if((f|0)==10){e=n+1|0;d=k[m>>2]|0;if(l){_m(e|0,d|0,((c&255)>>>1)+1|0)|0;ym(d)}else{i[e>>0]=i[d>>0]|0;ym(d)}i[n>>0]=j<<1;break}d=f+1|0;e=xm(d)|0;if(!(f>>>0<=g>>>0&(e|0)==0)){if(l)_m(e|0,n+1|0,((c&255)>>>1)+1|0)|0;else{a=k[m>>2]|0;i[e>>0]=i[a>>0]|0;ym(a)}k[n>>2]=d|1;k[h>>2]=j;k[m>>2]=e}}}else{i[n+1>>0]=0;i[n>>0]=0}while(0);k[n+0>>2]=k[b+0>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;return}function Xl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;q=r;r=r+176|0;p=q+144|0;j=q;l=q+24|0;h=q+48|0;m=q+72|0;n=q+96|0;o=q+120|0;a:do if((b-a|0)>1?(i[a>>0]|0)==83:0){f=a+1|0;d=i[f>>0]|0;e=d<<24>>24;switch(e|0){case 98:{im(l,60392);f=c+4|0;d=k[f>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;c=d+12|0;d=l+12|0;k[c+0>>2]=k[d+0>>2];k[c+4>>2]=k[d+4>>2];k[c+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[f>>2]|0}k[f>>2]=d+24}else{f=k[c>>2]|0;g=(d-f|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(b-f|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(p,d,g,c+12|0);d=p+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[l+0>>2];k[e+4>>2]=k[l+4>>2];k[e+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;n=e+12|0;o=l+12|0;k[n+0>>2]=k[o+0>>2];k[n+4>>2]=k[o+4>>2];k[n+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0}k[d>>2]=e+24;Ml(c,p);Ll(p)}hl(l);a=a+2|0;break a}case 115:{em(h,59624);f=c+4|0;d=k[f>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;c=d+12|0;d=h+12|0;k[c+0>>2]=k[d+0>>2];k[c+4>>2]=k[d+4>>2];k[c+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[f>>2]|0}k[f>>2]=d+24}else{f=k[c>>2]|0;g=(d-f|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(b-f|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(p,d,g,c+12|0);d=p+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[h+0>>2];k[e+4>>2]=k[h+4>>2];k[e+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;n=e+12|0;o=h+12|0;k[n+0>>2]=k[o+0>>2];k[n+4>>2]=k[o+4>>2];k[n+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0}k[d>>2]=e+24;Ml(c,p);Ll(p)}hl(h);a=a+2|0;break a}case 105:{hm(m,59728);e=c+4|0;d=k[e>>2]|0;g=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[m+0>>2];k[d+4>>2]=k[m+4>>2];k[d+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;c=d+12|0;d=m+12|0;k[c+0>>2]=k[d+0>>2];k[c+4>>2]=k[d+4>>2];k[c+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{f=k[c>>2]|0;b=(d-f|0)/24|0;e=b+1|0;if((e|0)<0)Fl(c);d=(g-f|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(p,d,b,c+12|0);d=p+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[m+0>>2];k[e+4>>2]=k[m+4>>2];k[e+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;n=e+12|0;o=m+12|0;k[n+0>>2]=k[o+0>>2];k[n+4>>2]=k[o+4>>2];k[n+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0}k[d>>2]=e+24;Ml(c,p);Ll(p)}hl(m);a=a+2|0;break a}case 97:{gm(j,60376);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;c=d+12|0;d=j+12|0;k[c+0>>2]=k[d+0>>2];k[c+4>>2]=k[d+4>>2];k[c+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{f=k[c>>2]|0;g=(d-f|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(b-f|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(p,d,g,c+12|0);d=p+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[j+0>>2];k[e+4>>2]=k[j+4>>2];k[e+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;n=e+12|0;o=j+12|0;k[n+0>>2]=k[o+0>>2];k[n+4>>2]=k[o+4>>2];k[n+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0}k[d>>2]=e+24;Ml(c,p);Ll(p)}hl(j);a=a+2|0;break a}case 111:{hm(n,59816);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[n+0>>2];k[d+4>>2]=k[n+4>>2];k[d+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;c=d+12|0;d=n+12|0;k[c+0>>2]=k[d+0>>2];k[c+4>>2]=k[d+4>>2];k[c+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{f=k[c>>2]|0;g=(d-f|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(b-f|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(p,d,g,c+12|0);d=p+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[n+0>>2];k[e+4>>2]=k[n+4>>2];k[e+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;m=e+12|0;o=n+12|0;k[m+0>>2]=k[o+0>>2];k[m+4>>2]=k[o+4>>2];k[m+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0}k[d>>2]=e+24;Ml(c,p);Ll(p)}hl(n);a=a+2|0;break a}case 95:{d=k[c+16>>2]|0;if((d|0)==(k[c+20>>2]|0))break a;f=k[d>>2]|0;b=k[d+4>>2]|0;b:do if((f|0)!=(b|0)){g=c+4|0;h=c+8|0;j=c+12|0;l=p+8|0;while(1){d=k[g>>2]|0;if((d|0)==(k[h>>2]|0)){e=(d-(k[c>>2]|0)|0)/24|0;d=e+1|0;if((d|0)<0)break;if(e>>>0<1073741823){o=e<<1;d=o>>>0>>0?d:o}else d=2147483647;Kl(p,d,e,j);d=k[l>>2]|0;if(d){Jl(d,f);Jl(d+12|0,f+12|0)}k[l>>2]=d+24;Ml(c,p);Ll(p)}else{if(!d)d=0;else{Jl(d,f);Jl(d+12|0,f+12|0);d=k[g>>2]|0}k[g>>2]=d+24}f=f+24|0;if((f|0)==(b|0))break b}Fl(c)}while(0);a=a+2|0;break a}case 100:{fm(o,59904);e=c+4|0;d=k[e>>2]|0;b=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[o+0>>2];k[d+4>>2]=k[o+4>>2];k[d+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;c=d+12|0;d=o+12|0;k[c+0>>2]=k[d+0>>2];k[c+4>>2]=k[d+4>>2];k[c+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{f=k[c>>2]|0;g=(d-f|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);d=(b-f|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(p,d,g,c+12|0);d=p+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[o+0>>2];k[e+4>>2]=k[o+4>>2];k[e+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;m=e+12|0;n=o+12|0;k[m+0>>2]=k[n+0>>2];k[m+4>>2]=k[n+4>>2];k[m+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0}k[d>>2]=e+24;Ml(c,p);Ll(p)}hl(o);a=a+2|0;break a}default:{if((e+-48|0)>>>0>=10){if(!(Am(e)|0))break a;d=i[f>>0]|0}d=d<<24>>24;e=d+-48|0;f=a+2|0;if((f|0)==(b|0))break a;e=e>>>0<10?e:d+-55|0;while(1){d=i[f>>0]|0;g=d<<24>>24;if((g+-48|0)>>>0>=10){o=(Am(g)|0)==0;d=i[f>>0]|0;if(o)break}d=d<<24>>24;g=d+-48|0;f=f+1|0;if((f|0)==(b|0))break a;else e=(g>>>0<10?g:d+-55|0)+(e*36|0)|0}if(d<<24>>24!=95)break a;d=e+1|0;e=k[c+16>>2]|0;if(d>>>0>=(k[c+20>>2]|0)-e>>4>>>0)break a;a=k[e+(d<<4)>>2]|0;j=k[e+(d<<4)+4>>2]|0;c:do if((a|0)!=(j|0)){l=c+4|0;b=c+8|0;g=c+12|0;h=p+8|0;e=a;while(1){a=k[l>>2]|0;if((a|0)==(k[b>>2]|0)){d=(a-(k[c>>2]|0)|0)/24|0;a=d+1|0;if((a|0)<0)break;if(d>>>0<1073741823){o=d<<1;a=o>>>0>>0?a:o}else a=2147483647;Kl(p,a,d,g);a=k[h>>2]|0;if(a){Jl(a,e);Jl(a+12|0,e+12|0)}k[h>>2]=a+24;Ml(c,p);Ll(p)}else{if(!a)a=0;else{Jl(a,e);Jl(a+12|0,e+12|0);a=k[l>>2]|0}k[l>>2]=a+24}e=e+24|0;if((e|0)==(j|0))break c}Fl(c)}while(0);a=f+1|0;break a}}}while(0);r=q;return a|0}function Yl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;l=r;r=r+64|0;d=l+40|0;e=l;g=l+12|0;j=l+24|0;if((((((b-a|0)>3?(i[a>>0]|0)==68:0)?(m=i[a+1>>0]|0,(m|0)==84|(m|0)==116):0)?(m=a+2|0,f=Ql(m,b,c)|0,!((f|0)==(m|0)|(f|0)==(b|0))):0)?(i[f>>0]|0)==69:0)?(h=k[c+4>>2]|0,(k[c>>2]|0)!=(h|0)):0){a=h+-24|0;Al(j,a);m=rl(j,0,60360)|0;k[g+0>>2]=k[m+0>>2];k[g+4>>2]=k[m+4>>2];k[g+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;m=sl(g,58240)|0;k[e+0>>2]=k[m+0>>2];k[e+4>>2]=k[m+4>>2];k[e+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;k[d+0>>2]=k[e+0>>2];k[d+4>>2]=k[e+4>>2];k[d+8>>2]=k[e+8>>2];k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;m=d+12|0;k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;Wl(a,d);hl(d);tl(e);tl(g);tl(j);a=f+1|0}r=l;return a|0}function Zl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;e=Zm(b|0)|0;d=i[c>>0]|0;if(!(d&1))f=(d&255)>>>1;else f=k[c+4>>2]|0;pm(a,b,e,f+e|0);if(!(i[c>>0]&1))d=c+1|0;else d=k[c+8>>2]|0;jl(a,d,f)|0;return}function _l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))f=10;else{d=k[a>>2]|0;f=(d&-2)+-1|0;d=d&255}e=(d&1)==0;do if(f>>>0>=c>>>0){if(e)d=a+1|0;else d=k[a+8>>2]|0;an(d|0,b|0,c|0)|0;i[d+c>>0]=0;if(!(i[a>>0]&1)){i[a>>0]=c<<1;break}else{k[a+4>>2]=c;break}}else{if(e)d=(d&255)>>>1;else d=k[a+4>>2]|0;vl(a,f,c-f|0,d,0,d,c,b)}while(0);return}function $l(a,b){a=a|0;b=b|0;var c=0,d=0;if((a|0)!=(b|0)){c=i[b>>0]|0;if(!(c&1)){d=b+1|0;c=(c&255)>>>1}else{d=k[b+8>>2]|0;c=k[b+4>>2]|0}_l(a,d,c)}return}function am(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0;x=r;r=r+224|0;u=x+192|0;j=x+168|0;n=x+152|0;g=x+128|0;o=x+116|0;w=x+104|0;v=x+92|0;m=x+56|0;p=x+40|0;q=x+16|0;s=x;t=x+80|0;a:do if((a|0)!=(b|0)){l=i[a>>0]|0;d=l<<24>>24;switch(d|0){case 57:case 56:case 55:case 54:case 53:case 52:case 51:case 50:case 49:{b=Ul(a,b,c)|0;r=x;return b|0}case 85:{if(!((b-a|0)>2&l<<24>>24==85))break a;f=i[a+1>>0]|0;if((f|0)==116){Ol(n,59592,8);k[j+0>>2]=k[n+0>>2];k[j+4>>2]=k[n+4>>2];k[j+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;l=j+12|0;k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;m=c+4|0;f=k[m>>2]|0;d=k[c+8>>2]|0;if(f>>>0>>0){if(!f)d=0;else{k[f+0>>2]=k[j+0>>2];k[f+4>>2]=k[j+4>>2];k[f+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=f+12|0;k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;d=k[m>>2]|0}k[m>>2]=d+24}else{e=k[c>>2]|0;g=(f-e|0)/24|0;h=g+1|0;if((h|0)<0)Fl(c);f=(d-e|0)/24|0;if(f>>>0<1073741823){f=f<<1;f=f>>>0>>0?h:f}else f=2147483647;Kl(u,f,g,c+12|0);f=u+8|0;d=k[f>>2]|0;if(d){k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;w=d+12|0;k[w+0>>2]=k[l+0>>2];k[w+4>>2]=k[l+4>>2];k[w+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0}k[f>>2]=d+24;Ml(c,u);Ll(u)}hl(j);tl(n);e=a+2|0;if((e|0)==(b|0)){e=k[m>>2]|0;d=e+-24|0;while(1){b=e+-24|0;k[m>>2]=b;hl(b);e=k[m>>2]|0;if((e|0)==(d|0))break a}}if(((i[e>>0]|0)+-48|0)>>>0<10){d=a+3|0;b:do if((d|0)==(b|0))d=b;else while(1){if(((i[d>>0]|0)+-48|0)>>>0>=10)break b;d=d+1|0;if((d|0)==(b|0)){d=b;break}}while(0);rm((k[m>>2]|0)+-24|0,e,d)}else d=e;Cl((k[m>>2]|0)+-24|0,39);if((d|0)!=(b|0)?(i[d>>0]|0)==95:0){a=d+1|0;break a}e=k[m>>2]|0;d=e+-24|0;while(1){b=e+-24|0;k[m>>2]=b;hl(b);e=k[m>>2]|0;if((e|0)==(d|0))break a}}else if((f|0)!=108)break a;Ol(o,59608,9);k[g+0>>2]=k[o+0>>2];k[g+4>>2]=k[o+4>>2];k[g+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;m=g+12|0;k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;s=c+4|0;f=k[s>>2]|0;d=k[c+8>>2]|0;if(f>>>0>>0){if(!f)f=0;else{k[f+0>>2]=k[g+0>>2];k[f+4>>2]=k[g+4>>2];k[f+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;f=f+12|0;k[f+0>>2]=k[m+0>>2];k[f+4>>2]=k[m+4>>2];k[f+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;f=k[s>>2]|0}k[s>>2]=f+24}else{e=k[c>>2]|0;l=(f-e|0)/24|0;h=l+1|0;if((h|0)<0)Fl(c);f=(d-e|0)/24|0;if(f>>>0<1073741823){f=f<<1;f=f>>>0>>0?h:f}else f=2147483647;Kl(u,f,l,c+12|0);f=u+8|0;d=k[f>>2]|0;if(d){k[d+0>>2]=k[g+0>>2];k[d+4>>2]=k[g+4>>2];k[d+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;t=d+12|0;k[t+0>>2]=k[m+0>>2];k[t+4>>2]=k[m+4>>2];k[t+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0}k[f>>2]=d+24;Ml(c,u);Ll(u)}hl(g);tl(o);f=a+2|0;do if((i[f>>0]|0)!=118){l=ul(f,b,c)|0;d=k[s>>2]|0;if((l|0)==(f|0)){e=d+-24|0;while(1){b=d+-24|0;k[s>>2]=b;hl(b);d=k[s>>2]|0;if((d|0)==(e|0))break a}}if(((d-(k[c>>2]|0)|0)/24|0)>>>0<2)break a;Al(w,d+-24|0);e=k[s>>2]|0;f=e+-24|0;d=e;do{u=d+-24|0;k[s>>2]=u;hl(u);d=k[s>>2]|0}while((d|0)!=(f|0));h=i[w>>0]|0;if(!(h&1)){f=w+1|0;d=(h&255)>>>1}else{f=k[w+8>>2]|0;d=k[w+4>>2]|0}jl(e+-48|0,f,d)|0;o=w+1|0;p=w+8|0;q=w+4|0;d=l;while(1){n=ul(d,b,c)|0;e=k[s>>2]|0;if((n|0)==(d|0)){f=111;break}if(((e-(k[c>>2]|0)|0)/24|0)>>>0<2){f=144;break}Al(v,e+-24|0);do if(h&1){j=k[p>>2]|0;i[j>>0]=0;k[q>>2]=0;if(!(h&1))g=10;else{g=k[w>>2]|0;h=g&255;g=(g&-2)+-1|0}if(!(h&1)){f=(h&255)>>>1;if((h&255)<22){m=10;e=1}else{m=(f+16&240)+-1|0;e=1}}else{m=10;f=0;e=0}if((m|0)!=(g|0)){if((m|0)==10){if(e){_m(o|0,j|0,((h&255)>>>1)+1|0)|0;ym(j)}else{i[o>>0]=0;ym(j)}i[w>>0]=f<<1;break}l=m+1|0;d=xm(l)|0;if(!(m>>>0<=g>>>0&(d|0)==0)){if(e)_m(d|0,o|0,((h&255)>>>1)+1|0)|0;else{i[d>>0]=i[j>>0]|0;ym(j)}k[w>>2]=l|1;k[q>>2]=f;k[p>>2]=d}}}else{i[o>>0]=0;i[w>>0]=0}while(0);k[w+0>>2]=k[v+0>>2];k[w+4>>2]=k[v+4>>2];k[w+8>>2]=k[v+8>>2];k[v+0>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;tl(v);l=k[s>>2]|0;f=l+-24|0;d=l;do{u=d+-24|0;k[s>>2]=u;hl(u);d=k[s>>2]|0}while((d|0)!=(f|0));h=i[w>>0]|0;f=(h&1)==0;if(f)d=(h&255)>>>1;else d=k[q>>2]|0;if(!d){d=n;continue}sl(l+-48|0,58736)|0;if(f){f=o;d=(h&255)>>>1}else{f=k[p>>2]|0;d=k[q>>2]|0}jl((k[s>>2]|0)+-24|0,f,d)|0;d=n}if((f|0)==111){sl(e+-24|0,58240)|0;tl(w);e=d;break}else if((f|0)==144){tl(w);break a}}else{Cl((k[s>>2]|0)+-24|0,41);e=a+3|0}while(0);if((e|0)!=(b|0)?(i[e>>0]|0)==69:0){g=e+1|0;if((g|0)==(b|0)){e=k[s>>2]|0;d=e+-24|0;while(1){b=e+-24|0;k[s>>2]=b;hl(b);e=k[s>>2]|0;if((e|0)==(d|0))break a}}if(((i[g>>0]|0)+-48|0)>>>0<10){d=e+2|0;c:do if((d|0)==(b|0))d=b;else while(1){if(((i[d>>0]|0)+-48|0)>>>0>=10)break c;d=d+1|0;if((d|0)==(b|0)){d=b;break}}while(0);m=k[s>>2]|0;n=m+-24|0;f=i[n>>0]|0;if(!(f&1)){h=10;l=(f&255)>>>1}else{f=k[n>>2]|0;h=(f&-2)+-1|0;l=k[m+-20>>2]|0;f=f&255}j=d-g|0;if((d|0)!=(g|0)){if((h-l|0)>>>0>=j>>>0){if(!(f&1))f=n+1|0;else f=k[m+-16>>2]|0;if((l|0)==7)h=f;else{an(f+(j+7)|0,f+7|0,l+-7|0)|0;h=f}}else{cm(n,h,l+j-h|0,l,7,j);h=k[m+-16>>2]|0}f=l+j|0;if(!(i[n>>0]&1))i[n>>0]=f<<1;else k[m+-20>>2]=f;i[h+f>>0]=0;f=h+7|0;while(1){i[f>>0]=i[g>>0]|0;e=e+2|0;if((e|0)==(d|0))break;else{c=g;g=e;f=f+1|0;e=c}}}else d=g}else d=g;if((d|0)!=(b|0)?(i[d>>0]|0)==95:0){a=d+1|0;break a}e=k[s>>2]|0;d=e+-24|0;while(1){b=e+-24|0;k[s>>2]=b;hl(b);e=k[s>>2]|0;if((e|0)==(d|0))break a}}e=k[s>>2]|0;d=e+-24|0;do{b=e+-24|0;k[s>>2]=b;hl(b);e=k[s>>2]|0}while((e|0)!=(d|0));break}case 68:case 67:{if((b-a|0)<=1)break a;e=c+4|0;f=k[e>>2]|0;if((k[c>>2]|0)==(f|0))break a;if((d|0)==68){b=i[a+1>>0]|0;if(!((b|0)==53|(b|0)==50|(b|0)==49|(b|0)==48))break a;qm(t,f+-24|0);l=rl(t,0,58408)|0;k[s+0>>2]=k[l+0>>2];k[s+4>>2]=k[l+4>>2];k[s+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[q+0>>2]=k[s+0>>2];k[q+4>>2]=k[s+4>>2];k[q+8>>2]=k[s+8>>2];k[s+0>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;l=q+12|0;k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;f=k[e>>2]|0;h=k[c+8>>2]|0;if(f>>>0>>0){if(!f)d=0;else{k[f+0>>2]=k[q+0>>2];k[f+4>>2]=k[q+4>>2];k[f+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;d=f+12|0;k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{d=k[c>>2]|0;g=(f-d|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);f=(h-d|0)/24|0;if(f>>>0<1073741823){f=f<<1;f=f>>>0>>0?e:f}else f=2147483647;Kl(u,f,g,c+12|0);f=u+8|0;d=k[f>>2]|0;if(d){k[d+0>>2]=k[q+0>>2];k[d+4>>2]=k[q+4>>2];k[d+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;b=d+12|0;k[b+0>>2]=k[l+0>>2];k[b+4>>2]=k[l+4>>2];k[b+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0}k[f>>2]=d+24;Ml(c,u);Ll(u)}hl(q);tl(s);tl(t);i[c+60>>0]=1;a=a+2|0;break a}else if((d|0)==67){b=i[a+1>>0]|0;if(!((b|0)==53|(b|0)==51|(b|0)==50|(b|0)==49))break a;qm(p,f+-24|0);k[m+0>>2]=k[p+0>>2];k[m+4>>2]=k[p+4>>2];k[m+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;l=m+12|0;k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;f=k[e>>2]|0;g=k[c+8>>2]|0;if(f>>>0>>0){if(!f)d=0;else{k[f+0>>2]=k[m+0>>2];k[f+4>>2]=k[m+4>>2];k[f+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;d=f+12|0;k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{d=k[c>>2]|0;h=(f-d|0)/24|0;e=h+1|0;if((e|0)<0)Fl(c);f=(g-d|0)/24|0;if(f>>>0<1073741823){d=f<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(u,d,h,c+12|0);d=u+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[m+0>>2];k[e+4>>2]=k[m+4>>2];k[e+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;b=e+12|0;k[b+0>>2]=k[l+0>>2];k[b+4>>2]=k[l+4>>2];k[b+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0}k[d>>2]=e+24;Ml(c,u);Ll(u)}hl(m);tl(p);i[c+60>>0]=1;a=a+2|0;break a}else break a}default:{a=sm(a,b,c)|0;break a}}}while(0);r=x;return a|0}function bm(a,b){a=a|0;b=b|0;var c=0,d=0;a:do if((a|0)!=(b|0)){d=i[a>>0]|0;if(d<<24>>24!=95){if(((d<<24>>24)+-48|0)>>>0>=10)break;while(1){a=a+1|0;if((a|0)==(b|0)){a=b;break a}if(((i[a>>0]|0)+-48|0)>>>0>=10)break a}}d=a+1|0;if((d|0)!=(b|0)){d=i[d>>0]|0;if(((d<<24>>24)+-48|0)>>>0<10){a=a+2|0;break}if(d<<24>>24==95?(c=a+2|0,(c|0)!=(b|0)):0){while(1){d=i[c>>0]|0;c=c+1|0;if(((d<<24>>24)+-48|0)>>>0>=10)break;if((c|0)==(b|0))break a}return (d<<24>>24==95?c:a)|0}}}while(0);return a|0}function cm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;if((-17-b|0)>>>0>>0)ql(a);if(!(i[a>>0]&1))h=a+1|0;else h=k[a+8>>2]|0;if(b>>>0<2147483623){c=c+b|0;g=b<<1;c=c>>>0>>0?g:c;if(c>>>0<11)c=11;else c=c+16&-16}else c=-17;g=xm(c)|0;if(e)_m(g|0,h|0,e|0)|0;if((d|0)!=(e|0))_m(g+(f+e)|0,h+e|0,d-e|0)|0;if((b|0)!=10)ym(h);k[a+8>>2]=g;k[a>>2]=c|1;return}function dm(a){a=a|0;Ca(60496,58040,1175,60528)}function em(a,b){a=a|0;b=b|0;Ol(a,b,11);a=a+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function fm(a,b){a=a|0;b=b|0;Ol(a,b,13);a=a+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function gm(a,b){a=a|0;b=b|0;Ol(a,b,14);a=a+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function hm(a,b){a=a|0;b=b|0;Ol(a,b,12);a=a+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function im(a,b){a=a|0;b=b|0;Ol(a,b,17);a=a+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function jm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,q=0,s=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=r;r=r+416|0;L=M+8|0;H=M;I=M+368|0;J=M+328|0;K=M+316|0;q=M+304|0;z=M+280|0;A=M+256|0;s=M+244|0;u=M+232|0;v=M+220|0;w=M+208|0;d=M+196|0;m=M+352|0;g=M+64|0;e=M+76|0;f=M+100|0;j=M+52|0;h=M+28|0;l=M+40|0;n=M+184|0;B=M+112|0;C=M+136|0;D=M+148|0;E=M+160|0;F=M+172|0;G=M+88|0;y=b;a:do if((y-a|0)>3?(i[a>>0]|0)==76:0){x=a+1|0;do switch(i[x>>0]|0){case 110:{L=a+2|0;Ol(l,60296,8);d=tm(L,b,l,c)|0;tl(l);d=(d|0)==(L|0)?a:d;break a}case 99:{L=a+2|0;Ol(s,60184,4);d=tm(L,b,s,c)|0;tl(s);d=(d|0)==(L|0)?a:d;break a}case 115:{L=a+2|0;Ol(w,60224,5);d=tm(L,b,w,c)|0;tl(w);d=(d|0)==(L|0)?a:d;break a}case 109:{L=a+2|0;Ol(f,60272,2);d=tm(L,b,f,c)|0;tl(f);d=(d|0)==(L|0)?a:d;break a}case 106:{L=a+2|0;Ol(g,60256,1);d=tm(L,b,g,c)|0;tl(g);d=(d|0)==(L|0)?a:d;break a}case 120:{L=a+2|0;Ol(j,60280,2);d=tm(L,b,j,c)|0;tl(j);d=(d|0)==(L|0)?a:d;break a}case 102:{m=a+2|0;b:do if((y-m|0)>>>0>8){h=a+10|0;d=i[m>>0]|0;g=a;e=H;l=m;while(1){if(!(Bm(d<<24>>24)|0)){d=m;break b}d=i[l>>0]|0;G=d+-48|0;f=i[g+3>>0]|0;j=f+-48|0;f=((G>>>0<10?G:d+9|0)<<4)+(j>>>0<10?j:f+169|0)&255;i[e>>0]=f;j=g+4|0;g=e+1|0;d=i[j>>0]|0;if((j|0)==(h|0))break;else{G=l;e=g;l=j;g=G}}if(d<<24>>24==69){c:do if((H|0)!=(g|0)&e>>>0>H>>>0){d=H;while(1){G=i[d>>0]|0;i[d>>0]=f;i[e>>0]=G;d=d+1|0;g=g+-2|0;if(d>>>0>=g>>>0)break c;G=e;f=i[g>>0]|0;e=g;g=G}}while(0);d=I+0|0;g=d+24|0;do{i[d>>0]=0;d=d+1|0}while((d|0)<(g|0));p[t>>3]=+o[H>>2];k[L>>2]=k[t>>2];k[L+4>>2]=k[t+4>>2];d=Im(I,24,60352,L)|0;if(d>>>0<=23){Ol(K,I,d);k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;j=J+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[J+0>>2];k[d+4>>2]=k[J+4>>2];k[d+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{g=k[c>>2]|0;h=(d-g|0)/24|0;e=h+1|0;if((e|0)<0)Fl(c);d=(f-g|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(L,d,h,c+12|0);d=L+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[J+0>>2];k[e+4>>2]=k[J+4>>2];k[e+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;I=e+12|0;k[I+0>>2]=k[j+0>>2];k[I+4>>2]=k[j+4>>2];k[I+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=e+24;Ml(c,L);Ll(L)}hl(J);tl(K);d=a+11|0}else d=m}else d=m}else d=m;while(0);d=(d|0)==(m|0)?a:d;break a}case 116:{L=a+2|0;Ol(d,60232,14);c=tm(L,b,d,c)|0;tl(d);d=(c|0)==(L|0)?a:c;break a}case 111:{L=a+2|0;Ol(n,60312,17);d=tm(L,b,n,c)|0;tl(n);d=(d|0)==(L|0)?a:d;break a}case 98:{if((i[a+3>>0]|0)!=69){d=a;break a}d=i[a+2>>0]|0;if((d|0)==48){i[z>>0]=10;j=z+1|0;i[j+0>>0]=i[60176]|0;i[j+1>>0]=i[60177]|0;i[j+2>>0]=i[60178]|0;i[j+3>>0]=i[60179]|0;i[j+4>>0]=i[60180]|0;i[z+6>>0]=0;j=z+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;e=c+4|0;d=k[e>>2]|0;g=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[z+0>>2];k[d+4>>2]=k[z+4>>2];k[d+8>>2]=k[z+8>>2];k[z+0>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;h=(d-e|0)/24|0;f=h+1|0;if((f|0)<0)Fl(c);d=(g-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(L,d,h,c+12|0);d=L+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[z+0>>2];k[e+4>>2]=k[z+4>>2];k[e+8>>2]=k[z+8>>2];k[z+0>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;K=e+12|0;k[K+0>>2]=k[j+0>>2];k[K+4>>2]=k[j+4>>2];k[K+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=e+24;Ml(c,L);Ll(L)}hl(z);d=a+4|0;break a}else if((d|0)==49){i[A>>0]=8;j=A+1|0;i[j>>0]=116;i[j+1>>0]=114;i[j+2>>0]=117;i[j+3>>0]=101;i[A+5>>0]=0;j=A+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;e=c+4|0;d=k[e>>2]|0;g=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[A+0>>2];k[d+4>>2]=k[A+4>>2];k[d+8>>2]=k[A+8>>2];k[A+0>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{e=k[c>>2]|0;h=(d-e|0)/24|0;f=h+1|0;if((f|0)<0)Fl(c);d=(g-e|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d}else d=2147483647;Kl(L,d,h,c+12|0);d=L+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[A+0>>2];k[e+4>>2]=k[A+4>>2];k[e+8>>2]=k[A+8>>2];k[A+0>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;K=e+12|0;k[K+0>>2]=k[j+0>>2];k[K+4>>2]=k[j+4>>2];k[K+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=e+24;Ml(c,L);Ll(L)}hl(A);d=a+4|0;break a}else{d=a;break a}}case 108:{L=a+2|0;Ol(e,60264,1);d=tm(L,b,e,c)|0;tl(e);d=(d|0)==(L|0)?a:d;break a}case 105:{L=a+2|0;Ol(m,60248,0);d=tm(L,b,m,c)|0;tl(m);d=(d|0)==(L|0)?a:d;break a}case 97:{L=a+2|0;Ol(u,60192,11);d=tm(L,b,u,c)|0;tl(u);d=(d|0)==(L|0)?a:d;break a}case 119:{L=a+2|0;Ol(q,60168,7);d=tm(L,b,q,c)|0;tl(q);d=(d|0)==(L|0)?a:d;break a}case 104:{L=a+2|0;Ol(v,60208,13);d=tm(L,b,v,c)|0;tl(v);d=(d|0)==(L|0)?a:d;break a}case 121:{L=a+2|0;Ol(h,60288,3);d=tm(L,b,h,c)|0;tl(h);d=(d|0)==(L|0)?a:d;break a}case 101:{m=a+2|0;d:do if((y-m|0)>>>0>20){h=a+22|0;d=i[m>>0]|0;g=a;e=H;l=m;while(1){if(!(Bm(d<<24>>24)|0)){d=m;break d}d=i[l>>0]|0;G=d+-48|0;f=i[g+3>>0]|0;j=f+-48|0;f=((G>>>0<10?G:d+9|0)<<4)+(j>>>0<10?j:f+169|0)&255;i[e>>0]=f;j=g+4|0;g=e+1|0;d=i[j>>0]|0;if((j|0)==(h|0))break;else{G=l;e=g;l=j;g=G}}if(d<<24>>24==69){e:do if((H|0)!=(g|0)&e>>>0>H>>>0){d=H;while(1){G=i[d>>0]|0;i[d>>0]=f;i[e>>0]=G;d=d+1|0;g=g+-2|0;if(d>>>0>=g>>>0)break e;G=e;f=i[g>>0]|0;e=g;g=G}}while(0);d=I+0|0;g=d+40|0;do{i[d>>0]=0;d=d+1|0}while((d|0)<(g|0));p[t>>3]=+p[H>>3];k[L>>2]=k[t>>2];k[L+4>>2]=k[t+4>>2];d=Im(I,40,60336,L)|0;if(d>>>0<=39){Ol(K,I,d);k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;j=J+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[J+0>>2];k[d+4>>2]=k[J+4>>2];k[d+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{g=k[c>>2]|0;h=(d-g|0)/24|0;e=h+1|0;if((e|0)<0)Fl(c);d=(f-g|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(L,d,h,c+12|0);d=L+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[J+0>>2];k[e+4>>2]=k[J+4>>2];k[e+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;I=e+12|0;k[I+0>>2]=k[j+0>>2];k[I+4>>2]=k[j+4>>2];k[I+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=e+24;Ml(c,L);Ll(L)}hl(J);tl(K);d=a+23|0}else d=m}else d=m}else d=m;while(0);d=(d|0)==(m|0)?a:d;break a}case 95:{if((i[a+2>>0]|0)!=90){d=a;break a}L=a+3|0;d=pl(L,b,c)|0;if((d|0)==(L|0)|(d|0)==(b|0)){d=a;break a}r=M;return ((i[d>>0]|0)==69?d+1|0:a)|0}case 100:{m=a+2|0;f:do if((y-m|0)>>>0>16){h=a+18|0;d=i[m>>0]|0;g=a;e=H;l=m;while(1){if(!(Bm(d<<24>>24)|0)){d=m;break f}d=i[l>>0]|0;G=d+-48|0;f=i[g+3>>0]|0;j=f+-48|0;f=((G>>>0<10?G:d+9|0)<<4)+(j>>>0<10?j:f+169|0)&255;i[e>>0]=f;j=g+4|0;g=e+1|0;d=i[j>>0]|0;if((j|0)==(h|0))break;else{G=l;e=g;l=j;g=G}}if(d<<24>>24==69){g:do if((H|0)!=(g|0)&e>>>0>H>>>0){d=H;while(1){G=i[d>>0]|0;i[d>>0]=f;i[e>>0]=G;d=d+1|0;g=g+-2|0;if(d>>>0>=g>>>0)break g;G=e;f=i[g>>0]|0;e=g;g=G}}while(0);d=I+0|0;g=d+32|0;do{i[d>>0]=0;d=d+1|0}while((d|0)<(g|0));p[t>>3]=+p[H>>3];k[L>>2]=k[t>>2];k[L+4>>2]=k[t+4>>2];d=Im(I,32,60344,L)|0;if(d>>>0<=31){Ol(K,I,d);k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;j=J+12|0;k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;e=c+4|0;d=k[e>>2]|0;f=k[c+8>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+0>>2]=k[J+0>>2];k[d+4>>2]=k[J+4>>2];k[d+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;d=d+12|0;k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;d=k[e>>2]|0}k[e>>2]=d+24}else{g=k[c>>2]|0;h=(d-g|0)/24|0;e=h+1|0;if((e|0)<0)Fl(c);d=(f-g|0)/24|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?e:d}else d=2147483647;Kl(L,d,h,c+12|0);d=L+8|0;e=k[d>>2]|0;if(e){k[e+0>>2]=k[J+0>>2];k[e+4>>2]=k[J+4>>2];k[e+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;I=e+12|0;k[I+0>>2]=k[j+0>>2];k[I+4>>2]=k[j+4>>2];k[I+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0}k[d>>2]=e+24;Ml(c,L);Ll(L)}hl(J);tl(K);d=a+19|0}else d=m}else d=m}else d=m;while(0);d=(d|0)==(m|0)?a:d;break a}case 84:{d=a;break a}default:{m=ul(x,b,c)|0;if((m|0)==(x|0)|(m|0)==(b|0)){d=a;break a}d=i[m>>0]|0;if(d<<24>>24==69){d=m+1|0;break a}else{g=d;e=m}while(1){d=e+1|0;if(((g<<24>>24)+-48|0)>>>0>=10){l=e;break}if((d|0)==(b|0)){d=a;break a}g=i[d>>0]|0;e=d}if(!((l|0)!=(m|0)&g<<24>>24==69)){d=a;break a}g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0)){d=a;break a}h=g+-24|0;Al(F,h);f=rl(F,0,58248)|0;k[E+0>>2]=k[f+0>>2];k[E+4>>2]=k[f+4>>2];k[E+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=sl(E,58240)|0;k[D+0>>2]=k[f+0>>2];k[D+4>>2]=k[f+4>>2];k[D+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=l-m|0;if(f>>>0>4294967279)ql(G);if(f>>>0<11){i[G>>0]=f<<1;j=G+1|0}else{a=f+16&-16;j=xm(a)|0;k[G+8>>2]=j;k[G>>2]=a|1;k[G+4>>2]=f}g=m;e=j;while(1){i[e>>0]=i[g>>0]|0;g=g+1|0;if((g|0)==(l|0))break;else e=e+1|0}g=i[G>>0]|0;i[j+f>>0]=0;if(!(g&1)){f=G+1|0;e=(g&255)>>>1}else{f=k[G+8>>2]|0;e=k[G+4>>2]|0}a=jl(D,f,e)|0;k[C+0>>2]=k[a+0>>2];k[C+4>>2]=k[a+4>>2];k[C+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[B+0>>2]=k[C+0>>2];k[B+4>>2]=k[C+4>>2];k[B+8>>2]=k[C+8>>2];k[C+0>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;a=B+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(h,B);hl(B);tl(C);tl(G);tl(D);tl(E);tl(F);break a}}while(0)}else d=a;while(0);r=M;return d|0}function km(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+128|0;q=s+108|0;e=s+104|0;n=s+80|0;o=s+68|0;p=s+56|0;g=s+40|0;h=s+16|0;j=s;l=s+44|0;do if((b-a|0)>2?(i[a>>0]|0)==102:0){f=i[a+1>>0]|0;if(f<<24>>24==112){d=El(a+2|0,b,e)|0;h=zl(d,b)|0;if((h|0)==(b|0))break;if((i[h>>0]|0)!=95)break;f=h-d|0;if(f>>>0>4294967279)ql(p);if(f>>>0<11){i[p>>0]=f<<1;a=p+1|0}else{m=f+16&-16;a=xm(m)|0;k[p+8>>2]=a;k[p>>2]=m|1;k[p+4>>2]=f}if((d|0)!=(h|0)){e=a;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(h|0))break;else e=e+1|0}a=a+f|0}i[a>>0]=0;b=rl(p,0,60160)|0;k[o+0>>2]=k[b+0>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[n+0>>2]=k[o+0>>2];k[n+4>>2]=k[o+4>>2];k[n+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;b=n+12|0;k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;f=c+4|0;a=k[f>>2]|0;e=k[c+8>>2]|0;if(a>>>0>>0){if(!a)a=0;else{k[a+0>>2]=k[n+0>>2];k[a+4>>2]=k[n+4>>2];k[a+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;a=a+12|0;k[a+0>>2]=k[b+0>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;a=k[f>>2]|0}k[f>>2]=a+24}else{f=k[c>>2]|0;g=(a-f|0)/24|0;d=g+1|0;if((d|0)<0)Fl(c);a=(e-f|0)/24|0;if(a>>>0<1073741823){a=a<<1;a=a>>>0>>0?d:a}else a=2147483647;Kl(q,a,g,c+12|0);a=q+8|0;d=k[a>>2]|0;if(d){k[d+0>>2]=k[n+0>>2];k[d+4>>2]=k[n+4>>2];k[d+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;m=d+12|0;k[m+0>>2]=k[b+0>>2];k[m+4>>2]=k[b+4>>2];k[m+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0}k[a>>2]=d+24;Ml(c,q);Ll(q)}hl(n);tl(o);tl(p);a=h+1|0;break}else if(f<<24>>24!=76)break;f=zl(a+2|0,b)|0;if((((f|0)!=(b|0)?(i[f>>0]|0)==112:0)?(d=El(f+1|0,b,g)|0,m=zl(d,b)|0,(m|0)!=(b|0)):0)?(i[m>>0]|0)==95:0){f=m-d|0;if(f>>>0>4294967279)ql(l);if(f>>>0<11){i[l>>0]=f<<1;a=l+1|0}else{p=f+16&-16;a=xm(p)|0;k[l+8>>2]=a;k[l>>2]=p|1;k[l+4>>2]=f}if((d|0)!=(m|0)){e=a;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(m|0))break;else e=e+1|0}a=a+f|0}i[a>>0]=0;b=rl(l,0,60160)|0;k[j+0>>2]=k[b+0>>2];k[j+4>>2]=k[b+4>>2];k[j+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[h+0>>2]=k[j+0>>2];k[h+4>>2]=k[j+4>>2];k[h+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;b=h+12|0;k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;d=c+4|0;a=k[d>>2]|0;e=k[c+8>>2]|0;if(a>>>0>>0){if(!a)a=0;else{k[a+0>>2]=k[h+0>>2];k[a+4>>2]=k[h+4>>2];k[a+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;a=a+12|0;k[a+0>>2]=k[b+0>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;a=k[d>>2]|0}k[d>>2]=a+24}else{f=k[c>>2]|0;g=(a-f|0)/24|0;d=g+1|0;if((d|0)<0)Fl(c);a=(e-f|0)/24|0;if(a>>>0<1073741823){a=a<<1;a=a>>>0>>0?d:a}else a=2147483647;Kl(q,a,g,c+12|0);a=q+8|0;d=k[a>>2]|0;if(d){k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;p=d+12|0;k[p+0>>2]=k[b+0>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0}k[a>>2]=d+24;Ml(c,q);Ll(q)}hl(h);tl(j);tl(l);a=m+1|0}}while(0);r=s;return a|0}function lm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+96|0;q=s+84|0;p=s;h=s+12|0;j=s+24|0;l=s+36|0;m=s+48|0;n=s+60|0;o=s+72|0;e=Ql(a,b,d)|0;a:do if((e|0)!=(a|0)){b=Ql(e,b,d)|0;g=d+4|0;f=k[g>>2]|0;if((b|0)==(e|0)){e=f+-24|0;b=f;while(1){q=b+-24|0;k[g>>2]=q;hl(q);b=k[g>>2]|0;if((b|0)==(e|0)){b=a;break a}}}if(((f-(k[d>>2]|0)|0)/24|0)>>>0>=2){Al(q,f+-24|0);f=k[g>>2]|0;e=f+-24|0;d=f;do{a=d+-24|0;k[g>>2]=a;hl(a);d=k[g>>2]|0}while((d|0)!=(e|0));Al(p,f+-48|0);f=k[g>>2]|0;g=f+-24|0;if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[f+-16>>2]>>0]=0;k[f+-20>>2]=0}f=i[c>>0]|0;if(!(f&1)){f=(f&255)>>>1;d=c+1|0}else{f=k[c+4>>2]|0;d=k[c+8>>2]|0}e=f>>>0>1;if((Mm(d,58336,e?1:f)|0)==0?(f|0)!=0&(e^1):0)Cl(g,40);Zl(o,58248,p);f=sl(o,58840)|0;k[n+0>>2]=k[f+0>>2];k[n+4>>2]=k[f+4>>2];k[n+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=i[c>>0]|0;if(!(f&1)){e=c+1|0;f=(f&255)>>>1}else{e=k[c+8>>2]|0;f=k[c+4>>2]|0}f=jl(n,e,f)|0;k[m+0>>2]=k[f+0>>2];k[m+4>>2]=k[f+4>>2];k[m+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=sl(m,58232)|0;k[l+0>>2]=k[f+0>>2];k[l+4>>2]=k[f+4>>2];k[l+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=i[q>>0]|0;if(!(f&1)){e=q+1|0;f=(f&255)>>>1}else{e=k[q+8>>2]|0;f=k[q+4>>2]|0}f=jl(l,e,f)|0;k[j+0>>2]=k[f+0>>2];k[j+4>>2]=k[f+4>>2];k[j+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=sl(j,58240)|0;k[h+0>>2]=k[f+0>>2];k[h+4>>2]=k[f+4>>2];k[h+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=i[h>>0]|0;if(!(f&1)){e=h+1|0;f=(f&255)>>>1}else{e=k[h+8>>2]|0;f=k[h+4>>2]|0}jl(g,e,f)|0;tl(h);tl(j);tl(l);tl(m);tl(n);tl(o);e=i[c>>0]|0;if(!(e&1)){f=(e&255)>>>1;d=c+1|0}else{f=k[c+4>>2]|0;d=k[c+8>>2]|0}e=f>>>0>1;if((Mm(d,58336,e?1:f)|0)==0?(f|0)!=0&(e^1):0)Cl(g,41);tl(p);tl(q)}else b=a}else b=a;while(0);r=s;return b|0}function mm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+48|0;n=s+36|0;o=s;p=s+12|0;q=s+24|0;b=Ql(a,b,d)|0;if((b|0)!=(a|0)?(e=d+4|0,f=k[e>>2]|0,(k[d>>2]|0)!=(f|0)):0){m=f+-24|0;Vl(p,c,58248);Al(q,(k[e>>2]|0)+-24|0);d=i[q>>0]|0;if(!(d&1)){a=q+1|0;d=(d&255)>>>1}else{a=k[q+8>>2]|0;d=k[q+4>>2]|0}l=jl(p,a,d)|0;k[o+0>>2]=k[l+0>>2];k[o+4>>2]=k[l+4>>2];k[o+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;l=sl(o,58240)|0;k[n+0>>2]=k[l+0>>2];k[n+4>>2]=k[l+4>>2];k[n+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;do if(i[m>>0]&1){l=f+-16|0;i[k[l>>2]>>0]=0;g=f+-20|0;k[g>>2]=0;d=i[m>>0]|0;if(!(d&1))f=10;else{f=k[m>>2]|0;d=f&255;f=(f&-2)+-1|0}if(!(d&1)){a=(d&255)>>>1;if((d&255)<22){c=10;h=a;j=1}else{c=(a+16&240)+-1|0;h=a;j=1}}else{c=10;h=0;j=0}if((c|0)!=(f|0)){if((c|0)==10){e=m+1|0;a=k[l>>2]|0;if(j){_m(e|0,a|0,((d&255)>>>1)+1|0)|0;ym(a)}else{i[e>>0]=i[a>>0]|0;ym(a)}i[m>>0]=h<<1;break}e=c+1|0;a=xm(e)|0;if(!(c>>>0<=f>>>0&(a|0)==0)){if(j)_m(a|0,m+1|0,((d&255)>>>1)+1|0)|0;else{c=k[l>>2]|0;i[a>>0]=i[c>>0]|0;ym(c)}k[m>>2]=e|1;k[g>>2]=h;k[l>>2]=a}}}else{i[m+1>>0]=0;i[m>>0]=0}while(0);k[m+0>>2]=k[n+0>>2];k[m+4>>2]=k[n+4>>2];k[m+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;tl(n);tl(o);tl(q);tl(p)}else b=a;r=s;return b|0}function nm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=r;r=r+144|0;l=y+132|0;t=y+120|0;s=y+108|0;x=y+96|0;w=y+84|0;j=y+72|0;q=y+60|0;p=y+36|0;o=y+24|0;n=y+12|0;v=y;u=y+48|0;g=b;a:do if((g-a|0)>2){if((i[a>>0]|0)==103){e=(i[a+1>>0]|0)==115;m=e;e=e?a+2|0:a}else{m=0;e=a}d=um(e,b,c)|0;if((d|0)!=(e|0)){if(!m)break;e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break}rl(e+-24|0,0,58416)|0;break}if(((g-e|0)>2?(i[e>>0]|0)==115:0)?(i[e+1>>0]|0)==114:0){g=e+2|0;if((i[g>>0]|0)==78){v=e+3|0;g=vm(v,b,c)|0;if((g|0)==(v|0)|(g|0)==(b|0)){d=a;break}d=Tl(g,b,c)|0;do if((d|0)==(g|0))d=g;else{h=c+4|0;g=k[h>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(l,g+-24|0);f=k[h>>2]|0;g=f+-24|0;e=f;do{v=e+-24|0;k[h>>2]=v;hl(v);e=k[h>>2]|0}while((e|0)!=(g|0));g=i[l>>0]|0;if(!(g&1)){e=l+1|0;g=(g&255)>>>1}else{e=k[l+8>>2]|0;g=k[l+4>>2]|0}jl(f+-48|0,e,g)|0;if((d|0)!=(b|0)){tl(l);break}e=k[h>>2]|0;d=e+-24|0;do{c=e+-24|0;k[h>>2]=c;hl(c);e=k[h>>2]|0}while((e|0)!=(d|0));tl(l);d=a;break a}while(0);if((i[d>>0]|0)!=69){m=c+4|0;j=s+1|0;h=s+8|0;l=s+4|0;g=d;while(1){d=wm(g,b,c)|0;if((d|0)==(g|0)|(d|0)==(b|0)){d=a;break a}g=k[m>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(t,g+-24|0);f=k[m>>2]|0;g=f+-24|0;e=f;do{v=e+-24|0;k[m>>2]=v;hl(v);e=k[m>>2]|0}while((e|0)!=(g|0));g=rl(t,0,58416)|0;k[s+0>>2]=k[g+0>>2];k[s+4>>2]=k[g+4>>2];k[s+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[s>>0]|0;if(!(g&1)){e=j;g=(g&255)>>>1}else{e=k[h>>2]|0;g=k[l>>2]|0}jl(f+-48|0,e,g)|0;tl(s);tl(t);if((i[d>>0]|0)==69)break;else g=d}}v=d+1|0;d=um(v,b,c)|0;if((d|0)==(v|0)){f=c+4|0;d=k[f>>2]|0;if((k[c>>2]|0)==(d|0)){d=a;break}e=d+-24|0;while(1){c=d+-24|0;k[f>>2]=c;hl(c);d=k[f>>2]|0;if((d|0)==(e|0)){d=a;break a}}}g=c+4|0;e=k[g>>2]|0;if(((e-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break}Al(x,e+-24|0);h=k[g>>2]|0;e=h+-24|0;f=h;do{a=f+-24|0;k[g>>2]=a;hl(a);f=k[g>>2]|0}while((f|0)!=(e|0));e=rl(x,0,58416)|0;k[w+0>>2]=k[e+0>>2];k[w+4>>2]=k[e+4>>2];k[w+8>>2]=k[e+8>>2];k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;e=i[w>>0]|0;if(!(e&1)){f=w+1|0;e=(e&255)>>>1}else{f=k[w+8>>2]|0;e=k[w+4>>2]|0}jl(h+-48|0,f,e)|0;tl(w);tl(x);break}d=vm(g,b,c)|0;if((d|0)!=(g|0)){e=Tl(d,b,c)|0;if((e|0)==(d|0))e=d;else{f=c+4|0;d=k[f>>2]|0;if(((d-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break}Al(j,d+-24|0);h=k[f>>2]|0;d=h+-24|0;g=h;do{x=g+-24|0;k[f>>2]=x;hl(x);g=k[f>>2]|0}while((g|0)!=(d|0));d=i[j>>0]|0;if(!(d&1)){g=j+1|0;d=(d&255)>>>1}else{g=k[j+8>>2]|0;d=k[j+4>>2]|0}jl(h+-48|0,g,d)|0;tl(j)}d=um(e,b,c)|0;if((d|0)==(e|0)){f=c+4|0;d=k[f>>2]|0;if((k[c>>2]|0)==(d|0)){d=a;break}e=d+-24|0;while(1){c=d+-24|0;k[f>>2]=c;hl(c);d=k[f>>2]|0;if((d|0)==(e|0)){d=a;break a}}}g=c+4|0;e=k[g>>2]|0;if(((e-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break}Al(q,e+-24|0);h=k[g>>2]|0;e=h+-24|0;f=h;do{a=f+-24|0;k[g>>2]=a;hl(a);f=k[g>>2]|0}while((f|0)!=(e|0));e=rl(q,0,58416)|0;k[p+0>>2]=k[e+0>>2];k[p+4>>2]=k[e+4>>2];k[p+8>>2]=k[e+8>>2];k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;e=i[p>>0]|0;if(!(e&1)){f=p+1|0;e=(e&255)>>>1}else{f=k[p+8>>2]|0;e=k[p+4>>2]|0}jl(h+-48|0,f,e)|0;tl(p);tl(q);break}d=wm(g,b,c)|0;if(!((d|0)==(g|0)|(d|0)==(b|0))){if(m){e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break}rl(e+-24|0,0,58416)|0}if((i[d>>0]|0)!=69){h=c+4|0;j=n+1|0;l=n+8|0;m=n+4|0;g=d;while(1){d=wm(g,b,c)|0;if((d|0)==(g|0)|(d|0)==(b|0)){d=a;break a}g=k[h>>2]|0;if(((g-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(o,g+-24|0);f=k[h>>2]|0;g=f+-24|0;e=f;do{x=e+-24|0;k[h>>2]=x;hl(x);e=k[h>>2]|0}while((e|0)!=(g|0));g=rl(o,0,58416)|0;k[n+0>>2]=k[g+0>>2];k[n+4>>2]=k[g+4>>2];k[n+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[n>>0]|0;if(!(g&1)){e=j;g=(g&255)>>>1}else{e=k[l>>2]|0;g=k[m>>2]|0}jl(f+-48|0,e,g)|0;tl(n);tl(o);if((i[d>>0]|0)==69)break;else g=d}}x=d+1|0;d=um(x,b,c)|0;if((d|0)==(x|0)){f=c+4|0;d=k[f>>2]|0;if((k[c>>2]|0)==(d|0)){d=a;break}e=d+-24|0;while(1){c=d+-24|0;k[f>>2]=c;hl(c);d=k[f>>2]|0;if((d|0)==(e|0)){d=a;break a}}}g=c+4|0;e=k[g>>2]|0;if(((e-(k[c>>2]|0)|0)/24|0)>>>0>=2){Al(v,e+-24|0);h=k[g>>2]|0;e=h+-24|0;f=h;do{a=f+-24|0;k[g>>2]=a;hl(a);f=k[g>>2]|0}while((f|0)!=(e|0));e=rl(v,0,58416)|0;k[u+0>>2]=k[e+0>>2];k[u+4>>2]=k[e+4>>2];k[u+8>>2]=k[e+8>>2];k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;e=i[u>>0]|0;if(!(e&1)){f=u+1|0;e=(e&255)>>>1}else{f=k[u+8>>2]|0;e=k[u+4>>2]|0}jl(h+-48|0,f,e)|0;tl(u);tl(v)}else d=a}else d=a}else d=a}else d=a;while(0);r=y;return d|0}function om(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;a:do if((a|0)!=(b|0)){d=i[a>>0]|0;if((d|0)==76){d=a+1|0;if((d|0)!=(b|0)?(i[d>>0]|0)==90:0){e=a+2|0;d=pl(e,b,c)|0;if((d|0)==(e|0)|(d|0)==(b|0))break;return ((i[d>>0]|0)==69?d+1|0:a)|0}a=jm(a,b,c)|0;break}else if((d|0)==88){e=a+1|0;d=Ql(e,b,c)|0;if((d|0)==(e|0)|(d|0)==(b|0))break;a=(i[d>>0]|0)==69?d+1|0:a;break}else if((d|0)==74){d=a+1|0;if((d|0)==(b|0))break;while(1){if((i[d>>0]|0)==69){a=d;break}e=d;d=om(d,b,c)|0;if((d|0)==(e|0))break a}a=a+1|0;break}else{a=ul(a,b,c)|0;break}}while(0);return a|0}function pm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if(d>>>0>4294967279)ql(a);if(d>>>0<11){i[a>>0]=c<<1;d=a+1|0}else{e=d+16&-16;d=xm(e)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=c}_m(d|0,b|0,c|0)|0;i[d+c>>0]=0;return}function qm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;g=i[b>>0]|0;f=(g&1)==0;if(f)c=(g&255)>>>1;else c=k[b+4>>2]|0;a:do if(!c)Jl(a,b);else{if(f){c=(g&255)>>>1;e=b+1|0}else{c=k[b+4>>2]|0;e=k[b+8>>2]|0}d=c>>>0>11;if((Mm(e,59624,d?11:c)|0)==0?c>>>0>10&(d^1):0){_l(b,59640,70);Ol(a,59712,12);break}if(f){c=(g&255)>>>1;e=b+1|0}else{c=k[b+4>>2]|0;e=k[b+8>>2]|0}d=c>>>0>12;if((Mm(e,59728,d?12:c)|0)==0?c>>>0>11&(d^1):0){_l(b,59744,49);Ol(a,59800,13);break}if(f){c=(g&255)>>>1;e=b+1|0}else{c=k[b+4>>2]|0;e=k[b+8>>2]|0}d=c>>>0>12;if((Mm(e,59816,d?12:c)|0)==0?c>>>0>11&(d^1):0){_l(b,59832,49);Ol(a,59888,13);break}if(f){c=(g&255)>>>1;e=b+1|0}else{c=k[b+4>>2]|0;e=k[b+8>>2]|0}d=c>>>0>13;if((Mm(e,59904,d?13:c)|0)==0?c>>>0>12&(d^1):0){_l(b,59920,50);Ol(a,59976,14);break}if(f){h=b+1|0;c=(g&255)>>>1}else{h=k[b+8>>2]|0;c=k[b+4>>2]|0}d=h+c|0;b:do if((i[h+(c+-1)>>0]|0)==62){g=1;c=d;c:while(1){d=c;while(1){c=d+-1|0;if((c|0)==(h|0))break c;d=d+-2|0;e=i[d>>0]|0;if(e<<24>>24==62){d=39;break}else if(e<<24>>24==60){f=d;d=38;break}else d=c}if((d|0)==38){d=g+-1|0;if(!d){g=f;break b}else{g=d;continue}}else if((d|0)==39){g=g+1|0;continue}}k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;break a}else g=d;while(0);d=g;while(1){c=d+-1|0;if((c|0)==(h|0)){d=h;break}if((i[c>>0]|0)==58)break;else d=c}f=g-d|0;if(f>>>0>4294967279)ql(a);if(f>>>0<11){i[a>>0]=f<<1;c=a+1|0}else{h=f+16&-16;c=xm(h)|0;k[a+8>>2]=c;k[a>>2]=h|1;k[a+4>>2]=f}if((d|0)!=(g|0)){e=c;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(g|0))break;else e=e+1|0}c=c+f|0}i[c>>0]=0}while(0);return}function rm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;f=b;d=i[a>>0]|0;if(!(d&1)){e=10;j=(d&255)>>>1}else{d=k[a>>2]|0;e=(d&-2)+-1|0;j=k[a+4>>2]|0;d=d&255}h=c-f|0;do if((c|0)!=(b|0)){if((e-j|0)>>>0>>0){cm(a,e,j+h-e|0,j,j,0);d=i[a>>0]|0}if(!(d&1))g=a+1|0;else g=k[a+8>>2]|0;f=c+(j-f)|0;d=b;e=g+j|0;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(c|0))break;else e=e+1|0}i[g+f>>0]=0;d=j+h|0;if(!(i[a>>0]&1)){i[a>>0]=d<<1;break}else{k[a+4>>2]=d;break}}while(0);return} -function pl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=r;r=r+112|0;u=E+96|0;p=E+84|0;q=E+72|0;s=E+60|0;t=E+48|0;z=E+24|0;j=E+12|0;y=E;x=E+36|0;a:do if((a|0)==(b|0))b=a;else{B=c+56|0;C=k[B>>2]|0;w=C+1|0;k[B>>2]=w;D=c+61|0;A=i[D>>0]|0;if(w>>>0>1)i[D>>0]=1;f=i[a>>0]|0;b:do if((f|0)==84|(f|0)==71)if((b-a|0)>2){if((f|0)==71){d=i[a+1>>0]|0;if((d|0)==82){z=a+2|0;b=Bl(z,b,c)|0;if((b|0)==(z|0)){b=a;break}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break}rl(d+-24|0,0,61072)|0;break}else if((d|0)==86){z=a+2|0;b=Bl(z,b,c)|0;if((b|0)==(z|0)){b=a;break}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break}rl(d+-24|0,0,61048)|0;break}else{b=a;break}}else if((f|0)!=84){b=a;break}e=a+1|0;switch(i[e>>0]|0){case 83:{z=a+2|0;b=ul(z,b,c)|0;if((b|0)==(z|0)){b=a;break b}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break b}rl(d+-24|0,0,60904)|0;break b}case 73:{z=a+2|0;b=ul(z,b,c)|0;if((b|0)==(z|0)){b=a;break b}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break b}rl(d+-24|0,0,60888)|0;break b}case 99:{z=a+2|0;d=yl(z,b)|0;if((d|0)==(z|0)){b=a;break b}e=yl(d,b)|0;if((e|0)==(d|0)){b=a;break b}b=pl(e,b,c)|0;if((b|0)==(e|0)){b=a;break b}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break b}rl(d+-24|0,0,60928)|0;break b}case 86:{z=a+2|0;b=ul(z,b,c)|0;if((b|0)==(z|0)){b=a;break b}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break b}rl(d+-24|0,0,60856)|0;break b}case 84:{z=a+2|0;b=ul(z,b,c)|0;if((b|0)==(z|0)){b=a;break b}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break b}rl(d+-24|0,0,60872)|0;break b}case 67:{z=a+2|0;d=ul(z,b,c)|0;if((d|0)==(z|0)){b=a;break b}e=zl(d,b)|0;if((e|0)==(d|0)|(e|0)==(b|0)){b=a;break b}if((i[e>>0]|0)!=95){b=a;break b}z=e+1|0;b=ul(z,b,c)|0;if((b|0)==(z|0)){b=a;break b}f=c+4|0;d=k[f>>2]|0;if(((d-(k[c>>2]|0)|0)/24|0)>>>0<2){b=a;break b}Al(u,d+-24|0);g=k[f>>2]|0;d=g+-24|0;e=g;do{a=e+-24|0;k[f>>2]=a;hl(a);e=k[f>>2]|0}while((e|0)!=(d|0));o=g+-48|0;d=rl(u,0,60960)|0;k[s+0>>2]=k[d+0>>2];k[s+4>>2]=k[d+4>>2];k[s+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=sl(s,60992)|0;k[q+0>>2]=k[d+0>>2];k[q+4>>2]=k[d+4>>2];k[q+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;Al(t,(k[f>>2]|0)+-24|0);d=i[t>>0]|0;if(!(d&1)){e=t+1|0;d=(d&255)>>>1}else{e=k[t+8>>2]|0;d=k[t+4>>2]|0}a=jl(q,e,d)|0;k[p+0>>2]=k[a+0>>2];k[p+4>>2]=k[a+4>>2];k[p+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;do if(i[o>>0]&1){n=g+-40|0;i[k[n>>2]>>0]=0;j=g+-44|0;k[j>>2]=0;d=i[o>>0]|0;if(!(d&1))h=10;else{h=k[o>>2]|0;d=h&255;h=(h&-2)+-1|0}if(!(d&1)){e=(d&255)>>>1;if((d&255)<22){g=10;l=e;m=1}else{g=(e+16&240)+-1|0;l=e;m=1}}else{g=10;l=0;m=0}if((g|0)!=(h|0)){if((g|0)==10){f=o+1|0;e=k[n>>2]|0;if(m){_m(f|0,e|0,((d&255)>>>1)+1|0)|0;ym(e)}else{i[f>>0]=i[e>>0]|0;ym(e)}i[o>>0]=l<<1;break}f=g+1|0;e=xm(f)|0;if(!(g>>>0<=h>>>0&(e|0)==0)){if(m)_m(e|0,o+1|0,((d&255)>>>1)+1|0)|0;else{a=k[n>>2]|0;i[e>>0]=i[a>>0]|0;ym(a)}k[o>>2]=f|1;k[j>>2]=l;k[n>>2]=e}}}else{i[o+1>>0]=0;i[o>>0]=0}while(0);k[o+0>>2]=k[p+0>>2];k[o+4>>2]=k[p+4>>2];k[o+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;tl(p);tl(t);tl(q);tl(s);tl(u);break b}default:{d=yl(e,b)|0;if((d|0)==(e|0)){b=a;break b}b=pl(d,b,c)|0;if((b|0)==(d|0)){b=a;break b}d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0)){b=a;break b}d=d+-24|0;if((i[a+2>>0]|0)==118){rl(d,0,61e3)|0;break b}else{rl(d,0,61024)|0;break b}}}}else b=a;else{g=Bl(a,b,c)|0;t=k[c+48>>2]|0;u=k[c+52>>2]|0;if((g|0)!=(a|0)){if((g|0)!=(b|0)){w=i[g>>0]|0;if(w<<24>>24==46|w<<24>>24==69)b=g;else{v=i[D>>0]|0;i[D>>0]=0;k[z+0>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;w=c+4|0;f=k[w>>2]|0;c:do if((k[c>>2]|0)!=(f|0)){h=f+-24|0;e=i[h>>0]|0;m=(e&1)==0;if(m)l=(e&255)>>>1;else l=k[f+-20>>2]|0;if(l){if(!(i[c+60>>0]|0)){if(m){l=(e&255)>>>1;d=h+1|0}else{l=k[f+-20>>2]|0;d=k[f+-16>>2]|0}if((i[d+(l+-1)>>0]|0)==62){if(m){l=(e&255)>>>1;d=h+1|0}else{l=k[f+-20>>2]|0;d=k[f+-16>>2]|0}if((i[d+(l+-2)>>0]|0)!=45){if(m){e=(e&255)>>>1;d=h+1|0}else{e=k[f+-20>>2]|0;d=k[f+-16>>2]|0}if((i[d+(e+-2)>>0]|0)!=62){e=ul(g,b,c)|0;if((e|0)==(g|0))break;f=k[w>>2]|0;if(((f-(k[c>>2]|0)|0)/24|0)>>>0<2)break;f=f+-24|0;k[j+0>>2]=k[f+0>>2];k[j+4>>2]=k[f+4>>2];k[j+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=(k[w>>2]|0)+-12|0;k[z+0>>2]=k[f+0>>2];k[z+4>>2]=k[f+4>>2];k[z+8>>2]=k[f+8>>2];k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;f=i[z>>0]|0;if(!(f&1))f=(f&255)>>>1;else f=k[z+4>>2]|0;if(!f)Cl(j,32);l=k[w>>2]|0;f=l+-24|0;d=l;do{s=d+-24|0;k[w>>2]=s;hl(s);d=k[w>>2]|0}while((d|0)!=(f|0));f=i[j>>0]|0;if(!(f&1)){d=j+1|0;f=(f&255)>>>1}else{d=k[j+8>>2]|0;f=k[j+4>>2]|0}Dl(l+-48|0,0,d,f)|0;tl(j);f=k[w>>2]|0}else e=g}else e=g}else e=g}else e=g;Cl(f+-24|0,40);if((e|0)!=(b|0)?(i[e>>0]|0)==118:0){f=k[c>>2]|0;d=k[w>>2]|0;b=e+1|0}else n=103;d:do if((n|0)==103){j=y+1|0;n=y+8|0;o=y+4|0;p=x+1|0;q=x+8|0;s=x+4|0;l=1;while(1){d=k[w>>2]|0;f=k[c>>2]|0;g=e;while(1){m=(d-f|0)/24|0;e=ul(g,b,c)|0;d=k[w>>2]|0;f=k[c>>2]|0;h=(d-f|0)/24|0;if((e|0)==(g|0)){b=g;break d}if(h>>>0>m>>>0){d=m;break}else g=e}k[y+0>>2]=0;k[y+4>>2]=0;k[y+8>>2]=0;m=0;g=d;while(1){if(!(m&1))f=(m&255)>>>1;else f=k[o>>2]|0;if(f)sl(y,58736)|0;Al(x,(k[c>>2]|0)+(g*24|0)|0);f=i[x>>0]|0;if(!(f&1)){m=p;f=(f&255)>>>1}else{m=k[q>>2]|0;f=k[s>>2]|0}jl(y,m,f)|0;tl(x);f=g+1|0;if(f>>>0>=h>>>0)break;m=i[y>>0]|0;g=f}m=k[w>>2]|0;do{f=m;m=m+-24|0;do{g=f+-24|0;k[w>>2]=g;hl(g);f=k[w>>2]|0}while((f|0)!=(m|0));d=d+1|0}while((d|0)!=(h|0));d=i[y>>0]|0;if(!(d&1))f=(d&255)>>>1;else f=k[o>>2]|0;if(f){f=k[w>>2]|0;if((k[c>>2]|0)==(f|0))break;if(l)l=d;else{sl(f+-24|0,58736)|0;f=k[w>>2]|0;l=i[y>>0]|0}if(!(l&1)){d=j;l=(l&255)>>>1}else{d=k[n>>2]|0;l=k[o>>2]|0}jl(f+-24|0,d,l)|0;l=0}tl(y)}tl(y);break c}while(0);if((f|0)!=(d|0)){Cl(d+-24|0,41);if(t&1)sl((k[w>>2]|0)+-24|0,58152)|0;if(t&2)sl((k[w>>2]|0)+-24|0,58160)|0;if(t&4)sl((k[w>>2]|0)+-24|0,58176)|0;if((u|0)==2)sl((k[w>>2]|0)+-24|0,60568)|0;else if((u|0)==1)sl((k[w>>2]|0)+-24|0,60560)|0;d=i[z>>0]|0;if(!(d&1)){e=z+1|0;d=(d&255)>>>1}else{e=k[z+8>>2]|0;d=k[z+4>>2]|0}jl((k[w>>2]|0)+-24|0,e,d)|0;tl(z);i[D>>0]=v;break b}}}while(0);tl(z);i[D>>0]=A;k[B>>2]=C;b=a;break a}}}else b=a}while(0);i[D>>0]=A;k[B>>2]=C}while(0);r=E;return b|0}function ql(a){a=a|0;Ca(58008,58040,1164,58128)}function rl(a,b,c){a=a|0;b=b|0;c=c|0;return Dl(a,b,c,Zm(c|0)|0)|0}function sl(a,b){a=a|0;b=b|0;return jl(a,b,Zm(b|0)|0)|0}function tl(a){a=a|0;if(i[a>>0]&1)ym(k[a+8>>2]|0);return}function ul(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;Pa=r;r=r+768|0;Oa=Pa+744|0;Ka=Pa+720|0;qa=Pa+708|0;ra=Pa+696|0;va=Pa+672|0;Ga=Pa+648|0;Ia=Pa+624|0;wa=Pa+612|0;Fa=Pa+600|0;za=Pa+588|0;Da=Pa+576|0;sa=Pa+564|0;p=Pa+560|0;Ha=Pa+544|0;Ca=Pa+536|0;M=Pa+520|0;C=Pa+512|0;pa=Pa+496|0;ba=Pa+488|0;N=Pa+472|0;D=Pa+464|0;Ea=Pa+448|0;ya=Pa+444|0;ha=Pa+432|0;Aa=Pa+420|0;Ba=Pa+408|0;ia=Pa+396|0;oa=Pa+384|0;na=Pa+368|0;ca=Pa+364|0;ua=Pa+180|0;P=Pa+168|0;Q=Pa+144|0;R=Pa+132|0;S=Pa+120|0;T=Pa+108|0;ka=Pa+96|0;X=Pa+48|0;Y=Pa+36|0;Z=Pa+24|0;_=Pa+12|0;$=Pa;ea=Pa+72|0;fa=Pa+192|0;ga=Pa+204|0;ta=Pa+216|0;la=Pa+232|0;L=Pa+240|0;B=Pa+256|0;V=Pa+260|0;U=Pa+272|0;J=Pa+288|0;O=Pa+296|0;E=Pa+312|0;ma=Pa+320|0;aa=Pa+336|0;Na=Pa+344|0;Ma=Pa+360|0;a:do if((a|0)!=(b|0)){x=i[a>>0]|0;if((x|0)==75|(x|0)==86|(x|0)==114){k[p>>2]=0;n=El(a,b,p)|0;if((n|0)==(a|0)){d=a;break}g=i[n>>0]|0;x=c+4|0;q=((k[x>>2]|0)-(k[c>>2]|0)|0)/24|0;d=ul(n,b,c)|0;x=((k[x>>2]|0)-(k[c>>2]|0)|0)/24|0;if((d|0)==(n|0)){d=a;break}w=g<<24>>24==70;g=c+20|0;n=k[g>>2]|0;if(w){e=n+-16|0;do{v=n+-16|0;k[g>>2]=v;il(v);n=k[g>>2]|0}while((n|0)!=(e|0));n=e}h=c+16|0;m=k[c+12>>2]|0;v=c+20|0;e=k[c+24>>2]|0;if(n>>>0>>0){if(!n)n=0;else{k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;k[n+12>>2]=m;n=k[v>>2]|0}k[v>>2]=n+16}else{o=k[h>>2]|0;l=n-o>>4;g=l+1|0;if((g|0)<0)Fl(h);n=e-o|0;if(n>>4>>>0<1073741823){n=n>>3;n=n>>>0>>0?g:n}else n=2147483647;Gl(Oa,n,l,c+28|0);n=Oa+8|0;g=k[n>>2]|0;if(g){k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=m}k[n>>2]=g+16;Hl(h,Oa);Il(Oa)}if(q>>>0>=x>>>0)break;t=k[p>>2]|0;p=(t&1|0)==0;s=(t&2|0)==0;t=(t&4|0)==0;u=Oa+8|0;while(1){if(w){o=k[c>>2]|0;m=o+(q*24|0)+12|0;n=i[m>>0]|0;g=(n&1)==0;if(g){l=(n&255)>>>1;e=m+1|0}else{l=k[o+(q*24|0)+16>>2]|0;e=k[o+(q*24|0)+20>>2]|0}h=l+-2|0;if((i[e+h>>0]|0)==38)n=l+-3|0;else{if(g){g=(n&255)>>>1;n=m+1|0}else{g=k[o+(q*24|0)+16>>2]|0;n=k[o+(q*24|0)+20>>2]|0}n=(i[n+(g+-1)>>0]|0)==38?h:l}if(!p){rl(m,n,58152)|0;n=n+6|0}if(!s){rl((k[c>>2]|0)+(q*24|0)+12|0,n,58160)|0;n=n+9|0}if(!t)rl((k[c>>2]|0)+(q*24|0)+12|0,n,58176)|0}else{if(!p)sl((k[c>>2]|0)+(q*24|0)|0,58152)|0;if(!s)sl((k[c>>2]|0)+(q*24|0)|0,58160)|0;if(!t)sl((k[c>>2]|0)+(q*24|0)|0,58176)|0}e=k[v>>2]|0;o=e+-16|0;l=k[c>>2]|0;h=l+(q*24|0)|0;g=e+-12|0;n=k[g>>2]|0;if((n|0)==(k[e+-8>>2]|0)){g=(n-(k[o>>2]|0)|0)/24|0;n=g+1|0;if((n|0)<0){d=o;break}if(g>>>0<1073741823){m=g<<1;n=m>>>0>>0?n:m}else n=2147483647;Kl(Oa,n,g,e+-4|0);n=k[u>>2]|0;if(n){Jl(n,h);Jl(n+12|0,l+(q*24|0)+12|0)}k[u>>2]=n+24;Ml(o,Oa);Ll(Oa)}else{if(!n)n=0;else{Jl(n,h);Jl(n+12|0,l+(q*24|0)+12|0);n=k[g>>2]|0}k[g>>2]=n+24}q=q+1|0;if(q>>>0>=x>>>0)break a}Fl(d)}d=Nl(a,b,c)|0;if((d|0)==(a|0)){g=i[a>>0]|0;b:do switch(g<<24>>24|0){case 80:{B=c+4|0;m=((k[B>>2]|0)-(k[c>>2]|0)|0)/24|0;A=a+1|0;d=ul(A,b,c)|0;B=((k[B>>2]|0)-(k[c>>2]|0)|0)/24|0;if((d|0)==(A|0)){d=a;break a}l=c+16|0;h=k[c+12>>2]|0;C=c+20|0;g=k[C>>2]|0;n=k[c+24>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=h;g=k[C>>2]|0}k[C>>2]=g+16}else{e=k[l>>2]|0;o=g-e>>4;f=o+1|0;if((f|0)<0)Fl(l);g=n-e|0;if(g>>4>>>0<1073741823){g=g>>3;g=g>>>0>>0?f:g}else g=2147483647;Gl(Oa,g,o,c+28|0);g=Oa+8|0;e=k[g>>2]|0;if(e){k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=h}k[g>>2]=e+16;Hl(l,Oa);Il(Oa)}if(m>>>0>=B>>>0)break a;t=Aa+1|0;u=Ba+1|0;v=Ba+8|0;w=Ba+4|0;x=Oa+8|0;y=Aa+8|0;z=Aa+4|0;while(1){g=k[c>>2]|0;e=g+(m*24|0)+12|0;n=i[e>>0]|0;if(!(n&1)){f=(n&255)>>>1;n=e+1|0}else{f=k[g+(m*24|0)+16>>2]|0;n=k[g+(m*24|0)+20>>2]|0}Ol(Aa,n,f>>>0<2?f:2);n=i[Aa>>0]|0;if(!(n&1)){n=(n&255)>>>1;g=t}else{n=k[z>>2]|0;g=k[y>>2]|0}Ka=n>>>0>2;Ia=(Mm(g,58224,Ka?2:n)|0)!=0|n>>>0<2;tl(Aa);g=k[c>>2]|0;if(Ia|Ka){n=g+(m*24|0)+12|0;if(!(i[n>>0]&1))n=n+1|0;else n=k[g+(m*24|0)+20>>2]|0;if((i[n>>0]|0)==40){sl(g+(m*24|0)|0,58248)|0;rl((k[c>>2]|0)+(m*24|0)+12|0,0,58240)|0}}else{sl(g+(m*24|0)|0,58232)|0;rl((k[c>>2]|0)+(m*24|0)+12|0,0,58240)|0}e=k[c>>2]|0;n=e+(m*24|0)|0;do if((i[A>>0]|0)==85){g=i[n>>0]|0;if(!(g&1)){g=(g&255)>>>1;n=n+1|0}else{g=k[e+(m*24|0)+4>>2]|0;n=k[e+(m*24|0)+8>>2]|0}Ol(Ba,n,g>>>0<12?g:12);n=i[Ba>>0]|0;if(!(n&1)){g=(n&255)>>>1;n=u}else{g=k[w>>2]|0;n=k[v>>2]|0}e=g>>>0>12;n=Mm(n,58264,e?12:g)|0;if(!n)g=g>>>0<12?-1:e&1;else g=n;tl(Ba);s=k[c>>2]|0;n=s+(m*24|0)|0;if(!g){g=i[n>>0]|0;if(!(g&1)){q=(g&255)>>>1;h=q>>>0<11?q:11;e=10}else{q=k[s+(m*24|0)+4>>2]|0;g=k[n>>2]|0;h=q>>>0<11?q:11;e=(g&-2)+-1|0;g=g&255}if((h-q+e|0)>>>0<2){vl(n,e,2-h+q-e|0,q,0,h,2,58288);break}if(!(g&1))p=n+1|0;else p=k[s+(m*24|0)+8>>2]|0;do if((h|0)==2){f=0;o=58288;e=2;g=2;Ja=446}else{l=q-h|0;if((q|0)==(h|0)){f=0;o=58288;e=2;g=h;Ja=446;break}if(h>>>0>2){i[p>>0]=105;i[p+1>>0]=100;an(p+2|0,p+h|0,l|0)|0;e=2;g=h;break}do if(p>>>0<58288>>>0&(p+q|0)>>>0>58288>>>0)if((p+h|0)>>>0>58288>>>0){_m(p|0,58288,h|0)|0;f=h;o=58290;e=2-h|0;g=0;break}else{f=0;o=58288+(2-h)|0;e=2;g=h;break}else{f=0;o=58288;e=2;g=h}while(0);an(p+(f+e)|0,p+(f+g)|0,l|0)|0;Ja=446}while(0);if((Ja|0)==446){Ja=0;an(p+f|0,o|0,e|0)|0}g=e-g+q|0;if(!(i[n>>0]&1))i[n>>0]=g<<1;else k[s+(m*24|0)+4>>2]=g;i[p+g>>0]=0}else Ja=429}else Ja=429;while(0);if((Ja|0)==429){Ja=0;sl(n,58280)|0}e=k[C>>2]|0;f=e+-16|0;o=k[c>>2]|0;l=o+(m*24|0)|0;g=e+-12|0;n=k[g>>2]|0;if((n|0)==(k[e+-8>>2]|0)){g=(n-(k[f>>2]|0)|0)/24|0;n=g+1|0;if((n|0)<0){d=f;break}if(g>>>0<1073741823){Ka=g<<1;n=Ka>>>0>>0?n:Ka}else n=2147483647;Kl(Oa,n,g,e+-4|0);n=k[x>>2]|0;if(n){Jl(n,l);Jl(n+12|0,o+(m*24|0)+12|0)}k[x>>2]=n+24;Ml(f,Oa);Ll(Oa)}else{if(!n)n=0;else{Jl(n,l);Jl(n+12|0,o+(m*24|0)+12|0);n=k[g>>2]|0}k[g>>2]=n+24}m=m+1|0;if(m>>>0>=B>>>0)break a}Fl(d);break}case 79:{u=c+4|0;m=((k[u>>2]|0)-(k[c>>2]|0)|0)/24|0;Ka=a+1|0;d=ul(Ka,b,c)|0;u=((k[u>>2]|0)-(k[c>>2]|0)|0)/24|0;if((d|0)==(Ka|0)){d=a;break a}n=c+16|0;o=k[c+12>>2]|0;v=c+20|0;g=k[v>>2]|0;e=k[c+24>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=o;g=k[v>>2]|0}k[v>>2]=g+16}else{f=k[n>>2]|0;h=g-f>>4;l=h+1|0;if((l|0)<0)Fl(n);g=e-f|0;if(g>>4>>>0<1073741823){g=g>>3;g=g>>>0>>0?l:g}else g=2147483647;Gl(Oa,g,h,c+28|0);g=Oa+8|0;e=k[g>>2]|0;if(e){k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=o}k[g>>2]=e+16;Hl(n,Oa);Il(Oa)}if(m>>>0>=u>>>0)break a;p=ha+1|0;q=Oa+8|0;s=ha+8|0;t=ha+4|0;while(1){e=k[c>>2]|0;f=e+(m*24|0)+12|0;g=i[f>>0]|0;if(!(g&1)){l=(g&255)>>>1;g=f+1|0}else{l=k[e+(m*24|0)+16>>2]|0;g=k[e+(m*24|0)+20>>2]|0}Ol(ha,g,l>>>0<2?l:2);g=i[ha>>0]|0;if(!(g&1)){g=(g&255)>>>1;e=p}else{g=k[t>>2]|0;e=k[s>>2]|0}Ka=g>>>0>2;Ia=(Mm(e,58224,Ka?2:g)|0)!=0|g>>>0<2;tl(ha);e=k[c>>2]|0;if(Ia|Ka){g=e+(m*24|0)+12|0;if(!(i[g>>0]&1))g=g+1|0;else g=k[e+(m*24|0)+20>>2]|0;if((i[g>>0]|0)==40){sl(e+(m*24|0)|0,58248)|0;rl((k[c>>2]|0)+(m*24|0)+12|0,0,58240)|0}}else{sl(e+(m*24|0)|0,58232)|0;rl((k[c>>2]|0)+(m*24|0)+12|0,0,58240)|0}sl((k[c>>2]|0)+(m*24|0)|0,58256)|0;f=k[v>>2]|0;o=f+-16|0;l=k[c>>2]|0;h=l+(m*24|0)|0;e=f+-12|0;n=k[e>>2]|0;if((n|0)==(k[f+-8>>2]|0)){g=(n-(k[o>>2]|0)|0)/24|0;n=g+1|0;if((n|0)<0){d=o;break}if(g>>>0<1073741823){Ka=g<<1;n=Ka>>>0>>0?n:Ka}else n=2147483647;Kl(Oa,n,g,f+-4|0);g=k[q>>2]|0;if(g){Jl(g,h);Jl(g+12|0,l+(m*24|0)+12|0)}k[q>>2]=g+24;Ml(o,Oa);Ll(Oa)}else{if(!n)g=0;else{Jl(n,h);Jl(n+12|0,l+(m*24|0)+12|0);g=k[e>>2]|0}k[e>>2]=g+24}m=m+1|0;if(m>>>0>=u>>>0)break a}Fl(d);break}case 65:{do if(g<<24>>24==65?(f=a+1|0,(f|0)!=(b|0)):0){d=i[f>>0]|0;if(d<<24>>24==95){Na=a+2|0;d=ul(Na,b,c)|0;if((d|0)==(Na|0)){d=a;break}l=c+4|0;e=k[l>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break}f=e+-12|0;g=i[f>>0]|0;if(!(g&1)){g=(g&255)>>>1;e=f+1|0}else{g=k[e+-8>>2]|0;e=k[e+-4>>2]|0}Ol(Oa,e,g>>>0<2?g:2);e=i[Oa>>0]|0;if(!(e&1)){e=(e&255)>>>1;f=Oa+1|0}else{e=k[Oa+4>>2]|0;f=k[Oa+8>>2]|0}b=e>>>0>2;Na=(Mm(f,58224,b?2:e)|0)!=0|e>>>0<2;tl(Oa);if(!(Na|b))Pl((k[l>>2]|0)+-12|0);rl((k[l>>2]|0)+-12|0,0,60576)|0;break}if((d+-49&255)<9){o=zl(f,b)|0;if((o|0)==(b|0)){d=a;break}if((i[o>>0]|0)!=95){d=a;break}Na=o+1|0;d=ul(Na,b,c)|0;if((d|0)==(Na|0)){d=a;break}n=c+4|0;e=k[n>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break}l=e+-12|0;g=i[l>>0]|0;if(!(g&1)){h=(g&255)>>>1;g=l+1|0}else{h=k[e+-8>>2]|0;g=k[e+-4>>2]|0}Ol(Ka,g,h>>>0<2?h:2);g=i[Ka>>0]|0;if(!(g&1)){g=(g&255)>>>1;e=Ka+1|0}else{g=k[Ka+4>>2]|0;e=k[Ka+8>>2]|0}b=g>>>0>2;Na=(Mm(e,58224,b?2:g)|0)!=0|g>>>0<2;tl(Ka);if(!(Na|b))Pl((k[n>>2]|0)+-12|0);n=(k[n>>2]|0)+-12|0;h=o-f|0;if(h>>>0>4294967279)ql(va);if(h>>>0<11){i[va>>0]=h<<1;g=va+1|0}else{b=h+16&-16;g=xm(b)|0;k[va+8>>2]=g;k[va>>2]=b|1;k[va+4>>2]=h}if((f|0)!=(o|0)){e=a;l=g;while(1){i[l>>0]=i[f>>0]|0;e=e+2|0;if((e|0)==(o|0))break;else{b=f;f=e;l=l+1|0;e=b}}g=g+h|0}i[g>>0]=0;g=rl(va,0,58224)|0;k[ra+0>>2]=k[g+0>>2];k[ra+4>>2]=k[g+4>>2];k[ra+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(ra,58360)|0;k[qa+0>>2]=k[g+0>>2];k[qa+4>>2]=k[g+4>>2];k[qa+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[qa>>0]|0;if(!(g&1)){e=qa+1|0;g=(g&255)>>>1}else{e=k[qa+8>>2]|0;g=k[qa+4>>2]|0}Dl(n,0,e,g)|0;tl(qa);tl(ra);tl(va);break}d=Ql(f,b,c)|0;if(((!((d|0)==(f|0)|(d|0)==(b|0))?(i[d>>0]|0)==95:0)?(Na=d+1|0,ja=ul(Na,b,c)|0,(ja|0)!=(Na|0)):0)?(W=c+4|0,A=k[W>>2]|0,((A-(k[c>>2]|0)|0)/24|0)>>>0>=2):0){q=A+-24|0;k[Ga+0>>2]=k[q+0>>2];k[Ga+4>>2]=k[q+4>>2];k[Ga+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;q=Ga+12|0;d=A+-12|0;k[q+0>>2]=k[d+0>>2];k[q+4>>2]=k[d+4>>2];k[q+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[W>>2]|0;g=d+-24|0;e=d;do{b=e+-24|0;k[W>>2]=b;hl(b);e=k[W>>2]|0}while((e|0)!=(g|0));p=d+-48|0;k[Ia+0>>2]=k[p+0>>2];k[Ia+4>>2]=k[p+4>>2];k[Ia+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;p=Ia+12|0;d=d+-36|0;k[p+0>>2]=k[d+0>>2];k[p+4>>2]=k[d+4>>2];k[p+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[W>>2]|0;p=d+-24|0;do if(i[p>>0]&1){m=d+-16|0;i[k[m>>2]>>0]=0;o=d+-20|0;k[o>>2]=0;d=i[p>>0]|0;if(!(d&1))f=10;else{f=k[p>>2]|0;d=f&255;f=(f&-2)+-1|0}if(!(d&1)){n=(d&255)>>>1;if((d&255)<22){h=1;e=10;l=n}else{h=1;e=(n+16&240)+-1|0;l=n}}else{h=0;e=10;l=0}if((e|0)!=(f|0)){if((e|0)==10){g=p+1|0;n=k[m>>2]|0;if(h){_m(g|0,n|0,((d&255)>>>1)+1|0)|0;ym(n)}else{i[g>>0]=i[n>>0]|0;ym(n)}i[p>>0]=l<<1;break}n=e+1|0;g=xm(n)|0;if(e>>>0<=f>>>0&(g|0)==0)break;if(h)_m(g|0,p+1|0,((d&255)>>>1)+1|0)|0;else{b=k[m>>2]|0;i[g>>0]=i[b>>0]|0;ym(b)}k[p>>2]=n|1;k[o>>2]=l;k[m>>2]=g}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[Ga+0>>2];k[p+4>>2]=k[Ga+4>>2];k[p+8>>2]=k[Ga+8>>2];k[Ga+0>>2]=0;k[Ga+4>>2]=0;k[Ga+8>>2]=0;d=i[q>>0]|0;if(!(d&1)){d=(d&255)>>>1;g=q+1|0}else{d=k[Ga+16>>2]|0;g=k[Ga+20>>2]|0}Ol(wa,g,d>>>0<2?d:2);d=i[wa>>0]|0;if(!(d&1)){d=(d&255)>>>1;g=wa+1|0}else{d=k[wa+4>>2]|0;g=k[wa+8>>2]|0}b=d>>>0>2;Na=(Mm(g,58224,b?2:d)|0)!=0|d>>>0<2;tl(wa);if(!(Na|b))Pl(q);e=k[W>>2]|0;p=e+-12|0;Al(sa,Ia);d=rl(sa,0,58224)|0;k[Da+0>>2]=k[d+0>>2];k[Da+4>>2]=k[d+4>>2];k[Da+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=sl(Da,58360)|0;k[za+0>>2]=k[d+0>>2];k[za+4>>2]=k[d+4>>2];k[za+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=i[q>>0]|0;if(!(d&1)){g=q+1|0;d=(d&255)>>>1}else{g=k[Ga+20>>2]|0;d=k[Ga+16>>2]|0}b=jl(za,g,d)|0;k[Fa+0>>2]=k[b+0>>2];k[Fa+4>>2]=k[b+4>>2];k[Fa+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;do if(!(i[p>>0]&1)){i[p+1>>0]=0;i[p>>0]=0}else{m=e+-4|0;i[k[m>>2]>>0]=0;l=e+-8|0;k[l>>2]=0;d=i[p>>0]|0;if(!(d&1))o=10;else{o=k[p>>2]|0;d=o&255;o=(o&-2)+-1|0}do if(!(d&1)){n=(d&255)>>>1;if((d&255)<22){h=1;f=10;break}h=1;f=(n+16&240)+-1|0}else{h=0;f=10;n=0}while(0);if((f|0)==(o|0))break;if((f|0)==10){e=p+1|0;g=k[m>>2]|0;if(h){_m(e|0,g|0,((d&255)>>>1)+1|0)|0;ym(g)}else{i[e>>0]=i[g>>0]|0;ym(g)}i[p>>0]=n<<1;break}g=f+1|0;e=xm(g)|0;if(f>>>0<=o>>>0&(e|0)==0)break;if(h)_m(e|0,p+1|0,((d&255)>>>1)+1|0)|0;else{b=k[m>>2]|0;i[e>>0]=i[b>>0]|0;ym(b)}k[p>>2]=g|1;k[l>>2]=n;k[m>>2]=e}while(0);k[p+0>>2]=k[Fa+0>>2];k[p+4>>2]=k[Fa+4>>2];k[p+8>>2]=k[Fa+8>>2];k[Fa+0>>2]=0;k[Fa+4>>2]=0;k[Fa+8>>2]=0;tl(Fa);tl(za);tl(Da);tl(sa);hl(Ia);hl(Ga);d=ja}else d=a}else d=a;while(0);if((d|0)==(a|0)){d=a;break a}e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}m=c+16|0;k[Ca>>2]=k[c+12>>2];Rl(Ha,e+-24|0,Ca);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[Ha+12>>2];k[e>>2]=k[Ha>>2];Oa=Ha+4|0;k[e+4>>2]=k[Oa>>2];a=Ha+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[Ha>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[Ha+12>>2];k[f>>2]=k[Ha>>2];a=Ha+4|0;k[f+4>>2]=k[a>>2];b=Ha+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[Ha>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(Ha);break a}case 67:{Na=a+1|0;d=ul(Na,b,c)|0;if((d|0)==(Na|0)){d=a;break a}f=c+4|0;e=k[f>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}sl(e+-24|0,58192)|0;m=c+16|0;f=(k[f>>2]|0)+-24|0;k[C>>2]=k[c+12>>2];Rl(M,f,C);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[M+12>>2];k[e>>2]=k[M>>2];Oa=M+4|0;k[e+4>>2]=k[Oa>>2];a=M+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[M>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[M+12>>2];k[f>>2]=k[M>>2];a=M+4|0;k[f+4>>2]=k[a>>2];b=M+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[M>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(M);break a}case 70:{if(g<<24>>24!=70){d=a;break a}d=a+1|0;if((d|0)==(b|0)){d=a;break a}if((i[d>>0]|0)==89){d=a+2|0;if((d|0)==(b|0)){d=a;break a}}e=ul(d,b,c)|0;if((e|0)==(d|0)){d=a;break a}Ol(Oa,58248,1);t=c+4|0;c:do if((e|0)!=(b|0)){m=Ka+1|0;p=Ka+8|0;q=Ka+4|0;s=Oa+4|0;g=0;d=e;d:while(1){while(1){e=i[d>>0]|0;if(e<<24>>24==118)d=d+1|0;else if(e<<24>>24==82){e=d+1|0;if((e|0)!=(b|0)?(i[e>>0]|0)==69:0){g=1;d=e;break}else Ja=197}else if(e<<24>>24==79){e=d+1|0;if((e|0)!=(b|0)?(i[e>>0]|0)==69:0){g=2;d=e;break}else Ja=197}else if(e<<24>>24==69)break d;else Ja=197;if((Ja|0)==197){Ja=0;e=((k[t>>2]|0)-(k[c>>2]|0)|0)/24|0;l=ul(d,b,c)|0;h=((k[t>>2]|0)-(k[c>>2]|0)|0)/24|0;if((l|0)==(d|0)|(l|0)==(b|0))break c;f=e>>>0>>0;if(f){o=e;do{d=i[Oa>>0]|0;if(!(d&1))d=(d&255)>>>1;else d=k[s>>2]|0;if(d>>>0>1)sl(Oa,58736)|0;Al(Ka,(k[c>>2]|0)+(o*24|0)|0);d=i[Ka>>0]|0;if(!(d&1)){n=m;d=(d&255)>>>1}else{n=k[p>>2]|0;d=k[q>>2]|0}jl(Oa,n,d)|0;tl(Ka);o=o+1|0}while(o>>>0>>0);if(f){n=k[t>>2]|0;do{d=n;n=n+-24|0;do{Na=d+-24|0;k[t>>2]=Na;hl(Na);d=k[t>>2]|0}while((d|0)!=(n|0));e=e+1|0}while((e|0)!=(h|0));d=l}else d=l}else d=l}if((d|0)==(b|0)){Ja=187;break c}}if((d|0)==(b|0)){Ja=187;break c}}d=d+1|0;sl(Oa,58240)|0;if((g|0)==2)sl(Oa,60568)|0;else if((g|0)==1)sl(Oa,60560)|0;g=k[t>>2]|0;if((k[c>>2]|0)!=(g|0)){sl(g+-24|0,58320)|0;g=i[Oa>>0]|0;if(!(g&1)){f=Oa+1|0;e=(g&255)>>>1}else{f=k[Oa+8>>2]|0;e=k[s>>2]|0}Dl((k[t>>2]|0)+-12|0,0,f,e)|0;tl(Oa);if((d|0)==(a|0)){d=a;break a}e=k[t>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}m=c+16|0;k[ba>>2]=k[c+12>>2];Rl(pa,e+-24|0,ba);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[pa+12>>2];k[e>>2]=k[pa>>2];Oa=pa+4|0;k[e+4>>2]=k[Oa>>2];a=pa+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[pa>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[pa+12>>2];k[f>>2]=k[pa>>2];a=pa+4|0;k[f+4>>2]=k[a>>2];b=pa+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[pa>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(pa);break a}}else Ja=187;while(0);if((Ja|0)==187){e=k[t>>2]|0;d=e+-24|0;do{b=e+-24|0;k[t>>2]=b;hl(b);e=k[t>>2]|0}while((e|0)!=(d|0))}tl(Oa);d=a;break a}case 71:{Na=a+1|0;d=ul(Na,b,c)|0;if((d|0)==(Na|0)){d=a;break a}f=c+4|0;e=k[f>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}sl(e+-24|0,58208)|0;m=c+16|0;f=(k[f>>2]|0)+-24|0;k[D>>2]=k[c+12>>2];Rl(N,f,D);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[N+12>>2];k[e>>2]=k[N>>2];Oa=N+4|0;k[e+4>>2]=k[Oa>>2];a=N+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[N>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[N+12>>2];k[f>>2]=k[N>>2];a=N+4|0;k[f+4>>2]=k[a>>2];b=N+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[N>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(N);break a}case 77:{if(((g<<24>>24==77?(Na=a+1|0,y=ul(Na,b,c)|0,(y|0)!=(Na|0)):0)?(xa=ul(y,b,c)|0,(xa|0)!=(y|0)):0)?(da=c+4|0,z=k[da>>2]|0,((z-(k[c>>2]|0)|0)/24|0)>>>0>=2):0){q=z+-24|0;k[Oa+0>>2]=k[q+0>>2];k[Oa+4>>2]=k[q+4>>2];k[Oa+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;q=Oa+12|0;d=z+-12|0;k[q+0>>2]=k[d+0>>2];k[q+4>>2]=k[d+4>>2];k[q+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=k[da>>2]|0;n=d+-24|0;g=d;do{b=g+-24|0;k[da>>2]=b;hl(b);g=k[da>>2]|0}while((g|0)!=(n|0));b=d+-48|0;k[Ka+0>>2]=k[b+0>>2];k[Ka+4>>2]=k[b+4>>2];k[Ka+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=Ka+12|0;d=d+-36|0;k[b+0>>2]=k[d+0>>2];k[b+4>>2]=k[d+4>>2];k[b+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=j[q>>1]|0;if(!(d&1))d=(d&65535)>>>8&255;else d=i[k[Oa+20>>2]>>0]|0;n=k[da>>2]|0;p=n+-24|0;if(d<<24>>24==40){d=sl(Oa,58248)|0;k[va+0>>2]=k[d+0>>2];k[va+4>>2]=k[d+4>>2];k[va+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;Al(Ga,Ka);d=i[Ga>>0]|0;if(!(d&1)){g=Ga+1|0;d=(d&255)>>>1}else{g=k[Ga+8>>2]|0;d=k[Ga+4>>2]|0}b=jl(va,g,d)|0;k[ra+0>>2]=k[b+0>>2];k[ra+4>>2]=k[b+4>>2];k[ra+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=sl(ra,60552)|0;k[qa+0>>2]=k[b+0>>2];k[qa+4>>2]=k[b+4>>2];k[qa+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;do if(i[p>>0]&1){m=n+-16|0;i[k[m>>2]>>0]=0;o=n+-20|0;k[o>>2]=0;d=i[p>>0]|0;if(!(d&1))f=10;else{f=k[p>>2]|0;d=f&255;f=(f&-2)+-1|0}if(!(d&1)){n=(d&255)>>>1;if((d&255)<22){h=1;e=10;l=n}else{h=1;e=(n+16&240)+-1|0;l=n}}else{h=0;e=10;l=0}if((e|0)!=(f|0)){if((e|0)==10){g=p+1|0;n=k[m>>2]|0;if(h){_m(g|0,n|0,((d&255)>>>1)+1|0)|0;ym(n)}else{i[g>>0]=i[n>>0]|0;ym(n)}i[p>>0]=l<<1;break}n=e+1|0;g=xm(n)|0;if(e>>>0<=f>>>0&(g|0)==0)break;if(h)_m(g|0,p+1|0,((d&255)>>>1)+1|0)|0;else{b=k[m>>2]|0;i[g>>0]=i[b>>0]|0;ym(b)}k[p>>2]=n|1;k[o>>2]=l;k[m>>2]=g}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[qa+0>>2];k[p+4>>2]=k[qa+4>>2];k[p+8>>2]=k[qa+8>>2];k[qa+0>>2]=0;k[qa+4>>2]=0;k[qa+8>>2]=0;tl(qa);tl(ra);tl(Ga);tl(va);d=k[da>>2]|0;p=rl(q,0,58240)|0;k[Ia+0>>2]=k[p+0>>2];k[Ia+4>>2]=k[p+4>>2];k[Ia+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;p=d+-12|0;do if(i[p>>0]&1){o=d+-4|0;i[k[o>>2]>>0]=0;n=d+-8|0;k[n>>2]=0;d=i[p>>0]|0;if(!(d&1))l=10;else{l=k[p>>2]|0;d=l&255;l=(l&-2)+-1|0}do if(!(d&1)){g=(d&255)>>>1;if((d&255)<22){m=1;f=10;h=g;break}m=1;f=(g+16&240)+-1|0;h=g}else{m=0;f=10;h=0}while(0);if((f|0)!=(l|0)){if((f|0)==10){e=p+1|0;g=k[o>>2]|0;if(m){_m(e|0,g|0,((d&255)>>>1)+1|0)|0;ym(g)}else{i[e>>0]=i[g>>0]|0;ym(g)}i[p>>0]=h<<1;break}g=f+1|0;e=xm(g)|0;if(f>>>0<=l>>>0&(e|0)==0)break;if(m)_m(e|0,p+1|0,((d&255)>>>1)+1|0)|0;else{b=k[o>>2]|0;i[e>>0]=i[b>>0]|0;ym(b)}k[p>>2]=g|1;k[n>>2]=h;k[o>>2]=e}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[Ia+0>>2];k[p+4>>2]=k[Ia+4>>2];k[p+8>>2]=k[Ia+8>>2];k[Ia+0>>2]=0;k[Ia+4>>2]=0;k[Ia+8>>2]=0;tl(Ia)}else{d=sl(Oa,58320)|0;k[za+0>>2]=k[d+0>>2];k[za+4>>2]=k[d+4>>2];k[za+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;Al(Da,Ka);d=i[Da>>0]|0;if(!(d&1)){g=Da+1|0;d=(d&255)>>>1}else{g=k[Da+8>>2]|0;d=k[Da+4>>2]|0}b=jl(za,g,d)|0;k[Fa+0>>2]=k[b+0>>2];k[Fa+4>>2]=k[b+4>>2];k[Fa+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=sl(Fa,60552)|0;k[wa+0>>2]=k[b+0>>2];k[wa+4>>2]=k[b+4>>2];k[wa+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;do if(i[p>>0]&1){m=n+-16|0;i[k[m>>2]>>0]=0;h=n+-20|0;k[h>>2]=0;d=i[p>>0]|0;if(!(d&1))o=10;else{d=k[p>>2]|0;o=(d&-2)+-1|0;d=d&255}if(!(d&1)){n=(d&255)>>>1;if((d&255)<22){f=10;l=1}else{f=(n+16&240)+-1|0;l=1}}else{f=10;n=0;l=0}if((f|0)!=(o|0)){if((f|0)==10){e=p+1|0;g=k[m>>2]|0;if(l){_m(e|0,g|0,((d&255)>>>1)+1|0)|0;ym(g)}else{i[e>>0]=i[g>>0]|0;ym(g)}i[p>>0]=n<<1;break}g=f+1|0;e=xm(g)|0;if(f>>>0<=o>>>0&(e|0)==0)break;if(l)_m(e|0,p+1|0,((d&255)>>>1)+1|0)|0;else{b=k[m>>2]|0;i[e>>0]=i[b>>0]|0;ym(b)}k[p>>2]=g|1;k[h>>2]=n;k[m>>2]=e}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[wa+0>>2];k[p+4>>2]=k[wa+4>>2];k[p+8>>2]=k[wa+8>>2];k[wa+0>>2]=0;k[wa+4>>2]=0;k[wa+8>>2]=0;tl(wa);tl(Fa);tl(Da);tl(za);d=k[da>>2]|0;p=d+-12|0;do if(i[p>>0]&1){o=d+-4|0;i[k[o>>2]>>0]=0;h=d+-8|0;k[h>>2]=0;d=i[p>>0]|0;if(!(d&1))l=10;else{l=k[p>>2]|0;d=l&255;l=(l&-2)+-1|0}do if(!(d&1)){g=(d&255)>>>1;if((d&255)<22){f=10;m=g;n=1;break}f=(g+16&240)+-1|0;m=g;n=1}else{f=10;m=0;n=0}while(0);if((f|0)!=(l|0)){if((f|0)==10){e=p+1|0;g=k[o>>2]|0;if(n){_m(e|0,g|0,((d&255)>>>1)+1|0)|0;ym(g)}else{i[e>>0]=i[g>>0]|0;ym(g)}i[p>>0]=m<<1;break}g=f+1|0;e=xm(g)|0;if(f>>>0<=l>>>0&(e|0)==0)break;if(n)_m(e|0,p+1|0,((d&255)>>>1)+1|0)|0;else{b=k[o>>2]|0;i[e>>0]=i[b>>0]|0;ym(b)}k[p>>2]=g|1;k[h>>2]=m;k[o>>2]=e}}else{i[p+1>>0]=0;i[p>>0]=0}while(0);k[p+0>>2]=k[q+0>>2];k[p+4>>2]=k[q+4>>2];k[p+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0}hl(Ka);hl(Oa);d=xa}else d=a;if((d|0)==(a|0)){d=a;break a}e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}m=c+16|0;k[ya>>2]=k[c+12>>2];Rl(Ea,e+-24|0,ya);f=c+20|0;e=k[f>>2]|0;h=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[Ea+12>>2];k[e>>2]=k[Ea>>2];Oa=Ea+4|0;k[e+4>>2]=k[Oa>>2];a=Ea+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[Ea>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{f=k[m>>2]|0;l=e-f>>4;g=l+1|0;if((g|0)<0)Fl(m);e=h-f|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?g:e}else e=2147483647;Gl(Oa,e,l,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[Ea+12>>2];k[f>>2]=k[Ea>>2];a=Ea+4|0;k[f+4>>2]=k[a>>2];b=Ea+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[Ea>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(Ea);break a}case 82:{u=c+4|0;m=((k[u>>2]|0)-(k[c>>2]|0)|0)/24|0;Ka=a+1|0;d=ul(Ka,b,c)|0;u=((k[u>>2]|0)-(k[c>>2]|0)|0)/24|0;if((d|0)==(Ka|0)){d=a;break a}n=c+16|0;o=k[c+12>>2]|0;v=c+20|0;g=k[v>>2]|0;e=k[c+24>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=o;g=k[v>>2]|0}k[v>>2]=g+16}else{f=k[n>>2]|0;h=g-f>>4;l=h+1|0;if((l|0)<0)Fl(n);g=e-f|0;if(g>>4>>>0<1073741823){g=g>>3;g=g>>>0>>0?l:g}else g=2147483647;Gl(Oa,g,h,c+28|0);g=Oa+8|0;e=k[g>>2]|0;if(e){k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=o}k[g>>2]=e+16;Hl(n,Oa);Il(Oa)}if(m>>>0>=u>>>0)break a;p=ia+1|0;q=Oa+8|0;s=ia+8|0;t=ia+4|0;while(1){e=k[c>>2]|0;f=e+(m*24|0)+12|0;g=i[f>>0]|0;if(!(g&1)){l=(g&255)>>>1;g=f+1|0}else{l=k[e+(m*24|0)+16>>2]|0;g=k[e+(m*24|0)+20>>2]|0}Ol(ia,g,l>>>0<2?l:2);g=i[ia>>0]|0;if(!(g&1)){g=(g&255)>>>1;e=p}else{g=k[t>>2]|0;e=k[s>>2]|0}Ka=g>>>0>2;Ia=(Mm(e,58224,Ka?2:g)|0)!=0|g>>>0<2;tl(ia);e=k[c>>2]|0;if(Ia|Ka){g=e+(m*24|0)+12|0;if(!(i[g>>0]&1))g=g+1|0;else g=k[e+(m*24|0)+20>>2]|0;if((i[g>>0]|0)==40){sl(e+(m*24|0)|0,58248)|0;rl((k[c>>2]|0)+(m*24|0)+12|0,0,58240)|0}}else{sl(e+(m*24|0)|0,58232)|0;rl((k[c>>2]|0)+(m*24|0)+12|0,0,58240)|0}sl((k[c>>2]|0)+(m*24|0)|0,58296)|0;f=k[v>>2]|0;o=f+-16|0;l=k[c>>2]|0;h=l+(m*24|0)|0;e=f+-12|0;n=k[e>>2]|0;if((n|0)==(k[f+-8>>2]|0)){g=(n-(k[o>>2]|0)|0)/24|0;n=g+1|0;if((n|0)<0){d=o;break}if(g>>>0<1073741823){Ka=g<<1;n=Ka>>>0>>0?n:Ka}else n=2147483647;Kl(Oa,n,g,f+-4|0);g=k[q>>2]|0;if(g){Jl(g,h);Jl(g+12|0,l+(m*24|0)+12|0)}k[q>>2]=g+24;Ml(o,Oa);Ll(Oa)}else{if(!n)g=0;else{Jl(n,h);Jl(n+12|0,l+(m*24|0)+12|0);g=k[e>>2]|0}k[e>>2]=g+24}m=m+1|0;if(m>>>0>=u>>>0)break a}Fl(d);break}case 84:{t=c+4|0;m=((k[t>>2]|0)-(k[c>>2]|0)|0)/24|0;q=Sl(a,b,c)|0;p=((k[t>>2]|0)-(k[c>>2]|0)|0)/24|0;if((q|0)==(a|0)){d=a;break a}w=c+16|0;s=c+12|0;o=k[s>>2]|0;v=c+20|0;d=k[v>>2]|0;u=c+24|0;g=k[u>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;k[d+12>>2]=o;d=k[v>>2]|0}k[v>>2]=d+16}else{e=k[w>>2]|0;n=d-e>>4;f=n+1|0;if((f|0)<0)Fl(w);d=g-e|0;if(d>>4>>>0<1073741823){d=d>>3;d=d>>>0>>0?f:d}else d=2147483647;Gl(Oa,d,n,c+28|0);d=Oa+8|0;g=k[d>>2]|0;if(g){k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=o}k[d>>2]=g+16;Hl(w,Oa);Il(Oa)}e:do if(m>>>0

>>0){l=Oa+8|0;h=m;while(1){e=k[v>>2]|0;d=e+-16|0;f=k[c>>2]|0;o=f+(h*24|0)|0;g=e+-12|0;n=k[g>>2]|0;if((n|0)==(k[e+-8>>2]|0)){g=(n-(k[d>>2]|0)|0)/24|0;n=g+1|0;if((n|0)<0)break;if(g>>>0<1073741823){a=g<<1;n=a>>>0>>0?n:a}else n=2147483647;Kl(Oa,n,g,e+-4|0);g=k[l>>2]|0;if(g){Jl(g,o);Jl(g+12|0,f+(h*24|0)+12|0)}k[l>>2]=g+24;Ml(d,Oa);Ll(Oa)}else{if(!n)d=0;else{Jl(n,o);Jl(n+12|0,f+(h*24|0)+12|0);d=k[g>>2]|0}k[g>>2]=d+24}h=h+1|0;if(h>>>0>=p>>>0)break e}Fl(d)}while(0);if(!((i[c+63>>0]|0)!=0&(p|0)==(m+1|0))){d=q;break a}d=Tl(q,b,c)|0;if((d|0)==(q|0)){d=q;break a}Al(oa,(k[t>>2]|0)+-24|0);f=k[t>>2]|0;g=f+-24|0;e=f;do{a=e+-24|0;k[t>>2]=a;hl(a);e=k[t>>2]|0}while((e|0)!=(g|0));g=i[oa>>0]|0;if(!(g&1)){e=oa+1|0;g=(g&255)>>>1}else{e=k[oa+8>>2]|0;g=k[oa+4>>2]|0}jl(f+-48|0,e,g)|0;g=(k[t>>2]|0)+-24|0;k[ca>>2]=k[s>>2];Rl(na,g,ca);g=k[v>>2]|0;f=k[u>>2]|0;if(g>>>0>>0){if(!g)e=0;else{k[g+12>>2]=k[na+12>>2];k[g>>2]=k[na>>2];e=na+4|0;k[g+4>>2]=k[e>>2];Oa=na+8|0;k[g+8>>2]=k[Oa>>2];k[Oa>>2]=0;k[e>>2]=0;k[na>>2]=0;e=k[v>>2]|0}k[v>>2]=e+16}else{e=k[w>>2]|0;l=g-e>>4;g=l+1|0;if((g|0)<0)Fl(w);e=f-e|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?g:e}else e=2147483647;Gl(Oa,e,l,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[na+12>>2];k[f>>2]=k[na>>2];a=na+4|0;k[f+4>>2]=k[a>>2];b=na+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[na>>2]=0}k[e>>2]=f+16;Hl(w,Oa);Il(Oa)}il(na);tl(oa);break a}case 85:{d=a+1|0;if((d|0)==(b|0)){d=a;break a}n=Ul(d,b,c)|0;if((n|0)==(d|0)){d=a;break a}d=ul(n,b,c)|0;if((d|0)==(n|0)){d=a;break a}o=c+4|0;n=k[o>>2]|0;if(((n-(k[c>>2]|0)|0)/24|0)>>>0<2){d=a;break a}Al(ua,n+-24|0);f=k[o>>2]|0;n=f+-24|0;g=f;do{a=g+-24|0;k[o>>2]=a;hl(a);g=k[o>>2]|0}while((g|0)!=(n|0));g=f+-48|0;n=i[g>>0]|0;if(!(n&1)){e=(n&255)>>>1;n=g+1|0}else{e=k[f+-44>>2]|0;n=k[f+-40>>2]|0}Ol(P,n,e>>>0<9?e:9);n=i[P>>0]|0;if(!(n&1)){g=(n&255)>>>1;n=P+1|0}else{g=k[P+4>>2]|0;n=k[P+8>>2]|0}e=g>>>0>9;n=Mm(n,58304,e?9:g)|0;if(!n)n=g>>>0<9?-1:e&1;tl(P);f=(k[o>>2]|0)+-24|0;if(!n){Al(ka,f);e=k[o>>2]|0;g=e+-24|0;do{a=e+-24|0;k[o>>2]=a;hl(a);e=k[o>>2]|0}while((e|0)!=(g|0));g=i[ka>>0]|0;if(!(g&1)){e=ka+1|0;f=ka+1|0;g=(g&255)>>>1}else{f=k[ka+8>>2]|0;e=f;g=k[ka+4>>2]|0}g=Ul(e+9|0,f+g|0,c)|0;if(!(i[ka>>0]&1))e=ka+1|0;else e=k[ka+8>>2]|0;if((g|0)==(e+9|0)){Vl(ga,ua,58320);g=i[ka>>0]|0;if(!(g&1)){e=ka+1|0;g=(g&255)>>>1}else{e=k[ka+8>>2]|0;g=k[ka+4>>2]|0}n=jl(ga,e,g)|0;k[fa+0>>2]=k[n+0>>2];k[fa+4>>2]=k[n+4>>2];k[fa+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;k[ea+0>>2]=k[fa+0>>2];k[ea+4>>2]=k[fa+4>>2];k[ea+8>>2]=k[fa+8>>2];k[fa+0>>2]=0;k[fa+4>>2]=0;k[fa+8>>2]=0;n=ea+12|0;k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;g=k[o>>2]|0;e=k[c+8>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g+0>>2]=k[ea+0>>2];k[g+4>>2]=k[ea+4>>2];k[g+8>>2]=k[ea+8>>2];k[ea+0>>2]=0;k[ea+4>>2]=0;k[ea+8>>2]=0;g=g+12|0;k[g+0>>2]=k[n+0>>2];k[g+4>>2]=k[n+4>>2];k[g+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;g=k[o>>2]|0}k[o>>2]=g+24}else{f=k[c>>2]|0;h=(g-f|0)/24|0;l=h+1|0;if((l|0)<0)Fl(c);g=(e-f|0)/24|0;if(g>>>0<1073741823){g=g<<1;g=g>>>0>>0?l:g}else g=2147483647;Kl(Oa,g,h,c+12|0);g=Oa+8|0;e=k[g>>2]|0;if(e){k[e+0>>2]=k[ea+0>>2];k[e+4>>2]=k[ea+4>>2];k[e+8>>2]=k[ea+8>>2];k[ea+0>>2]=0;k[ea+4>>2]=0;k[ea+8>>2]=0;a=e+12|0;k[a+0>>2]=k[n+0>>2];k[a+4>>2]=k[n+4>>2];k[a+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0}k[g>>2]=e+24;Ml(c,Oa);Ll(Oa)}hl(ea);tl(fa);tl(ga)}else{e=(k[o>>2]|0)+-24|0;Vl(_,ua,58328);Al($,(k[o>>2]|0)+-24|0);g=i[$>>0]|0;if(!(g&1)){f=$+1|0;g=(g&255)>>>1}else{f=k[$+8>>2]|0;g=k[$+4>>2]|0}a=jl(_,f,g)|0;k[Z+0>>2]=k[a+0>>2];k[Z+4>>2]=k[a+4>>2];k[Z+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=sl(Z,58336)|0;k[Y+0>>2]=k[a+0>>2];k[Y+4>>2]=k[a+4>>2];k[Y+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[X+0>>2]=k[Y+0>>2];k[X+4>>2]=k[Y+4>>2];k[X+8>>2]=k[Y+8>>2];k[Y+0>>2]=0;k[Y+4>>2]=0;k[Y+8>>2]=0;a=X+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(e,X);hl(X);tl(Y);tl(Z);tl($);tl(_)}tl(ka)}else{Vl(S,ua,58320);Al(T,(k[o>>2]|0)+-24|0);g=i[T>>0]|0;if(!(g&1)){e=T+1|0;g=(g&255)>>>1}else{e=k[T+8>>2]|0;g=k[T+4>>2]|0}a=jl(S,e,g)|0;k[R+0>>2]=k[a+0>>2];k[R+4>>2]=k[a+4>>2];k[R+8>>2]=k[a+8>>2];k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[Q+0>>2]=k[R+0>>2];k[Q+4>>2]=k[R+4>>2];k[Q+8>>2]=k[R+8>>2];k[R+0>>2]=0;k[R+4>>2]=0;k[R+8>>2]=0;a=Q+12|0;k[a+0>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;Wl(f,Q);hl(Q);tl(R);tl(T);tl(S)}m=(k[o>>2]|0)+-24|0;k[la>>2]=k[c+12>>2];Rl(ta,m,la);m=c+16|0;g=c+20|0;e=k[g>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[ta+12>>2];k[e>>2]=k[ta>>2];Oa=ta+4|0;k[e+4>>2]=k[Oa>>2];a=ta+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[ta>>2]=0;e=k[g>>2]|0}k[g>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[ta+12>>2];k[f>>2]=k[ta>>2];a=ta+4|0;k[f+4>>2]=k[a>>2];b=ta+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[ta>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(ta);tl(ua);break a}case 83:{Na=a+1|0;if((Na|0)!=(b|0)?(i[Na>>0]|0)==116:0){d=Bl(a,b,c)|0;if((d|0)==(a|0)){d=a;break a}e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}m=c+16|0;k[B>>2]=k[c+12>>2];Rl(L,e+-24|0,B);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[L+12>>2];k[e>>2]=k[L>>2];Oa=L+4|0;k[e+4>>2]=k[Oa>>2];a=L+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[L>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[L+12>>2];k[f>>2]=k[L>>2];a=L+4|0;k[f+4>>2]=k[a>>2];b=L+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[L>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(L);break a}d=Xl(a,b,c)|0;if((d|0)==(a|0)){d=a;break a}n=Tl(d,b,c)|0;if((n|0)==(d|0))break a;f=c+4|0;e=k[f>>2]|0;if(((e-(k[c>>2]|0)|0)/24|0)>>>0<2)break a;Al(V,e+-24|0);e=k[f>>2]|0;d=e+-24|0;g=e;do{a=g+-24|0;k[f>>2]=a;hl(a);g=k[f>>2]|0}while((g|0)!=(d|0));d=i[V>>0]|0;if(!(d&1)){g=V+1|0;d=(d&255)>>>1}else{g=k[V+8>>2]|0;d=k[V+4>>2]|0}jl(e+-48|0,g,d)|0;h=(k[f>>2]|0)+-24|0;k[J>>2]=k[c+12>>2];Rl(U,h,J);h=c+16|0;g=c+20|0;d=k[g>>2]|0;f=k[c+24>>2]|0;if(d>>>0>>0){if(!d)d=0;else{k[d+12>>2]=k[U+12>>2];k[d>>2]=k[U>>2];Oa=U+4|0;k[d+4>>2]=k[Oa>>2];a=U+8|0;k[d+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[U>>2]=0;d=k[g>>2]|0}k[g>>2]=d+16}else{g=k[h>>2]|0;l=d-g>>4;e=l+1|0;if((e|0)<0)Fl(h);d=f-g|0;if(d>>4>>>0<1073741823){d=d>>3;d=d>>>0>>0?e:d}else d=2147483647;Gl(Oa,d,l,c+28|0);d=Oa+8|0;e=k[d>>2]|0;if(e){k[e+12>>2]=k[U+12>>2];k[e>>2]=k[U>>2];a=U+4|0;k[e+4>>2]=k[a>>2];b=U+8|0;k[e+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[U>>2]=0}k[d>>2]=e+16;Hl(h,Oa);Il(Oa)}il(U);tl(V);d=n;break a}case 68:{d=a+1|0;if((d|0)!=(b|0)){d=i[d>>0]|0;n=d<<24>>24;if((n|0)==112){q=c+4|0;m=((k[q>>2]|0)-(k[c>>2]|0)|0)/24|0;Ka=a+2|0;d=ul(Ka,b,c)|0;q=((k[q>>2]|0)-(k[c>>2]|0)|0)/24|0;if((d|0)==(Ka|0))break b;n=c+16|0;o=k[c+12>>2]|0;s=c+20|0;g=k[s>>2]|0;e=k[c+24>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=o;g=k[s>>2]|0}k[s>>2]=g+16}else{f=k[n>>2]|0;h=g-f>>4;l=h+1|0;if((l|0)<0)Fl(n);g=e-f|0;if(g>>4>>>0<1073741823){g=g>>3;g=g>>>0>>0?l:g}else g=2147483647;Gl(Oa,g,h,c+28|0);g=Oa+8|0;e=k[g>>2]|0;if(e){k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=o}k[g>>2]=e+16;Hl(n,Oa);Il(Oa)}if(m>>>0>=q>>>0)break a;p=Oa+8|0;h=m;while(1){n=k[s>>2]|0;f=n+-16|0;o=k[c>>2]|0;l=o+(h*24|0)|0;e=n+-12|0;g=k[e>>2]|0;if((g|0)==(k[n+-8>>2]|0)){e=(g-(k[f>>2]|0)|0)/24|0;g=e+1|0;if((g|0)<0){d=f;break}if(e>>>0<1073741823){Ka=e<<1;g=Ka>>>0>>0?g:Ka}else g=2147483647;Kl(Oa,g,e,n+-4|0);g=k[p>>2]|0;if(g){Jl(g,l);Jl(g+12|0,o+(h*24|0)+12|0)}k[p>>2]=g+24;Ml(f,Oa);Ll(Oa)}else{if(!g)g=0;else{Jl(g,l);Jl(g+12|0,o+(h*24|0)+12|0);g=k[e>>2]|0}k[e>>2]=g+24}h=h+1|0;if(h>>>0>=q>>>0)break a}Fl(d)}else if((n|0)==84|(n|0)==116){d=Yl(a,b,c)|0;if((d|0)==(a|0))break b;e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}m=c+16|0;k[E>>2]=k[c+12>>2];Rl(O,e+-24|0,E);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[O+12>>2];k[e>>2]=k[O>>2];Oa=O+4|0;k[e+4>>2]=k[Oa>>2];a=O+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[O>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[O+12>>2];k[f>>2]=k[O>>2];a=O+4|0;k[f+4>>2]=k[a>>2];b=O+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[O>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(O);break a}else if((n|0)==118){f:do if((b-a|0)>3&g<<24>>24==68&d<<24>>24==118){n=a+2|0;d=i[n>>0]|0;if((d+-49&255)>=9){k[Fa+0>>2]=0;k[Fa+4>>2]=0;k[Fa+8>>2]=0;if(d<<24>>24!=95?(H=Ql(n,b,c)|0,(H|0)!=(n|0)):0){n=c+4|0;d=k[n>>2]|0;if((k[c>>2]|0)!=(d|0)){Al(za,d+-24|0);k[Fa+0>>2]=k[za+0>>2];k[Fa+4>>2]=k[za+4>>2];k[Fa+8>>2]=k[za+8>>2];k[za+0>>2]=0;k[za+4>>2]=0;k[za+8>>2]=0;tl(za);g=k[n>>2]|0;d=g+-24|0;do{Ka=g+-24|0;k[n>>2]=Ka;hl(Ka);g=k[n>>2]|0}while((g|0)!=(d|0));d=H;Ja=715}}else{d=n;Ja=715}do if((Ja|0)==715){if((((d|0)!=(b|0)?(i[d>>0]|0)==95:0)?(I=d+1|0,(I|0)!=(b|0)):0)?(K=ul(I,b,c)|0,(K|0)!=(I|0)):0){g=k[c+4>>2]|0;if((k[c>>2]|0)==(g|0))break;Zl(sa,58344,Fa);d=sl(sa,58360)|0;k[Da+0>>2]=k[d+0>>2];k[Da+4>>2]=k[d+4>>2];k[Da+8>>2]=k[d+8>>2];k[d+0>>2]=0;k[d+4>>2]=0;k[d+8>>2]=0;d=i[Da>>0]|0;if(!(d&1)){e=Da+1|0;d=(d&255)>>>1}else{e=k[Da+8>>2]|0;d=k[Da+4>>2]|0}jl(g+-24|0,e,d)|0;tl(Da);tl(sa);d=K}else d=a;tl(Fa);break f}while(0);tl(Fa);d=a;break}d=zl(n,b)|0;if(((d|0)!=(b|0)?(i[d>>0]|0)==95:0)?(G=d-n|0,F=d+1|0,(F|0)!=(b|0)):0){if((i[F>>0]|0)!=112){d=ul(F,b,c)|0;if((d|0)==(F|0)){d=a;break}f=k[c+4>>2]|0;if((k[c>>2]|0)==(f|0)){d=a;break}Ol(ra,n,G);g=rl(ra,0,58344)|0;k[qa+0>>2]=k[g+0>>2];k[qa+4>>2]=k[g+4>>2];k[qa+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=sl(qa,58360)|0;k[Ka+0>>2]=k[g+0>>2];k[Ka+4>>2]=k[g+4>>2];k[Ka+8>>2]=k[g+8>>2];k[g+0>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;g=i[Ka>>0]|0;if(!(g&1)){e=Ka+1|0;g=(g&255)>>>1}else{e=k[Ka+8>>2]|0;g=k[Ka+4>>2]|0}jl(f+-24|0,e,g)|0;tl(Ka);tl(qa);tl(ra);break}d=d+2|0;Ol(wa,n,G);o=rl(wa,0,58368)|0;k[Ia+0>>2]=k[o+0>>2];k[Ia+4>>2]=k[o+4>>2];k[Ia+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;o=sl(Ia,58360)|0;k[Ga+0>>2]=k[o+0>>2];k[Ga+4>>2]=k[o+4>>2];k[Ga+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;k[va+0>>2]=k[Ga+0>>2];k[va+4>>2]=k[Ga+4>>2];k[va+8>>2]=k[Ga+8>>2];k[Ga+0>>2]=0;k[Ga+4>>2]=0;k[Ga+8>>2]=0;o=va+12|0;k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;e=c+4|0;g=k[e>>2]|0;n=k[c+8>>2]|0;if(g>>>0>>0){if(!g)g=0;else{k[g+0>>2]=k[va+0>>2];k[g+4>>2]=k[va+4>>2];k[g+8>>2]=k[va+8>>2];k[va+0>>2]=0;k[va+4>>2]=0;k[va+8>>2]=0;g=g+12|0;k[g+0>>2]=k[o+0>>2];k[g+4>>2]=k[o+4>>2];k[g+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;g=k[e>>2]|0}k[e>>2]=g+24}else{e=k[c>>2]|0;l=(g-e|0)/24|0;f=l+1|0;if((f|0)<0)Fl(c);g=(n-e|0)/24|0;if(g>>>0<1073741823){g=g<<1;g=g>>>0>>0?f:g}else g=2147483647;Kl(Oa,g,l,c+12|0);g=Oa+8|0;e=k[g>>2]|0;if(e){k[e+0>>2]=k[va+0>>2];k[e+4>>2]=k[va+4>>2];k[e+8>>2]=k[va+8>>2];k[va+0>>2]=0;k[va+4>>2]=0;k[va+8>>2]=0;Ka=e+12|0;k[Ka+0>>2]=k[o+0>>2];k[Ka+4>>2]=k[o+4>>2];k[Ka+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0}k[g>>2]=e+24;Ml(c,Oa);Ll(Oa)}hl(va);tl(Ga);tl(Ia);tl(wa)}else d=a}else d=a;while(0);if((d|0)==(a|0))break b;e=k[c+4>>2]|0;if((k[c>>2]|0)==(e|0)){d=a;break a}m=c+16|0;k[aa>>2]=k[c+12>>2];Rl(ma,e+-24|0,aa);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[ma+12>>2];k[e>>2]=k[ma>>2];Oa=ma+4|0;k[e+4>>2]=k[Oa>>2];a=ma+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[ma>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[ma+12>>2];k[f>>2]=k[ma>>2];a=ma+4|0;k[f+4>>2]=k[a>>2];b=ma+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[ma>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(ma);break a}else break b}break}default:{}}while(0);d=Nl(a,b,c)|0;if((d|0)==(a|0)){d=Bl(a,b,c)|0;if((d|0)!=(a|0)?(La=k[c+4>>2]|0,(k[c>>2]|0)!=(La|0)):0){m=c+16|0;k[Ma>>2]=k[c+12>>2];Rl(Na,La+-24|0,Ma);f=c+20|0;e=k[f>>2]|0;l=k[c+24>>2]|0;if(e>>>0>>0){if(!e)e=0;else{k[e+12>>2]=k[Na+12>>2];k[e>>2]=k[Na>>2];Oa=Na+4|0;k[e+4>>2]=k[Oa>>2];a=Na+8|0;k[e+8>>2]=k[a>>2];k[a>>2]=0;k[Oa>>2]=0;k[Na>>2]=0;e=k[f>>2]|0}k[f>>2]=e+16}else{g=k[m>>2]|0;h=e-g>>4;f=h+1|0;if((f|0)<0)Fl(m);e=l-g|0;if(e>>4>>>0<1073741823){e=e>>3;e=e>>>0>>0?f:e}else e=2147483647;Gl(Oa,e,h,c+28|0);e=Oa+8|0;f=k[e>>2]|0;if(f){k[f+12>>2]=k[Na+12>>2];k[f>>2]=k[Na>>2];a=Na+4|0;k[f+4>>2]=k[a>>2];b=Na+8|0;k[f+8>>2]=k[b>>2];k[b>>2]=0;k[a>>2]=0;k[Na>>2]=0}k[e>>2]=f+16;Hl(m,Oa);Il(Oa)}il(Na)}else d=a}}}else d=a;while(0);r=Pa;return d|0}function vl(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0;if((-18-b|0)>>>0>>0)ql(a);if(!(i[a>>0]&1))m=a+1|0;else m=k[a+8>>2]|0;if(b>>>0<2147483623){c=c+b|0;l=b<<1;c=c>>>0>>0?l:c;if(c>>>0<11)j=11;else j=c+16&-16}else j=-17;l=xm(j)|0;if(e)_m(l|0,m|0,e|0)|0;if(g)_m(l+e|0,h|0,g|0)|0;c=d-f|0;if((c|0)!=(e|0))_m(l+(g+e)|0,m+(f+e)|0,c-e|0)|0;if((b|0)!=10)ym(m);k[a+8>>2]=l;k[a>>2]=j|1;b=c+g|0;k[a+4>>2]=b;i[l+b>>0]=0;return}function wl(a){a=a|0;var b=0,c=0,d=0,e=0;b=k[a>>2]|0;if(b){d=a+4|0;c=k[d>>2]|0;if((c|0)!=(b|0)){do{e=c+-16|0;k[d>>2]=e;nl(e);c=k[d>>2]|0}while((c|0)!=(b|0));b=k[a>>2]|0}ol(k[a+12>>2]|0,b,(k[a+8>>2]|0)-b|0)}return}function xl(a){a=a|0;var b=0;b=r;r=r+16|0;ym(a);if(!(bc(k[15276]|0,0)|0)){r=b;return}else vk(61232,b)}function yl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;do if((a|0)!=(b|0)){c=i[a>>0]|0;if((c|0)==104){d=a+1|0;c=zl(d,b)|0;if((c|0)==(d|0)|(c|0)==(b|0))break;a=(i[c>>0]|0)==95?c+1|0:a;break}else if((c|0)!=118)break;e=a+1|0;c=zl(e,b)|0;if((!((c|0)==(e|0)|(c|0)==(b|0))?(i[c>>0]|0)==95:0)?(e=c+1|0,d=zl(e,b)|0,!((d|0)==(e|0)|(d|0)==(b|0))):0)return ((i[d>>0]|0)==95?d+1|0:a)|0}while(0);return a|0}function zl(a,b){a=a|0;b=b|0;var c=0,d=0;a:do if((a|0)!=(b|0)?(c=(i[a>>0]|0)==110?a+1|0:a,(c|0)!=(b|0)):0){d=i[c>>0]|0;if(d<<24>>24==48){c=c+1|0;break}if((d+-49&255)<9)do{c=c+1|0;if((c|0)==(b|0)){c=b;break a}}while(((i[c>>0]|0)+-48|0)>>>0<10);else c=a}else c=a;while(0);return c|0}function Al(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=b+12|0;d=i[c>>0]|0;if(!(d&1)){e=c+1|0;c=(d&255)>>>1}else{e=k[b+20>>2]|0;c=k[b+16>>2]|0}b=jl(b,e,c)|0;k[a+0>>2]=k[b+0>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;return}function Bl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0;ya=r;r=r+304|0;wa=ya+284|0;va=ya+272|0;pa=ya+260|0;ba=ya+248|0;ca=ya+232|0;ha=ya+224|0;qa=ya+212|0;ia=ya+200|0;ja=ya+184|0;ka=ya+176|0;ra=ya+164|0;la=ya+152|0;ma=ya+136|0;na=ya+48|0;sa=ya;oa=ya+16|0;da=ya+32|0;ta=ya+36|0;ea=ya+52|0;fa=ya+64|0;ga=ya+80|0;n=ya+88|0;h=ya+104|0;o=ya+108|0;j=ya+120|0;g=b;a:do if((g-a|0)>1){xa=(i[a>>0]|0)==76?a+1|0:a;l=i[xa>>0]|0;f=l<<24>>24;if((f|0)==78){b:do if((xa|0)!=(b|0))if(l<<24>>24==78?(e=El(xa+1|0,b,va)|0,(e|0)!=(b|0)):0){l=c+52|0;k[l>>2]=0;f=i[e>>0]|0;if(f<<24>>24==79){k[l>>2]=2;h=e+1|0}else if(f<<24>>24==82){k[l>>2]=1;h=e+1|0}else h=e;aa=c+4|0;l=k[aa>>2]|0;f=k[c+8>>2]|0;if(l>>>0>>0){if(!l)l=0;else{k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[l+20>>2]=0;l=k[aa>>2]|0}k[aa>>2]=l+24}else{d=k[c>>2]|0;m=(l-d|0)/24|0;e=m+1|0;if((e|0)<0)Fl(c);l=(f-d|0)/24|0;if(l>>>0<1073741823){l=l<<1;l=l>>>0>>0?e:l}else l=2147483647;Kl(wa,l,m,c+12|0);l=wa+8|0;f=k[l>>2]|0;if(f){k[f+0>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[f+16>>2]=0;k[f+20>>2]=0}k[l>>2]=f+24;Ml(c,wa);Ll(wa)}if(((g-h|0)>1?(i[h>>0]|0)==83:0)?(i[h+1>>0]|0)==116:0){_l((k[aa>>2]|0)+-24|0,60440,3);h=h+2|0}if((h|0)==(b|0)){d=k[aa>>2]|0;b=d+-24|0;while(1){c=d+-24|0;k[aa>>2]=c;hl(c);d=k[aa>>2]|0;if((d|0)==(b|0)){b=xa;break b}}}l=i[h>>0]|0;if(l<<24>>24==69){k[c+48>>2]=k[va>>2];b=h+1|0;break}G=sa+1|0;H=c+12|0;I=c+16|0;J=c+20|0;K=c+24|0;L=oa+12|0;M=oa+4|0;N=oa+8|0;O=c+28|0;P=wa+8|0;Q=sa+8|0;R=sa+4|0;S=fa+12|0;T=fa+4|0;U=fa+8|0;V=wa+8|0;W=ea+1|0;X=ea+8|0;Y=ea+4|0;Z=ba+1|0;_=ca+12|0;$=ca+4|0;n=ca+8|0;o=wa+8|0;p=ba+8|0;q=ba+4|0;s=ja+12|0;t=ja+4|0;u=ja+8|0;v=wa+8|0;w=ia+1|0;x=ia+8|0;y=ia+4|0;z=ma+12|0;A=ma+4|0;B=ma+8|0;C=wa+8|0;D=la+1|0;E=la+8|0;F=la+4|0;j=0;c:while(1){d:while(1){switch(l<<24>>24|0){case 83:{l=h;g=31;break d}case 68:{f=h;g=81;break d}case 84:{l=h;g=57;break d}case 73:{g=Tl(h,b,c)|0;if((g|0)==(h|0)|(g|0)==(b|0)){b=xa;break b}Al(sa,(k[aa>>2]|0)+-24|0);d=k[aa>>2]|0;l=d+-24|0;f=d;do{h=f+-24|0;k[aa>>2]=h;hl(h);f=k[aa>>2]|0}while((f|0)!=(l|0));l=i[sa>>0]|0;if(!(l&1)){f=G;l=(l&255)>>>1}else{f=k[Q>>2]|0;l=k[R>>2]|0}jl(d+-48|0,f,l)|0;l=(k[aa>>2]|0)+-24|0;k[da>>2]=k[H>>2];Rl(oa,l,da);l=k[J>>2]|0;f=k[K>>2]|0;if(l>>>0>>0){if(!l)l=0;else{k[l+12>>2]=k[L>>2];k[l>>2]=k[oa>>2];k[l+4>>2]=k[M>>2];k[l+8>>2]=k[N>>2];k[N>>2]=0;k[M>>2]=0;k[oa>>2]=0;l=k[J>>2]|0}k[J>>2]=l+16}else{d=k[I>>2]|0;m=l-d>>4;e=m+1|0;if((e|0)<0){g=118;break c}l=f-d|0;if(l>>4>>>0<1073741823){l=l>>3;l=l>>>0>>0?e:l}else l=2147483647;Gl(wa,l,m,O);l=k[P>>2]|0;if(l){k[l+12>>2]=k[L>>2];k[l>>2]=k[oa>>2];k[l+4>>2]=k[M>>2];k[l+8>>2]=k[N>>2];k[N>>2]=0;k[M>>2]=0;k[oa>>2]=0}k[P>>2]=l+16;Hl(I,wa);Il(wa)}il(oa);tl(sa);h=g;break}case 76:{h=h+1|0;if((h|0)==(b|0)){b=xa;break b}break}default:{l=h;g=127;break d}}l=i[h>>0]|0;if(l<<24>>24==69){g=154;break c}}do if((g|0)==31){g=0;j=l+1|0;if((j|0)!=(b|0)?(i[j>>0]|0)==116:0){g=127;break}h=Xl(l,b,c)|0;if((h|0)==(l|0)|(h|0)==(b|0)){b=xa;break b}Al(pa,(k[aa>>2]|0)+-24|0);d=k[aa>>2]|0;l=d+-24|0;f=d;do{j=f+-24|0;k[aa>>2]=j;hl(j);f=k[aa>>2]|0}while((f|0)!=(l|0));e=d+-48|0;l=i[e>>0]|0;if(!(l&1))l=(l&255)>>>1;else l=k[d+-44>>2]|0;if(!l)$l(e,pa);else{Zl(ba,58416,pa);l=i[ba>>0]|0;if(!(l&1)){f=Z;l=(l&255)>>>1}else{f=k[p>>2]|0;l=k[q>>2]|0}jl(e,f,l)|0;tl(ba);l=(k[aa>>2]|0)+-24|0;k[ha>>2]=k[H>>2];Rl(ca,l,ha);l=k[J>>2]|0;f=k[K>>2]|0;if(l>>>0>>0){if(!l)l=0;else{k[l+12>>2]=k[_>>2];k[l>>2]=k[ca>>2];k[l+4>>2]=k[$>>2];k[l+8>>2]=k[n>>2];k[n>>2]=0;k[$>>2]=0;k[ca>>2]=0;l=k[J>>2]|0}k[J>>2]=l+16}else{d=k[I>>2]|0;m=l-d>>4;e=m+1|0;if((e|0)<0){g=48;break c}l=f-d|0;if(l>>4>>>0<1073741823){l=l>>3;l=l>>>0>>0?e:l}else l=2147483647;Gl(wa,l,m,O);l=k[o>>2]|0;if(l){k[l+12>>2]=k[_>>2];k[l>>2]=k[ca>>2];k[l+4>>2]=k[$>>2];k[l+8>>2]=k[n>>2];k[n>>2]=0;k[$>>2]=0;k[ca>>2]=0}k[o>>2]=l+16;Hl(I,wa);Il(wa)}il(ca)}tl(pa)}else if((g|0)==57){g=0;h=Sl(l,b,c)|0;if((h|0)==(l|0)|(h|0)==(b|0)){b=xa;break b}Al(qa,(k[aa>>2]|0)+-24|0);d=k[aa>>2]|0;l=d+-24|0;f=d;do{j=f+-24|0;k[aa>>2]=j;hl(j);f=k[aa>>2]|0}while((f|0)!=(l|0));e=d+-48|0;l=i[e>>0]|0;if(!(l&1))l=(l&255)>>>1;else l=k[d+-44>>2]|0;if(!l)$l(e,qa);else{Zl(ia,58416,qa);l=i[ia>>0]|0;if(!(l&1)){f=w;l=(l&255)>>>1}else{f=k[x>>2]|0;l=k[y>>2]|0}jl(e,f,l)|0;tl(ia)}l=(k[aa>>2]|0)+-24|0;k[ka>>2]=k[H>>2];Rl(ja,l,ka);l=k[J>>2]|0;f=k[K>>2]|0;if(l>>>0>>0){if(!l)l=0;else{k[l+12>>2]=k[s>>2];k[l>>2]=k[ja>>2];k[l+4>>2]=k[t>>2];k[l+8>>2]=k[u>>2];k[u>>2]=0;k[t>>2]=0;k[ja>>2]=0;l=k[J>>2]|0}k[J>>2]=l+16}else{d=k[I>>2]|0;m=l-d>>4;e=m+1|0;if((e|0)<0){g=74;break c}l=f-d|0;if(l>>4>>>0<1073741823){l=l>>3;l=l>>>0>>0?e:l}else l=2147483647;Gl(wa,l,m,O);l=k[v>>2]|0;if(l){k[l+12>>2]=k[s>>2];k[l>>2]=k[ja>>2];k[l+4>>2]=k[t>>2];k[l+8>>2]=k[u>>2];k[u>>2]=0;k[t>>2]=0;k[ja>>2]=0}k[v>>2]=l+16;Hl(I,wa);Il(wa)}il(ja);tl(qa)}else if((g|0)==81){g=0;l=f+1|0;if((l|0)!=(b|0)?(j=i[l>>0]|0,!(j<<24>>24==84|j<<24>>24==116)):0){l=f;g=127;break}h=Yl(f,b,c)|0;if((h|0)==(f|0)|(h|0)==(b|0)){b=xa;break b}Al(ra,(k[aa>>2]|0)+-24|0);d=k[aa>>2]|0;l=d+-24|0;f=d;do{j=f+-24|0;k[aa>>2]=j;hl(j);f=k[aa>>2]|0}while((f|0)!=(l|0));e=d+-48|0;l=i[e>>0]|0;if(!(l&1))l=(l&255)>>>1;else l=k[d+-44>>2]|0;if(!l)$l(e,ra);else{Zl(la,58416,ra);l=i[la>>0]|0;if(!(l&1)){f=D;l=(l&255)>>>1}else{f=k[E>>2]|0;l=k[F>>2]|0}jl(e,f,l)|0;tl(la)}l=(k[aa>>2]|0)+-24|0;k[na>>2]=k[H>>2];Rl(ma,l,na);l=k[J>>2]|0;f=k[K>>2]|0;if(l>>>0>>0){if(!l)l=0;else{k[l+12>>2]=k[z>>2];k[l>>2]=k[ma>>2];k[l+4>>2]=k[A>>2];k[l+8>>2]=k[B>>2];k[B>>2]=0;k[A>>2]=0;k[ma>>2]=0;l=k[J>>2]|0}k[J>>2]=l+16}else{d=k[I>>2]|0;m=l-d>>4;e=m+1|0;if((e|0)<0){g=100;break c}l=f-d|0;if(l>>4>>>0<1073741823){l=l>>3;l=l>>>0>>0?e:l}else l=2147483647;Gl(wa,l,m,O);l=k[C>>2]|0;if(l){k[l+12>>2]=k[z>>2];k[l>>2]=k[ma>>2];k[l+4>>2]=k[A>>2];k[l+8>>2]=k[B>>2];k[B>>2]=0;k[A>>2]=0;k[ma>>2]=0}k[C>>2]=l+16;Hl(I,wa);Il(wa)}il(ma);tl(ra)}while(0);if((g|0)==127){h=am(l,b,c)|0;if((h|0)==(l|0)|(h|0)==(b|0)){b=xa;break b}Al(ta,(k[aa>>2]|0)+-24|0);d=k[aa>>2]|0;l=d+-24|0;f=d;do{j=f+-24|0;k[aa>>2]=j;hl(j);f=k[aa>>2]|0}while((f|0)!=(l|0));e=d+-48|0;l=i[e>>0]|0;if(!(l&1))l=(l&255)>>>1;else l=k[d+-44>>2]|0;if(!l)$l(e,ta);else{Zl(ea,58416,ta);l=i[ea>>0]|0;if(!(l&1)){f=W;l=(l&255)>>>1}else{f=k[X>>2]|0;l=k[Y>>2]|0}jl(e,f,l)|0;tl(ea)}l=(k[aa>>2]|0)+-24|0;k[ga>>2]=k[H>>2];Rl(fa,l,ga);l=k[J>>2]|0;f=k[K>>2]|0;if(l>>>0>>0){if(!l)l=0;else{k[l+12>>2]=k[S>>2];k[l>>2]=k[fa>>2];k[l+4>>2]=k[T>>2];k[l+8>>2]=k[U>>2];k[U>>2]=0;k[T>>2]=0;k[fa>>2]=0;l=k[J>>2]|0}k[J>>2]=l+16}else{d=k[I>>2]|0;m=l-d>>4;e=m+1|0;if((e|0)<0){g=144;break}l=f-d|0;if(l>>4>>>0<1073741823){l=l>>3;l=l>>>0>>0?e:l}else l=2147483647;Gl(wa,l,m,O);l=k[V>>2]|0;if(l){k[l+12>>2]=k[S>>2];k[l>>2]=k[fa>>2];k[l+4>>2]=k[T>>2];k[l+8>>2]=k[U>>2];k[U>>2]=0;k[T>>2]=0;k[fa>>2]=0}k[V>>2]=l+16;Hl(I,wa);Il(wa)}il(fa);tl(ta)}l=i[h>>0]|0;if(l<<24>>24==69){b=h;g=152;break}else j=1}if((g|0)==48)Fl(I);else if((g|0)==74)Fl(I);else if((g|0)==100)Fl(I);else if((g|0)==118)Fl(I);else if((g|0)==144)Fl(I);else if((g|0)==152){k[c+48>>2]=k[va>>2];ua=b+1|0}else if((g|0)==154){b=h+1|0;k[c+48>>2]=k[va>>2];if(j)ua=b;else break}e=c+20|0;b=k[e>>2]|0;if((k[c+16>>2]|0)==(b|0))b=ua;else{d=b+-16|0;do{c=b+-16|0;k[e>>2]=c;il(c);b=k[e>>2]|0}while((b|0)!=(d|0));b=ua}}else b=xa;while(0);b=(b|0)==(xa|0)?a:b;break}else if((f|0)==90){e:do if((xa|0)!=(b|0))if(((l<<24>>24==90?(ua=xa+1|0,d=pl(ua,b,c)|0,!((d|0)==(ua|0)|(d|0)==(b|0))):0)?(i[d>>0]|0)==69:0)?(m=d+1|0,(m|0)!=(b|0)):0){f=i[m>>0]|0;if((f|0)==115){b=bm(d+2|0,b)|0;d=k[c+4>>2]|0;if((k[c>>2]|0)==(d|0))break;sl(d+-24|0,60416)|0;break}else if((f|0)==100){d=d+2|0;if((d|0)==(b|0)){b=xa;break}d=zl(d,b)|0;if((d|0)==(b|0)){b=xa;break}if((i[d>>0]|0)!=95){b=xa;break}va=d+1|0;b=Bl(va,b,c)|0;g=c+4|0;e=k[g>>2]|0;if((b|0)==(va|0)){d=e+-24|0;b=e;while(1){c=b+-24|0;k[g>>2]=c;hl(c);b=k[g>>2]|0;if((b|0)==(d|0)){b=xa;break e}}}if(((e-(k[c>>2]|0)|0)/24|0)>>>0<2){b=xa;break}Al(wa,e+-24|0);d=k[g>>2]|0;e=d+-24|0;f=d;do{c=f+-24|0;k[g>>2]=c;hl(c);f=k[g>>2]|0}while((f|0)!=(e|0));sl(d+-48|0,58416)|0;d=i[wa>>0]|0;if(!(d&1)){f=wa+1|0;d=(d&255)>>>1}else{f=k[wa+8>>2]|0;d=k[wa+4>>2]|0}jl((k[g>>2]|0)+-24|0,f,d)|0;tl(wa);break}else{d=Bl(m,b,c)|0;if((d|0)==(m|0)){b=c+4|0;e=k[b>>2]|0;d=e+-24|0;while(1){c=e+-24|0;k[b>>2]=c;hl(c);e=k[b>>2]|0;if((e|0)==(d|0)){b=xa;break e}}}b=bm(d,b)|0;g=c+4|0;d=k[g>>2]|0;if(((d-(k[c>>2]|0)|0)/24|0)>>>0<2)break;Al(va,d+-24|0);f=k[g>>2]|0;d=f+-24|0;e=f;do{c=e+-24|0;k[g>>2]=c;hl(c);e=k[g>>2]|0}while((e|0)!=(d|0));sl(f+-48|0,58416)|0;d=i[va>>0]|0;if(!(d&1)){f=va+1|0;d=(d&255)>>>1}else{f=k[va+8>>2]|0;d=k[va+4>>2]|0}jl((k[g>>2]|0)+-24|0,f,d)|0;tl(va);break}}else b=xa;while(0);r=ya;return ((b|0)==(xa|0)?a:b)|0}else{do if((g-xa|0)>1){if(l<<24>>24==83?(i[xa+1>>0]|0)==116:0){f=xa+2|0;if((f|0)==(b|0)){e=0;f=b}else{e=0;f=(i[f>>0]|0)==76?xa+3|0:f}}else{e=1;f=xa}d=am(f,b,c)|0;f=(d|0)==(f|0);if(f|e)l=f?xa:d;else{f=k[c+4>>2]|0;if((k[c>>2]|0)==(f|0))break;rl(f+-24|0,0,58856)|0;l=d}if((l|0)!=(xa|0)){if((l|0)==(b|0))break a;if((i[l>>0]|0)!=73){b=l;break a}m=c+4|0;f=k[m>>2]|0;if((k[c>>2]|0)==(f|0)){b=a;break a}j=c+16|0;k[h>>2]=k[c+12>>2];Rl(n,f+-24|0,h);d=c+20|0;f=k[d>>2]|0;g=k[c+24>>2]|0;if(f>>>0>>0){if(!f)f=0;else{k[f+12>>2]=k[n+12>>2];k[f>>2]=k[n>>2];xa=n+4|0;k[f+4>>2]=k[xa>>2];wa=n+8|0;k[f+8>>2]=k[wa>>2];k[wa>>2]=0;k[xa>>2]=0;k[n>>2]=0;f=k[d>>2]|0}k[d>>2]=f+16}else{d=k[j>>2]|0;h=f-d>>4;e=h+1|0;if((e|0)<0)Fl(j);f=g-d|0;if(f>>4>>>0<1073741823){f=f>>3;f=f>>>0>>0?e:f}else f=2147483647;Gl(wa,f,h,c+28|0);f=wa+8|0;d=k[f>>2]|0;if(d){k[d+12>>2]=k[n+12>>2];k[d>>2]=k[n>>2];xa=n+4|0;k[d+4>>2]=k[xa>>2];va=n+8|0;k[d+8>>2]=k[va>>2];k[va>>2]=0;k[xa>>2]=0;k[n>>2]=0}k[f>>2]=d+16;Hl(j,wa);Il(wa)}il(n);b=Tl(l,b,c)|0;if((b|0)==(l|0)){b=a;break a}d=k[m>>2]|0;if(((d-(k[c>>2]|0)|0)/24|0)>>>0<2){b=a;break a}Al(o,d+-24|0);f=k[m>>2]|0;d=f+-24|0;e=f;do{a=e+-24|0;k[m>>2]=a;hl(a);e=k[m>>2]|0}while((e|0)!=(d|0));d=i[o>>0]|0;if(!(d&1)){e=o+1|0;d=(d&255)>>>1}else{e=k[o+8>>2]|0;d=k[o+4>>2]|0}jl(f+-48|0,e,d)|0;tl(o);break a}}while(0);d=Xl(xa,b,c)|0;if((d|0)==(xa|0)|(d|0)==(b|0)){b=a;break}if((i[d>>0]|0)!=73){b=a;break}b=Tl(d,b,c)|0;if((b|0)==(d|0)){b=a;break}f=c+4|0;d=k[f>>2]|0;if(((d-(k[c>>2]|0)|0)/24|0)>>>0<2){b=a;break}Al(j,d+-24|0);g=k[f>>2]|0;d=g+-24|0;e=g;do{a=e+-24|0;k[f>>2]=a;hl(a);e=k[f>>2]|0}while((e|0)!=(d|0));d=i[j>>0]|0;if(!(d&1)){e=j+1|0;d=(d&255)>>>1}else{e=k[j+8>>2]|0;d=k[j+4>>2]|0}jl(g+-48|0,e,d)|0;tl(j);break}}else b=a;while(0);r=ya;return b|0}function Cl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=i[a>>0]|0;d=(c&1)!=0;if(d){e=(k[a>>2]&-2)+-1|0;f=k[a+4>>2]|0}else{e=10;f=(c&255)>>>1}if((f|0)==(e|0)){cm(a,e,1,e,e,0);if(!(i[a>>0]&1))e=7;else e=8}else if(d)e=8;else e=7;if((e|0)==7){i[a>>0]=(f<<1)+2;c=a+1|0;d=f+1|0}else if((e|0)==8){c=k[a+8>>2]|0;d=f+1|0;k[a+4>>2]=d}i[c+f>>0]=b;i[c+d>>0]=0;return}function Dl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;e=i[a>>0]|0;f=(e&1)==0;if(f)h=(e&255)>>>1;else h=k[a+4>>2]|0;if(h>>>0>>0)dm(a);if(f)f=10;else{e=k[a>>2]|0;f=(e&-2)+-1|0;e=e&255}if((f-h|0)>>>0>=d>>>0){if(d){if(!(e&1))g=a+1|0;else g=k[a+8>>2]|0;e=h-b|0;f=g+b|0;if((h|0)!=(b|0)){if(f>>>0<=c>>>0&(g+h|0)>>>0>c>>>0)c=c+d|0;an(g+(d+b)|0,f|0,e|0)|0}an(f|0,c|0,d|0)|0;c=h+d|0;if(!(i[a>>0]&1))i[a>>0]=c<<1;else k[a+4>>2]=c;i[g+c>>0]=0}}else vl(a,f,h+d-f|0,h,b,0,d,c);return a|0}function El(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;k[c>>2]=0;if((a|0)!=(b|0)){b=i[a>>0]|0;if(b<<24>>24==114){k[c>>2]=4;b=a+1|0;a=b;b=i[b>>0]|0;d=4}else d=0;if(b<<24>>24==86){d=d|2;k[c>>2]=d;b=a+1|0;a=b;b=i[b>>0]|0}if(b<<24>>24==75){k[c>>2]=d|1;a=a+1|0}}return a|0}function Fl(a){a=a|0;Ca(60016,60040,303,58128)}function Gl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+12|0;k[e>>2]=0;k[a+16>>2]=d;if(!b)d=0;else d=ml(k[d>>2]|0,b<<4)|0;k[a>>2]=d;c=d+(c<<4)|0;k[a+8>>2]=c;k[a+4>>2]=c;k[e>>2]=d+(b<<4);return}function Hl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0;d=k[a>>2]|0;f=a+4|0;e=k[f>>2]|0;g=b+4|0;c=k[g>>2]|0;if((e|0)!=(d|0)){do{h=e;e=e+-16|0;l=c+-16|0;k[l>>2]=0;j=c+-12|0;k[j>>2]=0;m=k[h+-4>>2]|0;i=c+-8|0;k[i>>2]=0;k[c+-4>>2]=m;k[l>>2]=k[e>>2];c=h+-12|0;k[j>>2]=k[c>>2];h=h+-8|0;k[i>>2]=k[h>>2];k[h>>2]=0;k[c>>2]=0;k[e>>2]=0;c=(k[g>>2]|0)+-16|0;k[g>>2]=c}while((e|0)!=(d|0));d=k[a>>2]|0}k[a>>2]=c;k[g>>2]=d;j=b+8|0;m=k[f>>2]|0;k[f>>2]=k[j>>2];k[j>>2]=m;j=a+8|0;m=b+12|0;l=k[j>>2]|0;k[j>>2]=k[m>>2];k[m>>2]=l;k[b>>2]=k[g>>2];return}function Il(a){a=a|0;var b=0,c=0,d=0,e=0;c=k[a+4>>2]|0;d=a+8|0;b=k[d>>2]|0;if((b|0)!=(c|0))do{e=b+-16|0;k[d>>2]=e;il(e);b=k[d>>2]|0}while((b|0)!=(c|0));b=k[a>>2]|0;if(b)ol(k[k[a+16>>2]>>2]|0,b,(k[a+12>>2]|0)-b|0);return}function Jl(a,b){a=a|0;b=b|0;if(!(i[b>>0]&1)){k[a+0>>2]=k[b+0>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2]}else Ol(a,k[b+8>>2]|0,k[b+4>>2]|0);return}function Kl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+12|0;k[e>>2]=0;k[a+16>>2]=d;if(!b)d=0;else d=ml(k[d>>2]|0,b*24|0)|0;k[a>>2]=d;c=d+(c*24|0)|0;k[a+8>>2]=c;k[a+4>>2]=c;k[e>>2]=d+(b*24|0);return}function Ll(a){a=a|0;var b=0,c=0,d=0,e=0;c=k[a+4>>2]|0;d=a+8|0;b=k[d>>2]|0;if((b|0)!=(c|0))do{e=b+-24|0;k[d>>2]=e;hl(e);b=k[d>>2]|0}while((b|0)!=(c|0));b=k[a>>2]|0;if(b)ol(k[k[a+16>>2]>>2]|0,b,(k[a+12>>2]|0)-b|0);return}function Ml(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=k[a>>2]|0;f=a+4|0;e=k[f>>2]|0;g=b+4|0;c=k[g>>2]|0;if((e|0)!=(d|0)){do{h=c+-24|0;i=e;e=e+-24|0;k[h+0>>2]=k[e+0>>2];k[h+4>>2]=k[e+4>>2];k[h+8>>2]=k[e+8>>2];k[e+0>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;h=c+-12|0;c=i+-12|0;k[h+0>>2]=k[c+0>>2];k[h+4>>2]=k[c+4>>2];k[h+8>>2]=k[c+8>>2];k[c+0>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;c=(k[g>>2]|0)+-24|0;k[g>>2]=c}while((e|0)!=(d|0));d=k[a>>2]|0}k[a>>2]=c;k[g>>2]=d;e=b+8|0;i=k[f>>2]|0;k[f>>2]=k[e>>2];k[e>>2]=i;e=a+8|0;a=b+12|0;i=k[e>>2]|0;k[e>>2]=k[a>>2];k[a>>2]=i;k[b>>2]=k[g>>2];return}function Nl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=r;r=r+720|0;N=O+696|0;q=O+672|0;s=O+648|0;y=O+624|0;B=O+600|0;m=O+576|0;n=O+552|0;C=O+528|0;o=O+504|0;D=O+480|0;p=O+456|0;t=O+432|0;h=O+408|0;H=O+384|0;u=O+360|0;v=O+336|0;j=O+120|0;w=O;x=O+24|0;l=O+48|0;I=O+72|0;z=O+96|0;J=O+144|0;K=O+168|0;L=O+192|0;M=O+216|0;E=O+240|0;F=O+264|0;G=O+288|0;A=O+312|0;a:do if((a|0)!=(b|0))do switch(i[a>>0]|0){case 111:{im(j,60312);d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[j+0>>2];k[b+4>>2]=k[j+4>>2];k[b+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;c=b+12|0;b=j+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[j+0>>2];k[d+4>>2]=k[j+4>>2];k[d+8>>2]=k[j+8>>2];k[j+0>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;J=d+12|0;K=j+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(j);a=a+1|0;break a}case 100:{i[x>>0]=12;h=x+1|0;i[h+0>>0]=i[60672]|0;i[h+1>>0]=i[60673]|0;i[h+2>>0]=i[60674]|0;i[h+3>>0]=i[60675]|0;i[h+4>>0]=i[60676]|0;i[h+5>>0]=i[60677]|0;i[x+7>>0]=0;h=x+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[x+0>>2];k[b+4>>2]=k[x+4>>2];k[b+8>>2]=k[x+8>>2];k[x+0>>2]=0;k[x+4>>2]=0;k[x+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[x+0>>2];k[d+4>>2]=k[x+4>>2];k[d+8>>2]=k[x+8>>2];k[x+0>>2]=0;k[x+4>>2]=0;k[x+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(x);a=a+1|0;break a}case 101:{em(l,60680);d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[l+0>>2];k[b+4>>2]=k[l+4>>2];k[b+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;c=b+12|0;b=l+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[l+0>>2];k[d+4>>2]=k[l+4>>2];k[d+8>>2]=k[l+8>>2];k[l+0>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;J=d+12|0;K=l+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(l);a=a+1|0;break a}case 102:{i[w>>0]=10;h=w+1|0;i[h+0>>0]=i[60664]|0;i[h+1>>0]=i[60665]|0;i[h+2>>0]=i[60666]|0;i[h+3>>0]=i[60667]|0;i[h+4>>0]=i[60668]|0;i[w+6>>0]=0;h=w+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[w+0>>2];k[b+4>>2]=k[w+4>>2];k[b+8>>2]=k[w+8>>2];k[w+0>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[w+0>>2];k[d+4>>2]=k[w+4>>2];k[d+8>>2]=k[w+8>>2];k[w+0>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(w);a=a+1|0;break a}case 103:{i[I>>0]=20;e=I+1|0;b=60696;d=e+10|0;do{i[e>>0]=i[b>>0]|0;e=e+1|0;b=b+1|0}while((e|0)<(d|0));i[I+11>>0]=0;h=I+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[I+0>>2];k[b+4>>2]=k[I+4>>2];k[b+8>>2]=k[I+8>>2];k[I+0>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[I+0>>2];k[d+4>>2]=k[I+4>>2];k[d+8>>2]=k[I+8>>2];k[I+0>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(I);a=a+1|0;break a}case 117:{N=a+1|0;c=Ul(N,b,c)|0;r=O;return ((c|0)==(N|0)?a:c)|0}case 122:{i[z>>0]=6;h=z+1|0;i[h+0>>0]=i[60712]|0;i[h+1>>0]=i[60713]|0;i[h+2>>0]=i[60714]|0;i[z+4>>0]=0;h=z+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[z+0>>2];k[b+4>>2]=k[z+4>>2];k[b+8>>2]=k[z+8>>2];k[z+0>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[z+0>>2];k[d+4>>2]=k[z+4>>2];k[d+8>>2]=k[z+8>>2];k[z+0>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(z);a=a+1|0;break a}case 68:{e=a+1|0;if((e|0)==(b|0))break a;switch(i[e>>0]|0){case 100:{i[J>>0]=18;e=J+1|0;b=60720;d=e+9|0;do{i[e>>0]=i[b>>0]|0;e=e+1|0;b=b+1|0}while((e|0)<(d|0));i[J+10>>0]=0;h=J+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[J+0>>2];k[b+4>>2]=k[J+4>>2];k[b+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[J+0>>2];k[d+4>>2]=k[J+4>>2];k[d+8>>2]=k[J+8>>2];k[J+0>>2]=0;k[J+4>>2]=0;k[J+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(J);a=a+2|0;break a}case 101:{i[K>>0]=20;e=K+1|0;b=60736;d=e+10|0;do{i[e>>0]=i[b>>0]|0;e=e+1|0;b=b+1|0}while((e|0)<(d|0));i[K+11>>0]=0;h=K+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[K+0>>2];k[b+4>>2]=k[K+4>>2];k[b+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[K+0>>2];k[d+4>>2]=k[K+4>>2];k[d+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0;J=d+12|0;k[J+0>>2]=k[h+0>>2];k[J+4>>2]=k[h+4>>2];k[J+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(K);a=a+2|0;break a}case 105:{i[E>>0]=16;h=E+1|0;e=h;i[e>>0]=99;i[e+1>>0]=104;i[e+2>>0]=97;i[e+3>>0]=114;h=h+4|0;i[h>>0]=51;i[h+1>>0]=50;i[h+2>>0]=95;i[h+3>>0]=116;i[E+9>>0]=0;h=E+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[E+0>>2];k[b+4>>2]=k[E+4>>2];k[b+8>>2]=k[E+8>>2];k[E+0>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[E+0>>2];k[d+4>>2]=k[E+4>>2];k[d+8>>2]=k[E+8>>2];k[E+0>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(E);a=a+2|0;break a}case 102:{i[L>>0]=18;e=L+1|0;b=60752;d=e+9|0;do{i[e>>0]=i[b>>0]|0;e=e+1|0;b=b+1|0}while((e|0)<(d|0));i[L+10>>0]=0;h=L+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[L+0>>2];k[b+4>>2]=k[L+4>>2];k[b+8>>2]=k[L+8>>2];k[L+0>>2]=0;k[L+4>>2]=0;k[L+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[L+0>>2];k[d+4>>2]=k[L+4>>2];k[d+8>>2]=k[L+8>>2];k[L+0>>2]=0;k[L+4>>2]=0;k[L+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(L);a=a+2|0;break a}case 97:{i[G>>0]=8;h=G+1|0;i[h>>0]=97;i[h+1>>0]=117;i[h+2>>0]=116;i[h+3>>0]=111;i[G+5>>0]=0;h=G+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[G+0>>2];k[b+4>>2]=k[G+4>>2];k[b+8>>2]=k[G+8>>2];k[G+0>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[G+0>>2];k[d+4>>2]=k[G+4>>2];k[d+8>>2]=k[G+8>>2];k[G+0>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(G);a=a+2|0;break a}case 104:{i[M>>0]=18;e=M+1|0;b=60768;d=e+9|0;do{i[e>>0]=i[b>>0]|0;e=e+1|0;b=b+1|0}while((e|0)<(d|0));i[M+10>>0]=0;h=M+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[M+0>>2];k[b+4>>2]=k[M+4>>2];k[b+8>>2]=k[M+8>>2];k[M+0>>2]=0;k[M+4>>2]=0;k[M+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[M+0>>2];k[d+4>>2]=k[M+4>>2];k[d+8>>2]=k[M+8>>2];k[M+0>>2]=0;k[M+4>>2]=0;k[M+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(M);a=a+2|0;break a}case 115:{i[F>>0]=16;h=F+1|0;e=h;i[e>>0]=99;i[e+1>>0]=104;i[e+2>>0]=97;i[e+3>>0]=114;h=h+4|0;i[h>>0]=49;i[h+1>>0]=54;i[h+2>>0]=95;i[h+3>>0]=116;i[F+9>>0]=0;h=F+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[F+0>>2];k[b+4>>2]=k[F+4>>2];k[b+8>>2]=k[F+8>>2];k[F+0>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[F+0>>2];k[d+4>>2]=k[F+4>>2];k[d+8>>2]=k[F+8>>2];k[F+0>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(F);a=a+2|0;break a}case 110:{gm(A,60784);d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[A+0>>2];k[b+4>>2]=k[A+4>>2];k[b+8>>2]=k[A+8>>2];k[A+0>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;c=b+12|0;b=A+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[A+0>>2];k[d+4>>2]=k[A+4>>2];k[d+8>>2]=k[A+8>>2];k[A+0>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;J=d+12|0;K=A+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(A);a=a+2|0;break a}default:break a}}case 98:{i[y>>0]=8;h=y+1|0;i[h>>0]=98;i[h+1>>0]=111;i[h+2>>0]=111;i[h+3>>0]=108;i[y+5>>0]=0;h=y+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[y+0>>2];k[b+4>>2]=k[y+4>>2];k[b+8>>2]=k[y+8>>2];k[y+0>>2]=0;k[y+4>>2]=0;k[y+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[y+0>>2];k[d+4>>2]=k[y+4>>2];k[d+8>>2]=k[y+8>>2];k[y+0>>2]=0;k[y+4>>2]=0;k[y+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(y);a=a+1|0;break a}case 97:{em(m,60192);d=c+4|0;b=k[d>>2]|0;f=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[m+0>>2];k[b+4>>2]=k[m+4>>2];k[b+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;c=b+12|0;b=m+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{d=k[c>>2]|0;g=(b-d|0)/24|0;e=g+1|0;if((e|0)<0)Fl(c);b=(f-d|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?e:b}else b=2147483647;Kl(N,b,g,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[m+0>>2];k[d+4>>2]=k[m+4>>2];k[d+8>>2]=k[m+8>>2];k[m+0>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;J=d+12|0;K=m+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(m);a=a+1|0;break a}case 118:{i[q>>0]=8;h=q+1|0;i[h>>0]=118;i[h+1>>0]=111;i[h+2>>0]=105;i[h+3>>0]=100;i[q+5>>0]=0;h=q+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[q+0>>2];k[b+4>>2]=k[q+4>>2];k[b+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[q+0>>2];k[d+4>>2]=k[q+4>>2];k[d+8>>2]=k[q+8>>2];k[q+0>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(q);a=a+1|0;break a}case 119:{i[s>>0]=14;h=s+1|0;i[h+0>>0]=i[60168]|0;i[h+1>>0]=i[60169]|0;i[h+2>>0]=i[60170]|0;i[h+3>>0]=i[60171]|0;i[h+4>>0]=i[60172]|0;i[h+5>>0]=i[60173]|0;i[h+6>>0]=i[60174]|0;i[s+8>>0]=0;h=s+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[s+0>>2];k[b+4>>2]=k[s+4>>2];k[b+8>>2]=k[s+8>>2];k[s+0>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[s+0>>2];k[d+4>>2]=k[s+4>>2];k[d+8>>2]=k[s+8>>2];k[s+0>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(s);a=a+1|0;break a}case 99:{i[B>>0]=8;h=B+1|0;i[h>>0]=99;i[h+1>>0]=104;i[h+2>>0]=97;i[h+3>>0]=114;i[B+5>>0]=0;h=B+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[B+0>>2];k[b+4>>2]=k[B+4>>2];k[b+8>>2]=k[B+8>>2];k[B+0>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[B+0>>2];k[d+4>>2]=k[B+4>>2];k[d+8>>2]=k[B+8>>2];k[B+0>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(B);a=a+1|0;break a}case 115:{i[C>>0]=10;h=C+1|0;i[h+0>>0]=i[60224]|0;i[h+1>>0]=i[60225]|0;i[h+2>>0]=i[60226]|0;i[h+3>>0]=i[60227]|0;i[h+4>>0]=i[60228]|0;i[C+6>>0]=0;h=C+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[C+0>>2];k[b+4>>2]=k[C+4>>2];k[b+8>>2]=k[C+8>>2];k[C+0>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[C+0>>2];k[d+4>>2]=k[C+4>>2];k[d+8>>2]=k[C+8>>2];k[C+0>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(C);a=a+1|0;break a}case 116:{gm(o,60232);d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[o+0>>2];k[b+4>>2]=k[o+4>>2];k[b+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;c=b+12|0;b=o+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[o+0>>2];k[d+4>>2]=k[o+4>>2];k[d+8>>2]=k[o+8>>2];k[o+0>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;J=d+12|0;K=o+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(o);a=a+1|0;break a}case 106:{hm(p,60592);d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[p+0>>2];k[b+4>>2]=k[p+4>>2];k[b+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;c=b+12|0;b=p+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[p+0>>2];k[d+4>>2]=k[p+4>>2];k[d+8>>2]=k[p+8>>2];k[p+0>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;J=d+12|0;K=p+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(p);a=a+1|0;break a}case 104:{fm(n,60208);d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[n+0>>2];k[b+4>>2]=k[n+4>>2];k[b+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;c=b+12|0;b=n+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[n+0>>2];k[d+4>>2]=k[n+4>>2];k[d+8>>2]=k[n+8>>2];k[n+0>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;J=d+12|0;K=n+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(n);a=a+1|0;break a}case 105:{i[D>>0]=6;h=D+1|0;i[h+0>>0]=i[60584]|0;i[h+1>>0]=i[60585]|0;i[h+2>>0]=i[60586]|0;i[D+4>>0]=0;h=D+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[D+0>>2];k[b+4>>2]=k[D+4>>2];k[b+8>>2]=k[D+8>>2];k[D+0>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[D+0>>2];k[d+4>>2]=k[D+4>>2];k[d+8>>2]=k[D+8>>2];k[D+0>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(D);a=a+1|0;break a}case 121:{Ol(u,60640,18);h=u+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[u+0>>2];k[b+4>>2]=k[u+4>>2];k[b+8>>2]=k[u+8>>2];k[u+0>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[u+0>>2];k[d+4>>2]=k[u+4>>2];k[d+8>>2]=k[u+8>>2];k[u+0>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(u);a=a+1|0;break a}case 110:{i[v>>0]=16;h=v+1|0;e=h;i[e>>0]=95;i[e+1>>0]=95;i[e+2>>0]=105;i[e+3>>0]=110;h=h+4|0;i[h>>0]=116;i[h+1>>0]=49;i[h+2>>0]=50;i[h+3>>0]=56;i[v+9>>0]=0;h=v+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[v+0>>2];k[b+4>>2]=k[v+4>>2];k[b+8>>2]=k[v+8>>2];k[v+0>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[v+0>>2];k[d+4>>2]=k[v+4>>2];k[d+8>>2]=k[v+8>>2];k[v+0>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(v);a=a+1|0;break a}case 108:{i[t>>0]=8;h=t+1|0;i[h>>0]=108;i[h+1>>0]=111;i[h+2>>0]=110;i[h+3>>0]=103;i[t+5>>0]=0;h=t+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[t+0>>2];k[b+4>>2]=k[t+4>>2];k[b+8>>2]=k[t+8>>2];k[t+0>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[t+0>>2];k[d+4>>2]=k[t+4>>2];k[d+8>>2]=k[t+8>>2];k[t+0>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(t);a=a+1|0;break a}case 120:{i[H>>0]=18;e=H+1|0;b=60624;d=e+9|0;do{i[e>>0]=i[b>>0]|0;e=e+1|0;b=b+1|0}while((e|0)<(d|0));i[H+10>>0]=0;h=H+12|0;k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;e=c+4|0;b=k[e>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[H+0>>2];k[b+4>>2]=k[H+4>>2];k[b+8>>2]=k[H+8>>2];k[H+0>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;b=b+12|0;k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;b=k[e>>2]|0}k[e>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[H+0>>2];k[d+4>>2]=k[H+4>>2];k[d+8>>2]=k[H+8>>2];k[H+0>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;K=d+12|0;k[K+0>>2]=k[h+0>>2];k[K+4>>2]=k[h+4>>2];k[K+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(H);a=a+1|0;break a}case 109:{fm(h,60608);d=c+4|0;b=k[d>>2]|0;g=k[c+8>>2]|0;if(b>>>0>>0){if(!b)b=0;else{k[b+0>>2]=k[h+0>>2];k[b+4>>2]=k[h+4>>2];k[b+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;c=b+12|0;b=h+12|0;k[c+0>>2]=k[b+0>>2];k[c+4>>2]=k[b+4>>2];k[c+8>>2]=k[b+8>>2];k[b+0>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;b=k[d>>2]|0}k[d>>2]=b+24}else{e=k[c>>2]|0;f=(b-e|0)/24|0;d=f+1|0;if((d|0)<0)Fl(c);b=(g-e|0)/24|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?d:b}else b=2147483647;Kl(N,b,f,c+12|0);b=N+8|0;d=k[b>>2]|0;if(d){k[d+0>>2]=k[h+0>>2];k[d+4>>2]=k[h+4>>2];k[d+8>>2]=k[h+8>>2];k[h+0>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;J=d+12|0;K=h+12|0;k[J+0>>2]=k[K+0>>2];k[J+4>>2]=k[K+4>>2];k[J+8>>2]=k[K+8>>2];k[K+0>>2]=0;k[K+4>>2]=0;k[K+8>>2]=0}k[b>>2]=d+24;Ml(c,N);Ll(N)}hl(h);a=a+1|0;break a}default:break a}while(0);while(0);r=O;return a|0}function Ol(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(c>>>0>4294967279)ql(a);if(c>>>0<11){i[a>>0]=c<<1;a=a+1|0}else{e=c+16&-16;d=xm(e)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=c;a=d}_m(a|0,b|0,c|0)|0;i[a+c>>0]=0;return}function Pl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=i[a>>0]|0;if(!(b&1)){c=(b&255)>>>1;f=a+1|0}else{c=k[a+4>>2]|0;f=k[a+8>>2]|0}d=(c|0)!=0&1;e=c-d|0;if((c|0)!=(d|0)){an(f|0,f+d|0,e|0)|0;b=i[a>>0]|0}if(!(b&1))i[a>>0]=e<<1;else k[a+4>>2]=e;i[f+e>>0]=0;return} - -// EMSCRIPTEN_END_FUNCS -var kc=[oo,oo,on,oo,pn,oo,qn,oo,rn,oo,sn,oo,nd,rd,Xd,Yd,Sk,Rk,Sm,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo];var lc=[po,po,un,po,vn,po,wn,po,xn,po,yn,po,Zk,Yk,po,po];var mc=[qo,qo,An,qo,Bn,qo,Cn,qo,Dn,qo,En,qo,kd,md,Rd,Sd,Dk,Ek,Lk,Pk,Mk,Nk,Ok,Qk,wg,lh,ri,xl,qo,qo,qo,qo];var nc=[ro,ro,Gn,ro,Hn,ro,In,ro,Jn,ro,Kn,ro,vd,_d,Fk,mi];var oc=[so,so,Mn,so,Nn,so,On,so,Pn,so,Qn,so,cl,ll,so,so];var pc=[to,to,Sn,to,Tn,to,Un,to,Vn,to,Wn,to,to,to,to,to];var qc=[uo,uo,Yn,uo,Zn,uo,_n,uo,$n,uo,ao,uo,$k,_k,uo,uo];var rc=[vo,vo,co,vo,eo,vo,fo,vo,go,vo,ho,vo,vo,vo,vo,vo];var sc=[wo,wo,jo,wo,ko,wo,lo,wo,mo,wo,no,wo,sd,Zd,Uk,Vk];return{_strlen:Zm,_emscripten_bind_RAROpenArchiveDataEx_set_OpenMode_1:$i,_emscripten_bind_RAROpenArchiveDataEx_get_OpenMode_0:_i,_emscripten_bind_RAROpenArchiveDataEx_get_OpenResult_0:aj,_emscripten_bind_RARHeaderDataEx_get_ArcName_1:qj,___cxa_can_catch:al,_memset:Ym,_emscripten_bind_RARHeaderDataEx_get_FileAttr_0:Ej,_emscripten_bind_RAROpenArchiveDataEx_get_Reserved_1:mj,_RAROpenArchiveEx:Ci,_bitshift64Lshr:Xm,_emscripten_bind_RARHeaderDataEx_get_Reserved_1:Oj,_emscripten_bind_RARHeaderDataEx_get_UnpVer_0:Cj,_i64Subtract:Um,_emscripten_bind_RAROpenArchiveDataEx_RAROpenArchiveDataEx_0:Vi,_bitshift64Shl:$m,_emscripten_bind_RARHeaderDataEx_get_CmtState_0:Kj,___cxa_demangle:wk,_emscripten_bind_RARHeaderDataEx_get_FileCRC_0:Aj,_malloc:xm,_emscripten_bind_RARHeaderDataEx_get_PackSizeHigh_0:wj,_strncpy:Wm,_RARReadHeaderEx:Ei,_emscripten_bind_VoidPtr___destroy___0:Rj,_emscripten_bind_RAROpenArchiveDataEx_set_Callback_1:jj,_emscripten_bind_RARHeaderDataEx_get_CmtBuf_0:Fj,_emscripten_bind_RARHeaderDataEx_get_HostOS_0:zj,_emscripten_bind_RAROpenArchiveDataEx_set_ArcNameW_1:Zi,_emscripten_bind_RARHeaderDataEx_get_DictSize_0:Lj,_memcpy:_m,_emscripten_bind_RARHeaderDataEx_get_UnpSizeHigh_0:yj,_RARProcessFileW:Gi,_emscripten_bind_RAROpenArchiveDataEx_get_Callback_0:ij,_emscripten_bind_RAROpenArchiveDataEx_get_CmtBuf_0:bj,_emscripten_bind_RAROpenArchiveDataEx_get_ArcNameW_0:Yi,_RARSetCallback:Hi,_emscripten_bind_RARHeaderDataEx_get_ArcNameW_1:rj,_emscripten_bind_RAROpenArchiveDataEx_set_Reserved_2:nj,_emscripten_bind_RAROpenArchiveDataEx_get_Flags_0:hj,_emscripten_bind_RARHeaderDataEx_get_FileTime_0:Bj,_realloc:zm,_i64Add:Vm,_emscripten_bind_RAROpenArchiveDataEx_set_CmtBuf_1:cj,_emscripten_bind_RARHeaderDataEx_get_CmtSize_0:Jj,_emscripten_bind_RARHeaderDataEx_get_FileName_1:sj,_emscripten_bind_RARHeaderDataEx_get_PackSize_0:vj,_emscripten_bind_RARHeaderDataEx_get_CmtBufSize_0:Hj,_emscripten_bind_RARHeaderDataEx_get_HashType_0:Mj,_RARGetDllVersion:Ji,_strcpy:cn,_emscripten_bind_RARHeaderDataEx_get_Method_0:Dj,_emscripten_bind_RARHeaderDataEx___destroy___0:Qj,_llvm_bswap_i32:bn,_emscripten_bind_RAROpenArchiveDataEx_get_CmtBufSize_0:dj,_emscripten_bind_RARHeaderDataEx_get_FileNameW_1:tj,_emscripten_bind_RAROpenArchiveDataEx_get_CmtState_0:gj,_RARSetPassword:Ii,_free:ym,_emscripten_bind_RAROpenArchiveDataEx_set_ArcName_1:Xi,_emscripten_bind_RAROpenArchiveDataEx_get_UserData_0:kj,_memmove:an,_emscripten_bind_RARHeaderDataEx_RARHeaderDataEx_0:pj,_emscripten_bind_RAROpenArchiveDataEx_get_ArcName_0:Wi,_emscripten_bind_RARHeaderDataEx_set_CmtBufSize_1:Ij,_emscripten_bind_RARHeaderDataEx_set_Reserved_2:Pj,_emscripten_bind_RARHeaderDataEx_get_Hash_1:Nj,_emscripten_bind_RAROpenArchiveDataEx_set_UserData_1:lj,_emscripten_bind_RARHeaderDataEx_get_UnpSize_0:xj,_emscripten_bind_RAROpenArchiveDataEx_get_CmtSize_0:fj,_emscripten_bind_RARHeaderDataEx_get_Flags_0:uj,_RARCloseArchive:Di,_emscripten_bind_RAROpenArchiveDataEx___destroy___0:oj,_emscripten_bind_RAROpenArchiveDataEx_set_CmtBufSize_1:ej,_emscripten_bind_RARHeaderDataEx_set_CmtBuf_1:Gj,___cxa_is_pointer_type:bl,__GLOBAL__sub_I_global_cpp:id,__GLOBAL__sub_I_crc_cpp:Oe,__GLOBAL__sub_I_threadpool_cpp:qi,runPostSets:Tm,_emscripten_replace_memory:_emscripten_replace_memory,stackAlloc:tc,stackSave:uc,stackRestore:vc,setThrew:wc,setTempRet0:zc,getTempRet0:Ac,dynCall_iiii:nn,dynCall_viiiii:tn,dynCall_vi:zn,dynCall_ii:Fn,dynCall_v:Ln,dynCall_iiiii:Rn,dynCall_viiiiii:Xn,dynCall_iii:bo,dynCall_viiii:io}}) - - -// EMSCRIPTEN_END_ASM -(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _strlen=Module["_strlen"]=asm["_strlen"];var _emscripten_bind_RAROpenArchiveDataEx_set_OpenMode_1=Module["_emscripten_bind_RAROpenArchiveDataEx_set_OpenMode_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_OpenMode_1"];var _emscripten_bind_RAROpenArchiveDataEx_get_OpenMode_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_OpenMode_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_OpenMode_0"];var _emscripten_bind_RAROpenArchiveDataEx_get_OpenResult_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_OpenResult_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_OpenResult_0"];var _emscripten_bind_RARHeaderDataEx_get_ArcName_1=Module["_emscripten_bind_RARHeaderDataEx_get_ArcName_1"]=asm["_emscripten_bind_RARHeaderDataEx_get_ArcName_1"];var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var _memset=Module["_memset"]=asm["_memset"];var _emscripten_bind_RARHeaderDataEx_get_FileAttr_0=Module["_emscripten_bind_RARHeaderDataEx_get_FileAttr_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_FileAttr_0"];var _emscripten_bind_RAROpenArchiveDataEx_get_Reserved_1=Module["_emscripten_bind_RAROpenArchiveDataEx_get_Reserved_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_Reserved_1"];var _RAROpenArchiveEx=Module["_RAROpenArchiveEx"]=asm["_RAROpenArchiveEx"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _emscripten_bind_RARHeaderDataEx_get_Reserved_1=Module["_emscripten_bind_RARHeaderDataEx_get_Reserved_1"]=asm["_emscripten_bind_RARHeaderDataEx_get_Reserved_1"];var _emscripten_bind_RARHeaderDataEx_get_UnpVer_0=Module["_emscripten_bind_RARHeaderDataEx_get_UnpVer_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_UnpVer_0"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _emscripten_bind_RAROpenArchiveDataEx_RAROpenArchiveDataEx_0=Module["_emscripten_bind_RAROpenArchiveDataEx_RAROpenArchiveDataEx_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_RAROpenArchiveDataEx_0"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_bind_RARHeaderDataEx_get_CmtState_0=Module["_emscripten_bind_RARHeaderDataEx_get_CmtState_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_CmtState_0"];var ___cxa_demangle=Module["___cxa_demangle"]=asm["___cxa_demangle"];var _emscripten_bind_RARHeaderDataEx_get_FileCRC_0=Module["_emscripten_bind_RARHeaderDataEx_get_FileCRC_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_FileCRC_0"];var _malloc=Module["_malloc"]=asm["_malloc"];var _emscripten_bind_RARHeaderDataEx_get_PackSizeHigh_0=Module["_emscripten_bind_RARHeaderDataEx_get_PackSizeHigh_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_PackSizeHigh_0"];var _strncpy=Module["_strncpy"]=asm["_strncpy"];var _RARReadHeaderEx=Module["_RARReadHeaderEx"]=asm["_RARReadHeaderEx"];var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=asm["_emscripten_bind_VoidPtr___destroy___0"];var _emscripten_bind_RAROpenArchiveDataEx_set_Callback_1=Module["_emscripten_bind_RAROpenArchiveDataEx_set_Callback_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_Callback_1"];var _emscripten_bind_RARHeaderDataEx_get_CmtBuf_0=Module["_emscripten_bind_RARHeaderDataEx_get_CmtBuf_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_CmtBuf_0"];var _emscripten_bind_RARHeaderDataEx_get_HostOS_0=Module["_emscripten_bind_RARHeaderDataEx_get_HostOS_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_HostOS_0"];var _emscripten_bind_RAROpenArchiveDataEx_set_ArcNameW_1=Module["_emscripten_bind_RAROpenArchiveDataEx_set_ArcNameW_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_ArcNameW_1"];var _emscripten_bind_RARHeaderDataEx_get_DictSize_0=Module["_emscripten_bind_RARHeaderDataEx_get_DictSize_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_DictSize_0"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _emscripten_bind_RARHeaderDataEx_get_UnpSizeHigh_0=Module["_emscripten_bind_RARHeaderDataEx_get_UnpSizeHigh_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_UnpSizeHigh_0"];var _RARProcessFileW=Module["_RARProcessFileW"]=asm["_RARProcessFileW"];var _emscripten_bind_RAROpenArchiveDataEx_get_Callback_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_Callback_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_Callback_0"];var _emscripten_bind_RAROpenArchiveDataEx_get_CmtBuf_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_CmtBuf_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_CmtBuf_0"];var _emscripten_bind_RAROpenArchiveDataEx_get_ArcNameW_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_ArcNameW_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_ArcNameW_0"];var _RARSetCallback=Module["_RARSetCallback"]=asm["_RARSetCallback"];var _emscripten_bind_RARHeaderDataEx_get_ArcNameW_1=Module["_emscripten_bind_RARHeaderDataEx_get_ArcNameW_1"]=asm["_emscripten_bind_RARHeaderDataEx_get_ArcNameW_1"];var _emscripten_bind_RAROpenArchiveDataEx_set_Reserved_2=Module["_emscripten_bind_RAROpenArchiveDataEx_set_Reserved_2"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_Reserved_2"];var _emscripten_bind_RAROpenArchiveDataEx_get_Flags_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_Flags_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_Flags_0"];var _emscripten_bind_RARHeaderDataEx_get_FileTime_0=Module["_emscripten_bind_RARHeaderDataEx_get_FileTime_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_FileTime_0"];var _realloc=Module["_realloc"]=asm["_realloc"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _emscripten_bind_RAROpenArchiveDataEx_set_CmtBuf_1=Module["_emscripten_bind_RAROpenArchiveDataEx_set_CmtBuf_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_CmtBuf_1"];var _emscripten_bind_RARHeaderDataEx_get_CmtSize_0=Module["_emscripten_bind_RARHeaderDataEx_get_CmtSize_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_CmtSize_0"];var _emscripten_bind_RARHeaderDataEx_get_FileName_1=Module["_emscripten_bind_RARHeaderDataEx_get_FileName_1"]=asm["_emscripten_bind_RARHeaderDataEx_get_FileName_1"];var _emscripten_bind_RARHeaderDataEx_get_PackSize_0=Module["_emscripten_bind_RARHeaderDataEx_get_PackSize_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_PackSize_0"];var _emscripten_bind_RARHeaderDataEx_get_CmtBufSize_0=Module["_emscripten_bind_RARHeaderDataEx_get_CmtBufSize_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_CmtBufSize_0"];var _emscripten_bind_RARHeaderDataEx_get_HashType_0=Module["_emscripten_bind_RARHeaderDataEx_get_HashType_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_HashType_0"];var _RARGetDllVersion=Module["_RARGetDllVersion"]=asm["_RARGetDllVersion"];var _strcpy=Module["_strcpy"]=asm["_strcpy"];var _emscripten_bind_RARHeaderDataEx_get_Method_0=Module["_emscripten_bind_RARHeaderDataEx_get_Method_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_Method_0"];var _emscripten_bind_RARHeaderDataEx___destroy___0=Module["_emscripten_bind_RARHeaderDataEx___destroy___0"]=asm["_emscripten_bind_RARHeaderDataEx___destroy___0"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _emscripten_bind_RAROpenArchiveDataEx_get_CmtBufSize_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_CmtBufSize_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_CmtBufSize_0"];var _emscripten_bind_RARHeaderDataEx_get_FileNameW_1=Module["_emscripten_bind_RARHeaderDataEx_get_FileNameW_1"]=asm["_emscripten_bind_RARHeaderDataEx_get_FileNameW_1"];var _emscripten_bind_RAROpenArchiveDataEx_get_CmtState_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_CmtState_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_CmtState_0"];var _RARSetPassword=Module["_RARSetPassword"]=asm["_RARSetPassword"];var _free=Module["_free"]=asm["_free"];var _emscripten_bind_RAROpenArchiveDataEx_set_ArcName_1=Module["_emscripten_bind_RAROpenArchiveDataEx_set_ArcName_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_ArcName_1"];var _emscripten_bind_RAROpenArchiveDataEx_get_UserData_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_UserData_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_UserData_0"];var _memmove=Module["_memmove"]=asm["_memmove"];var _emscripten_bind_RARHeaderDataEx_RARHeaderDataEx_0=Module["_emscripten_bind_RARHeaderDataEx_RARHeaderDataEx_0"]=asm["_emscripten_bind_RARHeaderDataEx_RARHeaderDataEx_0"];var _emscripten_bind_RAROpenArchiveDataEx_get_ArcName_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_ArcName_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_ArcName_0"];var _emscripten_bind_RARHeaderDataEx_set_CmtBufSize_1=Module["_emscripten_bind_RARHeaderDataEx_set_CmtBufSize_1"]=asm["_emscripten_bind_RARHeaderDataEx_set_CmtBufSize_1"];var _emscripten_bind_RARHeaderDataEx_set_Reserved_2=Module["_emscripten_bind_RARHeaderDataEx_set_Reserved_2"]=asm["_emscripten_bind_RARHeaderDataEx_set_Reserved_2"];var _emscripten_bind_RARHeaderDataEx_get_Hash_1=Module["_emscripten_bind_RARHeaderDataEx_get_Hash_1"]=asm["_emscripten_bind_RARHeaderDataEx_get_Hash_1"];var _emscripten_bind_RAROpenArchiveDataEx_set_UserData_1=Module["_emscripten_bind_RAROpenArchiveDataEx_set_UserData_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_UserData_1"];var _emscripten_bind_RARHeaderDataEx_get_UnpSize_0=Module["_emscripten_bind_RARHeaderDataEx_get_UnpSize_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_UnpSize_0"];var _emscripten_bind_RAROpenArchiveDataEx_get_CmtSize_0=Module["_emscripten_bind_RAROpenArchiveDataEx_get_CmtSize_0"]=asm["_emscripten_bind_RAROpenArchiveDataEx_get_CmtSize_0"];var _emscripten_bind_RARHeaderDataEx_get_Flags_0=Module["_emscripten_bind_RARHeaderDataEx_get_Flags_0"]=asm["_emscripten_bind_RARHeaderDataEx_get_Flags_0"];var _RARCloseArchive=Module["_RARCloseArchive"]=asm["_RARCloseArchive"];var _emscripten_bind_RAROpenArchiveDataEx___destroy___0=Module["_emscripten_bind_RAROpenArchiveDataEx___destroy___0"]=asm["_emscripten_bind_RAROpenArchiveDataEx___destroy___0"];var _emscripten_bind_RAROpenArchiveDataEx_set_CmtBufSize_1=Module["_emscripten_bind_RAROpenArchiveDataEx_set_CmtBufSize_1"]=asm["_emscripten_bind_RAROpenArchiveDataEx_set_CmtBufSize_1"];var _emscripten_bind_RARHeaderDataEx_set_CmtBuf_1=Module["_emscripten_bind_RARHeaderDataEx_set_CmtBuf_1"]=asm["_emscripten_bind_RARHeaderDataEx_set_CmtBuf_1"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var __GLOBAL__sub_I_global_cpp=Module["__GLOBAL__sub_I_global_cpp"]=asm["__GLOBAL__sub_I_global_cpp"];var __GLOBAL__sub_I_crc_cpp=Module["__GLOBAL__sub_I_crc_cpp"]=asm["__GLOBAL__sub_I_crc_cpp"];var __GLOBAL__sub_I_threadpool_cpp=Module["__GLOBAL__sub_I_threadpool_cpp"]=asm["__GLOBAL__sub_I_threadpool_cpp"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];var i64Math=(function(){var goog={math:{}};goog.math.Long=(function(low,high){this.low_=low|0;this.high_=high|0});goog.math.Long.IntCache_={};goog.math.Long.fromInt=(function(value){if(-128<=value&&value<128){var cachedObj=goog.math.Long.IntCache_[value];if(cachedObj){return cachedObj}}var obj=new goog.math.Long(value|0,value<0?-1:0);if(-128<=value&&value<128){goog.math.Long.IntCache_[value]=obj}return obj});goog.math.Long.fromNumber=(function(value){if(isNaN(value)||!isFinite(value)){return goog.math.Long.ZERO}else if(value<=-goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MIN_VALUE}else if(value+1>=goog.math.Long.TWO_PWR_63_DBL_){return goog.math.Long.MAX_VALUE}else if(value<0){return goog.math.Long.fromNumber(-value).negate()}else{return new goog.math.Long(value%goog.math.Long.TWO_PWR_32_DBL_|0,value/goog.math.Long.TWO_PWR_32_DBL_|0)}});goog.math.Long.fromBits=(function(lowBits,highBits){return new goog.math.Long(lowBits,highBits)});goog.math.Long.fromString=(function(str,opt_radix){if(str.length==0){throw Error("number format error: empty string")}var radix=opt_radix||10;if(radix<2||36=0){throw Error('number format error: interior "-" character: '+str)}var radixToPower=goog.math.Long.fromNumber(Math.pow(radix,8));var result=goog.math.Long.ZERO;for(var i=0;i=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_});goog.math.Long.prototype.getNumBitsAbs=(function(){if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){return 64}else{return this.negate().getNumBitsAbs()}}else{var val=this.high_!=0?this.high_:this.low_;for(var bit=31;bit>0;bit--){if((val&1<0});goog.math.Long.prototype.greaterThanOrEqual=(function(other){return this.compare(other)>=0});goog.math.Long.prototype.compare=(function(other){if(this.equals(other)){return 0}var thisNeg=this.isNegative();var otherNeg=other.isNegative();if(thisNeg&&!otherNeg){return-1}if(!thisNeg&&otherNeg){return 1}if(this.subtract(other).isNegative()){return-1}else{return 1}});goog.math.Long.prototype.negate=(function(){if(this.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.MIN_VALUE}else{return this.not().add(goog.math.Long.ONE)}});goog.math.Long.prototype.add=(function(other){var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00+b00;c16+=c00>>>16;c00&=65535;c16+=a16+b16;c32+=c16>>>16;c16&=65535;c32+=a32+b32;c48+=c32>>>16;c32&=65535;c48+=a48+b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.subtract=(function(other){return this.add(other.negate())});goog.math.Long.prototype.multiply=(function(other){if(this.isZero()){return goog.math.Long.ZERO}else if(other.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){return other.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}else if(other.equals(goog.math.Long.MIN_VALUE)){return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().multiply(other.negate())}else{return this.negate().multiply(other).negate()}}else if(other.isNegative()){return this.multiply(other.negate()).negate()}if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&other.lessThan(goog.math.Long.TWO_PWR_24_)){return goog.math.Long.fromNumber(this.toNumber()*other.toNumber())}var a48=this.high_>>>16;var a32=this.high_&65535;var a16=this.low_>>>16;var a00=this.low_&65535;var b48=other.high_>>>16;var b32=other.high_&65535;var b16=other.low_>>>16;var b00=other.low_&65535;var c48=0,c32=0,c16=0,c00=0;c00+=a00*b00;c16+=c00>>>16;c00&=65535;c16+=a16*b00;c32+=c16>>>16;c16&=65535;c16+=a00*b16;c32+=c16>>>16;c16&=65535;c32+=a32*b00;c48+=c32>>>16;c32&=65535;c32+=a16*b16;c48+=c32>>>16;c32&=65535;c32+=a00*b32;c48+=c32>>>16;c32&=65535;c48+=a48*b00+a32*b16+a16*b32+a00*b48;c48&=65535;return goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)});goog.math.Long.prototype.div=(function(other){if(other.isZero()){throw Error("division by zero")}else if(this.isZero()){return goog.math.Long.ZERO}if(this.equals(goog.math.Long.MIN_VALUE)){if(other.equals(goog.math.Long.ONE)||other.equals(goog.math.Long.NEG_ONE)){return goog.math.Long.MIN_VALUE}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ONE}else{var halfThis=this.shiftRight(1);var approx=halfThis.div(other).shiftLeft(1);if(approx.equals(goog.math.Long.ZERO)){return other.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE}else{var rem=this.subtract(other.multiply(approx));var result=approx.add(rem.div(other));return result}}}else if(other.equals(goog.math.Long.MIN_VALUE)){return goog.math.Long.ZERO}if(this.isNegative()){if(other.isNegative()){return this.negate().div(other.negate())}else{return this.negate().div(other).negate()}}else if(other.isNegative()){return this.div(other.negate()).negate()}var res=goog.math.Long.ZERO;var rem=this;while(rem.greaterThanOrEqual(other)){var approx=Math.max(1,Math.floor(rem.toNumber()/other.toNumber()));var log2=Math.ceil(Math.log(approx)/Math.LN2);var delta=log2<=48?1:Math.pow(2,log2-48);var approxRes=goog.math.Long.fromNumber(approx);var approxRem=approxRes.multiply(other);while(approxRem.isNegative()||approxRem.greaterThan(rem)){approx-=delta;approxRes=goog.math.Long.fromNumber(approx);approxRem=approxRes.multiply(other)}if(approxRes.isZero()){approxRes=goog.math.Long.ONE}res=res.add(approxRes);rem=rem.subtract(approxRem)}return res});goog.math.Long.prototype.modulo=(function(other){return this.subtract(this.div(other).multiply(other))});goog.math.Long.prototype.not=(function(){return goog.math.Long.fromBits(~this.low_,~this.high_)});goog.math.Long.prototype.and=(function(other){return goog.math.Long.fromBits(this.low_&other.low_,this.high_&other.high_)});goog.math.Long.prototype.or=(function(other){return goog.math.Long.fromBits(this.low_|other.low_,this.high_|other.high_)});goog.math.Long.prototype.xor=(function(other){return goog.math.Long.fromBits(this.low_^other.low_,this.high_^other.high_)});goog.math.Long.prototype.shiftLeft=(function(numBits){numBits&=63;if(numBits==0){return this}else{var low=this.low_;if(numBits<32){var high=this.high_;return goog.math.Long.fromBits(low<>>32-numBits)}else{return goog.math.Long.fromBits(0,low<>>numBits|high<<32-numBits,high>>numBits)}else{return goog.math.Long.fromBits(high>>numBits-32,high>=0?0:-1)}}});goog.math.Long.prototype.shiftRightUnsigned=(function(numBits){numBits&=63;if(numBits==0){return this}else{var high=this.high_;if(numBits<32){var low=this.low_;return goog.math.Long.fromBits(low>>>numBits|high<<32-numBits,high>>>numBits)}else if(numBits==32){return goog.math.Long.fromBits(high,0)}else{return goog.math.Long.fromBits(high>>>numBits-32,0)}}});var navigator={appName:"Modern Browser"};var dbits;var canary=0xdeadbeefcafe;var j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){if(a!=null)if("number"==typeof a)this.fromNumber(a,b,c);else if(b==null&&"string"!=typeof a)this.fromString(a,256);else this.fromString(a,b)}function nbi(){return new BigInteger(null)}function am1(i,x,w,j,c,n){while(--n>=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<=0;--i)r[i]=this[i];r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=x<0?-1:0;if(x>0)this[0]=x;else if(x<-1)this[0]=x+DV;else this.t=0}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16)k=4;else if(b==8)k=3;else if(b==256)k=8;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else{this.fromRadix(s,b);return}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=k==8?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-")mi=true;continue}mi=false;if(sh==0)this[this.t++]=x;else if(sh+k>this.DB){this[this.t-1]|=(x&(1<>this.DB-sh}else this[this.t-1]|=x<=this.DB)sh-=this.DB}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0)this[this.t-1]|=(1<0&&this[this.t-1]==c)--this.t}function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(b==16)k=4;else if(b==8)k=3;else if(b==2)k=1;else if(b==32)k=5;else if(b==4)k=2;else return this.toRadix(b);var km=(1<0){if(p>p)>0){m=true;r=int2char(d)}while(i>=0){if(p>(p+=this.DB-k)}else{d=this[i]>>(p-=k)&km;if(p<=0){p+=this.DB;--i}}if(d>0)m=true;if(m)r+=int2char(d)}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0)return r;var i=this.t;r=i-a.t;if(r!=0)return this.s<0?-r:r;while(--i>=0)if((r=this[i]-a[i])!=0)return r;return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i=0;--i){r[i+ds+1]=this[i]>>cbs|c;c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<>bs;for(var i=ds+1;i>bs}if(bs>0)r[this.t-ds-1]|=(this.s&bm)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c-=a.s}r.s=c<0?-1:0;if(c<-1)r[i++]=this.DV+c;else if(c>0)r[i++]=c;r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0)r[i]=0;for(i=0;i=0)r[i]=0;for(i=0;i=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0)r[r.t-1]+=x.am(i,x[i],r,2*i,0,1);r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0)return;var pt=this.abs();if(pt.t0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0)return;var yt=y0*(1<1?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t=0){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0)r.rShiftTo(nsh,r);if(ts<0)BigInteger.ZERO.subTo(r,r)}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0)a.subTo(r,r);return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0)return x.mod(this.m);else return x}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var x=this[0];if((x&1)==0)return 0;var y=x&3;y=y*(2-(x&15)*y)&15;y=y*(2-(x&255)*y)&255;y=y*(2-((x&65535)*y&65535))&65535;y=y*(2-x*y%this.DV)%this.DV;return y>0?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(r,r);return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0)x.subTo(this.m,x)}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven())z=new Classic(m);else z=new Montgomery(m);return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnpFromRadix(s,b){this.fromInt(0);if(b==null)b=10;var cs=this.chunkSize(b);var d=Math.pow(b,cs),mi=false,j=0,w=0;for(var i=0;i=cs){this.dMultiply(d);this.dAddOffset(w,0);j=0;w=0}}if(j>0){this.dMultiply(Math.pow(b,j));this.dAddOffset(w,0)}if(mi)BigInteger.ZERO.subTo(this,this)}function bnpChunkSize(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}function bnSigNum(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function bnpDMultiply(n){this[this.t]=this.am(0,n-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(n,w){if(n==0)return;while(this.t<=w)this[this.t++]=0;this[w]+=n;while(this[w]>=this.DV){this[w]-=this.DV;if(++w>=this.t)this[this.t++]=0;++this[w]}}function bnpToRadix(b){if(b==null)b=10;if(this.signum()==0||b<2||b>36)return"0";var cs=this.chunkSize(b);var a=Math.pow(b,cs);var d=nbv(a),y=nbi(),z=nbi(),r="";this.divRemTo(d,y,z);while(y.signum()>0){r=(a+z.intValue()).toString(b).substr(1)+r;y.divRemTo(d,y,z)}return z.intValue().toString(b)+r}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c+=a.s}r.s=c<0?-1:0;if(c>0)r[i++]=c;else if(c<-1)r[i++]=this.DV+c;r.t=i;r.clamp()}BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.addTo=bnpAddTo;var Wrapper={abs:(function(l,h){var x=new goog.math.Long(l,h);var ret;if(x.isNegative()){ret=x.negate()}else{ret=x}HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_}),ensureTemps:(function(){if(Wrapper.ensuredTemps)return;Wrapper.ensuredTemps=true;Wrapper.two32=new BigInteger;Wrapper.two32.fromString("4294967296",10);Wrapper.two64=new BigInteger;Wrapper.two64.fromString("18446744073709551616",10);Wrapper.temp1=new BigInteger;Wrapper.temp2=new BigInteger}),lh2bignum:(function(l,h){var a=new BigInteger;a.fromString(h.toString(),10);var b=new BigInteger;a.multiplyTo(Wrapper.two32,b);var c=new BigInteger;c.fromString(l.toString(),10);var d=new BigInteger;c.addTo(b,d);return d}),stringify:(function(l,h,unsigned){var ret=(new goog.math.Long(l,h)).toString();if(unsigned&&ret[0]=="-"){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(ret,10);ret=new BigInteger;Wrapper.two64.addTo(bignum,ret);ret=ret.toString(10)}return ret}),fromString:(function(str,base,min,max,unsigned){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(str,base);var bigmin=new BigInteger;bigmin.fromString(min,10);var bigmax=new BigInteger;bigmax.fromString(max,10);if(unsigned&&bignum.compareTo(BigInteger.ZERO)<0){var temp=new BigInteger;bignum.addTo(Wrapper.two64,temp);bignum=temp}var error=false;if(bignum.compareTo(bigmin)<0){bignum=bigmin;error=true}else if(bignum.compareTo(bigmax)>0){bignum=bigmax;error=true}var ret=goog.math.Long.fromString(bignum.toString());HEAP32[tempDoublePtr>>2]=ret.low_;HEAP32[tempDoublePtr+4>>2]=ret.high_;if(error)throw"range error"})};return Wrapper})();if(memoryInitializer){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,STATIC_BASE)}else{addRunDependency("memory initializer");function applyMemoryInitializer(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,STATIC_BASE);removeRunDependency("memory initializer")}var request=Module["memoryInitializerRequest"];if(request){if(request.response){setTimeout((function(){applyMemoryInitializer(request.response)}),0)}else{request.addEventListener("load",(function(){if(request.status!==200&&request.status!==0){console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status)}if(!request.response||typeof request.response!=="object"||!request.response.byteLength){console.warn("a problem seems to have happened with Module.memoryInitializerRequest response (expected ArrayBuffer): "+request.response)}applyMemoryInitializer(request.response)}))}}else{Browser.asyncLoad(memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(ENVIRONMENT_IS_WEB&&preloadStartTime!==null){Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms")}if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status){if(Module["noExitRuntime"]){return}ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status);if(ENVIRONMENT_IS_NODE){process["stdout"]["once"]("drain",(function(){process["exit"](status)}));console.log(" ");setTimeout((function(){process["exit"](status)}),500)}else if(ENVIRONMENT_IS_SHELL&&typeof quit==="function"){quit(status)}throw new ExitStatus(status)}Module["exit"]=Module.exit=exit;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;abortDecorators.forEach((function(decorator){output=decorator(output,what)}));throw output}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureString=(function(){var stringCache={};function ensureString(value){if(typeof value=="string"){var cachedVal=stringCache[value];if(cachedVal)return cachedVal;var ret=allocate(intArrayFromString(value),"i8",ALLOC_STACK);stringCache[value]=ret;return ret}return value}return ensureString})();function RAROpenArchiveDataEx(){this.ptr=_emscripten_bind_RAROpenArchiveDataEx_RAROpenArchiveDataEx_0();getCache(RAROpenArchiveDataEx)[this.ptr]=this}RAROpenArchiveDataEx.prototype=Object.create(WrapperObject.prototype);RAROpenArchiveDataEx.prototype.constructor=RAROpenArchiveDataEx;RAROpenArchiveDataEx.prototype.__class__=RAROpenArchiveDataEx;RAROpenArchiveDataEx.__cache__={};Module["RAROpenArchiveDataEx"]=RAROpenArchiveDataEx;RAROpenArchiveDataEx.prototype["get_ArcName"]=(function(){var self=this.ptr;return Pointer_stringify(_emscripten_bind_RAROpenArchiveDataEx_get_ArcName_0(self))});RAROpenArchiveDataEx.prototype["set_ArcName"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RAROpenArchiveDataEx_set_ArcName_1(self,arg0)});RAROpenArchiveDataEx.prototype["get_ArcNameW"]=(function(){var self=this.ptr;return Pointer_stringify(_emscripten_bind_RAROpenArchiveDataEx_get_ArcNameW_0(self))});RAROpenArchiveDataEx.prototype["set_ArcNameW"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RAROpenArchiveDataEx_set_ArcNameW_1(self,arg0)});RAROpenArchiveDataEx.prototype["get_OpenMode"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_OpenMode_0(self)});RAROpenArchiveDataEx.prototype["set_OpenMode"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RAROpenArchiveDataEx_set_OpenMode_1(self,arg0)});RAROpenArchiveDataEx.prototype["get_OpenResult"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_OpenResult_0(self)});RAROpenArchiveDataEx.prototype["get_CmtBuf"]=(function(){var self=this.ptr;return Pointer_stringify(_emscripten_bind_RAROpenArchiveDataEx_get_CmtBuf_0(self))});RAROpenArchiveDataEx.prototype["set_CmtBuf"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RAROpenArchiveDataEx_set_CmtBuf_1(self,arg0)});RAROpenArchiveDataEx.prototype["get_CmtBufSize"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_CmtBufSize_0(self)});RAROpenArchiveDataEx.prototype["set_CmtBufSize"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RAROpenArchiveDataEx_set_CmtBufSize_1(self,arg0)});RAROpenArchiveDataEx.prototype["get_CmtSize"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_CmtSize_0(self)});RAROpenArchiveDataEx.prototype["get_CmtState"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_CmtState_0(self)});RAROpenArchiveDataEx.prototype["get_Flags"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_Flags_0(self)});RAROpenArchiveDataEx.prototype["get_Callback"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_Callback_0(self)});RAROpenArchiveDataEx.prototype["set_Callback"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RAROpenArchiveDataEx_set_Callback_1(self,arg0)});RAROpenArchiveDataEx.prototype["get_UserData"]=(function(){var self=this.ptr;return _emscripten_bind_RAROpenArchiveDataEx_get_UserData_0(self)});RAROpenArchiveDataEx.prototype["set_UserData"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RAROpenArchiveDataEx_set_UserData_1(self,arg0)});RAROpenArchiveDataEx.prototype["get_Reserved"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);return _emscripten_bind_RAROpenArchiveDataEx_get_Reserved_1(self,arg0)});RAROpenArchiveDataEx.prototype["set_Reserved"]=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);_emscripten_bind_RAROpenArchiveDataEx_set_Reserved_2(self,arg0,arg1)});RAROpenArchiveDataEx.prototype["__destroy__"]=(function(){var self=this.ptr;_emscripten_bind_RAROpenArchiveDataEx___destroy___0(self)});function RARHeaderDataEx(){this.ptr=_emscripten_bind_RARHeaderDataEx_RARHeaderDataEx_0();getCache(RARHeaderDataEx)[this.ptr]=this}RARHeaderDataEx.prototype=Object.create(WrapperObject.prototype);RARHeaderDataEx.prototype.constructor=RARHeaderDataEx;RARHeaderDataEx.prototype.__class__=RARHeaderDataEx;RARHeaderDataEx.__cache__={};Module["RARHeaderDataEx"]=RARHeaderDataEx;RARHeaderDataEx.prototype["get_ArcName"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);return _emscripten_bind_RARHeaderDataEx_get_ArcName_1(self,arg0)});RARHeaderDataEx.prototype["get_ArcNameW"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);return _emscripten_bind_RARHeaderDataEx_get_ArcNameW_1(self,arg0)});RARHeaderDataEx.prototype["get_FileName"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);return _emscripten_bind_RARHeaderDataEx_get_FileName_1(self,arg0)});RARHeaderDataEx.prototype["get_FileNameW"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);return _emscripten_bind_RARHeaderDataEx_get_FileNameW_1(self,arg0)});RARHeaderDataEx.prototype["get_Flags"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_Flags_0(self)});RARHeaderDataEx.prototype["get_PackSize"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_PackSize_0(self)});RARHeaderDataEx.prototype["get_PackSizeHigh"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_PackSizeHigh_0(self)});RARHeaderDataEx.prototype["get_UnpSize"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_UnpSize_0(self)});RARHeaderDataEx.prototype["get_UnpSizeHigh"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_UnpSizeHigh_0(self)});RARHeaderDataEx.prototype["get_HostOS"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_HostOS_0(self)});RARHeaderDataEx.prototype["get_FileCRC"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_FileCRC_0(self)});RARHeaderDataEx.prototype["get_FileTime"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_FileTime_0(self)});RARHeaderDataEx.prototype["get_UnpVer"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_UnpVer_0(self)});RARHeaderDataEx.prototype["get_Method"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_Method_0(self)});RARHeaderDataEx.prototype["get_FileAttr"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_FileAttr_0(self)});RARHeaderDataEx.prototype["get_CmtBuf"]=(function(){var self=this.ptr;return Pointer_stringify(_emscripten_bind_RARHeaderDataEx_get_CmtBuf_0(self))});RARHeaderDataEx.prototype["set_CmtBuf"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RARHeaderDataEx_set_CmtBuf_1(self,arg0)});RARHeaderDataEx.prototype["get_CmtBufSize"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_CmtBufSize_0(self)});RARHeaderDataEx.prototype["set_CmtBufSize"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);_emscripten_bind_RARHeaderDataEx_set_CmtBufSize_1(self,arg0)});RARHeaderDataEx.prototype["get_CmtSize"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_CmtSize_0(self)});RARHeaderDataEx.prototype["get_CmtState"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_CmtState_0(self)});RARHeaderDataEx.prototype["get_DictSize"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_DictSize_0(self)});RARHeaderDataEx.prototype["get_HashType"]=(function(){var self=this.ptr;return _emscripten_bind_RARHeaderDataEx_get_HashType_0(self)});RARHeaderDataEx.prototype["get_Hash"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);return _emscripten_bind_RARHeaderDataEx_get_Hash_1(self,arg0)});RARHeaderDataEx.prototype["get_Reserved"]=(function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);return _emscripten_bind_RARHeaderDataEx_get_Reserved_1(self,arg0)});RARHeaderDataEx.prototype["set_Reserved"]=(function(arg0,arg1){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0);if(arg1&&typeof arg1==="object")arg1=arg1.ptr;else arg1=ensureString(arg1);_emscripten_bind_RARHeaderDataEx_set_Reserved_2(self,arg0,arg1)});RARHeaderDataEx.prototype["__destroy__"]=(function(){var self=this.ptr;_emscripten_bind_RARHeaderDataEx___destroy___0(self)});function VoidPtr(){throw"cannot construct a VoidPtr, no constructor in IDL"}VoidPtr.prototype=Object.create(WrapperObject.prototype);VoidPtr.prototype.constructor=VoidPtr;VoidPtr.prototype.__class__=VoidPtr;VoidPtr.__cache__={};Module["VoidPtr"]=VoidPtr;VoidPtr.prototype["__destroy__"]=(function(){var self=this.ptr;_emscripten_bind_VoidPtr___destroy___0(self)});((function(){function setupEnums(){}if(Module["calledRun"])setupEnums();else addOnPreMain(setupEnums)}))() - -//My Code: -/* ---------------- - * CONSTANTS (from dll.hpp) - * --------------*/ - -"use strict"; - -var ERAR_SUCCESS = 0 -var ERAR_END_ARCHIVE = 10 -var ERAR_NO_MEMORY = 11 -var ERAR_BAD_DATA = 12 -var ERAR_BAD_ARCHIVE = 13 -var ERAR_UNKNOWN_FORMAT = 14 -var ERAR_EOPEN = 15 -var ERAR_ECREATE = 16 -var ERAR_ECLOSE = 17 -var ERAR_EREAD = 18 -var ERAR_EWRITE = 19 -var ERAR_SMALL_BUF = 20 -var ERAR_UNKNOWN = 21 -var ERAR_MISSING_PASSWORD = 22 -var ERAR_EREFERENCE = 23 -var ERAR_BAD_PASSWORD = 24 - -var RAR_OM_LIST = 0 -var RAR_OM_EXTRACT = 1 -var RAR_OM_LIST_INCSPLIT = 2 - -var RAR_SKIP = 0 -var RAR_TEST = 1 -var RAR_EXTRACT = 2 - -var RAR_VOL_ASK = 0 -var RAR_VOL_NOTIFY = 1 - -var RAR_DLL_VERSION = 6 - -var RAR_HASH_NONE = 0 -var RAR_HASH_CRC32 = 1 -var RAR_HASH_BLAKE2 = 2 - -var RHDF_SPLITBEFORE = 0x01 -var RHDF_SPLITAFTER = 0x02 -var RHDF_ENCRYPTED = 0x04 -var RHDF_SOLID = 0x10 -var RHDF_DIRECTORY = 0x20 - -var UCM_CHANGEVOLUME = 0 -var UCM_PROCESSDATA = 1 -var UCM_NEEDPASSWORD = 2 -var UCM_CHANGEVOLUMEW = 3 -var UCM_NEEDPASSWORDW = 4 - -/* ----------------- - * Error Reporting - * ----------------*/ - -var reportOpenError = function(code){ - switch(code) { - case ERAR_NO_MEMORY: - throw "Not enough memory to initialize data structures" - break - case ERAR_BAD_DATA: - throw "Archive header broken" - break - case ERAR_UNKNOWN_FORMAT: - throw "Unknown encryption used for archive headers" - break - case ERAR_EOPEN: - throw "File open error" - break - case ERAR_BAD_PASSWORD: - throw "Entered password is invalid. This code is returned only for archives in RAR 5.0 format" - break - case ERAR_BAD_ARCHIVE: - throw "Bad archive" - break - default: - throw "Unknown open error code" - break - } -} - -var reportReadHeaderError = function(code){ - switch(code) { - case ERAR_BAD_DATA: - throw "File header broken" - break - case ERAR_MISSING_PASSWORD: - throw "Password was not provided for encrypted file header" - break - case ERAR_BAD_PASSWORD: - throw "Bad password" - break - default: - throw "Unknown read header error code" - break - } -} - -var reportProcessFileError = function(code){ - switch(code) { - case ERAR_BAD_DATA: - throw "File CRC error" - break - case ERAR_UNKNOWN_FORMAT: - throw "Unknown archive format" - break - case ERAR_EOPEN: - throw "Volume open error" - break - case ERAR_ECREATE: - throw "File create error" - break - case ERAR_ECLOSE: - throw "File close error" - break - case ERAR_EREAD: - throw "Read error" - break - case ERAR_EWRITE: - throw "Write error" - break - case ERAR_NO_MEMORY: - throw "Not enough memory" - break - case ERAR_EREFERENCE: - throw "When attempting to unpack a reference record (see RAR -oi switch), source file for this reference was not found. Entire archive needs to be unpacked to properly create file references. This error is returned when attempting to unpack the reference record without its source file." - break - case ERAR_BAD_PASSWORD: - throw "Entered password is invalid. This code is returned only for archives in RAR 5.0 format" - break - case ERAR_MISSING_PASSWORD: - throw "Missing password" - break - default: - throw "Unknown Process File error code" - break - } -} - -/*-------------------------- - * Actual extraction code - *-------------------------*/ - - -var ShowArcInfo = function(Flags) { - // console.log("\nArchive %s\n",ArcName); -/* - console.log("Volume:\t\t%s",(Flags & 1) ? "yes":"no"); - console.log("Comment:\t%s",(Flags & 2) ? "yes":"no"); - console.log("Locked:\t\t%s",(Flags & 4) ? "yes":"no"); - console.log("Solid:\t\t%s",(Flags & 8) ? "yes":"no"); - console.log("New naming:\t%s",(Flags & 16) ? "yes":"no"); - console.log("Recovery:\t%s",(Flags & 64) ? "yes":"no"); - console.log("Encr.headers:\t%s",(Flags & 128) ? "yes":"no"); - console.log("First volume:\t%s",(Flags & 256) ? "yes":"no or older than 3.0"); - console.log("---------------------------\n"); -*/ -} - -var getFileName = function(header) { - //assume UTF-16, base on the C code - //actually not sure because the use of wchar_t depends on the compiler(emscripten) setting - - // console.log(arcData.get_Flags()) - // get entry name - var filenameBytes = []; - var i = 0; - while (i < 2048) { - var oneByte = header.get_FileNameW(i); - if (oneByte === 0) break; //null terminated - filenameBytes.push(oneByte); - i++; - } - //this part assume filenameBytes are array of 16bit char - var filenameStr = String.fromCharCode.apply(null, filenameBytes); -// console.info(filenameStr); -// console.info(header); - // console.log(filenameStr, filenameStr.length); - return filenameStr; -// var filenamestr = intArrayToString(filenameBytes); -} - -var cleanup = function(handle, data, cb) { - // clean up - _RARCloseArchive(handle); - - for (var i = 0; i < data.length; ++i) { - FS.unlink(data[i].name); - } - Runtime.removeFunction(cb); -} - - -var openArchive = function(arcData, password, data, cb) { - var handle = _RAROpenArchiveEx(getPointer(arcData)) - var or = arcData.get_OpenResult(); - if (or !== ERAR_SUCCESS || ! handle) { - cleanup(handle, data, cb); - reportOpenError(or); - return null; - } - - //ShowArcInfo(arcData.get_Flags()); - - // open success - if (password) { - _RARSetPassword(handle, ensureString(password)); - } - - var header = new Module.RARHeaderDataEx(); - var res = _RARReadHeaderEx(handle, getPointer(header)); - if (res !== ERAR_SUCCESS) { - return null; - } - - return { - handle: handle, - header: header - }; -} - -// FIXME: Rename this, because it no longer just returns the file names. -var readRARFileNames = function(data, password) { -// console.log("Current working directory: ",FS.cwd()) - - // write the byte arrays to a file first - // because the library operates on files - // the canOwn flag reduces the memory usage - for (var i = 0; i < data.length; ++i) { - FS.writeFile(data[i].name, data[i].content, {encoding: "binary", canOwn: true, flags: 'w+'}); - } - - var arcData = new Module.RAROpenArchiveDataEx(); - arcData.set_ArcName(data[0].name); - arcData.set_OpenMode(RAR_OM_EXTRACT); - - // Open the archive - var cb = function() { - - }; - var status = openArchive(arcData, password, data, cb); - if (! status) - return null; - var handle = status.handle; - var header = status.header; - - // Get all the file names - var entries = []; - var res = ERAR_SUCCESS; - while (res === ERAR_SUCCESS) { - var flags = header.get_Flags(); - var is_file = (flags & RHDF_DIRECTORY) === 0; - var size = header.get_UnpSize(); - entries.push({ - name: getFileName(header), - is_file: is_file, - size: size - }); - var PFCode = _RARProcessFileW(handle, RAR_SKIP, 0, 0); - if (PFCode !== ERAR_SUCCESS) { - cleanup(handle, data, cb); - reportProcessFileError(PFCode); - return null; - } - res = _RARReadHeaderEx(handle, getPointer(header)); - } - _RARCloseArchive(handle); - handle = null; - /* - for (var i=0; i -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - -let g_worker = null; - -function killWorker() { - if (g_worker) { - g_worker.terminate(); - g_worker = null; - } -} - -function stopWorker() { - let message = { - action: 'stop' - }; - g_worker.postMessage(message); - g_worker = null; -} - -function onUncompressedStart(count) { - // Update the progress - g_image_count = count; - $('#loadingProgress').innerHTML = L('Loading') + ' 0.0% ...'; - show('#loadingProgress'); - - // Create empty pages to hold all the images - let container = $('#horizontalScroller'); - for (let i = 0; i < g_image_count; ++i) { - let page = document.createElement('div'); - page.className = 'verticalScroller unselectable'; - container.appendChild(page); - } -} - -function onUncompressedDone() { - $('#comicPanel').scrollLeft = 0; - overlayShow(); -} - -function onUncompressedEach(filename, index, is_cached, is_last) { - //console.log(filename, index, is_cached, is_last); - g_titles[index] = filename; - - $('#loadingProgress').innerHTML = L('Loading') + ' ' + ((index / (g_image_count - 1)) * 100.0).toFixed(1) + '% ...'; - - makePagePreview(filename, is_cached, function() { - // Load the image into the page - let container = $('#horizontalScroller'); - let page = container.children[index]; - loadImage(page, index, function() { - // - }); - - if (is_last) { - stopWorker(); - - hide('#loadingProgress'); - $('#loadingProgress').innerHTML = ''; - $('#btnFileLoad').disabled = false; - $('#btnLibrary').disabled = false; - $('#btnSettings').disabled = false; - - startWorker(); - } - }); -} - -function startWorker() { - g_worker = new Worker('js/web_worker.js'); - - g_worker.onmessage = function(e) { - if (g_is_terminated) { - return; - } - - let filename = ""; - let index = -1; - - switch (e.data.action) { - case 'storage_full': - onStorageFull(e.data.filename); - break; - case 'uncompressed_start': - onUncompressedStart(e.data.count); - break; - case 'uncompressed_done': - onUncompressedDone(); - break; - case 'uncompressed_each': - onUncompressedEach(e.data.filename, e.data.index, e.data.is_cached, e.data.is_last); - break; - case 'invalid_file': - filename = e.data.filename; - - dbClose(); - - // Remove the file db - deleteCachedFileStorage(filename, function() { - - }); - - // Remove the file name from list of dbs - let db_names = settings_get_db_names(); - index = db_names.indexOf(filename); - if (index !== -1) { - db_names.splice(index, 1); - settings_set_db_names(db_names); - } - - onError(e.data.error); - break; - } - }; - - // Start the worker - let message = { - action: 'start' - }; - g_worker.postMessage(message); - -} - -function makePagePreview(filename, is_cached, cb) { - if (! is_cached) { - getCachedFile('big', filename, function(blob) { - let url = URL.createObjectURL(blob); - //console.log('>>>>>>>>>>>>>>>>>>> createObjectURL: ' + url + ', ' + filename); - - let img = new Image(); - img.onload = function() { - if (url) { - URL.revokeObjectURL(url); - //console.log('<<<<<<<<<<<<<<<<<<<< revokeObjectURL: ' + url); - url = null; - } - - let ratio = 400.0 / img.width; - let width = img.width * ratio; - let height = img.height * ratio; - - resizeImage(img, width, height, g_use_higher_quality_previews, function(small_blob) { - img.src = ''; - setCachedFile('small', filename, small_blob, function(is_success) { - if (! is_success) { - onStorageFull(filename); - } - if (cb) { - cb(); - cb = null; - } - }); - }, 'image/jpeg', 0.95); - }; - img.onerror = function(e) { - if (url) { - URL.revokeObjectURL(url); - //console.log('<<<<<<<<<<<<<<<<<<<< revokeObjectURL: ' + url); - url = null; - } - - if (cb) { - cb(); - cb = null; - } - }; - img.src = url; - }); - } else { - if (cb) { - cb(); - cb = null; - } - } -} - -function loaderLoadFile(blob, filename) { - let db_names = settings_get_db_names(); - let has_file = db_names.includes(filename); - - // If the file is cached, load it from the cache - if (has_file) { - initCachedFileStorage(filename, function() { - let message = { - action: 'load_from_cache', - filename: filename - }; - g_worker.postMessage(message); - }); - // If the file is not cached, send it to the worker to be decompressed - } else { - // Save the name of the comic to the cache - initCachedFileStorage(filename, function() { - let db_names = settings_get_db_names(); - if (! db_names.includes(filename)) { - db_names.push(filename); - settings_set_db_names(db_names); - } - - let fileReader = new FileReader(); - fileReader.onload = function() { - let array_buffer = this.result; - if (isPdfFile(array_buffer)) { - onPDF(array_buffer); - } else { - g_worker.postMessage(blob); - } - }; - fileReader.readAsArrayBuffer(blob); - }); - } -} - -function onPDF(blob) { - //dbClose(); - - PDFJS.getDocument(blob).then(function(pdf_doc) { - let len = pdf_doc.pdfInfo.numPages; - //console.log(pdf_doc); - let onEach = function(i) { - if (i === 0) { - onUncompressedStart(len); - } - if (i >= len) { - onUncompressedDone(); - return; - } - - pdf_doc.getPage(i+1).then(function(page) { - //console.log(i); - let filename = "page_" + (i.toString().padStart(5, '0')) + ".jpg"; - let is_last = (i === len - 1); - //console.log(page); - let actual_width = page.view[2]; - let scale = (actual_width < 1000 ? 1000 / actual_width : actual_width); - let viewport = page.getViewport(scale); - - let canvas = document.createElement('canvas'); - canvas.style.imageRendering = "-moz-crisp-edges"; - canvas.style.imageRendering = "pixelated"; - canvas.width = viewport.width; - canvas.height = viewport.height; - //document.body.appendChild(canvas); - - let renderContext = { - canvasContext: canvas.getContext('2d'), - viewport: viewport - }; - page.render(renderContext).then(function() { - canvas.toBlob(function(blob) { - setCachedFile('big', filename, blob, function(is_success) { - if (! is_success) { - onStorageFull(filename); - } else { - onUncompressedEach(filename, i, false, is_last); - onEach(i + 1); - } - }); - }, 'image/jpeg', 0.95); - }); - }); - }; - onEach(0); - }); -} - -function isPdfFile(array_buffer) { - // The PDF header - let pdf_header = saneJoin([0x25, 0x50, 0x44, 0x46], ', '); - - // Just return false if the file is smaller than the header - if (array_buffer.byteLength < 4) { - return false; - } - - // Return true if the header matches the PDF header - let header = saneJoin(new Uint8Array(array_buffer).slice(0, 4), ', '); - return (header === pdf_header); -} diff --git a/src/lib/no_more_jquery.js b/src/lib/no_more_jquery.js deleted file mode 100644 index 770ca84..0000000 --- a/src/lib/no_more_jquery.js +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2016 Matthew Brennan Jones -// This software uses a MIT style license -// https://github.com/SoftwareAddictionShow/no-more-jquery -"use strict"; - -// Great website for reasons not to use jquery: -// http://youmightnotneedjquery.com - - -function $(selector) { - if(! selector || selector.length === 0) { - return null; - } else if (selector[0] === '#') { - return document.querySelector(selector); - } else if(selector[0] === '.') { - return document.querySelectorAll(selector); - } else { - return document.getElementsByTagName(selector); - } - - return null; -} - -function hide(selector) { - let elements = document.querySelectorAll(selector); - for (let i=0; i new_value; - let diff_value = is_bigger ? old_value - new_value : new_value - old_value; - let start_time = null; - - let stepTime = function(timestamp) { - if (start_time === null) { - start_time = timestamp; - } - let elapsed_time = timestamp - start_time; - let percent = elapsed_time / target_time; - if (percent >= 1.0) { - percent = 1.0; - } - - let trans_value = 0; - if (is_bigger) { - trans_value = old_value - (diff_value * percent); - } else { - trans_value= old_value + (diff_value * percent); - } - cb(trans_value); - if (percent !== 1.0) { - window.requestAnimationFrame(stepTime); - } - }; - window.requestAnimationFrame(stepTime); -} diff --git a/src/lib/pdf.js b/src/lib/pdf.js deleted file mode 100644 index 6cea4c9..0000000 --- a/src/lib/pdf.js +++ /dev/null @@ -1,9052 +0,0 @@ -/* Copyright 2012 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -(function (root, factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - define('pdfjs-dist/build/pdf', ['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory(root['pdfjsDistBuildPdf'] = {}); - } -}(this, function (exports) { - 'use strict'; - var pdfjsVersion = '1.7.225'; - var pdfjsBuild = '17d135f'; - var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; - var pdfjsLibs = {}; - (function pdfjsWrapper() { - (function (root, factory) { - factory(root.pdfjsSharedUtil = {}); - }(this, function (exports) { - var globalScope = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this; - var FONT_IDENTITY_MATRIX = [ - 0.001, - 0, - 0, - 0.001, - 0, - 0 - ]; - var TextRenderingMode = { - FILL: 0, - STROKE: 1, - FILL_STROKE: 2, - INVISIBLE: 3, - FILL_ADD_TO_PATH: 4, - STROKE_ADD_TO_PATH: 5, - FILL_STROKE_ADD_TO_PATH: 6, - ADD_TO_PATH: 7, - FILL_STROKE_MASK: 3, - ADD_TO_PATH_FLAG: 4 - }; - var ImageKind = { - GRAYSCALE_1BPP: 1, - RGB_24BPP: 2, - RGBA_32BPP: 3 - }; - var AnnotationType = { - TEXT: 1, - LINK: 2, - FREETEXT: 3, - LINE: 4, - SQUARE: 5, - CIRCLE: 6, - POLYGON: 7, - POLYLINE: 8, - HIGHLIGHT: 9, - UNDERLINE: 10, - SQUIGGLY: 11, - STRIKEOUT: 12, - STAMP: 13, - CARET: 14, - INK: 15, - POPUP: 16, - FILEATTACHMENT: 17, - SOUND: 18, - MOVIE: 19, - WIDGET: 20, - SCREEN: 21, - PRINTERMARK: 22, - TRAPNET: 23, - WATERMARK: 24, - THREED: 25, - REDACT: 26 - }; - var AnnotationFlag = { - INVISIBLE: 0x01, - HIDDEN: 0x02, - PRINT: 0x04, - NOZOOM: 0x08, - NOROTATE: 0x10, - NOVIEW: 0x20, - READONLY: 0x40, - LOCKED: 0x80, - TOGGLENOVIEW: 0x100, - LOCKEDCONTENTS: 0x200 - }; - var AnnotationFieldFlag = { - READONLY: 0x0000001, - REQUIRED: 0x0000002, - NOEXPORT: 0x0000004, - MULTILINE: 0x0001000, - PASSWORD: 0x0002000, - NOTOGGLETOOFF: 0x0004000, - RADIO: 0x0008000, - PUSHBUTTON: 0x0010000, - COMBO: 0x0020000, - EDIT: 0x0040000, - SORT: 0x0080000, - FILESELECT: 0x0100000, - MULTISELECT: 0x0200000, - DONOTSPELLCHECK: 0x0400000, - DONOTSCROLL: 0x0800000, - COMB: 0x1000000, - RICHTEXT: 0x2000000, - RADIOSINUNISON: 0x2000000, - COMMITONSELCHANGE: 0x4000000 - }; - var AnnotationBorderStyleType = { - SOLID: 1, - DASHED: 2, - BEVELED: 3, - INSET: 4, - UNDERLINE: 5 - }; - var StreamType = { - UNKNOWN: 0, - FLATE: 1, - LZW: 2, - DCT: 3, - JPX: 4, - JBIG: 5, - A85: 6, - AHX: 7, - CCF: 8, - RL: 9 - }; - var FontType = { - UNKNOWN: 0, - TYPE1: 1, - TYPE1C: 2, - CIDFONTTYPE0: 3, - CIDFONTTYPE0C: 4, - TRUETYPE: 5, - CIDFONTTYPE2: 6, - TYPE3: 7, - OPENTYPE: 8, - TYPE0: 9, - MMTYPE1: 10 - }; - var VERBOSITY_LEVELS = { - errors: 0, - warnings: 1, - infos: 5 - }; - var OPS = { - dependency: 1, - setLineWidth: 2, - setLineCap: 3, - setLineJoin: 4, - setMiterLimit: 5, - setDash: 6, - setRenderingIntent: 7, - setFlatness: 8, - setGState: 9, - save: 10, - restore: 11, - transform: 12, - moveTo: 13, - lineTo: 14, - curveTo: 15, - curveTo2: 16, - curveTo3: 17, - closePath: 18, - rectangle: 19, - stroke: 20, - closeStroke: 21, - fill: 22, - eoFill: 23, - fillStroke: 24, - eoFillStroke: 25, - closeFillStroke: 26, - closeEOFillStroke: 27, - endPath: 28, - clip: 29, - eoClip: 30, - beginText: 31, - endText: 32, - setCharSpacing: 33, - setWordSpacing: 34, - setHScale: 35, - setLeading: 36, - setFont: 37, - setTextRenderingMode: 38, - setTextRise: 39, - moveText: 40, - setLeadingMoveText: 41, - setTextMatrix: 42, - nextLine: 43, - showText: 44, - showSpacedText: 45, - nextLineShowText: 46, - nextLineSetSpacingShowText: 47, - setCharWidth: 48, - setCharWidthAndBounds: 49, - setStrokeColorSpace: 50, - setFillColorSpace: 51, - setStrokeColor: 52, - setStrokeColorN: 53, - setFillColor: 54, - setFillColorN: 55, - setStrokeGray: 56, - setFillGray: 57, - setStrokeRGBColor: 58, - setFillRGBColor: 59, - setStrokeCMYKColor: 60, - setFillCMYKColor: 61, - shadingFill: 62, - beginInlineImage: 63, - beginImageData: 64, - endInlineImage: 65, - paintXObject: 66, - markPoint: 67, - markPointProps: 68, - beginMarkedContent: 69, - beginMarkedContentProps: 70, - endMarkedContent: 71, - beginCompat: 72, - endCompat: 73, - paintFormXObjectBegin: 74, - paintFormXObjectEnd: 75, - beginGroup: 76, - endGroup: 77, - beginAnnotations: 78, - endAnnotations: 79, - beginAnnotation: 80, - endAnnotation: 81, - paintJpegXObject: 82, - paintImageMaskXObject: 83, - paintImageMaskXObjectGroup: 84, - paintImageXObject: 85, - paintInlineImageXObject: 86, - paintInlineImageXObjectGroup: 87, - paintImageXObjectRepeat: 88, - paintImageMaskXObjectRepeat: 89, - paintSolidColorImageMask: 90, - constructPath: 91 - }; - var verbosity = VERBOSITY_LEVELS.warnings; - function setVerbosityLevel(level) { - verbosity = level; - } - function getVerbosityLevel() { - return verbosity; - } - function info(msg) { - if (verbosity >= VERBOSITY_LEVELS.infos) { - console.log('Info: ' + msg); - } - } - function warn(msg) { - if (verbosity >= VERBOSITY_LEVELS.warnings) { - console.log('Warning: ' + msg); - } - } - function deprecated(details) { - console.log('Deprecated API usage: ' + details); - } - function error(msg) { - if (verbosity >= VERBOSITY_LEVELS.errors) { - console.log('Error: ' + msg); - console.log(backtrace()); - } - throw new Error(msg); - } - function backtrace() { - try { - throw new Error(); - } catch (e) { - return e.stack ? e.stack.split('\n').slice(2).join('\n') : ''; - } - } - function assert(cond, msg) { - if (!cond) { - error(msg); - } - } - var UNSUPPORTED_FEATURES = { - unknown: 'unknown', - forms: 'forms', - javaScript: 'javaScript', - smask: 'smask', - shadingPattern: 'shadingPattern', - font: 'font' - }; - function isSameOrigin(baseUrl, otherUrl) { - try { - var base = new URL(baseUrl); - if (!base.origin || base.origin === 'null') { - return false; - } - } catch (e) { - return false; - } - var other = new URL(otherUrl, base); - return base.origin === other.origin; - } - function isValidProtocol(url) { - if (!url) { - return false; - } - switch (url.protocol) { - case 'http:': - case 'https:': - case 'ftp:': - case 'mailto:': - case 'tel:': - return true; - default: - return false; - } - } - function createValidAbsoluteUrl(url, baseUrl) { - if (!url) { - return null; - } - try { - var absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); - if (isValidProtocol(absoluteUrl)) { - return absoluteUrl; - } - } catch (ex) { - } - return null; - } - function shadow(obj, prop, value) { - Object.defineProperty(obj, prop, { - value: value, - enumerable: true, - configurable: true, - writable: false - }); - return value; - } - function getLookupTableFactory(initializer) { - var lookup; - return function () { - if (initializer) { - lookup = Object.create(null); - initializer(lookup); - initializer = null; - } - return lookup; - }; - } - var PasswordResponses = { - NEED_PASSWORD: 1, - INCORRECT_PASSWORD: 2 - }; - var PasswordException = function PasswordExceptionClosure() { - function PasswordException(msg, code) { - this.name = 'PasswordException'; - this.message = msg; - this.code = code; - } - PasswordException.prototype = new Error(); - PasswordException.constructor = PasswordException; - return PasswordException; - }(); - var UnknownErrorException = function UnknownErrorExceptionClosure() { - function UnknownErrorException(msg, details) { - this.name = 'UnknownErrorException'; - this.message = msg; - this.details = details; - } - UnknownErrorException.prototype = new Error(); - UnknownErrorException.constructor = UnknownErrorException; - return UnknownErrorException; - }(); - var InvalidPDFException = function InvalidPDFExceptionClosure() { - function InvalidPDFException(msg) { - this.name = 'InvalidPDFException'; - this.message = msg; - } - InvalidPDFException.prototype = new Error(); - InvalidPDFException.constructor = InvalidPDFException; - return InvalidPDFException; - }(); - var MissingPDFException = function MissingPDFExceptionClosure() { - function MissingPDFException(msg) { - this.name = 'MissingPDFException'; - this.message = msg; - } - MissingPDFException.prototype = new Error(); - MissingPDFException.constructor = MissingPDFException; - return MissingPDFException; - }(); - var UnexpectedResponseException = function UnexpectedResponseExceptionClosure() { - function UnexpectedResponseException(msg, status) { - this.name = 'UnexpectedResponseException'; - this.message = msg; - this.status = status; - } - UnexpectedResponseException.prototype = new Error(); - UnexpectedResponseException.constructor = UnexpectedResponseException; - return UnexpectedResponseException; - }(); - var NotImplementedException = function NotImplementedExceptionClosure() { - function NotImplementedException(msg) { - this.message = msg; - } - NotImplementedException.prototype = new Error(); - NotImplementedException.prototype.name = 'NotImplementedException'; - NotImplementedException.constructor = NotImplementedException; - return NotImplementedException; - }(); - var MissingDataException = function MissingDataExceptionClosure() { - function MissingDataException(begin, end) { - this.begin = begin; - this.end = end; - this.message = 'Missing data [' + begin + ', ' + end + ')'; - } - MissingDataException.prototype = new Error(); - MissingDataException.prototype.name = 'MissingDataException'; - MissingDataException.constructor = MissingDataException; - return MissingDataException; - }(); - var XRefParseException = function XRefParseExceptionClosure() { - function XRefParseException(msg) { - this.message = msg; - } - XRefParseException.prototype = new Error(); - XRefParseException.prototype.name = 'XRefParseException'; - XRefParseException.constructor = XRefParseException; - return XRefParseException; - }(); - var NullCharactersRegExp = /\x00/g; - function removeNullCharacters(str) { - if (typeof str !== 'string') { - warn('The argument for removeNullCharacters must be a string.'); - return str; - } - return str.replace(NullCharactersRegExp, ''); - } - function bytesToString(bytes) { - assert(bytes !== null && typeof bytes === 'object' && bytes.length !== undefined, 'Invalid argument for bytesToString'); - var length = bytes.length; - var MAX_ARGUMENT_COUNT = 8192; - if (length < MAX_ARGUMENT_COUNT) { - return String.fromCharCode.apply(null, bytes); - } - var strBuf = []; - for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) { - var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); - var chunk = bytes.subarray(i, chunkEnd); - strBuf.push(String.fromCharCode.apply(null, chunk)); - } - return strBuf.join(''); - } - function stringToBytes(str) { - assert(typeof str === 'string', 'Invalid argument for stringToBytes'); - var length = str.length; - var bytes = new Uint8Array(length); - for (var i = 0; i < length; ++i) { - bytes[i] = str.charCodeAt(i) & 0xFF; - } - return bytes; - } - function arrayByteLength(arr) { - if (arr.length !== undefined) { - return arr.length; - } - assert(arr.byteLength !== undefined); - return arr.byteLength; - } - function arraysToBytes(arr) { - if (arr.length === 1 && arr[0] instanceof Uint8Array) { - return arr[0]; - } - var resultLength = 0; - var i, ii = arr.length; - var item, itemLength; - for (i = 0; i < ii; i++) { - item = arr[i]; - itemLength = arrayByteLength(item); - resultLength += itemLength; - } - var pos = 0; - var data = new Uint8Array(resultLength); - for (i = 0; i < ii; i++) { - item = arr[i]; - if (!(item instanceof Uint8Array)) { - if (typeof item === 'string') { - item = stringToBytes(item); - } else { - item = new Uint8Array(item); - } - } - itemLength = item.byteLength; - data.set(item, pos); - pos += itemLength; - } - return data; - } - function string32(value) { - return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); - } - function log2(x) { - var n = 1, i = 0; - while (x > n) { - n <<= 1; - i++; - } - return i; - } - function readInt8(data, start) { - return data[start] << 24 >> 24; - } - function readUint16(data, offset) { - return data[offset] << 8 | data[offset + 1]; - } - function readUint32(data, offset) { - return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; - } - function isLittleEndian() { - var buffer8 = new Uint8Array(2); - buffer8[0] = 1; - var buffer16 = new Uint16Array(buffer8.buffer); - return buffer16[0] === 1; - } - function isEvalSupported() { - try { - new Function(''); - return true; - } catch (e) { - return false; - } - } - var Uint32ArrayView = function Uint32ArrayViewClosure() { - function Uint32ArrayView(buffer, length) { - this.buffer = buffer; - this.byteLength = buffer.length; - this.length = length === undefined ? this.byteLength >> 2 : length; - ensureUint32ArrayViewProps(this.length); - } - Uint32ArrayView.prototype = Object.create(null); - var uint32ArrayViewSetters = 0; - function createUint32ArrayProp(index) { - return { - get: function () { - var buffer = this.buffer, offset = index << 2; - return (buffer[offset] | buffer[offset + 1] << 8 | buffer[offset + 2] << 16 | buffer[offset + 3] << 24) >>> 0; - }, - set: function (value) { - var buffer = this.buffer, offset = index << 2; - buffer[offset] = value & 255; - buffer[offset + 1] = value >> 8 & 255; - buffer[offset + 2] = value >> 16 & 255; - buffer[offset + 3] = value >>> 24 & 255; - } - }; - } - function ensureUint32ArrayViewProps(length) { - while (uint32ArrayViewSetters < length) { - Object.defineProperty(Uint32ArrayView.prototype, uint32ArrayViewSetters, createUint32ArrayProp(uint32ArrayViewSetters)); - uint32ArrayViewSetters++; - } - } - return Uint32ArrayView; - }(); - exports.Uint32ArrayView = Uint32ArrayView; - var IDENTITY_MATRIX = [ - 1, - 0, - 0, - 1, - 0, - 0 - ]; - var Util = function UtilClosure() { - function Util() { - } - var rgbBuf = [ - 'rgb(', - 0, - ',', - 0, - ',', - 0, - ')' - ]; - Util.makeCssRgb = function Util_makeCssRgb(r, g, b) { - rgbBuf[1] = r; - rgbBuf[3] = g; - rgbBuf[5] = b; - return rgbBuf.join(''); - }; - Util.transform = function Util_transform(m1, m2) { - return [ - m1[0] * m2[0] + m1[2] * m2[1], - m1[1] * m2[0] + m1[3] * m2[1], - m1[0] * m2[2] + m1[2] * m2[3], - m1[1] * m2[2] + m1[3] * m2[3], - m1[0] * m2[4] + m1[2] * m2[5] + m1[4], - m1[1] * m2[4] + m1[3] * m2[5] + m1[5] - ]; - }; - Util.applyTransform = function Util_applyTransform(p, m) { - var xt = p[0] * m[0] + p[1] * m[2] + m[4]; - var yt = p[0] * m[1] + p[1] * m[3] + m[5]; - return [ - xt, - yt - ]; - }; - Util.applyInverseTransform = function Util_applyInverseTransform(p, m) { - var d = m[0] * m[3] - m[1] * m[2]; - var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; - var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; - return [ - xt, - yt - ]; - }; - Util.getAxialAlignedBoundingBox = function Util_getAxialAlignedBoundingBox(r, m) { - var p1 = Util.applyTransform(r, m); - var p2 = Util.applyTransform(r.slice(2, 4), m); - var p3 = Util.applyTransform([ - r[0], - r[3] - ], m); - var p4 = Util.applyTransform([ - r[2], - r[1] - ], m); - return [ - Math.min(p1[0], p2[0], p3[0], p4[0]), - Math.min(p1[1], p2[1], p3[1], p4[1]), - Math.max(p1[0], p2[0], p3[0], p4[0]), - Math.max(p1[1], p2[1], p3[1], p4[1]) - ]; - }; - Util.inverseTransform = function Util_inverseTransform(m) { - var d = m[0] * m[3] - m[1] * m[2]; - return [ - m[3] / d, - -m[1] / d, - -m[2] / d, - m[0] / d, - (m[2] * m[5] - m[4] * m[3]) / d, - (m[4] * m[1] - m[5] * m[0]) / d - ]; - }; - Util.apply3dTransform = function Util_apply3dTransform(m, v) { - return [ - m[0] * v[0] + m[1] * v[1] + m[2] * v[2], - m[3] * v[0] + m[4] * v[1] + m[5] * v[2], - m[6] * v[0] + m[7] * v[1] + m[8] * v[2] - ]; - }; - Util.singularValueDecompose2dScale = function Util_singularValueDecompose2dScale(m) { - var transpose = [ - m[0], - m[2], - m[1], - m[3] - ]; - var a = m[0] * transpose[0] + m[1] * transpose[2]; - var b = m[0] * transpose[1] + m[1] * transpose[3]; - var c = m[2] * transpose[0] + m[3] * transpose[2]; - var d = m[2] * transpose[1] + m[3] * transpose[3]; - var first = (a + d) / 2; - var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2; - var sx = first + second || 1; - var sy = first - second || 1; - return [ - Math.sqrt(sx), - Math.sqrt(sy) - ]; - }; - Util.normalizeRect = function Util_normalizeRect(rect) { - var r = rect.slice(0); - if (rect[0] > rect[2]) { - r[0] = rect[2]; - r[2] = rect[0]; - } - if (rect[1] > rect[3]) { - r[1] = rect[3]; - r[3] = rect[1]; - } - return r; - }; - Util.intersect = function Util_intersect(rect1, rect2) { - function compare(a, b) { - return a - b; - } - var orderedX = [ - rect1[0], - rect1[2], - rect2[0], - rect2[2] - ].sort(compare), orderedY = [ - rect1[1], - rect1[3], - rect2[1], - rect2[3] - ].sort(compare), result = []; - rect1 = Util.normalizeRect(rect1); - rect2 = Util.normalizeRect(rect2); - if (orderedX[0] === rect1[0] && orderedX[1] === rect2[0] || orderedX[0] === rect2[0] && orderedX[1] === rect1[0]) { - result[0] = orderedX[1]; - result[2] = orderedX[2]; - } else { - return false; - } - if (orderedY[0] === rect1[1] && orderedY[1] === rect2[1] || orderedY[0] === rect2[1] && orderedY[1] === rect1[1]) { - result[1] = orderedY[1]; - result[3] = orderedY[2]; - } else { - return false; - } - return result; - }; - Util.sign = function Util_sign(num) { - return num < 0 ? -1 : 1; - }; - var ROMAN_NUMBER_MAP = [ - '', - 'C', - 'CC', - 'CCC', - 'CD', - 'D', - 'DC', - 'DCC', - 'DCCC', - 'CM', - '', - 'X', - 'XX', - 'XXX', - 'XL', - 'L', - 'LX', - 'LXX', - 'LXXX', - 'XC', - '', - 'I', - 'II', - 'III', - 'IV', - 'V', - 'VI', - 'VII', - 'VIII', - 'IX' - ]; - Util.toRoman = function Util_toRoman(number, lowerCase) { - assert(isInt(number) && number > 0, 'The number should be a positive integer.'); - var pos, romanBuf = []; - while (number >= 1000) { - number -= 1000; - romanBuf.push('M'); - } - pos = number / 100 | 0; - number %= 100; - romanBuf.push(ROMAN_NUMBER_MAP[pos]); - pos = number / 10 | 0; - number %= 10; - romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); - romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); - var romanStr = romanBuf.join(''); - return lowerCase ? romanStr.toLowerCase() : romanStr; - }; - Util.appendToArray = function Util_appendToArray(arr1, arr2) { - Array.prototype.push.apply(arr1, arr2); - }; - Util.prependToArray = function Util_prependToArray(arr1, arr2) { - Array.prototype.unshift.apply(arr1, arr2); - }; - Util.extendObj = function extendObj(obj1, obj2) { - for (var key in obj2) { - obj1[key] = obj2[key]; - } - }; - Util.getInheritableProperty = function Util_getInheritableProperty(dict, name, getArray) { - while (dict && !dict.has(name)) { - dict = dict.get('Parent'); - } - if (!dict) { - return null; - } - return getArray ? dict.getArray(name) : dict.get(name); - }; - Util.inherit = function Util_inherit(sub, base, prototype) { - sub.prototype = Object.create(base.prototype); - sub.prototype.constructor = sub; - for (var prop in prototype) { - sub.prototype[prop] = prototype[prop]; - } - }; - Util.loadScript = function Util_loadScript(src, callback) { - var script = document.createElement('script'); - var loaded = false; - script.setAttribute('src', src); - if (callback) { - script.onload = function () { - if (!loaded) { - callback(); - } - loaded = true; - }; - } - document.getElementsByTagName('head')[0].appendChild(script); - }; - return Util; - }(); - var PageViewport = function PageViewportClosure() { - function PageViewport(viewBox, scale, rotation, offsetX, offsetY, dontFlip) { - this.viewBox = viewBox; - this.scale = scale; - this.rotation = rotation; - this.offsetX = offsetX; - this.offsetY = offsetY; - var centerX = (viewBox[2] + viewBox[0]) / 2; - var centerY = (viewBox[3] + viewBox[1]) / 2; - var rotateA, rotateB, rotateC, rotateD; - rotation = rotation % 360; - rotation = rotation < 0 ? rotation + 360 : rotation; - switch (rotation) { - case 180: - rotateA = -1; - rotateB = 0; - rotateC = 0; - rotateD = 1; - break; - case 90: - rotateA = 0; - rotateB = 1; - rotateC = 1; - rotateD = 0; - break; - case 270: - rotateA = 0; - rotateB = -1; - rotateC = -1; - rotateD = 0; - break; - default: - rotateA = 1; - rotateB = 0; - rotateC = 0; - rotateD = -1; - break; - } - if (dontFlip) { - rotateC = -rotateC; - rotateD = -rotateD; - } - var offsetCanvasX, offsetCanvasY; - var width, height; - if (rotateA === 0) { - offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX; - offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY; - width = Math.abs(viewBox[3] - viewBox[1]) * scale; - height = Math.abs(viewBox[2] - viewBox[0]) * scale; - } else { - offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX; - offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY; - width = Math.abs(viewBox[2] - viewBox[0]) * scale; - height = Math.abs(viewBox[3] - viewBox[1]) * scale; - } - this.transform = [ - rotateA * scale, - rotateB * scale, - rotateC * scale, - rotateD * scale, - offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, - offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY - ]; - this.width = width; - this.height = height; - this.fontScale = scale; - } - PageViewport.prototype = { - clone: function PageViewPort_clone(args) { - args = args || {}; - var scale = 'scale' in args ? args.scale : this.scale; - var rotation = 'rotation' in args ? args.rotation : this.rotation; - return new PageViewport(this.viewBox.slice(), scale, rotation, this.offsetX, this.offsetY, args.dontFlip); - }, - convertToViewportPoint: function PageViewport_convertToViewportPoint(x, y) { - return Util.applyTransform([ - x, - y - ], this.transform); - }, - convertToViewportRectangle: function PageViewport_convertToViewportRectangle(rect) { - var tl = Util.applyTransform([ - rect[0], - rect[1] - ], this.transform); - var br = Util.applyTransform([ - rect[2], - rect[3] - ], this.transform); - return [ - tl[0], - tl[1], - br[0], - br[1] - ]; - }, - convertToPdfPoint: function PageViewport_convertToPdfPoint(x, y) { - return Util.applyInverseTransform([ - x, - y - ], this.transform); - } - }; - return PageViewport; - }(); - var PDFStringTranslateTable = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0x2D8, - 0x2C7, - 0x2C6, - 0x2D9, - 0x2DD, - 0x2DB, - 0x2DA, - 0x2DC, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0x2022, - 0x2020, - 0x2021, - 0x2026, - 0x2014, - 0x2013, - 0x192, - 0x2044, - 0x2039, - 0x203A, - 0x2212, - 0x2030, - 0x201E, - 0x201C, - 0x201D, - 0x2018, - 0x2019, - 0x201A, - 0x2122, - 0xFB01, - 0xFB02, - 0x141, - 0x152, - 0x160, - 0x178, - 0x17D, - 0x131, - 0x142, - 0x153, - 0x161, - 0x17E, - 0, - 0x20AC - ]; - function stringToPDFString(str) { - var i, n = str.length, strBuf = []; - if (str[0] === '\xFE' && str[1] === '\xFF') { - for (i = 2; i < n; i += 2) { - strBuf.push(String.fromCharCode(str.charCodeAt(i) << 8 | str.charCodeAt(i + 1))); - } - } else { - for (i = 0; i < n; ++i) { - var code = PDFStringTranslateTable[str.charCodeAt(i)]; - strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); - } - } - return strBuf.join(''); - } - function stringToUTF8String(str) { - return decodeURIComponent(escape(str)); - } - function utf8StringToString(str) { - return unescape(encodeURIComponent(str)); - } - function isEmptyObj(obj) { - for (var key in obj) { - return false; - } - return true; - } - function isBool(v) { - return typeof v === 'boolean'; - } - function isInt(v) { - return typeof v === 'number' && (v | 0) === v; - } - function isNum(v) { - return typeof v === 'number'; - } - function isString(v) { - return typeof v === 'string'; - } - function isArray(v) { - return v instanceof Array; - } - function isArrayBuffer(v) { - return typeof v === 'object' && v !== null && v.byteLength !== undefined; - } - function isSpace(ch) { - return ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A; - } - function createPromiseCapability() { - var capability = {}; - capability.promise = new Promise(function (resolve, reject) { - capability.resolve = resolve; - capability.reject = reject; - }); - return capability; - } - (function PromiseClosure() { - if (globalScope.Promise) { - if (typeof globalScope.Promise.all !== 'function') { - globalScope.Promise.all = function (iterable) { - var count = 0, results = [], resolve, reject; - var promise = new globalScope.Promise(function (resolve_, reject_) { - resolve = resolve_; - reject = reject_; - }); - iterable.forEach(function (p, i) { - count++; - p.then(function (result) { - results[i] = result; - count--; - if (count === 0) { - resolve(results); - } - }, reject); - }); - if (count === 0) { - resolve(results); - } - return promise; - }; - } - if (typeof globalScope.Promise.resolve !== 'function') { - globalScope.Promise.resolve = function (value) { - return new globalScope.Promise(function (resolve) { - resolve(value); - }); - }; - } - if (typeof globalScope.Promise.reject !== 'function') { - globalScope.Promise.reject = function (reason) { - return new globalScope.Promise(function (resolve, reject) { - reject(reason); - }); - }; - } - if (typeof globalScope.Promise.prototype.catch !== 'function') { - globalScope.Promise.prototype.catch = function (onReject) { - return globalScope.Promise.prototype.then(undefined, onReject); - }; - } - return; - } - var STATUS_PENDING = 0; - var STATUS_RESOLVED = 1; - var STATUS_REJECTED = 2; - var REJECTION_TIMEOUT = 500; - var HandlerManager = { - handlers: [], - running: false, - unhandledRejections: [], - pendingRejectionCheck: false, - scheduleHandlers: function scheduleHandlers(promise) { - if (promise._status === STATUS_PENDING) { - return; - } - this.handlers = this.handlers.concat(promise._handlers); - promise._handlers = []; - if (this.running) { - return; - } - this.running = true; - setTimeout(this.runHandlers.bind(this), 0); - }, - runHandlers: function runHandlers() { - var RUN_TIMEOUT = 1; - var timeoutAt = Date.now() + RUN_TIMEOUT; - while (this.handlers.length > 0) { - var handler = this.handlers.shift(); - var nextStatus = handler.thisPromise._status; - var nextValue = handler.thisPromise._value; - try { - if (nextStatus === STATUS_RESOLVED) { - if (typeof handler.onResolve === 'function') { - nextValue = handler.onResolve(nextValue); - } - } else if (typeof handler.onReject === 'function') { - nextValue = handler.onReject(nextValue); - nextStatus = STATUS_RESOLVED; - if (handler.thisPromise._unhandledRejection) { - this.removeUnhandeledRejection(handler.thisPromise); - } - } - } catch (ex) { - nextStatus = STATUS_REJECTED; - nextValue = ex; - } - handler.nextPromise._updateStatus(nextStatus, nextValue); - if (Date.now() >= timeoutAt) { - break; - } - } - if (this.handlers.length > 0) { - setTimeout(this.runHandlers.bind(this), 0); - return; - } - this.running = false; - }, - addUnhandledRejection: function addUnhandledRejection(promise) { - this.unhandledRejections.push({ - promise: promise, - time: Date.now() - }); - this.scheduleRejectionCheck(); - }, - removeUnhandeledRejection: function removeUnhandeledRejection(promise) { - promise._unhandledRejection = false; - for (var i = 0; i < this.unhandledRejections.length; i++) { - if (this.unhandledRejections[i].promise === promise) { - this.unhandledRejections.splice(i); - i--; - } - } - }, - scheduleRejectionCheck: function scheduleRejectionCheck() { - if (this.pendingRejectionCheck) { - return; - } - this.pendingRejectionCheck = true; - setTimeout(function rejectionCheck() { - this.pendingRejectionCheck = false; - var now = Date.now(); - for (var i = 0; i < this.unhandledRejections.length; i++) { - if (now - this.unhandledRejections[i].time > REJECTION_TIMEOUT) { - var unhandled = this.unhandledRejections[i].promise._value; - var msg = 'Unhandled rejection: ' + unhandled; - if (unhandled.stack) { - msg += '\n' + unhandled.stack; - } - warn(msg); - this.unhandledRejections.splice(i); - i--; - } - } - if (this.unhandledRejections.length) { - this.scheduleRejectionCheck(); - } - }.bind(this), REJECTION_TIMEOUT); - } - }; - var Promise = function Promise(resolver) { - this._status = STATUS_PENDING; - this._handlers = []; - try { - resolver.call(this, this._resolve.bind(this), this._reject.bind(this)); - } catch (e) { - this._reject(e); - } - }; - Promise.all = function Promise_all(promises) { - var resolveAll, rejectAll; - var deferred = new Promise(function (resolve, reject) { - resolveAll = resolve; - rejectAll = reject; - }); - var unresolved = promises.length; - var results = []; - if (unresolved === 0) { - resolveAll(results); - return deferred; - } - function reject(reason) { - if (deferred._status === STATUS_REJECTED) { - return; - } - results = []; - rejectAll(reason); - } - for (var i = 0, ii = promises.length; i < ii; ++i) { - var promise = promises[i]; - var resolve = function (i) { - return function (value) { - if (deferred._status === STATUS_REJECTED) { - return; - } - results[i] = value; - unresolved--; - if (unresolved === 0) { - resolveAll(results); - } - }; - }(i); - if (Promise.isPromise(promise)) { - promise.then(resolve, reject); - } else { - resolve(promise); - } - } - return deferred; - }; - Promise.isPromise = function Promise_isPromise(value) { - return value && typeof value.then === 'function'; - }; - Promise.resolve = function Promise_resolve(value) { - return new Promise(function (resolve) { - resolve(value); - }); - }; - Promise.reject = function Promise_reject(reason) { - return new Promise(function (resolve, reject) { - reject(reason); - }); - }; - Promise.prototype = { - _status: null, - _value: null, - _handlers: null, - _unhandledRejection: null, - _updateStatus: function Promise__updateStatus(status, value) { - if (this._status === STATUS_RESOLVED || this._status === STATUS_REJECTED) { - return; - } - if (status === STATUS_RESOLVED && Promise.isPromise(value)) { - value.then(this._updateStatus.bind(this, STATUS_RESOLVED), this._updateStatus.bind(this, STATUS_REJECTED)); - return; - } - this._status = status; - this._value = value; - if (status === STATUS_REJECTED && this._handlers.length === 0) { - this._unhandledRejection = true; - HandlerManager.addUnhandledRejection(this); - } - HandlerManager.scheduleHandlers(this); - }, - _resolve: function Promise_resolve(value) { - this._updateStatus(STATUS_RESOLVED, value); - }, - _reject: function Promise_reject(reason) { - this._updateStatus(STATUS_REJECTED, reason); - }, - then: function Promise_then(onResolve, onReject) { - var nextPromise = new Promise(function (resolve, reject) { - this.resolve = resolve; - this.reject = reject; - }); - this._handlers.push({ - thisPromise: this, - onResolve: onResolve, - onReject: onReject, - nextPromise: nextPromise - }); - HandlerManager.scheduleHandlers(this); - return nextPromise; - }, - catch: function Promise_catch(onReject) { - return this.then(undefined, onReject); - } - }; - globalScope.Promise = Promise; - }()); - (function WeakMapClosure() { - if (globalScope.WeakMap) { - return; - } - var id = 0; - function WeakMap() { - this.id = '$weakmap' + id++; - } - WeakMap.prototype = { - has: function (obj) { - return !!Object.getOwnPropertyDescriptor(obj, this.id); - }, - get: function (obj, defaultValue) { - return this.has(obj) ? obj[this.id] : defaultValue; - }, - set: function (obj, value) { - Object.defineProperty(obj, this.id, { - value: value, - enumerable: false, - configurable: true - }); - }, - delete: function (obj) { - delete obj[this.id]; - } - }; - globalScope.WeakMap = WeakMap; - }()); - var StatTimer = function StatTimerClosure() { - function rpad(str, pad, length) { - while (str.length < length) { - str += pad; - } - return str; - } - function StatTimer() { - this.started = Object.create(null); - this.times = []; - this.enabled = true; - } - StatTimer.prototype = { - time: function StatTimer_time(name) { - if (!this.enabled) { - return; - } - if (name in this.started) { - warn('Timer is already running for ' + name); - } - this.started[name] = Date.now(); - }, - timeEnd: function StatTimer_timeEnd(name) { - if (!this.enabled) { - return; - } - if (!(name in this.started)) { - warn('Timer has not been started for ' + name); - } - this.times.push({ - 'name': name, - 'start': this.started[name], - 'end': Date.now() - }); - delete this.started[name]; - }, - toString: function StatTimer_toString() { - var i, ii; - var times = this.times; - var out = ''; - var longest = 0; - for (i = 0, ii = times.length; i < ii; ++i) { - var name = times[i]['name']; - if (name.length > longest) { - longest = name.length; - } - } - for (i = 0, ii = times.length; i < ii; ++i) { - var span = times[i]; - var duration = span.end - span.start; - out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n'; - } - return out; - } - }; - return StatTimer; - }(); - var createBlob = function createBlob(data, contentType) { - if (typeof Blob !== 'undefined') { - return new Blob([data], { type: contentType }); - } - warn('The "Blob" constructor is not supported.'); - }; - var createObjectURL = function createObjectURLClosure() { - var digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - return function createObjectURL(data, contentType, forceDataSchema) { - if (!forceDataSchema && typeof URL !== 'undefined' && URL.createObjectURL) { - var blob = createBlob(data, contentType); - return URL.createObjectURL(blob); - } - var buffer = 'data:' + contentType + ';base64,'; - for (var i = 0, ii = data.length; i < ii; i += 3) { - var b1 = data[i] & 0xFF; - var b2 = data[i + 1] & 0xFF; - var b3 = data[i + 2] & 0xFF; - var d1 = b1 >> 2, d2 = (b1 & 3) << 4 | b2 >> 4; - var d3 = i + 1 < ii ? (b2 & 0xF) << 2 | b3 >> 6 : 64; - var d4 = i + 2 < ii ? b3 & 0x3F : 64; - buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4]; - } - return buffer; - }; - }(); - function MessageHandler(sourceName, targetName, comObj) { - this.sourceName = sourceName; - this.targetName = targetName; - this.comObj = comObj; - this.callbackIndex = 1; - this.postMessageTransfers = true; - var callbacksCapabilities = this.callbacksCapabilities = Object.create(null); - var ah = this.actionHandler = Object.create(null); - this._onComObjOnMessage = function messageHandlerComObjOnMessage(event) { - var data = event.data; - if (data.targetName !== this.sourceName) { - return; - } - if (data.isReply) { - var callbackId = data.callbackId; - if (data.callbackId in callbacksCapabilities) { - var callback = callbacksCapabilities[callbackId]; - delete callbacksCapabilities[callbackId]; - if ('error' in data) { - callback.reject(data.error); - } else { - callback.resolve(data.data); - } - } else { - error('Cannot resolve callback ' + callbackId); - } - } else if (data.action in ah) { - var action = ah[data.action]; - if (data.callbackId) { - var sourceName = this.sourceName; - var targetName = data.sourceName; - Promise.resolve().then(function () { - return action[0].call(action[1], data.data); - }).then(function (result) { - comObj.postMessage({ - sourceName: sourceName, - targetName: targetName, - isReply: true, - callbackId: data.callbackId, - data: result - }); - }, function (reason) { - if (reason instanceof Error) { - reason = reason + ''; - } - comObj.postMessage({ - sourceName: sourceName, - targetName: targetName, - isReply: true, - callbackId: data.callbackId, - error: reason - }); - }); - } else { - action[0].call(action[1], data.data); - } - } else { - error('Unknown action from worker: ' + data.action); - } - }.bind(this); - comObj.addEventListener('message', this._onComObjOnMessage); - } - MessageHandler.prototype = { - on: function messageHandlerOn(actionName, handler, scope) { - var ah = this.actionHandler; - if (ah[actionName]) { - error('There is already an actionName called "' + actionName + '"'); - } - ah[actionName] = [ - handler, - scope - ]; - }, - send: function messageHandlerSend(actionName, data, transfers) { - var message = { - sourceName: this.sourceName, - targetName: this.targetName, - action: actionName, - data: data - }; - this.postMessage(message, transfers); - }, - sendWithPromise: function messageHandlerSendWithPromise(actionName, data, transfers) { - var callbackId = this.callbackIndex++; - var message = { - sourceName: this.sourceName, - targetName: this.targetName, - action: actionName, - data: data, - callbackId: callbackId - }; - var capability = createPromiseCapability(); - this.callbacksCapabilities[callbackId] = capability; - try { - this.postMessage(message, transfers); - } catch (e) { - capability.reject(e); - } - return capability.promise; - }, - postMessage: function (message, transfers) { - if (transfers && this.postMessageTransfers) { - this.comObj.postMessage(message, transfers); - } else { - this.comObj.postMessage(message); - } - }, - destroy: function () { - this.comObj.removeEventListener('message', this._onComObjOnMessage); - } - }; - function loadJpegStream(id, imageUrl, objs) { - var img = new Image(); - img.onload = function loadJpegStream_onloadClosure() { - objs.resolve(id, img); - }; - img.onerror = function loadJpegStream_onerrorClosure() { - objs.resolve(id, null); - warn('Error during JPEG image loading'); - }; - img.src = imageUrl; - } - /* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - (function checkURLConstructor(scope) { - var hasWorkingUrl = false; - try { - if (typeof URL === 'function' && typeof URL.prototype === 'object' && 'origin' in URL.prototype) { - var u = new URL('b', 'http://a'); - u.pathname = 'c%20d'; - hasWorkingUrl = u.href === 'http://a/c%20d'; - } - } catch (e) { - } - if (hasWorkingUrl) { - return; - } - var relative = Object.create(null); - relative['ftp'] = 21; - relative['file'] = 0; - relative['gopher'] = 70; - relative['http'] = 80; - relative['https'] = 443; - relative['ws'] = 80; - relative['wss'] = 443; - var relativePathDotMapping = Object.create(null); - relativePathDotMapping['%2e'] = '.'; - relativePathDotMapping['.%2e'] = '..'; - relativePathDotMapping['%2e.'] = '..'; - relativePathDotMapping['%2e%2e'] = '..'; - function isRelativeScheme(scheme) { - return relative[scheme] !== undefined; - } - function invalid() { - clear.call(this); - this._isInvalid = true; - } - function IDNAToASCII(h) { - if (h === '') { - invalid.call(this); - } - return h.toLowerCase(); - } - function percentEscape(c) { - var unicode = c.charCodeAt(0); - if (unicode > 0x20 && unicode < 0x7F && [ - 0x22, - 0x23, - 0x3C, - 0x3E, - 0x3F, - 0x60 - ].indexOf(unicode) === -1) { - return c; - } - return encodeURIComponent(c); - } - function percentEscapeQuery(c) { - var unicode = c.charCodeAt(0); - if (unicode > 0x20 && unicode < 0x7F && [ - 0x22, - 0x23, - 0x3C, - 0x3E, - 0x60 - ].indexOf(unicode) === -1) { - return c; - } - return encodeURIComponent(c); - } - var EOF, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/; - function parse(input, stateOverride, base) { - function err(message) { - errors.push(message); - } - var state = stateOverride || 'scheme start', cursor = 0, buffer = '', seenAt = false, seenBracket = false, errors = []; - loop: - while ((input[cursor - 1] !== EOF || cursor === 0) && !this._isInvalid) { - var c = input[cursor]; - switch (state) { - case 'scheme start': - if (c && ALPHA.test(c)) { - buffer += c.toLowerCase(); - state = 'scheme'; - } else if (!stateOverride) { - buffer = ''; - state = 'no scheme'; - continue; - } else { - err('Invalid scheme.'); - break loop; - } - break; - case 'scheme': - if (c && ALPHANUMERIC.test(c)) { - buffer += c.toLowerCase(); - } else if (c === ':') { - this._scheme = buffer; - buffer = ''; - if (stateOverride) { - break loop; - } - if (isRelativeScheme(this._scheme)) { - this._isRelative = true; - } - if (this._scheme === 'file') { - state = 'relative'; - } else if (this._isRelative && base && base._scheme === this._scheme) { - state = 'relative or authority'; - } else if (this._isRelative) { - state = 'authority first slash'; - } else { - state = 'scheme data'; - } - } else if (!stateOverride) { - buffer = ''; - cursor = 0; - state = 'no scheme'; - continue; - } else if (EOF === c) { - break loop; - } else { - err('Code point not allowed in scheme: ' + c); - break loop; - } - break; - case 'scheme data': - if (c === '?') { - this._query = '?'; - state = 'query'; - } else if (c === '#') { - this._fragment = '#'; - state = 'fragment'; - } else { - if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) { - this._schemeData += percentEscape(c); - } - } - break; - case 'no scheme': - if (!base || !isRelativeScheme(base._scheme)) { - err('Missing scheme.'); - invalid.call(this); - } else { - state = 'relative'; - continue; - } - break; - case 'relative or authority': - if (c === '/' && input[cursor + 1] === '/') { - state = 'authority ignore slashes'; - } else { - err('Expected /, got: ' + c); - state = 'relative'; - continue; - } - break; - case 'relative': - this._isRelative = true; - if ('file' !== this._scheme) { - this._scheme = base._scheme; - } - if (EOF === c) { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._username = base._username; - this._password = base._password; - break loop; - } else if (c === '/' || c === '\\') { - if (c === '\\') { - err('\\ is an invalid code point.'); - } - state = 'relative slash'; - } else if (c === '?') { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = '?'; - this._username = base._username; - this._password = base._password; - state = 'query'; - } else if (c === '#') { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._fragment = '#'; - this._username = base._username; - this._password = base._password; - state = 'fragment'; - } else { - var nextC = input[cursor + 1]; - var nextNextC = input[cursor + 2]; - if ('file' !== this._scheme || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && '?' !== nextNextC && '#' !== nextNextC) { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - this._path = base._path.slice(); - this._path.pop(); - } - state = 'relative path'; - continue; - } - break; - case 'relative slash': - if (c === '/' || c === '\\') { - if (c === '\\') { - err('\\ is an invalid code point.'); - } - if (this._scheme === 'file') { - state = 'file host'; - } else { - state = 'authority ignore slashes'; - } - } else { - if ('file' !== this._scheme) { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - } - state = 'relative path'; - continue; - } - break; - case 'authority first slash': - if (c === '/') { - state = 'authority second slash'; - } else { - err('Expected \'/\', got: ' + c); - state = 'authority ignore slashes'; - continue; - } - break; - case 'authority second slash': - state = 'authority ignore slashes'; - if ('/' !== c) { - err('Expected \'/\', got: ' + c); - continue; - } - break; - case 'authority ignore slashes': - if ('/' !== c && '\\' !== c) { - state = 'authority'; - continue; - } else { - err('Expected authority, got: ' + c); - } - break; - case 'authority': - if (c === '@') { - if (seenAt) { - err('@ already seen.'); - buffer += '%40'; - } - seenAt = true; - for (var i = 0; i < buffer.length; i++) { - var cp = buffer[i]; - if (cp === '\t' || cp === '\n' || cp === '\r') { - err('Invalid whitespace in authority.'); - continue; - } - if (cp === ':' && this._password === null) { - this._password = ''; - continue; - } - var tempC = percentEscape(cp); - if (null !== this._password) { - this._password += tempC; - } else { - this._username += tempC; - } - } - buffer = ''; - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - cursor -= buffer.length; - buffer = ''; - state = 'host'; - continue; - } else { - buffer += c; - } - break; - case 'file host': - if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - if (buffer.length === 2 && ALPHA.test(buffer[0]) && (buffer[1] === ':' || buffer[1] === '|')) { - state = 'relative path'; - } else if (buffer.length === 0) { - state = 'relative path start'; - } else { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'relative path start'; - } - continue; - } else if (c === '\t' || c === '\n' || c === '\r') { - err('Invalid whitespace in file host.'); - } else { - buffer += c; - } - break; - case 'host': - case 'hostname': - if (c === ':' && !seenBracket) { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'port'; - if (stateOverride === 'hostname') { - break loop; - } - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'relative path start'; - if (stateOverride) { - break loop; - } - continue; - } else if ('\t' !== c && '\n' !== c && '\r' !== c) { - if (c === '[') { - seenBracket = true; - } else if (c === ']') { - seenBracket = false; - } - buffer += c; - } else { - err('Invalid code point in host/hostname: ' + c); - } - break; - case 'port': - if (/[0-9]/.test(c)) { - buffer += c; - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) { - if ('' !== buffer) { - var temp = parseInt(buffer, 10); - if (temp !== relative[this._scheme]) { - this._port = temp + ''; - } - buffer = ''; - } - if (stateOverride) { - break loop; - } - state = 'relative path start'; - continue; - } else if (c === '\t' || c === '\n' || c === '\r') { - err('Invalid code point in port: ' + c); - } else { - invalid.call(this); - } - break; - case 'relative path start': - if (c === '\\') { - err('\'\\\' not allowed in path.'); - } - state = 'relative path'; - if ('/' !== c && '\\' !== c) { - continue; - } - break; - case 'relative path': - if (c === EOF || c === '/' || c === '\\' || !stateOverride && (c === '?' || c === '#')) { - if (c === '\\') { - err('\\ not allowed in relative path.'); - } - var tmp; - if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { - buffer = tmp; - } - if (buffer === '..') { - this._path.pop(); - if ('/' !== c && '\\' !== c) { - this._path.push(''); - } - } else if (buffer === '.' && '/' !== c && '\\' !== c) { - this._path.push(''); - } else if ('.' !== buffer) { - if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') { - buffer = buffer[0] + ':'; - } - this._path.push(buffer); - } - buffer = ''; - if (c === '?') { - this._query = '?'; - state = 'query'; - } else if (c === '#') { - this._fragment = '#'; - state = 'fragment'; - } - } else if ('\t' !== c && '\n' !== c && '\r' !== c) { - buffer += percentEscape(c); - } - break; - case 'query': - if (!stateOverride && c === '#') { - this._fragment = '#'; - state = 'fragment'; - } else if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) { - this._query += percentEscapeQuery(c); - } - break; - case 'fragment': - if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) { - this._fragment += c; - } - break; - } - cursor++; - } - } - function clear() { - this._scheme = ''; - this._schemeData = ''; - this._username = ''; - this._password = null; - this._host = ''; - this._port = ''; - this._path = []; - this._query = ''; - this._fragment = ''; - this._isInvalid = false; - this._isRelative = false; - } - function JURL(url, base) - { - if (base !== undefined && !(base instanceof JURL)) { - base = new JURL(String(base)); - } - this._url = url; - clear.call(this); - var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ''); - parse.call(this, input, null, base); - } - JURL.prototype = { - toString: function () { - return this.href; - }, - get href() { - if (this._isInvalid) { - return this._url; - } - var authority = ''; - if ('' !== this._username || null !== this._password) { - authority = this._username + (null !== this._password ? ':' + this._password : '') + '@'; - } - return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment; - }, - set href(href) { - clear.call(this); - parse.call(this, href); - }, - get protocol() { - return this._scheme + ':'; - }, - set protocol(protocol) { - if (this._isInvalid) { - return; - } - parse.call(this, protocol + ':', 'scheme start'); - }, - get host() { - return this._isInvalid ? '' : this._port ? this._host + ':' + this._port : this._host; - }, - set host(host) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, host, 'host'); - }, - get hostname() { - return this._host; - }, - set hostname(hostname) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, hostname, 'hostname'); - }, - get port() { - return this._port; - }, - set port(port) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, port, 'port'); - }, - get pathname() { - return this._isInvalid ? '' : this._isRelative ? '/' + this._path.join('/') : this._schemeData; - }, - set pathname(pathname) { - if (this._isInvalid || !this._isRelative) { - return; - } - this._path = []; - parse.call(this, pathname, 'relative path start'); - }, - get search() { - return this._isInvalid || !this._query || this._query === '?' ? '' : this._query; - }, - set search(search) { - if (this._isInvalid || !this._isRelative) { - return; - } - this._query = '?'; - if (search[0] === '?') { - search = search.slice(1); - } - parse.call(this, search, 'query'); - }, - get hash() { - return this._isInvalid || !this._fragment || this._fragment === '#' ? '' : this._fragment; - }, - set hash(hash) { - if (this._isInvalid) { - return; - } - this._fragment = '#'; - if (hash[0] === '#') { - hash = hash.slice(1); - } - parse.call(this, hash, 'fragment'); - }, - get origin() { - var host; - if (this._isInvalid || !this._scheme) { - return ''; - } - switch (this._scheme) { - case 'data': - case 'file': - case 'javascript': - case 'mailto': - return 'null'; - } - host = this.host; - if (!host) { - return ''; - } - return this._scheme + '://' + host; - } - }; - var OriginalURL = scope.URL; - if (OriginalURL) { - JURL.createObjectURL = function (blob) { - return OriginalURL.createObjectURL.apply(OriginalURL, arguments); - }; - JURL.revokeObjectURL = function (url) { - OriginalURL.revokeObjectURL(url); - }; - } - scope.URL = JURL; - }(globalScope)); - exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX; - exports.IDENTITY_MATRIX = IDENTITY_MATRIX; - exports.OPS = OPS; - exports.VERBOSITY_LEVELS = VERBOSITY_LEVELS; - exports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES; - exports.AnnotationBorderStyleType = AnnotationBorderStyleType; - exports.AnnotationFieldFlag = AnnotationFieldFlag; - exports.AnnotationFlag = AnnotationFlag; - exports.AnnotationType = AnnotationType; - exports.FontType = FontType; - exports.ImageKind = ImageKind; - exports.InvalidPDFException = InvalidPDFException; - exports.MessageHandler = MessageHandler; - exports.MissingDataException = MissingDataException; - exports.MissingPDFException = MissingPDFException; - exports.NotImplementedException = NotImplementedException; - exports.PageViewport = PageViewport; - exports.PasswordException = PasswordException; - exports.PasswordResponses = PasswordResponses; - exports.StatTimer = StatTimer; - exports.StreamType = StreamType; - exports.TextRenderingMode = TextRenderingMode; - exports.UnexpectedResponseException = UnexpectedResponseException; - exports.UnknownErrorException = UnknownErrorException; - exports.Util = Util; - exports.XRefParseException = XRefParseException; - exports.arrayByteLength = arrayByteLength; - exports.arraysToBytes = arraysToBytes; - exports.assert = assert; - exports.bytesToString = bytesToString; - exports.createBlob = createBlob; - exports.createPromiseCapability = createPromiseCapability; - exports.createObjectURL = createObjectURL; - exports.deprecated = deprecated; - exports.error = error; - exports.getLookupTableFactory = getLookupTableFactory; - exports.getVerbosityLevel = getVerbosityLevel; - exports.globalScope = globalScope; - exports.info = info; - exports.isArray = isArray; - exports.isArrayBuffer = isArrayBuffer; - exports.isBool = isBool; - exports.isEmptyObj = isEmptyObj; - exports.isInt = isInt; - exports.isNum = isNum; - exports.isString = isString; - exports.isSpace = isSpace; - exports.isSameOrigin = isSameOrigin; - exports.createValidAbsoluteUrl = createValidAbsoluteUrl; - exports.isLittleEndian = isLittleEndian; - exports.isEvalSupported = isEvalSupported; - exports.loadJpegStream = loadJpegStream; - exports.log2 = log2; - exports.readInt8 = readInt8; - exports.readUint16 = readUint16; - exports.readUint32 = readUint32; - exports.removeNullCharacters = removeNullCharacters; - exports.setVerbosityLevel = setVerbosityLevel; - exports.shadow = shadow; - exports.string32 = string32; - exports.stringToBytes = stringToBytes; - exports.stringToPDFString = stringToPDFString; - exports.stringToUTF8String = stringToUTF8String; - exports.utf8StringToString = utf8StringToString; - exports.warn = warn; - })); - (function (root, factory) { - factory(root.pdfjsDisplayDOMUtils = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var removeNullCharacters = sharedUtil.removeNullCharacters; - var warn = sharedUtil.warn; - var deprecated = sharedUtil.deprecated; - var createValidAbsoluteUrl = sharedUtil.createValidAbsoluteUrl; - var DEFAULT_LINK_REL = 'noopener noreferrer nofollow'; - var CustomStyle = function CustomStyleClosure() { - var prefixes = [ - 'ms', - 'Moz', - 'Webkit', - 'O' - ]; - var _cache = Object.create(null); - function CustomStyle() { - } - CustomStyle.getProp = function get(propName, element) { - if (arguments.length === 1 && typeof _cache[propName] === 'string') { - return _cache[propName]; - } - element = element || document.documentElement; - var style = element.style, prefixed, uPropName; - if (typeof style[propName] === 'string') { - return _cache[propName] = propName; - } - uPropName = propName.charAt(0).toUpperCase() + propName.slice(1); - for (var i = 0, l = prefixes.length; i < l; i++) { - prefixed = prefixes[i] + uPropName; - if (typeof style[prefixed] === 'string') { - return _cache[propName] = prefixed; - } - } - return _cache[propName] = 'undefined'; - }; - CustomStyle.setProp = function set(propName, element, str) { - var prop = this.getProp(propName); - if (prop !== 'undefined') { - element.style[prop] = str; - } - }; - return CustomStyle; - }(); - var hasCanvasTypedArrays; - hasCanvasTypedArrays = function hasCanvasTypedArrays() { - var canvas = document.createElement('canvas'); - canvas.width = canvas.height = 1; - var ctx = canvas.getContext('2d'); - var imageData = ctx.createImageData(1, 1); - return typeof imageData.data.buffer !== 'undefined'; - }; - var LinkTarget = { - NONE: 0, - SELF: 1, - BLANK: 2, - PARENT: 3, - TOP: 4 - }; - var LinkTargetStringMap = [ - '', - '_self', - '_blank', - '_parent', - '_top' - ]; - function addLinkAttributes(link, params) { - var url = params && params.url; - link.href = link.title = url ? removeNullCharacters(url) : ''; - if (url) { - var target = params.target; - if (typeof target === 'undefined') { - target = getDefaultSetting('externalLinkTarget'); - } - link.target = LinkTargetStringMap[target]; - var rel = params.rel; - if (typeof rel === 'undefined') { - rel = getDefaultSetting('externalLinkRel'); - } - link.rel = rel; - } - } - function getFilenameFromUrl(url) { - var anchor = url.indexOf('#'); - var query = url.indexOf('?'); - var end = Math.min(anchor > 0 ? anchor : url.length, query > 0 ? query : url.length); - return url.substring(url.lastIndexOf('/', end) + 1, end); - } - function getDefaultSetting(id) { - var globalSettings = sharedUtil.globalScope.PDFJS; - switch (id) { - case 'pdfBug': - return globalSettings ? globalSettings.pdfBug : false; - case 'disableAutoFetch': - return globalSettings ? globalSettings.disableAutoFetch : false; - case 'disableStream': - return globalSettings ? globalSettings.disableStream : false; - case 'disableRange': - return globalSettings ? globalSettings.disableRange : false; - case 'disableFontFace': - return globalSettings ? globalSettings.disableFontFace : false; - case 'disableCreateObjectURL': - return globalSettings ? globalSettings.disableCreateObjectURL : false; - case 'disableWebGL': - return globalSettings ? globalSettings.disableWebGL : true; - case 'cMapUrl': - return globalSettings ? globalSettings.cMapUrl : null; - case 'cMapPacked': - return globalSettings ? globalSettings.cMapPacked : false; - case 'postMessageTransfers': - return globalSettings ? globalSettings.postMessageTransfers : true; - case 'workerSrc': - return globalSettings ? globalSettings.workerSrc : null; - case 'disableWorker': - return globalSettings ? globalSettings.disableWorker : false; - case 'maxImageSize': - return globalSettings ? globalSettings.maxImageSize : -1; - case 'imageResourcesPath': - return globalSettings ? globalSettings.imageResourcesPath : ''; - case 'isEvalSupported': - return globalSettings ? globalSettings.isEvalSupported : true; - case 'externalLinkTarget': - if (!globalSettings) { - return LinkTarget.NONE; - } - switch (globalSettings.externalLinkTarget) { - case LinkTarget.NONE: - case LinkTarget.SELF: - case LinkTarget.BLANK: - case LinkTarget.PARENT: - case LinkTarget.TOP: - return globalSettings.externalLinkTarget; - } - warn('PDFJS.externalLinkTarget is invalid: ' + globalSettings.externalLinkTarget); - globalSettings.externalLinkTarget = LinkTarget.NONE; - return LinkTarget.NONE; - case 'externalLinkRel': - return globalSettings ? globalSettings.externalLinkRel : DEFAULT_LINK_REL; - case 'enableStats': - return !!(globalSettings && globalSettings.enableStats); - default: - throw new Error('Unknown default setting: ' + id); - } - } - function isExternalLinkTargetSet() { - var externalLinkTarget = getDefaultSetting('externalLinkTarget'); - switch (externalLinkTarget) { - case LinkTarget.NONE: - return false; - case LinkTarget.SELF: - case LinkTarget.BLANK: - case LinkTarget.PARENT: - case LinkTarget.TOP: - return true; - } - } - function isValidUrl(url, allowRelative) { - deprecated('isValidUrl(), please use createValidAbsoluteUrl() instead.'); - var baseUrl = allowRelative ? 'http://example.com' : null; - return createValidAbsoluteUrl(url, baseUrl) !== null; - } - exports.CustomStyle = CustomStyle; - exports.addLinkAttributes = addLinkAttributes; - exports.isExternalLinkTargetSet = isExternalLinkTargetSet; - exports.isValidUrl = isValidUrl; - exports.getFilenameFromUrl = getFilenameFromUrl; - exports.LinkTarget = LinkTarget; - exports.hasCanvasTypedArrays = hasCanvasTypedArrays; - exports.getDefaultSetting = getDefaultSetting; - exports.DEFAULT_LINK_REL = DEFAULT_LINK_REL; - })); - (function (root, factory) { - factory(root.pdfjsDisplayFontLoader = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var assert = sharedUtil.assert; - var bytesToString = sharedUtil.bytesToString; - var string32 = sharedUtil.string32; - var shadow = sharedUtil.shadow; - var warn = sharedUtil.warn; - function FontLoader(docId) { - this.docId = docId; - this.styleElement = null; - this.nativeFontFaces = []; - this.loadTestFontId = 0; - this.loadingContext = { - requests: [], - nextRequestId: 0 - }; - } - FontLoader.prototype = { - insertRule: function fontLoaderInsertRule(rule) { - var styleElement = this.styleElement; - if (!styleElement) { - styleElement = this.styleElement = document.createElement('style'); - styleElement.id = 'PDFJS_FONT_STYLE_TAG_' + this.docId; - document.documentElement.getElementsByTagName('head')[0].appendChild(styleElement); - } - var styleSheet = styleElement.sheet; - styleSheet.insertRule(rule, styleSheet.cssRules.length); - }, - clear: function fontLoaderClear() { - var styleElement = this.styleElement; - if (styleElement) { - styleElement.parentNode.removeChild(styleElement); - styleElement = this.styleElement = null; - } - this.nativeFontFaces.forEach(function (nativeFontFace) { - document.fonts.delete(nativeFontFace); - }); - this.nativeFontFaces.length = 0; - } - }; - var getLoadTestFont = function () { - return atob('T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQ' + 'AABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwA' + 'AAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbm' + 'FtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAA' + 'AADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6A' + 'ABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAA' + 'MQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAA' + 'AAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAA' + 'AAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQ' + 'AAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMA' + 'AQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAA' + 'EAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAA' + 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAA' + 'AAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgc' + 'A/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWF' + 'hYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQA' + 'AAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAg' + 'ABAAAAAAAAAAAD6AAAAAAAAA=='); - }; - Object.defineProperty(FontLoader.prototype, 'loadTestFont', { - get: function () { - return shadow(this, 'loadTestFont', getLoadTestFont()); - }, - configurable: true - }); - FontLoader.prototype.addNativeFontFace = function fontLoader_addNativeFontFace(nativeFontFace) { - this.nativeFontFaces.push(nativeFontFace); - document.fonts.add(nativeFontFace); - }; - FontLoader.prototype.bind = function fontLoaderBind(fonts, callback) { - var rules = []; - var fontsToLoad = []; - var fontLoadPromises = []; - var getNativeFontPromise = function (nativeFontFace) { - return nativeFontFace.loaded.catch(function (e) { - warn('Failed to load font "' + nativeFontFace.family + '": ' + e); - }); - }; - var isFontLoadingAPISupported = FontLoader.isFontLoadingAPISupported && !FontLoader.isSyncFontLoadingSupported; - for (var i = 0, ii = fonts.length; i < ii; i++) { - var font = fonts[i]; - if (font.attached || font.loading === false) { - continue; - } - font.attached = true; - if (isFontLoadingAPISupported) { - var nativeFontFace = font.createNativeFontFace(); - if (nativeFontFace) { - this.addNativeFontFace(nativeFontFace); - fontLoadPromises.push(getNativeFontPromise(nativeFontFace)); - } - } else { - var rule = font.createFontFaceRule(); - if (rule) { - this.insertRule(rule); - rules.push(rule); - fontsToLoad.push(font); - } - } - } - var request = this.queueLoadingCallback(callback); - if (isFontLoadingAPISupported) { - Promise.all(fontLoadPromises).then(function () { - request.complete(); - }); - } else if (rules.length > 0 && !FontLoader.isSyncFontLoadingSupported) { - this.prepareFontLoadEvent(rules, fontsToLoad, request); - } else { - request.complete(); - } - }; - FontLoader.prototype.queueLoadingCallback = function FontLoader_queueLoadingCallback(callback) { - function LoadLoader_completeRequest() { - assert(!request.end, 'completeRequest() cannot be called twice'); - request.end = Date.now(); - while (context.requests.length > 0 && context.requests[0].end) { - var otherRequest = context.requests.shift(); - setTimeout(otherRequest.callback, 0); - } - } - var context = this.loadingContext; - var requestId = 'pdfjs-font-loading-' + context.nextRequestId++; - var request = { - id: requestId, - complete: LoadLoader_completeRequest, - callback: callback, - started: Date.now() - }; - context.requests.push(request); - return request; - }; - FontLoader.prototype.prepareFontLoadEvent = function fontLoaderPrepareFontLoadEvent(rules, fonts, request) { - function int32(data, offset) { - return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff; - } - function spliceString(s, offset, remove, insert) { - var chunk1 = s.substr(0, offset); - var chunk2 = s.substr(offset + remove); - return chunk1 + insert + chunk2; - } - var i, ii; - var canvas = document.createElement('canvas'); - canvas.width = 1; - canvas.height = 1; - var ctx = canvas.getContext('2d'); - var called = 0; - function isFontReady(name, callback) { - called++; - if (called > 30) { - warn('Load test font never loaded.'); - callback(); - return; - } - ctx.font = '30px ' + name; - ctx.fillText('.', 0, 20); - var imageData = ctx.getImageData(0, 0, 1, 1); - if (imageData.data[3] > 0) { - callback(); - return; - } - setTimeout(isFontReady.bind(null, name, callback)); - } - var loadTestFontId = 'lt' + Date.now() + this.loadTestFontId++; - var data = this.loadTestFont; - var COMMENT_OFFSET = 976; - data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId); - var CFF_CHECKSUM_OFFSET = 16; - var XXXX_VALUE = 0x58585858; - var checksum = int32(data, CFF_CHECKSUM_OFFSET); - for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) { - checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0; - } - if (i < loadTestFontId.length) { - checksum = checksum - XXXX_VALUE + int32(loadTestFontId + 'XXX', i) | 0; - } - data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum)); - var url = 'url(data:font/opentype;base64,' + btoa(data) + ');'; - var rule = '@font-face { font-family:"' + loadTestFontId + '";src:' + url + '}'; - this.insertRule(rule); - var names = []; - for (i = 0, ii = fonts.length; i < ii; i++) { - names.push(fonts[i].loadedName); - } - names.push(loadTestFontId); - var div = document.createElement('div'); - div.setAttribute('style', 'visibility: hidden;' + 'width: 10px; height: 10px;' + 'position: absolute; top: 0px; left: 0px;'); - for (i = 0, ii = names.length; i < ii; ++i) { - var span = document.createElement('span'); - span.textContent = 'Hi'; - span.style.fontFamily = names[i]; - div.appendChild(span); - } - document.body.appendChild(div); - isFontReady(loadTestFontId, function () { - document.body.removeChild(div); - request.complete(); - }); - }; - FontLoader.isFontLoadingAPISupported = typeof document !== 'undefined' && !!document.fonts; - var isSyncFontLoadingSupported = function isSyncFontLoadingSupported() { - if (typeof navigator === 'undefined') { - return true; - } - var supported = false; - var m = /Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent); - if (m && m[1] >= 14) { - supported = true; - } - return supported; - }; - Object.defineProperty(FontLoader, 'isSyncFontLoadingSupported', { - get: function () { - return shadow(FontLoader, 'isSyncFontLoadingSupported', isSyncFontLoadingSupported()); - }, - enumerable: true, - configurable: true - }); - var IsEvalSupportedCached = { - get value() { - return shadow(this, 'value', sharedUtil.isEvalSupported()); - } - }; - var FontFaceObject = function FontFaceObjectClosure() { - function FontFaceObject(translatedData, options) { - this.compiledGlyphs = Object.create(null); - for (var i in translatedData) { - this[i] = translatedData[i]; - } - this.options = options; - } - FontFaceObject.prototype = { - createNativeFontFace: function FontFaceObject_createNativeFontFace() { - if (!this.data) { - return null; - } - if (this.options.disableFontFace) { - this.disableFontFace = true; - return null; - } - var nativeFontFace = new FontFace(this.loadedName, this.data, {}); - if (this.options.fontRegistry) { - this.options.fontRegistry.registerFont(this); - } - return nativeFontFace; - }, - createFontFaceRule: function FontFaceObject_createFontFaceRule() { - if (!this.data) { - return null; - } - if (this.options.disableFontFace) { - this.disableFontFace = true; - return null; - } - var data = bytesToString(new Uint8Array(this.data)); - var fontName = this.loadedName; - var url = 'url(data:' + this.mimetype + ';base64,' + btoa(data) + ');'; - var rule = '@font-face { font-family:"' + fontName + '";src:' + url + '}'; - if (this.options.fontRegistry) { - this.options.fontRegistry.registerFont(this, url); - } - return rule; - }, - getPathGenerator: function FontFaceObject_getPathGenerator(objs, character) { - if (!(character in this.compiledGlyphs)) { - var cmds = objs.get(this.loadedName + '_path_' + character); - var current, i, len; - if (this.options.isEvalSupported && IsEvalSupportedCached.value) { - var args, js = ''; - for (i = 0, len = cmds.length; i < len; i++) { - current = cmds[i]; - if (current.args !== undefined) { - args = current.args.join(','); - } else { - args = ''; - } - js += 'c.' + current.cmd + '(' + args + ');\n'; - } - this.compiledGlyphs[character] = new Function('c', 'size', js); - } else { - this.compiledGlyphs[character] = function (c, size) { - for (i = 0, len = cmds.length; i < len; i++) { - current = cmds[i]; - if (current.cmd === 'scale') { - current.args = [ - size, - -size - ]; - } - c[current.cmd].apply(c, current.args); - } - }; - } - } - return this.compiledGlyphs[character]; - } - }; - return FontFaceObject; - }(); - exports.FontFaceObject = FontFaceObject; - exports.FontLoader = FontLoader; - })); - (function (root, factory) { - factory(root.pdfjsDisplayMetadata = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var error = sharedUtil.error; - function fixMetadata(meta) { - return meta.replace(/>\\376\\377([^<]+)/g, function (all, codes) { - var bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g, function (code, d1, d2, d3) { - return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1); - }); - var chars = ''; - for (var i = 0; i < bytes.length; i += 2) { - var code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1); - chars += code >= 32 && code < 127 && code !== 60 && code !== 62 && code !== 38 ? String.fromCharCode(code) : '&#x' + (0x10000 + code).toString(16).substring(1) + ';'; - } - return '>' + chars; - }); - } - function Metadata(meta) { - if (typeof meta === 'string') { - meta = fixMetadata(meta); - var parser = new DOMParser(); - meta = parser.parseFromString(meta, 'application/xml'); - } else if (!(meta instanceof Document)) { - error('Metadata: Invalid metadata object'); - } - this.metaDocument = meta; - this.metadata = Object.create(null); - this.parse(); - } - Metadata.prototype = { - parse: function Metadata_parse() { - var doc = this.metaDocument; - var rdf = doc.documentElement; - if (rdf.nodeName.toLowerCase() !== 'rdf:rdf') { - rdf = rdf.firstChild; - while (rdf && rdf.nodeName.toLowerCase() !== 'rdf:rdf') { - rdf = rdf.nextSibling; - } - } - var nodeName = rdf ? rdf.nodeName.toLowerCase() : null; - if (!rdf || nodeName !== 'rdf:rdf' || !rdf.hasChildNodes()) { - return; - } - var children = rdf.childNodes, desc, entry, name, i, ii, length, iLength; - for (i = 0, length = children.length; i < length; i++) { - desc = children[i]; - if (desc.nodeName.toLowerCase() !== 'rdf:description') { - continue; - } - for (ii = 0, iLength = desc.childNodes.length; ii < iLength; ii++) { - if (desc.childNodes[ii].nodeName.toLowerCase() !== '#text') { - entry = desc.childNodes[ii]; - name = entry.nodeName.toLowerCase(); - this.metadata[name] = entry.textContent.trim(); - } - } - } - }, - get: function Metadata_get(name) { - return this.metadata[name] || null; - }, - has: function Metadata_has(name) { - return typeof this.metadata[name] !== 'undefined'; - } - }; - exports.Metadata = Metadata; - })); - (function (root, factory) { - factory(root.pdfjsDisplaySVG = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var FONT_IDENTITY_MATRIX = sharedUtil.FONT_IDENTITY_MATRIX; - var IDENTITY_MATRIX = sharedUtil.IDENTITY_MATRIX; - var ImageKind = sharedUtil.ImageKind; - var OPS = sharedUtil.OPS; - var Util = sharedUtil.Util; - var isNum = sharedUtil.isNum; - var isArray = sharedUtil.isArray; - var warn = sharedUtil.warn; - var createObjectURL = sharedUtil.createObjectURL; - var SVG_DEFAULTS = { - fontStyle: 'normal', - fontWeight: 'normal', - fillColor: '#000000' - }; - var convertImgDataToPng = function convertImgDataToPngClosure() { - var PNG_HEADER = new Uint8Array([ - 0x89, - 0x50, - 0x4e, - 0x47, - 0x0d, - 0x0a, - 0x1a, - 0x0a - ]); - var CHUNK_WRAPPER_SIZE = 12; - var crcTable = new Int32Array(256); - for (var i = 0; i < 256; i++) { - var c = i; - for (var h = 0; h < 8; h++) { - if (c & 1) { - c = 0xedB88320 ^ c >> 1 & 0x7fffffff; - } else { - c = c >> 1 & 0x7fffffff; - } - } - crcTable[i] = c; - } - function crc32(data, start, end) { - var crc = -1; - for (var i = start; i < end; i++) { - var a = (crc ^ data[i]) & 0xff; - var b = crcTable[a]; - crc = crc >>> 8 ^ b; - } - return crc ^ -1; - } - function writePngChunk(type, body, data, offset) { - var p = offset; - var len = body.length; - data[p] = len >> 24 & 0xff; - data[p + 1] = len >> 16 & 0xff; - data[p + 2] = len >> 8 & 0xff; - data[p + 3] = len & 0xff; - p += 4; - data[p] = type.charCodeAt(0) & 0xff; - data[p + 1] = type.charCodeAt(1) & 0xff; - data[p + 2] = type.charCodeAt(2) & 0xff; - data[p + 3] = type.charCodeAt(3) & 0xff; - p += 4; - data.set(body, p); - p += body.length; - var crc = crc32(data, offset + 4, p); - data[p] = crc >> 24 & 0xff; - data[p + 1] = crc >> 16 & 0xff; - data[p + 2] = crc >> 8 & 0xff; - data[p + 3] = crc & 0xff; - } - function adler32(data, start, end) { - var a = 1; - var b = 0; - for (var i = start; i < end; ++i) { - a = (a + (data[i] & 0xff)) % 65521; - b = (b + a) % 65521; - } - return b << 16 | a; - } - function encode(imgData, kind, forceDataSchema) { - var width = imgData.width; - var height = imgData.height; - var bitDepth, colorType, lineSize; - var bytes = imgData.data; - switch (kind) { - case ImageKind.GRAYSCALE_1BPP: - colorType = 0; - bitDepth = 1; - lineSize = width + 7 >> 3; - break; - case ImageKind.RGB_24BPP: - colorType = 2; - bitDepth = 8; - lineSize = width * 3; - break; - case ImageKind.RGBA_32BPP: - colorType = 6; - bitDepth = 8; - lineSize = width * 4; - break; - default: - throw new Error('invalid format'); - } - var literals = new Uint8Array((1 + lineSize) * height); - var offsetLiterals = 0, offsetBytes = 0; - var y, i; - for (y = 0; y < height; ++y) { - literals[offsetLiterals++] = 0; - literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize), offsetLiterals); - offsetBytes += lineSize; - offsetLiterals += lineSize; - } - if (kind === ImageKind.GRAYSCALE_1BPP) { - offsetLiterals = 0; - for (y = 0; y < height; y++) { - offsetLiterals++; - for (i = 0; i < lineSize; i++) { - literals[offsetLiterals++] ^= 0xFF; - } - } - } - var ihdr = new Uint8Array([ - width >> 24 & 0xff, - width >> 16 & 0xff, - width >> 8 & 0xff, - width & 0xff, - height >> 24 & 0xff, - height >> 16 & 0xff, - height >> 8 & 0xff, - height & 0xff, - bitDepth, - colorType, - 0x00, - 0x00, - 0x00 - ]); - var len = literals.length; - var maxBlockLength = 0xFFFF; - var deflateBlocks = Math.ceil(len / maxBlockLength); - var idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4); - var pi = 0; - idat[pi++] = 0x78; - idat[pi++] = 0x9c; - var pos = 0; - while (len > maxBlockLength) { - idat[pi++] = 0x00; - idat[pi++] = 0xff; - idat[pi++] = 0xff; - idat[pi++] = 0x00; - idat[pi++] = 0x00; - idat.set(literals.subarray(pos, pos + maxBlockLength), pi); - pi += maxBlockLength; - pos += maxBlockLength; - len -= maxBlockLength; - } - idat[pi++] = 0x01; - idat[pi++] = len & 0xff; - idat[pi++] = len >> 8 & 0xff; - idat[pi++] = ~len & 0xffff & 0xff; - idat[pi++] = (~len & 0xffff) >> 8 & 0xff; - idat.set(literals.subarray(pos), pi); - pi += literals.length - pos; - var adler = adler32(literals, 0, literals.length); - idat[pi++] = adler >> 24 & 0xff; - idat[pi++] = adler >> 16 & 0xff; - idat[pi++] = adler >> 8 & 0xff; - idat[pi++] = adler & 0xff; - var pngLength = PNG_HEADER.length + CHUNK_WRAPPER_SIZE * 3 + ihdr.length + idat.length; - var data = new Uint8Array(pngLength); - var offset = 0; - data.set(PNG_HEADER, offset); - offset += PNG_HEADER.length; - writePngChunk('IHDR', ihdr, data, offset); - offset += CHUNK_WRAPPER_SIZE + ihdr.length; - writePngChunk('IDATA', idat, data, offset); - offset += CHUNK_WRAPPER_SIZE + idat.length; - writePngChunk('IEND', new Uint8Array(0), data, offset); - return createObjectURL(data, 'image/png', forceDataSchema); - } - return function convertImgDataToPng(imgData, forceDataSchema) { - var kind = imgData.kind === undefined ? ImageKind.GRAYSCALE_1BPP : imgData.kind; - return encode(imgData, kind, forceDataSchema); - }; - }(); - var SVGExtraState = function SVGExtraStateClosure() { - function SVGExtraState() { - this.fontSizeScale = 1; - this.fontWeight = SVG_DEFAULTS.fontWeight; - this.fontSize = 0; - this.textMatrix = IDENTITY_MATRIX; - this.fontMatrix = FONT_IDENTITY_MATRIX; - this.leading = 0; - this.x = 0; - this.y = 0; - this.lineX = 0; - this.lineY = 0; - this.charSpacing = 0; - this.wordSpacing = 0; - this.textHScale = 1; - this.textRise = 0; - this.fillColor = SVG_DEFAULTS.fillColor; - this.strokeColor = '#000000'; - this.fillAlpha = 1; - this.strokeAlpha = 1; - this.lineWidth = 1; - this.lineJoin = ''; - this.lineCap = ''; - this.miterLimit = 0; - this.dashArray = []; - this.dashPhase = 0; - this.dependencies = []; - this.activeClipUrl = null; - this.clipGroup = null; - this.maskId = ''; - } - SVGExtraState.prototype = { - clone: function SVGExtraState_clone() { - return Object.create(this); - }, - setCurrentPoint: function SVGExtraState_setCurrentPoint(x, y) { - this.x = x; - this.y = y; - } - }; - return SVGExtraState; - }(); - var SVGGraphics = function SVGGraphicsClosure() { - function opListToTree(opList) { - var opTree = []; - var tmp = []; - var opListLen = opList.length; - for (var x = 0; x < opListLen; x++) { - if (opList[x].fn === 'save') { - opTree.push({ - 'fnId': 92, - 'fn': 'group', - 'items': [] - }); - tmp.push(opTree); - opTree = opTree[opTree.length - 1].items; - continue; - } - if (opList[x].fn === 'restore') { - opTree = tmp.pop(); - } else { - opTree.push(opList[x]); - } - } - return opTree; - } - function pf(value) { - if (value === (value | 0)) { - return value.toString(); - } - var s = value.toFixed(10); - var i = s.length - 1; - if (s[i] !== '0') { - return s; - } - do { - i--; - } while (s[i] === '0'); - return s.substr(0, s[i] === '.' ? i : i + 1); - } - function pm(m) { - if (m[4] === 0 && m[5] === 0) { - if (m[1] === 0 && m[2] === 0) { - if (m[0] === 1 && m[3] === 1) { - return ''; - } - return 'scale(' + pf(m[0]) + ' ' + pf(m[3]) + ')'; - } - if (m[0] === m[3] && m[1] === -m[2]) { - var a = Math.acos(m[0]) * 180 / Math.PI; - return 'rotate(' + pf(a) + ')'; - } - } else { - if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) { - return 'translate(' + pf(m[4]) + ' ' + pf(m[5]) + ')'; - } - } - return 'matrix(' + pf(m[0]) + ' ' + pf(m[1]) + ' ' + pf(m[2]) + ' ' + pf(m[3]) + ' ' + pf(m[4]) + ' ' + pf(m[5]) + ')'; - } - function SVGGraphics(commonObjs, objs, forceDataSchema) { - this.current = new SVGExtraState(); - this.transformMatrix = IDENTITY_MATRIX; - this.transformStack = []; - this.extraStack = []; - this.commonObjs = commonObjs; - this.objs = objs; - this.pendingEOFill = false; - this.embedFonts = false; - this.embeddedFonts = Object.create(null); - this.cssStyle = null; - this.forceDataSchema = !!forceDataSchema; - } - var NS = 'http://www.w3.org/2000/svg'; - var XML_NS = 'http://www.w3.org/XML/1998/namespace'; - var XLINK_NS = 'http://www.w3.org/1999/xlink'; - var LINE_CAP_STYLES = [ - 'butt', - 'round', - 'square' - ]; - var LINE_JOIN_STYLES = [ - 'miter', - 'round', - 'bevel' - ]; - var clipCount = 0; - var maskCount = 0; - SVGGraphics.prototype = { - save: function SVGGraphics_save() { - this.transformStack.push(this.transformMatrix); - var old = this.current; - this.extraStack.push(old); - this.current = old.clone(); - }, - restore: function SVGGraphics_restore() { - this.transformMatrix = this.transformStack.pop(); - this.current = this.extraStack.pop(); - this.tgrp = null; - }, - group: function SVGGraphics_group(items) { - this.save(); - this.executeOpTree(items); - this.restore(); - }, - loadDependencies: function SVGGraphics_loadDependencies(operatorList) { - var fnArray = operatorList.fnArray; - var fnArrayLen = fnArray.length; - var argsArray = operatorList.argsArray; - var self = this; - for (var i = 0; i < fnArrayLen; i++) { - if (OPS.dependency === fnArray[i]) { - var deps = argsArray[i]; - for (var n = 0, nn = deps.length; n < nn; n++) { - var obj = deps[n]; - var common = obj.substring(0, 2) === 'g_'; - var promise; - if (common) { - promise = new Promise(function (resolve) { - self.commonObjs.get(obj, resolve); - }); - } else { - promise = new Promise(function (resolve) { - self.objs.get(obj, resolve); - }); - } - this.current.dependencies.push(promise); - } - } - } - return Promise.all(this.current.dependencies); - }, - transform: function SVGGraphics_transform(a, b, c, d, e, f) { - var transformMatrix = [ - a, - b, - c, - d, - e, - f - ]; - this.transformMatrix = Util.transform(this.transformMatrix, transformMatrix); - this.tgrp = null; - }, - getSVG: function SVGGraphics_getSVG(operatorList, viewport) { - this.viewport = viewport; - var svgElement = this._initialize(viewport); - return this.loadDependencies(operatorList).then(function () { - this.transformMatrix = IDENTITY_MATRIX; - var opTree = this.convertOpList(operatorList); - this.executeOpTree(opTree); - return svgElement; - }.bind(this)); - }, - convertOpList: function SVGGraphics_convertOpList(operatorList) { - var argsArray = operatorList.argsArray; - var fnArray = operatorList.fnArray; - var fnArrayLen = fnArray.length; - var REVOPS = []; - var opList = []; - for (var op in OPS) { - REVOPS[OPS[op]] = op; - } - for (var x = 0; x < fnArrayLen; x++) { - var fnId = fnArray[x]; - opList.push({ - 'fnId': fnId, - 'fn': REVOPS[fnId], - 'args': argsArray[x] - }); - } - return opListToTree(opList); - }, - executeOpTree: function SVGGraphics_executeOpTree(opTree) { - var opTreeLen = opTree.length; - for (var x = 0; x < opTreeLen; x++) { - var fn = opTree[x].fn; - var fnId = opTree[x].fnId; - var args = opTree[x].args; - switch (fnId | 0) { - case OPS.beginText: - this.beginText(); - break; - case OPS.setLeading: - this.setLeading(args); - break; - case OPS.setLeadingMoveText: - this.setLeadingMoveText(args[0], args[1]); - break; - case OPS.setFont: - this.setFont(args); - break; - case OPS.showText: - this.showText(args[0]); - break; - case OPS.showSpacedText: - this.showText(args[0]); - break; - case OPS.endText: - this.endText(); - break; - case OPS.moveText: - this.moveText(args[0], args[1]); - break; - case OPS.setCharSpacing: - this.setCharSpacing(args[0]); - break; - case OPS.setWordSpacing: - this.setWordSpacing(args[0]); - break; - case OPS.setHScale: - this.setHScale(args[0]); - break; - case OPS.setTextMatrix: - this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); - break; - case OPS.setLineWidth: - this.setLineWidth(args[0]); - break; - case OPS.setLineJoin: - this.setLineJoin(args[0]); - break; - case OPS.setLineCap: - this.setLineCap(args[0]); - break; - case OPS.setMiterLimit: - this.setMiterLimit(args[0]); - break; - case OPS.setFillRGBColor: - this.setFillRGBColor(args[0], args[1], args[2]); - break; - case OPS.setStrokeRGBColor: - this.setStrokeRGBColor(args[0], args[1], args[2]); - break; - case OPS.setDash: - this.setDash(args[0], args[1]); - break; - case OPS.setGState: - this.setGState(args[0]); - break; - case OPS.fill: - this.fill(); - break; - case OPS.eoFill: - this.eoFill(); - break; - case OPS.stroke: - this.stroke(); - break; - case OPS.fillStroke: - this.fillStroke(); - break; - case OPS.eoFillStroke: - this.eoFillStroke(); - break; - case OPS.clip: - this.clip('nonzero'); - break; - case OPS.eoClip: - this.clip('evenodd'); - break; - case OPS.paintSolidColorImageMask: - this.paintSolidColorImageMask(); - break; - case OPS.paintJpegXObject: - this.paintJpegXObject(args[0], args[1], args[2]); - break; - case OPS.paintImageXObject: - this.paintImageXObject(args[0]); - break; - case OPS.paintInlineImageXObject: - this.paintInlineImageXObject(args[0]); - break; - case OPS.paintImageMaskXObject: - this.paintImageMaskXObject(args[0]); - break; - case OPS.paintFormXObjectBegin: - this.paintFormXObjectBegin(args[0], args[1]); - break; - case OPS.paintFormXObjectEnd: - this.paintFormXObjectEnd(); - break; - case OPS.closePath: - this.closePath(); - break; - case OPS.closeStroke: - this.closeStroke(); - break; - case OPS.closeFillStroke: - this.closeFillStroke(); - break; - case OPS.nextLine: - this.nextLine(); - break; - case OPS.transform: - this.transform(args[0], args[1], args[2], args[3], args[4], args[5]); - break; - case OPS.constructPath: - this.constructPath(args[0], args[1]); - break; - case OPS.endPath: - this.endPath(); - break; - case 92: - this.group(opTree[x].items); - break; - default: - warn('Unimplemented operator ' + fn); - break; - } - } - }, - setWordSpacing: function SVGGraphics_setWordSpacing(wordSpacing) { - this.current.wordSpacing = wordSpacing; - }, - setCharSpacing: function SVGGraphics_setCharSpacing(charSpacing) { - this.current.charSpacing = charSpacing; - }, - nextLine: function SVGGraphics_nextLine() { - this.moveText(0, this.current.leading); - }, - setTextMatrix: function SVGGraphics_setTextMatrix(a, b, c, d, e, f) { - var current = this.current; - this.current.textMatrix = this.current.lineMatrix = [ - a, - b, - c, - d, - e, - f - ]; - this.current.x = this.current.lineX = 0; - this.current.y = this.current.lineY = 0; - current.xcoords = []; - current.tspan = document.createElementNS(NS, 'svg:tspan'); - current.tspan.setAttributeNS(null, 'font-family', current.fontFamily); - current.tspan.setAttributeNS(null, 'font-size', pf(current.fontSize) + 'px'); - current.tspan.setAttributeNS(null, 'y', pf(-current.y)); - current.txtElement = document.createElementNS(NS, 'svg:text'); - current.txtElement.appendChild(current.tspan); - }, - beginText: function SVGGraphics_beginText() { - this.current.x = this.current.lineX = 0; - this.current.y = this.current.lineY = 0; - this.current.textMatrix = IDENTITY_MATRIX; - this.current.lineMatrix = IDENTITY_MATRIX; - this.current.tspan = document.createElementNS(NS, 'svg:tspan'); - this.current.txtElement = document.createElementNS(NS, 'svg:text'); - this.current.txtgrp = document.createElementNS(NS, 'svg:g'); - this.current.xcoords = []; - }, - moveText: function SVGGraphics_moveText(x, y) { - var current = this.current; - this.current.x = this.current.lineX += x; - this.current.y = this.current.lineY += y; - current.xcoords = []; - current.tspan = document.createElementNS(NS, 'svg:tspan'); - current.tspan.setAttributeNS(null, 'font-family', current.fontFamily); - current.tspan.setAttributeNS(null, 'font-size', pf(current.fontSize) + 'px'); - current.tspan.setAttributeNS(null, 'y', pf(-current.y)); - }, - showText: function SVGGraphics_showText(glyphs) { - var current = this.current; - var font = current.font; - var fontSize = current.fontSize; - if (fontSize === 0) { - return; - } - var charSpacing = current.charSpacing; - var wordSpacing = current.wordSpacing; - var fontDirection = current.fontDirection; - var textHScale = current.textHScale * fontDirection; - var glyphsLength = glyphs.length; - var vertical = font.vertical; - var widthAdvanceScale = fontSize * current.fontMatrix[0]; - var x = 0, i; - for (i = 0; i < glyphsLength; ++i) { - var glyph = glyphs[i]; - if (glyph === null) { - x += fontDirection * wordSpacing; - continue; - } else if (isNum(glyph)) { - x += -glyph * fontSize * 0.001; - continue; - } - current.xcoords.push(current.x + x * textHScale); - var width = glyph.width; - var character = glyph.fontChar; - var charWidth = width * widthAdvanceScale + charSpacing * fontDirection; - x += charWidth; - current.tspan.textContent += character; - } - if (vertical) { - current.y -= x * textHScale; - } else { - current.x += x * textHScale; - } - current.tspan.setAttributeNS(null, 'x', current.xcoords.map(pf).join(' ')); - current.tspan.setAttributeNS(null, 'y', pf(-current.y)); - current.tspan.setAttributeNS(null, 'font-family', current.fontFamily); - current.tspan.setAttributeNS(null, 'font-size', pf(current.fontSize) + 'px'); - if (current.fontStyle !== SVG_DEFAULTS.fontStyle) { - current.tspan.setAttributeNS(null, 'font-style', current.fontStyle); - } - if (current.fontWeight !== SVG_DEFAULTS.fontWeight) { - current.tspan.setAttributeNS(null, 'font-weight', current.fontWeight); - } - if (current.fillColor !== SVG_DEFAULTS.fillColor) { - current.tspan.setAttributeNS(null, 'fill', current.fillColor); - } - current.txtElement.setAttributeNS(null, 'transform', pm(current.textMatrix) + ' scale(1, -1)'); - current.txtElement.setAttributeNS(XML_NS, 'xml:space', 'preserve'); - current.txtElement.appendChild(current.tspan); - current.txtgrp.appendChild(current.txtElement); - this._ensureTransformGroup().appendChild(current.txtElement); - }, - setLeadingMoveText: function SVGGraphics_setLeadingMoveText(x, y) { - this.setLeading(-y); - this.moveText(x, y); - }, - addFontStyle: function SVGGraphics_addFontStyle(fontObj) { - if (!this.cssStyle) { - this.cssStyle = document.createElementNS(NS, 'svg:style'); - this.cssStyle.setAttributeNS(null, 'type', 'text/css'); - this.defs.appendChild(this.cssStyle); - } - var url = createObjectURL(fontObj.data, fontObj.mimetype, this.forceDataSchema); - this.cssStyle.textContent += '@font-face { font-family: "' + fontObj.loadedName + '";' + ' src: url(' + url + '); }\n'; - }, - setFont: function SVGGraphics_setFont(details) { - var current = this.current; - var fontObj = this.commonObjs.get(details[0]); - var size = details[1]; - this.current.font = fontObj; - if (this.embedFonts && fontObj.data && !this.embeddedFonts[fontObj.loadedName]) { - this.addFontStyle(fontObj); - this.embeddedFonts[fontObj.loadedName] = fontObj; - } - current.fontMatrix = fontObj.fontMatrix ? fontObj.fontMatrix : FONT_IDENTITY_MATRIX; - var bold = fontObj.black ? fontObj.bold ? 'bolder' : 'bold' : fontObj.bold ? 'bold' : 'normal'; - var italic = fontObj.italic ? 'italic' : 'normal'; - if (size < 0) { - size = -size; - current.fontDirection = -1; - } else { - current.fontDirection = 1; - } - current.fontSize = size; - current.fontFamily = fontObj.loadedName; - current.fontWeight = bold; - current.fontStyle = italic; - current.tspan = document.createElementNS(NS, 'svg:tspan'); - current.tspan.setAttributeNS(null, 'y', pf(-current.y)); - current.xcoords = []; - }, - endText: function SVGGraphics_endText() { - }, - setLineWidth: function SVGGraphics_setLineWidth(width) { - this.current.lineWidth = width; - }, - setLineCap: function SVGGraphics_setLineCap(style) { - this.current.lineCap = LINE_CAP_STYLES[style]; - }, - setLineJoin: function SVGGraphics_setLineJoin(style) { - this.current.lineJoin = LINE_JOIN_STYLES[style]; - }, - setMiterLimit: function SVGGraphics_setMiterLimit(limit) { - this.current.miterLimit = limit; - }, - setStrokeRGBColor: function SVGGraphics_setStrokeRGBColor(r, g, b) { - var color = Util.makeCssRgb(r, g, b); - this.current.strokeColor = color; - }, - setFillRGBColor: function SVGGraphics_setFillRGBColor(r, g, b) { - var color = Util.makeCssRgb(r, g, b); - this.current.fillColor = color; - this.current.tspan = document.createElementNS(NS, 'svg:tspan'); - this.current.xcoords = []; - }, - setDash: function SVGGraphics_setDash(dashArray, dashPhase) { - this.current.dashArray = dashArray; - this.current.dashPhase = dashPhase; - }, - constructPath: function SVGGraphics_constructPath(ops, args) { - var current = this.current; - var x = current.x, y = current.y; - current.path = document.createElementNS(NS, 'svg:path'); - var d = []; - var opLength = ops.length; - for (var i = 0, j = 0; i < opLength; i++) { - switch (ops[i] | 0) { - case OPS.rectangle: - x = args[j++]; - y = args[j++]; - var width = args[j++]; - var height = args[j++]; - var xw = x + width; - var yh = y + height; - d.push('M', pf(x), pf(y), 'L', pf(xw), pf(y), 'L', pf(xw), pf(yh), 'L', pf(x), pf(yh), 'Z'); - break; - case OPS.moveTo: - x = args[j++]; - y = args[j++]; - d.push('M', pf(x), pf(y)); - break; - case OPS.lineTo: - x = args[j++]; - y = args[j++]; - d.push('L', pf(x), pf(y)); - break; - case OPS.curveTo: - x = args[j + 4]; - y = args[j + 5]; - d.push('C', pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y)); - j += 6; - break; - case OPS.curveTo2: - x = args[j + 2]; - y = args[j + 3]; - d.push('C', pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3])); - j += 4; - break; - case OPS.curveTo3: - x = args[j + 2]; - y = args[j + 3]; - d.push('C', pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y)); - j += 4; - break; - case OPS.closePath: - d.push('Z'); - break; - } - } - current.path.setAttributeNS(null, 'd', d.join(' ')); - current.path.setAttributeNS(null, 'stroke-miterlimit', pf(current.miterLimit)); - current.path.setAttributeNS(null, 'stroke-linecap', current.lineCap); - current.path.setAttributeNS(null, 'stroke-linejoin', current.lineJoin); - current.path.setAttributeNS(null, 'stroke-width', pf(current.lineWidth) + 'px'); - current.path.setAttributeNS(null, 'stroke-dasharray', current.dashArray.map(pf).join(' ')); - current.path.setAttributeNS(null, 'stroke-dashoffset', pf(current.dashPhase) + 'px'); - current.path.setAttributeNS(null, 'fill', 'none'); - this._ensureTransformGroup().appendChild(current.path); - current.element = current.path; - current.setCurrentPoint(x, y); - }, - endPath: function SVGGraphics_endPath() { - }, - clip: function SVGGraphics_clip(type) { - var current = this.current; - var clipId = 'clippath' + clipCount; - clipCount++; - var clipPath = document.createElementNS(NS, 'svg:clipPath'); - clipPath.setAttributeNS(null, 'id', clipId); - clipPath.setAttributeNS(null, 'transform', pm(this.transformMatrix)); - var clipElement = current.element.cloneNode(); - if (type === 'evenodd') { - clipElement.setAttributeNS(null, 'clip-rule', 'evenodd'); - } else { - clipElement.setAttributeNS(null, 'clip-rule', 'nonzero'); - } - clipPath.appendChild(clipElement); - this.defs.appendChild(clipPath); - if (current.activeClipUrl) { - current.clipGroup = null; - this.extraStack.forEach(function (prev) { - prev.clipGroup = null; - }); - } - current.activeClipUrl = 'url(#' + clipId + ')'; - this.tgrp = null; - }, - closePath: function SVGGraphics_closePath() { - var current = this.current; - var d = current.path.getAttributeNS(null, 'd'); - d += 'Z'; - current.path.setAttributeNS(null, 'd', d); - }, - setLeading: function SVGGraphics_setLeading(leading) { - this.current.leading = -leading; - }, - setTextRise: function SVGGraphics_setTextRise(textRise) { - this.current.textRise = textRise; - }, - setHScale: function SVGGraphics_setHScale(scale) { - this.current.textHScale = scale / 100; - }, - setGState: function SVGGraphics_setGState(states) { - for (var i = 0, ii = states.length; i < ii; i++) { - var state = states[i]; - var key = state[0]; - var value = state[1]; - switch (key) { - case 'LW': - this.setLineWidth(value); - break; - case 'LC': - this.setLineCap(value); - break; - case 'LJ': - this.setLineJoin(value); - break; - case 'ML': - this.setMiterLimit(value); - break; - case 'D': - this.setDash(value[0], value[1]); - break; - case 'Font': - this.setFont(value); - break; - default: - warn('Unimplemented graphic state ' + key); - break; - } - } - }, - fill: function SVGGraphics_fill() { - var current = this.current; - current.element.setAttributeNS(null, 'fill', current.fillColor); - }, - stroke: function SVGGraphics_stroke() { - var current = this.current; - current.element.setAttributeNS(null, 'stroke', current.strokeColor); - current.element.setAttributeNS(null, 'fill', 'none'); - }, - eoFill: function SVGGraphics_eoFill() { - var current = this.current; - current.element.setAttributeNS(null, 'fill', current.fillColor); - current.element.setAttributeNS(null, 'fill-rule', 'evenodd'); - }, - fillStroke: function SVGGraphics_fillStroke() { - this.stroke(); - this.fill(); - }, - eoFillStroke: function SVGGraphics_eoFillStroke() { - this.current.element.setAttributeNS(null, 'fill-rule', 'evenodd'); - this.fillStroke(); - }, - closeStroke: function SVGGraphics_closeStroke() { - this.closePath(); - this.stroke(); - }, - closeFillStroke: function SVGGraphics_closeFillStroke() { - this.closePath(); - this.fillStroke(); - }, - paintSolidColorImageMask: function SVGGraphics_paintSolidColorImageMask() { - var current = this.current; - var rect = document.createElementNS(NS, 'svg:rect'); - rect.setAttributeNS(null, 'x', '0'); - rect.setAttributeNS(null, 'y', '0'); - rect.setAttributeNS(null, 'width', '1px'); - rect.setAttributeNS(null, 'height', '1px'); - rect.setAttributeNS(null, 'fill', current.fillColor); - this._ensureTransformGroup().appendChild(rect); - }, - paintJpegXObject: function SVGGraphics_paintJpegXObject(objId, w, h) { - var imgObj = this.objs.get(objId); - var imgEl = document.createElementNS(NS, 'svg:image'); - imgEl.setAttributeNS(XLINK_NS, 'xlink:href', imgObj.src); - imgEl.setAttributeNS(null, 'width', imgObj.width + 'px'); - imgEl.setAttributeNS(null, 'height', imgObj.height + 'px'); - imgEl.setAttributeNS(null, 'x', '0'); - imgEl.setAttributeNS(null, 'y', pf(-h)); - imgEl.setAttributeNS(null, 'transform', 'scale(' + pf(1 / w) + ' ' + pf(-1 / h) + ')'); - this._ensureTransformGroup().appendChild(imgEl); - }, - paintImageXObject: function SVGGraphics_paintImageXObject(objId) { - var imgData = this.objs.get(objId); - if (!imgData) { - warn('Dependent image isn\'t ready yet'); - return; - } - this.paintInlineImageXObject(imgData); - }, - paintInlineImageXObject: function SVGGraphics_paintInlineImageXObject(imgData, mask) { - var width = imgData.width; - var height = imgData.height; - var imgSrc = convertImgDataToPng(imgData, this.forceDataSchema); - var cliprect = document.createElementNS(NS, 'svg:rect'); - cliprect.setAttributeNS(null, 'x', '0'); - cliprect.setAttributeNS(null, 'y', '0'); - cliprect.setAttributeNS(null, 'width', pf(width)); - cliprect.setAttributeNS(null, 'height', pf(height)); - this.current.element = cliprect; - this.clip('nonzero'); - var imgEl = document.createElementNS(NS, 'svg:image'); - imgEl.setAttributeNS(XLINK_NS, 'xlink:href', imgSrc); - imgEl.setAttributeNS(null, 'x', '0'); - imgEl.setAttributeNS(null, 'y', pf(-height)); - imgEl.setAttributeNS(null, 'width', pf(width) + 'px'); - imgEl.setAttributeNS(null, 'height', pf(height) + 'px'); - imgEl.setAttributeNS(null, 'transform', 'scale(' + pf(1 / width) + ' ' + pf(-1 / height) + ')'); - if (mask) { - mask.appendChild(imgEl); - } else { - this._ensureTransformGroup().appendChild(imgEl); - } - }, - paintImageMaskXObject: function SVGGraphics_paintImageMaskXObject(imgData) { - var current = this.current; - var width = imgData.width; - var height = imgData.height; - var fillColor = current.fillColor; - current.maskId = 'mask' + maskCount++; - var mask = document.createElementNS(NS, 'svg:mask'); - mask.setAttributeNS(null, 'id', current.maskId); - var rect = document.createElementNS(NS, 'svg:rect'); - rect.setAttributeNS(null, 'x', '0'); - rect.setAttributeNS(null, 'y', '0'); - rect.setAttributeNS(null, 'width', pf(width)); - rect.setAttributeNS(null, 'height', pf(height)); - rect.setAttributeNS(null, 'fill', fillColor); - rect.setAttributeNS(null, 'mask', 'url(#' + current.maskId + ')'); - this.defs.appendChild(mask); - this._ensureTransformGroup().appendChild(rect); - this.paintInlineImageXObject(imgData, mask); - }, - paintFormXObjectBegin: function SVGGraphics_paintFormXObjectBegin(matrix, bbox) { - if (isArray(matrix) && matrix.length === 6) { - this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - } - if (isArray(bbox) && bbox.length === 4) { - var width = bbox[2] - bbox[0]; - var height = bbox[3] - bbox[1]; - var cliprect = document.createElementNS(NS, 'svg:rect'); - cliprect.setAttributeNS(null, 'x', bbox[0]); - cliprect.setAttributeNS(null, 'y', bbox[1]); - cliprect.setAttributeNS(null, 'width', pf(width)); - cliprect.setAttributeNS(null, 'height', pf(height)); - this.current.element = cliprect; - this.clip('nonzero'); - this.endPath(); - } - }, - paintFormXObjectEnd: function SVGGraphics_paintFormXObjectEnd() { - }, - _initialize: function SVGGraphics_initialize(viewport) { - var svg = document.createElementNS(NS, 'svg:svg'); - svg.setAttributeNS(null, 'version', '1.1'); - svg.setAttributeNS(null, 'width', viewport.width + 'px'); - svg.setAttributeNS(null, 'height', viewport.height + 'px'); - svg.setAttributeNS(null, 'preserveAspectRatio', 'none'); - svg.setAttributeNS(null, 'viewBox', '0 0 ' + viewport.width + ' ' + viewport.height); - var definitions = document.createElementNS(NS, 'svg:defs'); - svg.appendChild(definitions); - this.defs = definitions; - var rootGroup = document.createElementNS(NS, 'svg:g'); - rootGroup.setAttributeNS(null, 'transform', pm(viewport.transform)); - svg.appendChild(rootGroup); - this.svg = rootGroup; - return svg; - }, - _ensureClipGroup: function SVGGraphics_ensureClipGroup() { - if (!this.current.clipGroup) { - var clipGroup = document.createElementNS(NS, 'svg:g'); - clipGroup.setAttributeNS(null, 'clip-path', this.current.activeClipUrl); - this.svg.appendChild(clipGroup); - this.current.clipGroup = clipGroup; - } - return this.current.clipGroup; - }, - _ensureTransformGroup: function SVGGraphics_ensureTransformGroup() { - if (!this.tgrp) { - this.tgrp = document.createElementNS(NS, 'svg:g'); - this.tgrp.setAttributeNS(null, 'transform', pm(this.transformMatrix)); - if (this.current.activeClipUrl) { - this._ensureClipGroup().appendChild(this.tgrp); - } else { - this.svg.appendChild(this.tgrp); - } - } - return this.tgrp; - } - }; - return SVGGraphics; - }(); - exports.SVGGraphics = SVGGraphics; - })); - (function (root, factory) { - factory(root.pdfjsDisplayAnnotationLayer = {}, root.pdfjsSharedUtil, root.pdfjsDisplayDOMUtils); - }(this, function (exports, sharedUtil, displayDOMUtils) { - var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType; - var AnnotationType = sharedUtil.AnnotationType; - var Util = sharedUtil.Util; - var addLinkAttributes = displayDOMUtils.addLinkAttributes; - var LinkTarget = displayDOMUtils.LinkTarget; - var getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl; - var warn = sharedUtil.warn; - var CustomStyle = displayDOMUtils.CustomStyle; - var getDefaultSetting = displayDOMUtils.getDefaultSetting; - function AnnotationElementFactory() { - } - AnnotationElementFactory.prototype = { - create: function AnnotationElementFactory_create(parameters) { - var subtype = parameters.data.annotationType; - switch (subtype) { - case AnnotationType.LINK: - return new LinkAnnotationElement(parameters); - case AnnotationType.TEXT: - return new TextAnnotationElement(parameters); - case AnnotationType.WIDGET: - var fieldType = parameters.data.fieldType; - switch (fieldType) { - case 'Tx': - return new TextWidgetAnnotationElement(parameters); - case 'Btn': - if (parameters.data.radioButton) { - return new RadioButtonWidgetAnnotationElement(parameters); - } else if (parameters.data.checkBox) { - return new CheckboxWidgetAnnotationElement(parameters); - } - warn('Unimplemented button widget annotation: pushbutton'); - break; - case 'Ch': - return new ChoiceWidgetAnnotationElement(parameters); - } - return new WidgetAnnotationElement(parameters); - case AnnotationType.POPUP: - return new PopupAnnotationElement(parameters); - case AnnotationType.HIGHLIGHT: - return new HighlightAnnotationElement(parameters); - case AnnotationType.UNDERLINE: - return new UnderlineAnnotationElement(parameters); - case AnnotationType.SQUIGGLY: - return new SquigglyAnnotationElement(parameters); - case AnnotationType.STRIKEOUT: - return new StrikeOutAnnotationElement(parameters); - case AnnotationType.FILEATTACHMENT: - return new FileAttachmentAnnotationElement(parameters); - default: - return new AnnotationElement(parameters); - } - } - }; - var AnnotationElement = function AnnotationElementClosure() { - function AnnotationElement(parameters, isRenderable) { - this.isRenderable = isRenderable || false; - this.data = parameters.data; - this.layer = parameters.layer; - this.page = parameters.page; - this.viewport = parameters.viewport; - this.linkService = parameters.linkService; - this.downloadManager = parameters.downloadManager; - this.imageResourcesPath = parameters.imageResourcesPath; - this.renderInteractiveForms = parameters.renderInteractiveForms; - if (isRenderable) { - this.container = this._createContainer(); - } - } - AnnotationElement.prototype = { - _createContainer: function AnnotationElement_createContainer() { - var data = this.data, page = this.page, viewport = this.viewport; - var container = document.createElement('section'); - var width = data.rect[2] - data.rect[0]; - var height = data.rect[3] - data.rect[1]; - container.setAttribute('data-annotation-id', data.id); - var rect = Util.normalizeRect([ - data.rect[0], - page.view[3] - data.rect[1] + page.view[1], - data.rect[2], - page.view[3] - data.rect[3] + page.view[1] - ]); - CustomStyle.setProp('transform', container, 'matrix(' + viewport.transform.join(',') + ')'); - CustomStyle.setProp('transformOrigin', container, -rect[0] + 'px ' + -rect[1] + 'px'); - if (data.borderStyle.width > 0) { - container.style.borderWidth = data.borderStyle.width + 'px'; - if (data.borderStyle.style !== AnnotationBorderStyleType.UNDERLINE) { - width = width - 2 * data.borderStyle.width; - height = height - 2 * data.borderStyle.width; - } - var horizontalRadius = data.borderStyle.horizontalCornerRadius; - var verticalRadius = data.borderStyle.verticalCornerRadius; - if (horizontalRadius > 0 || verticalRadius > 0) { - var radius = horizontalRadius + 'px / ' + verticalRadius + 'px'; - CustomStyle.setProp('borderRadius', container, radius); - } - switch (data.borderStyle.style) { - case AnnotationBorderStyleType.SOLID: - container.style.borderStyle = 'solid'; - break; - case AnnotationBorderStyleType.DASHED: - container.style.borderStyle = 'dashed'; - break; - case AnnotationBorderStyleType.BEVELED: - warn('Unimplemented border style: beveled'); - break; - case AnnotationBorderStyleType.INSET: - warn('Unimplemented border style: inset'); - break; - case AnnotationBorderStyleType.UNDERLINE: - container.style.borderBottomStyle = 'solid'; - break; - default: - break; - } - if (data.color) { - container.style.borderColor = Util.makeCssRgb(data.color[0] | 0, data.color[1] | 0, data.color[2] | 0); - } else { - container.style.borderWidth = 0; - } - } - container.style.left = rect[0] + 'px'; - container.style.top = rect[1] + 'px'; - container.style.width = width + 'px'; - container.style.height = height + 'px'; - return container; - }, - _createPopup: function AnnotationElement_createPopup(container, trigger, data) { - if (!trigger) { - trigger = document.createElement('div'); - trigger.style.height = container.style.height; - trigger.style.width = container.style.width; - container.appendChild(trigger); - } - var popupElement = new PopupElement({ - container: container, - trigger: trigger, - color: data.color, - title: data.title, - contents: data.contents, - hideWrapper: true - }); - var popup = popupElement.render(); - popup.style.left = container.style.width; - container.appendChild(popup); - }, - render: function AnnotationElement_render() { - throw new Error('Abstract method AnnotationElement.render called'); - } - }; - return AnnotationElement; - }(); - var LinkAnnotationElement = function LinkAnnotationElementClosure() { - function LinkAnnotationElement(parameters) { - AnnotationElement.call(this, parameters, true); - } - Util.inherit(LinkAnnotationElement, AnnotationElement, { - render: function LinkAnnotationElement_render() { - this.container.className = 'linkAnnotation'; - var link = document.createElement('a'); - addLinkAttributes(link, { - url: this.data.url, - target: this.data.newWindow ? LinkTarget.BLANK : undefined - }); - if (!this.data.url) { - if (this.data.action) { - this._bindNamedAction(link, this.data.action); - } else { - this._bindLink(link, this.data.dest); - } - } - this.container.appendChild(link); - return this.container; - }, - _bindLink: function LinkAnnotationElement_bindLink(link, destination) { - var self = this; - link.href = this.linkService.getDestinationHash(destination); - link.onclick = function () { - if (destination) { - self.linkService.navigateTo(destination); - } - return false; - }; - if (destination) { - link.className = 'internalLink'; - } - }, - _bindNamedAction: function LinkAnnotationElement_bindNamedAction(link, action) { - var self = this; - link.href = this.linkService.getAnchorUrl(''); - link.onclick = function () { - self.linkService.executeNamedAction(action); - return false; - }; - link.className = 'internalLink'; - } - }); - return LinkAnnotationElement; - }(); - var TextAnnotationElement = function TextAnnotationElementClosure() { - function TextAnnotationElement(parameters) { - var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); - AnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(TextAnnotationElement, AnnotationElement, { - render: function TextAnnotationElement_render() { - this.container.className = 'textAnnotation'; - var image = document.createElement('img'); - image.style.height = this.container.style.height; - image.style.width = this.container.style.width; - image.src = this.imageResourcesPath + 'annotation-' + this.data.name.toLowerCase() + '.svg'; - image.alt = '[{{type}} Annotation]'; - image.dataset.l10nId = 'text_annotation_type'; - image.dataset.l10nArgs = JSON.stringify({ type: this.data.name }); - if (!this.data.hasPopup) { - this._createPopup(this.container, image, this.data); - } - this.container.appendChild(image); - return this.container; - } - }); - return TextAnnotationElement; - }(); - var WidgetAnnotationElement = function WidgetAnnotationElementClosure() { - function WidgetAnnotationElement(parameters, isRenderable) { - AnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(WidgetAnnotationElement, AnnotationElement, { - render: function WidgetAnnotationElement_render() { - return this.container; - } - }); - return WidgetAnnotationElement; - }(); - var TextWidgetAnnotationElement = function TextWidgetAnnotationElementClosure() { - var TEXT_ALIGNMENT = [ - 'left', - 'center', - 'right' - ]; - function TextWidgetAnnotationElement(parameters) { - var isRenderable = parameters.renderInteractiveForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue; - WidgetAnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(TextWidgetAnnotationElement, WidgetAnnotationElement, { - render: function TextWidgetAnnotationElement_render() { - this.container.className = 'textWidgetAnnotation'; - var element = null; - if (this.renderInteractiveForms) { - if (this.data.multiLine) { - element = document.createElement('textarea'); - element.textContent = this.data.fieldValue; - } else { - element = document.createElement('input'); - element.type = 'text'; - element.setAttribute('value', this.data.fieldValue); - } - element.disabled = this.data.readOnly; - if (this.data.maxLen !== null) { - element.maxLength = this.data.maxLen; - } - if (this.data.comb) { - var fieldWidth = this.data.rect[2] - this.data.rect[0]; - var combWidth = fieldWidth / this.data.maxLen; - element.classList.add('comb'); - element.style.letterSpacing = 'calc(' + combWidth + 'px - 1ch)'; - } - } else { - element = document.createElement('div'); - element.textContent = this.data.fieldValue; - element.style.verticalAlign = 'middle'; - element.style.display = 'table-cell'; - var font = null; - if (this.data.fontRefName) { - font = this.page.commonObjs.getData(this.data.fontRefName); - } - this._setTextStyle(element, font); - } - if (this.data.textAlignment !== null) { - element.style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment]; - } - this.container.appendChild(element); - return this.container; - }, - _setTextStyle: function TextWidgetAnnotationElement_setTextStyle(element, font) { - var style = element.style; - style.fontSize = this.data.fontSize + 'px'; - style.direction = this.data.fontDirection < 0 ? 'rtl' : 'ltr'; - if (!font) { - return; - } - style.fontWeight = font.black ? font.bold ? '900' : 'bold' : font.bold ? 'bold' : 'normal'; - style.fontStyle = font.italic ? 'italic' : 'normal'; - var fontFamily = font.loadedName ? '"' + font.loadedName + '", ' : ''; - var fallbackName = font.fallbackName || 'Helvetica, sans-serif'; - style.fontFamily = fontFamily + fallbackName; - } - }); - return TextWidgetAnnotationElement; - }(); - var CheckboxWidgetAnnotationElement = function CheckboxWidgetAnnotationElementClosure() { - function CheckboxWidgetAnnotationElement(parameters) { - WidgetAnnotationElement.call(this, parameters, parameters.renderInteractiveForms); - } - Util.inherit(CheckboxWidgetAnnotationElement, WidgetAnnotationElement, { - render: function CheckboxWidgetAnnotationElement_render() { - this.container.className = 'buttonWidgetAnnotation checkBox'; - var element = document.createElement('input'); - element.disabled = this.data.readOnly; - element.type = 'checkbox'; - if (this.data.fieldValue && this.data.fieldValue !== 'Off') { - element.setAttribute('checked', true); - } - this.container.appendChild(element); - return this.container; - } - }); - return CheckboxWidgetAnnotationElement; - }(); - var RadioButtonWidgetAnnotationElement = function RadioButtonWidgetAnnotationElementClosure() { - function RadioButtonWidgetAnnotationElement(parameters) { - WidgetAnnotationElement.call(this, parameters, parameters.renderInteractiveForms); - } - Util.inherit(RadioButtonWidgetAnnotationElement, WidgetAnnotationElement, { - render: function RadioButtonWidgetAnnotationElement_render() { - this.container.className = 'buttonWidgetAnnotation radioButton'; - var element = document.createElement('input'); - element.disabled = this.data.readOnly; - element.type = 'radio'; - element.name = this.data.fieldName; - if (this.data.fieldValue === this.data.buttonValue) { - element.setAttribute('checked', true); - } - this.container.appendChild(element); - return this.container; - } - }); - return RadioButtonWidgetAnnotationElement; - }(); - var ChoiceWidgetAnnotationElement = function ChoiceWidgetAnnotationElementClosure() { - function ChoiceWidgetAnnotationElement(parameters) { - WidgetAnnotationElement.call(this, parameters, parameters.renderInteractiveForms); - } - Util.inherit(ChoiceWidgetAnnotationElement, WidgetAnnotationElement, { - render: function ChoiceWidgetAnnotationElement_render() { - this.container.className = 'choiceWidgetAnnotation'; - var selectElement = document.createElement('select'); - selectElement.disabled = this.data.readOnly; - if (!this.data.combo) { - selectElement.size = this.data.options.length; - if (this.data.multiSelect) { - selectElement.multiple = true; - } - } - for (var i = 0, ii = this.data.options.length; i < ii; i++) { - var option = this.data.options[i]; - var optionElement = document.createElement('option'); - optionElement.textContent = option.displayValue; - optionElement.value = option.exportValue; - if (this.data.fieldValue.indexOf(option.displayValue) >= 0) { - optionElement.setAttribute('selected', true); - } - selectElement.appendChild(optionElement); - } - this.container.appendChild(selectElement); - return this.container; - } - }); - return ChoiceWidgetAnnotationElement; - }(); - var PopupAnnotationElement = function PopupAnnotationElementClosure() { - function PopupAnnotationElement(parameters) { - var isRenderable = !!(parameters.data.title || parameters.data.contents); - AnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(PopupAnnotationElement, AnnotationElement, { - render: function PopupAnnotationElement_render() { - this.container.className = 'popupAnnotation'; - var selector = '[data-annotation-id="' + this.data.parentId + '"]'; - var parentElement = this.layer.querySelector(selector); - if (!parentElement) { - return this.container; - } - var popup = new PopupElement({ - container: this.container, - trigger: parentElement, - color: this.data.color, - title: this.data.title, - contents: this.data.contents - }); - var parentLeft = parseFloat(parentElement.style.left); - var parentWidth = parseFloat(parentElement.style.width); - CustomStyle.setProp('transformOrigin', this.container, -(parentLeft + parentWidth) + 'px -' + parentElement.style.top); - this.container.style.left = parentLeft + parentWidth + 'px'; - this.container.appendChild(popup.render()); - return this.container; - } - }); - return PopupAnnotationElement; - }(); - var PopupElement = function PopupElementClosure() { - var BACKGROUND_ENLIGHT = 0.7; - function PopupElement(parameters) { - this.container = parameters.container; - this.trigger = parameters.trigger; - this.color = parameters.color; - this.title = parameters.title; - this.contents = parameters.contents; - this.hideWrapper = parameters.hideWrapper || false; - this.pinned = false; - } - PopupElement.prototype = { - render: function PopupElement_render() { - var wrapper = document.createElement('div'); - wrapper.className = 'popupWrapper'; - this.hideElement = this.hideWrapper ? wrapper : this.container; - this.hideElement.setAttribute('hidden', true); - var popup = document.createElement('div'); - popup.className = 'popup'; - var color = this.color; - if (color) { - var r = BACKGROUND_ENLIGHT * (255 - color[0]) + color[0]; - var g = BACKGROUND_ENLIGHT * (255 - color[1]) + color[1]; - var b = BACKGROUND_ENLIGHT * (255 - color[2]) + color[2]; - popup.style.backgroundColor = Util.makeCssRgb(r | 0, g | 0, b | 0); - } - var contents = this._formatContents(this.contents); - var title = document.createElement('h1'); - title.textContent = this.title; - this.trigger.addEventListener('click', this._toggle.bind(this)); - this.trigger.addEventListener('mouseover', this._show.bind(this, false)); - this.trigger.addEventListener('mouseout', this._hide.bind(this, false)); - popup.addEventListener('click', this._hide.bind(this, true)); - popup.appendChild(title); - popup.appendChild(contents); - wrapper.appendChild(popup); - return wrapper; - }, - _formatContents: function PopupElement_formatContents(contents) { - var p = document.createElement('p'); - var lines = contents.split(/(?:\r\n?|\n)/); - for (var i = 0, ii = lines.length; i < ii; ++i) { - var line = lines[i]; - p.appendChild(document.createTextNode(line)); - if (i < ii - 1) { - p.appendChild(document.createElement('br')); - } - } - return p; - }, - _toggle: function PopupElement_toggle() { - if (this.pinned) { - this._hide(true); - } else { - this._show(true); - } - }, - _show: function PopupElement_show(pin) { - if (pin) { - this.pinned = true; - } - if (this.hideElement.hasAttribute('hidden')) { - this.hideElement.removeAttribute('hidden'); - this.container.style.zIndex += 1; - } - }, - _hide: function PopupElement_hide(unpin) { - if (unpin) { - this.pinned = false; - } - if (!this.hideElement.hasAttribute('hidden') && !this.pinned) { - this.hideElement.setAttribute('hidden', true); - this.container.style.zIndex -= 1; - } - } - }; - return PopupElement; - }(); - var HighlightAnnotationElement = function HighlightAnnotationElementClosure() { - function HighlightAnnotationElement(parameters) { - var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); - AnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(HighlightAnnotationElement, AnnotationElement, { - render: function HighlightAnnotationElement_render() { - this.container.className = 'highlightAnnotation'; - if (!this.data.hasPopup) { - this._createPopup(this.container, null, this.data); - } - return this.container; - } - }); - return HighlightAnnotationElement; - }(); - var UnderlineAnnotationElement = function UnderlineAnnotationElementClosure() { - function UnderlineAnnotationElement(parameters) { - var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); - AnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(UnderlineAnnotationElement, AnnotationElement, { - render: function UnderlineAnnotationElement_render() { - this.container.className = 'underlineAnnotation'; - if (!this.data.hasPopup) { - this._createPopup(this.container, null, this.data); - } - return this.container; - } - }); - return UnderlineAnnotationElement; - }(); - var SquigglyAnnotationElement = function SquigglyAnnotationElementClosure() { - function SquigglyAnnotationElement(parameters) { - var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); - AnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(SquigglyAnnotationElement, AnnotationElement, { - render: function SquigglyAnnotationElement_render() { - this.container.className = 'squigglyAnnotation'; - if (!this.data.hasPopup) { - this._createPopup(this.container, null, this.data); - } - return this.container; - } - }); - return SquigglyAnnotationElement; - }(); - var StrikeOutAnnotationElement = function StrikeOutAnnotationElementClosure() { - function StrikeOutAnnotationElement(parameters) { - var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); - AnnotationElement.call(this, parameters, isRenderable); - } - Util.inherit(StrikeOutAnnotationElement, AnnotationElement, { - render: function StrikeOutAnnotationElement_render() { - this.container.className = 'strikeoutAnnotation'; - if (!this.data.hasPopup) { - this._createPopup(this.container, null, this.data); - } - return this.container; - } - }); - return StrikeOutAnnotationElement; - }(); - var FileAttachmentAnnotationElement = function FileAttachmentAnnotationElementClosure() { - function FileAttachmentAnnotationElement(parameters) { - AnnotationElement.call(this, parameters, true); - this.filename = getFilenameFromUrl(parameters.data.file.filename); - this.content = parameters.data.file.content; - } - Util.inherit(FileAttachmentAnnotationElement, AnnotationElement, { - render: function FileAttachmentAnnotationElement_render() { - this.container.className = 'fileAttachmentAnnotation'; - var trigger = document.createElement('div'); - trigger.style.height = this.container.style.height; - trigger.style.width = this.container.style.width; - trigger.addEventListener('dblclick', this._download.bind(this)); - if (!this.data.hasPopup && (this.data.title || this.data.contents)) { - this._createPopup(this.container, trigger, this.data); - } - this.container.appendChild(trigger); - return this.container; - }, - _download: function FileAttachmentAnnotationElement_download() { - if (!this.downloadManager) { - warn('Download cannot be started due to unavailable download manager'); - return; - } - this.downloadManager.downloadData(this.content, this.filename, ''); - } - }); - return FileAttachmentAnnotationElement; - }(); - var AnnotationLayer = function AnnotationLayerClosure() { - return { - render: function AnnotationLayer_render(parameters) { - var annotationElementFactory = new AnnotationElementFactory(); - for (var i = 0, ii = parameters.annotations.length; i < ii; i++) { - var data = parameters.annotations[i]; - if (!data) { - continue; - } - var properties = { - data: data, - layer: parameters.div, - page: parameters.page, - viewport: parameters.viewport, - linkService: parameters.linkService, - downloadManager: parameters.downloadManager, - imageResourcesPath: parameters.imageResourcesPath || getDefaultSetting('imageResourcesPath'), - renderInteractiveForms: parameters.renderInteractiveForms || false - }; - var element = annotationElementFactory.create(properties); - if (element.isRenderable) { - parameters.div.appendChild(element.render()); - } - } - }, - update: function AnnotationLayer_update(parameters) { - for (var i = 0, ii = parameters.annotations.length; i < ii; i++) { - var data = parameters.annotations[i]; - var element = parameters.div.querySelector('[data-annotation-id="' + data.id + '"]'); - if (element) { - CustomStyle.setProp('transform', element, 'matrix(' + parameters.viewport.transform.join(',') + ')'); - } - } - parameters.div.removeAttribute('hidden'); - } - }; - }(); - exports.AnnotationLayer = AnnotationLayer; - })); - (function (root, factory) { - factory(root.pdfjsDisplayTextLayer = {}, root.pdfjsSharedUtil, root.pdfjsDisplayDOMUtils); - }(this, function (exports, sharedUtil, displayDOMUtils) { - var Util = sharedUtil.Util; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var CustomStyle = displayDOMUtils.CustomStyle; - var getDefaultSetting = displayDOMUtils.getDefaultSetting; - var renderTextLayer = function renderTextLayerClosure() { - var MAX_TEXT_DIVS_TO_RENDER = 100000; - var NonWhitespaceRegexp = /\S/; - function isAllWhitespace(str) { - return !NonWhitespaceRegexp.test(str); - } - var styleBuf = [ - 'left: ', - 0, - 'px; top: ', - 0, - 'px; font-size: ', - 0, - 'px; font-family: ', - '', - ';' - ]; - function appendText(task, geom, styles) { - var textDiv = document.createElement('div'); - var textDivProperties = { - style: null, - angle: 0, - canvasWidth: 0, - isWhitespace: false, - originalTransform: null, - paddingBottom: 0, - paddingLeft: 0, - paddingRight: 0, - paddingTop: 0, - scale: 1 - }; - task._textDivs.push(textDiv); - if (isAllWhitespace(geom.str)) { - textDivProperties.isWhitespace = true; - task._textDivProperties.set(textDiv, textDivProperties); - return; - } - var tx = Util.transform(task._viewport.transform, geom.transform); - var angle = Math.atan2(tx[1], tx[0]); - var style = styles[geom.fontName]; - if (style.vertical) { - angle += Math.PI / 2; - } - var fontHeight = Math.sqrt(tx[2] * tx[2] + tx[3] * tx[3]); - var fontAscent = fontHeight; - if (style.ascent) { - fontAscent = style.ascent * fontAscent; - } else if (style.descent) { - fontAscent = (1 + style.descent) * fontAscent; - } - var left; - var top; - if (angle === 0) { - left = tx[4]; - top = tx[5] - fontAscent; - } else { - left = tx[4] + fontAscent * Math.sin(angle); - top = tx[5] - fontAscent * Math.cos(angle); - } - styleBuf[1] = left; - styleBuf[3] = top; - styleBuf[5] = fontHeight; - styleBuf[7] = style.fontFamily; - textDivProperties.style = styleBuf.join(''); - textDiv.setAttribute('style', textDivProperties.style); - textDiv.textContent = geom.str; - if (getDefaultSetting('pdfBug')) { - textDiv.dataset.fontName = geom.fontName; - } - if (angle !== 0) { - textDivProperties.angle = angle * (180 / Math.PI); - } - if (geom.str.length > 1) { - if (style.vertical) { - textDivProperties.canvasWidth = geom.height * task._viewport.scale; - } else { - textDivProperties.canvasWidth = geom.width * task._viewport.scale; - } - } - task._textDivProperties.set(textDiv, textDivProperties); - if (task._enhanceTextSelection) { - var angleCos = 1, angleSin = 0; - if (angle !== 0) { - angleCos = Math.cos(angle); - angleSin = Math.sin(angle); - } - var divWidth = (style.vertical ? geom.height : geom.width) * task._viewport.scale; - var divHeight = fontHeight; - var m, b; - if (angle !== 0) { - m = [ - angleCos, - angleSin, - -angleSin, - angleCos, - left, - top - ]; - b = Util.getAxialAlignedBoundingBox([ - 0, - 0, - divWidth, - divHeight - ], m); - } else { - b = [ - left, - top, - left + divWidth, - top + divHeight - ]; - } - task._bounds.push({ - left: b[0], - top: b[1], - right: b[2], - bottom: b[3], - div: textDiv, - size: [ - divWidth, - divHeight - ], - m: m - }); - } - } - function render(task) { - if (task._canceled) { - return; - } - var textLayerFrag = task._container; - var textDivs = task._textDivs; - var capability = task._capability; - var textDivsLength = textDivs.length; - if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) { - task._renderingDone = true; - capability.resolve(); - return; - } - var canvas = document.createElement('canvas'); - canvas.mozOpaque = true; - var ctx = canvas.getContext('2d', { alpha: false }); - var lastFontSize; - var lastFontFamily; - for (var i = 0; i < textDivsLength; i++) { - var textDiv = textDivs[i]; - var textDivProperties = task._textDivProperties.get(textDiv); - if (textDivProperties.isWhitespace) { - continue; - } - var fontSize = textDiv.style.fontSize; - var fontFamily = textDiv.style.fontFamily; - if (fontSize !== lastFontSize || fontFamily !== lastFontFamily) { - ctx.font = fontSize + ' ' + fontFamily; - lastFontSize = fontSize; - lastFontFamily = fontFamily; - } - var width = ctx.measureText(textDiv.textContent).width; - textLayerFrag.appendChild(textDiv); - var transform = ''; - if (textDivProperties.canvasWidth !== 0 && width > 0) { - textDivProperties.scale = textDivProperties.canvasWidth / width; - transform = 'scaleX(' + textDivProperties.scale + ')'; - } - if (textDivProperties.angle !== 0) { - transform = 'rotate(' + textDivProperties.angle + 'deg) ' + transform; - } - if (transform !== '') { - textDivProperties.originalTransform = transform; - CustomStyle.setProp('transform', textDiv, transform); - } - task._textDivProperties.set(textDiv, textDivProperties); - } - task._renderingDone = true; - capability.resolve(); - } - function expand(task) { - var bounds = task._bounds; - var viewport = task._viewport; - var expanded = expandBounds(viewport.width, viewport.height, bounds); - for (var i = 0; i < expanded.length; i++) { - var div = bounds[i].div; - var divProperties = task._textDivProperties.get(div); - if (divProperties.angle === 0) { - divProperties.paddingLeft = bounds[i].left - expanded[i].left; - divProperties.paddingTop = bounds[i].top - expanded[i].top; - divProperties.paddingRight = expanded[i].right - bounds[i].right; - divProperties.paddingBottom = expanded[i].bottom - bounds[i].bottom; - task._textDivProperties.set(div, divProperties); - continue; - } - var e = expanded[i], b = bounds[i]; - var m = b.m, c = m[0], s = m[1]; - var points = [ - [ - 0, - 0 - ], - [ - 0, - b.size[1] - ], - [ - b.size[0], - 0 - ], - b.size - ]; - var ts = new Float64Array(64); - points.forEach(function (p, i) { - var t = Util.applyTransform(p, m); - ts[i + 0] = c && (e.left - t[0]) / c; - ts[i + 4] = s && (e.top - t[1]) / s; - ts[i + 8] = c && (e.right - t[0]) / c; - ts[i + 12] = s && (e.bottom - t[1]) / s; - ts[i + 16] = s && (e.left - t[0]) / -s; - ts[i + 20] = c && (e.top - t[1]) / c; - ts[i + 24] = s && (e.right - t[0]) / -s; - ts[i + 28] = c && (e.bottom - t[1]) / c; - ts[i + 32] = c && (e.left - t[0]) / -c; - ts[i + 36] = s && (e.top - t[1]) / -s; - ts[i + 40] = c && (e.right - t[0]) / -c; - ts[i + 44] = s && (e.bottom - t[1]) / -s; - ts[i + 48] = s && (e.left - t[0]) / s; - ts[i + 52] = c && (e.top - t[1]) / -c; - ts[i + 56] = s && (e.right - t[0]) / s; - ts[i + 60] = c && (e.bottom - t[1]) / -c; - }); - var findPositiveMin = function (ts, offset, count) { - var result = 0; - for (var i = 0; i < count; i++) { - var t = ts[offset++]; - if (t > 0) { - result = result ? Math.min(t, result) : t; - } - } - return result; - }; - var boxScale = 1 + Math.min(Math.abs(c), Math.abs(s)); - divProperties.paddingLeft = findPositiveMin(ts, 32, 16) / boxScale; - divProperties.paddingTop = findPositiveMin(ts, 48, 16) / boxScale; - divProperties.paddingRight = findPositiveMin(ts, 0, 16) / boxScale; - divProperties.paddingBottom = findPositiveMin(ts, 16, 16) / boxScale; - task._textDivProperties.set(div, divProperties); - } - } - function expandBounds(width, height, boxes) { - var bounds = boxes.map(function (box, i) { - return { - x1: box.left, - y1: box.top, - x2: box.right, - y2: box.bottom, - index: i, - x1New: undefined, - x2New: undefined - }; - }); - expandBoundsLTR(width, bounds); - var expanded = new Array(boxes.length); - bounds.forEach(function (b) { - var i = b.index; - expanded[i] = { - left: b.x1New, - top: 0, - right: b.x2New, - bottom: 0 - }; - }); - boxes.map(function (box, i) { - var e = expanded[i], b = bounds[i]; - b.x1 = box.top; - b.y1 = width - e.right; - b.x2 = box.bottom; - b.y2 = width - e.left; - b.index = i; - b.x1New = undefined; - b.x2New = undefined; - }); - expandBoundsLTR(height, bounds); - bounds.forEach(function (b) { - var i = b.index; - expanded[i].top = b.x1New; - expanded[i].bottom = b.x2New; - }); - return expanded; - } - function expandBoundsLTR(width, bounds) { - bounds.sort(function (a, b) { - return a.x1 - b.x1 || a.index - b.index; - }); - var fakeBoundary = { - x1: -Infinity, - y1: -Infinity, - x2: 0, - y2: Infinity, - index: -1, - x1New: 0, - x2New: 0 - }; - var horizon = [{ - start: -Infinity, - end: Infinity, - boundary: fakeBoundary - }]; - bounds.forEach(function (boundary) { - var i = 0; - while (i < horizon.length && horizon[i].end <= boundary.y1) { - i++; - } - var j = horizon.length - 1; - while (j >= 0 && horizon[j].start >= boundary.y2) { - j--; - } - var horizonPart, affectedBoundary; - var q, k, maxXNew = -Infinity; - for (q = i; q <= j; q++) { - horizonPart = horizon[q]; - affectedBoundary = horizonPart.boundary; - var xNew; - if (affectedBoundary.x2 > boundary.x1) { - xNew = affectedBoundary.index > boundary.index ? affectedBoundary.x1New : boundary.x1; - } else if (affectedBoundary.x2New === undefined) { - xNew = (affectedBoundary.x2 + boundary.x1) / 2; - } else { - xNew = affectedBoundary.x2New; - } - if (xNew > maxXNew) { - maxXNew = xNew; - } - } - boundary.x1New = maxXNew; - for (q = i; q <= j; q++) { - horizonPart = horizon[q]; - affectedBoundary = horizonPart.boundary; - if (affectedBoundary.x2New === undefined) { - if (affectedBoundary.x2 > boundary.x1) { - if (affectedBoundary.index > boundary.index) { - affectedBoundary.x2New = affectedBoundary.x2; - } - } else { - affectedBoundary.x2New = maxXNew; - } - } else if (affectedBoundary.x2New > maxXNew) { - affectedBoundary.x2New = Math.max(maxXNew, affectedBoundary.x2); - } - } - var changedHorizon = [], lastBoundary = null; - for (q = i; q <= j; q++) { - horizonPart = horizon[q]; - affectedBoundary = horizonPart.boundary; - var useBoundary = affectedBoundary.x2 > boundary.x2 ? affectedBoundary : boundary; - if (lastBoundary === useBoundary) { - changedHorizon[changedHorizon.length - 1].end = horizonPart.end; - } else { - changedHorizon.push({ - start: horizonPart.start, - end: horizonPart.end, - boundary: useBoundary - }); - lastBoundary = useBoundary; - } - } - if (horizon[i].start < boundary.y1) { - changedHorizon[0].start = boundary.y1; - changedHorizon.unshift({ - start: horizon[i].start, - end: boundary.y1, - boundary: horizon[i].boundary - }); - } - if (boundary.y2 < horizon[j].end) { - changedHorizon[changedHorizon.length - 1].end = boundary.y2; - changedHorizon.push({ - start: boundary.y2, - end: horizon[j].end, - boundary: horizon[j].boundary - }); - } - for (q = i; q <= j; q++) { - horizonPart = horizon[q]; - affectedBoundary = horizonPart.boundary; - if (affectedBoundary.x2New !== undefined) { - continue; - } - var used = false; - for (k = i - 1; !used && k >= 0 && horizon[k].start >= affectedBoundary.y1; k--) { - used = horizon[k].boundary === affectedBoundary; - } - for (k = j + 1; !used && k < horizon.length && horizon[k].end <= affectedBoundary.y2; k++) { - used = horizon[k].boundary === affectedBoundary; - } - for (k = 0; !used && k < changedHorizon.length; k++) { - used = changedHorizon[k].boundary === affectedBoundary; - } - if (!used) { - affectedBoundary.x2New = maxXNew; - } - } - Array.prototype.splice.apply(horizon, [ - i, - j - i + 1 - ].concat(changedHorizon)); - }); - horizon.forEach(function (horizonPart) { - var affectedBoundary = horizonPart.boundary; - if (affectedBoundary.x2New === undefined) { - affectedBoundary.x2New = Math.max(width, affectedBoundary.x2); - } - }); - } - function TextLayerRenderTask(textContent, container, viewport, textDivs, enhanceTextSelection) { - this._textContent = textContent; - this._container = container; - this._viewport = viewport; - this._textDivs = textDivs || []; - this._textDivProperties = new WeakMap(); - this._renderingDone = false; - this._canceled = false; - this._capability = createPromiseCapability(); - this._renderTimer = null; - this._bounds = []; - this._enhanceTextSelection = !!enhanceTextSelection; - } - TextLayerRenderTask.prototype = { - get promise() { - return this._capability.promise; - }, - cancel: function TextLayer_cancel() { - this._canceled = true; - if (this._renderTimer !== null) { - clearTimeout(this._renderTimer); - this._renderTimer = null; - } - this._capability.reject('canceled'); - }, - _render: function TextLayer_render(timeout) { - var textItems = this._textContent.items; - var textStyles = this._textContent.styles; - for (var i = 0, len = textItems.length; i < len; i++) { - appendText(this, textItems[i], textStyles); - } - if (!timeout) { - render(this); - } else { - var self = this; - this._renderTimer = setTimeout(function () { - render(self); - self._renderTimer = null; - }, timeout); - } - }, - expandTextDivs: function TextLayer_expandTextDivs(expandDivs) { - if (!this._enhanceTextSelection || !this._renderingDone) { - return; - } - if (this._bounds !== null) { - expand(this); - this._bounds = null; - } - for (var i = 0, ii = this._textDivs.length; i < ii; i++) { - var div = this._textDivs[i]; - var divProperties = this._textDivProperties.get(div); - if (divProperties.isWhitespace) { - continue; - } - if (expandDivs) { - var transform = '', padding = ''; - if (divProperties.scale !== 1) { - transform = 'scaleX(' + divProperties.scale + ')'; - } - if (divProperties.angle !== 0) { - transform = 'rotate(' + divProperties.angle + 'deg) ' + transform; - } - if (divProperties.paddingLeft !== 0) { - padding += ' padding-left: ' + divProperties.paddingLeft / divProperties.scale + 'px;'; - transform += ' translateX(' + -divProperties.paddingLeft / divProperties.scale + 'px)'; - } - if (divProperties.paddingTop !== 0) { - padding += ' padding-top: ' + divProperties.paddingTop + 'px;'; - transform += ' translateY(' + -divProperties.paddingTop + 'px)'; - } - if (divProperties.paddingRight !== 0) { - padding += ' padding-right: ' + divProperties.paddingRight / divProperties.scale + 'px;'; - } - if (divProperties.paddingBottom !== 0) { - padding += ' padding-bottom: ' + divProperties.paddingBottom + 'px;'; - } - if (padding !== '') { - div.setAttribute('style', divProperties.style + padding); - } - if (transform !== '') { - CustomStyle.setProp('transform', div, transform); - } - } else { - div.style.padding = 0; - CustomStyle.setProp('transform', div, divProperties.originalTransform || ''); - } - } - } - }; - function renderTextLayer(renderParameters) { - var task = new TextLayerRenderTask(renderParameters.textContent, renderParameters.container, renderParameters.viewport, renderParameters.textDivs, renderParameters.enhanceTextSelection); - task._render(renderParameters.timeout); - return task; - } - return renderTextLayer; - }(); - exports.renderTextLayer = renderTextLayer; - })); - (function (root, factory) { - factory(root.pdfjsDisplayWebGL = {}, root.pdfjsSharedUtil, root.pdfjsDisplayDOMUtils); - }(this, function (exports, sharedUtil, displayDOMUtils) { - var shadow = sharedUtil.shadow; - var getDefaultSetting = displayDOMUtils.getDefaultSetting; - var WebGLUtils = function WebGLUtilsClosure() { - function loadShader(gl, code, shaderType) { - var shader = gl.createShader(shaderType); - gl.shaderSource(shader, code); - gl.compileShader(shader); - var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS); - if (!compiled) { - var errorMsg = gl.getShaderInfoLog(shader); - throw new Error('Error during shader compilation: ' + errorMsg); - } - return shader; - } - function createVertexShader(gl, code) { - return loadShader(gl, code, gl.VERTEX_SHADER); - } - function createFragmentShader(gl, code) { - return loadShader(gl, code, gl.FRAGMENT_SHADER); - } - function createProgram(gl, shaders) { - var program = gl.createProgram(); - for (var i = 0, ii = shaders.length; i < ii; ++i) { - gl.attachShader(program, shaders[i]); - } - gl.linkProgram(program); - var linked = gl.getProgramParameter(program, gl.LINK_STATUS); - if (!linked) { - var errorMsg = gl.getProgramInfoLog(program); - throw new Error('Error during program linking: ' + errorMsg); - } - return program; - } - function createTexture(gl, image, textureId) { - gl.activeTexture(textureId); - var texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image); - return texture; - } - var currentGL, currentCanvas; - function generateGL() { - if (currentGL) { - return; - } - currentCanvas = document.createElement('canvas'); - currentGL = currentCanvas.getContext('webgl', { premultipliedalpha: false }); - } - var smaskVertexShaderCode = '\ - attribute vec2 a_position; \ - attribute vec2 a_texCoord; \ - \ - uniform vec2 u_resolution; \ - \ - varying vec2 v_texCoord; \ - \ - void main() { \ - vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; \ - gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \ - \ - v_texCoord = a_texCoord; \ - } '; - var smaskFragmentShaderCode = '\ - precision mediump float; \ - \ - uniform vec4 u_backdrop; \ - uniform int u_subtype; \ - uniform sampler2D u_image; \ - uniform sampler2D u_mask; \ - \ - varying vec2 v_texCoord; \ - \ - void main() { \ - vec4 imageColor = texture2D(u_image, v_texCoord); \ - vec4 maskColor = texture2D(u_mask, v_texCoord); \ - if (u_backdrop.a > 0.0) { \ - maskColor.rgb = maskColor.rgb * maskColor.a + \ - u_backdrop.rgb * (1.0 - maskColor.a); \ - } \ - float lum; \ - if (u_subtype == 0) { \ - lum = maskColor.a; \ - } else { \ - lum = maskColor.r * 0.3 + maskColor.g * 0.59 + \ - maskColor.b * 0.11; \ - } \ - imageColor.a *= lum; \ - imageColor.rgb *= imageColor.a; \ - gl_FragColor = imageColor; \ - } '; - var smaskCache = null; - function initSmaskGL() { - var canvas, gl; - generateGL(); - canvas = currentCanvas; - currentCanvas = null; - gl = currentGL; - currentGL = null; - var vertexShader = createVertexShader(gl, smaskVertexShaderCode); - var fragmentShader = createFragmentShader(gl, smaskFragmentShaderCode); - var program = createProgram(gl, [ - vertexShader, - fragmentShader - ]); - gl.useProgram(program); - var cache = {}; - cache.gl = gl; - cache.canvas = canvas; - cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution'); - cache.positionLocation = gl.getAttribLocation(program, 'a_position'); - cache.backdropLocation = gl.getUniformLocation(program, 'u_backdrop'); - cache.subtypeLocation = gl.getUniformLocation(program, 'u_subtype'); - var texCoordLocation = gl.getAttribLocation(program, 'a_texCoord'); - var texLayerLocation = gl.getUniformLocation(program, 'u_image'); - var texMaskLocation = gl.getUniformLocation(program, 'u_mask'); - var texCoordBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 1.0, - 0.0, - 1.0, - 1.0, - 0.0, - 1.0, - 1.0 - ]), gl.STATIC_DRAW); - gl.enableVertexAttribArray(texCoordLocation); - gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0); - gl.uniform1i(texLayerLocation, 0); - gl.uniform1i(texMaskLocation, 1); - smaskCache = cache; - } - function composeSMask(layer, mask, properties) { - var width = layer.width, height = layer.height; - if (!smaskCache) { - initSmaskGL(); - } - var cache = smaskCache, canvas = cache.canvas, gl = cache.gl; - canvas.width = width; - canvas.height = height; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); - gl.uniform2f(cache.resolutionLocation, width, height); - if (properties.backdrop) { - gl.uniform4f(cache.resolutionLocation, properties.backdrop[0], properties.backdrop[1], properties.backdrop[2], 1); - } else { - gl.uniform4f(cache.resolutionLocation, 0, 0, 0, 0); - } - gl.uniform1i(cache.subtypeLocation, properties.subtype === 'Luminosity' ? 1 : 0); - var texture = createTexture(gl, layer, gl.TEXTURE0); - var maskTexture = createTexture(gl, mask, gl.TEXTURE1); - var buffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, buffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ - 0, - 0, - width, - 0, - 0, - height, - 0, - height, - width, - 0, - width, - height - ]), gl.STATIC_DRAW); - gl.enableVertexAttribArray(cache.positionLocation); - gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0); - gl.clearColor(0, 0, 0, 0); - gl.enable(gl.BLEND); - gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); - gl.clear(gl.COLOR_BUFFER_BIT); - gl.drawArrays(gl.TRIANGLES, 0, 6); - gl.flush(); - gl.deleteTexture(texture); - gl.deleteTexture(maskTexture); - gl.deleteBuffer(buffer); - return canvas; - } - var figuresVertexShaderCode = '\ - attribute vec2 a_position; \ - attribute vec3 a_color; \ - \ - uniform vec2 u_resolution; \ - uniform vec2 u_scale; \ - uniform vec2 u_offset; \ - \ - varying vec4 v_color; \ - \ - void main() { \ - vec2 position = (a_position + u_offset) * u_scale; \ - vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; \ - gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \ - \ - v_color = vec4(a_color / 255.0, 1.0); \ - } '; - var figuresFragmentShaderCode = '\ - precision mediump float; \ - \ - varying vec4 v_color; \ - \ - void main() { \ - gl_FragColor = v_color; \ - } '; - var figuresCache = null; - function initFiguresGL() { - var canvas, gl; - generateGL(); - canvas = currentCanvas; - currentCanvas = null; - gl = currentGL; - currentGL = null; - var vertexShader = createVertexShader(gl, figuresVertexShaderCode); - var fragmentShader = createFragmentShader(gl, figuresFragmentShaderCode); - var program = createProgram(gl, [ - vertexShader, - fragmentShader - ]); - gl.useProgram(program); - var cache = {}; - cache.gl = gl; - cache.canvas = canvas; - cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution'); - cache.scaleLocation = gl.getUniformLocation(program, 'u_scale'); - cache.offsetLocation = gl.getUniformLocation(program, 'u_offset'); - cache.positionLocation = gl.getAttribLocation(program, 'a_position'); - cache.colorLocation = gl.getAttribLocation(program, 'a_color'); - figuresCache = cache; - } - function drawFigures(width, height, backgroundColor, figures, context) { - if (!figuresCache) { - initFiguresGL(); - } - var cache = figuresCache, canvas = cache.canvas, gl = cache.gl; - canvas.width = width; - canvas.height = height; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); - gl.uniform2f(cache.resolutionLocation, width, height); - var count = 0; - var i, ii, rows; - for (i = 0, ii = figures.length; i < ii; i++) { - switch (figures[i].type) { - case 'lattice': - rows = figures[i].coords.length / figures[i].verticesPerRow | 0; - count += (rows - 1) * (figures[i].verticesPerRow - 1) * 6; - break; - case 'triangles': - count += figures[i].coords.length; - break; - } - } - var coords = new Float32Array(count * 2); - var colors = new Uint8Array(count * 3); - var coordsMap = context.coords, colorsMap = context.colors; - var pIndex = 0, cIndex = 0; - for (i = 0, ii = figures.length; i < ii; i++) { - var figure = figures[i], ps = figure.coords, cs = figure.colors; - switch (figure.type) { - case 'lattice': - var cols = figure.verticesPerRow; - rows = ps.length / cols | 0; - for (var row = 1; row < rows; row++) { - var offset = row * cols + 1; - for (var col = 1; col < cols; col++, offset++) { - coords[pIndex] = coordsMap[ps[offset - cols - 1]]; - coords[pIndex + 1] = coordsMap[ps[offset - cols - 1] + 1]; - coords[pIndex + 2] = coordsMap[ps[offset - cols]]; - coords[pIndex + 3] = coordsMap[ps[offset - cols] + 1]; - coords[pIndex + 4] = coordsMap[ps[offset - 1]]; - coords[pIndex + 5] = coordsMap[ps[offset - 1] + 1]; - colors[cIndex] = colorsMap[cs[offset - cols - 1]]; - colors[cIndex + 1] = colorsMap[cs[offset - cols - 1] + 1]; - colors[cIndex + 2] = colorsMap[cs[offset - cols - 1] + 2]; - colors[cIndex + 3] = colorsMap[cs[offset - cols]]; - colors[cIndex + 4] = colorsMap[cs[offset - cols] + 1]; - colors[cIndex + 5] = colorsMap[cs[offset - cols] + 2]; - colors[cIndex + 6] = colorsMap[cs[offset - 1]]; - colors[cIndex + 7] = colorsMap[cs[offset - 1] + 1]; - colors[cIndex + 8] = colorsMap[cs[offset - 1] + 2]; - coords[pIndex + 6] = coords[pIndex + 2]; - coords[pIndex + 7] = coords[pIndex + 3]; - coords[pIndex + 8] = coords[pIndex + 4]; - coords[pIndex + 9] = coords[pIndex + 5]; - coords[pIndex + 10] = coordsMap[ps[offset]]; - coords[pIndex + 11] = coordsMap[ps[offset] + 1]; - colors[cIndex + 9] = colors[cIndex + 3]; - colors[cIndex + 10] = colors[cIndex + 4]; - colors[cIndex + 11] = colors[cIndex + 5]; - colors[cIndex + 12] = colors[cIndex + 6]; - colors[cIndex + 13] = colors[cIndex + 7]; - colors[cIndex + 14] = colors[cIndex + 8]; - colors[cIndex + 15] = colorsMap[cs[offset]]; - colors[cIndex + 16] = colorsMap[cs[offset] + 1]; - colors[cIndex + 17] = colorsMap[cs[offset] + 2]; - pIndex += 12; - cIndex += 18; - } - } - break; - case 'triangles': - for (var j = 0, jj = ps.length; j < jj; j++) { - coords[pIndex] = coordsMap[ps[j]]; - coords[pIndex + 1] = coordsMap[ps[j] + 1]; - colors[cIndex] = colorsMap[cs[j]]; - colors[cIndex + 1] = colorsMap[cs[j] + 1]; - colors[cIndex + 2] = colorsMap[cs[j] + 2]; - pIndex += 2; - cIndex += 3; - } - break; - } - } - if (backgroundColor) { - gl.clearColor(backgroundColor[0] / 255, backgroundColor[1] / 255, backgroundColor[2] / 255, 1.0); - } else { - gl.clearColor(0, 0, 0, 0); - } - gl.clear(gl.COLOR_BUFFER_BIT); - var coordsBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, coordsBuffer); - gl.bufferData(gl.ARRAY_BUFFER, coords, gl.STATIC_DRAW); - gl.enableVertexAttribArray(cache.positionLocation); - gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0); - var colorsBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, colorsBuffer); - gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW); - gl.enableVertexAttribArray(cache.colorLocation); - gl.vertexAttribPointer(cache.colorLocation, 3, gl.UNSIGNED_BYTE, false, 0, 0); - gl.uniform2f(cache.scaleLocation, context.scaleX, context.scaleY); - gl.uniform2f(cache.offsetLocation, context.offsetX, context.offsetY); - gl.drawArrays(gl.TRIANGLES, 0, count); - gl.flush(); - gl.deleteBuffer(coordsBuffer); - gl.deleteBuffer(colorsBuffer); - return canvas; - } - function cleanup() { - if (smaskCache && smaskCache.canvas) { - smaskCache.canvas.width = 0; - smaskCache.canvas.height = 0; - } - if (figuresCache && figuresCache.canvas) { - figuresCache.canvas.width = 0; - figuresCache.canvas.height = 0; - } - smaskCache = null; - figuresCache = null; - } - return { - get isEnabled() { - if (getDefaultSetting('disableWebGL')) { - return false; - } - var enabled = false; - try { - generateGL(); - enabled = !!currentGL; - } catch (e) { - } - return shadow(this, 'isEnabled', enabled); - }, - composeSMask: composeSMask, - drawFigures: drawFigures, - clear: cleanup - }; - }(); - exports.WebGLUtils = WebGLUtils; - })); - (function (root, factory) { - factory(root.pdfjsDisplayPatternHelper = {}, root.pdfjsSharedUtil, root.pdfjsDisplayWebGL); - }(this, function (exports, sharedUtil, displayWebGL) { - var Util = sharedUtil.Util; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var error = sharedUtil.error; - var WebGLUtils = displayWebGL.WebGLUtils; - var ShadingIRs = {}; - ShadingIRs.RadialAxial = { - fromIR: function RadialAxial_fromIR(raw) { - var type = raw[1]; - var colorStops = raw[2]; - var p0 = raw[3]; - var p1 = raw[4]; - var r0 = raw[5]; - var r1 = raw[6]; - return { - type: 'Pattern', - getPattern: function RadialAxial_getPattern(ctx) { - var grad; - if (type === 'axial') { - grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]); - } else if (type === 'radial') { - grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1); - } - for (var i = 0, ii = colorStops.length; i < ii; ++i) { - var c = colorStops[i]; - grad.addColorStop(c[0], c[1]); - } - return grad; - } - }; - } - }; - var createMeshCanvas = function createMeshCanvasClosure() { - function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) { - var coords = context.coords, colors = context.colors; - var bytes = data.data, rowSize = data.width * 4; - var tmp; - if (coords[p1 + 1] > coords[p2 + 1]) { - tmp = p1; - p1 = p2; - p2 = tmp; - tmp = c1; - c1 = c2; - c2 = tmp; - } - if (coords[p2 + 1] > coords[p3 + 1]) { - tmp = p2; - p2 = p3; - p3 = tmp; - tmp = c2; - c2 = c3; - c3 = tmp; - } - if (coords[p1 + 1] > coords[p2 + 1]) { - tmp = p1; - p1 = p2; - p2 = tmp; - tmp = c1; - c1 = c2; - c2 = tmp; - } - var x1 = (coords[p1] + context.offsetX) * context.scaleX; - var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY; - var x2 = (coords[p2] + context.offsetX) * context.scaleX; - var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY; - var x3 = (coords[p3] + context.offsetX) * context.scaleX; - var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY; - if (y1 >= y3) { - return; - } - var c1r = colors[c1], c1g = colors[c1 + 1], c1b = colors[c1 + 2]; - var c2r = colors[c2], c2g = colors[c2 + 1], c2b = colors[c2 + 2]; - var c3r = colors[c3], c3g = colors[c3 + 1], c3b = colors[c3 + 2]; - var minY = Math.round(y1), maxY = Math.round(y3); - var xa, car, cag, cab; - var xb, cbr, cbg, cbb; - var k; - for (var y = minY; y <= maxY; y++) { - if (y < y2) { - k = y < y1 ? 0 : y1 === y2 ? 1 : (y1 - y) / (y1 - y2); - xa = x1 - (x1 - x2) * k; - car = c1r - (c1r - c2r) * k; - cag = c1g - (c1g - c2g) * k; - cab = c1b - (c1b - c2b) * k; - } else { - k = y > y3 ? 1 : y2 === y3 ? 0 : (y2 - y) / (y2 - y3); - xa = x2 - (x2 - x3) * k; - car = c2r - (c2r - c3r) * k; - cag = c2g - (c2g - c3g) * k; - cab = c2b - (c2b - c3b) * k; - } - k = y < y1 ? 0 : y > y3 ? 1 : (y1 - y) / (y1 - y3); - xb = x1 - (x1 - x3) * k; - cbr = c1r - (c1r - c3r) * k; - cbg = c1g - (c1g - c3g) * k; - cbb = c1b - (c1b - c3b) * k; - var x1_ = Math.round(Math.min(xa, xb)); - var x2_ = Math.round(Math.max(xa, xb)); - var j = rowSize * y + x1_ * 4; - for (var x = x1_; x <= x2_; x++) { - k = (xa - x) / (xa - xb); - k = k < 0 ? 0 : k > 1 ? 1 : k; - bytes[j++] = car - (car - cbr) * k | 0; - bytes[j++] = cag - (cag - cbg) * k | 0; - bytes[j++] = cab - (cab - cbb) * k | 0; - bytes[j++] = 255; - } - } - } - function drawFigure(data, figure, context) { - var ps = figure.coords; - var cs = figure.colors; - var i, ii; - switch (figure.type) { - case 'lattice': - var verticesPerRow = figure.verticesPerRow; - var rows = Math.floor(ps.length / verticesPerRow) - 1; - var cols = verticesPerRow - 1; - for (i = 0; i < rows; i++) { - var q = i * verticesPerRow; - for (var j = 0; j < cols; j++, q++) { - drawTriangle(data, context, ps[q], ps[q + 1], ps[q + verticesPerRow], cs[q], cs[q + 1], cs[q + verticesPerRow]); - drawTriangle(data, context, ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow], cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]); - } - } - break; - case 'triangles': - for (i = 0, ii = ps.length; i < ii; i += 3) { - drawTriangle(data, context, ps[i], ps[i + 1], ps[i + 2], cs[i], cs[i + 1], cs[i + 2]); - } - break; - default: - error('illigal figure'); - break; - } - } - function createMeshCanvas(bounds, combinesScale, coords, colors, figures, backgroundColor, cachedCanvases) { - var EXPECTED_SCALE = 1.1; - var MAX_PATTERN_SIZE = 3000; - var BORDER_SIZE = 2; - var offsetX = Math.floor(bounds[0]); - var offsetY = Math.floor(bounds[1]); - var boundsWidth = Math.ceil(bounds[2]) - offsetX; - var boundsHeight = Math.ceil(bounds[3]) - offsetY; - var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinesScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); - var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinesScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); - var scaleX = boundsWidth / width; - var scaleY = boundsHeight / height; - var context = { - coords: coords, - colors: colors, - offsetX: -offsetX, - offsetY: -offsetY, - scaleX: 1 / scaleX, - scaleY: 1 / scaleY - }; - var paddedWidth = width + BORDER_SIZE * 2; - var paddedHeight = height + BORDER_SIZE * 2; - var canvas, tmpCanvas, i, ii; - if (WebGLUtils.isEnabled) { - canvas = WebGLUtils.drawFigures(width, height, backgroundColor, figures, context); - tmpCanvas = cachedCanvases.getCanvas('mesh', paddedWidth, paddedHeight, false); - tmpCanvas.context.drawImage(canvas, BORDER_SIZE, BORDER_SIZE); - canvas = tmpCanvas.canvas; - } else { - tmpCanvas = cachedCanvases.getCanvas('mesh', paddedWidth, paddedHeight, false); - var tmpCtx = tmpCanvas.context; - var data = tmpCtx.createImageData(width, height); - if (backgroundColor) { - var bytes = data.data; - for (i = 0, ii = bytes.length; i < ii; i += 4) { - bytes[i] = backgroundColor[0]; - bytes[i + 1] = backgroundColor[1]; - bytes[i + 2] = backgroundColor[2]; - bytes[i + 3] = 255; - } - } - for (i = 0; i < figures.length; i++) { - drawFigure(data, figures[i], context); - } - tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE); - canvas = tmpCanvas.canvas; - } - return { - canvas: canvas, - offsetX: offsetX - BORDER_SIZE * scaleX, - offsetY: offsetY - BORDER_SIZE * scaleY, - scaleX: scaleX, - scaleY: scaleY - }; - } - return createMeshCanvas; - }(); - ShadingIRs.Mesh = { - fromIR: function Mesh_fromIR(raw) { - var coords = raw[2]; - var colors = raw[3]; - var figures = raw[4]; - var bounds = raw[5]; - var matrix = raw[6]; - var background = raw[8]; - return { - type: 'Pattern', - getPattern: function Mesh_getPattern(ctx, owner, shadingFill) { - var scale; - if (shadingFill) { - scale = Util.singularValueDecompose2dScale(ctx.mozCurrentTransform); - } else { - scale = Util.singularValueDecompose2dScale(owner.baseTransform); - if (matrix) { - var matrixScale = Util.singularValueDecompose2dScale(matrix); - scale = [ - scale[0] * matrixScale[0], - scale[1] * matrixScale[1] - ]; - } - } - var temporaryPatternCanvas = createMeshCanvas(bounds, scale, coords, colors, figures, shadingFill ? null : background, owner.cachedCanvases); - if (!shadingFill) { - ctx.setTransform.apply(ctx, owner.baseTransform); - if (matrix) { - ctx.transform.apply(ctx, matrix); - } - } - ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY); - ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY); - return ctx.createPattern(temporaryPatternCanvas.canvas, 'no-repeat'); - } - }; - } - }; - ShadingIRs.Dummy = { - fromIR: function Dummy_fromIR() { - return { - type: 'Pattern', - getPattern: function Dummy_fromIR_getPattern() { - return 'hotpink'; - } - }; - } - }; - function getShadingPatternFromIR(raw) { - var shadingIR = ShadingIRs[raw[0]]; - if (!shadingIR) { - error('Unknown IR type: ' + raw[0]); - } - return shadingIR.fromIR(raw); - } - var TilingPattern = function TilingPatternClosure() { - var PaintType = { - COLORED: 1, - UNCOLORED: 2 - }; - var MAX_PATTERN_SIZE = 3000; - function TilingPattern(IR, color, ctx, canvasGraphicsFactory, baseTransform) { - this.operatorList = IR[2]; - this.matrix = IR[3] || [ - 1, - 0, - 0, - 1, - 0, - 0 - ]; - this.bbox = IR[4]; - this.xstep = IR[5]; - this.ystep = IR[6]; - this.paintType = IR[7]; - this.tilingType = IR[8]; - this.color = color; - this.canvasGraphicsFactory = canvasGraphicsFactory; - this.baseTransform = baseTransform; - this.type = 'Pattern'; - this.ctx = ctx; - } - TilingPattern.prototype = { - createPatternCanvas: function TilinPattern_createPatternCanvas(owner) { - var operatorList = this.operatorList; - var bbox = this.bbox; - var xstep = this.xstep; - var ystep = this.ystep; - var paintType = this.paintType; - var tilingType = this.tilingType; - var color = this.color; - var canvasGraphicsFactory = this.canvasGraphicsFactory; - info('TilingType: ' + tilingType); - var x0 = bbox[0], y0 = bbox[1], x1 = bbox[2], y1 = bbox[3]; - var topLeft = [ - x0, - y0 - ]; - var botRight = [ - x0 + xstep, - y0 + ystep - ]; - var width = botRight[0] - topLeft[0]; - var height = botRight[1] - topLeft[1]; - var matrixScale = Util.singularValueDecompose2dScale(this.matrix); - var curMatrixScale = Util.singularValueDecompose2dScale(this.baseTransform); - var combinedScale = [ - matrixScale[0] * curMatrixScale[0], - matrixScale[1] * curMatrixScale[1] - ]; - width = Math.min(Math.ceil(Math.abs(width * combinedScale[0])), MAX_PATTERN_SIZE); - height = Math.min(Math.ceil(Math.abs(height * combinedScale[1])), MAX_PATTERN_SIZE); - var tmpCanvas = owner.cachedCanvases.getCanvas('pattern', width, height, true); - var tmpCtx = tmpCanvas.context; - var graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx); - graphics.groupLevel = owner.groupLevel; - this.setFillAndStrokeStyleToContext(tmpCtx, paintType, color); - this.setScale(width, height, xstep, ystep); - this.transformToScale(graphics); - var tmpTranslate = [ - 1, - 0, - 0, - 1, - -topLeft[0], - -topLeft[1] - ]; - graphics.transform.apply(graphics, tmpTranslate); - this.clipBbox(graphics, bbox, x0, y0, x1, y1); - graphics.executeOperatorList(operatorList); - return tmpCanvas.canvas; - }, - setScale: function TilingPattern_setScale(width, height, xstep, ystep) { - this.scale = [ - width / xstep, - height / ystep - ]; - }, - transformToScale: function TilingPattern_transformToScale(graphics) { - var scale = this.scale; - var tmpScale = [ - scale[0], - 0, - 0, - scale[1], - 0, - 0 - ]; - graphics.transform.apply(graphics, tmpScale); - }, - scaleToContext: function TilingPattern_scaleToContext() { - var scale = this.scale; - this.ctx.scale(1 / scale[0], 1 / scale[1]); - }, - clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) { - if (bbox && isArray(bbox) && bbox.length === 4) { - var bboxWidth = x1 - x0; - var bboxHeight = y1 - y0; - graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight); - graphics.clip(); - graphics.endPath(); - } - }, - setFillAndStrokeStyleToContext: function setFillAndStrokeStyleToContext(context, paintType, color) { - switch (paintType) { - case PaintType.COLORED: - var ctx = this.ctx; - context.fillStyle = ctx.fillStyle; - context.strokeStyle = ctx.strokeStyle; - break; - case PaintType.UNCOLORED: - var cssColor = Util.makeCssRgb(color[0], color[1], color[2]); - context.fillStyle = cssColor; - context.strokeStyle = cssColor; - break; - default: - error('Unsupported paint type: ' + paintType); - } - }, - getPattern: function TilingPattern_getPattern(ctx, owner) { - var temporaryPatternCanvas = this.createPatternCanvas(owner); - ctx = this.ctx; - ctx.setTransform.apply(ctx, this.baseTransform); - ctx.transform.apply(ctx, this.matrix); - this.scaleToContext(); - return ctx.createPattern(temporaryPatternCanvas, 'repeat'); - } - }; - return TilingPattern; - }(); - exports.getShadingPatternFromIR = getShadingPatternFromIR; - exports.TilingPattern = TilingPattern; - })); - (function (root, factory) { - factory(root.pdfjsDisplayCanvas = {}, root.pdfjsSharedUtil, root.pdfjsDisplayDOMUtils, root.pdfjsDisplayPatternHelper, root.pdfjsDisplayWebGL); - }(this, function (exports, sharedUtil, displayDOMUtils, displayPatternHelper, displayWebGL) { - var FONT_IDENTITY_MATRIX = sharedUtil.FONT_IDENTITY_MATRIX; - var IDENTITY_MATRIX = sharedUtil.IDENTITY_MATRIX; - var ImageKind = sharedUtil.ImageKind; - var OPS = sharedUtil.OPS; - var TextRenderingMode = sharedUtil.TextRenderingMode; - var Uint32ArrayView = sharedUtil.Uint32ArrayView; - var Util = sharedUtil.Util; - var assert = sharedUtil.assert; - var info = sharedUtil.info; - var isNum = sharedUtil.isNum; - var isArray = sharedUtil.isArray; - var isLittleEndian = sharedUtil.isLittleEndian; - var error = sharedUtil.error; - var shadow = sharedUtil.shadow; - var warn = sharedUtil.warn; - var TilingPattern = displayPatternHelper.TilingPattern; - var getShadingPatternFromIR = displayPatternHelper.getShadingPatternFromIR; - var WebGLUtils = displayWebGL.WebGLUtils; - var hasCanvasTypedArrays = displayDOMUtils.hasCanvasTypedArrays; - var MIN_FONT_SIZE = 16; - var MAX_FONT_SIZE = 100; - var MAX_GROUP_SIZE = 4096; - var MIN_WIDTH_FACTOR = 0.65; - var COMPILE_TYPE3_GLYPHS = true; - var MAX_SIZE_TO_COMPILE = 1000; - var FULL_CHUNK_HEIGHT = 16; - var HasCanvasTypedArraysCached = { - get value() { - return shadow(HasCanvasTypedArraysCached, 'value', hasCanvasTypedArrays()); - } - }; - var IsLittleEndianCached = { - get value() { - return shadow(IsLittleEndianCached, 'value', isLittleEndian()); - } - }; - function createScratchCanvas(width, height) { - var canvas = document.createElement('canvas'); - canvas.width = width; - canvas.height = height; - return canvas; - } - function addContextCurrentTransform(ctx) { - if (!ctx.mozCurrentTransform) { - ctx._originalSave = ctx.save; - ctx._originalRestore = ctx.restore; - ctx._originalRotate = ctx.rotate; - ctx._originalScale = ctx.scale; - ctx._originalTranslate = ctx.translate; - ctx._originalTransform = ctx.transform; - ctx._originalSetTransform = ctx.setTransform; - ctx._transformMatrix = ctx._transformMatrix || [ - 1, - 0, - 0, - 1, - 0, - 0 - ]; - ctx._transformStack = []; - Object.defineProperty(ctx, 'mozCurrentTransform', { - get: function getCurrentTransform() { - return this._transformMatrix; - } - }); - Object.defineProperty(ctx, 'mozCurrentTransformInverse', { - get: function getCurrentTransformInverse() { - var m = this._transformMatrix; - var a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5]; - var ad_bc = a * d - b * c; - var bc_ad = b * c - a * d; - return [ - d / ad_bc, - b / bc_ad, - c / bc_ad, - a / ad_bc, - (d * e - c * f) / bc_ad, - (b * e - a * f) / ad_bc - ]; - } - }); - ctx.save = function ctxSave() { - var old = this._transformMatrix; - this._transformStack.push(old); - this._transformMatrix = old.slice(0, 6); - this._originalSave(); - }; - ctx.restore = function ctxRestore() { - var prev = this._transformStack.pop(); - if (prev) { - this._transformMatrix = prev; - this._originalRestore(); - } - }; - ctx.translate = function ctxTranslate(x, y) { - var m = this._transformMatrix; - m[4] = m[0] * x + m[2] * y + m[4]; - m[5] = m[1] * x + m[3] * y + m[5]; - this._originalTranslate(x, y); - }; - ctx.scale = function ctxScale(x, y) { - var m = this._transformMatrix; - m[0] = m[0] * x; - m[1] = m[1] * x; - m[2] = m[2] * y; - m[3] = m[3] * y; - this._originalScale(x, y); - }; - ctx.transform = function ctxTransform(a, b, c, d, e, f) { - var m = this._transformMatrix; - this._transformMatrix = [ - m[0] * a + m[2] * b, - m[1] * a + m[3] * b, - m[0] * c + m[2] * d, - m[1] * c + m[3] * d, - m[0] * e + m[2] * f + m[4], - m[1] * e + m[3] * f + m[5] - ]; - ctx._originalTransform(a, b, c, d, e, f); - }; - ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) { - this._transformMatrix = [ - a, - b, - c, - d, - e, - f - ]; - ctx._originalSetTransform(a, b, c, d, e, f); - }; - ctx.rotate = function ctxRotate(angle) { - var cosValue = Math.cos(angle); - var sinValue = Math.sin(angle); - var m = this._transformMatrix; - this._transformMatrix = [ - m[0] * cosValue + m[2] * sinValue, - m[1] * cosValue + m[3] * sinValue, - m[0] * -sinValue + m[2] * cosValue, - m[1] * -sinValue + m[3] * cosValue, - m[4], - m[5] - ]; - this._originalRotate(angle); - }; - } - } - var CachedCanvases = function CachedCanvasesClosure() { - function CachedCanvases() { - this.cache = Object.create(null); - } - CachedCanvases.prototype = { - getCanvas: function CachedCanvases_getCanvas(id, width, height, trackTransform) { - var canvasEntry; - if (this.cache[id] !== undefined) { - canvasEntry = this.cache[id]; - canvasEntry.canvas.width = width; - canvasEntry.canvas.height = height; - canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0); - } else { - var canvas = createScratchCanvas(width, height); - var ctx = canvas.getContext('2d'); - if (trackTransform) { - addContextCurrentTransform(ctx); - } - this.cache[id] = canvasEntry = { - canvas: canvas, - context: ctx - }; - } - return canvasEntry; - }, - clear: function () { - for (var id in this.cache) { - var canvasEntry = this.cache[id]; - canvasEntry.canvas.width = 0; - canvasEntry.canvas.height = 0; - delete this.cache[id]; - } - } - }; - return CachedCanvases; - }(); - function compileType3Glyph(imgData) { - var POINT_TO_PROCESS_LIMIT = 1000; - var width = imgData.width, height = imgData.height; - var i, j, j0, width1 = width + 1; - var points = new Uint8Array(width1 * (height + 1)); - var POINT_TYPES = new Uint8Array([ - 0, - 2, - 4, - 0, - 1, - 0, - 5, - 4, - 8, - 10, - 0, - 8, - 0, - 2, - 1, - 0 - ]); - var lineSize = width + 7 & ~7, data0 = imgData.data; - var data = new Uint8Array(lineSize * height), pos = 0, ii; - for (i = 0, ii = data0.length; i < ii; i++) { - var mask = 128, elem = data0[i]; - while (mask > 0) { - data[pos++] = elem & mask ? 0 : 255; - mask >>= 1; - } - } - var count = 0; - pos = 0; - if (data[pos] !== 0) { - points[0] = 1; - ++count; - } - for (j = 1; j < width; j++) { - if (data[pos] !== data[pos + 1]) { - points[j] = data[pos] ? 2 : 1; - ++count; - } - pos++; - } - if (data[pos] !== 0) { - points[j] = 2; - ++count; - } - for (i = 1; i < height; i++) { - pos = i * lineSize; - j0 = i * width1; - if (data[pos - lineSize] !== data[pos]) { - points[j0] = data[pos] ? 1 : 8; - ++count; - } - var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0); - for (j = 1; j < width; j++) { - sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) + (data[pos - lineSize + 1] ? 8 : 0); - if (POINT_TYPES[sum]) { - points[j0 + j] = POINT_TYPES[sum]; - ++count; - } - pos++; - } - if (data[pos - lineSize] !== data[pos]) { - points[j0 + j] = data[pos] ? 2 : 4; - ++count; - } - if (count > POINT_TO_PROCESS_LIMIT) { - return null; - } - } - pos = lineSize * (height - 1); - j0 = i * width1; - if (data[pos] !== 0) { - points[j0] = 8; - ++count; - } - for (j = 1; j < width; j++) { - if (data[pos] !== data[pos + 1]) { - points[j0 + j] = data[pos] ? 4 : 8; - ++count; - } - pos++; - } - if (data[pos] !== 0) { - points[j0 + j] = 4; - ++count; - } - if (count > POINT_TO_PROCESS_LIMIT) { - return null; - } - var steps = new Int32Array([ - 0, - width1, - -1, - 0, - -width1, - 0, - 0, - 0, - 1 - ]); - var outlines = []; - for (i = 0; count && i <= height; i++) { - var p = i * width1; - var end = p + width; - while (p < end && !points[p]) { - p++; - } - if (p === end) { - continue; - } - var coords = [ - p % width1, - i - ]; - var type = points[p], p0 = p, pp; - do { - var step = steps[type]; - do { - p += step; - } while (!points[p]); - pp = points[p]; - if (pp !== 5 && pp !== 10) { - type = pp; - points[p] = 0; - } else { - type = pp & 0x33 * type >> 4; - points[p] &= type >> 2 | type << 2; - } - coords.push(p % width1); - coords.push(p / width1 | 0); - --count; - } while (p0 !== p); - outlines.push(coords); - --i; - } - var drawOutline = function (c) { - c.save(); - c.scale(1 / width, -1 / height); - c.translate(0, -height); - c.beginPath(); - for (var i = 0, ii = outlines.length; i < ii; i++) { - var o = outlines[i]; - c.moveTo(o[0], o[1]); - for (var j = 2, jj = o.length; j < jj; j += 2) { - c.lineTo(o[j], o[j + 1]); - } - } - c.fill(); - c.beginPath(); - c.restore(); - }; - return drawOutline; - } - var CanvasExtraState = function CanvasExtraStateClosure() { - function CanvasExtraState(old) { - this.alphaIsShape = false; - this.fontSize = 0; - this.fontSizeScale = 1; - this.textMatrix = IDENTITY_MATRIX; - this.textMatrixScale = 1; - this.fontMatrix = FONT_IDENTITY_MATRIX; - this.leading = 0; - this.x = 0; - this.y = 0; - this.lineX = 0; - this.lineY = 0; - this.charSpacing = 0; - this.wordSpacing = 0; - this.textHScale = 1; - this.textRenderingMode = TextRenderingMode.FILL; - this.textRise = 0; - this.fillColor = '#000000'; - this.strokeColor = '#000000'; - this.patternFill = false; - this.fillAlpha = 1; - this.strokeAlpha = 1; - this.lineWidth = 1; - this.activeSMask = null; - this.resumeSMaskCtx = null; - this.old = old; - } - CanvasExtraState.prototype = { - clone: function CanvasExtraState_clone() { - return Object.create(this); - }, - setCurrentPoint: function CanvasExtraState_setCurrentPoint(x, y) { - this.x = x; - this.y = y; - } - }; - return CanvasExtraState; - }(); - var CanvasGraphics = function CanvasGraphicsClosure() { - var EXECUTION_TIME = 15; - var EXECUTION_STEPS = 10; - function CanvasGraphics(canvasCtx, commonObjs, objs, imageLayer) { - this.ctx = canvasCtx; - this.current = new CanvasExtraState(); - this.stateStack = []; - this.pendingClip = null; - this.pendingEOFill = false; - this.res = null; - this.xobjs = null; - this.commonObjs = commonObjs; - this.objs = objs; - this.imageLayer = imageLayer; - this.groupStack = []; - this.processingType3 = null; - this.baseTransform = null; - this.baseTransformStack = []; - this.groupLevel = 0; - this.smaskStack = []; - this.smaskCounter = 0; - this.tempSMask = null; - this.cachedCanvases = new CachedCanvases(); - if (canvasCtx) { - addContextCurrentTransform(canvasCtx); - } - this.cachedGetSinglePixelWidth = null; - } - function putBinaryImageData(ctx, imgData) { - if (typeof ImageData !== 'undefined' && imgData instanceof ImageData) { - ctx.putImageData(imgData, 0, 0); - return; - } - var height = imgData.height, width = imgData.width; - var partialChunkHeight = height % FULL_CHUNK_HEIGHT; - var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; - var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; - var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); - var srcPos = 0, destPos; - var src = imgData.data; - var dest = chunkImgData.data; - var i, j, thisChunkHeight, elemsInThisChunk; - if (imgData.kind === ImageKind.GRAYSCALE_1BPP) { - var srcLength = src.byteLength; - var dest32 = HasCanvasTypedArraysCached.value ? new Uint32Array(dest.buffer) : new Uint32ArrayView(dest); - var dest32DataLength = dest32.length; - var fullSrcDiff = width + 7 >> 3; - var white = 0xFFFFFFFF; - var black = IsLittleEndianCached.value || !HasCanvasTypedArraysCached.value ? 0xFF000000 : 0x000000FF; - for (i = 0; i < totalChunks; i++) { - thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; - destPos = 0; - for (j = 0; j < thisChunkHeight; j++) { - var srcDiff = srcLength - srcPos; - var k = 0; - var kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7; - var kEndUnrolled = kEnd & ~7; - var mask = 0; - var srcByte = 0; - for (; k < kEndUnrolled; k += 8) { - srcByte = src[srcPos++]; - dest32[destPos++] = srcByte & 128 ? white : black; - dest32[destPos++] = srcByte & 64 ? white : black; - dest32[destPos++] = srcByte & 32 ? white : black; - dest32[destPos++] = srcByte & 16 ? white : black; - dest32[destPos++] = srcByte & 8 ? white : black; - dest32[destPos++] = srcByte & 4 ? white : black; - dest32[destPos++] = srcByte & 2 ? white : black; - dest32[destPos++] = srcByte & 1 ? white : black; - } - for (; k < kEnd; k++) { - if (mask === 0) { - srcByte = src[srcPos++]; - mask = 128; - } - dest32[destPos++] = srcByte & mask ? white : black; - mask >>= 1; - } - } - while (destPos < dest32DataLength) { - dest32[destPos++] = 0; - } - ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); - } - } else if (imgData.kind === ImageKind.RGBA_32BPP) { - j = 0; - elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4; - for (i = 0; i < fullChunks; i++) { - dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); - srcPos += elemsInThisChunk; - ctx.putImageData(chunkImgData, 0, j); - j += FULL_CHUNK_HEIGHT; - } - if (i < totalChunks) { - elemsInThisChunk = width * partialChunkHeight * 4; - dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); - ctx.putImageData(chunkImgData, 0, j); - } - } else if (imgData.kind === ImageKind.RGB_24BPP) { - thisChunkHeight = FULL_CHUNK_HEIGHT; - elemsInThisChunk = width * thisChunkHeight; - for (i = 0; i < totalChunks; i++) { - if (i >= fullChunks) { - thisChunkHeight = partialChunkHeight; - elemsInThisChunk = width * thisChunkHeight; - } - destPos = 0; - for (j = elemsInThisChunk; j--;) { - dest[destPos++] = src[srcPos++]; - dest[destPos++] = src[srcPos++]; - dest[destPos++] = src[srcPos++]; - dest[destPos++] = 255; - } - ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); - } - } else { - error('bad image kind: ' + imgData.kind); - } - } - function putBinaryImageMask(ctx, imgData) { - var height = imgData.height, width = imgData.width; - var partialChunkHeight = height % FULL_CHUNK_HEIGHT; - var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; - var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; - var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); - var srcPos = 0; - var src = imgData.data; - var dest = chunkImgData.data; - for (var i = 0; i < totalChunks; i++) { - var thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; - var destPos = 3; - for (var j = 0; j < thisChunkHeight; j++) { - var mask = 0; - for (var k = 0; k < width; k++) { - if (!mask) { - var elem = src[srcPos++]; - mask = 128; - } - dest[destPos] = elem & mask ? 0 : 255; - destPos += 4; - mask >>= 1; - } - } - ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); - } - } - function copyCtxState(sourceCtx, destCtx) { - var properties = [ - 'strokeStyle', - 'fillStyle', - 'fillRule', - 'globalAlpha', - 'lineWidth', - 'lineCap', - 'lineJoin', - 'miterLimit', - 'globalCompositeOperation', - 'font' - ]; - for (var i = 0, ii = properties.length; i < ii; i++) { - var property = properties[i]; - if (sourceCtx[property] !== undefined) { - destCtx[property] = sourceCtx[property]; - } - } - if (sourceCtx.setLineDash !== undefined) { - destCtx.setLineDash(sourceCtx.getLineDash()); - destCtx.lineDashOffset = sourceCtx.lineDashOffset; - } - } - function composeSMaskBackdrop(bytes, r0, g0, b0) { - var length = bytes.length; - for (var i = 3; i < length; i += 4) { - var alpha = bytes[i]; - if (alpha === 0) { - bytes[i - 3] = r0; - bytes[i - 2] = g0; - bytes[i - 1] = b0; - } else if (alpha < 255) { - var alpha_ = 255 - alpha; - bytes[i - 3] = bytes[i - 3] * alpha + r0 * alpha_ >> 8; - bytes[i - 2] = bytes[i - 2] * alpha + g0 * alpha_ >> 8; - bytes[i - 1] = bytes[i - 1] * alpha + b0 * alpha_ >> 8; - } - } - } - function composeSMaskAlpha(maskData, layerData, transferMap) { - var length = maskData.length; - var scale = 1 / 255; - for (var i = 3; i < length; i += 4) { - var alpha = transferMap ? transferMap[maskData[i]] : maskData[i]; - layerData[i] = layerData[i] * alpha * scale | 0; - } - } - function composeSMaskLuminosity(maskData, layerData, transferMap) { - var length = maskData.length; - for (var i = 3; i < length; i += 4) { - var y = maskData[i - 3] * 77 + maskData[i - 2] * 152 + maskData[i - 1] * 28; - layerData[i] = transferMap ? layerData[i] * transferMap[y >> 8] >> 8 : layerData[i] * y >> 16; - } - } - function genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap) { - var hasBackdrop = !!backdrop; - var r0 = hasBackdrop ? backdrop[0] : 0; - var g0 = hasBackdrop ? backdrop[1] : 0; - var b0 = hasBackdrop ? backdrop[2] : 0; - var composeFn; - if (subtype === 'Luminosity') { - composeFn = composeSMaskLuminosity; - } else { - composeFn = composeSMaskAlpha; - } - var PIXELS_TO_PROCESS = 1048576; - var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width)); - for (var row = 0; row < height; row += chunkSize) { - var chunkHeight = Math.min(chunkSize, height - row); - var maskData = maskCtx.getImageData(0, row, width, chunkHeight); - var layerData = layerCtx.getImageData(0, row, width, chunkHeight); - if (hasBackdrop) { - composeSMaskBackdrop(maskData.data, r0, g0, b0); - } - composeFn(maskData.data, layerData.data, transferMap); - maskCtx.putImageData(layerData, 0, row); - } - } - function composeSMask(ctx, smask, layerCtx) { - var mask = smask.canvas; - var maskCtx = smask.context; - ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY, smask.offsetX, smask.offsetY); - var backdrop = smask.backdrop || null; - if (!smask.transferMap && WebGLUtils.isEnabled) { - var composed = WebGLUtils.composeSMask(layerCtx.canvas, mask, { - subtype: smask.subtype, - backdrop: backdrop - }); - ctx.setTransform(1, 0, 0, 1, 0, 0); - ctx.drawImage(composed, smask.offsetX, smask.offsetY); - return; - } - genericComposeSMask(maskCtx, layerCtx, mask.width, mask.height, smask.subtype, backdrop, smask.transferMap); - ctx.drawImage(mask, 0, 0); - } - var LINE_CAP_STYLES = [ - 'butt', - 'round', - 'square' - ]; - var LINE_JOIN_STYLES = [ - 'miter', - 'round', - 'bevel' - ]; - var NORMAL_CLIP = {}; - var EO_CLIP = {}; - CanvasGraphics.prototype = { - beginDrawing: function CanvasGraphics_beginDrawing(transform, viewport, transparency) { - var width = this.ctx.canvas.width; - var height = this.ctx.canvas.height; - this.ctx.save(); - this.ctx.fillStyle = 'rgb(255, 255, 255)'; - this.ctx.fillRect(0, 0, width, height); - this.ctx.restore(); - if (transparency) { - var transparentCanvas = this.cachedCanvases.getCanvas('transparent', width, height, true); - this.compositeCtx = this.ctx; - this.transparentCanvas = transparentCanvas.canvas; - this.ctx = transparentCanvas.context; - this.ctx.save(); - this.ctx.transform.apply(this.ctx, this.compositeCtx.mozCurrentTransform); - } - this.ctx.save(); - if (transform) { - this.ctx.transform.apply(this.ctx, transform); - } - this.ctx.transform.apply(this.ctx, viewport.transform); - this.baseTransform = this.ctx.mozCurrentTransform.slice(); - if (this.imageLayer) { - this.imageLayer.beginLayout(); - } - }, - executeOperatorList: function CanvasGraphics_executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper) { - var argsArray = operatorList.argsArray; - var fnArray = operatorList.fnArray; - var i = executionStartIdx || 0; - var argsArrayLen = argsArray.length; - if (argsArrayLen === i) { - return i; - } - var chunkOperations = argsArrayLen - i > EXECUTION_STEPS && typeof continueCallback === 'function'; - var endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0; - var steps = 0; - var commonObjs = this.commonObjs; - var objs = this.objs; - var fnId; - while (true) { - if (stepper !== undefined && i === stepper.nextBreakPoint) { - stepper.breakIt(i, continueCallback); - return i; - } - fnId = fnArray[i]; - if (fnId !== OPS.dependency) { - this[fnId].apply(this, argsArray[i]); - } else { - var deps = argsArray[i]; - for (var n = 0, nn = deps.length; n < nn; n++) { - var depObjId = deps[n]; - var common = depObjId[0] === 'g' && depObjId[1] === '_'; - var objsPool = common ? commonObjs : objs; - if (!objsPool.isResolved(depObjId)) { - objsPool.get(depObjId, continueCallback); - return i; - } - } - } - i++; - if (i === argsArrayLen) { - return i; - } - if (chunkOperations && ++steps > EXECUTION_STEPS) { - if (Date.now() > endTime) { - continueCallback(); - return i; - } - steps = 0; - } - } - }, - endDrawing: function CanvasGraphics_endDrawing() { - if (this.current.activeSMask !== null) { - this.endSMaskGroup(); - } - this.ctx.restore(); - if (this.transparentCanvas) { - this.ctx = this.compositeCtx; - this.ctx.save(); - this.ctx.setTransform(1, 0, 0, 1, 0, 0); - this.ctx.drawImage(this.transparentCanvas, 0, 0); - this.ctx.restore(); - this.transparentCanvas = null; - } - this.cachedCanvases.clear(); - WebGLUtils.clear(); - if (this.imageLayer) { - this.imageLayer.endLayout(); - } - }, - setLineWidth: function CanvasGraphics_setLineWidth(width) { - this.current.lineWidth = width; - this.ctx.lineWidth = width; - }, - setLineCap: function CanvasGraphics_setLineCap(style) { - this.ctx.lineCap = LINE_CAP_STYLES[style]; - }, - setLineJoin: function CanvasGraphics_setLineJoin(style) { - this.ctx.lineJoin = LINE_JOIN_STYLES[style]; - }, - setMiterLimit: function CanvasGraphics_setMiterLimit(limit) { - this.ctx.miterLimit = limit; - }, - setDash: function CanvasGraphics_setDash(dashArray, dashPhase) { - var ctx = this.ctx; - if (ctx.setLineDash !== undefined) { - ctx.setLineDash(dashArray); - ctx.lineDashOffset = dashPhase; - } - }, - setRenderingIntent: function CanvasGraphics_setRenderingIntent(intent) { - }, - setFlatness: function CanvasGraphics_setFlatness(flatness) { - }, - setGState: function CanvasGraphics_setGState(states) { - for (var i = 0, ii = states.length; i < ii; i++) { - var state = states[i]; - var key = state[0]; - var value = state[1]; - switch (key) { - case 'LW': - this.setLineWidth(value); - break; - case 'LC': - this.setLineCap(value); - break; - case 'LJ': - this.setLineJoin(value); - break; - case 'ML': - this.setMiterLimit(value); - break; - case 'D': - this.setDash(value[0], value[1]); - break; - case 'RI': - this.setRenderingIntent(value); - break; - case 'FL': - this.setFlatness(value); - break; - case 'Font': - this.setFont(value[0], value[1]); - break; - case 'CA': - this.current.strokeAlpha = state[1]; - break; - case 'ca': - this.current.fillAlpha = state[1]; - this.ctx.globalAlpha = state[1]; - break; - case 'BM': - if (value && value.name && value.name !== 'Normal') { - var mode = value.name.replace(/([A-Z])/g, function (c) { - return '-' + c.toLowerCase(); - }).substring(1); - this.ctx.globalCompositeOperation = mode; - if (this.ctx.globalCompositeOperation !== mode) { - warn('globalCompositeOperation "' + mode + '" is not supported'); - } - } else { - this.ctx.globalCompositeOperation = 'source-over'; - } - break; - case 'SMask': - if (this.current.activeSMask) { - if (this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1].activeSMask === this.current.activeSMask) { - this.suspendSMaskGroup(); - } else { - this.endSMaskGroup(); - } - } - this.current.activeSMask = value ? this.tempSMask : null; - if (this.current.activeSMask) { - this.beginSMaskGroup(); - } - this.tempSMask = null; - break; - } - } - }, - beginSMaskGroup: function CanvasGraphics_beginSMaskGroup() { - var activeSMask = this.current.activeSMask; - var drawnWidth = activeSMask.canvas.width; - var drawnHeight = activeSMask.canvas.height; - var cacheId = 'smaskGroupAt' + this.groupLevel; - var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true); - var currentCtx = this.ctx; - var currentTransform = currentCtx.mozCurrentTransform; - this.ctx.save(); - var groupCtx = scratchCanvas.context; - groupCtx.scale(1 / activeSMask.scaleX, 1 / activeSMask.scaleY); - groupCtx.translate(-activeSMask.offsetX, -activeSMask.offsetY); - groupCtx.transform.apply(groupCtx, currentTransform); - activeSMask.startTransformInverse = groupCtx.mozCurrentTransformInverse; - copyCtxState(currentCtx, groupCtx); - this.ctx = groupCtx; - this.setGState([ - [ - 'BM', - 'Normal' - ], - [ - 'ca', - 1 - ], - [ - 'CA', - 1 - ] - ]); - this.groupStack.push(currentCtx); - this.groupLevel++; - }, - suspendSMaskGroup: function CanvasGraphics_endSMaskGroup() { - var groupCtx = this.ctx; - this.groupLevel--; - this.ctx = this.groupStack.pop(); - composeSMask(this.ctx, this.current.activeSMask, groupCtx); - this.ctx.restore(); - this.ctx.save(); - copyCtxState(groupCtx, this.ctx); - this.current.resumeSMaskCtx = groupCtx; - var deltaTransform = Util.transform(this.current.activeSMask.startTransformInverse, groupCtx.mozCurrentTransform); - this.ctx.transform.apply(this.ctx, deltaTransform); - groupCtx.save(); - groupCtx.setTransform(1, 0, 0, 1, 0, 0); - groupCtx.clearRect(0, 0, groupCtx.canvas.width, groupCtx.canvas.height); - groupCtx.restore(); - }, - resumeSMaskGroup: function CanvasGraphics_endSMaskGroup() { - var groupCtx = this.current.resumeSMaskCtx; - var currentCtx = this.ctx; - this.ctx = groupCtx; - this.groupStack.push(currentCtx); - this.groupLevel++; - }, - endSMaskGroup: function CanvasGraphics_endSMaskGroup() { - var groupCtx = this.ctx; - this.groupLevel--; - this.ctx = this.groupStack.pop(); - composeSMask(this.ctx, this.current.activeSMask, groupCtx); - this.ctx.restore(); - copyCtxState(groupCtx, this.ctx); - var deltaTransform = Util.transform(this.current.activeSMask.startTransformInverse, groupCtx.mozCurrentTransform); - this.ctx.transform.apply(this.ctx, deltaTransform); - }, - save: function CanvasGraphics_save() { - this.ctx.save(); - var old = this.current; - this.stateStack.push(old); - this.current = old.clone(); - this.current.resumeSMaskCtx = null; - }, - restore: function CanvasGraphics_restore() { - if (this.current.resumeSMaskCtx) { - this.resumeSMaskGroup(); - } - if (this.current.activeSMask !== null && (this.stateStack.length === 0 || this.stateStack[this.stateStack.length - 1].activeSMask !== this.current.activeSMask)) { - this.endSMaskGroup(); - } - if (this.stateStack.length !== 0) { - this.current = this.stateStack.pop(); - this.ctx.restore(); - this.pendingClip = null; - this.cachedGetSinglePixelWidth = null; - } - }, - transform: function CanvasGraphics_transform(a, b, c, d, e, f) { - this.ctx.transform(a, b, c, d, e, f); - this.cachedGetSinglePixelWidth = null; - }, - constructPath: function CanvasGraphics_constructPath(ops, args) { - var ctx = this.ctx; - var current = this.current; - var x = current.x, y = current.y; - for (var i = 0, j = 0, ii = ops.length; i < ii; i++) { - switch (ops[i] | 0) { - case OPS.rectangle: - x = args[j++]; - y = args[j++]; - var width = args[j++]; - var height = args[j++]; - if (width === 0) { - width = this.getSinglePixelWidth(); - } - if (height === 0) { - height = this.getSinglePixelWidth(); - } - var xw = x + width; - var yh = y + height; - this.ctx.moveTo(x, y); - this.ctx.lineTo(xw, y); - this.ctx.lineTo(xw, yh); - this.ctx.lineTo(x, yh); - this.ctx.lineTo(x, y); - this.ctx.closePath(); - break; - case OPS.moveTo: - x = args[j++]; - y = args[j++]; - ctx.moveTo(x, y); - break; - case OPS.lineTo: - x = args[j++]; - y = args[j++]; - ctx.lineTo(x, y); - break; - case OPS.curveTo: - x = args[j + 4]; - y = args[j + 5]; - ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y); - j += 6; - break; - case OPS.curveTo2: - ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]); - x = args[j + 2]; - y = args[j + 3]; - j += 4; - break; - case OPS.curveTo3: - x = args[j + 2]; - y = args[j + 3]; - ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y); - j += 4; - break; - case OPS.closePath: - ctx.closePath(); - break; - } - } - current.setCurrentPoint(x, y); - }, - closePath: function CanvasGraphics_closePath() { - this.ctx.closePath(); - }, - stroke: function CanvasGraphics_stroke(consumePath) { - consumePath = typeof consumePath !== 'undefined' ? consumePath : true; - var ctx = this.ctx; - var strokeColor = this.current.strokeColor; - ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR, this.current.lineWidth); - ctx.globalAlpha = this.current.strokeAlpha; - if (strokeColor && strokeColor.hasOwnProperty('type') && strokeColor.type === 'Pattern') { - ctx.save(); - ctx.strokeStyle = strokeColor.getPattern(ctx, this); - ctx.stroke(); - ctx.restore(); - } else { - ctx.stroke(); - } - if (consumePath) { - this.consumePath(); - } - ctx.globalAlpha = this.current.fillAlpha; - }, - closeStroke: function CanvasGraphics_closeStroke() { - this.closePath(); - this.stroke(); - }, - fill: function CanvasGraphics_fill(consumePath) { - consumePath = typeof consumePath !== 'undefined' ? consumePath : true; - var ctx = this.ctx; - var fillColor = this.current.fillColor; - var isPatternFill = this.current.patternFill; - var needRestore = false; - if (isPatternFill) { - ctx.save(); - if (this.baseTransform) { - ctx.setTransform.apply(ctx, this.baseTransform); - } - ctx.fillStyle = fillColor.getPattern(ctx, this); - needRestore = true; - } - if (this.pendingEOFill) { - if (ctx.mozFillRule !== undefined) { - ctx.mozFillRule = 'evenodd'; - ctx.fill(); - ctx.mozFillRule = 'nonzero'; - } else { - ctx.fill('evenodd'); - } - this.pendingEOFill = false; - } else { - ctx.fill(); - } - if (needRestore) { - ctx.restore(); - } - if (consumePath) { - this.consumePath(); - } - }, - eoFill: function CanvasGraphics_eoFill() { - this.pendingEOFill = true; - this.fill(); - }, - fillStroke: function CanvasGraphics_fillStroke() { - this.fill(false); - this.stroke(false); - this.consumePath(); - }, - eoFillStroke: function CanvasGraphics_eoFillStroke() { - this.pendingEOFill = true; - this.fillStroke(); - }, - closeFillStroke: function CanvasGraphics_closeFillStroke() { - this.closePath(); - this.fillStroke(); - }, - closeEOFillStroke: function CanvasGraphics_closeEOFillStroke() { - this.pendingEOFill = true; - this.closePath(); - this.fillStroke(); - }, - endPath: function CanvasGraphics_endPath() { - this.consumePath(); - }, - clip: function CanvasGraphics_clip() { - this.pendingClip = NORMAL_CLIP; - }, - eoClip: function CanvasGraphics_eoClip() { - this.pendingClip = EO_CLIP; - }, - beginText: function CanvasGraphics_beginText() { - this.current.textMatrix = IDENTITY_MATRIX; - this.current.textMatrixScale = 1; - this.current.x = this.current.lineX = 0; - this.current.y = this.current.lineY = 0; - }, - endText: function CanvasGraphics_endText() { - var paths = this.pendingTextPaths; - var ctx = this.ctx; - if (paths === undefined) { - ctx.beginPath(); - return; - } - ctx.save(); - ctx.beginPath(); - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - ctx.setTransform.apply(ctx, path.transform); - ctx.translate(path.x, path.y); - path.addToPath(ctx, path.fontSize); - } - ctx.restore(); - ctx.clip(); - ctx.beginPath(); - delete this.pendingTextPaths; - }, - setCharSpacing: function CanvasGraphics_setCharSpacing(spacing) { - this.current.charSpacing = spacing; - }, - setWordSpacing: function CanvasGraphics_setWordSpacing(spacing) { - this.current.wordSpacing = spacing; - }, - setHScale: function CanvasGraphics_setHScale(scale) { - this.current.textHScale = scale / 100; - }, - setLeading: function CanvasGraphics_setLeading(leading) { - this.current.leading = -leading; - }, - setFont: function CanvasGraphics_setFont(fontRefName, size) { - var fontObj = this.commonObjs.get(fontRefName); - var current = this.current; - if (!fontObj) { - error('Can\'t find font for ' + fontRefName); - } - current.fontMatrix = fontObj.fontMatrix ? fontObj.fontMatrix : FONT_IDENTITY_MATRIX; - if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) { - warn('Invalid font matrix for font ' + fontRefName); - } - if (size < 0) { - size = -size; - current.fontDirection = -1; - } else { - current.fontDirection = 1; - } - this.current.font = fontObj; - this.current.fontSize = size; - if (fontObj.isType3Font) { - return; - } - var name = fontObj.loadedName || 'sans-serif'; - var bold = fontObj.black ? '900' : fontObj.bold ? 'bold' : 'normal'; - var italic = fontObj.italic ? 'italic' : 'normal'; - var typeface = '"' + name + '", ' + fontObj.fallbackName; - var browserFontSize = size < MIN_FONT_SIZE ? MIN_FONT_SIZE : size > MAX_FONT_SIZE ? MAX_FONT_SIZE : size; - this.current.fontSizeScale = size / browserFontSize; - var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface; - this.ctx.font = rule; - }, - setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) { - this.current.textRenderingMode = mode; - }, - setTextRise: function CanvasGraphics_setTextRise(rise) { - this.current.textRise = rise; - }, - moveText: function CanvasGraphics_moveText(x, y) { - this.current.x = this.current.lineX += x; - this.current.y = this.current.lineY += y; - }, - setLeadingMoveText: function CanvasGraphics_setLeadingMoveText(x, y) { - this.setLeading(-y); - this.moveText(x, y); - }, - setTextMatrix: function CanvasGraphics_setTextMatrix(a, b, c, d, e, f) { - this.current.textMatrix = [ - a, - b, - c, - d, - e, - f - ]; - this.current.textMatrixScale = Math.sqrt(a * a + b * b); - this.current.x = this.current.lineX = 0; - this.current.y = this.current.lineY = 0; - }, - nextLine: function CanvasGraphics_nextLine() { - this.moveText(0, this.current.leading); - }, - paintChar: function CanvasGraphics_paintChar(character, x, y) { - var ctx = this.ctx; - var current = this.current; - var font = current.font; - var textRenderingMode = current.textRenderingMode; - var fontSize = current.fontSize / current.fontSizeScale; - var fillStrokeMode = textRenderingMode & TextRenderingMode.FILL_STROKE_MASK; - var isAddToPathSet = !!(textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG); - var addToPath; - if (font.disableFontFace || isAddToPathSet) { - addToPath = font.getPathGenerator(this.commonObjs, character); - } - if (font.disableFontFace) { - ctx.save(); - ctx.translate(x, y); - ctx.beginPath(); - addToPath(ctx, fontSize); - if (fillStrokeMode === TextRenderingMode.FILL || fillStrokeMode === TextRenderingMode.FILL_STROKE) { - ctx.fill(); - } - if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) { - ctx.stroke(); - } - ctx.restore(); - } else { - if (fillStrokeMode === TextRenderingMode.FILL || fillStrokeMode === TextRenderingMode.FILL_STROKE) { - ctx.fillText(character, x, y); - } - if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) { - ctx.strokeText(character, x, y); - } - } - if (isAddToPathSet) { - var paths = this.pendingTextPaths || (this.pendingTextPaths = []); - paths.push({ - transform: ctx.mozCurrentTransform, - x: x, - y: y, - fontSize: fontSize, - addToPath: addToPath - }); - } - }, - get isFontSubpixelAAEnabled() { - var ctx = document.createElement('canvas').getContext('2d'); - ctx.scale(1.5, 1); - ctx.fillText('I', 0, 10); - var data = ctx.getImageData(0, 0, 10, 10).data; - var enabled = false; - for (var i = 3; i < data.length; i += 4) { - if (data[i] > 0 && data[i] < 255) { - enabled = true; - break; - } - } - return shadow(this, 'isFontSubpixelAAEnabled', enabled); - }, - showText: function CanvasGraphics_showText(glyphs) { - var current = this.current; - var font = current.font; - if (font.isType3Font) { - return this.showType3Text(glyphs); - } - var fontSize = current.fontSize; - if (fontSize === 0) { - return; - } - var ctx = this.ctx; - var fontSizeScale = current.fontSizeScale; - var charSpacing = current.charSpacing; - var wordSpacing = current.wordSpacing; - var fontDirection = current.fontDirection; - var textHScale = current.textHScale * fontDirection; - var glyphsLength = glyphs.length; - var vertical = font.vertical; - var spacingDir = vertical ? 1 : -1; - var defaultVMetrics = font.defaultVMetrics; - var widthAdvanceScale = fontSize * current.fontMatrix[0]; - var simpleFillText = current.textRenderingMode === TextRenderingMode.FILL && !font.disableFontFace; - ctx.save(); - ctx.transform.apply(ctx, current.textMatrix); - ctx.translate(current.x, current.y + current.textRise); - if (current.patternFill) { - ctx.fillStyle = current.fillColor.getPattern(ctx, this); - } - if (fontDirection > 0) { - ctx.scale(textHScale, -1); - } else { - ctx.scale(textHScale, 1); - } - var lineWidth = current.lineWidth; - var scale = current.textMatrixScale; - if (scale === 0 || lineWidth === 0) { - var fillStrokeMode = current.textRenderingMode & TextRenderingMode.FILL_STROKE_MASK; - if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) { - this.cachedGetSinglePixelWidth = null; - lineWidth = this.getSinglePixelWidth() * MIN_WIDTH_FACTOR; - } - } else { - lineWidth /= scale; - } - if (fontSizeScale !== 1.0) { - ctx.scale(fontSizeScale, fontSizeScale); - lineWidth /= fontSizeScale; - } - ctx.lineWidth = lineWidth; - var x = 0, i; - for (i = 0; i < glyphsLength; ++i) { - var glyph = glyphs[i]; - if (isNum(glyph)) { - x += spacingDir * glyph * fontSize / 1000; - continue; - } - var restoreNeeded = false; - var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; - var character = glyph.fontChar; - var accent = glyph.accent; - var scaledX, scaledY, scaledAccentX, scaledAccentY; - var width = glyph.width; - if (vertical) { - var vmetric, vx, vy; - vmetric = glyph.vmetric || defaultVMetrics; - vx = glyph.vmetric ? vmetric[1] : width * 0.5; - vx = -vx * widthAdvanceScale; - vy = vmetric[2] * widthAdvanceScale; - width = vmetric ? -vmetric[0] : width; - scaledX = vx / fontSizeScale; - scaledY = (x + vy) / fontSizeScale; - } else { - scaledX = x / fontSizeScale; - scaledY = 0; - } - if (font.remeasure && width > 0) { - var measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale; - if (width < measuredWidth && this.isFontSubpixelAAEnabled) { - var characterScaleX = width / measuredWidth; - restoreNeeded = true; - ctx.save(); - ctx.scale(characterScaleX, 1); - scaledX /= characterScaleX; - } else if (width !== measuredWidth) { - scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale; - } - } - if (glyph.isInFont || font.missingFile) { - if (simpleFillText && !accent) { - ctx.fillText(character, scaledX, scaledY); - } else { - this.paintChar(character, scaledX, scaledY); - if (accent) { - scaledAccentX = scaledX + accent.offset.x / fontSizeScale; - scaledAccentY = scaledY - accent.offset.y / fontSizeScale; - this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY); - } - } - } - var charWidth = width * widthAdvanceScale + spacing * fontDirection; - x += charWidth; - if (restoreNeeded) { - ctx.restore(); - } - } - if (vertical) { - current.y -= x * textHScale; - } else { - current.x += x * textHScale; - } - ctx.restore(); - }, - showType3Text: function CanvasGraphics_showType3Text(glyphs) { - var ctx = this.ctx; - var current = this.current; - var font = current.font; - var fontSize = current.fontSize; - var fontDirection = current.fontDirection; - var spacingDir = font.vertical ? 1 : -1; - var charSpacing = current.charSpacing; - var wordSpacing = current.wordSpacing; - var textHScale = current.textHScale * fontDirection; - var fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX; - var glyphsLength = glyphs.length; - var isTextInvisible = current.textRenderingMode === TextRenderingMode.INVISIBLE; - var i, glyph, width, spacingLength; - if (isTextInvisible || fontSize === 0) { - return; - } - this.cachedGetSinglePixelWidth = null; - ctx.save(); - ctx.transform.apply(ctx, current.textMatrix); - ctx.translate(current.x, current.y); - ctx.scale(textHScale, fontDirection); - for (i = 0; i < glyphsLength; ++i) { - glyph = glyphs[i]; - if (isNum(glyph)) { - spacingLength = spacingDir * glyph * fontSize / 1000; - this.ctx.translate(spacingLength, 0); - current.x += spacingLength * textHScale; - continue; - } - var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; - var operatorList = font.charProcOperatorList[glyph.operatorListId]; - if (!operatorList) { - warn('Type3 character \"' + glyph.operatorListId + '\" is not available'); - continue; - } - this.processingType3 = glyph; - this.save(); - ctx.scale(fontSize, fontSize); - ctx.transform.apply(ctx, fontMatrix); - this.executeOperatorList(operatorList); - this.restore(); - var transformed = Util.applyTransform([ - glyph.width, - 0 - ], fontMatrix); - width = transformed[0] * fontSize + spacing; - ctx.translate(width, 0); - current.x += width * textHScale; - } - ctx.restore(); - this.processingType3 = null; - }, - setCharWidth: function CanvasGraphics_setCharWidth(xWidth, yWidth) { - }, - setCharWidthAndBounds: function CanvasGraphics_setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) { - this.ctx.rect(llx, lly, urx - llx, ury - lly); - this.clip(); - this.endPath(); - }, - getColorN_Pattern: function CanvasGraphics_getColorN_Pattern(IR) { - var pattern; - if (IR[0] === 'TilingPattern') { - var color = IR[1]; - var baseTransform = this.baseTransform || this.ctx.mozCurrentTransform.slice(); - var self = this; - var canvasGraphicsFactory = { - createCanvasGraphics: function (ctx) { - return new CanvasGraphics(ctx, self.commonObjs, self.objs); - } - }; - pattern = new TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransform); - } else { - pattern = getShadingPatternFromIR(IR); - } - return pattern; - }, - setStrokeColorN: function CanvasGraphics_setStrokeColorN() { - this.current.strokeColor = this.getColorN_Pattern(arguments); - }, - setFillColorN: function CanvasGraphics_setFillColorN() { - this.current.fillColor = this.getColorN_Pattern(arguments); - this.current.patternFill = true; - }, - setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) { - var color = Util.makeCssRgb(r, g, b); - this.ctx.strokeStyle = color; - this.current.strokeColor = color; - }, - setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) { - var color = Util.makeCssRgb(r, g, b); - this.ctx.fillStyle = color; - this.current.fillColor = color; - this.current.patternFill = false; - }, - shadingFill: function CanvasGraphics_shadingFill(patternIR) { - var ctx = this.ctx; - this.save(); - var pattern = getShadingPatternFromIR(patternIR); - ctx.fillStyle = pattern.getPattern(ctx, this, true); - var inv = ctx.mozCurrentTransformInverse; - if (inv) { - var canvas = ctx.canvas; - var width = canvas.width; - var height = canvas.height; - var bl = Util.applyTransform([ - 0, - 0 - ], inv); - var br = Util.applyTransform([ - 0, - height - ], inv); - var ul = Util.applyTransform([ - width, - 0 - ], inv); - var ur = Util.applyTransform([ - width, - height - ], inv); - var x0 = Math.min(bl[0], br[0], ul[0], ur[0]); - var y0 = Math.min(bl[1], br[1], ul[1], ur[1]); - var x1 = Math.max(bl[0], br[0], ul[0], ur[0]); - var y1 = Math.max(bl[1], br[1], ul[1], ur[1]); - this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0); - } else { - this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10); - } - this.restore(); - }, - beginInlineImage: function CanvasGraphics_beginInlineImage() { - error('Should not call beginInlineImage'); - }, - beginImageData: function CanvasGraphics_beginImageData() { - error('Should not call beginImageData'); - }, - paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix, bbox) { - this.save(); - this.baseTransformStack.push(this.baseTransform); - if (isArray(matrix) && matrix.length === 6) { - this.transform.apply(this, matrix); - } - this.baseTransform = this.ctx.mozCurrentTransform; - if (isArray(bbox) && bbox.length === 4) { - var width = bbox[2] - bbox[0]; - var height = bbox[3] - bbox[1]; - this.ctx.rect(bbox[0], bbox[1], width, height); - this.clip(); - this.endPath(); - } - }, - paintFormXObjectEnd: function CanvasGraphics_paintFormXObjectEnd() { - this.restore(); - this.baseTransform = this.baseTransformStack.pop(); - }, - beginGroup: function CanvasGraphics_beginGroup(group) { - this.save(); - var currentCtx = this.ctx; - if (!group.isolated) { - info('TODO: Support non-isolated groups.'); - } - if (group.knockout) { - warn('Knockout groups not supported.'); - } - var currentTransform = currentCtx.mozCurrentTransform; - if (group.matrix) { - currentCtx.transform.apply(currentCtx, group.matrix); - } - assert(group.bbox, 'Bounding box is required.'); - var bounds = Util.getAxialAlignedBoundingBox(group.bbox, currentCtx.mozCurrentTransform); - var canvasBounds = [ - 0, - 0, - currentCtx.canvas.width, - currentCtx.canvas.height - ]; - bounds = Util.intersect(bounds, canvasBounds) || [ - 0, - 0, - 0, - 0 - ]; - var offsetX = Math.floor(bounds[0]); - var offsetY = Math.floor(bounds[1]); - var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1); - var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1); - var scaleX = 1, scaleY = 1; - if (drawnWidth > MAX_GROUP_SIZE) { - scaleX = drawnWidth / MAX_GROUP_SIZE; - drawnWidth = MAX_GROUP_SIZE; - } - if (drawnHeight > MAX_GROUP_SIZE) { - scaleY = drawnHeight / MAX_GROUP_SIZE; - drawnHeight = MAX_GROUP_SIZE; - } - var cacheId = 'groupAt' + this.groupLevel; - if (group.smask) { - cacheId += '_smask_' + this.smaskCounter++ % 2; - } - var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true); - var groupCtx = scratchCanvas.context; - groupCtx.scale(1 / scaleX, 1 / scaleY); - groupCtx.translate(-offsetX, -offsetY); - groupCtx.transform.apply(groupCtx, currentTransform); - if (group.smask) { - this.smaskStack.push({ - canvas: scratchCanvas.canvas, - context: groupCtx, - offsetX: offsetX, - offsetY: offsetY, - scaleX: scaleX, - scaleY: scaleY, - subtype: group.smask.subtype, - backdrop: group.smask.backdrop, - transferMap: group.smask.transferMap || null, - startTransformInverse: null - }); - } else - { - currentCtx.setTransform(1, 0, 0, 1, 0, 0); - currentCtx.translate(offsetX, offsetY); - currentCtx.scale(scaleX, scaleY); - } - copyCtxState(currentCtx, groupCtx); - this.ctx = groupCtx; - this.setGState([ - [ - 'BM', - 'Normal' - ], - [ - 'ca', - 1 - ], - [ - 'CA', - 1 - ] - ]); - this.groupStack.push(currentCtx); - this.groupLevel++; - this.current.activeSMask = null; - }, - endGroup: function CanvasGraphics_endGroup(group) { - this.groupLevel--; - var groupCtx = this.ctx; - this.ctx = this.groupStack.pop(); - if (this.ctx.imageSmoothingEnabled !== undefined) { - this.ctx.imageSmoothingEnabled = false; - } else { - this.ctx.mozImageSmoothingEnabled = false; - } - if (group.smask) { - this.tempSMask = this.smaskStack.pop(); - } else { - this.ctx.drawImage(groupCtx.canvas, 0, 0); - } - this.restore(); - }, - beginAnnotations: function CanvasGraphics_beginAnnotations() { - this.save(); - this.current = new CanvasExtraState(); - if (this.baseTransform) { - this.ctx.setTransform.apply(this.ctx, this.baseTransform); - } - }, - endAnnotations: function CanvasGraphics_endAnnotations() { - this.restore(); - }, - beginAnnotation: function CanvasGraphics_beginAnnotation(rect, transform, matrix) { - this.save(); - if (isArray(rect) && rect.length === 4) { - var width = rect[2] - rect[0]; - var height = rect[3] - rect[1]; - this.ctx.rect(rect[0], rect[1], width, height); - this.clip(); - this.endPath(); - } - this.transform.apply(this, transform); - this.transform.apply(this, matrix); - }, - endAnnotation: function CanvasGraphics_endAnnotation() { - this.restore(); - }, - paintJpegXObject: function CanvasGraphics_paintJpegXObject(objId, w, h) { - var domImage = this.objs.get(objId); - if (!domImage) { - warn('Dependent image isn\'t ready yet'); - return; - } - this.save(); - var ctx = this.ctx; - ctx.scale(1 / w, -1 / h); - ctx.drawImage(domImage, 0, 0, domImage.width, domImage.height, 0, -h, w, h); - if (this.imageLayer) { - var currentTransform = ctx.mozCurrentTransformInverse; - var position = this.getCanvasPosition(0, 0); - this.imageLayer.appendImage({ - objId: objId, - left: position[0], - top: position[1], - width: w / currentTransform[0], - height: h / currentTransform[3] - }); - } - this.restore(); - }, - paintImageMaskXObject: function CanvasGraphics_paintImageMaskXObject(img) { - var ctx = this.ctx; - var width = img.width, height = img.height; - var fillColor = this.current.fillColor; - var isPatternFill = this.current.patternFill; - var glyph = this.processingType3; - if (COMPILE_TYPE3_GLYPHS && glyph && glyph.compiled === undefined) { - if (width <= MAX_SIZE_TO_COMPILE && height <= MAX_SIZE_TO_COMPILE) { - glyph.compiled = compileType3Glyph({ - data: img.data, - width: width, - height: height - }); - } else { - glyph.compiled = null; - } - } - if (glyph && glyph.compiled) { - glyph.compiled(ctx); - return; - } - var maskCanvas = this.cachedCanvases.getCanvas('maskCanvas', width, height); - var maskCtx = maskCanvas.context; - maskCtx.save(); - putBinaryImageMask(maskCtx, img); - maskCtx.globalCompositeOperation = 'source-in'; - maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this) : fillColor; - maskCtx.fillRect(0, 0, width, height); - maskCtx.restore(); - this.paintInlineImageXObject(maskCanvas.canvas); - }, - paintImageMaskXObjectRepeat: function CanvasGraphics_paintImageMaskXObjectRepeat(imgData, scaleX, scaleY, positions) { - var width = imgData.width; - var height = imgData.height; - var fillColor = this.current.fillColor; - var isPatternFill = this.current.patternFill; - var maskCanvas = this.cachedCanvases.getCanvas('maskCanvas', width, height); - var maskCtx = maskCanvas.context; - maskCtx.save(); - putBinaryImageMask(maskCtx, imgData); - maskCtx.globalCompositeOperation = 'source-in'; - maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this) : fillColor; - maskCtx.fillRect(0, 0, width, height); - maskCtx.restore(); - var ctx = this.ctx; - for (var i = 0, ii = positions.length; i < ii; i += 2) { - ctx.save(); - ctx.transform(scaleX, 0, 0, scaleY, positions[i], positions[i + 1]); - ctx.scale(1, -1); - ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1); - ctx.restore(); - } - }, - paintImageMaskXObjectGroup: function CanvasGraphics_paintImageMaskXObjectGroup(images) { - var ctx = this.ctx; - var fillColor = this.current.fillColor; - var isPatternFill = this.current.patternFill; - for (var i = 0, ii = images.length; i < ii; i++) { - var image = images[i]; - var width = image.width, height = image.height; - var maskCanvas = this.cachedCanvases.getCanvas('maskCanvas', width, height); - var maskCtx = maskCanvas.context; - maskCtx.save(); - putBinaryImageMask(maskCtx, image); - maskCtx.globalCompositeOperation = 'source-in'; - maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this) : fillColor; - maskCtx.fillRect(0, 0, width, height); - maskCtx.restore(); - ctx.save(); - ctx.transform.apply(ctx, image.transform); - ctx.scale(1, -1); - ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1); - ctx.restore(); - } - }, - paintImageXObject: function CanvasGraphics_paintImageXObject(objId) { - var imgData = this.objs.get(objId); - if (!imgData) { - warn('Dependent image isn\'t ready yet'); - return; - } - this.paintInlineImageXObject(imgData); - }, - paintImageXObjectRepeat: function CanvasGraphics_paintImageXObjectRepeat(objId, scaleX, scaleY, positions) { - var imgData = this.objs.get(objId); - if (!imgData) { - warn('Dependent image isn\'t ready yet'); - return; - } - var width = imgData.width; - var height = imgData.height; - var map = []; - for (var i = 0, ii = positions.length; i < ii; i += 2) { - map.push({ - transform: [ - scaleX, - 0, - 0, - scaleY, - positions[i], - positions[i + 1] - ], - x: 0, - y: 0, - w: width, - h: height - }); - } - this.paintInlineImageXObjectGroup(imgData, map); - }, - paintInlineImageXObject: function CanvasGraphics_paintInlineImageXObject(imgData) { - var width = imgData.width; - var height = imgData.height; - var ctx = this.ctx; - this.save(); - ctx.scale(1 / width, -1 / height); - var currentTransform = ctx.mozCurrentTransformInverse; - var a = currentTransform[0], b = currentTransform[1]; - var widthScale = Math.max(Math.sqrt(a * a + b * b), 1); - var c = currentTransform[2], d = currentTransform[3]; - var heightScale = Math.max(Math.sqrt(c * c + d * d), 1); - var imgToPaint, tmpCanvas; - if (imgData instanceof HTMLElement || !imgData.data) { - imgToPaint = imgData; - } else { - tmpCanvas = this.cachedCanvases.getCanvas('inlineImage', width, height); - var tmpCtx = tmpCanvas.context; - putBinaryImageData(tmpCtx, imgData); - imgToPaint = tmpCanvas.canvas; - } - var paintWidth = width, paintHeight = height; - var tmpCanvasId = 'prescale1'; - while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) { - var newWidth = paintWidth, newHeight = paintHeight; - if (widthScale > 2 && paintWidth > 1) { - newWidth = Math.ceil(paintWidth / 2); - widthScale /= paintWidth / newWidth; - } - if (heightScale > 2 && paintHeight > 1) { - newHeight = Math.ceil(paintHeight / 2); - heightScale /= paintHeight / newHeight; - } - tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight); - tmpCtx = tmpCanvas.context; - tmpCtx.clearRect(0, 0, newWidth, newHeight); - tmpCtx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight); - imgToPaint = tmpCanvas.canvas; - paintWidth = newWidth; - paintHeight = newHeight; - tmpCanvasId = tmpCanvasId === 'prescale1' ? 'prescale2' : 'prescale1'; - } - ctx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight, 0, -height, width, height); - if (this.imageLayer) { - var position = this.getCanvasPosition(0, -height); - this.imageLayer.appendImage({ - imgData: imgData, - left: position[0], - top: position[1], - width: width / currentTransform[0], - height: height / currentTransform[3] - }); - } - this.restore(); - }, - paintInlineImageXObjectGroup: function CanvasGraphics_paintInlineImageXObjectGroup(imgData, map) { - var ctx = this.ctx; - var w = imgData.width; - var h = imgData.height; - var tmpCanvas = this.cachedCanvases.getCanvas('inlineImage', w, h); - var tmpCtx = tmpCanvas.context; - putBinaryImageData(tmpCtx, imgData); - for (var i = 0, ii = map.length; i < ii; i++) { - var entry = map[i]; - ctx.save(); - ctx.transform.apply(ctx, entry.transform); - ctx.scale(1, -1); - ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1); - if (this.imageLayer) { - var position = this.getCanvasPosition(entry.x, entry.y); - this.imageLayer.appendImage({ - imgData: imgData, - left: position[0], - top: position[1], - width: w, - height: h - }); - } - ctx.restore(); - } - }, - paintSolidColorImageMask: function CanvasGraphics_paintSolidColorImageMask() { - this.ctx.fillRect(0, 0, 1, 1); - }, - paintXObject: function CanvasGraphics_paintXObject() { - warn('Unsupported \'paintXObject\' command.'); - }, - markPoint: function CanvasGraphics_markPoint(tag) { - }, - markPointProps: function CanvasGraphics_markPointProps(tag, properties) { - }, - beginMarkedContent: function CanvasGraphics_beginMarkedContent(tag) { - }, - beginMarkedContentProps: function CanvasGraphics_beginMarkedContentProps(tag, properties) { - }, - endMarkedContent: function CanvasGraphics_endMarkedContent() { - }, - beginCompat: function CanvasGraphics_beginCompat() { - }, - endCompat: function CanvasGraphics_endCompat() { - }, - consumePath: function CanvasGraphics_consumePath() { - var ctx = this.ctx; - if (this.pendingClip) { - if (this.pendingClip === EO_CLIP) { - if (ctx.mozFillRule !== undefined) { - ctx.mozFillRule = 'evenodd'; - ctx.clip(); - ctx.mozFillRule = 'nonzero'; - } else { - ctx.clip('evenodd'); - } - } else { - ctx.clip(); - } - this.pendingClip = null; - } - ctx.beginPath(); - }, - getSinglePixelWidth: function CanvasGraphics_getSinglePixelWidth(scale) { - if (this.cachedGetSinglePixelWidth === null) { - this.ctx.save(); - var inverse = this.ctx.mozCurrentTransformInverse; - this.ctx.restore(); - this.cachedGetSinglePixelWidth = Math.sqrt(Math.max(inverse[0] * inverse[0] + inverse[1] * inverse[1], inverse[2] * inverse[2] + inverse[3] * inverse[3])); - } - return this.cachedGetSinglePixelWidth; - }, - getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) { - var transform = this.ctx.mozCurrentTransform; - return [ - transform[0] * x + transform[2] * y + transform[4], - transform[1] * x + transform[3] * y + transform[5] - ]; - } - }; - for (var op in OPS) { - CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op]; - } - return CanvasGraphics; - }(); - exports.CanvasGraphics = CanvasGraphics; - exports.createScratchCanvas = createScratchCanvas; - })); - (function (root, factory) { - factory(root.pdfjsDisplayAPI = {}, root.pdfjsSharedUtil, root.pdfjsDisplayFontLoader, root.pdfjsDisplayCanvas, root.pdfjsDisplayMetadata, root.pdfjsDisplayDOMUtils); - }(this, function (exports, sharedUtil, displayFontLoader, displayCanvas, displayMetadata, displayDOMUtils, amdRequire) { - var InvalidPDFException = sharedUtil.InvalidPDFException; - var MessageHandler = sharedUtil.MessageHandler; - var MissingPDFException = sharedUtil.MissingPDFException; - var PageViewport = sharedUtil.PageViewport; - var PasswordResponses = sharedUtil.PasswordResponses; - var PasswordException = sharedUtil.PasswordException; - var StatTimer = sharedUtil.StatTimer; - var UnexpectedResponseException = sharedUtil.UnexpectedResponseException; - var UnknownErrorException = sharedUtil.UnknownErrorException; - var Util = sharedUtil.Util; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var error = sharedUtil.error; - var deprecated = sharedUtil.deprecated; - var getVerbosityLevel = sharedUtil.getVerbosityLevel; - var info = sharedUtil.info; - var isInt = sharedUtil.isInt; - var isArray = sharedUtil.isArray; - var isArrayBuffer = sharedUtil.isArrayBuffer; - var isSameOrigin = sharedUtil.isSameOrigin; - var loadJpegStream = sharedUtil.loadJpegStream; - var stringToBytes = sharedUtil.stringToBytes; - var globalScope = sharedUtil.globalScope; - var warn = sharedUtil.warn; - var FontFaceObject = displayFontLoader.FontFaceObject; - var FontLoader = displayFontLoader.FontLoader; - var CanvasGraphics = displayCanvas.CanvasGraphics; - var createScratchCanvas = displayCanvas.createScratchCanvas; - var Metadata = displayMetadata.Metadata; - var getDefaultSetting = displayDOMUtils.getDefaultSetting; - var DEFAULT_RANGE_CHUNK_SIZE = 65536; - var isWorkerDisabled = false; - var workerSrc; - var isPostMessageTransfersDisabled = false; - var fakeWorkerFilesLoader = null; - var useRequireEnsure = false; - if (typeof window === 'undefined') { - isWorkerDisabled = true; - if (typeof require.ensure === 'undefined') { - require.ensure = require('node-ensure'); - } - useRequireEnsure = true; - } - if (typeof __webpack_require__ !== 'undefined') { - useRequireEnsure = true; - } - if (typeof requirejs !== 'undefined' && requirejs.toUrl) { - workerSrc = requirejs.toUrl('pdfjs-dist/build/pdf.worker.js'); - } - var dynamicLoaderSupported = typeof requirejs !== 'undefined' && requirejs.load; - fakeWorkerFilesLoader = useRequireEnsure ? function (callback) { - require.ensure([], function () { - var worker = require('./pdf.worker.js'); - callback(worker.WorkerMessageHandler); - }); - } : dynamicLoaderSupported ? function (callback) { - requirejs(['pdfjs-dist/build/pdf.worker'], function (worker) { - callback(worker.WorkerMessageHandler); - }); - } : null; - function getDocument(src, pdfDataRangeTransport, passwordCallback, progressCallback) { - var task = new PDFDocumentLoadingTask(); - if (arguments.length > 1) { - deprecated('getDocument is called with pdfDataRangeTransport, ' + 'passwordCallback or progressCallback argument'); - } - if (pdfDataRangeTransport) { - if (!(pdfDataRangeTransport instanceof PDFDataRangeTransport)) { - pdfDataRangeTransport = Object.create(pdfDataRangeTransport); - pdfDataRangeTransport.length = src.length; - pdfDataRangeTransport.initialData = src.initialData; - if (!pdfDataRangeTransport.abort) { - pdfDataRangeTransport.abort = function () { - }; - } - } - src = Object.create(src); - src.range = pdfDataRangeTransport; - } - task.onPassword = passwordCallback || null; - task.onProgress = progressCallback || null; - var source; - if (typeof src === 'string') { - source = { url: src }; - } else if (isArrayBuffer(src)) { - source = { data: src }; - } else if (src instanceof PDFDataRangeTransport) { - source = { range: src }; - } else { - if (typeof src !== 'object') { - error('Invalid parameter in getDocument, need either Uint8Array, ' + 'string or a parameter object'); - } - if (!src.url && !src.data && !src.range) { - error('Invalid parameter object: need either .data, .range or .url'); - } - source = src; - } - var params = {}; - var rangeTransport = null; - var worker = null; - for (var key in source) { - if (key === 'url' && typeof window !== 'undefined') { - params[key] = new URL(source[key], window.location).href; - continue; - } else if (key === 'range') { - rangeTransport = source[key]; - continue; - } else if (key === 'worker') { - worker = source[key]; - continue; - } else if (key === 'data' && !(source[key] instanceof Uint8Array)) { - var pdfBytes = source[key]; - if (typeof pdfBytes === 'string') { - params[key] = stringToBytes(pdfBytes); - } else if (typeof pdfBytes === 'object' && pdfBytes !== null && !isNaN(pdfBytes.length)) { - params[key] = new Uint8Array(pdfBytes); - } else if (isArrayBuffer(pdfBytes)) { - params[key] = new Uint8Array(pdfBytes); - } else { - error('Invalid PDF binary data: either typed array, string or ' + 'array-like object is expected in the data property.'); - } - continue; - } - params[key] = source[key]; - } - params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE; - if (!worker) { - worker = new PDFWorker(); - task._worker = worker; - } - var docId = task.docId; - worker.promise.then(function () { - if (task.destroyed) { - throw new Error('Loading aborted'); - } - return _fetchDocument(worker, params, rangeTransport, docId).then(function (workerId) { - if (task.destroyed) { - throw new Error('Loading aborted'); - } - var messageHandler = new MessageHandler(docId, workerId, worker.port); - var transport = new WorkerTransport(messageHandler, task, rangeTransport); - task._transport = transport; - messageHandler.send('Ready', null); - }); - }).catch(task._capability.reject); - return task; - } - function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { - if (worker.destroyed) { - return Promise.reject(new Error('Worker was destroyed')); - } - source.disableAutoFetch = getDefaultSetting('disableAutoFetch'); - source.disableStream = getDefaultSetting('disableStream'); - source.chunkedViewerLoading = !!pdfDataRangeTransport; - if (pdfDataRangeTransport) { - source.length = pdfDataRangeTransport.length; - source.initialData = pdfDataRangeTransport.initialData; - } - return worker.messageHandler.sendWithPromise('GetDocRequest', { - docId: docId, - source: source, - disableRange: getDefaultSetting('disableRange'), - maxImageSize: getDefaultSetting('maxImageSize'), - cMapUrl: getDefaultSetting('cMapUrl'), - cMapPacked: getDefaultSetting('cMapPacked'), - disableFontFace: getDefaultSetting('disableFontFace'), - disableCreateObjectURL: getDefaultSetting('disableCreateObjectURL'), - postMessageTransfers: getDefaultSetting('postMessageTransfers') && !isPostMessageTransfersDisabled, - docBaseUrl: source.docBaseUrl - }).then(function (workerId) { - if (worker.destroyed) { - throw new Error('Worker was destroyed'); - } - return workerId; - }); - } - var PDFDocumentLoadingTask = function PDFDocumentLoadingTaskClosure() { - var nextDocumentId = 0; - function PDFDocumentLoadingTask() { - this._capability = createPromiseCapability(); - this._transport = null; - this._worker = null; - this.docId = 'd' + nextDocumentId++; - this.destroyed = false; - this.onPassword = null; - this.onProgress = null; - this.onUnsupportedFeature = null; - } - PDFDocumentLoadingTask.prototype = { - get promise() { - return this._capability.promise; - }, - destroy: function () { - this.destroyed = true; - var transportDestroyed = !this._transport ? Promise.resolve() : this._transport.destroy(); - return transportDestroyed.then(function () { - this._transport = null; - if (this._worker) { - this._worker.destroy(); - this._worker = null; - } - }.bind(this)); - }, - then: function PDFDocumentLoadingTask_then(onFulfilled, onRejected) { - return this.promise.then.apply(this.promise, arguments); - } - }; - return PDFDocumentLoadingTask; - }(); - var PDFDataRangeTransport = function pdfDataRangeTransportClosure() { - function PDFDataRangeTransport(length, initialData) { - this.length = length; - this.initialData = initialData; - this._rangeListeners = []; - this._progressListeners = []; - this._progressiveReadListeners = []; - this._readyCapability = createPromiseCapability(); - } - PDFDataRangeTransport.prototype = { - addRangeListener: function PDFDataRangeTransport_addRangeListener(listener) { - this._rangeListeners.push(listener); - }, - addProgressListener: function PDFDataRangeTransport_addProgressListener(listener) { - this._progressListeners.push(listener); - }, - addProgressiveReadListener: function PDFDataRangeTransport_addProgressiveReadListener(listener) { - this._progressiveReadListeners.push(listener); - }, - onDataRange: function PDFDataRangeTransport_onDataRange(begin, chunk) { - var listeners = this._rangeListeners; - for (var i = 0, n = listeners.length; i < n; ++i) { - listeners[i](begin, chunk); - } - }, - onDataProgress: function PDFDataRangeTransport_onDataProgress(loaded) { - this._readyCapability.promise.then(function () { - var listeners = this._progressListeners; - for (var i = 0, n = listeners.length; i < n; ++i) { - listeners[i](loaded); - } - }.bind(this)); - }, - onDataProgressiveRead: function PDFDataRangeTransport_onDataProgress(chunk) { - this._readyCapability.promise.then(function () { - var listeners = this._progressiveReadListeners; - for (var i = 0, n = listeners.length; i < n; ++i) { - listeners[i](chunk); - } - }.bind(this)); - }, - transportReady: function PDFDataRangeTransport_transportReady() { - this._readyCapability.resolve(); - }, - requestDataRange: function PDFDataRangeTransport_requestDataRange(begin, end) { - throw new Error('Abstract method PDFDataRangeTransport.requestDataRange'); - }, - abort: function PDFDataRangeTransport_abort() { - } - }; - return PDFDataRangeTransport; - }(); - var PDFDocumentProxy = function PDFDocumentProxyClosure() { - function PDFDocumentProxy(pdfInfo, transport, loadingTask) { - this.pdfInfo = pdfInfo; - this.transport = transport; - this.loadingTask = loadingTask; - } - PDFDocumentProxy.prototype = { - get numPages() { - return this.pdfInfo.numPages; - }, - get fingerprint() { - return this.pdfInfo.fingerprint; - }, - getPage: function PDFDocumentProxy_getPage(pageNumber) { - return this.transport.getPage(pageNumber); - }, - getPageIndex: function PDFDocumentProxy_getPageIndex(ref) { - return this.transport.getPageIndex(ref); - }, - getDestinations: function PDFDocumentProxy_getDestinations() { - return this.transport.getDestinations(); - }, - getDestination: function PDFDocumentProxy_getDestination(id) { - return this.transport.getDestination(id); - }, - getPageLabels: function PDFDocumentProxy_getPageLabels() { - return this.transport.getPageLabels(); - }, - getAttachments: function PDFDocumentProxy_getAttachments() { - return this.transport.getAttachments(); - }, - getJavaScript: function PDFDocumentProxy_getJavaScript() { - return this.transport.getJavaScript(); - }, - getOutline: function PDFDocumentProxy_getOutline() { - return this.transport.getOutline(); - }, - getMetadata: function PDFDocumentProxy_getMetadata() { - return this.transport.getMetadata(); - }, - getData: function PDFDocumentProxy_getData() { - return this.transport.getData(); - }, - getDownloadInfo: function PDFDocumentProxy_getDownloadInfo() { - return this.transport.downloadInfoCapability.promise; - }, - getStats: function PDFDocumentProxy_getStats() { - return this.transport.getStats(); - }, - cleanup: function PDFDocumentProxy_cleanup() { - this.transport.startCleanup(); - }, - destroy: function PDFDocumentProxy_destroy() { - return this.loadingTask.destroy(); - } - }; - return PDFDocumentProxy; - }(); - var PDFPageProxy = function PDFPageProxyClosure() { - function PDFPageProxy(pageIndex, pageInfo, transport) { - this.pageIndex = pageIndex; - this.pageInfo = pageInfo; - this.transport = transport; - this.stats = new StatTimer(); - this.stats.enabled = getDefaultSetting('enableStats'); - this.commonObjs = transport.commonObjs; - this.objs = new PDFObjects(); - this.cleanupAfterRender = false; - this.pendingCleanup = false; - this.intentStates = Object.create(null); - this.destroyed = false; - } - PDFPageProxy.prototype = { - get pageNumber() { - return this.pageIndex + 1; - }, - get rotate() { - return this.pageInfo.rotate; - }, - get ref() { - return this.pageInfo.ref; - }, - get userUnit() { - return this.pageInfo.userUnit; - }, - get view() { - return this.pageInfo.view; - }, - getViewport: function PDFPageProxy_getViewport(scale, rotate) { - if (arguments.length < 2) { - rotate = this.rotate; - } - return new PageViewport(this.view, scale, rotate, 0, 0); - }, - getAnnotations: function PDFPageProxy_getAnnotations(params) { - var intent = params && params.intent || null; - if (!this.annotationsPromise || this.annotationsIntent !== intent) { - this.annotationsPromise = this.transport.getAnnotations(this.pageIndex, intent); - this.annotationsIntent = intent; - } - return this.annotationsPromise; - }, - render: function PDFPageProxy_render(params) { - var stats = this.stats; - stats.time('Overall'); - this.pendingCleanup = false; - var renderingIntent = params.intent === 'print' ? 'print' : 'display'; - var renderInteractiveForms = params.renderInteractiveForms === true ? true : false; - if (!this.intentStates[renderingIntent]) { - this.intentStates[renderingIntent] = Object.create(null); - } - var intentState = this.intentStates[renderingIntent]; - if (!intentState.displayReadyCapability) { - intentState.receivingOperatorList = true; - intentState.displayReadyCapability = createPromiseCapability(); - intentState.operatorList = { - fnArray: [], - argsArray: [], - lastChunk: false - }; - this.stats.time('Page Request'); - this.transport.messageHandler.send('RenderPageRequest', { - pageIndex: this.pageNumber - 1, - intent: renderingIntent, - renderInteractiveForms: renderInteractiveForms - }); - } - var internalRenderTask = new InternalRenderTask(complete, params, this.objs, this.commonObjs, intentState.operatorList, this.pageNumber); - internalRenderTask.useRequestAnimationFrame = renderingIntent !== 'print'; - if (!intentState.renderTasks) { - intentState.renderTasks = []; - } - intentState.renderTasks.push(internalRenderTask); - var renderTask = internalRenderTask.task; - if (params.continueCallback) { - deprecated('render is used with continueCallback parameter'); - renderTask.onContinue = params.continueCallback; - } - var self = this; - intentState.displayReadyCapability.promise.then(function pageDisplayReadyPromise(transparency) { - if (self.pendingCleanup) { - complete(); - return; - } - stats.time('Rendering'); - internalRenderTask.initializeGraphics(transparency); - internalRenderTask.operatorListChanged(); - }, function pageDisplayReadPromiseError(reason) { - complete(reason); - }); - function complete(error) { - var i = intentState.renderTasks.indexOf(internalRenderTask); - if (i >= 0) { - intentState.renderTasks.splice(i, 1); - } - if (self.cleanupAfterRender) { - self.pendingCleanup = true; - } - self._tryCleanup(); - if (error) { - internalRenderTask.capability.reject(error); - } else { - internalRenderTask.capability.resolve(); - } - stats.timeEnd('Rendering'); - stats.timeEnd('Overall'); - } - return renderTask; - }, - getOperatorList: function PDFPageProxy_getOperatorList() { - function operatorListChanged() { - if (intentState.operatorList.lastChunk) { - intentState.opListReadCapability.resolve(intentState.operatorList); - var i = intentState.renderTasks.indexOf(opListTask); - if (i >= 0) { - intentState.renderTasks.splice(i, 1); - } - } - } - var renderingIntent = 'oplist'; - if (!this.intentStates[renderingIntent]) { - this.intentStates[renderingIntent] = Object.create(null); - } - var intentState = this.intentStates[renderingIntent]; - var opListTask; - if (!intentState.opListReadCapability) { - opListTask = {}; - opListTask.operatorListChanged = operatorListChanged; - intentState.receivingOperatorList = true; - intentState.opListReadCapability = createPromiseCapability(); - intentState.renderTasks = []; - intentState.renderTasks.push(opListTask); - intentState.operatorList = { - fnArray: [], - argsArray: [], - lastChunk: false - }; - this.transport.messageHandler.send('RenderPageRequest', { - pageIndex: this.pageIndex, - intent: renderingIntent - }); - } - return intentState.opListReadCapability.promise; - }, - getTextContent: function PDFPageProxy_getTextContent(params) { - return this.transport.messageHandler.sendWithPromise('GetTextContent', { - pageIndex: this.pageNumber - 1, - normalizeWhitespace: params && params.normalizeWhitespace === true ? true : false, - combineTextItems: params && params.disableCombineTextItems === true ? false : true - }); - }, - _destroy: function PDFPageProxy_destroy() { - this.destroyed = true; - this.transport.pageCache[this.pageIndex] = null; - var waitOn = []; - Object.keys(this.intentStates).forEach(function (intent) { - if (intent === 'oplist') { - return; - } - var intentState = this.intentStates[intent]; - intentState.renderTasks.forEach(function (renderTask) { - var renderCompleted = renderTask.capability.promise.catch(function () { - }); - waitOn.push(renderCompleted); - renderTask.cancel(); - }); - }, this); - this.objs.clear(); - this.annotationsPromise = null; - this.pendingCleanup = false; - return Promise.all(waitOn); - }, - destroy: function () { - deprecated('page destroy method, use cleanup() instead'); - this.cleanup(); - }, - cleanup: function PDFPageProxy_cleanup() { - this.pendingCleanup = true; - this._tryCleanup(); - }, - _tryCleanup: function PDFPageProxy_tryCleanup() { - if (!this.pendingCleanup || Object.keys(this.intentStates).some(function (intent) { - var intentState = this.intentStates[intent]; - return intentState.renderTasks.length !== 0 || intentState.receivingOperatorList; - }, this)) { - return; - } - Object.keys(this.intentStates).forEach(function (intent) { - delete this.intentStates[intent]; - }, this); - this.objs.clear(); - this.annotationsPromise = null; - this.pendingCleanup = false; - }, - _startRenderPage: function PDFPageProxy_startRenderPage(transparency, intent) { - var intentState = this.intentStates[intent]; - if (intentState.displayReadyCapability) { - intentState.displayReadyCapability.resolve(transparency); - } - }, - _renderPageChunk: function PDFPageProxy_renderPageChunk(operatorListChunk, intent) { - var intentState = this.intentStates[intent]; - var i, ii; - for (i = 0, ii = operatorListChunk.length; i < ii; i++) { - intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]); - intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]); - } - intentState.operatorList.lastChunk = operatorListChunk.lastChunk; - for (i = 0; i < intentState.renderTasks.length; i++) { - intentState.renderTasks[i].operatorListChanged(); - } - if (operatorListChunk.lastChunk) { - intentState.receivingOperatorList = false; - this._tryCleanup(); - } - } - }; - return PDFPageProxy; - }(); - var PDFWorker = function PDFWorkerClosure() { - var nextFakeWorkerId = 0; - function getWorkerSrc() { - if (typeof workerSrc !== 'undefined') { - return workerSrc; - } - if (getDefaultSetting('workerSrc')) { - return getDefaultSetting('workerSrc'); - } - if (pdfjsFilePath) { - return pdfjsFilePath.replace(/\.js$/i, '.worker.js'); - } - error('No PDFJS.workerSrc specified'); - } - var fakeWorkerFilesLoadedCapability; - function setupFakeWorkerGlobal() { - var WorkerMessageHandler; - if (fakeWorkerFilesLoadedCapability) { - return fakeWorkerFilesLoadedCapability.promise; - } - fakeWorkerFilesLoadedCapability = createPromiseCapability(); - var loader = fakeWorkerFilesLoader || function (callback) { - Util.loadScript(getWorkerSrc(), function () { - callback(window.pdfjsDistBuildPdfWorker.WorkerMessageHandler); - }); - }; - loader(fakeWorkerFilesLoadedCapability.resolve); - return fakeWorkerFilesLoadedCapability.promise; - } - function FakeWorkerPort(defer) { - this._listeners = []; - this._defer = defer; - this._deferred = Promise.resolve(undefined); - } - FakeWorkerPort.prototype = { - postMessage: function (obj, transfers) { - function cloneValue(value) { - if (typeof value !== 'object' || value === null) { - return value; - } - if (cloned.has(value)) { - return cloned.get(value); - } - var result; - var buffer; - if ((buffer = value.buffer) && isArrayBuffer(buffer)) { - var transferable = transfers && transfers.indexOf(buffer) >= 0; - if (value === buffer) { - result = value; - } else if (transferable) { - result = new value.constructor(buffer, value.byteOffset, value.byteLength); - } else { - result = new value.constructor(value); - } - cloned.set(value, result); - return result; - } - result = isArray(value) ? [] : {}; - cloned.set(value, result); - for (var i in value) { - var desc, p = value; - while (!(desc = Object.getOwnPropertyDescriptor(p, i))) { - p = Object.getPrototypeOf(p); - } - if (typeof desc.value === 'undefined' || typeof desc.value === 'function') { - continue; - } - result[i] = cloneValue(desc.value); - } - return result; - } - if (!this._defer) { - this._listeners.forEach(function (listener) { - listener.call(this, { data: obj }); - }, this); - return; - } - var cloned = new WeakMap(); - var e = { data: cloneValue(obj) }; - this._deferred.then(function () { - this._listeners.forEach(function (listener) { - listener.call(this, e); - }, this); - }.bind(this)); - }, - addEventListener: function (name, listener) { - this._listeners.push(listener); - }, - removeEventListener: function (name, listener) { - var i = this._listeners.indexOf(listener); - this._listeners.splice(i, 1); - }, - terminate: function () { - this._listeners = []; - } - }; - function createCDNWrapper(url) { - var wrapper = 'importScripts(\'' + url + '\');'; - return URL.createObjectURL(new Blob([wrapper])); - } - function PDFWorker(name) { - this.name = name; - this.destroyed = false; - this._readyCapability = createPromiseCapability(); - this._port = null; - this._webWorker = null; - this._messageHandler = null; - this._initialize(); - } - PDFWorker.prototype = { - get promise() { - return this._readyCapability.promise; - }, - get port() { - return this._port; - }, - get messageHandler() { - return this._messageHandler; - }, - _initialize: function PDFWorker_initialize() { - if (!isWorkerDisabled && !getDefaultSetting('disableWorker') && typeof Worker !== 'undefined') { - var workerSrc = getWorkerSrc(); - try { - if (!isSameOrigin(window.location.href, workerSrc)) { - workerSrc = createCDNWrapper(new URL(workerSrc, window.location).href); - } - var worker = new Worker(workerSrc); - var messageHandler = new MessageHandler('main', 'worker', worker); - var terminateEarly = function () { - worker.removeEventListener('error', onWorkerError); - messageHandler.destroy(); - worker.terminate(); - if (this.destroyed) { - this._readyCapability.reject(new Error('Worker was destroyed')); - } else { - this._setupFakeWorker(); - } - }.bind(this); - var onWorkerError = function (event) { - if (!this._webWorker) { - terminateEarly(); - } - }.bind(this); - worker.addEventListener('error', onWorkerError); - messageHandler.on('test', function PDFWorker_test(data) { - worker.removeEventListener('error', onWorkerError); - if (this.destroyed) { - terminateEarly(); - return; - } - var supportTypedArray = data && data.supportTypedArray; - if (supportTypedArray) { - this._messageHandler = messageHandler; - this._port = worker; - this._webWorker = worker; - if (!data.supportTransfers) { - isPostMessageTransfersDisabled = true; - } - this._readyCapability.resolve(); - messageHandler.send('configure', { verbosity: getVerbosityLevel() }); - } else { - this._setupFakeWorker(); - messageHandler.destroy(); - worker.terminate(); - } - }.bind(this)); - messageHandler.on('console_log', function (data) { - console.log.apply(console, data); - }); - messageHandler.on('console_error', function (data) { - console.error.apply(console, data); - }); - messageHandler.on('ready', function (data) { - worker.removeEventListener('error', onWorkerError); - if (this.destroyed) { - terminateEarly(); - return; - } - try { - sendTest(); - } catch (e) { - this._setupFakeWorker(); - } - }.bind(this)); - var sendTest = function () { - var postMessageTransfers = getDefaultSetting('postMessageTransfers') && !isPostMessageTransfersDisabled; - var testObj = new Uint8Array([postMessageTransfers ? 255 : 0]); - try { - messageHandler.send('test', testObj, [testObj.buffer]); - } catch (ex) { - info('Cannot use postMessage transfers'); - testObj[0] = 0; - messageHandler.send('test', testObj); - } - }; - sendTest(); - return; - } catch (e) { - info('The worker has been disabled.'); - } - } - this._setupFakeWorker(); - }, - _setupFakeWorker: function PDFWorker_setupFakeWorker() { - if (!isWorkerDisabled && !getDefaultSetting('disableWorker')) { - warn('Setting up fake worker.'); - isWorkerDisabled = true; - } - setupFakeWorkerGlobal().then(function (WorkerMessageHandler) { - if (this.destroyed) { - this._readyCapability.reject(new Error('Worker was destroyed')); - return; - } - var isTypedArraysPresent = Uint8Array !== Float32Array; - var port = new FakeWorkerPort(isTypedArraysPresent); - this._port = port; - var id = 'fake' + nextFakeWorkerId++; - var workerHandler = new MessageHandler(id + '_worker', id, port); - WorkerMessageHandler.setup(workerHandler, port); - var messageHandler = new MessageHandler(id, id + '_worker', port); - this._messageHandler = messageHandler; - this._readyCapability.resolve(); - }.bind(this)); - }, - destroy: function PDFWorker_destroy() { - this.destroyed = true; - if (this._webWorker) { - this._webWorker.terminate(); - this._webWorker = null; - } - this._port = null; - if (this._messageHandler) { - this._messageHandler.destroy(); - this._messageHandler = null; - } - } - }; - return PDFWorker; - }(); - var WorkerTransport = function WorkerTransportClosure() { - function WorkerTransport(messageHandler, loadingTask, pdfDataRangeTransport) { - this.messageHandler = messageHandler; - this.loadingTask = loadingTask; - this.pdfDataRangeTransport = pdfDataRangeTransport; - this.commonObjs = new PDFObjects(); - this.fontLoader = new FontLoader(loadingTask.docId); - this.destroyed = false; - this.destroyCapability = null; - this._passwordCapability = null; - this.pageCache = []; - this.pagePromises = []; - this.downloadInfoCapability = createPromiseCapability(); - this.setupMessageHandler(); - } - WorkerTransport.prototype = { - destroy: function WorkerTransport_destroy() { - if (this.destroyCapability) { - return this.destroyCapability.promise; - } - this.destroyed = true; - this.destroyCapability = createPromiseCapability(); - if (this._passwordCapability) { - this._passwordCapability.reject(new Error('Worker was destroyed during onPassword callback')); - } - var waitOn = []; - this.pageCache.forEach(function (page) { - if (page) { - waitOn.push(page._destroy()); - } - }); - this.pageCache = []; - this.pagePromises = []; - var self = this; - var terminated = this.messageHandler.sendWithPromise('Terminate', null); - waitOn.push(terminated); - Promise.all(waitOn).then(function () { - self.fontLoader.clear(); - if (self.pdfDataRangeTransport) { - self.pdfDataRangeTransport.abort(); - self.pdfDataRangeTransport = null; - } - if (self.messageHandler) { - self.messageHandler.destroy(); - self.messageHandler = null; - } - self.destroyCapability.resolve(); - }, this.destroyCapability.reject); - return this.destroyCapability.promise; - }, - setupMessageHandler: function WorkerTransport_setupMessageHandler() { - var messageHandler = this.messageHandler; - var loadingTask = this.loadingTask; - var pdfDataRangeTransport = this.pdfDataRangeTransport; - if (pdfDataRangeTransport) { - pdfDataRangeTransport.addRangeListener(function (begin, chunk) { - messageHandler.send('OnDataRange', { - begin: begin, - chunk: chunk - }); - }); - pdfDataRangeTransport.addProgressListener(function (loaded) { - messageHandler.send('OnDataProgress', { loaded: loaded }); - }); - pdfDataRangeTransport.addProgressiveReadListener(function (chunk) { - messageHandler.send('OnDataRange', { chunk: chunk }); - }); - messageHandler.on('RequestDataRange', function transportDataRange(data) { - pdfDataRangeTransport.requestDataRange(data.begin, data.end); - }, this); - } - messageHandler.on('GetDoc', function transportDoc(data) { - var pdfInfo = data.pdfInfo; - this.numPages = data.pdfInfo.numPages; - var loadingTask = this.loadingTask; - var pdfDocument = new PDFDocumentProxy(pdfInfo, this, loadingTask); - this.pdfDocument = pdfDocument; - loadingTask._capability.resolve(pdfDocument); - }, this); - messageHandler.on('PasswordRequest', function transportPasswordRequest(exception) { - this._passwordCapability = createPromiseCapability(); - if (loadingTask.onPassword) { - var updatePassword = function (password) { - this._passwordCapability.resolve({ password: password }); - }.bind(this); - loadingTask.onPassword(updatePassword, exception.code); - } else { - this._passwordCapability.reject(new PasswordException(exception.message, exception.code)); - } - return this._passwordCapability.promise; - }, this); - messageHandler.on('PasswordException', function transportPasswordException(exception) { - loadingTask._capability.reject(new PasswordException(exception.message, exception.code)); - }, this); - messageHandler.on('InvalidPDF', function transportInvalidPDF(exception) { - this.loadingTask._capability.reject(new InvalidPDFException(exception.message)); - }, this); - messageHandler.on('MissingPDF', function transportMissingPDF(exception) { - this.loadingTask._capability.reject(new MissingPDFException(exception.message)); - }, this); - messageHandler.on('UnexpectedResponse', function transportUnexpectedResponse(exception) { - this.loadingTask._capability.reject(new UnexpectedResponseException(exception.message, exception.status)); - }, this); - messageHandler.on('UnknownError', function transportUnknownError(exception) { - this.loadingTask._capability.reject(new UnknownErrorException(exception.message, exception.details)); - }, this); - messageHandler.on('DataLoaded', function transportPage(data) { - this.downloadInfoCapability.resolve(data); - }, this); - messageHandler.on('PDFManagerReady', function transportPage(data) { - if (this.pdfDataRangeTransport) { - this.pdfDataRangeTransport.transportReady(); - } - }, this); - messageHandler.on('StartRenderPage', function transportRender(data) { - if (this.destroyed) { - return; - } - var page = this.pageCache[data.pageIndex]; - page.stats.timeEnd('Page Request'); - page._startRenderPage(data.transparency, data.intent); - }, this); - messageHandler.on('RenderPageChunk', function transportRender(data) { - if (this.destroyed) { - return; - } - var page = this.pageCache[data.pageIndex]; - page._renderPageChunk(data.operatorList, data.intent); - }, this); - messageHandler.on('commonobj', function transportObj(data) { - if (this.destroyed) { - return; - } - var id = data[0]; - var type = data[1]; - if (this.commonObjs.hasData(id)) { - return; - } - switch (type) { - case 'Font': - var exportedData = data[2]; - if ('error' in exportedData) { - var exportedError = exportedData.error; - warn('Error during font loading: ' + exportedError); - this.commonObjs.resolve(id, exportedError); - break; - } - var fontRegistry = null; - if (getDefaultSetting('pdfBug') && globalScope.FontInspector && globalScope['FontInspector'].enabled) { - fontRegistry = { - registerFont: function (font, url) { - globalScope['FontInspector'].fontAdded(font, url); - } - }; - } - var font = new FontFaceObject(exportedData, { - isEvalSuported: getDefaultSetting('isEvalSupported'), - disableFontFace: getDefaultSetting('disableFontFace'), - fontRegistry: fontRegistry - }); - this.fontLoader.bind([font], function fontReady(fontObjs) { - this.commonObjs.resolve(id, font); - }.bind(this)); - break; - case 'FontPath': - this.commonObjs.resolve(id, data[2]); - break; - default: - error('Got unknown common object type ' + type); - } - }, this); - messageHandler.on('obj', function transportObj(data) { - if (this.destroyed) { - return; - } - var id = data[0]; - var pageIndex = data[1]; - var type = data[2]; - var pageProxy = this.pageCache[pageIndex]; - var imageData; - if (pageProxy.objs.hasData(id)) { - return; - } - switch (type) { - case 'JpegStream': - imageData = data[3]; - loadJpegStream(id, imageData, pageProxy.objs); - break; - case 'Image': - imageData = data[3]; - pageProxy.objs.resolve(id, imageData); - var MAX_IMAGE_SIZE_TO_STORE = 8000000; - if (imageData && 'data' in imageData && imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) { - pageProxy.cleanupAfterRender = true; - } - break; - default: - error('Got unknown object type ' + type); - } - }, this); - messageHandler.on('DocProgress', function transportDocProgress(data) { - if (this.destroyed) { - return; - } - var loadingTask = this.loadingTask; - if (loadingTask.onProgress) { - loadingTask.onProgress({ - loaded: data.loaded, - total: data.total - }); - } - }, this); - messageHandler.on('PageError', function transportError(data) { - if (this.destroyed) { - return; - } - var page = this.pageCache[data.pageNum - 1]; - var intentState = page.intentStates[data.intent]; - if (intentState.displayReadyCapability) { - intentState.displayReadyCapability.reject(data.error); - } else { - error(data.error); - } - if (intentState.operatorList) { - intentState.operatorList.lastChunk = true; - for (var i = 0; i < intentState.renderTasks.length; i++) { - intentState.renderTasks[i].operatorListChanged(); - } - } - }, this); - messageHandler.on('UnsupportedFeature', function transportUnsupportedFeature(data) { - if (this.destroyed) { - return; - } - var featureId = data.featureId; - var loadingTask = this.loadingTask; - if (loadingTask.onUnsupportedFeature) { - loadingTask.onUnsupportedFeature(featureId); - } - _UnsupportedManager.notify(featureId); - }, this); - messageHandler.on('JpegDecode', function (data) { - if (this.destroyed) { - return Promise.reject(new Error('Worker was destroyed')); - } - var imageUrl = data[0]; - var components = data[1]; - if (components !== 3 && components !== 1) { - return Promise.reject(new Error('Only 3 components or 1 component can be returned')); - } - return new Promise(function (resolve, reject) { - var img = new Image(); - img.onload = function () { - var width = img.width; - var height = img.height; - var size = width * height; - var rgbaLength = size * 4; - var buf = new Uint8Array(size * components); - var tmpCanvas = createScratchCanvas(width, height); - var tmpCtx = tmpCanvas.getContext('2d'); - tmpCtx.drawImage(img, 0, 0); - var data = tmpCtx.getImageData(0, 0, width, height).data; - var i, j; - if (components === 3) { - for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) { - buf[j] = data[i]; - buf[j + 1] = data[i + 1]; - buf[j + 2] = data[i + 2]; - } - } else if (components === 1) { - for (i = 0, j = 0; i < rgbaLength; i += 4, j++) { - buf[j] = data[i]; - } - } - resolve({ - data: buf, - width: width, - height: height - }); - }; - img.onerror = function () { - reject(new Error('JpegDecode failed to load image')); - }; - img.src = imageUrl; - }); - }, this); - }, - getData: function WorkerTransport_getData() { - return this.messageHandler.sendWithPromise('GetData', null); - }, - getPage: function WorkerTransport_getPage(pageNumber, capability) { - if (!isInt(pageNumber) || pageNumber <= 0 || pageNumber > this.numPages) { - return Promise.reject(new Error('Invalid page request')); - } - var pageIndex = pageNumber - 1; - if (pageIndex in this.pagePromises) { - return this.pagePromises[pageIndex]; - } - var promise = this.messageHandler.sendWithPromise('GetPage', { pageIndex: pageIndex }).then(function (pageInfo) { - if (this.destroyed) { - throw new Error('Transport destroyed'); - } - var page = new PDFPageProxy(pageIndex, pageInfo, this); - this.pageCache[pageIndex] = page; - return page; - }.bind(this)); - this.pagePromises[pageIndex] = promise; - return promise; - }, - getPageIndex: function WorkerTransport_getPageIndexByRef(ref) { - return this.messageHandler.sendWithPromise('GetPageIndex', { ref: ref }).catch(function (reason) { - return Promise.reject(new Error(reason)); - }); - }, - getAnnotations: function WorkerTransport_getAnnotations(pageIndex, intent) { - return this.messageHandler.sendWithPromise('GetAnnotations', { - pageIndex: pageIndex, - intent: intent - }); - }, - getDestinations: function WorkerTransport_getDestinations() { - return this.messageHandler.sendWithPromise('GetDestinations', null); - }, - getDestination: function WorkerTransport_getDestination(id) { - return this.messageHandler.sendWithPromise('GetDestination', { id: id }); - }, - getPageLabels: function WorkerTransport_getPageLabels() { - return this.messageHandler.sendWithPromise('GetPageLabels', null); - }, - getAttachments: function WorkerTransport_getAttachments() { - return this.messageHandler.sendWithPromise('GetAttachments', null); - }, - getJavaScript: function WorkerTransport_getJavaScript() { - return this.messageHandler.sendWithPromise('GetJavaScript', null); - }, - getOutline: function WorkerTransport_getOutline() { - return this.messageHandler.sendWithPromise('GetOutline', null); - }, - getMetadata: function WorkerTransport_getMetadata() { - return this.messageHandler.sendWithPromise('GetMetadata', null).then(function transportMetadata(results) { - return { - info: results[0], - metadata: results[1] ? new Metadata(results[1]) : null - }; - }); - }, - getStats: function WorkerTransport_getStats() { - return this.messageHandler.sendWithPromise('GetStats', null); - }, - startCleanup: function WorkerTransport_startCleanup() { - this.messageHandler.sendWithPromise('Cleanup', null).then(function endCleanup() { - for (var i = 0, ii = this.pageCache.length; i < ii; i++) { - var page = this.pageCache[i]; - if (page) { - page.cleanup(); - } - } - this.commonObjs.clear(); - this.fontLoader.clear(); - }.bind(this)); - } - }; - return WorkerTransport; - }(); - var PDFObjects = function PDFObjectsClosure() { - function PDFObjects() { - this.objs = Object.create(null); - } - PDFObjects.prototype = { - ensureObj: function PDFObjects_ensureObj(objId) { - if (this.objs[objId]) { - return this.objs[objId]; - } - var obj = { - capability: createPromiseCapability(), - data: null, - resolved: false - }; - this.objs[objId] = obj; - return obj; - }, - get: function PDFObjects_get(objId, callback) { - if (callback) { - this.ensureObj(objId).capability.promise.then(callback); - return null; - } - var obj = this.objs[objId]; - if (!obj || !obj.resolved) { - error('Requesting object that isn\'t resolved yet ' + objId); - } - return obj.data; - }, - resolve: function PDFObjects_resolve(objId, data) { - var obj = this.ensureObj(objId); - obj.resolved = true; - obj.data = data; - obj.capability.resolve(data); - }, - isResolved: function PDFObjects_isResolved(objId) { - var objs = this.objs; - if (!objs[objId]) { - return false; - } - return objs[objId].resolved; - }, - hasData: function PDFObjects_hasData(objId) { - return this.isResolved(objId); - }, - getData: function PDFObjects_getData(objId) { - var objs = this.objs; - if (!objs[objId] || !objs[objId].resolved) { - return null; - } - return objs[objId].data; - }, - clear: function PDFObjects_clear() { - this.objs = Object.create(null); - } - }; - return PDFObjects; - }(); - var RenderTask = function RenderTaskClosure() { - function RenderTask(internalRenderTask) { - this._internalRenderTask = internalRenderTask; - this.onContinue = null; - } - RenderTask.prototype = { - get promise() { - return this._internalRenderTask.capability.promise; - }, - cancel: function RenderTask_cancel() { - this._internalRenderTask.cancel(); - }, - then: function RenderTask_then(onFulfilled, onRejected) { - return this.promise.then.apply(this.promise, arguments); - } - }; - return RenderTask; - }(); - var InternalRenderTask = function InternalRenderTaskClosure() { - function InternalRenderTask(callback, params, objs, commonObjs, operatorList, pageNumber) { - this.callback = callback; - this.params = params; - this.objs = objs; - this.commonObjs = commonObjs; - this.operatorListIdx = null; - this.operatorList = operatorList; - this.pageNumber = pageNumber; - this.running = false; - this.graphicsReadyCallback = null; - this.graphicsReady = false; - this.useRequestAnimationFrame = false; - this.cancelled = false; - this.capability = createPromiseCapability(); - this.task = new RenderTask(this); - this._continueBound = this._continue.bind(this); - this._scheduleNextBound = this._scheduleNext.bind(this); - this._nextBound = this._next.bind(this); - } - InternalRenderTask.prototype = { - initializeGraphics: function InternalRenderTask_initializeGraphics(transparency) { - if (this.cancelled) { - return; - } - if (getDefaultSetting('pdfBug') && globalScope.StepperManager && globalScope.StepperManager.enabled) { - this.stepper = globalScope.StepperManager.create(this.pageNumber - 1); - this.stepper.init(this.operatorList); - this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint(); - } - var params = this.params; - this.gfx = new CanvasGraphics(params.canvasContext, this.commonObjs, this.objs, params.imageLayer); - this.gfx.beginDrawing(params.transform, params.viewport, transparency); - this.operatorListIdx = 0; - this.graphicsReady = true; - if (this.graphicsReadyCallback) { - this.graphicsReadyCallback(); - } - }, - cancel: function InternalRenderTask_cancel() { - this.running = false; - this.cancelled = true; - this.callback('cancelled'); - }, - operatorListChanged: function InternalRenderTask_operatorListChanged() { - if (!this.graphicsReady) { - if (!this.graphicsReadyCallback) { - this.graphicsReadyCallback = this._continueBound; - } - return; - } - if (this.stepper) { - this.stepper.updateOperatorList(this.operatorList); - } - if (this.running) { - return; - } - this._continue(); - }, - _continue: function InternalRenderTask__continue() { - this.running = true; - if (this.cancelled) { - return; - } - if (this.task.onContinue) { - this.task.onContinue(this._scheduleNextBound); - } else { - this._scheduleNext(); - } - }, - _scheduleNext: function InternalRenderTask__scheduleNext() { - if (this.useRequestAnimationFrame && typeof window !== 'undefined') { - window.requestAnimationFrame(this._nextBound); - } else { - Promise.resolve(undefined).then(this._nextBound); - } - }, - _next: function InternalRenderTask__next() { - if (this.cancelled) { - return; - } - this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper); - if (this.operatorListIdx === this.operatorList.argsArray.length) { - this.running = false; - if (this.operatorList.lastChunk) { - this.gfx.endDrawing(); - this.callback(); - } - } - } - }; - return InternalRenderTask; - }(); - var _UnsupportedManager = function UnsupportedManagerClosure() { - var listeners = []; - return { - listen: function (cb) { - deprecated('Global UnsupportedManager.listen is used: ' + ' use PDFDocumentLoadingTask.onUnsupportedFeature instead'); - listeners.push(cb); - }, - notify: function (featureId) { - for (var i = 0, ii = listeners.length; i < ii; i++) { - listeners[i](featureId); - } - } - }; - }(); - if (typeof pdfjsVersion !== 'undefined') { - exports.version = pdfjsVersion; - } - if (typeof pdfjsBuild !== 'undefined') { - exports.build = pdfjsBuild; - } - exports.getDocument = getDocument; - exports.PDFDataRangeTransport = PDFDataRangeTransport; - exports.PDFWorker = PDFWorker; - exports.PDFDocumentProxy = PDFDocumentProxy; - exports.PDFPageProxy = PDFPageProxy; - exports._UnsupportedManager = _UnsupportedManager; - })); - (function (root, factory) { - factory(root.pdfjsDisplayGlobal = {}, root.pdfjsSharedUtil, root.pdfjsDisplayDOMUtils, root.pdfjsDisplayAPI, root.pdfjsDisplayAnnotationLayer, root.pdfjsDisplayTextLayer, root.pdfjsDisplayMetadata, root.pdfjsDisplaySVG); - }(this, function (exports, sharedUtil, displayDOMUtils, displayAPI, displayAnnotationLayer, displayTextLayer, displayMetadata, displaySVG) { - var globalScope = sharedUtil.globalScope; - var deprecated = sharedUtil.deprecated; - var warn = sharedUtil.warn; - var LinkTarget = displayDOMUtils.LinkTarget; - var DEFAULT_LINK_REL = displayDOMUtils.DEFAULT_LINK_REL; - var isWorker = typeof window === 'undefined'; - if (!globalScope.PDFJS) { - globalScope.PDFJS = {}; - } - var PDFJS = globalScope.PDFJS; - if (typeof pdfjsVersion !== 'undefined') { - PDFJS.version = pdfjsVersion; - } - if (typeof pdfjsBuild !== 'undefined') { - PDFJS.build = pdfjsBuild; - } - PDFJS.pdfBug = false; - if (PDFJS.verbosity !== undefined) { - sharedUtil.setVerbosityLevel(PDFJS.verbosity); - } - delete PDFJS.verbosity; - Object.defineProperty(PDFJS, 'verbosity', { - get: function () { - return sharedUtil.getVerbosityLevel(); - }, - set: function (level) { - sharedUtil.setVerbosityLevel(level); - }, - enumerable: true, - configurable: true - }); - PDFJS.VERBOSITY_LEVELS = sharedUtil.VERBOSITY_LEVELS; - PDFJS.OPS = sharedUtil.OPS; - PDFJS.UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES; - PDFJS.isValidUrl = displayDOMUtils.isValidUrl; - PDFJS.shadow = sharedUtil.shadow; - PDFJS.createBlob = sharedUtil.createBlob; - PDFJS.createObjectURL = function PDFJS_createObjectURL(data, contentType) { - return sharedUtil.createObjectURL(data, contentType, PDFJS.disableCreateObjectURL); - }; - Object.defineProperty(PDFJS, 'isLittleEndian', { - configurable: true, - get: function PDFJS_isLittleEndian() { - var value = sharedUtil.isLittleEndian(); - return sharedUtil.shadow(PDFJS, 'isLittleEndian', value); - } - }); - PDFJS.removeNullCharacters = sharedUtil.removeNullCharacters; - PDFJS.PasswordResponses = sharedUtil.PasswordResponses; - PDFJS.PasswordException = sharedUtil.PasswordException; - PDFJS.UnknownErrorException = sharedUtil.UnknownErrorException; - PDFJS.InvalidPDFException = sharedUtil.InvalidPDFException; - PDFJS.MissingPDFException = sharedUtil.MissingPDFException; - PDFJS.UnexpectedResponseException = sharedUtil.UnexpectedResponseException; - PDFJS.Util = sharedUtil.Util; - PDFJS.PageViewport = sharedUtil.PageViewport; - PDFJS.createPromiseCapability = sharedUtil.createPromiseCapability; - PDFJS.maxImageSize = PDFJS.maxImageSize === undefined ? -1 : PDFJS.maxImageSize; - PDFJS.cMapUrl = PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl; - PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked; - PDFJS.disableFontFace = PDFJS.disableFontFace === undefined ? false : PDFJS.disableFontFace; - PDFJS.imageResourcesPath = PDFJS.imageResourcesPath === undefined ? '' : PDFJS.imageResourcesPath; - PDFJS.disableWorker = PDFJS.disableWorker === undefined ? false : PDFJS.disableWorker; - PDFJS.workerSrc = PDFJS.workerSrc === undefined ? null : PDFJS.workerSrc; - PDFJS.disableRange = PDFJS.disableRange === undefined ? false : PDFJS.disableRange; - PDFJS.disableStream = PDFJS.disableStream === undefined ? false : PDFJS.disableStream; - PDFJS.disableAutoFetch = PDFJS.disableAutoFetch === undefined ? false : PDFJS.disableAutoFetch; - PDFJS.pdfBug = PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug; - PDFJS.postMessageTransfers = PDFJS.postMessageTransfers === undefined ? true : PDFJS.postMessageTransfers; - PDFJS.disableCreateObjectURL = PDFJS.disableCreateObjectURL === undefined ? false : PDFJS.disableCreateObjectURL; - PDFJS.disableWebGL = PDFJS.disableWebGL === undefined ? true : PDFJS.disableWebGL; - PDFJS.externalLinkTarget = PDFJS.externalLinkTarget === undefined ? LinkTarget.NONE : PDFJS.externalLinkTarget; - PDFJS.externalLinkRel = PDFJS.externalLinkRel === undefined ? DEFAULT_LINK_REL : PDFJS.externalLinkRel; - PDFJS.isEvalSupported = PDFJS.isEvalSupported === undefined ? true : PDFJS.isEvalSupported; - var savedOpenExternalLinksInNewWindow = PDFJS.openExternalLinksInNewWindow; - delete PDFJS.openExternalLinksInNewWindow; - Object.defineProperty(PDFJS, 'openExternalLinksInNewWindow', { - get: function () { - return PDFJS.externalLinkTarget === LinkTarget.BLANK; - }, - set: function (value) { - if (value) { - deprecated('PDFJS.openExternalLinksInNewWindow, please use ' + '"PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK" instead.'); - } - if (PDFJS.externalLinkTarget !== LinkTarget.NONE) { - warn('PDFJS.externalLinkTarget is already initialized'); - return; - } - PDFJS.externalLinkTarget = value ? LinkTarget.BLANK : LinkTarget.NONE; - }, - enumerable: true, - configurable: true - }); - if (savedOpenExternalLinksInNewWindow) { - PDFJS.openExternalLinksInNewWindow = savedOpenExternalLinksInNewWindow; - } - PDFJS.getDocument = displayAPI.getDocument; - PDFJS.PDFDataRangeTransport = displayAPI.PDFDataRangeTransport; - PDFJS.PDFWorker = displayAPI.PDFWorker; - Object.defineProperty(PDFJS, 'hasCanvasTypedArrays', { - configurable: true, - get: function PDFJS_hasCanvasTypedArrays() { - var value = displayDOMUtils.hasCanvasTypedArrays(); - return sharedUtil.shadow(PDFJS, 'hasCanvasTypedArrays', value); - } - }); - PDFJS.CustomStyle = displayDOMUtils.CustomStyle; - PDFJS.LinkTarget = LinkTarget; - PDFJS.addLinkAttributes = displayDOMUtils.addLinkAttributes; - PDFJS.getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl; - PDFJS.isExternalLinkTargetSet = displayDOMUtils.isExternalLinkTargetSet; - PDFJS.AnnotationLayer = displayAnnotationLayer.AnnotationLayer; - PDFJS.renderTextLayer = displayTextLayer.renderTextLayer; - PDFJS.Metadata = displayMetadata.Metadata; - PDFJS.SVGGraphics = displaySVG.SVGGraphics; - PDFJS.UnsupportedManager = displayAPI._UnsupportedManager; - exports.globalScope = globalScope; - exports.isWorker = isWorker; - exports.PDFJS = globalScope.PDFJS; - })); - }.call(pdfjsLibs)); - exports.PDFJS = pdfjsLibs.pdfjsDisplayGlobal.PDFJS; - exports.build = pdfjsLibs.pdfjsDisplayAPI.build; - exports.version = pdfjsLibs.pdfjsDisplayAPI.version; - exports.getDocument = pdfjsLibs.pdfjsDisplayAPI.getDocument; - exports.PDFDataRangeTransport = pdfjsLibs.pdfjsDisplayAPI.PDFDataRangeTransport; - exports.PDFWorker = pdfjsLibs.pdfjsDisplayAPI.PDFWorker; - exports.renderTextLayer = pdfjsLibs.pdfjsDisplayTextLayer.renderTextLayer; - exports.AnnotationLayer = pdfjsLibs.pdfjsDisplayAnnotationLayer.AnnotationLayer; - exports.CustomStyle = pdfjsLibs.pdfjsDisplayDOMUtils.CustomStyle; - exports.PasswordResponses = pdfjsLibs.pdfjsSharedUtil.PasswordResponses; - exports.InvalidPDFException = pdfjsLibs.pdfjsSharedUtil.InvalidPDFException; - exports.MissingPDFException = pdfjsLibs.pdfjsSharedUtil.MissingPDFException; - exports.SVGGraphics = pdfjsLibs.pdfjsDisplaySVG.SVGGraphics; - exports.UnexpectedResponseException = pdfjsLibs.pdfjsSharedUtil.UnexpectedResponseException; - exports.OPS = pdfjsLibs.pdfjsSharedUtil.OPS; - exports.UNSUPPORTED_FEATURES = pdfjsLibs.pdfjsSharedUtil.UNSUPPORTED_FEATURES; - exports.isValidUrl = pdfjsLibs.pdfjsDisplayDOMUtils.isValidUrl; - exports.createValidAbsoluteUrl = pdfjsLibs.pdfjsSharedUtil.createValidAbsoluteUrl; - exports.createObjectURL = pdfjsLibs.pdfjsSharedUtil.createObjectURL; - exports.removeNullCharacters = pdfjsLibs.pdfjsSharedUtil.removeNullCharacters; - exports.shadow = pdfjsLibs.pdfjsSharedUtil.shadow; - exports.createBlob = pdfjsLibs.pdfjsSharedUtil.createBlob; - exports.getFilenameFromUrl = pdfjsLibs.pdfjsDisplayDOMUtils.getFilenameFromUrl; - exports.addLinkAttributes = pdfjsLibs.pdfjsDisplayDOMUtils.addLinkAttributes; -})); \ No newline at end of file diff --git a/src/lib/pdf.worker.js b/src/lib/pdf.worker.js deleted file mode 100644 index ddb7618..0000000 --- a/src/lib/pdf.worker.js +++ /dev/null @@ -1,50501 +0,0 @@ -/* Copyright 2012 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -(function (root, factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - define('pdfjs-dist/build/pdf.worker', ['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory(root['pdfjsDistBuildPdfWorker'] = {}); - } -}(this, function (exports) { - 'use strict'; - var pdfjsVersion = '1.7.225'; - var pdfjsBuild = '17d135f'; - var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; - var pdfjsLibs = {}; - (function pdfjsWrapper() { - (function (root, factory) { - factory(root.pdfjsCoreArithmeticDecoder = {}); - }(this, function (exports) { - var ArithmeticDecoder = function ArithmeticDecoderClosure() { - var QeTable = [ - { - qe: 0x5601, - nmps: 1, - nlps: 1, - switchFlag: 1 - }, - { - qe: 0x3401, - nmps: 2, - nlps: 6, - switchFlag: 0 - }, - { - qe: 0x1801, - nmps: 3, - nlps: 9, - switchFlag: 0 - }, - { - qe: 0x0AC1, - nmps: 4, - nlps: 12, - switchFlag: 0 - }, - { - qe: 0x0521, - nmps: 5, - nlps: 29, - switchFlag: 0 - }, - { - qe: 0x0221, - nmps: 38, - nlps: 33, - switchFlag: 0 - }, - { - qe: 0x5601, - nmps: 7, - nlps: 6, - switchFlag: 1 - }, - { - qe: 0x5401, - nmps: 8, - nlps: 14, - switchFlag: 0 - }, - { - qe: 0x4801, - nmps: 9, - nlps: 14, - switchFlag: 0 - }, - { - qe: 0x3801, - nmps: 10, - nlps: 14, - switchFlag: 0 - }, - { - qe: 0x3001, - nmps: 11, - nlps: 17, - switchFlag: 0 - }, - { - qe: 0x2401, - nmps: 12, - nlps: 18, - switchFlag: 0 - }, - { - qe: 0x1C01, - nmps: 13, - nlps: 20, - switchFlag: 0 - }, - { - qe: 0x1601, - nmps: 29, - nlps: 21, - switchFlag: 0 - }, - { - qe: 0x5601, - nmps: 15, - nlps: 14, - switchFlag: 1 - }, - { - qe: 0x5401, - nmps: 16, - nlps: 14, - switchFlag: 0 - }, - { - qe: 0x5101, - nmps: 17, - nlps: 15, - switchFlag: 0 - }, - { - qe: 0x4801, - nmps: 18, - nlps: 16, - switchFlag: 0 - }, - { - qe: 0x3801, - nmps: 19, - nlps: 17, - switchFlag: 0 - }, - { - qe: 0x3401, - nmps: 20, - nlps: 18, - switchFlag: 0 - }, - { - qe: 0x3001, - nmps: 21, - nlps: 19, - switchFlag: 0 - }, - { - qe: 0x2801, - nmps: 22, - nlps: 19, - switchFlag: 0 - }, - { - qe: 0x2401, - nmps: 23, - nlps: 20, - switchFlag: 0 - }, - { - qe: 0x2201, - nmps: 24, - nlps: 21, - switchFlag: 0 - }, - { - qe: 0x1C01, - nmps: 25, - nlps: 22, - switchFlag: 0 - }, - { - qe: 0x1801, - nmps: 26, - nlps: 23, - switchFlag: 0 - }, - { - qe: 0x1601, - nmps: 27, - nlps: 24, - switchFlag: 0 - }, - { - qe: 0x1401, - nmps: 28, - nlps: 25, - switchFlag: 0 - }, - { - qe: 0x1201, - nmps: 29, - nlps: 26, - switchFlag: 0 - }, - { - qe: 0x1101, - nmps: 30, - nlps: 27, - switchFlag: 0 - }, - { - qe: 0x0AC1, - nmps: 31, - nlps: 28, - switchFlag: 0 - }, - { - qe: 0x09C1, - nmps: 32, - nlps: 29, - switchFlag: 0 - }, - { - qe: 0x08A1, - nmps: 33, - nlps: 30, - switchFlag: 0 - }, - { - qe: 0x0521, - nmps: 34, - nlps: 31, - switchFlag: 0 - }, - { - qe: 0x0441, - nmps: 35, - nlps: 32, - switchFlag: 0 - }, - { - qe: 0x02A1, - nmps: 36, - nlps: 33, - switchFlag: 0 - }, - { - qe: 0x0221, - nmps: 37, - nlps: 34, - switchFlag: 0 - }, - { - qe: 0x0141, - nmps: 38, - nlps: 35, - switchFlag: 0 - }, - { - qe: 0x0111, - nmps: 39, - nlps: 36, - switchFlag: 0 - }, - { - qe: 0x0085, - nmps: 40, - nlps: 37, - switchFlag: 0 - }, - { - qe: 0x0049, - nmps: 41, - nlps: 38, - switchFlag: 0 - }, - { - qe: 0x0025, - nmps: 42, - nlps: 39, - switchFlag: 0 - }, - { - qe: 0x0015, - nmps: 43, - nlps: 40, - switchFlag: 0 - }, - { - qe: 0x0009, - nmps: 44, - nlps: 41, - switchFlag: 0 - }, - { - qe: 0x0005, - nmps: 45, - nlps: 42, - switchFlag: 0 - }, - { - qe: 0x0001, - nmps: 45, - nlps: 43, - switchFlag: 0 - }, - { - qe: 0x5601, - nmps: 46, - nlps: 46, - switchFlag: 0 - } - ]; - function ArithmeticDecoder(data, start, end) { - this.data = data; - this.bp = start; - this.dataEnd = end; - this.chigh = data[start]; - this.clow = 0; - this.byteIn(); - this.chigh = this.chigh << 7 & 0xFFFF | this.clow >> 9 & 0x7F; - this.clow = this.clow << 7 & 0xFFFF; - this.ct -= 7; - this.a = 0x8000; - } - ArithmeticDecoder.prototype = { - byteIn: function ArithmeticDecoder_byteIn() { - var data = this.data; - var bp = this.bp; - if (data[bp] === 0xFF) { - var b1 = data[bp + 1]; - if (b1 > 0x8F) { - this.clow += 0xFF00; - this.ct = 8; - } else { - bp++; - this.clow += data[bp] << 9; - this.ct = 7; - this.bp = bp; - } - } else { - bp++; - this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xFF00; - this.ct = 8; - this.bp = bp; - } - if (this.clow > 0xFFFF) { - this.chigh += this.clow >> 16; - this.clow &= 0xFFFF; - } - }, - readBit: function ArithmeticDecoder_readBit(contexts, pos) { - var cx_index = contexts[pos] >> 1, cx_mps = contexts[pos] & 1; - var qeTableIcx = QeTable[cx_index]; - var qeIcx = qeTableIcx.qe; - var d; - var a = this.a - qeIcx; - if (this.chigh < qeIcx) { - if (a < qeIcx) { - a = qeIcx; - d = cx_mps; - cx_index = qeTableIcx.nmps; - } else { - a = qeIcx; - d = 1 ^ cx_mps; - if (qeTableIcx.switchFlag === 1) { - cx_mps = d; - } - cx_index = qeTableIcx.nlps; - } - } else { - this.chigh -= qeIcx; - if ((a & 0x8000) !== 0) { - this.a = a; - return cx_mps; - } - if (a < qeIcx) { - d = 1 ^ cx_mps; - if (qeTableIcx.switchFlag === 1) { - cx_mps = d; - } - cx_index = qeTableIcx.nlps; - } else { - d = cx_mps; - cx_index = qeTableIcx.nmps; - } - } - do { - if (this.ct === 0) { - this.byteIn(); - } - a <<= 1; - this.chigh = this.chigh << 1 & 0xFFFF | this.clow >> 15 & 1; - this.clow = this.clow << 1 & 0xFFFF; - this.ct--; - } while ((a & 0x8000) === 0); - this.a = a; - contexts[pos] = cx_index << 1 | cx_mps; - return d; - } - }; - return ArithmeticDecoder; - }(); - exports.ArithmeticDecoder = ArithmeticDecoder; - })); - (function (root, factory) { - factory(root.pdfjsCoreCharsets = {}); - }(this, function (exports) { - var ISOAdobeCharset = [ - '.notdef', - 'space', - 'exclam', - 'quotedbl', - 'numbersign', - 'dollar', - 'percent', - 'ampersand', - 'quoteright', - 'parenleft', - 'parenright', - 'asterisk', - 'plus', - 'comma', - 'hyphen', - 'period', - 'slash', - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'colon', - 'semicolon', - 'less', - 'equal', - 'greater', - 'question', - 'at', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - 'bracketleft', - 'backslash', - 'bracketright', - 'asciicircum', - 'underscore', - 'quoteleft', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - 'braceleft', - 'bar', - 'braceright', - 'asciitilde', - 'exclamdown', - 'cent', - 'sterling', - 'fraction', - 'yen', - 'florin', - 'section', - 'currency', - 'quotesingle', - 'quotedblleft', - 'guillemotleft', - 'guilsinglleft', - 'guilsinglright', - 'fi', - 'fl', - 'endash', - 'dagger', - 'daggerdbl', - 'periodcentered', - 'paragraph', - 'bullet', - 'quotesinglbase', - 'quotedblbase', - 'quotedblright', - 'guillemotright', - 'ellipsis', - 'perthousand', - 'questiondown', - 'grave', - 'acute', - 'circumflex', - 'tilde', - 'macron', - 'breve', - 'dotaccent', - 'dieresis', - 'ring', - 'cedilla', - 'hungarumlaut', - 'ogonek', - 'caron', - 'emdash', - 'AE', - 'ordfeminine', - 'Lslash', - 'Oslash', - 'OE', - 'ordmasculine', - 'ae', - 'dotlessi', - 'lslash', - 'oslash', - 'oe', - 'germandbls', - 'onesuperior', - 'logicalnot', - 'mu', - 'trademark', - 'Eth', - 'onehalf', - 'plusminus', - 'Thorn', - 'onequarter', - 'divide', - 'brokenbar', - 'degree', - 'thorn', - 'threequarters', - 'twosuperior', - 'registered', - 'minus', - 'eth', - 'multiply', - 'threesuperior', - 'copyright', - 'Aacute', - 'Acircumflex', - 'Adieresis', - 'Agrave', - 'Aring', - 'Atilde', - 'Ccedilla', - 'Eacute', - 'Ecircumflex', - 'Edieresis', - 'Egrave', - 'Iacute', - 'Icircumflex', - 'Idieresis', - 'Igrave', - 'Ntilde', - 'Oacute', - 'Ocircumflex', - 'Odieresis', - 'Ograve', - 'Otilde', - 'Scaron', - 'Uacute', - 'Ucircumflex', - 'Udieresis', - 'Ugrave', - 'Yacute', - 'Ydieresis', - 'Zcaron', - 'aacute', - 'acircumflex', - 'adieresis', - 'agrave', - 'aring', - 'atilde', - 'ccedilla', - 'eacute', - 'ecircumflex', - 'edieresis', - 'egrave', - 'iacute', - 'icircumflex', - 'idieresis', - 'igrave', - 'ntilde', - 'oacute', - 'ocircumflex', - 'odieresis', - 'ograve', - 'otilde', - 'scaron', - 'uacute', - 'ucircumflex', - 'udieresis', - 'ugrave', - 'yacute', - 'ydieresis', - 'zcaron' - ]; - var ExpertCharset = [ - '.notdef', - 'space', - 'exclamsmall', - 'Hungarumlautsmall', - 'dollaroldstyle', - 'dollarsuperior', - 'ampersandsmall', - 'Acutesmall', - 'parenleftsuperior', - 'parenrightsuperior', - 'twodotenleader', - 'onedotenleader', - 'comma', - 'hyphen', - 'period', - 'fraction', - 'zerooldstyle', - 'oneoldstyle', - 'twooldstyle', - 'threeoldstyle', - 'fouroldstyle', - 'fiveoldstyle', - 'sixoldstyle', - 'sevenoldstyle', - 'eightoldstyle', - 'nineoldstyle', - 'colon', - 'semicolon', - 'commasuperior', - 'threequartersemdash', - 'periodsuperior', - 'questionsmall', - 'asuperior', - 'bsuperior', - 'centsuperior', - 'dsuperior', - 'esuperior', - 'isuperior', - 'lsuperior', - 'msuperior', - 'nsuperior', - 'osuperior', - 'rsuperior', - 'ssuperior', - 'tsuperior', - 'ff', - 'fi', - 'fl', - 'ffi', - 'ffl', - 'parenleftinferior', - 'parenrightinferior', - 'Circumflexsmall', - 'hyphensuperior', - 'Gravesmall', - 'Asmall', - 'Bsmall', - 'Csmall', - 'Dsmall', - 'Esmall', - 'Fsmall', - 'Gsmall', - 'Hsmall', - 'Ismall', - 'Jsmall', - 'Ksmall', - 'Lsmall', - 'Msmall', - 'Nsmall', - 'Osmall', - 'Psmall', - 'Qsmall', - 'Rsmall', - 'Ssmall', - 'Tsmall', - 'Usmall', - 'Vsmall', - 'Wsmall', - 'Xsmall', - 'Ysmall', - 'Zsmall', - 'colonmonetary', - 'onefitted', - 'rupiah', - 'Tildesmall', - 'exclamdownsmall', - 'centoldstyle', - 'Lslashsmall', - 'Scaronsmall', - 'Zcaronsmall', - 'Dieresissmall', - 'Brevesmall', - 'Caronsmall', - 'Dotaccentsmall', - 'Macronsmall', - 'figuredash', - 'hypheninferior', - 'Ogoneksmall', - 'Ringsmall', - 'Cedillasmall', - 'onequarter', - 'onehalf', - 'threequarters', - 'questiondownsmall', - 'oneeighth', - 'threeeighths', - 'fiveeighths', - 'seveneighths', - 'onethird', - 'twothirds', - 'zerosuperior', - 'onesuperior', - 'twosuperior', - 'threesuperior', - 'foursuperior', - 'fivesuperior', - 'sixsuperior', - 'sevensuperior', - 'eightsuperior', - 'ninesuperior', - 'zeroinferior', - 'oneinferior', - 'twoinferior', - 'threeinferior', - 'fourinferior', - 'fiveinferior', - 'sixinferior', - 'seveninferior', - 'eightinferior', - 'nineinferior', - 'centinferior', - 'dollarinferior', - 'periodinferior', - 'commainferior', - 'Agravesmall', - 'Aacutesmall', - 'Acircumflexsmall', - 'Atildesmall', - 'Adieresissmall', - 'Aringsmall', - 'AEsmall', - 'Ccedillasmall', - 'Egravesmall', - 'Eacutesmall', - 'Ecircumflexsmall', - 'Edieresissmall', - 'Igravesmall', - 'Iacutesmall', - 'Icircumflexsmall', - 'Idieresissmall', - 'Ethsmall', - 'Ntildesmall', - 'Ogravesmall', - 'Oacutesmall', - 'Ocircumflexsmall', - 'Otildesmall', - 'Odieresissmall', - 'OEsmall', - 'Oslashsmall', - 'Ugravesmall', - 'Uacutesmall', - 'Ucircumflexsmall', - 'Udieresissmall', - 'Yacutesmall', - 'Thornsmall', - 'Ydieresissmall' - ]; - var ExpertSubsetCharset = [ - '.notdef', - 'space', - 'dollaroldstyle', - 'dollarsuperior', - 'parenleftsuperior', - 'parenrightsuperior', - 'twodotenleader', - 'onedotenleader', - 'comma', - 'hyphen', - 'period', - 'fraction', - 'zerooldstyle', - 'oneoldstyle', - 'twooldstyle', - 'threeoldstyle', - 'fouroldstyle', - 'fiveoldstyle', - 'sixoldstyle', - 'sevenoldstyle', - 'eightoldstyle', - 'nineoldstyle', - 'colon', - 'semicolon', - 'commasuperior', - 'threequartersemdash', - 'periodsuperior', - 'asuperior', - 'bsuperior', - 'centsuperior', - 'dsuperior', - 'esuperior', - 'isuperior', - 'lsuperior', - 'msuperior', - 'nsuperior', - 'osuperior', - 'rsuperior', - 'ssuperior', - 'tsuperior', - 'ff', - 'fi', - 'fl', - 'ffi', - 'ffl', - 'parenleftinferior', - 'parenrightinferior', - 'hyphensuperior', - 'colonmonetary', - 'onefitted', - 'rupiah', - 'centoldstyle', - 'figuredash', - 'hypheninferior', - 'onequarter', - 'onehalf', - 'threequarters', - 'oneeighth', - 'threeeighths', - 'fiveeighths', - 'seveneighths', - 'onethird', - 'twothirds', - 'zerosuperior', - 'onesuperior', - 'twosuperior', - 'threesuperior', - 'foursuperior', - 'fivesuperior', - 'sixsuperior', - 'sevensuperior', - 'eightsuperior', - 'ninesuperior', - 'zeroinferior', - 'oneinferior', - 'twoinferior', - 'threeinferior', - 'fourinferior', - 'fiveinferior', - 'sixinferior', - 'seveninferior', - 'eightinferior', - 'nineinferior', - 'centinferior', - 'dollarinferior', - 'periodinferior', - 'commainferior' - ]; - exports.ISOAdobeCharset = ISOAdobeCharset; - exports.ExpertCharset = ExpertCharset; - exports.ExpertSubsetCharset = ExpertSubsetCharset; - })); - (function (root, factory) { - factory(root.pdfjsCoreEncodings = {}); - }(this, function (exports) { - var ExpertEncoding = [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'space', - 'exclamsmall', - 'Hungarumlautsmall', - '', - 'dollaroldstyle', - 'dollarsuperior', - 'ampersandsmall', - 'Acutesmall', - 'parenleftsuperior', - 'parenrightsuperior', - 'twodotenleader', - 'onedotenleader', - 'comma', - 'hyphen', - 'period', - 'fraction', - 'zerooldstyle', - 'oneoldstyle', - 'twooldstyle', - 'threeoldstyle', - 'fouroldstyle', - 'fiveoldstyle', - 'sixoldstyle', - 'sevenoldstyle', - 'eightoldstyle', - 'nineoldstyle', - 'colon', - 'semicolon', - 'commasuperior', - 'threequartersemdash', - 'periodsuperior', - 'questionsmall', - '', - 'asuperior', - 'bsuperior', - 'centsuperior', - 'dsuperior', - 'esuperior', - '', - '', - 'isuperior', - '', - '', - 'lsuperior', - 'msuperior', - 'nsuperior', - 'osuperior', - '', - '', - 'rsuperior', - 'ssuperior', - 'tsuperior', - '', - 'ff', - 'fi', - 'fl', - 'ffi', - 'ffl', - 'parenleftinferior', - '', - 'parenrightinferior', - 'Circumflexsmall', - 'hyphensuperior', - 'Gravesmall', - 'Asmall', - 'Bsmall', - 'Csmall', - 'Dsmall', - 'Esmall', - 'Fsmall', - 'Gsmall', - 'Hsmall', - 'Ismall', - 'Jsmall', - 'Ksmall', - 'Lsmall', - 'Msmall', - 'Nsmall', - 'Osmall', - 'Psmall', - 'Qsmall', - 'Rsmall', - 'Ssmall', - 'Tsmall', - 'Usmall', - 'Vsmall', - 'Wsmall', - 'Xsmall', - 'Ysmall', - 'Zsmall', - 'colonmonetary', - 'onefitted', - 'rupiah', - 'Tildesmall', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'exclamdownsmall', - 'centoldstyle', - 'Lslashsmall', - '', - '', - 'Scaronsmall', - 'Zcaronsmall', - 'Dieresissmall', - 'Brevesmall', - 'Caronsmall', - '', - 'Dotaccentsmall', - '', - '', - 'Macronsmall', - '', - '', - 'figuredash', - 'hypheninferior', - '', - '', - 'Ogoneksmall', - 'Ringsmall', - 'Cedillasmall', - '', - '', - '', - 'onequarter', - 'onehalf', - 'threequarters', - 'questiondownsmall', - 'oneeighth', - 'threeeighths', - 'fiveeighths', - 'seveneighths', - 'onethird', - 'twothirds', - '', - '', - 'zerosuperior', - 'onesuperior', - 'twosuperior', - 'threesuperior', - 'foursuperior', - 'fivesuperior', - 'sixsuperior', - 'sevensuperior', - 'eightsuperior', - 'ninesuperior', - 'zeroinferior', - 'oneinferior', - 'twoinferior', - 'threeinferior', - 'fourinferior', - 'fiveinferior', - 'sixinferior', - 'seveninferior', - 'eightinferior', - 'nineinferior', - 'centinferior', - 'dollarinferior', - 'periodinferior', - 'commainferior', - 'Agravesmall', - 'Aacutesmall', - 'Acircumflexsmall', - 'Atildesmall', - 'Adieresissmall', - 'Aringsmall', - 'AEsmall', - 'Ccedillasmall', - 'Egravesmall', - 'Eacutesmall', - 'Ecircumflexsmall', - 'Edieresissmall', - 'Igravesmall', - 'Iacutesmall', - 'Icircumflexsmall', - 'Idieresissmall', - 'Ethsmall', - 'Ntildesmall', - 'Ogravesmall', - 'Oacutesmall', - 'Ocircumflexsmall', - 'Otildesmall', - 'Odieresissmall', - 'OEsmall', - 'Oslashsmall', - 'Ugravesmall', - 'Uacutesmall', - 'Ucircumflexsmall', - 'Udieresissmall', - 'Yacutesmall', - 'Thornsmall', - 'Ydieresissmall' - ]; - var MacExpertEncoding = [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'space', - 'exclamsmall', - 'Hungarumlautsmall', - 'centoldstyle', - 'dollaroldstyle', - 'dollarsuperior', - 'ampersandsmall', - 'Acutesmall', - 'parenleftsuperior', - 'parenrightsuperior', - 'twodotenleader', - 'onedotenleader', - 'comma', - 'hyphen', - 'period', - 'fraction', - 'zerooldstyle', - 'oneoldstyle', - 'twooldstyle', - 'threeoldstyle', - 'fouroldstyle', - 'fiveoldstyle', - 'sixoldstyle', - 'sevenoldstyle', - 'eightoldstyle', - 'nineoldstyle', - 'colon', - 'semicolon', - '', - 'threequartersemdash', - '', - 'questionsmall', - '', - '', - '', - '', - 'Ethsmall', - '', - '', - 'onequarter', - 'onehalf', - 'threequarters', - 'oneeighth', - 'threeeighths', - 'fiveeighths', - 'seveneighths', - 'onethird', - 'twothirds', - '', - '', - '', - '', - '', - '', - 'ff', - 'fi', - 'fl', - 'ffi', - 'ffl', - 'parenleftinferior', - '', - 'parenrightinferior', - 'Circumflexsmall', - 'hypheninferior', - 'Gravesmall', - 'Asmall', - 'Bsmall', - 'Csmall', - 'Dsmall', - 'Esmall', - 'Fsmall', - 'Gsmall', - 'Hsmall', - 'Ismall', - 'Jsmall', - 'Ksmall', - 'Lsmall', - 'Msmall', - 'Nsmall', - 'Osmall', - 'Psmall', - 'Qsmall', - 'Rsmall', - 'Ssmall', - 'Tsmall', - 'Usmall', - 'Vsmall', - 'Wsmall', - 'Xsmall', - 'Ysmall', - 'Zsmall', - 'colonmonetary', - 'onefitted', - 'rupiah', - 'Tildesmall', - '', - '', - 'asuperior', - 'centsuperior', - '', - '', - '', - '', - 'Aacutesmall', - 'Agravesmall', - 'Acircumflexsmall', - 'Adieresissmall', - 'Atildesmall', - 'Aringsmall', - 'Ccedillasmall', - 'Eacutesmall', - 'Egravesmall', - 'Ecircumflexsmall', - 'Edieresissmall', - 'Iacutesmall', - 'Igravesmall', - 'Icircumflexsmall', - 'Idieresissmall', - 'Ntildesmall', - 'Oacutesmall', - 'Ogravesmall', - 'Ocircumflexsmall', - 'Odieresissmall', - 'Otildesmall', - 'Uacutesmall', - 'Ugravesmall', - 'Ucircumflexsmall', - 'Udieresissmall', - '', - 'eightsuperior', - 'fourinferior', - 'threeinferior', - 'sixinferior', - 'eightinferior', - 'seveninferior', - 'Scaronsmall', - '', - 'centinferior', - 'twoinferior', - '', - 'Dieresissmall', - '', - 'Caronsmall', - 'osuperior', - 'fiveinferior', - '', - 'commainferior', - 'periodinferior', - 'Yacutesmall', - '', - 'dollarinferior', - '', - 'Thornsmall', - '', - 'nineinferior', - 'zeroinferior', - 'Zcaronsmall', - 'AEsmall', - 'Oslashsmall', - 'questiondownsmall', - 'oneinferior', - 'Lslashsmall', - '', - '', - '', - '', - '', - '', - 'Cedillasmall', - '', - '', - '', - '', - '', - 'OEsmall', - 'figuredash', - 'hyphensuperior', - '', - '', - '', - '', - 'exclamdownsmall', - '', - 'Ydieresissmall', - '', - 'onesuperior', - 'twosuperior', - 'threesuperior', - 'foursuperior', - 'fivesuperior', - 'sixsuperior', - 'sevensuperior', - 'ninesuperior', - 'zerosuperior', - '', - 'esuperior', - 'rsuperior', - 'tsuperior', - '', - '', - 'isuperior', - 'ssuperior', - 'dsuperior', - '', - '', - '', - '', - '', - 'lsuperior', - 'Ogoneksmall', - 'Brevesmall', - 'Macronsmall', - 'bsuperior', - 'nsuperior', - 'msuperior', - 'commasuperior', - 'periodsuperior', - 'Dotaccentsmall', - 'Ringsmall' - ]; - var MacRomanEncoding = [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'space', - 'exclam', - 'quotedbl', - 'numbersign', - 'dollar', - 'percent', - 'ampersand', - 'quotesingle', - 'parenleft', - 'parenright', - 'asterisk', - 'plus', - 'comma', - 'hyphen', - 'period', - 'slash', - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'colon', - 'semicolon', - 'less', - 'equal', - 'greater', - 'question', - 'at', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - 'bracketleft', - 'backslash', - 'bracketright', - 'asciicircum', - 'underscore', - 'grave', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - 'braceleft', - 'bar', - 'braceright', - 'asciitilde', - '', - 'Adieresis', - 'Aring', - 'Ccedilla', - 'Eacute', - 'Ntilde', - 'Odieresis', - 'Udieresis', - 'aacute', - 'agrave', - 'acircumflex', - 'adieresis', - 'atilde', - 'aring', - 'ccedilla', - 'eacute', - 'egrave', - 'ecircumflex', - 'edieresis', - 'iacute', - 'igrave', - 'icircumflex', - 'idieresis', - 'ntilde', - 'oacute', - 'ograve', - 'ocircumflex', - 'odieresis', - 'otilde', - 'uacute', - 'ugrave', - 'ucircumflex', - 'udieresis', - 'dagger', - 'degree', - 'cent', - 'sterling', - 'section', - 'bullet', - 'paragraph', - 'germandbls', - 'registered', - 'copyright', - 'trademark', - 'acute', - 'dieresis', - 'notequal', - 'AE', - 'Oslash', - 'infinity', - 'plusminus', - 'lessequal', - 'greaterequal', - 'yen', - 'mu', - 'partialdiff', - 'summation', - 'product', - 'pi', - 'integral', - 'ordfeminine', - 'ordmasculine', - 'Omega', - 'ae', - 'oslash', - 'questiondown', - 'exclamdown', - 'logicalnot', - 'radical', - 'florin', - 'approxequal', - 'Delta', - 'guillemotleft', - 'guillemotright', - 'ellipsis', - 'space', - 'Agrave', - 'Atilde', - 'Otilde', - 'OE', - 'oe', - 'endash', - 'emdash', - 'quotedblleft', - 'quotedblright', - 'quoteleft', - 'quoteright', - 'divide', - 'lozenge', - 'ydieresis', - 'Ydieresis', - 'fraction', - 'currency', - 'guilsinglleft', - 'guilsinglright', - 'fi', - 'fl', - 'daggerdbl', - 'periodcentered', - 'quotesinglbase', - 'quotedblbase', - 'perthousand', - 'Acircumflex', - 'Ecircumflex', - 'Aacute', - 'Edieresis', - 'Egrave', - 'Iacute', - 'Icircumflex', - 'Idieresis', - 'Igrave', - 'Oacute', - 'Ocircumflex', - 'apple', - 'Ograve', - 'Uacute', - 'Ucircumflex', - 'Ugrave', - 'dotlessi', - 'circumflex', - 'tilde', - 'macron', - 'breve', - 'dotaccent', - 'ring', - 'cedilla', - 'hungarumlaut', - 'ogonek', - 'caron' - ]; - var StandardEncoding = [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'space', - 'exclam', - 'quotedbl', - 'numbersign', - 'dollar', - 'percent', - 'ampersand', - 'quoteright', - 'parenleft', - 'parenright', - 'asterisk', - 'plus', - 'comma', - 'hyphen', - 'period', - 'slash', - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'colon', - 'semicolon', - 'less', - 'equal', - 'greater', - 'question', - 'at', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - 'bracketleft', - 'backslash', - 'bracketright', - 'asciicircum', - 'underscore', - 'quoteleft', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - 'braceleft', - 'bar', - 'braceright', - 'asciitilde', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'exclamdown', - 'cent', - 'sterling', - 'fraction', - 'yen', - 'florin', - 'section', - 'currency', - 'quotesingle', - 'quotedblleft', - 'guillemotleft', - 'guilsinglleft', - 'guilsinglright', - 'fi', - 'fl', - '', - 'endash', - 'dagger', - 'daggerdbl', - 'periodcentered', - '', - 'paragraph', - 'bullet', - 'quotesinglbase', - 'quotedblbase', - 'quotedblright', - 'guillemotright', - 'ellipsis', - 'perthousand', - '', - 'questiondown', - '', - 'grave', - 'acute', - 'circumflex', - 'tilde', - 'macron', - 'breve', - 'dotaccent', - 'dieresis', - '', - 'ring', - 'cedilla', - '', - 'hungarumlaut', - 'ogonek', - 'caron', - 'emdash', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'AE', - '', - 'ordfeminine', - '', - '', - '', - '', - 'Lslash', - 'Oslash', - 'OE', - 'ordmasculine', - '', - '', - '', - '', - '', - 'ae', - '', - '', - '', - 'dotlessi', - '', - '', - 'lslash', - 'oslash', - 'oe', - 'germandbls' - ]; - var WinAnsiEncoding = [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'space', - 'exclam', - 'quotedbl', - 'numbersign', - 'dollar', - 'percent', - 'ampersand', - 'quotesingle', - 'parenleft', - 'parenright', - 'asterisk', - 'plus', - 'comma', - 'hyphen', - 'period', - 'slash', - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'colon', - 'semicolon', - 'less', - 'equal', - 'greater', - 'question', - 'at', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - 'bracketleft', - 'backslash', - 'bracketright', - 'asciicircum', - 'underscore', - 'grave', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - 'braceleft', - 'bar', - 'braceright', - 'asciitilde', - 'bullet', - 'Euro', - 'bullet', - 'quotesinglbase', - 'florin', - 'quotedblbase', - 'ellipsis', - 'dagger', - 'daggerdbl', - 'circumflex', - 'perthousand', - 'Scaron', - 'guilsinglleft', - 'OE', - 'bullet', - 'Zcaron', - 'bullet', - 'bullet', - 'quoteleft', - 'quoteright', - 'quotedblleft', - 'quotedblright', - 'bullet', - 'endash', - 'emdash', - 'tilde', - 'trademark', - 'scaron', - 'guilsinglright', - 'oe', - 'bullet', - 'zcaron', - 'Ydieresis', - 'space', - 'exclamdown', - 'cent', - 'sterling', - 'currency', - 'yen', - 'brokenbar', - 'section', - 'dieresis', - 'copyright', - 'ordfeminine', - 'guillemotleft', - 'logicalnot', - 'hyphen', - 'registered', - 'macron', - 'degree', - 'plusminus', - 'twosuperior', - 'threesuperior', - 'acute', - 'mu', - 'paragraph', - 'periodcentered', - 'cedilla', - 'onesuperior', - 'ordmasculine', - 'guillemotright', - 'onequarter', - 'onehalf', - 'threequarters', - 'questiondown', - 'Agrave', - 'Aacute', - 'Acircumflex', - 'Atilde', - 'Adieresis', - 'Aring', - 'AE', - 'Ccedilla', - 'Egrave', - 'Eacute', - 'Ecircumflex', - 'Edieresis', - 'Igrave', - 'Iacute', - 'Icircumflex', - 'Idieresis', - 'Eth', - 'Ntilde', - 'Ograve', - 'Oacute', - 'Ocircumflex', - 'Otilde', - 'Odieresis', - 'multiply', - 'Oslash', - 'Ugrave', - 'Uacute', - 'Ucircumflex', - 'Udieresis', - 'Yacute', - 'Thorn', - 'germandbls', - 'agrave', - 'aacute', - 'acircumflex', - 'atilde', - 'adieresis', - 'aring', - 'ae', - 'ccedilla', - 'egrave', - 'eacute', - 'ecircumflex', - 'edieresis', - 'igrave', - 'iacute', - 'icircumflex', - 'idieresis', - 'eth', - 'ntilde', - 'ograve', - 'oacute', - 'ocircumflex', - 'otilde', - 'odieresis', - 'divide', - 'oslash', - 'ugrave', - 'uacute', - 'ucircumflex', - 'udieresis', - 'yacute', - 'thorn', - 'ydieresis' - ]; - var SymbolSetEncoding = [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'space', - 'exclam', - 'universal', - 'numbersign', - 'existential', - 'percent', - 'ampersand', - 'suchthat', - 'parenleft', - 'parenright', - 'asteriskmath', - 'plus', - 'comma', - 'minus', - 'period', - 'slash', - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'colon', - 'semicolon', - 'less', - 'equal', - 'greater', - 'question', - 'congruent', - 'Alpha', - 'Beta', - 'Chi', - 'Delta', - 'Epsilon', - 'Phi', - 'Gamma', - 'Eta', - 'Iota', - 'theta1', - 'Kappa', - 'Lambda', - 'Mu', - 'Nu', - 'Omicron', - 'Pi', - 'Theta', - 'Rho', - 'Sigma', - 'Tau', - 'Upsilon', - 'sigma1', - 'Omega', - 'Xi', - 'Psi', - 'Zeta', - 'bracketleft', - 'therefore', - 'bracketright', - 'perpendicular', - 'underscore', - 'radicalex', - 'alpha', - 'beta', - 'chi', - 'delta', - 'epsilon', - 'phi', - 'gamma', - 'eta', - 'iota', - 'phi1', - 'kappa', - 'lambda', - 'mu', - 'nu', - 'omicron', - 'pi', - 'theta', - 'rho', - 'sigma', - 'tau', - 'upsilon', - 'omega1', - 'omega', - 'xi', - 'psi', - 'zeta', - 'braceleft', - 'bar', - 'braceright', - 'similar', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'Euro', - 'Upsilon1', - 'minute', - 'lessequal', - 'fraction', - 'infinity', - 'florin', - 'club', - 'diamond', - 'heart', - 'spade', - 'arrowboth', - 'arrowleft', - 'arrowup', - 'arrowright', - 'arrowdown', - 'degree', - 'plusminus', - 'second', - 'greaterequal', - 'multiply', - 'proportional', - 'partialdiff', - 'bullet', - 'divide', - 'notequal', - 'equivalence', - 'approxequal', - 'ellipsis', - 'arrowvertex', - 'arrowhorizex', - 'carriagereturn', - 'aleph', - 'Ifraktur', - 'Rfraktur', - 'weierstrass', - 'circlemultiply', - 'circleplus', - 'emptyset', - 'intersection', - 'union', - 'propersuperset', - 'reflexsuperset', - 'notsubset', - 'propersubset', - 'reflexsubset', - 'element', - 'notelement', - 'angle', - 'gradient', - 'registerserif', - 'copyrightserif', - 'trademarkserif', - 'product', - 'radical', - 'dotmath', - 'logicalnot', - 'logicaland', - 'logicalor', - 'arrowdblboth', - 'arrowdblleft', - 'arrowdblup', - 'arrowdblright', - 'arrowdbldown', - 'lozenge', - 'angleleft', - 'registersans', - 'copyrightsans', - 'trademarksans', - 'summation', - 'parenlefttp', - 'parenleftex', - 'parenleftbt', - 'bracketlefttp', - 'bracketleftex', - 'bracketleftbt', - 'bracelefttp', - 'braceleftmid', - 'braceleftbt', - 'braceex', - '', - 'angleright', - 'integral', - 'integraltp', - 'integralex', - 'integralbt', - 'parenrighttp', - 'parenrightex', - 'parenrightbt', - 'bracketrighttp', - 'bracketrightex', - 'bracketrightbt', - 'bracerighttp', - 'bracerightmid', - 'bracerightbt' - ]; - var ZapfDingbatsEncoding = [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'space', - 'a1', - 'a2', - 'a202', - 'a3', - 'a4', - 'a5', - 'a119', - 'a118', - 'a117', - 'a11', - 'a12', - 'a13', - 'a14', - 'a15', - 'a16', - 'a105', - 'a17', - 'a18', - 'a19', - 'a20', - 'a21', - 'a22', - 'a23', - 'a24', - 'a25', - 'a26', - 'a27', - 'a28', - 'a6', - 'a7', - 'a8', - 'a9', - 'a10', - 'a29', - 'a30', - 'a31', - 'a32', - 'a33', - 'a34', - 'a35', - 'a36', - 'a37', - 'a38', - 'a39', - 'a40', - 'a41', - 'a42', - 'a43', - 'a44', - 'a45', - 'a46', - 'a47', - 'a48', - 'a49', - 'a50', - 'a51', - 'a52', - 'a53', - 'a54', - 'a55', - 'a56', - 'a57', - 'a58', - 'a59', - 'a60', - 'a61', - 'a62', - 'a63', - 'a64', - 'a65', - 'a66', - 'a67', - 'a68', - 'a69', - 'a70', - 'a71', - 'a72', - 'a73', - 'a74', - 'a203', - 'a75', - 'a204', - 'a76', - 'a77', - 'a78', - 'a79', - 'a81', - 'a82', - 'a83', - 'a84', - 'a97', - 'a98', - 'a99', - 'a100', - '', - 'a89', - 'a90', - 'a93', - 'a94', - 'a91', - 'a92', - 'a205', - 'a85', - 'a206', - 'a86', - 'a87', - 'a88', - 'a95', - 'a96', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - 'a101', - 'a102', - 'a103', - 'a104', - 'a106', - 'a107', - 'a108', - 'a112', - 'a111', - 'a110', - 'a109', - 'a120', - 'a121', - 'a122', - 'a123', - 'a124', - 'a125', - 'a126', - 'a127', - 'a128', - 'a129', - 'a130', - 'a131', - 'a132', - 'a133', - 'a134', - 'a135', - 'a136', - 'a137', - 'a138', - 'a139', - 'a140', - 'a141', - 'a142', - 'a143', - 'a144', - 'a145', - 'a146', - 'a147', - 'a148', - 'a149', - 'a150', - 'a151', - 'a152', - 'a153', - 'a154', - 'a155', - 'a156', - 'a157', - 'a158', - 'a159', - 'a160', - 'a161', - 'a163', - 'a164', - 'a196', - 'a165', - 'a192', - 'a166', - 'a167', - 'a168', - 'a169', - 'a170', - 'a171', - 'a172', - 'a173', - 'a162', - 'a174', - 'a175', - 'a176', - 'a177', - 'a178', - 'a179', - 'a193', - 'a180', - 'a199', - 'a181', - 'a200', - 'a182', - '', - 'a201', - 'a183', - 'a184', - 'a197', - 'a185', - 'a194', - 'a198', - 'a186', - 'a195', - 'a187', - 'a188', - 'a189', - 'a190', - 'a191' - ]; - function getEncoding(encodingName) { - switch (encodingName) { - case 'WinAnsiEncoding': - return WinAnsiEncoding; - case 'StandardEncoding': - return StandardEncoding; - case 'MacRomanEncoding': - return MacRomanEncoding; - case 'SymbolSetEncoding': - return SymbolSetEncoding; - case 'ZapfDingbatsEncoding': - return ZapfDingbatsEncoding; - case 'ExpertEncoding': - return ExpertEncoding; - case 'MacExpertEncoding': - return MacExpertEncoding; - default: - return null; - } - } - exports.WinAnsiEncoding = WinAnsiEncoding; - exports.StandardEncoding = StandardEncoding; - exports.MacRomanEncoding = MacRomanEncoding; - exports.SymbolSetEncoding = SymbolSetEncoding; - exports.ZapfDingbatsEncoding = ZapfDingbatsEncoding; - exports.ExpertEncoding = ExpertEncoding; - exports.getEncoding = getEncoding; - })); - (function (root, factory) { - factory(root.pdfjsSharedUtil = {}); - }(this, function (exports) { - var globalScope = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this; - var FONT_IDENTITY_MATRIX = [ - 0.001, - 0, - 0, - 0.001, - 0, - 0 - ]; - var TextRenderingMode = { - FILL: 0, - STROKE: 1, - FILL_STROKE: 2, - INVISIBLE: 3, - FILL_ADD_TO_PATH: 4, - STROKE_ADD_TO_PATH: 5, - FILL_STROKE_ADD_TO_PATH: 6, - ADD_TO_PATH: 7, - FILL_STROKE_MASK: 3, - ADD_TO_PATH_FLAG: 4 - }; - var ImageKind = { - GRAYSCALE_1BPP: 1, - RGB_24BPP: 2, - RGBA_32BPP: 3 - }; - var AnnotationType = { - TEXT: 1, - LINK: 2, - FREETEXT: 3, - LINE: 4, - SQUARE: 5, - CIRCLE: 6, - POLYGON: 7, - POLYLINE: 8, - HIGHLIGHT: 9, - UNDERLINE: 10, - SQUIGGLY: 11, - STRIKEOUT: 12, - STAMP: 13, - CARET: 14, - INK: 15, - POPUP: 16, - FILEATTACHMENT: 17, - SOUND: 18, - MOVIE: 19, - WIDGET: 20, - SCREEN: 21, - PRINTERMARK: 22, - TRAPNET: 23, - WATERMARK: 24, - THREED: 25, - REDACT: 26 - }; - var AnnotationFlag = { - INVISIBLE: 0x01, - HIDDEN: 0x02, - PRINT: 0x04, - NOZOOM: 0x08, - NOROTATE: 0x10, - NOVIEW: 0x20, - READONLY: 0x40, - LOCKED: 0x80, - TOGGLENOVIEW: 0x100, - LOCKEDCONTENTS: 0x200 - }; - var AnnotationFieldFlag = { - READONLY: 0x0000001, - REQUIRED: 0x0000002, - NOEXPORT: 0x0000004, - MULTILINE: 0x0001000, - PASSWORD: 0x0002000, - NOTOGGLETOOFF: 0x0004000, - RADIO: 0x0008000, - PUSHBUTTON: 0x0010000, - COMBO: 0x0020000, - EDIT: 0x0040000, - SORT: 0x0080000, - FILESELECT: 0x0100000, - MULTISELECT: 0x0200000, - DONOTSPELLCHECK: 0x0400000, - DONOTSCROLL: 0x0800000, - COMB: 0x1000000, - RICHTEXT: 0x2000000, - RADIOSINUNISON: 0x2000000, - COMMITONSELCHANGE: 0x4000000 - }; - var AnnotationBorderStyleType = { - SOLID: 1, - DASHED: 2, - BEVELED: 3, - INSET: 4, - UNDERLINE: 5 - }; - var StreamType = { - UNKNOWN: 0, - FLATE: 1, - LZW: 2, - DCT: 3, - JPX: 4, - JBIG: 5, - A85: 6, - AHX: 7, - CCF: 8, - RL: 9 - }; - var FontType = { - UNKNOWN: 0, - TYPE1: 1, - TYPE1C: 2, - CIDFONTTYPE0: 3, - CIDFONTTYPE0C: 4, - TRUETYPE: 5, - CIDFONTTYPE2: 6, - TYPE3: 7, - OPENTYPE: 8, - TYPE0: 9, - MMTYPE1: 10 - }; - var VERBOSITY_LEVELS = { - errors: 0, - warnings: 1, - infos: 5 - }; - var OPS = { - dependency: 1, - setLineWidth: 2, - setLineCap: 3, - setLineJoin: 4, - setMiterLimit: 5, - setDash: 6, - setRenderingIntent: 7, - setFlatness: 8, - setGState: 9, - save: 10, - restore: 11, - transform: 12, - moveTo: 13, - lineTo: 14, - curveTo: 15, - curveTo2: 16, - curveTo3: 17, - closePath: 18, - rectangle: 19, - stroke: 20, - closeStroke: 21, - fill: 22, - eoFill: 23, - fillStroke: 24, - eoFillStroke: 25, - closeFillStroke: 26, - closeEOFillStroke: 27, - endPath: 28, - clip: 29, - eoClip: 30, - beginText: 31, - endText: 32, - setCharSpacing: 33, - setWordSpacing: 34, - setHScale: 35, - setLeading: 36, - setFont: 37, - setTextRenderingMode: 38, - setTextRise: 39, - moveText: 40, - setLeadingMoveText: 41, - setTextMatrix: 42, - nextLine: 43, - showText: 44, - showSpacedText: 45, - nextLineShowText: 46, - nextLineSetSpacingShowText: 47, - setCharWidth: 48, - setCharWidthAndBounds: 49, - setStrokeColorSpace: 50, - setFillColorSpace: 51, - setStrokeColor: 52, - setStrokeColorN: 53, - setFillColor: 54, - setFillColorN: 55, - setStrokeGray: 56, - setFillGray: 57, - setStrokeRGBColor: 58, - setFillRGBColor: 59, - setStrokeCMYKColor: 60, - setFillCMYKColor: 61, - shadingFill: 62, - beginInlineImage: 63, - beginImageData: 64, - endInlineImage: 65, - paintXObject: 66, - markPoint: 67, - markPointProps: 68, - beginMarkedContent: 69, - beginMarkedContentProps: 70, - endMarkedContent: 71, - beginCompat: 72, - endCompat: 73, - paintFormXObjectBegin: 74, - paintFormXObjectEnd: 75, - beginGroup: 76, - endGroup: 77, - beginAnnotations: 78, - endAnnotations: 79, - beginAnnotation: 80, - endAnnotation: 81, - paintJpegXObject: 82, - paintImageMaskXObject: 83, - paintImageMaskXObjectGroup: 84, - paintImageXObject: 85, - paintInlineImageXObject: 86, - paintInlineImageXObjectGroup: 87, - paintImageXObjectRepeat: 88, - paintImageMaskXObjectRepeat: 89, - paintSolidColorImageMask: 90, - constructPath: 91 - }; - var verbosity = VERBOSITY_LEVELS.warnings; - function setVerbosityLevel(level) { - verbosity = level; - } - function getVerbosityLevel() { - return verbosity; - } - function info(msg) { - if (verbosity >= VERBOSITY_LEVELS.infos) { - console.log('Info: ' + msg); - } - } - function warn(msg) { - if (verbosity >= VERBOSITY_LEVELS.warnings) { - console.log('Warning: ' + msg); - } - } - function deprecated(details) { - console.log('Deprecated API usage: ' + details); - } - function error(msg) { - if (verbosity >= VERBOSITY_LEVELS.errors) { - console.log('Error: ' + msg); - console.log(backtrace()); - } - throw new Error(msg); - } - function backtrace() { - try { - throw new Error(); - } catch (e) { - return e.stack ? e.stack.split('\n').slice(2).join('\n') : ''; - } - } - function assert(cond, msg) { - if (!cond) { - error(msg); - } - } - var UNSUPPORTED_FEATURES = { - unknown: 'unknown', - forms: 'forms', - javaScript: 'javaScript', - smask: 'smask', - shadingPattern: 'shadingPattern', - font: 'font' - }; - function isSameOrigin(baseUrl, otherUrl) { - try { - var base = new URL(baseUrl); - if (!base.origin || base.origin === 'null') { - return false; - } - } catch (e) { - return false; - } - var other = new URL(otherUrl, base); - return base.origin === other.origin; - } - function isValidProtocol(url) { - if (!url) { - return false; - } - switch (url.protocol) { - case 'http:': - case 'https:': - case 'ftp:': - case 'mailto:': - case 'tel:': - return true; - default: - return false; - } - } - function createValidAbsoluteUrl(url, baseUrl) { - if (!url) { - return null; - } - try { - var absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); - if (isValidProtocol(absoluteUrl)) { - return absoluteUrl; - } - } catch (ex) { - } - return null; - } - function shadow(obj, prop, value) { - Object.defineProperty(obj, prop, { - value: value, - enumerable: true, - configurable: true, - writable: false - }); - return value; - } - function getLookupTableFactory(initializer) { - var lookup; - return function () { - if (initializer) { - lookup = Object.create(null); - initializer(lookup); - initializer = null; - } - return lookup; - }; - } - var PasswordResponses = { - NEED_PASSWORD: 1, - INCORRECT_PASSWORD: 2 - }; - var PasswordException = function PasswordExceptionClosure() { - function PasswordException(msg, code) { - this.name = 'PasswordException'; - this.message = msg; - this.code = code; - } - PasswordException.prototype = new Error(); - PasswordException.constructor = PasswordException; - return PasswordException; - }(); - var UnknownErrorException = function UnknownErrorExceptionClosure() { - function UnknownErrorException(msg, details) { - this.name = 'UnknownErrorException'; - this.message = msg; - this.details = details; - } - UnknownErrorException.prototype = new Error(); - UnknownErrorException.constructor = UnknownErrorException; - return UnknownErrorException; - }(); - var InvalidPDFException = function InvalidPDFExceptionClosure() { - function InvalidPDFException(msg) { - this.name = 'InvalidPDFException'; - this.message = msg; - } - InvalidPDFException.prototype = new Error(); - InvalidPDFException.constructor = InvalidPDFException; - return InvalidPDFException; - }(); - var MissingPDFException = function MissingPDFExceptionClosure() { - function MissingPDFException(msg) { - this.name = 'MissingPDFException'; - this.message = msg; - } - MissingPDFException.prototype = new Error(); - MissingPDFException.constructor = MissingPDFException; - return MissingPDFException; - }(); - var UnexpectedResponseException = function UnexpectedResponseExceptionClosure() { - function UnexpectedResponseException(msg, status) { - this.name = 'UnexpectedResponseException'; - this.message = msg; - this.status = status; - } - UnexpectedResponseException.prototype = new Error(); - UnexpectedResponseException.constructor = UnexpectedResponseException; - return UnexpectedResponseException; - }(); - var NotImplementedException = function NotImplementedExceptionClosure() { - function NotImplementedException(msg) { - this.message = msg; - } - NotImplementedException.prototype = new Error(); - NotImplementedException.prototype.name = 'NotImplementedException'; - NotImplementedException.constructor = NotImplementedException; - return NotImplementedException; - }(); - var MissingDataException = function MissingDataExceptionClosure() { - function MissingDataException(begin, end) { - this.begin = begin; - this.end = end; - this.message = 'Missing data [' + begin + ', ' + end + ')'; - } - MissingDataException.prototype = new Error(); - MissingDataException.prototype.name = 'MissingDataException'; - MissingDataException.constructor = MissingDataException; - return MissingDataException; - }(); - var XRefParseException = function XRefParseExceptionClosure() { - function XRefParseException(msg) { - this.message = msg; - } - XRefParseException.prototype = new Error(); - XRefParseException.prototype.name = 'XRefParseException'; - XRefParseException.constructor = XRefParseException; - return XRefParseException; - }(); - var NullCharactersRegExp = /\x00/g; - function removeNullCharacters(str) { - if (typeof str !== 'string') { - warn('The argument for removeNullCharacters must be a string.'); - return str; - } - return str.replace(NullCharactersRegExp, ''); - } - function bytesToString(bytes) { - assert(bytes !== null && typeof bytes === 'object' && bytes.length !== undefined, 'Invalid argument for bytesToString'); - var length = bytes.length; - var MAX_ARGUMENT_COUNT = 8192; - if (length < MAX_ARGUMENT_COUNT) { - return String.fromCharCode.apply(null, bytes); - } - var strBuf = []; - for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) { - var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); - var chunk = bytes.subarray(i, chunkEnd); - strBuf.push(String.fromCharCode.apply(null, chunk)); - } - return strBuf.join(''); - } - function stringToBytes(str) { - assert(typeof str === 'string', 'Invalid argument for stringToBytes'); - var length = str.length; - var bytes = new Uint8Array(length); - for (var i = 0; i < length; ++i) { - bytes[i] = str.charCodeAt(i) & 0xFF; - } - return bytes; - } - function arrayByteLength(arr) { - if (arr.length !== undefined) { - return arr.length; - } - assert(arr.byteLength !== undefined); - return arr.byteLength; - } - function arraysToBytes(arr) { - if (arr.length === 1 && arr[0] instanceof Uint8Array) { - return arr[0]; - } - var resultLength = 0; - var i, ii = arr.length; - var item, itemLength; - for (i = 0; i < ii; i++) { - item = arr[i]; - itemLength = arrayByteLength(item); - resultLength += itemLength; - } - var pos = 0; - var data = new Uint8Array(resultLength); - for (i = 0; i < ii; i++) { - item = arr[i]; - if (!(item instanceof Uint8Array)) { - if (typeof item === 'string') { - item = stringToBytes(item); - } else { - item = new Uint8Array(item); - } - } - itemLength = item.byteLength; - data.set(item, pos); - pos += itemLength; - } - return data; - } - function string32(value) { - return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); - } - function log2(x) { - var n = 1, i = 0; - while (x > n) { - n <<= 1; - i++; - } - return i; - } - function readInt8(data, start) { - return data[start] << 24 >> 24; - } - function readUint16(data, offset) { - return data[offset] << 8 | data[offset + 1]; - } - function readUint32(data, offset) { - return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; - } - function isLittleEndian() { - var buffer8 = new Uint8Array(2); - buffer8[0] = 1; - var buffer16 = new Uint16Array(buffer8.buffer); - return buffer16[0] === 1; - } - function isEvalSupported() { - try { - new Function(''); - return true; - } catch (e) { - return false; - } - } - var Uint32ArrayView = function Uint32ArrayViewClosure() { - function Uint32ArrayView(buffer, length) { - this.buffer = buffer; - this.byteLength = buffer.length; - this.length = length === undefined ? this.byteLength >> 2 : length; - ensureUint32ArrayViewProps(this.length); - } - Uint32ArrayView.prototype = Object.create(null); - var uint32ArrayViewSetters = 0; - function createUint32ArrayProp(index) { - return { - get: function () { - var buffer = this.buffer, offset = index << 2; - return (buffer[offset] | buffer[offset + 1] << 8 | buffer[offset + 2] << 16 | buffer[offset + 3] << 24) >>> 0; - }, - set: function (value) { - var buffer = this.buffer, offset = index << 2; - buffer[offset] = value & 255; - buffer[offset + 1] = value >> 8 & 255; - buffer[offset + 2] = value >> 16 & 255; - buffer[offset + 3] = value >>> 24 & 255; - } - }; - } - function ensureUint32ArrayViewProps(length) { - while (uint32ArrayViewSetters < length) { - Object.defineProperty(Uint32ArrayView.prototype, uint32ArrayViewSetters, createUint32ArrayProp(uint32ArrayViewSetters)); - uint32ArrayViewSetters++; - } - } - return Uint32ArrayView; - }(); - exports.Uint32ArrayView = Uint32ArrayView; - var IDENTITY_MATRIX = [ - 1, - 0, - 0, - 1, - 0, - 0 - ]; - var Util = function UtilClosure() { - function Util() { - } - var rgbBuf = [ - 'rgb(', - 0, - ',', - 0, - ',', - 0, - ')' - ]; - Util.makeCssRgb = function Util_makeCssRgb(r, g, b) { - rgbBuf[1] = r; - rgbBuf[3] = g; - rgbBuf[5] = b; - return rgbBuf.join(''); - }; - Util.transform = function Util_transform(m1, m2) { - return [ - m1[0] * m2[0] + m1[2] * m2[1], - m1[1] * m2[0] + m1[3] * m2[1], - m1[0] * m2[2] + m1[2] * m2[3], - m1[1] * m2[2] + m1[3] * m2[3], - m1[0] * m2[4] + m1[2] * m2[5] + m1[4], - m1[1] * m2[4] + m1[3] * m2[5] + m1[5] - ]; - }; - Util.applyTransform = function Util_applyTransform(p, m) { - var xt = p[0] * m[0] + p[1] * m[2] + m[4]; - var yt = p[0] * m[1] + p[1] * m[3] + m[5]; - return [ - xt, - yt - ]; - }; - Util.applyInverseTransform = function Util_applyInverseTransform(p, m) { - var d = m[0] * m[3] - m[1] * m[2]; - var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; - var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; - return [ - xt, - yt - ]; - }; - Util.getAxialAlignedBoundingBox = function Util_getAxialAlignedBoundingBox(r, m) { - var p1 = Util.applyTransform(r, m); - var p2 = Util.applyTransform(r.slice(2, 4), m); - var p3 = Util.applyTransform([ - r[0], - r[3] - ], m); - var p4 = Util.applyTransform([ - r[2], - r[1] - ], m); - return [ - Math.min(p1[0], p2[0], p3[0], p4[0]), - Math.min(p1[1], p2[1], p3[1], p4[1]), - Math.max(p1[0], p2[0], p3[0], p4[0]), - Math.max(p1[1], p2[1], p3[1], p4[1]) - ]; - }; - Util.inverseTransform = function Util_inverseTransform(m) { - var d = m[0] * m[3] - m[1] * m[2]; - return [ - m[3] / d, - -m[1] / d, - -m[2] / d, - m[0] / d, - (m[2] * m[5] - m[4] * m[3]) / d, - (m[4] * m[1] - m[5] * m[0]) / d - ]; - }; - Util.apply3dTransform = function Util_apply3dTransform(m, v) { - return [ - m[0] * v[0] + m[1] * v[1] + m[2] * v[2], - m[3] * v[0] + m[4] * v[1] + m[5] * v[2], - m[6] * v[0] + m[7] * v[1] + m[8] * v[2] - ]; - }; - Util.singularValueDecompose2dScale = function Util_singularValueDecompose2dScale(m) { - var transpose = [ - m[0], - m[2], - m[1], - m[3] - ]; - var a = m[0] * transpose[0] + m[1] * transpose[2]; - var b = m[0] * transpose[1] + m[1] * transpose[3]; - var c = m[2] * transpose[0] + m[3] * transpose[2]; - var d = m[2] * transpose[1] + m[3] * transpose[3]; - var first = (a + d) / 2; - var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2; - var sx = first + second || 1; - var sy = first - second || 1; - return [ - Math.sqrt(sx), - Math.sqrt(sy) - ]; - }; - Util.normalizeRect = function Util_normalizeRect(rect) { - var r = rect.slice(0); - if (rect[0] > rect[2]) { - r[0] = rect[2]; - r[2] = rect[0]; - } - if (rect[1] > rect[3]) { - r[1] = rect[3]; - r[3] = rect[1]; - } - return r; - }; - Util.intersect = function Util_intersect(rect1, rect2) { - function compare(a, b) { - return a - b; - } - var orderedX = [ - rect1[0], - rect1[2], - rect2[0], - rect2[2] - ].sort(compare), orderedY = [ - rect1[1], - rect1[3], - rect2[1], - rect2[3] - ].sort(compare), result = []; - rect1 = Util.normalizeRect(rect1); - rect2 = Util.normalizeRect(rect2); - if (orderedX[0] === rect1[0] && orderedX[1] === rect2[0] || orderedX[0] === rect2[0] && orderedX[1] === rect1[0]) { - result[0] = orderedX[1]; - result[2] = orderedX[2]; - } else { - return false; - } - if (orderedY[0] === rect1[1] && orderedY[1] === rect2[1] || orderedY[0] === rect2[1] && orderedY[1] === rect1[1]) { - result[1] = orderedY[1]; - result[3] = orderedY[2]; - } else { - return false; - } - return result; - }; - Util.sign = function Util_sign(num) { - return num < 0 ? -1 : 1; - }; - var ROMAN_NUMBER_MAP = [ - '', - 'C', - 'CC', - 'CCC', - 'CD', - 'D', - 'DC', - 'DCC', - 'DCCC', - 'CM', - '', - 'X', - 'XX', - 'XXX', - 'XL', - 'L', - 'LX', - 'LXX', - 'LXXX', - 'XC', - '', - 'I', - 'II', - 'III', - 'IV', - 'V', - 'VI', - 'VII', - 'VIII', - 'IX' - ]; - Util.toRoman = function Util_toRoman(number, lowerCase) { - assert(isInt(number) && number > 0, 'The number should be a positive integer.'); - var pos, romanBuf = []; - while (number >= 1000) { - number -= 1000; - romanBuf.push('M'); - } - pos = number / 100 | 0; - number %= 100; - romanBuf.push(ROMAN_NUMBER_MAP[pos]); - pos = number / 10 | 0; - number %= 10; - romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); - romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); - var romanStr = romanBuf.join(''); - return lowerCase ? romanStr.toLowerCase() : romanStr; - }; - Util.appendToArray = function Util_appendToArray(arr1, arr2) { - Array.prototype.push.apply(arr1, arr2); - }; - Util.prependToArray = function Util_prependToArray(arr1, arr2) { - Array.prototype.unshift.apply(arr1, arr2); - }; - Util.extendObj = function extendObj(obj1, obj2) { - for (var key in obj2) { - obj1[key] = obj2[key]; - } - }; - Util.getInheritableProperty = function Util_getInheritableProperty(dict, name, getArray) { - while (dict && !dict.has(name)) { - dict = dict.get('Parent'); - } - if (!dict) { - return null; - } - return getArray ? dict.getArray(name) : dict.get(name); - }; - Util.inherit = function Util_inherit(sub, base, prototype) { - sub.prototype = Object.create(base.prototype); - sub.prototype.constructor = sub; - for (var prop in prototype) { - sub.prototype[prop] = prototype[prop]; - } - }; - Util.loadScript = function Util_loadScript(src, callback) { - var script = document.createElement('script'); - var loaded = false; - script.setAttribute('src', src); - if (callback) { - script.onload = function () { - if (!loaded) { - callback(); - } - loaded = true; - }; - } - document.getElementsByTagName('head')[0].appendChild(script); - }; - return Util; - }(); - var PageViewport = function PageViewportClosure() { - function PageViewport(viewBox, scale, rotation, offsetX, offsetY, dontFlip) { - this.viewBox = viewBox; - this.scale = scale; - this.rotation = rotation; - this.offsetX = offsetX; - this.offsetY = offsetY; - var centerX = (viewBox[2] + viewBox[0]) / 2; - var centerY = (viewBox[3] + viewBox[1]) / 2; - var rotateA, rotateB, rotateC, rotateD; - rotation = rotation % 360; - rotation = rotation < 0 ? rotation + 360 : rotation; - switch (rotation) { - case 180: - rotateA = -1; - rotateB = 0; - rotateC = 0; - rotateD = 1; - break; - case 90: - rotateA = 0; - rotateB = 1; - rotateC = 1; - rotateD = 0; - break; - case 270: - rotateA = 0; - rotateB = -1; - rotateC = -1; - rotateD = 0; - break; - default: - rotateA = 1; - rotateB = 0; - rotateC = 0; - rotateD = -1; - break; - } - if (dontFlip) { - rotateC = -rotateC; - rotateD = -rotateD; - } - var offsetCanvasX, offsetCanvasY; - var width, height; - if (rotateA === 0) { - offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX; - offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY; - width = Math.abs(viewBox[3] - viewBox[1]) * scale; - height = Math.abs(viewBox[2] - viewBox[0]) * scale; - } else { - offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX; - offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY; - width = Math.abs(viewBox[2] - viewBox[0]) * scale; - height = Math.abs(viewBox[3] - viewBox[1]) * scale; - } - this.transform = [ - rotateA * scale, - rotateB * scale, - rotateC * scale, - rotateD * scale, - offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, - offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY - ]; - this.width = width; - this.height = height; - this.fontScale = scale; - } - PageViewport.prototype = { - clone: function PageViewPort_clone(args) { - args = args || {}; - var scale = 'scale' in args ? args.scale : this.scale; - var rotation = 'rotation' in args ? args.rotation : this.rotation; - return new PageViewport(this.viewBox.slice(), scale, rotation, this.offsetX, this.offsetY, args.dontFlip); - }, - convertToViewportPoint: function PageViewport_convertToViewportPoint(x, y) { - return Util.applyTransform([ - x, - y - ], this.transform); - }, - convertToViewportRectangle: function PageViewport_convertToViewportRectangle(rect) { - var tl = Util.applyTransform([ - rect[0], - rect[1] - ], this.transform); - var br = Util.applyTransform([ - rect[2], - rect[3] - ], this.transform); - return [ - tl[0], - tl[1], - br[0], - br[1] - ]; - }, - convertToPdfPoint: function PageViewport_convertToPdfPoint(x, y) { - return Util.applyInverseTransform([ - x, - y - ], this.transform); - } - }; - return PageViewport; - }(); - var PDFStringTranslateTable = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0x2D8, - 0x2C7, - 0x2C6, - 0x2D9, - 0x2DD, - 0x2DB, - 0x2DA, - 0x2DC, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0x2022, - 0x2020, - 0x2021, - 0x2026, - 0x2014, - 0x2013, - 0x192, - 0x2044, - 0x2039, - 0x203A, - 0x2212, - 0x2030, - 0x201E, - 0x201C, - 0x201D, - 0x2018, - 0x2019, - 0x201A, - 0x2122, - 0xFB01, - 0xFB02, - 0x141, - 0x152, - 0x160, - 0x178, - 0x17D, - 0x131, - 0x142, - 0x153, - 0x161, - 0x17E, - 0, - 0x20AC - ]; - function stringToPDFString(str) { - var i, n = str.length, strBuf = []; - if (str[0] === '\xFE' && str[1] === '\xFF') { - for (i = 2; i < n; i += 2) { - strBuf.push(String.fromCharCode(str.charCodeAt(i) << 8 | str.charCodeAt(i + 1))); - } - } else { - for (i = 0; i < n; ++i) { - var code = PDFStringTranslateTable[str.charCodeAt(i)]; - strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); - } - } - return strBuf.join(''); - } - function stringToUTF8String(str) { - return decodeURIComponent(escape(str)); - } - function utf8StringToString(str) { - return unescape(encodeURIComponent(str)); - } - function isEmptyObj(obj) { - for (var key in obj) { - return false; - } - return true; - } - function isBool(v) { - return typeof v === 'boolean'; - } - function isInt(v) { - return typeof v === 'number' && (v | 0) === v; - } - function isNum(v) { - return typeof v === 'number'; - } - function isString(v) { - return typeof v === 'string'; - } - function isArray(v) { - return v instanceof Array; - } - function isArrayBuffer(v) { - return typeof v === 'object' && v !== null && v.byteLength !== undefined; - } - function isSpace(ch) { - return ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A; - } - function createPromiseCapability() { - var capability = {}; - capability.promise = new Promise(function (resolve, reject) { - capability.resolve = resolve; - capability.reject = reject; - }); - return capability; - } - (function PromiseClosure() { - if (globalScope.Promise) { - if (typeof globalScope.Promise.all !== 'function') { - globalScope.Promise.all = function (iterable) { - var count = 0, results = [], resolve, reject; - var promise = new globalScope.Promise(function (resolve_, reject_) { - resolve = resolve_; - reject = reject_; - }); - iterable.forEach(function (p, i) { - count++; - p.then(function (result) { - results[i] = result; - count--; - if (count === 0) { - resolve(results); - } - }, reject); - }); - if (count === 0) { - resolve(results); - } - return promise; - }; - } - if (typeof globalScope.Promise.resolve !== 'function') { - globalScope.Promise.resolve = function (value) { - return new globalScope.Promise(function (resolve) { - resolve(value); - }); - }; - } - if (typeof globalScope.Promise.reject !== 'function') { - globalScope.Promise.reject = function (reason) { - return new globalScope.Promise(function (resolve, reject) { - reject(reason); - }); - }; - } - if (typeof globalScope.Promise.prototype.catch !== 'function') { - globalScope.Promise.prototype.catch = function (onReject) { - return globalScope.Promise.prototype.then(undefined, onReject); - }; - } - return; - } - var STATUS_PENDING = 0; - var STATUS_RESOLVED = 1; - var STATUS_REJECTED = 2; - var REJECTION_TIMEOUT = 500; - var HandlerManager = { - handlers: [], - running: false, - unhandledRejections: [], - pendingRejectionCheck: false, - scheduleHandlers: function scheduleHandlers(promise) { - if (promise._status === STATUS_PENDING) { - return; - } - this.handlers = this.handlers.concat(promise._handlers); - promise._handlers = []; - if (this.running) { - return; - } - this.running = true; - setTimeout(this.runHandlers.bind(this), 0); - }, - runHandlers: function runHandlers() { - var RUN_TIMEOUT = 1; - var timeoutAt = Date.now() + RUN_TIMEOUT; - while (this.handlers.length > 0) { - var handler = this.handlers.shift(); - var nextStatus = handler.thisPromise._status; - var nextValue = handler.thisPromise._value; - try { - if (nextStatus === STATUS_RESOLVED) { - if (typeof handler.onResolve === 'function') { - nextValue = handler.onResolve(nextValue); - } - } else if (typeof handler.onReject === 'function') { - nextValue = handler.onReject(nextValue); - nextStatus = STATUS_RESOLVED; - if (handler.thisPromise._unhandledRejection) { - this.removeUnhandeledRejection(handler.thisPromise); - } - } - } catch (ex) { - nextStatus = STATUS_REJECTED; - nextValue = ex; - } - handler.nextPromise._updateStatus(nextStatus, nextValue); - if (Date.now() >= timeoutAt) { - break; - } - } - if (this.handlers.length > 0) { - setTimeout(this.runHandlers.bind(this), 0); - return; - } - this.running = false; - }, - addUnhandledRejection: function addUnhandledRejection(promise) { - this.unhandledRejections.push({ - promise: promise, - time: Date.now() - }); - this.scheduleRejectionCheck(); - }, - removeUnhandeledRejection: function removeUnhandeledRejection(promise) { - promise._unhandledRejection = false; - for (var i = 0; i < this.unhandledRejections.length; i++) { - if (this.unhandledRejections[i].promise === promise) { - this.unhandledRejections.splice(i); - i--; - } - } - }, - scheduleRejectionCheck: function scheduleRejectionCheck() { - if (this.pendingRejectionCheck) { - return; - } - this.pendingRejectionCheck = true; - setTimeout(function rejectionCheck() { - this.pendingRejectionCheck = false; - var now = Date.now(); - for (var i = 0; i < this.unhandledRejections.length; i++) { - if (now - this.unhandledRejections[i].time > REJECTION_TIMEOUT) { - var unhandled = this.unhandledRejections[i].promise._value; - var msg = 'Unhandled rejection: ' + unhandled; - if (unhandled.stack) { - msg += '\n' + unhandled.stack; - } - warn(msg); - this.unhandledRejections.splice(i); - i--; - } - } - if (this.unhandledRejections.length) { - this.scheduleRejectionCheck(); - } - }.bind(this), REJECTION_TIMEOUT); - } - }; - var Promise = function Promise(resolver) { - this._status = STATUS_PENDING; - this._handlers = []; - try { - resolver.call(this, this._resolve.bind(this), this._reject.bind(this)); - } catch (e) { - this._reject(e); - } - }; - Promise.all = function Promise_all(promises) { - var resolveAll, rejectAll; - var deferred = new Promise(function (resolve, reject) { - resolveAll = resolve; - rejectAll = reject; - }); - var unresolved = promises.length; - var results = []; - if (unresolved === 0) { - resolveAll(results); - return deferred; - } - function reject(reason) { - if (deferred._status === STATUS_REJECTED) { - return; - } - results = []; - rejectAll(reason); - } - for (var i = 0, ii = promises.length; i < ii; ++i) { - var promise = promises[i]; - var resolve = function (i) { - return function (value) { - if (deferred._status === STATUS_REJECTED) { - return; - } - results[i] = value; - unresolved--; - if (unresolved === 0) { - resolveAll(results); - } - }; - }(i); - if (Promise.isPromise(promise)) { - promise.then(resolve, reject); - } else { - resolve(promise); - } - } - return deferred; - }; - Promise.isPromise = function Promise_isPromise(value) { - return value && typeof value.then === 'function'; - }; - Promise.resolve = function Promise_resolve(value) { - return new Promise(function (resolve) { - resolve(value); - }); - }; - Promise.reject = function Promise_reject(reason) { - return new Promise(function (resolve, reject) { - reject(reason); - }); - }; - Promise.prototype = { - _status: null, - _value: null, - _handlers: null, - _unhandledRejection: null, - _updateStatus: function Promise__updateStatus(status, value) { - if (this._status === STATUS_RESOLVED || this._status === STATUS_REJECTED) { - return; - } - if (status === STATUS_RESOLVED && Promise.isPromise(value)) { - value.then(this._updateStatus.bind(this, STATUS_RESOLVED), this._updateStatus.bind(this, STATUS_REJECTED)); - return; - } - this._status = status; - this._value = value; - if (status === STATUS_REJECTED && this._handlers.length === 0) { - this._unhandledRejection = true; - HandlerManager.addUnhandledRejection(this); - } - HandlerManager.scheduleHandlers(this); - }, - _resolve: function Promise_resolve(value) { - this._updateStatus(STATUS_RESOLVED, value); - }, - _reject: function Promise_reject(reason) { - this._updateStatus(STATUS_REJECTED, reason); - }, - then: function Promise_then(onResolve, onReject) { - var nextPromise = new Promise(function (resolve, reject) { - this.resolve = resolve; - this.reject = reject; - }); - this._handlers.push({ - thisPromise: this, - onResolve: onResolve, - onReject: onReject, - nextPromise: nextPromise - }); - HandlerManager.scheduleHandlers(this); - return nextPromise; - }, - catch: function Promise_catch(onReject) { - return this.then(undefined, onReject); - } - }; - globalScope.Promise = Promise; - }()); - (function WeakMapClosure() { - if (globalScope.WeakMap) { - return; - } - var id = 0; - function WeakMap() { - this.id = '$weakmap' + id++; - } - WeakMap.prototype = { - has: function (obj) { - return !!Object.getOwnPropertyDescriptor(obj, this.id); - }, - get: function (obj, defaultValue) { - return this.has(obj) ? obj[this.id] : defaultValue; - }, - set: function (obj, value) { - Object.defineProperty(obj, this.id, { - value: value, - enumerable: false, - configurable: true - }); - }, - delete: function (obj) { - delete obj[this.id]; - } - }; - globalScope.WeakMap = WeakMap; - }()); - var StatTimer = function StatTimerClosure() { - function rpad(str, pad, length) { - while (str.length < length) { - str += pad; - } - return str; - } - function StatTimer() { - this.started = Object.create(null); - this.times = []; - this.enabled = true; - } - StatTimer.prototype = { - time: function StatTimer_time(name) { - if (!this.enabled) { - return; - } - if (name in this.started) { - warn('Timer is already running for ' + name); - } - this.started[name] = Date.now(); - }, - timeEnd: function StatTimer_timeEnd(name) { - if (!this.enabled) { - return; - } - if (!(name in this.started)) { - warn('Timer has not been started for ' + name); - } - this.times.push({ - 'name': name, - 'start': this.started[name], - 'end': Date.now() - }); - delete this.started[name]; - }, - toString: function StatTimer_toString() { - var i, ii; - var times = this.times; - var out = ''; - var longest = 0; - for (i = 0, ii = times.length; i < ii; ++i) { - var name = times[i]['name']; - if (name.length > longest) { - longest = name.length; - } - } - for (i = 0, ii = times.length; i < ii; ++i) { - var span = times[i]; - var duration = span.end - span.start; - out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n'; - } - return out; - } - }; - return StatTimer; - }(); - var createBlob = function createBlob(data, contentType) { - if (typeof Blob !== 'undefined') { - return new Blob([data], { type: contentType }); - } - warn('The "Blob" constructor is not supported.'); - }; - var createObjectURL = function createObjectURLClosure() { - var digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - return function createObjectURL(data, contentType, forceDataSchema) { - if (!forceDataSchema && typeof URL !== 'undefined' && URL.createObjectURL) { - var blob = createBlob(data, contentType); - return URL.createObjectURL(blob); - } - var buffer = 'data:' + contentType + ';base64,'; - for (var i = 0, ii = data.length; i < ii; i += 3) { - var b1 = data[i] & 0xFF; - var b2 = data[i + 1] & 0xFF; - var b3 = data[i + 2] & 0xFF; - var d1 = b1 >> 2, d2 = (b1 & 3) << 4 | b2 >> 4; - var d3 = i + 1 < ii ? (b2 & 0xF) << 2 | b3 >> 6 : 64; - var d4 = i + 2 < ii ? b3 & 0x3F : 64; - buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4]; - } - return buffer; - }; - }(); - function MessageHandler(sourceName, targetName, comObj) { - this.sourceName = sourceName; - this.targetName = targetName; - this.comObj = comObj; - this.callbackIndex = 1; - this.postMessageTransfers = true; - var callbacksCapabilities = this.callbacksCapabilities = Object.create(null); - var ah = this.actionHandler = Object.create(null); - this._onComObjOnMessage = function messageHandlerComObjOnMessage(event) { - var data = event.data; - if (data.targetName !== this.sourceName) { - return; - } - if (data.isReply) { - var callbackId = data.callbackId; - if (data.callbackId in callbacksCapabilities) { - var callback = callbacksCapabilities[callbackId]; - delete callbacksCapabilities[callbackId]; - if ('error' in data) { - callback.reject(data.error); - } else { - callback.resolve(data.data); - } - } else { - error('Cannot resolve callback ' + callbackId); - } - } else if (data.action in ah) { - var action = ah[data.action]; - if (data.callbackId) { - var sourceName = this.sourceName; - var targetName = data.sourceName; - Promise.resolve().then(function () { - return action[0].call(action[1], data.data); - }).then(function (result) { - comObj.postMessage({ - sourceName: sourceName, - targetName: targetName, - isReply: true, - callbackId: data.callbackId, - data: result - }); - }, function (reason) { - if (reason instanceof Error) { - reason = reason + ''; - } - comObj.postMessage({ - sourceName: sourceName, - targetName: targetName, - isReply: true, - callbackId: data.callbackId, - error: reason - }); - }); - } else { - action[0].call(action[1], data.data); - } - } else { - error('Unknown action from worker: ' + data.action); - } - }.bind(this); - comObj.addEventListener('message', this._onComObjOnMessage); - } - MessageHandler.prototype = { - on: function messageHandlerOn(actionName, handler, scope) { - var ah = this.actionHandler; - if (ah[actionName]) { - error('There is already an actionName called "' + actionName + '"'); - } - ah[actionName] = [ - handler, - scope - ]; - }, - send: function messageHandlerSend(actionName, data, transfers) { - var message = { - sourceName: this.sourceName, - targetName: this.targetName, - action: actionName, - data: data - }; - this.postMessage(message, transfers); - }, - sendWithPromise: function messageHandlerSendWithPromise(actionName, data, transfers) { - var callbackId = this.callbackIndex++; - var message = { - sourceName: this.sourceName, - targetName: this.targetName, - action: actionName, - data: data, - callbackId: callbackId - }; - var capability = createPromiseCapability(); - this.callbacksCapabilities[callbackId] = capability; - try { - this.postMessage(message, transfers); - } catch (e) { - capability.reject(e); - } - return capability.promise; - }, - postMessage: function (message, transfers) { - if (transfers && this.postMessageTransfers) { - this.comObj.postMessage(message, transfers); - } else { - this.comObj.postMessage(message); - } - }, - destroy: function () { - this.comObj.removeEventListener('message', this._onComObjOnMessage); - } - }; - function loadJpegStream(id, imageUrl, objs) { - var img = new Image(); - img.onload = function loadJpegStream_onloadClosure() { - objs.resolve(id, img); - }; - img.onerror = function loadJpegStream_onerrorClosure() { - objs.resolve(id, null); - warn('Error during JPEG image loading'); - }; - img.src = imageUrl; - } - /* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - (function checkURLConstructor(scope) { - var hasWorkingUrl = false; - try { - if (typeof URL === 'function' && typeof URL.prototype === 'object' && 'origin' in URL.prototype) { - var u = new URL('b', 'http://a'); - u.pathname = 'c%20d'; - hasWorkingUrl = u.href === 'http://a/c%20d'; - } - } catch (e) { - } - if (hasWorkingUrl) { - return; - } - var relative = Object.create(null); - relative['ftp'] = 21; - relative['file'] = 0; - relative['gopher'] = 70; - relative['http'] = 80; - relative['https'] = 443; - relative['ws'] = 80; - relative['wss'] = 443; - var relativePathDotMapping = Object.create(null); - relativePathDotMapping['%2e'] = '.'; - relativePathDotMapping['.%2e'] = '..'; - relativePathDotMapping['%2e.'] = '..'; - relativePathDotMapping['%2e%2e'] = '..'; - function isRelativeScheme(scheme) { - return relative[scheme] !== undefined; - } - function invalid() { - clear.call(this); - this._isInvalid = true; - } - function IDNAToASCII(h) { - if (h === '') { - invalid.call(this); - } - return h.toLowerCase(); - } - function percentEscape(c) { - var unicode = c.charCodeAt(0); - if (unicode > 0x20 && unicode < 0x7F && [ - 0x22, - 0x23, - 0x3C, - 0x3E, - 0x3F, - 0x60 - ].indexOf(unicode) === -1) { - return c; - } - return encodeURIComponent(c); - } - function percentEscapeQuery(c) { - var unicode = c.charCodeAt(0); - if (unicode > 0x20 && unicode < 0x7F && [ - 0x22, - 0x23, - 0x3C, - 0x3E, - 0x60 - ].indexOf(unicode) === -1) { - return c; - } - return encodeURIComponent(c); - } - var EOF, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/; - function parse(input, stateOverride, base) { - function err(message) { - errors.push(message); - } - var state = stateOverride || 'scheme start', cursor = 0, buffer = '', seenAt = false, seenBracket = false, errors = []; - loop: - while ((input[cursor - 1] !== EOF || cursor === 0) && !this._isInvalid) { - var c = input[cursor]; - switch (state) { - case 'scheme start': - if (c && ALPHA.test(c)) { - buffer += c.toLowerCase(); - state = 'scheme'; - } else if (!stateOverride) { - buffer = ''; - state = 'no scheme'; - continue; - } else { - err('Invalid scheme.'); - break loop; - } - break; - case 'scheme': - if (c && ALPHANUMERIC.test(c)) { - buffer += c.toLowerCase(); - } else if (c === ':') { - this._scheme = buffer; - buffer = ''; - if (stateOverride) { - break loop; - } - if (isRelativeScheme(this._scheme)) { - this._isRelative = true; - } - if (this._scheme === 'file') { - state = 'relative'; - } else if (this._isRelative && base && base._scheme === this._scheme) { - state = 'relative or authority'; - } else if (this._isRelative) { - state = 'authority first slash'; - } else { - state = 'scheme data'; - } - } else if (!stateOverride) { - buffer = ''; - cursor = 0; - state = 'no scheme'; - continue; - } else if (EOF === c) { - break loop; - } else { - err('Code point not allowed in scheme: ' + c); - break loop; - } - break; - case 'scheme data': - if (c === '?') { - this._query = '?'; - state = 'query'; - } else if (c === '#') { - this._fragment = '#'; - state = 'fragment'; - } else { - if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) { - this._schemeData += percentEscape(c); - } - } - break; - case 'no scheme': - if (!base || !isRelativeScheme(base._scheme)) { - err('Missing scheme.'); - invalid.call(this); - } else { - state = 'relative'; - continue; - } - break; - case 'relative or authority': - if (c === '/' && input[cursor + 1] === '/') { - state = 'authority ignore slashes'; - } else { - err('Expected /, got: ' + c); - state = 'relative'; - continue; - } - break; - case 'relative': - this._isRelative = true; - if ('file' !== this._scheme) { - this._scheme = base._scheme; - } - if (EOF === c) { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._username = base._username; - this._password = base._password; - break loop; - } else if (c === '/' || c === '\\') { - if (c === '\\') { - err('\\ is an invalid code point.'); - } - state = 'relative slash'; - } else if (c === '?') { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = '?'; - this._username = base._username; - this._password = base._password; - state = 'query'; - } else if (c === '#') { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._fragment = '#'; - this._username = base._username; - this._password = base._password; - state = 'fragment'; - } else { - var nextC = input[cursor + 1]; - var nextNextC = input[cursor + 2]; - if ('file' !== this._scheme || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && '?' !== nextNextC && '#' !== nextNextC) { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - this._path = base._path.slice(); - this._path.pop(); - } - state = 'relative path'; - continue; - } - break; - case 'relative slash': - if (c === '/' || c === '\\') { - if (c === '\\') { - err('\\ is an invalid code point.'); - } - if (this._scheme === 'file') { - state = 'file host'; - } else { - state = 'authority ignore slashes'; - } - } else { - if ('file' !== this._scheme) { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - } - state = 'relative path'; - continue; - } - break; - case 'authority first slash': - if (c === '/') { - state = 'authority second slash'; - } else { - err('Expected \'/\', got: ' + c); - state = 'authority ignore slashes'; - continue; - } - break; - case 'authority second slash': - state = 'authority ignore slashes'; - if ('/' !== c) { - err('Expected \'/\', got: ' + c); - continue; - } - break; - case 'authority ignore slashes': - if ('/' !== c && '\\' !== c) { - state = 'authority'; - continue; - } else { - err('Expected authority, got: ' + c); - } - break; - case 'authority': - if (c === '@') { - if (seenAt) { - err('@ already seen.'); - buffer += '%40'; - } - seenAt = true; - for (var i = 0; i < buffer.length; i++) { - var cp = buffer[i]; - if (cp === '\t' || cp === '\n' || cp === '\r') { - err('Invalid whitespace in authority.'); - continue; - } - if (cp === ':' && this._password === null) { - this._password = ''; - continue; - } - var tempC = percentEscape(cp); - if (null !== this._password) { - this._password += tempC; - } else { - this._username += tempC; - } - } - buffer = ''; - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - cursor -= buffer.length; - buffer = ''; - state = 'host'; - continue; - } else { - buffer += c; - } - break; - case 'file host': - if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - if (buffer.length === 2 && ALPHA.test(buffer[0]) && (buffer[1] === ':' || buffer[1] === '|')) { - state = 'relative path'; - } else if (buffer.length === 0) { - state = 'relative path start'; - } else { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'relative path start'; - } - continue; - } else if (c === '\t' || c === '\n' || c === '\r') { - err('Invalid whitespace in file host.'); - } else { - buffer += c; - } - break; - case 'host': - case 'hostname': - if (c === ':' && !seenBracket) { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'port'; - if (stateOverride === 'hostname') { - break loop; - } - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'relative path start'; - if (stateOverride) { - break loop; - } - continue; - } else if ('\t' !== c && '\n' !== c && '\r' !== c) { - if (c === '[') { - seenBracket = true; - } else if (c === ']') { - seenBracket = false; - } - buffer += c; - } else { - err('Invalid code point in host/hostname: ' + c); - } - break; - case 'port': - if (/[0-9]/.test(c)) { - buffer += c; - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) { - if ('' !== buffer) { - var temp = parseInt(buffer, 10); - if (temp !== relative[this._scheme]) { - this._port = temp + ''; - } - buffer = ''; - } - if (stateOverride) { - break loop; - } - state = 'relative path start'; - continue; - } else if (c === '\t' || c === '\n' || c === '\r') { - err('Invalid code point in port: ' + c); - } else { - invalid.call(this); - } - break; - case 'relative path start': - if (c === '\\') { - err('\'\\\' not allowed in path.'); - } - state = 'relative path'; - if ('/' !== c && '\\' !== c) { - continue; - } - break; - case 'relative path': - if (c === EOF || c === '/' || c === '\\' || !stateOverride && (c === '?' || c === '#')) { - if (c === '\\') { - err('\\ not allowed in relative path.'); - } - var tmp; - if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { - buffer = tmp; - } - if (buffer === '..') { - this._path.pop(); - if ('/' !== c && '\\' !== c) { - this._path.push(''); - } - } else if (buffer === '.' && '/' !== c && '\\' !== c) { - this._path.push(''); - } else if ('.' !== buffer) { - if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') { - buffer = buffer[0] + ':'; - } - this._path.push(buffer); - } - buffer = ''; - if (c === '?') { - this._query = '?'; - state = 'query'; - } else if (c === '#') { - this._fragment = '#'; - state = 'fragment'; - } - } else if ('\t' !== c && '\n' !== c && '\r' !== c) { - buffer += percentEscape(c); - } - break; - case 'query': - if (!stateOverride && c === '#') { - this._fragment = '#'; - state = 'fragment'; - } else if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) { - this._query += percentEscapeQuery(c); - } - break; - case 'fragment': - if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) { - this._fragment += c; - } - break; - } - cursor++; - } - } - function clear() { - this._scheme = ''; - this._schemeData = ''; - this._username = ''; - this._password = null; - this._host = ''; - this._port = ''; - this._path = []; - this._query = ''; - this._fragment = ''; - this._isInvalid = false; - this._isRelative = false; - } - function JURL(url, base) - { - if (base !== undefined && !(base instanceof JURL)) { - base = new JURL(String(base)); - } - this._url = url; - clear.call(this); - var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ''); - parse.call(this, input, null, base); - } - JURL.prototype = { - toString: function () { - return this.href; - }, - get href() { - if (this._isInvalid) { - return this._url; - } - var authority = ''; - if ('' !== this._username || null !== this._password) { - authority = this._username + (null !== this._password ? ':' + this._password : '') + '@'; - } - return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment; - }, - set href(href) { - clear.call(this); - parse.call(this, href); - }, - get protocol() { - return this._scheme + ':'; - }, - set protocol(protocol) { - if (this._isInvalid) { - return; - } - parse.call(this, protocol + ':', 'scheme start'); - }, - get host() { - return this._isInvalid ? '' : this._port ? this._host + ':' + this._port : this._host; - }, - set host(host) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, host, 'host'); - }, - get hostname() { - return this._host; - }, - set hostname(hostname) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, hostname, 'hostname'); - }, - get port() { - return this._port; - }, - set port(port) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, port, 'port'); - }, - get pathname() { - return this._isInvalid ? '' : this._isRelative ? '/' + this._path.join('/') : this._schemeData; - }, - set pathname(pathname) { - if (this._isInvalid || !this._isRelative) { - return; - } - this._path = []; - parse.call(this, pathname, 'relative path start'); - }, - get search() { - return this._isInvalid || !this._query || this._query === '?' ? '' : this._query; - }, - set search(search) { - if (this._isInvalid || !this._isRelative) { - return; - } - this._query = '?'; - if (search[0] === '?') { - search = search.slice(1); - } - parse.call(this, search, 'query'); - }, - get hash() { - return this._isInvalid || !this._fragment || this._fragment === '#' ? '' : this._fragment; - }, - set hash(hash) { - if (this._isInvalid) { - return; - } - this._fragment = '#'; - if (hash[0] === '#') { - hash = hash.slice(1); - } - parse.call(this, hash, 'fragment'); - }, - get origin() { - var host; - if (this._isInvalid || !this._scheme) { - return ''; - } - switch (this._scheme) { - case 'data': - case 'file': - case 'javascript': - case 'mailto': - return 'null'; - } - host = this.host; - if (!host) { - return ''; - } - return this._scheme + '://' + host; - } - }; - var OriginalURL = scope.URL; - if (OriginalURL) { - JURL.createObjectURL = function (blob) { - return OriginalURL.createObjectURL.apply(OriginalURL, arguments); - }; - JURL.revokeObjectURL = function (url) { - OriginalURL.revokeObjectURL(url); - }; - } - scope.URL = JURL; - }(globalScope)); - exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX; - exports.IDENTITY_MATRIX = IDENTITY_MATRIX; - exports.OPS = OPS; - exports.VERBOSITY_LEVELS = VERBOSITY_LEVELS; - exports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES; - exports.AnnotationBorderStyleType = AnnotationBorderStyleType; - exports.AnnotationFieldFlag = AnnotationFieldFlag; - exports.AnnotationFlag = AnnotationFlag; - exports.AnnotationType = AnnotationType; - exports.FontType = FontType; - exports.ImageKind = ImageKind; - exports.InvalidPDFException = InvalidPDFException; - exports.MessageHandler = MessageHandler; - exports.MissingDataException = MissingDataException; - exports.MissingPDFException = MissingPDFException; - exports.NotImplementedException = NotImplementedException; - exports.PageViewport = PageViewport; - exports.PasswordException = PasswordException; - exports.PasswordResponses = PasswordResponses; - exports.StatTimer = StatTimer; - exports.StreamType = StreamType; - exports.TextRenderingMode = TextRenderingMode; - exports.UnexpectedResponseException = UnexpectedResponseException; - exports.UnknownErrorException = UnknownErrorException; - exports.Util = Util; - exports.XRefParseException = XRefParseException; - exports.arrayByteLength = arrayByteLength; - exports.arraysToBytes = arraysToBytes; - exports.assert = assert; - exports.bytesToString = bytesToString; - exports.createBlob = createBlob; - exports.createPromiseCapability = createPromiseCapability; - exports.createObjectURL = createObjectURL; - exports.deprecated = deprecated; - exports.error = error; - exports.getLookupTableFactory = getLookupTableFactory; - exports.getVerbosityLevel = getVerbosityLevel; - exports.globalScope = globalScope; - exports.info = info; - exports.isArray = isArray; - exports.isArrayBuffer = isArrayBuffer; - exports.isBool = isBool; - exports.isEmptyObj = isEmptyObj; - exports.isInt = isInt; - exports.isNum = isNum; - exports.isString = isString; - exports.isSpace = isSpace; - exports.isSameOrigin = isSameOrigin; - exports.createValidAbsoluteUrl = createValidAbsoluteUrl; - exports.isLittleEndian = isLittleEndian; - exports.isEvalSupported = isEvalSupported; - exports.loadJpegStream = loadJpegStream; - exports.log2 = log2; - exports.readInt8 = readInt8; - exports.readUint16 = readUint16; - exports.readUint32 = readUint32; - exports.removeNullCharacters = removeNullCharacters; - exports.setVerbosityLevel = setVerbosityLevel; - exports.shadow = shadow; - exports.string32 = string32; - exports.stringToBytes = stringToBytes; - exports.stringToPDFString = stringToPDFString; - exports.stringToUTF8String = stringToUTF8String; - exports.utf8StringToString = utf8StringToString; - exports.warn = warn; - })); - (function (root, factory) { - factory(root.pdfjsCoreBidi = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var warn = sharedUtil.warn; - var baseTypes = [ - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'S', - 'B', - 'S', - 'WS', - 'B', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'B', - 'B', - 'B', - 'S', - 'WS', - 'ON', - 'ON', - 'ET', - 'ET', - 'ET', - 'ON', - 'ON', - 'ON', - 'ON', - 'ON', - 'ES', - 'CS', - 'ES', - 'CS', - 'CS', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'CS', - 'ON', - 'ON', - 'ON', - 'ON', - 'ON', - 'ON', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'ON', - 'ON', - 'ON', - 'ON', - 'ON', - 'ON', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'ON', - 'ON', - 'ON', - 'ON', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'B', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'BN', - 'CS', - 'ON', - 'ET', - 'ET', - 'ET', - 'ET', - 'ON', - 'ON', - 'ON', - 'ON', - 'L', - 'ON', - 'ON', - 'BN', - 'ON', - 'ON', - 'ET', - 'ET', - 'EN', - 'EN', - 'ON', - 'L', - 'ON', - 'ON', - 'ON', - 'EN', - 'L', - 'ON', - 'ON', - 'ON', - 'ON', - 'ON', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'ON', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'ON', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L', - 'L' - ]; - var arabicTypes = [ - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'ON', - 'ON', - 'AL', - 'ET', - 'ET', - 'AL', - 'CS', - 'AL', - 'ON', - 'ON', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'AL', - 'AL', - '', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'AN', - 'ET', - 'AN', - 'AN', - 'AL', - 'AL', - 'AL', - 'NSM', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'AN', - 'ON', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'AL', - 'AL', - 'NSM', - 'NSM', - 'ON', - 'NSM', - 'NSM', - 'NSM', - 'NSM', - 'AL', - 'AL', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'EN', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL', - 'AL' - ]; - function isOdd(i) { - return (i & 1) !== 0; - } - function isEven(i) { - return (i & 1) === 0; - } - function findUnequal(arr, start, value) { - for (var j = start, jj = arr.length; j < jj; ++j) { - if (arr[j] !== value) { - return j; - } - } - return j; - } - function setValues(arr, start, end, value) { - for (var j = start; j < end; ++j) { - arr[j] = value; - } - } - function reverseValues(arr, start, end) { - for (var i = start, j = end - 1; i < j; ++i, --j) { - var temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - } - } - function createBidiText(str, isLTR, vertical) { - return { - str: str, - dir: vertical ? 'ttb' : isLTR ? 'ltr' : 'rtl' - }; - } - var chars = []; - var types = []; - function bidi(str, startLevel, vertical) { - var isLTR = true; - var strLength = str.length; - if (strLength === 0 || vertical) { - return createBidiText(str, isLTR, vertical); - } - chars.length = strLength; - types.length = strLength; - var numBidi = 0; - var i, ii; - for (i = 0; i < strLength; ++i) { - chars[i] = str.charAt(i); - var charCode = str.charCodeAt(i); - var charType = 'L'; - if (charCode <= 0x00ff) { - charType = baseTypes[charCode]; - } else if (0x0590 <= charCode && charCode <= 0x05f4) { - charType = 'R'; - } else if (0x0600 <= charCode && charCode <= 0x06ff) { - charType = arabicTypes[charCode & 0xff]; - if (!charType) { - warn('Bidi: invalid Unicode character ' + charCode.toString(16)); - } - } else if (0x0700 <= charCode && charCode <= 0x08AC) { - charType = 'AL'; - } - if (charType === 'R' || charType === 'AL' || charType === 'AN') { - numBidi++; - } - types[i] = charType; - } - if (numBidi === 0) { - isLTR = true; - return createBidiText(str, isLTR); - } - if (startLevel === -1) { - if (numBidi / strLength < 0.3) { - isLTR = true; - startLevel = 0; - } else { - isLTR = false; - startLevel = 1; - } - } - var levels = []; - for (i = 0; i < strLength; ++i) { - levels[i] = startLevel; - } - var e = isOdd(startLevel) ? 'R' : 'L'; - var sor = e; - var eor = sor; - var lastType = sor; - for (i = 0; i < strLength; ++i) { - if (types[i] === 'NSM') { - types[i] = lastType; - } else { - lastType = types[i]; - } - } - lastType = sor; - var t; - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'EN') { - types[i] = lastType === 'AL' ? 'AN' : 'EN'; - } else if (t === 'R' || t === 'L' || t === 'AL') { - lastType = t; - } - } - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'AL') { - types[i] = 'R'; - } - } - for (i = 1; i < strLength - 1; ++i) { - if (types[i] === 'ES' && types[i - 1] === 'EN' && types[i + 1] === 'EN') { - types[i] = 'EN'; - } - if (types[i] === 'CS' && (types[i - 1] === 'EN' || types[i - 1] === 'AN') && types[i + 1] === types[i - 1]) { - types[i] = types[i - 1]; - } - } - for (i = 0; i < strLength; ++i) { - if (types[i] === 'EN') { - var j; - for (j = i - 1; j >= 0; --j) { - if (types[j] !== 'ET') { - break; - } - types[j] = 'EN'; - } - for (j = i + 1; j < strLength; ++j) { - if (types[j] !== 'ET') { - break; - } - types[j] = 'EN'; - } - } - } - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'WS' || t === 'ES' || t === 'ET' || t === 'CS') { - types[i] = 'ON'; - } - } - lastType = sor; - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'EN') { - types[i] = lastType === 'L' ? 'L' : 'EN'; - } else if (t === 'R' || t === 'L') { - lastType = t; - } - } - for (i = 0; i < strLength; ++i) { - if (types[i] === 'ON') { - var end = findUnequal(types, i + 1, 'ON'); - var before = sor; - if (i > 0) { - before = types[i - 1]; - } - var after = eor; - if (end + 1 < strLength) { - after = types[end + 1]; - } - if (before !== 'L') { - before = 'R'; - } - if (after !== 'L') { - after = 'R'; - } - if (before === after) { - setValues(types, i, end, before); - } - i = end - 1; - } - } - for (i = 0; i < strLength; ++i) { - if (types[i] === 'ON') { - types[i] = e; - } - } - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (isEven(levels[i])) { - if (t === 'R') { - levels[i] += 1; - } else if (t === 'AN' || t === 'EN') { - levels[i] += 2; - } - } else { - if (t === 'L' || t === 'AN' || t === 'EN') { - levels[i] += 1; - } - } - } - var highestLevel = -1; - var lowestOddLevel = 99; - var level; - for (i = 0, ii = levels.length; i < ii; ++i) { - level = levels[i]; - if (highestLevel < level) { - highestLevel = level; - } - if (lowestOddLevel > level && isOdd(level)) { - lowestOddLevel = level; - } - } - for (level = highestLevel; level >= lowestOddLevel; --level) { - var start = -1; - for (i = 0, ii = levels.length; i < ii; ++i) { - if (levels[i] < level) { - if (start >= 0) { - reverseValues(chars, start, i); - start = -1; - } - } else if (start < 0) { - start = i; - } - } - if (start >= 0) { - reverseValues(chars, start, levels.length); - } - } - for (i = 0, ii = chars.length; i < ii; ++i) { - var ch = chars[i]; - if (ch === '<' || ch === '>') { - chars[i] = ''; - } - } - return createBidiText(chars.join(''), isLTR); - } - exports.bidi = bidi; - })); - (function (root, factory) { - factory(root.pdfjsCoreCFFParser = {}, root.pdfjsSharedUtil, root.pdfjsCoreCharsets, root.pdfjsCoreEncodings); - }(this, function (exports, sharedUtil, coreCharsets, coreEncodings) { - var error = sharedUtil.error; - var info = sharedUtil.info; - var bytesToString = sharedUtil.bytesToString; - var warn = sharedUtil.warn; - var isArray = sharedUtil.isArray; - var Util = sharedUtil.Util; - var stringToBytes = sharedUtil.stringToBytes; - var assert = sharedUtil.assert; - var ISOAdobeCharset = coreCharsets.ISOAdobeCharset; - var ExpertCharset = coreCharsets.ExpertCharset; - var ExpertSubsetCharset = coreCharsets.ExpertSubsetCharset; - var StandardEncoding = coreEncodings.StandardEncoding; - var ExpertEncoding = coreEncodings.ExpertEncoding; - var MAX_SUBR_NESTING = 10; - var CFFStandardStrings = [ - '.notdef', - 'space', - 'exclam', - 'quotedbl', - 'numbersign', - 'dollar', - 'percent', - 'ampersand', - 'quoteright', - 'parenleft', - 'parenright', - 'asterisk', - 'plus', - 'comma', - 'hyphen', - 'period', - 'slash', - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'colon', - 'semicolon', - 'less', - 'equal', - 'greater', - 'question', - 'at', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - 'bracketleft', - 'backslash', - 'bracketright', - 'asciicircum', - 'underscore', - 'quoteleft', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - 'braceleft', - 'bar', - 'braceright', - 'asciitilde', - 'exclamdown', - 'cent', - 'sterling', - 'fraction', - 'yen', - 'florin', - 'section', - 'currency', - 'quotesingle', - 'quotedblleft', - 'guillemotleft', - 'guilsinglleft', - 'guilsinglright', - 'fi', - 'fl', - 'endash', - 'dagger', - 'daggerdbl', - 'periodcentered', - 'paragraph', - 'bullet', - 'quotesinglbase', - 'quotedblbase', - 'quotedblright', - 'guillemotright', - 'ellipsis', - 'perthousand', - 'questiondown', - 'grave', - 'acute', - 'circumflex', - 'tilde', - 'macron', - 'breve', - 'dotaccent', - 'dieresis', - 'ring', - 'cedilla', - 'hungarumlaut', - 'ogonek', - 'caron', - 'emdash', - 'AE', - 'ordfeminine', - 'Lslash', - 'Oslash', - 'OE', - 'ordmasculine', - 'ae', - 'dotlessi', - 'lslash', - 'oslash', - 'oe', - 'germandbls', - 'onesuperior', - 'logicalnot', - 'mu', - 'trademark', - 'Eth', - 'onehalf', - 'plusminus', - 'Thorn', - 'onequarter', - 'divide', - 'brokenbar', - 'degree', - 'thorn', - 'threequarters', - 'twosuperior', - 'registered', - 'minus', - 'eth', - 'multiply', - 'threesuperior', - 'copyright', - 'Aacute', - 'Acircumflex', - 'Adieresis', - 'Agrave', - 'Aring', - 'Atilde', - 'Ccedilla', - 'Eacute', - 'Ecircumflex', - 'Edieresis', - 'Egrave', - 'Iacute', - 'Icircumflex', - 'Idieresis', - 'Igrave', - 'Ntilde', - 'Oacute', - 'Ocircumflex', - 'Odieresis', - 'Ograve', - 'Otilde', - 'Scaron', - 'Uacute', - 'Ucircumflex', - 'Udieresis', - 'Ugrave', - 'Yacute', - 'Ydieresis', - 'Zcaron', - 'aacute', - 'acircumflex', - 'adieresis', - 'agrave', - 'aring', - 'atilde', - 'ccedilla', - 'eacute', - 'ecircumflex', - 'edieresis', - 'egrave', - 'iacute', - 'icircumflex', - 'idieresis', - 'igrave', - 'ntilde', - 'oacute', - 'ocircumflex', - 'odieresis', - 'ograve', - 'otilde', - 'scaron', - 'uacute', - 'ucircumflex', - 'udieresis', - 'ugrave', - 'yacute', - 'ydieresis', - 'zcaron', - 'exclamsmall', - 'Hungarumlautsmall', - 'dollaroldstyle', - 'dollarsuperior', - 'ampersandsmall', - 'Acutesmall', - 'parenleftsuperior', - 'parenrightsuperior', - 'twodotenleader', - 'onedotenleader', - 'zerooldstyle', - 'oneoldstyle', - 'twooldstyle', - 'threeoldstyle', - 'fouroldstyle', - 'fiveoldstyle', - 'sixoldstyle', - 'sevenoldstyle', - 'eightoldstyle', - 'nineoldstyle', - 'commasuperior', - 'threequartersemdash', - 'periodsuperior', - 'questionsmall', - 'asuperior', - 'bsuperior', - 'centsuperior', - 'dsuperior', - 'esuperior', - 'isuperior', - 'lsuperior', - 'msuperior', - 'nsuperior', - 'osuperior', - 'rsuperior', - 'ssuperior', - 'tsuperior', - 'ff', - 'ffi', - 'ffl', - 'parenleftinferior', - 'parenrightinferior', - 'Circumflexsmall', - 'hyphensuperior', - 'Gravesmall', - 'Asmall', - 'Bsmall', - 'Csmall', - 'Dsmall', - 'Esmall', - 'Fsmall', - 'Gsmall', - 'Hsmall', - 'Ismall', - 'Jsmall', - 'Ksmall', - 'Lsmall', - 'Msmall', - 'Nsmall', - 'Osmall', - 'Psmall', - 'Qsmall', - 'Rsmall', - 'Ssmall', - 'Tsmall', - 'Usmall', - 'Vsmall', - 'Wsmall', - 'Xsmall', - 'Ysmall', - 'Zsmall', - 'colonmonetary', - 'onefitted', - 'rupiah', - 'Tildesmall', - 'exclamdownsmall', - 'centoldstyle', - 'Lslashsmall', - 'Scaronsmall', - 'Zcaronsmall', - 'Dieresissmall', - 'Brevesmall', - 'Caronsmall', - 'Dotaccentsmall', - 'Macronsmall', - 'figuredash', - 'hypheninferior', - 'Ogoneksmall', - 'Ringsmall', - 'Cedillasmall', - 'questiondownsmall', - 'oneeighth', - 'threeeighths', - 'fiveeighths', - 'seveneighths', - 'onethird', - 'twothirds', - 'zerosuperior', - 'foursuperior', - 'fivesuperior', - 'sixsuperior', - 'sevensuperior', - 'eightsuperior', - 'ninesuperior', - 'zeroinferior', - 'oneinferior', - 'twoinferior', - 'threeinferior', - 'fourinferior', - 'fiveinferior', - 'sixinferior', - 'seveninferior', - 'eightinferior', - 'nineinferior', - 'centinferior', - 'dollarinferior', - 'periodinferior', - 'commainferior', - 'Agravesmall', - 'Aacutesmall', - 'Acircumflexsmall', - 'Atildesmall', - 'Adieresissmall', - 'Aringsmall', - 'AEsmall', - 'Ccedillasmall', - 'Egravesmall', - 'Eacutesmall', - 'Ecircumflexsmall', - 'Edieresissmall', - 'Igravesmall', - 'Iacutesmall', - 'Icircumflexsmall', - 'Idieresissmall', - 'Ethsmall', - 'Ntildesmall', - 'Ogravesmall', - 'Oacutesmall', - 'Ocircumflexsmall', - 'Otildesmall', - 'Odieresissmall', - 'OEsmall', - 'Oslashsmall', - 'Ugravesmall', - 'Uacutesmall', - 'Ucircumflexsmall', - 'Udieresissmall', - 'Yacutesmall', - 'Thornsmall', - 'Ydieresissmall', - '001.000', - '001.001', - '001.002', - '001.003', - 'Black', - 'Bold', - 'Book', - 'Light', - 'Medium', - 'Regular', - 'Roman', - 'Semibold' - ]; - var CFFParser = function CFFParserClosure() { - var CharstringValidationData = [ - null, - { - id: 'hstem', - min: 2, - stackClearing: true, - stem: true - }, - null, - { - id: 'vstem', - min: 2, - stackClearing: true, - stem: true - }, - { - id: 'vmoveto', - min: 1, - stackClearing: true - }, - { - id: 'rlineto', - min: 2, - resetStack: true - }, - { - id: 'hlineto', - min: 1, - resetStack: true - }, - { - id: 'vlineto', - min: 1, - resetStack: true - }, - { - id: 'rrcurveto', - min: 6, - resetStack: true - }, - null, - { - id: 'callsubr', - min: 1, - undefStack: true - }, - { - id: 'return', - min: 0, - undefStack: true - }, - null, - null, - { - id: 'endchar', - min: 0, - stackClearing: true - }, - null, - null, - null, - { - id: 'hstemhm', - min: 2, - stackClearing: true, - stem: true - }, - { - id: 'hintmask', - min: 0, - stackClearing: true - }, - { - id: 'cntrmask', - min: 0, - stackClearing: true - }, - { - id: 'rmoveto', - min: 2, - stackClearing: true - }, - { - id: 'hmoveto', - min: 1, - stackClearing: true - }, - { - id: 'vstemhm', - min: 2, - stackClearing: true, - stem: true - }, - { - id: 'rcurveline', - min: 8, - resetStack: true - }, - { - id: 'rlinecurve', - min: 8, - resetStack: true - }, - { - id: 'vvcurveto', - min: 4, - resetStack: true - }, - { - id: 'hhcurveto', - min: 4, - resetStack: true - }, - null, - { - id: 'callgsubr', - min: 1, - undefStack: true - }, - { - id: 'vhcurveto', - min: 4, - resetStack: true - }, - { - id: 'hvcurveto', - min: 4, - resetStack: true - } - ]; - var CharstringValidationData12 = [ - null, - null, - null, - { - id: 'and', - min: 2, - stackDelta: -1 - }, - { - id: 'or', - min: 2, - stackDelta: -1 - }, - { - id: 'not', - min: 1, - stackDelta: 0 - }, - null, - null, - null, - { - id: 'abs', - min: 1, - stackDelta: 0 - }, - { - id: 'add', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] + stack[index - 1]; - } - }, - { - id: 'sub', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] - stack[index - 1]; - } - }, - { - id: 'div', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] / stack[index - 1]; - } - }, - null, - { - id: 'neg', - min: 1, - stackDelta: 0, - stackFn: function stack_div(stack, index) { - stack[index - 1] = -stack[index - 1]; - } - }, - { - id: 'eq', - min: 2, - stackDelta: -1 - }, - null, - null, - { - id: 'drop', - min: 1, - stackDelta: -1 - }, - null, - { - id: 'put', - min: 2, - stackDelta: -2 - }, - { - id: 'get', - min: 1, - stackDelta: 0 - }, - { - id: 'ifelse', - min: 4, - stackDelta: -3 - }, - { - id: 'random', - min: 0, - stackDelta: 1 - }, - { - id: 'mul', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] * stack[index - 1]; - } - }, - null, - { - id: 'sqrt', - min: 1, - stackDelta: 0 - }, - { - id: 'dup', - min: 1, - stackDelta: 1 - }, - { - id: 'exch', - min: 2, - stackDelta: 0 - }, - { - id: 'index', - min: 2, - stackDelta: 0 - }, - { - id: 'roll', - min: 3, - stackDelta: -2 - }, - null, - null, - null, - { - id: 'hflex', - min: 7, - resetStack: true - }, - { - id: 'flex', - min: 13, - resetStack: true - }, - { - id: 'hflex1', - min: 9, - resetStack: true - }, - { - id: 'flex1', - min: 11, - resetStack: true - } - ]; - function CFFParser(file, properties, seacAnalysisEnabled) { - this.bytes = file.getBytes(); - this.properties = properties; - this.seacAnalysisEnabled = !!seacAnalysisEnabled; - } - CFFParser.prototype = { - parse: function CFFParser_parse() { - var properties = this.properties; - var cff = new CFF(); - this.cff = cff; - var header = this.parseHeader(); - var nameIndex = this.parseIndex(header.endPos); - var topDictIndex = this.parseIndex(nameIndex.endPos); - var stringIndex = this.parseIndex(topDictIndex.endPos); - var globalSubrIndex = this.parseIndex(stringIndex.endPos); - var topDictParsed = this.parseDict(topDictIndex.obj.get(0)); - var topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings); - cff.header = header.obj; - cff.names = this.parseNameIndex(nameIndex.obj); - cff.strings = this.parseStringIndex(stringIndex.obj); - cff.topDict = topDict; - cff.globalSubrIndex = globalSubrIndex.obj; - this.parsePrivateDict(cff.topDict); - cff.isCIDFont = topDict.hasName('ROS'); - var charStringOffset = topDict.getByName('CharStrings'); - var charStringIndex = this.parseIndex(charStringOffset).obj; - var fontMatrix = topDict.getByName('FontMatrix'); - if (fontMatrix) { - properties.fontMatrix = fontMatrix; - } - var fontBBox = topDict.getByName('FontBBox'); - if (fontBBox) { - properties.ascent = fontBBox[3]; - properties.descent = fontBBox[1]; - properties.ascentScaled = true; - } - var charset, encoding; - if (cff.isCIDFont) { - var fdArrayIndex = this.parseIndex(topDict.getByName('FDArray')).obj; - for (var i = 0, ii = fdArrayIndex.count; i < ii; ++i) { - var dictRaw = fdArrayIndex.get(i); - var fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw), cff.strings); - this.parsePrivateDict(fontDict); - cff.fdArray.push(fontDict); - } - encoding = null; - charset = this.parseCharsets(topDict.getByName('charset'), charStringIndex.count, cff.strings, true); - cff.fdSelect = this.parseFDSelect(topDict.getByName('FDSelect'), charStringIndex.count); - } else { - charset = this.parseCharsets(topDict.getByName('charset'), charStringIndex.count, cff.strings, false); - encoding = this.parseEncoding(topDict.getByName('Encoding'), properties, cff.strings, charset.charset); - } - cff.charset = charset; - cff.encoding = encoding; - var charStringsAndSeacs = this.parseCharStrings(charStringIndex, topDict.privateDict.subrsIndex, globalSubrIndex.obj, cff.fdSelect, cff.fdArray); - cff.charStrings = charStringsAndSeacs.charStrings; - cff.seacs = charStringsAndSeacs.seacs; - cff.widths = charStringsAndSeacs.widths; - return cff; - }, - parseHeader: function CFFParser_parseHeader() { - var bytes = this.bytes; - var bytesLength = bytes.length; - var offset = 0; - while (offset < bytesLength && bytes[offset] !== 1) { - ++offset; - } - if (offset >= bytesLength) { - error('Invalid CFF header'); - } else if (offset !== 0) { - info('cff data is shifted'); - bytes = bytes.subarray(offset); - this.bytes = bytes; - } - var major = bytes[0]; - var minor = bytes[1]; - var hdrSize = bytes[2]; - var offSize = bytes[3]; - var header = new CFFHeader(major, minor, hdrSize, offSize); - return { - obj: header, - endPos: hdrSize - }; - }, - parseDict: function CFFParser_parseDict(dict) { - var pos = 0; - function parseOperand() { - var value = dict[pos++]; - if (value === 30) { - return parseFloatOperand(); - } else if (value === 28) { - value = dict[pos++]; - value = (value << 24 | dict[pos++] << 16) >> 16; - return value; - } else if (value === 29) { - value = dict[pos++]; - value = value << 8 | dict[pos++]; - value = value << 8 | dict[pos++]; - value = value << 8 | dict[pos++]; - return value; - } else if (value >= 32 && value <= 246) { - return value - 139; - } else if (value >= 247 && value <= 250) { - return (value - 247) * 256 + dict[pos++] + 108; - } else if (value >= 251 && value <= 254) { - return -((value - 251) * 256) - dict[pos++] - 108; - } - warn('CFFParser_parseDict: "' + value + '" is a reserved command.'); - return NaN; - } - function parseFloatOperand() { - var str = ''; - var eof = 15; - var lookup = [ - '0', - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - '.', - 'E', - 'E-', - null, - '-' - ]; - var length = dict.length; - while (pos < length) { - var b = dict[pos++]; - var b1 = b >> 4; - var b2 = b & 15; - if (b1 === eof) { - break; - } - str += lookup[b1]; - if (b2 === eof) { - break; - } - str += lookup[b2]; - } - return parseFloat(str); - } - var operands = []; - var entries = []; - pos = 0; - var end = dict.length; - while (pos < end) { - var b = dict[pos]; - if (b <= 21) { - if (b === 12) { - b = b << 8 | dict[++pos]; - } - entries.push([ - b, - operands - ]); - operands = []; - ++pos; - } else { - operands.push(parseOperand()); - } - } - return entries; - }, - parseIndex: function CFFParser_parseIndex(pos) { - var cffIndex = new CFFIndex(); - var bytes = this.bytes; - var count = bytes[pos++] << 8 | bytes[pos++]; - var offsets = []; - var end = pos; - var i, ii; - if (count !== 0) { - var offsetSize = bytes[pos++]; - var startPos = pos + (count + 1) * offsetSize - 1; - for (i = 0, ii = count + 1; i < ii; ++i) { - var offset = 0; - for (var j = 0; j < offsetSize; ++j) { - offset <<= 8; - offset += bytes[pos++]; - } - offsets.push(startPos + offset); - } - end = offsets[count]; - } - for (i = 0, ii = offsets.length - 1; i < ii; ++i) { - var offsetStart = offsets[i]; - var offsetEnd = offsets[i + 1]; - cffIndex.add(bytes.subarray(offsetStart, offsetEnd)); - } - return { - obj: cffIndex, - endPos: end - }; - }, - parseNameIndex: function CFFParser_parseNameIndex(index) { - var names = []; - for (var i = 0, ii = index.count; i < ii; ++i) { - var name = index.get(i); - var length = Math.min(name.length, 127); - var data = []; - for (var j = 0; j < length; ++j) { - var c = name[j]; - if (j === 0 && c === 0) { - data[j] = c; - continue; - } - if (c < 33 || c > 126 || c === 91 || c === 93 || c === 40 || c === 41 || c === 123 || c === 125 || c === 60 || c === 62 || c === 47 || c === 37 || c === 35) - { - data[j] = 95; - continue; - } - data[j] = c; - } - names.push(bytesToString(data)); - } - return names; - }, - parseStringIndex: function CFFParser_parseStringIndex(index) { - var strings = new CFFStrings(); - for (var i = 0, ii = index.count; i < ii; ++i) { - var data = index.get(i); - strings.add(bytesToString(data)); - } - return strings; - }, - createDict: function CFFParser_createDict(Type, dict, strings) { - var cffDict = new Type(strings); - for (var i = 0, ii = dict.length; i < ii; ++i) { - var pair = dict[i]; - var key = pair[0]; - var value = pair[1]; - cffDict.setByKey(key, value); - } - return cffDict; - }, - parseCharString: function CFFParser_parseCharString(state, data, localSubrIndex, globalSubrIndex) { - if (state.callDepth > MAX_SUBR_NESTING) { - return false; - } - var stackSize = state.stackSize; - var stack = state.stack; - var length = data.length; - for (var j = 0; j < length;) { - var value = data[j++]; - var validationCommand = null; - if (value === 12) { - var q = data[j++]; - if (q === 0) { - data[j - 2] = 139; - data[j - 1] = 22; - stackSize = 0; - } else { - validationCommand = CharstringValidationData12[q]; - } - } else if (value === 28) { - stack[stackSize] = (data[j] << 24 | data[j + 1] << 16) >> 16; - j += 2; - stackSize++; - } else if (value === 14) { - if (stackSize >= 4) { - stackSize -= 4; - if (this.seacAnalysisEnabled) { - state.seac = stack.slice(stackSize, stackSize + 4); - return false; - } - } - validationCommand = CharstringValidationData[value]; - } else if (value >= 32 && value <= 246) { - stack[stackSize] = value - 139; - stackSize++; - } else if (value >= 247 && value <= 254) { - stack[stackSize] = value < 251 ? (value - 247 << 8) + data[j] + 108 : -(value - 251 << 8) - data[j] - 108; - j++; - stackSize++; - } else if (value === 255) { - stack[stackSize] = (data[j] << 24 | data[j + 1] << 16 | data[j + 2] << 8 | data[j + 3]) / 65536; - j += 4; - stackSize++; - } else if (value === 19 || value === 20) { - state.hints += stackSize >> 1; - j += state.hints + 7 >> 3; - stackSize %= 2; - validationCommand = CharstringValidationData[value]; - } else if (value === 10 || value === 29) { - var subrsIndex; - if (value === 10) { - subrsIndex = localSubrIndex; - } else { - subrsIndex = globalSubrIndex; - } - if (!subrsIndex) { - validationCommand = CharstringValidationData[value]; - warn('Missing subrsIndex for ' + validationCommand.id); - return false; - } - var bias = 32768; - if (subrsIndex.count < 1240) { - bias = 107; - } else if (subrsIndex.count < 33900) { - bias = 1131; - } - var subrNumber = stack[--stackSize] + bias; - if (subrNumber < 0 || subrNumber >= subrsIndex.count) { - validationCommand = CharstringValidationData[value]; - warn('Out of bounds subrIndex for ' + validationCommand.id); - return false; - } - state.stackSize = stackSize; - state.callDepth++; - var valid = this.parseCharString(state, subrsIndex.get(subrNumber), localSubrIndex, globalSubrIndex); - if (!valid) { - return false; - } - state.callDepth--; - stackSize = state.stackSize; - continue; - } else if (value === 11) { - state.stackSize = stackSize; - return true; - } else { - validationCommand = CharstringValidationData[value]; - } - if (validationCommand) { - if (validationCommand.stem) { - state.hints += stackSize >> 1; - } - if ('min' in validationCommand) { - if (!state.undefStack && stackSize < validationCommand.min) { - warn('Not enough parameters for ' + validationCommand.id + '; actual: ' + stackSize + ', expected: ' + validationCommand.min); - return false; - } - } - if (state.firstStackClearing && validationCommand.stackClearing) { - state.firstStackClearing = false; - stackSize -= validationCommand.min; - if (stackSize >= 2 && validationCommand.stem) { - stackSize %= 2; - } else if (stackSize > 1) { - warn('Found too many parameters for stack-clearing command'); - } - if (stackSize > 0 && stack[stackSize - 1] >= 0) { - state.width = stack[stackSize - 1]; - } - } - if ('stackDelta' in validationCommand) { - if ('stackFn' in validationCommand) { - validationCommand.stackFn(stack, stackSize); - } - stackSize += validationCommand.stackDelta; - } else if (validationCommand.stackClearing) { - stackSize = 0; - } else if (validationCommand.resetStack) { - stackSize = 0; - state.undefStack = false; - } else if (validationCommand.undefStack) { - stackSize = 0; - state.undefStack = true; - state.firstStackClearing = false; - } - } - } - state.stackSize = stackSize; - return true; - }, - parseCharStrings: function CFFParser_parseCharStrings(charStrings, localSubrIndex, globalSubrIndex, fdSelect, fdArray) { - var seacs = []; - var widths = []; - var count = charStrings.count; - for (var i = 0; i < count; i++) { - var charstring = charStrings.get(i); - var state = { - callDepth: 0, - stackSize: 0, - stack: [], - undefStack: true, - hints: 0, - firstStackClearing: true, - seac: null, - width: null - }; - var valid = true; - var localSubrToUse = null; - if (fdSelect && fdArray.length) { - var fdIndex = fdSelect.getFDIndex(i); - if (fdIndex === -1) { - warn('Glyph index is not in fd select.'); - valid = false; - } - if (fdIndex >= fdArray.length) { - warn('Invalid fd index for glyph index.'); - valid = false; - } - if (valid) { - localSubrToUse = fdArray[fdIndex].privateDict.subrsIndex; - } - } else if (localSubrIndex) { - localSubrToUse = localSubrIndex; - } - if (valid) { - valid = this.parseCharString(state, charstring, localSubrToUse, globalSubrIndex); - } - if (state.width !== null) { - widths[i] = state.width; - } - if (state.seac !== null) { - seacs[i] = state.seac; - } - if (!valid) { - charStrings.set(i, new Uint8Array([14])); - } - } - return { - charStrings: charStrings, - seacs: seacs, - widths: widths - }; - }, - emptyPrivateDictionary: function CFFParser_emptyPrivateDictionary(parentDict) { - var privateDict = this.createDict(CFFPrivateDict, [], parentDict.strings); - parentDict.setByKey(18, [ - 0, - 0 - ]); - parentDict.privateDict = privateDict; - }, - parsePrivateDict: function CFFParser_parsePrivateDict(parentDict) { - if (!parentDict.hasName('Private')) { - this.emptyPrivateDictionary(parentDict); - return; - } - var privateOffset = parentDict.getByName('Private'); - if (!isArray(privateOffset) || privateOffset.length !== 2) { - parentDict.removeByName('Private'); - return; - } - var size = privateOffset[0]; - var offset = privateOffset[1]; - if (size === 0 || offset >= this.bytes.length) { - this.emptyPrivateDictionary(parentDict); - return; - } - var privateDictEnd = offset + size; - var dictData = this.bytes.subarray(offset, privateDictEnd); - var dict = this.parseDict(dictData); - var privateDict = this.createDict(CFFPrivateDict, dict, parentDict.strings); - parentDict.privateDict = privateDict; - if (!privateDict.getByName('Subrs')) { - return; - } - var subrsOffset = privateDict.getByName('Subrs'); - var relativeOffset = offset + subrsOffset; - if (subrsOffset === 0 || relativeOffset >= this.bytes.length) { - this.emptyPrivateDictionary(parentDict); - return; - } - var subrsIndex = this.parseIndex(relativeOffset); - privateDict.subrsIndex = subrsIndex.obj; - }, - parseCharsets: function CFFParser_parseCharsets(pos, length, strings, cid) { - if (pos === 0) { - return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE, ISOAdobeCharset); - } else if (pos === 1) { - return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT, ExpertCharset); - } else if (pos === 2) { - return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET, ExpertSubsetCharset); - } - var bytes = this.bytes; - var start = pos; - var format = bytes[pos++]; - var charset = ['.notdef']; - var id, count, i; - length -= 1; - switch (format) { - case 0: - for (i = 0; i < length; i++) { - id = bytes[pos++] << 8 | bytes[pos++]; - charset.push(cid ? id : strings.get(id)); - } - break; - case 1: - while (charset.length <= length) { - id = bytes[pos++] << 8 | bytes[pos++]; - count = bytes[pos++]; - for (i = 0; i <= count; i++) { - charset.push(cid ? id++ : strings.get(id++)); - } - } - break; - case 2: - while (charset.length <= length) { - id = bytes[pos++] << 8 | bytes[pos++]; - count = bytes[pos++] << 8 | bytes[pos++]; - for (i = 0; i <= count; i++) { - charset.push(cid ? id++ : strings.get(id++)); - } - } - break; - default: - error('Unknown charset format'); - } - var end = pos; - var raw = bytes.subarray(start, end); - return new CFFCharset(false, format, charset, raw); - }, - parseEncoding: function CFFParser_parseEncoding(pos, properties, strings, charset) { - var encoding = Object.create(null); - var bytes = this.bytes; - var predefined = false; - var hasSupplement = false; - var format, i, ii; - var raw = null; - function readSupplement() { - var supplementsCount = bytes[pos++]; - for (i = 0; i < supplementsCount; i++) { - var code = bytes[pos++]; - var sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff); - encoding[code] = charset.indexOf(strings.get(sid)); - } - } - if (pos === 0 || pos === 1) { - predefined = true; - format = pos; - var baseEncoding = pos ? ExpertEncoding : StandardEncoding; - for (i = 0, ii = charset.length; i < ii; i++) { - var index = baseEncoding.indexOf(charset[i]); - if (index !== -1) { - encoding[index] = i; - } - } - } else { - var dataStart = pos; - format = bytes[pos++]; - switch (format & 0x7f) { - case 0: - var glyphsCount = bytes[pos++]; - for (i = 1; i <= glyphsCount; i++) { - encoding[bytes[pos++]] = i; - } - break; - case 1: - var rangesCount = bytes[pos++]; - var gid = 1; - for (i = 0; i < rangesCount; i++) { - var start = bytes[pos++]; - var left = bytes[pos++]; - for (var j = start; j <= start + left; j++) { - encoding[j] = gid++; - } - } - break; - default: - error('Unknown encoding format: ' + format + ' in CFF'); - break; - } - var dataEnd = pos; - if (format & 0x80) { - bytes[dataStart] &= 0x7f; - readSupplement(); - hasSupplement = true; - } - raw = bytes.subarray(dataStart, dataEnd); - } - format = format & 0x7f; - return new CFFEncoding(predefined, format, encoding, raw); - }, - parseFDSelect: function CFFParser_parseFDSelect(pos, length) { - var start = pos; - var bytes = this.bytes; - var format = bytes[pos++]; - var fdSelect = [], rawBytes; - var i, invalidFirstGID = false; - switch (format) { - case 0: - for (i = 0; i < length; ++i) { - var id = bytes[pos++]; - fdSelect.push(id); - } - rawBytes = bytes.subarray(start, pos); - break; - case 3: - var rangesCount = bytes[pos++] << 8 | bytes[pos++]; - for (i = 0; i < rangesCount; ++i) { - var first = bytes[pos++] << 8 | bytes[pos++]; - if (i === 0 && first !== 0) { - warn('parseFDSelect: The first range must have a first GID of 0' + ' -- trying to recover.'); - invalidFirstGID = true; - first = 0; - } - var fdIndex = bytes[pos++]; - var next = bytes[pos] << 8 | bytes[pos + 1]; - for (var j = first; j < next; ++j) { - fdSelect.push(fdIndex); - } - } - pos += 2; - rawBytes = bytes.subarray(start, pos); - if (invalidFirstGID) { - rawBytes[3] = rawBytes[4] = 0; - } - break; - default: - error('parseFDSelect: Unknown format "' + format + '".'); - break; - } - assert(fdSelect.length === length, 'parseFDSelect: Invalid font data.'); - return new CFFFDSelect(fdSelect, rawBytes); - } - }; - return CFFParser; - }(); - var CFF = function CFFClosure() { - function CFF() { - this.header = null; - this.names = []; - this.topDict = null; - this.strings = new CFFStrings(); - this.globalSubrIndex = null; - this.encoding = null; - this.charset = null; - this.charStrings = null; - this.fdArray = []; - this.fdSelect = null; - this.isCIDFont = false; - } - return CFF; - }(); - var CFFHeader = function CFFHeaderClosure() { - function CFFHeader(major, minor, hdrSize, offSize) { - this.major = major; - this.minor = minor; - this.hdrSize = hdrSize; - this.offSize = offSize; - } - return CFFHeader; - }(); - var CFFStrings = function CFFStringsClosure() { - function CFFStrings() { - this.strings = []; - } - CFFStrings.prototype = { - get: function CFFStrings_get(index) { - if (index >= 0 && index <= 390) { - return CFFStandardStrings[index]; - } - if (index - 391 <= this.strings.length) { - return this.strings[index - 391]; - } - return CFFStandardStrings[0]; - }, - add: function CFFStrings_add(value) { - this.strings.push(value); - }, - get count() { - return this.strings.length; - } - }; - return CFFStrings; - }(); - var CFFIndex = function CFFIndexClosure() { - function CFFIndex() { - this.objects = []; - this.length = 0; - } - CFFIndex.prototype = { - add: function CFFIndex_add(data) { - this.length += data.length; - this.objects.push(data); - }, - set: function CFFIndex_set(index, data) { - this.length += data.length - this.objects[index].length; - this.objects[index] = data; - }, - get: function CFFIndex_get(index) { - return this.objects[index]; - }, - get count() { - return this.objects.length; - } - }; - return CFFIndex; - }(); - var CFFDict = function CFFDictClosure() { - function CFFDict(tables, strings) { - this.keyToNameMap = tables.keyToNameMap; - this.nameToKeyMap = tables.nameToKeyMap; - this.defaults = tables.defaults; - this.types = tables.types; - this.opcodes = tables.opcodes; - this.order = tables.order; - this.strings = strings; - this.values = Object.create(null); - } - CFFDict.prototype = { - setByKey: function CFFDict_setByKey(key, value) { - if (!(key in this.keyToNameMap)) { - return false; - } - var valueLength = value.length; - if (valueLength === 0) { - return true; - } - for (var i = 0; i < valueLength; i++) { - if (isNaN(value[i])) { - warn('Invalid CFFDict value: "' + value + '" for key "' + key + '".'); - return true; - } - } - var type = this.types[key]; - if (type === 'num' || type === 'sid' || type === 'offset') { - value = value[0]; - } - this.values[key] = value; - return true; - }, - setByName: function CFFDict_setByName(name, value) { - if (!(name in this.nameToKeyMap)) { - error('Invalid dictionary name "' + name + '"'); - } - this.values[this.nameToKeyMap[name]] = value; - }, - hasName: function CFFDict_hasName(name) { - return this.nameToKeyMap[name] in this.values; - }, - getByName: function CFFDict_getByName(name) { - if (!(name in this.nameToKeyMap)) { - error('Invalid dictionary name "' + name + '"'); - } - var key = this.nameToKeyMap[name]; - if (!(key in this.values)) { - return this.defaults[key]; - } - return this.values[key]; - }, - removeByName: function CFFDict_removeByName(name) { - delete this.values[this.nameToKeyMap[name]]; - } - }; - CFFDict.createTables = function CFFDict_createTables(layout) { - var tables = { - keyToNameMap: {}, - nameToKeyMap: {}, - defaults: {}, - types: {}, - opcodes: {}, - order: [] - }; - for (var i = 0, ii = layout.length; i < ii; ++i) { - var entry = layout[i]; - var key = isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0]; - tables.keyToNameMap[key] = entry[1]; - tables.nameToKeyMap[entry[1]] = key; - tables.types[key] = entry[2]; - tables.defaults[key] = entry[3]; - tables.opcodes[key] = isArray(entry[0]) ? entry[0] : [entry[0]]; - tables.order.push(key); - } - return tables; - }; - return CFFDict; - }(); - var CFFTopDict = function CFFTopDictClosure() { - var layout = [ - [ - [ - 12, - 30 - ], - 'ROS', - [ - 'sid', - 'sid', - 'num' - ], - null - ], - [ - [ - 12, - 20 - ], - 'SyntheticBase', - 'num', - null - ], - [ - 0, - 'version', - 'sid', - null - ], - [ - 1, - 'Notice', - 'sid', - null - ], - [ - [ - 12, - 0 - ], - 'Copyright', - 'sid', - null - ], - [ - 2, - 'FullName', - 'sid', - null - ], - [ - 3, - 'FamilyName', - 'sid', - null - ], - [ - 4, - 'Weight', - 'sid', - null - ], - [ - [ - 12, - 1 - ], - 'isFixedPitch', - 'num', - 0 - ], - [ - [ - 12, - 2 - ], - 'ItalicAngle', - 'num', - 0 - ], - [ - [ - 12, - 3 - ], - 'UnderlinePosition', - 'num', - -100 - ], - [ - [ - 12, - 4 - ], - 'UnderlineThickness', - 'num', - 50 - ], - [ - [ - 12, - 5 - ], - 'PaintType', - 'num', - 0 - ], - [ - [ - 12, - 6 - ], - 'CharstringType', - 'num', - 2 - ], - [ - [ - 12, - 7 - ], - 'FontMatrix', - [ - 'num', - 'num', - 'num', - 'num', - 'num', - 'num' - ], - [ - 0.001, - 0, - 0, - 0.001, - 0, - 0 - ] - ], - [ - 13, - 'UniqueID', - 'num', - null - ], - [ - 5, - 'FontBBox', - [ - 'num', - 'num', - 'num', - 'num' - ], - [ - 0, - 0, - 0, - 0 - ] - ], - [ - [ - 12, - 8 - ], - 'StrokeWidth', - 'num', - 0 - ], - [ - 14, - 'XUID', - 'array', - null - ], - [ - 15, - 'charset', - 'offset', - 0 - ], - [ - 16, - 'Encoding', - 'offset', - 0 - ], - [ - 17, - 'CharStrings', - 'offset', - 0 - ], - [ - 18, - 'Private', - [ - 'offset', - 'offset' - ], - null - ], - [ - [ - 12, - 21 - ], - 'PostScript', - 'sid', - null - ], - [ - [ - 12, - 22 - ], - 'BaseFontName', - 'sid', - null - ], - [ - [ - 12, - 23 - ], - 'BaseFontBlend', - 'delta', - null - ], - [ - [ - 12, - 31 - ], - 'CIDFontVersion', - 'num', - 0 - ], - [ - [ - 12, - 32 - ], - 'CIDFontRevision', - 'num', - 0 - ], - [ - [ - 12, - 33 - ], - 'CIDFontType', - 'num', - 0 - ], - [ - [ - 12, - 34 - ], - 'CIDCount', - 'num', - 8720 - ], - [ - [ - 12, - 35 - ], - 'UIDBase', - 'num', - null - ], - [ - [ - 12, - 37 - ], - 'FDSelect', - 'offset', - null - ], - [ - [ - 12, - 36 - ], - 'FDArray', - 'offset', - null - ], - [ - [ - 12, - 38 - ], - 'FontName', - 'sid', - null - ] - ]; - var tables = null; - function CFFTopDict(strings) { - if (tables === null) { - tables = CFFDict.createTables(layout); - } - CFFDict.call(this, tables, strings); - this.privateDict = null; - } - CFFTopDict.prototype = Object.create(CFFDict.prototype); - return CFFTopDict; - }(); - var CFFPrivateDict = function CFFPrivateDictClosure() { - var layout = [ - [ - 6, - 'BlueValues', - 'delta', - null - ], - [ - 7, - 'OtherBlues', - 'delta', - null - ], - [ - 8, - 'FamilyBlues', - 'delta', - null - ], - [ - 9, - 'FamilyOtherBlues', - 'delta', - null - ], - [ - [ - 12, - 9 - ], - 'BlueScale', - 'num', - 0.039625 - ], - [ - [ - 12, - 10 - ], - 'BlueShift', - 'num', - 7 - ], - [ - [ - 12, - 11 - ], - 'BlueFuzz', - 'num', - 1 - ], - [ - 10, - 'StdHW', - 'num', - null - ], - [ - 11, - 'StdVW', - 'num', - null - ], - [ - [ - 12, - 12 - ], - 'StemSnapH', - 'delta', - null - ], - [ - [ - 12, - 13 - ], - 'StemSnapV', - 'delta', - null - ], - [ - [ - 12, - 14 - ], - 'ForceBold', - 'num', - 0 - ], - [ - [ - 12, - 17 - ], - 'LanguageGroup', - 'num', - 0 - ], - [ - [ - 12, - 18 - ], - 'ExpansionFactor', - 'num', - 0.06 - ], - [ - [ - 12, - 19 - ], - 'initialRandomSeed', - 'num', - 0 - ], - [ - 20, - 'defaultWidthX', - 'num', - 0 - ], - [ - 21, - 'nominalWidthX', - 'num', - 0 - ], - [ - 19, - 'Subrs', - 'offset', - null - ] - ]; - var tables = null; - function CFFPrivateDict(strings) { - if (tables === null) { - tables = CFFDict.createTables(layout); - } - CFFDict.call(this, tables, strings); - this.subrsIndex = null; - } - CFFPrivateDict.prototype = Object.create(CFFDict.prototype); - return CFFPrivateDict; - }(); - var CFFCharsetPredefinedTypes = { - ISO_ADOBE: 0, - EXPERT: 1, - EXPERT_SUBSET: 2 - }; - var CFFCharset = function CFFCharsetClosure() { - function CFFCharset(predefined, format, charset, raw) { - this.predefined = predefined; - this.format = format; - this.charset = charset; - this.raw = raw; - } - return CFFCharset; - }(); - var CFFEncoding = function CFFEncodingClosure() { - function CFFEncoding(predefined, format, encoding, raw) { - this.predefined = predefined; - this.format = format; - this.encoding = encoding; - this.raw = raw; - } - return CFFEncoding; - }(); - var CFFFDSelect = function CFFFDSelectClosure() { - function CFFFDSelect(fdSelect, raw) { - this.fdSelect = fdSelect; - this.raw = raw; - } - CFFFDSelect.prototype = { - getFDIndex: function CFFFDSelect_get(glyphIndex) { - if (glyphIndex < 0 || glyphIndex >= this.fdSelect.length) { - return -1; - } - return this.fdSelect[glyphIndex]; - } - }; - return CFFFDSelect; - }(); - var CFFOffsetTracker = function CFFOffsetTrackerClosure() { - function CFFOffsetTracker() { - this.offsets = Object.create(null); - } - CFFOffsetTracker.prototype = { - isTracking: function CFFOffsetTracker_isTracking(key) { - return key in this.offsets; - }, - track: function CFFOffsetTracker_track(key, location) { - if (key in this.offsets) { - error('Already tracking location of ' + key); - } - this.offsets[key] = location; - }, - offset: function CFFOffsetTracker_offset(value) { - for (var key in this.offsets) { - this.offsets[key] += value; - } - }, - setEntryLocation: function CFFOffsetTracker_setEntryLocation(key, values, output) { - if (!(key in this.offsets)) { - error('Not tracking location of ' + key); - } - var data = output.data; - var dataOffset = this.offsets[key]; - var size = 5; - for (var i = 0, ii = values.length; i < ii; ++i) { - var offset0 = i * size + dataOffset; - var offset1 = offset0 + 1; - var offset2 = offset0 + 2; - var offset3 = offset0 + 3; - var offset4 = offset0 + 4; - if (data[offset0] !== 0x1d || data[offset1] !== 0 || data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) { - error('writing to an offset that is not empty'); - } - var value = values[i]; - data[offset0] = 0x1d; - data[offset1] = value >> 24 & 0xFF; - data[offset2] = value >> 16 & 0xFF; - data[offset3] = value >> 8 & 0xFF; - data[offset4] = value & 0xFF; - } - } - }; - return CFFOffsetTracker; - }(); - var CFFCompiler = function CFFCompilerClosure() { - function CFFCompiler(cff) { - this.cff = cff; - } - CFFCompiler.prototype = { - compile: function CFFCompiler_compile() { - var cff = this.cff; - var output = { - data: [], - length: 0, - add: function CFFCompiler_add(data) { - this.data = this.data.concat(data); - this.length = this.data.length; - } - }; - var header = this.compileHeader(cff.header); - output.add(header); - var nameIndex = this.compileNameIndex(cff.names); - output.add(nameIndex); - if (cff.isCIDFont) { - if (cff.topDict.hasName('FontMatrix')) { - var base = cff.topDict.getByName('FontMatrix'); - cff.topDict.removeByName('FontMatrix'); - for (var i = 0, ii = cff.fdArray.length; i < ii; i++) { - var subDict = cff.fdArray[i]; - var matrix = base.slice(0); - if (subDict.hasName('FontMatrix')) { - matrix = Util.transform(matrix, subDict.getByName('FontMatrix')); - } - subDict.setByName('FontMatrix', matrix); - } - } - } - var compiled = this.compileTopDicts([cff.topDict], output.length, cff.isCIDFont); - output.add(compiled.output); - var topDictTracker = compiled.trackers[0]; - var stringIndex = this.compileStringIndex(cff.strings.strings); - output.add(stringIndex); - var globalSubrIndex = this.compileIndex(cff.globalSubrIndex); - output.add(globalSubrIndex); - if (cff.encoding && cff.topDict.hasName('Encoding')) { - if (cff.encoding.predefined) { - topDictTracker.setEntryLocation('Encoding', [cff.encoding.format], output); - } else { - var encoding = this.compileEncoding(cff.encoding); - topDictTracker.setEntryLocation('Encoding', [output.length], output); - output.add(encoding); - } - } - if (cff.charset && cff.topDict.hasName('charset')) { - if (cff.charset.predefined) { - topDictTracker.setEntryLocation('charset', [cff.charset.format], output); - } else { - var charset = this.compileCharset(cff.charset); - topDictTracker.setEntryLocation('charset', [output.length], output); - output.add(charset); - } - } - var charStrings = this.compileCharStrings(cff.charStrings); - topDictTracker.setEntryLocation('CharStrings', [output.length], output); - output.add(charStrings); - if (cff.isCIDFont) { - topDictTracker.setEntryLocation('FDSelect', [output.length], output); - var fdSelect = this.compileFDSelect(cff.fdSelect.raw); - output.add(fdSelect); - compiled = this.compileTopDicts(cff.fdArray, output.length, true); - topDictTracker.setEntryLocation('FDArray', [output.length], output); - output.add(compiled.output); - var fontDictTrackers = compiled.trackers; - this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output); - } - this.compilePrivateDicts([cff.topDict], [topDictTracker], output); - output.add([0]); - return output.data; - }, - encodeNumber: function CFFCompiler_encodeNumber(value) { - if (parseFloat(value) === parseInt(value, 10) && !isNaN(value)) { - return this.encodeInteger(value); - } - return this.encodeFloat(value); - }, - encodeFloat: function CFFCompiler_encodeFloat(num) { - var value = num.toString(); - var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value); - if (m) { - var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length)); - value = (Math.round(num * epsilon) / epsilon).toString(); - } - var nibbles = ''; - var i, ii; - for (i = 0, ii = value.length; i < ii; ++i) { - var a = value[i]; - if (a === 'e') { - nibbles += value[++i] === '-' ? 'c' : 'b'; - } else if (a === '.') { - nibbles += 'a'; - } else if (a === '-') { - nibbles += 'e'; - } else { - nibbles += a; - } - } - nibbles += nibbles.length & 1 ? 'f' : 'ff'; - var out = [30]; - for (i = 0, ii = nibbles.length; i < ii; i += 2) { - out.push(parseInt(nibbles.substr(i, 2), 16)); - } - return out; - }, - encodeInteger: function CFFCompiler_encodeInteger(value) { - var code; - if (value >= -107 && value <= 107) { - code = [value + 139]; - } else if (value >= 108 && value <= 1131) { - value = value - 108; - code = [ - (value >> 8) + 247, - value & 0xFF - ]; - } else if (value >= -1131 && value <= -108) { - value = -value - 108; - code = [ - (value >> 8) + 251, - value & 0xFF - ]; - } else if (value >= -32768 && value <= 32767) { - code = [ - 0x1c, - value >> 8 & 0xFF, - value & 0xFF - ]; - } else { - code = [ - 0x1d, - value >> 24 & 0xFF, - value >> 16 & 0xFF, - value >> 8 & 0xFF, - value & 0xFF - ]; - } - return code; - }, - compileHeader: function CFFCompiler_compileHeader(header) { - return [ - header.major, - header.minor, - header.hdrSize, - header.offSize - ]; - }, - compileNameIndex: function CFFCompiler_compileNameIndex(names) { - var nameIndex = new CFFIndex(); - for (var i = 0, ii = names.length; i < ii; ++i) { - nameIndex.add(stringToBytes(names[i])); - } - return this.compileIndex(nameIndex); - }, - compileTopDicts: function CFFCompiler_compileTopDicts(dicts, length, removeCidKeys) { - var fontDictTrackers = []; - var fdArrayIndex = new CFFIndex(); - for (var i = 0, ii = dicts.length; i < ii; ++i) { - var fontDict = dicts[i]; - if (removeCidKeys) { - fontDict.removeByName('CIDFontVersion'); - fontDict.removeByName('CIDFontRevision'); - fontDict.removeByName('CIDFontType'); - fontDict.removeByName('CIDCount'); - fontDict.removeByName('UIDBase'); - } - var fontDictTracker = new CFFOffsetTracker(); - var fontDictData = this.compileDict(fontDict, fontDictTracker); - fontDictTrackers.push(fontDictTracker); - fdArrayIndex.add(fontDictData); - fontDictTracker.offset(length); - } - fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers); - return { - trackers: fontDictTrackers, - output: fdArrayIndex - }; - }, - compilePrivateDicts: function CFFCompiler_compilePrivateDicts(dicts, trackers, output) { - for (var i = 0, ii = dicts.length; i < ii; ++i) { - var fontDict = dicts[i]; - assert(fontDict.privateDict && fontDict.hasName('Private'), 'There must be an private dictionary.'); - var privateDict = fontDict.privateDict; - var privateDictTracker = new CFFOffsetTracker(); - var privateDictData = this.compileDict(privateDict, privateDictTracker); - var outputLength = output.length; - privateDictTracker.offset(outputLength); - if (!privateDictData.length) { - outputLength = 0; - } - trackers[i].setEntryLocation('Private', [ - privateDictData.length, - outputLength - ], output); - output.add(privateDictData); - if (privateDict.subrsIndex && privateDict.hasName('Subrs')) { - var subrs = this.compileIndex(privateDict.subrsIndex); - privateDictTracker.setEntryLocation('Subrs', [privateDictData.length], output); - output.add(subrs); - } - } - }, - compileDict: function CFFCompiler_compileDict(dict, offsetTracker) { - var out = []; - var order = dict.order; - for (var i = 0; i < order.length; ++i) { - var key = order[i]; - if (!(key in dict.values)) { - continue; - } - var values = dict.values[key]; - var types = dict.types[key]; - if (!isArray(types)) { - types = [types]; - } - if (!isArray(values)) { - values = [values]; - } - if (values.length === 0) { - continue; - } - for (var j = 0, jj = types.length; j < jj; ++j) { - var type = types[j]; - var value = values[j]; - switch (type) { - case 'num': - case 'sid': - out = out.concat(this.encodeNumber(value)); - break; - case 'offset': - var name = dict.keyToNameMap[key]; - if (!offsetTracker.isTracking(name)) { - offsetTracker.track(name, out.length); - } - out = out.concat([ - 0x1d, - 0, - 0, - 0, - 0 - ]); - break; - case 'array': - case 'delta': - out = out.concat(this.encodeNumber(value)); - for (var k = 1, kk = values.length; k < kk; ++k) { - out = out.concat(this.encodeNumber(values[k])); - } - break; - default: - error('Unknown data type of ' + type); - break; - } - } - out = out.concat(dict.opcodes[key]); - } - return out; - }, - compileStringIndex: function CFFCompiler_compileStringIndex(strings) { - var stringIndex = new CFFIndex(); - for (var i = 0, ii = strings.length; i < ii; ++i) { - stringIndex.add(stringToBytes(strings[i])); - } - return this.compileIndex(stringIndex); - }, - compileGlobalSubrIndex: function CFFCompiler_compileGlobalSubrIndex() { - var globalSubrIndex = this.cff.globalSubrIndex; - this.out.writeByteArray(this.compileIndex(globalSubrIndex)); - }, - compileCharStrings: function CFFCompiler_compileCharStrings(charStrings) { - return this.compileIndex(charStrings); - }, - compileCharset: function CFFCompiler_compileCharset(charset) { - return this.compileTypedArray(charset.raw); - }, - compileEncoding: function CFFCompiler_compileEncoding(encoding) { - return this.compileTypedArray(encoding.raw); - }, - compileFDSelect: function CFFCompiler_compileFDSelect(fdSelect) { - return this.compileTypedArray(fdSelect); - }, - compileTypedArray: function CFFCompiler_compileTypedArray(data) { - var out = []; - for (var i = 0, ii = data.length; i < ii; ++i) { - out[i] = data[i]; - } - return out; - }, - compileIndex: function CFFCompiler_compileIndex(index, trackers) { - trackers = trackers || []; - var objects = index.objects; - var count = objects.length; - if (count === 0) { - return [ - 0, - 0, - 0 - ]; - } - var data = [ - count >> 8 & 0xFF, - count & 0xff - ]; - var lastOffset = 1, i; - for (i = 0; i < count; ++i) { - lastOffset += objects[i].length; - } - var offsetSize; - if (lastOffset < 0x100) { - offsetSize = 1; - } else if (lastOffset < 0x10000) { - offsetSize = 2; - } else if (lastOffset < 0x1000000) { - offsetSize = 3; - } else { - offsetSize = 4; - } - data.push(offsetSize); - var relativeOffset = 1; - for (i = 0; i < count + 1; i++) { - if (offsetSize === 1) { - data.push(relativeOffset & 0xFF); - } else if (offsetSize === 2) { - data.push(relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF); - } else if (offsetSize === 3) { - data.push(relativeOffset >> 16 & 0xFF, relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF); - } else { - data.push(relativeOffset >>> 24 & 0xFF, relativeOffset >> 16 & 0xFF, relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF); - } - if (objects[i]) { - relativeOffset += objects[i].length; - } - } - for (i = 0; i < count; i++) { - if (trackers[i]) { - trackers[i].offset(data.length); - } - for (var j = 0, jj = objects[i].length; j < jj; j++) { - data.push(objects[i][j]); - } - } - return data; - } - }; - return CFFCompiler; - }(); - exports.CFFStandardStrings = CFFStandardStrings; - exports.CFFParser = CFFParser; - exports.CFF = CFF; - exports.CFFHeader = CFFHeader; - exports.CFFStrings = CFFStrings; - exports.CFFIndex = CFFIndex; - exports.CFFCharset = CFFCharset; - exports.CFFTopDict = CFFTopDict; - exports.CFFPrivateDict = CFFPrivateDict; - exports.CFFCompiler = CFFCompiler; - })); - (function (root, factory) { - factory(root.pdfjsCoreChunkedStream = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var MissingDataException = sharedUtil.MissingDataException; - var arrayByteLength = sharedUtil.arrayByteLength; - var arraysToBytes = sharedUtil.arraysToBytes; - var assert = sharedUtil.assert; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var isInt = sharedUtil.isInt; - var isEmptyObj = sharedUtil.isEmptyObj; - var ChunkedStream = function ChunkedStreamClosure() { - function ChunkedStream(length, chunkSize, manager) { - this.bytes = new Uint8Array(length); - this.start = 0; - this.pos = 0; - this.end = length; - this.chunkSize = chunkSize; - this.loadedChunks = []; - this.numChunksLoaded = 0; - this.numChunks = Math.ceil(length / chunkSize); - this.manager = manager; - this.progressiveDataLength = 0; - this.lastSuccessfulEnsureByteChunk = -1; - } - ChunkedStream.prototype = { - getMissingChunks: function ChunkedStream_getMissingChunks() { - var chunks = []; - for (var chunk = 0, n = this.numChunks; chunk < n; ++chunk) { - if (!this.loadedChunks[chunk]) { - chunks.push(chunk); - } - } - return chunks; - }, - getBaseStreams: function ChunkedStream_getBaseStreams() { - return [this]; - }, - allChunksLoaded: function ChunkedStream_allChunksLoaded() { - return this.numChunksLoaded === this.numChunks; - }, - onReceiveData: function ChunkedStream_onReceiveData(begin, chunk) { - var end = begin + chunk.byteLength; - assert(begin % this.chunkSize === 0, 'Bad begin offset: ' + begin); - var length = this.bytes.length; - assert(end % this.chunkSize === 0 || end === length, 'Bad end offset: ' + end); - this.bytes.set(new Uint8Array(chunk), begin); - var chunkSize = this.chunkSize; - var beginChunk = Math.floor(begin / chunkSize); - var endChunk = Math.floor((end - 1) / chunkSize) + 1; - var curChunk; - for (curChunk = beginChunk; curChunk < endChunk; ++curChunk) { - if (!this.loadedChunks[curChunk]) { - this.loadedChunks[curChunk] = true; - ++this.numChunksLoaded; - } - } - }, - onReceiveProgressiveData: function ChunkedStream_onReceiveProgressiveData(data) { - var position = this.progressiveDataLength; - var beginChunk = Math.floor(position / this.chunkSize); - this.bytes.set(new Uint8Array(data), position); - position += data.byteLength; - this.progressiveDataLength = position; - var endChunk = position >= this.end ? this.numChunks : Math.floor(position / this.chunkSize); - var curChunk; - for (curChunk = beginChunk; curChunk < endChunk; ++curChunk) { - if (!this.loadedChunks[curChunk]) { - this.loadedChunks[curChunk] = true; - ++this.numChunksLoaded; - } - } - }, - ensureByte: function ChunkedStream_ensureByte(pos) { - var chunk = Math.floor(pos / this.chunkSize); - if (chunk === this.lastSuccessfulEnsureByteChunk) { - return; - } - if (!this.loadedChunks[chunk]) { - throw new MissingDataException(pos, pos + 1); - } - this.lastSuccessfulEnsureByteChunk = chunk; - }, - ensureRange: function ChunkedStream_ensureRange(begin, end) { - if (begin >= end) { - return; - } - if (end <= this.progressiveDataLength) { - return; - } - var chunkSize = this.chunkSize; - var beginChunk = Math.floor(begin / chunkSize); - var endChunk = Math.floor((end - 1) / chunkSize) + 1; - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - if (!this.loadedChunks[chunk]) { - throw new MissingDataException(begin, end); - } - } - }, - nextEmptyChunk: function ChunkedStream_nextEmptyChunk(beginChunk) { - var chunk, numChunks = this.numChunks; - for (var i = 0; i < numChunks; ++i) { - chunk = (beginChunk + i) % numChunks; - if (!this.loadedChunks[chunk]) { - return chunk; - } - } - return null; - }, - hasChunk: function ChunkedStream_hasChunk(chunk) { - return !!this.loadedChunks[chunk]; - }, - get length() { - return this.end - this.start; - }, - get isEmpty() { - return this.length === 0; - }, - getByte: function ChunkedStream_getByte() { - var pos = this.pos; - if (pos >= this.end) { - return -1; - } - this.ensureByte(pos); - return this.bytes[this.pos++]; - }, - getUint16: function ChunkedStream_getUint16() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }, - getInt32: function ChunkedStream_getInt32() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }, - getBytes: function ChunkedStream_getBytes(length) { - var bytes = this.bytes; - var pos = this.pos; - var strEnd = this.end; - if (!length) { - this.ensureRange(pos, strEnd); - return bytes.subarray(pos, strEnd); - } - var end = pos + length; - if (end > strEnd) { - end = strEnd; - } - this.ensureRange(pos, end); - this.pos = end; - return bytes.subarray(pos, end); - }, - peekByte: function ChunkedStream_peekByte() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }, - peekBytes: function ChunkedStream_peekBytes(length) { - var bytes = this.getBytes(length); - this.pos -= bytes.length; - return bytes; - }, - getByteRange: function ChunkedStream_getBytes(begin, end) { - this.ensureRange(begin, end); - return this.bytes.subarray(begin, end); - }, - skip: function ChunkedStream_skip(n) { - if (!n) { - n = 1; - } - this.pos += n; - }, - reset: function ChunkedStream_reset() { - this.pos = this.start; - }, - moveStart: function ChunkedStream_moveStart() { - this.start = this.pos; - }, - makeSubStream: function ChunkedStream_makeSubStream(start, length, dict) { - this.ensureRange(start, start + length); - function ChunkedStreamSubstream() { - } - ChunkedStreamSubstream.prototype = Object.create(this); - ChunkedStreamSubstream.prototype.getMissingChunks = function () { - var chunkSize = this.chunkSize; - var beginChunk = Math.floor(this.start / chunkSize); - var endChunk = Math.floor((this.end - 1) / chunkSize) + 1; - var missingChunks = []; - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - if (!this.loadedChunks[chunk]) { - missingChunks.push(chunk); - } - } - return missingChunks; - }; - var subStream = new ChunkedStreamSubstream(); - subStream.pos = subStream.start = start; - subStream.end = start + length || this.end; - subStream.dict = dict; - return subStream; - }, - isStream: true - }; - return ChunkedStream; - }(); - var ChunkedStreamManager = function ChunkedStreamManagerClosure() { - function ChunkedStreamManager(pdfNetworkStream, args) { - var chunkSize = args.rangeChunkSize; - var length = args.length; - this.stream = new ChunkedStream(length, chunkSize, this); - this.length = length; - this.chunkSize = chunkSize; - this.pdfNetworkStream = pdfNetworkStream; - this.url = args.url; - this.disableAutoFetch = args.disableAutoFetch; - this.msgHandler = args.msgHandler; - this.currRequestId = 0; - this.chunksNeededByRequest = Object.create(null); - this.requestsByChunk = Object.create(null); - this.promisesByRequest = Object.create(null); - this.progressiveDataLength = 0; - this.aborted = false; - this._loadedStreamCapability = createPromiseCapability(); - } - ChunkedStreamManager.prototype = { - onLoadedStream: function ChunkedStreamManager_getLoadedStream() { - return this._loadedStreamCapability.promise; - }, - sendRequest: function ChunkedStreamManager_sendRequest(begin, end) { - var rangeReader = this.pdfNetworkStream.getRangeReader(begin, end); - if (!rangeReader.isStreamingSupported) { - rangeReader.onProgress = this.onProgress.bind(this); - } - var chunks = [], loaded = 0; - var manager = this; - var promise = new Promise(function (resolve, reject) { - var readChunk = function (chunk) { - try { - if (!chunk.done) { - var data = chunk.value; - chunks.push(data); - loaded += arrayByteLength(data); - if (rangeReader.isStreamingSupported) { - manager.onProgress({ loaded: loaded }); - } - rangeReader.read().then(readChunk, reject); - return; - } - var chunkData = arraysToBytes(chunks); - chunks = null; - resolve(chunkData); - } catch (e) { - reject(e); - } - }; - rangeReader.read().then(readChunk, reject); - }); - promise.then(function (data) { - if (this.aborted) { - return; - } - this.onReceiveData({ - chunk: data, - begin: begin - }); - }.bind(this)); - }, - requestAllChunks: function ChunkedStreamManager_requestAllChunks() { - var missingChunks = this.stream.getMissingChunks(); - this._requestChunks(missingChunks); - return this._loadedStreamCapability.promise; - }, - _requestChunks: function ChunkedStreamManager_requestChunks(chunks) { - var requestId = this.currRequestId++; - var i, ii; - var chunksNeeded = Object.create(null); - this.chunksNeededByRequest[requestId] = chunksNeeded; - for (i = 0, ii = chunks.length; i < ii; i++) { - if (!this.stream.hasChunk(chunks[i])) { - chunksNeeded[chunks[i]] = true; - } - } - if (isEmptyObj(chunksNeeded)) { - return Promise.resolve(); - } - var capability = createPromiseCapability(); - this.promisesByRequest[requestId] = capability; - var chunksToRequest = []; - for (var chunk in chunksNeeded) { - chunk = chunk | 0; - if (!(chunk in this.requestsByChunk)) { - this.requestsByChunk[chunk] = []; - chunksToRequest.push(chunk); - } - this.requestsByChunk[chunk].push(requestId); - } - if (!chunksToRequest.length) { - return capability.promise; - } - var groupedChunksToRequest = this.groupChunks(chunksToRequest); - for (i = 0; i < groupedChunksToRequest.length; ++i) { - var groupedChunk = groupedChunksToRequest[i]; - var begin = groupedChunk.beginChunk * this.chunkSize; - var end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length); - this.sendRequest(begin, end); - } - return capability.promise; - }, - getStream: function ChunkedStreamManager_getStream() { - return this.stream; - }, - requestRange: function ChunkedStreamManager_requestRange(begin, end) { - end = Math.min(end, this.length); - var beginChunk = this.getBeginChunk(begin); - var endChunk = this.getEndChunk(end); - var chunks = []; - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - chunks.push(chunk); - } - return this._requestChunks(chunks); - }, - requestRanges: function ChunkedStreamManager_requestRanges(ranges) { - ranges = ranges || []; - var chunksToRequest = []; - for (var i = 0; i < ranges.length; i++) { - var beginChunk = this.getBeginChunk(ranges[i].begin); - var endChunk = this.getEndChunk(ranges[i].end); - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - if (chunksToRequest.indexOf(chunk) < 0) { - chunksToRequest.push(chunk); - } - } - } - chunksToRequest.sort(function (a, b) { - return a - b; - }); - return this._requestChunks(chunksToRequest); - }, - groupChunks: function ChunkedStreamManager_groupChunks(chunks) { - var groupedChunks = []; - var beginChunk = -1; - var prevChunk = -1; - for (var i = 0; i < chunks.length; ++i) { - var chunk = chunks[i]; - if (beginChunk < 0) { - beginChunk = chunk; - } - if (prevChunk >= 0 && prevChunk + 1 !== chunk) { - groupedChunks.push({ - beginChunk: beginChunk, - endChunk: prevChunk + 1 - }); - beginChunk = chunk; - } - if (i + 1 === chunks.length) { - groupedChunks.push({ - beginChunk: beginChunk, - endChunk: chunk + 1 - }); - } - prevChunk = chunk; - } - return groupedChunks; - }, - onProgress: function ChunkedStreamManager_onProgress(args) { - var bytesLoaded = this.stream.numChunksLoaded * this.chunkSize + args.loaded; - this.msgHandler.send('DocProgress', { - loaded: bytesLoaded, - total: this.length - }); - }, - onReceiveData: function ChunkedStreamManager_onReceiveData(args) { - var chunk = args.chunk; - var isProgressive = args.begin === undefined; - var begin = isProgressive ? this.progressiveDataLength : args.begin; - var end = begin + chunk.byteLength; - var beginChunk = Math.floor(begin / this.chunkSize); - var endChunk = end < this.length ? Math.floor(end / this.chunkSize) : Math.ceil(end / this.chunkSize); - if (isProgressive) { - this.stream.onReceiveProgressiveData(chunk); - this.progressiveDataLength = end; - } else { - this.stream.onReceiveData(begin, chunk); - } - if (this.stream.allChunksLoaded()) { - this._loadedStreamCapability.resolve(this.stream); - } - var loadedRequests = []; - var i, requestId; - for (chunk = beginChunk; chunk < endChunk; ++chunk) { - var requestIds = this.requestsByChunk[chunk] || []; - delete this.requestsByChunk[chunk]; - for (i = 0; i < requestIds.length; ++i) { - requestId = requestIds[i]; - var chunksNeeded = this.chunksNeededByRequest[requestId]; - if (chunk in chunksNeeded) { - delete chunksNeeded[chunk]; - } - if (!isEmptyObj(chunksNeeded)) { - continue; - } - loadedRequests.push(requestId); - } - } - if (!this.disableAutoFetch && isEmptyObj(this.requestsByChunk)) { - var nextEmptyChunk; - if (this.stream.numChunksLoaded === 1) { - var lastChunk = this.stream.numChunks - 1; - if (!this.stream.hasChunk(lastChunk)) { - nextEmptyChunk = lastChunk; - } - } else { - nextEmptyChunk = this.stream.nextEmptyChunk(endChunk); - } - if (isInt(nextEmptyChunk)) { - this._requestChunks([nextEmptyChunk]); - } - } - for (i = 0; i < loadedRequests.length; ++i) { - requestId = loadedRequests[i]; - var capability = this.promisesByRequest[requestId]; - delete this.promisesByRequest[requestId]; - capability.resolve(); - } - this.msgHandler.send('DocProgress', { - loaded: this.stream.numChunksLoaded * this.chunkSize, - total: this.length - }); - }, - onError: function ChunkedStreamManager_onError(err) { - this._loadedStreamCapability.reject(err); - }, - getBeginChunk: function ChunkedStreamManager_getBeginChunk(begin) { - var chunk = Math.floor(begin / this.chunkSize); - return chunk; - }, - getEndChunk: function ChunkedStreamManager_getEndChunk(end) { - var chunk = Math.floor((end - 1) / this.chunkSize) + 1; - return chunk; - }, - abort: function ChunkedStreamManager_abort() { - this.aborted = true; - if (this.pdfNetworkStream) { - this.pdfNetworkStream.cancelAllRequests('abort'); - } - for (var requestId in this.promisesByRequest) { - var capability = this.promisesByRequest[requestId]; - capability.reject(new Error('Request was aborted')); - } - } - }; - return ChunkedStreamManager; - }(); - exports.ChunkedStream = ChunkedStream; - exports.ChunkedStreamManager = ChunkedStreamManager; - })); - (function (root, factory) { - factory(root.pdfjsCoreGlyphList = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var getLookupTableFactory = sharedUtil.getLookupTableFactory; - var getGlyphsUnicode = getLookupTableFactory(function (t) { - t['A'] = 0x0041; - t['AE'] = 0x00C6; - t['AEacute'] = 0x01FC; - t['AEmacron'] = 0x01E2; - t['AEsmall'] = 0xF7E6; - t['Aacute'] = 0x00C1; - t['Aacutesmall'] = 0xF7E1; - t['Abreve'] = 0x0102; - t['Abreveacute'] = 0x1EAE; - t['Abrevecyrillic'] = 0x04D0; - t['Abrevedotbelow'] = 0x1EB6; - t['Abrevegrave'] = 0x1EB0; - t['Abrevehookabove'] = 0x1EB2; - t['Abrevetilde'] = 0x1EB4; - t['Acaron'] = 0x01CD; - t['Acircle'] = 0x24B6; - t['Acircumflex'] = 0x00C2; - t['Acircumflexacute'] = 0x1EA4; - t['Acircumflexdotbelow'] = 0x1EAC; - t['Acircumflexgrave'] = 0x1EA6; - t['Acircumflexhookabove'] = 0x1EA8; - t['Acircumflexsmall'] = 0xF7E2; - t['Acircumflextilde'] = 0x1EAA; - t['Acute'] = 0xF6C9; - t['Acutesmall'] = 0xF7B4; - t['Acyrillic'] = 0x0410; - t['Adblgrave'] = 0x0200; - t['Adieresis'] = 0x00C4; - t['Adieresiscyrillic'] = 0x04D2; - t['Adieresismacron'] = 0x01DE; - t['Adieresissmall'] = 0xF7E4; - t['Adotbelow'] = 0x1EA0; - t['Adotmacron'] = 0x01E0; - t['Agrave'] = 0x00C0; - t['Agravesmall'] = 0xF7E0; - t['Ahookabove'] = 0x1EA2; - t['Aiecyrillic'] = 0x04D4; - t['Ainvertedbreve'] = 0x0202; - t['Alpha'] = 0x0391; - t['Alphatonos'] = 0x0386; - t['Amacron'] = 0x0100; - t['Amonospace'] = 0xFF21; - t['Aogonek'] = 0x0104; - t['Aring'] = 0x00C5; - t['Aringacute'] = 0x01FA; - t['Aringbelow'] = 0x1E00; - t['Aringsmall'] = 0xF7E5; - t['Asmall'] = 0xF761; - t['Atilde'] = 0x00C3; - t['Atildesmall'] = 0xF7E3; - t['Aybarmenian'] = 0x0531; - t['B'] = 0x0042; - t['Bcircle'] = 0x24B7; - t['Bdotaccent'] = 0x1E02; - t['Bdotbelow'] = 0x1E04; - t['Becyrillic'] = 0x0411; - t['Benarmenian'] = 0x0532; - t['Beta'] = 0x0392; - t['Bhook'] = 0x0181; - t['Blinebelow'] = 0x1E06; - t['Bmonospace'] = 0xFF22; - t['Brevesmall'] = 0xF6F4; - t['Bsmall'] = 0xF762; - t['Btopbar'] = 0x0182; - t['C'] = 0x0043; - t['Caarmenian'] = 0x053E; - t['Cacute'] = 0x0106; - t['Caron'] = 0xF6CA; - t['Caronsmall'] = 0xF6F5; - t['Ccaron'] = 0x010C; - t['Ccedilla'] = 0x00C7; - t['Ccedillaacute'] = 0x1E08; - t['Ccedillasmall'] = 0xF7E7; - t['Ccircle'] = 0x24B8; - t['Ccircumflex'] = 0x0108; - t['Cdot'] = 0x010A; - t['Cdotaccent'] = 0x010A; - t['Cedillasmall'] = 0xF7B8; - t['Chaarmenian'] = 0x0549; - t['Cheabkhasiancyrillic'] = 0x04BC; - t['Checyrillic'] = 0x0427; - t['Chedescenderabkhasiancyrillic'] = 0x04BE; - t['Chedescendercyrillic'] = 0x04B6; - t['Chedieresiscyrillic'] = 0x04F4; - t['Cheharmenian'] = 0x0543; - t['Chekhakassiancyrillic'] = 0x04CB; - t['Cheverticalstrokecyrillic'] = 0x04B8; - t['Chi'] = 0x03A7; - t['Chook'] = 0x0187; - t['Circumflexsmall'] = 0xF6F6; - t['Cmonospace'] = 0xFF23; - t['Coarmenian'] = 0x0551; - t['Csmall'] = 0xF763; - t['D'] = 0x0044; - t['DZ'] = 0x01F1; - t['DZcaron'] = 0x01C4; - t['Daarmenian'] = 0x0534; - t['Dafrican'] = 0x0189; - t['Dcaron'] = 0x010E; - t['Dcedilla'] = 0x1E10; - t['Dcircle'] = 0x24B9; - t['Dcircumflexbelow'] = 0x1E12; - t['Dcroat'] = 0x0110; - t['Ddotaccent'] = 0x1E0A; - t['Ddotbelow'] = 0x1E0C; - t['Decyrillic'] = 0x0414; - t['Deicoptic'] = 0x03EE; - t['Delta'] = 0x2206; - t['Deltagreek'] = 0x0394; - t['Dhook'] = 0x018A; - t['Dieresis'] = 0xF6CB; - t['DieresisAcute'] = 0xF6CC; - t['DieresisGrave'] = 0xF6CD; - t['Dieresissmall'] = 0xF7A8; - t['Digammagreek'] = 0x03DC; - t['Djecyrillic'] = 0x0402; - t['Dlinebelow'] = 0x1E0E; - t['Dmonospace'] = 0xFF24; - t['Dotaccentsmall'] = 0xF6F7; - t['Dslash'] = 0x0110; - t['Dsmall'] = 0xF764; - t['Dtopbar'] = 0x018B; - t['Dz'] = 0x01F2; - t['Dzcaron'] = 0x01C5; - t['Dzeabkhasiancyrillic'] = 0x04E0; - t['Dzecyrillic'] = 0x0405; - t['Dzhecyrillic'] = 0x040F; - t['E'] = 0x0045; - t['Eacute'] = 0x00C9; - t['Eacutesmall'] = 0xF7E9; - t['Ebreve'] = 0x0114; - t['Ecaron'] = 0x011A; - t['Ecedillabreve'] = 0x1E1C; - t['Echarmenian'] = 0x0535; - t['Ecircle'] = 0x24BA; - t['Ecircumflex'] = 0x00CA; - t['Ecircumflexacute'] = 0x1EBE; - t['Ecircumflexbelow'] = 0x1E18; - t['Ecircumflexdotbelow'] = 0x1EC6; - t['Ecircumflexgrave'] = 0x1EC0; - t['Ecircumflexhookabove'] = 0x1EC2; - t['Ecircumflexsmall'] = 0xF7EA; - t['Ecircumflextilde'] = 0x1EC4; - t['Ecyrillic'] = 0x0404; - t['Edblgrave'] = 0x0204; - t['Edieresis'] = 0x00CB; - t['Edieresissmall'] = 0xF7EB; - t['Edot'] = 0x0116; - t['Edotaccent'] = 0x0116; - t['Edotbelow'] = 0x1EB8; - t['Efcyrillic'] = 0x0424; - t['Egrave'] = 0x00C8; - t['Egravesmall'] = 0xF7E8; - t['Eharmenian'] = 0x0537; - t['Ehookabove'] = 0x1EBA; - t['Eightroman'] = 0x2167; - t['Einvertedbreve'] = 0x0206; - t['Eiotifiedcyrillic'] = 0x0464; - t['Elcyrillic'] = 0x041B; - t['Elevenroman'] = 0x216A; - t['Emacron'] = 0x0112; - t['Emacronacute'] = 0x1E16; - t['Emacrongrave'] = 0x1E14; - t['Emcyrillic'] = 0x041C; - t['Emonospace'] = 0xFF25; - t['Encyrillic'] = 0x041D; - t['Endescendercyrillic'] = 0x04A2; - t['Eng'] = 0x014A; - t['Enghecyrillic'] = 0x04A4; - t['Enhookcyrillic'] = 0x04C7; - t['Eogonek'] = 0x0118; - t['Eopen'] = 0x0190; - t['Epsilon'] = 0x0395; - t['Epsilontonos'] = 0x0388; - t['Ercyrillic'] = 0x0420; - t['Ereversed'] = 0x018E; - t['Ereversedcyrillic'] = 0x042D; - t['Escyrillic'] = 0x0421; - t['Esdescendercyrillic'] = 0x04AA; - t['Esh'] = 0x01A9; - t['Esmall'] = 0xF765; - t['Eta'] = 0x0397; - t['Etarmenian'] = 0x0538; - t['Etatonos'] = 0x0389; - t['Eth'] = 0x00D0; - t['Ethsmall'] = 0xF7F0; - t['Etilde'] = 0x1EBC; - t['Etildebelow'] = 0x1E1A; - t['Euro'] = 0x20AC; - t['Ezh'] = 0x01B7; - t['Ezhcaron'] = 0x01EE; - t['Ezhreversed'] = 0x01B8; - t['F'] = 0x0046; - t['Fcircle'] = 0x24BB; - t['Fdotaccent'] = 0x1E1E; - t['Feharmenian'] = 0x0556; - t['Feicoptic'] = 0x03E4; - t['Fhook'] = 0x0191; - t['Fitacyrillic'] = 0x0472; - t['Fiveroman'] = 0x2164; - t['Fmonospace'] = 0xFF26; - t['Fourroman'] = 0x2163; - t['Fsmall'] = 0xF766; - t['G'] = 0x0047; - t['GBsquare'] = 0x3387; - t['Gacute'] = 0x01F4; - t['Gamma'] = 0x0393; - t['Gammaafrican'] = 0x0194; - t['Gangiacoptic'] = 0x03EA; - t['Gbreve'] = 0x011E; - t['Gcaron'] = 0x01E6; - t['Gcedilla'] = 0x0122; - t['Gcircle'] = 0x24BC; - t['Gcircumflex'] = 0x011C; - t['Gcommaaccent'] = 0x0122; - t['Gdot'] = 0x0120; - t['Gdotaccent'] = 0x0120; - t['Gecyrillic'] = 0x0413; - t['Ghadarmenian'] = 0x0542; - t['Ghemiddlehookcyrillic'] = 0x0494; - t['Ghestrokecyrillic'] = 0x0492; - t['Gheupturncyrillic'] = 0x0490; - t['Ghook'] = 0x0193; - t['Gimarmenian'] = 0x0533; - t['Gjecyrillic'] = 0x0403; - t['Gmacron'] = 0x1E20; - t['Gmonospace'] = 0xFF27; - t['Grave'] = 0xF6CE; - t['Gravesmall'] = 0xF760; - t['Gsmall'] = 0xF767; - t['Gsmallhook'] = 0x029B; - t['Gstroke'] = 0x01E4; - t['H'] = 0x0048; - t['H18533'] = 0x25CF; - t['H18543'] = 0x25AA; - t['H18551'] = 0x25AB; - t['H22073'] = 0x25A1; - t['HPsquare'] = 0x33CB; - t['Haabkhasiancyrillic'] = 0x04A8; - t['Hadescendercyrillic'] = 0x04B2; - t['Hardsigncyrillic'] = 0x042A; - t['Hbar'] = 0x0126; - t['Hbrevebelow'] = 0x1E2A; - t['Hcedilla'] = 0x1E28; - t['Hcircle'] = 0x24BD; - t['Hcircumflex'] = 0x0124; - t['Hdieresis'] = 0x1E26; - t['Hdotaccent'] = 0x1E22; - t['Hdotbelow'] = 0x1E24; - t['Hmonospace'] = 0xFF28; - t['Hoarmenian'] = 0x0540; - t['Horicoptic'] = 0x03E8; - t['Hsmall'] = 0xF768; - t['Hungarumlaut'] = 0xF6CF; - t['Hungarumlautsmall'] = 0xF6F8; - t['Hzsquare'] = 0x3390; - t['I'] = 0x0049; - t['IAcyrillic'] = 0x042F; - t['IJ'] = 0x0132; - t['IUcyrillic'] = 0x042E; - t['Iacute'] = 0x00CD; - t['Iacutesmall'] = 0xF7ED; - t['Ibreve'] = 0x012C; - t['Icaron'] = 0x01CF; - t['Icircle'] = 0x24BE; - t['Icircumflex'] = 0x00CE; - t['Icircumflexsmall'] = 0xF7EE; - t['Icyrillic'] = 0x0406; - t['Idblgrave'] = 0x0208; - t['Idieresis'] = 0x00CF; - t['Idieresisacute'] = 0x1E2E; - t['Idieresiscyrillic'] = 0x04E4; - t['Idieresissmall'] = 0xF7EF; - t['Idot'] = 0x0130; - t['Idotaccent'] = 0x0130; - t['Idotbelow'] = 0x1ECA; - t['Iebrevecyrillic'] = 0x04D6; - t['Iecyrillic'] = 0x0415; - t['Ifraktur'] = 0x2111; - t['Igrave'] = 0x00CC; - t['Igravesmall'] = 0xF7EC; - t['Ihookabove'] = 0x1EC8; - t['Iicyrillic'] = 0x0418; - t['Iinvertedbreve'] = 0x020A; - t['Iishortcyrillic'] = 0x0419; - t['Imacron'] = 0x012A; - t['Imacroncyrillic'] = 0x04E2; - t['Imonospace'] = 0xFF29; - t['Iniarmenian'] = 0x053B; - t['Iocyrillic'] = 0x0401; - t['Iogonek'] = 0x012E; - t['Iota'] = 0x0399; - t['Iotaafrican'] = 0x0196; - t['Iotadieresis'] = 0x03AA; - t['Iotatonos'] = 0x038A; - t['Ismall'] = 0xF769; - t['Istroke'] = 0x0197; - t['Itilde'] = 0x0128; - t['Itildebelow'] = 0x1E2C; - t['Izhitsacyrillic'] = 0x0474; - t['Izhitsadblgravecyrillic'] = 0x0476; - t['J'] = 0x004A; - t['Jaarmenian'] = 0x0541; - t['Jcircle'] = 0x24BF; - t['Jcircumflex'] = 0x0134; - t['Jecyrillic'] = 0x0408; - t['Jheharmenian'] = 0x054B; - t['Jmonospace'] = 0xFF2A; - t['Jsmall'] = 0xF76A; - t['K'] = 0x004B; - t['KBsquare'] = 0x3385; - t['KKsquare'] = 0x33CD; - t['Kabashkircyrillic'] = 0x04A0; - t['Kacute'] = 0x1E30; - t['Kacyrillic'] = 0x041A; - t['Kadescendercyrillic'] = 0x049A; - t['Kahookcyrillic'] = 0x04C3; - t['Kappa'] = 0x039A; - t['Kastrokecyrillic'] = 0x049E; - t['Kaverticalstrokecyrillic'] = 0x049C; - t['Kcaron'] = 0x01E8; - t['Kcedilla'] = 0x0136; - t['Kcircle'] = 0x24C0; - t['Kcommaaccent'] = 0x0136; - t['Kdotbelow'] = 0x1E32; - t['Keharmenian'] = 0x0554; - t['Kenarmenian'] = 0x053F; - t['Khacyrillic'] = 0x0425; - t['Kheicoptic'] = 0x03E6; - t['Khook'] = 0x0198; - t['Kjecyrillic'] = 0x040C; - t['Klinebelow'] = 0x1E34; - t['Kmonospace'] = 0xFF2B; - t['Koppacyrillic'] = 0x0480; - t['Koppagreek'] = 0x03DE; - t['Ksicyrillic'] = 0x046E; - t['Ksmall'] = 0xF76B; - t['L'] = 0x004C; - t['LJ'] = 0x01C7; - t['LL'] = 0xF6BF; - t['Lacute'] = 0x0139; - t['Lambda'] = 0x039B; - t['Lcaron'] = 0x013D; - t['Lcedilla'] = 0x013B; - t['Lcircle'] = 0x24C1; - t['Lcircumflexbelow'] = 0x1E3C; - t['Lcommaaccent'] = 0x013B; - t['Ldot'] = 0x013F; - t['Ldotaccent'] = 0x013F; - t['Ldotbelow'] = 0x1E36; - t['Ldotbelowmacron'] = 0x1E38; - t['Liwnarmenian'] = 0x053C; - t['Lj'] = 0x01C8; - t['Ljecyrillic'] = 0x0409; - t['Llinebelow'] = 0x1E3A; - t['Lmonospace'] = 0xFF2C; - t['Lslash'] = 0x0141; - t['Lslashsmall'] = 0xF6F9; - t['Lsmall'] = 0xF76C; - t['M'] = 0x004D; - t['MBsquare'] = 0x3386; - t['Macron'] = 0xF6D0; - t['Macronsmall'] = 0xF7AF; - t['Macute'] = 0x1E3E; - t['Mcircle'] = 0x24C2; - t['Mdotaccent'] = 0x1E40; - t['Mdotbelow'] = 0x1E42; - t['Menarmenian'] = 0x0544; - t['Mmonospace'] = 0xFF2D; - t['Msmall'] = 0xF76D; - t['Mturned'] = 0x019C; - t['Mu'] = 0x039C; - t['N'] = 0x004E; - t['NJ'] = 0x01CA; - t['Nacute'] = 0x0143; - t['Ncaron'] = 0x0147; - t['Ncedilla'] = 0x0145; - t['Ncircle'] = 0x24C3; - t['Ncircumflexbelow'] = 0x1E4A; - t['Ncommaaccent'] = 0x0145; - t['Ndotaccent'] = 0x1E44; - t['Ndotbelow'] = 0x1E46; - t['Nhookleft'] = 0x019D; - t['Nineroman'] = 0x2168; - t['Nj'] = 0x01CB; - t['Njecyrillic'] = 0x040A; - t['Nlinebelow'] = 0x1E48; - t['Nmonospace'] = 0xFF2E; - t['Nowarmenian'] = 0x0546; - t['Nsmall'] = 0xF76E; - t['Ntilde'] = 0x00D1; - t['Ntildesmall'] = 0xF7F1; - t['Nu'] = 0x039D; - t['O'] = 0x004F; - t['OE'] = 0x0152; - t['OEsmall'] = 0xF6FA; - t['Oacute'] = 0x00D3; - t['Oacutesmall'] = 0xF7F3; - t['Obarredcyrillic'] = 0x04E8; - t['Obarreddieresiscyrillic'] = 0x04EA; - t['Obreve'] = 0x014E; - t['Ocaron'] = 0x01D1; - t['Ocenteredtilde'] = 0x019F; - t['Ocircle'] = 0x24C4; - t['Ocircumflex'] = 0x00D4; - t['Ocircumflexacute'] = 0x1ED0; - t['Ocircumflexdotbelow'] = 0x1ED8; - t['Ocircumflexgrave'] = 0x1ED2; - t['Ocircumflexhookabove'] = 0x1ED4; - t['Ocircumflexsmall'] = 0xF7F4; - t['Ocircumflextilde'] = 0x1ED6; - t['Ocyrillic'] = 0x041E; - t['Odblacute'] = 0x0150; - t['Odblgrave'] = 0x020C; - t['Odieresis'] = 0x00D6; - t['Odieresiscyrillic'] = 0x04E6; - t['Odieresissmall'] = 0xF7F6; - t['Odotbelow'] = 0x1ECC; - t['Ogoneksmall'] = 0xF6FB; - t['Ograve'] = 0x00D2; - t['Ogravesmall'] = 0xF7F2; - t['Oharmenian'] = 0x0555; - t['Ohm'] = 0x2126; - t['Ohookabove'] = 0x1ECE; - t['Ohorn'] = 0x01A0; - t['Ohornacute'] = 0x1EDA; - t['Ohorndotbelow'] = 0x1EE2; - t['Ohorngrave'] = 0x1EDC; - t['Ohornhookabove'] = 0x1EDE; - t['Ohorntilde'] = 0x1EE0; - t['Ohungarumlaut'] = 0x0150; - t['Oi'] = 0x01A2; - t['Oinvertedbreve'] = 0x020E; - t['Omacron'] = 0x014C; - t['Omacronacute'] = 0x1E52; - t['Omacrongrave'] = 0x1E50; - t['Omega'] = 0x2126; - t['Omegacyrillic'] = 0x0460; - t['Omegagreek'] = 0x03A9; - t['Omegaroundcyrillic'] = 0x047A; - t['Omegatitlocyrillic'] = 0x047C; - t['Omegatonos'] = 0x038F; - t['Omicron'] = 0x039F; - t['Omicrontonos'] = 0x038C; - t['Omonospace'] = 0xFF2F; - t['Oneroman'] = 0x2160; - t['Oogonek'] = 0x01EA; - t['Oogonekmacron'] = 0x01EC; - t['Oopen'] = 0x0186; - t['Oslash'] = 0x00D8; - t['Oslashacute'] = 0x01FE; - t['Oslashsmall'] = 0xF7F8; - t['Osmall'] = 0xF76F; - t['Ostrokeacute'] = 0x01FE; - t['Otcyrillic'] = 0x047E; - t['Otilde'] = 0x00D5; - t['Otildeacute'] = 0x1E4C; - t['Otildedieresis'] = 0x1E4E; - t['Otildesmall'] = 0xF7F5; - t['P'] = 0x0050; - t['Pacute'] = 0x1E54; - t['Pcircle'] = 0x24C5; - t['Pdotaccent'] = 0x1E56; - t['Pecyrillic'] = 0x041F; - t['Peharmenian'] = 0x054A; - t['Pemiddlehookcyrillic'] = 0x04A6; - t['Phi'] = 0x03A6; - t['Phook'] = 0x01A4; - t['Pi'] = 0x03A0; - t['Piwrarmenian'] = 0x0553; - t['Pmonospace'] = 0xFF30; - t['Psi'] = 0x03A8; - t['Psicyrillic'] = 0x0470; - t['Psmall'] = 0xF770; - t['Q'] = 0x0051; - t['Qcircle'] = 0x24C6; - t['Qmonospace'] = 0xFF31; - t['Qsmall'] = 0xF771; - t['R'] = 0x0052; - t['Raarmenian'] = 0x054C; - t['Racute'] = 0x0154; - t['Rcaron'] = 0x0158; - t['Rcedilla'] = 0x0156; - t['Rcircle'] = 0x24C7; - t['Rcommaaccent'] = 0x0156; - t['Rdblgrave'] = 0x0210; - t['Rdotaccent'] = 0x1E58; - t['Rdotbelow'] = 0x1E5A; - t['Rdotbelowmacron'] = 0x1E5C; - t['Reharmenian'] = 0x0550; - t['Rfraktur'] = 0x211C; - t['Rho'] = 0x03A1; - t['Ringsmall'] = 0xF6FC; - t['Rinvertedbreve'] = 0x0212; - t['Rlinebelow'] = 0x1E5E; - t['Rmonospace'] = 0xFF32; - t['Rsmall'] = 0xF772; - t['Rsmallinverted'] = 0x0281; - t['Rsmallinvertedsuperior'] = 0x02B6; - t['S'] = 0x0053; - t['SF010000'] = 0x250C; - t['SF020000'] = 0x2514; - t['SF030000'] = 0x2510; - t['SF040000'] = 0x2518; - t['SF050000'] = 0x253C; - t['SF060000'] = 0x252C; - t['SF070000'] = 0x2534; - t['SF080000'] = 0x251C; - t['SF090000'] = 0x2524; - t['SF100000'] = 0x2500; - t['SF110000'] = 0x2502; - t['SF190000'] = 0x2561; - t['SF200000'] = 0x2562; - t['SF210000'] = 0x2556; - t['SF220000'] = 0x2555; - t['SF230000'] = 0x2563; - t['SF240000'] = 0x2551; - t['SF250000'] = 0x2557; - t['SF260000'] = 0x255D; - t['SF270000'] = 0x255C; - t['SF280000'] = 0x255B; - t['SF360000'] = 0x255E; - t['SF370000'] = 0x255F; - t['SF380000'] = 0x255A; - t['SF390000'] = 0x2554; - t['SF400000'] = 0x2569; - t['SF410000'] = 0x2566; - t['SF420000'] = 0x2560; - t['SF430000'] = 0x2550; - t['SF440000'] = 0x256C; - t['SF450000'] = 0x2567; - t['SF460000'] = 0x2568; - t['SF470000'] = 0x2564; - t['SF480000'] = 0x2565; - t['SF490000'] = 0x2559; - t['SF500000'] = 0x2558; - t['SF510000'] = 0x2552; - t['SF520000'] = 0x2553; - t['SF530000'] = 0x256B; - t['SF540000'] = 0x256A; - t['Sacute'] = 0x015A; - t['Sacutedotaccent'] = 0x1E64; - t['Sampigreek'] = 0x03E0; - t['Scaron'] = 0x0160; - t['Scarondotaccent'] = 0x1E66; - t['Scaronsmall'] = 0xF6FD; - t['Scedilla'] = 0x015E; - t['Schwa'] = 0x018F; - t['Schwacyrillic'] = 0x04D8; - t['Schwadieresiscyrillic'] = 0x04DA; - t['Scircle'] = 0x24C8; - t['Scircumflex'] = 0x015C; - t['Scommaaccent'] = 0x0218; - t['Sdotaccent'] = 0x1E60; - t['Sdotbelow'] = 0x1E62; - t['Sdotbelowdotaccent'] = 0x1E68; - t['Seharmenian'] = 0x054D; - t['Sevenroman'] = 0x2166; - t['Shaarmenian'] = 0x0547; - t['Shacyrillic'] = 0x0428; - t['Shchacyrillic'] = 0x0429; - t['Sheicoptic'] = 0x03E2; - t['Shhacyrillic'] = 0x04BA; - t['Shimacoptic'] = 0x03EC; - t['Sigma'] = 0x03A3; - t['Sixroman'] = 0x2165; - t['Smonospace'] = 0xFF33; - t['Softsigncyrillic'] = 0x042C; - t['Ssmall'] = 0xF773; - t['Stigmagreek'] = 0x03DA; - t['T'] = 0x0054; - t['Tau'] = 0x03A4; - t['Tbar'] = 0x0166; - t['Tcaron'] = 0x0164; - t['Tcedilla'] = 0x0162; - t['Tcircle'] = 0x24C9; - t['Tcircumflexbelow'] = 0x1E70; - t['Tcommaaccent'] = 0x0162; - t['Tdotaccent'] = 0x1E6A; - t['Tdotbelow'] = 0x1E6C; - t['Tecyrillic'] = 0x0422; - t['Tedescendercyrillic'] = 0x04AC; - t['Tenroman'] = 0x2169; - t['Tetsecyrillic'] = 0x04B4; - t['Theta'] = 0x0398; - t['Thook'] = 0x01AC; - t['Thorn'] = 0x00DE; - t['Thornsmall'] = 0xF7FE; - t['Threeroman'] = 0x2162; - t['Tildesmall'] = 0xF6FE; - t['Tiwnarmenian'] = 0x054F; - t['Tlinebelow'] = 0x1E6E; - t['Tmonospace'] = 0xFF34; - t['Toarmenian'] = 0x0539; - t['Tonefive'] = 0x01BC; - t['Tonesix'] = 0x0184; - t['Tonetwo'] = 0x01A7; - t['Tretroflexhook'] = 0x01AE; - t['Tsecyrillic'] = 0x0426; - t['Tshecyrillic'] = 0x040B; - t['Tsmall'] = 0xF774; - t['Twelveroman'] = 0x216B; - t['Tworoman'] = 0x2161; - t['U'] = 0x0055; - t['Uacute'] = 0x00DA; - t['Uacutesmall'] = 0xF7FA; - t['Ubreve'] = 0x016C; - t['Ucaron'] = 0x01D3; - t['Ucircle'] = 0x24CA; - t['Ucircumflex'] = 0x00DB; - t['Ucircumflexbelow'] = 0x1E76; - t['Ucircumflexsmall'] = 0xF7FB; - t['Ucyrillic'] = 0x0423; - t['Udblacute'] = 0x0170; - t['Udblgrave'] = 0x0214; - t['Udieresis'] = 0x00DC; - t['Udieresisacute'] = 0x01D7; - t['Udieresisbelow'] = 0x1E72; - t['Udieresiscaron'] = 0x01D9; - t['Udieresiscyrillic'] = 0x04F0; - t['Udieresisgrave'] = 0x01DB; - t['Udieresismacron'] = 0x01D5; - t['Udieresissmall'] = 0xF7FC; - t['Udotbelow'] = 0x1EE4; - t['Ugrave'] = 0x00D9; - t['Ugravesmall'] = 0xF7F9; - t['Uhookabove'] = 0x1EE6; - t['Uhorn'] = 0x01AF; - t['Uhornacute'] = 0x1EE8; - t['Uhorndotbelow'] = 0x1EF0; - t['Uhorngrave'] = 0x1EEA; - t['Uhornhookabove'] = 0x1EEC; - t['Uhorntilde'] = 0x1EEE; - t['Uhungarumlaut'] = 0x0170; - t['Uhungarumlautcyrillic'] = 0x04F2; - t['Uinvertedbreve'] = 0x0216; - t['Ukcyrillic'] = 0x0478; - t['Umacron'] = 0x016A; - t['Umacroncyrillic'] = 0x04EE; - t['Umacrondieresis'] = 0x1E7A; - t['Umonospace'] = 0xFF35; - t['Uogonek'] = 0x0172; - t['Upsilon'] = 0x03A5; - t['Upsilon1'] = 0x03D2; - t['Upsilonacutehooksymbolgreek'] = 0x03D3; - t['Upsilonafrican'] = 0x01B1; - t['Upsilondieresis'] = 0x03AB; - t['Upsilondieresishooksymbolgreek'] = 0x03D4; - t['Upsilonhooksymbol'] = 0x03D2; - t['Upsilontonos'] = 0x038E; - t['Uring'] = 0x016E; - t['Ushortcyrillic'] = 0x040E; - t['Usmall'] = 0xF775; - t['Ustraightcyrillic'] = 0x04AE; - t['Ustraightstrokecyrillic'] = 0x04B0; - t['Utilde'] = 0x0168; - t['Utildeacute'] = 0x1E78; - t['Utildebelow'] = 0x1E74; - t['V'] = 0x0056; - t['Vcircle'] = 0x24CB; - t['Vdotbelow'] = 0x1E7E; - t['Vecyrillic'] = 0x0412; - t['Vewarmenian'] = 0x054E; - t['Vhook'] = 0x01B2; - t['Vmonospace'] = 0xFF36; - t['Voarmenian'] = 0x0548; - t['Vsmall'] = 0xF776; - t['Vtilde'] = 0x1E7C; - t['W'] = 0x0057; - t['Wacute'] = 0x1E82; - t['Wcircle'] = 0x24CC; - t['Wcircumflex'] = 0x0174; - t['Wdieresis'] = 0x1E84; - t['Wdotaccent'] = 0x1E86; - t['Wdotbelow'] = 0x1E88; - t['Wgrave'] = 0x1E80; - t['Wmonospace'] = 0xFF37; - t['Wsmall'] = 0xF777; - t['X'] = 0x0058; - t['Xcircle'] = 0x24CD; - t['Xdieresis'] = 0x1E8C; - t['Xdotaccent'] = 0x1E8A; - t['Xeharmenian'] = 0x053D; - t['Xi'] = 0x039E; - t['Xmonospace'] = 0xFF38; - t['Xsmall'] = 0xF778; - t['Y'] = 0x0059; - t['Yacute'] = 0x00DD; - t['Yacutesmall'] = 0xF7FD; - t['Yatcyrillic'] = 0x0462; - t['Ycircle'] = 0x24CE; - t['Ycircumflex'] = 0x0176; - t['Ydieresis'] = 0x0178; - t['Ydieresissmall'] = 0xF7FF; - t['Ydotaccent'] = 0x1E8E; - t['Ydotbelow'] = 0x1EF4; - t['Yericyrillic'] = 0x042B; - t['Yerudieresiscyrillic'] = 0x04F8; - t['Ygrave'] = 0x1EF2; - t['Yhook'] = 0x01B3; - t['Yhookabove'] = 0x1EF6; - t['Yiarmenian'] = 0x0545; - t['Yicyrillic'] = 0x0407; - t['Yiwnarmenian'] = 0x0552; - t['Ymonospace'] = 0xFF39; - t['Ysmall'] = 0xF779; - t['Ytilde'] = 0x1EF8; - t['Yusbigcyrillic'] = 0x046A; - t['Yusbigiotifiedcyrillic'] = 0x046C; - t['Yuslittlecyrillic'] = 0x0466; - t['Yuslittleiotifiedcyrillic'] = 0x0468; - t['Z'] = 0x005A; - t['Zaarmenian'] = 0x0536; - t['Zacute'] = 0x0179; - t['Zcaron'] = 0x017D; - t['Zcaronsmall'] = 0xF6FF; - t['Zcircle'] = 0x24CF; - t['Zcircumflex'] = 0x1E90; - t['Zdot'] = 0x017B; - t['Zdotaccent'] = 0x017B; - t['Zdotbelow'] = 0x1E92; - t['Zecyrillic'] = 0x0417; - t['Zedescendercyrillic'] = 0x0498; - t['Zedieresiscyrillic'] = 0x04DE; - t['Zeta'] = 0x0396; - t['Zhearmenian'] = 0x053A; - t['Zhebrevecyrillic'] = 0x04C1; - t['Zhecyrillic'] = 0x0416; - t['Zhedescendercyrillic'] = 0x0496; - t['Zhedieresiscyrillic'] = 0x04DC; - t['Zlinebelow'] = 0x1E94; - t['Zmonospace'] = 0xFF3A; - t['Zsmall'] = 0xF77A; - t['Zstroke'] = 0x01B5; - t['a'] = 0x0061; - t['aabengali'] = 0x0986; - t['aacute'] = 0x00E1; - t['aadeva'] = 0x0906; - t['aagujarati'] = 0x0A86; - t['aagurmukhi'] = 0x0A06; - t['aamatragurmukhi'] = 0x0A3E; - t['aarusquare'] = 0x3303; - t['aavowelsignbengali'] = 0x09BE; - t['aavowelsigndeva'] = 0x093E; - t['aavowelsigngujarati'] = 0x0ABE; - t['abbreviationmarkarmenian'] = 0x055F; - t['abbreviationsigndeva'] = 0x0970; - t['abengali'] = 0x0985; - t['abopomofo'] = 0x311A; - t['abreve'] = 0x0103; - t['abreveacute'] = 0x1EAF; - t['abrevecyrillic'] = 0x04D1; - t['abrevedotbelow'] = 0x1EB7; - t['abrevegrave'] = 0x1EB1; - t['abrevehookabove'] = 0x1EB3; - t['abrevetilde'] = 0x1EB5; - t['acaron'] = 0x01CE; - t['acircle'] = 0x24D0; - t['acircumflex'] = 0x00E2; - t['acircumflexacute'] = 0x1EA5; - t['acircumflexdotbelow'] = 0x1EAD; - t['acircumflexgrave'] = 0x1EA7; - t['acircumflexhookabove'] = 0x1EA9; - t['acircumflextilde'] = 0x1EAB; - t['acute'] = 0x00B4; - t['acutebelowcmb'] = 0x0317; - t['acutecmb'] = 0x0301; - t['acutecomb'] = 0x0301; - t['acutedeva'] = 0x0954; - t['acutelowmod'] = 0x02CF; - t['acutetonecmb'] = 0x0341; - t['acyrillic'] = 0x0430; - t['adblgrave'] = 0x0201; - t['addakgurmukhi'] = 0x0A71; - t['adeva'] = 0x0905; - t['adieresis'] = 0x00E4; - t['adieresiscyrillic'] = 0x04D3; - t['adieresismacron'] = 0x01DF; - t['adotbelow'] = 0x1EA1; - t['adotmacron'] = 0x01E1; - t['ae'] = 0x00E6; - t['aeacute'] = 0x01FD; - t['aekorean'] = 0x3150; - t['aemacron'] = 0x01E3; - t['afii00208'] = 0x2015; - t['afii08941'] = 0x20A4; - t['afii10017'] = 0x0410; - t['afii10018'] = 0x0411; - t['afii10019'] = 0x0412; - t['afii10020'] = 0x0413; - t['afii10021'] = 0x0414; - t['afii10022'] = 0x0415; - t['afii10023'] = 0x0401; - t['afii10024'] = 0x0416; - t['afii10025'] = 0x0417; - t['afii10026'] = 0x0418; - t['afii10027'] = 0x0419; - t['afii10028'] = 0x041A; - t['afii10029'] = 0x041B; - t['afii10030'] = 0x041C; - t['afii10031'] = 0x041D; - t['afii10032'] = 0x041E; - t['afii10033'] = 0x041F; - t['afii10034'] = 0x0420; - t['afii10035'] = 0x0421; - t['afii10036'] = 0x0422; - t['afii10037'] = 0x0423; - t['afii10038'] = 0x0424; - t['afii10039'] = 0x0425; - t['afii10040'] = 0x0426; - t['afii10041'] = 0x0427; - t['afii10042'] = 0x0428; - t['afii10043'] = 0x0429; - t['afii10044'] = 0x042A; - t['afii10045'] = 0x042B; - t['afii10046'] = 0x042C; - t['afii10047'] = 0x042D; - t['afii10048'] = 0x042E; - t['afii10049'] = 0x042F; - t['afii10050'] = 0x0490; - t['afii10051'] = 0x0402; - t['afii10052'] = 0x0403; - t['afii10053'] = 0x0404; - t['afii10054'] = 0x0405; - t['afii10055'] = 0x0406; - t['afii10056'] = 0x0407; - t['afii10057'] = 0x0408; - t['afii10058'] = 0x0409; - t['afii10059'] = 0x040A; - t['afii10060'] = 0x040B; - t['afii10061'] = 0x040C; - t['afii10062'] = 0x040E; - t['afii10063'] = 0xF6C4; - t['afii10064'] = 0xF6C5; - t['afii10065'] = 0x0430; - t['afii10066'] = 0x0431; - t['afii10067'] = 0x0432; - t['afii10068'] = 0x0433; - t['afii10069'] = 0x0434; - t['afii10070'] = 0x0435; - t['afii10071'] = 0x0451; - t['afii10072'] = 0x0436; - t['afii10073'] = 0x0437; - t['afii10074'] = 0x0438; - t['afii10075'] = 0x0439; - t['afii10076'] = 0x043A; - t['afii10077'] = 0x043B; - t['afii10078'] = 0x043C; - t['afii10079'] = 0x043D; - t['afii10080'] = 0x043E; - t['afii10081'] = 0x043F; - t['afii10082'] = 0x0440; - t['afii10083'] = 0x0441; - t['afii10084'] = 0x0442; - t['afii10085'] = 0x0443; - t['afii10086'] = 0x0444; - t['afii10087'] = 0x0445; - t['afii10088'] = 0x0446; - t['afii10089'] = 0x0447; - t['afii10090'] = 0x0448; - t['afii10091'] = 0x0449; - t['afii10092'] = 0x044A; - t['afii10093'] = 0x044B; - t['afii10094'] = 0x044C; - t['afii10095'] = 0x044D; - t['afii10096'] = 0x044E; - t['afii10097'] = 0x044F; - t['afii10098'] = 0x0491; - t['afii10099'] = 0x0452; - t['afii10100'] = 0x0453; - t['afii10101'] = 0x0454; - t['afii10102'] = 0x0455; - t['afii10103'] = 0x0456; - t['afii10104'] = 0x0457; - t['afii10105'] = 0x0458; - t['afii10106'] = 0x0459; - t['afii10107'] = 0x045A; - t['afii10108'] = 0x045B; - t['afii10109'] = 0x045C; - t['afii10110'] = 0x045E; - t['afii10145'] = 0x040F; - t['afii10146'] = 0x0462; - t['afii10147'] = 0x0472; - t['afii10148'] = 0x0474; - t['afii10192'] = 0xF6C6; - t['afii10193'] = 0x045F; - t['afii10194'] = 0x0463; - t['afii10195'] = 0x0473; - t['afii10196'] = 0x0475; - t['afii10831'] = 0xF6C7; - t['afii10832'] = 0xF6C8; - t['afii10846'] = 0x04D9; - t['afii299'] = 0x200E; - t['afii300'] = 0x200F; - t['afii301'] = 0x200D; - t['afii57381'] = 0x066A; - t['afii57388'] = 0x060C; - t['afii57392'] = 0x0660; - t['afii57393'] = 0x0661; - t['afii57394'] = 0x0662; - t['afii57395'] = 0x0663; - t['afii57396'] = 0x0664; - t['afii57397'] = 0x0665; - t['afii57398'] = 0x0666; - t['afii57399'] = 0x0667; - t['afii57400'] = 0x0668; - t['afii57401'] = 0x0669; - t['afii57403'] = 0x061B; - t['afii57407'] = 0x061F; - t['afii57409'] = 0x0621; - t['afii57410'] = 0x0622; - t['afii57411'] = 0x0623; - t['afii57412'] = 0x0624; - t['afii57413'] = 0x0625; - t['afii57414'] = 0x0626; - t['afii57415'] = 0x0627; - t['afii57416'] = 0x0628; - t['afii57417'] = 0x0629; - t['afii57418'] = 0x062A; - t['afii57419'] = 0x062B; - t['afii57420'] = 0x062C; - t['afii57421'] = 0x062D; - t['afii57422'] = 0x062E; - t['afii57423'] = 0x062F; - t['afii57424'] = 0x0630; - t['afii57425'] = 0x0631; - t['afii57426'] = 0x0632; - t['afii57427'] = 0x0633; - t['afii57428'] = 0x0634; - t['afii57429'] = 0x0635; - t['afii57430'] = 0x0636; - t['afii57431'] = 0x0637; - t['afii57432'] = 0x0638; - t['afii57433'] = 0x0639; - t['afii57434'] = 0x063A; - t['afii57440'] = 0x0640; - t['afii57441'] = 0x0641; - t['afii57442'] = 0x0642; - t['afii57443'] = 0x0643; - t['afii57444'] = 0x0644; - t['afii57445'] = 0x0645; - t['afii57446'] = 0x0646; - t['afii57448'] = 0x0648; - t['afii57449'] = 0x0649; - t['afii57450'] = 0x064A; - t['afii57451'] = 0x064B; - t['afii57452'] = 0x064C; - t['afii57453'] = 0x064D; - t['afii57454'] = 0x064E; - t['afii57455'] = 0x064F; - t['afii57456'] = 0x0650; - t['afii57457'] = 0x0651; - t['afii57458'] = 0x0652; - t['afii57470'] = 0x0647; - t['afii57505'] = 0x06A4; - t['afii57506'] = 0x067E; - t['afii57507'] = 0x0686; - t['afii57508'] = 0x0698; - t['afii57509'] = 0x06AF; - t['afii57511'] = 0x0679; - t['afii57512'] = 0x0688; - t['afii57513'] = 0x0691; - t['afii57514'] = 0x06BA; - t['afii57519'] = 0x06D2; - t['afii57534'] = 0x06D5; - t['afii57636'] = 0x20AA; - t['afii57645'] = 0x05BE; - t['afii57658'] = 0x05C3; - t['afii57664'] = 0x05D0; - t['afii57665'] = 0x05D1; - t['afii57666'] = 0x05D2; - t['afii57667'] = 0x05D3; - t['afii57668'] = 0x05D4; - t['afii57669'] = 0x05D5; - t['afii57670'] = 0x05D6; - t['afii57671'] = 0x05D7; - t['afii57672'] = 0x05D8; - t['afii57673'] = 0x05D9; - t['afii57674'] = 0x05DA; - t['afii57675'] = 0x05DB; - t['afii57676'] = 0x05DC; - t['afii57677'] = 0x05DD; - t['afii57678'] = 0x05DE; - t['afii57679'] = 0x05DF; - t['afii57680'] = 0x05E0; - t['afii57681'] = 0x05E1; - t['afii57682'] = 0x05E2; - t['afii57683'] = 0x05E3; - t['afii57684'] = 0x05E4; - t['afii57685'] = 0x05E5; - t['afii57686'] = 0x05E6; - t['afii57687'] = 0x05E7; - t['afii57688'] = 0x05E8; - t['afii57689'] = 0x05E9; - t['afii57690'] = 0x05EA; - t['afii57694'] = 0xFB2A; - t['afii57695'] = 0xFB2B; - t['afii57700'] = 0xFB4B; - t['afii57705'] = 0xFB1F; - t['afii57716'] = 0x05F0; - t['afii57717'] = 0x05F1; - t['afii57718'] = 0x05F2; - t['afii57723'] = 0xFB35; - t['afii57793'] = 0x05B4; - t['afii57794'] = 0x05B5; - t['afii57795'] = 0x05B6; - t['afii57796'] = 0x05BB; - t['afii57797'] = 0x05B8; - t['afii57798'] = 0x05B7; - t['afii57799'] = 0x05B0; - t['afii57800'] = 0x05B2; - t['afii57801'] = 0x05B1; - t['afii57802'] = 0x05B3; - t['afii57803'] = 0x05C2; - t['afii57804'] = 0x05C1; - t['afii57806'] = 0x05B9; - t['afii57807'] = 0x05BC; - t['afii57839'] = 0x05BD; - t['afii57841'] = 0x05BF; - t['afii57842'] = 0x05C0; - t['afii57929'] = 0x02BC; - t['afii61248'] = 0x2105; - t['afii61289'] = 0x2113; - t['afii61352'] = 0x2116; - t['afii61573'] = 0x202C; - t['afii61574'] = 0x202D; - t['afii61575'] = 0x202E; - t['afii61664'] = 0x200C; - t['afii63167'] = 0x066D; - t['afii64937'] = 0x02BD; - t['agrave'] = 0x00E0; - t['agujarati'] = 0x0A85; - t['agurmukhi'] = 0x0A05; - t['ahiragana'] = 0x3042; - t['ahookabove'] = 0x1EA3; - t['aibengali'] = 0x0990; - t['aibopomofo'] = 0x311E; - t['aideva'] = 0x0910; - t['aiecyrillic'] = 0x04D5; - t['aigujarati'] = 0x0A90; - t['aigurmukhi'] = 0x0A10; - t['aimatragurmukhi'] = 0x0A48; - t['ainarabic'] = 0x0639; - t['ainfinalarabic'] = 0xFECA; - t['aininitialarabic'] = 0xFECB; - t['ainmedialarabic'] = 0xFECC; - t['ainvertedbreve'] = 0x0203; - t['aivowelsignbengali'] = 0x09C8; - t['aivowelsigndeva'] = 0x0948; - t['aivowelsigngujarati'] = 0x0AC8; - t['akatakana'] = 0x30A2; - t['akatakanahalfwidth'] = 0xFF71; - t['akorean'] = 0x314F; - t['alef'] = 0x05D0; - t['alefarabic'] = 0x0627; - t['alefdageshhebrew'] = 0xFB30; - t['aleffinalarabic'] = 0xFE8E; - t['alefhamzaabovearabic'] = 0x0623; - t['alefhamzaabovefinalarabic'] = 0xFE84; - t['alefhamzabelowarabic'] = 0x0625; - t['alefhamzabelowfinalarabic'] = 0xFE88; - t['alefhebrew'] = 0x05D0; - t['aleflamedhebrew'] = 0xFB4F; - t['alefmaddaabovearabic'] = 0x0622; - t['alefmaddaabovefinalarabic'] = 0xFE82; - t['alefmaksuraarabic'] = 0x0649; - t['alefmaksurafinalarabic'] = 0xFEF0; - t['alefmaksurainitialarabic'] = 0xFEF3; - t['alefmaksuramedialarabic'] = 0xFEF4; - t['alefpatahhebrew'] = 0xFB2E; - t['alefqamatshebrew'] = 0xFB2F; - t['aleph'] = 0x2135; - t['allequal'] = 0x224C; - t['alpha'] = 0x03B1; - t['alphatonos'] = 0x03AC; - t['amacron'] = 0x0101; - t['amonospace'] = 0xFF41; - t['ampersand'] = 0x0026; - t['ampersandmonospace'] = 0xFF06; - t['ampersandsmall'] = 0xF726; - t['amsquare'] = 0x33C2; - t['anbopomofo'] = 0x3122; - t['angbopomofo'] = 0x3124; - t['angbracketleft'] = 0x3008; - t['angbracketright'] = 0x3009; - t['angkhankhuthai'] = 0x0E5A; - t['angle'] = 0x2220; - t['anglebracketleft'] = 0x3008; - t['anglebracketleftvertical'] = 0xFE3F; - t['anglebracketright'] = 0x3009; - t['anglebracketrightvertical'] = 0xFE40; - t['angleleft'] = 0x2329; - t['angleright'] = 0x232A; - t['angstrom'] = 0x212B; - t['anoteleia'] = 0x0387; - t['anudattadeva'] = 0x0952; - t['anusvarabengali'] = 0x0982; - t['anusvaradeva'] = 0x0902; - t['anusvaragujarati'] = 0x0A82; - t['aogonek'] = 0x0105; - t['apaatosquare'] = 0x3300; - t['aparen'] = 0x249C; - t['apostrophearmenian'] = 0x055A; - t['apostrophemod'] = 0x02BC; - t['apple'] = 0xF8FF; - t['approaches'] = 0x2250; - t['approxequal'] = 0x2248; - t['approxequalorimage'] = 0x2252; - t['approximatelyequal'] = 0x2245; - t['araeaekorean'] = 0x318E; - t['araeakorean'] = 0x318D; - t['arc'] = 0x2312; - t['arighthalfring'] = 0x1E9A; - t['aring'] = 0x00E5; - t['aringacute'] = 0x01FB; - t['aringbelow'] = 0x1E01; - t['arrowboth'] = 0x2194; - t['arrowdashdown'] = 0x21E3; - t['arrowdashleft'] = 0x21E0; - t['arrowdashright'] = 0x21E2; - t['arrowdashup'] = 0x21E1; - t['arrowdblboth'] = 0x21D4; - t['arrowdbldown'] = 0x21D3; - t['arrowdblleft'] = 0x21D0; - t['arrowdblright'] = 0x21D2; - t['arrowdblup'] = 0x21D1; - t['arrowdown'] = 0x2193; - t['arrowdownleft'] = 0x2199; - t['arrowdownright'] = 0x2198; - t['arrowdownwhite'] = 0x21E9; - t['arrowheaddownmod'] = 0x02C5; - t['arrowheadleftmod'] = 0x02C2; - t['arrowheadrightmod'] = 0x02C3; - t['arrowheadupmod'] = 0x02C4; - t['arrowhorizex'] = 0xF8E7; - t['arrowleft'] = 0x2190; - t['arrowleftdbl'] = 0x21D0; - t['arrowleftdblstroke'] = 0x21CD; - t['arrowleftoverright'] = 0x21C6; - t['arrowleftwhite'] = 0x21E6; - t['arrowright'] = 0x2192; - t['arrowrightdblstroke'] = 0x21CF; - t['arrowrightheavy'] = 0x279E; - t['arrowrightoverleft'] = 0x21C4; - t['arrowrightwhite'] = 0x21E8; - t['arrowtableft'] = 0x21E4; - t['arrowtabright'] = 0x21E5; - t['arrowup'] = 0x2191; - t['arrowupdn'] = 0x2195; - t['arrowupdnbse'] = 0x21A8; - t['arrowupdownbase'] = 0x21A8; - t['arrowupleft'] = 0x2196; - t['arrowupleftofdown'] = 0x21C5; - t['arrowupright'] = 0x2197; - t['arrowupwhite'] = 0x21E7; - t['arrowvertex'] = 0xF8E6; - t['asciicircum'] = 0x005E; - t['asciicircummonospace'] = 0xFF3E; - t['asciitilde'] = 0x007E; - t['asciitildemonospace'] = 0xFF5E; - t['ascript'] = 0x0251; - t['ascriptturned'] = 0x0252; - t['asmallhiragana'] = 0x3041; - t['asmallkatakana'] = 0x30A1; - t['asmallkatakanahalfwidth'] = 0xFF67; - t['asterisk'] = 0x002A; - t['asteriskaltonearabic'] = 0x066D; - t['asteriskarabic'] = 0x066D; - t['asteriskmath'] = 0x2217; - t['asteriskmonospace'] = 0xFF0A; - t['asterisksmall'] = 0xFE61; - t['asterism'] = 0x2042; - t['asuperior'] = 0xF6E9; - t['asymptoticallyequal'] = 0x2243; - t['at'] = 0x0040; - t['atilde'] = 0x00E3; - t['atmonospace'] = 0xFF20; - t['atsmall'] = 0xFE6B; - t['aturned'] = 0x0250; - t['aubengali'] = 0x0994; - t['aubopomofo'] = 0x3120; - t['audeva'] = 0x0914; - t['augujarati'] = 0x0A94; - t['augurmukhi'] = 0x0A14; - t['aulengthmarkbengali'] = 0x09D7; - t['aumatragurmukhi'] = 0x0A4C; - t['auvowelsignbengali'] = 0x09CC; - t['auvowelsigndeva'] = 0x094C; - t['auvowelsigngujarati'] = 0x0ACC; - t['avagrahadeva'] = 0x093D; - t['aybarmenian'] = 0x0561; - t['ayin'] = 0x05E2; - t['ayinaltonehebrew'] = 0xFB20; - t['ayinhebrew'] = 0x05E2; - t['b'] = 0x0062; - t['babengali'] = 0x09AC; - t['backslash'] = 0x005C; - t['backslashmonospace'] = 0xFF3C; - t['badeva'] = 0x092C; - t['bagujarati'] = 0x0AAC; - t['bagurmukhi'] = 0x0A2C; - t['bahiragana'] = 0x3070; - t['bahtthai'] = 0x0E3F; - t['bakatakana'] = 0x30D0; - t['bar'] = 0x007C; - t['barmonospace'] = 0xFF5C; - t['bbopomofo'] = 0x3105; - t['bcircle'] = 0x24D1; - t['bdotaccent'] = 0x1E03; - t['bdotbelow'] = 0x1E05; - t['beamedsixteenthnotes'] = 0x266C; - t['because'] = 0x2235; - t['becyrillic'] = 0x0431; - t['beharabic'] = 0x0628; - t['behfinalarabic'] = 0xFE90; - t['behinitialarabic'] = 0xFE91; - t['behiragana'] = 0x3079; - t['behmedialarabic'] = 0xFE92; - t['behmeeminitialarabic'] = 0xFC9F; - t['behmeemisolatedarabic'] = 0xFC08; - t['behnoonfinalarabic'] = 0xFC6D; - t['bekatakana'] = 0x30D9; - t['benarmenian'] = 0x0562; - t['bet'] = 0x05D1; - t['beta'] = 0x03B2; - t['betasymbolgreek'] = 0x03D0; - t['betdagesh'] = 0xFB31; - t['betdageshhebrew'] = 0xFB31; - t['bethebrew'] = 0x05D1; - t['betrafehebrew'] = 0xFB4C; - t['bhabengali'] = 0x09AD; - t['bhadeva'] = 0x092D; - t['bhagujarati'] = 0x0AAD; - t['bhagurmukhi'] = 0x0A2D; - t['bhook'] = 0x0253; - t['bihiragana'] = 0x3073; - t['bikatakana'] = 0x30D3; - t['bilabialclick'] = 0x0298; - t['bindigurmukhi'] = 0x0A02; - t['birusquare'] = 0x3331; - t['blackcircle'] = 0x25CF; - t['blackdiamond'] = 0x25C6; - t['blackdownpointingtriangle'] = 0x25BC; - t['blackleftpointingpointer'] = 0x25C4; - t['blackleftpointingtriangle'] = 0x25C0; - t['blacklenticularbracketleft'] = 0x3010; - t['blacklenticularbracketleftvertical'] = 0xFE3B; - t['blacklenticularbracketright'] = 0x3011; - t['blacklenticularbracketrightvertical'] = 0xFE3C; - t['blacklowerlefttriangle'] = 0x25E3; - t['blacklowerrighttriangle'] = 0x25E2; - t['blackrectangle'] = 0x25AC; - t['blackrightpointingpointer'] = 0x25BA; - t['blackrightpointingtriangle'] = 0x25B6; - t['blacksmallsquare'] = 0x25AA; - t['blacksmilingface'] = 0x263B; - t['blacksquare'] = 0x25A0; - t['blackstar'] = 0x2605; - t['blackupperlefttriangle'] = 0x25E4; - t['blackupperrighttriangle'] = 0x25E5; - t['blackuppointingsmalltriangle'] = 0x25B4; - t['blackuppointingtriangle'] = 0x25B2; - t['blank'] = 0x2423; - t['blinebelow'] = 0x1E07; - t['block'] = 0x2588; - t['bmonospace'] = 0xFF42; - t['bobaimaithai'] = 0x0E1A; - t['bohiragana'] = 0x307C; - t['bokatakana'] = 0x30DC; - t['bparen'] = 0x249D; - t['bqsquare'] = 0x33C3; - t['braceex'] = 0xF8F4; - t['braceleft'] = 0x007B; - t['braceleftbt'] = 0xF8F3; - t['braceleftmid'] = 0xF8F2; - t['braceleftmonospace'] = 0xFF5B; - t['braceleftsmall'] = 0xFE5B; - t['bracelefttp'] = 0xF8F1; - t['braceleftvertical'] = 0xFE37; - t['braceright'] = 0x007D; - t['bracerightbt'] = 0xF8FE; - t['bracerightmid'] = 0xF8FD; - t['bracerightmonospace'] = 0xFF5D; - t['bracerightsmall'] = 0xFE5C; - t['bracerighttp'] = 0xF8FC; - t['bracerightvertical'] = 0xFE38; - t['bracketleft'] = 0x005B; - t['bracketleftbt'] = 0xF8F0; - t['bracketleftex'] = 0xF8EF; - t['bracketleftmonospace'] = 0xFF3B; - t['bracketlefttp'] = 0xF8EE; - t['bracketright'] = 0x005D; - t['bracketrightbt'] = 0xF8FB; - t['bracketrightex'] = 0xF8FA; - t['bracketrightmonospace'] = 0xFF3D; - t['bracketrighttp'] = 0xF8F9; - t['breve'] = 0x02D8; - t['brevebelowcmb'] = 0x032E; - t['brevecmb'] = 0x0306; - t['breveinvertedbelowcmb'] = 0x032F; - t['breveinvertedcmb'] = 0x0311; - t['breveinverteddoublecmb'] = 0x0361; - t['bridgebelowcmb'] = 0x032A; - t['bridgeinvertedbelowcmb'] = 0x033A; - t['brokenbar'] = 0x00A6; - t['bstroke'] = 0x0180; - t['bsuperior'] = 0xF6EA; - t['btopbar'] = 0x0183; - t['buhiragana'] = 0x3076; - t['bukatakana'] = 0x30D6; - t['bullet'] = 0x2022; - t['bulletinverse'] = 0x25D8; - t['bulletoperator'] = 0x2219; - t['bullseye'] = 0x25CE; - t['c'] = 0x0063; - t['caarmenian'] = 0x056E; - t['cabengali'] = 0x099A; - t['cacute'] = 0x0107; - t['cadeva'] = 0x091A; - t['cagujarati'] = 0x0A9A; - t['cagurmukhi'] = 0x0A1A; - t['calsquare'] = 0x3388; - t['candrabindubengali'] = 0x0981; - t['candrabinducmb'] = 0x0310; - t['candrabindudeva'] = 0x0901; - t['candrabindugujarati'] = 0x0A81; - t['capslock'] = 0x21EA; - t['careof'] = 0x2105; - t['caron'] = 0x02C7; - t['caronbelowcmb'] = 0x032C; - t['caroncmb'] = 0x030C; - t['carriagereturn'] = 0x21B5; - t['cbopomofo'] = 0x3118; - t['ccaron'] = 0x010D; - t['ccedilla'] = 0x00E7; - t['ccedillaacute'] = 0x1E09; - t['ccircle'] = 0x24D2; - t['ccircumflex'] = 0x0109; - t['ccurl'] = 0x0255; - t['cdot'] = 0x010B; - t['cdotaccent'] = 0x010B; - t['cdsquare'] = 0x33C5; - t['cedilla'] = 0x00B8; - t['cedillacmb'] = 0x0327; - t['cent'] = 0x00A2; - t['centigrade'] = 0x2103; - t['centinferior'] = 0xF6DF; - t['centmonospace'] = 0xFFE0; - t['centoldstyle'] = 0xF7A2; - t['centsuperior'] = 0xF6E0; - t['chaarmenian'] = 0x0579; - t['chabengali'] = 0x099B; - t['chadeva'] = 0x091B; - t['chagujarati'] = 0x0A9B; - t['chagurmukhi'] = 0x0A1B; - t['chbopomofo'] = 0x3114; - t['cheabkhasiancyrillic'] = 0x04BD; - t['checkmark'] = 0x2713; - t['checyrillic'] = 0x0447; - t['chedescenderabkhasiancyrillic'] = 0x04BF; - t['chedescendercyrillic'] = 0x04B7; - t['chedieresiscyrillic'] = 0x04F5; - t['cheharmenian'] = 0x0573; - t['chekhakassiancyrillic'] = 0x04CC; - t['cheverticalstrokecyrillic'] = 0x04B9; - t['chi'] = 0x03C7; - t['chieuchacirclekorean'] = 0x3277; - t['chieuchaparenkorean'] = 0x3217; - t['chieuchcirclekorean'] = 0x3269; - t['chieuchkorean'] = 0x314A; - t['chieuchparenkorean'] = 0x3209; - t['chochangthai'] = 0x0E0A; - t['chochanthai'] = 0x0E08; - t['chochingthai'] = 0x0E09; - t['chochoethai'] = 0x0E0C; - t['chook'] = 0x0188; - t['cieucacirclekorean'] = 0x3276; - t['cieucaparenkorean'] = 0x3216; - t['cieuccirclekorean'] = 0x3268; - t['cieuckorean'] = 0x3148; - t['cieucparenkorean'] = 0x3208; - t['cieucuparenkorean'] = 0x321C; - t['circle'] = 0x25CB; - t['circlecopyrt'] = 0x00A9; - t['circlemultiply'] = 0x2297; - t['circleot'] = 0x2299; - t['circleplus'] = 0x2295; - t['circlepostalmark'] = 0x3036; - t['circlewithlefthalfblack'] = 0x25D0; - t['circlewithrighthalfblack'] = 0x25D1; - t['circumflex'] = 0x02C6; - t['circumflexbelowcmb'] = 0x032D; - t['circumflexcmb'] = 0x0302; - t['clear'] = 0x2327; - t['clickalveolar'] = 0x01C2; - t['clickdental'] = 0x01C0; - t['clicklateral'] = 0x01C1; - t['clickretroflex'] = 0x01C3; - t['club'] = 0x2663; - t['clubsuitblack'] = 0x2663; - t['clubsuitwhite'] = 0x2667; - t['cmcubedsquare'] = 0x33A4; - t['cmonospace'] = 0xFF43; - t['cmsquaredsquare'] = 0x33A0; - t['coarmenian'] = 0x0581; - t['colon'] = 0x003A; - t['colonmonetary'] = 0x20A1; - t['colonmonospace'] = 0xFF1A; - t['colonsign'] = 0x20A1; - t['colonsmall'] = 0xFE55; - t['colontriangularhalfmod'] = 0x02D1; - t['colontriangularmod'] = 0x02D0; - t['comma'] = 0x002C; - t['commaabovecmb'] = 0x0313; - t['commaaboverightcmb'] = 0x0315; - t['commaaccent'] = 0xF6C3; - t['commaarabic'] = 0x060C; - t['commaarmenian'] = 0x055D; - t['commainferior'] = 0xF6E1; - t['commamonospace'] = 0xFF0C; - t['commareversedabovecmb'] = 0x0314; - t['commareversedmod'] = 0x02BD; - t['commasmall'] = 0xFE50; - t['commasuperior'] = 0xF6E2; - t['commaturnedabovecmb'] = 0x0312; - t['commaturnedmod'] = 0x02BB; - t['compass'] = 0x263C; - t['congruent'] = 0x2245; - t['contourintegral'] = 0x222E; - t['control'] = 0x2303; - t['controlACK'] = 0x0006; - t['controlBEL'] = 0x0007; - t['controlBS'] = 0x0008; - t['controlCAN'] = 0x0018; - t['controlCR'] = 0x000D; - t['controlDC1'] = 0x0011; - t['controlDC2'] = 0x0012; - t['controlDC3'] = 0x0013; - t['controlDC4'] = 0x0014; - t['controlDEL'] = 0x007F; - t['controlDLE'] = 0x0010; - t['controlEM'] = 0x0019; - t['controlENQ'] = 0x0005; - t['controlEOT'] = 0x0004; - t['controlESC'] = 0x001B; - t['controlETB'] = 0x0017; - t['controlETX'] = 0x0003; - t['controlFF'] = 0x000C; - t['controlFS'] = 0x001C; - t['controlGS'] = 0x001D; - t['controlHT'] = 0x0009; - t['controlLF'] = 0x000A; - t['controlNAK'] = 0x0015; - t['controlNULL'] = 0x0000; - t['controlRS'] = 0x001E; - t['controlSI'] = 0x000F; - t['controlSO'] = 0x000E; - t['controlSOT'] = 0x0002; - t['controlSTX'] = 0x0001; - t['controlSUB'] = 0x001A; - t['controlSYN'] = 0x0016; - t['controlUS'] = 0x001F; - t['controlVT'] = 0x000B; - t['copyright'] = 0x00A9; - t['copyrightsans'] = 0xF8E9; - t['copyrightserif'] = 0xF6D9; - t['cornerbracketleft'] = 0x300C; - t['cornerbracketlefthalfwidth'] = 0xFF62; - t['cornerbracketleftvertical'] = 0xFE41; - t['cornerbracketright'] = 0x300D; - t['cornerbracketrighthalfwidth'] = 0xFF63; - t['cornerbracketrightvertical'] = 0xFE42; - t['corporationsquare'] = 0x337F; - t['cosquare'] = 0x33C7; - t['coverkgsquare'] = 0x33C6; - t['cparen'] = 0x249E; - t['cruzeiro'] = 0x20A2; - t['cstretched'] = 0x0297; - t['curlyand'] = 0x22CF; - t['curlyor'] = 0x22CE; - t['currency'] = 0x00A4; - t['cyrBreve'] = 0xF6D1; - t['cyrFlex'] = 0xF6D2; - t['cyrbreve'] = 0xF6D4; - t['cyrflex'] = 0xF6D5; - t['d'] = 0x0064; - t['daarmenian'] = 0x0564; - t['dabengali'] = 0x09A6; - t['dadarabic'] = 0x0636; - t['dadeva'] = 0x0926; - t['dadfinalarabic'] = 0xFEBE; - t['dadinitialarabic'] = 0xFEBF; - t['dadmedialarabic'] = 0xFEC0; - t['dagesh'] = 0x05BC; - t['dageshhebrew'] = 0x05BC; - t['dagger'] = 0x2020; - t['daggerdbl'] = 0x2021; - t['dagujarati'] = 0x0AA6; - t['dagurmukhi'] = 0x0A26; - t['dahiragana'] = 0x3060; - t['dakatakana'] = 0x30C0; - t['dalarabic'] = 0x062F; - t['dalet'] = 0x05D3; - t['daletdagesh'] = 0xFB33; - t['daletdageshhebrew'] = 0xFB33; - t['dalethebrew'] = 0x05D3; - t['dalfinalarabic'] = 0xFEAA; - t['dammaarabic'] = 0x064F; - t['dammalowarabic'] = 0x064F; - t['dammatanaltonearabic'] = 0x064C; - t['dammatanarabic'] = 0x064C; - t['danda'] = 0x0964; - t['dargahebrew'] = 0x05A7; - t['dargalefthebrew'] = 0x05A7; - t['dasiapneumatacyrilliccmb'] = 0x0485; - t['dblGrave'] = 0xF6D3; - t['dblanglebracketleft'] = 0x300A; - t['dblanglebracketleftvertical'] = 0xFE3D; - t['dblanglebracketright'] = 0x300B; - t['dblanglebracketrightvertical'] = 0xFE3E; - t['dblarchinvertedbelowcmb'] = 0x032B; - t['dblarrowleft'] = 0x21D4; - t['dblarrowright'] = 0x21D2; - t['dbldanda'] = 0x0965; - t['dblgrave'] = 0xF6D6; - t['dblgravecmb'] = 0x030F; - t['dblintegral'] = 0x222C; - t['dbllowline'] = 0x2017; - t['dbllowlinecmb'] = 0x0333; - t['dbloverlinecmb'] = 0x033F; - t['dblprimemod'] = 0x02BA; - t['dblverticalbar'] = 0x2016; - t['dblverticallineabovecmb'] = 0x030E; - t['dbopomofo'] = 0x3109; - t['dbsquare'] = 0x33C8; - t['dcaron'] = 0x010F; - t['dcedilla'] = 0x1E11; - t['dcircle'] = 0x24D3; - t['dcircumflexbelow'] = 0x1E13; - t['dcroat'] = 0x0111; - t['ddabengali'] = 0x09A1; - t['ddadeva'] = 0x0921; - t['ddagujarati'] = 0x0AA1; - t['ddagurmukhi'] = 0x0A21; - t['ddalarabic'] = 0x0688; - t['ddalfinalarabic'] = 0xFB89; - t['dddhadeva'] = 0x095C; - t['ddhabengali'] = 0x09A2; - t['ddhadeva'] = 0x0922; - t['ddhagujarati'] = 0x0AA2; - t['ddhagurmukhi'] = 0x0A22; - t['ddotaccent'] = 0x1E0B; - t['ddotbelow'] = 0x1E0D; - t['decimalseparatorarabic'] = 0x066B; - t['decimalseparatorpersian'] = 0x066B; - t['decyrillic'] = 0x0434; - t['degree'] = 0x00B0; - t['dehihebrew'] = 0x05AD; - t['dehiragana'] = 0x3067; - t['deicoptic'] = 0x03EF; - t['dekatakana'] = 0x30C7; - t['deleteleft'] = 0x232B; - t['deleteright'] = 0x2326; - t['delta'] = 0x03B4; - t['deltaturned'] = 0x018D; - t['denominatorminusonenumeratorbengali'] = 0x09F8; - t['dezh'] = 0x02A4; - t['dhabengali'] = 0x09A7; - t['dhadeva'] = 0x0927; - t['dhagujarati'] = 0x0AA7; - t['dhagurmukhi'] = 0x0A27; - t['dhook'] = 0x0257; - t['dialytikatonos'] = 0x0385; - t['dialytikatonoscmb'] = 0x0344; - t['diamond'] = 0x2666; - t['diamondsuitwhite'] = 0x2662; - t['dieresis'] = 0x00A8; - t['dieresisacute'] = 0xF6D7; - t['dieresisbelowcmb'] = 0x0324; - t['dieresiscmb'] = 0x0308; - t['dieresisgrave'] = 0xF6D8; - t['dieresistonos'] = 0x0385; - t['dihiragana'] = 0x3062; - t['dikatakana'] = 0x30C2; - t['dittomark'] = 0x3003; - t['divide'] = 0x00F7; - t['divides'] = 0x2223; - t['divisionslash'] = 0x2215; - t['djecyrillic'] = 0x0452; - t['dkshade'] = 0x2593; - t['dlinebelow'] = 0x1E0F; - t['dlsquare'] = 0x3397; - t['dmacron'] = 0x0111; - t['dmonospace'] = 0xFF44; - t['dnblock'] = 0x2584; - t['dochadathai'] = 0x0E0E; - t['dodekthai'] = 0x0E14; - t['dohiragana'] = 0x3069; - t['dokatakana'] = 0x30C9; - t['dollar'] = 0x0024; - t['dollarinferior'] = 0xF6E3; - t['dollarmonospace'] = 0xFF04; - t['dollaroldstyle'] = 0xF724; - t['dollarsmall'] = 0xFE69; - t['dollarsuperior'] = 0xF6E4; - t['dong'] = 0x20AB; - t['dorusquare'] = 0x3326; - t['dotaccent'] = 0x02D9; - t['dotaccentcmb'] = 0x0307; - t['dotbelowcmb'] = 0x0323; - t['dotbelowcomb'] = 0x0323; - t['dotkatakana'] = 0x30FB; - t['dotlessi'] = 0x0131; - t['dotlessj'] = 0xF6BE; - t['dotlessjstrokehook'] = 0x0284; - t['dotmath'] = 0x22C5; - t['dottedcircle'] = 0x25CC; - t['doubleyodpatah'] = 0xFB1F; - t['doubleyodpatahhebrew'] = 0xFB1F; - t['downtackbelowcmb'] = 0x031E; - t['downtackmod'] = 0x02D5; - t['dparen'] = 0x249F; - t['dsuperior'] = 0xF6EB; - t['dtail'] = 0x0256; - t['dtopbar'] = 0x018C; - t['duhiragana'] = 0x3065; - t['dukatakana'] = 0x30C5; - t['dz'] = 0x01F3; - t['dzaltone'] = 0x02A3; - t['dzcaron'] = 0x01C6; - t['dzcurl'] = 0x02A5; - t['dzeabkhasiancyrillic'] = 0x04E1; - t['dzecyrillic'] = 0x0455; - t['dzhecyrillic'] = 0x045F; - t['e'] = 0x0065; - t['eacute'] = 0x00E9; - t['earth'] = 0x2641; - t['ebengali'] = 0x098F; - t['ebopomofo'] = 0x311C; - t['ebreve'] = 0x0115; - t['ecandradeva'] = 0x090D; - t['ecandragujarati'] = 0x0A8D; - t['ecandravowelsigndeva'] = 0x0945; - t['ecandravowelsigngujarati'] = 0x0AC5; - t['ecaron'] = 0x011B; - t['ecedillabreve'] = 0x1E1D; - t['echarmenian'] = 0x0565; - t['echyiwnarmenian'] = 0x0587; - t['ecircle'] = 0x24D4; - t['ecircumflex'] = 0x00EA; - t['ecircumflexacute'] = 0x1EBF; - t['ecircumflexbelow'] = 0x1E19; - t['ecircumflexdotbelow'] = 0x1EC7; - t['ecircumflexgrave'] = 0x1EC1; - t['ecircumflexhookabove'] = 0x1EC3; - t['ecircumflextilde'] = 0x1EC5; - t['ecyrillic'] = 0x0454; - t['edblgrave'] = 0x0205; - t['edeva'] = 0x090F; - t['edieresis'] = 0x00EB; - t['edot'] = 0x0117; - t['edotaccent'] = 0x0117; - t['edotbelow'] = 0x1EB9; - t['eegurmukhi'] = 0x0A0F; - t['eematragurmukhi'] = 0x0A47; - t['efcyrillic'] = 0x0444; - t['egrave'] = 0x00E8; - t['egujarati'] = 0x0A8F; - t['eharmenian'] = 0x0567; - t['ehbopomofo'] = 0x311D; - t['ehiragana'] = 0x3048; - t['ehookabove'] = 0x1EBB; - t['eibopomofo'] = 0x311F; - t['eight'] = 0x0038; - t['eightarabic'] = 0x0668; - t['eightbengali'] = 0x09EE; - t['eightcircle'] = 0x2467; - t['eightcircleinversesansserif'] = 0x2791; - t['eightdeva'] = 0x096E; - t['eighteencircle'] = 0x2471; - t['eighteenparen'] = 0x2485; - t['eighteenperiod'] = 0x2499; - t['eightgujarati'] = 0x0AEE; - t['eightgurmukhi'] = 0x0A6E; - t['eighthackarabic'] = 0x0668; - t['eighthangzhou'] = 0x3028; - t['eighthnotebeamed'] = 0x266B; - t['eightideographicparen'] = 0x3227; - t['eightinferior'] = 0x2088; - t['eightmonospace'] = 0xFF18; - t['eightoldstyle'] = 0xF738; - t['eightparen'] = 0x247B; - t['eightperiod'] = 0x248F; - t['eightpersian'] = 0x06F8; - t['eightroman'] = 0x2177; - t['eightsuperior'] = 0x2078; - t['eightthai'] = 0x0E58; - t['einvertedbreve'] = 0x0207; - t['eiotifiedcyrillic'] = 0x0465; - t['ekatakana'] = 0x30A8; - t['ekatakanahalfwidth'] = 0xFF74; - t['ekonkargurmukhi'] = 0x0A74; - t['ekorean'] = 0x3154; - t['elcyrillic'] = 0x043B; - t['element'] = 0x2208; - t['elevencircle'] = 0x246A; - t['elevenparen'] = 0x247E; - t['elevenperiod'] = 0x2492; - t['elevenroman'] = 0x217A; - t['ellipsis'] = 0x2026; - t['ellipsisvertical'] = 0x22EE; - t['emacron'] = 0x0113; - t['emacronacute'] = 0x1E17; - t['emacrongrave'] = 0x1E15; - t['emcyrillic'] = 0x043C; - t['emdash'] = 0x2014; - t['emdashvertical'] = 0xFE31; - t['emonospace'] = 0xFF45; - t['emphasismarkarmenian'] = 0x055B; - t['emptyset'] = 0x2205; - t['enbopomofo'] = 0x3123; - t['encyrillic'] = 0x043D; - t['endash'] = 0x2013; - t['endashvertical'] = 0xFE32; - t['endescendercyrillic'] = 0x04A3; - t['eng'] = 0x014B; - t['engbopomofo'] = 0x3125; - t['enghecyrillic'] = 0x04A5; - t['enhookcyrillic'] = 0x04C8; - t['enspace'] = 0x2002; - t['eogonek'] = 0x0119; - t['eokorean'] = 0x3153; - t['eopen'] = 0x025B; - t['eopenclosed'] = 0x029A; - t['eopenreversed'] = 0x025C; - t['eopenreversedclosed'] = 0x025E; - t['eopenreversedhook'] = 0x025D; - t['eparen'] = 0x24A0; - t['epsilon'] = 0x03B5; - t['epsilontonos'] = 0x03AD; - t['equal'] = 0x003D; - t['equalmonospace'] = 0xFF1D; - t['equalsmall'] = 0xFE66; - t['equalsuperior'] = 0x207C; - t['equivalence'] = 0x2261; - t['erbopomofo'] = 0x3126; - t['ercyrillic'] = 0x0440; - t['ereversed'] = 0x0258; - t['ereversedcyrillic'] = 0x044D; - t['escyrillic'] = 0x0441; - t['esdescendercyrillic'] = 0x04AB; - t['esh'] = 0x0283; - t['eshcurl'] = 0x0286; - t['eshortdeva'] = 0x090E; - t['eshortvowelsigndeva'] = 0x0946; - t['eshreversedloop'] = 0x01AA; - t['eshsquatreversed'] = 0x0285; - t['esmallhiragana'] = 0x3047; - t['esmallkatakana'] = 0x30A7; - t['esmallkatakanahalfwidth'] = 0xFF6A; - t['estimated'] = 0x212E; - t['esuperior'] = 0xF6EC; - t['eta'] = 0x03B7; - t['etarmenian'] = 0x0568; - t['etatonos'] = 0x03AE; - t['eth'] = 0x00F0; - t['etilde'] = 0x1EBD; - t['etildebelow'] = 0x1E1B; - t['etnahtafoukhhebrew'] = 0x0591; - t['etnahtafoukhlefthebrew'] = 0x0591; - t['etnahtahebrew'] = 0x0591; - t['etnahtalefthebrew'] = 0x0591; - t['eturned'] = 0x01DD; - t['eukorean'] = 0x3161; - t['euro'] = 0x20AC; - t['evowelsignbengali'] = 0x09C7; - t['evowelsigndeva'] = 0x0947; - t['evowelsigngujarati'] = 0x0AC7; - t['exclam'] = 0x0021; - t['exclamarmenian'] = 0x055C; - t['exclamdbl'] = 0x203C; - t['exclamdown'] = 0x00A1; - t['exclamdownsmall'] = 0xF7A1; - t['exclammonospace'] = 0xFF01; - t['exclamsmall'] = 0xF721; - t['existential'] = 0x2203; - t['ezh'] = 0x0292; - t['ezhcaron'] = 0x01EF; - t['ezhcurl'] = 0x0293; - t['ezhreversed'] = 0x01B9; - t['ezhtail'] = 0x01BA; - t['f'] = 0x0066; - t['fadeva'] = 0x095E; - t['fagurmukhi'] = 0x0A5E; - t['fahrenheit'] = 0x2109; - t['fathaarabic'] = 0x064E; - t['fathalowarabic'] = 0x064E; - t['fathatanarabic'] = 0x064B; - t['fbopomofo'] = 0x3108; - t['fcircle'] = 0x24D5; - t['fdotaccent'] = 0x1E1F; - t['feharabic'] = 0x0641; - t['feharmenian'] = 0x0586; - t['fehfinalarabic'] = 0xFED2; - t['fehinitialarabic'] = 0xFED3; - t['fehmedialarabic'] = 0xFED4; - t['feicoptic'] = 0x03E5; - t['female'] = 0x2640; - t['ff'] = 0xFB00; - t['ffi'] = 0xFB03; - t['ffl'] = 0xFB04; - t['fi'] = 0xFB01; - t['fifteencircle'] = 0x246E; - t['fifteenparen'] = 0x2482; - t['fifteenperiod'] = 0x2496; - t['figuredash'] = 0x2012; - t['filledbox'] = 0x25A0; - t['filledrect'] = 0x25AC; - t['finalkaf'] = 0x05DA; - t['finalkafdagesh'] = 0xFB3A; - t['finalkafdageshhebrew'] = 0xFB3A; - t['finalkafhebrew'] = 0x05DA; - t['finalmem'] = 0x05DD; - t['finalmemhebrew'] = 0x05DD; - t['finalnun'] = 0x05DF; - t['finalnunhebrew'] = 0x05DF; - t['finalpe'] = 0x05E3; - t['finalpehebrew'] = 0x05E3; - t['finaltsadi'] = 0x05E5; - t['finaltsadihebrew'] = 0x05E5; - t['firsttonechinese'] = 0x02C9; - t['fisheye'] = 0x25C9; - t['fitacyrillic'] = 0x0473; - t['five'] = 0x0035; - t['fivearabic'] = 0x0665; - t['fivebengali'] = 0x09EB; - t['fivecircle'] = 0x2464; - t['fivecircleinversesansserif'] = 0x278E; - t['fivedeva'] = 0x096B; - t['fiveeighths'] = 0x215D; - t['fivegujarati'] = 0x0AEB; - t['fivegurmukhi'] = 0x0A6B; - t['fivehackarabic'] = 0x0665; - t['fivehangzhou'] = 0x3025; - t['fiveideographicparen'] = 0x3224; - t['fiveinferior'] = 0x2085; - t['fivemonospace'] = 0xFF15; - t['fiveoldstyle'] = 0xF735; - t['fiveparen'] = 0x2478; - t['fiveperiod'] = 0x248C; - t['fivepersian'] = 0x06F5; - t['fiveroman'] = 0x2174; - t['fivesuperior'] = 0x2075; - t['fivethai'] = 0x0E55; - t['fl'] = 0xFB02; - t['florin'] = 0x0192; - t['fmonospace'] = 0xFF46; - t['fmsquare'] = 0x3399; - t['fofanthai'] = 0x0E1F; - t['fofathai'] = 0x0E1D; - t['fongmanthai'] = 0x0E4F; - t['forall'] = 0x2200; - t['four'] = 0x0034; - t['fourarabic'] = 0x0664; - t['fourbengali'] = 0x09EA; - t['fourcircle'] = 0x2463; - t['fourcircleinversesansserif'] = 0x278D; - t['fourdeva'] = 0x096A; - t['fourgujarati'] = 0x0AEA; - t['fourgurmukhi'] = 0x0A6A; - t['fourhackarabic'] = 0x0664; - t['fourhangzhou'] = 0x3024; - t['fourideographicparen'] = 0x3223; - t['fourinferior'] = 0x2084; - t['fourmonospace'] = 0xFF14; - t['fournumeratorbengali'] = 0x09F7; - t['fouroldstyle'] = 0xF734; - t['fourparen'] = 0x2477; - t['fourperiod'] = 0x248B; - t['fourpersian'] = 0x06F4; - t['fourroman'] = 0x2173; - t['foursuperior'] = 0x2074; - t['fourteencircle'] = 0x246D; - t['fourteenparen'] = 0x2481; - t['fourteenperiod'] = 0x2495; - t['fourthai'] = 0x0E54; - t['fourthtonechinese'] = 0x02CB; - t['fparen'] = 0x24A1; - t['fraction'] = 0x2044; - t['franc'] = 0x20A3; - t['g'] = 0x0067; - t['gabengali'] = 0x0997; - t['gacute'] = 0x01F5; - t['gadeva'] = 0x0917; - t['gafarabic'] = 0x06AF; - t['gaffinalarabic'] = 0xFB93; - t['gafinitialarabic'] = 0xFB94; - t['gafmedialarabic'] = 0xFB95; - t['gagujarati'] = 0x0A97; - t['gagurmukhi'] = 0x0A17; - t['gahiragana'] = 0x304C; - t['gakatakana'] = 0x30AC; - t['gamma'] = 0x03B3; - t['gammalatinsmall'] = 0x0263; - t['gammasuperior'] = 0x02E0; - t['gangiacoptic'] = 0x03EB; - t['gbopomofo'] = 0x310D; - t['gbreve'] = 0x011F; - t['gcaron'] = 0x01E7; - t['gcedilla'] = 0x0123; - t['gcircle'] = 0x24D6; - t['gcircumflex'] = 0x011D; - t['gcommaaccent'] = 0x0123; - t['gdot'] = 0x0121; - t['gdotaccent'] = 0x0121; - t['gecyrillic'] = 0x0433; - t['gehiragana'] = 0x3052; - t['gekatakana'] = 0x30B2; - t['geometricallyequal'] = 0x2251; - t['gereshaccenthebrew'] = 0x059C; - t['gereshhebrew'] = 0x05F3; - t['gereshmuqdamhebrew'] = 0x059D; - t['germandbls'] = 0x00DF; - t['gershayimaccenthebrew'] = 0x059E; - t['gershayimhebrew'] = 0x05F4; - t['getamark'] = 0x3013; - t['ghabengali'] = 0x0998; - t['ghadarmenian'] = 0x0572; - t['ghadeva'] = 0x0918; - t['ghagujarati'] = 0x0A98; - t['ghagurmukhi'] = 0x0A18; - t['ghainarabic'] = 0x063A; - t['ghainfinalarabic'] = 0xFECE; - t['ghaininitialarabic'] = 0xFECF; - t['ghainmedialarabic'] = 0xFED0; - t['ghemiddlehookcyrillic'] = 0x0495; - t['ghestrokecyrillic'] = 0x0493; - t['gheupturncyrillic'] = 0x0491; - t['ghhadeva'] = 0x095A; - t['ghhagurmukhi'] = 0x0A5A; - t['ghook'] = 0x0260; - t['ghzsquare'] = 0x3393; - t['gihiragana'] = 0x304E; - t['gikatakana'] = 0x30AE; - t['gimarmenian'] = 0x0563; - t['gimel'] = 0x05D2; - t['gimeldagesh'] = 0xFB32; - t['gimeldageshhebrew'] = 0xFB32; - t['gimelhebrew'] = 0x05D2; - t['gjecyrillic'] = 0x0453; - t['glottalinvertedstroke'] = 0x01BE; - t['glottalstop'] = 0x0294; - t['glottalstopinverted'] = 0x0296; - t['glottalstopmod'] = 0x02C0; - t['glottalstopreversed'] = 0x0295; - t['glottalstopreversedmod'] = 0x02C1; - t['glottalstopreversedsuperior'] = 0x02E4; - t['glottalstopstroke'] = 0x02A1; - t['glottalstopstrokereversed'] = 0x02A2; - t['gmacron'] = 0x1E21; - t['gmonospace'] = 0xFF47; - t['gohiragana'] = 0x3054; - t['gokatakana'] = 0x30B4; - t['gparen'] = 0x24A2; - t['gpasquare'] = 0x33AC; - t['gradient'] = 0x2207; - t['grave'] = 0x0060; - t['gravebelowcmb'] = 0x0316; - t['gravecmb'] = 0x0300; - t['gravecomb'] = 0x0300; - t['gravedeva'] = 0x0953; - t['gravelowmod'] = 0x02CE; - t['gravemonospace'] = 0xFF40; - t['gravetonecmb'] = 0x0340; - t['greater'] = 0x003E; - t['greaterequal'] = 0x2265; - t['greaterequalorless'] = 0x22DB; - t['greatermonospace'] = 0xFF1E; - t['greaterorequivalent'] = 0x2273; - t['greaterorless'] = 0x2277; - t['greateroverequal'] = 0x2267; - t['greatersmall'] = 0xFE65; - t['gscript'] = 0x0261; - t['gstroke'] = 0x01E5; - t['guhiragana'] = 0x3050; - t['guillemotleft'] = 0x00AB; - t['guillemotright'] = 0x00BB; - t['guilsinglleft'] = 0x2039; - t['guilsinglright'] = 0x203A; - t['gukatakana'] = 0x30B0; - t['guramusquare'] = 0x3318; - t['gysquare'] = 0x33C9; - t['h'] = 0x0068; - t['haabkhasiancyrillic'] = 0x04A9; - t['haaltonearabic'] = 0x06C1; - t['habengali'] = 0x09B9; - t['hadescendercyrillic'] = 0x04B3; - t['hadeva'] = 0x0939; - t['hagujarati'] = 0x0AB9; - t['hagurmukhi'] = 0x0A39; - t['haharabic'] = 0x062D; - t['hahfinalarabic'] = 0xFEA2; - t['hahinitialarabic'] = 0xFEA3; - t['hahiragana'] = 0x306F; - t['hahmedialarabic'] = 0xFEA4; - t['haitusquare'] = 0x332A; - t['hakatakana'] = 0x30CF; - t['hakatakanahalfwidth'] = 0xFF8A; - t['halantgurmukhi'] = 0x0A4D; - t['hamzaarabic'] = 0x0621; - t['hamzalowarabic'] = 0x0621; - t['hangulfiller'] = 0x3164; - t['hardsigncyrillic'] = 0x044A; - t['harpoonleftbarbup'] = 0x21BC; - t['harpoonrightbarbup'] = 0x21C0; - t['hasquare'] = 0x33CA; - t['hatafpatah'] = 0x05B2; - t['hatafpatah16'] = 0x05B2; - t['hatafpatah23'] = 0x05B2; - t['hatafpatah2f'] = 0x05B2; - t['hatafpatahhebrew'] = 0x05B2; - t['hatafpatahnarrowhebrew'] = 0x05B2; - t['hatafpatahquarterhebrew'] = 0x05B2; - t['hatafpatahwidehebrew'] = 0x05B2; - t['hatafqamats'] = 0x05B3; - t['hatafqamats1b'] = 0x05B3; - t['hatafqamats28'] = 0x05B3; - t['hatafqamats34'] = 0x05B3; - t['hatafqamatshebrew'] = 0x05B3; - t['hatafqamatsnarrowhebrew'] = 0x05B3; - t['hatafqamatsquarterhebrew'] = 0x05B3; - t['hatafqamatswidehebrew'] = 0x05B3; - t['hatafsegol'] = 0x05B1; - t['hatafsegol17'] = 0x05B1; - t['hatafsegol24'] = 0x05B1; - t['hatafsegol30'] = 0x05B1; - t['hatafsegolhebrew'] = 0x05B1; - t['hatafsegolnarrowhebrew'] = 0x05B1; - t['hatafsegolquarterhebrew'] = 0x05B1; - t['hatafsegolwidehebrew'] = 0x05B1; - t['hbar'] = 0x0127; - t['hbopomofo'] = 0x310F; - t['hbrevebelow'] = 0x1E2B; - t['hcedilla'] = 0x1E29; - t['hcircle'] = 0x24D7; - t['hcircumflex'] = 0x0125; - t['hdieresis'] = 0x1E27; - t['hdotaccent'] = 0x1E23; - t['hdotbelow'] = 0x1E25; - t['he'] = 0x05D4; - t['heart'] = 0x2665; - t['heartsuitblack'] = 0x2665; - t['heartsuitwhite'] = 0x2661; - t['hedagesh'] = 0xFB34; - t['hedageshhebrew'] = 0xFB34; - t['hehaltonearabic'] = 0x06C1; - t['heharabic'] = 0x0647; - t['hehebrew'] = 0x05D4; - t['hehfinalaltonearabic'] = 0xFBA7; - t['hehfinalalttwoarabic'] = 0xFEEA; - t['hehfinalarabic'] = 0xFEEA; - t['hehhamzaabovefinalarabic'] = 0xFBA5; - t['hehhamzaaboveisolatedarabic'] = 0xFBA4; - t['hehinitialaltonearabic'] = 0xFBA8; - t['hehinitialarabic'] = 0xFEEB; - t['hehiragana'] = 0x3078; - t['hehmedialaltonearabic'] = 0xFBA9; - t['hehmedialarabic'] = 0xFEEC; - t['heiseierasquare'] = 0x337B; - t['hekatakana'] = 0x30D8; - t['hekatakanahalfwidth'] = 0xFF8D; - t['hekutaarusquare'] = 0x3336; - t['henghook'] = 0x0267; - t['herutusquare'] = 0x3339; - t['het'] = 0x05D7; - t['hethebrew'] = 0x05D7; - t['hhook'] = 0x0266; - t['hhooksuperior'] = 0x02B1; - t['hieuhacirclekorean'] = 0x327B; - t['hieuhaparenkorean'] = 0x321B; - t['hieuhcirclekorean'] = 0x326D; - t['hieuhkorean'] = 0x314E; - t['hieuhparenkorean'] = 0x320D; - t['hihiragana'] = 0x3072; - t['hikatakana'] = 0x30D2; - t['hikatakanahalfwidth'] = 0xFF8B; - t['hiriq'] = 0x05B4; - t['hiriq14'] = 0x05B4; - t['hiriq21'] = 0x05B4; - t['hiriq2d'] = 0x05B4; - t['hiriqhebrew'] = 0x05B4; - t['hiriqnarrowhebrew'] = 0x05B4; - t['hiriqquarterhebrew'] = 0x05B4; - t['hiriqwidehebrew'] = 0x05B4; - t['hlinebelow'] = 0x1E96; - t['hmonospace'] = 0xFF48; - t['hoarmenian'] = 0x0570; - t['hohipthai'] = 0x0E2B; - t['hohiragana'] = 0x307B; - t['hokatakana'] = 0x30DB; - t['hokatakanahalfwidth'] = 0xFF8E; - t['holam'] = 0x05B9; - t['holam19'] = 0x05B9; - t['holam26'] = 0x05B9; - t['holam32'] = 0x05B9; - t['holamhebrew'] = 0x05B9; - t['holamnarrowhebrew'] = 0x05B9; - t['holamquarterhebrew'] = 0x05B9; - t['holamwidehebrew'] = 0x05B9; - t['honokhukthai'] = 0x0E2E; - t['hookabovecomb'] = 0x0309; - t['hookcmb'] = 0x0309; - t['hookpalatalizedbelowcmb'] = 0x0321; - t['hookretroflexbelowcmb'] = 0x0322; - t['hoonsquare'] = 0x3342; - t['horicoptic'] = 0x03E9; - t['horizontalbar'] = 0x2015; - t['horncmb'] = 0x031B; - t['hotsprings'] = 0x2668; - t['house'] = 0x2302; - t['hparen'] = 0x24A3; - t['hsuperior'] = 0x02B0; - t['hturned'] = 0x0265; - t['huhiragana'] = 0x3075; - t['huiitosquare'] = 0x3333; - t['hukatakana'] = 0x30D5; - t['hukatakanahalfwidth'] = 0xFF8C; - t['hungarumlaut'] = 0x02DD; - t['hungarumlautcmb'] = 0x030B; - t['hv'] = 0x0195; - t['hyphen'] = 0x002D; - t['hypheninferior'] = 0xF6E5; - t['hyphenmonospace'] = 0xFF0D; - t['hyphensmall'] = 0xFE63; - t['hyphensuperior'] = 0xF6E6; - t['hyphentwo'] = 0x2010; - t['i'] = 0x0069; - t['iacute'] = 0x00ED; - t['iacyrillic'] = 0x044F; - t['ibengali'] = 0x0987; - t['ibopomofo'] = 0x3127; - t['ibreve'] = 0x012D; - t['icaron'] = 0x01D0; - t['icircle'] = 0x24D8; - t['icircumflex'] = 0x00EE; - t['icyrillic'] = 0x0456; - t['idblgrave'] = 0x0209; - t['ideographearthcircle'] = 0x328F; - t['ideographfirecircle'] = 0x328B; - t['ideographicallianceparen'] = 0x323F; - t['ideographiccallparen'] = 0x323A; - t['ideographiccentrecircle'] = 0x32A5; - t['ideographicclose'] = 0x3006; - t['ideographiccomma'] = 0x3001; - t['ideographiccommaleft'] = 0xFF64; - t['ideographiccongratulationparen'] = 0x3237; - t['ideographiccorrectcircle'] = 0x32A3; - t['ideographicearthparen'] = 0x322F; - t['ideographicenterpriseparen'] = 0x323D; - t['ideographicexcellentcircle'] = 0x329D; - t['ideographicfestivalparen'] = 0x3240; - t['ideographicfinancialcircle'] = 0x3296; - t['ideographicfinancialparen'] = 0x3236; - t['ideographicfireparen'] = 0x322B; - t['ideographichaveparen'] = 0x3232; - t['ideographichighcircle'] = 0x32A4; - t['ideographiciterationmark'] = 0x3005; - t['ideographiclaborcircle'] = 0x3298; - t['ideographiclaborparen'] = 0x3238; - t['ideographicleftcircle'] = 0x32A7; - t['ideographiclowcircle'] = 0x32A6; - t['ideographicmedicinecircle'] = 0x32A9; - t['ideographicmetalparen'] = 0x322E; - t['ideographicmoonparen'] = 0x322A; - t['ideographicnameparen'] = 0x3234; - t['ideographicperiod'] = 0x3002; - t['ideographicprintcircle'] = 0x329E; - t['ideographicreachparen'] = 0x3243; - t['ideographicrepresentparen'] = 0x3239; - t['ideographicresourceparen'] = 0x323E; - t['ideographicrightcircle'] = 0x32A8; - t['ideographicsecretcircle'] = 0x3299; - t['ideographicselfparen'] = 0x3242; - t['ideographicsocietyparen'] = 0x3233; - t['ideographicspace'] = 0x3000; - t['ideographicspecialparen'] = 0x3235; - t['ideographicstockparen'] = 0x3231; - t['ideographicstudyparen'] = 0x323B; - t['ideographicsunparen'] = 0x3230; - t['ideographicsuperviseparen'] = 0x323C; - t['ideographicwaterparen'] = 0x322C; - t['ideographicwoodparen'] = 0x322D; - t['ideographiczero'] = 0x3007; - t['ideographmetalcircle'] = 0x328E; - t['ideographmooncircle'] = 0x328A; - t['ideographnamecircle'] = 0x3294; - t['ideographsuncircle'] = 0x3290; - t['ideographwatercircle'] = 0x328C; - t['ideographwoodcircle'] = 0x328D; - t['ideva'] = 0x0907; - t['idieresis'] = 0x00EF; - t['idieresisacute'] = 0x1E2F; - t['idieresiscyrillic'] = 0x04E5; - t['idotbelow'] = 0x1ECB; - t['iebrevecyrillic'] = 0x04D7; - t['iecyrillic'] = 0x0435; - t['ieungacirclekorean'] = 0x3275; - t['ieungaparenkorean'] = 0x3215; - t['ieungcirclekorean'] = 0x3267; - t['ieungkorean'] = 0x3147; - t['ieungparenkorean'] = 0x3207; - t['igrave'] = 0x00EC; - t['igujarati'] = 0x0A87; - t['igurmukhi'] = 0x0A07; - t['ihiragana'] = 0x3044; - t['ihookabove'] = 0x1EC9; - t['iibengali'] = 0x0988; - t['iicyrillic'] = 0x0438; - t['iideva'] = 0x0908; - t['iigujarati'] = 0x0A88; - t['iigurmukhi'] = 0x0A08; - t['iimatragurmukhi'] = 0x0A40; - t['iinvertedbreve'] = 0x020B; - t['iishortcyrillic'] = 0x0439; - t['iivowelsignbengali'] = 0x09C0; - t['iivowelsigndeva'] = 0x0940; - t['iivowelsigngujarati'] = 0x0AC0; - t['ij'] = 0x0133; - t['ikatakana'] = 0x30A4; - t['ikatakanahalfwidth'] = 0xFF72; - t['ikorean'] = 0x3163; - t['ilde'] = 0x02DC; - t['iluyhebrew'] = 0x05AC; - t['imacron'] = 0x012B; - t['imacroncyrillic'] = 0x04E3; - t['imageorapproximatelyequal'] = 0x2253; - t['imatragurmukhi'] = 0x0A3F; - t['imonospace'] = 0xFF49; - t['increment'] = 0x2206; - t['infinity'] = 0x221E; - t['iniarmenian'] = 0x056B; - t['integral'] = 0x222B; - t['integralbottom'] = 0x2321; - t['integralbt'] = 0x2321; - t['integralex'] = 0xF8F5; - t['integraltop'] = 0x2320; - t['integraltp'] = 0x2320; - t['intersection'] = 0x2229; - t['intisquare'] = 0x3305; - t['invbullet'] = 0x25D8; - t['invcircle'] = 0x25D9; - t['invsmileface'] = 0x263B; - t['iocyrillic'] = 0x0451; - t['iogonek'] = 0x012F; - t['iota'] = 0x03B9; - t['iotadieresis'] = 0x03CA; - t['iotadieresistonos'] = 0x0390; - t['iotalatin'] = 0x0269; - t['iotatonos'] = 0x03AF; - t['iparen'] = 0x24A4; - t['irigurmukhi'] = 0x0A72; - t['ismallhiragana'] = 0x3043; - t['ismallkatakana'] = 0x30A3; - t['ismallkatakanahalfwidth'] = 0xFF68; - t['issharbengali'] = 0x09FA; - t['istroke'] = 0x0268; - t['isuperior'] = 0xF6ED; - t['iterationhiragana'] = 0x309D; - t['iterationkatakana'] = 0x30FD; - t['itilde'] = 0x0129; - t['itildebelow'] = 0x1E2D; - t['iubopomofo'] = 0x3129; - t['iucyrillic'] = 0x044E; - t['ivowelsignbengali'] = 0x09BF; - t['ivowelsigndeva'] = 0x093F; - t['ivowelsigngujarati'] = 0x0ABF; - t['izhitsacyrillic'] = 0x0475; - t['izhitsadblgravecyrillic'] = 0x0477; - t['j'] = 0x006A; - t['jaarmenian'] = 0x0571; - t['jabengali'] = 0x099C; - t['jadeva'] = 0x091C; - t['jagujarati'] = 0x0A9C; - t['jagurmukhi'] = 0x0A1C; - t['jbopomofo'] = 0x3110; - t['jcaron'] = 0x01F0; - t['jcircle'] = 0x24D9; - t['jcircumflex'] = 0x0135; - t['jcrossedtail'] = 0x029D; - t['jdotlessstroke'] = 0x025F; - t['jecyrillic'] = 0x0458; - t['jeemarabic'] = 0x062C; - t['jeemfinalarabic'] = 0xFE9E; - t['jeeminitialarabic'] = 0xFE9F; - t['jeemmedialarabic'] = 0xFEA0; - t['jeharabic'] = 0x0698; - t['jehfinalarabic'] = 0xFB8B; - t['jhabengali'] = 0x099D; - t['jhadeva'] = 0x091D; - t['jhagujarati'] = 0x0A9D; - t['jhagurmukhi'] = 0x0A1D; - t['jheharmenian'] = 0x057B; - t['jis'] = 0x3004; - t['jmonospace'] = 0xFF4A; - t['jparen'] = 0x24A5; - t['jsuperior'] = 0x02B2; - t['k'] = 0x006B; - t['kabashkircyrillic'] = 0x04A1; - t['kabengali'] = 0x0995; - t['kacute'] = 0x1E31; - t['kacyrillic'] = 0x043A; - t['kadescendercyrillic'] = 0x049B; - t['kadeva'] = 0x0915; - t['kaf'] = 0x05DB; - t['kafarabic'] = 0x0643; - t['kafdagesh'] = 0xFB3B; - t['kafdageshhebrew'] = 0xFB3B; - t['kaffinalarabic'] = 0xFEDA; - t['kafhebrew'] = 0x05DB; - t['kafinitialarabic'] = 0xFEDB; - t['kafmedialarabic'] = 0xFEDC; - t['kafrafehebrew'] = 0xFB4D; - t['kagujarati'] = 0x0A95; - t['kagurmukhi'] = 0x0A15; - t['kahiragana'] = 0x304B; - t['kahookcyrillic'] = 0x04C4; - t['kakatakana'] = 0x30AB; - t['kakatakanahalfwidth'] = 0xFF76; - t['kappa'] = 0x03BA; - t['kappasymbolgreek'] = 0x03F0; - t['kapyeounmieumkorean'] = 0x3171; - t['kapyeounphieuphkorean'] = 0x3184; - t['kapyeounpieupkorean'] = 0x3178; - t['kapyeounssangpieupkorean'] = 0x3179; - t['karoriisquare'] = 0x330D; - t['kashidaautoarabic'] = 0x0640; - t['kashidaautonosidebearingarabic'] = 0x0640; - t['kasmallkatakana'] = 0x30F5; - t['kasquare'] = 0x3384; - t['kasraarabic'] = 0x0650; - t['kasratanarabic'] = 0x064D; - t['kastrokecyrillic'] = 0x049F; - t['katahiraprolongmarkhalfwidth'] = 0xFF70; - t['kaverticalstrokecyrillic'] = 0x049D; - t['kbopomofo'] = 0x310E; - t['kcalsquare'] = 0x3389; - t['kcaron'] = 0x01E9; - t['kcedilla'] = 0x0137; - t['kcircle'] = 0x24DA; - t['kcommaaccent'] = 0x0137; - t['kdotbelow'] = 0x1E33; - t['keharmenian'] = 0x0584; - t['kehiragana'] = 0x3051; - t['kekatakana'] = 0x30B1; - t['kekatakanahalfwidth'] = 0xFF79; - t['kenarmenian'] = 0x056F; - t['kesmallkatakana'] = 0x30F6; - t['kgreenlandic'] = 0x0138; - t['khabengali'] = 0x0996; - t['khacyrillic'] = 0x0445; - t['khadeva'] = 0x0916; - t['khagujarati'] = 0x0A96; - t['khagurmukhi'] = 0x0A16; - t['khaharabic'] = 0x062E; - t['khahfinalarabic'] = 0xFEA6; - t['khahinitialarabic'] = 0xFEA7; - t['khahmedialarabic'] = 0xFEA8; - t['kheicoptic'] = 0x03E7; - t['khhadeva'] = 0x0959; - t['khhagurmukhi'] = 0x0A59; - t['khieukhacirclekorean'] = 0x3278; - t['khieukhaparenkorean'] = 0x3218; - t['khieukhcirclekorean'] = 0x326A; - t['khieukhkorean'] = 0x314B; - t['khieukhparenkorean'] = 0x320A; - t['khokhaithai'] = 0x0E02; - t['khokhonthai'] = 0x0E05; - t['khokhuatthai'] = 0x0E03; - t['khokhwaithai'] = 0x0E04; - t['khomutthai'] = 0x0E5B; - t['khook'] = 0x0199; - t['khorakhangthai'] = 0x0E06; - t['khzsquare'] = 0x3391; - t['kihiragana'] = 0x304D; - t['kikatakana'] = 0x30AD; - t['kikatakanahalfwidth'] = 0xFF77; - t['kiroguramusquare'] = 0x3315; - t['kiromeetorusquare'] = 0x3316; - t['kirosquare'] = 0x3314; - t['kiyeokacirclekorean'] = 0x326E; - t['kiyeokaparenkorean'] = 0x320E; - t['kiyeokcirclekorean'] = 0x3260; - t['kiyeokkorean'] = 0x3131; - t['kiyeokparenkorean'] = 0x3200; - t['kiyeoksioskorean'] = 0x3133; - t['kjecyrillic'] = 0x045C; - t['klinebelow'] = 0x1E35; - t['klsquare'] = 0x3398; - t['kmcubedsquare'] = 0x33A6; - t['kmonospace'] = 0xFF4B; - t['kmsquaredsquare'] = 0x33A2; - t['kohiragana'] = 0x3053; - t['kohmsquare'] = 0x33C0; - t['kokaithai'] = 0x0E01; - t['kokatakana'] = 0x30B3; - t['kokatakanahalfwidth'] = 0xFF7A; - t['kooposquare'] = 0x331E; - t['koppacyrillic'] = 0x0481; - t['koreanstandardsymbol'] = 0x327F; - t['koroniscmb'] = 0x0343; - t['kparen'] = 0x24A6; - t['kpasquare'] = 0x33AA; - t['ksicyrillic'] = 0x046F; - t['ktsquare'] = 0x33CF; - t['kturned'] = 0x029E; - t['kuhiragana'] = 0x304F; - t['kukatakana'] = 0x30AF; - t['kukatakanahalfwidth'] = 0xFF78; - t['kvsquare'] = 0x33B8; - t['kwsquare'] = 0x33BE; - t['l'] = 0x006C; - t['labengali'] = 0x09B2; - t['lacute'] = 0x013A; - t['ladeva'] = 0x0932; - t['lagujarati'] = 0x0AB2; - t['lagurmukhi'] = 0x0A32; - t['lakkhangyaothai'] = 0x0E45; - t['lamaleffinalarabic'] = 0xFEFC; - t['lamalefhamzaabovefinalarabic'] = 0xFEF8; - t['lamalefhamzaaboveisolatedarabic'] = 0xFEF7; - t['lamalefhamzabelowfinalarabic'] = 0xFEFA; - t['lamalefhamzabelowisolatedarabic'] = 0xFEF9; - t['lamalefisolatedarabic'] = 0xFEFB; - t['lamalefmaddaabovefinalarabic'] = 0xFEF6; - t['lamalefmaddaaboveisolatedarabic'] = 0xFEF5; - t['lamarabic'] = 0x0644; - t['lambda'] = 0x03BB; - t['lambdastroke'] = 0x019B; - t['lamed'] = 0x05DC; - t['lameddagesh'] = 0xFB3C; - t['lameddageshhebrew'] = 0xFB3C; - t['lamedhebrew'] = 0x05DC; - t['lamfinalarabic'] = 0xFEDE; - t['lamhahinitialarabic'] = 0xFCCA; - t['laminitialarabic'] = 0xFEDF; - t['lamjeeminitialarabic'] = 0xFCC9; - t['lamkhahinitialarabic'] = 0xFCCB; - t['lamlamhehisolatedarabic'] = 0xFDF2; - t['lammedialarabic'] = 0xFEE0; - t['lammeemhahinitialarabic'] = 0xFD88; - t['lammeeminitialarabic'] = 0xFCCC; - t['largecircle'] = 0x25EF; - t['lbar'] = 0x019A; - t['lbelt'] = 0x026C; - t['lbopomofo'] = 0x310C; - t['lcaron'] = 0x013E; - t['lcedilla'] = 0x013C; - t['lcircle'] = 0x24DB; - t['lcircumflexbelow'] = 0x1E3D; - t['lcommaaccent'] = 0x013C; - t['ldot'] = 0x0140; - t['ldotaccent'] = 0x0140; - t['ldotbelow'] = 0x1E37; - t['ldotbelowmacron'] = 0x1E39; - t['leftangleabovecmb'] = 0x031A; - t['lefttackbelowcmb'] = 0x0318; - t['less'] = 0x003C; - t['lessequal'] = 0x2264; - t['lessequalorgreater'] = 0x22DA; - t['lessmonospace'] = 0xFF1C; - t['lessorequivalent'] = 0x2272; - t['lessorgreater'] = 0x2276; - t['lessoverequal'] = 0x2266; - t['lesssmall'] = 0xFE64; - t['lezh'] = 0x026E; - t['lfblock'] = 0x258C; - t['lhookretroflex'] = 0x026D; - t['lira'] = 0x20A4; - t['liwnarmenian'] = 0x056C; - t['lj'] = 0x01C9; - t['ljecyrillic'] = 0x0459; - t['ll'] = 0xF6C0; - t['lladeva'] = 0x0933; - t['llagujarati'] = 0x0AB3; - t['llinebelow'] = 0x1E3B; - t['llladeva'] = 0x0934; - t['llvocalicbengali'] = 0x09E1; - t['llvocalicdeva'] = 0x0961; - t['llvocalicvowelsignbengali'] = 0x09E3; - t['llvocalicvowelsigndeva'] = 0x0963; - t['lmiddletilde'] = 0x026B; - t['lmonospace'] = 0xFF4C; - t['lmsquare'] = 0x33D0; - t['lochulathai'] = 0x0E2C; - t['logicaland'] = 0x2227; - t['logicalnot'] = 0x00AC; - t['logicalnotreversed'] = 0x2310; - t['logicalor'] = 0x2228; - t['lolingthai'] = 0x0E25; - t['longs'] = 0x017F; - t['lowlinecenterline'] = 0xFE4E; - t['lowlinecmb'] = 0x0332; - t['lowlinedashed'] = 0xFE4D; - t['lozenge'] = 0x25CA; - t['lparen'] = 0x24A7; - t['lslash'] = 0x0142; - t['lsquare'] = 0x2113; - t['lsuperior'] = 0xF6EE; - t['ltshade'] = 0x2591; - t['luthai'] = 0x0E26; - t['lvocalicbengali'] = 0x098C; - t['lvocalicdeva'] = 0x090C; - t['lvocalicvowelsignbengali'] = 0x09E2; - t['lvocalicvowelsigndeva'] = 0x0962; - t['lxsquare'] = 0x33D3; - t['m'] = 0x006D; - t['mabengali'] = 0x09AE; - t['macron'] = 0x00AF; - t['macronbelowcmb'] = 0x0331; - t['macroncmb'] = 0x0304; - t['macronlowmod'] = 0x02CD; - t['macronmonospace'] = 0xFFE3; - t['macute'] = 0x1E3F; - t['madeva'] = 0x092E; - t['magujarati'] = 0x0AAE; - t['magurmukhi'] = 0x0A2E; - t['mahapakhhebrew'] = 0x05A4; - t['mahapakhlefthebrew'] = 0x05A4; - t['mahiragana'] = 0x307E; - t['maichattawalowleftthai'] = 0xF895; - t['maichattawalowrightthai'] = 0xF894; - t['maichattawathai'] = 0x0E4B; - t['maichattawaupperleftthai'] = 0xF893; - t['maieklowleftthai'] = 0xF88C; - t['maieklowrightthai'] = 0xF88B; - t['maiekthai'] = 0x0E48; - t['maiekupperleftthai'] = 0xF88A; - t['maihanakatleftthai'] = 0xF884; - t['maihanakatthai'] = 0x0E31; - t['maitaikhuleftthai'] = 0xF889; - t['maitaikhuthai'] = 0x0E47; - t['maitholowleftthai'] = 0xF88F; - t['maitholowrightthai'] = 0xF88E; - t['maithothai'] = 0x0E49; - t['maithoupperleftthai'] = 0xF88D; - t['maitrilowleftthai'] = 0xF892; - t['maitrilowrightthai'] = 0xF891; - t['maitrithai'] = 0x0E4A; - t['maitriupperleftthai'] = 0xF890; - t['maiyamokthai'] = 0x0E46; - t['makatakana'] = 0x30DE; - t['makatakanahalfwidth'] = 0xFF8F; - t['male'] = 0x2642; - t['mansyonsquare'] = 0x3347; - t['maqafhebrew'] = 0x05BE; - t['mars'] = 0x2642; - t['masoracirclehebrew'] = 0x05AF; - t['masquare'] = 0x3383; - t['mbopomofo'] = 0x3107; - t['mbsquare'] = 0x33D4; - t['mcircle'] = 0x24DC; - t['mcubedsquare'] = 0x33A5; - t['mdotaccent'] = 0x1E41; - t['mdotbelow'] = 0x1E43; - t['meemarabic'] = 0x0645; - t['meemfinalarabic'] = 0xFEE2; - t['meeminitialarabic'] = 0xFEE3; - t['meemmedialarabic'] = 0xFEE4; - t['meemmeeminitialarabic'] = 0xFCD1; - t['meemmeemisolatedarabic'] = 0xFC48; - t['meetorusquare'] = 0x334D; - t['mehiragana'] = 0x3081; - t['meizierasquare'] = 0x337E; - t['mekatakana'] = 0x30E1; - t['mekatakanahalfwidth'] = 0xFF92; - t['mem'] = 0x05DE; - t['memdagesh'] = 0xFB3E; - t['memdageshhebrew'] = 0xFB3E; - t['memhebrew'] = 0x05DE; - t['menarmenian'] = 0x0574; - t['merkhahebrew'] = 0x05A5; - t['merkhakefulahebrew'] = 0x05A6; - t['merkhakefulalefthebrew'] = 0x05A6; - t['merkhalefthebrew'] = 0x05A5; - t['mhook'] = 0x0271; - t['mhzsquare'] = 0x3392; - t['middledotkatakanahalfwidth'] = 0xFF65; - t['middot'] = 0x00B7; - t['mieumacirclekorean'] = 0x3272; - t['mieumaparenkorean'] = 0x3212; - t['mieumcirclekorean'] = 0x3264; - t['mieumkorean'] = 0x3141; - t['mieumpansioskorean'] = 0x3170; - t['mieumparenkorean'] = 0x3204; - t['mieumpieupkorean'] = 0x316E; - t['mieumsioskorean'] = 0x316F; - t['mihiragana'] = 0x307F; - t['mikatakana'] = 0x30DF; - t['mikatakanahalfwidth'] = 0xFF90; - t['minus'] = 0x2212; - t['minusbelowcmb'] = 0x0320; - t['minuscircle'] = 0x2296; - t['minusmod'] = 0x02D7; - t['minusplus'] = 0x2213; - t['minute'] = 0x2032; - t['miribaarusquare'] = 0x334A; - t['mirisquare'] = 0x3349; - t['mlonglegturned'] = 0x0270; - t['mlsquare'] = 0x3396; - t['mmcubedsquare'] = 0x33A3; - t['mmonospace'] = 0xFF4D; - t['mmsquaredsquare'] = 0x339F; - t['mohiragana'] = 0x3082; - t['mohmsquare'] = 0x33C1; - t['mokatakana'] = 0x30E2; - t['mokatakanahalfwidth'] = 0xFF93; - t['molsquare'] = 0x33D6; - t['momathai'] = 0x0E21; - t['moverssquare'] = 0x33A7; - t['moverssquaredsquare'] = 0x33A8; - t['mparen'] = 0x24A8; - t['mpasquare'] = 0x33AB; - t['mssquare'] = 0x33B3; - t['msuperior'] = 0xF6EF; - t['mturned'] = 0x026F; - t['mu'] = 0x00B5; - t['mu1'] = 0x00B5; - t['muasquare'] = 0x3382; - t['muchgreater'] = 0x226B; - t['muchless'] = 0x226A; - t['mufsquare'] = 0x338C; - t['mugreek'] = 0x03BC; - t['mugsquare'] = 0x338D; - t['muhiragana'] = 0x3080; - t['mukatakana'] = 0x30E0; - t['mukatakanahalfwidth'] = 0xFF91; - t['mulsquare'] = 0x3395; - t['multiply'] = 0x00D7; - t['mumsquare'] = 0x339B; - t['munahhebrew'] = 0x05A3; - t['munahlefthebrew'] = 0x05A3; - t['musicalnote'] = 0x266A; - t['musicalnotedbl'] = 0x266B; - t['musicflatsign'] = 0x266D; - t['musicsharpsign'] = 0x266F; - t['mussquare'] = 0x33B2; - t['muvsquare'] = 0x33B6; - t['muwsquare'] = 0x33BC; - t['mvmegasquare'] = 0x33B9; - t['mvsquare'] = 0x33B7; - t['mwmegasquare'] = 0x33BF; - t['mwsquare'] = 0x33BD; - t['n'] = 0x006E; - t['nabengali'] = 0x09A8; - t['nabla'] = 0x2207; - t['nacute'] = 0x0144; - t['nadeva'] = 0x0928; - t['nagujarati'] = 0x0AA8; - t['nagurmukhi'] = 0x0A28; - t['nahiragana'] = 0x306A; - t['nakatakana'] = 0x30CA; - t['nakatakanahalfwidth'] = 0xFF85; - t['napostrophe'] = 0x0149; - t['nasquare'] = 0x3381; - t['nbopomofo'] = 0x310B; - t['nbspace'] = 0x00A0; - t['ncaron'] = 0x0148; - t['ncedilla'] = 0x0146; - t['ncircle'] = 0x24DD; - t['ncircumflexbelow'] = 0x1E4B; - t['ncommaaccent'] = 0x0146; - t['ndotaccent'] = 0x1E45; - t['ndotbelow'] = 0x1E47; - t['nehiragana'] = 0x306D; - t['nekatakana'] = 0x30CD; - t['nekatakanahalfwidth'] = 0xFF88; - t['newsheqelsign'] = 0x20AA; - t['nfsquare'] = 0x338B; - t['ngabengali'] = 0x0999; - t['ngadeva'] = 0x0919; - t['ngagujarati'] = 0x0A99; - t['ngagurmukhi'] = 0x0A19; - t['ngonguthai'] = 0x0E07; - t['nhiragana'] = 0x3093; - t['nhookleft'] = 0x0272; - t['nhookretroflex'] = 0x0273; - t['nieunacirclekorean'] = 0x326F; - t['nieunaparenkorean'] = 0x320F; - t['nieuncieuckorean'] = 0x3135; - t['nieuncirclekorean'] = 0x3261; - t['nieunhieuhkorean'] = 0x3136; - t['nieunkorean'] = 0x3134; - t['nieunpansioskorean'] = 0x3168; - t['nieunparenkorean'] = 0x3201; - t['nieunsioskorean'] = 0x3167; - t['nieuntikeutkorean'] = 0x3166; - t['nihiragana'] = 0x306B; - t['nikatakana'] = 0x30CB; - t['nikatakanahalfwidth'] = 0xFF86; - t['nikhahitleftthai'] = 0xF899; - t['nikhahitthai'] = 0x0E4D; - t['nine'] = 0x0039; - t['ninearabic'] = 0x0669; - t['ninebengali'] = 0x09EF; - t['ninecircle'] = 0x2468; - t['ninecircleinversesansserif'] = 0x2792; - t['ninedeva'] = 0x096F; - t['ninegujarati'] = 0x0AEF; - t['ninegurmukhi'] = 0x0A6F; - t['ninehackarabic'] = 0x0669; - t['ninehangzhou'] = 0x3029; - t['nineideographicparen'] = 0x3228; - t['nineinferior'] = 0x2089; - t['ninemonospace'] = 0xFF19; - t['nineoldstyle'] = 0xF739; - t['nineparen'] = 0x247C; - t['nineperiod'] = 0x2490; - t['ninepersian'] = 0x06F9; - t['nineroman'] = 0x2178; - t['ninesuperior'] = 0x2079; - t['nineteencircle'] = 0x2472; - t['nineteenparen'] = 0x2486; - t['nineteenperiod'] = 0x249A; - t['ninethai'] = 0x0E59; - t['nj'] = 0x01CC; - t['njecyrillic'] = 0x045A; - t['nkatakana'] = 0x30F3; - t['nkatakanahalfwidth'] = 0xFF9D; - t['nlegrightlong'] = 0x019E; - t['nlinebelow'] = 0x1E49; - t['nmonospace'] = 0xFF4E; - t['nmsquare'] = 0x339A; - t['nnabengali'] = 0x09A3; - t['nnadeva'] = 0x0923; - t['nnagujarati'] = 0x0AA3; - t['nnagurmukhi'] = 0x0A23; - t['nnnadeva'] = 0x0929; - t['nohiragana'] = 0x306E; - t['nokatakana'] = 0x30CE; - t['nokatakanahalfwidth'] = 0xFF89; - t['nonbreakingspace'] = 0x00A0; - t['nonenthai'] = 0x0E13; - t['nonuthai'] = 0x0E19; - t['noonarabic'] = 0x0646; - t['noonfinalarabic'] = 0xFEE6; - t['noonghunnaarabic'] = 0x06BA; - t['noonghunnafinalarabic'] = 0xFB9F; - t['nooninitialarabic'] = 0xFEE7; - t['noonjeeminitialarabic'] = 0xFCD2; - t['noonjeemisolatedarabic'] = 0xFC4B; - t['noonmedialarabic'] = 0xFEE8; - t['noonmeeminitialarabic'] = 0xFCD5; - t['noonmeemisolatedarabic'] = 0xFC4E; - t['noonnoonfinalarabic'] = 0xFC8D; - t['notcontains'] = 0x220C; - t['notelement'] = 0x2209; - t['notelementof'] = 0x2209; - t['notequal'] = 0x2260; - t['notgreater'] = 0x226F; - t['notgreaternorequal'] = 0x2271; - t['notgreaternorless'] = 0x2279; - t['notidentical'] = 0x2262; - t['notless'] = 0x226E; - t['notlessnorequal'] = 0x2270; - t['notparallel'] = 0x2226; - t['notprecedes'] = 0x2280; - t['notsubset'] = 0x2284; - t['notsucceeds'] = 0x2281; - t['notsuperset'] = 0x2285; - t['nowarmenian'] = 0x0576; - t['nparen'] = 0x24A9; - t['nssquare'] = 0x33B1; - t['nsuperior'] = 0x207F; - t['ntilde'] = 0x00F1; - t['nu'] = 0x03BD; - t['nuhiragana'] = 0x306C; - t['nukatakana'] = 0x30CC; - t['nukatakanahalfwidth'] = 0xFF87; - t['nuktabengali'] = 0x09BC; - t['nuktadeva'] = 0x093C; - t['nuktagujarati'] = 0x0ABC; - t['nuktagurmukhi'] = 0x0A3C; - t['numbersign'] = 0x0023; - t['numbersignmonospace'] = 0xFF03; - t['numbersignsmall'] = 0xFE5F; - t['numeralsigngreek'] = 0x0374; - t['numeralsignlowergreek'] = 0x0375; - t['numero'] = 0x2116; - t['nun'] = 0x05E0; - t['nundagesh'] = 0xFB40; - t['nundageshhebrew'] = 0xFB40; - t['nunhebrew'] = 0x05E0; - t['nvsquare'] = 0x33B5; - t['nwsquare'] = 0x33BB; - t['nyabengali'] = 0x099E; - t['nyadeva'] = 0x091E; - t['nyagujarati'] = 0x0A9E; - t['nyagurmukhi'] = 0x0A1E; - t['o'] = 0x006F; - t['oacute'] = 0x00F3; - t['oangthai'] = 0x0E2D; - t['obarred'] = 0x0275; - t['obarredcyrillic'] = 0x04E9; - t['obarreddieresiscyrillic'] = 0x04EB; - t['obengali'] = 0x0993; - t['obopomofo'] = 0x311B; - t['obreve'] = 0x014F; - t['ocandradeva'] = 0x0911; - t['ocandragujarati'] = 0x0A91; - t['ocandravowelsigndeva'] = 0x0949; - t['ocandravowelsigngujarati'] = 0x0AC9; - t['ocaron'] = 0x01D2; - t['ocircle'] = 0x24DE; - t['ocircumflex'] = 0x00F4; - t['ocircumflexacute'] = 0x1ED1; - t['ocircumflexdotbelow'] = 0x1ED9; - t['ocircumflexgrave'] = 0x1ED3; - t['ocircumflexhookabove'] = 0x1ED5; - t['ocircumflextilde'] = 0x1ED7; - t['ocyrillic'] = 0x043E; - t['odblacute'] = 0x0151; - t['odblgrave'] = 0x020D; - t['odeva'] = 0x0913; - t['odieresis'] = 0x00F6; - t['odieresiscyrillic'] = 0x04E7; - t['odotbelow'] = 0x1ECD; - t['oe'] = 0x0153; - t['oekorean'] = 0x315A; - t['ogonek'] = 0x02DB; - t['ogonekcmb'] = 0x0328; - t['ograve'] = 0x00F2; - t['ogujarati'] = 0x0A93; - t['oharmenian'] = 0x0585; - t['ohiragana'] = 0x304A; - t['ohookabove'] = 0x1ECF; - t['ohorn'] = 0x01A1; - t['ohornacute'] = 0x1EDB; - t['ohorndotbelow'] = 0x1EE3; - t['ohorngrave'] = 0x1EDD; - t['ohornhookabove'] = 0x1EDF; - t['ohorntilde'] = 0x1EE1; - t['ohungarumlaut'] = 0x0151; - t['oi'] = 0x01A3; - t['oinvertedbreve'] = 0x020F; - t['okatakana'] = 0x30AA; - t['okatakanahalfwidth'] = 0xFF75; - t['okorean'] = 0x3157; - t['olehebrew'] = 0x05AB; - t['omacron'] = 0x014D; - t['omacronacute'] = 0x1E53; - t['omacrongrave'] = 0x1E51; - t['omdeva'] = 0x0950; - t['omega'] = 0x03C9; - t['omega1'] = 0x03D6; - t['omegacyrillic'] = 0x0461; - t['omegalatinclosed'] = 0x0277; - t['omegaroundcyrillic'] = 0x047B; - t['omegatitlocyrillic'] = 0x047D; - t['omegatonos'] = 0x03CE; - t['omgujarati'] = 0x0AD0; - t['omicron'] = 0x03BF; - t['omicrontonos'] = 0x03CC; - t['omonospace'] = 0xFF4F; - t['one'] = 0x0031; - t['onearabic'] = 0x0661; - t['onebengali'] = 0x09E7; - t['onecircle'] = 0x2460; - t['onecircleinversesansserif'] = 0x278A; - t['onedeva'] = 0x0967; - t['onedotenleader'] = 0x2024; - t['oneeighth'] = 0x215B; - t['onefitted'] = 0xF6DC; - t['onegujarati'] = 0x0AE7; - t['onegurmukhi'] = 0x0A67; - t['onehackarabic'] = 0x0661; - t['onehalf'] = 0x00BD; - t['onehangzhou'] = 0x3021; - t['oneideographicparen'] = 0x3220; - t['oneinferior'] = 0x2081; - t['onemonospace'] = 0xFF11; - t['onenumeratorbengali'] = 0x09F4; - t['oneoldstyle'] = 0xF731; - t['oneparen'] = 0x2474; - t['oneperiod'] = 0x2488; - t['onepersian'] = 0x06F1; - t['onequarter'] = 0x00BC; - t['oneroman'] = 0x2170; - t['onesuperior'] = 0x00B9; - t['onethai'] = 0x0E51; - t['onethird'] = 0x2153; - t['oogonek'] = 0x01EB; - t['oogonekmacron'] = 0x01ED; - t['oogurmukhi'] = 0x0A13; - t['oomatragurmukhi'] = 0x0A4B; - t['oopen'] = 0x0254; - t['oparen'] = 0x24AA; - t['openbullet'] = 0x25E6; - t['option'] = 0x2325; - t['ordfeminine'] = 0x00AA; - t['ordmasculine'] = 0x00BA; - t['orthogonal'] = 0x221F; - t['oshortdeva'] = 0x0912; - t['oshortvowelsigndeva'] = 0x094A; - t['oslash'] = 0x00F8; - t['oslashacute'] = 0x01FF; - t['osmallhiragana'] = 0x3049; - t['osmallkatakana'] = 0x30A9; - t['osmallkatakanahalfwidth'] = 0xFF6B; - t['ostrokeacute'] = 0x01FF; - t['osuperior'] = 0xF6F0; - t['otcyrillic'] = 0x047F; - t['otilde'] = 0x00F5; - t['otildeacute'] = 0x1E4D; - t['otildedieresis'] = 0x1E4F; - t['oubopomofo'] = 0x3121; - t['overline'] = 0x203E; - t['overlinecenterline'] = 0xFE4A; - t['overlinecmb'] = 0x0305; - t['overlinedashed'] = 0xFE49; - t['overlinedblwavy'] = 0xFE4C; - t['overlinewavy'] = 0xFE4B; - t['overscore'] = 0x00AF; - t['ovowelsignbengali'] = 0x09CB; - t['ovowelsigndeva'] = 0x094B; - t['ovowelsigngujarati'] = 0x0ACB; - t['p'] = 0x0070; - t['paampssquare'] = 0x3380; - t['paasentosquare'] = 0x332B; - t['pabengali'] = 0x09AA; - t['pacute'] = 0x1E55; - t['padeva'] = 0x092A; - t['pagedown'] = 0x21DF; - t['pageup'] = 0x21DE; - t['pagujarati'] = 0x0AAA; - t['pagurmukhi'] = 0x0A2A; - t['pahiragana'] = 0x3071; - t['paiyannoithai'] = 0x0E2F; - t['pakatakana'] = 0x30D1; - t['palatalizationcyrilliccmb'] = 0x0484; - t['palochkacyrillic'] = 0x04C0; - t['pansioskorean'] = 0x317F; - t['paragraph'] = 0x00B6; - t['parallel'] = 0x2225; - t['parenleft'] = 0x0028; - t['parenleftaltonearabic'] = 0xFD3E; - t['parenleftbt'] = 0xF8ED; - t['parenleftex'] = 0xF8EC; - t['parenleftinferior'] = 0x208D; - t['parenleftmonospace'] = 0xFF08; - t['parenleftsmall'] = 0xFE59; - t['parenleftsuperior'] = 0x207D; - t['parenlefttp'] = 0xF8EB; - t['parenleftvertical'] = 0xFE35; - t['parenright'] = 0x0029; - t['parenrightaltonearabic'] = 0xFD3F; - t['parenrightbt'] = 0xF8F8; - t['parenrightex'] = 0xF8F7; - t['parenrightinferior'] = 0x208E; - t['parenrightmonospace'] = 0xFF09; - t['parenrightsmall'] = 0xFE5A; - t['parenrightsuperior'] = 0x207E; - t['parenrighttp'] = 0xF8F6; - t['parenrightvertical'] = 0xFE36; - t['partialdiff'] = 0x2202; - t['paseqhebrew'] = 0x05C0; - t['pashtahebrew'] = 0x0599; - t['pasquare'] = 0x33A9; - t['patah'] = 0x05B7; - t['patah11'] = 0x05B7; - t['patah1d'] = 0x05B7; - t['patah2a'] = 0x05B7; - t['patahhebrew'] = 0x05B7; - t['patahnarrowhebrew'] = 0x05B7; - t['patahquarterhebrew'] = 0x05B7; - t['patahwidehebrew'] = 0x05B7; - t['pazerhebrew'] = 0x05A1; - t['pbopomofo'] = 0x3106; - t['pcircle'] = 0x24DF; - t['pdotaccent'] = 0x1E57; - t['pe'] = 0x05E4; - t['pecyrillic'] = 0x043F; - t['pedagesh'] = 0xFB44; - t['pedageshhebrew'] = 0xFB44; - t['peezisquare'] = 0x333B; - t['pefinaldageshhebrew'] = 0xFB43; - t['peharabic'] = 0x067E; - t['peharmenian'] = 0x057A; - t['pehebrew'] = 0x05E4; - t['pehfinalarabic'] = 0xFB57; - t['pehinitialarabic'] = 0xFB58; - t['pehiragana'] = 0x307A; - t['pehmedialarabic'] = 0xFB59; - t['pekatakana'] = 0x30DA; - t['pemiddlehookcyrillic'] = 0x04A7; - t['perafehebrew'] = 0xFB4E; - t['percent'] = 0x0025; - t['percentarabic'] = 0x066A; - t['percentmonospace'] = 0xFF05; - t['percentsmall'] = 0xFE6A; - t['period'] = 0x002E; - t['periodarmenian'] = 0x0589; - t['periodcentered'] = 0x00B7; - t['periodhalfwidth'] = 0xFF61; - t['periodinferior'] = 0xF6E7; - t['periodmonospace'] = 0xFF0E; - t['periodsmall'] = 0xFE52; - t['periodsuperior'] = 0xF6E8; - t['perispomenigreekcmb'] = 0x0342; - t['perpendicular'] = 0x22A5; - t['perthousand'] = 0x2030; - t['peseta'] = 0x20A7; - t['pfsquare'] = 0x338A; - t['phabengali'] = 0x09AB; - t['phadeva'] = 0x092B; - t['phagujarati'] = 0x0AAB; - t['phagurmukhi'] = 0x0A2B; - t['phi'] = 0x03C6; - t['phi1'] = 0x03D5; - t['phieuphacirclekorean'] = 0x327A; - t['phieuphaparenkorean'] = 0x321A; - t['phieuphcirclekorean'] = 0x326C; - t['phieuphkorean'] = 0x314D; - t['phieuphparenkorean'] = 0x320C; - t['philatin'] = 0x0278; - t['phinthuthai'] = 0x0E3A; - t['phisymbolgreek'] = 0x03D5; - t['phook'] = 0x01A5; - t['phophanthai'] = 0x0E1E; - t['phophungthai'] = 0x0E1C; - t['phosamphaothai'] = 0x0E20; - t['pi'] = 0x03C0; - t['pieupacirclekorean'] = 0x3273; - t['pieupaparenkorean'] = 0x3213; - t['pieupcieuckorean'] = 0x3176; - t['pieupcirclekorean'] = 0x3265; - t['pieupkiyeokkorean'] = 0x3172; - t['pieupkorean'] = 0x3142; - t['pieupparenkorean'] = 0x3205; - t['pieupsioskiyeokkorean'] = 0x3174; - t['pieupsioskorean'] = 0x3144; - t['pieupsiostikeutkorean'] = 0x3175; - t['pieupthieuthkorean'] = 0x3177; - t['pieuptikeutkorean'] = 0x3173; - t['pihiragana'] = 0x3074; - t['pikatakana'] = 0x30D4; - t['pisymbolgreek'] = 0x03D6; - t['piwrarmenian'] = 0x0583; - t['plus'] = 0x002B; - t['plusbelowcmb'] = 0x031F; - t['pluscircle'] = 0x2295; - t['plusminus'] = 0x00B1; - t['plusmod'] = 0x02D6; - t['plusmonospace'] = 0xFF0B; - t['plussmall'] = 0xFE62; - t['plussuperior'] = 0x207A; - t['pmonospace'] = 0xFF50; - t['pmsquare'] = 0x33D8; - t['pohiragana'] = 0x307D; - t['pointingindexdownwhite'] = 0x261F; - t['pointingindexleftwhite'] = 0x261C; - t['pointingindexrightwhite'] = 0x261E; - t['pointingindexupwhite'] = 0x261D; - t['pokatakana'] = 0x30DD; - t['poplathai'] = 0x0E1B; - t['postalmark'] = 0x3012; - t['postalmarkface'] = 0x3020; - t['pparen'] = 0x24AB; - t['precedes'] = 0x227A; - t['prescription'] = 0x211E; - t['primemod'] = 0x02B9; - t['primereversed'] = 0x2035; - t['product'] = 0x220F; - t['projective'] = 0x2305; - t['prolongedkana'] = 0x30FC; - t['propellor'] = 0x2318; - t['propersubset'] = 0x2282; - t['propersuperset'] = 0x2283; - t['proportion'] = 0x2237; - t['proportional'] = 0x221D; - t['psi'] = 0x03C8; - t['psicyrillic'] = 0x0471; - t['psilipneumatacyrilliccmb'] = 0x0486; - t['pssquare'] = 0x33B0; - t['puhiragana'] = 0x3077; - t['pukatakana'] = 0x30D7; - t['pvsquare'] = 0x33B4; - t['pwsquare'] = 0x33BA; - t['q'] = 0x0071; - t['qadeva'] = 0x0958; - t['qadmahebrew'] = 0x05A8; - t['qafarabic'] = 0x0642; - t['qaffinalarabic'] = 0xFED6; - t['qafinitialarabic'] = 0xFED7; - t['qafmedialarabic'] = 0xFED8; - t['qamats'] = 0x05B8; - t['qamats10'] = 0x05B8; - t['qamats1a'] = 0x05B8; - t['qamats1c'] = 0x05B8; - t['qamats27'] = 0x05B8; - t['qamats29'] = 0x05B8; - t['qamats33'] = 0x05B8; - t['qamatsde'] = 0x05B8; - t['qamatshebrew'] = 0x05B8; - t['qamatsnarrowhebrew'] = 0x05B8; - t['qamatsqatanhebrew'] = 0x05B8; - t['qamatsqatannarrowhebrew'] = 0x05B8; - t['qamatsqatanquarterhebrew'] = 0x05B8; - t['qamatsqatanwidehebrew'] = 0x05B8; - t['qamatsquarterhebrew'] = 0x05B8; - t['qamatswidehebrew'] = 0x05B8; - t['qarneyparahebrew'] = 0x059F; - t['qbopomofo'] = 0x3111; - t['qcircle'] = 0x24E0; - t['qhook'] = 0x02A0; - t['qmonospace'] = 0xFF51; - t['qof'] = 0x05E7; - t['qofdagesh'] = 0xFB47; - t['qofdageshhebrew'] = 0xFB47; - t['qofhebrew'] = 0x05E7; - t['qparen'] = 0x24AC; - t['quarternote'] = 0x2669; - t['qubuts'] = 0x05BB; - t['qubuts18'] = 0x05BB; - t['qubuts25'] = 0x05BB; - t['qubuts31'] = 0x05BB; - t['qubutshebrew'] = 0x05BB; - t['qubutsnarrowhebrew'] = 0x05BB; - t['qubutsquarterhebrew'] = 0x05BB; - t['qubutswidehebrew'] = 0x05BB; - t['question'] = 0x003F; - t['questionarabic'] = 0x061F; - t['questionarmenian'] = 0x055E; - t['questiondown'] = 0x00BF; - t['questiondownsmall'] = 0xF7BF; - t['questiongreek'] = 0x037E; - t['questionmonospace'] = 0xFF1F; - t['questionsmall'] = 0xF73F; - t['quotedbl'] = 0x0022; - t['quotedblbase'] = 0x201E; - t['quotedblleft'] = 0x201C; - t['quotedblmonospace'] = 0xFF02; - t['quotedblprime'] = 0x301E; - t['quotedblprimereversed'] = 0x301D; - t['quotedblright'] = 0x201D; - t['quoteleft'] = 0x2018; - t['quoteleftreversed'] = 0x201B; - t['quotereversed'] = 0x201B; - t['quoteright'] = 0x2019; - t['quoterightn'] = 0x0149; - t['quotesinglbase'] = 0x201A; - t['quotesingle'] = 0x0027; - t['quotesinglemonospace'] = 0xFF07; - t['r'] = 0x0072; - t['raarmenian'] = 0x057C; - t['rabengali'] = 0x09B0; - t['racute'] = 0x0155; - t['radeva'] = 0x0930; - t['radical'] = 0x221A; - t['radicalex'] = 0xF8E5; - t['radoverssquare'] = 0x33AE; - t['radoverssquaredsquare'] = 0x33AF; - t['radsquare'] = 0x33AD; - t['rafe'] = 0x05BF; - t['rafehebrew'] = 0x05BF; - t['ragujarati'] = 0x0AB0; - t['ragurmukhi'] = 0x0A30; - t['rahiragana'] = 0x3089; - t['rakatakana'] = 0x30E9; - t['rakatakanahalfwidth'] = 0xFF97; - t['ralowerdiagonalbengali'] = 0x09F1; - t['ramiddlediagonalbengali'] = 0x09F0; - t['ramshorn'] = 0x0264; - t['ratio'] = 0x2236; - t['rbopomofo'] = 0x3116; - t['rcaron'] = 0x0159; - t['rcedilla'] = 0x0157; - t['rcircle'] = 0x24E1; - t['rcommaaccent'] = 0x0157; - t['rdblgrave'] = 0x0211; - t['rdotaccent'] = 0x1E59; - t['rdotbelow'] = 0x1E5B; - t['rdotbelowmacron'] = 0x1E5D; - t['referencemark'] = 0x203B; - t['reflexsubset'] = 0x2286; - t['reflexsuperset'] = 0x2287; - t['registered'] = 0x00AE; - t['registersans'] = 0xF8E8; - t['registerserif'] = 0xF6DA; - t['reharabic'] = 0x0631; - t['reharmenian'] = 0x0580; - t['rehfinalarabic'] = 0xFEAE; - t['rehiragana'] = 0x308C; - t['rekatakana'] = 0x30EC; - t['rekatakanahalfwidth'] = 0xFF9A; - t['resh'] = 0x05E8; - t['reshdageshhebrew'] = 0xFB48; - t['reshhebrew'] = 0x05E8; - t['reversedtilde'] = 0x223D; - t['reviahebrew'] = 0x0597; - t['reviamugrashhebrew'] = 0x0597; - t['revlogicalnot'] = 0x2310; - t['rfishhook'] = 0x027E; - t['rfishhookreversed'] = 0x027F; - t['rhabengali'] = 0x09DD; - t['rhadeva'] = 0x095D; - t['rho'] = 0x03C1; - t['rhook'] = 0x027D; - t['rhookturned'] = 0x027B; - t['rhookturnedsuperior'] = 0x02B5; - t['rhosymbolgreek'] = 0x03F1; - t['rhotichookmod'] = 0x02DE; - t['rieulacirclekorean'] = 0x3271; - t['rieulaparenkorean'] = 0x3211; - t['rieulcirclekorean'] = 0x3263; - t['rieulhieuhkorean'] = 0x3140; - t['rieulkiyeokkorean'] = 0x313A; - t['rieulkiyeoksioskorean'] = 0x3169; - t['rieulkorean'] = 0x3139; - t['rieulmieumkorean'] = 0x313B; - t['rieulpansioskorean'] = 0x316C; - t['rieulparenkorean'] = 0x3203; - t['rieulphieuphkorean'] = 0x313F; - t['rieulpieupkorean'] = 0x313C; - t['rieulpieupsioskorean'] = 0x316B; - t['rieulsioskorean'] = 0x313D; - t['rieulthieuthkorean'] = 0x313E; - t['rieultikeutkorean'] = 0x316A; - t['rieulyeorinhieuhkorean'] = 0x316D; - t['rightangle'] = 0x221F; - t['righttackbelowcmb'] = 0x0319; - t['righttriangle'] = 0x22BF; - t['rihiragana'] = 0x308A; - t['rikatakana'] = 0x30EA; - t['rikatakanahalfwidth'] = 0xFF98; - t['ring'] = 0x02DA; - t['ringbelowcmb'] = 0x0325; - t['ringcmb'] = 0x030A; - t['ringhalfleft'] = 0x02BF; - t['ringhalfleftarmenian'] = 0x0559; - t['ringhalfleftbelowcmb'] = 0x031C; - t['ringhalfleftcentered'] = 0x02D3; - t['ringhalfright'] = 0x02BE; - t['ringhalfrightbelowcmb'] = 0x0339; - t['ringhalfrightcentered'] = 0x02D2; - t['rinvertedbreve'] = 0x0213; - t['rittorusquare'] = 0x3351; - t['rlinebelow'] = 0x1E5F; - t['rlongleg'] = 0x027C; - t['rlonglegturned'] = 0x027A; - t['rmonospace'] = 0xFF52; - t['rohiragana'] = 0x308D; - t['rokatakana'] = 0x30ED; - t['rokatakanahalfwidth'] = 0xFF9B; - t['roruathai'] = 0x0E23; - t['rparen'] = 0x24AD; - t['rrabengali'] = 0x09DC; - t['rradeva'] = 0x0931; - t['rragurmukhi'] = 0x0A5C; - t['rreharabic'] = 0x0691; - t['rrehfinalarabic'] = 0xFB8D; - t['rrvocalicbengali'] = 0x09E0; - t['rrvocalicdeva'] = 0x0960; - t['rrvocalicgujarati'] = 0x0AE0; - t['rrvocalicvowelsignbengali'] = 0x09C4; - t['rrvocalicvowelsigndeva'] = 0x0944; - t['rrvocalicvowelsigngujarati'] = 0x0AC4; - t['rsuperior'] = 0xF6F1; - t['rtblock'] = 0x2590; - t['rturned'] = 0x0279; - t['rturnedsuperior'] = 0x02B4; - t['ruhiragana'] = 0x308B; - t['rukatakana'] = 0x30EB; - t['rukatakanahalfwidth'] = 0xFF99; - t['rupeemarkbengali'] = 0x09F2; - t['rupeesignbengali'] = 0x09F3; - t['rupiah'] = 0xF6DD; - t['ruthai'] = 0x0E24; - t['rvocalicbengali'] = 0x098B; - t['rvocalicdeva'] = 0x090B; - t['rvocalicgujarati'] = 0x0A8B; - t['rvocalicvowelsignbengali'] = 0x09C3; - t['rvocalicvowelsigndeva'] = 0x0943; - t['rvocalicvowelsigngujarati'] = 0x0AC3; - t['s'] = 0x0073; - t['sabengali'] = 0x09B8; - t['sacute'] = 0x015B; - t['sacutedotaccent'] = 0x1E65; - t['sadarabic'] = 0x0635; - t['sadeva'] = 0x0938; - t['sadfinalarabic'] = 0xFEBA; - t['sadinitialarabic'] = 0xFEBB; - t['sadmedialarabic'] = 0xFEBC; - t['sagujarati'] = 0x0AB8; - t['sagurmukhi'] = 0x0A38; - t['sahiragana'] = 0x3055; - t['sakatakana'] = 0x30B5; - t['sakatakanahalfwidth'] = 0xFF7B; - t['sallallahoualayhewasallamarabic'] = 0xFDFA; - t['samekh'] = 0x05E1; - t['samekhdagesh'] = 0xFB41; - t['samekhdageshhebrew'] = 0xFB41; - t['samekhhebrew'] = 0x05E1; - t['saraaathai'] = 0x0E32; - t['saraaethai'] = 0x0E41; - t['saraaimaimalaithai'] = 0x0E44; - t['saraaimaimuanthai'] = 0x0E43; - t['saraamthai'] = 0x0E33; - t['saraathai'] = 0x0E30; - t['saraethai'] = 0x0E40; - t['saraiileftthai'] = 0xF886; - t['saraiithai'] = 0x0E35; - t['saraileftthai'] = 0xF885; - t['saraithai'] = 0x0E34; - t['saraothai'] = 0x0E42; - t['saraueeleftthai'] = 0xF888; - t['saraueethai'] = 0x0E37; - t['saraueleftthai'] = 0xF887; - t['sarauethai'] = 0x0E36; - t['sarauthai'] = 0x0E38; - t['sarauuthai'] = 0x0E39; - t['sbopomofo'] = 0x3119; - t['scaron'] = 0x0161; - t['scarondotaccent'] = 0x1E67; - t['scedilla'] = 0x015F; - t['schwa'] = 0x0259; - t['schwacyrillic'] = 0x04D9; - t['schwadieresiscyrillic'] = 0x04DB; - t['schwahook'] = 0x025A; - t['scircle'] = 0x24E2; - t['scircumflex'] = 0x015D; - t['scommaaccent'] = 0x0219; - t['sdotaccent'] = 0x1E61; - t['sdotbelow'] = 0x1E63; - t['sdotbelowdotaccent'] = 0x1E69; - t['seagullbelowcmb'] = 0x033C; - t['second'] = 0x2033; - t['secondtonechinese'] = 0x02CA; - t['section'] = 0x00A7; - t['seenarabic'] = 0x0633; - t['seenfinalarabic'] = 0xFEB2; - t['seeninitialarabic'] = 0xFEB3; - t['seenmedialarabic'] = 0xFEB4; - t['segol'] = 0x05B6; - t['segol13'] = 0x05B6; - t['segol1f'] = 0x05B6; - t['segol2c'] = 0x05B6; - t['segolhebrew'] = 0x05B6; - t['segolnarrowhebrew'] = 0x05B6; - t['segolquarterhebrew'] = 0x05B6; - t['segoltahebrew'] = 0x0592; - t['segolwidehebrew'] = 0x05B6; - t['seharmenian'] = 0x057D; - t['sehiragana'] = 0x305B; - t['sekatakana'] = 0x30BB; - t['sekatakanahalfwidth'] = 0xFF7E; - t['semicolon'] = 0x003B; - t['semicolonarabic'] = 0x061B; - t['semicolonmonospace'] = 0xFF1B; - t['semicolonsmall'] = 0xFE54; - t['semivoicedmarkkana'] = 0x309C; - t['semivoicedmarkkanahalfwidth'] = 0xFF9F; - t['sentisquare'] = 0x3322; - t['sentosquare'] = 0x3323; - t['seven'] = 0x0037; - t['sevenarabic'] = 0x0667; - t['sevenbengali'] = 0x09ED; - t['sevencircle'] = 0x2466; - t['sevencircleinversesansserif'] = 0x2790; - t['sevendeva'] = 0x096D; - t['seveneighths'] = 0x215E; - t['sevengujarati'] = 0x0AED; - t['sevengurmukhi'] = 0x0A6D; - t['sevenhackarabic'] = 0x0667; - t['sevenhangzhou'] = 0x3027; - t['sevenideographicparen'] = 0x3226; - t['seveninferior'] = 0x2087; - t['sevenmonospace'] = 0xFF17; - t['sevenoldstyle'] = 0xF737; - t['sevenparen'] = 0x247A; - t['sevenperiod'] = 0x248E; - t['sevenpersian'] = 0x06F7; - t['sevenroman'] = 0x2176; - t['sevensuperior'] = 0x2077; - t['seventeencircle'] = 0x2470; - t['seventeenparen'] = 0x2484; - t['seventeenperiod'] = 0x2498; - t['seventhai'] = 0x0E57; - t['sfthyphen'] = 0x00AD; - t['shaarmenian'] = 0x0577; - t['shabengali'] = 0x09B6; - t['shacyrillic'] = 0x0448; - t['shaddaarabic'] = 0x0651; - t['shaddadammaarabic'] = 0xFC61; - t['shaddadammatanarabic'] = 0xFC5E; - t['shaddafathaarabic'] = 0xFC60; - t['shaddakasraarabic'] = 0xFC62; - t['shaddakasratanarabic'] = 0xFC5F; - t['shade'] = 0x2592; - t['shadedark'] = 0x2593; - t['shadelight'] = 0x2591; - t['shademedium'] = 0x2592; - t['shadeva'] = 0x0936; - t['shagujarati'] = 0x0AB6; - t['shagurmukhi'] = 0x0A36; - t['shalshelethebrew'] = 0x0593; - t['shbopomofo'] = 0x3115; - t['shchacyrillic'] = 0x0449; - t['sheenarabic'] = 0x0634; - t['sheenfinalarabic'] = 0xFEB6; - t['sheeninitialarabic'] = 0xFEB7; - t['sheenmedialarabic'] = 0xFEB8; - t['sheicoptic'] = 0x03E3; - t['sheqel'] = 0x20AA; - t['sheqelhebrew'] = 0x20AA; - t['sheva'] = 0x05B0; - t['sheva115'] = 0x05B0; - t['sheva15'] = 0x05B0; - t['sheva22'] = 0x05B0; - t['sheva2e'] = 0x05B0; - t['shevahebrew'] = 0x05B0; - t['shevanarrowhebrew'] = 0x05B0; - t['shevaquarterhebrew'] = 0x05B0; - t['shevawidehebrew'] = 0x05B0; - t['shhacyrillic'] = 0x04BB; - t['shimacoptic'] = 0x03ED; - t['shin'] = 0x05E9; - t['shindagesh'] = 0xFB49; - t['shindageshhebrew'] = 0xFB49; - t['shindageshshindot'] = 0xFB2C; - t['shindageshshindothebrew'] = 0xFB2C; - t['shindageshsindot'] = 0xFB2D; - t['shindageshsindothebrew'] = 0xFB2D; - t['shindothebrew'] = 0x05C1; - t['shinhebrew'] = 0x05E9; - t['shinshindot'] = 0xFB2A; - t['shinshindothebrew'] = 0xFB2A; - t['shinsindot'] = 0xFB2B; - t['shinsindothebrew'] = 0xFB2B; - t['shook'] = 0x0282; - t['sigma'] = 0x03C3; - t['sigma1'] = 0x03C2; - t['sigmafinal'] = 0x03C2; - t['sigmalunatesymbolgreek'] = 0x03F2; - t['sihiragana'] = 0x3057; - t['sikatakana'] = 0x30B7; - t['sikatakanahalfwidth'] = 0xFF7C; - t['siluqhebrew'] = 0x05BD; - t['siluqlefthebrew'] = 0x05BD; - t['similar'] = 0x223C; - t['sindothebrew'] = 0x05C2; - t['siosacirclekorean'] = 0x3274; - t['siosaparenkorean'] = 0x3214; - t['sioscieuckorean'] = 0x317E; - t['sioscirclekorean'] = 0x3266; - t['sioskiyeokkorean'] = 0x317A; - t['sioskorean'] = 0x3145; - t['siosnieunkorean'] = 0x317B; - t['siosparenkorean'] = 0x3206; - t['siospieupkorean'] = 0x317D; - t['siostikeutkorean'] = 0x317C; - t['six'] = 0x0036; - t['sixarabic'] = 0x0666; - t['sixbengali'] = 0x09EC; - t['sixcircle'] = 0x2465; - t['sixcircleinversesansserif'] = 0x278F; - t['sixdeva'] = 0x096C; - t['sixgujarati'] = 0x0AEC; - t['sixgurmukhi'] = 0x0A6C; - t['sixhackarabic'] = 0x0666; - t['sixhangzhou'] = 0x3026; - t['sixideographicparen'] = 0x3225; - t['sixinferior'] = 0x2086; - t['sixmonospace'] = 0xFF16; - t['sixoldstyle'] = 0xF736; - t['sixparen'] = 0x2479; - t['sixperiod'] = 0x248D; - t['sixpersian'] = 0x06F6; - t['sixroman'] = 0x2175; - t['sixsuperior'] = 0x2076; - t['sixteencircle'] = 0x246F; - t['sixteencurrencydenominatorbengali'] = 0x09F9; - t['sixteenparen'] = 0x2483; - t['sixteenperiod'] = 0x2497; - t['sixthai'] = 0x0E56; - t['slash'] = 0x002F; - t['slashmonospace'] = 0xFF0F; - t['slong'] = 0x017F; - t['slongdotaccent'] = 0x1E9B; - t['smileface'] = 0x263A; - t['smonospace'] = 0xFF53; - t['sofpasuqhebrew'] = 0x05C3; - t['softhyphen'] = 0x00AD; - t['softsigncyrillic'] = 0x044C; - t['sohiragana'] = 0x305D; - t['sokatakana'] = 0x30BD; - t['sokatakanahalfwidth'] = 0xFF7F; - t['soliduslongoverlaycmb'] = 0x0338; - t['solidusshortoverlaycmb'] = 0x0337; - t['sorusithai'] = 0x0E29; - t['sosalathai'] = 0x0E28; - t['sosothai'] = 0x0E0B; - t['sosuathai'] = 0x0E2A; - t['space'] = 0x0020; - t['spacehackarabic'] = 0x0020; - t['spade'] = 0x2660; - t['spadesuitblack'] = 0x2660; - t['spadesuitwhite'] = 0x2664; - t['sparen'] = 0x24AE; - t['squarebelowcmb'] = 0x033B; - t['squarecc'] = 0x33C4; - t['squarecm'] = 0x339D; - t['squarediagonalcrosshatchfill'] = 0x25A9; - t['squarehorizontalfill'] = 0x25A4; - t['squarekg'] = 0x338F; - t['squarekm'] = 0x339E; - t['squarekmcapital'] = 0x33CE; - t['squareln'] = 0x33D1; - t['squarelog'] = 0x33D2; - t['squaremg'] = 0x338E; - t['squaremil'] = 0x33D5; - t['squaremm'] = 0x339C; - t['squaremsquared'] = 0x33A1; - t['squareorthogonalcrosshatchfill'] = 0x25A6; - t['squareupperlefttolowerrightfill'] = 0x25A7; - t['squareupperrighttolowerleftfill'] = 0x25A8; - t['squareverticalfill'] = 0x25A5; - t['squarewhitewithsmallblack'] = 0x25A3; - t['srsquare'] = 0x33DB; - t['ssabengali'] = 0x09B7; - t['ssadeva'] = 0x0937; - t['ssagujarati'] = 0x0AB7; - t['ssangcieuckorean'] = 0x3149; - t['ssanghieuhkorean'] = 0x3185; - t['ssangieungkorean'] = 0x3180; - t['ssangkiyeokkorean'] = 0x3132; - t['ssangnieunkorean'] = 0x3165; - t['ssangpieupkorean'] = 0x3143; - t['ssangsioskorean'] = 0x3146; - t['ssangtikeutkorean'] = 0x3138; - t['ssuperior'] = 0xF6F2; - t['sterling'] = 0x00A3; - t['sterlingmonospace'] = 0xFFE1; - t['strokelongoverlaycmb'] = 0x0336; - t['strokeshortoverlaycmb'] = 0x0335; - t['subset'] = 0x2282; - t['subsetnotequal'] = 0x228A; - t['subsetorequal'] = 0x2286; - t['succeeds'] = 0x227B; - t['suchthat'] = 0x220B; - t['suhiragana'] = 0x3059; - t['sukatakana'] = 0x30B9; - t['sukatakanahalfwidth'] = 0xFF7D; - t['sukunarabic'] = 0x0652; - t['summation'] = 0x2211; - t['sun'] = 0x263C; - t['superset'] = 0x2283; - t['supersetnotequal'] = 0x228B; - t['supersetorequal'] = 0x2287; - t['svsquare'] = 0x33DC; - t['syouwaerasquare'] = 0x337C; - t['t'] = 0x0074; - t['tabengali'] = 0x09A4; - t['tackdown'] = 0x22A4; - t['tackleft'] = 0x22A3; - t['tadeva'] = 0x0924; - t['tagujarati'] = 0x0AA4; - t['tagurmukhi'] = 0x0A24; - t['taharabic'] = 0x0637; - t['tahfinalarabic'] = 0xFEC2; - t['tahinitialarabic'] = 0xFEC3; - t['tahiragana'] = 0x305F; - t['tahmedialarabic'] = 0xFEC4; - t['taisyouerasquare'] = 0x337D; - t['takatakana'] = 0x30BF; - t['takatakanahalfwidth'] = 0xFF80; - t['tatweelarabic'] = 0x0640; - t['tau'] = 0x03C4; - t['tav'] = 0x05EA; - t['tavdages'] = 0xFB4A; - t['tavdagesh'] = 0xFB4A; - t['tavdageshhebrew'] = 0xFB4A; - t['tavhebrew'] = 0x05EA; - t['tbar'] = 0x0167; - t['tbopomofo'] = 0x310A; - t['tcaron'] = 0x0165; - t['tccurl'] = 0x02A8; - t['tcedilla'] = 0x0163; - t['tcheharabic'] = 0x0686; - t['tchehfinalarabic'] = 0xFB7B; - t['tchehinitialarabic'] = 0xFB7C; - t['tchehmedialarabic'] = 0xFB7D; - t['tcircle'] = 0x24E3; - t['tcircumflexbelow'] = 0x1E71; - t['tcommaaccent'] = 0x0163; - t['tdieresis'] = 0x1E97; - t['tdotaccent'] = 0x1E6B; - t['tdotbelow'] = 0x1E6D; - t['tecyrillic'] = 0x0442; - t['tedescendercyrillic'] = 0x04AD; - t['teharabic'] = 0x062A; - t['tehfinalarabic'] = 0xFE96; - t['tehhahinitialarabic'] = 0xFCA2; - t['tehhahisolatedarabic'] = 0xFC0C; - t['tehinitialarabic'] = 0xFE97; - t['tehiragana'] = 0x3066; - t['tehjeeminitialarabic'] = 0xFCA1; - t['tehjeemisolatedarabic'] = 0xFC0B; - t['tehmarbutaarabic'] = 0x0629; - t['tehmarbutafinalarabic'] = 0xFE94; - t['tehmedialarabic'] = 0xFE98; - t['tehmeeminitialarabic'] = 0xFCA4; - t['tehmeemisolatedarabic'] = 0xFC0E; - t['tehnoonfinalarabic'] = 0xFC73; - t['tekatakana'] = 0x30C6; - t['tekatakanahalfwidth'] = 0xFF83; - t['telephone'] = 0x2121; - t['telephoneblack'] = 0x260E; - t['telishagedolahebrew'] = 0x05A0; - t['telishaqetanahebrew'] = 0x05A9; - t['tencircle'] = 0x2469; - t['tenideographicparen'] = 0x3229; - t['tenparen'] = 0x247D; - t['tenperiod'] = 0x2491; - t['tenroman'] = 0x2179; - t['tesh'] = 0x02A7; - t['tet'] = 0x05D8; - t['tetdagesh'] = 0xFB38; - t['tetdageshhebrew'] = 0xFB38; - t['tethebrew'] = 0x05D8; - t['tetsecyrillic'] = 0x04B5; - t['tevirhebrew'] = 0x059B; - t['tevirlefthebrew'] = 0x059B; - t['thabengali'] = 0x09A5; - t['thadeva'] = 0x0925; - t['thagujarati'] = 0x0AA5; - t['thagurmukhi'] = 0x0A25; - t['thalarabic'] = 0x0630; - t['thalfinalarabic'] = 0xFEAC; - t['thanthakhatlowleftthai'] = 0xF898; - t['thanthakhatlowrightthai'] = 0xF897; - t['thanthakhatthai'] = 0x0E4C; - t['thanthakhatupperleftthai'] = 0xF896; - t['theharabic'] = 0x062B; - t['thehfinalarabic'] = 0xFE9A; - t['thehinitialarabic'] = 0xFE9B; - t['thehmedialarabic'] = 0xFE9C; - t['thereexists'] = 0x2203; - t['therefore'] = 0x2234; - t['theta'] = 0x03B8; - t['theta1'] = 0x03D1; - t['thetasymbolgreek'] = 0x03D1; - t['thieuthacirclekorean'] = 0x3279; - t['thieuthaparenkorean'] = 0x3219; - t['thieuthcirclekorean'] = 0x326B; - t['thieuthkorean'] = 0x314C; - t['thieuthparenkorean'] = 0x320B; - t['thirteencircle'] = 0x246C; - t['thirteenparen'] = 0x2480; - t['thirteenperiod'] = 0x2494; - t['thonangmonthothai'] = 0x0E11; - t['thook'] = 0x01AD; - t['thophuthaothai'] = 0x0E12; - t['thorn'] = 0x00FE; - t['thothahanthai'] = 0x0E17; - t['thothanthai'] = 0x0E10; - t['thothongthai'] = 0x0E18; - t['thothungthai'] = 0x0E16; - t['thousandcyrillic'] = 0x0482; - t['thousandsseparatorarabic'] = 0x066C; - t['thousandsseparatorpersian'] = 0x066C; - t['three'] = 0x0033; - t['threearabic'] = 0x0663; - t['threebengali'] = 0x09E9; - t['threecircle'] = 0x2462; - t['threecircleinversesansserif'] = 0x278C; - t['threedeva'] = 0x0969; - t['threeeighths'] = 0x215C; - t['threegujarati'] = 0x0AE9; - t['threegurmukhi'] = 0x0A69; - t['threehackarabic'] = 0x0663; - t['threehangzhou'] = 0x3023; - t['threeideographicparen'] = 0x3222; - t['threeinferior'] = 0x2083; - t['threemonospace'] = 0xFF13; - t['threenumeratorbengali'] = 0x09F6; - t['threeoldstyle'] = 0xF733; - t['threeparen'] = 0x2476; - t['threeperiod'] = 0x248A; - t['threepersian'] = 0x06F3; - t['threequarters'] = 0x00BE; - t['threequartersemdash'] = 0xF6DE; - t['threeroman'] = 0x2172; - t['threesuperior'] = 0x00B3; - t['threethai'] = 0x0E53; - t['thzsquare'] = 0x3394; - t['tihiragana'] = 0x3061; - t['tikatakana'] = 0x30C1; - t['tikatakanahalfwidth'] = 0xFF81; - t['tikeutacirclekorean'] = 0x3270; - t['tikeutaparenkorean'] = 0x3210; - t['tikeutcirclekorean'] = 0x3262; - t['tikeutkorean'] = 0x3137; - t['tikeutparenkorean'] = 0x3202; - t['tilde'] = 0x02DC; - t['tildebelowcmb'] = 0x0330; - t['tildecmb'] = 0x0303; - t['tildecomb'] = 0x0303; - t['tildedoublecmb'] = 0x0360; - t['tildeoperator'] = 0x223C; - t['tildeoverlaycmb'] = 0x0334; - t['tildeverticalcmb'] = 0x033E; - t['timescircle'] = 0x2297; - t['tipehahebrew'] = 0x0596; - t['tipehalefthebrew'] = 0x0596; - t['tippigurmukhi'] = 0x0A70; - t['titlocyrilliccmb'] = 0x0483; - t['tiwnarmenian'] = 0x057F; - t['tlinebelow'] = 0x1E6F; - t['tmonospace'] = 0xFF54; - t['toarmenian'] = 0x0569; - t['tohiragana'] = 0x3068; - t['tokatakana'] = 0x30C8; - t['tokatakanahalfwidth'] = 0xFF84; - t['tonebarextrahighmod'] = 0x02E5; - t['tonebarextralowmod'] = 0x02E9; - t['tonebarhighmod'] = 0x02E6; - t['tonebarlowmod'] = 0x02E8; - t['tonebarmidmod'] = 0x02E7; - t['tonefive'] = 0x01BD; - t['tonesix'] = 0x0185; - t['tonetwo'] = 0x01A8; - t['tonos'] = 0x0384; - t['tonsquare'] = 0x3327; - t['topatakthai'] = 0x0E0F; - t['tortoiseshellbracketleft'] = 0x3014; - t['tortoiseshellbracketleftsmall'] = 0xFE5D; - t['tortoiseshellbracketleftvertical'] = 0xFE39; - t['tortoiseshellbracketright'] = 0x3015; - t['tortoiseshellbracketrightsmall'] = 0xFE5E; - t['tortoiseshellbracketrightvertical'] = 0xFE3A; - t['totaothai'] = 0x0E15; - t['tpalatalhook'] = 0x01AB; - t['tparen'] = 0x24AF; - t['trademark'] = 0x2122; - t['trademarksans'] = 0xF8EA; - t['trademarkserif'] = 0xF6DB; - t['tretroflexhook'] = 0x0288; - t['triagdn'] = 0x25BC; - t['triaglf'] = 0x25C4; - t['triagrt'] = 0x25BA; - t['triagup'] = 0x25B2; - t['ts'] = 0x02A6; - t['tsadi'] = 0x05E6; - t['tsadidagesh'] = 0xFB46; - t['tsadidageshhebrew'] = 0xFB46; - t['tsadihebrew'] = 0x05E6; - t['tsecyrillic'] = 0x0446; - t['tsere'] = 0x05B5; - t['tsere12'] = 0x05B5; - t['tsere1e'] = 0x05B5; - t['tsere2b'] = 0x05B5; - t['tserehebrew'] = 0x05B5; - t['tserenarrowhebrew'] = 0x05B5; - t['tserequarterhebrew'] = 0x05B5; - t['tserewidehebrew'] = 0x05B5; - t['tshecyrillic'] = 0x045B; - t['tsuperior'] = 0xF6F3; - t['ttabengali'] = 0x099F; - t['ttadeva'] = 0x091F; - t['ttagujarati'] = 0x0A9F; - t['ttagurmukhi'] = 0x0A1F; - t['tteharabic'] = 0x0679; - t['ttehfinalarabic'] = 0xFB67; - t['ttehinitialarabic'] = 0xFB68; - t['ttehmedialarabic'] = 0xFB69; - t['tthabengali'] = 0x09A0; - t['tthadeva'] = 0x0920; - t['tthagujarati'] = 0x0AA0; - t['tthagurmukhi'] = 0x0A20; - t['tturned'] = 0x0287; - t['tuhiragana'] = 0x3064; - t['tukatakana'] = 0x30C4; - t['tukatakanahalfwidth'] = 0xFF82; - t['tusmallhiragana'] = 0x3063; - t['tusmallkatakana'] = 0x30C3; - t['tusmallkatakanahalfwidth'] = 0xFF6F; - t['twelvecircle'] = 0x246B; - t['twelveparen'] = 0x247F; - t['twelveperiod'] = 0x2493; - t['twelveroman'] = 0x217B; - t['twentycircle'] = 0x2473; - t['twentyhangzhou'] = 0x5344; - t['twentyparen'] = 0x2487; - t['twentyperiod'] = 0x249B; - t['two'] = 0x0032; - t['twoarabic'] = 0x0662; - t['twobengali'] = 0x09E8; - t['twocircle'] = 0x2461; - t['twocircleinversesansserif'] = 0x278B; - t['twodeva'] = 0x0968; - t['twodotenleader'] = 0x2025; - t['twodotleader'] = 0x2025; - t['twodotleadervertical'] = 0xFE30; - t['twogujarati'] = 0x0AE8; - t['twogurmukhi'] = 0x0A68; - t['twohackarabic'] = 0x0662; - t['twohangzhou'] = 0x3022; - t['twoideographicparen'] = 0x3221; - t['twoinferior'] = 0x2082; - t['twomonospace'] = 0xFF12; - t['twonumeratorbengali'] = 0x09F5; - t['twooldstyle'] = 0xF732; - t['twoparen'] = 0x2475; - t['twoperiod'] = 0x2489; - t['twopersian'] = 0x06F2; - t['tworoman'] = 0x2171; - t['twostroke'] = 0x01BB; - t['twosuperior'] = 0x00B2; - t['twothai'] = 0x0E52; - t['twothirds'] = 0x2154; - t['u'] = 0x0075; - t['uacute'] = 0x00FA; - t['ubar'] = 0x0289; - t['ubengali'] = 0x0989; - t['ubopomofo'] = 0x3128; - t['ubreve'] = 0x016D; - t['ucaron'] = 0x01D4; - t['ucircle'] = 0x24E4; - t['ucircumflex'] = 0x00FB; - t['ucircumflexbelow'] = 0x1E77; - t['ucyrillic'] = 0x0443; - t['udattadeva'] = 0x0951; - t['udblacute'] = 0x0171; - t['udblgrave'] = 0x0215; - t['udeva'] = 0x0909; - t['udieresis'] = 0x00FC; - t['udieresisacute'] = 0x01D8; - t['udieresisbelow'] = 0x1E73; - t['udieresiscaron'] = 0x01DA; - t['udieresiscyrillic'] = 0x04F1; - t['udieresisgrave'] = 0x01DC; - t['udieresismacron'] = 0x01D6; - t['udotbelow'] = 0x1EE5; - t['ugrave'] = 0x00F9; - t['ugujarati'] = 0x0A89; - t['ugurmukhi'] = 0x0A09; - t['uhiragana'] = 0x3046; - t['uhookabove'] = 0x1EE7; - t['uhorn'] = 0x01B0; - t['uhornacute'] = 0x1EE9; - t['uhorndotbelow'] = 0x1EF1; - t['uhorngrave'] = 0x1EEB; - t['uhornhookabove'] = 0x1EED; - t['uhorntilde'] = 0x1EEF; - t['uhungarumlaut'] = 0x0171; - t['uhungarumlautcyrillic'] = 0x04F3; - t['uinvertedbreve'] = 0x0217; - t['ukatakana'] = 0x30A6; - t['ukatakanahalfwidth'] = 0xFF73; - t['ukcyrillic'] = 0x0479; - t['ukorean'] = 0x315C; - t['umacron'] = 0x016B; - t['umacroncyrillic'] = 0x04EF; - t['umacrondieresis'] = 0x1E7B; - t['umatragurmukhi'] = 0x0A41; - t['umonospace'] = 0xFF55; - t['underscore'] = 0x005F; - t['underscoredbl'] = 0x2017; - t['underscoremonospace'] = 0xFF3F; - t['underscorevertical'] = 0xFE33; - t['underscorewavy'] = 0xFE4F; - t['union'] = 0x222A; - t['universal'] = 0x2200; - t['uogonek'] = 0x0173; - t['uparen'] = 0x24B0; - t['upblock'] = 0x2580; - t['upperdothebrew'] = 0x05C4; - t['upsilon'] = 0x03C5; - t['upsilondieresis'] = 0x03CB; - t['upsilondieresistonos'] = 0x03B0; - t['upsilonlatin'] = 0x028A; - t['upsilontonos'] = 0x03CD; - t['uptackbelowcmb'] = 0x031D; - t['uptackmod'] = 0x02D4; - t['uragurmukhi'] = 0x0A73; - t['uring'] = 0x016F; - t['ushortcyrillic'] = 0x045E; - t['usmallhiragana'] = 0x3045; - t['usmallkatakana'] = 0x30A5; - t['usmallkatakanahalfwidth'] = 0xFF69; - t['ustraightcyrillic'] = 0x04AF; - t['ustraightstrokecyrillic'] = 0x04B1; - t['utilde'] = 0x0169; - t['utildeacute'] = 0x1E79; - t['utildebelow'] = 0x1E75; - t['uubengali'] = 0x098A; - t['uudeva'] = 0x090A; - t['uugujarati'] = 0x0A8A; - t['uugurmukhi'] = 0x0A0A; - t['uumatragurmukhi'] = 0x0A42; - t['uuvowelsignbengali'] = 0x09C2; - t['uuvowelsigndeva'] = 0x0942; - t['uuvowelsigngujarati'] = 0x0AC2; - t['uvowelsignbengali'] = 0x09C1; - t['uvowelsigndeva'] = 0x0941; - t['uvowelsigngujarati'] = 0x0AC1; - t['v'] = 0x0076; - t['vadeva'] = 0x0935; - t['vagujarati'] = 0x0AB5; - t['vagurmukhi'] = 0x0A35; - t['vakatakana'] = 0x30F7; - t['vav'] = 0x05D5; - t['vavdagesh'] = 0xFB35; - t['vavdagesh65'] = 0xFB35; - t['vavdageshhebrew'] = 0xFB35; - t['vavhebrew'] = 0x05D5; - t['vavholam'] = 0xFB4B; - t['vavholamhebrew'] = 0xFB4B; - t['vavvavhebrew'] = 0x05F0; - t['vavyodhebrew'] = 0x05F1; - t['vcircle'] = 0x24E5; - t['vdotbelow'] = 0x1E7F; - t['vecyrillic'] = 0x0432; - t['veharabic'] = 0x06A4; - t['vehfinalarabic'] = 0xFB6B; - t['vehinitialarabic'] = 0xFB6C; - t['vehmedialarabic'] = 0xFB6D; - t['vekatakana'] = 0x30F9; - t['venus'] = 0x2640; - t['verticalbar'] = 0x007C; - t['verticallineabovecmb'] = 0x030D; - t['verticallinebelowcmb'] = 0x0329; - t['verticallinelowmod'] = 0x02CC; - t['verticallinemod'] = 0x02C8; - t['vewarmenian'] = 0x057E; - t['vhook'] = 0x028B; - t['vikatakana'] = 0x30F8; - t['viramabengali'] = 0x09CD; - t['viramadeva'] = 0x094D; - t['viramagujarati'] = 0x0ACD; - t['visargabengali'] = 0x0983; - t['visargadeva'] = 0x0903; - t['visargagujarati'] = 0x0A83; - t['vmonospace'] = 0xFF56; - t['voarmenian'] = 0x0578; - t['voicediterationhiragana'] = 0x309E; - t['voicediterationkatakana'] = 0x30FE; - t['voicedmarkkana'] = 0x309B; - t['voicedmarkkanahalfwidth'] = 0xFF9E; - t['vokatakana'] = 0x30FA; - t['vparen'] = 0x24B1; - t['vtilde'] = 0x1E7D; - t['vturned'] = 0x028C; - t['vuhiragana'] = 0x3094; - t['vukatakana'] = 0x30F4; - t['w'] = 0x0077; - t['wacute'] = 0x1E83; - t['waekorean'] = 0x3159; - t['wahiragana'] = 0x308F; - t['wakatakana'] = 0x30EF; - t['wakatakanahalfwidth'] = 0xFF9C; - t['wakorean'] = 0x3158; - t['wasmallhiragana'] = 0x308E; - t['wasmallkatakana'] = 0x30EE; - t['wattosquare'] = 0x3357; - t['wavedash'] = 0x301C; - t['wavyunderscorevertical'] = 0xFE34; - t['wawarabic'] = 0x0648; - t['wawfinalarabic'] = 0xFEEE; - t['wawhamzaabovearabic'] = 0x0624; - t['wawhamzaabovefinalarabic'] = 0xFE86; - t['wbsquare'] = 0x33DD; - t['wcircle'] = 0x24E6; - t['wcircumflex'] = 0x0175; - t['wdieresis'] = 0x1E85; - t['wdotaccent'] = 0x1E87; - t['wdotbelow'] = 0x1E89; - t['wehiragana'] = 0x3091; - t['weierstrass'] = 0x2118; - t['wekatakana'] = 0x30F1; - t['wekorean'] = 0x315E; - t['weokorean'] = 0x315D; - t['wgrave'] = 0x1E81; - t['whitebullet'] = 0x25E6; - t['whitecircle'] = 0x25CB; - t['whitecircleinverse'] = 0x25D9; - t['whitecornerbracketleft'] = 0x300E; - t['whitecornerbracketleftvertical'] = 0xFE43; - t['whitecornerbracketright'] = 0x300F; - t['whitecornerbracketrightvertical'] = 0xFE44; - t['whitediamond'] = 0x25C7; - t['whitediamondcontainingblacksmalldiamond'] = 0x25C8; - t['whitedownpointingsmalltriangle'] = 0x25BF; - t['whitedownpointingtriangle'] = 0x25BD; - t['whiteleftpointingsmalltriangle'] = 0x25C3; - t['whiteleftpointingtriangle'] = 0x25C1; - t['whitelenticularbracketleft'] = 0x3016; - t['whitelenticularbracketright'] = 0x3017; - t['whiterightpointingsmalltriangle'] = 0x25B9; - t['whiterightpointingtriangle'] = 0x25B7; - t['whitesmallsquare'] = 0x25AB; - t['whitesmilingface'] = 0x263A; - t['whitesquare'] = 0x25A1; - t['whitestar'] = 0x2606; - t['whitetelephone'] = 0x260F; - t['whitetortoiseshellbracketleft'] = 0x3018; - t['whitetortoiseshellbracketright'] = 0x3019; - t['whiteuppointingsmalltriangle'] = 0x25B5; - t['whiteuppointingtriangle'] = 0x25B3; - t['wihiragana'] = 0x3090; - t['wikatakana'] = 0x30F0; - t['wikorean'] = 0x315F; - t['wmonospace'] = 0xFF57; - t['wohiragana'] = 0x3092; - t['wokatakana'] = 0x30F2; - t['wokatakanahalfwidth'] = 0xFF66; - t['won'] = 0x20A9; - t['wonmonospace'] = 0xFFE6; - t['wowaenthai'] = 0x0E27; - t['wparen'] = 0x24B2; - t['wring'] = 0x1E98; - t['wsuperior'] = 0x02B7; - t['wturned'] = 0x028D; - t['wynn'] = 0x01BF; - t['x'] = 0x0078; - t['xabovecmb'] = 0x033D; - t['xbopomofo'] = 0x3112; - t['xcircle'] = 0x24E7; - t['xdieresis'] = 0x1E8D; - t['xdotaccent'] = 0x1E8B; - t['xeharmenian'] = 0x056D; - t['xi'] = 0x03BE; - t['xmonospace'] = 0xFF58; - t['xparen'] = 0x24B3; - t['xsuperior'] = 0x02E3; - t['y'] = 0x0079; - t['yaadosquare'] = 0x334E; - t['yabengali'] = 0x09AF; - t['yacute'] = 0x00FD; - t['yadeva'] = 0x092F; - t['yaekorean'] = 0x3152; - t['yagujarati'] = 0x0AAF; - t['yagurmukhi'] = 0x0A2F; - t['yahiragana'] = 0x3084; - t['yakatakana'] = 0x30E4; - t['yakatakanahalfwidth'] = 0xFF94; - t['yakorean'] = 0x3151; - t['yamakkanthai'] = 0x0E4E; - t['yasmallhiragana'] = 0x3083; - t['yasmallkatakana'] = 0x30E3; - t['yasmallkatakanahalfwidth'] = 0xFF6C; - t['yatcyrillic'] = 0x0463; - t['ycircle'] = 0x24E8; - t['ycircumflex'] = 0x0177; - t['ydieresis'] = 0x00FF; - t['ydotaccent'] = 0x1E8F; - t['ydotbelow'] = 0x1EF5; - t['yeharabic'] = 0x064A; - t['yehbarreearabic'] = 0x06D2; - t['yehbarreefinalarabic'] = 0xFBAF; - t['yehfinalarabic'] = 0xFEF2; - t['yehhamzaabovearabic'] = 0x0626; - t['yehhamzaabovefinalarabic'] = 0xFE8A; - t['yehhamzaaboveinitialarabic'] = 0xFE8B; - t['yehhamzaabovemedialarabic'] = 0xFE8C; - t['yehinitialarabic'] = 0xFEF3; - t['yehmedialarabic'] = 0xFEF4; - t['yehmeeminitialarabic'] = 0xFCDD; - t['yehmeemisolatedarabic'] = 0xFC58; - t['yehnoonfinalarabic'] = 0xFC94; - t['yehthreedotsbelowarabic'] = 0x06D1; - t['yekorean'] = 0x3156; - t['yen'] = 0x00A5; - t['yenmonospace'] = 0xFFE5; - t['yeokorean'] = 0x3155; - t['yeorinhieuhkorean'] = 0x3186; - t['yerahbenyomohebrew'] = 0x05AA; - t['yerahbenyomolefthebrew'] = 0x05AA; - t['yericyrillic'] = 0x044B; - t['yerudieresiscyrillic'] = 0x04F9; - t['yesieungkorean'] = 0x3181; - t['yesieungpansioskorean'] = 0x3183; - t['yesieungsioskorean'] = 0x3182; - t['yetivhebrew'] = 0x059A; - t['ygrave'] = 0x1EF3; - t['yhook'] = 0x01B4; - t['yhookabove'] = 0x1EF7; - t['yiarmenian'] = 0x0575; - t['yicyrillic'] = 0x0457; - t['yikorean'] = 0x3162; - t['yinyang'] = 0x262F; - t['yiwnarmenian'] = 0x0582; - t['ymonospace'] = 0xFF59; - t['yod'] = 0x05D9; - t['yoddagesh'] = 0xFB39; - t['yoddageshhebrew'] = 0xFB39; - t['yodhebrew'] = 0x05D9; - t['yodyodhebrew'] = 0x05F2; - t['yodyodpatahhebrew'] = 0xFB1F; - t['yohiragana'] = 0x3088; - t['yoikorean'] = 0x3189; - t['yokatakana'] = 0x30E8; - t['yokatakanahalfwidth'] = 0xFF96; - t['yokorean'] = 0x315B; - t['yosmallhiragana'] = 0x3087; - t['yosmallkatakana'] = 0x30E7; - t['yosmallkatakanahalfwidth'] = 0xFF6E; - t['yotgreek'] = 0x03F3; - t['yoyaekorean'] = 0x3188; - t['yoyakorean'] = 0x3187; - t['yoyakthai'] = 0x0E22; - t['yoyingthai'] = 0x0E0D; - t['yparen'] = 0x24B4; - t['ypogegrammeni'] = 0x037A; - t['ypogegrammenigreekcmb'] = 0x0345; - t['yr'] = 0x01A6; - t['yring'] = 0x1E99; - t['ysuperior'] = 0x02B8; - t['ytilde'] = 0x1EF9; - t['yturned'] = 0x028E; - t['yuhiragana'] = 0x3086; - t['yuikorean'] = 0x318C; - t['yukatakana'] = 0x30E6; - t['yukatakanahalfwidth'] = 0xFF95; - t['yukorean'] = 0x3160; - t['yusbigcyrillic'] = 0x046B; - t['yusbigiotifiedcyrillic'] = 0x046D; - t['yuslittlecyrillic'] = 0x0467; - t['yuslittleiotifiedcyrillic'] = 0x0469; - t['yusmallhiragana'] = 0x3085; - t['yusmallkatakana'] = 0x30E5; - t['yusmallkatakanahalfwidth'] = 0xFF6D; - t['yuyekorean'] = 0x318B; - t['yuyeokorean'] = 0x318A; - t['yyabengali'] = 0x09DF; - t['yyadeva'] = 0x095F; - t['z'] = 0x007A; - t['zaarmenian'] = 0x0566; - t['zacute'] = 0x017A; - t['zadeva'] = 0x095B; - t['zagurmukhi'] = 0x0A5B; - t['zaharabic'] = 0x0638; - t['zahfinalarabic'] = 0xFEC6; - t['zahinitialarabic'] = 0xFEC7; - t['zahiragana'] = 0x3056; - t['zahmedialarabic'] = 0xFEC8; - t['zainarabic'] = 0x0632; - t['zainfinalarabic'] = 0xFEB0; - t['zakatakana'] = 0x30B6; - t['zaqefgadolhebrew'] = 0x0595; - t['zaqefqatanhebrew'] = 0x0594; - t['zarqahebrew'] = 0x0598; - t['zayin'] = 0x05D6; - t['zayindagesh'] = 0xFB36; - t['zayindageshhebrew'] = 0xFB36; - t['zayinhebrew'] = 0x05D6; - t['zbopomofo'] = 0x3117; - t['zcaron'] = 0x017E; - t['zcircle'] = 0x24E9; - t['zcircumflex'] = 0x1E91; - t['zcurl'] = 0x0291; - t['zdot'] = 0x017C; - t['zdotaccent'] = 0x017C; - t['zdotbelow'] = 0x1E93; - t['zecyrillic'] = 0x0437; - t['zedescendercyrillic'] = 0x0499; - t['zedieresiscyrillic'] = 0x04DF; - t['zehiragana'] = 0x305C; - t['zekatakana'] = 0x30BC; - t['zero'] = 0x0030; - t['zeroarabic'] = 0x0660; - t['zerobengali'] = 0x09E6; - t['zerodeva'] = 0x0966; - t['zerogujarati'] = 0x0AE6; - t['zerogurmukhi'] = 0x0A66; - t['zerohackarabic'] = 0x0660; - t['zeroinferior'] = 0x2080; - t['zeromonospace'] = 0xFF10; - t['zerooldstyle'] = 0xF730; - t['zeropersian'] = 0x06F0; - t['zerosuperior'] = 0x2070; - t['zerothai'] = 0x0E50; - t['zerowidthjoiner'] = 0xFEFF; - t['zerowidthnonjoiner'] = 0x200C; - t['zerowidthspace'] = 0x200B; - t['zeta'] = 0x03B6; - t['zhbopomofo'] = 0x3113; - t['zhearmenian'] = 0x056A; - t['zhebrevecyrillic'] = 0x04C2; - t['zhecyrillic'] = 0x0436; - t['zhedescendercyrillic'] = 0x0497; - t['zhedieresiscyrillic'] = 0x04DD; - t['zihiragana'] = 0x3058; - t['zikatakana'] = 0x30B8; - t['zinorhebrew'] = 0x05AE; - t['zlinebelow'] = 0x1E95; - t['zmonospace'] = 0xFF5A; - t['zohiragana'] = 0x305E; - t['zokatakana'] = 0x30BE; - t['zparen'] = 0x24B5; - t['zretroflexhook'] = 0x0290; - t['zstroke'] = 0x01B6; - t['zuhiragana'] = 0x305A; - t['zukatakana'] = 0x30BA; - t['.notdef'] = 0x0000; - t['angbracketleftbig'] = 0x2329; - t['angbracketleftBig'] = 0x2329; - t['angbracketleftbigg'] = 0x2329; - t['angbracketleftBigg'] = 0x2329; - t['angbracketrightBig'] = 0x232A; - t['angbracketrightbig'] = 0x232A; - t['angbracketrightBigg'] = 0x232A; - t['angbracketrightbigg'] = 0x232A; - t['arrowhookleft'] = 0x21AA; - t['arrowhookright'] = 0x21A9; - t['arrowlefttophalf'] = 0x21BC; - t['arrowleftbothalf'] = 0x21BD; - t['arrownortheast'] = 0x2197; - t['arrownorthwest'] = 0x2196; - t['arrowrighttophalf'] = 0x21C0; - t['arrowrightbothalf'] = 0x21C1; - t['arrowsoutheast'] = 0x2198; - t['arrowsouthwest'] = 0x2199; - t['backslashbig'] = 0x2216; - t['backslashBig'] = 0x2216; - t['backslashBigg'] = 0x2216; - t['backslashbigg'] = 0x2216; - t['bardbl'] = 0x2016; - t['bracehtipdownleft'] = 0xFE37; - t['bracehtipdownright'] = 0xFE37; - t['bracehtipupleft'] = 0xFE38; - t['bracehtipupright'] = 0xFE38; - t['braceleftBig'] = 0x007B; - t['braceleftbig'] = 0x007B; - t['braceleftbigg'] = 0x007B; - t['braceleftBigg'] = 0x007B; - t['bracerightBig'] = 0x007D; - t['bracerightbig'] = 0x007D; - t['bracerightbigg'] = 0x007D; - t['bracerightBigg'] = 0x007D; - t['bracketleftbig'] = 0x005B; - t['bracketleftBig'] = 0x005B; - t['bracketleftbigg'] = 0x005B; - t['bracketleftBigg'] = 0x005B; - t['bracketrightBig'] = 0x005D; - t['bracketrightbig'] = 0x005D; - t['bracketrightbigg'] = 0x005D; - t['bracketrightBigg'] = 0x005D; - t['ceilingleftbig'] = 0x2308; - t['ceilingleftBig'] = 0x2308; - t['ceilingleftBigg'] = 0x2308; - t['ceilingleftbigg'] = 0x2308; - t['ceilingrightbig'] = 0x2309; - t['ceilingrightBig'] = 0x2309; - t['ceilingrightbigg'] = 0x2309; - t['ceilingrightBigg'] = 0x2309; - t['circledotdisplay'] = 0x2299; - t['circledottext'] = 0x2299; - t['circlemultiplydisplay'] = 0x2297; - t['circlemultiplytext'] = 0x2297; - t['circleplusdisplay'] = 0x2295; - t['circleplustext'] = 0x2295; - t['contintegraldisplay'] = 0x222E; - t['contintegraltext'] = 0x222E; - t['coproductdisplay'] = 0x2210; - t['coproducttext'] = 0x2210; - t['floorleftBig'] = 0x230A; - t['floorleftbig'] = 0x230A; - t['floorleftbigg'] = 0x230A; - t['floorleftBigg'] = 0x230A; - t['floorrightbig'] = 0x230B; - t['floorrightBig'] = 0x230B; - t['floorrightBigg'] = 0x230B; - t['floorrightbigg'] = 0x230B; - t['hatwide'] = 0x0302; - t['hatwider'] = 0x0302; - t['hatwidest'] = 0x0302; - t['intercal'] = 0x1D40; - t['integraldisplay'] = 0x222B; - t['integraltext'] = 0x222B; - t['intersectiondisplay'] = 0x22C2; - t['intersectiontext'] = 0x22C2; - t['logicalanddisplay'] = 0x2227; - t['logicalandtext'] = 0x2227; - t['logicalordisplay'] = 0x2228; - t['logicalortext'] = 0x2228; - t['parenleftBig'] = 0x0028; - t['parenleftbig'] = 0x0028; - t['parenleftBigg'] = 0x0028; - t['parenleftbigg'] = 0x0028; - t['parenrightBig'] = 0x0029; - t['parenrightbig'] = 0x0029; - t['parenrightBigg'] = 0x0029; - t['parenrightbigg'] = 0x0029; - t['prime'] = 0x2032; - t['productdisplay'] = 0x220F; - t['producttext'] = 0x220F; - t['radicalbig'] = 0x221A; - t['radicalBig'] = 0x221A; - t['radicalBigg'] = 0x221A; - t['radicalbigg'] = 0x221A; - t['radicalbt'] = 0x221A; - t['radicaltp'] = 0x221A; - t['radicalvertex'] = 0x221A; - t['slashbig'] = 0x002F; - t['slashBig'] = 0x002F; - t['slashBigg'] = 0x002F; - t['slashbigg'] = 0x002F; - t['summationdisplay'] = 0x2211; - t['summationtext'] = 0x2211; - t['tildewide'] = 0x02DC; - t['tildewider'] = 0x02DC; - t['tildewidest'] = 0x02DC; - t['uniondisplay'] = 0x22C3; - t['unionmultidisplay'] = 0x228E; - t['unionmultitext'] = 0x228E; - t['unionsqdisplay'] = 0x2294; - t['unionsqtext'] = 0x2294; - t['uniontext'] = 0x22C3; - t['vextenddouble'] = 0x2225; - t['vextendsingle'] = 0x2223; - }); - var getDingbatsGlyphsUnicode = getLookupTableFactory(function (t) { - t['space'] = 0x0020; - t['a1'] = 0x2701; - t['a2'] = 0x2702; - t['a202'] = 0x2703; - t['a3'] = 0x2704; - t['a4'] = 0x260E; - t['a5'] = 0x2706; - t['a119'] = 0x2707; - t['a118'] = 0x2708; - t['a117'] = 0x2709; - t['a11'] = 0x261B; - t['a12'] = 0x261E; - t['a13'] = 0x270C; - t['a14'] = 0x270D; - t['a15'] = 0x270E; - t['a16'] = 0x270F; - t['a105'] = 0x2710; - t['a17'] = 0x2711; - t['a18'] = 0x2712; - t['a19'] = 0x2713; - t['a20'] = 0x2714; - t['a21'] = 0x2715; - t['a22'] = 0x2716; - t['a23'] = 0x2717; - t['a24'] = 0x2718; - t['a25'] = 0x2719; - t['a26'] = 0x271A; - t['a27'] = 0x271B; - t['a28'] = 0x271C; - t['a6'] = 0x271D; - t['a7'] = 0x271E; - t['a8'] = 0x271F; - t['a9'] = 0x2720; - t['a10'] = 0x2721; - t['a29'] = 0x2722; - t['a30'] = 0x2723; - t['a31'] = 0x2724; - t['a32'] = 0x2725; - t['a33'] = 0x2726; - t['a34'] = 0x2727; - t['a35'] = 0x2605; - t['a36'] = 0x2729; - t['a37'] = 0x272A; - t['a38'] = 0x272B; - t['a39'] = 0x272C; - t['a40'] = 0x272D; - t['a41'] = 0x272E; - t['a42'] = 0x272F; - t['a43'] = 0x2730; - t['a44'] = 0x2731; - t['a45'] = 0x2732; - t['a46'] = 0x2733; - t['a47'] = 0x2734; - t['a48'] = 0x2735; - t['a49'] = 0x2736; - t['a50'] = 0x2737; - t['a51'] = 0x2738; - t['a52'] = 0x2739; - t['a53'] = 0x273A; - t['a54'] = 0x273B; - t['a55'] = 0x273C; - t['a56'] = 0x273D; - t['a57'] = 0x273E; - t['a58'] = 0x273F; - t['a59'] = 0x2740; - t['a60'] = 0x2741; - t['a61'] = 0x2742; - t['a62'] = 0x2743; - t['a63'] = 0x2744; - t['a64'] = 0x2745; - t['a65'] = 0x2746; - t['a66'] = 0x2747; - t['a67'] = 0x2748; - t['a68'] = 0x2749; - t['a69'] = 0x274A; - t['a70'] = 0x274B; - t['a71'] = 0x25CF; - t['a72'] = 0x274D; - t['a73'] = 0x25A0; - t['a74'] = 0x274F; - t['a203'] = 0x2750; - t['a75'] = 0x2751; - t['a204'] = 0x2752; - t['a76'] = 0x25B2; - t['a77'] = 0x25BC; - t['a78'] = 0x25C6; - t['a79'] = 0x2756; - t['a81'] = 0x25D7; - t['a82'] = 0x2758; - t['a83'] = 0x2759; - t['a84'] = 0x275A; - t['a97'] = 0x275B; - t['a98'] = 0x275C; - t['a99'] = 0x275D; - t['a100'] = 0x275E; - t['a101'] = 0x2761; - t['a102'] = 0x2762; - t['a103'] = 0x2763; - t['a104'] = 0x2764; - t['a106'] = 0x2765; - t['a107'] = 0x2766; - t['a108'] = 0x2767; - t['a112'] = 0x2663; - t['a111'] = 0x2666; - t['a110'] = 0x2665; - t['a109'] = 0x2660; - t['a120'] = 0x2460; - t['a121'] = 0x2461; - t['a122'] = 0x2462; - t['a123'] = 0x2463; - t['a124'] = 0x2464; - t['a125'] = 0x2465; - t['a126'] = 0x2466; - t['a127'] = 0x2467; - t['a128'] = 0x2468; - t['a129'] = 0x2469; - t['a130'] = 0x2776; - t['a131'] = 0x2777; - t['a132'] = 0x2778; - t['a133'] = 0x2779; - t['a134'] = 0x277A; - t['a135'] = 0x277B; - t['a136'] = 0x277C; - t['a137'] = 0x277D; - t['a138'] = 0x277E; - t['a139'] = 0x277F; - t['a140'] = 0x2780; - t['a141'] = 0x2781; - t['a142'] = 0x2782; - t['a143'] = 0x2783; - t['a144'] = 0x2784; - t['a145'] = 0x2785; - t['a146'] = 0x2786; - t['a147'] = 0x2787; - t['a148'] = 0x2788; - t['a149'] = 0x2789; - t['a150'] = 0x278A; - t['a151'] = 0x278B; - t['a152'] = 0x278C; - t['a153'] = 0x278D; - t['a154'] = 0x278E; - t['a155'] = 0x278F; - t['a156'] = 0x2790; - t['a157'] = 0x2791; - t['a158'] = 0x2792; - t['a159'] = 0x2793; - t['a160'] = 0x2794; - t['a161'] = 0x2192; - t['a163'] = 0x2194; - t['a164'] = 0x2195; - t['a196'] = 0x2798; - t['a165'] = 0x2799; - t['a192'] = 0x279A; - t['a166'] = 0x279B; - t['a167'] = 0x279C; - t['a168'] = 0x279D; - t['a169'] = 0x279E; - t['a170'] = 0x279F; - t['a171'] = 0x27A0; - t['a172'] = 0x27A1; - t['a173'] = 0x27A2; - t['a162'] = 0x27A3; - t['a174'] = 0x27A4; - t['a175'] = 0x27A5; - t['a176'] = 0x27A6; - t['a177'] = 0x27A7; - t['a178'] = 0x27A8; - t['a179'] = 0x27A9; - t['a193'] = 0x27AA; - t['a180'] = 0x27AB; - t['a199'] = 0x27AC; - t['a181'] = 0x27AD; - t['a200'] = 0x27AE; - t['a182'] = 0x27AF; - t['a201'] = 0x27B1; - t['a183'] = 0x27B2; - t['a184'] = 0x27B3; - t['a197'] = 0x27B4; - t['a185'] = 0x27B5; - t['a194'] = 0x27B6; - t['a198'] = 0x27B7; - t['a186'] = 0x27B8; - t['a195'] = 0x27B9; - t['a187'] = 0x27BA; - t['a188'] = 0x27BB; - t['a189'] = 0x27BC; - t['a190'] = 0x27BD; - t['a191'] = 0x27BE; - t['a89'] = 0x2768; - t['a90'] = 0x2769; - t['a93'] = 0x276A; - t['a94'] = 0x276B; - t['a91'] = 0x276C; - t['a92'] = 0x276D; - t['a205'] = 0x276E; - t['a85'] = 0x276F; - t['a206'] = 0x2770; - t['a86'] = 0x2771; - t['a87'] = 0x2772; - t['a88'] = 0x2773; - t['a95'] = 0x2774; - t['a96'] = 0x2775; - t['.notdef'] = 0x0000; - }); - exports.getGlyphsUnicode = getGlyphsUnicode; - exports.getDingbatsGlyphsUnicode = getDingbatsGlyphsUnicode; - })); - (function (root, factory) { - factory(root.pdfjsCoreJbig2 = {}, root.pdfjsSharedUtil, root.pdfjsCoreArithmeticDecoder); - }(this, function (exports, sharedUtil, coreArithmeticDecoder) { - var error = sharedUtil.error; - var log2 = sharedUtil.log2; - var readInt8 = sharedUtil.readInt8; - var readUint16 = sharedUtil.readUint16; - var readUint32 = sharedUtil.readUint32; - var shadow = sharedUtil.shadow; - var ArithmeticDecoder = coreArithmeticDecoder.ArithmeticDecoder; - var Jbig2Image = function Jbig2ImageClosure() { - function ContextCache() { - } - ContextCache.prototype = { - getContexts: function (id) { - if (id in this) { - return this[id]; - } - return this[id] = new Int8Array(1 << 16); - } - }; - function DecodingContext(data, start, end) { - this.data = data; - this.start = start; - this.end = end; - } - DecodingContext.prototype = { - get decoder() { - var decoder = new ArithmeticDecoder(this.data, this.start, this.end); - return shadow(this, 'decoder', decoder); - }, - get contextCache() { - var cache = new ContextCache(); - return shadow(this, 'contextCache', cache); - } - }; - function decodeInteger(contextCache, procedure, decoder) { - var contexts = contextCache.getContexts(procedure); - var prev = 1; - function readBits(length) { - var v = 0; - for (var i = 0; i < length; i++) { - var bit = decoder.readBit(contexts, prev); - prev = prev < 256 ? prev << 1 | bit : (prev << 1 | bit) & 511 | 256; - v = v << 1 | bit; - } - return v >>> 0; - } - var sign = readBits(1); - var value = readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(32) + 4436 : readBits(12) + 340 : readBits(8) + 84 : readBits(6) + 20 : readBits(4) + 4 : readBits(2); - return sign === 0 ? value : value > 0 ? -value : null; - } - function decodeIAID(contextCache, decoder, codeLength) { - var contexts = contextCache.getContexts('IAID'); - var prev = 1; - for (var i = 0; i < codeLength; i++) { - var bit = decoder.readBit(contexts, prev); - prev = prev << 1 | bit; - } - if (codeLength < 31) { - return prev & (1 << codeLength) - 1; - } - return prev & 0x7FFFFFFF; - } - var SegmentTypes = [ - 'SymbolDictionary', - null, - null, - null, - 'IntermediateTextRegion', - null, - 'ImmediateTextRegion', - 'ImmediateLosslessTextRegion', - null, - null, - null, - null, - null, - null, - null, - null, - 'patternDictionary', - null, - null, - null, - 'IntermediateHalftoneRegion', - null, - 'ImmediateHalftoneRegion', - 'ImmediateLosslessHalftoneRegion', - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - 'IntermediateGenericRegion', - null, - 'ImmediateGenericRegion', - 'ImmediateLosslessGenericRegion', - 'IntermediateGenericRefinementRegion', - null, - 'ImmediateGenericRefinementRegion', - 'ImmediateLosslessGenericRefinementRegion', - null, - null, - null, - null, - 'PageInformation', - 'EndOfPage', - 'EndOfStripe', - 'EndOfFile', - 'Profiles', - 'Tables', - null, - null, - null, - null, - null, - null, - null, - null, - 'Extension' - ]; - var CodingTemplates = [ - [ - { - x: -1, - y: -2 - }, - { - x: 0, - y: -2 - }, - { - x: 1, - y: -2 - }, - { - x: -2, - y: -1 - }, - { - x: -1, - y: -1 - }, - { - x: 0, - y: -1 - }, - { - x: 1, - y: -1 - }, - { - x: 2, - y: -1 - }, - { - x: -4, - y: 0 - }, - { - x: -3, - y: 0 - }, - { - x: -2, - y: 0 - }, - { - x: -1, - y: 0 - } - ], - [ - { - x: -1, - y: -2 - }, - { - x: 0, - y: -2 - }, - { - x: 1, - y: -2 - }, - { - x: 2, - y: -2 - }, - { - x: -2, - y: -1 - }, - { - x: -1, - y: -1 - }, - { - x: 0, - y: -1 - }, - { - x: 1, - y: -1 - }, - { - x: 2, - y: -1 - }, - { - x: -3, - y: 0 - }, - { - x: -2, - y: 0 - }, - { - x: -1, - y: 0 - } - ], - [ - { - x: -1, - y: -2 - }, - { - x: 0, - y: -2 - }, - { - x: 1, - y: -2 - }, - { - x: -2, - y: -1 - }, - { - x: -1, - y: -1 - }, - { - x: 0, - y: -1 - }, - { - x: 1, - y: -1 - }, - { - x: -2, - y: 0 - }, - { - x: -1, - y: 0 - } - ], - [ - { - x: -3, - y: -1 - }, - { - x: -2, - y: -1 - }, - { - x: -1, - y: -1 - }, - { - x: 0, - y: -1 - }, - { - x: 1, - y: -1 - }, - { - x: -4, - y: 0 - }, - { - x: -3, - y: 0 - }, - { - x: -2, - y: 0 - }, - { - x: -1, - y: 0 - } - ] - ]; - var RefinementTemplates = [ - { - coding: [ - { - x: 0, - y: -1 - }, - { - x: 1, - y: -1 - }, - { - x: -1, - y: 0 - } - ], - reference: [ - { - x: 0, - y: -1 - }, - { - x: 1, - y: -1 - }, - { - x: -1, - y: 0 - }, - { - x: 0, - y: 0 - }, - { - x: 1, - y: 0 - }, - { - x: -1, - y: 1 - }, - { - x: 0, - y: 1 - }, - { - x: 1, - y: 1 - } - ] - }, - { - coding: [ - { - x: -1, - y: -1 - }, - { - x: 0, - y: -1 - }, - { - x: 1, - y: -1 - }, - { - x: -1, - y: 0 - } - ], - reference: [ - { - x: 0, - y: -1 - }, - { - x: -1, - y: 0 - }, - { - x: 0, - y: 0 - }, - { - x: 1, - y: 0 - }, - { - x: 0, - y: 1 - }, - { - x: 1, - y: 1 - } - ] - } - ]; - var ReusedContexts = [ - 0x9B25, - 0x0795, - 0x00E5, - 0x0195 - ]; - var RefinementReusedContexts = [ - 0x0020, - 0x0008 - ]; - function decodeBitmapTemplate0(width, height, decodingContext) { - var decoder = decodingContext.decoder; - var contexts = decodingContext.contextCache.getContexts('GB'); - var contextLabel, i, j, pixel, row, row1, row2, bitmap = []; - var OLD_PIXEL_MASK = 0x7BF7; - for (i = 0; i < height; i++) { - row = bitmap[i] = new Uint8Array(width); - row1 = i < 1 ? row : bitmap[i - 1]; - row2 = i < 2 ? row : bitmap[i - 2]; - contextLabel = row2[0] << 13 | row2[1] << 12 | row2[2] << 11 | row1[0] << 7 | row1[1] << 6 | row1[2] << 5 | row1[3] << 4; - for (j = 0; j < width; j++) { - row[j] = pixel = decoder.readBit(contexts, contextLabel); - contextLabel = (contextLabel & OLD_PIXEL_MASK) << 1 | (j + 3 < width ? row2[j + 3] << 11 : 0) | (j + 4 < width ? row1[j + 4] << 4 : 0) | pixel; - } - } - return bitmap; - } - function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at, decodingContext) { - if (mmr) { - error('JBIG2 error: MMR encoding is not supported'); - } - if (templateIndex === 0 && !skip && !prediction && at.length === 4 && at[0].x === 3 && at[0].y === -1 && at[1].x === -3 && at[1].y === -1 && at[2].x === 2 && at[2].y === -2 && at[3].x === -2 && at[3].y === -2) { - return decodeBitmapTemplate0(width, height, decodingContext); - } - var useskip = !!skip; - var template = CodingTemplates[templateIndex].concat(at); - template.sort(function (a, b) { - return a.y - b.y || a.x - b.x; - }); - var templateLength = template.length; - var templateX = new Int8Array(templateLength); - var templateY = new Int8Array(templateLength); - var changingTemplateEntries = []; - var reuseMask = 0, minX = 0, maxX = 0, minY = 0; - var c, k; - for (k = 0; k < templateLength; k++) { - templateX[k] = template[k].x; - templateY[k] = template[k].y; - minX = Math.min(minX, template[k].x); - maxX = Math.max(maxX, template[k].x); - minY = Math.min(minY, template[k].y); - if (k < templateLength - 1 && template[k].y === template[k + 1].y && template[k].x === template[k + 1].x - 1) { - reuseMask |= 1 << templateLength - 1 - k; - } else { - changingTemplateEntries.push(k); - } - } - var changingEntriesLength = changingTemplateEntries.length; - var changingTemplateX = new Int8Array(changingEntriesLength); - var changingTemplateY = new Int8Array(changingEntriesLength); - var changingTemplateBit = new Uint16Array(changingEntriesLength); - for (c = 0; c < changingEntriesLength; c++) { - k = changingTemplateEntries[c]; - changingTemplateX[c] = template[k].x; - changingTemplateY[c] = template[k].y; - changingTemplateBit[c] = 1 << templateLength - 1 - k; - } - var sbb_left = -minX; - var sbb_top = -minY; - var sbb_right = width - maxX; - var pseudoPixelContext = ReusedContexts[templateIndex]; - var row = new Uint8Array(width); - var bitmap = []; - var decoder = decodingContext.decoder; - var contexts = decodingContext.contextCache.getContexts('GB'); - var ltp = 0, j, i0, j0, contextLabel = 0, bit, shift; - for (var i = 0; i < height; i++) { - if (prediction) { - var sltp = decoder.readBit(contexts, pseudoPixelContext); - ltp ^= sltp; - if (ltp) { - bitmap.push(row); - continue; - } - } - row = new Uint8Array(row); - bitmap.push(row); - for (j = 0; j < width; j++) { - if (useskip && skip[i][j]) { - row[j] = 0; - continue; - } - if (j >= sbb_left && j < sbb_right && i >= sbb_top) { - contextLabel = contextLabel << 1 & reuseMask; - for (k = 0; k < changingEntriesLength; k++) { - i0 = i + changingTemplateY[k]; - j0 = j + changingTemplateX[k]; - bit = bitmap[i0][j0]; - if (bit) { - bit = changingTemplateBit[k]; - contextLabel |= bit; - } - } - } else { - contextLabel = 0; - shift = templateLength - 1; - for (k = 0; k < templateLength; k++, shift--) { - j0 = j + templateX[k]; - if (j0 >= 0 && j0 < width) { - i0 = i + templateY[k]; - if (i0 >= 0) { - bit = bitmap[i0][j0]; - if (bit) { - contextLabel |= bit << shift; - } - } - } - } - } - var pixel = decoder.readBit(contexts, contextLabel); - row[j] = pixel; - } - } - return bitmap; - } - function decodeRefinement(width, height, templateIndex, referenceBitmap, offsetX, offsetY, prediction, at, decodingContext) { - var codingTemplate = RefinementTemplates[templateIndex].coding; - if (templateIndex === 0) { - codingTemplate = codingTemplate.concat([at[0]]); - } - var codingTemplateLength = codingTemplate.length; - var codingTemplateX = new Int32Array(codingTemplateLength); - var codingTemplateY = new Int32Array(codingTemplateLength); - var k; - for (k = 0; k < codingTemplateLength; k++) { - codingTemplateX[k] = codingTemplate[k].x; - codingTemplateY[k] = codingTemplate[k].y; - } - var referenceTemplate = RefinementTemplates[templateIndex].reference; - if (templateIndex === 0) { - referenceTemplate = referenceTemplate.concat([at[1]]); - } - var referenceTemplateLength = referenceTemplate.length; - var referenceTemplateX = new Int32Array(referenceTemplateLength); - var referenceTemplateY = new Int32Array(referenceTemplateLength); - for (k = 0; k < referenceTemplateLength; k++) { - referenceTemplateX[k] = referenceTemplate[k].x; - referenceTemplateY[k] = referenceTemplate[k].y; - } - var referenceWidth = referenceBitmap[0].length; - var referenceHeight = referenceBitmap.length; - var pseudoPixelContext = RefinementReusedContexts[templateIndex]; - var bitmap = []; - var decoder = decodingContext.decoder; - var contexts = decodingContext.contextCache.getContexts('GR'); - var ltp = 0; - for (var i = 0; i < height; i++) { - if (prediction) { - var sltp = decoder.readBit(contexts, pseudoPixelContext); - ltp ^= sltp; - if (ltp) { - error('JBIG2 error: prediction is not supported'); - } - } - var row = new Uint8Array(width); - bitmap.push(row); - for (var j = 0; j < width; j++) { - var i0, j0; - var contextLabel = 0; - for (k = 0; k < codingTemplateLength; k++) { - i0 = i + codingTemplateY[k]; - j0 = j + codingTemplateX[k]; - if (i0 < 0 || j0 < 0 || j0 >= width) { - contextLabel <<= 1; - } else - { - contextLabel = contextLabel << 1 | bitmap[i0][j0]; - } - } - for (k = 0; k < referenceTemplateLength; k++) { - i0 = i + referenceTemplateY[k] + offsetY; - j0 = j + referenceTemplateX[k] + offsetX; - if (i0 < 0 || i0 >= referenceHeight || j0 < 0 || j0 >= referenceWidth) { - contextLabel <<= 1; - } else - { - contextLabel = contextLabel << 1 | referenceBitmap[i0][j0]; - } - } - var pixel = decoder.readBit(contexts, contextLabel); - row[j] = pixel; - } - } - return bitmap; - } - function decodeSymbolDictionary(huffman, refinement, symbols, numberOfNewSymbols, numberOfExportedSymbols, huffmanTables, templateIndex, at, refinementTemplateIndex, refinementAt, decodingContext) { - if (huffman) { - error('JBIG2 error: huffman is not supported'); - } - var newSymbols = []; - var currentHeight = 0; - var symbolCodeLength = log2(symbols.length + numberOfNewSymbols); - var decoder = decodingContext.decoder; - var contextCache = decodingContext.contextCache; - while (newSymbols.length < numberOfNewSymbols) { - var deltaHeight = decodeInteger(contextCache, 'IADH', decoder); - currentHeight += deltaHeight; - var currentWidth = 0; - var totalWidth = 0; - while (true) { - var deltaWidth = decodeInteger(contextCache, 'IADW', decoder); - if (deltaWidth === null) { - break; - } - currentWidth += deltaWidth; - totalWidth += currentWidth; - var bitmap; - if (refinement) { - var numberOfInstances = decodeInteger(contextCache, 'IAAI', decoder); - if (numberOfInstances > 1) { - bitmap = decodeTextRegion(huffman, refinement, currentWidth, currentHeight, 0, numberOfInstances, 1, symbols.concat(newSymbols), symbolCodeLength, 0, 0, 1, 0, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext); - } else { - var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength); - var rdx = decodeInteger(contextCache, 'IARDX', decoder); - var rdy = decodeInteger(contextCache, 'IARDY', decoder); - var symbol = symbolId < symbols.length ? symbols[symbolId] : newSymbols[symbolId - symbols.length]; - bitmap = decodeRefinement(currentWidth, currentHeight, refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt, decodingContext); - } - } else { - bitmap = decodeBitmap(false, currentWidth, currentHeight, templateIndex, false, null, at, decodingContext); - } - newSymbols.push(bitmap); - } - } - var exportedSymbols = []; - var flags = [], currentFlag = false; - var totalSymbolsLength = symbols.length + numberOfNewSymbols; - while (flags.length < totalSymbolsLength) { - var runLength = decodeInteger(contextCache, 'IAEX', decoder); - while (runLength--) { - flags.push(currentFlag); - } - currentFlag = !currentFlag; - } - for (var i = 0, ii = symbols.length; i < ii; i++) { - if (flags[i]) { - exportedSymbols.push(symbols[i]); - } - } - for (var j = 0; j < numberOfNewSymbols; i++, j++) { - if (flags[i]) { - exportedSymbols.push(newSymbols[j]); - } - } - return exportedSymbols; - } - function decodeTextRegion(huffman, refinement, width, height, defaultPixelValue, numberOfSymbolInstances, stripSize, inputSymbols, symbolCodeLength, transposed, dsOffset, referenceCorner, combinationOperator, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext) { - if (huffman) { - error('JBIG2 error: huffman is not supported'); - } - var bitmap = []; - var i, row; - for (i = 0; i < height; i++) { - row = new Uint8Array(width); - if (defaultPixelValue) { - for (var j = 0; j < width; j++) { - row[j] = defaultPixelValue; - } - } - bitmap.push(row); - } - var decoder = decodingContext.decoder; - var contextCache = decodingContext.contextCache; - var stripT = -decodeInteger(contextCache, 'IADT', decoder); - var firstS = 0; - i = 0; - while (i < numberOfSymbolInstances) { - var deltaT = decodeInteger(contextCache, 'IADT', decoder); - stripT += deltaT; - var deltaFirstS = decodeInteger(contextCache, 'IAFS', decoder); - firstS += deltaFirstS; - var currentS = firstS; - do { - var currentT = stripSize === 1 ? 0 : decodeInteger(contextCache, 'IAIT', decoder); - var t = stripSize * stripT + currentT; - var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength); - var applyRefinement = refinement && decodeInteger(contextCache, 'IARI', decoder); - var symbolBitmap = inputSymbols[symbolId]; - var symbolWidth = symbolBitmap[0].length; - var symbolHeight = symbolBitmap.length; - if (applyRefinement) { - var rdw = decodeInteger(contextCache, 'IARDW', decoder); - var rdh = decodeInteger(contextCache, 'IARDH', decoder); - var rdx = decodeInteger(contextCache, 'IARDX', decoder); - var rdy = decodeInteger(contextCache, 'IARDY', decoder); - symbolWidth += rdw; - symbolHeight += rdh; - symbolBitmap = decodeRefinement(symbolWidth, symbolHeight, refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx, (rdh >> 1) + rdy, false, refinementAt, decodingContext); - } - var offsetT = t - (referenceCorner & 1 ? 0 : symbolHeight); - var offsetS = currentS - (referenceCorner & 2 ? symbolWidth : 0); - var s2, t2, symbolRow; - if (transposed) { - for (s2 = 0; s2 < symbolHeight; s2++) { - row = bitmap[offsetS + s2]; - if (!row) { - continue; - } - symbolRow = symbolBitmap[s2]; - var maxWidth = Math.min(width - offsetT, symbolWidth); - switch (combinationOperator) { - case 0: - for (t2 = 0; t2 < maxWidth; t2++) { - row[offsetT + t2] |= symbolRow[t2]; - } - break; - case 2: - for (t2 = 0; t2 < maxWidth; t2++) { - row[offsetT + t2] ^= symbolRow[t2]; - } - break; - default: - error('JBIG2 error: operator ' + combinationOperator + ' is not supported'); - } - } - currentS += symbolHeight - 1; - } else { - for (t2 = 0; t2 < symbolHeight; t2++) { - row = bitmap[offsetT + t2]; - if (!row) { - continue; - } - symbolRow = symbolBitmap[t2]; - switch (combinationOperator) { - case 0: - for (s2 = 0; s2 < symbolWidth; s2++) { - row[offsetS + s2] |= symbolRow[s2]; - } - break; - case 2: - for (s2 = 0; s2 < symbolWidth; s2++) { - row[offsetS + s2] ^= symbolRow[s2]; - } - break; - default: - error('JBIG2 error: operator ' + combinationOperator + ' is not supported'); - } - } - currentS += symbolWidth - 1; - } - i++; - var deltaS = decodeInteger(contextCache, 'IADS', decoder); - if (deltaS === null) { - break; - } - currentS += deltaS + dsOffset; - } while (true); - } - return bitmap; - } - function readSegmentHeader(data, start) { - var segmentHeader = {}; - segmentHeader.number = readUint32(data, start); - var flags = data[start + 4]; - var segmentType = flags & 0x3F; - if (!SegmentTypes[segmentType]) { - error('JBIG2 error: invalid segment type: ' + segmentType); - } - segmentHeader.type = segmentType; - segmentHeader.typeName = SegmentTypes[segmentType]; - segmentHeader.deferredNonRetain = !!(flags & 0x80); - var pageAssociationFieldSize = !!(flags & 0x40); - var referredFlags = data[start + 5]; - var referredToCount = referredFlags >> 5 & 7; - var retainBits = [referredFlags & 31]; - var position = start + 6; - if (referredFlags === 7) { - referredToCount = readUint32(data, position - 1) & 0x1FFFFFFF; - position += 3; - var bytes = referredToCount + 7 >> 3; - retainBits[0] = data[position++]; - while (--bytes > 0) { - retainBits.push(data[position++]); - } - } else if (referredFlags === 5 || referredFlags === 6) { - error('JBIG2 error: invalid referred-to flags'); - } - segmentHeader.retainBits = retainBits; - var referredToSegmentNumberSize = segmentHeader.number <= 256 ? 1 : segmentHeader.number <= 65536 ? 2 : 4; - var referredTo = []; - var i, ii; - for (i = 0; i < referredToCount; i++) { - var number = referredToSegmentNumberSize === 1 ? data[position] : referredToSegmentNumberSize === 2 ? readUint16(data, position) : readUint32(data, position); - referredTo.push(number); - position += referredToSegmentNumberSize; - } - segmentHeader.referredTo = referredTo; - if (!pageAssociationFieldSize) { - segmentHeader.pageAssociation = data[position++]; - } else { - segmentHeader.pageAssociation = readUint32(data, position); - position += 4; - } - segmentHeader.length = readUint32(data, position); - position += 4; - if (segmentHeader.length === 0xFFFFFFFF) { - if (segmentType === 38) { - var genericRegionInfo = readRegionSegmentInformation(data, position); - var genericRegionSegmentFlags = data[position + RegionSegmentInformationFieldLength]; - var genericRegionMmr = !!(genericRegionSegmentFlags & 1); - var searchPatternLength = 6; - var searchPattern = new Uint8Array(searchPatternLength); - if (!genericRegionMmr) { - searchPattern[0] = 0xFF; - searchPattern[1] = 0xAC; - } - searchPattern[2] = genericRegionInfo.height >>> 24 & 0xFF; - searchPattern[3] = genericRegionInfo.height >> 16 & 0xFF; - searchPattern[4] = genericRegionInfo.height >> 8 & 0xFF; - searchPattern[5] = genericRegionInfo.height & 0xFF; - for (i = position, ii = data.length; i < ii; i++) { - var j = 0; - while (j < searchPatternLength && searchPattern[j] === data[i + j]) { - j++; - } - if (j === searchPatternLength) { - segmentHeader.length = i + searchPatternLength; - break; - } - } - if (segmentHeader.length === 0xFFFFFFFF) { - error('JBIG2 error: segment end was not found'); - } - } else { - error('JBIG2 error: invalid unknown segment length'); - } - } - segmentHeader.headerEnd = position; - return segmentHeader; - } - function readSegments(header, data, start, end) { - var segments = []; - var position = start; - while (position < end) { - var segmentHeader = readSegmentHeader(data, position); - position = segmentHeader.headerEnd; - var segment = { - header: segmentHeader, - data: data - }; - if (!header.randomAccess) { - segment.start = position; - position += segmentHeader.length; - segment.end = position; - } - segments.push(segment); - if (segmentHeader.type === 51) { - break; - } - } - if (header.randomAccess) { - for (var i = 0, ii = segments.length; i < ii; i++) { - segments[i].start = position; - position += segments[i].header.length; - segments[i].end = position; - } - } - return segments; - } - function readRegionSegmentInformation(data, start) { - return { - width: readUint32(data, start), - height: readUint32(data, start + 4), - x: readUint32(data, start + 8), - y: readUint32(data, start + 12), - combinationOperator: data[start + 16] & 7 - }; - } - var RegionSegmentInformationFieldLength = 17; - function processSegment(segment, visitor) { - var header = segment.header; - var data = segment.data, position = segment.start, end = segment.end; - var args, at, i, atLength; - switch (header.type) { - case 0: - var dictionary = {}; - var dictionaryFlags = readUint16(data, position); - dictionary.huffman = !!(dictionaryFlags & 1); - dictionary.refinement = !!(dictionaryFlags & 2); - dictionary.huffmanDHSelector = dictionaryFlags >> 2 & 3; - dictionary.huffmanDWSelector = dictionaryFlags >> 4 & 3; - dictionary.bitmapSizeSelector = dictionaryFlags >> 6 & 1; - dictionary.aggregationInstancesSelector = dictionaryFlags >> 7 & 1; - dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256); - dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512); - dictionary.template = dictionaryFlags >> 10 & 3; - dictionary.refinementTemplate = dictionaryFlags >> 12 & 1; - position += 2; - if (!dictionary.huffman) { - atLength = dictionary.template === 0 ? 4 : 1; - at = []; - for (i = 0; i < atLength; i++) { - at.push({ - x: readInt8(data, position), - y: readInt8(data, position + 1) - }); - position += 2; - } - dictionary.at = at; - } - if (dictionary.refinement && !dictionary.refinementTemplate) { - at = []; - for (i = 0; i < 2; i++) { - at.push({ - x: readInt8(data, position), - y: readInt8(data, position + 1) - }); - position += 2; - } - dictionary.refinementAt = at; - } - dictionary.numberOfExportedSymbols = readUint32(data, position); - position += 4; - dictionary.numberOfNewSymbols = readUint32(data, position); - position += 4; - args = [ - dictionary, - header.number, - header.referredTo, - data, - position, - end - ]; - break; - case 6: - case 7: - var textRegion = {}; - textRegion.info = readRegionSegmentInformation(data, position); - position += RegionSegmentInformationFieldLength; - var textRegionSegmentFlags = readUint16(data, position); - position += 2; - textRegion.huffman = !!(textRegionSegmentFlags & 1); - textRegion.refinement = !!(textRegionSegmentFlags & 2); - textRegion.stripSize = 1 << (textRegionSegmentFlags >> 2 & 3); - textRegion.referenceCorner = textRegionSegmentFlags >> 4 & 3; - textRegion.transposed = !!(textRegionSegmentFlags & 64); - textRegion.combinationOperator = textRegionSegmentFlags >> 7 & 3; - textRegion.defaultPixelValue = textRegionSegmentFlags >> 9 & 1; - textRegion.dsOffset = textRegionSegmentFlags << 17 >> 27; - textRegion.refinementTemplate = textRegionSegmentFlags >> 15 & 1; - if (textRegion.huffman) { - var textRegionHuffmanFlags = readUint16(data, position); - position += 2; - textRegion.huffmanFS = textRegionHuffmanFlags & 3; - textRegion.huffmanDS = textRegionHuffmanFlags >> 2 & 3; - textRegion.huffmanDT = textRegionHuffmanFlags >> 4 & 3; - textRegion.huffmanRefinementDW = textRegionHuffmanFlags >> 6 & 3; - textRegion.huffmanRefinementDH = textRegionHuffmanFlags >> 8 & 3; - textRegion.huffmanRefinementDX = textRegionHuffmanFlags >> 10 & 3; - textRegion.huffmanRefinementDY = textRegionHuffmanFlags >> 12 & 3; - textRegion.huffmanRefinementSizeSelector = !!(textRegionHuffmanFlags & 14); - } - if (textRegion.refinement && !textRegion.refinementTemplate) { - at = []; - for (i = 0; i < 2; i++) { - at.push({ - x: readInt8(data, position), - y: readInt8(data, position + 1) - }); - position += 2; - } - textRegion.refinementAt = at; - } - textRegion.numberOfSymbolInstances = readUint32(data, position); - position += 4; - if (textRegion.huffman) { - error('JBIG2 error: huffman is not supported'); - } - args = [ - textRegion, - header.referredTo, - data, - position, - end - ]; - break; - case 38: - case 39: - var genericRegion = {}; - genericRegion.info = readRegionSegmentInformation(data, position); - position += RegionSegmentInformationFieldLength; - var genericRegionSegmentFlags = data[position++]; - genericRegion.mmr = !!(genericRegionSegmentFlags & 1); - genericRegion.template = genericRegionSegmentFlags >> 1 & 3; - genericRegion.prediction = !!(genericRegionSegmentFlags & 8); - if (!genericRegion.mmr) { - atLength = genericRegion.template === 0 ? 4 : 1; - at = []; - for (i = 0; i < atLength; i++) { - at.push({ - x: readInt8(data, position), - y: readInt8(data, position + 1) - }); - position += 2; - } - genericRegion.at = at; - } - args = [ - genericRegion, - data, - position, - end - ]; - break; - case 48: - var pageInfo = { - width: readUint32(data, position), - height: readUint32(data, position + 4), - resolutionX: readUint32(data, position + 8), - resolutionY: readUint32(data, position + 12) - }; - if (pageInfo.height === 0xFFFFFFFF) { - delete pageInfo.height; - } - var pageSegmentFlags = data[position + 16]; - var pageStripingInformation = readUint16(data, position + 17); - pageInfo.lossless = !!(pageSegmentFlags & 1); - pageInfo.refinement = !!(pageSegmentFlags & 2); - pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1; - pageInfo.combinationOperator = pageSegmentFlags >> 3 & 3; - pageInfo.requiresBuffer = !!(pageSegmentFlags & 32); - pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64); - args = [pageInfo]; - break; - case 49: - break; - case 50: - break; - case 51: - break; - case 62: - break; - default: - error('JBIG2 error: segment type ' + header.typeName + '(' + header.type + ') is not implemented'); - } - var callbackName = 'on' + header.typeName; - if (callbackName in visitor) { - visitor[callbackName].apply(visitor, args); - } - } - function processSegments(segments, visitor) { - for (var i = 0, ii = segments.length; i < ii; i++) { - processSegment(segments[i], visitor); - } - } - function parseJbig2(data, start, end) { - var position = start; - if (data[position] !== 0x97 || data[position + 1] !== 0x4A || data[position + 2] !== 0x42 || data[position + 3] !== 0x32 || data[position + 4] !== 0x0D || data[position + 5] !== 0x0A || data[position + 6] !== 0x1A || data[position + 7] !== 0x0A) { - error('JBIG2 error: invalid header'); - } - var header = {}; - position += 8; - var flags = data[position++]; - header.randomAccess = !(flags & 1); - if (!(flags & 2)) { - header.numberOfPages = readUint32(data, position); - position += 4; - } - var segments = readSegments(header, data, position, end); - error('Not implemented'); - } - function parseJbig2Chunks(chunks) { - var visitor = new SimpleSegmentVisitor(); - for (var i = 0, ii = chunks.length; i < ii; i++) { - var chunk = chunks[i]; - var segments = readSegments({}, chunk.data, chunk.start, chunk.end); - processSegments(segments, visitor); - } - return visitor.buffer; - } - function SimpleSegmentVisitor() { - } - SimpleSegmentVisitor.prototype = { - onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) { - this.currentPageInfo = info; - var rowSize = info.width + 7 >> 3; - var buffer = new Uint8Array(rowSize * info.height); - if (info.defaultPixelValue) { - for (var i = 0, ii = buffer.length; i < ii; i++) { - buffer[i] = 0xFF; - } - } - this.buffer = buffer; - }, - drawBitmap: function SimpleSegmentVisitor_drawBitmap(regionInfo, bitmap) { - var pageInfo = this.currentPageInfo; - var width = regionInfo.width, height = regionInfo.height; - var rowSize = pageInfo.width + 7 >> 3; - var combinationOperator = pageInfo.combinationOperatorOverride ? regionInfo.combinationOperator : pageInfo.combinationOperator; - var buffer = this.buffer; - var mask0 = 128 >> (regionInfo.x & 7); - var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3); - var i, j, mask, offset; - switch (combinationOperator) { - case 0: - for (i = 0; i < height; i++) { - mask = mask0; - offset = offset0; - for (j = 0; j < width; j++) { - if (bitmap[i][j]) { - buffer[offset] |= mask; - } - mask >>= 1; - if (!mask) { - mask = 128; - offset++; - } - } - offset0 += rowSize; - } - break; - case 2: - for (i = 0; i < height; i++) { - mask = mask0; - offset = offset0; - for (j = 0; j < width; j++) { - if (bitmap[i][j]) { - buffer[offset] ^= mask; - } - mask >>= 1; - if (!mask) { - mask = 128; - offset++; - } - } - offset0 += rowSize; - } - break; - default: - error('JBIG2 error: operator ' + combinationOperator + ' is not supported'); - } - }, - onImmediateGenericRegion: function SimpleSegmentVisitor_onImmediateGenericRegion(region, data, start, end) { - var regionInfo = region.info; - var decodingContext = new DecodingContext(data, start, end); - var bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height, region.template, region.prediction, null, region.at, decodingContext); - this.drawBitmap(regionInfo, bitmap); - }, - onImmediateLosslessGenericRegion: function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() { - this.onImmediateGenericRegion.apply(this, arguments); - }, - onSymbolDictionary: function SimpleSegmentVisitor_onSymbolDictionary(dictionary, currentSegment, referredSegments, data, start, end) { - var huffmanTables; - if (dictionary.huffman) { - error('JBIG2 error: huffman is not supported'); - } - var symbols = this.symbols; - if (!symbols) { - this.symbols = symbols = {}; - } - var inputSymbols = []; - for (var i = 0, ii = referredSegments.length; i < ii; i++) { - inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]); - } - var decodingContext = new DecodingContext(data, start, end); - symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman, dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols, dictionary.numberOfExportedSymbols, huffmanTables, dictionary.template, dictionary.at, dictionary.refinementTemplate, dictionary.refinementAt, decodingContext); - }, - onImmediateTextRegion: function SimpleSegmentVisitor_onImmediateTextRegion(region, referredSegments, data, start, end) { - var regionInfo = region.info; - var huffmanTables; - var symbols = this.symbols; - var inputSymbols = []; - for (var i = 0, ii = referredSegments.length; i < ii; i++) { - inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]); - } - var symbolCodeLength = log2(inputSymbols.length); - var decodingContext = new DecodingContext(data, start, end); - var bitmap = decodeTextRegion(region.huffman, region.refinement, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.numberOfSymbolInstances, region.stripSize, inputSymbols, symbolCodeLength, region.transposed, region.dsOffset, region.referenceCorner, region.combinationOperator, huffmanTables, region.refinementTemplate, region.refinementAt, decodingContext); - this.drawBitmap(regionInfo, bitmap); - }, - onImmediateLosslessTextRegion: function SimpleSegmentVisitor_onImmediateLosslessTextRegion() { - this.onImmediateTextRegion.apply(this, arguments); - } - }; - function Jbig2Image() { - } - Jbig2Image.prototype = { - parseChunks: function Jbig2Image_parseChunks(chunks) { - return parseJbig2Chunks(chunks); - } - }; - return Jbig2Image; - }(); - exports.Jbig2Image = Jbig2Image; - })); - (function (root, factory) { - factory(root.pdfjsCoreJpg = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var error = sharedUtil.error; - var JpegImage = function JpegImageClosure() { - var dctZigZag = new Uint8Array([ - 0, - 1, - 8, - 16, - 9, - 2, - 3, - 10, - 17, - 24, - 32, - 25, - 18, - 11, - 4, - 5, - 12, - 19, - 26, - 33, - 40, - 48, - 41, - 34, - 27, - 20, - 13, - 6, - 7, - 14, - 21, - 28, - 35, - 42, - 49, - 56, - 57, - 50, - 43, - 36, - 29, - 22, - 15, - 23, - 30, - 37, - 44, - 51, - 58, - 59, - 52, - 45, - 38, - 31, - 39, - 46, - 53, - 60, - 61, - 54, - 47, - 55, - 62, - 63 - ]); - var dctCos1 = 4017; - var dctSin1 = 799; - var dctCos3 = 3406; - var dctSin3 = 2276; - var dctCos6 = 1567; - var dctSin6 = 3784; - var dctSqrt2 = 5793; - var dctSqrt1d2 = 2896; - function JpegImage() { - this.decodeTransform = null; - this.colorTransform = -1; - } - function buildHuffmanTable(codeLengths, values) { - var k = 0, code = [], i, j, length = 16; - while (length > 0 && !codeLengths[length - 1]) { - length--; - } - code.push({ - children: [], - index: 0 - }); - var p = code[0], q; - for (i = 0; i < length; i++) { - for (j = 0; j < codeLengths[i]; j++) { - p = code.pop(); - p.children[p.index] = values[k]; - while (p.index > 0) { - p = code.pop(); - } - p.index++; - code.push(p); - while (code.length <= i) { - code.push(q = { - children: [], - index: 0 - }); - p.children[p.index] = q.children; - p = q; - } - k++; - } - if (i + 1 < length) { - code.push(q = { - children: [], - index: 0 - }); - p.children[p.index] = q.children; - p = q; - } - } - return code[0].children; - } - function getBlockBufferOffset(component, row, col) { - return 64 * ((component.blocksPerLine + 1) * row + col); - } - function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) { - var mcusPerLine = frame.mcusPerLine; - var progressive = frame.progressive; - var startOffset = offset, bitsData = 0, bitsCount = 0; - function readBit() { - if (bitsCount > 0) { - bitsCount--; - return bitsData >> bitsCount & 1; - } - bitsData = data[offset++]; - if (bitsData === 0xFF) { - var nextByte = data[offset++]; - if (nextByte) { - error('JPEG error: unexpected marker ' + (bitsData << 8 | nextByte).toString(16)); - } - } - bitsCount = 7; - return bitsData >>> 7; - } - function decodeHuffman(tree) { - var node = tree; - while (true) { - node = node[readBit()]; - if (typeof node === 'number') { - return node; - } - if (typeof node !== 'object') { - error('JPEG error: invalid huffman sequence'); - } - } - } - function receive(length) { - var n = 0; - while (length > 0) { - n = n << 1 | readBit(); - length--; - } - return n; - } - function receiveAndExtend(length) { - if (length === 1) { - return readBit() === 1 ? 1 : -1; - } - var n = receive(length); - if (n >= 1 << length - 1) { - return n; - } - return n + (-1 << length) + 1; - } - function decodeBaseline(component, offset) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : receiveAndExtend(t); - component.blockData[offset] = component.pred += diff; - var k = 1; - while (k < 64) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15, r = rs >> 4; - if (s === 0) { - if (r < 15) { - break; - } - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - component.blockData[offset + z] = receiveAndExtend(s); - k++; - } - } - function decodeDCFirst(component, offset) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : receiveAndExtend(t) << successive; - component.blockData[offset] = component.pred += diff; - } - function decodeDCSuccessive(component, offset) { - component.blockData[offset] |= readBit() << successive; - } - var eobrun = 0; - function decodeACFirst(component, offset) { - if (eobrun > 0) { - eobrun--; - return; - } - var k = spectralStart, e = spectralEnd; - while (k <= e) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15, r = rs >> 4; - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r) - 1; - break; - } - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - component.blockData[offset + z] = receiveAndExtend(s) * (1 << successive); - k++; - } - } - var successiveACState = 0, successiveACNextValue; - function decodeACSuccessive(component, offset) { - var k = spectralStart; - var e = spectralEnd; - var r = 0; - var s; - var rs; - while (k <= e) { - var z = dctZigZag[k]; - switch (successiveACState) { - case 0: - rs = decodeHuffman(component.huffmanTableAC); - s = rs & 15; - r = rs >> 4; - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r); - successiveACState = 4; - } else { - r = 16; - successiveACState = 1; - } - } else { - if (s !== 1) { - error('JPEG error: invalid ACn encoding'); - } - successiveACNextValue = receiveAndExtend(s); - successiveACState = r ? 2 : 3; - } - continue; - case 1: - case 2: - if (component.blockData[offset + z]) { - component.blockData[offset + z] += readBit() << successive; - } else { - r--; - if (r === 0) { - successiveACState = successiveACState === 2 ? 3 : 0; - } - } - break; - case 3: - if (component.blockData[offset + z]) { - component.blockData[offset + z] += readBit() << successive; - } else { - component.blockData[offset + z] = successiveACNextValue << successive; - successiveACState = 0; - } - break; - case 4: - if (component.blockData[offset + z]) { - component.blockData[offset + z] += readBit() << successive; - } - break; - } - k++; - } - if (successiveACState === 4) { - eobrun--; - if (eobrun === 0) { - successiveACState = 0; - } - } - } - function decodeMcu(component, decode, mcu, row, col) { - var mcuRow = mcu / mcusPerLine | 0; - var mcuCol = mcu % mcusPerLine; - var blockRow = mcuRow * component.v + row; - var blockCol = mcuCol * component.h + col; - var offset = getBlockBufferOffset(component, blockRow, blockCol); - decode(component, offset); - } - function decodeBlock(component, decode, mcu) { - var blockRow = mcu / component.blocksPerLine | 0; - var blockCol = mcu % component.blocksPerLine; - var offset = getBlockBufferOffset(component, blockRow, blockCol); - decode(component, offset); - } - var componentsLength = components.length; - var component, i, j, k, n; - var decodeFn; - if (progressive) { - if (spectralStart === 0) { - decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; - } else { - decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; - } - } else { - decodeFn = decodeBaseline; - } - var mcu = 0, marker; - var mcuExpected; - if (componentsLength === 1) { - mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; - } else { - mcuExpected = mcusPerLine * frame.mcusPerColumn; - } - if (!resetInterval) { - resetInterval = mcuExpected; - } - var h, v; - while (mcu < mcuExpected) { - for (i = 0; i < componentsLength; i++) { - components[i].pred = 0; - } - eobrun = 0; - if (componentsLength === 1) { - component = components[0]; - for (n = 0; n < resetInterval; n++) { - decodeBlock(component, decodeFn, mcu); - mcu++; - } - } else { - for (n = 0; n < resetInterval; n++) { - for (i = 0; i < componentsLength; i++) { - component = components[i]; - h = component.h; - v = component.v; - for (j = 0; j < v; j++) { - for (k = 0; k < h; k++) { - decodeMcu(component, decodeFn, mcu, j, k); - } - } - } - mcu++; - } - } - bitsCount = 0; - marker = data[offset] << 8 | data[offset + 1]; - while (data[offset] === 0x00 && offset < data.length - 1) { - offset++; - marker = data[offset] << 8 | data[offset + 1]; - } - if (marker <= 0xFF00) { - error('JPEG error: marker was not found'); - } - if (marker >= 0xFFD0 && marker <= 0xFFD7) { - offset += 2; - } else { - break; - } - } - return offset - startOffset; - } - function quantizeAndInverse(component, blockBufferOffset, p) { - var qt = component.quantizationTable, blockData = component.blockData; - var v0, v1, v2, v3, v4, v5, v6, v7; - var p0, p1, p2, p3, p4, p5, p6, p7; - var t; - if (!qt) { - error('JPEG error: missing required Quantization Table.'); - } - for (var row = 0; row < 64; row += 8) { - p0 = blockData[blockBufferOffset + row]; - p1 = blockData[blockBufferOffset + row + 1]; - p2 = blockData[blockBufferOffset + row + 2]; - p3 = blockData[blockBufferOffset + row + 3]; - p4 = blockData[blockBufferOffset + row + 4]; - p5 = blockData[blockBufferOffset + row + 5]; - p6 = blockData[blockBufferOffset + row + 6]; - p7 = blockData[blockBufferOffset + row + 7]; - p0 *= qt[row]; - if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { - t = dctSqrt2 * p0 + 512 >> 10; - p[row] = t; - p[row + 1] = t; - p[row + 2] = t; - p[row + 3] = t; - p[row + 4] = t; - p[row + 5] = t; - p[row + 6] = t; - p[row + 7] = t; - continue; - } - p1 *= qt[row + 1]; - p2 *= qt[row + 2]; - p3 *= qt[row + 3]; - p4 *= qt[row + 4]; - p5 *= qt[row + 5]; - p6 *= qt[row + 6]; - p7 *= qt[row + 7]; - v0 = dctSqrt2 * p0 + 128 >> 8; - v1 = dctSqrt2 * p4 + 128 >> 8; - v2 = p2; - v3 = p6; - v4 = dctSqrt1d2 * (p1 - p7) + 128 >> 8; - v7 = dctSqrt1d2 * (p1 + p7) + 128 >> 8; - v5 = p3 << 4; - v6 = p5 << 4; - v0 = v0 + v1 + 1 >> 1; - v1 = v0 - v1; - t = v2 * dctSin6 + v3 * dctCos6 + 128 >> 8; - v2 = v2 * dctCos6 - v3 * dctSin6 + 128 >> 8; - v3 = t; - v4 = v4 + v6 + 1 >> 1; - v6 = v4 - v6; - v7 = v7 + v5 + 1 >> 1; - v5 = v7 - v5; - v0 = v0 + v3 + 1 >> 1; - v3 = v0 - v3; - v1 = v1 + v2 + 1 >> 1; - v2 = v1 - v2; - t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; - v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; - v7 = t; - t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; - v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; - v6 = t; - p[row] = v0 + v7; - p[row + 7] = v0 - v7; - p[row + 1] = v1 + v6; - p[row + 6] = v1 - v6; - p[row + 2] = v2 + v5; - p[row + 5] = v2 - v5; - p[row + 3] = v3 + v4; - p[row + 4] = v3 - v4; - } - for (var col = 0; col < 8; ++col) { - p0 = p[col]; - p1 = p[col + 8]; - p2 = p[col + 16]; - p3 = p[col + 24]; - p4 = p[col + 32]; - p5 = p[col + 40]; - p6 = p[col + 48]; - p7 = p[col + 56]; - if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { - t = dctSqrt2 * p0 + 8192 >> 14; - t = t < -2040 ? 0 : t >= 2024 ? 255 : t + 2056 >> 4; - blockData[blockBufferOffset + col] = t; - blockData[blockBufferOffset + col + 8] = t; - blockData[blockBufferOffset + col + 16] = t; - blockData[blockBufferOffset + col + 24] = t; - blockData[blockBufferOffset + col + 32] = t; - blockData[blockBufferOffset + col + 40] = t; - blockData[blockBufferOffset + col + 48] = t; - blockData[blockBufferOffset + col + 56] = t; - continue; - } - v0 = dctSqrt2 * p0 + 2048 >> 12; - v1 = dctSqrt2 * p4 + 2048 >> 12; - v2 = p2; - v3 = p6; - v4 = dctSqrt1d2 * (p1 - p7) + 2048 >> 12; - v7 = dctSqrt1d2 * (p1 + p7) + 2048 >> 12; - v5 = p3; - v6 = p5; - v0 = (v0 + v1 + 1 >> 1) + 4112; - v1 = v0 - v1; - t = v2 * dctSin6 + v3 * dctCos6 + 2048 >> 12; - v2 = v2 * dctCos6 - v3 * dctSin6 + 2048 >> 12; - v3 = t; - v4 = v4 + v6 + 1 >> 1; - v6 = v4 - v6; - v7 = v7 + v5 + 1 >> 1; - v5 = v7 - v5; - v0 = v0 + v3 + 1 >> 1; - v3 = v0 - v3; - v1 = v1 + v2 + 1 >> 1; - v2 = v1 - v2; - t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; - v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; - v7 = t; - t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; - v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; - v6 = t; - p0 = v0 + v7; - p7 = v0 - v7; - p1 = v1 + v6; - p6 = v1 - v6; - p2 = v2 + v5; - p5 = v2 - v5; - p3 = v3 + v4; - p4 = v3 - v4; - p0 = p0 < 16 ? 0 : p0 >= 4080 ? 255 : p0 >> 4; - p1 = p1 < 16 ? 0 : p1 >= 4080 ? 255 : p1 >> 4; - p2 = p2 < 16 ? 0 : p2 >= 4080 ? 255 : p2 >> 4; - p3 = p3 < 16 ? 0 : p3 >= 4080 ? 255 : p3 >> 4; - p4 = p4 < 16 ? 0 : p4 >= 4080 ? 255 : p4 >> 4; - p5 = p5 < 16 ? 0 : p5 >= 4080 ? 255 : p5 >> 4; - p6 = p6 < 16 ? 0 : p6 >= 4080 ? 255 : p6 >> 4; - p7 = p7 < 16 ? 0 : p7 >= 4080 ? 255 : p7 >> 4; - blockData[blockBufferOffset + col] = p0; - blockData[blockBufferOffset + col + 8] = p1; - blockData[blockBufferOffset + col + 16] = p2; - blockData[blockBufferOffset + col + 24] = p3; - blockData[blockBufferOffset + col + 32] = p4; - blockData[blockBufferOffset + col + 40] = p5; - blockData[blockBufferOffset + col + 48] = p6; - blockData[blockBufferOffset + col + 56] = p7; - } - } - function buildComponentData(frame, component) { - var blocksPerLine = component.blocksPerLine; - var blocksPerColumn = component.blocksPerColumn; - var computationBuffer = new Int16Array(64); - for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { - for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { - var offset = getBlockBufferOffset(component, blockRow, blockCol); - quantizeAndInverse(component, offset, computationBuffer); - } - } - return component.blockData; - } - function clamp0to255(a) { - return a <= 0 ? 0 : a >= 255 ? 255 : a; - } - JpegImage.prototype = { - parse: function parse(data) { - function readUint16() { - var value = data[offset] << 8 | data[offset + 1]; - offset += 2; - return value; - } - function readDataBlock() { - var length = readUint16(); - var array = data.subarray(offset, offset + length - 2); - offset += array.length; - return array; - } - function prepareComponents(frame) { - var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH); - var mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV); - for (var i = 0; i < frame.components.length; i++) { - component = frame.components[i]; - var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / frame.maxH); - var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / frame.maxV); - var blocksPerLineForMcu = mcusPerLine * component.h; - var blocksPerColumnForMcu = mcusPerColumn * component.v; - var blocksBufferSize = 64 * blocksPerColumnForMcu * (blocksPerLineForMcu + 1); - component.blockData = new Int16Array(blocksBufferSize); - component.blocksPerLine = blocksPerLine; - component.blocksPerColumn = blocksPerColumn; - } - frame.mcusPerLine = mcusPerLine; - frame.mcusPerColumn = mcusPerColumn; - } - var offset = 0; - var jfif = null; - var adobe = null; - var frame, resetInterval; - var quantizationTables = []; - var huffmanTablesAC = [], huffmanTablesDC = []; - var fileMarker = readUint16(); - if (fileMarker !== 0xFFD8) { - error('JPEG error: SOI not found'); - } - fileMarker = readUint16(); - while (fileMarker !== 0xFFD9) { - var i, j, l; - switch (fileMarker) { - case 0xFFE0: - case 0xFFE1: - case 0xFFE2: - case 0xFFE3: - case 0xFFE4: - case 0xFFE5: - case 0xFFE6: - case 0xFFE7: - case 0xFFE8: - case 0xFFE9: - case 0xFFEA: - case 0xFFEB: - case 0xFFEC: - case 0xFFED: - case 0xFFEE: - case 0xFFEF: - case 0xFFFE: - var appData = readDataBlock(); - if (fileMarker === 0xFFE0) { - if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 && appData[3] === 0x46 && appData[4] === 0) { - jfif = { - version: { - major: appData[5], - minor: appData[6] - }, - densityUnits: appData[7], - xDensity: appData[8] << 8 | appData[9], - yDensity: appData[10] << 8 | appData[11], - thumbWidth: appData[12], - thumbHeight: appData[13], - thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) - }; - } - } - if (fileMarker === 0xFFEE) { - if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F && appData[3] === 0x62 && appData[4] === 0x65) { - adobe = { - version: appData[5] << 8 | appData[6], - flags0: appData[7] << 8 | appData[8], - flags1: appData[9] << 8 | appData[10], - transformCode: appData[11] - }; - } - } - break; - case 0xFFDB: - var quantizationTablesLength = readUint16(); - var quantizationTablesEnd = quantizationTablesLength + offset - 2; - var z; - while (offset < quantizationTablesEnd) { - var quantizationTableSpec = data[offset++]; - var tableData = new Uint16Array(64); - if (quantizationTableSpec >> 4 === 0) { - for (j = 0; j < 64; j++) { - z = dctZigZag[j]; - tableData[z] = data[offset++]; - } - } else if (quantizationTableSpec >> 4 === 1) { - for (j = 0; j < 64; j++) { - z = dctZigZag[j]; - tableData[z] = readUint16(); - } - } else { - error('JPEG error: DQT - invalid table spec'); - } - quantizationTables[quantizationTableSpec & 15] = tableData; - } - break; - case 0xFFC0: - case 0xFFC1: - case 0xFFC2: - if (frame) { - error('JPEG error: Only single frame JPEGs supported'); - } - readUint16(); - frame = {}; - frame.extended = fileMarker === 0xFFC1; - frame.progressive = fileMarker === 0xFFC2; - frame.precision = data[offset++]; - frame.scanLines = readUint16(); - frame.samplesPerLine = readUint16(); - frame.components = []; - frame.componentIds = {}; - var componentsCount = data[offset++], componentId; - var maxH = 0, maxV = 0; - for (i = 0; i < componentsCount; i++) { - componentId = data[offset]; - var h = data[offset + 1] >> 4; - var v = data[offset + 1] & 15; - if (maxH < h) { - maxH = h; - } - if (maxV < v) { - maxV = v; - } - var qId = data[offset + 2]; - l = frame.components.push({ - h: h, - v: v, - quantizationId: qId, - quantizationTable: null - }); - frame.componentIds[componentId] = l - 1; - offset += 3; - } - frame.maxH = maxH; - frame.maxV = maxV; - prepareComponents(frame); - break; - case 0xFFC4: - var huffmanLength = readUint16(); - for (i = 2; i < huffmanLength;) { - var huffmanTableSpec = data[offset++]; - var codeLengths = new Uint8Array(16); - var codeLengthSum = 0; - for (j = 0; j < 16; j++, offset++) { - codeLengthSum += codeLengths[j] = data[offset]; - } - var huffmanValues = new Uint8Array(codeLengthSum); - for (j = 0; j < codeLengthSum; j++, offset++) { - huffmanValues[j] = data[offset]; - } - i += 17 + codeLengthSum; - (huffmanTableSpec >> 4 === 0 ? huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues); - } - break; - case 0xFFDD: - readUint16(); - resetInterval = readUint16(); - break; - case 0xFFDA: - var scanLength = readUint16(); - var selectorsCount = data[offset++]; - var components = [], component; - for (i = 0; i < selectorsCount; i++) { - var componentIndex = frame.componentIds[data[offset++]]; - component = frame.components[componentIndex]; - var tableSpec = data[offset++]; - component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; - component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; - components.push(component); - } - var spectralStart = data[offset++]; - var spectralEnd = data[offset++]; - var successiveApproximation = data[offset++]; - var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15); - offset += processed; - break; - case 0xFFFF: - if (data[offset] !== 0xFF) { - offset--; - } - break; - default: - if (data[offset - 3] === 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) { - offset -= 3; - break; - } - error('JPEG error: unknown marker ' + fileMarker.toString(16)); - } - fileMarker = readUint16(); - } - this.width = frame.samplesPerLine; - this.height = frame.scanLines; - this.jfif = jfif; - this.adobe = adobe; - this.components = []; - for (i = 0; i < frame.components.length; i++) { - component = frame.components[i]; - var quantizationTable = quantizationTables[component.quantizationId]; - if (quantizationTable) { - component.quantizationTable = quantizationTable; - } - this.components.push({ - output: buildComponentData(frame, component), - scaleX: component.h / frame.maxH, - scaleY: component.v / frame.maxV, - blocksPerLine: component.blocksPerLine, - blocksPerColumn: component.blocksPerColumn - }); - } - this.numComponents = this.components.length; - }, - _getLinearizedBlockData: function getLinearizedBlockData(width, height) { - var scaleX = this.width / width, scaleY = this.height / height; - var component, componentScaleX, componentScaleY, blocksPerScanline; - var x, y, i, j, k; - var index; - var offset = 0; - var output; - var numComponents = this.components.length; - var dataLength = width * height * numComponents; - var data = new Uint8Array(dataLength); - var xScaleBlockOffset = new Uint32Array(width); - var mask3LSB = 0xfffffff8; - for (i = 0; i < numComponents; i++) { - component = this.components[i]; - componentScaleX = component.scaleX * scaleX; - componentScaleY = component.scaleY * scaleY; - offset = i; - output = component.output; - blocksPerScanline = component.blocksPerLine + 1 << 3; - for (x = 0; x < width; x++) { - j = 0 | x * componentScaleX; - xScaleBlockOffset[x] = (j & mask3LSB) << 3 | j & 7; - } - for (y = 0; y < height; y++) { - j = 0 | y * componentScaleY; - index = blocksPerScanline * (j & mask3LSB) | (j & 7) << 3; - for (x = 0; x < width; x++) { - data[offset] = output[index + xScaleBlockOffset[x]]; - offset += numComponents; - } - } - } - var transform = this.decodeTransform; - if (transform) { - for (i = 0; i < dataLength;) { - for (j = 0, k = 0; j < numComponents; j++, i++, k += 2) { - data[i] = (data[i] * transform[k] >> 8) + transform[k + 1]; - } - } - } - return data; - }, - _isColorConversionNeeded: function isColorConversionNeeded() { - if (this.adobe && this.adobe.transformCode) { - return true; - } else if (this.numComponents === 3) { - if (!this.adobe && this.colorTransform === 0) { - return false; - } - return true; - } - if (!this.adobe && this.colorTransform === 1) { - return true; - } - return false; - }, - _convertYccToRgb: function convertYccToRgb(data) { - var Y, Cb, Cr; - for (var i = 0, length = data.length; i < length; i += 3) { - Y = data[i]; - Cb = data[i + 1]; - Cr = data[i + 2]; - data[i] = clamp0to255(Y - 179.456 + 1.402 * Cr); - data[i + 1] = clamp0to255(Y + 135.459 - 0.344 * Cb - 0.714 * Cr); - data[i + 2] = clamp0to255(Y - 226.816 + 1.772 * Cb); - } - return data; - }, - _convertYcckToRgb: function convertYcckToRgb(data) { - var Y, Cb, Cr, k; - var offset = 0; - for (var i = 0, length = data.length; i < length; i += 4) { - Y = data[i]; - Cb = data[i + 1]; - Cr = data[i + 2]; - k = data[i + 3]; - var r = -122.67195406894 + Cb * (-6.60635669420364e-5 * Cb + 0.000437130475926232 * Cr - 5.4080610064599e-5 * Y + 0.00048449797120281 * k - 0.154362151871126) + Cr * (-0.000957964378445773 * Cr + 0.000817076911346625 * Y - 0.00477271405408747 * k + 1.53380253221734) + Y * (0.000961250184130688 * Y - 0.00266257332283933 * k + 0.48357088451265) + k * (-0.000336197177618394 * k + 0.484791561490776); - var g = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665); - var b = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407); - data[offset++] = clamp0to255(r); - data[offset++] = clamp0to255(g); - data[offset++] = clamp0to255(b); - } - return data; - }, - _convertYcckToCmyk: function convertYcckToCmyk(data) { - var Y, Cb, Cr; - for (var i = 0, length = data.length; i < length; i += 4) { - Y = data[i]; - Cb = data[i + 1]; - Cr = data[i + 2]; - data[i] = clamp0to255(434.456 - Y - 1.402 * Cr); - data[i + 1] = clamp0to255(119.541 - Y + 0.344 * Cb + 0.714 * Cr); - data[i + 2] = clamp0to255(481.816 - Y - 1.772 * Cb); - } - return data; - }, - _convertCmykToRgb: function convertCmykToRgb(data) { - var c, m, y, k; - var offset = 0; - var min = -255 * 255 * 255; - var scale = 1 / 255 / 255; - for (var i = 0, length = data.length; i < length; i += 4) { - c = data[i]; - m = data[i + 1]; - y = data[i + 2]; - k = data[i + 3]; - var r = c * (-4.387332384609988 * c + 54.48615194189176 * m + 18.82290502165302 * y + 212.25662451639585 * k - 72734.4411664936) + m * (1.7149763477362134 * m - 5.6096736904047315 * y - 17.873870861415444 * k - 1401.7366389350734) + y * (-2.5217340131683033 * y - 21.248923337353073 * k + 4465.541406466231) - k * (21.86122147463605 * k + 48317.86113160301); - var g = c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k - 20220.756542821975) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 48691.05921601825) + y * (4.444339102852739 * y + 9.8632861493405 * k - 6341.191035517494) - k * (20.737325471181034 * k + 47890.15695978492); - var b = c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k - 3616.812083916688) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 28620.90484698408) + y * (0.03296041114873217 * y + 115.60384449646641 * k - 49363.43385999684) - k * (22.33816807309886 * k + 45932.16563550634); - data[offset++] = r >= 0 ? 255 : r <= min ? 0 : 255 + r * scale | 0; - data[offset++] = g >= 0 ? 255 : g <= min ? 0 : 255 + g * scale | 0; - data[offset++] = b >= 0 ? 255 : b <= min ? 0 : 255 + b * scale | 0; - } - return data; - }, - getData: function getData(width, height, forceRGBoutput) { - if (this.numComponents > 4) { - error('JPEG error: Unsupported color mode'); - } - var data = this._getLinearizedBlockData(width, height); - if (this.numComponents === 1 && forceRGBoutput) { - var dataLength = data.length; - var rgbData = new Uint8Array(dataLength * 3); - var offset = 0; - for (var i = 0; i < dataLength; i++) { - var grayColor = data[i]; - rgbData[offset++] = grayColor; - rgbData[offset++] = grayColor; - rgbData[offset++] = grayColor; - } - return rgbData; - } else if (this.numComponents === 3 && this._isColorConversionNeeded()) { - return this._convertYccToRgb(data); - } else if (this.numComponents === 4) { - if (this._isColorConversionNeeded()) { - if (forceRGBoutput) { - return this._convertYcckToRgb(data); - } - return this._convertYcckToCmyk(data); - } else if (forceRGBoutput) { - return this._convertCmykToRgb(data); - } - } - return data; - } - }; - return JpegImage; - }(); - exports.JpegImage = JpegImage; - })); - (function (root, factory) { - factory(root.pdfjsCoreJpx = {}, root.pdfjsSharedUtil, root.pdfjsCoreArithmeticDecoder); - }(this, function (exports, sharedUtil, coreArithmeticDecoder) { - var info = sharedUtil.info; - var warn = sharedUtil.warn; - var error = sharedUtil.error; - var log2 = sharedUtil.log2; - var readUint16 = sharedUtil.readUint16; - var readUint32 = sharedUtil.readUint32; - var ArithmeticDecoder = coreArithmeticDecoder.ArithmeticDecoder; - var JpxImage = function JpxImageClosure() { - var SubbandsGainLog2 = { - 'LL': 0, - 'LH': 1, - 'HL': 1, - 'HH': 2 - }; - function JpxImage() { - this.failOnCorruptedImage = false; - } - JpxImage.prototype = { - parse: function JpxImage_parse(data) { - var head = readUint16(data, 0); - if (head === 0xFF4F) { - this.parseCodestream(data, 0, data.length); - return; - } - var position = 0, length = data.length; - while (position < length) { - var headerSize = 8; - var lbox = readUint32(data, position); - var tbox = readUint32(data, position + 4); - position += headerSize; - if (lbox === 1) { - lbox = readUint32(data, position) * 4294967296 + readUint32(data, position + 4); - position += 8; - headerSize += 8; - } - if (lbox === 0) { - lbox = length - position + headerSize; - } - if (lbox < headerSize) { - error('JPX Error: Invalid box field size'); - } - var dataLength = lbox - headerSize; - var jumpDataLength = true; - switch (tbox) { - case 0x6A703268: - jumpDataLength = false; - break; - case 0x636F6C72: - var method = data[position]; - if (method === 1) { - var colorspace = readUint32(data, position + 3); - switch (colorspace) { - case 16: - case 17: - case 18: - break; - default: - warn('Unknown colorspace ' + colorspace); - break; - } - } else if (method === 2) { - info('ICC profile not supported'); - } - break; - case 0x6A703263: - this.parseCodestream(data, position, position + dataLength); - break; - case 0x6A502020: - if (0x0d0a870a !== readUint32(data, position)) { - warn('Invalid JP2 signature'); - } - break; - case 0x6A501A1A: - case 0x66747970: - case 0x72726571: - case 0x72657320: - case 0x69686472: - break; - default: - var headerType = String.fromCharCode(tbox >> 24 & 0xFF, tbox >> 16 & 0xFF, tbox >> 8 & 0xFF, tbox & 0xFF); - warn('Unsupported header type ' + tbox + ' (' + headerType + ')'); - break; - } - if (jumpDataLength) { - position += dataLength; - } - } - }, - parseImageProperties: function JpxImage_parseImageProperties(stream) { - var newByte = stream.getByte(); - while (newByte >= 0) { - var oldByte = newByte; - newByte = stream.getByte(); - var code = oldByte << 8 | newByte; - if (code === 0xFF51) { - stream.skip(4); - var Xsiz = stream.getInt32() >>> 0; - var Ysiz = stream.getInt32() >>> 0; - var XOsiz = stream.getInt32() >>> 0; - var YOsiz = stream.getInt32() >>> 0; - stream.skip(16); - var Csiz = stream.getUint16(); - this.width = Xsiz - XOsiz; - this.height = Ysiz - YOsiz; - this.componentsCount = Csiz; - this.bitsPerComponent = 8; - return; - } - } - error('JPX Error: No size marker found in JPX stream'); - }, - parseCodestream: function JpxImage_parseCodestream(data, start, end) { - var context = {}; - var doNotRecover = false; - try { - var position = start; - while (position + 1 < end) { - var code = readUint16(data, position); - position += 2; - var length = 0, j, sqcd, spqcds, spqcdSize, scalarExpounded, tile; - switch (code) { - case 0xFF4F: - context.mainHeader = true; - break; - case 0xFFD9: - break; - case 0xFF51: - length = readUint16(data, position); - var siz = {}; - siz.Xsiz = readUint32(data, position + 4); - siz.Ysiz = readUint32(data, position + 8); - siz.XOsiz = readUint32(data, position + 12); - siz.YOsiz = readUint32(data, position + 16); - siz.XTsiz = readUint32(data, position + 20); - siz.YTsiz = readUint32(data, position + 24); - siz.XTOsiz = readUint32(data, position + 28); - siz.YTOsiz = readUint32(data, position + 32); - var componentsCount = readUint16(data, position + 36); - siz.Csiz = componentsCount; - var components = []; - j = position + 38; - for (var i = 0; i < componentsCount; i++) { - var component = { - precision: (data[j] & 0x7F) + 1, - isSigned: !!(data[j] & 0x80), - XRsiz: data[j + 1], - YRsiz: data[j + 1] - }; - calculateComponentDimensions(component, siz); - components.push(component); - } - context.SIZ = siz; - context.components = components; - calculateTileGrids(context, components); - context.QCC = []; - context.COC = []; - break; - case 0xFF5C: - length = readUint16(data, position); - var qcd = {}; - j = position + 2; - sqcd = data[j++]; - switch (sqcd & 0x1F) { - case 0: - spqcdSize = 8; - scalarExpounded = true; - break; - case 1: - spqcdSize = 16; - scalarExpounded = false; - break; - case 2: - spqcdSize = 16; - scalarExpounded = true; - break; - default: - throw new Error('Invalid SQcd value ' + sqcd); - } - qcd.noQuantization = spqcdSize === 8; - qcd.scalarExpounded = scalarExpounded; - qcd.guardBits = sqcd >> 5; - spqcds = []; - while (j < length + position) { - var spqcd = {}; - if (spqcdSize === 8) { - spqcd.epsilon = data[j++] >> 3; - spqcd.mu = 0; - } else { - spqcd.epsilon = data[j] >> 3; - spqcd.mu = (data[j] & 0x7) << 8 | data[j + 1]; - j += 2; - } - spqcds.push(spqcd); - } - qcd.SPqcds = spqcds; - if (context.mainHeader) { - context.QCD = qcd; - } else { - context.currentTile.QCD = qcd; - context.currentTile.QCC = []; - } - break; - case 0xFF5D: - length = readUint16(data, position); - var qcc = {}; - j = position + 2; - var cqcc; - if (context.SIZ.Csiz < 257) { - cqcc = data[j++]; - } else { - cqcc = readUint16(data, j); - j += 2; - } - sqcd = data[j++]; - switch (sqcd & 0x1F) { - case 0: - spqcdSize = 8; - scalarExpounded = true; - break; - case 1: - spqcdSize = 16; - scalarExpounded = false; - break; - case 2: - spqcdSize = 16; - scalarExpounded = true; - break; - default: - throw new Error('Invalid SQcd value ' + sqcd); - } - qcc.noQuantization = spqcdSize === 8; - qcc.scalarExpounded = scalarExpounded; - qcc.guardBits = sqcd >> 5; - spqcds = []; - while (j < length + position) { - spqcd = {}; - if (spqcdSize === 8) { - spqcd.epsilon = data[j++] >> 3; - spqcd.mu = 0; - } else { - spqcd.epsilon = data[j] >> 3; - spqcd.mu = (data[j] & 0x7) << 8 | data[j + 1]; - j += 2; - } - spqcds.push(spqcd); - } - qcc.SPqcds = spqcds; - if (context.mainHeader) { - context.QCC[cqcc] = qcc; - } else { - context.currentTile.QCC[cqcc] = qcc; - } - break; - case 0xFF52: - length = readUint16(data, position); - var cod = {}; - j = position + 2; - var scod = data[j++]; - cod.entropyCoderWithCustomPrecincts = !!(scod & 1); - cod.sopMarkerUsed = !!(scod & 2); - cod.ephMarkerUsed = !!(scod & 4); - cod.progressionOrder = data[j++]; - cod.layersCount = readUint16(data, j); - j += 2; - cod.multipleComponentTransform = data[j++]; - cod.decompositionLevelsCount = data[j++]; - cod.xcb = (data[j++] & 0xF) + 2; - cod.ycb = (data[j++] & 0xF) + 2; - var blockStyle = data[j++]; - cod.selectiveArithmeticCodingBypass = !!(blockStyle & 1); - cod.resetContextProbabilities = !!(blockStyle & 2); - cod.terminationOnEachCodingPass = !!(blockStyle & 4); - cod.verticalyStripe = !!(blockStyle & 8); - cod.predictableTermination = !!(blockStyle & 16); - cod.segmentationSymbolUsed = !!(blockStyle & 32); - cod.reversibleTransformation = data[j++]; - if (cod.entropyCoderWithCustomPrecincts) { - var precinctsSizes = []; - while (j < length + position) { - var precinctsSize = data[j++]; - precinctsSizes.push({ - PPx: precinctsSize & 0xF, - PPy: precinctsSize >> 4 - }); - } - cod.precinctsSizes = precinctsSizes; - } - var unsupported = []; - if (cod.selectiveArithmeticCodingBypass) { - unsupported.push('selectiveArithmeticCodingBypass'); - } - if (cod.resetContextProbabilities) { - unsupported.push('resetContextProbabilities'); - } - if (cod.terminationOnEachCodingPass) { - unsupported.push('terminationOnEachCodingPass'); - } - if (cod.verticalyStripe) { - unsupported.push('verticalyStripe'); - } - if (cod.predictableTermination) { - unsupported.push('predictableTermination'); - } - if (unsupported.length > 0) { - doNotRecover = true; - throw new Error('Unsupported COD options (' + unsupported.join(', ') + ')'); - } - if (context.mainHeader) { - context.COD = cod; - } else { - context.currentTile.COD = cod; - context.currentTile.COC = []; - } - break; - case 0xFF90: - length = readUint16(data, position); - tile = {}; - tile.index = readUint16(data, position + 2); - tile.length = readUint32(data, position + 4); - tile.dataEnd = tile.length + position - 2; - tile.partIndex = data[position + 8]; - tile.partsCount = data[position + 9]; - context.mainHeader = false; - if (tile.partIndex === 0) { - tile.COD = context.COD; - tile.COC = context.COC.slice(0); - tile.QCD = context.QCD; - tile.QCC = context.QCC.slice(0); - } - context.currentTile = tile; - break; - case 0xFF93: - tile = context.currentTile; - if (tile.partIndex === 0) { - initializeTile(context, tile.index); - buildPackets(context); - } - length = tile.dataEnd - position; - parseTilePackets(context, data, position, length); - break; - case 0xFF55: - case 0xFF57: - case 0xFF58: - case 0xFF64: - length = readUint16(data, position); - break; - case 0xFF53: - throw new Error('Codestream code 0xFF53 (COC) is ' + 'not implemented'); - default: - throw new Error('Unknown codestream code: ' + code.toString(16)); - } - position += length; - } - } catch (e) { - if (doNotRecover || this.failOnCorruptedImage) { - error('JPX Error: ' + e.message); - } else { - warn('JPX: Trying to recover from: ' + e.message); - } - } - this.tiles = transformComponents(context); - this.width = context.SIZ.Xsiz - context.SIZ.XOsiz; - this.height = context.SIZ.Ysiz - context.SIZ.YOsiz; - this.componentsCount = context.SIZ.Csiz; - } - }; - function calculateComponentDimensions(component, siz) { - component.x0 = Math.ceil(siz.XOsiz / component.XRsiz); - component.x1 = Math.ceil(siz.Xsiz / component.XRsiz); - component.y0 = Math.ceil(siz.YOsiz / component.YRsiz); - component.y1 = Math.ceil(siz.Ysiz / component.YRsiz); - component.width = component.x1 - component.x0; - component.height = component.y1 - component.y0; - } - function calculateTileGrids(context, components) { - var siz = context.SIZ; - var tile, tiles = []; - var numXtiles = Math.ceil((siz.Xsiz - siz.XTOsiz) / siz.XTsiz); - var numYtiles = Math.ceil((siz.Ysiz - siz.YTOsiz) / siz.YTsiz); - for (var q = 0; q < numYtiles; q++) { - for (var p = 0; p < numXtiles; p++) { - tile = {}; - tile.tx0 = Math.max(siz.XTOsiz + p * siz.XTsiz, siz.XOsiz); - tile.ty0 = Math.max(siz.YTOsiz + q * siz.YTsiz, siz.YOsiz); - tile.tx1 = Math.min(siz.XTOsiz + (p + 1) * siz.XTsiz, siz.Xsiz); - tile.ty1 = Math.min(siz.YTOsiz + (q + 1) * siz.YTsiz, siz.Ysiz); - tile.width = tile.tx1 - tile.tx0; - tile.height = tile.ty1 - tile.ty0; - tile.components = []; - tiles.push(tile); - } - } - context.tiles = tiles; - var componentsCount = siz.Csiz; - for (var i = 0, ii = componentsCount; i < ii; i++) { - var component = components[i]; - for (var j = 0, jj = tiles.length; j < jj; j++) { - var tileComponent = {}; - tile = tiles[j]; - tileComponent.tcx0 = Math.ceil(tile.tx0 / component.XRsiz); - tileComponent.tcy0 = Math.ceil(tile.ty0 / component.YRsiz); - tileComponent.tcx1 = Math.ceil(tile.tx1 / component.XRsiz); - tileComponent.tcy1 = Math.ceil(tile.ty1 / component.YRsiz); - tileComponent.width = tileComponent.tcx1 - tileComponent.tcx0; - tileComponent.height = tileComponent.tcy1 - tileComponent.tcy0; - tile.components[i] = tileComponent; - } - } - } - function getBlocksDimensions(context, component, r) { - var codOrCoc = component.codingStyleParameters; - var result = {}; - if (!codOrCoc.entropyCoderWithCustomPrecincts) { - result.PPx = 15; - result.PPy = 15; - } else { - result.PPx = codOrCoc.precinctsSizes[r].PPx; - result.PPy = codOrCoc.precinctsSizes[r].PPy; - } - result.xcb_ = r > 0 ? Math.min(codOrCoc.xcb, result.PPx - 1) : Math.min(codOrCoc.xcb, result.PPx); - result.ycb_ = r > 0 ? Math.min(codOrCoc.ycb, result.PPy - 1) : Math.min(codOrCoc.ycb, result.PPy); - return result; - } - function buildPrecincts(context, resolution, dimensions) { - var precinctWidth = 1 << dimensions.PPx; - var precinctHeight = 1 << dimensions.PPy; - var isZeroRes = resolution.resLevel === 0; - var precinctWidthInSubband = 1 << dimensions.PPx + (isZeroRes ? 0 : -1); - var precinctHeightInSubband = 1 << dimensions.PPy + (isZeroRes ? 0 : -1); - var numprecinctswide = resolution.trx1 > resolution.trx0 ? Math.ceil(resolution.trx1 / precinctWidth) - Math.floor(resolution.trx0 / precinctWidth) : 0; - var numprecinctshigh = resolution.try1 > resolution.try0 ? Math.ceil(resolution.try1 / precinctHeight) - Math.floor(resolution.try0 / precinctHeight) : 0; - var numprecincts = numprecinctswide * numprecinctshigh; - resolution.precinctParameters = { - precinctWidth: precinctWidth, - precinctHeight: precinctHeight, - numprecinctswide: numprecinctswide, - numprecinctshigh: numprecinctshigh, - numprecincts: numprecincts, - precinctWidthInSubband: precinctWidthInSubband, - precinctHeightInSubband: precinctHeightInSubband - }; - } - function buildCodeblocks(context, subband, dimensions) { - var xcb_ = dimensions.xcb_; - var ycb_ = dimensions.ycb_; - var codeblockWidth = 1 << xcb_; - var codeblockHeight = 1 << ycb_; - var cbx0 = subband.tbx0 >> xcb_; - var cby0 = subband.tby0 >> ycb_; - var cbx1 = subband.tbx1 + codeblockWidth - 1 >> xcb_; - var cby1 = subband.tby1 + codeblockHeight - 1 >> ycb_; - var precinctParameters = subband.resolution.precinctParameters; - var codeblocks = []; - var precincts = []; - var i, j, codeblock, precinctNumber; - for (j = cby0; j < cby1; j++) { - for (i = cbx0; i < cbx1; i++) { - codeblock = { - cbx: i, - cby: j, - tbx0: codeblockWidth * i, - tby0: codeblockHeight * j, - tbx1: codeblockWidth * (i + 1), - tby1: codeblockHeight * (j + 1) - }; - codeblock.tbx0_ = Math.max(subband.tbx0, codeblock.tbx0); - codeblock.tby0_ = Math.max(subband.tby0, codeblock.tby0); - codeblock.tbx1_ = Math.min(subband.tbx1, codeblock.tbx1); - codeblock.tby1_ = Math.min(subband.tby1, codeblock.tby1); - var pi = Math.floor((codeblock.tbx0_ - subband.tbx0) / precinctParameters.precinctWidthInSubband); - var pj = Math.floor((codeblock.tby0_ - subband.tby0) / precinctParameters.precinctHeightInSubband); - precinctNumber = pi + pj * precinctParameters.numprecinctswide; - codeblock.precinctNumber = precinctNumber; - codeblock.subbandType = subband.type; - codeblock.Lblock = 3; - if (codeblock.tbx1_ <= codeblock.tbx0_ || codeblock.tby1_ <= codeblock.tby0_) { - continue; - } - codeblocks.push(codeblock); - var precinct = precincts[precinctNumber]; - if (precinct !== undefined) { - if (i < precinct.cbxMin) { - precinct.cbxMin = i; - } else if (i > precinct.cbxMax) { - precinct.cbxMax = i; - } - if (j < precinct.cbyMin) { - precinct.cbxMin = j; - } else if (j > precinct.cbyMax) { - precinct.cbyMax = j; - } - } else { - precincts[precinctNumber] = precinct = { - cbxMin: i, - cbyMin: j, - cbxMax: i, - cbyMax: j - }; - } - codeblock.precinct = precinct; - } - } - subband.codeblockParameters = { - codeblockWidth: xcb_, - codeblockHeight: ycb_, - numcodeblockwide: cbx1 - cbx0 + 1, - numcodeblockhigh: cby1 - cby0 + 1 - }; - subband.codeblocks = codeblocks; - subband.precincts = precincts; - } - function createPacket(resolution, precinctNumber, layerNumber) { - var precinctCodeblocks = []; - var subbands = resolution.subbands; - for (var i = 0, ii = subbands.length; i < ii; i++) { - var subband = subbands[i]; - var codeblocks = subband.codeblocks; - for (var j = 0, jj = codeblocks.length; j < jj; j++) { - var codeblock = codeblocks[j]; - if (codeblock.precinctNumber !== precinctNumber) { - continue; - } - precinctCodeblocks.push(codeblock); - } - } - return { - layerNumber: layerNumber, - codeblocks: precinctCodeblocks - }; - } - function LayerResolutionComponentPositionIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var maxDecompositionLevelsCount = 0; - for (var q = 0; q < componentsCount; q++) { - maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, tile.components[q].codingStyleParameters.decompositionLevelsCount); - } - var l = 0, r = 0, i = 0, k = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; l < layersCount; l++) { - for (; r <= maxDecompositionLevelsCount; r++) { - for (; i < componentsCount; i++) { - var component = tile.components[i]; - if (r > component.codingStyleParameters.decompositionLevelsCount) { - continue; - } - var resolution = component.resolutions[r]; - var numprecincts = resolution.precinctParameters.numprecincts; - for (; k < numprecincts;) { - var packet = createPacket(resolution, k, l); - k++; - return packet; - } - k = 0; - } - i = 0; - } - r = 0; - } - error('JPX Error: Out of packets'); - }; - } - function ResolutionLayerComponentPositionIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var maxDecompositionLevelsCount = 0; - for (var q = 0; q < componentsCount; q++) { - maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, tile.components[q].codingStyleParameters.decompositionLevelsCount); - } - var r = 0, l = 0, i = 0, k = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; r <= maxDecompositionLevelsCount; r++) { - for (; l < layersCount; l++) { - for (; i < componentsCount; i++) { - var component = tile.components[i]; - if (r > component.codingStyleParameters.decompositionLevelsCount) { - continue; - } - var resolution = component.resolutions[r]; - var numprecincts = resolution.precinctParameters.numprecincts; - for (; k < numprecincts;) { - var packet = createPacket(resolution, k, l); - k++; - return packet; - } - k = 0; - } - i = 0; - } - l = 0; - } - error('JPX Error: Out of packets'); - }; - } - function ResolutionPositionComponentLayerIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var l, r, c, p; - var maxDecompositionLevelsCount = 0; - for (c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, component.codingStyleParameters.decompositionLevelsCount); - } - var maxNumPrecinctsInLevel = new Int32Array(maxDecompositionLevelsCount + 1); - for (r = 0; r <= maxDecompositionLevelsCount; ++r) { - var maxNumPrecincts = 0; - for (c = 0; c < componentsCount; ++c) { - var resolutions = tile.components[c].resolutions; - if (r < resolutions.length) { - maxNumPrecincts = Math.max(maxNumPrecincts, resolutions[r].precinctParameters.numprecincts); - } - } - maxNumPrecinctsInLevel[r] = maxNumPrecincts; - } - l = 0; - r = 0; - c = 0; - p = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; r <= maxDecompositionLevelsCount; r++) { - for (; p < maxNumPrecinctsInLevel[r]; p++) { - for (; c < componentsCount; c++) { - var component = tile.components[c]; - if (r > component.codingStyleParameters.decompositionLevelsCount) { - continue; - } - var resolution = component.resolutions[r]; - var numprecincts = resolution.precinctParameters.numprecincts; - if (p >= numprecincts) { - continue; - } - for (; l < layersCount;) { - var packet = createPacket(resolution, p, l); - l++; - return packet; - } - l = 0; - } - c = 0; - } - p = 0; - } - error('JPX Error: Out of packets'); - }; - } - function PositionComponentResolutionLayerIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var precinctsSizes = getPrecinctSizesInImageScale(tile); - var precinctsIterationSizes = precinctsSizes; - var l = 0, r = 0, c = 0, px = 0, py = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; py < precinctsIterationSizes.maxNumHigh; py++) { - for (; px < precinctsIterationSizes.maxNumWide; px++) { - for (; c < componentsCount; c++) { - var component = tile.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - for (; r <= decompositionLevelsCount; r++) { - var resolution = component.resolutions[r]; - var sizeInImageScale = precinctsSizes.components[c].resolutions[r]; - var k = getPrecinctIndexIfExist(px, py, sizeInImageScale, precinctsIterationSizes, resolution); - if (k === null) { - continue; - } - for (; l < layersCount;) { - var packet = createPacket(resolution, k, l); - l++; - return packet; - } - l = 0; - } - r = 0; - } - c = 0; - } - px = 0; - } - error('JPX Error: Out of packets'); - }; - } - function ComponentPositionResolutionLayerIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var precinctsSizes = getPrecinctSizesInImageScale(tile); - var l = 0, r = 0, c = 0, px = 0, py = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; c < componentsCount; ++c) { - var component = tile.components[c]; - var precinctsIterationSizes = precinctsSizes.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - for (; py < precinctsIterationSizes.maxNumHigh; py++) { - for (; px < precinctsIterationSizes.maxNumWide; px++) { - for (; r <= decompositionLevelsCount; r++) { - var resolution = component.resolutions[r]; - var sizeInImageScale = precinctsIterationSizes.resolutions[r]; - var k = getPrecinctIndexIfExist(px, py, sizeInImageScale, precinctsIterationSizes, resolution); - if (k === null) { - continue; - } - for (; l < layersCount;) { - var packet = createPacket(resolution, k, l); - l++; - return packet; - } - l = 0; - } - r = 0; - } - px = 0; - } - py = 0; - } - error('JPX Error: Out of packets'); - }; - } - function getPrecinctIndexIfExist(pxIndex, pyIndex, sizeInImageScale, precinctIterationSizes, resolution) { - var posX = pxIndex * precinctIterationSizes.minWidth; - var posY = pyIndex * precinctIterationSizes.minHeight; - if (posX % sizeInImageScale.width !== 0 || posY % sizeInImageScale.height !== 0) { - return null; - } - var startPrecinctRowIndex = posY / sizeInImageScale.width * resolution.precinctParameters.numprecinctswide; - return posX / sizeInImageScale.height + startPrecinctRowIndex; - } - function getPrecinctSizesInImageScale(tile) { - var componentsCount = tile.components.length; - var minWidth = Number.MAX_VALUE; - var minHeight = Number.MAX_VALUE; - var maxNumWide = 0; - var maxNumHigh = 0; - var sizePerComponent = new Array(componentsCount); - for (var c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - var sizePerResolution = new Array(decompositionLevelsCount + 1); - var minWidthCurrentComponent = Number.MAX_VALUE; - var minHeightCurrentComponent = Number.MAX_VALUE; - var maxNumWideCurrentComponent = 0; - var maxNumHighCurrentComponent = 0; - var scale = 1; - for (var r = decompositionLevelsCount; r >= 0; --r) { - var resolution = component.resolutions[r]; - var widthCurrentResolution = scale * resolution.precinctParameters.precinctWidth; - var heightCurrentResolution = scale * resolution.precinctParameters.precinctHeight; - minWidthCurrentComponent = Math.min(minWidthCurrentComponent, widthCurrentResolution); - minHeightCurrentComponent = Math.min(minHeightCurrentComponent, heightCurrentResolution); - maxNumWideCurrentComponent = Math.max(maxNumWideCurrentComponent, resolution.precinctParameters.numprecinctswide); - maxNumHighCurrentComponent = Math.max(maxNumHighCurrentComponent, resolution.precinctParameters.numprecinctshigh); - sizePerResolution[r] = { - width: widthCurrentResolution, - height: heightCurrentResolution - }; - scale <<= 1; - } - minWidth = Math.min(minWidth, minWidthCurrentComponent); - minHeight = Math.min(minHeight, minHeightCurrentComponent); - maxNumWide = Math.max(maxNumWide, maxNumWideCurrentComponent); - maxNumHigh = Math.max(maxNumHigh, maxNumHighCurrentComponent); - sizePerComponent[c] = { - resolutions: sizePerResolution, - minWidth: minWidthCurrentComponent, - minHeight: minHeightCurrentComponent, - maxNumWide: maxNumWideCurrentComponent, - maxNumHigh: maxNumHighCurrentComponent - }; - } - return { - components: sizePerComponent, - minWidth: minWidth, - minHeight: minHeight, - maxNumWide: maxNumWide, - maxNumHigh: maxNumHigh - }; - } - function buildPackets(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var componentsCount = siz.Csiz; - for (var c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - var resolutions = []; - var subbands = []; - for (var r = 0; r <= decompositionLevelsCount; r++) { - var blocksDimensions = getBlocksDimensions(context, component, r); - var resolution = {}; - var scale = 1 << decompositionLevelsCount - r; - resolution.trx0 = Math.ceil(component.tcx0 / scale); - resolution.try0 = Math.ceil(component.tcy0 / scale); - resolution.trx1 = Math.ceil(component.tcx1 / scale); - resolution.try1 = Math.ceil(component.tcy1 / scale); - resolution.resLevel = r; - buildPrecincts(context, resolution, blocksDimensions); - resolutions.push(resolution); - var subband; - if (r === 0) { - subband = {}; - subband.type = 'LL'; - subband.tbx0 = Math.ceil(component.tcx0 / scale); - subband.tby0 = Math.ceil(component.tcy0 / scale); - subband.tbx1 = Math.ceil(component.tcx1 / scale); - subband.tby1 = Math.ceil(component.tcy1 / scale); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolution.subbands = [subband]; - } else { - var bscale = 1 << decompositionLevelsCount - r + 1; - var resolutionSubbands = []; - subband = {}; - subband.type = 'HL'; - subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5); - subband.tby0 = Math.ceil(component.tcy0 / bscale); - subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5); - subband.tby1 = Math.ceil(component.tcy1 / bscale); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolutionSubbands.push(subband); - subband = {}; - subband.type = 'LH'; - subband.tbx0 = Math.ceil(component.tcx0 / bscale); - subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5); - subband.tbx1 = Math.ceil(component.tcx1 / bscale); - subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolutionSubbands.push(subband); - subband = {}; - subband.type = 'HH'; - subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5); - subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5); - subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5); - subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolutionSubbands.push(subband); - resolution.subbands = resolutionSubbands; - } - } - component.resolutions = resolutions; - component.subbands = subbands; - } - var progressionOrder = tile.codingStyleDefaultParameters.progressionOrder; - switch (progressionOrder) { - case 0: - tile.packetsIterator = new LayerResolutionComponentPositionIterator(context); - break; - case 1: - tile.packetsIterator = new ResolutionLayerComponentPositionIterator(context); - break; - case 2: - tile.packetsIterator = new ResolutionPositionComponentLayerIterator(context); - break; - case 3: - tile.packetsIterator = new PositionComponentResolutionLayerIterator(context); - break; - case 4: - tile.packetsIterator = new ComponentPositionResolutionLayerIterator(context); - break; - default: - error('JPX Error: Unsupported progression order ' + progressionOrder); - } - } - function parseTilePackets(context, data, offset, dataLength) { - var position = 0; - var buffer, bufferSize = 0, skipNextBit = false; - function readBits(count) { - while (bufferSize < count) { - var b = data[offset + position]; - position++; - if (skipNextBit) { - buffer = buffer << 7 | b; - bufferSize += 7; - skipNextBit = false; - } else { - buffer = buffer << 8 | b; - bufferSize += 8; - } - if (b === 0xFF) { - skipNextBit = true; - } - } - bufferSize -= count; - return buffer >>> bufferSize & (1 << count) - 1; - } - function skipMarkerIfEqual(value) { - if (data[offset + position - 1] === 0xFF && data[offset + position] === value) { - skipBytes(1); - return true; - } else if (data[offset + position] === 0xFF && data[offset + position + 1] === value) { - skipBytes(2); - return true; - } - return false; - } - function skipBytes(count) { - position += count; - } - function alignToByte() { - bufferSize = 0; - if (skipNextBit) { - position++; - skipNextBit = false; - } - } - function readCodingpasses() { - if (readBits(1) === 0) { - return 1; - } - if (readBits(1) === 0) { - return 2; - } - var value = readBits(2); - if (value < 3) { - return value + 3; - } - value = readBits(5); - if (value < 31) { - return value + 6; - } - value = readBits(7); - return value + 37; - } - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var sopMarkerUsed = context.COD.sopMarkerUsed; - var ephMarkerUsed = context.COD.ephMarkerUsed; - var packetsIterator = tile.packetsIterator; - while (position < dataLength) { - alignToByte(); - if (sopMarkerUsed && skipMarkerIfEqual(0x91)) { - skipBytes(4); - } - var packet = packetsIterator.nextPacket(); - if (!readBits(1)) { - continue; - } - var layerNumber = packet.layerNumber; - var queue = [], codeblock; - for (var i = 0, ii = packet.codeblocks.length; i < ii; i++) { - codeblock = packet.codeblocks[i]; - var precinct = codeblock.precinct; - var codeblockColumn = codeblock.cbx - precinct.cbxMin; - var codeblockRow = codeblock.cby - precinct.cbyMin; - var codeblockIncluded = false; - var firstTimeInclusion = false; - var valueReady; - if (codeblock['included'] !== undefined) { - codeblockIncluded = !!readBits(1); - } else { - precinct = codeblock.precinct; - var inclusionTree, zeroBitPlanesTree; - if (precinct['inclusionTree'] !== undefined) { - inclusionTree = precinct.inclusionTree; - } else { - var width = precinct.cbxMax - precinct.cbxMin + 1; - var height = precinct.cbyMax - precinct.cbyMin + 1; - inclusionTree = new InclusionTree(width, height, layerNumber); - zeroBitPlanesTree = new TagTree(width, height); - precinct.inclusionTree = inclusionTree; - precinct.zeroBitPlanesTree = zeroBitPlanesTree; - } - if (inclusionTree.reset(codeblockColumn, codeblockRow, layerNumber)) { - while (true) { - if (readBits(1)) { - valueReady = !inclusionTree.nextLevel(); - if (valueReady) { - codeblock.included = true; - codeblockIncluded = firstTimeInclusion = true; - break; - } - } else { - inclusionTree.incrementValue(layerNumber); - break; - } - } - } - } - if (!codeblockIncluded) { - continue; - } - if (firstTimeInclusion) { - zeroBitPlanesTree = precinct.zeroBitPlanesTree; - zeroBitPlanesTree.reset(codeblockColumn, codeblockRow); - while (true) { - if (readBits(1)) { - valueReady = !zeroBitPlanesTree.nextLevel(); - if (valueReady) { - break; - } - } else { - zeroBitPlanesTree.incrementValue(); - } - } - codeblock.zeroBitPlanes = zeroBitPlanesTree.value; - } - var codingpasses = readCodingpasses(); - while (readBits(1)) { - codeblock.Lblock++; - } - var codingpassesLog2 = log2(codingpasses); - var bits = (codingpasses < 1 << codingpassesLog2 ? codingpassesLog2 - 1 : codingpassesLog2) + codeblock.Lblock; - var codedDataLength = readBits(bits); - queue.push({ - codeblock: codeblock, - codingpasses: codingpasses, - dataLength: codedDataLength - }); - } - alignToByte(); - if (ephMarkerUsed) { - skipMarkerIfEqual(0x92); - } - while (queue.length > 0) { - var packetItem = queue.shift(); - codeblock = packetItem.codeblock; - if (codeblock['data'] === undefined) { - codeblock.data = []; - } - codeblock.data.push({ - data: data, - start: offset + position, - end: offset + position + packetItem.dataLength, - codingpasses: packetItem.codingpasses - }); - position += packetItem.dataLength; - } - } - return position; - } - function copyCoefficients(coefficients, levelWidth, levelHeight, subband, delta, mb, reversible, segmentationSymbolUsed) { - var x0 = subband.tbx0; - var y0 = subband.tby0; - var width = subband.tbx1 - subband.tbx0; - var codeblocks = subband.codeblocks; - var right = subband.type.charAt(0) === 'H' ? 1 : 0; - var bottom = subband.type.charAt(1) === 'H' ? levelWidth : 0; - for (var i = 0, ii = codeblocks.length; i < ii; ++i) { - var codeblock = codeblocks[i]; - var blockWidth = codeblock.tbx1_ - codeblock.tbx0_; - var blockHeight = codeblock.tby1_ - codeblock.tby0_; - if (blockWidth === 0 || blockHeight === 0) { - continue; - } - if (codeblock['data'] === undefined) { - continue; - } - var bitModel, currentCodingpassType; - bitModel = new BitModel(blockWidth, blockHeight, codeblock.subbandType, codeblock.zeroBitPlanes, mb); - currentCodingpassType = 2; - var data = codeblock.data, totalLength = 0, codingpasses = 0; - var j, jj, dataItem; - for (j = 0, jj = data.length; j < jj; j++) { - dataItem = data[j]; - totalLength += dataItem.end - dataItem.start; - codingpasses += dataItem.codingpasses; - } - var encodedData = new Uint8Array(totalLength); - var position = 0; - for (j = 0, jj = data.length; j < jj; j++) { - dataItem = data[j]; - var chunk = dataItem.data.subarray(dataItem.start, dataItem.end); - encodedData.set(chunk, position); - position += chunk.length; - } - var decoder = new ArithmeticDecoder(encodedData, 0, totalLength); - bitModel.setDecoder(decoder); - for (j = 0; j < codingpasses; j++) { - switch (currentCodingpassType) { - case 0: - bitModel.runSignificancePropagationPass(); - break; - case 1: - bitModel.runMagnitudeRefinementPass(); - break; - case 2: - bitModel.runCleanupPass(); - if (segmentationSymbolUsed) { - bitModel.checkSegmentationSymbol(); - } - break; - } - currentCodingpassType = (currentCodingpassType + 1) % 3; - } - var offset = codeblock.tbx0_ - x0 + (codeblock.tby0_ - y0) * width; - var sign = bitModel.coefficentsSign; - var magnitude = bitModel.coefficentsMagnitude; - var bitsDecoded = bitModel.bitsDecoded; - var magnitudeCorrection = reversible ? 0 : 0.5; - var k, n, nb; - position = 0; - var interleave = subband.type !== 'LL'; - for (j = 0; j < blockHeight; j++) { - var row = offset / width | 0; - var levelOffset = 2 * row * (levelWidth - width) + right + bottom; - for (k = 0; k < blockWidth; k++) { - n = magnitude[position]; - if (n !== 0) { - n = (n + magnitudeCorrection) * delta; - if (sign[position] !== 0) { - n = -n; - } - nb = bitsDecoded[position]; - var pos = interleave ? levelOffset + (offset << 1) : offset; - if (reversible && nb >= mb) { - coefficients[pos] = n; - } else { - coefficients[pos] = n * (1 << mb - nb); - } - } - offset++; - position++; - } - offset += width - blockWidth; - } - } - } - function transformTile(context, tile, c) { - var component = tile.components[c]; - var codingStyleParameters = component.codingStyleParameters; - var quantizationParameters = component.quantizationParameters; - var decompositionLevelsCount = codingStyleParameters.decompositionLevelsCount; - var spqcds = quantizationParameters.SPqcds; - var scalarExpounded = quantizationParameters.scalarExpounded; - var guardBits = quantizationParameters.guardBits; - var segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed; - var precision = context.components[c].precision; - var reversible = codingStyleParameters.reversibleTransformation; - var transform = reversible ? new ReversibleTransform() : new IrreversibleTransform(); - var subbandCoefficients = []; - var b = 0; - for (var i = 0; i <= decompositionLevelsCount; i++) { - var resolution = component.resolutions[i]; - var width = resolution.trx1 - resolution.trx0; - var height = resolution.try1 - resolution.try0; - var coefficients = new Float32Array(width * height); - for (var j = 0, jj = resolution.subbands.length; j < jj; j++) { - var mu, epsilon; - if (!scalarExpounded) { - mu = spqcds[0].mu; - epsilon = spqcds[0].epsilon + (i > 0 ? 1 - i : 0); - } else { - mu = spqcds[b].mu; - epsilon = spqcds[b].epsilon; - b++; - } - var subband = resolution.subbands[j]; - var gainLog2 = SubbandsGainLog2[subband.type]; - var delta = reversible ? 1 : Math.pow(2, precision + gainLog2 - epsilon) * (1 + mu / 2048); - var mb = guardBits + epsilon - 1; - copyCoefficients(coefficients, width, height, subband, delta, mb, reversible, segmentationSymbolUsed); - } - subbandCoefficients.push({ - width: width, - height: height, - items: coefficients - }); - } - var result = transform.calculate(subbandCoefficients, component.tcx0, component.tcy0); - return { - left: component.tcx0, - top: component.tcy0, - width: result.width, - height: result.height, - items: result.items - }; - } - function transformComponents(context) { - var siz = context.SIZ; - var components = context.components; - var componentsCount = siz.Csiz; - var resultImages = []; - for (var i = 0, ii = context.tiles.length; i < ii; i++) { - var tile = context.tiles[i]; - var transformedTiles = []; - var c; - for (c = 0; c < componentsCount; c++) { - transformedTiles[c] = transformTile(context, tile, c); - } - var tile0 = transformedTiles[0]; - var out = new Uint8Array(tile0.items.length * componentsCount); - var result = { - left: tile0.left, - top: tile0.top, - width: tile0.width, - height: tile0.height, - items: out - }; - var shift, offset, max, min, maxK; - var pos = 0, j, jj, y0, y1, y2, r, g, b, k, val; - if (tile.codingStyleDefaultParameters.multipleComponentTransform) { - var fourComponents = componentsCount === 4; - var y0items = transformedTiles[0].items; - var y1items = transformedTiles[1].items; - var y2items = transformedTiles[2].items; - var y3items = fourComponents ? transformedTiles[3].items : null; - shift = components[0].precision - 8; - offset = (128 << shift) + 0.5; - max = 255 * (1 << shift); - maxK = max * 0.5; - min = -maxK; - var component0 = tile.components[0]; - var alpha01 = componentsCount - 3; - jj = y0items.length; - if (!component0.codingStyleParameters.reversibleTransformation) { - for (j = 0; j < jj; j++, pos += alpha01) { - y0 = y0items[j] + offset; - y1 = y1items[j]; - y2 = y2items[j]; - r = y0 + 1.402 * y2; - g = y0 - 0.34413 * y1 - 0.71414 * y2; - b = y0 + 1.772 * y1; - out[pos++] = r <= 0 ? 0 : r >= max ? 255 : r >> shift; - out[pos++] = g <= 0 ? 0 : g >= max ? 255 : g >> shift; - out[pos++] = b <= 0 ? 0 : b >= max ? 255 : b >> shift; - } - } else { - for (j = 0; j < jj; j++, pos += alpha01) { - y0 = y0items[j] + offset; - y1 = y1items[j]; - y2 = y2items[j]; - g = y0 - (y2 + y1 >> 2); - r = g + y2; - b = g + y1; - out[pos++] = r <= 0 ? 0 : r >= max ? 255 : r >> shift; - out[pos++] = g <= 0 ? 0 : g >= max ? 255 : g >> shift; - out[pos++] = b <= 0 ? 0 : b >= max ? 255 : b >> shift; - } - } - if (fourComponents) { - for (j = 0, pos = 3; j < jj; j++, pos += 4) { - k = y3items[j]; - out[pos] = k <= min ? 0 : k >= maxK ? 255 : k + offset >> shift; - } - } - } else { - for (c = 0; c < componentsCount; c++) { - var items = transformedTiles[c].items; - shift = components[c].precision - 8; - offset = (128 << shift) + 0.5; - max = 127.5 * (1 << shift); - min = -max; - for (pos = c, j = 0, jj = items.length; j < jj; j++) { - val = items[j]; - out[pos] = val <= min ? 0 : val >= max ? 255 : val + offset >> shift; - pos += componentsCount; - } - } - } - resultImages.push(result); - } - return resultImages; - } - function initializeTile(context, tileIndex) { - var siz = context.SIZ; - var componentsCount = siz.Csiz; - var tile = context.tiles[tileIndex]; - for (var c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - var qcdOrQcc = context.currentTile.QCC[c] !== undefined ? context.currentTile.QCC[c] : context.currentTile.QCD; - component.quantizationParameters = qcdOrQcc; - var codOrCoc = context.currentTile.COC[c] !== undefined ? context.currentTile.COC[c] : context.currentTile.COD; - component.codingStyleParameters = codOrCoc; - } - tile.codingStyleDefaultParameters = context.currentTile.COD; - } - var TagTree = function TagTreeClosure() { - function TagTree(width, height) { - var levelsLength = log2(Math.max(width, height)) + 1; - this.levels = []; - for (var i = 0; i < levelsLength; i++) { - var level = { - width: width, - height: height, - items: [] - }; - this.levels.push(level); - width = Math.ceil(width / 2); - height = Math.ceil(height / 2); - } - } - TagTree.prototype = { - reset: function TagTree_reset(i, j) { - var currentLevel = 0, value = 0, level; - while (currentLevel < this.levels.length) { - level = this.levels[currentLevel]; - var index = i + j * level.width; - if (level.items[index] !== undefined) { - value = level.items[index]; - break; - } - level.index = index; - i >>= 1; - j >>= 1; - currentLevel++; - } - currentLevel--; - level = this.levels[currentLevel]; - level.items[level.index] = value; - this.currentLevel = currentLevel; - delete this.value; - }, - incrementValue: function TagTree_incrementValue() { - var level = this.levels[this.currentLevel]; - level.items[level.index]++; - }, - nextLevel: function TagTree_nextLevel() { - var currentLevel = this.currentLevel; - var level = this.levels[currentLevel]; - var value = level.items[level.index]; - currentLevel--; - if (currentLevel < 0) { - this.value = value; - return false; - } - this.currentLevel = currentLevel; - level = this.levels[currentLevel]; - level.items[level.index] = value; - return true; - } - }; - return TagTree; - }(); - var InclusionTree = function InclusionTreeClosure() { - function InclusionTree(width, height, defaultValue) { - var levelsLength = log2(Math.max(width, height)) + 1; - this.levels = []; - for (var i = 0; i < levelsLength; i++) { - var items = new Uint8Array(width * height); - for (var j = 0, jj = items.length; j < jj; j++) { - items[j] = defaultValue; - } - var level = { - width: width, - height: height, - items: items - }; - this.levels.push(level); - width = Math.ceil(width / 2); - height = Math.ceil(height / 2); - } - } - InclusionTree.prototype = { - reset: function InclusionTree_reset(i, j, stopValue) { - var currentLevel = 0; - while (currentLevel < this.levels.length) { - var level = this.levels[currentLevel]; - var index = i + j * level.width; - level.index = index; - var value = level.items[index]; - if (value === 0xFF) { - break; - } - if (value > stopValue) { - this.currentLevel = currentLevel; - this.propagateValues(); - return false; - } - i >>= 1; - j >>= 1; - currentLevel++; - } - this.currentLevel = currentLevel - 1; - return true; - }, - incrementValue: function InclusionTree_incrementValue(stopValue) { - var level = this.levels[this.currentLevel]; - level.items[level.index] = stopValue + 1; - this.propagateValues(); - }, - propagateValues: function InclusionTree_propagateValues() { - var levelIndex = this.currentLevel; - var level = this.levels[levelIndex]; - var currentValue = level.items[level.index]; - while (--levelIndex >= 0) { - level = this.levels[levelIndex]; - level.items[level.index] = currentValue; - } - }, - nextLevel: function InclusionTree_nextLevel() { - var currentLevel = this.currentLevel; - var level = this.levels[currentLevel]; - var value = level.items[level.index]; - level.items[level.index] = 0xFF; - currentLevel--; - if (currentLevel < 0) { - return false; - } - this.currentLevel = currentLevel; - level = this.levels[currentLevel]; - level.items[level.index] = value; - return true; - } - }; - return InclusionTree; - }(); - var BitModel = function BitModelClosure() { - var UNIFORM_CONTEXT = 17; - var RUNLENGTH_CONTEXT = 18; - var LLAndLHContextsLabel = new Uint8Array([ - 0, - 5, - 8, - 0, - 3, - 7, - 8, - 0, - 4, - 7, - 8, - 0, - 0, - 0, - 0, - 0, - 1, - 6, - 8, - 0, - 3, - 7, - 8, - 0, - 4, - 7, - 8, - 0, - 0, - 0, - 0, - 0, - 2, - 6, - 8, - 0, - 3, - 7, - 8, - 0, - 4, - 7, - 8, - 0, - 0, - 0, - 0, - 0, - 2, - 6, - 8, - 0, - 3, - 7, - 8, - 0, - 4, - 7, - 8, - 0, - 0, - 0, - 0, - 0, - 2, - 6, - 8, - 0, - 3, - 7, - 8, - 0, - 4, - 7, - 8 - ]); - var HLContextLabel = new Uint8Array([ - 0, - 3, - 4, - 0, - 5, - 7, - 7, - 0, - 8, - 8, - 8, - 0, - 0, - 0, - 0, - 0, - 1, - 3, - 4, - 0, - 6, - 7, - 7, - 0, - 8, - 8, - 8, - 0, - 0, - 0, - 0, - 0, - 2, - 3, - 4, - 0, - 6, - 7, - 7, - 0, - 8, - 8, - 8, - 0, - 0, - 0, - 0, - 0, - 2, - 3, - 4, - 0, - 6, - 7, - 7, - 0, - 8, - 8, - 8, - 0, - 0, - 0, - 0, - 0, - 2, - 3, - 4, - 0, - 6, - 7, - 7, - 0, - 8, - 8, - 8 - ]); - var HHContextLabel = new Uint8Array([ - 0, - 1, - 2, - 0, - 1, - 2, - 2, - 0, - 2, - 2, - 2, - 0, - 0, - 0, - 0, - 0, - 3, - 4, - 5, - 0, - 4, - 5, - 5, - 0, - 5, - 5, - 5, - 0, - 0, - 0, - 0, - 0, - 6, - 7, - 7, - 0, - 7, - 7, - 7, - 0, - 7, - 7, - 7, - 0, - 0, - 0, - 0, - 0, - 8, - 8, - 8, - 0, - 8, - 8, - 8, - 0, - 8, - 8, - 8, - 0, - 0, - 0, - 0, - 0, - 8, - 8, - 8, - 0, - 8, - 8, - 8, - 0, - 8, - 8, - 8 - ]); - function BitModel(width, height, subband, zeroBitPlanes, mb) { - this.width = width; - this.height = height; - this.contextLabelTable = subband === 'HH' ? HHContextLabel : subband === 'HL' ? HLContextLabel : LLAndLHContextsLabel; - var coefficientCount = width * height; - this.neighborsSignificance = new Uint8Array(coefficientCount); - this.coefficentsSign = new Uint8Array(coefficientCount); - this.coefficentsMagnitude = mb > 14 ? new Uint32Array(coefficientCount) : mb > 6 ? new Uint16Array(coefficientCount) : new Uint8Array(coefficientCount); - this.processingFlags = new Uint8Array(coefficientCount); - var bitsDecoded = new Uint8Array(coefficientCount); - if (zeroBitPlanes !== 0) { - for (var i = 0; i < coefficientCount; i++) { - bitsDecoded[i] = zeroBitPlanes; - } - } - this.bitsDecoded = bitsDecoded; - this.reset(); - } - BitModel.prototype = { - setDecoder: function BitModel_setDecoder(decoder) { - this.decoder = decoder; - }, - reset: function BitModel_reset() { - this.contexts = new Int8Array(19); - this.contexts[0] = 4 << 1 | 0; - this.contexts[UNIFORM_CONTEXT] = 46 << 1 | 0; - this.contexts[RUNLENGTH_CONTEXT] = 3 << 1 | 0; - }, - setNeighborsSignificance: function BitModel_setNeighborsSignificance(row, column, index) { - var neighborsSignificance = this.neighborsSignificance; - var width = this.width, height = this.height; - var left = column > 0; - var right = column + 1 < width; - var i; - if (row > 0) { - i = index - width; - if (left) { - neighborsSignificance[i - 1] += 0x10; - } - if (right) { - neighborsSignificance[i + 1] += 0x10; - } - neighborsSignificance[i] += 0x04; - } - if (row + 1 < height) { - i = index + width; - if (left) { - neighborsSignificance[i - 1] += 0x10; - } - if (right) { - neighborsSignificance[i + 1] += 0x10; - } - neighborsSignificance[i] += 0x04; - } - if (left) { - neighborsSignificance[index - 1] += 0x01; - } - if (right) { - neighborsSignificance[index + 1] += 0x01; - } - neighborsSignificance[index] |= 0x80; - }, - runSignificancePropagationPass: function BitModel_runSignificancePropagationPass() { - var decoder = this.decoder; - var width = this.width, height = this.height; - var coefficentsMagnitude = this.coefficentsMagnitude; - var coefficentsSign = this.coefficentsSign; - var neighborsSignificance = this.neighborsSignificance; - var processingFlags = this.processingFlags; - var contexts = this.contexts; - var labels = this.contextLabelTable; - var bitsDecoded = this.bitsDecoded; - var processedInverseMask = ~1; - var processedMask = 1; - var firstMagnitudeBitMask = 2; - for (var i0 = 0; i0 < height; i0 += 4) { - for (var j = 0; j < width; j++) { - var index = i0 * width + j; - for (var i1 = 0; i1 < 4; i1++, index += width) { - var i = i0 + i1; - if (i >= height) { - break; - } - processingFlags[index] &= processedInverseMask; - if (coefficentsMagnitude[index] || !neighborsSignificance[index]) { - continue; - } - var contextLabel = labels[neighborsSignificance[index]]; - var decision = decoder.readBit(contexts, contextLabel); - if (decision) { - var sign = this.decodeSignBit(i, j, index); - coefficentsSign[index] = sign; - coefficentsMagnitude[index] = 1; - this.setNeighborsSignificance(i, j, index); - processingFlags[index] |= firstMagnitudeBitMask; - } - bitsDecoded[index]++; - processingFlags[index] |= processedMask; - } - } - } - }, - decodeSignBit: function BitModel_decodeSignBit(row, column, index) { - var width = this.width, height = this.height; - var coefficentsMagnitude = this.coefficentsMagnitude; - var coefficentsSign = this.coefficentsSign; - var contribution, sign0, sign1, significance1; - var contextLabel, decoded; - significance1 = column > 0 && coefficentsMagnitude[index - 1] !== 0; - if (column + 1 < width && coefficentsMagnitude[index + 1] !== 0) { - sign1 = coefficentsSign[index + 1]; - if (significance1) { - sign0 = coefficentsSign[index - 1]; - contribution = 1 - sign1 - sign0; - } else { - contribution = 1 - sign1 - sign1; - } - } else if (significance1) { - sign0 = coefficentsSign[index - 1]; - contribution = 1 - sign0 - sign0; - } else { - contribution = 0; - } - var horizontalContribution = 3 * contribution; - significance1 = row > 0 && coefficentsMagnitude[index - width] !== 0; - if (row + 1 < height && coefficentsMagnitude[index + width] !== 0) { - sign1 = coefficentsSign[index + width]; - if (significance1) { - sign0 = coefficentsSign[index - width]; - contribution = 1 - sign1 - sign0 + horizontalContribution; - } else { - contribution = 1 - sign1 - sign1 + horizontalContribution; - } - } else if (significance1) { - sign0 = coefficentsSign[index - width]; - contribution = 1 - sign0 - sign0 + horizontalContribution; - } else { - contribution = horizontalContribution; - } - if (contribution >= 0) { - contextLabel = 9 + contribution; - decoded = this.decoder.readBit(this.contexts, contextLabel); - } else { - contextLabel = 9 - contribution; - decoded = this.decoder.readBit(this.contexts, contextLabel) ^ 1; - } - return decoded; - }, - runMagnitudeRefinementPass: function BitModel_runMagnitudeRefinementPass() { - var decoder = this.decoder; - var width = this.width, height = this.height; - var coefficentsMagnitude = this.coefficentsMagnitude; - var neighborsSignificance = this.neighborsSignificance; - var contexts = this.contexts; - var bitsDecoded = this.bitsDecoded; - var processingFlags = this.processingFlags; - var processedMask = 1; - var firstMagnitudeBitMask = 2; - var length = width * height; - var width4 = width * 4; - for (var index0 = 0, indexNext; index0 < length; index0 = indexNext) { - indexNext = Math.min(length, index0 + width4); - for (var j = 0; j < width; j++) { - for (var index = index0 + j; index < indexNext; index += width) { - if (!coefficentsMagnitude[index] || (processingFlags[index] & processedMask) !== 0) { - continue; - } - var contextLabel = 16; - if ((processingFlags[index] & firstMagnitudeBitMask) !== 0) { - processingFlags[index] ^= firstMagnitudeBitMask; - var significance = neighborsSignificance[index] & 127; - contextLabel = significance === 0 ? 15 : 14; - } - var bit = decoder.readBit(contexts, contextLabel); - coefficentsMagnitude[index] = coefficentsMagnitude[index] << 1 | bit; - bitsDecoded[index]++; - processingFlags[index] |= processedMask; - } - } - } - }, - runCleanupPass: function BitModel_runCleanupPass() { - var decoder = this.decoder; - var width = this.width, height = this.height; - var neighborsSignificance = this.neighborsSignificance; - var coefficentsMagnitude = this.coefficentsMagnitude; - var coefficentsSign = this.coefficentsSign; - var contexts = this.contexts; - var labels = this.contextLabelTable; - var bitsDecoded = this.bitsDecoded; - var processingFlags = this.processingFlags; - var processedMask = 1; - var firstMagnitudeBitMask = 2; - var oneRowDown = width; - var twoRowsDown = width * 2; - var threeRowsDown = width * 3; - var iNext; - for (var i0 = 0; i0 < height; i0 = iNext) { - iNext = Math.min(i0 + 4, height); - var indexBase = i0 * width; - var checkAllEmpty = i0 + 3 < height; - for (var j = 0; j < width; j++) { - var index0 = indexBase + j; - var allEmpty = checkAllEmpty && processingFlags[index0] === 0 && processingFlags[index0 + oneRowDown] === 0 && processingFlags[index0 + twoRowsDown] === 0 && processingFlags[index0 + threeRowsDown] === 0 && neighborsSignificance[index0] === 0 && neighborsSignificance[index0 + oneRowDown] === 0 && neighborsSignificance[index0 + twoRowsDown] === 0 && neighborsSignificance[index0 + threeRowsDown] === 0; - var i1 = 0, index = index0; - var i = i0, sign; - if (allEmpty) { - var hasSignificantCoefficent = decoder.readBit(contexts, RUNLENGTH_CONTEXT); - if (!hasSignificantCoefficent) { - bitsDecoded[index0]++; - bitsDecoded[index0 + oneRowDown]++; - bitsDecoded[index0 + twoRowsDown]++; - bitsDecoded[index0 + threeRowsDown]++; - continue; - } - i1 = decoder.readBit(contexts, UNIFORM_CONTEXT) << 1 | decoder.readBit(contexts, UNIFORM_CONTEXT); - if (i1 !== 0) { - i = i0 + i1; - index += i1 * width; - } - sign = this.decodeSignBit(i, j, index); - coefficentsSign[index] = sign; - coefficentsMagnitude[index] = 1; - this.setNeighborsSignificance(i, j, index); - processingFlags[index] |= firstMagnitudeBitMask; - index = index0; - for (var i2 = i0; i2 <= i; i2++, index += width) { - bitsDecoded[index]++; - } - i1++; - } - for (i = i0 + i1; i < iNext; i++, index += width) { - if (coefficentsMagnitude[index] || (processingFlags[index] & processedMask) !== 0) { - continue; - } - var contextLabel = labels[neighborsSignificance[index]]; - var decision = decoder.readBit(contexts, contextLabel); - if (decision === 1) { - sign = this.decodeSignBit(i, j, index); - coefficentsSign[index] = sign; - coefficentsMagnitude[index] = 1; - this.setNeighborsSignificance(i, j, index); - processingFlags[index] |= firstMagnitudeBitMask; - } - bitsDecoded[index]++; - } - } - } - }, - checkSegmentationSymbol: function BitModel_checkSegmentationSymbol() { - var decoder = this.decoder; - var contexts = this.contexts; - var symbol = decoder.readBit(contexts, UNIFORM_CONTEXT) << 3 | decoder.readBit(contexts, UNIFORM_CONTEXT) << 2 | decoder.readBit(contexts, UNIFORM_CONTEXT) << 1 | decoder.readBit(contexts, UNIFORM_CONTEXT); - if (symbol !== 0xA) { - error('JPX Error: Invalid segmentation symbol'); - } - } - }; - return BitModel; - }(); - var Transform = function TransformClosure() { - function Transform() { - } - Transform.prototype.calculate = function transformCalculate(subbands, u0, v0) { - var ll = subbands[0]; - for (var i = 1, ii = subbands.length; i < ii; i++) { - ll = this.iterate(ll, subbands[i], u0, v0); - } - return ll; - }; - Transform.prototype.extend = function extend(buffer, offset, size) { - var i1 = offset - 1, j1 = offset + 1; - var i2 = offset + size - 2, j2 = offset + size; - buffer[i1--] = buffer[j1++]; - buffer[j2++] = buffer[i2--]; - buffer[i1--] = buffer[j1++]; - buffer[j2++] = buffer[i2--]; - buffer[i1--] = buffer[j1++]; - buffer[j2++] = buffer[i2--]; - buffer[i1] = buffer[j1]; - buffer[j2] = buffer[i2]; - }; - Transform.prototype.iterate = function Transform_iterate(ll, hl_lh_hh, u0, v0) { - var llWidth = ll.width, llHeight = ll.height, llItems = ll.items; - var width = hl_lh_hh.width; - var height = hl_lh_hh.height; - var items = hl_lh_hh.items; - var i, j, k, l, u, v; - for (k = 0, i = 0; i < llHeight; i++) { - l = i * 2 * width; - for (j = 0; j < llWidth; j++, k++, l += 2) { - items[l] = llItems[k]; - } - } - llItems = ll.items = null; - var bufferPadding = 4; - var rowBuffer = new Float32Array(width + 2 * bufferPadding); - if (width === 1) { - if ((u0 & 1) !== 0) { - for (v = 0, k = 0; v < height; v++, k += width) { - items[k] *= 0.5; - } - } - } else { - for (v = 0, k = 0; v < height; v++, k += width) { - rowBuffer.set(items.subarray(k, k + width), bufferPadding); - this.extend(rowBuffer, bufferPadding, width); - this.filter(rowBuffer, bufferPadding, width); - items.set(rowBuffer.subarray(bufferPadding, bufferPadding + width), k); - } - } - var numBuffers = 16; - var colBuffers = []; - for (i = 0; i < numBuffers; i++) { - colBuffers.push(new Float32Array(height + 2 * bufferPadding)); - } - var b, currentBuffer = 0; - ll = bufferPadding + height; - if (height === 1) { - if ((v0 & 1) !== 0) { - for (u = 0; u < width; u++) { - items[u] *= 0.5; - } - } - } else { - for (u = 0; u < width; u++) { - if (currentBuffer === 0) { - numBuffers = Math.min(width - u, numBuffers); - for (k = u, l = bufferPadding; l < ll; k += width, l++) { - for (b = 0; b < numBuffers; b++) { - colBuffers[b][l] = items[k + b]; - } - } - currentBuffer = numBuffers; - } - currentBuffer--; - var buffer = colBuffers[currentBuffer]; - this.extend(buffer, bufferPadding, height); - this.filter(buffer, bufferPadding, height); - if (currentBuffer === 0) { - k = u - numBuffers + 1; - for (l = bufferPadding; l < ll; k += width, l++) { - for (b = 0; b < numBuffers; b++) { - items[k + b] = colBuffers[b][l]; - } - } - } - } - } - return { - width: width, - height: height, - items: items - }; - }; - return Transform; - }(); - var IrreversibleTransform = function IrreversibleTransformClosure() { - function IrreversibleTransform() { - Transform.call(this); - } - IrreversibleTransform.prototype = Object.create(Transform.prototype); - IrreversibleTransform.prototype.filter = function irreversibleTransformFilter(x, offset, length) { - var len = length >> 1; - offset = offset | 0; - var j, n, current, next; - var alpha = -1.586134342059924; - var beta = -0.052980118572961; - var gamma = 0.882911075530934; - var delta = 0.443506852043971; - var K = 1.230174104914001; - var K_ = 1 / K; - j = offset - 3; - for (n = len + 4; n--; j += 2) { - x[j] *= K_; - } - j = offset - 2; - current = delta * x[j - 1]; - for (n = len + 3; n--; j += 2) { - next = delta * x[j + 1]; - x[j] = K * x[j] - current - next; - if (n--) { - j += 2; - current = delta * x[j + 1]; - x[j] = K * x[j] - current - next; - } else { - break; - } - } - j = offset - 1; - current = gamma * x[j - 1]; - for (n = len + 2; n--; j += 2) { - next = gamma * x[j + 1]; - x[j] -= current + next; - if (n--) { - j += 2; - current = gamma * x[j + 1]; - x[j] -= current + next; - } else { - break; - } - } - j = offset; - current = beta * x[j - 1]; - for (n = len + 1; n--; j += 2) { - next = beta * x[j + 1]; - x[j] -= current + next; - if (n--) { - j += 2; - current = beta * x[j + 1]; - x[j] -= current + next; - } else { - break; - } - } - if (len !== 0) { - j = offset + 1; - current = alpha * x[j - 1]; - for (n = len; n--; j += 2) { - next = alpha * x[j + 1]; - x[j] -= current + next; - if (n--) { - j += 2; - current = alpha * x[j + 1]; - x[j] -= current + next; - } else { - break; - } - } - } - }; - return IrreversibleTransform; - }(); - var ReversibleTransform = function ReversibleTransformClosure() { - function ReversibleTransform() { - Transform.call(this); - } - ReversibleTransform.prototype = Object.create(Transform.prototype); - ReversibleTransform.prototype.filter = function reversibleTransformFilter(x, offset, length) { - var len = length >> 1; - offset = offset | 0; - var j, n; - for (j = offset, n = len + 1; n--; j += 2) { - x[j] -= x[j - 1] + x[j + 1] + 2 >> 2; - } - for (j = offset + 1, n = len; n--; j += 2) { - x[j] += x[j - 1] + x[j + 1] >> 1; - } - }; - return ReversibleTransform; - }(); - return JpxImage; - }(); - exports.JpxImage = JpxImage; - })); - (function (root, factory) { - factory(root.pdfjsCoreMetrics = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var getLookupTableFactory = sharedUtil.getLookupTableFactory; - var getMetrics = getLookupTableFactory(function (t) { - t['Courier'] = 600; - t['Courier-Bold'] = 600; - t['Courier-BoldOblique'] = 600; - t['Courier-Oblique'] = 600; - t['Helvetica'] = getLookupTableFactory(function (t) { - t['space'] = 278; - t['exclam'] = 278; - t['quotedbl'] = 355; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 667; - t['quoteright'] = 222; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 556; - t['at'] = 1015; - t['A'] = 667; - t['B'] = 667; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 500; - t['K'] = 667; - t['L'] = 556; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 278; - t['backslash'] = 278; - t['bracketright'] = 278; - t['asciicircum'] = 469; - t['underscore'] = 556; - t['quoteleft'] = 222; - t['a'] = 556; - t['b'] = 556; - t['c'] = 500; - t['d'] = 556; - t['e'] = 556; - t['f'] = 278; - t['g'] = 556; - t['h'] = 556; - t['i'] = 222; - t['j'] = 222; - t['k'] = 500; - t['l'] = 222; - t['m'] = 833; - t['n'] = 556; - t['o'] = 556; - t['p'] = 556; - t['q'] = 556; - t['r'] = 333; - t['s'] = 500; - t['t'] = 278; - t['u'] = 556; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 500; - t['braceleft'] = 334; - t['bar'] = 260; - t['braceright'] = 334; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 191; - t['quotedblleft'] = 333; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 500; - t['fl'] = 500; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 537; - t['bullet'] = 350; - t['quotesinglbase'] = 222; - t['quotedblbase'] = 333; - t['quotedblright'] = 333; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 556; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 222; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 556; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 667; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 500; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 500; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 222; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 500; - t['scedilla'] = 500; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 556; - t['acircumflex'] = 556; - t['Amacron'] = 667; - t['rcaron'] = 333; - t['ccedilla'] = 500; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 643; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 667; - t['Abreve'] = 667; - t['multiply'] = 584; - t['uacute'] = 556; - t['Tcaron'] = 611; - t['partialdiff'] = 476; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 500; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 260; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 333; - t['omacron'] = 556; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 222; - t['tcaron'] = 317; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 667; - t['Adieresis'] = 667; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 222; - t['Oacute'] = 778; - t['oacute'] = 556; - t['amacron'] = 556; - t['sacute'] = 500; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 556; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 556; - t['igrave'] = 278; - t['ohungarumlaut'] = 556; - t['Eogonek'] = 667; - t['dcroat'] = 556; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 299; - t['Kcommaaccent'] = 667; - t['Lacute'] = 556; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 556; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 556; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 556; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 556; - t['Ccaron'] = 722; - t['ugrave'] = 556; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 333; - t['Ntilde'] = 722; - t['otilde'] = 556; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 556; - t['Atilde'] = 667; - t['Aogonek'] = 667; - t['Aring'] = 667; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 500; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 556; - t['tcommaaccent'] = 278; - t['logicalnot'] = 584; - t['odieresis'] = 556; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 556; - t['eth'] = 556; - t['zcaron'] = 500; - t['ncommaaccent'] = 556; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Helvetica-Bold'] = getLookupTableFactory(function (t) { - t['space'] = 278; - t['exclam'] = 333; - t['quotedbl'] = 474; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 722; - t['quoteright'] = 278; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 611; - t['at'] = 975; - t['A'] = 722; - t['B'] = 722; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 556; - t['K'] = 722; - t['L'] = 611; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 584; - t['underscore'] = 556; - t['quoteleft'] = 278; - t['a'] = 556; - t['b'] = 611; - t['c'] = 556; - t['d'] = 611; - t['e'] = 556; - t['f'] = 333; - t['g'] = 611; - t['h'] = 611; - t['i'] = 278; - t['j'] = 278; - t['k'] = 556; - t['l'] = 278; - t['m'] = 889; - t['n'] = 611; - t['o'] = 611; - t['p'] = 611; - t['q'] = 611; - t['r'] = 389; - t['s'] = 556; - t['t'] = 333; - t['u'] = 611; - t['v'] = 556; - t['w'] = 778; - t['x'] = 556; - t['y'] = 556; - t['z'] = 500; - t['braceleft'] = 389; - t['bar'] = 280; - t['braceright'] = 389; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 238; - t['quotedblleft'] = 500; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 611; - t['fl'] = 611; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 556; - t['bullet'] = 350; - t['quotesinglbase'] = 278; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 611; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 611; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 722; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 556; - t['scommaaccent'] = 556; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 611; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 556; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 556; - t['scedilla'] = 556; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 611; - t['acircumflex'] = 556; - t['Amacron'] = 722; - t['rcaron'] = 389; - t['ccedilla'] = 556; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 743; - t['Umacron'] = 722; - t['uring'] = 611; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 584; - t['uacute'] = 611; - t['Tcaron'] = 611; - t['partialdiff'] = 494; - t['ydieresis'] = 556; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 556; - t['nacute'] = 611; - t['umacron'] = 611; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 280; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 389; - t['omacron'] = 611; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 278; - t['tcaron'] = 389; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 278; - t['Oacute'] = 778; - t['oacute'] = 611; - t['amacron'] = 556; - t['sacute'] = 556; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 611; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 611; - t['igrave'] = 278; - t['ohungarumlaut'] = 611; - t['Eogonek'] = 667; - t['dcroat'] = 611; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 400; - t['Kcommaaccent'] = 722; - t['Lacute'] = 611; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 611; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 611; - t['ntilde'] = 611; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 611; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 611; - t['Ccaron'] = 722; - t['ugrave'] = 611; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 722; - t['otilde'] = 611; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 611; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 556; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 611; - t['tcommaaccent'] = 333; - t['logicalnot'] = 584; - t['odieresis'] = 611; - t['udieresis'] = 611; - t['notequal'] = 549; - t['gcommaaccent'] = 611; - t['eth'] = 611; - t['zcaron'] = 500; - t['ncommaaccent'] = 611; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Helvetica-BoldOblique'] = getLookupTableFactory(function (t) { - t['space'] = 278; - t['exclam'] = 333; - t['quotedbl'] = 474; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 722; - t['quoteright'] = 278; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 611; - t['at'] = 975; - t['A'] = 722; - t['B'] = 722; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 556; - t['K'] = 722; - t['L'] = 611; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 584; - t['underscore'] = 556; - t['quoteleft'] = 278; - t['a'] = 556; - t['b'] = 611; - t['c'] = 556; - t['d'] = 611; - t['e'] = 556; - t['f'] = 333; - t['g'] = 611; - t['h'] = 611; - t['i'] = 278; - t['j'] = 278; - t['k'] = 556; - t['l'] = 278; - t['m'] = 889; - t['n'] = 611; - t['o'] = 611; - t['p'] = 611; - t['q'] = 611; - t['r'] = 389; - t['s'] = 556; - t['t'] = 333; - t['u'] = 611; - t['v'] = 556; - t['w'] = 778; - t['x'] = 556; - t['y'] = 556; - t['z'] = 500; - t['braceleft'] = 389; - t['bar'] = 280; - t['braceright'] = 389; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 238; - t['quotedblleft'] = 500; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 611; - t['fl'] = 611; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 556; - t['bullet'] = 350; - t['quotesinglbase'] = 278; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 611; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 611; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 722; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 556; - t['scommaaccent'] = 556; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 611; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 556; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 556; - t['scedilla'] = 556; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 611; - t['acircumflex'] = 556; - t['Amacron'] = 722; - t['rcaron'] = 389; - t['ccedilla'] = 556; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 743; - t['Umacron'] = 722; - t['uring'] = 611; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 584; - t['uacute'] = 611; - t['Tcaron'] = 611; - t['partialdiff'] = 494; - t['ydieresis'] = 556; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 556; - t['nacute'] = 611; - t['umacron'] = 611; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 280; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 389; - t['omacron'] = 611; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 278; - t['tcaron'] = 389; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 278; - t['Oacute'] = 778; - t['oacute'] = 611; - t['amacron'] = 556; - t['sacute'] = 556; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 611; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 611; - t['igrave'] = 278; - t['ohungarumlaut'] = 611; - t['Eogonek'] = 667; - t['dcroat'] = 611; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 400; - t['Kcommaaccent'] = 722; - t['Lacute'] = 611; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 611; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 611; - t['ntilde'] = 611; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 611; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 611; - t['Ccaron'] = 722; - t['ugrave'] = 611; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 722; - t['otilde'] = 611; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 611; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 556; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 611; - t['tcommaaccent'] = 333; - t['logicalnot'] = 584; - t['odieresis'] = 611; - t['udieresis'] = 611; - t['notequal'] = 549; - t['gcommaaccent'] = 611; - t['eth'] = 611; - t['zcaron'] = 500; - t['ncommaaccent'] = 611; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Helvetica-Oblique'] = getLookupTableFactory(function (t) { - t['space'] = 278; - t['exclam'] = 278; - t['quotedbl'] = 355; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 667; - t['quoteright'] = 222; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 556; - t['at'] = 1015; - t['A'] = 667; - t['B'] = 667; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 500; - t['K'] = 667; - t['L'] = 556; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 278; - t['backslash'] = 278; - t['bracketright'] = 278; - t['asciicircum'] = 469; - t['underscore'] = 556; - t['quoteleft'] = 222; - t['a'] = 556; - t['b'] = 556; - t['c'] = 500; - t['d'] = 556; - t['e'] = 556; - t['f'] = 278; - t['g'] = 556; - t['h'] = 556; - t['i'] = 222; - t['j'] = 222; - t['k'] = 500; - t['l'] = 222; - t['m'] = 833; - t['n'] = 556; - t['o'] = 556; - t['p'] = 556; - t['q'] = 556; - t['r'] = 333; - t['s'] = 500; - t['t'] = 278; - t['u'] = 556; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 500; - t['braceleft'] = 334; - t['bar'] = 260; - t['braceright'] = 334; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 191; - t['quotedblleft'] = 333; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 500; - t['fl'] = 500; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 537; - t['bullet'] = 350; - t['quotesinglbase'] = 222; - t['quotedblbase'] = 333; - t['quotedblright'] = 333; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 556; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 222; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 556; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 667; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 500; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 500; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 222; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 500; - t['scedilla'] = 500; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 556; - t['acircumflex'] = 556; - t['Amacron'] = 667; - t['rcaron'] = 333; - t['ccedilla'] = 500; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 643; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 667; - t['Abreve'] = 667; - t['multiply'] = 584; - t['uacute'] = 556; - t['Tcaron'] = 611; - t['partialdiff'] = 476; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 500; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 260; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 333; - t['omacron'] = 556; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 222; - t['tcaron'] = 317; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 667; - t['Adieresis'] = 667; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 222; - t['Oacute'] = 778; - t['oacute'] = 556; - t['amacron'] = 556; - t['sacute'] = 500; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 556; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 556; - t['igrave'] = 278; - t['ohungarumlaut'] = 556; - t['Eogonek'] = 667; - t['dcroat'] = 556; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 299; - t['Kcommaaccent'] = 667; - t['Lacute'] = 556; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 556; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 556; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 556; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 556; - t['Ccaron'] = 722; - t['ugrave'] = 556; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 333; - t['Ntilde'] = 722; - t['otilde'] = 556; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 556; - t['Atilde'] = 667; - t['Aogonek'] = 667; - t['Aring'] = 667; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 500; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 556; - t['tcommaaccent'] = 278; - t['logicalnot'] = 584; - t['odieresis'] = 556; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 556; - t['eth'] = 556; - t['zcaron'] = 500; - t['ncommaaccent'] = 556; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Symbol'] = getLookupTableFactory(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['universal'] = 713; - t['numbersign'] = 500; - t['existential'] = 549; - t['percent'] = 833; - t['ampersand'] = 778; - t['suchthat'] = 439; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asteriskmath'] = 500; - t['plus'] = 549; - t['comma'] = 250; - t['minus'] = 549; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 549; - t['equal'] = 549; - t['greater'] = 549; - t['question'] = 444; - t['congruent'] = 549; - t['Alpha'] = 722; - t['Beta'] = 667; - t['Chi'] = 722; - t['Delta'] = 612; - t['Epsilon'] = 611; - t['Phi'] = 763; - t['Gamma'] = 603; - t['Eta'] = 722; - t['Iota'] = 333; - t['theta1'] = 631; - t['Kappa'] = 722; - t['Lambda'] = 686; - t['Mu'] = 889; - t['Nu'] = 722; - t['Omicron'] = 722; - t['Pi'] = 768; - t['Theta'] = 741; - t['Rho'] = 556; - t['Sigma'] = 592; - t['Tau'] = 611; - t['Upsilon'] = 690; - t['sigma1'] = 439; - t['Omega'] = 768; - t['Xi'] = 645; - t['Psi'] = 795; - t['Zeta'] = 611; - t['bracketleft'] = 333; - t['therefore'] = 863; - t['bracketright'] = 333; - t['perpendicular'] = 658; - t['underscore'] = 500; - t['radicalex'] = 500; - t['alpha'] = 631; - t['beta'] = 549; - t['chi'] = 549; - t['delta'] = 494; - t['epsilon'] = 439; - t['phi'] = 521; - t['gamma'] = 411; - t['eta'] = 603; - t['iota'] = 329; - t['phi1'] = 603; - t['kappa'] = 549; - t['lambda'] = 549; - t['mu'] = 576; - t['nu'] = 521; - t['omicron'] = 549; - t['pi'] = 549; - t['theta'] = 521; - t['rho'] = 549; - t['sigma'] = 603; - t['tau'] = 439; - t['upsilon'] = 576; - t['omega1'] = 713; - t['omega'] = 686; - t['xi'] = 493; - t['psi'] = 686; - t['zeta'] = 494; - t['braceleft'] = 480; - t['bar'] = 200; - t['braceright'] = 480; - t['similar'] = 549; - t['Euro'] = 750; - t['Upsilon1'] = 620; - t['minute'] = 247; - t['lessequal'] = 549; - t['fraction'] = 167; - t['infinity'] = 713; - t['florin'] = 500; - t['club'] = 753; - t['diamond'] = 753; - t['heart'] = 753; - t['spade'] = 753; - t['arrowboth'] = 1042; - t['arrowleft'] = 987; - t['arrowup'] = 603; - t['arrowright'] = 987; - t['arrowdown'] = 603; - t['degree'] = 400; - t['plusminus'] = 549; - t['second'] = 411; - t['greaterequal'] = 549; - t['multiply'] = 549; - t['proportional'] = 713; - t['partialdiff'] = 494; - t['bullet'] = 460; - t['divide'] = 549; - t['notequal'] = 549; - t['equivalence'] = 549; - t['approxequal'] = 549; - t['ellipsis'] = 1000; - t['arrowvertex'] = 603; - t['arrowhorizex'] = 1000; - t['carriagereturn'] = 658; - t['aleph'] = 823; - t['Ifraktur'] = 686; - t['Rfraktur'] = 795; - t['weierstrass'] = 987; - t['circlemultiply'] = 768; - t['circleplus'] = 768; - t['emptyset'] = 823; - t['intersection'] = 768; - t['union'] = 768; - t['propersuperset'] = 713; - t['reflexsuperset'] = 713; - t['notsubset'] = 713; - t['propersubset'] = 713; - t['reflexsubset'] = 713; - t['element'] = 713; - t['notelement'] = 713; - t['angle'] = 768; - t['gradient'] = 713; - t['registerserif'] = 790; - t['copyrightserif'] = 790; - t['trademarkserif'] = 890; - t['product'] = 823; - t['radical'] = 549; - t['dotmath'] = 250; - t['logicalnot'] = 713; - t['logicaland'] = 603; - t['logicalor'] = 603; - t['arrowdblboth'] = 1042; - t['arrowdblleft'] = 987; - t['arrowdblup'] = 603; - t['arrowdblright'] = 987; - t['arrowdbldown'] = 603; - t['lozenge'] = 494; - t['angleleft'] = 329; - t['registersans'] = 790; - t['copyrightsans'] = 790; - t['trademarksans'] = 786; - t['summation'] = 713; - t['parenlefttp'] = 384; - t['parenleftex'] = 384; - t['parenleftbt'] = 384; - t['bracketlefttp'] = 384; - t['bracketleftex'] = 384; - t['bracketleftbt'] = 384; - t['bracelefttp'] = 494; - t['braceleftmid'] = 494; - t['braceleftbt'] = 494; - t['braceex'] = 494; - t['angleright'] = 329; - t['integral'] = 274; - t['integraltp'] = 686; - t['integralex'] = 686; - t['integralbt'] = 686; - t['parenrighttp'] = 384; - t['parenrightex'] = 384; - t['parenrightbt'] = 384; - t['bracketrighttp'] = 384; - t['bracketrightex'] = 384; - t['bracketrightbt'] = 384; - t['bracerighttp'] = 494; - t['bracerightmid'] = 494; - t['bracerightbt'] = 494; - t['apple'] = 790; - }); - t['Times-Roman'] = getLookupTableFactory(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['quotedbl'] = 408; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 833; - t['ampersand'] = 778; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 564; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 564; - t['equal'] = 564; - t['greater'] = 564; - t['question'] = 444; - t['at'] = 921; - t['A'] = 722; - t['B'] = 667; - t['C'] = 667; - t['D'] = 722; - t['E'] = 611; - t['F'] = 556; - t['G'] = 722; - t['H'] = 722; - t['I'] = 333; - t['J'] = 389; - t['K'] = 722; - t['L'] = 611; - t['M'] = 889; - t['N'] = 722; - t['O'] = 722; - t['P'] = 556; - t['Q'] = 722; - t['R'] = 667; - t['S'] = 556; - t['T'] = 611; - t['U'] = 722; - t['V'] = 722; - t['W'] = 944; - t['X'] = 722; - t['Y'] = 722; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 469; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 444; - t['b'] = 500; - t['c'] = 444; - t['d'] = 500; - t['e'] = 444; - t['f'] = 333; - t['g'] = 500; - t['h'] = 500; - t['i'] = 278; - t['j'] = 278; - t['k'] = 500; - t['l'] = 278; - t['m'] = 778; - t['n'] = 500; - t['o'] = 500; - t['p'] = 500; - t['q'] = 500; - t['r'] = 333; - t['s'] = 389; - t['t'] = 278; - t['u'] = 500; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 444; - t['braceleft'] = 480; - t['bar'] = 200; - t['braceright'] = 480; - t['asciitilde'] = 541; - t['exclamdown'] = 333; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 180; - t['quotedblleft'] = 444; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 556; - t['fl'] = 556; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 453; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 444; - t['quotedblright'] = 444; - t['guillemotright'] = 500; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 444; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 889; - t['ordfeminine'] = 276; - t['Lslash'] = 611; - t['Oslash'] = 722; - t['OE'] = 889; - t['ordmasculine'] = 310; - t['ae'] = 667; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 722; - t['germandbls'] = 500; - t['Idieresis'] = 333; - t['eacute'] = 444; - t['abreve'] = 444; - t['uhungarumlaut'] = 500; - t['ecaron'] = 444; - t['Ydieresis'] = 722; - t['divide'] = 564; - t['Yacute'] = 722; - t['Acircumflex'] = 722; - t['aacute'] = 444; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 444; - t['Uacute'] = 722; - t['uogonek'] = 500; - t['Edieresis'] = 611; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 760; - t['Emacron'] = 611; - t['ccaron'] = 444; - t['aring'] = 444; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 444; - t['Tcommaaccent'] = 611; - t['Cacute'] = 667; - t['atilde'] = 444; - t['Edotaccent'] = 611; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 667; - t['Gcommaaccent'] = 722; - t['ucircumflex'] = 500; - t['acircumflex'] = 444; - t['Amacron'] = 722; - t['rcaron'] = 333; - t['ccedilla'] = 444; - t['Zdotaccent'] = 611; - t['Thorn'] = 556; - t['Omacron'] = 722; - t['Racute'] = 667; - t['Sacute'] = 556; - t['dcaron'] = 588; - t['Umacron'] = 722; - t['uring'] = 500; - t['threesuperior'] = 300; - t['Ograve'] = 722; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 564; - t['uacute'] = 500; - t['Tcaron'] = 611; - t['partialdiff'] = 476; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 611; - t['adieresis'] = 444; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 500; - t['umacron'] = 500; - t['Ncaron'] = 722; - t['Iacute'] = 333; - t['plusminus'] = 564; - t['brokenbar'] = 200; - t['registered'] = 760; - t['Gbreve'] = 722; - t['Idotaccent'] = 333; - t['summation'] = 600; - t['Egrave'] = 611; - t['racute'] = 333; - t['omacron'] = 500; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 667; - t['lcommaaccent'] = 278; - t['tcaron'] = 326; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 444; - t['zacute'] = 444; - t['iogonek'] = 278; - t['Oacute'] = 722; - t['oacute'] = 500; - t['amacron'] = 444; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 722; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 500; - t['twosuperior'] = 300; - t['Odieresis'] = 722; - t['mu'] = 500; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 611; - t['dcroat'] = 500; - t['threequarters'] = 750; - t['Scedilla'] = 556; - t['lcaron'] = 344; - t['Kcommaaccent'] = 722; - t['Lacute'] = 611; - t['trademark'] = 980; - t['edotaccent'] = 444; - t['Igrave'] = 333; - t['Imacron'] = 333; - t['Lcaron'] = 611; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 500; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 611; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 556; - t['Scommaaccent'] = 556; - t['Ohungarumlaut'] = 722; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 667; - t['ugrave'] = 500; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 333; - t['Ntilde'] = 722; - t['otilde'] = 500; - t['Rcommaaccent'] = 667; - t['Lcommaaccent'] = 611; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 722; - t['zdotaccent'] = 444; - t['Ecaron'] = 611; - t['Iogonek'] = 333; - t['kcommaaccent'] = 500; - t['minus'] = 564; - t['Icircumflex'] = 333; - t['ncaron'] = 500; - t['tcommaaccent'] = 278; - t['logicalnot'] = 564; - t['odieresis'] = 500; - t['udieresis'] = 500; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 444; - t['ncommaaccent'] = 500; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['Times-Bold'] = getLookupTableFactory(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['quotedbl'] = 555; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 1000; - t['ampersand'] = 833; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 570; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 570; - t['equal'] = 570; - t['greater'] = 570; - t['question'] = 500; - t['at'] = 930; - t['A'] = 722; - t['B'] = 667; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 778; - t['I'] = 389; - t['J'] = 500; - t['K'] = 778; - t['L'] = 667; - t['M'] = 944; - t['N'] = 722; - t['O'] = 778; - t['P'] = 611; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 556; - t['T'] = 667; - t['U'] = 722; - t['V'] = 722; - t['W'] = 1000; - t['X'] = 722; - t['Y'] = 722; - t['Z'] = 667; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 581; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 500; - t['b'] = 556; - t['c'] = 444; - t['d'] = 556; - t['e'] = 444; - t['f'] = 333; - t['g'] = 500; - t['h'] = 556; - t['i'] = 278; - t['j'] = 333; - t['k'] = 556; - t['l'] = 278; - t['m'] = 833; - t['n'] = 556; - t['o'] = 500; - t['p'] = 556; - t['q'] = 556; - t['r'] = 444; - t['s'] = 389; - t['t'] = 333; - t['u'] = 556; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 444; - t['braceleft'] = 394; - t['bar'] = 220; - t['braceright'] = 394; - t['asciitilde'] = 520; - t['exclamdown'] = 333; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 278; - t['quotedblleft'] = 500; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 556; - t['fl'] = 556; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 540; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 500; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 500; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 300; - t['Lslash'] = 667; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 330; - t['ae'] = 722; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 722; - t['germandbls'] = 556; - t['Idieresis'] = 389; - t['eacute'] = 444; - t['abreve'] = 500; - t['uhungarumlaut'] = 556; - t['ecaron'] = 444; - t['Ydieresis'] = 722; - t['divide'] = 570; - t['Yacute'] = 722; - t['Acircumflex'] = 722; - t['aacute'] = 500; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 500; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 747; - t['Emacron'] = 667; - t['ccaron'] = 444; - t['aring'] = 500; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 500; - t['Tcommaaccent'] = 667; - t['Cacute'] = 722; - t['atilde'] = 500; - t['Edotaccent'] = 667; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 556; - t['acircumflex'] = 500; - t['Amacron'] = 722; - t['rcaron'] = 444; - t['ccedilla'] = 444; - t['Zdotaccent'] = 667; - t['Thorn'] = 611; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 556; - t['dcaron'] = 672; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 300; - t['Ograve'] = 778; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 570; - t['uacute'] = 556; - t['Tcaron'] = 667; - t['partialdiff'] = 494; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 500; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 389; - t['plusminus'] = 570; - t['brokenbar'] = 220; - t['registered'] = 747; - t['Gbreve'] = 778; - t['Idotaccent'] = 389; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 444; - t['omacron'] = 500; - t['Zacute'] = 667; - t['Zcaron'] = 667; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 278; - t['tcaron'] = 416; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 444; - t['zacute'] = 444; - t['iogonek'] = 278; - t['Oacute'] = 778; - t['oacute'] = 500; - t['amacron'] = 500; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 556; - t['twosuperior'] = 300; - t['Odieresis'] = 778; - t['mu'] = 556; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 667; - t['dcroat'] = 556; - t['threequarters'] = 750; - t['Scedilla'] = 556; - t['lcaron'] = 394; - t['Kcommaaccent'] = 778; - t['Lacute'] = 667; - t['trademark'] = 1000; - t['edotaccent'] = 444; - t['Igrave'] = 389; - t['Imacron'] = 389; - t['Lcaron'] = 667; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 556; - t['Scommaaccent'] = 556; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 722; - t['ugrave'] = 556; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 444; - t['Ntilde'] = 722; - t['otilde'] = 500; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 667; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 778; - t['zdotaccent'] = 444; - t['Ecaron'] = 667; - t['Iogonek'] = 389; - t['kcommaaccent'] = 556; - t['minus'] = 570; - t['Icircumflex'] = 389; - t['ncaron'] = 556; - t['tcommaaccent'] = 333; - t['logicalnot'] = 570; - t['odieresis'] = 500; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 444; - t['ncommaaccent'] = 556; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['Times-BoldItalic'] = getLookupTableFactory(function (t) { - t['space'] = 250; - t['exclam'] = 389; - t['quotedbl'] = 555; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 833; - t['ampersand'] = 778; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 570; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 570; - t['equal'] = 570; - t['greater'] = 570; - t['question'] = 500; - t['at'] = 832; - t['A'] = 667; - t['B'] = 667; - t['C'] = 667; - t['D'] = 722; - t['E'] = 667; - t['F'] = 667; - t['G'] = 722; - t['H'] = 778; - t['I'] = 389; - t['J'] = 500; - t['K'] = 667; - t['L'] = 611; - t['M'] = 889; - t['N'] = 722; - t['O'] = 722; - t['P'] = 611; - t['Q'] = 722; - t['R'] = 667; - t['S'] = 556; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 889; - t['X'] = 667; - t['Y'] = 611; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 570; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 500; - t['b'] = 500; - t['c'] = 444; - t['d'] = 500; - t['e'] = 444; - t['f'] = 333; - t['g'] = 500; - t['h'] = 556; - t['i'] = 278; - t['j'] = 278; - t['k'] = 500; - t['l'] = 278; - t['m'] = 778; - t['n'] = 556; - t['o'] = 500; - t['p'] = 500; - t['q'] = 500; - t['r'] = 389; - t['s'] = 389; - t['t'] = 278; - t['u'] = 556; - t['v'] = 444; - t['w'] = 667; - t['x'] = 500; - t['y'] = 444; - t['z'] = 389; - t['braceleft'] = 348; - t['bar'] = 220; - t['braceright'] = 348; - t['asciitilde'] = 570; - t['exclamdown'] = 389; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 278; - t['quotedblleft'] = 500; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 556; - t['fl'] = 556; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 500; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 500; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 500; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 944; - t['ordfeminine'] = 266; - t['Lslash'] = 611; - t['Oslash'] = 722; - t['OE'] = 944; - t['ordmasculine'] = 300; - t['ae'] = 722; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 722; - t['germandbls'] = 500; - t['Idieresis'] = 389; - t['eacute'] = 444; - t['abreve'] = 500; - t['uhungarumlaut'] = 556; - t['ecaron'] = 444; - t['Ydieresis'] = 611; - t['divide'] = 570; - t['Yacute'] = 611; - t['Acircumflex'] = 667; - t['aacute'] = 500; - t['Ucircumflex'] = 722; - t['yacute'] = 444; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 500; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 747; - t['Emacron'] = 667; - t['ccaron'] = 444; - t['aring'] = 500; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 500; - t['Tcommaaccent'] = 611; - t['Cacute'] = 667; - t['atilde'] = 500; - t['Edotaccent'] = 667; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 667; - t['Gcommaaccent'] = 722; - t['ucircumflex'] = 556; - t['acircumflex'] = 500; - t['Amacron'] = 667; - t['rcaron'] = 389; - t['ccedilla'] = 444; - t['Zdotaccent'] = 611; - t['Thorn'] = 611; - t['Omacron'] = 722; - t['Racute'] = 667; - t['Sacute'] = 556; - t['dcaron'] = 608; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 300; - t['Ograve'] = 722; - t['Agrave'] = 667; - t['Abreve'] = 667; - t['multiply'] = 570; - t['uacute'] = 556; - t['Tcaron'] = 611; - t['partialdiff'] = 494; - t['ydieresis'] = 444; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 500; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 389; - t['plusminus'] = 570; - t['brokenbar'] = 220; - t['registered'] = 747; - t['Gbreve'] = 722; - t['Idotaccent'] = 389; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 389; - t['omacron'] = 500; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 667; - t['lcommaaccent'] = 278; - t['tcaron'] = 366; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 667; - t['Adieresis'] = 667; - t['egrave'] = 444; - t['zacute'] = 389; - t['iogonek'] = 278; - t['Oacute'] = 722; - t['oacute'] = 500; - t['amacron'] = 500; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 722; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 500; - t['twosuperior'] = 300; - t['Odieresis'] = 722; - t['mu'] = 576; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 667; - t['dcroat'] = 500; - t['threequarters'] = 750; - t['Scedilla'] = 556; - t['lcaron'] = 382; - t['Kcommaaccent'] = 667; - t['Lacute'] = 611; - t['trademark'] = 1000; - t['edotaccent'] = 444; - t['Igrave'] = 389; - t['Imacron'] = 389; - t['Lcaron'] = 611; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 556; - t['Scommaaccent'] = 556; - t['Ohungarumlaut'] = 722; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 667; - t['ugrave'] = 556; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 722; - t['otilde'] = 500; - t['Rcommaaccent'] = 667; - t['Lcommaaccent'] = 611; - t['Atilde'] = 667; - t['Aogonek'] = 667; - t['Aring'] = 667; - t['Otilde'] = 722; - t['zdotaccent'] = 389; - t['Ecaron'] = 667; - t['Iogonek'] = 389; - t['kcommaaccent'] = 500; - t['minus'] = 606; - t['Icircumflex'] = 389; - t['ncaron'] = 556; - t['tcommaaccent'] = 278; - t['logicalnot'] = 606; - t['odieresis'] = 500; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 389; - t['ncommaaccent'] = 556; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['Times-Italic'] = getLookupTableFactory(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['quotedbl'] = 420; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 833; - t['ampersand'] = 778; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 675; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 675; - t['equal'] = 675; - t['greater'] = 675; - t['question'] = 500; - t['at'] = 920; - t['A'] = 611; - t['B'] = 611; - t['C'] = 667; - t['D'] = 722; - t['E'] = 611; - t['F'] = 611; - t['G'] = 722; - t['H'] = 722; - t['I'] = 333; - t['J'] = 444; - t['K'] = 667; - t['L'] = 556; - t['M'] = 833; - t['N'] = 667; - t['O'] = 722; - t['P'] = 611; - t['Q'] = 722; - t['R'] = 611; - t['S'] = 500; - t['T'] = 556; - t['U'] = 722; - t['V'] = 611; - t['W'] = 833; - t['X'] = 611; - t['Y'] = 556; - t['Z'] = 556; - t['bracketleft'] = 389; - t['backslash'] = 278; - t['bracketright'] = 389; - t['asciicircum'] = 422; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 500; - t['b'] = 500; - t['c'] = 444; - t['d'] = 500; - t['e'] = 444; - t['f'] = 278; - t['g'] = 500; - t['h'] = 500; - t['i'] = 278; - t['j'] = 278; - t['k'] = 444; - t['l'] = 278; - t['m'] = 722; - t['n'] = 500; - t['o'] = 500; - t['p'] = 500; - t['q'] = 500; - t['r'] = 389; - t['s'] = 389; - t['t'] = 278; - t['u'] = 500; - t['v'] = 444; - t['w'] = 667; - t['x'] = 444; - t['y'] = 444; - t['z'] = 389; - t['braceleft'] = 400; - t['bar'] = 275; - t['braceright'] = 400; - t['asciitilde'] = 541; - t['exclamdown'] = 389; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 214; - t['quotedblleft'] = 556; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 500; - t['fl'] = 500; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 523; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 556; - t['quotedblright'] = 556; - t['guillemotright'] = 500; - t['ellipsis'] = 889; - t['perthousand'] = 1000; - t['questiondown'] = 500; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 889; - t['AE'] = 889; - t['ordfeminine'] = 276; - t['Lslash'] = 556; - t['Oslash'] = 722; - t['OE'] = 944; - t['ordmasculine'] = 310; - t['ae'] = 667; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 667; - t['germandbls'] = 500; - t['Idieresis'] = 333; - t['eacute'] = 444; - t['abreve'] = 500; - t['uhungarumlaut'] = 500; - t['ecaron'] = 444; - t['Ydieresis'] = 556; - t['divide'] = 675; - t['Yacute'] = 556; - t['Acircumflex'] = 611; - t['aacute'] = 500; - t['Ucircumflex'] = 722; - t['yacute'] = 444; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 500; - t['Uacute'] = 722; - t['uogonek'] = 500; - t['Edieresis'] = 611; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 760; - t['Emacron'] = 611; - t['ccaron'] = 444; - t['aring'] = 500; - t['Ncommaaccent'] = 667; - t['lacute'] = 278; - t['agrave'] = 500; - t['Tcommaaccent'] = 556; - t['Cacute'] = 667; - t['atilde'] = 500; - t['Edotaccent'] = 611; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 611; - t['Gcommaaccent'] = 722; - t['ucircumflex'] = 500; - t['acircumflex'] = 500; - t['Amacron'] = 611; - t['rcaron'] = 389; - t['ccedilla'] = 444; - t['Zdotaccent'] = 556; - t['Thorn'] = 611; - t['Omacron'] = 722; - t['Racute'] = 611; - t['Sacute'] = 500; - t['dcaron'] = 544; - t['Umacron'] = 722; - t['uring'] = 500; - t['threesuperior'] = 300; - t['Ograve'] = 722; - t['Agrave'] = 611; - t['Abreve'] = 611; - t['multiply'] = 675; - t['uacute'] = 500; - t['Tcaron'] = 556; - t['partialdiff'] = 476; - t['ydieresis'] = 444; - t['Nacute'] = 667; - t['icircumflex'] = 278; - t['Ecircumflex'] = 611; - t['adieresis'] = 500; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 500; - t['umacron'] = 500; - t['Ncaron'] = 667; - t['Iacute'] = 333; - t['plusminus'] = 675; - t['brokenbar'] = 275; - t['registered'] = 760; - t['Gbreve'] = 722; - t['Idotaccent'] = 333; - t['summation'] = 600; - t['Egrave'] = 611; - t['racute'] = 389; - t['omacron'] = 500; - t['Zacute'] = 556; - t['Zcaron'] = 556; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 667; - t['lcommaaccent'] = 278; - t['tcaron'] = 300; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 611; - t['Adieresis'] = 611; - t['egrave'] = 444; - t['zacute'] = 389; - t['iogonek'] = 278; - t['Oacute'] = 722; - t['oacute'] = 500; - t['amacron'] = 500; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 722; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 500; - t['twosuperior'] = 300; - t['Odieresis'] = 722; - t['mu'] = 500; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 611; - t['dcroat'] = 500; - t['threequarters'] = 750; - t['Scedilla'] = 500; - t['lcaron'] = 300; - t['Kcommaaccent'] = 667; - t['Lacute'] = 556; - t['trademark'] = 980; - t['edotaccent'] = 444; - t['Igrave'] = 333; - t['Imacron'] = 333; - t['Lcaron'] = 611; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 500; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 611; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 500; - t['Scommaaccent'] = 500; - t['Ohungarumlaut'] = 722; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 667; - t['ugrave'] = 500; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 667; - t['otilde'] = 500; - t['Rcommaaccent'] = 611; - t['Lcommaaccent'] = 556; - t['Atilde'] = 611; - t['Aogonek'] = 611; - t['Aring'] = 611; - t['Otilde'] = 722; - t['zdotaccent'] = 389; - t['Ecaron'] = 611; - t['Iogonek'] = 333; - t['kcommaaccent'] = 444; - t['minus'] = 675; - t['Icircumflex'] = 333; - t['ncaron'] = 500; - t['tcommaaccent'] = 278; - t['logicalnot'] = 675; - t['odieresis'] = 500; - t['udieresis'] = 500; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 389; - t['ncommaaccent'] = 500; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['ZapfDingbats'] = getLookupTableFactory(function (t) { - t['space'] = 278; - t['a1'] = 974; - t['a2'] = 961; - t['a202'] = 974; - t['a3'] = 980; - t['a4'] = 719; - t['a5'] = 789; - t['a119'] = 790; - t['a118'] = 791; - t['a117'] = 690; - t['a11'] = 960; - t['a12'] = 939; - t['a13'] = 549; - t['a14'] = 855; - t['a15'] = 911; - t['a16'] = 933; - t['a105'] = 911; - t['a17'] = 945; - t['a18'] = 974; - t['a19'] = 755; - t['a20'] = 846; - t['a21'] = 762; - t['a22'] = 761; - t['a23'] = 571; - t['a24'] = 677; - t['a25'] = 763; - t['a26'] = 760; - t['a27'] = 759; - t['a28'] = 754; - t['a6'] = 494; - t['a7'] = 552; - t['a8'] = 537; - t['a9'] = 577; - t['a10'] = 692; - t['a29'] = 786; - t['a30'] = 788; - t['a31'] = 788; - t['a32'] = 790; - t['a33'] = 793; - t['a34'] = 794; - t['a35'] = 816; - t['a36'] = 823; - t['a37'] = 789; - t['a38'] = 841; - t['a39'] = 823; - t['a40'] = 833; - t['a41'] = 816; - t['a42'] = 831; - t['a43'] = 923; - t['a44'] = 744; - t['a45'] = 723; - t['a46'] = 749; - t['a47'] = 790; - t['a48'] = 792; - t['a49'] = 695; - t['a50'] = 776; - t['a51'] = 768; - t['a52'] = 792; - t['a53'] = 759; - t['a54'] = 707; - t['a55'] = 708; - t['a56'] = 682; - t['a57'] = 701; - t['a58'] = 826; - t['a59'] = 815; - t['a60'] = 789; - t['a61'] = 789; - t['a62'] = 707; - t['a63'] = 687; - t['a64'] = 696; - t['a65'] = 689; - t['a66'] = 786; - t['a67'] = 787; - t['a68'] = 713; - t['a69'] = 791; - t['a70'] = 785; - t['a71'] = 791; - t['a72'] = 873; - t['a73'] = 761; - t['a74'] = 762; - t['a203'] = 762; - t['a75'] = 759; - t['a204'] = 759; - t['a76'] = 892; - t['a77'] = 892; - t['a78'] = 788; - t['a79'] = 784; - t['a81'] = 438; - t['a82'] = 138; - t['a83'] = 277; - t['a84'] = 415; - t['a97'] = 392; - t['a98'] = 392; - t['a99'] = 668; - t['a100'] = 668; - t['a89'] = 390; - t['a90'] = 390; - t['a93'] = 317; - t['a94'] = 317; - t['a91'] = 276; - t['a92'] = 276; - t['a205'] = 509; - t['a85'] = 509; - t['a206'] = 410; - t['a86'] = 410; - t['a87'] = 234; - t['a88'] = 234; - t['a95'] = 334; - t['a96'] = 334; - t['a101'] = 732; - t['a102'] = 544; - t['a103'] = 544; - t['a104'] = 910; - t['a106'] = 667; - t['a107'] = 760; - t['a108'] = 760; - t['a112'] = 776; - t['a111'] = 595; - t['a110'] = 694; - t['a109'] = 626; - t['a120'] = 788; - t['a121'] = 788; - t['a122'] = 788; - t['a123'] = 788; - t['a124'] = 788; - t['a125'] = 788; - t['a126'] = 788; - t['a127'] = 788; - t['a128'] = 788; - t['a129'] = 788; - t['a130'] = 788; - t['a131'] = 788; - t['a132'] = 788; - t['a133'] = 788; - t['a134'] = 788; - t['a135'] = 788; - t['a136'] = 788; - t['a137'] = 788; - t['a138'] = 788; - t['a139'] = 788; - t['a140'] = 788; - t['a141'] = 788; - t['a142'] = 788; - t['a143'] = 788; - t['a144'] = 788; - t['a145'] = 788; - t['a146'] = 788; - t['a147'] = 788; - t['a148'] = 788; - t['a149'] = 788; - t['a150'] = 788; - t['a151'] = 788; - t['a152'] = 788; - t['a153'] = 788; - t['a154'] = 788; - t['a155'] = 788; - t['a156'] = 788; - t['a157'] = 788; - t['a158'] = 788; - t['a159'] = 788; - t['a160'] = 894; - t['a161'] = 838; - t['a163'] = 1016; - t['a164'] = 458; - t['a196'] = 748; - t['a165'] = 924; - t['a192'] = 748; - t['a166'] = 918; - t['a167'] = 927; - t['a168'] = 928; - t['a169'] = 928; - t['a170'] = 834; - t['a171'] = 873; - t['a172'] = 828; - t['a173'] = 924; - t['a162'] = 924; - t['a174'] = 917; - t['a175'] = 930; - t['a176'] = 931; - t['a177'] = 463; - t['a178'] = 883; - t['a179'] = 836; - t['a193'] = 836; - t['a180'] = 867; - t['a199'] = 867; - t['a181'] = 696; - t['a200'] = 696; - t['a182'] = 874; - t['a201'] = 874; - t['a183'] = 760; - t['a184'] = 946; - t['a197'] = 771; - t['a185'] = 865; - t['a194'] = 771; - t['a198'] = 888; - t['a186'] = 967; - t['a195'] = 888; - t['a187'] = 831; - t['a188'] = 873; - t['a189'] = 927; - t['a190'] = 970; - t['a191'] = 918; - }); - }); - exports.getMetrics = getMetrics; - })); - (function (root, factory) { - factory(root.pdfjsCoreMurmurHash3 = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var Uint32ArrayView = sharedUtil.Uint32ArrayView; - var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { - var MASK_HIGH = 0xffff0000; - var MASK_LOW = 0xffff; - function MurmurHash3_64(seed) { - var SEED = 0xc3d2e1f0; - this.h1 = seed ? seed & 0xffffffff : SEED; - this.h2 = seed ? seed & 0xffffffff : SEED; - } - var alwaysUseUint32ArrayView = false; - try { - new Uint32Array(new Uint8Array(5).buffer, 0, 1); - } catch (e) { - alwaysUseUint32ArrayView = true; - } - MurmurHash3_64.prototype = { - update: function MurmurHash3_64_update(input) { - var useUint32ArrayView = alwaysUseUint32ArrayView; - var i; - if (typeof input === 'string') { - var data = new Uint8Array(input.length * 2); - var length = 0; - for (i = 0; i < input.length; i++) { - var code = input.charCodeAt(i); - if (code <= 0xff) { - data[length++] = code; - } else { - data[length++] = code >>> 8; - data[length++] = code & 0xff; - } - } - } else if (input instanceof Uint8Array) { - data = input; - length = data.length; - } else if (typeof input === 'object' && 'length' in input) { - data = input; - length = data.length; - useUint32ArrayView = true; - } else { - throw new Error('Wrong data format in MurmurHash3_64_update. ' + 'Input must be a string or array.'); - } - var blockCounts = length >> 2; - var tailLength = length - blockCounts * 4; - var dataUint32 = useUint32ArrayView ? new Uint32ArrayView(data, blockCounts) : new Uint32Array(data.buffer, 0, blockCounts); - var k1 = 0; - var k2 = 0; - var h1 = this.h1; - var h2 = this.h2; - var C1 = 0xcc9e2d51; - var C2 = 0x1b873593; - var C1_LOW = C1 & MASK_LOW; - var C2_LOW = C2 & MASK_LOW; - for (i = 0; i < blockCounts; i++) { - if (i & 1) { - k1 = dataUint32[i]; - k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; - k1 = k1 << 15 | k1 >>> 17; - k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; - h1 ^= k1; - h1 = h1 << 13 | h1 >>> 19; - h1 = h1 * 5 + 0xe6546b64; - } else { - k2 = dataUint32[i]; - k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW; - k2 = k2 << 15 | k2 >>> 17; - k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW; - h2 ^= k2; - h2 = h2 << 13 | h2 >>> 19; - h2 = h2 * 5 + 0xe6546b64; - } - } - k1 = 0; - switch (tailLength) { - case 3: - k1 ^= data[blockCounts * 4 + 2] << 16; - case 2: - k1 ^= data[blockCounts * 4 + 1] << 8; - case 1: - k1 ^= data[blockCounts * 4]; - k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; - k1 = k1 << 15 | k1 >>> 17; - k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; - if (blockCounts & 1) { - h1 ^= k1; - } else { - h2 ^= k1; - } - } - this.h1 = h1; - this.h2 = h2; - return this; - }, - hexdigest: function MurmurHash3_64_hexdigest() { - var h1 = this.h1; - var h2 = this.h2; - h1 ^= h2 >>> 1; - h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW; - h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16; - h1 ^= h2 >>> 1; - h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW; - h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16; - h1 ^= h2 >>> 1; - for (var i = 0, arr = [ - h1, - h2 - ], str = ''; i < arr.length; i++) { - var hex = (arr[i] >>> 0).toString(16); - while (hex.length < 8) { - hex = '0' + hex; - } - str += hex; - } - return str; - } - }; - return MurmurHash3_64; - }(); - exports.MurmurHash3_64 = MurmurHash3_64; - })); - (function (root, factory) { - factory(root.pdfjsCorePrimitives = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var isArray = sharedUtil.isArray; - var Name = function NameClosure() { - function Name(name) { - this.name = name; - } - Name.prototype = {}; - var nameCache = Object.create(null); - Name.get = function Name_get(name) { - var nameValue = nameCache[name]; - return nameValue ? nameValue : nameCache[name] = new Name(name); - }; - return Name; - }(); - var Cmd = function CmdClosure() { - function Cmd(cmd) { - this.cmd = cmd; - } - Cmd.prototype = {}; - var cmdCache = Object.create(null); - Cmd.get = function Cmd_get(cmd) { - var cmdValue = cmdCache[cmd]; - return cmdValue ? cmdValue : cmdCache[cmd] = new Cmd(cmd); - }; - return Cmd; - }(); - var Dict = function DictClosure() { - var nonSerializable = function nonSerializableClosure() { - return nonSerializable; - }; - function Dict(xref) { - this.map = Object.create(null); - this.xref = xref; - this.objId = null; - this.suppressEncryption = false; - this.__nonSerializable__ = nonSerializable; - } - Dict.prototype = { - assignXref: function Dict_assignXref(newXref) { - this.xref = newXref; - }, - get: function Dict_get(key1, key2, key3) { - var value; - var xref = this.xref, suppressEncryption = this.suppressEncryption; - if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map || typeof key2 === 'undefined') { - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - } - if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map || typeof key3 === 'undefined') { - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - } - value = this.map[key3] || null; - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - }, - getAsync: function Dict_getAsync(key1, key2, key3) { - var value; - var xref = this.xref, suppressEncryption = this.suppressEncryption; - if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map || typeof key2 === 'undefined') { - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - return Promise.resolve(value); - } - if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map || typeof key3 === 'undefined') { - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - return Promise.resolve(value); - } - value = this.map[key3] || null; - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - return Promise.resolve(value); - }, - getArray: function Dict_getArray(key1, key2, key3) { - var value = this.get(key1, key2, key3); - var xref = this.xref, suppressEncryption = this.suppressEncryption; - if (!isArray(value) || !xref) { - return value; - } - value = value.slice(); - for (var i = 0, ii = value.length; i < ii; i++) { - if (!isRef(value[i])) { - continue; - } - value[i] = xref.fetch(value[i], suppressEncryption); - } - return value; - }, - getRaw: function Dict_getRaw(key) { - return this.map[key]; - }, - getKeys: function Dict_getKeys() { - return Object.keys(this.map); - }, - set: function Dict_set(key, value) { - this.map[key] = value; - }, - has: function Dict_has(key) { - return key in this.map; - }, - forEach: function Dict_forEach(callback) { - for (var key in this.map) { - callback(key, this.get(key)); - } - } - }; - Dict.empty = new Dict(null); - Dict.merge = function Dict_merge(xref, dictArray) { - var mergedDict = new Dict(xref); - for (var i = 0, ii = dictArray.length; i < ii; i++) { - var dict = dictArray[i]; - if (!isDict(dict)) { - continue; - } - for (var keyName in dict.map) { - if (mergedDict.map[keyName]) { - continue; - } - mergedDict.map[keyName] = dict.map[keyName]; - } - } - return mergedDict; - }; - return Dict; - }(); - var Ref = function RefClosure() { - function Ref(num, gen) { - this.num = num; - this.gen = gen; - } - Ref.prototype = { - toString: function Ref_toString() { - var str = this.num + 'R'; - if (this.gen !== 0) { - str += this.gen; - } - return str; - } - }; - return Ref; - }(); - var RefSet = function RefSetClosure() { - function RefSet() { - this.dict = Object.create(null); - } - RefSet.prototype = { - has: function RefSet_has(ref) { - return ref.toString() in this.dict; - }, - put: function RefSet_put(ref) { - this.dict[ref.toString()] = true; - }, - remove: function RefSet_remove(ref) { - delete this.dict[ref.toString()]; - } - }; - return RefSet; - }(); - var RefSetCache = function RefSetCacheClosure() { - function RefSetCache() { - this.dict = Object.create(null); - } - RefSetCache.prototype = { - get: function RefSetCache_get(ref) { - return this.dict[ref.toString()]; - }, - has: function RefSetCache_has(ref) { - return ref.toString() in this.dict; - }, - put: function RefSetCache_put(ref, obj) { - this.dict[ref.toString()] = obj; - }, - putAlias: function RefSetCache_putAlias(ref, aliasRef) { - this.dict[ref.toString()] = this.get(aliasRef); - }, - forEach: function RefSetCache_forEach(fn, thisArg) { - for (var i in this.dict) { - fn.call(thisArg, this.dict[i]); - } - }, - clear: function RefSetCache_clear() { - this.dict = Object.create(null); - } - }; - return RefSetCache; - }(); - function isName(v, name) { - return v instanceof Name && (name === undefined || v.name === name); - } - function isCmd(v, cmd) { - return v instanceof Cmd && (cmd === undefined || v.cmd === cmd); - } - function isDict(v, type) { - return v instanceof Dict && (type === undefined || isName(v.get('Type'), type)); - } - function isRef(v) { - return v instanceof Ref; - } - function isRefsEqual(v1, v2) { - return v1.num === v2.num && v1.gen === v2.gen; - } - function isStream(v) { - return typeof v === 'object' && v !== null && v.getBytes !== undefined; - } - exports.Cmd = Cmd; - exports.Dict = Dict; - exports.Name = Name; - exports.Ref = Ref; - exports.RefSet = RefSet; - exports.RefSetCache = RefSetCache; - exports.isCmd = isCmd; - exports.isDict = isDict; - exports.isName = isName; - exports.isRef = isRef; - exports.isRefsEqual = isRefsEqual; - exports.isStream = isStream; - })); - (function (root, factory) { - factory(root.pdfjsCoreStandardFonts = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var getLookupTableFactory = sharedUtil.getLookupTableFactory; - var getStdFontMap = getLookupTableFactory(function (t) { - t['ArialNarrow'] = 'Helvetica'; - t['ArialNarrow-Bold'] = 'Helvetica-Bold'; - t['ArialNarrow-BoldItalic'] = 'Helvetica-BoldOblique'; - t['ArialNarrow-Italic'] = 'Helvetica-Oblique'; - t['ArialBlack'] = 'Helvetica'; - t['ArialBlack-Bold'] = 'Helvetica-Bold'; - t['ArialBlack-BoldItalic'] = 'Helvetica-BoldOblique'; - t['ArialBlack-Italic'] = 'Helvetica-Oblique'; - t['Arial-Black'] = 'Helvetica'; - t['Arial-Black-Bold'] = 'Helvetica-Bold'; - t['Arial-Black-BoldItalic'] = 'Helvetica-BoldOblique'; - t['Arial-Black-Italic'] = 'Helvetica-Oblique'; - t['Arial'] = 'Helvetica'; - t['Arial-Bold'] = 'Helvetica-Bold'; - t['Arial-BoldItalic'] = 'Helvetica-BoldOblique'; - t['Arial-Italic'] = 'Helvetica-Oblique'; - t['Arial-BoldItalicMT'] = 'Helvetica-BoldOblique'; - t['Arial-BoldMT'] = 'Helvetica-Bold'; - t['Arial-ItalicMT'] = 'Helvetica-Oblique'; - t['ArialMT'] = 'Helvetica'; - t['Courier-Bold'] = 'Courier-Bold'; - t['Courier-BoldItalic'] = 'Courier-BoldOblique'; - t['Courier-Italic'] = 'Courier-Oblique'; - t['CourierNew'] = 'Courier'; - t['CourierNew-Bold'] = 'Courier-Bold'; - t['CourierNew-BoldItalic'] = 'Courier-BoldOblique'; - t['CourierNew-Italic'] = 'Courier-Oblique'; - t['CourierNewPS-BoldItalicMT'] = 'Courier-BoldOblique'; - t['CourierNewPS-BoldMT'] = 'Courier-Bold'; - t['CourierNewPS-ItalicMT'] = 'Courier-Oblique'; - t['CourierNewPSMT'] = 'Courier'; - t['Helvetica'] = 'Helvetica'; - t['Helvetica-Bold'] = 'Helvetica-Bold'; - t['Helvetica-BoldItalic'] = 'Helvetica-BoldOblique'; - t['Helvetica-BoldOblique'] = 'Helvetica-BoldOblique'; - t['Helvetica-Italic'] = 'Helvetica-Oblique'; - t['Helvetica-Oblique'] = 'Helvetica-Oblique'; - t['Symbol-Bold'] = 'Symbol'; - t['Symbol-BoldItalic'] = 'Symbol'; - t['Symbol-Italic'] = 'Symbol'; - t['TimesNewRoman'] = 'Times-Roman'; - t['TimesNewRoman-Bold'] = 'Times-Bold'; - t['TimesNewRoman-BoldItalic'] = 'Times-BoldItalic'; - t['TimesNewRoman-Italic'] = 'Times-Italic'; - t['TimesNewRomanPS'] = 'Times-Roman'; - t['TimesNewRomanPS-Bold'] = 'Times-Bold'; - t['TimesNewRomanPS-BoldItalic'] = 'Times-BoldItalic'; - t['TimesNewRomanPS-BoldItalicMT'] = 'Times-BoldItalic'; - t['TimesNewRomanPS-BoldMT'] = 'Times-Bold'; - t['TimesNewRomanPS-Italic'] = 'Times-Italic'; - t['TimesNewRomanPS-ItalicMT'] = 'Times-Italic'; - t['TimesNewRomanPSMT'] = 'Times-Roman'; - t['TimesNewRomanPSMT-Bold'] = 'Times-Bold'; - t['TimesNewRomanPSMT-BoldItalic'] = 'Times-BoldItalic'; - t['TimesNewRomanPSMT-Italic'] = 'Times-Italic'; - }); - var getNonStdFontMap = getLookupTableFactory(function (t) { - t['CenturyGothic'] = 'Helvetica'; - t['CenturyGothic-Bold'] = 'Helvetica-Bold'; - t['CenturyGothic-BoldItalic'] = 'Helvetica-BoldOblique'; - t['CenturyGothic-Italic'] = 'Helvetica-Oblique'; - t['ComicSansMS'] = 'Comic Sans MS'; - t['ComicSansMS-Bold'] = 'Comic Sans MS-Bold'; - t['ComicSansMS-BoldItalic'] = 'Comic Sans MS-BoldItalic'; - t['ComicSansMS-Italic'] = 'Comic Sans MS-Italic'; - t['LucidaConsole'] = 'Courier'; - t['LucidaConsole-Bold'] = 'Courier-Bold'; - t['LucidaConsole-BoldItalic'] = 'Courier-BoldOblique'; - t['LucidaConsole-Italic'] = 'Courier-Oblique'; - t['MS-Gothic'] = 'MS Gothic'; - t['MS-Gothic-Bold'] = 'MS Gothic-Bold'; - t['MS-Gothic-BoldItalic'] = 'MS Gothic-BoldItalic'; - t['MS-Gothic-Italic'] = 'MS Gothic-Italic'; - t['MS-Mincho'] = 'MS Mincho'; - t['MS-Mincho-Bold'] = 'MS Mincho-Bold'; - t['MS-Mincho-BoldItalic'] = 'MS Mincho-BoldItalic'; - t['MS-Mincho-Italic'] = 'MS Mincho-Italic'; - t['MS-PGothic'] = 'MS PGothic'; - t['MS-PGothic-Bold'] = 'MS PGothic-Bold'; - t['MS-PGothic-BoldItalic'] = 'MS PGothic-BoldItalic'; - t['MS-PGothic-Italic'] = 'MS PGothic-Italic'; - t['MS-PMincho'] = 'MS PMincho'; - t['MS-PMincho-Bold'] = 'MS PMincho-Bold'; - t['MS-PMincho-BoldItalic'] = 'MS PMincho-BoldItalic'; - t['MS-PMincho-Italic'] = 'MS PMincho-Italic'; - t['NuptialScript'] = 'Times-Italic'; - t['Wingdings'] = 'ZapfDingbats'; - }); - var getSerifFonts = getLookupTableFactory(function (t) { - t['Adobe Jenson'] = true; - t['Adobe Text'] = true; - t['Albertus'] = true; - t['Aldus'] = true; - t['Alexandria'] = true; - t['Algerian'] = true; - t['American Typewriter'] = true; - t['Antiqua'] = true; - t['Apex'] = true; - t['Arno'] = true; - t['Aster'] = true; - t['Aurora'] = true; - t['Baskerville'] = true; - t['Bell'] = true; - t['Bembo'] = true; - t['Bembo Schoolbook'] = true; - t['Benguiat'] = true; - t['Berkeley Old Style'] = true; - t['Bernhard Modern'] = true; - t['Berthold City'] = true; - t['Bodoni'] = true; - t['Bauer Bodoni'] = true; - t['Book Antiqua'] = true; - t['Bookman'] = true; - t['Bordeaux Roman'] = true; - t['Californian FB'] = true; - t['Calisto'] = true; - t['Calvert'] = true; - t['Capitals'] = true; - t['Cambria'] = true; - t['Cartier'] = true; - t['Caslon'] = true; - t['Catull'] = true; - t['Centaur'] = true; - t['Century Old Style'] = true; - t['Century Schoolbook'] = true; - t['Chaparral'] = true; - t['Charis SIL'] = true; - t['Cheltenham'] = true; - t['Cholla Slab'] = true; - t['Clarendon'] = true; - t['Clearface'] = true; - t['Cochin'] = true; - t['Colonna'] = true; - t['Computer Modern'] = true; - t['Concrete Roman'] = true; - t['Constantia'] = true; - t['Cooper Black'] = true; - t['Corona'] = true; - t['Ecotype'] = true; - t['Egyptienne'] = true; - t['Elephant'] = true; - t['Excelsior'] = true; - t['Fairfield'] = true; - t['FF Scala'] = true; - t['Folkard'] = true; - t['Footlight'] = true; - t['FreeSerif'] = true; - t['Friz Quadrata'] = true; - t['Garamond'] = true; - t['Gentium'] = true; - t['Georgia'] = true; - t['Gloucester'] = true; - t['Goudy Old Style'] = true; - t['Goudy Schoolbook'] = true; - t['Goudy Pro Font'] = true; - t['Granjon'] = true; - t['Guardian Egyptian'] = true; - t['Heather'] = true; - t['Hercules'] = true; - t['High Tower Text'] = true; - t['Hiroshige'] = true; - t['Hoefler Text'] = true; - t['Humana Serif'] = true; - t['Imprint'] = true; - t['Ionic No. 5'] = true; - t['Janson'] = true; - t['Joanna'] = true; - t['Korinna'] = true; - t['Lexicon'] = true; - t['Liberation Serif'] = true; - t['Linux Libertine'] = true; - t['Literaturnaya'] = true; - t['Lucida'] = true; - t['Lucida Bright'] = true; - t['Melior'] = true; - t['Memphis'] = true; - t['Miller'] = true; - t['Minion'] = true; - t['Modern'] = true; - t['Mona Lisa'] = true; - t['Mrs Eaves'] = true; - t['MS Serif'] = true; - t['Museo Slab'] = true; - t['New York'] = true; - t['Nimbus Roman'] = true; - t['NPS Rawlinson Roadway'] = true; - t['NuptialScript'] = true; - t['Palatino'] = true; - t['Perpetua'] = true; - t['Plantin'] = true; - t['Plantin Schoolbook'] = true; - t['Playbill'] = true; - t['Poor Richard'] = true; - t['Rawlinson Roadway'] = true; - t['Renault'] = true; - t['Requiem'] = true; - t['Rockwell'] = true; - t['Roman'] = true; - t['Rotis Serif'] = true; - t['Sabon'] = true; - t['Scala'] = true; - t['Seagull'] = true; - t['Sistina'] = true; - t['Souvenir'] = true; - t['STIX'] = true; - t['Stone Informal'] = true; - t['Stone Serif'] = true; - t['Sylfaen'] = true; - t['Times'] = true; - t['Trajan'] = true; - t['Trinité'] = true; - t['Trump Mediaeval'] = true; - t['Utopia'] = true; - t['Vale Type'] = true; - t['Bitstream Vera'] = true; - t['Vera Serif'] = true; - t['Versailles'] = true; - t['Wanted'] = true; - t['Weiss'] = true; - t['Wide Latin'] = true; - t['Windsor'] = true; - t['XITS'] = true; - }); - var getSymbolsFonts = getLookupTableFactory(function (t) { - t['Dingbats'] = true; - t['Symbol'] = true; - t['ZapfDingbats'] = true; - }); - var getGlyphMapForStandardFonts = getLookupTableFactory(function (t) { - t[2] = 10; - t[3] = 32; - t[4] = 33; - t[5] = 34; - t[6] = 35; - t[7] = 36; - t[8] = 37; - t[9] = 38; - t[10] = 39; - t[11] = 40; - t[12] = 41; - t[13] = 42; - t[14] = 43; - t[15] = 44; - t[16] = 45; - t[17] = 46; - t[18] = 47; - t[19] = 48; - t[20] = 49; - t[21] = 50; - t[22] = 51; - t[23] = 52; - t[24] = 53; - t[25] = 54; - t[26] = 55; - t[27] = 56; - t[28] = 57; - t[29] = 58; - t[30] = 894; - t[31] = 60; - t[32] = 61; - t[33] = 62; - t[34] = 63; - t[35] = 64; - t[36] = 65; - t[37] = 66; - t[38] = 67; - t[39] = 68; - t[40] = 69; - t[41] = 70; - t[42] = 71; - t[43] = 72; - t[44] = 73; - t[45] = 74; - t[46] = 75; - t[47] = 76; - t[48] = 77; - t[49] = 78; - t[50] = 79; - t[51] = 80; - t[52] = 81; - t[53] = 82; - t[54] = 83; - t[55] = 84; - t[56] = 85; - t[57] = 86; - t[58] = 87; - t[59] = 88; - t[60] = 89; - t[61] = 90; - t[62] = 91; - t[63] = 92; - t[64] = 93; - t[65] = 94; - t[66] = 95; - t[67] = 96; - t[68] = 97; - t[69] = 98; - t[70] = 99; - t[71] = 100; - t[72] = 101; - t[73] = 102; - t[74] = 103; - t[75] = 104; - t[76] = 105; - t[77] = 106; - t[78] = 107; - t[79] = 108; - t[80] = 109; - t[81] = 110; - t[82] = 111; - t[83] = 112; - t[84] = 113; - t[85] = 114; - t[86] = 115; - t[87] = 116; - t[88] = 117; - t[89] = 118; - t[90] = 119; - t[91] = 120; - t[92] = 121; - t[93] = 122; - t[94] = 123; - t[95] = 124; - t[96] = 125; - t[97] = 126; - t[98] = 196; - t[99] = 197; - t[100] = 199; - t[101] = 201; - t[102] = 209; - t[103] = 214; - t[104] = 220; - t[105] = 225; - t[106] = 224; - t[107] = 226; - t[108] = 228; - t[109] = 227; - t[110] = 229; - t[111] = 231; - t[112] = 233; - t[113] = 232; - t[114] = 234; - t[115] = 235; - t[116] = 237; - t[117] = 236; - t[118] = 238; - t[119] = 239; - t[120] = 241; - t[121] = 243; - t[122] = 242; - t[123] = 244; - t[124] = 246; - t[125] = 245; - t[126] = 250; - t[127] = 249; - t[128] = 251; - t[129] = 252; - t[130] = 8224; - t[131] = 176; - t[132] = 162; - t[133] = 163; - t[134] = 167; - t[135] = 8226; - t[136] = 182; - t[137] = 223; - t[138] = 174; - t[139] = 169; - t[140] = 8482; - t[141] = 180; - t[142] = 168; - t[143] = 8800; - t[144] = 198; - t[145] = 216; - t[146] = 8734; - t[147] = 177; - t[148] = 8804; - t[149] = 8805; - t[150] = 165; - t[151] = 181; - t[152] = 8706; - t[153] = 8721; - t[154] = 8719; - t[156] = 8747; - t[157] = 170; - t[158] = 186; - t[159] = 8486; - t[160] = 230; - t[161] = 248; - t[162] = 191; - t[163] = 161; - t[164] = 172; - t[165] = 8730; - t[166] = 402; - t[167] = 8776; - t[168] = 8710; - t[169] = 171; - t[170] = 187; - t[171] = 8230; - t[210] = 218; - t[223] = 711; - t[224] = 321; - t[225] = 322; - t[227] = 353; - t[229] = 382; - t[234] = 253; - t[252] = 263; - t[253] = 268; - t[254] = 269; - t[258] = 258; - t[260] = 260; - t[261] = 261; - t[265] = 280; - t[266] = 281; - t[268] = 283; - t[269] = 313; - t[275] = 323; - t[276] = 324; - t[278] = 328; - t[284] = 345; - t[285] = 346; - t[286] = 347; - t[292] = 367; - t[295] = 377; - t[296] = 378; - t[298] = 380; - t[305] = 963; - t[306] = 964; - t[307] = 966; - t[308] = 8215; - t[309] = 8252; - t[310] = 8319; - t[311] = 8359; - t[312] = 8592; - t[313] = 8593; - t[337] = 9552; - t[493] = 1039; - t[494] = 1040; - t[705] = 1524; - t[706] = 8362; - t[710] = 64288; - t[711] = 64298; - t[759] = 1617; - t[761] = 1776; - t[763] = 1778; - t[775] = 1652; - t[777] = 1764; - t[778] = 1780; - t[779] = 1781; - t[780] = 1782; - t[782] = 771; - t[783] = 64726; - t[786] = 8363; - t[788] = 8532; - t[790] = 768; - t[791] = 769; - t[792] = 768; - t[795] = 803; - t[797] = 64336; - t[798] = 64337; - t[799] = 64342; - t[800] = 64343; - t[801] = 64344; - t[802] = 64345; - t[803] = 64362; - t[804] = 64363; - t[805] = 64364; - t[2424] = 7821; - t[2425] = 7822; - t[2426] = 7823; - t[2427] = 7824; - t[2428] = 7825; - t[2429] = 7826; - t[2430] = 7827; - t[2433] = 7682; - t[2678] = 8045; - t[2679] = 8046; - t[2830] = 1552; - t[2838] = 686; - t[2840] = 751; - t[2842] = 753; - t[2843] = 754; - t[2844] = 755; - t[2846] = 757; - t[2856] = 767; - t[2857] = 848; - t[2858] = 849; - t[2862] = 853; - t[2863] = 854; - t[2864] = 855; - t[2865] = 861; - t[2866] = 862; - t[2906] = 7460; - t[2908] = 7462; - t[2909] = 7463; - t[2910] = 7464; - t[2912] = 7466; - t[2913] = 7467; - t[2914] = 7468; - t[2916] = 7470; - t[2917] = 7471; - t[2918] = 7472; - t[2920] = 7474; - t[2921] = 7475; - t[2922] = 7476; - t[2924] = 7478; - t[2925] = 7479; - t[2926] = 7480; - t[2928] = 7482; - t[2929] = 7483; - t[2930] = 7484; - t[2932] = 7486; - t[2933] = 7487; - t[2934] = 7488; - t[2936] = 7490; - t[2937] = 7491; - t[2938] = 7492; - t[2940] = 7494; - t[2941] = 7495; - t[2942] = 7496; - t[2944] = 7498; - t[2946] = 7500; - t[2948] = 7502; - t[2950] = 7504; - t[2951] = 7505; - t[2952] = 7506; - t[2954] = 7508; - t[2955] = 7509; - t[2956] = 7510; - t[2958] = 7512; - t[2959] = 7513; - t[2960] = 7514; - t[2962] = 7516; - t[2963] = 7517; - t[2964] = 7518; - t[2966] = 7520; - t[2967] = 7521; - t[2968] = 7522; - t[2970] = 7524; - t[2971] = 7525; - t[2972] = 7526; - t[2974] = 7528; - t[2975] = 7529; - t[2976] = 7530; - t[2978] = 1537; - t[2979] = 1538; - t[2980] = 1539; - t[2982] = 1549; - t[2983] = 1551; - t[2984] = 1552; - t[2986] = 1554; - t[2987] = 1555; - t[2988] = 1556; - t[2990] = 1623; - t[2991] = 1624; - t[2995] = 1775; - t[2999] = 1791; - t[3002] = 64290; - t[3003] = 64291; - t[3004] = 64292; - t[3006] = 64294; - t[3007] = 64295; - t[3008] = 64296; - t[3011] = 1900; - t[3014] = 8223; - t[3015] = 8244; - t[3017] = 7532; - t[3018] = 7533; - t[3019] = 7534; - t[3075] = 7590; - t[3076] = 7591; - t[3079] = 7594; - t[3080] = 7595; - t[3083] = 7598; - t[3084] = 7599; - t[3087] = 7602; - t[3088] = 7603; - t[3091] = 7606; - t[3092] = 7607; - t[3095] = 7610; - t[3096] = 7611; - t[3099] = 7614; - t[3100] = 7615; - t[3103] = 7618; - t[3104] = 7619; - t[3107] = 8337; - t[3108] = 8338; - t[3116] = 1884; - t[3119] = 1885; - t[3120] = 1885; - t[3123] = 1886; - t[3124] = 1886; - t[3127] = 1887; - t[3128] = 1887; - t[3131] = 1888; - t[3132] = 1888; - t[3135] = 1889; - t[3136] = 1889; - t[3139] = 1890; - t[3140] = 1890; - t[3143] = 1891; - t[3144] = 1891; - t[3147] = 1892; - t[3148] = 1892; - t[3153] = 580; - t[3154] = 581; - t[3157] = 584; - t[3158] = 585; - t[3161] = 588; - t[3162] = 589; - t[3165] = 891; - t[3166] = 892; - t[3169] = 1274; - t[3170] = 1275; - t[3173] = 1278; - t[3174] = 1279; - t[3181] = 7622; - t[3182] = 7623; - t[3282] = 11799; - t[3316] = 578; - t[3379] = 42785; - t[3393] = 1159; - t[3416] = 8377; - }); - var getSupplementalGlyphMapForArialBlack = getLookupTableFactory(function (t) { - t[227] = 322; - t[264] = 261; - t[291] = 346; - }); - exports.getStdFontMap = getStdFontMap; - exports.getNonStdFontMap = getNonStdFontMap; - exports.getSerifFonts = getSerifFonts; - exports.getSymbolsFonts = getSymbolsFonts; - exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts; - exports.getSupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack; - })); - (function (root, factory) { - factory(root.pdfjsCoreUnicode = {}, root.pdfjsSharedUtil); - }(this, function (exports, sharedUtil) { - var getLookupTableFactory = sharedUtil.getLookupTableFactory; - var getSpecialPUASymbols = getLookupTableFactory(function (t) { - t[63721] = 0x00A9; - t[63193] = 0x00A9; - t[63720] = 0x00AE; - t[63194] = 0x00AE; - t[63722] = 0x2122; - t[63195] = 0x2122; - t[63729] = 0x23A7; - t[63730] = 0x23A8; - t[63731] = 0x23A9; - t[63740] = 0x23AB; - t[63741] = 0x23AC; - t[63742] = 0x23AD; - t[63726] = 0x23A1; - t[63727] = 0x23A2; - t[63728] = 0x23A3; - t[63737] = 0x23A4; - t[63738] = 0x23A5; - t[63739] = 0x23A6; - t[63723] = 0x239B; - t[63724] = 0x239C; - t[63725] = 0x239D; - t[63734] = 0x239E; - t[63735] = 0x239F; - t[63736] = 0x23A0; - }); - function mapSpecialUnicodeValues(code) { - if (code >= 0xFFF0 && code <= 0xFFFF) { - return 0; - } else if (code >= 0xF600 && code <= 0xF8FF) { - return getSpecialPUASymbols()[code] || code; - } - return code; - } - function getUnicodeForGlyph(name, glyphsUnicodeMap) { - var unicode = glyphsUnicodeMap[name]; - if (unicode !== undefined) { - return unicode; - } - if (!name) { - return -1; - } - if (name[0] === 'u') { - var nameLen = name.length, hexStr; - if (nameLen === 7 && name[1] === 'n' && name[2] === 'i') { - hexStr = name.substr(3); - } else if (nameLen >= 5 && nameLen <= 7) { - hexStr = name.substr(1); - } else { - return -1; - } - if (hexStr === hexStr.toUpperCase()) { - unicode = parseInt(hexStr, 16); - if (unicode >= 0) { - return unicode; - } - } - } - return -1; - } - var UnicodeRanges = [ - { - 'begin': 0x0000, - 'end': 0x007F - }, - { - 'begin': 0x0080, - 'end': 0x00FF - }, - { - 'begin': 0x0100, - 'end': 0x017F - }, - { - 'begin': 0x0180, - 'end': 0x024F - }, - { - 'begin': 0x0250, - 'end': 0x02AF - }, - { - 'begin': 0x02B0, - 'end': 0x02FF - }, - { - 'begin': 0x0300, - 'end': 0x036F - }, - { - 'begin': 0x0370, - 'end': 0x03FF - }, - { - 'begin': 0x2C80, - 'end': 0x2CFF - }, - { - 'begin': 0x0400, - 'end': 0x04FF - }, - { - 'begin': 0x0530, - 'end': 0x058F - }, - { - 'begin': 0x0590, - 'end': 0x05FF - }, - { - 'begin': 0xA500, - 'end': 0xA63F - }, - { - 'begin': 0x0600, - 'end': 0x06FF - }, - { - 'begin': 0x07C0, - 'end': 0x07FF - }, - { - 'begin': 0x0900, - 'end': 0x097F - }, - { - 'begin': 0x0980, - 'end': 0x09FF - }, - { - 'begin': 0x0A00, - 'end': 0x0A7F - }, - { - 'begin': 0x0A80, - 'end': 0x0AFF - }, - { - 'begin': 0x0B00, - 'end': 0x0B7F - }, - { - 'begin': 0x0B80, - 'end': 0x0BFF - }, - { - 'begin': 0x0C00, - 'end': 0x0C7F - }, - { - 'begin': 0x0C80, - 'end': 0x0CFF - }, - { - 'begin': 0x0D00, - 'end': 0x0D7F - }, - { - 'begin': 0x0E00, - 'end': 0x0E7F - }, - { - 'begin': 0x0E80, - 'end': 0x0EFF - }, - { - 'begin': 0x10A0, - 'end': 0x10FF - }, - { - 'begin': 0x1B00, - 'end': 0x1B7F - }, - { - 'begin': 0x1100, - 'end': 0x11FF - }, - { - 'begin': 0x1E00, - 'end': 0x1EFF - }, - { - 'begin': 0x1F00, - 'end': 0x1FFF - }, - { - 'begin': 0x2000, - 'end': 0x206F - }, - { - 'begin': 0x2070, - 'end': 0x209F - }, - { - 'begin': 0x20A0, - 'end': 0x20CF - }, - { - 'begin': 0x20D0, - 'end': 0x20FF - }, - { - 'begin': 0x2100, - 'end': 0x214F - }, - { - 'begin': 0x2150, - 'end': 0x218F - }, - { - 'begin': 0x2190, - 'end': 0x21FF - }, - { - 'begin': 0x2200, - 'end': 0x22FF - }, - { - 'begin': 0x2300, - 'end': 0x23FF - }, - { - 'begin': 0x2400, - 'end': 0x243F - }, - { - 'begin': 0x2440, - 'end': 0x245F - }, - { - 'begin': 0x2460, - 'end': 0x24FF - }, - { - 'begin': 0x2500, - 'end': 0x257F - }, - { - 'begin': 0x2580, - 'end': 0x259F - }, - { - 'begin': 0x25A0, - 'end': 0x25FF - }, - { - 'begin': 0x2600, - 'end': 0x26FF - }, - { - 'begin': 0x2700, - 'end': 0x27BF - }, - { - 'begin': 0x3000, - 'end': 0x303F - }, - { - 'begin': 0x3040, - 'end': 0x309F - }, - { - 'begin': 0x30A0, - 'end': 0x30FF - }, - { - 'begin': 0x3100, - 'end': 0x312F - }, - { - 'begin': 0x3130, - 'end': 0x318F - }, - { - 'begin': 0xA840, - 'end': 0xA87F - }, - { - 'begin': 0x3200, - 'end': 0x32FF - }, - { - 'begin': 0x3300, - 'end': 0x33FF - }, - { - 'begin': 0xAC00, - 'end': 0xD7AF - }, - { - 'begin': 0xD800, - 'end': 0xDFFF - }, - { - 'begin': 0x10900, - 'end': 0x1091F - }, - { - 'begin': 0x4E00, - 'end': 0x9FFF - }, - { - 'begin': 0xE000, - 'end': 0xF8FF - }, - { - 'begin': 0x31C0, - 'end': 0x31EF - }, - { - 'begin': 0xFB00, - 'end': 0xFB4F - }, - { - 'begin': 0xFB50, - 'end': 0xFDFF - }, - { - 'begin': 0xFE20, - 'end': 0xFE2F - }, - { - 'begin': 0xFE10, - 'end': 0xFE1F - }, - { - 'begin': 0xFE50, - 'end': 0xFE6F - }, - { - 'begin': 0xFE70, - 'end': 0xFEFF - }, - { - 'begin': 0xFF00, - 'end': 0xFFEF - }, - { - 'begin': 0xFFF0, - 'end': 0xFFFF - }, - { - 'begin': 0x0F00, - 'end': 0x0FFF - }, - { - 'begin': 0x0700, - 'end': 0x074F - }, - { - 'begin': 0x0780, - 'end': 0x07BF - }, - { - 'begin': 0x0D80, - 'end': 0x0DFF - }, - { - 'begin': 0x1000, - 'end': 0x109F - }, - { - 'begin': 0x1200, - 'end': 0x137F - }, - { - 'begin': 0x13A0, - 'end': 0x13FF - }, - { - 'begin': 0x1400, - 'end': 0x167F - }, - { - 'begin': 0x1680, - 'end': 0x169F - }, - { - 'begin': 0x16A0, - 'end': 0x16FF - }, - { - 'begin': 0x1780, - 'end': 0x17FF - }, - { - 'begin': 0x1800, - 'end': 0x18AF - }, - { - 'begin': 0x2800, - 'end': 0x28FF - }, - { - 'begin': 0xA000, - 'end': 0xA48F - }, - { - 'begin': 0x1700, - 'end': 0x171F - }, - { - 'begin': 0x10300, - 'end': 0x1032F - }, - { - 'begin': 0x10330, - 'end': 0x1034F - }, - { - 'begin': 0x10400, - 'end': 0x1044F - }, - { - 'begin': 0x1D000, - 'end': 0x1D0FF - }, - { - 'begin': 0x1D400, - 'end': 0x1D7FF - }, - { - 'begin': 0xFF000, - 'end': 0xFFFFD - }, - { - 'begin': 0xFE00, - 'end': 0xFE0F - }, - { - 'begin': 0xE0000, - 'end': 0xE007F - }, - { - 'begin': 0x1900, - 'end': 0x194F - }, - { - 'begin': 0x1950, - 'end': 0x197F - }, - { - 'begin': 0x1980, - 'end': 0x19DF - }, - { - 'begin': 0x1A00, - 'end': 0x1A1F - }, - { - 'begin': 0x2C00, - 'end': 0x2C5F - }, - { - 'begin': 0x2D30, - 'end': 0x2D7F - }, - { - 'begin': 0x4DC0, - 'end': 0x4DFF - }, - { - 'begin': 0xA800, - 'end': 0xA82F - }, - { - 'begin': 0x10000, - 'end': 0x1007F - }, - { - 'begin': 0x10140, - 'end': 0x1018F - }, - { - 'begin': 0x10380, - 'end': 0x1039F - }, - { - 'begin': 0x103A0, - 'end': 0x103DF - }, - { - 'begin': 0x10450, - 'end': 0x1047F - }, - { - 'begin': 0x10480, - 'end': 0x104AF - }, - { - 'begin': 0x10800, - 'end': 0x1083F - }, - { - 'begin': 0x10A00, - 'end': 0x10A5F - }, - { - 'begin': 0x1D300, - 'end': 0x1D35F - }, - { - 'begin': 0x12000, - 'end': 0x123FF - }, - { - 'begin': 0x1D360, - 'end': 0x1D37F - }, - { - 'begin': 0x1B80, - 'end': 0x1BBF - }, - { - 'begin': 0x1C00, - 'end': 0x1C4F - }, - { - 'begin': 0x1C50, - 'end': 0x1C7F - }, - { - 'begin': 0xA880, - 'end': 0xA8DF - }, - { - 'begin': 0xA900, - 'end': 0xA92F - }, - { - 'begin': 0xA930, - 'end': 0xA95F - }, - { - 'begin': 0xAA00, - 'end': 0xAA5F - }, - { - 'begin': 0x10190, - 'end': 0x101CF - }, - { - 'begin': 0x101D0, - 'end': 0x101FF - }, - { - 'begin': 0x102A0, - 'end': 0x102DF - }, - { - 'begin': 0x1F030, - 'end': 0x1F09F - } - ]; - function getUnicodeRangeFor(value) { - for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) { - var range = UnicodeRanges[i]; - if (value >= range.begin && value < range.end) { - return i; - } - } - return -1; - } - function isRTLRangeFor(value) { - var range = UnicodeRanges[13]; - if (value >= range.begin && value < range.end) { - return true; - } - range = UnicodeRanges[11]; - if (value >= range.begin && value < range.end) { - return true; - } - return false; - } - var getNormalizedUnicodes = getLookupTableFactory(function (t) { - t['\u00A8'] = '\u0020\u0308'; - t['\u00AF'] = '\u0020\u0304'; - t['\u00B4'] = '\u0020\u0301'; - t['\u00B5'] = '\u03BC'; - t['\u00B8'] = '\u0020\u0327'; - t['\u0132'] = '\u0049\u004A'; - t['\u0133'] = '\u0069\u006A'; - t['\u013F'] = '\u004C\u00B7'; - t['\u0140'] = '\u006C\u00B7'; - t['\u0149'] = '\u02BC\u006E'; - t['\u017F'] = '\u0073'; - t['\u01C4'] = '\u0044\u017D'; - t['\u01C5'] = '\u0044\u017E'; - t['\u01C6'] = '\u0064\u017E'; - t['\u01C7'] = '\u004C\u004A'; - t['\u01C8'] = '\u004C\u006A'; - t['\u01C9'] = '\u006C\u006A'; - t['\u01CA'] = '\u004E\u004A'; - t['\u01CB'] = '\u004E\u006A'; - t['\u01CC'] = '\u006E\u006A'; - t['\u01F1'] = '\u0044\u005A'; - t['\u01F2'] = '\u0044\u007A'; - t['\u01F3'] = '\u0064\u007A'; - t['\u02D8'] = '\u0020\u0306'; - t['\u02D9'] = '\u0020\u0307'; - t['\u02DA'] = '\u0020\u030A'; - t['\u02DB'] = '\u0020\u0328'; - t['\u02DC'] = '\u0020\u0303'; - t['\u02DD'] = '\u0020\u030B'; - t['\u037A'] = '\u0020\u0345'; - t['\u0384'] = '\u0020\u0301'; - t['\u03D0'] = '\u03B2'; - t['\u03D1'] = '\u03B8'; - t['\u03D2'] = '\u03A5'; - t['\u03D5'] = '\u03C6'; - t['\u03D6'] = '\u03C0'; - t['\u03F0'] = '\u03BA'; - t['\u03F1'] = '\u03C1'; - t['\u03F2'] = '\u03C2'; - t['\u03F4'] = '\u0398'; - t['\u03F5'] = '\u03B5'; - t['\u03F9'] = '\u03A3'; - t['\u0587'] = '\u0565\u0582'; - t['\u0675'] = '\u0627\u0674'; - t['\u0676'] = '\u0648\u0674'; - t['\u0677'] = '\u06C7\u0674'; - t['\u0678'] = '\u064A\u0674'; - t['\u0E33'] = '\u0E4D\u0E32'; - t['\u0EB3'] = '\u0ECD\u0EB2'; - t['\u0EDC'] = '\u0EAB\u0E99'; - t['\u0EDD'] = '\u0EAB\u0EA1'; - t['\u0F77'] = '\u0FB2\u0F81'; - t['\u0F79'] = '\u0FB3\u0F81'; - t['\u1E9A'] = '\u0061\u02BE'; - t['\u1FBD'] = '\u0020\u0313'; - t['\u1FBF'] = '\u0020\u0313'; - t['\u1FC0'] = '\u0020\u0342'; - t['\u1FFE'] = '\u0020\u0314'; - t['\u2002'] = '\u0020'; - t['\u2003'] = '\u0020'; - t['\u2004'] = '\u0020'; - t['\u2005'] = '\u0020'; - t['\u2006'] = '\u0020'; - t['\u2008'] = '\u0020'; - t['\u2009'] = '\u0020'; - t['\u200A'] = '\u0020'; - t['\u2017'] = '\u0020\u0333'; - t['\u2024'] = '\u002E'; - t['\u2025'] = '\u002E\u002E'; - t['\u2026'] = '\u002E\u002E\u002E'; - t['\u2033'] = '\u2032\u2032'; - t['\u2034'] = '\u2032\u2032\u2032'; - t['\u2036'] = '\u2035\u2035'; - t['\u2037'] = '\u2035\u2035\u2035'; - t['\u203C'] = '\u0021\u0021'; - t['\u203E'] = '\u0020\u0305'; - t['\u2047'] = '\u003F\u003F'; - t['\u2048'] = '\u003F\u0021'; - t['\u2049'] = '\u0021\u003F'; - t['\u2057'] = '\u2032\u2032\u2032\u2032'; - t['\u205F'] = '\u0020'; - t['\u20A8'] = '\u0052\u0073'; - t['\u2100'] = '\u0061\u002F\u0063'; - t['\u2101'] = '\u0061\u002F\u0073'; - t['\u2103'] = '\u00B0\u0043'; - t['\u2105'] = '\u0063\u002F\u006F'; - t['\u2106'] = '\u0063\u002F\u0075'; - t['\u2107'] = '\u0190'; - t['\u2109'] = '\u00B0\u0046'; - t['\u2116'] = '\u004E\u006F'; - t['\u2121'] = '\u0054\u0045\u004C'; - t['\u2135'] = '\u05D0'; - t['\u2136'] = '\u05D1'; - t['\u2137'] = '\u05D2'; - t['\u2138'] = '\u05D3'; - t['\u213B'] = '\u0046\u0041\u0058'; - t['\u2160'] = '\u0049'; - t['\u2161'] = '\u0049\u0049'; - t['\u2162'] = '\u0049\u0049\u0049'; - t['\u2163'] = '\u0049\u0056'; - t['\u2164'] = '\u0056'; - t['\u2165'] = '\u0056\u0049'; - t['\u2166'] = '\u0056\u0049\u0049'; - t['\u2167'] = '\u0056\u0049\u0049\u0049'; - t['\u2168'] = '\u0049\u0058'; - t['\u2169'] = '\u0058'; - t['\u216A'] = '\u0058\u0049'; - t['\u216B'] = '\u0058\u0049\u0049'; - t['\u216C'] = '\u004C'; - t['\u216D'] = '\u0043'; - t['\u216E'] = '\u0044'; - t['\u216F'] = '\u004D'; - t['\u2170'] = '\u0069'; - t['\u2171'] = '\u0069\u0069'; - t['\u2172'] = '\u0069\u0069\u0069'; - t['\u2173'] = '\u0069\u0076'; - t['\u2174'] = '\u0076'; - t['\u2175'] = '\u0076\u0069'; - t['\u2176'] = '\u0076\u0069\u0069'; - t['\u2177'] = '\u0076\u0069\u0069\u0069'; - t['\u2178'] = '\u0069\u0078'; - t['\u2179'] = '\u0078'; - t['\u217A'] = '\u0078\u0069'; - t['\u217B'] = '\u0078\u0069\u0069'; - t['\u217C'] = '\u006C'; - t['\u217D'] = '\u0063'; - t['\u217E'] = '\u0064'; - t['\u217F'] = '\u006D'; - t['\u222C'] = '\u222B\u222B'; - t['\u222D'] = '\u222B\u222B\u222B'; - t['\u222F'] = '\u222E\u222E'; - t['\u2230'] = '\u222E\u222E\u222E'; - t['\u2474'] = '\u0028\u0031\u0029'; - t['\u2475'] = '\u0028\u0032\u0029'; - t['\u2476'] = '\u0028\u0033\u0029'; - t['\u2477'] = '\u0028\u0034\u0029'; - t['\u2478'] = '\u0028\u0035\u0029'; - t['\u2479'] = '\u0028\u0036\u0029'; - t['\u247A'] = '\u0028\u0037\u0029'; - t['\u247B'] = '\u0028\u0038\u0029'; - t['\u247C'] = '\u0028\u0039\u0029'; - t['\u247D'] = '\u0028\u0031\u0030\u0029'; - t['\u247E'] = '\u0028\u0031\u0031\u0029'; - t['\u247F'] = '\u0028\u0031\u0032\u0029'; - t['\u2480'] = '\u0028\u0031\u0033\u0029'; - t['\u2481'] = '\u0028\u0031\u0034\u0029'; - t['\u2482'] = '\u0028\u0031\u0035\u0029'; - t['\u2483'] = '\u0028\u0031\u0036\u0029'; - t['\u2484'] = '\u0028\u0031\u0037\u0029'; - t['\u2485'] = '\u0028\u0031\u0038\u0029'; - t['\u2486'] = '\u0028\u0031\u0039\u0029'; - t['\u2487'] = '\u0028\u0032\u0030\u0029'; - t['\u2488'] = '\u0031\u002E'; - t['\u2489'] = '\u0032\u002E'; - t['\u248A'] = '\u0033\u002E'; - t['\u248B'] = '\u0034\u002E'; - t['\u248C'] = '\u0035\u002E'; - t['\u248D'] = '\u0036\u002E'; - t['\u248E'] = '\u0037\u002E'; - t['\u248F'] = '\u0038\u002E'; - t['\u2490'] = '\u0039\u002E'; - t['\u2491'] = '\u0031\u0030\u002E'; - t['\u2492'] = '\u0031\u0031\u002E'; - t['\u2493'] = '\u0031\u0032\u002E'; - t['\u2494'] = '\u0031\u0033\u002E'; - t['\u2495'] = '\u0031\u0034\u002E'; - t['\u2496'] = '\u0031\u0035\u002E'; - t['\u2497'] = '\u0031\u0036\u002E'; - t['\u2498'] = '\u0031\u0037\u002E'; - t['\u2499'] = '\u0031\u0038\u002E'; - t['\u249A'] = '\u0031\u0039\u002E'; - t['\u249B'] = '\u0032\u0030\u002E'; - t['\u249C'] = '\u0028\u0061\u0029'; - t['\u249D'] = '\u0028\u0062\u0029'; - t['\u249E'] = '\u0028\u0063\u0029'; - t['\u249F'] = '\u0028\u0064\u0029'; - t['\u24A0'] = '\u0028\u0065\u0029'; - t['\u24A1'] = '\u0028\u0066\u0029'; - t['\u24A2'] = '\u0028\u0067\u0029'; - t['\u24A3'] = '\u0028\u0068\u0029'; - t['\u24A4'] = '\u0028\u0069\u0029'; - t['\u24A5'] = '\u0028\u006A\u0029'; - t['\u24A6'] = '\u0028\u006B\u0029'; - t['\u24A7'] = '\u0028\u006C\u0029'; - t['\u24A8'] = '\u0028\u006D\u0029'; - t['\u24A9'] = '\u0028\u006E\u0029'; - t['\u24AA'] = '\u0028\u006F\u0029'; - t['\u24AB'] = '\u0028\u0070\u0029'; - t['\u24AC'] = '\u0028\u0071\u0029'; - t['\u24AD'] = '\u0028\u0072\u0029'; - t['\u24AE'] = '\u0028\u0073\u0029'; - t['\u24AF'] = '\u0028\u0074\u0029'; - t['\u24B0'] = '\u0028\u0075\u0029'; - t['\u24B1'] = '\u0028\u0076\u0029'; - t['\u24B2'] = '\u0028\u0077\u0029'; - t['\u24B3'] = '\u0028\u0078\u0029'; - t['\u24B4'] = '\u0028\u0079\u0029'; - t['\u24B5'] = '\u0028\u007A\u0029'; - t['\u2A0C'] = '\u222B\u222B\u222B\u222B'; - t['\u2A74'] = '\u003A\u003A\u003D'; - t['\u2A75'] = '\u003D\u003D'; - t['\u2A76'] = '\u003D\u003D\u003D'; - t['\u2E9F'] = '\u6BCD'; - t['\u2EF3'] = '\u9F9F'; - t['\u2F00'] = '\u4E00'; - t['\u2F01'] = '\u4E28'; - t['\u2F02'] = '\u4E36'; - t['\u2F03'] = '\u4E3F'; - t['\u2F04'] = '\u4E59'; - t['\u2F05'] = '\u4E85'; - t['\u2F06'] = '\u4E8C'; - t['\u2F07'] = '\u4EA0'; - t['\u2F08'] = '\u4EBA'; - t['\u2F09'] = '\u513F'; - t['\u2F0A'] = '\u5165'; - t['\u2F0B'] = '\u516B'; - t['\u2F0C'] = '\u5182'; - t['\u2F0D'] = '\u5196'; - t['\u2F0E'] = '\u51AB'; - t['\u2F0F'] = '\u51E0'; - t['\u2F10'] = '\u51F5'; - t['\u2F11'] = '\u5200'; - t['\u2F12'] = '\u529B'; - t['\u2F13'] = '\u52F9'; - t['\u2F14'] = '\u5315'; - t['\u2F15'] = '\u531A'; - t['\u2F16'] = '\u5338'; - t['\u2F17'] = '\u5341'; - t['\u2F18'] = '\u535C'; - t['\u2F19'] = '\u5369'; - t['\u2F1A'] = '\u5382'; - t['\u2F1B'] = '\u53B6'; - t['\u2F1C'] = '\u53C8'; - t['\u2F1D'] = '\u53E3'; - t['\u2F1E'] = '\u56D7'; - t['\u2F1F'] = '\u571F'; - t['\u2F20'] = '\u58EB'; - t['\u2F21'] = '\u5902'; - t['\u2F22'] = '\u590A'; - t['\u2F23'] = '\u5915'; - t['\u2F24'] = '\u5927'; - t['\u2F25'] = '\u5973'; - t['\u2F26'] = '\u5B50'; - t['\u2F27'] = '\u5B80'; - t['\u2F28'] = '\u5BF8'; - t['\u2F29'] = '\u5C0F'; - t['\u2F2A'] = '\u5C22'; - t['\u2F2B'] = '\u5C38'; - t['\u2F2C'] = '\u5C6E'; - t['\u2F2D'] = '\u5C71'; - t['\u2F2E'] = '\u5DDB'; - t['\u2F2F'] = '\u5DE5'; - t['\u2F30'] = '\u5DF1'; - t['\u2F31'] = '\u5DFE'; - t['\u2F32'] = '\u5E72'; - t['\u2F33'] = '\u5E7A'; - t['\u2F34'] = '\u5E7F'; - t['\u2F35'] = '\u5EF4'; - t['\u2F36'] = '\u5EFE'; - t['\u2F37'] = '\u5F0B'; - t['\u2F38'] = '\u5F13'; - t['\u2F39'] = '\u5F50'; - t['\u2F3A'] = '\u5F61'; - t['\u2F3B'] = '\u5F73'; - t['\u2F3C'] = '\u5FC3'; - t['\u2F3D'] = '\u6208'; - t['\u2F3E'] = '\u6236'; - t['\u2F3F'] = '\u624B'; - t['\u2F40'] = '\u652F'; - t['\u2F41'] = '\u6534'; - t['\u2F42'] = '\u6587'; - t['\u2F43'] = '\u6597'; - t['\u2F44'] = '\u65A4'; - t['\u2F45'] = '\u65B9'; - t['\u2F46'] = '\u65E0'; - t['\u2F47'] = '\u65E5'; - t['\u2F48'] = '\u66F0'; - t['\u2F49'] = '\u6708'; - t['\u2F4A'] = '\u6728'; - t['\u2F4B'] = '\u6B20'; - t['\u2F4C'] = '\u6B62'; - t['\u2F4D'] = '\u6B79'; - t['\u2F4E'] = '\u6BB3'; - t['\u2F4F'] = '\u6BCB'; - t['\u2F50'] = '\u6BD4'; - t['\u2F51'] = '\u6BDB'; - t['\u2F52'] = '\u6C0F'; - t['\u2F53'] = '\u6C14'; - t['\u2F54'] = '\u6C34'; - t['\u2F55'] = '\u706B'; - t['\u2F56'] = '\u722A'; - t['\u2F57'] = '\u7236'; - t['\u2F58'] = '\u723B'; - t['\u2F59'] = '\u723F'; - t['\u2F5A'] = '\u7247'; - t['\u2F5B'] = '\u7259'; - t['\u2F5C'] = '\u725B'; - t['\u2F5D'] = '\u72AC'; - t['\u2F5E'] = '\u7384'; - t['\u2F5F'] = '\u7389'; - t['\u2F60'] = '\u74DC'; - t['\u2F61'] = '\u74E6'; - t['\u2F62'] = '\u7518'; - t['\u2F63'] = '\u751F'; - t['\u2F64'] = '\u7528'; - t['\u2F65'] = '\u7530'; - t['\u2F66'] = '\u758B'; - t['\u2F67'] = '\u7592'; - t['\u2F68'] = '\u7676'; - t['\u2F69'] = '\u767D'; - t['\u2F6A'] = '\u76AE'; - t['\u2F6B'] = '\u76BF'; - t['\u2F6C'] = '\u76EE'; - t['\u2F6D'] = '\u77DB'; - t['\u2F6E'] = '\u77E2'; - t['\u2F6F'] = '\u77F3'; - t['\u2F70'] = '\u793A'; - t['\u2F71'] = '\u79B8'; - t['\u2F72'] = '\u79BE'; - t['\u2F73'] = '\u7A74'; - t['\u2F74'] = '\u7ACB'; - t['\u2F75'] = '\u7AF9'; - t['\u2F76'] = '\u7C73'; - t['\u2F77'] = '\u7CF8'; - t['\u2F78'] = '\u7F36'; - t['\u2F79'] = '\u7F51'; - t['\u2F7A'] = '\u7F8A'; - t['\u2F7B'] = '\u7FBD'; - t['\u2F7C'] = '\u8001'; - t['\u2F7D'] = '\u800C'; - t['\u2F7E'] = '\u8012'; - t['\u2F7F'] = '\u8033'; - t['\u2F80'] = '\u807F'; - t['\u2F81'] = '\u8089'; - t['\u2F82'] = '\u81E3'; - t['\u2F83'] = '\u81EA'; - t['\u2F84'] = '\u81F3'; - t['\u2F85'] = '\u81FC'; - t['\u2F86'] = '\u820C'; - t['\u2F87'] = '\u821B'; - t['\u2F88'] = '\u821F'; - t['\u2F89'] = '\u826E'; - t['\u2F8A'] = '\u8272'; - t['\u2F8B'] = '\u8278'; - t['\u2F8C'] = '\u864D'; - t['\u2F8D'] = '\u866B'; - t['\u2F8E'] = '\u8840'; - t['\u2F8F'] = '\u884C'; - t['\u2F90'] = '\u8863'; - t['\u2F91'] = '\u897E'; - t['\u2F92'] = '\u898B'; - t['\u2F93'] = '\u89D2'; - t['\u2F94'] = '\u8A00'; - t['\u2F95'] = '\u8C37'; - t['\u2F96'] = '\u8C46'; - t['\u2F97'] = '\u8C55'; - t['\u2F98'] = '\u8C78'; - t['\u2F99'] = '\u8C9D'; - t['\u2F9A'] = '\u8D64'; - t['\u2F9B'] = '\u8D70'; - t['\u2F9C'] = '\u8DB3'; - t['\u2F9D'] = '\u8EAB'; - t['\u2F9E'] = '\u8ECA'; - t['\u2F9F'] = '\u8F9B'; - t['\u2FA0'] = '\u8FB0'; - t['\u2FA1'] = '\u8FB5'; - t['\u2FA2'] = '\u9091'; - t['\u2FA3'] = '\u9149'; - t['\u2FA4'] = '\u91C6'; - t['\u2FA5'] = '\u91CC'; - t['\u2FA6'] = '\u91D1'; - t['\u2FA7'] = '\u9577'; - t['\u2FA8'] = '\u9580'; - t['\u2FA9'] = '\u961C'; - t['\u2FAA'] = '\u96B6'; - t['\u2FAB'] = '\u96B9'; - t['\u2FAC'] = '\u96E8'; - t['\u2FAD'] = '\u9751'; - t['\u2FAE'] = '\u975E'; - t['\u2FAF'] = '\u9762'; - t['\u2FB0'] = '\u9769'; - t['\u2FB1'] = '\u97CB'; - t['\u2FB2'] = '\u97ED'; - t['\u2FB3'] = '\u97F3'; - t['\u2FB4'] = '\u9801'; - t['\u2FB5'] = '\u98A8'; - t['\u2FB6'] = '\u98DB'; - t['\u2FB7'] = '\u98DF'; - t['\u2FB8'] = '\u9996'; - t['\u2FB9'] = '\u9999'; - t['\u2FBA'] = '\u99AC'; - t['\u2FBB'] = '\u9AA8'; - t['\u2FBC'] = '\u9AD8'; - t['\u2FBD'] = '\u9ADF'; - t['\u2FBE'] = '\u9B25'; - t['\u2FBF'] = '\u9B2F'; - t['\u2FC0'] = '\u9B32'; - t['\u2FC1'] = '\u9B3C'; - t['\u2FC2'] = '\u9B5A'; - t['\u2FC3'] = '\u9CE5'; - t['\u2FC4'] = '\u9E75'; - t['\u2FC5'] = '\u9E7F'; - t['\u2FC6'] = '\u9EA5'; - t['\u2FC7'] = '\u9EBB'; - t['\u2FC8'] = '\u9EC3'; - t['\u2FC9'] = '\u9ECD'; - t['\u2FCA'] = '\u9ED1'; - t['\u2FCB'] = '\u9EF9'; - t['\u2FCC'] = '\u9EFD'; - t['\u2FCD'] = '\u9F0E'; - t['\u2FCE'] = '\u9F13'; - t['\u2FCF'] = '\u9F20'; - t['\u2FD0'] = '\u9F3B'; - t['\u2FD1'] = '\u9F4A'; - t['\u2FD2'] = '\u9F52'; - t['\u2FD3'] = '\u9F8D'; - t['\u2FD4'] = '\u9F9C'; - t['\u2FD5'] = '\u9FA0'; - t['\u3036'] = '\u3012'; - t['\u3038'] = '\u5341'; - t['\u3039'] = '\u5344'; - t['\u303A'] = '\u5345'; - t['\u309B'] = '\u0020\u3099'; - t['\u309C'] = '\u0020\u309A'; - t['\u3131'] = '\u1100'; - t['\u3132'] = '\u1101'; - t['\u3133'] = '\u11AA'; - t['\u3134'] = '\u1102'; - t['\u3135'] = '\u11AC'; - t['\u3136'] = '\u11AD'; - t['\u3137'] = '\u1103'; - t['\u3138'] = '\u1104'; - t['\u3139'] = '\u1105'; - t['\u313A'] = '\u11B0'; - t['\u313B'] = '\u11B1'; - t['\u313C'] = '\u11B2'; - t['\u313D'] = '\u11B3'; - t['\u313E'] = '\u11B4'; - t['\u313F'] = '\u11B5'; - t['\u3140'] = '\u111A'; - t['\u3141'] = '\u1106'; - t['\u3142'] = '\u1107'; - t['\u3143'] = '\u1108'; - t['\u3144'] = '\u1121'; - t['\u3145'] = '\u1109'; - t['\u3146'] = '\u110A'; - t['\u3147'] = '\u110B'; - t['\u3148'] = '\u110C'; - t['\u3149'] = '\u110D'; - t['\u314A'] = '\u110E'; - t['\u314B'] = '\u110F'; - t['\u314C'] = '\u1110'; - t['\u314D'] = '\u1111'; - t['\u314E'] = '\u1112'; - t['\u314F'] = '\u1161'; - t['\u3150'] = '\u1162'; - t['\u3151'] = '\u1163'; - t['\u3152'] = '\u1164'; - t['\u3153'] = '\u1165'; - t['\u3154'] = '\u1166'; - t['\u3155'] = '\u1167'; - t['\u3156'] = '\u1168'; - t['\u3157'] = '\u1169'; - t['\u3158'] = '\u116A'; - t['\u3159'] = '\u116B'; - t['\u315A'] = '\u116C'; - t['\u315B'] = '\u116D'; - t['\u315C'] = '\u116E'; - t['\u315D'] = '\u116F'; - t['\u315E'] = '\u1170'; - t['\u315F'] = '\u1171'; - t['\u3160'] = '\u1172'; - t['\u3161'] = '\u1173'; - t['\u3162'] = '\u1174'; - t['\u3163'] = '\u1175'; - t['\u3164'] = '\u1160'; - t['\u3165'] = '\u1114'; - t['\u3166'] = '\u1115'; - t['\u3167'] = '\u11C7'; - t['\u3168'] = '\u11C8'; - t['\u3169'] = '\u11CC'; - t['\u316A'] = '\u11CE'; - t['\u316B'] = '\u11D3'; - t['\u316C'] = '\u11D7'; - t['\u316D'] = '\u11D9'; - t['\u316E'] = '\u111C'; - t['\u316F'] = '\u11DD'; - t['\u3170'] = '\u11DF'; - t['\u3171'] = '\u111D'; - t['\u3172'] = '\u111E'; - t['\u3173'] = '\u1120'; - t['\u3174'] = '\u1122'; - t['\u3175'] = '\u1123'; - t['\u3176'] = '\u1127'; - t['\u3177'] = '\u1129'; - t['\u3178'] = '\u112B'; - t['\u3179'] = '\u112C'; - t['\u317A'] = '\u112D'; - t['\u317B'] = '\u112E'; - t['\u317C'] = '\u112F'; - t['\u317D'] = '\u1132'; - t['\u317E'] = '\u1136'; - t['\u317F'] = '\u1140'; - t['\u3180'] = '\u1147'; - t['\u3181'] = '\u114C'; - t['\u3182'] = '\u11F1'; - t['\u3183'] = '\u11F2'; - t['\u3184'] = '\u1157'; - t['\u3185'] = '\u1158'; - t['\u3186'] = '\u1159'; - t['\u3187'] = '\u1184'; - t['\u3188'] = '\u1185'; - t['\u3189'] = '\u1188'; - t['\u318A'] = '\u1191'; - t['\u318B'] = '\u1192'; - t['\u318C'] = '\u1194'; - t['\u318D'] = '\u119E'; - t['\u318E'] = '\u11A1'; - t['\u3200'] = '\u0028\u1100\u0029'; - t['\u3201'] = '\u0028\u1102\u0029'; - t['\u3202'] = '\u0028\u1103\u0029'; - t['\u3203'] = '\u0028\u1105\u0029'; - t['\u3204'] = '\u0028\u1106\u0029'; - t['\u3205'] = '\u0028\u1107\u0029'; - t['\u3206'] = '\u0028\u1109\u0029'; - t['\u3207'] = '\u0028\u110B\u0029'; - t['\u3208'] = '\u0028\u110C\u0029'; - t['\u3209'] = '\u0028\u110E\u0029'; - t['\u320A'] = '\u0028\u110F\u0029'; - t['\u320B'] = '\u0028\u1110\u0029'; - t['\u320C'] = '\u0028\u1111\u0029'; - t['\u320D'] = '\u0028\u1112\u0029'; - t['\u320E'] = '\u0028\u1100\u1161\u0029'; - t['\u320F'] = '\u0028\u1102\u1161\u0029'; - t['\u3210'] = '\u0028\u1103\u1161\u0029'; - t['\u3211'] = '\u0028\u1105\u1161\u0029'; - t['\u3212'] = '\u0028\u1106\u1161\u0029'; - t['\u3213'] = '\u0028\u1107\u1161\u0029'; - t['\u3214'] = '\u0028\u1109\u1161\u0029'; - t['\u3215'] = '\u0028\u110B\u1161\u0029'; - t['\u3216'] = '\u0028\u110C\u1161\u0029'; - t['\u3217'] = '\u0028\u110E\u1161\u0029'; - t['\u3218'] = '\u0028\u110F\u1161\u0029'; - t['\u3219'] = '\u0028\u1110\u1161\u0029'; - t['\u321A'] = '\u0028\u1111\u1161\u0029'; - t['\u321B'] = '\u0028\u1112\u1161\u0029'; - t['\u321C'] = '\u0028\u110C\u116E\u0029'; - t['\u321D'] = '\u0028\u110B\u1169\u110C\u1165\u11AB\u0029'; - t['\u321E'] = '\u0028\u110B\u1169\u1112\u116E\u0029'; - t['\u3220'] = '\u0028\u4E00\u0029'; - t['\u3221'] = '\u0028\u4E8C\u0029'; - t['\u3222'] = '\u0028\u4E09\u0029'; - t['\u3223'] = '\u0028\u56DB\u0029'; - t['\u3224'] = '\u0028\u4E94\u0029'; - t['\u3225'] = '\u0028\u516D\u0029'; - t['\u3226'] = '\u0028\u4E03\u0029'; - t['\u3227'] = '\u0028\u516B\u0029'; - t['\u3228'] = '\u0028\u4E5D\u0029'; - t['\u3229'] = '\u0028\u5341\u0029'; - t['\u322A'] = '\u0028\u6708\u0029'; - t['\u322B'] = '\u0028\u706B\u0029'; - t['\u322C'] = '\u0028\u6C34\u0029'; - t['\u322D'] = '\u0028\u6728\u0029'; - t['\u322E'] = '\u0028\u91D1\u0029'; - t['\u322F'] = '\u0028\u571F\u0029'; - t['\u3230'] = '\u0028\u65E5\u0029'; - t['\u3231'] = '\u0028\u682A\u0029'; - t['\u3232'] = '\u0028\u6709\u0029'; - t['\u3233'] = '\u0028\u793E\u0029'; - t['\u3234'] = '\u0028\u540D\u0029'; - t['\u3235'] = '\u0028\u7279\u0029'; - t['\u3236'] = '\u0028\u8CA1\u0029'; - t['\u3237'] = '\u0028\u795D\u0029'; - t['\u3238'] = '\u0028\u52B4\u0029'; - t['\u3239'] = '\u0028\u4EE3\u0029'; - t['\u323A'] = '\u0028\u547C\u0029'; - t['\u323B'] = '\u0028\u5B66\u0029'; - t['\u323C'] = '\u0028\u76E3\u0029'; - t['\u323D'] = '\u0028\u4F01\u0029'; - t['\u323E'] = '\u0028\u8CC7\u0029'; - t['\u323F'] = '\u0028\u5354\u0029'; - t['\u3240'] = '\u0028\u796D\u0029'; - t['\u3241'] = '\u0028\u4F11\u0029'; - t['\u3242'] = '\u0028\u81EA\u0029'; - t['\u3243'] = '\u0028\u81F3\u0029'; - t['\u32C0'] = '\u0031\u6708'; - t['\u32C1'] = '\u0032\u6708'; - t['\u32C2'] = '\u0033\u6708'; - t['\u32C3'] = '\u0034\u6708'; - t['\u32C4'] = '\u0035\u6708'; - t['\u32C5'] = '\u0036\u6708'; - t['\u32C6'] = '\u0037\u6708'; - t['\u32C7'] = '\u0038\u6708'; - t['\u32C8'] = '\u0039\u6708'; - t['\u32C9'] = '\u0031\u0030\u6708'; - t['\u32CA'] = '\u0031\u0031\u6708'; - t['\u32CB'] = '\u0031\u0032\u6708'; - t['\u3358'] = '\u0030\u70B9'; - t['\u3359'] = '\u0031\u70B9'; - t['\u335A'] = '\u0032\u70B9'; - t['\u335B'] = '\u0033\u70B9'; - t['\u335C'] = '\u0034\u70B9'; - t['\u335D'] = '\u0035\u70B9'; - t['\u335E'] = '\u0036\u70B9'; - t['\u335F'] = '\u0037\u70B9'; - t['\u3360'] = '\u0038\u70B9'; - t['\u3361'] = '\u0039\u70B9'; - t['\u3362'] = '\u0031\u0030\u70B9'; - t['\u3363'] = '\u0031\u0031\u70B9'; - t['\u3364'] = '\u0031\u0032\u70B9'; - t['\u3365'] = '\u0031\u0033\u70B9'; - t['\u3366'] = '\u0031\u0034\u70B9'; - t['\u3367'] = '\u0031\u0035\u70B9'; - t['\u3368'] = '\u0031\u0036\u70B9'; - t['\u3369'] = '\u0031\u0037\u70B9'; - t['\u336A'] = '\u0031\u0038\u70B9'; - t['\u336B'] = '\u0031\u0039\u70B9'; - t['\u336C'] = '\u0032\u0030\u70B9'; - t['\u336D'] = '\u0032\u0031\u70B9'; - t['\u336E'] = '\u0032\u0032\u70B9'; - t['\u336F'] = '\u0032\u0033\u70B9'; - t['\u3370'] = '\u0032\u0034\u70B9'; - t['\u33E0'] = '\u0031\u65E5'; - t['\u33E1'] = '\u0032\u65E5'; - t['\u33E2'] = '\u0033\u65E5'; - t['\u33E3'] = '\u0034\u65E5'; - t['\u33E4'] = '\u0035\u65E5'; - t['\u33E5'] = '\u0036\u65E5'; - t['\u33E6'] = '\u0037\u65E5'; - t['\u33E7'] = '\u0038\u65E5'; - t['\u33E8'] = '\u0039\u65E5'; - t['\u33E9'] = '\u0031\u0030\u65E5'; - t['\u33EA'] = '\u0031\u0031\u65E5'; - t['\u33EB'] = '\u0031\u0032\u65E5'; - t['\u33EC'] = '\u0031\u0033\u65E5'; - t['\u33ED'] = '\u0031\u0034\u65E5'; - t['\u33EE'] = '\u0031\u0035\u65E5'; - t['\u33EF'] = '\u0031\u0036\u65E5'; - t['\u33F0'] = '\u0031\u0037\u65E5'; - t['\u33F1'] = '\u0031\u0038\u65E5'; - t['\u33F2'] = '\u0031\u0039\u65E5'; - t['\u33F3'] = '\u0032\u0030\u65E5'; - t['\u33F4'] = '\u0032\u0031\u65E5'; - t['\u33F5'] = '\u0032\u0032\u65E5'; - t['\u33F6'] = '\u0032\u0033\u65E5'; - t['\u33F7'] = '\u0032\u0034\u65E5'; - t['\u33F8'] = '\u0032\u0035\u65E5'; - t['\u33F9'] = '\u0032\u0036\u65E5'; - t['\u33FA'] = '\u0032\u0037\u65E5'; - t['\u33FB'] = '\u0032\u0038\u65E5'; - t['\u33FC'] = '\u0032\u0039\u65E5'; - t['\u33FD'] = '\u0033\u0030\u65E5'; - t['\u33FE'] = '\u0033\u0031\u65E5'; - t['\uFB00'] = '\u0066\u0066'; - t['\uFB01'] = '\u0066\u0069'; - t['\uFB02'] = '\u0066\u006C'; - t['\uFB03'] = '\u0066\u0066\u0069'; - t['\uFB04'] = '\u0066\u0066\u006C'; - t['\uFB05'] = '\u017F\u0074'; - t['\uFB06'] = '\u0073\u0074'; - t['\uFB13'] = '\u0574\u0576'; - t['\uFB14'] = '\u0574\u0565'; - t['\uFB15'] = '\u0574\u056B'; - t['\uFB16'] = '\u057E\u0576'; - t['\uFB17'] = '\u0574\u056D'; - t['\uFB4F'] = '\u05D0\u05DC'; - t['\uFB50'] = '\u0671'; - t['\uFB51'] = '\u0671'; - t['\uFB52'] = '\u067B'; - t['\uFB53'] = '\u067B'; - t['\uFB54'] = '\u067B'; - t['\uFB55'] = '\u067B'; - t['\uFB56'] = '\u067E'; - t['\uFB57'] = '\u067E'; - t['\uFB58'] = '\u067E'; - t['\uFB59'] = '\u067E'; - t['\uFB5A'] = '\u0680'; - t['\uFB5B'] = '\u0680'; - t['\uFB5C'] = '\u0680'; - t['\uFB5D'] = '\u0680'; - t['\uFB5E'] = '\u067A'; - t['\uFB5F'] = '\u067A'; - t['\uFB60'] = '\u067A'; - t['\uFB61'] = '\u067A'; - t['\uFB62'] = '\u067F'; - t['\uFB63'] = '\u067F'; - t['\uFB64'] = '\u067F'; - t['\uFB65'] = '\u067F'; - t['\uFB66'] = '\u0679'; - t['\uFB67'] = '\u0679'; - t['\uFB68'] = '\u0679'; - t['\uFB69'] = '\u0679'; - t['\uFB6A'] = '\u06A4'; - t['\uFB6B'] = '\u06A4'; - t['\uFB6C'] = '\u06A4'; - t['\uFB6D'] = '\u06A4'; - t['\uFB6E'] = '\u06A6'; - t['\uFB6F'] = '\u06A6'; - t['\uFB70'] = '\u06A6'; - t['\uFB71'] = '\u06A6'; - t['\uFB72'] = '\u0684'; - t['\uFB73'] = '\u0684'; - t['\uFB74'] = '\u0684'; - t['\uFB75'] = '\u0684'; - t['\uFB76'] = '\u0683'; - t['\uFB77'] = '\u0683'; - t['\uFB78'] = '\u0683'; - t['\uFB79'] = '\u0683'; - t['\uFB7A'] = '\u0686'; - t['\uFB7B'] = '\u0686'; - t['\uFB7C'] = '\u0686'; - t['\uFB7D'] = '\u0686'; - t['\uFB7E'] = '\u0687'; - t['\uFB7F'] = '\u0687'; - t['\uFB80'] = '\u0687'; - t['\uFB81'] = '\u0687'; - t['\uFB82'] = '\u068D'; - t['\uFB83'] = '\u068D'; - t['\uFB84'] = '\u068C'; - t['\uFB85'] = '\u068C'; - t['\uFB86'] = '\u068E'; - t['\uFB87'] = '\u068E'; - t['\uFB88'] = '\u0688'; - t['\uFB89'] = '\u0688'; - t['\uFB8A'] = '\u0698'; - t['\uFB8B'] = '\u0698'; - t['\uFB8C'] = '\u0691'; - t['\uFB8D'] = '\u0691'; - t['\uFB8E'] = '\u06A9'; - t['\uFB8F'] = '\u06A9'; - t['\uFB90'] = '\u06A9'; - t['\uFB91'] = '\u06A9'; - t['\uFB92'] = '\u06AF'; - t['\uFB93'] = '\u06AF'; - t['\uFB94'] = '\u06AF'; - t['\uFB95'] = '\u06AF'; - t['\uFB96'] = '\u06B3'; - t['\uFB97'] = '\u06B3'; - t['\uFB98'] = '\u06B3'; - t['\uFB99'] = '\u06B3'; - t['\uFB9A'] = '\u06B1'; - t['\uFB9B'] = '\u06B1'; - t['\uFB9C'] = '\u06B1'; - t['\uFB9D'] = '\u06B1'; - t['\uFB9E'] = '\u06BA'; - t['\uFB9F'] = '\u06BA'; - t['\uFBA0'] = '\u06BB'; - t['\uFBA1'] = '\u06BB'; - t['\uFBA2'] = '\u06BB'; - t['\uFBA3'] = '\u06BB'; - t['\uFBA4'] = '\u06C0'; - t['\uFBA5'] = '\u06C0'; - t['\uFBA6'] = '\u06C1'; - t['\uFBA7'] = '\u06C1'; - t['\uFBA8'] = '\u06C1'; - t['\uFBA9'] = '\u06C1'; - t['\uFBAA'] = '\u06BE'; - t['\uFBAB'] = '\u06BE'; - t['\uFBAC'] = '\u06BE'; - t['\uFBAD'] = '\u06BE'; - t['\uFBAE'] = '\u06D2'; - t['\uFBAF'] = '\u06D2'; - t['\uFBB0'] = '\u06D3'; - t['\uFBB1'] = '\u06D3'; - t['\uFBD3'] = '\u06AD'; - t['\uFBD4'] = '\u06AD'; - t['\uFBD5'] = '\u06AD'; - t['\uFBD6'] = '\u06AD'; - t['\uFBD7'] = '\u06C7'; - t['\uFBD8'] = '\u06C7'; - t['\uFBD9'] = '\u06C6'; - t['\uFBDA'] = '\u06C6'; - t['\uFBDB'] = '\u06C8'; - t['\uFBDC'] = '\u06C8'; - t['\uFBDD'] = '\u0677'; - t['\uFBDE'] = '\u06CB'; - t['\uFBDF'] = '\u06CB'; - t['\uFBE0'] = '\u06C5'; - t['\uFBE1'] = '\u06C5'; - t['\uFBE2'] = '\u06C9'; - t['\uFBE3'] = '\u06C9'; - t['\uFBE4'] = '\u06D0'; - t['\uFBE5'] = '\u06D0'; - t['\uFBE6'] = '\u06D0'; - t['\uFBE7'] = '\u06D0'; - t['\uFBE8'] = '\u0649'; - t['\uFBE9'] = '\u0649'; - t['\uFBEA'] = '\u0626\u0627'; - t['\uFBEB'] = '\u0626\u0627'; - t['\uFBEC'] = '\u0626\u06D5'; - t['\uFBED'] = '\u0626\u06D5'; - t['\uFBEE'] = '\u0626\u0648'; - t['\uFBEF'] = '\u0626\u0648'; - t['\uFBF0'] = '\u0626\u06C7'; - t['\uFBF1'] = '\u0626\u06C7'; - t['\uFBF2'] = '\u0626\u06C6'; - t['\uFBF3'] = '\u0626\u06C6'; - t['\uFBF4'] = '\u0626\u06C8'; - t['\uFBF5'] = '\u0626\u06C8'; - t['\uFBF6'] = '\u0626\u06D0'; - t['\uFBF7'] = '\u0626\u06D0'; - t['\uFBF8'] = '\u0626\u06D0'; - t['\uFBF9'] = '\u0626\u0649'; - t['\uFBFA'] = '\u0626\u0649'; - t['\uFBFB'] = '\u0626\u0649'; - t['\uFBFC'] = '\u06CC'; - t['\uFBFD'] = '\u06CC'; - t['\uFBFE'] = '\u06CC'; - t['\uFBFF'] = '\u06CC'; - t['\uFC00'] = '\u0626\u062C'; - t['\uFC01'] = '\u0626\u062D'; - t['\uFC02'] = '\u0626\u0645'; - t['\uFC03'] = '\u0626\u0649'; - t['\uFC04'] = '\u0626\u064A'; - t['\uFC05'] = '\u0628\u062C'; - t['\uFC06'] = '\u0628\u062D'; - t['\uFC07'] = '\u0628\u062E'; - t['\uFC08'] = '\u0628\u0645'; - t['\uFC09'] = '\u0628\u0649'; - t['\uFC0A'] = '\u0628\u064A'; - t['\uFC0B'] = '\u062A\u062C'; - t['\uFC0C'] = '\u062A\u062D'; - t['\uFC0D'] = '\u062A\u062E'; - t['\uFC0E'] = '\u062A\u0645'; - t['\uFC0F'] = '\u062A\u0649'; - t['\uFC10'] = '\u062A\u064A'; - t['\uFC11'] = '\u062B\u062C'; - t['\uFC12'] = '\u062B\u0645'; - t['\uFC13'] = '\u062B\u0649'; - t['\uFC14'] = '\u062B\u064A'; - t['\uFC15'] = '\u062C\u062D'; - t['\uFC16'] = '\u062C\u0645'; - t['\uFC17'] = '\u062D\u062C'; - t['\uFC18'] = '\u062D\u0645'; - t['\uFC19'] = '\u062E\u062C'; - t['\uFC1A'] = '\u062E\u062D'; - t['\uFC1B'] = '\u062E\u0645'; - t['\uFC1C'] = '\u0633\u062C'; - t['\uFC1D'] = '\u0633\u062D'; - t['\uFC1E'] = '\u0633\u062E'; - t['\uFC1F'] = '\u0633\u0645'; - t['\uFC20'] = '\u0635\u062D'; - t['\uFC21'] = '\u0635\u0645'; - t['\uFC22'] = '\u0636\u062C'; - t['\uFC23'] = '\u0636\u062D'; - t['\uFC24'] = '\u0636\u062E'; - t['\uFC25'] = '\u0636\u0645'; - t['\uFC26'] = '\u0637\u062D'; - t['\uFC27'] = '\u0637\u0645'; - t['\uFC28'] = '\u0638\u0645'; - t['\uFC29'] = '\u0639\u062C'; - t['\uFC2A'] = '\u0639\u0645'; - t['\uFC2B'] = '\u063A\u062C'; - t['\uFC2C'] = '\u063A\u0645'; - t['\uFC2D'] = '\u0641\u062C'; - t['\uFC2E'] = '\u0641\u062D'; - t['\uFC2F'] = '\u0641\u062E'; - t['\uFC30'] = '\u0641\u0645'; - t['\uFC31'] = '\u0641\u0649'; - t['\uFC32'] = '\u0641\u064A'; - t['\uFC33'] = '\u0642\u062D'; - t['\uFC34'] = '\u0642\u0645'; - t['\uFC35'] = '\u0642\u0649'; - t['\uFC36'] = '\u0642\u064A'; - t['\uFC37'] = '\u0643\u0627'; - t['\uFC38'] = '\u0643\u062C'; - t['\uFC39'] = '\u0643\u062D'; - t['\uFC3A'] = '\u0643\u062E'; - t['\uFC3B'] = '\u0643\u0644'; - t['\uFC3C'] = '\u0643\u0645'; - t['\uFC3D'] = '\u0643\u0649'; - t['\uFC3E'] = '\u0643\u064A'; - t['\uFC3F'] = '\u0644\u062C'; - t['\uFC40'] = '\u0644\u062D'; - t['\uFC41'] = '\u0644\u062E'; - t['\uFC42'] = '\u0644\u0645'; - t['\uFC43'] = '\u0644\u0649'; - t['\uFC44'] = '\u0644\u064A'; - t['\uFC45'] = '\u0645\u062C'; - t['\uFC46'] = '\u0645\u062D'; - t['\uFC47'] = '\u0645\u062E'; - t['\uFC48'] = '\u0645\u0645'; - t['\uFC49'] = '\u0645\u0649'; - t['\uFC4A'] = '\u0645\u064A'; - t['\uFC4B'] = '\u0646\u062C'; - t['\uFC4C'] = '\u0646\u062D'; - t['\uFC4D'] = '\u0646\u062E'; - t['\uFC4E'] = '\u0646\u0645'; - t['\uFC4F'] = '\u0646\u0649'; - t['\uFC50'] = '\u0646\u064A'; - t['\uFC51'] = '\u0647\u062C'; - t['\uFC52'] = '\u0647\u0645'; - t['\uFC53'] = '\u0647\u0649'; - t['\uFC54'] = '\u0647\u064A'; - t['\uFC55'] = '\u064A\u062C'; - t['\uFC56'] = '\u064A\u062D'; - t['\uFC57'] = '\u064A\u062E'; - t['\uFC58'] = '\u064A\u0645'; - t['\uFC59'] = '\u064A\u0649'; - t['\uFC5A'] = '\u064A\u064A'; - t['\uFC5B'] = '\u0630\u0670'; - t['\uFC5C'] = '\u0631\u0670'; - t['\uFC5D'] = '\u0649\u0670'; - t['\uFC5E'] = '\u0020\u064C\u0651'; - t['\uFC5F'] = '\u0020\u064D\u0651'; - t['\uFC60'] = '\u0020\u064E\u0651'; - t['\uFC61'] = '\u0020\u064F\u0651'; - t['\uFC62'] = '\u0020\u0650\u0651'; - t['\uFC63'] = '\u0020\u0651\u0670'; - t['\uFC64'] = '\u0626\u0631'; - t['\uFC65'] = '\u0626\u0632'; - t['\uFC66'] = '\u0626\u0645'; - t['\uFC67'] = '\u0626\u0646'; - t['\uFC68'] = '\u0626\u0649'; - t['\uFC69'] = '\u0626\u064A'; - t['\uFC6A'] = '\u0628\u0631'; - t['\uFC6B'] = '\u0628\u0632'; - t['\uFC6C'] = '\u0628\u0645'; - t['\uFC6D'] = '\u0628\u0646'; - t['\uFC6E'] = '\u0628\u0649'; - t['\uFC6F'] = '\u0628\u064A'; - t['\uFC70'] = '\u062A\u0631'; - t['\uFC71'] = '\u062A\u0632'; - t['\uFC72'] = '\u062A\u0645'; - t['\uFC73'] = '\u062A\u0646'; - t['\uFC74'] = '\u062A\u0649'; - t['\uFC75'] = '\u062A\u064A'; - t['\uFC76'] = '\u062B\u0631'; - t['\uFC77'] = '\u062B\u0632'; - t['\uFC78'] = '\u062B\u0645'; - t['\uFC79'] = '\u062B\u0646'; - t['\uFC7A'] = '\u062B\u0649'; - t['\uFC7B'] = '\u062B\u064A'; - t['\uFC7C'] = '\u0641\u0649'; - t['\uFC7D'] = '\u0641\u064A'; - t['\uFC7E'] = '\u0642\u0649'; - t['\uFC7F'] = '\u0642\u064A'; - t['\uFC80'] = '\u0643\u0627'; - t['\uFC81'] = '\u0643\u0644'; - t['\uFC82'] = '\u0643\u0645'; - t['\uFC83'] = '\u0643\u0649'; - t['\uFC84'] = '\u0643\u064A'; - t['\uFC85'] = '\u0644\u0645'; - t['\uFC86'] = '\u0644\u0649'; - t['\uFC87'] = '\u0644\u064A'; - t['\uFC88'] = '\u0645\u0627'; - t['\uFC89'] = '\u0645\u0645'; - t['\uFC8A'] = '\u0646\u0631'; - t['\uFC8B'] = '\u0646\u0632'; - t['\uFC8C'] = '\u0646\u0645'; - t['\uFC8D'] = '\u0646\u0646'; - t['\uFC8E'] = '\u0646\u0649'; - t['\uFC8F'] = '\u0646\u064A'; - t['\uFC90'] = '\u0649\u0670'; - t['\uFC91'] = '\u064A\u0631'; - t['\uFC92'] = '\u064A\u0632'; - t['\uFC93'] = '\u064A\u0645'; - t['\uFC94'] = '\u064A\u0646'; - t['\uFC95'] = '\u064A\u0649'; - t['\uFC96'] = '\u064A\u064A'; - t['\uFC97'] = '\u0626\u062C'; - t['\uFC98'] = '\u0626\u062D'; - t['\uFC99'] = '\u0626\u062E'; - t['\uFC9A'] = '\u0626\u0645'; - t['\uFC9B'] = '\u0626\u0647'; - t['\uFC9C'] = '\u0628\u062C'; - t['\uFC9D'] = '\u0628\u062D'; - t['\uFC9E'] = '\u0628\u062E'; - t['\uFC9F'] = '\u0628\u0645'; - t['\uFCA0'] = '\u0628\u0647'; - t['\uFCA1'] = '\u062A\u062C'; - t['\uFCA2'] = '\u062A\u062D'; - t['\uFCA3'] = '\u062A\u062E'; - t['\uFCA4'] = '\u062A\u0645'; - t['\uFCA5'] = '\u062A\u0647'; - t['\uFCA6'] = '\u062B\u0645'; - t['\uFCA7'] = '\u062C\u062D'; - t['\uFCA8'] = '\u062C\u0645'; - t['\uFCA9'] = '\u062D\u062C'; - t['\uFCAA'] = '\u062D\u0645'; - t['\uFCAB'] = '\u062E\u062C'; - t['\uFCAC'] = '\u062E\u0645'; - t['\uFCAD'] = '\u0633\u062C'; - t['\uFCAE'] = '\u0633\u062D'; - t['\uFCAF'] = '\u0633\u062E'; - t['\uFCB0'] = '\u0633\u0645'; - t['\uFCB1'] = '\u0635\u062D'; - t['\uFCB2'] = '\u0635\u062E'; - t['\uFCB3'] = '\u0635\u0645'; - t['\uFCB4'] = '\u0636\u062C'; - t['\uFCB5'] = '\u0636\u062D'; - t['\uFCB6'] = '\u0636\u062E'; - t['\uFCB7'] = '\u0636\u0645'; - t['\uFCB8'] = '\u0637\u062D'; - t['\uFCB9'] = '\u0638\u0645'; - t['\uFCBA'] = '\u0639\u062C'; - t['\uFCBB'] = '\u0639\u0645'; - t['\uFCBC'] = '\u063A\u062C'; - t['\uFCBD'] = '\u063A\u0645'; - t['\uFCBE'] = '\u0641\u062C'; - t['\uFCBF'] = '\u0641\u062D'; - t['\uFCC0'] = '\u0641\u062E'; - t['\uFCC1'] = '\u0641\u0645'; - t['\uFCC2'] = '\u0642\u062D'; - t['\uFCC3'] = '\u0642\u0645'; - t['\uFCC4'] = '\u0643\u062C'; - t['\uFCC5'] = '\u0643\u062D'; - t['\uFCC6'] = '\u0643\u062E'; - t['\uFCC7'] = '\u0643\u0644'; - t['\uFCC8'] = '\u0643\u0645'; - t['\uFCC9'] = '\u0644\u062C'; - t['\uFCCA'] = '\u0644\u062D'; - t['\uFCCB'] = '\u0644\u062E'; - t['\uFCCC'] = '\u0644\u0645'; - t['\uFCCD'] = '\u0644\u0647'; - t['\uFCCE'] = '\u0645\u062C'; - t['\uFCCF'] = '\u0645\u062D'; - t['\uFCD0'] = '\u0645\u062E'; - t['\uFCD1'] = '\u0645\u0645'; - t['\uFCD2'] = '\u0646\u062C'; - t['\uFCD3'] = '\u0646\u062D'; - t['\uFCD4'] = '\u0646\u062E'; - t['\uFCD5'] = '\u0646\u0645'; - t['\uFCD6'] = '\u0646\u0647'; - t['\uFCD7'] = '\u0647\u062C'; - t['\uFCD8'] = '\u0647\u0645'; - t['\uFCD9'] = '\u0647\u0670'; - t['\uFCDA'] = '\u064A\u062C'; - t['\uFCDB'] = '\u064A\u062D'; - t['\uFCDC'] = '\u064A\u062E'; - t['\uFCDD'] = '\u064A\u0645'; - t['\uFCDE'] = '\u064A\u0647'; - t['\uFCDF'] = '\u0626\u0645'; - t['\uFCE0'] = '\u0626\u0647'; - t['\uFCE1'] = '\u0628\u0645'; - t['\uFCE2'] = '\u0628\u0647'; - t['\uFCE3'] = '\u062A\u0645'; - t['\uFCE4'] = '\u062A\u0647'; - t['\uFCE5'] = '\u062B\u0645'; - t['\uFCE6'] = '\u062B\u0647'; - t['\uFCE7'] = '\u0633\u0645'; - t['\uFCE8'] = '\u0633\u0647'; - t['\uFCE9'] = '\u0634\u0645'; - t['\uFCEA'] = '\u0634\u0647'; - t['\uFCEB'] = '\u0643\u0644'; - t['\uFCEC'] = '\u0643\u0645'; - t['\uFCED'] = '\u0644\u0645'; - t['\uFCEE'] = '\u0646\u0645'; - t['\uFCEF'] = '\u0646\u0647'; - t['\uFCF0'] = '\u064A\u0645'; - t['\uFCF1'] = '\u064A\u0647'; - t['\uFCF2'] = '\u0640\u064E\u0651'; - t['\uFCF3'] = '\u0640\u064F\u0651'; - t['\uFCF4'] = '\u0640\u0650\u0651'; - t['\uFCF5'] = '\u0637\u0649'; - t['\uFCF6'] = '\u0637\u064A'; - t['\uFCF7'] = '\u0639\u0649'; - t['\uFCF8'] = '\u0639\u064A'; - t['\uFCF9'] = '\u063A\u0649'; - t['\uFCFA'] = '\u063A\u064A'; - t['\uFCFB'] = '\u0633\u0649'; - t['\uFCFC'] = '\u0633\u064A'; - t['\uFCFD'] = '\u0634\u0649'; - t['\uFCFE'] = '\u0634\u064A'; - t['\uFCFF'] = '\u062D\u0649'; - t['\uFD00'] = '\u062D\u064A'; - t['\uFD01'] = '\u062C\u0649'; - t['\uFD02'] = '\u062C\u064A'; - t['\uFD03'] = '\u062E\u0649'; - t['\uFD04'] = '\u062E\u064A'; - t['\uFD05'] = '\u0635\u0649'; - t['\uFD06'] = '\u0635\u064A'; - t['\uFD07'] = '\u0636\u0649'; - t['\uFD08'] = '\u0636\u064A'; - t['\uFD09'] = '\u0634\u062C'; - t['\uFD0A'] = '\u0634\u062D'; - t['\uFD0B'] = '\u0634\u062E'; - t['\uFD0C'] = '\u0634\u0645'; - t['\uFD0D'] = '\u0634\u0631'; - t['\uFD0E'] = '\u0633\u0631'; - t['\uFD0F'] = '\u0635\u0631'; - t['\uFD10'] = '\u0636\u0631'; - t['\uFD11'] = '\u0637\u0649'; - t['\uFD12'] = '\u0637\u064A'; - t['\uFD13'] = '\u0639\u0649'; - t['\uFD14'] = '\u0639\u064A'; - t['\uFD15'] = '\u063A\u0649'; - t['\uFD16'] = '\u063A\u064A'; - t['\uFD17'] = '\u0633\u0649'; - t['\uFD18'] = '\u0633\u064A'; - t['\uFD19'] = '\u0634\u0649'; - t['\uFD1A'] = '\u0634\u064A'; - t['\uFD1B'] = '\u062D\u0649'; - t['\uFD1C'] = '\u062D\u064A'; - t['\uFD1D'] = '\u062C\u0649'; - t['\uFD1E'] = '\u062C\u064A'; - t['\uFD1F'] = '\u062E\u0649'; - t['\uFD20'] = '\u062E\u064A'; - t['\uFD21'] = '\u0635\u0649'; - t['\uFD22'] = '\u0635\u064A'; - t['\uFD23'] = '\u0636\u0649'; - t['\uFD24'] = '\u0636\u064A'; - t['\uFD25'] = '\u0634\u062C'; - t['\uFD26'] = '\u0634\u062D'; - t['\uFD27'] = '\u0634\u062E'; - t['\uFD28'] = '\u0634\u0645'; - t['\uFD29'] = '\u0634\u0631'; - t['\uFD2A'] = '\u0633\u0631'; - t['\uFD2B'] = '\u0635\u0631'; - t['\uFD2C'] = '\u0636\u0631'; - t['\uFD2D'] = '\u0634\u062C'; - t['\uFD2E'] = '\u0634\u062D'; - t['\uFD2F'] = '\u0634\u062E'; - t['\uFD30'] = '\u0634\u0645'; - t['\uFD31'] = '\u0633\u0647'; - t['\uFD32'] = '\u0634\u0647'; - t['\uFD33'] = '\u0637\u0645'; - t['\uFD34'] = '\u0633\u062C'; - t['\uFD35'] = '\u0633\u062D'; - t['\uFD36'] = '\u0633\u062E'; - t['\uFD37'] = '\u0634\u062C'; - t['\uFD38'] = '\u0634\u062D'; - t['\uFD39'] = '\u0634\u062E'; - t['\uFD3A'] = '\u0637\u0645'; - t['\uFD3B'] = '\u0638\u0645'; - t['\uFD3C'] = '\u0627\u064B'; - t['\uFD3D'] = '\u0627\u064B'; - t['\uFD50'] = '\u062A\u062C\u0645'; - t['\uFD51'] = '\u062A\u062D\u062C'; - t['\uFD52'] = '\u062A\u062D\u062C'; - t['\uFD53'] = '\u062A\u062D\u0645'; - t['\uFD54'] = '\u062A\u062E\u0645'; - t['\uFD55'] = '\u062A\u0645\u062C'; - t['\uFD56'] = '\u062A\u0645\u062D'; - t['\uFD57'] = '\u062A\u0645\u062E'; - t['\uFD58'] = '\u062C\u0645\u062D'; - t['\uFD59'] = '\u062C\u0645\u062D'; - t['\uFD5A'] = '\u062D\u0645\u064A'; - t['\uFD5B'] = '\u062D\u0645\u0649'; - t['\uFD5C'] = '\u0633\u062D\u062C'; - t['\uFD5D'] = '\u0633\u062C\u062D'; - t['\uFD5E'] = '\u0633\u062C\u0649'; - t['\uFD5F'] = '\u0633\u0645\u062D'; - t['\uFD60'] = '\u0633\u0645\u062D'; - t['\uFD61'] = '\u0633\u0645\u062C'; - t['\uFD62'] = '\u0633\u0645\u0645'; - t['\uFD63'] = '\u0633\u0645\u0645'; - t['\uFD64'] = '\u0635\u062D\u062D'; - t['\uFD65'] = '\u0635\u062D\u062D'; - t['\uFD66'] = '\u0635\u0645\u0645'; - t['\uFD67'] = '\u0634\u062D\u0645'; - t['\uFD68'] = '\u0634\u062D\u0645'; - t['\uFD69'] = '\u0634\u062C\u064A'; - t['\uFD6A'] = '\u0634\u0645\u062E'; - t['\uFD6B'] = '\u0634\u0645\u062E'; - t['\uFD6C'] = '\u0634\u0645\u0645'; - t['\uFD6D'] = '\u0634\u0645\u0645'; - t['\uFD6E'] = '\u0636\u062D\u0649'; - t['\uFD6F'] = '\u0636\u062E\u0645'; - t['\uFD70'] = '\u0636\u062E\u0645'; - t['\uFD71'] = '\u0637\u0645\u062D'; - t['\uFD72'] = '\u0637\u0645\u062D'; - t['\uFD73'] = '\u0637\u0645\u0645'; - t['\uFD74'] = '\u0637\u0645\u064A'; - t['\uFD75'] = '\u0639\u062C\u0645'; - t['\uFD76'] = '\u0639\u0645\u0645'; - t['\uFD77'] = '\u0639\u0645\u0645'; - t['\uFD78'] = '\u0639\u0645\u0649'; - t['\uFD79'] = '\u063A\u0645\u0645'; - t['\uFD7A'] = '\u063A\u0645\u064A'; - t['\uFD7B'] = '\u063A\u0645\u0649'; - t['\uFD7C'] = '\u0641\u062E\u0645'; - t['\uFD7D'] = '\u0641\u062E\u0645'; - t['\uFD7E'] = '\u0642\u0645\u062D'; - t['\uFD7F'] = '\u0642\u0645\u0645'; - t['\uFD80'] = '\u0644\u062D\u0645'; - t['\uFD81'] = '\u0644\u062D\u064A'; - t['\uFD82'] = '\u0644\u062D\u0649'; - t['\uFD83'] = '\u0644\u062C\u062C'; - t['\uFD84'] = '\u0644\u062C\u062C'; - t['\uFD85'] = '\u0644\u062E\u0645'; - t['\uFD86'] = '\u0644\u062E\u0645'; - t['\uFD87'] = '\u0644\u0645\u062D'; - t['\uFD88'] = '\u0644\u0645\u062D'; - t['\uFD89'] = '\u0645\u062D\u062C'; - t['\uFD8A'] = '\u0645\u062D\u0645'; - t['\uFD8B'] = '\u0645\u062D\u064A'; - t['\uFD8C'] = '\u0645\u062C\u062D'; - t['\uFD8D'] = '\u0645\u062C\u0645'; - t['\uFD8E'] = '\u0645\u062E\u062C'; - t['\uFD8F'] = '\u0645\u062E\u0645'; - t['\uFD92'] = '\u0645\u062C\u062E'; - t['\uFD93'] = '\u0647\u0645\u062C'; - t['\uFD94'] = '\u0647\u0645\u0645'; - t['\uFD95'] = '\u0646\u062D\u0645'; - t['\uFD96'] = '\u0646\u062D\u0649'; - t['\uFD97'] = '\u0646\u062C\u0645'; - t['\uFD98'] = '\u0646\u062C\u0645'; - t['\uFD99'] = '\u0646\u062C\u0649'; - t['\uFD9A'] = '\u0646\u0645\u064A'; - t['\uFD9B'] = '\u0646\u0645\u0649'; - t['\uFD9C'] = '\u064A\u0645\u0645'; - t['\uFD9D'] = '\u064A\u0645\u0645'; - t['\uFD9E'] = '\u0628\u062E\u064A'; - t['\uFD9F'] = '\u062A\u062C\u064A'; - t['\uFDA0'] = '\u062A\u062C\u0649'; - t['\uFDA1'] = '\u062A\u062E\u064A'; - t['\uFDA2'] = '\u062A\u062E\u0649'; - t['\uFDA3'] = '\u062A\u0645\u064A'; - t['\uFDA4'] = '\u062A\u0645\u0649'; - t['\uFDA5'] = '\u062C\u0645\u064A'; - t['\uFDA6'] = '\u062C\u062D\u0649'; - t['\uFDA7'] = '\u062C\u0645\u0649'; - t['\uFDA8'] = '\u0633\u062E\u0649'; - t['\uFDA9'] = '\u0635\u062D\u064A'; - t['\uFDAA'] = '\u0634\u062D\u064A'; - t['\uFDAB'] = '\u0636\u062D\u064A'; - t['\uFDAC'] = '\u0644\u062C\u064A'; - t['\uFDAD'] = '\u0644\u0645\u064A'; - t['\uFDAE'] = '\u064A\u062D\u064A'; - t['\uFDAF'] = '\u064A\u062C\u064A'; - t['\uFDB0'] = '\u064A\u0645\u064A'; - t['\uFDB1'] = '\u0645\u0645\u064A'; - t['\uFDB2'] = '\u0642\u0645\u064A'; - t['\uFDB3'] = '\u0646\u062D\u064A'; - t['\uFDB4'] = '\u0642\u0645\u062D'; - t['\uFDB5'] = '\u0644\u062D\u0645'; - t['\uFDB6'] = '\u0639\u0645\u064A'; - t['\uFDB7'] = '\u0643\u0645\u064A'; - t['\uFDB8'] = '\u0646\u062C\u062D'; - t['\uFDB9'] = '\u0645\u062E\u064A'; - t['\uFDBA'] = '\u0644\u062C\u0645'; - t['\uFDBB'] = '\u0643\u0645\u0645'; - t['\uFDBC'] = '\u0644\u062C\u0645'; - t['\uFDBD'] = '\u0646\u062C\u062D'; - t['\uFDBE'] = '\u062C\u062D\u064A'; - t['\uFDBF'] = '\u062D\u062C\u064A'; - t['\uFDC0'] = '\u0645\u062C\u064A'; - t['\uFDC1'] = '\u0641\u0645\u064A'; - t['\uFDC2'] = '\u0628\u062D\u064A'; - t['\uFDC3'] = '\u0643\u0645\u0645'; - t['\uFDC4'] = '\u0639\u062C\u0645'; - t['\uFDC5'] = '\u0635\u0645\u0645'; - t['\uFDC6'] = '\u0633\u062E\u064A'; - t['\uFDC7'] = '\u0646\u062C\u064A'; - t['\uFE49'] = '\u203E'; - t['\uFE4A'] = '\u203E'; - t['\uFE4B'] = '\u203E'; - t['\uFE4C'] = '\u203E'; - t['\uFE4D'] = '\u005F'; - t['\uFE4E'] = '\u005F'; - t['\uFE4F'] = '\u005F'; - t['\uFE80'] = '\u0621'; - t['\uFE81'] = '\u0622'; - t['\uFE82'] = '\u0622'; - t['\uFE83'] = '\u0623'; - t['\uFE84'] = '\u0623'; - t['\uFE85'] = '\u0624'; - t['\uFE86'] = '\u0624'; - t['\uFE87'] = '\u0625'; - t['\uFE88'] = '\u0625'; - t['\uFE89'] = '\u0626'; - t['\uFE8A'] = '\u0626'; - t['\uFE8B'] = '\u0626'; - t['\uFE8C'] = '\u0626'; - t['\uFE8D'] = '\u0627'; - t['\uFE8E'] = '\u0627'; - t['\uFE8F'] = '\u0628'; - t['\uFE90'] = '\u0628'; - t['\uFE91'] = '\u0628'; - t['\uFE92'] = '\u0628'; - t['\uFE93'] = '\u0629'; - t['\uFE94'] = '\u0629'; - t['\uFE95'] = '\u062A'; - t['\uFE96'] = '\u062A'; - t['\uFE97'] = '\u062A'; - t['\uFE98'] = '\u062A'; - t['\uFE99'] = '\u062B'; - t['\uFE9A'] = '\u062B'; - t['\uFE9B'] = '\u062B'; - t['\uFE9C'] = '\u062B'; - t['\uFE9D'] = '\u062C'; - t['\uFE9E'] = '\u062C'; - t['\uFE9F'] = '\u062C'; - t['\uFEA0'] = '\u062C'; - t['\uFEA1'] = '\u062D'; - t['\uFEA2'] = '\u062D'; - t['\uFEA3'] = '\u062D'; - t['\uFEA4'] = '\u062D'; - t['\uFEA5'] = '\u062E'; - t['\uFEA6'] = '\u062E'; - t['\uFEA7'] = '\u062E'; - t['\uFEA8'] = '\u062E'; - t['\uFEA9'] = '\u062F'; - t['\uFEAA'] = '\u062F'; - t['\uFEAB'] = '\u0630'; - t['\uFEAC'] = '\u0630'; - t['\uFEAD'] = '\u0631'; - t['\uFEAE'] = '\u0631'; - t['\uFEAF'] = '\u0632'; - t['\uFEB0'] = '\u0632'; - t['\uFEB1'] = '\u0633'; - t['\uFEB2'] = '\u0633'; - t['\uFEB3'] = '\u0633'; - t['\uFEB4'] = '\u0633'; - t['\uFEB5'] = '\u0634'; - t['\uFEB6'] = '\u0634'; - t['\uFEB7'] = '\u0634'; - t['\uFEB8'] = '\u0634'; - t['\uFEB9'] = '\u0635'; - t['\uFEBA'] = '\u0635'; - t['\uFEBB'] = '\u0635'; - t['\uFEBC'] = '\u0635'; - t['\uFEBD'] = '\u0636'; - t['\uFEBE'] = '\u0636'; - t['\uFEBF'] = '\u0636'; - t['\uFEC0'] = '\u0636'; - t['\uFEC1'] = '\u0637'; - t['\uFEC2'] = '\u0637'; - t['\uFEC3'] = '\u0637'; - t['\uFEC4'] = '\u0637'; - t['\uFEC5'] = '\u0638'; - t['\uFEC6'] = '\u0638'; - t['\uFEC7'] = '\u0638'; - t['\uFEC8'] = '\u0638'; - t['\uFEC9'] = '\u0639'; - t['\uFECA'] = '\u0639'; - t['\uFECB'] = '\u0639'; - t['\uFECC'] = '\u0639'; - t['\uFECD'] = '\u063A'; - t['\uFECE'] = '\u063A'; - t['\uFECF'] = '\u063A'; - t['\uFED0'] = '\u063A'; - t['\uFED1'] = '\u0641'; - t['\uFED2'] = '\u0641'; - t['\uFED3'] = '\u0641'; - t['\uFED4'] = '\u0641'; - t['\uFED5'] = '\u0642'; - t['\uFED6'] = '\u0642'; - t['\uFED7'] = '\u0642'; - t['\uFED8'] = '\u0642'; - t['\uFED9'] = '\u0643'; - t['\uFEDA'] = '\u0643'; - t['\uFEDB'] = '\u0643'; - t['\uFEDC'] = '\u0643'; - t['\uFEDD'] = '\u0644'; - t['\uFEDE'] = '\u0644'; - t['\uFEDF'] = '\u0644'; - t['\uFEE0'] = '\u0644'; - t['\uFEE1'] = '\u0645'; - t['\uFEE2'] = '\u0645'; - t['\uFEE3'] = '\u0645'; - t['\uFEE4'] = '\u0645'; - t['\uFEE5'] = '\u0646'; - t['\uFEE6'] = '\u0646'; - t['\uFEE7'] = '\u0646'; - t['\uFEE8'] = '\u0646'; - t['\uFEE9'] = '\u0647'; - t['\uFEEA'] = '\u0647'; - t['\uFEEB'] = '\u0647'; - t['\uFEEC'] = '\u0647'; - t['\uFEED'] = '\u0648'; - t['\uFEEE'] = '\u0648'; - t['\uFEEF'] = '\u0649'; - t['\uFEF0'] = '\u0649'; - t['\uFEF1'] = '\u064A'; - t['\uFEF2'] = '\u064A'; - t['\uFEF3'] = '\u064A'; - t['\uFEF4'] = '\u064A'; - t['\uFEF5'] = '\u0644\u0622'; - t['\uFEF6'] = '\u0644\u0622'; - t['\uFEF7'] = '\u0644\u0623'; - t['\uFEF8'] = '\u0644\u0623'; - t['\uFEF9'] = '\u0644\u0625'; - t['\uFEFA'] = '\u0644\u0625'; - t['\uFEFB'] = '\u0644\u0627'; - t['\uFEFC'] = '\u0644\u0627'; - }); - function reverseIfRtl(chars) { - var charsLength = chars.length; - if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) { - return chars; - } - var s = ''; - for (var ii = charsLength - 1; ii >= 0; ii--) { - s += chars[ii]; - } - return s; - } - exports.mapSpecialUnicodeValues = mapSpecialUnicodeValues; - exports.reverseIfRtl = reverseIfRtl; - exports.getUnicodeRangeFor = getUnicodeRangeFor; - exports.getNormalizedUnicodes = getNormalizedUnicodes; - exports.getUnicodeForGlyph = getUnicodeForGlyph; - })); - (function (root, factory) { - factory(root.pdfjsCoreStream = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreJbig2, root.pdfjsCoreJpg, root.pdfjsCoreJpx); - }(this, function (exports, sharedUtil, corePrimitives, coreJbig2, coreJpg, coreJpx) { - var Util = sharedUtil.Util; - var error = sharedUtil.error; - var info = sharedUtil.info; - var isInt = sharedUtil.isInt; - var isArray = sharedUtil.isArray; - var createObjectURL = sharedUtil.createObjectURL; - var shadow = sharedUtil.shadow; - var warn = sharedUtil.warn; - var isSpace = sharedUtil.isSpace; - var Dict = corePrimitives.Dict; - var isDict = corePrimitives.isDict; - var isStream = corePrimitives.isStream; - var Jbig2Image = coreJbig2.Jbig2Image; - var JpegImage = coreJpg.JpegImage; - var JpxImage = coreJpx.JpxImage; - var Stream = function StreamClosure() { - function Stream(arrayBuffer, start, length, dict) { - this.bytes = arrayBuffer instanceof Uint8Array ? arrayBuffer : new Uint8Array(arrayBuffer); - this.start = start || 0; - this.pos = this.start; - this.end = start + length || this.bytes.length; - this.dict = dict; - } - Stream.prototype = { - get length() { - return this.end - this.start; - }, - get isEmpty() { - return this.length === 0; - }, - getByte: function Stream_getByte() { - if (this.pos >= this.end) { - return -1; - } - return this.bytes[this.pos++]; - }, - getUint16: function Stream_getUint16() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }, - getInt32: function Stream_getInt32() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }, - getBytes: function Stream_getBytes(length) { - var bytes = this.bytes; - var pos = this.pos; - var strEnd = this.end; - if (!length) { - return bytes.subarray(pos, strEnd); - } - var end = pos + length; - if (end > strEnd) { - end = strEnd; - } - this.pos = end; - return bytes.subarray(pos, end); - }, - peekByte: function Stream_peekByte() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }, - peekBytes: function Stream_peekBytes(length) { - var bytes = this.getBytes(length); - this.pos -= bytes.length; - return bytes; - }, - skip: function Stream_skip(n) { - if (!n) { - n = 1; - } - this.pos += n; - }, - reset: function Stream_reset() { - this.pos = this.start; - }, - moveStart: function Stream_moveStart() { - this.start = this.pos; - }, - makeSubStream: function Stream_makeSubStream(start, length, dict) { - return new Stream(this.bytes.buffer, start, length, dict); - }, - isStream: true - }; - return Stream; - }(); - var StringStream = function StringStreamClosure() { - function StringStream(str) { - var length = str.length; - var bytes = new Uint8Array(length); - for (var n = 0; n < length; ++n) { - bytes[n] = str.charCodeAt(n); - } - Stream.call(this, bytes); - } - StringStream.prototype = Stream.prototype; - return StringStream; - }(); - var DecodeStream = function DecodeStreamClosure() { - var emptyBuffer = new Uint8Array(0); - function DecodeStream(maybeMinBufferLength) { - this.pos = 0; - this.bufferLength = 0; - this.eof = false; - this.buffer = emptyBuffer; - this.minBufferLength = 512; - if (maybeMinBufferLength) { - while (this.minBufferLength < maybeMinBufferLength) { - this.minBufferLength *= 2; - } - } - } - DecodeStream.prototype = { - get isEmpty() { - while (!this.eof && this.bufferLength === 0) { - this.readBlock(); - } - return this.bufferLength === 0; - }, - ensureBuffer: function DecodeStream_ensureBuffer(requested) { - var buffer = this.buffer; - if (requested <= buffer.byteLength) { - return buffer; - } - var size = this.minBufferLength; - while (size < requested) { - size *= 2; - } - var buffer2 = new Uint8Array(size); - buffer2.set(buffer); - return this.buffer = buffer2; - }, - getByte: function DecodeStream_getByte() { - var pos = this.pos; - while (this.bufferLength <= pos) { - if (this.eof) { - return -1; - } - this.readBlock(); - } - return this.buffer[this.pos++]; - }, - getUint16: function DecodeStream_getUint16() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }, - getInt32: function DecodeStream_getInt32() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }, - getBytes: function DecodeStream_getBytes(length) { - var end, pos = this.pos; - if (length) { - this.ensureBuffer(pos + length); - end = pos + length; - while (!this.eof && this.bufferLength < end) { - this.readBlock(); - } - var bufEnd = this.bufferLength; - if (end > bufEnd) { - end = bufEnd; - } - } else { - while (!this.eof) { - this.readBlock(); - } - end = this.bufferLength; - } - this.pos = end; - return this.buffer.subarray(pos, end); - }, - peekByte: function DecodeStream_peekByte() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }, - peekBytes: function DecodeStream_peekBytes(length) { - var bytes = this.getBytes(length); - this.pos -= bytes.length; - return bytes; - }, - makeSubStream: function DecodeStream_makeSubStream(start, length, dict) { - var end = start + length; - while (this.bufferLength <= end && !this.eof) { - this.readBlock(); - } - return new Stream(this.buffer, start, length, dict); - }, - skip: function DecodeStream_skip(n) { - if (!n) { - n = 1; - } - this.pos += n; - }, - reset: function DecodeStream_reset() { - this.pos = 0; - }, - getBaseStreams: function DecodeStream_getBaseStreams() { - if (this.str && this.str.getBaseStreams) { - return this.str.getBaseStreams(); - } - return []; - } - }; - return DecodeStream; - }(); - var StreamsSequenceStream = function StreamsSequenceStreamClosure() { - function StreamsSequenceStream(streams) { - this.streams = streams; - DecodeStream.call(this, null); - } - StreamsSequenceStream.prototype = Object.create(DecodeStream.prototype); - StreamsSequenceStream.prototype.readBlock = function streamSequenceStreamReadBlock() { - var streams = this.streams; - if (streams.length === 0) { - this.eof = true; - return; - } - var stream = streams.shift(); - var chunk = stream.getBytes(); - var bufferLength = this.bufferLength; - var newLength = bufferLength + chunk.length; - var buffer = this.ensureBuffer(newLength); - buffer.set(chunk, bufferLength); - this.bufferLength = newLength; - }; - StreamsSequenceStream.prototype.getBaseStreams = function StreamsSequenceStream_getBaseStreams() { - var baseStreams = []; - for (var i = 0, ii = this.streams.length; i < ii; i++) { - var stream = this.streams[i]; - if (stream.getBaseStreams) { - Util.appendToArray(baseStreams, stream.getBaseStreams()); - } - } - return baseStreams; - }; - return StreamsSequenceStream; - }(); - var FlateStream = function FlateStreamClosure() { - var codeLenCodeMap = new Int32Array([ - 16, - 17, - 18, - 0, - 8, - 7, - 9, - 6, - 10, - 5, - 11, - 4, - 12, - 3, - 13, - 2, - 14, - 1, - 15 - ]); - var lengthDecode = new Int32Array([ - 0x00003, - 0x00004, - 0x00005, - 0x00006, - 0x00007, - 0x00008, - 0x00009, - 0x0000a, - 0x1000b, - 0x1000d, - 0x1000f, - 0x10011, - 0x20013, - 0x20017, - 0x2001b, - 0x2001f, - 0x30023, - 0x3002b, - 0x30033, - 0x3003b, - 0x40043, - 0x40053, - 0x40063, - 0x40073, - 0x50083, - 0x500a3, - 0x500c3, - 0x500e3, - 0x00102, - 0x00102, - 0x00102 - ]); - var distDecode = new Int32Array([ - 0x00001, - 0x00002, - 0x00003, - 0x00004, - 0x10005, - 0x10007, - 0x20009, - 0x2000d, - 0x30011, - 0x30019, - 0x40021, - 0x40031, - 0x50041, - 0x50061, - 0x60081, - 0x600c1, - 0x70101, - 0x70181, - 0x80201, - 0x80301, - 0x90401, - 0x90601, - 0xa0801, - 0xa0c01, - 0xb1001, - 0xb1801, - 0xc2001, - 0xc3001, - 0xd4001, - 0xd6001 - ]); - var fixedLitCodeTab = [ - new Int32Array([ - 0x70100, - 0x80050, - 0x80010, - 0x80118, - 0x70110, - 0x80070, - 0x80030, - 0x900c0, - 0x70108, - 0x80060, - 0x80020, - 0x900a0, - 0x80000, - 0x80080, - 0x80040, - 0x900e0, - 0x70104, - 0x80058, - 0x80018, - 0x90090, - 0x70114, - 0x80078, - 0x80038, - 0x900d0, - 0x7010c, - 0x80068, - 0x80028, - 0x900b0, - 0x80008, - 0x80088, - 0x80048, - 0x900f0, - 0x70102, - 0x80054, - 0x80014, - 0x8011c, - 0x70112, - 0x80074, - 0x80034, - 0x900c8, - 0x7010a, - 0x80064, - 0x80024, - 0x900a8, - 0x80004, - 0x80084, - 0x80044, - 0x900e8, - 0x70106, - 0x8005c, - 0x8001c, - 0x90098, - 0x70116, - 0x8007c, - 0x8003c, - 0x900d8, - 0x7010e, - 0x8006c, - 0x8002c, - 0x900b8, - 0x8000c, - 0x8008c, - 0x8004c, - 0x900f8, - 0x70101, - 0x80052, - 0x80012, - 0x8011a, - 0x70111, - 0x80072, - 0x80032, - 0x900c4, - 0x70109, - 0x80062, - 0x80022, - 0x900a4, - 0x80002, - 0x80082, - 0x80042, - 0x900e4, - 0x70105, - 0x8005a, - 0x8001a, - 0x90094, - 0x70115, - 0x8007a, - 0x8003a, - 0x900d4, - 0x7010d, - 0x8006a, - 0x8002a, - 0x900b4, - 0x8000a, - 0x8008a, - 0x8004a, - 0x900f4, - 0x70103, - 0x80056, - 0x80016, - 0x8011e, - 0x70113, - 0x80076, - 0x80036, - 0x900cc, - 0x7010b, - 0x80066, - 0x80026, - 0x900ac, - 0x80006, - 0x80086, - 0x80046, - 0x900ec, - 0x70107, - 0x8005e, - 0x8001e, - 0x9009c, - 0x70117, - 0x8007e, - 0x8003e, - 0x900dc, - 0x7010f, - 0x8006e, - 0x8002e, - 0x900bc, - 0x8000e, - 0x8008e, - 0x8004e, - 0x900fc, - 0x70100, - 0x80051, - 0x80011, - 0x80119, - 0x70110, - 0x80071, - 0x80031, - 0x900c2, - 0x70108, - 0x80061, - 0x80021, - 0x900a2, - 0x80001, - 0x80081, - 0x80041, - 0x900e2, - 0x70104, - 0x80059, - 0x80019, - 0x90092, - 0x70114, - 0x80079, - 0x80039, - 0x900d2, - 0x7010c, - 0x80069, - 0x80029, - 0x900b2, - 0x80009, - 0x80089, - 0x80049, - 0x900f2, - 0x70102, - 0x80055, - 0x80015, - 0x8011d, - 0x70112, - 0x80075, - 0x80035, - 0x900ca, - 0x7010a, - 0x80065, - 0x80025, - 0x900aa, - 0x80005, - 0x80085, - 0x80045, - 0x900ea, - 0x70106, - 0x8005d, - 0x8001d, - 0x9009a, - 0x70116, - 0x8007d, - 0x8003d, - 0x900da, - 0x7010e, - 0x8006d, - 0x8002d, - 0x900ba, - 0x8000d, - 0x8008d, - 0x8004d, - 0x900fa, - 0x70101, - 0x80053, - 0x80013, - 0x8011b, - 0x70111, - 0x80073, - 0x80033, - 0x900c6, - 0x70109, - 0x80063, - 0x80023, - 0x900a6, - 0x80003, - 0x80083, - 0x80043, - 0x900e6, - 0x70105, - 0x8005b, - 0x8001b, - 0x90096, - 0x70115, - 0x8007b, - 0x8003b, - 0x900d6, - 0x7010d, - 0x8006b, - 0x8002b, - 0x900b6, - 0x8000b, - 0x8008b, - 0x8004b, - 0x900f6, - 0x70103, - 0x80057, - 0x80017, - 0x8011f, - 0x70113, - 0x80077, - 0x80037, - 0x900ce, - 0x7010b, - 0x80067, - 0x80027, - 0x900ae, - 0x80007, - 0x80087, - 0x80047, - 0x900ee, - 0x70107, - 0x8005f, - 0x8001f, - 0x9009e, - 0x70117, - 0x8007f, - 0x8003f, - 0x900de, - 0x7010f, - 0x8006f, - 0x8002f, - 0x900be, - 0x8000f, - 0x8008f, - 0x8004f, - 0x900fe, - 0x70100, - 0x80050, - 0x80010, - 0x80118, - 0x70110, - 0x80070, - 0x80030, - 0x900c1, - 0x70108, - 0x80060, - 0x80020, - 0x900a1, - 0x80000, - 0x80080, - 0x80040, - 0x900e1, - 0x70104, - 0x80058, - 0x80018, - 0x90091, - 0x70114, - 0x80078, - 0x80038, - 0x900d1, - 0x7010c, - 0x80068, - 0x80028, - 0x900b1, - 0x80008, - 0x80088, - 0x80048, - 0x900f1, - 0x70102, - 0x80054, - 0x80014, - 0x8011c, - 0x70112, - 0x80074, - 0x80034, - 0x900c9, - 0x7010a, - 0x80064, - 0x80024, - 0x900a9, - 0x80004, - 0x80084, - 0x80044, - 0x900e9, - 0x70106, - 0x8005c, - 0x8001c, - 0x90099, - 0x70116, - 0x8007c, - 0x8003c, - 0x900d9, - 0x7010e, - 0x8006c, - 0x8002c, - 0x900b9, - 0x8000c, - 0x8008c, - 0x8004c, - 0x900f9, - 0x70101, - 0x80052, - 0x80012, - 0x8011a, - 0x70111, - 0x80072, - 0x80032, - 0x900c5, - 0x70109, - 0x80062, - 0x80022, - 0x900a5, - 0x80002, - 0x80082, - 0x80042, - 0x900e5, - 0x70105, - 0x8005a, - 0x8001a, - 0x90095, - 0x70115, - 0x8007a, - 0x8003a, - 0x900d5, - 0x7010d, - 0x8006a, - 0x8002a, - 0x900b5, - 0x8000a, - 0x8008a, - 0x8004a, - 0x900f5, - 0x70103, - 0x80056, - 0x80016, - 0x8011e, - 0x70113, - 0x80076, - 0x80036, - 0x900cd, - 0x7010b, - 0x80066, - 0x80026, - 0x900ad, - 0x80006, - 0x80086, - 0x80046, - 0x900ed, - 0x70107, - 0x8005e, - 0x8001e, - 0x9009d, - 0x70117, - 0x8007e, - 0x8003e, - 0x900dd, - 0x7010f, - 0x8006e, - 0x8002e, - 0x900bd, - 0x8000e, - 0x8008e, - 0x8004e, - 0x900fd, - 0x70100, - 0x80051, - 0x80011, - 0x80119, - 0x70110, - 0x80071, - 0x80031, - 0x900c3, - 0x70108, - 0x80061, - 0x80021, - 0x900a3, - 0x80001, - 0x80081, - 0x80041, - 0x900e3, - 0x70104, - 0x80059, - 0x80019, - 0x90093, - 0x70114, - 0x80079, - 0x80039, - 0x900d3, - 0x7010c, - 0x80069, - 0x80029, - 0x900b3, - 0x80009, - 0x80089, - 0x80049, - 0x900f3, - 0x70102, - 0x80055, - 0x80015, - 0x8011d, - 0x70112, - 0x80075, - 0x80035, - 0x900cb, - 0x7010a, - 0x80065, - 0x80025, - 0x900ab, - 0x80005, - 0x80085, - 0x80045, - 0x900eb, - 0x70106, - 0x8005d, - 0x8001d, - 0x9009b, - 0x70116, - 0x8007d, - 0x8003d, - 0x900db, - 0x7010e, - 0x8006d, - 0x8002d, - 0x900bb, - 0x8000d, - 0x8008d, - 0x8004d, - 0x900fb, - 0x70101, - 0x80053, - 0x80013, - 0x8011b, - 0x70111, - 0x80073, - 0x80033, - 0x900c7, - 0x70109, - 0x80063, - 0x80023, - 0x900a7, - 0x80003, - 0x80083, - 0x80043, - 0x900e7, - 0x70105, - 0x8005b, - 0x8001b, - 0x90097, - 0x70115, - 0x8007b, - 0x8003b, - 0x900d7, - 0x7010d, - 0x8006b, - 0x8002b, - 0x900b7, - 0x8000b, - 0x8008b, - 0x8004b, - 0x900f7, - 0x70103, - 0x80057, - 0x80017, - 0x8011f, - 0x70113, - 0x80077, - 0x80037, - 0x900cf, - 0x7010b, - 0x80067, - 0x80027, - 0x900af, - 0x80007, - 0x80087, - 0x80047, - 0x900ef, - 0x70107, - 0x8005f, - 0x8001f, - 0x9009f, - 0x70117, - 0x8007f, - 0x8003f, - 0x900df, - 0x7010f, - 0x8006f, - 0x8002f, - 0x900bf, - 0x8000f, - 0x8008f, - 0x8004f, - 0x900ff - ]), - 9 - ]; - var fixedDistCodeTab = [ - new Int32Array([ - 0x50000, - 0x50010, - 0x50008, - 0x50018, - 0x50004, - 0x50014, - 0x5000c, - 0x5001c, - 0x50002, - 0x50012, - 0x5000a, - 0x5001a, - 0x50006, - 0x50016, - 0x5000e, - 0x00000, - 0x50001, - 0x50011, - 0x50009, - 0x50019, - 0x50005, - 0x50015, - 0x5000d, - 0x5001d, - 0x50003, - 0x50013, - 0x5000b, - 0x5001b, - 0x50007, - 0x50017, - 0x5000f, - 0x00000 - ]), - 5 - ]; - function FlateStream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - var cmf = str.getByte(); - var flg = str.getByte(); - if (cmf === -1 || flg === -1) { - error('Invalid header in flate stream: ' + cmf + ', ' + flg); - } - if ((cmf & 0x0f) !== 0x08) { - error('Unknown compression method in flate stream: ' + cmf + ', ' + flg); - } - if (((cmf << 8) + flg) % 31 !== 0) { - error('Bad FCHECK in flate stream: ' + cmf + ', ' + flg); - } - if (flg & 0x20) { - error('FDICT bit set in flate stream: ' + cmf + ', ' + flg); - } - this.codeSize = 0; - this.codeBuf = 0; - DecodeStream.call(this, maybeLength); - } - FlateStream.prototype = Object.create(DecodeStream.prototype); - FlateStream.prototype.getBits = function FlateStream_getBits(bits) { - var str = this.str; - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var b; - while (codeSize < bits) { - if ((b = str.getByte()) === -1) { - error('Bad encoding in flate stream'); - } - codeBuf |= b << codeSize; - codeSize += 8; - } - b = codeBuf & (1 << bits) - 1; - this.codeBuf = codeBuf >> bits; - this.codeSize = codeSize -= bits; - return b; - }; - FlateStream.prototype.getCode = function FlateStream_getCode(table) { - var str = this.str; - var codes = table[0]; - var maxLen = table[1]; - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var b; - while (codeSize < maxLen) { - if ((b = str.getByte()) === -1) { - break; - } - codeBuf |= b << codeSize; - codeSize += 8; - } - var code = codes[codeBuf & (1 << maxLen) - 1]; - var codeLen = code >> 16; - var codeVal = code & 0xffff; - if (codeLen < 1 || codeSize < codeLen) { - error('Bad encoding in flate stream'); - } - this.codeBuf = codeBuf >> codeLen; - this.codeSize = codeSize - codeLen; - return codeVal; - }; - FlateStream.prototype.generateHuffmanTable = function flateStreamGenerateHuffmanTable(lengths) { - var n = lengths.length; - var maxLen = 0; - var i; - for (i = 0; i < n; ++i) { - if (lengths[i] > maxLen) { - maxLen = lengths[i]; - } - } - var size = 1 << maxLen; - var codes = new Int32Array(size); - for (var len = 1, code = 0, skip = 2; len <= maxLen; ++len, code <<= 1, skip <<= 1) { - for (var val = 0; val < n; ++val) { - if (lengths[val] === len) { - var code2 = 0; - var t = code; - for (i = 0; i < len; ++i) { - code2 = code2 << 1 | t & 1; - t >>= 1; - } - for (i = code2; i < size; i += skip) { - codes[i] = len << 16 | val; - } - ++code; - } - } - } - return [ - codes, - maxLen - ]; - }; - FlateStream.prototype.readBlock = function FlateStream_readBlock() { - var buffer, len; - var str = this.str; - var hdr = this.getBits(3); - if (hdr & 1) { - this.eof = true; - } - hdr >>= 1; - if (hdr === 0) { - var b; - if ((b = str.getByte()) === -1) { - error('Bad block header in flate stream'); - } - var blockLen = b; - if ((b = str.getByte()) === -1) { - error('Bad block header in flate stream'); - } - blockLen |= b << 8; - if ((b = str.getByte()) === -1) { - error('Bad block header in flate stream'); - } - var check = b; - if ((b = str.getByte()) === -1) { - error('Bad block header in flate stream'); - } - check |= b << 8; - if (check !== (~blockLen & 0xffff) && (blockLen !== 0 || check !== 0)) { - error('Bad uncompressed block length in flate stream'); - } - this.codeBuf = 0; - this.codeSize = 0; - var bufferLength = this.bufferLength; - buffer = this.ensureBuffer(bufferLength + blockLen); - var end = bufferLength + blockLen; - this.bufferLength = end; - if (blockLen === 0) { - if (str.peekByte() === -1) { - this.eof = true; - } - } else { - for (var n = bufferLength; n < end; ++n) { - if ((b = str.getByte()) === -1) { - this.eof = true; - break; - } - buffer[n] = b; - } - } - return; - } - var litCodeTable; - var distCodeTable; - if (hdr === 1) { - litCodeTable = fixedLitCodeTab; - distCodeTable = fixedDistCodeTab; - } else if (hdr === 2) { - var numLitCodes = this.getBits(5) + 257; - var numDistCodes = this.getBits(5) + 1; - var numCodeLenCodes = this.getBits(4) + 4; - var codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length); - var i; - for (i = 0; i < numCodeLenCodes; ++i) { - codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3); - } - var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths); - len = 0; - i = 0; - var codes = numLitCodes + numDistCodes; - var codeLengths = new Uint8Array(codes); - var bitsLength, bitsOffset, what; - while (i < codes) { - var code = this.getCode(codeLenCodeTab); - if (code === 16) { - bitsLength = 2; - bitsOffset = 3; - what = len; - } else if (code === 17) { - bitsLength = 3; - bitsOffset = 3; - what = len = 0; - } else if (code === 18) { - bitsLength = 7; - bitsOffset = 11; - what = len = 0; - } else { - codeLengths[i++] = len = code; - continue; - } - var repeatLength = this.getBits(bitsLength) + bitsOffset; - while (repeatLength-- > 0) { - codeLengths[i++] = what; - } - } - litCodeTable = this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes)); - distCodeTable = this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes)); - } else { - error('Unknown block type in flate stream'); - } - buffer = this.buffer; - var limit = buffer ? buffer.length : 0; - var pos = this.bufferLength; - while (true) { - var code1 = this.getCode(litCodeTable); - if (code1 < 256) { - if (pos + 1 >= limit) { - buffer = this.ensureBuffer(pos + 1); - limit = buffer.length; - } - buffer[pos++] = code1; - continue; - } - if (code1 === 256) { - this.bufferLength = pos; - return; - } - code1 -= 257; - code1 = lengthDecode[code1]; - var code2 = code1 >> 16; - if (code2 > 0) { - code2 = this.getBits(code2); - } - len = (code1 & 0xffff) + code2; - code1 = this.getCode(distCodeTable); - code1 = distDecode[code1]; - code2 = code1 >> 16; - if (code2 > 0) { - code2 = this.getBits(code2); - } - var dist = (code1 & 0xffff) + code2; - if (pos + len >= limit) { - buffer = this.ensureBuffer(pos + len); - limit = buffer.length; - } - for (var k = 0; k < len; ++k, ++pos) { - buffer[pos] = buffer[pos - dist]; - } - } - }; - return FlateStream; - }(); - var PredictorStream = function PredictorStreamClosure() { - function PredictorStream(str, maybeLength, params) { - if (!isDict(params)) { - return str; - } - var predictor = this.predictor = params.get('Predictor') || 1; - if (predictor <= 1) { - return str; - } - if (predictor !== 2 && (predictor < 10 || predictor > 15)) { - error('Unsupported predictor: ' + predictor); - } - if (predictor === 2) { - this.readBlock = this.readBlockTiff; - } else { - this.readBlock = this.readBlockPng; - } - this.str = str; - this.dict = str.dict; - var colors = this.colors = params.get('Colors') || 1; - var bits = this.bits = params.get('BitsPerComponent') || 8; - var columns = this.columns = params.get('Columns') || 1; - this.pixBytes = colors * bits + 7 >> 3; - this.rowBytes = columns * colors * bits + 7 >> 3; - DecodeStream.call(this, maybeLength); - return this; - } - PredictorStream.prototype = Object.create(DecodeStream.prototype); - PredictorStream.prototype.readBlockTiff = function predictorStreamReadBlockTiff() { - var rowBytes = this.rowBytes; - var bufferLength = this.bufferLength; - var buffer = this.ensureBuffer(bufferLength + rowBytes); - var bits = this.bits; - var colors = this.colors; - var rawBytes = this.str.getBytes(rowBytes); - this.eof = !rawBytes.length; - if (this.eof) { - return; - } - var inbuf = 0, outbuf = 0; - var inbits = 0, outbits = 0; - var pos = bufferLength; - var i; - if (bits === 1 && colors === 1) { - for (i = 0; i < rowBytes; ++i) { - var c = rawBytes[i] ^ inbuf; - c ^= c >> 1; - c ^= c >> 2; - c ^= c >> 4; - inbuf = (c & 1) << 7; - buffer[pos++] = c; - } - } else if (bits === 8) { - for (i = 0; i < colors; ++i) { - buffer[pos++] = rawBytes[i]; - } - for (; i < rowBytes; ++i) { - buffer[pos] = buffer[pos - colors] + rawBytes[i]; - pos++; - } - } else { - var compArray = new Uint8Array(colors + 1); - var bitMask = (1 << bits) - 1; - var j = 0, k = bufferLength; - var columns = this.columns; - for (i = 0; i < columns; ++i) { - for (var kk = 0; kk < colors; ++kk) { - if (inbits < bits) { - inbuf = inbuf << 8 | rawBytes[j++] & 0xFF; - inbits += 8; - } - compArray[kk] = compArray[kk] + (inbuf >> inbits - bits) & bitMask; - inbits -= bits; - outbuf = outbuf << bits | compArray[kk]; - outbits += bits; - if (outbits >= 8) { - buffer[k++] = outbuf >> outbits - 8 & 0xFF; - outbits -= 8; - } - } - } - if (outbits > 0) { - buffer[k++] = (outbuf << 8 - outbits) + (inbuf & (1 << 8 - outbits) - 1); - } - } - this.bufferLength += rowBytes; - }; - PredictorStream.prototype.readBlockPng = function predictorStreamReadBlockPng() { - var rowBytes = this.rowBytes; - var pixBytes = this.pixBytes; - var predictor = this.str.getByte(); - var rawBytes = this.str.getBytes(rowBytes); - this.eof = !rawBytes.length; - if (this.eof) { - return; - } - var bufferLength = this.bufferLength; - var buffer = this.ensureBuffer(bufferLength + rowBytes); - var prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength); - if (prevRow.length === 0) { - prevRow = new Uint8Array(rowBytes); - } - var i, j = bufferLength, up, c; - switch (predictor) { - case 0: - for (i = 0; i < rowBytes; ++i) { - buffer[j++] = rawBytes[i]; - } - break; - case 1: - for (i = 0; i < pixBytes; ++i) { - buffer[j++] = rawBytes[i]; - } - for (; i < rowBytes; ++i) { - buffer[j] = buffer[j - pixBytes] + rawBytes[i] & 0xFF; - j++; - } - break; - case 2: - for (i = 0; i < rowBytes; ++i) { - buffer[j++] = prevRow[i] + rawBytes[i] & 0xFF; - } - break; - case 3: - for (i = 0; i < pixBytes; ++i) { - buffer[j++] = (prevRow[i] >> 1) + rawBytes[i]; - } - for (; i < rowBytes; ++i) { - buffer[j] = (prevRow[i] + buffer[j - pixBytes] >> 1) + rawBytes[i] & 0xFF; - j++; - } - break; - case 4: - for (i = 0; i < pixBytes; ++i) { - up = prevRow[i]; - c = rawBytes[i]; - buffer[j++] = up + c; - } - for (; i < rowBytes; ++i) { - up = prevRow[i]; - var upLeft = prevRow[i - pixBytes]; - var left = buffer[j - pixBytes]; - var p = left + up - upLeft; - var pa = p - left; - if (pa < 0) { - pa = -pa; - } - var pb = p - up; - if (pb < 0) { - pb = -pb; - } - var pc = p - upLeft; - if (pc < 0) { - pc = -pc; - } - c = rawBytes[i]; - if (pa <= pb && pa <= pc) { - buffer[j++] = left + c; - } else if (pb <= pc) { - buffer[j++] = up + c; - } else { - buffer[j++] = upLeft + c; - } - } - break; - default: - error('Unsupported predictor: ' + predictor); - } - this.bufferLength += rowBytes; - }; - return PredictorStream; - }(); - var JpegStream = function JpegStreamClosure() { - function JpegStream(stream, maybeLength, dict, params) { - var ch; - while ((ch = stream.getByte()) !== -1) { - if (ch === 0xFF) { - stream.skip(-1); - break; - } - } - this.stream = stream; - this.maybeLength = maybeLength; - this.dict = dict; - this.params = params; - DecodeStream.call(this, maybeLength); - } - JpegStream.prototype = Object.create(DecodeStream.prototype); - Object.defineProperty(JpegStream.prototype, 'bytes', { - get: function JpegStream_bytes() { - return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength)); - }, - configurable: true - }); - JpegStream.prototype.ensureBuffer = function JpegStream_ensureBuffer(req) { - if (this.bufferLength) { - return; - } - var jpegImage = new JpegImage(); - var decodeArr = this.dict.getArray('Decode', 'D'); - if (this.forceRGB && isArray(decodeArr)) { - var bitsPerComponent = this.dict.get('BitsPerComponent') || 8; - var decodeArrLength = decodeArr.length; - var transform = new Int32Array(decodeArrLength); - var transformNeeded = false; - var maxValue = (1 << bitsPerComponent) - 1; - for (var i = 0; i < decodeArrLength; i += 2) { - transform[i] = (decodeArr[i + 1] - decodeArr[i]) * 256 | 0; - transform[i + 1] = decodeArr[i] * maxValue | 0; - if (transform[i] !== 256 || transform[i + 1] !== 0) { - transformNeeded = true; - } - } - if (transformNeeded) { - jpegImage.decodeTransform = transform; - } - } - if (isDict(this.params)) { - var colorTransform = this.params.get('ColorTransform'); - if (isInt(colorTransform)) { - jpegImage.colorTransform = colorTransform; - } - } - jpegImage.parse(this.bytes); - var data = jpegImage.getData(this.drawWidth, this.drawHeight, this.forceRGB); - this.buffer = data; - this.bufferLength = data.length; - this.eof = true; - }; - JpegStream.prototype.getBytes = function JpegStream_getBytes(length) { - this.ensureBuffer(); - return this.buffer; - }; - JpegStream.prototype.getIR = function JpegStream_getIR(forceDataSchema) { - return createObjectURL(this.bytes, 'image/jpeg', forceDataSchema); - }; - return JpegStream; - }(); - var JpxStream = function JpxStreamClosure() { - function JpxStream(stream, maybeLength, dict, params) { - this.stream = stream; - this.maybeLength = maybeLength; - this.dict = dict; - this.params = params; - DecodeStream.call(this, maybeLength); - } - JpxStream.prototype = Object.create(DecodeStream.prototype); - Object.defineProperty(JpxStream.prototype, 'bytes', { - get: function JpxStream_bytes() { - return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength)); - }, - configurable: true - }); - JpxStream.prototype.ensureBuffer = function JpxStream_ensureBuffer(req) { - if (this.bufferLength) { - return; - } - var jpxImage = new JpxImage(); - jpxImage.parse(this.bytes); - var width = jpxImage.width; - var height = jpxImage.height; - var componentsCount = jpxImage.componentsCount; - var tileCount = jpxImage.tiles.length; - if (tileCount === 1) { - this.buffer = jpxImage.tiles[0].items; - } else { - var data = new Uint8Array(width * height * componentsCount); - for (var k = 0; k < tileCount; k++) { - var tileComponents = jpxImage.tiles[k]; - var tileWidth = tileComponents.width; - var tileHeight = tileComponents.height; - var tileLeft = tileComponents.left; - var tileTop = tileComponents.top; - var src = tileComponents.items; - var srcPosition = 0; - var dataPosition = (width * tileTop + tileLeft) * componentsCount; - var imgRowSize = width * componentsCount; - var tileRowSize = tileWidth * componentsCount; - for (var j = 0; j < tileHeight; j++) { - var rowBytes = src.subarray(srcPosition, srcPosition + tileRowSize); - data.set(rowBytes, dataPosition); - srcPosition += tileRowSize; - dataPosition += imgRowSize; - } - } - this.buffer = data; - } - this.bufferLength = this.buffer.length; - this.eof = true; - }; - return JpxStream; - }(); - var Jbig2Stream = function Jbig2StreamClosure() { - function Jbig2Stream(stream, maybeLength, dict, params) { - this.stream = stream; - this.maybeLength = maybeLength; - this.dict = dict; - this.params = params; - DecodeStream.call(this, maybeLength); - } - Jbig2Stream.prototype = Object.create(DecodeStream.prototype); - Object.defineProperty(Jbig2Stream.prototype, 'bytes', { - get: function Jbig2Stream_bytes() { - return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength)); - }, - configurable: true - }); - Jbig2Stream.prototype.ensureBuffer = function Jbig2Stream_ensureBuffer(req) { - if (this.bufferLength) { - return; - } - var jbig2Image = new Jbig2Image(); - var chunks = []; - if (isDict(this.params)) { - var globalsStream = this.params.get('JBIG2Globals'); - if (isStream(globalsStream)) { - var globals = globalsStream.getBytes(); - chunks.push({ - data: globals, - start: 0, - end: globals.length - }); - } - } - chunks.push({ - data: this.bytes, - start: 0, - end: this.bytes.length - }); - var data = jbig2Image.parseChunks(chunks); - var dataLength = data.length; - for (var i = 0; i < dataLength; i++) { - data[i] ^= 0xFF; - } - this.buffer = data; - this.bufferLength = dataLength; - this.eof = true; - }; - return Jbig2Stream; - }(); - var DecryptStream = function DecryptStreamClosure() { - function DecryptStream(str, maybeLength, decrypt) { - this.str = str; - this.dict = str.dict; - this.decrypt = decrypt; - this.nextChunk = null; - this.initialized = false; - DecodeStream.call(this, maybeLength); - } - var chunkSize = 512; - DecryptStream.prototype = Object.create(DecodeStream.prototype); - DecryptStream.prototype.readBlock = function DecryptStream_readBlock() { - var chunk; - if (this.initialized) { - chunk = this.nextChunk; - } else { - chunk = this.str.getBytes(chunkSize); - this.initialized = true; - } - if (!chunk || chunk.length === 0) { - this.eof = true; - return; - } - this.nextChunk = this.str.getBytes(chunkSize); - var hasMoreData = this.nextChunk && this.nextChunk.length > 0; - var decrypt = this.decrypt; - chunk = decrypt(chunk, !hasMoreData); - var bufferLength = this.bufferLength; - var i, n = chunk.length; - var buffer = this.ensureBuffer(bufferLength + n); - for (i = 0; i < n; i++) { - buffer[bufferLength++] = chunk[i]; - } - this.bufferLength = bufferLength; - }; - return DecryptStream; - }(); - var Ascii85Stream = function Ascii85StreamClosure() { - function Ascii85Stream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - this.input = new Uint8Array(5); - if (maybeLength) { - maybeLength = 0.8 * maybeLength; - } - DecodeStream.call(this, maybeLength); - } - Ascii85Stream.prototype = Object.create(DecodeStream.prototype); - Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() { - var TILDA_CHAR = 0x7E; - var Z_LOWER_CHAR = 0x7A; - var EOF = -1; - var str = this.str; - var c = str.getByte(); - while (isSpace(c)) { - c = str.getByte(); - } - if (c === EOF || c === TILDA_CHAR) { - this.eof = true; - return; - } - var bufferLength = this.bufferLength, buffer; - var i; - if (c === Z_LOWER_CHAR) { - buffer = this.ensureBuffer(bufferLength + 4); - for (i = 0; i < 4; ++i) { - buffer[bufferLength + i] = 0; - } - this.bufferLength += 4; - } else { - var input = this.input; - input[0] = c; - for (i = 1; i < 5; ++i) { - c = str.getByte(); - while (isSpace(c)) { - c = str.getByte(); - } - input[i] = c; - if (c === EOF || c === TILDA_CHAR) { - break; - } - } - buffer = this.ensureBuffer(bufferLength + i - 1); - this.bufferLength += i - 1; - if (i < 5) { - for (; i < 5; ++i) { - input[i] = 0x21 + 84; - } - this.eof = true; - } - var t = 0; - for (i = 0; i < 5; ++i) { - t = t * 85 + (input[i] - 0x21); - } - for (i = 3; i >= 0; --i) { - buffer[bufferLength + i] = t & 0xFF; - t >>= 8; - } - } - }; - return Ascii85Stream; - }(); - var AsciiHexStream = function AsciiHexStreamClosure() { - function AsciiHexStream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - this.firstDigit = -1; - if (maybeLength) { - maybeLength = 0.5 * maybeLength; - } - DecodeStream.call(this, maybeLength); - } - AsciiHexStream.prototype = Object.create(DecodeStream.prototype); - AsciiHexStream.prototype.readBlock = function AsciiHexStream_readBlock() { - var UPSTREAM_BLOCK_SIZE = 8000; - var bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE); - if (!bytes.length) { - this.eof = true; - return; - } - var maxDecodeLength = bytes.length + 1 >> 1; - var buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength); - var bufferLength = this.bufferLength; - var firstDigit = this.firstDigit; - for (var i = 0, ii = bytes.length; i < ii; i++) { - var ch = bytes[i], digit; - if (ch >= 0x30 && ch <= 0x39) { - digit = ch & 0x0F; - } else if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { - digit = (ch & 0x0F) + 9; - } else if (ch === 0x3E) { - this.eof = true; - break; - } else { - continue; - } - if (firstDigit < 0) { - firstDigit = digit; - } else { - buffer[bufferLength++] = firstDigit << 4 | digit; - firstDigit = -1; - } - } - if (firstDigit >= 0 && this.eof) { - buffer[bufferLength++] = firstDigit << 4; - firstDigit = -1; - } - this.firstDigit = firstDigit; - this.bufferLength = bufferLength; - }; - return AsciiHexStream; - }(); - var RunLengthStream = function RunLengthStreamClosure() { - function RunLengthStream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - DecodeStream.call(this, maybeLength); - } - RunLengthStream.prototype = Object.create(DecodeStream.prototype); - RunLengthStream.prototype.readBlock = function RunLengthStream_readBlock() { - var repeatHeader = this.str.getBytes(2); - if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) { - this.eof = true; - return; - } - var buffer; - var bufferLength = this.bufferLength; - var n = repeatHeader[0]; - if (n < 128) { - buffer = this.ensureBuffer(bufferLength + n + 1); - buffer[bufferLength++] = repeatHeader[1]; - if (n > 0) { - var source = this.str.getBytes(n); - buffer.set(source, bufferLength); - bufferLength += n; - } - } else { - n = 257 - n; - var b = repeatHeader[1]; - buffer = this.ensureBuffer(bufferLength + n + 1); - for (var i = 0; i < n; i++) { - buffer[bufferLength++] = b; - } - } - this.bufferLength = bufferLength; - }; - return RunLengthStream; - }(); - var CCITTFaxStream = function CCITTFaxStreamClosure() { - var ccittEOL = -2; - var ccittEOF = -1; - var twoDimPass = 0; - var twoDimHoriz = 1; - var twoDimVert0 = 2; - var twoDimVertR1 = 3; - var twoDimVertL1 = 4; - var twoDimVertR2 = 5; - var twoDimVertL2 = 6; - var twoDimVertR3 = 7; - var twoDimVertL3 = 8; - var twoDimTable = [ - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - 7, - twoDimVertL3 - ], - [ - 7, - twoDimVertR3 - ], - [ - 6, - twoDimVertL2 - ], - [ - 6, - twoDimVertL2 - ], - [ - 6, - twoDimVertR2 - ], - [ - 6, - twoDimVertR2 - ], - [ - 4, - twoDimPass - ], - [ - 4, - twoDimPass - ], - [ - 4, - twoDimPass - ], - [ - 4, - twoDimPass - ], - [ - 4, - twoDimPass - ], - [ - 4, - twoDimPass - ], - [ - 4, - twoDimPass - ], - [ - 4, - twoDimPass - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimHoriz - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertL1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 3, - twoDimVertR1 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ], - [ - 1, - twoDimVert0 - ] - ]; - var whiteTable1 = [ - [ - -1, - -1 - ], - [ - 12, - ccittEOL - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - 11, - 1792 - ], - [ - 11, - 1792 - ], - [ - 12, - 1984 - ], - [ - 12, - 2048 - ], - [ - 12, - 2112 - ], - [ - 12, - 2176 - ], - [ - 12, - 2240 - ], - [ - 12, - 2304 - ], - [ - 11, - 1856 - ], - [ - 11, - 1856 - ], - [ - 11, - 1920 - ], - [ - 11, - 1920 - ], - [ - 12, - 2368 - ], - [ - 12, - 2432 - ], - [ - 12, - 2496 - ], - [ - 12, - 2560 - ] - ]; - var whiteTable2 = [ - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - 8, - 29 - ], - [ - 8, - 29 - ], - [ - 8, - 30 - ], - [ - 8, - 30 - ], - [ - 8, - 45 - ], - [ - 8, - 45 - ], - [ - 8, - 46 - ], - [ - 8, - 46 - ], - [ - 7, - 22 - ], - [ - 7, - 22 - ], - [ - 7, - 22 - ], - [ - 7, - 22 - ], - [ - 7, - 23 - ], - [ - 7, - 23 - ], - [ - 7, - 23 - ], - [ - 7, - 23 - ], - [ - 8, - 47 - ], - [ - 8, - 47 - ], - [ - 8, - 48 - ], - [ - 8, - 48 - ], - [ - 6, - 13 - ], - [ - 6, - 13 - ], - [ - 6, - 13 - ], - [ - 6, - 13 - ], - [ - 6, - 13 - ], - [ - 6, - 13 - ], - [ - 6, - 13 - ], - [ - 6, - 13 - ], - [ - 7, - 20 - ], - [ - 7, - 20 - ], - [ - 7, - 20 - ], - [ - 7, - 20 - ], - [ - 8, - 33 - ], - [ - 8, - 33 - ], - [ - 8, - 34 - ], - [ - 8, - 34 - ], - [ - 8, - 35 - ], - [ - 8, - 35 - ], - [ - 8, - 36 - ], - [ - 8, - 36 - ], - [ - 8, - 37 - ], - [ - 8, - 37 - ], - [ - 8, - 38 - ], - [ - 8, - 38 - ], - [ - 7, - 19 - ], - [ - 7, - 19 - ], - [ - 7, - 19 - ], - [ - 7, - 19 - ], - [ - 8, - 31 - ], - [ - 8, - 31 - ], - [ - 8, - 32 - ], - [ - 8, - 32 - ], - [ - 6, - 1 - ], - [ - 6, - 1 - ], - [ - 6, - 1 - ], - [ - 6, - 1 - ], - [ - 6, - 1 - ], - [ - 6, - 1 - ], - [ - 6, - 1 - ], - [ - 6, - 1 - ], - [ - 6, - 12 - ], - [ - 6, - 12 - ], - [ - 6, - 12 - ], - [ - 6, - 12 - ], - [ - 6, - 12 - ], - [ - 6, - 12 - ], - [ - 6, - 12 - ], - [ - 6, - 12 - ], - [ - 8, - 53 - ], - [ - 8, - 53 - ], - [ - 8, - 54 - ], - [ - 8, - 54 - ], - [ - 7, - 26 - ], - [ - 7, - 26 - ], - [ - 7, - 26 - ], - [ - 7, - 26 - ], - [ - 8, - 39 - ], - [ - 8, - 39 - ], - [ - 8, - 40 - ], - [ - 8, - 40 - ], - [ - 8, - 41 - ], - [ - 8, - 41 - ], - [ - 8, - 42 - ], - [ - 8, - 42 - ], - [ - 8, - 43 - ], - [ - 8, - 43 - ], - [ - 8, - 44 - ], - [ - 8, - 44 - ], - [ - 7, - 21 - ], - [ - 7, - 21 - ], - [ - 7, - 21 - ], - [ - 7, - 21 - ], - [ - 7, - 28 - ], - [ - 7, - 28 - ], - [ - 7, - 28 - ], - [ - 7, - 28 - ], - [ - 8, - 61 - ], - [ - 8, - 61 - ], - [ - 8, - 62 - ], - [ - 8, - 62 - ], - [ - 8, - 63 - ], - [ - 8, - 63 - ], - [ - 8, - 0 - ], - [ - 8, - 0 - ], - [ - 8, - 320 - ], - [ - 8, - 320 - ], - [ - 8, - 384 - ], - [ - 8, - 384 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 10 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 5, - 11 - ], - [ - 7, - 27 - ], - [ - 7, - 27 - ], - [ - 7, - 27 - ], - [ - 7, - 27 - ], - [ - 8, - 59 - ], - [ - 8, - 59 - ], - [ - 8, - 60 - ], - [ - 8, - 60 - ], - [ - 9, - 1472 - ], - [ - 9, - 1536 - ], - [ - 9, - 1600 - ], - [ - 9, - 1728 - ], - [ - 7, - 18 - ], - [ - 7, - 18 - ], - [ - 7, - 18 - ], - [ - 7, - 18 - ], - [ - 7, - 24 - ], - [ - 7, - 24 - ], - [ - 7, - 24 - ], - [ - 7, - 24 - ], - [ - 8, - 49 - ], - [ - 8, - 49 - ], - [ - 8, - 50 - ], - [ - 8, - 50 - ], - [ - 8, - 51 - ], - [ - 8, - 51 - ], - [ - 8, - 52 - ], - [ - 8, - 52 - ], - [ - 7, - 25 - ], - [ - 7, - 25 - ], - [ - 7, - 25 - ], - [ - 7, - 25 - ], - [ - 8, - 55 - ], - [ - 8, - 55 - ], - [ - 8, - 56 - ], - [ - 8, - 56 - ], - [ - 8, - 57 - ], - [ - 8, - 57 - ], - [ - 8, - 58 - ], - [ - 8, - 58 - ], - [ - 6, - 192 - ], - [ - 6, - 192 - ], - [ - 6, - 192 - ], - [ - 6, - 192 - ], - [ - 6, - 192 - ], - [ - 6, - 192 - ], - [ - 6, - 192 - ], - [ - 6, - 192 - ], - [ - 6, - 1664 - ], - [ - 6, - 1664 - ], - [ - 6, - 1664 - ], - [ - 6, - 1664 - ], - [ - 6, - 1664 - ], - [ - 6, - 1664 - ], - [ - 6, - 1664 - ], - [ - 6, - 1664 - ], - [ - 8, - 448 - ], - [ - 8, - 448 - ], - [ - 8, - 512 - ], - [ - 8, - 512 - ], - [ - 9, - 704 - ], - [ - 9, - 768 - ], - [ - 8, - 640 - ], - [ - 8, - 640 - ], - [ - 8, - 576 - ], - [ - 8, - 576 - ], - [ - 9, - 832 - ], - [ - 9, - 896 - ], - [ - 9, - 960 - ], - [ - 9, - 1024 - ], - [ - 9, - 1088 - ], - [ - 9, - 1152 - ], - [ - 9, - 1216 - ], - [ - 9, - 1280 - ], - [ - 9, - 1344 - ], - [ - 9, - 1408 - ], - [ - 7, - 256 - ], - [ - 7, - 256 - ], - [ - 7, - 256 - ], - [ - 7, - 256 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 2 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 4, - 3 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 128 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 8 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 5, - 9 - ], - [ - 6, - 16 - ], - [ - 6, - 16 - ], - [ - 6, - 16 - ], - [ - 6, - 16 - ], - [ - 6, - 16 - ], - [ - 6, - 16 - ], - [ - 6, - 16 - ], - [ - 6, - 16 - ], - [ - 6, - 17 - ], - [ - 6, - 17 - ], - [ - 6, - 17 - ], - [ - 6, - 17 - ], - [ - 6, - 17 - ], - [ - 6, - 17 - ], - [ - 6, - 17 - ], - [ - 6, - 17 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 4 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 6, - 14 - ], - [ - 6, - 14 - ], - [ - 6, - 14 - ], - [ - 6, - 14 - ], - [ - 6, - 14 - ], - [ - 6, - 14 - ], - [ - 6, - 14 - ], - [ - 6, - 14 - ], - [ - 6, - 15 - ], - [ - 6, - 15 - ], - [ - 6, - 15 - ], - [ - 6, - 15 - ], - [ - 6, - 15 - ], - [ - 6, - 15 - ], - [ - 6, - 15 - ], - [ - 6, - 15 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 5, - 64 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ], - [ - 4, - 7 - ] - ]; - var blackTable1 = [ - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - 12, - ccittEOL - ], - [ - 12, - ccittEOL - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - 11, - 1792 - ], - [ - 11, - 1792 - ], - [ - 11, - 1792 - ], - [ - 11, - 1792 - ], - [ - 12, - 1984 - ], - [ - 12, - 1984 - ], - [ - 12, - 2048 - ], - [ - 12, - 2048 - ], - [ - 12, - 2112 - ], - [ - 12, - 2112 - ], - [ - 12, - 2176 - ], - [ - 12, - 2176 - ], - [ - 12, - 2240 - ], - [ - 12, - 2240 - ], - [ - 12, - 2304 - ], - [ - 12, - 2304 - ], - [ - 11, - 1856 - ], - [ - 11, - 1856 - ], - [ - 11, - 1856 - ], - [ - 11, - 1856 - ], - [ - 11, - 1920 - ], - [ - 11, - 1920 - ], - [ - 11, - 1920 - ], - [ - 11, - 1920 - ], - [ - 12, - 2368 - ], - [ - 12, - 2368 - ], - [ - 12, - 2432 - ], - [ - 12, - 2432 - ], - [ - 12, - 2496 - ], - [ - 12, - 2496 - ], - [ - 12, - 2560 - ], - [ - 12, - 2560 - ], - [ - 10, - 18 - ], - [ - 10, - 18 - ], - [ - 10, - 18 - ], - [ - 10, - 18 - ], - [ - 10, - 18 - ], - [ - 10, - 18 - ], - [ - 10, - 18 - ], - [ - 10, - 18 - ], - [ - 12, - 52 - ], - [ - 12, - 52 - ], - [ - 13, - 640 - ], - [ - 13, - 704 - ], - [ - 13, - 768 - ], - [ - 13, - 832 - ], - [ - 12, - 55 - ], - [ - 12, - 55 - ], - [ - 12, - 56 - ], - [ - 12, - 56 - ], - [ - 13, - 1280 - ], - [ - 13, - 1344 - ], - [ - 13, - 1408 - ], - [ - 13, - 1472 - ], - [ - 12, - 59 - ], - [ - 12, - 59 - ], - [ - 12, - 60 - ], - [ - 12, - 60 - ], - [ - 13, - 1536 - ], - [ - 13, - 1600 - ], - [ - 11, - 24 - ], - [ - 11, - 24 - ], - [ - 11, - 24 - ], - [ - 11, - 24 - ], - [ - 11, - 25 - ], - [ - 11, - 25 - ], - [ - 11, - 25 - ], - [ - 11, - 25 - ], - [ - 13, - 1664 - ], - [ - 13, - 1728 - ], - [ - 12, - 320 - ], - [ - 12, - 320 - ], - [ - 12, - 384 - ], - [ - 12, - 384 - ], - [ - 12, - 448 - ], - [ - 12, - 448 - ], - [ - 13, - 512 - ], - [ - 13, - 576 - ], - [ - 12, - 53 - ], - [ - 12, - 53 - ], - [ - 12, - 54 - ], - [ - 12, - 54 - ], - [ - 13, - 896 - ], - [ - 13, - 960 - ], - [ - 13, - 1024 - ], - [ - 13, - 1088 - ], - [ - 13, - 1152 - ], - [ - 13, - 1216 - ], - [ - 10, - 64 - ], - [ - 10, - 64 - ], - [ - 10, - 64 - ], - [ - 10, - 64 - ], - [ - 10, - 64 - ], - [ - 10, - 64 - ], - [ - 10, - 64 - ], - [ - 10, - 64 - ] - ]; - var blackTable2 = [ - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 8, - 13 - ], - [ - 11, - 23 - ], - [ - 11, - 23 - ], - [ - 12, - 50 - ], - [ - 12, - 51 - ], - [ - 12, - 44 - ], - [ - 12, - 45 - ], - [ - 12, - 46 - ], - [ - 12, - 47 - ], - [ - 12, - 57 - ], - [ - 12, - 58 - ], - [ - 12, - 61 - ], - [ - 12, - 256 - ], - [ - 10, - 16 - ], - [ - 10, - 16 - ], - [ - 10, - 16 - ], - [ - 10, - 16 - ], - [ - 10, - 17 - ], - [ - 10, - 17 - ], - [ - 10, - 17 - ], - [ - 10, - 17 - ], - [ - 12, - 48 - ], - [ - 12, - 49 - ], - [ - 12, - 62 - ], - [ - 12, - 63 - ], - [ - 12, - 30 - ], - [ - 12, - 31 - ], - [ - 12, - 32 - ], - [ - 12, - 33 - ], - [ - 12, - 40 - ], - [ - 12, - 41 - ], - [ - 11, - 22 - ], - [ - 11, - 22 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 8, - 14 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 10 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 7, - 11 - ], - [ - 9, - 15 - ], - [ - 9, - 15 - ], - [ - 9, - 15 - ], - [ - 9, - 15 - ], - [ - 9, - 15 - ], - [ - 9, - 15 - ], - [ - 9, - 15 - ], - [ - 9, - 15 - ], - [ - 12, - 128 - ], - [ - 12, - 192 - ], - [ - 12, - 26 - ], - [ - 12, - 27 - ], - [ - 12, - 28 - ], - [ - 12, - 29 - ], - [ - 11, - 19 - ], - [ - 11, - 19 - ], - [ - 11, - 20 - ], - [ - 11, - 20 - ], - [ - 12, - 34 - ], - [ - 12, - 35 - ], - [ - 12, - 36 - ], - [ - 12, - 37 - ], - [ - 12, - 38 - ], - [ - 12, - 39 - ], - [ - 11, - 21 - ], - [ - 11, - 21 - ], - [ - 12, - 42 - ], - [ - 12, - 43 - ], - [ - 10, - 0 - ], - [ - 10, - 0 - ], - [ - 10, - 0 - ], - [ - 10, - 0 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ], - [ - 7, - 12 - ] - ]; - var blackTable3 = [ - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - -1, - -1 - ], - [ - 6, - 9 - ], - [ - 6, - 8 - ], - [ - 5, - 7 - ], - [ - 5, - 7 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 6 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 4, - 5 - ], - [ - 3, - 1 - ], - [ - 3, - 1 - ], - [ - 3, - 1 - ], - [ - 3, - 1 - ], - [ - 3, - 1 - ], - [ - 3, - 1 - ], - [ - 3, - 1 - ], - [ - 3, - 1 - ], - [ - 3, - 4 - ], - [ - 3, - 4 - ], - [ - 3, - 4 - ], - [ - 3, - 4 - ], - [ - 3, - 4 - ], - [ - 3, - 4 - ], - [ - 3, - 4 - ], - [ - 3, - 4 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 3 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ], - [ - 2, - 2 - ] - ]; - function CCITTFaxStream(str, maybeLength, params) { - this.str = str; - this.dict = str.dict; - params = params || Dict.empty; - this.encoding = params.get('K') || 0; - this.eoline = params.get('EndOfLine') || false; - this.byteAlign = params.get('EncodedByteAlign') || false; - this.columns = params.get('Columns') || 1728; - this.rows = params.get('Rows') || 0; - var eoblock = params.get('EndOfBlock'); - if (eoblock === null || eoblock === undefined) { - eoblock = true; - } - this.eoblock = eoblock; - this.black = params.get('BlackIs1') || false; - this.codingLine = new Uint32Array(this.columns + 1); - this.refLine = new Uint32Array(this.columns + 2); - this.codingLine[0] = this.columns; - this.codingPos = 0; - this.row = 0; - this.nextLine2D = this.encoding < 0; - this.inputBits = 0; - this.inputBuf = 0; - this.outputBits = 0; - var code1; - while ((code1 = this.lookBits(12)) === 0) { - this.eatBits(1); - } - if (code1 === 1) { - this.eatBits(12); - } - if (this.encoding > 0) { - this.nextLine2D = !this.lookBits(1); - this.eatBits(1); - } - DecodeStream.call(this, maybeLength); - } - CCITTFaxStream.prototype = Object.create(DecodeStream.prototype); - CCITTFaxStream.prototype.readBlock = function CCITTFaxStream_readBlock() { - while (!this.eof) { - var c = this.lookChar(); - this.ensureBuffer(this.bufferLength + 1); - this.buffer[this.bufferLength++] = c; - } - }; - CCITTFaxStream.prototype.addPixels = function ccittFaxStreamAddPixels(a1, blackPixels) { - var codingLine = this.codingLine; - var codingPos = this.codingPos; - if (a1 > codingLine[codingPos]) { - if (a1 > this.columns) { - info('row is wrong length'); - this.err = true; - a1 = this.columns; - } - if (codingPos & 1 ^ blackPixels) { - ++codingPos; - } - codingLine[codingPos] = a1; - } - this.codingPos = codingPos; - }; - CCITTFaxStream.prototype.addPixelsNeg = function ccittFaxStreamAddPixelsNeg(a1, blackPixels) { - var codingLine = this.codingLine; - var codingPos = this.codingPos; - if (a1 > codingLine[codingPos]) { - if (a1 > this.columns) { - info('row is wrong length'); - this.err = true; - a1 = this.columns; - } - if (codingPos & 1 ^ blackPixels) { - ++codingPos; - } - codingLine[codingPos] = a1; - } else if (a1 < codingLine[codingPos]) { - if (a1 < 0) { - info('invalid code'); - this.err = true; - a1 = 0; - } - while (codingPos > 0 && a1 < codingLine[codingPos - 1]) { - --codingPos; - } - codingLine[codingPos] = a1; - } - this.codingPos = codingPos; - }; - CCITTFaxStream.prototype.lookChar = function CCITTFaxStream_lookChar() { - var refLine = this.refLine; - var codingLine = this.codingLine; - var columns = this.columns; - var refPos, blackPixels, bits, i; - if (this.outputBits === 0) { - if (this.eof) { - return null; - } - this.err = false; - var code1, code2, code3; - if (this.nextLine2D) { - for (i = 0; codingLine[i] < columns; ++i) { - refLine[i] = codingLine[i]; - } - refLine[i++] = columns; - refLine[i] = columns; - codingLine[0] = 0; - this.codingPos = 0; - refPos = 0; - blackPixels = 0; - while (codingLine[this.codingPos] < columns) { - code1 = this.getTwoDimCode(); - switch (code1) { - case twoDimPass: - this.addPixels(refLine[refPos + 1], blackPixels); - if (refLine[refPos + 1] < columns) { - refPos += 2; - } - break; - case twoDimHoriz: - code1 = code2 = 0; - if (blackPixels) { - do { - code1 += code3 = this.getBlackCode(); - } while (code3 >= 64); - do { - code2 += code3 = this.getWhiteCode(); - } while (code3 >= 64); - } else { - do { - code1 += code3 = this.getWhiteCode(); - } while (code3 >= 64); - do { - code2 += code3 = this.getBlackCode(); - } while (code3 >= 64); - } - this.addPixels(codingLine[this.codingPos] + code1, blackPixels); - if (codingLine[this.codingPos] < columns) { - this.addPixels(codingLine[this.codingPos] + code2, blackPixels ^ 1); - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - break; - case twoDimVertR3: - this.addPixels(refLine[refPos] + 3, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertR2: - this.addPixels(refLine[refPos] + 2, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertR1: - this.addPixels(refLine[refPos] + 1, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVert0: - this.addPixels(refLine[refPos], blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertL3: - this.addPixelsNeg(refLine[refPos] - 3, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - if (refPos > 0) { - --refPos; - } else { - ++refPos; - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertL2: - this.addPixelsNeg(refLine[refPos] - 2, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - if (refPos > 0) { - --refPos; - } else { - ++refPos; - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertL1: - this.addPixelsNeg(refLine[refPos] - 1, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - if (refPos > 0) { - --refPos; - } else { - ++refPos; - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case ccittEOF: - this.addPixels(columns, 0); - this.eof = true; - break; - default: - info('bad 2d code'); - this.addPixels(columns, 0); - this.err = true; - } - } - } else { - codingLine[0] = 0; - this.codingPos = 0; - blackPixels = 0; - while (codingLine[this.codingPos] < columns) { - code1 = 0; - if (blackPixels) { - do { - code1 += code3 = this.getBlackCode(); - } while (code3 >= 64); - } else { - do { - code1 += code3 = this.getWhiteCode(); - } while (code3 >= 64); - } - this.addPixels(codingLine[this.codingPos] + code1, blackPixels); - blackPixels ^= 1; - } - } - var gotEOL = false; - if (this.byteAlign) { - this.inputBits &= ~7; - } - if (!this.eoblock && this.row === this.rows - 1) { - this.eof = true; - } else { - code1 = this.lookBits(12); - if (this.eoline) { - while (code1 !== ccittEOF && code1 !== 1) { - this.eatBits(1); - code1 = this.lookBits(12); - } - } else { - while (code1 === 0) { - this.eatBits(1); - code1 = this.lookBits(12); - } - } - if (code1 === 1) { - this.eatBits(12); - gotEOL = true; - } else if (code1 === ccittEOF) { - this.eof = true; - } - } - if (!this.eof && this.encoding > 0) { - this.nextLine2D = !this.lookBits(1); - this.eatBits(1); - } - if (this.eoblock && gotEOL && this.byteAlign) { - code1 = this.lookBits(12); - if (code1 === 1) { - this.eatBits(12); - if (this.encoding > 0) { - this.lookBits(1); - this.eatBits(1); - } - if (this.encoding >= 0) { - for (i = 0; i < 4; ++i) { - code1 = this.lookBits(12); - if (code1 !== 1) { - info('bad rtc code: ' + code1); - } - this.eatBits(12); - if (this.encoding > 0) { - this.lookBits(1); - this.eatBits(1); - } - } - } - this.eof = true; - } - } else if (this.err && this.eoline) { - while (true) { - code1 = this.lookBits(13); - if (code1 === ccittEOF) { - this.eof = true; - return null; - } - if (code1 >> 1 === 1) { - break; - } - this.eatBits(1); - } - this.eatBits(12); - if (this.encoding > 0) { - this.eatBits(1); - this.nextLine2D = !(code1 & 1); - } - } - if (codingLine[0] > 0) { - this.outputBits = codingLine[this.codingPos = 0]; - } else { - this.outputBits = codingLine[this.codingPos = 1]; - } - this.row++; - } - var c; - if (this.outputBits >= 8) { - c = this.codingPos & 1 ? 0 : 0xFF; - this.outputBits -= 8; - if (this.outputBits === 0 && codingLine[this.codingPos] < columns) { - this.codingPos++; - this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; - } - } else { - bits = 8; - c = 0; - do { - if (this.outputBits > bits) { - c <<= bits; - if (!(this.codingPos & 1)) { - c |= 0xFF >> 8 - bits; - } - this.outputBits -= bits; - bits = 0; - } else { - c <<= this.outputBits; - if (!(this.codingPos & 1)) { - c |= 0xFF >> 8 - this.outputBits; - } - bits -= this.outputBits; - this.outputBits = 0; - if (codingLine[this.codingPos] < columns) { - this.codingPos++; - this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; - } else if (bits > 0) { - c <<= bits; - bits = 0; - } - } - } while (bits); - } - if (this.black) { - c ^= 0xFF; - } - return c; - }; - CCITTFaxStream.prototype.findTableCode = function ccittFaxStreamFindTableCode(start, end, table, limit) { - var limitValue = limit || 0; - for (var i = start; i <= end; ++i) { - var code = this.lookBits(i); - if (code === ccittEOF) { - return [ - true, - 1, - false - ]; - } - if (i < end) { - code <<= end - i; - } - if (!limitValue || code >= limitValue) { - var p = table[code - limitValue]; - if (p[0] === i) { - this.eatBits(i); - return [ - true, - p[1], - true - ]; - } - } - } - return [ - false, - 0, - false - ]; - }; - CCITTFaxStream.prototype.getTwoDimCode = function ccittFaxStreamGetTwoDimCode() { - var code = 0; - var p; - if (this.eoblock) { - code = this.lookBits(7); - p = twoDimTable[code]; - if (p && p[0] > 0) { - this.eatBits(p[0]); - return p[1]; - } - } else { - var result = this.findTableCode(1, 7, twoDimTable); - if (result[0] && result[2]) { - return result[1]; - } - } - info('Bad two dim code'); - return ccittEOF; - }; - CCITTFaxStream.prototype.getWhiteCode = function ccittFaxStreamGetWhiteCode() { - var code = 0; - var p; - if (this.eoblock) { - code = this.lookBits(12); - if (code === ccittEOF) { - return 1; - } - if (code >> 5 === 0) { - p = whiteTable1[code]; - } else { - p = whiteTable2[code >> 3]; - } - if (p[0] > 0) { - this.eatBits(p[0]); - return p[1]; - } - } else { - var result = this.findTableCode(1, 9, whiteTable2); - if (result[0]) { - return result[1]; - } - result = this.findTableCode(11, 12, whiteTable1); - if (result[0]) { - return result[1]; - } - } - info('bad white code'); - this.eatBits(1); - return 1; - }; - CCITTFaxStream.prototype.getBlackCode = function ccittFaxStreamGetBlackCode() { - var code, p; - if (this.eoblock) { - code = this.lookBits(13); - if (code === ccittEOF) { - return 1; - } - if (code >> 7 === 0) { - p = blackTable1[code]; - } else if (code >> 9 === 0 && code >> 7 !== 0) { - p = blackTable2[(code >> 1) - 64]; - } else { - p = blackTable3[code >> 7]; - } - if (p[0] > 0) { - this.eatBits(p[0]); - return p[1]; - } - } else { - var result = this.findTableCode(2, 6, blackTable3); - if (result[0]) { - return result[1]; - } - result = this.findTableCode(7, 12, blackTable2, 64); - if (result[0]) { - return result[1]; - } - result = this.findTableCode(10, 13, blackTable1); - if (result[0]) { - return result[1]; - } - } - info('bad black code'); - this.eatBits(1); - return 1; - }; - CCITTFaxStream.prototype.lookBits = function CCITTFaxStream_lookBits(n) { - var c; - while (this.inputBits < n) { - if ((c = this.str.getByte()) === -1) { - if (this.inputBits === 0) { - return ccittEOF; - } - return this.inputBuf << n - this.inputBits & 0xFFFF >> 16 - n; - } - this.inputBuf = this.inputBuf << 8 | c; - this.inputBits += 8; - } - return this.inputBuf >> this.inputBits - n & 0xFFFF >> 16 - n; - }; - CCITTFaxStream.prototype.eatBits = function CCITTFaxStream_eatBits(n) { - if ((this.inputBits -= n) < 0) { - this.inputBits = 0; - } - }; - return CCITTFaxStream; - }(); - var LZWStream = function LZWStreamClosure() { - function LZWStream(str, maybeLength, earlyChange) { - this.str = str; - this.dict = str.dict; - this.cachedData = 0; - this.bitsCached = 0; - var maxLzwDictionarySize = 4096; - var lzwState = { - earlyChange: earlyChange, - codeLength: 9, - nextCode: 258, - dictionaryValues: new Uint8Array(maxLzwDictionarySize), - dictionaryLengths: new Uint16Array(maxLzwDictionarySize), - dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize), - currentSequence: new Uint8Array(maxLzwDictionarySize), - currentSequenceLength: 0 - }; - for (var i = 0; i < 256; ++i) { - lzwState.dictionaryValues[i] = i; - lzwState.dictionaryLengths[i] = 1; - } - this.lzwState = lzwState; - DecodeStream.call(this, maybeLength); - } - LZWStream.prototype = Object.create(DecodeStream.prototype); - LZWStream.prototype.readBits = function LZWStream_readBits(n) { - var bitsCached = this.bitsCached; - var cachedData = this.cachedData; - while (bitsCached < n) { - var c = this.str.getByte(); - if (c === -1) { - this.eof = true; - return null; - } - cachedData = cachedData << 8 | c; - bitsCached += 8; - } - this.bitsCached = bitsCached -= n; - this.cachedData = cachedData; - this.lastCode = null; - return cachedData >>> bitsCached & (1 << n) - 1; - }; - LZWStream.prototype.readBlock = function LZWStream_readBlock() { - var blockSize = 512; - var estimatedDecodedSize = blockSize * 2, decodedSizeDelta = blockSize; - var i, j, q; - var lzwState = this.lzwState; - if (!lzwState) { - return; - } - var earlyChange = lzwState.earlyChange; - var nextCode = lzwState.nextCode; - var dictionaryValues = lzwState.dictionaryValues; - var dictionaryLengths = lzwState.dictionaryLengths; - var dictionaryPrevCodes = lzwState.dictionaryPrevCodes; - var codeLength = lzwState.codeLength; - var prevCode = lzwState.prevCode; - var currentSequence = lzwState.currentSequence; - var currentSequenceLength = lzwState.currentSequenceLength; - var decodedLength = 0; - var currentBufferLength = this.bufferLength; - var buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); - for (i = 0; i < blockSize; i++) { - var code = this.readBits(codeLength); - var hasPrev = currentSequenceLength > 0; - if (code < 256) { - currentSequence[0] = code; - currentSequenceLength = 1; - } else if (code >= 258) { - if (code < nextCode) { - currentSequenceLength = dictionaryLengths[code]; - for (j = currentSequenceLength - 1, q = code; j >= 0; j--) { - currentSequence[j] = dictionaryValues[q]; - q = dictionaryPrevCodes[q]; - } - } else { - currentSequence[currentSequenceLength++] = currentSequence[0]; - } - } else if (code === 256) { - codeLength = 9; - nextCode = 258; - currentSequenceLength = 0; - continue; - } else { - this.eof = true; - delete this.lzwState; - break; - } - if (hasPrev) { - dictionaryPrevCodes[nextCode] = prevCode; - dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1; - dictionaryValues[nextCode] = currentSequence[0]; - nextCode++; - codeLength = nextCode + earlyChange & nextCode + earlyChange - 1 ? codeLength : Math.min(Math.log(nextCode + earlyChange) / 0.6931471805599453 + 1, 12) | 0; - } - prevCode = code; - decodedLength += currentSequenceLength; - if (estimatedDecodedSize < decodedLength) { - do { - estimatedDecodedSize += decodedSizeDelta; - } while (estimatedDecodedSize < decodedLength); - buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); - } - for (j = 0; j < currentSequenceLength; j++) { - buffer[currentBufferLength++] = currentSequence[j]; - } - } - lzwState.nextCode = nextCode; - lzwState.codeLength = codeLength; - lzwState.prevCode = prevCode; - lzwState.currentSequenceLength = currentSequenceLength; - this.bufferLength = currentBufferLength; - }; - return LZWStream; - }(); - var NullStream = function NullStreamClosure() { - function NullStream() { - Stream.call(this, new Uint8Array(0)); - } - NullStream.prototype = Stream.prototype; - return NullStream; - }(); - exports.Ascii85Stream = Ascii85Stream; - exports.AsciiHexStream = AsciiHexStream; - exports.CCITTFaxStream = CCITTFaxStream; - exports.DecryptStream = DecryptStream; - exports.DecodeStream = DecodeStream; - exports.FlateStream = FlateStream; - exports.Jbig2Stream = Jbig2Stream; - exports.JpegStream = JpegStream; - exports.JpxStream = JpxStream; - exports.NullStream = NullStream; - exports.PredictorStream = PredictorStream; - exports.RunLengthStream = RunLengthStream; - exports.Stream = Stream; - exports.StreamsSequenceStream = StreamsSequenceStream; - exports.StringStream = StringStream; - exports.LZWStream = LZWStream; - })); - (function (root, factory) { - factory(root.pdfjsCoreCrypto = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream); - }(this, function (exports, sharedUtil, corePrimitives, coreStream) { - var PasswordException = sharedUtil.PasswordException; - var PasswordResponses = sharedUtil.PasswordResponses; - var bytesToString = sharedUtil.bytesToString; - var warn = sharedUtil.warn; - var error = sharedUtil.error; - var assert = sharedUtil.assert; - var isInt = sharedUtil.isInt; - var stringToBytes = sharedUtil.stringToBytes; - var utf8StringToString = sharedUtil.utf8StringToString; - var Name = corePrimitives.Name; - var isName = corePrimitives.isName; - var isDict = corePrimitives.isDict; - var DecryptStream = coreStream.DecryptStream; - var ARCFourCipher = function ARCFourCipherClosure() { - function ARCFourCipher(key) { - this.a = 0; - this.b = 0; - var s = new Uint8Array(256); - var i, j = 0, tmp, keyLength = key.length; - for (i = 0; i < 256; ++i) { - s[i] = i; - } - for (i = 0; i < 256; ++i) { - tmp = s[i]; - j = j + tmp + key[i % keyLength] & 0xFF; - s[i] = s[j]; - s[j] = tmp; - } - this.s = s; - } - ARCFourCipher.prototype = { - encryptBlock: function ARCFourCipher_encryptBlock(data) { - var i, n = data.length, tmp, tmp2; - var a = this.a, b = this.b, s = this.s; - var output = new Uint8Array(n); - for (i = 0; i < n; ++i) { - a = a + 1 & 0xFF; - tmp = s[a]; - b = b + tmp & 0xFF; - tmp2 = s[b]; - s[a] = tmp2; - s[b] = tmp; - output[i] = data[i] ^ s[tmp + tmp2 & 0xFF]; - } - this.a = a; - this.b = b; - return output; - } - }; - ARCFourCipher.prototype.decryptBlock = ARCFourCipher.prototype.encryptBlock; - return ARCFourCipher; - }(); - var calculateMD5 = function calculateMD5Closure() { - var r = new Uint8Array([ - 7, - 12, - 17, - 22, - 7, - 12, - 17, - 22, - 7, - 12, - 17, - 22, - 7, - 12, - 17, - 22, - 5, - 9, - 14, - 20, - 5, - 9, - 14, - 20, - 5, - 9, - 14, - 20, - 5, - 9, - 14, - 20, - 4, - 11, - 16, - 23, - 4, - 11, - 16, - 23, - 4, - 11, - 16, - 23, - 4, - 11, - 16, - 23, - 6, - 10, - 15, - 21, - 6, - 10, - 15, - 21, - 6, - 10, - 15, - 21, - 6, - 10, - 15, - 21 - ]); - var k = new Int32Array([ - -680876936, - -389564586, - 606105819, - -1044525330, - -176418897, - 1200080426, - -1473231341, - -45705983, - 1770035416, - -1958414417, - -42063, - -1990404162, - 1804603682, - -40341101, - -1502002290, - 1236535329, - -165796510, - -1069501632, - 643717713, - -373897302, - -701558691, - 38016083, - -660478335, - -405537848, - 568446438, - -1019803690, - -187363961, - 1163531501, - -1444681467, - -51403784, - 1735328473, - -1926607734, - -378558, - -2022574463, - 1839030562, - -35309556, - -1530992060, - 1272893353, - -155497632, - -1094730640, - 681279174, - -358537222, - -722521979, - 76029189, - -640364487, - -421815835, - 530742520, - -995338651, - -198630844, - 1126891415, - -1416354905, - -57434055, - 1700485571, - -1894986606, - -1051523, - -2054922799, - 1873313359, - -30611744, - -1560198380, - 1309151649, - -145523070, - -1120210379, - 718787259, - -343485551 - ]); - function hash(data, offset, length) { - var h0 = 1732584193, h1 = -271733879, h2 = -1732584194, h3 = 271733878; - var paddedLength = length + 72 & ~63; - var padded = new Uint8Array(paddedLength); - var i, j, n; - for (i = 0; i < length; ++i) { - padded[i] = data[offset++]; - } - padded[i++] = 0x80; - n = paddedLength - 8; - while (i < n) { - padded[i++] = 0; - } - padded[i++] = length << 3 & 0xFF; - padded[i++] = length >> 5 & 0xFF; - padded[i++] = length >> 13 & 0xFF; - padded[i++] = length >> 21 & 0xFF; - padded[i++] = length >>> 29 & 0xFF; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - var w = new Int32Array(16); - for (i = 0; i < paddedLength;) { - for (j = 0; j < 16; ++j, i += 4) { - w[j] = padded[i] | padded[i + 1] << 8 | padded[i + 2] << 16 | padded[i + 3] << 24; - } - var a = h0, b = h1, c = h2, d = h3, f, g; - for (j = 0; j < 64; ++j) { - if (j < 16) { - f = b & c | ~b & d; - g = j; - } else if (j < 32) { - f = d & b | ~d & c; - g = 5 * j + 1 & 15; - } else if (j < 48) { - f = b ^ c ^ d; - g = 3 * j + 5 & 15; - } else { - f = c ^ (b | ~d); - g = 7 * j & 15; - } - var tmp = d, rotateArg = a + f + k[j] + w[g] | 0, rotate = r[j]; - d = c; - c = b; - b = b + (rotateArg << rotate | rotateArg >>> 32 - rotate) | 0; - a = tmp; - } - h0 = h0 + a | 0; - h1 = h1 + b | 0; - h2 = h2 + c | 0; - h3 = h3 + d | 0; - } - return new Uint8Array([ - h0 & 0xFF, - h0 >> 8 & 0xFF, - h0 >> 16 & 0xFF, - h0 >>> 24 & 0xFF, - h1 & 0xFF, - h1 >> 8 & 0xFF, - h1 >> 16 & 0xFF, - h1 >>> 24 & 0xFF, - h2 & 0xFF, - h2 >> 8 & 0xFF, - h2 >> 16 & 0xFF, - h2 >>> 24 & 0xFF, - h3 & 0xFF, - h3 >> 8 & 0xFF, - h3 >> 16 & 0xFF, - h3 >>> 24 & 0xFF - ]); - } - return hash; - }(); - var Word64 = function Word64Closure() { - function Word64(highInteger, lowInteger) { - this.high = highInteger | 0; - this.low = lowInteger | 0; - } - Word64.prototype = { - and: function Word64_and(word) { - this.high &= word.high; - this.low &= word.low; - }, - xor: function Word64_xor(word) { - this.high ^= word.high; - this.low ^= word.low; - }, - or: function Word64_or(word) { - this.high |= word.high; - this.low |= word.low; - }, - shiftRight: function Word64_shiftRight(places) { - if (places >= 32) { - this.low = this.high >>> places - 32 | 0; - this.high = 0; - } else { - this.low = this.low >>> places | this.high << 32 - places; - this.high = this.high >>> places | 0; - } - }, - shiftLeft: function Word64_shiftLeft(places) { - if (places >= 32) { - this.high = this.low << places - 32; - this.low = 0; - } else { - this.high = this.high << places | this.low >>> 32 - places; - this.low = this.low << places; - } - }, - rotateRight: function Word64_rotateRight(places) { - var low, high; - if (places & 32) { - high = this.low; - low = this.high; - } else { - low = this.low; - high = this.high; - } - places &= 31; - this.low = low >>> places | high << 32 - places; - this.high = high >>> places | low << 32 - places; - }, - not: function Word64_not() { - this.high = ~this.high; - this.low = ~this.low; - }, - add: function Word64_add(word) { - var lowAdd = (this.low >>> 0) + (word.low >>> 0); - var highAdd = (this.high >>> 0) + (word.high >>> 0); - if (lowAdd > 0xFFFFFFFF) { - highAdd += 1; - } - this.low = lowAdd | 0; - this.high = highAdd | 0; - }, - copyTo: function Word64_copyTo(bytes, offset) { - bytes[offset] = this.high >>> 24 & 0xFF; - bytes[offset + 1] = this.high >> 16 & 0xFF; - bytes[offset + 2] = this.high >> 8 & 0xFF; - bytes[offset + 3] = this.high & 0xFF; - bytes[offset + 4] = this.low >>> 24 & 0xFF; - bytes[offset + 5] = this.low >> 16 & 0xFF; - bytes[offset + 6] = this.low >> 8 & 0xFF; - bytes[offset + 7] = this.low & 0xFF; - }, - assign: function Word64_assign(word) { - this.high = word.high; - this.low = word.low; - } - }; - return Word64; - }(); - var calculateSHA256 = function calculateSHA256Closure() { - function rotr(x, n) { - return x >>> n | x << 32 - n; - } - function ch(x, y, z) { - return x & y ^ ~x & z; - } - function maj(x, y, z) { - return x & y ^ x & z ^ y & z; - } - function sigma(x) { - return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); - } - function sigmaPrime(x) { - return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); - } - function littleSigma(x) { - return rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3; - } - function littleSigmaPrime(x) { - return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10; - } - var k = [ - 0x428a2f98, - 0x71374491, - 0xb5c0fbcf, - 0xe9b5dba5, - 0x3956c25b, - 0x59f111f1, - 0x923f82a4, - 0xab1c5ed5, - 0xd807aa98, - 0x12835b01, - 0x243185be, - 0x550c7dc3, - 0x72be5d74, - 0x80deb1fe, - 0x9bdc06a7, - 0xc19bf174, - 0xe49b69c1, - 0xefbe4786, - 0x0fc19dc6, - 0x240ca1cc, - 0x2de92c6f, - 0x4a7484aa, - 0x5cb0a9dc, - 0x76f988da, - 0x983e5152, - 0xa831c66d, - 0xb00327c8, - 0xbf597fc7, - 0xc6e00bf3, - 0xd5a79147, - 0x06ca6351, - 0x14292967, - 0x27b70a85, - 0x2e1b2138, - 0x4d2c6dfc, - 0x53380d13, - 0x650a7354, - 0x766a0abb, - 0x81c2c92e, - 0x92722c85, - 0xa2bfe8a1, - 0xa81a664b, - 0xc24b8b70, - 0xc76c51a3, - 0xd192e819, - 0xd6990624, - 0xf40e3585, - 0x106aa070, - 0x19a4c116, - 0x1e376c08, - 0x2748774c, - 0x34b0bcb5, - 0x391c0cb3, - 0x4ed8aa4a, - 0x5b9cca4f, - 0x682e6ff3, - 0x748f82ee, - 0x78a5636f, - 0x84c87814, - 0x8cc70208, - 0x90befffa, - 0xa4506ceb, - 0xbef9a3f7, - 0xc67178f2 - ]; - function hash(data, offset, length) { - var h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a, h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19; - var paddedLength = Math.ceil((length + 9) / 64) * 64; - var padded = new Uint8Array(paddedLength); - var i, j, n; - for (i = 0; i < length; ++i) { - padded[i] = data[offset++]; - } - padded[i++] = 0x80; - n = paddedLength - 8; - while (i < n) { - padded[i++] = 0; - } - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = length >>> 29 & 0xFF; - padded[i++] = length >> 21 & 0xFF; - padded[i++] = length >> 13 & 0xFF; - padded[i++] = length >> 5 & 0xFF; - padded[i++] = length << 3 & 0xFF; - var w = new Uint32Array(64); - for (i = 0; i < paddedLength;) { - for (j = 0; j < 16; ++j) { - w[j] = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; - i += 4; - } - for (j = 16; j < 64; ++j) { - w[j] = littleSigmaPrime(w[j - 2]) + w[j - 7] + littleSigma(w[j - 15]) + w[j - 16] | 0; - } - var a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, t1, t2; - for (j = 0; j < 64; ++j) { - t1 = h + sigmaPrime(e) + ch(e, f, g) + k[j] + w[j]; - t2 = sigma(a) + maj(a, b, c); - h = g; - g = f; - f = e; - e = d + t1 | 0; - d = c; - c = b; - b = a; - a = t1 + t2 | 0; - } - h0 = h0 + a | 0; - h1 = h1 + b | 0; - h2 = h2 + c | 0; - h3 = h3 + d | 0; - h4 = h4 + e | 0; - h5 = h5 + f | 0; - h6 = h6 + g | 0; - h7 = h7 + h | 0; - } - return new Uint8Array([ - h0 >> 24 & 0xFF, - h0 >> 16 & 0xFF, - h0 >> 8 & 0xFF, - h0 & 0xFF, - h1 >> 24 & 0xFF, - h1 >> 16 & 0xFF, - h1 >> 8 & 0xFF, - h1 & 0xFF, - h2 >> 24 & 0xFF, - h2 >> 16 & 0xFF, - h2 >> 8 & 0xFF, - h2 & 0xFF, - h3 >> 24 & 0xFF, - h3 >> 16 & 0xFF, - h3 >> 8 & 0xFF, - h3 & 0xFF, - h4 >> 24 & 0xFF, - h4 >> 16 & 0xFF, - h4 >> 8 & 0xFF, - h4 & 0xFF, - h5 >> 24 & 0xFF, - h5 >> 16 & 0xFF, - h5 >> 8 & 0xFF, - h5 & 0xFF, - h6 >> 24 & 0xFF, - h6 >> 16 & 0xFF, - h6 >> 8 & 0xFF, - h6 & 0xFF, - h7 >> 24 & 0xFF, - h7 >> 16 & 0xFF, - h7 >> 8 & 0xFF, - h7 & 0xFF - ]); - } - return hash; - }(); - var calculateSHA512 = function calculateSHA512Closure() { - function ch(result, x, y, z, tmp) { - result.assign(x); - result.and(y); - tmp.assign(x); - tmp.not(); - tmp.and(z); - result.xor(tmp); - } - function maj(result, x, y, z, tmp) { - result.assign(x); - result.and(y); - tmp.assign(x); - tmp.and(z); - result.xor(tmp); - tmp.assign(y); - tmp.and(z); - result.xor(tmp); - } - function sigma(result, x, tmp) { - result.assign(x); - result.rotateRight(28); - tmp.assign(x); - tmp.rotateRight(34); - result.xor(tmp); - tmp.assign(x); - tmp.rotateRight(39); - result.xor(tmp); - } - function sigmaPrime(result, x, tmp) { - result.assign(x); - result.rotateRight(14); - tmp.assign(x); - tmp.rotateRight(18); - result.xor(tmp); - tmp.assign(x); - tmp.rotateRight(41); - result.xor(tmp); - } - function littleSigma(result, x, tmp) { - result.assign(x); - result.rotateRight(1); - tmp.assign(x); - tmp.rotateRight(8); - result.xor(tmp); - tmp.assign(x); - tmp.shiftRight(7); - result.xor(tmp); - } - function littleSigmaPrime(result, x, tmp) { - result.assign(x); - result.rotateRight(19); - tmp.assign(x); - tmp.rotateRight(61); - result.xor(tmp); - tmp.assign(x); - tmp.shiftRight(6); - result.xor(tmp); - } - var k = [ - new Word64(0x428a2f98, 0xd728ae22), - new Word64(0x71374491, 0x23ef65cd), - new Word64(0xb5c0fbcf, 0xec4d3b2f), - new Word64(0xe9b5dba5, 0x8189dbbc), - new Word64(0x3956c25b, 0xf348b538), - new Word64(0x59f111f1, 0xb605d019), - new Word64(0x923f82a4, 0xaf194f9b), - new Word64(0xab1c5ed5, 0xda6d8118), - new Word64(0xd807aa98, 0xa3030242), - new Word64(0x12835b01, 0x45706fbe), - new Word64(0x243185be, 0x4ee4b28c), - new Word64(0x550c7dc3, 0xd5ffb4e2), - new Word64(0x72be5d74, 0xf27b896f), - new Word64(0x80deb1fe, 0x3b1696b1), - new Word64(0x9bdc06a7, 0x25c71235), - new Word64(0xc19bf174, 0xcf692694), - new Word64(0xe49b69c1, 0x9ef14ad2), - new Word64(0xefbe4786, 0x384f25e3), - new Word64(0x0fc19dc6, 0x8b8cd5b5), - new Word64(0x240ca1cc, 0x77ac9c65), - new Word64(0x2de92c6f, 0x592b0275), - new Word64(0x4a7484aa, 0x6ea6e483), - new Word64(0x5cb0a9dc, 0xbd41fbd4), - new Word64(0x76f988da, 0x831153b5), - new Word64(0x983e5152, 0xee66dfab), - new Word64(0xa831c66d, 0x2db43210), - new Word64(0xb00327c8, 0x98fb213f), - new Word64(0xbf597fc7, 0xbeef0ee4), - new Word64(0xc6e00bf3, 0x3da88fc2), - new Word64(0xd5a79147, 0x930aa725), - new Word64(0x06ca6351, 0xe003826f), - new Word64(0x14292967, 0x0a0e6e70), - new Word64(0x27b70a85, 0x46d22ffc), - new Word64(0x2e1b2138, 0x5c26c926), - new Word64(0x4d2c6dfc, 0x5ac42aed), - new Word64(0x53380d13, 0x9d95b3df), - new Word64(0x650a7354, 0x8baf63de), - new Word64(0x766a0abb, 0x3c77b2a8), - new Word64(0x81c2c92e, 0x47edaee6), - new Word64(0x92722c85, 0x1482353b), - new Word64(0xa2bfe8a1, 0x4cf10364), - new Word64(0xa81a664b, 0xbc423001), - new Word64(0xc24b8b70, 0xd0f89791), - new Word64(0xc76c51a3, 0x0654be30), - new Word64(0xd192e819, 0xd6ef5218), - new Word64(0xd6990624, 0x5565a910), - new Word64(0xf40e3585, 0x5771202a), - new Word64(0x106aa070, 0x32bbd1b8), - new Word64(0x19a4c116, 0xb8d2d0c8), - new Word64(0x1e376c08, 0x5141ab53), - new Word64(0x2748774c, 0xdf8eeb99), - new Word64(0x34b0bcb5, 0xe19b48a8), - new Word64(0x391c0cb3, 0xc5c95a63), - new Word64(0x4ed8aa4a, 0xe3418acb), - new Word64(0x5b9cca4f, 0x7763e373), - new Word64(0x682e6ff3, 0xd6b2b8a3), - new Word64(0x748f82ee, 0x5defb2fc), - new Word64(0x78a5636f, 0x43172f60), - new Word64(0x84c87814, 0xa1f0ab72), - new Word64(0x8cc70208, 0x1a6439ec), - new Word64(0x90befffa, 0x23631e28), - new Word64(0xa4506ceb, 0xde82bde9), - new Word64(0xbef9a3f7, 0xb2c67915), - new Word64(0xc67178f2, 0xe372532b), - new Word64(0xca273ece, 0xea26619c), - new Word64(0xd186b8c7, 0x21c0c207), - new Word64(0xeada7dd6, 0xcde0eb1e), - new Word64(0xf57d4f7f, 0xee6ed178), - new Word64(0x06f067aa, 0x72176fba), - new Word64(0x0a637dc5, 0xa2c898a6), - new Word64(0x113f9804, 0xbef90dae), - new Word64(0x1b710b35, 0x131c471b), - new Word64(0x28db77f5, 0x23047d84), - new Word64(0x32caab7b, 0x40c72493), - new Word64(0x3c9ebe0a, 0x15c9bebc), - new Word64(0x431d67c4, 0x9c100d4c), - new Word64(0x4cc5d4be, 0xcb3e42b6), - new Word64(0x597f299c, 0xfc657e2a), - new Word64(0x5fcb6fab, 0x3ad6faec), - new Word64(0x6c44198c, 0x4a475817) - ]; - function hash(data, offset, length, mode384) { - mode384 = !!mode384; - var h0, h1, h2, h3, h4, h5, h6, h7; - if (!mode384) { - h0 = new Word64(0x6a09e667, 0xf3bcc908); - h1 = new Word64(0xbb67ae85, 0x84caa73b); - h2 = new Word64(0x3c6ef372, 0xfe94f82b); - h3 = new Word64(0xa54ff53a, 0x5f1d36f1); - h4 = new Word64(0x510e527f, 0xade682d1); - h5 = new Word64(0x9b05688c, 0x2b3e6c1f); - h6 = new Word64(0x1f83d9ab, 0xfb41bd6b); - h7 = new Word64(0x5be0cd19, 0x137e2179); - } else { - h0 = new Word64(0xcbbb9d5d, 0xc1059ed8); - h1 = new Word64(0x629a292a, 0x367cd507); - h2 = new Word64(0x9159015a, 0x3070dd17); - h3 = new Word64(0x152fecd8, 0xf70e5939); - h4 = new Word64(0x67332667, 0xffc00b31); - h5 = new Word64(0x8eb44a87, 0x68581511); - h6 = new Word64(0xdb0c2e0d, 0x64f98fa7); - h7 = new Word64(0x47b5481d, 0xbefa4fa4); - } - var paddedLength = Math.ceil((length + 17) / 128) * 128; - var padded = new Uint8Array(paddedLength); - var i, j, n; - for (i = 0; i < length; ++i) { - padded[i] = data[offset++]; - } - padded[i++] = 0x80; - n = paddedLength - 16; - while (i < n) { - padded[i++] = 0; - } - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = length >>> 29 & 0xFF; - padded[i++] = length >> 21 & 0xFF; - padded[i++] = length >> 13 & 0xFF; - padded[i++] = length >> 5 & 0xFF; - padded[i++] = length << 3 & 0xFF; - var w = new Array(80); - for (i = 0; i < 80; i++) { - w[i] = new Word64(0, 0); - } - var a = new Word64(0, 0), b = new Word64(0, 0), c = new Word64(0, 0); - var d = new Word64(0, 0), e = new Word64(0, 0), f = new Word64(0, 0); - var g = new Word64(0, 0), h = new Word64(0, 0); - var t1 = new Word64(0, 0), t2 = new Word64(0, 0); - var tmp1 = new Word64(0, 0), tmp2 = new Word64(0, 0), tmp3; - for (i = 0; i < paddedLength;) { - for (j = 0; j < 16; ++j) { - w[j].high = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; - w[j].low = padded[i + 4] << 24 | padded[i + 5] << 16 | padded[i + 6] << 8 | padded[i + 7]; - i += 8; - } - for (j = 16; j < 80; ++j) { - tmp3 = w[j]; - littleSigmaPrime(tmp3, w[j - 2], tmp2); - tmp3.add(w[j - 7]); - littleSigma(tmp1, w[j - 15], tmp2); - tmp3.add(tmp1); - tmp3.add(w[j - 16]); - } - a.assign(h0); - b.assign(h1); - c.assign(h2); - d.assign(h3); - e.assign(h4); - f.assign(h5); - g.assign(h6); - h.assign(h7); - for (j = 0; j < 80; ++j) { - t1.assign(h); - sigmaPrime(tmp1, e, tmp2); - t1.add(tmp1); - ch(tmp1, e, f, g, tmp2); - t1.add(tmp1); - t1.add(k[j]); - t1.add(w[j]); - sigma(t2, a, tmp2); - maj(tmp1, a, b, c, tmp2); - t2.add(tmp1); - tmp3 = h; - h = g; - g = f; - f = e; - d.add(t1); - e = d; - d = c; - c = b; - b = a; - tmp3.assign(t1); - tmp3.add(t2); - a = tmp3; - } - h0.add(a); - h1.add(b); - h2.add(c); - h3.add(d); - h4.add(e); - h5.add(f); - h6.add(g); - h7.add(h); - } - var result; - if (!mode384) { - result = new Uint8Array(64); - h0.copyTo(result, 0); - h1.copyTo(result, 8); - h2.copyTo(result, 16); - h3.copyTo(result, 24); - h4.copyTo(result, 32); - h5.copyTo(result, 40); - h6.copyTo(result, 48); - h7.copyTo(result, 56); - } else { - result = new Uint8Array(48); - h0.copyTo(result, 0); - h1.copyTo(result, 8); - h2.copyTo(result, 16); - h3.copyTo(result, 24); - h4.copyTo(result, 32); - h5.copyTo(result, 40); - } - return result; - } - return hash; - }(); - var calculateSHA384 = function calculateSHA384Closure() { - function hash(data, offset, length) { - return calculateSHA512(data, offset, length, true); - } - return hash; - }(); - var NullCipher = function NullCipherClosure() { - function NullCipher() { - } - NullCipher.prototype = { - decryptBlock: function NullCipher_decryptBlock(data) { - return data; - } - }; - return NullCipher; - }(); - var AES128Cipher = function AES128CipherClosure() { - var rcon = new Uint8Array([ - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d - ]); - var s = new Uint8Array([ - 0x63, - 0x7c, - 0x77, - 0x7b, - 0xf2, - 0x6b, - 0x6f, - 0xc5, - 0x30, - 0x01, - 0x67, - 0x2b, - 0xfe, - 0xd7, - 0xab, - 0x76, - 0xca, - 0x82, - 0xc9, - 0x7d, - 0xfa, - 0x59, - 0x47, - 0xf0, - 0xad, - 0xd4, - 0xa2, - 0xaf, - 0x9c, - 0xa4, - 0x72, - 0xc0, - 0xb7, - 0xfd, - 0x93, - 0x26, - 0x36, - 0x3f, - 0xf7, - 0xcc, - 0x34, - 0xa5, - 0xe5, - 0xf1, - 0x71, - 0xd8, - 0x31, - 0x15, - 0x04, - 0xc7, - 0x23, - 0xc3, - 0x18, - 0x96, - 0x05, - 0x9a, - 0x07, - 0x12, - 0x80, - 0xe2, - 0xeb, - 0x27, - 0xb2, - 0x75, - 0x09, - 0x83, - 0x2c, - 0x1a, - 0x1b, - 0x6e, - 0x5a, - 0xa0, - 0x52, - 0x3b, - 0xd6, - 0xb3, - 0x29, - 0xe3, - 0x2f, - 0x84, - 0x53, - 0xd1, - 0x00, - 0xed, - 0x20, - 0xfc, - 0xb1, - 0x5b, - 0x6a, - 0xcb, - 0xbe, - 0x39, - 0x4a, - 0x4c, - 0x58, - 0xcf, - 0xd0, - 0xef, - 0xaa, - 0xfb, - 0x43, - 0x4d, - 0x33, - 0x85, - 0x45, - 0xf9, - 0x02, - 0x7f, - 0x50, - 0x3c, - 0x9f, - 0xa8, - 0x51, - 0xa3, - 0x40, - 0x8f, - 0x92, - 0x9d, - 0x38, - 0xf5, - 0xbc, - 0xb6, - 0xda, - 0x21, - 0x10, - 0xff, - 0xf3, - 0xd2, - 0xcd, - 0x0c, - 0x13, - 0xec, - 0x5f, - 0x97, - 0x44, - 0x17, - 0xc4, - 0xa7, - 0x7e, - 0x3d, - 0x64, - 0x5d, - 0x19, - 0x73, - 0x60, - 0x81, - 0x4f, - 0xdc, - 0x22, - 0x2a, - 0x90, - 0x88, - 0x46, - 0xee, - 0xb8, - 0x14, - 0xde, - 0x5e, - 0x0b, - 0xdb, - 0xe0, - 0x32, - 0x3a, - 0x0a, - 0x49, - 0x06, - 0x24, - 0x5c, - 0xc2, - 0xd3, - 0xac, - 0x62, - 0x91, - 0x95, - 0xe4, - 0x79, - 0xe7, - 0xc8, - 0x37, - 0x6d, - 0x8d, - 0xd5, - 0x4e, - 0xa9, - 0x6c, - 0x56, - 0xf4, - 0xea, - 0x65, - 0x7a, - 0xae, - 0x08, - 0xba, - 0x78, - 0x25, - 0x2e, - 0x1c, - 0xa6, - 0xb4, - 0xc6, - 0xe8, - 0xdd, - 0x74, - 0x1f, - 0x4b, - 0xbd, - 0x8b, - 0x8a, - 0x70, - 0x3e, - 0xb5, - 0x66, - 0x48, - 0x03, - 0xf6, - 0x0e, - 0x61, - 0x35, - 0x57, - 0xb9, - 0x86, - 0xc1, - 0x1d, - 0x9e, - 0xe1, - 0xf8, - 0x98, - 0x11, - 0x69, - 0xd9, - 0x8e, - 0x94, - 0x9b, - 0x1e, - 0x87, - 0xe9, - 0xce, - 0x55, - 0x28, - 0xdf, - 0x8c, - 0xa1, - 0x89, - 0x0d, - 0xbf, - 0xe6, - 0x42, - 0x68, - 0x41, - 0x99, - 0x2d, - 0x0f, - 0xb0, - 0x54, - 0xbb, - 0x16 - ]); - var inv_s = new Uint8Array([ - 0x52, - 0x09, - 0x6a, - 0xd5, - 0x30, - 0x36, - 0xa5, - 0x38, - 0xbf, - 0x40, - 0xa3, - 0x9e, - 0x81, - 0xf3, - 0xd7, - 0xfb, - 0x7c, - 0xe3, - 0x39, - 0x82, - 0x9b, - 0x2f, - 0xff, - 0x87, - 0x34, - 0x8e, - 0x43, - 0x44, - 0xc4, - 0xde, - 0xe9, - 0xcb, - 0x54, - 0x7b, - 0x94, - 0x32, - 0xa6, - 0xc2, - 0x23, - 0x3d, - 0xee, - 0x4c, - 0x95, - 0x0b, - 0x42, - 0xfa, - 0xc3, - 0x4e, - 0x08, - 0x2e, - 0xa1, - 0x66, - 0x28, - 0xd9, - 0x24, - 0xb2, - 0x76, - 0x5b, - 0xa2, - 0x49, - 0x6d, - 0x8b, - 0xd1, - 0x25, - 0x72, - 0xf8, - 0xf6, - 0x64, - 0x86, - 0x68, - 0x98, - 0x16, - 0xd4, - 0xa4, - 0x5c, - 0xcc, - 0x5d, - 0x65, - 0xb6, - 0x92, - 0x6c, - 0x70, - 0x48, - 0x50, - 0xfd, - 0xed, - 0xb9, - 0xda, - 0x5e, - 0x15, - 0x46, - 0x57, - 0xa7, - 0x8d, - 0x9d, - 0x84, - 0x90, - 0xd8, - 0xab, - 0x00, - 0x8c, - 0xbc, - 0xd3, - 0x0a, - 0xf7, - 0xe4, - 0x58, - 0x05, - 0xb8, - 0xb3, - 0x45, - 0x06, - 0xd0, - 0x2c, - 0x1e, - 0x8f, - 0xca, - 0x3f, - 0x0f, - 0x02, - 0xc1, - 0xaf, - 0xbd, - 0x03, - 0x01, - 0x13, - 0x8a, - 0x6b, - 0x3a, - 0x91, - 0x11, - 0x41, - 0x4f, - 0x67, - 0xdc, - 0xea, - 0x97, - 0xf2, - 0xcf, - 0xce, - 0xf0, - 0xb4, - 0xe6, - 0x73, - 0x96, - 0xac, - 0x74, - 0x22, - 0xe7, - 0xad, - 0x35, - 0x85, - 0xe2, - 0xf9, - 0x37, - 0xe8, - 0x1c, - 0x75, - 0xdf, - 0x6e, - 0x47, - 0xf1, - 0x1a, - 0x71, - 0x1d, - 0x29, - 0xc5, - 0x89, - 0x6f, - 0xb7, - 0x62, - 0x0e, - 0xaa, - 0x18, - 0xbe, - 0x1b, - 0xfc, - 0x56, - 0x3e, - 0x4b, - 0xc6, - 0xd2, - 0x79, - 0x20, - 0x9a, - 0xdb, - 0xc0, - 0xfe, - 0x78, - 0xcd, - 0x5a, - 0xf4, - 0x1f, - 0xdd, - 0xa8, - 0x33, - 0x88, - 0x07, - 0xc7, - 0x31, - 0xb1, - 0x12, - 0x10, - 0x59, - 0x27, - 0x80, - 0xec, - 0x5f, - 0x60, - 0x51, - 0x7f, - 0xa9, - 0x19, - 0xb5, - 0x4a, - 0x0d, - 0x2d, - 0xe5, - 0x7a, - 0x9f, - 0x93, - 0xc9, - 0x9c, - 0xef, - 0xa0, - 0xe0, - 0x3b, - 0x4d, - 0xae, - 0x2a, - 0xf5, - 0xb0, - 0xc8, - 0xeb, - 0xbb, - 0x3c, - 0x83, - 0x53, - 0x99, - 0x61, - 0x17, - 0x2b, - 0x04, - 0x7e, - 0xba, - 0x77, - 0xd6, - 0x26, - 0xe1, - 0x69, - 0x14, - 0x63, - 0x55, - 0x21, - 0x0c, - 0x7d - ]); - var mixCol = new Uint8Array(256); - for (var i = 0; i < 256; i++) { - if (i < 128) { - mixCol[i] = i << 1; - } else { - mixCol[i] = i << 1 ^ 0x1b; - } - } - var mix = new Uint32Array([ - 0x00000000, - 0x0e090d0b, - 0x1c121a16, - 0x121b171d, - 0x3824342c, - 0x362d3927, - 0x24362e3a, - 0x2a3f2331, - 0x70486858, - 0x7e416553, - 0x6c5a724e, - 0x62537f45, - 0x486c5c74, - 0x4665517f, - 0x547e4662, - 0x5a774b69, - 0xe090d0b0, - 0xee99ddbb, - 0xfc82caa6, - 0xf28bc7ad, - 0xd8b4e49c, - 0xd6bde997, - 0xc4a6fe8a, - 0xcaaff381, - 0x90d8b8e8, - 0x9ed1b5e3, - 0x8ccaa2fe, - 0x82c3aff5, - 0xa8fc8cc4, - 0xa6f581cf, - 0xb4ee96d2, - 0xbae79bd9, - 0xdb3bbb7b, - 0xd532b670, - 0xc729a16d, - 0xc920ac66, - 0xe31f8f57, - 0xed16825c, - 0xff0d9541, - 0xf104984a, - 0xab73d323, - 0xa57ade28, - 0xb761c935, - 0xb968c43e, - 0x9357e70f, - 0x9d5eea04, - 0x8f45fd19, - 0x814cf012, - 0x3bab6bcb, - 0x35a266c0, - 0x27b971dd, - 0x29b07cd6, - 0x038f5fe7, - 0x0d8652ec, - 0x1f9d45f1, - 0x119448fa, - 0x4be30393, - 0x45ea0e98, - 0x57f11985, - 0x59f8148e, - 0x73c737bf, - 0x7dce3ab4, - 0x6fd52da9, - 0x61dc20a2, - 0xad766df6, - 0xa37f60fd, - 0xb16477e0, - 0xbf6d7aeb, - 0x955259da, - 0x9b5b54d1, - 0x894043cc, - 0x87494ec7, - 0xdd3e05ae, - 0xd33708a5, - 0xc12c1fb8, - 0xcf2512b3, - 0xe51a3182, - 0xeb133c89, - 0xf9082b94, - 0xf701269f, - 0x4de6bd46, - 0x43efb04d, - 0x51f4a750, - 0x5ffdaa5b, - 0x75c2896a, - 0x7bcb8461, - 0x69d0937c, - 0x67d99e77, - 0x3daed51e, - 0x33a7d815, - 0x21bccf08, - 0x2fb5c203, - 0x058ae132, - 0x0b83ec39, - 0x1998fb24, - 0x1791f62f, - 0x764dd68d, - 0x7844db86, - 0x6a5fcc9b, - 0x6456c190, - 0x4e69e2a1, - 0x4060efaa, - 0x527bf8b7, - 0x5c72f5bc, - 0x0605bed5, - 0x080cb3de, - 0x1a17a4c3, - 0x141ea9c8, - 0x3e218af9, - 0x302887f2, - 0x223390ef, - 0x2c3a9de4, - 0x96dd063d, - 0x98d40b36, - 0x8acf1c2b, - 0x84c61120, - 0xaef93211, - 0xa0f03f1a, - 0xb2eb2807, - 0xbce2250c, - 0xe6956e65, - 0xe89c636e, - 0xfa877473, - 0xf48e7978, - 0xdeb15a49, - 0xd0b85742, - 0xc2a3405f, - 0xccaa4d54, - 0x41ecdaf7, - 0x4fe5d7fc, - 0x5dfec0e1, - 0x53f7cdea, - 0x79c8eedb, - 0x77c1e3d0, - 0x65daf4cd, - 0x6bd3f9c6, - 0x31a4b2af, - 0x3fadbfa4, - 0x2db6a8b9, - 0x23bfa5b2, - 0x09808683, - 0x07898b88, - 0x15929c95, - 0x1b9b919e, - 0xa17c0a47, - 0xaf75074c, - 0xbd6e1051, - 0xb3671d5a, - 0x99583e6b, - 0x97513360, - 0x854a247d, - 0x8b432976, - 0xd134621f, - 0xdf3d6f14, - 0xcd267809, - 0xc32f7502, - 0xe9105633, - 0xe7195b38, - 0xf5024c25, - 0xfb0b412e, - 0x9ad7618c, - 0x94de6c87, - 0x86c57b9a, - 0x88cc7691, - 0xa2f355a0, - 0xacfa58ab, - 0xbee14fb6, - 0xb0e842bd, - 0xea9f09d4, - 0xe49604df, - 0xf68d13c2, - 0xf8841ec9, - 0xd2bb3df8, - 0xdcb230f3, - 0xcea927ee, - 0xc0a02ae5, - 0x7a47b13c, - 0x744ebc37, - 0x6655ab2a, - 0x685ca621, - 0x42638510, - 0x4c6a881b, - 0x5e719f06, - 0x5078920d, - 0x0a0fd964, - 0x0406d46f, - 0x161dc372, - 0x1814ce79, - 0x322bed48, - 0x3c22e043, - 0x2e39f75e, - 0x2030fa55, - 0xec9ab701, - 0xe293ba0a, - 0xf088ad17, - 0xfe81a01c, - 0xd4be832d, - 0xdab78e26, - 0xc8ac993b, - 0xc6a59430, - 0x9cd2df59, - 0x92dbd252, - 0x80c0c54f, - 0x8ec9c844, - 0xa4f6eb75, - 0xaaffe67e, - 0xb8e4f163, - 0xb6edfc68, - 0x0c0a67b1, - 0x02036aba, - 0x10187da7, - 0x1e1170ac, - 0x342e539d, - 0x3a275e96, - 0x283c498b, - 0x26354480, - 0x7c420fe9, - 0x724b02e2, - 0x605015ff, - 0x6e5918f4, - 0x44663bc5, - 0x4a6f36ce, - 0x587421d3, - 0x567d2cd8, - 0x37a10c7a, - 0x39a80171, - 0x2bb3166c, - 0x25ba1b67, - 0x0f853856, - 0x018c355d, - 0x13972240, - 0x1d9e2f4b, - 0x47e96422, - 0x49e06929, - 0x5bfb7e34, - 0x55f2733f, - 0x7fcd500e, - 0x71c45d05, - 0x63df4a18, - 0x6dd64713, - 0xd731dcca, - 0xd938d1c1, - 0xcb23c6dc, - 0xc52acbd7, - 0xef15e8e6, - 0xe11ce5ed, - 0xf307f2f0, - 0xfd0efffb, - 0xa779b492, - 0xa970b999, - 0xbb6bae84, - 0xb562a38f, - 0x9f5d80be, - 0x91548db5, - 0x834f9aa8, - 0x8d4697a3 - ]); - function expandKey128(cipherKey) { - var b = 176, result = new Uint8Array(b); - result.set(cipherKey); - for (var j = 16, i = 1; j < b; ++i) { - var t1 = result[j - 3], t2 = result[j - 2], t3 = result[j - 1], t4 = result[j - 4]; - t1 = s[t1]; - t2 = s[t2]; - t3 = s[t3]; - t4 = s[t4]; - t1 = t1 ^ rcon[i]; - for (var n = 0; n < 4; ++n) { - result[j] = t1 ^= result[j - 16]; - j++; - result[j] = t2 ^= result[j - 16]; - j++; - result[j] = t3 ^= result[j - 16]; - j++; - result[j] = t4 ^= result[j - 16]; - j++; - } - } - return result; - } - function decrypt128(input, key) { - var state = new Uint8Array(16); - state.set(input); - var i, j, k; - var t, u, v; - for (j = 0, k = 160; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - for (i = 9; i >= 1; --i) { - t = state[13]; - state[13] = state[9]; - state[9] = state[5]; - state[5] = state[1]; - state[1] = t; - t = state[14]; - u = state[10]; - state[14] = state[6]; - state[10] = state[2]; - state[6] = t; - state[2] = u; - t = state[15]; - u = state[11]; - v = state[7]; - state[15] = state[3]; - state[11] = t; - state[7] = u; - state[3] = v; - for (j = 0; j < 16; ++j) { - state[j] = inv_s[state[j]]; - } - for (j = 0, k = i * 16; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - for (j = 0; j < 16; j += 4) { - var s0 = mix[state[j]], s1 = mix[state[j + 1]], s2 = mix[state[j + 2]], s3 = mix[state[j + 3]]; - t = s0 ^ s1 >>> 8 ^ s1 << 24 ^ s2 >>> 16 ^ s2 << 16 ^ s3 >>> 24 ^ s3 << 8; - state[j] = t >>> 24 & 0xFF; - state[j + 1] = t >> 16 & 0xFF; - state[j + 2] = t >> 8 & 0xFF; - state[j + 3] = t & 0xFF; - } - } - t = state[13]; - state[13] = state[9]; - state[9] = state[5]; - state[5] = state[1]; - state[1] = t; - t = state[14]; - u = state[10]; - state[14] = state[6]; - state[10] = state[2]; - state[6] = t; - state[2] = u; - t = state[15]; - u = state[11]; - v = state[7]; - state[15] = state[3]; - state[11] = t; - state[7] = u; - state[3] = v; - for (j = 0; j < 16; ++j) { - state[j] = inv_s[state[j]]; - state[j] ^= key[j]; - } - return state; - } - function encrypt128(input, key) { - var t, u, v, k; - var state = new Uint8Array(16); - state.set(input); - for (j = 0; j < 16; ++j) { - state[j] ^= key[j]; - } - for (i = 1; i < 10; i++) { - for (j = 0; j < 16; ++j) { - state[j] = s[state[j]]; - } - v = state[1]; - state[1] = state[5]; - state[5] = state[9]; - state[9] = state[13]; - state[13] = v; - v = state[2]; - u = state[6]; - state[2] = state[10]; - state[6] = state[14]; - state[10] = v; - state[14] = u; - v = state[3]; - u = state[7]; - t = state[11]; - state[3] = state[15]; - state[7] = v; - state[11] = u; - state[15] = t; - for (var j = 0; j < 16; j += 4) { - var s0 = state[j + 0], s1 = state[j + 1]; - var s2 = state[j + 2], s3 = state[j + 3]; - t = s0 ^ s1 ^ s2 ^ s3; - state[j + 0] ^= t ^ mixCol[s0 ^ s1]; - state[j + 1] ^= t ^ mixCol[s1 ^ s2]; - state[j + 2] ^= t ^ mixCol[s2 ^ s3]; - state[j + 3] ^= t ^ mixCol[s3 ^ s0]; - } - for (j = 0, k = i * 16; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - } - for (j = 0; j < 16; ++j) { - state[j] = s[state[j]]; - } - v = state[1]; - state[1] = state[5]; - state[5] = state[9]; - state[9] = state[13]; - state[13] = v; - v = state[2]; - u = state[6]; - state[2] = state[10]; - state[6] = state[14]; - state[10] = v; - state[14] = u; - v = state[3]; - u = state[7]; - t = state[11]; - state[3] = state[15]; - state[7] = v; - state[11] = u; - state[15] = t; - for (j = 0, k = 160; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - return state; - } - function AES128Cipher(key) { - this.key = expandKey128(key); - this.buffer = new Uint8Array(16); - this.bufferPosition = 0; - } - function decryptBlock2(data, finalize) { - var i, j, ii, sourceLength = data.length, buffer = this.buffer, bufferLength = this.bufferPosition, result = [], iv = this.iv; - for (i = 0; i < sourceLength; ++i) { - buffer[bufferLength] = data[i]; - ++bufferLength; - if (bufferLength < 16) { - continue; - } - var plain = decrypt128(buffer, this.key); - for (j = 0; j < 16; ++j) { - plain[j] ^= iv[j]; - } - iv = buffer; - result.push(plain); - buffer = new Uint8Array(16); - bufferLength = 0; - } - this.buffer = buffer; - this.bufferLength = bufferLength; - this.iv = iv; - if (result.length === 0) { - return new Uint8Array([]); - } - var outputLength = 16 * result.length; - if (finalize) { - var lastBlock = result[result.length - 1]; - var psLen = lastBlock[15]; - if (psLen <= 16) { - for (i = 15, ii = 16 - psLen; i >= ii; --i) { - if (lastBlock[i] !== psLen) { - psLen = 0; - break; - } - } - outputLength -= psLen; - result[result.length - 1] = lastBlock.subarray(0, 16 - psLen); - } - } - var output = new Uint8Array(outputLength); - for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { - output.set(result[i], j); - } - return output; - } - AES128Cipher.prototype = { - decryptBlock: function AES128Cipher_decryptBlock(data, finalize) { - var i, sourceLength = data.length; - var buffer = this.buffer, bufferLength = this.bufferPosition; - for (i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) { - buffer[bufferLength] = data[i]; - } - if (bufferLength < 16) { - this.bufferLength = bufferLength; - return new Uint8Array([]); - } - this.iv = buffer; - this.buffer = new Uint8Array(16); - this.bufferLength = 0; - this.decryptBlock = decryptBlock2; - return this.decryptBlock(data.subarray(16), finalize); - }, - encrypt: function AES128Cipher_encrypt(data, iv) { - var i, j, ii, sourceLength = data.length, buffer = this.buffer, bufferLength = this.bufferPosition, result = []; - if (!iv) { - iv = new Uint8Array(16); - } - for (i = 0; i < sourceLength; ++i) { - buffer[bufferLength] = data[i]; - ++bufferLength; - if (bufferLength < 16) { - continue; - } - for (j = 0; j < 16; ++j) { - buffer[j] ^= iv[j]; - } - var cipher = encrypt128(buffer, this.key); - iv = cipher; - result.push(cipher); - buffer = new Uint8Array(16); - bufferLength = 0; - } - this.buffer = buffer; - this.bufferLength = bufferLength; - this.iv = iv; - if (result.length === 0) { - return new Uint8Array([]); - } - var outputLength = 16 * result.length; - var output = new Uint8Array(outputLength); - for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { - output.set(result[i], j); - } - return output; - } - }; - return AES128Cipher; - }(); - var AES256Cipher = function AES256CipherClosure() { - var rcon = new Uint8Array([ - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d, - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - 0x20, - 0x40, - 0x80, - 0x1b, - 0x36, - 0x6c, - 0xd8, - 0xab, - 0x4d, - 0x9a, - 0x2f, - 0x5e, - 0xbc, - 0x63, - 0xc6, - 0x97, - 0x35, - 0x6a, - 0xd4, - 0xb3, - 0x7d, - 0xfa, - 0xef, - 0xc5, - 0x91, - 0x39, - 0x72, - 0xe4, - 0xd3, - 0xbd, - 0x61, - 0xc2, - 0x9f, - 0x25, - 0x4a, - 0x94, - 0x33, - 0x66, - 0xcc, - 0x83, - 0x1d, - 0x3a, - 0x74, - 0xe8, - 0xcb, - 0x8d - ]); - var s = new Uint8Array([ - 0x63, - 0x7c, - 0x77, - 0x7b, - 0xf2, - 0x6b, - 0x6f, - 0xc5, - 0x30, - 0x01, - 0x67, - 0x2b, - 0xfe, - 0xd7, - 0xab, - 0x76, - 0xca, - 0x82, - 0xc9, - 0x7d, - 0xfa, - 0x59, - 0x47, - 0xf0, - 0xad, - 0xd4, - 0xa2, - 0xaf, - 0x9c, - 0xa4, - 0x72, - 0xc0, - 0xb7, - 0xfd, - 0x93, - 0x26, - 0x36, - 0x3f, - 0xf7, - 0xcc, - 0x34, - 0xa5, - 0xe5, - 0xf1, - 0x71, - 0xd8, - 0x31, - 0x15, - 0x04, - 0xc7, - 0x23, - 0xc3, - 0x18, - 0x96, - 0x05, - 0x9a, - 0x07, - 0x12, - 0x80, - 0xe2, - 0xeb, - 0x27, - 0xb2, - 0x75, - 0x09, - 0x83, - 0x2c, - 0x1a, - 0x1b, - 0x6e, - 0x5a, - 0xa0, - 0x52, - 0x3b, - 0xd6, - 0xb3, - 0x29, - 0xe3, - 0x2f, - 0x84, - 0x53, - 0xd1, - 0x00, - 0xed, - 0x20, - 0xfc, - 0xb1, - 0x5b, - 0x6a, - 0xcb, - 0xbe, - 0x39, - 0x4a, - 0x4c, - 0x58, - 0xcf, - 0xd0, - 0xef, - 0xaa, - 0xfb, - 0x43, - 0x4d, - 0x33, - 0x85, - 0x45, - 0xf9, - 0x02, - 0x7f, - 0x50, - 0x3c, - 0x9f, - 0xa8, - 0x51, - 0xa3, - 0x40, - 0x8f, - 0x92, - 0x9d, - 0x38, - 0xf5, - 0xbc, - 0xb6, - 0xda, - 0x21, - 0x10, - 0xff, - 0xf3, - 0xd2, - 0xcd, - 0x0c, - 0x13, - 0xec, - 0x5f, - 0x97, - 0x44, - 0x17, - 0xc4, - 0xa7, - 0x7e, - 0x3d, - 0x64, - 0x5d, - 0x19, - 0x73, - 0x60, - 0x81, - 0x4f, - 0xdc, - 0x22, - 0x2a, - 0x90, - 0x88, - 0x46, - 0xee, - 0xb8, - 0x14, - 0xde, - 0x5e, - 0x0b, - 0xdb, - 0xe0, - 0x32, - 0x3a, - 0x0a, - 0x49, - 0x06, - 0x24, - 0x5c, - 0xc2, - 0xd3, - 0xac, - 0x62, - 0x91, - 0x95, - 0xe4, - 0x79, - 0xe7, - 0xc8, - 0x37, - 0x6d, - 0x8d, - 0xd5, - 0x4e, - 0xa9, - 0x6c, - 0x56, - 0xf4, - 0xea, - 0x65, - 0x7a, - 0xae, - 0x08, - 0xba, - 0x78, - 0x25, - 0x2e, - 0x1c, - 0xa6, - 0xb4, - 0xc6, - 0xe8, - 0xdd, - 0x74, - 0x1f, - 0x4b, - 0xbd, - 0x8b, - 0x8a, - 0x70, - 0x3e, - 0xb5, - 0x66, - 0x48, - 0x03, - 0xf6, - 0x0e, - 0x61, - 0x35, - 0x57, - 0xb9, - 0x86, - 0xc1, - 0x1d, - 0x9e, - 0xe1, - 0xf8, - 0x98, - 0x11, - 0x69, - 0xd9, - 0x8e, - 0x94, - 0x9b, - 0x1e, - 0x87, - 0xe9, - 0xce, - 0x55, - 0x28, - 0xdf, - 0x8c, - 0xa1, - 0x89, - 0x0d, - 0xbf, - 0xe6, - 0x42, - 0x68, - 0x41, - 0x99, - 0x2d, - 0x0f, - 0xb0, - 0x54, - 0xbb, - 0x16 - ]); - var inv_s = new Uint8Array([ - 0x52, - 0x09, - 0x6a, - 0xd5, - 0x30, - 0x36, - 0xa5, - 0x38, - 0xbf, - 0x40, - 0xa3, - 0x9e, - 0x81, - 0xf3, - 0xd7, - 0xfb, - 0x7c, - 0xe3, - 0x39, - 0x82, - 0x9b, - 0x2f, - 0xff, - 0x87, - 0x34, - 0x8e, - 0x43, - 0x44, - 0xc4, - 0xde, - 0xe9, - 0xcb, - 0x54, - 0x7b, - 0x94, - 0x32, - 0xa6, - 0xc2, - 0x23, - 0x3d, - 0xee, - 0x4c, - 0x95, - 0x0b, - 0x42, - 0xfa, - 0xc3, - 0x4e, - 0x08, - 0x2e, - 0xa1, - 0x66, - 0x28, - 0xd9, - 0x24, - 0xb2, - 0x76, - 0x5b, - 0xa2, - 0x49, - 0x6d, - 0x8b, - 0xd1, - 0x25, - 0x72, - 0xf8, - 0xf6, - 0x64, - 0x86, - 0x68, - 0x98, - 0x16, - 0xd4, - 0xa4, - 0x5c, - 0xcc, - 0x5d, - 0x65, - 0xb6, - 0x92, - 0x6c, - 0x70, - 0x48, - 0x50, - 0xfd, - 0xed, - 0xb9, - 0xda, - 0x5e, - 0x15, - 0x46, - 0x57, - 0xa7, - 0x8d, - 0x9d, - 0x84, - 0x90, - 0xd8, - 0xab, - 0x00, - 0x8c, - 0xbc, - 0xd3, - 0x0a, - 0xf7, - 0xe4, - 0x58, - 0x05, - 0xb8, - 0xb3, - 0x45, - 0x06, - 0xd0, - 0x2c, - 0x1e, - 0x8f, - 0xca, - 0x3f, - 0x0f, - 0x02, - 0xc1, - 0xaf, - 0xbd, - 0x03, - 0x01, - 0x13, - 0x8a, - 0x6b, - 0x3a, - 0x91, - 0x11, - 0x41, - 0x4f, - 0x67, - 0xdc, - 0xea, - 0x97, - 0xf2, - 0xcf, - 0xce, - 0xf0, - 0xb4, - 0xe6, - 0x73, - 0x96, - 0xac, - 0x74, - 0x22, - 0xe7, - 0xad, - 0x35, - 0x85, - 0xe2, - 0xf9, - 0x37, - 0xe8, - 0x1c, - 0x75, - 0xdf, - 0x6e, - 0x47, - 0xf1, - 0x1a, - 0x71, - 0x1d, - 0x29, - 0xc5, - 0x89, - 0x6f, - 0xb7, - 0x62, - 0x0e, - 0xaa, - 0x18, - 0xbe, - 0x1b, - 0xfc, - 0x56, - 0x3e, - 0x4b, - 0xc6, - 0xd2, - 0x79, - 0x20, - 0x9a, - 0xdb, - 0xc0, - 0xfe, - 0x78, - 0xcd, - 0x5a, - 0xf4, - 0x1f, - 0xdd, - 0xa8, - 0x33, - 0x88, - 0x07, - 0xc7, - 0x31, - 0xb1, - 0x12, - 0x10, - 0x59, - 0x27, - 0x80, - 0xec, - 0x5f, - 0x60, - 0x51, - 0x7f, - 0xa9, - 0x19, - 0xb5, - 0x4a, - 0x0d, - 0x2d, - 0xe5, - 0x7a, - 0x9f, - 0x93, - 0xc9, - 0x9c, - 0xef, - 0xa0, - 0xe0, - 0x3b, - 0x4d, - 0xae, - 0x2a, - 0xf5, - 0xb0, - 0xc8, - 0xeb, - 0xbb, - 0x3c, - 0x83, - 0x53, - 0x99, - 0x61, - 0x17, - 0x2b, - 0x04, - 0x7e, - 0xba, - 0x77, - 0xd6, - 0x26, - 0xe1, - 0x69, - 0x14, - 0x63, - 0x55, - 0x21, - 0x0c, - 0x7d - ]); - var mixCol = new Uint8Array(256); - for (var i = 0; i < 256; i++) { - if (i < 128) { - mixCol[i] = i << 1; - } else { - mixCol[i] = i << 1 ^ 0x1b; - } - } - var mix = new Uint32Array([ - 0x00000000, - 0x0e090d0b, - 0x1c121a16, - 0x121b171d, - 0x3824342c, - 0x362d3927, - 0x24362e3a, - 0x2a3f2331, - 0x70486858, - 0x7e416553, - 0x6c5a724e, - 0x62537f45, - 0x486c5c74, - 0x4665517f, - 0x547e4662, - 0x5a774b69, - 0xe090d0b0, - 0xee99ddbb, - 0xfc82caa6, - 0xf28bc7ad, - 0xd8b4e49c, - 0xd6bde997, - 0xc4a6fe8a, - 0xcaaff381, - 0x90d8b8e8, - 0x9ed1b5e3, - 0x8ccaa2fe, - 0x82c3aff5, - 0xa8fc8cc4, - 0xa6f581cf, - 0xb4ee96d2, - 0xbae79bd9, - 0xdb3bbb7b, - 0xd532b670, - 0xc729a16d, - 0xc920ac66, - 0xe31f8f57, - 0xed16825c, - 0xff0d9541, - 0xf104984a, - 0xab73d323, - 0xa57ade28, - 0xb761c935, - 0xb968c43e, - 0x9357e70f, - 0x9d5eea04, - 0x8f45fd19, - 0x814cf012, - 0x3bab6bcb, - 0x35a266c0, - 0x27b971dd, - 0x29b07cd6, - 0x038f5fe7, - 0x0d8652ec, - 0x1f9d45f1, - 0x119448fa, - 0x4be30393, - 0x45ea0e98, - 0x57f11985, - 0x59f8148e, - 0x73c737bf, - 0x7dce3ab4, - 0x6fd52da9, - 0x61dc20a2, - 0xad766df6, - 0xa37f60fd, - 0xb16477e0, - 0xbf6d7aeb, - 0x955259da, - 0x9b5b54d1, - 0x894043cc, - 0x87494ec7, - 0xdd3e05ae, - 0xd33708a5, - 0xc12c1fb8, - 0xcf2512b3, - 0xe51a3182, - 0xeb133c89, - 0xf9082b94, - 0xf701269f, - 0x4de6bd46, - 0x43efb04d, - 0x51f4a750, - 0x5ffdaa5b, - 0x75c2896a, - 0x7bcb8461, - 0x69d0937c, - 0x67d99e77, - 0x3daed51e, - 0x33a7d815, - 0x21bccf08, - 0x2fb5c203, - 0x058ae132, - 0x0b83ec39, - 0x1998fb24, - 0x1791f62f, - 0x764dd68d, - 0x7844db86, - 0x6a5fcc9b, - 0x6456c190, - 0x4e69e2a1, - 0x4060efaa, - 0x527bf8b7, - 0x5c72f5bc, - 0x0605bed5, - 0x080cb3de, - 0x1a17a4c3, - 0x141ea9c8, - 0x3e218af9, - 0x302887f2, - 0x223390ef, - 0x2c3a9de4, - 0x96dd063d, - 0x98d40b36, - 0x8acf1c2b, - 0x84c61120, - 0xaef93211, - 0xa0f03f1a, - 0xb2eb2807, - 0xbce2250c, - 0xe6956e65, - 0xe89c636e, - 0xfa877473, - 0xf48e7978, - 0xdeb15a49, - 0xd0b85742, - 0xc2a3405f, - 0xccaa4d54, - 0x41ecdaf7, - 0x4fe5d7fc, - 0x5dfec0e1, - 0x53f7cdea, - 0x79c8eedb, - 0x77c1e3d0, - 0x65daf4cd, - 0x6bd3f9c6, - 0x31a4b2af, - 0x3fadbfa4, - 0x2db6a8b9, - 0x23bfa5b2, - 0x09808683, - 0x07898b88, - 0x15929c95, - 0x1b9b919e, - 0xa17c0a47, - 0xaf75074c, - 0xbd6e1051, - 0xb3671d5a, - 0x99583e6b, - 0x97513360, - 0x854a247d, - 0x8b432976, - 0xd134621f, - 0xdf3d6f14, - 0xcd267809, - 0xc32f7502, - 0xe9105633, - 0xe7195b38, - 0xf5024c25, - 0xfb0b412e, - 0x9ad7618c, - 0x94de6c87, - 0x86c57b9a, - 0x88cc7691, - 0xa2f355a0, - 0xacfa58ab, - 0xbee14fb6, - 0xb0e842bd, - 0xea9f09d4, - 0xe49604df, - 0xf68d13c2, - 0xf8841ec9, - 0xd2bb3df8, - 0xdcb230f3, - 0xcea927ee, - 0xc0a02ae5, - 0x7a47b13c, - 0x744ebc37, - 0x6655ab2a, - 0x685ca621, - 0x42638510, - 0x4c6a881b, - 0x5e719f06, - 0x5078920d, - 0x0a0fd964, - 0x0406d46f, - 0x161dc372, - 0x1814ce79, - 0x322bed48, - 0x3c22e043, - 0x2e39f75e, - 0x2030fa55, - 0xec9ab701, - 0xe293ba0a, - 0xf088ad17, - 0xfe81a01c, - 0xd4be832d, - 0xdab78e26, - 0xc8ac993b, - 0xc6a59430, - 0x9cd2df59, - 0x92dbd252, - 0x80c0c54f, - 0x8ec9c844, - 0xa4f6eb75, - 0xaaffe67e, - 0xb8e4f163, - 0xb6edfc68, - 0x0c0a67b1, - 0x02036aba, - 0x10187da7, - 0x1e1170ac, - 0x342e539d, - 0x3a275e96, - 0x283c498b, - 0x26354480, - 0x7c420fe9, - 0x724b02e2, - 0x605015ff, - 0x6e5918f4, - 0x44663bc5, - 0x4a6f36ce, - 0x587421d3, - 0x567d2cd8, - 0x37a10c7a, - 0x39a80171, - 0x2bb3166c, - 0x25ba1b67, - 0x0f853856, - 0x018c355d, - 0x13972240, - 0x1d9e2f4b, - 0x47e96422, - 0x49e06929, - 0x5bfb7e34, - 0x55f2733f, - 0x7fcd500e, - 0x71c45d05, - 0x63df4a18, - 0x6dd64713, - 0xd731dcca, - 0xd938d1c1, - 0xcb23c6dc, - 0xc52acbd7, - 0xef15e8e6, - 0xe11ce5ed, - 0xf307f2f0, - 0xfd0efffb, - 0xa779b492, - 0xa970b999, - 0xbb6bae84, - 0xb562a38f, - 0x9f5d80be, - 0x91548db5, - 0x834f9aa8, - 0x8d4697a3 - ]); - function expandKey256(cipherKey) { - var b = 240, result = new Uint8Array(b); - var r = 1; - result.set(cipherKey); - for (var j = 32, i = 1; j < b; ++i) { - if (j % 32 === 16) { - t1 = s[t1]; - t2 = s[t2]; - t3 = s[t3]; - t4 = s[t4]; - } else if (j % 32 === 0) { - var t1 = result[j - 3], t2 = result[j - 2], t3 = result[j - 1], t4 = result[j - 4]; - t1 = s[t1]; - t2 = s[t2]; - t3 = s[t3]; - t4 = s[t4]; - t1 = t1 ^ r; - if ((r <<= 1) >= 256) { - r = (r ^ 0x1b) & 0xFF; - } - } - for (var n = 0; n < 4; ++n) { - result[j] = t1 ^= result[j - 32]; - j++; - result[j] = t2 ^= result[j - 32]; - j++; - result[j] = t3 ^= result[j - 32]; - j++; - result[j] = t4 ^= result[j - 32]; - j++; - } - } - return result; - } - function decrypt256(input, key) { - var state = new Uint8Array(16); - state.set(input); - var i, j, k; - var t, u, v; - for (j = 0, k = 224; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - for (i = 13; i >= 1; --i) { - t = state[13]; - state[13] = state[9]; - state[9] = state[5]; - state[5] = state[1]; - state[1] = t; - t = state[14]; - u = state[10]; - state[14] = state[6]; - state[10] = state[2]; - state[6] = t; - state[2] = u; - t = state[15]; - u = state[11]; - v = state[7]; - state[15] = state[3]; - state[11] = t; - state[7] = u; - state[3] = v; - for (j = 0; j < 16; ++j) { - state[j] = inv_s[state[j]]; - } - for (j = 0, k = i * 16; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - for (j = 0; j < 16; j += 4) { - var s0 = mix[state[j]], s1 = mix[state[j + 1]], s2 = mix[state[j + 2]], s3 = mix[state[j + 3]]; - t = s0 ^ s1 >>> 8 ^ s1 << 24 ^ s2 >>> 16 ^ s2 << 16 ^ s3 >>> 24 ^ s3 << 8; - state[j] = t >>> 24 & 0xFF; - state[j + 1] = t >> 16 & 0xFF; - state[j + 2] = t >> 8 & 0xFF; - state[j + 3] = t & 0xFF; - } - } - t = state[13]; - state[13] = state[9]; - state[9] = state[5]; - state[5] = state[1]; - state[1] = t; - t = state[14]; - u = state[10]; - state[14] = state[6]; - state[10] = state[2]; - state[6] = t; - state[2] = u; - t = state[15]; - u = state[11]; - v = state[7]; - state[15] = state[3]; - state[11] = t; - state[7] = u; - state[3] = v; - for (j = 0; j < 16; ++j) { - state[j] = inv_s[state[j]]; - state[j] ^= key[j]; - } - return state; - } - function encrypt256(input, key) { - var t, u, v, k; - var state = new Uint8Array(16); - state.set(input); - for (j = 0; j < 16; ++j) { - state[j] ^= key[j]; - } - for (i = 1; i < 14; i++) { - for (j = 0; j < 16; ++j) { - state[j] = s[state[j]]; - } - v = state[1]; - state[1] = state[5]; - state[5] = state[9]; - state[9] = state[13]; - state[13] = v; - v = state[2]; - u = state[6]; - state[2] = state[10]; - state[6] = state[14]; - state[10] = v; - state[14] = u; - v = state[3]; - u = state[7]; - t = state[11]; - state[3] = state[15]; - state[7] = v; - state[11] = u; - state[15] = t; - for (var j = 0; j < 16; j += 4) { - var s0 = state[j + 0], s1 = state[j + 1]; - var s2 = state[j + 2], s3 = state[j + 3]; - t = s0 ^ s1 ^ s2 ^ s3; - state[j + 0] ^= t ^ mixCol[s0 ^ s1]; - state[j + 1] ^= t ^ mixCol[s1 ^ s2]; - state[j + 2] ^= t ^ mixCol[s2 ^ s3]; - state[j + 3] ^= t ^ mixCol[s3 ^ s0]; - } - for (j = 0, k = i * 16; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - } - for (j = 0; j < 16; ++j) { - state[j] = s[state[j]]; - } - v = state[1]; - state[1] = state[5]; - state[5] = state[9]; - state[9] = state[13]; - state[13] = v; - v = state[2]; - u = state[6]; - state[2] = state[10]; - state[6] = state[14]; - state[10] = v; - state[14] = u; - v = state[3]; - u = state[7]; - t = state[11]; - state[3] = state[15]; - state[7] = v; - state[11] = u; - state[15] = t; - for (j = 0, k = 224; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - return state; - } - function AES256Cipher(key) { - this.key = expandKey256(key); - this.buffer = new Uint8Array(16); - this.bufferPosition = 0; - } - function decryptBlock2(data, finalize) { - var i, j, ii, sourceLength = data.length, buffer = this.buffer, bufferLength = this.bufferPosition, result = [], iv = this.iv; - for (i = 0; i < sourceLength; ++i) { - buffer[bufferLength] = data[i]; - ++bufferLength; - if (bufferLength < 16) { - continue; - } - var plain = decrypt256(buffer, this.key); - for (j = 0; j < 16; ++j) { - plain[j] ^= iv[j]; - } - iv = buffer; - result.push(plain); - buffer = new Uint8Array(16); - bufferLength = 0; - } - this.buffer = buffer; - this.bufferLength = bufferLength; - this.iv = iv; - if (result.length === 0) { - return new Uint8Array([]); - } - var outputLength = 16 * result.length; - if (finalize) { - var lastBlock = result[result.length - 1]; - var psLen = lastBlock[15]; - if (psLen <= 16) { - for (i = 15, ii = 16 - psLen; i >= ii; --i) { - if (lastBlock[i] !== psLen) { - psLen = 0; - break; - } - } - outputLength -= psLen; - result[result.length - 1] = lastBlock.subarray(0, 16 - psLen); - } - } - var output = new Uint8Array(outputLength); - for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { - output.set(result[i], j); - } - return output; - } - AES256Cipher.prototype = { - decryptBlock: function AES256Cipher_decryptBlock(data, finalize, iv) { - var i, sourceLength = data.length; - var buffer = this.buffer, bufferLength = this.bufferPosition; - if (iv) { - this.iv = iv; - } else { - for (i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) { - buffer[bufferLength] = data[i]; - } - if (bufferLength < 16) { - this.bufferLength = bufferLength; - return new Uint8Array([]); - } - this.iv = buffer; - data = data.subarray(16); - } - this.buffer = new Uint8Array(16); - this.bufferLength = 0; - this.decryptBlock = decryptBlock2; - return this.decryptBlock(data, finalize); - }, - encrypt: function AES256Cipher_encrypt(data, iv) { - var i, j, ii, sourceLength = data.length, buffer = this.buffer, bufferLength = this.bufferPosition, result = []; - if (!iv) { - iv = new Uint8Array(16); - } - for (i = 0; i < sourceLength; ++i) { - buffer[bufferLength] = data[i]; - ++bufferLength; - if (bufferLength < 16) { - continue; - } - for (j = 0; j < 16; ++j) { - buffer[j] ^= iv[j]; - } - var cipher = encrypt256(buffer, this.key); - this.iv = cipher; - result.push(cipher); - buffer = new Uint8Array(16); - bufferLength = 0; - } - this.buffer = buffer; - this.bufferLength = bufferLength; - this.iv = iv; - if (result.length === 0) { - return new Uint8Array([]); - } - var outputLength = 16 * result.length; - var output = new Uint8Array(outputLength); - for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { - output.set(result[i], j); - } - return output; - } - }; - return AES256Cipher; - }(); - var PDF17 = function PDF17Closure() { - function compareByteArrays(array1, array2) { - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; i++) { - if (array1[i] !== array2[i]) { - return false; - } - } - return true; - } - function PDF17() { - } - PDF17.prototype = { - checkOwnerPassword: function PDF17_checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerValidationSalt, password.length); - hashData.set(userBytes, password.length + ownerValidationSalt.length); - var result = calculateSHA256(hashData, 0, hashData.length); - return compareByteArrays(result, ownerPassword); - }, - checkUserPassword: function PDF17_checkUserPassword(password, userValidationSalt, userPassword) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userValidationSalt, password.length); - var result = calculateSHA256(hashData, 0, hashData.length); - return compareByteArrays(result, userPassword); - }, - getOwnerKey: function PDF17_getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerKeySalt, password.length); - hashData.set(userBytes, password.length + ownerKeySalt.length); - var key = calculateSHA256(hashData, 0, hashData.length); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); - }, - getUserKey: function PDF17_getUserKey(password, userKeySalt, userEncryption) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userKeySalt, password.length); - var key = calculateSHA256(hashData, 0, hashData.length); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); - } - }; - return PDF17; - }(); - var PDF20 = function PDF20Closure() { - function concatArrays(array1, array2) { - var t = new Uint8Array(array1.length + array2.length); - t.set(array1, 0); - t.set(array2, array1.length); - return t; - } - function calculatePDF20Hash(password, input, userBytes) { - var k = calculateSHA256(input, 0, input.length).subarray(0, 32); - var e = [0]; - var i = 0; - while (i < 64 || e[e.length - 1] > i - 32) { - var arrayLength = password.length + k.length + userBytes.length; - var k1 = new Uint8Array(arrayLength * 64); - var array = concatArrays(password, k); - array = concatArrays(array, userBytes); - for (var j = 0, pos = 0; j < 64; j++, pos += arrayLength) { - k1.set(array, pos); - } - var cipher = new AES128Cipher(k.subarray(0, 16)); - e = cipher.encrypt(k1, k.subarray(16, 32)); - var remainder = 0; - for (var z = 0; z < 16; z++) { - remainder *= 256 % 3; - remainder %= 3; - remainder += (e[z] >>> 0) % 3; - remainder %= 3; - } - if (remainder === 0) { - k = calculateSHA256(e, 0, e.length); - } else if (remainder === 1) { - k = calculateSHA384(e, 0, e.length); - } else if (remainder === 2) { - k = calculateSHA512(e, 0, e.length); - } - i++; - } - return k.subarray(0, 32); - } - function PDF20() { - } - function compareByteArrays(array1, array2) { - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; i++) { - if (array1[i] !== array2[i]) { - return false; - } - } - return true; - } - PDF20.prototype = { - hash: function PDF20_hash(password, concatBytes, userBytes) { - return calculatePDF20Hash(password, concatBytes, userBytes); - }, - checkOwnerPassword: function PDF20_checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerValidationSalt, password.length); - hashData.set(userBytes, password.length + ownerValidationSalt.length); - var result = calculatePDF20Hash(password, hashData, userBytes); - return compareByteArrays(result, ownerPassword); - }, - checkUserPassword: function PDF20_checkUserPassword(password, userValidationSalt, userPassword) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userValidationSalt, password.length); - var result = calculatePDF20Hash(password, hashData, []); - return compareByteArrays(result, userPassword); - }, - getOwnerKey: function PDF20_getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerKeySalt, password.length); - hashData.set(userBytes, password.length + ownerKeySalt.length); - var key = calculatePDF20Hash(password, hashData, userBytes); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); - }, - getUserKey: function PDF20_getUserKey(password, userKeySalt, userEncryption) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userKeySalt, password.length); - var key = calculatePDF20Hash(password, hashData, []); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); - } - }; - return PDF20; - }(); - var CipherTransform = function CipherTransformClosure() { - function CipherTransform(stringCipherConstructor, streamCipherConstructor) { - this.StringCipherConstructor = stringCipherConstructor; - this.StreamCipherConstructor = streamCipherConstructor; - } - CipherTransform.prototype = { - createStream: function CipherTransform_createStream(stream, length) { - var cipher = new this.StreamCipherConstructor(); - return new DecryptStream(stream, length, function cipherTransformDecryptStream(data, finalize) { - return cipher.decryptBlock(data, finalize); - }); - }, - decryptString: function CipherTransform_decryptString(s) { - var cipher = new this.StringCipherConstructor(); - var data = stringToBytes(s); - data = cipher.decryptBlock(data, true); - return bytesToString(data); - } - }; - return CipherTransform; - }(); - var CipherTransformFactory = function CipherTransformFactoryClosure() { - var defaultPasswordBytes = new Uint8Array([ - 0x28, - 0xBF, - 0x4E, - 0x5E, - 0x4E, - 0x75, - 0x8A, - 0x41, - 0x64, - 0x00, - 0x4E, - 0x56, - 0xFF, - 0xFA, - 0x01, - 0x08, - 0x2E, - 0x2E, - 0x00, - 0xB6, - 0xD0, - 0x68, - 0x3E, - 0x80, - 0x2F, - 0x0C, - 0xA9, - 0xFE, - 0x64, - 0x53, - 0x69, - 0x7A - ]); - function createEncryptionKey20(revision, password, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms) { - if (password) { - var passwordLength = Math.min(127, password.length); - password = password.subarray(0, passwordLength); - } else { - password = []; - } - var pdfAlgorithm; - if (revision === 6) { - pdfAlgorithm = new PDF20(); - } else { - pdfAlgorithm = new PDF17(); - } - if (pdfAlgorithm.checkUserPassword(password, userValidationSalt, userPassword)) { - return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption); - } else if (password.length && pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt, uBytes, ownerPassword)) { - return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption); - } - return null; - } - function prepareKeyData(fileId, password, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata) { - var hashDataSize = 40 + ownerPassword.length + fileId.length; - var hashData = new Uint8Array(hashDataSize), i = 0, j, n; - if (password) { - n = Math.min(32, password.length); - for (; i < n; ++i) { - hashData[i] = password[i]; - } - } - j = 0; - while (i < 32) { - hashData[i++] = defaultPasswordBytes[j++]; - } - for (j = 0, n = ownerPassword.length; j < n; ++j) { - hashData[i++] = ownerPassword[j]; - } - hashData[i++] = flags & 0xFF; - hashData[i++] = flags >> 8 & 0xFF; - hashData[i++] = flags >> 16 & 0xFF; - hashData[i++] = flags >>> 24 & 0xFF; - for (j = 0, n = fileId.length; j < n; ++j) { - hashData[i++] = fileId[j]; - } - if (revision >= 4 && !encryptMetadata) { - hashData[i++] = 0xFF; - hashData[i++] = 0xFF; - hashData[i++] = 0xFF; - hashData[i++] = 0xFF; - } - var hash = calculateMD5(hashData, 0, i); - var keyLengthInBytes = keyLength >> 3; - if (revision >= 3) { - for (j = 0; j < 50; ++j) { - hash = calculateMD5(hash, 0, keyLengthInBytes); - } - } - var encryptionKey = hash.subarray(0, keyLengthInBytes); - var cipher, checkData; - if (revision >= 3) { - for (i = 0; i < 32; ++i) { - hashData[i] = defaultPasswordBytes[i]; - } - for (j = 0, n = fileId.length; j < n; ++j) { - hashData[i++] = fileId[j]; - } - cipher = new ARCFourCipher(encryptionKey); - checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i)); - n = encryptionKey.length; - var derivedKey = new Uint8Array(n), k; - for (j = 1; j <= 19; ++j) { - for (k = 0; k < n; ++k) { - derivedKey[k] = encryptionKey[k] ^ j; - } - cipher = new ARCFourCipher(derivedKey); - checkData = cipher.encryptBlock(checkData); - } - for (j = 0, n = checkData.length; j < n; ++j) { - if (userPassword[j] !== checkData[j]) { - return null; - } - } - } else { - cipher = new ARCFourCipher(encryptionKey); - checkData = cipher.encryptBlock(defaultPasswordBytes); - for (j = 0, n = checkData.length; j < n; ++j) { - if (userPassword[j] !== checkData[j]) { - return null; - } - } - } - return encryptionKey; - } - function decodeUserPassword(password, ownerPassword, revision, keyLength) { - var hashData = new Uint8Array(32), i = 0, j, n; - n = Math.min(32, password.length); - for (; i < n; ++i) { - hashData[i] = password[i]; - } - j = 0; - while (i < 32) { - hashData[i++] = defaultPasswordBytes[j++]; - } - var hash = calculateMD5(hashData, 0, i); - var keyLengthInBytes = keyLength >> 3; - if (revision >= 3) { - for (j = 0; j < 50; ++j) { - hash = calculateMD5(hash, 0, hash.length); - } - } - var cipher, userPassword; - if (revision >= 3) { - userPassword = ownerPassword; - var derivedKey = new Uint8Array(keyLengthInBytes), k; - for (j = 19; j >= 0; j--) { - for (k = 0; k < keyLengthInBytes; ++k) { - derivedKey[k] = hash[k] ^ j; - } - cipher = new ARCFourCipher(derivedKey); - userPassword = cipher.encryptBlock(userPassword); - } - } else { - cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes)); - userPassword = cipher.encryptBlock(ownerPassword); - } - return userPassword; - } - var identityName = Name.get('Identity'); - function CipherTransformFactory(dict, fileId, password) { - var filter = dict.get('Filter'); - if (!isName(filter, 'Standard')) { - error('unknown encryption method'); - } - this.dict = dict; - var algorithm = dict.get('V'); - if (!isInt(algorithm) || algorithm !== 1 && algorithm !== 2 && algorithm !== 4 && algorithm !== 5) { - error('unsupported encryption algorithm'); - } - this.algorithm = algorithm; - var keyLength = dict.get('Length'); - if (!keyLength) { - if (algorithm <= 3) { - keyLength = 40; - } else { - var cfDict = dict.get('CF'); - var streamCryptoName = dict.get('StmF'); - if (isDict(cfDict) && isName(streamCryptoName)) { - cfDict.suppressEncryption = true; - var handlerDict = cfDict.get(streamCryptoName.name); - keyLength = handlerDict && handlerDict.get('Length') || 128; - if (keyLength < 40) { - keyLength <<= 3; - } - } - } - } - if (!isInt(keyLength) || keyLength < 40 || keyLength % 8 !== 0) { - error('invalid key length'); - } - var ownerPassword = stringToBytes(dict.get('O')).subarray(0, 32); - var userPassword = stringToBytes(dict.get('U')).subarray(0, 32); - var flags = dict.get('P'); - var revision = dict.get('R'); - var encryptMetadata = (algorithm === 4 || algorithm === 5) && dict.get('EncryptMetadata') !== false; - this.encryptMetadata = encryptMetadata; - var fileIdBytes = stringToBytes(fileId); - var passwordBytes; - if (password) { - if (revision === 6) { - try { - password = utf8StringToString(password); - } catch (ex) { - warn('CipherTransformFactory: ' + 'Unable to convert UTF8 encoded password.'); - } - } - passwordBytes = stringToBytes(password); - } - var encryptionKey; - if (algorithm !== 5) { - encryptionKey = prepareKeyData(fileIdBytes, passwordBytes, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); - } else { - var ownerValidationSalt = stringToBytes(dict.get('O')).subarray(32, 40); - var ownerKeySalt = stringToBytes(dict.get('O')).subarray(40, 48); - var uBytes = stringToBytes(dict.get('U')).subarray(0, 48); - var userValidationSalt = stringToBytes(dict.get('U')).subarray(32, 40); - var userKeySalt = stringToBytes(dict.get('U')).subarray(40, 48); - var ownerEncryption = stringToBytes(dict.get('OE')); - var userEncryption = stringToBytes(dict.get('UE')); - var perms = stringToBytes(dict.get('Perms')); - encryptionKey = createEncryptionKey20(revision, passwordBytes, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms); - } - if (!encryptionKey && !password) { - throw new PasswordException('No password given', PasswordResponses.NEED_PASSWORD); - } else if (!encryptionKey && password) { - var decodedPassword = decodeUserPassword(passwordBytes, ownerPassword, revision, keyLength); - encryptionKey = prepareKeyData(fileIdBytes, decodedPassword, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); - } - if (!encryptionKey) { - throw new PasswordException('Incorrect Password', PasswordResponses.INCORRECT_PASSWORD); - } - this.encryptionKey = encryptionKey; - if (algorithm >= 4) { - var cf = dict.get('CF'); - if (isDict(cf)) { - cf.suppressEncryption = true; - } - this.cf = cf; - this.stmf = dict.get('StmF') || identityName; - this.strf = dict.get('StrF') || identityName; - this.eff = dict.get('EFF') || this.stmf; - } - } - function buildObjectKey(num, gen, encryptionKey, isAes) { - var key = new Uint8Array(encryptionKey.length + 9), i, n; - for (i = 0, n = encryptionKey.length; i < n; ++i) { - key[i] = encryptionKey[i]; - } - key[i++] = num & 0xFF; - key[i++] = num >> 8 & 0xFF; - key[i++] = num >> 16 & 0xFF; - key[i++] = gen & 0xFF; - key[i++] = gen >> 8 & 0xFF; - if (isAes) { - key[i++] = 0x73; - key[i++] = 0x41; - key[i++] = 0x6C; - key[i++] = 0x54; - } - var hash = calculateMD5(key, 0, i); - return hash.subarray(0, Math.min(encryptionKey.length + 5, 16)); - } - function buildCipherConstructor(cf, name, num, gen, key) { - assert(isName(name), 'Invalid crypt filter name.'); - var cryptFilter = cf.get(name.name); - var cfm; - if (cryptFilter !== null && cryptFilter !== undefined) { - cfm = cryptFilter.get('CFM'); - } - if (!cfm || cfm.name === 'None') { - return function cipherTransformFactoryBuildCipherConstructorNone() { - return new NullCipher(); - }; - } - if (cfm.name === 'V2') { - return function cipherTransformFactoryBuildCipherConstructorV2() { - return new ARCFourCipher(buildObjectKey(num, gen, key, false)); - }; - } - if (cfm.name === 'AESV2') { - return function cipherTransformFactoryBuildCipherConstructorAESV2() { - return new AES128Cipher(buildObjectKey(num, gen, key, true)); - }; - } - if (cfm.name === 'AESV3') { - return function cipherTransformFactoryBuildCipherConstructorAESV3() { - return new AES256Cipher(key); - }; - } - error('Unknown crypto method'); - } - CipherTransformFactory.prototype = { - createCipherTransform: function CipherTransformFactory_createCipherTransform(num, gen) { - if (this.algorithm === 4 || this.algorithm === 5) { - return new CipherTransform(buildCipherConstructor(this.cf, this.stmf, num, gen, this.encryptionKey), buildCipherConstructor(this.cf, this.strf, num, gen, this.encryptionKey)); - } - var key = buildObjectKey(num, gen, this.encryptionKey, false); - var cipherConstructor = function buildCipherCipherConstructor() { - return new ARCFourCipher(key); - }; - return new CipherTransform(cipherConstructor, cipherConstructor); - } - }; - return CipherTransformFactory; - }(); - exports.AES128Cipher = AES128Cipher; - exports.AES256Cipher = AES256Cipher; - exports.ARCFourCipher = ARCFourCipher; - exports.CipherTransformFactory = CipherTransformFactory; - exports.PDF17 = PDF17; - exports.PDF20 = PDF20; - exports.calculateMD5 = calculateMD5; - exports.calculateSHA256 = calculateSHA256; - exports.calculateSHA384 = calculateSHA384; - exports.calculateSHA512 = calculateSHA512; - })); - (function (root, factory) { - factory(root.pdfjsCoreFontRenderer = {}, root.pdfjsSharedUtil, root.pdfjsCoreStream, root.pdfjsCoreGlyphList, root.pdfjsCoreEncodings, root.pdfjsCoreCFFParser); - }(this, function (exports, sharedUtil, coreStream, coreGlyphList, coreEncodings, coreCFFParser) { - var Util = sharedUtil.Util; - var bytesToString = sharedUtil.bytesToString; - var error = sharedUtil.error; - var Stream = coreStream.Stream; - var getGlyphsUnicode = coreGlyphList.getGlyphsUnicode; - var StandardEncoding = coreEncodings.StandardEncoding; - var CFFParser = coreCFFParser.CFFParser; - var FontRendererFactory = function FontRendererFactoryClosure() { - function getLong(data, offset) { - return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; - } - function getUshort(data, offset) { - return data[offset] << 8 | data[offset + 1]; - } - function parseCmap(data, start, end) { - var offset = getUshort(data, start + 2) === 1 ? getLong(data, start + 8) : getLong(data, start + 16); - var format = getUshort(data, start + offset); - var length, ranges, p, i; - if (format === 4) { - length = getUshort(data, start + offset + 2); - var segCount = getUshort(data, start + offset + 6) >> 1; - p = start + offset + 14; - ranges = []; - for (i = 0; i < segCount; i++, p += 2) { - ranges[i] = { end: getUshort(data, p) }; - } - p += 2; - for (i = 0; i < segCount; i++, p += 2) { - ranges[i].start = getUshort(data, p); - } - for (i = 0; i < segCount; i++, p += 2) { - ranges[i].idDelta = getUshort(data, p); - } - for (i = 0; i < segCount; i++, p += 2) { - var idOffset = getUshort(data, p); - if (idOffset === 0) { - continue; - } - ranges[i].ids = []; - for (var j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) { - ranges[i].ids[j] = getUshort(data, p + idOffset); - idOffset += 2; - } - } - return ranges; - } else if (format === 12) { - length = getLong(data, start + offset + 4); - var groups = getLong(data, start + offset + 12); - p = start + offset + 16; - ranges = []; - for (i = 0; i < groups; i++) { - ranges.push({ - start: getLong(data, p), - end: getLong(data, p + 4), - idDelta: getLong(data, p + 8) - getLong(data, p) - }); - p += 12; - } - return ranges; - } - error('not supported cmap: ' + format); - } - function parseCff(data, start, end, seacAnalysisEnabled) { - var properties = {}; - var parser = new CFFParser(new Stream(data, start, end - start), properties, seacAnalysisEnabled); - var cff = parser.parse(); - return { - glyphs: cff.charStrings.objects, - subrs: cff.topDict.privateDict && cff.topDict.privateDict.subrsIndex && cff.topDict.privateDict.subrsIndex.objects, - gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects - }; - } - function parseGlyfTable(glyf, loca, isGlyphLocationsLong) { - var itemSize, itemDecode; - if (isGlyphLocationsLong) { - itemSize = 4; - itemDecode = function fontItemDecodeLong(data, offset) { - return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; - }; - } else { - itemSize = 2; - itemDecode = function fontItemDecode(data, offset) { - return data[offset] << 9 | data[offset + 1] << 1; - }; - } - var glyphs = []; - var startOffset = itemDecode(loca, 0); - for (var j = itemSize; j < loca.length; j += itemSize) { - var endOffset = itemDecode(loca, j); - glyphs.push(glyf.subarray(startOffset, endOffset)); - startOffset = endOffset; - } - return glyphs; - } - function lookupCmap(ranges, unicode) { - var code = unicode.charCodeAt(0), gid = 0; - var l = 0, r = ranges.length - 1; - while (l < r) { - var c = l + r + 1 >> 1; - if (code < ranges[c].start) { - r = c - 1; - } else { - l = c; - } - } - if (ranges[l].start <= code && code <= ranges[l].end) { - gid = ranges[l].idDelta + (ranges[l].ids ? ranges[l].ids[code - ranges[l].start] : code) & 0xFFFF; - } - return { - charCode: code, - glyphId: gid - }; - } - function compileGlyf(code, cmds, font) { - function moveTo(x, y) { - cmds.push({ - cmd: 'moveTo', - args: [ - x, - y - ] - }); - } - function lineTo(x, y) { - cmds.push({ - cmd: 'lineTo', - args: [ - x, - y - ] - }); - } - function quadraticCurveTo(xa, ya, x, y) { - cmds.push({ - cmd: 'quadraticCurveTo', - args: [ - xa, - ya, - x, - y - ] - }); - } - var i = 0; - var numberOfContours = (code[i] << 24 | code[i + 1] << 16) >> 16; - var flags; - var x = 0, y = 0; - i += 10; - if (numberOfContours < 0) { - do { - flags = code[i] << 8 | code[i + 1]; - var glyphIndex = code[i + 2] << 8 | code[i + 3]; - i += 4; - var arg1, arg2; - if (flags & 0x01) { - arg1 = (code[i] << 24 | code[i + 1] << 16) >> 16; - arg2 = (code[i + 2] << 24 | code[i + 3] << 16) >> 16; - i += 4; - } else { - arg1 = code[i++]; - arg2 = code[i++]; - } - if (flags & 0x02) { - x = arg1; - y = arg2; - } else { - x = 0; - y = 0; - } - var scaleX = 1, scaleY = 1, scale01 = 0, scale10 = 0; - if (flags & 0x08) { - scaleX = scaleY = (code[i] << 24 | code[i + 1] << 16) / 1073741824; - i += 2; - } else if (flags & 0x40) { - scaleX = (code[i] << 24 | code[i + 1] << 16) / 1073741824; - scaleY = (code[i + 2] << 24 | code[i + 3] << 16) / 1073741824; - i += 4; - } else if (flags & 0x80) { - scaleX = (code[i] << 24 | code[i + 1] << 16) / 1073741824; - scale01 = (code[i + 2] << 24 | code[i + 3] << 16) / 1073741824; - scale10 = (code[i + 4] << 24 | code[i + 5] << 16) / 1073741824; - scaleY = (code[i + 6] << 24 | code[i + 7] << 16) / 1073741824; - i += 8; - } - var subglyph = font.glyphs[glyphIndex]; - if (subglyph) { - cmds.push({ cmd: 'save' }); - cmds.push({ - cmd: 'transform', - args: [ - scaleX, - scale01, - scale10, - scaleY, - x, - y - ] - }); - compileGlyf(subglyph, cmds, font); - cmds.push({ cmd: 'restore' }); - } - } while (flags & 0x20); - } else { - var endPtsOfContours = []; - var j, jj; - for (j = 0; j < numberOfContours; j++) { - endPtsOfContours.push(code[i] << 8 | code[i + 1]); - i += 2; - } - var instructionLength = code[i] << 8 | code[i + 1]; - i += 2 + instructionLength; - var numberOfPoints = endPtsOfContours[endPtsOfContours.length - 1] + 1; - var points = []; - while (points.length < numberOfPoints) { - flags = code[i++]; - var repeat = 1; - if (flags & 0x08) { - repeat += code[i++]; - } - while (repeat-- > 0) { - points.push({ flags: flags }); - } - } - for (j = 0; j < numberOfPoints; j++) { - switch (points[j].flags & 0x12) { - case 0x00: - x += (code[i] << 24 | code[i + 1] << 16) >> 16; - i += 2; - break; - case 0x02: - x -= code[i++]; - break; - case 0x12: - x += code[i++]; - break; - } - points[j].x = x; - } - for (j = 0; j < numberOfPoints; j++) { - switch (points[j].flags & 0x24) { - case 0x00: - y += (code[i] << 24 | code[i + 1] << 16) >> 16; - i += 2; - break; - case 0x04: - y -= code[i++]; - break; - case 0x24: - y += code[i++]; - break; - } - points[j].y = y; - } - var startPoint = 0; - for (i = 0; i < numberOfContours; i++) { - var endPoint = endPtsOfContours[i]; - var contour = points.slice(startPoint, endPoint + 1); - if (contour[0].flags & 1) { - contour.push(contour[0]); - } else if (contour[contour.length - 1].flags & 1) { - contour.unshift(contour[contour.length - 1]); - } else { - var p = { - flags: 1, - x: (contour[0].x + contour[contour.length - 1].x) / 2, - y: (contour[0].y + contour[contour.length - 1].y) / 2 - }; - contour.unshift(p); - contour.push(p); - } - moveTo(contour[0].x, contour[0].y); - for (j = 1, jj = contour.length; j < jj; j++) { - if (contour[j].flags & 1) { - lineTo(contour[j].x, contour[j].y); - } else if (contour[j + 1].flags & 1) { - quadraticCurveTo(contour[j].x, contour[j].y, contour[j + 1].x, contour[j + 1].y); - j++; - } else { - quadraticCurveTo(contour[j].x, contour[j].y, (contour[j].x + contour[j + 1].x) / 2, (contour[j].y + contour[j + 1].y) / 2); - } - } - startPoint = endPoint + 1; - } - } - } - function compileCharString(code, cmds, font) { - var stack = []; - var x = 0, y = 0; - var stems = 0; - function moveTo(x, y) { - cmds.push({ - cmd: 'moveTo', - args: [ - x, - y - ] - }); - } - function lineTo(x, y) { - cmds.push({ - cmd: 'lineTo', - args: [ - x, - y - ] - }); - } - function bezierCurveTo(x1, y1, x2, y2, x, y) { - cmds.push({ - cmd: 'bezierCurveTo', - args: [ - x1, - y1, - x2, - y2, - x, - y - ] - }); - } - function parse(code) { - var i = 0; - while (i < code.length) { - var stackClean = false; - var v = code[i++]; - var xa, xb, ya, yb, y1, y2, y3, n, subrCode; - switch (v) { - case 1: - stems += stack.length >> 1; - stackClean = true; - break; - case 3: - stems += stack.length >> 1; - stackClean = true; - break; - case 4: - y += stack.pop(); - moveTo(x, y); - stackClean = true; - break; - case 5: - while (stack.length > 0) { - x += stack.shift(); - y += stack.shift(); - lineTo(x, y); - } - break; - case 6: - while (stack.length > 0) { - x += stack.shift(); - lineTo(x, y); - if (stack.length === 0) { - break; - } - y += stack.shift(); - lineTo(x, y); - } - break; - case 7: - while (stack.length > 0) { - y += stack.shift(); - lineTo(x, y); - if (stack.length === 0) { - break; - } - x += stack.shift(); - lineTo(x, y); - } - break; - case 8: - while (stack.length > 0) { - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 10: - n = stack.pop() + font.subrsBias; - subrCode = font.subrs[n]; - if (subrCode) { - parse(subrCode); - } - break; - case 11: - return; - case 12: - v = code[i++]; - switch (v) { - case 34: - xa = x + stack.shift(); - xb = xa + stack.shift(); - y1 = y + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y, xb, y1, x, y1); - xa = x + stack.shift(); - xb = xa + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y1, xb, y, x, y); - break; - case 35: - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - stack.pop(); - break; - case 36: - xa = x + stack.shift(); - y1 = y + stack.shift(); - xb = xa + stack.shift(); - y2 = y1 + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y1, xb, y2, x, y2); - xa = x + stack.shift(); - xb = xa + stack.shift(); - y3 = y2 + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y2, xb, y3, x, y); - break; - case 37: - var x0 = x, y0 = y; - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb; - y = yb; - if (Math.abs(x - x0) > Math.abs(y - y0)) { - x += stack.shift(); - } else { - y += stack.shift(); - } - bezierCurveTo(xa, ya, xb, yb, x, y); - break; - default: - error('unknown operator: 12 ' + v); - } - break; - case 14: - if (stack.length >= 4) { - var achar = stack.pop(); - var bchar = stack.pop(); - y = stack.pop(); - x = stack.pop(); - cmds.push({ cmd: 'save' }); - cmds.push({ - cmd: 'translate', - args: [ - x, - y - ] - }); - var cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[StandardEncoding[achar]])); - compileCharString(font.glyphs[cmap.glyphId], cmds, font); - cmds.push({ cmd: 'restore' }); - cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[StandardEncoding[bchar]])); - compileCharString(font.glyphs[cmap.glyphId], cmds, font); - } - return; - case 18: - stems += stack.length >> 1; - stackClean = true; - break; - case 19: - stems += stack.length >> 1; - i += stems + 7 >> 3; - stackClean = true; - break; - case 20: - stems += stack.length >> 1; - i += stems + 7 >> 3; - stackClean = true; - break; - case 21: - y += stack.pop(); - x += stack.pop(); - moveTo(x, y); - stackClean = true; - break; - case 22: - x += stack.pop(); - moveTo(x, y); - stackClean = true; - break; - case 23: - stems += stack.length >> 1; - stackClean = true; - break; - case 24: - while (stack.length > 2) { - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - x += stack.shift(); - y += stack.shift(); - lineTo(x, y); - break; - case 25: - while (stack.length > 6) { - x += stack.shift(); - y += stack.shift(); - lineTo(x, y); - } - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - break; - case 26: - if (stack.length % 2) { - x += stack.shift(); - } - while (stack.length > 0) { - xa = x; - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb; - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 27: - if (stack.length % 2) { - y += stack.shift(); - } - while (stack.length > 0) { - xa = x + stack.shift(); - ya = y; - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb; - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 28: - stack.push((code[i] << 24 | code[i + 1] << 16) >> 16); - i += 2; - break; - case 29: - n = stack.pop() + font.gsubrsBias; - subrCode = font.gsubrs[n]; - if (subrCode) { - parse(subrCode); - } - break; - case 30: - while (stack.length > 0) { - xa = x; - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - if (stack.length === 0) { - break; - } - xa = x + stack.shift(); - ya = y; - xb = xa + stack.shift(); - yb = ya + stack.shift(); - y = yb + stack.shift(); - x = xb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 31: - while (stack.length > 0) { - xa = x + stack.shift(); - ya = y; - xb = xa + stack.shift(); - yb = ya + stack.shift(); - y = yb + stack.shift(); - x = xb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - if (stack.length === 0) { - break; - } - xa = x; - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - default: - if (v < 32) { - error('unknown operator: ' + v); - } - if (v < 247) { - stack.push(v - 139); - } else if (v < 251) { - stack.push((v - 247) * 256 + code[i++] + 108); - } else if (v < 255) { - stack.push(-(v - 251) * 256 - code[i++] - 108); - } else { - stack.push((code[i] << 24 | code[i + 1] << 16 | code[i + 2] << 8 | code[i + 3]) / 65536); - i += 4; - } - break; - } - if (stackClean) { - stack.length = 0; - } - } - } - parse(code); - } - var noop = ''; - function CompiledFont(fontMatrix) { - this.compiledGlyphs = Object.create(null); - this.compiledCharCodeToGlyphId = Object.create(null); - this.fontMatrix = fontMatrix; - } - CompiledFont.prototype = { - getPathJs: function (unicode) { - var cmap = lookupCmap(this.cmap, unicode); - var fn = this.compiledGlyphs[cmap.glyphId]; - if (!fn) { - fn = this.compileGlyph(this.glyphs[cmap.glyphId]); - this.compiledGlyphs[cmap.glyphId] = fn; - } - if (this.compiledCharCodeToGlyphId[cmap.charCode] === undefined) { - this.compiledCharCodeToGlyphId[cmap.charCode] = cmap.glyphId; - } - return fn; - }, - compileGlyph: function (code) { - if (!code || code.length === 0 || code[0] === 14) { - return noop; - } - var cmds = []; - cmds.push({ cmd: 'save' }); - cmds.push({ - cmd: 'transform', - args: this.fontMatrix.slice() - }); - cmds.push({ - cmd: 'scale', - args: [ - 'size', - '-size' - ] - }); - this.compileGlyphImpl(code, cmds); - cmds.push({ cmd: 'restore' }); - return cmds; - }, - compileGlyphImpl: function () { - error('Children classes should implement this.'); - }, - hasBuiltPath: function (unicode) { - var cmap = lookupCmap(this.cmap, unicode); - return this.compiledGlyphs[cmap.glyphId] !== undefined && this.compiledCharCodeToGlyphId[cmap.charCode] !== undefined; - } - }; - function TrueTypeCompiled(glyphs, cmap, fontMatrix) { - fontMatrix = fontMatrix || [ - 0.000488, - 0, - 0, - 0.000488, - 0, - 0 - ]; - CompiledFont.call(this, fontMatrix); - this.glyphs = glyphs; - this.cmap = cmap; - } - Util.inherit(TrueTypeCompiled, CompiledFont, { - compileGlyphImpl: function (code, cmds) { - compileGlyf(code, cmds, this); - } - }); - function Type2Compiled(cffInfo, cmap, fontMatrix, glyphNameMap) { - fontMatrix = fontMatrix || [ - 0.001, - 0, - 0, - 0.001, - 0, - 0 - ]; - CompiledFont.call(this, fontMatrix); - this.glyphs = cffInfo.glyphs; - this.gsubrs = cffInfo.gsubrs || []; - this.subrs = cffInfo.subrs || []; - this.cmap = cmap; - this.glyphNameMap = glyphNameMap || getGlyphsUnicode(); - this.gsubrsBias = this.gsubrs.length < 1240 ? 107 : this.gsubrs.length < 33900 ? 1131 : 32768; - this.subrsBias = this.subrs.length < 1240 ? 107 : this.subrs.length < 33900 ? 1131 : 32768; - } - Util.inherit(Type2Compiled, CompiledFont, { - compileGlyphImpl: function (code, cmds) { - compileCharString(code, cmds, this); - } - }); - return { - create: function FontRendererFactory_create(font, seacAnalysisEnabled) { - var data = new Uint8Array(font.data); - var cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm; - var numTables = getUshort(data, 4); - for (var i = 0, p = 12; i < numTables; i++, p += 16) { - var tag = bytesToString(data.subarray(p, p + 4)); - var offset = getLong(data, p + 8); - var length = getLong(data, p + 12); - switch (tag) { - case 'cmap': - cmap = parseCmap(data, offset, offset + length); - break; - case 'glyf': - glyf = data.subarray(offset, offset + length); - break; - case 'loca': - loca = data.subarray(offset, offset + length); - break; - case 'head': - unitsPerEm = getUshort(data, offset + 18); - indexToLocFormat = getUshort(data, offset + 50); - break; - case 'CFF ': - cff = parseCff(data, offset, offset + length, seacAnalysisEnabled); - break; - } - } - if (glyf) { - var fontMatrix = !unitsPerEm ? font.fontMatrix : [ - 1 / unitsPerEm, - 0, - 0, - 1 / unitsPerEm, - 0, - 0 - ]; - return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix); - } - return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap); - } - }; - }(); - exports.FontRendererFactory = FontRendererFactory; - })); - (function (root, factory) { - factory(root.pdfjsCoreParser = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream); - }(this, function (exports, sharedUtil, corePrimitives, coreStream) { - var MissingDataException = sharedUtil.MissingDataException; - var StreamType = sharedUtil.StreamType; - var assert = sharedUtil.assert; - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var isInt = sharedUtil.isInt; - var isNum = sharedUtil.isNum; - var isString = sharedUtil.isString; - var warn = sharedUtil.warn; - var Cmd = corePrimitives.Cmd; - var Dict = corePrimitives.Dict; - var Name = corePrimitives.Name; - var Ref = corePrimitives.Ref; - var isCmd = corePrimitives.isCmd; - var isDict = corePrimitives.isDict; - var isName = corePrimitives.isName; - var Ascii85Stream = coreStream.Ascii85Stream; - var AsciiHexStream = coreStream.AsciiHexStream; - var CCITTFaxStream = coreStream.CCITTFaxStream; - var FlateStream = coreStream.FlateStream; - var Jbig2Stream = coreStream.Jbig2Stream; - var JpegStream = coreStream.JpegStream; - var JpxStream = coreStream.JpxStream; - var LZWStream = coreStream.LZWStream; - var NullStream = coreStream.NullStream; - var PredictorStream = coreStream.PredictorStream; - var RunLengthStream = coreStream.RunLengthStream; - var EOF = {}; - function isEOF(v) { - return v === EOF; - } - var MAX_LENGTH_TO_CACHE = 1000; - var Parser = function ParserClosure() { - function Parser(lexer, allowStreams, xref, recoveryMode) { - this.lexer = lexer; - this.allowStreams = allowStreams; - this.xref = xref; - this.recoveryMode = recoveryMode || false; - this.imageCache = Object.create(null); - this.refill(); - } - Parser.prototype = { - refill: function Parser_refill() { - this.buf1 = this.lexer.getObj(); - this.buf2 = this.lexer.getObj(); - }, - shift: function Parser_shift() { - if (isCmd(this.buf2, 'ID')) { - this.buf1 = this.buf2; - this.buf2 = null; - } else { - this.buf1 = this.buf2; - this.buf2 = this.lexer.getObj(); - } - }, - tryShift: function Parser_tryShift() { - try { - this.shift(); - return true; - } catch (e) { - if (e instanceof MissingDataException) { - throw e; - } - return false; - } - }, - getObj: function Parser_getObj(cipherTransform) { - var buf1 = this.buf1; - this.shift(); - if (buf1 instanceof Cmd) { - switch (buf1.cmd) { - case 'BI': - return this.makeInlineImage(cipherTransform); - case '[': - var array = []; - while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) { - array.push(this.getObj(cipherTransform)); - } - if (isEOF(this.buf1)) { - if (!this.recoveryMode) { - error('End of file inside array'); - } - return array; - } - this.shift(); - return array; - case '<<': - var dict = new Dict(this.xref); - while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) { - if (!isName(this.buf1)) { - info('Malformed dictionary: key must be a name object'); - this.shift(); - continue; - } - var key = this.buf1.name; - this.shift(); - if (isEOF(this.buf1)) { - break; - } - dict.set(key, this.getObj(cipherTransform)); - } - if (isEOF(this.buf1)) { - if (!this.recoveryMode) { - error('End of file inside dictionary'); - } - return dict; - } - if (isCmd(this.buf2, 'stream')) { - return this.allowStreams ? this.makeStream(dict, cipherTransform) : dict; - } - this.shift(); - return dict; - default: - return buf1; - } - } - if (isInt(buf1)) { - var num = buf1; - if (isInt(this.buf1) && isCmd(this.buf2, 'R')) { - var ref = new Ref(num, this.buf1); - this.shift(); - this.shift(); - return ref; - } - return num; - } - if (isString(buf1)) { - var str = buf1; - if (cipherTransform) { - str = cipherTransform.decryptString(str); - } - return str; - } - return buf1; - }, - findDefaultInlineStreamEnd: function Parser_findDefaultInlineStreamEnd(stream) { - var E = 0x45, I = 0x49, SPACE = 0x20, LF = 0xA, CR = 0xD; - var startPos = stream.pos, state = 0, ch, i, n, followingBytes; - while ((ch = stream.getByte()) !== -1) { - if (state === 0) { - state = ch === E ? 1 : 0; - } else if (state === 1) { - state = ch === I ? 2 : 0; - } else { - assert(state === 2); - if (ch === SPACE || ch === LF || ch === CR) { - n = 5; - followingBytes = stream.peekBytes(n); - for (i = 0; i < n; i++) { - ch = followingBytes[i]; - if (ch !== LF && ch !== CR && (ch < SPACE || ch > 0x7F)) { - state = 0; - break; - } - } - if (state === 2) { - break; - } - } else - { - state = 0; - } - } - } - return stream.pos - 4 - startPos; - }, - findDCTDecodeInlineStreamEnd: function Parser_findDCTDecodeInlineStreamEnd(stream) { - var startPos = stream.pos, foundEOI = false, b, markerLength, length; - while ((b = stream.getByte()) !== -1) { - if (b !== 0xFF) { - continue; - } - switch (stream.getByte()) { - case 0x00: - break; - case 0xFF: - stream.skip(-1); - break; - case 0xD9: - foundEOI = true; - break; - case 0xC0: - case 0xC1: - case 0xC2: - case 0xC3: - case 0xC5: - case 0xC6: - case 0xC7: - case 0xC9: - case 0xCA: - case 0xCB: - case 0xCD: - case 0xCE: - case 0xCF: - case 0xC4: - case 0xCC: - case 0xDA: - case 0xDB: - case 0xDC: - case 0xDD: - case 0xDE: - case 0xDF: - case 0xE0: - case 0xE1: - case 0xE2: - case 0xE3: - case 0xE4: - case 0xE5: - case 0xE6: - case 0xE7: - case 0xE8: - case 0xE9: - case 0xEA: - case 0xEB: - case 0xEC: - case 0xED: - case 0xEE: - case 0xEF: - case 0xFE: - markerLength = stream.getUint16(); - if (markerLength > 2) { - stream.skip(markerLength - 2); - } else - { - stream.skip(-2); - } - break; - } - if (foundEOI) { - break; - } - } - length = stream.pos - startPos; - if (b === -1) { - warn('Inline DCTDecode image stream: ' + 'EOI marker not found, searching for /EI/ instead.'); - stream.skip(-length); - return this.findDefaultInlineStreamEnd(stream); - } - this.inlineStreamSkipEI(stream); - return length; - }, - findASCII85DecodeInlineStreamEnd: function Parser_findASCII85DecodeInlineStreamEnd(stream) { - var TILDE = 0x7E, GT = 0x3E; - var startPos = stream.pos, ch, length; - while ((ch = stream.getByte()) !== -1) { - if (ch === TILDE && stream.peekByte() === GT) { - stream.skip(); - break; - } - } - length = stream.pos - startPos; - if (ch === -1) { - warn('Inline ASCII85Decode image stream: ' + 'EOD marker not found, searching for /EI/ instead.'); - stream.skip(-length); - return this.findDefaultInlineStreamEnd(stream); - } - this.inlineStreamSkipEI(stream); - return length; - }, - findASCIIHexDecodeInlineStreamEnd: function Parser_findASCIIHexDecodeInlineStreamEnd(stream) { - var GT = 0x3E; - var startPos = stream.pos, ch, length; - while ((ch = stream.getByte()) !== -1) { - if (ch === GT) { - break; - } - } - length = stream.pos - startPos; - if (ch === -1) { - warn('Inline ASCIIHexDecode image stream: ' + 'EOD marker not found, searching for /EI/ instead.'); - stream.skip(-length); - return this.findDefaultInlineStreamEnd(stream); - } - this.inlineStreamSkipEI(stream); - return length; - }, - inlineStreamSkipEI: function Parser_inlineStreamSkipEI(stream) { - var E = 0x45, I = 0x49; - var state = 0, ch; - while ((ch = stream.getByte()) !== -1) { - if (state === 0) { - state = ch === E ? 1 : 0; - } else if (state === 1) { - state = ch === I ? 2 : 0; - } else if (state === 2) { - break; - } - } - }, - makeInlineImage: function Parser_makeInlineImage(cipherTransform) { - var lexer = this.lexer; - var stream = lexer.stream; - var dict = new Dict(this.xref); - while (!isCmd(this.buf1, 'ID') && !isEOF(this.buf1)) { - if (!isName(this.buf1)) { - error('Dictionary key must be a name object'); - } - var key = this.buf1.name; - this.shift(); - if (isEOF(this.buf1)) { - break; - } - dict.set(key, this.getObj(cipherTransform)); - } - var filter = dict.get('Filter', 'F'), filterName; - if (isName(filter)) { - filterName = filter.name; - } else if (isArray(filter)) { - var filterZero = this.xref.fetchIfRef(filter[0]); - if (isName(filterZero)) { - filterName = filterZero.name; - } - } - var startPos = stream.pos, length, i, ii; - if (filterName === 'DCTDecode' || filterName === 'DCT') { - length = this.findDCTDecodeInlineStreamEnd(stream); - } else if (filterName === 'ASCII85Decide' || filterName === 'A85') { - length = this.findASCII85DecodeInlineStreamEnd(stream); - } else if (filterName === 'ASCIIHexDecode' || filterName === 'AHx') { - length = this.findASCIIHexDecodeInlineStreamEnd(stream); - } else { - length = this.findDefaultInlineStreamEnd(stream); - } - var imageStream = stream.makeSubStream(startPos, length, dict); - var adler32; - if (length < MAX_LENGTH_TO_CACHE) { - var imageBytes = imageStream.getBytes(); - imageStream.reset(); - var a = 1; - var b = 0; - for (i = 0, ii = imageBytes.length; i < ii; ++i) { - a += imageBytes[i] & 0xff; - b += a; - } - adler32 = b % 65521 << 16 | a % 65521; - if (this.imageCache.adler32 === adler32) { - this.buf2 = Cmd.get('EI'); - this.shift(); - this.imageCache[adler32].reset(); - return this.imageCache[adler32]; - } - } - if (cipherTransform) { - imageStream = cipherTransform.createStream(imageStream, length); - } - imageStream = this.filter(imageStream, dict, length); - imageStream.dict = dict; - if (adler32 !== undefined) { - imageStream.cacheKey = 'inline_' + length + '_' + adler32; - this.imageCache[adler32] = imageStream; - } - this.buf2 = Cmd.get('EI'); - this.shift(); - return imageStream; - }, - makeStream: function Parser_makeStream(dict, cipherTransform) { - var lexer = this.lexer; - var stream = lexer.stream; - lexer.skipToNextLine(); - var pos = stream.pos - 1; - var length = dict.get('Length'); - if (!isInt(length)) { - info('Bad ' + length + ' attribute in stream'); - length = 0; - } - stream.pos = pos + length; - lexer.nextChar(); - if (this.tryShift() && isCmd(this.buf2, 'endstream')) { - this.shift(); - } else - { - stream.pos = pos; - var SCAN_BLOCK_SIZE = 2048; - var ENDSTREAM_SIGNATURE_LENGTH = 9; - var ENDSTREAM_SIGNATURE = [ - 0x65, - 0x6E, - 0x64, - 0x73, - 0x74, - 0x72, - 0x65, - 0x61, - 0x6D - ]; - var skipped = 0, found = false, i, j; - while (stream.pos < stream.end) { - var scanBytes = stream.peekBytes(SCAN_BLOCK_SIZE); - var scanLength = scanBytes.length - ENDSTREAM_SIGNATURE_LENGTH; - if (scanLength <= 0) { - break; - } - found = false; - i = 0; - while (i < scanLength) { - j = 0; - while (j < ENDSTREAM_SIGNATURE_LENGTH && scanBytes[i + j] === ENDSTREAM_SIGNATURE[j]) { - j++; - } - if (j >= ENDSTREAM_SIGNATURE_LENGTH) { - found = true; - break; - } - i++; - } - if (found) { - skipped += i; - stream.pos += i; - break; - } - skipped += scanLength; - stream.pos += scanLength; - } - if (!found) { - error('Missing endstream'); - } - length = skipped; - lexer.nextChar(); - this.shift(); - this.shift(); - } - this.shift(); - stream = stream.makeSubStream(pos, length, dict); - if (cipherTransform) { - stream = cipherTransform.createStream(stream, length); - } - stream = this.filter(stream, dict, length); - stream.dict = dict; - return stream; - }, - filter: function Parser_filter(stream, dict, length) { - var filter = dict.get('Filter', 'F'); - var params = dict.get('DecodeParms', 'DP'); - if (isName(filter)) { - if (isArray(params)) { - params = this.xref.fetchIfRef(params[0]); - } - return this.makeFilter(stream, filter.name, length, params); - } - var maybeLength = length; - if (isArray(filter)) { - var filterArray = filter; - var paramsArray = params; - for (var i = 0, ii = filterArray.length; i < ii; ++i) { - filter = this.xref.fetchIfRef(filterArray[i]); - if (!isName(filter)) { - error('Bad filter name: ' + filter); - } - params = null; - if (isArray(paramsArray) && i in paramsArray) { - params = this.xref.fetchIfRef(paramsArray[i]); - } - stream = this.makeFilter(stream, filter.name, maybeLength, params); - maybeLength = null; - } - } - return stream; - }, - makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) { - if (maybeLength === 0) { - warn('Empty "' + name + '" stream.'); - return new NullStream(stream); - } - try { - var xrefStreamStats = this.xref.stats.streamTypes; - if (name === 'FlateDecode' || name === 'Fl') { - xrefStreamStats[StreamType.FLATE] = true; - if (params) { - return new PredictorStream(new FlateStream(stream, maybeLength), maybeLength, params); - } - return new FlateStream(stream, maybeLength); - } - if (name === 'LZWDecode' || name === 'LZW') { - xrefStreamStats[StreamType.LZW] = true; - var earlyChange = 1; - if (params) { - if (params.has('EarlyChange')) { - earlyChange = params.get('EarlyChange'); - } - return new PredictorStream(new LZWStream(stream, maybeLength, earlyChange), maybeLength, params); - } - return new LZWStream(stream, maybeLength, earlyChange); - } - if (name === 'DCTDecode' || name === 'DCT') { - xrefStreamStats[StreamType.DCT] = true; - return new JpegStream(stream, maybeLength, stream.dict, params); - } - if (name === 'JPXDecode' || name === 'JPX') { - xrefStreamStats[StreamType.JPX] = true; - return new JpxStream(stream, maybeLength, stream.dict, params); - } - if (name === 'ASCII85Decode' || name === 'A85') { - xrefStreamStats[StreamType.A85] = true; - return new Ascii85Stream(stream, maybeLength); - } - if (name === 'ASCIIHexDecode' || name === 'AHx') { - xrefStreamStats[StreamType.AHX] = true; - return new AsciiHexStream(stream, maybeLength); - } - if (name === 'CCITTFaxDecode' || name === 'CCF') { - xrefStreamStats[StreamType.CCF] = true; - return new CCITTFaxStream(stream, maybeLength, params); - } - if (name === 'RunLengthDecode' || name === 'RL') { - xrefStreamStats[StreamType.RL] = true; - return new RunLengthStream(stream, maybeLength); - } - if (name === 'JBIG2Decode') { - xrefStreamStats[StreamType.JBIG] = true; - return new Jbig2Stream(stream, maybeLength, stream.dict, params); - } - warn('filter "' + name + '" not supported yet'); - return stream; - } catch (ex) { - if (ex instanceof MissingDataException) { - throw ex; - } - warn('Invalid stream: \"' + ex + '\"'); - return new NullStream(stream); - } - } - }; - return Parser; - }(); - var Lexer = function LexerClosure() { - function Lexer(stream, knownCommands) { - this.stream = stream; - this.nextChar(); - this.strBuf = []; - this.knownCommands = knownCommands; - } - var specialChars = [ - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 2, - 0, - 0, - 2, - 2, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - function toHexDigit(ch) { - if (ch >= 0x30 && ch <= 0x39) { - return ch & 0x0F; - } - if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { - return (ch & 0x0F) + 9; - } - return -1; - } - Lexer.prototype = { - nextChar: function Lexer_nextChar() { - return this.currentChar = this.stream.getByte(); - }, - peekChar: function Lexer_peekChar() { - return this.stream.peekByte(); - }, - getNumber: function Lexer_getNumber() { - var ch = this.currentChar; - var eNotation = false; - var divideBy = 0; - var sign = 1; - if (ch === 0x2D) { - sign = -1; - ch = this.nextChar(); - if (ch === 0x2D) { - ch = this.nextChar(); - } - } else if (ch === 0x2B) { - ch = this.nextChar(); - } - if (ch === 0x2E) { - divideBy = 10; - ch = this.nextChar(); - } - if (ch < 0x30 || ch > 0x39) { - error('Invalid number: ' + String.fromCharCode(ch)); - return 0; - } - var baseValue = ch - 0x30; - var powerValue = 0; - var powerValueSign = 1; - while ((ch = this.nextChar()) >= 0) { - if (0x30 <= ch && ch <= 0x39) { - var currentDigit = ch - 0x30; - if (eNotation) { - powerValue = powerValue * 10 + currentDigit; - } else { - if (divideBy !== 0) { - divideBy *= 10; - } - baseValue = baseValue * 10 + currentDigit; - } - } else if (ch === 0x2E) { - if (divideBy === 0) { - divideBy = 1; - } else { - break; - } - } else if (ch === 0x2D) { - warn('Badly formatted number'); - } else if (ch === 0x45 || ch === 0x65) { - ch = this.peekChar(); - if (ch === 0x2B || ch === 0x2D) { - powerValueSign = ch === 0x2D ? -1 : 1; - this.nextChar(); - } else if (ch < 0x30 || ch > 0x39) { - break; - } - eNotation = true; - } else { - break; - } - } - if (divideBy !== 0) { - baseValue /= divideBy; - } - if (eNotation) { - baseValue *= Math.pow(10, powerValueSign * powerValue); - } - return sign * baseValue; - }, - getString: function Lexer_getString() { - var numParen = 1; - var done = false; - var strBuf = this.strBuf; - strBuf.length = 0; - var ch = this.nextChar(); - while (true) { - var charBuffered = false; - switch (ch | 0) { - case -1: - warn('Unterminated string'); - done = true; - break; - case 0x28: - ++numParen; - strBuf.push('('); - break; - case 0x29: - if (--numParen === 0) { - this.nextChar(); - done = true; - } else { - strBuf.push(')'); - } - break; - case 0x5C: - ch = this.nextChar(); - switch (ch) { - case -1: - warn('Unterminated string'); - done = true; - break; - case 0x6E: - strBuf.push('\n'); - break; - case 0x72: - strBuf.push('\r'); - break; - case 0x74: - strBuf.push('\t'); - break; - case 0x62: - strBuf.push('\b'); - break; - case 0x66: - strBuf.push('\f'); - break; - case 0x5C: - case 0x28: - case 0x29: - strBuf.push(String.fromCharCode(ch)); - break; - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - var x = ch & 0x0F; - ch = this.nextChar(); - charBuffered = true; - if (ch >= 0x30 && ch <= 0x37) { - x = (x << 3) + (ch & 0x0F); - ch = this.nextChar(); - if (ch >= 0x30 && ch <= 0x37) { - charBuffered = false; - x = (x << 3) + (ch & 0x0F); - } - } - strBuf.push(String.fromCharCode(x)); - break; - case 0x0D: - if (this.peekChar() === 0x0A) { - this.nextChar(); - } - break; - case 0x0A: - break; - default: - strBuf.push(String.fromCharCode(ch)); - break; - } - break; - default: - strBuf.push(String.fromCharCode(ch)); - break; - } - if (done) { - break; - } - if (!charBuffered) { - ch = this.nextChar(); - } - } - return strBuf.join(''); - }, - getName: function Lexer_getName() { - var ch, previousCh; - var strBuf = this.strBuf; - strBuf.length = 0; - while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { - if (ch === 0x23) { - ch = this.nextChar(); - if (specialChars[ch]) { - warn('Lexer_getName: ' + 'NUMBER SIGN (#) should be followed by a hexadecimal number.'); - strBuf.push('#'); - break; - } - var x = toHexDigit(ch); - if (x !== -1) { - previousCh = ch; - ch = this.nextChar(); - var x2 = toHexDigit(ch); - if (x2 === -1) { - warn('Lexer_getName: Illegal digit (' + String.fromCharCode(ch) + ') in hexadecimal number.'); - strBuf.push('#', String.fromCharCode(previousCh)); - if (specialChars[ch]) { - break; - } - strBuf.push(String.fromCharCode(ch)); - continue; - } - strBuf.push(String.fromCharCode(x << 4 | x2)); - } else { - strBuf.push('#', String.fromCharCode(ch)); - } - } else { - strBuf.push(String.fromCharCode(ch)); - } - } - if (strBuf.length > 127) { - warn('name token is longer than allowed by the spec: ' + strBuf.length); - } - return Name.get(strBuf.join('')); - }, - getHexString: function Lexer_getHexString() { - var strBuf = this.strBuf; - strBuf.length = 0; - var ch = this.currentChar; - var isFirstHex = true; - var firstDigit; - var secondDigit; - while (true) { - if (ch < 0) { - warn('Unterminated hex string'); - break; - } else if (ch === 0x3E) { - this.nextChar(); - break; - } else if (specialChars[ch] === 1) { - ch = this.nextChar(); - continue; - } else { - if (isFirstHex) { - firstDigit = toHexDigit(ch); - if (firstDigit === -1) { - warn('Ignoring invalid character "' + ch + '" in hex string'); - ch = this.nextChar(); - continue; - } - } else { - secondDigit = toHexDigit(ch); - if (secondDigit === -1) { - warn('Ignoring invalid character "' + ch + '" in hex string'); - ch = this.nextChar(); - continue; - } - strBuf.push(String.fromCharCode(firstDigit << 4 | secondDigit)); - } - isFirstHex = !isFirstHex; - ch = this.nextChar(); - } - } - return strBuf.join(''); - }, - getObj: function Lexer_getObj() { - var comment = false; - var ch = this.currentChar; - while (true) { - if (ch < 0) { - return EOF; - } - if (comment) { - if (ch === 0x0A || ch === 0x0D) { - comment = false; - } - } else if (ch === 0x25) { - comment = true; - } else if (specialChars[ch] !== 1) { - break; - } - ch = this.nextChar(); - } - switch (ch | 0) { - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - case 0x2B: - case 0x2D: - case 0x2E: - return this.getNumber(); - case 0x28: - return this.getString(); - case 0x2F: - return this.getName(); - case 0x5B: - this.nextChar(); - return Cmd.get('['); - case 0x5D: - this.nextChar(); - return Cmd.get(']'); - case 0x3C: - ch = this.nextChar(); - if (ch === 0x3C) { - this.nextChar(); - return Cmd.get('<<'); - } - return this.getHexString(); - case 0x3E: - ch = this.nextChar(); - if (ch === 0x3E) { - this.nextChar(); - return Cmd.get('>>'); - } - return Cmd.get('>'); - case 0x7B: - this.nextChar(); - return Cmd.get('{'); - case 0x7D: - this.nextChar(); - return Cmd.get('}'); - case 0x29: - error('Illegal character: ' + ch); - break; - } - var str = String.fromCharCode(ch); - var knownCommands = this.knownCommands; - var knownCommandFound = knownCommands && knownCommands[str] !== undefined; - while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { - var possibleCommand = str + String.fromCharCode(ch); - if (knownCommandFound && knownCommands[possibleCommand] === undefined) { - break; - } - if (str.length === 128) { - error('Command token too long: ' + str.length); - } - str = possibleCommand; - knownCommandFound = knownCommands && knownCommands[str] !== undefined; - } - if (str === 'true') { - return true; - } - if (str === 'false') { - return false; - } - if (str === 'null') { - return null; - } - return Cmd.get(str); - }, - skipToNextLine: function Lexer_skipToNextLine() { - var ch = this.currentChar; - while (ch >= 0) { - if (ch === 0x0D) { - ch = this.nextChar(); - if (ch === 0x0A) { - this.nextChar(); - } - break; - } else if (ch === 0x0A) { - this.nextChar(); - break; - } - ch = this.nextChar(); - } - } - }; - return Lexer; - }(); - var Linearization = { - create: function LinearizationCreate(stream) { - function getInt(name, allowZeroValue) { - var obj = linDict.get(name); - if (isInt(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) { - return obj; - } - throw new Error('The "' + name + '" parameter in the linearization ' + 'dictionary is invalid.'); - } - function getHints() { - var hints = linDict.get('H'), hintsLength, item; - if (isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) { - for (var index = 0; index < hintsLength; index++) { - if (!(isInt(item = hints[index]) && item > 0)) { - throw new Error('Hint (' + index + ') in the linearization dictionary is invalid.'); - } - } - return hints; - } - throw new Error('Hint array in the linearization dictionary is invalid.'); - } - var parser = new Parser(new Lexer(stream), false, null); - var obj1 = parser.getObj(); - var obj2 = parser.getObj(); - var obj3 = parser.getObj(); - var linDict = parser.getObj(); - var obj, length; - if (!(isInt(obj1) && isInt(obj2) && isCmd(obj3, 'obj') && isDict(linDict) && isNum(obj = linDict.get('Linearized')) && obj > 0)) { - return null; - } else if ((length = getInt('L')) !== stream.length) { - throw new Error('The "L" parameter in the linearization dictionary ' + 'does not equal the stream length.'); - } - return { - length: length, - hints: getHints(), - objectNumberFirst: getInt('O'), - endFirst: getInt('E'), - numPages: getInt('N'), - mainXRefEntriesOffset: getInt('T'), - pageFirst: linDict.has('P') ? getInt('P', true) : 0 - }; - } - }; - exports.EOF = EOF; - exports.Lexer = Lexer; - exports.Linearization = Linearization; - exports.Parser = Parser; - exports.isEOF = isEOF; - })); - (function (root, factory) { - factory(root.pdfjsCoreType1Parser = {}, root.pdfjsSharedUtil, root.pdfjsCoreStream, root.pdfjsCoreEncodings); - }(this, function (exports, sharedUtil, coreStream, coreEncodings) { - var warn = sharedUtil.warn; - var isSpace = sharedUtil.isSpace; - var Stream = coreStream.Stream; - var getEncoding = coreEncodings.getEncoding; - var HINTING_ENABLED = false; - var Type1CharString = function Type1CharStringClosure() { - var COMMAND_MAP = { - 'hstem': [1], - 'vstem': [3], - 'vmoveto': [4], - 'rlineto': [5], - 'hlineto': [6], - 'vlineto': [7], - 'rrcurveto': [8], - 'callsubr': [10], - 'flex': [ - 12, - 35 - ], - 'drop': [ - 12, - 18 - ], - 'endchar': [14], - 'rmoveto': [21], - 'hmoveto': [22], - 'vhcurveto': [30], - 'hvcurveto': [31] - }; - function Type1CharString() { - this.width = 0; - this.lsb = 0; - this.flexing = false; - this.output = []; - this.stack = []; - } - Type1CharString.prototype = { - convert: function Type1CharString_convert(encoded, subrs, seacAnalysisEnabled) { - var count = encoded.length; - var error = false; - var wx, sbx, subrNumber; - for (var i = 0; i < count; i++) { - var value = encoded[i]; - if (value < 32) { - if (value === 12) { - value = (value << 8) + encoded[++i]; - } - switch (value) { - case 1: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.hstem); - break; - case 3: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.vstem); - break; - case 4: - if (this.flexing) { - if (this.stack.length < 1) { - error = true; - break; - } - var dy = this.stack.pop(); - this.stack.push(0, dy); - break; - } - error = this.executeCommand(1, COMMAND_MAP.vmoveto); - break; - case 5: - error = this.executeCommand(2, COMMAND_MAP.rlineto); - break; - case 6: - error = this.executeCommand(1, COMMAND_MAP.hlineto); - break; - case 7: - error = this.executeCommand(1, COMMAND_MAP.vlineto); - break; - case 8: - error = this.executeCommand(6, COMMAND_MAP.rrcurveto); - break; - case 9: - this.stack = []; - break; - case 10: - if (this.stack.length < 1) { - error = true; - break; - } - subrNumber = this.stack.pop(); - error = this.convert(subrs[subrNumber], subrs, seacAnalysisEnabled); - break; - case 11: - return error; - case 13: - if (this.stack.length < 2) { - error = true; - break; - } - wx = this.stack.pop(); - sbx = this.stack.pop(); - this.lsb = sbx; - this.width = wx; - this.stack.push(wx, sbx); - error = this.executeCommand(2, COMMAND_MAP.hmoveto); - break; - case 14: - this.output.push(COMMAND_MAP.endchar[0]); - break; - case 21: - if (this.flexing) { - break; - } - error = this.executeCommand(2, COMMAND_MAP.rmoveto); - break; - case 22: - if (this.flexing) { - this.stack.push(0); - break; - } - error = this.executeCommand(1, COMMAND_MAP.hmoveto); - break; - case 30: - error = this.executeCommand(4, COMMAND_MAP.vhcurveto); - break; - case 31: - error = this.executeCommand(4, COMMAND_MAP.hvcurveto); - break; - case (12 << 8) + 0: - this.stack = []; - break; - case (12 << 8) + 1: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.vstem); - break; - case (12 << 8) + 2: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.hstem); - break; - case (12 << 8) + 6: - if (seacAnalysisEnabled) { - this.seac = this.stack.splice(-4, 4); - error = this.executeCommand(0, COMMAND_MAP.endchar); - } else { - error = this.executeCommand(4, COMMAND_MAP.endchar); - } - break; - case (12 << 8) + 7: - if (this.stack.length < 4) { - error = true; - break; - } - var wy = this.stack.pop(); - wx = this.stack.pop(); - var sby = this.stack.pop(); - sbx = this.stack.pop(); - this.lsb = sbx; - this.width = wx; - this.stack.push(wx, sbx, sby); - error = this.executeCommand(3, COMMAND_MAP.rmoveto); - break; - case (12 << 8) + 12: - if (this.stack.length < 2) { - error = true; - break; - } - var num2 = this.stack.pop(); - var num1 = this.stack.pop(); - this.stack.push(num1 / num2); - break; - case (12 << 8) + 16: - if (this.stack.length < 2) { - error = true; - break; - } - subrNumber = this.stack.pop(); - var numArgs = this.stack.pop(); - if (subrNumber === 0 && numArgs === 3) { - var flexArgs = this.stack.splice(this.stack.length - 17, 17); - this.stack.push(flexArgs[2] + flexArgs[0], flexArgs[3] + flexArgs[1], flexArgs[4], flexArgs[5], flexArgs[6], flexArgs[7], flexArgs[8], flexArgs[9], flexArgs[10], flexArgs[11], flexArgs[12], flexArgs[13], flexArgs[14]); - error = this.executeCommand(13, COMMAND_MAP.flex, true); - this.flexing = false; - this.stack.push(flexArgs[15], flexArgs[16]); - } else if (subrNumber === 1 && numArgs === 0) { - this.flexing = true; - } - break; - case (12 << 8) + 17: - break; - case (12 << 8) + 33: - this.stack = []; - break; - default: - warn('Unknown type 1 charstring command of "' + value + '"'); - break; - } - if (error) { - break; - } - continue; - } else if (value <= 246) { - value = value - 139; - } else if (value <= 250) { - value = (value - 247) * 256 + encoded[++i] + 108; - } else if (value <= 254) { - value = -((value - 251) * 256) - encoded[++i] - 108; - } else { - value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 | (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0; - } - this.stack.push(value); - } - return error; - }, - executeCommand: function (howManyArgs, command, keepStack) { - var stackLength = this.stack.length; - if (howManyArgs > stackLength) { - return true; - } - var start = stackLength - howManyArgs; - for (var i = start; i < stackLength; i++) { - var value = this.stack[i]; - if (value === (value | 0)) { - this.output.push(28, value >> 8 & 0xff, value & 0xff); - } else { - value = 65536 * value | 0; - this.output.push(255, value >> 24 & 0xFF, value >> 16 & 0xFF, value >> 8 & 0xFF, value & 0xFF); - } - } - this.output.push.apply(this.output, command); - if (keepStack) { - this.stack.splice(start, howManyArgs); - } else { - this.stack.length = 0; - } - return false; - } - }; - return Type1CharString; - }(); - var Type1Parser = function Type1ParserClosure() { - var EEXEC_ENCRYPT_KEY = 55665; - var CHAR_STRS_ENCRYPT_KEY = 4330; - function isHexDigit(code) { - return code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102; - } - function decrypt(data, key, discardNumber) { - if (discardNumber >= data.length) { - return new Uint8Array(0); - } - var r = key | 0, c1 = 52845, c2 = 22719, i, j; - for (i = 0; i < discardNumber; i++) { - r = (data[i] + r) * c1 + c2 & (1 << 16) - 1; - } - var count = data.length - discardNumber; - var decrypted = new Uint8Array(count); - for (i = discardNumber, j = 0; j < count; i++, j++) { - var value = data[i]; - decrypted[j] = value ^ r >> 8; - r = (value + r) * c1 + c2 & (1 << 16) - 1; - } - return decrypted; - } - function decryptAscii(data, key, discardNumber) { - var r = key | 0, c1 = 52845, c2 = 22719; - var count = data.length, maybeLength = count >>> 1; - var decrypted = new Uint8Array(maybeLength); - var i, j; - for (i = 0, j = 0; i < count; i++) { - var digit1 = data[i]; - if (!isHexDigit(digit1)) { - continue; - } - i++; - var digit2; - while (i < count && !isHexDigit(digit2 = data[i])) { - i++; - } - if (i < count) { - var value = parseInt(String.fromCharCode(digit1, digit2), 16); - decrypted[j++] = value ^ r >> 8; - r = (value + r) * c1 + c2 & (1 << 16) - 1; - } - } - return Array.prototype.slice.call(decrypted, discardNumber, j); - } - function isSpecial(c) { - return c === 0x2F || c === 0x5B || c === 0x5D || c === 0x7B || c === 0x7D || c === 0x28 || c === 0x29; - } - function Type1Parser(stream, encrypted, seacAnalysisEnabled) { - if (encrypted) { - var data = stream.getBytes(); - var isBinary = !(isHexDigit(data[0]) && isHexDigit(data[1]) && isHexDigit(data[2]) && isHexDigit(data[3])); - stream = new Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) : decryptAscii(data, EEXEC_ENCRYPT_KEY, 4)); - } - this.seacAnalysisEnabled = !!seacAnalysisEnabled; - this.stream = stream; - this.nextChar(); - } - Type1Parser.prototype = { - readNumberArray: function Type1Parser_readNumberArray() { - this.getToken(); - var array = []; - while (true) { - var token = this.getToken(); - if (token === null || token === ']' || token === '}') { - break; - } - array.push(parseFloat(token || 0)); - } - return array; - }, - readNumber: function Type1Parser_readNumber() { - var token = this.getToken(); - return parseFloat(token || 0); - }, - readInt: function Type1Parser_readInt() { - var token = this.getToken(); - return parseInt(token || 0, 10) | 0; - }, - readBoolean: function Type1Parser_readBoolean() { - var token = this.getToken(); - return token === 'true' ? 1 : 0; - }, - nextChar: function Type1_nextChar() { - return this.currentChar = this.stream.getByte(); - }, - getToken: function Type1Parser_getToken() { - var comment = false; - var ch = this.currentChar; - while (true) { - if (ch === -1) { - return null; - } - if (comment) { - if (ch === 0x0A || ch === 0x0D) { - comment = false; - } - } else if (ch === 0x25) { - comment = true; - } else if (!isSpace(ch)) { - break; - } - ch = this.nextChar(); - } - if (isSpecial(ch)) { - this.nextChar(); - return String.fromCharCode(ch); - } - var token = ''; - do { - token += String.fromCharCode(ch); - ch = this.nextChar(); - } while (ch >= 0 && !isSpace(ch) && !isSpecial(ch)); - return token; - }, - extractFontProgram: function Type1Parser_extractFontProgram() { - var stream = this.stream; - var subrs = [], charstrings = []; - var privateData = Object.create(null); - privateData['lenIV'] = 4; - var program = { - subrs: [], - charstrings: [], - properties: { 'privateData': privateData } - }; - var token, length, data, lenIV, encoded; - while ((token = this.getToken()) !== null) { - if (token !== '/') { - continue; - } - token = this.getToken(); - switch (token) { - case 'CharStrings': - this.getToken(); - this.getToken(); - this.getToken(); - this.getToken(); - while (true) { - token = this.getToken(); - if (token === null || token === 'end') { - break; - } - if (token !== '/') { - continue; - } - var glyph = this.getToken(); - length = this.readInt(); - this.getToken(); - data = stream.makeSubStream(stream.pos, length); - lenIV = program.properties.privateData['lenIV']; - encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV); - stream.skip(length); - this.nextChar(); - token = this.getToken(); - if (token === 'noaccess') { - this.getToken(); - } - charstrings.push({ - glyph: glyph, - encoded: encoded - }); - } - break; - case 'Subrs': - var num = this.readInt(); - this.getToken(); - while ((token = this.getToken()) === 'dup') { - var index = this.readInt(); - length = this.readInt(); - this.getToken(); - data = stream.makeSubStream(stream.pos, length); - lenIV = program.properties.privateData['lenIV']; - encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV); - stream.skip(length); - this.nextChar(); - token = this.getToken(); - if (token === 'noaccess') { - this.getToken(); - } - subrs[index] = encoded; - } - break; - case 'BlueValues': - case 'OtherBlues': - case 'FamilyBlues': - case 'FamilyOtherBlues': - var blueArray = this.readNumberArray(); - if (blueArray.length > 0 && blueArray.length % 2 === 0 && HINTING_ENABLED) { - program.properties.privateData[token] = blueArray; - } - break; - case 'StemSnapH': - case 'StemSnapV': - program.properties.privateData[token] = this.readNumberArray(); - break; - case 'StdHW': - case 'StdVW': - program.properties.privateData[token] = this.readNumberArray()[0]; - break; - case 'BlueShift': - case 'lenIV': - case 'BlueFuzz': - case 'BlueScale': - case 'LanguageGroup': - case 'ExpansionFactor': - program.properties.privateData[token] = this.readNumber(); - break; - case 'ForceBold': - program.properties.privateData[token] = this.readBoolean(); - break; - } - } - for (var i = 0; i < charstrings.length; i++) { - glyph = charstrings[i].glyph; - encoded = charstrings[i].encoded; - var charString = new Type1CharString(); - var error = charString.convert(encoded, subrs, this.seacAnalysisEnabled); - var output = charString.output; - if (error) { - output = [14]; - } - program.charstrings.push({ - glyphName: glyph, - charstring: output, - width: charString.width, - lsb: charString.lsb, - seac: charString.seac - }); - } - return program; - }, - extractFontHeader: function Type1Parser_extractFontHeader(properties) { - var token; - while ((token = this.getToken()) !== null) { - if (token !== '/') { - continue; - } - token = this.getToken(); - switch (token) { - case 'FontMatrix': - var matrix = this.readNumberArray(); - properties.fontMatrix = matrix; - break; - case 'Encoding': - var encodingArg = this.getToken(); - var encoding; - if (!/^\d+$/.test(encodingArg)) { - encoding = getEncoding(encodingArg); - } else { - encoding = []; - var size = parseInt(encodingArg, 10) | 0; - this.getToken(); - for (var j = 0; j < size; j++) { - token = this.getToken(); - while (token !== 'dup' && token !== 'def') { - token = this.getToken(); - if (token === null) { - return; - } - } - if (token === 'def') { - break; - } - var index = this.readInt(); - this.getToken(); - var glyph = this.getToken(); - encoding[index] = glyph; - this.getToken(); - } - } - properties.builtInEncoding = encoding; - break; - case 'FontBBox': - var fontBBox = this.readNumberArray(); - properties.ascent = fontBBox[3]; - properties.descent = fontBBox[1]; - properties.ascentScaled = true; - break; - } - } - } - }; - return Type1Parser; - }(); - exports.Type1Parser = Type1Parser; - })); - (function (root, factory) { - factory(root.pdfjsCoreCMap = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreParser); - }(this, function (exports, sharedUtil, corePrimitives, coreStream, coreParser) { - var Util = sharedUtil.Util; - var assert = sharedUtil.assert; - var warn = sharedUtil.warn; - var error = sharedUtil.error; - var isInt = sharedUtil.isInt; - var isString = sharedUtil.isString; - var MissingDataException = sharedUtil.MissingDataException; - var isName = corePrimitives.isName; - var isCmd = corePrimitives.isCmd; - var isStream = corePrimitives.isStream; - var StringStream = coreStream.StringStream; - var Lexer = coreParser.Lexer; - var isEOF = coreParser.isEOF; - var BUILT_IN_CMAPS = [ - 'Adobe-GB1-UCS2', - 'Adobe-CNS1-UCS2', - 'Adobe-Japan1-UCS2', - 'Adobe-Korea1-UCS2', - '78-EUC-H', - '78-EUC-V', - '78-H', - '78-RKSJ-H', - '78-RKSJ-V', - '78-V', - '78ms-RKSJ-H', - '78ms-RKSJ-V', - '83pv-RKSJ-H', - '90ms-RKSJ-H', - '90ms-RKSJ-V', - '90msp-RKSJ-H', - '90msp-RKSJ-V', - '90pv-RKSJ-H', - '90pv-RKSJ-V', - 'Add-H', - 'Add-RKSJ-H', - 'Add-RKSJ-V', - 'Add-V', - 'Adobe-CNS1-0', - 'Adobe-CNS1-1', - 'Adobe-CNS1-2', - 'Adobe-CNS1-3', - 'Adobe-CNS1-4', - 'Adobe-CNS1-5', - 'Adobe-CNS1-6', - 'Adobe-GB1-0', - 'Adobe-GB1-1', - 'Adobe-GB1-2', - 'Adobe-GB1-3', - 'Adobe-GB1-4', - 'Adobe-GB1-5', - 'Adobe-Japan1-0', - 'Adobe-Japan1-1', - 'Adobe-Japan1-2', - 'Adobe-Japan1-3', - 'Adobe-Japan1-4', - 'Adobe-Japan1-5', - 'Adobe-Japan1-6', - 'Adobe-Korea1-0', - 'Adobe-Korea1-1', - 'Adobe-Korea1-2', - 'B5-H', - 'B5-V', - 'B5pc-H', - 'B5pc-V', - 'CNS-EUC-H', - 'CNS-EUC-V', - 'CNS1-H', - 'CNS1-V', - 'CNS2-H', - 'CNS2-V', - 'ETHK-B5-H', - 'ETHK-B5-V', - 'ETen-B5-H', - 'ETen-B5-V', - 'ETenms-B5-H', - 'ETenms-B5-V', - 'EUC-H', - 'EUC-V', - 'Ext-H', - 'Ext-RKSJ-H', - 'Ext-RKSJ-V', - 'Ext-V', - 'GB-EUC-H', - 'GB-EUC-V', - 'GB-H', - 'GB-V', - 'GBK-EUC-H', - 'GBK-EUC-V', - 'GBK2K-H', - 'GBK2K-V', - 'GBKp-EUC-H', - 'GBKp-EUC-V', - 'GBT-EUC-H', - 'GBT-EUC-V', - 'GBT-H', - 'GBT-V', - 'GBTpc-EUC-H', - 'GBTpc-EUC-V', - 'GBpc-EUC-H', - 'GBpc-EUC-V', - 'H', - 'HKdla-B5-H', - 'HKdla-B5-V', - 'HKdlb-B5-H', - 'HKdlb-B5-V', - 'HKgccs-B5-H', - 'HKgccs-B5-V', - 'HKm314-B5-H', - 'HKm314-B5-V', - 'HKm471-B5-H', - 'HKm471-B5-V', - 'HKscs-B5-H', - 'HKscs-B5-V', - 'Hankaku', - 'Hiragana', - 'KSC-EUC-H', - 'KSC-EUC-V', - 'KSC-H', - 'KSC-Johab-H', - 'KSC-Johab-V', - 'KSC-V', - 'KSCms-UHC-H', - 'KSCms-UHC-HW-H', - 'KSCms-UHC-HW-V', - 'KSCms-UHC-V', - 'KSCpc-EUC-H', - 'KSCpc-EUC-V', - 'Katakana', - 'NWP-H', - 'NWP-V', - 'RKSJ-H', - 'RKSJ-V', - 'Roman', - 'UniCNS-UCS2-H', - 'UniCNS-UCS2-V', - 'UniCNS-UTF16-H', - 'UniCNS-UTF16-V', - 'UniCNS-UTF32-H', - 'UniCNS-UTF32-V', - 'UniCNS-UTF8-H', - 'UniCNS-UTF8-V', - 'UniGB-UCS2-H', - 'UniGB-UCS2-V', - 'UniGB-UTF16-H', - 'UniGB-UTF16-V', - 'UniGB-UTF32-H', - 'UniGB-UTF32-V', - 'UniGB-UTF8-H', - 'UniGB-UTF8-V', - 'UniJIS-UCS2-H', - 'UniJIS-UCS2-HW-H', - 'UniJIS-UCS2-HW-V', - 'UniJIS-UCS2-V', - 'UniJIS-UTF16-H', - 'UniJIS-UTF16-V', - 'UniJIS-UTF32-H', - 'UniJIS-UTF32-V', - 'UniJIS-UTF8-H', - 'UniJIS-UTF8-V', - 'UniJIS2004-UTF16-H', - 'UniJIS2004-UTF16-V', - 'UniJIS2004-UTF32-H', - 'UniJIS2004-UTF32-V', - 'UniJIS2004-UTF8-H', - 'UniJIS2004-UTF8-V', - 'UniJISPro-UCS2-HW-V', - 'UniJISPro-UCS2-V', - 'UniJISPro-UTF8-V', - 'UniJISX0213-UTF32-H', - 'UniJISX0213-UTF32-V', - 'UniJISX02132004-UTF32-H', - 'UniJISX02132004-UTF32-V', - 'UniKS-UCS2-H', - 'UniKS-UCS2-V', - 'UniKS-UTF16-H', - 'UniKS-UTF16-V', - 'UniKS-UTF32-H', - 'UniKS-UTF32-V', - 'UniKS-UTF8-H', - 'UniKS-UTF8-V', - 'V', - 'WP-Symbol' - ]; - var CMap = function CMapClosure() { - function CMap(builtInCMap) { - this.codespaceRanges = [ - [], - [], - [], - [] - ]; - this.numCodespaceRanges = 0; - this._map = []; - this.name = ''; - this.vertical = false; - this.useCMap = null; - this.builtInCMap = builtInCMap; - } - CMap.prototype = { - addCodespaceRange: function (n, low, high) { - this.codespaceRanges[n - 1].push(low, high); - this.numCodespaceRanges++; - }, - mapCidRange: function (low, high, dstLow) { - while (low <= high) { - this._map[low++] = dstLow++; - } - }, - mapBfRange: function (low, high, dstLow) { - var lastByte = dstLow.length - 1; - while (low <= high) { - this._map[low++] = dstLow; - dstLow = dstLow.substr(0, lastByte) + String.fromCharCode(dstLow.charCodeAt(lastByte) + 1); - } - }, - mapBfRangeToArray: function (low, high, array) { - var i = 0, ii = array.length; - while (low <= high && i < ii) { - this._map[low] = array[i++]; - ++low; - } - }, - mapOne: function (src, dst) { - this._map[src] = dst; - }, - lookup: function (code) { - return this._map[code]; - }, - contains: function (code) { - return this._map[code] !== undefined; - }, - forEach: function (callback) { - var map = this._map; - var length = map.length; - var i; - if (length <= 0x10000) { - for (i = 0; i < length; i++) { - if (map[i] !== undefined) { - callback(i, map[i]); - } - } - } else { - for (i in this._map) { - callback(i, map[i]); - } - } - }, - charCodeOf: function (value) { - return this._map.indexOf(value); - }, - getMap: function () { - return this._map; - }, - readCharCode: function (str, offset, out) { - var c = 0; - var codespaceRanges = this.codespaceRanges; - var codespaceRangesLen = this.codespaceRanges.length; - for (var n = 0; n < codespaceRangesLen; n++) { - c = (c << 8 | str.charCodeAt(offset + n)) >>> 0; - var codespaceRange = codespaceRanges[n]; - for (var k = 0, kk = codespaceRange.length; k < kk;) { - var low = codespaceRange[k++]; - var high = codespaceRange[k++]; - if (c >= low && c <= high) { - out.charcode = c; - out.length = n + 1; - return; - } - } - } - out.charcode = 0; - out.length = 1; - }, - get length() { - return this._map.length; - }, - get isIdentityCMap() { - if (!(this.name === 'Identity-H' || this.name === 'Identity-V')) { - return false; - } - if (this._map.length !== 0x10000) { - return false; - } - for (var i = 0; i < 0x10000; i++) { - if (this._map[i] !== i) { - return false; - } - } - return true; - } - }; - return CMap; - }(); - var IdentityCMap = function IdentityCMapClosure() { - function IdentityCMap(vertical, n) { - CMap.call(this); - this.vertical = vertical; - this.addCodespaceRange(n, 0, 0xffff); - } - Util.inherit(IdentityCMap, CMap, {}); - IdentityCMap.prototype = { - addCodespaceRange: CMap.prototype.addCodespaceRange, - mapCidRange: function (low, high, dstLow) { - error('should not call mapCidRange'); - }, - mapBfRange: function (low, high, dstLow) { - error('should not call mapBfRange'); - }, - mapBfRangeToArray: function (low, high, array) { - error('should not call mapBfRangeToArray'); - }, - mapOne: function (src, dst) { - error('should not call mapCidOne'); - }, - lookup: function (code) { - return isInt(code) && code <= 0xffff ? code : undefined; - }, - contains: function (code) { - return isInt(code) && code <= 0xffff; - }, - forEach: function (callback) { - for (var i = 0; i <= 0xffff; i++) { - callback(i, i); - } - }, - charCodeOf: function (value) { - return isInt(value) && value <= 0xffff ? value : -1; - }, - getMap: function () { - var map = new Array(0x10000); - for (var i = 0; i <= 0xffff; i++) { - map[i] = i; - } - return map; - }, - readCharCode: CMap.prototype.readCharCode, - get length() { - return 0x10000; - }, - get isIdentityCMap() { - error('should not access .isIdentityCMap'); - } - }; - return IdentityCMap; - }(); - var BinaryCMapReader = function BinaryCMapReaderClosure() { - function fetchBinaryData(url) { - return new Promise(function (resolve, reject) { - var request = new XMLHttpRequest(); - request.open('GET', url, true); - request.responseType = 'arraybuffer'; - request.onreadystatechange = function () { - if (request.readyState === XMLHttpRequest.DONE) { - if (!request.response || request.status !== 200 && request.status !== 0) { - reject(new Error('Unable to get binary cMap at: ' + url)); - } else { - resolve(new Uint8Array(request.response)); - } - } - }; - request.send(null); - }); - } - function hexToInt(a, size) { - var n = 0; - for (var i = 0; i <= size; i++) { - n = n << 8 | a[i]; - } - return n >>> 0; - } - function hexToStr(a, size) { - if (size === 1) { - return String.fromCharCode(a[0], a[1]); - } - if (size === 3) { - return String.fromCharCode(a[0], a[1], a[2], a[3]); - } - return String.fromCharCode.apply(null, a.subarray(0, size + 1)); - } - function addHex(a, b, size) { - var c = 0; - for (var i = size; i >= 0; i--) { - c += a[i] + b[i]; - a[i] = c & 255; - c >>= 8; - } - } - function incHex(a, size) { - var c = 1; - for (var i = size; i >= 0 && c > 0; i--) { - c += a[i]; - a[i] = c & 255; - c >>= 8; - } - } - var MAX_NUM_SIZE = 16; - var MAX_ENCODED_NUM_SIZE = 19; - function BinaryCMapStream(data) { - this.buffer = data; - this.pos = 0; - this.end = data.length; - this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE); - } - BinaryCMapStream.prototype = { - readByte: function () { - if (this.pos >= this.end) { - return -1; - } - return this.buffer[this.pos++]; - }, - readNumber: function () { - var n = 0; - var last; - do { - var b = this.readByte(); - if (b < 0) { - error('unexpected EOF in bcmap'); - } - last = !(b & 0x80); - n = n << 7 | b & 0x7F; - } while (!last); - return n; - }, - readSigned: function () { - var n = this.readNumber(); - return n & 1 ? ~(n >>> 1) : n >>> 1; - }, - readHex: function (num, size) { - num.set(this.buffer.subarray(this.pos, this.pos + size + 1)); - this.pos += size + 1; - }, - readHexNumber: function (num, size) { - var last; - var stack = this.tmpBuf, sp = 0; - do { - var b = this.readByte(); - if (b < 0) { - error('unexpected EOF in bcmap'); - } - last = !(b & 0x80); - stack[sp++] = b & 0x7F; - } while (!last); - var i = size, buffer = 0, bufferSize = 0; - while (i >= 0) { - while (bufferSize < 8 && stack.length > 0) { - buffer = stack[--sp] << bufferSize | buffer; - bufferSize += 7; - } - num[i] = buffer & 255; - i--; - buffer >>= 8; - bufferSize -= 8; - } - }, - readHexSigned: function (num, size) { - this.readHexNumber(num, size); - var sign = num[size] & 1 ? 255 : 0; - var c = 0; - for (var i = 0; i <= size; i++) { - c = (c & 1) << 8 | num[i]; - num[i] = c >> 1 ^ sign; - } - }, - readString: function () { - var len = this.readNumber(); - var s = ''; - for (var i = 0; i < len; i++) { - s += String.fromCharCode(this.readNumber()); - } - return s; - } - }; - function processBinaryCMap(url, cMap, extend) { - return fetchBinaryData(url).then(function (data) { - var stream = new BinaryCMapStream(data); - var header = stream.readByte(); - cMap.vertical = !!(header & 1); - var useCMap = null; - var start = new Uint8Array(MAX_NUM_SIZE); - var end = new Uint8Array(MAX_NUM_SIZE); - var char = new Uint8Array(MAX_NUM_SIZE); - var charCode = new Uint8Array(MAX_NUM_SIZE); - var tmp = new Uint8Array(MAX_NUM_SIZE); - var code; - var b; - while ((b = stream.readByte()) >= 0) { - var type = b >> 5; - if (type === 7) { - switch (b & 0x1F) { - case 0: - stream.readString(); - break; - case 1: - useCMap = stream.readString(); - break; - } - continue; - } - var sequence = !!(b & 0x10); - var dataSize = b & 15; - assert(dataSize + 1 <= MAX_NUM_SIZE); - var ucs2DataSize = 1; - var subitemsCount = stream.readNumber(); - var i; - switch (type) { - case 0: - stream.readHex(start, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); - for (i = 1; i < subitemsCount; i++) { - incHex(end, dataSize); - stream.readHexNumber(start, dataSize); - addHex(start, end, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); - } - break; - case 1: - stream.readHex(start, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - code = stream.readNumber(); - for (i = 1; i < subitemsCount; i++) { - incHex(end, dataSize); - stream.readHexNumber(start, dataSize); - addHex(start, end, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - code = stream.readNumber(); - } - break; - case 2: - stream.readHex(char, dataSize); - code = stream.readNumber(); - cMap.mapOne(hexToInt(char, dataSize), code); - for (i = 1; i < subitemsCount; i++) { - incHex(char, dataSize); - if (!sequence) { - stream.readHexNumber(tmp, dataSize); - addHex(char, tmp, dataSize); - } - code = stream.readSigned() + (code + 1); - cMap.mapOne(hexToInt(char, dataSize), code); - } - break; - case 3: - stream.readHex(start, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - code = stream.readNumber(); - cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); - for (i = 1; i < subitemsCount; i++) { - incHex(end, dataSize); - if (!sequence) { - stream.readHexNumber(start, dataSize); - addHex(start, end, dataSize); - } else { - start.set(end); - } - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - code = stream.readNumber(); - cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); - } - break; - case 4: - stream.readHex(char, ucs2DataSize); - stream.readHex(charCode, dataSize); - cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); - for (i = 1; i < subitemsCount; i++) { - incHex(char, ucs2DataSize); - if (!sequence) { - stream.readHexNumber(tmp, ucs2DataSize); - addHex(char, tmp, ucs2DataSize); - } - incHex(charCode, dataSize); - stream.readHexSigned(tmp, dataSize); - addHex(charCode, tmp, dataSize); - cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); - } - break; - case 5: - stream.readHex(start, ucs2DataSize); - stream.readHexNumber(end, ucs2DataSize); - addHex(end, start, ucs2DataSize); - stream.readHex(charCode, dataSize); - cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); - for (i = 1; i < subitemsCount; i++) { - incHex(end, ucs2DataSize); - if (!sequence) { - stream.readHexNumber(start, ucs2DataSize); - addHex(start, end, ucs2DataSize); - } else { - start.set(end); - } - stream.readHexNumber(end, ucs2DataSize); - addHex(end, start, ucs2DataSize); - stream.readHex(charCode, dataSize); - cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); - } - break; - default: - error('Unknown type: ' + type); - break; - } - } - if (useCMap) { - return extend(useCMap); - } - return cMap; - }); - } - function BinaryCMapReader() { - } - BinaryCMapReader.prototype = { read: processBinaryCMap }; - return BinaryCMapReader; - }(); - var CMapFactory = function CMapFactoryClosure() { - function strToInt(str) { - var a = 0; - for (var i = 0; i < str.length; i++) { - a = a << 8 | str.charCodeAt(i); - } - return a >>> 0; - } - function expectString(obj) { - if (!isString(obj)) { - error('Malformed CMap: expected string.'); - } - } - function expectInt(obj) { - if (!isInt(obj)) { - error('Malformed CMap: expected int.'); - } - } - function parseBfChar(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if (isEOF(obj)) { - break; - } - if (isCmd(obj, 'endbfchar')) { - return; - } - expectString(obj); - var src = strToInt(obj); - obj = lexer.getObj(); - expectString(obj); - var dst = obj; - cMap.mapOne(src, dst); - } - } - function parseBfRange(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if (isEOF(obj)) { - break; - } - if (isCmd(obj, 'endbfrange')) { - return; - } - expectString(obj); - var low = strToInt(obj); - obj = lexer.getObj(); - expectString(obj); - var high = strToInt(obj); - obj = lexer.getObj(); - if (isInt(obj) || isString(obj)) { - var dstLow = isInt(obj) ? String.fromCharCode(obj) : obj; - cMap.mapBfRange(low, high, dstLow); - } else if (isCmd(obj, '[')) { - obj = lexer.getObj(); - var array = []; - while (!isCmd(obj, ']') && !isEOF(obj)) { - array.push(obj); - obj = lexer.getObj(); - } - cMap.mapBfRangeToArray(low, high, array); - } else { - break; - } - } - error('Invalid bf range.'); - } - function parseCidChar(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if (isEOF(obj)) { - break; - } - if (isCmd(obj, 'endcidchar')) { - return; - } - expectString(obj); - var src = strToInt(obj); - obj = lexer.getObj(); - expectInt(obj); - var dst = obj; - cMap.mapOne(src, dst); - } - } - function parseCidRange(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if (isEOF(obj)) { - break; - } - if (isCmd(obj, 'endcidrange')) { - return; - } - expectString(obj); - var low = strToInt(obj); - obj = lexer.getObj(); - expectString(obj); - var high = strToInt(obj); - obj = lexer.getObj(); - expectInt(obj); - var dstLow = obj; - cMap.mapCidRange(low, high, dstLow); - } - } - function parseCodespaceRange(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if (isEOF(obj)) { - break; - } - if (isCmd(obj, 'endcodespacerange')) { - return; - } - if (!isString(obj)) { - break; - } - var low = strToInt(obj); - obj = lexer.getObj(); - if (!isString(obj)) { - break; - } - var high = strToInt(obj); - cMap.addCodespaceRange(obj.length, low, high); - } - error('Invalid codespace range.'); - } - function parseWMode(cMap, lexer) { - var obj = lexer.getObj(); - if (isInt(obj)) { - cMap.vertical = !!obj; - } - } - function parseCMapName(cMap, lexer) { - var obj = lexer.getObj(); - if (isName(obj) && isString(obj.name)) { - cMap.name = obj.name; - } - } - function parseCMap(cMap, lexer, builtInCMapParams, useCMap) { - var previous; - var embededUseCMap; - objLoop: - while (true) { - try { - var obj = lexer.getObj(); - if (isEOF(obj)) { - break; - } else if (isName(obj)) { - if (obj.name === 'WMode') { - parseWMode(cMap, lexer); - } else if (obj.name === 'CMapName') { - parseCMapName(cMap, lexer); - } - previous = obj; - } else if (isCmd(obj)) { - switch (obj.cmd) { - case 'endcmap': - break objLoop; - case 'usecmap': - if (isName(previous)) { - embededUseCMap = previous.name; - } - break; - case 'begincodespacerange': - parseCodespaceRange(cMap, lexer); - break; - case 'beginbfchar': - parseBfChar(cMap, lexer); - break; - case 'begincidchar': - parseCidChar(cMap, lexer); - break; - case 'beginbfrange': - parseBfRange(cMap, lexer); - break; - case 'begincidrange': - parseCidRange(cMap, lexer); - break; - } - } - } catch (ex) { - if (ex instanceof MissingDataException) { - throw ex; - } - warn('Invalid cMap data: ' + ex); - continue; - } - } - if (!useCMap && embededUseCMap) { - useCMap = embededUseCMap; - } - if (useCMap) { - return extendCMap(cMap, builtInCMapParams, useCMap); - } - return Promise.resolve(cMap); - } - function extendCMap(cMap, builtInCMapParams, useCMap) { - return createBuiltInCMap(useCMap, builtInCMapParams).then(function (newCMap) { - cMap.useCMap = newCMap; - if (cMap.numCodespaceRanges === 0) { - var useCodespaceRanges = cMap.useCMap.codespaceRanges; - for (var i = 0; i < useCodespaceRanges.length; i++) { - cMap.codespaceRanges[i] = useCodespaceRanges[i].slice(); - } - cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges; - } - cMap.useCMap.forEach(function (key, value) { - if (!cMap.contains(key)) { - cMap.mapOne(key, cMap.useCMap.lookup(key)); - } - }); - return cMap; - }); - } - function parseBinaryCMap(name, builtInCMapParams) { - var url = builtInCMapParams.url + name + '.bcmap'; - var cMap = new CMap(true); - return new BinaryCMapReader().read(url, cMap, function (useCMap) { - return extendCMap(cMap, builtInCMapParams, useCMap); - }); - } - function createBuiltInCMap(name, builtInCMapParams) { - if (name === 'Identity-H') { - return Promise.resolve(new IdentityCMap(false, 2)); - } else if (name === 'Identity-V') { - return Promise.resolve(new IdentityCMap(true, 2)); - } - if (BUILT_IN_CMAPS.indexOf(name) === -1) { - return Promise.reject(new Error('Unknown cMap name: ' + name)); - } - assert(builtInCMapParams, 'built-in cMap parameters are not provided'); - if (builtInCMapParams.packed) { - return parseBinaryCMap(name, builtInCMapParams); - } - return new Promise(function (resolve, reject) { - var url = builtInCMapParams.url + name; - var request = new XMLHttpRequest(); - request.onreadystatechange = function () { - if (request.readyState === XMLHttpRequest.DONE) { - if (request.status === 200 || request.status === 0) { - var cMap = new CMap(true); - var lexer = new Lexer(new StringStream(request.responseText)); - parseCMap(cMap, lexer, builtInCMapParams, null).then(function (parsedCMap) { - resolve(parsedCMap); - }); - } else { - reject(new Error('Unable to get cMap at: ' + url)); - } - } - }; - request.open('GET', url, true); - request.send(null); - }); - } - return { - create: function (encoding, builtInCMapParams, useCMap) { - if (isName(encoding)) { - return createBuiltInCMap(encoding.name, builtInCMapParams); - } else if (isStream(encoding)) { - var cMap = new CMap(); - var lexer = new Lexer(encoding); - return parseCMap(cMap, lexer, builtInCMapParams, useCMap).then(function (parsedCMap) { - if (parsedCMap.isIdentityCMap) { - return createBuiltInCMap(parsedCMap.name, builtInCMapParams); - } - return parsedCMap; - }); - } - return Promise.reject(new Error('Encoding required.')); - } - }; - }(); - exports.CMap = CMap; - exports.CMapFactory = CMapFactory; - exports.IdentityCMap = IdentityCMap; - })); - (function (root, factory) { - factory(root.pdfjsCoreFonts = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreGlyphList, root.pdfjsCoreFontRenderer, root.pdfjsCoreEncodings, root.pdfjsCoreStandardFonts, root.pdfjsCoreUnicode, root.pdfjsCoreType1Parser, root.pdfjsCoreCFFParser); - }(this, function (exports, sharedUtil, corePrimitives, coreStream, coreGlyphList, coreFontRenderer, coreEncodings, coreStandardFonts, coreUnicode, coreType1Parser, coreCFFParser) { - var FONT_IDENTITY_MATRIX = sharedUtil.FONT_IDENTITY_MATRIX; - var FontType = sharedUtil.FontType; - var assert = sharedUtil.assert; - var bytesToString = sharedUtil.bytesToString; - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var isInt = sharedUtil.isInt; - var isNum = sharedUtil.isNum; - var readUint32 = sharedUtil.readUint32; - var shadow = sharedUtil.shadow; - var string32 = sharedUtil.string32; - var warn = sharedUtil.warn; - var MissingDataException = sharedUtil.MissingDataException; - var isSpace = sharedUtil.isSpace; - var Stream = coreStream.Stream; - var getGlyphsUnicode = coreGlyphList.getGlyphsUnicode; - var getDingbatsGlyphsUnicode = coreGlyphList.getDingbatsGlyphsUnicode; - var FontRendererFactory = coreFontRenderer.FontRendererFactory; - var StandardEncoding = coreEncodings.StandardEncoding; - var MacRomanEncoding = coreEncodings.MacRomanEncoding; - var SymbolSetEncoding = coreEncodings.SymbolSetEncoding; - var ZapfDingbatsEncoding = coreEncodings.ZapfDingbatsEncoding; - var getEncoding = coreEncodings.getEncoding; - var getStdFontMap = coreStandardFonts.getStdFontMap; - var getNonStdFontMap = coreStandardFonts.getNonStdFontMap; - var getGlyphMapForStandardFonts = coreStandardFonts.getGlyphMapForStandardFonts; - var getSupplementalGlyphMapForArialBlack = coreStandardFonts.getSupplementalGlyphMapForArialBlack; - var getUnicodeRangeFor = coreUnicode.getUnicodeRangeFor; - var mapSpecialUnicodeValues = coreUnicode.mapSpecialUnicodeValues; - var getUnicodeForGlyph = coreUnicode.getUnicodeForGlyph; - var Type1Parser = coreType1Parser.Type1Parser; - var CFFStandardStrings = coreCFFParser.CFFStandardStrings; - var CFFParser = coreCFFParser.CFFParser; - var CFFCompiler = coreCFFParser.CFFCompiler; - var CFF = coreCFFParser.CFF; - var CFFHeader = coreCFFParser.CFFHeader; - var CFFTopDict = coreCFFParser.CFFTopDict; - var CFFPrivateDict = coreCFFParser.CFFPrivateDict; - var CFFStrings = coreCFFParser.CFFStrings; - var CFFIndex = coreCFFParser.CFFIndex; - var CFFCharset = coreCFFParser.CFFCharset; - var PRIVATE_USE_OFFSET_START = 0xE000; - var PRIVATE_USE_OFFSET_END = 0xF8FF; - var SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = false; - var PDF_GLYPH_SPACE_UNITS = 1000; - var SEAC_ANALYSIS_ENABLED = false; - var FontFlags = { - FixedPitch: 1, - Serif: 2, - Symbolic: 4, - Script: 8, - Nonsymbolic: 32, - Italic: 64, - AllCap: 65536, - SmallCap: 131072, - ForceBold: 262144 - }; - var MacStandardGlyphOrdering = [ - '.notdef', - '.null', - 'nonmarkingreturn', - 'space', - 'exclam', - 'quotedbl', - 'numbersign', - 'dollar', - 'percent', - 'ampersand', - 'quotesingle', - 'parenleft', - 'parenright', - 'asterisk', - 'plus', - 'comma', - 'hyphen', - 'period', - 'slash', - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'colon', - 'semicolon', - 'less', - 'equal', - 'greater', - 'question', - 'at', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - 'bracketleft', - 'backslash', - 'bracketright', - 'asciicircum', - 'underscore', - 'grave', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - 'braceleft', - 'bar', - 'braceright', - 'asciitilde', - 'Adieresis', - 'Aring', - 'Ccedilla', - 'Eacute', - 'Ntilde', - 'Odieresis', - 'Udieresis', - 'aacute', - 'agrave', - 'acircumflex', - 'adieresis', - 'atilde', - 'aring', - 'ccedilla', - 'eacute', - 'egrave', - 'ecircumflex', - 'edieresis', - 'iacute', - 'igrave', - 'icircumflex', - 'idieresis', - 'ntilde', - 'oacute', - 'ograve', - 'ocircumflex', - 'odieresis', - 'otilde', - 'uacute', - 'ugrave', - 'ucircumflex', - 'udieresis', - 'dagger', - 'degree', - 'cent', - 'sterling', - 'section', - 'bullet', - 'paragraph', - 'germandbls', - 'registered', - 'copyright', - 'trademark', - 'acute', - 'dieresis', - 'notequal', - 'AE', - 'Oslash', - 'infinity', - 'plusminus', - 'lessequal', - 'greaterequal', - 'yen', - 'mu', - 'partialdiff', - 'summation', - 'product', - 'pi', - 'integral', - 'ordfeminine', - 'ordmasculine', - 'Omega', - 'ae', - 'oslash', - 'questiondown', - 'exclamdown', - 'logicalnot', - 'radical', - 'florin', - 'approxequal', - 'Delta', - 'guillemotleft', - 'guillemotright', - 'ellipsis', - 'nonbreakingspace', - 'Agrave', - 'Atilde', - 'Otilde', - 'OE', - 'oe', - 'endash', - 'emdash', - 'quotedblleft', - 'quotedblright', - 'quoteleft', - 'quoteright', - 'divide', - 'lozenge', - 'ydieresis', - 'Ydieresis', - 'fraction', - 'currency', - 'guilsinglleft', - 'guilsinglright', - 'fi', - 'fl', - 'daggerdbl', - 'periodcentered', - 'quotesinglbase', - 'quotedblbase', - 'perthousand', - 'Acircumflex', - 'Ecircumflex', - 'Aacute', - 'Edieresis', - 'Egrave', - 'Iacute', - 'Icircumflex', - 'Idieresis', - 'Igrave', - 'Oacute', - 'Ocircumflex', - 'apple', - 'Ograve', - 'Uacute', - 'Ucircumflex', - 'Ugrave', - 'dotlessi', - 'circumflex', - 'tilde', - 'macron', - 'breve', - 'dotaccent', - 'ring', - 'cedilla', - 'hungarumlaut', - 'ogonek', - 'caron', - 'Lslash', - 'lslash', - 'Scaron', - 'scaron', - 'Zcaron', - 'zcaron', - 'brokenbar', - 'Eth', - 'eth', - 'Yacute', - 'yacute', - 'Thorn', - 'thorn', - 'minus', - 'multiply', - 'onesuperior', - 'twosuperior', - 'threesuperior', - 'onehalf', - 'onequarter', - 'threequarters', - 'franc', - 'Gbreve', - 'gbreve', - 'Idotaccent', - 'Scedilla', - 'scedilla', - 'Cacute', - 'cacute', - 'Ccaron', - 'ccaron', - 'dcroat' - ]; - function adjustWidths(properties) { - if (!properties.fontMatrix) { - return; - } - if (properties.fontMatrix[0] === FONT_IDENTITY_MATRIX[0]) { - return; - } - var scale = 0.001 / properties.fontMatrix[0]; - var glyphsWidths = properties.widths; - for (var glyph in glyphsWidths) { - glyphsWidths[glyph] *= scale; - } - properties.defaultWidth *= scale; - } - function adjustToUnicode(properties, builtInEncoding) { - if (properties.hasIncludedToUnicodeMap) { - return; - } - if (properties.hasEncoding) { - return; - } - if (builtInEncoding === properties.defaultEncoding) { - return; - } - if (properties.toUnicode instanceof IdentityToUnicodeMap) { - return; - } - var toUnicode = [], glyphsUnicodeMap = getGlyphsUnicode(); - for (var charCode in builtInEncoding) { - var glyphName = builtInEncoding[charCode]; - var unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); - if (unicode !== -1) { - toUnicode[charCode] = String.fromCharCode(unicode); - } - } - properties.toUnicode.amend(toUnicode); - } - function getFontType(type, subtype) { - switch (type) { - case 'Type1': - return subtype === 'Type1C' ? FontType.TYPE1C : FontType.TYPE1; - case 'CIDFontType0': - return subtype === 'CIDFontType0C' ? FontType.CIDFONTTYPE0C : FontType.CIDFONTTYPE0; - case 'OpenType': - return FontType.OPENTYPE; - case 'TrueType': - return FontType.TRUETYPE; - case 'CIDFontType2': - return FontType.CIDFONTTYPE2; - case 'MMType1': - return FontType.MMTYPE1; - case 'Type0': - return FontType.TYPE0; - default: - return FontType.UNKNOWN; - } - } - function recoverGlyphName(name, glyphsUnicodeMap) { - if (glyphsUnicodeMap[name] !== undefined) { - return name; - } - var unicode = getUnicodeForGlyph(name, glyphsUnicodeMap); - if (unicode !== -1) { - for (var key in glyphsUnicodeMap) { - if (glyphsUnicodeMap[key] === unicode) { - return key; - } - } - } - info('Unable to recover a standard glyph name for: ' + name); - return name; - } - var Glyph = function GlyphClosure() { - function Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { - this.fontChar = fontChar; - this.unicode = unicode; - this.accent = accent; - this.width = width; - this.vmetric = vmetric; - this.operatorListId = operatorListId; - this.isSpace = isSpace; - this.isInFont = isInFont; - } - Glyph.prototype.matchesForCache = function (fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { - return this.fontChar === fontChar && this.unicode === unicode && this.accent === accent && this.width === width && this.vmetric === vmetric && this.operatorListId === operatorListId && this.isSpace === isSpace && this.isInFont === isInFont; - }; - return Glyph; - }(); - var ToUnicodeMap = function ToUnicodeMapClosure() { - function ToUnicodeMap(cmap) { - this._map = cmap; - } - ToUnicodeMap.prototype = { - get length() { - return this._map.length; - }, - forEach: function (callback) { - for (var charCode in this._map) { - callback(charCode, this._map[charCode].charCodeAt(0)); - } - }, - has: function (i) { - return this._map[i] !== undefined; - }, - get: function (i) { - return this._map[i]; - }, - charCodeOf: function (v) { - return this._map.indexOf(v); - }, - amend: function (map) { - for (var charCode in map) { - this._map[charCode] = map[charCode]; - } - } - }; - return ToUnicodeMap; - }(); - var IdentityToUnicodeMap = function IdentityToUnicodeMapClosure() { - function IdentityToUnicodeMap(firstChar, lastChar) { - this.firstChar = firstChar; - this.lastChar = lastChar; - } - IdentityToUnicodeMap.prototype = { - get length() { - return this.lastChar + 1 - this.firstChar; - }, - forEach: function (callback) { - for (var i = this.firstChar, ii = this.lastChar; i <= ii; i++) { - callback(i, i); - } - }, - has: function (i) { - return this.firstChar <= i && i <= this.lastChar; - }, - get: function (i) { - if (this.firstChar <= i && i <= this.lastChar) { - return String.fromCharCode(i); - } - return undefined; - }, - charCodeOf: function (v) { - return isInt(v) && v >= this.firstChar && v <= this.lastChar ? v : -1; - }, - amend: function (map) { - error('Should not call amend()'); - } - }; - return IdentityToUnicodeMap; - }(); - var OpenTypeFileBuilder = function OpenTypeFileBuilderClosure() { - function writeInt16(dest, offset, num) { - dest[offset] = num >> 8 & 0xFF; - dest[offset + 1] = num & 0xFF; - } - function writeInt32(dest, offset, num) { - dest[offset] = num >> 24 & 0xFF; - dest[offset + 1] = num >> 16 & 0xFF; - dest[offset + 2] = num >> 8 & 0xFF; - dest[offset + 3] = num & 0xFF; - } - function writeData(dest, offset, data) { - var i, ii; - if (data instanceof Uint8Array) { - dest.set(data, offset); - } else if (typeof data === 'string') { - for (i = 0, ii = data.length; i < ii; i++) { - dest[offset++] = data.charCodeAt(i) & 0xFF; - } - } else { - for (i = 0, ii = data.length; i < ii; i++) { - dest[offset++] = data[i] & 0xFF; - } - } - } - function OpenTypeFileBuilder(sfnt) { - this.sfnt = sfnt; - this.tables = Object.create(null); - } - OpenTypeFileBuilder.getSearchParams = function OpenTypeFileBuilder_getSearchParams(entriesCount, entrySize) { - var maxPower2 = 1, log2 = 0; - while ((maxPower2 ^ entriesCount) > maxPower2) { - maxPower2 <<= 1; - log2++; - } - var searchRange = maxPower2 * entrySize; - return { - range: searchRange, - entry: log2, - rangeShift: entrySize * entriesCount - searchRange - }; - }; - var OTF_HEADER_SIZE = 12; - var OTF_TABLE_ENTRY_SIZE = 16; - OpenTypeFileBuilder.prototype = { - toArray: function OpenTypeFileBuilder_toArray() { - var sfnt = this.sfnt; - var tables = this.tables; - var tablesNames = Object.keys(tables); - tablesNames.sort(); - var numTables = tablesNames.length; - var i, j, jj, table, tableName; - var offset = OTF_HEADER_SIZE + numTables * OTF_TABLE_ENTRY_SIZE; - var tableOffsets = [offset]; - for (i = 0; i < numTables; i++) { - table = tables[tablesNames[i]]; - var paddedLength = (table.length + 3 & ~3) >>> 0; - offset += paddedLength; - tableOffsets.push(offset); - } - var file = new Uint8Array(offset); - for (i = 0; i < numTables; i++) { - table = tables[tablesNames[i]]; - writeData(file, tableOffsets[i], table); - } - if (sfnt === 'true') { - sfnt = string32(0x00010000); - } - file[0] = sfnt.charCodeAt(0) & 0xFF; - file[1] = sfnt.charCodeAt(1) & 0xFF; - file[2] = sfnt.charCodeAt(2) & 0xFF; - file[3] = sfnt.charCodeAt(3) & 0xFF; - writeInt16(file, 4, numTables); - var searchParams = OpenTypeFileBuilder.getSearchParams(numTables, 16); - writeInt16(file, 6, searchParams.range); - writeInt16(file, 8, searchParams.entry); - writeInt16(file, 10, searchParams.rangeShift); - offset = OTF_HEADER_SIZE; - for (i = 0; i < numTables; i++) { - tableName = tablesNames[i]; - file[offset] = tableName.charCodeAt(0) & 0xFF; - file[offset + 1] = tableName.charCodeAt(1) & 0xFF; - file[offset + 2] = tableName.charCodeAt(2) & 0xFF; - file[offset + 3] = tableName.charCodeAt(3) & 0xFF; - var checksum = 0; - for (j = tableOffsets[i], jj = tableOffsets[i + 1]; j < jj; j += 4) { - var quad = readUint32(file, j); - checksum = checksum + quad >>> 0; - } - writeInt32(file, offset + 4, checksum); - writeInt32(file, offset + 8, tableOffsets[i]); - writeInt32(file, offset + 12, tables[tableName].length); - offset += OTF_TABLE_ENTRY_SIZE; - } - return file; - }, - addTable: function OpenTypeFileBuilder_addTable(tag, data) { - if (tag in this.tables) { - throw new Error('Table ' + tag + ' already exists'); - } - this.tables[tag] = data; - } - }; - return OpenTypeFileBuilder; - }(); - var ProblematicCharRanges = new Int32Array([ - 0x0000, - 0x0020, - 0x007F, - 0x00A1, - 0x00AD, - 0x00AE, - 0x0600, - 0x0780, - 0x08A0, - 0x10A0, - 0x1780, - 0x1800, - 0x1C00, - 0x1C50, - 0x2000, - 0x2010, - 0x2011, - 0x2012, - 0x2028, - 0x2030, - 0x205F, - 0x2070, - 0x25CC, - 0x25CD, - 0x3000, - 0x3001, - 0xAA60, - 0xAA80, - 0xFFF0, - 0x10000 - ]); - var Font = function FontClosure() { - function Font(name, file, properties) { - var charCode, glyphName, unicode; - this.name = name; - this.loadedName = properties.loadedName; - this.isType3Font = properties.isType3Font; - this.sizes = []; - this.missingFile = false; - this.glyphCache = Object.create(null); - var names = name.split('+'); - names = names.length > 1 ? names[1] : names[0]; - names = names.split(/[-,_]/g)[0]; - this.isSerifFont = !!(properties.flags & FontFlags.Serif); - this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); - this.isMonospace = !!(properties.flags & FontFlags.FixedPitch); - var type = properties.type; - var subtype = properties.subtype; - this.type = type; - this.fallbackName = this.isMonospace ? 'monospace' : this.isSerifFont ? 'serif' : 'sans-serif'; - this.differences = properties.differences; - this.widths = properties.widths; - this.defaultWidth = properties.defaultWidth; - this.composite = properties.composite; - this.wideChars = properties.wideChars; - this.cMap = properties.cMap; - this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS; - this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS; - this.fontMatrix = properties.fontMatrix; - this.bbox = properties.bbox; - this.toUnicode = properties.toUnicode; - this.toFontChar = []; - if (properties.type === 'Type3') { - for (charCode = 0; charCode < 256; charCode++) { - this.toFontChar[charCode] = this.differences[charCode] || properties.defaultEncoding[charCode]; - } - this.fontType = FontType.TYPE3; - return; - } - this.cidEncoding = properties.cidEncoding; - this.vertical = properties.vertical; - if (this.vertical) { - this.vmetrics = properties.vmetrics; - this.defaultVMetrics = properties.defaultVMetrics; - } - var glyphsUnicodeMap; - if (!file || file.isEmpty) { - if (file) { - warn('Font file is empty in "' + name + '" (' + this.loadedName + ')'); - } - this.missingFile = true; - var fontName = name.replace(/[,_]/g, '-'); - var stdFontMap = getStdFontMap(), nonStdFontMap = getNonStdFontMap(); - var isStandardFont = !!stdFontMap[fontName] || !!(nonStdFontMap[fontName] && stdFontMap[nonStdFontMap[fontName]]); - fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName; - this.bold = fontName.search(/bold/gi) !== -1; - this.italic = fontName.search(/oblique/gi) !== -1 || fontName.search(/italic/gi) !== -1; - this.black = name.search(/Black/g) !== -1; - this.remeasure = Object.keys(this.widths).length > 0; - if (isStandardFont && type === 'CIDFontType2' && properties.cidEncoding.indexOf('Identity-') === 0) { - var GlyphMapForStandardFonts = getGlyphMapForStandardFonts(); - var map = []; - for (charCode in GlyphMapForStandardFonts) { - map[+charCode] = GlyphMapForStandardFonts[charCode]; - } - if (/Arial-?Black/i.test(name)) { - var SupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack(); - for (charCode in SupplementalGlyphMapForArialBlack) { - map[+charCode] = SupplementalGlyphMapForArialBlack[charCode]; - } - } - var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap; - if (!isIdentityUnicode) { - this.toUnicode.forEach(function (charCode, unicodeCharCode) { - map[+charCode] = unicodeCharCode; - }); - } - this.toFontChar = map; - this.toUnicode = new ToUnicodeMap(map); - } else if (/Symbol/i.test(fontName)) { - this.toFontChar = buildToFontChar(SymbolSetEncoding, getGlyphsUnicode(), properties.differences); - } else if (/Dingbats/i.test(fontName)) { - if (/Wingdings/i.test(name)) { - warn('Non-embedded Wingdings font, falling back to ZapfDingbats.'); - } - this.toFontChar = buildToFontChar(ZapfDingbatsEncoding, getDingbatsGlyphsUnicode(), properties.differences); - } else if (isStandardFont) { - this.toFontChar = buildToFontChar(properties.defaultEncoding, getGlyphsUnicode(), properties.differences); - } else { - glyphsUnicodeMap = getGlyphsUnicode(); - this.toUnicode.forEach(function (charCode, unicodeCharCode) { - if (!this.composite) { - glyphName = properties.differences[charCode] || properties.defaultEncoding[charCode]; - unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); - if (unicode !== -1) { - unicodeCharCode = unicode; - } - } - this.toFontChar[charCode] = unicodeCharCode; - }.bind(this)); - } - this.loadedName = fontName.split('-')[0]; - this.loading = false; - this.fontType = getFontType(type, subtype); - return; - } - if (subtype === 'Type1C') { - if (type !== 'Type1' && type !== 'MMType1') { - if (isTrueTypeFile(file)) { - subtype = 'TrueType'; - } else { - type = 'Type1'; - } - } else if (isOpenTypeFile(file)) { - type = subtype = 'OpenType'; - } - } - if (subtype === 'CIDFontType0C' && type !== 'CIDFontType0') { - type = 'CIDFontType0'; - } - if (subtype === 'OpenType') { - type = 'OpenType'; - } - if (type === 'CIDFontType0') { - if (isType1File(file)) { - subtype = 'CIDFontType0'; - } else if (isOpenTypeFile(file)) { - type = subtype = 'OpenType'; - } else { - subtype = 'CIDFontType0C'; - } - } - var data; - switch (type) { - case 'MMType1': - info('MMType1 font (' + name + '), falling back to Type1.'); - case 'Type1': - case 'CIDFontType0': - this.mimetype = 'font/opentype'; - var cff = subtype === 'Type1C' || subtype === 'CIDFontType0C' ? new CFFFont(file, properties) : new Type1Font(name, file, properties); - adjustWidths(properties); - data = this.convert(name, cff, properties); - break; - case 'OpenType': - case 'TrueType': - case 'CIDFontType2': - this.mimetype = 'font/opentype'; - data = this.checkAndRepair(name, file, properties); - if (this.isOpenType) { - adjustWidths(properties); - type = 'OpenType'; - } - break; - default: - error('Font ' + type + ' is not supported'); - break; - } - this.data = data; - this.fontType = getFontType(type, subtype); - this.fontMatrix = properties.fontMatrix; - this.widths = properties.widths; - this.defaultWidth = properties.defaultWidth; - this.toUnicode = properties.toUnicode; - this.encoding = properties.baseEncoding; - this.seacMap = properties.seacMap; - this.loading = true; - } - Font.getFontID = function () { - var ID = 1; - return function Font_getFontID() { - return String(ID++); - }; - }(); - function int16(b0, b1) { - return (b0 << 8) + b1; - } - function signedInt16(b0, b1) { - var value = (b0 << 8) + b1; - return value & 1 << 15 ? value - 0x10000 : value; - } - function int32(b0, b1, b2, b3) { - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - } - function string16(value) { - return String.fromCharCode(value >> 8 & 0xff, value & 0xff); - } - function safeString16(value) { - value = value > 0x7FFF ? 0x7FFF : value < -0x8000 ? -0x8000 : value; - return String.fromCharCode(value >> 8 & 0xff, value & 0xff); - } - function isTrueTypeFile(file) { - var header = file.peekBytes(4); - return readUint32(header, 0) === 0x00010000; - } - function isOpenTypeFile(file) { - var header = file.peekBytes(4); - return bytesToString(header) === 'OTTO'; - } - function isType1File(file) { - var header = file.peekBytes(2); - if (header[0] === 0x25 && header[1] === 0x21) { - return true; - } - if (header[0] === 0x80 && header[1] === 0x01) { - return true; - } - return false; - } - function buildToFontChar(encoding, glyphsUnicodeMap, differences) { - var toFontChar = [], unicode; - for (var i = 0, ii = encoding.length; i < ii; i++) { - unicode = getUnicodeForGlyph(encoding[i], glyphsUnicodeMap); - if (unicode !== -1) { - toFontChar[i] = unicode; - } - } - for (var charCode in differences) { - unicode = getUnicodeForGlyph(differences[charCode], glyphsUnicodeMap); - if (unicode !== -1) { - toFontChar[+charCode] = unicode; - } - } - return toFontChar; - } - function isProblematicUnicodeLocation(code) { - var i = 0, j = ProblematicCharRanges.length - 1; - while (i < j) { - var c = i + j + 1 >> 1; - if (code < ProblematicCharRanges[c]) { - j = c - 1; - } else { - i = c; - } - } - return !(i & 1); - } - function adjustMapping(charCodeToGlyphId, properties) { - var toUnicode = properties.toUnicode; - var isSymbolic = !!(properties.flags & FontFlags.Symbolic); - var isIdentityUnicode = properties.toUnicode instanceof IdentityToUnicodeMap; - var newMap = Object.create(null); - var toFontChar = []; - var usedFontCharCodes = []; - var nextAvailableFontCharCode = PRIVATE_USE_OFFSET_START; - for (var originalCharCode in charCodeToGlyphId) { - originalCharCode |= 0; - var glyphId = charCodeToGlyphId[originalCharCode]; - var fontCharCode = originalCharCode; - var hasUnicodeValue = false; - if (!isIdentityUnicode && toUnicode.has(originalCharCode)) { - hasUnicodeValue = true; - var unicode = toUnicode.get(fontCharCode); - if (unicode.length === 1) { - fontCharCode = unicode.charCodeAt(0); - } - } - if ((usedFontCharCodes[fontCharCode] !== undefined || isProblematicUnicodeLocation(fontCharCode) || isSymbolic && !hasUnicodeValue) && nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END) { - do { - fontCharCode = nextAvailableFontCharCode++; - if (SKIP_PRIVATE_USE_RANGE_F000_TO_F01F && fontCharCode === 0xF000) { - fontCharCode = 0xF020; - nextAvailableFontCharCode = fontCharCode + 1; - } - } while (usedFontCharCodes[fontCharCode] !== undefined && nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END); - } - newMap[fontCharCode] = glyphId; - toFontChar[originalCharCode] = fontCharCode; - usedFontCharCodes[fontCharCode] = true; - } - return { - toFontChar: toFontChar, - charCodeToGlyphId: newMap, - nextAvailableFontCharCode: nextAvailableFontCharCode - }; - } - function getRanges(glyphs, numGlyphs) { - var codes = []; - for (var charCode in glyphs) { - if (glyphs[charCode] >= numGlyphs) { - continue; - } - codes.push({ - fontCharCode: charCode | 0, - glyphId: glyphs[charCode] - }); - } - codes.sort(function fontGetRangesSort(a, b) { - return a.fontCharCode - b.fontCharCode; - }); - var ranges = []; - var length = codes.length; - for (var n = 0; n < length;) { - var start = codes[n].fontCharCode; - var codeIndices = [codes[n].glyphId]; - ++n; - var end = start; - while (n < length && end + 1 === codes[n].fontCharCode) { - codeIndices.push(codes[n].glyphId); - ++end; - ++n; - if (end === 0xFFFF) { - break; - } - } - ranges.push([ - start, - end, - codeIndices - ]); - } - return ranges; - } - function createCmapTable(glyphs, numGlyphs) { - var ranges = getRanges(glyphs, numGlyphs); - var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1; - var cmap = '\x00\x00' + string16(numTables) + '\x00\x03' + '\x00\x01' + string32(4 + numTables * 8); - var i, ii, j, jj; - for (i = ranges.length - 1; i >= 0; --i) { - if (ranges[i][0] <= 0xFFFF) { - break; - } - } - var bmpLength = i + 1; - if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) { - ranges[i][1] = 0xFFFE; - } - var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0; - var segCount = bmpLength + trailingRangesCount; - var searchParams = OpenTypeFileBuilder.getSearchParams(segCount, 2); - var startCount = ''; - var endCount = ''; - var idDeltas = ''; - var idRangeOffsets = ''; - var glyphsIds = ''; - var bias = 0; - var range, start, end, codes; - for (i = 0, ii = bmpLength; i < ii; i++) { - range = ranges[i]; - start = range[0]; - end = range[1]; - startCount += string16(start); - endCount += string16(end); - codes = range[2]; - var contiguous = true; - for (j = 1, jj = codes.length; j < jj; ++j) { - if (codes[j] !== codes[j - 1] + 1) { - contiguous = false; - break; - } - } - if (!contiguous) { - var offset = (segCount - i) * 2 + bias * 2; - bias += end - start + 1; - idDeltas += string16(0); - idRangeOffsets += string16(offset); - for (j = 0, jj = codes.length; j < jj; ++j) { - glyphsIds += string16(codes[j]); - } - } else { - var startCode = codes[0]; - idDeltas += string16(startCode - start & 0xFFFF); - idRangeOffsets += string16(0); - } - } - if (trailingRangesCount > 0) { - endCount += '\xFF\xFF'; - startCount += '\xFF\xFF'; - idDeltas += '\x00\x01'; - idRangeOffsets += '\x00\x00'; - } - var format314 = '\x00\x00' + string16(2 * segCount) + string16(searchParams.range) + string16(searchParams.entry) + string16(searchParams.rangeShift) + endCount + '\x00\x00' + startCount + idDeltas + idRangeOffsets + glyphsIds; - var format31012 = ''; - var header31012 = ''; - if (numTables > 1) { - cmap += '\x00\x03' + '\x00\x0A' + string32(4 + numTables * 8 + 4 + format314.length); - format31012 = ''; - for (i = 0, ii = ranges.length; i < ii; i++) { - range = ranges[i]; - start = range[0]; - codes = range[2]; - var code = codes[0]; - for (j = 1, jj = codes.length; j < jj; ++j) { - if (codes[j] !== codes[j - 1] + 1) { - end = range[0] + j - 1; - format31012 += string32(start) + string32(end) + string32(code); - start = end + 1; - code = codes[j]; - } - } - format31012 += string32(start) + string32(range[1]) + string32(code); - } - header31012 = '\x00\x0C' + '\x00\x00' + string32(format31012.length + 16) + '\x00\x00\x00\x00' + string32(format31012.length / 12); - } - return cmap + '\x00\x04' + string16(format314.length + 4) + format314 + header31012 + format31012; - } - function validateOS2Table(os2) { - var stream = new Stream(os2.data); - var version = stream.getUint16(); - stream.getBytes(60); - var selection = stream.getUint16(); - if (version < 4 && selection & 0x0300) { - return false; - } - var firstChar = stream.getUint16(); - var lastChar = stream.getUint16(); - if (firstChar > lastChar) { - return false; - } - stream.getBytes(6); - var usWinAscent = stream.getUint16(); - if (usWinAscent === 0) { - return false; - } - os2.data[8] = os2.data[9] = 0; - return true; - } - function createOS2Table(properties, charstrings, override) { - override = override || { - unitsPerEm: 0, - yMax: 0, - yMin: 0, - ascent: 0, - descent: 0 - }; - var ulUnicodeRange1 = 0; - var ulUnicodeRange2 = 0; - var ulUnicodeRange3 = 0; - var ulUnicodeRange4 = 0; - var firstCharIndex = null; - var lastCharIndex = 0; - if (charstrings) { - for (var code in charstrings) { - code |= 0; - if (firstCharIndex > code || !firstCharIndex) { - firstCharIndex = code; - } - if (lastCharIndex < code) { - lastCharIndex = code; - } - var position = getUnicodeRangeFor(code); - if (position < 32) { - ulUnicodeRange1 |= 1 << position; - } else if (position < 64) { - ulUnicodeRange2 |= 1 << position - 32; - } else if (position < 96) { - ulUnicodeRange3 |= 1 << position - 64; - } else if (position < 123) { - ulUnicodeRange4 |= 1 << position - 96; - } else { - error('Unicode ranges Bits > 123 are reserved for internal usage'); - } - } - } else { - firstCharIndex = 0; - lastCharIndex = 255; - } - var bbox = properties.bbox || [ - 0, - 0, - 0, - 0 - ]; - var unitsPerEm = override.unitsPerEm || 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0]; - var scale = properties.ascentScaled ? 1.0 : unitsPerEm / PDF_GLYPH_SPACE_UNITS; - var typoAscent = override.ascent || Math.round(scale * (properties.ascent || bbox[3])); - var typoDescent = override.descent || Math.round(scale * (properties.descent || bbox[1])); - if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) { - typoDescent = -typoDescent; - } - var winAscent = override.yMax || typoAscent; - var winDescent = -override.yMin || -typoDescent; - return '\x00\x03' + '\x02\x24' + '\x01\xF4' + '\x00\x05' + '\x00\x00' + '\x02\x8A' + '\x02\xBB' + '\x00\x00' + '\x00\x8C' + '\x02\x8A' + '\x02\xBB' + '\x00\x00' + '\x01\xDF' + '\x00\x31' + '\x01\x02' + '\x00\x00' + '\x00\x00\x06' + String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) + '\x00\x00\x00\x00\x00\x00' + string32(ulUnicodeRange1) + string32(ulUnicodeRange2) + string32(ulUnicodeRange3) + string32(ulUnicodeRange4) + '\x2A\x32\x31\x2A' + string16(properties.italicAngle ? 1 : 0) + string16(firstCharIndex || properties.firstChar) + string16(lastCharIndex || properties.lastChar) + string16(typoAscent) + string16(typoDescent) + '\x00\x64' + string16(winAscent) + string16(winDescent) + '\x00\x00\x00\x00' + '\x00\x00\x00\x00' + string16(properties.xHeight) + string16(properties.capHeight) + string16(0) + string16(firstCharIndex || properties.firstChar) + '\x00\x03'; - } - function createPostTable(properties) { - var angle = Math.floor(properties.italicAngle * Math.pow(2, 16)); - return '\x00\x03\x00\x00' + string32(angle) + '\x00\x00' + '\x00\x00' + string32(properties.fixedPitch) + '\x00\x00\x00\x00' + '\x00\x00\x00\x00' + '\x00\x00\x00\x00' + '\x00\x00\x00\x00'; - } - function createNameTable(name, proto) { - if (!proto) { - proto = [ - [], - [] - ]; - } - var strings = [ - proto[0][0] || 'Original licence', - proto[0][1] || name, - proto[0][2] || 'Unknown', - proto[0][3] || 'uniqueID', - proto[0][4] || name, - proto[0][5] || 'Version 0.11', - proto[0][6] || '', - proto[0][7] || 'Unknown', - proto[0][8] || 'Unknown', - proto[0][9] || 'Unknown' - ]; - var stringsUnicode = []; - var i, ii, j, jj, str; - for (i = 0, ii = strings.length; i < ii; i++) { - str = proto[1][i] || strings[i]; - var strBufUnicode = []; - for (j = 0, jj = str.length; j < jj; j++) { - strBufUnicode.push(string16(str.charCodeAt(j))); - } - stringsUnicode.push(strBufUnicode.join('')); - } - var names = [ - strings, - stringsUnicode - ]; - var platforms = [ - '\x00\x01', - '\x00\x03' - ]; - var encodings = [ - '\x00\x00', - '\x00\x01' - ]; - var languages = [ - '\x00\x00', - '\x04\x09' - ]; - var namesRecordCount = strings.length * platforms.length; - var nameTable = '\x00\x00' + string16(namesRecordCount) + string16(namesRecordCount * 12 + 6); - var strOffset = 0; - for (i = 0, ii = platforms.length; i < ii; i++) { - var strs = names[i]; - for (j = 0, jj = strs.length; j < jj; j++) { - str = strs[j]; - var nameRecord = platforms[i] + encodings[i] + languages[i] + string16(j) + string16(str.length) + string16(strOffset); - nameTable += nameRecord; - strOffset += str.length; - } - } - nameTable += strings.join('') + stringsUnicode.join(''); - return nameTable; - } - Font.prototype = { - name: null, - font: null, - mimetype: null, - encoding: null, - get renderer() { - var renderer = FontRendererFactory.create(this, SEAC_ANALYSIS_ENABLED); - return shadow(this, 'renderer', renderer); - }, - exportData: function Font_exportData() { - var data = {}; - for (var i in this) { - if (this.hasOwnProperty(i)) { - data[i] = this[i]; - } - } - return data; - }, - checkAndRepair: function Font_checkAndRepair(name, font, properties) { - function readTableEntry(file) { - var tag = bytesToString(file.getBytes(4)); - var checksum = file.getInt32() >>> 0; - var offset = file.getInt32() >>> 0; - var length = file.getInt32() >>> 0; - var previousPosition = file.pos; - file.pos = file.start ? file.start : 0; - file.skip(offset); - var data = file.getBytes(length); - file.pos = previousPosition; - if (tag === 'head') { - data[8] = data[9] = data[10] = data[11] = 0; - data[17] |= 0x20; - } - return { - tag: tag, - checksum: checksum, - length: length, - offset: offset, - data: data - }; - } - function readOpenTypeHeader(ttf) { - return { - version: bytesToString(ttf.getBytes(4)), - numTables: ttf.getUint16(), - searchRange: ttf.getUint16(), - entrySelector: ttf.getUint16(), - rangeShift: ttf.getUint16() - }; - } - function readCmapTable(cmap, font, isSymbolicFont, hasEncoding) { - if (!cmap) { - warn('No cmap table available.'); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: false - }; - } - var segment; - var start = (font.start ? font.start : 0) + cmap.offset; - font.pos = start; - var version = font.getUint16(); - var numTables = font.getUint16(); - var potentialTable; - var canBreak = false; - for (var i = 0; i < numTables; i++) { - var platformId = font.getUint16(); - var encodingId = font.getUint16(); - var offset = font.getInt32() >>> 0; - var useTable = false; - if (platformId === 0 && encodingId === 0) { - useTable = true; - } else if (platformId === 1 && encodingId === 0) { - useTable = true; - } else if (platformId === 3 && encodingId === 1 && (!isSymbolicFont && hasEncoding || !potentialTable)) { - useTable = true; - if (!isSymbolicFont) { - canBreak = true; - } - } else if (isSymbolicFont && platformId === 3 && encodingId === 0) { - useTable = true; - canBreak = true; - } - if (useTable) { - potentialTable = { - platformId: platformId, - encodingId: encodingId, - offset: offset - }; - } - if (canBreak) { - break; - } - } - if (potentialTable) { - font.pos = start + potentialTable.offset; - } - if (!potentialTable || font.peekByte() === -1) { - warn('Could not find a preferred cmap table.'); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: false - }; - } - var format = font.getUint16(); - var length = font.getUint16(); - var language = font.getUint16(); - var hasShortCmap = false; - var mappings = []; - var j, glyphId; - if (format === 0) { - for (j = 0; j < 256; j++) { - var index = font.getByte(); - if (!index) { - continue; - } - mappings.push({ - charCode: j, - glyphId: index - }); - } - hasShortCmap = true; - } else if (format === 4) { - var segCount = font.getUint16() >> 1; - font.getBytes(6); - var segIndex, segments = []; - for (segIndex = 0; segIndex < segCount; segIndex++) { - segments.push({ end: font.getUint16() }); - } - font.getUint16(); - for (segIndex = 0; segIndex < segCount; segIndex++) { - segments[segIndex].start = font.getUint16(); - } - for (segIndex = 0; segIndex < segCount; segIndex++) { - segments[segIndex].delta = font.getUint16(); - } - var offsetsCount = 0; - for (segIndex = 0; segIndex < segCount; segIndex++) { - segment = segments[segIndex]; - var rangeOffset = font.getUint16(); - if (!rangeOffset) { - segment.offsetIndex = -1; - continue; - } - var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex); - segment.offsetIndex = offsetIndex; - offsetsCount = Math.max(offsetsCount, offsetIndex + segment.end - segment.start + 1); - } - var offsets = []; - for (j = 0; j < offsetsCount; j++) { - offsets.push(font.getUint16()); - } - for (segIndex = 0; segIndex < segCount; segIndex++) { - segment = segments[segIndex]; - start = segment.start; - var end = segment.end; - var delta = segment.delta; - offsetIndex = segment.offsetIndex; - for (j = start; j <= end; j++) { - if (j === 0xFFFF) { - continue; - } - glyphId = offsetIndex < 0 ? j : offsets[offsetIndex + j - start]; - glyphId = glyphId + delta & 0xFFFF; - if (glyphId === 0) { - continue; - } - mappings.push({ - charCode: j, - glyphId: glyphId - }); - } - } - } else if (format === 6) { - var firstCode = font.getUint16(); - var entryCount = font.getUint16(); - for (j = 0; j < entryCount; j++) { - glyphId = font.getUint16(); - var charCode = firstCode + j; - mappings.push({ - charCode: charCode, - glyphId: glyphId - }); - } - } else { - warn('cmap table has unsupported format: ' + format); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: false - }; - } - mappings.sort(function (a, b) { - return a.charCode - b.charCode; - }); - for (i = 1; i < mappings.length; i++) { - if (mappings[i - 1].charCode === mappings[i].charCode) { - mappings.splice(i, 1); - i--; - } - } - return { - platformId: potentialTable.platformId, - encodingId: potentialTable.encodingId, - mappings: mappings, - hasShortCmap: hasShortCmap - }; - } - function sanitizeMetrics(font, header, metrics, numGlyphs) { - if (!header) { - if (metrics) { - metrics.data = null; - } - return; - } - font.pos = (font.start ? font.start : 0) + header.offset; - font.pos += header.length - 2; - var numOfMetrics = font.getUint16(); - if (numOfMetrics > numGlyphs) { - info('The numOfMetrics (' + numOfMetrics + ') should not be ' + 'greater than the numGlyphs (' + numGlyphs + ')'); - numOfMetrics = numGlyphs; - header.data[34] = (numOfMetrics & 0xff00) >> 8; - header.data[35] = numOfMetrics & 0x00ff; - } - var numOfSidebearings = numGlyphs - numOfMetrics; - var numMissing = numOfSidebearings - (metrics.length - numOfMetrics * 4 >> 1); - if (numMissing > 0) { - var entries = new Uint8Array(metrics.length + numMissing * 2); - entries.set(metrics.data); - metrics.data = entries; - } - } - function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart, hintsValid) { - if (sourceEnd - sourceStart <= 12) { - return 0; - } - var glyf = source.subarray(sourceStart, sourceEnd); - var contoursCount = glyf[0] << 8 | glyf[1]; - if (contoursCount & 0x8000) { - dest.set(glyf, destStart); - return glyf.length; - } - var i, j = 10, flagsCount = 0; - for (i = 0; i < contoursCount; i++) { - var endPoint = glyf[j] << 8 | glyf[j + 1]; - flagsCount = endPoint + 1; - j += 2; - } - var instructionsStart = j; - var instructionsLength = glyf[j] << 8 | glyf[j + 1]; - j += 2 + instructionsLength; - var instructionsEnd = j; - var coordinatesLength = 0; - for (i = 0; i < flagsCount; i++) { - var flag = glyf[j++]; - if (flag & 0xC0) { - glyf[j - 1] = flag & 0x3F; - } - var xyLength = (flag & 2 ? 1 : flag & 16 ? 0 : 2) + (flag & 4 ? 1 : flag & 32 ? 0 : 2); - coordinatesLength += xyLength; - if (flag & 8) { - var repeat = glyf[j++]; - i += repeat; - coordinatesLength += repeat * xyLength; - } - } - if (coordinatesLength === 0) { - return 0; - } - var glyphDataLength = j + coordinatesLength; - if (glyphDataLength > glyf.length) { - return 0; - } - if (!hintsValid && instructionsLength > 0) { - dest.set(glyf.subarray(0, instructionsStart), destStart); - dest.set([ - 0, - 0 - ], destStart + instructionsStart); - dest.set(glyf.subarray(instructionsEnd, glyphDataLength), destStart + instructionsStart + 2); - glyphDataLength -= instructionsLength; - if (glyf.length - glyphDataLength > 3) { - glyphDataLength = glyphDataLength + 3 & ~3; - } - return glyphDataLength; - } - if (glyf.length - glyphDataLength > 3) { - glyphDataLength = glyphDataLength + 3 & ~3; - dest.set(glyf.subarray(0, glyphDataLength), destStart); - return glyphDataLength; - } - dest.set(glyf, destStart); - return glyf.length; - } - function sanitizeHead(head, numGlyphs, locaLength) { - var data = head.data; - var version = int32(data[0], data[1], data[2], data[3]); - if (version >> 16 !== 1) { - info('Attempting to fix invalid version in head table: ' + version); - data[0] = 0; - data[1] = 1; - data[2] = 0; - data[3] = 0; - } - var indexToLocFormat = int16(data[50], data[51]); - if (indexToLocFormat < 0 || indexToLocFormat > 1) { - info('Attempting to fix invalid indexToLocFormat in head table: ' + indexToLocFormat); - var numGlyphsPlusOne = numGlyphs + 1; - if (locaLength === numGlyphsPlusOne << 1) { - data[50] = 0; - data[51] = 0; - } else if (locaLength === numGlyphsPlusOne << 2) { - data[50] = 0; - data[51] = 1; - } else { - warn('Could not fix indexToLocFormat: ' + indexToLocFormat); - } - } - } - function sanitizeGlyphLocations(loca, glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry) { - var itemSize, itemDecode, itemEncode; - if (isGlyphLocationsLong) { - itemSize = 4; - itemDecode = function fontItemDecodeLong(data, offset) { - return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; - }; - itemEncode = function fontItemEncodeLong(data, offset, value) { - data[offset] = value >>> 24 & 0xFF; - data[offset + 1] = value >> 16 & 0xFF; - data[offset + 2] = value >> 8 & 0xFF; - data[offset + 3] = value & 0xFF; - }; - } else { - itemSize = 2; - itemDecode = function fontItemDecode(data, offset) { - return data[offset] << 9 | data[offset + 1] << 1; - }; - itemEncode = function fontItemEncode(data, offset, value) { - data[offset] = value >> 9 & 0xFF; - data[offset + 1] = value >> 1 & 0xFF; - }; - } - var locaData = loca.data; - var locaDataSize = itemSize * (1 + numGlyphs); - if (locaData.length !== locaDataSize) { - locaData = new Uint8Array(locaDataSize); - locaData.set(loca.data.subarray(0, locaDataSize)); - loca.data = locaData; - } - var oldGlyfData = glyf.data; - var oldGlyfDataLength = oldGlyfData.length; - var newGlyfData = new Uint8Array(oldGlyfDataLength); - var startOffset = itemDecode(locaData, 0); - var writeOffset = 0; - var missingGlyphData = Object.create(null); - itemEncode(locaData, 0, writeOffset); - var i, j; - for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) { - var endOffset = itemDecode(locaData, j); - if (endOffset > oldGlyfDataLength && (oldGlyfDataLength + 3 & ~3) === endOffset) { - endOffset = oldGlyfDataLength; - } - if (endOffset > oldGlyfDataLength) { - itemEncode(locaData, j, writeOffset); - startOffset = endOffset; - continue; - } - if (startOffset === endOffset) { - missingGlyphData[i] = true; - } - var newLength = sanitizeGlyph(oldGlyfData, startOffset, endOffset, newGlyfData, writeOffset, hintsValid); - writeOffset += newLength; - itemEncode(locaData, j, writeOffset); - startOffset = endOffset; - } - if (writeOffset === 0) { - var simpleGlyph = new Uint8Array([ - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 49, - 0 - ]); - for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) { - itemEncode(locaData, j, simpleGlyph.length); - } - glyf.data = simpleGlyph; - return missingGlyphData; - } - if (dupFirstEntry) { - var firstEntryLength = itemDecode(locaData, itemSize); - if (newGlyfData.length > firstEntryLength + writeOffset) { - glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset); - } else { - glyf.data = new Uint8Array(firstEntryLength + writeOffset); - glyf.data.set(newGlyfData.subarray(0, writeOffset)); - } - glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset); - itemEncode(loca.data, locaData.length - itemSize, writeOffset + firstEntryLength); - } else { - glyf.data = newGlyfData.subarray(0, writeOffset); - } - return missingGlyphData; - } - function readPostScriptTable(post, properties, maxpNumGlyphs) { - var start = (font.start ? font.start : 0) + post.offset; - font.pos = start; - var length = post.length, end = start + length; - var version = font.getInt32(); - font.getBytes(28); - var glyphNames; - var valid = true; - var i; - switch (version) { - case 0x00010000: - glyphNames = MacStandardGlyphOrdering; - break; - case 0x00020000: - var numGlyphs = font.getUint16(); - if (numGlyphs !== maxpNumGlyphs) { - valid = false; - break; - } - var glyphNameIndexes = []; - for (i = 0; i < numGlyphs; ++i) { - var index = font.getUint16(); - if (index >= 32768) { - valid = false; - break; - } - glyphNameIndexes.push(index); - } - if (!valid) { - break; - } - var customNames = []; - var strBuf = []; - while (font.pos < end) { - var stringLength = font.getByte(); - strBuf.length = stringLength; - for (i = 0; i < stringLength; ++i) { - strBuf[i] = String.fromCharCode(font.getByte()); - } - customNames.push(strBuf.join('')); - } - glyphNames = []; - for (i = 0; i < numGlyphs; ++i) { - var j = glyphNameIndexes[i]; - if (j < 258) { - glyphNames.push(MacStandardGlyphOrdering[j]); - continue; - } - glyphNames.push(customNames[j - 258]); - } - break; - case 0x00030000: - break; - default: - warn('Unknown/unsupported post table version ' + version); - valid = false; - if (properties.defaultEncoding) { - glyphNames = properties.defaultEncoding; - } - break; - } - properties.glyphNames = glyphNames; - return valid; - } - function readNameTable(nameTable) { - var start = (font.start ? font.start : 0) + nameTable.offset; - font.pos = start; - var names = [ - [], - [] - ]; - var length = nameTable.length, end = start + length; - var format = font.getUint16(); - var FORMAT_0_HEADER_LENGTH = 6; - if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) { - return names; - } - var numRecords = font.getUint16(); - var stringsStart = font.getUint16(); - var records = []; - var NAME_RECORD_LENGTH = 12; - var i, ii; - for (i = 0; i < numRecords && font.pos + NAME_RECORD_LENGTH <= end; i++) { - var r = { - platform: font.getUint16(), - encoding: font.getUint16(), - language: font.getUint16(), - name: font.getUint16(), - length: font.getUint16(), - offset: font.getUint16() - }; - if (r.platform === 1 && r.encoding === 0 && r.language === 0 || r.platform === 3 && r.encoding === 1 && r.language === 0x409) { - records.push(r); - } - } - for (i = 0, ii = records.length; i < ii; i++) { - var record = records[i]; - if (record.length <= 0) { - continue; - } - var pos = start + stringsStart + record.offset; - if (pos + record.length > end) { - continue; - } - font.pos = pos; - var nameIndex = record.name; - if (record.encoding) { - var str = ''; - for (var j = 0, jj = record.length; j < jj; j += 2) { - str += String.fromCharCode(font.getUint16()); - } - names[1][nameIndex] = str; - } else { - names[0][nameIndex] = bytesToString(font.getBytes(record.length)); - } - } - return names; - } - var TTOpsStackDeltas = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - -2, - -2, - -2, - -2, - 0, - 0, - -2, - -5, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 0, - 0, - -1, - 0, - -1, - -1, - -1, - -1, - 1, - -1, - -999, - 0, - 1, - 0, - -1, - -2, - 0, - -1, - -2, - -1, - -1, - 0, - -1, - -1, - 0, - 0, - -999, - -999, - -1, - -1, - -1, - -1, - -2, - -999, - -2, - -2, - -999, - 0, - -2, - -2, - 0, - 0, - -2, - 0, - -2, - 0, - 0, - 0, - -2, - -1, - -1, - 1, - 1, - 0, - 0, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 0, - 0, - -1, - 0, - -1, - -1, - 0, - -999, - -1, - -1, - -1, - -1, - -1, - -1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - -2, - -999, - -999, - -999, - -999, - -999, - -1, - -1, - -2, - -2, - 0, - 0, - 0, - 0, - -1, - -1, - -999, - -2, - -2, - 0, - 0, - -1, - -2, - -2, - 0, - 0, - 0, - -1, - -1, - -1, - -2 - ]; - function sanitizeTTProgram(table, ttContext) { - var data = table.data; - var i = 0, j, n, b, funcId, pc, lastEndf = 0, lastDeff = 0; - var stack = []; - var callstack = []; - var functionsCalled = []; - var tooComplexToFollowFunctions = ttContext.tooComplexToFollowFunctions; - var inFDEF = false, ifLevel = 0, inELSE = 0; - for (var ii = data.length; i < ii;) { - var op = data[i++]; - if (op === 0x40) { - n = data[i++]; - if (inFDEF || inELSE) { - i += n; - } else { - for (j = 0; j < n; j++) { - stack.push(data[i++]); - } - } - } else if (op === 0x41) { - n = data[i++]; - if (inFDEF || inELSE) { - i += n * 2; - } else { - for (j = 0; j < n; j++) { - b = data[i++]; - stack.push(b << 8 | data[i++]); - } - } - } else if ((op & 0xF8) === 0xB0) { - n = op - 0xB0 + 1; - if (inFDEF || inELSE) { - i += n; - } else { - for (j = 0; j < n; j++) { - stack.push(data[i++]); - } - } - } else if ((op & 0xF8) === 0xB8) { - n = op - 0xB8 + 1; - if (inFDEF || inELSE) { - i += n * 2; - } else { - for (j = 0; j < n; j++) { - b = data[i++]; - stack.push(b << 8 | data[i++]); - } - } - } else if (op === 0x2B && !tooComplexToFollowFunctions) { - if (!inFDEF && !inELSE) { - funcId = stack[stack.length - 1]; - ttContext.functionsUsed[funcId] = true; - if (funcId in ttContext.functionsStackDeltas) { - stack.length += ttContext.functionsStackDeltas[funcId]; - } else if (funcId in ttContext.functionsDefined && functionsCalled.indexOf(funcId) < 0) { - callstack.push({ - data: data, - i: i, - stackTop: stack.length - 1 - }); - functionsCalled.push(funcId); - pc = ttContext.functionsDefined[funcId]; - if (!pc) { - warn('TT: CALL non-existent function'); - ttContext.hintsValid = false; - return; - } - data = pc.data; - i = pc.i; - } - } - } else if (op === 0x2C && !tooComplexToFollowFunctions) { - if (inFDEF || inELSE) { - warn('TT: nested FDEFs not allowed'); - tooComplexToFollowFunctions = true; - } - inFDEF = true; - lastDeff = i; - funcId = stack.pop(); - ttContext.functionsDefined[funcId] = { - data: data, - i: i - }; - } else if (op === 0x2D) { - if (inFDEF) { - inFDEF = false; - lastEndf = i; - } else { - pc = callstack.pop(); - if (!pc) { - warn('TT: ENDF bad stack'); - ttContext.hintsValid = false; - return; - } - funcId = functionsCalled.pop(); - data = pc.data; - i = pc.i; - ttContext.functionsStackDeltas[funcId] = stack.length - pc.stackTop; - } - } else if (op === 0x89) { - if (inFDEF || inELSE) { - warn('TT: nested IDEFs not allowed'); - tooComplexToFollowFunctions = true; - } - inFDEF = true; - lastDeff = i; - } else if (op === 0x58) { - ++ifLevel; - } else if (op === 0x1B) { - inELSE = ifLevel; - } else if (op === 0x59) { - if (inELSE === ifLevel) { - inELSE = 0; - } - --ifLevel; - } else if (op === 0x1C) { - if (!inFDEF && !inELSE) { - var offset = stack[stack.length - 1]; - if (offset > 0) { - i += offset - 1; - } - } - } - if (!inFDEF && !inELSE) { - var stackDelta = op <= 0x8E ? TTOpsStackDeltas[op] : op >= 0xC0 && op <= 0xDF ? -1 : op >= 0xE0 ? -2 : 0; - if (op >= 0x71 && op <= 0x75) { - n = stack.pop(); - if (!isNaN(n)) { - stackDelta = -n * 2; - } - } - while (stackDelta < 0 && stack.length > 0) { - stack.pop(); - stackDelta++; - } - while (stackDelta > 0) { - stack.push(NaN); - stackDelta--; - } - } - } - ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions; - var content = [data]; - if (i > data.length) { - content.push(new Uint8Array(i - data.length)); - } - if (lastDeff > lastEndf) { - warn('TT: complementing a missing function tail'); - content.push(new Uint8Array([ - 0x22, - 0x2D - ])); - } - foldTTTable(table, content); - } - function checkInvalidFunctions(ttContext, maxFunctionDefs) { - if (ttContext.tooComplexToFollowFunctions) { - return; - } - if (ttContext.functionsDefined.length > maxFunctionDefs) { - warn('TT: more functions defined than expected'); - ttContext.hintsValid = false; - return; - } - for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) { - if (j > maxFunctionDefs) { - warn('TT: invalid function id: ' + j); - ttContext.hintsValid = false; - return; - } - if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) { - warn('TT: undefined function: ' + j); - ttContext.hintsValid = false; - return; - } - } - } - function foldTTTable(table, content) { - if (content.length > 1) { - var newLength = 0; - var j, jj; - for (j = 0, jj = content.length; j < jj; j++) { - newLength += content[j].length; - } - newLength = newLength + 3 & ~3; - var result = new Uint8Array(newLength); - var pos = 0; - for (j = 0, jj = content.length; j < jj; j++) { - result.set(content[j], pos); - pos += content[j].length; - } - table.data = result; - table.length = newLength; - } - } - function sanitizeTTPrograms(fpgm, prep, cvt, maxFunctionDefs) { - var ttContext = { - functionsDefined: [], - functionsUsed: [], - functionsStackDeltas: [], - tooComplexToFollowFunctions: false, - hintsValid: true - }; - if (fpgm) { - sanitizeTTProgram(fpgm, ttContext); - } - if (prep) { - sanitizeTTProgram(prep, ttContext); - } - if (fpgm) { - checkInvalidFunctions(ttContext, maxFunctionDefs); - } - if (cvt && cvt.length & 1) { - var cvtData = new Uint8Array(cvt.length + 1); - cvtData.set(cvt.data); - cvt.data = cvtData; - } - return ttContext.hintsValid; - } - font = new Stream(new Uint8Array(font.getBytes())); - var VALID_TABLES = [ - 'OS/2', - 'cmap', - 'head', - 'hhea', - 'hmtx', - 'maxp', - 'name', - 'post', - 'loca', - 'glyf', - 'fpgm', - 'prep', - 'cvt ', - 'CFF ' - ]; - var header = readOpenTypeHeader(font); - var numTables = header.numTables; - var cff, cffFile; - var tables = Object.create(null); - tables['OS/2'] = null; - tables['cmap'] = null; - tables['head'] = null; - tables['hhea'] = null; - tables['hmtx'] = null; - tables['maxp'] = null; - tables['name'] = null; - tables['post'] = null; - var table; - for (var i = 0; i < numTables; i++) { - table = readTableEntry(font); - if (VALID_TABLES.indexOf(table.tag) < 0) { - continue; - } - if (table.length === 0) { - continue; - } - tables[table.tag] = table; - } - var isTrueType = !tables['CFF ']; - if (!isTrueType) { - if (header.version === 'OTTO' && !properties.composite || !tables['head'] || !tables['hhea'] || !tables['maxp'] || !tables['post']) { - cffFile = new Stream(tables['CFF '].data); - cff = new CFFFont(cffFile, properties); - adjustWidths(properties); - return this.convert(name, cff, properties); - } - delete tables['glyf']; - delete tables['loca']; - delete tables['fpgm']; - delete tables['prep']; - delete tables['cvt ']; - this.isOpenType = true; - } else { - if (!tables['loca']) { - error('Required "loca" table is not found'); - } - if (!tables['glyf']) { - warn('Required "glyf" table is not found -- trying to recover.'); - tables['glyf'] = { - tag: 'glyf', - data: new Uint8Array(0) - }; - } - this.isOpenType = false; - } - if (!tables['maxp']) { - error('Required "maxp" table is not found'); - } - font.pos = (font.start || 0) + tables['maxp'].offset; - var version = font.getInt32(); - var numGlyphs = font.getUint16(); - var maxFunctionDefs = 0; - if (version >= 0x00010000 && tables['maxp'].length >= 22) { - font.pos += 8; - var maxZones = font.getUint16(); - if (maxZones > 2) { - tables['maxp'].data[14] = 0; - tables['maxp'].data[15] = 2; - } - font.pos += 4; - maxFunctionDefs = font.getUint16(); - } - var dupFirstEntry = false; - if (properties.type === 'CIDFontType2' && properties.toUnicode && properties.toUnicode.get(0) > '\u0000') { - dupFirstEntry = true; - numGlyphs++; - tables['maxp'].data[4] = numGlyphs >> 8; - tables['maxp'].data[5] = numGlyphs & 255; - } - var hintsValid = sanitizeTTPrograms(tables['fpgm'], tables['prep'], tables['cvt '], maxFunctionDefs); - if (!hintsValid) { - delete tables['fpgm']; - delete tables['prep']; - delete tables['cvt ']; - } - sanitizeMetrics(font, tables['hhea'], tables['hmtx'], numGlyphs); - if (!tables['head']) { - error('Required "head" table is not found'); - } - sanitizeHead(tables['head'], numGlyphs, isTrueType ? tables['loca'].length : 0); - var missingGlyphs = Object.create(null); - if (isTrueType) { - var isGlyphLocationsLong = int16(tables['head'].data[50], tables['head'].data[51]); - missingGlyphs = sanitizeGlyphLocations(tables['loca'], tables['glyf'], numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry); - } - if (!tables['hhea']) { - error('Required "hhea" table is not found'); - } - if (tables['hhea'].data[10] === 0 && tables['hhea'].data[11] === 0) { - tables['hhea'].data[10] = 0xFF; - tables['hhea'].data[11] = 0xFF; - } - var metricsOverride = { - unitsPerEm: int16(tables['head'].data[18], tables['head'].data[19]), - yMax: int16(tables['head'].data[42], tables['head'].data[43]), - yMin: signedInt16(tables['head'].data[38], tables['head'].data[39]), - ascent: int16(tables['hhea'].data[4], tables['hhea'].data[5]), - descent: signedInt16(tables['hhea'].data[6], tables['hhea'].data[7]) - }; - this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm; - this.descent = metricsOverride.descent / metricsOverride.unitsPerEm; - if (tables['post']) { - var valid = readPostScriptTable(tables['post'], properties, numGlyphs); - if (!valid) { - tables['post'] = null; - } - } - var charCodeToGlyphId = [], charCode; - var toUnicode = properties.toUnicode, widths = properties.widths; - var skipToUnicode = toUnicode instanceof IdentityToUnicodeMap || toUnicode.length === 0x10000; - function hasGlyph(glyphId, charCode, widthCode) { - if (!missingGlyphs[glyphId]) { - return true; - } - if (!skipToUnicode && charCode >= 0 && toUnicode.has(charCode)) { - return true; - } - if (widths && widthCode >= 0 && isNum(widths[widthCode])) { - return true; - } - return false; - } - if (properties.composite) { - var cidToGidMap = properties.cidToGidMap || []; - var isCidToGidMapEmpty = cidToGidMap.length === 0; - properties.cMap.forEach(function (charCode, cid) { - assert(cid <= 0xffff, 'Max size of CID is 65,535'); - var glyphId = -1; - if (isCidToGidMapEmpty) { - glyphId = cid; - } else if (cidToGidMap[cid] !== undefined) { - glyphId = cidToGidMap[cid]; - } - if (glyphId >= 0 && glyphId < numGlyphs && hasGlyph(glyphId, charCode, cid)) { - charCodeToGlyphId[charCode] = glyphId; - } - }); - if (dupFirstEntry && (isCidToGidMapEmpty || !charCodeToGlyphId[0])) { - charCodeToGlyphId[0] = numGlyphs - 1; - } - } else { - var cmapTable = readCmapTable(tables['cmap'], font, this.isSymbolicFont, properties.hasEncoding); - var cmapPlatformId = cmapTable.platformId; - var cmapEncodingId = cmapTable.encodingId; - var cmapMappings = cmapTable.mappings; - var cmapMappingsLength = cmapMappings.length; - if (properties.hasEncoding && (cmapPlatformId === 3 && cmapEncodingId === 1 || cmapPlatformId === 1 && cmapEncodingId === 0) || cmapPlatformId === -1 && cmapEncodingId === -1 && !!getEncoding(properties.baseEncodingName)) { - var baseEncoding = []; - if (properties.baseEncodingName === 'MacRomanEncoding' || properties.baseEncodingName === 'WinAnsiEncoding') { - baseEncoding = getEncoding(properties.baseEncodingName); - } - var glyphsUnicodeMap = getGlyphsUnicode(); - for (charCode = 0; charCode < 256; charCode++) { - var glyphName, standardGlyphName; - if (this.differences && charCode in this.differences) { - glyphName = this.differences[charCode]; - } else if (charCode in baseEncoding && baseEncoding[charCode] !== '') { - glyphName = baseEncoding[charCode]; - } else { - glyphName = StandardEncoding[charCode]; - } - if (!glyphName) { - continue; - } - standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); - var unicodeOrCharCode, isUnicode = false; - if (cmapPlatformId === 3 && cmapEncodingId === 1) { - unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName]; - isUnicode = true; - } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { - unicodeOrCharCode = MacRomanEncoding.indexOf(standardGlyphName); - } - var found = false; - for (i = 0; i < cmapMappingsLength; ++i) { - if (cmapMappings[i].charCode !== unicodeOrCharCode) { - continue; - } - var code = isUnicode ? charCode : unicodeOrCharCode; - if (hasGlyph(cmapMappings[i].glyphId, code, -1)) { - charCodeToGlyphId[charCode] = cmapMappings[i].glyphId; - found = true; - break; - } - } - if (!found && properties.glyphNames) { - var glyphId = properties.glyphNames.indexOf(glyphName); - if (glyphId === -1 && standardGlyphName !== glyphName) { - glyphId = properties.glyphNames.indexOf(standardGlyphName); - } - if (glyphId > 0 && hasGlyph(glyphId, -1, -1)) { - charCodeToGlyphId[charCode] = glyphId; - found = true; - } - } - if (!found) { - charCodeToGlyphId[charCode] = 0; - } - } - } else if (cmapPlatformId === 0 && cmapEncodingId === 0) { - for (i = 0; i < cmapMappingsLength; ++i) { - charCodeToGlyphId[cmapMappings[i].charCode] = cmapMappings[i].glyphId; - } - } else { - for (i = 0; i < cmapMappingsLength; ++i) { - charCode = cmapMappings[i].charCode & 0xFF; - charCodeToGlyphId[charCode] = cmapMappings[i].glyphId; - } - } - } - if (charCodeToGlyphId.length === 0) { - charCodeToGlyphId[0] = 0; - } - var newMapping = adjustMapping(charCodeToGlyphId, properties); - this.toFontChar = newMapping.toFontChar; - tables['cmap'] = { - tag: 'cmap', - data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphs) - }; - if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) { - tables['OS/2'] = { - tag: 'OS/2', - data: createOS2Table(properties, newMapping.charCodeToGlyphId, metricsOverride) - }; - } - if (!tables['post']) { - tables['post'] = { - tag: 'post', - data: createPostTable(properties) - }; - } - if (!isTrueType) { - try { - cffFile = new Stream(tables['CFF '].data); - var parser = new CFFParser(cffFile, properties, SEAC_ANALYSIS_ENABLED); - cff = parser.parse(); - var compiler = new CFFCompiler(cff); - tables['CFF '].data = compiler.compile(); - } catch (e) { - warn('Failed to compile font ' + properties.loadedName); - } - } - if (!tables['name']) { - tables['name'] = { - tag: 'name', - data: createNameTable(this.name) - }; - } else { - var namePrototype = readNameTable(tables['name']); - tables['name'].data = createNameTable(name, namePrototype); - } - var builder = new OpenTypeFileBuilder(header.version); - for (var tableTag in tables) { - builder.addTable(tableTag, tables[tableTag].data); - } - return builder.toArray(); - }, - convert: function Font_convert(fontName, font, properties) { - properties.fixedPitch = false; - if (properties.builtInEncoding) { - adjustToUnicode(properties, properties.builtInEncoding); - } - var mapping = font.getGlyphMapping(properties); - var newMapping = adjustMapping(mapping, properties); - this.toFontChar = newMapping.toFontChar; - var numGlyphs = font.numGlyphs; - function getCharCodes(charCodeToGlyphId, glyphId) { - var charCodes = null; - for (var charCode in charCodeToGlyphId) { - if (glyphId === charCodeToGlyphId[charCode]) { - if (!charCodes) { - charCodes = []; - } - charCodes.push(charCode | 0); - } - } - return charCodes; - } - function createCharCode(charCodeToGlyphId, glyphId) { - for (var charCode in charCodeToGlyphId) { - if (glyphId === charCodeToGlyphId[charCode]) { - return charCode | 0; - } - } - newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] = glyphId; - return newMapping.nextAvailableFontCharCode++; - } - var seacs = font.seacs; - if (SEAC_ANALYSIS_ENABLED && seacs && seacs.length) { - var matrix = properties.fontMatrix || FONT_IDENTITY_MATRIX; - var charset = font.getCharset(); - var seacMap = Object.create(null); - for (var glyphId in seacs) { - glyphId |= 0; - var seac = seacs[glyphId]; - var baseGlyphName = StandardEncoding[seac[2]]; - var accentGlyphName = StandardEncoding[seac[3]]; - var baseGlyphId = charset.indexOf(baseGlyphName); - var accentGlyphId = charset.indexOf(accentGlyphName); - if (baseGlyphId < 0 || accentGlyphId < 0) { - continue; - } - var accentOffset = { - x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4], - y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5] - }; - var charCodes = getCharCodes(mapping, glyphId); - if (!charCodes) { - continue; - } - for (var i = 0, ii = charCodes.length; i < ii; i++) { - var charCode = charCodes[i]; - var charCodeToGlyphId = newMapping.charCodeToGlyphId; - var baseFontCharCode = createCharCode(charCodeToGlyphId, baseGlyphId); - var accentFontCharCode = createCharCode(charCodeToGlyphId, accentGlyphId); - seacMap[charCode] = { - baseFontCharCode: baseFontCharCode, - accentFontCharCode: accentFontCharCode, - accentOffset: accentOffset - }; - } - } - properties.seacMap = seacMap; - } - var unitsPerEm = 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0]; - var builder = new OpenTypeFileBuilder('\x4F\x54\x54\x4F'); - builder.addTable('CFF ', font.data); - builder.addTable('OS/2', createOS2Table(properties, newMapping.charCodeToGlyphId)); - builder.addTable('cmap', createCmapTable(newMapping.charCodeToGlyphId, numGlyphs)); - builder.addTable('head', '\x00\x01\x00\x00' + '\x00\x00\x10\x00' + '\x00\x00\x00\x00' + '\x5F\x0F\x3C\xF5' + '\x00\x00' + safeString16(unitsPerEm) + '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + '\x00\x00' + safeString16(properties.descent) + '\x0F\xFF' + safeString16(properties.ascent) + string16(properties.italicAngle ? 2 : 0) + '\x00\x11' + '\x00\x00' + '\x00\x00' + '\x00\x00'); - builder.addTable('hhea', '\x00\x01\x00\x00' + safeString16(properties.ascent) + safeString16(properties.descent) + '\x00\x00' + '\xFF\xFF' + '\x00\x00' + '\x00\x00' + '\x00\x00' + safeString16(properties.capHeight) + safeString16(Math.tan(properties.italicAngle) * properties.xHeight) + '\x00\x00' + '\x00\x00' + '\x00\x00' + '\x00\x00' + '\x00\x00' + '\x00\x00' + string16(numGlyphs)); - builder.addTable('hmtx', function fontFieldsHmtx() { - var charstrings = font.charstrings; - var cffWidths = font.cff ? font.cff.widths : null; - var hmtx = '\x00\x00\x00\x00'; - for (var i = 1, ii = numGlyphs; i < ii; i++) { - var width = 0; - if (charstrings) { - var charstring = charstrings[i - 1]; - width = 'width' in charstring ? charstring.width : 0; - } else if (cffWidths) { - width = Math.ceil(cffWidths[i] || 0); - } - hmtx += string16(width) + string16(0); - } - return hmtx; - }()); - builder.addTable('maxp', '\x00\x00\x50\x00' + string16(numGlyphs)); - builder.addTable('name', createNameTable(fontName)); - builder.addTable('post', createPostTable(properties)); - return builder.toArray(); - }, - get spaceWidth() { - if ('_shadowWidth' in this) { - return this._shadowWidth; - } - var possibleSpaceReplacements = [ - 'space', - 'minus', - 'one', - 'i', - 'I' - ]; - var width; - for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) { - var glyphName = possibleSpaceReplacements[i]; - if (glyphName in this.widths) { - width = this.widths[glyphName]; - break; - } - var glyphsUnicodeMap = getGlyphsUnicode(); - var glyphUnicode = glyphsUnicodeMap[glyphName]; - var charcode = 0; - if (this.composite) { - if (this.cMap.contains(glyphUnicode)) { - charcode = this.cMap.lookup(glyphUnicode); - } - } - if (!charcode && this.toUnicode) { - charcode = this.toUnicode.charCodeOf(glyphUnicode); - } - if (charcode <= 0) { - charcode = glyphUnicode; - } - width = this.widths[charcode]; - if (width) { - break; - } - } - width = width || this.defaultWidth; - this._shadowWidth = width; - return width; - }, - charToGlyph: function Font_charToGlyph(charcode, isSpace) { - var fontCharCode, width, operatorListId; - var widthCode = charcode; - if (this.cMap && this.cMap.contains(charcode)) { - widthCode = this.cMap.lookup(charcode); - } - width = this.widths[widthCode]; - width = isNum(width) ? width : this.defaultWidth; - var vmetric = this.vmetrics && this.vmetrics[widthCode]; - var unicode = this.toUnicode.get(charcode) || charcode; - if (typeof unicode === 'number') { - unicode = String.fromCharCode(unicode); - } - var isInFont = charcode in this.toFontChar; - fontCharCode = this.toFontChar[charcode] || charcode; - if (this.missingFile) { - fontCharCode = mapSpecialUnicodeValues(fontCharCode); - } - if (this.isType3Font) { - operatorListId = fontCharCode; - } - var accent = null; - if (this.seacMap && this.seacMap[charcode]) { - isInFont = true; - var seac = this.seacMap[charcode]; - fontCharCode = seac.baseFontCharCode; - accent = { - fontChar: String.fromCharCode(seac.accentFontCharCode), - offset: seac.accentOffset - }; - } - var fontChar = String.fromCharCode(fontCharCode); - var glyph = this.glyphCache[charcode]; - if (!glyph || !glyph.matchesForCache(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont)) { - glyph = new Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont); - this.glyphCache[charcode] = glyph; - } - return glyph; - }, - charsToGlyphs: function Font_charsToGlyphs(chars) { - var charsCache = this.charsCache; - var glyphs, glyph, charcode; - if (charsCache) { - glyphs = charsCache[chars]; - if (glyphs) { - return glyphs; - } - } - if (!charsCache) { - charsCache = this.charsCache = Object.create(null); - } - glyphs = []; - var charsCacheKey = chars; - var i = 0, ii; - if (this.cMap) { - var c = Object.create(null); - while (i < chars.length) { - this.cMap.readCharCode(chars, i, c); - charcode = c.charcode; - var length = c.length; - i += length; - var isSpace = length === 1 && chars.charCodeAt(i - 1) === 0x20; - glyph = this.charToGlyph(charcode, isSpace); - glyphs.push(glyph); - } - } else { - for (i = 0, ii = chars.length; i < ii; ++i) { - charcode = chars.charCodeAt(i); - glyph = this.charToGlyph(charcode, charcode === 0x20); - glyphs.push(glyph); - } - } - return charsCache[charsCacheKey] = glyphs; - } - }; - return Font; - }(); - var ErrorFont = function ErrorFontClosure() { - function ErrorFont(error) { - this.error = error; - this.loadedName = 'g_font_error'; - this.loading = false; - } - ErrorFont.prototype = { - charsToGlyphs: function ErrorFont_charsToGlyphs() { - return []; - }, - exportData: function ErrorFont_exportData() { - return { error: this.error }; - } - }; - return ErrorFont; - }(); - function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { - var charCodeToGlyphId = Object.create(null); - var glyphId, charCode, baseEncoding; - var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); - if (properties.baseEncodingName) { - baseEncoding = getEncoding(properties.baseEncodingName); - for (charCode = 0; charCode < baseEncoding.length; charCode++) { - glyphId = glyphNames.indexOf(baseEncoding[charCode]); - if (glyphId >= 0) { - charCodeToGlyphId[charCode] = glyphId; - } else { - charCodeToGlyphId[charCode] = 0; - } - } - } else if (isSymbolicFont) { - for (charCode in builtInEncoding) { - charCodeToGlyphId[charCode] = builtInEncoding[charCode]; - } - } else { - baseEncoding = StandardEncoding; - for (charCode = 0; charCode < baseEncoding.length; charCode++) { - glyphId = glyphNames.indexOf(baseEncoding[charCode]); - if (glyphId >= 0) { - charCodeToGlyphId[charCode] = glyphId; - } else { - charCodeToGlyphId[charCode] = 0; - } - } - } - var differences = properties.differences, glyphsUnicodeMap; - if (differences) { - for (charCode in differences) { - var glyphName = differences[charCode]; - glyphId = glyphNames.indexOf(glyphName); - if (glyphId === -1) { - if (!glyphsUnicodeMap) { - glyphsUnicodeMap = getGlyphsUnicode(); - } - var standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); - if (standardGlyphName !== glyphName) { - glyphId = glyphNames.indexOf(standardGlyphName); - } - } - if (glyphId >= 0) { - charCodeToGlyphId[charCode] = glyphId; - } else { - charCodeToGlyphId[charCode] = 0; - } - } - } - return charCodeToGlyphId; - } - var Type1Font = function Type1FontClosure() { - function findBlock(streamBytes, signature, startIndex) { - var streamBytesLength = streamBytes.length; - var signatureLength = signature.length; - var scanLength = streamBytesLength - signatureLength; - var i = startIndex, j, found = false; - while (i < scanLength) { - j = 0; - while (j < signatureLength && streamBytes[i + j] === signature[j]) { - j++; - } - if (j >= signatureLength) { - i += j; - while (i < streamBytesLength && isSpace(streamBytes[i])) { - i++; - } - found = true; - break; - } - i++; - } - return { - found: found, - length: i - }; - } - function getHeaderBlock(stream, suggestedLength) { - var EEXEC_SIGNATURE = [ - 0x65, - 0x65, - 0x78, - 0x65, - 0x63 - ]; - var streamStartPos = stream.pos; - var headerBytes, headerBytesLength, block; - try { - headerBytes = stream.getBytes(suggestedLength); - headerBytesLength = headerBytes.length; - } catch (ex) { - if (ex instanceof MissingDataException) { - throw ex; - } - } - if (headerBytesLength === suggestedLength) { - block = findBlock(headerBytes, EEXEC_SIGNATURE, suggestedLength - 2 * EEXEC_SIGNATURE.length); - if (block.found && block.length === suggestedLength) { - return { - stream: new Stream(headerBytes), - length: suggestedLength - }; - } - } - warn('Invalid "Length1" property in Type1 font -- trying to recover.'); - stream.pos = streamStartPos; - var SCAN_BLOCK_LENGTH = 2048; - var actualLength; - while (true) { - var scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); - block = findBlock(scanBytes, EEXEC_SIGNATURE, 0); - if (block.length === 0) { - break; - } - stream.pos += block.length; - if (block.found) { - actualLength = stream.pos - streamStartPos; - break; - } - } - stream.pos = streamStartPos; - if (actualLength) { - return { - stream: new Stream(stream.getBytes(actualLength)), - length: actualLength - }; - } - warn('Unable to recover "Length1" property in Type1 font -- using as is.'); - return { - stream: new Stream(stream.getBytes(suggestedLength)), - length: suggestedLength - }; - } - function getEexecBlock(stream, suggestedLength) { - var eexecBytes = stream.getBytes(); - return { - stream: new Stream(eexecBytes), - length: eexecBytes.length - }; - } - function Type1Font(name, file, properties) { - var PFB_HEADER_SIZE = 6; - var headerBlockLength = properties.length1; - var eexecBlockLength = properties.length2; - var pfbHeader = file.peekBytes(PFB_HEADER_SIZE); - var pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01; - if (pfbHeaderPresent) { - file.skip(PFB_HEADER_SIZE); - headerBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; - } - var headerBlock = getHeaderBlock(file, headerBlockLength); - headerBlockLength = headerBlock.length; - var headerBlockParser = new Type1Parser(headerBlock.stream, false, SEAC_ANALYSIS_ENABLED); - headerBlockParser.extractFontHeader(properties); - if (pfbHeaderPresent) { - pfbHeader = file.getBytes(PFB_HEADER_SIZE); - eexecBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; - } - var eexecBlock = getEexecBlock(file, eexecBlockLength); - eexecBlockLength = eexecBlock.length; - var eexecBlockParser = new Type1Parser(eexecBlock.stream, true, SEAC_ANALYSIS_ENABLED); - var data = eexecBlockParser.extractFontProgram(); - for (var info in data.properties) { - properties[info] = data.properties[info]; - } - var charstrings = data.charstrings; - var type2Charstrings = this.getType2Charstrings(charstrings); - var subrs = this.getType2Subrs(data.subrs); - this.charstrings = charstrings; - this.data = this.wrap(name, type2Charstrings, this.charstrings, subrs, properties); - this.seacs = this.getSeacs(data.charstrings); - } - Type1Font.prototype = { - get numGlyphs() { - return this.charstrings.length + 1; - }, - getCharset: function Type1Font_getCharset() { - var charset = ['.notdef']; - var charstrings = this.charstrings; - for (var glyphId = 0; glyphId < charstrings.length; glyphId++) { - charset.push(charstrings[glyphId].glyphName); - } - return charset; - }, - getGlyphMapping: function Type1Font_getGlyphMapping(properties) { - var charstrings = this.charstrings; - var glyphNames = ['.notdef'], glyphId; - for (glyphId = 0; glyphId < charstrings.length; glyphId++) { - glyphNames.push(charstrings[glyphId].glyphName); - } - var encoding = properties.builtInEncoding; - if (encoding) { - var builtInEncoding = Object.create(null); - for (var charCode in encoding) { - glyphId = glyphNames.indexOf(encoding[charCode]); - if (glyphId >= 0) { - builtInEncoding[charCode] = glyphId; - } - } - } - return type1FontGlyphMapping(properties, builtInEncoding, glyphNames); - }, - getSeacs: function Type1Font_getSeacs(charstrings) { - var i, ii; - var seacMap = []; - for (i = 0, ii = charstrings.length; i < ii; i++) { - var charstring = charstrings[i]; - if (charstring.seac) { - seacMap[i + 1] = charstring.seac; - } - } - return seacMap; - }, - getType2Charstrings: function Type1Font_getType2Charstrings(type1Charstrings) { - var type2Charstrings = []; - for (var i = 0, ii = type1Charstrings.length; i < ii; i++) { - type2Charstrings.push(type1Charstrings[i].charstring); - } - return type2Charstrings; - }, - getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) { - var bias = 0; - var count = type1Subrs.length; - if (count < 1133) { - bias = 107; - } else if (count < 33769) { - bias = 1131; - } else { - bias = 32768; - } - var type2Subrs = []; - var i; - for (i = 0; i < bias; i++) { - type2Subrs.push([0x0B]); - } - for (i = 0; i < count; i++) { - type2Subrs.push(type1Subrs[i]); - } - return type2Subrs; - }, - wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) { - var cff = new CFF(); - cff.header = new CFFHeader(1, 0, 4, 4); - cff.names = [name]; - var topDict = new CFFTopDict(); - topDict.setByName('version', 391); - topDict.setByName('Notice', 392); - topDict.setByName('FullName', 393); - topDict.setByName('FamilyName', 394); - topDict.setByName('Weight', 395); - topDict.setByName('Encoding', null); - topDict.setByName('FontMatrix', properties.fontMatrix); - topDict.setByName('FontBBox', properties.bbox); - topDict.setByName('charset', null); - topDict.setByName('CharStrings', null); - topDict.setByName('Private', null); - cff.topDict = topDict; - var strings = new CFFStrings(); - strings.add('Version 0.11'); - strings.add('See original notice'); - strings.add(name); - strings.add(name); - strings.add('Medium'); - cff.strings = strings; - cff.globalSubrIndex = new CFFIndex(); - var count = glyphs.length; - var charsetArray = [0]; - var i, ii; - for (i = 0; i < count; i++) { - var index = CFFStandardStrings.indexOf(charstrings[i].glyphName); - if (index === -1) { - index = 0; - } - charsetArray.push(index >> 8 & 0xff, index & 0xff); - } - cff.charset = new CFFCharset(false, 0, [], charsetArray); - var charStringsIndex = new CFFIndex(); - charStringsIndex.add([ - 0x8B, - 0x0E - ]); - for (i = 0; i < count; i++) { - var glyph = glyphs[i]; - if (glyph.length === 0) { - charStringsIndex.add([ - 0x8B, - 0x0E - ]); - continue; - } - charStringsIndex.add(glyph); - } - cff.charStrings = charStringsIndex; - var privateDict = new CFFPrivateDict(); - privateDict.setByName('Subrs', null); - var fields = [ - 'BlueValues', - 'OtherBlues', - 'FamilyBlues', - 'FamilyOtherBlues', - 'StemSnapH', - 'StemSnapV', - 'BlueShift', - 'BlueFuzz', - 'BlueScale', - 'LanguageGroup', - 'ExpansionFactor', - 'ForceBold', - 'StdHW', - 'StdVW' - ]; - for (i = 0, ii = fields.length; i < ii; i++) { - var field = fields[i]; - if (!(field in properties.privateData)) { - continue; - } - var value = properties.privateData[field]; - if (isArray(value)) { - for (var j = value.length - 1; j > 0; j--) { - value[j] -= value[j - 1]; - } - } - privateDict.setByName(field, value); - } - cff.topDict.privateDict = privateDict; - var subrIndex = new CFFIndex(); - for (i = 0, ii = subrs.length; i < ii; i++) { - subrIndex.add(subrs[i]); - } - privateDict.subrsIndex = subrIndex; - var compiler = new CFFCompiler(cff); - return compiler.compile(); - } - }; - return Type1Font; - }(); - var CFFFont = function CFFFontClosure() { - function CFFFont(file, properties) { - this.properties = properties; - var parser = new CFFParser(file, properties, SEAC_ANALYSIS_ENABLED); - this.cff = parser.parse(); - var compiler = new CFFCompiler(this.cff); - this.seacs = this.cff.seacs; - try { - this.data = compiler.compile(); - } catch (e) { - warn('Failed to compile font ' + properties.loadedName); - this.data = file; - } - } - CFFFont.prototype = { - get numGlyphs() { - return this.cff.charStrings.count; - }, - getCharset: function CFFFont_getCharset() { - return this.cff.charset.charset; - }, - getGlyphMapping: function CFFFont_getGlyphMapping() { - var cff = this.cff; - var properties = this.properties; - var charsets = cff.charset.charset; - var charCodeToGlyphId; - var glyphId; - if (properties.composite) { - charCodeToGlyphId = Object.create(null); - if (cff.isCIDFont) { - for (glyphId = 0; glyphId < charsets.length; glyphId++) { - var cid = charsets[glyphId]; - var charCode = properties.cMap.charCodeOf(cid); - charCodeToGlyphId[charCode] = glyphId; - } - } else { - for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) { - charCodeToGlyphId[glyphId] = glyphId; - } - } - return charCodeToGlyphId; - } - var encoding = cff.encoding ? cff.encoding.encoding : null; - charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets); - return charCodeToGlyphId; - } - }; - return CFFFont; - }(); - (function checkSeacSupport() { - if (typeof navigator !== 'undefined' && /Windows/.test(navigator.userAgent)) { - SEAC_ANALYSIS_ENABLED = true; - } - }()); - (function checkChromeWindows() { - if (typeof navigator !== 'undefined' && /Windows.*Chrome/.test(navigator.userAgent)) { - SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = true; - } - }()); - exports.ErrorFont = ErrorFont; - exports.Font = Font; - exports.FontFlags = FontFlags; - exports.IdentityToUnicodeMap = IdentityToUnicodeMap; - exports.ToUnicodeMap = ToUnicodeMap; - exports.getFontType = getFontType; - })); - (function (root, factory) { - factory(root.pdfjsCorePsParser = {}, root.pdfjsSharedUtil, root.pdfjsCoreParser); - }(this, function (exports, sharedUtil, coreParser) { - var error = sharedUtil.error; - var isSpace = sharedUtil.isSpace; - var EOF = coreParser.EOF; - var PostScriptParser = function PostScriptParserClosure() { - function PostScriptParser(lexer) { - this.lexer = lexer; - this.operators = []; - this.token = null; - this.prev = null; - } - PostScriptParser.prototype = { - nextToken: function PostScriptParser_nextToken() { - this.prev = this.token; - this.token = this.lexer.getToken(); - }, - accept: function PostScriptParser_accept(type) { - if (this.token.type === type) { - this.nextToken(); - return true; - } - return false; - }, - expect: function PostScriptParser_expect(type) { - if (this.accept(type)) { - return true; - } - error('Unexpected symbol: found ' + this.token.type + ' expected ' + type + '.'); - }, - parse: function PostScriptParser_parse() { - this.nextToken(); - this.expect(PostScriptTokenTypes.LBRACE); - this.parseBlock(); - this.expect(PostScriptTokenTypes.RBRACE); - return this.operators; - }, - parseBlock: function PostScriptParser_parseBlock() { - while (true) { - if (this.accept(PostScriptTokenTypes.NUMBER)) { - this.operators.push(this.prev.value); - } else if (this.accept(PostScriptTokenTypes.OPERATOR)) { - this.operators.push(this.prev.value); - } else if (this.accept(PostScriptTokenTypes.LBRACE)) { - this.parseCondition(); - } else { - return; - } - } - }, - parseCondition: function PostScriptParser_parseCondition() { - var conditionLocation = this.operators.length; - this.operators.push(null, null); - this.parseBlock(); - this.expect(PostScriptTokenTypes.RBRACE); - if (this.accept(PostScriptTokenTypes.IF)) { - this.operators[conditionLocation] = this.operators.length; - this.operators[conditionLocation + 1] = 'jz'; - } else if (this.accept(PostScriptTokenTypes.LBRACE)) { - var jumpLocation = this.operators.length; - this.operators.push(null, null); - var endOfTrue = this.operators.length; - this.parseBlock(); - this.expect(PostScriptTokenTypes.RBRACE); - this.expect(PostScriptTokenTypes.IFELSE); - this.operators[jumpLocation] = this.operators.length; - this.operators[jumpLocation + 1] = 'j'; - this.operators[conditionLocation] = endOfTrue; - this.operators[conditionLocation + 1] = 'jz'; - } else { - error('PS Function: error parsing conditional.'); - } - } - }; - return PostScriptParser; - }(); - var PostScriptTokenTypes = { - LBRACE: 0, - RBRACE: 1, - NUMBER: 2, - OPERATOR: 3, - IF: 4, - IFELSE: 5 - }; - var PostScriptToken = function PostScriptTokenClosure() { - function PostScriptToken(type, value) { - this.type = type; - this.value = value; - } - var opCache = Object.create(null); - PostScriptToken.getOperator = function PostScriptToken_getOperator(op) { - var opValue = opCache[op]; - if (opValue) { - return opValue; - } - return opCache[op] = new PostScriptToken(PostScriptTokenTypes.OPERATOR, op); - }; - PostScriptToken.LBRACE = new PostScriptToken(PostScriptTokenTypes.LBRACE, '{'); - PostScriptToken.RBRACE = new PostScriptToken(PostScriptTokenTypes.RBRACE, '}'); - PostScriptToken.IF = new PostScriptToken(PostScriptTokenTypes.IF, 'IF'); - PostScriptToken.IFELSE = new PostScriptToken(PostScriptTokenTypes.IFELSE, 'IFELSE'); - return PostScriptToken; - }(); - var PostScriptLexer = function PostScriptLexerClosure() { - function PostScriptLexer(stream) { - this.stream = stream; - this.nextChar(); - this.strBuf = []; - } - PostScriptLexer.prototype = { - nextChar: function PostScriptLexer_nextChar() { - return this.currentChar = this.stream.getByte(); - }, - getToken: function PostScriptLexer_getToken() { - var comment = false; - var ch = this.currentChar; - while (true) { - if (ch < 0) { - return EOF; - } - if (comment) { - if (ch === 0x0A || ch === 0x0D) { - comment = false; - } - } else if (ch === 0x25) { - comment = true; - } else if (!isSpace(ch)) { - break; - } - ch = this.nextChar(); - } - switch (ch | 0) { - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - case 0x2B: - case 0x2D: - case 0x2E: - return new PostScriptToken(PostScriptTokenTypes.NUMBER, this.getNumber()); - case 0x7B: - this.nextChar(); - return PostScriptToken.LBRACE; - case 0x7D: - this.nextChar(); - return PostScriptToken.RBRACE; - } - var strBuf = this.strBuf; - strBuf.length = 0; - strBuf[0] = String.fromCharCode(ch); - while ((ch = this.nextChar()) >= 0 && (ch >= 0x41 && ch <= 0x5A || ch >= 0x61 && ch <= 0x7A)) { - strBuf.push(String.fromCharCode(ch)); - } - var str = strBuf.join(''); - switch (str.toLowerCase()) { - case 'if': - return PostScriptToken.IF; - case 'ifelse': - return PostScriptToken.IFELSE; - default: - return PostScriptToken.getOperator(str); - } - }, - getNumber: function PostScriptLexer_getNumber() { - var ch = this.currentChar; - var strBuf = this.strBuf; - strBuf.length = 0; - strBuf[0] = String.fromCharCode(ch); - while ((ch = this.nextChar()) >= 0) { - if (ch >= 0x30 && ch <= 0x39 || ch === 0x2D || ch === 0x2E) { - strBuf.push(String.fromCharCode(ch)); - } else { - break; - } - } - var value = parseFloat(strBuf.join('')); - if (isNaN(value)) { - error('Invalid floating point number: ' + value); - } - return value; - } - }; - return PostScriptLexer; - }(); - exports.PostScriptLexer = PostScriptLexer; - exports.PostScriptParser = PostScriptParser; - })); - (function (root, factory) { - factory(root.pdfjsCoreFunction = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCorePsParser); - }(this, function (exports, sharedUtil, corePrimitives, corePsParser) { - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var isBool = sharedUtil.isBool; - var isDict = corePrimitives.isDict; - var isStream = corePrimitives.isStream; - var PostScriptLexer = corePsParser.PostScriptLexer; - var PostScriptParser = corePsParser.PostScriptParser; - var PDFFunction = function PDFFunctionClosure() { - var CONSTRUCT_SAMPLED = 0; - var CONSTRUCT_INTERPOLATED = 2; - var CONSTRUCT_STICHED = 3; - var CONSTRUCT_POSTSCRIPT = 4; - return { - getSampleArray: function PDFFunction_getSampleArray(size, outputSize, bps, str) { - var i, ii; - var length = 1; - for (i = 0, ii = size.length; i < ii; i++) { - length *= size[i]; - } - length *= outputSize; - var array = new Array(length); - var codeSize = 0; - var codeBuf = 0; - var sampleMul = 1.0 / (Math.pow(2.0, bps) - 1); - var strBytes = str.getBytes((length * bps + 7) / 8); - var strIdx = 0; - for (i = 0; i < length; i++) { - while (codeSize < bps) { - codeBuf <<= 8; - codeBuf |= strBytes[strIdx++]; - codeSize += 8; - } - codeSize -= bps; - array[i] = (codeBuf >> codeSize) * sampleMul; - codeBuf &= (1 << codeSize) - 1; - } - return array; - }, - getIR: function PDFFunction_getIR(xref, fn) { - var dict = fn.dict; - if (!dict) { - dict = fn; - } - var types = [ - this.constructSampled, - null, - this.constructInterpolated, - this.constructStiched, - this.constructPostScript - ]; - var typeNum = dict.get('FunctionType'); - var typeFn = types[typeNum]; - if (!typeFn) { - error('Unknown type of function'); - } - return typeFn.call(this, fn, dict, xref); - }, - fromIR: function PDFFunction_fromIR(IR) { - var type = IR[0]; - switch (type) { - case CONSTRUCT_SAMPLED: - return this.constructSampledFromIR(IR); - case CONSTRUCT_INTERPOLATED: - return this.constructInterpolatedFromIR(IR); - case CONSTRUCT_STICHED: - return this.constructStichedFromIR(IR); - default: - return this.constructPostScriptFromIR(IR); - } - }, - parse: function PDFFunction_parse(xref, fn) { - var IR = this.getIR(xref, fn); - return this.fromIR(IR); - }, - parseArray: function PDFFunction_parseArray(xref, fnObj) { - if (!isArray(fnObj)) { - return this.parse(xref, fnObj); - } - var fnArray = []; - for (var j = 0, jj = fnObj.length; j < jj; j++) { - var obj = xref.fetchIfRef(fnObj[j]); - fnArray.push(PDFFunction.parse(xref, obj)); - } - return function (src, srcOffset, dest, destOffset) { - for (var i = 0, ii = fnArray.length; i < ii; i++) { - fnArray[i](src, srcOffset, dest, destOffset + i); - } - }; - }, - constructSampled: function PDFFunction_constructSampled(str, dict) { - function toMultiArray(arr) { - var inputLength = arr.length; - var out = []; - var index = 0; - for (var i = 0; i < inputLength; i += 2) { - out[index] = [ - arr[i], - arr[i + 1] - ]; - ++index; - } - return out; - } - var domain = dict.getArray('Domain'); - var range = dict.getArray('Range'); - if (!domain || !range) { - error('No domain or range'); - } - var inputSize = domain.length / 2; - var outputSize = range.length / 2; - domain = toMultiArray(domain); - range = toMultiArray(range); - var size = dict.get('Size'); - var bps = dict.get('BitsPerSample'); - var order = dict.get('Order') || 1; - if (order !== 1) { - info('No support for cubic spline interpolation: ' + order); - } - var encode = dict.getArray('Encode'); - if (!encode) { - encode = []; - for (var i = 0; i < inputSize; ++i) { - encode.push(0); - encode.push(size[i] - 1); - } - } - encode = toMultiArray(encode); - var decode = dict.getArray('Decode'); - if (!decode) { - decode = range; - } else { - decode = toMultiArray(decode); - } - var samples = this.getSampleArray(size, outputSize, bps, str); - return [ - CONSTRUCT_SAMPLED, - inputSize, - domain, - encode, - decode, - samples, - size, - outputSize, - Math.pow(2, bps) - 1, - range - ]; - }, - constructSampledFromIR: function PDFFunction_constructSampledFromIR(IR) { - function interpolate(x, xmin, xmax, ymin, ymax) { - return ymin + (x - xmin) * ((ymax - ymin) / (xmax - xmin)); - } - return function constructSampledFromIRResult(src, srcOffset, dest, destOffset) { - var m = IR[1]; - var domain = IR[2]; - var encode = IR[3]; - var decode = IR[4]; - var samples = IR[5]; - var size = IR[6]; - var n = IR[7]; - var range = IR[9]; - var cubeVertices = 1 << m; - var cubeN = new Float64Array(cubeVertices); - var cubeVertex = new Uint32Array(cubeVertices); - var i, j; - for (j = 0; j < cubeVertices; j++) { - cubeN[j] = 1; - } - var k = n, pos = 1; - for (i = 0; i < m; ++i) { - var domain_2i = domain[i][0]; - var domain_2i_1 = domain[i][1]; - var xi = Math.min(Math.max(src[srcOffset + i], domain_2i), domain_2i_1); - var e = interpolate(xi, domain_2i, domain_2i_1, encode[i][0], encode[i][1]); - var size_i = size[i]; - e = Math.min(Math.max(e, 0), size_i - 1); - var e0 = e < size_i - 1 ? Math.floor(e) : e - 1; - var n0 = e0 + 1 - e; - var n1 = e - e0; - var offset0 = e0 * k; - var offset1 = offset0 + k; - for (j = 0; j < cubeVertices; j++) { - if (j & pos) { - cubeN[j] *= n1; - cubeVertex[j] += offset1; - } else { - cubeN[j] *= n0; - cubeVertex[j] += offset0; - } - } - k *= size_i; - pos <<= 1; - } - for (j = 0; j < n; ++j) { - var rj = 0; - for (i = 0; i < cubeVertices; i++) { - rj += samples[cubeVertex[i] + j] * cubeN[i]; - } - rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]); - dest[destOffset + j] = Math.min(Math.max(rj, range[j][0]), range[j][1]); - } - }; - }, - constructInterpolated: function PDFFunction_constructInterpolated(str, dict) { - var c0 = dict.getArray('C0') || [0]; - var c1 = dict.getArray('C1') || [1]; - var n = dict.get('N'); - if (!isArray(c0) || !isArray(c1)) { - error('Illegal dictionary for interpolated function'); - } - var length = c0.length; - var diff = []; - for (var i = 0; i < length; ++i) { - diff.push(c1[i] - c0[i]); - } - return [ - CONSTRUCT_INTERPOLATED, - c0, - diff, - n - ]; - }, - constructInterpolatedFromIR: function PDFFunction_constructInterpolatedFromIR(IR) { - var c0 = IR[1]; - var diff = IR[2]; - var n = IR[3]; - var length = diff.length; - return function constructInterpolatedFromIRResult(src, srcOffset, dest, destOffset) { - var x = n === 1 ? src[srcOffset] : Math.pow(src[srcOffset], n); - for (var j = 0; j < length; ++j) { - dest[destOffset + j] = c0[j] + x * diff[j]; - } - }; - }, - constructStiched: function PDFFunction_constructStiched(fn, dict, xref) { - var domain = dict.getArray('Domain'); - if (!domain) { - error('No domain'); - } - var inputSize = domain.length / 2; - if (inputSize !== 1) { - error('Bad domain for stiched function'); - } - var fnRefs = dict.get('Functions'); - var fns = []; - for (var i = 0, ii = fnRefs.length; i < ii; ++i) { - fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i]))); - } - var bounds = dict.getArray('Bounds'); - var encode = dict.getArray('Encode'); - return [ - CONSTRUCT_STICHED, - domain, - bounds, - encode, - fns - ]; - }, - constructStichedFromIR: function PDFFunction_constructStichedFromIR(IR) { - var domain = IR[1]; - var bounds = IR[2]; - var encode = IR[3]; - var fnsIR = IR[4]; - var fns = []; - var tmpBuf = new Float32Array(1); - for (var i = 0, ii = fnsIR.length; i < ii; i++) { - fns.push(PDFFunction.fromIR(fnsIR[i])); - } - return function constructStichedFromIRResult(src, srcOffset, dest, destOffset) { - var clip = function constructStichedFromIRClip(v, min, max) { - if (v > max) { - v = max; - } else if (v < min) { - v = min; - } - return v; - }; - var v = clip(src[srcOffset], domain[0], domain[1]); - for (var i = 0, ii = bounds.length; i < ii; ++i) { - if (v < bounds[i]) { - break; - } - } - var dmin = domain[0]; - if (i > 0) { - dmin = bounds[i - 1]; - } - var dmax = domain[1]; - if (i < bounds.length) { - dmax = bounds[i]; - } - var rmin = encode[2 * i]; - var rmax = encode[2 * i + 1]; - tmpBuf[0] = dmin === dmax ? rmin : rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin); - fns[i](tmpBuf, 0, dest, destOffset); - }; - }, - constructPostScript: function PDFFunction_constructPostScript(fn, dict, xref) { - var domain = dict.getArray('Domain'); - var range = dict.getArray('Range'); - if (!domain) { - error('No domain.'); - } - if (!range) { - error('No range.'); - } - var lexer = new PostScriptLexer(fn); - var parser = new PostScriptParser(lexer); - var code = parser.parse(); - return [ - CONSTRUCT_POSTSCRIPT, - domain, - range, - code - ]; - }, - constructPostScriptFromIR: function PDFFunction_constructPostScriptFromIR(IR) { - var domain = IR[1]; - var range = IR[2]; - var code = IR[3]; - var compiled = new PostScriptCompiler().compile(code, domain, range); - if (compiled) { - return new Function('src', 'srcOffset', 'dest', 'destOffset', compiled); - } - info('Unable to compile PS function'); - var numOutputs = range.length >> 1; - var numInputs = domain.length >> 1; - var evaluator = new PostScriptEvaluator(code); - var cache = Object.create(null); - var MAX_CACHE_SIZE = 2048 * 4; - var cache_available = MAX_CACHE_SIZE; - var tmpBuf = new Float32Array(numInputs); - return function constructPostScriptFromIRResult(src, srcOffset, dest, destOffset) { - var i, value; - var key = ''; - var input = tmpBuf; - for (i = 0; i < numInputs; i++) { - value = src[srcOffset + i]; - input[i] = value; - key += value + '_'; - } - var cachedValue = cache[key]; - if (cachedValue !== undefined) { - dest.set(cachedValue, destOffset); - return; - } - var output = new Float32Array(numOutputs); - var stack = evaluator.execute(input); - var stackIndex = stack.length - numOutputs; - for (i = 0; i < numOutputs; i++) { - value = stack[stackIndex + i]; - var bound = range[i * 2]; - if (value < bound) { - value = bound; - } else { - bound = range[i * 2 + 1]; - if (value > bound) { - value = bound; - } - } - output[i] = value; - } - if (cache_available > 0) { - cache_available--; - cache[key] = output; - } - dest.set(output, destOffset); - }; - } - }; - }(); - function isPDFFunction(v) { - var fnDict; - if (typeof v !== 'object') { - return false; - } else if (isDict(v)) { - fnDict = v; - } else if (isStream(v)) { - fnDict = v.dict; - } else { - return false; - } - return fnDict.has('FunctionType'); - } - var PostScriptStack = function PostScriptStackClosure() { - var MAX_STACK_SIZE = 100; - function PostScriptStack(initialStack) { - this.stack = !initialStack ? [] : Array.prototype.slice.call(initialStack, 0); - } - PostScriptStack.prototype = { - push: function PostScriptStack_push(value) { - if (this.stack.length >= MAX_STACK_SIZE) { - error('PostScript function stack overflow.'); - } - this.stack.push(value); - }, - pop: function PostScriptStack_pop() { - if (this.stack.length <= 0) { - error('PostScript function stack underflow.'); - } - return this.stack.pop(); - }, - copy: function PostScriptStack_copy(n) { - if (this.stack.length + n >= MAX_STACK_SIZE) { - error('PostScript function stack overflow.'); - } - var stack = this.stack; - for (var i = stack.length - n, j = n - 1; j >= 0; j--, i++) { - stack.push(stack[i]); - } - }, - index: function PostScriptStack_index(n) { - this.push(this.stack[this.stack.length - n - 1]); - }, - roll: function PostScriptStack_roll(n, p) { - var stack = this.stack; - var l = stack.length - n; - var r = stack.length - 1, c = l + (p - Math.floor(p / n) * n), i, j, t; - for (i = l, j = r; i < j; i++, j--) { - t = stack[i]; - stack[i] = stack[j]; - stack[j] = t; - } - for (i = l, j = c - 1; i < j; i++, j--) { - t = stack[i]; - stack[i] = stack[j]; - stack[j] = t; - } - for (i = c, j = r; i < j; i++, j--) { - t = stack[i]; - stack[i] = stack[j]; - stack[j] = t; - } - } - }; - return PostScriptStack; - }(); - var PostScriptEvaluator = function PostScriptEvaluatorClosure() { - function PostScriptEvaluator(operators) { - this.operators = operators; - } - PostScriptEvaluator.prototype = { - execute: function PostScriptEvaluator_execute(initialStack) { - var stack = new PostScriptStack(initialStack); - var counter = 0; - var operators = this.operators; - var length = operators.length; - var operator, a, b; - while (counter < length) { - operator = operators[counter++]; - if (typeof operator === 'number') { - stack.push(operator); - continue; - } - switch (operator) { - case 'jz': - b = stack.pop(); - a = stack.pop(); - if (!a) { - counter = b; - } - break; - case 'j': - a = stack.pop(); - counter = a; - break; - case 'abs': - a = stack.pop(); - stack.push(Math.abs(a)); - break; - case 'add': - b = stack.pop(); - a = stack.pop(); - stack.push(a + b); - break; - case 'and': - b = stack.pop(); - a = stack.pop(); - if (isBool(a) && isBool(b)) { - stack.push(a && b); - } else { - stack.push(a & b); - } - break; - case 'atan': - a = stack.pop(); - stack.push(Math.atan(a)); - break; - case 'bitshift': - b = stack.pop(); - a = stack.pop(); - if (a > 0) { - stack.push(a << b); - } else { - stack.push(a >> b); - } - break; - case 'ceiling': - a = stack.pop(); - stack.push(Math.ceil(a)); - break; - case 'copy': - a = stack.pop(); - stack.copy(a); - break; - case 'cos': - a = stack.pop(); - stack.push(Math.cos(a)); - break; - case 'cvi': - a = stack.pop() | 0; - stack.push(a); - break; - case 'cvr': - break; - case 'div': - b = stack.pop(); - a = stack.pop(); - stack.push(a / b); - break; - case 'dup': - stack.copy(1); - break; - case 'eq': - b = stack.pop(); - a = stack.pop(); - stack.push(a === b); - break; - case 'exch': - stack.roll(2, 1); - break; - case 'exp': - b = stack.pop(); - a = stack.pop(); - stack.push(Math.pow(a, b)); - break; - case 'false': - stack.push(false); - break; - case 'floor': - a = stack.pop(); - stack.push(Math.floor(a)); - break; - case 'ge': - b = stack.pop(); - a = stack.pop(); - stack.push(a >= b); - break; - case 'gt': - b = stack.pop(); - a = stack.pop(); - stack.push(a > b); - break; - case 'idiv': - b = stack.pop(); - a = stack.pop(); - stack.push(a / b | 0); - break; - case 'index': - a = stack.pop(); - stack.index(a); - break; - case 'le': - b = stack.pop(); - a = stack.pop(); - stack.push(a <= b); - break; - case 'ln': - a = stack.pop(); - stack.push(Math.log(a)); - break; - case 'log': - a = stack.pop(); - stack.push(Math.log(a) / Math.LN10); - break; - case 'lt': - b = stack.pop(); - a = stack.pop(); - stack.push(a < b); - break; - case 'mod': - b = stack.pop(); - a = stack.pop(); - stack.push(a % b); - break; - case 'mul': - b = stack.pop(); - a = stack.pop(); - stack.push(a * b); - break; - case 'ne': - b = stack.pop(); - a = stack.pop(); - stack.push(a !== b); - break; - case 'neg': - a = stack.pop(); - stack.push(-a); - break; - case 'not': - a = stack.pop(); - if (isBool(a)) { - stack.push(!a); - } else { - stack.push(~a); - } - break; - case 'or': - b = stack.pop(); - a = stack.pop(); - if (isBool(a) && isBool(b)) { - stack.push(a || b); - } else { - stack.push(a | b); - } - break; - case 'pop': - stack.pop(); - break; - case 'roll': - b = stack.pop(); - a = stack.pop(); - stack.roll(a, b); - break; - case 'round': - a = stack.pop(); - stack.push(Math.round(a)); - break; - case 'sin': - a = stack.pop(); - stack.push(Math.sin(a)); - break; - case 'sqrt': - a = stack.pop(); - stack.push(Math.sqrt(a)); - break; - case 'sub': - b = stack.pop(); - a = stack.pop(); - stack.push(a - b); - break; - case 'true': - stack.push(true); - break; - case 'truncate': - a = stack.pop(); - a = a < 0 ? Math.ceil(a) : Math.floor(a); - stack.push(a); - break; - case 'xor': - b = stack.pop(); - a = stack.pop(); - if (isBool(a) && isBool(b)) { - stack.push(a !== b); - } else { - stack.push(a ^ b); - } - break; - default: - error('Unknown operator ' + operator); - break; - } - } - return stack.stack; - } - }; - return PostScriptEvaluator; - }(); - var PostScriptCompiler = function PostScriptCompilerClosure() { - function AstNode(type) { - this.type = type; - } - AstNode.prototype.visit = function (visitor) { - throw new Error('abstract method'); - }; - function AstArgument(index, min, max) { - AstNode.call(this, 'args'); - this.index = index; - this.min = min; - this.max = max; - } - AstArgument.prototype = Object.create(AstNode.prototype); - AstArgument.prototype.visit = function (visitor) { - visitor.visitArgument(this); - }; - function AstLiteral(number) { - AstNode.call(this, 'literal'); - this.number = number; - this.min = number; - this.max = number; - } - AstLiteral.prototype = Object.create(AstNode.prototype); - AstLiteral.prototype.visit = function (visitor) { - visitor.visitLiteral(this); - }; - function AstBinaryOperation(op, arg1, arg2, min, max) { - AstNode.call(this, 'binary'); - this.op = op; - this.arg1 = arg1; - this.arg2 = arg2; - this.min = min; - this.max = max; - } - AstBinaryOperation.prototype = Object.create(AstNode.prototype); - AstBinaryOperation.prototype.visit = function (visitor) { - visitor.visitBinaryOperation(this); - }; - function AstMin(arg, max) { - AstNode.call(this, 'max'); - this.arg = arg; - this.min = arg.min; - this.max = max; - } - AstMin.prototype = Object.create(AstNode.prototype); - AstMin.prototype.visit = function (visitor) { - visitor.visitMin(this); - }; - function AstVariable(index, min, max) { - AstNode.call(this, 'var'); - this.index = index; - this.min = min; - this.max = max; - } - AstVariable.prototype = Object.create(AstNode.prototype); - AstVariable.prototype.visit = function (visitor) { - visitor.visitVariable(this); - }; - function AstVariableDefinition(variable, arg) { - AstNode.call(this, 'definition'); - this.variable = variable; - this.arg = arg; - } - AstVariableDefinition.prototype = Object.create(AstNode.prototype); - AstVariableDefinition.prototype.visit = function (visitor) { - visitor.visitVariableDefinition(this); - }; - function ExpressionBuilderVisitor() { - this.parts = []; - } - ExpressionBuilderVisitor.prototype = { - visitArgument: function (arg) { - this.parts.push('Math.max(', arg.min, ', Math.min(', arg.max, ', src[srcOffset + ', arg.index, ']))'); - }, - visitVariable: function (variable) { - this.parts.push('v', variable.index); - }, - visitLiteral: function (literal) { - this.parts.push(literal.number); - }, - visitBinaryOperation: function (operation) { - this.parts.push('('); - operation.arg1.visit(this); - this.parts.push(' ', operation.op, ' '); - operation.arg2.visit(this); - this.parts.push(')'); - }, - visitVariableDefinition: function (definition) { - this.parts.push('var '); - definition.variable.visit(this); - this.parts.push(' = '); - definition.arg.visit(this); - this.parts.push(';'); - }, - visitMin: function (max) { - this.parts.push('Math.min('); - max.arg.visit(this); - this.parts.push(', ', max.max, ')'); - }, - toString: function () { - return this.parts.join(''); - } - }; - function buildAddOperation(num1, num2) { - if (num2.type === 'literal' && num2.number === 0) { - return num1; - } - if (num1.type === 'literal' && num1.number === 0) { - return num2; - } - if (num2.type === 'literal' && num1.type === 'literal') { - return new AstLiteral(num1.number + num2.number); - } - return new AstBinaryOperation('+', num1, num2, num1.min + num2.min, num1.max + num2.max); - } - function buildMulOperation(num1, num2) { - if (num2.type === 'literal') { - if (num2.number === 0) { - return new AstLiteral(0); - } else if (num2.number === 1) { - return num1; - } else if (num1.type === 'literal') { - return new AstLiteral(num1.number * num2.number); - } - } - if (num1.type === 'literal') { - if (num1.number === 0) { - return new AstLiteral(0); - } else if (num1.number === 1) { - return num2; - } - } - var min = Math.min(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); - var max = Math.max(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); - return new AstBinaryOperation('*', num1, num2, min, max); - } - function buildSubOperation(num1, num2) { - if (num2.type === 'literal') { - if (num2.number === 0) { - return num1; - } else if (num1.type === 'literal') { - return new AstLiteral(num1.number - num2.number); - } - } - if (num2.type === 'binary' && num2.op === '-' && num1.type === 'literal' && num1.number === 1 && num2.arg1.type === 'literal' && num2.arg1.number === 1) { - return num2.arg2; - } - return new AstBinaryOperation('-', num1, num2, num1.min - num2.max, num1.max - num2.min); - } - function buildMinOperation(num1, max) { - if (num1.min >= max) { - return new AstLiteral(max); - } else if (num1.max <= max) { - return num1; - } - return new AstMin(num1, max); - } - function PostScriptCompiler() { - } - PostScriptCompiler.prototype = { - compile: function PostScriptCompiler_compile(code, domain, range) { - var stack = []; - var i, ii; - var instructions = []; - var inputSize = domain.length >> 1, outputSize = range.length >> 1; - var lastRegister = 0; - var n, j; - var num1, num2, ast1, ast2, tmpVar, item; - for (i = 0; i < inputSize; i++) { - stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1])); - } - for (i = 0, ii = code.length; i < ii; i++) { - item = code[i]; - if (typeof item === 'number') { - stack.push(new AstLiteral(item)); - continue; - } - switch (item) { - case 'add': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - stack.push(buildAddOperation(num1, num2)); - break; - case 'cvr': - if (stack.length < 1) { - return null; - } - break; - case 'mul': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - stack.push(buildMulOperation(num1, num2)); - break; - case 'sub': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - stack.push(buildSubOperation(num1, num2)); - break; - case 'exch': - if (stack.length < 2) { - return null; - } - ast1 = stack.pop(); - ast2 = stack.pop(); - stack.push(ast1, ast2); - break; - case 'pop': - if (stack.length < 1) { - return null; - } - stack.pop(); - break; - case 'index': - if (stack.length < 1) { - return null; - } - num1 = stack.pop(); - if (num1.type !== 'literal') { - return null; - } - n = num1.number; - if (n < 0 || (n | 0) !== n || stack.length < n) { - return null; - } - ast1 = stack[stack.length - n - 1]; - if (ast1.type === 'literal' || ast1.type === 'var') { - stack.push(ast1); - break; - } - tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); - stack[stack.length - n - 1] = tmpVar; - stack.push(tmpVar); - instructions.push(new AstVariableDefinition(tmpVar, ast1)); - break; - case 'dup': - if (stack.length < 1) { - return null; - } - if (typeof code[i + 1] === 'number' && code[i + 2] === 'gt' && code[i + 3] === i + 7 && code[i + 4] === 'jz' && code[i + 5] === 'pop' && code[i + 6] === code[i + 1]) { - num1 = stack.pop(); - stack.push(buildMinOperation(num1, code[i + 1])); - i += 6; - break; - } - ast1 = stack[stack.length - 1]; - if (ast1.type === 'literal' || ast1.type === 'var') { - stack.push(ast1); - break; - } - tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); - stack[stack.length - 1] = tmpVar; - stack.push(tmpVar); - instructions.push(new AstVariableDefinition(tmpVar, ast1)); - break; - case 'roll': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - if (num2.type !== 'literal' || num1.type !== 'literal') { - return null; - } - j = num2.number; - n = num1.number; - if (n <= 0 || (n | 0) !== n || (j | 0) !== j || stack.length < n) { - return null; - } - j = (j % n + n) % n; - if (j === 0) { - break; - } - Array.prototype.push.apply(stack, stack.splice(stack.length - n, n - j)); - break; - default: - return null; - } - } - if (stack.length !== outputSize) { - return null; - } - var result = []; - instructions.forEach(function (instruction) { - var statementBuilder = new ExpressionBuilderVisitor(); - instruction.visit(statementBuilder); - result.push(statementBuilder.toString()); - }); - stack.forEach(function (expr, i) { - var statementBuilder = new ExpressionBuilderVisitor(); - expr.visit(statementBuilder); - var min = range[i * 2], max = range[i * 2 + 1]; - var out = [statementBuilder.toString()]; - if (min > expr.min) { - out.unshift('Math.max(', min, ', '); - out.push(')'); - } - if (max < expr.max) { - out.unshift('Math.min(', max, ', '); - out.push(')'); - } - out.unshift('dest[destOffset + ', i, '] = '); - out.push(';'); - result.push(out.join('')); - }); - return result.join('\n'); - } - }; - return PostScriptCompiler; - }(); - exports.isPDFFunction = isPDFFunction; - exports.PDFFunction = PDFFunction; - exports.PostScriptEvaluator = PostScriptEvaluator; - exports.PostScriptCompiler = PostScriptCompiler; - })); - (function (root, factory) { - factory(root.pdfjsCoreColorSpace = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreFunction); - }(this, function (exports, sharedUtil, corePrimitives, coreFunction) { - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var isString = sharedUtil.isString; - var shadow = sharedUtil.shadow; - var warn = sharedUtil.warn; - var isDict = corePrimitives.isDict; - var isName = corePrimitives.isName; - var isStream = corePrimitives.isStream; - var PDFFunction = coreFunction.PDFFunction; - var ColorSpace = function ColorSpaceClosure() { - function resizeRgbImage(src, bpc, w1, h1, w2, h2, alpha01, dest) { - var COMPONENTS = 3; - alpha01 = alpha01 !== 1 ? 0 : alpha01; - var xRatio = w1 / w2; - var yRatio = h1 / h2; - var i, j, py, newIndex = 0, oldIndex; - var xScaled = new Uint16Array(w2); - var w1Scanline = w1 * COMPONENTS; - for (i = 0; i < w2; i++) { - xScaled[i] = Math.floor(i * xRatio) * COMPONENTS; - } - for (i = 0; i < h2; i++) { - py = Math.floor(i * yRatio) * w1Scanline; - for (j = 0; j < w2; j++) { - oldIndex = py + xScaled[j]; - dest[newIndex++] = src[oldIndex++]; - dest[newIndex++] = src[oldIndex++]; - dest[newIndex++] = src[oldIndex++]; - newIndex += alpha01; - } - } - } - function ColorSpace() { - error('should not call ColorSpace constructor'); - } - ColorSpace.prototype = { - getRgb: function ColorSpace_getRgb(src, srcOffset) { - var rgb = new Uint8Array(3); - this.getRgbItem(src, srcOffset, rgb, 0); - return rgb; - }, - getRgbItem: function ColorSpace_getRgbItem(src, srcOffset, dest, destOffset) { - error('Should not call ColorSpace.getRgbItem'); - }, - getRgbBuffer: function ColorSpace_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - error('Should not call ColorSpace.getRgbBuffer'); - }, - getOutputLength: function ColorSpace_getOutputLength(inputLength, alpha01) { - error('Should not call ColorSpace.getOutputLength'); - }, - isPassthrough: function ColorSpace_isPassthrough(bits) { - return false; - }, - fillRgb: function ColorSpace_fillRgb(dest, originalWidth, originalHeight, width, height, actualHeight, bpc, comps, alpha01) { - var count = originalWidth * originalHeight; - var rgbBuf = null; - var numComponentColors = 1 << bpc; - var needsResizing = originalHeight !== height || originalWidth !== width; - var i, ii; - if (this.isPassthrough(bpc)) { - rgbBuf = comps; - } else if (this.numComps === 1 && count > numComponentColors && this.name !== 'DeviceGray' && this.name !== 'DeviceRGB') { - var allColors = bpc <= 8 ? new Uint8Array(numComponentColors) : new Uint16Array(numComponentColors); - var key; - for (i = 0; i < numComponentColors; i++) { - allColors[i] = i; - } - var colorMap = new Uint8Array(numComponentColors * 3); - this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc, 0); - var destPos, rgbPos; - if (!needsResizing) { - destPos = 0; - for (i = 0; i < count; ++i) { - key = comps[i] * 3; - dest[destPos++] = colorMap[key]; - dest[destPos++] = colorMap[key + 1]; - dest[destPos++] = colorMap[key + 2]; - destPos += alpha01; - } - } else { - rgbBuf = new Uint8Array(count * 3); - rgbPos = 0; - for (i = 0; i < count; ++i) { - key = comps[i] * 3; - rgbBuf[rgbPos++] = colorMap[key]; - rgbBuf[rgbPos++] = colorMap[key + 1]; - rgbBuf[rgbPos++] = colorMap[key + 2]; - } - } - } else { - if (!needsResizing) { - this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc, alpha01); - } else { - rgbBuf = new Uint8Array(count * 3); - this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc, 0); - } - } - if (rgbBuf) { - if (needsResizing) { - resizeRgbImage(rgbBuf, bpc, originalWidth, originalHeight, width, height, alpha01, dest); - } else { - rgbPos = 0; - destPos = 0; - for (i = 0, ii = width * actualHeight; i < ii; i++) { - dest[destPos++] = rgbBuf[rgbPos++]; - dest[destPos++] = rgbBuf[rgbPos++]; - dest[destPos++] = rgbBuf[rgbPos++]; - destPos += alpha01; - } - } - } - }, - usesZeroToOneRange: true - }; - ColorSpace.parse = function ColorSpace_parse(cs, xref, res) { - var IR = ColorSpace.parseToIR(cs, xref, res); - if (IR instanceof AlternateCS) { - return IR; - } - return ColorSpace.fromIR(IR); - }; - ColorSpace.fromIR = function ColorSpace_fromIR(IR) { - var name = isArray(IR) ? IR[0] : IR; - var whitePoint, blackPoint, gamma; - switch (name) { - case 'DeviceGrayCS': - return this.singletons.gray; - case 'DeviceRgbCS': - return this.singletons.rgb; - case 'DeviceCmykCS': - return this.singletons.cmyk; - case 'CalGrayCS': - whitePoint = IR[1]; - blackPoint = IR[2]; - gamma = IR[3]; - return new CalGrayCS(whitePoint, blackPoint, gamma); - case 'CalRGBCS': - whitePoint = IR[1]; - blackPoint = IR[2]; - gamma = IR[3]; - var matrix = IR[4]; - return new CalRGBCS(whitePoint, blackPoint, gamma, matrix); - case 'PatternCS': - var basePatternCS = IR[1]; - if (basePatternCS) { - basePatternCS = ColorSpace.fromIR(basePatternCS); - } - return new PatternCS(basePatternCS); - case 'IndexedCS': - var baseIndexedCS = IR[1]; - var hiVal = IR[2]; - var lookup = IR[3]; - return new IndexedCS(ColorSpace.fromIR(baseIndexedCS), hiVal, lookup); - case 'AlternateCS': - var numComps = IR[1]; - var alt = IR[2]; - var tintFnIR = IR[3]; - return new AlternateCS(numComps, ColorSpace.fromIR(alt), PDFFunction.fromIR(tintFnIR)); - case 'LabCS': - whitePoint = IR[1]; - blackPoint = IR[2]; - var range = IR[3]; - return new LabCS(whitePoint, blackPoint, range); - default: - error('Unknown name ' + name); - } - return null; - }; - ColorSpace.parseToIR = function ColorSpace_parseToIR(cs, xref, res) { - if (isName(cs)) { - var colorSpaces = res.get('ColorSpace'); - if (isDict(colorSpaces)) { - var refcs = colorSpaces.get(cs.name); - if (refcs) { - cs = refcs; - } - } - } - cs = xref.fetchIfRef(cs); - if (isName(cs)) { - switch (cs.name) { - case 'DeviceGray': - case 'G': - return 'DeviceGrayCS'; - case 'DeviceRGB': - case 'RGB': - return 'DeviceRgbCS'; - case 'DeviceCMYK': - case 'CMYK': - return 'DeviceCmykCS'; - case 'Pattern': - return [ - 'PatternCS', - null - ]; - default: - error('unrecognized colorspace ' + cs.name); - } - } else if (isArray(cs)) { - var mode = xref.fetchIfRef(cs[0]).name; - var numComps, params, alt, whitePoint, blackPoint, gamma; - switch (mode) { - case 'DeviceGray': - case 'G': - return 'DeviceGrayCS'; - case 'DeviceRGB': - case 'RGB': - return 'DeviceRgbCS'; - case 'DeviceCMYK': - case 'CMYK': - return 'DeviceCmykCS'; - case 'CalGray': - params = xref.fetchIfRef(cs[1]); - whitePoint = params.getArray('WhitePoint'); - blackPoint = params.getArray('BlackPoint'); - gamma = params.get('Gamma'); - return [ - 'CalGrayCS', - whitePoint, - blackPoint, - gamma - ]; - case 'CalRGB': - params = xref.fetchIfRef(cs[1]); - whitePoint = params.getArray('WhitePoint'); - blackPoint = params.getArray('BlackPoint'); - gamma = params.getArray('Gamma'); - var matrix = params.getArray('Matrix'); - return [ - 'CalRGBCS', - whitePoint, - blackPoint, - gamma, - matrix - ]; - case 'ICCBased': - var stream = xref.fetchIfRef(cs[1]); - var dict = stream.dict; - numComps = dict.get('N'); - alt = dict.get('Alternate'); - if (alt) { - var altIR = ColorSpace.parseToIR(alt, xref, res); - var altCS = ColorSpace.fromIR(altIR); - if (altCS.numComps === numComps) { - return altIR; - } - warn('ICCBased color space: Ignoring incorrect /Alternate entry.'); - } - if (numComps === 1) { - return 'DeviceGrayCS'; - } else if (numComps === 3) { - return 'DeviceRgbCS'; - } else if (numComps === 4) { - return 'DeviceCmykCS'; - } - break; - case 'Pattern': - var basePatternCS = cs[1] || null; - if (basePatternCS) { - basePatternCS = ColorSpace.parseToIR(basePatternCS, xref, res); - } - return [ - 'PatternCS', - basePatternCS - ]; - case 'Indexed': - case 'I': - var baseIndexedCS = ColorSpace.parseToIR(cs[1], xref, res); - var hiVal = xref.fetchIfRef(cs[2]) + 1; - var lookup = xref.fetchIfRef(cs[3]); - if (isStream(lookup)) { - lookup = lookup.getBytes(); - } - return [ - 'IndexedCS', - baseIndexedCS, - hiVal, - lookup - ]; - case 'Separation': - case 'DeviceN': - var name = xref.fetchIfRef(cs[1]); - numComps = isArray(name) ? name.length : 1; - alt = ColorSpace.parseToIR(cs[2], xref, res); - var tintFnIR = PDFFunction.getIR(xref, xref.fetchIfRef(cs[3])); - return [ - 'AlternateCS', - numComps, - alt, - tintFnIR - ]; - case 'Lab': - params = xref.fetchIfRef(cs[1]); - whitePoint = params.getArray('WhitePoint'); - blackPoint = params.getArray('BlackPoint'); - var range = params.getArray('Range'); - return [ - 'LabCS', - whitePoint, - blackPoint, - range - ]; - default: - error('unimplemented color space object "' + mode + '"'); - } - } else { - error('unrecognized color space object: "' + cs + '"'); - } - return null; - }; - ColorSpace.isDefaultDecode = function ColorSpace_isDefaultDecode(decode, n) { - if (!isArray(decode)) { - return true; - } - if (n * 2 !== decode.length) { - warn('The decode map is not the correct length'); - return true; - } - for (var i = 0, ii = decode.length; i < ii; i += 2) { - if (decode[i] !== 0 || decode[i + 1] !== 1) { - return false; - } - } - return true; - }; - ColorSpace.singletons = { - get gray() { - return shadow(this, 'gray', new DeviceGrayCS()); - }, - get rgb() { - return shadow(this, 'rgb', new DeviceRgbCS()); - }, - get cmyk() { - return shadow(this, 'cmyk', new DeviceCmykCS()); - } - }; - return ColorSpace; - }(); - var AlternateCS = function AlternateCSClosure() { - function AlternateCS(numComps, base, tintFn) { - this.name = 'Alternate'; - this.numComps = numComps; - this.defaultColor = new Float32Array(numComps); - for (var i = 0; i < numComps; ++i) { - this.defaultColor[i] = 1; - } - this.base = base; - this.tintFn = tintFn; - this.tmpBuf = new Float32Array(base.numComps); - } - AlternateCS.prototype = { - getRgb: ColorSpace.prototype.getRgb, - getRgbItem: function AlternateCS_getRgbItem(src, srcOffset, dest, destOffset) { - var tmpBuf = this.tmpBuf; - this.tintFn(src, srcOffset, tmpBuf, 0); - this.base.getRgbItem(tmpBuf, 0, dest, destOffset); - }, - getRgbBuffer: function AlternateCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var tintFn = this.tintFn; - var base = this.base; - var scale = 1 / ((1 << bits) - 1); - var baseNumComps = base.numComps; - var usesZeroToOneRange = base.usesZeroToOneRange; - var isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) && alpha01 === 0; - var pos = isPassthrough ? destOffset : 0; - var baseBuf = isPassthrough ? dest : new Uint8Array(baseNumComps * count); - var numComps = this.numComps; - var scaled = new Float32Array(numComps); - var tinted = new Float32Array(baseNumComps); - var i, j; - for (i = 0; i < count; i++) { - for (j = 0; j < numComps; j++) { - scaled[j] = src[srcOffset++] * scale; - } - tintFn(scaled, 0, tinted, 0); - if (usesZeroToOneRange) { - for (j = 0; j < baseNumComps; j++) { - baseBuf[pos++] = tinted[j] * 255; - } - } else { - base.getRgbItem(tinted, 0, baseBuf, pos); - pos += baseNumComps; - } - } - if (!isPassthrough) { - base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01); - } - }, - getOutputLength: function AlternateCS_getOutputLength(inputLength, alpha01) { - return this.base.getOutputLength(inputLength * this.base.numComps / this.numComps, alpha01); - }, - isPassthrough: ColorSpace.prototype.isPassthrough, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function AlternateCS_isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - }, - usesZeroToOneRange: true - }; - return AlternateCS; - }(); - var PatternCS = function PatternCSClosure() { - function PatternCS(baseCS) { - this.name = 'Pattern'; - this.base = baseCS; - } - PatternCS.prototype = {}; - return PatternCS; - }(); - var IndexedCS = function IndexedCSClosure() { - function IndexedCS(base, highVal, lookup) { - this.name = 'Indexed'; - this.numComps = 1; - this.defaultColor = new Uint8Array(this.numComps); - this.base = base; - this.highVal = highVal; - var baseNumComps = base.numComps; - var length = baseNumComps * highVal; - if (isStream(lookup)) { - this.lookup = new Uint8Array(length); - var bytes = lookup.getBytes(length); - this.lookup.set(bytes); - } else if (isString(lookup)) { - this.lookup = new Uint8Array(length); - for (var i = 0; i < length; ++i) { - this.lookup[i] = lookup.charCodeAt(i); - } - } else if (lookup instanceof Uint8Array || lookup instanceof Array) { - this.lookup = lookup; - } else { - error('Unrecognized lookup table: ' + lookup); - } - } - IndexedCS.prototype = { - getRgb: ColorSpace.prototype.getRgb, - getRgbItem: function IndexedCS_getRgbItem(src, srcOffset, dest, destOffset) { - var numComps = this.base.numComps; - var start = src[srcOffset] * numComps; - this.base.getRgbItem(this.lookup, start, dest, destOffset); - }, - getRgbBuffer: function IndexedCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var base = this.base; - var numComps = base.numComps; - var outputDelta = base.getOutputLength(numComps, alpha01); - var lookup = this.lookup; - for (var i = 0; i < count; ++i) { - var lookupPos = src[srcOffset++] * numComps; - base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01); - destOffset += outputDelta; - } - }, - getOutputLength: function IndexedCS_getOutputLength(inputLength, alpha01) { - return this.base.getOutputLength(inputLength * this.base.numComps, alpha01); - }, - isPassthrough: ColorSpace.prototype.isPassthrough, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function IndexedCS_isDefaultDecode(decodeMap) { - return true; - }, - usesZeroToOneRange: true - }; - return IndexedCS; - }(); - var DeviceGrayCS = function DeviceGrayCSClosure() { - function DeviceGrayCS() { - this.name = 'DeviceGray'; - this.numComps = 1; - this.defaultColor = new Float32Array(this.numComps); - } - DeviceGrayCS.prototype = { - getRgb: ColorSpace.prototype.getRgb, - getRgbItem: function DeviceGrayCS_getRgbItem(src, srcOffset, dest, destOffset) { - var c = src[srcOffset] * 255 | 0; - c = c < 0 ? 0 : c > 255 ? 255 : c; - dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c; - }, - getRgbBuffer: function DeviceGrayCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 255 / ((1 << bits) - 1); - var j = srcOffset, q = destOffset; - for (var i = 0; i < count; ++i) { - var c = scale * src[j++] | 0; - dest[q++] = c; - dest[q++] = c; - dest[q++] = c; - q += alpha01; - } - }, - getOutputLength: function DeviceGrayCS_getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01); - }, - isPassthrough: ColorSpace.prototype.isPassthrough, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function DeviceGrayCS_isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - }, - usesZeroToOneRange: true - }; - return DeviceGrayCS; - }(); - var DeviceRgbCS = function DeviceRgbCSClosure() { - function DeviceRgbCS() { - this.name = 'DeviceRGB'; - this.numComps = 3; - this.defaultColor = new Float32Array(this.numComps); - } - DeviceRgbCS.prototype = { - getRgb: ColorSpace.prototype.getRgb, - getRgbItem: function DeviceRgbCS_getRgbItem(src, srcOffset, dest, destOffset) { - var r = src[srcOffset] * 255 | 0; - var g = src[srcOffset + 1] * 255 | 0; - var b = src[srcOffset + 2] * 255 | 0; - dest[destOffset] = r < 0 ? 0 : r > 255 ? 255 : r; - dest[destOffset + 1] = g < 0 ? 0 : g > 255 ? 255 : g; - dest[destOffset + 2] = b < 0 ? 0 : b > 255 ? 255 : b; - }, - getRgbBuffer: function DeviceRgbCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - if (bits === 8 && alpha01 === 0) { - dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset); - return; - } - var scale = 255 / ((1 << bits) - 1); - var j = srcOffset, q = destOffset; - for (var i = 0; i < count; ++i) { - dest[q++] = scale * src[j++] | 0; - dest[q++] = scale * src[j++] | 0; - dest[q++] = scale * src[j++] | 0; - q += alpha01; - } - }, - getOutputLength: function DeviceRgbCS_getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01) / 3 | 0; - }, - isPassthrough: function DeviceRgbCS_isPassthrough(bits) { - return bits === 8; - }, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - }, - usesZeroToOneRange: true - }; - return DeviceRgbCS; - }(); - var DeviceCmykCS = function DeviceCmykCSClosure() { - function convertToRgb(src, srcOffset, srcScale, dest, destOffset) { - var c = src[srcOffset + 0] * srcScale; - var m = src[srcOffset + 1] * srcScale; - var y = src[srcOffset + 2] * srcScale; - var k = src[srcOffset + 3] * srcScale; - var r = c * (-4.387332384609988 * c + 54.48615194189176 * m + 18.82290502165302 * y + 212.25662451639585 * k + -285.2331026137004) + m * (1.7149763477362134 * m - 5.6096736904047315 * y + -17.873870861415444 * k - 5.497006427196366) + y * (-2.5217340131683033 * y - 21.248923337353073 * k + 17.5119270841813) + k * (-21.86122147463605 * k - 189.48180835922747) + 255 | 0; - var g = c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k + -79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) + k * (-20.737325471181034 * k - 187.80453709719578) + 255 | 0; - var b = c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k + -14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k + -193.58209356861505) + k * (-22.33816807309886 * k - 180.12613974708367) + 255 | 0; - dest[destOffset] = r > 255 ? 255 : r < 0 ? 0 : r; - dest[destOffset + 1] = g > 255 ? 255 : g < 0 ? 0 : g; - dest[destOffset + 2] = b > 255 ? 255 : b < 0 ? 0 : b; - } - function DeviceCmykCS() { - this.name = 'DeviceCMYK'; - this.numComps = 4; - this.defaultColor = new Float32Array(this.numComps); - this.defaultColor[3] = 1; - } - DeviceCmykCS.prototype = { - getRgb: ColorSpace.prototype.getRgb, - getRgbItem: function DeviceCmykCS_getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(src, srcOffset, 1, dest, destOffset); - }, - getRgbBuffer: function DeviceCmykCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 1 / ((1 << bits) - 1); - for (var i = 0; i < count; i++) { - convertToRgb(src, srcOffset, scale, dest, destOffset); - srcOffset += 4; - destOffset += 3 + alpha01; - } - }, - getOutputLength: function DeviceCmykCS_getOutputLength(inputLength, alpha01) { - return inputLength / 4 * (3 + alpha01) | 0; - }, - isPassthrough: ColorSpace.prototype.isPassthrough, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function DeviceCmykCS_isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - }, - usesZeroToOneRange: true - }; - return DeviceCmykCS; - }(); - var CalGrayCS = function CalGrayCSClosure() { - function CalGrayCS(whitePoint, blackPoint, gamma) { - this.name = 'CalGray'; - this.numComps = 1; - this.defaultColor = new Float32Array(this.numComps); - if (!whitePoint) { - error('WhitePoint missing - required for color space CalGray'); - } - blackPoint = blackPoint || [ - 0, - 0, - 0 - ]; - gamma = gamma || 1; - this.XW = whitePoint[0]; - this.YW = whitePoint[1]; - this.ZW = whitePoint[2]; - this.XB = blackPoint[0]; - this.YB = blackPoint[1]; - this.ZB = blackPoint[2]; - this.G = gamma; - if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { - error('Invalid WhitePoint components for ' + this.name + ', no fallback available'); - } - if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { - info('Invalid BlackPoint for ' + this.name + ', falling back to default'); - this.XB = this.YB = this.ZB = 0; - } - if (this.XB !== 0 || this.YB !== 0 || this.ZB !== 0) { - warn(this.name + ', BlackPoint: XB: ' + this.XB + ', YB: ' + this.YB + ', ZB: ' + this.ZB + ', only default values are supported.'); - } - if (this.G < 1) { - info('Invalid Gamma: ' + this.G + ' for ' + this.name + ', falling back to default'); - this.G = 1; - } - } - function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) { - var A = src[srcOffset] * scale; - var AG = Math.pow(A, cs.G); - var L = cs.YW * AG; - var val = Math.max(295.8 * Math.pow(L, 0.333333333333333333) - 40.8, 0) | 0; - dest[destOffset] = val; - dest[destOffset + 1] = val; - dest[destOffset + 2] = val; - } - CalGrayCS.prototype = { - getRgb: ColorSpace.prototype.getRgb, - getRgbItem: function CalGrayCS_getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(this, src, srcOffset, dest, destOffset, 1); - }, - getRgbBuffer: function CalGrayCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 1 / ((1 << bits) - 1); - for (var i = 0; i < count; ++i) { - convertToRgb(this, src, srcOffset, dest, destOffset, scale); - srcOffset += 1; - destOffset += 3 + alpha01; - } - }, - getOutputLength: function CalGrayCS_getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01); - }, - isPassthrough: ColorSpace.prototype.isPassthrough, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function CalGrayCS_isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - }, - usesZeroToOneRange: true - }; - return CalGrayCS; - }(); - var CalRGBCS = function CalRGBCSClosure() { - var BRADFORD_SCALE_MATRIX = new Float32Array([ - 0.8951, - 0.2664, - -0.1614, - -0.7502, - 1.7135, - 0.0367, - 0.0389, - -0.0685, - 1.0296 - ]); - var BRADFORD_SCALE_INVERSE_MATRIX = new Float32Array([ - 0.9869929, - -0.1470543, - 0.1599627, - 0.4323053, - 0.5183603, - 0.0492912, - -0.0085287, - 0.0400428, - 0.9684867 - ]); - var SRGB_D65_XYZ_TO_RGB_MATRIX = new Float32Array([ - 3.2404542, - -1.5371385, - -0.4985314, - -0.9692660, - 1.8760108, - 0.0415560, - 0.0556434, - -0.2040259, - 1.0572252 - ]); - var FLAT_WHITEPOINT_MATRIX = new Float32Array([ - 1, - 1, - 1 - ]); - var tempNormalizeMatrix = new Float32Array(3); - var tempConvertMatrix1 = new Float32Array(3); - var tempConvertMatrix2 = new Float32Array(3); - var DECODE_L_CONSTANT = Math.pow((8 + 16) / 116, 3) / 8.0; - function CalRGBCS(whitePoint, blackPoint, gamma, matrix) { - this.name = 'CalRGB'; - this.numComps = 3; - this.defaultColor = new Float32Array(this.numComps); - if (!whitePoint) { - error('WhitePoint missing - required for color space CalRGB'); - } - blackPoint = blackPoint || new Float32Array(3); - gamma = gamma || new Float32Array([ - 1, - 1, - 1 - ]); - matrix = matrix || new Float32Array([ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ]); - var XW = whitePoint[0]; - var YW = whitePoint[1]; - var ZW = whitePoint[2]; - this.whitePoint = whitePoint; - var XB = blackPoint[0]; - var YB = blackPoint[1]; - var ZB = blackPoint[2]; - this.blackPoint = blackPoint; - this.GR = gamma[0]; - this.GG = gamma[1]; - this.GB = gamma[2]; - this.MXA = matrix[0]; - this.MYA = matrix[1]; - this.MZA = matrix[2]; - this.MXB = matrix[3]; - this.MYB = matrix[4]; - this.MZB = matrix[5]; - this.MXC = matrix[6]; - this.MYC = matrix[7]; - this.MZC = matrix[8]; - if (XW < 0 || ZW < 0 || YW !== 1) { - error('Invalid WhitePoint components for ' + this.name + ', no fallback available'); - } - if (XB < 0 || YB < 0 || ZB < 0) { - info('Invalid BlackPoint for ' + this.name + ' [' + XB + ', ' + YB + ', ' + ZB + '], falling back to default'); - this.blackPoint = new Float32Array(3); - } - if (this.GR < 0 || this.GG < 0 || this.GB < 0) { - info('Invalid Gamma [' + this.GR + ', ' + this.GG + ', ' + this.GB + '] for ' + this.name + ', falling back to default'); - this.GR = this.GG = this.GB = 1; - } - if (this.MXA < 0 || this.MYA < 0 || this.MZA < 0 || this.MXB < 0 || this.MYB < 0 || this.MZB < 0 || this.MXC < 0 || this.MYC < 0 || this.MZC < 0) { - info('Invalid Matrix for ' + this.name + ' [' + this.MXA + ', ' + this.MYA + ', ' + this.MZA + this.MXB + ', ' + this.MYB + ', ' + this.MZB + this.MXC + ', ' + this.MYC + ', ' + this.MZC + '], falling back to default'); - this.MXA = this.MYB = this.MZC = 1; - this.MXB = this.MYA = this.MZA = this.MXC = this.MYC = this.MZB = 0; - } - } - function matrixProduct(a, b, result) { - result[0] = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; - result[1] = a[3] * b[0] + a[4] * b[1] + a[5] * b[2]; - result[2] = a[6] * b[0] + a[7] * b[1] + a[8] * b[2]; - } - function convertToFlat(sourceWhitePoint, LMS, result) { - result[0] = LMS[0] * 1 / sourceWhitePoint[0]; - result[1] = LMS[1] * 1 / sourceWhitePoint[1]; - result[2] = LMS[2] * 1 / sourceWhitePoint[2]; - } - function convertToD65(sourceWhitePoint, LMS, result) { - var D65X = 0.95047; - var D65Y = 1; - var D65Z = 1.08883; - result[0] = LMS[0] * D65X / sourceWhitePoint[0]; - result[1] = LMS[1] * D65Y / sourceWhitePoint[1]; - result[2] = LMS[2] * D65Z / sourceWhitePoint[2]; - } - function sRGBTransferFunction(color) { - if (color <= 0.0031308) { - return adjustToRange(0, 1, 12.92 * color); - } - return adjustToRange(0, 1, (1 + 0.055) * Math.pow(color, 1 / 2.4) - 0.055); - } - function adjustToRange(min, max, value) { - return Math.max(min, Math.min(max, value)); - } - function decodeL(L) { - if (L < 0) { - return -decodeL(-L); - } - if (L > 8.0) { - return Math.pow((L + 16) / 116, 3); - } - return L * DECODE_L_CONSTANT; - } - function compensateBlackPoint(sourceBlackPoint, XYZ_Flat, result) { - if (sourceBlackPoint[0] === 0 && sourceBlackPoint[1] === 0 && sourceBlackPoint[2] === 0) { - result[0] = XYZ_Flat[0]; - result[1] = XYZ_Flat[1]; - result[2] = XYZ_Flat[2]; - return; - } - var zeroDecodeL = decodeL(0); - var X_DST = zeroDecodeL; - var X_SRC = decodeL(sourceBlackPoint[0]); - var Y_DST = zeroDecodeL; - var Y_SRC = decodeL(sourceBlackPoint[1]); - var Z_DST = zeroDecodeL; - var Z_SRC = decodeL(sourceBlackPoint[2]); - var X_Scale = (1 - X_DST) / (1 - X_SRC); - var X_Offset = 1 - X_Scale; - var Y_Scale = (1 - Y_DST) / (1 - Y_SRC); - var Y_Offset = 1 - Y_Scale; - var Z_Scale = (1 - Z_DST) / (1 - Z_SRC); - var Z_Offset = 1 - Z_Scale; - result[0] = XYZ_Flat[0] * X_Scale + X_Offset; - result[1] = XYZ_Flat[1] * Y_Scale + Y_Offset; - result[2] = XYZ_Flat[2] * Z_Scale + Z_Offset; - } - function normalizeWhitePointToFlat(sourceWhitePoint, XYZ_In, result) { - if (sourceWhitePoint[0] === 1 && sourceWhitePoint[2] === 1) { - result[0] = XYZ_In[0]; - result[1] = XYZ_In[1]; - result[2] = XYZ_In[2]; - return; - } - var LMS = result; - matrixProduct(BRADFORD_SCALE_MATRIX, XYZ_In, LMS); - var LMS_Flat = tempNormalizeMatrix; - convertToFlat(sourceWhitePoint, LMS, LMS_Flat); - matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX, LMS_Flat, result); - } - function normalizeWhitePointToD65(sourceWhitePoint, XYZ_In, result) { - var LMS = result; - matrixProduct(BRADFORD_SCALE_MATRIX, XYZ_In, LMS); - var LMS_D65 = tempNormalizeMatrix; - convertToD65(sourceWhitePoint, LMS, LMS_D65); - matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX, LMS_D65, result); - } - function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) { - var A = adjustToRange(0, 1, src[srcOffset] * scale); - var B = adjustToRange(0, 1, src[srcOffset + 1] * scale); - var C = adjustToRange(0, 1, src[srcOffset + 2] * scale); - var AGR = Math.pow(A, cs.GR); - var BGG = Math.pow(B, cs.GG); - var CGB = Math.pow(C, cs.GB); - var X = cs.MXA * AGR + cs.MXB * BGG + cs.MXC * CGB; - var Y = cs.MYA * AGR + cs.MYB * BGG + cs.MYC * CGB; - var Z = cs.MZA * AGR + cs.MZB * BGG + cs.MZC * CGB; - var XYZ = tempConvertMatrix1; - XYZ[0] = X; - XYZ[1] = Y; - XYZ[2] = Z; - var XYZ_Flat = tempConvertMatrix2; - normalizeWhitePointToFlat(cs.whitePoint, XYZ, XYZ_Flat); - var XYZ_Black = tempConvertMatrix1; - compensateBlackPoint(cs.blackPoint, XYZ_Flat, XYZ_Black); - var XYZ_D65 = tempConvertMatrix2; - normalizeWhitePointToD65(FLAT_WHITEPOINT_MATRIX, XYZ_Black, XYZ_D65); - var SRGB = tempConvertMatrix1; - matrixProduct(SRGB_D65_XYZ_TO_RGB_MATRIX, XYZ_D65, SRGB); - var sR = sRGBTransferFunction(SRGB[0]); - var sG = sRGBTransferFunction(SRGB[1]); - var sB = sRGBTransferFunction(SRGB[2]); - dest[destOffset] = Math.round(sR * 255); - dest[destOffset + 1] = Math.round(sG * 255); - dest[destOffset + 2] = Math.round(sB * 255); - } - CalRGBCS.prototype = { - getRgb: function CalRGBCS_getRgb(src, srcOffset) { - var rgb = new Uint8Array(3); - this.getRgbItem(src, srcOffset, rgb, 0); - return rgb; - }, - getRgbItem: function CalRGBCS_getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(this, src, srcOffset, dest, destOffset, 1); - }, - getRgbBuffer: function CalRGBCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 1 / ((1 << bits) - 1); - for (var i = 0; i < count; ++i) { - convertToRgb(this, src, srcOffset, dest, destOffset, scale); - srcOffset += 3; - destOffset += 3 + alpha01; - } - }, - getOutputLength: function CalRGBCS_getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01) / 3 | 0; - }, - isPassthrough: ColorSpace.prototype.isPassthrough, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function CalRGBCS_isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - }, - usesZeroToOneRange: true - }; - return CalRGBCS; - }(); - var LabCS = function LabCSClosure() { - function LabCS(whitePoint, blackPoint, range) { - this.name = 'Lab'; - this.numComps = 3; - this.defaultColor = new Float32Array(this.numComps); - if (!whitePoint) { - error('WhitePoint missing - required for color space Lab'); - } - blackPoint = blackPoint || [ - 0, - 0, - 0 - ]; - range = range || [ - -100, - 100, - -100, - 100 - ]; - this.XW = whitePoint[0]; - this.YW = whitePoint[1]; - this.ZW = whitePoint[2]; - this.amin = range[0]; - this.amax = range[1]; - this.bmin = range[2]; - this.bmax = range[3]; - this.XB = blackPoint[0]; - this.YB = blackPoint[1]; - this.ZB = blackPoint[2]; - if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { - error('Invalid WhitePoint components, no fallback available'); - } - if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { - info('Invalid BlackPoint, falling back to default'); - this.XB = this.YB = this.ZB = 0; - } - if (this.amin > this.amax || this.bmin > this.bmax) { - info('Invalid Range, falling back to defaults'); - this.amin = -100; - this.amax = 100; - this.bmin = -100; - this.bmax = 100; - } - } - function fn_g(x) { - var result; - if (x >= 6 / 29) { - result = x * x * x; - } else { - result = 108 / 841 * (x - 4 / 29); - } - return result; - } - function decode(value, high1, low2, high2) { - return low2 + value * (high2 - low2) / high1; - } - function convertToRgb(cs, src, srcOffset, maxVal, dest, destOffset) { - var Ls = src[srcOffset]; - var as = src[srcOffset + 1]; - var bs = src[srcOffset + 2]; - if (maxVal !== false) { - Ls = decode(Ls, maxVal, 0, 100); - as = decode(as, maxVal, cs.amin, cs.amax); - bs = decode(bs, maxVal, cs.bmin, cs.bmax); - } - as = as > cs.amax ? cs.amax : as < cs.amin ? cs.amin : as; - bs = bs > cs.bmax ? cs.bmax : bs < cs.bmin ? cs.bmin : bs; - var M = (Ls + 16) / 116; - var L = M + as / 500; - var N = M - bs / 200; - var X = cs.XW * fn_g(L); - var Y = cs.YW * fn_g(M); - var Z = cs.ZW * fn_g(N); - var r, g, b; - if (cs.ZW < 1) { - r = X * 3.1339 + Y * -1.6170 + Z * -0.4906; - g = X * -0.9785 + Y * 1.9160 + Z * 0.0333; - b = X * 0.0720 + Y * -0.2290 + Z * 1.4057; - } else { - r = X * 3.2406 + Y * -1.5372 + Z * -0.4986; - g = X * -0.9689 + Y * 1.8758 + Z * 0.0415; - b = X * 0.0557 + Y * -0.2040 + Z * 1.0570; - } - dest[destOffset] = r <= 0 ? 0 : r >= 1 ? 255 : Math.sqrt(r) * 255 | 0; - dest[destOffset + 1] = g <= 0 ? 0 : g >= 1 ? 255 : Math.sqrt(g) * 255 | 0; - dest[destOffset + 2] = b <= 0 ? 0 : b >= 1 ? 255 : Math.sqrt(b) * 255 | 0; - } - LabCS.prototype = { - getRgb: ColorSpace.prototype.getRgb, - getRgbItem: function LabCS_getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(this, src, srcOffset, false, dest, destOffset); - }, - getRgbBuffer: function LabCS_getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var maxVal = (1 << bits) - 1; - for (var i = 0; i < count; i++) { - convertToRgb(this, src, srcOffset, maxVal, dest, destOffset); - srcOffset += 3; - destOffset += 3 + alpha01; - } - }, - getOutputLength: function LabCS_getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01) / 3 | 0; - }, - isPassthrough: ColorSpace.prototype.isPassthrough, - fillRgb: ColorSpace.prototype.fillRgb, - isDefaultDecode: function LabCS_isDefaultDecode(decodeMap) { - return true; - }, - usesZeroToOneRange: false - }; - return LabCS; - }(); - exports.ColorSpace = ColorSpace; - })); - (function (root, factory) { - factory(root.pdfjsCoreImage = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreColorSpace, root.pdfjsCoreStream, root.pdfjsCoreJpx); - }(this, function (exports, sharedUtil, corePrimitives, coreColorSpace, coreStream, coreJpx) { - var ImageKind = sharedUtil.ImageKind; - var assert = sharedUtil.assert; - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var warn = sharedUtil.warn; - var Name = corePrimitives.Name; - var isStream = corePrimitives.isStream; - var ColorSpace = coreColorSpace.ColorSpace; - var DecodeStream = coreStream.DecodeStream; - var JpegStream = coreStream.JpegStream; - var JpxImage = coreJpx.JpxImage; - var PDFImage = function PDFImageClosure() { - function handleImageData(image, nativeDecoder) { - if (nativeDecoder && nativeDecoder.canDecode(image)) { - return nativeDecoder.decode(image); - } - return Promise.resolve(image); - } - function decodeAndClamp(value, addend, coefficient, max) { - value = addend + value * coefficient; - return value < 0 ? 0 : value > max ? max : value; - } - function resizeImageMask(src, bpc, w1, h1, w2, h2) { - var length = w2 * h2; - var dest = bpc <= 8 ? new Uint8Array(length) : bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length); - var xRatio = w1 / w2; - var yRatio = h1 / h2; - var i, j, py, newIndex = 0, oldIndex; - var xScaled = new Uint16Array(w2); - var w1Scanline = w1; - for (i = 0; i < w2; i++) { - xScaled[i] = Math.floor(i * xRatio); - } - for (i = 0; i < h2; i++) { - py = Math.floor(i * yRatio) * w1Scanline; - for (j = 0; j < w2; j++) { - oldIndex = py + xScaled[j]; - dest[newIndex++] = src[oldIndex]; - } - } - return dest; - } - function PDFImage(xref, res, image, inline, smask, mask, isMask) { - this.image = image; - var dict = image.dict; - if (dict.has('Filter')) { - var filter = dict.get('Filter').name; - if (filter === 'JPXDecode') { - var jpxImage = new JpxImage(); - jpxImage.parseImageProperties(image.stream); - image.stream.reset(); - image.bitsPerComponent = jpxImage.bitsPerComponent; - image.numComps = jpxImage.componentsCount; - } else if (filter === 'JBIG2Decode') { - image.bitsPerComponent = 1; - image.numComps = 1; - } - } - this.width = dict.get('Width', 'W'); - this.height = dict.get('Height', 'H'); - if (this.width < 1 || this.height < 1) { - error('Invalid image width: ' + this.width + ' or height: ' + this.height); - } - this.interpolate = dict.get('Interpolate', 'I') || false; - this.imageMask = dict.get('ImageMask', 'IM') || false; - this.matte = dict.get('Matte') || false; - var bitsPerComponent = image.bitsPerComponent; - if (!bitsPerComponent) { - bitsPerComponent = dict.get('BitsPerComponent', 'BPC'); - if (!bitsPerComponent) { - if (this.imageMask) { - bitsPerComponent = 1; - } else { - error('Bits per component missing in image: ' + this.imageMask); - } - } - } - this.bpc = bitsPerComponent; - if (!this.imageMask) { - var colorSpace = dict.get('ColorSpace', 'CS'); - if (!colorSpace) { - info('JPX images (which do not require color spaces)'); - switch (image.numComps) { - case 1: - colorSpace = Name.get('DeviceGray'); - break; - case 3: - colorSpace = Name.get('DeviceRGB'); - break; - case 4: - colorSpace = Name.get('DeviceCMYK'); - break; - default: - error('JPX images with ' + this.numComps + ' color components not supported.'); - } - } - this.colorSpace = ColorSpace.parse(colorSpace, xref, res); - this.numComps = this.colorSpace.numComps; - } - this.decode = dict.getArray('Decode', 'D'); - this.needsDecode = false; - if (this.decode && (this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode) || isMask && !ColorSpace.isDefaultDecode(this.decode, 1))) { - this.needsDecode = true; - var max = (1 << bitsPerComponent) - 1; - this.decodeCoefficients = []; - this.decodeAddends = []; - for (var i = 0, j = 0; i < this.decode.length; i += 2, ++j) { - var dmin = this.decode[i]; - var dmax = this.decode[i + 1]; - this.decodeCoefficients[j] = dmax - dmin; - this.decodeAddends[j] = max * dmin; - } - } - if (smask) { - this.smask = new PDFImage(xref, res, smask, false); - } else if (mask) { - if (isStream(mask)) { - var maskDict = mask.dict, imageMask = maskDict.get('ImageMask', 'IM'); - if (!imageMask) { - warn('Ignoring /Mask in image without /ImageMask.'); - } else { - this.mask = new PDFImage(xref, res, mask, false, null, null, true); - } - } else { - this.mask = mask; - } - } - } - PDFImage.buildImage = function PDFImage_buildImage(handler, xref, res, image, inline, nativeDecoder) { - var imagePromise = handleImageData(image, nativeDecoder); - var smaskPromise; - var maskPromise; - var smask = image.dict.get('SMask'); - var mask = image.dict.get('Mask'); - if (smask) { - smaskPromise = handleImageData(smask, nativeDecoder); - maskPromise = Promise.resolve(null); - } else { - smaskPromise = Promise.resolve(null); - if (mask) { - if (isStream(mask)) { - maskPromise = handleImageData(mask, nativeDecoder); - } else if (isArray(mask)) { - maskPromise = Promise.resolve(mask); - } else { - warn('Unsupported mask format.'); - maskPromise = Promise.resolve(null); - } - } else { - maskPromise = Promise.resolve(null); - } - } - return Promise.all([ - imagePromise, - smaskPromise, - maskPromise - ]).then(function (results) { - var imageData = results[0]; - var smaskData = results[1]; - var maskData = results[2]; - return new PDFImage(xref, res, imageData, inline, smaskData, maskData); - }); - }; - PDFImage.createMask = function PDFImage_createMask(imgArray, width, height, imageIsFromDecodeStream, inverseDecode) { - var computedLength = (width + 7 >> 3) * height; - var actualLength = imgArray.byteLength; - var haveFullData = computedLength === actualLength; - var data, i; - if (imageIsFromDecodeStream && (!inverseDecode || haveFullData)) { - data = imgArray; - } else if (!inverseDecode) { - data = new Uint8Array(actualLength); - data.set(imgArray); - } else { - data = new Uint8Array(computedLength); - data.set(imgArray); - for (i = actualLength; i < computedLength; i++) { - data[i] = 0xff; - } - } - if (inverseDecode) { - for (i = 0; i < actualLength; i++) { - data[i] = ~data[i]; - } - } - return { - data: data, - width: width, - height: height - }; - }; - PDFImage.prototype = { - get drawWidth() { - return Math.max(this.width, this.smask && this.smask.width || 0, this.mask && this.mask.width || 0); - }, - get drawHeight() { - return Math.max(this.height, this.smask && this.smask.height || 0, this.mask && this.mask.height || 0); - }, - decodeBuffer: function PDFImage_decodeBuffer(buffer) { - var bpc = this.bpc; - var numComps = this.numComps; - var decodeAddends = this.decodeAddends; - var decodeCoefficients = this.decodeCoefficients; - var max = (1 << bpc) - 1; - var i, ii; - if (bpc === 1) { - for (i = 0, ii = buffer.length; i < ii; i++) { - buffer[i] = +!buffer[i]; - } - return; - } - var index = 0; - for (i = 0, ii = this.width * this.height; i < ii; i++) { - for (var j = 0; j < numComps; j++) { - buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j], decodeCoefficients[j], max); - index++; - } - } - }, - getComponents: function PDFImage_getComponents(buffer) { - var bpc = this.bpc; - if (bpc === 8) { - return buffer; - } - var width = this.width; - var height = this.height; - var numComps = this.numComps; - var length = width * height * numComps; - var bufferPos = 0; - var output = bpc <= 8 ? new Uint8Array(length) : bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length); - var rowComps = width * numComps; - var max = (1 << bpc) - 1; - var i = 0, ii, buf; - if (bpc === 1) { - var mask, loop1End, loop2End; - for (var j = 0; j < height; j++) { - loop1End = i + (rowComps & ~7); - loop2End = i + rowComps; - while (i < loop1End) { - buf = buffer[bufferPos++]; - output[i] = buf >> 7 & 1; - output[i + 1] = buf >> 6 & 1; - output[i + 2] = buf >> 5 & 1; - output[i + 3] = buf >> 4 & 1; - output[i + 4] = buf >> 3 & 1; - output[i + 5] = buf >> 2 & 1; - output[i + 6] = buf >> 1 & 1; - output[i + 7] = buf & 1; - i += 8; - } - if (i < loop2End) { - buf = buffer[bufferPos++]; - mask = 128; - while (i < loop2End) { - output[i++] = +!!(buf & mask); - mask >>= 1; - } - } - } - } else { - var bits = 0; - buf = 0; - for (i = 0, ii = length; i < ii; ++i) { - if (i % rowComps === 0) { - buf = 0; - bits = 0; - } - while (bits < bpc) { - buf = buf << 8 | buffer[bufferPos++]; - bits += 8; - } - var remainingBits = bits - bpc; - var value = buf >> remainingBits; - output[i] = value < 0 ? 0 : value > max ? max : value; - buf = buf & (1 << remainingBits) - 1; - bits = remainingBits; - } - } - return output; - }, - fillOpacity: function PDFImage_fillOpacity(rgbaBuf, width, height, actualHeight, image) { - var smask = this.smask; - var mask = this.mask; - var alphaBuf, sw, sh, i, ii, j; - if (smask) { - sw = smask.width; - sh = smask.height; - alphaBuf = new Uint8Array(sw * sh); - smask.fillGrayBuffer(alphaBuf); - if (sw !== width || sh !== height) { - alphaBuf = resizeImageMask(alphaBuf, smask.bpc, sw, sh, width, height); - } - } else if (mask) { - if (mask instanceof PDFImage) { - sw = mask.width; - sh = mask.height; - alphaBuf = new Uint8Array(sw * sh); - mask.numComps = 1; - mask.fillGrayBuffer(alphaBuf); - for (i = 0, ii = sw * sh; i < ii; ++i) { - alphaBuf[i] = 255 - alphaBuf[i]; - } - if (sw !== width || sh !== height) { - alphaBuf = resizeImageMask(alphaBuf, mask.bpc, sw, sh, width, height); - } - } else if (isArray(mask)) { - alphaBuf = new Uint8Array(width * height); - var numComps = this.numComps; - for (i = 0, ii = width * height; i < ii; ++i) { - var opacity = 0; - var imageOffset = i * numComps; - for (j = 0; j < numComps; ++j) { - var color = image[imageOffset + j]; - var maskOffset = j * 2; - if (color < mask[maskOffset] || color > mask[maskOffset + 1]) { - opacity = 255; - break; - } - } - alphaBuf[i] = opacity; - } - } else { - error('Unknown mask format.'); - } - } - if (alphaBuf) { - for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { - rgbaBuf[j] = alphaBuf[i]; - } - } else { - for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { - rgbaBuf[j] = 255; - } - } - }, - undoPreblend: function PDFImage_undoPreblend(buffer, width, height) { - var matte = this.smask && this.smask.matte; - if (!matte) { - return; - } - var matteRgb = this.colorSpace.getRgb(matte, 0); - var matteR = matteRgb[0]; - var matteG = matteRgb[1]; - var matteB = matteRgb[2]; - var length = width * height * 4; - var r, g, b; - for (var i = 0; i < length; i += 4) { - var alpha = buffer[i + 3]; - if (alpha === 0) { - buffer[i] = 255; - buffer[i + 1] = 255; - buffer[i + 2] = 255; - continue; - } - var k = 255 / alpha; - r = (buffer[i] - matteR) * k + matteR; - g = (buffer[i + 1] - matteG) * k + matteG; - b = (buffer[i + 2] - matteB) * k + matteB; - buffer[i] = r <= 0 ? 0 : r >= 255 ? 255 : r | 0; - buffer[i + 1] = g <= 0 ? 0 : g >= 255 ? 255 : g | 0; - buffer[i + 2] = b <= 0 ? 0 : b >= 255 ? 255 : b | 0; - } - }, - createImageData: function PDFImage_createImageData(forceRGBA) { - var drawWidth = this.drawWidth; - var drawHeight = this.drawHeight; - var imgData = { - width: drawWidth, - height: drawHeight - }; - var numComps = this.numComps; - var originalWidth = this.width; - var originalHeight = this.height; - var bpc = this.bpc; - var rowBytes = originalWidth * numComps * bpc + 7 >> 3; - var imgArray; - if (!forceRGBA) { - var kind; - if (this.colorSpace.name === 'DeviceGray' && bpc === 1) { - kind = ImageKind.GRAYSCALE_1BPP; - } else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8 && !this.needsDecode) { - kind = ImageKind.RGB_24BPP; - } - if (kind && !this.smask && !this.mask && drawWidth === originalWidth && drawHeight === originalHeight) { - imgData.kind = kind; - imgArray = this.getImageBytes(originalHeight * rowBytes); - if (this.image instanceof DecodeStream) { - imgData.data = imgArray; - } else { - var newArray = new Uint8Array(imgArray.length); - newArray.set(imgArray); - imgData.data = newArray; - } - if (this.needsDecode) { - assert(kind === ImageKind.GRAYSCALE_1BPP); - var buffer = imgData.data; - for (var i = 0, ii = buffer.length; i < ii; i++) { - buffer[i] ^= 0xff; - } - } - return imgData; - } - if (this.image instanceof JpegStream && !this.smask && !this.mask && (this.colorSpace.name === 'DeviceGray' || this.colorSpace.name === 'DeviceRGB' || this.colorSpace.name === 'DeviceCMYK')) { - imgData.kind = ImageKind.RGB_24BPP; - imgData.data = this.getImageBytes(originalHeight * rowBytes, drawWidth, drawHeight, true); - return imgData; - } - } - imgArray = this.getImageBytes(originalHeight * rowBytes); - var actualHeight = 0 | imgArray.length / rowBytes * drawHeight / originalHeight; - var comps = this.getComponents(imgArray); - var alpha01, maybeUndoPreblend; - if (!forceRGBA && !this.smask && !this.mask) { - imgData.kind = ImageKind.RGB_24BPP; - imgData.data = new Uint8Array(drawWidth * drawHeight * 3); - alpha01 = 0; - maybeUndoPreblend = false; - } else { - imgData.kind = ImageKind.RGBA_32BPP; - imgData.data = new Uint8Array(drawWidth * drawHeight * 4); - alpha01 = 1; - maybeUndoPreblend = true; - this.fillOpacity(imgData.data, drawWidth, drawHeight, actualHeight, comps); - } - if (this.needsDecode) { - this.decodeBuffer(comps); - } - this.colorSpace.fillRgb(imgData.data, originalWidth, originalHeight, drawWidth, drawHeight, actualHeight, bpc, comps, alpha01); - if (maybeUndoPreblend) { - this.undoPreblend(imgData.data, drawWidth, actualHeight); - } - return imgData; - }, - fillGrayBuffer: function PDFImage_fillGrayBuffer(buffer) { - var numComps = this.numComps; - if (numComps !== 1) { - error('Reading gray scale from a color image: ' + numComps); - } - var width = this.width; - var height = this.height; - var bpc = this.bpc; - var rowBytes = width * numComps * bpc + 7 >> 3; - var imgArray = this.getImageBytes(height * rowBytes); - var comps = this.getComponents(imgArray); - var i, length; - if (bpc === 1) { - length = width * height; - if (this.needsDecode) { - for (i = 0; i < length; ++i) { - buffer[i] = comps[i] - 1 & 255; - } - } else { - for (i = 0; i < length; ++i) { - buffer[i] = -comps[i] & 255; - } - } - return; - } - if (this.needsDecode) { - this.decodeBuffer(comps); - } - length = width * height; - var scale = 255 / ((1 << bpc) - 1); - for (i = 0; i < length; ++i) { - buffer[i] = scale * comps[i] | 0; - } - }, - getImageBytes: function PDFImage_getImageBytes(length, drawWidth, drawHeight, forceRGB) { - this.image.reset(); - this.image.drawWidth = drawWidth || this.width; - this.image.drawHeight = drawHeight || this.height; - this.image.forceRGB = !!forceRGB; - return this.image.getBytes(length); - } - }; - return PDFImage; - }(); - exports.PDFImage = PDFImage; - })); - (function (root, factory) { - factory(root.pdfjsCoreObj = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreCrypto, root.pdfjsCoreParser, root.pdfjsCoreChunkedStream, root.pdfjsCoreColorSpace); - }(this, function (exports, sharedUtil, corePrimitives, coreCrypto, coreParser, coreChunkedStream, coreColorSpace) { - var InvalidPDFException = sharedUtil.InvalidPDFException; - var MissingDataException = sharedUtil.MissingDataException; - var XRefParseException = sharedUtil.XRefParseException; - var assert = sharedUtil.assert; - var bytesToString = sharedUtil.bytesToString; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var isBool = sharedUtil.isBool; - var isInt = sharedUtil.isInt; - var isString = sharedUtil.isString; - var shadow = sharedUtil.shadow; - var stringToPDFString = sharedUtil.stringToPDFString; - var stringToUTF8String = sharedUtil.stringToUTF8String; - var warn = sharedUtil.warn; - var createValidAbsoluteUrl = sharedUtil.createValidAbsoluteUrl; - var Util = sharedUtil.Util; - var Ref = corePrimitives.Ref; - var RefSet = corePrimitives.RefSet; - var RefSetCache = corePrimitives.RefSetCache; - var isName = corePrimitives.isName; - var isCmd = corePrimitives.isCmd; - var isDict = corePrimitives.isDict; - var isRef = corePrimitives.isRef; - var isRefsEqual = corePrimitives.isRefsEqual; - var isStream = corePrimitives.isStream; - var CipherTransformFactory = coreCrypto.CipherTransformFactory; - var Lexer = coreParser.Lexer; - var Parser = coreParser.Parser; - var ChunkedStream = coreChunkedStream.ChunkedStream; - var ColorSpace = coreColorSpace.ColorSpace; - var Catalog = function CatalogClosure() { - function Catalog(pdfManager, xref, pageFactory) { - this.pdfManager = pdfManager; - this.xref = xref; - this.catDict = xref.getCatalogObj(); - this.fontCache = new RefSetCache(); - assert(isDict(this.catDict), 'catalog object is not a dictionary'); - this.pageFactory = pageFactory; - this.pagePromises = []; - } - Catalog.prototype = { - get metadata() { - var streamRef = this.catDict.getRaw('Metadata'); - if (!isRef(streamRef)) { - return shadow(this, 'metadata', null); - } - var encryptMetadata = !this.xref.encrypt ? false : this.xref.encrypt.encryptMetadata; - var stream = this.xref.fetch(streamRef, !encryptMetadata); - var metadata; - if (stream && isDict(stream.dict)) { - var type = stream.dict.get('Type'); - var subtype = stream.dict.get('Subtype'); - if (isName(type, 'Metadata') && isName(subtype, 'XML')) { - try { - metadata = stringToUTF8String(bytesToString(stream.getBytes())); - } catch (e) { - info('Skipping invalid metadata.'); - } - } - } - return shadow(this, 'metadata', metadata); - }, - get toplevelPagesDict() { - var pagesObj = this.catDict.get('Pages'); - assert(isDict(pagesObj), 'invalid top-level pages dictionary'); - return shadow(this, 'toplevelPagesDict', pagesObj); - }, - get documentOutline() { - var obj = null; - try { - obj = this.readDocumentOutline(); - } catch (ex) { - if (ex instanceof MissingDataException) { - throw ex; - } - warn('Unable to read document outline'); - } - return shadow(this, 'documentOutline', obj); - }, - readDocumentOutline: function Catalog_readDocumentOutline() { - var obj = this.catDict.get('Outlines'); - if (!isDict(obj)) { - return null; - } - obj = obj.getRaw('First'); - if (!isRef(obj)) { - return null; - } - var root = { items: [] }; - var queue = [{ - obj: obj, - parent: root - }]; - var processed = new RefSet(); - processed.put(obj); - var xref = this.xref, blackColor = new Uint8Array(3); - while (queue.length > 0) { - var i = queue.shift(); - var outlineDict = xref.fetchIfRef(i.obj); - if (outlineDict === null) { - continue; - } - assert(outlineDict.has('Title'), 'Invalid outline item'); - var data = { - url: null, - dest: null - }; - Catalog.parseDestDictionary({ - destDict: outlineDict, - resultObj: data, - docBaseUrl: this.pdfManager.docBaseUrl - }); - var title = outlineDict.get('Title'); - var flags = outlineDict.get('F') || 0; - var color = outlineDict.getArray('C'), rgbColor = blackColor; - if (isArray(color) && color.length === 3 && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) { - rgbColor = ColorSpace.singletons.rgb.getRgb(color, 0); - } - var outlineItem = { - dest: data.dest, - url: data.url, - unsafeUrl: data.unsafeUrl, - newWindow: data.newWindow, - title: stringToPDFString(title), - color: rgbColor, - count: outlineDict.get('Count'), - bold: !!(flags & 2), - italic: !!(flags & 1), - items: [] - }; - i.parent.items.push(outlineItem); - obj = outlineDict.getRaw('First'); - if (isRef(obj) && !processed.has(obj)) { - queue.push({ - obj: obj, - parent: outlineItem - }); - processed.put(obj); - } - obj = outlineDict.getRaw('Next'); - if (isRef(obj) && !processed.has(obj)) { - queue.push({ - obj: obj, - parent: i.parent - }); - processed.put(obj); - } - } - return root.items.length > 0 ? root.items : null; - }, - get numPages() { - var obj = this.toplevelPagesDict.get('Count'); - assert(isInt(obj), 'page count in top level pages object is not an integer'); - return shadow(this, 'num', obj); - }, - get destinations() { - function fetchDestination(dest) { - return isDict(dest) ? dest.get('D') : dest; - } - var xref = this.xref; - var dests = {}, nameTreeRef, nameDictionaryRef; - var obj = this.catDict.get('Names'); - if (obj && obj.has('Dests')) { - nameTreeRef = obj.getRaw('Dests'); - } else if (this.catDict.has('Dests')) { - nameDictionaryRef = this.catDict.get('Dests'); - } - if (nameDictionaryRef) { - obj = nameDictionaryRef; - obj.forEach(function catalogForEach(key, value) { - if (!value) { - return; - } - dests[key] = fetchDestination(value); - }); - } - if (nameTreeRef) { - var nameTree = new NameTree(nameTreeRef, xref); - var names = nameTree.getAll(); - for (var name in names) { - dests[name] = fetchDestination(names[name]); - } - } - return shadow(this, 'destinations', dests); - }, - getDestination: function Catalog_getDestination(destinationId) { - function fetchDestination(dest) { - return isDict(dest) ? dest.get('D') : dest; - } - var xref = this.xref; - var dest = null, nameTreeRef, nameDictionaryRef; - var obj = this.catDict.get('Names'); - if (obj && obj.has('Dests')) { - nameTreeRef = obj.getRaw('Dests'); - } else if (this.catDict.has('Dests')) { - nameDictionaryRef = this.catDict.get('Dests'); - } - if (nameDictionaryRef) { - var value = nameDictionaryRef.get(destinationId); - if (value) { - dest = fetchDestination(value); - } - } - if (nameTreeRef) { - var nameTree = new NameTree(nameTreeRef, xref); - dest = fetchDestination(nameTree.get(destinationId)); - } - return dest; - }, - get pageLabels() { - var obj = null; - try { - obj = this.readPageLabels(); - } catch (ex) { - if (ex instanceof MissingDataException) { - throw ex; - } - warn('Unable to read page labels.'); - } - return shadow(this, 'pageLabels', obj); - }, - readPageLabels: function Catalog_readPageLabels() { - var obj = this.catDict.getRaw('PageLabels'); - if (!obj) { - return null; - } - var pageLabels = new Array(this.numPages); - var style = null; - var prefix = ''; - var numberTree = new NumberTree(obj, this.xref); - var nums = numberTree.getAll(); - var currentLabel = '', currentIndex = 1; - for (var i = 0, ii = this.numPages; i < ii; i++) { - if (i in nums) { - var labelDict = nums[i]; - assert(isDict(labelDict), 'The PageLabel is not a dictionary.'); - var type = labelDict.get('Type'); - assert(!type || isName(type, 'PageLabel'), 'Invalid type in PageLabel dictionary.'); - var s = labelDict.get('S'); - assert(!s || isName(s), 'Invalid style in PageLabel dictionary.'); - style = s ? s.name : null; - var p = labelDict.get('P'); - assert(!p || isString(p), 'Invalid prefix in PageLabel dictionary.'); - prefix = p ? stringToPDFString(p) : ''; - var st = labelDict.get('St'); - assert(!st || isInt(st) && st >= 1, 'Invalid start in PageLabel dictionary.'); - currentIndex = st || 1; - } - switch (style) { - case 'D': - currentLabel = currentIndex; - break; - case 'R': - case 'r': - currentLabel = Util.toRoman(currentIndex, style === 'r'); - break; - case 'A': - case 'a': - var LIMIT = 26; - var A_UPPER_CASE = 0x41, A_LOWER_CASE = 0x61; - var baseCharCode = style === 'a' ? A_LOWER_CASE : A_UPPER_CASE; - var letterIndex = currentIndex - 1; - var character = String.fromCharCode(baseCharCode + letterIndex % LIMIT); - var charBuf = []; - for (var j = 0, jj = letterIndex / LIMIT | 0; j <= jj; j++) { - charBuf.push(character); - } - currentLabel = charBuf.join(''); - break; - default: - assert(!style, 'Invalid style "' + style + '" in PageLabel dictionary.'); - } - pageLabels[i] = prefix + currentLabel; - currentLabel = ''; - currentIndex++; - } - return pageLabels; - }, - get attachments() { - var xref = this.xref; - var attachments = null, nameTreeRef; - var obj = this.catDict.get('Names'); - if (obj) { - nameTreeRef = obj.getRaw('EmbeddedFiles'); - } - if (nameTreeRef) { - var nameTree = new NameTree(nameTreeRef, xref); - var names = nameTree.getAll(); - for (var name in names) { - var fs = new FileSpec(names[name], xref); - if (!attachments) { - attachments = Object.create(null); - } - attachments[stringToPDFString(name)] = fs.serializable; - } - } - return shadow(this, 'attachments', attachments); - }, - get javaScript() { - var xref = this.xref; - var obj = this.catDict.get('Names'); - var javaScript = []; - function appendIfJavaScriptDict(jsDict) { - var type = jsDict.get('S'); - if (!isName(type, 'JavaScript')) { - return; - } - var js = jsDict.get('JS'); - if (isStream(js)) { - js = bytesToString(js.getBytes()); - } else if (!isString(js)) { - return; - } - javaScript.push(stringToPDFString(js)); - } - if (obj && obj.has('JavaScript')) { - var nameTree = new NameTree(obj.getRaw('JavaScript'), xref); - var names = nameTree.getAll(); - for (var name in names) { - var jsDict = names[name]; - if (isDict(jsDict)) { - appendIfJavaScriptDict(jsDict); - } - } - } - var openactionDict = this.catDict.get('OpenAction'); - if (isDict(openactionDict, 'Action')) { - var actionType = openactionDict.get('S'); - if (isName(actionType, 'Named')) { - var action = openactionDict.get('N'); - if (isName(action, 'Print')) { - javaScript.push('print({});'); - } - } else { - appendIfJavaScriptDict(openactionDict); - } - } - return shadow(this, 'javaScript', javaScript); - }, - cleanup: function Catalog_cleanup() { - var promises = []; - this.fontCache.forEach(function (promise) { - promises.push(promise); - }); - return Promise.all(promises).then(function (translatedFonts) { - for (var i = 0, ii = translatedFonts.length; i < ii; i++) { - var font = translatedFonts[i].dict; - delete font.translated; - } - this.fontCache.clear(); - }.bind(this)); - }, - getPage: function Catalog_getPage(pageIndex) { - if (!(pageIndex in this.pagePromises)) { - this.pagePromises[pageIndex] = this.getPageDict(pageIndex).then(function (a) { - var dict = a[0]; - var ref = a[1]; - return this.pageFactory.createPage(pageIndex, dict, ref, this.fontCache); - }.bind(this)); - } - return this.pagePromises[pageIndex]; - }, - getPageDict: function Catalog_getPageDict(pageIndex) { - var capability = createPromiseCapability(); - var nodesToVisit = [this.catDict.getRaw('Pages')]; - var currentPageIndex = 0; - var xref = this.xref; - var checkAllKids = false; - function next() { - while (nodesToVisit.length) { - var currentNode = nodesToVisit.pop(); - if (isRef(currentNode)) { - xref.fetchAsync(currentNode).then(function (obj) { - if (isDict(obj, 'Page') || isDict(obj) && !obj.has('Kids')) { - if (pageIndex === currentPageIndex) { - capability.resolve([ - obj, - currentNode - ]); - } else { - currentPageIndex++; - next(); - } - return; - } - nodesToVisit.push(obj); - next(); - }, capability.reject); - return; - } - assert(isDict(currentNode), 'page dictionary kid reference points to wrong type of object'); - var count = currentNode.get('Count'); - if (count === 0) { - checkAllKids = true; - } - if (currentPageIndex + count <= pageIndex) { - currentPageIndex += count; - continue; - } - var kids = currentNode.get('Kids'); - assert(isArray(kids), 'page dictionary kids object is not an array'); - if (!checkAllKids && count === kids.length) { - nodesToVisit = [kids[pageIndex - currentPageIndex]]; - currentPageIndex = pageIndex; - continue; - } else { - for (var last = kids.length - 1; last >= 0; last--) { - nodesToVisit.push(kids[last]); - } - } - } - capability.reject('Page index ' + pageIndex + ' not found.'); - } - next(); - return capability.promise; - }, - getPageIndex: function Catalog_getPageIndex(pageRef) { - var xref = this.xref; - function pagesBeforeRef(kidRef) { - var total = 0; - var parentRef; - return xref.fetchAsync(kidRef).then(function (node) { - if (isRefsEqual(kidRef, pageRef) && !isDict(node, 'Page') && !(isDict(node) && !node.has('Type') && node.has('Contents'))) { - throw new Error('The reference does not point to a /Page Dict.'); - } - if (!node) { - return null; - } - assert(isDict(node), 'node must be a Dict.'); - parentRef = node.getRaw('Parent'); - return node.getAsync('Parent'); - }).then(function (parent) { - if (!parent) { - return null; - } - assert(isDict(parent), 'parent must be a Dict.'); - return parent.getAsync('Kids'); - }).then(function (kids) { - if (!kids) { - return null; - } - var kidPromises = []; - var found = false; - for (var i = 0; i < kids.length; i++) { - var kid = kids[i]; - assert(isRef(kid), 'kid must be a Ref.'); - if (kid.num === kidRef.num) { - found = true; - break; - } - kidPromises.push(xref.fetchAsync(kid).then(function (kid) { - if (kid.has('Count')) { - var count = kid.get('Count'); - total += count; - } else { - total++; - } - })); - } - if (!found) { - error('kid ref not found in parents kids'); - } - return Promise.all(kidPromises).then(function () { - return [ - total, - parentRef - ]; - }); - }); - } - var total = 0; - function next(ref) { - return pagesBeforeRef(ref).then(function (args) { - if (!args) { - return total; - } - var count = args[0]; - var parentRef = args[1]; - total += count; - return next(parentRef); - }); - } - return next(pageRef); - } - }; - Catalog.parseDestDictionary = function Catalog_parseDestDictionary(params) { - function addDefaultProtocolToUrl(url) { - if (url.indexOf('www.') === 0) { - return 'http://' + url; - } - return url; - } - function tryConvertUrlEncoding(url) { - try { - return stringToUTF8String(url); - } catch (e) { - return url; - } - } - var destDict = params.destDict; - if (!isDict(destDict)) { - warn('Catalog_parseDestDictionary: "destDict" must be a dictionary.'); - return; - } - var resultObj = params.resultObj; - if (typeof resultObj !== 'object') { - warn('Catalog_parseDestDictionary: "resultObj" must be an object.'); - return; - } - var docBaseUrl = params.docBaseUrl || null; - var action = destDict.get('A'), url, dest; - if (isDict(action)) { - var linkType = action.get('S').name; - switch (linkType) { - case 'URI': - url = action.get('URI'); - if (isName(url)) { - url = '/' + url.name; - } else if (isString(url)) { - url = addDefaultProtocolToUrl(url); - } - break; - case 'GoTo': - dest = action.get('D'); - break; - case 'Launch': - case 'GoToR': - var urlDict = action.get('F'); - if (isDict(urlDict)) { - url = urlDict.get('F') || null; - } else if (isString(urlDict)) { - url = urlDict; - } - var remoteDest = action.get('D'); - if (remoteDest) { - if (isName(remoteDest)) { - remoteDest = remoteDest.name; - } - if (isString(url)) { - var baseUrl = url.split('#')[0]; - if (isString(remoteDest)) { - url = baseUrl + '#' + (/^\d+$/.test(remoteDest) ? 'nameddest=' : '') + remoteDest; - } else if (isArray(remoteDest)) { - url = baseUrl + '#' + JSON.stringify(remoteDest); - } - } - } - var newWindow = action.get('NewWindow'); - if (isBool(newWindow)) { - resultObj.newWindow = newWindow; - } - break; - case 'Named': - var namedAction = action.get('N'); - if (isName(namedAction)) { - resultObj.action = namedAction.name; - } - break; - case 'JavaScript': - var jsAction = action.get('JS'), js; - if (isStream(jsAction)) { - js = bytesToString(jsAction.getBytes()); - } else if (isString(jsAction)) { - js = jsAction; - } - if (js) { - var URL_OPEN_METHODS = [ - 'app.launchURL', - 'window.open' - ]; - var regex = new RegExp('^(?:' + URL_OPEN_METHODS.join('|') + ')' + '\\((?:\'|\")(\\S+)(?:\'|\")(?:,|\\))'); - var jsUrl = regex.exec(stringToPDFString(js), 'i'); - if (jsUrl && jsUrl[1]) { - url = jsUrl[1]; - break; - } - } - default: - warn('Catalog_parseDestDictionary: Unrecognized link type "' + linkType + '".'); - break; - } - } else if (destDict.has('Dest')) { - dest = destDict.get('Dest'); - } - if (isString(url)) { - url = tryConvertUrlEncoding(url); - var absoluteUrl = createValidAbsoluteUrl(url, docBaseUrl); - if (absoluteUrl) { - resultObj.url = absoluteUrl.href; - } - resultObj.unsafeUrl = url; - } - if (dest) { - if (isName(dest)) { - dest = dest.name; - } - if (isString(dest) || isArray(dest)) { - resultObj.dest = dest; - } - } - }; - return Catalog; - }(); - var XRef = function XRefClosure() { - function XRef(stream, pdfManager) { - this.stream = stream; - this.pdfManager = pdfManager; - this.entries = []; - this.xrefstms = Object.create(null); - this.cache = []; - this.stats = { - streamTypes: [], - fontTypes: [] - }; - } - XRef.prototype = { - setStartXRef: function XRef_setStartXRef(startXRef) { - this.startXRefQueue = [startXRef]; - }, - parse: function XRef_parse(recoveryMode) { - var trailerDict; - if (!recoveryMode) { - trailerDict = this.readXRef(); - } else { - warn('Indexing all PDF objects'); - trailerDict = this.indexObjects(); - } - trailerDict.assignXref(this); - this.trailer = trailerDict; - var encrypt = trailerDict.get('Encrypt'); - if (isDict(encrypt)) { - var ids = trailerDict.get('ID'); - var fileId = ids && ids.length ? ids[0] : ''; - encrypt.suppressEncryption = true; - this.encrypt = new CipherTransformFactory(encrypt, fileId, this.pdfManager.password); - } - if (!(this.root = trailerDict.get('Root'))) { - error('Invalid root reference'); - } - }, - processXRefTable: function XRef_processXRefTable(parser) { - if (!('tableState' in this)) { - this.tableState = { - entryNum: 0, - streamPos: parser.lexer.stream.pos, - parserBuf1: parser.buf1, - parserBuf2: parser.buf2 - }; - } - var obj = this.readXRefTable(parser); - if (!isCmd(obj, 'trailer')) { - error('Invalid XRef table: could not find trailer dictionary'); - } - var dict = parser.getObj(); - if (!isDict(dict) && dict.dict) { - dict = dict.dict; - } - if (!isDict(dict)) { - error('Invalid XRef table: could not parse trailer dictionary'); - } - delete this.tableState; - return dict; - }, - readXRefTable: function XRef_readXRefTable(parser) { - var stream = parser.lexer.stream; - var tableState = this.tableState; - stream.pos = tableState.streamPos; - parser.buf1 = tableState.parserBuf1; - parser.buf2 = tableState.parserBuf2; - var obj; - while (true) { - if (!('firstEntryNum' in tableState) || !('entryCount' in tableState)) { - if (isCmd(obj = parser.getObj(), 'trailer')) { - break; - } - tableState.firstEntryNum = obj; - tableState.entryCount = parser.getObj(); - } - var first = tableState.firstEntryNum; - var count = tableState.entryCount; - if (!isInt(first) || !isInt(count)) { - error('Invalid XRef table: wrong types in subsection header'); - } - for (var i = tableState.entryNum; i < count; i++) { - tableState.streamPos = stream.pos; - tableState.entryNum = i; - tableState.parserBuf1 = parser.buf1; - tableState.parserBuf2 = parser.buf2; - var entry = {}; - entry.offset = parser.getObj(); - entry.gen = parser.getObj(); - var type = parser.getObj(); - if (isCmd(type, 'f')) { - entry.free = true; - } else if (isCmd(type, 'n')) { - entry.uncompressed = true; - } - if (!isInt(entry.offset) || !isInt(entry.gen) || !(entry.free || entry.uncompressed)) { - error('Invalid entry in XRef subsection: ' + first + ', ' + count); - } - if (i === 0 && entry.free && first === 1) { - first = 0; - } - if (!this.entries[i + first]) { - this.entries[i + first] = entry; - } - } - tableState.entryNum = 0; - tableState.streamPos = stream.pos; - tableState.parserBuf1 = parser.buf1; - tableState.parserBuf2 = parser.buf2; - delete tableState.firstEntryNum; - delete tableState.entryCount; - } - if (this.entries[0] && !this.entries[0].free) { - error('Invalid XRef table: unexpected first object'); - } - return obj; - }, - processXRefStream: function XRef_processXRefStream(stream) { - if (!('streamState' in this)) { - var streamParameters = stream.dict; - var byteWidths = streamParameters.get('W'); - var range = streamParameters.get('Index'); - if (!range) { - range = [ - 0, - streamParameters.get('Size') - ]; - } - this.streamState = { - entryRanges: range, - byteWidths: byteWidths, - entryNum: 0, - streamPos: stream.pos - }; - } - this.readXRefStream(stream); - delete this.streamState; - return stream.dict; - }, - readXRefStream: function XRef_readXRefStream(stream) { - var i, j; - var streamState = this.streamState; - stream.pos = streamState.streamPos; - var byteWidths = streamState.byteWidths; - var typeFieldWidth = byteWidths[0]; - var offsetFieldWidth = byteWidths[1]; - var generationFieldWidth = byteWidths[2]; - var entryRanges = streamState.entryRanges; - while (entryRanges.length > 0) { - var first = entryRanges[0]; - var n = entryRanges[1]; - if (!isInt(first) || !isInt(n)) { - error('Invalid XRef range fields: ' + first + ', ' + n); - } - if (!isInt(typeFieldWidth) || !isInt(offsetFieldWidth) || !isInt(generationFieldWidth)) { - error('Invalid XRef entry fields length: ' + first + ', ' + n); - } - for (i = streamState.entryNum; i < n; ++i) { - streamState.entryNum = i; - streamState.streamPos = stream.pos; - var type = 0, offset = 0, generation = 0; - for (j = 0; j < typeFieldWidth; ++j) { - type = type << 8 | stream.getByte(); - } - if (typeFieldWidth === 0) { - type = 1; - } - for (j = 0; j < offsetFieldWidth; ++j) { - offset = offset << 8 | stream.getByte(); - } - for (j = 0; j < generationFieldWidth; ++j) { - generation = generation << 8 | stream.getByte(); - } - var entry = {}; - entry.offset = offset; - entry.gen = generation; - switch (type) { - case 0: - entry.free = true; - break; - case 1: - entry.uncompressed = true; - break; - case 2: - break; - default: - error('Invalid XRef entry type: ' + type); - } - if (!this.entries[first + i]) { - this.entries[first + i] = entry; - } - } - streamState.entryNum = 0; - streamState.streamPos = stream.pos; - entryRanges.splice(0, 2); - } - }, - indexObjects: function XRef_indexObjects() { - var TAB = 0x9, LF = 0xA, CR = 0xD, SPACE = 0x20; - var PERCENT = 0x25, LT = 0x3C; - function readToken(data, offset) { - var token = '', ch = data[offset]; - while (ch !== LF && ch !== CR && ch !== LT) { - if (++offset >= data.length) { - break; - } - token += String.fromCharCode(ch); - ch = data[offset]; - } - return token; - } - function skipUntil(data, offset, what) { - var length = what.length, dataLength = data.length; - var skipped = 0; - while (offset < dataLength) { - var i = 0; - while (i < length && data[offset + i] === what[i]) { - ++i; - } - if (i >= length) { - break; - } - offset++; - skipped++; - } - return skipped; - } - var objRegExp = /^(\d+)\s+(\d+)\s+obj\b/; - var trailerBytes = new Uint8Array([ - 116, - 114, - 97, - 105, - 108, - 101, - 114 - ]); - var startxrefBytes = new Uint8Array([ - 115, - 116, - 97, - 114, - 116, - 120, - 114, - 101, - 102 - ]); - var endobjBytes = new Uint8Array([ - 101, - 110, - 100, - 111, - 98, - 106 - ]); - var xrefBytes = new Uint8Array([ - 47, - 88, - 82, - 101, - 102 - ]); - this.entries.length = 0; - var stream = this.stream; - stream.pos = 0; - var buffer = stream.getBytes(); - var position = stream.start, length = buffer.length; - var trailers = [], xrefStms = []; - while (position < length) { - var ch = buffer[position]; - if (ch === TAB || ch === LF || ch === CR || ch === SPACE) { - ++position; - continue; - } - if (ch === PERCENT) { - do { - ++position; - if (position >= length) { - break; - } - ch = buffer[position]; - } while (ch !== LF && ch !== CR); - continue; - } - var token = readToken(buffer, position); - var m; - if (token.indexOf('xref') === 0 && (token.length === 4 || /\s/.test(token[4]))) { - position += skipUntil(buffer, position, trailerBytes); - trailers.push(position); - position += skipUntil(buffer, position, startxrefBytes); - } else if (m = objRegExp.exec(token)) { - if (typeof this.entries[m[1]] === 'undefined') { - this.entries[m[1]] = { - offset: position - stream.start, - gen: m[2] | 0, - uncompressed: true - }; - } - var contentLength = skipUntil(buffer, position, endobjBytes) + 7; - var content = buffer.subarray(position, position + contentLength); - var xrefTagOffset = skipUntil(content, 0, xrefBytes); - if (xrefTagOffset < contentLength && content[xrefTagOffset + 5] < 64) { - xrefStms.push(position - stream.start); - this.xrefstms[position - stream.start] = 1; - } - position += contentLength; - } else if (token.indexOf('trailer') === 0 && (token.length === 7 || /\s/.test(token[7]))) { - trailers.push(position); - position += skipUntil(buffer, position, startxrefBytes); - } else { - position += token.length + 1; - } - } - var i, ii; - for (i = 0, ii = xrefStms.length; i < ii; ++i) { - this.startXRefQueue.push(xrefStms[i]); - this.readXRef(true); - } - var dict; - for (i = 0, ii = trailers.length; i < ii; ++i) { - stream.pos = trailers[i]; - var parser = new Parser(new Lexer(stream), true, this, true); - var obj = parser.getObj(); - if (!isCmd(obj, 'trailer')) { - continue; - } - dict = parser.getObj(); - if (!isDict(dict)) { - continue; - } - if (dict.has('ID')) { - return dict; - } - } - if (dict) { - return dict; - } - throw new InvalidPDFException('Invalid PDF structure'); - }, - readXRef: function XRef_readXRef(recoveryMode) { - var stream = this.stream; - try { - while (this.startXRefQueue.length) { - var startXRef = this.startXRefQueue[0]; - stream.pos = startXRef + stream.start; - var parser = new Parser(new Lexer(stream), true, this); - var obj = parser.getObj(); - var dict; - if (isCmd(obj, 'xref')) { - dict = this.processXRefTable(parser); - if (!this.topDict) { - this.topDict = dict; - } - obj = dict.get('XRefStm'); - if (isInt(obj)) { - var pos = obj; - if (!(pos in this.xrefstms)) { - this.xrefstms[pos] = 1; - this.startXRefQueue.push(pos); - } - } - } else if (isInt(obj)) { - if (!isInt(parser.getObj()) || !isCmd(parser.getObj(), 'obj') || !isStream(obj = parser.getObj())) { - error('Invalid XRef stream'); - } - dict = this.processXRefStream(obj); - if (!this.topDict) { - this.topDict = dict; - } - if (!dict) { - error('Failed to read XRef stream'); - } - } else { - error('Invalid XRef stream header'); - } - obj = dict.get('Prev'); - if (isInt(obj)) { - this.startXRefQueue.push(obj); - } else if (isRef(obj)) { - this.startXRefQueue.push(obj.num); - } - this.startXRefQueue.shift(); - } - return this.topDict; - } catch (e) { - if (e instanceof MissingDataException) { - throw e; - } - info('(while reading XRef): ' + e); - } - if (recoveryMode) { - return; - } - throw new XRefParseException(); - }, - getEntry: function XRef_getEntry(i) { - var xrefEntry = this.entries[i]; - if (xrefEntry && !xrefEntry.free && xrefEntry.offset) { - return xrefEntry; - } - return null; - }, - fetchIfRef: function XRef_fetchIfRef(obj, suppressEncryption) { - if (!isRef(obj)) { - return obj; - } - return this.fetch(obj, suppressEncryption); - }, - fetch: function XRef_fetch(ref, suppressEncryption) { - assert(isRef(ref), 'ref object is not a reference'); - var num = ref.num; - if (num in this.cache) { - var cacheEntry = this.cache[num]; - return cacheEntry; - } - var xrefEntry = this.getEntry(num); - if (xrefEntry === null) { - return this.cache[num] = null; - } - if (xrefEntry.uncompressed) { - xrefEntry = this.fetchUncompressed(ref, xrefEntry, suppressEncryption); - } else { - xrefEntry = this.fetchCompressed(xrefEntry, suppressEncryption); - } - if (isDict(xrefEntry)) { - xrefEntry.objId = ref.toString(); - } else if (isStream(xrefEntry)) { - xrefEntry.dict.objId = ref.toString(); - } - return xrefEntry; - }, - fetchUncompressed: function XRef_fetchUncompressed(ref, xrefEntry, suppressEncryption) { - var gen = ref.gen; - var num = ref.num; - if (xrefEntry.gen !== gen) { - error('inconsistent generation in XRef'); - } - var stream = this.stream.makeSubStream(xrefEntry.offset + this.stream.start); - var parser = new Parser(new Lexer(stream), true, this); - var obj1 = parser.getObj(); - var obj2 = parser.getObj(); - var obj3 = parser.getObj(); - if (!isInt(obj1) || parseInt(obj1, 10) !== num || !isInt(obj2) || parseInt(obj2, 10) !== gen || !isCmd(obj3)) { - error('bad XRef entry'); - } - if (!isCmd(obj3, 'obj')) { - if (obj3.cmd.indexOf('obj') === 0) { - num = parseInt(obj3.cmd.substring(3), 10); - if (!isNaN(num)) { - return num; - } - } - error('bad XRef entry'); - } - if (this.encrypt && !suppressEncryption) { - xrefEntry = parser.getObj(this.encrypt.createCipherTransform(num, gen)); - } else { - xrefEntry = parser.getObj(); - } - if (!isStream(xrefEntry)) { - this.cache[num] = xrefEntry; - } - return xrefEntry; - }, - fetchCompressed: function XRef_fetchCompressed(xrefEntry, suppressEncryption) { - var tableOffset = xrefEntry.offset; - var stream = this.fetch(new Ref(tableOffset, 0)); - if (!isStream(stream)) { - error('bad ObjStm stream'); - } - var first = stream.dict.get('First'); - var n = stream.dict.get('N'); - if (!isInt(first) || !isInt(n)) { - error('invalid first and n parameters for ObjStm stream'); - } - var parser = new Parser(new Lexer(stream), false, this); - parser.allowStreams = true; - var i, entries = [], num, nums = []; - for (i = 0; i < n; ++i) { - num = parser.getObj(); - if (!isInt(num)) { - error('invalid object number in the ObjStm stream: ' + num); - } - nums.push(num); - var offset = parser.getObj(); - if (!isInt(offset)) { - error('invalid object offset in the ObjStm stream: ' + offset); - } - } - for (i = 0; i < n; ++i) { - entries.push(parser.getObj()); - if (isCmd(parser.buf1, 'endobj')) { - parser.shift(); - } - num = nums[i]; - var entry = this.entries[num]; - if (entry && entry.offset === tableOffset && entry.gen === i) { - this.cache[num] = entries[i]; - } - } - xrefEntry = entries[xrefEntry.gen]; - if (xrefEntry === undefined) { - error('bad XRef entry for compressed object'); - } - return xrefEntry; - }, - fetchIfRefAsync: function XRef_fetchIfRefAsync(obj, suppressEncryption) { - if (!isRef(obj)) { - return Promise.resolve(obj); - } - return this.fetchAsync(obj, suppressEncryption); - }, - fetchAsync: function XRef_fetchAsync(ref, suppressEncryption) { - var streamManager = this.stream.manager; - var xref = this; - return new Promise(function tryFetch(resolve, reject) { - try { - resolve(xref.fetch(ref, suppressEncryption)); - } catch (e) { - if (e instanceof MissingDataException) { - streamManager.requestRange(e.begin, e.end).then(function () { - tryFetch(resolve, reject); - }, reject); - return; - } - reject(e); - } - }); - }, - getCatalogObj: function XRef_getCatalogObj() { - return this.root; - } - }; - return XRef; - }(); - var NameOrNumberTree = function NameOrNumberTreeClosure() { - function NameOrNumberTree(root, xref) { - throw new Error('Cannot initialize NameOrNumberTree.'); - } - NameOrNumberTree.prototype = { - getAll: function NameOrNumberTree_getAll() { - var dict = Object.create(null); - if (!this.root) { - return dict; - } - var xref = this.xref; - var processed = new RefSet(); - processed.put(this.root); - var queue = [this.root]; - while (queue.length > 0) { - var i, n; - var obj = xref.fetchIfRef(queue.shift()); - if (!isDict(obj)) { - continue; - } - if (obj.has('Kids')) { - var kids = obj.get('Kids'); - for (i = 0, n = kids.length; i < n; i++) { - var kid = kids[i]; - assert(!processed.has(kid), 'Duplicate entry in "' + this._type + '" tree.'); - queue.push(kid); - processed.put(kid); - } - continue; - } - var entries = obj.get(this._type); - if (isArray(entries)) { - for (i = 0, n = entries.length; i < n; i += 2) { - dict[xref.fetchIfRef(entries[i])] = xref.fetchIfRef(entries[i + 1]); - } - } - } - return dict; - }, - get: function NameOrNumberTree_get(key) { - if (!this.root) { - return null; - } - var xref = this.xref; - var kidsOrEntries = xref.fetchIfRef(this.root); - var loopCount = 0; - var MAX_LEVELS = 10; - var l, r, m; - while (kidsOrEntries.has('Kids')) { - if (++loopCount > MAX_LEVELS) { - warn('Search depth limit reached for "' + this._type + '" tree.'); - return null; - } - var kids = kidsOrEntries.get('Kids'); - if (!isArray(kids)) { - return null; - } - l = 0; - r = kids.length - 1; - while (l <= r) { - m = l + r >> 1; - var kid = xref.fetchIfRef(kids[m]); - var limits = kid.get('Limits'); - if (key < xref.fetchIfRef(limits[0])) { - r = m - 1; - } else if (key > xref.fetchIfRef(limits[1])) { - l = m + 1; - } else { - kidsOrEntries = xref.fetchIfRef(kids[m]); - break; - } - } - if (l > r) { - return null; - } - } - var entries = kidsOrEntries.get(this._type); - if (isArray(entries)) { - l = 0; - r = entries.length - 2; - while (l <= r) { - m = l + r & ~1; - var currentKey = xref.fetchIfRef(entries[m]); - if (key < currentKey) { - r = m - 2; - } else if (key > currentKey) { - l = m + 2; - } else { - return xref.fetchIfRef(entries[m + 1]); - } - } - } - return null; - } - }; - return NameOrNumberTree; - }(); - var NameTree = function NameTreeClosure() { - function NameTree(root, xref) { - this.root = root; - this.xref = xref; - this._type = 'Names'; - } - Util.inherit(NameTree, NameOrNumberTree, {}); - return NameTree; - }(); - var NumberTree = function NumberTreeClosure() { - function NumberTree(root, xref) { - this.root = root; - this.xref = xref; - this._type = 'Nums'; - } - Util.inherit(NumberTree, NameOrNumberTree, {}); - return NumberTree; - }(); - var FileSpec = function FileSpecClosure() { - function FileSpec(root, xref) { - if (!root || !isDict(root)) { - return; - } - this.xref = xref; - this.root = root; - if (root.has('FS')) { - this.fs = root.get('FS'); - } - this.description = root.has('Desc') ? stringToPDFString(root.get('Desc')) : ''; - if (root.has('RF')) { - warn('Related file specifications are not supported'); - } - this.contentAvailable = true; - if (!root.has('EF')) { - this.contentAvailable = false; - warn('Non-embedded file specifications are not supported'); - } - } - function pickPlatformItem(dict) { - if (dict.has('UF')) { - return dict.get('UF'); - } else if (dict.has('F')) { - return dict.get('F'); - } else if (dict.has('Unix')) { - return dict.get('Unix'); - } else if (dict.has('Mac')) { - return dict.get('Mac'); - } else if (dict.has('DOS')) { - return dict.get('DOS'); - } - return null; - } - FileSpec.prototype = { - get filename() { - if (!this._filename && this.root) { - var filename = pickPlatformItem(this.root) || 'unnamed'; - this._filename = stringToPDFString(filename).replace(/\\\\/g, '\\').replace(/\\\//g, '/').replace(/\\/g, '/'); - } - return this._filename; - }, - get content() { - if (!this.contentAvailable) { - return null; - } - if (!this.contentRef && this.root) { - this.contentRef = pickPlatformItem(this.root.get('EF')); - } - var content = null; - if (this.contentRef) { - var xref = this.xref; - var fileObj = xref.fetchIfRef(this.contentRef); - if (fileObj && isStream(fileObj)) { - content = fileObj.getBytes(); - } else { - warn('Embedded file specification points to non-existing/invalid ' + 'content'); - } - } else { - warn('Embedded file specification does not have a content'); - } - return content; - }, - get serializable() { - return { - filename: this.filename, - content: this.content - }; - } - }; - return FileSpec; - }(); - var ObjectLoader = function () { - function mayHaveChildren(value) { - return isRef(value) || isDict(value) || isArray(value) || isStream(value); - } - function addChildren(node, nodesToVisit) { - var value; - if (isDict(node) || isStream(node)) { - var map; - if (isDict(node)) { - map = node.map; - } else { - map = node.dict.map; - } - for (var key in map) { - value = map[key]; - if (mayHaveChildren(value)) { - nodesToVisit.push(value); - } - } - } else if (isArray(node)) { - for (var i = 0, ii = node.length; i < ii; i++) { - value = node[i]; - if (mayHaveChildren(value)) { - nodesToVisit.push(value); - } - } - } - } - function ObjectLoader(obj, keys, xref) { - this.obj = obj; - this.keys = keys; - this.xref = xref; - this.refSet = null; - this.capability = null; - } - ObjectLoader.prototype = { - load: function ObjectLoader_load() { - var keys = this.keys; - this.capability = createPromiseCapability(); - if (!(this.xref.stream instanceof ChunkedStream) || this.xref.stream.getMissingChunks().length === 0) { - this.capability.resolve(); - return this.capability.promise; - } - this.refSet = new RefSet(); - var nodesToVisit = []; - for (var i = 0; i < keys.length; i++) { - nodesToVisit.push(this.obj[keys[i]]); - } - this._walk(nodesToVisit); - return this.capability.promise; - }, - _walk: function ObjectLoader_walk(nodesToVisit) { - var nodesToRevisit = []; - var pendingRequests = []; - while (nodesToVisit.length) { - var currentNode = nodesToVisit.pop(); - if (isRef(currentNode)) { - if (this.refSet.has(currentNode)) { - continue; - } - try { - var ref = currentNode; - this.refSet.put(ref); - currentNode = this.xref.fetch(currentNode); - } catch (e) { - if (!(e instanceof MissingDataException)) { - throw e; - } - nodesToRevisit.push(currentNode); - pendingRequests.push({ - begin: e.begin, - end: e.end - }); - } - } - if (currentNode && currentNode.getBaseStreams) { - var baseStreams = currentNode.getBaseStreams(); - var foundMissingData = false; - for (var i = 0; i < baseStreams.length; i++) { - var stream = baseStreams[i]; - if (stream.getMissingChunks && stream.getMissingChunks().length) { - foundMissingData = true; - pendingRequests.push({ - begin: stream.start, - end: stream.end - }); - } - } - if (foundMissingData) { - nodesToRevisit.push(currentNode); - } - } - addChildren(currentNode, nodesToVisit); - } - if (pendingRequests.length) { - this.xref.stream.manager.requestRanges(pendingRequests).then(function pendingRequestCallback() { - nodesToVisit = nodesToRevisit; - for (var i = 0; i < nodesToRevisit.length; i++) { - var node = nodesToRevisit[i]; - if (isRef(node)) { - this.refSet.remove(node); - } - } - this._walk(nodesToVisit); - }.bind(this), this.capability.reject); - return; - } - this.refSet = null; - this.capability.resolve(); - } - }; - return ObjectLoader; - }(); - exports.Catalog = Catalog; - exports.ObjectLoader = ObjectLoader; - exports.XRef = XRef; - exports.FileSpec = FileSpec; - })); - (function (root, factory) { - factory(root.pdfjsCorePattern = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreFunction, root.pdfjsCoreColorSpace); - }(this, function (exports, sharedUtil, corePrimitives, coreFunction, coreColorSpace) { - var UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES; - var MissingDataException = sharedUtil.MissingDataException; - var Util = sharedUtil.Util; - var assert = sharedUtil.assert; - var error = sharedUtil.error; - var info = sharedUtil.info; - var warn = sharedUtil.warn; - var isStream = corePrimitives.isStream; - var PDFFunction = coreFunction.PDFFunction; - var ColorSpace = coreColorSpace.ColorSpace; - var ShadingType = { - FUNCTION_BASED: 1, - AXIAL: 2, - RADIAL: 3, - FREE_FORM_MESH: 4, - LATTICE_FORM_MESH: 5, - COONS_PATCH_MESH: 6, - TENSOR_PATCH_MESH: 7 - }; - var Pattern = function PatternClosure() { - function Pattern() { - error('should not call Pattern constructor'); - } - Pattern.prototype = { - getPattern: function Pattern_getPattern(ctx) { - error('Should not call Pattern.getStyle: ' + ctx); - } - }; - Pattern.parseShading = function Pattern_parseShading(shading, matrix, xref, res, handler) { - var dict = isStream(shading) ? shading.dict : shading; - var type = dict.get('ShadingType'); - try { - switch (type) { - case ShadingType.AXIAL: - case ShadingType.RADIAL: - return new Shadings.RadialAxial(dict, matrix, xref, res); - case ShadingType.FREE_FORM_MESH: - case ShadingType.LATTICE_FORM_MESH: - case ShadingType.COONS_PATCH_MESH: - case ShadingType.TENSOR_PATCH_MESH: - return new Shadings.Mesh(shading, matrix, xref, res); - default: - throw new Error('Unsupported ShadingType: ' + type); - } - } catch (ex) { - if (ex instanceof MissingDataException) { - throw ex; - } - handler.send('UnsupportedFeature', { featureId: UNSUPPORTED_FEATURES.shadingPattern }); - warn(ex); - return new Shadings.Dummy(); - } - }; - return Pattern; - }(); - var Shadings = {}; - Shadings.SMALL_NUMBER = 1e-6; - Shadings.RadialAxial = function RadialAxialClosure() { - function RadialAxial(dict, matrix, xref, res) { - this.matrix = matrix; - this.coordsArr = dict.getArray('Coords'); - this.shadingType = dict.get('ShadingType'); - this.type = 'Pattern'; - var cs = dict.get('ColorSpace', 'CS'); - cs = ColorSpace.parse(cs, xref, res); - this.cs = cs; - var t0 = 0.0, t1 = 1.0; - if (dict.has('Domain')) { - var domainArr = dict.getArray('Domain'); - t0 = domainArr[0]; - t1 = domainArr[1]; - } - var extendStart = false, extendEnd = false; - if (dict.has('Extend')) { - var extendArr = dict.getArray('Extend'); - extendStart = extendArr[0]; - extendEnd = extendArr[1]; - } - if (this.shadingType === ShadingType.RADIAL && (!extendStart || !extendEnd)) { - var x1 = this.coordsArr[0]; - var y1 = this.coordsArr[1]; - var r1 = this.coordsArr[2]; - var x2 = this.coordsArr[3]; - var y2 = this.coordsArr[4]; - var r2 = this.coordsArr[5]; - var distance = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); - if (r1 <= r2 + distance && r2 <= r1 + distance) { - warn('Unsupported radial gradient.'); - } - } - this.extendStart = extendStart; - this.extendEnd = extendEnd; - var fnObj = dict.get('Function'); - var fn = PDFFunction.parseArray(xref, fnObj); - var diff = t1 - t0; - var step = diff / 10; - var colorStops = this.colorStops = []; - if (t0 >= t1 || step <= 0) { - info('Bad shading domain.'); - return; - } - var color = new Float32Array(cs.numComps), ratio = new Float32Array(1); - var rgbColor; - for (var i = t0; i <= t1; i += step) { - ratio[0] = i; - fn(ratio, 0, color, 0); - rgbColor = cs.getRgb(color, 0); - var cssColor = Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); - colorStops.push([ - (i - t0) / diff, - cssColor - ]); - } - var background = 'transparent'; - if (dict.has('Background')) { - rgbColor = cs.getRgb(dict.get('Background'), 0); - background = Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); - } - if (!extendStart) { - colorStops.unshift([ - 0, - background - ]); - colorStops[1][0] += Shadings.SMALL_NUMBER; - } - if (!extendEnd) { - colorStops[colorStops.length - 1][0] -= Shadings.SMALL_NUMBER; - colorStops.push([ - 1, - background - ]); - } - this.colorStops = colorStops; - } - RadialAxial.prototype = { - getIR: function RadialAxial_getIR() { - var coordsArr = this.coordsArr; - var shadingType = this.shadingType; - var type, p0, p1, r0, r1; - if (shadingType === ShadingType.AXIAL) { - p0 = [ - coordsArr[0], - coordsArr[1] - ]; - p1 = [ - coordsArr[2], - coordsArr[3] - ]; - r0 = null; - r1 = null; - type = 'axial'; - } else if (shadingType === ShadingType.RADIAL) { - p0 = [ - coordsArr[0], - coordsArr[1] - ]; - p1 = [ - coordsArr[3], - coordsArr[4] - ]; - r0 = coordsArr[2]; - r1 = coordsArr[5]; - type = 'radial'; - } else { - error('getPattern type unknown: ' + shadingType); - } - var matrix = this.matrix; - if (matrix) { - p0 = Util.applyTransform(p0, matrix); - p1 = Util.applyTransform(p1, matrix); - if (shadingType === ShadingType.RADIAL) { - var scale = Util.singularValueDecompose2dScale(matrix); - r0 *= scale[0]; - r1 *= scale[1]; - } - } - return [ - 'RadialAxial', - type, - this.colorStops, - p0, - p1, - r0, - r1 - ]; - } - }; - return RadialAxial; - }(); - Shadings.Mesh = function MeshClosure() { - function MeshStreamReader(stream, context) { - this.stream = stream; - this.context = context; - this.buffer = 0; - this.bufferLength = 0; - var numComps = context.numComps; - this.tmpCompsBuf = new Float32Array(numComps); - var csNumComps = context.colorSpace.numComps; - this.tmpCsCompsBuf = context.colorFn ? new Float32Array(csNumComps) : this.tmpCompsBuf; - } - MeshStreamReader.prototype = { - get hasData() { - if (this.stream.end) { - return this.stream.pos < this.stream.end; - } - if (this.bufferLength > 0) { - return true; - } - var nextByte = this.stream.getByte(); - if (nextByte < 0) { - return false; - } - this.buffer = nextByte; - this.bufferLength = 8; - return true; - }, - readBits: function MeshStreamReader_readBits(n) { - var buffer = this.buffer; - var bufferLength = this.bufferLength; - if (n === 32) { - if (bufferLength === 0) { - return (this.stream.getByte() << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte()) >>> 0; - } - buffer = buffer << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte(); - var nextByte = this.stream.getByte(); - this.buffer = nextByte & (1 << bufferLength) - 1; - return (buffer << 8 - bufferLength | (nextByte & 0xFF) >> bufferLength) >>> 0; - } - if (n === 8 && bufferLength === 0) { - return this.stream.getByte(); - } - while (bufferLength < n) { - buffer = buffer << 8 | this.stream.getByte(); - bufferLength += 8; - } - bufferLength -= n; - this.bufferLength = bufferLength; - this.buffer = buffer & (1 << bufferLength) - 1; - return buffer >> bufferLength; - }, - align: function MeshStreamReader_align() { - this.buffer = 0; - this.bufferLength = 0; - }, - readFlag: function MeshStreamReader_readFlag() { - return this.readBits(this.context.bitsPerFlag); - }, - readCoordinate: function MeshStreamReader_readCoordinate() { - var bitsPerCoordinate = this.context.bitsPerCoordinate; - var xi = this.readBits(bitsPerCoordinate); - var yi = this.readBits(bitsPerCoordinate); - var decode = this.context.decode; - var scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) : 2.3283064365386963e-10; - return [ - xi * scale * (decode[1] - decode[0]) + decode[0], - yi * scale * (decode[3] - decode[2]) + decode[2] - ]; - }, - readComponents: function MeshStreamReader_readComponents() { - var numComps = this.context.numComps; - var bitsPerComponent = this.context.bitsPerComponent; - var scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) : 2.3283064365386963e-10; - var decode = this.context.decode; - var components = this.tmpCompsBuf; - for (var i = 0, j = 4; i < numComps; i++, j += 2) { - var ci = this.readBits(bitsPerComponent); - components[i] = ci * scale * (decode[j + 1] - decode[j]) + decode[j]; - } - var color = this.tmpCsCompsBuf; - if (this.context.colorFn) { - this.context.colorFn(components, 0, color, 0); - } - return this.context.colorSpace.getRgb(color, 0); - } - }; - function decodeType4Shading(mesh, reader) { - var coords = mesh.coords; - var colors = mesh.colors; - var operators = []; - var ps = []; - var verticesLeft = 0; - while (reader.hasData) { - var f = reader.readFlag(); - var coord = reader.readCoordinate(); - var color = reader.readComponents(); - if (verticesLeft === 0) { - assert(0 <= f && f <= 2, 'Unknown type4 flag'); - switch (f) { - case 0: - verticesLeft = 3; - break; - case 1: - ps.push(ps[ps.length - 2], ps[ps.length - 1]); - verticesLeft = 1; - break; - case 2: - ps.push(ps[ps.length - 3], ps[ps.length - 1]); - verticesLeft = 1; - break; - } - operators.push(f); - } - ps.push(coords.length); - coords.push(coord); - colors.push(color); - verticesLeft--; - reader.align(); - } - mesh.figures.push({ - type: 'triangles', - coords: new Int32Array(ps), - colors: new Int32Array(ps) - }); - } - function decodeType5Shading(mesh, reader, verticesPerRow) { - var coords = mesh.coords; - var colors = mesh.colors; - var ps = []; - while (reader.hasData) { - var coord = reader.readCoordinate(); - var color = reader.readComponents(); - ps.push(coords.length); - coords.push(coord); - colors.push(color); - } - mesh.figures.push({ - type: 'lattice', - coords: new Int32Array(ps), - colors: new Int32Array(ps), - verticesPerRow: verticesPerRow - }); - } - var MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3; - var MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20; - var TRIANGLE_DENSITY = 20; - var getB = function getBClosure() { - function buildB(count) { - var lut = []; - for (var i = 0; i <= count; i++) { - var t = i / count, t_ = 1 - t; - lut.push(new Float32Array([ - t_ * t_ * t_, - 3 * t * t_ * t_, - 3 * t * t * t_, - t * t * t - ])); - } - return lut; - } - var cache = []; - return function getB(count) { - if (!cache[count]) { - cache[count] = buildB(count); - } - return cache[count]; - }; - }(); - function buildFigureFromPatch(mesh, index) { - var figure = mesh.figures[index]; - assert(figure.type === 'patch', 'Unexpected patch mesh figure'); - var coords = mesh.coords, colors = mesh.colors; - var pi = figure.coords; - var ci = figure.colors; - var figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); - var figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); - var figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); - var figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); - var splitXBy = Math.ceil((figureMaxX - figureMinX) * TRIANGLE_DENSITY / (mesh.bounds[2] - mesh.bounds[0])); - splitXBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy)); - var splitYBy = Math.ceil((figureMaxY - figureMinY) * TRIANGLE_DENSITY / (mesh.bounds[3] - mesh.bounds[1])); - splitYBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy)); - var verticesPerRow = splitXBy + 1; - var figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow); - var figureColors = new Int32Array((splitYBy + 1) * verticesPerRow); - var k = 0; - var cl = new Uint8Array(3), cr = new Uint8Array(3); - var c0 = colors[ci[0]], c1 = colors[ci[1]], c2 = colors[ci[2]], c3 = colors[ci[3]]; - var bRow = getB(splitYBy), bCol = getB(splitXBy); - for (var row = 0; row <= splitYBy; row++) { - cl[0] = (c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy | 0; - cl[1] = (c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy | 0; - cl[2] = (c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy | 0; - cr[0] = (c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy | 0; - cr[1] = (c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy | 0; - cr[2] = (c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy | 0; - for (var col = 0; col <= splitXBy; col++, k++) { - if ((row === 0 || row === splitYBy) && (col === 0 || col === splitXBy)) { - continue; - } - var x = 0, y = 0; - var q = 0; - for (var i = 0; i <= 3; i++) { - for (var j = 0; j <= 3; j++, q++) { - var m = bRow[row][i] * bCol[col][j]; - x += coords[pi[q]][0] * m; - y += coords[pi[q]][1] * m; - } - } - figureCoords[k] = coords.length; - coords.push([ - x, - y - ]); - figureColors[k] = colors.length; - var newColor = new Uint8Array(3); - newColor[0] = (cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy | 0; - newColor[1] = (cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy | 0; - newColor[2] = (cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy | 0; - colors.push(newColor); - } - } - figureCoords[0] = pi[0]; - figureColors[0] = ci[0]; - figureCoords[splitXBy] = pi[3]; - figureColors[splitXBy] = ci[1]; - figureCoords[verticesPerRow * splitYBy] = pi[12]; - figureColors[verticesPerRow * splitYBy] = ci[2]; - figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15]; - figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3]; - mesh.figures[index] = { - type: 'lattice', - coords: figureCoords, - colors: figureColors, - verticesPerRow: verticesPerRow - }; - } - function decodeType6Shading(mesh, reader) { - var coords = mesh.coords; - var colors = mesh.colors; - var ps = new Int32Array(16); - var cs = new Int32Array(4); - while (reader.hasData) { - var f = reader.readFlag(); - assert(0 <= f && f <= 3, 'Unknown type6 flag'); - var i, ii; - var pi = coords.length; - for (i = 0, ii = f !== 0 ? 8 : 12; i < ii; i++) { - coords.push(reader.readCoordinate()); - } - var ci = colors.length; - for (i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { - colors.push(reader.readComponents()); - } - var tmp1, tmp2, tmp3, tmp4; - switch (f) { - case 0: - ps[12] = pi + 3; - ps[13] = pi + 4; - ps[14] = pi + 5; - ps[15] = pi + 6; - ps[8] = pi + 2; - ps[11] = pi + 7; - ps[4] = pi + 1; - ps[7] = pi + 8; - ps[0] = pi; - ps[1] = pi + 11; - ps[2] = pi + 10; - ps[3] = pi + 9; - cs[2] = ci + 1; - cs[3] = ci + 2; - cs[0] = ci; - cs[1] = ci + 3; - break; - case 1: - tmp1 = ps[12]; - tmp2 = ps[13]; - tmp3 = ps[14]; - tmp4 = ps[15]; - ps[12] = tmp4; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = tmp3; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[2]; - tmp2 = cs[3]; - cs[2] = tmp2; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 2: - tmp1 = ps[15]; - tmp2 = ps[11]; - ps[12] = ps[3]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[7]; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[3]; - cs[2] = cs[1]; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 3: - ps[12] = ps[0]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[1]; - ps[11] = pi + 3; - ps[4] = ps[2]; - ps[7] = pi + 4; - ps[0] = ps[3]; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - cs[2] = cs[0]; - cs[3] = ci; - cs[0] = cs[1]; - cs[1] = ci + 1; - break; - } - ps[5] = coords.length; - coords.push([ - (-4 * coords[ps[0]][0] - coords[ps[15]][0] + 6 * (coords[ps[4]][0] + coords[ps[1]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9, - (-4 * coords[ps[0]][1] - coords[ps[15]][1] + 6 * (coords[ps[4]][1] + coords[ps[1]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9 - ]); - ps[6] = coords.length; - coords.push([ - (-4 * coords[ps[3]][0] - coords[ps[12]][0] + 6 * (coords[ps[2]][0] + coords[ps[7]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9, - (-4 * coords[ps[3]][1] - coords[ps[12]][1] + 6 * (coords[ps[2]][1] + coords[ps[7]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9 - ]); - ps[9] = coords.length; - coords.push([ - (-4 * coords[ps[12]][0] - coords[ps[3]][0] + 6 * (coords[ps[8]][0] + coords[ps[13]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9, - (-4 * coords[ps[12]][1] - coords[ps[3]][1] + 6 * (coords[ps[8]][1] + coords[ps[13]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9 - ]); - ps[10] = coords.length; - coords.push([ - (-4 * coords[ps[15]][0] - coords[ps[0]][0] + 6 * (coords[ps[11]][0] + coords[ps[14]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9, - (-4 * coords[ps[15]][1] - coords[ps[0]][1] + 6 * (coords[ps[11]][1] + coords[ps[14]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9 - ]); - mesh.figures.push({ - type: 'patch', - coords: new Int32Array(ps), - colors: new Int32Array(cs) - }); - } - } - function decodeType7Shading(mesh, reader) { - var coords = mesh.coords; - var colors = mesh.colors; - var ps = new Int32Array(16); - var cs = new Int32Array(4); - while (reader.hasData) { - var f = reader.readFlag(); - assert(0 <= f && f <= 3, 'Unknown type7 flag'); - var i, ii; - var pi = coords.length; - for (i = 0, ii = f !== 0 ? 12 : 16; i < ii; i++) { - coords.push(reader.readCoordinate()); - } - var ci = colors.length; - for (i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { - colors.push(reader.readComponents()); - } - var tmp1, tmp2, tmp3, tmp4; - switch (f) { - case 0: - ps[12] = pi + 3; - ps[13] = pi + 4; - ps[14] = pi + 5; - ps[15] = pi + 6; - ps[8] = pi + 2; - ps[9] = pi + 13; - ps[10] = pi + 14; - ps[11] = pi + 7; - ps[4] = pi + 1; - ps[5] = pi + 12; - ps[6] = pi + 15; - ps[7] = pi + 8; - ps[0] = pi; - ps[1] = pi + 11; - ps[2] = pi + 10; - ps[3] = pi + 9; - cs[2] = ci + 1; - cs[3] = ci + 2; - cs[0] = ci; - cs[1] = ci + 3; - break; - case 1: - tmp1 = ps[12]; - tmp2 = ps[13]; - tmp3 = ps[14]; - tmp4 = ps[15]; - ps[12] = tmp4; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = tmp3; - ps[9] = pi + 9; - ps[10] = pi + 10; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[5] = pi + 8; - ps[6] = pi + 11; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[2]; - tmp2 = cs[3]; - cs[2] = tmp2; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 2: - tmp1 = ps[15]; - tmp2 = ps[11]; - ps[12] = ps[3]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[7]; - ps[9] = pi + 9; - ps[10] = pi + 10; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[5] = pi + 8; - ps[6] = pi + 11; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[3]; - cs[2] = cs[1]; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 3: - ps[12] = ps[0]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[1]; - ps[9] = pi + 9; - ps[10] = pi + 10; - ps[11] = pi + 3; - ps[4] = ps[2]; - ps[5] = pi + 8; - ps[6] = pi + 11; - ps[7] = pi + 4; - ps[0] = ps[3]; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - cs[2] = cs[0]; - cs[3] = ci; - cs[0] = cs[1]; - cs[1] = ci + 1; - break; - } - mesh.figures.push({ - type: 'patch', - coords: new Int32Array(ps), - colors: new Int32Array(cs) - }); - } - } - function updateBounds(mesh) { - var minX = mesh.coords[0][0], minY = mesh.coords[0][1], maxX = minX, maxY = minY; - for (var i = 1, ii = mesh.coords.length; i < ii; i++) { - var x = mesh.coords[i][0], y = mesh.coords[i][1]; - minX = minX > x ? x : minX; - minY = minY > y ? y : minY; - maxX = maxX < x ? x : maxX; - maxY = maxY < y ? y : maxY; - } - mesh.bounds = [ - minX, - minY, - maxX, - maxY - ]; - } - function packData(mesh) { - var i, ii, j, jj; - var coords = mesh.coords; - var coordsPacked = new Float32Array(coords.length * 2); - for (i = 0, j = 0, ii = coords.length; i < ii; i++) { - var xy = coords[i]; - coordsPacked[j++] = xy[0]; - coordsPacked[j++] = xy[1]; - } - mesh.coords = coordsPacked; - var colors = mesh.colors; - var colorsPacked = new Uint8Array(colors.length * 3); - for (i = 0, j = 0, ii = colors.length; i < ii; i++) { - var c = colors[i]; - colorsPacked[j++] = c[0]; - colorsPacked[j++] = c[1]; - colorsPacked[j++] = c[2]; - } - mesh.colors = colorsPacked; - var figures = mesh.figures; - for (i = 0, ii = figures.length; i < ii; i++) { - var figure = figures[i], ps = figure.coords, cs = figure.colors; - for (j = 0, jj = ps.length; j < jj; j++) { - ps[j] *= 2; - cs[j] *= 3; - } - } - } - function Mesh(stream, matrix, xref, res) { - assert(isStream(stream), 'Mesh data is not a stream'); - var dict = stream.dict; - this.matrix = matrix; - this.shadingType = dict.get('ShadingType'); - this.type = 'Pattern'; - this.bbox = dict.getArray('BBox'); - var cs = dict.get('ColorSpace', 'CS'); - cs = ColorSpace.parse(cs, xref, res); - this.cs = cs; - this.background = dict.has('Background') ? cs.getRgb(dict.get('Background'), 0) : null; - var fnObj = dict.get('Function'); - var fn = fnObj ? PDFFunction.parseArray(xref, fnObj) : null; - this.coords = []; - this.colors = []; - this.figures = []; - var decodeContext = { - bitsPerCoordinate: dict.get('BitsPerCoordinate'), - bitsPerComponent: dict.get('BitsPerComponent'), - bitsPerFlag: dict.get('BitsPerFlag'), - decode: dict.getArray('Decode'), - colorFn: fn, - colorSpace: cs, - numComps: fn ? 1 : cs.numComps - }; - var reader = new MeshStreamReader(stream, decodeContext); - var patchMesh = false; - switch (this.shadingType) { - case ShadingType.FREE_FORM_MESH: - decodeType4Shading(this, reader); - break; - case ShadingType.LATTICE_FORM_MESH: - var verticesPerRow = dict.get('VerticesPerRow') | 0; - assert(verticesPerRow >= 2, 'Invalid VerticesPerRow'); - decodeType5Shading(this, reader, verticesPerRow); - break; - case ShadingType.COONS_PATCH_MESH: - decodeType6Shading(this, reader); - patchMesh = true; - break; - case ShadingType.TENSOR_PATCH_MESH: - decodeType7Shading(this, reader); - patchMesh = true; - break; - default: - error('Unsupported mesh type.'); - break; - } - if (patchMesh) { - updateBounds(this); - for (var i = 0, ii = this.figures.length; i < ii; i++) { - buildFigureFromPatch(this, i); - } - } - updateBounds(this); - packData(this); - } - Mesh.prototype = { - getIR: function Mesh_getIR() { - return [ - 'Mesh', - this.shadingType, - this.coords, - this.colors, - this.figures, - this.bounds, - this.matrix, - this.bbox, - this.background - ]; - } - }; - return Mesh; - }(); - Shadings.Dummy = function DummyClosure() { - function Dummy() { - this.type = 'Pattern'; - } - Dummy.prototype = { - getIR: function Dummy_getIR() { - return ['Dummy']; - } - }; - return Dummy; - }(); - function getTilingPatternIR(operatorList, dict, args) { - var matrix = dict.getArray('Matrix'); - var bbox = dict.getArray('BBox'); - var xstep = dict.get('XStep'); - var ystep = dict.get('YStep'); - var paintType = dict.get('PaintType'); - var tilingType = dict.get('TilingType'); - return [ - 'TilingPattern', - args, - operatorList, - matrix, - bbox, - xstep, - ystep, - paintType, - tilingType - ]; - } - exports.Pattern = Pattern; - exports.getTilingPatternIR = getTilingPatternIR; - })); - (function (root, factory) { - factory(root.pdfjsCoreEvaluator = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreParser, root.pdfjsCoreImage, root.pdfjsCoreColorSpace, root.pdfjsCoreMurmurHash3, root.pdfjsCoreFonts, root.pdfjsCoreFunction, root.pdfjsCorePattern, root.pdfjsCoreCMap, root.pdfjsCoreMetrics, root.pdfjsCoreBidi, root.pdfjsCoreEncodings, root.pdfjsCoreStandardFonts, root.pdfjsCoreUnicode, root.pdfjsCoreGlyphList); - }(this, function (exports, sharedUtil, corePrimitives, coreStream, coreParser, coreImage, coreColorSpace, coreMurmurHash3, coreFonts, coreFunction, corePattern, coreCMap, coreMetrics, coreBidi, coreEncodings, coreStandardFonts, coreUnicode, coreGlyphList) { - var FONT_IDENTITY_MATRIX = sharedUtil.FONT_IDENTITY_MATRIX; - var IDENTITY_MATRIX = sharedUtil.IDENTITY_MATRIX; - var UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES; - var ImageKind = sharedUtil.ImageKind; - var OPS = sharedUtil.OPS; - var TextRenderingMode = sharedUtil.TextRenderingMode; - var Util = sharedUtil.Util; - var assert = sharedUtil.assert; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var isNum = sharedUtil.isNum; - var isString = sharedUtil.isString; - var getLookupTableFactory = sharedUtil.getLookupTableFactory; - var warn = sharedUtil.warn; - var Dict = corePrimitives.Dict; - var Name = corePrimitives.Name; - var isCmd = corePrimitives.isCmd; - var isDict = corePrimitives.isDict; - var isName = corePrimitives.isName; - var isRef = corePrimitives.isRef; - var isStream = corePrimitives.isStream; - var DecodeStream = coreStream.DecodeStream; - var JpegStream = coreStream.JpegStream; - var Stream = coreStream.Stream; - var Lexer = coreParser.Lexer; - var Parser = coreParser.Parser; - var isEOF = coreParser.isEOF; - var PDFImage = coreImage.PDFImage; - var ColorSpace = coreColorSpace.ColorSpace; - var MurmurHash3_64 = coreMurmurHash3.MurmurHash3_64; - var ErrorFont = coreFonts.ErrorFont; - var FontFlags = coreFonts.FontFlags; - var Font = coreFonts.Font; - var IdentityToUnicodeMap = coreFonts.IdentityToUnicodeMap; - var ToUnicodeMap = coreFonts.ToUnicodeMap; - var getFontType = coreFonts.getFontType; - var isPDFFunction = coreFunction.isPDFFunction; - var PDFFunction = coreFunction.PDFFunction; - var Pattern = corePattern.Pattern; - var getTilingPatternIR = corePattern.getTilingPatternIR; - var CMapFactory = coreCMap.CMapFactory; - var IdentityCMap = coreCMap.IdentityCMap; - var getMetrics = coreMetrics.getMetrics; - var bidi = coreBidi.bidi; - var WinAnsiEncoding = coreEncodings.WinAnsiEncoding; - var StandardEncoding = coreEncodings.StandardEncoding; - var MacRomanEncoding = coreEncodings.MacRomanEncoding; - var SymbolSetEncoding = coreEncodings.SymbolSetEncoding; - var ZapfDingbatsEncoding = coreEncodings.ZapfDingbatsEncoding; - var getEncoding = coreEncodings.getEncoding; - var getStdFontMap = coreStandardFonts.getStdFontMap; - var getSerifFonts = coreStandardFonts.getSerifFonts; - var getSymbolsFonts = coreStandardFonts.getSymbolsFonts; - var getNormalizedUnicodes = coreUnicode.getNormalizedUnicodes; - var reverseIfRtl = coreUnicode.reverseIfRtl; - var getUnicodeForGlyph = coreUnicode.getUnicodeForGlyph; - var getGlyphsUnicode = coreGlyphList.getGlyphsUnicode; - var PartialEvaluator = function PartialEvaluatorClosure() { - var DefaultPartialEvaluatorOptions = { - forceDataSchema: false, - maxImageSize: -1, - disableFontFace: false, - cMapOptions: { - url: null, - packed: false - } - }; - function NativeImageDecoder(xref, resources, handler, forceDataSchema) { - this.xref = xref; - this.resources = resources; - this.handler = handler; - this.forceDataSchema = forceDataSchema; - } - NativeImageDecoder.prototype = { - canDecode: function (image) { - return image instanceof JpegStream && NativeImageDecoder.isDecodable(image, this.xref, this.resources); - }, - decode: function (image) { - var dict = image.dict; - var colorSpace = dict.get('ColorSpace', 'CS'); - colorSpace = ColorSpace.parse(colorSpace, this.xref, this.resources); - var numComps = colorSpace.numComps; - var decodePromise = this.handler.sendWithPromise('JpegDecode', [ - image.getIR(this.forceDataSchema), - numComps - ]); - return decodePromise.then(function (message) { - var data = message.data; - return new Stream(data, 0, data.length, image.dict); - }); - } - }; - NativeImageDecoder.isSupported = function NativeImageDecoder_isSupported(image, xref, res) { - var dict = image.dict; - if (dict.has('DecodeParms') || dict.has('DP')) { - return false; - } - var cs = ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res); - return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') && cs.isDefaultDecode(dict.getArray('Decode', 'D')); - }; - NativeImageDecoder.isDecodable = function NativeImageDecoder_isDecodable(image, xref, res) { - var dict = image.dict; - if (dict.has('DecodeParms') || dict.has('DP')) { - return false; - } - var cs = ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res); - return (cs.numComps === 1 || cs.numComps === 3) && cs.isDefaultDecode(dict.getArray('Decode', 'D')); - }; - function PartialEvaluator(pdfManager, xref, handler, pageIndex, idFactory, fontCache, options) { - this.pdfManager = pdfManager; - this.xref = xref; - this.handler = handler; - this.pageIndex = pageIndex; - this.idFactory = idFactory; - this.fontCache = fontCache; - this.options = options || DefaultPartialEvaluatorOptions; - } - var TIME_SLOT_DURATION_MS = 20; - var CHECK_TIME_EVERY = 100; - function TimeSlotManager() { - this.reset(); - } - TimeSlotManager.prototype = { - check: function TimeSlotManager_check() { - if (++this.checked < CHECK_TIME_EVERY) { - return false; - } - this.checked = 0; - return this.endTime <= Date.now(); - }, - reset: function TimeSlotManager_reset() { - this.endTime = Date.now() + TIME_SLOT_DURATION_MS; - this.checked = 0; - } - }; - var deferred = Promise.resolve(); - var TILING_PATTERN = 1, SHADING_PATTERN = 2; - PartialEvaluator.prototype = { - hasBlendModes: function PartialEvaluator_hasBlendModes(resources) { - if (!isDict(resources)) { - return false; - } - var processed = Object.create(null); - if (resources.objId) { - processed[resources.objId] = true; - } - var nodes = [resources], xref = this.xref; - while (nodes.length) { - var key, i, ii; - var node = nodes.shift(); - var graphicStates = node.get('ExtGState'); - if (isDict(graphicStates)) { - var graphicStatesKeys = graphicStates.getKeys(); - for (i = 0, ii = graphicStatesKeys.length; i < ii; i++) { - key = graphicStatesKeys[i]; - var graphicState = graphicStates.get(key); - var bm = graphicState.get('BM'); - if (isName(bm) && bm.name !== 'Normal') { - return true; - } - } - } - var xObjects = node.get('XObject'); - if (!isDict(xObjects)) { - continue; - } - var xObjectsKeys = xObjects.getKeys(); - for (i = 0, ii = xObjectsKeys.length; i < ii; i++) { - key = xObjectsKeys[i]; - var xObject = xObjects.getRaw(key); - if (isRef(xObject)) { - if (processed[xObject.toString()]) { - continue; - } - xObject = xref.fetch(xObject); - } - if (!isStream(xObject)) { - continue; - } - if (xObject.dict.objId) { - if (processed[xObject.dict.objId]) { - continue; - } - processed[xObject.dict.objId] = true; - } - var xResources = xObject.dict.get('Resources'); - if (isDict(xResources) && (!xResources.objId || !processed[xResources.objId])) { - nodes.push(xResources); - if (xResources.objId) { - processed[xResources.objId] = true; - } - } - } - } - return false; - }, - buildFormXObject: function PartialEvaluator_buildFormXObject(resources, xobj, smask, operatorList, task, initialState) { - var matrix = xobj.dict.getArray('Matrix'); - var bbox = xobj.dict.getArray('BBox'); - var group = xobj.dict.get('Group'); - if (group) { - var groupOptions = { - matrix: matrix, - bbox: bbox, - smask: smask, - isolated: false, - knockout: false - }; - var groupSubtype = group.get('S'); - var colorSpace; - if (isName(groupSubtype, 'Transparency')) { - groupOptions.isolated = group.get('I') || false; - groupOptions.knockout = group.get('K') || false; - colorSpace = group.has('CS') ? ColorSpace.parse(group.get('CS'), this.xref, resources) : null; - } - if (smask && smask.backdrop) { - colorSpace = colorSpace || ColorSpace.singletons.rgb; - smask.backdrop = colorSpace.getRgb(smask.backdrop, 0); - } - operatorList.addOp(OPS.beginGroup, [groupOptions]); - } - operatorList.addOp(OPS.paintFormXObjectBegin, [ - matrix, - bbox - ]); - return this.getOperatorList(xobj, task, xobj.dict.get('Resources') || resources, operatorList, initialState).then(function () { - operatorList.addOp(OPS.paintFormXObjectEnd, []); - if (group) { - operatorList.addOp(OPS.endGroup, [groupOptions]); - } - }); - }, - buildPaintImageXObject: function PartialEvaluator_buildPaintImageXObject(resources, image, inline, operatorList, cacheKey, imageCache) { - var self = this; - var dict = image.dict; - var w = dict.get('Width', 'W'); - var h = dict.get('Height', 'H'); - if (!(w && isNum(w)) || !(h && isNum(h))) { - warn('Image dimensions are missing, or not numbers.'); - return; - } - var maxImageSize = this.options.maxImageSize; - if (maxImageSize !== -1 && w * h > maxImageSize) { - warn('Image exceeded maximum allowed size and was removed.'); - return; - } - var imageMask = dict.get('ImageMask', 'IM') || false; - var imgData, args; - if (imageMask) { - var width = dict.get('Width', 'W'); - var height = dict.get('Height', 'H'); - var bitStrideLength = width + 7 >> 3; - var imgArray = image.getBytes(bitStrideLength * height); - var decode = dict.getArray('Decode', 'D'); - var inverseDecode = !!decode && decode[0] > 0; - imgData = PDFImage.createMask(imgArray, width, height, image instanceof DecodeStream, inverseDecode); - imgData.cached = true; - args = [imgData]; - operatorList.addOp(OPS.paintImageMaskXObject, args); - if (cacheKey) { - imageCache[cacheKey] = { - fn: OPS.paintImageMaskXObject, - args: args - }; - } - return; - } - var softMask = dict.get('SMask', 'SM') || false; - var mask = dict.get('Mask') || false; - var SMALL_IMAGE_DIMENSIONS = 200; - if (inline && !softMask && !mask && !(image instanceof JpegStream) && w + h < SMALL_IMAGE_DIMENSIONS) { - var imageObj = new PDFImage(this.xref, resources, image, inline, null, null); - imgData = imageObj.createImageData(true); - operatorList.addOp(OPS.paintInlineImageXObject, [imgData]); - return; - } - var objId = 'img_' + this.idFactory.createObjId(); - operatorList.addDependency(objId); - args = [ - objId, - w, - h - ]; - if (!softMask && !mask && image instanceof JpegStream && NativeImageDecoder.isSupported(image, this.xref, resources)) { - operatorList.addOp(OPS.paintJpegXObject, args); - this.handler.send('obj', [ - objId, - this.pageIndex, - 'JpegStream', - image.getIR(this.options.forceDataSchema) - ]); - return; - } - var nativeImageDecoder = null; - if (image instanceof JpegStream || mask instanceof JpegStream || softMask instanceof JpegStream) { - nativeImageDecoder = new NativeImageDecoder(self.xref, resources, self.handler, self.options.forceDataSchema); - } - PDFImage.buildImage(self.handler, self.xref, resources, image, inline, nativeImageDecoder).then(function (imageObj) { - var imgData = imageObj.createImageData(false); - self.handler.send('obj', [ - objId, - self.pageIndex, - 'Image', - imgData - ], [imgData.data.buffer]); - }).then(undefined, function (reason) { - warn('Unable to decode image: ' + reason); - self.handler.send('obj', [ - objId, - self.pageIndex, - 'Image', - null - ]); - }); - operatorList.addOp(OPS.paintImageXObject, args); - if (cacheKey) { - imageCache[cacheKey] = { - fn: OPS.paintImageXObject, - args: args - }; - } - }, - handleSMask: function PartialEvaluator_handleSmask(smask, resources, operatorList, task, stateManager) { - var smaskContent = smask.get('G'); - var smaskOptions = { - subtype: smask.get('S').name, - backdrop: smask.get('BC') - }; - var transferObj = smask.get('TR'); - if (isPDFFunction(transferObj)) { - var transferFn = PDFFunction.parse(this.xref, transferObj); - var transferMap = new Uint8Array(256); - var tmp = new Float32Array(1); - for (var i = 0; i < 256; i++) { - tmp[0] = i / 255; - transferFn(tmp, 0, tmp, 0); - transferMap[i] = tmp[0] * 255 | 0; - } - smaskOptions.transferMap = transferMap; - } - return this.buildFormXObject(resources, smaskContent, smaskOptions, operatorList, task, stateManager.state.clone()); - }, - handleTilingType: function PartialEvaluator_handleTilingType(fn, args, resources, pattern, patternDict, operatorList, task) { - var tilingOpList = new OperatorList(); - var resourcesArray = [ - patternDict.get('Resources'), - resources - ]; - var patternResources = Dict.merge(this.xref, resourcesArray); - return this.getOperatorList(pattern, task, patternResources, tilingOpList).then(function () { - operatorList.addDependencies(tilingOpList.dependencies); - operatorList.addOp(fn, getTilingPatternIR({ - fnArray: tilingOpList.fnArray, - argsArray: tilingOpList.argsArray - }, patternDict, args)); - }); - }, - handleSetFont: function PartialEvaluator_handleSetFont(resources, fontArgs, fontRef, operatorList, task, state) { - var fontName; - if (fontArgs) { - fontArgs = fontArgs.slice(); - fontName = fontArgs[0].name; - } - var self = this; - return this.loadFont(fontName, fontRef, this.xref, resources).then(function (translated) { - if (!translated.font.isType3Font) { - return translated; - } - return translated.loadType3Data(self, resources, operatorList, task).then(function () { - return translated; - }, function (reason) { - self.handler.send('UnsupportedFeature', { featureId: UNSUPPORTED_FEATURES.font }); - return new TranslatedFont('g_font_error', new ErrorFont('Type3 font load error: ' + reason), translated.font); - }); - }).then(function (translated) { - state.font = translated.font; - translated.send(self.handler); - return translated.loadedName; - }); - }, - handleText: function PartialEvaluator_handleText(chars, state) { - var font = state.font; - var glyphs = font.charsToGlyphs(chars); - var isAddToPathSet = !!(state.textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG); - if (font.data && (isAddToPathSet || this.options.disableFontFace)) { - var buildPath = function (fontChar) { - if (!font.renderer.hasBuiltPath(fontChar)) { - var path = font.renderer.getPathJs(fontChar); - this.handler.send('commonobj', [ - font.loadedName + '_path_' + fontChar, - 'FontPath', - path - ]); - } - }.bind(this); - for (var i = 0, ii = glyphs.length; i < ii; i++) { - var glyph = glyphs[i]; - buildPath(glyph.fontChar); - var accent = glyph.accent; - if (accent && accent.fontChar) { - buildPath(accent.fontChar); - } - } - } - return glyphs; - }, - setGState: function PartialEvaluator_setGState(resources, gState, operatorList, task, xref, stateManager) { - var gStateObj = []; - var gStateKeys = gState.getKeys(); - var self = this; - var promise = Promise.resolve(); - for (var i = 0, ii = gStateKeys.length; i < ii; i++) { - var key = gStateKeys[i]; - var value = gState.get(key); - switch (key) { - case 'Type': - break; - case 'LW': - case 'LC': - case 'LJ': - case 'ML': - case 'D': - case 'RI': - case 'FL': - case 'CA': - case 'ca': - gStateObj.push([ - key, - value - ]); - break; - case 'Font': - promise = promise.then(function () { - return self.handleSetFont(resources, null, value[0], operatorList, task, stateManager.state).then(function (loadedName) { - operatorList.addDependency(loadedName); - gStateObj.push([ - key, - [ - loadedName, - value[1] - ] - ]); - }); - }); - break; - case 'BM': - gStateObj.push([ - key, - value - ]); - break; - case 'SMask': - if (isName(value, 'None')) { - gStateObj.push([ - key, - false - ]); - break; - } - if (isDict(value)) { - promise = promise.then(function (dict) { - return self.handleSMask(dict, resources, operatorList, task, stateManager); - }.bind(this, value)); - gStateObj.push([ - key, - true - ]); - } else { - warn('Unsupported SMask type'); - } - break; - case 'OP': - case 'op': - case 'OPM': - case 'BG': - case 'BG2': - case 'UCR': - case 'UCR2': - case 'TR': - case 'TR2': - case 'HT': - case 'SM': - case 'SA': - case 'AIS': - case 'TK': - info('graphic state operator ' + key); - break; - default: - info('Unknown graphic state operator ' + key); - break; - } - } - return promise.then(function () { - if (gStateObj.length > 0) { - operatorList.addOp(OPS.setGState, [gStateObj]); - } - }); - }, - loadFont: function PartialEvaluator_loadFont(fontName, font, xref, resources) { - function errorFont() { - return Promise.resolve(new TranslatedFont('g_font_error', new ErrorFont('Font ' + fontName + ' is not available'), font)); - } - var fontRef; - if (font) { - assert(isRef(font)); - fontRef = font; - } else { - var fontRes = resources.get('Font'); - if (fontRes) { - fontRef = fontRes.getRaw(fontName); - } else { - warn('fontRes not available'); - return errorFont(); - } - } - if (!fontRef) { - warn('fontRef not available'); - return errorFont(); - } - if (this.fontCache.has(fontRef)) { - return this.fontCache.get(fontRef); - } - font = xref.fetchIfRef(fontRef); - if (!isDict(font)) { - return errorFont(); - } - if (font.translated) { - return font.translated; - } - var fontCapability = createPromiseCapability(); - var preEvaluatedFont = this.preEvaluateFont(font, xref); - var descriptor = preEvaluatedFont.descriptor; - var fontRefIsRef = isRef(fontRef), fontID; - if (fontRefIsRef) { - fontID = fontRef.toString(); - } - if (isDict(descriptor)) { - if (!descriptor.fontAliases) { - descriptor.fontAliases = Object.create(null); - } - var fontAliases = descriptor.fontAliases; - var hash = preEvaluatedFont.hash; - if (fontAliases[hash]) { - var aliasFontRef = fontAliases[hash].aliasRef; - if (fontRefIsRef && aliasFontRef && this.fontCache.has(aliasFontRef)) { - this.fontCache.putAlias(fontRef, aliasFontRef); - return this.fontCache.get(fontRef); - } - } else { - fontAliases[hash] = { fontID: Font.getFontID() }; - } - if (fontRefIsRef) { - fontAliases[hash].aliasRef = fontRef; - } - fontID = fontAliases[hash].fontID; - } - if (fontRefIsRef) { - this.fontCache.put(fontRef, fontCapability.promise); - } else { - if (!fontID) { - fontID = this.idFactory.createObjId(); - } - this.fontCache.put('id_' + fontID, fontCapability.promise); - } - assert(fontID, 'The "fontID" must be defined.'); - font.loadedName = 'g_' + this.pdfManager.docId + '_f' + fontID; - font.translated = fontCapability.promise; - var translatedPromise; - try { - translatedPromise = this.translateFont(preEvaluatedFont, xref); - } catch (e) { - translatedPromise = Promise.reject(e); - } - var self = this; - translatedPromise.then(function (translatedFont) { - if (translatedFont.fontType !== undefined) { - var xrefFontStats = xref.stats.fontTypes; - xrefFontStats[translatedFont.fontType] = true; - } - fontCapability.resolve(new TranslatedFont(font.loadedName, translatedFont, font)); - }, function (reason) { - self.handler.send('UnsupportedFeature', { featureId: UNSUPPORTED_FEATURES.font }); - try { - var descriptor = preEvaluatedFont.descriptor; - var fontFile3 = descriptor && descriptor.get('FontFile3'); - var subtype = fontFile3 && fontFile3.get('Subtype'); - var fontType = getFontType(preEvaluatedFont.type, subtype && subtype.name); - var xrefFontStats = xref.stats.fontTypes; - xrefFontStats[fontType] = true; - } catch (ex) { - } - fontCapability.resolve(new TranslatedFont(font.loadedName, new ErrorFont(reason instanceof Error ? reason.message : reason), font)); - }); - return fontCapability.promise; - }, - buildPath: function PartialEvaluator_buildPath(operatorList, fn, args) { - var lastIndex = operatorList.length - 1; - if (!args) { - args = []; - } - if (lastIndex < 0 || operatorList.fnArray[lastIndex] !== OPS.constructPath) { - operatorList.addOp(OPS.constructPath, [ - [fn], - args - ]); - } else { - var opArgs = operatorList.argsArray[lastIndex]; - opArgs[0].push(fn); - Array.prototype.push.apply(opArgs[1], args); - } - }, - handleColorN: function PartialEvaluator_handleColorN(operatorList, fn, args, cs, patterns, resources, task, xref) { - var patternName = args[args.length - 1]; - var pattern; - if (isName(patternName) && (pattern = patterns.get(patternName.name))) { - var dict = isStream(pattern) ? pattern.dict : pattern; - var typeNum = dict.get('PatternType'); - if (typeNum === TILING_PATTERN) { - var color = cs.base ? cs.base.getRgb(args, 0) : null; - return this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task); - } else if (typeNum === SHADING_PATTERN) { - var shading = dict.get('Shading'); - var matrix = dict.getArray('Matrix'); - pattern = Pattern.parseShading(shading, matrix, xref, resources, this.handler); - operatorList.addOp(fn, pattern.getIR()); - return Promise.resolve(); - } - return Promise.reject('Unknown PatternType: ' + typeNum); - } - operatorList.addOp(fn, args); - return Promise.resolve(); - }, - getOperatorList: function PartialEvaluator_getOperatorList(stream, task, resources, operatorList, initialState) { - var self = this; - var xref = this.xref; - var imageCache = Object.create(null); - assert(operatorList); - resources = resources || Dict.empty; - var xobjs = resources.get('XObject') || Dict.empty; - var patterns = resources.get('Pattern') || Dict.empty; - var stateManager = new StateManager(initialState || new EvalState()); - var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); - var timeSlotManager = new TimeSlotManager(); - return new Promise(function promiseBody(resolve, reject) { - var next = function (promise) { - promise.then(function () { - try { - promiseBody(resolve, reject); - } catch (ex) { - reject(ex); - } - }, reject); - }; - task.ensureNotTerminated(); - timeSlotManager.reset(); - var stop, operation = {}, i, ii, cs; - while (!(stop = timeSlotManager.check())) { - operation.args = null; - if (!preprocessor.read(operation)) { - break; - } - var args = operation.args; - var fn = operation.fn; - switch (fn | 0) { - case OPS.paintXObject: - if (args[0].code) { - break; - } - var name = args[0].name; - if (!name) { - warn('XObject must be referred to by name.'); - continue; - } - if (imageCache[name] !== undefined) { - operatorList.addOp(imageCache[name].fn, imageCache[name].args); - args = null; - continue; - } - var xobj = xobjs.get(name); - if (xobj) { - assert(isStream(xobj), 'XObject should be a stream'); - var type = xobj.dict.get('Subtype'); - assert(isName(type), 'XObject should have a Name subtype'); - if (type.name === 'Form') { - stateManager.save(); - next(self.buildFormXObject(resources, xobj, null, operatorList, task, stateManager.state.clone()).then(function () { - stateManager.restore(); - })); - return; - } else if (type.name === 'Image') { - self.buildPaintImageXObject(resources, xobj, false, operatorList, name, imageCache); - args = null; - continue; - } else if (type.name === 'PS') { - info('Ignored XObject subtype PS'); - continue; - } else { - error('Unhandled XObject subtype ' + type.name); - } - } - break; - case OPS.setFont: - var fontSize = args[1]; - next(self.handleSetFont(resources, args, null, operatorList, task, stateManager.state).then(function (loadedName) { - operatorList.addDependency(loadedName); - operatorList.addOp(OPS.setFont, [ - loadedName, - fontSize - ]); - })); - return; - case OPS.endInlineImage: - var cacheKey = args[0].cacheKey; - if (cacheKey) { - var cacheEntry = imageCache[cacheKey]; - if (cacheEntry !== undefined) { - operatorList.addOp(cacheEntry.fn, cacheEntry.args); - args = null; - continue; - } - } - self.buildPaintImageXObject(resources, args[0], true, operatorList, cacheKey, imageCache); - args = null; - continue; - case OPS.showText: - args[0] = self.handleText(args[0], stateManager.state); - break; - case OPS.showSpacedText: - var arr = args[0]; - var combinedGlyphs = []; - var arrLength = arr.length; - var state = stateManager.state; - for (i = 0; i < arrLength; ++i) { - var arrItem = arr[i]; - if (isString(arrItem)) { - Array.prototype.push.apply(combinedGlyphs, self.handleText(arrItem, state)); - } else if (isNum(arrItem)) { - combinedGlyphs.push(arrItem); - } - } - args[0] = combinedGlyphs; - fn = OPS.showText; - break; - case OPS.nextLineShowText: - operatorList.addOp(OPS.nextLine); - args[0] = self.handleText(args[0], stateManager.state); - fn = OPS.showText; - break; - case OPS.nextLineSetSpacingShowText: - operatorList.addOp(OPS.nextLine); - operatorList.addOp(OPS.setWordSpacing, [args.shift()]); - operatorList.addOp(OPS.setCharSpacing, [args.shift()]); - args[0] = self.handleText(args[0], stateManager.state); - fn = OPS.showText; - break; - case OPS.setTextRenderingMode: - stateManager.state.textRenderingMode = args[0]; - break; - case OPS.setFillColorSpace: - stateManager.state.fillColorSpace = ColorSpace.parse(args[0], xref, resources); - continue; - case OPS.setStrokeColorSpace: - stateManager.state.strokeColorSpace = ColorSpace.parse(args[0], xref, resources); - continue; - case OPS.setFillColor: - cs = stateManager.state.fillColorSpace; - args = cs.getRgb(args, 0); - fn = OPS.setFillRGBColor; - break; - case OPS.setStrokeColor: - cs = stateManager.state.strokeColorSpace; - args = cs.getRgb(args, 0); - fn = OPS.setStrokeRGBColor; - break; - case OPS.setFillGray: - stateManager.state.fillColorSpace = ColorSpace.singletons.gray; - args = ColorSpace.singletons.gray.getRgb(args, 0); - fn = OPS.setFillRGBColor; - break; - case OPS.setStrokeGray: - stateManager.state.strokeColorSpace = ColorSpace.singletons.gray; - args = ColorSpace.singletons.gray.getRgb(args, 0); - fn = OPS.setStrokeRGBColor; - break; - case OPS.setFillCMYKColor: - stateManager.state.fillColorSpace = ColorSpace.singletons.cmyk; - args = ColorSpace.singletons.cmyk.getRgb(args, 0); - fn = OPS.setFillRGBColor; - break; - case OPS.setStrokeCMYKColor: - stateManager.state.strokeColorSpace = ColorSpace.singletons.cmyk; - args = ColorSpace.singletons.cmyk.getRgb(args, 0); - fn = OPS.setStrokeRGBColor; - break; - case OPS.setFillRGBColor: - stateManager.state.fillColorSpace = ColorSpace.singletons.rgb; - args = ColorSpace.singletons.rgb.getRgb(args, 0); - break; - case OPS.setStrokeRGBColor: - stateManager.state.strokeColorSpace = ColorSpace.singletons.rgb; - args = ColorSpace.singletons.rgb.getRgb(args, 0); - break; - case OPS.setFillColorN: - cs = stateManager.state.fillColorSpace; - if (cs.name === 'Pattern') { - next(self.handleColorN(operatorList, OPS.setFillColorN, args, cs, patterns, resources, task, xref)); - return; - } - args = cs.getRgb(args, 0); - fn = OPS.setFillRGBColor; - break; - case OPS.setStrokeColorN: - cs = stateManager.state.strokeColorSpace; - if (cs.name === 'Pattern') { - next(self.handleColorN(operatorList, OPS.setStrokeColorN, args, cs, patterns, resources, task, xref)); - return; - } - args = cs.getRgb(args, 0); - fn = OPS.setStrokeRGBColor; - break; - case OPS.shadingFill: - var shadingRes = resources.get('Shading'); - if (!shadingRes) { - error('No shading resource found'); - } - var shading = shadingRes.get(args[0].name); - if (!shading) { - error('No shading object found'); - } - var shadingFill = Pattern.parseShading(shading, null, xref, resources, self.handler); - var patternIR = shadingFill.getIR(); - args = [patternIR]; - fn = OPS.shadingFill; - break; - case OPS.setGState: - var dictName = args[0]; - var extGState = resources.get('ExtGState'); - if (!isDict(extGState) || !extGState.has(dictName.name)) { - break; - } - var gState = extGState.get(dictName.name); - next(self.setGState(resources, gState, operatorList, task, xref, stateManager)); - return; - case OPS.moveTo: - case OPS.lineTo: - case OPS.curveTo: - case OPS.curveTo2: - case OPS.curveTo3: - case OPS.closePath: - self.buildPath(operatorList, fn, args); - continue; - case OPS.rectangle: - self.buildPath(operatorList, fn, args); - continue; - case OPS.markPoint: - case OPS.markPointProps: - case OPS.beginMarkedContent: - case OPS.beginMarkedContentProps: - case OPS.endMarkedContent: - case OPS.beginCompat: - case OPS.endCompat: - continue; - default: - if (args !== null) { - for (i = 0, ii = args.length; i < ii; i++) { - if (args[i] instanceof Dict) { - break; - } - } - if (i < ii) { - warn('getOperatorList - ignoring operator: ' + fn); - continue; - } - } - } - operatorList.addOp(fn, args); - } - if (stop) { - next(deferred); - return; - } - for (i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) { - operatorList.addOp(OPS.restore, []); - } - resolve(); - }); - }, - getTextContent: function PartialEvaluator_getTextContent(stream, task, resources, stateManager, normalizeWhitespace, combineTextItems) { - stateManager = stateManager || new StateManager(new TextState()); - var WhitespaceRegexp = /\s/g; - var textContent = { - items: [], - styles: Object.create(null) - }; - var textContentItem = { - initialized: false, - str: [], - width: 0, - height: 0, - vertical: false, - lastAdvanceWidth: 0, - lastAdvanceHeight: 0, - textAdvanceScale: 0, - spaceWidth: 0, - fakeSpaceMin: Infinity, - fakeMultiSpaceMin: Infinity, - fakeMultiSpaceMax: -0, - textRunBreakAllowed: false, - transform: null, - fontName: null - }; - var SPACE_FACTOR = 0.3; - var MULTI_SPACE_FACTOR = 1.5; - var MULTI_SPACE_FACTOR_MAX = 4; - var self = this; - var xref = this.xref; - resources = xref.fetchIfRef(resources) || Dict.empty; - var xobjs = null; - var xobjsCache = Object.create(null); - var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); - var textState; - function ensureTextContentItem() { - if (textContentItem.initialized) { - return textContentItem; - } - var font = textState.font; - if (!(font.loadedName in textContent.styles)) { - textContent.styles[font.loadedName] = { - fontFamily: font.fallbackName, - ascent: font.ascent, - descent: font.descent, - vertical: font.vertical - }; - } - textContentItem.fontName = font.loadedName; - var tsm = [ - textState.fontSize * textState.textHScale, - 0, - 0, - textState.fontSize, - 0, - textState.textRise - ]; - if (font.isType3Font && textState.fontMatrix !== FONT_IDENTITY_MATRIX && textState.fontSize === 1) { - var glyphHeight = font.bbox[3] - font.bbox[1]; - if (glyphHeight > 0) { - glyphHeight = glyphHeight * textState.fontMatrix[3]; - tsm[3] *= glyphHeight; - } - } - var trm = Util.transform(textState.ctm, Util.transform(textState.textMatrix, tsm)); - textContentItem.transform = trm; - if (!font.vertical) { - textContentItem.width = 0; - textContentItem.height = Math.sqrt(trm[2] * trm[2] + trm[3] * trm[3]); - textContentItem.vertical = false; - } else { - textContentItem.width = Math.sqrt(trm[0] * trm[0] + trm[1] * trm[1]); - textContentItem.height = 0; - textContentItem.vertical = true; - } - var a = textState.textLineMatrix[0]; - var b = textState.textLineMatrix[1]; - var scaleLineX = Math.sqrt(a * a + b * b); - a = textState.ctm[0]; - b = textState.ctm[1]; - var scaleCtmX = Math.sqrt(a * a + b * b); - textContentItem.textAdvanceScale = scaleCtmX * scaleLineX; - textContentItem.lastAdvanceWidth = 0; - textContentItem.lastAdvanceHeight = 0; - var spaceWidth = font.spaceWidth / 1000 * textState.fontSize; - if (spaceWidth) { - textContentItem.spaceWidth = spaceWidth; - textContentItem.fakeSpaceMin = spaceWidth * SPACE_FACTOR; - textContentItem.fakeMultiSpaceMin = spaceWidth * MULTI_SPACE_FACTOR; - textContentItem.fakeMultiSpaceMax = spaceWidth * MULTI_SPACE_FACTOR_MAX; - textContentItem.textRunBreakAllowed = !font.isMonospace; - } else { - textContentItem.spaceWidth = 0; - textContentItem.fakeSpaceMin = Infinity; - textContentItem.fakeMultiSpaceMin = Infinity; - textContentItem.fakeMultiSpaceMax = 0; - textContentItem.textRunBreakAllowed = false; - } - textContentItem.initialized = true; - return textContentItem; - } - function replaceWhitespace(str) { - var i = 0, ii = str.length, code; - while (i < ii && (code = str.charCodeAt(i)) >= 0x20 && code <= 0x7F) { - i++; - } - return i < ii ? str.replace(WhitespaceRegexp, ' ') : str; - } - function runBidiTransform(textChunk) { - var str = textChunk.str.join(''); - var bidiResult = bidi(str, -1, textChunk.vertical); - return { - str: normalizeWhitespace ? replaceWhitespace(bidiResult.str) : bidiResult.str, - dir: bidiResult.dir, - width: textChunk.width, - height: textChunk.height, - transform: textChunk.transform, - fontName: textChunk.fontName - }; - } - function handleSetFont(fontName, fontRef) { - return self.loadFont(fontName, fontRef, xref, resources).then(function (translated) { - textState.font = translated.font; - textState.fontMatrix = translated.font.fontMatrix || FONT_IDENTITY_MATRIX; - }); - } - function buildTextContentItem(chars) { - var font = textState.font; - var textChunk = ensureTextContentItem(); - var width = 0; - var height = 0; - var glyphs = font.charsToGlyphs(chars); - var defaultVMetrics = font.defaultVMetrics; - for (var i = 0; i < glyphs.length; i++) { - var glyph = glyphs[i]; - var vMetricX = null; - var vMetricY = null; - var glyphWidth = null; - if (font.vertical) { - if (glyph.vmetric) { - glyphWidth = glyph.vmetric[0]; - vMetricX = glyph.vmetric[1]; - vMetricY = glyph.vmetric[2]; - } else { - glyphWidth = glyph.width; - vMetricX = glyph.width * 0.5; - vMetricY = defaultVMetrics[2]; - } - } else { - glyphWidth = glyph.width; - } - var glyphUnicode = glyph.unicode; - var NormalizedUnicodes = getNormalizedUnicodes(); - if (NormalizedUnicodes[glyphUnicode] !== undefined) { - glyphUnicode = NormalizedUnicodes[glyphUnicode]; - } - glyphUnicode = reverseIfRtl(glyphUnicode); - var charSpacing = textState.charSpacing; - if (glyph.isSpace) { - var wordSpacing = textState.wordSpacing; - charSpacing += wordSpacing; - if (wordSpacing > 0) { - addFakeSpaces(wordSpacing, textChunk.str); - } - } - var tx = 0; - var ty = 0; - if (!font.vertical) { - var w0 = glyphWidth * textState.fontMatrix[0]; - tx = (w0 * textState.fontSize + charSpacing) * textState.textHScale; - width += tx; - } else { - var w1 = glyphWidth * textState.fontMatrix[0]; - ty = w1 * textState.fontSize + charSpacing; - height += ty; - } - textState.translateTextMatrix(tx, ty); - textChunk.str.push(glyphUnicode); - } - if (!font.vertical) { - textChunk.lastAdvanceWidth = width; - textChunk.width += width; - } else { - textChunk.lastAdvanceHeight = height; - textChunk.height += Math.abs(height); - } - return textChunk; - } - function addFakeSpaces(width, strBuf) { - if (width < textContentItem.fakeSpaceMin) { - return; - } - if (width < textContentItem.fakeMultiSpaceMin) { - strBuf.push(' '); - return; - } - var fakeSpaces = Math.round(width / textContentItem.spaceWidth); - while (fakeSpaces-- > 0) { - strBuf.push(' '); - } - } - function flushTextContentItem() { - if (!textContentItem.initialized) { - return; - } - textContentItem.width *= textContentItem.textAdvanceScale; - textContentItem.height *= textContentItem.textAdvanceScale; - textContent.items.push(runBidiTransform(textContentItem)); - textContentItem.initialized = false; - textContentItem.str.length = 0; - } - var timeSlotManager = new TimeSlotManager(); - return new Promise(function promiseBody(resolve, reject) { - var next = function (promise) { - promise.then(function () { - try { - promiseBody(resolve, reject); - } catch (ex) { - reject(ex); - } - }, reject); - }; - task.ensureNotTerminated(); - timeSlotManager.reset(); - var stop, operation = {}, args = []; - while (!(stop = timeSlotManager.check())) { - args.length = 0; - operation.args = args; - if (!preprocessor.read(operation)) { - break; - } - textState = stateManager.state; - var fn = operation.fn; - args = operation.args; - var advance, diff; - switch (fn | 0) { - case OPS.setFont: - var fontNameArg = args[0].name, fontSizeArg = args[1]; - if (textState.font && fontNameArg === textState.fontName && fontSizeArg === textState.fontSize) { - break; - } - flushTextContentItem(); - textState.fontName = fontNameArg; - textState.fontSize = fontSizeArg; - next(handleSetFont(fontNameArg, null)); - return; - case OPS.setTextRise: - flushTextContentItem(); - textState.textRise = args[0]; - break; - case OPS.setHScale: - flushTextContentItem(); - textState.textHScale = args[0] / 100; - break; - case OPS.setLeading: - flushTextContentItem(); - textState.leading = args[0]; - break; - case OPS.moveText: - var isSameTextLine = !textState.font ? false : (textState.font.vertical ? args[0] : args[1]) === 0; - advance = args[0] - args[1]; - if (combineTextItems && isSameTextLine && textContentItem.initialized && advance > 0 && advance <= textContentItem.fakeMultiSpaceMax) { - textState.translateTextLineMatrix(args[0], args[1]); - textContentItem.width += args[0] - textContentItem.lastAdvanceWidth; - textContentItem.height += args[1] - textContentItem.lastAdvanceHeight; - diff = args[0] - textContentItem.lastAdvanceWidth - (args[1] - textContentItem.lastAdvanceHeight); - addFakeSpaces(diff, textContentItem.str); - break; - } - flushTextContentItem(); - textState.translateTextLineMatrix(args[0], args[1]); - textState.textMatrix = textState.textLineMatrix.slice(); - break; - case OPS.setLeadingMoveText: - flushTextContentItem(); - textState.leading = -args[1]; - textState.translateTextLineMatrix(args[0], args[1]); - textState.textMatrix = textState.textLineMatrix.slice(); - break; - case OPS.nextLine: - flushTextContentItem(); - textState.carriageReturn(); - break; - case OPS.setTextMatrix: - advance = textState.calcTextLineMatrixAdvance(args[0], args[1], args[2], args[3], args[4], args[5]); - if (combineTextItems && advance !== null && textContentItem.initialized && advance.value > 0 && advance.value <= textContentItem.fakeMultiSpaceMax) { - textState.translateTextLineMatrix(advance.width, advance.height); - textContentItem.width += advance.width - textContentItem.lastAdvanceWidth; - textContentItem.height += advance.height - textContentItem.lastAdvanceHeight; - diff = advance.width - textContentItem.lastAdvanceWidth - (advance.height - textContentItem.lastAdvanceHeight); - addFakeSpaces(diff, textContentItem.str); - break; - } - flushTextContentItem(); - textState.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); - textState.setTextLineMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); - break; - case OPS.setCharSpacing: - textState.charSpacing = args[0]; - break; - case OPS.setWordSpacing: - textState.wordSpacing = args[0]; - break; - case OPS.beginText: - flushTextContentItem(); - textState.textMatrix = IDENTITY_MATRIX.slice(); - textState.textLineMatrix = IDENTITY_MATRIX.slice(); - break; - case OPS.showSpacedText: - var items = args[0]; - var offset; - for (var j = 0, jj = items.length; j < jj; j++) { - if (typeof items[j] === 'string') { - buildTextContentItem(items[j]); - } else if (isNum(items[j])) { - ensureTextContentItem(); - advance = items[j] * textState.fontSize / 1000; - var breakTextRun = false; - if (textState.font.vertical) { - offset = advance; - textState.translateTextMatrix(0, offset); - breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; - if (!breakTextRun) { - textContentItem.height += offset; - } - } else { - advance = -advance; - offset = advance * textState.textHScale; - textState.translateTextMatrix(offset, 0); - breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; - if (!breakTextRun) { - textContentItem.width += offset; - } - } - if (breakTextRun) { - flushTextContentItem(); - } else if (advance > 0) { - addFakeSpaces(advance, textContentItem.str); - } - } - } - break; - case OPS.showText: - buildTextContentItem(args[0]); - break; - case OPS.nextLineShowText: - flushTextContentItem(); - textState.carriageReturn(); - buildTextContentItem(args[0]); - break; - case OPS.nextLineSetSpacingShowText: - flushTextContentItem(); - textState.wordSpacing = args[0]; - textState.charSpacing = args[1]; - textState.carriageReturn(); - buildTextContentItem(args[2]); - break; - case OPS.paintXObject: - flushTextContentItem(); - if (args[0].code) { - break; - } - if (!xobjs) { - xobjs = resources.get('XObject') || Dict.empty; - } - var name = args[0].name; - if (xobjsCache.key === name) { - if (xobjsCache.texts) { - Util.appendToArray(textContent.items, xobjsCache.texts.items); - Util.extendObj(textContent.styles, xobjsCache.texts.styles); - } - break; - } - var xobj = xobjs.get(name); - if (!xobj) { - break; - } - assert(isStream(xobj), 'XObject should be a stream'); - var type = xobj.dict.get('Subtype'); - assert(isName(type), 'XObject should have a Name subtype'); - if ('Form' !== type.name) { - xobjsCache.key = name; - xobjsCache.texts = null; - break; - } - stateManager.save(); - var matrix = xobj.dict.getArray('Matrix'); - if (isArray(matrix) && matrix.length === 6) { - stateManager.transform(matrix); - } - next(self.getTextContent(xobj, task, xobj.dict.get('Resources') || resources, stateManager, normalizeWhitespace, combineTextItems).then(function (formTextContent) { - Util.appendToArray(textContent.items, formTextContent.items); - Util.extendObj(textContent.styles, formTextContent.styles); - stateManager.restore(); - xobjsCache.key = name; - xobjsCache.texts = formTextContent; - })); - return; - case OPS.setGState: - flushTextContentItem(); - var dictName = args[0]; - var extGState = resources.get('ExtGState'); - if (!isDict(extGState) || !isName(dictName)) { - break; - } - var gState = extGState.get(dictName.name); - if (!isDict(gState)) { - break; - } - var gStateFont = gState.get('Font'); - if (gStateFont) { - textState.fontName = null; - textState.fontSize = gStateFont[1]; - next(handleSetFont(null, gStateFont[0])); - return; - } - break; - } - } - if (stop) { - next(deferred); - return; - } - flushTextContentItem(); - resolve(textContent); - }); - }, - extractDataStructures: function PartialEvaluator_extractDataStructures(dict, baseDict, xref, properties) { - var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode'); - var toUnicodePromise = toUnicode ? this.readToUnicode(toUnicode) : Promise.resolve(undefined); - if (properties.composite) { - var cidSystemInfo = dict.get('CIDSystemInfo'); - if (isDict(cidSystemInfo)) { - properties.cidSystemInfo = { - registry: cidSystemInfo.get('Registry'), - ordering: cidSystemInfo.get('Ordering'), - supplement: cidSystemInfo.get('Supplement') - }; - } - var cidToGidMap = dict.get('CIDToGIDMap'); - if (isStream(cidToGidMap)) { - properties.cidToGidMap = this.readCidToGidMap(cidToGidMap); - } - } - var differences = []; - var baseEncodingName = null; - var encoding; - if (dict.has('Encoding')) { - encoding = dict.get('Encoding'); - if (isDict(encoding)) { - baseEncodingName = encoding.get('BaseEncoding'); - baseEncodingName = isName(baseEncodingName) ? baseEncodingName.name : null; - if (encoding.has('Differences')) { - var diffEncoding = encoding.get('Differences'); - var index = 0; - for (var j = 0, jj = diffEncoding.length; j < jj; j++) { - var data = xref.fetchIfRef(diffEncoding[j]); - if (isNum(data)) { - index = data; - } else if (isName(data)) { - differences[index++] = data.name; - } else { - error('Invalid entry in \'Differences\' array: ' + data); - } - } - } - } else if (isName(encoding)) { - baseEncodingName = encoding.name; - } else { - error('Encoding is not a Name nor a Dict'); - } - if (baseEncodingName !== 'MacRomanEncoding' && baseEncodingName !== 'MacExpertEncoding' && baseEncodingName !== 'WinAnsiEncoding') { - baseEncodingName = null; - } - } - if (baseEncodingName) { - properties.defaultEncoding = getEncoding(baseEncodingName).slice(); - } else { - var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); - var isNonsymbolicFont = !!(properties.flags & FontFlags.Nonsymbolic); - encoding = StandardEncoding; - if (properties.type === 'TrueType' && !isNonsymbolicFont) { - encoding = WinAnsiEncoding; - } - if (isSymbolicFont) { - encoding = MacRomanEncoding; - if (!properties.file) { - if (/Symbol/i.test(properties.name)) { - encoding = SymbolSetEncoding; - } else if (/Dingbats/i.test(properties.name)) { - encoding = ZapfDingbatsEncoding; - } - } - } - properties.defaultEncoding = encoding; - } - properties.differences = differences; - properties.baseEncodingName = baseEncodingName; - properties.hasEncoding = !!baseEncodingName || differences.length > 0; - properties.dict = dict; - return toUnicodePromise.then(function (toUnicode) { - properties.toUnicode = toUnicode; - return this.buildToUnicode(properties); - }.bind(this)).then(function (toUnicode) { - properties.toUnicode = toUnicode; - return properties; - }); - }, - buildToUnicode: function PartialEvaluator_buildToUnicode(properties) { - properties.hasIncludedToUnicodeMap = !!properties.toUnicode && properties.toUnicode.length > 0; - if (properties.hasIncludedToUnicodeMap) { - return Promise.resolve(properties.toUnicode); - } - var toUnicode, charcode, glyphName; - if (!properties.composite) - { - toUnicode = []; - var encoding = properties.defaultEncoding.slice(); - var baseEncodingName = properties.baseEncodingName; - var differences = properties.differences; - for (charcode in differences) { - glyphName = differences[charcode]; - if (glyphName === '.notdef') { - continue; - } - encoding[charcode] = glyphName; - } - var glyphsUnicodeMap = getGlyphsUnicode(); - for (charcode in encoding) { - glyphName = encoding[charcode]; - if (glyphName === '') { - continue; - } else if (glyphsUnicodeMap[glyphName] === undefined) { - var code = 0; - switch (glyphName[0]) { - case 'G': - if (glyphName.length === 3) { - code = parseInt(glyphName.substr(1), 16); - } - break; - case 'g': - if (glyphName.length === 5) { - code = parseInt(glyphName.substr(1), 16); - } - break; - case 'C': - case 'c': - if (glyphName.length >= 3) { - code = +glyphName.substr(1); - } - break; - default: - var unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); - if (unicode !== -1) { - code = unicode; - } - } - if (code) { - if (baseEncodingName && code === +charcode) { - var baseEncoding = getEncoding(baseEncodingName); - if (baseEncoding && (glyphName = baseEncoding[charcode])) { - toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); - continue; - } - } - toUnicode[charcode] = String.fromCharCode(code); - } - continue; - } - toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); - } - return Promise.resolve(new ToUnicodeMap(toUnicode)); - } - if (properties.composite && (properties.cMap.builtInCMap && !(properties.cMap instanceof IdentityCMap) || properties.cidSystemInfo.registry === 'Adobe' && (properties.cidSystemInfo.ordering === 'GB1' || properties.cidSystemInfo.ordering === 'CNS1' || properties.cidSystemInfo.ordering === 'Japan1' || properties.cidSystemInfo.ordering === 'Korea1'))) { - var registry = properties.cidSystemInfo.registry; - var ordering = properties.cidSystemInfo.ordering; - var ucs2CMapName = Name.get(registry + '-' + ordering + '-UCS2'); - return CMapFactory.create(ucs2CMapName, this.options.cMapOptions, null).then(function (ucs2CMap) { - var cMap = properties.cMap; - toUnicode = []; - cMap.forEach(function (charcode, cid) { - assert(cid <= 0xffff, 'Max size of CID is 65,535'); - var ucs2 = ucs2CMap.lookup(cid); - if (ucs2) { - toUnicode[charcode] = String.fromCharCode((ucs2.charCodeAt(0) << 8) + ucs2.charCodeAt(1)); - } - }); - return new ToUnicodeMap(toUnicode); - }); - } - return Promise.resolve(new IdentityToUnicodeMap(properties.firstChar, properties.lastChar)); - }, - readToUnicode: function PartialEvaluator_readToUnicode(toUnicode) { - var cmapObj = toUnicode; - if (isName(cmapObj)) { - return CMapFactory.create(cmapObj, this.options.cMapOptions, null).then(function (cmap) { - if (cmap instanceof IdentityCMap) { - return new IdentityToUnicodeMap(0, 0xFFFF); - } - return new ToUnicodeMap(cmap.getMap()); - }); - } else if (isStream(cmapObj)) { - return CMapFactory.create(cmapObj, this.options.cMapOptions, null).then(function (cmap) { - if (cmap instanceof IdentityCMap) { - return new IdentityToUnicodeMap(0, 0xFFFF); - } - var map = new Array(cmap.length); - cmap.forEach(function (charCode, token) { - var str = []; - for (var k = 0; k < token.length; k += 2) { - var w1 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); - if ((w1 & 0xF800) !== 0xD800) { - str.push(w1); - continue; - } - k += 2; - var w2 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); - str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000); - } - map[charCode] = String.fromCharCode.apply(String, str); - }); - return new ToUnicodeMap(map); - }); - } - return Promise.resolve(null); - }, - readCidToGidMap: function PartialEvaluator_readCidToGidMap(cidToGidStream) { - var glyphsData = cidToGidStream.getBytes(); - var result = []; - for (var j = 0, jj = glyphsData.length; j < jj; j++) { - var glyphID = glyphsData[j++] << 8 | glyphsData[j]; - if (glyphID === 0) { - continue; - } - var code = j >> 1; - result[code] = glyphID; - } - return result; - }, - extractWidths: function PartialEvaluator_extractWidths(dict, xref, descriptor, properties) { - var glyphsWidths = []; - var defaultWidth = 0; - var glyphsVMetrics = []; - var defaultVMetrics; - var i, ii, j, jj, start, code, widths; - if (properties.composite) { - defaultWidth = dict.get('DW') || 1000; - widths = dict.get('W'); - if (widths) { - for (i = 0, ii = widths.length; i < ii; i++) { - start = xref.fetchIfRef(widths[i++]); - code = xref.fetchIfRef(widths[i]); - if (isArray(code)) { - for (j = 0, jj = code.length; j < jj; j++) { - glyphsWidths[start++] = xref.fetchIfRef(code[j]); - } - } else { - var width = xref.fetchIfRef(widths[++i]); - for (j = start; j <= code; j++) { - glyphsWidths[j] = width; - } - } - } - } - if (properties.vertical) { - var vmetrics = dict.getArray('DW2') || [ - 880, - -1000 - ]; - defaultVMetrics = [ - vmetrics[1], - defaultWidth * 0.5, - vmetrics[0] - ]; - vmetrics = dict.get('W2'); - if (vmetrics) { - for (i = 0, ii = vmetrics.length; i < ii; i++) { - start = xref.fetchIfRef(vmetrics[i++]); - code = xref.fetchIfRef(vmetrics[i]); - if (isArray(code)) { - for (j = 0, jj = code.length; j < jj; j++) { - glyphsVMetrics[start++] = [ - xref.fetchIfRef(code[j++]), - xref.fetchIfRef(code[j++]), - xref.fetchIfRef(code[j]) - ]; - } - } else { - var vmetric = [ - xref.fetchIfRef(vmetrics[++i]), - xref.fetchIfRef(vmetrics[++i]), - xref.fetchIfRef(vmetrics[++i]) - ]; - for (j = start; j <= code; j++) { - glyphsVMetrics[j] = vmetric; - } - } - } - } - } - } else { - var firstChar = properties.firstChar; - widths = dict.get('Widths'); - if (widths) { - j = firstChar; - for (i = 0, ii = widths.length; i < ii; i++) { - glyphsWidths[j++] = xref.fetchIfRef(widths[i]); - } - defaultWidth = parseFloat(descriptor.get('MissingWidth')) || 0; - } else { - var baseFontName = dict.get('BaseFont'); - if (isName(baseFontName)) { - var metrics = this.getBaseFontMetrics(baseFontName.name); - glyphsWidths = this.buildCharCodeToWidth(metrics.widths, properties); - defaultWidth = metrics.defaultWidth; - } - } - } - var isMonospace = true; - var firstWidth = defaultWidth; - for (var glyph in glyphsWidths) { - var glyphWidth = glyphsWidths[glyph]; - if (!glyphWidth) { - continue; - } - if (!firstWidth) { - firstWidth = glyphWidth; - continue; - } - if (firstWidth !== glyphWidth) { - isMonospace = false; - break; - } - } - if (isMonospace) { - properties.flags |= FontFlags.FixedPitch; - } - properties.defaultWidth = defaultWidth; - properties.widths = glyphsWidths; - properties.defaultVMetrics = defaultVMetrics; - properties.vmetrics = glyphsVMetrics; - }, - isSerifFont: function PartialEvaluator_isSerifFont(baseFontName) { - var fontNameWoStyle = baseFontName.split('-')[0]; - return fontNameWoStyle in getSerifFonts() || fontNameWoStyle.search(/serif/gi) !== -1; - }, - getBaseFontMetrics: function PartialEvaluator_getBaseFontMetrics(name) { - var defaultWidth = 0; - var widths = []; - var monospace = false; - var stdFontMap = getStdFontMap(); - var lookupName = stdFontMap[name] || name; - var Metrics = getMetrics(); - if (!(lookupName in Metrics)) { - if (this.isSerifFont(name)) { - lookupName = 'Times-Roman'; - } else { - lookupName = 'Helvetica'; - } - } - var glyphWidths = Metrics[lookupName]; - if (isNum(glyphWidths)) { - defaultWidth = glyphWidths; - monospace = true; - } else { - widths = glyphWidths(); - } - return { - defaultWidth: defaultWidth, - monospace: monospace, - widths: widths - }; - }, - buildCharCodeToWidth: function PartialEvaluator_bulildCharCodeToWidth(widthsByGlyphName, properties) { - var widths = Object.create(null); - var differences = properties.differences; - var encoding = properties.defaultEncoding; - for (var charCode = 0; charCode < 256; charCode++) { - if (charCode in differences && widthsByGlyphName[differences[charCode]]) { - widths[charCode] = widthsByGlyphName[differences[charCode]]; - continue; - } - if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) { - widths[charCode] = widthsByGlyphName[encoding[charCode]]; - continue; - } - } - return widths; - }, - preEvaluateFont: function PartialEvaluator_preEvaluateFont(dict, xref) { - var baseDict = dict; - var type = dict.get('Subtype'); - assert(isName(type), 'invalid font Subtype'); - var composite = false; - var uint8array; - if (type.name === 'Type0') { - var df = dict.get('DescendantFonts'); - if (!df) { - error('Descendant fonts are not specified'); - } - dict = isArray(df) ? xref.fetchIfRef(df[0]) : df; - type = dict.get('Subtype'); - assert(isName(type), 'invalid font Subtype'); - composite = true; - } - var descriptor = dict.get('FontDescriptor'); - if (descriptor) { - var hash = new MurmurHash3_64(); - var encoding = baseDict.getRaw('Encoding'); - if (isName(encoding)) { - hash.update(encoding.name); - } else if (isRef(encoding)) { - hash.update(encoding.toString()); - } else if (isDict(encoding)) { - var keys = encoding.getKeys(); - for (var i = 0, ii = keys.length; i < ii; i++) { - var entry = encoding.getRaw(keys[i]); - if (isName(entry)) { - hash.update(entry.name); - } else if (isRef(entry)) { - hash.update(entry.toString()); - } else if (isArray(entry)) { - var diffLength = entry.length, diffBuf = new Array(diffLength); - for (var j = 0; j < diffLength; j++) { - var diffEntry = entry[j]; - if (isName(diffEntry)) { - diffBuf[j] = diffEntry.name; - } else if (isNum(diffEntry) || isRef(diffEntry)) { - diffBuf[j] = diffEntry.toString(); - } - } - hash.update(diffBuf.join()); - } - } - } - var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode'); - if (isStream(toUnicode)) { - var stream = toUnicode.str || toUnicode; - uint8array = stream.buffer ? new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) : new Uint8Array(stream.bytes.buffer, stream.start, stream.end - stream.start); - hash.update(uint8array); - } else if (isName(toUnicode)) { - hash.update(toUnicode.name); - } - var widths = dict.get('Widths') || baseDict.get('Widths'); - if (widths) { - uint8array = new Uint8Array(new Uint32Array(widths).buffer); - hash.update(uint8array); - } - } - return { - descriptor: descriptor, - dict: dict, - baseDict: baseDict, - composite: composite, - type: type.name, - hash: hash ? hash.hexdigest() : '' - }; - }, - translateFont: function PartialEvaluator_translateFont(preEvaluatedFont, xref) { - var baseDict = preEvaluatedFont.baseDict; - var dict = preEvaluatedFont.dict; - var composite = preEvaluatedFont.composite; - var descriptor = preEvaluatedFont.descriptor; - var type = preEvaluatedFont.type; - var maxCharIndex = composite ? 0xFFFF : 0xFF; - var cMapOptions = this.options.cMapOptions; - var properties; - if (!descriptor) { - if (type === 'Type3') { - descriptor = new Dict(null); - descriptor.set('FontName', Name.get(type)); - descriptor.set('FontBBox', dict.getArray('FontBBox')); - } else { - var baseFontName = dict.get('BaseFont'); - if (!isName(baseFontName)) { - error('Base font is not specified'); - } - baseFontName = baseFontName.name.replace(/[,_]/g, '-'); - var metrics = this.getBaseFontMetrics(baseFontName); - var fontNameWoStyle = baseFontName.split('-')[0]; - var flags = (this.isSerifFont(fontNameWoStyle) ? FontFlags.Serif : 0) | (metrics.monospace ? FontFlags.FixedPitch : 0) | (getSymbolsFonts()[fontNameWoStyle] ? FontFlags.Symbolic : FontFlags.Nonsymbolic); - properties = { - type: type, - name: baseFontName, - widths: metrics.widths, - defaultWidth: metrics.defaultWidth, - flags: flags, - firstChar: 0, - lastChar: maxCharIndex - }; - return this.extractDataStructures(dict, dict, xref, properties).then(function (properties) { - properties.widths = this.buildCharCodeToWidth(metrics.widths, properties); - return new Font(baseFontName, null, properties); - }.bind(this)); - } - } - var firstChar = dict.get('FirstChar') || 0; - var lastChar = dict.get('LastChar') || maxCharIndex; - var fontName = descriptor.get('FontName'); - var baseFont = dict.get('BaseFont'); - if (isString(fontName)) { - fontName = Name.get(fontName); - } - if (isString(baseFont)) { - baseFont = Name.get(baseFont); - } - if (type !== 'Type3') { - var fontNameStr = fontName && fontName.name; - var baseFontStr = baseFont && baseFont.name; - if (fontNameStr !== baseFontStr) { - info('The FontDescriptor\'s FontName is "' + fontNameStr + '" but should be the same as the Font\'s BaseFont "' + baseFontStr + '"'); - if (fontNameStr && baseFontStr && baseFontStr.indexOf(fontNameStr) === 0) { - fontName = baseFont; - } - } - } - fontName = fontName || baseFont; - assert(isName(fontName), 'invalid font name'); - var fontFile = descriptor.get('FontFile', 'FontFile2', 'FontFile3'); - if (fontFile) { - if (fontFile.dict) { - var subtype = fontFile.dict.get('Subtype'); - if (subtype) { - subtype = subtype.name; - } - var length1 = fontFile.dict.get('Length1'); - var length2 = fontFile.dict.get('Length2'); - var length3 = fontFile.dict.get('Length3'); - } - } - properties = { - type: type, - name: fontName.name, - subtype: subtype, - file: fontFile, - length1: length1, - length2: length2, - length3: length3, - loadedName: baseDict.loadedName, - composite: composite, - wideChars: composite, - fixedPitch: false, - fontMatrix: dict.getArray('FontMatrix') || FONT_IDENTITY_MATRIX, - firstChar: firstChar || 0, - lastChar: lastChar || maxCharIndex, - bbox: descriptor.getArray('FontBBox'), - ascent: descriptor.get('Ascent'), - descent: descriptor.get('Descent'), - xHeight: descriptor.get('XHeight'), - capHeight: descriptor.get('CapHeight'), - flags: descriptor.get('Flags'), - italicAngle: descriptor.get('ItalicAngle'), - coded: false - }; - var cMapPromise; - if (composite) { - var cidEncoding = baseDict.get('Encoding'); - if (isName(cidEncoding)) { - properties.cidEncoding = cidEncoding.name; - } - cMapPromise = CMapFactory.create(cidEncoding, cMapOptions, null).then(function (cMap) { - properties.cMap = cMap; - properties.vertical = properties.cMap.vertical; - }); - } else { - cMapPromise = Promise.resolve(undefined); - } - return cMapPromise.then(function () { - return this.extractDataStructures(dict, baseDict, xref, properties); - }.bind(this)).then(function (properties) { - this.extractWidths(dict, xref, descriptor, properties); - if (type === 'Type3') { - properties.isType3Font = true; - } - return new Font(fontName.name, fontFile, properties); - }.bind(this)); - } - }; - return PartialEvaluator; - }(); - var TranslatedFont = function TranslatedFontClosure() { - function TranslatedFont(loadedName, font, dict) { - this.loadedName = loadedName; - this.font = font; - this.dict = dict; - this.type3Loaded = null; - this.sent = false; - } - TranslatedFont.prototype = { - send: function (handler) { - if (this.sent) { - return; - } - var fontData = this.font.exportData(); - handler.send('commonobj', [ - this.loadedName, - 'Font', - fontData - ]); - this.sent = true; - }, - loadType3Data: function (evaluator, resources, parentOperatorList, task) { - assert(this.font.isType3Font); - if (this.type3Loaded) { - return this.type3Loaded; - } - var translatedFont = this.font; - var loadCharProcsPromise = Promise.resolve(); - var charProcs = this.dict.get('CharProcs'); - var fontResources = this.dict.get('Resources') || resources; - var charProcKeys = charProcs.getKeys(); - var charProcOperatorList = Object.create(null); - for (var i = 0, n = charProcKeys.length; i < n; ++i) { - loadCharProcsPromise = loadCharProcsPromise.then(function (key) { - var glyphStream = charProcs.get(key); - var operatorList = new OperatorList(); - return evaluator.getOperatorList(glyphStream, task, fontResources, operatorList).then(function () { - charProcOperatorList[key] = operatorList.getIR(); - parentOperatorList.addDependencies(operatorList.dependencies); - }, function (reason) { - warn('Type3 font resource \"' + key + '\" is not available'); - var operatorList = new OperatorList(); - charProcOperatorList[key] = operatorList.getIR(); - }); - }.bind(this, charProcKeys[i])); - } - this.type3Loaded = loadCharProcsPromise.then(function () { - translatedFont.charProcOperatorList = charProcOperatorList; - }); - return this.type3Loaded; - } - }; - return TranslatedFont; - }(); - var OperatorList = function OperatorListClosure() { - var CHUNK_SIZE = 1000; - var CHUNK_SIZE_ABOUT = CHUNK_SIZE - 5; - function getTransfers(queue) { - var transfers = []; - var fnArray = queue.fnArray, argsArray = queue.argsArray; - for (var i = 0, ii = queue.length; i < ii; i++) { - switch (fnArray[i]) { - case OPS.paintInlineImageXObject: - case OPS.paintInlineImageXObjectGroup: - case OPS.paintImageMaskXObject: - var arg = argsArray[i][0]; - if (!arg.cached) { - transfers.push(arg.data.buffer); - } - break; - } - } - return transfers; - } - function OperatorList(intent, messageHandler, pageIndex) { - this.messageHandler = messageHandler; - this.fnArray = []; - this.argsArray = []; - this.dependencies = Object.create(null); - this._totalLength = 0; - this.pageIndex = pageIndex; - this.intent = intent; - } - OperatorList.prototype = { - get length() { - return this.argsArray.length; - }, - get totalLength() { - return this._totalLength + this.length; - }, - addOp: function (fn, args) { - this.fnArray.push(fn); - this.argsArray.push(args); - if (this.messageHandler) { - if (this.fnArray.length >= CHUNK_SIZE) { - this.flush(); - } else if (this.fnArray.length >= CHUNK_SIZE_ABOUT && (fn === OPS.restore || fn === OPS.endText)) { - this.flush(); - } - } - }, - addDependency: function (dependency) { - if (dependency in this.dependencies) { - return; - } - this.dependencies[dependency] = true; - this.addOp(OPS.dependency, [dependency]); - }, - addDependencies: function (dependencies) { - for (var key in dependencies) { - this.addDependency(key); - } - }, - addOpList: function (opList) { - Util.extendObj(this.dependencies, opList.dependencies); - for (var i = 0, ii = opList.length; i < ii; i++) { - this.addOp(opList.fnArray[i], opList.argsArray[i]); - } - }, - getIR: function () { - return { - fnArray: this.fnArray, - argsArray: this.argsArray, - length: this.length - }; - }, - flush: function (lastChunk) { - if (this.intent !== 'oplist') { - new QueueOptimizer().optimize(this); - } - var transfers = getTransfers(this); - var length = this.length; - this._totalLength += length; - this.messageHandler.send('RenderPageChunk', { - operatorList: { - fnArray: this.fnArray, - argsArray: this.argsArray, - lastChunk: lastChunk, - length: length - }, - pageIndex: this.pageIndex, - intent: this.intent - }, transfers); - this.dependencies = Object.create(null); - this.fnArray.length = 0; - this.argsArray.length = 0; - } - }; - return OperatorList; - }(); - var StateManager = function StateManagerClosure() { - function StateManager(initialState) { - this.state = initialState; - this.stateStack = []; - } - StateManager.prototype = { - save: function () { - var old = this.state; - this.stateStack.push(this.state); - this.state = old.clone(); - }, - restore: function () { - var prev = this.stateStack.pop(); - if (prev) { - this.state = prev; - } - }, - transform: function (args) { - this.state.ctm = Util.transform(this.state.ctm, args); - } - }; - return StateManager; - }(); - var TextState = function TextStateClosure() { - function TextState() { - this.ctm = new Float32Array(IDENTITY_MATRIX); - this.fontName = null; - this.fontSize = 0; - this.font = null; - this.fontMatrix = FONT_IDENTITY_MATRIX; - this.textMatrix = IDENTITY_MATRIX.slice(); - this.textLineMatrix = IDENTITY_MATRIX.slice(); - this.charSpacing = 0; - this.wordSpacing = 0; - this.leading = 0; - this.textHScale = 1; - this.textRise = 0; - } - TextState.prototype = { - setTextMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) { - var m = this.textMatrix; - m[0] = a; - m[1] = b; - m[2] = c; - m[3] = d; - m[4] = e; - m[5] = f; - }, - setTextLineMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) { - var m = this.textLineMatrix; - m[0] = a; - m[1] = b; - m[2] = c; - m[3] = d; - m[4] = e; - m[5] = f; - }, - translateTextMatrix: function TextState_translateTextMatrix(x, y) { - var m = this.textMatrix; - m[4] = m[0] * x + m[2] * y + m[4]; - m[5] = m[1] * x + m[3] * y + m[5]; - }, - translateTextLineMatrix: function TextState_translateTextMatrix(x, y) { - var m = this.textLineMatrix; - m[4] = m[0] * x + m[2] * y + m[4]; - m[5] = m[1] * x + m[3] * y + m[5]; - }, - calcTextLineMatrixAdvance: function TextState_calcTextLineMatrixAdvance(a, b, c, d, e, f) { - var font = this.font; - if (!font) { - return null; - } - var m = this.textLineMatrix; - if (!(a === m[0] && b === m[1] && c === m[2] && d === m[3])) { - return null; - } - var txDiff = e - m[4], tyDiff = f - m[5]; - if (font.vertical && txDiff !== 0 || !font.vertical && tyDiff !== 0) { - return null; - } - var tx, ty, denominator = a * d - b * c; - if (font.vertical) { - tx = -tyDiff * c / denominator; - ty = tyDiff * a / denominator; - } else { - tx = txDiff * d / denominator; - ty = -txDiff * b / denominator; - } - return { - width: tx, - height: ty, - value: font.vertical ? ty : tx - }; - }, - calcRenderMatrix: function TextState_calcRendeMatrix(ctm) { - var tsm = [ - this.fontSize * this.textHScale, - 0, - 0, - this.fontSize, - 0, - this.textRise - ]; - return Util.transform(ctm, Util.transform(this.textMatrix, tsm)); - }, - carriageReturn: function TextState_carriageReturn() { - this.translateTextLineMatrix(0, -this.leading); - this.textMatrix = this.textLineMatrix.slice(); - }, - clone: function TextState_clone() { - var clone = Object.create(this); - clone.textMatrix = this.textMatrix.slice(); - clone.textLineMatrix = this.textLineMatrix.slice(); - clone.fontMatrix = this.fontMatrix.slice(); - return clone; - } - }; - return TextState; - }(); - var EvalState = function EvalStateClosure() { - function EvalState() { - this.ctm = new Float32Array(IDENTITY_MATRIX); - this.font = null; - this.textRenderingMode = TextRenderingMode.FILL; - this.fillColorSpace = ColorSpace.singletons.gray; - this.strokeColorSpace = ColorSpace.singletons.gray; - } - EvalState.prototype = { - clone: function CanvasExtraState_clone() { - return Object.create(this); - } - }; - return EvalState; - }(); - var EvaluatorPreprocessor = function EvaluatorPreprocessorClosure() { - var getOPMap = getLookupTableFactory(function (t) { - t['w'] = { - id: OPS.setLineWidth, - numArgs: 1, - variableArgs: false - }; - t['J'] = { - id: OPS.setLineCap, - numArgs: 1, - variableArgs: false - }; - t['j'] = { - id: OPS.setLineJoin, - numArgs: 1, - variableArgs: false - }; - t['M'] = { - id: OPS.setMiterLimit, - numArgs: 1, - variableArgs: false - }; - t['d'] = { - id: OPS.setDash, - numArgs: 2, - variableArgs: false - }; - t['ri'] = { - id: OPS.setRenderingIntent, - numArgs: 1, - variableArgs: false - }; - t['i'] = { - id: OPS.setFlatness, - numArgs: 1, - variableArgs: false - }; - t['gs'] = { - id: OPS.setGState, - numArgs: 1, - variableArgs: false - }; - t['q'] = { - id: OPS.save, - numArgs: 0, - variableArgs: false - }; - t['Q'] = { - id: OPS.restore, - numArgs: 0, - variableArgs: false - }; - t['cm'] = { - id: OPS.transform, - numArgs: 6, - variableArgs: false - }; - t['m'] = { - id: OPS.moveTo, - numArgs: 2, - variableArgs: false - }; - t['l'] = { - id: OPS.lineTo, - numArgs: 2, - variableArgs: false - }; - t['c'] = { - id: OPS.curveTo, - numArgs: 6, - variableArgs: false - }; - t['v'] = { - id: OPS.curveTo2, - numArgs: 4, - variableArgs: false - }; - t['y'] = { - id: OPS.curveTo3, - numArgs: 4, - variableArgs: false - }; - t['h'] = { - id: OPS.closePath, - numArgs: 0, - variableArgs: false - }; - t['re'] = { - id: OPS.rectangle, - numArgs: 4, - variableArgs: false - }; - t['S'] = { - id: OPS.stroke, - numArgs: 0, - variableArgs: false - }; - t['s'] = { - id: OPS.closeStroke, - numArgs: 0, - variableArgs: false - }; - t['f'] = { - id: OPS.fill, - numArgs: 0, - variableArgs: false - }; - t['F'] = { - id: OPS.fill, - numArgs: 0, - variableArgs: false - }; - t['f*'] = { - id: OPS.eoFill, - numArgs: 0, - variableArgs: false - }; - t['B'] = { - id: OPS.fillStroke, - numArgs: 0, - variableArgs: false - }; - t['B*'] = { - id: OPS.eoFillStroke, - numArgs: 0, - variableArgs: false - }; - t['b'] = { - id: OPS.closeFillStroke, - numArgs: 0, - variableArgs: false - }; - t['b*'] = { - id: OPS.closeEOFillStroke, - numArgs: 0, - variableArgs: false - }; - t['n'] = { - id: OPS.endPath, - numArgs: 0, - variableArgs: false - }; - t['W'] = { - id: OPS.clip, - numArgs: 0, - variableArgs: false - }; - t['W*'] = { - id: OPS.eoClip, - numArgs: 0, - variableArgs: false - }; - t['BT'] = { - id: OPS.beginText, - numArgs: 0, - variableArgs: false - }; - t['ET'] = { - id: OPS.endText, - numArgs: 0, - variableArgs: false - }; - t['Tc'] = { - id: OPS.setCharSpacing, - numArgs: 1, - variableArgs: false - }; - t['Tw'] = { - id: OPS.setWordSpacing, - numArgs: 1, - variableArgs: false - }; - t['Tz'] = { - id: OPS.setHScale, - numArgs: 1, - variableArgs: false - }; - t['TL'] = { - id: OPS.setLeading, - numArgs: 1, - variableArgs: false - }; - t['Tf'] = { - id: OPS.setFont, - numArgs: 2, - variableArgs: false - }; - t['Tr'] = { - id: OPS.setTextRenderingMode, - numArgs: 1, - variableArgs: false - }; - t['Ts'] = { - id: OPS.setTextRise, - numArgs: 1, - variableArgs: false - }; - t['Td'] = { - id: OPS.moveText, - numArgs: 2, - variableArgs: false - }; - t['TD'] = { - id: OPS.setLeadingMoveText, - numArgs: 2, - variableArgs: false - }; - t['Tm'] = { - id: OPS.setTextMatrix, - numArgs: 6, - variableArgs: false - }; - t['T*'] = { - id: OPS.nextLine, - numArgs: 0, - variableArgs: false - }; - t['Tj'] = { - id: OPS.showText, - numArgs: 1, - variableArgs: false - }; - t['TJ'] = { - id: OPS.showSpacedText, - numArgs: 1, - variableArgs: false - }; - t['\''] = { - id: OPS.nextLineShowText, - numArgs: 1, - variableArgs: false - }; - t['"'] = { - id: OPS.nextLineSetSpacingShowText, - numArgs: 3, - variableArgs: false - }; - t['d0'] = { - id: OPS.setCharWidth, - numArgs: 2, - variableArgs: false - }; - t['d1'] = { - id: OPS.setCharWidthAndBounds, - numArgs: 6, - variableArgs: false - }; - t['CS'] = { - id: OPS.setStrokeColorSpace, - numArgs: 1, - variableArgs: false - }; - t['cs'] = { - id: OPS.setFillColorSpace, - numArgs: 1, - variableArgs: false - }; - t['SC'] = { - id: OPS.setStrokeColor, - numArgs: 4, - variableArgs: true - }; - t['SCN'] = { - id: OPS.setStrokeColorN, - numArgs: 33, - variableArgs: true - }; - t['sc'] = { - id: OPS.setFillColor, - numArgs: 4, - variableArgs: true - }; - t['scn'] = { - id: OPS.setFillColorN, - numArgs: 33, - variableArgs: true - }; - t['G'] = { - id: OPS.setStrokeGray, - numArgs: 1, - variableArgs: false - }; - t['g'] = { - id: OPS.setFillGray, - numArgs: 1, - variableArgs: false - }; - t['RG'] = { - id: OPS.setStrokeRGBColor, - numArgs: 3, - variableArgs: false - }; - t['rg'] = { - id: OPS.setFillRGBColor, - numArgs: 3, - variableArgs: false - }; - t['K'] = { - id: OPS.setStrokeCMYKColor, - numArgs: 4, - variableArgs: false - }; - t['k'] = { - id: OPS.setFillCMYKColor, - numArgs: 4, - variableArgs: false - }; - t['sh'] = { - id: OPS.shadingFill, - numArgs: 1, - variableArgs: false - }; - t['BI'] = { - id: OPS.beginInlineImage, - numArgs: 0, - variableArgs: false - }; - t['ID'] = { - id: OPS.beginImageData, - numArgs: 0, - variableArgs: false - }; - t['EI'] = { - id: OPS.endInlineImage, - numArgs: 1, - variableArgs: false - }; - t['Do'] = { - id: OPS.paintXObject, - numArgs: 1, - variableArgs: false - }; - t['MP'] = { - id: OPS.markPoint, - numArgs: 1, - variableArgs: false - }; - t['DP'] = { - id: OPS.markPointProps, - numArgs: 2, - variableArgs: false - }; - t['BMC'] = { - id: OPS.beginMarkedContent, - numArgs: 1, - variableArgs: false - }; - t['BDC'] = { - id: OPS.beginMarkedContentProps, - numArgs: 2, - variableArgs: false - }; - t['EMC'] = { - id: OPS.endMarkedContent, - numArgs: 0, - variableArgs: false - }; - t['BX'] = { - id: OPS.beginCompat, - numArgs: 0, - variableArgs: false - }; - t['EX'] = { - id: OPS.endCompat, - numArgs: 0, - variableArgs: false - }; - t['BM'] = null; - t['BD'] = null; - t['true'] = null; - t['fa'] = null; - t['fal'] = null; - t['fals'] = null; - t['false'] = null; - t['nu'] = null; - t['nul'] = null; - t['null'] = null; - }); - function EvaluatorPreprocessor(stream, xref, stateManager) { - this.opMap = getOPMap(); - this.parser = new Parser(new Lexer(stream, this.opMap), false, xref); - this.stateManager = stateManager; - this.nonProcessedArgs = []; - } - EvaluatorPreprocessor.prototype = { - get savedStatesDepth() { - return this.stateManager.stateStack.length; - }, - read: function EvaluatorPreprocessor_read(operation) { - var args = operation.args; - while (true) { - var obj = this.parser.getObj(); - if (isCmd(obj)) { - var cmd = obj.cmd; - var opSpec = this.opMap[cmd]; - if (!opSpec) { - warn('Unknown command "' + cmd + '"'); - continue; - } - var fn = opSpec.id; - var numArgs = opSpec.numArgs; - var argsLength = args !== null ? args.length : 0; - if (!opSpec.variableArgs) { - if (argsLength !== numArgs) { - var nonProcessedArgs = this.nonProcessedArgs; - while (argsLength > numArgs) { - nonProcessedArgs.push(args.shift()); - argsLength--; - } - while (argsLength < numArgs && nonProcessedArgs.length !== 0) { - if (args === null) { - args = []; - } - args.unshift(nonProcessedArgs.pop()); - argsLength++; - } - } - if (argsLength < numArgs) { - warn('Skipping command ' + fn + ': expected ' + numArgs + ' args, but received ' + argsLength + ' args.'); - if (args !== null) { - args.length = 0; - } - continue; - } - } else if (argsLength > numArgs) { - info('Command ' + fn + ': expected [0,' + numArgs + '] args, but received ' + argsLength + ' args.'); - } - this.preprocessCommand(fn, args); - operation.fn = fn; - operation.args = args; - return true; - } - if (isEOF(obj)) { - return false; - } - if (obj !== null) { - if (args === null) { - args = []; - } - args.push(obj); - assert(args.length <= 33, 'Too many arguments'); - } - } - }, - preprocessCommand: function EvaluatorPreprocessor_preprocessCommand(fn, args) { - switch (fn | 0) { - case OPS.save: - this.stateManager.save(); - break; - case OPS.restore: - this.stateManager.restore(); - break; - case OPS.transform: - this.stateManager.transform(args); - break; - } - } - }; - return EvaluatorPreprocessor; - }(); - var QueueOptimizer = function QueueOptimizerClosure() { - function addState(parentState, pattern, fn) { - var state = parentState; - for (var i = 0, ii = pattern.length - 1; i < ii; i++) { - var item = pattern[i]; - state = state[item] || (state[item] = []); - } - state[pattern[pattern.length - 1]] = fn; - } - function handlePaintSolidColorImageMask(iFirstSave, count, fnArray, argsArray) { - var iFirstPIMXO = iFirstSave + 2; - for (var i = 0; i < count; i++) { - var arg = argsArray[iFirstPIMXO + 4 * i]; - var imageMask = arg.length === 1 && arg[0]; - if (imageMask && imageMask.width === 1 && imageMask.height === 1 && (!imageMask.data.length || imageMask.data.length === 1 && imageMask.data[0] === 0)) { - fnArray[iFirstPIMXO + 4 * i] = OPS.paintSolidColorImageMask; - continue; - } - break; - } - return count - i; - } - var InitialState = []; - addState(InitialState, [ - OPS.save, - OPS.transform, - OPS.paintInlineImageXObject, - OPS.restore - ], function foundInlineImageGroup(context) { - var MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10; - var MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200; - var MAX_WIDTH = 1000; - var IMAGE_PADDING = 1; - var fnArray = context.fnArray, argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstSave = curr - 3; - var iFirstTransform = curr - 2; - var iFirstPIIXO = curr - 1; - var i = iFirstSave + 4; - var ii = fnArray.length; - while (i + 3 < ii) { - if (fnArray[i] !== OPS.save || fnArray[i + 1] !== OPS.transform || fnArray[i + 2] !== OPS.paintInlineImageXObject || fnArray[i + 3] !== OPS.restore) { - break; - } - i += 4; - } - var count = Math.min((i - iFirstSave) / 4, MAX_IMAGES_IN_INLINE_IMAGES_BLOCK); - if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) { - return i; - } - var maxX = 0; - var map = [], maxLineHeight = 0; - var currentX = IMAGE_PADDING, currentY = IMAGE_PADDING; - var q; - for (q = 0; q < count; q++) { - var transform = argsArray[iFirstTransform + (q << 2)]; - var img = argsArray[iFirstPIIXO + (q << 2)][0]; - if (currentX + img.width > MAX_WIDTH) { - maxX = Math.max(maxX, currentX); - currentY += maxLineHeight + 2 * IMAGE_PADDING; - currentX = 0; - maxLineHeight = 0; - } - map.push({ - transform: transform, - x: currentX, - y: currentY, - w: img.width, - h: img.height - }); - currentX += img.width + 2 * IMAGE_PADDING; - maxLineHeight = Math.max(maxLineHeight, img.height); - } - var imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING; - var imgHeight = currentY + maxLineHeight + IMAGE_PADDING; - var imgData = new Uint8Array(imgWidth * imgHeight * 4); - var imgRowSize = imgWidth << 2; - for (q = 0; q < count; q++) { - var data = argsArray[iFirstPIIXO + (q << 2)][0].data; - var rowSize = map[q].w << 2; - var dataOffset = 0; - var offset = map[q].x + map[q].y * imgWidth << 2; - imgData.set(data.subarray(0, rowSize), offset - imgRowSize); - for (var k = 0, kk = map[q].h; k < kk; k++) { - imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset); - dataOffset += rowSize; - offset += imgRowSize; - } - imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset); - while (offset >= 0) { - data[offset - 4] = data[offset]; - data[offset - 3] = data[offset + 1]; - data[offset - 2] = data[offset + 2]; - data[offset - 1] = data[offset + 3]; - data[offset + rowSize] = data[offset + rowSize - 4]; - data[offset + rowSize + 1] = data[offset + rowSize - 3]; - data[offset + rowSize + 2] = data[offset + rowSize - 2]; - data[offset + rowSize + 3] = data[offset + rowSize - 1]; - offset -= imgRowSize; - } - } - fnArray.splice(iFirstSave, count * 4, OPS.paintInlineImageXObjectGroup); - argsArray.splice(iFirstSave, count * 4, [ - { - width: imgWidth, - height: imgHeight, - kind: ImageKind.RGBA_32BPP, - data: imgData - }, - map - ]); - return iFirstSave + 1; - }); - addState(InitialState, [ - OPS.save, - OPS.transform, - OPS.paintImageMaskXObject, - OPS.restore - ], function foundImageMaskGroup(context) { - var MIN_IMAGES_IN_MASKS_BLOCK = 10; - var MAX_IMAGES_IN_MASKS_BLOCK = 100; - var MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000; - var fnArray = context.fnArray, argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstSave = curr - 3; - var iFirstTransform = curr - 2; - var iFirstPIMXO = curr - 1; - var i = iFirstSave + 4; - var ii = fnArray.length; - while (i + 3 < ii) { - if (fnArray[i] !== OPS.save || fnArray[i + 1] !== OPS.transform || fnArray[i + 2] !== OPS.paintImageMaskXObject || fnArray[i + 3] !== OPS.restore) { - break; - } - i += 4; - } - var count = (i - iFirstSave) / 4; - count = handlePaintSolidColorImageMask(iFirstSave, count, fnArray, argsArray); - if (count < MIN_IMAGES_IN_MASKS_BLOCK) { - return i; - } - var q; - var isSameImage = false; - var iTransform, transformArgs; - var firstPIMXOArg0 = argsArray[iFirstPIMXO][0]; - if (argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0) { - isSameImage = true; - var firstTransformArg0 = argsArray[iFirstTransform][0]; - var firstTransformArg3 = argsArray[iFirstTransform][3]; - iTransform = iFirstTransform + 4; - var iPIMXO = iFirstPIMXO + 4; - for (q = 1; q < count; q++, iTransform += 4, iPIMXO += 4) { - transformArgs = argsArray[iTransform]; - if (argsArray[iPIMXO][0] !== firstPIMXOArg0 || transformArgs[0] !== firstTransformArg0 || transformArgs[1] !== 0 || transformArgs[2] !== 0 || transformArgs[3] !== firstTransformArg3) { - if (q < MIN_IMAGES_IN_MASKS_BLOCK) { - isSameImage = false; - } else { - count = q; - } - break; - } - } - } - if (isSameImage) { - count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK); - var positions = new Float32Array(count * 2); - iTransform = iFirstTransform; - for (q = 0; q < count; q++, iTransform += 4) { - transformArgs = argsArray[iTransform]; - positions[q << 1] = transformArgs[4]; - positions[(q << 1) + 1] = transformArgs[5]; - } - fnArray.splice(iFirstSave, count * 4, OPS.paintImageMaskXObjectRepeat); - argsArray.splice(iFirstSave, count * 4, [ - firstPIMXOArg0, - firstTransformArg0, - firstTransformArg3, - positions - ]); - } else { - count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK); - var images = []; - for (q = 0; q < count; q++) { - transformArgs = argsArray[iFirstTransform + (q << 2)]; - var maskParams = argsArray[iFirstPIMXO + (q << 2)][0]; - images.push({ - data: maskParams.data, - width: maskParams.width, - height: maskParams.height, - transform: transformArgs - }); - } - fnArray.splice(iFirstSave, count * 4, OPS.paintImageMaskXObjectGroup); - argsArray.splice(iFirstSave, count * 4, [images]); - } - return iFirstSave + 1; - }); - addState(InitialState, [ - OPS.save, - OPS.transform, - OPS.paintImageXObject, - OPS.restore - ], function (context) { - var MIN_IMAGES_IN_BLOCK = 3; - var MAX_IMAGES_IN_BLOCK = 1000; - var fnArray = context.fnArray, argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstSave = curr - 3; - var iFirstTransform = curr - 2; - var iFirstPIXO = curr - 1; - var iFirstRestore = curr; - if (argsArray[iFirstTransform][1] !== 0 || argsArray[iFirstTransform][2] !== 0) { - return iFirstRestore + 1; - } - var firstPIXOArg0 = argsArray[iFirstPIXO][0]; - var firstTransformArg0 = argsArray[iFirstTransform][0]; - var firstTransformArg3 = argsArray[iFirstTransform][3]; - var i = iFirstSave + 4; - var ii = fnArray.length; - while (i + 3 < ii) { - if (fnArray[i] !== OPS.save || fnArray[i + 1] !== OPS.transform || fnArray[i + 2] !== OPS.paintImageXObject || fnArray[i + 3] !== OPS.restore) { - break; - } - if (argsArray[i + 1][0] !== firstTransformArg0 || argsArray[i + 1][1] !== 0 || argsArray[i + 1][2] !== 0 || argsArray[i + 1][3] !== firstTransformArg3) { - break; - } - if (argsArray[i + 2][0] !== firstPIXOArg0) { - break; - } - i += 4; - } - var count = Math.min((i - iFirstSave) / 4, MAX_IMAGES_IN_BLOCK); - if (count < MIN_IMAGES_IN_BLOCK) { - return i; - } - var positions = new Float32Array(count * 2); - var iTransform = iFirstTransform; - for (var q = 0; q < count; q++, iTransform += 4) { - var transformArgs = argsArray[iTransform]; - positions[q << 1] = transformArgs[4]; - positions[(q << 1) + 1] = transformArgs[5]; - } - var args = [ - firstPIXOArg0, - firstTransformArg0, - firstTransformArg3, - positions - ]; - fnArray.splice(iFirstSave, count * 4, OPS.paintImageXObjectRepeat); - argsArray.splice(iFirstSave, count * 4, args); - return iFirstSave + 1; - }); - addState(InitialState, [ - OPS.beginText, - OPS.setFont, - OPS.setTextMatrix, - OPS.showText, - OPS.endText - ], function (context) { - var MIN_CHARS_IN_BLOCK = 3; - var MAX_CHARS_IN_BLOCK = 1000; - var fnArray = context.fnArray, argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstBeginText = curr - 4; - var iFirstSetFont = curr - 3; - var iFirstSetTextMatrix = curr - 2; - var iFirstShowText = curr - 1; - var iFirstEndText = curr; - var firstSetFontArg0 = argsArray[iFirstSetFont][0]; - var firstSetFontArg1 = argsArray[iFirstSetFont][1]; - var i = iFirstBeginText + 5; - var ii = fnArray.length; - while (i + 4 < ii) { - if (fnArray[i] !== OPS.beginText || fnArray[i + 1] !== OPS.setFont || fnArray[i + 2] !== OPS.setTextMatrix || fnArray[i + 3] !== OPS.showText || fnArray[i + 4] !== OPS.endText) { - break; - } - if (argsArray[i + 1][0] !== firstSetFontArg0 || argsArray[i + 1][1] !== firstSetFontArg1) { - break; - } - i += 5; - } - var count = Math.min((i - iFirstBeginText) / 5, MAX_CHARS_IN_BLOCK); - if (count < MIN_CHARS_IN_BLOCK) { - return i; - } - var iFirst = iFirstBeginText; - if (iFirstBeginText >= 4 && fnArray[iFirstBeginText - 4] === fnArray[iFirstSetFont] && fnArray[iFirstBeginText - 3] === fnArray[iFirstSetTextMatrix] && fnArray[iFirstBeginText - 2] === fnArray[iFirstShowText] && fnArray[iFirstBeginText - 1] === fnArray[iFirstEndText] && argsArray[iFirstBeginText - 4][0] === firstSetFontArg0 && argsArray[iFirstBeginText - 4][1] === firstSetFontArg1) { - count++; - iFirst -= 5; - } - var iEndText = iFirst + 4; - for (var q = 1; q < count; q++) { - fnArray.splice(iEndText, 3); - argsArray.splice(iEndText, 3); - iEndText += 2; - } - return iEndText + 1; - }); - function QueueOptimizer() { - } - QueueOptimizer.prototype = { - optimize: function QueueOptimizer_optimize(queue) { - var fnArray = queue.fnArray, argsArray = queue.argsArray; - var context = { - iCurr: 0, - fnArray: fnArray, - argsArray: argsArray - }; - var state; - var i = 0, ii = fnArray.length; - while (i < ii) { - state = (state || InitialState)[fnArray[i]]; - if (typeof state === 'function') { - context.iCurr = i; - i = state(context); - state = undefined; - ii = context.fnArray.length; - } else { - i++; - } - } - } - }; - return QueueOptimizer; - }(); - exports.OperatorList = OperatorList; - exports.PartialEvaluator = PartialEvaluator; - })); - (function (root, factory) { - factory(root.pdfjsCoreAnnotation = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreColorSpace, root.pdfjsCoreObj, root.pdfjsCoreEvaluator); - }(this, function (exports, sharedUtil, corePrimitives, coreStream, coreColorSpace, coreObj, coreEvaluator) { - var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType; - var AnnotationFieldFlag = sharedUtil.AnnotationFieldFlag; - var AnnotationFlag = sharedUtil.AnnotationFlag; - var AnnotationType = sharedUtil.AnnotationType; - var OPS = sharedUtil.OPS; - var Util = sharedUtil.Util; - var isString = sharedUtil.isString; - var isArray = sharedUtil.isArray; - var isInt = sharedUtil.isInt; - var stringToBytes = sharedUtil.stringToBytes; - var stringToPDFString = sharedUtil.stringToPDFString; - var warn = sharedUtil.warn; - var Dict = corePrimitives.Dict; - var isDict = corePrimitives.isDict; - var isName = corePrimitives.isName; - var isRef = corePrimitives.isRef; - var Stream = coreStream.Stream; - var ColorSpace = coreColorSpace.ColorSpace; - var Catalog = coreObj.Catalog; - var ObjectLoader = coreObj.ObjectLoader; - var FileSpec = coreObj.FileSpec; - var OperatorList = coreEvaluator.OperatorList; - function AnnotationFactory() { - } - AnnotationFactory.prototype = { - create: function AnnotationFactory_create(xref, ref, pdfManager, idFactory) { - var dict = xref.fetchIfRef(ref); - if (!isDict(dict)) { - return; - } - var id = isRef(ref) ? ref.toString() : 'annot_' + idFactory.createObjId(); - var subtype = dict.get('Subtype'); - subtype = isName(subtype) ? subtype.name : null; - var parameters = { - xref: xref, - dict: dict, - ref: isRef(ref) ? ref : null, - subtype: subtype, - id: id, - pdfManager: pdfManager - }; - switch (subtype) { - case 'Link': - return new LinkAnnotation(parameters); - case 'Text': - return new TextAnnotation(parameters); - case 'Widget': - var fieldType = Util.getInheritableProperty(dict, 'FT'); - fieldType = isName(fieldType) ? fieldType.name : null; - switch (fieldType) { - case 'Tx': - return new TextWidgetAnnotation(parameters); - case 'Btn': - return new ButtonWidgetAnnotation(parameters); - case 'Ch': - return new ChoiceWidgetAnnotation(parameters); - } - warn('Unimplemented widget field type "' + fieldType + '", ' + 'falling back to base field type.'); - return new WidgetAnnotation(parameters); - case 'Popup': - return new PopupAnnotation(parameters); - case 'Highlight': - return new HighlightAnnotation(parameters); - case 'Underline': - return new UnderlineAnnotation(parameters); - case 'Squiggly': - return new SquigglyAnnotation(parameters); - case 'StrikeOut': - return new StrikeOutAnnotation(parameters); - case 'FileAttachment': - return new FileAttachmentAnnotation(parameters); - default: - if (!subtype) { - warn('Annotation is missing the required /Subtype.'); - } else { - warn('Unimplemented annotation type "' + subtype + '", ' + 'falling back to base annotation.'); - } - return new Annotation(parameters); - } - } - }; - var Annotation = function AnnotationClosure() { - function getTransformMatrix(rect, bbox, matrix) { - var bounds = Util.getAxialAlignedBoundingBox(bbox, matrix); - var minX = bounds[0]; - var minY = bounds[1]; - var maxX = bounds[2]; - var maxY = bounds[3]; - if (minX === maxX || minY === maxY) { - return [ - 1, - 0, - 0, - 1, - rect[0], - rect[1] - ]; - } - var xRatio = (rect[2] - rect[0]) / (maxX - minX); - var yRatio = (rect[3] - rect[1]) / (maxY - minY); - return [ - xRatio, - 0, - 0, - yRatio, - rect[0] - minX * xRatio, - rect[1] - minY * yRatio - ]; - } - function getDefaultAppearance(dict) { - var appearanceState = dict.get('AP'); - if (!isDict(appearanceState)) { - return; - } - var appearance; - var appearances = appearanceState.get('N'); - if (isDict(appearances)) { - var as = dict.get('AS'); - if (as && appearances.has(as.name)) { - appearance = appearances.get(as.name); - } - } else { - appearance = appearances; - } - return appearance; - } - function Annotation(params) { - var dict = params.dict; - this.setFlags(dict.get('F')); - this.setRectangle(dict.getArray('Rect')); - this.setColor(dict.getArray('C')); - this.setBorderStyle(dict); - this.appearance = getDefaultAppearance(dict); - this.data = {}; - this.data.id = params.id; - this.data.subtype = params.subtype; - this.data.annotationFlags = this.flags; - this.data.rect = this.rectangle; - this.data.color = this.color; - this.data.borderStyle = this.borderStyle; - this.data.hasAppearance = !!this.appearance; - } - Annotation.prototype = { - _hasFlag: function Annotation_hasFlag(flags, flag) { - return !!(flags & flag); - }, - _isViewable: function Annotation_isViewable(flags) { - return !this._hasFlag(flags, AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, AnnotationFlag.HIDDEN) && !this._hasFlag(flags, AnnotationFlag.NOVIEW); - }, - _isPrintable: function AnnotationFlag_isPrintable(flags) { - return this._hasFlag(flags, AnnotationFlag.PRINT) && !this._hasFlag(flags, AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, AnnotationFlag.HIDDEN); - }, - get viewable() { - if (this.flags === 0) { - return true; - } - return this._isViewable(this.flags); - }, - get printable() { - if (this.flags === 0) { - return false; - } - return this._isPrintable(this.flags); - }, - setFlags: function Annotation_setFlags(flags) { - this.flags = isInt(flags) && flags > 0 ? flags : 0; - }, - hasFlag: function Annotation_hasFlag(flag) { - return this._hasFlag(this.flags, flag); - }, - setRectangle: function Annotation_setRectangle(rectangle) { - if (isArray(rectangle) && rectangle.length === 4) { - this.rectangle = Util.normalizeRect(rectangle); - } else { - this.rectangle = [ - 0, - 0, - 0, - 0 - ]; - } - }, - setColor: function Annotation_setColor(color) { - var rgbColor = new Uint8Array(3); - if (!isArray(color)) { - this.color = rgbColor; - return; - } - switch (color.length) { - case 0: - this.color = null; - break; - case 1: - ColorSpace.singletons.gray.getRgbItem(color, 0, rgbColor, 0); - this.color = rgbColor; - break; - case 3: - ColorSpace.singletons.rgb.getRgbItem(color, 0, rgbColor, 0); - this.color = rgbColor; - break; - case 4: - ColorSpace.singletons.cmyk.getRgbItem(color, 0, rgbColor, 0); - this.color = rgbColor; - break; - default: - this.color = rgbColor; - break; - } - }, - setBorderStyle: function Annotation_setBorderStyle(borderStyle) { - this.borderStyle = new AnnotationBorderStyle(); - if (!isDict(borderStyle)) { - return; - } - if (borderStyle.has('BS')) { - var dict = borderStyle.get('BS'); - var dictType = dict.get('Type'); - if (!dictType || isName(dictType, 'Border')) { - this.borderStyle.setWidth(dict.get('W')); - this.borderStyle.setStyle(dict.get('S')); - this.borderStyle.setDashArray(dict.getArray('D')); - } - } else if (borderStyle.has('Border')) { - var array = borderStyle.getArray('Border'); - if (isArray(array) && array.length >= 3) { - this.borderStyle.setHorizontalCornerRadius(array[0]); - this.borderStyle.setVerticalCornerRadius(array[1]); - this.borderStyle.setWidth(array[2]); - if (array.length === 4) { - this.borderStyle.setDashArray(array[3]); - } - } - } else { - this.borderStyle.setWidth(0); - } - }, - _preparePopup: function Annotation_preparePopup(dict) { - if (!dict.has('C')) { - this.data.color = null; - } - this.data.hasPopup = dict.has('Popup'); - this.data.title = stringToPDFString(dict.get('T') || ''); - this.data.contents = stringToPDFString(dict.get('Contents') || ''); - }, - loadResources: function Annotation_loadResources(keys) { - return new Promise(function (resolve, reject) { - this.appearance.dict.getAsync('Resources').then(function (resources) { - if (!resources) { - resolve(); - return; - } - var objectLoader = new ObjectLoader(resources.map, keys, resources.xref); - objectLoader.load().then(function () { - resolve(resources); - }, reject); - }, reject); - }.bind(this)); - }, - getOperatorList: function Annotation_getOperatorList(evaluator, task, renderForms) { - if (!this.appearance) { - return Promise.resolve(new OperatorList()); - } - var data = this.data; - var appearanceDict = this.appearance.dict; - var resourcesPromise = this.loadResources([ - 'ExtGState', - 'ColorSpace', - 'Pattern', - 'Shading', - 'XObject', - 'Font' - ]); - var bbox = appearanceDict.getArray('BBox') || [ - 0, - 0, - 1, - 1 - ]; - var matrix = appearanceDict.getArray('Matrix') || [ - 1, - 0, - 0, - 1, - 0, - 0 - ]; - var transform = getTransformMatrix(data.rect, bbox, matrix); - var self = this; - return resourcesPromise.then(function (resources) { - var opList = new OperatorList(); - opList.addOp(OPS.beginAnnotation, [ - data.rect, - transform, - matrix - ]); - return evaluator.getOperatorList(self.appearance, task, resources, opList).then(function () { - opList.addOp(OPS.endAnnotation, []); - self.appearance.reset(); - return opList; - }); - }); - } - }; - Annotation.appendToOperatorList = function Annotation_appendToOperatorList(annotations, opList, partialEvaluator, task, intent, renderForms) { - var annotationPromises = []; - for (var i = 0, n = annotations.length; i < n; ++i) { - if (intent === 'display' && annotations[i].viewable || intent === 'print' && annotations[i].printable) { - annotationPromises.push(annotations[i].getOperatorList(partialEvaluator, task, renderForms)); - } - } - return Promise.all(annotationPromises).then(function (operatorLists) { - opList.addOp(OPS.beginAnnotations, []); - for (var i = 0, n = operatorLists.length; i < n; ++i) { - opList.addOpList(operatorLists[i]); - } - opList.addOp(OPS.endAnnotations, []); - }); - }; - return Annotation; - }(); - var AnnotationBorderStyle = function AnnotationBorderStyleClosure() { - function AnnotationBorderStyle() { - this.width = 1; - this.style = AnnotationBorderStyleType.SOLID; - this.dashArray = [3]; - this.horizontalCornerRadius = 0; - this.verticalCornerRadius = 0; - } - AnnotationBorderStyle.prototype = { - setWidth: function AnnotationBorderStyle_setWidth(width) { - if (width === (width | 0)) { - this.width = width; - } - }, - setStyle: function AnnotationBorderStyle_setStyle(style) { - if (!style) { - return; - } - switch (style.name) { - case 'S': - this.style = AnnotationBorderStyleType.SOLID; - break; - case 'D': - this.style = AnnotationBorderStyleType.DASHED; - break; - case 'B': - this.style = AnnotationBorderStyleType.BEVELED; - break; - case 'I': - this.style = AnnotationBorderStyleType.INSET; - break; - case 'U': - this.style = AnnotationBorderStyleType.UNDERLINE; - break; - default: - break; - } - }, - setDashArray: function AnnotationBorderStyle_setDashArray(dashArray) { - if (isArray(dashArray) && dashArray.length > 0) { - var isValid = true; - var allZeros = true; - for (var i = 0, len = dashArray.length; i < len; i++) { - var element = dashArray[i]; - var validNumber = +element >= 0; - if (!validNumber) { - isValid = false; - break; - } else if (element > 0) { - allZeros = false; - } - } - if (isValid && !allZeros) { - this.dashArray = dashArray; - } else { - this.width = 0; - } - } else if (dashArray) { - this.width = 0; - } - }, - setHorizontalCornerRadius: function AnnotationBorderStyle_setHorizontalCornerRadius(radius) { - if (radius === (radius | 0)) { - this.horizontalCornerRadius = radius; - } - }, - setVerticalCornerRadius: function AnnotationBorderStyle_setVerticalCornerRadius(radius) { - if (radius === (radius | 0)) { - this.verticalCornerRadius = radius; - } - } - }; - return AnnotationBorderStyle; - }(); - var WidgetAnnotation = function WidgetAnnotationClosure() { - function WidgetAnnotation(params) { - Annotation.call(this, params); - var dict = params.dict; - var data = this.data; - data.annotationType = AnnotationType.WIDGET; - data.fieldName = this._constructFieldName(dict); - data.fieldValue = Util.getInheritableProperty(dict, 'V', true); - data.alternativeText = stringToPDFString(dict.get('TU') || ''); - data.defaultAppearance = Util.getInheritableProperty(dict, 'DA') || ''; - var fieldType = Util.getInheritableProperty(dict, 'FT'); - data.fieldType = isName(fieldType) ? fieldType.name : null; - this.fieldResources = Util.getInheritableProperty(dict, 'DR') || Dict.empty; - data.fieldFlags = Util.getInheritableProperty(dict, 'Ff'); - if (!isInt(data.fieldFlags) || data.fieldFlags < 0) { - data.fieldFlags = 0; - } - data.readOnly = this.hasFieldFlag(AnnotationFieldFlag.READONLY); - if (data.fieldType === 'Sig') { - this.setFlags(AnnotationFlag.HIDDEN); - } - } - Util.inherit(WidgetAnnotation, Annotation, { - _constructFieldName: function WidgetAnnotation_constructFieldName(dict) { - if (!dict.has('T') && !dict.has('Parent')) { - warn('Unknown field name, falling back to empty field name.'); - return ''; - } - if (!dict.has('Parent')) { - return stringToPDFString(dict.get('T')); - } - var fieldName = []; - if (dict.has('T')) { - fieldName.unshift(stringToPDFString(dict.get('T'))); - } - var loopDict = dict; - while (loopDict.has('Parent')) { - loopDict = loopDict.get('Parent'); - if (loopDict.has('T')) { - fieldName.unshift(stringToPDFString(loopDict.get('T'))); - } - } - return fieldName.join('.'); - }, - hasFieldFlag: function WidgetAnnotation_hasFieldFlag(flag) { - return !!(this.data.fieldFlags & flag); - } - }); - return WidgetAnnotation; - }(); - var TextWidgetAnnotation = function TextWidgetAnnotationClosure() { - function TextWidgetAnnotation(params) { - WidgetAnnotation.call(this, params); - this.data.fieldValue = stringToPDFString(this.data.fieldValue || ''); - var alignment = Util.getInheritableProperty(params.dict, 'Q'); - if (!isInt(alignment) || alignment < 0 || alignment > 2) { - alignment = null; - } - this.data.textAlignment = alignment; - var maximumLength = Util.getInheritableProperty(params.dict, 'MaxLen'); - if (!isInt(maximumLength) || maximumLength < 0) { - maximumLength = null; - } - this.data.maxLen = maximumLength; - this.data.multiLine = this.hasFieldFlag(AnnotationFieldFlag.MULTILINE); - this.data.comb = this.hasFieldFlag(AnnotationFieldFlag.COMB) && !this.hasFieldFlag(AnnotationFieldFlag.MULTILINE) && !this.hasFieldFlag(AnnotationFieldFlag.PASSWORD) && !this.hasFieldFlag(AnnotationFieldFlag.FILESELECT) && this.data.maxLen !== null; - } - Util.inherit(TextWidgetAnnotation, WidgetAnnotation, { - getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator, task, renderForms) { - var operatorList = new OperatorList(); - if (renderForms) { - return Promise.resolve(operatorList); - } - if (this.appearance) { - return Annotation.prototype.getOperatorList.call(this, evaluator, task, renderForms); - } - if (!this.data.defaultAppearance) { - return Promise.resolve(operatorList); - } - var stream = new Stream(stringToBytes(this.data.defaultAppearance)); - return evaluator.getOperatorList(stream, task, this.fieldResources, operatorList).then(function () { - return operatorList; - }); - } - }); - return TextWidgetAnnotation; - }(); - var ButtonWidgetAnnotation = function ButtonWidgetAnnotationClosure() { - function ButtonWidgetAnnotation(params) { - WidgetAnnotation.call(this, params); - this.data.checkBox = !this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); - if (this.data.checkBox) { - if (!isName(this.data.fieldValue)) { - return; - } - this.data.fieldValue = this.data.fieldValue.name; - } - this.data.radioButton = this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); - if (this.data.radioButton) { - this.data.fieldValue = this.data.buttonValue = null; - var fieldParent = params.dict.get('Parent'); - if (!isDict(fieldParent) || !fieldParent.has('V')) { - return; - } - var fieldParentValue = fieldParent.get('V'); - if (!isName(fieldParentValue)) { - return; - } - this.data.fieldValue = fieldParentValue.name; - var appearanceStates = params.dict.get('AP'); - if (!isDict(appearanceStates)) { - return; - } - var normalAppearanceState = appearanceStates.get('N'); - if (!isDict(normalAppearanceState)) { - return; - } - var keys = normalAppearanceState.getKeys(); - for (var i = 0, ii = keys.length; i < ii; i++) { - if (keys[i] !== 'Off') { - this.data.buttonValue = keys[i]; - break; - } - } - } - } - Util.inherit(ButtonWidgetAnnotation, WidgetAnnotation, { - getOperatorList: function ButtonWidgetAnnotation_getOperatorList(evaluator, task, renderForms) { - var operatorList = new OperatorList(); - if (renderForms) { - return Promise.resolve(operatorList); - } - if (this.appearance) { - return Annotation.prototype.getOperatorList.call(this, evaluator, task, renderForms); - } - return Promise.resolve(operatorList); - } - }); - return ButtonWidgetAnnotation; - }(); - var ChoiceWidgetAnnotation = function ChoiceWidgetAnnotationClosure() { - function ChoiceWidgetAnnotation(params) { - WidgetAnnotation.call(this, params); - this.data.options = []; - var options = params.dict.get('Opt'); - if (isArray(options)) { - var xref = params.xref; - for (var i = 0, ii = options.length; i < ii; i++) { - var option = xref.fetchIfRef(options[i]); - var isOptionArray = isArray(option); - this.data.options[i] = { - exportValue: isOptionArray ? xref.fetchIfRef(option[0]) : option, - displayValue: isOptionArray ? xref.fetchIfRef(option[1]) : option - }; - } - } - if (!isArray(this.data.fieldValue)) { - this.data.fieldValue = [this.data.fieldValue]; - } - this.data.combo = this.hasFieldFlag(AnnotationFieldFlag.COMBO); - this.data.multiSelect = this.hasFieldFlag(AnnotationFieldFlag.MULTISELECT); - } - Util.inherit(ChoiceWidgetAnnotation, WidgetAnnotation, { - getOperatorList: function ChoiceWidgetAnnotation_getOperatorList(evaluator, task, renderForms) { - var operatorList = new OperatorList(); - if (renderForms) { - return Promise.resolve(operatorList); - } - return Annotation.prototype.getOperatorList.call(this, evaluator, task, renderForms); - } - }); - return ChoiceWidgetAnnotation; - }(); - var TextAnnotation = function TextAnnotationClosure() { - var DEFAULT_ICON_SIZE = 22; - function TextAnnotation(parameters) { - Annotation.call(this, parameters); - this.data.annotationType = AnnotationType.TEXT; - if (this.data.hasAppearance) { - this.data.name = 'NoIcon'; - } else { - this.data.rect[1] = this.data.rect[3] - DEFAULT_ICON_SIZE; - this.data.rect[2] = this.data.rect[0] + DEFAULT_ICON_SIZE; - this.data.name = parameters.dict.has('Name') ? parameters.dict.get('Name').name : 'Note'; - } - this._preparePopup(parameters.dict); - } - Util.inherit(TextAnnotation, Annotation, {}); - return TextAnnotation; - }(); - var LinkAnnotation = function LinkAnnotationClosure() { - function LinkAnnotation(params) { - Annotation.call(this, params); - var data = this.data; - data.annotationType = AnnotationType.LINK; - Catalog.parseDestDictionary({ - destDict: params.dict, - resultObj: data, - docBaseUrl: params.pdfManager.docBaseUrl - }); - } - Util.inherit(LinkAnnotation, Annotation, {}); - return LinkAnnotation; - }(); - var PopupAnnotation = function PopupAnnotationClosure() { - function PopupAnnotation(parameters) { - Annotation.call(this, parameters); - this.data.annotationType = AnnotationType.POPUP; - var dict = parameters.dict; - var parentItem = dict.get('Parent'); - if (!parentItem) { - warn('Popup annotation has a missing or invalid parent annotation.'); - return; - } - this.data.parentId = dict.getRaw('Parent').toString(); - this.data.title = stringToPDFString(parentItem.get('T') || ''); - this.data.contents = stringToPDFString(parentItem.get('Contents') || ''); - if (!parentItem.has('C')) { - this.data.color = null; - } else { - this.setColor(parentItem.getArray('C')); - this.data.color = this.color; - } - if (!this.viewable) { - var parentFlags = parentItem.get('F'); - if (this._isViewable(parentFlags)) { - this.setFlags(parentFlags); - } - } - } - Util.inherit(PopupAnnotation, Annotation, {}); - return PopupAnnotation; - }(); - var HighlightAnnotation = function HighlightAnnotationClosure() { - function HighlightAnnotation(parameters) { - Annotation.call(this, parameters); - this.data.annotationType = AnnotationType.HIGHLIGHT; - this._preparePopup(parameters.dict); - this.data.borderStyle.setWidth(0); - } - Util.inherit(HighlightAnnotation, Annotation, {}); - return HighlightAnnotation; - }(); - var UnderlineAnnotation = function UnderlineAnnotationClosure() { - function UnderlineAnnotation(parameters) { - Annotation.call(this, parameters); - this.data.annotationType = AnnotationType.UNDERLINE; - this._preparePopup(parameters.dict); - this.data.borderStyle.setWidth(0); - } - Util.inherit(UnderlineAnnotation, Annotation, {}); - return UnderlineAnnotation; - }(); - var SquigglyAnnotation = function SquigglyAnnotationClosure() { - function SquigglyAnnotation(parameters) { - Annotation.call(this, parameters); - this.data.annotationType = AnnotationType.SQUIGGLY; - this._preparePopup(parameters.dict); - this.data.borderStyle.setWidth(0); - } - Util.inherit(SquigglyAnnotation, Annotation, {}); - return SquigglyAnnotation; - }(); - var StrikeOutAnnotation = function StrikeOutAnnotationClosure() { - function StrikeOutAnnotation(parameters) { - Annotation.call(this, parameters); - this.data.annotationType = AnnotationType.STRIKEOUT; - this._preparePopup(parameters.dict); - this.data.borderStyle.setWidth(0); - } - Util.inherit(StrikeOutAnnotation, Annotation, {}); - return StrikeOutAnnotation; - }(); - var FileAttachmentAnnotation = function FileAttachmentAnnotationClosure() { - function FileAttachmentAnnotation(parameters) { - Annotation.call(this, parameters); - var file = new FileSpec(parameters.dict.get('FS'), parameters.xref); - this.data.annotationType = AnnotationType.FILEATTACHMENT; - this.data.file = file.serializable; - this._preparePopup(parameters.dict); - } - Util.inherit(FileAttachmentAnnotation, Annotation, {}); - return FileAttachmentAnnotation; - }(); - exports.Annotation = Annotation; - exports.AnnotationBorderStyle = AnnotationBorderStyle; - exports.AnnotationFactory = AnnotationFactory; - })); - (function (root, factory) { - factory(root.pdfjsCoreDocument = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreObj, root.pdfjsCoreParser, root.pdfjsCoreCrypto, root.pdfjsCoreEvaluator, root.pdfjsCoreAnnotation); - }(this, function (exports, sharedUtil, corePrimitives, coreStream, coreObj, coreParser, coreCrypto, coreEvaluator, coreAnnotation) { - var MissingDataException = sharedUtil.MissingDataException; - var Util = sharedUtil.Util; - var assert = sharedUtil.assert; - var error = sharedUtil.error; - var info = sharedUtil.info; - var isArray = sharedUtil.isArray; - var isArrayBuffer = sharedUtil.isArrayBuffer; - var isNum = sharedUtil.isNum; - var isString = sharedUtil.isString; - var shadow = sharedUtil.shadow; - var stringToBytes = sharedUtil.stringToBytes; - var stringToPDFString = sharedUtil.stringToPDFString; - var warn = sharedUtil.warn; - var isSpace = sharedUtil.isSpace; - var Dict = corePrimitives.Dict; - var isDict = corePrimitives.isDict; - var isName = corePrimitives.isName; - var isStream = corePrimitives.isStream; - var NullStream = coreStream.NullStream; - var Stream = coreStream.Stream; - var StreamsSequenceStream = coreStream.StreamsSequenceStream; - var Catalog = coreObj.Catalog; - var ObjectLoader = coreObj.ObjectLoader; - var XRef = coreObj.XRef; - var Linearization = coreParser.Linearization; - var calculateMD5 = coreCrypto.calculateMD5; - var OperatorList = coreEvaluator.OperatorList; - var PartialEvaluator = coreEvaluator.PartialEvaluator; - var Annotation = coreAnnotation.Annotation; - var AnnotationFactory = coreAnnotation.AnnotationFactory; - var Page = function PageClosure() { - var DEFAULT_USER_UNIT = 1.0; - var LETTER_SIZE_MEDIABOX = [ - 0, - 0, - 612, - 792 - ]; - function Page(pdfManager, xref, pageIndex, pageDict, ref, fontCache) { - this.pdfManager = pdfManager; - this.pageIndex = pageIndex; - this.pageDict = pageDict; - this.xref = xref; - this.ref = ref; - this.fontCache = fontCache; - this.evaluatorOptions = pdfManager.evaluatorOptions; - this.resourcesPromise = null; - var uniquePrefix = 'p' + this.pageIndex + '_'; - var idCounters = { obj: 0 }; - this.idFactory = { - createObjId: function () { - return uniquePrefix + ++idCounters.obj; - } - }; - } - Page.prototype = { - getPageProp: function Page_getPageProp(key) { - return this.pageDict.get(key); - }, - getInheritedPageProp: function Page_getInheritedPageProp(key, getArray) { - var dict = this.pageDict, valueArray = null, loopCount = 0; - var MAX_LOOP_COUNT = 100; - getArray = getArray || false; - while (dict) { - var value = getArray ? dict.getArray(key) : dict.get(key); - if (value) { - if (!valueArray) { - valueArray = []; - } - valueArray.push(value); - } - if (++loopCount > MAX_LOOP_COUNT) { - warn('Page_getInheritedPageProp: maximum loop count exceeded.'); - break; - } - dict = dict.get('Parent'); - } - if (!valueArray) { - return Dict.empty; - } - if (valueArray.length === 1 || !isDict(valueArray[0]) || loopCount > MAX_LOOP_COUNT) { - return valueArray[0]; - } - return Dict.merge(this.xref, valueArray); - }, - get content() { - return this.getPageProp('Contents'); - }, - get resources() { - return shadow(this, 'resources', this.getInheritedPageProp('Resources')); - }, - get mediaBox() { - var mediaBox = this.getInheritedPageProp('MediaBox', true); - if (!isArray(mediaBox) || mediaBox.length !== 4) { - return shadow(this, 'mediaBox', LETTER_SIZE_MEDIABOX); - } - return shadow(this, 'mediaBox', mediaBox); - }, - get cropBox() { - var cropBox = this.getInheritedPageProp('CropBox', true); - if (!isArray(cropBox) || cropBox.length !== 4) { - return shadow(this, 'cropBox', this.mediaBox); - } - return shadow(this, 'cropBox', cropBox); - }, - get userUnit() { - var obj = this.getPageProp('UserUnit'); - if (!isNum(obj) || obj <= 0) { - obj = DEFAULT_USER_UNIT; - } - return shadow(this, 'userUnit', obj); - }, - get view() { - var mediaBox = this.mediaBox, cropBox = this.cropBox; - if (mediaBox === cropBox) { - return shadow(this, 'view', mediaBox); - } - var intersection = Util.intersect(cropBox, mediaBox); - return shadow(this, 'view', intersection || mediaBox); - }, - get rotate() { - var rotate = this.getInheritedPageProp('Rotate') || 0; - if (rotate % 90 !== 0) { - rotate = 0; - } else if (rotate >= 360) { - rotate = rotate % 360; - } else if (rotate < 0) { - rotate = (rotate % 360 + 360) % 360; - } - return shadow(this, 'rotate', rotate); - }, - getContentStream: function Page_getContentStream() { - var content = this.content; - var stream; - if (isArray(content)) { - var xref = this.xref; - var i, n = content.length; - var streams = []; - for (i = 0; i < n; ++i) { - streams.push(xref.fetchIfRef(content[i])); - } - stream = new StreamsSequenceStream(streams); - } else if (isStream(content)) { - stream = content; - } else { - stream = new NullStream(); - } - return stream; - }, - loadResources: function Page_loadResources(keys) { - if (!this.resourcesPromise) { - this.resourcesPromise = this.pdfManager.ensure(this, 'resources'); - } - return this.resourcesPromise.then(function resourceSuccess() { - var objectLoader = new ObjectLoader(this.resources.map, keys, this.xref); - return objectLoader.load(); - }.bind(this)); - }, - getOperatorList: function Page_getOperatorList(handler, task, intent, renderInteractiveForms) { - var self = this; - var pdfManager = this.pdfManager; - var contentStreamPromise = pdfManager.ensure(this, 'getContentStream', []); - var resourcesPromise = this.loadResources([ - 'ExtGState', - 'ColorSpace', - 'Pattern', - 'Shading', - 'XObject', - 'Font' - ]); - var partialEvaluator = new PartialEvaluator(pdfManager, this.xref, handler, this.pageIndex, this.idFactory, this.fontCache, this.evaluatorOptions); - var dataPromises = Promise.all([ - contentStreamPromise, - resourcesPromise - ]); - var pageListPromise = dataPromises.then(function (data) { - var contentStream = data[0]; - var opList = new OperatorList(intent, handler, self.pageIndex); - handler.send('StartRenderPage', { - transparency: partialEvaluator.hasBlendModes(self.resources), - pageIndex: self.pageIndex, - intent: intent - }); - return partialEvaluator.getOperatorList(contentStream, task, self.resources, opList).then(function () { - return opList; - }); - }); - var annotationsPromise = pdfManager.ensure(this, 'annotations'); - return Promise.all([ - pageListPromise, - annotationsPromise - ]).then(function (datas) { - var pageOpList = datas[0]; - var annotations = datas[1]; - if (annotations.length === 0) { - pageOpList.flush(true); - return pageOpList; - } - var annotationsReadyPromise = Annotation.appendToOperatorList(annotations, pageOpList, partialEvaluator, task, intent, renderInteractiveForms); - return annotationsReadyPromise.then(function () { - pageOpList.flush(true); - return pageOpList; - }); - }); - }, - extractTextContent: function Page_extractTextContent(task, normalizeWhitespace, combineTextItems) { - var handler = { - on: function nullHandlerOn() { - }, - send: function nullHandlerSend() { - } - }; - var self = this; - var pdfManager = this.pdfManager; - var contentStreamPromise = pdfManager.ensure(this, 'getContentStream', []); - var resourcesPromise = this.loadResources([ - 'ExtGState', - 'XObject', - 'Font' - ]); - var dataPromises = Promise.all([ - contentStreamPromise, - resourcesPromise - ]); - return dataPromises.then(function (data) { - var contentStream = data[0]; - var partialEvaluator = new PartialEvaluator(pdfManager, self.xref, handler, self.pageIndex, self.idFactory, self.fontCache, self.evaluatorOptions); - return partialEvaluator.getTextContent(contentStream, task, self.resources, null, normalizeWhitespace, combineTextItems); - }); - }, - getAnnotationsData: function Page_getAnnotationsData(intent) { - var annotations = this.annotations; - var annotationsData = []; - for (var i = 0, n = annotations.length; i < n; ++i) { - if (intent) { - if (!(intent === 'display' && annotations[i].viewable) && !(intent === 'print' && annotations[i].printable)) { - continue; - } - } - annotationsData.push(annotations[i].data); - } - return annotationsData; - }, - get annotations() { - var annotations = []; - var annotationRefs = this.getInheritedPageProp('Annots') || []; - var annotationFactory = new AnnotationFactory(); - for (var i = 0, n = annotationRefs.length; i < n; ++i) { - var annotationRef = annotationRefs[i]; - var annotation = annotationFactory.create(this.xref, annotationRef, this.pdfManager, this.idFactory); - if (annotation) { - annotations.push(annotation); - } - } - return shadow(this, 'annotations', annotations); - } - }; - return Page; - }(); - var PDFDocument = function PDFDocumentClosure() { - var FINGERPRINT_FIRST_BYTES = 1024; - var EMPTY_FINGERPRINT = '\x00\x00\x00\x00\x00\x00\x00' + '\x00\x00\x00\x00\x00\x00\x00\x00\x00'; - function PDFDocument(pdfManager, arg) { - var stream; - if (isStream(arg)) { - stream = arg; - } else if (isArrayBuffer(arg)) { - stream = new Stream(arg); - } else { - error('PDFDocument: Unknown argument type'); - } - assert(stream.length > 0, 'stream must have data'); - this.pdfManager = pdfManager; - this.stream = stream; - this.xref = new XRef(stream, pdfManager); - } - function find(stream, needle, limit, backwards) { - var pos = stream.pos; - var end = stream.end; - var strBuf = []; - if (pos + limit > end) { - limit = end - pos; - } - for (var n = 0; n < limit; ++n) { - strBuf.push(String.fromCharCode(stream.getByte())); - } - var str = strBuf.join(''); - stream.pos = pos; - var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); - if (index === -1) { - return false; - } - stream.pos += index; - return true; - } - var DocumentInfoValidators = { - get entries() { - return shadow(this, 'entries', { - Title: isString, - Author: isString, - Subject: isString, - Keywords: isString, - Creator: isString, - Producer: isString, - CreationDate: isString, - ModDate: isString, - Trapped: isName - }); - } - }; - PDFDocument.prototype = { - parse: function PDFDocument_parse(recoveryMode) { - this.setup(recoveryMode); - var version = this.catalog.catDict.get('Version'); - if (isName(version)) { - this.pdfFormatVersion = version.name; - } - try { - this.acroForm = this.catalog.catDict.get('AcroForm'); - if (this.acroForm) { - this.xfa = this.acroForm.get('XFA'); - var fields = this.acroForm.get('Fields'); - if ((!fields || !isArray(fields) || fields.length === 0) && !this.xfa) { - this.acroForm = null; - } - } - } catch (ex) { - info('Something wrong with AcroForm entry'); - this.acroForm = null; - } - }, - get linearization() { - var linearization = null; - if (this.stream.length) { - try { - linearization = Linearization.create(this.stream); - } catch (err) { - if (err instanceof MissingDataException) { - throw err; - } - info(err); - } - } - return shadow(this, 'linearization', linearization); - }, - get startXRef() { - var stream = this.stream; - var startXRef = 0; - var linearization = this.linearization; - if (linearization) { - stream.reset(); - if (find(stream, 'endobj', 1024)) { - startXRef = stream.pos + 6; - } - } else { - var step = 1024; - var found = false, pos = stream.end; - while (!found && pos > 0) { - pos -= step - 'startxref'.length; - if (pos < 0) { - pos = 0; - } - stream.pos = pos; - found = find(stream, 'startxref', step, true); - } - if (found) { - stream.skip(9); - var ch; - do { - ch = stream.getByte(); - } while (isSpace(ch)); - var str = ''; - while (ch >= 0x20 && ch <= 0x39) { - str += String.fromCharCode(ch); - ch = stream.getByte(); - } - startXRef = parseInt(str, 10); - if (isNaN(startXRef)) { - startXRef = 0; - } - } - } - return shadow(this, 'startXRef', startXRef); - }, - get mainXRefEntriesOffset() { - var mainXRefEntriesOffset = 0; - var linearization = this.linearization; - if (linearization) { - mainXRefEntriesOffset = linearization.mainXRefEntriesOffset; - } - return shadow(this, 'mainXRefEntriesOffset', mainXRefEntriesOffset); - }, - checkHeader: function PDFDocument_checkHeader() { - var stream = this.stream; - stream.reset(); - if (find(stream, '%PDF-', 1024)) { - stream.moveStart(); - var MAX_VERSION_LENGTH = 12; - var version = '', ch; - while ((ch = stream.getByte()) > 0x20) { - if (version.length >= MAX_VERSION_LENGTH) { - break; - } - version += String.fromCharCode(ch); - } - if (!this.pdfFormatVersion) { - this.pdfFormatVersion = version.substring(5); - } - return; - } - }, - parseStartXRef: function PDFDocument_parseStartXRef() { - var startXRef = this.startXRef; - this.xref.setStartXRef(startXRef); - }, - setup: function PDFDocument_setup(recoveryMode) { - this.xref.parse(recoveryMode); - var self = this; - var pageFactory = { - createPage: function (pageIndex, dict, ref, fontCache) { - return new Page(self.pdfManager, self.xref, pageIndex, dict, ref, fontCache); - } - }; - this.catalog = new Catalog(this.pdfManager, this.xref, pageFactory); - }, - get numPages() { - var linearization = this.linearization; - var num = linearization ? linearization.numPages : this.catalog.numPages; - return shadow(this, 'numPages', num); - }, - get documentInfo() { - var docInfo = { - PDFFormatVersion: this.pdfFormatVersion, - IsAcroFormPresent: !!this.acroForm, - IsXFAPresent: !!this.xfa - }; - var infoDict; - try { - infoDict = this.xref.trailer.get('Info'); - } catch (err) { - info('The document information dictionary is invalid.'); - } - if (infoDict) { - var validEntries = DocumentInfoValidators.entries; - for (var key in validEntries) { - if (infoDict.has(key)) { - var value = infoDict.get(key); - if (validEntries[key](value)) { - docInfo[key] = typeof value !== 'string' ? value : stringToPDFString(value); - } else { - info('Bad value in document info for "' + key + '"'); - } - } - } - } - return shadow(this, 'documentInfo', docInfo); - }, - get fingerprint() { - var xref = this.xref, hash, fileID = ''; - var idArray = xref.trailer.get('ID'); - if (idArray && isArray(idArray) && idArray[0] && isString(idArray[0]) && idArray[0] !== EMPTY_FINGERPRINT) { - hash = stringToBytes(idArray[0]); - } else { - if (this.stream.ensureRange) { - this.stream.ensureRange(0, Math.min(FINGERPRINT_FIRST_BYTES, this.stream.end)); - } - hash = calculateMD5(this.stream.bytes.subarray(0, FINGERPRINT_FIRST_BYTES), 0, FINGERPRINT_FIRST_BYTES); - } - for (var i = 0, n = hash.length; i < n; i++) { - var hex = hash[i].toString(16); - fileID += hex.length === 1 ? '0' + hex : hex; - } - return shadow(this, 'fingerprint', fileID); - }, - getPage: function PDFDocument_getPage(pageIndex) { - return this.catalog.getPage(pageIndex); - }, - cleanup: function PDFDocument_cleanup() { - return this.catalog.cleanup(); - } - }; - return PDFDocument; - }(); - exports.Page = Page; - exports.PDFDocument = PDFDocument; - })); - (function (root, factory) { - factory(root.pdfjsCorePdfManager = {}, root.pdfjsSharedUtil, root.pdfjsCoreStream, root.pdfjsCoreChunkedStream, root.pdfjsCoreDocument); - }(this, function (exports, sharedUtil, coreStream, coreChunkedStream, coreDocument) { - var warn = sharedUtil.warn; - var createValidAbsoluteUrl = sharedUtil.createValidAbsoluteUrl; - var shadow = sharedUtil.shadow; - var NotImplementedException = sharedUtil.NotImplementedException; - var MissingDataException = sharedUtil.MissingDataException; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var Util = sharedUtil.Util; - var Stream = coreStream.Stream; - var ChunkedStreamManager = coreChunkedStream.ChunkedStreamManager; - var PDFDocument = coreDocument.PDFDocument; - var BasePdfManager = function BasePdfManagerClosure() { - function BasePdfManager() { - throw new Error('Cannot initialize BaseManagerManager'); - } - BasePdfManager.prototype = { - get docId() { - return this._docId; - }, - get password() { - return this._password; - }, - get docBaseUrl() { - var docBaseUrl = null; - if (this._docBaseUrl) { - var absoluteUrl = createValidAbsoluteUrl(this._docBaseUrl); - if (absoluteUrl) { - docBaseUrl = absoluteUrl.href; - } else { - warn('Invalid absolute docBaseUrl: "' + this._docBaseUrl + '".'); - } - } - return shadow(this, 'docBaseUrl', docBaseUrl); - }, - onLoadedStream: function BasePdfManager_onLoadedStream() { - throw new NotImplementedException(); - }, - ensureDoc: function BasePdfManager_ensureDoc(prop, args) { - return this.ensure(this.pdfDocument, prop, args); - }, - ensureXRef: function BasePdfManager_ensureXRef(prop, args) { - return this.ensure(this.pdfDocument.xref, prop, args); - }, - ensureCatalog: function BasePdfManager_ensureCatalog(prop, args) { - return this.ensure(this.pdfDocument.catalog, prop, args); - }, - getPage: function BasePdfManager_getPage(pageIndex) { - return this.pdfDocument.getPage(pageIndex); - }, - cleanup: function BasePdfManager_cleanup() { - return this.pdfDocument.cleanup(); - }, - ensure: function BasePdfManager_ensure(obj, prop, args) { - return new NotImplementedException(); - }, - requestRange: function BasePdfManager_requestRange(begin, end) { - return new NotImplementedException(); - }, - requestLoadedStream: function BasePdfManager_requestLoadedStream() { - return new NotImplementedException(); - }, - sendProgressiveData: function BasePdfManager_sendProgressiveData(chunk) { - return new NotImplementedException(); - }, - updatePassword: function BasePdfManager_updatePassword(password) { - this._password = password; - }, - terminate: function BasePdfManager_terminate() { - return new NotImplementedException(); - } - }; - return BasePdfManager; - }(); - var LocalPdfManager = function LocalPdfManagerClosure() { - function LocalPdfManager(docId, data, password, evaluatorOptions, docBaseUrl) { - this._docId = docId; - this._password = password; - this._docBaseUrl = docBaseUrl; - this.evaluatorOptions = evaluatorOptions; - var stream = new Stream(data); - this.pdfDocument = new PDFDocument(this, stream); - this._loadedStreamCapability = createPromiseCapability(); - this._loadedStreamCapability.resolve(stream); - } - Util.inherit(LocalPdfManager, BasePdfManager, { - ensure: function LocalPdfManager_ensure(obj, prop, args) { - return new Promise(function (resolve, reject) { - try { - var value = obj[prop]; - var result; - if (typeof value === 'function') { - result = value.apply(obj, args); - } else { - result = value; - } - resolve(result); - } catch (e) { - reject(e); - } - }); - }, - requestRange: function LocalPdfManager_requestRange(begin, end) { - return Promise.resolve(); - }, - requestLoadedStream: function LocalPdfManager_requestLoadedStream() { - }, - onLoadedStream: function LocalPdfManager_onLoadedStream() { - return this._loadedStreamCapability.promise; - }, - terminate: function LocalPdfManager_terminate() { - } - }); - return LocalPdfManager; - }(); - var NetworkPdfManager = function NetworkPdfManagerClosure() { - function NetworkPdfManager(docId, pdfNetworkStream, args, evaluatorOptions, docBaseUrl) { - this._docId = docId; - this._password = args.password; - this._docBaseUrl = docBaseUrl; - this.msgHandler = args.msgHandler; - this.evaluatorOptions = evaluatorOptions; - var params = { - msgHandler: args.msgHandler, - url: args.url, - length: args.length, - disableAutoFetch: args.disableAutoFetch, - rangeChunkSize: args.rangeChunkSize - }; - this.streamManager = new ChunkedStreamManager(pdfNetworkStream, params); - this.pdfDocument = new PDFDocument(this, this.streamManager.getStream()); - } - Util.inherit(NetworkPdfManager, BasePdfManager, { - ensure: function NetworkPdfManager_ensure(obj, prop, args) { - var pdfManager = this; - return new Promise(function (resolve, reject) { - function ensureHelper() { - try { - var result; - var value = obj[prop]; - if (typeof value === 'function') { - result = value.apply(obj, args); - } else { - result = value; - } - resolve(result); - } catch (e) { - if (!(e instanceof MissingDataException)) { - reject(e); - return; - } - pdfManager.streamManager.requestRange(e.begin, e.end).then(ensureHelper, reject); - } - } - ensureHelper(); - }); - }, - requestRange: function NetworkPdfManager_requestRange(begin, end) { - return this.streamManager.requestRange(begin, end); - }, - requestLoadedStream: function NetworkPdfManager_requestLoadedStream() { - this.streamManager.requestAllChunks(); - }, - sendProgressiveData: function NetworkPdfManager_sendProgressiveData(chunk) { - this.streamManager.onReceiveData({ chunk: chunk }); - }, - onLoadedStream: function NetworkPdfManager_onLoadedStream() { - return this.streamManager.onLoadedStream(); - }, - terminate: function NetworkPdfManager_terminate() { - this.streamManager.abort(); - } - }); - return NetworkPdfManager; - }(); - exports.LocalPdfManager = LocalPdfManager; - exports.NetworkPdfManager = NetworkPdfManager; - })); - (function (root, factory) { - factory(root.pdfjsCoreWorker = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCorePdfManager); - }(this, function (exports, sharedUtil, corePrimitives, corePdfManager) { - var UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES; - var InvalidPDFException = sharedUtil.InvalidPDFException; - var MessageHandler = sharedUtil.MessageHandler; - var MissingPDFException = sharedUtil.MissingPDFException; - var UnexpectedResponseException = sharedUtil.UnexpectedResponseException; - var PasswordException = sharedUtil.PasswordException; - var PasswordResponses = sharedUtil.PasswordResponses; - var UnknownErrorException = sharedUtil.UnknownErrorException; - var XRefParseException = sharedUtil.XRefParseException; - var arrayByteLength = sharedUtil.arrayByteLength; - var arraysToBytes = sharedUtil.arraysToBytes; - var assert = sharedUtil.assert; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var error = sharedUtil.error; - var info = sharedUtil.info; - var warn = sharedUtil.warn; - var setVerbosityLevel = sharedUtil.setVerbosityLevel; - var Ref = corePrimitives.Ref; - var LocalPdfManager = corePdfManager.LocalPdfManager; - var NetworkPdfManager = corePdfManager.NetworkPdfManager; - var globalScope = sharedUtil.globalScope; - var WorkerTask = function WorkerTaskClosure() { - function WorkerTask(name) { - this.name = name; - this.terminated = false; - this._capability = createPromiseCapability(); - } - WorkerTask.prototype = { - get finished() { - return this._capability.promise; - }, - finish: function () { - this._capability.resolve(); - }, - terminate: function () { - this.terminated = true; - }, - ensureNotTerminated: function () { - if (this.terminated) { - throw new Error('Worker task was terminated'); - } - } - }; - return WorkerTask; - }(); - var PDFWorkerStream = function PDFWorkerStreamClosure() { - function PDFWorkerStream(params, msgHandler) { - this._queuedChunks = []; - var initialData = params.initialData; - if (initialData && initialData.length > 0) { - this._queuedChunks.push(initialData); - } - this._msgHandler = msgHandler; - this._isRangeSupported = !params.disableRange; - this._isStreamingSupported = !params.disableStream; - this._contentLength = params.length; - this._fullRequestReader = null; - this._rangeReaders = []; - msgHandler.on('OnDataRange', this._onReceiveData.bind(this)); - msgHandler.on('OnDataProgress', this._onProgress.bind(this)); - } - PDFWorkerStream.prototype = { - _onReceiveData: function PDFWorkerStream_onReceiveData(args) { - if (args.begin === undefined) { - if (this._fullRequestReader) { - this._fullRequestReader._enqueue(args.chunk); - } else { - this._queuedChunks.push(args.chunk); - } - } else { - var found = this._rangeReaders.some(function (rangeReader) { - if (rangeReader._begin !== args.begin) { - return false; - } - rangeReader._enqueue(args.chunk); - return true; - }); - assert(found); - } - }, - _onProgress: function PDFWorkerStream_onProgress(evt) { - if (this._rangeReaders.length > 0) { - var firstReader = this._rangeReaders[0]; - if (firstReader.onProgress) { - firstReader.onProgress({ loaded: evt.loaded }); - } - } - }, - _removeRangeReader: function PDFWorkerStream_removeRangeReader(reader) { - var i = this._rangeReaders.indexOf(reader); - if (i >= 0) { - this._rangeReaders.splice(i, 1); - } - }, - getFullReader: function PDFWorkerStream_getFullReader() { - assert(!this._fullRequestReader); - var queuedChunks = this._queuedChunks; - this._queuedChunks = null; - return new PDFWorkerStreamReader(this, queuedChunks); - }, - getRangeReader: function PDFWorkerStream_getRangeReader(begin, end) { - var reader = new PDFWorkerStreamRangeReader(this, begin, end); - this._msgHandler.send('RequestDataRange', { - begin: begin, - end: end - }); - this._rangeReaders.push(reader); - return reader; - }, - cancelAllRequests: function PDFWorkerStream_cancelAllRequests(reason) { - if (this._fullRequestReader) { - this._fullRequestReader.cancel(reason); - } - var readers = this._rangeReaders.slice(0); - readers.forEach(function (rangeReader) { - rangeReader.cancel(reason); - }); - } - }; - function PDFWorkerStreamReader(stream, queuedChunks) { - this._stream = stream; - this._done = false; - this._queuedChunks = queuedChunks || []; - this._requests = []; - this._headersReady = Promise.resolve(); - stream._fullRequestReader = this; - this.onProgress = null; - } - PDFWorkerStreamReader.prototype = { - _enqueue: function PDFWorkerStreamReader_enqueue(chunk) { - if (this._done) { - return; - } - if (this._requests.length > 0) { - var requestCapability = this._requests.shift(); - requestCapability.resolve({ - value: chunk, - done: false - }); - return; - } - this._queuedChunks.push(chunk); - }, - get headersReady() { - return this._headersReady; - }, - get isRangeSupported() { - return this._stream._isRangeSupported; - }, - get isStreamingSupported() { - return this._stream._isStreamingSupported; - }, - get contentLength() { - return this._stream._contentLength; - }, - read: function PDFWorkerStreamReader_read() { - if (this._queuedChunks.length > 0) { - var chunk = this._queuedChunks.shift(); - return Promise.resolve({ - value: chunk, - done: false - }); - } - if (this._done) { - return Promise.resolve({ - value: undefined, - done: true - }); - } - var requestCapability = createPromiseCapability(); - this._requests.push(requestCapability); - return requestCapability.promise; - }, - cancel: function PDFWorkerStreamReader_cancel(reason) { - this._done = true; - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - this._requests = []; - } - }; - function PDFWorkerStreamRangeReader(stream, begin, end) { - this._stream = stream; - this._begin = begin; - this._end = end; - this._queuedChunk = null; - this._requests = []; - this._done = false; - this.onProgress = null; - } - PDFWorkerStreamRangeReader.prototype = { - _enqueue: function PDFWorkerStreamRangeReader_enqueue(chunk) { - if (this._done) { - return; - } - if (this._requests.length === 0) { - this._queuedChunk = chunk; - } else { - var requestsCapability = this._requests.shift(); - requestsCapability.resolve({ - value: chunk, - done: false - }); - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - this._requests = []; - } - this._done = true; - this._stream._removeRangeReader(this); - }, - get isStreamingSupported() { - return false; - }, - read: function PDFWorkerStreamRangeReader_read() { - if (this._queuedChunk) { - return Promise.resolve({ - value: this._queuedChunk, - done: false - }); - } - if (this._done) { - return Promise.resolve({ - value: undefined, - done: true - }); - } - var requestCapability = createPromiseCapability(); - this._requests.push(requestCapability); - return requestCapability.promise; - }, - cancel: function PDFWorkerStreamRangeReader_cancel(reason) { - this._done = true; - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - this._requests = []; - this._stream._removeRangeReader(this); - } - }; - return PDFWorkerStream; - }(); - var PDFNetworkStream; - function setPDFNetworkStreamClass(cls) { - PDFNetworkStream = cls; - } - var WorkerMessageHandler = { - setup: function wphSetup(handler, port) { - var testMessageProcessed = false; - handler.on('test', function wphSetupTest(data) { - if (testMessageProcessed) { - return; - } - testMessageProcessed = true; - if (!(data instanceof Uint8Array)) { - handler.send('test', 'main', false); - return; - } - var supportTransfers = data[0] === 255; - handler.postMessageTransfers = supportTransfers; - var xhr = new XMLHttpRequest(); - var responseExists = 'response' in xhr; - try { - var dummy = xhr.responseType; - } catch (e) { - responseExists = false; - } - if (!responseExists) { - handler.send('test', false); - return; - } - handler.send('test', { - supportTypedArray: true, - supportTransfers: supportTransfers - }); - }); - handler.on('configure', function wphConfigure(data) { - setVerbosityLevel(data.verbosity); - }); - handler.on('GetDocRequest', function wphSetupDoc(data) { - return WorkerMessageHandler.createDocumentHandler(data, port); - }); - }, - createDocumentHandler: function wphCreateDocumentHandler(docParams, port) { - var pdfManager; - var terminated = false; - var cancelXHRs = null; - var WorkerTasks = []; - var docId = docParams.docId; - var docBaseUrl = docParams.docBaseUrl; - var workerHandlerName = docParams.docId + '_worker'; - var handler = new MessageHandler(workerHandlerName, docId, port); - handler.postMessageTransfers = docParams.postMessageTransfers; - function ensureNotTerminated() { - if (terminated) { - throw new Error('Worker was terminated'); - } - } - function startWorkerTask(task) { - WorkerTasks.push(task); - } - function finishWorkerTask(task) { - task.finish(); - var i = WorkerTasks.indexOf(task); - WorkerTasks.splice(i, 1); - } - function loadDocument(recoveryMode) { - var loadDocumentCapability = createPromiseCapability(); - var parseSuccess = function parseSuccess() { - var numPagesPromise = pdfManager.ensureDoc('numPages'); - var fingerprintPromise = pdfManager.ensureDoc('fingerprint'); - var encryptedPromise = pdfManager.ensureXRef('encrypt'); - Promise.all([ - numPagesPromise, - fingerprintPromise, - encryptedPromise - ]).then(function onDocReady(results) { - var doc = { - numPages: results[0], - fingerprint: results[1], - encrypted: !!results[2] - }; - loadDocumentCapability.resolve(doc); - }, parseFailure); - }; - var parseFailure = function parseFailure(e) { - loadDocumentCapability.reject(e); - }; - pdfManager.ensureDoc('checkHeader', []).then(function () { - pdfManager.ensureDoc('parseStartXRef', []).then(function () { - pdfManager.ensureDoc('parse', [recoveryMode]).then(parseSuccess, parseFailure); - }, parseFailure); - }, parseFailure); - return loadDocumentCapability.promise; - } - function getPdfManager(data, evaluatorOptions) { - var pdfManagerCapability = createPromiseCapability(); - var pdfManager; - var source = data.source; - if (source.data) { - try { - pdfManager = new LocalPdfManager(docId, source.data, source.password, evaluatorOptions, docBaseUrl); - pdfManagerCapability.resolve(pdfManager); - } catch (ex) { - pdfManagerCapability.reject(ex); - } - return pdfManagerCapability.promise; - } - var pdfStream; - try { - if (source.chunkedViewerLoading) { - pdfStream = new PDFWorkerStream(source, handler); - } else { - assert(PDFNetworkStream, 'pdfjs/core/network module is not loaded'); - pdfStream = new PDFNetworkStream(data); - } - } catch (ex) { - pdfManagerCapability.reject(ex); - return pdfManagerCapability.promise; - } - var fullRequest = pdfStream.getFullReader(); - fullRequest.headersReady.then(function () { - if (!fullRequest.isStreamingSupported || !fullRequest.isRangeSupported) { - fullRequest.onProgress = function (evt) { - handler.send('DocProgress', { - loaded: evt.loaded, - total: evt.total - }); - }; - } - if (!fullRequest.isRangeSupported) { - return; - } - var disableAutoFetch = source.disableAutoFetch || fullRequest.isStreamingSupported; - pdfManager = new NetworkPdfManager(docId, pdfStream, { - msgHandler: handler, - url: source.url, - password: source.password, - length: fullRequest.contentLength, - disableAutoFetch: disableAutoFetch, - rangeChunkSize: source.rangeChunkSize - }, evaluatorOptions, docBaseUrl); - pdfManagerCapability.resolve(pdfManager); - cancelXHRs = null; - }).catch(function (reason) { - pdfManagerCapability.reject(reason); - cancelXHRs = null; - }); - var cachedChunks = [], loaded = 0; - var flushChunks = function () { - var pdfFile = arraysToBytes(cachedChunks); - if (source.length && pdfFile.length !== source.length) { - warn('reported HTTP length is different from actual'); - } - try { - pdfManager = new LocalPdfManager(docId, pdfFile, source.password, evaluatorOptions, docBaseUrl); - pdfManagerCapability.resolve(pdfManager); - } catch (ex) { - pdfManagerCapability.reject(ex); - } - cachedChunks = []; - }; - var readPromise = new Promise(function (resolve, reject) { - var readChunk = function (chunk) { - try { - ensureNotTerminated(); - if (chunk.done) { - if (!pdfManager) { - flushChunks(); - } - cancelXHRs = null; - return; - } - var data = chunk.value; - loaded += arrayByteLength(data); - if (!fullRequest.isStreamingSupported) { - handler.send('DocProgress', { - loaded: loaded, - total: Math.max(loaded, fullRequest.contentLength || 0) - }); - } - if (pdfManager) { - pdfManager.sendProgressiveData(data); - } else { - cachedChunks.push(data); - } - fullRequest.read().then(readChunk, reject); - } catch (e) { - reject(e); - } - }; - fullRequest.read().then(readChunk, reject); - }); - readPromise.catch(function (e) { - pdfManagerCapability.reject(e); - cancelXHRs = null; - }); - cancelXHRs = function () { - pdfStream.cancelAllRequests('abort'); - }; - return pdfManagerCapability.promise; - } - function setupDoc(data) { - function onSuccess(doc) { - ensureNotTerminated(); - handler.send('GetDoc', { pdfInfo: doc }); - } - function onFailure(e) { - if (e instanceof PasswordException) { - var task = new WorkerTask('PasswordException: response ' + e.code); - startWorkerTask(task); - handler.sendWithPromise('PasswordRequest', e).then(function (data) { - finishWorkerTask(task); - pdfManager.updatePassword(data.password); - pdfManagerReady(); - }).catch(function (ex) { - finishWorkerTask(task); - handler.send('PasswordException', ex); - }.bind(null, e)); - } else if (e instanceof InvalidPDFException) { - handler.send('InvalidPDF', e); - } else if (e instanceof MissingPDFException) { - handler.send('MissingPDF', e); - } else if (e instanceof UnexpectedResponseException) { - handler.send('UnexpectedResponse', e); - } else { - handler.send('UnknownError', new UnknownErrorException(e.message, e.toString())); - } - } - function pdfManagerReady() { - ensureNotTerminated(); - loadDocument(false).then(onSuccess, function loadFailure(ex) { - ensureNotTerminated(); - if (!(ex instanceof XRefParseException)) { - onFailure(ex); - return; - } - pdfManager.requestLoadedStream(); - pdfManager.onLoadedStream().then(function () { - ensureNotTerminated(); - loadDocument(true).then(onSuccess, onFailure); - }); - }, onFailure); - } - ensureNotTerminated(); - var cMapOptions = { - url: data.cMapUrl === undefined ? null : data.cMapUrl, - packed: data.cMapPacked === true - }; - var evaluatorOptions = { - forceDataSchema: data.disableCreateObjectURL, - maxImageSize: data.maxImageSize === undefined ? -1 : data.maxImageSize, - disableFontFace: data.disableFontFace, - cMapOptions: cMapOptions - }; - getPdfManager(data, evaluatorOptions).then(function (newPdfManager) { - if (terminated) { - newPdfManager.terminate(); - throw new Error('Worker was terminated'); - } - pdfManager = newPdfManager; - handler.send('PDFManagerReady', null); - pdfManager.onLoadedStream().then(function (stream) { - handler.send('DataLoaded', { length: stream.bytes.byteLength }); - }); - }).then(pdfManagerReady, onFailure); - } - handler.on('GetPage', function wphSetupGetPage(data) { - return pdfManager.getPage(data.pageIndex).then(function (page) { - var rotatePromise = pdfManager.ensure(page, 'rotate'); - var refPromise = pdfManager.ensure(page, 'ref'); - var userUnitPromise = pdfManager.ensure(page, 'userUnit'); - var viewPromise = pdfManager.ensure(page, 'view'); - return Promise.all([ - rotatePromise, - refPromise, - userUnitPromise, - viewPromise - ]).then(function (results) { - return { - rotate: results[0], - ref: results[1], - userUnit: results[2], - view: results[3] - }; - }); - }); - }); - handler.on('GetPageIndex', function wphSetupGetPageIndex(data) { - var ref = new Ref(data.ref.num, data.ref.gen); - var catalog = pdfManager.pdfDocument.catalog; - return catalog.getPageIndex(ref); - }); - handler.on('GetDestinations', function wphSetupGetDestinations(data) { - return pdfManager.ensureCatalog('destinations'); - }); - handler.on('GetDestination', function wphSetupGetDestination(data) { - return pdfManager.ensureCatalog('getDestination', [data.id]); - }); - handler.on('GetPageLabels', function wphSetupGetPageLabels(data) { - return pdfManager.ensureCatalog('pageLabels'); - }); - handler.on('GetAttachments', function wphSetupGetAttachments(data) { - return pdfManager.ensureCatalog('attachments'); - }); - handler.on('GetJavaScript', function wphSetupGetJavaScript(data) { - return pdfManager.ensureCatalog('javaScript'); - }); - handler.on('GetOutline', function wphSetupGetOutline(data) { - return pdfManager.ensureCatalog('documentOutline'); - }); - handler.on('GetMetadata', function wphSetupGetMetadata(data) { - return Promise.all([ - pdfManager.ensureDoc('documentInfo'), - pdfManager.ensureCatalog('metadata') - ]); - }); - handler.on('GetData', function wphSetupGetData(data) { - pdfManager.requestLoadedStream(); - return pdfManager.onLoadedStream().then(function (stream) { - return stream.bytes; - }); - }); - handler.on('GetStats', function wphSetupGetStats(data) { - return pdfManager.pdfDocument.xref.stats; - }); - handler.on('GetAnnotations', function wphSetupGetAnnotations(data) { - return pdfManager.getPage(data.pageIndex).then(function (page) { - return pdfManager.ensure(page, 'getAnnotationsData', [data.intent]); - }); - }); - handler.on('RenderPageRequest', function wphSetupRenderPage(data) { - var pageIndex = data.pageIndex; - pdfManager.getPage(pageIndex).then(function (page) { - var task = new WorkerTask('RenderPageRequest: page ' + pageIndex); - startWorkerTask(task); - var pageNum = pageIndex + 1; - var start = Date.now(); - page.getOperatorList(handler, task, data.intent, data.renderInteractiveForms).then(function (operatorList) { - finishWorkerTask(task); - info('page=' + pageNum + ' - getOperatorList: time=' + (Date.now() - start) + 'ms, len=' + operatorList.totalLength); - }, function (e) { - finishWorkerTask(task); - if (task.terminated) { - return; - } - handler.send('UnsupportedFeature', { featureId: UNSUPPORTED_FEATURES.unknown }); - var minimumStackMessage = 'worker.js: while trying to getPage() and getOperatorList()'; - var wrappedException; - if (typeof e === 'string') { - wrappedException = { - message: e, - stack: minimumStackMessage - }; - } else if (typeof e === 'object') { - wrappedException = { - message: e.message || e.toString(), - stack: e.stack || minimumStackMessage - }; - } else { - wrappedException = { - message: 'Unknown exception type: ' + typeof e, - stack: minimumStackMessage - }; - } - handler.send('PageError', { - pageNum: pageNum, - error: wrappedException, - intent: data.intent - }); - }); - }); - }, this); - handler.on('GetTextContent', function wphExtractText(data) { - var pageIndex = data.pageIndex; - var normalizeWhitespace = data.normalizeWhitespace; - var combineTextItems = data.combineTextItems; - return pdfManager.getPage(pageIndex).then(function (page) { - var task = new WorkerTask('GetTextContent: page ' + pageIndex); - startWorkerTask(task); - var pageNum = pageIndex + 1; - var start = Date.now(); - return page.extractTextContent(task, normalizeWhitespace, combineTextItems).then(function (textContent) { - finishWorkerTask(task); - info('text indexing: page=' + pageNum + ' - time=' + (Date.now() - start) + 'ms'); - return textContent; - }, function (reason) { - finishWorkerTask(task); - if (task.terminated) { - return; - } - throw reason; - }); - }); - }); - handler.on('Cleanup', function wphCleanup(data) { - return pdfManager.cleanup(); - }); - handler.on('Terminate', function wphTerminate(data) { - terminated = true; - if (pdfManager) { - pdfManager.terminate(); - pdfManager = null; - } - if (cancelXHRs) { - cancelXHRs(); - } - var waitOn = []; - WorkerTasks.forEach(function (task) { - waitOn.push(task.finished); - task.terminate(); - }); - return Promise.all(waitOn).then(function () { - handler.destroy(); - handler = null; - }); - }); - handler.on('Ready', function wphReady(data) { - setupDoc(docParams); - docParams = null; - }); - return workerHandlerName; - } - }; - function initializeWorker() { - if (!('console' in globalScope)) { - var consoleTimer = {}; - var workerConsole = { - log: function log() { - var args = Array.prototype.slice.call(arguments); - globalScope.postMessage({ - targetName: 'main', - action: 'console_log', - data: args - }); - }, - error: function error() { - var args = Array.prototype.slice.call(arguments); - globalScope.postMessage({ - targetName: 'main', - action: 'console_error', - data: args - }); - throw 'pdf.js execution error'; - }, - time: function time(name) { - consoleTimer[name] = Date.now(); - }, - timeEnd: function timeEnd(name) { - var time = consoleTimer[name]; - if (!time) { - error('Unknown timer name ' + name); - } - this.log('Timer:', name, Date.now() - time); - } - }; - globalScope.console = workerConsole; - } - var handler = new MessageHandler('worker', 'main', self); - WorkerMessageHandler.setup(handler, self); - handler.send('ready', null); - } - if (typeof window === 'undefined' && !(typeof module !== 'undefined' && module.require)) { - initializeWorker(); - } - exports.setPDFNetworkStreamClass = setPDFNetworkStreamClass; - exports.WorkerTask = WorkerTask; - exports.WorkerMessageHandler = WorkerMessageHandler; - })); - (function (root, factory) { - factory(root.pdfjsCoreNetwork = {}, root.pdfjsSharedUtil, root.pdfjsCoreWorker); - }(this, function (exports, sharedUtil, coreWorker) { - var OK_RESPONSE = 200; - var PARTIAL_CONTENT_RESPONSE = 206; - function NetworkManager(url, args) { - this.url = url; - args = args || {}; - this.isHttp = /^https?:/i.test(url); - this.httpHeaders = this.isHttp && args.httpHeaders || {}; - this.withCredentials = args.withCredentials || false; - this.getXhr = args.getXhr || function NetworkManager_getXhr() { - return new XMLHttpRequest(); - }; - this.currXhrId = 0; - this.pendingRequests = Object.create(null); - this.loadedRequests = Object.create(null); - } - function getArrayBuffer(xhr) { - var data = xhr.response; - if (typeof data !== 'string') { - return data; - } - var length = data.length; - var array = new Uint8Array(length); - for (var i = 0; i < length; i++) { - array[i] = data.charCodeAt(i) & 0xFF; - } - return array.buffer; - } - var supportsMozChunked = function supportsMozChunkedClosure() { - try { - var x = new XMLHttpRequest(); - x.open('GET', 'https://example.com'); - x.responseType = 'moz-chunked-arraybuffer'; - return x.responseType === 'moz-chunked-arraybuffer'; - } catch (e) { - return false; - } - }(); - NetworkManager.prototype = { - requestRange: function NetworkManager_requestRange(begin, end, listeners) { - var args = { - begin: begin, - end: end - }; - for (var prop in listeners) { - args[prop] = listeners[prop]; - } - return this.request(args); - }, - requestFull: function NetworkManager_requestFull(listeners) { - return this.request(listeners); - }, - request: function NetworkManager_request(args) { - var xhr = this.getXhr(); - var xhrId = this.currXhrId++; - var pendingRequest = this.pendingRequests[xhrId] = { xhr: xhr }; - xhr.open('GET', this.url); - xhr.withCredentials = this.withCredentials; - for (var property in this.httpHeaders) { - var value = this.httpHeaders[property]; - if (typeof value === 'undefined') { - continue; - } - xhr.setRequestHeader(property, value); - } - if (this.isHttp && 'begin' in args && 'end' in args) { - var rangeStr = args.begin + '-' + (args.end - 1); - xhr.setRequestHeader('Range', 'bytes=' + rangeStr); - pendingRequest.expectedStatus = 206; - } else { - pendingRequest.expectedStatus = 200; - } - var useMozChunkedLoading = supportsMozChunked && !!args.onProgressiveData; - if (useMozChunkedLoading) { - xhr.responseType = 'moz-chunked-arraybuffer'; - pendingRequest.onProgressiveData = args.onProgressiveData; - pendingRequest.mozChunked = true; - } else { - xhr.responseType = 'arraybuffer'; - } - if (args.onError) { - xhr.onerror = function (evt) { - args.onError(xhr.status); - }; - } - xhr.onreadystatechange = this.onStateChange.bind(this, xhrId); - xhr.onprogress = this.onProgress.bind(this, xhrId); - pendingRequest.onHeadersReceived = args.onHeadersReceived; - pendingRequest.onDone = args.onDone; - pendingRequest.onError = args.onError; - pendingRequest.onProgress = args.onProgress; - xhr.send(null); - return xhrId; - }, - onProgress: function NetworkManager_onProgress(xhrId, evt) { - var pendingRequest = this.pendingRequests[xhrId]; - if (!pendingRequest) { - return; - } - if (pendingRequest.mozChunked) { - var chunk = getArrayBuffer(pendingRequest.xhr); - pendingRequest.onProgressiveData(chunk); - } - var onProgress = pendingRequest.onProgress; - if (onProgress) { - onProgress(evt); - } - }, - onStateChange: function NetworkManager_onStateChange(xhrId, evt) { - var pendingRequest = this.pendingRequests[xhrId]; - if (!pendingRequest) { - return; - } - var xhr = pendingRequest.xhr; - if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) { - pendingRequest.onHeadersReceived(); - delete pendingRequest.onHeadersReceived; - } - if (xhr.readyState !== 4) { - return; - } - if (!(xhrId in this.pendingRequests)) { - return; - } - delete this.pendingRequests[xhrId]; - if (xhr.status === 0 && this.isHttp) { - if (pendingRequest.onError) { - pendingRequest.onError(xhr.status); - } - return; - } - var xhrStatus = xhr.status || OK_RESPONSE; - var ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE; - if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) { - if (pendingRequest.onError) { - pendingRequest.onError(xhr.status); - } - return; - } - this.loadedRequests[xhrId] = true; - var chunk = getArrayBuffer(xhr); - if (xhrStatus === PARTIAL_CONTENT_RESPONSE) { - var rangeHeader = xhr.getResponseHeader('Content-Range'); - var matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader); - var begin = parseInt(matches[1], 10); - pendingRequest.onDone({ - begin: begin, - chunk: chunk - }); - } else if (pendingRequest.onProgressiveData) { - pendingRequest.onDone(null); - } else if (chunk) { - pendingRequest.onDone({ - begin: 0, - chunk: chunk - }); - } else if (pendingRequest.onError) { - pendingRequest.onError(xhr.status); - } - }, - hasPendingRequests: function NetworkManager_hasPendingRequests() { - for (var xhrId in this.pendingRequests) { - return true; - } - return false; - }, - getRequestXhr: function NetworkManager_getXhr(xhrId) { - return this.pendingRequests[xhrId].xhr; - }, - isStreamingRequest: function NetworkManager_isStreamingRequest(xhrId) { - return !!this.pendingRequests[xhrId].onProgressiveData; - }, - isPendingRequest: function NetworkManager_isPendingRequest(xhrId) { - return xhrId in this.pendingRequests; - }, - isLoadedRequest: function NetworkManager_isLoadedRequest(xhrId) { - return xhrId in this.loadedRequests; - }, - abortAllRequests: function NetworkManager_abortAllRequests() { - for (var xhrId in this.pendingRequests) { - this.abortRequest(xhrId | 0); - } - }, - abortRequest: function NetworkManager_abortRequest(xhrId) { - var xhr = this.pendingRequests[xhrId].xhr; - delete this.pendingRequests[xhrId]; - xhr.abort(); - } - }; - var assert = sharedUtil.assert; - var createPromiseCapability = sharedUtil.createPromiseCapability; - var isInt = sharedUtil.isInt; - var MissingPDFException = sharedUtil.MissingPDFException; - var UnexpectedResponseException = sharedUtil.UnexpectedResponseException; - function PDFNetworkStream(options) { - this._options = options; - var source = options.source; - this._manager = new NetworkManager(source.url, { - httpHeaders: source.httpHeaders, - withCredentials: source.withCredentials - }); - this._rangeChunkSize = source.rangeChunkSize; - this._fullRequestReader = null; - this._rangeRequestReaders = []; - } - PDFNetworkStream.prototype = { - _onRangeRequestReaderClosed: function PDFNetworkStream_onRangeRequestReaderClosed(reader) { - var i = this._rangeRequestReaders.indexOf(reader); - if (i >= 0) { - this._rangeRequestReaders.splice(i, 1); - } - }, - getFullReader: function PDFNetworkStream_getFullReader() { - assert(!this._fullRequestReader); - this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._options); - return this._fullRequestReader; - }, - getRangeReader: function PDFNetworkStream_getRangeReader(begin, end) { - var reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end); - reader.onClosed = this._onRangeRequestReaderClosed.bind(this); - this._rangeRequestReaders.push(reader); - return reader; - }, - cancelAllRequests: function PDFNetworkStream_cancelAllRequests(reason) { - if (this._fullRequestReader) { - this._fullRequestReader.cancel(reason); - } - var readers = this._rangeRequestReaders.slice(0); - readers.forEach(function (reader) { - reader.cancel(reason); - }); - } - }; - function PDFNetworkStreamFullRequestReader(manager, options) { - this._manager = manager; - var source = options.source; - var args = { - onHeadersReceived: this._onHeadersReceived.bind(this), - onProgressiveData: source.disableStream ? null : this._onProgressiveData.bind(this), - onDone: this._onDone.bind(this), - onError: this._onError.bind(this), - onProgress: this._onProgress.bind(this) - }; - this._url = source.url; - this._fullRequestId = manager.requestFull(args); - this._headersReceivedCapability = createPromiseCapability(); - this._disableRange = options.disableRange || false; - this._contentLength = source.length; - this._rangeChunkSize = source.rangeChunkSize; - if (!this._rangeChunkSize && !this._disableRange) { - this._disableRange = true; - } - this._isStreamingSupported = false; - this._isRangeSupported = false; - this._cachedChunks = []; - this._requests = []; - this._done = false; - this._storedError = undefined; - this.onProgress = null; - } - PDFNetworkStreamFullRequestReader.prototype = { - _validateRangeRequestCapabilities: function PDFNetworkStreamFullRequestReader_validateRangeRequestCapabilities() { - if (this._disableRange) { - return false; - } - var networkManager = this._manager; - if (!networkManager.isHttp) { - return false; - } - var fullRequestXhrId = this._fullRequestId; - var fullRequestXhr = networkManager.getRequestXhr(fullRequestXhrId); - if (fullRequestXhr.getResponseHeader('Accept-Ranges') !== 'bytes') { - return false; - } - var contentEncoding = fullRequestXhr.getResponseHeader('Content-Encoding') || 'identity'; - if (contentEncoding !== 'identity') { - return false; - } - var length = fullRequestXhr.getResponseHeader('Content-Length'); - length = parseInt(length, 10); - if (!isInt(length)) { - return false; - } - this._contentLength = length; - if (length <= 2 * this._rangeChunkSize) { - return false; - } - return true; - }, - _onHeadersReceived: function PDFNetworkStreamFullRequestReader_onHeadersReceived() { - if (this._validateRangeRequestCapabilities()) { - this._isRangeSupported = true; - } - var networkManager = this._manager; - var fullRequestXhrId = this._fullRequestId; - if (networkManager.isStreamingRequest(fullRequestXhrId)) { - this._isStreamingSupported = true; - } else if (this._isRangeSupported) { - networkManager.abortRequest(fullRequestXhrId); - } - this._headersReceivedCapability.resolve(); - }, - _onProgressiveData: function PDFNetworkStreamFullRequestReader_onProgressiveData(chunk) { - if (this._requests.length > 0) { - var requestCapability = this._requests.shift(); - requestCapability.resolve({ - value: chunk, - done: false - }); - } else { - this._cachedChunks.push(chunk); - } - }, - _onDone: function PDFNetworkStreamFullRequestReader_onDone(args) { - if (args) { - this._onProgressiveData(args.chunk); - } - this._done = true; - if (this._cachedChunks.length > 0) { - return; - } - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - this._requests = []; - }, - _onError: function PDFNetworkStreamFullRequestReader_onError(status) { - var url = this._url; - var exception; - if (status === 404 || status === 0 && /^file:/.test(url)) { - exception = new MissingPDFException('Missing PDF "' + url + '".'); - } else { - exception = new UnexpectedResponseException('Unexpected server response (' + status + ') while retrieving PDF "' + url + '".', status); - } - this._storedError = exception; - this._headersReceivedCapability.reject(exception); - this._requests.forEach(function (requestCapability) { - requestCapability.reject(exception); - }); - this._requests = []; - this._cachedChunks = []; - }, - _onProgress: function PDFNetworkStreamFullRequestReader_onProgress(data) { - if (this.onProgress) { - this.onProgress({ - loaded: data.loaded, - total: data.lengthComputable ? data.total : this._contentLength - }); - } - }, - get isRangeSupported() { - return this._isRangeSupported; - }, - get isStreamingSupported() { - return this._isStreamingSupported; - }, - get contentLength() { - return this._contentLength; - }, - get headersReady() { - return this._headersReceivedCapability.promise; - }, - read: function PDFNetworkStreamFullRequestReader_read() { - if (this._storedError) { - return Promise.reject(this._storedError); - } - if (this._cachedChunks.length > 0) { - var chunk = this._cachedChunks.shift(); - return Promise.resolve(chunk); - } - if (this._done) { - return Promise.resolve({ - value: undefined, - done: true - }); - } - var requestCapability = createPromiseCapability(); - this._requests.push(requestCapability); - return requestCapability.promise; - }, - cancel: function PDFNetworkStreamFullRequestReader_cancel(reason) { - this._done = true; - this._headersReceivedCapability.reject(reason); - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - this._requests = []; - if (this._manager.isPendingRequest(this._fullRequestId)) { - this._manager.abortRequest(this._fullRequestId); - } - this._fullRequestReader = null; - } - }; - function PDFNetworkStreamRangeRequestReader(manager, begin, end) { - this._manager = manager; - var args = { - onDone: this._onDone.bind(this), - onProgress: this._onProgress.bind(this) - }; - this._requestId = manager.requestRange(begin, end, args); - this._requests = []; - this._queuedChunk = null; - this._done = false; - this.onProgress = null; - this.onClosed = null; - } - PDFNetworkStreamRangeRequestReader.prototype = { - _close: function PDFNetworkStreamRangeRequestReader_close() { - if (this.onClosed) { - this.onClosed(this); - } - }, - _onDone: function PDFNetworkStreamRangeRequestReader_onDone(data) { - var chunk = data.chunk; - if (this._requests.length > 0) { - var requestCapability = this._requests.shift(); - requestCapability.resolve({ - value: chunk, - done: false - }); - } else { - this._queuedChunk = chunk; - } - this._done = true; - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - this._requests = []; - this._close(); - }, - _onProgress: function PDFNetworkStreamRangeRequestReader_onProgress(evt) { - if (!this.isStreamingSupported && this.onProgress) { - this.onProgress({ loaded: evt.loaded }); - } - }, - get isStreamingSupported() { - return false; - }, - read: function PDFNetworkStreamRangeRequestReader_read() { - if (this._queuedChunk !== null) { - var chunk = this._queuedChunk; - this._queuedChunk = null; - return Promise.resolve({ - value: chunk, - done: false - }); - } - if (this._done) { - return Promise.resolve({ - value: undefined, - done: true - }); - } - var requestCapability = createPromiseCapability(); - this._requests.push(requestCapability); - return requestCapability.promise; - }, - cancel: function PDFNetworkStreamRangeRequestReader_cancel(reason) { - this._done = true; - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - this._requests = []; - if (this._manager.isPendingRequest(this._requestId)) { - this._manager.abortRequest(this._requestId); - } - this._close(); - } - }; - coreWorker.setPDFNetworkStreamClass(PDFNetworkStream); - exports.PDFNetworkStream = PDFNetworkStream; - exports.NetworkManager = NetworkManager; - })); - }.call(pdfjsLibs)); - exports.WorkerMessageHandler = pdfjsLibs.pdfjsCoreWorker.WorkerMessageHandler; -})); \ No newline at end of file diff --git a/src/lib/pica.js b/src/lib/pica.js deleted file mode 100644 index 4f890a9..0000000 --- a/src/lib/pica.js +++ /dev/null @@ -1,819 +0,0 @@ -/* pica 1.1.1 nodeca/pica */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pica = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= -0.5 && x < 0.5) ? 1.0 : 0.0; - } - }, - { // Hamming - win: 1.0, - filter: function (x) { - if (x <= -1.0 || x >= 1.0) { return 0.0; } - if (x > -1.19209290E-07 && x < 1.19209290E-07) { return 1.0; } - var xpi = x * Math.PI; - return ((Math.sin(xpi) / xpi) * (0.54 + 0.46 * Math.cos(xpi / 1.0))); - } - }, - { // Lanczos, win = 2 - win: 2.0, - filter: function (x) { - if (x <= -2.0 || x >= 2.0) { return 0.0; } - if (x > -1.19209290E-07 && x < 1.19209290E-07) { return 1.0; } - var xpi = x * Math.PI; - return (Math.sin(xpi) / xpi) * Math.sin(xpi / 2.0) / (xpi / 2.0); - } - }, - { // Lanczos, win = 3 - win: 3.0, - filter: function (x) { - if (x <= -3.0 || x >= 3.0) { return 0.0; } - if (x > -1.19209290E-07 && x < 1.19209290E-07) { return 1.0; } - var xpi = x * Math.PI; - return (Math.sin(xpi) / xpi) * Math.sin(xpi / 3.0) / (xpi / 3.0); - } - } -]; - -function clampTo8(i) { return i < 0 ? 0 : (i > 255 ? 255 : i); } - -function toFixedPoint(num) { return Math.floor(num * FIXED_FRAC_VAL); } - - -// Calculate convolution filters for each destination point, -// and pack data to Int16Array: -// -// [ shift, length, data..., shift2, length2, data..., ... ] -// -// - shift - offset in src image -// - length - filter length (in src points) -// - data - filter values sequence -// -function createFilters(quality, srcSize, destSize) { - - var filterFunction = FILTER_INFO[quality].filter; - - var scale = destSize / srcSize; - var scaleInverted = 1.0 / scale; - var scaleClamped = Math.min(1.0, scale); // For upscale - - // Filter window (averaging interval), scaled to src image - var srcWindow = FILTER_INFO[quality].win / scaleClamped; - - var destPixel, srcPixel, srcFirst, srcLast, filterElementSize, - floatFilter, fxpFilter, total, fixedTotal, pxl, idx, floatVal, fixedVal; - var leftNotEmpty, rightNotEmpty, filterShift, filterSize; - - var maxFilterElementSize = Math.floor((srcWindow + 1) * 2); - var packedFilter = new Int16Array((maxFilterElementSize + 2) * destSize); - var packedFilterPtr = 0; - - // For each destination pixel calculate source range and built filter values - for (destPixel = 0; destPixel < destSize; destPixel++) { - - // Scaling should be done relative to central pixel point - srcPixel = (destPixel + 0.5) * scaleInverted; - - srcFirst = Math.max(0, Math.floor(srcPixel - srcWindow)); - srcLast = Math.min(srcSize - 1, Math.ceil(srcPixel + srcWindow)); - - filterElementSize = srcLast - srcFirst + 1; - floatFilter = new Float32Array(filterElementSize); - fxpFilter = new Int16Array(filterElementSize); - - total = 0.0; - - // Fill filter values for calculated range - for (pxl = srcFirst, idx = 0; pxl <= srcLast; pxl++, idx++) { - floatVal = filterFunction(((pxl + 0.5) - srcPixel) * scaleClamped); - total += floatVal; - floatFilter[idx] = floatVal; - } - - // Normalize filter, convert to fixed point and accumulate conversion error - fixedTotal = 0; - - for (idx = 0; idx < floatFilter.length; idx++) { - fixedVal = toFixedPoint(floatFilter[idx] / total); - fixedTotal += fixedVal; - fxpFilter[idx] = fixedVal; - } - - // Compensate normalization error, to minimize brightness drift - fxpFilter[destSize >> 1] += toFixedPoint(1.0) - fixedTotal; - - // - // Now pack filter to useable form - // - // 1. Trim heading and tailing zero values, and compensate shitf/length - // 2. Put all to single array in this format: - // - // [ pos shift, data length, value1, value2, value3, ... ] - // - - leftNotEmpty = 0; - while (leftNotEmpty < fxpFilter.length && fxpFilter[leftNotEmpty] === 0) { - leftNotEmpty++; - } - - if (leftNotEmpty < fxpFilter.length) { - rightNotEmpty = fxpFilter.length - 1; - while (rightNotEmpty > 0 && fxpFilter[rightNotEmpty] === 0) { - rightNotEmpty--; - } - - filterShift = srcFirst + leftNotEmpty; - filterSize = rightNotEmpty - leftNotEmpty + 1; - - packedFilter[packedFilterPtr++] = filterShift; // shift - packedFilter[packedFilterPtr++] = filterSize; // size - - packedFilter.set(fxpFilter.subarray(leftNotEmpty, rightNotEmpty + 1), packedFilterPtr); - packedFilterPtr += filterSize; - } else { - // zero data, write header only - packedFilter[packedFilterPtr++] = 0; // shift - packedFilter[packedFilterPtr++] = 0; // size - } - } - return packedFilter; -} - -// Convolve image in horizontal directions and transpose output. In theory, -// transpose allow: -// -// - use the same convolver for both passes (this fails due different -// types of input array and temporary buffer) -// - making vertical pass by horisonltal lines inprove CPU cache use. -// -// But in real life this doesn't work :) -// -function convolveHorizontally(src, dest, srcW, srcH, destW, filters) { - - var r, g, b, a; - var filterPtr, filterShift, filterSize; - var srcPtr, srcY, destX, filterVal; - var srcOffset = 0, destOffset = 0; - - // For each row - for (srcY = 0; srcY < srcH; srcY++) { - filterPtr = 0; - - /*eslint-disable space-infix-ops*/ - - // Apply precomputed filters to each destination row point - for (destX = 0; destX < destW; destX++) { - // Get the filter that determines the current output pixel. - filterShift = filters[filterPtr++]; - filterSize = filters[filterPtr++]; - - srcPtr = (srcOffset + (filterShift * 4))|0; - - r = g = b = a = 0; - - // Apply the filter to the row to get the destination pixel r, g, b, a - for (; filterSize > 0; filterSize--) { - filterVal = filters[filterPtr++]; - - // Use reverse order to workaround deopts in old v8 (node v.10) - // Big thanks to @mraleph (Vyacheslav Egorov) for the tip. - a = (a + filterVal * src[srcPtr + 3])|0; - b = (b + filterVal * src[srcPtr + 2])|0; - g = (g + filterVal * src[srcPtr + 1])|0; - r = (r + filterVal * src[srcPtr])|0; - srcPtr = (srcPtr + 4)|0; - } - - // Bring this value back in range. All of the filter scaling factors - // are in fixed point with FIXED_FRAC_BITS bits of fractional part. - // - // (!) Add 1/2 of value before clamping to get proper rounding. In other - // case brightness loss will be noticeable if you resize image with white - // border and place it on white background. - // - dest[destOffset + 3] = clampTo8((a + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - dest[destOffset + 2] = clampTo8((b + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - dest[destOffset + 1] = clampTo8((g + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - dest[destOffset] = clampTo8((r + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - destOffset = (destOffset + srcH * 4)|0; - } - - destOffset = ((srcY + 1) * 4)|0; - srcOffset = ((srcY + 1) * srcW * 4)|0; - } -} - -// Technically, convolvers are the same. But input array and temporary -// buffer can be of different type (especially, in old browsers). So, -// keep code in separate functions to avoid deoptimizations & speed loss. - -function convolveVertically(src, dest, srcW, srcH, destW, filters) { - - var r, g, b, a; - var filterPtr, filterShift, filterSize; - var srcPtr, srcY, destX, filterVal; - var srcOffset = 0, destOffset = 0; - - // For each row - for (srcY = 0; srcY < srcH; srcY++) { - filterPtr = 0; - - /*eslint-disable space-infix-ops*/ - - // Apply precomputed filters to each destination row point - for (destX = 0; destX < destW; destX++) { - // Get the filter that determines the current output pixel. - filterShift = filters[filterPtr++]; - filterSize = filters[filterPtr++]; - - srcPtr = (srcOffset + (filterShift * 4))|0; - - r = g = b = a = 0; - - // Apply the filter to the row to get the destination pixel r, g, b, a - for (; filterSize > 0; filterSize--) { - filterVal = filters[filterPtr++]; - - // Use reverse order to workaround deopts in old v8 (node v.10) - // Big thanks to @mraleph (Vyacheslav Egorov) for the tip. - a = (a + filterVal * src[srcPtr + 3])|0; - b = (b + filterVal * src[srcPtr + 2])|0; - g = (g + filterVal * src[srcPtr + 1])|0; - r = (r + filterVal * src[srcPtr])|0; - srcPtr = (srcPtr + 4)|0; - } - - // Bring this value back in range. All of the filter scaling factors - // are in fixed point with FIXED_FRAC_BITS bits of fractional part. - // - // (!) Add 1/2 of value before clamping to get proper rounding. In other - // case brightness loss will be noticeable if you resize image with white - // border and place it on white background. - // - dest[destOffset + 3] = clampTo8((a + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - dest[destOffset + 2] = clampTo8((b + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - dest[destOffset + 1] = clampTo8((g + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - dest[destOffset] = clampTo8((r + (1 << 13)) >> 14/*FIXED_FRAC_BITS*/); - destOffset = (destOffset + srcH * 4)|0; - } - - destOffset = ((srcY + 1) * 4)|0; - srcOffset = ((srcY + 1) * srcW * 4)|0; - } -} - - -function resetAlpha(dst, width, height) { - var ptr = 3, len = (width * height * 4)|0; - while (ptr < len) { dst[ptr] = 0xFF; ptr = (ptr + 4)|0; } -} - - -function resize(options) { - var src = options.src; - var srcW = options.width; - var srcH = options.height; - var destW = options.toWidth; - var destH = options.toHeight; - var dest = options.dest || new Uint8Array(destW * destH * 4); - var quality = typeof options.quality === 'undefined' ? 3 : options.quality; - var alpha = options.alpha || false; - var unsharpAmount = typeof options.unsharpAmount === 'undefined' ? 0 : (options.unsharpAmount|0); - var unsharpRadius = typeof options.unsharpRadius === 'undefined' ? 0 : (options.unsharpRadius); - var unsharpThreshold = typeof options.unsharpThreshold === 'undefined' ? 0 : (options.unsharpThreshold|0); - - if (srcW < 1 || srcH < 1 || destW < 1 || destH < 1) { return []; } - - var filtersX = createFilters(quality, srcW, destW), - filtersY = createFilters(quality, srcH, destH); - - var tmp = new Uint8Array(destW * srcH * 4); - - // To use single function we need src & tmp of the same type. - // But src can be CanvasPixelArray, and tmp - Uint8Array. So, keep - // vertical and horizontal passes separately to avoid deoptimization. - - convolveHorizontally(src, tmp, srcW, srcH, destW, filtersX); - convolveVertically(tmp, dest, srcH, destW, destH, filtersY); - - // That's faster than doing checks in convolver. - // !!! Note, canvas data is not premultipled. We don't need other - // alpha corrections. - - if (!alpha) { - resetAlpha(dest, destW, destH); - } - - if (unsharpAmount) { - unsharp(dest, destW, destH, unsharpAmount, unsharpRadius, unsharpThreshold); - } - - return dest; -} - - -module.exports = resize; - -},{"./unsharp":2}],2:[function(require,module,exports){ -// Unsharp mask filter -// -// http://stackoverflow.com/a/23322820/1031804 -// USM(O) = O + (2 * (Amount / 100) * (O - GB)) -// GB - gaussian blur. -// -// Image is converted from RGB to HSL, unsharp mask is applied to the -// lightness channel and then image is converted back to RGB. - -'use strict'; - - -var glurMono16 = require('glur/mono16'); - -function getLightness(img, width, height) { - var size = width * height; - var out = new Uint16Array(size); - var r, g, b, min, max; - for (var i = 0; i < size; i++) { - r = img[4 * i]; - g = img[4 * i + 1]; - b = img[4 * i + 2]; - max = (r >= g && r >= b) ? r : (g >= b && g >= r) ? g : b; - min = (r <= g && r <= b) ? r : (g <= b && g <= r) ? g : b; - out[i] = (max + min) * 257 >> 1; - } - return out; -} - -function unsharp(img, width, height, amount, radius, threshold) { - var r, g, b; - var h, s, l; - var min, max; - var m1, m2, hShifted; - var diff, iTimes4; - - if (amount === 0 || radius < 0.5) { - return; - } - - var lightness = getLightness(img, width, height); - - var blured = new Uint16Array(lightness); // copy, because blur modify src - - glurMono16(blured, width, height, radius); - - /* eslint-disable space-infix-ops */ - var amountFp = (amount / 100 * 0x1000 + 0.5)|0; - var thresholdFp = (threshold * 257)|0; - - var size = width * height; - - for (var i = 0; i < size; i++) { - diff = 2 * (lightness[i] - blured[i]); - - if (Math.abs(diff) >= thresholdFp) { - iTimes4 = i * 4; - r = img[iTimes4]; - g = img[iTimes4 + 1]; - b = img[iTimes4 + 2]; - - // convert RGB to HSL - // take RGB, 8-bit unsigned integer per each channel - // save HSL, H and L are 16-bit unsigned integers, S is 12-bit unsigned integer - // math is taken from here: http://www.easyrgb.com/index.php?X=MATH&H=18 - // and adopted to be integer (fixed point in fact) for sake of performance - max = (r >= g && r >= b) ? r : (g >= r && g >= b) ? g : b; // min and max are in [0..0xff] - min = (r <= g && r <= b) ? r : (g <= r && g <= b) ? g : b; - l = (max + min) * 257 >> 1; // l is in [0..0xffff] that is caused by multiplication by 257 - - if (min === max) { - h = s = 0; - } else { - s = (l <= 0x7fff) ? - (((max - min) * 0xfff) / (max + min))|0 : - (((max - min) * 0xfff) / (2 * 0xff - max - min))|0; // s is in [0..0xfff] - // h could be less 0, it will be fixed in backward conversion to RGB, |h| <= 0xffff / 6 - h = (r === max) ? (((g - b) * 0xffff) / (6 * (max - min)))|0 - : (g === max) ? 0x5555 + ((((b - r) * 0xffff) / (6 * (max - min)))|0) // 0x5555 == 0xffff / 3 - : 0xaaaa + ((((r - g) * 0xffff) / (6 * (max - min)))|0); // 0xaaaa == 0xffff * 2 / 3 - } - - // add unsharp mask mask to the lightness channel - l += (amountFp * diff + 0x800) >> 12; - if (l > 0xffff) { - l = 0xffff; - } else if (l < 0) { - l = 0; - } - - // convert HSL back to RGB - // for information about math look above - if (s === 0) { - r = g = b = l >> 8; - } else { - m2 = (l <= 0x7fff) ? (l * (0x1000 + s) + 0x800) >> 12 : - l + (((0xffff - l) * s + 0x800) >> 12); - m1 = 2 * l - m2 >> 8; - m2 >>= 8; - // save result to RGB channels - // R channel - hShifted = (h + 0x5555) & 0xffff; // 0x5555 == 0xffff / 3 - r = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3 - : (hShifted >= 0x7fff) ? m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16) - : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6 - : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16); - // G channel - hShifted = h & 0xffff; - g = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3 - : (hShifted >= 0x7fff) ? m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16) - : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6 - : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16); - // B channel - hShifted = (h - 0x5555) & 0xffff; - b = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3 - : (hShifted >= 0x7fff) ? m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16) - : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6 - : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16); - } - - img[iTimes4] = r; - img[iTimes4 + 1] = g; - img[iTimes4 + 2] = b; - } - } -} - -module.exports = unsharp; -module.exports.lightness = getLightness; - -},{"glur/mono16":5}],3:[function(require,module,exports){ -// Proxy to simplify split between webworker/plain calls -'use strict'; - -var resize = require('./pure/resize'); - -module.exports = function (options, callback) { - var output = resize(options); - - callback(null, output); -}; - -},{"./pure/resize":1}],4:[function(require,module,exports){ -// Web Worker wrapper for image resize function - -'use strict'; - -module.exports = function(self) { - var resize = require('./resize'); - - self.onmessage = function (ev) { - resize(ev.data, function(err, output) { - if (err) { - self.postMessage({ err: err }); - return; - } - - self.postMessage({ output: output }, [ output.buffer ]); - }); - }; -}; - -},{"./resize":3}],5:[function(require,module,exports){ -// Calculate Gaussian blur of an image using IIR filter -// The method is taken from Intel's white paper and code example attached to it: -// https://software.intel.com/en-us/articles/iir-gaussian-blur-filter -// -implementation-using-intel-advanced-vector-extensions - -var a0, a1, a2, a3, b1, b2, left_corner, right_corner; - -function gaussCoef(sigma) { - if (sigma < 0.5) { - sigma = 0.5; - } - - var a = Math.exp(0.726 * 0.726) / sigma, - g1 = Math.exp(-a), - g2 = Math.exp(-2 * a), - k = (1 - g1) * (1 - g1) / (1 + 2 * a * g1 - g2); - - a0 = k; - a1 = k * (a - 1) * g1; - a2 = k * (a + 1) * g1; - a3 = -k * g2; - b1 = 2 * g1; - b2 = -g2; - left_corner = (a0 + a1) / (1 - b1 - b2); - right_corner = (a2 + a3) / (1 - b1 - b2); - - // Attempt to force type to FP32. - return new Float32Array([ a0, a1, a2, a3, b1, b2, left_corner, right_corner ]); -} - -function convolveMono16(src, out, line, coeff, width, height) { - // takes src image and writes the blurred and transposed result into out - - var prev_src, curr_src, curr_out, prev_out, prev_prev_out; - var src_index, out_index, line_index; - var i, j; - var coeff_a0, coeff_a1, coeff_b1, coeff_b2; - - for (i = 0; i < height; i++) { - src_index = i * width; - out_index = i; - line_index = 0; - - // left to right - prev_src = src[src_index]; - prev_prev_out = prev_src * coeff[6]; - prev_out = prev_prev_out; - - coeff_a0 = coeff[0]; - coeff_a1 = coeff[1]; - coeff_b1 = coeff[4]; - coeff_b2 = coeff[5]; - - for (j = 0; j < width; j++) { - curr_src = src[src_index]; - - curr_out = curr_src * coeff_a0 + - prev_src * coeff_a1 + - prev_out * coeff_b1 + - prev_prev_out * coeff_b2; - - prev_prev_out = prev_out; - prev_out = curr_out; - prev_src = curr_src; - - line[line_index] = prev_out; - line_index++; - src_index++; - } - - src_index--; - line_index--; - out_index += height * (width - 1); - - // right to left - prev_src = src[src_index]; - prev_prev_out = prev_src * coeff[7]; - prev_out = prev_prev_out; - curr_src = prev_src; - - coeff_a0 = coeff[2]; - coeff_a1 = coeff[3]; - - for (j = width - 1; j >= 0; j--) { - curr_out = curr_src * coeff_a0 + - prev_src * coeff_a1 + - prev_out * coeff_b1 + - prev_prev_out * coeff_b2; - - prev_prev_out = prev_out; - prev_out = curr_out; - - prev_src = curr_src; - curr_src = src[src_index]; - - out[out_index] = line[line_index] + prev_out; - - src_index--; - line_index--; - out_index -= height; - } - } -} - - -function blurMono16(src, width, height, radius) { - // Quick exit on zero radius - if (!radius) { return; } - - var out = new Uint16Array(src.length), - tmp_line = new Float32Array(Math.max(width, height)); - - var coeff = gaussCoef(radius); - - convolveMono16(src, out, tmp_line, coeff, width, height, radius); - convolveMono16(out, src, tmp_line, coeff, height, width, radius); -} - -module.exports = blurMono16; - -},{}],6:[function(require,module,exports){ -var bundleFn = arguments[3]; -var sources = arguments[4]; -var cache = arguments[5]; - -var stringify = JSON.stringify; - -module.exports = function (fn) { - var keys = []; - var wkey; - var cacheKeys = Object.keys(cache); - - for (var i = 0, l = cacheKeys.length; i < l; i++) { - var key = cacheKeys[i]; - if (cache[key].exports === fn) { - wkey = key; - break; - } - } - - if (!wkey) { - wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16); - var wcache = {}; - for (var i = 0, l = cacheKeys.length; i < l; i++) { - var key = cacheKeys[i]; - wcache[key] = key; - } - sources[wkey] = [ - Function(['require','module','exports'], '(' + fn + ')(self)'), - wcache - ]; - } - var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16); - - var scache = {}; scache[wkey] = wkey; - sources[skey] = [ - Function(['require'],'require(' + stringify(wkey) + ')(self)'), - scache - ]; - - var src = '(' + bundleFn + ')({' - + Object.keys(sources).map(function (key) { - return stringify(key) + ':[' - + sources[key][0] - + ',' + stringify(sources[key][1]) + ']' - ; - }).join(',') - + '},{},[' + stringify(skey) + '])' - ; - - var URL = window.URL || window.webkitURL || window.mozURL || window.msURL; - - return new Worker(URL.createObjectURL( - new Blob([src], { type: 'text/javascript' }) - )); -}; - -},{}],"/":[function(require,module,exports){ -'use strict'; - -/*global window:true*/ -/*eslint space-infix-ops:0*/ - -// Feature detect -var WORKER = (typeof window !== 'undefined') && ('Worker' in window); -if (WORKER) { - // IE don't allow to create webworkers from string. We should check it. - // https://connect.microsoft.com/IE/feedback/details/801810/web-workers-from-blob-urls-in-ie-10-and-11 - try { - var wkr = require('webworkify')(function () {}); - wkr.terminate(); - } catch (__) { - WORKER = false; - } -} - -var resize = require('./lib/resize'); -var resizeWorker = require('./lib/resize_worker'); - - -//////////////////////////////////////////////////////////////////////////////// -// Helpers -function _class(obj) { return Object.prototype.toString.call(obj); } -function isFunction(obj) { return _class(obj) === '[object Function]'; } - - -//////////////////////////////////////////////////////////////////////////////// -// API methods - - -// RGBA buffer async resize -// -function resizeBuffer(options, callback) { - var wr; - - var _opts = { - src: options.src, - dest: null, - width: options.width|0, - height: options.height|0, - toWidth: options.toWidth|0, - toHeight: options.toHeight|0, - quality: options.quality, - alpha: options.alpha, - unsharpAmount: options.unsharpAmount, - unsharpRadius: options.unsharpRadius, - unsharpThreshold: options.unsharpThreshold - }; - - if (WORKER && exports.WW) { - wr = require('webworkify')(resizeWorker); - - wr.onmessage = function(ev) { - var i, l, - dest = options.dest, - output = ev.data.output; - - // If we got output buffer by reference, we should copy data, - // because WW returns independent instance - if (dest) { - // IE ImageData can return old-style CanvasPixelArray - // without .set() method. Copy manually for such case. - if (dest.set) { - dest.set(output); - } else { - for (i = 0, l = output.length; i < l; i++) { - dest[i] = output[i]; - } - } - } - callback(ev.data.err, output); - wr.terminate(); - }; - - if (options.transferable) { - wr.postMessage(_opts, [ options.src.buffer ]); - } else { - wr.postMessage(_opts); - } - // Expose worker when available, to allow early termination. - return wr; - } - - // Fallback to sync call, if WebWorkers not available - _opts.dest = options.dest; - resize(_opts, callback); - return null; -} - - -// Canvas async resize -// -function resizeCanvas(from, to, options, callback) { - var w = from.width, - h = from.height, - w2 = to.width, - h2 = to.height; - - if (isFunction(options)) { - callback = options; - options = {}; - } - - if (!isNaN(options)) { - options = { quality: options, alpha: false }; - } - - var ctxTo = to.getContext('2d'); - var imageDataTo = ctxTo.getImageData(0, 0, w2, h2); - - var _opts = { - src: from.getContext('2d').getImageData(0, 0, w, h).data, - dest: imageDataTo.data, - width: from.width, - height: from.height, - toWidth: to.width, - toHeight: to.height, - quality: options.quality, - alpha: options.alpha, - unsharpAmount: options.unsharpAmount, - unsharpRadius: options.unsharpRadius, - unsharpThreshold: options.unsharpThreshold, - transferable: true - }; - - return resizeBuffer(_opts, function (err/*, output*/) { - if (err) { - callback(err); - return; - } - - ctxTo.putImageData(imageDataTo, 0, 0); - callback(); - }); -} - - -exports.resizeBuffer = resizeBuffer; -exports.resizeCanvas = resizeCanvas; -exports.WW = WORKER; - -},{"./lib/resize":3,"./lib/resize_worker":4,"webworkify":6}]},{},[])("/") -}); \ No newline at end of file diff --git a/src/lib/polyfill.js b/src/lib/polyfill.js deleted file mode 100644 index f702f15..0000000 --- a/src/lib/polyfill.js +++ /dev/null @@ -1,250 +0,0 @@ -"use strict"; - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -if (!String.prototype.startsWith) { - String.prototype.startsWith = function(searchString, position){ - position = position || 0; - return this.substr(position, searchString.length) === searchString; - }; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -if (!String.prototype.endsWith) { - String.prototype.endsWith = function(searchString, position) { - let subjectString = this.toString(); - if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { - position = subjectString.length; - } - position -= searchString.length; - let lastIndex = subjectString.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; - }; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes -if (!Array.prototype.includes) { - Array.prototype.includes = function(searchElement /*, fromIndex*/ ) { - let O = Object(this); - let len = parseInt(O.length) || 0; - if (len === 0) { - return false; - } - let n = parseInt(arguments[1]) || 0; - let k; - if (n >= 0) { - k = n; - } else { - k = len + n; - if (k < 0) {k = 0;} - } - let currentElement; - while (k < len) { - currentElement = O[k]; - if (searchElement === currentElement || - (searchElement !== searchElement && currentElement !== currentElement)) { - return true; - } - k++; - } - return false; - }; -} - -// Polyfill for missing array slice method (IE 11) -if (typeof Uint8Array !== 'undefined') { -if (! Uint8Array.prototype.slice) { - Uint8Array.prototype.slice = function(start, end) { - let retval = new Uint8Array(end - start); - let j = 0; - for (let i=start; i>0; //floor if number or convert non-number to 0; - padString = String(padString || ' '); - if (this.length > targetLength) { - return String(this); - } - else { - targetLength = targetLength-this.length; - if (targetLength > padString.length) { - padString += padString.repeat(targetLength/padString.length); //append to original to ensure we are longer than needed - } - return padString.slice(0,targetLength) + String(this); - } - }; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat -if (!String.prototype.repeat) { - String.prototype.repeat = function(count) { - 'use strict'; - if (this == null) { - throw new TypeError('can\'t convert ' + this + ' to object'); - } - let str = '' + this; - count = +count; - if (count != count) { - count = 0; - } - if (count < 0) { - throw new RangeError('repeat count must be non-negative'); - } - if (count == Infinity) { - throw new RangeError('repeat count must be less than infinity'); - } - count = Math.floor(count); - if (str.length == 0 || count == 0) { - return ''; - } - // Ensuring count is a 31-bit integer allows us to heavily optimize the - // main part. But anyway, most current (August 2014) browsers can't handle - // strings 1 << 28 chars or longer, so: - if (str.length * count >= 1 << 28) { - throw new RangeError('repeat count must not overflow maximum string size'); - } - let rpt = ''; - for (;;) { - if ((count & 1) == 1) { - rpt += str; - } - count >>>= 1; - if (count == 0) { - break; - } - str += str; - } - // Could we try: - // return Array(count + 1).join(this); - return rpt; - } -} - -// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob -if (typeof HTMLCanvasElement !== 'undefined') { -if (!HTMLCanvasElement.prototype.toBlob) { - Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', { - value: function (callback, type, quality) { - - let binStr = atob( this.toDataURL(type, quality).split(',')[1] ), - len = binStr.length, - arr = new Uint8Array(len); - - for (let i=0; i 0 ? 1 : -1) * Math.floor(Math.abs(number)); - }; - var maxSafeInteger = Math.pow(2, 53) - 1; - var toLength = function (value) { - var len = toInteger(value); - return Math.min(Math.max(len, 0), maxSafeInteger); - }; - - // The length property of the from method is 1. - return function from(arrayLike/*, mapFn, thisArg */) { - // 1. Let C be the this value. - var C = this; - - // 2. Let items be ToObject(arrayLike). - var items = Object(arrayLike); - - // 3. ReturnIfAbrupt(items). - if (arrayLike == null) { - throw new TypeError('Array.from requires an array-like object - not null or undefined'); - } - - // 4. If mapfn is undefined, then let mapping be false. - var mapFn = arguments.length > 1 ? arguments[1] : void undefined; - var T; - if (typeof mapFn !== 'undefined') { - // 5. else - // 5. a If IsCallable(mapfn) is false, throw a TypeError exception. - if (!isCallable(mapFn)) { - throw new TypeError('Array.from: when provided, the second argument must be a function'); - } - - // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined. - if (arguments.length > 2) { - T = arguments[2]; - } - } - - // 10. Let lenValue be Get(items, "length"). - // 11. Let len be ToLength(lenValue). - var len = toLength(items.length); - - // 13. If IsConstructor(C) is true, then - // 13. a. Let A be the result of calling the [[Construct]] internal method - // of C with an argument list containing the single item len. - // 14. a. Else, Let A be ArrayCreate(len). - var A = isCallable(C) ? Object(new C(len)) : new Array(len); - - // 16. Let k be 0. - var k = 0; - // 17. Repeat, while k < len… (also steps a - h) - var kValue; - while (k < len) { - kValue = items[k]; - if (mapFn) { - A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); - } else { - A[k] = kValue; - } - k += 1; - } - // 18. Let putStatus be Put(A, "length", len, true). - A.length = len; - // 20. Return A. - return A; - }; - }()); -} - -// FIXME: This function is super inefficient -function saneJoin(array, separator) { - let retval = ''; - for (let i=0; i -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - -function generate_random_user_id() { - // Get a 18 character user id - const code_table = "0123456789"; - let user_id = ""; - for (let i = 0; i < 18; ++i) { - // Get a random number between 0 and 10 - const num = Math.floor((Math.random() * code_table.length)); - - // Get the character that corresponds to the number - user_id += code_table[num]; - } - - return user_id; -} - -function settings_delete_all() { - localStorage.removeItem('is_first_run'); - localStorage.removeItem('use_higher_quality_previews'); - localStorage.removeItem('use_smoothing_when_resizing_images'); - localStorage.removeItem('install_updates_enabled'); - localStorage.removeItem('right_click_enabled'); - localStorage.removeItem('db_names'); -} - -function settings_set(name, value) { - localStorage.setItem(name, JSON.stringify(value)); -} - -function settings_get(name, default_value) { - let value = localStorage.getItem(name); - if (value) { - return JSON.parse(value); - } else { - return default_value; - } -} - -function settings_has(name) { - let value = localStorage.getItem(name); - if (value) { - return true; - } else { - return false; - } -} - -function settings_get_is_first_run() { - return settings_get('is_first_run', true); -} - -function settings_set_is_first_run(value) { - settings_set('is_first_run', value); -} - -function settings_get_use_higher_quality_previews() { - return settings_get('use_higher_quality_previews', false); -} - -function settings_set_use_higher_quality_previews(value) { - settings_set('use_higher_quality_previews', value); -} - -function settings_get_use_smoothing_when_resizing_images() { - return settings_get('use_smoothing_when_resizing_images', true); -} - -function settings_set_use_smoothing_when_resizing_images(value) { - settings_set('use_smoothing_when_resizing_images', value); -} - -function settings_get_install_updates_enabled() { - return settings_get('install_updates_enabled', true); -} - -function settings_set_install_updates_enabled(value) { - settings_set('install_updates_enabled', value); -} - -function settings_get_right_click_enabled() { - return settings_get('right_click_enabled', false); -} - -function settings_set_right_click_enabled(value) { - settings_set('right_click_enabled', value); -} - -function settings_get_db_names() { - return settings_get('db_names', []); -} - -function settings_set_db_names(value) { - value.sort(); - settings_set('db_names', value); -} - -function settings_get_user_id() { - // Get or create the user id - let user_id = null; - if (! settings_has('user_id')) { - user_id = generate_random_user_id(); - settings_set('user_id', user_id); - } - user_id = settings_get('user_id'); - - // If the user id is longer than 18 characters, get a new one - if (user_id.length > 18) { - console.warn('The user_id was too long. Making a new one.'); - user_id = generate_random_user_id(); - settings_set('user_id', user_id); - } - - return user_id; -} diff --git a/src/lib/uncompress.js b/src/lib/uncompress.js deleted file mode 100644 index e3cccbf..0000000 --- a/src/lib/uncompress.js +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright (c) 2015 Matthew Brennan Jones -// This software is licensed under a MIT License -// https://github.com/workhorsy/uncompress.js - -"use strict"; - - -function loadScript(url) { - // Window - if (typeof window === 'object') { - var script = document.createElement('script'); - script.type = "text/javascript"; - script.src = url; - document.head.appendChild(script); - // Web Worker - } else if (typeof importScripts === 'function') { - importScripts(url); - } -} - -function currentScriptPath() { - // NOTE: document.currentScript does not work in a Web Worker - // So we have to parse a stack trace maually - try { - throw new Error(''); - } catch(e) { - var stack = e.stack; - var line = null; - - // Chrome and IE - if (stack.indexOf('@') !== -1) { - line = stack.split('@')[1].split('\n')[0]; - // Firefox - } else { - line = stack.split('(')[1].split(')')[0]; - } - line = line.substring(0, line.lastIndexOf('/')) + '/'; - return line; - } -} - -// This is used by libunrar.js to load libunrar.js.mem -var unrarMemoryFileLocation = null; - -(function() { - -var _loaded_archive_formats = []; - -// Polyfill for missing array slice method (IE 11) -if (typeof Uint8Array !== 'undefined') { -if (! Uint8Array.prototype.slice) { - Uint8Array.prototype.slice = function(start, end) { - var retval = new Uint8Array(end - start); - var j = 0; - for (var i=start; i b.name) return 1; - return 0; - }); - - // Return the archive object - return { - file_name: file_name, - archive_type: archive_type, - array_buffer: array_buffer, - entries: entries, - handle: handle - }; -} - -function archiveClose(archive) { - archive.file_name = null; - archive.archive_type = null; - archive.array_buffer = null; - archive.entries = null; - archive.handle = null; -} - -function _rarOpen(file_name, array_buffer) { - // Create an array of rar files - var rar_files = [{ - name: file_name, - size: array_buffer.byteLength, - type: '', - content: new Uint8Array(array_buffer) - }]; - - // Return rar handle - return { - file_name: file_name, - array_buffer: array_buffer, - password: null, - rar_files: rar_files - }; -} - -function _zipOpen(file_name, array_buffer) { - var zip = new JSZip(array_buffer); - - // Return zip handle - return { - file_name: file_name, - array_buffer: array_buffer, - password: null, - zip: zip - }; -} - -function _tarOpen(file_name, array_buffer) { - // Return tar handle - return { - file_name: file_name, - array_buffer: array_buffer, - password: null - }; -} - -function _rarGetEntries(rar_handle) { - // Get the entries - var info = readRARFileNames(rar_handle.rar_files, rar_handle.password); - var entries = []; - Object.keys(info).forEach(function(i) { - var name = info[i].name; - var is_file = info[i].is_file; - - entries.push({ - name: name, - is_file: info[i].is_file, - size: info[i].size, - readData: function(cb) { - setTimeout(function() { - if (is_file) { - try { - readRARContent(rar_handle.rar_files, rar_handle.password, name, cb); - } catch (e) { - cb(null, e); - } - } else { - cb(null, null); - } - }, 0); - } - }); - }); - - return entries; -} - -function _zipGetEntries(zip_handle) { - var zip = zip_handle.zip; - - // Get all the entries - var entries = []; - Object.keys(zip.files).forEach(function(i) { - var zip_entry = zip.files[i]; - var name = zip_entry.name; - var is_file = ! zip_entry.dir; - var size = zip_entry._data ? zip_entry._data.uncompressedSize : 0; - - entries.push({ - name: name, - is_file: is_file, - size: size, - readData: function(cb) { - setTimeout(function() { - if (is_file) { - var data = zip_entry.asArrayBuffer(); - cb(data, null); - } else { - cb(null, null); - } - }, 0); - } - }); - }); - - return entries; -} - -function _tarGetEntries(tar_handle) { - var tar_entries = tarGetEntries(tar_handle.file_name, tar_handle.array_buffer); - - // Get all the entries - var entries = []; - tar_entries.forEach(function(entry) { - var name = entry.name; - var is_file = entry.is_file; - var size = entry.size; - - entries.push({ - name: name, - is_file: is_file, - size: size, - readData: function(cb) { - setTimeout(function() { - if (is_file) { - var data = tarGetEntryData(entry, tar_handle.array_buffer); - cb(data.buffer, null); - } else { - cb(null, null); - } - }, 0); - } - }); - }); - - return entries; -} - -function isRarFile(array_buffer) { - // The three styles of RAR headers - var rar_header1 = saneJoin([0x52, 0x45, 0x7E, 0x5E], ', '); // old - var rar_header2 = saneJoin([0x52, 0x61, 0x72, 0x21, 0x1A, 0x07, 0x00], ', '); // 1.5 to 4.0 - var rar_header3 = saneJoin([0x52, 0x61, 0x72, 0x21, 0x1A, 0x07, 0x01, 0x00], ', '); // 5.0 - - // Just return false if the file is smaller than the header - if (array_buffer.byteLength < 8) { - return false; - } - - // Return true if the header matches one of the RAR headers - var header1 = saneJoin(new Uint8Array(array_buffer).slice(0, 4), ', '); - var header2 = saneJoin(new Uint8Array(array_buffer).slice(0, 7), ', '); - var header3 = saneJoin(new Uint8Array(array_buffer).slice(0, 8), ', '); - return (header1 === rar_header1 || header2 === rar_header2 || header3 === rar_header3); -} - -function isZipFile(array_buffer) { - // The ZIP header - var zip_header = saneJoin([0x50, 0x4b, 0x03, 0x04], ', '); - - // Just return false if the file is smaller than the header - if (array_buffer.byteLength < 4) { - return false; - } - - // Return true if the header matches the ZIP header - var header = saneJoin(new Uint8Array(array_buffer).slice(0, 4), ', '); - return (header === zip_header); -} - -function isTarFile(array_buffer) { - // The TAR header - var tar_header = saneJoin(['u', 's', 't', 'a', 'r'], ', '); - - // Just return false if the file is smaller than the header size - if (array_buffer.byteLength < 512) { - return false; - } - - // Return true if the header matches the TAR header - var header = saneJoin(saneMap(new Uint8Array(array_buffer).slice(257, 257 + 5), String.fromCharCode), ', '); - return (header === tar_header); -} - -// Figure out if we are running in a Window or Web Worker -var scope = null; -if (typeof window === 'object') { - scope = window; -} else if (typeof importScripts === 'function') { - scope = self; -} - -// Set exports -scope.loadArchiveFormats = loadArchiveFormats; -scope.archiveOpenFile = archiveOpenFile; -scope.archiveOpenArrayBuffer = archiveOpenArrayBuffer; -scope.archiveClose = archiveClose; -scope.isRarFile = isRarFile; -scope.isZipFile = isZipFile; -scope.isTarFile = isTarFile; -scope.saneJoin = saneJoin; -scope.saneMap = saneMap; -})(); diff --git a/src/lib/utility.js b/src/lib/utility.js deleted file mode 100644 index d0dd486..0000000 --- a/src/lib/utility.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2017 Matthew Brennan Jones -// This software is licensed under AGPL v3 or later -// http://github.com/workhorsy/comic_book_reader -"use strict"; - -/* -function hasTouchSupport() { - return 'ontouchstart' in window || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; -} - -function diff(a, b) { - return a > b ? (a-b) : (b-a); -} - -function toFriendlySize(size) { - if (size >= 1024000000) { - return (size / 1024000000).toFixed(2) + ' GB'; - } else if (size >= 1024000) { - return (size / 1024000).toFixed(2) + ' MB'; - } else if (size >= 1024) { - return (size / 1024).toFixed(2) + ' KB'; - } else if (size >= 1) { - return (size / 1).toFixed(2) + ' B'; - } else if (size === 0) { - return L('None'); - } - - return '?'; -} - -function imageToCanvas(img, width, height) { - let canvas = document.createElement('canvas'); - canvas.width = width; - canvas.height = height; - let ctx = canvas.getContext('2d'); - ctx.mozImageSmoothingEnabled = false; - ctx.webkitImageSmoothingEnabled = false; - ctx.msImageSmoothingEnabled = false; - ctx.imageSmoothingEnabled = false; - ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, width, height); - return canvas; -} - -function resizeImage(img, width, height, use_higher_quality, cb, type, quality) { - if (! use_higher_quality) { - let source = imageToCanvas(img, width, height); - source.toBlob(function(small_blob) { - cb(small_blob); - }, type, quality); - } else { - let source = imageToCanvas(img, img.width, img.height); - - let dest = document.createElement('canvas'); - dest.width = width; - dest.height = height; - - window.pica.resizeCanvas(source, dest, { - quality: 0, - unsharpAmount: 80, - unsharpRadius: 0.6, - unsharpThreshold: 2, - transferable: true - }, function (err) { - dest.toBlob(function(small_blob) { - cb(small_blob); - }, type, quality); - } - ); - } -} -*/ - -//https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API -export function toggleFullScreen() { - if (!document.fullscreenElement && - !document.mozFullScreenElement && - !document.webkitFullscreenElement && - !document.msFullscreenElement) { - console.info('Calling full screen ................'); - if (document.documentElement.requestFullscreen) { - document.documentElement.requestFullscreen(); - } else if (document.documentElement.msRequestFullscreen) { - document.documentElement.msRequestFullscreen(); - } else if (document.documentElement.mozRequestFullScreen) { - document.documentElement.mozRequestFullScreen(); - } else if (document.documentElement.webkitRequestFullscreen) { - document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); - } - } else { - console.info('Calling exit full screen ................'); - if (document.exitFullscreen) { - document.exitFullscreen(); - } else if (document.msExitFullscreen) { - document.msExitFullscreen(); - } else if (document.mozCancelFullScreen) { - document.mozCancelFullScreen(); - } else if (document.webkitExitFullscreen) { - document.webkitExitFullscreen(); - } - } -} diff --git a/src/style/helpers.less b/src/lib/vendor/index.js similarity index 100% rename from src/style/helpers.less rename to src/lib/vendor/index.js diff --git a/src/lib/version_date.js b/src/lib/version_date.js deleted file mode 100644 index bd9552d..0000000 --- a/src/lib/version_date.js +++ /dev/null @@ -1 +0,0 @@ -function getVersionDate() { return "July 18, 2017 - 21:44:01"; } diff --git a/src/lib/test_requirements_worker.js b/src/lib/ws/test_requirements_worker.js similarity index 100% rename from src/lib/test_requirements_worker.js rename to src/lib/ws/test_requirements_worker.js diff --git a/src/lib/web_worker.js b/src/lib/ws/web_worker.js similarity index 100% rename from src/lib/web_worker.js rename to src/lib/ws/web_worker.js diff --git a/src/manifest.json b/src/manifest.json index ba89cd7..ce16443 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,9 +1,9 @@ { - "name": "Comic Book Reader", - "short_name": "Comic Book Reader", - "start_url": "/", - "display": "standalone", - "orientation": "any", - "background_color": "#fff", - "theme_color": "#ffb400", + "name": "Comic Book Reader", + "short_name": "Comic Book Reader", + "start_url": "/", + "display": "standalone", + "orientation": "any", + "background_color": "#fff", + "theme_color": "#ffb400" } diff --git a/src/reducers.js b/src/reducers.js deleted file mode 100644 index 13284db..0000000 --- a/src/reducers.js +++ /dev/null @@ -1,6 +0,0 @@ - -const EMPTY = {}; - -export default store => { - return store || EMPTY; -}; diff --git a/src/routes/files/index.js b/src/routes/files/index.js new file mode 100644 index 0000000..b962738 --- /dev/null +++ b/src/routes/files/index.js @@ -0,0 +1,95 @@ +import { h, Component } from 'preact' +import style from './style' + +import { route } from 'preact-router' +import Icon from '../../components/icon' +import Button from '../../components/button' + +const FileInput = ({ filters, onChange }) => ( + onChange(event.target.files[0])} + /> +) + +export default class Files extends Component { + state = { + file: null, + drag: false, + } + + constructor(props) { + super(props) + this.filters = ['.pdf', '.cbr', '.cbt', '.cbz'] + } + + openLibrary() { + route('/library') + } + + handleFile(file) { + file && this.setState({ file }) + } + + openFile() { + // Open file dialog + console.log(this.fileInput) + this.fileInput.base.click() + } + + handleDrop(event) { + event.preventDefault() + const { files } = event.dataTransfer + const file = files ? files[0] : null + this.setState({ file, drag: false }) + } + + handleDragOver(event) { + event.preventDefault() + this.setState({ drag: true }) + } + handleDragLeave() { + this.setState({ drag: false }) + } + + // gets called when this route is navigated to + componentDidMount() {} + + // gets called just before navigating away from the route + componentWillUnmount() {} + + render() { + const drag = this.state.drag ? style.drag : '' + + return ( +

+ ) + } +} diff --git a/src/routes/files/style.less b/src/routes/files/style.less new file mode 100644 index 0000000..5beb5dd --- /dev/null +++ b/src/routes/files/style.less @@ -0,0 +1,71 @@ +.view { + position: absolute; + top: 45px; + bottom: 0px; + left: 0; + right: 0; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 1.25em; +} + +.view p { + margin: 25px; + color: var(--text-message-color); +} + +.view h1 i { + color: var(--text-message-color); + opacity: 0.5; +} + +.drag p { + color: var(--text-color); +} + +.drag .actions { + opacity: 0.25; + pointer-events: none; +} + +.actions { +} + +.drag h1 i { + display: block; + transform: translateY(0px); + animation-name: drop; + animation-duration: 0.35s; + animation-fill-mode: both; + animation-timing-function: ease; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +.view button { + width: 100%; +} + +.view footer { + font-size: 0.85em; + position: absolute; + bottom: 0; + width: 100%; + left: 0; + right: 0; + margin: auto; +} + +@keyframes drop { + from { + opacity: 0.5; + transform: translateY(0px); + } + to { + opacity: 1; + transform: translateY(25px); + } +} diff --git a/src/routes/library/index.js b/src/routes/library/index.js new file mode 100644 index 0000000..8ca633f --- /dev/null +++ b/src/routes/library/index.js @@ -0,0 +1,67 @@ +import { h, Component } from 'preact' +import { Link } from 'preact-router' +import EmptyState from '../../components/empty-state' +import style from './style' + +class Item extends Component { + static defaultProps = { + cover: './assets/invalid_image.png', + } + + state = { + cover: this.props.cover, + loaded: false, + } + + componentDidUpdate() { + //this.state.loaded && console.log("Loaded!"); + } + + handleImageLoaded() { + this.setState({ loaded: true }) + } + + handleError(err) { + this.setState({ cover: './assets/invalid_image.png' }) + } + + render() { + let { props, state } = this + return ( +
+ +

{props.title}

+
+ ) + } +} + +export default class Library extends Component { + static defaultProps = { + items: [], + } + render() { + const { items } = this.props + + const EmptyMessage = props => ( + + Your library is empty, add some files first.{' '} + + ) + + return ( +
+ {items && items.length ? ( + items.map((i, k) => ) + ) : ( + + )} +
+ ) + } +} diff --git a/src/routes/library/style.less b/src/routes/library/style.less new file mode 100644 index 0000000..0ee1371 --- /dev/null +++ b/src/routes/library/style.less @@ -0,0 +1,31 @@ +.view { + position: absolute; + top: 45px; + bottom: 0px; + left: 0; + right: 0; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 1.25em; +} + +.view h1 i { + color: var(--text-message-color); + opacity: 0.5; +} + +.view .item { + display: inline-block; + margin: 10px; + float: left; +} + +.view .item img { + border: 1px solid #abb2bf; + height: auto; + width: 8vw; + min-width: 100px; +} diff --git a/src/routes/settings/index.js b/src/routes/settings/index.js new file mode 100644 index 0000000..4195a5a --- /dev/null +++ b/src/routes/settings/index.js @@ -0,0 +1,5 @@ +import { connect } from 'unistore/preact' +import Settings from './view.jsx' +import actions from '../../unistore/actions' + +export default connect('settings', actions)(Settings) diff --git a/src/routes/settings/style.less b/src/routes/settings/style.less new file mode 100644 index 0000000..3c2d09b --- /dev/null +++ b/src/routes/settings/style.less @@ -0,0 +1,37 @@ +.view { + position: absolute; + top: 45px; + bottom: 0; + left: 0; + right: 0; + padding: 0 5%; + text-align: left; + overflow: auto; +} + +.view p { + color: var(--text-message-color); +} + +.view button { + display: inline-block; + margin: 16px 0; +} + +@media (max-width: 400px) { + .view { + font-size: 14px; + padding: 0 2%; + } + .view p { + max-width: 100%; + } + + .view button { + font-size: 14px; + } + + .view footer { + font-size: 14px; + } +} diff --git a/src/routes/settings/view.jsx b/src/routes/settings/view.jsx new file mode 100644 index 0000000..bc81900 --- /dev/null +++ b/src/routes/settings/view.jsx @@ -0,0 +1,102 @@ +import { h, Component } from 'preact' +import style from './style' +import Button from '../../components/button' +import CheckBox from '../../components/checkbox' +import Switch from '../../components/switch' +import { defaultSettings, updateSettings, getDefaultSettings } from '../../settings.js' +import { route } from 'preact-router' + +export default class Settings extends Component { + state = {} + + // gets called when this route is navigated to + componentDidMount() { + window.addEventListener('beforeunload', this.storeSettings) + } + + // gets called just before navigating away from the route + componentWillUnmount() { + this.storeSettings() + window.removeEventListener('beforeunload', () => { + this.storeSettings() + }) + } + + storeSettings = () => { + // Save settings to localStorage (persistent data) + const { settings } = this.props + settings && updateSettings(settings) + } + + setSetting = (key, value) => { + const { setSettings } = this.props + setSettings({ key, value }) + } + + render() { + const { settings } = this.props + + const checkboxes = Object.entries(defaultSettings).filter( + ([item, data]) => data.type === 'checkbox' + ) + + return ( +
+
+

Settings

+ {/* +

+ + +

+ */} +
+ {checkboxes.map(([item, data]) => ( +

+ this.setSetting(item, value)} + > + {data.label} + +

+ ))} +
+ this.setSetting('night_mode_enabled', value)} + /> +
+

+ + + 0 + +

+ +
+

+ + + 0.0.1 + +

+
+
+ ) + } +} diff --git a/src/routes/show-comics/index.js b/src/routes/show-comics/index.js deleted file mode 100644 index 03689ac..0000000 --- a/src/routes/show-comics/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import { h, Component } from 'preact'; -import style from './style'; - -import ComicMenu from '../../components/comic-menu'; - -export default class ShowComics extends Component { - state = { - }; - - // gets called when this route is navigated to - componentDidMount() { - } - - // gets called just before navigating away from the route - componentWillUnmount() { - } - - - render() { - return ( -
- -
- ); - } -} diff --git a/src/routes/show-comics/style.less b/src/routes/show-comics/style.less deleted file mode 100644 index 97d139f..0000000 --- a/src/routes/show-comics/style.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '~style/helpers'; - -.show_comics { - -} - - diff --git a/src/routes/unsupported/index.js b/src/routes/unsupported/index.js new file mode 100644 index 0000000..d643376 --- /dev/null +++ b/src/routes/unsupported/index.js @@ -0,0 +1,21 @@ +import { h, Component } from 'preact' +import style from './style' + +export default class Unsupported extends Component { + render() { + return ( +
+ ) + } +} diff --git a/src/routes/unsupported/style.less b/src/routes/unsupported/style.less new file mode 100644 index 0000000..3feb2d6 --- /dev/null +++ b/src/routes/unsupported/style.less @@ -0,0 +1,62 @@ +.view { + position: absolute; + top: 45px; + bottom: 0; + left: 0; + right: 0; + padding: 0 5%; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 1.25em; + overflow: auto; +} + +.view p { + margin: 5% 0; + max-width: 50%; + color: var(--text-message-color); + line-height: 1.5; +} + +.view .focus { + color: #c8d6e5; + font-weight: bold; +} + +.view button { + width: 100%; +} + +.view footer { + font-size: 0.9em; + width: 100%; + position: absolute; + bottom: 0; + left: 0; + margin: 32px auto; + color: var(--text-message-color); +} + +.view footer a { + margin: 0 4px; +} + +@media (max-width: 400px) { + .view { + font-size: 14px; + } + .view p { + max-width: 100%; + } + + .view button { + font-size: 14px; + } + + .view footer { + font-size: 14px; + } +} diff --git a/src/routes/welcome/index.js b/src/routes/welcome/index.js index 7fa46f7..019ed5f 100644 --- a/src/routes/welcome/index.js +++ b/src/routes/welcome/index.js @@ -1,40 +1,41 @@ -import { h, Component } from 'preact'; -import style from './style'; +import { h, Component } from 'preact' +import style from './style' -import { route } from 'preact-router'; -import ComicButton from '../../components/comic-button'; +import { route } from 'preact-router' +import Footer from '../../components/footer' +import Button from '../../components/button' export default class Welcome extends Component { - state = { - }; - - showApp(e) { - route('/show'); - } - - // gets called when this route is navigated to - componentDidMount() { - } - - // gets called just before navigating away from the route - componentWillUnmount() { - } - - render() { - return ( -
-

Comic Book Reader

-

- A touch friendly HTML5 comic book reader that reads CBR, CBZ, CBT, and PDF files. -

-

- Start -

- -
- ); - } + state = {} + + showApp(e) { + route('/files') + } + + // gets called when this route is navigated to + componentDidMount() {} + + // gets called just before navigating away from the route + componentWillUnmount() {} + + render() { + return ( +
+

+ Comic Book Reader +

+

+ A touch friendly HTML5 comic book reader that reads CBR,{' '} + CBZ, CBT, and{' '} + PDF files. +

+ + + +
+ ) + } } diff --git a/src/routes/welcome/style.less b/src/routes/welcome/style.less index 9c56439..3feb2d6 100644 --- a/src/routes/welcome/style.less +++ b/src/routes/welcome/style.less @@ -1,40 +1,62 @@ -@import '~style/helpers'; - -.welcome { - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; - text-align: center; - justify-content: center; - align-items: center; - color: black; - font-size: 7vmin; - line-height: 10vmin; - background-color: grey; +.view { + position: absolute; + top: 45px; + bottom: 0; + left: 0; + right: 0; + padding: 0 5%; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 1.25em; + overflow: auto; } -.welcome button { - font-size: 7vmin; - line-height: 10vmin; +.view p { + margin: 5% 0; + max-width: 50%; + color: var(--text-message-color); + line-height: 1.5; } -.welcome footer { - font-size: 4vmin; - line-height: 10vmin; +.view .focus { + color: #c8d6e5; + font-weight: bold; } -@media (max-width: 379px) { - .welcome { - font-size: 14px; - } +.view button { + width: 100%; +} + +.view footer { + font-size: 0.9em; + width: 100%; + position: absolute; + bottom: 0; + left: 0; + margin: 32px auto; + color: var(--text-message-color); +} + +.view footer a { + margin: 0 4px; +} + +@media (max-width: 400px) { + .view { + font-size: 14px; + } + .view p { + max-width: 100%; + } - .welcome button { - font-size: 14px; - } + .view button { + font-size: 14px; + } - .welcome footer { - font-size: 14px; - } + .view footer { + font-size: 14px; + } } diff --git a/src/settings.js b/src/settings.js new file mode 100644 index 0000000..5600f76 --- /dev/null +++ b/src/settings.js @@ -0,0 +1,61 @@ +export const defaultSettings = { + theme: { + type: 'select', + values: ['dark', 'light'], + defaultValue: 'dark', + label: 'Select a theme', + }, + install_updates_enabled: { + type: 'checkbox', + defaultValue: false, + label: 'Check for updates', + }, + night_mode_enabled: { + type: 'switch', + defaultValue: true, + label: 'Night Mode', + }, + right_click_enabled: { + type: 'checkbox', + defaultValue: false, + label: 'Allow right click', + }, + use_higher_quality_previews: { + type: 'checkbox', + defaultValue: false, + label: 'Use higher quality page previews', + }, + use_smoothing_when_resizing_images: { + type: 'checkbox', + defaultValue: false, + label: 'Use smoothing when resizing images', + }, +} + +export function getDefaultSettings() { + const settings = {} + Object.entries(defaultSettings).forEach(([key, value]) => { + settings[key] = value.defaultValue + }) + return settings +} + +export function getSettings() { + let settings = {} + try { + settings = JSON.parse(localStorage.getItem('settings')) + } catch (error) { + throw new Error('Settings failed to load!') + } finally { + return Object.assign(getDefaultSettings(), settings) + } +} + +export function updateSettings(settings) { + try { + const data = JSON.stringify(settings) + data && localStorage.setItem('settings', data) + } catch (error) { + throw new Error("Settings: Can't load Settings, revert to default! ") + } +} diff --git a/src/store.js b/src/store.js deleted file mode 100644 index 68f18b1..0000000 --- a/src/store.js +++ /dev/null @@ -1,24 +0,0 @@ -import { createStore } from 'redux'; - -let ACTIONS = { - ADD_COMIC: ({ comics, ...state }, { text }) => ({ - comics: [...comics, { - id: Math.random().toString(36).substring(2), - text - }], - ...state - }), - - REMOVE_COMIC: ({ comics, ...state }, { comic }) => ({ - comics: comics.filter( i => i!==comic ), - ...state - }) -}; - -const INITIAL = { - comics: [] -}; - -export default createStore( (state, action) => ( - action && ACTIONS[action.type] ? ACTIONS[action.type](state, action) : state -), INITIAL, window.devToolsExtension && window.devToolsExtension()); diff --git a/src/style/index.less b/src/style/index.less index 6369a58..3fb62bd 100644 --- a/src/style/index.less +++ b/src/style/index.less @@ -1,34 +1,58 @@ -@import 'helpers'; +@import 'vars.less'; -*, *::before, *::after { - box-sizing: border-box; -} - -* { - font-family: Helvetica, Arial, sans-serif; +*, +*::before, +*::after { + box-sizing: border-box; } html { - min-height: 100%; - height: 100%; - margin: 0; - padding: 0; + min-height: 100%; + height: 100%; + margin: 0; + padding: 0; } body { - overflow: hidden; - min-height: 100%; - margin: 0; - padding: 0; + background: var(--bg-color); + color: var(--text-color); + overflow: hidden; + min-height: 100%; + margin: 0; + padding: 0; + font-family: 'Montserrat', Helvetica, Arial, sans-serif; + font-size: 1em; +} + +a { + color: var(--link-color); +} + +hr { + border: 0; + height: 2px; + background: var(--text-message-color); + opacity: 0.25; +} + +#outer { + margin: 0; + height: 100vh; + width: 100vw; +} + +#app { + width: 100%; + height: 100%; } /* Make scroll bars small and blue on Chrome */ ::-webkit-scrollbar { - height: 5px; - width: 5px; + height: 5px; + width: 5px; } ::-webkit-scrollbar-track { } ::-webkit-scrollbar-thumb { - background: #61AFEF; + background: #61afef; } diff --git a/src/style/vars.less b/src/style/vars.less new file mode 100644 index 0000000..32ab778 --- /dev/null +++ b/src/style/vars.less @@ -0,0 +1,8 @@ +/* Css vars */ +:root { + --main-color: #1976d2; + --bg-color: #2f3542; + --link-color: #34ace0; + --text-color: white; + --text-message-color: #a4b0be; +} diff --git a/src/unistore/actions.js b/src/unistore/actions.js new file mode 100644 index 0000000..ba516d6 --- /dev/null +++ b/src/unistore/actions.js @@ -0,0 +1,17 @@ +// Immutable state: quick hack [FIX IT] +const deepClone = state => JSON.parse(JSON.stringify(state)) + +const actions = store => ({ + // for count + setSettings(prevState, { key, value }) { + const state = deepClone(prevState) + const { settings } = state + if (settings[key] !== undefined) settings[key] = value + return { + ...state, + settings: { ...settings }, + } + }, +}) + +export default actions diff --git a/src/unistore/store.js b/src/unistore/store.js new file mode 100644 index 0000000..f9123c3 --- /dev/null +++ b/src/unistore/store.js @@ -0,0 +1,11 @@ +import { createStore, connect } from 'unistore/full/preact' +import { getSettings } from '../settings.js' + +// Set initialState +const initialState = {} + +// Load settings +initialState.settings = getSettings() + +// Create store +export default createStore(initialState) diff --git a/src/util.js b/src/util.js deleted file mode 100644 index 1ebc4d8..0000000 --- a/src/util.js +++ /dev/null @@ -1,7 +0,0 @@ -import { bindActionCreators } from 'redux'; - -export function bindActions(actions) { - return dispatch => ({ - ...bindActionCreators(actions, dispatch) - }); -} diff --git a/src/utils/browser.js b/src/utils/browser.js new file mode 100644 index 0000000..dd7c914 --- /dev/null +++ b/src/utils/browser.js @@ -0,0 +1,91 @@ +//https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API +export function toggleFullScreen() { + if ( + !document.fullscreenElement && + !document.mozFullScreenElement && + !document.webkitFullscreenElement && + !document.msFullscreenElement + ) { + console.info('Calling full screen ................') + if (document.documentElement.requestFullscreen) { + document.documentElement.requestFullscreen() + } else if (document.documentElement.msRequestFullscreen) { + document.documentElement.msRequestFullscreen() + } else if (document.documentElement.mozRequestFullScreen) { + document.documentElement.mozRequestFullScreen() + } else if (document.documentElement.webkitRequestFullscreen) { + document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) + } + } else { + console.info('Calling exit full screen ................') + if (document.exitFullscreen) { + document.exitFullscreen() + } else if (document.msExitFullscreen) { + document.msExitFullscreen() + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen() + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen() + } + } +} + +// Show an error message if any required browser features are missing +export function requireBrowserFeatures(cb) { + let errors = [] + if (!('transform' in document.body.style)) { + errors.push('CSS transform') + } + if (typeof Blob === 'undefined') { + errors.push('Blob') + } + if (typeof Object === 'undefined' || typeof Object.defineProperty === 'undefined') { + errors.push('Object defineProperty') + } + if (typeof Object === 'undefined' || typeof Object.hasOwnProperty === 'undefined') { + errors.push('Object hasOwnProperty') + } + if ( + typeof window.HTMLCanvasElement === 'undefined' || + typeof window.HTMLCanvasElement.prototype.getContext === 'undefined' + ) { + errors.push('Canvas Context') + } + if (typeof Uint8Array === 'undefined') { + errors.push('Uint8Array') + } + if (typeof indexedDB === 'undefined') { + errors.push('Indexed DB') + } + if (typeof localStorage === 'undefined') { + errors.push('Local Storage') + } + if (typeof Worker === 'undefined') { + errors.push('Web Worker') + } + if (typeof URL === 'undefined' || typeof URL.createObjectURL === 'undefined') { + errors.push('Create Object URL') + } + if (typeof URL === 'undefined' || typeof URL.revokeObjectURL === 'undefined') { + errors.push('Revoke Object URL') + } + if (typeof JSON === 'undefined' || typeof JSON.stringify === 'undefined') { + errors.push('JSON Stringify') + } + if (typeof JSON === 'undefined' || typeof JSON.parse === 'undefined') { + errors.push('JSON Parse') + } + if (typeof FileReader === 'undefined') { + errors.push('File Reader') + } + if ( + typeof document.documentElement.requestFullscreen === 'undefined' && + typeof document.documentElement.msRequestFullscreen === 'undefined' && + typeof document.documentElement.mozRequestFullScreen === 'undefined' && + typeof document.documentElement.webkitRequestFullscreen === 'undefined' + ) { + errors.push('Request Full Screen') + } + + cb(errors) +} diff --git a/src/utils/random.js b/src/utils/random.js new file mode 100644 index 0000000..93a4ed7 --- /dev/null +++ b/src/utils/random.js @@ -0,0 +1,14 @@ +export function generateId() { + // Get a 18 character user id + const code_table = "0123456789"; + let user_id = ""; + for (let i = 0; i < 18; ++i) { + // Get a random number between 0 and 10 + const num = Math.floor((Math.random() * code_table.length)); + + // Get the character that corresponds to the number + user_id += code_table[num]; + } + + return user_id; +} diff --git a/styles.css b/styles.css deleted file mode 100644 index 5a63b9f..0000000 --- a/styles.css +++ /dev/null @@ -1,391 +0,0 @@ - -*, *::before, *::after { - box-sizing: border-box; -} - -* { - font-family: Helvetica, Arial, sans-serif; -} - -html { - box-sizing: border-box; - min-height: 100%; - height: 100%; - color: white; -} - -body { - box-sizing: border-box; - margin: 0; - padding: 0; - overflow: hidden; - min-height: 100%; -} - -.errors { - color: black; - background: white; -} - -/* Make scroll bars small and blue on Chrome */ -::-webkit-scrollbar { - height: 5px; - width: 5px; -} -::-webkit-scrollbar-track { -} -::-webkit-scrollbar-thumb { - background: #61AFEF; -} - -.touchLabel { - display: block; - position: relative; - margin: 10px 0; - padding-left: 5vmin; - font-size: 4vmin; - cursor: pointer; -} - -.touchLabel::before, .touchLabel::after { - position: absolute; - top: 0; - left: 0; - content: ''; -} - -.touchLabel::before { - display: block; - width: 3.5vmin; - height: 3.5vmin; - border: 0.5vmin solid white; - margin: 0; - padding: 0; -} - -.touchLabel::after { - display: none; - width: 2vmin; - height: 2vmin; - margin: 0; - padding: 0; - top: 0.75vmin; - left: 0.75vmin; - background-color: #61AFEF; -} - -.touchRadioButton + .touchLabel::before, -.touchRadioButton + .touchLabel::after { - border-radius: 50%; -} - -.touchCheckBox, .touchRadioButton { - position: absolute; - left: -999px; -} - -input:focus + .touchLabel::before { - border-color: #61AFEF; -} - -input:checked + .touchLabel::after { - display: block; -} - -.touchButton { - appearance: none; - border: 2px solid white; - background-color: #61AFEF; - cursor: pointer; - word-wrap: break-word; -} - -.unselectable { - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - -webkit-user-drag: none; -} - -.comicPage { - pointer-events: none; - width: 100%; - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - -webkit-user-drag: none; -} - -.comicPreviewPortrait { - border: 1px solid #ABB2BF; - margin: 10px; - height: auto; - width: 8vw; - min-width: 100px; -} - -.comicPreviewLandscape { - border: 1px solid #ABB2BF; - margin: 10px; - margin-left: 21px; - margin-right: 21px; - height: auto; - width: 16vw; - min-width: 200px; -} - -.comicPreviewBox { - box-sizing: border-box; - overflow: hidden; - float: left; - height: 17vw; - min-height: 230px; - font-size: 3vmin; - color: #ABB2BF; -} - -.comicPreviewBoxSelected { - background-color: #61AFEF; - color: black; -} - -.menuWithGlow { - box-shadow: 0px 0px 10vh DeepSkyBlue; -} - -#welcomeScreen { - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; - z-index: 4000; - display: flex; - text-align: center; - justify-content: center; - align-items: center; - color: black; - font-size: 7vmin; - line-height: 10vmin; - background-color: grey; -} - -#welcomeScreen button { - font-size: 7vmin; - line-height: 10vmin; -} - -#welcomeScreen footer { - font-size: 4vmin; - line-height: 10vmin; -} - -@media (max-width: 379px) { - #welcomeScreen { - font-size: 14px; - } - - #welcomeScreen button { - font-size: 14px; - } - - #welcomeScreen footer { - font-size: 14px; - } -} - -#lblTotalUsersOnline { - position: absolute; - left: 0; - margin-top: -20px; - padding-left: 20px; -} - -#wallPaper { - background-color: silver; - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; -} - -#topMenu { - box-sizing: border-box; - opacity: 0.9; - position: fixed; - width: 100%; - top: 0px; - z-index: 1000; - margin: 0px; - padding: 0px; - text-align: center; -} - -#topMenuPanel { - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #61AFEF; - border-top: 0px; - margin: 0px; - padding: 0px; - background-color: rgba(0, 0, 0, 0.6); - text-align: center; -} - -#topMenuButtons { - box-sizing: border-box; - overflow: hidden; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; -} - -@media (min-width: 1px) and (max-width: 379px) { - #topMenuButtons button { - width: 100%; - height: 40px; - font-size: 18px; - } -} -@media (min-width: 380px) and (max-width: 900px) { - #topMenuButtons button { - width: 20%; - font-size: 5vw; - } -} -@media (min-width: 901px) { - #topMenuButtons button { - width: 18%; - height: 180px; - font-size: 46px; - margin: 1%; - } -} - -#settingsMenu { - text-align: left; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - clear: both; - border: 1px solid #ABB2BF; -} - -#settingsMenu label, #settingsMenu span, #settingsMenu button { - font-size: 4vmin; -} - -@media (min-width: 1px) and (max-width: 379px) { - #settingsMenu p { - magin: 0px; - padding: 0px; - } - - #settingsMenu label, #settingsMenu span { - display: block; - } -} - -#libraryMenu { - height: 400px; - overflow: hidden; - overflow-y: scroll; - clear: both; - border: 1px solid #ABB2BF; -} - -#bottomMenu { - box-sizing: border-box; - display: flex; - flex-direction: column; - flex-wrap: nowrap; - justify-content: flex-start; - opacity: 0.9; - position: fixed; - bottom: 0px; - width: 100%; - height: calc(100% - 200px); - min-height: 100px; - z-index: 1000; - margin: 0px; - padding: 0px; - text-align: center; -} - -#bottomMenuPanel { - box-sizing: border-box; - overflow-y: scroll; - width: 100%; - height: 100%; - margin: 0px; - padding: 0px; - background-color: rgba(0, 0, 0, 0.6); - text-align: center; -} - -#fileInput { - display: none; -} - -#comicPanel { - box-sizing: border-box; - overflow: hidden; - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; -} - -#comicPanel img { - pointer-events: none; - width: 100%; - height: auto; -} - -#horizontalScroller { - box-sizing: border-box; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - justify-content: flex-start; - align-items: stretch; - height: 100%; -} - -.verticalScroller { - box-sizing: border-box; - overflow: hidden; - overflow-y: scroll; - flex: none; - width: 100%; -} - -#overlayPageNumber { - pointer-events: none; - position: fixed; - top: 0px; - left: 0px; - z-index: 500; - color: DeepSkyBlue; - font-size: 5vw; - text-shadow: 4px 4px 20px black; - opacity: 0.5; -} - -#loadingProgress { - pointer-events: none; - position: fixed; - top: 0px; - right: 0px; - z-index: 500; - color: DeepSkyBlue; - font-size: 5vw; - text-shadow: 4px 4px 20px black; - opacity: 0.5; -} diff --git a/test_files_bad/archive_corrupt_header.cbz b/test/test_files_bad/archive_corrupt_header.cbz similarity index 100% rename from test_files_bad/archive_corrupt_header.cbz rename to test/test_files_bad/archive_corrupt_header.cbz diff --git a/test_files_bad/archive_many_text_files_one_image.cbz b/test/test_files_bad/archive_many_text_files_one_image.cbz similarity index 100% rename from test_files_bad/archive_many_text_files_one_image.cbz rename to test/test_files_bad/archive_many_text_files_one_image.cbz diff --git a/test_files_bad/archive_no_files.cbz b/test/test_files_bad/archive_no_files.cbz similarity index 100% rename from test_files_bad/archive_no_files.cbz rename to test/test_files_bad/archive_no_files.cbz diff --git a/test_files_bad/archive_only_text_files.cbz b/test/test_files_bad/archive_only_text_files.cbz similarity index 100% rename from test_files_bad/archive_only_text_files.cbz rename to test/test_files_bad/archive_only_text_files.cbz diff --git a/test_files_bad/images_all_are_corrupt.cbz b/test/test_files_bad/images_all_are_corrupt.cbz similarity index 100% rename from test_files_bad/images_all_are_corrupt.cbz rename to test/test_files_bad/images_all_are_corrupt.cbz diff --git a/test_files_bad/images_all_are_one_pixel.cbz b/test/test_files_bad/images_all_are_one_pixel.cbz similarity index 100% rename from test_files_bad/images_all_are_one_pixel.cbz rename to test/test_files_bad/images_all_are_one_pixel.cbz diff --git a/test_files_bad/images_all_are_zero_length.cbz b/test/test_files_bad/images_all_are_zero_length.cbz similarity index 100% rename from test_files_bad/images_all_are_zero_length.cbz rename to test/test_files_bad/images_all_are_zero_length.cbz diff --git a/test_files_bad/images_middle_is_corrupt.cbz b/test/test_files_bad/images_middle_is_corrupt.cbz similarity index 100% rename from test_files_bad/images_middle_is_corrupt.cbz rename to test/test_files_bad/images_middle_is_corrupt.cbz diff --git a/test_files_good/example.cbr b/test/test_files_good/example.cbr similarity index 100% rename from test_files_good/example.cbr rename to test/test_files_good/example.cbr diff --git a/test_files_good/example.cbt b/test/test_files_good/example.cbt similarity index 100% rename from test_files_good/example.cbt rename to test/test_files_good/example.cbt diff --git a/test_files_good/example.cbz b/test/test_files_good/example.cbz similarity index 100% rename from test_files_good/example.cbz rename to test/test_files_good/example.cbz diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..ec533da --- /dev/null +++ b/yarn.lock @@ -0,0 +1,7908 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/configstore@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@types/configstore/-/configstore-2.1.1.tgz#cd1e8553633ad3185c3f2f239ecff5d2643e92b6" + +"@types/debug@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-0.0.29.tgz#a1e514adfbd92f03a224ba54d693111dbf1f3754" + +"@types/events@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + +"@types/get-port@^0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@types/get-port/-/get-port-0.0.4.tgz#eb6bb7423d9f888b632660dc7d2fd3e69a35643e" + +"@types/glob@^5.0.30": + version "5.0.35" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.35.tgz#1ae151c802cece940443b5ac246925c85189f32a" + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + +"@types/mkdirp@^0.3.29": + version "0.3.29" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.3.29.tgz#7f2ad7ec55f914482fc9b1ec4bb1ae6028d46066" + +"@types/node@*": + version "9.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.1.tgz#e2d374ef15b315b48e7efc308fa1a7cd51faa06c" + +"@types/node@^7.0.11": + version "7.0.58" + resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.58.tgz#ae852120137f40a29731a559e48003bd2d5d19f7" + +"@types/tmp@^0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.0.32.tgz#0d3cb31022f8427ea58c008af32b80da126ca4e3" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +accepts@~1.3.4, accepts@~1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + dependencies: + acorn "^4.0.3" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.0, acorn@^5.5.0: + version "5.5.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" + +ajv-keywords@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + +ajv-keywords@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^5.0.0, ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +ajv@^6.1.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.4.0.tgz#d3aff78e9277549771daf0164cff48482b754fc6" + dependencies: + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + uri-js "^3.0.2" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +all-contributors-cli@^4.11.1: + version "4.11.1" + resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-4.11.1.tgz#8e4d28a69bb60006b72d53758177a0c7b8a20f19" + dependencies: + async "^2.0.0-rc.1" + chalk "^2.3.0" + inquirer "^4.0.0" + lodash "^4.11.2" + pify "^3.0.0" + request "^2.72.0" + yargs "^10.0.3" + +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + +ansi-align@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" + dependencies: + string-width "^2.0.0" + +ansi-escapes@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + +ansi-gray@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" + dependencies: + ansi-wrap "0.1.0" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +ansi-wrap@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +aproba@^1.0.3, aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +archive-type@^3.0.0, archive-type@^3.0.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-3.2.0.tgz#9cd9c006957ebe95fadad5bd6098942a813737f6" + dependencies: + file-type "^3.1.0" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-filter@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-flatten@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +array-map@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + +array-reduce@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.0, array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + +async-each-series@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-1.1.0.tgz#f42fd8155d38f21a5b8ea07c28e063ed1700b138" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.0.0-rc.1, async@^2.1.2, async@^2.4.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" + +autoprefixer@^6.3.1: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + +autoprefixer@^7.1.0: + version "7.2.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.2.6.tgz#256672f86f7c735da849c4f07d008abb056067dc" + dependencies: + browserslist "^2.11.3" + caniuse-lite "^1.0.30000805" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^6.0.17" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.2.1, aws4@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-eslint@^7.1.1: + version "7.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" + dependencies: + babel-code-frame "^6.22.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + babylon "^6.17.0" + +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + esutils "^2.0.2" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-loader@^7.0.0: + version "7.1.4" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.4.tgz#e3463938bd4e6d55d1c174c5485d406a188ed015" + dependencies: + find-cache-dir "^1.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-jsx-pragmatic@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-1.0.2.tgz#41e2beb8642235f34b2a7ab12ca39e07201b8e59" + dependencies: + babel-plugin-syntax-jsx "^6.0.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-decorators@^6.1.18: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" + +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + +babel-plugin-syntax-jsx@^6.0.0, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-class-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-decorators-legacy@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators-legacy/-/babel-plugin-transform-decorators-legacy-1.3.4.tgz#741b58f6c5bce9e6027e0882d9c994f04f366925" + dependencies: + babel-plugin-syntax-decorators "^6.1.18" + babel-runtime "^6.2.0" + babel-template "^6.3.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-assign@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-plugin-transform-react-constant-elements@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-constant-elements/-/babel-plugin-transform-react-constant-elements-6.23.0.tgz#2f119bf4d2cdd45eb9baaae574053c604f6147dd" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-remove-prop-types@^0.4.5: + version "0.4.13" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.13.tgz#331cfc05099a808238311d78319c27460d481189" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-polyfill@^6.2.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" + dependencies: + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" + +babel-preset-env@^1.3.3: + version "1.6.1" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^2.1.2" + invariant "^2.2.2" + semver "^5.3.0" + +babel-register@^6.24.1, babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.2.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0, babel-template@^6.3.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.17.0, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-js@^1.0.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801" + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + +bin-build@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-2.2.0.tgz#11f8dd61f70ffcfa2bdcaa5b46f5e8fedd4221cc" + dependencies: + archive-type "^3.0.1" + decompress "^3.0.0" + download "^4.1.2" + exec-series "^1.0.0" + rimraf "^2.2.6" + tempfile "^1.0.0" + url-regex "^3.0.0" + +bin-check@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-2.0.0.tgz#86f8e6f4253893df60dc316957f5af02acb05930" + dependencies: + executable "^1.0.0" + +bin-version-check@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-2.1.0.tgz#e4e5df290b9069f7d111324031efc13fdd11a5b0" + dependencies: + bin-version "^1.0.0" + minimist "^1.1.0" + semver "^4.0.3" + semver-truncate "^1.0.0" + +bin-version@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-1.0.4.tgz#9eb498ee6fd76f7ab9a7c160436f89579435d78e" + dependencies: + find-versions "^1.0.0" + +bin-wrapper@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-3.0.2.tgz#67d3306262e4b1a5f2f88ee23464f6a655677aeb" + dependencies: + bin-check "^2.0.0" + bin-version-check "^2.1.0" + download "^4.0.0" + each-async "^1.1.1" + lazy-req "^1.0.0" + os-filter-obj "^1.0.0" + +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + +bl@^1.0.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +body-parser@1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" + on-finished "~2.3.0" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +boom@4.x.x: + version "4.3.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + dependencies: + hoek "4.x.x" + +boom@5.x.x: + version "5.2.0" + resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + dependencies: + hoek "4.x.x" + +boxen@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" + dependencies: + ansi-align "^2.0.0" + camelcase "^4.0.0" + chalk "^2.0.1" + cli-boxes "^1.0.0" + string-width "^2.0.0" + term-size "^1.2.0" + widest-line "^2.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.0, braces@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + kind-of "^6.0.2" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + dependencies: + pako "~1.0.5" + +browserslist@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.1.4.tgz#cc526af4a1312b7d2e05653e56d0c8ab70c0e053" + dependencies: + caniuse-lite "^1.0.30000670" + electron-to-chromium "^1.3.11" + +browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + +browserslist@^2.1.2, browserslist@^2.11.3: + version "2.11.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" + dependencies: + caniuse-lite "^1.0.30000792" + electron-to-chromium "^1.3.30" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + +buffer-from@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" + +buffer-indexof@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" + +buffer-to-vinyl@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz#00f15faee3ab7a1dda2cde6d9121bffdd07b2262" + dependencies: + file-type "^3.1.0" + readable-stream "^2.0.2" + uuid "^2.0.1" + vinyl "^1.0.0" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +builtins@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +cacache@^10.0.4: + version "10.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" + dependencies: + bluebird "^3.5.1" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^2.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.2" + ssri "^5.2.4" + unique-filename "^1.1.0" + y18n "^4.0.0" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.0.0, camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caniuse-api@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" + dependencies: + browserslist "^1.3.6" + caniuse-db "^1.0.30000529" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-db@1.0.30000671: + version "1.0.30000671" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000671.tgz#9f071bbc7b96994638ccbaf47829d58a1577a8ed" + +caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: + version "1.0.30000821" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000821.tgz#3fcdc67c446a94a9cdd848248a4e3e54b2da7419" + +caniuse-lite@^1.0.30000670, caniuse-lite@^1.0.30000792, caniuse-lite@^1.0.30000805: + version "1.0.30000821" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000821.tgz#0f3223f1e048ed96451c56ca6cf197058c42cb93" + +capture-stack-trace@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +caw@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/caw/-/caw-1.2.0.tgz#ffb226fe7efc547288dc62ee3e97073c212d1034" + dependencies: + get-proxy "^1.0.1" + is-obj "^1.0.0" + object-assign "^3.0.0" + tunnel-agent "^0.4.0" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + +chokidar@^2.0.0, chokidar@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" + dependencies: + anymatch "^2.0.0" + async-each "^1.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^2.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + upath "^1.0.0" + optionalDependencies: + fsevents "^1.1.2" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +ci-info@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + +clap@^1.0.9: + version "1.2.3" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" + dependencies: + chalk "^1.1.3" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +clean-css@4.1.x: + version "4.1.11" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a" + dependencies: + source-map "0.5.x" + +cli-boxes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-spinners@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.1.0.tgz#f1847b168844d917a671eb9d147e3df497c90d06" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + +clone@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + +co@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/co/-/co-3.1.0.tgz#4ea54ea5a08938153185e15210c68d9092bc1b78" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +coa@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" + dependencies: + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.3.0, color-convert@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + dependencies: + color-name "^1.1.1" + +color-name@^1.0.0, color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + +command-exists@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.2.tgz#12819c64faf95446ec0ae07fe6cafb6eb3708b22" + +commander@2.15.x, commander@~2.15.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" + +commander@~2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + dependencies: + graceful-readlink ">= 1.0.0" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +compressible@~2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" + dependencies: + mime-db ">= 1.33.0 < 2" + +compression@^1.5.2: + version "1.7.2" + resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" + dependencies: + accepts "~1.3.4" + bytes "3.0.0" + compressible "~2.0.13" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@^1.5.0, concat-stream@^1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +configstore@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" + dependencies: + dot-prop "^4.1.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + unique-string "^1.0.0" + write-file-atomic "^2.0.0" + xdg-basedir "^3.0.0" + +connect-history-api-fallback@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-clear@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-clear/-/console-clear-1.1.0.tgz#d5d381b813c80d14d2cce169449585639d31325a" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +console-stream@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + +convert-source-map@^1.1.1, convert-source-map@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + +copy-webpack-plugin@^4.1.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz#fc4f68f4add837cc5e13d111b20715793225d29c" + dependencies: + cacache "^10.0.4" + find-cache-dir "^1.0.0" + globby "^7.1.1" + is-glob "^4.0.0" + loader-utils "^1.1.0" + minimatch "^3.0.4" + p-limit "^1.0.0" + serialize-javascript "^1.4.0" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.4.tgz#f2c8bf181f2a80b92f360121429ce63a2f0aeae0" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-error-class@^3.0.0, create-error-class@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + dependencies: + capture-stack-trace "^1.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^2.0.0" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn-promise@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/cross-spawn-promise/-/cross-spawn-promise-0.10.1.tgz#db9cb4c50c60b72a15be049b78122ce382d87b10" + dependencies: + cross-spawn "^5.1.0" + +cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cryptiles@3.x.x: + version "3.1.2" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + dependencies: + boom "5.x.x" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +crypto-random-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css-loader@^0.28.7: + version "0.28.11" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.11.tgz#c3f9864a700be2711bb5a2462b2389b1a392dab7" + dependencies: + babel-code-frame "^6.26.0" + css-selector-tokenizer "^0.7.0" + cssnano "^3.10.0" + icss-utils "^2.1.0" + loader-utils "^1.0.2" + lodash.camelcase "^4.3.0" + object-assign "^4.1.1" + postcss "^5.0.6" + postcss-modules-extract-imports "^1.2.0" + postcss-modules-local-by-default "^1.2.0" + postcss-modules-scope "^1.1.0" + postcss-modules-values "^1.3.0" + postcss-value-parser "^3.3.0" + source-list-map "^2.0.0" + +css-modules-require-hook@^4.0.6: + version "4.2.3" + resolved "https://registry.yarnpkg.com/css-modules-require-hook/-/css-modules-require-hook-4.2.3.tgz#6792ca412b15e23e6f9be6a07dcef7f577ff904d" + dependencies: + debug "^2.2.0" + generic-names "^1.0.1" + glob-to-regexp "^0.3.0" + icss-replace-symbols "^1.0.2" + lodash "^4.3.0" + postcss "^6.0.1" + postcss-modules-extract-imports "^1.0.0" + postcss-modules-local-by-default "^1.0.1" + postcss-modules-resolve-imports "^1.3.0" + postcss-modules-scope "^1.0.0" + postcss-modules-values "^1.1.1" + seekout "^1.0.1" + +css-select@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +cssnano@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +cyclist@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +dateformat@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062" + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + +decompress-tar@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-3.1.0.tgz#217c789f9b94450efaadc5c5e537978fc333c466" + dependencies: + is-tar "^1.0.0" + object-assign "^2.0.0" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-tarbz2@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz#8b23935681355f9f189d87256a0f8bdd96d9666d" + dependencies: + is-bzip2 "^1.0.0" + object-assign "^2.0.0" + seek-bzip "^1.0.3" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-targz@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-3.1.0.tgz#b2c13df98166268991b715d6447f642e9696f5a0" + dependencies: + is-gzip "^1.0.0" + object-assign "^2.0.0" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-unzip@^3.0.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-3.4.0.tgz#61475b4152066bbe3fee12f9d629d15fe6478eeb" + dependencies: + is-zip "^1.0.0" + read-all-stream "^3.0.0" + stat-mode "^0.2.0" + strip-dirs "^1.0.0" + through2 "^2.0.0" + vinyl "^1.0.0" + yauzl "^2.2.1" + +decompress@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-3.0.0.tgz#af1dd50d06e3bfc432461d37de11b38c0d991bed" + dependencies: + buffer-to-vinyl "^1.0.0" + concat-stream "^1.4.6" + decompress-tar "^3.0.0" + decompress-tarbz2 "^3.0.0" + decompress-targz "^3.0.0" + decompress-unzip "^3.0.0" + stream-combiner2 "^1.1.1" + vinyl-assign "^1.0.1" + vinyl-fs "^2.2.0" + +deep-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +del@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" + dependencies: + globby "^6.1.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + p-map "^1.1.1" + pify "^3.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +depd@~1.1.1, depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +detect-node@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" + +devcert-san@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/devcert-san/-/devcert-san-0.3.3.tgz#aa77244741b2d831771c011f22ee25e396ad4ba9" + dependencies: + "@types/configstore" "^2.1.1" + "@types/debug" "^0.0.29" + "@types/get-port" "^0.0.4" + "@types/glob" "^5.0.30" + "@types/mkdirp" "^0.3.29" + "@types/node" "^7.0.11" + "@types/tmp" "^0.0.32" + command-exists "^1.2.2" + configstore "^3.0.0" + debug "^2.6.3" + eol "^0.8.1" + get-port "^3.0.0" + glob "^7.1.1" + mkdirp "^0.5.1" + tmp "^0.0.31" + tslib "^1.6.0" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + +dns-packet@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + dependencies: + buffer-indexof "^1.0.0" + +doctrine@^2.0.2, doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + dependencies: + esutils "^2.0.2" + +dom-converter@~0.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" + dependencies: + utila "~0.3" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +dom-urls@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/dom-urls/-/dom-urls-1.1.0.tgz#001ddf81628cd1e706125c7176f53ccec55d918e" + dependencies: + urijs "^1.16.1" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" + dependencies: + domelementtype "1" + +domutils@1.1: + version "1.1.6" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-prop@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + dependencies: + is-obj "^1.0.0" + +download@^4.0.0, download@^4.1.2: + version "4.4.3" + resolved "https://registry.yarnpkg.com/download/-/download-4.4.3.tgz#aa55fdad392d95d4b68e8c2be03e0c2aa21ba9ac" + dependencies: + caw "^1.0.1" + concat-stream "^1.4.7" + each-async "^1.0.0" + filenamify "^1.0.1" + got "^5.0.0" + gulp-decompress "^1.2.0" + gulp-rename "^1.2.0" + is-url "^1.2.0" + object-assign "^4.0.1" + read-all-stream "^3.0.0" + readable-stream "^2.0.2" + stream-combiner2 "^1.1.1" + vinyl "^1.0.0" + vinyl-fs "^2.2.0" + ware "^1.2.0" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +duplexer2@^0.1.4, duplexer2@~0.1.0: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + dependencies: + readable-stream "^2.0.2" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + +duplexer@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +duplexify@^3.2.0, duplexify@^3.4.2, duplexify@^3.5.3: + version "3.5.4" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.4.tgz#4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4" + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +each-async@^1.0.0, each-async@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/each-async/-/each-async-1.1.1.tgz#dee5229bdf0ab6ba2012a395e1b869abf8813473" + dependencies: + onetime "^1.0.0" + set-immediate-shim "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +ejs-loader@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/ejs-loader/-/ejs-loader-0.3.1.tgz#280c8e030bd32428c29826f6bbf6b6d0c14f7ca4" + dependencies: + loader-utils "^0.2.7" + lodash "^3.6.0" + +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.11, electron-to-chromium@^1.3.30: + version "1.3.41" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.41.tgz#7e33643e00cd85edfd17e04194f6d00e73737235" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + dependencies: + once "^1.4.0" + +enhanced-resolve@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +eol@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/eol/-/eol-0.8.1.tgz#defc3224990c7eca73bb34461a56cf9dc24761d0" + +errno@^0.1.1, errno@^0.1.3: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.7.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.42" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.42.tgz#8c07dd33af04d5dcd1310b5cef13bea63a89ba8d" + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + next-tick "1" + +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-promise@^4.0.5: + version "4.2.4" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-synacor@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/eslint-config-synacor/-/eslint-config-synacor-1.1.2.tgz#6ffaa55b1c6a8b39efb398ade192753766a0c71e" + dependencies: + babel-eslint "^7.1.1" + eslint-plugin-compat "^1.0.0" + eslint-plugin-mocha "^4.0.0" + eslint-plugin-react "^7.0.0" + +eslint-plugin-compat@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-compat/-/eslint-plugin-compat-1.0.4.tgz#76e52038119a5080e2612cc4141d687f4d140398" + dependencies: + babel-runtime "^6.23.0" + browserslist "2.1.4" + caniuse-db "1.0.30000671" + requireindex "^1.1.0" + +eslint-plugin-mocha@^4.0.0: + version "4.12.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-4.12.1.tgz#dbacc543b178b4536ec5b19d7f8e8864d85404bf" + dependencies: + ramda "^0.25.0" + +eslint-plugin-react@^7.0.0: + version "7.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz#f606c719dbd8a1a2b3d25c16299813878cca0160" + dependencies: + doctrine "^2.0.2" + has "^1.0.1" + jsx-ast-utils "^2.0.1" + prop-types "^15.6.0" + +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + +eslint@^4.2.0: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" + dependencies: + ajv "^5.3.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^3.1.0" + doctrine "^2.1.0" + eslint-scope "^3.7.1" + eslint-visitor-keys "^1.0.0" + espree "^3.5.4" + esquery "^1.0.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.0.1" + ignore "^3.3.3" + imurmurhash "^0.1.4" + inquirer "^3.0.6" + is-resolvable "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^1.0.1" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" + strip-json-comments "~2.0.1" + table "4.0.2" + text-table "~0.2.0" + +espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" + dependencies: + acorn "^5.5.0" + acorn-jsx "^3.0.0" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + dependencies: + estraverse "^4.1.0" + +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +event-stream@~3.3.0: + version "3.3.4" + resolved "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + +eventemitter3@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +eventsource@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" + dependencies: + original ">=0.0.5" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +exec-series@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/exec-series/-/exec-series-1.0.3.tgz#6d257a9beac482a872c7783bc8615839fc77143a" + dependencies: + async-each-series "^1.1.0" + object-assign "^4.1.0" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +executable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/executable/-/executable-1.1.0.tgz#877980e9112f3391066da37265de7ad8434ab4d9" + dependencies: + meow "^3.1.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +express@^4.16.2: + version "4.16.3" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53" + dependencies: + accepts "~1.3.5" + array-flatten "1.1.1" + body-parser "1.18.2" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.1" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.3" + qs "6.5.1" + range-parser "~1.2.0" + safe-buffer "5.1.1" + send "0.16.2" + serve-static "1.13.2" + setprototypeof "1.1.0" + statuses "~1.4.0" + type-is "~1.6.16" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +external-editor@^2.0.4, external-editor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extract-text-webpack-plugin@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz#5f043eaa02f9750a9258b78c0a6e0dc1408fb2f7" + dependencies: + async "^2.4.1" + loader-utils "^1.1.0" + schema-utils "^0.3.0" + webpack-sources "^1.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +fancy-log@^1.1.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" + dependencies: + ansi-gray "^0.1.1" + color-support "^1.1.3" + time-stamp "^1.0.0" + +fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" + dependencies: + websocket-driver ">=0.5.1" + +fbjs@^0.8.16: + version "0.8.16" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +file-loader@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.11.2.tgz#4ff1df28af38719a6098093b88c82c71d1794a34" + dependencies: + loader-utils "^1.0.2" + +file-type@^3.1.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +filename-reserved-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4" + +filenamify@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5" + dependencies: + filename-reserved-regex "^1.0.0" + strip-outer "^1.0.0" + trim-repeated "^1.0.0" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +finalhandler@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.4.0" + unpipe "~1.0.0" + +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +find-versions@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-1.2.1.tgz#cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62" + dependencies: + array-uniq "^1.0.0" + get-stdin "^4.0.1" + meow "^3.5.0" + semver-regex "^1.0.0" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flat-cache@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +flush-write-stream@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.4" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +form-data@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + dependencies: + asynckit "^0.4.0" + combined-stream "1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +from@~0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.promised@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/fs.promised/-/fs.promised-3.0.0.tgz#ab77379f7c1ad0939e1262a8c2ced93fa6c39d3b" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.39" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +generic-names@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-1.0.3.tgz#2d786a121aee508876796939e8e3bff836c20917" + dependencies: + loader-utils "^0.2.16" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-port@^3.0.0, get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + +get-proxy@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-1.1.0.tgz#894854491bc591b0f147d7ae570f5c678b7256eb" + dependencies: + rc "^1.1.2" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +gittar@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/gittar/-/gittar-0.1.0.tgz#49313ad1223e474b04c36b2cb06354bc5ab6b9b0" + dependencies: + mkdirp "^0.5.1" + tar "^3.1.9" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.0.0, glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-stream@^5.3.2: + version "5.3.5" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22" + dependencies: + extend "^3.0.0" + glob "^5.0.3" + glob-parent "^3.0.0" + micromatch "^2.3.7" + ordered-read-streams "^0.3.0" + through2 "^0.6.0" + to-absolute-glob "^0.1.1" + unique-stream "^2.0.2" + +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + +glob@^5.0.3: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-dirs@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" + dependencies: + ini "^1.3.4" + +globals@^11.0.1: + version "11.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.4.0.tgz#b85c793349561c16076a3c13549238a27945f1bc" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + +glogg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810" + dependencies: + sparkles "^1.0.0" + +got@^5.0.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/got/-/got-5.7.1.tgz#5f81635a61e4a6589f180569ea4e381680a51f35" + dependencies: + create-error-class "^3.0.1" + duplexer2 "^0.1.4" + is-redirect "^1.0.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + lowercase-keys "^1.0.0" + node-status-codes "^1.0.0" + object-assign "^4.0.1" + parse-json "^2.1.0" + pinkie-promise "^2.0.0" + read-all-stream "^3.0.0" + readable-stream "^2.0.5" + timed-out "^3.0.0" + unzip-response "^1.0.2" + url-parse-lax "^1.0.0" + +got@^6.7.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" + dependencies: + create-error-class "^3.0.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-redirect "^1.0.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + lowercase-keys "^1.0.0" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + unzip-response "^2.0.1" + url-parse-lax "^1.0.0" + +graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +gulp-decompress@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gulp-decompress/-/gulp-decompress-1.2.0.tgz#8eeb65a5e015f8ed8532cafe28454960626f0dc7" + dependencies: + archive-type "^3.0.0" + decompress "^3.0.0" + gulp-util "^3.0.1" + readable-stream "^2.0.2" + +gulp-rename@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" + +gulp-sourcemaps@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c" + dependencies: + convert-source-map "^1.1.1" + graceful-fs "^4.1.2" + strip-bom "^2.0.0" + through2 "^2.0.0" + vinyl "^1.0.0" + +gulp-util@^3.0.1: + version "3.0.8" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +handle-thing@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +has-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hash-base@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + dependencies: + inherits "^2.0.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hawk@3.1.3, hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hawk@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + dependencies: + boom "4.x.x" + cryptiles "3.x.x" + hoek "4.x.x" + sntp "2.x.x" + +he@1.1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hoek@4.x.x: + version "4.2.1" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.6.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + +html-entities@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + +html-minifier@^3.2.3: + version "3.5.12" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.12.tgz#6bfad4d0327f5b8d2b62f5854654ac3703b9b031" + dependencies: + camel-case "3.0.x" + clean-css "4.1.x" + commander "2.15.x" + he "1.1.x" + ncname "1.0.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.3.x" + +html-webpack-exclude-assets-plugin@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/html-webpack-exclude-assets-plugin/-/html-webpack-exclude-assets-plugin-0.0.5.tgz#41af65003f37ef333f044f49e6ada8a4d3f82959" + +html-webpack-plugin@^2.28.0: + version "2.30.1" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz#7f9c421b7ea91ec460f56527d78df484ee7537d5" + dependencies: + bluebird "^3.4.7" + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + toposort "^1.0.0" + +htmlparser2@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" + dependencies: + domelementtype "1" + domhandler "2.1" + domutils "1.1" + readable-stream "1.0" + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + +http-errors@1.6.2, http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-parser-js@>=0.4.0: + version "0.4.11" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.11.tgz#5b720849c650903c27e521633d94696ee95f3529" + +http-proxy-middleware@~0.17.4: + version "0.17.4" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" + dependencies: + http-proxy "^1.16.2" + is-glob "^3.1.0" + lodash "^4.17.2" + micromatch "^2.3.11" + +http-proxy@^1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" + dependencies: + eventemitter3 "1.x.x" + requires-port "1.x.x" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + +husky@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" + dependencies: + is-ci "^1.0.10" + normalize-path "^1.0.0" + strip-indent "^2.0.0" + +iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@~0.4.13: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + +icss-replace-symbols@^1.0.2, icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + +icss-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" + dependencies: + postcss "^6.0.1" + +icss-utils@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-3.0.1.tgz#ee70d3ae8cac38c6be5ed91e851b27eed343ad0f" + dependencies: + postcss "^6.0.2" + +ieee754@^1.1.4: + version "1.1.11" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" + +if-env@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/if-env/-/if-env-1.0.4.tgz#8b2b6bd308af86a3a19bb273426761085104878b" + dependencies: + npm-run-all "1.4.0" + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + +ignore@^3.3.3, ignore@^3.3.5, ignore@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" + +image-size@~0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + +immutability-helper@^2.1.2: + version "2.6.6" + resolved "https://registry.yarnpkg.com/immutability-helper/-/immutability-helper-2.6.6.tgz#9b384c240d65257133c155086e16f678ca563b05" + dependencies: + invariant "^2.2.0" + +import-lazy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + +import-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4, ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +inquirer@^3.0.6, inquirer@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +inquirer@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-4.0.2.tgz#cc678b4cbc0e183a3500cc63395831ec956ab0a3" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.1.0" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +internal-ip@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" + dependencies: + meow "^3.3.0" + +interpret@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" + +invariant@^2.2.0, invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +ip-regex@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd" + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + +ipaddr.js@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b" + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + +is-absolute@^0.1.5: + version "0.1.7" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.1.7.tgz#847491119fccb5fb436217cc737f7faad50f603f" + dependencies: + is-relative "^0.1.0" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-bzip2@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-bzip2/-/is-bzip2-1.0.0.tgz#5ee58eaa5a2e9c80e21407bedf23ae5ac091b3fc" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-ci@^1.0.10: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" + dependencies: + ci-info "^1.0.0" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + dependencies: + is-extglob "^2.1.1" + +is-gzip@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83" + +is-installed-globally@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" + dependencies: + global-dirs "^0.1.0" + is-path-inside "^1.0.0" + +is-natural-number@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-2.1.1.tgz#7d4c5728377ef386c3e194a9911bf57c6dc335e7" + +is-npm@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-odd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" + dependencies: + is-number "^4.0.0" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + dependencies: + path-is-inside "^1.0.1" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-redirect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-relative@^0.1.0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.1.3.tgz#905fee8ae86f45b3ec614bc3c15c869df0876e82" + +is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + +is-retry-allowed@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-tar@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-tar/-/is-tar-1.0.0.tgz#2f6b2e1792c1f5bb36519acaa9d65c0d26fe853d" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-url@^1.2.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-valid-glob@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + +is-zip@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-zip/-/is-zip-1.0.0.tgz#47b0a8ff4d38a76431ccfd99a8e15a4c86ba2325" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +isomorphic-unfetch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-2.0.0.tgz#f50140a4c163d7582b5f37f1591968c4f809a645" + dependencies: + node-fetch "^1.7.1" + unfetch "^3.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +js-base64@^2.1.9: + version "2.4.3" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.4.3, js-yaml@^3.9.1: + version "3.11.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +jsx-ast-utils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" + dependencies: + array-includes "^3.0.3" + +killable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + +latest-version@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" + dependencies: + package-json "^4.0.0" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lazy-req@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-1.1.0.tgz#bdaebead30f8d824039ce0ce149d4daa07ba1fac" + +lazystream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" + dependencies: + readable-stream "^2.0.5" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +less-loader@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-4.1.0.tgz#2c1352c5b09a4f84101490274fd51674de41363e" + dependencies: + clone "^2.1.1" + loader-utils "^1.1.0" + pify "^3.0.0" + +less@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/less/-/less-3.0.1.tgz#ba2fea24a5632ccb8c84230d6043c0bf91855e37" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + mime "^1.4.1" + mkdirp "^0.5.0" + promise "^7.1.1" + request "2.81.0" + source-map "^0.5.3" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@^0.2.16, loader-utils@^0.2.7: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + +lodash.defaults@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.template@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +lodash@^3.6.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.11.2, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + +log-symbols@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + dependencies: + chalk "^2.0.1" + +logalot@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" + dependencies: + figures "^1.3.5" + squeak "^1.0.0" + +loglevel@^1.4.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" + +longest@^1.0.0, longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0, loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + +lowercase-keys@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + +lpad-align@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e" + dependencies: + get-stdin "^4.0.1" + indent-string "^2.1.0" + longest "^1.0.0" + meow "^3.3.0" + +lru-cache@^4.0.1, lru-cache@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +macaddress@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" + +make-dir@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" + dependencies: + pify "^3.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + +math-expression-evaluator@^1.2.14: + version "1.2.17" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +memory-fs@^0.4.0, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.1.0, meow@^3.3.0, meow@^3.5.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +merge-stream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^2.3.11, micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + +mime@1.3.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +mime@^1.4.1, mime@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minipass@^2.0.2, minipass@^2.2.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40" + dependencies: + safe-buffer "^5.1.1" + yallist "^3.0.0" + +minizlib@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mississippi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^2.0.1" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +mri@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.0.tgz#5c0a3f29c8ccffbbb1ec941dcec09d71fa32f36a" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + +multicast-dns@^6.0.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" + dependencies: + dns-packet "^1.3.1" + thunky "^1.0.2" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + +nan@^2.3.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + +nanomatch@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-odd "^2.0.0" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +ncname@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c" + dependencies: + xml-char-classes "^1.0.0" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +neo-async@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f" + +next-tick@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + dependencies: + lower-case "^1.1.1" + +node-fetch@^1.0.1, node-fetch@^1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-forge@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300" + +node-libs-browser@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.0" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-pre-gyp@^0.6.39: + version "0.6.39" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" + dependencies: + detect-libc "^1.0.2" + hawk "3.1.3" + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +node-status-codes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +npm-run-all@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-1.4.0.tgz#a469bb9feabe5bf3aa9916833baf6776582e8948" + dependencies: + babel-polyfill "^6.2.0" + minimatch "^3.0.0" + ps-tree "^1.0.1" + shell-quote "^1.4.3" + which "^1.2.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1, oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-keys@^1.0.11, object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + +object.assign@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + +obuf@^1.0.0, obuf@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + +opn@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" + dependencies: + is-wsl "^1.1.0" + +optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +ora@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-1.4.0.tgz#884458215b3a5d4097592285f93321bb7a79e2e5" + dependencies: + chalk "^2.1.0" + cli-cursor "^2.1.0" + cli-spinners "^1.0.1" + log-symbols "^2.1.0" + +ordered-read-streams@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b" + dependencies: + is-stream "^1.0.1" + readable-stream "^2.0.1" + +original@>=0.0.5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b" + dependencies: + url-parse "1.0.x" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + +os-filter-obj@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-1.0.3.tgz#5915330d90eced557d2d938a31c6dd214d9c63ad" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.0.0, p-limit@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + +package-json@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" + dependencies: + got "^6.7.1" + registry-auth-token "^3.0.1" + registry-url "^3.0.3" + semver "^5.1.0" + +pako@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" + +parallel-transform@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + dependencies: + cyclist "~0.2.2" + inherits "^2.0.3" + readable-stream "^2.1.5" + +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.1.0, parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1, path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-to-regexp@^1.0.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + dependencies: + isarray "0.0.1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + dependencies: + through "~2.3" + +pbkdf2@^3.0.3: + version "3.0.14" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + +persist-path@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/persist-path/-/persist-path-1.0.2.tgz#b7b9475365b5ccf038aafa55af12b0dd8c418d7a" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + +portfinder@^1.0.9: + version "1.0.13" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" + dependencies: + async "^1.5.2" + debug "^2.2.0" + mkdirp "0.5.x" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-filter-plugins@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" + dependencies: + postcss "^5.0.4" + uniqid "^4.0.0" + +postcss-load-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + +postcss-loader@^2.0.6: + version "2.1.3" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.3.tgz#eb210da734e475a244f76ccd61f9860f5bb3ee09" + dependencies: + loader-utils "^1.1.0" + postcss "^6.0.0" + postcss-load-config "^1.2.0" + schema-utils "^0.4.0" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-modules-extract-imports@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" + dependencies: + postcss "^6.0.1" + +postcss-modules-extract-imports@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" + dependencies: + postcss "^6.0.1" + +postcss-modules-local-by-default@^1.0.1, postcss-modules-local-by-default@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-resolve-imports@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-resolve-imports/-/postcss-modules-resolve-imports-1.3.0.tgz#398d3000b95ae969420cdf4cd83fa8067f1c5eae" + dependencies: + css-selector-tokenizer "^0.7.0" + icss-utils "^3.0.1" + minimist "^1.2.0" + +postcss-modules-scope@^1.0.0, postcss-modules-scope@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-values@^1.1.1, postcss-modules-values@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^6.0.1" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: + version "5.2.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.17, postcss@^6.0.2: + version "6.0.21" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.21.tgz#8265662694eddf9e9a5960db6da33c39e4cd069d" + dependencies: + chalk "^2.3.2" + source-map "^0.6.1" + supports-color "^5.3.0" + +preact-cli@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/preact-cli/-/preact-cli-2.2.1.tgz#05a3311e89bdb120a5273532c77b87bdd710e04b" + dependencies: + autoprefixer "^7.1.0" + babel-loader "^7.0.0" + babel-plugin-jsx-pragmatic "^1.0.2" + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-plugin-transform-class-properties "^6.24.1" + babel-plugin-transform-decorators-legacy "^1.3.4" + babel-plugin-transform-export-extensions "^6.22.0" + babel-plugin-transform-object-assign "^6.22.0" + babel-plugin-transform-object-rest-spread "^6.26.0" + babel-plugin-transform-react-constant-elements "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-remove-prop-types "^0.4.5" + babel-preset-env "^1.3.3" + babel-register "^6.24.1" + bluebird "^3.5.0" + chalk "^2.1.0" + console-clear "^1.0.0" + copy-webpack-plugin "^4.1.0" + cross-spawn-promise "^0.10.1" + css-loader "^0.28.7" + css-modules-require-hook "^4.0.6" + devcert-san "^0.3.3" + ejs-loader "^0.3.0" + extract-text-webpack-plugin "^3.0.0" + file-loader "^0.11.1" + fs.promised "^3.0.0" + get-port "^3.1.0" + gittar "^0.1.0" + glob "^7.1.2" + html-webpack-exclude-assets-plugin "0.0.5" + html-webpack-plugin "^2.28.0" + inquirer "^3.3.0" + ip "^1.1.5" + isomorphic-unfetch "^2.0.0" + json-loader "^0.5.4" + loader-utils "^1.1.0" + log-symbols "^2.1.0" + minimatch "^3.0.3" + ora "^1.2.0" + persist-path "^1.0.1" + postcss-loader "^2.0.6" + preact "^8.1.0" + preact-compat "^3.14.3" + preact-render-to-string "^3.6.0" + preact-router "^2.5.2" + progress-bar-webpack-plugin "^1.9.3" + promise-polyfill "^6.0.2" + raw-loader "^0.5.1" + require-relative "^0.8.7" + rimraf "^2.6.1" + script-ext-html-webpack-plugin "^1.8.0" + simplehttp2server "^2.0.0" + source-map "^0.5.6" + stack-trace "0.0.10" + style-loader "^0.18.2" + sw-precache-webpack-plugin "^0.11.2" + tmp "0.0.31" + unfetch "^3.0.0" + update-notifier "^2.3.0" + url-loader "^0.5.8" + validate-npm-package-name "^3.0.0" + webpack "^3.7.0" + webpack-dev-server "^2.9.0" + webpack-merge "^4.1.0" + webpack-plugin-replace "^1.1.1" + which "^1.2.14" + yargs "^8.0.1" + +preact-compat@^3.14.3, preact-compat@^3.18.0: + version "3.18.0" + resolved "https://registry.yarnpkg.com/preact-compat/-/preact-compat-3.18.0.tgz#ca430cc1f67193fb9feaf7c510832957b2ebe701" + dependencies: + immutability-helper "^2.1.2" + preact-render-to-string "^3.6.0" + preact-transition-group "^1.1.0" + prop-types "^15.5.8" + standalone-react-addons-pure-render-mixin "^0.1.1" + +preact-render-to-string@^3.6.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-3.7.0.tgz#7db4177454bc01395e0d01d6ac07bc5e838e31ee" + dependencies: + pretty-format "^3.5.1" + +preact-router@^2.5.2, preact-router@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/preact-router/-/preact-router-2.6.0.tgz#55f7fbc84e6b8af0df3ea04c8ce4c268714089b6" + +preact-transition-group@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/preact-transition-group/-/preact-transition-group-1.1.1.tgz#f0a49327ea515ece34ea2be864c4a7d29e5d6e10" + +preact@^8.1.0, preact@^8.2.7: + version "8.2.7" + resolved "https://registry.yarnpkg.com/preact/-/preact-8.2.7.tgz#316249fb678cd5e93e7cee63cea7bfb62dbd6814" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +prepend-http@^1.0.0, prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +prettier@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" + +pretty-bytes@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + dependencies: + renderkid "^2.0.1" + utila "~0.4" + +pretty-format@^3.5.1: + version "3.8.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385" + +pretty-quick@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.4.1.tgz#9d41f778d2d4d940ec603d1293a0998e84c4722c" + dependencies: + chalk "^2.3.0" + execa "^0.8.0" + find-up "^2.1.0" + ignore "^3.3.7" + mri "^1.1.0" + +private@^0.1.6, private@^0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +progress-bar-webpack-plugin@^1.9.3: + version "1.11.0" + resolved "https://registry.yarnpkg.com/progress-bar-webpack-plugin/-/progress-bar-webpack-plugin-1.11.0.tgz#4f801288443c55ec029b20cbfdcbf3e1dc17f852" + dependencies: + chalk "^1.1.1" + object.assign "^4.0.1" + progress "^1.1.8" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + +promise-polyfill@^6.0.2: + version "6.1.0" + resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +prop-types@^15.5.8, prop-types@^15.6.0: + version "15.6.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +proxy-addr@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.6.0" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + +ps-tree@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014" + dependencies: + event-stream "~3.3.0" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +pump@^2.0.0, pump@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" + dependencies: + duplexify "^3.5.3" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +punycode@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + +q@^1.1.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + +qs@6.5.1, qs@~6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +query-string@^4.1.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +querystringify@0.0.x: + version "0.0.4" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" + +querystringify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" + +ramda@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@^1.0.3, range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" + dependencies: + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" + unpipe "1.0.0" + +raw-loader@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" + +rc@^1.0.1, rc@^1.1.2, rc@^1.1.6, rc@^1.1.7: + version "1.2.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.6.tgz#eb18989c6d4f4f162c399f79ddd29f3835568092" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-all-stream@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa" + dependencies: + pinkie-promise "^2.0.0" + readable-stream "^2.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.5: + version "2.3.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +readable-stream@1.0, "readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + +regenerate@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + +regenerator-runtime@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpp@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.0.1.tgz#d857c3a741dce075c2848dcb019a0a975b190d43" + +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +registry-auth-token@^3.0.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + dependencies: + rc "^1.1.6" + safe-buffer "^5.0.1" + +registry-url@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" + dependencies: + rc "^1.0.1" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +renderkid@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" + dependencies: + css-select "^1.1.0" + dom-converter "~0.1" + htmlparser2 "~3.3.0" + strip-ansi "^3.0.0" + utila "~0.3" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +request@2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +request@^2.72.0: + version "2.85.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + hawk "~6.0.2" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + stringstream "~0.0.5" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +require-relative@^0.8.7: + version "0.8.7" + resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" + +require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +requireindex@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" + +requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.6, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + dependencies: + hash-base "^2.0.0" + inherits "^2.0.1" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + dependencies: + aproba "^1.1.1" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + +safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + +sax@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +schema-utils@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" + dependencies: + ajv "^5.0.0" + +schema-utils@^0.4.0: + version "0.4.5" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + +script-ext-html-webpack-plugin@^1.8.0: + version "1.8.8" + resolved "https://registry.yarnpkg.com/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-1.8.8.tgz#faa888a286ce746fcd06a5e0a9e39ed7b9d24f66" + dependencies: + debug "^3.1.0" + +seek-bzip@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" + dependencies: + commander "~2.8.1" + +seekout@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/seekout/-/seekout-1.0.2.tgz#09ba9f1bd5b46fbb134718eb19a68382cbb1b9c9" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + +selfsigned@^1.9.1: + version "1.10.2" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.2.tgz#b4449580d99929b65b10a48389301a6592088758" + dependencies: + node-forge "0.7.1" + +semver-diff@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" + dependencies: + semver "^5.0.3" + +semver-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" + +semver-truncate@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" + dependencies: + semver "^5.3.0" + +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +semver@^4.0.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + +serialize-javascript@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005" + +serve-index@^1.7.2: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.2" + +serviceworker-cache-polyfill@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serviceworker-cache-polyfill/-/serviceworker-cache-polyfill-4.0.0.tgz#de19ee73bef21ab3c0740a37b33db62464babdeb" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.0, set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4, setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shell-quote@^1.4.3: + version "1.6.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + dependencies: + array-filter "~0.0.0" + array-map "~0.0.0" + array-reduce "~0.0.0" + jsonify "~0.0.0" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +simplehttp2server@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/simplehttp2server/-/simplehttp2server-2.0.0.tgz#f7f6421d67b40c58cde88c438ff264b2593f9217" + dependencies: + bin-build "^2.2.0" + bin-wrapper "^3.0.2" + logalot "^2.1.0" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sntp@2.x.x: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + dependencies: + hoek "4.x.x" + +sockjs-client@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.4.tgz#5babe386b775e4cf14e7520911452654016c8b12" + dependencies: + debug "^2.6.6" + eventsource "0.1.6" + faye-websocket "~0.11.0" + inherits "^2.0.1" + json3 "^3.3.2" + url-parse "^1.1.8" + +sockjs@0.3.19: + version "0.3.19" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" + dependencies: + faye-websocket "^0.10.0" + uuid "^3.0.1" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + +source-map-resolve@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" + dependencies: + atob "^2.0.0" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + dependencies: + source-map "^0.5.6" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + +spdy-transport@^2.0.18: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" + dependencies: + debug "^2.6.8" + detect-node "^2.0.3" + hpack.js "^2.1.6" + obuf "^1.1.1" + readable-stream "^2.2.9" + safe-buffer "^5.0.1" + wbuf "^1.7.2" + +spdy@^3.4.1: + version "3.4.7" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" + dependencies: + debug "^2.6.8" + handle-thing "^1.2.5" + http-deceiver "^1.2.7" + safe-buffer "^5.0.1" + select-hose "^2.0.0" + spdy-transport "^2.0.18" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + dependencies: + through "2" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +squeak@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3" + dependencies: + chalk "^1.0.0" + console-stream "^0.1.1" + lpad-align "^1.0.1" + +sshpk@^1.7.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +ssri@^5.2.4: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" + dependencies: + safe-buffer "^5.1.1" + +stack-trace@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + +standalone-react-addons-pure-render-mixin@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/standalone-react-addons-pure-render-mixin/-/standalone-react-addons-pure-render-mixin-0.1.1.tgz#3c7409f4c79c40de9ac72c616cf679a994f37551" + +stat-mode@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.3.1 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-combiner2@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + dependencies: + duplexer2 "~0.1.0" + readable-stream "^2.0.2" + +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + dependencies: + duplexer "~0.1.1" + +stream-each@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.1.tgz#d0441be1a457a73a733a8a7b53570bebd9ef66a4" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.3" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.0.tgz#384f322ee8a848e500effde99901bba849c5d403" + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +stringstream@~0.0.4, stringstream@~0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee" + dependencies: + first-chunk-stream "^1.0.0" + strip-bom "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-dirs@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-1.1.1.tgz#960bbd1287844f3975a4558aa103a8255e2456a0" + dependencies: + chalk "^1.0.0" + get-stdin "^4.0.1" + is-absolute "^0.1.5" + is-natural-number "^2.0.0" + minimist "^1.1.0" + sum-up "^1.0.1" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +strip-outer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" + dependencies: + escape-string-regexp "^1.0.2" + +style-loader@^0.18.2: + version "0.18.2" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.18.2.tgz#cc31459afbcd6d80b7220ee54b291a9fd66ff5eb" + dependencies: + loader-utils "^1.0.2" + schema-utils "^0.3.0" + +sum-up@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e" + dependencies: + chalk "^1.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.2.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + dependencies: + has-flag "^2.0.0" + +supports-color@^5.1.0, supports-color@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" + dependencies: + has-flag "^3.0.0" + +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +sw-precache-webpack-plugin@^0.11.2: + version "0.11.5" + resolved "https://registry.yarnpkg.com/sw-precache-webpack-plugin/-/sw-precache-webpack-plugin-0.11.5.tgz#9b53f65a4966e3adc298e256b3cef7a55c73fdfd" + dependencies: + del "^3.0.0" + sw-precache "^5.2.1" + uglify-es "^3.3.9" + +sw-precache@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/sw-precache/-/sw-precache-5.2.1.tgz#06134f319eec68f3b9583ce9a7036b1c119f7179" + dependencies: + dom-urls "^1.1.0" + es6-promise "^4.0.5" + glob "^7.1.1" + lodash.defaults "^4.2.0" + lodash.template "^4.4.0" + meow "^3.7.0" + mkdirp "^0.5.1" + pretty-bytes "^4.0.2" + sw-toolbox "^3.4.0" + update-notifier "^2.3.0" + +sw-toolbox@^3.4.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/sw-toolbox/-/sw-toolbox-3.6.0.tgz#26df1d1c70348658e4dea2884319149b7b3183b5" + dependencies: + path-to-regexp "^1.0.1" + serviceworker-cache-polyfill "^4.0.0" + +table@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" + dependencies: + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" + +tapable@^0.2.7: + version "0.2.8" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + +tar-pack@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar-stream@^1.1.1: + version "1.5.5" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.5.5.tgz#5cad84779f45c83b1f2508d96b09d88c7218af55" + dependencies: + bl "^1.0.0" + end-of-stream "^1.0.0" + readable-stream "^2.0.0" + xtend "^4.0.0" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +tar@^3.1.9: + version "3.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-3.2.1.tgz#9aa8e41c88f09e76c166075bc71f93d5166e61b1" + dependencies: + chownr "^1.0.1" + minipass "^2.0.2" + minizlib "^1.0.3" + mkdirp "^0.5.0" + yallist "^3.0.2" + +tempfile@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + +term-size@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" + dependencies: + execa "^0.7.0" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +through2-filter@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2@^0.6.0, through2@^0.6.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +through2@^2.0.0, through2@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@2, through@^2.3.6, through@~2.3, through@~2.3.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +thunky@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" + +time-stamp@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + +time-stamp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" + +timed-out@^3.0.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.1.3.tgz#95860bfcc5c76c277f8f8326fd0f5b2e20eba217" + +timed-out@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + +timers-browserify@^2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" + dependencies: + setimmediate "^1.0.4" + +tmp@0.0.31, tmp@^0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + +to-absolute-glob@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" + dependencies: + extend-shallow "^2.0.1" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toposort@^1.0.0: + version "1.0.6" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec" + +tough-cookie@~2.3.0, tough-cookie@~2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-repeated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" + dependencies: + escape-string-regexp "^1.0.2" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tslib@^1.6.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.4.0: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.15, type-is@~1.6.16: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +ua-parser-js@^0.7.9: + version "0.7.17" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" + +uglify-es@^3.3.9: + version "3.3.9" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + dependencies: + commander "~2.13.0" + source-map "~0.6.1" + +uglify-js@3.3.x: + version "3.3.16" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.16.tgz#23ba13efa27aa00885be7417819e8a9787f94028" + dependencies: + commander "~2.15.0" + source-map "~0.6.1" + +uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +unfetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-3.0.0.tgz#8d1e0513a4ecd0e5ff2d41a6ba77771aae8b6482" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqid@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" + dependencies: + macaddress "^0.2.8" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + +unique-filename@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" + dependencies: + imurmurhash "^0.1.4" + +unique-stream@^2.0.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369" + dependencies: + json-stable-stringify "^1.0.0" + through2-filter "^2.0.0" + +unique-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + dependencies: + crypto-random-string "^1.0.0" + +unistore@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/unistore/-/unistore-3.0.4.tgz#e7304ee8c43c3ae31751ea733ea22ab63841d672" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +unzip-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" + +unzip-response@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" + +upath@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.4.tgz#ee2321ba0a786c50973db043a50b7bcba822361d" + +update-notifier@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.4.0.tgz#f9b4c700fbfd4ec12c811587258777d563d8c866" + dependencies: + boxen "^1.2.1" + chalk "^2.0.1" + configstore "^3.0.0" + import-lazy "^2.1.0" + is-ci "^1.0.10" + is-installed-globally "^0.1.0" + is-npm "^1.0.0" + latest-version "^3.0.0" + semver-diff "^2.0.0" + xdg-basedir "^3.0.0" + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +uri-js@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa" + dependencies: + punycode "^2.1.0" + +urijs@^1.16.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.1.tgz#5b0ff530c0cbde8386f6342235ba5ca6e995d25a" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +url-loader@^0.5.8: + version "0.5.9" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.9.tgz#cc8fea82c7b906e7777019250869e569e995c295" + dependencies: + loader-utils "^1.0.2" + mime "1.3.x" + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + dependencies: + prepend-http "^1.0.1" + +url-parse@1.0.x: + version "1.0.5" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" + dependencies: + querystringify "0.0.x" + requires-port "1.0.x" + +url-parse@^1.1.8: + version "1.2.0" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.2.0.tgz#3a19e8aaa6d023ddd27dcc44cb4fc8f7fec23986" + dependencies: + querystringify "~1.0.0" + requires-port "~1.0.0" + +url-regex@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-3.2.0.tgz#dbad1e0c9e29e105dd0b1f09f6862f7fdb482724" + dependencies: + ip-regex "^1.0.1" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" + dependencies: + kind-of "^6.0.2" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3, util@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +utila@~0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" + +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + +vali-date@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6" + +validate-npm-package-license@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validate-npm-package-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" + dependencies: + builtins "^1.0.3" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + +vendors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vinyl-assign@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/vinyl-assign/-/vinyl-assign-1.2.1.tgz#4d198891b5515911d771a8cd9c5480a46a074a45" + dependencies: + object-assign "^4.0.1" + readable-stream "^2.0.0" + +vinyl-fs@^2.2.0: + version "2.4.4" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239" + dependencies: + duplexify "^3.2.0" + glob-stream "^5.3.2" + graceful-fs "^4.0.0" + gulp-sourcemaps "1.6.0" + is-valid-glob "^0.3.0" + lazystream "^1.0.0" + lodash.isequal "^4.0.0" + merge-stream "^1.0.0" + mkdirp "^0.5.0" + object-assign "^4.0.0" + readable-stream "^2.0.4" + strip-bom "^2.0.0" + strip-bom-stream "^1.0.0" + through2 "^2.0.0" + through2-filter "^2.0.0" + vali-date "^1.0.0" + vinyl "^1.0.0" + +vinyl@^0.4.3: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +ware@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ware/-/ware-1.3.0.tgz#d1b14f39d2e2cb4ab8c4098f756fe4b164e473d4" + dependencies: + wrap-fn "^0.1.0" + +watchpack@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.5.0.tgz#231e783af830a22f8966f65c4c4bacc814072eed" + dependencies: + chokidar "^2.0.2" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + +wbuf@^1.1.0, wbuf@^1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + dependencies: + minimalistic-assert "^1.0.0" + +webpack-dev-middleware@1.12.2: + version "1.12.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" + dependencies: + memory-fs "~0.4.1" + mime "^1.5.0" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + time-stamp "^2.0.0" + +webpack-dev-server@^2.9.0: + version "2.11.2" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.11.2.tgz#1f4f4c78bf1895378f376815910812daf79a216f" + dependencies: + ansi-html "0.0.7" + array-includes "^3.0.3" + bonjour "^3.5.0" + chokidar "^2.0.0" + compression "^1.5.2" + connect-history-api-fallback "^1.3.0" + debug "^3.1.0" + del "^3.0.0" + express "^4.16.2" + html-entities "^1.2.0" + http-proxy-middleware "~0.17.4" + import-local "^1.0.0" + internal-ip "1.2.0" + ip "^1.1.5" + killable "^1.0.0" + loglevel "^1.4.1" + opn "^5.1.0" + portfinder "^1.0.9" + selfsigned "^1.9.1" + serve-index "^1.7.2" + sockjs "0.3.19" + sockjs-client "1.1.4" + spdy "^3.4.1" + strip-ansi "^3.0.0" + supports-color "^5.1.0" + webpack-dev-middleware "1.12.2" + yargs "6.6.0" + +webpack-merge@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.2.tgz#5d372dddd3e1e5f8874f5bf5a8e929db09feb216" + dependencies: + lodash "^4.17.5" + +webpack-plugin-replace@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/webpack-plugin-replace/-/webpack-plugin-replace-1.1.1.tgz#9816647fefc98a7d1700f93f2b4b6f481cf20161" + +webpack-sources@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@^3.7.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +websocket-driver@>=0.5.1: + version "0.7.0" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" + dependencies: + http-parser-js ">=0.4.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" + +whatwg-fetch@>=0.10.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.0, which@^1.2.14, which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +widest-line@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" + dependencies: + string-width "^2.1.1" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-fn@^0.1.0: + version "0.1.5" + resolved "https://registry.yarnpkg.com/wrap-fn/-/wrap-fn-0.1.5.tgz#f21b6e41016ff4a7e31720dbc63a09016bdf9845" + dependencies: + co "3.1.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write-file-atomic@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xdg-basedir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + +xml-char-classes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs-parser@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" + dependencies: + camelcase "^4.1.0" + +yargs@6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@^10.0.3: + version "10.1.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" + dependencies: + cliui "^4.0.0" + decamelize "^1.1.1" + find-up "^2.1.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^8.1.0" + +yargs@^8.0.1, yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +yauzl@^2.2.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.9.1.tgz#a81981ea70a57946133883f029c5821a89359a7f" + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.0.1"