From 03c6b984455e133b70e2c3076d71ab3fb73bf1f5 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Thu, 13 Feb 2020 14:51:11 +0700 Subject: [PATCH] webp fix & edited messages & new player --- .DS_Store | Bin 10244 -> 10244 bytes package-lock.json | 12 + package.json | 2 + src/.DS_Store | Bin 10244 -> 10244 bytes src/components/wrappers.ts | 25 +- src/lib/appManagers/appDialogsManager.ts | 3 + src/lib/appManagers/appImManager.ts | 116 +++- src/lib/appManagers/appMessagesManager.ts | 57 +- src/lib/appManagers/appWebPagesManager.ts | 150 ++++ src/lib/appManagers/appWebpManager.ts | 24 +- src/lib/ckin.js | 278 ++++++++ src/lib/libwebp.js | 34 + src/lib/lottieLoader.ts | 2 +- src/lib/webp.ts | 53 ++ src/lib/webp_bad.js | 24 + src/materialize.min.js | 6 - src/materialize.scss | 42 +- src/registerServiceWorker.js | 124 ---- src/scss/components/_badges.scss | 55 -- src/scss/components/_buttons.scss | 322 --------- src/scss/components/_cards.scss | 195 ------ src/scss/components/_carousel.scss | 90 --- src/scss/components/_chips.scss | 90 --- src/scss/components/_collapsible.scss | 91 --- src/scss/components/_color-classes.scss | 32 - src/scss/components/_color-variables.scss | 370 ---------- src/scss/components/_datepicker.scss | 191 ------ src/scss/components/_dropdown.scss | 85 --- src/scss/components/_global.scss | 641 +----------------- src/scss/components/_grid.scss | 156 ----- .../components/_icons-material-design.scss | 5 - src/scss/components/_materialbox.scss | 43 -- src/scss/components/_modal.scss | 94 --- src/scss/components/_navbar.scss | 208 ------ src/scss/components/_normalize.scss | 2 +- src/scss/components/_preloader.scss | 334 --------- src/scss/components/_pulse.scss | 34 - src/scss/components/_sidenav.scss | 216 ------ src/scss/components/_slider.scss | 92 --- src/scss/components/_table_of_contents.scss | 33 - src/scss/components/_tabs.scss | 99 --- src/scss/components/_tapTarget.scss | 103 --- src/scss/components/_timepicker.scss | 183 ----- src/scss/components/_toast.scss | 58 -- src/scss/components/_tooltip.scss | 32 - src/scss/components/_transitions.scss | 13 - src/scss/components/_typography.scss | 28 +- src/scss/components/_variables.scss | 349 ---------- src/scss/components/_waves.scss | 114 ---- src/scss/components/forms/_checkboxes.scss | 200 ------ src/scss/components/forms/_file-input.scss | 44 -- src/scss/components/forms/_forms.scss | 22 - src/scss/components/forms/_input-fields.scss | 354 ---------- src/scss/components/forms/_radio-buttons.scss | 115 ---- src/scss/components/forms/_range.scss | 161 ----- src/scss/components/forms/_select.scss | 180 ----- src/scss/components/forms/_switches.scss | 89 --- src/scss/partials/_chat.scss | 40 +- src/scss/partials/_ckin.scss | 352 ++++++++++ src/scss/partials/_fonts.scss | 2 +- src/scss/partials/_mediaViewer.scss | 1 + src/scss/partials/_vars.scss | 27 - src/scss/style.scss | 9 + src/scss/tgico.scss | 2 +- tsconfig.json | 7 +- webp-hero.bundle.js | 1 - webpack.common.js | 9 +- 67 files changed, 1147 insertions(+), 5778 deletions(-) create mode 100644 src/lib/appManagers/appWebPagesManager.ts create mode 100644 src/lib/ckin.js create mode 100644 src/lib/libwebp.js create mode 100644 src/lib/webp.ts create mode 100644 src/lib/webp_bad.js delete mode 100644 src/materialize.min.js delete mode 100644 src/registerServiceWorker.js delete mode 100644 src/scss/components/_badges.scss delete mode 100644 src/scss/components/_buttons.scss delete mode 100644 src/scss/components/_cards.scss delete mode 100644 src/scss/components/_carousel.scss delete mode 100644 src/scss/components/_chips.scss delete mode 100644 src/scss/components/_collapsible.scss delete mode 100644 src/scss/components/_color-classes.scss delete mode 100644 src/scss/components/_color-variables.scss delete mode 100644 src/scss/components/_datepicker.scss delete mode 100644 src/scss/components/_dropdown.scss delete mode 100644 src/scss/components/_grid.scss delete mode 100644 src/scss/components/_icons-material-design.scss delete mode 100644 src/scss/components/_materialbox.scss delete mode 100644 src/scss/components/_modal.scss delete mode 100644 src/scss/components/_navbar.scss delete mode 100644 src/scss/components/_preloader.scss delete mode 100644 src/scss/components/_pulse.scss delete mode 100644 src/scss/components/_sidenav.scss delete mode 100644 src/scss/components/_slider.scss delete mode 100644 src/scss/components/_table_of_contents.scss delete mode 100644 src/scss/components/_tabs.scss delete mode 100644 src/scss/components/_tapTarget.scss delete mode 100644 src/scss/components/_timepicker.scss delete mode 100644 src/scss/components/_toast.scss delete mode 100644 src/scss/components/_tooltip.scss delete mode 100644 src/scss/components/_transitions.scss delete mode 100644 src/scss/components/_variables.scss delete mode 100644 src/scss/components/_waves.scss delete mode 100644 src/scss/components/forms/_checkboxes.scss delete mode 100644 src/scss/components/forms/_file-input.scss delete mode 100644 src/scss/components/forms/_forms.scss delete mode 100644 src/scss/components/forms/_input-fields.scss delete mode 100644 src/scss/components/forms/_radio-buttons.scss delete mode 100644 src/scss/components/forms/_range.scss delete mode 100644 src/scss/components/forms/_select.scss delete mode 100644 src/scss/components/forms/_switches.scss create mode 100644 src/scss/partials/_ckin.scss delete mode 100644 src/scss/partials/_vars.scss delete mode 100644 webp-hero.bundle.js diff --git a/.DS_Store b/.DS_Store index 3040d0a8105a8bb9b794b53f5c974b5a0ea359f6..2e59d17c401864589341462f97ef872caa2e17d6 100644 GIT binary patch delta 333 zcmZn(XbG6$mJU^hRb`eq)111y|ICdN7nhQ=lqlN%+RHj9hCWb`c0KgYnpz{XI( zP|A?Rki(G4ker+E;*yk;p9B==ux^)RG5&SX5mQYHnwrU;;_^%l0-LkM`4~|w3X5m&~5*Cm^`_qof$y T#0Iy`>m$*w=h_; delta 387 zcmZn(XbG6$ÄU^hRb#%3OY11y||2Ie{nh9(x~lN%+RHj9hCWb`bnvu0pmU}Gp? zC}l`u$YIE2NY2f7aY@R_PXdZ_sHV@o@bTwCM@%&-Xlf>Vipw+AD{RgZ=VL^%C@jL} z!#bdTW`<&hB2?2ow!Ue*^9^h|Toz$2rfflmVQ_MOZUN9V1_s9sll3LDEf`xF7#KPJ zg8^7vn4z2@73h}&23>{>AghQWpFt1EFJ;JMNCEmV70AnCD4y&fAisIFq!`;~c7>m8 LR1b&AS>m$*ZoO_< diff --git a/package-lock.json b/package-lock.json index ddaa345c..b44d6a2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10815,6 +10815,12 @@ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" }, + "offscreen-canvas": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/offscreen-canvas/-/offscreen-canvas-0.1.1.tgz", + "integrity": "sha512-gZYQ++TK0X9BD6bnMrgk7TGQ0TCVLP5YsCOnLaCP18WpKh3dYfkt0ma4gFhElohBizSwMzjDptam2zPxMUQ2wg==", + "dev": true + }, "on-build-webpack": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/on-build-webpack/-/on-build-webpack-0.1.0.tgz", @@ -13761,6 +13767,12 @@ "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", "dev": true }, + "webp-hero": { + "version": "0.0.0-dev.24", + "resolved": "https://registry.npmjs.org/webp-hero/-/webp-hero-0.0.0-dev.24.tgz", + "integrity": "sha512-3XG47dRMV36RFwfYLUynOiKDXuqXfQ3dz7yvqGH5VplldV0NvngQzF0qBsZ3vRQwrigekRLeX/NdNwsaGfSnPQ==", + "dev": true + }, "webpack": { "version": "4.41.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.2.tgz", diff --git a/package.json b/package.json index 26f94f72..5ebb55f2 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "leemon": "^6.2.0", "node-sass": "^4.13.0", "npm": "^6.13.4", + "offscreen-canvas": "^0.1.1", "on-build-webpack": "^0.1.0", "overlayscrollbars": "^1.10.0", "pako": "^1.0.10", @@ -53,6 +54,7 @@ "ts-loader": "^6.2.1", "typescript": "^3.7.2", "url-loader": "^2.2.0", + "webp-hero": "0.0.0-dev.24", "webpack": "^4.41.2", "webpack-cli": "^3.3.10", "webpack-merge": "^4.2.2", diff --git a/src/.DS_Store b/src/.DS_Store index d8e78fbfe58d82a99dfd4b6b22922575605fb2a9..4239302dde9dd8e62549dce0dc45f44fbda69215 100644 GIT binary patch delta 44 xcmZn(XbG6$LAU^hRb)@B|7A@<2h;trcXiHmYfY?!i{T|pcyF!_`CG5|&$4&eX* delta 227 zcmZn(XbG6$F8U^hRb&So9~A$CTg$@1cotho%C40)4nL?yTwIsStI1H)u#ac4&f zh9ZVkhIF8GF+&NERm2bsCd+^#$v{>(Lq1R}8!V>Bki}5!nUkNKl#`#tz`!5?#49)Z Si>q*KW>*lWy;YO_#T5aTmpO0% diff --git a/src/components/wrappers.ts b/src/components/wrappers.ts index 9ccdf83e..ae71ba41 100644 --- a/src/components/wrappers.ts +++ b/src/components/wrappers.ts @@ -9,6 +9,7 @@ import ProgressivePreloader from './preloader'; import LazyLoadQueue from './lazyLoadQueue'; import apiFileManager from '../lib/mtproto/apiFileManager'; import appWebpManager from '../lib/appManagers/appWebpManager'; +import {wrapPlayer} from '../lib/ckin'; export type MTDocument = { _: 'document', @@ -43,7 +44,7 @@ export type MTPhotoSize = { preloaded?: boolean // custom added }; -export function wrapVideo(this: any, doc: MTDocument, container: HTMLDivElement, message: any, justLoader = true, preloader?: ProgressivePreloader, controls = true) { +export function wrapVideo(this: any, doc: MTDocument, container: HTMLDivElement, message: any, justLoader = true, preloader?: ProgressivePreloader, controls = true, round = false) { if(!container.firstElementChild || container.firstElementChild.tagName != 'IMG') { let size = appPhotosManager.setAttachmentSize(doc, container); } @@ -62,16 +63,17 @@ export function wrapVideo(this: any, doc: MTDocument, container: HTMLDivElement, //return Promise.resolve(); if(!preloader) { - preloader = new ProgressivePreloader(container, false); + preloader = new ProgressivePreloader(container, true); } let loadVideo = () => { let promise = appDocsManager.downloadDoc(doc); - /* promise.notify = (details: {done: number, total: number}) => { + promise.notify = (details: {done: number, total: number}) => { console.log('doc download', promise, details); - preloader.setProgress(details.done); - }; */ + let percents = details.done / details.total * 100; + preloader.setProgress(percents); + }; return promise.then(blob => { if((this.peerID ? this.peerID : this.currentMessageID) != peerID) { @@ -82,15 +84,15 @@ export function wrapVideo(this: any, doc: MTDocument, container: HTMLDivElement, console.log('loaded doc:', doc, blob, container); let video = document.createElement('video'); - video.loop = controls; + /* video.loop = controls; video.autoplay = controls; if(!justLoader) { video.controls = controls; } else { video.volume = 0; - } - + } */ + video.setAttribute('message-id', '' + message.id); let source = document.createElement('source'); @@ -103,8 +105,15 @@ export function wrapVideo(this: any, doc: MTDocument, container: HTMLDivElement, } video.append(source); + container.append(video); + if(!justLoader) { + video.dataset.ckin = round ? 'circle' : 'default'; + video.dataset.overlay = '1'; + wrapPlayer(video); + } + //container.style.width = ''; //container.style.height = ''; diff --git a/src/lib/appManagers/appDialogsManager.ts b/src/lib/appManagers/appDialogsManager.ts index 700403f7..a522e4c9 100644 --- a/src/lib/appManagers/appDialogsManager.ts +++ b/src/lib/appManagers/appDialogsManager.ts @@ -300,6 +300,9 @@ export class AppDialogsManager { } else if(document.type == 'gif') { lastMessageText = 'GIF' + (lastMessage.message ? ', ' : '') + ''; found = true; + } else if(document.type == 'round') { + lastMessageText = 'Videomessage' + (lastMessage.message ? ', ' : '') + ''; + found = true; } if(found) { diff --git a/src/lib/appManagers/appImManager.ts b/src/lib/appManagers/appImManager.ts index e4adef9c..54673bef 100644 --- a/src/lib/appManagers/appImManager.ts +++ b/src/lib/appManagers/appImManager.ts @@ -23,6 +23,7 @@ import LazyLoadQueue from '../../components/lazyLoadQueue'; import { wrapDocument, wrapPhoto, wrapVideo, wrapSticker } from '../../components/wrappers'; import ProgressivePreloader from '../../components/preloader'; import { openBtnMenu } from '../../components/misc'; +import appWebPagesManager from './appWebPagesManager'; console.log('appImManager included!'); @@ -121,6 +122,8 @@ class ChatInput { captionInput?: HTMLInputElement } = {}; + public willSendWebPage: any = null; + constructor() { this.toggleEmoticons = this.pageEl.querySelector('.toggle-emoticons') as HTMLButtonElement; @@ -161,10 +164,12 @@ class ChatInput { if(this.lastUrl != url) { this.lastUrl = url; + this.willSendWebPage = null; apiManager.invokeApi('messages.getWebPage', { url: url, hash: 0 }).then((webpage: any) => { + appWebPagesManager.saveWebPage(webpage); if(this.lastUrl != url) return; //console.log(webpage); @@ -173,6 +178,7 @@ class ChatInput { appImManager.replyElements.container.classList.add('active'); appImManager.replyToMsgID = 0; appImManager.noWebPage = false; + this.willSendWebPage = webpage; }); } } @@ -405,12 +411,14 @@ class ChatInput { this.lastUrl = ''; appMessagesManager.sendText(appImManager.peerID, str, { replyToMsgID: appImManager.replyToMsgID == 0 ? undefined : appImManager.replyToMsgID, - noWebPage: appImManager.noWebPage + noWebPage: appImManager.noWebPage, + webPage: this.willSendWebPage }); appImManager.replyToMsgID = 0; appImManager.noWebPage = false; appImManager.replyElements.container.classList.remove('active'); appImManager.scroll.scrollTop = appImManager.scroll.scrollHeight; + this.willSendWebPage = null; this.messageInput.innerText = ''; this.btnSend.classList.remove('tgico-send'); @@ -470,6 +478,7 @@ export class AppImManager { private topbar: HTMLDivElement = null; private chatInput: HTMLDivElement = null; private scrolledAll: boolean; + private scrolledAllDown: boolean; public contextMenu = document.getElementById('bubble-contextmenu') as HTMLDivElement; private contextMenuPin = this.contextMenu.querySelector('.menu-pin') as HTMLDivElement; @@ -528,6 +537,21 @@ export class AppImManager { this.renderMessagesByIDs([details.messageID]); }); + $rootScope.$on('history_update', (e: CustomEvent) => { + let details = e.detail; + + if(details.mid && details.peerID == this.peerID) { + let mid = details.mid; + + let bubble = this.bubbles[mid]; + if(!bubble) return; + + let message = appMessagesManager.getMessage(mid); + //this.log('history_update', this.bubbles[mid], mid, message); + this.renderMessage(message, false, false, bubble); + } + }); + $rootScope.$on('history_multiappend', (e: CustomEvent) => { let msgIDsByPeer = e.detail; if(!(this.peerID in msgIDsByPeer)) return; @@ -581,6 +605,18 @@ export class AppImManager { } }); + $rootScope.$on('message_edit', (e: CustomEvent) => { + let {peerID, mid, id, justMedia} = e.detail; + + if(peerID != this.peerID) return; + + let bubble = this.bubbles[mid]; + if(!bubble) return; + + let message = appMessagesManager.getMessage(mid); + this.renderMessage(message, false, false, bubble); + }); + $rootScope.$on('messages_downloaded', (e: CustomEvent) => { let mid = e.detail; @@ -628,7 +664,7 @@ export class AppImManager { if(!bubble) return; - if(target.tagName == 'VIDEO' && bubble.classList.contains('round')) { + /* if(target.tagName == 'VIDEO' && bubble.classList.contains('round')) { let video = target as HTMLVideoElement; video.currentTime = 0; if(video.paused) { @@ -639,19 +675,9 @@ export class AppImManager { video.volume = 0; } return; - } - - if((target.tagName == 'IMG' && !target.classList.contains('emoji')) || target.tagName == 'VIDEO') { - let messageID = +target.getAttribute('message-id'); - let message = appMessagesManager.getMessage(messageID); - - if(!message) { - this.log.warn('no message by messageID:', messageID); - return; - } + } */ - appMediaViewer.openMedia(message, true); - } else if(target.tagName == 'DIV') { + if(target.tagName == 'DIV') { let isReplyClick = false; try { @@ -662,6 +688,18 @@ export class AppImManager { let originalMessageID = +bubble.getAttribute('data-original-mid'); this.setPeer(this.peerID, originalMessageID); } + } else if(bubble.classList.contains('round')) { + + } else if((target.tagName == 'IMG' && !target.classList.contains('emoji')) || target.tagName == 'VIDEO') { + let messageID = +target.getAttribute('message-id'); + let message = appMessagesManager.getMessage(messageID); + + if(!message) { + this.log.warn('no message by messageID:', messageID); + return; + } + + appMediaViewer.openMedia(message, true); } //console.log('chatInner click', e); @@ -838,6 +876,7 @@ export class AppImManager { this.replyElements.container.classList.remove('active'); this.replyToMsgID = 0; this.noWebPage = true; + this.chatInputC.willSendWebPage = null; }); this.popupDeleteMessage.deleteBothBtn.addEventListener('click', () => { @@ -1004,12 +1043,14 @@ export class AppImManager { let length = history.length; */ // filter negative ids - let lastBadIndex = 0; + let lastBadIndex = -1; for(let i = 0; i < history.length; ++i) { if(history[i] <= 0) lastBadIndex = i; else break; } - history = history.slice(lastBadIndex + 1); + if(lastBadIndex != -1) { + history = history.slice(lastBadIndex + 1); + } this.getHistoryTimeout = 0; @@ -1040,13 +1081,16 @@ export class AppImManager { } } + if(this.scrolledAllDown) return; + let dialog = appMessagesManager.getDialogByPeerID(this.peerID)[0]; - if(!dialog) { + /* if(!dialog) { + this.log.warn('no dialog for load history'); return; - } + } */ // if scroll down after search - if(!willLoad && history.indexOf(/* this.lastDialog */dialog.top_message) === -1) { + if(!willLoad && (!dialog || history.indexOf(/* this.lastDialog */dialog.top_message) === -1)) { let lastMsgIDs = history.slice(-10); for(let msgID of lastMsgIDs) { let bubble = this.bubbles[msgID]; @@ -1167,6 +1211,7 @@ export class AppImManager { public cleanup() { this.peerID = $rootScope.selectedPeerID = 0; this.scrolledAll = false; + this.scrolledAllDown = false; this.muted = false; if(this.lastContainerDiv) this.lastContainerDiv.remove(); @@ -1278,7 +1323,7 @@ export class AppImManager { if(lastMsgID) { this.renderMessage(appMessagesManager.getMessage(lastMsgID)); - if(lastMsgID != dialog.top_message) { + if(!dialog || lastMsgID != dialog.top_message) { this.bubbles[lastMsgID].scrollIntoView(); } else { this.scroll.scrollTop = this.scroll.scrollHeight; @@ -1372,7 +1417,7 @@ export class AppImManager { }); } - public renderMessage(message: any, reverse = false, multipleRender?: boolean) { + public renderMessage(message: any, reverse = false, multipleRender?: boolean, bubble: HTMLDivElement = null) { let peerID = this.peerID; let our = message.fromID == this.myID; @@ -1384,10 +1429,14 @@ export class AppImManager { //messageDiv.innerText = message.message; // bubble - let bubble = document.createElement('div'); - bubble.classList.add('bubble'); - - this.bubbles[+message.mid] = bubble; + if(!bubble) { + bubble = document.createElement('div'); + bubble.classList.add('bubble'); + this.bubbles[+message.mid] = bubble; + } else { + bubble.className = 'bubble'; + bubble.innerHTML = ''; + } // time section @@ -1399,6 +1448,11 @@ export class AppImManager { bubble.classList.add('channel-post'); time = formatNumber(message.views, 1) + ' ' + time; } + + if(message.edit_date) { + bubble.classList.add('is-edited'); + time = 'edited ' + time; + } let timeSpan = document.createElement('span'); timeSpan.classList.add('time'); @@ -1566,7 +1620,7 @@ export class AppImManager { if(webpage.photo && !doc) { bubble.classList.add('photo'); - appPhotosManager.savePhoto(webpage.photo); // hot-fix because no webpage manager + //appPhotosManager.savePhoto(webpage.photo); // hot-fix because no webpage manager wrapPhoto.call(this, webpage.photo, message, preview); } @@ -1640,7 +1694,7 @@ export class AppImManager { } bubble.classList.add('video'); - wrapVideo.call(this, doc, attachmentDiv, message, doc.type != 'round', null, false); + wrapVideo.call(this, doc, attachmentDiv, message, doc.type != 'round', null, false, doc.type == 'round'); break; } else { @@ -1922,8 +1976,12 @@ export class AppImManager { } // commented bot getProfile in getHistory! - if(!result.history/* .filter((id: number) => id > 0) */.length && !isBackLimit) { - this.scrolledAll = true; + if(!result.history/* .filter((id: number) => id > 0) */.length) { + if(!isBackLimit) { + this.scrolledAll = true; + } else { + this.scrolledAllDown = true; + } } //this.chatInner.innerHTML = ''; diff --git a/src/lib/appManagers/appMessagesManager.ts b/src/lib/appManagers/appMessagesManager.ts index ba19a767..346293aa 100644 --- a/src/lib/appManagers/appMessagesManager.ts +++ b/src/lib/appManagers/appMessagesManager.ts @@ -18,6 +18,7 @@ import { MTDocument } from "../../components/wrappers"; import ProgressivePreloader from "../../components/preloader"; import serverTimeManager from "../mtproto/serverTimeManager"; import apiManager from "../mtproto/apiManager"; +import appWebPagesManager from "./appWebPagesManager"; type HistoryStorage = { count: number | null, @@ -96,13 +97,13 @@ export class AppMessagesManager { $rootScope.$on('webpage_updated', (e: CustomEvent) => { let eventData = e.detail; - eventData.msgs((msgID: number) => { + eventData.msgs.forEach((msgID: number) => { var historyMessage = this.messagesForHistory[msgID]; if(historyMessage) { - /* historyMessage.media = { + historyMessage.media = { _: 'messageMediaWebPage', - webpage: AppWebPagesManager.wrapForHistory(eventData.id) - }; */ // warning + webpage: appWebPagesManager.wrapForHistory(eventData.id) + }; $rootScope.$broadcast('message_edit', { peerID: this.getMessagePeer(historyMessage), @@ -162,7 +163,17 @@ export class AppMessagesManager { return sendEntites; } - public sendText(peerID: number, text: string, options: any = {}) { + public sendText(peerID: number, text: string, options: { + entities?: any[], + replyToMsgID?: number, + viaBotID?: number, + queryID?: number, + resultID?: number, + noWebPage?: boolean, + reply_markup?: any, + clearDraft?: boolean, + webPage?: any + } = {}) { if(typeof(text) != 'string') { return; } @@ -235,6 +246,13 @@ export class AppMessagesManager { pending: true }; + if(options.webPage) { + message.media = { + _: 'messageMediaWebPage', + webpage: options.webPage + }; + } + var toggleError = (on: any) => { var historyMessage = this.messagesForHistory[messageID]; if(on) { @@ -954,7 +972,10 @@ export class AppMessagesManager { }).then(this.applyConversations.bind(this)); } - public saveMessages(apiMessages: any[], options: any = {}) { + public saveMessages(apiMessages: any[], options: { + isNew?: boolean, + isEdited?: boolean + } = {}) { apiMessages.forEach((apiMessage) => { if(apiMessage.pFlags === undefined) { apiMessage.pFlags = {}; @@ -1049,15 +1070,12 @@ export class AppMessagesManager { } break; case 'messageMediaWebPage': - if(apiMessage.media.webpage.document) { + /* if(apiMessage.media.webpage.document) { appDocsManager.saveDoc(apiMessage.media.webpage.document, mediaContext); - } - //AppWebPagesManager.saveWebPage(apiMessage.media.webpage, apiMessage.mid, mediaContext); - break; - /*case 'messageMediaWebPage': - AppWebPagesManager.saveWebPage(apiMessage.media.webpage, apiMessage.mid, mediaContext); + } */ + appWebPagesManager.saveWebPage(apiMessage.media.webpage, apiMessage.mid, mediaContext); break; - case 'messageMediaGame': + /*case 'messageMediaGame': AppGamesManager.saveGame(apiMessage.media.game, apiMessage.mid, mediaContext); apiMessage.media.handleMessage = true; break; */ @@ -2198,7 +2216,7 @@ export class AppMessagesManager { if(randomID) { if(pendingMessage = this.finalizePendingMessage(randomID, message)) { - $rootScope.$broadcast('history_update', {peerID: peerID}); + $rootScope.$broadcast('history_update', {peerID: peerID, mid: message.mid}); } delete this.pendingByMessageID[message.mid]; @@ -2362,7 +2380,7 @@ export class AppMessagesManager { var dialog = this.getDialogByPeerID(peerID)[0]; var isTopMessage = dialog && dialog.top_message == mid; - if(message.clear_history) { + if(message.clear_history) { // that's will never happen if(isTopMessage) { $rootScope.$broadcast('dialog_flush', {peerID: peerID}); } else { @@ -2374,7 +2392,8 @@ export class AppMessagesManager { $rootScope.$broadcast('message_edit', { peerID: peerID, id: message.id, - mid: mid + mid: mid, + justMedia: false }); if(isTopMessage) { @@ -2773,16 +2792,16 @@ export class AppMessagesManager { ) break - /* case 'messageMediaWebPage': + case 'messageMediaWebPage': if(!message.media.webpage || message.media.webpage._ == 'webPageEmpty') { delete message.media break } - message.media.webpage = AppWebPagesManager.wrapForHistory(message.media.webpage.id) + message.media.webpage = appWebPagesManager.wrapForHistory(message.media.webpage.id) break - case 'messageMediaGame': + /*case 'messageMediaGame': message.media.game = AppGamesManager.wrapForHistory(message.media.game.id) break */ } diff --git a/src/lib/appManagers/appWebPagesManager.ts b/src/lib/appManagers/appWebPagesManager.ts new file mode 100644 index 00000000..b8d35f69 --- /dev/null +++ b/src/lib/appManagers/appWebPagesManager.ts @@ -0,0 +1,150 @@ +import { $rootScope, safeReplaceObject, templateUrl, calcImageInBox, encodeEntities, copy } from "../utils"; +import appPhotosManager from "./appPhotosManager"; +import appDocsManager from "./appDocsManager"; +import { RichTextProcessor } from "../richtextprocessor"; + +class AppWebPagesManager { + webpages: any = {}; + pendingWebPages: any = {}; + + constructor() { + $rootScope.$on('apiUpdate', (e: CustomEvent) => { + let update = e.detail; + + switch (update._) { + case 'updateWebPage': + this.saveWebPage(update.webpage) + break + } + }) + } + + saveWebPage(apiWebPage: any, messageID?: number, mediaContext?: any) { + if (apiWebPage.photo && apiWebPage.photo._ === 'photo') { + appPhotosManager.savePhoto(apiWebPage.photo, mediaContext) + } else { + delete apiWebPage.photo + } + if (apiWebPage.document && apiWebPage.document._ === 'document') { + appDocsManager.saveDoc(apiWebPage.document, mediaContext) + } else { + if (apiWebPage.type == 'document') { + delete apiWebPage.type + } + delete apiWebPage.document + } + + var siteName = apiWebPage.site_name + var shortTitle = apiWebPage.title || apiWebPage.author || siteName || '' + if (siteName && shortTitle == siteName) { + delete apiWebPage.site_name + } + if (shortTitle.length > 100) { + shortTitle = shortTitle.substr(0, 80) + '...' + } + apiWebPage.rTitle = RichTextProcessor.wrapRichText(shortTitle, {noLinks: true, noLinebreaks: true}) + var contextHashtag = '' + if (siteName == 'GitHub') { + var matches = apiWebPage.url.match(/(https?:\/\/github\.com\/[^\/]+\/[^\/]+)/) + if (matches) { + contextHashtag = matches[0] + '/issues/{1}' + } + } + // delete apiWebPage.description + var shortDescriptionText = (apiWebPage.description || '') + if (shortDescriptionText.length > 180) { + shortDescriptionText = shortDescriptionText.substr(0, 150).replace(/(\n|\s)+$/, '') + '...' + } + apiWebPage.rDescription = RichTextProcessor.wrapRichText(shortDescriptionText, { + contextSite: siteName || 'external', + contextHashtag: contextHashtag + }); + + if (apiWebPage.type != 'photo' && + apiWebPage.type != 'video' && + apiWebPage.type != 'gif' && + apiWebPage.type != 'document' && + !apiWebPage.description && + apiWebPage.photo) { + apiWebPage.type = 'photo' + } + + if (messageID) { + if (this.pendingWebPages[apiWebPage.id] === undefined) { + this.pendingWebPages[apiWebPage.id] = {} + } + this.pendingWebPages[apiWebPage.id][messageID] = true + this.webpages[apiWebPage.id] = apiWebPage + } + + if (this.webpages[apiWebPage.id] === undefined) { + this.webpages[apiWebPage.id] = apiWebPage + } else { + safeReplaceObject(this.webpages[apiWebPage.id], apiWebPage) + } + + if (!messageID && this.pendingWebPages[apiWebPage.id] !== undefined) { + var msgs = [] + for(let msgID in this.pendingWebPages[apiWebPage.id]) { + msgs.push(msgID); + } + + $rootScope.$broadcast('webpage_updated', { + id: apiWebPage.id, + msgs: msgs + }) + } + } + + wrapForHistory (webPageID: number) { + var webPage = copy(this.webpages[webPageID]) || {_: 'webPageEmpty'} + + if (webPage.photo && webPage.photo.id) { + webPage.photo = appPhotosManager.wrapForHistory(webPage.photo.id, {website: webPage.type != 'photo' && webPage.type != 'video'}) + } + + /* if (webPage.document && webPage.document.id) { + webPage.document = appDocsManager.wrapForHistory(webPage.document.id) + } */ // warning + + return webPage + } + + wrapForFull (webPageID: number) { + var webPage = this.wrapForHistory(webPageID) + + if (!webPage.embed_url) { + return webPage + } + + var fullWidth = window.innerWidth; + var fullHeight = window.innerHeight; + + var full: any = { + width: fullWidth, + height: fullHeight + } + + if (!webPage.embed_width || !webPage.embed_height) { + full.height = full.width = Math.min(fullWidth, fullHeight) + } else { + var wh = calcImageInBox(webPage.embed_width, webPage.embed_height, fullWidth, fullHeight) + full.width = wh.w + full.height = wh.h + } + + var embedTag = Config.Modes.chrome_packed ? 'webview' : 'iframe' + + var embedType = webPage.embed_type != 'iframe' ? webPage.embed_type || 'text/html' : 'text/html' + + var embedHtml = '<' + embedTag + ' src="' + encodeEntities(webPage.embed_url) + '" type="' + encodeEntities(embedType) + '" frameborder="0" border="0" webkitallowfullscreen mozallowfullscreen allowfullscreen width="' + full.width + '" height="' + full.height + '" style="width: ' + full.width + 'px; height: ' + full.height + 'px;">' + + full.html = embedHtml; + + webPage.full = full + + return webPage + } +} + +export default new AppWebPagesManager(); diff --git a/src/lib/appManagers/appWebpManager.ts b/src/lib/appManagers/appWebpManager.ts index b60ec773..a36bd35f 100644 --- a/src/lib/appManagers/appWebpManager.ts +++ b/src/lib/appManagers/appWebpManager.ts @@ -1,34 +1,42 @@ +// @ts-ignore +//import createWorker from 'offscreen-canvas/create-worker'; + class AppWebpManager { public webpMachine: any = null; public loaded: Promise; public busyPromise: Promise; public queue: {bytes: Uint8Array, img: HTMLImageElement}[] = []; + //public worker: any; constructor() { + //let canvas = document.createElement('canvas'); + //console.log('got message from worker:', canvas.toDataURL()); + /* this.worker = createWorker(canvas, '/webp.bundle.js', (e: any) => { + // Messages from the worker + console.log('got message from worker:', e, canvas.toDataURL()); + }); */ + this.loaded = new Promise((resolve, reject) => { (window as any).webpLoaded = () => { console.log('webpHero loaded'); - this.webpMachine = new (window as any).webpHero.WebpMachine(); - this.webpMachine.webp.Module.doNotCaptureKeyboard = true; - //this.webpMachine.polyfillDocument(); + this.webpMachine = new (window as any).WebpMachine(); resolve(); }; let sc = document.createElement('script'); - sc.src = 'webp-hero.bundle.js'; + sc.src = 'webp.bundle.js'; sc.async = true; sc.onload = (window as any).webpLoaded; - /* sc.innerHTML = ` - window.webpMachine = new webpHero.WebpMachine(); - window.webpMachine.polyfillDocument(); - `; */ document.body.appendChild(sc); + + resolve(); }); } convert(bytes: Uint8Array): Promise { return this.webpMachine.decode(bytes); + //return this.worker.post({message: 'webpBytes', bytes}); } async processQueue() { diff --git a/src/lib/ckin.js b/src/lib/ckin.js new file mode 100644 index 00000000..6e600c35 --- /dev/null +++ b/src/lib/ckin.js @@ -0,0 +1,278 @@ +String.prototype.toHHMMSS = function() { + let sec_num = parseInt(this, 10); + let hours = Math.floor(sec_num / 3600); + let minutes = Math.floor((sec_num - (hours * 3600)) / 60); + let seconds = sec_num - (hours * 3600) - (minutes * 60); + + if(hours < 10) hours = "0" + hours; + if(minutes < 10) minutes = minutes; + if(seconds < 10) seconds = "0" + seconds; + return minutes + ':' + seconds; +} + +function stylePlayer(player, video) { + let skin = attachSkin(video.dataset.ckin); + player.classList.add(skin); + + let overlay = video.dataset.overlay; + addOverlay(player, overlay); + + let html = buildControls(skin); + player.insertAdjacentHTML('beforeend', html); + + var stopAndScrubTimeout = 0; + + if(skin === 'default') { + var progress = player.querySelector('.progress');; + var progressBar = player.querySelector('.progress__filled'); + var toggle = player.querySelectorAll('.toggle'); + var fullScreenButton = player.querySelector('.fullscreen'); + var seek = player.querySelector('#seek'); + var timeElapsed = player.querySelector('#time-elapsed'); + var timeDuration = player.querySelector('#time-duration'); + seek.setAttribute('max', video.duration); + timeDuration.innerHTML = String(video.duration | 0).toHHMMSS(); + + toggle.forEach((button) => { + return button.addEventListener('click', () => { + togglePlay(video, player); + }); + }); + + video.addEventListener('click', function() { + togglePlay(this, player); + }); + + video.addEventListener('play', function() { + updateButton(this, toggle); + }); + + video.addEventListener('pause', function() { + updateButton(this, toggle); + }); + + let mousedown = false; + progress.addEventListener('mousemove', (e) => { + return mousedown && scrub(e, video, progress); + }); + progress.addEventListener('mousedown', (e) => { + //console.log(video.currentTime); + scrub(e, video, progress, progressBar); + //Таймер для того, чтобы стопать видео, если зажал мышку и не отпустил клик + stopAndScrubTimeout = setTimeout(function() { + togglePlay(video, player, 1); + }, 150); + + return mousedown = true; + }); + progress.addEventListener('mouseup', () => { + clearTimeout(stopAndScrubTimeout); + togglePlay(video, player, 0); + return mousedown = false; + }); + fullScreenButton.addEventListener('click', (e) => { + return toggleFullScreen(player, fullScreenButton); + }); + addListenerMulti(player, 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', (e) => { + return onFullScreen(e, player); + }); + } + + if(skin === 'circle') { + let wrapper = document.createElement('div'); + wrapper.classList.add('circle-time-left'); + video.parentNode.insertBefore(wrapper, video); + wrapper.innerHTML = '
'; + + var circle = player.querySelector('.progress-ring__circle'); + var radius = circle.r.baseVal.value; + var circumference = 2 * Math.PI * radius; + var timeDuration = player.querySelector('.circle-time'); + var iconVolume = player.querySelector('.iconVolume'); + circle.style.strokeDasharray = `${circumference} ${circumference}`; + circle.style.strokeDashoffset = circumference; + circle.addEventListener('click', () => { + togglePlay(video, player); + }); + + video.addEventListener('play', () => { + iconVolume.style.display = 'none'; + }); + + video.addEventListener('pause', () => { + iconVolume.style.display = ''; + }); + } + + //Для хрома + timeDuration.innerHTML = String(video.duration | 0).toHHMMSS(); + if(skin === 'default') seek.setAttribute('max', video.duration); + //Для Opera / Safari / IE + video.addEventListener('loadeddata', function() { + timeDuration.innerHTML = String(video.duration | 0).toHHMMSS(); + if(skin === 'default') seek.setAttribute('max', video.duration); + }) + + video.addEventListener('timeupdate', function() { + handleProgress(this, skin, timeDuration, circumference, circle, progressBar, seek, timeElapsed); + }); +} + +function showControls(video) { + video.setAttribute("controls", "controls"); +} + +function togglePlay(video, player, stop) { + if(stop == 1) { + video['pause'](); + player.classList.remove('is-playing'); + return; + } else if(stop == 0) { + video['play'](); + player.classList.add('is-playing'); + return; + } + + let method = video.paused ? 'play' : 'pause'; + video[method](); + video.paused ? player.classList.remove('is-playing') : player.classList.add('is-playing'); +} + +function updateButton(video, toggle) { + let icon = video.paused ? 'tgico-play' : 'tgico-pause'; + toggle.forEach((button) => { + button.classList.remove('tgico-play', 'tgico-pause'); + button.classList.add(icon); + }); +} + +function handleProgress(video, skin, timeDuration, circumference, circle, progressBar, seek, timeElapsed) { + let percent = video.currentTime / video.duration * 100; + if(skin === 'default') { + progressBar.style.width = percent + '%'; + seek.value = video.currentTime; + timeElapsed.innerHTML = String(video.currentTime | 0).toHHMMSS(); + } else if(skin === 'circle') { + let timeLeft = String((video.duration - video.currentTime) | 0).toHHMMSS(); + let offset = circumference - percent / 100 * circumference; + circle.style.strokeDashoffset = offset; + if(timeLeft != 0 | 0) timeDuration.innerHTML = timeLeft; + } +} + +function scrub(e, video, progress) { + let scrubTime = e.offsetX / progress.offsetWidth * video.duration; + video.currentTime = scrubTime; +} + +export function wrapPlayer(video) { + let wrapper = document.createElement('div'); + wrapper.classList.add('ckin__player'); + + video.parentNode.insertBefore(wrapper, video); + wrapper.appendChild(video); + + stylePlayer(wrapper, video); +} + +function buildControls(skin) { + let html = []; + if(skin === 'default') { + html.push(''); + html.push('
'); + html.push('
', + '
', + '
', + '
', + '
', + '
', + '', + ' / ', + '', + '
', + '
', + '
'); + html.push('
'); + } else if(skin === 'circle') { + html.push('', + '', + ''); + } + + return html.join(''); +} + +function attachSkin(skin) { + console.log("skin: " + skin); + if(typeof skin != 'undefined' && skin != '') { + return skin; + } else { + return 'default'; + } +} + +function addOverlay(player, overlay) { + if(overlay == 1) { + player.classList.add('ckin__overlay'); + } else { + return; + } +} + +function toggleFullScreen(player, fullScreenButton) { + // alternative standard method + if(!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) { + player.classList.add('ckin__fullscreen'); + + if(player.requestFullscreen) { + player.requestFullscreen(); + } else if(player.mozRequestFullScreen) { + player.mozRequestFullScreen(); // Firefox + } else if(player.webkitRequestFullscreen) { + player.webkitRequestFullscreen(); // Chrome and Safari + } else if(player.msRequestFullscreen) { + player.msRequestFullscreen(); + } + + fullScreenButton.classList.remove('tgico-fullscreen'); + fullScreenButton.classList.add('tgico-smallscreen'); + fullScreenButton.setAttribute('title', 'Exit Full Screen'); + } else { + player.classList.remove('ckin__fullscreen'); + + if(document.cancelFullScreen) { + document.cancelFullScreen(); + } else if(document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if(document.webkitCancelFullScreen) { + document.webkitCancelFullScreen(); + } else if(document.msExitFullscreen) { + document.msExitFullscreen(); + } + + fullScreenButton.classList.remove('tgico-smallscreen'); + fullScreenButton.classList.add('tgico-fullscreen'); + fullScreenButton.setAttribute('title', 'Full Screen'); + } +} + +function onFullScreen(e, player) { + let isFullscreenNow = document.webkitFullscreenElement !== null; + if(!isFullscreenNow) { + player.classList.remove('ckin__fullscreen'); + + /* let el = player.querySelector('.fullscreen'); + el.classList.remove('tgico-smallscreen'); + el.classList.add('tgico-fullscreen'); */ + } else { + // player.querySelector('.fullscreen').innerHTML = iconExpand; + + } +} + +function addListenerMulti(element, eventNames, listener) { + let events = eventNames.split(' '); + for (let i = 0, iLen = events.length; i < iLen; i++) { + element.addEventListener(events[i], listener, false); + } +} diff --git a/src/lib/libwebp.js b/src/lib/libwebp.js new file mode 100644 index 00000000..70ae281e --- /dev/null +++ b/src/lib/libwebp.js @@ -0,0 +1,34 @@ +if(typeof(document) === 'undefined') { + var document = { + addEventListener: function() {} + }; +} + +function Webp() { + var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow){throw toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}else{return scriptDirectory+path}}if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}Module["read"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module["readAsync"]=function readAsync(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);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=function(title){document.title=title}}else{}var out=Module["print"]||(typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null);var err=Module["printErr"]||(typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end<=_emscripten_get_heap_size()){HEAP32[DYNAMICTOP_PTR>>2]=end}else{var success=_emscripten_resize_heap(end);if(!success)return 0}return ret}function getNativeTypeSize(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 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var GLOBAL_BASE=8;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string")return UTF8ToString(ret);if(returnType==="boolean")return Boolean(ret);return ret}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)}}var ALLOC_NONE=3;var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(u8Array[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}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){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&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(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}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}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 len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}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 alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){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)}var STACK_BASE=11056,DYNAMIC_BASE=5253936,DYNAMICTOP_PTR=10800;var TOTAL_STACK=5242880;var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||67108864;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];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(){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)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}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};if(!Math.clz32)Math.clz32=function(x){var n=32;var y=x>>16;if(y){n-=16;x=y}y=x>>8;if(y){n-=8;x=y}y=x>>4;if(y){n-=4;x=y}y=x>>2;if(y){n-=2;x=y}y=x>>1;if(y)return n-2;return n-x};if(!Math.trunc)Math.trunc=function(x){return x<0?Math.ceil(x):Math.floor(x)};var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}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["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}memoryInitializer="data:application/octet-stream;base64,AAAAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f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aXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AAP/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AGAcXGSgGJykWGiYqOAU3ORUbNjolK0gER0kUHDU7RkokLFhFSzQ8A1dZEx1WWiMtRExVWzM9aAJnaRIeZmoiLlRcQ01lazI+eAF3eVNdER9kbEJOdnohL3V7MT9jbVJeAHR8QU8QIGJuMHN9UV9Acn5hb1Bxf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ySrG6YmLOVDVzqpUnMaO7M/O1q0O6ZdSZooKBV0j9EiJ68vDxC3It8xLbcuESG3BmIPILc5LhYYgAE2ESVBIElzHIAXgM0oAwlzM8ASBt9XJQlzO01AFS9oNyzaCTY1guJAWkbNKCkXGjk2OXC4BSkmptUeIhqFmHQKIIYnEzXdGnIgSf8fCUHqAg8BdklLIAwzwP+gKzNYHyNDZlU3ulU4FRdvO80tJcA3JkZ8SWYBImJ9YipYaFV1r1JfVDVZgGRxZS1LT3svM4BRqwE5EQVHZjk1KTEmIQ15OUkaAVUpCkOKTW5aL3JzFQIKZv+mFwZlHRAKVYBlxBo5EgpmZtUiFCt1FA8ko4BEARpmPUclIjUf88BFPEcmSXcc3iVELYAiAS8L9as+ERNGklU3PkYlKyWaZKNVoAE/CVyIHEAgyVVLDwkJQP+4dxBWBhwFQP8Z+AE4CBGEif83dIA6DxRShzkaeSikMh+JmoUZI9ozZyyDg3sfBp5WKECHlOAtt4AWGhGD8JoOAdEtEBVbQN4HAcU4FSebPIoXZtVTDA02wP9ELxxVGlVVgIAgkqsSCwc/kKsEBPYjGwqSrqsMGoC+UCNjtFB+Ni1Vfi9XsDMpFCBlS4CLdpJ0gFU4KQ+w7FUlCT5HHhF3dv8REoplJjyKN0YrGo6SJBMeq/9hGxSKLT0+2wFRvEAgKRR1l44UFaNwEww9w4AwBBgAAAAAAAAAAAAAAAAAAf8C/gMEBv0F/Pv6B/kI+PcAAAAAAAAAAAAAAAAAAP///////////////////////////////////////////7D2////////////3/H8///////////5/f3////////////0/P//////////6v7+///////////9///////////////2/v//////////7/3+///////////+//7////////////4/v//////////+//+///////////////////////////9/v//////////+/7+///////////+//7////////////+/f/+////////+v/+//7////////+/////////////////////////////////////////////////////////9n/////////////4fzx/f///v/////q+vH6/f/9/v/////+////////////3/7+///////////u/f7+///////////4/v//////////+f7////////////////////////////9////////////9/7////////////////////////////9/v///////////P/////////////////////////////+/v///////////f/////////////////////////////+/f//////////+v/////////////+/////////////////////////////////////////////////////////7r7+v//////////6vv0/v/////////7+/P9/v/+///////9/v//////////7P3+///////////7/f3+/v/////////+/v///////////v7+///////////////////////////+/////////////v7////////////+/////////////////////////////v////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////j/////////////+v78/v/////////4/vn9///////////9/f//////////9v39///////////8/vv+/v/////////+/P//////////+P79///////////9//7+///////////7/v//////////9fv+///////////9/f7////////////7/f///////////P3+/////////////v/////////////8////////////+f/+//////////////7//////////////f//////////+v///////////////////////////////////////////v///////////////////////////4CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgP2I/v/k24CAgICAvYHy/+PV/9uAgIBqfuP81tH//4CAgAFi+P/s4v//gICAtYXu/t3q/5qAgIBOhsr3xrT/24CAgAG5+f/z/4CAgICAuJb3/+zggICAgIBNbtj/7OaAgICAgAFl+//x/4CAgICAqovx/OzR//+AgIAldMTz5P///4CAgAHM/v/1/4CAgICAz6D6/+6AgICAgIBmZ+f/06uAgICAgAGY/P/w/4CAgICAsYfz/+rhgICAgIBQgdP/wuCAgICAgAEB/4CAgICAgICA9gH/gICAgICAgID/gICAgICAgICAgMYj7d/Bu6KgkZs+gy3G3ayw3J383QFEL5LQlafdov/fgAGV8f/d4P//gICAuI3q/d7c/8eAgIBRY7XysL75yv//gAGB6P3WxfLE//+AY3nS+snG/8qAgIAXW6Pyqrv30v//gAHI9v/q/4CAgICAbbLx/+f1//+AgIAsgsn9zcD//4CAgAGE7/vb0f+lgICAXojh+9q+//+AgIAWZK71uqH/x4CAgAG2+f/o64CAgICAfI/x/+PqgICAgIAjTbX7wdP/zYCAgAGd9//s5///gICAeY3r/+Hj//+AgIAtY7z7w9n/4ICAgAEB+//V/4CAgICAywH4//+AgICAgICJAbH/4P+AgICAgP0J+PvP0P/AgICArw3g88G5+cb//4BJEavdobPsp//qgAFf9/3Ut///gICA71r0+tPR//+AgICbTcP4vMP//4CAgAEY7/va2//NgICAyTPb/8S6gICAgIBFLr7vydr/5ICAgAG/+///gICAgICA36X5/9X/gICAgICNfPj//4CAgICAgAEQ+P//gICAgICAviTm/+z/gICAgICVAf+AgICAgICAgAHi/4CAgICAgICA98D/gICAgICAgIDwgP+AgICAgICAgAGG/P//gICAgICA1T76//+AgICAgIA3Xf+AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMoY1eu6v9yg8K//fia26Km45K7/u4A9Lorbl7Lwqv/YgAFw5vrHv/ef//+Apm3k/NPX/66AgIAnTaLorLT1sv//gAE03PbGx/nc//+AfEq/87fB+t3//4AYR4Lbmqrztv//gAG24fnb8P/ggICAlZbi/NjN/6uAgIAcbKryt8L+3///gAFR5vzMy//AgICAe2bR97zE/+mAgIAUX5nzpK3/y4CAgAHe+P/Y1YCAgICAqK/2/OvN//+AgIAvdNf/09T//4CAgAF57P3U1v//gICAjVTV/MnK/9uAgIAqUKDworn/zYCAgAEB/4CAgICAgICA9AH/gICAgICAgIDuAf+AgICAgICAgAQFBgcICQoKCwwNDg8QERESExQUFRUWFhcXGBkZGhscHR4fICEiIyQlJSYnKCkqKywtLi4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xMTU5PUFFSU1RVVldYWVtdX2BiZGVmaGpsbnBydHZ6fH6AgoSGiIqMj5GUl5qdBAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA8AD4AQABCAEQARgBIAEoATABOAFAAUgBUAFYAWABaAFwAXgBgAGIAZABmAGgAagBsAG4AcAByAHQAdwB6AH0AgACDAIYAiQCMAI8AkgCVAJgAmwCeAKEApACnAKoArQCxALUAuQC9AMEAxQDJAM0A0QDVANkA3QDhAOUA6gDvAPUA+QD+AAMBCAENARIBFwEcAQABBAgFAgMGCQwNCgcLDg+pIwAArSMAALIjAAC4IwAAEQAKABEREQAAAAAFAAAAAAAACQAAAAAL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uAFByZW1hdHVyZSBlbmQtb2YtZmlsZSBlbmNvdW50ZXJlZC4AT3V0cHV0IGFib3J0ZWQuAC0rICAgMFgweAAobnVsbCkALTBYKzBYIDBYLTB4KzB4IDB4AGluZgBJTkYAbmFuAE5BTgAu";var tempDoublePtr=11040;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){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();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method==="timeout"&&Module.ctx){err("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(browserIterationFunc);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);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["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&&Module["canvas"].requestPointerLock){Module["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,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}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["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}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)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);if(vrDevice){canvasContainer.requestFullscreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullscreen()}},requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){err("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.");Browser.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},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/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}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"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}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}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";Module["readAsync"](url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},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>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);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/h1)return 0;if(!surfData.buffer){surfData.buffer=_malloc(surfData.width*surfData.height*4);HEAP32[surf+20>>2]=surfData.buffer}HEAP32[surf+20>>2]=surfData.buffer;if(surf==SDL.screen&&Module.screenIsReadOnly&&surfData.image)return 0;if(SDL.defaults.discardOnLock){if(!surfData.image){surfData.image=surfData.ctx.createImageData(surfData.width,surfData.height)}if(!SDL.defaults.opaqueFrontBuffer)return}else{surfData.image=surfData.ctx.getImageData(0,0,surfData.width,surfData.height)}if(surf==SDL.screen&&SDL.defaults.opaqueFrontBuffer){var data=surfData.image.data;var num=data.length;for(var i=0;i>2],y:HEAP32[rect+4>>2],w:HEAP32[rect+8>>2],h:HEAP32[rect+12>>2]}},updateRect:function(rect,r){HEAP32[rect>>2]=r.x;HEAP32[rect+4>>2]=r.y;HEAP32[rect+8>>2]=r.w;HEAP32[rect+12>>2]=r.h},intersectionOfRects:function(first,second){var leftX=Math.max(first.x,second.x);var leftY=Math.max(first.y,second.y);var rightX=Math.min(first.x+first.w,second.x+second.w);var rightY=Math.min(first.y+first.h,second.y+second.h);return{x:leftX,y:leftY,w:Math.max(leftX,rightX)-leftX,h:Math.max(leftY,rightY)-leftY}},checkPixelFormat:function(fmt){},loadColorToCSSRGB:function(color){var rgba=HEAP32[color>>2];return"rgb("+(rgba&255)+","+(rgba>>8&255)+","+(rgba>>16&255)+")"},loadColorToCSSRGBA:function(color){var rgba=HEAP32[color>>2];return"rgba("+(rgba&255)+","+(rgba>>8&255)+","+(rgba>>16&255)+","+(rgba>>24&255)/255+")"},translateColorToCSSRGBA:function(rgba){return"rgba("+(rgba&255)+","+(rgba>>8&255)+","+(rgba>>16&255)+","+(rgba>>>24)/255+")"},translateRGBAToCSSRGBA:function(r,g,b,a){return"rgba("+(r&255)+","+(g&255)+","+(b&255)+","+(a&255)/255+")"},translateRGBAToColor:function(r,g,b,a){return r|g<<8|b<<16|a<<24},makeSurface:function(width,height,flags,usePageCanvas,source,rmask,gmask,bmask,amask){flags=flags||0;var is_SDL_HWSURFACE=flags&1;var is_SDL_HWPALETTE=flags&2097152;var is_SDL_OPENGL=flags&67108864;var surf=_malloc(60);var pixelFormat=_malloc(44);var bpp=is_SDL_HWPALETTE?1:4;var buffer=0;if(!is_SDL_HWSURFACE&&!is_SDL_OPENGL){buffer=_malloc(width*height*4)}HEAP32[surf>>2]=flags;HEAP32[surf+4>>2]=pixelFormat;HEAP32[surf+8>>2]=width;HEAP32[surf+12>>2]=height;HEAP32[surf+16>>2]=width*bpp;HEAP32[surf+20>>2]=buffer;HEAP32[surf+36>>2]=0;HEAP32[surf+40>>2]=0;HEAP32[surf+44>>2]=Module["canvas"].width;HEAP32[surf+48>>2]=Module["canvas"].height;HEAP32[surf+56>>2]=1;HEAP32[pixelFormat>>2]=-2042224636;HEAP32[pixelFormat+4>>2]=0;HEAP8[pixelFormat+8>>0]=bpp*8;HEAP8[pixelFormat+9>>0]=bpp;HEAP32[pixelFormat+12>>2]=rmask||255;HEAP32[pixelFormat+16>>2]=gmask||65280;HEAP32[pixelFormat+20>>2]=bmask||16711680;HEAP32[pixelFormat+24>>2]=amask||4278190080;SDL.GL=SDL.GL||is_SDL_OPENGL;var canvas;if(!usePageCanvas){if(SDL.canvasPool.length>0){canvas=SDL.canvasPool.pop()}else{canvas=document.createElement("canvas")}canvas.width=width;canvas.height=height}else{canvas=Module["canvas"]}var webGLContextAttributes={antialias:SDL.glAttributes[13]!=0&&SDL.glAttributes[14]>1,depth:SDL.glAttributes[6]>0,stencil:SDL.glAttributes[7]>0,alpha:SDL.glAttributes[3]>0};var ctx=Browser.createContext(canvas,is_SDL_OPENGL,usePageCanvas,webGLContextAttributes);SDL.surfaces[surf]={width:width,height:height,canvas:canvas,ctx:ctx,surf:surf,buffer:buffer,pixelFormat:pixelFormat,alpha:255,flags:flags,locked:0,usePageCanvas:usePageCanvas,source:source,isFlagSet:function(flag){return flags&flag}};return surf},copyIndexedColorData:function(surfData,rX,rY,rW,rH){if(!surfData.colors){return}var fullWidth=Module["canvas"].width;var fullHeight=Module["canvas"].height;var startX=rX||0;var startY=rY||0;var endX=(rW||fullWidth-startX)+startX;var endY=(rH||fullHeight-startY)+startY;var buffer=surfData.buffer;if(!surfData.image.data32){surfData.image.data32=new Uint32Array(surfData.image.data.buffer)}var data32=surfData.image.data32;var colors32=surfData.colors32;for(var y=startY;y>0]]}}},freeSurface:function(surf){var refcountPointer=surf+56;var refcount=HEAP32[refcountPointer>>2];if(refcount>1){HEAP32[refcountPointer>>2]=refcount-1;return}var info=SDL.surfaces[surf];if(!info.usePageCanvas&&info.canvas)SDL.canvasPool.push(info.canvas);if(info.buffer)_free(info.buffer);_free(info.pixelFormat);_free(surf);SDL.surfaces[surf]=null;if(surf===SDL.screen){SDL.screen=null}},blitSurface:function(src,srcrect,dst,dstrect,scale){var srcData=SDL.surfaces[src];var dstData=SDL.surfaces[dst];var sr,dr;if(srcrect){sr=SDL.loadRect(srcrect)}else{sr={x:0,y:0,w:srcData.width,h:srcData.height}}if(dstrect){dr=SDL.loadRect(dstrect)}else{dr={x:0,y:0,w:srcData.width,h:srcData.height}}if(dstData.clipRect){var widthScale=!scale||sr.w===0?1:sr.w/dr.w;var heightScale=!scale||sr.h===0?1:sr.h/dr.h;dr=SDL.intersectionOfRects(dstData.clipRect,dr);sr.w=dr.w*widthScale;sr.h=dr.h*heightScale;if(dstrect){SDL.updateRect(dstrect,dr)}}var blitw,blith;if(scale){blitw=dr.w;blith=dr.h}else{blitw=sr.w;blith=sr.h}if(sr.w===0||sr.h===0||blitw===0||blith===0){return 0}var oldAlpha=dstData.ctx.globalAlpha;dstData.ctx.globalAlpha=srcData.alpha/255;dstData.ctx.drawImage(srcData.canvas,sr.x,sr.y,sr.w,sr.h,dr.x,dr.y,blitw,blith);dstData.ctx.globalAlpha=oldAlpha;if(dst!=SDL.screen){warnOnce("WARNING: copying canvas data to memory for compatibility");_SDL_LockSurface(dst);dstData.locked--}return 0},downFingers:{},savedKeydown:null,receiveEvent:function(event){function unpressAllPressedKeys(){for(var code in SDL.keyboardMap){SDL.events.push({type:"keyup",keyCode:SDL.keyboardMap[code]})}}switch(event.type){case"touchstart":case"touchmove":{event.preventDefault();var touches=[];if(event.type==="touchstart"){for(var i=0;i0?Math.max(delta,1):Math.min(delta,-1);var button=delta>0?3:4;SDL.events.push({type:"mousedown",button:button,pageX:event.pageX,pageY:event.pageY});SDL.events.push({type:"mouseup",button:button,pageX:event.pageX,pageY:event.pageY});SDL.events.push({type:"wheel",deltaX:0,deltaY:delta});event.preventDefault();break;case"mousemove":if(SDL.DOMButtons[0]===1){SDL.events.push({type:"touchmove",touch:{identifier:0,deviceID:-1,pageX:event.pageX,pageY:event.pageY}})}if(Browser.pointerLock){if("mozMovementX"in event){event["movementX"]=event["mozMovementX"];event["movementY"]=event["mozMovementY"]}if(event["movementX"]==0&&event["movementY"]==0){event.preventDefault();return}}case"keydown":case"keyup":case"keypress":case"mousedown":case"mouseup":if(event.type!=="keydown"||!SDL.unicode&&!SDL.textInput||(event.keyCode===8||event.keyCode===9)){event.preventDefault()}if(event.type=="mousedown"){SDL.DOMButtons[event.button]=1;SDL.events.push({type:"touchstart",touch:{identifier:0,deviceID:-1,pageX:event.pageX,pageY:event.pageY}})}else if(event.type=="mouseup"){if(!SDL.DOMButtons[event.button]){return}SDL.events.push({type:"touchend",touch:{identifier:0,deviceID:-1,pageX:event.pageX,pageY:event.pageY}});SDL.DOMButtons[event.button]=0}if(event.type==="keydown"||event.type==="mousedown"){SDL.canRequestFullscreen=true}else if(event.type==="keyup"||event.type==="mouseup"){if(SDL.isRequestingFullscreen){Module["requestFullscreen"](true,true);SDL.isRequestingFullscreen=false}SDL.canRequestFullscreen=false}if(event.type==="keypress"&&SDL.savedKeydown){SDL.savedKeydown.keypressCharCode=event.charCode;SDL.savedKeydown=null}else if(event.type==="keydown"){SDL.savedKeydown=event}if(event.type!=="keypress"||SDL.textInput){SDL.events.push(event)}break;case"mouseout":for(var i=0;i<3;i++){if(SDL.DOMButtons[i]){SDL.events.push({type:"mouseup",button:i,pageX:event.pageX,pageY:event.pageY});SDL.DOMButtons[i]=0}}event.preventDefault();break;case"focus":SDL.events.push(event);event.preventDefault();break;case"blur":SDL.events.push(event);unpressAllPressedKeys();event.preventDefault();break;case"visibilitychange":SDL.events.push({type:"visibilitychange",visible:!document.hidden});unpressAllPressedKeys();event.preventDefault();break;case"unload":if(Browser.mainLoop.runner){SDL.events.push(event);Browser.mainLoop.runner()}return;case"resize":SDL.events.push(event);if(event.preventDefault){event.preventDefault()}break}if(SDL.events.length>=1e4){err("SDL event queue full, dropping events");SDL.events=SDL.events.slice(0,1e4)}SDL.flushEventsToHandler();return},lookupKeyCodeForEvent:function(event){var code=event.keyCode;if(code>=65&&code<=90){code+=32}else{code=SDL.keyCodes[event.keyCode]||event.keyCode;if(event.location===KeyboardEvent.DOM_KEY_LOCATION_RIGHT&&code>=(224|1<<10)&&code<=(227|1<<10)){code+=4}}return code},handleEvent:function(event){if(event.handled)return;event.handled=true;switch(event.type){case"touchstart":case"touchend":case"touchmove":{Browser.calculateMouseEvent(event);break}case"keydown":case"keyup":{var down=event.type==="keydown";var code=SDL.lookupKeyCodeForEvent(event);HEAP8[SDL.keyboardState+code>>0]=down;SDL.modState=(HEAP8[SDL.keyboardState+1248>>0]?64:0)|(HEAP8[SDL.keyboardState+1249>>0]?1:0)|(HEAP8[SDL.keyboardState+1250>>0]?256:0)|(HEAP8[SDL.keyboardState+1252>>0]?128:0)|(HEAP8[SDL.keyboardState+1253>>0]?2:0)|(HEAP8[SDL.keyboardState+1254>>0]?512:0);if(down){SDL.keyboardMap[code]=event.keyCode}else{delete SDL.keyboardMap[code]}break}case"mousedown":case"mouseup":if(event.type=="mousedown"){SDL.buttonState|=1<0){if(SDL.makeCEvent(SDL.events.shift(),ptr)!==false)return 1}return 0}else{return SDL.events.length>0}},makeCEvent:function(event,ptr){if(typeof event==="number"){_memcpy(ptr,event,28);_free(event);return}SDL.handleEvent(event);switch(event.type){case"keydown":case"keyup":{var down=event.type==="keydown";var key=SDL.lookupKeyCodeForEvent(event);var scan;if(key>=1024){scan=key-1024}else{scan=SDL.scanCodes[key]||key}HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP8[ptr+8>>0]=down?1:0;HEAP8[ptr+9>>0]=0;HEAP32[ptr+12>>2]=scan;HEAP32[ptr+16>>2]=key;HEAP16[ptr+20>>1]=SDL.modState;HEAP32[ptr+24>>2]=event.keypressCharCode||key;break}case"keypress":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];var cStr=intArrayFromString(String.fromCharCode(event.charCode));for(var i=0;i>0]=cStr[i]}break}case"mousedown":case"mouseup":case"mousemove":{if(event.type!="mousemove"){var down=event.type==="mousedown";HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP32[ptr+8>>2]=0;HEAP32[ptr+12>>2]=0;HEAP8[ptr+16>>0]=event.button+1;HEAP8[ptr+17>>0]=down?1:0;HEAP32[ptr+20>>2]=Browser.mouseX;HEAP32[ptr+24>>2]=Browser.mouseY}else{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP32[ptr+8>>2]=0;HEAP32[ptr+12>>2]=0;HEAP32[ptr+16>>2]=SDL.buttonState;HEAP32[ptr+20>>2]=Browser.mouseX;HEAP32[ptr+24>>2]=Browser.mouseY;HEAP32[ptr+28>>2]=Browser.mouseMovementX;HEAP32[ptr+32>>2]=Browser.mouseMovementY}break}case"wheel":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+16>>2]=event.deltaX;HEAP32[ptr+20>>2]=event.deltaY;break}case"touchstart":case"touchend":case"touchmove":{var touch=event.touch;if(!Browser.touches[touch.identifier])break;var w=Module["canvas"].width;var h=Module["canvas"].height;var x=Browser.touches[touch.identifier].x/w;var y=Browser.touches[touch.identifier].y/h;var lx=Browser.lastTouches[touch.identifier].x/w;var ly=Browser.lastTouches[touch.identifier].y/h;var dx=x-lx;var dy=y-ly;if(touch["deviceID"]===undefined)touch.deviceID=SDL.TOUCH_DEFAULT_ID;if(dx===0&&dy===0&&event.type==="touchmove")return false;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=_SDL_GetTicks();tempI64=[touch.deviceID>>>0,(tempDouble=touch.deviceID,+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+8>>2]=tempI64[0],HEAP32[ptr+12>>2]=tempI64[1];tempI64=[touch.identifier>>>0,(tempDouble=touch.identifier,+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+16>>2]=tempI64[0],HEAP32[ptr+20>>2]=tempI64[1];HEAPF32[ptr+24>>2]=x;HEAPF32[ptr+28>>2]=y;HEAPF32[ptr+32>>2]=dx;HEAPF32[ptr+36>>2]=dy;if(touch.force!==undefined){HEAPF32[ptr+40>>2]=touch.force}else{HEAPF32[ptr+40>>2]=event.type=="touchend"?0:1}break}case"unload":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];break}case"resize":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=event.w;HEAP32[ptr+8>>2]=event.h;break}case"joystick_button_up":case"joystick_button_down":{var state=event.type==="joystick_button_up"?0:1;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP8[ptr+4>>0]=event.index;HEAP8[ptr+5>>0]=event.button;HEAP8[ptr+6>>0]=state;break}case"joystick_axis_motion":{HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP8[ptr+4>>0]=event.index;HEAP8[ptr+5>>0]=event.axis;HEAP32[ptr+8>>2]=SDL.joystickAxisValueConversion(event.value);break}case"focus":{var SDL_WINDOWEVENT_FOCUS_GAINED=12;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP8[ptr+8>>0]=SDL_WINDOWEVENT_FOCUS_GAINED;break}case"blur":{var SDL_WINDOWEVENT_FOCUS_LOST=13;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP8[ptr+8>>0]=SDL_WINDOWEVENT_FOCUS_LOST;break}case"visibilitychange":{var SDL_WINDOWEVENT_SHOWN=1;var SDL_WINDOWEVENT_HIDDEN=2;var visibilityEventID=event.visible?SDL_WINDOWEVENT_SHOWN:SDL_WINDOWEVENT_HIDDEN;HEAP32[ptr>>2]=SDL.DOMEventToSDLEvent[event.type];HEAP32[ptr+4>>2]=0;HEAP8[ptr+8>>0]=visibilityEventID;break}default:throw"Unhandled SDL event: "+event.type}},makeFontString:function(height,fontName){if(fontName.charAt(0)!="'"&&fontName.charAt(0)!='"'){fontName='"'+fontName+'"'}return height+"px "+fontName+", serif"},estimateTextWidth:function(fontData,text){var h=fontData.size;var fontString=SDL.makeFontString(h,fontData.name);var tempCtx=SDL.ttfContext;tempCtx.save();tempCtx.font=fontString;var ret=tempCtx.measureText(text).width|0;tempCtx.restore();return ret},allocateChannels:function(num){if(SDL.numChannels&&SDL.numChannels>=num&&num!=0)return;SDL.numChannels=num;SDL.channels=[];for(var i=0;i>1]/32768}}else if(SDL.audio.format==8){for(var j=0;j>0];channelData[j]=(v>=0?v-128:v+128)/128}}else if(SDL.audio.format==33056){for(var j=0;j>2]}}else{throw"Invalid SDL audio format "+SDL.audio.format+"!"}}},debugSurface:function(surfData){console.log("dumping surface "+[surfData.surf,surfData.source,surfData.width,surfData.height]);var image=surfData.ctx.getImageData(0,0,surfData.width,surfData.height);var data=image.data;var num=Math.min(surfData.width,surfData.height);for(var i=0;i0}},queryJoysticks:function(){for(var joystick in SDL.lastJoystickState){var state=SDL.getGamepad(joystick-1);var prevState=SDL.lastJoystickState[joystick];if(typeof state==="undefined")return;if(state===null)return;if(typeof state.timestamp!=="number"||state.timestamp!==prevState.timestamp||!state.timestamp){var i;for(i=0;ideviceIndex&&deviceIndex>=0){return gamepads[deviceIndex]}return null}};function _SDL_CreateRGBSurface(flags,width,height,depth,rmask,gmask,bmask,amask){return SDL.makeSurface(width,height,flags,false,"CreateRGBSurface",rmask,gmask,bmask,amask)}function _SDL_Flip(surf){}function _SDL_FreeSurface(surf){if(surf)SDL.freeSurface(surf)}function _SDL_Init(initFlags){SDL.startTime=Date.now();SDL.initFlags=initFlags;if(!Module["doNotCaptureKeyboard"]){var keyboardListeningElement=Module["keyboardListeningElement"]||document;keyboardListeningElement.addEventListener("keydown",SDL.receiveEvent);keyboardListeningElement.addEventListener("keyup",SDL.receiveEvent);keyboardListeningElement.addEventListener("keypress",SDL.receiveEvent);window.addEventListener("focus",SDL.receiveEvent);window.addEventListener("blur",SDL.receiveEvent);document.addEventListener("visibilitychange",SDL.receiveEvent)}if(typeof window !== 'undefined') window.addEventListener("unload",SDL.receiveEvent);SDL.keyboardState=_malloc(65536);_memset(SDL.keyboardState,0,65536);SDL.DOMEventToSDLEvent["keydown"]=768;SDL.DOMEventToSDLEvent["keyup"]=769;SDL.DOMEventToSDLEvent["keypress"]=771;SDL.DOMEventToSDLEvent["mousedown"]=1025;SDL.DOMEventToSDLEvent["mouseup"]=1026;SDL.DOMEventToSDLEvent["mousemove"]=1024;SDL.DOMEventToSDLEvent["wheel"]=1027;SDL.DOMEventToSDLEvent["touchstart"]=1792;SDL.DOMEventToSDLEvent["touchend"]=1793;SDL.DOMEventToSDLEvent["touchmove"]=1794;SDL.DOMEventToSDLEvent["unload"]=256;SDL.DOMEventToSDLEvent["resize"]=28673;SDL.DOMEventToSDLEvent["visibilitychange"]=512;SDL.DOMEventToSDLEvent["focus"]=512;SDL.DOMEventToSDLEvent["blur"]=512;SDL.DOMEventToSDLEvent["joystick_axis_motion"]=1536;SDL.DOMEventToSDLEvent["joystick_button_down"]=1539;SDL.DOMEventToSDLEvent["joystick_button_up"]=1540;return 0}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);return ctx&&GL.registerContext(ctx,webGLContextAttributes)},registerContext:function(ctx,webGLContextAttributes){var handle=_malloc(8);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};context.cannotHandleOffsetsInUniformArrayViews=function(g){function b(c,t){var s=g.createShader(t);g.shaderSource(s,c);g.compileShader(s);return s}try{var p=g.createProgram();g.attachShader(p,b("attribute vec4 p;void main(){gl_Position=p;}",g.VERTEX_SHADER));g.attachShader(p,b("precision lowp float;uniform vec4 u;void main(){gl_FragColor=u;}",g.FRAGMENT_SHADER));g.linkProgram(p);var h=new Float32Array(8);h[4]=1;g.useProgram(p);var l=g.getUniformLocation(p,"u");g.uniform4fv(l,h.subarray(4,8));return!g.getUniform(p,l)[0]}catch(e){return false}}();if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;_free(GL.contexts[contextHandle]);GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){var instancedArraysExt=GLctx.getExtension("ANGLE_instanced_arrays");if(instancedArraysExt){GLctx["vertexAttribDivisor"]=function(index,divisor){instancedArraysExt["vertexAttribDivisorANGLE"](index,divisor)};GLctx["drawArraysInstanced"]=function(mode,first,count,primcount){instancedArraysExt["drawArraysInstancedANGLE"](mode,first,count,primcount)};GLctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){instancedArraysExt["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)}}var vaoExt=GLctx.getExtension("OES_vertex_array_object");if(vaoExt){GLctx["createVertexArray"]=function(){return vaoExt["createVertexArrayOES"]()};GLctx["deleteVertexArray"]=function(vao){vaoExt["deleteVertexArrayOES"](vao)};GLctx["bindVertexArray"]=function(vao){vaoExt["bindVertexArrayOES"](vao)};GLctx["isVertexArray"]=function(vao){return vaoExt["isVertexArrayOES"](vao)}}var drawBuffersExt=GLctx.getExtension("WEBGL_draw_buffers");if(drawBuffersExt){GLctx["drawBuffers"]=function(n,bufs){drawBuffersExt["drawBuffersWEBGL"](n,bufs)}}}GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2"];var exts=GLctx.getSupportedExtensions();if(exts&&exts.length>0){GLctx.getSupportedExtensions().forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})}},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i0){return}if(surfData.isFlagSet(2097152)){SDL.copyIndexedColorData(surfData)}else if(!surfData.colors){var data=surfData.image.data;var buffer=surfData.buffer;assert(buffer%4==0,"Invalid buffer offset: "+buffer);var src=buffer>>2;var dst=0;var isScreen=surf==SDL.screen;var num;if(typeof CanvasPixelArray!=="undefined"&&data instanceof CanvasPixelArray){num=data.length;while(dst>8&255;data[dst+2]=val>>16&255;data[dst+3]=isScreen?255:val>>24&255;src++;dst+=4}}else{var data32=new Uint32Array(data.buffer);if(isScreen&&SDL.defaults.opaqueFrontBuffer){num=data32.length;data32.set(HEAP32.subarray(src,src+num));var data8=new Uint8Array(data.buffer);var i=3;var j=i+4*num;if(num%8==0){while(i>0]*4;var start=base+x*4;data[start]=colors[val];data[start+1]=colors[val+1];data[start+2]=colors[val+2]}s+=width*3}}surfData.ctx.putImageData(surfData.image,0,0)}function _SDL_UpperBlit(src,srcrect,dst,dstrect){return SDL.blitSurface(src,srcrect,dst,dstrect,false)}var SYSCALLS={buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function flush_NO_FILESYSTEM(){var fflush=Module["_fflush"];if(fflush)fflush(0);var buffers=SYSCALLS.buffers;if(buffers[1].length)SYSCALLS.printChar(1,10);if(buffers[2].length)SYSCALLS.printChar(2,10)}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;jLIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize>2]=value;return value}Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.");Module["requestFullScreen"]=Module["requestFullscreen"];Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};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()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else if(typeof performance==="object"&&performance&&typeof performance["now"]==="function"){_emscripten_get_now=function(){return performance["now"]()}}else{_emscripten_get_now=Date.now}var GLctx;GL.init();var ASSERTIONS=false;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}function intArrayToString(array){var ret=[];for(var i=0;i255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{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)}}while(i>2]|0,c[k>>2]|0,32,0)|0;if(!l){m=c[2043]|0;n=c[k>>2]|0;c[g>>2]=c[h>>2];c[g+4>>2]=n;Af(m,8571,g)|0;o=0;p=0;q=0;break}m=w(0,c[h>>2]|0,c[k>>2]|0,32,255,65280,16711680,-16777216)|0;if(!m){n=c[2043]|0;s=c[k>>2]|0;c[f>>2]=c[h>>2];c[f+4>>2]=s;Af(n,8612,f)|0;o=0;p=l;q=0;break}B(m|0)|0;c[i>>2]=1;c[h+44>>2]=c[m+8>>2];n=m+12|0;c[h+48>>2]=c[n>>2];c[h+56>>2]=c[m+20>>2];s=m+16|0;c[h+60>>2]=c[s>>2];k=r(c[n>>2]|0,c[s>>2]|0)|0;c[h+64>>2]=k;c[h+52>>2]=1;k=Oe(a,b,h)|0;if(k|0){s=c[2043]|0;c[e>>2]=k;Af(s,8650,e)|0;o=m;p=l;q=0;break}D(m|0);if(!(E(m|0,0,l|0,0)|0)){o=m;p=l;q=(x(l|0)|0)==0&1}else{o=m;p=l;q=0}}else{o=0;p=0;q=0}while(0);y(o|0);y(p|0);Xc(i);j=q;Y=d;return j|0}function oa(a){a=a|0;var b=0,d=0;b=a+2360|0;pa(c[b>>2]|0);c[b>>2]=0;c[a+2364>>2]=0;b=a+2344|0;a=c[b>>2]|0;if(!a){c[b>>2]=0;return}d=a+20|0;qa(c[d>>2]|0);c[d>>2]=0;pa(a);c[b>>2]=0;return}function pa(a){a=a|0;Qe(a);return}function qa(a){a=a|0;if(!a)return;ra(a);pa(a);return}function ra(a){a=a|0;var b=0,d=0,e=0;if(!a)return;pa(c[a+160>>2]|0);pa(c[a+172>>2]|0);sa(c[a+168>>2]|0);ta(a+124|0);ta(a+136|0);b=a+120|0;d=b+56|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(d|0));b=a+16|0;pa(c[b>>2]|0);c[b>>2]=0;b=a+176|0;if((c[b>>2]|0)>0){d=0;do{e=a+180+(d*20|0)+16|0;pa(c[e>>2]|0);c[e>>2]=0;d=d+1|0}while((d|0)<(c[b>>2]|0))}c[b>>2]=0;c[a+260>>2]=0;b=a+264|0;pa(c[b>>2]|0);c[b>>2]=0;c[a+12>>2]=0;return}function sa(a){a=a|0;if(!a)return;pa(a);return}function ta(a){a=a|0;if(!a)return;pa(c[a>>2]|0);c[a>>2]=0;return}function ua(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=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;h=c[e>>2]|0;i=e+88|0;j=c[i>>2]|0;if((f|0)<0|(g|0)<1|(g+f|0)>(j|0)){k=0;return k|0}l=b+2356|0;a:do if(!(c[l>>2]|0)){m=b+2344|0;n=c[m>>2]|0;do if(!n){o=va(1,0,144)|0;c[m>>2]=o;if(!o){k=0;return k|0}o=c[e>>2]|0;p=c[i>>2]|0;q=Cf(p|0,((p|0)<0)<<31>>31|0,o|0,((o|0)<0)<<31>>31|0)|0;o=wa(q,v()|0,1)|0;c[b+2360>>2]=o;if(((o|0?(c[b+2364>>2]=o,c[b+2368>>2]=0,q=c[m>>2]|0,p=c[b+2348>>2]|0,s=c[b+2352>>2]|0,t=p+1|0,u=s+-1|0,w=q+24|0,xa(),c[q+136>>2]=o,c[q>>2]=c[e>>2],o=e+4|0,x=q+4|0,c[x>>2]=c[o>>2],s>>>0>=2):0)?(s=a[p>>0]&3,y=q+8|0,c[y>>2]=s&255,z=d[p>>0]|0,c[q+12>>2]=(2?z>>>2:z)&3,z=d[p>>0]|0,A=(4?z>>>4:z)&3,c[q+16>>2]=A,(s&255)<=1):0)?!(A>>>0>1|(d[p>>0]|0)>63):0){ya(w,520)|0;za(0,w);c[q+64>>2]=q;c[w>>2]=c[e>>2];c[q+28>>2]=c[o>>2];c[q+96>>2]=c[e+72>>2];c[q+100>>2]=c[e+76>>2];c[q+104>>2]=c[e+80>>2];c[q+108>>2]=c[e+84>>2];c[q+112>>2]=c[i>>2];if(!(c[y>>2]|0))B=u>>>0>=(r(c[x>>2]|0,c[q>>2]|0)|0)>>>0&1;else B=Aa(q,t,u)|0;if(B|0){u=c[m>>2]|0;if((c[u+16>>2]|0)==1){C=j-f|0;D=u;E=16;break}else{c[b+2372>>2]=0;C=g;D=u;E=16;break}}}}else{C=g;D=n;E=16}while(0);do if((E|0)==16){n=c[D>>2]|0;u=c[D+112>>2]|0;if(c[D+8>>2]|0){t=C+f|0;if(!(Ba(D,t)|0))break;else F=t}else{t=b+2368|0;q=c[t>>2]|0;x=r(n,f)|0;y=(c[b+2348>>2]|0)+1+x|0;o=c[b+2364>>2]|0;w=o+x|0;x=D+12|0;p=c[x>>2]|0;A=(C|0)>0;if(!p)if(A){s=C+f+-1|0;z=y;G=0;H=w;while(1){Lf(H|0,z|0,n|0)|0;G=G+1|0;if((G|0)==(C|0))break;else{z=z+n|0;H=H+n|0}}I=o+(r(n,s)|0)|0}else I=q;else if(A){H=r(n,C+f+-1|0)|0;ga[c[9472+(p<<2)>>2]&31](q,y,w,n);if((C|0)!=1){z=y;G=w;J=1;do{z=z+n|0;K=G;G=G+n|0;ga[c[9472+(c[x>>2]<<2)>>2]&31](K,z,G,n);J=J+1|0}while((J|0)!=(C|0))}I=o+H|0}else I=q;c[t>>2]=I;F=C+f|0}if((F|0)<(u|0)){if(!(c[l>>2]|0))break a}else c[l>>2]=1;J=c[m>>2]|0;if(J|0){n=J+20|0;qa(c[n>>2]|0);c[n>>2]=0;pa(J)}c[m>>2]=0;J=c[b+2372>>2]|0;if((J|0)<=0)break a;n=c[e+84>>2]|0;G=(c[b+2364>>2]|0)+(r(n,h)|0)|0;z=c[e+76>>2]|0;if(Ca(G+z|0,(c[e+80>>2]|0)-z|0,(c[i>>2]|0)-n|0,h,J)|0)break a}while(0);J=b+2360|0;pa(c[J>>2]|0);c[J>>2]=0;c[b+2364>>2]=0;J=c[m>>2]|0;if(J|0){n=J+20|0;qa(c[n>>2]|0);c[n>>2]=0;pa(J)}c[m>>2]=0;k=0;return k|0}while(0);k=(c[b+2364>>2]|0)+(r(h,f)|0)|0;return k|0}function va(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=Cf(c|0,0,a|0,b|0)|0;e=v()|0;if(!((a|0)==0&(b|0)==0)?(f=Hf(2147418112,0,a|0,b|0)|0,b=v()|0,(d|0)!=(d|0)|(e|0)!=0|(b>>>0<0|(b|0)==0&f>>>0>>0)):0){g=0;return g|0}g=Re(a,c)|0;return g|0}function wa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=Cf(c|0,0,a|0,b|0)|0;e=v()|0;if(!((a|0)==0&(b|0)==0)?(f=Hf(2147418112,0,a|0,b|0)|0,b=v()|0,(d|0)!=(d|0)|(e|0)!=0|(b>>>0<0|(b|0)==0&f>>>0>>0)):0){g=0;return g|0}g=Pe(r(a,c)|0)|0;return g|0}function xa(){if(Te(10112)|0)return;if(c[2034]|0){c[2368]=0;c[2369]=1;c[2370]=2;c[2371]=3;c[2364]=0;c[2365]=1;c[2366]=2;c[2367]=3}c[2034]=0;Ue(10112)|0;return}function ya(a,b){a=a|0;b=b|0;var d=0;if((b&-256|0)!=512){d=0;return d|0}if(!a){d=1;return d|0}b=a;a=b+108|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(a|0));d=1;return d|0}function za(a,b){a=a|0;b=b|0;c[b+44>>2]=4;c[b+48>>2]=5;c[b+52>>2]=5;c[b+40>>2]=a;return}function Aa(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=va(1,0,272)|0;if(!f){g=0;return g|0}c[f>>2]=0;c[f+4>>2]=2;_a();h=c[b>>2]|0;i=f+100|0;c[i>>2]=h;j=b+4|0;k=c[j>>2]|0;l=f+104|0;c[l>>2]=k;m=b+24|0;c[f+8>>2]=m;c[b+64>>2]=b;c[m>>2]=h;c[b+28>>2]=k;c[f>>2]=0;$a(f+24|0,d,e);if(!(ab(c[b>>2]|0,c[j>>2]|0,1,f,0)|0)){ra(f);pa(f);g=0;return g|0}a:do if(((c[f+176>>2]|0)==1?(c[f+180>>2]|0)==3:0)?(c[f+120>>2]|0)<=0:0){j=c[f+164>>2]|0;if((j|0)>0){e=c[f+168>>2]|0;d=0;do{if(a[c[e+(d*548|0)+4>>2]>>0]|0){n=14;break a}if(a[c[e+(d*548|0)+8>>2]>>0]|0){n=14;break a}if(a[c[e+(d*548|0)+12>>2]>>0]|0){n=14;break a}d=d+1|0}while((d|0)<(j|0))}c[b+132>>2]=1;j=c[i>>2]|0;d=c[l>>2]|0;e=Cf(d|0,((d|0)<0)<<31>>31|0,j|0,((j|0)<0)<<31>>31|0)|0;j=v()|0;c[f+20>>2]=0;d=wa(e,j,1)|0;c[f+16>>2]=d;if(!d){c[f>>2]=1;n=19}else n=17}else n=14;while(0);do if((n|0)==14){c[b+132>>2]=0;d=c[b>>2]|0;j=c[i>>2]|0;e=c[l>>2]|0;k=Cf(e|0,((e|0)<0)<<31>>31|0,j|0,((j|0)<0)<<31>>31|0)|0;j=v()|0;e=d&65535;h=Jf(d|0,((d|0)<0)<<31>>31|0,4)|0;d=Df(h|0,v()|0,e|0,0)|0;h=Df(d|0,v()|0,k|0,j|0)|0;j=wa(h,v()|0,4)|0;c[f+16>>2]=j;if(!j){c[f>>2]=1;c[f+20>>2]=0;n=19;break}else{c[f+20>>2]=j+(k<<2)+(e<<2);n=17;break}}while(0);if((n|0)==17){c[b+20>>2]=f;g=1;return g|0}else if((n|0)==19){ra(f);pa(f);g=0;return g|0}return 0}function Ba(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=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,Ha=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;h=c[f+20>>2]|0;if((c[h+108>>2]|0)>=(g|0)){i=1;return i|0}j=f+132|0;if(!(c[j>>2]|0)){Da();f=c[h+16>>2]|0;if(!(c[j>>2]|0)){i=Ia(h,f,c[h+100>>2]|0,c[h+104>>2]|0,g,1)|0;return i|0}else k=f}else k=c[h+16>>2]|0;f=c[h+100>>2]|0;j=h+112|0;l=c[j>>2]|0;m=(l|0)/(f|0)|0;n=l-(r(m,f)|0)|0;o=h+24|0;p=r(c[h+104>>2]|0,f)|0;q=r(f,g)|0;s=c[h+148>>2]|0;a:do if((l|0)<(q|0)){t=h+152|0;u=c[t>>2]|0;if(!u)w=0;else{x=r(c[h+156>>2]|0,u?m>>u:m)|0;w=c[(c[h+160>>2]|0)+(x+(u?n>>u:n)<<2)>>2]|0}u=h+48|0;if(!(c[u>>2]|0)){x=h+168|0;y=h+44|0;z=h+160|0;A=h+156|0;B=h+40|0;C=h+36|0;D=m;E=n;F=l;G=(c[x>>2]|0)+(w*548|0)|0;while(1){if(!(E&s)){H=c[t>>2]|0;if(!H)I=0;else{J=r(c[A>>2]|0,H?D>>H:D)|0;I=c[(c[z>>2]|0)+(J+(H?E>>H:E)<<2)>>2]|0}K=(c[x>>2]|0)+(I*548|0)|0}else K=G;H=c[y>>2]|0;if((H|0)>31){Ea(o);L=c[y>>2]|0}else L=H;H=c[K>>2]|0;J=o;M=c[J>>2]|0;N=c[J+4>>2]|0;J=If(M|0,N|0,L&63|0)|0;v()|0;O=J&255;J=H+(O<<2)|0;P=a[J>>0]|0;if((P&255)>8){Q=L+8|0;c[y>>2]=Q;R=If(M|0,N|0,Q&63|0)|0;v()|0;S=J+((e[H+(O<<2)+2>>1]|0)<<2)+(((1<<(P&255)+-8)+-1&R)<<2)|0;T=S;U=a[S>>0]|0;V=Q}else{T=J;U=P;V=L}P=V+(U&255)|0;c[y>>2]=P;J=b[T+2>>1]|0;Q=J&65535;do if((J&65535)<256){a[k+F>>0]=J;S=F+1|0;R=E+1|0;if((R|0)>=(f|0)){O=D+1|0;if((D|0)<(g|0)&(O&15|0)==0){Fa(h,O);W=S;X=O;Y=0;Z=K}else{W=S;X=O;Y=0;Z=K}}else{W=S;X=D;Y=R;Z=K}}else{if((J&65535)>=280){_=F;$=0;aa=u;break a}R=Q+-258|0;S=1?R>>1:R;if((J&65535)<260){ba=Q+-256|0;ca=P;da=M;ea=N}else{R=(Ga(o,S)|0)+(((J&1|2)&65535)<>2]|0;da=c[S>>2]|0;ea=c[S+4>>2]|0}S=ba+1|0;R=c[K+16>>2]|0;O=If(da|0,ea|0,ca&63|0)|0;v()|0;H=O&255;O=R+(H<<2)|0;fa=a[O>>0]|0;if((fa&255)>8){ga=ca+8|0;c[y>>2]=ga;ha=If(da|0,ea|0,ga&63|0)|0;v()|0;ia=O+((e[R+(H<<2)+2>>1]|0)<<2)+(((1<<(fa&255)+-8)+-1&ha)<<2)|0;ja=ia;ka=a[ia>>0]|0;la=ga}else{ja=O;ka=fa;la=ca}fa=la+(ka&255)|0;c[y>>2]=fa;O=b[ja+2>>1]|0;ga=O&65535;if((fa|0)>31)Ea(o);fa=ga+-2|0;ia=1?fa>>1:fa;if((O&65535)<4)ma=ga;else ma=(Ga(o,ia)|0)+((ga&1|2)<120)na=ma+-119|0;else{ia=d[3584+ma>>0]|0;ga=(r(4?ia>>>4:ia,f)|0)+(8-(ia&15))|0;na=(ga|0)>1?ga:1}if((p-F|0)<(S|0)|(F|0)<(na|0)){_=F;$=0;aa=u;break a}ga=k+F|0;ia=ga+(0-na)|0;b:do if((S|0)>7){switch(na|0){case 1:{O=a[ia>>0]|0;oa=r(O&255,16843009)|0;pa=O;break}case 2:{O=d[ia>>0]|d[ia+1>>0]<<8;oa=(O&65535)*65537|0;pa=O&255;break}case 4:{O=d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24;oa=O;pa=O&255;break}default:{qa=54;break b}}do if(ga&3){O=ia+1|0;fa=ga+1|0;a[ga>>0]=pa;ha=oa<<24|(8?oa>>>8:oa);if(!(fa&3)){ra=ha;sa=ba;ta=fa;ua=O;va=2?ba>>>2:ba;qa=48;break}H=O;O=fa;fa=ha;ha=ba;while(1){R=H;H=H+1|0;wa=O;O=O+1|0;a[wa>>0]=a[R>>0]|0;fa=fa<<24|(8?fa>>>8:fa);xa=ha+-1|0;if(!(O&3))break;else ha=xa}if((ha|0)>4){ra=fa;sa=xa;ta=O;ua=H;va=2?xa>>2:xa;qa=48}else{ya=0;za=xa;Aa=O;Ba=H}}else{ra=oa;sa=S;ta=ga;ua=ia;va=2?S>>>2:S;qa=48}while(0);if((qa|0)==48){qa=0;R=0;do{c[ta+(R<<2)>>2]=ra;R=R+1|0}while((R|0)<(va|0));ya=R<<2;za=sa;Aa=ta;Ba=ua}if((ya|0)>=(za|0))break;wa=ya;do{a[Aa+wa>>0]=a[Ba+wa>>0]|0;wa=wa+1|0}while((wa|0)!=(za|0))}else qa=54;while(0);do if((qa|0)==54){qa=0;if((na|0)>=(S|0)){Lf(ga|0,ia|0,S|0)|0;break}if((S|0)<=0)break;wa=0;do{a[ga+wa>>0]=a[ia+wa>>0]|0;wa=wa+1|0}while((wa|0)!=(S|0))}while(0);ia=S+F|0;ga=S+E|0;if((ga|0)<(f|0)){Ca=D;Ha=ga}else{wa=D;R=ga;while(1){ga=R-f|0;Ja=wa+1|0;if((wa|0)<(g|0)&(Ja&15|0)==0)Fa(h,Ja);if((ga|0)<(f|0)){Ca=Ja;Ha=ga;break}else{wa=Ja;R=ga}}}if((ia|0)>=(q|0)|(Ha&s|0)==0){W=ia;X=Ca;Y=Ha;Z=K;break}R=c[t>>2]|0;if(!R)Ka=0;else{wa=r(c[A>>2]|0,R?Ca>>R:Ca)|0;Ka=c[(c[z>>2]|0)+(wa+(R?Ha>>R:Ha)<<2)>>2]|0}W=ia;X=Ca;Y=Ha;Z=(c[x>>2]|0)+(Ka*548|0)|0}while(0);if(c[u>>2]|0)break;if((c[B>>2]|0)==(c[C>>2]|0))La=(c[y>>2]|0)>64&1;else La=0;c[u>>2]=La;if((W|0)<(q|0)&(La|0)==0){D=X;E=Y;F=W;G=Z}else{Ma=X;Na=W;Oa=u;qa=73;break a}}c[u>>2]=1;Ma=X;Na=W;Oa=u;qa=73}else{Ma=m;Na=l;Oa=u;qa=73}}else{Ma=m;Na=l;Oa=h+48|0;qa=73}while(0);if((qa|0)==73){Fa(h,(Ma|0)>(g|0)?g:Ma);_=Na;$=1;aa=Oa}if(!(c[aa>>2]|0))if((c[h+40>>2]|0)==(c[h+36>>2]|0))Pa=(c[h+44>>2]|0)>64&1;else Pa=0;else Pa=1;c[aa>>2]=Pa;if($|0?!((p|0)>(_|0)&(Pa|0)!=0):0){c[j>>2]=_;i=1;return i|0}c[h>>2]=(Pa|0)==0?3:5;i=0;return i|0}function Ca(c,f,g,h,i){c=c|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=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;j=Y;Y=Y+256|0;k=j;l=(i|0)/25|0;if(i>>>0>100){m=0;Y=j;return m|0}if((c|0)==0|(f|0)<1|(g|0)<1){m=0;Y=j;return m|0}i=f+-1|0;n=(l<<1|1|0)>(f|0)?(1?i>>1:i):l;l=g+-1|0;o=(n<<1|1|0)>(g|0)?(1?l>>1:l):n;n=0-o|0;if((o|0)<=0){m=1;Y=j;return m|0}p=o<<1|1;q=f<<1;s=r(p+1|0,q)|0;t=wa(1,0,q+4094+s|0)|0;if(!t){m=0;Y=j;return m|0}u=t+((r(p,f)|0)<<1)|0;v=u+(0-f<<1)|0;Nf(v|0,0,q|0)|0;w=t+s|0;s=r(p,p)|0;Nf(k|0,0,256)|0;p=0;x=c;y=255;z=0;A=0;B=255;while(1){C=0;D=y;E=z;F=B;G=A;do{H=d[x+C>>0]|0;I=(F|0)>(H|0);D=I?H:D;F=I?H:F;I=(G|0)<(H|0);E=I?H:E;G=I?H:G;a[k+H>>0]=1;C=C+1|0}while((C|0)!=(f|0));p=p+1|0;if((p|0)==(g|0))break;else{x=x+h|0;y=D;z=E;A=G;B=F}}B=t;A=w+q|0;z=262144/(s>>>0)|0;s=-1;y=0;x=0;p=G-F|0;while(1){if(a[k+y>>0]|0){F=x+1|0;if((s|0)>-1){G=y-s|0;J=y;K=F;L=(G|0)<(p|0)?G:p}else{J=y;K=F;L=p}}else{J=s;K=x;L=p}y=y+1|0;if((y|0)==256)break;else{s=J;x=K;p=L}}p=A+2046|0;A=L<<2;x=L*12|0;L=2?x>>2:x;x=A-L|0;J=1;do{if((J|0)>(L|0))if((A|0)>(J|0))M=(r(A-J|0,L)|0)/(x|0)|0;else M=0;else M=J;s=2?M>>2:M;b[p+(J<<1)>>1]=s;b[p+(0-J<<1)>>1]=0-s;J=J+1|0}while((J|0)!=1024);b[p>>1]=0;if((K|0)>2&(n|0)<(g|0)){K=(f|0)>0;J=(o|0)<0;M=f-o|0;x=o+-1|0;L=o+1|0;A=~o;s=u+(i<<1)|0;i=q+-2-o|0;q=n;n=c;y=c;c=B;k=v;while(1){v=k;k=c;if(K){F=0;G=0;do{G=(G&65535)+(d[n+F>>0]|0)|0;C=G+(e[v+(F<<1)>>1]|0)|0;H=k+(F<<1)|0;b[u+(F<<1)>>1]=C-(e[H>>1]|0);b[H>>1]=C;F=F+1|0}while((F|0)!=(f|0))}F=k+(f<<1)|0;c=(F|0)==(u|0)?B:F;n=(q|0)>-1&(q|0)<(l|0)?n+h|0:n;if((q|0)<(o|0))N=y;else{if(J)O=0;else{F=0;do{v=r((e[u+(o-F<<1)>>1]|0)+(e[u+(x+F<<1)>>1]|0)&65535,z)|0;b[w+(F<<1)>>1]=16?v>>>16:v;F=F+1|0}while((F|0)!=(L|0));O=L}if((O|0)<(M|0)){F=O;do{v=r((e[u+(F+o<<1)>>1]|0)-(e[u+(F+A<<1)>>1]|0)&65535,z)|0;b[w+(F<<1)>>1]=16?v>>>16:v;F=F+1|0}while((F|0)!=(M|0));P=M}else P=O;if((P|0)<(f|0)){F=P;do{v=r((e[s>>1]<<1)-(e[u+(i-F<<1)>>1]|0)-(e[u+(F+A<<1)>>1]|0)&65535,z)|0;b[w+(F<<1)>>1]=16?v>>>16:v;F=F+1|0}while((F|0)!=(f|0))}if(K){F=0;do{v=y+F|0;G=d[v>>0]|0;if((E|0)>(G|0)&(D|0)<(G|0)){C=(b[p+((e[w+(F<<1)>>1]|0)-(G<<2)<<1)>>1]|0)+G|0;if(C>>>0>255)Q=((31?C>>31:C)&-255)+255|0;else Q=C&255;a[v>>0]=Q}F=F+1|0}while((F|0)!=(f|0))}N=y+h|0}q=q+1|0;if((q|0)==(g|0))break;else y=N}}pa(t);m=1;Y=j;return m|0}function Da(){if(Te(9944)|0)return;c[2028]=0;Ue(9944)|0;return}function Ea(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;b=a+16|0;e=a+20|0;f=c[e>>2]|0;a:do if((f|0)>7){g=a+8|0;h=c[a+12>>2]|0;i=f;j=c[b>>2]|0;while(1){if(j>>>0>=h>>>0){k=i;break a}l=a;m=If(c[l>>2]|0,c[l+4>>2]|0,8)|0;l=v()|0;n=a;c[n>>2]=m;c[n+4>>2]=l;n=Jf(d[(c[g>>2]|0)+j>>0]|0|0,0,56)|0;o=v()|0|l;l=a;c[l>>2]=n|m;c[l+4>>2]=o;j=j+1|0;c[b>>2]=j;o=i+-8|0;c[e>>2]=o;if((i|0)<=15){k=o;break}else i=o}}else k=f;while(0);f=a+24|0;if((c[f>>2]|0)==0?((k|0)<65?1:(c[b>>2]|0)!=(c[a+12>>2]|0)):0)return;c[f>>2]=1;c[e>>2]=0;return}function Fa(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=c[a+8>>2]|0;e=c[d+40>>2]|0;f=e+12|0;g=a+108|0;h=c[((c[f>>2]|0)>>>0<2?d+84|0:g)>>2]|0;i=c[g>>2]|0;j=(i|0)<(h|0)?h:i;if((j|0)>=(b|0)){k=a+116|0;c[k>>2]=b;c[g>>2]=b;return}i=c[d>>2]|0;d=(c[e+136>>2]|0)+(r(i,j)|0)|0;Sa(a+180|0,j,b,(c[a+16>>2]|0)+(r(c[a+100>>2]|0,j)|0)|0,d);h=c[f>>2]|0;if(!h){k=a+116|0;c[k>>2]=b;c[g>>2]=b;return}l=e+140|0;e=r(i,b+-1-j|0)|0;ga[c[9472+(h<<2)>>2]&31](c[l>>2]|0,d,d,i);h=j+1|0;if((h|0)!=(b|0)){j=d;m=h;do{h=j;j=j+i|0;ga[c[9472+(c[f>>2]<<2)>>2]&31](h,j,j,i);m=m+1|0}while((m|0)!=(b|0))}c[l>>2]=d+e;k=a+116|0;c[k>>2]=b;c[g>>2]=b;return}function Ga(a,b){a=a|0;b=b|0;var 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;e=a+24|0;if(!((b|0)<25&(c[e>>2]|0)==0)){c[e>>2]=1;c[a+20>>2]=0;f=0;return f|0}g=a;h=c[g>>2]|0;i=c[g+4>>2]|0;g=a+20|0;j=c[g>>2]|0;k=If(h|0,i|0,j&63|0)|0;v()|0;l=c[3712+(b<<2)>>2]&k;k=j+b|0;c[g>>2]=k;b=a+16|0;if((k|0)<=7){f=l;return f|0}j=a+8|0;m=c[a+12>>2]|0;n=c[b>>2]|0;o=h;h=i;i=k;while(1){if(n>>>0>=m>>>0){p=i;break}k=If(o|0,h|0,8)|0;q=v()|0;r=a;c[r>>2]=k;c[r+4>>2]=q;r=Jf(d[(c[j>>2]|0)+n>>0]|0|0,0,56)|0;o=r|k;h=v()|0|q;q=a;c[q>>2]=o;c[q+4>>2]=h;n=n+1|0;c[b>>2]=n;q=i+-8|0;c[g>>2]=q;if((i|0)<=15){p=q;break}else i=q}if((p|0)<65?1:(c[b>>2]|0)!=(c[a+12>>2]|0)){f=l;return f|0}c[e>>2]=1;c[g>>2]=0;f=l;return f|0}function Ha(a,b){a=a|0;b=b|0;var 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,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=a+108|0;e=c[d>>2]|0;f=b-e|0;g=a+100|0;if((f|0)<=0){h=a+116|0;c[h>>2]=b;c[d>>2]=b;return}i=c[g>>2]|0;j=a+8|0;k=a+20|0;l=a+176|0;m=f;f=(c[a+16>>2]|0)+((r(i,e)|0)<<2)|0;n=e;o=e;e=i;while(1){i=(m|0)<16?m:16;p=c[j>>2]|0;q=c[p+40>>2]|0;s=c[p>>2]|0;p=r(s,i)|0;t=(c[q+136>>2]|0)+(r(s,n)|0)|0;u=c[k>>2]|0;v=c[l>>2]|0;w=o+i|0;if((v|0)>0){x=v+-1|0;La(a+180+(x*20|0)|0,o,w,f,u);if((v|0)!=1){v=x;do{x=v;v=v+-1|0;La(a+180+(v*20|0)|0,o,w,u,u)}while((x|0)>1)}}else if((u|0)!=(f|0))Lf(u|0,f|0,r(i<<2,e)|0)|0;Za(u,t,p);w=i+n|0;v=q+12|0;x=c[v>>2]|0;if(x|0){y=q+140|0;z=c[y>>2]|0;if((m|0)>0){A=r(s,i+-1|0)|0;ga[c[9472+(x<<2)>>2]&31](z,t,t,s);x=n+1|0;if((x|0)!=(w|0)){B=t;C=x;do{x=B;B=B+s|0;ga[c[9472+(c[v>>2]<<2)>>2]&31](x,B,B,s);C=C+1|0}while((C|0)!=(w|0))}D=t+A|0}else D=z;c[y>>2]=D}C=m-i|0;s=c[g>>2]|0;if((C|0)<=0)break;B=f+((r(s,i)|0)<<2)|0;m=C;f=B;n=w;o=c[d>>2]|0;e=s}h=a+116|0;c[h>>2]=b;c[d>>2]=b;return}function Ia(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=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,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=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2]|0)>0)Ja(w,I);$=U+8|0}if(!(V&C)){aa=c[H>>2]|0;if(!aa)ba=0;else{ca=r(c[L>>2]|0,aa?U>>aa:U)|0;ba=c[(c[K>>2]|0)+(ca+(aa?V>>aa:V)<<2)>>2]|0}da=(c[J>>2]|0)+(ba*548|0)|0}else da=Z;do if(!(c[da+28>>2]|0)){if((c[M>>2]|0)>31)Ea(p);if(!(c[da+32>>2]|0)){aa=c[da>>2]|0;ca=p;ea=c[ca>>2]|0;ga=c[ca+4>>2]|0;ca=c[M>>2]|0;ha=If(ea|0,ga|0,ca&63|0)|0;v()|0;ia=ha&255;ha=aa+(ia<<2)|0;ja=a[ha>>0]|0;if((ja&255)>8){ka=ca+8|0;c[M>>2]=ka;la=If(ea|0,ga|0,ka&63|0)|0;v()|0;ma=ha+((e[aa+(ia<<2)+2>>1]|0)<<2)+(((1<<(ja&255)+-8)+-1&la)<<2)|0;na=ma;oa=a[ma>>0]|0;pa=ka}else{na=ha;oa=ja;pa=ca}c[M>>2]=pa+(oa&255);if(!(c[O>>2]|0)){qa=e[na+2>>1]|0;ra=ea;sa=ga}else{ta=U;ua=W;va=O;wa=1;xa=111;break a}}else{ga=p;ea=c[ga>>2]|0;ca=c[ga+4>>2]|0;ga=c[M>>2]|0;ja=If(ea|0,ca|0,ga&63|0)|0;v()|0;ha=ja&63;ja=c[da+36+(ha<<3)>>2]|0;ka=c[da+36+(ha<<3)+4>>2]|0;ha=ja+ga|0;if((ja|0)<256){c[M>>2]=ha;c[W>>2]=ka;ya=0}else{c[M>>2]=ha+-256;ya=ka}if(c[O>>2]|0){ta=U;ua=W;va=O;wa=1;xa=111;break a}if((c[P>>2]|0)==(c[Q>>2]|0)?(c[M>>2]|0)>=65:0){za=U;Aa=W;Ba=O;xa=108;break a}if(!ya){Ca=X;Da=_;xa=46;break}else{qa=ya;ra=ea;sa=ca}}if((c[P>>2]|0)==(c[Q>>2]|0)?(c[M>>2]|0)>=65:0){za=U;Aa=W;Ba=O;xa=108;break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Ua&255)|0;c[M>>2]=la;if(c[O>>2]|0){ta=U;ua=W;va=O;wa=1;xa=111;break a}if(!((la|0)<65?1:(c[P>>2]|0)!=(c[Q>>2]|0))){za=U;Aa=W;Ba=O;xa=108;break a}Fa=X;Ha=_;Ia=ja<<16|qa<<8|ka|(e[Ta+2>>1]|0)<<24;xa=45;break}if((qa|0)>=280){if((qa|0)>=(x|0))break a;ka=qa+-280|0;ja=c[B>>2]|0;if(X>>>0>>0){la=W+-1+(0-_)|0;ga=2?la>>>2:la;la=X;do{ca=c[la>>2]|0;la=la+4|0;ea=c[R>>2]|0;aa=r(ca,506832829)|0;c[ja+((ea?aa>>>ea:aa)<<2)>>2]=ca}while(la>>>0>>0);la=X+4+(ga<<2)|0;Wa=la;Xa=la}else{Wa=X;Xa=_}Fa=Wa;Ha=Xa;Ia=c[ja+(ka<<2)>>2]|0;xa=45;break}la=qa+-256|0;ca=qa+-258|0;aa=1?ca>>1:ca;if((qa|0)<260){Ya=la;Za=ra;_a=sa}else{ca=(Ga(p,aa)|0)+((la&1|2)<>2]|0;_a=c[aa+4>>2]|0}aa=Ya+1|0;ca=c[da+16>>2]|0;la=c[M>>2]|0;ea=If(Za|0,_a|0,la&63|0)|0;v()|0;ia=ea&255;ea=ca+(ia<<2)|0;ha=a[ea>>0]|0;if((ha&255)>8){ma=la+8|0;c[M>>2]=ma;$a=If(Za|0,_a|0,ma&63|0)|0;v()|0;ab=ea+((e[ca+(ia<<2)+2>>1]|0)<<2)+(((1<<(ha&255)+-8)+-1&$a)<<2)|0;bb=ab;cb=a[ab>>0]|0;db=ma}else{bb=ea;cb=ha;db=la}la=db+(cb&255)|0;c[M>>2]=la;ha=b[bb+2>>1]|0;ea=ha&65535;if((la|0)>31)Ea(p);la=ea+-2|0;ma=1?la>>1:la;if((ha&65535)<4)eb=ea;else eb=(Ga(p,ma)|0)+((ea&1|2)<120)fb=eb+-119|0;else{ma=d[3584+eb>>0]|0;ea=(r(4?ma>>>4:ma,h)|0)+(8-(ma&15))|0;fb=(ea|0)>1?ea:1}if(c[O>>2]|0){ta=U;ua=W;va=O;wa=1;xa=111;break a}if((c[P>>2]|0)==(c[Q>>2]|0)?(c[M>>2]|0)>=65:0){za=U;Aa=W;Ba=O;xa=108;break a}ea=W;ma=ea-D|0;if(((2?ma>>2:ma)|0)<(fb|0))break a;ma=S-ea|0;if(((2?ma>>2:ma)|0)<(aa|0))break a;ma=W+(0-fb<<2)|0;do if((ea&3|0)==0&((aa|0)>3&(fb|0)<3)){if((fb|0)==1){ha=c[ma>>2]|0;gb=ha;hb=ha;ib=ha}else{ha=ma;la=c[ha>>2]|0;gb=la;hb=la;ib=c[ha+4>>2]|0}if(!(ea&4)){jb=aa;kb=W;lb=ma;mb=hb;nb=ib}else{c[W>>2]=gb;jb=Ya;kb=W+4|0;lb=ma+4|0;mb=ib;nb=hb}ha=1?jb>>>1:jb;la=0;do{ab=kb+(la<<3)|0;c[ab>>2]=mb;c[ab+4>>2]=nb;la=la+1|0}while(la>>>0>>0);ha=la<<1;if(!(jb&1))break;c[kb+(ha<<2)>>2]=c[lb+(ha<<2)>>2]}else{if((fb|0)>=(aa|0)){Lf(W|0,ma|0,aa<<2|0)|0;break}if((aa|0)<=0)break;ha=0;do{c[W+(ha<<2)>>2]=c[ma+(ha<<2)>>2];ha=ha+1|0}while((ha|0)!=(aa|0))}while(0);ma=W+(aa<<2)|0;ea=aa+V|0;b:do if((ea|0)<(h|0)){ob=U;pb=ea}else{if(T){ka=ea;ja=U;while(1){ga=ka-h|0;ha=ja+1|0;if((ga|0)<(h|0)){ob=ha;pb=ga;break b}else{ka=ga;ja=ha}}}ja=ea;ka=U;while(1){ha=ja-h|0;ga=ka+1|0;if((ka|0)<(j|0)&(ga&15|0)==0)fa[k&3](f,ga);if((ha|0)<(h|0)){ob=ga;pb=ha;break}else{ja=ha;ka=ga}}}while(0);if(!(pb&C))qb=da;else{ea=c[H>>2]|0;if(!ea)rb=0;else{aa=r(c[L>>2]|0,ea?ob>>ea:ob)|0;rb=c[(c[K>>2]|0)+(aa+(ea?pb>>ea:pb)<<2)>>2]|0}qb=(c[J>>2]|0)+(rb*548|0)|0}if(!(A&X>>>0>>0)){sb=ma;tb=ob;ub=pb;vb=qb;wb=X;break}ea=c[B>>2]|0;aa=W+3+((Ya<<2)-_)|0;ka=2?aa>>>2:aa;aa=X;do{ja=c[aa>>2]|0;aa=aa+4|0;ga=c[R>>2]|0;ha=r(ja,506832829)|0;c[ea+((ga?ha>>>ga:ha)<<2)>>2]=ja}while(aa>>>0>>0);sb=ma;tb=ob;ub=pb;vb=qb;wb=X+4+(ka<<2)|0}else{Fa=X;Ha=_;Ia=c[da+24>>2]|0;xa=45}while(0);if((xa|0)==45){xa=0;c[W>>2]=Ia;Ca=Fa;Da=Ha;xa=46}if((xa|0)==46){xa=0;_=W+4|0;aa=V+1|0;if((aa|0)>=(h|0)){ea=U+1|0;if(N&(U|0)<(j|0)&(ea&15|0)==0)fa[k&3](f,ea);if(A&Ca>>>0<_>>>0){ja=c[B>>2]|0;ha=(Ca>>>0>W>>>0?Ca:W)+3+(0-Da)|0;ga=2?ha>>>2:ha;ha=Ca;while(1){la=c[ha>>2]|0;ab=c[R>>2]|0;$a=r(la,506832829)|0;c[ja+((ab?$a>>>ab:$a)<<2)>>2]=la;if(ha>>>0>>0)ha=ha+4|0;else break}sb=_;tb=ea;ub=0;vb=da;wb=Ca+4+(ga<<2)|0}else{sb=_;tb=ea;ub=0;vb=da;wb=Ca}}else{sb=_;tb=U;ub=aa;vb=da;wb=Ca}}if(sb>>>0>>0){U=tb;V=ub;W=sb;X=wb;Y=$;Z=vb}else{za=tb;Aa=sb;Ba=O;xa=108;break}}}else{za=n;Aa=q;Ba=f+48|0;xa=108}while(0);if((xa|0)==108)if(!(c[Ba>>2]|0))if((c[f+40>>2]|0)==(c[f+36>>2]|0)){ta=za;ua=Aa;va=Ba;wa=(c[f+44>>2]|0)>64&1;xa=111}else{ta=za;ua=Aa;va=Ba;wa=0;xa=111}else{ta=za;ua=Aa;va=Ba;wa=1;xa=111}if((xa|0)==111){c[va>>2]=wa;va=(wa|0)==0;if(ua>>>0>>0&((va|(c[y>>2]|0)==0)^1)){c[f>>2]=5;y=f+64|0;c[p>>2]=c[y>>2];c[p+4>>2]=c[y+4>>2];c[p+8>>2]=c[y+8>>2];c[p+12>>2]=c[y+12>>2];c[p+16>>2]=c[y+16>>2];c[p+20>>2]=c[y+20>>2];c[p+24>>2]=c[y+24>>2];c[p+28>>2]=c[y+28>>2];c[l>>2]=c[f+96>>2];if((c[u>>2]|0)<=0){xb=1;return xb|0}Ja(f+136|0,w);xb=1;return xb|0}if(va){if(k|0)fa[k&3](f,(ta|0)>(j|0)?j:ta);c[f>>2]=0;ta=ua-g|0;c[l>>2]=2?ta>>2:ta;xb=1;return xb|0}}c[f>>2]=3;xb=0;return xb|0}function Ja(a,b){a=a|0;b=b|0;Lf(c[b>>2]|0,c[a>>2]|0,4<>2]|0)|0;return}function Ka(a,b){a=a|0;b=b|0;var 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,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;d=a+108|0;e=c[d>>2]|0;f=b-e|0;if((f|0)<=0){c[d>>2]=b;return}g=c[a+100>>2]|0;h=(c[a+16>>2]|0)+((r(g,e)|0)<<2)|0;i=c[a+8>>2]|0;j=c[a+20>>2]|0;k=c[i>>2]<<2;l=c[a+176>>2]|0;m=j;if((l|0)>0){n=l+-1|0;La(a+180+(n*20|0)|0,e,b,h,m);if((l|0)!=1){l=n;do{n=l;l=l+-1|0;La(a+180+(l*20|0)|0,e,b,m,m)}while((n|0)>1)}}else if((h|0)!=(m|0))Lf(j|0,h|0,r(f<<2,g)|0)|0;g=c[d>>2]|0;f=c[i+88>>2]|0;h=(f|0)<(b|0)?f:b;f=c[i+84>>2]|0;m=(f|0)>(g|0);e=m?f:g;if((h|0)<=(e|0)){c[d>>2]=b;return}l=j+(r(f-g|0,k)|0)|0;g=c[i+76>>2]|0;n=(m?l:j)+(g<<2)|0;c[i+8>>2]=e-f;f=(c[i+80>>2]|0)-g|0;c[i+12>>2]=f;g=h-e|0;c[i+16>>2]=g;e=a+12|0;h=c[e>>2]|0;j=c[h>>2]|0;if(j>>>0<=10){l=a+116|0;m=c[h+20>>2]|0;o=(c[h+16>>2]|0)+(r(m,c[l>>2]|0)|0)|0;p=(g|0)>0;if(!(c[i+92>>2]|0))if(p){q=g;s=n;t=o;while(1){Qa(s,f,j,t);if((q|0)>1){q=q+-1|0;s=s+k|0;t=t+m|0}else{u=g;break}}}else u=g;else if(p){p=a+268|0;t=0;s=0;while(1){q=n+(r(s,k)|0)|0;v=o+(r(t,m)|0)|0;w=g-s|0;x=Ma(c[p>>2]|0,w)|0;Na(q,k,c[(c[p>>2]|0)+44>>2]|0,x,0);s=(Oa(c[p>>2]|0,w,q,k)|0)+s|0;q=c[p>>2]|0;w=c[q+68>>2]|0;x=c[q+52>>2]|0;y=q+24|0;z=q+56|0;A=q+64|0;a:do if((c[A>>2]|0)<(c[z>>2]|0)){B=0;while(1){if((c[y>>2]|0)>0){C=B;break a}D=v+(r(B,m)|0)|0;Pa(q);Ta(w,x,1);Qa(w,x,j,D);D=B+1|0;if((c[A>>2]|0)<(c[z>>2]|0))B=D;else{C=D;break}}}else C=0;while(0);z=C+t|0;if((s|0)>=(g|0)){u=z;break}else t=z}}else u=0;c[l>>2]=(c[l>>2]|0)+u;c[d>>2]=b;return}u=a+116|0;l=c[u>>2]|0;t=(g|0)>0;b:do if(!(c[i+92>>2]|0))if(t){s=g;C=n;j=l;m=h;while(1){Ae(C,(c[m+16>>2]|0)+(r(c[m+32>>2]|0,j)|0)|0,f);p=1?j>>1:j;o=(c[m+20>>2]|0)+(r(c[m+36>>2]|0,p)|0)|0;Be(C,o,(c[m+24>>2]|0)+(r(c[m+40>>2]|0,p)|0)|0,f,j&1^1);p=c[m+28>>2]|0;if(p|0)Ya(C+3|0,0,f,1,p+(r(c[m+44>>2]|0,j)|0)|0,0)|0;p=j+1|0;if((s|0)<=1){E=p;break b}s=s+-1|0;C=C+k|0;j=p;m=c[e>>2]|0}}else E=l;else if(t){m=a+268|0;j=0;C=l;s=n;while(1){p=g-j|0;o=Ma(c[m>>2]|0,p)|0;Na(s,k,c[(c[m>>2]|0)+44>>2]|0,o,0);j=(Oa(c[m>>2]|0,p,s,k)|0)+j|0;s=s+(r(o,k)|0)|0;o=c[m>>2]|0;p=c[o+68>>2]|0;z=c[o+52>>2]|0;A=o+24|0;x=o+56|0;w=o+64|0;c:do if((c[w>>2]|0)<(c[x>>2]|0)){q=p+3|0;v=C;y=0;while(1){if((c[A>>2]|0)>0){F=y;break c}Pa(o);Ta(p,z,1);B=c[e>>2]|0;Ae(p,(c[B+16>>2]|0)+(r(c[B+32>>2]|0,v)|0)|0,z);D=1?v>>1:v;G=(c[B+20>>2]|0)+(r(c[B+36>>2]|0,D)|0)|0;Be(p,G,(c[B+24>>2]|0)+(r(c[B+40>>2]|0,D)|0)|0,z,v&1^1);D=c[B+28>>2]|0;if(D|0)Ya(q,0,z,1,D+(r(c[B+44>>2]|0,v)|0)|0,0)|0;B=y+1|0;if((c[w>>2]|0)<(c[x>>2]|0)){v=v+1|0;y=B}else{F=B;break}}}else F=0;while(0);x=F+C|0;if((j|0)>=(g|0)){E=x;break}else C=x}}else E=l;while(0);c[u>>2]=E;c[d>>2]=b;return}function La(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=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;h=Y;Y=Y+16|0;i=h;j=b+8|0;k=c[j>>2]|0;switch(c[b>>2]|0){case 2:{Ib(f,r(k,e-d|0)|0,g);Y=h;return}case 0:{if(!d){l=c[f>>2]|0;m=l+-16777216&-16711936|l&16711935;c[g>>2]=m;l=f+4|0;n=k+-1|0;o=g+4|0;if((k|0)>1){p=0;q=m;do{m=c[l+(p<<2)>>2]|0;q=(m&-16711936)+(q&-16711936)&-16711936|(m&16711935)+(q&16711935)&16711935;c[o+(p<<2)>>2]=q;p=p+1|0}while((p|0)!=(n|0))}s=1;t=f+(k<<2)|0;u=g+(k<<2)|0;v=n}else{s=d;t=f;u=g;v=k+-1|0}n=c[b+4>>2]|0;p=1<>>n:o;a:do if((s|0)<(e|0)){o=0-k|0;l=0-p|0;if((k|0)<=1){m=s;w=t;x=u;while(1){y=c[x+(o<<2)>>2]|0;z=c[w>>2]|0;c[x>>2]=(z&-16711936)+(y&-16711936)&-16711936|(z&16711935)+(y&16711935)&16711935;m=m+1|0;if((m|0)==(e|0))break a;else{w=w+(k<<2)|0;x=x+(k<<2)|0}}}x=(c[b+16>>2]|0)+((r(v,n?s>>n:s)|0)<<2)|0;w=s;m=t;y=u;while(1){z=c[y+(o<<2)>>2]|0;A=c[m>>2]|0;c[y>>2]=(A&-16711936)+(z&-16711936)&-16711936|(A&16711935)+(z&16711935)&16711935;z=1;A=x;while(1){B=c[A>>2]|0;C=(z&l)+p|0;D=z;z=(C|0)>(k|0)?k:C;E=y+(D<<2)|0;ga[c[9488+(((8?B>>>8:B)&15)<<2)>>2]&31](m+(D<<2)|0,E+(o<<2)|0,z-D|0,E);if((k|0)<=(C|0))break;else A=A+4|0}A=w+1|0;if((A|0)==(e|0))break;else{x=(A&q|0)==0?x+(v<<2)|0:x;w=A;m=m+(k<<2)|0;y=y+(k<<2)|0}}}while(0);if((c[b+12>>2]|0)==(e|0)){Y=h;return}Lf(g+(0-k<<2)|0,g+((r(k,~d+e|0)|0)<<2)|0,k<<2|0)|0;Y=h;return}case 1:{v=c[b+4>>2]|0;q=1<>>v:s;if((e|0)<=(d|0)){Y=h;return}s=(c[b+16>>2]|0)+((r(n,v?d>>v:d)|0)<<2)|0;v=i+1|0;y=i+2|0;if((u|0)<=0){m=(k|0)>0;w=g;x=s;o=d;l=f;while(1){a[i>>0]=0;a[i+1>>0]=0;a[i+2>>0]=0;if(m){A=c[x>>2]|0;a[i>>0]=A;a[v>>0]=8?A>>>8:A;a[y>>0]=16?A>>>16:A;Jb(i,l,t,w);F=l+(t<<2)|0;G=w+(t<<2)|0}else{F=l;G=w}A=o+1|0;if((A|0)==(e|0))break;else{w=G;x=(A&p|0)==0?x+(n<<2)|0:x;o=A;l=F}}Y=h;return}F=g;l=s;s=d;o=f;while(1){a[i>>0]=0;a[i+1>>0]=0;a[i+2>>0]=0;x=o+(u<<2)|0;G=l;w=o;m=F;do{A=G;G=G+4|0;z=c[A>>2]|0;a[i>>0]=z;a[v>>0]=8?z>>>8:z;a[y>>0]=16?z>>>16:z;Jb(i,w,q,m);w=w+(q<<2)|0;m=m+(q<<2)|0}while(w>>>0>>0);if(w>>>0<(o+(k<<2)|0)>>>0){x=c[G>>2]|0;a[i>>0]=x;a[v>>0]=8?x>>>8:x;a[y>>0]=16?x>>>16:x;Jb(i,w,t,m);H=w+(t<<2)|0;I=m+(t<<2)|0}else{H=w;I=m}x=s+1|0;if((x|0)==(e|0))break;else{F=I;l=(x&p|0)==0?l+(n<<2)|0:l;s=x;o=H}}Y=h;return}case 3:{H=b+4|0;o=c[H>>2]|0;if((f|0)==(g|0)&(o|0)>0){s=e-d|0;l=r(k,s)|0;n=k+-1+(1<>>o:n,s)|0;s=f+(l<<2)+(0-p<<2)|0;Mf(s|0,f|0,p<<2|0)|0;p=c[H>>2]|0;H=c[j>>2]|0;j=c[b+16>>2]|0;l=p?8>>>p:8;if((l|0)>=8){Pb(s,j,f,d,e,H);Y=h;return}n=(1<(d|0)&(H|0)>0)){Y=h;return}I=s;s=f;F=d;while(1){t=0;i=0;y=I;v=s;while(1){if(!(t&n)){q=c[y>>2]|0;J=(8?q>>>8:q)&255;K=y+4|0}else{J=i;K=y}c[v>>2]=c[j+((J&p)<<2)>>2];t=t+1|0;if((t|0)==(H|0))break;else{i=l?J>>>l:J;y=K;v=v+4|0}}F=F+1|0;if((F|0)==(e|0))break;else{I=K;s=s+(H<<2)|0}}Y=h;return}else{H=c[b+16>>2]|0;b=o?8>>>o:8;if((b|0)>=8){Pb(f,H,g,d,e,k);Y=h;return}s=(1<(d|0)&(k|0)>0)){Y=h;return}K=f;f=g;g=d;while(1){d=0;I=0;F=K;J=f;while(1){if(!(d&s)){l=c[F>>2]|0;L=(8?l>>>8:l)&255;M=F+4|0}else{L=I;M=F}c[J>>2]=c[H+((L&o)<<2)>>2];d=d+1|0;if((d|0)==(k|0))break;else{I=b?L>>>b:L;F=M;J=J+4|0}}g=g+1|0;if((g|0)==(e|0))break;else{K=M;f=f+(k<<2)|0}}Y=h;return}break}default:{Y=h;return}}}function Ma(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+32>>2]|0;e=((c[a+24>>2]|0)+-1+d|0)/(d|0)|0;return ((e|0)>(b|0)?b:e)|0}function Na(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;if((d|0)<=0)return;f=0;g=a;while(1){Ta(g,c,e);f=f+1|0;if((f|0)==(d|0))break;else g=g+b|0}return}function Oa(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;f=a+24|0;if((b|0)<=0){g=0;return g|0}h=a+56|0;i=a+64|0;j=a+4|0;k=a+76|0;l=a+80|0;m=a+8|0;n=a+52|0;o=a+60|0;p=a+32|0;q=d;d=0;while(1){if((c[i>>2]|0)<(c[h>>2]|0)?(c[f>>2]|0)<=0:0){g=d;s=12;break}if(c[j>>2]|0){t=c[k>>2]|0;c[k>>2]=c[l>>2];c[l>>2]=t}Ra(a,q);if((c[j>>2]|0)==0?(r(c[n>>2]|0,c[m>>2]|0)|0)>0:0){t=c[l>>2]|0;u=c[k>>2]|0;v=0;do{w=u+(v<<2)|0;c[w>>2]=(c[w>>2]|0)+(c[t+(v<<2)>>2]|0);v=v+1|0}while((v|0)<(r(c[n>>2]|0,c[m>>2]|0)|0))}c[o>>2]=(c[o>>2]|0)+1;v=d+1|0;c[f>>2]=(c[f>>2]|0)-(c[p>>2]|0);if((v|0)<(b|0)){q=q+e|0;d=v}else{g=v;s=12;break}}if((s|0)==12)return g|0;return 0}function Pa(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=b+24|0;if((c[d>>2]|0)>=1)return;do if(!(c[b+4>>2]|0)){if(c[b+20>>2]|0){Cc(b);break}e=b+8|0;f=b+52|0;if((r(c[f>>2]|0,c[e>>2]|0)|0)>0){g=b+76|0;h=b+68|0;i=0;j=c[g>>2]|0;do{a[(c[h>>2]|0)+i>>0]=c[j+(i<<2)>>2];j=c[g>>2]|0;c[j+(i<<2)>>2]=0;i=i+1|0}while((i|0)<(r(c[f>>2]|0,c[e>>2]|0)|0))}}else Bc(b);while(0);c[d>>2]=(c[d>>2]|0)+(c[b+28>>2]|0);d=b+68|0;c[d>>2]=(c[d>>2]|0)+(c[b+72>>2]|0);d=b+64|0;c[d>>2]=(c[d>>2]|0)+1;return}function Qa(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;do switch(e|0){case 0:{Lb(b,d,f);return}case 1:{Kb(b,d,f);return}case 7:{Kb(b,d,f);Wa(f,0,d,1,0);return}case 2:{Mb(b,d,f);return}case 3:{Lf(f|0,b|0,d<<2|0)|0;return}case 8:{Lf(f|0,b|0,d<<2|0)|0;Wa(f,0,d,1,0);return}case 4:{g=b+(d<<2)|0;if((d|0)<=0)return;h=f;i=b;while(1){j=Kf(c[i>>2]|0)|0;i=i+4|0;a[h>>0]=j;a[h+1>>0]=j>>8;a[h+2>>0]=j>>16;a[h+3>>0]=j>>24;if(i>>>0>=g>>>0)break;else h=h+4|0}return}case 9:{h=b+(d<<2)|0;if((d|0)>0){g=f;i=b;while(1){j=Kf(c[i>>2]|0)|0;i=i+4|0;a[g>>0]=j;a[g+1>>0]=j>>8;a[g+2>>0]=j>>16;a[g+3>>0]=j>>24;if(i>>>0>=h>>>0)break;else g=g+4|0}}Wa(f,1,d,1,0);return}case 5:{Nb(b,d,f);return}case 10:{Nb(b,d,f);Va(f,d,1,0);return}case 6:{Ob(b,d,f);return}default:return}while(0)}function Ra(a,b){a=a|0;b=b|0;if(!(c[a>>2]|0)){Ec(a,b);return}else{Dc(a,b);return}}function Sa(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=c[b+4>>2]|0;j=i?8>>>i:8;k=c[b+8>>2]|0;l=c[b+16>>2]|0;if((j|0)>=8){Qb(g,l,h,e,f,k);return}b=(1<0))return;m=g;g=h;h=e;while(1){e=0;n=0;o=m;p=g;while(1){if(!(n&b)){q=d[o>>0]|0;r=o+1|0}else{q=e;r=o}s=c[l+((q&i)<<2)>>2]|0;a[p>>0]=8?s>>>8:s;n=n+1|0;if((n|0)==(k|0))break;else{e=j?q>>>j:q;o=r;p=p+1|0}}h=h+1|0;if((h|0)==(f|0))break;else{m=r;g=g+k|0}}return}function Ta(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((b|0)<=0)return;if(!d){d=0;do{e=a+(d<<2)|0;f=c[e>>2]|0;if(f>>>0<4278190080){if(f>>>0<16777216)g=0;else{h=(24?f>>>24:f)*65793|0;i=(r(h,f&255)|0)+8388608|0;j=(r(h,(8?f>>>8:f)&255)|0)+8388608|0;k=(r(h,(16?f>>>16:f)&255)|0)+8388608|0;g=(24?i>>>24:i)|f&-16777216|(24?j>>>24:j)<<8|(24?k>>>24:k)<<16}c[e>>2]=g}d=d+1|0}while((d|0)!=(b|0));return}else{d=0;do{g=a+(d<<2)|0;e=c[g>>2]|0;if(e>>>0<4278190080){if(e>>>0<16777216)l=0;else{k=4278190080/((24?e>>>24:e)>>>0)|0;j=(r(k,e&255)|0)+8388608|0;f=(r(k,(8?e>>>8:e)&255)|0)+8388608|0;i=(r(k,(16?e>>>16:e)&255)|0)+8388608|0;l=(24?j>>>24:j)|e&-16777216|(24?f>>>24:f)<<8|(24?i>>>24:i)<<16}c[g>>2]=l}d=d+1|0}while((d|0)!=(b|0));return}}function Ua(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((e|0)<=0)return;if(!f){f=0;do{g=a[c+f>>0]|0;switch(g<<24>>24){case -1:break;case 0:{a[b+f>>0]=0;break}default:{h=b+f|0;i=(r((g&255)*65793|0,d[h>>0]|0)|0)+8388608|0;a[h>>0]=24?i>>>24:i}}f=f+1|0}while((f|0)!=(e|0));return}else{f=0;do{i=a[c+f>>0]|0;switch(i<<24>>24){case -1:break;case 0:{a[b+f>>0]=0;break}default:{h=b+f|0;g=(r(4278190080/((i&255)>>>0)|0,d[h>>0]|0)|0)+8388608|0;a[h>>0]=24?g>>>24:g}}f=f+1|0}while((f|0)!=(e|0));return}}function Va(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if(!((c|0)>0&(e|0)>0))return;g=b;b=e;while(1){e=0;do{h=e<<1;i=g+h|0;j=g+(h|1)|0;h=a[j>>0]|0;k=h&15;l=(k&255)*4369|0;m=d[i>>0]|0;n=r(l,m&240|(4?m>>>4:m))|0;o=r(m<<4&240|m&15,l)|0;m=h&255;h=r(m&240|(4?m>>>4:m),l)|0;a[i>>0]=(20?o>>>20:o)&15|(16?n>>>16:n)&240;a[j>>0]=(16?h>>>16:h)&255&-16|k;e=e+1|0}while((e|0)!=(c|0));if((b|0)>1){g=g+f|0;b=b+-1|0}else break}return}function Wa(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((f|0)<=0)return;h=(c|0)!=0;c=h&1;i=h?0:3;if((e|0)<=0)return;h=b;b=f;while(1){f=b;b=b+-1|0;j=h+c|0;k=h+i|0;l=0;do{m=l<<2;n=a[k+m>>0]|0;if(n<<24>>24!=-1){o=(n&255)*32897|0;n=j+m|0;p=r(o,d[n>>0]|0)|0;a[n>>0]=23?p>>>23:p;p=j+(m|1)|0;n=r(o,d[p>>0]|0)|0;a[p>>0]=23?n>>>23:n;n=j+(m|2)|0;m=r(o,d[n>>0]|0)|0;a[n>>0]=23?m>>>23:m}l=l+1|0}while((l|0)!=(e|0));if((f|0)<=1)break;else h=h+g|0}return}function Xa(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;if(!((e|0)>0&(d|0)>0)){h=0;return h|0}i=0;j=255;k=f;f=b;while(1){b=0;l=j;do{m=a[f+b>>0]|0;a[k+(b<<2)>>0]=m;l=l&(m&255);b=b+1|0}while((b|0)!=(d|0));i=i+1|0;if((i|0)==(e|0))break;else{j=l;k=k+g|0;f=f+c|0}}h=(l|0)!=255&1;return h|0}function Ya(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;if(!((e|0)>0&(d|0)>0)){h=1;return h|0}i=0;j=-1;k=f;f=b;while(1){b=0;l=j;do{m=a[f+(b<<2)>>0]|0;a[k+b>>0]=m;l=m&l;b=b+1|0}while((b|0)!=(d|0));i=i+1|0;if((i|0)==(e|0))break;else{j=l;k=k+g|0;f=f+c|0}}h=l<<24>>24==-1&1;return h|0}function Za(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;if((e|0)<=0)return;f=0;do{g=c[b+(f<<2)>>2]|0;a[d+f>>0]=8?g>>>8:g;f=f+1|0}while((f|0)!=(e|0));return}function _a(){if(Te(9972)|0)return;if(c[2029]|0){c[2388]=1;c[2389]=2;c[2390]=3;c[2391]=4;c[2392]=5;c[2393]=6;c[2394]=7;c[2395]=8;c[2396]=9;c[2397]=10;c[2398]=11;c[2399]=12;c[2400]=13;c[2401]=14;c[2402]=1;c[2403]=1;c[2420]=1;c[2421]=2;c[2422]=3;c[2423]=4;c[2424]=5;c[2425]=6;c[2426]=7;c[2427]=8;c[2428]=9;c[2429]=10;c[2430]=11;c[2431]=12;c[2432]=13;c[2433]=14;c[2434]=1;c[2435]=1;c[2372]=4;c[2373]=5;c[2374]=6;c[2375]=7;c[2376]=8;c[2377]=9;c[2378]=10;c[2379]=11;c[2380]=12;c[2381]=13;c[2382]=14;c[2383]=15;c[2384]=16;c[2385]=17;c[2386]=4;c[2387]=4;c[2404]=4;c[2405]=5;c[2406]=6;c[2407]=7;c[2408]=8;c[2409]=9;c[2410]=10;c[2411]=11;c[2412]=12;c[2413]=13;c[2414]=14;c[2415]=15;c[2416]=16;c[2417]=17;c[2418]=4;c[2419]=4}c[2029]=0;Ue(9972)|0;return}function $a(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;c[a+12>>2]=e;f=a;c[f>>2]=0;c[f+4>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;f=e>>>0<8?e:8;if(!f){g=0;h=0}else{e=0;i=0;j=0;while(1){k=Jf(d[b+e>>0]|0|0,0,e<<3|0)|0;l=k|i;k=v()|0|j;e=e+1|0;if(e>>>0>=f>>>0){g=l;h=k;break}else{i=l;j=k}}}j=a;c[j>>2]=g;c[j+4>>2]=h;c[a+16>>2]=f;c[a+8>>2]=b;return}function ab(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=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,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,qa=0,ra=0,ua=0,xa=0,ya=0,za=0,Aa=0,Ba=0;k=Y;Y=Y+16|0;l=k;m=i+24|0;n=i+120|0;o=(h|0)!=0;a:do if(o){p=i+176|0;q=i+260|0;s=f;while(1){if(!(Ga(m,1)|0)){t=s;u=18;break a}w=c[p>>2]|0;x=Ga(m,2)|0;y=c[q>>2]|0;z=1<>2]=y|z;c[i+180+(w*20|0)>>2]=x;z=i+180+(w*20|0)+8|0;c[z>>2]=s;y=i+180+(w*20|0)+12|0;c[y>>2]=g;A=i+180+(w*20|0)+16|0;c[A>>2]=0;c[p>>2]=(c[p>>2]|0)+1;switch(x|0){case 1:case 0:{x=(Ga(m,3)|0)+2|0;c[i+180+(w*20|0)+4>>2]=x;B=(1<>2]|0)|0;D=B+(c[y>>2]|0)|0;E=ab(x?C>>>x:C,x?D>>>x:D,0,i,A)|0;F=s;break}case 3:{D=(Ga(m,8)|0)+1|0;if((D|0)>16)G=0;else G=(D|0)>4?1:(D|0)>2?2:3;x=(c[z>>2]|0)+-1+(1<>>G:x;x=i+180+(w*20|0)+4|0;c[x>>2]=G;if(!(ab(D,1,0,i,A)|0)){u=73;break a}w=c[x>>2]|0;x=1<<(w?8>>>w:8);w=wa(x,((x|0)<0)<<31>>31,4)|0;if(!w){u=73;break a}C=c[A>>2]|0;c[w>>2]=c[C>>2];y=D<<2;if((D|0)>1){D=4;while(1){a[w+D>>0]=(d[w+(D+-4)>>0]|0)+(d[C+D>>0]|0);B=D+1|0;if((B|0)<(y|0))D=B;else{H=B;break}}}else H=4;D=x<<2;if((D|0)>(H|0))Nf(w+H|0,0,D-H|0)|0;pa(c[A>>2]|0);c[A>>2]=w;E=1;F=z;break}default:{E=1;F=s}}if(!E){u=73;break a}else s=F}}else{t=f;u=18}while(0);do if((u|0)==18){if(Ga(m,1)|0){f=Ga(m,4)|0;if((f+-1|0)>>>0<11)I=f;else{c[i>>2]=3;J=0;break}}else I=0;c[l>>2]=0;f=e[3824+(I<<1)>>1]|0;do if((h|0)!=0?(Ga(m,1)|0)!=0:0){F=(Ga(m,3)|0)+2|0;E=(1<>>F:H;H=E+g|0;E=F?H>>>F:H;H=r(G,E)|0;if(ab(G,E,0,i,l)|0){c[i+152>>2]=F;F=(H|0)>0;if(F){E=c[l>>2]|0;G=0;s=1;while(1){p=E+(G<<2)|0;q=c[p>>2]|0;D=(8?q>>>8:q)&65535;c[p>>2]=D;p=(D|0)<(s|0)?s:D+1|0;G=G+1|0;if((G|0)==(H|0)){K=p;break}else s=p}}else K=1;if((K|0)>1e3|(K|0)>(r(t,g)|0)){s=wa(K,((K|0)<0)<<31>>31,4)|0;if(!s){c[i>>2]=1;L=0;M=0;N=1;O=0;P=0;break}Nf(s|0,-1,K<<2|0)|0;if(F){G=c[l>>2]|0;E=0;z=0;while(1){w=G+(z<<2)|0;A=s+(c[w>>2]<<2)|0;x=c[A>>2]|0;if((x|0)==-1){c[A>>2]=E;Q=E+1|0;R=E}else{Q=E;R=x}c[w>>2]=R;z=z+1|0;if((z|0)==(H|0)){S=s;T=K;U=Q;V=s;u=35;break}else E=Q}}else{S=s;T=K;U=0;V=s;u=35}}else{S=0;T=K;U=K;V=0;u=35}}else{L=0;M=0;N=1;O=0;P=0}}else{S=0;T=1;U=1;V=0;u=35}while(0);b:do if((u|0)==35)if(!(c[i+48>>2]|0)){E=(I|0)>0;H=1<-24?H+280|0:256;W=(z|0)>40?z:40;X=0}else{W=280;X=0}z=va(W,X,4)|0;G=r(U,f)|0;F=wa(G,((G|0)<0)<<31>>31,4)|0;G=bb(U)|0;if((F|0)==0|((z|0)==0|(G|0)==0)){c[i>>2]=1;L=G;M=F;N=1;O=z;P=V;break}if((T|0)>0){w=(S|0)==0;x=H+280|0;A=(H|0)>-279;p=H+280|0;H=F;D=0;while(1){do if(!w){q=c[S+(D<<2)>>2]|0;if((q|0)==-1)if(E){if(!(cb(p,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(40,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}else{Z=H;break}}else{if(!(cb(280,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(256,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}if(!(cb(40,i,z,0)|0)){L=G;M=F;N=1;O=z;P=V;break b}else{Z=H;break}}else{_=q;u=49}}else{_=D;u=49}while(0);do if((u|0)==49){u=0;q=G+(_*548|0)|0;c[q>>2]=H;if(E){y=cb(x,i,z,H)|0;if(!y){L=G;M=F;N=1;O=z;P=V;break b}C=d[H>>0]|0;B=H+(y<<2)|0;y=c[z>>2]|0;if(A){$=1;aa=y;while(1){ba=c[z+($<<2)>>2]|0;ca=(ba|0)>(aa|0)?ba:aa;$=$+1|0;if(($|0)==(x|0)){da=ca;break}else aa=ca}}else da=y;c[G+(_*548|0)+4>>2]=B;aa=cb(256,i,z,B)|0;if(!aa){L=G;M=F;N=1;O=z;P=V;break b}$=a[B>>0]|0;ca=C+($&255)|0;ba=B+(aa<<2)|0;aa=1;ea=c[z>>2]|0;do{fa=c[z+(aa<<2)>>2]|0;ea=(fa|0)>(ea|0)?fa:ea;aa=aa+1|0}while((aa|0)!=256);aa=ea+da|0;c[G+(_*548|0)+8>>2]=ba;B=cb(256,i,z,ba)|0;if(!B){L=G;M=F;N=1;O=z;P=V;break b}C=a[ba>>0]|0;y=$|C;fa=ca+(C&255)|0;C=ba+(B<<2)|0;B=1;ga=c[z>>2]|0;do{ha=c[z+(B<<2)>>2]|0;ga=(ha|0)>(ga|0)?ha:ga;B=B+1|0}while((B|0)!=256);B=ga+aa|0;c[G+(_*548|0)+12>>2]=C;ba=cb(256,i,z,C)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}ca=a[C>>0]|0;$=y|ca;ea=fa+(ca&255)|0;ca=C+(ba<<2)|0;ba=1;ha=c[z>>2]|0;do{ia=c[z+(ba<<2)>>2]|0;ha=(ia|0)>(ha|0)?ia:ha;ba=ba+1|0}while((ba|0)!=256);c[G+(_*548|0)+16>>2]=ca;ba=cb(40,i,z,ca)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}ja=ha+B|0;ka=$;la=ea+(d[ca>>0]|0)|0;ma=ca+(ba<<2)|0}else{ba=cb(280,i,z,H)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}C=d[H>>0]|0;fa=H+(ba<<2)|0;ba=1;y=c[z>>2]|0;do{aa=c[z+(ba<<2)>>2]|0;y=(aa|0)>(y|0)?aa:y;ba=ba+1|0}while(ba>>>0<280);c[G+(_*548|0)+4>>2]=fa;ba=cb(256,i,z,fa)|0;if(!ba){L=G;M=F;N=1;O=z;P=V;break b}ca=a[fa>>0]|0;ea=C+(ca&255)|0;$=fa+(ba<<2)|0;ba=1;B=c[z>>2]|0;do{ha=c[z+(ba<<2)>>2]|0;B=(ha|0)>(B|0)?ha:B;ba=ba+1|0}while(ba>>>0<256);ba=B+y|0;c[G+(_*548|0)+8>>2]=$;fa=cb(256,i,z,$)|0;if(!fa){L=G;M=F;N=1;O=z;P=V;break b}C=a[$>>0]|0;ha=ca|C;aa=ea+(C&255)|0;C=$+(fa<<2)|0;fa=1;ga=c[z>>2]|0;do{ia=c[z+(fa<<2)>>2]|0;ga=(ia|0)>(ga|0)?ia:ga;fa=fa+1|0}while(fa>>>0<256);fa=ga+ba|0;c[G+(_*548|0)+12>>2]=C;$=cb(256,i,z,C)|0;if(!$){L=G;M=F;N=1;O=z;P=V;break b}ea=a[C>>0]|0;ca=ha|ea;y=aa+(ea&255)|0;ea=C+($<<2)|0;$=1;B=c[z>>2]|0;do{ia=c[z+($<<2)>>2]|0;B=(ia|0)>(B|0)?ia:B;$=$+1|0}while($>>>0<256);c[G+(_*548|0)+16>>2]=ea;$=cb(40,i,z,ea)|0;if(!$){L=G;M=F;N=1;O=z;P=V;break b}ja=B+fa|0;ka=ca;la=y+(d[ea>>0]|0)|0;ma=ea+($<<2)|0}$=ka<<24>>24==0;c[G+(_*548|0)+20>>2]=$&1;C=G+(_*548|0)+28|0;c[C>>2]=0;if(($?($=(e[(c[G+(_*548|0)+4>>2]|0)+2>>1]|0)<<16|(e[(c[G+(_*548|0)+8>>2]|0)+2>>1]|0)|(e[(c[G+(_*548|0)+12>>2]|0)+2>>1]|0)<<24,aa=G+(_*548|0)+24|0,c[aa>>2]=$,(la|0)==0):0)?(ha=b[(c[q>>2]|0)+2>>1]|0,(ha&65535)<256):0){c[C>>2]=1;c[aa>>2]=(ha&65535)<<8|$;c[G+(_*548|0)+32>>2]=0;Z=ma;break}$=(ja|0)<6;c[G+(_*548|0)+32>>2]=$&1;if($){$=G+(_*548|0)+4|0;ha=G+(_*548|0)+8|0;aa=G+(_*548|0)+12|0;C=c[q>>2]|0;ba=0;do{ga=G+(_*548|0)+36+(ba<<3)|0;ia=C+(ba<<2)|0;na=e[ia>>1]|e[ia+2>>1]<<16;ia=16?na>>>16:na;if((ia&65535)>255){c[ga>>2]=na&255|256;c[G+(_*548|0)+36+(ba<<3)+4>>2]=ia}else{oa=G+(_*548|0)+36+(ba<<3)+4|0;qa=na&255;c[ga>>2]=qa;na=ia<<8;c[oa>>2]=na;ia=qa?ba>>>qa:ba;ra=c[$>>2]|0;ua=b[ra+(ia<<2)+2>>1]|0;xa=d[ra+(ia<<2)>>0]|0;ra=qa+xa|0;c[ga>>2]=ra;qa=(ua&65535)<<16|na;c[oa>>2]=qa;na=xa?ia>>>xa:ia;ia=c[ha>>2]|0;xa=b[ia+(na<<2)+2>>1]|0;ua=d[ia+(na<<2)>>0]|0;ia=ra+ua|0;c[ga>>2]=ia;ra=qa|xa&65535;c[oa>>2]=ra;xa=ua?na>>>ua:na;na=c[aa>>2]|0;ua=b[na+(xa<<2)+2>>1]|0;c[ga>>2]=ia+(d[na+(xa<<2)>>0]|0);c[oa>>2]=(ua&65535)<<24|ra}ba=ba+1|0}while((ba|0)!=64);Z=ma}else Z=ma}while(0);D=D+1|0;if((D|0)>=(T|0))break;else H=Z}}c[i+160>>2]=c[l>>2];c[i+164>>2]=U;c[i+168>>2]=G;c[i+172>>2]=F;L=G;M=F;N=0;O=z;P=V}else{L=0;M=0;N=1;O=0;P=V}while(0);pa(O);pa(P);if(N){pa(c[l>>2]|0);pa(M);sa(L);u=73;break}if((I|0)>0){c[n>>2]=1<>2]=1;J=0;break}}else c[n>>2]=0;f=c[i+152>>2]|0;c[i+100>>2]=t;c[i+104>>2]=g;H=(1<>2]=f?D>>>f:D;c[i+148>>2]=(f|0)==0?-1:H;if(!o){H=Cf(t|0,((t|0)<0)<<31>>31|0,g|0,((g|0)<0)<<31>>31|0)|0;f=wa(H,v()|0,4)|0;if(!f){c[i>>2]=1;J=0;break}if(!(Ia(i,f,t,g,g,0)|0)){J=f;break}if(!(c[i+48>>2]|0))ya=f;else{J=f;break}}else{c[i+4>>2]=1;ya=0}if(j|0)c[j>>2]=ya;c[i+112>>2]=0;if(o){za=1;Y=k;return za|0}pa(c[i+160>>2]|0);pa(c[i+172>>2]|0);sa(c[i+168>>2]|0);ta(i+124|0);ta(i+136|0);Aa=n;Ba=Aa+56|0;do{c[Aa>>2]=0;Aa=Aa+4|0}while((Aa|0)<(Ba|0));za=1;Y=k;return za|0}while(0);if((u|0)==73){c[i>>2]=3;J=0}pa(J);pa(c[i+160>>2]|0);pa(c[i+172>>2]|0);sa(c[i+168>>2]|0);ta(i+124|0);ta(i+136|0);Aa=n;Ba=Aa+56|0;do{c[Aa>>2]=0;Aa=Aa+4|0}while((Aa|0)<(Ba|0));za=0;Y=k;return za|0}function bb(a){a=a|0;return wa(a,((a|0)<0)<<31>>31,548)|0}function cb(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var 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,w=0,x=0,y=0,z=0,A=0,B=0,C=0;h=Y;Y=Y+592|0;i=h+80|0;j=h;k=e+24|0;l=Ga(k,1)|0;Nf(f|0,0,a<<2|0)|0;a:do if(l){m=Ga(k,1)|0;n=(Ga(k,1)|0)==0;o=f+((Ga(k,n?1:8)|0)<<2)|0;c[o>>2]=1;if((m|0)==1){m=f+((Ga(k,8)|0)<<2)|0;c[m>>2]=1;p=26}else p=26}else{m=j;o=m+76|0;do{c[m>>2]=0;m=m+4|0}while((m|0)<(o|0));m=(Ga(k,4)|0)+4|0;if((m|0)>19){c[e>>2]=3;q=0;Y=h;return q|0}if((m|0)>0){o=0;do{n=Ga(k,3)|0;c[j+((d[3856+o>>0]|0)<<2)>>2]=n;o=o+1|0}while((o|0)!=(m|0))}b:do if(eb(i,7,j,19)|0){if(Ga(k,1)|0){m=(Ga(k,((Ga(k,3)|0)<<1)+2|0)|0)+2|0;if((m|0)>(a|0))break;else r=m}else r=a;c:do if((a|0)>0){m=e+44|0;o=0;n=8;s=r;while(1){if(!s)break c;s=s+-1|0;t=c[m>>2]|0;if((t|0)>31){Ea(k);u=c[m>>2]|0}else u=t;t=k;w=If(c[t>>2]|0,c[t+4>>2]|0,u&63|0)|0;v()|0;t=w&127;c[m>>2]=u+(d[i+(t<<2)>>0]|0);w=b[i+(t<<2)+2>>1]|0;t=w&65535;if((w&65535)>=16){x=t+-16|0;y=d[8680+x>>0]|0;z=(Ga(k,d[8677+x>>0]|0)|0)+y|0;if((z+o|0)>(a|0))break b;y=w<<16>>16==16?n:0;if((z|0)>0){x=z;z=o;while(1){A=z+1|0;c[f+(z<<2)>>2]=y;if((x|0)>1){x=x+-1|0;z=A}else{B=n;C=A;break}}}else{B=n;C=o}}else{c[f+(o<<2)>>2]=t;B=w<<16>>16==0?n:t;C=o+1|0}if((C|0)>=(a|0))break;else{o=C;n=B}}}while(0);p=26;break a}while(0);c[e>>2]=3}while(0);if(((p|0)==26?(c[e+48>>2]|0)==0:0)?(p=eb(g,8,f,a)|0,p|0):0){q=p;Y=h;return q|0}c[e>>2]=3;q=0;Y=h;return q|0}function db(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=1<>31,4)|0;c[a>>2]=e;if(!e){f=0;return f|0}c[a+4>>2]=32-b;c[a+8>>2]=b;f=1;return f|0}function eb(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;e=Y;Y=Y+1024|0;f=e;do if(a){if((d|0)<513){g=fb(a,b,c,d,f)|0;break}h=wa(d,((d|0)<0)<<31>>31,2)|0;if(!h)g=0;else{i=fb(a,b,c,d,h)|0;pa(h);g=i}}else g=fb(0,b,c,d,0)|0;while(0);Y=e;return g|0}function fb(d,f,g,h,i){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var 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,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,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;j=Y;Y=Y+128|0;k=j+64|0;l=j;m=1<>2]=0;n=n+4|0}while((n|0)<(o|0));n=(h|0)>0;do if(n){o=0;while(1){p=c[g+(o<<2)>>2]|0;if((p|0)>15){q=0;r=69;break}s=k+(p<<2)|0;c[s>>2]=(c[s>>2]|0)+1;o=o+1|0;if((o|0)>=(h|0)){r=5;break}}if((r|0)==5){t=c[k>>2]|0;break}else if((r|0)==69){Y=j;return q|0}}else t=0;while(0);if((t|0)==(h|0)){q=0;Y=j;return q|0}c[l+4>>2]=0;t=c[k+4>>2]|0;if((t|0)>2){q=0;Y=j;return q|0}c[l+8>>2]=t;o=c[k+8>>2]|0;if((o|0)>4){q=0;Y=j;return q|0}s=t+o|0;c[l+12>>2]=s;o=c[k+12>>2]|0;if((o|0)>8){q=0;Y=j;return q|0}p=s+o|0;c[l+16>>2]=p;o=c[k+16>>2]|0;if((o|0)>16){q=0;Y=j;return q|0}s=p+o|0;c[l+20>>2]=s;o=c[k+20>>2]|0;if((o|0)>32){q=0;Y=j;return q|0}p=s+o|0;c[l+24>>2]=p;o=c[k+24>>2]|0;if((o|0)>64){q=0;Y=j;return q|0}s=p+o|0;c[l+28>>2]=s;o=c[k+28>>2]|0;if((o|0)>128){q=0;Y=j;return q|0}p=s+o|0;c[l+32>>2]=p;o=c[k+32>>2]|0;if((o|0)>256){q=0;Y=j;return q|0}s=p+o|0;c[l+36>>2]=s;o=c[k+36>>2]|0;if((o|0)>512){q=0;Y=j;return q|0}p=s+o|0;c[l+40>>2]=p;o=c[k+40>>2]|0;if((o|0)>1024){q=0;Y=j;return q|0}s=p+o|0;c[l+44>>2]=s;o=c[k+44>>2]|0;if((o|0)>2048){q=0;Y=j;return q|0}p=s+o|0;c[l+48>>2]=p;o=c[k+48>>2]|0;if((o|0)>4096){q=0;Y=j;return q|0}s=p+o|0;c[l+52>>2]=s;o=c[k+52>>2]|0;if((o|0)>8192){q=0;Y=j;return q|0}p=s+o|0;c[l+56>>2]=p;o=c[k+56>>2]|0;if((o|0)>16384){q=0;Y=j;return q|0}s=p+o|0;o=l+60|0;c[o>>2]=s;if(n){if(!i){n=0;do{p=c[g+(n<<2)>>2]|0;if((p|0)>0){u=l+(p<<2)|0;c[u>>2]=(c[u>>2]|0)+1}n=n+1|0}while((n|0)!=(h|0))}else{n=0;do{u=c[g+(n<<2)>>2]|0;if((u|0)>0){p=l+(u<<2)|0;u=c[p>>2]|0;c[p>>2]=u+1;b[i+(u<<1)>>1]=n}n=n+1|0}while((n|0)!=(h|0))}v=c[o>>2]|0}else v=s;if((v|0)==1){if(!i){q=m;Y=j;return q|0}s=(e[i>>1]|0)<<16;h=m;do{n=h;h=h+-1|0;l=d+(h<<2)|0;b[l>>1]=s;b[l+2>>1]=s>>>16}while((n|0)>1);q=m;Y=j;return q|0}s=m+-1|0;if((f|0)>=1){h=2-t|0;n=(h|0)<0;a:do if(!d){if(n){q=0;Y=j;return q|0}l=1;g=h;u=3;while(1){if((l|0)>=(f|0)){w=g;x=u;y=0;z=0;break a}l=l+1|0;p=g<<1;g=p-(c[k+(l<<2)>>2]|0)|0;if((g|0)<0){q=0;break}else u=p+u|0}Y=j;return q|0}else{if(n){q=0;Y=j;return q|0}u=0;g=2;l=1;p=0;A=t;B=k+4|0;C=h;D=3;while(1){if((A|0)>0){E=l&255;F=1<>1]|0)<<16|E;L=m;do{L=L-g|0;M=J+(L<<2)|0;b[M>>1]=K;b[M+2>>1]=K>>>16}while((L|0)>0);L=F;while(1)if(!(L&G))break;else L=1?L>>>1:L;H=H+1|0;G=(L|0)==0?G:(L+-1&G)+L|0;K=I;I=I+-1|0}while((K|0)>1);c[B>>2]=I;N=G;O=H}else{N=u;O=p}F=l+1|0;if((l|0)>=(f|0)){w=C;x=D;y=N;z=O;break a}A=c[k+(F<<2)>>2]|0;E=C<<1;C=E-A|0;if((C|0)<0){q=0;break}else{u=N;g=g<<1;l=F;p=O;B=k+(F<<2)|0;D=E+D|0}}Y=j;return q|0}while(0);if((f|0)<15){P=w;Q=x;R=y;S=z;r=42}else{T=m;U=x;V=v}}else{P=1;Q=1;R=0;S=0;r=42}do if((r|0)==42){v=(d|0)!=0;x=d;z=-1;y=d;w=m;O=m;N=P;h=Q;t=2;n=f;D=R;B=S;while(1){p=n;n=n+1|0;l=N<<1;h=l+h|0;g=k+(n<<2)|0;u=c[g>>2]|0;N=l-u|0;if((N|0)<0){q=0;r=69;break}b:do if(v&(u|0)>0){l=n-f|0;C=l&255;A=1<=14){E=n&255;F=z;K=y;J=w;M=O;W=D;X=B;while(1){Z=W&s;if((Z|0)==(F|0)){_=M;$=F;aa=K;ba=J}else{ca=K+(M<<2)|0;a[d+(Z<<2)>>0]=E;da=ca-x|0;b[d+(Z<<2)+2>>1]=(2?da>>>2:da)-Z;_=A;$=Z;aa=ca;ba=A+J|0}ca=aa+((f?W>>>f:W)<<2)|0;Z=(e[i+(X<<1)>>1]|0)<<16|C;da=_;do{da=da-t|0;ea=ca+(da<<2)|0;b[ea>>1]=Z;b[ea+2>>1]=Z>>>16}while((da|0)>0);da=l;while(1)if(!(da&W))break;else da=1?da>>>1:da;Z=X+1|0;ca=(da|0)==0?W:(da+-1&W)+da|0;ea=c[g>>2]|0;c[g>>2]=ea+-1;if((ea|0)>1){F=$;K=aa;J=ba;M=_;W=ca;X=Z}else{fa=_;ga=$;ha=aa;ia=ba;ja=ca;ka=Z;break b}}}X=z;W=y;M=w;J=O;K=D;F=B;E=u;while(1){L=K&s;if((L|0)==(X|0)){la=J;ma=X;na=W;oa=M}else{Z=W+(J<<2)|0;ca=A-E|0;c:do if((ca|0)<1)pa=n;else{ea=n;qa=ca;while(1){ra=ea+1|0;if((ea|0)>=14){pa=ra;break c}qa=(qa<<1)-(c[k+(ra<<2)>>2]|0)|0;if((qa|0)<1){pa=ra;break}else ea=ra}}while(0);ca=1<>0]=pa;da=Z-x|0;b[d+(L<<2)+2>>1]=(2?da>>>2:da)-L;la=ca;ma=L;na=Z;oa=ca+M|0}ca=na+((f?K>>>f:K)<<2)|0;da=(e[i+(F<<1)>>1]|0)<<16|C;ea=la;do{ea=ea-t|0;qa=ca+(ea<<2)|0;b[qa>>1]=da;b[qa+2>>1]=da>>>16}while((ea|0)>0);ea=l;while(1)if(!(ea&K))break;else ea=1?ea>>>1:ea;da=F+1|0;ca=(ea|0)==0?K:(ea+-1&K)+ea|0;Z=c[g>>2]|0;E=Z+-1|0;c[g>>2]=E;if((Z|0)<=1){fa=la;ga=ma;ha=na;ia=oa;ja=ca;ka=da;break}else{X=ma;W=na;M=oa;J=la;K=ca;F=da}}}else{fa=O;ga=z;ha=y;ia=w;ja=D;ka=B}while(0);if((p|0)>=14){r=67;break}else{z=ga;y=ha;w=ia;O=fa;t=t<<1;D=ja;B=ka}}if((r|0)==67){T=ia;U=h;V=c[o>>2]|0;break}else if((r|0)==69){Y=j;return q|0}}while(0);q=(U|0)==((V<<1)+-1|0)?T:0;Y=j;return q|0}function gb(a,b){a=a|0;b=b|0;return -16777216}function hb(a,b){a=a|0;b=b|0;return a|0}function ib(a,b){a=a|0;b=b|0;return c[b>>2]|0}function jb(a,b){a=a|0;b=b|0;return c[b+4>>2]|0}function kb(a,b){a=a|0;b=b|0;return c[b+-4>>2]|0}function lb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=c[b>>2]|0;e=c[b+4>>2]|0;b=e^a;f=((1?b>>>1:b)&2139062143)+(e&a)|0;a=f^d;return ((1?a>>>1:a)&2139062143)+(f&d)|0}function mb(a,b){a=a|0;b=b|0;var d=0;d=c[b+-4>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function nb(a,b){a=a|0;b=b|0;var d=0;d=c[b>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function ob(a,b){a=a|0;b=b|0;var d=0;a=c[b+-4>>2]|0;d=c[b>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function pb(a,b){a=a|0;b=b|0;var d=0;a=c[b>>2]|0;d=c[b+4>>2]|0;b=d^a;return ((1?b>>>1:b)&2139062143)+(d&a)|0}function qb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=c[b+-4>>2]|0;e=c[b>>2]|0;f=c[b+4>>2]|0;b=d^a;g=((1?b>>>1:b)&2139062143)+(d&a)|0;a=f^e;d=((1?a>>>1:a)&2139062143)+(f&e)|0;e=d^g;return ((1?e>>>1:e)&2139062143)+(d&g)|0}function rb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c[b>>2]|0;e=c[b+-4>>2]|0;b=24?e>>>24:e;f=(24?a>>>24:a)-b|0;g=(24?d>>>24:d)-b|0;b=(16?e>>>16:e)&255;h=((16?a>>>16:a)&255)-b|0;i=((16?d>>>16:d)&255)-b|0;b=(8?e>>>8:e)&255;j=((8?a>>>8:a)&255)-b|0;k=((8?d>>>8:d)&255)-b|0;b=e&255;e=(a&255)-b|0;l=(d&255)-b|0;return ((((e|0)>-1?e:0-e|0)-((l|0)>-1?l:0-l|0)-((g|0)>-1?g:0-g|0)+((f|0)>-1?f:0-f|0)-((k|0)>-1?k:0-k|0)+((j|0)>-1?j:0-j|0)-((i|0)>-1?i:0-i|0)+((h|0)>-1?h:0-h|0)|0)<1?d:a)|0}function sb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=c[b>>2]|0;e=c[b+-4>>2]|0;b=(24?d>>>24:d)+(24?a>>>24:a)-(24?e>>>24:e)|0;f=((16?d>>>16:d)&255)+((16?a>>>16:a)&255)-((16?e>>>16:e)&255)|0;g=((8?d>>>8:d)&255)+((8?a>>>8:a)&255)-((8?e>>>8:e)&255)|0;h=(d&255)+(a&255)-(e&255)|0;return (b>>>0<256?b:(24?b>>>24:b)^255)<<24|(h>>>0<256?h:(24?h>>>24:h)^255)|(f>>>0<256?f:(24?f>>>24:f)^255)<<16|(g>>>0<256?g:(24?g>>>24:g)^255)<<8|0}function tb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=c[b>>2]|0;e=c[b+-4>>2]|0;b=d^a;f=((1?b>>>1:b)&2139062143)+(d&a)|0;a=24?f>>>24:f;d=((a-(24?e>>>24:e)|0)/2|0)+a|0;a=(16?f>>>16:f)&255;b=((a-((16?e>>>16:e)&255)|0)/2|0)+a|0;a=(8?f>>>8:f)&255;g=((a-((8?e>>>8:e)&255)|0)/2|0)+a|0;a=f&255;f=((a-(e&255)|0)/2|0)+a|0;return (d>>>0<256?d:(24?d>>>24:d)^255)<<24|(f>>>0<256?f:(24?f>>>24:f)^255)|(b>>>0<256?b:(24?b>>>24:b)^255)<<16|(g>>>0<256?g:(24?g>>>24:g)^255)<<8|0}function ub(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;if((d|0)<=0)return;b=0;do{f=c[a+(b<<2)>>2]|0;c[e+(b<<2)>>2]=f+-16777216&-16711936|f&16711935;b=b+1|0}while((b|0)!=(d|0));return}function vb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;if((d|0)<=0)return;b=0;f=c[e+-4>>2]|0;do{g=c[a+(b<<2)>>2]|0;f=(g&-16711936)+(f&-16711936)&-16711936|(g&16711935)+(f&16711935)&16711935;c[e+(b<<2)>>2]=f;b=b+1|0}while((b|0)!=(d|0));return}function wb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)<=0)return;f=0;do{g=c[b+(f<<2)>>2]|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(h&-16711936)+(g&-16711936)&-16711936|(h&16711935)+(g&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function xb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)<=0)return;f=0;do{g=c[b+(f<<2)+4>>2]|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(h&-16711936)+(g&-16711936)&-16711936|(h&16711935)+(g&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function yb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)<=0)return;f=0;do{g=c[b+(f<<2)+-4>>2]|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(h&-16711936)+(g&-16711936)&-16711936|(h&16711935)+(g&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function zb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+4>>2]|0;h=j^g;k=((1?h>>>1:h)&2139062143)+(j&g)|0;j=k^i;h=((1?j>>>1:j)&2139062143)+(k&i)|0;i=c[a+(f<<2)>>2]|0;g=(h&-16711936)+(i&-16711936)&-16711936|(h&16711935)+(i&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Ab(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=c[b+(f<<2)+-4>>2]|0;i=h^g;j=((1?i>>>1:i)&2139062143)+(h&g)|0;h=c[a+(f<<2)>>2]|0;g=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Bb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=c[b+(f<<2)>>2]|0;i=h^g;j=((1?i>>>1:i)&2139062143)+(h&g)|0;h=c[a+(f<<2)>>2]|0;g=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Cb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;do{g=b+(f<<2)|0;h=c[g+-4>>2]|0;i=c[g>>2]|0;g=i^h;j=((1?g>>>1:g)&2139062143)+(i&h)|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function Db(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((d|0)<=0)return;f=0;do{g=b+(f<<2)|0;h=c[g>>2]|0;i=c[g+4>>2]|0;g=i^h;j=((1?g>>>1:g)&2139062143)+(i&h)|0;h=c[a+(f<<2)>>2]|0;c[e+(f<<2)>>2]=(j&-16711936)+(h&-16711936)&-16711936|(j&16711935)+(h&16711935)&16711935;f=f+1|0}while((f|0)!=(d|0));return}function Eb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h+-4>>2]|0;j=c[h>>2]|0;k=c[h+4>>2]|0;h=i^g;l=((1?h>>>1:h)&2139062143)+(i&g)|0;i=k^j;h=((1?i>>>1:i)&2139062143)+(k&j)|0;j=h^l;k=((1?j>>>1:j)&2139062143)+(h&l)|0;l=c[a+(f<<2)>>2]|0;g=(k&-16711936)+(l&-16711936)&-16711936|(k&16711935)+(l&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Fb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+-4>>2]|0;h=24?j>>>24:j;k=(24?g>>>24:g)-h|0;l=(24?i>>>24:i)-h|0;h=(16?j>>>16:j)&255;m=((16?g>>>16:g)&255)-h|0;n=((16?i>>>16:i)&255)-h|0;h=(8?j>>>8:j)&255;o=((8?g>>>8:g)&255)-h|0;p=((8?i>>>8:i)&255)-h|0;h=j&255;j=(g&255)-h|0;q=(i&255)-h|0;h=(((j|0)>-1?j:0-j|0)-((q|0)>-1?q:0-q|0)-((l|0)>-1?l:0-l|0)+((k|0)>-1?k:0-k|0)-((p|0)>-1?p:0-p|0)+((o|0)>-1?o:0-o|0)-((n|0)>-1?n:0-n|0)+((m|0)>-1?m:0-m|0)|0)<1?i:g;i=c[a+(f<<2)>>2]|0;g=(h&-16711936)+(i&-16711936)&-16711936|(h&16711935)+(i&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Gb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+-4>>2]|0;h=(24?i>>>24:i)+(24?g>>>24:g)-(24?j>>>24:j)|0;k=((16?i>>>16:i)&255)+((16?g>>>16:g)&255)-((16?j>>>16:j)&255)|0;l=((8?i>>>8:i)&255)+((8?g>>>8:g)&255)-((8?j>>>8:j)&255)|0;m=(i&255)+(g&255)-(j&255)|0;j=(h>>>0<256?h:(24?h>>>24:h)^255)<<24|(m>>>0<256?m:(24?m>>>24:m)^255)|(k>>>0<256?k:(24?k>>>24:k)^255)<<16|(l>>>0<256?l:(24?l>>>24:l)^255)<<8;l=c[a+(f<<2)>>2]|0;g=(j&-16711936)+(l&-16711936)&-16711936|(j&16711935)+(l&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Hb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((d|0)<=0)return;f=0;g=c[e+-4>>2]|0;do{h=b+(f<<2)|0;i=c[h>>2]|0;j=c[h+-4>>2]|0;h=i^g;k=((1?h>>>1:h)&2139062143)+(i&g)|0;i=24?k>>>24:k;h=((i-(24?j>>>24:j)|0)/2|0)+i|0;i=(16?k>>>16:k)&255;l=((i-((16?j>>>16:j)&255)|0)/2|0)+i|0;i=(8?k>>>8:k)&255;m=((i-((8?j>>>8:j)&255)|0)/2|0)+i|0;i=k&255;k=((i-(j&255)|0)/2|0)+i|0;i=(h>>>0<256?h:(24?h>>>24:h)^255)<<24|(k>>>0<256?k:(24?k>>>24:k)^255)|(l>>>0<256?l:(24?l>>>24:l)^255)<<16|(m>>>0<256?m:(24?m>>>24:m)^255)<<8;m=c[a+(f<<2)>>2]|0;g=(i&-16711936)+(m&-16711936)&-16711936|(i&16711935)+(m&16711935)&16711935;c[e+(f<<2)>>2]=g;f=f+1|0}while((f|0)!=(d|0));return}function Ib(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((b|0)<=0)return;e=0;do{f=c[a+(e<<2)>>2]|0;g=(8?f>>>8:f)&255;c[d+(e<<2)>>2]=(g<<16|g)+(f&16711935)&16711935|f&-16711936;e=e+1|0}while((e|0)!=(b|0));return}function Jb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((e|0)<=0)return;g=a[b>>0]|0;h=a[b+1>>0]|0;i=a[b+2>>0]|0;b=0;do{j=c[d+(b<<2)>>2]|0;k=j<<16;l=24?k>>24:k;k=r(l,g)|0;m=(5?k>>5:k)+(16?j>>>16:j)|0;k=r(l,h)|0;l=m<<24;n=r(24?l>>24:l,i)|0;c[f+(b<<2)>>2]=m<<16&16711680|j&-16711936|(5?k>>>5:k)+j+(5?n>>>5:n)&255;b=b+1|0}while((b|0)!=(e|0));return}function Kb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=16?b>>>16:b;a[d+1>>0]=8?b>>>8:b;a[d+2>>0]=b;a[d+3>>0]=24?b>>>24:b;if(e>>>0>=f>>>0)break;else d=d+4|0}return}function Lb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=16?b>>>16:b;a[d+1>>0]=8?b>>>8:b;a[d+2>>0]=b;if(e>>>0>=f>>>0)break;else d=d+3|0}return}function Mb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=b;a[d+1>>0]=8?b>>>8:b;a[d+2>>0]=16?b>>>16:b;if(e>>>0>=f>>>0)break;else d=d+3|0}return}function Nb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=(16?b>>>16:b)&240|(12?b>>>12:b)&15;a[d+1>>0]=b&240|(28?b>>>28:b);if(e>>>0>=f>>>0)break;else d=d+2|0}return}function Ob(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b+(d<<2)|0;if((d|0)<=0)return;d=e;e=b;while(1){b=c[e>>2]|0;e=e+4|0;a[d>>0]=(16?b>>>16:b)&248|(13?b>>>13:b)&7;a[d+1>>0]=(5?b>>>5:b)&224|(3?b>>>3:b)&31;if(e>>>0>=f>>>0)break;else d=d+2|0}return}function Pb(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;if(!((e|0)<(f|0)&(g|0)>0))return;h=e;e=a;a=d;while(1){d=0;i=a;j=e;e=e+(g<<2)|0;while(1){k=c[j>>2]|0;c[i>>2]=c[b+(((8?k>>>8:k)&255)<<2)>>2];d=d+1|0;if((d|0)==(g|0))break;else{i=i+4|0;j=j+4|0}}h=h+1|0;if((h|0)==(f|0))break;else a=a+(g<<2)|0}return}function Qb(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;if(!((g|0)<(h|0)&(i|0)>0))return;j=g;g=b;b=f;while(1){f=0;k=b;l=g;g=g+i|0;while(1){m=c[e+((d[l>>0]|0)<<2)>>2]|0;a[k>>0]=8?m>>>8:m;f=f+1|0;if((f|0)==(i|0))break;else{k=k+1|0;l=l+1|0}}j=j+1|0;if((j|0)==(h|0))break;else b=b+i|0}return}function Rb(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+40>>2]|0;if((c[a+12>>2]|0)<1?1:(c[a+16>>2]|0)<1){d=0;return d|0}e=ba[c[b+44>>2]&31](a,b)|0;f=c[b+48>>2]|0;if(f|0)ca[f&15](a,b,e)|0;a=b+16|0;c[a>>2]=(c[a>>2]|0)+e;d=1;return d|0}function Sb(a){a=a|0;var b=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,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;b=c[a+40>>2]|0;d=c[c[b>>2]>>2]|0;e=d>>>0<11;f=d+-1|0;if(f>>>0<12?(g=f&65535,((g?2077>>>g:2077)&1)!=0):0)h=1;else h=(d+-7|0)>>>0<4;g=b+40|0;f=b+44|0;i=b+48|0;j=b+52|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;if(!(Ub(c[b+20>>2]|0,a,h?11:12)|0)){k=0;return k|0}if(!((d+-7|0)>>>0>3|h^1))Vb();if(!(c[a+92>>2]|0)){do if(e){cc();c[f>>2]=17;if(c[a+56>>2]|0){l=a+12|0;m=c[l>>2]|0;n=m+1|0;o=wa(1,0,(n&-2)+m|0)|0;c[g>>2]=o;if(!o){k=0;return k|0}else{c[b+4>>2]=o;m=o+(c[l>>2]|0)|0;c[b+8>>2]=m;c[b+12>>2]=m+(1?n>>1:n);c[f>>2]=18;Vb();break}}}else c[f>>2]=19;while(0);if(!h){k=1;return k|0}switch(d|0){case 5:case 10:{p=9;break}default:p=e?6:5}c[i>>2]=p;if(!e){k=1;return k|0}Da();k=1;return k|0}p=c[b>>2]|0;d=c[p>>2]|0;h=d+-1|0;n=h>>>0<12;if(!e){if(n?(e=h&65535,((e?2077>>>e:2077)&1)!=0):0)q=1;else q=(d+-7|0)>>>0<4;e=c[a+96>>2]|0;m=c[a+100>>2]|0;l=e+1|0;o=1?l>>1:l;s=m+1|0;t=1?s>>1:s;s=a+12|0;u=(c[s>>2]|0)+1|0;v=1?u>>1:u;u=a+16|0;w=(c[u>>2]|0)+1|0;x=1?w>>1:w;w=e<<1;y=l&-2;l=y<<1;z=(l+w<<2)+(q?e<<3:0)|0;A=wa(1,0,z+(q?367:283)|0)|0;c[g>>2]=A;if(!A){k=0;return k|0}B=A+z+31&-32;c[b+24>>2]=B;z=b+28|0;c[z>>2]=B+84;C=b+32|0;c[C>>2]=B+168;D=b+36|0;c[D>>2]=q?B+252|0:0;Wb(B,c[s>>2]|0,c[u>>2]|0,c[p+16>>2]|0,e,m,c[p+32>>2]|0,1,A);B=A+(w<<2)|0;Wb(c[z>>2]|0,v,x,c[p+20>>2]|0,o,t,c[p+36>>2]|0,1,B);Wb(c[C>>2]|0,v,x,c[p+24>>2]|0,o,t,c[p+40>>2]|0,1,B+(y<<2)|0);c[f>>2]=16;if(!q){k=1;return k|0}Wb(c[D>>2]|0,c[s>>2]|0,c[u>>2]|0,c[p+28>>2]|0,e,m,c[p+44>>2]|0,1,B+(l<<2)|0);c[i>>2]=4;Da();k=1;return k|0}if(n?(n=h&65535,((n?2077>>>n:2077)&1)!=0):0)E=1;else E=(d+-7|0)>>>0<4;d=c[a+96>>2]|0;n=c[a+100>>2]|0;h=a+12|0;l=(c[h>>2]|0)+1|0;B=1?l>>1:l;l=a+16|0;a=(c[l>>2]|0)+1|0;p=1?a>>1:a;a=d<<1;m=d*6|0;e=r(d,E?36:27)|0;u=wa(1,0,e+(E?367:283)|0)|0;c[g>>2]=u;if(!u){k=0;return k|0}g=u+((E?d<<3:m)<<2)|0;s=u+e+31&-32;c[b+24>>2]=s;e=b+28|0;c[e>>2]=s+84;D=b+32|0;c[D>>2]=s+168;q=b+36|0;c[q>>2]=E?s+252|0:0;Wb(s,c[h>>2]|0,c[l>>2]|0,g,d,n,0,1,u);Wb(c[e>>2]|0,B,p,g+d|0,d,n,0,1,u+(a<<2)|0);Wb(c[D>>2]|0,B,p,g+a|0,d,n,0,1,u+(d<<2<<2)|0);c[f>>2]=15;Yb();if(!E){k=1;return k|0}Wb(c[q>>2]|0,c[h>>2]|0,c[l>>2]|0,g+(d*3|0)|0,d,n,0,1,u+(m<<2)|0);c[i>>2]=3;switch(c[c[b>>2]>>2]|0){case 10:case 5:{F=7;break}default:F=8}c[j>>2]=F;Da();k=1;return k|0}function Tb(a){a=a|0;var b=0;b=(c[a+40>>2]|0)+40|0;pa(c[b>>2]|0);c[b>>2]=0;return}function Ub(a,b,d){a=a|0;b=b|0;d=d|0;var 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;e=Y;Y=Y+16|0;f=e+4|0;g=e;h=c[b>>2]|0;i=c[b+4>>2]|0;j=(a|0)!=0;if(j){k=(c[a+8>>2]|0)>0;c[b+72>>2]=k&1;if(k){k=c[a+20>>2]|0;l=c[a+24>>2]|0;m=c[a+12>>2]|0;n=c[a+16>>2]|0;o=d>>>0>10;d=o?m&-2:m;m=o?n&-2:n;if((m+l|0)>(i|0)|((d+k|0)>(h|0)|((l|0)<1|((k|0)<1|(m|d|0)<0)))){p=0;Y=e;return p|0}else{q=l;r=k;s=m;t=d}}else{q=i;r=h;s=0;t=0}}else{c[b+72>>2]=0;q=i;r=h;s=0;t=0}c[b+76>>2]=t;c[b+84>>2]=s;c[b+80>>2]=r+t;c[b+88>>2]=q+s;c[b+12>>2]=r;c[b+16>>2]=q;if(!j){c[b+92>>2]=0;c[b+68>>2]=0;c[b+56>>2]=1;p=1;Y=e;return p|0}j=(c[a+28>>2]|0)>0;s=b+92|0;c[s>>2]=j&1;do if(j){c[f>>2]=c[a+32>>2];c[g>>2]=c[a+36>>2];if(Mc(r,q,f,g)|0){c[b+96>>2]=c[f>>2];c[b+100>>2]=c[g>>2];u=(c[s>>2]|0)==0;break}p=0;Y=e;return p|0}else u=1;while(0);s=b+68|0;c[s>>2]=(c[a>>2]|0)!=0&1;g=b+56|0;c[g>>2]=(c[a+4>>2]|0)==0&1;if(u){p=1;Y=e;return p|0}if((c[b+96>>2]|0)<((h*3|0)/4|0|0))v=(c[b+100>>2]|0)<((i*3|0)/4|0|0)&1;else v=0;c[s>>2]=v;c[g>>2]=0;p=1;Y=e;return p|0}function Vb(){if(Te(10084)|0)return;if(c[2033]|0){c[2437]=1;c[2439]=2;c[2443]=1;c[2444]=2;c[2436]=3;c[2438]=4;c[2440]=5;c[2441]=6;c[2442]=7;c[2445]=5;c[2446]=6}c[2033]=0;Ue(10084)|0;return}function Wb(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0;k=(b|0)<(f|0);c[a>>2]=k&1;l=(d|0)<(g|0);c[a+4>>2]=l&1;c[a+44>>2]=b;c[a+48>>2]=d;c[a+52>>2]=f;c[a+56>>2]=g;c[a+60>>2]=0;c[a+64>>2]=0;c[a+68>>2]=e;c[a+72>>2]=h;c[a+8>>2]=i;h=k?f+-1|0:b;c[a+36>>2]=h;e=k?b+-1|0:f;c[a+40>>2]=e;if(!k){k=Hf(0,1,e|0,((e|0)<0)<<31>>31|0)|0;v()|0;c[a+12>>2]=k}k=l<<31>>31;e=k+d|0;c[a+28>>2]=e;d=k+g|0;c[a+32>>2]=d;k=a+24|0;if(l){c[k>>2]=d;m=h}else{c[k>>2]=e;k=r(e,h)|0;h=Hf(0,g|0,k|0,((k|0)<0)<<31>>31|0)|0;k=(h|0)==(h|0)&(v()|0)==0;c[a+20>>2]=k?h:0;m=d}d=Hf(0,1,m|0,((m|0)<0)<<31>>31|0)|0;v()|0;c[a+16>>2]=d;c[a+76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|0)|0;z=D;A=E}else{B=D;C=E;break}}}else{B=0;C=x}while(0);x=B+p|0;if((d|0)<=(q|0)){g=x;break}else{o=u;p=x;s=C}}return g|0}function Yb(){if(Te(10028)|0)return;if(c[2031]|0){c[2453]=4;c[2455]=5;c[2452]=6;c[2454]=7;c[2456]=8;c[2457]=9;c[2458]=10;c[2459]=4;c[2460]=5;c[2461]=8;c[2462]=9}c[2031]=0;Ue(10028)|0;return}function Zb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=a+104|0;f=c[e>>2]|0;if(!f)return 0;g=c[b+36>>2]|0;h=(c[b+16>>2]|0)+d|0;if((d|0)<=0)return 0;i=g+60|0;j=a+8|0;k=a+16|0;l=b+52|0;m=d;d=f;while(1){f=c[i>>2]|0;n=c[j>>2]|0;o=c[a>>2]|0;Oa(g,n-f+(c[k>>2]|0)|0,d+(r(o,f-n|0)|0)|0,o)|0;o=m-(ca[c[l>>2]&15](b,h-m|0,m)|0)|0;if((o|0)<=0)break;m=o;d=c[e>>2]|0}return 0}function _b(a,b,d){a=a|0;b=b|0;d=d|0;var 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,s=0,t=0,u=0;e=c[a>>2]|0;f=e+20|0;g=c[f>>2]|0;h=(c[e+16>>2]|0)+(r(g,b)|0)|0;b=c[e>>2]|0;e=(b|0)==4|(b|0)==9;i=e&1;j=(b+-7|0)>>>0<4;b=a+36|0;a=c[b>>2]|0;k=c[a+52>>2]|0;if((c[a+64>>2]|0)>=(c[a+56>>2]|0)){l=0;return l|0}m=0;n=0;o=h+(e?0:3)|0;e=a;a=g;while(1){if(!((n|0)<(d|0)?(c[e+24>>2]|0)<1:0)){p=m;q=n;s=a;break}Pa(e);g=Xa(c[(c[b>>2]|0)+68>>2]|0,0,k,1,o,0)|0|m;t=c[f>>2]|0;u=n+1|0;e=c[b>>2]|0;if((c[e+64>>2]|0)>=(c[e+56>>2]|0)){p=g;q=u;s=t;break}else{m=g;n=u;o=o+t|0;a=t}}if(!(j&(p|0)!=0)){l=q;return l|0}Wa(h,i,k,q,s);l=q;return l|0}function $b(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;g=c[b>>2]|0;h=g+20|0;i=(c[g+16>>2]|0)+(r(c[h>>2]|0,e)|0)|0;e=b+36|0;b=c[e>>2]|0;j=c[b+52>>2]|0;k=((c[g>>2]|0)+-7|0)>>>0<4;if((c[b+64>>2]|0)>=(c[b+56>>2]|0)){l=0;return l|0}if((j|0)<=0){g=0;m=b;while(1){if(!((g|0)<(f|0)?(c[m+24>>2]|0)<1:0)){l=g;n=13;break}Pa(m);o=g+1|0;m=c[e>>2]|0;if((c[m+64>>2]|0)>=(c[m+56>>2]|0)){l=o;n=13;break}else g=o}if((n|0)==13)return l|0}n=15;g=0;m=i+1|0;o=b;while(1){if(!((g|0)<(f|0)?(c[o+24>>2]|0)<1:0)){p=n;q=g;break}Pa(o);b=0;s=n;do{t=d[(c[(c[e>>2]|0)+68>>2]|0)+b>>0]|0;u=4?t>>>4:t;t=m+(b<<1)|0;a[t>>0]=u|a[t>>0]&-16&255;s=u&s;b=b+1|0}while((b|0)!=(j|0));b=g+1|0;o=c[e>>2]|0;if((c[o+64>>2]|0)>=(c[o+56>>2]|0)){p=s;q=b;break}else{n=s;g=b;m=m+(c[h>>2]|0)|0}}if(!(k&(p|0)!=15)){l=q;return l|0}Va(i,j,q,c[h>>2]|0);l=q;return l|0}function ac(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c[a+16>>2]|0;e=d+1|0;f=1?e>>1:e;e=c[b+24>>2]|0;g=c[c[b>>2]>>2]|0;switch(g|0){case 1:case 3:case 4:case 5:case 12:{h=3;break}default:if((g+-7|0)>>>0<=3)h=3}if((h|0)==3?(h=c[a+104>>2]|0,h|0):0)sc(c[a+20>>2]|0,c[a+32>>2]|0,h,c[a>>2]|0,c[a+12>>2]|0,d,0);h=c[a+32>>2]|0;g=(d|0)>0;if(!g){i=0;return i|0}j=0;k=d;d=c[a+20>>2]|0;do{l=Oa(e,k,d,h)|0;d=d+(r(l,h)|0)|0;k=k-l|0;j=(rc(e)|0)+j|0}while((k|0)>0);k=a+36|0;e=c[k>>2]|0;h=c[b+28>>2]|0;if(!g){i=j;return i|0}g=f;d=c[a+24>>2]|0;do{l=Oa(h,g,d,e)|0;d=d+(r(l,e)|0)|0;g=g-l|0;rc(h)|0}while((g|0)>0);g=c[k>>2]|0;k=c[b+32>>2]|0;b=f;f=c[a+28>>2]|0;do{a=Oa(k,b,f,g)|0;f=f+(r(a,g)|0)|0;b=b-a|0;rc(k)|0}while((b|0)>0);i=j;return i|0}function bc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=c[b>>2]|0;f=c[e+28>>2]|0;g=c[b+16>>2]|0;h=e+44|0;i=c[h>>2]|0;j=f+(r(i,g)|0)|0;k=c[a+104>>2]|0;if(!k){if(!f)return 0;f=c[a+96>>2]|0;if((d|0)<=0)return 0;l=j;m=0;while(1){Nf(l|0,-1,f|0)|0;m=m+1|0;if((m|0)==(d|0))break;else l=l+i|0}return 0}i=c[e+16>>2]|0;l=e+32|0;e=c[l>>2]|0;d=c[a>>2]|0;m=c[a+16>>2]|0;a=b+36|0;b=c[a>>2]|0;if((m|0)<=0)return 0;f=0;n=m;m=k;do{k=Oa(b,n,m,d)|0;m=m+(r(k,d)|0)|0;n=n-k|0;f=(rc(b)|0)+f|0}while((n|0)>0);if((f|0)<=0)return 0;n=i+(r(e,g)|0)|0;sc(n,c[l>>2]|0,j,c[h>>2]|0,c[(c[a>>2]|0)+52>>2]|0,f,1);return 0}function cc(){if(Te(1e4)|0)return;if(c[2030]|0){c[2468]=11;c[2469]=12;c[2470]=13;c[2471]=14;c[2472]=15;c[2473]=16;c[2474]=17;c[2475]=12;c[2476]=14;c[2477]=15;c[2478]=16}c[2030]=0;Ue(1e4)|0;return}function dc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=c[b>>2]|0;b=c[d+20>>2]|0;e=(c[d+16>>2]|0)+(r(b,c[a+8>>2]|0)|0)|0;f=a+16|0;jc(c[a+20>>2]|0,c[a+32>>2]|0,c[a+24>>2]|0,c[a+28>>2]|0,c[a+36>>2]|0,e,b,c[a+12>>2]|0,c[f>>2]|0,c[9872+(c[d>>2]<<2)>>2]|0);return c[f>>2]|0}function ec(a,b){a=a|0;b=b|0;var 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,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;d=c[a+16>>2]|0;e=c[b>>2]|0;f=c[a+8>>2]|0;g=e+20|0;h=c[g>>2]|0;i=(c[e+16>>2]|0)+(r(h,f)|0)|0;j=c[9744+(c[e>>2]<<2)>>2]|0;e=c[a+20>>2]|0;k=c[a+24>>2]|0;l=c[a+28>>2]|0;m=b+8|0;n=b+12|0;o=f+d|0;p=c[a+12>>2]|0;q=(p+1|0)/2|0;if(!f){ia[j&7](e,0,k,l,k,l,i,0,p);s=d}else{ia[j&7](c[b+4>>2]|0,e,c[m>>2]|0,c[n>>2]|0,k,l,i+(0-h)|0,i,p);s=d+1|0}d=f+2|0;if((d|0)<(o|0)){f=a+36|0;h=a+32|0;t=i;u=e;v=l;w=k;x=d;while(1){d=c[f>>2]|0;y=w+d|0;z=v+d|0;d=c[g>>2]|0;A=t+(d<<1)|0;B=c[h>>2]|0;C=u+(B<<1)|0;ia[j&7](C+(0-B)|0,C,w,v,y,z,A+(0-d)|0,A,p);x=x+2|0;if((x|0)>=(o|0)){D=A;E=C;F=z;G=y;H=h;break}else{t=A;u=C;v=z;w=y}}}else{D=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0,l=0,m=0,n=0,o=0,p=0,q=0;d=c[a+104>>2]|0;if(!d)return 0;e=c[a+12>>2]|0;f=c[b>>2]|0;b=c[f>>2]|0;g=(b|0)==4|(b|0)==9;h=g&1;i=c[a+8>>2]|0;j=c[a+16>>2]|0;if(!(c[a+56>>2]|0)){k=j;l=i;m=d}else{if(!i){n=j+-1|0;o=0;p=d}else{n=j;o=i+-1|0;p=d+(0-(c[a>>2]|0))|0}d=c[a+84>>2]|0;q=j+i+d|0;k=(q|0)==(c[a+88>>2]|0)?q-(d+o)|0:n;l=o;m=p}p=f+20|0;o=c[p>>2]|0;n=(c[f+16>>2]|0)+(r(o,l)|0)|0;if((b+-7|0)>>>0>3|(Xa(m,c[a>>2]|0,e,k,n+(g?0:3)|0,o)|0)==0)return 0;Wa(n,h,e,k,c[p>>2]|0);return 0}function hc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;d=c[a+104>>2]|0;e=c[b>>2]|0;b=c[a+12>>2]|0;f=c[a+16>>2]|0;g=c[e+28>>2]|0;h=e+44|0;e=c[h>>2]|0;i=g+(r(e,c[a+8>>2]|0)|0)|0;if(!d){if(!((f|0)>0&(g|0)!=0))return 0;g=i;j=0;while(1){Nf(g|0,-1,b|0)|0;j=j+1|0;if((j|0)==(f|0))break;else g=g+e|0}return 0}else{if((f|0)<=0)return 0;e=i;i=d;d=0;while(1){Lf(e|0,i|0,b|0)|0;d=d+1|0;if((d|0)==(f|0))break;else{e=e+(c[h>>2]|0)|0;i=i+(c[a>>2]|0)|0}}return 0}return 0}function ic(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;f=c[b+104>>2]|0;if(!f)return 0;g=c[b+12>>2]|0;h=c[e>>2]|0;e=c[h>>2]|0;i=c[b+8>>2]|0;j=c[b+16>>2]|0;if(!(c[b+56>>2]|0)){k=i;l=j;m=f}else{if(!i){n=0;o=j+-1|0;p=f}else{n=i+-1|0;o=j;p=f+(0-(c[b>>2]|0))|0}f=c[b+84>>2]|0;q=j+i+f|0;k=n;l=(q|0)==(c[b+88>>2]|0)?q-(f+n)|0:o;m=p}p=h+20|0;o=(c[h+16>>2]|0)+(r(c[p>>2]|0,k)|0)|0;if((l|0)<=0)return 0;if((g|0)<=0)return 0;k=0;h=15;n=o+1|0;f=m;while(1){m=0;s=h;do{q=d[f+m>>0]|0;i=4?q>>>4:q;q=n+(m<<1)|0;a[q>>0]=i|a[q>>0]&-16&255;s=i&s;m=m+1|0}while((m|0)!=(g|0));t=c[p>>2]|0;k=k+1|0;if((k|0)==(l|0))break;else{h=s;n=n+t|0;f=f+(c[b>>2]|0)|0}}if((e+-7|0)>>>0>3|(s|0)==15)return 0;Va(o,g,l,t);return 0}function jc(a,b,c,d,e,f,g,h,i,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;i=i|0;j=j|0;var k=0,l=0;if((i|0)<=0)return;k=a;a=c;c=d;d=f;f=0;while(1){ha[j&31](k,a,c,d,h);l=(f&1|0)==0;f=f+1|0;if((f|0)==(i|0))break;else{k=k+b|0;a=l?a:a+e|0;c=l?c:c+e|0;d=d+g|0}}return}function kc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var 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;h=g&-2;i=f+(h*3|0)|0;if(!h){j=b;k=c;l=f;m=e}else{h=c;c=f;f=e;e=b;while(1){b=d[h>>0]|0;n=d[f>>0]|0;o=(d[e>>0]|0)*19077|0;p=8?o>>>8:o;o=n*26149|0;q=p+-14234+(8?o>>>8:o)|0;if(q>>>0<16384)r=6?q>>>6:q;else r=((31?q>>31:q)&-255)+255|0;a[c>>0]=r;q=b*6419|0;o=n*13320|0;n=p+8708-(8?q>>>8:q)-(8?o>>>8:o)|0;if(n>>>0<16384)s=6?n>>>6:n;else s=((31?n>>31:n)&-255)+255|0;a[c+1>>0]=s;n=b*33050|0;b=p+-17685+(8?n>>>8:n)|0;if(b>>>0<16384)t=6?b>>>6:b;else t=((31?b>>31:b)&-255)+255|0;a[c+2>>0]=t;b=d[h>>0]|0;n=d[f>>0]|0;p=(d[e+1>>0]|0)*19077|0;o=8?p>>>8:p;p=n*26149|0;q=o+-14234+(8?p>>>8:p)|0;if(q>>>0<16384)u=6?q>>>6:q;else u=((31?q>>31:q)&-255)+255|0;a[c+3>>0]=u;q=b*6419|0;p=n*13320|0;n=o+8708-(8?q>>>8:q)-(8?p>>>8:p)|0;if(n>>>0<16384)v=6?n>>>6:n;else v=((31?n>>31:n)&-255)+255|0;a[c+4>>0]=v;n=b*33050|0;b=o+-17685+(8?n>>>8:n)|0;if(b>>>0<16384)w=6?b>>>6:b;else w=((31?b>>31:b)&-255)+255|0;a[c+5>>0]=w;b=e+2|0;n=h+1|0;o=f+1|0;c=c+6|0;if((c|0)==(i|0)){j=b;k=n;l=i;m=o;break}else{h=n;f=o;e=b}}}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;e=j+-14234+(8?m>>>8:m)|0;if(e>>>0<16384)x=6?e>>>6:e;else x=((31?e>>31:e)&-255)+255|0;a[l>>0]=x;x=g*6419|0;e=k*13320|0;k=j+8708-(8?x>>>8:x)-(8?e>>>8:e)|0;if(k>>>0<16384)y=6?k>>>6:k;else y=((31?k>>31:k)&-255)+255|0;a[l+1>>0]=y;y=g*33050|0;g=j+-17685+(8?y>>>8:y)|0;if(g>>>0<16384)z=6?g>>>6:g;else z=((31?g>>31:g)&-255)+255|0;a[l+2>>0]=z;return}function lc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<2&-8;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-8|0;o=(2?n>>>2:n)+2|0;p=(3?n>>>3:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=u*26149|0;x=w+-14234+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;a[c>>0]=y;x=t*6419|0;v=u*13320|0;u=w+8708-(8?x>>>8:x)-(8?v>>>8:v)|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;a[c+1>>0]=z;u=t*33050|0;t=w+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)A=6?t>>>6:t;else A=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=A;a[c+3>>0]=-1;t=d[q>>0]|0;u=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;v=8?w>>>8:w;w=u*26149|0;x=v+-14234+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;a[c+4>>0]=B;x=t*6419|0;w=u*13320|0;u=v+8708-(8?x>>>8:x)-(8?w>>>8:w)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;a[c+5>>0]=C;u=t*33050|0;t=v+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)D=6?t>>>6:t;else D=((31?t>>31:t)&-255)+255|0;a[c+6>>0]=D;a[c+7>>0]=-1;c=c+8|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;p=j+-14234+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;a[l>>0]=E;E=g*6419|0;p=k*13320|0;k=j+8708-(8?E>>>8:E)-(8?p>>>8:p)|0;if(k>>>0<16384)F=6?k>>>6:k;else F=((31?k>>31:k)&-255)+255|0;a[l+1>>0]=F;F=g*33050|0;g=j+-17685+(8?F>>>8:F)|0;if(g>>>0<16384)G=6?g>>>6:g;else G=((31?g>>31:g)&-255)+255|0;a[l+2>>0]=G;a[l+3>>0]=-1;return}function mc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var 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;h=g&-2;i=f+(h*3|0)|0;if(!h){j=b;k=c;l=f;m=e}else{h=c;c=f;f=e;e=b;while(1){b=d[h>>0]|0;n=d[f>>0]|0;o=(d[e>>0]|0)*19077|0;p=8?o>>>8:o;o=b*33050|0;q=p+-17685+(8?o>>>8:o)|0;if(q>>>0<16384)r=6?q>>>6:q;else r=((31?q>>31:q)&-255)+255|0;a[c>>0]=r;q=b*6419|0;b=n*13320|0;o=p+8708-(8?q>>>8:q)-(8?b>>>8:b)|0;if(o>>>0<16384)s=6?o>>>6:o;else s=((31?o>>31:o)&-255)+255|0;a[c+1>>0]=s;o=n*26149|0;n=p+-14234+(8?o>>>8:o)|0;if(n>>>0<16384)t=6?n>>>6:n;else t=((31?n>>31:n)&-255)+255|0;a[c+2>>0]=t;n=d[h>>0]|0;o=d[f>>0]|0;p=(d[e+1>>0]|0)*19077|0;b=8?p>>>8:p;p=n*33050|0;q=b+-17685+(8?p>>>8:p)|0;if(q>>>0<16384)u=6?q>>>6:q;else u=((31?q>>31:q)&-255)+255|0;a[c+3>>0]=u;q=n*6419|0;n=o*13320|0;p=b+8708-(8?q>>>8:q)-(8?n>>>8:n)|0;if(p>>>0<16384)v=6?p>>>6:p;else v=((31?p>>31:p)&-255)+255|0;a[c+4>>0]=v;p=o*26149|0;o=b+-14234+(8?p>>>8:p)|0;if(o>>>0<16384)w=6?o>>>6:o;else w=((31?o>>31:o)&-255)+255|0;a[c+5>>0]=w;o=e+2|0;p=h+1|0;b=f+1|0;c=c+6|0;if((c|0)==(i|0)){j=o;k=p;l=i;m=b;break}else{h=p;f=b;e=o}}}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=g*33050|0;e=j+-17685+(8?m>>>8:m)|0;if(e>>>0<16384)x=6?e>>>6:e;else x=((31?e>>31:e)&-255)+255|0;a[l>>0]=x;x=g*6419|0;g=k*13320|0;e=j+8708-(8?x>>>8:x)-(8?g>>>8:g)|0;if(e>>>0<16384)y=6?e>>>6:e;else y=((31?e>>31:e)&-255)+255|0;a[l+1>>0]=y;y=k*26149|0;k=j+-14234+(8?y>>>8:y)|0;if(k>>>0<16384)z=6?k>>>6:k;else z=((31?k>>31:k)&-255)+255|0;a[l+2>>0]=z;return}function nc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<2&-8;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-8|0;o=(2?n>>>2:n)+2|0;p=(3?n>>>3:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=t*33050|0;x=w+-17685+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;a[c>>0]=y;x=t*6419|0;t=u*13320|0;v=w+8708-(8?x>>>8:x)-(8?t>>>8:t)|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[c+1>>0]=z;v=u*26149|0;u=w+-14234+(8?v>>>8:v)|0;if(u>>>0<16384)A=6?u>>>6:u;else A=((31?u>>31:u)&-255)+255|0;a[c+2>>0]=A;a[c+3>>0]=-1;u=d[q>>0]|0;v=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;t=8?w>>>8:w;w=u*33050|0;x=t+-17685+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;a[c+4>>0]=B;x=u*6419|0;u=v*13320|0;w=t+8708-(8?x>>>8:x)-(8?u>>>8:u)|0;if(w>>>0<16384)C=6?w>>>6:w;else C=((31?w>>31:w)&-255)+255|0;a[c+5>>0]=C;w=v*26149|0;v=t+-14234+(8?w>>>8:w)|0;if(v>>>0<16384)D=6?v>>>6:v;else D=((31?v>>31:v)&-255)+255|0;a[c+6>>0]=D;a[c+7>>0]=-1;c=c+8|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=g*33050|0;p=j+-17685+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;a[l>>0]=E;E=g*6419|0;g=k*13320|0;p=j+8708-(8?E>>>8:E)-(8?g>>>8:g)|0;if(p>>>0<16384)F=6?p>>>6:p;else F=((31?p>>31:p)&-255)+255|0;a[l+1>>0]=F;F=k*26149|0;k=j+-14234+(8?F>>>8:F)|0;if(k>>>0<16384)G=6?k>>>6:k;else G=((31?k>>31:k)&-255)+255|0;a[l+2>>0]=G;a[l+3>>0]=-1;return}function oc(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0;g=f<<2&-8;h=e+g|0;if(!g){i=b;j=c;k=e;l=d}else{m=g+-8|0;n=(2?m>>>2:m)+2|0;o=(3?m>>>3:m)+1|0;m=c+o|0;p=c;c=e;q=d;r=b;while(1){s=a[r>>0]|0;t=a[p>>0]|0;u=a[q>>0]|0;a[c>>0]=-1;v=t&255;t=u&255;u=(s&255)*19077|0;s=8?u>>>8:u;u=t*26149|0;w=s+-14234+(8?u>>>8:u)|0;if(w>>>0<16384)x=6?w>>>6:w;else x=((31?w>>31:w)&-255)+255|0;a[c+1>>0]=x;w=v*6419|0;u=t*13320|0;t=s+8708-(8?w>>>8:w)-(8?u>>>8:u)|0;if(t>>>0<16384)y=6?t>>>6:t;else y=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=y;t=v*33050|0;v=s+-17685+(8?t>>>8:t)|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[c+3>>0]=z;v=a[r+1>>0]|0;t=a[p>>0]|0;s=a[q>>0]|0;a[c+4>>0]=-1;u=t&255;t=s&255;s=(v&255)*19077|0;v=8?s>>>8:s;s=t*26149|0;w=v+-14234+(8?s>>>8:s)|0;if(w>>>0<16384)A=6?w>>>6:w;else A=((31?w>>31:w)&-255)+255|0;a[c+5>>0]=A;w=u*6419|0;s=t*13320|0;t=v+8708-(8?w>>>8:w)-(8?s>>>8:s)|0;if(t>>>0<16384)B=6?t>>>6:t;else B=((31?t>>31:t)&-255)+255|0;a[c+6>>0]=B;t=u*33050|0;u=v+-17685+(8?t>>>8:t)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;a[c+7>>0]=C;c=c+8|0;if((c|0)==(h|0))break;else{p=p+1|0;q=q+1|0;r=r+2|0}}i=b+n|0;j=m;k=e+g|0;l=d+o|0}if(!(f&1))return;f=a[i>>0]|0;i=a[j>>0]|0;j=a[l>>0]|0;a[k>>0]=-1;l=i&255;i=j&255;j=(f&255)*19077|0;f=8?j>>>8:j;j=i*26149|0;o=f+-14234+(8?j>>>8:j)|0;if(o>>>0<16384)D=6?o>>>6:o;else D=((31?o>>31:o)&-255)+255|0;a[k+1>>0]=D;D=l*6419|0;o=i*13320|0;i=f+8708-(8?D>>>8:D)-(8?o>>>8:o)|0;if(i>>>0<16384)E=6?i>>>6:i;else E=((31?i>>31:i)&-255)+255|0;a[k+2>>0]=E;E=l*33050|0;l=f+-17685+(8?E>>>8:E)|0;if(l>>>0<16384)F=6?l>>>6:l;else F=((31?l>>31:l)&-255)+255|0;a[k+3>>0]=F;return}function pc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<1&-4;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-4|0;o=(1?n>>>1:n)+2|0;p=(2?n>>>2:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=u*26149|0;x=w+-14234+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;x=t*6419|0;v=u*13320|0;u=w+8708-(8?x>>>8:x)-(8?v>>>8:v)|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=w+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)A=6?t>>>6:t;else A=((31?t>>31:t)&-255)+255|0;a[c>>0]=(4?z>>>4:z)|y&240;a[c+1>>0]=A|15;t=d[q>>0]|0;u=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;v=8?w>>>8:w;w=u*26149|0;x=v+-14234+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;x=t*6419|0;w=u*13320|0;u=v+8708-(8?x>>>8:x)-(8?w>>>8:w)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=v+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)D=6?t>>>6:t;else D=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=(4?C>>>4:C)|B&240;a[c+3>>0]=D|15;c=c+4|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;p=j+-14234+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;p=g*6419|0;m=k*13320|0;k=j+8708-(8?p>>>8:p)-(8?m>>>8:m)|0;if(k>>>0<16384)F=6?k>>>6:k;else F=((31?k>>31:k)&-255)+255|0;k=g*33050|0;g=j+-17685+(8?k>>>8:k)|0;if(g>>>0<16384)G=6?g>>>6:g;else G=((31?g>>31:g)&-255)+255|0;a[l>>0]=(4?F>>>4:F)|E&240;a[l+1>>0]=G|15;return}function qc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0;h=g<<1&-4;i=f+h|0;if(!h){j=b;k=c;l=f;m=e}else{n=h+-4|0;o=(1?n>>>1:n)+2|0;p=(2?n>>>2:n)+1|0;n=c+p|0;q=c;c=f;r=e;s=b;while(1){t=d[q>>0]|0;u=d[r>>0]|0;v=(d[s>>0]|0)*19077|0;w=8?v>>>8:v;v=u*26149|0;x=w+-14234+(8?v>>>8:v)|0;if(x>>>0<16384)y=6?x>>>6:x;else y=((31?x>>31:x)&-255)+255|0;x=t*6419|0;v=u*13320|0;u=w+8708-(8?x>>>8:x)-(8?v>>>8:v)|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=w+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)A=6?t>>>6:t;else A=((31?t>>31:t)&-255)+255|0;a[c>>0]=(5?z>>>5:z)|y&248;a[c+1>>0]=(3?A>>>3:A)|z<<3&224;t=d[q>>0]|0;u=d[r>>0]|0;w=(d[s+1>>0]|0)*19077|0;v=8?w>>>8:w;w=u*26149|0;x=v+-14234+(8?w>>>8:w)|0;if(x>>>0<16384)B=6?x>>>6:x;else B=((31?x>>31:x)&-255)+255|0;x=t*6419|0;w=u*13320|0;u=v+8708-(8?x>>>8:x)-(8?w>>>8:w)|0;if(u>>>0<16384)C=6?u>>>6:u;else C=((31?u>>31:u)&-255)+255|0;u=t*33050|0;t=v+-17685+(8?u>>>8:u)|0;if(t>>>0<16384)D=6?t>>>6:t;else D=((31?t>>31:t)&-255)+255|0;a[c+2>>0]=(5?C>>>5:C)|B&248;a[c+3>>0]=(3?D>>>3:D)|C<<3&224;c=c+4|0;if((c|0)==(i|0))break;else{q=q+1|0;r=r+1|0;s=s+2|0}}j=b+o|0;k=n;l=f+h|0;m=e+p|0}if(!(g&1))return;g=d[k>>0]|0;k=d[m>>0]|0;m=(d[j>>0]|0)*19077|0;j=8?m>>>8:m;m=k*26149|0;p=j+-14234+(8?m>>>8:m)|0;if(p>>>0<16384)E=6?p>>>6:p;else E=((31?p>>31:p)&-255)+255|0;p=g*6419|0;m=k*13320|0;k=j+8708-(8?p>>>8:p)-(8?m>>>8:m)|0;if(k>>>0<16384)F=6?k>>>6:k;else F=((31?k>>31:k)&-255)+255|0;k=g*33050|0;g=j+-17685+(8?k>>>8:k)|0;if(g>>>0<16384)G=6?g>>>6:g;else G=((31?g>>31:g)&-255)+255|0;a[l>>0]=(5?F>>>5:F)|E&248;a[l+1>>0]=(3?G>>>3:G)|F<<3&224;return}function rc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;b=a+24|0;d=a+56|0;e=a+64|0;if((c[e>>2]|0)>=(c[d>>2]|0)){f=0;return f|0}g=0;while(1){if((c[b>>2]|0)>0){f=g;h=5;break}Pa(a);i=g+1|0;if((c[e>>2]|0)<(c[d>>2]|0))g=i;else{f=i;h=5;break}}if((h|0)==5)return f|0;return 0}function sc(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;var h=0;if((f|0)<=0)return;h=a;a=c;c=0;while(1){Ua(h,a,e,g);c=c+1|0;if((c|0)==(f|0))break;else{h=h+b|0;a=a+d|0}}return}function tc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=f+(h<<2)|0;j=d[c+h>>0]|0;k=d[e+h>>0]|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=k*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[i>>0]=o;n=j*6419|0;l=k*13320|0;k=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(k>>>0<16384)p=6?k>>>6:k;else p=((31?k>>31:k)&-255)+255|0;a[i+1>>0]=p;k=j*33050|0;j=m+-17685+(8?k>>>8:k)|0;if(j>>>0<16384)q=6?j>>>6:j;else q=((31?j>>31:j)&-255)+255|0;a[i+2>>0]=q;a[i+3>>0]=-1;h=h+1|0}while((h|0)!=(g|0));return}function uc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=f+(h<<2)|0;j=d[c+h>>0]|0;k=d[e+h>>0]|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*33050|0;n=m+-17685+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[i>>0]=o;n=j*6419|0;j=k*13320|0;l=m+8708-(8?n>>>8:n)-(8?j>>>8:j)|0;if(l>>>0<16384)p=6?l>>>6:l;else p=((31?l>>31:l)&-255)+255|0;a[i+1>>0]=p;l=k*26149|0;k=m+-14234+(8?l>>>8:l)|0;if(k>>>0<16384)q=6?k>>>6:k;else q=((31?k>>31:k)&-255)+255|0;a[i+2>>0]=q;a[i+3>>0]=-1;h=h+1|0}while((h|0)!=(g|0));return}function vc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h*3|0)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[k>>0]=o;n=i*6419|0;l=j*13320|0;j=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(j>>>0<16384)p=6?j>>>6:j;else p=((31?j>>31:j)&-255)+255|0;a[k+1>>0]=p;j=i*33050|0;i=m+-17685+(8?j>>>8:j)|0;if(i>>>0<16384)q=6?i>>>6:i;else q=((31?i>>31:i)&-255)+255|0;a[k+2>>0]=q;h=h+1|0}while((h|0)!=(g|0));return}function wc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h*3|0)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=i*33050|0;n=m+-17685+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;a[k>>0]=o;n=i*6419|0;i=j*13320|0;l=m+8708-(8?n>>>8:n)-(8?i>>>8:i)|0;if(l>>>0<16384)p=6?l>>>6:l;else p=((31?l>>31:l)&-255)+255|0;a[k+1>>0]=p;l=j*26149|0;j=m+-14234+(8?l>>>8:l)|0;if(j>>>0<16384)q=6?j>>>6:j;else q=((31?j>>31:j)&-255)+255|0;a[k+2>>0]=q;h=h+1|0}while((h|0)!=(g|0));return}function xc(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((f|0)<=0)return;g=0;do{h=a[b+g>>0]|0;i=a[c+g>>0]|0;j=a[d+g>>0]|0;k=e+(g<<2)|0;a[k>>0]=-1;l=i&255;i=j&255;j=(h&255)*19077|0;h=8?j>>>8:j;j=i*26149|0;m=h+-14234+(8?j>>>8:j)|0;if(m>>>0<16384)n=6?m>>>6:m;else n=((31?m>>31:m)&-255)+255|0;a[k+1>>0]=n;m=l*6419|0;j=i*13320|0;i=h+8708-(8?m>>>8:m)-(8?j>>>8:j)|0;if(i>>>0<16384)o=6?i>>>6:i;else o=((31?i>>31:i)&-255)+255|0;a[k+2>>0]=o;i=l*33050|0;l=h+-17685+(8?i>>>8:i)|0;if(l>>>0<16384)p=6?l>>>6:l;else p=((31?l>>31:l)&-255)+255|0;a[k+3>>0]=p;g=g+1|0}while((g|0)!=(f|0));return}function yc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h<<1)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;n=i*6419|0;l=j*13320|0;j=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(j>>>0<16384)p=6?j>>>6:j;else p=((31?j>>31:j)&-255)+255|0;j=i*33050|0;i=m+-17685+(8?j>>>8:j)|0;if(i>>>0<16384)q=6?i>>>6:i;else q=((31?i>>31:i)&-255)+255|0;a[k>>0]=(4?p>>>4:p)|o&240;a[k+1>>0]=q|15;h=h+1|0}while((h|0)!=(g|0));return}function zc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((g|0)<=0)return;h=0;do{i=d[c+h>>0]|0;j=d[e+h>>0]|0;k=f+(h<<1)|0;l=(d[b+h>>0]|0)*19077|0;m=8?l>>>8:l;l=j*26149|0;n=m+-14234+(8?l>>>8:l)|0;if(n>>>0<16384)o=6?n>>>6:n;else o=((31?n>>31:n)&-255)+255|0;n=i*6419|0;l=j*13320|0;j=m+8708-(8?n>>>8:n)-(8?l>>>8:l)|0;if(j>>>0<16384)p=6?j>>>6:j;else p=((31?j>>31:j)&-255)+255|0;j=i*33050|0;i=m+-17685+(8?j>>>8:j)|0;if(i>>>0<16384)q=6?i>>>6:i;else q=((31?i>>31:i)&-255)+255|0;a[k>>0]=(5?p>>>5:p)|o&248;a[k+1>>0]=(3?q>>>3:q)|p<<3&224;h=h+1|0}while((h|0)!=(g|0));return}function Ac(){if(Te(10056)|0)return;c[2032]=0;Ue(10056)|0;return}function Bc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=c[b+68>>2]|0;e=c[b+76>>2]|0;f=r(c[b+8>>2]|0,c[b+52>>2]|0)|0;g=c[b+80>>2]|0;h=c[b+24>>2]|0;if(!h){if((f|0)<=0)return;i=b+16|0;j=0;do{k=Cf(c[i>>2]|0,0,c[g+(j<<2)>>2]|0,0)|0;Df(k|0,v()|0,-2147483648,0)|0;k=v()|0;a[d+j>>0]=(k|0)>255?-1:k&255;j=j+1|0}while((j|0)!=(f|0));return}else{j=c[b+32>>2]|0;i=Hf(0,0-h|0,j|0,((j|0)<0)<<31>>31|0)|0;v()|0;if((f|0)<=0)return;j=0-i|0;h=b+16|0;b=0;do{k=Cf(c[g+(b<<2)>>2]|0,0,j|0,0)|0;l=v()|0;m=Cf(i|0,0,c[e+(b<<2)>>2]|0,0)|0;n=v()|0;o=Df(k|0,l|0,-2147483648,0)|0;Df(o|0,v()|0,m|0,n|0)|0;n=v()|0;m=Cf(n|0,0,c[h>>2]|0,0)|0;Df(m|0,v()|0,-2147483648,0)|0;m=v()|0;a[d+b>>0]=(m|0)>255?-1:m&255;b=b+1|0}while((b|0)!=(f|0));return}}function Cc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=c[b+68>>2]|0;e=c[b+76>>2]|0;f=r(c[b+8>>2]|0,c[b+52>>2]|0)|0;g=c[b+80>>2]|0;h=r(c[b+24>>2]|0,0-(c[b+16>>2]|0)|0)|0;i=(f|0)>0;if(!h){if(!i)return;j=b+20|0;k=0;do{l=e+(k<<2)|0;m=Cf(c[j>>2]|0,0,c[l>>2]|0,0)|0;Df(m|0,v()|0,-2147483648,0)|0;m=v()|0;a[d+k>>0]=(m|0)>255?-1:m&255;c[l>>2]=0;k=k+1|0}while((k|0)!=(f|0));return}else{if(!i)return;i=b+20|0;b=0;do{Cf(c[g+(b<<2)>>2]|0,0,h|0,0)|0;k=v()|0;j=e+(b<<2)|0;l=Cf((c[j>>2]|0)-k|0,0,c[i>>2]|0,0)|0;Df(l|0,v()|0,-2147483648,0)|0;l=v()|0;a[d+b>>0]=(l|0)>255?-1:l&255;c[j>>2]=k;b=b+1|0}while((b|0)!=(f|0));return}}function Dc(a,b){a=a|0;b=b|0;var 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,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=c[a+8>>2]|0;f=r(c[a+52>>2]|0,e)|0;if((e|0)<=0)return;g=a+36|0;h=a+44|0;i=a+80|0;j=a+40|0;a=0;do{k=c[g>>2]|0;l=d[b+a>>0]|0;m=a+e|0;if((c[h>>2]|0)>1)n=d[b+m>>0]|0;else n=l;o=r(k,l)|0;p=c[i>>2]|0;c[p+(a<<2)>>2]=o;if((m|0)<(f|0)){o=l;l=k;k=m;q=n;s=m;while(1){m=l-(c[j>>2]|0)|0;t=k+e|0;if((m|0)<0){u=c[g>>2]|0;v=d[b+t>>0]|0;w=q;x=u+m|0;y=t;z=u}else{v=q;w=o;x=m;y=k;z=c[g>>2]|0}m=(r(z,v)|0)+(r(w-v|0,x)|0)|0;c[p+(s<<2)>>2]=m;s=s+e|0;if((s|0)>=(f|0))break;else{o=w;l=x;k=y;q=v}}}a=a+1|0}while((a|0)!=(e|0));return}function Ec(b,d){b=b|0;d=d|0;var 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,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0;e=c[b+8>>2]|0;f=r(c[b+52>>2]|0,e)|0;if((e|0)<=0)return;g=b+36|0;h=b+40|0;i=b+80|0;j=b+12|0;b=0;do{if((b|0)<(f|0)){k=0;l=0;m=b;n=b;while(1){o=(c[g>>2]|0)+k|0;p=c[h>>2]|0;if((o|0)>0){q=l;s=n;t=o;do{t=t-p|0;u=a[d+s>>0]|0;q=q+(u&255)|0;s=s+e|0}while((t|0)>0);w=u&255;x=t;y=q;z=s}else{w=0;x=o;y=l;z=n}A=r(w,0-x|0)|0;B=(r(p,y)|0)-A|0;c[(c[i>>2]|0)+(m<<2)>>2]=B;B=Cf(c[j>>2]|0,0,A|0,0)|0;Df(B|0,v()|0,-2147483648,0)|0;l=v()|0;m=m+e|0;if((m|0)>=(f|0))break;else{k=x;n=z}}}b=b+1|0}while((b|0)!=(e|0));return}function Fc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var 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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=(18?p>>>18:p)&255;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;t=r*13320|0;r=s+8708-(8?u>>>8:u)-(8?t>>>8:t)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;a[i+1>>0]=v;v=q*33050|0;q=s+-17685+(8?v>>>8:v)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i+2>>0]=w;a[i+3>>0]=-1;w=(c|0)!=0;if(w){q=n+131074+(o*3|0)|0;v=(2?q>>>2:q)&255;s=(18?q>>>18:q)&255;q=(d[c>>0]|0)*19077|0;r=8?q>>>8:q;q=s*26149|0;t=(8?q>>>8:q)+-14234+r|0;if(t>>>0<16384)x=6?t>>>6:t;else x=((31?t>>31:t)&-255)+255|0;a[j>>0]=x;x=v*6419|0;t=s*13320|0;s=8708-(8?x>>>8:x)-(8?t>>>8:t)+r|0;if(s>>>0<16384)y=6?s>>>6:s;else y=((31?s>>31:s)&-255)+255|0;a[j+1>>0]=y;y=v*33050|0;v=(8?y>>>8:y)+-17685+r|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[j+2>>0]=z;a[j+3>>0]=-1}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){v=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);r=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=v+n|0;s=y+524296+z+r|0;t=s+(y<<1)|0;y=3?t>>>3:t;t=s+(r+z<<1)|0;s=3?t>>>3:t;t=y+z|0;x=s+v|0;q=o<<1;u=q+-1|0;p=u<<2;C=i+p|0;D=(1?t>>>1:t)&255;E=(17?t>>>17:t)&255;t=(d[b+u>>0]|0)*19077|0;F=8?t>>>8:t;t=E*26149|0;G=F+-14234+(8?t>>>8:t)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[C>>0]=H;G=D*6419|0;t=E*13320|0;E=F+8708-(8?G>>>8:G)-(8?t>>>8:t)|0;if(E>>>0<16384)I=6?E>>>6:E;else I=((31?E>>31:E)&-255)+255|0;a[C+1>>0]=I;E=D*33050|0;D=F+-17685+(8?E>>>8:E)|0;if(D>>>0<16384)J=6?D>>>6:D;else J=((31?D>>31:D)&-255)+255|0;a[C+2>>0]=J;a[C+3>>0]=-1;C=o<<3;D=i+C|0;E=(1?x>>>1:x)&255;F=(17?x>>>17:x)&255;x=(d[b+q>>0]|0)*19077|0;t=8?x>>>8:x;x=F*26149|0;G=(8?x>>>8:x)+-14234+t|0;if(G>>>0<16384)K=6?G>>>6:G;else K=((31?G>>31:G)&-255)+255|0;a[D>>0]=K;G=E*6419|0;x=F*13320|0;F=8708-(8?G>>>8:G)-(8?x>>>8:x)+t|0;if(F>>>0<16384)L=6?F>>>6:F;else L=((31?F>>31:F)&-255)+255|0;a[D+1>>0]=L;F=E*33050|0;E=(8?F>>>8:F)+-17685+t|0;if(E>>>0<16384)M=6?E>>>6:E;else M=((31?E>>31:E)&-255)+255|0;a[D+2>>0]=M;a[D+3>>0]=-1;if(w){D=s+n|0;s=y+r|0;y=j+p|0;p=(1?D>>>1:D)&255;E=(17?D>>>17:D)&255;D=(d[c+u>>0]|0)*19077|0;u=8?D>>>8:D;D=E*26149|0;t=(8?D>>>8:D)+-14234+u|0;if(t>>>0<16384)N=6?t>>>6:t;else N=((31?t>>31:t)&-255)+255|0;a[y>>0]=N;t=p*6419|0;D=E*13320|0;E=8708-(8?t>>>8:t)-(8?D>>>8:D)+u|0;if(E>>>0<16384)O=6?E>>>6:E;else O=((31?E>>31:E)&-255)+255|0;a[y+1>>0]=O;E=p*33050|0;p=(8?E>>>8:E)+-17685+u|0;if(p>>>0<16384)P=6?p>>>6:p;else P=((31?p>>31:p)&-255)+255|0;a[y+2>>0]=P;a[y+3>>0]=-1;y=j+C|0;C=(1?s>>>1:s)&255;p=(17?s>>>17:s)&255;s=(d[c+q>>0]|0)*19077|0;q=8?s>>>8:s;s=p*26149|0;u=(8?s>>>8:s)+-14234+q|0;if(u>>>0<16384)Q=6?u>>>6:u;else Q=((31?u>>31:u)&-255)+255|0;a[y>>0]=Q;u=C*6419|0;s=p*13320|0;p=8708-(8?u>>>8:u)-(8?s>>>8:s)+q|0;if(p>>>0<16384)R=6?p>>>6:p;else R=((31?p>>31:p)&-255)+255|0;a[y+1>>0]=R;p=C*33050|0;C=(8?p>>>8:p)+-17685+q|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[y+2>>0]=S;a[y+3>>0]=-1}if((o|0)<(m|0)){z=v;n=r;o=o+1|0}else{A=v;B=r;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=l<<2;n=i+o|0;i=(2?k>>>2:k)&255;z=(18?k>>>18:k)&255;k=(d[b+l>>0]|0)*19077|0;b=8?k>>>8:k;k=z*26149|0;m=(8?k>>>8:k)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[n>>0]=T;T=i*6419|0;m=z*13320|0;z=8708-(8?T>>>8:T)-(8?m>>>8:m)+b|0;if(z>>>0<16384)U=6?z>>>6:z;else U=((31?z>>31:z)&-255)+255|0;a[n+1>>0]=U;U=i*33050|0;i=(8?U>>>8:U)+-17685+b|0;if(i>>>0<16384)V=6?i>>>6:i;else V=((31?i>>31:i)&-255)+255|0;a[n+2>>0]=V;a[n+3>>0]=-1;if(!w)return;w=A+131074+(B*3|0)|0;B=j+o|0;o=(2?w>>>2:w)&255;j=(18?w>>>18:w)&255;w=(d[c+l>>0]|0)*19077|0;l=8?w>>>8:w;w=j*26149|0;c=(8?w>>>8:w)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[B>>0]=W;W=o*6419|0;c=j*13320|0;j=8708-(8?W>>>8:W)-(8?c>>>8:c)+l|0;if(j>>>0<16384)X=6?j>>>6:j;else X=((31?j>>31:j)&-255)+255|0;a[B+1>>0]=X;X=o*33050|0;o=(8?X>>>8:X)+-17685+l|0;if(o>>>0<16384)Y=6?o>>>6:o;else Y=((31?o>>31:o)&-255)+255|0;a[B+2>>0]=Y;a[B+3>>0]=-1;return}function Gc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var 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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=(18?p>>>18:p)&255;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=q*33050|0;t=s+-17685+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;q=r*13320|0;t=s+8708-(8?u>>>8:u)-(8?q>>>8:q)|0;if(t>>>0<16384)v=6?t>>>6:t;else v=((31?t>>31:t)&-255)+255|0;a[i+1>>0]=v;v=r*26149|0;r=s+-14234+(8?v>>>8:v)|0;if(r>>>0<16384)w=6?r>>>6:r;else w=((31?r>>31:r)&-255)+255|0;a[i+2>>0]=w;a[i+3>>0]=-1;w=(c|0)!=0;if(w){r=n+131074+(o*3|0)|0;v=(2?r>>>2:r)&255;s=(18?r>>>18:r)&255;r=(d[c>>0]|0)*19077|0;t=8?r>>>8:r;r=v*33050|0;q=(8?r>>>8:r)+-17685+t|0;if(q>>>0<16384)x=6?q>>>6:q;else x=((31?q>>31:q)&-255)+255|0;a[j>>0]=x;x=v*6419|0;v=s*13320|0;q=8708-(8?x>>>8:x)-(8?v>>>8:v)+t|0;if(q>>>0<16384)y=6?q>>>6:q;else y=((31?q>>31:q)&-255)+255|0;a[j+1>>0]=y;y=s*26149|0;s=(8?y>>>8:y)+-14234+t|0;if(s>>>0<16384)z=6?s>>>6:s;else z=((31?s>>31:s)&-255)+255|0;a[j+2>>0]=z;a[j+3>>0]=-1}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){s=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);t=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=s+n|0;q=y+524296+z+t|0;v=q+(y<<1)|0;y=3?v>>>3:v;v=q+(t+z<<1)|0;q=3?v>>>3:v;v=y+z|0;x=q+s|0;r=o<<1;u=r+-1|0;p=u<<2;C=i+p|0;D=(1?v>>>1:v)&255;E=(17?v>>>17:v)&255;v=(d[b+u>>0]|0)*19077|0;F=8?v>>>8:v;v=D*33050|0;G=F+-17685+(8?v>>>8:v)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[C>>0]=H;G=D*6419|0;D=E*13320|0;v=F+8708-(8?G>>>8:G)-(8?D>>>8:D)|0;if(v>>>0<16384)I=6?v>>>6:v;else I=((31?v>>31:v)&-255)+255|0;a[C+1>>0]=I;v=E*26149|0;E=F+-14234+(8?v>>>8:v)|0;if(E>>>0<16384)J=6?E>>>6:E;else J=((31?E>>31:E)&-255)+255|0;a[C+2>>0]=J;a[C+3>>0]=-1;C=o<<3;E=i+C|0;v=(1?x>>>1:x)&255;F=(17?x>>>17:x)&255;x=(d[b+r>>0]|0)*19077|0;D=8?x>>>8:x;x=v*33050|0;G=(8?x>>>8:x)+-17685+D|0;if(G>>>0<16384)K=6?G>>>6:G;else K=((31?G>>31:G)&-255)+255|0;a[E>>0]=K;G=v*6419|0;v=F*13320|0;x=8708-(8?G>>>8:G)-(8?v>>>8:v)+D|0;if(x>>>0<16384)L=6?x>>>6:x;else L=((31?x>>31:x)&-255)+255|0;a[E+1>>0]=L;x=F*26149|0;F=(8?x>>>8:x)+-14234+D|0;if(F>>>0<16384)M=6?F>>>6:F;else M=((31?F>>31:F)&-255)+255|0;a[E+2>>0]=M;a[E+3>>0]=-1;if(w){E=q+n|0;q=y+t|0;y=j+p|0;p=(1?E>>>1:E)&255;F=(17?E>>>17:E)&255;E=(d[c+u>>0]|0)*19077|0;u=8?E>>>8:E;E=p*33050|0;D=(8?E>>>8:E)+-17685+u|0;if(D>>>0<16384)N=6?D>>>6:D;else N=((31?D>>31:D)&-255)+255|0;a[y>>0]=N;D=p*6419|0;p=F*13320|0;E=8708-(8?D>>>8:D)-(8?p>>>8:p)+u|0;if(E>>>0<16384)O=6?E>>>6:E;else O=((31?E>>31:E)&-255)+255|0;a[y+1>>0]=O;E=F*26149|0;F=(8?E>>>8:E)+-14234+u|0;if(F>>>0<16384)P=6?F>>>6:F;else P=((31?F>>31:F)&-255)+255|0;a[y+2>>0]=P;a[y+3>>0]=-1;y=j+C|0;C=(1?q>>>1:q)&255;F=(17?q>>>17:q)&255;q=(d[c+r>>0]|0)*19077|0;r=8?q>>>8:q;q=C*33050|0;u=(8?q>>>8:q)+-17685+r|0;if(u>>>0<16384)Q=6?u>>>6:u;else Q=((31?u>>31:u)&-255)+255|0;a[y>>0]=Q;u=C*6419|0;C=F*13320|0;q=8708-(8?u>>>8:u)-(8?C>>>8:C)+r|0;if(q>>>0<16384)R=6?q>>>6:q;else R=((31?q>>31:q)&-255)+255|0;a[y+1>>0]=R;q=F*26149|0;F=(8?q>>>8:q)+-14234+r|0;if(F>>>0<16384)S=6?F>>>6:F;else S=((31?F>>31:F)&-255)+255|0;a[y+2>>0]=S;a[y+3>>0]=-1}if((o|0)<(m|0)){z=s;n=t;o=o+1|0}else{A=s;B=t;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=l<<2;n=i+o|0;i=(2?k>>>2:k)&255;z=(18?k>>>18:k)&255;k=(d[b+l>>0]|0)*19077|0;b=8?k>>>8:k;k=i*33050|0;m=(8?k>>>8:k)+-17685+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[n>>0]=T;T=i*6419|0;i=z*13320|0;m=8708-(8?T>>>8:T)-(8?i>>>8:i)+b|0;if(m>>>0<16384)U=6?m>>>6:m;else U=((31?m>>31:m)&-255)+255|0;a[n+1>>0]=U;U=z*26149|0;z=(8?U>>>8:U)+-14234+b|0;if(z>>>0<16384)V=6?z>>>6:z;else V=((31?z>>31:z)&-255)+255|0;a[n+2>>0]=V;a[n+3>>0]=-1;if(!w)return;w=A+131074+(B*3|0)|0;B=j+o|0;o=(2?w>>>2:w)&255;j=(18?w>>>18:w)&255;w=(d[c+l>>0]|0)*19077|0;l=8?w>>>8:w;w=o*33050|0;c=(8?w>>>8:w)+-17685+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[B>>0]=W;W=o*6419|0;o=j*13320|0;c=8708-(8?W>>>8:W)-(8?o>>>8:o)+l|0;if(c>>>0<16384)X=6?c>>>6:c;else X=((31?c>>31:c)&-255)+255|0;a[B+1>>0]=X;X=j*26149|0;j=(8?X>>>8:X)+-14234+l|0;if(j>>>0<16384)Y=6?j>>>6:j;else Y=((31?j>>31:j)&-255)+255|0;a[B+2>>0]=Y;a[B+3>>0]=-1;return}function Hc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var 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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;t=r*13320|0;r=s+8708-(8?t>>>8:t)-(8?u>>>8:u)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;a[i+1>>0]=v;v=q*33050|0;q=s+-17685+(8?v>>>8:v)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i+2>>0]=w;w=(c|0)!=0;if(w){q=n+131074+(o*3|0)|0;v=(2?q>>>2:q)&255;s=18?q>>>18:q;q=(d[c>>0]|0)*19077|0;r=8?q>>>8:q;q=s*26149|0;u=(8?q>>>8:q)+-14234+r|0;if(u>>>0<16384)x=6?u>>>6:u;else x=((31?u>>31:u)&-255)+255|0;a[j>>0]=x;x=v*6419|0;u=s*13320|0;s=8708-(8?u>>>8:u)-(8?x>>>8:x)+r|0;if(s>>>0<16384)y=6?s>>>6:s;else y=((31?s>>31:s)&-255)+255|0;a[j+1>>0]=y;y=v*33050|0;v=(8?y>>>8:y)+-17685+r|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[j+2>>0]=z}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){v=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);r=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=v+n|0;s=y+524296+z+r|0;x=s+(y<<1)|0;y=3?x>>>3:x;x=s+(r+z<<1)|0;s=3?x>>>3:x;x=y+z|0;u=s+v|0;q=o<<1;t=q+-1|0;p=(1?x>>>1:x)&255;C=17?x>>>17:x;x=t*3|0;D=i+x|0;E=(d[b+t>>0]|0)*19077|0;F=8?E>>>8:E;E=C*26149|0;G=F+-14234+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[D>>0]=H;G=p*6419|0;E=C*13320|0;C=F+8708-(8?E>>>8:E)-(8?G>>>8:G)|0;if(C>>>0<16384)I=6?C>>>6:C;else I=((31?C>>31:C)&-255)+255|0;a[D+1>>0]=I;C=p*33050|0;p=F+-17685+(8?C>>>8:C)|0;if(p>>>0<16384)J=6?p>>>6:p;else J=((31?p>>31:p)&-255)+255|0;a[D+2>>0]=J;D=(1?u>>>1:u)&255;p=17?u>>>17:u;u=o*6|0;C=i+u|0;F=(d[b+q>>0]|0)*19077|0;G=8?F>>>8:F;F=p*26149|0;E=(8?F>>>8:F)+-14234+G|0;if(E>>>0<16384)K=6?E>>>6:E;else K=((31?E>>31:E)&-255)+255|0;a[C>>0]=K;E=D*6419|0;F=p*13320|0;p=8708-(8?F>>>8:F)-(8?E>>>8:E)+G|0;if(p>>>0<16384)L=6?p>>>6:p;else L=((31?p>>31:p)&-255)+255|0;a[C+1>>0]=L;p=D*33050|0;D=(8?p>>>8:p)+-17685+G|0;if(D>>>0<16384)M=6?D>>>6:D;else M=((31?D>>31:D)&-255)+255|0;a[C+2>>0]=M;if(w){C=s+n|0;s=y+r|0;y=(1?C>>>1:C)&255;D=17?C>>>17:C;C=j+x|0;x=(d[c+t>>0]|0)*19077|0;t=8?x>>>8:x;x=D*26149|0;G=(8?x>>>8:x)+-14234+t|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;a[C>>0]=N;G=y*6419|0;x=D*13320|0;D=8708-(8?x>>>8:x)-(8?G>>>8:G)+t|0;if(D>>>0<16384)O=6?D>>>6:D;else O=((31?D>>31:D)&-255)+255|0;a[C+1>>0]=O;D=y*33050|0;y=(8?D>>>8:D)+-17685+t|0;if(y>>>0<16384)P=6?y>>>6:y;else P=((31?y>>31:y)&-255)+255|0;a[C+2>>0]=P;C=(1?s>>>1:s)&255;y=17?s>>>17:s;s=j+u|0;u=(d[c+q>>0]|0)*19077|0;q=8?u>>>8:u;u=y*26149|0;t=(8?u>>>8:u)+-14234+q|0;if(t>>>0<16384)Q=6?t>>>6:t;else Q=((31?t>>31:t)&-255)+255|0;a[s>>0]=Q;t=C*6419|0;u=y*13320|0;y=8708-(8?u>>>8:u)-(8?t>>>8:t)+q|0;if(y>>>0<16384)R=6?y>>>6:y;else R=((31?y>>31:y)&-255)+255|0;a[s+1>>0]=R;y=C*33050|0;C=(8?y>>>8:y)+-17685+q|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[s+2>>0]=S}if((o|0)<(m|0)){z=v;n=r;o=o+1|0}else{A=v;B=r;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l*3|0;z=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=n*26149|0;m=(8?i>>>8:i)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[z>>0]=T;T=o*6419|0;m=n*13320|0;n=8708-(8?m>>>8:m)-(8?T>>>8:T)+b|0;if(n>>>0<16384)U=6?n>>>6:n;else U=((31?n>>31:n)&-255)+255|0;a[z+1>>0]=U;U=o*33050|0;o=(8?U>>>8:U)+-17685+b|0;if(o>>>0<16384)V=6?o>>>6:o;else V=((31?o>>31:o)&-255)+255|0;a[z+2>>0]=V;if(!w)return;w=A+131074+(B*3|0)|0;B=(2?w>>>2:w)&255;A=18?w>>>18:w;w=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=A*26149|0;c=(8?k>>>8:k)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[w>>0]=W;W=B*6419|0;c=A*13320|0;A=8708-(8?c>>>8:c)-(8?W>>>8:W)+l|0;if(A>>>0<16384)X=6?A>>>6:A;else X=((31?A>>31:A)&-255)+255|0;a[w+1>>0]=X;X=B*33050|0;B=(8?X>>>8:X)+-17685+l|0;if(B>>>0<16384)Y=6?B>>>6:B;else Y=((31?B>>31:B)&-255)+255|0;a[w+2>>0]=Y;return}function Ic(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var 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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=q*33050|0;t=s+-17685+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i>>0]=u;u=q*6419|0;q=r*13320|0;t=s+8708-(8?q>>>8:q)-(8?u>>>8:u)|0;if(t>>>0<16384)v=6?t>>>6:t;else v=((31?t>>31:t)&-255)+255|0;a[i+1>>0]=v;v=r*26149|0;r=s+-14234+(8?v>>>8:v)|0;if(r>>>0<16384)w=6?r>>>6:r;else w=((31?r>>31:r)&-255)+255|0;a[i+2>>0]=w;w=(c|0)!=0;if(w){r=n+131074+(o*3|0)|0;v=(2?r>>>2:r)&255;s=18?r>>>18:r;r=(d[c>>0]|0)*19077|0;t=8?r>>>8:r;r=v*33050|0;u=(8?r>>>8:r)+-17685+t|0;if(u>>>0<16384)x=6?u>>>6:u;else x=((31?u>>31:u)&-255)+255|0;a[j>>0]=x;x=v*6419|0;v=s*13320|0;u=8708-(8?v>>>8:v)-(8?x>>>8:x)+t|0;if(u>>>0<16384)y=6?u>>>6:u;else y=((31?u>>31:u)&-255)+255|0;a[j+1>>0]=y;y=s*26149|0;s=(8?y>>>8:y)+-14234+t|0;if(s>>>0<16384)z=6?s>>>6:s;else z=((31?s>>31:s)&-255)+255|0;a[j+2>>0]=z}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){s=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);t=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=s+n|0;u=y+524296+z+t|0;x=u+(y<<1)|0;y=3?x>>>3:x;x=u+(t+z<<1)|0;u=3?x>>>3:x;x=y+z|0;v=u+s|0;r=o<<1;q=r+-1|0;p=(1?x>>>1:x)&255;C=17?x>>>17:x;x=q*3|0;D=i+x|0;E=(d[b+q>>0]|0)*19077|0;F=8?E>>>8:E;E=p*33050|0;G=F+-17685+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[D>>0]=H;G=p*6419|0;p=C*13320|0;E=F+8708-(8?p>>>8:p)-(8?G>>>8:G)|0;if(E>>>0<16384)I=6?E>>>6:E;else I=((31?E>>31:E)&-255)+255|0;a[D+1>>0]=I;E=C*26149|0;C=F+-14234+(8?E>>>8:E)|0;if(C>>>0<16384)J=6?C>>>6:C;else J=((31?C>>31:C)&-255)+255|0;a[D+2>>0]=J;D=(1?v>>>1:v)&255;C=17?v>>>17:v;v=o*6|0;E=i+v|0;F=(d[b+r>>0]|0)*19077|0;G=8?F>>>8:F;F=D*33050|0;p=(8?F>>>8:F)+-17685+G|0;if(p>>>0<16384)K=6?p>>>6:p;else K=((31?p>>31:p)&-255)+255|0;a[E>>0]=K;p=D*6419|0;D=C*13320|0;F=8708-(8?D>>>8:D)-(8?p>>>8:p)+G|0;if(F>>>0<16384)L=6?F>>>6:F;else L=((31?F>>31:F)&-255)+255|0;a[E+1>>0]=L;F=C*26149|0;C=(8?F>>>8:F)+-14234+G|0;if(C>>>0<16384)M=6?C>>>6:C;else M=((31?C>>31:C)&-255)+255|0;a[E+2>>0]=M;if(w){E=u+n|0;u=y+t|0;y=(1?E>>>1:E)&255;C=17?E>>>17:E;E=j+x|0;x=(d[c+q>>0]|0)*19077|0;q=8?x>>>8:x;x=y*33050|0;G=(8?x>>>8:x)+-17685+q|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;a[E>>0]=N;G=y*6419|0;y=C*13320|0;x=8708-(8?y>>>8:y)-(8?G>>>8:G)+q|0;if(x>>>0<16384)O=6?x>>>6:x;else O=((31?x>>31:x)&-255)+255|0;a[E+1>>0]=O;x=C*26149|0;C=(8?x>>>8:x)+-14234+q|0;if(C>>>0<16384)P=6?C>>>6:C;else P=((31?C>>31:C)&-255)+255|0;a[E+2>>0]=P;E=(1?u>>>1:u)&255;C=17?u>>>17:u;u=j+v|0;v=(d[c+r>>0]|0)*19077|0;r=8?v>>>8:v;v=E*33050|0;q=(8?v>>>8:v)+-17685+r|0;if(q>>>0<16384)Q=6?q>>>6:q;else Q=((31?q>>31:q)&-255)+255|0;a[u>>0]=Q;q=E*6419|0;E=C*13320|0;v=8708-(8?E>>>8:E)-(8?q>>>8:q)+r|0;if(v>>>0<16384)R=6?v>>>6:v;else R=((31?v>>31:v)&-255)+255|0;a[u+1>>0]=R;v=C*26149|0;C=(8?v>>>8:v)+-14234+r|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[u+2>>0]=S}if((o|0)<(m|0)){z=s;n=t;o=o+1|0}else{A=s;B=t;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l*3|0;z=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=o*33050|0;m=(8?i>>>8:i)+-17685+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[z>>0]=T;T=o*6419|0;o=n*13320|0;m=8708-(8?o>>>8:o)-(8?T>>>8:T)+b|0;if(m>>>0<16384)U=6?m>>>6:m;else U=((31?m>>31:m)&-255)+255|0;a[z+1>>0]=U;U=n*26149|0;n=(8?U>>>8:U)+-14234+b|0;if(n>>>0<16384)V=6?n>>>6:n;else V=((31?n>>31:n)&-255)+255|0;a[z+2>>0]=V;if(!w)return;w=A+131074+(B*3|0)|0;B=(2?w>>>2:w)&255;A=18?w>>>18:w;w=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=B*33050|0;c=(8?k>>>8:k)+-17685+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[w>>0]=W;W=B*6419|0;B=A*13320|0;c=8708-(8?B>>>8:B)-(8?W>>>8:W)+l|0;if(c>>>0<16384)X=6?c>>>6:c;else X=((31?c>>31:c)&-255)+255|0;a[w+1>>0]=X;X=A*26149|0;A=(8?X>>>8:X)+-14234+l|0;if(A>>>0<16384)Y=6?A>>>6:A;else Y=((31?A>>31:A)&-255)+255|0;a[w+2>>0]=Y;return}function Jc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var 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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=a[b>>0]|0;a[i>>0]=-1;r=(2?p>>>2:p)&255;s=(18?p>>>18:p)&255;p=(q&255)*19077|0;q=8?p>>>8:p;p=s*26149|0;t=q+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;a[i+1>>0]=u;u=r*6419|0;t=s*13320|0;s=q+8708-(8?u>>>8:u)-(8?t>>>8:t)|0;if(s>>>0<16384)v=6?s>>>6:s;else v=((31?s>>31:s)&-255)+255|0;a[i+2>>0]=v;v=r*33050|0;r=q+-17685+(8?v>>>8:v)|0;if(r>>>0<16384)w=6?r>>>6:r;else w=((31?r>>31:r)&-255)+255|0;a[i+3>>0]=w;w=(c|0)!=0;if(w){r=n+131074+(o*3|0)|0;v=a[c>>0]|0;a[j>>0]=-1;q=(2?r>>>2:r)&255;s=(18?r>>>18:r)&255;r=(v&255)*19077|0;v=8?r>>>8:r;r=s*26149|0;t=(8?r>>>8:r)+-14234+v|0;if(t>>>0<16384)x=6?t>>>6:t;else x=((31?t>>31:t)&-255)+255|0;a[j+1>>0]=x;x=q*6419|0;t=s*13320|0;s=8708-(8?x>>>8:x)-(8?t>>>8:t)+v|0;if(s>>>0<16384)y=6?s>>>6:s;else y=((31?s>>31:s)&-255)+255|0;a[j+2>>0]=y;y=q*33050|0;q=(8?y>>>8:y)+-17685+v|0;if(q>>>0<16384)z=6?q>>>6:q;else z=((31?q>>31:q)&-255)+255|0;a[j+3>>0]=z}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){q=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);v=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);y=q+n|0;s=y+524296+z+v|0;t=s+(y<<1)|0;y=3?t>>>3:t;t=s+(v+z<<1)|0;s=3?t>>>3:t;t=y+z|0;x=s+q|0;r=o<<1;u=r+-1|0;p=a[b+u>>0]|0;C=u<<2;D=i+C|0;a[D>>0]=-1;E=(1?t>>>1:t)&255;F=(17?t>>>17:t)&255;t=(p&255)*19077|0;p=8?t>>>8:t;t=F*26149|0;G=p+-14234+(8?t>>>8:t)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;a[D+1>>0]=H;G=E*6419|0;t=F*13320|0;F=p+8708-(8?G>>>8:G)-(8?t>>>8:t)|0;if(F>>>0<16384)I=6?F>>>6:F;else I=((31?F>>31:F)&-255)+255|0;a[D+2>>0]=I;F=E*33050|0;E=p+-17685+(8?F>>>8:F)|0;if(E>>>0<16384)J=6?E>>>6:E;else J=((31?E>>31:E)&-255)+255|0;a[D+3>>0]=J;D=a[b+r>>0]|0;E=o<<3;F=i+E|0;a[F>>0]=-1;p=(1?x>>>1:x)&255;t=(17?x>>>17:x)&255;x=(D&255)*19077|0;D=8?x>>>8:x;x=t*26149|0;G=(8?x>>>8:x)+-14234+D|0;if(G>>>0<16384)K=6?G>>>6:G;else K=((31?G>>31:G)&-255)+255|0;a[F+1>>0]=K;G=p*6419|0;x=t*13320|0;t=8708-(8?G>>>8:G)-(8?x>>>8:x)+D|0;if(t>>>0<16384)L=6?t>>>6:t;else L=((31?t>>31:t)&-255)+255|0;a[F+2>>0]=L;t=p*33050|0;p=(8?t>>>8:t)+-17685+D|0;if(p>>>0<16384)M=6?p>>>6:p;else M=((31?p>>31:p)&-255)+255|0;a[F+3>>0]=M;if(w){F=s+n|0;s=y+v|0;y=a[c+u>>0]|0;u=j+C|0;a[u>>0]=-1;C=(1?F>>>1:F)&255;p=(17?F>>>17:F)&255;F=(y&255)*19077|0;y=8?F>>>8:F;F=p*26149|0;D=(8?F>>>8:F)+-14234+y|0;if(D>>>0<16384)N=6?D>>>6:D;else N=((31?D>>31:D)&-255)+255|0;a[u+1>>0]=N;D=C*6419|0;F=p*13320|0;p=8708-(8?D>>>8:D)-(8?F>>>8:F)+y|0;if(p>>>0<16384)O=6?p>>>6:p;else O=((31?p>>31:p)&-255)+255|0;a[u+2>>0]=O;p=C*33050|0;C=(8?p>>>8:p)+-17685+y|0;if(C>>>0<16384)P=6?C>>>6:C;else P=((31?C>>31:C)&-255)+255|0;a[u+3>>0]=P;u=a[c+r>>0]|0;r=j+E|0;a[r>>0]=-1;E=(1?s>>>1:s)&255;C=(17?s>>>17:s)&255;s=(u&255)*19077|0;u=8?s>>>8:s;s=C*26149|0;y=(8?s>>>8:s)+-14234+u|0;if(y>>>0<16384)Q=6?y>>>6:y;else Q=((31?y>>31:y)&-255)+255|0;a[r+1>>0]=Q;y=E*6419|0;s=C*13320|0;C=8708-(8?y>>>8:y)-(8?s>>>8:s)+u|0;if(C>>>0<16384)R=6?C>>>6:C;else R=((31?C>>31:C)&-255)+255|0;a[r+2>>0]=R;C=E*33050|0;E=(8?C>>>8:C)+-17685+u|0;if(E>>>0<16384)S=6?E>>>6:E;else S=((31?E>>31:E)&-255)+255|0;a[r+3>>0]=S}if((o|0)<(m|0)){z=q;n=v;o=o+1|0}else{A=q;B=v;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=a[b+l>>0]|0;b=l<<2;n=i+b|0;a[n>>0]=-1;i=(2?k>>>2:k)&255;z=(18?k>>>18:k)&255;k=(o&255)*19077|0;o=8?k>>>8:k;k=z*26149|0;m=(8?k>>>8:k)+-14234+o|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;a[n+1>>0]=T;T=i*6419|0;m=z*13320|0;z=8708-(8?T>>>8:T)-(8?m>>>8:m)+o|0;if(z>>>0<16384)U=6?z>>>6:z;else U=((31?z>>31:z)&-255)+255|0;a[n+2>>0]=U;U=i*33050|0;i=(8?U>>>8:U)+-17685+o|0;if(i>>>0<16384)V=6?i>>>6:i;else V=((31?i>>31:i)&-255)+255|0;a[n+3>>0]=V;if(!w)return;w=A+131074+(B*3|0)|0;B=a[c+l>>0]|0;l=j+b|0;a[l>>0]=-1;b=(2?w>>>2:w)&255;j=(18?w>>>18:w)&255;w=(B&255)*19077|0;B=8?w>>>8:w;w=j*26149|0;c=(8?w>>>8:w)+-14234+B|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;a[l+1>>0]=W;W=b*6419|0;c=j*13320|0;j=8708-(8?W>>>8:W)-(8?c>>>8:c)+B|0;if(j>>>0<16384)X=6?j>>>6:j;else X=((31?j>>31:j)&-255)+255|0;a[l+2>>0]=X;X=b*33050|0;b=(8?X>>>8:X)+-17685+B|0;if(b>>>0<16384)Y=6?b>>>6:b;else Y=((31?b>>31:b)&-255)+255|0;a[l+3>>0]=Y;return}function Kc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var 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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;t=q*6419|0;p=r*13320|0;r=s+8708-(8?p>>>8:p)-(8?t>>>8:t)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;r=q*33050|0;q=s+-17685+(8?r>>>8:r)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i>>0]=(4?v>>>4:v)|u&240;a[i+1>>0]=w|15;w=(c|0)!=0;if(w){u=n+131074+(o*3|0)|0;v=(2?u>>>2:u)&255;q=18?u>>>18:u;u=(d[c>>0]|0)*19077|0;r=8?u>>>8:u;u=q*26149|0;s=(8?u>>>8:u)+-14234+r|0;if(s>>>0<16384)x=6?s>>>6:s;else x=((31?s>>31:s)&-255)+255|0;s=v*6419|0;u=q*13320|0;q=8708-(8?u>>>8:u)-(8?s>>>8:s)+r|0;if(q>>>0<16384)y=6?q>>>6:q;else y=((31?q>>31:q)&-255)+255|0;q=v*33050|0;v=(8?q>>>8:q)+-17685+r|0;if(v>>>0<16384)z=6?v>>>6:v;else z=((31?v>>31:v)&-255)+255|0;a[j>>0]=(4?y>>>4:y)|x&240;a[j+1>>0]=z|15}if((k|0)<3){A=n;B=o}else{z=n;n=o;o=1;while(1){x=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);y=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);v=x+n|0;r=v+524296+z+y|0;q=r+(v<<1)|0;v=3?q>>>3:q;q=r+(y+z<<1)|0;r=3?q>>>3:q;q=v+z|0;s=r+x|0;u=o<<1;t=u+-1|0;p=(1?q>>>1:q)&255;C=17?q>>>17:q;q=t<<1;D=i+q|0;E=(d[b+t>>0]|0)*19077|0;F=8?E>>>8:E;E=C*26149|0;G=F+-14234+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;G=p*6419|0;E=C*13320|0;C=F+8708-(8?E>>>8:E)-(8?G>>>8:G)|0;if(C>>>0<16384)I=6?C>>>6:C;else I=((31?C>>31:C)&-255)+255|0;C=p*33050|0;p=F+-17685+(8?C>>>8:C)|0;if(p>>>0<16384)J=6?p>>>6:p;else J=((31?p>>31:p)&-255)+255|0;a[D>>0]=(4?I>>>4:I)|H&240;a[D+1>>0]=J|15;D=(1?s>>>1:s)&255;p=17?s>>>17:s;s=o<<2;C=i+s|0;F=(d[b+u>>0]|0)*19077|0;G=8?F>>>8:F;F=p*26149|0;E=(8?F>>>8:F)+-14234+G|0;if(E>>>0<16384)K=6?E>>>6:E;else K=((31?E>>31:E)&-255)+255|0;E=D*6419|0;F=p*13320|0;p=8708-(8?F>>>8:F)-(8?E>>>8:E)+G|0;if(p>>>0<16384)L=6?p>>>6:p;else L=((31?p>>31:p)&-255)+255|0;p=D*33050|0;D=(8?p>>>8:p)+-17685+G|0;if(D>>>0<16384)M=6?D>>>6:D;else M=((31?D>>31:D)&-255)+255|0;a[C>>0]=(4?L>>>4:L)|K&240;a[C+1>>0]=M|15;if(w){C=r+n|0;r=v+y|0;v=(1?C>>>1:C)&255;D=17?C>>>17:C;C=j+q|0;q=(d[c+t>>0]|0)*19077|0;t=8?q>>>8:q;q=D*26149|0;G=(8?q>>>8:q)+-14234+t|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;G=v*6419|0;q=D*13320|0;D=8708-(8?q>>>8:q)-(8?G>>>8:G)+t|0;if(D>>>0<16384)O=6?D>>>6:D;else O=((31?D>>31:D)&-255)+255|0;D=v*33050|0;v=(8?D>>>8:D)+-17685+t|0;if(v>>>0<16384)P=6?v>>>6:v;else P=((31?v>>31:v)&-255)+255|0;a[C>>0]=(4?O>>>4:O)|N&240;a[C+1>>0]=P|15;C=(1?r>>>1:r)&255;v=17?r>>>17:r;r=j+s|0;s=(d[c+u>>0]|0)*19077|0;u=8?s>>>8:s;s=v*26149|0;t=(8?s>>>8:s)+-14234+u|0;if(t>>>0<16384)Q=6?t>>>6:t;else Q=((31?t>>31:t)&-255)+255|0;t=C*6419|0;s=v*13320|0;v=8708-(8?s>>>8:s)-(8?t>>>8:t)+u|0;if(v>>>0<16384)R=6?v>>>6:v;else R=((31?v>>31:v)&-255)+255|0;v=C*33050|0;C=(8?v>>>8:v)+-17685+u|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[r>>0]=(4?R>>>4:R)|Q&240;a[r+1>>0]=S|15}if((o|0)<(m|0)){z=x;n=y;o=o+1|0}else{A=x;B=y;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l<<1;z=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=n*26149|0;m=(8?i>>>8:i)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;m=o*6419|0;i=n*13320|0;n=8708-(8?i>>>8:i)-(8?m>>>8:m)+b|0;if(n>>>0<16384)U=6?n>>>6:n;else U=((31?n>>31:n)&-255)+255|0;n=o*33050|0;o=(8?n>>>8:n)+-17685+b|0;if(o>>>0<16384)V=6?o>>>6:o;else V=((31?o>>31:o)&-255)+255|0;a[z>>0]=(4?U>>>4:U)|T&240;a[z+1>>0]=V|15;if(!w)return;w=A+131074+(B*3|0)|0;B=(2?w>>>2:w)&255;A=18?w>>>18:w;w=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=A*26149|0;c=(8?k>>>8:k)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;c=B*6419|0;k=A*13320|0;A=8708-(8?k>>>8:k)-(8?c>>>8:c)+l|0;if(A>>>0<16384)X=6?A>>>6:A;else X=((31?A>>31:A)&-255)+255|0;A=B*33050|0;B=(8?A>>>8:A)+-17685+l|0;if(B>>>0<16384)Y=6?B>>>6:B;else Y=((31?B>>31:B)&-255)+255|0;a[w>>0]=(4?X>>>4:X)|W&240;a[w+1>>0]=Y|15;return} + function Lc(b,c,e,f,g,h,i,j,k){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var 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,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;l=k+-1|0;m=1?l>>1:l;n=(d[f>>0]|0)<<16|(d[e>>0]|0);o=(d[h>>0]|0)<<16|(d[g>>0]|0);p=(n*3|0)+131074+o|0;q=(2?p>>>2:p)&255;r=18?p>>>18:p;p=(d[b>>0]|0)*19077|0;s=8?p>>>8:p;p=r*26149|0;t=s+-14234+(8?p>>>8:p)|0;if(t>>>0<16384)u=6?t>>>6:t;else u=((31?t>>31:t)&-255)+255|0;t=q*6419|0;p=r*13320|0;r=s+8708-(8?p>>>8:p)-(8?t>>>8:t)|0;if(r>>>0<16384)v=6?r>>>6:r;else v=((31?r>>31:r)&-255)+255|0;r=q*33050|0;q=s+-17685+(8?r>>>8:r)|0;if(q>>>0<16384)w=6?q>>>6:q;else w=((31?q>>31:q)&-255)+255|0;a[i>>0]=(5?v>>>5:v)|u&248;a[i+1>>0]=(3?w>>>3:w)|v<<3&224;v=(c|0)!=0;if(v){w=n+131074+(o*3|0)|0;u=(2?w>>>2:w)&255;q=18?w>>>18:w;w=(d[c>>0]|0)*19077|0;r=8?w>>>8:w;w=q*26149|0;s=(8?w>>>8:w)+-14234+r|0;if(s>>>0<16384)x=6?s>>>6:s;else x=((31?s>>31:s)&-255)+255|0;s=u*6419|0;w=q*13320|0;q=8708-(8?w>>>8:w)-(8?s>>>8:s)+r|0;if(q>>>0<16384)y=6?q>>>6:q;else y=((31?q>>31:q)&-255)+255|0;q=u*33050|0;u=(8?q>>>8:q)+-17685+r|0;if(u>>>0<16384)z=6?u>>>6:u;else z=((31?u>>31:u)&-255)+255|0;a[j>>0]=(5?y>>>5:y)|x&248;a[j+1>>0]=(3?z>>>3:z)|y<<3&224}if((k|0)<3){A=n;B=o}else{y=n;n=o;o=1;while(1){z=(d[f+o>>0]|0)<<16|(d[e+o>>0]|0);x=(d[h+o>>0]|0)<<16|(d[g+o>>0]|0);u=z+n|0;r=u+524296+y+x|0;q=r+(u<<1)|0;u=3?q>>>3:q;q=r+(x+y<<1)|0;r=3?q>>>3:q;q=u+y|0;s=r+z|0;w=o<<1;t=w+-1|0;p=(1?q>>>1:q)&255;C=17?q>>>17:q;q=t<<1;D=i+q|0;E=(d[b+t>>0]|0)*19077|0;F=8?E>>>8:E;E=C*26149|0;G=F+-14234+(8?E>>>8:E)|0;if(G>>>0<16384)H=6?G>>>6:G;else H=((31?G>>31:G)&-255)+255|0;G=p*6419|0;E=C*13320|0;C=F+8708-(8?E>>>8:E)-(8?G>>>8:G)|0;if(C>>>0<16384)I=6?C>>>6:C;else I=((31?C>>31:C)&-255)+255|0;C=p*33050|0;p=F+-17685+(8?C>>>8:C)|0;if(p>>>0<16384)J=6?p>>>6:p;else J=((31?p>>31:p)&-255)+255|0;a[D>>0]=(5?I>>>5:I)|H&248;a[D+1>>0]=(3?J>>>3:J)|I<<3&224;D=(1?s>>>1:s)&255;p=17?s>>>17:s;s=o<<2;C=i+s|0;F=(d[b+w>>0]|0)*19077|0;G=8?F>>>8:F;F=p*26149|0;E=(8?F>>>8:F)+-14234+G|0;if(E>>>0<16384)K=6?E>>>6:E;else K=((31?E>>31:E)&-255)+255|0;E=D*6419|0;F=p*13320|0;p=8708-(8?F>>>8:F)-(8?E>>>8:E)+G|0;if(p>>>0<16384)L=6?p>>>6:p;else L=((31?p>>31:p)&-255)+255|0;p=D*33050|0;D=(8?p>>>8:p)+-17685+G|0;if(D>>>0<16384)M=6?D>>>6:D;else M=((31?D>>31:D)&-255)+255|0;a[C>>0]=(5?L>>>5:L)|K&248;a[C+1>>0]=(3?M>>>3:M)|L<<3&224;if(v){C=r+n|0;r=u+x|0;u=(1?C>>>1:C)&255;D=17?C>>>17:C;C=j+q|0;q=(d[c+t>>0]|0)*19077|0;t=8?q>>>8:q;q=D*26149|0;G=(8?q>>>8:q)+-14234+t|0;if(G>>>0<16384)N=6?G>>>6:G;else N=((31?G>>31:G)&-255)+255|0;G=u*6419|0;q=D*13320|0;D=8708-(8?q>>>8:q)-(8?G>>>8:G)+t|0;if(D>>>0<16384)O=6?D>>>6:D;else O=((31?D>>31:D)&-255)+255|0;D=u*33050|0;u=(8?D>>>8:D)+-17685+t|0;if(u>>>0<16384)P=6?u>>>6:u;else P=((31?u>>31:u)&-255)+255|0;a[C>>0]=(5?O>>>5:O)|N&248;a[C+1>>0]=(3?P>>>3:P)|O<<3&224;C=(1?r>>>1:r)&255;u=17?r>>>17:r;r=j+s|0;s=(d[c+w>>0]|0)*19077|0;w=8?s>>>8:s;s=u*26149|0;t=(8?s>>>8:s)+-14234+w|0;if(t>>>0<16384)Q=6?t>>>6:t;else Q=((31?t>>31:t)&-255)+255|0;t=C*6419|0;s=u*13320|0;u=8708-(8?s>>>8:s)-(8?t>>>8:t)+w|0;if(u>>>0<16384)R=6?u>>>6:u;else R=((31?u>>31:u)&-255)+255|0;u=C*33050|0;C=(8?u>>>8:u)+-17685+w|0;if(C>>>0<16384)S=6?C>>>6:C;else S=((31?C>>31:C)&-255)+255|0;a[r>>0]=(5?R>>>5:R)|Q&248;a[r+1>>0]=(3?S>>>3:S)|R<<3&224}if((o|0)<(m|0)){y=z;n=x;o=o+1|0}else{A=z;B=x;break}}}if(k&1|0)return;k=B+131074+(A*3|0)|0;o=(2?k>>>2:k)&255;n=18?k>>>18:k;k=l<<1;y=i+k|0;i=(d[b+l>>0]|0)*19077|0;b=8?i>>>8:i;i=n*26149|0;m=(8?i>>>8:i)+-14234+b|0;if(m>>>0<16384)T=6?m>>>6:m;else T=((31?m>>31:m)&-255)+255|0;m=o*6419|0;i=n*13320|0;n=8708-(8?i>>>8:i)-(8?m>>>8:m)+b|0;if(n>>>0<16384)U=6?n>>>6:n;else U=((31?n>>31:n)&-255)+255|0;n=o*33050|0;o=(8?n>>>8:n)+-17685+b|0;if(o>>>0<16384)V=6?o>>>6:o;else V=((31?o>>31:o)&-255)+255|0;a[y>>0]=(5?U>>>5:U)|T&248;a[y+1>>0]=(3?V>>>3:V)|U<<3&224;if(!v)return;v=A+131074+(B*3|0)|0;B=(2?v>>>2:v)&255;A=18?v>>>18:v;v=j+k|0;k=(d[c+l>>0]|0)*19077|0;l=8?k>>>8:k;k=A*26149|0;c=(8?k>>>8:k)+-14234+l|0;if(c>>>0<16384)W=6?c>>>6:c;else W=((31?c>>31:c)&-255)+255|0;c=B*6419|0;k=A*13320|0;A=8708-(8?k>>>8:k)-(8?c>>>8:c)+l|0;if(A>>>0<16384)X=6?A>>>6:A;else X=((31?A>>31:A)&-255)+255|0;A=B*33050|0;B=(8?A>>>8:A)+-17685+l|0;if(B>>>0<16384)Y=6?B>>>6:B;else Y=((31?B>>31:B)&-255)+255|0;a[v>>0]=(5?X>>>5:X)|W&248;a[v+1>>0]=(3?Y>>>3:Y)|X<<3&224;return}function Mc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=c[d>>2]|0;g=c[e>>2]|0;h=((b|0)<0)<<31>>31;i=((a|0)<0)<<31>>31;if((b|0)>0&(f|0)==0){j=Cf(g|0,((g|0)<0)<<31>>31|0,a|0,i|0)|0;k=v()|0;l=Df(b|0,h|0,-1,-1)|0;m=Df(l|0,v()|0,j|0,k|0)|0;k=Hf(m|0,v()|0,b|0,h|0)|0;v()|0;n=k}else n=f;if((a|0)>0&(g|0)==0){f=Cf(n|0,((n|0)<0)<<31>>31|0,b|0,h|0)|0;h=v()|0;b=Df(a|0,i|0,-1,-1)|0;k=Df(b|0,v()|0,f|0,h|0)|0;h=Hf(k|0,v()|0,a|0,i|0)|0;v()|0;o=h}else o=g;if((n|0)<1|(o|0)<1){p=0;return p|0}c[d>>2]=n;c[e>>2]=o;p=1;return p|0}function Nc(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0;if(!b)g=0;else g=a[b>>0]|0;if((f|0)<=0)return;b=g;g=0;do{b=(d[c+g>>0]|0)+(b&255)&255;a[e+g>>0]=b;g=g+1|0}while((g|0)!=(f|0));return}function Oc(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=(f|0)>0;if(!b){if(!g)return;h=0;i=0;do{h=(h&255)+(d[c+i>>0]|0)|0;a[e+i>>0]=h;i=i+1|0}while((i|0)!=(f|0));return}else{if(!g)return;g=0;do{a[e+g>>0]=(d[c+g>>0]|0)+(d[b+g>>0]|0);g=g+1|0}while((g|0)!=(f|0));return}}function Pc(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if(!b){if((f|0)<=0)return;g=0;h=0;do{g=(g&255)+(d[c+h>>0]|0)|0;a[e+h>>0]=g;h=h+1|0}while((h|0)!=(f|0));return}h=a[b>>0]|0;if((f|0)<=0)return;g=(h&255)-(h&255)+(h&255)|0;i=(g>>>0<256?g:(31?g>>>31:g)+255|0)+(d[c>>0]|0)|0;a[e>>0]=i;if((f|0)==1)return;g=1;j=i;i=h;do{h=i;i=a[b+g>>0]|0;k=(j&255)-(h&255)+(i&255)|0;j=(k>>>0<256?k:(31?k>>>31:k)+255|0)+(d[c+g>>0]|0)|0;a[e+g>>0]=j;g=g+1|0}while((g|0)!=(f|0));return}function Qc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;a[g>>0]=a[b>>0]|0;h=b+1|0;i=g+1|0;j=c+-1|0;k=(c|0)>1;if(k){c=0;do{a[i+c>>0]=(d[h+c>>0]|0)-(d[b+c>>0]|0);c=c+1|0}while((c|0)!=(j|0))}c=b+f|0;h=g+f|0;if((e|0)<=1)return;if(!k){k=1;g=c;i=h;l=b;while(1){a[i>>0]=(d[g>>0]|0)-(d[l>>0]|0);k=k+1|0;if((k|0)==(e|0))break;else{m=g;g=g+f|0;i=i+f|0;l=m}}return}l=1;i=c;c=h;h=b;while(1){a[c>>0]=(d[i>>0]|0)-(d[h>>0]|0);b=i+1|0;g=c+1|0;k=0;do{a[g+k>>0]=(d[b+k>>0]|0)-(d[i+k>>0]|0);k=k+1|0}while((k|0)!=(j|0));l=l+1|0;if((l|0)==(e|0))break;else{k=i;i=i+f|0;c=c+f|0;h=k}}return}function Rc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;a[g>>0]=a[b>>0]|0;h=b+1|0;i=g+1|0;j=c+-1|0;if((c|0)>1){k=0;do{a[i+k>>0]=(d[h+k>>0]|0)-(d[b+k>>0]|0);k=k+1|0}while((k|0)!=(j|0))}if(!((c|0)>0&(e|0)>1))return;j=1;k=g;g=b;do{b=g;g=g+f|0;k=k+f|0;h=0;do{a[k+h>>0]=(d[g+h>>0]|0)-(d[b+h>>0]|0);h=h+1|0}while((h|0)!=(c|0));j=j+1|0}while((j|0)!=(e|0));return}function Sc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;a[g>>0]=a[b>>0]|0;h=b+1|0;i=g+1|0;j=c+-1|0;k=(c|0)>1;if(k){l=0;do{a[i+l>>0]=(d[h+l>>0]|0)-(d[b+l>>0]|0);l=l+1|0}while((l|0)!=(j|0))}j=g+f|0;g=b+f|0;if((e|0)<=1)return;l=~f;if(!k){k=1;h=j;i=g;m=b;while(1){a[h>>0]=(d[i>>0]|0)-(d[m>>0]|0);k=k+1|0;if((k|0)==(e|0))break;else{n=i;h=h+f|0;i=i+f|0;m=n}}return}m=1;i=j;j=g;g=b;while(1){a[i>>0]=(d[j>>0]|0)-(d[g>>0]|0);b=1;do{h=(d[g+b>>0]|0)+(d[j+(b+-1)>>0]|0)-(d[j+(b+l)>>0]|0)|0;a[i+b>>0]=(d[j+b>>0]|0)-(h>>>0<256?h:(31?h>>>31:h)+255|0);b=b+1|0}while((b|0)!=(c|0));m=m+1|0;if((m|0)==(e|0))break;else{b=j;i=i+f|0;j=j+f|0;g=b}}return}function Tc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;if(!a){b=2;return b|0}d=(c[a+8>>2]|0)+-1|0;if((c[a>>2]|0)>>>0<=10){e=a+20|0;f=c[e>>2]|0;g=r(f,d)|0;h=a+16|0;c[h>>2]=(c[h>>2]|0)+g;c[e>>2]=0-f;b=0;return b|0}f=a+32|0;e=c[f>>2]|0;g=r(e,d)|0;h=a+16|0;c[h>>2]=(c[h>>2]|0)+g;c[f>>2]=0-e;e=1?d>>1:d;f=a+36|0;g=c[f>>2]|0;h=r(g,e)|0;i=a+20|0;c[i>>2]=(c[i>>2]|0)+h;c[f>>2]=0-g;g=a+40|0;f=c[g>>2]|0;h=r(f,e)|0;e=a+24|0;c[e>>2]=(c[e>>2]|0)+h;c[g>>2]=0-f;f=a+28|0;g=c[f>>2]|0;if(!g){b=0;return b|0}h=a+44|0;a=c[h>>2]|0;e=g+(r(a,d)|0)|0;c[f>>2]=e;c[h>>2]=0-a;b=0;return b|0}function Uc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=Y;Y=Y+16|0;h=g+4|0;i=g;if((d|0)<1|((b|0)<1|(f|0)==0)){j=2;Y=g;return j|0}k=(e|0)!=0;if(k){if(c[e+8>>2]|0){l=c[e+20>>2]|0;m=c[e+24>>2]|0;n=c[e+12>>2]|0;o=c[e+16>>2]|0;if((m|0)<1|((l|0)<1|(o|n|0)<0)){j=2;Y=g;return j|0}if(((n&-2)+l|0)>(b|0)|((o&-2)+m|0)>(d|0)){j=2;Y=g;return j|0}else{p=l;q=m}}else{p=b;q=d}if(c[e+28>>2]|0){c[h>>2]=c[e+32>>2];c[i>>2]=c[e+36>>2];m=(Mc(p,q,h,i)|0)==0;if(m){j=2;Y=g;return j|0}else{s=c[h>>2]|0;t=c[i>>2]|0}}else{s=p;t=q}}else{s=b;t=d}c[f+4>>2]=s;d=f+8|0;c[d>>2]=t;b=c[f>>2]|0;if((t|0)<1|(s|0)<1|b>>>0>12){j=2;Y=g;return j|0}do if((c[f+12>>2]|0)<1?(q=f+80|0,(c[q>>2]|0)==0):0){p=((s|0)<0)<<31>>31;i=a[8683+b>>0]|0;h=Cf(i&255|0,0,s|0,p|0)|0;m=v()|0;if(m>>>0>0|(m|0)==0&h>>>0>4294967295){j=2;Y=g;return j|0}h=r(s,i&255)|0;i=((t|0)<0)<<31>>31;m=Cf(h|0,((h|0)<0)<<31>>31|0,t|0,i|0)|0;l=v()|0;o=b>>>0>10;if(o){n=(s+1|0)/2|0;u=(t+1|0)/2|0;w=Cf(n|0,((n|0)<0)<<31>>31|0,u|0,((u|0)<0)<<31>>31|0)|0;u=v()|0;x=(b|0)==12;y=Cf(s|0,p|0,t|0,i|0)|0;i=v()|0;z=n;A=x?s:0;B=w;C=u;D=x?y:0;E=x?i:0}else{z=0;A=0;B=0;C=0;D=0;E=0}i=Jf(B|0,C|0,1)|0;x=v()|0;y=Df(D|0,E|0,m|0,l|0)|0;l=Df(y|0,v()|0,i|0,x|0)|0;x=wa(l,v()|0,1)|0;if(!x){j=1;Y=g;return j|0}c[q>>2]=x;c[f+16>>2]=x;if(!o){c[f+20>>2]=h;c[f+24>>2]=m;break}c[f+32>>2]=h;c[f+48>>2]=m;h=x+m|0;c[f+20>>2]=h;c[f+36>>2]=z;c[f+52>>2]=B;c[f+24>>2]=h+B;c[f+40>>2]=z;c[f+56>>2]=B;if((b|0)==12)c[f+28>>2]=h+i;c[f+60>>2]=D;c[f+44>>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)<<31>>31|0,s|0,t|0)|0;w=((h|0)<0)<<31>>31;x=Df(u|0,v()|0,h|0,w|0)|0;u=v()|0;y=Cf(l|0,((l|0)<0)<<31>>31|0,s|0,t|0)|0;t=Df(y|0,v()|0,h|0,w|0)|0;w=v()|0;y=(c[a+24>>2]|0)!=0&((c[a+20>>2]|0)!=0&((c[a+16>>2]|0)!=0&((l|0)>=(h|0)&((k|0)>=(h|0)&((j|0)>=(e|0)&((o>>>0<0|((o|0)==0?q>>>0<=(c[a+48>>2]|0)>>>0:0))&(u>>>0<0|((u|0)==0?x>>>0<=(c[a+52>>2]|0)>>>0:0))&(w>>>0<0|((w|0)==0?t>>>0<=(c[a+56>>2]|0)>>>0:0))))))));if((b|0)==12){t=Cf(m|0,((m|0)<0)<<31>>31|0,i|0,n|0)|0;n=Df(t|0,v()|0,e|0,p|0)|0;p=v()|0;if((c[a+28>>2]|0)!=0&((m|0)>=(e|0)&y&(p>>>0<0|((p|0)==0?n>>>0<=(c[a+60>>2]|0)>>>0:0))))break;else g=2;return g|0}else{if(y)break;else g=2;return g|0}}else{y=c[a+20>>2]|0;n=(y|0)>-1?y:0-y|0;y=f+-1|0;p=Cf(n|0,((n|0)<0)<<31>>31|0,y|0,((y|0)<0)<<31>>31|0)|0;y=v()|0;m=r(e,d[8683+b>>0]|0)|0;t=Df(p|0,y|0,m|0,((m|0)<0)<<31>>31|0)|0;y=v()|0;if(!((c[a+16>>2]|0)!=0&((n|0)>=(m|0)&(y>>>0<0|((y|0)==0?t>>>0<=(c[a+24>>2]|0)>>>0:0))))){g=2;return g|0}}while(0);g=0;return g|0}function Wc(a,b){a=a|0;b=b|0;var d=0;if((a|0)==0|(b&-256|0)!=512){d=0;return d|0}b=a;a=b+84|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(a|0));d=1;return d|0}function Xc(a){a=a|0;var b=0;if(!a)return;b=a+80|0;if((c[a+12>>2]|0)<1)pa(c[b>>2]|0);c[b>>2]=0;return}function Yc(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=a+4|0;c[b+4>>2]=c[e>>2];f=a+8|0;c[b+8>>2]=c[f>>2];if(Vc(b)|0){g=2;return g|0}h=c[a>>2]|0;i=c[a+16>>2]|0;if(h>>>0<=10){j=r(c[e>>2]|0,d[8683+h>>0]|0)|0;Zc(i,c[a+20>>2]|0,c[b+16>>2]|0,c[b+20>>2]|0,j,c[f>>2]|0);g=0;return g|0}Zc(i,c[a+32>>2]|0,c[b+16>>2]|0,c[b+32>>2]|0,c[e>>2]|0,c[f>>2]|0);Zc(c[a+20>>2]|0,c[a+36>>2]|0,c[b+20>>2]|0,c[b+36>>2]|0,((c[e>>2]|0)+1|0)/2|0,((c[f>>2]|0)+1|0)/2|0);Zc(c[a+24>>2]|0,c[a+40>>2]|0,c[b+24>>2]|0,c[b+40>>2]|0,((c[e>>2]|0)+1|0)/2|0,((c[f>>2]|0)+1|0)/2|0);i=c[a>>2]|0;switch(i|0){case 1:case 3:case 4:case 5:case 12:break;default:if((i+-7|0)>>>0>3){g=0;return g|0}}Zc(c[a+28>>2]|0,c[a+44>>2]|0,c[b+28>>2]|0,c[b+44>>2]|0,c[e>>2]|0,c[f>>2]|0);g=0;return g|0}function Zc(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;if((f|0)<=0)return;g=f;f=a;a=c;while(1){Lf(a|0,f|0,e|0)|0;if((g|0)>1){g=g+-1|0;f=f+b|0;a=a+d|0}else break}return}function _c(a,b){a=a|0;b=b|0;var d=0;if((c[a+12>>2]|0)<=1){d=0;return d|0}if(!(b|0?((c[a>>2]|0)+-7|0)>>>0<4:0)){d=0;return d|0}d=(c[b+8>>2]|0)!=0&1;return d|0}function $c(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if(!a)return;e=c[a+44>>2]|0;do if((e|0)>=0){if((e|0)<=100){f=e*255|0;if((f|0)>99)g=(f|0)/100|0;else break}else g=255;f=c[b+800>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+804>>2]=f;i=f}else i=c[b+804>>2]|0;f=c[b+832>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+836>>2]=f;j=f}else j=c[b+836>>2]|0;f=c[b+864>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+868>>2]=f;k=f}else k=c[b+868>>2]|0;f=c[b+896>>2]|0;if((f|0)<12){h=r(g,d[8696+((f|0)>0?f:0)>>0]|0)|0;f=3?h>>3:h;c[b+900>>2]=f;l=f}else l=c[b+900>>2]|0;if(l|(k|(j|i))|0){ad(b+544|0,1.0);c[b+540>>2]=1}}while(0);i=c[a+52>>2]|0;a=b+2372|0;c[a>>2]=i;if((i|0)>100){c[a>>2]=100;return}if((i|0)>=0)return;c[a>>2]=0;return}function ad(a,b){a=a|0;b=+b;var d=0;Lf(a+8|0,3888,220)|0;c[a>>2]=0;c[a+4>>2]=31;if(!(b<0.0))if(b>1.0)d=256;else d=~~(b*256.0)>>>0;else d=0;c[a+228>>2]=d;return}function bd(a,b){a=a|0;b=b|0;var 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;d=a+160|0;if((c[a+2308>>2]|0)>0?(e=c[a+2300>>2]|0,(e|0)>=(c[a+300>>2]|0)):0)f=(e|0)<=(c[a+308>>2]|0);else f=0;e=f&1;g=a+148|0;if(!(c[g>>2]|0)){c[a+164>>2]=c[a+2300>>2];c[a+168>>2]=e;cd(a,d);h=dd(a,b)|0;return h|0}i=a+124|0;j=(ed()|0)+8|0;if(!((aa[c[j>>2]&7](i)|0)&1)){h=0;return h|0}h=a+180|0;j=b;b=h+108|0;do{c[h>>2]=c[j>>2];h=h+4|0;j=j+4|0}while((h|0)<(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,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;g=c[f+4>>2]|0;h=c[f>>2]|0;i=c[b+2264>>2]|0;j=i+40|0;k=i+584|0;a[i+39>>0]=-127;a[i+71>>0]=-127;a[i+103>>0]=-127;a[i+135>>0]=-127;a[i+167>>0]=-127;a[i+199>>0]=-127;a[i+231>>0]=-127;a[i+263>>0]=-127;a[i+295>>0]=-127;a[i+327>>0]=-127;a[i+359>>0]=-127;a[i+391>>0]=-127;a[i+423>>0]=-127;a[i+455>>0]=-127;a[i+487>>0]=-127;a[i+519>>0]=-127;l=i+600|0;a[i+583>>0]=-127;a[i+599>>0]=-127;a[i+615>>0]=-127;a[i+631>>0]=-127;a[i+647>>0]=-127;a[i+663>>0]=-127;a[i+679>>0]=-127;a[i+695>>0]=-127;a[i+711>>0]=-127;a[i+727>>0]=-127;a[i+743>>0]=-127;a[i+759>>0]=-127;a[i+775>>0]=-127;a[i+791>>0]=-127;a[i+807>>0]=-127;a[i+823>>0]=-127;m=(g|0)>0;if(m){a[i+567>>0]=-127;a[i+551>>0]=-127;a[i+7>>0]=-127}else{n=i+7|0;o=n+21|0;do{a[n>>0]=127;n=n+1|0}while((n|0)<(o|0));n=i+551|0;o=n+9|0;do{a[n>>0]=127;n=n+1|0}while((n|0)<(o|0));n=i+567|0;o=n+9|0;do{a[n>>0]=127;n=n+1|0}while((n|0)<(o|0))}p=b+288|0;if((c[p>>2]|0)<=0)return;q=f+16|0;f=b+2252|0;s=i+8|0;t=i+552|0;u=i+568|0;v=i+24|0;w=(g|0)==0;x=i+408|0;y=i+280|0;z=i+152|0;A=w?6:5;B=w?4:0;w=b+292|0;C=i+520|0;D=i+808|0;E=i+824|0;F=h<<4;G=b+2280|0;H=h<<3;h=b+2284|0;I=b+2268|0;J=b+2272|0;K=b+2276|0;b=i+4|0;L=i+20|0;M=i+36|0;N=i+52|0;O=i+68|0;P=i+84|0;Q=i+100|0;R=i+116|0;S=i+132|0;T=i+148|0;U=i+164|0;V=i+180|0;W=i+196|0;X=i+212|0;Y=i+228|0;Z=i+244|0;_=i+260|0;$=i+276|0;aa=i+292|0;ba=i+308|0;ca=i+324|0;da=i+340|0;fa=i+356|0;ga=i+372|0;ha=i+388|0;ia=i+404|0;ja=i+420|0;ka=i+436|0;la=i+452|0;ma=i+468|0;na=i+484|0;oa=i+500|0;pa=i+516|0;qa=i+532|0;ra=i+548|0;sa=i+556|0;ta=i+564|0;ua=i+572|0;va=i+580|0;wa=i+588|0;xa=i+596|0;ya=i+604|0;za=i+612|0;Aa=i+620|0;Ba=i+628|0;Ca=i+636|0;Da=i+644|0;Ea=i+652|0;Fa=i+660|0;Ga=i+668|0;Ha=i+676|0;Ia=i+684|0;Ja=i+692|0;Ka=i+700|0;La=i+708|0;Ma=i+716|0;Na=i+724|0;Oa=i+732|0;Pa=i+740|0;Qa=i+748|0;Ra=i+756|0;Sa=i+764|0;Ta=i+772|0;Ua=i+780|0;Va=i+788|0;Wa=i+796|0;Xa=i+804|0;Ya=i+812|0;Za=i+820|0;_a=i+828|0;$a=i+72|0;ab=i+104|0;bb=i+136|0;cb=i+168|0;db=i+200|0;eb=i+232|0;fb=i+264|0;gb=i+296|0;hb=i+328|0;ib=i+360|0;jb=i+392|0;kb=i+424|0;lb=i+456|0;mb=i+488|0;nb=i+520|0;ob=i+616|0;pb=i+632|0;qb=i+648|0;rb=i+664|0;sb=i+680|0;tb=i+696|0;ub=i+712|0;vb=i+728|0;wb=i+744|0;xb=i+760|0;yb=i+776|0;zb=i+792|0;Ab=i+808|0;Bb=i+824|0;i=0;do{Cb=c[q>>2]|0;Db=(i|0)==0;if(!Db){Eb=d[L>>0]|d[L+1>>0]<<8|d[L+2>>0]<<16|d[L+3>>0]<<24;a[b>>0]=Eb;a[b+1>>0]=Eb>>8;a[b+2>>0]=Eb>>16;a[b+3>>0]=Eb>>24;Eb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(e[4112+(Kb<<1)>>1]|0)|0;switch((30?Ib>>>30:Ib)&3){case 3:{vd(Lb,Nb,0);break}case 2:{xd(Lb,Nb);break}case 1:{wd(Lb,Nb);break}default:{}}Kb=Kb+1|0;if((Kb|0)==16){Mb=Jb;break a}else Ib=Ib<<2}}}else{do if(m)if((i|0)<((c[p>>2]|0)+-1|0)){Ib=Fb+32|0;Jb=d[Ib>>0]|d[Ib+1>>0]<<8|d[Ib+2>>0]<<16|d[Ib+3>>0]<<24;a[v>>0]=Jb;a[v+1>>0]=Jb>>8;a[v+2>>0]=Jb>>16;a[v+3>>0]=Jb>>24;Ob=Jb;break}else{Jb=a[Eb+(i<<5)+15>>0]|0;Nf(v|0,Jb|0,4)|0;Ib=Jb&255;Jb=Ib<<8|Ib;Ob=Jb|Jb<<16;break}else Ob=c[v>>2]|0;while(0);c[x>>2]=Ob;c[y>>2]=Ob;c[z>>2]=Ob;Jb=Gb;Ib=0;while(1){Kb=j+(e[4112+(Ib<<1)>>1]|0)|0;ea[c[9376+((a[Cb+(i*800|0)+769+Ib>>0]&255)<<2)>>2]&31](Kb);Nb=Cb+(i*800|0)+(Ib<<4<<1)|0;switch((30?Jb>>>30:Jb)&3){case 3:{vd(Nb,Kb,0);break}case 2:{xd(Nb,Kb);break}case 1:{wd(Nb,Kb);break}default:{}}Ib=Ib+1|0;if((Ib|0)==16)break;else Jb=Jb<<2}Mb=Db?A:B}while(0);Db=c[Cb+(i*800|0)+792>>2]|0;Gb=a[Cb+(i*800|0)+785>>0]|0;Jb=9424+((Gb<<24>>24==0?Mb:Gb&255)<<2)|0;ea[c[Jb>>2]&31](k);ea[c[Jb>>2]&31](l);Jb=Cb+(i*800|0)+512|0;do if(Db&255|0)if(!(Db&170)){zd(Jb,k);break}else{yd(Jb,k);break}while(0);Jb=Cb+(i*800|0)+640|0;do if(Db&65280|0)if(!(Db&43520)){zd(Jb,l);break}else{yd(Jb,l);break}while(0);if((g|0)<((c[w>>2]|0)+-1|0)){n=Fb;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z;c[e+8>>2]=_-k;c[e+12>>2]=(c[e+80>>2]|0)-Z;c[e+16>>2]=F-_;ba=aa[c[U>>2]&7](e)|0}else ba=1}else ba=1;if(D|(i+1|0)!=(c[b+156>>2]|0)){X=ba;Y=f;return X|0}Lf((c[p>>2]|0)+t|0,u+(c[l>>2]<<4)|0,n|0)|0;Lf((c[v>>2]|0)+w|0,x+(c[o>>2]<<3)|0,q|0)|0;Lf((c[y>>2]|0)+w|0,z+(c[o>>2]<<3)|0,q|0)|0;X=ba;Y=f;return X|0}function ed(){return 8140}function fd(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;return}function gd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a+20|0;c[b>>2]=0;d=a+4|0;e=c[d>>2]|0;switch(e|0){case 0:{f=va(1,0,80)|0;c[a>>2]=f;if(!f){g=0;return g|0}do if(!(Se(f,0)|0)){h=f+28|0;if(Q(h|0,0)|0){Ve(f)|0;break}Te(f)|0;if(T(f+76|0,0,6,a|0)|0){Ue(f)|0;Ve(f)|0;P(h|0)|0;break}c[d>>2]=1;Ue(f)|0;g=1;return g|0}while(0);pa(f);c[a>>2]=0;g=0;return g|0}case 1:{g=e;return g|0}default:{e=c[a>>2]|0;if(!e){g=1;return g|0}Te(e)|0;if((c[d>>2]|0)>>>0>=2){a=e+28|0;do S(a|0,e|0)|0;while((c[d>>2]|0)!=1)}Ue(e)|0;g=(c[b>>2]|0)==0&1;return g|0}}return 0}function hd(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){Te(b)|0;d=a+4|0;if((c[d>>2]|0)>>>0>=2){e=b+28|0;do S(e|0,b|0)|0;while((c[d>>2]|0)!=1)}Ue(b)|0}return (c[a+20>>2]|0)==0|0}function id(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a>>2]|0;if(!b)return;Te(b)|0;d=a+4|0;switch(c[d>>2]|0){case 0:break;case 1:{e=b+28|0;f=6;break}default:{a=b+28|0;do S(a|0,b|0)|0;while((c[d>>2]|0)!=1);e=a;f=6}}if((f|0)==6){c[d>>2]=2;R(e|0)|0}Ue(b)|0;return}function jd(a){a=a|0;var b=0,d=0;b=c[a+8>>2]|0;if(!b)return;d=(ba[b&31](c[a+12>>2]|0,c[a+16>>2]|0)|0)==0&1;b=a+20|0;c[b>>2]=c[b>>2]|d;return}function kd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=c[a>>2]|0;if(!b)return;Te(b)|0;d=a+4|0;switch(c[d>>2]|0){case 0:break;case 1:{e=b+28|0;f=6;break}default:{g=b+28|0;do S(g|0,b|0)|0;while((c[d>>2]|0)!=1);e=g;f=6}}if((f|0)==6){c[d>>2]=0;R(e|0)|0}Ue(b)|0;U(c[b+76>>2]|0,0)|0;Ve(b)|0;P(b+28|0)|0;pa(b);c[a>>2]=0;return}function ld(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a>>2]|0;d=a+4|0;e=b+28|0;a:while(1){Te(b)|0;b:while(1){switch(c[d>>2]|0){case 0:{break a;break}case 2:{f=5;break b;break}case 1:break;default:{f=7;break b}}S(e|0,b|0)|0}if((f|0)==5){f=0;ea[c[8156>>2]&31](a);c[d>>2]=1;R(e|0)|0;Ue(b)|0}else if((f|0)==7){f=0;R(e|0)|0;Ue(b)|0}}R(e|0)|0;Ue(b)|0;return 0}function md(a,b,d){a=a|0;b=b|0;d=d|0;if(c[a>>2]|0)return 0;c[a>>2]=b;c[a+8>>2]=d;c[a+4>>2]=0;return 0}function nd(b,e){b=b|0;e=e|0;var 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;f=c[e+48>>2]|0;if(f|0?(aa[f&7](e)|0)==0:0){md(b,6,8740)|0;g=c[b>>2]|0;return g|0}f=b+2308|0;if(!(c[e+68>>2]|0)){h=c[f>>2]|0;i=d[8708+h>>0]|0;if((h|0)==2){c[b+296>>2]=0;j=i;k=2;l=b+300|0;m=11}else{n=h;o=i;m=8}}else{c[f>>2]=0;n=0;o=0;m=8}if((m|0)==8){f=(c[e+76>>2]|0)-o|0;i=b+296|0;c[i>>2]=4?f>>4:f;h=(c[e+84>>2]|0)-o|0;p=b+300|0;c[p>>2]=4?h>>4:h;if((f|0)<0)c[i>>2]=0;if((h|0)<0){j=o;k=n;l=p;m=11}else{q=o;r=n}}if((m|0)==11){c[l>>2]=0;q=j;r=k}k=q+15|0;q=k+(c[e+88>>2]|0)|0;j=4?q>>4:q;q=b+308|0;c[q>>2]=j;l=k+(c[e+80>>2]|0)|0;e=4?l>>4:l;l=c[b+288>>2]|0;c[b+304>>2]=(e|0)>(l|0)?l:e;e=c[b+292>>2]|0;if((j|0)>(e|0))c[q>>2]=e;if((r|0)<=0){g=0;return g|0}r=b+60|0;e=b+68|0;q=b+72|0;j=b+64|0;l=b+88|0;k=b+112|0;m=(c[b+104>>2]|0)==0;n=0;do{if(!m){o=a[b+120+n>>0]|0;if(!(c[k>>2]|0))s=(c[r>>2]|0)+o|0;else s=o}else s=c[r>>2]|0;if(c[e>>2]|0){o=(c[q>>2]|0)+s|0;p=(o|0)<63?o:63;h=(p|0)>0?p:0;if((o|0)>0){p=c[j>>2]|0;i=(p|0)>4?2:1;f=i?h>>>i:h;i=9-p|0;t=(p|0)>0?((f|0)>(i|0)?i:f):h;f=(t|0)>1?t:1;a[b+2312+(n<<3)+1>>0]=f;a[b+2312+(n<<3)+3>>0]=(h|0)>39?2:(h|0)>14&1;u=f+(h<<1)&255}else u=0;a[b+2312+(n<<3)>>0]=u;a[b+2312+(n<<3)+2>>0]=0;h=(c[l>>2]|0)+o|0;o=(h|0)<63?h:63;f=(o|0)>0?o:0;if((h|0)>0){h=c[j>>2]|0;o=(h|0)>4?2:1;t=o?f>>>o:f;o=9-h|0;i=(h|0)>0?((t|0)>(o|0)?o:t):f;t=(i|0)>1?i:1;a[b+2312+(n<<3)+5>>0]=t;a[b+2312+(n<<3)+7>>0]=(f|0)>39?2:(f|0)>14&1;v=t+(f<<1)&255}else v=0}else{f=(s|0)<63?s:63;t=(f|0)>0?f:0;if((s|0)>0){f=c[j>>2]|0;i=(f|0)>4?2:1;o=i?t>>>i:t;i=9-f|0;h=(f|0)>0?((o|0)>(i|0)?i:o):t;o=(h|0)>1?h:1;h=o&255;a[b+2312+(n<<3)+1>>0]=h;i=(t|0)>39?2:(t|0)>14&1;a[b+2312+(n<<3)+3>>0]=i;a[b+2312+(n<<3)+5>>0]=h;a[b+2312+(n<<3)+7>>0]=i;w=o+(t<<1)&255}else w=0;a[b+2312+(n<<3)>>0]=w;a[b+2312+(n<<3)+2>>0]=0;v=w}a[b+2312+(n<<3)+4>>0]=v;a[b+2312+(n<<3)+6>>0]=1;n=n+1|0}while((n|0)!=4);g=0;return g|0}function od(a,b){a=a|0;b=b|0;var d=0,e=0;if((c[a+148>>2]|0)>0){d=(ed()|0)+8|0;e=aa[c[d>>2]&7](a+124|0)|0}else e=1;a=c[b+52>>2]|0;if(!a)return e|0;ea[a&31](b);return e|0}function pd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if(!a)return 0;else return ((c[a+40>>2]|0)==0?0:(d|0)>511?2:0)|0;return 0}function qd(a,b){a=a|0;b=b|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=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;f=a+152|0;c[f>>2]=0;g=a+148|0;do if((c[g>>2]|0)>0){h=(ed()|0)+4|0;if(aa[c[h>>2]&7](a+124|0)|0){c[a+136>>2]=a;c[a+140>>2]=a+180;c[a+132>>2]=20;h=(c[a+2308>>2]|0)>0?3:2;c[a+156>>2]=h;i=h;break}if(!(md(a,1,8759)|0)){j=0;return j|0}else{i=c[a+156>>2]|0;break}}else{c[a+156>>2]=1;i=1}while(0);h=c[a+288>>2]|0;k=h<<2;l=h<<5;m=(h<<1)+2|0;n=a+2308|0;o=c[n>>2]|0;p=c[g>>2]|0;q=r((p|0)>0?2:1,k)|0;s=(o|0)>0?q:0;q=r(h*800|0,(p|0)==2?2:1)|0;t=i<<4;u=r(((t+(d[8708+o>>0]|0)|0)*3|0)/2|0,l)|0;if(!(c[a+2348>>2]|0)){w=0;x=0}else{o=Cf(e[a+50>>1]|0|0,0,e[a+48>>1]|0|0,0)|0;w=o;x=v()|0}o=Df(l|0,0,863,0)|0;y=Df(o|0,v()|0,k|0,0)|0;o=Df(y|0,v()|0,m|0,0)|0;y=Df(o|0,v()|0,q|0,0)|0;o=Df(y|0,v()|0,s|0,0)|0;y=Df(o|0,v()|0,u|0,0)|0;o=Df(y|0,v()|0,w|0,x|0)|0;y=v()|0;if(!((o|0)==(o|0)&(y|0)==0)){j=0;return j|0}z=a+2292|0;A=a+2288|0;B=c[A>>2]|0;do if(y>>>0>0|((y|0)==0?o>>>0>(c[z>>2]|0)>>>0:0)){pa(B);c[z>>2]=0;C=wa(o,y,1)|0;c[A>>2]=C;if(C|0){c[z>>2]=o;D=c[g>>2]|0;E=C;F=13;break}if(!(md(a,1,8789)|0)){j=0;return j|0}else{G=a+2276|0;H=a+2280|0;I=a+2284|0;J=a+2268|0;K=a+2272|0;break}}else{D=p;E=B;F=13}while(0);if((F|0)==13){F=a+2244|0;c[F>>2]=E;B=E+k|0;c[a+2252>>2]=B;E=B+l|0;l=E+2|0;c[a+2256>>2]=l;B=E+m|0;E=(s|0)==0?0:B;c[a+2260>>2]=E;c[a+160>>2]=0;c[a+172>>2]=(D|0)>0?E+(h<<2)|0:E;E=B+s+31&-32;c[a+2264>>2]=E;s=E+832|0;c[a+2304>>2]=s;E=a+176|0;c[E>>2]=s;if((D|0)==2)c[E>>2]=s+(h*800|0);E=s+q|0;q=h<<4;s=a+2280|0;c[s>>2]=q;D=h<<3;h=a+2284|0;c[h>>2]=D;B=d[8708+(c[n>>2]|0)>>0]|0;n=r(q,B)|0;p=r(1?B>>>1:B,D)|0;B=E+n|0;n=a+2268|0;c[n>>2]=B;g=B+(r(q,t)|0)+p|0;t=a+2272|0;c[t>>2]=g;q=g+(r(i<<3,D)|0)+p|0;p=a+2276|0;c[p>>2]=q;c[f>>2]=0;c[a+2364>>2]=(w|0)==0&(x|0)==0?0:E+u|0;Nf(l+-2|0,0,m|0)|0;rd(a);Nf(c[F>>2]|0,0,k|0)|0;G=p;H=s;I=h;J=n;K=t}c[b+8>>2]=0;c[b+20>>2]=c[J>>2];c[b+24>>2]=c[K>>2];c[b+28>>2]=c[G>>2];c[b+32>>2]=c[H>>2];c[b+36>>2]=c[I>>2];c[b+104>>2]=0;sd();j=1;return j|0}function rd(b){b=b|0;var d=0;d=c[b+2256>>2]|0;a[d+-2>>0]=0;a[d+-1>>0]=0;c[b+2248>>2]=0;c[b+2296>>2]=0;return}function sd(){var a=0;if(Te(10140)|0)return;if(!(c[2041]|0))a=0;else{c[2344]=6;c[2345]=7;c[2346]=8;c[2348]=9;c[2350]=10;c[2347]=11;c[2349]=12;c[2351]=13;c[2352]=14;c[2353]=15;c[2336]=16;c[2337]=17;c[2338]=18;c[2339]=19;c[2340]=20;c[2341]=21;c[2342]=22;c[2356]=23;c[2357]=24;c[2358]=25;c[2359]=26;c[2360]=27;c[2361]=28;c[2362]=29;a=c[2485]|0}c[2041]=a;Ue(10140)|0;return}function td(){return}function ud(a,d){a=a|0;d=d|0;var 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;e=Y;Y=Y+64|0;f=e;g=b[a>>1]|0;h=b[a+24>>1]|0;i=h+g|0;j=b[a+8>>1]|0;k=b[a+16>>1]|0;l=k+j|0;m=j-k|0;k=g-h|0;h=l+i|0;c[f>>2]=h;g=f+32|0;c[g>>2]=i-l;l=f+16|0;c[l>>2]=m+k;i=f+48|0;c[i>>2]=k-m;m=b[a+2>>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>>2]|0;n=j+t|0;q=t-j|0;j=u-r|0;r=n+i|0;b[d+384>>1]=3?r>>>3:r;r=q+j|0;b[d+416>>1]=3?r>>>3:r;r=i-n|0;b[d+448>>1]=3?r>>>3:r;r=j-q|0;b[d+480>>1]=3?r>>>3:r;Y=e;return}function vd(a,b,c){a=a|0;b=b|0;c=c|0;le(a,b);if(!c)return;le(a+32|0,b+4|0);return}function wd(c,e){c=c|0;e=e|0;var f=0,g=0;f=(b[c>>1]|0)+4|0;c=3?f>>3:f;f=c+(d[e>>0]|0)|0;a[e>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+1|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+2|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+3|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+32|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+33|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+34|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+35|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+64|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+65|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+66|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+67|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+96|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+97|0;g=c+(d[f>>0]|0)|0;a[f>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=e+98|0;f=c+(d[g>>0]|0)|0;a[g>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+99|0;e=c+(d[f>>0]|0)|0;a[f>>0]=e>>>0>255?(31?e>>>31:e)+255|0:e;return}function xd(c,e){c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=(b[c>>1]|0)+4|0;g=b[c+8>>1]|0;h=g*35468|0;i=16?h>>16:h;h=g*20091|0;j=(16?h>>16:h)+g|0;g=b[c+2>>1]|0;c=g*35468|0;h=16?c>>16:c;c=g*20091|0;k=(16?c>>16:c)+g|0;g=j+f|0;c=g+k|0;l=(3?c>>3:c)+(d[e>>0]|0)|0;a[e>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=e+1|0;c=g+h|0;m=(3?c>>3:c)+(d[l>>0]|0)|0;a[l>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=e+2|0;l=g-h|0;c=(3?l>>3:l)+(d[m>>0]|0)|0;a[m>>0]=c>>>0>255?(31?c>>>31:c)+255|0:c;c=e+3|0;m=g-k|0;g=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=i+f|0;c=e+32|0;m=k+g|0;l=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=e+33|0;c=g+h|0;m=(3?c>>3:c)+(d[l>>0]|0)|0;a[l>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=e+34|0;l=g-h|0;c=(3?l>>3:l)+(d[m>>0]|0)|0;a[m>>0]=c>>>0>255?(31?c>>>31:c)+255|0:c;c=e+35|0;m=g-k|0;g=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=f-i|0;i=e+64|0;c=k+g|0;m=(3?c>>3:c)+(d[i>>0]|0)|0;a[i>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=e+65|0;i=g+h|0;c=(3?i>>3:i)+(d[m>>0]|0)|0;a[m>>0]=c>>>0>255?(31?c>>>31:c)+255|0:c;c=e+66|0;m=g-h|0;i=(3?m>>3:m)+(d[c>>0]|0)|0;a[c>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=e+67|0;c=g-k|0;g=(3?c>>3:c)+(d[i>>0]|0)|0;a[i>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=f-j|0;j=e+96|0;f=g+k|0;i=(3?f>>3:f)+(d[j>>0]|0)|0;a[j>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=e+97|0;j=g+h|0;f=(3?j>>3:j)+(d[i>>0]|0)|0;a[i>>0]=f>>>0>255?(31?f>>>31:f)+255|0:f;f=e+98|0;i=g-h|0;h=(3?i>>3:i)+(d[f>>0]|0)|0;a[f>>0]=h>>>0>255?(31?h>>>31:h)+255|0:h;h=e+99|0;e=g-k|0;k=(3?e>>3:e)+(d[h>>0]|0)|0;a[h>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;return}function yd(a,b){a=a|0;b=b|0;vd(a,b,1);vd(a+64|0,b+128|0,1);return}function zd(a,c){a=a|0;c=c|0;var d=0;if(b[a>>1]|0)wd(a,c);d=a+32|0;if(b[d>>1]|0)wd(d,c+4|0);d=a+64|0;if(b[d>>1]|0)wd(d,c+128|0);d=a+96|0;if(!(b[d>>1]|0))return;wd(d,c+132|0);return}function Ad(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ke(a,b,1,16,c,d,e);return}function Bd(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;f=b<<2;g=a+f|0;je(g,b,1,16,c,d,e);a=g+f|0;je(a,b,1,16,c,d,e);je(a+f|0,b,1,16,c,d,e);return}function Cd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ke(a,1,b,16,c,d,e);return}function Dd(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ke(a,c,1,8,d,e,f);ke(b,c,1,8,d,e,f);return}function Ed(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;g=c<<2;je(a+g|0,c,1,8,d,e,f);je(b+g|0,c,1,8,d,e,f);return}function Fd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;g=f<<1|1;f=r(e,-2)|0;h=0-e|0;i=c[2027]|0;j=c[2024]|0;k=c[2025]|0;l=c[2026]|0;m=0;do{n=b+m|0;o=n+h|0;p=d[o>>0]|0;q=d[n>>0]|0;s=(d[n+f>>0]|0)-(d[n+e>>0]|0)|0;if(((d[i+(p-q)>>0]<<2)+(d[i+s>>0]|0)|0)<=(g|0)){t=((q-p|0)*3|0)+(a[j+s>>0]|0)|0;s=t+4|0;u=a[k+(3?s>>3:s)>>0]|0;s=t+3|0;a[o>>0]=a[l+((a[k+(3?s>>3:s)>>0]|0)+p)>>0]|0;a[n>>0]=a[l+(q-u)>>0]|0}m=m+1|0}while((m|0)!=16);return}function Gd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;g=f<<1|1;f=c[2027]|0;h=c[2024]|0;i=c[2025]|0;j=c[2026]|0;k=0;do{l=b+(r(k,e)|0)|0;m=l+-1|0;n=d[m>>0]|0;o=d[l>>0]|0;p=(d[l+-2>>0]|0)-(d[l+1>>0]|0)|0;if(((d[f+(n-o)>>0]<<2)+(d[f+p>>0]|0)|0)<=(g|0)){q=((o-n|0)*3|0)+(a[h+p>>0]|0)|0;p=q+4|0;s=a[i+(3?p>>3:p)>>0]|0;p=q+3|0;a[m>>0]=a[j+((a[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a[j+((a[i+(3?m>>3:m)>>0]|0)+o)>>0]|0;a[l>>0]=a[j+(t-p)>>0]|0}b=b+1|0}while((b|0)!=16);return}function Jd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;je(a+4|0,1,b,16,c,d,e);je(a+8|0,1,b,16,c,d,e);je(a+12|0,1,b,16,c,d,e);return}function Kd(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ke(a,1,c,8,d,e,f);ke(b,1,c,8,d,e,f);return}function Ld(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;je(a+4|0,1,c,8,d,e,f);je(b+4|0,1,c,8,d,e,f);return}function Md(a){a=a|0;var b=0,c=0;b=(d[a+-32>>0]|0)+4+(d[a+-1>>0]|0)+(d[a+-31>>0]|0)+(d[a+31>>0]|0)+(d[a+-30>>0]|0)+(d[a+63>>0]|0)+(d[a+-29>>0]|0)+(d[a+95>>0]|0)|0;c=(3?b>>>3:b)&255;Nf(a|0,c|0,4)|0;Nf(a+32|0,c|0,4)|0;Nf(a+64|0,c|0,4)|0;Nf(a+96|0,c|0,4)|0;return}function Nd(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=(c[2026]|0)+(0-(d[b+-33>>0]|0))|0;f=e+(d[b+-1>>0]|0)|0;g=d[b+-32>>0]|0;a[b>>0]=a[f+g>>0]|0;h=d[b+-31>>0]|0;a[b+1>>0]=a[f+h>>0]|0;i=d[b+-30>>0]|0;a[b+2>>0]=a[f+i>>0]|0;j=d[b+-29>>0]|0;a[b+3>>0]=a[f+j>>0]|0;f=e+(d[b+31>>0]|0)|0;a[b+32>>0]=a[f+g>>0]|0;a[b+33>>0]=a[f+h>>0]|0;a[b+34>>0]=a[f+i>>0]|0;a[b+35>>0]=a[f+j>>0]|0;f=e+(d[b+63>>0]|0)|0;a[b+64>>0]=a[f+g>>0]|0;a[b+65>>0]=a[f+h>>0]|0;a[b+66>>0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v+10>>0]=a[w+(d[p>>0]|0)>>0]|0;a[v+11>>0]=a[w+(d[q>>0]|0)>>0]|0;a[v+12>>0]=a[w+(d[r>>0]|0)>>0]|0;a[v+13>>0]=a[w+(d[s>>0]|0)>>0]|0;a[v+14>>0]=a[w+(d[t>>0]|0)>>0]|0;a[v+15>>0]=a[w+(d[u>>0]|0)>>0]|0;b=b+1|0;if((b|0)==16)break;else v=v+32|0}return}function Yd(b){b=b|0;var c=0,d=0,e=0,f=0;c=b+-32|0;d=b;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+32|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+64|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+96|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+128|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+160|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+192|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+224|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+256|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+288|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+320|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+352|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+384|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+416|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+448|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+480|0;e=c;f=d+16|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));return}function Zd(b){b=b|0;Nf(b|0,a[b+-1>>0]|0,16)|0;Nf(b+32|0,a[b+31>>0]|0,16)|0;Nf(b+64|0,a[b+63>>0]|0,16)|0;Nf(b+96|0,a[b+95>>0]|0,16)|0;Nf(b+128|0,a[b+127>>0]|0,16)|0;Nf(b+160|0,a[b+159>>0]|0,16)|0;Nf(b+192|0,a[b+191>>0]|0,16)|0;Nf(b+224|0,a[b+223>>0]|0,16)|0;Nf(b+256|0,a[b+255>>0]|0,16)|0;Nf(b+288|0,a[b+287>>0]|0,16)|0;Nf(b+320|0,a[b+319>>0]|0,16)|0;Nf(b+352|0,a[b+351>>0]|0,16)|0;Nf(b+384|0,a[b+383>>0]|0,16)|0;Nf(b+416|0,a[b+415>>0]|0,16)|0;Nf(b+448|0,a[b+447>>0]|0,16)|0;Nf(b+480|0,a[b+479>>0]|0,16)|0;return}function _d(a){a=a|0;var b=0,c=0;b=(d[a+-1>>0]|0)+8+(d[a+31>>0]|0)+(d[a+63>>0]|0)+(d[a+95>>0]|0)+(d[a+127>>0]|0)+(d[a+159>>0]|0)+(d[a+191>>0]|0)+(d[a+223>>0]|0)+(d[a+255>>0]|0)+(d[a+287>>0]|0)+(d[a+319>>0]|0)+(d[a+351>>0]|0)+(d[a+383>>0]|0)+(d[a+415>>0]|0)+(d[a+447>>0]|0)+(d[a+479>>0]|0)|0;c=(4?b>>>4:b)&255;Nf(a|0,c|0,16)|0;Nf(a+32|0,c|0,16)|0;Nf(a+64|0,c|0,16)|0;Nf(a+96|0,c|0,16)|0;Nf(a+128|0,c|0,16)|0;Nf(a+160|0,c|0,16)|0;Nf(a+192|0,c|0,16)|0;Nf(a+224|0,c|0,16)|0;Nf(a+256|0,c|0,16)|0;Nf(a+288|0,c|0,16)|0;Nf(a+320|0,c|0,16)|0;Nf(a+352|0,c|0,16)|0;Nf(a+384|0,c|0,16)|0;Nf(a+416|0,c|0,16)|0;Nf(a+448|0,c|0,16)|0;Nf(a+480|0,c|0,16)|0;return}function $d(a){a=a|0;var b=0,c=0;b=(d[a+-32>>0]|0)+8+(d[a+-31>>0]|0)+(d[a+-30>>0]|0)+(d[a+-29>>0]|0)+(d[a+-28>>0]|0)+(d[a+-27>>0]|0)+(d[a+-26>>0]|0)+(d[a+-25>>0]|0)+(d[a+-24>>0]|0)+(d[a+-23>>0]|0)+(d[a+-22>>0]|0)+(d[a+-21>>0]|0)+(d[a+-20>>0]|0)+(d[a+-19>>0]|0)+(d[a+-18>>0]|0)+(d[a+-17>>0]|0)|0;c=(4?b>>>4:b)&255;Nf(a|0,c|0,16)|0;Nf(a+32|0,c|0,16)|0;Nf(a+64|0,c|0,16)|0;Nf(a+96|0,c|0,16)|0;Nf(a+128|0,c|0,16)|0;Nf(a+160|0,c|0,16)|0;Nf(a+192|0,c|0,16)|0;Nf(a+224|0,c|0,16)|0;Nf(a+256|0,c|0,16)|0;Nf(a+288|0,c|0,16)|0;Nf(a+320|0,c|0,16)|0;Nf(a+352|0,c|0,16)|0;Nf(a+384|0,c|0,16)|0;Nf(a+416|0,c|0,16)|0;Nf(a+448|0,c|0,16)|0;Nf(a+480|0,c|0,16)|0;return}function ae(b){b=b|0;var c=0,d=0;c=b;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+32|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+64|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+96|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+128|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+160|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+192|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+224|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+256|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+288|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+320|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+352|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+384|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+416|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+448|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));c=b+480|0;d=c+16|0;do{a[c>>0]=128;c=c+1|0}while((c|0)<(d|0));return}function be(a){a=a|0;var b=0,c=0;b=(d[a+-32>>0]|0)+8+(d[a+-1>>0]|0)+(d[a+-31>>0]|0)+(d[a+31>>0]|0)+(d[a+-30>>0]|0)+(d[a+63>>0]|0)+(d[a+-29>>0]|0)+(d[a+95>>0]|0)+(d[a+-28>>0]|0)+(d[a+127>>0]|0)+(d[a+-27>>0]|0)+(d[a+159>>0]|0)+(d[a+-26>>0]|0)+(d[a+191>>0]|0)+(d[a+-25>>0]|0)+(d[a+223>>0]|0)|0;c=(4?b>>>4:b)&255;Nf(a|0,c|0,8)|0;Nf(a+32|0,c|0,8)|0;Nf(a+64|0,c|0,8)|0;Nf(a+96|0,c|0,8)|0;Nf(a+128|0,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25>>0]|0)|0;c=(3?b>>>3:b)&255;Nf(a|0,c|0,8)|0;Nf(a+32|0,c|0,8)|0;Nf(a+64|0,c|0,8)|0;Nf(a+96|0,c|0,8)|0;Nf(a+128|0,c|0,8)|0;Nf(a+160|0,c|0,8)|0;Nf(a+192|0,c|0,8)|0;Nf(a+224|0,c|0,8)|0;return}function he(b){b=b|0;var c=0,d=0;c=b;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+32|0;c=d;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=d+4|0;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=b+64|0;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+96|0;c=d;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=d+4|0;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=b+128|0;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+160|0;c=d;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=d+4|0;a[c>>0]=-2139062144;a[c+1>>0]=-2139062144>>8;a[c+2>>0]=-2139062144>>16;a[c+3>>0]=-2139062144>>24;c=b+192|0;d=c;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=c+4|0;a[d>>0]=-2139062144;a[d+1>>0]=-2139062144>>8;a[d+2>>0]=-2139062144>>16;a[d+3>>0]=-2139062144>>24;d=b+224|0;b=d;a[b>>0]=-2139062144;a[b+1>>0]=-2139062144>>8;a[b+2>>0]=-2139062144>>16;a[b+3>>0]=-2139062144>>24;b=d+4|0;a[b>>0]=-2139062144;a[b+1>>0]=-2139062144>>8;a[b+2>>0]=-2139062144>>16;a[b+3>>0]=-2139062144>>24;return}function ie(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((e|0)==1){f=c;g=0;h=b;i=a[c+6>>0]|0;while(1){j=(d[h>>0]|0)+-120|0;k=(4?j>>4:j)+(d[f>>0]|0)|0;a[f>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=(d[h+1>>0]|0)+-120|0;j=f+1|0;l=(4?k>>4:k)+(d[j>>0]|0)|0;a[j>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=(d[h+2>>0]|0)+-120|0;j=f+2|0;k=(4?l>>4:l)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=(d[h+3>>0]|0)+-120|0;j=f+3|0;l=(4?k>>4:k)+(d[j>>0]|0)|0;a[j>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=(d[h+4>>0]|0)+-120|0;j=f+4|0;k=(4?l>>4:l)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=(d[h+5>>0]|0)+-120|0;j=f+5|0;l=(4?k>>4:k)+(d[j>>0]|0)|0;a[j>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=(d[h+6>>0]|0)+-120|0;j=(4?l>>4:l)+(i&255)|0;a[f+6>>0]=j>>>0>255?(31?j>>>31:j)+255|0:j;j=(d[h+7>>0]|0)+-120|0;l=f+7|0;k=(4?j>>4:j)+(d[l>>0]|0)|0;i=(k>>>0>255?(31?k>>>31:k)+255|0:k)&255;a[l>>0]=i;g=g+1|0;if((g|0)==8)break;else{f=f+e|0;h=h+8|0}}return}else{h=c;c=0;f=b;while(1){b=(d[f>>0]|0)+-120|0;g=(4?b>>4:b)+(d[h>>0]|0)|0;a[h>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+1>>0]|0)+-120|0;b=h+1|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=(d[f+2>>0]|0)+-120|0;b=h+2|0;g=(4?i>>4:i)+(d[b>>0]|0)|0;a[b>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+3>>0]|0)+-120|0;b=h+3|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=(d[f+4>>0]|0)+-120|0;b=h+4|0;g=(4?i>>4:i)+(d[b>>0]|0)|0;a[b>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+5>>0]|0)+-120|0;b=h+5|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=(d[f+6>>0]|0)+-120|0;b=h+6|0;g=(4?i>>4:i)+(d[b>>0]|0)|0;a[b>>0]=g>>>0>255?(31?g>>>31:g)+255|0:g;g=(d[f+7>>0]|0)+-120|0;b=h+7|0;i=(4?g>>4:g)+(d[b>>0]|0)|0;a[b>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;c=c+1|0;if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>0]=a[u+(M+z)>>0]|0;a[A>>0]=a[u+(K+B)>>0]|0;a[v>>0]=a[u+(C-K)>>0]|0;a[D>>0]=a[u+(E-M)>>0]|0;a[F>>0]=a[u+(G-J)>>0]|0;break}}while(0);if((g|0)<=1)break;else v=v+f|0}return}function le(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=Y;Y=Y+64|0;h=g;i=b[e>>1]|0;j=b[e+16>>1]|0;k=j+i|0;l=i-j|0;j=b[e+8>>1]|0;i=j*35468|0;m=b[e+24>>1]|0;n=m*20091|0;o=(16?i>>16:i)-m-(16?n>>16:n)|0;n=j*20091|0;i=m*35468|0;m=(16?n>>16:n)+j+(16?i>>16:i)|0;c[h>>2]=m+k;i=h+4|0;c[i>>2]=o+l;c[h+8>>2]=l-o;c[h+12>>2]=k-m;m=b[e+2>>1]|0;k=b[e+18>>1]|0;o=k+m|0;l=m-k|0;k=b[e+10>>1]|0;m=k*35468|0;j=b[e+26>>1]|0;n=j*20091|0;p=(16?m>>16:m)-j-(16?n>>16:n)|0;n=k*20091|0;m=j*35468|0;j=(16?n>>16:n)+k+(16?m>>16:m)|0;m=j+o|0;c[h+16>>2]=m;c[h+20>>2]=p+l;c[h+24>>2]=l-p;c[h+28>>2]=o-j;j=b[e+4>>1]|0;o=b[e+20>>1]|0;p=o+j|0;l=j-o|0;o=b[e+12>>1]|0;j=o*35468|0;k=b[e+28>>1]|0;n=k*20091|0;q=(16?j>>16:j)-k-(16?n>>16:n)|0;n=o*20091|0;j=k*35468|0;k=(16?n>>16:n)+o+(16?j>>16:j)|0;j=k+p|0;c[h+32>>2]=j;c[h+36>>2]=q+l;c[h+40>>2]=l-q;c[h+44>>2]=p-k;k=b[e+6>>1]|0;p=b[e+22>>1]|0;q=p+k|0;l=k-p|0;p=b[e+14>>1]|0;k=p*35468|0;o=b[e+30>>1]|0;e=o*20091|0;n=(16?k>>16:k)-o-(16?e>>16:e)|0;e=p*20091|0;k=o*35468|0;o=(16?e>>16:e)+p+(16?k>>16:k)|0;k=o+q|0;c[h+48>>2]=k;p=n+l|0;c[h+52>>2]=p;c[h+56>>2]=l-n;c[h+60>>2]=q-o;o=(c[h>>2]|0)+4|0;q=o+j|0;n=o-j|0;j=m*35468|0;o=k*20091|0;l=(16?j>>16:j)-k-(16?o>>16:o)|0;o=m*20091|0;j=k*35468|0;k=(16?o>>16:o)+m+(16?j>>16:j)|0;j=k+q|0;m=(3?j>>3:j)+(d[f>>0]|0)|0;a[f>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=f+1|0;j=l+n|0;o=(3?j>>3:j)+(d[m>>0]|0)|0;a[m>>0]=o>>>0>255?(31?o>>>31:o)+255|0:o;o=f+2|0;m=n-l|0;l=(3?m>>3:m)+(d[o>>0]|0)|0;a[o>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=f+3|0;o=q-k|0;k=(3?o>>3:o)+(d[l>>0]|0)|0;a[l>>0]=k>>>0>255?(31?k>>>31:k)+255|0:k;k=f+32|0;l=(c[i>>2]|0)+4|0;i=c[h+36>>2]|0;o=l+i|0;q=l-i|0;i=c[h+20>>2]|0;l=i*35468|0;m=p*20091|0;n=(16?l>>16:l)-p-(16?m>>16:m)|0;m=i*20091|0;l=p*35468|0;p=(16?m>>16:m)+i+(16?l>>16:l)|0;l=p+o|0;i=(3?l>>3:l)+(d[k>>0]|0)|0;a[k>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;i=f+33|0;k=n+q|0;l=(3?k>>3:k)+(d[i>>0]|0)|0;a[i>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=f+34|0;i=q-n|0;n=(3?i>>3:i)+(d[l>>0]|0)|0;a[l>>0]=n>>>0>255?(31?n>>>31:n)+255|0:n;n=f+35|0;l=o-p|0;p=(3?l>>3:l)+(d[n>>0]|0)|0;a[n>>0]=p>>>0>255?(31?p>>>31:p)+255|0:p;p=f+64|0;n=(c[h+8>>2]|0)+4|0;l=c[h+40>>2]|0;o=n+l|0;i=n-l|0;l=c[h+24>>2]|0;n=l*35468|0;q=c[h+56>>2]|0;k=q*20091|0;m=(16?n>>16:n)-q-(16?k>>16:k)|0;k=l*20091|0;n=q*35468|0;q=(16?k>>16:k)+l+(16?n>>16:n)|0;n=q+o|0;l=(3?n>>3:n)+(d[p>>0]|0)|0;a[p>>0]=l>>>0>255?(31?l>>>31:l)+255|0:l;l=f+65|0;p=m+i|0;n=(3?p>>3:p)+(d[l>>0]|0)|0;a[l>>0]=n>>>0>255?(31?n>>>31:n)+255|0:n;n=f+66|0;l=i-m|0;m=(3?l>>3:l)+(d[n>>0]|0)|0;a[n>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=f+67|0;n=o-q|0;q=(3?n>>3:n)+(d[m>>0]|0)|0;a[m>>0]=q>>>0>255?(31?q>>>31:q)+255|0:q;q=f+96|0;m=(c[h+12>>2]|0)+4|0;n=c[h+44>>2]|0;o=m+n|0;l=m-n|0;n=c[h+28>>2]|0;m=n*35468|0;i=c[h+60>>2]|0;h=i*20091|0;p=(16?m>>16:m)-i-(16?h>>16:h)|0;h=n*20091|0;m=i*35468|0;i=(16?h>>16:h)+n+(16?m>>16:m)|0;m=i+o|0;n=(3?m>>3:m)+(d[q>>0]|0)|0;a[q>>0]=n>>>0>255?(31?n>>>31:n)+255|0:n;n=f+97|0;q=p+l|0;m=(3?q>>3:q)+(d[n>>0]|0)|0;a[n>>0]=m>>>0>255?(31?m>>>31:m)+255|0:m;m=f+98|0;n=l-p|0;p=(3?n>>3:n)+(d[m>>0]|0)|0;a[m>>0]=p>>>0>255?(31?p>>>31:p)+255|0:p;p=f+99|0;f=o-i|0;i=(3?f>>3:f)+(d[p>>0]|0)|0;a[p>>0]=i>>>0>255?(31?i>>>31:i)+255|0:i;Y=g;return}function me(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==0|(d|0)==0|(e&-256|0)!=512){f=2;return f|0}e=d;g=e+40|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f=ne(a,b,d,d+4|0,d+8|0,d+12|0,d+16|0,0)|0;return f|0}function ne(a,b,e,f,g,h,i,j){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=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,Z=0,_=0,$=0,aa=0;k=Y;Y=Y+16|0;l=k+4|0;m=k;n=a;c[l>>2]=0;c[m>>2]=0;o=(j|0)!=0;if(o)p=c[j+8>>2]|0;else p=0;if((a|0)==0|b>>>0<12){q=7;Y=k;return q|0}if(!(af(a,8828,4)|0)){if(af(a+8|0,8833,4)|0){q=3;Y=k;return q|0}s=(d[a+5>>0]|0)<<8|(d[a+4>>0]|0)|((d[a+7>>0]|0)<<8|(d[a+6>>0]|0))<<16;if((s+-12|0)>>>0>4294967274){q=3;Y=k;return q|0}t=b+-12|0;if(t>>>0<8|(p|0)!=0&s>>>0>(b+-8|0)>>>0){q=7;Y=k;return q|0}else{u=t;v=a+12|0;w=s;x=1}}else{u=b;v=n;w=0;x=0}s=v;if(!(af(s,8838,4)|0)){if(((d[s+5>>0]|0)<<8|(d[s+4>>0]|0)|((d[s+7>>0]|0)<<8|(d[s+6>>0]|0))<<16|0)!=10){q=3;Y=k;return q|0}if(u>>>0<18){q=7;Y=k;return q|0}a=d[s+8>>0]|0;t=((d[s+13>>0]|0)<<8|(d[s+12>>0]|0)|(d[s+14>>0]|0)<<16)+1|0;y=((d[s+16>>0]|0)<<8|(d[s+15>>0]|0)|(d[s+17>>0]|0)<<16)+1|0;z=r(t,y)|0;A=(y|0)==0;if(A?0:((z>>>0)/((A?1:y)>>>0)|0|0)!=(t|0)){q=3;Y=k;return q|0}A=a&2;if(x){B=a;C=1;D=y;E=t;F=u+-18|0;G=1?A>>>1:A;H=s+18|0;I=(A|0)!=0;J=1}else{q=3;Y=k;return q|0}}else{B=0;C=0;D=0;E=0;F=u;G=0;H=v;I=0;J=0}v=(g|0)==0;if(!v)c[g>>2]=(4?B>>>4:B)&1;if(h|0)c[h>>2]=G;h=(i|0)==0;if(!h)c[i>>2]=0;c[l>>2]=E;c[m>>2]=D;B=(j|0)==0;a:do if(!(B&(J&I))){b:do if(F>>>0>=4){if(!(x&(C|0)!=0))if((C|w|0)==0?(u=H,(af(u,8843,4)|0)==0):0){K=u;L=25}else{M=F;N=H;O=0;P=0}else{K=H;L=25}c:do if((L|0)==25){if(F>>>0<8){Q=0;break b}if(!w){u=K;A=F;s=H;t=0;y=0;while(1){a=(d[u+5>>0]|0)<<8|(d[u+4>>0]|0)|((d[u+7>>0]|0)<<8|(d[u+6>>0]|0))<<16;if(a>>>0>4294967286){q=3;break}z=a+9&-2;if(!(af(u,8848,4)|0)){M=A;N=s;O=t;P=y;break c}if(!(af(u,8853,4)|0)){M=A;N=s;O=t;P=y;break c}if(A>>>0>>0){Q=y;break b}R=(af(u,8843,4)|0)==0;S=R?u+8|0:y;T=u+z|0;U=A-z|0;if(U>>>0<8){Q=S;break b}else{u=T;A=U;s=T;t=R?a:t;y=S}}Y=k;return q|0}y=K;t=22;s=F;A=H;u=0;S=0;while(1){a=(d[y+5>>0]|0)<<8|(d[y+4>>0]|0)|((d[y+7>>0]|0)<<8|(d[y+6>>0]|0))<<16;if(a>>>0>4294967286){q=3;L=65;break}R=a+9&-2;T=R+t|0;if(T>>>0>w>>>0){q=3;L=65;break}if(!(af(y,8848,4)|0)){M=s;N=A;O=u;P=S;break c}if(!(af(y,8853,4)|0)){M=s;N=A;O=u;P=S;break c}if(s>>>0>>0){Q=S;break b}U=(af(y,8843,4)|0)==0;z=U?y+8|0:S;V=y+R|0;W=s-R|0;if(W>>>0<8){Q=z;break b}else{y=V;t=T;s=W;A=V;u=U?a:u;S=z}}if((L|0)==65){Y=k;return q|0}}while(0);S=N;u=(af(S,8853,4)|0)==0;A=u&1;if(M>>>0<8)Q=P;else{if(u|(af(S,8848,4)|0)==0){u=(d[S+5>>0]|0)<<8|(d[S+4>>0]|0)|((d[S+7>>0]|0)<<8|(d[S+6>>0]|0))<<16;if(w>>>0>11&u>>>0>(w+-12|0)>>>0){q=3;Y=k;return q|0}s=M+-8|0;if((p|0)!=0&u>>>0>s>>>0){Q=P;break}X=s;Z=S+8|0;_=u;$=A}else{X=M;Z=N;_=M;$=oe(S,M)|0}if(_>>>0>4294967286){q=3;Y=k;return q|0}if(!(h|(G|0)!=0))c[i>>2]=($|0)==0?1:2;if(!$){if(X>>>0<10){Q=P;break}if(!(pe(Z,X,_,l,m)|0)){q=3;Y=k;return q|0}}else{if(X>>>0<5){Q=P;break}if(!(qe(Z,X,l,m,g)|0)){q=3;Y=k;return q|0}}if(C|0?!((E|0)==(c[l>>2]|0)?(D|0)==(c[m>>2]|0):0):0){q=3;Y=k;return q|0}if(!o){aa=P;break a}c[j>>2]=n;c[j+4>>2]=b;S=j+8|0;c[S>>2]=0;c[S+4>>2]=0;c[j+16>>2]=P;c[j+20>>2]=O;c[j+24>>2]=_;c[j+28>>2]=w;c[j+32>>2]=$;c[j+12>>2]=Z-n;aa=P;break a}}else Q=0;while(0);if(B&(C|0)!=0)aa=Q;else{q=7;Y=k;return q|0}}else aa=0;while(0);if(!v)c[g>>2]=c[g>>2]|(aa|0)!=0;if(e|0)c[e>>2]=c[l>>2];if(!f){q=0;Y=k;return q|0}c[f>>2]=c[m>>2];q=0;Y=k;return q|0}function oe(b,c){b=b|0;c=c|0;var e=0;if(c>>>0<=4){e=0;return e|0}if((a[b>>0]|0)!=47){e=0;return e|0}e=(d[b+4>>0]|0)<32&1;return e|0}function pe(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0;if((b|0)==0|e>>>0<10){i=0;return i|0}if((a[b+3>>0]|0)!=-99){i=0;return i|0}if((a[b+4>>0]|0)!=1){i=0;return i|0}if((a[b+5>>0]|0)!=42){i=0;return i|0}e=d[b>>0]|0;j=d[b+1>>0]<<8|e|d[b+2>>0]<<16;k=d[b+7>>0]<<8&16128|d[b+6>>0];l=d[b+9>>0]<<8&16128|d[b+8>>0];if(!((e&25|0)==16&(5?j>>>5:j)>>>0>>0)){i=0;return i|0}if((k|0)==0|(l|0)==0){i=0;return i|0}if(g|0)c[g>>2]=k;if(!h){i=1;return i|0}c[h>>2]=l;i=1;return i|0}function qe(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0;i=Y;Y=Y+32|0;j=i;if((b|0)==0|e>>>0<5){k=0;Y=i;return k|0}if((a[b>>0]|0)!=47){k=0;Y=i;return k|0}if((d[b+4>>0]|0)>31){k=0;Y=i;return k|0}$a(j,b,e);if(((Ga(j,8)|0)==47?(e=(Ga(j,14)|0)+1|0,b=(Ga(j,14)|0)+1|0,l=Ga(j,1)|0,(Ga(j,3)|0)==0):0)?(c[j+24>>2]|0)==0:0){if(f|0)c[f>>2]=e;if(g|0)c[g>>2]=b;if(!h)m=1;else{c[h>>2]=l;m=1}}else m=0;k=m;Y=i;return k|0}function re(a){a=a|0;var b=0;if(!a)return;b=(ed()|0)+20|0;ea[c[b>>2]&31](a+124|0);oa(a);b=a+2288|0;pa(c[b>>2]|0);c[b>>2]=0;c[a+2292>>2]=0;b=a+12|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;c[a+4>>2]=0;pa(a);return}function se(){var a=0,b=0;a=va(1,0,2376)|0;if(!a)return a|0;c[a>>2]=0;c[a+8>>2]=8858;b=ed()|0;ea[c[b>>2]&31](a+124|0);c[a+4>>2]=0;c[a+312>>2]=0;if(c[2549]|0)return a|0;c[2549]=1;return a|0}function te(){var a=0,b=0;a=va(1,0,272)|0;if(!a){b=0;return b|0}c[a>>2]=0;c[a+4>>2]=2;_a();b=a;return b|0}function ue(e,f){e=e|0;f=f|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;if(!e){g=0;return g|0}c[e>>2]=0;h=e+8|0;c[h>>2]=8858;if(!f){c[e>>2]=2;c[h>>2]=8861;c[e+4>>2]=0;g=0;return g|0}i=c[f+64>>2]|0;j=c[f+60>>2]|0;if(j>>>0<4){c[e>>2]=7;c[h>>2]=8898;c[e+4>>2]=0;g=0;return g|0}k=d[i>>0]|0;l=d[i+1>>0]<<8|k|d[i+2>>0]<<16;m=(k&1^1)&255;n=e+40|0;a[n>>0]=m;o=(1?k>>>1:k)&7;a[e+41>>0]=o;p=(4?k>>>4:k)&1;a[e+42>>0]=p;k=5?l>>>5:l;l=e+44|0;c[l>>2]=k;if((o&255)>3){c[e>>2]=3;c[h>>2]=8916;c[e+4>>2]=0;g=0;return g|0}if(!(p<<24>>24)){c[e>>2]=4;c[h>>2]=8947;c[e+4>>2]=0;g=0;return g|0}p=i+3|0;o=j+-3|0;do if(!(m<<24>>24)){q=p;r=o;s=k}else{if(o>>>0<7){c[e>>2]=7;c[h>>2]=8970;c[e+4>>2]=0;g=0;return g|0}if(((a[p>>0]|0)==-99?(a[i+4>>0]|0)==1:0)?(a[i+5>>0]|0)==42:0){t=i+7|0;u=d[t>>0]<<8&16128|d[i+6>>0];b[e+48>>1]=u;v=a[t>>0]|0;a[e+52>>0]=6?(v&255)>>>6:v&255;v=i+9|0;t=d[v>>0]<<8&16128|d[i+8>>0];b[e+50>>1]=t;w=a[v>>0]|0;a[e+53>>0]=6?(w&255)>>>6:w&255;w=u+15|0;c[e+288>>2]=4?w>>>4:w;w=t+15|0;c[e+292>>2]=4?w>>>4:w;c[f>>2]=u;c[f+4>>2]=t;c[f+72>>2]=0;c[f+84>>2]=0;c[f+76>>2]=0;c[f+80>>2]=u;c[f+88>>2]=t;c[f+92>>2]=0;c[f+96>>2]=u;c[f+100>>2]=t;c[f+12>>2]=u;c[f+16>>2]=t;De(e+904|0);c[e+104>>2]=0;c[e+108>>2]=0;c[e+112>>2]=1;c[e+116>>2]=0;c[e+120>>2]=0;q=i+10|0;r=j+-10|0;s=c[l>>2]|0;break}c[e>>2]=3;c[h>>2]=8998;c[e+4>>2]=0;g=0;return g|0}while(0);if(s>>>0>r>>>0){if(c[e>>2]|0){g=0;return g|0}c[e>>2]=7;c[h>>2]=9012;c[e+4>>2]=0;g=0;return g|0}j=e+12|0;Ee(j,q,s);s=c[l>>2]|0;l=q+s|0;i=r-s|0;if(a[n>>0]|0){s=(Fe(j,1)|0)&255;a[e+54>>0]=s;s=(Fe(j,1)|0)&255;a[e+55>>0]=s}s=Fe(j,1)|0;c[e+104>>2]=s;if(s){s=Fe(j,1)|0;f=e+108|0;c[f>>2]=s;if(Fe(j,1)|0){s=Fe(j,1)|0;c[e+112>>2]=s;if(!(Fe(j,1)|0))x=0;else x=(Ge(j,7)|0)&255;a[e+116>>0]=x;if(!(Fe(j,1)|0))y=0;else y=(Ge(j,7)|0)&255;a[e+117>>0]=y;if(!(Fe(j,1)|0))z=0;else z=(Ge(j,7)|0)&255;a[e+118>>0]=z;if(!(Fe(j,1)|0))A=0;else A=(Ge(j,7)|0)&255;a[e+119>>0]=A;if(!(Fe(j,1)|0))B=0;else B=(Ge(j,6)|0)&255;a[e+120>>0]=B;if(!(Fe(j,1)|0))C=0;else C=(Ge(j,6)|0)&255;a[e+121>>0]=C;if(!(Fe(j,1)|0))D=0;else D=(Ge(j,6)|0)&255;a[e+122>>0]=D;if(!(Fe(j,1)|0))E=0;else E=(Ge(j,6)|0)&255;a[e+123>>0]=E}if(c[f>>2]|0){if(!(Fe(j,1)|0))F=-1;else F=(Fe(j,8)|0)&255;a[e+904>>0]=F;if(!(Fe(j,1)|0))G=-1;else G=(Fe(j,8)|0)&255;a[e+905>>0]=G;if(!(Fe(j,1)|0))H=-1;else H=(Fe(j,8)|0)&255;a[e+906>>0]=H}}else c[e+108>>2]=0;H=e+36|0;if(c[H>>2]|0){if(c[e>>2]|0){g=0;return g|0}c[e>>2]=3;c[h>>2]=9033;c[e+4>>2]=0;g=0;return g|0}G=Fe(j,1)|0;F=e+56|0;c[F>>2]=G;G=Fe(j,6)|0;f=e+60|0;c[f>>2]=G;G=Fe(j,3)|0;c[e+64>>2]=G;G=Fe(j,1)|0;c[e+68>>2]=G;do if(G|0?Fe(j,1)|0:0){if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+72>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+76>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+80>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+84>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+88>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+92>>2]=E}if(Fe(j,1)|0){E=Ge(j,6)|0;c[e+96>>2]=E}if(!(Fe(j,1)|0))break;E=Ge(j,6)|0;c[e+100>>2]=E}while(0);if(!(c[f>>2]|0))I=0;else I=(c[F>>2]|0)==0?2:1;c[e+2308>>2]=I;if(c[H>>2]|0){if(c[e>>2]|0){g=0;return g|0}c[e>>2]=3;c[h>>2]=9061;c[e+4>>2]=0;g=0;return g|0}H=q+r|0;r=(1<<(Fe(j,2)|0))+-1|0;c[e+312>>2]=r;q=r*3|0;if(i>>>0>=q>>>0){I=l+q|0;F=i-q|0;if(!r){J=F;K=I}else{q=0;i=F;F=I;I=l;while(1){l=d[I+1>>0]<<8|d[I>>0]|d[I+2>>0]<<16;f=l>>>0>i>>>0?i:l;Ee(e+316+(q*28|0)|0,F,f);l=F+f|0;G=i-f|0;q=q+1|0;if((q|0)==(r|0)){J=G;K=l;break}else{i=G;F=l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d[G+3>>0]<<24;c[v>>2]=G+3;G=Kf(H|0)|0;c[b>>2]=c[b>>2]<<24|(8?G>>>8:G);G=F+24|0;c[t>>2]=G;I=G;break}else{Ce(b);I=c[t>>2]|0;break}}else I=F;while(0);F=r(E,D)|0;G=8?F>>>8:F;F=c[b>>2]|0;H=(I?F>>>I:F)>>>0>G>>>0;if(H){J=F-(G+1<>2]=J;K=E-G|0;L=J}else{K=G+1|0;L=F}F=(s(K|0)|0)^24;G=I-F|0;c[t>>2]=G;J=(K<>2]=J;if(H){H=d[x>>0]|0;do if((G|0)<0){F=c[v>>2]|0;if(F>>>0<(c[w>>2]|0)>>>0){M=d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24;c[v>>2]=F+3;F=Kf(M|0)|0;M=(8?F>>>8:F)|L<<24;c[b>>2]=M;F=G+24|0;c[t>>2]=F;N=M;O=F;break}else{Ce(b);N=c[b>>2]|0;O=c[t>>2]|0;break}}else{N=L;O=G}while(0);E=r(J,H)|0;D=8?E>>>8:E;E=(O?N>>>O:N)>>>0>D>>>0;if(E){c[b>>2]=N-(D+1<>2]=O-D;c[q>>2]=(P<>0]|0;do if((G|0)<0){D=c[v>>2]|0;if(D>>>0<(c[w>>2]|0)>>>0){F=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[v>>2]=D+3;D=Kf(F|0)|0;F=(8?D>>>8:D)|L<<24;c[b>>2]=F;D=G+24|0;c[t>>2]=D;R=F;S=D;break}else{Ce(b);R=c[b>>2]|0;S=c[t>>2]|0;break}}else{R=L;S=G}while(0);G=r(J,E)|0;H=8?G>>>8:G;G=(S?R>>>S:R)>>>0>H>>>0;if(G){c[b>>2]=R-(H+1<>2]=S-H;c[q>>2]=(T<>0]=C;if(!(c[o>>2]|0)){U=c[t>>2]|0;V=c[q>>2]|0}else{G=d[u>>0]|0;H=c[q>>2]|0;D=c[t>>2]|0;do if((D|0)<0){F=c[v>>2]|0;if(F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s(ba|0)|0)^24;H=aa-F|0;c[t>>2]=H;E=(ba<>2]=E;F=(H|0)<0;if(G){do if(F){G=c[v>>2]|0;if(G>>>0<(c[w>>2]|0)>>>0){J=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;c[v>>2]=G+3;G=Kf(J|0)|0;J=(8?G>>>8:G)|ca<<24;c[b>>2]=J;G=H+24|0;c[t>>2]=G;da=J;ea=G;break}else{Ce(b);da=c[b>>2]|0;ea=c[t>>2]|0;break}}else{da=ca;ea=H}while(0);D=(1?E>>>1:E)&16777215;G=(ea?da>>>ea:da)>>>0>D>>>0;if(G){c[b>>2]=da-(D+1<>2]=ea-D;c[q>>2]=(fa<>2]|0;if(G>>>0<(c[w>>2]|0)>>>0){D=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;c[v>>2]=G+3;G=Kf(D|0)|0;D=(8?G>>>8:G)|ca<<24;c[b>>2]=D;G=H+24|0;c[t>>2]=G;ha=D;ia=G;break}else{Ce(b);ha=c[b>>2]|0;ia=c[t>>2]|0;break}}else{ha=ca;ia=H}while(0);H=E*163|0;F=8?H>>>8:H;H=(ia?ha>>>ia:ha)>>>0>F>>>0;if(H){c[b>>2]=ha-(F+1<>2]=ia-F;c[q>>2]=(ja<>0]=H;Nf(A|0,H|0,4)|0;Nf(l|0,H|0,4)|0}else{H=B+(z*800|0)+769|0;F=0;while(1){G=e+2248+F|0;D=0;J=d[G>>0]|0;do{M=A+D|0;ka=d[M>>0]|0;la=d[4144+(ka*90|0)+(J*9|0)>>0]|0;ma=c[q>>2]|0;na=c[t>>2]|0;do if((na|0)<0){oa=c[v>>2]|0;if(oa>>>0<(c[w>>2]|0)>>>0){pa=d[oa>>0]|d[oa+1>>0]<<8|d[oa+2>>0]<<16|d[oa+3>>0]<<24;c[v>>2]=oa+3;oa=Kf(pa|0)|0;c[b>>2]=c[b>>2]<<24|(8?oa>>>8:oa);oa=na+24|0;c[t>>2]=oa;qa=oa;break}else{Ce(b);qa=c[t>>2]|0;break}}else qa=na;while(0);na=r(ma,la)|0;oa=8?na>>>8:na;na=c[b>>2]|0;pa=(qa?na>>>qa:na)>>>0>oa>>>0;ra=pa&1;if(pa){pa=na-(oa+1<>2]=pa;sa=ma-oa|0;ta=pa}else{sa=oa+1|0;ta=na}na=(s(sa|0)|0)^24;oa=qa-na|0;c[t>>2]=oa;pa=(sa<>2]=pa;na=a[5056+ra>>0]|0;if(!((ra?41706>>>ra:41706)&1))ua=na;else{ra=na;na=oa;oa=ta;va=pa;while(1){pa=ra<<1;wa=d[4144+(ka*90|0)+(J*9|0)+ra>>0]|0;do if((na|0)<0){xa=c[v>>2]|0;if(xa>>>0<(c[w>>2]|0)>>>0){ya=d[xa>>0]|d[xa+1>>0]<<8|d[xa+2>>0]<<16|d[xa+3>>0]<<24;c[v>>2]=xa+3;xa=Kf(ya|0)|0;ya=(8?xa>>>8:xa)|oa<<24;c[b>>2]=ya;xa=na+24|0;c[t>>2]=xa;za=ya;Aa=xa;break}else{Ce(b);za=c[b>>2]|0;Aa=c[t>>2]|0;break}}else{za=oa;Aa=na}while(0);xa=r(va,wa)|0;ya=8?xa>>>8:xa;xa=(Aa?za>>>Aa:za)>>>0>ya>>>0;if(xa){Ba=za-(ya+1<>2]=Ba;Ca=va-ya|0;Da=Ba}else{Ca=ya+1|0;Da=za}ya=(s(Ca|0)|0)^24;na=Aa-ya|0;c[t>>2]=na;va=(Ca<>2]=va;ya=pa|xa&1;Ea=a[5056+ya>>0]|0;if(!((ya?41706>>>ya:41706)&1))break;else{ra=Ea<<24>>24;oa=Da}}ua=Ea<<24>>24}J=0-ua|0;Fa=J&255;a[M>>0]=Fa;D=D+1|0}while((D|0)!=4);D=d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24;a[H>>0]=D;a[H+1>>0]=D>>8;a[H+2>>0]=D>>16;a[H+3>>0]=D>>24;a[G>>0]=Fa;F=F+1|0;if((F|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c[t>>2]|0;break}}else{Na=Ma;Oa=E}while(0);E=F*183|0;D=8?E>>>8:E;E=(Oa?Na>>>Oa:Na)>>>0>D>>>0;if(E){c[b>>2]=Na-(D+1<>2]=Oa-D;c[q>>2]=(Pa<>0]=Qa;z=z+1|0}while((z|0)<(c[f>>2]|0));g=e+36|0;h=c[g>>2]|0;i=(h|0)==0;j=i&1;return j|0}function we(e,f){e=e|0;f=f|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=Y;Y=Y+32|0;h=g;i=c[e+2256>>2]|0;j=e+2296|0;k=c[j>>2]|0;l=i+(k<<1)|0;m=c[e+2304>>2]|0;if((c[e+2236>>2]|0)!=0?(n=a[m+(k*800|0)+797>>0]|0,o=n&255,n<<24>>24!=0):0){a[l>>0]=0;a[i+-2>>0]=0;if(!(a[m+(k*800|0)+768>>0]|0)){a[i+(k<<1)+1>>0]=0;a[i+-1>>0]=0}c[m+(k*800|0)+788>>2]=0;c[m+(k*800|0)+792>>2]=0;a[m+(k*800|0)+796>>0]=0;p=o}else{o=m+(k*800|0)|0;n=d[m+(k*800|0)+798>>0]|0;Nf(o|0,0,768)|0;if(!(a[m+(k*800|0)+768>>0]|0)){c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;c[h+16>>2]=0;c[h+20>>2]=0;c[h+24>>2]=0;c[h+28>>2]=0;q=i+(k<<1)+1|0;r=i+-1|0;s=da[c[2549]&1](f,e+2032|0,(d[r>>0]|0)+(d[q>>0]|0)|0,e+776+(n<<5)+8|0,0,h)|0;t=(s|0)>0&1;a[r>>0]=t;a[q>>0]=t;if((s|0)>1)ud(h,o);else{s=(b[h>>1]|0)+3|0;h=(3?s>>3:s)&65535;b[m+(k*800|0)>>1]=h;b[m+(k*800|0)+32>>1]=h;b[m+(k*800|0)+64>>1]=h;b[m+(k*800|0)+96>>1]=h;b[m+(k*800|0)+128>>1]=h;b[m+(k*800|0)+160>>1]=h;b[m+(k*800|0)+192>>1]=h;b[m+(k*800|0)+224>>1]=h;b[m+(k*800|0)+256>>1]=h;b[m+(k*800|0)+288>>1]=h;b[m+(k*800|0)+320>>1]=h;b[m+(k*800|0)+352>>1]=h;b[m+(k*800|0)+384>>1]=h;b[m+(k*800|0)+416>>1]=h;b[m+(k*800|0)+448>>1]=h;b[m+(k*800|0)+480>>1]=h}u=1;v=0}else{u=0;v=3}h=e+1964+(v*68|0)|0;v=i+-2|0;i=e+776+(n<<5)|0;s=o;o=a[l>>0]&15;t=a[v>>0]&15;q=0;r=0;while(1){w=t&255;x=o&255;y=da[c[2549]&1](f,h,(w&1)+(x&1)|0,i,u,s)|0;z=(y|0)>(u|0)&1;A=1?x>>>1:x;x=z<<7|A;B=(b[s>>1]|0)!=0&1;C=s+32|0;D=da[c[2549]&1](f,h,(A&1)+z|0,i,u,C)|0;z=(D|0)>(u|0)&1;A=1?x>>>1:x;x=z<<7|A;E=((D|0)>3?3:(D|0)>1?2:(b[C>>1]|0)!=0&1)|((y|0)>3?12:(y|0)>1?8:B<<2);B=s+64|0;y=da[c[2549]&1](f,h,(A&1)+z|0,i,u,B)|0;z=(y|0)>(u|0)&1;A=1?x>>>1:x;x=((y|0)>3?3:(y|0)>1?2:(b[B>>1]|0)!=0&1)|E<<2;E=s+96|0;B=z<<7|A&224;y=da[c[2549]&1](f,h,(A&1)+z|0,i,u,E)|0;z=((y|0)>(u|0)&1)<<7;A=(z|(1?B>>>1:B))&255;o=4?(A&255)>>>4:A&255;F=z|(1?w>>>1:w);q=x<<2|q<<8|((y|0)>3?3:(y|0)>1?2:(b[E>>1]|0)!=0&1);r=r+1|0;if((r|0)==4)break;else{s=s+128|0;t=F&255}}t=m+(k*800|0)+512|0;s=e+2100|0;r=e+776+(n<<5)+16|0;u=d[l>>0]|0;i=d[v>>0]|0;h=da[c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c[m+(k*800|0)+792>>2]=s;if(!(s&43690))G=c[e+776+(n<<5)+28>>2]&255;else G=0;a[m+(k*800|0)+796>>0]=G;p=(s|q|0)==0&1}if((c[e+2308>>2]|0)<=0){H=f+24|0;I=c[H>>2]|0;J=(I|0)==0;K=J&1;Y=g;return K|0}q=c[e+2260>>2]|0;s=c[j>>2]|0;j=q+(s<<2)|0;G=e+2312+(d[m+(k*800|0)+798>>0]<<3)+(d[m+(k*800|0)+768>>0]<<2)|0;k=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;a[j>>0]=k;a[j+1>>0]=k>>8;a[j+2>>0]=k>>16;a[j+3>>0]=k>>24;k=q+(s<<2)+2|0;a[k>>0]=d[k>>0]|(p|0)==0;H=f+24|0;I=c[H>>2]|0;J=(I|0)==0;K=J&1;Y=g;return K|0}function xe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if(!a){d=0;return d|0}if(!b){c[a>>2]=2;d=0;return d|0}c[a+8>>2]=b;c[a>>2]=0;e=a+24|0;$a(e,c[b+64>>2]|0,c[b+60>>2]|0);if(((Ga(e,8)|0)==47?(f=(Ga(e,14)|0)+1|0,g=(Ga(e,14)|0)+1|0,Ga(e,1)|0,(Ga(e,3)|0)==0):0)?(c[a+48>>2]|0)==0:0){c[a+4>>2]=2;c[b>>2]=f;c[b+4>>2]=g;if(ab(f,g,1,a,0)|0){d=1;return d|0}ra(a);d=0;return d|0}c[a>>2]=3;ra(a);d=0;return d|0}function ye(a){a=a|0;var b=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,w=0,x=0,y=0,z=0;if(!a){b=0;return b|0}d=c[a+8>>2]|0;e=c[d+40>>2]|0;f=a+4|0;a:do if(!(c[f>>2]|0)){g=a+16|0;h=a+100|0;i=a+104|0;j=23}else{k=a+12|0;c[k>>2]=c[e>>2];if(!(Ub(c[e+20>>2]|0,d,3)|0)){c[a>>2]=2;break}l=c[d>>2]|0;m=a+100|0;n=c[m>>2]|0;o=a+104|0;p=c[o>>2]|0;q=Cf(p|0,((p|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=v()|0;p=l&65535;r=Jf(l|0,((l|0)<0)<<31>>31|0,4)|0;l=Df(r|0,v()|0,p|0,0)|0;r=Df(l|0,v()|0,q|0,n|0)|0;n=wa(r,v()|0,4)|0;r=a+16|0;c[r>>2]=n;if(!n){c[a>>2]=1;c[a+20>>2]=0;break}c[a+20>>2]=n+(q<<2)+(p<<2);p=d+92|0;do if(c[p>>2]|0){q=c[d+12>>2]|0;n=c[d+96>>2]|0;l=c[d+16>>2]|0;s=c[d+100>>2]|0;t=((n|0)<0)<<31>>31;u=Jf(n|0,t|0,5)|0;w=Df(u|0,v()|0,84,0)|0;x=v()|0;y=Jf(n|0,t|0,2)|0;t=Df(w|0,x|0,y|0,v()|0)|0;y=wa(t,v()|0,1)|0;if(y){c[a+264>>2]=y;c[a+268>>2]=y;t=y+84|0;Wb(y,q,l,t+u|0,n,s,0,4,t);if(!(c[p>>2]|0)){j=12;break}else{j=13;break}}else{c[a>>2]=1;break a}}else j=12;while(0);if((j|0)==12){p=c[c[k>>2]>>2]|0;if((p+-7|0)>>>0>3)z=p;else j=13}if((j|0)==13){Da();z=c[c[k>>2]>>2]|0}if(z>>>0>10?(ze(),c[(c[k>>2]|0)+28>>2]|0):0)Da();if(((c[a+56>>2]|0?(c[a+120>>2]|0)>0:0)?(p=a+136|0,(c[p>>2]|0)==0):0)?(db(p,c[a+132>>2]|0)|0)==0:0){c[a>>2]=1;break}c[f>>2]=0;g=r;h=m;i=o;j=23}while(0);if((j|0)==23?Ia(a,c[g>>2]|0,c[h>>2]|0,c[i>>2]|0,c[d+88>>2]|0,2)|0:0){c[e+16>>2]=c[a+116>>2];b=1;return b|0}ra(a);b=0;return b|0}function ze(){if(Te(10168)|0)return;c[2042]=0;Ue(10168)|0;return}function Ae(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)<=0)return;f=0;do{g=c[b+(f<<2)>>2]|0;h=((g&255)*6420|0)+1081344+(((16?g>>>16:g)&255)*16839|0)+(((8?g>>>8:g)&255)*33059|0)|0;a[d+f>>0]=16?h>>>16:h;f=f+1|0}while((f|0)!=(e|0));return}function Be(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;i=1?g>>1:g;if((g|0)>1)if(!h){j=0;while(1){k=j<<1;l=c[b+(k<<2)>>2]|0;m=c[b+((k|1)<<2)>>2]|0;k=((15?m>>>15:m)&510)+((15?l>>>15:l)&510)|0;n=((7?m>>>7:m)&510)+((7?l>>>7:l)&510)|0;o=(m<<1&510)+(l<<1&510)|0;l=(r(n,-19081)|0)+(r(k,-9719)|0)+(o*28800|0)|0;m=l+33685504|0;p=18?m>>18:m;m=(r(n,-24116)|0)+(k*28800|0)+(r(o,-4684)|0)|0;o=m+33685504|0;k=18?o>>18:o;o=e+j|0;n=(p>>>0<256?p:(l|0)<-33685504?0:255)+1+(d[o>>0]|0)|0;a[o>>0]=1?n>>>1:n;n=f+j|0;o=(k>>>0<256?k:(m|0)<-33685504?0:255)+1+(d[n>>0]|0)|0;a[n>>0]=1?o>>>1:o;o=j+1|0;if((o|0)<(i|0))j=o;else{q=o;break}}}else{j=0;while(1){o=j<<1;n=c[b+(o<<2)>>2]|0;m=c[b+((o|1)<<2)>>2]|0;o=((15?m>>>15:m)&510)+((15?n>>>15:n)&510)|0;k=((7?m>>>7:m)&510)+((7?n>>>7:n)&510)|0;l=(m<<1&510)+(n<<1&510)|0;n=(r(k,-19081)|0)+(r(o,-9719)|0)+(l*28800|0)|0;m=n+33685504|0;p=18?m>>18:m;m=(r(k,-24116)|0)+(o*28800|0)+(r(l,-4684)|0)|0;l=m+33685504|0;o=18?l>>18:l;a[e+j>>0]=p>>>0<256?p:(n|0)<-33685504?0:255;a[f+j>>0]=o>>>0<256?o:(m|0)<-33685504?0:255;m=j+1|0;if((m|0)<(i|0))j=m;else{q=m;break}}}else q=0;if(!(g&1))return;g=c[b+(q<<1<<2)>>2]|0;b=(14?g>>>14:g)&1020;j=(6?g>>>6:g)&1020;i=g<<2&1020;g=(r(j,-19081)|0)+(r(b,-9719)|0)+(i*28800|0)|0;m=g+33685504|0;o=18?m>>18:m;m=o>>>0<256?o:(g|0)<-33685504?0:255;g=(r(j,-24116)|0)+(b*28800|0)+(r(i,-4684)|0)|0;i=g+33685504|0;b=18?i>>18:i;i=b>>>0<256?b:(g|0)<-33685504?0:255;if(!h){h=e+q|0;g=m+1+(d[h>>0]|0)|0;a[h>>0]=1?g>>>1:g;g=f+q|0;h=i+1+(d[g>>0]|0)|0;a[g>>0]=1?h>>>1:h;return}else{a[e+q>>0]=m;a[f+q>>0]=i;return}}function Ce(a){a=a|0;var b=0,e=0,f=0;b=a+12|0;e=c[b>>2]|0;if(e>>>0<(c[a+16>>2]|0)>>>0){f=a+8|0;c[f>>2]=(c[f>>2]|0)+8;c[b>>2]=e+1;c[a>>2]=c[a>>2]<<8|(d[e>>0]|0);return}e=a+24|0;if(!(c[e>>2]|0)){c[a>>2]=c[a>>2]<<8;b=a+8|0;c[b>>2]=(c[b>>2]|0)+8;c[e>>2]=1;return}else{c[a+8>>2]=0;return}}function De(c){c=c|0;b[c>>1]=65535;a[c+2>>0]=255;return}function Ee(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;c[a+4>>2]=254;c[a>>2]=0;f=a+8|0;c[f>>2]=-8;g=a+24|0;c[g>>2]=0;h=a+12|0;c[h>>2]=b;i=b+e|0;c[a+16>>2]=i;j=e>>>0>3?i+-4+1|0:b;c[a+20>>2]=j;if(j>>>0>b>>>0){j=d[b>>0]|d[b+1>>0]<<8|d[b+2>>0]<<16|d[b+3>>0]<<24;c[h>>2]=b+3;i=Kf(j|0)|0;c[a>>2]=8?i>>>8:i;c[f>>2]=16;return}if((e|0)>0){c[f>>2]=0;c[h>>2]=b+1;c[a>>2]=d[b>>0];return}else{c[a>>2]=0;c[f>>2]=0;c[g>>2]=1;return}}function Fe(a,b){a=a|0;b=b|0;var 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,t=0,u=0;if((b|0)<=0){e=0;return e|0}f=a+4|0;g=a+8|0;h=a+12|0;i=a+20|0;j=a+16|0;k=a+24|0;l=0;m=b;b=c[g>>2]|0;n=c[f>>2]|0;while(1){o=m;m=m+-1|0;do if((b|0)<0){p=c[h>>2]|0;if(p>>>0<(c[i>>2]|0)>>>0){q=d[p>>0]|d[p+1>>0]<<8|d[p+2>>0]<<16|d[p+3>>0]<<24;c[h>>2]=p+3;r=Kf(q|0)|0;c[a>>2]=c[a>>2]<<24|(8?r>>>8:r);r=b+24|0;c[g>>2]=r;t=r;break}if(p>>>0<(c[j>>2]|0)>>>0){r=b+8|0;c[g>>2]=r;c[h>>2]=p+1;c[a>>2]=c[a>>2]<<8|(d[p>>0]|0);t=r;break}if(!(c[k>>2]|0)){c[a>>2]=c[a>>2]<<8;r=b+8|0;c[g>>2]=r;c[k>>2]=1;t=r;break}else{c[g>>2]=0;t=0;break}}else t=b;while(0);r=(1?n>>>1:n)&16777215;p=c[a>>2]|0;q=(t?p>>>t:p)>>>0>r>>>0;if(q){c[a>>2]=p-(r+1<>2]=b;n=(u<>2]=n;r=(q&1)<>2]|0)==0;o=0;do{if(n)if(!o){p=g;q=16}else{r=b+776+(o<<5)|0;c[r>>2]=c[m>>2];c[r+4>>2]=c[m+4>>2];c[r+8>>2]=c[m+8>>2];c[r+12>>2]=c[m+12>>2];c[r+16>>2]=c[m+16>>2];c[r+20>>2]=c[m+20>>2];c[r+24>>2]=c[m+24>>2];c[r+28>>2]=c[m+28>>2]}else{p=((c[f>>2]|0)==0?g:0)+(a[b+116+o>>0]|0)|0;q=16}if((q|0)==16){q=0;r=p+h|0;s=(r|0)<127?r:127;c[b+776+(o<<5)>>2]=d[7200+((s|0)>0?s:0)>>0];s=(p|0)<127?p:127;c[b+776+(o<<5)+4>>2]=e[7328+(((s|0)>0?s:0)<<1)>>1];s=p+i|0;r=(s|0)<127?s:127;c[b+776+(o<<5)+8>>2]=d[7200+((r|0)>0?r:0)>>0]<<1;r=p+j|0;s=(r|0)<127?r:127;r=(e[7328+(((s|0)>0?s:0)<<1)>>1]|0)*101581|0;c[b+776+(o<<5)+12>>2]=r>>>0<524288?8:16?r>>>16:r;r=p+k|0;s=(r|0)<117?r:117;c[b+776+(o<<5)+16>>2]=d[7200+((s|0)>0?s:0)>>0];s=p+l|0;r=(s|0)<127?s:127;c[b+776+(o<<5)+20>>2]=e[7328+(((r|0)>0?r:0)<<1)>>1];c[b+776+(o<<5)+24>>2]=s}o=o+1|0}while((o|0)!=4);return}function Ie(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=b+4|0;g=b+8|0;h=b+12|0;i=b+20|0;j=0;do{k=0;do{l=0;do{m=d[5088+(j*264|0)+(k*33|0)+l>>0]|0;n=c[f>>2]|0;o=c[g>>2]|0;do if((o|0)<0){p=c[h>>2]|0;if(p>>>0<(c[i>>2]|0)>>>0){q=d[p>>0]|d[p+1>>0]<<8|d[p+2>>0]<<16|d[p+3>>0]<<24;c[h>>2]=p+3;p=Kf(q|0)|0;c[b>>2]=c[b>>2]<<24|(8?p>>>8:p);p=o+24|0;c[g>>2]=p;t=p;break}else{Ce(b);t=c[g>>2]|0;break}}else t=o;while(0);o=r(n,m)|0;p=8?o>>>8:o;o=c[b>>2]|0;q=(t?o>>>t:o)>>>0>p>>>0;if(q){c[b>>2]=o-(p+1<>2]=t-p;c[f>>2]=(u<>0]|0;a[e+907+(j*264|0)+(k*33|0)+l>>0]=v;l=l+1|0}while((l|0)!=11);l=0;do{q=d[5088+(j*264|0)+(k*33|0)+11+l>>0]|0;p=c[f>>2]|0;o=c[g>>2]|0;do if((o|0)<0){w=c[h>>2]|0;if(w>>>0<(c[i>>2]|0)>>>0){x=d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24;c[h>>2]=w+3;w=Kf(x|0)|0;c[b>>2]=c[b>>2]<<24|(8?w>>>8:w);w=o+24|0;c[g>>2]=w;y=w;break}else{Ce(b);y=c[g>>2]|0;break}}else y=o;while(0);o=r(p,q)|0;n=8?o>>>8:o;o=c[b>>2]|0;m=(y?o>>>y:o)>>>0>n>>>0;if(m){c[b>>2]=o-(n+1<>2]=y-n;c[f>>2]=(z<>0]|0;a[e+907+(j*264|0)+(k*33|0)+11+l>>0]=A;l=l+1|0}while((l|0)!=11);l=0;do{m=d[5088+(j*264|0)+(k*33|0)+22+l>>0]|0;n=c[f>>2]|0;o=c[g>>2]|0;do if((o|0)<0){w=c[h>>2]|0;if(w>>>0<(c[i>>2]|0)>>>0){x=d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24;c[h>>2]=w+3;w=Kf(x|0)|0;c[b>>2]=c[b>>2]<<24|(8?w>>>8:w);w=o+24|0;c[g>>2]=w;B=w;break}else{Ce(b);B=c[g>>2]|0;break}}else B=o;while(0);o=r(n,m)|0;p=8?o>>>8:o;o=c[b>>2]|0;q=(B?o>>>B:o)>>>0>p>>>0;if(q){c[b>>2]=o-(p+1<>2]=B-p;c[f>>2]=(C<>0]|0;a[e+907+(j*264|0)+(k*33|0)+22+l>>0]=D;l=l+1|0}while((l|0)!=11);k=k+1|0}while((k|0)!=8);k=e+907+(j*264|0)|0;c[e+1964+(j*68|0)>>2]=k;c[e+1964+(j*68|0)+4>>2]=e+907+(j*264|0)+33;c[e+1964+(j*68|0)+8>>2]=e+907+(j*264|0)+66;c[e+1964+(j*68|0)+12>>2]=e+907+(j*264|0)+99;l=e+907+(j*264|0)+198|0;c[e+1964+(j*68|0)+16>>2]=l;c[e+1964+(j*68|0)+20>>2]=e+907+(j*264|0)+132;c[e+1964+(j*68|0)+24>>2]=e+907+(j*264|0)+165;c[e+1964+(j*68|0)+28>>2]=l;c[e+1964+(j*68|0)+32>>2]=l;c[e+1964+(j*68|0)+36>>2]=l;c[e+1964+(j*68|0)+40>>2]=l;c[e+1964+(j*68|0)+44>>2]=l;c[e+1964+(j*68|0)+48>>2]=l;c[e+1964+(j*68|0)+52>>2]=l;c[e+1964+(j*68|0)+56>>2]=l;c[e+1964+(j*68|0)+60>>2]=e+907+(j*264|0)+231;c[e+1964+(j*68|0)+64>>2]=k;j=j+1|0}while((j|0)!=4);j=Fe(b,1)|0;c[e+2236>>2]=j;if(!j)return;j=(Fe(b,8)|0)&255;a[e+2240>>0]=j;return}function Je(a,e,f,g,h,i){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=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;if((h|0)>=16){j=16;return j|0}k=a+4|0;l=a+8|0;m=a+12|0;n=a+20|0;o=(c[e+(h<<2)>>2]|0)+(f*11|0)|0;f=h;h=c[l>>2]|0;p=c[k>>2]|0;a:while(1){q=d[o>>0]|0;do if((h|0)<0){t=c[m>>2]|0;if(t>>>0<(c[n>>2]|0)>>>0){u=d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24;c[m>>2]=t+3;t=Kf(u|0)|0;c[a>>2]=c[a>>2]<<24|(8?t>>>8:t);t=h+24|0;c[l>>2]=t;v=t;break}else{Ce(a);v=c[l>>2]|0;break}}else v=h;while(0);t=r(p,q)|0;u=8?t>>>8:t;t=c[a>>2]|0;w=(v?t>>>v:t)>>>0>u>>>0;if(w){x=t-(u+1<>2]=x;y=p-u|0;z=x}else{y=u+1|0;z=t}t=(s(y|0)|0)^24;u=v-t|0;c[l>>2]=u;x=(y<>2]=x;if(!w){j=f;A=37;break}w=o;t=f;B=u;u=z;C=x;while(1){x=d[w+1>>0]|0;do if((B|0)<0){D=c[m>>2]|0;if(D>>>0<(c[n>>2]|0)>>>0){E=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[m>>2]=D+3;D=Kf(E|0)|0;E=u<<24|(8?D>>>8:D);c[a>>2]=E;D=B+24|0;c[l>>2]=D;F=E;G=D;break}else{Ce(a);F=c[a>>2]|0;G=c[l>>2]|0;break}}else{F=u;G=B}while(0);D=r(C,x)|0;E=8?D>>>8:D;D=(G?F>>>G:F)>>>0>E>>>0;if(D){H=F-(E+1<>2]=H;I=C-E|0;J=H}else{I=E+1|0;J=F}E=(s(I|0)|0)^24;K=G-E|0;c[l>>2]=K;L=(I<>2]=L;M=t+1|0;if(D)break;if((M|0)==16){j=16;A=37;break a}w=c[e+(M<<2)>>2]|0;t=M;B=K;u=J;C=L}C=c[e+(M<<2)>>2]|0;u=d[w+2>>0]|0;do if((K|0)<0){B=c[m>>2]|0;if(B>>>0<(c[n>>2]|0)>>>0){q=d[B>>0]|d[B+1>>0]<<8|d[B+2>>0]<<16|d[B+3>>0]<<24;c[m>>2]=B+3;B=Kf(q|0)|0;q=J<<24|(8?B>>>8:B);c[a>>2]=q;B=K+24|0;c[l>>2]=B;N=q;O=B;break}else{Ce(a);N=c[a>>2]|0;O=c[l>>2]|0;break}}else{N=J;O=K}while(0);B=r(L,u)|0;q=8?B>>>8:B;B=(O?N>>>O:N)>>>0>q>>>0;if(B){c[a>>2]=N-(q+1<>2]=D;c[k>>2]=(P<>2]|0}else{Q=1;R=C+11|0;S=D}do if((S|0)<0){D=c[m>>2]|0;if(D>>>0<(c[n>>2]|0)>>>0){B=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[m>>2]=D+3;D=Kf(B|0)|0;c[a>>2]=c[a>>2]<<24|(8?D>>>8:D);D=S+24|0;c[l>>2]=D;T=D;break}else{Ce(a);T=c[l>>2]|0;break}}else T=S;while(0);C=c[k>>2]|0;w=1?C>>>1:C;u=c[a>>2]|0;D=w-(T?u>>>T:u)|0;B=31?D>>31:D;D=T+-1|0;c[l>>2]=D;q=B+C|1;c[k>>2]=q;c[a>>2]=u-((B&w+1)<0&1)<<2)>>2]|0)|0)&65535;b[i+((d[7584+t>>0]|0)<<1)>>1]=w;if((t|0)<15){o=R;f=M;h=D;p=q}else{j=16;A=37;break}}if((A|0)==37)return j|0;return 0}function Ke(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=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;f=d[e+3>>0]|0;g=b+4|0;h=c[g>>2]|0;i=b+8|0;j=c[i>>2]|0;do if((j|0)<0){k=b+12|0;l=c[k>>2]|0;if(l>>>0<(c[b+20>>2]|0)>>>0){m=d[l>>0]|d[l+1>>0]<<8|d[l+2>>0]<<16|d[l+3>>0]<<24;c[k>>2]=l+3;l=Kf(m|0)|0;c[b>>2]=c[b>>2]<<24|(8?l>>>8:l);l=j+24|0;c[i>>2]=l;n=l;break}else{Ce(b);n=c[i>>2]|0;break}}else n=j;while(0);j=r(h,f)|0;f=8?j>>>8:j;j=c[b>>2]|0;l=(n?j>>>n:j)>>>0>f>>>0;if(l){m=j-(f+1<>2]=m;o=h-f|0;p=m}else{o=f+1|0;p=j}j=(s(o|0)|0)^24;f=n-j|0;c[i>>2]=f;n=(o<>2]=n;if(!l){l=d[e+4>>0]|0;do if((f|0)<0){j=b+12|0;o=c[j>>2]|0;if(o>>>0<(c[b+20>>2]|0)>>>0){m=d[o>>0]|d[o+1>>0]<<8|d[o+2>>0]<<16|d[o+3>>0]<<24;c[j>>2]=o+3;o=Kf(m|0)|0;m=p<<24|(8?o>>>8:o);c[b>>2]=m;o=f+24|0;c[i>>2]=o;q=m;t=o;break}else{Ce(b);q=c[b>>2]|0;t=c[i>>2]|0;break}}else{q=p;t=f}while(0);o=r(n,l)|0;l=8?o>>>8:o;o=(t?q>>>t:q)>>>0>l>>>0;if(o){m=q-(l+1<>2]=m;u=n-l|0;v=m}else{u=l+1|0;v=q}q=(s(u|0)|0)^24;l=t-q|0;c[i>>2]=l;t=(u<>2]=t;if(!o){w=2;return w|0}o=d[e+5>>0]|0;do if((l|0)<0){q=b+12|0;u=c[q>>2]|0;if(u>>>0<(c[b+20>>2]|0)>>>0){m=d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24;c[q>>2]=u+3;u=Kf(m|0)|0;m=v<<24|(8?u>>>8:u);c[b>>2]=m;u=l+24|0;c[i>>2]=u;x=m;y=u;break}else{Ce(b);x=c[b>>2]|0;y=c[i>>2]|0;break}}else{x=v;y=l}while(0);l=r(t,o)|0;o=8?l>>>8:l;l=(y?x>>>y:x)>>>0>o>>>0;if(l){c[b>>2]=x-(o+1<>2]=y-o;c[g>>2]=(z<>0]|0;do if((f|0)<0){o=b+12|0;z=c[o>>2]|0;if(z>>>0<(c[b+20>>2]|0)>>>0){y=d[z>>0]|d[z+1>>0]<<8|d[z+2>>0]<<16|d[z+3>>0]<<24;c[o>>2]=z+3;z=Kf(y|0)|0;y=p<<24|(8?z>>>8:z);c[b>>2]=y;z=f+24|0;c[i>>2]=z;A=y;B=z;break}else{Ce(b);A=c[b>>2]|0;B=c[i>>2]|0;break}}else{A=p;B=f}while(0);f=r(n,l)|0;l=8?f>>>8:f;f=(B?A>>>B:A)>>>0>l>>>0;if(f){p=A-(l+1<>2]=p;C=n-l|0;D=p}else{C=l+1|0;D=A}A=(s(C|0)|0)^24;l=B-A|0;c[i>>2]=l;B=(C<>2]=B;if(f){f=d[e+8>>0]|0;do if((l|0)<0){A=b+12|0;C=c[A>>2]|0;if(C>>>0<(c[b+20>>2]|0)>>>0){p=d[C>>0]|d[C+1>>0]<<8|d[C+2>>0]<<16|d[C+3>>0]<<24;c[A>>2]=C+3;C=Kf(p|0)|0;p=D<<24|(8?C>>>8:C);c[b>>2]=p;C=l+24|0;c[i>>2]=C;E=p;F=C;break}else{Ce(b);E=c[b>>2]|0;F=c[i>>2]|0;break}}else{E=D;F=l}while(0);C=r(B,f)|0;f=8?C>>>8:C;C=(F?E>>>F:E)>>>0>f>>>0;p=C&1;if(C){A=E-(f+1<>2]=A;G=B-f|0;H=A}else{G=f+1|0;H=E}E=(s(G|0)|0)^24;f=F-E|0;c[i>>2]=f;F=(G<>2]=F;E=d[e+(C?10:9)>>0]|0;do if((f|0)<0){C=b+12|0;G=c[C>>2]|0;if(G>>>0<(c[b+20>>2]|0)>>>0){A=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24;c[C>>2]=G+3;G=Kf(A|0)|0;A=H<<24|(8?G>>>8:G);c[b>>2]=A;G=f+24|0;c[i>>2]=G;I=A;J=G;break}else{Ce(b);I=c[b>>2]|0;J=c[i>>2]|0;break}}else{I=H;J=f}while(0);f=r(F,E)|0;E=8?f>>>8:f;f=(J?I>>>J:I)>>>0>E>>>0;if(f){H=I-(E+1<>2]=H;K=F-E|0;L=H}else{K=E+1|0;L=I}I=(s(K|0)|0)^24;E=J-I|0;c[i>>2]=E;J=(K<>2]=J;I=p<<1|f&1;f=c[7600+(I<<2)>>2]|0;p=a[f>>0]|0;if(!(p<<24>>24))M=0;else{K=b+12|0;H=b+20|0;F=f;f=0;G=p;p=E;E=L;L=J;while(1){J=G&255;do if((p|0)<0){A=c[K>>2]|0;if(A>>>0<(c[H>>2]|0)>>>0){C=d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24;c[K>>2]=A+3;A=Kf(C|0)|0;C=E<<24|(8?A>>>8:A);c[b>>2]=C;A=p+24|0;c[i>>2]=A;N=C;O=A;break}else{Ce(b);N=c[b>>2]|0;O=c[i>>2]|0;break}}else{N=E;O=p}while(0);A=r(L,J)|0;C=8?A>>>8:A;A=(O?N>>>O:N)>>>0>C>>>0;if(A){n=N-(C+1<>2]=n;P=L-C|0;Q=n}else{P=C+1|0;Q=N}C=(s(P|0)|0)^24;p=O-C|0;c[i>>2]=p;L=(P<>2]=L;C=f<<1|A&1;F=F+1|0;G=a[F>>0]|0;if(!(G<<24>>24)){M=C;break}else{f=C;E=Q}}}w=M+(8<>0]|0;do if((l|0)<0){e=b+12|0;M=c[e>>2]|0;if(M>>>0<(c[b+20>>2]|0)>>>0){Q=d[M>>0]|d[M+1>>0]<<8|d[M+2>>0]<<16|d[M+3>>0]<<24;c[e>>2]=M+3;M=Kf(Q|0)|0;Q=D<<24|(8?M>>>8:M);c[b>>2]=Q;M=l+24|0;c[i>>2]=M;R=Q;S=M;break}else{Ce(b);R=c[b>>2]|0;S=c[i>>2]|0;break}}else{R=D;S=l}while(0);l=r(B,I)|0;I=8?l>>>8:l;l=(S?R>>>S:R)>>>0>I>>>0;if(l){D=R-(I+1<>2]=D;T=B-I|0;U=D}else{T=I+1|0;U=R}R=(s(T|0)|0)^24;I=S-R|0;c[i>>2]=I;S=(T<>2]=S;R=(I|0)<0;if(!l){do if(R){l=b+12|0;T=c[l>>2]|0;if(T>>>0<(c[b+20>>2]|0)>>>0){D=d[T>>0]|d[T+1>>0]<<8|d[T+2>>0]<<16|d[T+3>>0]<<24;c[l>>2]=T+3;T=Kf(D|0)|0;D=U<<24|(8?T>>>8:T);c[b>>2]=D;T=I+24|0;c[i>>2]=T;V=D;W=T;break}else{Ce(b);V=c[b>>2]|0;W=c[i>>2]|0;break}}else{V=U;W=I}while(0);T=S*159|0;D=8?T>>>8:T;T=(W?V>>>W:V)>>>0>D>>>0;if(T){c[b>>2]=V-(D+1<>2]=W-D;c[g>>2]=(X<>2]|0;if(D>>>0<(c[b+20>>2]|0)>>>0){X=d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24;c[T>>2]=D+3;D=Kf(X|0)|0;X=U<<24|(8?D>>>8:D);c[b>>2]=X;D=I+24|0;c[i>>2]=D;Y=X;Z=D;break}else{Ce(b);Y=c[b>>2]|0;Z=c[i>>2]|0;break}}else{Y=U;Z=I}while(0);I=S*165|0;U=8?I>>>8:I;I=(Z?Y>>>Z:Y)>>>0>U>>>0;if(I){R=Y-(U+1<>2]=R;_=S-U|0;$=R}else{_=U+1|0;$=Y}Y=(s(_|0)|0)^24;U=Z-Y|0;c[i>>2]=U;Z=(_<>2]=Z;Y=((I&1)<<1)+7|0;do if((U|0)<0){I=b+12|0;_=c[I>>2]|0;if(_>>>0<(c[b+20>>2]|0)>>>0){R=d[_>>0]|d[_+1>>0]<<8|d[_+2>>0]<<16|d[_+3>>0]<<24;c[I>>2]=_+3;_=Kf(R|0)|0;R=$<<24|(8?_>>>8:_);c[b>>2]=R;_=U+24|0;c[i>>2]=_;aa=R;ba=_;break}else{Ce(b);aa=c[b>>2]|0;ba=c[i>>2]|0;break}}else{aa=$;ba=U}while(0);U=Z*145|0;$=8?U>>>8:U;U=(ba?aa>>>ba:aa)>>>0>$>>>0;if(U){c[b>>2]=aa-($+1<>2]=ba-$;c[g>>2]=(ca<<$)+-1;w=Y+(U&1)|0;return w|0}function Le(b,d){b=b|0;d=d|0;var 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;if(!b){e=0;return e|0}if(!d){if(c[b>>2]|0){e=0;return e|0}c[b>>2]=2;c[b+8>>2]=9156;c[b+4>>2]=0;e=0;return e|0}f=b+4|0;if((c[f>>2]|0)==0?(ue(b,d)|0)==0:0){e=0;return e|0}if(!(nd(b,d)|0)){a:do if(!(qd(b,d)|0))g=0;else{h=b+2300|0;c[h>>2]=0;i=b+308|0;b:do if((c[i>>2]|0)>0){j=b+312|0;k=b+12|0;l=b+2296|0;m=b+288|0;n=b+2256|0;o=b+2248|0;p=0;c:while(1){q=b+316+((c[j>>2]&p)*28|0)|0;if(!(ve(k,b)|0)){r=12;break}if((c[l>>2]|0)<(c[m>>2]|0))do{if(!(we(b,q)|0)){r=17;break c}s=(c[l>>2]|0)+1|0;c[l>>2]=s}while((s|0)<(c[m>>2]|0));q=c[n>>2]|0;a[q+-2>>0]=0;a[q+-1>>0]=0;c[o>>2]=0;c[l>>2]=0;if(!(bd(b,d)|0)){r=21;break}p=(c[h>>2]|0)+1|0;c[h>>2]=p;if((p|0)>=(c[i>>2]|0))break b}if((r|0)==12){if(c[b>>2]|0){g=0;break a}c[b>>2]=7;c[b+8>>2]=9193;c[f>>2]=0;g=0;break a}else if((r|0)==17){if(c[b>>2]|0){g=0;break a}c[b>>2]=7;c[b+8>>2]=9234;c[f>>2]=0;g=0;break a}else if((r|0)==21){if(c[b>>2]|0){g=0;break a}c[b>>2]=6;c[b+8>>2]=9269;c[f>>2]=0;g=0;break a}}while(0);if((c[b+148>>2]|0)>0?(i=(ed()|0)+8|0,(aa[c[i>>2]&7](b+124|0)|0)==0):0){g=0;break}g=1}while(0);r=(od(b,d)|0)&g;if(r|0){c[f>>2]=0;e=r;return e|0}}r=(ed()|0)+20|0;ea[c[r>>2]&31](b+124|0);oa(b);r=b+2288|0;pa(c[r>>2]|0);c[r>>2]=0;c[b+2292>>2]=0;r=b+12|0;c[r>>2]=0;c[r+4>>2]=0;c[r+8>>2]=0;c[r+12>>2]=0;c[r+16>>2]=0;c[r+20>>2]=0;c[r+24>>2]=0;c[f>>2]=0;e=0;return e|0}function Me(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=Y;Y=Y+160|0;f=e+148|0;g=e+144|0;h=e+36|0;i=e;c[i>>2]=a;j=i+4|0;c[j>>2]=b;c[i+8>>2]=1;c[g>>2]=0;k=ne(a,b,0,0,0,g,0,i)|0;c[f>>2]=k;if(!(c[f>>2]|0)){if(c[g>>2]|0)l=4}else if((c[f>>2]|0)==7&(c[g>>2]|0)!=0)l=4;if((l|0)==4)c[f>>2]=4;l=c[f>>2]|0;if(l|0){m=l;Y=e;return m|0}ya(h,520)|0;l=c[i+12>>2]|0;c[h+64>>2]=(c[i>>2]|0)+l;c[h+60>>2]=(c[j>>2]|0)-l;za(d,h);if(!(c[i+32>>2]|0)){l=se()|0;if(!l){m=1;Y=e;return m|0}c[l+2348>>2]=c[i+16>>2];c[l+2352>>2]=c[i+20>>2];if(ue(l,h)|0){j=h+4|0;f=d+20|0;g=Uc(c[h>>2]|0,c[j>>2]|0,c[f>>2]|0,c[d>>2]|0)|0;if(!g){k=pd(c[f>>2]|0,i,c[h>>2]|0,c[j>>2]|0)|0;c[l+148>>2]=k;$c(c[f>>2]|0,l);if(!(Le(l,h)|0))n=c[l>>2]|0;else n=0}else n=g}else n=c[l>>2]|0;re(l);o=n}else{n=te()|0;if(!n){m=1;Y=e;return m|0}if(xe(n,h)|0){l=Uc(c[h>>2]|0,c[h+4>>2]|0,c[d+20>>2]|0,c[d>>2]|0)|0;if(!l)if(!(ye(n)|0))p=c[n>>2]|0;else p=0;else p=l}else p=c[n>>2]|0;qa(n);o=p}if(o|0){Xc(c[d>>2]|0);m=o;Y=e;return m|0}o=c[d+20>>2]|0;if(!o){m=0;Y=e;return m|0}if(!(c[o+48>>2]|0)){m=0;Y=e;return m|0}m=Tc(c[d>>2]|0)|0;Y=e;return m|0}function Ne(a,b){a=a|0;b=b|0;var c=0;if((a|0)==0|(b&-256|0)!=512){c=0;return c|0}Nf(a|0,0,200)|0;Wc(a+40|0,520)|0;c=1;return c|0}function Oe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=Y;Y=Y+144|0;f=e+88|0;g=e;if(!d){h=2;Y=e;return h|0}a:do if(!a)i=2;else{j=d;k=j+40|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(k|0));l=d+4|0;m=ne(a,b,d,l,d+8|0,d+12|0,d+16|0,0)|0;switch(m|0){case 0:break;case 7:{h=3;Y=e;return h|0}default:{i=m;break a}}j=f+4|0;k=j+52|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(k|0));c[f+20>>2]=d+124;j=d+40|0;c[f>>2]=j;if(!(_c(j,d)|0)){h=Me(a,b,f)|0;Y=e;return h|0}Wc(g,520)|0;c[g>>2]=c[j>>2];c[g+4>>2]=c[d>>2];c[g+8>>2]=c[l>>2];c[f>>2]=g;k=Me(a,b,f)|0;if(!k)n=Yc(g,j)|0;else n=k;Xc(g);h=n;Y=e;return h|0}while(0);h=i;Y=e;return h|0} + function Pe(a){a=a|0;var b=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,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,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;b=Y;Y=Y+16|0;d=b;do if(a>>>0<245){e=a>>>0<11?16:a+11&-8;f=3?e>>>3:e;g=c[2550]|0;h=f?g>>>f:g;if(h&3|0){i=(h&1^1)+f|0;j=10240+(i<<1<<2)|0;k=j+8|0;l=c[k>>2]|0;m=l+8|0;n=c[m>>2]|0;if((n|0)==(j|0))c[2550]=g&~(1<>2]=j;c[k>>2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l=y;while(1){u=j+20|0;v=c[u>>2]|0;if(!v){z=j+16|0;A=c[z>>2]|0;if(!A)break;else{B=A;C=z}}else{B=v;C=u}j=B;l=C}c[l>>2]=0;w=j}else{u=c[i+8>>2]|0;c[u+12>>2]=k;c[k+8>>2]=u;w=k}while(0);do if(s|0){k=c[i+28>>2]|0;u=10504+(k<<2)|0;if((i|0)==(c[u>>2]|0)){c[u>>2]=w;if(!w){c[2551]=f&~(1<>2]|0)==(i|0)?k:s+20|0)>>2]=w;if(!w)break}c[w+24>>2]=s;k=c[i+16>>2]|0;if(k|0){c[w+16>>2]=k;c[k+24>>2]=w}k=c[i+20>>2]|0;if(k|0){c[w+20>>2]=k;c[k+24>>2]=w}}while(0);if(n>>>0<16){s=n+e|0;c[i+4>>2]=s|3;f=i+s+4|0;c[f>>2]=c[f>>2]|1}else{c[i+4>>2]=e|3;c[h+4>>2]=n|1;c[h+n>>2]=n;if(m|0){f=c[2555]|0;s=3?m>>>3:m;k=10240+(s<<1<<2)|0;u=1<>2]|0;E=u}c[E>>2]=f;c[D+12>>2]=f;c[f+8>>2]=D;c[f+12>>2]=k}c[2552]=n;c[2555]=h}o=i+8|0;Y=b;return o|0}else F=e}else F=e}else F=e}else if(a>>>0<=4294967231){k=a+11|0;f=k&-8;u=c[2551]|0;if(u){s=0-f|0;v=8?k>>>8:k;if(v)if(f>>>0>16777215)G=31;else{k=v+1048320|0;z=(16?k>>>16:k)&8;k=v<>>16:v)&4;v=k<>>16:k)&2;k=v<>>15:k)|0;k=v+7|0;G=(k?f>>>k:f)&1|v<<1}else G=0;v=c[10504+(G<<2)>>2]|0;a:do if(!v){I=0;J=0;K=s;L=61}else{k=0;H=s;z=v;A=f<<((G|0)==31?0:25-(1?G>>>1:G)|0);M=0;while(1){N=(c[z+4>>2]&-8)-f|0;if(N>>>0>>0)if(!N){O=z;P=0;Q=z;L=65;break a}else{R=z;S=N}else{R=k;S=H}N=c[z+20>>2]|0;z=c[z+16+((31?A>>>31:A)<<2)>>2]|0;T=(N|0)==0|(N|0)==(z|0)?M:N;if(!z){I=T;J=R;K=S;L=61;break}else{k=R;H=S;A=A<<1;M=T}}}while(0);if((L|0)==61){if((I|0)==0&(J|0)==0){v=2<>>12:v)&16;e=s?v>>>s:v;v=(5?e>>>5:e)&8;i=v?e>>>v:e;e=(2?i>>>2:i)&4;h=e?i>>>e:i;i=(1?h>>>1:h)&2;n=i?h>>>i:h;h=(1?n>>>1:n)&1;U=0;V=c[10504+((v|s|e|i|h)+(h?n>>>h:n)<<2)>>2]|0}else{U=J;V=I}if(!V){W=U;X=K}else{O=U;P=K;Q=V;L=65}}if((L|0)==65){n=O;h=P;i=Q;while(1){e=(c[i+4>>2]&-8)-f|0;s=e>>>0>>0;v=s?e:h;e=s?i:n;s=c[i+16>>2]|0;if(!s)Z=c[i+20>>2]|0;else Z=s;if(!Z){W=e;X=v;break}else{n=e;h=v;i=Z}}}if(((W|0)!=0?X>>>0<((c[2552]|0)-f|0)>>>0:0)?(i=W+f|0,i>>>0>W>>>0):0){h=c[W+24>>2]|0;n=c[W+12>>2]|0;do if((n|0)==(W|0)){v=W+20|0;e=c[v>>2]|0;if(!e){s=W+16|0;g=c[s>>2]|0;if(!g){_=0;break}else{$=g;aa=s}}else{$=e;aa=v}v=$;e=aa;while(1){s=v+20|0;g=c[s>>2]|0;if(!g){m=v+16|0;M=c[m>>2]|0;if(!M)break;else{ba=M;ca=m}}else{ba=g;ca=s}v=ba;e=ca}c[e>>2]=0;_=v}else{s=c[W+8>>2]|0;c[s+12>>2]=n;c[n+8>>2]=s;_=n}while(0);do if(h){n=c[W+28>>2]|0;s=10504+(n<<2)|0;if((W|0)==(c[s>>2]|0)){c[s>>2]=_;if(!_){s=u&~(1<>2]|0)==(W|0)?s:h+20|0)>>2]=_;if(!_){da=u;break}}c[_+24>>2]=h;s=c[W+16>>2]|0;if(s|0){c[_+16>>2]=s;c[s+24>>2]=_}s=c[W+20>>2]|0;if(s){c[_+20>>2]=s;c[s+24>>2]=_;da=u}else da=u}else da=u;while(0);b:do if(X>>>0<16){u=X+f|0;c[W+4>>2]=u|3;h=W+u+4|0;c[h>>2]=c[h>>2]|1}else{c[W+4>>2]=f|3;c[i+4>>2]=X|1;c[i+X>>2]=X;h=3?X>>>3:X;if(X>>>0<256){u=10240+(h<<1<<2)|0;s=c[2550]|0;n=1<>2]|0;fa=n}c[fa>>2]=i;c[ea+12>>2]=i;c[i+8>>2]=ea;c[i+12>>2]=u;break}u=8?X>>>8:X;if(u)if(X>>>0>16777215)ga=31;else{n=u+1048320|0;s=(16?n>>>16:n)&8;n=u<>>16:u)&4;u=n<>>16:n)&2;n=u<>>15:n)|0;n=u+7|0;ga=(n?X>>>n:X)&1|u<<1}else ga=0;u=10504+(ga<<2)|0;c[i+28>>2]=ga;n=i+16|0;c[n+4>>2]=0;c[n>>2]=0;n=1<>2]=i;c[i+24>>2]=u;c[i+12>>2]=i;c[i+8>>2]=i;break}n=c[u>>2]|0;c:do if((c[n+4>>2]&-8|0)==(X|0))ha=n;else{u=X<<((ga|0)==31?0:25-(1?ga>>>1:ga)|0);g=n;while(1){ia=g+16+((31?u>>>31:u)<<2)|0;s=c[ia>>2]|0;if(!s)break;if((c[s+4>>2]&-8|0)==(X|0)){ha=s;break c}else{u=u<<1;g=s}}c[ia>>2]=i;c[i+24>>2]=g;c[i+12>>2]=i;c[i+8>>2]=i;break b}while(0);n=ha+8|0;v=c[n>>2]|0;c[v+12>>2]=i;c[n>>2]=i;c[i+8>>2]=v;c[i+12>>2]=ha;c[i+24>>2]=0}while(0);o=W+8|0;Y=b;return o|0}else F=f}else F=f}else F=-1;while(0);W=c[2552]|0;if(W>>>0>=F>>>0){ha=W-F|0;ia=c[2555]|0;if(ha>>>0>15){X=ia+F|0;c[2555]=X;c[2552]=ha;c[X+4>>2]=ha|1;c[ia+W>>2]=ha;c[ia+4>>2]=F|3}else{c[2552]=0;c[2555]=0;c[ia+4>>2]=W|3;ha=ia+W+4|0;c[ha>>2]=c[ha>>2]|1}o=ia+8|0;Y=b;return o|0}ia=c[2553]|0;if(ia>>>0>F>>>0){ha=ia-F|0;c[2553]=ha;W=c[2556]|0;X=W+F|0;c[2556]=X;c[X+4>>2]=ha|1;c[W+4>>2]=F|3;o=W+8|0;Y=b;return o|0}if(!(c[2668]|0)){c[2670]=4096;c[2669]=4096;c[2671]=-1;c[2672]=-1;c[2673]=0;c[2661]=0;c[2668]=d&-16^1431655768;ja=4096}else ja=c[2670]|0;d=F+48|0;W=F+47|0;ha=ja+W|0;X=0-ja|0;ja=ha&X;if(ja>>>0<=F>>>0){o=0;Y=b;return o|0}ga=c[2660]|0;if(ga|0?(da=c[2658]|0,ea=da+ja|0,ea>>>0<=da>>>0|ea>>>0>ga>>>0):0){o=0;Y=b;return o|0}d:do if(!(c[2661]&4)){ga=c[2556]|0;e:do if(ga){ea=10648;while(1){da=c[ea>>2]|0;if(da>>>0<=ga>>>0?(da+(c[ea+4>>2]|0)|0)>>>0>ga>>>0:0)break;da=c[ea+8>>2]|0;if(!da){L=128;break e}else ea=da}da=ha-ia&X;if(da>>>0<2147483647){fa=Of(da|0)|0;if((fa|0)==((c[ea>>2]|0)+(c[ea+4>>2]|0)|0))if((fa|0)==(-1|0))ka=da;else{la=da;ma=fa;L=145;break d}else{na=fa;oa=da;L=136}}else ka=0}else L=128;while(0);do if((L|0)==128){ga=Of(0)|0;if((ga|0)!=(-1|0)?(f=ga,da=c[2669]|0,fa=da+-1|0,_=((fa&f|0)==0?0:(fa+f&0-da)-f|0)+ja|0,f=c[2658]|0,da=_+f|0,_>>>0>F>>>0&_>>>0<2147483647):0){fa=c[2660]|0;if(fa|0?da>>>0<=f>>>0|da>>>0>fa>>>0:0){ka=0;break}fa=Of(_|0)|0;if((fa|0)==(ga|0)){la=_;ma=ga;L=145;break d}else{na=fa;oa=_;L=136}}else ka=0}while(0);do if((L|0)==136){_=0-oa|0;if(!(d>>>0>oa>>>0&(oa>>>0<2147483647&(na|0)!=(-1|0))))if((na|0)==(-1|0)){ka=0;break}else{la=oa;ma=na;L=145;break d}fa=c[2670]|0;ga=W-oa+fa&0-fa;if(ga>>>0>=2147483647){la=oa;ma=na;L=145;break d}if((Of(ga|0)|0)==(-1|0)){Of(_|0)|0;ka=0;break}else{la=ga+oa|0;ma=na;L=145;break d}}while(0);c[2661]=c[2661]|4;pa=ka;L=143}else{pa=0;L=143}while(0);if(((L|0)==143?ja>>>0<2147483647:0)?(ka=Of(ja|0)|0,ja=Of(0)|0,na=ja-ka|0,oa=na>>>0>(F+40|0)>>>0,!((ka|0)==(-1|0)|oa^1|ka>>>0>>0&((ka|0)!=(-1|0)&(ja|0)!=(-1|0))^1)):0){la=oa?na:pa;ma=ka;L=145}if((L|0)==145){ka=(c[2658]|0)+la|0;c[2658]=ka;if(ka>>>0>(c[2659]|0)>>>0)c[2659]=ka;ka=c[2556]|0;f:do if(ka){pa=10648;while(1){qa=c[pa>>2]|0;ra=c[pa+4>>2]|0;if((ma|0)==(qa+ra|0)){L=154;break}na=c[pa+8>>2]|0;if(!na)break;else pa=na}if(((L|0)==154?(na=pa+4|0,(c[pa+12>>2]&8|0)==0):0)?ma>>>0>ka>>>0&qa>>>0<=ka>>>0:0){c[na>>2]=ra+la;na=(c[2553]|0)+la|0;oa=ka+8|0;ja=(oa&7|0)==0?0:0-oa&7;oa=ka+ja|0;W=na-ja|0;c[2556]=oa;c[2553]=W;c[oa+4>>2]=W|1;c[ka+na+4>>2]=40;c[2557]=c[2672];break}if(ma>>>0<(c[2554]|0)>>>0)c[2554]=ma;na=ma+la|0;W=10648;while(1){if((c[W>>2]|0)==(na|0)){L=162;break}oa=c[W+8>>2]|0;if(!oa)break;else W=oa}if((L|0)==162?(c[W+12>>2]&8|0)==0:0){c[W>>2]=ma;pa=W+4|0;c[pa>>2]=(c[pa>>2]|0)+la;pa=ma+8|0;oa=ma+((pa&7|0)==0?0:0-pa&7)|0;pa=na+8|0;ja=na+((pa&7|0)==0?0:0-pa&7)|0;pa=oa+F|0;d=ja-oa-F|0;c[oa+4>>2]=F|3;g:do if((ka|0)==(ja|0)){X=(c[2553]|0)+d|0;c[2553]=X;c[2556]=pa;c[pa+4>>2]=X|1}else{if((c[2555]|0)==(ja|0)){X=(c[2552]|0)+d|0;c[2552]=X;c[2555]=pa;c[pa+4>>2]=X|1;c[pa+X>>2]=X;break}X=c[ja+4>>2]|0;if((X&3|0)==1){ia=X&-8;ha=3?X>>>3:X;h:do if(X>>>0<256){ga=c[ja+8>>2]|0;_=c[ja+12>>2]|0;if((_|0)==(ga|0)){c[2550]=c[2550]&~(1<>2]=_;c[_+8>>2]=ga;break}}else{ga=c[ja+24>>2]|0;_=c[ja+12>>2]|0;do if((_|0)==(ja|0)){fa=ja+16|0;da=fa+4|0;f=c[da>>2]|0;if(!f){ca=c[fa>>2]|0;if(!ca){sa=0;break}else{ta=ca;ua=fa}}else{ta=f;ua=da}da=ta;f=ua;while(1){fa=da+20|0;ca=c[fa>>2]|0;if(!ca){ba=da+16|0;aa=c[ba>>2]|0;if(!aa)break;else{va=aa;wa=ba}}else{va=ca;wa=fa}da=va;f=wa}c[f>>2]=0;sa=da}else{fa=c[ja+8>>2]|0;c[fa+12>>2]=_;c[_+8>>2]=fa;sa=_}while(0);if(!ga)break;_=c[ja+28>>2]|0;g=10504+(_<<2)|0;do if((c[g>>2]|0)!=(ja|0)){fa=ga+16|0;c[((c[fa>>2]|0)==(ja|0)?fa:ga+20|0)>>2]=sa;if(!sa)break h}else{c[g>>2]=sa;if(sa|0)break;c[2551]=c[2551]&~(1<<_);break h}while(0);c[sa+24>>2]=ga;_=ja+16|0;g=c[_>>2]|0;if(g|0){c[sa+16>>2]=g;c[g+24>>2]=sa}g=c[_+4>>2]|0;if(!g)break;c[sa+20>>2]=g;c[g+24>>2]=sa}while(0);xa=ja+ia|0;ya=ia+d|0}else{xa=ja;ya=d}ha=xa+4|0;c[ha>>2]=c[ha>>2]&-2;c[pa+4>>2]=ya|1;c[pa+ya>>2]=ya;ha=3?ya>>>3:ya;if(ya>>>0<256){X=10240+(ha<<1<<2)|0;ea=c[2550]|0;g=1<>2]|0;Aa=g}c[Aa>>2]=pa;c[za+12>>2]=pa;c[pa+8>>2]=za;c[pa+12>>2]=X;break}X=8?ya>>>8:ya;do if(!X)Ba=0;else{if(ya>>>0>16777215){Ba=31;break}g=X+1048320|0;ea=(16?g>>>16:g)&8;g=X<>>16:ha)&4;ha=g<<_;g=ha+245760|0;fa=(16?g>>>16:g)&2;g=ha<>>15:g)|0;g=ha+7|0;Ba=(g?ya>>>g:ya)&1|ha<<1}while(0);X=10504+(Ba<<2)|0;c[pa+28>>2]=Ba;ia=pa+16|0;c[ia+4>>2]=0;c[ia>>2]=0;ia=c[2551]|0;ha=1<>2]=pa;c[pa+24>>2]=X;c[pa+12>>2]=pa;c[pa+8>>2]=pa;break}ha=c[X>>2]|0;i:do if((c[ha+4>>2]&-8|0)==(ya|0))Ca=ha;else{X=ya<<((Ba|0)==31?0:25-(1?Ba>>>1:Ba)|0);ia=ha;while(1){Da=ia+16+((31?X>>>31:X)<<2)|0;g=c[Da>>2]|0;if(!g)break;if((c[g+4>>2]&-8|0)==(ya|0)){Ca=g;break i}else{X=X<<1;ia=g}}c[Da>>2]=pa;c[pa+24>>2]=ia;c[pa+12>>2]=pa;c[pa+8>>2]=pa;break g}while(0);ha=Ca+8|0;X=c[ha>>2]|0;c[X+12>>2]=pa;c[ha>>2]=pa;c[pa+8>>2]=X;c[pa+12>>2]=Ca;c[pa+24>>2]=0}while(0);o=oa+8|0;Y=b;return o|0}pa=10648;while(1){d=c[pa>>2]|0;if(d>>>0<=ka>>>0?(Ea=d+(c[pa+4>>2]|0)|0,Ea>>>0>ka>>>0):0)break;pa=c[pa+8>>2]|0}pa=Ea+-47|0;oa=pa+8|0;d=pa+((oa&7|0)==0?0:0-oa&7)|0;oa=ka+16|0;pa=d>>>0>>0?ka:d;d=pa+8|0;ja=la+-40|0;na=ma+8|0;W=(na&7|0)==0?0:0-na&7;na=ma+W|0;X=ja-W|0;c[2556]=na;c[2553]=X;c[na+4>>2]=X|1;c[ma+ja+4>>2]=40;c[2557]=c[2672];ja=pa+4|0;c[ja>>2]=27;c[d>>2]=c[2662];c[d+4>>2]=c[2663];c[d+8>>2]=c[2664];c[d+12>>2]=c[2665];c[2662]=ma;c[2663]=la;c[2665]=0;c[2664]=d;d=pa+24|0;do{X=d;d=d+4|0;c[d>>2]=7}while((X+8|0)>>>0>>0);if((pa|0)!=(ka|0)){d=pa-ka|0;c[ja>>2]=c[ja>>2]&-2;c[ka+4>>2]=d|1;c[pa>>2]=d;X=3?d>>>3:d;if(d>>>0<256){na=10240+(X<<1<<2)|0;W=c[2550]|0;ha=1<>2]|0;Ga=ha}c[Ga>>2]=ka;c[Fa+12>>2]=ka;c[ka+8>>2]=Fa;c[ka+12>>2]=na;break}na=8?d>>>8:d;if(na)if(d>>>0>16777215)Ha=31;else{ha=na+1048320|0;W=(16?ha>>>16:ha)&8;ha=na<>>16:na)&4;na=ha<>>16:ha)&2;ha=na<>>15:ha)|0;ha=na+7|0;Ha=(ha?d>>>ha:d)&1|na<<1}else Ha=0;na=10504+(Ha<<2)|0;c[ka+28>>2]=Ha;c[ka+20>>2]=0;c[oa>>2]=0;ha=c[2551]|0;ga=1<>2]=ka;c[ka+24>>2]=na;c[ka+12>>2]=ka;c[ka+8>>2]=ka;break}ga=c[na>>2]|0;j:do if((c[ga+4>>2]&-8|0)==(d|0))Ia=ga;else{na=d<<((Ha|0)==31?0:25-(1?Ha>>>1:Ha)|0);ha=ga;while(1){Ja=ha+16+((31?na>>>31:na)<<2)|0;W=c[Ja>>2]|0;if(!W)break;if((c[W+4>>2]&-8|0)==(d|0)){Ia=W;break j}else{na=na<<1;ha=W}}c[Ja>>2]=ka;c[ka+24>>2]=ha;c[ka+12>>2]=ka;c[ka+8>>2]=ka;break f}while(0);d=Ia+8|0;ga=c[d>>2]|0;c[ga+12>>2]=ka;c[d>>2]=ka;c[ka+8>>2]=ga;c[ka+12>>2]=Ia;c[ka+24>>2]=0}}else{ga=c[2554]|0;if((ga|0)==0|ma>>>0>>0)c[2554]=ma;c[2662]=ma;c[2663]=la;c[2665]=0;c[2559]=c[2668];c[2558]=-1;c[2563]=10240;c[2562]=10240;c[2565]=10248;c[2564]=10248;c[2567]=10256;c[2566]=10256;c[2569]=10264;c[2568]=10264;c[2571]=10272;c[2570]=10272;c[2573]=10280;c[2572]=10280;c[2575]=10288;c[2574]=10288;c[2577]=10296;c[2576]=10296;c[2579]=10304;c[2578]=10304;c[2581]=10312;c[2580]=10312;c[2583]=10320;c[2582]=10320;c[2585]=10328;c[2584]=10328;c[2587]=10336;c[2586]=10336;c[2589]=10344;c[2588]=10344;c[2591]=10352;c[2590]=10352;c[2593]=10360;c[2592]=10360;c[2595]=10368;c[2594]=10368;c[2597]=10376;c[2596]=10376;c[2599]=10384;c[2598]=10384;c[2601]=10392;c[2600]=10392;c[2603]=10400;c[2602]=10400;c[2605]=10408;c[2604]=10408;c[2607]=10416;c[2606]=10416;c[2609]=10424;c[2608]=10424;c[2611]=10432;c[2610]=10432;c[2613]=10440;c[2612]=10440;c[2615]=10448;c[2614]=10448;c[2617]=10456;c[2616]=10456;c[2619]=10464;c[2618]=10464;c[2621]=10472;c[2620]=10472;c[2623]=10480;c[2622]=10480;c[2625]=10488;c[2624]=10488;ga=la+-40|0;d=ma+8|0;oa=(d&7|0)==0?0:0-d&7;d=ma+oa|0;pa=ga-oa|0;c[2556]=d;c[2553]=pa;c[d+4>>2]=pa|1;c[ma+ga+4>>2]=40;c[2557]=c[2672]}while(0);ma=c[2553]|0;if(ma>>>0>F>>>0){la=ma-F|0;c[2553]=la;ma=c[2556]|0;ka=ma+F|0;c[2556]=ka;c[ka+4>>2]=la|1;c[ma+4>>2]=F|3;o=ma+8|0;Y=b;return o|0}}ma=_e()|0;c[ma>>2]=12;o=0;Y=b;return o|0}function Qe(a){a=a|0;var b=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,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;if(!a)return;b=a+-8|0;d=c[2554]|0;e=c[a+-4>>2]|0;a=e&-8;f=b+a|0;do if(!(e&1)){g=c[b>>2]|0;if(!(e&3))return;h=b+(0-g)|0;i=g+a|0;if(h>>>0>>0)return;if((c[2555]|0)==(h|0)){j=f+4|0;k=c[j>>2]|0;if((k&3|0)!=3){l=h;m=i;n=h;break}c[2552]=i;c[j>>2]=k&-2;c[h+4>>2]=i|1;c[h+i>>2]=i;return}k=3?g>>>3:g;if(g>>>0<256){g=c[h+8>>2]|0;j=c[h+12>>2]|0;if((j|0)==(g|0)){c[2550]=c[2550]&~(1<>2]=j;c[j+8>>2]=g;l=h;m=i;n=h;break}}g=c[h+24>>2]|0;j=c[h+12>>2]|0;do if((j|0)==(h|0)){k=h+16|0;o=k+4|0;p=c[o>>2]|0;if(!p){q=c[k>>2]|0;if(!q){r=0;break}else{s=q;t=k}}else{s=p;t=o}o=s;p=t;while(1){k=o+20|0;q=c[k>>2]|0;if(!q){u=o+16|0;v=c[u>>2]|0;if(!v)break;else{w=v;x=u}}else{w=q;x=k}o=w;p=x}c[p>>2]=0;r=o}else{k=c[h+8>>2]|0;c[k+12>>2]=j;c[j+8>>2]=k;r=j}while(0);if(g){j=c[h+28>>2]|0;k=10504+(j<<2)|0;if((c[k>>2]|0)==(h|0)){c[k>>2]=r;if(!r){c[2551]=c[2551]&~(1<>2]|0)==(h|0)?j:g+20|0)>>2]=r;if(!r){l=h;m=i;n=h;break}}c[r+24>>2]=g;j=h+16|0;k=c[j>>2]|0;if(k|0){c[r+16>>2]=k;c[k+24>>2]=r}k=c[j+4>>2]|0;if(k){c[r+20>>2]=k;c[k+24>>2]=r;l=h;m=i;n=h}else{l=h;m=i;n=h}}else{l=h;m=i;n=h}}else{l=b;m=a;n=b}while(0);if(n>>>0>=f>>>0)return;b=f+4|0;a=c[b>>2]|0;if(!(a&1))return;if(!(a&2)){if((c[2556]|0)==(f|0)){r=(c[2553]|0)+m|0;c[2553]=r;c[2556]=l;c[l+4>>2]=r|1;if((l|0)!=(c[2555]|0))return;c[2555]=0;c[2552]=0;return}if((c[2555]|0)==(f|0)){r=(c[2552]|0)+m|0;c[2552]=r;c[2555]=n;c[l+4>>2]=r|1;c[n+r>>2]=r;return}r=(a&-8)+m|0;x=3?a>>>3:a;do if(a>>>0<256){w=c[f+8>>2]|0;t=c[f+12>>2]|0;if((t|0)==(w|0)){c[2550]=c[2550]&~(1<>2]=t;c[t+8>>2]=w;break}}else{w=c[f+24>>2]|0;t=c[f+12>>2]|0;do if((t|0)==(f|0)){s=f+16|0;d=s+4|0;e=c[d>>2]|0;if(!e){k=c[s>>2]|0;if(!k){y=0;break}else{z=k;A=s}}else{z=e;A=d}d=z;e=A;while(1){s=d+20|0;k=c[s>>2]|0;if(!k){j=d+16|0;q=c[j>>2]|0;if(!q)break;else{B=q;C=j}}else{B=k;C=s}d=B;e=C}c[e>>2]=0;y=d}else{o=c[f+8>>2]|0;c[o+12>>2]=t;c[t+8>>2]=o;y=t}while(0);if(w|0){t=c[f+28>>2]|0;h=10504+(t<<2)|0;if((c[h>>2]|0)==(f|0)){c[h>>2]=y;if(!y){c[2551]=c[2551]&~(1<>2]|0)==(f|0)?t:w+20|0)>>2]=y;if(!y)break}c[y+24>>2]=w;t=f+16|0;h=c[t>>2]|0;if(h|0){c[y+16>>2]=h;c[h+24>>2]=y}h=c[t+4>>2]|0;if(h|0){c[y+20>>2]=h;c[h+24>>2]=y}}}while(0);c[l+4>>2]=r|1;c[n+r>>2]=r;if((l|0)==(c[2555]|0)){c[2552]=r;return}else D=r}else{c[b>>2]=a&-2;c[l+4>>2]=m|1;c[n+m>>2]=m;D=m}m=3?D>>>3:D;if(D>>>0<256){n=10240+(m<<1<<2)|0;a=c[2550]|0;b=1<>2]|0;F=b}c[F>>2]=l;c[E+12>>2]=l;c[l+8>>2]=E;c[l+12>>2]=n;return}n=8?D>>>8:D;if(n)if(D>>>0>16777215)G=31;else{E=n+1048320|0;F=(16?E>>>16:E)&8;E=n<>>16:n)&4;n=E<>>16:E)&2;E=n<>>15:E)|0;E=n+7|0;G=(E?D>>>E:D)&1|n<<1}else G=0;n=10504+(G<<2)|0;c[l+28>>2]=G;c[l+20>>2]=0;c[l+16>>2]=0;E=c[2551]|0;a=1<>2]=l;c[l+24>>2]=n;c[l+12>>2]=l;c[l+8>>2]=l}else{F=c[n>>2]|0;b:do if((c[F+4>>2]&-8|0)==(D|0))H=F;else{b=D<<((G|0)==31?0:25-(1?G>>>1:G)|0);m=F;while(1){I=m+16+((31?b>>>31:b)<<2)|0;r=c[I>>2]|0;if(!r)break;if((c[r+4>>2]&-8|0)==(D|0)){H=r;break b}else{b=b<<1;m=r}}c[I>>2]=l;c[l+24>>2]=m;c[l+12>>2]=l;c[l+8>>2]=l;break a}while(0);F=H+8|0;w=c[F>>2]|0;c[w+12>>2]=l;c[F>>2]=l;c[l+8>>2]=w;c[l+12>>2]=H;c[l+24>>2]=0}while(0);l=(c[2558]|0)+-1|0;c[2558]=l;if(l|0)return;l=10656;while(1){H=c[l>>2]|0;if(!H)break;else l=H+8|0}c[2558]=-1;return}function Re(a,b){a=a|0;b=b|0;var d=0,e=0;if(a){d=r(b,a)|0;if((b|a)>>>0>65535)e=((d>>>0)/(a>>>0)|0|0)==(b|0)?d:-1;else e=d}else e=0;d=Pe(e)|0;if(!d)return d|0;if(!(c[d+-4>>2]&3))return d|0;Nf(d|0,0,e|0)|0;return d|0}function Se(a,b){a=a|0;b=b|0;return 0}function Te(a){a=a|0;return 0}function Ue(a){a=a|0;return 0}function Ve(a){a=a|0;return 0}function We(a){a=a|0;var b=0,d=0,e=0;b=Y;Y=Y+16|0;d=b;e=$e(c[a+60>>2]|0)|0;c[d>>2]=e;e=Ze(I(6,d|0)|0)|0;Y=b;return e|0}function Xe(a,b,d){a=a|0;b=b|0;d=d|0;var 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;e=Y;Y=Y+48|0;f=e+32|0;g=e+16|0;h=e;i=a+28|0;j=c[i>>2]|0;c[h>>2]=j;k=a+20|0;l=(c[k>>2]|0)-j|0;c[h+4>>2]=l;c[h+8>>2]=b;c[h+12>>2]=d;b=l+d|0;l=a+60|0;c[g>>2]=c[l>>2];c[g+4>>2]=h;c[g+8>>2]=2;j=Ze(H(146,g|0)|0)|0;a:do if((b|0)!=(j|0)){g=2;m=b;n=h;o=j;while(1){if((o|0)<0)break;m=m-o|0;p=c[n+4>>2]|0;q=o>>>0>p>>>0;r=q?n+8|0:n;s=g+(q<<31>>31)|0;t=o-(q?p:0)|0;c[r>>2]=(c[r>>2]|0)+t;p=r+4|0;c[p>>2]=(c[p>>2]|0)-t;c[f>>2]=c[l>>2];c[f+4>>2]=r;c[f+8>>2]=s;o=Ze(H(146,f|0)|0)|0;if((m|0)==(o|0)){u=3;break a}else{g=s;n=r}}c[a+16>>2]=0;c[i>>2]=0;c[k>>2]=0;c[a>>2]=c[a>>2]|32;if((g|0)==2)v=0;else v=d-(c[n+4>>2]|0)|0}else u=3;while(0);if((u|0)==3){u=c[a+44>>2]|0;c[a+16>>2]=u+(c[a+48>>2]|0);a=u;c[i>>2]=a;c[k>>2]=a;v=d}Y=e;return v|0}function Ye(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=Y;Y=Y+32|0;f=e;g=e+20|0;c[f>>2]=c[a+60>>2];c[f+4>>2]=0;c[f+8>>2]=b;c[f+12>>2]=g;c[f+16>>2]=d;if((Ze(G(140,f|0)|0)|0)<0){c[g>>2]=-1;h=-1}else h=c[g>>2]|0;Y=e;return h|0}function Ze(a){a=a|0;var b=0,d=0;if(a>>>0>4294963200){b=_e()|0;c[b>>2]=0-a;d=-1}else d=a;return d|0}function _e(){return 10696}function $e(a){a=a|0;return a|0}function af(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:do if(!d)e=0;else{f=b;g=d;h=c;while(1){i=a[f>>0]|0;j=a[h>>0]|0;if(i<<24>>24!=j<<24>>24)break;g=g+-1|0;if(!g){e=0;break a}else{f=f+1|0;h=h+1|0}}e=(i&255)-(j&255)|0}while(0);return e|0}function bf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=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;f=d&255;g=(e|0)!=0;a:do if(g&(b&3|0)!=0){h=d&255;i=b;j=e;while(1){if((a[i>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=i+1|0;o=j+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=n;j=o}else{q=n;s=o;t=p;m=5;break}}}else{q=b;s=e;t=g;m=5}while(0);if((m|0)==5)if(t){k=q;l=s;m=6}else m=16;b:do if((m|0)==6){s=d&255;if((a[k>>0]|0)==s<<24>>24)if(!l){m=16;break}else{u=k;break}q=r(f,16843009)|0;c:do if(l>>>0>3){t=k;g=l;while(1){e=c[t>>2]^q;if((e&-2139062144^-2139062144)&e+-16843009|0){v=g;w=t;break c}e=t+4|0;b=g+-4|0;if(b>>>0>3){t=e;g=b}else{x=e;y=b;m=11;break}}}else{x=k;y=l;m=11}while(0);if((m|0)==11)if(!y){m=16;break}else{v=y;w=x}q=w;g=v;while(1){if((a[q>>0]|0)==s<<24>>24){u=q;break b}g=g+-1|0;if(!g){m=16;break}else q=q+1|0}}while(0);if((m|0)==16)u=0;return u|0}function cf(){return 8300}function df(a){a=a|0;return (a+-48|0)>>>0<10|0}function ef(b,d,e){b=b|0;d=d|0;e=e|0;var 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;f=Y;Y=Y+224|0;g=f+208|0;h=f+160|0;i=f+80|0;j=f;k=h;l=k+40|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0));c[g>>2]=c[e>>2];if((ff(0,d,g,i,h)|0)<0)m=-1;else{if((c[b+76>>2]|0)>-1)n=gf(b)|0;else n=0;e=c[b>>2]|0;k=e&32;if((a[b+74>>0]|0)<1)c[b>>2]=e&-33;e=b+48|0;if(!(c[e>>2]|0)){l=b+44|0;o=c[l>>2]|0;c[l>>2]=j;p=b+28|0;c[p>>2]=j;q=b+20|0;c[q>>2]=j;c[e>>2]=80;r=b+16|0;c[r>>2]=j+80;j=ff(b,d,g,i,h)|0;if(!o)s=j;else{ca[c[b+36>>2]&15](b,0,0)|0;t=(c[q>>2]|0)==0?-1:j;c[l>>2]=o;c[e>>2]=0;c[r>>2]=0;c[p>>2]=0;c[q>>2]=0;s=t}}else s=ff(b,d,g,i,h)|0;h=c[b>>2]|0;c[b>>2]=h|k;if(n|0)hf(b);m=(h&32|0)==0?s:-1}Y=f;return m|0}function ff(d,e,f,h,i){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=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,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;j=Y;Y=Y+64|0;k=j+56|0;l=j+40|0;m=j;n=j+48|0;o=j+60|0;c[k>>2]=e;e=(d|0)!=0;p=m+40|0;q=p;r=m+39|0;m=n+4|0;s=0;t=0;u=0;a:while(1){w=s;x=t;while(1){do if((x|0)>-1)if((w|0)>(2147483647-x|0)){y=_e()|0;c[y>>2]=75;z=-1;break}else{z=w+x|0;break}else z=x;while(0);A=c[k>>2]|0;y=a[A>>0]|0;if(!(y<<24>>24)){B=92;break a}C=y;y=A;b:while(1){switch(C<<24>>24){case 37:{B=10;break b;break}case 0:{D=y;break b;break}default:{}}E=y+1|0;c[k>>2]=E;C=a[E>>0]|0;y=E}c:do if((B|0)==10){B=0;C=y;E=y;while(1){if((a[E+1>>0]|0)!=37){D=C;break c}F=C+1|0;E=E+2|0;c[k>>2]=E;if((a[E>>0]|0)!=37){D=F;break}else C=F}}while(0);w=D-A|0;if(e)jf(d,A,w);if(!w)break;else x=z}x=(df(a[(c[k>>2]|0)+1>>0]|0)|0)==0;w=c[k>>2]|0;if(!x?(a[w+2>>0]|0)==36:0){G=(a[w+1>>0]|0)+-48|0;H=1;I=3}else{G=-1;H=u;I=1}x=w+I|0;c[k>>2]=x;w=a[x>>0]|0;y=(w<<24>>24)+-32|0;if(y>>>0>31|(1<>2]=E;F=a[E>>0]|0;C=(F<<24>>24)+-32|0;if(C>>>0>31|(1<>24==42){if((df(a[L+1>>0]|0)|0)!=0?(y=c[k>>2]|0,(a[y+2>>0]|0)==36):0){w=y+1|0;c[i+((a[w>>0]|0)+-48<<2)>>2]=10;M=c[h+((a[w>>0]|0)+-48<<3)>>2]|0;N=1;O=y+3|0}else{if(H|0){P=-1;break}if(e){y=(c[f>>2]|0)+(4-1)&~(4-1);w=c[y>>2]|0;c[f>>2]=y+4;Q=w}else Q=0;M=Q;N=0;O=(c[k>>2]|0)+1|0}c[k>>2]=O;w=(M|0)<0;R=w?0-M|0:M;S=w?J|8192:J;T=N;U=O}else{w=kf(k)|0;if((w|0)<0){P=-1;break}R=w;S=J;T=H;U=c[k>>2]|0}do if((a[U>>0]|0)==46){w=U+1|0;if((a[w>>0]|0)!=42){c[k>>2]=w;w=kf(k)|0;V=w;W=c[k>>2]|0;break}if(df(a[U+2>>0]|0)|0?(w=c[k>>2]|0,(a[w+3>>0]|0)==36):0){y=w+2|0;c[i+((a[y>>0]|0)+-48<<2)>>2]=10;C=c[h+((a[y>>0]|0)+-48<<3)>>2]|0;y=w+4|0;c[k>>2]=y;V=C;W=y;break}if(T|0){P=-1;break a}if(e){y=(c[f>>2]|0)+(4-1)&~(4-1);C=c[y>>2]|0;c[f>>2]=y+4;X=C}else X=0;C=(c[k>>2]|0)+2|0;c[k>>2]=C;V=X;W=C}else{V=-1;W=U}while(0);C=0;y=W;while(1){if(((a[y>>0]|0)+-65|0)>>>0>57){P=-1;break a}w=y;y=y+1|0;c[k>>2]=y;Z=a[(a[w>>0]|0)+-65+(7616+(C*58|0))>>0]|0;_=Z&255;if((_+-1|0)>>>0>=8)break;else C=_}if(!(Z<<24>>24)){P=-1;break}w=(G|0)>-1;do if(Z<<24>>24==19)if(w){P=-1;break a}else B=54;else{if(w){c[i+(G<<2)>>2]=_;E=h+(G<<3)|0;x=c[E+4>>2]|0;F=l;c[F>>2]=c[E>>2];c[F+4>>2]=x;B=54;break}if(!e){P=0;break a}lf(l,_,f);$=c[k>>2]|0;B=55}while(0);if((B|0)==54){B=0;if(e){$=y;B=55}else aa=0}d:do if((B|0)==55){B=0;w=a[$+-1>>0]|0;x=(C|0)!=0&(w&15|0)==3?w&-33:w;w=S&-65537;F=(S&8192|0)==0?S:w;e:do switch(x|0){case 110:{switch((C&255)<<24>>24){case 0:{c[c[l>>2]>>2]=z;aa=0;break d;break}case 1:{c[c[l>>2]>>2]=z;aa=0;break d;break}case 2:{E=c[l>>2]|0;c[E>>2]=z;c[E+4>>2]=((z|0)<0)<<31>>31;aa=0;break d;break}case 3:{b[c[l>>2]>>1]=z;aa=0;break d;break}case 4:{a[c[l>>2]>>0]=z;aa=0;break d;break}case 6:{c[c[l>>2]>>2]=z;aa=0;break d;break}case 7:{E=c[l>>2]|0;c[E>>2]=z;c[E+4>>2]=((z|0)<0)<<31>>31;aa=0;break d;break}default:{aa=0;break d}}break}case 112:{ba=120;ca=V>>>0>8?V:8;da=F|8;B=67;break}case 88:case 120:{ba=x;ca=V;da=F;B=67;break}case 111:{E=l;ea=c[E>>2]|0;fa=c[E+4>>2]|0;E=nf(ea,fa,p)|0;ga=q-E|0;ha=E;ia=0;ja=9285;ka=(F&8|0)==0|(V|0)>(ga|0)?V:ga+1|0;la=F;ma=ea;na=fa;B=73;break}case 105:case 100:{fa=l;ea=c[fa>>2]|0;ga=c[fa+4>>2]|0;if((ga|0)<0){fa=Ef(0,0,ea|0,ga|0)|0;E=v()|0;oa=l;c[oa>>2]=fa;c[oa+4>>2]=E;pa=1;qa=9285;ra=fa;sa=E;B=72;break e}else{pa=(F&2049|0)!=0&1;qa=(F&2048|0)==0?((F&1|0)==0?9285:9287):9286;ra=ea;sa=ga;B=72;break e}break}case 117:{ga=l;pa=0;qa=9285;ra=c[ga>>2]|0;sa=c[ga+4>>2]|0;B=72;break}case 99:{a[r>>0]=c[l>>2];ta=r;ua=0;va=9285;wa=1;xa=w;ya=q;break}case 115:{ga=c[l>>2]|0;ea=(ga|0)==0?9295:ga;ga=bf(ea,0,V)|0;E=(ga|0)==0;ta=ea;ua=0;va=9285;wa=E?V:ga-ea|0;xa=w;ya=E?ea+V|0:ga;break}case 67:{c[n>>2]=c[l>>2];c[m>>2]=0;c[l>>2]=n;za=-1;B=79;break}case 83:{if(!V){pf(d,32,R,0,F);Aa=0;B=89}else{za=V;B=79}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{aa=rf(d,+g[l>>3],R,V,F,x)|0;break d;break}default:{ta=A;ua=0;va=9285;wa=V;xa=F;ya=q}}while(0);f:do if((B|0)==67){B=0;x=l;w=c[x>>2]|0;ga=c[x+4>>2]|0;x=mf(w,ga,p,ba&32)|0;ea=(da&8|0)==0|(w|0)==0&(ga|0)==0;ha=x;ia=ea?0:2;ja=ea?9285:9285+(4?ba>>>4:ba)|0;ka=ca;la=da;ma=w;na=ga;B=73}else if((B|0)==72){B=0;ha=of(ra,sa,p)|0;ia=pa;ja=qa;ka=V;la=F;ma=ra;na=sa;B=73}else if((B|0)==79){B=0;ga=c[l>>2]|0;w=0;while(1){ea=c[ga>>2]|0;if(!ea){Ba=w;break}x=qf(o,ea)|0;Ca=(x|0)<0;if(Ca|x>>>0>(za-w|0)>>>0){B=83;break}ea=x+w|0;if(za>>>0>ea>>>0){ga=ga+4|0;w=ea}else{Ba=ea;break}}if((B|0)==83){B=0;if(Ca){P=-1;break a}else Ba=w}pf(d,32,R,Ba,F);if(!Ba){Aa=0;B=89}else{ga=c[l>>2]|0;ea=0;while(1){x=c[ga>>2]|0;if(!x){Aa=Ba;B=89;break f}E=qf(o,x)|0;ea=E+ea|0;if((ea|0)>(Ba|0)){Aa=Ba;B=89;break f}jf(d,o,E);if(ea>>>0>=Ba>>>0){Aa=Ba;B=89;break}else ga=ga+4|0}}}while(0);if((B|0)==73){B=0;ga=(ma|0)!=0|(na|0)!=0;ea=(ka|0)!=0|ga;w=q-ha+((ga^1)&1)|0;ta=ea?ha:p;ua=ia;va=ja;wa=ea?((ka|0)>(w|0)?ka:w):0;xa=(ka|0)>-1?la&-65537:la;ya=q}else if((B|0)==89){B=0;pf(d,32,R,Aa,F^8192);aa=(R|0)>(Aa|0)?R:Aa;break}w=ya-ta|0;ea=(wa|0)<(w|0)?w:wa;ga=ea+ua|0;E=(R|0)<(ga|0)?ga:R;pf(d,32,E,ga,xa);jf(d,va,ua);pf(d,48,E,ga,xa^65536);pf(d,48,ea,w,0);jf(d,ta,w);pf(d,32,E,ga,xa^8192);aa=E}while(0);s=aa;t=z;u=T}g:do if((B|0)==92)if(!d)if(!u)P=0;else{T=1;while(1){t=c[i+(T<<2)>>2]|0;if(!t)break;lf(h+(T<<3)|0,t,f);t=T+1|0;if(t>>>0<10)T=t;else{P=1;break g}}t=T;while(1){if(c[i+(t<<2)>>2]|0){P=-1;break g}t=t+1|0;if(t>>>0>=10){P=1;break}}}else P=z;while(0);Y=j;return P|0}function gf(a){a=a|0;return 1}function hf(a){a=a|0;return}function jf(a,b,d){a=a|0;b=b|0;d=d|0;if(!(c[a>>2]&32))xf(b,d,a)|0;return}function kf(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;if(!(df(a[c[b>>2]>>0]|0)|0))d=0;else{e=0;while(1){f=c[b>>2]|0;g=(e*10|0)+-48+(a[f>>0]|0)|0;h=f+1|0;c[b>>2]=h;if(!(df(a[h>>0]|0)|0)){d=g;break}else e=g}}return d|0}function lf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=f;break a;break}case 10:{f=(c[d>>2]|0)+(4-1)&~(4-1);e=c[f>>2]|0;c[d>>2]=f+4;f=a;c[f>>2]=e;c[f+4>>2]=((e|0)<0)<<31>>31;break a;break}case 11:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;e=a;c[e>>2]=f;c[e+4>>2]=0;break a;break}case 12:{e=(c[d>>2]|0)+(8-1)&~(8-1);f=e;h=c[f>>2]|0;i=c[f+4>>2]|0;c[d>>2]=e+8;e=a;c[e>>2]=h;c[e+4>>2]=i;break a;break}case 13:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=(e&65535)<<16>>16;e=a;c[e>>2]=i;c[e+4>>2]=((i|0)<0)<<31>>31;break a;break}case 14:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=a;c[i>>2]=e&65535;c[i+4>>2]=0;break a;break}case 15:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=(e&255)<<24>>24;e=a;c[e>>2]=i;c[e+4>>2]=((i|0)<0)<<31>>31;break a;break}case 16:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=a;c[i>>2]=e&255;c[i+4>>2]=0;break a;break}case 17:{i=(c[d>>2]|0)+(8-1)&~(8-1);j=+g[i>>3];c[d>>2]=i+8;g[a>>3]=j;break a;break}case 18:{i=(c[d>>2]|0)+(8-1)&~(8-1);j=+g[i>>3];c[d>>2]=i+8;g[a>>3]=j;break a;break}default:break a}while(0);while(0);return}function mf(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0;if((b|0)==0&(c|0)==0)g=e;else{h=e;e=c;c=b;while(1){b=h+-1|0;a[b>>0]=d[8080+(c&15)>>0]|0|f;c=If(c|0,e|0,4)|0;e=v()|0;if((c|0)==0&(e|0)==0){g=b;break}else h=b}}return g|0}function nf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;if((b|0)==0&(c|0)==0)e=d;else{f=d;d=c;c=b;while(1){b=f+-1|0;a[b>>0]=c&7|48;c=If(c|0,d|0,3)|0;d=v()|0;if((c|0)==0&(d|0)==0){e=b;break}else f=b}}return e|0}function of(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if(c>>>0>0|(c|0)==0&b>>>0>4294967295){e=d;f=b;g=c;do{c=f;f=Hf(f|0,g|0,10,0)|0;h=g;g=v()|0;i=Cf(f|0,g|0,10,0)|0;j=Ef(c|0,h|0,i|0,v()|0)|0;v()|0;e=e+-1|0;a[e>>0]=j&255|48}while(h>>>0>9|(h|0)==9&c>>>0>4294967295);k=f;l=e}else{k=b;l=d}if(!k)m=l;else{d=k;k=l;while(1){l=d;d=(d>>>0)/10|0;b=k+-1|0;a[b>>0]=l-(d*10|0)|48;if(l>>>0<10){m=b;break}else k=b}}return m|0}function pf(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;f=Y;Y=Y+256|0;g=f;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;Nf(g|0,b<<24>>24|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;d=e;do{jf(a,g,256);d=d+-256|0}while(d>>>0>255);h=b&255}else h=e;jf(a,g,h)}Y=f;return}function qf(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=vf(a,b,0)|0;return c|0}function rf(b,e,f,g,h,i){b=b|0;e=+e;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0.0,u=0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0,H=0,I=0,J=0.0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0.0,ja=0.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;j=Y;Y=Y+560|0;k=j+32|0;l=j+536|0;m=j;n=m;o=j+540|0;c[l>>2]=0;p=o+12|0;q=sf(e)|0;s=v()|0;if((s|0)<0){t=-e;u=sf(t)|0;w=t;x=1;y=9302;z=v()|0;A=u}else{w=e;x=(h&2049|0)!=0&1;y=(h&2048|0)==0?((h&1|0)==0?9303:9308):9305;z=s;A=q}do if(0==0&(z&2146435072|0)==2146435072){q=(i&32|0)!=0;A=x+3|0;pf(b,32,f,A,h&-65537);jf(b,y,x);jf(b,w!=w|0.0!=0.0?(q?9329:9333):q?9321:9325,3);pf(b,32,f,A,h^8192);B=A}else{e=+tf(w,l)*2.0;A=e!=0.0;if(A)c[l>>2]=(c[l>>2]|0)+-1;q=i|32;if((q|0)==97){s=i&32;u=(s|0)==0?y:y+9|0;C=x|2;D=12-g|0;do if(!(g>>>0>11|(D|0)==0)){t=8.0;E=D;do{E=E+-1|0;t=t*16.0}while((E|0)!=0);if((a[u>>0]|0)==45){F=-(t+(-e-t));break}else{F=e+t-t;break}}else F=e;while(0);D=c[l>>2]|0;E=(D|0)<0?0-D|0:D;G=of(E,((E|0)<0)<<31>>31,p)|0;if((G|0)==(p|0)){E=o+11|0;a[E>>0]=48;H=E}else H=G;a[H+-1>>0]=((31?D>>31:D)&2)+43;D=H+-2|0;a[D>>0]=i+15;G=(g|0)<1;E=(h&8|0)==0;I=m;J=F;while(1){K=~~J;L=I+1|0;a[I>>0]=s|d[8080+K>>0];J=(J-+(K|0))*16.0;if((L-n|0)==1?!(E&(G&J==0.0)):0){a[L>>0]=46;M=I+2|0}else M=L;if(!(J!=0.0))break;else I=M}I=M;if((g|0)!=0?(-2-n+I|0)<(g|0):0){G=p;E=D;N=g+2+G-E|0;O=G;P=E}else{E=p;G=D;N=E-n-G+I|0;O=E;P=G}G=N+C|0;pf(b,32,f,G,h);jf(b,u,C);pf(b,48,f,G,h^65536);E=I-n|0;jf(b,m,E);I=O-P|0;pf(b,48,N-(E+I)|0,0,0);jf(b,D,I);pf(b,32,f,G,h^8192);B=G;break}G=(g|0)<0?6:g;if(A){I=(c[l>>2]|0)+-28|0;c[l>>2]=I;Q=e*268435456.0;R=I}else{Q=e;R=c[l>>2]|0}I=(R|0)<0?k:k+288|0;E=I;J=Q;do{s=~~J>>>0;c[E>>2]=s;E=E+4|0;J=(J-+(s>>>0))*1.0e9}while(J!=0.0);A=I;if((R|0)>0){D=I;C=E;u=R;while(1){s=(u|0)<29?u:29;L=C+-4|0;if(L>>>0>=D>>>0){K=L;L=0;do{S=Jf(c[K>>2]|0,0,s|0)|0;T=Df(S|0,v()|0,L|0,0)|0;S=v()|0;L=Hf(T|0,S|0,1e9,0)|0;U=Cf(L|0,v()|0,1e9,0)|0;V=Ef(T|0,S|0,U|0,v()|0)|0;v()|0;c[K>>2]=V;K=K+-4|0}while(K>>>0>=D>>>0);if(L){K=D+-4|0;c[K>>2]=L;W=K}else W=D}else W=D;a:do if(C>>>0>W>>>0){K=C;while(1){V=K+-4|0;if(c[V>>2]|0){X=K;break a}if(V>>>0>W>>>0)K=V;else{X=V;break}}}else X=C;while(0);L=(c[l>>2]|0)-s|0;c[l>>2]=L;if((L|0)>0){D=W;C=X;u=L}else{Z=W;_=X;$=L;break}}}else{Z=I;_=E;$=R}if(($|0)<0){u=((G+25|0)/9|0)+1|0;C=(q|0)==102;D=Z;L=_;K=$;while(1){V=0-K|0;U=(V|0)<9?V:9;if(D>>>0>>0){V=(1<>>U:1e9;T=0;aa=D;do{ba=c[aa>>2]|0;c[aa>>2]=(U?ba>>>U:ba)+T;T=r(ba&V,S)|0;aa=aa+4|0}while(aa>>>0>>0);aa=(c[D>>2]|0)==0?D+4|0:D;if(!T){ca=L;da=aa}else{c[L>>2]=T;ca=L+4|0;da=aa}}else{ca=L;da=(c[D>>2]|0)==0?D+4|0:D}aa=C?I:da;S=ca-aa|0;V=((2?S>>2:S)|0)>(u|0)?aa+(u<<2)|0:ca;K=(c[l>>2]|0)+U|0;c[l>>2]=K;if((K|0)>=0){ea=da;fa=V;break}else{D=da;L=V}}}else{ea=Z;fa=_}if(ea>>>0>>0){L=A-ea|0;D=(2?L>>2:L)*9|0;L=c[ea>>2]|0;if(L>>>0<10)ga=D;else{K=D;D=10;while(1){D=D*10|0;u=K+1|0;if(L>>>0>>0){ga=u;break}else K=u}}}else ga=0;K=(q|0)==103;D=(G|0)!=0;L=G-((q|0)==102?0:ga)+((D&K)<<31>>31)|0;u=fa-A|0;if((L|0)<(((2?u>>2:u)*9|0)+-9|0)){u=L+9216|0;L=(u|0)/9|0;C=I+4+(L+-1024<<2)|0;E=u-(L*9|0)|0;if((E|0)<8){L=E;E=10;while(1){u=E*10|0;if((L|0)<7){L=L+1|0;E=u}else{ha=u;break}}}else ha=10;E=c[C>>2]|0;L=(E>>>0)/(ha>>>0)|0;q=E-(r(L,ha)|0)|0;u=(C+4|0)==(fa|0);if(!(u&(q|0)==0)){t=(L&1|0)==0?9007199254740992.0:9007199254740994.0;L=1?ha>>>1:ha;J=q>>>0>>0?.5:u&(q|0)==(L|0)?1.0:1.5;if(!x){ia=J;ja=t}else{L=(a[y>>0]|0)==45;ia=L?-J:J;ja=L?-t:t}L=E-q|0;c[C>>2]=L;if(ja+ia!=ja){q=L+ha|0;c[C>>2]=q;if(q>>>0>999999999){q=C;L=ea;while(1){E=q+-4|0;c[q>>2]=0;if(E>>>0>>0){u=L+-4|0;c[u>>2]=0;ka=u}else ka=L;u=(c[E>>2]|0)+1|0;c[E>>2]=u;if(u>>>0>999999999){q=E;L=ka}else{la=E;ma=ka;break}}}else{la=C;ma=ea}L=A-ma|0;q=(2?L>>2:L)*9|0;L=c[ma>>2]|0;if(L>>>0<10){na=la;oa=q;pa=ma}else{E=q;q=10;while(1){q=q*10|0;u=E+1|0;if(L>>>0>>0){na=la;oa=u;pa=ma;break}else E=u}}}else{na=C;oa=ga;pa=ea}}else{na=C;oa=ga;pa=ea}E=na+4|0;qa=oa;ra=fa>>>0>E>>>0?E:fa;sa=pa}else{qa=ga;ra=fa;sa=ea}E=0-qa|0;b:do if(ra>>>0>sa>>>0){q=ra;while(1){L=q+-4|0;if(c[L>>2]|0){ta=q;ua=1;break b}if(L>>>0>sa>>>0)q=L;else{ta=L;ua=0;break}}}else{ta=ra;ua=0}while(0);do if(K){C=G+((D^1)&1)|0;if((C|0)>(qa|0)&(qa|0)>-5){va=i+-1|0;wa=C+-1-qa|0}else{va=i+-2|0;wa=C+-1|0}if(!(h&8)){if(ua?(C=c[ta+-4>>2]|0,(C|0)!=0):0)if(!((C>>>0)%10|0)){q=0;U=10;while(1){U=U*10|0;T=q+1|0;if((C>>>0)%(U>>>0)|0|0){xa=T;break}else q=T}}else xa=0;else xa=9;q=ta-A|0;U=((2?q>>2:q)*9|0)+-9|0;if((va|32|0)==102){q=U-xa|0;C=(q|0)>0?q:0;ya=va;za=(wa|0)<(C|0)?wa:C;break}else{C=U+qa-xa|0;U=(C|0)>0?C:0;ya=va;za=(wa|0)<(U|0)?wa:U;break}}else{ya=va;za=wa}}else{ya=i;za=G}while(0);G=(za|0)!=0;A=G?1:(3?h>>>3:h)&1;D=(ya|32|0)==102;if(D){Aa=0;Ba=(qa|0)>0?qa:0}else{K=(qa|0)<0?E:qa;U=of(K,((K|0)<0)<<31>>31,p)|0;K=p;if((K-U|0)<2){C=U;while(1){q=C+-1|0;a[q>>0]=48;if((K-q|0)<2)C=q;else{Ca=q;break}}}else Ca=U;a[Ca+-1>>0]=((31?qa>>31:qa)&2)+43;C=Ca+-2|0;a[C>>0]=ya;Aa=C;Ba=K-C|0}C=x+1+za+A+Ba|0;pf(b,32,f,C,h);jf(b,y,x);pf(b,48,f,C,h^65536);if(D){E=sa>>>0>I>>>0?I:sa;q=m+9|0;T=q;L=m+8|0;u=E;do{V=of(c[u>>2]|0,0,q)|0;if((u|0)==(E|0))if((V|0)==(q|0)){a[L>>0]=48;Da=L}else Da=V;else if(V>>>0>m>>>0){Nf(m|0,48,V-n|0)|0;aa=V;while(1){S=aa+-1|0;if(S>>>0>m>>>0)aa=S;else{Da=S;break}}}else Da=V;jf(b,Da,T-Da|0);u=u+4|0}while(u>>>0<=I>>>0);if(!((h&8|0)==0&(G^1)))jf(b,9337,1);if(u>>>0>>0&(za|0)>0){I=za;T=u;while(1){L=of(c[T>>2]|0,0,q)|0;if(L>>>0>m>>>0){Nf(m|0,48,L-n|0)|0;E=L;while(1){D=E+-1|0;if(D>>>0>m>>>0)E=D;else{Ea=D;break}}}else Ea=L;jf(b,Ea,(I|0)<9?I:9);T=T+4|0;E=I+-9|0;if(!(T>>>0>>0&(I|0)>9)){Fa=E;break}else I=E}}else Fa=za;pf(b,48,Fa+9|0,9,0)}else{I=ua?ta:sa+4|0;if(sa>>>0>>0&(za|0)>-1){T=m+9|0;q=(h&8|0)==0;u=T;G=0-n|0;E=m+8|0;V=za;D=sa;while(1){A=of(c[D>>2]|0,0,T)|0;if((A|0)==(T|0)){a[E>>0]=48;Ga=E}else Ga=A;do if((D|0)==(sa|0)){A=Ga+1|0;jf(b,Ga,1);if(q&(V|0)<1){Ha=A;break}jf(b,9337,1);Ha=A}else{if(Ga>>>0<=m>>>0){Ha=Ga;break}Nf(m|0,48,Ga+G|0)|0;A=Ga;while(1){K=A+-1|0;if(K>>>0>m>>>0)A=K;else{Ha=K;break}}}while(0);L=u-Ha|0;jf(b,Ha,(V|0)>(L|0)?L:V);A=V-L|0;D=D+4|0;if(!(D>>>0>>0&(A|0)>-1)){Ia=A;break}else V=A}}else Ia=za;pf(b,48,Ia+18|0,18,0);jf(b,Aa,p-Aa|0)}pf(b,32,f,C,h^8192);B=C}while(0);Y=j;return ((B|0)<(f|0)?f:B)|0}function sf(a){a=+a;var b=0;g[h>>3]=a;b=c[h>>2]|0;u(c[h+4>>2]|0);return b|0}function tf(a,b){a=+a;b=b|0;return +(+uf(a,b))}function uf(a,b){a=+a;b=b|0;var d=0,e=0,f=0,i=0.0,j=0.0,k=0,l=0.0;g[h>>3]=a;d=c[h>>2]|0;e=c[h+4>>2]|0;f=If(d|0,e|0,52)|0;v()|0;switch(f&2047){case 0:{if(a!=0.0){i=+uf(a*18446744073709551616.0,b);j=i;k=(c[b>>2]|0)+-64|0}else{j=a;k=0}c[b>>2]=k;l=j;break}case 2047:{l=a;break}default:{c[b>>2]=(f&2047)+-1022;c[h>>2]=d;c[h+4>>2]=e&-2146435073|1071644672;l=+g[h>>3]}}return +l}function vf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;do if(b){if(d>>>0<128){a[b>>0]=d;f=1;break}e=(wf()|0)+188|0;if(!(c[c[e>>2]>>2]|0))if((d&-128|0)==57216){a[b>>0]=d;f=1;break}else{e=_e()|0;c[e>>2]=84;f=-1;break}if(d>>>0<2048){a[b>>0]=(6?d>>>6:d)|192;a[b+1>>0]=d&63|128;f=2;break}if(d>>>0<55296|(d&-8192|0)==57344){a[b>>0]=(12?d>>>12:d)|224;a[b+1>>0]=(6?d>>>6:d)&63|128;a[b+2>>0]=d&63|128;f=3;break}if((d+-65536|0)>>>0<1048576){a[b>>0]=(18?d>>>18:d)|240;a[b+1>>0]=(12?d>>>12:d)&63|128;a[b+2>>0]=(6?d>>>6:d)&63|128;a[b+3>>0]=d&63|128;f=4;break}else{e=_e()|0;c[e>>2]=84;f=-1;break}}else f=1;while(0);return f|0}function wf(){return cf()|0}function xf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=e+16|0;g=c[f>>2]|0;if(!g)if(!(yf(e)|0)){h=c[f>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=e+20|0;f=c[g>>2]|0;k=f;if((h-f|0)>>>0>>0){j=ca[c[e+36>>2]&15](e,b,d)|0;break}b:do if((a[e+75>>0]|0)<0|(d|0)==0){l=0;m=b;n=d;o=k}else{f=d;while(1){p=f+-1|0;if((a[b+p>>0]|0)==10)break;if(!p){l=0;m=b;n=d;o=k;break b}else f=p}p=ca[c[e+36>>2]&15](e,b,f)|0;if(p>>>0>>0){j=p;break a}l=f;m=b+f|0;n=d-f|0;o=c[g>>2]|0}while(0);Lf(o|0,m|0,n|0)|0;c[g>>2]=(c[g>>2]|0)+n;j=l+n|0}while(0);return j|0}function yf(b){b=b|0;var d=0,e=0,f=0;d=b+74|0;e=a[d>>0]|0;a[d>>0]=e+255|e;e=c[b>>2]|0;if(!(e&8)){c[b+8>>2]=0;c[b+4>>2]=0;d=c[b+44>>2]|0;c[b+28>>2]=d;c[b+20>>2]=d;c[b+16>>2]=d+(c[b+48>>2]|0);f=0}else{c[b>>2]=e|32;f=-1}return f|0}function zf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=r(d,b)|0;g=(b|0)==0?0:d;if((c[e+76>>2]|0)>-1){d=(gf(e)|0)==0;h=xf(a,f,e)|0;if(d)i=h;else{hf(e);i=h}}else i=xf(a,f,e)|0;if((i|0)==(f|0))j=g;else j=(i>>>0)/(b>>>0)|0;return j|0}function Af(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=Y;Y=Y+16|0;f=e;c[f>>2]=d;d=ef(a,b,f)|0;Y=e;return d|0}function Bf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=r(d,c)|0;f=a>>>16;a=(e>>>16)+(r(d,f)|0)|0;d=b>>>16;b=r(d,c)|0;return (u((a>>>16)+(r(d,f)|0)+(((a&65535)+b|0)>>>16)|0),a+b<<16|e&65535|0)|0}function Cf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=Bf(e,a)|0;f=v()|0;return (u((r(b,a)|0)+(r(d,e)|0)+f|f&0|0),c|0|0)|0}function Df(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return (u(b+d+(e>>>0>>0|0)>>>0|0),e|0)|0}function Ef(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (u(e|0),a-c>>>0|0)|0}function Ff(a){a=a|0;return (a?31-(s(a^a-1)|0)|0:32)|0}function Gf(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=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;g=a;h=b;i=h;j=d;k=e;l=k;if(!i){m=(f|0)!=0;if(!l){if(m){c[f>>2]=(g>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (u(n|0),o)|0}else{if(!m){n=0;o=0;return (u(n|0),o)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;o=0;return (u(n|0),o)|0}}m=(l|0)==0;do if(j){if(!m){p=(s(l|0)|0)-(s(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;t=p-31>>31;w=q;x=g>>>(q>>>0)&t|i<>>(q>>>0)&t;z=0;A=g<>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return (u(n|0),o)|0}r=j-1|0;if(r&j|0){t=(s(j|0)|0)+33-(s(i|0)|0)|0;q=64-t|0;p=32-t|0;B=p>>31;C=t-32|0;D=C>>31;w=t;x=p-1>>31&i>>>(C>>>0)|(i<>>(t>>>0))&D;y=D&i>>>(t>>>0);z=g<>>(C>>>0))&B|g<>31;break}if(f|0){c[f>>2]=r&g;c[f+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (u(n|0),o)|0}else{r=Ff(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (u(n|0),o)|0}}else{if(m){if(f|0){c[f>>2]=(i>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (u(n|0),o)|0}if(!g){if(f|0){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (u(n|0),o)|0}r=l-1|0;if(!(r&l)){if(f|0){c[f>>2]=a|0;c[f+4>>2]=r&i|b&0}n=0;o=i>>>((Ff(l|0)|0)>>>0);return (u(n|0),o)|0}r=(s(l|0)|0)-(s(i|0)|0)|0;if(r>>>0<=30){t=r+1|0;p=31-r|0;w=t;x=i<>>(t>>>0);y=i>>>(t>>>0);z=0;A=g<>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return (u(n|0),o)|0}while(0);if(!w){E=A;F=z;G=y;H=x;I=0;J=0}else{b=d|0|0;d=k|e&0;e=Df(b|0,d|0,-1,-1)|0;k=v()|0;h=A;A=z;z=y;y=x;x=w;w=0;do{a=h;h=A>>>31|h<<1;A=w|A<<1;g=y<<1|a>>>31|0;a=y>>>31|z<<1|0;Ef(e|0,k|0,g|0,a|0)|0;i=v()|0;l=i>>31|((i|0)<0?-1:0)<<1;w=l&1;y=Ef(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&d|0)|0;z=v()|0;x=x-1|0}while((x|0)!=0);E=h;F=A;G=z;H=y;I=0;J=w}w=F;F=0;if(f|0){c[f>>2]=H;c[f+4>>2]=G}n=(w|0)>>>31|(E|F)<<1|(F<<1|w>>>31)&0|I;o=(w<<1|0>>>31)&-2|J;return (u(n|0),o)|0}function Hf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Gf(a,b,c,d,0)|0}function If(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){u(b>>>c|0);return a>>>c|(b&(1<>>c-32|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){u(b<>>32-c|0);return a<>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Lf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192){L(b|0,d|0,e|0)|0;return b|0}f=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}h=g&-4|0;e=h-64|0;while((b|0)<=(e|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(h|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{h=g-4|0;while((b|0)<(h|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return f|0}function Mf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else Lf(b,c,d)|0;return b|0}function Nf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}g=f&-4|0;h=d|d<<8|d<<16|d<<24;i=g-64|0;while((b|0)<=(i|0)){c[b>>2]=h;c[b+4>>2]=h;c[b+8>>2]=h;c[b+12>>2]=h;c[b+16>>2]=h;c[b+20>>2]=h;c[b+24>>2]=h;c[b+28>>2]=h;c[b+32>>2]=h;c[b+36>>2]=h;c[b+40>>2]=h;c[b+44>>2]=h;c[b+48>>2]=h;c[b+52>>2]=h;c[b+56>>2]=h;c[b+60>>2]=h;b=b+64|0}while((b|0)<(g|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return f-e|0}function Of(a){a=a|0;var b=0,d=0;b=c[i>>2]|0;d=b+a|0;if((a|0)>0&(d|0)<(b|0)|(d|0)<0){V(d|0)|0;F(12);return -1}if((d|0)>(J()|0)?(M(d|0)|0)==0:0){F(12);return -1}c[i>>2]=d;return b|0}function Pf(a,b){a=a|0;b=b|0;return aa[a&7](b|0)|0}function Qf(a,b,c){a=a|0;b=b|0;c=c|0;return ba[a&31](b|0,c|0)|0}function Rf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ca[a&15](b|0,c|0,d|0)|0}function Sf(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;return da[a&1](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Tf(a,b){a=a|0;b=b|0;ea[a&31](b|0)}function Uf(a,b,c){a=a|0;b=b|0;c=c|0;fa[a&3](b|0,c|0)}function Vf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ga[a&31](b|0,c|0,d|0,e|0)}function Wf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ha[a&31](b|0,c|0,d|0,e|0,f|0)}function Xf(a,b,c,d,e,f,g,h,i,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;i=i|0;j=j|0;ia[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Yf(a){a=a|0;t(0);return 0}function Zf(a,b){a=a|0;b=b|0;t(1);return 0}function _f(a,b,c){a=a|0;b=b|0;c=c|0;t(2);return 0}function $f(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;t(3);return 0}function ag(a){a=a|0;t(4)}function bg(a,b){a=a|0;b=b|0;t(5)}function cg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;t(6)}function dg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;t(7)}function eg(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;t(8)} + + // EMSCRIPTEN_END_FUNCS + var aa=[Yf,gd,hd,We,Rb,Sb,ld,Yf];var ba=[Zf,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,Xb,ac,dc,ec,fc,dd,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf,Zf];var ca=[_f,Xe,Ye,Zb,bc,hc,gc,$b,_b,ic,_f,_f,_f,_f,_f,_f];var da=[$f,Je];var ea=[ag,fd,id,jd,kd,Tb,Md,Nd,Od,Pd,Qd,Rd,Sd,Td,Ud,Vd,Wd,Xd,Yd,Zd,_d,$d,ae,be,ce,de,ee,fe,ge,he,ag,ag];var fa=[bg,Ha,Ka,bg];var ga=[cg,Nc,Oc,Pc,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg];var ha=[dg,Qc,Rc,Sc,tc,uc,vc,wc,xc,yc,zc,kc,lc,mc,nc,oc,pc,qc,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg,dg];var ia=[eg,Fc,Gc,Hc,Ic,Jc,Kc,Lc];return{_WebpToSDL:na,___errno_location:_e,___muldi3:Cf,___udivdi3:Hf,_bitshift64Lshr:If,_bitshift64Shl:Jf,_emscripten_replace_memory:$,_free:Qe,_i64Add:Df,_i64Subtract:Ef,_llvm_bswap_i32:Kf,_malloc:Pe,_memcpy:Lf,_memmove:Mf,_memset:Nf,_sbrk:Of,dynCall_ii:Pf,dynCall_iii:Qf,dynCall_iiii:Rf,dynCall_iiiiiii:Sf,dynCall_vi:Tf,dynCall_vii:Uf,dynCall_viiii:Vf,dynCall_viiiii:Wf,dynCall_viiiiiiiii:Xf,establishStackSpace:ma,stackAlloc:ja,stackRestore:la,stackSave:ka}}) + + + // EMSCRIPTEN_END_ASM + (asmGlobalArg,asmLibraryArg,buffer);var _WebpToSDL=Module["_WebpToSDL"]=asm["_WebpToSDL"];var ___errno_location=Module["___errno_location"]=asm["___errno_location"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var _free=Module["_free"]=asm["_free"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiiiiii=Module["dynCall_viiiiiiiii"]=asm["dynCall_viiiiiiiii"];Module["asm"]=asm;Module["cwrap"]=cwrap;if(memoryInitializer){if(!isDataURI(memoryInitializer)){memoryInitializer=locateFile(memoryInitializer)}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")};var doBrowserLoad=function(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,function(){throw"could not load memory initializer "+memoryInitializer})};var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module["memoryInitializerRequest"]){var useRequest=function(){var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module["memoryInitializerRequestURL"]);if(data){response=data.buffer}else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)};if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){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(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run(); + + + this.Module = Module + this.webpToSdl = Module.cwrap("WebpToSDL", "number", ["array", "number"]) + this.setCanvas = function(canvas) { Module.canvas = canvas; SDL.canvasPool.push(canvas); } + + /* document.createElement = function() { + return Module.canvas; + }; */ + } + + export {Webp} + \ No newline at end of file diff --git a/src/lib/lottieLoader.ts b/src/lib/lottieLoader.ts index 06042cf6..e9d288f8 100644 --- a/src/lib/lottieLoader.ts +++ b/src/lib/lottieLoader.ts @@ -70,7 +70,7 @@ class LottieLoader { } */ //params.autoplay = false; - //params.renderer = 'canvas'; + params.renderer = 'canvas'; params.rendererSettings = { //context: canvasContext, // the canvas context //preserveAspectRatio: 'xMinYMin slice', // Supports the same options as the svg element's preserveAspectRatio property diff --git a/src/lib/webp.ts b/src/lib/webp.ts new file mode 100644 index 00000000..9b02a281 --- /dev/null +++ b/src/lib/webp.ts @@ -0,0 +1,53 @@ + +import {Webp} from "webp-hero/libwebp/dist/webp.js" +import {detectWebpSupport} from "webp-hero/dist/detect-webp-support.js" + +const relax = () => new Promise(resolve => requestAnimationFrame(resolve)) + +export class WebpMachineError extends Error {} + +/** + * Webp Machine + * - decode and polyfill webp images + * - can only decode images one-at-a-time (otherwise will throw busy error) + */ +export class WebpMachine { + private readonly webp: Webp + private readonly webpSupport: Promise + private busy = false + private cache: {[key: string]: string} = {} + + constructor({ + webp = new Webp(), + webpSupport = detectWebpSupport() + } = {}) { + this.webp = webp; + this.webp.Module.doNotCaptureKeyboard = true; + this.webpSupport = webpSupport; + } + + /** + * Decode raw webp data into a png data url + */ + async decode(webpData: Uint8Array): Promise { + if (this.busy) throw new WebpMachineError("cannot decode when already busy") + this.busy = true + + try { + await relax() + const canvas = document.createElement("canvas") + this.webp.setCanvas(canvas) + this.webp.webpToSdl(webpData, webpData.length) + this.busy = false + return canvas.toDataURL() + } + catch (error) { + this.busy = false + error.name = WebpMachineError.name + error.message = `failed to decode webp image: ${error.message}` + throw error + } + } +} + +(window as any).WebpMachine = WebpMachine; diff --git a/src/lib/webp_bad.js b/src/lib/webp_bad.js new file mode 100644 index 00000000..4181ccc0 --- /dev/null +++ b/src/lib/webp_bad.js @@ -0,0 +1,24 @@ +import insideWorker from 'offscreen-canvas/inside-worker'; + +console.log(self); + +import { Webp } from "./libwebp.js"; +let webp = new Webp(); +webp.Module.doNotCaptureKeyboard = true; +webp.Module.noImageDecoding = true; + +let canvas = null; + +const worker = insideWorker(e => { + if(e.data.canvas) { + canvas = e.data.canvas; + console.log(e, canvas); + webp.setCanvas(canvas); + //webp.webpToSdl() + // Draw on the canvas + } else if(e.data.message == 'webpBytes') { + webp.webpToSdl(e.data.bytes, e.data.bytes.length); + //console.log(canvas); + self.postMessage({converted: true}); + } +}); diff --git a/src/materialize.min.js b/src/materialize.min.js deleted file mode 100644 index 4ff077d6..00000000 --- a/src/materialize.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Materialize v1.0.0 (http://materializecss.com) - * Copyright 2014-2017 Materialize - * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE) - */ -var _get=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;return void 0!==a?a.call(n):void 0},_createClass=function(){function n(t,e){for(var i=0;i/,p=/^\w+$/;function v(t,e){e=e||o;var i=u.test(t)?e.getElementsByClassName(t.slice(1)):p.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t);return i}function f(t){if(!i){var e=(i=o.implementation.createHTMLDocument(null)).createElement("base");e.href=o.location.href,i.head.appendChild(e)}return i.body.innerHTML=t,i.body.childNodes}function m(t){"loading"!==o.readyState?t():o.addEventListener("DOMContentLoaded",t)}function g(t,e){if(!t)return this;if(t.cash&&t!==a)return t;var i,n=t,s=0;if(d(t))n=l.test(t)?o.getElementById(t.slice(1)):c.test(t)?f(t):v(t,e);else if(h(t))return m(t),this;if(!n)return this;if(n.nodeType||n===a)this[0]=n,this.length=1;else for(i=this.length=n.length;ss.right-i||l+e.width>window.innerWidth-i)&&(n.right=!0),(ho-i||h+e.height>window.innerHeight-i)&&(n.bottom=!0),n},M.checkPossibleAlignments=function(t,e,i,n){var s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o="visible"===getComputedStyle(e).overflow,a=e.getBoundingClientRect(),r=Math.min(a.height,window.innerHeight),l=Math.min(a.width,window.innerWidth),h=t.getBoundingClientRect(),d=e.scrollLeft,u=e.scrollTop,c=i.left-d,p=i.top-u,v=i.top+h.height-u;return s.spaceOnRight=o?window.innerWidth-(h.left+i.width):l-(c+i.width),s.spaceOnRight<0&&(s.left=!1),s.spaceOnLeft=o?h.right-i.width:c-i.width+h.width,s.spaceOnLeft<0&&(s.right=!1),s.spaceOnBottom=o?window.innerHeight-(h.top+i.height+n):r-(p+i.height+n),s.spaceOnBottom<0&&(s.top=!1),s.spaceOnTop=o?h.bottom-(i.height+n):v-(i.height-n),s.spaceOnTop<0&&(s.bottom=!1),s},M.getOverflowParent=function(t){return null==t?null:t===document.body||"visible"!==getComputedStyle(t).overflow?t:M.getOverflowParent(t.parentElement)},M.getIdFromTrigger=function(t){var e=t.getAttribute("data-target");return e||(e=(e=t.getAttribute("href"))?e.slice(1):""),e},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var getTime=Date.now||function(){return(new Date).getTime()};M.throttle=function(i,n,s){var o=void 0,a=void 0,r=void 0,l=null,h=0;s||(s={});var d=function(){h=!1===s.leading?0:getTime(),l=null,r=i.apply(o,a),o=a=null};return function(){var t=getTime();h||!1!==s.leading||(h=t);var e=n-(t-h);return o=this,a=arguments,e<=0?(clearTimeout(l),l=null,h=t,r=i.apply(o,a),o=a=null):l||!1===s.trailing||(l=setTimeout(d,e)),r}};var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,i){if(i.get||i.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=i.value)},$jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t},$jscomp.global=$jscomp.getGlobal(this),$jscomp.SYMBOL_PREFIX="jscomp_symbol_",$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){},$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}}),$jscomp.initSymbolIterator=function(){}},$jscomp.arrayIterator=function(t){var e=0;return $jscomp.iteratorPrototype(function(){return e=k.currentTime)for(var h=0;ht&&(s.duration=e.duration),s.children.push(e)}),s.seek(0),s.reset(),s.autoplay&&s.restart(),s},s},O.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},O}(),function(r,l){"use strict";var e={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},t=function(t){function s(t,e){_classCallCheck(this,s);var i=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,t,e));(i.el.M_Collapsible=i).options=r.extend({},s.defaults,e),i.$headers=i.$el.children("li").children(".collapsible-header"),i.$headers.attr("tabindex",0),i._setupEventHandlers();var n=i.$el.children("li.active").children(".collapsible-body");return i.options.accordion?n.first().css("display","block"):n.css("display","block"),i}return _inherits(s,Component),_createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_handleCollapsibleClick",value:function(t){var e=r(t.target).closest(".collapsible-header");if(t.target&&e.length){var i=e.closest(".collapsible");if(i[0]===this.el){var n=e.closest("li"),s=i.children("li"),o=n[0].classList.contains("active"),a=s.index(n);o?this.close(a):this.open(a)}}}},{key:"_handleCollapsibleKeydown",value:function(t){13===t.keyCode&&this._handleCollapsibleClickBound(t)}},{key:"_animateIn",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var s=n.css("padding-top"),o=n.css("padding-bottom"),a=n[0].scrollHeight;n.css({paddingTop:0,paddingBottom:0}),l({targets:n[0],height:a,paddingTop:s,paddingBottom:o,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(t){n.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,i[0])}})}}},{key:"_animateOut",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css("overflow","hidden"),l({targets:n[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){n.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,i[0])}})}}},{key:"open",value:function(t){var i=this,e=this.$el.children("li").eq(t);if(e.length&&!e[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,e[0]),this.options.accordion){var n=this.$el.children("li");this.$el.children("li.active").each(function(t){var e=n.index(r(t));i.close(e)})}e[0].classList.add("active"),this._animateIn(t)}}},{key:"close",value:function(t){var e=this.$el.children("li").eq(t);e.length&&e[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,e[0]),e[0].classList.remove("active"),this._animateOut(t))}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Collapsible}},{key:"defaults",get:function(){return e}}]),s}();M.Collapsible=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"collapsible","M_Collapsible")}(cash,M.anime),function(h,i){"use strict";var e={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return i.el.M_Dropdown=i,n._dropdowns.push(i),i.id=M.getIdFromTrigger(t),i.dropdownEl=document.getElementById(i.id),i.$dropdownEl=h(i.dropdownEl),i.options=h.extend({},n.defaults,e),i.isOpen=!1,i.isScrollable=!1,i.isTouchMoving=!1,i.focusedIndex=-1,i.filterQuery=[],i.options.container?h(i.options.container).append(i.dropdownEl):i.$el.after(i.dropdownEl),i._makeDropdownFocusable(),i._resetFilterQueryBound=i._resetFilterQuery.bind(i),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),i._handleDocumentTouchmoveBound=i._handleDocumentTouchmove.bind(i),i._handleDropdownClickBound=i._handleDropdownClick.bind(i),i._handleDropdownKeydownBound=i._handleDropdownKeydown.bind(i),i._handleTriggerKeydownBound=i._handleTriggerKeydown.bind(i),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),n._dropdowns.splice(n._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(t){t.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(t){var e=t.toElement||t.relatedTarget,i=!!h(e).closest(".dropdown-content").length,n=!1,s=h(e).closest(".dropdown-trigger");s.length&&s[0].M_Dropdown&&s[0].M_Dropdown.isOpen&&(n=!0),n||i||this.close()}},{key:"_handleDocumentClick",value:function(t){var e=this,i=h(t.target);this.options.closeOnClick&&i.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(function(){e.close()},0):!i.closest(".dropdown-trigger").length&&i.closest(".dropdown-content").length||setTimeout(function(){e.close()},0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(t){t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ENTER||this.isOpen||(t.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(t){h(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(t){if("function"==typeof this.options.onItemClick){var e=h(t.target).closest("li")[0];this.options.onItemClick.call(this,e)}}},{key:"_handleDropdownKeydown",value:function(t){if(t.which===M.keys.TAB)t.preventDefault(),this.close();else if(t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||!this.isOpen)if(t.which===M.keys.ENTER&&this.isOpen){var e=this.dropdownEl.children[this.focusedIndex],i=h(e).find("a, button").first();i.length?i[0].click():e&&e.click()}else t.which===M.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();var n=t.which===M.keys.ARROW_DOWN?1:-1,s=this.focusedIndex,o=!1;do{if(s+=n,this.dropdownEl.children[s]&&-1!==this.dropdownEl.children[s].tabIndex){o=!0;break}}while(sl.spaceOnBottom?(h="bottom",i+=l.spaceOnTop,o-=l.spaceOnTop):i+=l.spaceOnBottom)),!l[d]){var u="left"===d?"right":"left";l[u]?d=u:l.spaceOnLeft>l.spaceOnRight?(d="right",n+=l.spaceOnLeft,s-=l.spaceOnLeft):(d="left",n+=l.spaceOnRight)}return"bottom"===h&&(o=o-e.height+(this.options.coverTrigger?t.height:0)),"right"===d&&(s=s-e.width+t.width),{x:s,y:o,verticalAlignment:h,horizontalAlignment:d,height:i,width:n}}},{key:"_animateIn",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var t=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=t+"px";var e=this._getDropdownPosition();this.dropdownEl.style.left=e.x+"px",this.dropdownEl.style.top=e.y+"px",this.dropdownEl.style.height=e.height+"px",this.dropdownEl.style.width=e.width+"px",this.dropdownEl.style.transformOrigin=("left"===e.horizontalAlignment?"0":"100%")+" "+("top"===e.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Dropdown}},{key:"defaults",get:function(){return e}}]),n}();t._dropdowns=[],M.Dropdown=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"dropdown","M_Dropdown")}(cash,M.anime),function(s,i){"use strict";var e={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Modal=i).options=s.extend({},n.defaults,e),i.isOpen=!1,i.id=i.$el.attr("id"),i._openingTrigger=void 0,i.$overlay=s(''),i.el.tabIndex=0,i._nthModalOpened=0,n._count++,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===n._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===n._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(t){var e=s(t.target).closest(".modal-trigger");if(e.length){var i=M.getIdFromTrigger(e[0]),n=document.getElementById(i).M_Modal;n&&n.open(e),t.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(t){s(t.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(t){27===t.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(t){this.el.contains(t.target)||this._nthModalOpened!==n._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var t=this;s.extend(this.el.style,{display:"block",opacity:0}),s.extend(this.$overlay[0].style,{display:"block",opacity:0}),i({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var e={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el,t._openingTrigger)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:0,opacity:1}):s.extend(e,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),i(e)}},{key:"_animateOut",value:function(){var t=this;i({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var e={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){t.el.style.display="none",t.$overlay.remove(),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:"-100%",opacity:0}):s.extend(e,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),i(e)}},{key:"open",value:function(t){if(!this.isOpen)return this.isOpen=!0,n._modalsOpen++,this._nthModalOpened=n._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*n._modalsOpen,this.el.style.zIndex=1e3+2*n._modalsOpen+1,this._openingTrigger=t?t[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,n._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===n._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Modal}},{key:"defaults",get:function(){return e}}]),n}();t._modalsOpen=0,t._count=0,M.Modal=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"modal","M_Modal")}(cash,M.anime),function(o,a){"use strict";var e={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Materialbox=i).options=o.extend({},n.defaults,e),i.overlayActive=!1,i.doneAnimating=!0,i.placeholder=o("
").addClass("material-placeholder"),i.originalWidth=0,i.originalHeight=0,i.originInlineStyles=i.$el.attr("style"),i.caption=i.el.getAttribute("data-caption")||"",i.$el.before(i.placeholder),i.placeholder.append(i.$el),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,o(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(t){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(t){27===t.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=o();for(var t=this.placeholder[0].parentNode;null!==t&&!o(t).is(document);){var e=o(t);"visible"!==e.css("overflow")&&(e.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=e:this.ancestorsChanged=this.ancestorsChanged.add(e)),t=t.parentNode}}},{key:"_animateImageIn",value:function(){var t=this,e={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){t.doneAnimating=!0,"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(e.maxWidth=this.newWidth),"none"!==this.maxHeight&&(e.maxHeight=this.newHeight),a(e)}},{key:"_animateImageOut",value:function(){var t=this,e={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.placeholder.css({height:"",width:"",position:"",top:"",left:""}),t.attrWidth&&t.$el.attr("width",t.attrWidth),t.attrHeight&&t.$el.attr("height",t.attrHeight),t.$el.removeAttr("style"),t.originInlineStyles&&t.$el.attr("style",t.originInlineStyles),t.$el.removeClass("active"),t.doneAnimating=!0,t.ancestorsChanged.length&&t.ancestorsChanged.css("overflow",""),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};a(e)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var t=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=o('
').css({opacity:0}).one("click",function(){t.doneAnimating&&t.close()}),this.$el.before(this.$overlay);var e=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*e.left+"px",top:-1*e.top+"px"}),a.remove(this.el),a.remove(this.$overlay[0]),a({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&a.remove(this.$photoCaption[0]),this.$photoCaption=o('
'),this.$photoCaption.text(this.caption),o("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),a({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var i=0,n=this.originalWidth/this.windowWidth,s=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,si.options.responsiveThreshold,i.$img=i.$el.find("img").first(),i.$img.each(function(){this.complete&&s(this).trigger("load")}),i._updateParallax(),i._setupEventHandlers(),i._setupStyles(),n._parallaxes.push(i),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._parallaxes.splice(n._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(n._handleScrollThrottled=M.throttle(n._handleScroll,5),window.addEventListener("scroll",n._handleScrollThrottled),n._handleWindowResizeThrottled=M.throttle(n._handleWindowResize,5),window.addEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(window.removeEventListener("scroll",n._handleScrollThrottled),window.removeEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var t=0e.options.responsiveThreshold}}},{key:"defaults",get:function(){return e}}]),n}();t._parallaxes=[],M.Parallax=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"parallax","M_Parallax")}(cash),function(a,s){"use strict";var e={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tabs=i).options=a.extend({},n.defaults,e),i.$tabLinks=i.$el.children("li.tab").children("a"),i.index=0,i._setupActiveTabLink(),i.options.swipeable?i._setupSwipeableTabs():i._setupNormalTabs(),i._setTabsAndTabWidth(),i._createIndicator(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(t){var e=this,i=a(t.target).closest("li.tab"),n=a(t.target).closest("a");if(n.length&&n.parent().hasClass("tab"))if(i.hasClass("disabled"))t.preventDefault();else if(!n.attr("target")){this.$activeTabLink.removeClass("active");var s=this.$content;this.$activeTabLink=n,this.$content=a(M.escapeHash(n[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(n),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){"function"==typeof e.options.onShow&&e.options.onShow.call(e,e.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),s.length&&!s.is(this.$content)&&(s[0].style.display="none",s.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),t.preventDefault()}}},{key:"_createIndicator",value:function(){var t=this,e=document.createElement("li");e.classList.add("indicator"),this.el.appendChild(e),this._indicator=e,setTimeout(function(){t._indicator.style.left=t._calcLeftPos(t.$activeTabLink)+"px",t._indicator.style.right=t._calcRightPos(t.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=a(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=a(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var i=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var n=a();this.$tabLinks.each(function(t){var e=a(M.escapeHash(t.hash));e.addClass("carousel-item"),n=n.add(e)});var t=a('');n.first().before(t),t.append(n),n[0].style.display="";var e=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(t[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(t){var e=i.index;i.index=a(t).index(),i.$activeTabLink.removeClass("active"),i.$activeTabLink=i.$tabLinks.eq(i.index),i.$activeTabLink.addClass("active"),i._animateIndicator(e),"function"==typeof i.options.onShow&&i.options.onShow.call(i,i.$content[0])}}),this._tabsCarousel.set(e)}},{key:"_teardownSwipeableTabs",value:function(){var t=this._tabsCarousel.$el;this._tabsCarousel.destroy(),t.after(t.children()),t.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(t){return Math.ceil(this.tabsWidth-t.position().left-t[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(t){return Math.floor(t.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(t){var e=0,i=0;0<=this.index-t?e=90:i=90;var n={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:e},right:{value:this._calcRightPos(this.$activeTabLink),delay:i},duration:this.options.duration,easing:"easeOutQuad"};s.remove(this._indicator),s(n)}},{key:"select",value:function(t){var e=this.$tabLinks.filter('[href="#'+t+'"]');e.length&&e.trigger("click")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tabs}},{key:"defaults",get:function(){return e}}]),n}();M.Tabs=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tabs","M_Tabs")}(cash,M.anime),function(d,e){"use strict";var i={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tooltip=i).options=d.extend({},n.defaults,e),i.isOpen=!1,i.isHovered=!1,i.isFocused=!1,i._appendTooltipEl(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){d(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var t=document.createElement("div");t.classList.add("material-tooltip"),this.tooltipEl=t;var e=document.createElement("div");e.classList.add("tooltip-content"),e.innerHTML=this.options.html,t.appendChild(e),document.body.appendChild(t)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(t){this.isOpen||(t=void 0===t||void 0,this.isOpen=!0,this.options=d.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(t))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var t=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){t.isHovered||t.isFocused||t._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(t){var e=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){(e.isHovered||e.isFocused||t)&&e._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var t,e=this.el,i=this.tooltipEl,n=e.offsetHeight,s=e.offsetWidth,o=i.offsetHeight,a=i.offsetWidth,r=this.options.margin,l=void 0,h=void 0;this.xMovement=0,this.yMovement=0,l=e.getBoundingClientRect().top+M.getDocumentScrollTop(),h=e.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(l+=-o-r,h+=s/2-a/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(l+=n/2-o/2,h+=s+r,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(l+=n/2-o/2,h+=-a-r,this.xMovement=-this.options.transitionMovement):(l+=n+r,h+=s/2-a/2,this.yMovement=this.options.transitionMovement),t=this._repositionWithinScreen(h,l,a,o),d(i).css({top:t.y+"px",left:t.x+"px"})}},{key:"_repositionWithinScreen",value:function(t,e,i,n){var s=M.getDocumentScrollLeft(),o=M.getDocumentScrollTop(),a=t-s,r=e-o,l={left:a,top:r,width:i,height:n},h=this.options.margin+this.options.transitionMovement,d=M.checkWithinContainer(document.body,l,h);return d.left?a=h:d.right&&(a-=a+i-window.innerWidth),d.top?r=h:d.bottom&&(r-=r+n-window.innerHeight),{x:a+s,y:r+o}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var t={},e=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-position");return e&&(t.html=e),i&&(t.position=i),t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tooltip}},{key:"defaults",get:function(){return i}}]),n}();M.Tooltip=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tooltip","M_Tooltip")}(cash,M.anime),function(i){"use strict";var t=t||{},e=document.querySelectorAll.bind(document);function m(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e+=i+":"+t[i]+";");return e}var g={duration:750,show:function(t,e){if(2===t.button)return!1;var i=e||this,n=document.createElement("div");n.className="waves-ripple",i.appendChild(n);var s,o,a,r,l,h,d,u=(h={top:0,left:0},d=(s=i)&&s.ownerDocument,o=d.documentElement,void 0!==s.getBoundingClientRect&&(h=s.getBoundingClientRect()),a=null!==(l=r=d)&&l===l.window?r:9===r.nodeType&&r.defaultView,{top:h.top+a.pageYOffset-o.clientTop,left:h.left+a.pageXOffset-o.clientLeft}),c=t.pageY-u.top,p=t.pageX-u.left,v="scale("+i.clientWidth/100*10+")";"touches"in t&&(c=t.touches[0].pageY-u.top,p=t.touches[0].pageX-u.left),n.setAttribute("data-hold",Date.now()),n.setAttribute("data-scale",v),n.setAttribute("data-x",p),n.setAttribute("data-y",c);var f={top:c+"px",left:p+"px"};n.className=n.className+" waves-notransition",n.setAttribute("style",m(f)),n.className=n.className.replace("waves-notransition",""),f["-webkit-transform"]=v,f["-moz-transform"]=v,f["-ms-transform"]=v,f["-o-transform"]=v,f.transform=v,f.opacity="1",f["-webkit-transition-duration"]=g.duration+"ms",f["-moz-transition-duration"]=g.duration+"ms",f["-o-transition-duration"]=g.duration+"ms",f["transition-duration"]=g.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",n.setAttribute("style",m(f))},hide:function(t){l.touchup(t);var e=this,i=(e.clientWidth,null),n=e.getElementsByClassName("waves-ripple");if(!(0i||1"+o+""+a+""+r+""),i.length&&e.prepend(i)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){h(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(t){var e=t.text().trim();this.el.value=e,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,e)}},{key:"_renderDropdown",value:function(t,i){var n=this;this._resetAutocomplete();var e=[];for(var s in t)if(t.hasOwnProperty(s)&&-1!==s.toLowerCase().indexOf(i)){if(this.count>=this.options.limit)break;var o={data:t[s],key:s};e.push(o),this.count++}if(this.options.sortFunction){e.sort(function(t,e){return n.options.sortFunction(t.key.toLowerCase(),e.key.toLowerCase(),i.toLowerCase())})}for(var a=0;a");r.data?l.append(''+r.key+""):l.append(""+r.key+""),h(this.container).append(l),this._highlight(i,l)}}},{key:"open",value:function(){var t=this.el.value.toLowerCase();this._resetAutocomplete(),t.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,t)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(t){var e=this.el.value.toLowerCase();this.options.data=t,this.isOpen&&this._renderDropdown(t,e)}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Autocomplete}},{key:"defaults",get:function(){return e}}]),s}();t._keydown=!1,M.Autocomplete=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"autocomplete","M_Autocomplete")}(cash),function(d){M.updateTextFields=function(){d("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each(function(t,e){var i=d(this);0'),d("body").append(e));var i=t.css("font-family"),n=t.css("font-size"),s=t.css("line-height"),o=t.css("padding-top"),a=t.css("padding-right"),r=t.css("padding-bottom"),l=t.css("padding-left");n&&e.css("font-size",n),i&&e.css("font-family",i),s&&e.css("line-height",s),o&&e.css("padding-top",o),a&&e.css("padding-right",a),r&&e.css("padding-bottom",r),l&&e.css("padding-left",l),t.data("original-height")||t.data("original-height",t.height()),"off"===t.attr("wrap")&&e.css("overflow-wrap","normal").css("white-space","pre"),e.text(t[0].value+"\n");var h=e.html().replace(/\n/g,"
");e.html(h),0'),this.$slides.each(function(t,e){var i=s('
  • ');n.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(t){var e=this;if(t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.activeIndex!=t){this.$active=this.$slides.eq(this.activeIndex);var i=this.$active.find(".caption");this.$active.removeClass("active"),o({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){e.$slides.not(".active").each(function(t){o({targets:t,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(i[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(t).addClass("active")),o({targets:this.$slides.eq(t)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),o({targets:this.$slides.eq(t).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(t).addClass("active"),this.activeIndex=t,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var t=this.activeIndex+1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}},{key:"prev",value:function(){var t=this.activeIndex-1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Slider}},{key:"defaults",get:function(){return e}}]),n}();M.Slider=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"slider","M_Slider")}(cash,M.anime),function(n,s){n(document).on("click",".card",function(t){if(n(this).children(".card-reveal").length){var i=n(t.target).closest(".card");void 0===i.data("initialOverflow")&&i.data("initialOverflow",void 0===i.css("overflow")?"":i.css("overflow"));var e=n(this).find(".card-reveal");n(t.target).is(n(".card-reveal .card-title"))||n(t.target).is(n(".card-reveal .card-title i"))?s({targets:e[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){var e=t.animatables[0].target;n(e).css({display:"none"}),i.css("overflow",i.data("initialOverflow"))}}):(n(t.target).is(n(".card .activator"))||n(t.target).is(n(".card .activator i")))&&(i.css("overflow","hidden"),e.css({display:"block"}),s({targets:e[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})}(cash,M.anime),function(h){"use strict";var e={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},t=function(t){function l(t,e){_classCallCheck(this,l);var i=_possibleConstructorReturn(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l,t,e));return(i.el.M_Chips=i).options=h.extend({},l.defaults,e),i.$el.addClass("chips input-field"),i.chipsData=[],i.$chips=h(),i._setupInput(),i.hasAutocomplete=0"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?h(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&h(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(t){if(t.hasOwnProperty("tag")&&""!==t.tag){for(var e=!1,i=0;i=this.options.limit)){var e=this._renderChip(t);this.$chips.add(e),this.chipsData.push(t),h(this.$input).before(e),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,e)}}},{key:"deleteChip",value:function(t){var e=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter(function(t){return 0<=h(t).index()}),this.chipsData.splice(t,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,e[0])}},{key:"selectChip",value:function(t){var e=this.$chips.eq(t);(this._selectedChip=e)[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,e[0])}}],[{key:"init",value:function(t,e){return _get(l.__proto__||Object.getPrototypeOf(l),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Chips}},{key:"_handleChipsKeydown",value:function(t){l._keydown=!0;var e=h(t.target).closest(".chips"),i=t.target&&e.length;if(!h(t.target).is("input, textarea")&&i){var n=e[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var s=n.chipsData.length;if(n._selectedChip){var o=n._selectedChip.index();n.deleteChip(o),n._selectedChip=null,s=Math.max(o-1,0)}n.chipsData.length&&n.selectChip(s)}else if(37===t.keyCode){if(n._selectedChip){var a=n._selectedChip.index()-1;if(a<0)return;n.selectChip(a)}}else if(39===t.keyCode&&n._selectedChip){var r=n._selectedChip.index()+1;r>=n.chipsData.length?n.$input[0].focus():n.selectChip(r)}}}},{key:"_handleChipsKeyup",value:function(t){l._keydown=!1}},{key:"_handleChipsBlur",value:function(t){l._keydown||(h(t.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return e}}]),l}();t._keydown=!1,M.Chips=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"chips","M_Chips"),h(document).ready(function(){h(document.body).on("click",".chip .close",function(){var t=h(this).closest(".chips");t.length&&t[0].M_Chips||h(this).closest(".chip").remove()})})}(cash),function(s){"use strict";var e={top:0,bottom:1/0,offset:0,onPositionChange:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Pushpin=i).options=s.extend({},n.defaults,e),i.originalOffset=i.el.offsetTop,n._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var t=n._pushpins.indexOf(this);n._pushpins.splice(t,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",n._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",n._updateElements)}},{key:"_updatePosition",value:function(){var t=M.getDocumentScrollTop()+this.options.offset;this.options.top<=t&&this.options.bottom>=t&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),tthis.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Pushpin}},{key:"_updateElements",value:function(){for(var t in n._pushpins){n._pushpins[t]._updatePosition()}}},{key:"defaults",get:function(){return e}}]),n}();t._pushpins=[],M.Pushpin=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"pushpin","M_Pushpin")}(cash),function(r,s){"use strict";var e={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};r.fn.reverse=[].reverse;var t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_FloatingActionButton=i).options=r.extend({},n.defaults,e),i.isOpen=!1,i.$anchor=i.$el.children("a").first(),i.$menu=i.$el.children("ul").first(),i.$floatingBtns=i.$el.find("ul .btn-floating"),i.$floatingBtnsReverse=i.$el.find("ul .btn-floating").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass("direction-"+i.options.direction),"top"===i.options.direction?i.offsetY=40:"right"===i.options.direction?i.offsetX=-40:"bottom"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(t){r(t.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var i=0;this.$floatingBtnsReverse.each(function(t){s({targets:t,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:"easeInOutQuad"}),i+=40})}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){s.remove(t),s({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var t,e=this,i=window.innerWidth,n=window.innerHeight,s=this.el.getBoundingClientRect(),o=r('
    '),a=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=s.left-i/2+s.width/2,this.offsetY=n-s.bottom,t=i/o[0].clientWidth,this.btnBottom=s.bottom,this.btnLeft=s.left,this.btnWidth=s.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":a}),setTimeout(function(){e.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),e.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){e.$el.css({overflow:"hidden","background-color":a}),o.css({transform:"scale("+t+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),e.$menu.children("li").children("a").css({opacity:1}),e._handleDocumentClickBound=e._handleDocumentClick.bind(e),window.addEventListener("scroll",e._handleCloseBound,!0),document.body.addEventListener("click",e._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var t=this,e=window.innerWidth,i=window.innerHeight,n=this.$el.find(".fab-backdrop"),s=this.$anchor.css("background-color");this.offsetX=this.btnLeft-e/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),n.css({transform:"scale(0)","background-color":s}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){n.remove(),t.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-t.offsetX+"px,0,0)"}),t.$anchor.css({overflow:"",transform:"translate3d(0,"+t.offsetY+"px,0)"}),setTimeout(function(){t.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),t.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FloatingActionButton}},{key:"defaults",get:function(){return e}}]),n}();M.FloatingActionButton=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"floatingActionButton","M_FloatingActionButton")}(cash,M.anime),function(g){"use strict";var e={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},t=function(t){function B(t,e){_classCallCheck(this,B);var i=_possibleConstructorReturn(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,B,t,e));(i.el.M_Datepicker=i).options=g.extend({},B.defaults,e),e&&e.hasOwnProperty("i18n")&&"object"==typeof e.i18n&&(i.options.i18n=g.extend({},B.defaults.i18n,e.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var n=i.options.defaultDate;return B._isDate(n)?i.options.setDefaultDate?(i.setDate(n,!0),i.setInputValue()):i.gotoDate(n):i.gotoDate(new Date),i.isOpen=!1,i}return _inherits(B,Component),_createClass(B,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),g(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var t=this.calendarEl.querySelector(".orig-select-year");t&&M.FormSelect.getInstance(t).destroy();var e=this.calendarEl.querySelector(".orig-select-month");e&&M.FormSelect.getInstance(e).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(g(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:"toString",value:function(t){var e=this;return t=t||this.options.format,B._isDate(this.date)?t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t){return e.formats[t]?e.formats[t]():t}).join(""):""}},{key:"setDate",value:function(t,e){if(!t)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),B._isDate(t)){var i=this.options.minDate,n=this.options.maxDate;B._isDate(i)&&tn.maxDate||n.disableWeekends&&B._isWeekend(y)||n.disableDayFn&&n.disableDayFn(y),isEmpty:C,isStartRange:x,isEndRange:L,isInRange:T,showDaysInNextAndPreviousMonths:n.showDaysInNextAndPreviousMonths};l.push(this.renderDay($)),7==++_&&(r.push(this.renderRow(l,n.isRTL,m)),_=0,m=!(l=[]))}return this.renderTable(n,r,i)}},{key:"renderDay",value:function(t){var e=[],i="false";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'';e.push("is-outside-current-month"),e.push("is-selection-disabled")}return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&(e.push("is-selected"),i="true"),t.hasEvent&&e.push("has-event"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'"}},{key:"renderRow",value:function(t,e,i){return''+(e?t.reverse():t).join("")+""}},{key:"renderTable",value:function(t,e,i){return'
    '+this.renderHead(t)+this.renderBody(e)+"
    "}},{key:"renderHead",value:function(t){var e=void 0,i=[];for(e=0;e<7;e++)i.push(''+this.renderDayName(t,e,!0)+"");return""+(t.isRTL?i.reverse():i).join("")+""}},{key:"renderBody",value:function(t){return""+t.join("")+""}},{key:"renderTitle",value:function(t,e,i,n,s,o){var a,r,l=void 0,h=void 0,d=void 0,u=this.options,c=i===u.minYear,p=i===u.maxYear,v='
    ',f=!0,m=!0;for(d=[],l=0;l<12;l++)d.push('");for(a='",g.isArray(u.yearRange)?(l=u.yearRange[0],h=u.yearRange[1]+1):(l=i-u.yearRange,h=1+i+u.yearRange),d=[];l=u.minYear&&d.push('");r='";v+='',v+='
    ',u.showMonthAfterYear?v+=r+a:v+=a+r,v+="
    ",c&&(0===n||u.minMonth>=n)&&(f=!1),p&&(11===n||u.maxMonth<=n)&&(m=!1);return(v+='')+"
    "}},{key:"draw",value:function(t){if(this.isOpen||t){var e,i=this.options,n=i.minYear,s=i.maxYear,o=i.minMonth,a=i.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(o)&&this._m=s&&(this._y=s,!isNaN(a)&&this._m>a&&(this._m=a)),e="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e);this.destroySelects(),this.calendarEl.innerHTML=r;var h=this.calendarEl.querySelector(".orig-select-year"),d=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(h,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),h.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var e=this;this.$modalEl=g(B._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?"0":"")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?"0":"")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(""+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(t){if(this.isOpen){var e=g(t.target);e.hasClass("is-disabled")||(!e.hasClass("datepicker-day-button")||e.hasClass("is-empty")||e.parent().hasClass("is-disabled")?e.closest(".month-prev").length?this.prevMonth():e.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(t){this.gotoMonth(t.target.value)}},{key:"_handleYearChange",value:function(t){this.gotoYear(t.target.value)}},{key:"gotoMonth",value:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}},{key:"gotoYear",value:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(t){var e=void 0;t.firedBy!==this&&(e=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),B._isDate(e)&&this.setDate(e))}},{key:"renderDayName",value:function(t,e,i){for(e+=t.firstDay;7<=e;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(t,e){return _get(B.__proto__||Object.getPrototypeOf(B),"init",this).call(this,this,t,e)}},{key:"_isDate",value:function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}},{key:"_isWeekend",value:function(t){var e=t.getDay();return 0===e||6===e}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(t,e){return[31,B._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}},{key:"_isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"_compareDates",value:function(t,e){return t.getTime()===e.getTime()}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Datepicker}},{key:"defaults",get:function(){return e}}]),B}();t._template=['"].join(""),M.Datepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"datepicker","M_Datepicker")}(cash),function(h){"use strict";var e={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},t=function(t){function f(t,e){_classCallCheck(this,f);var i=_possibleConstructorReturn(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f,t,e));return(i.el.M_Timepicker=i).options=h.extend({},f.defaults,e),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return _inherits(f,Component),_createClass(f,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),h(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),h(this.spanHours).on("click",this.showView.bind(this,"hours")),h(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(t){t.preventDefault();var e=this.plate.getBoundingClientRect(),i=e.left,n=e.top;this.x0=i+this.options.dialRadius,this.y0=n+this.options.dialRadius,this.moved=!1;var s=f._Pos(t);this.dx=s.x-this.x0,this.dy=s.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(t){t.preventDefault();var e=f._Pos(t),i=e.x-this.x0,n=e.y-this.y0;this.moved=!0,this.setHand(i,n,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(t){var e=this;t.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var i=f._Pos(t),n=i.x-this.x0,s=i.y-this.y0;this.moved&&n===this.dx&&s===this.dy&&this.setHand(n,s),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(h(this.minutesView).addClass("timepicker-dial-out"),setTimeout(function(){e.done()},this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=h(f._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t),t.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var t=h('").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:""});var e=h('
    ');h('").appendTo(e).on("click",this.close.bind(this)),h('").appendTo(e).on("click",this.done.bind(this)),e.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=h('
    AM
    '),this.$pmBtn=h('
    PM
    '),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var t=this.options.dialRadius,e=this.options.tickRadius,i=2*t,n=f._createSVGEl("svg");n.setAttribute("class","timepicker-svg"),n.setAttribute("width",i),n.setAttribute("height",i);var s=f._createSVGEl("g");s.setAttribute("transform","translate("+t+","+t+")");var o=f._createSVGEl("circle");o.setAttribute("class","timepicker-canvas-bearing"),o.setAttribute("cx",0),o.setAttribute("cy",0),o.setAttribute("r",4);var a=f._createSVGEl("line");a.setAttribute("x1",0),a.setAttribute("y1",0);var r=f._createSVGEl("circle");r.setAttribute("class","timepicker-canvas-bg"),r.setAttribute("r",e),s.appendChild(a),s.appendChild(r),s.appendChild(o),n.appendChild(s),this._canvas.appendChild(n),this.hand=a,this.bg=r,this.bearing=o,this.g=s}},{key:"_buildHoursView",value:function(){var t=h('
    ');if(this.options.twelveHour)for(var e=1;e<13;e+=1){var i=t.clone(),n=e/6*Math.PI,s=this.options.outerRadius;i.css({left:this.options.dialRadius+Math.sin(n)*s-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*s-this.options.tickRadius+"px"}),i.html(0===e?"00":e),this.hoursView.appendChild(i[0])}else for(var o=0;o<24;o+=1){var a=t.clone(),r=o/6*Math.PI,l=0'),e=0;e<60;e+=5){var i=t.clone(),n=e/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(n)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*this.options.outerRadius-this.options.tickRadius+"px"}),i.html(f._addLeadingZero(e)),this.minutesView.appendChild(i[0])}}},{key:"_handleAmPmClick",value:function(t){var e=h(t.target);this.amOrPm=e.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var t=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==t[1]&&(0','",""].join(""),M.Timepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"timepicker","M_Timepicker")}(cash),function(s){"use strict";var e={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_CharacterCounter=i).options=s.extend({},n.defaults,e),i.isInvalid=!1,i.isValidLength=!1,i._setupCounter(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),s(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){s(this.counterEl).remove()}},{key:"updateCounter",value:function(){var t=+this.$el.attr("data-length"),e=this.el.value.length;this.isValidLength=e<=t;var i=e;t&&(i+="/"+t,this._validateInput()),s(this.counterEl).html(i)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_CharacterCounter}},{key:"defaults",get:function(){return e}}]),n}();M.CharacterCounter=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"characterCounter","M_CharacterCounter")}(cash),function(b){"use strict";var e={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},t=function(t){function i(t,e){_classCallCheck(this,i);var n=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,e));return(n.el.M_Carousel=n).options=b.extend({},i.defaults,e),n.hasMultipleSlides=1'),n.$el.find(".carousel-item").each(function(t,e){if(n.images.push(t),n.showIndicators){var i=b('
  • ');0===e&&i[0].classList.add("active"),n.$indicators.append(i)}}),n.showIndicators&&n.$el.append(n.$indicators),n.count=n.images.length,n.options.numVisible=Math.min(n.count,n.options.numVisible),n.xform="transform",["webkit","Moz","O","ms"].every(function(t){var e=t+"Transform";return void 0===document.body.style[e]||(n.xform=e,!1)}),n._setupEventHandlers(),n._scroll(n.offset),n}return _inherits(i,Component),_createClass(i,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var i=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(t,e){t.addEventListener("click",i._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var i=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(t,e){t.removeEventListener("click",i._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(t){"mousedown"===t.type&&b(t.target).is("img")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(t){var e=void 0,i=void 0,n=void 0;if(this.pressed)if(e=this._xpos(t),i=this._ypos(t),n=this.reference-e,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(2=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(t.preventDefault(),t.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var e=b(t.target).closest(".carousel-item").index();0!==this._wrap(this.center)-e&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(e)}}},{key:"_handleIndicatorClick",value:function(t){t.stopPropagation();var e=b(t.target).closest(".indicator-item");e.length&&this._cycleTo(e.index())}},{key:"_handleResize",value:function(t){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(t){var i=this,e=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),n=e.find("img").first();if(n.length)if(n[0].complete){var s=n.height();if(0=this.count?t%this.count:t<0?this._wrap(this.count+t%this.count):t}},{key:"_track",value:function(){var t,e,i,n;e=(t=Date.now())-this.timestamp,this.timestamp=t,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+e),this.velocity=.8*n+.2*this.velocity}},{key:"_autoScroll",value:function(){var t=void 0,e=void 0;this.amplitude&&(t=Date.now()-this.timestamp,2<(e=this.amplitude*Math.exp(-t/this.options.duration))||e<-2?(this._scroll(this.target-e),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(t){var e=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){e.$el.removeClass("scrolling")},this.options.duration);var i,n,s,o,a=void 0,r=void 0,l=void 0,h=void 0,d=void 0,u=void 0,c=this.center,p=1/this.options.numVisible;if(this.offset="number"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(s=(n=this.offset-this.center*this.dim)<0?1:-1)*n*2/this.dim,i=this.count>>1,this.options.fullWidth?(l="translateX(0)",u=1):(l="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",l+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)",u=1-p*o),this.showIndicators){var v=this.center%this.count,f=this.$indicators.find(".indicator-item.active");f.index()!==v&&(f.removeClass("active"),this.$indicators.find(".indicator-item").eq(v)[0].classList.add("active"))}if(!this.noWrap||0<=this.center&&this.center=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"prev",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center-t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"set",value:function(t,e){if((void 0===t||isNaN(t))&&(t=0),t>this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t,e)}}],[{key:"init",value:function(t,e){return _get(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Carousel}},{key:"defaults",get:function(){return e}}]),i}();M.Carousel=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"carousel","M_Carousel")}(cash),function(S){"use strict";var e={onOpen:void 0,onClose:void 0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_TapTarget=i).options=S.extend({},n.defaults,e),i.isOpen=!1,i.$origin=S("#"+i.$el.attr("data-target")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(t){this.open()}},{key:"_handleOriginClick",value:function(t){this.close()}},{key:"_handleResize",value:function(t){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(t){S(t.target).closest(".tap-target-wrapper").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=S(this.wrapper).find(".tap-target-wave")[0],this.originEl=S(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],S(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(S(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var t="fixed"===this.$origin.css("position");if(!t)for(var e=this.$origin.parents(),i=0;i'+t.getAttribute("label")+"")[0]),i.each(function(t){var e=n._appendOptionWithIcon(n.$el,t,"optgroup-option");n._addOptionToValueDict(t,e)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),d(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&d(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var t=d('');if(this.$el.before(t[0]),!this.el.disabled){var e=d.extend({},this.options.dropdownOptions);e.onOpenEnd=function(t){var e=d(n.dropdownOptions).find(".selected").first();if(e.length&&(M.keyDown=!0,n.dropdown.focusedIndex=e.index(),n.dropdown._focusFocusedItem(),M.keyDown=!1,n.dropdown.isScrollable)){var i=e[0].getBoundingClientRect().top-n.dropdownOptions.getBoundingClientRect().top;i-=n.dropdownOptions.clientHeight/2,n.dropdownOptions.scrollTop=i}},this.isMultiple&&(e.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,e)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(t,e){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};e.id=n,s.el=t,s.optionEl=e,this._valueDict[n]=s}},{key:"_removeDropdown",value:function(){d(this.wrapper).find(".caret").remove(),d(this.input).remove(),d(this.dropdownOptions).remove(),d(this.wrapper).before(this.$el),d(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(t,e,i){var n=e.disabled?"disabled ":"",s="optgroup-option"===i?"optgroup-option ":"",o=this.isMultiple?'":e.innerHTML,a=d("
  • "),r=d("");r.html(o),a.addClass(n+" "+s),a.append(r);var l=e.getAttribute("data-icon");if(l){var h=d('');a.prepend(h)}return d(this.dropdownOptions).append(a[0]),a[0]}},{key:"_toggleEntryFromArray",value:function(t){var e=!this._keysSelected.hasOwnProperty(t),i=d(this._valueDict[t].optionEl);return e?this._keysSelected[t]=!0:delete this._keysSelected[t],i.toggleClass("selected",e),i.find('input[type="checkbox"]').prop("checked",e),i.prop("selected",e),e}},{key:"_setValueToInput",value:function(){var i=[];if(this.$el.find("option").each(function(t){if(d(t).prop("selected")){var e=d(t).text();i.push(e)}}),!i.length){var t=this.$el.find("option:disabled").eq(0);t.length&&""===t[0].value&&i.push(t.text())}this.input.value=i.join(", ")}},{key:"_setSelectedStates",value:function(){for(var t in this._keysSelected={},this._valueDict){var e=this._valueDict[t],i=d(e.el).prop("selected");d(e.optionEl).find('input[type="checkbox"]').prop("checked",i),i?(this._activateOption(d(this.dropdownOptions),d(e.optionEl)),this._keysSelected[t]=!0):d(e.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(t,e){e&&(this.isMultiple||t.find("li.selected").removeClass("selected"),d(e).addClass("selected"))}},{key:"getSelectedValues",value:function(){var t=[];for(var e in this._keysSelected)t.push(this._valueDict[e].el.value);return t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FormSelect}},{key:"defaults",get:function(){return e}}]),n}();M.FormSelect=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"formSelect","M_FormSelect")}(cash),function(s,e){"use strict";var i={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Range=i).options=s.extend({},n.defaults,e),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){s(this.value).html(this.$el.val()),s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(t){if(s(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),s(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==t.type){var e=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",e+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px"),s(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var t=7+parseInt(this.$el.css("padding-left"))+"px";s(this.thumb).hasClass("active")&&(e.remove(this.thumb),e({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:t,duration:100})),s(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),s(this.thumb).addClass("thumb"),s(this.value).addClass("value"),s(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){s(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var t=-7+parseInt(s(this.thumb).parent().css("padding-left"))+"px";e.remove(this.thumb),e({targets:this.thumb,height:30,width:30,top:-30,marginLeft:t,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var t=this.$el.width()-15,e=parseFloat(this.$el.attr("max"))||100,i=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-i)/(e-i)*t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Range}},{key:"defaults",get:function(){return i}}]),n}();M.Range=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"range","M_Range"),t.init(s("input[type=range]"))}(cash,M.anime); \ No newline at end of file diff --git a/src/materialize.scss b/src/materialize.scss index b607e006..e009ac98 100644 --- a/src/materialize.scss +++ b/src/materialize.scss @@ -1,42 +1,6 @@ @charset "UTF-8"; -// Color -@import "../node_modules/materialize-css/sass/components/color-variables"; -@import "../node_modules/materialize-css/sass/components/color-classes"; +@import "./scss/components/normalize"; -// Variables; -@import "../node_modules/materialize-css/sass/components/variables"; - -// Reset -@import "../node_modules/materialize-css/sass/components/normalize"; - -// components -@import "../node_modules/materialize-css/sass/components/global"; -/* @import "components/badges"; -@import "components/icons-material-design"; */ -@import "../node_modules/materialize-css/sass/components/grid"; -/* @import "components/navbar"; */ -@import "../node_modules/materialize-css/sass/components/typography"; -@import "../node_modules/materialize-css/sass/components/preloader"; -/* @import "components/transitions"; -@import "components/cards"; -@import "components/toast"; -@import "components/tabs"; -@import "components/tooltip"; -@import "components/buttons"; -@import "components/dropdown"; -@import "components/waves"; -@import "components/modal"; -@import "components/collapsible"; -@import "components/chips"; -@import "components/materialbox"; -@import "components/forms/forms"; -@import "components/table_of_contents"; -@import "components/sidenav"; -@import "components/preloader"; -@import "components/slider"; -@import "components/carousel"; -@import "components/tapTarget"; -@import "components/pulse"; -@import "components/datepicker"; -@import "components/timepicker"; */ +@import "./scss/components/global"; +@import "./scss/components/typography"; diff --git a/src/registerServiceWorker.js b/src/registerServiceWorker.js deleted file mode 100644 index 7c59aa3d..00000000 --- a/src/registerServiceWorker.js +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2018-present, Evgeny Nadymov - * - * This source code is licensed under the GPL v.3.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -//import TdLibController from './Controllers/TdLibController'; - -// In production, we register a service worker to serve assets from local cache. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on the "N+1" visit to a page, since previously -// cached resources are updated in the background. - -// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. -// This link also includes instructions on opting out of this behavior. - -const isLocalhost = - //false; - Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.1/8 is considered localhost for IPv4. - window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) - ); - -export default async function register() { - console.log('[SW] Register'); - - if('serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location); - if(publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 - return; - } - - const serviceWorkerName = - process.env.NODE_ENV === 'production' ? 'service-worker.js' : 'custom-service-worker.js'; - const swUrl = `${process.env.PUBLIC_URL}/${serviceWorkerName}`; - console.log(`[SW] Service worker url: ${swUrl}`); - - if(!isLocalhost) { - // Is not local host. Just register service worker - await registerValidSW(swUrl); - } else { - // This is running on localhost. Lets check if a service worker still exists or not. - await checkValidServiceWorker(swUrl); - } - } -} - -async function registerValidSW(swUrl) { - console.log('[SW] RegisterValidSW'); - try { - const registration = await navigator.serviceWorker.register(swUrl); - registration.onupdatefound = () => { - const installingWorker = registration.installing; - installingWorker.onstatechange = () => { - if(installingWorker.state === 'installed') { - if(navigator.serviceWorker.controller) { - // At this point, the old content will have been purged and - // the fresh content will have been added to the cache. - // It's the perfect time to display a "New content is - // available; please refresh." message in your web app. - console.log('[SW] New content is available; please refresh.'); - - ApplicationStore.emit('clientUpdateNewContentAvailable'); - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('[SW] Content is cached for offline use.'); - } - } - }; - }; - } catch (error) { - console.error('[SW] Error during service worker registration: ', error); - } -} - -async function checkValidServiceWorker(swUrl) { - console.log('[SW] CheckValidServiceWorker'); - // Check if the service worker can be found. If it can't reload the page. - try { - const response = await fetch(swUrl); - - // Ensure service worker exists, and that we really are getting a JS file. - if(response.status === 404 || response.headers.get('content-type').indexOf('javascript') === -1) { - // No service worker found. Probably a different app. Reload the page. - const registration = await navigator.serviceWorker.ready; - await registration.unregister(); - - window.location.reload(); - } else { - // Service worker found. Proceed as normal. - await registerValidSW(swUrl); - } - } catch(error) { - console.log('[SW] No internet connection found. App is running in offline mode.'); - } -} - -export async function unregister() { - if ('serviceWorker' in navigator) { - const registration = await navigator.serviceWorker.ready; - - await registration.unregister(); - } -} - -export async function update() { - if ('serviceWorker' in navigator) { - const registration = await navigator.serviceWorker.ready; - - await registration.update(); - } -} diff --git a/src/scss/components/_badges.scss b/src/scss/components/_badges.scss deleted file mode 100644 index ffed87dc..00000000 --- a/src/scss/components/_badges.scss +++ /dev/null @@ -1,55 +0,0 @@ -// Badges -span.badge { - min-width: 3rem; - padding: 0 6px; - margin-left: 14px; - text-align: center; - font-size: 1rem; - line-height: $badge-height; - height: $badge-height; - color: color('grey', 'darken-1'); - float: right; - box-sizing: border-box; - - &.new { - font-weight: 300; - font-size: 0.8rem; - color: #fff; - background-color: $badge-bg-color; - border-radius: 2px; - } - &.new:after { - content: " new"; - } - - &[data-badge-caption]::after { - content: " " attr(data-badge-caption); - } -} - -// Special cases -nav ul a span.badge { - display: inline-block; - float: none; - margin-left: 4px; - line-height: $badge-height; - height: $badge-height; - -webkit-font-smoothing: auto; -} - -// Line height centering -.collection-item span.badge { - margin-top: calc(#{$collection-line-height / 2} - #{$badge-height / 2}); -} -.collapsible span.badge { - margin-left: auto; -} -.sidenav span.badge { - margin-top: calc(#{$sidenav-line-height / 2} - #{$badge-height / 2}); -} - -table span.badge { - display: inline-block; - float: none; - margin-left: auto; -} diff --git a/src/scss/components/_buttons.scss b/src/scss/components/_buttons.scss deleted file mode 100644 index 44b80c8d..00000000 --- a/src/scss/components/_buttons.scss +++ /dev/null @@ -1,322 +0,0 @@ -// shared styles -.btn, -.btn-flat { - border: $button-border; - border-radius: $button-radius; - display: inline-block; - height: $button-height; - line-height: $button-height; - padding: $button-padding; - text-transform: uppercase; - vertical-align: middle; - -webkit-tap-highlight-color: transparent; // Gets rid of tap active state -} - -// Disabled shared style -.btn.disabled, -.btn-floating.disabled, -.btn-large.disabled, -.btn-small.disabled, -.btn-flat.disabled, -.btn:disabled, -.btn-floating:disabled, -.btn-large:disabled, -.btn-small:disabled, -.btn-flat:disabled, -.btn[disabled], -.btn-floating[disabled], -.btn-large[disabled], -.btn-small[disabled], -.btn-flat[disabled] { - pointer-events: none; - background-color: $button-disabled-background !important; - box-shadow: none; - color: $button-disabled-color !important; - cursor: default; - &:hover { - background-color: $button-disabled-background !important; - color: $button-disabled-color !important; - } -} - -// Shared icon styles -.btn, -.btn-floating, -.btn-large, -.btn-small, -.btn-flat { - font-size: $button-font-size; - outline: 0; - i { - font-size: $button-icon-font-size; - line-height: inherit; - } -} - -// Shared focus button style -.btn, -.btn-floating { - &:focus { - background-color: darken($button-raised-background, 10%); - } -} - -// Raised Button -.btn { - text-decoration: none; - color: $button-raised-color; - background-color: $button-raised-background; - text-align: center; - letter-spacing: .5px; - @extend .z-depth-1; - transition: background-color .2s ease-out; - cursor: pointer; - &:hover { - background-color: $button-raised-background-hover; - @extend .z-depth-1-half; - } -} - -// Floating button -.btn-floating { - &:hover { - background-color: $button-floating-background-hover; - @extend .z-depth-1-half; - } - &:before { - border-radius: 0; - } - &.btn-large { - &.halfway-fab { - bottom: -$button-floating-large-size / 2; - } - width: $button-floating-large-size; - height: $button-floating-large-size; - padding: 0; - i { - line-height: $button-floating-large-size; - } - } - - &.btn-small { - &.halfway-fab { - bottom: -$button-floating-small-size / 2; - } - width: $button-floating-small-size; - height: $button-floating-small-size; - i { - line-height: $button-floating-small-size; - } - } - - &.halfway-fab { - &.left { - right: auto; - left: 24px; - } - position: absolute; - right: 24px; - bottom: -$button-floating-size / 2; - } - display: inline-block; - color: $button-floating-color; - position: relative; - overflow: hidden; - z-index: 1; - width: $button-floating-size; - height: $button-floating-size; - line-height: $button-floating-size; - padding: 0; - background-color: $button-floating-background; - border-radius: $button-floating-radius; - @extend .z-depth-1; - transition: background-color .3s; - cursor: pointer; - vertical-align: middle; - i { - width: inherit; - display: inline-block; - text-align: center; - color: $button-floating-color; - font-size: $button-large-icon-font-size; - line-height: $button-floating-size; - } -} - -// button fix -button.btn-floating { - border: $button-border; -} - -// Fixed Action Button -.fixed-action-btn { - &.active { - ul { - visibility: visible; - } - } - - // Directions - &.direction-left, - &.direction-right { - padding: 0 0 0 15px; - ul { - text-align: right; - right: 64px; - top: 50%; - transform: translateY(-50%); - height: 100%; - left: auto; - /*width 100% only goes to width of button container */ - width: 500px; - li { - display: inline-block; - margin: 7.5px 15px 0 0; - } - } - } - &.direction-right { - padding: 0 15px 0 0; - ul { - text-align: left; - direction: rtl; - left: 64px; - right: auto; - li { - margin: 7.5px 0 0 15px; - } - } - } - &.direction-bottom { - padding: 0 0 15px 0; - ul { - top: 64px; - bottom: auto; - display: flex; - flex-direction: column-reverse; - li { - margin: 15px 0 0 0; - } - } - } - &.toolbar { - &.active { - &>a i { - opacity: 0; - } - } - padding: 0; - height: $button-floating-large-size; - ul { - display: flex; - top: 0; - bottom: 0; - z-index: 1; - li { - flex: 1; - display: inline-block; - margin: 0; - height: 100%; - transition: none; - a { - display: block; - overflow: hidden; - position: relative; - width: 100%; - height: 100%; - background-color: transparent; - box-shadow: none; - color: #fff; - line-height: $button-floating-large-size; - z-index: 1; - i { - line-height: inherit; - } - } - } - } - } - position: fixed; - right: 23px; - bottom: 23px; - padding-top: 15px; - margin-bottom: 0; - z-index: 997; - ul { - left: 0; - right: 0; - text-align: center; - position: absolute; - bottom: 64px; - margin: 0; - visibility: hidden; - li { - margin-bottom: 15px; - } - a.btn-floating { - opacity: 0; - } - } - .fab-backdrop { - position: absolute; - top: 0; - left: 0; - z-index: -1; - width: $button-floating-size; - height: $button-floating-size; - background-color: $button-floating-background; - border-radius: $button-floating-radius; - transform: scale(0); - } -} - -// Flat button -.btn-flat { - box-shadow: none; - background-color: transparent; - color: $button-flat-color; - cursor: pointer; - transition: background-color .2s; - &:focus, - &:hover { - box-shadow: none; - } - &:focus { - background-color: rgba(0, 0, 0, .1); - } - &.disabled, - &.btn-flat[disabled] { - background-color: transparent !important; - color: $button-flat-disabled-color !important; - cursor: default; - } -} - -// Large button -.btn-large { - @extend .btn; - height: $button-large-height; - line-height: $button-large-height; - font-size: $button-large-font-size; - padding: 0 28px; - - i { - font-size: $button-large-icon-font-size; - } -} - -// Small button -.btn-small { - @extend .btn; - height: $button-small-height; - line-height: $button-small-height; - font-size: $button-small-font-size; - i { - font-size: $button-small-icon-font-size; - } -} - -// Block button -.btn-block { - display: block; -} diff --git a/src/scss/components/_cards.scss b/src/scss/components/_cards.scss deleted file mode 100644 index fcbf28ec..00000000 --- a/src/scss/components/_cards.scss +++ /dev/null @@ -1,195 +0,0 @@ - - -.card-panel { - transition: box-shadow .25s; - padding: $card-padding; - margin: $element-top-margin 0 $element-bottom-margin 0; - border-radius: 2px; - @extend .z-depth-1; - background-color: $card-bg-color; -} - -.card { - position: relative; - margin: $element-top-margin 0 $element-bottom-margin 0; - background-color: $card-bg-color; - transition: box-shadow .25s; - border-radius: 2px; - @extend .z-depth-1; - - - .card-title { - font-size: 24px; - font-weight: 300; - &.activator { - cursor: pointer; - } - } - - // Card Sizes - &.small, &.medium, &.large { - position: relative; - - .card-image { - max-height: 60%; - overflow: hidden; - } - .card-image + .card-content { - max-height: 40%; - } - .card-content { - max-height: 100%; - overflow: hidden; - } - .card-action { - position: absolute; - bottom: 0; - left: 0; - right: 0; - } - } - - &.small { - height: 300px; - } - - &.medium { - height: 400px; - } - - &.large { - height: 500px; - } - - // Horizontal Cards - &.horizontal { - &.small, &.medium, &.large { - .card-image { - height: 100%; - max-height: none; - overflow: visible; - - img { - height: 100%; - } - } - } - - display: flex; - - .card-image { - max-width: 50%; - img { - border-radius: 2px 0 0 2px; - max-width: 100%; - width: auto; - } - } - - .card-stacked { - display: flex; - flex-direction: column; - flex: 1; - position: relative; - - .card-content { - flex-grow: 1; - } - } - } - - // Sticky Action Section - &.sticky-action { - .card-action { - z-index: 2; - } - - .card-reveal { - z-index: 1; - padding-bottom: 64px; - } - } - - - - - .card-image { - position: relative; - - // Image background for content - img { - display: block; - border-radius: 2px 2px 0 0; - position: relative; - left: 0; - right: 0; - top: 0; - bottom: 0; - width: 100%; - } - - .card-title { - color: $card-bg-color; - position: absolute; - bottom: 0; - left: 0; - max-width: 100%; - padding: $card-padding; - } - } - - .card-content { - padding: $card-padding; - border-radius: 0 0 2px 2px; - - p { - margin: 0; - } - .card-title { - display: block; - line-height: 32px; - margin-bottom: 8px; - - i { - line-height: 32px; - } - } - } - - .card-action { - &:last-child { - border-radius: 0 0 2px 2px; - } - background-color: inherit; // Use inherit to inherit color classes - border-top: 1px solid rgba(160,160,160,.2); - position: relative; - padding: 16px $card-padding; - - a:not(.btn):not(.btn-large):not(.btn-floating) { - color: $card-link-color; - margin-right: $card-padding; - transition: color .3s ease; - text-transform: uppercase; - - &:hover { color: $card-link-color-light; } - } - } - - .card-reveal { - padding: $card-padding; - position: absolute; - background-color: $card-bg-color; - width: 100%; - overflow-y: auto; - left: 0; - top: 100%; - height: 100%; - z-index: 3; - display: none; - - .card-title { - cursor: pointer; - display: block; - } - } -} diff --git a/src/scss/components/_carousel.scss b/src/scss/components/_carousel.scss deleted file mode 100644 index cc36d4b3..00000000 --- a/src/scss/components/_carousel.scss +++ /dev/null @@ -1,90 +0,0 @@ -.carousel { - &.carousel-slider { - top: 0; - left: 0; - - .carousel-fixed-item { - &.with-indicators { - bottom: 68px; - } - - position: absolute; - left: 0; - right: 0; - bottom: 20px; - z-index: 1; - } - - .carousel-item { - width: 100%; - height: 100%; - min-height: $carousel-height; - position: absolute; - top: 0; - left: 0; - - h2 { - font-size: 24px; - font-weight: 500; - line-height: 32px; - } - - p { - font-size: 15px; - } - } - } - - overflow: hidden; - position: relative; - width: 100%; - height: $carousel-height; - perspective: 500px; - transform-style: preserve-3d; - transform-origin: 0% 50%; - - .carousel-item { - visibility: hidden; - width: $carousel-item-width; - height: $carousel-item-height; - position: absolute; - top: 0; - left: 0; - - & > img { - width: 100%; - } - } - - .indicators { - position: absolute; - text-align: center; - left: 0; - right: 0; - bottom: 0; - margin: 0; - - .indicator-item { - &.active { - background-color: #fff; - } - - display: inline-block; - position: relative; - cursor: pointer; - height: 8px; - width: 8px; - margin: 24px 4px; - background-color: rgba(255,255,255,.5); - - transition: background-color .3s; - border-radius: 50%; - } - } - - // Materialbox compatibility - &.scrolling .carousel-item .materialboxed, - .carousel-item:not(.active) .materialboxed { - pointer-events: none; - } -} diff --git a/src/scss/components/_chips.scss b/src/scss/components/_chips.scss deleted file mode 100644 index 27744a8b..00000000 --- a/src/scss/components/_chips.scss +++ /dev/null @@ -1,90 +0,0 @@ -.chip { - &:focus { - outline: none; - background-color: $chip-selected-color; - color: #fff; - } - - display: inline-block; - height: 32px; - font-size: 13px; - font-weight: 500; - color: rgba(0,0,0,.6); - line-height: 32px; - padding: 0 12px; - border-radius: 16px; - background-color: $chip-bg-color; - margin-bottom: $chip-margin; - margin-right: $chip-margin; - - > img { - float: left; - margin: 0 8px 0 -12px; - height: 32px; - width: 32px; - border-radius: 50%; - } - - .close { - cursor: pointer; - float: right; - font-size: 16px; - line-height: 32px; - padding-left: 8px; - } -} - -.chips { - border: none; - border-bottom: 1px solid $chip-border-color; - box-shadow: none; - margin: $input-margin; - min-height: 45px; - outline: none; - transition: all .3s; - - &.focus { - border-bottom: 1px solid $chip-selected-color; - box-shadow: 0 1px 0 0 $chip-selected-color; - } - - &:hover { - cursor: text; - } - - .input { - background: none; - border: 0; - color: rgba(0,0,0,.6); - display: inline-block; - font-size: $input-font-size; - height: $input-height; - line-height: 32px; - outline: 0; - margin: 0; - padding: 0 !important; - width: 120px !important; - } - - .input:focus { - border: 0 !important; - box-shadow: none !important; - } - - // Autocomplete - .autocomplete-content { - margin-top: 0; - margin-bottom: 0; - } -} - -// Form prefix -.prefix ~ .chips { - margin-left: 3rem; - width: 92%; - width: calc(100% - 3rem); -} -.chips:empty ~ label { - font-size: 0.8rem; - transform: translateY(-140%); -} diff --git a/src/scss/components/_collapsible.scss b/src/scss/components/_collapsible.scss deleted file mode 100644 index 024324fd..00000000 --- a/src/scss/components/_collapsible.scss +++ /dev/null @@ -1,91 +0,0 @@ -.collapsible { - border-top: 1px solid $collapsible-border-color; - border-right: 1px solid $collapsible-border-color; - border-left: 1px solid $collapsible-border-color; - margin: $element-top-margin 0 $element-bottom-margin 0; - @extend .z-depth-1; -} - -.collapsible-header { - &:focus { - outline: 0 - } - - display: flex; - cursor: pointer; - -webkit-tap-highlight-color: transparent; - line-height: 1.5; - padding: 1rem; - background-color: $collapsible-header-color; - border-bottom: 1px solid $collapsible-border-color; - - i { - width: 2rem; - font-size: 1.6rem; - display: inline-block; - text-align: center; - margin-right: 1rem; - } -} -.keyboard-focused .collapsible-header:focus { - background-color: #eee; -} - -.collapsible-body { - display: none; - border-bottom: 1px solid $collapsible-border-color; - box-sizing: border-box; - padding: 2rem; -} - -// Sidenav collapsible styling -.sidenav, -.sidenav.fixed { - - .collapsible { - border: none; - box-shadow: none; - - li { padding: 0; } - } - - .collapsible-header { - background-color: transparent; - border: none; - line-height: inherit; - height: inherit; - padding: 0 $sidenav-padding; - - &:hover { background-color: rgba(0,0,0,.05); } - i { line-height: inherit; } - } - - .collapsible-body { - border: 0; - background-color: $collapsible-header-color; - - li a { - padding: 0 (7.5px + $sidenav-padding) - 0 (15px + $sidenav-padding); - } - } - -} - -// Popout Collapsible - -.collapsible.popout { - border: none; - box-shadow: none; - > li { - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); - // transform: scaleX(.92); - margin: 0 24px; - transition: margin .35s cubic-bezier(0.250, 0.460, 0.450, 0.940); - } - > li.active { - box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15); - margin: 16px 0; - // transform: scaleX(1); - } -} diff --git a/src/scss/components/_color-classes.scss b/src/scss/components/_color-classes.scss deleted file mode 100644 index 155cecd1..00000000 --- a/src/scss/components/_color-classes.scss +++ /dev/null @@ -1,32 +0,0 @@ -// Color Classes - -@each $color_name, $color in $colors { - @each $color_type, $color_value in $color { - @if $color_type == "base" { - .#{$color_name} { - background-color: $color_value !important; - } - .#{$color_name}-text { - color: $color_value !important; - } - } - @else if $color_name != "shades" { - .#{$color_name}.#{$color_type} { - background-color: $color_value !important; - } - .#{$color_name}-text.text-#{$color_type} { - color: $color_value !important; - } - } - } -} - -// Shade classes -@each $color, $color_value in $shades { - .#{$color} { - background-color: $color_value !important; - } - .#{$color}-text { - color: $color_value !important; - } -} diff --git a/src/scss/components/_color-variables.scss b/src/scss/components/_color-variables.scss deleted file mode 100644 index 062f6a56..00000000 --- a/src/scss/components/_color-variables.scss +++ /dev/null @@ -1,370 +0,0 @@ -// Google Color Palette defined: http://www.google.com/design/spec/style/color.html - -$materialize-red: ( - "base": #e51c23, - "lighten-5": #fdeaeb, - "lighten-4": #f8c1c3, - "lighten-3": #f3989b, - "lighten-2": #ee6e73, - "lighten-1": #ea454b, - "darken-1": #d0181e, - "darken-2": #b9151b, - "darken-3": #a21318, - "darken-4": #8b1014, -); - -$red: ( - "base": #F44336, - "lighten-5": #FFEBEE, - "lighten-4": #FFCDD2, - "lighten-3": #EF9A9A, - "lighten-2": #E57373, - "lighten-1": #EF5350, - "darken-1": #E53935, - "darken-2": #D32F2F, - "darken-3": #C62828, - "darken-4": #B71C1C, - "accent-1": #FF8A80, - "accent-2": #FF5252, - "accent-3": #FF1744, - "accent-4": #D50000 -); - -$pink: ( - "base": #e91e63, - "lighten-5": #fce4ec, - "lighten-4": #f8bbd0, - "lighten-3": #f48fb1, - "lighten-2": #f06292, - "lighten-1": #ec407a, - "darken-1": #d81b60, - "darken-2": #c2185b, - "darken-3": #ad1457, - "darken-4": #880e4f, - "accent-1": #ff80ab, - "accent-2": #ff4081, - "accent-3": #f50057, - "accent-4": #c51162 -); - -$purple: ( - "base": #9c27b0, - "lighten-5": #f3e5f5, - "lighten-4": #e1bee7, - "lighten-3": #ce93d8, - "lighten-2": #ba68c8, - "lighten-1": #ab47bc, - "darken-1": #8e24aa, - "darken-2": #7b1fa2, - "darken-3": #6a1b9a, - "darken-4": #4a148c, - "accent-1": #ea80fc, - "accent-2": #e040fb, - "accent-3": #d500f9, - "accent-4": #aa00ff -); - -$deep-purple: ( - "base": #673ab7, - "lighten-5": #ede7f6, - "lighten-4": #d1c4e9, - "lighten-3": #b39ddb, - "lighten-2": #9575cd, - "lighten-1": #7e57c2, - "darken-1": #5e35b1, - "darken-2": #512da8, - "darken-3": #4527a0, - "darken-4": #311b92, - "accent-1": #b388ff, - "accent-2": #7c4dff, - "accent-3": #651fff, - "accent-4": #6200ea -); - -$indigo: ( - "base": #3f51b5, - "lighten-5": #e8eaf6, - "lighten-4": #c5cae9, - "lighten-3": #9fa8da, - "lighten-2": #7986cb, - "lighten-1": #5c6bc0, - "darken-1": #3949ab, - "darken-2": #303f9f, - "darken-3": #283593, - "darken-4": #1a237e, - "accent-1": #8c9eff, - "accent-2": #536dfe, - "accent-3": #3d5afe, - "accent-4": #304ffe -); - -$blue: ( - "base": #2196F3, - "lighten-5": #E3F2FD, - "lighten-4": #BBDEFB, - "lighten-3": #90CAF9, - "lighten-2": #64B5F6, - "lighten-1": #42A5F5, - "darken-1": #1E88E5, - "darken-2": #1976D2, - "darken-3": #1565C0, - "darken-4": #0D47A1, - "accent-1": #82B1FF, - "accent-2": #448AFF, - "accent-3": #2979FF, - "accent-4": #2962FF -); - -$light-blue: ( - "base": #03a9f4, - "lighten-5": #e1f5fe, - "lighten-4": #b3e5fc, - "lighten-3": #81d4fa, - "lighten-2": #4fc3f7, - "lighten-1": #29b6f6, - "darken-1": #039be5, - "darken-2": #0288d1, - "darken-3": #0277bd, - "darken-4": #01579b, - "accent-1": #80d8ff, - "accent-2": #40c4ff, - "accent-3": #00b0ff, - "accent-4": #0091ea -); - -$cyan: ( - "base": #00bcd4, - "lighten-5": #e0f7fa, - "lighten-4": #b2ebf2, - "lighten-3": #80deea, - "lighten-2": #4dd0e1, - "lighten-1": #26c6da, - "darken-1": #00acc1, - "darken-2": #0097a7, - "darken-3": #00838f, - "darken-4": #006064, - "accent-1": #84ffff, - "accent-2": #18ffff, - "accent-3": #00e5ff, - "accent-4": #00b8d4 -); - -$teal: ( - "base": #009688, - "lighten-5": #e0f2f1, - "lighten-4": #b2dfdb, - "lighten-3": #80cbc4, - "lighten-2": #4db6ac, - "lighten-1": #26a69a, - "darken-1": #00897b, - "darken-2": #00796b, - "darken-3": #00695c, - "darken-4": #004d40, - "accent-1": #a7ffeb, - "accent-2": #64ffda, - "accent-3": #1de9b6, - "accent-4": #00bfa5 -); - -$green: ( - "base": #4CAF50, - "lighten-5": #E8F5E9, - "lighten-4": #C8E6C9, - "lighten-3": #A5D6A7, - "lighten-2": #81C784, - "lighten-1": #66BB6A, - "darken-1": #43A047, - "darken-2": #388E3C, - "darken-3": #2E7D32, - "darken-4": #1B5E20, - "accent-1": #B9F6CA, - "accent-2": #69F0AE, - "accent-3": #00E676, - "accent-4": #00C853 -); - -$light-green: ( - "base": #8bc34a, - "lighten-5": #f1f8e9, - "lighten-4": #dcedc8, - "lighten-3": #c5e1a5, - "lighten-2": #aed581, - "lighten-1": #9ccc65, - "darken-1": #7cb342, - "darken-2": #689f38, - "darken-3": #558b2f, - "darken-4": #33691e, - "accent-1": #ccff90, - "accent-2": #b2ff59, - "accent-3": #76ff03, - "accent-4": #64dd17 -); - -$lime: ( - "base": #cddc39, - "lighten-5": #f9fbe7, - "lighten-4": #f0f4c3, - "lighten-3": #e6ee9c, - "lighten-2": #dce775, - "lighten-1": #d4e157, - "darken-1": #c0ca33, - "darken-2": #afb42b, - "darken-3": #9e9d24, - "darken-4": #827717, - "accent-1": #f4ff81, - "accent-2": #eeff41, - "accent-3": #c6ff00, - "accent-4": #aeea00 -); - -$yellow: ( - "base": #ffeb3b, - "lighten-5": #fffde7, - "lighten-4": #fff9c4, - "lighten-3": #fff59d, - "lighten-2": #fff176, - "lighten-1": #ffee58, - "darken-1": #fdd835, - "darken-2": #fbc02d, - "darken-3": #f9a825, - "darken-4": #f57f17, - "accent-1": #ffff8d, - "accent-2": #ffff00, - "accent-3": #ffea00, - "accent-4": #ffd600 -); - -$amber: ( - "base": #ffc107, - "lighten-5": #fff8e1, - "lighten-4": #ffecb3, - "lighten-3": #ffe082, - "lighten-2": #ffd54f, - "lighten-1": #ffca28, - "darken-1": #ffb300, - "darken-2": #ffa000, - "darken-3": #ff8f00, - "darken-4": #ff6f00, - "accent-1": #ffe57f, - "accent-2": #ffd740, - "accent-3": #ffc400, - "accent-4": #ffab00 -); - -$orange: ( - "base": #ff9800, - "lighten-5": #fff3e0, - "lighten-4": #ffe0b2, - "lighten-3": #ffcc80, - "lighten-2": #ffb74d, - "lighten-1": #ffa726, - "darken-1": #fb8c00, - "darken-2": #f57c00, - "darken-3": #ef6c00, - "darken-4": #e65100, - "accent-1": #ffd180, - "accent-2": #ffab40, - "accent-3": #ff9100, - "accent-4": #ff6d00 -); - -$deep-orange: ( - "base": #ff5722, - "lighten-5": #fbe9e7, - "lighten-4": #ffccbc, - "lighten-3": #ffab91, - "lighten-2": #ff8a65, - "lighten-1": #ff7043, - "darken-1": #f4511e, - "darken-2": #e64a19, - "darken-3": #d84315, - "darken-4": #bf360c, - "accent-1": #ff9e80, - "accent-2": #ff6e40, - "accent-3": #ff3d00, - "accent-4": #dd2c00 -); - -$brown: ( - "base": #795548, - "lighten-5": #efebe9, - "lighten-4": #d7ccc8, - "lighten-3": #bcaaa4, - "lighten-2": #a1887f, - "lighten-1": #8d6e63, - "darken-1": #6d4c41, - "darken-2": #5d4037, - "darken-3": #4e342e, - "darken-4": #3e2723 -); - -$blue-grey: ( - "base": #607d8b, - "lighten-5": #eceff1, - "lighten-4": #cfd8dc, - "lighten-3": #b0bec5, - "lighten-2": #90a4ae, - "lighten-1": #78909c, - "darken-1": #546e7a, - "darken-2": #455a64, - "darken-3": #37474f, - "darken-4": #263238 -); - -$grey: ( - "base": #9e9e9e, - "lighten-5": #fafafa, - "lighten-4": #f5f5f5, - "lighten-3": #eeeeee, - "lighten-2": #e0e0e0, - "lighten-1": #bdbdbd, - "darken-1": #757575, - "darken-2": #616161, - "darken-3": #424242, - "darken-4": #212121 -); - -$shades: ( - "black": #000000, - "white": #FFFFFF, - "transparent": transparent -); - -$colors: ( - "materialize-red": $materialize-red, - "red": $red, - "pink": $pink, - "purple": $purple, - "deep-purple": $deep-purple, - "indigo": $indigo, - "blue": $blue, - "light-blue": $light-blue, - "cyan": $cyan, - "teal": $teal, - "green": $green, - "light-green": $light-green, - "lime": $lime, - "yellow": $yellow, - "amber": $amber, - "orange": $orange, - "deep-orange": $deep-orange, - "brown": $brown, - "blue-grey": $blue-grey, - "grey": $grey, - "shades": $shades -) !default; - - -// usage: color("name_of_color", "type_of_color") -// to avoid to repeating map-get($colors, ...) - -@function color($color, $type) { - @if map-has-key($colors, $color) { - $curr_color: map-get($colors, $color); - @if map-has-key($curr_color, $type) { - @return map-get($curr_color, $type); - } - } - @warn "Unknown `#{$color}` - `#{$type}` in $colors."; - @return null; -} diff --git a/src/scss/components/_datepicker.scss b/src/scss/components/_datepicker.scss deleted file mode 100644 index d2c920b2..00000000 --- a/src/scss/components/_datepicker.scss +++ /dev/null @@ -1,191 +0,0 @@ -/* Modal */ -.datepicker-modal { - max-width: 325px; - min-width: 300px; - max-height: none; -} - -.datepicker-container.modal-content { - display: flex; - flex-direction: column; - padding: 0; -} - -.datepicker-controls { - display: flex; - justify-content: space-between; - width: 280px; - margin: 0 auto; - - .selects-container { - display: flex; - } - - .select-wrapper { - input { - &:focus { - border-bottom: none; - } - border-bottom: none; - text-align: center; - margin: 0; - } - - .caret { - display: none; - } - } - - .select-year input { - width: 50px; - } - - .select-month input { - width: 70px; - } -} - -.month-prev, .month-next { - margin-top: 4px; - cursor: pointer; - background-color: transparent; - border: none; -} - - -/* Date Display */ -.datepicker-date-display { - flex: 1 auto; - background-color: $secondary-color; - color: #fff; - padding: 20px 22px; - font-weight: 500; - - .year-text { - display: block; - font-size: 1.5rem; - line-height: 25px; - color: $datepicker-year; - } - - .date-text { - display: block; - font-size: 2.8rem; - line-height: 47px; - font-weight: 500; - } -} - - -/* Calendar */ -.datepicker-calendar-container { - flex: 2.5 auto; -} - -.datepicker-table { - width: 280px; - font-size: 1rem; - margin: 0 auto; - - thead { - border-bottom: none; - } - - th { - padding: 10px 5px; - text-align: center; - } - - tr { - border: none; - } - - abbr { - text-decoration: none; - color: $datepicker-calendar-header-color; - } - - td { - &.is-today { - color: $secondary-color; - } - - &.is-selected { - background-color: $secondary-color; - color: #fff; - } - - &.is-outside-current-month, - &.is-disabled { - color: $datepicker-disabled-day-color; - pointer-events: none; - } - - border-radius: 50%; - padding: 0; - } -} - -.datepicker-day-button { - &:focus { - background-color: $datepicker-day-focus; - } - - background-color: transparent; - border: none; - line-height: 38px; - display: block; - width: 100%; - border-radius: 50%; - padding: 0 5px; - cursor: pointer; - color: inherit; -} - - -/* Footer */ -.datepicker-footer { - width: 280px; - margin: 0 auto; - padding-bottom: 5px; - display: flex; - justify-content: space-between; -} - -.datepicker-cancel, -.datepicker-clear, -.datepicker-today, -.datepicker-done { - color: $secondary-color; - padding: 0 1rem; -} - -.datepicker-clear { - color: $error-color; -} - - -/* Media Queries */ -@media #{$medium-and-up} { - .datepicker-modal { - max-width: 625px; - } - - .datepicker-container.modal-content { - flex-direction: row; - } - - .datepicker-date-display { - flex: 0 1 270px; - } - - .datepicker-controls, - .datepicker-table, - .datepicker-footer { - width: 320px; - } - - .datepicker-day-button { - line-height: 44px; - } -} diff --git a/src/scss/components/_dropdown.scss b/src/scss/components/_dropdown.scss deleted file mode 100644 index 0caae65d..00000000 --- a/src/scss/components/_dropdown.scss +++ /dev/null @@ -1,85 +0,0 @@ -.dropdown-content { - &:focus { - outline: 0; - } - - - @extend .z-depth-1; - background-color: $dropdown-bg-color; - margin: 0; - display: none; - min-width: 100px; - overflow-y: auto; - opacity: 0; - position: absolute; - left: 0; - top: 0; - z-index: 9999; // TODO: Check if this doesn't break other things - transform-origin: 0 0; - - - li { - &:hover, &.active { - background-color: $dropdown-hover-bg-color; - } - - &:focus { - outline: none; - } - - &.divider { - min-height: 0; - height: 1px; - } - - & > a, & > span { - font-size: 16px; - color: $dropdown-color; - display: block; - line-height: 22px; - padding: (($dropdown-item-height - 22) / 2) 16px; - } - - & > span > label { - top: 1px; - left: 0; - height: 18px; - } - - // Icon alignment override - & > a > i { - height: inherit; - line-height: inherit; - float: left; - margin: 0 24px 0 0; - width: 24px; - } - - - clear: both; - color: $off-black; - cursor: pointer; - min-height: $dropdown-item-height; - line-height: 1.5rem; - width: 100%; - text-align: left; - } -} - -body.keyboard-focused { - .dropdown-content li:focus { - background-color: darken($dropdown-hover-bg-color, 8%); - } -} - -// Input field specificity bugfix -.input-field.col .dropdown-content [type="checkbox"] + label { - top: 1px; - left: 0; - height: 18px; - transform: none; -} - -.dropdown-trigger { - cursor: pointer; -} \ No newline at end of file diff --git a/src/scss/components/_global.scss b/src/scss/components/_global.scss index 39f33db0..965253d2 100644 --- a/src/scss/components/_global.scss +++ b/src/scss/components/_global.scss @@ -1,35 +1,17 @@ //Default styles html { - box-sizing: border-box; + box-sizing: border-box; } *, *:before, *:after { - box-sizing: inherit; -} - -body { - // display: flex; - // min-height: 100vh; - // flex-direction: column; -} - -main { - // flex: 1 0 auto; -} - -button, -input, -optgroup, -select, -textarea { - font-family: $font-stack; + box-sizing: inherit; } ul { &:not(.browser-default) { padding-left: 0; list-style-type: none; - + & > li { list-style-type: none; } @@ -37,9 +19,8 @@ ul { } a { - color: $link-color; - text-decoration: none; - + text-decoration: none; + // Gets rid of tap active state -webkit-tap-highlight-color: transparent; } @@ -66,8 +47,8 @@ a { /* 2dp elevation modified*/ .z-depth-1 { box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), - 0 3px 1px -2px rgba(0,0,0,0.12), - 0 1px 5px 0 rgba(0,0,0,0.2); + 0 3px 1px -2px rgba(0,0,0,0.12), + 0 1px 5px 0 rgba(0,0,0,0.2); } .z-depth-1-half { box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.14), 0 1px 7px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -1px rgba(0, 0, 0, 0.2); @@ -76,61 +57,44 @@ a { /* 6dp elevation modified*/ .z-depth-2 { box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), - 0 1px 10px 0 rgba(0,0,0,0.12), - 0 2px 4px -1px rgba(0,0,0,0.3); + 0 1px 10px 0 rgba(0,0,0,0.12), + 0 2px 4px -1px rgba(0,0,0,0.3); } /* 12dp elevation modified*/ .z-depth-3 { box-shadow: 0 8px 17px 2px rgba(0,0,0,0.14), - 0 3px 14px 2px rgba(0,0,0,0.12), - 0 5px 5px -3px rgba(0, 0, 0, 0.2); + 0 3px 14px 2px rgba(0,0,0,0.12), + 0 5px 5px -3px rgba(0, 0, 0, 0.2); } /* 16dp elevation */ .z-depth-4 { box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), - 0 6px 30px 5px rgba(0,0,0,0.12), - 0 8px 10px -7px rgba(0,0,0,0.2); + 0 6px 30px 5px rgba(0,0,0,0.12), + 0 8px 10px -7px rgba(0,0,0,0.2); } /* 24dp elevation */ .z-depth-5 { box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), - 0 9px 46px 8px rgba(0,0,0,0.12), - 0 11px 15px -7px rgba(0,0,0,0.2); + 0 9px 46px 8px rgba(0,0,0,0.12), + 0 11px 15px -7px rgba(0,0,0,0.2); } .hoverable { transition: box-shadow .25s; - + &:hover { box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); } } -// Dividers - -.divider { - height: 1px; - overflow: hidden; - background-color: color("grey", "lighten-2"); -} - - -// Blockquote - -blockquote { - margin: 20px 0; - padding-left: 1.5rem; - border-left: 5px solid $primary-color; -} - // Icon Styles i { line-height: inherit; - + &.left { float: left; margin-right: 15px; @@ -153,142 +117,8 @@ i { } } -// Images -img.responsive-img, -video.responsive-video { - max-width: 100%; - height: auto; -} - - -// Pagination - -.pagination { - - li { - display: inline-block; - border-radius: 2px; - text-align: center; - vertical-align: top; - height: 30px; - - a { - color: #444; - display: inline-block; - font-size: 1.2rem; - padding: 0 10px; - line-height: 30px; - } - - &.active a { color: #fff; } - - &.active { background-color: $primary-color; } - - &.disabled a { - cursor: default; - color: #999; - } - - i { - font-size: 2rem; - } - } - - - li.pages ul li { - display: inline-block; - float: none; - } -} -@media #{$medium-and-down} { - .pagination { - width: 100%; - - li.prev, - li.next { - width: 10%; - } - - li.pages { - width: 80%; - overflow: hidden; - white-space: nowrap; - } - } -} - -// Breadcrumbs -.breadcrumb { - font-size: 18px; - color: rgba(255,255,255, .7); - - i, - [class^="mdi-"], [class*="mdi-"], - i.material-icons { - display: inline-block; - float: left; - font-size: 24px; - } - - &:before { - content: '\E5CC'; - color: rgba(255,255,255, .7); - vertical-align: top; - display: inline-block; - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 25px; - margin: 0 10px 0 8px; - -webkit-font-smoothing: antialiased; - } - - &:first-child:before { - display: none; - } - - &:last-child { - color: #fff; - } -} - -// Parallax -.parallax-container { - position: relative; - overflow: hidden; - height: 500px; - - .parallax { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: -1; - - img { - opacity: 0; - position: absolute; - left: 50%; - bottom: 0; - min-width: 100%; - min-height: 100%; - transform: translate3d(0,0,0); - transform: translateX(-50%); - } - } -} - -// Pushpin -.pin-top, .pin-bottom { - position: relative; -} -.pinned { - position: fixed !important; -} - /********************* - Transition Classes +Transition Classes **********************/ ul.staggered-list li { @@ -300,424 +130,8 @@ ul.staggered-list li { transform-origin: 0 50%; } - -/********************* - Media Query Classes -**********************/ -.hide-on-small-only, .hide-on-small-and-down { - @media #{$small-and-down} { - display: none !important; - } -} -.hide-on-med-and-down { - @media #{$medium-and-down} { - display: none !important; - } -} -.hide-on-med-and-up { - @media #{$medium-and-up} { - display: none !important; - } -} -.hide-on-med-only { - @media only screen and (min-width: $small-screen) and (max-width: $medium-screen) { - display: none !important; - } -} -.hide-on-large-only { - @media #{$large-and-up} { - display: none !important; - } -} -.hide-on-extra-large-only { - @media #{$extra-large-and-up} { - display: none !important; - } -} -.show-on-extra-large { - @media #{$extra-large-and-up} { - display: block !important; - } -} -.show-on-large { - @media #{$large-and-up} { - display: block !important; - } -} -.show-on-medium { - @media only screen and (min-width: $small-screen) and (max-width: $medium-screen) { - display: block !important; - } -} -.show-on-small { - @media #{$small-and-down} { - display: block !important; - } -} -.show-on-medium-and-up { - @media #{$medium-and-up} { - display: block !important; - } -} -.show-on-medium-and-down { - @media #{$medium-and-down} { - display: block !important; - } -} - - -// Center text on mobile -.center-on-small-only { - @media #{$small-and-down} { - text-align: center; - } -} - -// Footer -.page-footer { - padding-top: 20px; - color: $footer-font-color; - background-color: $footer-bg-color; - - .footer-copyright { - overflow: hidden; - min-height: 50px; - display: flex; - align-items: center; - justify-content: space-between; - padding: 10px 0px; - color: $footer-copyright-font-color; - background-color: $footer-copyright-bg-color; - } -} - -// Tables -table, th, td { - border: none; -} - -table { - width:100%; - display: table; - border-collapse: collapse; - border-spacing: 0; - - &.striped { - tr { - border-bottom: none; - } - - > tbody { - > tr:nth-child(odd) { - background-color: $table-striped-color; - } - - > tr > td { - border-radius: 0; - } - } - } - - &.highlight > tbody > tr { - transition: background-color .25s ease; - &:hover { - background-color: $table-striped-color; - } - } - - &.centered { - thead tr th, tbody tr td { - text-align: center; - } - } -} - -tr { - border-bottom: 1px solid $table-border-color; -} - -td, th{ - padding: 15px 5px; - display: table-cell; - text-align: left; - vertical-align: middle; - border-radius: 2px; -} - -// Responsive Table -@media #{$medium-and-down} { - - table.responsive-table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - display: block; - position: relative; - - td:empty:before { - content: '\00a0'; - } - - th, - td { - margin: 0; - vertical-align: top; - } - - th { text-align: left; } - thead { - display: block; - float: left; - - tr { - display: block; - padding: 0 10px 0 0; - - th::before { - content: "\00a0"; - } - } - } - tbody { - display: block; - width: auto; - position: relative; - overflow-x: auto; - white-space: nowrap; - - tr { - display: inline-block; - vertical-align: top; - } - } - th { - display: block; - text-align: right; - } - td { - display: block; - min-height: 1.25em; - text-align: left; - } - tr { - border-bottom: none; - padding: 0 10px; - } - - /* sort out borders */ - thead { - border: 0; - border-right: 1px solid $table-border-color; - } - } - -} - - -// Collections -.collection { - margin: $element-top-margin 0 $element-bottom-margin 0; - border: 1px solid $collection-border-color; - border-radius: 2px; - overflow: hidden; - position: relative; - - .collection-item { - background-color: $collection-bg-color; - line-height: $collection-line-height; - padding: 10px 20px; - margin: 0; - border-bottom: 1px solid $collection-border-color; - - // Avatar Collection - &.avatar { - min-height: 84px; - padding-left: 72px; - position: relative; - - // Don't style circles inside preloader classes. - &:not(.circle-clipper) > .circle, - :not(.circle-clipper) > .circle { - position: absolute; - width: 42px; - height: 42px; - overflow: hidden; - left: 15px; - display: inline-block; - vertical-align: middle; - } - i.circle { - font-size: 18px; - line-height: 42px; - color: #fff; - background-color: #999; - text-align: center; - } - - - .title { - font-size: 16px; - } - - p { - margin: 0; - } - - .secondary-content { - position: absolute; - top: 16px; - right: 16px; - } - - } - - - &:last-child { - border-bottom: none; - } - - &.active { - background-color: $collection-active-bg-color; - color: $collection-active-color; - - .secondary-content { - color: #fff; - } - } - } - a.collection-item{ - display: block; - transition: .25s; - color: $collection-link-color; - &:not(.active) { - &:hover { - background-color: $collection-hover-bg-color; - } - } - } - - &.with-header { - .collection-header { - background-color: $collection-bg-color; - border-bottom: 1px solid $collection-border-color; - padding: 10px 20px; - } - .collection-item { - padding-left: 30px; - } - .collection-item.avatar { - padding-left: 72px; - } - } - -} -// Made less specific to allow easier overriding -.secondary-content { - float: right; - color: $secondary-color; -} -.collapsible .collection { - margin: 0; - border: none; -} - - - -// Responsive Videos -.video-container { - position: relative; - padding-bottom: 56.25%; - height: 0; - overflow: hidden; - - iframe, object, embed { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - } -} - -// Progress Bar -.progress { - position: relative; - height: 4px; - display: block; - width: 100%; - background-color: lighten($progress-bar-color, 40%); - border-radius: 2px; - margin: $element-top-margin 0 $element-bottom-margin 0; - overflow: hidden; - .determinate { - position: absolute; - top: 0; - left: 0; - bottom: 0; - background-color: $progress-bar-color; - transition: width .3s linear; - } - .indeterminate { - background-color: $progress-bar-color; - &:before { - content: ''; - position: absolute; - background-color: inherit; - top: 0; - left:0; - bottom: 0; - will-change: left, right; - // Custom bezier - animation: indeterminate 2.1s cubic-bezier(0.650, 0.815, 0.735, 0.395) infinite; - - } - &:after { - content: ''; - position: absolute; - background-color: inherit; - top: 0; - left:0; - bottom: 0; - will-change: left, right; - // Custom bezier - animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite; - animation-delay: 1.15s; - } - } -} -@keyframes indeterminate { - 0% { - left: -35%; - right:100%; - } - 60% { - left: 100%; - right: -90%; - } - 100% { - left: 100%; - right: -90%; - } -} - -@keyframes indeterminate-short { - 0% { - left: -200%; - right: 100%; - } - 60% { - left: 107%; - right: -8%; - } - 100% { - left: 107%; - right: -8%; - } -} - - /******************* - Utility Classes +Utility Classes *******************/ .hide { @@ -750,20 +164,3 @@ td, th{ .circle { border-radius: 50%; } - -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} - -.truncate { - display: block; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.no-padding { - padding: 0 !important; -} diff --git a/src/scss/components/_grid.scss b/src/scss/components/_grid.scss deleted file mode 100644 index 8892f050..00000000 --- a/src/scss/components/_grid.scss +++ /dev/null @@ -1,156 +0,0 @@ -.container { - margin: 0 auto; - max-width: 1280px; - width: 90%; -} -@media #{$medium-and-up} { - .container { - width: 85%; - } -} -@media #{$large-and-up} { - .container { - width: 70%; - } -} -.col .row { - margin-left: (-1 * $gutter-width / 2); - margin-right: (-1 * $gutter-width / 2); -} - -.section { - padding-top: 1rem; - padding-bottom: 1rem; - - &.no-pad { - padding: 0; - } - &.no-pad-bot { - padding-bottom: 0; - } - &.no-pad-top { - padding-top: 0; - } -} - - -// Mixins to eliminate code repitition -@mixin reset-offset { - margin-left: auto; - left: auto; - right: auto; -} -@mixin grid-classes($size, $i, $perc) { - &.offset-#{$size}#{$i} { - margin-left: $perc; - } - &.pull-#{$size}#{$i} { - right: $perc; - } - &.push-#{$size}#{$i} { - left: $perc; - } -} - - -.row { - margin-left: auto; - margin-right: auto; - margin-bottom: 20px; - - // Clear floating children - &:after { - content: ""; - display: table; - clear: both; - } - - .col { - float: left; - box-sizing: border-box; - padding: 0 $gutter-width / 2; - min-height: 1px; - - &[class*="push-"], - &[class*="pull-"] { - position: relative; - } - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - &.s#{$i} { - width: $perc; - @include reset-offset; - } - $i: $i + 1; - } - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - @include grid-classes("s", $i, $perc); - $i: $i + 1; - } - - @media #{$medium-and-up} { - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - &.m#{$i} { - width: $perc; - @include reset-offset; - } - $i: $i + 1 - } - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - @include grid-classes("m", $i, $perc); - $i: $i + 1; - } - } - - @media #{$large-and-up} { - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - &.l#{$i} { - width: $perc; - @include reset-offset; - } - $i: $i + 1; - } - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - @include grid-classes("l", $i, $perc); - $i: $i + 1; - } - } - - @media #{$extra-large-and-up} { - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - &.xl#{$i} { - width: $perc; - @include reset-offset; - } - $i: $i + 1; - } - - $i: 1; - @while $i <= $num-cols { - $perc: unquote((100 / ($num-cols / $i)) + "%"); - @include grid-classes("xl", $i, $perc); - $i: $i + 1; - } - } - } -} diff --git a/src/scss/components/_icons-material-design.scss b/src/scss/components/_icons-material-design.scss deleted file mode 100644 index 2aa6a4ae..00000000 --- a/src/scss/components/_icons-material-design.scss +++ /dev/null @@ -1,5 +0,0 @@ -/* This is needed for some mobile phones to display the Google Icon font properly */ -.material-icons { - text-rendering: optimizeLegibility; - font-feature-settings: 'liga'; -} diff --git a/src/scss/components/_materialbox.scss b/src/scss/components/_materialbox.scss deleted file mode 100644 index 30276672..00000000 --- a/src/scss/components/_materialbox.scss +++ /dev/null @@ -1,43 +0,0 @@ -.materialboxed { - &:hover { - &:not(.active) { - opacity: .8; - } - } - - display: block; - cursor: zoom-in; - position: relative; - transition: opacity .4s; - -webkit-backface-visibility: hidden; - - &.active { - cursor: zoom-out; - } -} - -#materialbox-overlay { - position:fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - background-color: #292929; - z-index: 1000; - will-change: opacity; -} - -.materialbox-caption { - position: fixed; - display: none; - color: #fff; - line-height: 50px; - bottom: 0; - left: 0; - width: 100%; - text-align: center; - padding: 0% 15%; - height: 50px; - z-index: 1000; - -webkit-font-smoothing: antialiased; -} \ No newline at end of file diff --git a/src/scss/components/_modal.scss b/src/scss/components/_modal.scss deleted file mode 100644 index 38cf3ce8..00000000 --- a/src/scss/components/_modal.scss +++ /dev/null @@ -1,94 +0,0 @@ -.modal { - &:focus { - outline: none; - } - - @extend .z-depth-5; - - display: none; - position: fixed; - left: 0; - right: 0; - background-color: #fafafa; - padding: 0; - max-height: 70%; - width: 55%; - margin: auto; - overflow-y: auto; - - border-radius: 2px; - will-change: top, opacity; - - @media #{$medium-and-down} { - width: 80%; - } - - h1,h2,h3,h4 { - margin-top: 0; - } - - .modal-content { - padding: 24px; - } - .modal-close { - cursor: pointer; - } - - .modal-footer { - border-radius: 0 0 2px 2px; - background-color: #fafafa; - padding: 4px 6px; - height: 56px; - width: 100%; - text-align: right; - - .btn, .btn-flat { - margin: 6px 0; - } - } -} -.modal-overlay { - position: fixed; - z-index: 999; - top: -25%; - left: 0; - bottom: 0; - right: 0; - height: 125%; - width: 100%; - background: #000; - display: none; - - will-change: opacity; -} - -// Modal with fixed action footer -.modal.modal-fixed-footer { - padding: 0; - height: 70%; - - .modal-content { - position: absolute; - height: calc(100% - 56px); - max-height: 100%; - width: 100%; - overflow-y: auto; - } - - .modal-footer { - border-top: 1px solid rgba(0,0,0,.1); - position: absolute; - bottom: 0; - } -} - -// Modal Bottom Sheet Style -.modal.bottom-sheet { - top: auto; - bottom: -100%; - margin: 0; - width: 100%; - max-height: 45%; - border-radius: 0; - will-change: bottom, opacity; -} diff --git a/src/scss/components/_navbar.scss b/src/scss/components/_navbar.scss deleted file mode 100644 index 0317bb26..00000000 --- a/src/scss/components/_navbar.scss +++ /dev/null @@ -1,208 +0,0 @@ -nav { - &.nav-extended { - height: auto; - - .nav-wrapper { - min-height: $navbar-height-mobile; - height: auto; - } - - .nav-content { - position: relative; - line-height: normal; - } - } - - color: $navbar-font-color; - @extend .z-depth-1; - background-color: $primary-color; - width: 100%; - height: $navbar-height-mobile; - line-height: $navbar-line-height-mobile; - - a { color: $navbar-font-color; } - - i, - [class^="mdi-"], [class*="mdi-"], - i.material-icons { - display: block; - font-size: 24px; - height: $navbar-height-mobile; - line-height: $navbar-line-height-mobile; - } - - .nav-wrapper { - position: relative; - height: 100%; - } - - @media #{$large-and-up} { - a.sidenav-trigger { display: none; } - } - - - // Collapse button - .sidenav-trigger { - float: left; - position: relative; - z-index: 1; - height: $navbar-height-mobile; - margin: 0 18px; - - i { - height: $navbar-height-mobile; - line-height: $navbar-line-height-mobile; - } - } - - - // Logo - .brand-logo { - position: absolute; - color: $navbar-font-color; - display: inline-block; - font-size: $navbar-brand-font-size; - padding: 0; - - &.center { - left: 50%; - transform: translateX(-50%); - } - - @media #{$medium-and-down} { - left: 50%; - transform: translateX(-50%); - - &.left, &.right { - padding: 0; - transform: none; - } - - &.left { left: 0.5rem; } - &.right { - right: 0.5rem; - left: auto; - } - } - - &.right { - right: 0.5rem; - padding: 0; - } - - i, - [class^="mdi-"], [class*="mdi-"], - i.material-icons { - float: left; - margin-right: 15px; - } - } - - - // Title - .nav-title { - display: inline-block; - font-size: 32px; - padding: 28px 0; - } - - - // Navbar Links - ul { - margin: 0; - - li { - transition: background-color .3s; - float: left; - padding: 0; - - &.active { - background-color: rgba(0,0,0,.1); - } - } - a { - transition: background-color .3s; - font-size: $navbar-font-size; - color: $navbar-font-color; - display: block; - padding: 0 15px; - cursor: pointer; - - &.btn, &.btn-large, &.btn-flat, &.btn-floating { - margin-top: -2px; - margin-left: 15px; - margin-right: 15px; - - & > .material-icons { - height: inherit; - line-height: inherit; - } - } - - &:hover { - background-color: rgba(0,0,0,.1); - } - } - - &.left { - float: left; - } - } - - // Navbar Search Form - form { - height: 100%; - } - - .input-field { - margin: 0; - height: 100%; - - input { - height: 100%; - font-size: 1.2rem; - border: none; - padding-left: 2rem; - - &:focus, &[type=text]:valid, &[type=password]:valid, - &[type=email]:valid, &[type=url]:valid, &[type=date]:valid { - border: none; - box-shadow: none; - } - } - - label { - top: 0; - left: 0; - - i { - color: rgba(255,255,255,.7); - transition: color .3s; - } - &.active i { color: $navbar-font-color; } - } - } -} - -// Fixed Navbar -.navbar-fixed { - position: relative; - height: $navbar-height-mobile; - z-index: 997; - - nav { - position: fixed; - } -} -@media #{$medium-and-up} { - nav.nav-extended .nav-wrapper { - min-height: $navbar-height; - } - nav, nav .nav-wrapper i, nav a.sidenav-trigger, nav a.sidenav-trigger i { - height: $navbar-height; - line-height: $navbar-line-height; - } - .navbar-fixed { - height: $navbar-height; - } -} diff --git a/src/scss/components/_normalize.scss b/src/scss/components/_normalize.scss index fa4e73dd..58f42d74 100644 --- a/src/scss/components/_normalize.scss +++ b/src/scss/components/_normalize.scss @@ -9,7 +9,7 @@ * IE on Windows Phone and in iOS. */ -html { + html { line-height: 1.15; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ diff --git a/src/scss/components/_preloader.scss b/src/scss/components/_preloader.scss deleted file mode 100644 index cfe29939..00000000 --- a/src/scss/components/_preloader.scss +++ /dev/null @@ -1,334 +0,0 @@ -/* - @license - Copyright (c) 2014 The Polymer Project Authors. All rights reserved. - This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - Code distributed by Google as part of the polymer project is also - subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt - */ - -/**************************/ -/* STYLES FOR THE SPINNER */ -/**************************/ - -/* - * Constants: - * STROKEWIDTH = 3px - * ARCSIZE = 270 degrees (amount of circle the arc takes up) - * ARCTIME = 1333ms (time it takes to expand and contract arc) - * ARCSTARTROT = 216 degrees (how much the start location of the arc - * should rotate each time, 216 gives us a - * 5 pointed star shape (it's 360/5 * 3). - * For a 7 pointed star, we might do - * 360/7 * 3 = 154.286) - * CONTAINERWIDTH = 28px - * SHRINK_TIME = 400ms - */ - - -.preloader-wrapper { - display: inline-block; - position: relative; - width: 50px; - height: 50px; - - &.small { - width: 36px; - height: 36px; - } - - &.big { - width: 64px; - height: 64px; - } - - &.active { - /* duration: 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */ - -webkit-animation: container-rotate 1568ms linear infinite; - animation: container-rotate 1568ms linear infinite; - } -} - -@-webkit-keyframes container-rotate { - to { -webkit-transform: rotate(360deg) } -} - -@keyframes container-rotate { - to { transform: rotate(360deg) } -} - -.spinner-layer { - position: absolute; - width: 100%; - height: 100%; - opacity: 0; - border-color: $spinner-default-color; -} - -.spinner-blue, -.spinner-blue-only { - border-color: #4285f4; -} - -.spinner-red, -.spinner-red-only { - border-color: #db4437; -} - -.spinner-yellow, -.spinner-yellow-only { - border-color: #f4b400; -} - -.spinner-green, -.spinner-green-only { - border-color: #0f9d58; -} - -/** - * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee): - * - * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't - * guarantee that the animation will start _exactly_ after that value. So we avoid using - * animation-delay and instead set custom keyframes for each color (as redundant as it - * seems). - * - * We write out each animation in full (instead of separating animation-name, - * animation-duration, etc.) because under the polyfill, Safari does not recognize those - * specific properties properly, treats them as -webkit-animation, and overrides the - * other animation rules. See https://github.com/Polymer/platform/issues/53. - */ -.active .spinner-layer.spinner-blue { - /* durations: 4 * ARCTIME */ - -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, blue-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; - animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, blue-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; -} - -.active .spinner-layer.spinner-red { - /* durations: 4 * ARCTIME */ - -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, red-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; - animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, red-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; -} - -.active .spinner-layer.spinner-yellow { - /* durations: 4 * ARCTIME */ - -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, yellow-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; - animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, yellow-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; -} - -.active .spinner-layer.spinner-green { - /* durations: 4 * ARCTIME */ - -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, green-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; - animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, green-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; -} - -.active .spinner-layer, -.active .spinner-layer.spinner-blue-only, -.active .spinner-layer.spinner-red-only, -.active .spinner-layer.spinner-yellow-only, -.active .spinner-layer.spinner-green-only { - /* durations: 4 * ARCTIME */ - opacity: 1; - -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; - animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; -} - -@-webkit-keyframes fill-unfill-rotate { - 12.5% { -webkit-transform: rotate(135deg); } /* 0.5 * ARCSIZE */ - 25% { -webkit-transform: rotate(270deg); } /* 1 * ARCSIZE */ - 37.5% { -webkit-transform: rotate(405deg); } /* 1.5 * ARCSIZE */ - 50% { -webkit-transform: rotate(540deg); } /* 2 * ARCSIZE */ - 62.5% { -webkit-transform: rotate(675deg); } /* 2.5 * ARCSIZE */ - 75% { -webkit-transform: rotate(810deg); } /* 3 * ARCSIZE */ - 87.5% { -webkit-transform: rotate(945deg); } /* 3.5 * ARCSIZE */ - to { -webkit-transform: rotate(1080deg); } /* 4 * ARCSIZE */ -} - -@keyframes fill-unfill-rotate { - 12.5% { transform: rotate(135deg); } /* 0.5 * ARCSIZE */ - 25% { transform: rotate(270deg); } /* 1 * ARCSIZE */ - 37.5% { transform: rotate(405deg); } /* 1.5 * ARCSIZE */ - 50% { transform: rotate(540deg); } /* 2 * ARCSIZE */ - 62.5% { transform: rotate(675deg); } /* 2.5 * ARCSIZE */ - 75% { transform: rotate(810deg); } /* 3 * ARCSIZE */ - 87.5% { transform: rotate(945deg); } /* 3.5 * ARCSIZE */ - to { transform: rotate(1080deg); } /* 4 * ARCSIZE */ -} - -@-webkit-keyframes blue-fade-in-out { - from { opacity: 1; } - 25% { opacity: 1; } - 26% { opacity: 0; } - 89% { opacity: 0; } - 90% { opacity: 1; } - 100% { opacity: 1; } -} - -@keyframes blue-fade-in-out { - from { opacity: 1; } - 25% { opacity: 1; } - 26% { opacity: 0; } - 89% { opacity: 0; } - 90% { opacity: 1; } - 100% { opacity: 1; } -} - -@-webkit-keyframes red-fade-in-out { - from { opacity: 0; } - 15% { opacity: 0; } - 25% { opacity: 1; } - 50% { opacity: 1; } - 51% { opacity: 0; } -} - -@keyframes red-fade-in-out { - from { opacity: 0; } - 15% { opacity: 0; } - 25% { opacity: 1; } - 50% { opacity: 1; } - 51% { opacity: 0; } -} - -@-webkit-keyframes yellow-fade-in-out { - from { opacity: 0; } - 40% { opacity: 0; } - 50% { opacity: 1; } - 75% { opacity: 1; } - 76% { opacity: 0; } -} - -@keyframes yellow-fade-in-out { - from { opacity: 0; } - 40% { opacity: 0; } - 50% { opacity: 1; } - 75% { opacity: 1; } - 76% { opacity: 0; } -} - -@-webkit-keyframes green-fade-in-out { - from { opacity: 0; } - 65% { opacity: 0; } - 75% { opacity: 1; } - 90% { opacity: 1; } - 100% { opacity: 0; } -} - -@keyframes green-fade-in-out { - from { opacity: 0; } - 65% { opacity: 0; } - 75% { opacity: 1; } - 90% { opacity: 1; } - 100% { opacity: 0; } -} - -/** - * Patch the gap that appear between the two adjacent div.circle-clipper while the - * spinner is rotating (appears on Chrome 38, Safari 7.1, and IE 11). - */ -.gap-patch { - position: absolute; - top: 0; - left: 45%; - width: 10%; - height: 100%; - overflow: hidden; - border-color: inherit; -} - -.gap-patch .circle { - width: 1000%; - left: -450%; -} - -.circle-clipper { - display: inline-block; - position: relative; - width: 50%; - height: 100%; - overflow: hidden; - border-color: inherit; - - .circle { - width: 200%; - height: 100%; - border-width: 3px; /* STROKEWIDTH */ - border-style: solid; - border-color: inherit; - border-bottom-color: transparent !important; - border-radius: 50%; - -webkit-animation: none; - animation: none; - position: absolute; - top: 0; - right: 0; - bottom: 0; - } - - &.left .circle { - left: 0; - border-right-color: transparent !important; - -webkit-transform: rotate(129deg); - transform: rotate(129deg); - } - &.right .circle { - left: -100%; - border-left-color: transparent !important; - -webkit-transform: rotate(-129deg); - transform: rotate(-129deg); - } -} - - - -.active .circle-clipper.left .circle { - /* duration: ARCTIME */ - -webkit-animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; - animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; -} - -.active .circle-clipper.right .circle { - /* duration: ARCTIME */ - -webkit-animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; - animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both; -} - -@-webkit-keyframes left-spin { - from { -webkit-transform: rotate(130deg); } - 50% { -webkit-transform: rotate(-5deg); } - to { -webkit-transform: rotate(130deg); } -} - -@keyframes left-spin { - from { transform: rotate(130deg); } - 50% { transform: rotate(-5deg); } - to { transform: rotate(130deg); } -} - -@-webkit-keyframes right-spin { - from { -webkit-transform: rotate(-130deg); } - 50% { -webkit-transform: rotate(5deg); } - to { -webkit-transform: rotate(-130deg); } -} - -@keyframes right-spin { - from { transform: rotate(-130deg); } - 50% { transform: rotate(5deg); } - to { transform: rotate(-130deg); } -} - -#spinnerContainer.cooldown { - /* duration: SHRINK_TIME */ - -webkit-animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0.0, 0.2, 1); - animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0.0, 0.2, 1); -} - -@-webkit-keyframes fade-out { - from { opacity: 1; } - to { opacity: 0; } -} - -@keyframes fade-out { - from { opacity: 1; } - to { opacity: 0; } -} diff --git a/src/scss/components/_pulse.scss b/src/scss/components/_pulse.scss deleted file mode 100644 index a690f367..00000000 --- a/src/scss/components/_pulse.scss +++ /dev/null @@ -1,34 +0,0 @@ -.pulse { - &::before { - content: ''; - display: block; - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - background-color: inherit; - border-radius: inherit; - transition: opacity .3s, transform .3s; - animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite; - z-index: -1; - } - - overflow: visible; - position: relative; -} - -@keyframes pulse-animation { - 0% { - opacity: 1; - transform: scale(1); - } - 50% { - opacity: 0; - transform: scale(1.5); - } - 100% { - opacity: 0; - transform: scale(1.5); - } -} diff --git a/src/scss/components/_sidenav.scss b/src/scss/components/_sidenav.scss deleted file mode 100644 index 98a71d8a..00000000 --- a/src/scss/components/_sidenav.scss +++ /dev/null @@ -1,216 +0,0 @@ -.sidenav { - position: fixed; - width: $sidenav-width; - left: 0; - top: 0; - margin: 0; - transform: translateX(-100%); - height: 100%; - height: calc(100% + 60px); - height: -moz-calc(100%); //Temporary Firefox Fix - padding-bottom: 60px; - background-color: $sidenav-bg-color; - z-index: 999; - overflow-y: auto; - will-change: transform; - backface-visibility: hidden; - transform: translateX(-105%); - - @extend .z-depth-1; - - // Right Align - &.right-aligned { - right: 0; - transform: translateX(105%); - left: auto; - transform: translateX(100%); - } - - .collapsible { - margin: 0; - } - - - li { - float: none; - line-height: $sidenav-line-height; - - &.active { background-color: rgba(0,0,0,.05); } - } - - li > a { - color: $sidenav-font-color; - display: block; - font-size: $sidenav-font-size; - font-weight: 500; - height: $sidenav-item-height; - line-height: $sidenav-line-height; - padding: 0 ($sidenav-padding * 2); - - &:hover { background-color: rgba(0,0,0,.05);} - - &.btn, &.btn-large, &.btn-flat, &.btn-floating { - margin: 10px 15px; - } - - &.btn, - &.btn-large, - &.btn-floating { color: $button-raised-color; } - &.btn-flat { color: $button-flat-color; } - - &.btn:hover, - &.btn-large:hover { background-color: lighten($button-raised-background, 5%); } - &.btn-floating:hover { background-color: $button-raised-background; } - - & > i, - & > [class^="mdi-"], li > a > [class*="mdi-"], - & > i.material-icons { - float: left; - height: $sidenav-item-height; - line-height: $sidenav-line-height; - margin: 0 ($sidenav-padding * 2) 0 0; - width: $sidenav-item-height / 2; - color: rgba(0,0,0,.54); - } - } - - - .divider { - margin: ($sidenav-padding / 2) 0 0 0; - } - - .subheader { - &:hover { - background-color: transparent; - } - - cursor: initial; - pointer-events: none; - color: rgba(0,0,0,.54); - font-size: $sidenav-font-size; - font-weight: 500; - line-height: $sidenav-line-height; - } - - .user-view { - position: relative; - padding: ($sidenav-padding * 2) ($sidenav-padding * 2) 0; - margin-bottom: $sidenav-padding / 2; - - & > a { - &:hover { background-color: transparent; } - height: auto; - padding: 0; - } - - .background { - overflow: hidden; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; - } - - .circle, .name, .email { - display: block; - } - - .circle { - height: 64px; - width: 64px; - } - - .name, - .email { - font-size: $sidenav-font-size; - line-height: $sidenav-line-height / 2; - } - - .name { - margin-top: 16px; - font-weight: 500; - } - - .email { - padding-bottom: 16px; - font-weight: 400; - } - } -} - - -// Touch interaction -.drag-target { - // Right Align - &.right-aligned { - right: 0; - } - - height: 100%; - width: 10px; - position: fixed; - top: 0; - z-index: 998; -} - - -// Fixed Sidenav shown -.sidenav.sidenav-fixed { - // Right Align - &.right-aligned { - right: 0; - left: auto; - } - - left: 0; - transform: translateX(0); - position: fixed; -} - -// Fixed Sidenav hide on smaller -@media #{$medium-and-down} { - .sidenav { - &.sidenav-fixed { - transform: translateX(-105%); - - &.right-aligned { - transform: translateX(105%); - } - } - - > a { - padding: 0 $sidenav-padding; - } - - .user-view { - padding: $sidenav-padding $sidenav-padding 0; - } - } -} - - -.sidenav .collapsible-body > ul:not(.collapsible) > li.active, -.sidenav.sidenav-fixed .collapsible-body > ul:not(.collapsible) > li.active { - background-color: $primary-color; - a { - color: $sidenav-bg-color; - } -} -.sidenav .collapsible-body { - padding: 0; -} - - -.sidenav-overlay { - position: fixed; - top: 0; - left: 0; - right: 0; - opacity: 0; - height: 120vh; - background-color: rgba(0,0,0,.5); - z-index: 997; - display: none; -} diff --git a/src/scss/components/_slider.scss b/src/scss/components/_slider.scss deleted file mode 100644 index 5d7c27ed..00000000 --- a/src/scss/components/_slider.scss +++ /dev/null @@ -1,92 +0,0 @@ -.slider { - position: relative; - height: 400px; - width: 100%; - - // Fullscreen slider - &.fullscreen { - height: 100%; - width: 100%; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - - ul.slides { - height: 100%; - } - - ul.indicators { - z-index: 2; - bottom: 30px; - } - } - - .slides { - background-color: $slider-bg-color; - margin: 0; - height: 400px; - - li { - opacity: 0; - position: absolute; - top: 0; - left: 0; - z-index: 1; - width: 100%; - height: inherit; - overflow: hidden; - - img { - height: 100%; - width: 100%; - background-size: cover; - background-position: center; - } - - .caption { - color: #fff; - position: absolute; - top: 15%; - left: 15%; - width: 70%; - opacity: 0; - - p { color: $slider-bg-color-light; } - } - - &.active { - z-index: 2; - } - } - } - - - .indicators { - position: absolute; - text-align: center; - left: 0; - right: 0; - bottom: 0; - margin: 0; - - .indicator-item { - display: inline-block; - position: relative; - cursor: pointer; - height: 16px; - width: 16px; - margin: 0 12px; - background-color: $slider-bg-color-light; - - transition: background-color .3s; - border-radius: 50%; - - &.active { - background-color: $slider-indicator-color; - } - } - } - -} \ No newline at end of file diff --git a/src/scss/components/_table_of_contents.scss b/src/scss/components/_table_of_contents.scss deleted file mode 100644 index 638009d9..00000000 --- a/src/scss/components/_table_of_contents.scss +++ /dev/null @@ -1,33 +0,0 @@ -/*************** - Nav List -***************/ -.table-of-contents { - &.fixed { - position: fixed; - } - - li { - padding: 2px 0; - } - a { - display: inline-block; - font-weight: 300; - color: #757575; - padding-left: 16px; - height: 1.5rem; - line-height: 1.5rem; - letter-spacing: .4; - display: inline-block; - - &:hover { - color: lighten(#757575, 20%); - padding-left: 15px; - border-left: 1px solid $primary-color; - } - &.active { - font-weight: 500; - padding-left: 14px; - border-left: 2px solid $primary-color; - } - } -} diff --git a/src/scss/components/_tabs.scss b/src/scss/components/_tabs.scss deleted file mode 100644 index 072d4b6c..00000000 --- a/src/scss/components/_tabs.scss +++ /dev/null @@ -1,99 +0,0 @@ -.tabs { - &.tabs-transparent { - background-color: transparent; - - .tab a, - .tab.disabled a, - .tab.disabled a:hover { - color: rgba(255,255,255,0.7); - } - - .tab a:hover, - .tab a.active { - color: #fff; - } - - .indicator { - background-color: #fff; - } - } - - &.tabs-fixed-width { - display: flex; - - .tab { - flex-grow: 1; - } - } - - position: relative; - overflow-x: auto; - overflow-y: hidden; - height: 48px; - width: 100%; - background-color: $tabs-bg-color; - margin: 0 auto; - white-space: nowrap; - - .tab { - display: inline-block; - text-align: center; - line-height: 48px; - height: 48px; - padding: 0; - margin: 0; - text-transform: uppercase; - - a { - &:focus, - &:focus.active { - background-color: transparentize($tabs-underline-color, .8); - outline: none; - } - - &:hover, - &.active { - background-color: transparent; - color: $tabs-text-color; - } - - color: rgba($tabs-text-color, .7); - display: block; - width: 100%; - height: 100%; - padding: 0 24px; - font-size: 14px; - text-overflow: ellipsis; - overflow: hidden; - transition: color .28s ease, background-color .28s ease; - } - - &.disabled a, - &.disabled a:hover { - color: rgba($tabs-text-color, .4); - cursor: default; - } - } - .indicator { - position: absolute; - bottom: 0; - height: 2px; - background-color: $tabs-underline-color; - will-change: left, right; - } -} - -// Fixed Sidenav hide on smaller -@media #{$medium-and-down} { - .tabs { - display: flex; - - .tab { - flex-grow: 1; - - a { - padding: 0 12px; - } - } - } -} diff --git a/src/scss/components/_tapTarget.scss b/src/scss/components/_tapTarget.scss deleted file mode 100644 index 49aecd56..00000000 --- a/src/scss/components/_tapTarget.scss +++ /dev/null @@ -1,103 +0,0 @@ -.tap-target-wrapper { - width: 800px; - height: 800px; - position: fixed; - z-index: 1000; - visibility: hidden; - transition: visibility 0s .3s; -} - -.tap-target-wrapper.open { - visibility: visible; - transition: visibility 0s; - - .tap-target { - transform: scale(1); - opacity: .95; - transition: - transform .3s cubic-bezier(.42,0,.58,1), - opacity .3s cubic-bezier(.42,0,.58,1); - } - - .tap-target-wave::before { - transform: scale(1); - } - .tap-target-wave::after { - visibility: visible; - animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite; - transition: - opacity .3s, - transform .3s, - visibility 0s 1s; - } -} - -.tap-target { - position: absolute; - font-size: 1rem; - border-radius: 50%; - background-color: $primary-color; - box-shadow: 0 20px 20px 0 rgba(0,0,0,0.14), 0 10px 50px 0 rgba(0,0,0,0.12), 0 30px 10px -20px rgba(0,0,0,0.2); - width: 100%; - height: 100%; - opacity: 0; - transform: scale(0); - transition: - transform .3s cubic-bezier(.42,0,.58,1), - opacity .3s cubic-bezier(.42,0,.58,1); -} - -.tap-target-content { - position: relative; - display: table-cell; -} - -.tap-target-wave { - &::before, - &::after { - content: ''; - display: block; - position: absolute; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: #ffffff; - } - &::before { - transform: scale(0); - transition: transform .3s; - } - &::after { - visibility: hidden; - transition: - opacity .3s, - transform .3s, - visibility 0s; - z-index: -1; - } - - position: absolute; - border-radius: 50%; - z-index: 10001; -} - -.tap-target-origin { - &:not(.btn), - &:not(.btn):hover { - background: none; - } - - top: 50%; - left: 50%; - transform: translate(-50%,-50%); - - z-index: 10002; - position: absolute !important; -} - -@media only screen and (max-width: 600px) { - .tap-target, .tap-target-wrapper { - width: 600px; - height: 600px; - } -} diff --git a/src/scss/components/_timepicker.scss b/src/scss/components/_timepicker.scss deleted file mode 100644 index fa602fbb..00000000 --- a/src/scss/components/_timepicker.scss +++ /dev/null @@ -1,183 +0,0 @@ -/* Timepicker Containers */ -.timepicker-modal { - max-width: 325px; - max-height: none; -} - -.timepicker-container.modal-content { - display: flex; - flex-direction: column; - padding: 0; -} - -.text-primary { - color: rgba(255, 255, 255, 1); -} - - -/* Clock Digital Display */ -.timepicker-digital-display { - flex: 1 auto; - background-color: $secondary-color; - padding: 10px; - font-weight: 300; -} - -.timepicker-text-container { - font-size: 4rem; - font-weight: bold; - text-align: center; - color: rgba(255, 255, 255, 0.6); - font-weight: 400; - position: relative; - user-select: none; -} - -.timepicker-span-hours, -.timepicker-span-minutes, -.timepicker-span-am-pm div { - cursor: pointer; -} - -.timepicker-span-hours { - margin-right: 3px; -} - -.timepicker-span-minutes { - margin-left: 3px; -} - -.timepicker-display-am-pm { - font-size: 1.3rem; - position: absolute; - right: 1rem; - bottom: 1rem; - font-weight: 400; -} - - -/* Analog Clock Display */ -.timepicker-analog-display { - flex: 2.5 auto; -} - -.timepicker-plate { - background-color: $timepicker-clock-plate-bg; - border-radius: 50%; - width: 270px; - height: 270px; - overflow: visible; - position: relative; - margin: auto; - margin-top: 25px; - margin-bottom: 5px; - user-select: none; -} - -.timepicker-canvas, -.timepicker-dial { - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; -} -.timepicker-minutes { - visibility: hidden; -} - -.timepicker-tick { - border-radius: 50%; - color: $timepicker-clock-color; - line-height: 40px; - text-align: center; - width: 40px; - height: 40px; - position: absolute; - cursor: pointer; - font-size: 15px; -} - -.timepicker-tick.active, -.timepicker-tick:hover { - background-color: transparentize($secondary-color, .75); -} -.timepicker-dial { - transition: transform 350ms, opacity 350ms; -} -.timepicker-dial-out { - &.timepicker-hours { - transform: scale(1.1, 1.1); - } - - &.timepicker-minutes { - transform: scale(.8, .8); - } - - opacity: 0; -} -.timepicker-canvas { - transition: opacity 175ms; - - line { - stroke: $secondary-color; - stroke-width: 4; - stroke-linecap: round; - } -} -.timepicker-canvas-out { - opacity: 0.25; -} -.timepicker-canvas-bearing { - stroke: none; - fill: $secondary-color; -} -.timepicker-canvas-bg { - stroke: none; - fill: $secondary-color; -} - - -/* Footer */ -.timepicker-footer { - margin: 0 auto; - padding: 5px 1rem; - display: flex; - justify-content: space-between; -} - -.timepicker-clear { - color: $error-color; -} - -.timepicker-close { - color: $secondary-color; -} - -.timepicker-clear, -.timepicker-close { - padding: 0 20px; -} - -/* Media Queries */ -@media #{$medium-and-up} { - .timepicker-modal { - max-width: 600px; - } - - .timepicker-container.modal-content { - flex-direction: row; - } - - .timepicker-text-container { - top: 32%; - } - - .timepicker-display-am-pm { - position: relative; - right: auto; - bottom: auto; - text-align: center; - margin-top: 1.2rem; - } -} diff --git a/src/scss/components/_toast.scss b/src/scss/components/_toast.scss deleted file mode 100644 index 412400ff..00000000 --- a/src/scss/components/_toast.scss +++ /dev/null @@ -1,58 +0,0 @@ -#toast-container { - display:block; - position: fixed; - z-index: 10000; - - @media #{$small-and-down} { - min-width: 100%; - bottom: 0%; - } - @media #{$medium-only} { - left: 5%; - bottom: 7%; - max-width: 90%; - } - @media #{$large-and-up} { - top: 10%; - right: 7%; - max-width: 86%; - } -} - -.toast { - @extend .z-depth-1; - border-radius: 2px; - top: 35px; - width: auto; - margin-top: 10px; - position: relative; - max-width:100%; - height: auto; - min-height: $toast-height; - line-height: 1.5em; - background-color: $toast-color; - padding: 10px 25px; - font-size: 1.1rem; - font-weight: 300; - color: $toast-text-color; - display: flex; - align-items: center; - justify-content: space-between; - cursor: default; - - .toast-action { - color: $toast-action-color; - font-weight: 500; - margin-right: -25px; - margin-left: 3rem; - } - - &.rounded{ - border-radius: 24px; - } - - @media #{$small-and-down} { - width: 100%; - border-radius: 0; - } -} diff --git a/src/scss/components/_tooltip.scss b/src/scss/components/_tooltip.scss deleted file mode 100644 index 5ec4299b..00000000 --- a/src/scss/components/_tooltip.scss +++ /dev/null @@ -1,32 +0,0 @@ -.material-tooltip { - padding: 10px 8px; - font-size: 1rem; - z-index: 2000; - background-color: transparent; - border-radius: 2px; - color: #fff; - min-height: 36px; - line-height: 120%; - opacity: 0; - position: absolute; - text-align: center; - max-width: calc(100% - 4px); - overflow: hidden; - left: 0; - top: 0; - pointer-events: none; - visibility: hidden; - background-color: #323232; -} - -.backdrop { - position: absolute; - opacity: 0; - height: 7px; - width: 14px; - border-radius: 0 0 50% 50%; - background-color: #323232; - z-index: -1; - transform-origin: 50% 0%; - visibility: hidden; -} diff --git a/src/scss/components/_transitions.scss b/src/scss/components/_transitions.scss deleted file mode 100644 index cb9f60db..00000000 --- a/src/scss/components/_transitions.scss +++ /dev/null @@ -1,13 +0,0 @@ -// Scale transition -.scale-transition { - &.scale-out { - transform: scale(0); - transition: transform .2s !important; - } - - &.scale-in { - transform: scale(1); - } - - transition: transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important; -} \ No newline at end of file diff --git a/src/scss/components/_typography.scss b/src/scss/components/_typography.scss index b9b93b3e..2a94424f 100644 --- a/src/scss/components/_typography.scss +++ b/src/scss/components/_typography.scss @@ -6,7 +6,7 @@ a { html{ line-height: 1.5; - @media only screen and (min-width: 0) { + /* @media only screen and (min-width: 0) { font-size: 14px; } @@ -16,11 +16,9 @@ html{ @media only screen and (min-width: $large-screen) { font-size: 15px; - } + } */ - font-family: $font-stack; font-weight: normal; - color: $off-black; } h1, h2, h3, h4, h5, h6 { font-weight: 400; @@ -29,32 +27,14 @@ h1, h2, h3, h4, h5, h6 { // Header Styles h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; } -h1 { font-size: $h1-fontsize; line-height: 110%; margin: ($h1-fontsize / 1.5) 0 ($h1-fontsize / 2.5) 0;} +/* h1 { font-size: $h1-fontsize; line-height: 110%; margin: ($h1-fontsize / 1.5) 0 ($h1-fontsize / 2.5) 0;} h2 { font-size: $h2-fontsize; line-height: 110%; margin: ($h2-fontsize / 1.5) 0 ($h2-fontsize / 2.5) 0;} h3 { font-size: $h3-fontsize; line-height: 110%; margin: ($h3-fontsize / 1.5) 0 ($h3-fontsize / 2.5) 0;} h4 { font-size: $h4-fontsize; line-height: 110%; margin: ($h4-fontsize / 1.5) 0 ($h4-fontsize / 2.5) 0;} h5 { font-size: $h5-fontsize; line-height: 110%; margin: ($h5-fontsize / 1.5) 0 ($h5-fontsize / 2.5) 0;} -h6 { font-size: $h6-fontsize; line-height: 110%; margin: ($h6-fontsize / 1.5) 0 ($h6-fontsize / 2.5) 0;} +h6 { font-size: $h6-fontsize; line-height: 110%; margin: ($h6-fontsize / 1.5) 0 ($h6-fontsize / 2.5) 0;} */ // Text Styles em { font-style: italic; } strong { font-weight: 500; } small { font-size: 75%; } -.light { font-weight: 300; } -.thin { font-weight: 200; } - - -.flow-text{ - $i: 0; - @while $i <= $intervals { - @media only screen and (min-width : 360 + ($i * $interval-size)) { - font-size: 1.2rem * (1 + (.02 * $i)); - } - $i: $i + 1; - } - - // Handle below 360px screen - @media only screen and (max-width: 360px) { - font-size: 1.2rem; - } -} diff --git a/src/scss/components/_variables.scss b/src/scss/components/_variables.scss deleted file mode 100644 index 4c59c127..00000000 --- a/src/scss/components/_variables.scss +++ /dev/null @@ -1,349 +0,0 @@ -// ========================================================================== -// Materialize variables -// ========================================================================== -// -// Table of Contents: -// -// 1. Colors -// 2. Badges -// 3. Buttons -// 4. Cards -// 5. Carousel -// 6. Collapsible -// 7. Chips -// 8. Date + Time Picker -// 9. Dropdown -// 10. Forms -// 11. Global -// 12. Grid -// 13. Navigation Bar -// 14. Side Navigation -// 15. Photo Slider -// 16. Spinners | Loaders -// 17. Tabs -// 18. Tables -// 19. Toasts -// 20. Typography -// 21. Footer -// 22. Flow Text -// 23. Collections -// 24. Progress Bar - - - -// 1. Colors -// ========================================================================== - -$primary-color: color("materialize-red", "lighten-2") !default; -$primary-color-light: lighten($primary-color, 15%) !default; -$primary-color-dark: darken($primary-color, 15%) !default; - -$secondary-color: color("teal", "lighten-1") !default; -$success-color: color("green", "base") !default; -$error-color: color("red", "base") !default; -$link-color: color("light-blue", "darken-1") !default; - - -// 2. Badges -// ========================================================================== - -$badge-bg-color: $secondary-color !default; -$badge-height: 22px !default; - - -// 3. Buttons -// ========================================================================== - -// Shared styles -$button-border: none !default; -$button-background-focus: lighten($secondary-color, 4%) !default; -$button-font-size: 14px !default; -$button-icon-font-size: 1.3rem !default; -$button-height: 36px !default; -$button-padding: 0 16px !default; -$button-radius: 2px !default; - -// Disabled styles -$button-disabled-background: #DFDFDF !default; -$button-disabled-color: #9F9F9F !default; - -// Raised buttons -$button-raised-background: $secondary-color !default; -$button-raised-background-hover: lighten($button-raised-background, 5%) !default; -$button-raised-color: #fff !default; - -// Large buttons -$button-large-font-size: 15px !default; -$button-large-icon-font-size: 1.6rem !default; -$button-large-height: $button-height * 1.5 !default; -$button-floating-large-size: 56px !default; - -// Small buttons -$button-small-font-size: 13px !default; -$button-small-icon-font-size: 1.2rem !default; -$button-small-height: $button-height * .9 !default; -$button-floating-small-size: $button-height * .9 !default; - -// Flat buttons -$button-flat-color: #343434 !default; -$button-flat-disabled-color: lighten(#999, 10%) !default; - -// Floating buttons -$button-floating-background: $secondary-color !default; -$button-floating-background-hover: $button-floating-background !default; -$button-floating-color: #fff !default; -$button-floating-size: 40px !default; -$button-floating-radius: 50% !default; - - -// 4. Cards -// ========================================================================== - -$card-padding: 24px !default; -$card-bg-color: #fff !default; -$card-link-color: color("orange", "accent-2") !default; -$card-link-color-light: lighten($card-link-color, 20%) !default; - - -// 5. Carousel -// ========================================================================== - -$carousel-height: 400px !default; -$carousel-item-height: $carousel-height / 2 !default; -$carousel-item-width: $carousel-item-height !default; - - -// 6. Collapsible -// ========================================================================== - -$collapsible-height: 3rem !default; -$collapsible-line-height: $collapsible-height !default; -$collapsible-header-color: #fff !default; -$collapsible-border-color: #ddd !default; - - -// 7. Chips -// ========================================================================== - -$chip-bg-color: #e4e4e4 !default; -$chip-border-color: #9e9e9e !default; -$chip-selected-color: #26a69a !default; -$chip-margin: 5px !default; - - -// 8. Date + Time Picker -// ========================================================================== - -$datepicker-display-font-size: 2.8rem; -$datepicker-calendar-header-color: #999; -$datepicker-weekday-color: rgba(0, 0, 0, .87) !default; -$datepicker-weekday-bg: darken($secondary-color, 7%) !default; -$datepicker-date-bg: $secondary-color !default; -$datepicker-year: rgba(255, 255, 255, .7) !default; -$datepicker-focus: rgba(0,0,0, .05) !default; -$datepicker-selected: $secondary-color !default; -$datepicker-selected-outfocus: desaturate(lighten($secondary-color, 35%), 15%) !default; -$datepicker-day-focus: transparentize(desaturate($secondary-color, 5%), .75) !default; -$datepicker-disabled-day-color: rgba(0, 0, 0, .3) !default; - -$timepicker-clock-color: rgba(0, 0, 0, .87) !default; -$timepicker-clock-plate-bg: #eee !default; - - -// 9. Dropdown -// ========================================================================== - -$dropdown-bg-color: #fff !default; -$dropdown-hover-bg-color: #eee !default; -$dropdown-color: $secondary-color !default; -$dropdown-item-height: 50px !default; - - -// 10. Forms -// ========================================================================== - -// Text Inputs + Textarea -$input-height: 3rem !default; -$input-border-color: color("grey", "base") !default; -$input-border: 1px solid $input-border-color !default; -$input-background: #fff !default; -$input-error-color: $error-color !default; -$input-success-color: $success-color !default; -$input-focus-color: $secondary-color !default; -$input-font-size: 16px !default; -$input-margin-bottom: 8px; -$input-margin: 0 0 $input-margin-bottom 0 !default; -$input-padding: 0 !default; -$label-font-size: .8rem !default; -$input-disabled-color: rgba(0,0,0, .42) !default; -$input-disabled-solid-color: #949494 !default; -$input-disabled-border: 1px dotted $input-disabled-color !default; -$input-invalid-border: 1px solid $input-error-color !default; -$input-icon-size: 2rem; -$placeholder-text-color: lighten($input-border-color, 20%) !default; - -// Radio Buttons -$radio-fill-color: $secondary-color !default; -$radio-empty-color: #5a5a5a !default; -$radio-border: 2px solid $radio-fill-color !default; - -// Range -$range-height: 14px !default; -$range-width: 14px !default; -$track-height: 3px !default; - -// Select -$select-border: 1px solid #f2f2f2 !default; -$select-background: rgba(255, 255, 255, 0.90) !default; -$select-focus: 1px solid lighten($secondary-color, 47%) !default; -$select-option-hover: rgba(0,0,0,.08) !default; -$select-option-focus: rgba(0,0,0,.08) !default; -$select-option-selected: rgba(0,0,0,.03) !default; -$select-padding: 5px !default; -$select-radius: 2px !default; -$select-disabled-color: rgba(0,0,0,.3) !default; - -// Switches -$switch-bg-color: $secondary-color !default; -$switch-checked-lever-bg: desaturate(lighten($switch-bg-color, 25%), 25%) !default; -$switch-unchecked-bg: #F1F1F1 !default; -$switch-unchecked-lever-bg: rgba(0,0,0,.38) !default; -$switch-radius: 15px !default; - - -// 11. Global -// ========================================================================== - -// Media Query Ranges -$small-screen-up: 601px !default; -$medium-screen-up: 993px !default; -$large-screen-up: 1201px !default; -$small-screen: 600px !default; -$medium-screen: 992px !default; -$large-screen: 1200px !default; - -$medium-and-up: "only screen and (min-width : #{$small-screen-up})" !default; -$large-and-up: "only screen and (min-width : #{$medium-screen-up})" !default; -$extra-large-and-up: "only screen and (min-width : #{$large-screen-up})" !default; -$small-and-down: "only screen and (max-width : #{$small-screen})" !default; -$medium-and-down: "only screen and (max-width : #{$medium-screen})" !default; -$medium-only: "only screen and (min-width : #{$small-screen-up}) and (max-width : #{$medium-screen})" !default; - - -// 12. Grid -// ========================================================================== - -$num-cols: 12 !default; -$gutter-width: 1.5rem !default; -$element-top-margin: $gutter-width/3 !default; -$element-bottom-margin: ($gutter-width*2)/3 !default; - - -// 13. Navigation Bar -// ========================================================================== - -$navbar-height: 64px !default; -$navbar-line-height: $navbar-height !default; -$navbar-height-mobile: 56px !default; -$navbar-line-height-mobile: $navbar-height-mobile !default; -$navbar-font-size: 1rem !default; -$navbar-font-color: #fff !default; -$navbar-brand-font-size: 2.1rem !default; - -// 14. Side Navigation -// ========================================================================== - -$sidenav-width: 300px !default; -$sidenav-font-size: 14px !default; -$sidenav-font-color: rgba(0,0,0,.87) !default; -$sidenav-bg-color: #fff !default; -$sidenav-padding: 16px !default; -$sidenav-item-height: 48px !default; -$sidenav-line-height: $sidenav-item-height !default; - - -// 15. Photo Slider -// ========================================================================== - -$slider-bg-color: color('grey', 'base') !default; -$slider-bg-color-light: color('grey', 'lighten-2') !default; -$slider-indicator-color: color('green', 'base') !default; - - -// 16. Spinners | Loaders -// ========================================================================== - -$spinner-default-color: $secondary-color !default; - - -// 17. Tabs -// ========================================================================== - -$tabs-underline-color: $primary-color-light !default; -$tabs-text-color: $primary-color !default; -$tabs-bg-color: #fff !default; - - -// 18. Tables -// ========================================================================== - -$table-border-color: rgba(0,0,0,.12) !default; -$table-striped-color: rgba(242, 242, 242, 0.5) !default; - - -// 19. Toasts -// ========================================================================== - -$toast-height: 48px !default; -$toast-color: #323232 !default; -$toast-text-color: #fff !default; -$toast-action-color: #eeff41; - - -// 20. Typography -// ========================================================================== - -$font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !default; -$off-black: rgba(0, 0, 0, 0.87) !default; -// Header Styles -$h1-fontsize: 4.2rem !default; -$h2-fontsize: 3.56rem !default; -$h3-fontsize: 2.92rem !default; -$h4-fontsize: 2.28rem !default; -$h5-fontsize: 1.64rem !default; -$h6-fontsize: 1.15rem !default; - - -// 21. Footer -// ========================================================================== - -$footer-font-color: #fff !default; -$footer-bg-color: $primary-color !default; -$footer-copyright-font-color: rgba(255,255,255,.8) !default; -$footer-copyright-bg-color: rgba(51,51,51,.08) !default; - - -// 22. Flow Text -// ========================================================================== - -$range : $large-screen - $small-screen !default; -$intervals: 20 !default; -$interval-size: $range / $intervals !default; - - -// 23. Collections -// ========================================================================== - -$collection-border-color: #e0e0e0 !default; -$collection-bg-color: #fff !default; -$collection-active-bg-color: $secondary-color !default; -$collection-active-color: lighten($secondary-color, 55%) !default; -$collection-hover-bg-color: #ddd !default; -$collection-link-color: $secondary-color !default; -$collection-line-height: 1.5rem !default; - - -// 24. Progress Bar -// ========================================================================== - -$progress-bar-color: $secondary-color !default; diff --git a/src/scss/components/_waves.scss b/src/scss/components/_waves.scss deleted file mode 100644 index b36c7181..00000000 --- a/src/scss/components/_waves.scss +++ /dev/null @@ -1,114 +0,0 @@ - -/*! - * Waves v0.6.0 - * http://fian.my.id/Waves - * - * Copyright 2014 Alfiana E. Sibuea and other contributors - * Released under the MIT license - * https://github.com/fians/Waves/blob/master/LICENSE - */ - - -.waves-effect { - position: relative; - cursor: pointer; - display: inline-block; - overflow: hidden; - user-select: none; - -webkit-tap-highlight-color: transparent; - vertical-align: middle; - z-index: 1; - transition: .3s ease-out; - - .waves-ripple { - position: absolute; - border-radius: 50%; - width: 20px; - height: 20px; - margin-top:-10px; - margin-left:-10px; - opacity: 0; - - background: rgba(0,0,0,0.2); - transition: all 0.7s ease-out; - transition-property: transform, opacity; - transform: scale(0); - pointer-events: none; - } - - // Waves Colors - &.waves-light .waves-ripple { - background-color: rgba(255, 255, 255, 0.45); - } - &.waves-red .waves-ripple { - background-color: rgba(244, 67, 54, .70); - } - &.waves-yellow .waves-ripple { - background-color: rgba(255, 235, 59, .70); - } - &.waves-orange .waves-ripple { - background-color: rgba(255, 152, 0, .70); - } - &.waves-purple .waves-ripple { - background-color: rgba(156, 39, 176, 0.70); - } - &.waves-green .waves-ripple { - background-color: rgba(76, 175, 80, 0.70); - } - &.waves-teal .waves-ripple { - background-color: rgba(0, 150, 136, 0.70); - } - - // Style input button bug. - input[type="button"], input[type="reset"], input[type="submit"] { - border: 0; - font-style: normal; - font-size: inherit; - text-transform: inherit; - background: none; - } - - img { - position: relative; - z-index: -1; - } -} - -.waves-notransition { - transition: none #{"!important"}; -} - -.waves-circle { - transform: translateZ(0); - -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%); -} - -.waves-input-wrapper { - border-radius: 0.2em; - vertical-align: bottom; - - .waves-button-input { - position: relative; - top: 0; - left: 0; - z-index: 1; - } -} - -.waves-circle { - text-align: center; - width: 2.5em; - height: 2.5em; - line-height: 2.5em; - border-radius: 50%; - -webkit-mask-image: none; -} - -.waves-block { - display: block; -} - -/* Firefox Bug: link not triggered */ -.waves-effect .waves-ripple { - z-index: -1; -} \ No newline at end of file diff --git a/src/scss/components/forms/_checkboxes.scss b/src/scss/components/forms/_checkboxes.scss deleted file mode 100644 index ddc7d961..00000000 --- a/src/scss/components/forms/_checkboxes.scss +++ /dev/null @@ -1,200 +0,0 @@ -/* Checkboxes - ========================================================================== */ - -/* Remove default checkbox */ -[type="checkbox"]:not(:checked), -[type="checkbox"]:checked { - position: absolute; - opacity: 0; - pointer-events: none; -} - -// Checkbox Styles -[type="checkbox"] { - // Text Label Style - + span:not(.lever) { - position: relative; - padding-left: 35px; - cursor: pointer; - display: inline-block; - height: 25px; - line-height: 25px; - font-size: 1rem; - user-select: none; - } - - /* checkbox aspect */ - + span:not(.lever):before, - &:not(.filled-in) + span:not(.lever):after { - content: ''; - position: absolute; - top: 0; - left: 0; - width: 18px; - height: 18px; - z-index: 0; - border: 2px solid $radio-empty-color; - border-radius: 1px; - margin-top: 3px; - transition: .2s; - } - - &:not(.filled-in) + span:not(.lever):after { - border: 0; - transform: scale(0); - } - - &:not(:checked):disabled + span:not(.lever):before { - border: none; - background-color: $input-disabled-color; - } - - // Focused styles - &.tabbed:focus + span:not(.lever):after { - transform: scale(1); - border: 0; - border-radius: 50%; - box-shadow: 0 0 0 10px rgba(0,0,0,.1); - background-color: rgba(0,0,0,.1); - } -} - -[type="checkbox"]:checked { - + span:not(.lever):before { - top: -4px; - left: -5px; - width: 12px; - height: 22px; - border-top: 2px solid transparent; - border-left: 2px solid transparent; - border-right: $radio-border; - border-bottom: $radio-border; - transform: rotate(40deg); - backface-visibility: hidden; - transform-origin: 100% 100%; - } - - &:disabled + span:before { - border-right: 2px solid $input-disabled-color; - border-bottom: 2px solid $input-disabled-color; - } -} - -/* Indeterminate checkbox */ -[type="checkbox"]:indeterminate { - + span:not(.lever):before { - top: -11px; - left: -12px; - width: 10px; - height: 22px; - border-top: none; - border-left: none; - border-right: $radio-border; - border-bottom: none; - transform: rotate(90deg); - backface-visibility: hidden; - transform-origin: 100% 100%; - } - - // Disabled indeterminate - &:disabled + span:not(.lever):before { - border-right: 2px solid $input-disabled-color; - background-color: transparent; - } -} - -// Filled in Style -[type="checkbox"].filled-in { - // General - + span:not(.lever):after { - border-radius: 2px; - } - - + span:not(.lever):before, - + span:not(.lever):after { - content: ''; - left: 0; - position: absolute; - /* .1s delay is for check animation */ - transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s; - z-index: 1; - } - - // Unchecked style - &:not(:checked) + span:not(.lever):before { - width: 0; - height: 0; - border: 3px solid transparent; - left: 6px; - top: 10px; - transform: rotateZ(37deg); - transform-origin: 100% 100%; - } - - &:not(:checked) + span:not(.lever):after { - height: 20px; - width: 20px; - background-color: transparent; - border: 2px solid $radio-empty-color; - top: 0px; - z-index: 0; - } - - // Checked style - &:checked { - + span:not(.lever):before { - top: 0; - left: 1px; - width: 8px; - height: 13px; - border-top: 2px solid transparent; - border-left: 2px solid transparent; - border-right: 2px solid $input-background; - border-bottom: 2px solid $input-background; - transform: rotateZ(37deg); - transform-origin: 100% 100%; - } - - + span:not(.lever):after { - top: 0; - width: 20px; - height: 20px; - border: 2px solid $secondary-color; - background-color: $secondary-color; - z-index: 0; - } - } - - // Focused styles - &.tabbed:focus + span:not(.lever):after { - border-radius: 2px; - border-color: $radio-empty-color; - background-color: rgba(0,0,0,.1); - } - - &.tabbed:checked:focus + span:not(.lever):after { - border-radius: 2px; - background-color: $secondary-color; - border-color: $secondary-color; - } - - // Disabled style - &:disabled:not(:checked) + span:not(.lever):before { - background-color: transparent; - border: 2px solid transparent; - } - - &:disabled:not(:checked) + span:not(.lever):after { - border-color: transparent; - background-color: $input-disabled-solid-color; - } - - &:disabled:checked + span:not(.lever):before { - background-color: transparent; - } - - &:disabled:checked + span:not(.lever):after { - background-color: $input-disabled-solid-color; - border-color: $input-disabled-solid-color; - } -} diff --git a/src/scss/components/forms/_file-input.scss b/src/scss/components/forms/_file-input.scss deleted file mode 100644 index e0f7ef73..00000000 --- a/src/scss/components/forms/_file-input.scss +++ /dev/null @@ -1,44 +0,0 @@ -/* File Input - ========================================================================== */ - -.file-field { - position: relative; - - .file-path-wrapper { - overflow: hidden; - padding-left: 10px; - } - - input.file-path { width: 100%; } - - .btn { - float: left; - height: $input-height; - line-height: $input-height; - } - - span { - cursor: pointer; - } - - input[type=file] { - - // Needed to override webkit button - &::-webkit-file-upload-button { - display: none; - } - - position: absolute; - top: 0; - right: 0; - left: 0; - bottom: 0; - width: 100%; - margin: 0; - padding: 0; - font-size: 20px; - cursor: pointer; - opacity: 0; - filter: alpha(opacity=0); - } -} diff --git a/src/scss/components/forms/_forms.scss b/src/scss/components/forms/_forms.scss deleted file mode 100644 index 4c19f4c8..00000000 --- a/src/scss/components/forms/_forms.scss +++ /dev/null @@ -1,22 +0,0 @@ -// Remove Focus Boxes -select:focus { - outline: $select-focus; -} - -button:focus { - outline: none; - background-color: $button-background-focus; -} - -label { - font-size: $label-font-size; - color: $input-border-color; -} - -@import 'input-fields'; -@import 'radio-buttons'; -@import 'checkboxes'; -@import 'switches'; -@import 'select'; -@import 'file-input'; -@import 'range'; diff --git a/src/scss/components/forms/_input-fields.scss b/src/scss/components/forms/_input-fields.scss deleted file mode 100644 index f18c2f80..00000000 --- a/src/scss/components/forms/_input-fields.scss +++ /dev/null @@ -1,354 +0,0 @@ -/* Text Inputs + Textarea - ========================================================================== */ - -/* Style Placeholders */ - -::placeholder { - color: $placeholder-text-color; -} - -/* Text inputs */ - -input:not([type]), -input[type=text]:not(.browser-default), -input[type=password]:not(.browser-default), -input[type=email]:not(.browser-default), -input[type=url]:not(.browser-default), -input[type=time]:not(.browser-default), -input[type=date]:not(.browser-default), -input[type=datetime]:not(.browser-default), -input[type=datetime-local]:not(.browser-default), -input[type=tel]:not(.browser-default), -input[type=number]:not(.browser-default), -input[type=search]:not(.browser-default), -textarea.materialize-textarea { - - // General Styles - background-color: transparent; - border: none; - border-bottom: $input-border; - border-radius: 0; - outline: none; - height: $input-height; - width: 100%; - font-size: $input-font-size; - margin: $input-margin; - padding: $input-padding; - box-shadow: none; - box-sizing: content-box; - transition: box-shadow .3s, border .3s; - - // Disabled input style - &:disabled, - &[readonly="readonly"] { - color: $input-disabled-color; - border-bottom: $input-disabled-border; - } - - // Disabled label style - &:disabled+label, - &[readonly="readonly"]+label { - color: $input-disabled-color; - } - - // Focused input style - &:focus:not([readonly]) { - border-bottom: 1px solid $input-focus-color; - box-shadow: 0 1px 0 0 $input-focus-color; - } - - // Focused label style - &:focus:not([readonly])+label { - color: $input-focus-color; - } - - // Hide helper text on data message - &.valid ~ .helper-text[data-success], - &:focus.valid ~ .helper-text[data-success], - &.invalid ~ .helper-text[data-error], - &:focus.invalid ~ .helper-text[data-error] { - @extend %hidden-text; - } - - // Valid Input Style - &.valid, - &:focus.valid { - @extend %valid-input-style; - } - - // Custom Success Message - &.valid ~ .helper-text:after, - &:focus.valid ~ .helper-text:after { - @extend %custom-success-message; - } - &:focus.valid ~ label { - color: $input-success-color; - } - - // Invalid Input Style - &.invalid, - &:focus.invalid { - @extend %invalid-input-style; - } - - // Custom Error message - &.invalid ~ .helper-text:after, - &:focus.invalid ~ .helper-text:after { - @extend %custom-error-message; - } - &:focus.invalid ~ label { - color: $input-error-color; - } - - // Full width label when using validate for error messages - &.validate + label { - width: 100%; - } - - // Form Message Shared Styles - & + label:after { - @extend %input-after-style; - } -} - - -/* Validation Sass Placeholders */ -%valid-input-style { - border-bottom: 1px solid $input-success-color; - box-shadow: 0 1px 0 0 $input-success-color; -} -%invalid-input-style { - border-bottom: $input-invalid-border; - box-shadow: 0 1px 0 0 $input-error-color; -} -%hidden-text { - color: transparent; - user-select: none; - pointer-events: none; -} -%custom-success-message { - content: attr(data-success); - color: $input-success-color; -} -%custom-error-message { - content: attr(data-error); - color: $input-error-color; -} -%input-after-style { - display: block; - content: ""; - position: absolute; - top: 100%; - left: 0; - opacity: 0; - transition: .2s opacity ease-out, .2s color ease-out; -} - - -// Styling for input field wrapper -.input-field { - // Inline styles - &.inline { - display: inline-block; - vertical-align: middle; - margin-left: 5px; - - input, - .select-dropdown { - margin-bottom: 1rem; - } - } - - // Gutter spacing - &.col { - label { - left: $gutter-width / 2; - } - - .prefix ~ label, - .prefix ~ .validate ~ label { - width: calc(100% - 3rem - #{$gutter-width}); - } - } - - position: relative; - margin-top: 1rem; - margin-bottom: 1rem; - - & > label { - color: $input-border-color; - position: absolute; - top: 0; - left: 0; - font-size: 1rem; - cursor: text; - transition: transform .2s ease-out, color .2s ease-out; - transform-origin: 0% 100%; - text-align: initial; - transform: translateY(12px); - - &:not(.label-icon).active { - transform: translateY(-14px) scale(.8); - transform-origin: 0 0; - } - } - - // Autofill + date + time inputs - & > input[type]:-webkit-autofill:not(.browser-default):not([type="search"]) + label, - & > input[type=date]:not(.browser-default) + label, - & > input[type=time]:not(.browser-default) + label { - transform: translateY(-14px) scale(.8); - transform-origin: 0 0; - } - - .helper-text { - &::after { - opacity: 1; - position: absolute; - top: 0; - left: 0; - } - - position: relative; - min-height: 18px; - display: block; - font-size: 12px; - color: rgba(0,0,0,.54); - } - - // Prefix Icons - .prefix { - position: absolute; - width: $input-height; - font-size: $input-icon-size; - transition: color .2s; - top: ($input-height - $input-icon-size) / 2; - - &.active { color: $input-focus-color; } - } - - .prefix ~ input, - .prefix ~ textarea, - .prefix ~ label, - .prefix ~ .validate ~ label, - .prefix ~ .helper-text, - .prefix ~ .autocomplete-content { - margin-left: 3rem; - width: 92%; - width: calc(100% - 3rem); - } - - .prefix ~ label { margin-left: 3rem; } - - @media #{$medium-and-down} { - .prefix ~ input { - width: 86%; - width: calc(100% - 3rem); - } - } - - @media #{$small-and-down} { - .prefix ~ input { - width: 80%; - width: calc(100% - 3rem); - } - } -} - - -/* Search Field */ - -.input-field input[type=search] { - display: block; - line-height: inherit; - transition: .3s background-color; - - .nav-wrapper & { - height: inherit; - padding-left: 4rem; - width: calc(100% - 4rem); - border: 0; - box-shadow: none; - } - - &:focus:not(.browser-default) { - background-color: $input-background; - border: 0; - box-shadow: none; - color: #444; - - & + label i, - & ~ .mdi-navigation-close, - & ~ .material-icons { - color: #444; - } - } - - & + .label-icon { - transform: none; - left: 1rem; - } - - & ~ .mdi-navigation-close, - & ~ .material-icons { - position: absolute; - top: 0; - right: 1rem; - color: transparent; - cursor: pointer; - font-size: $input-icon-size; - transition: .3s color; - } -} - - -/* Textarea */ - -// Default textarea -textarea { - width: 100%; - height: $input-height; - background-color: transparent; - - &.materialize-textarea { - line-height: normal; - overflow-y: hidden; /* prevents scroll bar flash */ - padding: .8rem 0 .8rem 0; /* prevents text jump on Enter keypress */ - resize: none; - min-height: $input-height; - box-sizing: border-box; - } -} - -// For textarea autoresize -.hiddendiv { - visibility: hidden; - white-space: pre-wrap; - word-wrap: break-word; - overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */ - padding-top: 1.2rem; /* prevents text jump on Enter keypress */ - - // Reduces repaints - position: absolute; - top: 0; - z-index: -1; -} - - -/* Autocomplete */ -.autocomplete-content { - li { - .highlight { color: #444; } - - img { - height: $dropdown-item-height - 10; - width: $dropdown-item-height - 10; - margin: 5px 15px; - } - } -} - -/* Character Counter */ -.character-counter { - min-height: 18px; -} diff --git a/src/scss/components/forms/_radio-buttons.scss b/src/scss/components/forms/_radio-buttons.scss deleted file mode 100644 index c9f72962..00000000 --- a/src/scss/components/forms/_radio-buttons.scss +++ /dev/null @@ -1,115 +0,0 @@ -/* Radio Buttons - ========================================================================== */ - -// Remove default Radio Buttons -[type="radio"]:not(:checked), -[type="radio"]:checked { - position: absolute; - opacity: 0; - pointer-events: none; -} - -[type="radio"]:not(:checked) + span, -[type="radio"]:checked + span { - position: relative; - padding-left: 35px; - cursor: pointer; - display: inline-block; - height: 25px; - line-height: 25px; - font-size: 1rem; - transition: .28s ease; - user-select: none; -} - -[type="radio"] + span:before, -[type="radio"] + span:after { - content: ''; - position: absolute; - left: 0; - top: 0; - margin: 4px; - width: 16px; - height: 16px; - z-index: 0; - transition: .28s ease; -} - -/* Unchecked styles */ -[type="radio"]:not(:checked) + span:before, -[type="radio"]:not(:checked) + span:after, -[type="radio"]:checked + span:before, -[type="radio"]:checked + span:after, -[type="radio"].with-gap:checked + span:before, -[type="radio"].with-gap:checked + span:after { - border-radius: 50%; -} - -[type="radio"]:not(:checked) + span:before, -[type="radio"]:not(:checked) + span:after { - border: 2px solid $radio-empty-color; -} - -[type="radio"]:not(:checked) + span:after { - transform: scale(0); -} - -/* Checked styles */ -[type="radio"]:checked + span:before { - border: 2px solid transparent; -} - -[type="radio"]:checked + span:after, -[type="radio"].with-gap:checked + span:before, -[type="radio"].with-gap:checked + span:after { - border: $radio-border; -} - -[type="radio"]:checked + span:after, -[type="radio"].with-gap:checked + span:after { - background-color: $radio-fill-color; -} - -[type="radio"]:checked + span:after { - transform: scale(1.02); -} - -/* Radio With gap */ -[type="radio"].with-gap:checked + span:after { - transform: scale(.5); -} - -/* Focused styles */ -[type="radio"].tabbed:focus + span:before { - box-shadow: 0 0 0 10px rgba(0,0,0,.1); -} - -/* Disabled Radio With gap */ -[type="radio"].with-gap:disabled:checked + span:before { - border: 2px solid $input-disabled-color; -} - -[type="radio"].with-gap:disabled:checked + span:after { - border: none; - background-color: $input-disabled-color; -} - -/* Disabled style */ -[type="radio"]:disabled:not(:checked) + span:before, -[type="radio"]:disabled:checked + span:before { - background-color: transparent; - border-color: $input-disabled-color; -} - -[type="radio"]:disabled + span { - color: $input-disabled-color; -} - -[type="radio"]:disabled:not(:checked) + span:before { - border-color: $input-disabled-color; -} - -[type="radio"]:disabled:checked + span:after { - background-color: $input-disabled-color; - border-color: $input-disabled-solid-color; -} diff --git a/src/scss/components/forms/_range.scss b/src/scss/components/forms/_range.scss deleted file mode 100644 index 18607f5d..00000000 --- a/src/scss/components/forms/_range.scss +++ /dev/null @@ -1,161 +0,0 @@ -/* Range - ========================================================================== */ - -.range-field { - position: relative; -} - -input[type=range], -input[type=range] + .thumb { - @extend .no-select; - cursor: pointer; -} - -input[type=range] { - position: relative; - background-color: transparent; - border: none; - outline: none; - width: 100%; - margin: 15px 0; - padding: 0; - - &:focus { - outline: none; - } -} - -input[type=range] + .thumb { - position: absolute; - top: 10px; - left: 0; - border: none; - height: 0; - width: 0; - border-radius: 50%; - background-color: $radio-fill-color; - margin-left: 7px; - - transform-origin: 50% 50%; - transform: rotate(-45deg); - - .value { - display: block; - width: 30px; - text-align: center; - color: $radio-fill-color; - font-size: 0; - transform: rotate(45deg); - } - - &.active { - border-radius: 50% 50% 50% 0; - - .value { - color: $input-background; - margin-left: -1px; - margin-top: 8px; - font-size: 10px; - } - } -} - -// Shared -@mixin range-track { - height: $track-height; - background: #c2c0c2; - border: none; -} - -@mixin range-thumb { - border: none; - height: $range-height; - width: $range-width; - border-radius: 50%; - background: $radio-fill-color; - transition: box-shadow .3s; -} - -// WebKit -input[type=range] { - -webkit-appearance: none; -} - -input[type=range]::-webkit-slider-runnable-track { - @include range-track; -} - -input[type=range]::-webkit-slider-thumb { - @include range-thumb; - -webkit-appearance: none; - background-color: $radio-fill-color; - transform-origin: 50% 50%; - margin: -5px 0 0 0; - -} - -.keyboard-focused input[type=range]:focus:not(.active)::-webkit-slider-thumb { - box-shadow: 0 0 0 10px rgba($radio-fill-color, .26); -} - -// FireFox -input[type=range] { - /* fix for FF unable to apply focus style bug */ - border: 1px solid white; - - /*required for proper track sizing in FF*/ -} - -input[type=range]::-moz-range-track { - @include range-track; -} - -input[type=range]::-moz-focus-inner { - border: 0; -} - -input[type=range]::-moz-range-thumb { - @include range-thumb; - margin-top: -5px; -} - -// hide the outline behind the border -input[type=range]:-moz-focusring { - outline: 1px solid #fff; - outline-offset: -1px; -} - -.keyboard-focused input[type=range]:focus:not(.active)::-moz-range-thumb { - box-shadow: 0 0 0 10px rgba($radio-fill-color, .26); -} - -// IE 10+ -input[type=range]::-ms-track { - height: $track-height; - - // remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead - background: transparent; - - // leave room for the larger thumb to overflow with a transparent border */ - border-color: transparent; - border-width: 6px 0; - - /*remove default tick marks*/ - color: transparent; -} - -input[type=range]::-ms-fill-lower { - background: #777; -} - -input[type=range]::-ms-fill-upper { - background: #ddd; -} - -input[type=range]::-ms-thumb { - @include range-thumb; -} - -.keyboard-focused input[type=range]:focus:not(.active)::-ms-thumb { - box-shadow: 0 0 0 10px rgba($radio-fill-color, .26); -} diff --git a/src/scss/components/forms/_select.scss b/src/scss/components/forms/_select.scss deleted file mode 100644 index 2fd04d3c..00000000 --- a/src/scss/components/forms/_select.scss +++ /dev/null @@ -1,180 +0,0 @@ -/* Select Field - ========================================================================== */ - -select { display: none; } -select.browser-default { display: block; } - -select { - background-color: $select-background; - width: 100%; - padding: $select-padding; - border: $select-border; - border-radius: $select-radius; - height: $input-height; -} - -.select-label { - position: absolute; -} - -.select-wrapper { - &.valid .helper-text[data-success], - &.invalid ~ .helper-text[data-error] { - @extend %hidden-text; - } - - &.valid { - & > input.select-dropdown { - @extend %valid-input-style; - } - - & ~ .helper-text:after { - @extend %custom-success-message; - } - } - - &.invalid { - & > input.select-dropdown, - & > input.select-dropdown:focus { - @extend %invalid-input-style; - } - - & ~ .helper-text:after { - @extend %custom-error-message; - } - } - - &.valid + label, - &.invalid + label { - width: 100%; - pointer-events: none; - } - - & + label:after { - @extend %input-after-style; - } - - position: relative; - - input.select-dropdown { - &:focus { - border-bottom: 1px solid $input-focus-color; - } - position: relative; - cursor: pointer; - background-color: transparent; - border: none; - border-bottom: $input-border; - outline: none; - height: $input-height; - line-height: $input-height; - width: 100%; - font-size: $input-font-size; - margin: $input-margin; - padding: 0; - display: block; - user-select:none; - z-index: 1; - } - - .caret { - position: absolute; - right: 0; - top: 0; - bottom: 0; - margin: auto 0; - z-index: 0; - fill: rgba(0,0,0,.87); - } - - & + label { - position: absolute; - top: -26px; - font-size: $label-font-size; - } -} - -// Disabled styles -select:disabled { - color: $input-disabled-color; -} - -.select-wrapper.disabled { - + label { - color: $input-disabled-color; - } - .caret { - fill: $input-disabled-color; - } -} - -.select-wrapper input.select-dropdown:disabled { - color: $input-disabled-color; - cursor: default; - user-select: none; -} - -.select-wrapper i { - color: $select-disabled-color; -} - -.select-dropdown li.disabled, -.select-dropdown li.disabled > span, -.select-dropdown li.optgroup { - color: $select-disabled-color; - background-color: transparent; -} - -body.keyboard-focused { - .select-dropdown.dropdown-content li:focus { - background-color: $select-option-focus; - } -} - -.select-dropdown.dropdown-content { - li { - &:hover { - background-color: $select-option-hover; - } - - &.selected { - background-color: $select-option-selected; - } - } -} - -// Prefix Icons -.prefix ~ .select-wrapper { - margin-left: 3rem; - width: 92%; - width: calc(100% - 3rem); -} - -.prefix ~ label { margin-left: 3rem; } - -// Icons -.select-dropdown li { - img { - height: $dropdown-item-height - 10; - width: $dropdown-item-height - 10; - margin: 5px 15px; - float: right; - } -} - -// Optgroup styles -.select-dropdown li.optgroup { - border-top: 1px solid $dropdown-hover-bg-color; - - &.selected > span { - color: rgba(0, 0, 0, .7); - } - - & > span { - color: rgba(0, 0, 0, .4); - } - - & ~ li.optgroup-option { - padding-left: 1rem; - } -} diff --git a/src/scss/components/forms/_switches.scss b/src/scss/components/forms/_switches.scss deleted file mode 100644 index 3296b12c..00000000 --- a/src/scss/components/forms/_switches.scss +++ /dev/null @@ -1,89 +0,0 @@ -/* Switch - ========================================================================== */ - -.switch, -.switch * { - -webkit-tap-highlight-color: transparent; - user-select: none; -} - -.switch label { - cursor: pointer; -} - -.switch label input[type=checkbox] { - opacity: 0; - width: 0; - height: 0; - - &:checked + .lever { - background-color: $switch-checked-lever-bg; - - &:before, &:after { - left: 18px; - } - - &:after { - background-color: $switch-bg-color; - } - } -} - -.switch label .lever { - content: ""; - display: inline-block; - position: relative; - width: 36px; - height: 14px; - background-color: $switch-unchecked-lever-bg; - border-radius: $switch-radius; - margin-right: 10px; - transition: background 0.3s ease; - vertical-align: middle; - margin: 0 16px; - - &:before, &:after { - content: ""; - position: absolute; - display: inline-block; - width: 20px; - height: 20px; - border-radius: 50%; - left: 0; - top: -3px; - transition: left 0.3s ease, background .3s ease, box-shadow 0.1s ease, transform .1s ease; - } - - &:before { - background-color: transparentize($switch-bg-color, .85); - } - - &:after { - background-color: $switch-unchecked-bg; - box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); - } -} - -// Switch active style -input[type=checkbox]:checked:not(:disabled) ~ .lever:active::before, -input[type=checkbox]:checked:not(:disabled).tabbed:focus ~ .lever::before { - transform: scale(2.4); - background-color: transparentize($switch-bg-color, .85); -} - -input[type=checkbox]:not(:disabled) ~ .lever:active:before, -input[type=checkbox]:not(:disabled).tabbed:focus ~ .lever::before { - transform: scale(2.4); - background-color: rgba(0,0,0,.08); -} - -// Disabled Styles -.switch input[type=checkbox][disabled] + .lever { - cursor: default; - background-color: rgba(0,0,0,.12); -} - -.switch label input[type=checkbox][disabled] + .lever:after, -.switch label input[type=checkbox][disabled]:checked + .lever:after { - background-color: $input-disabled-solid-color; -} diff --git a/src/scss/partials/_chat.scss b/src/scss/partials/_chat.scss index 617e1ef8..a53b3435 100644 --- a/src/scss/partials/_chat.scss +++ b/src/scss/partials/_chat.scss @@ -132,7 +132,7 @@ display: flex; flex-direction: column; flex-shrink: 1; - padding: 9px; + padding-top: 9px; margin: 0 auto; box-sizing: border-box; min-height: 100%; @@ -140,7 +140,7 @@ &.is-chat { .in { - padding-left: 36px; + padding-left: 45px; } } } @@ -339,9 +339,11 @@ &.round.video { .attachment { + max-height: 200px; + max-width: 200px; //max-height: fit-content; - -webkit-clip-path: ellipse(100px 100px at center); - clip-path: ellipse(100px 100px at center); + //-webkit-clip-path: ellipse(100px 100px at center); + //clip-path: ellipse(100px 100px at center); } } @@ -476,14 +478,33 @@ right: 0; font-size: .75rem; display: flex; + align-items: center; + line-height: 1; i { font-size: 1.15rem; margin-right: .4rem; margin-left: .1rem; } + + i.edited { + overflow: visible; + font-size: .8rem; + } } } + + &.is-edited.channel-post .time { + width: calc(5rem + 42px); + } + + &.is-edited .time { + width: 90px; + } + + &.channel-post .time { + width: 5rem; + } .user-avatar { position: absolute; @@ -586,14 +607,10 @@ width: 2rem; .inner { - line-height: 19px; padding: 0 .35rem; + margin-bottom: 4px; } } - - .bubble.channel-post .time { - width: 5rem; - } .bubble { background-color: #ffffff; @@ -650,9 +667,8 @@ display: inline-block; .inner { - display: flex; - align-items: center; padding: 0 .25rem; + bottom: 1px; } } @@ -789,7 +805,7 @@ border-radius: 12px; border-bottom-right-radius: 0; box-shadow: 0 1px 2px 0 rgba(16, 35, 47, 0.07); - margin-right: .5rem; + margin-right: 9px; padding: 4.5px .5rem; /* padding: 3px .5rem 6px .5rem; */ min-height: 3.25rem; diff --git a/src/scss/partials/_ckin.scss b/src/scss/partials/_ckin.scss new file mode 100644 index 00000000..df057ecd --- /dev/null +++ b/src/scss/partials/_ckin.scss @@ -0,0 +1,352 @@ +/*! + ckin v0.0.1: Custom HTML5 Video Player Skins. + (c) 2017 + MIT License + git+https://github.com/hunzaboy/ckin.git +*/ + +/* video { + width: 100%; + height: auto; + cursor: pointer; +} */ + +.ckin { + &__player { + letter-spacing: 0.02em; + } + + &__overlay { + position: relative; + + &:before { + background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.5) 100%); + } + + &--2:before { + background: rgba(24, 24, 24, 0.8); + } + } +} + +.ckin__player.ckin__fullscreen { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + height: 100%; + width: 100%; + z-index: 10000000; + background: #000; + border-radius: 0 !important; + display: -ms-flexbox; + display: flex; +} + +.default { + border: 0 solid rgba(0, 0, 0, 0.2); + box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); + position: relative; + font-size: 0; + overflow: hidden; + //border-radius: 5px; + cursor: pointer; + + &:before { + content: ''; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + //border-radius: 5px; + transition: opacity .2s; + opacity: 1; + visibility: visible; + } + + &__title { + position: absolute; + left: 20px; + top: 20px; + z-index: 1; + font-size: 24px; + color: rgba(255, 255, 255, 0.8); + font-style: italic; + } + + &__button { + background: none; + border: 0; + color: #fff; + outline: 0; + padding: 3px 10px 6px 10px; + /* padding: 6px 10px 6px 10px; */ + cursor: pointer; + font-size: 24px; + line-height: 1; + display: flex; + align-items: center; + + i { + -ms-flex-item-align: center; + -ms-grid-row-align: center; + align-self: center; + } + + &--big { + background: none; + border: 0; + line-height: 1; + color: #fff; + text-align: center; + outline: 0; + padding: 0; + cursor: pointer; + position: absolute; + opacity: 1; + visibility: visible; + top: 50%; + left: 50%; + -ms-transform: translate(-50%, -50%) scale(1); + transform: translate(-50%, -50%) scale(1); + font-size: 64px; + transition: all .2s; + -ms-touch-action: manipulation; + touch-action: manipulation; + } + } + + &__slider { + width: 10px; + height: 30px; + } + + &__controls { + position: absolute; + bottom: 0; + right: 0; + left: 0; + transition: all .3s; + /* background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%); */ + /* font-size: 32px; */ + text-align: left; + direction: ltr; + /* padding-top: 7px; */ + border-radius: 0 0 5px 5px; + z-index: 3; + } +} + +.default.is-playing:before { + opacity: 0; + visibility: hidden; + -ms-transform: translate(-50%, -50%) scale(1.3); + transform: translate(-50%, -50%) scale(1.3); +} + +.default.is-playing .default__button--big { + opacity: 0; + visibility: hidden; +} + +.default.is-playing .default__controls { + -ms-transform: translateY(52px); + transform: translateY(52px); +} + +.default.is-playing:hover .default__controls { + -ms-transform: translateY(0); + transform: translateY(0); +} + +.default .progress { + position: relative; + display: -ms-flexbox; + display: flex; + margin: 0 8px; + height: 5px; + transition: height 0.3s; + background: rgba(255, 255, 255, 0.38); + cursor: pointer; + border-radius: 4px; + overflow: visible; +} + +.default .progress__filled { + width: 0%; + background: #63a2e3; + /* -ms-flex: 0; + flex: 0; + -ms-flex-preferred-size: 0%; + flex-basis: 0%; */ + border-radius: 4px; +} + +@media (max-width: 480px) { + .ckin__player button { + font-size: 18px; + } +} + +video::-webkit-media-controls-enclosure { + display: none !important; +} + +.progress input { + -webkit-appearance: none; + -moz-appearance: none; + background: transparent; + height: 4.5px; + cursor: pointer; +} + +.progress input[type=range]:focus { + outline: none; +} + +.progress input[type=range]::-webkit-slider-runnable-track { + width: 100%; + cursor: pointer; + border-radius: 1.3px; + -webkit-appearance: none; + transition: all 0.4s ease; +} + +.progress input[type=range]::-webkit-slider-thumb { + height: 15px; + width: 15px; + border-radius: 16px; + background: #63a2e3; + cursor: pointer; + -webkit-appearance: none; + margin-left: -1px; +} + +.progress input[type=range]:focus::-webkit-slider-runnable-track { + background: transparent; +} + +.progress input[type=range].volume { + height: 5px; + background-color: #fff; +} + +.progress input[type=range].volume::-webkit-slider-runnable-track { + background-color: transparent; +} + +.progress input[type=range].volume::-webkit-slider-thumb { + margin-left: 0; + height: 14px; + width: 14px; + background: #fff; +} + +.progress input[type=range]::-moz-range-track { + width: 100%; + height: 8.4px; + cursor: pointer; + border: 1px solid transparent; + background: transparent; + border-radius: 1.3px; +} + +.progress input[type=range]::-moz-range-thumb { + height: 14px; + width: 14px; + border-radius: 50px; + border: 1px solid #63a2e3; + background: #63a2e3; + cursor: pointer; + margin-top: 5px; +} + +.progress input[type=range]:focus::-moz-range-track { + outline: none; +} + +.progress input[type=range].volume::-moz-range-thumb { + border: 1px solid #fff; + background: #fff; +} + +.seek { + position: absolute; + top: 0; + width: 100%; + cursor: pointer; + margin: 0; +} + +.seek:hover + .seek-tooltip { + display: block; +} + +.left-controls { + display: flex; + align-items: center; +} + +.bottom-controls { + padding: 3px 4px 5px 4px; + //padding: 5px 4px 5px 4px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.time { + float: right; + padding: 7px 0px 9px 14px; + font-size: 15px; + color: white; +} + +.circle .circle-time { + color: #fff; + font-size: 13px; + float: left; + margin-top: 1px; + } +.circle .circle-time-left { + position: absolute; + top: 3px; + left: 2px; + border-radius: 12px; + background-color: rgba(0, 0, 0, 0.23); + padding: 1px 7px 2px 7px; + z-index: 2; + display: flex; + align-items: center; +} +video[data-ckin="circle"] { + -webkit-clip-path: ellipse(100px 100px at center); + clip-path: ellipse(100px 100px at center); +} +.progress-ring { + position: absolute; + top: 0; + left: 0; + cursor: pointer; +} +.progress-ring__circle { + transform-origin: center; + transform: rotate(-90deg); + transition: stroke-dashoffset 0.15s; +} + +.ckin__player.circle { + position: relative; + width: 200px; + height: 200px; +} + +.iconVolume { + padding: 0 1px 0 3px; + display: flex; + align-items: center; + font-size: 1.25rem; + color: #fff; +} diff --git a/src/scss/partials/_fonts.scss b/src/scss/partials/_fonts.scss index 067f0c5c..2f09bc3a 100644 --- a/src/scss/partials/_fonts.scss +++ b/src/scss/partials/_fonts.scss @@ -209,7 +209,7 @@ .tgico-forward:before { content: "\e93a"; } -.tgico-FullScreen:before { +.tgico-fullscreen:before { content: "\e93b"; } .tgico-group:before { diff --git a/src/scss/partials/_mediaViewer.scss b/src/scss/partials/_mediaViewer.scss index e1e3d216..fab5dab2 100644 --- a/src/scss/partials/_mediaViewer.scss +++ b/src/scss/partials/_mediaViewer.scss @@ -123,6 +123,7 @@ width: 10rem; height: 100%; cursor: pointer; + z-index: 2; &:hover { > span { diff --git a/src/scss/partials/_vars.scss b/src/scss/partials/_vars.scss deleted file mode 100644 index f2286bc3..00000000 --- a/src/scss/partials/_vars.scss +++ /dev/null @@ -1,27 +0,0 @@ -$lightblue: #e6ebee; -$blue: #4ea4f6; -$darkblue: #1da1f1; - -$lightgreen: #eeffde; -$green: #4dcd5e; -$darkgreen: #50af4f; - -$dotgreen: #0ac630; - -$lightgrey: #dadce0; -$grey: #c4c9cc; -$darkgrey: #707579; - -$light: rgba($darkgrey, 0.08); - -$text: #000000; -$bg: #ffffff; - -$text-size: 16px; -$time-size: 12px; - -@function anim($elem) { - @return 150ms ease-out $elem; -} - -@import "ico"; diff --git a/src/scss/style.scss b/src/scss/style.scss index 485945ee..24ac6102 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -35,12 +35,21 @@ $time-size: 12px; @import "partials/sidebar"; @import "partials/leftSidebar"; @import "partials/mediaViewer"; +@import "partials/ckin"; html, body { height: 100%; width: 100%; } +html { + font-size: 15px; +} + +a { + color: $blue; +} + button, input, optgroup, select, textarea, html { font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } diff --git a/src/scss/tgico.scss b/src/scss/tgico.scss index 68ede48e..bd08099d 100644 --- a/src/scss/tgico.scss +++ b/src/scss/tgico.scss @@ -1,2 +1,2 @@ -@import "partials/vars"; +@import "partials/ico"; @import "partials/fonts"; diff --git a/tsconfig.json b/tsconfig.json index f6c90727..a8858639 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -63,6 +63,11 @@ }, "exclude": [ "node_modules", - "public" + "public", + "coverage", + "./src/lib/*.js", + "src/lib/StackBlur.js", + "./src/*.js", + "*.js", ] } diff --git a/webp-hero.bundle.js b/webp-hero.bundle.js deleted file mode 100644 index ed00ef34..00000000 --- a/webp-hero.bundle.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var e,r,n=(e=function(e,r){(function(e,n){var t=h.nextTick,i=(Function.prototype.apply,Array.prototype.slice),o={},a=0;function f(e,r){this._id=e,this._clearFn=r}f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},r.setImmediate="function"==typeof e?e:function(e){var n=a++,f=!(arguments.length<2)&&i.call(arguments,1);return o[n]=!0,t(function(){o[n]&&(f?e.apply(null,f):e.call(null),r.clearImmediate(n))}),n},r.clearImmediate="function"==typeof n?n:function(e){delete o[e]}}).call(this,n({}).setImmediate,n({}).clearImmediate)},function(n){return r||e(r={exports:{},parent:n},r.exports),r.exports}),t={},i=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))(function(o,a){function f(e){try{u(i.next(e))}catch(r){a(r)}}function A(e){try{u(i.throw(e))}catch(r){a(r)}}function u(e){e.done?o(e.value):new t(function(r){r(e.value)}).then(f,A)}u((i=i.apply(e,n||[])).next())})},o=this&&this.__generator||function(e,n){var t,i,o,a,f={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:A(0),throw:A(1),return:A(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function A(a){return function(A){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;f;)try{if(t=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,i=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(o=(o=f.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){f=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){f=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]1)for(var n=1;n255&&(t&=255),r.push(String.fromCharCode(t))}return r.join("")}(n);throw A}},o&&(t.readBinary=function(e){try{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}catch(A){var n=ie(e);if(n)return n;throw A}}),t.readAsync=function(e,r,n){var t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="arraybuffer",t.onload=function(){if(200==t.status||0==t.status&&t.response)r(t.response);else{var i=ie(e);i?r(i.buffer):n()}},t.onerror=n,t.send(null)},t.setWindowTitle=function(e){document.title=e};var f=t.print||("undefined"!=typeof console?console.log.bind(console):"undefined"!=typeof print?print:null),A=t.printErr||("undefined"!=typeof printErr?printErr:"undefined"!=typeof console&&console.warn.bind(console)||f);for(n in i)i.hasOwnProperty(n)&&(t[n]=i[n]);function u(e){u.shown||(u.shown={}),u.shown[e]||(u.shown[e]=1,A(e))}i=void 0,new Array(0);var s=0,l=!1;function c(e){return t["_"+e]}var d,h,v,b,g,w,m,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function p(e,r,n){for(var t=r+n,i=r;e[i]&&!(i>=t);)++i;if(i-r>16&&e.subarray&&k)return k.decode(e.subarray(r,i));for(var o="";r>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|f)}else o+=String.fromCharCode(a)}return o}function C(e,r){return e?p(v,e,r):""}function y(e,r,n,t){if(!(t>0))return 0;for(var i=n,o=n+t-1,a=0;a=55296&&f<=57343&&(f=65536+((1023&f)<<10)|1023&e.charCodeAt(++a)),f<=127){if(n>=o)break;r[n++]=f}else if(f<=2047){if(n+1>=o)break;r[n++]=192|f>>6,r[n++]=128|63&f}else if(f<=65535){if(n+2>=o)break;r[n++]=224|f>>12,r[n++]=128|f>>6&63,r[n++]=128|63&f}else{if(n+3>=o)break;r[n++]=240|f>>18,r[n++]=128|f>>12&63,r[n++]=128|f>>6&63,r[n++]=128|63&f}}return r[n]=0,n-i}function I(e,r){return e%r>0&&(e+=r-e%r),e}function E(){t.HEAP8=h=new Int8Array(d),t.HEAP16=b=new Int16Array(d),t.HEAP32=g=new Int32Array(d),t.HEAPU8=v=new Uint8Array(d),t.HEAPU16=new Uint16Array(d),t.HEAPU32=w=new Uint32Array(d),t.HEAPF32=m=new Float32Array(d),t.HEAPF64=new Float64Array(d)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var D=t.TOTAL_MEMORY||67108864;function L(e){for(;e.length>0;){var r=e.shift();if("function"!=typeof r){var n=r.func;"number"==typeof n?void 0===r.arg?t.dynCall_v(n):t.dynCall_vi(n,r.arg):n(void 0===r.arg?null:r.arg)}else r()}}D<5242880&&A("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+D+"! (TOTAL_STACK=5242880)"),d=t.buffer?t.buffer:new ArrayBuffer(D),E(),g[2700]=5253936;var x=[],S=[],_=[],B=[],M=!1;Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(e,r){var n=65535&e,t=65535&r;return n*t+((e>>>16)*t+n*(r>>>16)<<16)|0}),Math.clz32||(Math.clz32=function(e){var r=32,n=e>>16;return n&&(r-=16,e=n),(n=e>>8)&&(r-=8,e=n),(n=e>>4)&&(r-=4,e=n),(n=e>>2)&&(r-=2,e=n),(n=e>>1)?r-2:r-e}),Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)});var F=Math.abs,P=Math.ceil,R=Math.floor,T=Math.min,G=0,O=null,q=null;function U(e){G++,t.monitorRunDependencies&&t.monitorRunDependencies(G)}function Y(e){if(G--,t.monitorRunDependencies&&t.monitorRunDependencies(G),0==G&&(null!==O&&(clearInterval(O),O=null),q)){var r=q;q=null,r()}}t.preloadedImages={},t.preloadedAudios={};var z=null,W="data:application/octet-stream;base64,";function X(e){return String.prototype.startsWith?e.startsWith(W):0===e.indexOf(W)}function Q(r,n){if(j.mainLoop.timingMode=r,j.mainLoop.timingValue=n,!j.mainLoop.func)return 1;if(0==r)j.mainLoop.scheduler=function(){var e=0|Math.max(0,j.mainLoop.tickStartTime+n-N());setTimeout(j.mainLoop.runner,e)},j.mainLoop.method="timeout";else if(1==r)j.mainLoop.scheduler=function(){j.requestAnimationFrame(j.mainLoop.runner)},j.mainLoop.method="rAF";else if(2==r){if(void 0===e){var i=[];addEventListener("message",function(e){"setimmediate"!==e.data&&"setimmediate"!==e.data.target||(e.stopPropagation(),i.shift()())},!0),e=function(e){i.push(e),o?(void 0===t.setImmediates&&(t.setImmediates=[]),t.setImmediates.push(e),postMessage({target:"setimmediate"})):postMessage("setimmediate","*")}}j.mainLoop.scheduler=function(){e(j.mainLoop.runner)},j.mainLoop.method="immediate"}return 0}function N(){ke()}function V(e,r,n,i,o){var a;t.noExitRuntime=!0,j.mainLoop.func=e,j.mainLoop.arg=i,a=void 0!==i?function(){t.dynCall_vi(e,i)}:function(){t.dynCall_v(e)};var f=j.mainLoop.currentlyRunningMainloop;if(j.mainLoop.runner=function(){if(!l)if(j.mainLoop.queue.length>0){var e=Date.now(),r=j.mainLoop.queue.shift();if(r.func(r.arg),j.mainLoop.remainingBlockers){var n=j.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?j.mainLoop.remainingBlockers=i:(i+=.5,j.mainLoop.remainingBlockers=(8*n+i)/9)}if(console.log('main loop blocker "'+r.name+'" took '+(Date.now()-e)+" ms"),j.mainLoop.updateStatus(),f1&&j.mainLoop.currentFrameNumber%j.mainLoop.timingValue!=0?j.mainLoop.scheduler():(0==j.mainLoop.timingMode&&(j.mainLoop.tickStartTime=N()),"timeout"===j.mainLoop.method&&t.ctx&&(A("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!"),j.mainLoop.method=""),j.mainLoop.runIter(a),f0?Q(0,1e3/r):Q(1,1),j.mainLoop.scheduler()),n)throw"SimulateInfiniteLoop"}z="data:application/octet-stream;base64,AAAAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f38AAAAAAAAAAPDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AAP/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5a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IjUf88BFPEcmSXcc3iVELYAiAS8L9as+ERNGklU3PkYlKyWaZKNVoAE/CVyIHEAgyVVLDwkJQP+4dxBWBhwFQP8Z+AE4CBGEif83dIA6DxRShzkaeSikMh+JmoUZI9ozZyyDg3sfBp5WKECHlOAtt4AWGhGD8JoOAdEtEBVbQN4HAcU4FSebPIoXZtVTDA02wP9ELxxVGlVVgIAgkqsSCwc/kKsEBPYjGwqSrqsMGoC+UCNjtFB+Ni1Vfi9XsDMpFCBlS4CLdpJ0gFU4KQ+w7FUlCT5HHhF3dv8REoplJjyKN0YrGo6SJBMeq/9hGxSKLT0+2wFRvEAgKRR1l44UFaNwEww9w4AwBBgAAAAAAAAAAAAAAAAAAf8C/gMEBv0F/Pv6B/kI+PcAAAAAAAAAAAAAAAAAAP///////////////////////////////////////////7D2////////////3/H8///////////5/f3////////////0/P//////////6v7+///////////9///////////////2/v//////////7/3+///////////+//7////////////4/v//////////+//+///////////////////////////9/v//////////+/7+///////////+//7////////////+/f/+////////+v/+//7////////+/////////////////////////////////////////////////////////9n/////////////4fzx/f///v/////q+vH6/f/9/v/////+////////////3/7+///////////u/f7+///////////4/v//////////+f7////////////////////////////9////////////9/7////////////////////////////9/v///////////P/////////////////////////////+/v///////////f/////////////////////////////+/f//////////+v/////////////+/////////////////////////////////////////////////////////7r7+v//////////6vv0/v/////////7+/P9/v/+///////9/v//////////7P3+///////////7/f3+/v/////////+/v///////////v7+///////////////////////////+/////////////v7////////////+/////////////////////////////v////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////j/////////////+v78/v/////////4/vn9///////////9/f//////////9v39///////////8/vv+/v/////////+/P//////////+P79///////////9//7+///////////7/v//////////9fv+///////////9/f7////////////7/f///////////P3+/////////////v/////////////8////////////+f/+//////////////7//////////////f//////////+v///////////////////////////////////////////v///////////////////////////4CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgP2I/v/k24CAgICAvYHy/+PV/9uAgIBqfuP81tH//4CAgAFi+P/s4v//gICAtYXu/t3q/5qAgIBOhsr3xrT/24CAgAG5+f/z/4CAgICAuJb3/+zggICAgIBNbtj/7OaAgICAgAFl+//x/4CAgICAqovx/OzR//+AgIAldMTz5P///4CAgAHM/v/1/4CAgICAz6D6/+6AgICAgIBmZ+f/06uAgICAgAGY/P/w/4CAgICAsYfz/+rhgICAgIBQgdP/wuCAgICAgAEB/4CAgICAgICA9gH/gICAgICAgID/gICAgICAgICAgMYj7d/Bu6KgkZs+gy3G3ayw3J383QFEL5LQlafdov/fgAGV8f/d4P//gICAuI3q/d7c/8eAgIBRY7XysL75yv//gAGB6P3WxfLE//+AY3nS+snG/8qAgIAXW6Pyqrv30v//gAHI9v/q/4CAgICAbbLx/+f1//+AgIAsgsn9zcD//4CAgAGE7/vb0f+lgICAXojh+9q+//+AgIAWZK71uqH/x4CAgAG2+f/o64CAgICAfI/x/+PqgICAgIAjTbX7wdP/zYCAgAGd9//s5///gICAeY3r/+Hj//+AgIAtY7z7w9n/4ICAgAEB+//V/4CAgICAywH4//+AgICAgICJAbH/4P+AgICAgP0J+PvP0P/AgICArw3g88G5+cb//4BJEavdobPsp//qgAFf9/3Ut///gICA71r0+tPR//+AgICbTcP4vMP//4CAgAEY7/va2//NgICAyTPb/8S6gICAgIBFLr7vydr/5ICAgAG/+///gICAgICA36X5/9X/gICAgICNfPj//4CAgICAgAEQ+P//gICAgICAviTm/+z/gICAgICVAf+AgICAgICAgAHi/4CAgICAgICA98D/gICAgICAgIDwgP+AgICAgICAgAGG/P//gICAgICA1T76//+AgICAgIA3Xf+AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMoY1eu6v9yg8K//fia26Km45K7/u4A9Lorbl7Lwqv/YgAFw5vrHv/ef//+Apm3k/NPX/66AgIAnTaLorLT1sv//gAE03PbGx/nc//+AfEq/87fB+t3//4AYR4Lbmqrztv//gAG24fnb8P/ggICAlZbi/NjN/6uAgIAcbKryt8L+3///gAFR5vzMy//AgICAe2bR97zE/+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BAAIIQ291bGQgbm90IGRlY29kZSBhbHBoYSBkYXRhLgBGcmFtZSBzZXR1cCBmYWlsZWQAdGhyZWFkIGluaXRpYWxpemF0aW9uIGZhaWxlZC4Abm8gbWVtb3J5IGR1cmluZyBmcmFtZSBpbml0aWFsaXphdGlvbi4AUklGRgBXRUJQAFZQOFgAQUxQSABWUDggAFZQOEwAT0sAbnVsbCBWUDhJbyBwYXNzZWQgdG8gVlA4R2V0SGVhZGVycygpAFRydW5jYXRlZCBoZWFkZXIuAEluY29ycmVjdCBrZXlmcmFtZSBwYXJhbWV0ZXJzLgBGcmFtZSBub3QgZGlzcGxheWFibGUuAGNhbm5vdCBwYXJzZSBwaWN0dXJlIGhlYWRlcgBCYWQgY29kZSB3b3JkAGJhZCBwYXJ0aXRpb24gbGVuZ3RoAGNhbm5vdCBwYXJzZSBzZWdtZW50IGhlYWRlcgBjYW5ub3QgcGFyc2UgZmlsdGVyIGhlYWRlcgBjYW5ub3QgcGFyc2UgcGFydGl0aW9ucwBOb3QgYSBrZXkgZnJhbWUuAK2UjACwm4yHALSdjYaCAP7+8+bEsZmMhYKBAE5VTEwgVlA4SW8gcGFyYW1ldGVyIGluIFZQOERlY29kZSgpLgBQcmVtYXR1cmUgZW5kLW9mLXBhcnRpdGlvbjAgZW5jb3VudGVyZWQuAFByZW1hdHVyZSBlbmQtb2YtZmlsZSBlbmNvdW50ZXJlZC4AT3V0cHV0IGFib3J0ZWQuAC0rICAgMFgweAAobnVsbCkALTBYKzBYIDBYLTB4KzB4IDB4AGluZgBJTkYAbmFuAE5BTgAu";var j={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){j.mainLoop.scheduler=null,j.mainLoop.currentlyRunningMainloop++},resume:function(){j.mainLoop.currentlyRunningMainloop++;var e=j.mainLoop.timingMode,r=j.mainLoop.timingValue,n=j.mainLoop.func;j.mainLoop.func=null,V(n,0,!1,j.mainLoop.arg,!0),Q(e,r),j.mainLoop.scheduler()},updateStatus:function(){if(t.setStatus){var e=t.statusMessage||"Please wait...",r=j.mainLoop.remainingBlockers,n=j.mainLoop.expectedBlockers;r?r=6;){var a=t>>i-6&63;i-=6,n+=r[a]}return 2==i?(n+=r[(3&t)<<4],n+="=="):4==i&&(n+=r[(15&t)<<2],n+="="),n}(e),f(l))},l.src=s,j.safeSetTimeout(function(){f(l)},1e4)}};t.preloadPlugins.push(n);var i=t.canvas;i&&(i.requestPointerLock=i.requestPointerLock||i.mozRequestPointerLock||i.webkitRequestPointerLock||i.msRequestPointerLock||function(){},i.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},i.exitPointerLock=i.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",o,!1),document.addEventListener("mozpointerlockchange",o,!1),document.addEventListener("webkitpointerlockchange",o,!1),document.addEventListener("mspointerlockchange",o,!1),t.elementPointerLock&&i.addEventListener("click",function(e){!j.pointerLock&&t.canvas.requestPointerLock&&(t.canvas.requestPointerLock(),e.preventDefault())},!1))}function o(){j.pointerLock=document.pointerLockElement===t.canvas||document.mozPointerLockElement===t.canvas||document.webkitPointerLockElement===t.canvas||document.msPointerLockElement===t.canvas}},createContext:function(e,r,n,i){if(r&&t.ctx&&e==t.canvas)return t.ctx;var o,a;if(r){var f={antialias:!1,alpha:!1,majorVersion:1};if(i)for(var A in i)f[A]=i[A];void 0!==$&&(a=$.createContext(e,f))&&(o=$.getContext(a).GLctx)}else o=e.getContext("2d");return o?(n&&(t.ctx=o,r&&$.makeContextCurrent(a),t.useWebGL=r,j.moduleContextCreatedCallbacks.forEach(function(e){e()}),j.init()),o):null},destroyContext:function(e,r,n){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,r,n){j.lockPointer=e,j.resizeCanvas=r,j.vrDevice=n,void 0===j.lockPointer&&(j.lockPointer=!0),void 0===j.resizeCanvas&&(j.resizeCanvas=!1),void 0===j.vrDevice&&(j.vrDevice=null);var i=t.canvas;function o(){j.isFullscreen=!1;var e=i.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(i.exitFullscreen=j.exitFullscreen,j.lockPointer&&i.requestPointerLock(),j.isFullscreen=!0,j.resizeCanvas?j.setFullscreenCanvasSize():j.updateCanvasDimensions(i)):(e.parentNode.insertBefore(i,e),e.parentNode.removeChild(e),j.resizeCanvas?j.setWindowedCanvasSize():j.updateCanvasDimensions(i)),t.onFullScreen&&t.onFullScreen(j.isFullscreen),t.onFullscreen&&t.onFullscreen(j.isFullscreen)}j.fullscreenHandlersInstalled||(j.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1));var a=document.createElement("div");i.parentNode.insertBefore(a,i),a.appendChild(i),a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullscreen?function(){a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(a.webkitRequestFullScreen?function(){a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),n?a.requestFullscreen({vrDisplay:n}):a.requestFullscreen()},requestFullScreen:function(e,r,n){return A("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),j.requestFullScreen=function(e,r,n){return j.requestFullscreen(e,r,n)},j.requestFullscreen(e,r,n)},exitFullscreen:function(){return!!j.isFullscreen&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)},nextRAF:0,fakeRequestAnimationFrame:function(e){var r=Date.now();if(0===j.nextRAF)j.nextRAF=r+1e3/60;else for(;r+2>=j.nextRAF;)j.nextRAF+=1e3/60;var n=Math.max(j.nextRAF-r,0);setTimeout(e,n)},requestAnimationFrame:function(e){"undefined"==typeof window?j.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||j.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(e){return function(){if(!l)return e.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){j.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(j.allowAsyncCallbacks=!0,j.queuedAsyncCallbacks.length>0){var e=j.queuedAsyncCallbacks;j.queuedAsyncCallbacks=[],e.forEach(function(e){e()})}},safeRequestAnimationFrame:function(e){return j.requestAnimationFrame(function(){l||(j.allowAsyncCallbacks?e():j.queuedAsyncCallbacks.push(e))})},safeSetTimeout:function(e,r){return t.noExitRuntime=!0,setTimeout(function(){l||(j.allowAsyncCallbacks?e():j.queuedAsyncCallbacks.push(e))},r)},safeSetInterval:function(e,r){return t.noExitRuntime=!0,setInterval(function(){l||j.allowAsyncCallbacks&&e()},r)},getMimetype:function(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta:function(e){var r=0;switch(e.type){case"DOMMouseScroll":r=e.detail/3;break;case"mousewheel":r=e.wheelDelta/120;break;case"wheel":switch(r=e.deltaY,e.deltaMode){case 0:r/=100;break;case 1:r/=3;break;case 2:r*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return r},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(e){if(j.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?j.mouseMovementX=j.mouseMovementY=0:(j.mouseMovementX=j.getMovementX(e),j.mouseMovementY=j.getMovementY(e)),void 0!==J?(j.mouseX=J.mouseX+j.mouseMovementX,j.mouseY=J.mouseY+j.mouseMovementY):(j.mouseX+=j.mouseMovementX,j.mouseY+=j.mouseMovementY);else{var r=t.canvas.getBoundingClientRect(),n=t.canvas.width,i=t.canvas.height,o=void 0!==window.scrollX?window.scrollX:window.pageXOffset,a=void 0!==window.scrollY?window.scrollY:window.pageYOffset;if("touchstart"===e.type||"touchend"===e.type||"touchmove"===e.type){var f=e.touch;if(void 0===f)return;var A=f.pageX-(o+r.left),u=f.pageY-(a+r.top),s={x:A*=n/r.width,y:u*=i/r.height};if("touchstart"===e.type)j.lastTouches[f.identifier]=s,j.touches[f.identifier]=s;else if("touchend"===e.type||"touchmove"===e.type){var l=j.touches[f.identifier];l||(l=s),j.lastTouches[f.identifier]=l,j.touches[f.identifier]=s}return}var c=e.pageX-(o+r.left),d=e.pageY-(a+r.top);c*=n/r.width,d*=i/r.height,j.mouseMovementX=c-j.mouseX,j.mouseMovementY=d-j.mouseY,j.mouseX=c,j.mouseY=d}},asyncLoad:function(e,r,n,i){var o=i?"":"al "+e;t.readAsync(e,function(e){r(new Uint8Array(e)),o&&Y()},function(r){if(!n)throw'Loading data file "'+e+'" failed.';n()}),o&&U()},resizeListeners:[],updateResizeListeners:function(){var e=t.canvas;j.resizeListeners.forEach(function(r){r(e.width,e.height)})},setCanvasSize:function(e,r,n){var i=t.canvas;j.updateCanvasDimensions(i,e,r),n||j.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(void 0!==J){var e=w[J.screen>>2];e|=8388608,g[J.screen>>2]=e}j.updateCanvasDimensions(t.canvas),j.updateResizeListeners()},setWindowedCanvasSize:function(){if(void 0!==J){var e=w[J.screen>>2];e&=-8388609,g[J.screen>>2]=e}j.updateCanvasDimensions(t.canvas),j.updateResizeListeners()},updateCanvasDimensions:function(e,r,n){r&&n?(e.widthNative=r,e.heightNative=n):(r=e.widthNative,n=e.heightNative);var i=r,o=n;if(t.forcedAspectRatio&&t.forcedAspectRatio>0&&(i/o1)return 0;if(r.buffer||(r.buffer=Ae(r.width*r.height*4),g[e+20>>2]=r.buffer),g[e+20>>2]=r.buffer,e==J.screen&&t.screenIsReadOnly&&r.image)return 0;if(J.defaults.discardOnLock){if(r.image||(r.image=r.ctx.createImageData(r.width,r.height)),!J.defaults.opaqueFrontBuffer)return}else r.image=r.ctx.getImageData(0,0,r.width,r.height);if(e==J.screen&&J.defaults.opaqueFrontBuffer)for(var n=r.image.data,i=n.length,o=0;o>2],y:g[e+4>>2],w:g[e+8>>2],h:g[e+12>>2]}},updateRect:function(e,r){g[e>>2]=r.x,g[e+4>>2]=r.y,g[e+8>>2]=r.w,g[e+12>>2]=r.h},intersectionOfRects:function(e,r){var n=Math.max(e.x,r.x),t=Math.max(e.y,r.y),i=Math.min(e.x+e.w,r.x+r.w),o=Math.min(e.y+e.h,r.y+r.h);return{x:n,y:t,w:Math.max(n,i)-n,h:Math.max(t,o)-t}},checkPixelFormat:function(e){},loadColorToCSSRGB:function(e){var r=g[e>>2];return"rgb("+(255&r)+","+(r>>8&255)+","+(r>>16&255)+")"},loadColorToCSSRGBA:function(e){var r=g[e>>2];return"rgba("+(255&r)+","+(r>>8&255)+","+(r>>16&255)+","+(r>>24&255)/255+")"},translateColorToCSSRGBA:function(e){return"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>>24)/255+")"},translateRGBAToCSSRGBA:function(e,r,n,t){return"rgba("+(255&e)+","+(255&r)+","+(255&n)+","+(255&t)/255+")"},translateRGBAToColor:function(e,r,n,t){return e|r<<8|n<<16|t<<24},makeSurface:function(e,r,n,i,o,a,f,A,u){var s,l=1&(n=n||0),c=2097152&n,d=67108864&n,v=Ae(60),b=Ae(44),w=c?1:4,m=0;l||d||(m=Ae(e*r*4)),g[v>>2]=n,g[v+4>>2]=b,g[v+8>>2]=e,g[v+12>>2]=r,g[v+16>>2]=e*w,g[v+20>>2]=m,g[v+36>>2]=0,g[v+40>>2]=0,g[v+44>>2]=t.canvas.width,g[v+48>>2]=t.canvas.height,g[v+56>>2]=1,g[b>>2]=-2042224636,g[b+4>>2]=0,h[b+8>>0]=8*w,h[b+9>>0]=w,g[b+12>>2]=a||255,g[b+16>>2]=f||65280,g[b+20>>2]=A||16711680,g[b+24>>2]=u||4278190080,J.GL=J.GL||d,i?s=t.canvas:((s=J.canvasPool.length>0?J.canvasPool.pop():document.createElement("canvas")).width=e,s.height=r);var k={antialias:0!=J.glAttributes[13]&&J.glAttributes[14]>1,depth:J.glAttributes[6]>0,stencil:J.glAttributes[7]>0,alpha:J.glAttributes[3]>0},p=j.createContext(s,d,i,k);return J.surfaces[v]={width:e,height:r,canvas:s,ctx:p,surf:v,buffer:m,pixelFormat:b,alpha:255,flags:n,locked:0,usePageCanvas:i,source:o,isFlagSet:function(e){return n&e}},v},copyIndexedColorData:function(e,r,n,i,o){if(e.colors){var a=t.canvas.width,f=t.canvas.height,A=r||0,u=n||0,s=(i||a-A)+A,l=(o||f-u)+u,c=e.buffer;e.image.data32||(e.image.data32=new Uint32Array(e.image.data.buffer));for(var d=e.image.data32,h=e.colors32,b=u;b>0]]}},freeSurface:function(e){var r=e+56,n=g[r>>2];if(n>1)g[r>>2]=n-1;else{var t=J.surfaces[e];!t.usePageCanvas&&t.canvas&&J.canvasPool.push(t.canvas),t.buffer&&fe(t.buffer),fe(t.pixelFormat),fe(e),J.surfaces[e]=null,e===J.screen&&(J.screen=null)}},blitSurface:function(e,r,n,t,i){var o,a,f,A,s=J.surfaces[e],l=J.surfaces[n];if(o=r?J.loadRect(r):{x:0,y:0,w:s.width,h:s.height},a=t?J.loadRect(t):{x:0,y:0,w:s.width,h:s.height},l.clipRect){var c=i&&0!==o.w?o.w/a.w:1,d=i&&0!==o.h?o.h/a.h:1;a=J.intersectionOfRects(l.clipRect,a),o.w=a.w*c,o.h=a.h*d,t&&J.updateRect(t,a)}if(i?(f=a.w,A=a.h):(f=o.w,A=o.h),0===o.w||0===o.h||0===f||0===A)return 0;var h=l.ctx.globalAlpha;return l.ctx.globalAlpha=s.alpha/255,l.ctx.drawImage(s.canvas,o.x,o.y,o.w,o.h,a.x,a.y,f,A),l.ctx.globalAlpha=h,n!=J.screen&&(u("WARNING: copying canvas data to memory for compatibility"),Z(n),l.locked--),0},downFingers:{},savedKeydown:null,receiveEvent:function(e){function r(){for(var e in J.keyboardMap)J.events.push({type:"keyup",keyCode:J.keyboardMap[e]})}switch(e.type){case"touchstart":case"touchmove":e.preventDefault();var n=[];if("touchstart"===e.type)for(var i=0;i0?Math.max(s,1):Math.min(s,-1))>0?3:4;J.events.push({type:"mousedown",button:l,pageX:e.pageX,pageY:e.pageY}),J.events.push({type:"mouseup",button:l,pageX:e.pageX,pageY:e.pageY}),J.events.push({type:"wheel",deltaX:0,deltaY:s}),e.preventDefault();break;case"mousemove":if(1===J.DOMButtons[0]&&J.events.push({type:"touchmove",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),j.pointerLock&&("mozMovementX"in e&&(e.movementX=e.mozMovementX,e.movementY=e.mozMovementY),0==e.movementX&&0==e.movementY))return void e.preventDefault();case"keydown":case"keyup":case"keypress":case"mousedown":case"mouseup":if("keydown"===e.type&&(J.unicode||J.textInput)&&8!==e.keyCode&&9!==e.keyCode||e.preventDefault(),"mousedown"==e.type)J.DOMButtons[e.button]=1,J.events.push({type:"touchstart",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}});else if("mouseup"==e.type){if(!J.DOMButtons[e.button])return;J.events.push({type:"touchend",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),J.DOMButtons[e.button]=0}"keydown"===e.type||"mousedown"===e.type?J.canRequestFullscreen=!0:"keyup"!==e.type&&"mouseup"!==e.type||(J.isRequestingFullscreen&&(t.requestFullscreen(!0,!0),J.isRequestingFullscreen=!1),J.canRequestFullscreen=!1),"keypress"===e.type&&J.savedKeydown?(J.savedKeydown.keypressCharCode=e.charCode,J.savedKeydown=null):"keydown"===e.type&&(J.savedKeydown=e),("keypress"!==e.type||J.textInput)&&J.events.push(e);break;case"mouseout":for(i=0;i<3;i++)J.DOMButtons[i]&&(J.events.push({type:"mouseup",button:i,pageX:e.pageX,pageY:e.pageY}),J.DOMButtons[i]=0);e.preventDefault();break;case"focus":J.events.push(e),e.preventDefault();break;case"blur":J.events.push(e),r(),e.preventDefault();break;case"visibilitychange":J.events.push({type:"visibilitychange",visible:!document.hidden}),r(),e.preventDefault();break;case"unload":return void(j.mainLoop.runner&&(J.events.push(e),j.mainLoop.runner()));case"resize":J.events.push(e),e.preventDefault&&e.preventDefault()}J.events.length>=1e4&&(A("SDL event queue full, dropping events"),J.events=J.events.slice(0,1e4)),J.flushEventsToHandler()},lookupKeyCodeForEvent:function(e){var r=e.keyCode;return r>=65&&r<=90?r+=32:(r=J.keyCodes[e.keyCode]||e.keyCode,e.location===KeyboardEvent.DOM_KEY_LOCATION_RIGHT&&r>=1248&&r<=1251&&(r+=4)),r},handleEvent:function(e){if(!e.handled)switch(e.handled=!0,e.type){case"touchstart":case"touchend":case"touchmove":j.calculateMouseEvent(e);break;case"keydown":case"keyup":var r="keydown"===e.type,n=J.lookupKeyCodeForEvent(e);h[J.keyboardState+n>>0]=r,J.modState=(h[J.keyboardState+1248>>0]?64:0)|(h[J.keyboardState+1249>>0]?1:0)|(h[J.keyboardState+1250>>0]?256:0)|(h[J.keyboardState+1252>>0]?128:0)|(h[J.keyboardState+1253>>0]?2:0)|(h[J.keyboardState+1254>>0]?512:0),r?J.keyboardMap[n]=e.keyCode:delete J.keyboardMap[n];break;case"mousedown":case"mouseup":"mousedown"==e.type?J.buttonState|=1<0;)if(!1!==J.makeCEvent(J.events.shift(),e))return 1;return 0}return J.events.length>0},makeCEvent:function(e,r){if("number"==typeof e)return ue(r,e,28),void fe(e);switch(J.handleEvent(e),e.type){case"keydown":case"keyup":var n,i="keydown"===e.type,o=J.lookupKeyCodeForEvent(e);n=o>=1024?o-1024:J.scanCodes[o]||o,g[r>>2]=J.DOMEventToSDLEvent[e.type],h[r+8>>0]=i?1:0,h[r+9>>0]=0,g[r+12>>2]=n,g[r+16>>2]=o,b[r+20>>1]=J.modState,g[r+24>>2]=e.keypressCharCode||o;break;case"keypress":g[r>>2]=J.DOMEventToSDLEvent[e.type];for(var a=(p=String.fromCharCode(e.charCode),void 0,void 0,I=void 0,void 0,C=void 0>0?void 0:function(e){for(var r=0,n=0;n=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++n)),t<=127?++r:r+=t<=2047?2:t<=65535?3:4}return r}(p)+1,y(p,I=new Array(C),0,I.length),I),f=0;f>0]=a[f];break;case"mousedown":case"mouseup":case"mousemove":"mousemove"!=e.type?(i="mousedown"===e.type,g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+4>>2]=0,g[r+8>>2]=0,g[r+12>>2]=0,h[r+16>>0]=e.button+1,h[r+17>>0]=i?1:0,g[r+20>>2]=j.mouseX,g[r+24>>2]=j.mouseY):(g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+4>>2]=0,g[r+8>>2]=0,g[r+12>>2]=0,g[r+16>>2]=J.buttonState,g[r+20>>2]=j.mouseX,g[r+24>>2]=j.mouseY,g[r+28>>2]=j.mouseMovementX,g[r+32>>2]=j.mouseMovementY);break;case"wheel":g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+16>>2]=e.deltaX,g[r+20>>2]=e.deltaY;break;case"touchstart":case"touchend":case"touchmove":var A=e.touch;if(!j.touches[A.identifier])break;var u=t.canvas.width,s=t.canvas.height,l=j.touches[A.identifier].x/u,c=j.touches[A.identifier].y/s,d=l-j.lastTouches[A.identifier].x/u,v=c-j.lastTouches[A.identifier].y/s;if(void 0===A.deviceID&&(A.deviceID=J.TOUCH_DEFAULT_ID),0===d&&0===v&&"touchmove"===e.type)return!1;g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+4>>2]=H(),tempI64=[A.deviceID>>>0,(tempDouble=A.deviceID,+F(tempDouble)>=1?tempDouble>0?(0|T(+R(tempDouble/4294967296),4294967295))>>>0:~~+P((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],g[r+8>>2]=tempI64[0],g[r+12>>2]=tempI64[1],tempI64=[A.identifier>>>0,(tempDouble=A.identifier,+F(tempDouble)>=1?tempDouble>0?(0|T(+R(tempDouble/4294967296),4294967295))>>>0:~~+P((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],g[r+16>>2]=tempI64[0],g[r+20>>2]=tempI64[1],m[r+24>>2]=l,m[r+28>>2]=c,m[r+32>>2]=d,m[r+36>>2]=v,void 0!==A.force?m[r+40>>2]=A.force:m[r+40>>2]="touchend"==e.type?0:1;break;case"unload":g[r>>2]=J.DOMEventToSDLEvent[e.type];break;case"resize":g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+4>>2]=e.w,g[r+8>>2]=e.h;break;case"joystick_button_up":case"joystick_button_down":var w="joystick_button_up"===e.type?0:1;g[r>>2]=J.DOMEventToSDLEvent[e.type],h[r+4>>0]=e.index,h[r+5>>0]=e.button,h[r+6>>0]=w;break;case"joystick_axis_motion":g[r>>2]=J.DOMEventToSDLEvent[e.type],h[r+4>>0]=e.index,h[r+5>>0]=e.axis,g[r+8>>2]=J.joystickAxisValueConversion(e.value);break;case"focus":g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+4>>2]=0,h[r+8>>0]=12;break;case"blur":g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+4>>2]=0,h[r+8>>0]=13;break;case"visibilitychange":var k=e.visible?1:2;g[r>>2]=J.DOMEventToSDLEvent[e.type],g[r+4>>2]=0,h[r+8>>0]=k;break;default:throw"Unhandled SDL event: "+e.type}var p,C,I},makeFontString:function(e,r){return"'"!=r.charAt(0)&&'"'!=r.charAt(0)&&(r='"'+r+'"'),e+"px "+r+", serif"},estimateTextWidth:function(e,r){var n=e.size,t=J.makeFontString(n,e.name),i=J.ttfContext;i.save(),i.font=t;var o=0|i.measureText(r).width;return i.restore(),o},allocateChannels:function(e){if(!(J.numChannels&&J.numChannels>=e&&0!=e)){J.numChannels=e,J.channels=[];for(var r=0;r>1]/32768;else if(8==J.audio.format)for(a=0;a>0];o[a]=(f>=0?f-128:f+128)/128}else{if(33056!=J.audio.format)throw"Invalid SDL audio format "+J.audio.format+"!";for(a=0;a>2]}}},debugSurface:function(e){console.log("dumping surface "+[e.surf,e.source,e.width,e.height]);for(var r=e.ctx.getImageData(0,0,e.width,e.height).data,n=Math.min(e.width,e.height),t=0;t0},queryJoysticks:function(){for(var e in J.lastJoystickState){var r=J.getGamepad(e-1),n=J.lastJoystickState[e];if(void 0===r)return;if(null===r)return;if("number"!=typeof r.timestamp||r.timestamp!==n.timestamp||!r.timestamp){var t;for(t=0;te&&e>=0?r[e]:null}},$={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){$.miniTempBuffer=new Float32Array($.MINI_TEMP_BUFFER_SIZE);for(var e=0;e<$.MINI_TEMP_BUFFER_SIZE;e++)$.miniTempBufferViews[e]=$.miniTempBuffer.subarray(0,e+1)},recordError:function(e){$.lastError||($.lastError=e)},getNewId:function(e){for(var r=$.counter++,n=e.length;n>2]:-1;i+=C(g[n+4*o>>2],a<0?void 0:a)}return i},createContext:function(e,r){var n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r);return n&&$.registerContext(n,r)},registerContext:function(e,n){var t=Ae(8),i={handle:t,attributes:n,version:n.majorVersion,GLctx:e};return i.cannotHandleOffsetsInUniformArrayViews=function(e){function n(r,n){var t=e.createShader(n);return e.shaderSource(t,r),e.compileShader(t),t}try{var t=e.createProgram();e.attachShader(t,n("attribute vec4 p;void main(){gl_Position=p;}",e.VERTEX_SHADER)),e.attachShader(t,n("precision lowp float;uniform vec4 u;void main(){gl_FragColor=u;}",e.FRAGMENT_SHADER)),e.linkProgram(t);var i=new Float32Array(8);i[4]=1,e.useProgram(t);var o=e.getUniformLocation(t,"u");return e.uniform4fv(o,i.subarray(4,8)),!e.getUniform(t,o)[0]}catch(r){return!1}}(),e.canvas&&(e.canvas.GLctxObject=i),$.contexts[t]=i,(void 0===n.enableExtensionsByDefault||n.enableExtensionsByDefault)&&$.initExtensions(i),t},makeContextCurrent:function(e){return $.currentContext=$.contexts[e],t.ctx=K=$.currentContext&&$.currentContext.GLctx,!(e&&!K)},getContext:function(e){return $.contexts[e]},deleteContext:function(e){$.currentContext===$.contexts[e]&&($.currentContext=null),"object"==typeof JSEvents&&JSEvents.removeAllHandlersOnTarget($.contexts[e].GLctx.canvas),$.contexts[e]&&$.contexts[e].GLctx.canvas&&($.contexts[e].GLctx.canvas.GLctxObject=void 0),fe($.contexts[e]),$.contexts[e]=null},initExtensions:function(e){if(e||(e=$.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var r=e.GLctx;if(e.version<2){var n=r.getExtension("ANGLE_instanced_arrays");n&&(r.vertexAttribDivisor=function(e,r){n.vertexAttribDivisorANGLE(e,r)},r.drawArraysInstanced=function(e,r,t,i){n.drawArraysInstancedANGLE(e,r,t,i)},r.drawElementsInstanced=function(e,r,t,i,o){n.drawElementsInstancedANGLE(e,r,t,i,o)});var t=r.getExtension("OES_vertex_array_object");t&&(r.createVertexArray=function(){return t.createVertexArrayOES()},r.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},r.bindVertexArray=function(e){t.bindVertexArrayOES(e)},r.isVertexArray=function(e){return t.isVertexArrayOES(e)});var i=r.getExtension("WEBGL_draw_buffers");i&&(r.drawBuffers=function(e,r){i.drawBuffersWEBGL(e,r)})}r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query");var o=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2"],a=r.getSupportedExtensions();a&&a.length>0&&r.getSupportedExtensions().forEach(function(e){-1!=o.indexOf(e)&&r.getExtension(e)})}},populateUniformTable:function(e){for(var r=$.programs[e],n=$.programInfos[e]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1},t=n.uniforms,i=K.getProgramParameter(r,35718),o=0;o>2]},getStr:function(){return C(ee.get())},get64:function(){var e=ee.get();return ee.get(),e},getZero:function(){ee.get()}};function re(){return h.length}function ne(e){try{var n=new ArrayBuffer(e);if(n.byteLength!=e)return!1;new Int8Array(n).set(h)}catch(r){return!1}return t._emscripten_replace_memory(n),h=new Int8Array(n),b=new Int16Array(n),g=new Int32Array(n),v=new Uint8Array(n),new Uint16Array(n),w=new Uint32Array(n),m=new Float32Array(n),new Float64Array(n),d=n,n}t.requestFullScreen=function(e,r,n){A("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."),t.requestFullScreen=t.requestFullscreen,j.requestFullScreen(e,r,n)},t.requestFullscreen=function(e,r,n){j.requestFullscreen(e,r,n)},t.requestAnimationFrame=function(e){j.requestAnimationFrame(e)},t.setCanvasSize=function(e,r,n){j.setCanvasSize(e,r,n)},t.pauseMainLoop=function(){j.mainLoop.pause()},t.resumeMainLoop=function(){j.mainLoop.resume()},t.getUserMedia=function(){j.getUserMedia()},t.createContext=function(e,r,n,t){return j.createContext(e,r,n,t)},N="undefined"!=typeof dateNow?dateNow:"object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return performance.now()}:Date.now,$.init();var te="function"==typeof atob?atob:function(e){var r,n,t,i,o,a,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="",u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{r=f.indexOf(e.charAt(u++))<<2|(i=f.indexOf(e.charAt(u++)))>>4,n=(15&i)<<4|(o=f.indexOf(e.charAt(u++)))>>2,t=(3&o)<<6|(a=f.indexOf(e.charAt(u++))),A+=String.fromCharCode(r),64!==o&&(A+=String.fromCharCode(n)),64!==a&&(A+=String.fromCharCode(t))}while(u>2]),o[n>>2]=0,o[e+2364>>2]=0,(e=0|o[(n=e+2344|0)>>2])?(Y(0|o[(r=e+20|0)>>2]),o[r>>2]=0,U(e),o[n>>2]=0):o[n>>2]=0}function U(e){Nr(e|=0)}function Y(e){(e|=0)&&(z(e),U(e))}function z(e){var r=0,n=0,t=0;if(e|=0){U(0|o[e+160>>2]),U(0|o[e+172>>2]),W(0|o[e+168>>2]),X(e+124|0),X(e+136|0),n=56+(r=e+120|0)|0;do{o[r>>2]=0,r=r+4|0}while((0|r)<(0|n));if(U(0|o[(r=e+16|0)>>2]),o[r>>2]=0,(0|o[(r=e+176|0)>>2])>0){n=0;do{U(0|o[(t=e+180+(20*n|0)+16|0)>>2]),o[t>>2]=0,n=n+1|0}while((0|n)<(0|o[r>>2]))}o[r>>2]=0,o[e+260>>2]=0,U(0|o[(r=e+264|0)>>2]),o[r>>2]=0,o[e+12>>2]=0}}function W(e){(e|=0)&&U(e)}function X(e){(e|=0)&&(U(0|o[e>>2]),o[e>>2]=0)}function Q(e,r,n,i){e|=0,n|=0,i|=0;var f,A,u,s,c=0,d=0,h=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0;if(f=0|o[(r|=0)>>2],(0|n)<0|(0|i)<1|(i+n|0)>(0|(u=0|o[(A=r+88|0)>>2])))return 0;s=e+2356|0;e:do{if(!(0|o[s>>2])){d=0|o[(c=e+2344|0)>>2];do{if(d)D=i,L=d,x=16;else{if(h=0|N(1,0,144),o[c>>2]=h,!h)return 0;if(h=0|o[r>>2],h=0|V(g=0|vn(0|(b=0|o[A>>2]),((0|b)<0)<<31>>31|0,0|h,((0|h)<0)<<31>>31|0),0|v(),1),o[e+2360>>2]=h,0|h&&(o[e+2364>>2]=h,o[e+2368>>2]=0,g=0|o[c>>2],m=1+(b=0|o[e+2348>>2])|0,k=(w=0|o[e+2352>>2])-1|0,p=g+24|0,0|o[2034]&&(o[2368]=0,o[2369]=1,o[2370]=2,o[2371]=3,o[2364]=0,o[2365]=1,o[2366]=2,o[2367]=3),o[2034]=0,o[g+136>>2]=h,o[g>>2]=o[r>>2],h=r+4|0,o[(C=g+4|0)>>2]=o[h>>2],w>>>0>=2)&&(w=3&t[b>>0],o[(y=g+8|0)>>2]=255&w,I=0|a[b>>0],o[g+12>>2]=I>>>2&3,E=(I=0|a[b>>0])>>>4&3,o[g+16>>2]=E,(255&w)<=1)&&!(E>>>0>1|(0|a[b>>0])>63)&&(j(p,520),H(0,p),o[g+64>>2]=g,o[p>>2]=o[r>>2],o[g+28>>2]=o[h>>2],o[g+96>>2]=o[r+72>>2],o[g+100>>2]=o[r+76>>2],o[g+104>>2]=o[r+80>>2],o[g+108>>2]=o[r+84>>2],o[g+112>>2]=o[A>>2],0|(0|o[y>>2]?0|Z(g,m,k):k>>>0>=(0|l(0|o[C>>2],0|o[g>>2]))>>>0&1))){if(k=0|o[c>>2],1==(0|o[k+16>>2])){D=u-n|0,L=k,x=16;break}o[e+2372>>2]=0,D=i,L=k,x=16;break}}}while(0);do{if(16==(0|x)){if(d=0|o[L>>2],k=0|o[L+112>>2],0|o[L+8>>2]){if(!(0|K(L,m=D+n|0)))break;S=m}else{if(g=0|o[(m=e+2368|0)>>2],C=0|l(d,n),y=1+(0|o[e+2348>>2])+C|0,p=(h=0|o[e+2364>>2])+C|0,E=(0|D)>0,b=0|o[(C=L+12|0)>>2])if(E){if(B=0|l(d,D+n+-1|0),Yn[31&o[9472+(b<<2)>>2]](g,y,p,d),1!=(0|D)){I=y,_=p,F=1;do{I=I+d|0,P=_,_=_+d|0,Yn[31&o[9472+(o[C>>2]<<2)>>2]](P,I,_,d),F=F+1|0}while((0|F)!=(0|D))}M=h+B|0}else M=g;else if(E){for(w=D+n+-1|0,I=y,_=0,B=p;In(0|B,0|I,0|d),(0|(_=_+1|0))!=(0|D);)I=I+d|0,B=B+d|0;M=h+(0|l(d,w))|0}else M=g;o[m>>2]=M,S=D+n|0}if((0|S)<(0|k)){if(!(0|o[s>>2]))break e}else o[s>>2]=1;if(0|(F=0|o[c>>2])&&(Y(0|o[(d=F+20|0)>>2]),o[d>>2]=0,U(F)),o[c>>2]=0,(0|(F=0|o[e+2372>>2]))<=0)break e;if(d=0|o[r+84>>2],0|J((_=(0|o[e+2364>>2])+(0|l(d,f))|0)+(I=0|o[r+76>>2])|0,(0|o[r+80>>2])-I|0,(0|o[A>>2])-d|0,f,F))break e}}while(0);return U(0|o[(F=e+2360|0)>>2]),o[F>>2]=0,o[e+2364>>2]=0,0|(F=0|o[c>>2])&&(Y(0|o[(d=F+20|0)>>2]),o[d>>2]=0,U(F)),o[c>>2]=0,0}}while(0);return 0|(0|o[e+2364>>2])+(0|l(f,n))}function N(e,r,n){var t,i,o=0;return t=0|vn(0|(n|=0),0,0|(e|=0),0|(r|=0)),i=0|v(),!(0==(0|e)&0==(0|r))&&(o=0|kn(2147418112,0,0|e,0|r),(0|t)!=(0|t)|0!=(0|i)|(r=0|v())>>>0<0|0==(0|r)&o>>>0>>0)?0:0|Vr(e,n)}function V(e,r,n){var t,i,o=0;return t=0|vn(0|(n|=0),0,0|(e|=0),0|(r|=0)),i=0|v(),!(0==(0|e)&0==(0|r))&&(o=0|kn(2147418112,0,0|e,0|r),(0|t)!=(0|t)|0!=(0|i)|(r=0|v())>>>0<0|0==(0|r)&o>>>0>>0)?0:0|Qr(0|l(e,n))}function j(e,r){if(512!=(-256&(r|=0)|0))return 0;if(!(e|=0))return 1;e=(r=e)+108|0;do{o[r>>2]=0,r=r+4|0}while((0|r)<(0|e));return 1}function H(e,r){e|=0,o[44+(r|=0)>>2]=4,o[r+48>>2]=5,o[r+52>>2]=5,o[r+40>>2]=e}function Z(e,r,n){e|=0,r|=0,n|=0;var i,a,f,A,u=0,s=0,l=0,c=0;if(!(i=0|N(1,0,272)))return 0;if(o[i>>2]=0,o[i+4>>2]=2,ke(),u=0|o[e>>2],o[(a=i+100|0)>>2]=u,l=0|o[(s=e+4|0)>>2],o[(f=i+104|0)>>2]=l,A=e+24|0,o[i+8>>2]=A,o[e+64>>2]=e,o[A>>2]=u,o[e+28>>2]=l,o[i>>2]=0,pe(i+24|0,r,n),!(0|Ce(0|o[e>>2],0|o[s>>2],1,i,0)))return z(i),U(i),0;e:do{if(1==(0|o[i+176>>2])&&3==(0|o[i+180>>2])&&(0|o[i+120>>2])<=0){if((0|(s=0|o[i+164>>2]))>0){n=0|o[i+168>>2],r=0;do{if(0|t[o[n+(548*r|0)+4>>2]>>0]){c=14;break e}if(0|t[o[n+(548*r|0)+8>>2]>>0]){c=14;break e}if(0|t[o[n+(548*r|0)+12>>2]>>0]){c=14;break e}r=r+1|0}while((0|r)<(0|s))}o[e+132>>2]=1,s=0|o[a>>2],n=0|vn(0|(r=0|o[f>>2]),((0|r)<0)<<31>>31|0,0|s,((0|s)<0)<<31>>31|0),s=0|v(),o[i+20>>2]=0,r=0|V(n,s,1),o[i+16>>2]=r,r?c=17:(o[i>>2]=1,c=19)}else c=14}while(0);do{if(14==(0|c)){if(o[e+132>>2]=0,r=0|o[e>>2],s=0|o[a>>2],l=0|vn(0|(n=0|o[f>>2]),((0|n)<0)<<31>>31|0,0|s,((0|s)<0)<<31>>31|0),s=0|v(),n=65535&r,r=0|bn(0|(u=0|Cn(0|r,((0|r)<0)<<31>>31|0,4)),0|v(),0|n,0),s=0|V(u=0|bn(0|r,0|v(),0|l,0|s),0|v(),4),o[i+16>>2]=s,s){o[i+20>>2]=s+(l<<2)+(n<<2),c=17;break}o[i>>2]=1,o[i+20>>2]=0,c=19;break}}while(0);return 17==(0|c)?(o[e+20>>2]=i,1):19==(0|c)?(z(i),U(i),0):0}function K(e,r){r|=0;var n,A,u,s,c,d,h,b,g,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0,K=0,J=0,ie=0,oe=0,ae=0,fe=0,Ae=0,ue=0,se=0,le=0,ce=0,de=0,he=0,ve=0,be=0,ge=0,we=0,me=0,ke=0,pe=0,Ce=0,ye=0,Ie=0,Ee=0,De=0,Le=0,xe=0,Se=0,_e=0,Be=0,Me=0,Fe=0,Pe=0,Re=0,Te=0,Ge=0,Oe=0,qe=0,Ue=0;if(n=0|o[20+(e|=0)>>2],(0|o[n+108>>2])>=(0|r))return 1;if(0|o[(w=e+132|0)>>2])m=0|o[n+16>>2];else{if($(),e=0|o[n+16>>2],!(0|o[w>>2]))return 0|te(n,e,0|o[n+100>>2],0|o[n+104>>2],r,1);m=e}e=0|o[n+100>>2],s=(A=0|o[(w=n+112|0)>>2])-(0|l(u=(0|A)/(0|e)|0,e))|0,c=n+24|0,d=0|l(0|o[n+104>>2],e),h=0|l(e,r),b=0|o[n+148>>2];e:do{if((0|A)<(0|h))if((p=0|o[(k=n+152|0)>>2])?(y=0|l(0|o[n+156>>2],p?u>>p:u),C=0|o[(0|o[n+160>>2])+(y+(p?s>>p:s)<<2)>>2]):C=0,0|o[(p=n+48|0)>>2])Oe=u,qe=A,Ue=p,pe=73;else{for(I=n+44|0,E=n+160|0,D=n+156|0,L=n+40|0,x=n+36|0,S=u,_=s,B=A,M=(0|o[(y=n+168|0)>>2])+(548*C|0)|0;;){_&b?T=M:((F=0|o[k>>2])?(R=0|l(0|o[D>>2],F?S>>F:S),P=0|o[(0|o[E>>2])+(R+(F?_>>F:_)<<2)>>2]):P=0,T=(0|o[y>>2])+(548*P|0)|0),(0|(F=0|o[I>>2]))>31?(ee(c),G=0|o[I>>2]):G=F,F=0|o[T>>2],R=0|pn(0|(O=0|o[(R=c)>>2]),0|(q=0|o[R+4>>2]),63&G|0),v(),(255&(Y=0|t[(R=F+((U=255&R)<<2)|0)>>0]))>8?(z=G+8|0,o[I>>2]=z,W=0|pn(0|O,0|q,63&z|0),v(),Q=X=R+((0|f[F+(U<<2)+2>>1])<<2)+(((1<<(255&Y)-8)-1&W)<<2)|0,N=0|t[X>>0],V=z):(Q=R,N=Y,V=G),Y=V+(255&N)|0,o[I>>2]=Y,z=65535&(R=0|i[Q+2>>1]);do{if((65535&R)<256)t[m+B>>0]=R,X=B+1|0,(0|(W=_+1|0))>=(0|e)?(0|S)<(0|r)&0==(15&(U=S+1|0)|0)?(re(n,U),j=X,H=U,Z=0,K=T):(j=X,H=U,Z=0,K=T):(j=X,H=S,Z=W,K=T);else{if((65535&R)>=280){J=B,ie=0,oe=p;break e}if(X=(W=z+-258|0)>>1,(65535&R)<260?(ae=z+-256|0,fe=Y,Ae=O,ue=q):(W=(0|ne(c,X))+((65535&(1&R|2))<>2],Ae=0|o[X>>2],ue=0|o[X+4>>2]),X=ae+1|0,W=0|o[T+16>>2],U=0|pn(0|Ae,0|ue,63&fe|0),v(),(255&(se=0|t[(U=W+((F=255&U)<<2)|0)>>0]))>8?(le=fe+8|0,o[I>>2]=le,ce=0|pn(0|Ae,0|ue,63&le|0),v(),he=de=U+((0|f[W+(F<<2)+2>>1])<<2)+(((1<<(255&se)-8)-1&ce)<<2)|0,ve=0|t[de>>0],be=le):(he=U,ve=se,be=fe),se=be+(255&ve)|0,o[I>>2]=se,le=65535&(U=0|i[he+2>>1]),(0|se)>31&&ee(c),de=(se=le+-2|0)>>1,((ge=(65535&U)<4?le:(0|ne(c,de))+((1&le|2)<120?we=ge+-119|0:(de=0|a[3584+ge>>0],we=(0|(le=(0|l(de>>>4,e))+(8-(15&de))|0))>1?le:1),(d-B|0)<(0|X)|(0|B)<(0|we)){J=B,ie=0,oe=p;break e}de=(le=m+B|0)+(0-we)|0;r:do{if((0|X)>7){switch(0|we){case 1:U=0|t[de>>0],me=0|l(255&U,16843009),ke=U;break;case 2:me=65537*(65535&(U=a[de>>0]|a[de+1>>0]<<8))|0,ke=255&U;break;case 4:me=U=a[de>>0]|a[de+1>>0]<<8|a[de+2>>0]<<16|a[de+3>>0]<<24,ke=255&U;break;default:pe=54;break r}do{if(3&le){if(U=de+1|0,se=le+1|0,t[le>>0]=ke,ce=me<<24|me>>>8,!(3&se)){Ce=ce,ye=ae,Ie=se,Ee=U,De=ae>>>2,pe=48;break}for(F=U,U=se,se=ce,ce=ae;W=F,F=F+1|0,Le=U,U=U+1|0,t[Le>>0]=0|t[W>>0],se=se<<24|se>>>8,xe=ce+-1|0,3&U;)ce=xe;(0|ce)>4?(Ce=se,ye=xe,Ie=U,Ee=F,De=xe>>2,pe=48):(Se=0,_e=xe,Be=U,Me=F)}else Ce=me,ye=X,Ie=le,Ee=de,De=X>>>2,pe=48}while(0);if(48==(0|pe)){pe=0,W=0;do{o[Ie+(W<<2)>>2]=Ce,W=W+1|0}while((0|W)<(0|De));Se=W<<2,_e=ye,Be=Ie,Me=Ee}if((0|Se)>=(0|_e))break;Le=Se;do{t[Be+Le>>0]=0|t[Me+Le>>0],Le=Le+1|0}while((0|Le)!=(0|_e))}else pe=54}while(0);do{if(54==(0|pe)){if(pe=0,(0|we)>=(0|X)){In(0|le,0|de,0|X);break}if((0|X)<=0)break;Le=0;do{t[le+Le>>0]=0|t[de+Le>>0],Le=Le+1|0}while((0|Le)!=(0|X))}}while(0);if(de=X+B|0,(0|(le=X+_|0))<(0|e))Fe=S,Pe=le;else for(Le=S,W=le;;){if(le=W-e|0,(0|Le)<(0|r)&0==(15&(Re=Le+1|0)|0)&&re(n,Re),(0|le)<(0|e)){Fe=Re,Pe=le;break}Le=Re,W=le}if((0|de)>=(0|h)|0==(Pe&b|0)){j=de,H=Fe,Z=Pe,K=T;break}(W=0|o[k>>2])?(Le=0|l(0|o[D>>2],W?Fe>>W:Fe),Te=0|o[(0|o[E>>2])+(Le+(W?Pe>>W:Pe)<<2)>>2]):Te=0,j=de,H=Fe,Z=Pe,K=(0|o[y>>2])+(548*Te|0)|0}}while(0);if(0|o[p>>2])break;if(Ge=(0|o[L>>2])==(0|o[x>>2])?(0|o[I>>2])>64&1:0,o[p>>2]=Ge,!((0|j)<(0|h)&0==(0|Ge))){Oe=H,qe=j,Ue=p,pe=73;break e}S=H,_=Z,B=j,M=K}o[p>>2]=1,Oe=H,qe=j,Ue=p,pe=73}else Oe=u,qe=A,Ue=n+48|0,pe=73}while(0);return 73==(0|pe)&&(re(n,(0|Oe)>(0|r)?r:Oe),J=qe,ie=1,oe=Ue),g=0|o[oe>>2]?1:(0|o[n+40>>2])==(0|o[n+36>>2])?(0|o[n+44>>2])>64&1:0,o[oe>>2]=g,0|ie&&!((0|d)>(0|J)&0!=(0|g))?(o[w>>2]=J,1):(o[n>>2]=0==(0|g)?3:5,0)}function J(e,r,n,o,A){o|=0;var u,s,c,d,h,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0,Y=0,z=0,W=0;if(u=O,O=O+256|0,v=u,b=(0|(A|=0))/25|0,A>>>0>100)return O=u,0;if(0==(0|(e|=0))|(0|(r|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),i[M>>1]=L,_=_+1|0}while((0|_)!=(0|r))}if(e=(0|(_=v+(r<<1)|0))==(0|d)?D:_,g=(0|m)>-1&(0|m)<(0|b)?g+o|0:g,(0|m)<(0|s))q=y;else{if(P)Y=0;else{_=0;do{p=0|l((0|f[d+(s-_<<1)>>1])+(0|f[d+(C+_<<1)>>1])&65535,I),i[h+(_<<1)>>1]=p>>>16,_=_+1|0}while((0|_)!=(0|T));Y=T}if((0|Y)<(0|G)){_=Y;do{p=0|l((0|f[d+(_+s<<1)>>1])-(0|f[d+(_+E<<1)>>1])&65535,I),i[h+(_<<1)>>1]=p>>>16,_=_+1|0}while((0|_)!=(0|G));z=G}else z=Y;if((0|z)<(0|r)){_=z;do{p=0|l((f[k>>1]<<1)-(0|f[d+(A-_<<1)>>1])-(0|f[d+(_+E<<1)>>1])&65535,I),i[h+(_<<1)>>1]=p>>>16,_=_+1|0}while((0|_)!=(0|r))}if(R){_=0;do{(0|S)>(0|(B=0|a[(p=y+_|0)>>0]))&(0|x)<(0|B)&&(W=(L=(0|i[w+((0|f[h+(_<<1)>>1])-(B<<2)<<1)>>1])+B|0)>>>0>255?255+(L>>31&-255)|0:255&L,t[p>>0]=W),_=_+1|0}while((0|_)!=(0|r))}q=y+o|0}if((0|(m=m+1|0))==(0|n))break;y=q}return U(c),O=u,1}function $(){o[2028]=0}function ee(e){var r,n,t=0,i=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0;r=16+(e|=0)|0,t=0|o[(n=e+20|0)>>2];e:do{if((0|t)>7)for(i=e+8|0,f=0|o[e+12>>2],A=t,u=0|o[r>>2];;){if(u>>>0>=f>>>0){s=A;break e}if(c=0|pn(0|o[(l=e)>>2],0|o[l+4>>2],8),l=0|v(),o[(d=e)>>2]=c,o[d+4>>2]=l,d=0|Cn(0|a[(0|o[i>>2])+u>>0],0,56),h=0|v()|l,o[(l=e)>>2]=d|c,o[l+4>>2]=h,u=u+1|0,o[r>>2]=u,h=A+-8|0,o[n>>2]=h,(0|A)<=15){s=h;break}A=h}else s=t}while(0);0==(0|o[(t=e+24|0)>>2])&&((0|s)<65||(0|o[r>>2])!=(0|o[e+12>>2]))||(o[t>>2]=1,o[n>>2]=0)}function re(e,r){r|=0;var n,t,i,a=0,f=0,A=0,u=0,s=0,c=0;if(a=0|o[8+(e|=0)>>2],f=0|o[a+40>>2],t=e+108|0,A=0|o[((0|o[(n=f+12|0)>>2])>>>0<2?a+84|0:t)>>2],(0|(s=(0|(u=0|o[t>>2]))<(0|A)?A:u))>=(0|r))return o[(e+116|0)>>2]=r,void(o[t>>2]=r);if(u=0|o[a>>2],a=(0|o[f+136>>2])+(0|l(u,s))|0,ce(e+180|0,s,r,(0|o[e+16>>2])+(0|l(0|o[e+100>>2],s))|0,a),!(A=0|o[n>>2]))return o[(e+116|0)>>2]=r,void(o[t>>2]=r);if(i=f+140|0,f=0|l(u,r+-1-s|0),Yn[31&o[9472+(A<<2)>>2]](0|o[i>>2],a,a,u),(0|(A=s+1|0))!=(0|r)){s=a,c=A;do{A=s,s=s+u|0,Yn[31&o[9472+(o[n>>2]<<2)>>2]](A,s,s,u),c=c+1|0}while((0|c)!=(0|r))}o[i>>2]=a+f,o[(e+116|0)>>2]=r,o[t>>2]=r}function ne(e,r){var n,t,i,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,b=0,g=0;if(!((0|(r|=0))<25&0==(0|o[(n=24+(e|=0)|0)>>2])))return o[n>>2]=1,o[e+20>>2]=0,0;if(l=0|pn(0|(A=0|o[(f=e)>>2]),0|(u=0|o[f+4>>2]),63&(s=0|o[(f=e+20|0)>>2])|0),v(),t=o[3712+(r<<2)>>2]&l,l=s+r|0,o[f>>2]=l,r=e+16|0,(0|l)<=7)return 0|t;for(s=e+8|0,i=0|o[e+12>>2],c=0|o[r>>2],d=A,A=u,u=l;;){if(c>>>0>=i>>>0){h=u;break}if(l=0|pn(0|d,0|A,8),b=0|v(),o[(g=e)>>2]=l,o[g+4>>2]=b,d=(g=0|Cn(0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>>S:b)<<2)>>2]):_=0,S=r,B=e+64|0,M=e+96|0,F=e+152|0,P=e+136|0,R=e+168|0,T=e+160|0,G=e+156|0,O=e+44|0,q=0!=(0|s),U=e+48|0,Y=e+40|0,z=e+36|0,W=E+4|0,X=m,Q=0==(0|s),N=h,V=b,j=w,H=w,Z=y,K=(0|o[e+168>>2])+(548*_|0)|0;;){J=H,(0|N)<(0|Z)?$=Z:(re=j-S|0,o[B>>2]=o[g>>2],o[B+4>>2]=o[g+4>>2],o[B+8>>2]=o[g+8>>2],o[B+12>>2]=o[g+12>>2],o[B+16>>2]=o[g+16>>2],o[B+20>>2]=o[g+20>>2],o[B+24>>2]=o[g+24>>2],o[B+28>>2]=o[g+28>>2],o[M>>2]=re>>2,(0|o[p>>2])>0&&ie(L,P),$=N+8|0),V&D?ae=K:((re=0|o[F>>2])?(oe=0|l(0|o[G>>2],re?N>>re:N),te=0|o[(0|o[T>>2])+(oe+(re?V>>re:V)<<2)>>2]):te=0,ae=(0|o[R>>2])+(548*te|0)|0);do{if(0|o[ae+28>>2])Me=H,Fe=J,Pe=0|o[ae+24>>2],Ee=45;else{if((0|o[O>>2])>31&&ee(g),0|o[ae+32>>2]){if(le=0|pn(0|(fe=0|o[(Ae=g)>>2]),0|(oe=0|o[Ae+4>>2]),63&(Ae=0|o[O>>2])|0),v(),le=0|o[ae+36+((ue=63&le)<<3)>>2],ce=0|o[ae+36+(ue<<3)+4>>2],ue=le+Ae|0,(0|le)<256?(o[O>>2]=ue,o[j>>2]=ce,De=0):(o[O>>2]=ue+-256,De=ce),0|o[U>>2]){pe=N,Ce=j,ye=U,Ie=1,Ee=111;break e}if((0|o[Y>>2])==(0|o[z>>2])&&(0|o[O>>2])>=65){Le=N,xe=j,Se=U,Ee=108;break e}if(!De){_e=H,Be=J,Ee=46;break}we=De,me=fe,ke=oe}else{if(re=0|o[ae>>2],ue=0|pn(0|(fe=0|o[(oe=g)>>2]),0|(Ae=0|o[oe+4>>2]),63&(oe=0|o[O>>2])|0),v(),(255&(le=0|t[(ue=re+((se=255&ue)<<2)|0)>>0]))>8?(ce=oe+8|0,o[O>>2]=ce,de=0|pn(0|fe,0|Ae,63&ce|0),v(),ve=he=ue+((0|f[re+(se<<2)+2>>1])<<2)+(((1<<(255&le)-8)-1&de)<<2)|0,be=0|t[he>>0],ge=ce):(ve=ue,be=le,ge=oe),o[O>>2]=ge+(255&be),0|o[U>>2]){pe=N,Ce=j,ye=U,Ie=1,Ee=111;break e}we=0|f[ve+2>>1],me=fe,ke=Ae}if((0|o[Y>>2])==(0|o[z>>2])&&(0|o[O>>2])>=65){Le=N,xe=j,Se=U,Ee=108;break e}if((0|we)<256){if(0|o[ae+20>>2]){Me=H,Fe=J,Pe=o[ae+24>>2]|we<<8,Ee=45;break}if(oe=0|o[ae+4>>2],ce=0|pn(0|me,0|ke,63&(fe=0|o[O>>2])|0),v(),(255&(le=0|t[(ce=oe+((ue=255&ce)<<2)|0)>>0]))>8?(Ae=fe+8|0,o[O>>2]=Ae,he=0|pn(0|me,0|ke,63&Ae|0),v(),Re=de=ce+((0|f[oe+(ue<<2)+2>>1])<<2)+(((1<<(255&le)-8)-1&he)<<2)|0,Te=0|t[de>>0],Ge=Ae):(Re=ce,Te=le,Ge=fe),fe=Ge+(255&Te)|0,o[O>>2]=fe,le=0|f[Re+2>>1],(0|fe)>31?(ee(g),ce=g,Oe=0|o[O>>2],qe=0|o[ce>>2],Ue=0|o[ce+4>>2]):(Oe=fe,qe=me,Ue=ke),fe=0|o[ae+8>>2],ce=0|pn(0|qe,0|Ue,63&Oe|0),v(),(255&(de=0|t[(ce=fe+((Ae=255&ce)<<2)|0)>>0]))>8?(he=Oe+8|0,o[O>>2]=he,ue=0|pn(0|qe,0|Ue,63&he|0),v(),Ye=oe=ce+((0|f[fe+(Ae<<2)+2>>1])<<2)+(((1<<(255&de)-8)-1&ue)<<2)|0,ze=0|t[oe>>0],We=he):(Ye=ce,ze=de,We=Oe),de=We+(255&ze)|0,o[O>>2]=de,ce=0|f[Ye+2>>1],he=0|o[ae+12>>2],oe=0|pn(0|qe,0|Ue,63&de|0),v(),(255&(Ae=0|t[(oe=he+((ue=255&oe)<<2)|0)>>0]))>8?(fe=de+8|0,o[O>>2]=fe,se=0|pn(0|qe,0|Ue,63&fe|0),v(),Xe=re=oe+((0|f[he+(ue<<2)+2>>1])<<2)+(((1<<(255&Ae)-8)-1&se)<<2)|0,Qe=0|t[re>>0],Ne=fe):(Xe=oe,Qe=Ae,Ne=de),de=Ne+(255&Qe)|0,o[O>>2]=de,0|o[U>>2]){pe=N,Ce=j,ye=U,Ie=1,Ee=111;break e}if(!((0|de)<65||(0|o[Y>>2])!=(0|o[z>>2]))){Le=N,xe=j,Se=U,Ee=108;break e}Me=H,Fe=J,Pe=le<<16|we<<8|ce|(0|f[Xe+2>>1])<<24,Ee=45;break}if((0|we)>=280){if((0|we)>=(0|C))break e;if(ce=we+-280|0,le=0|o[E>>2],H>>>0>>0){Ae=(de=j+-1+(0-J)|0)>>>2,de=H;do{oe=0|o[de>>2],de=de+4|0,fe=0|o[W>>2],re=0|l(oe,506832829),o[le+((fe?re>>>fe:re)<<2)>>2]=oe}while(de>>>0>>0);Ve=de=H+4+(Ae<<2)|0,je=de}else Ve=H,je=J;Me=Ve,Fe=je,Pe=0|o[le+(ce<<2)>>2],Ee=45;break}if(de=we+-256|0,re=(oe=we+-258|0)>>1,(0|we)<260?(He=de,Ze=me,Ke=ke):(He=oe=(0|ne(g,re))+((1&de|2)<>2],Ke=0|o[re+4>>2]),re=He+1|0,oe=0|o[ae+16>>2],fe=0|pn(0|Ze,0|Ke,63&(de=0|o[O>>2])|0),v(),(255&(ue=0|t[(fe=oe+((se=255&fe)<<2)|0)>>0]))>8?(he=de+8|0,o[O>>2]=he,Je=0|pn(0|Ze,0|Ke,63&he|0),v(),er=$e=fe+((0|f[oe+(se<<2)+2>>1])<<2)+(((1<<(255&ue)-8)-1&Je)<<2)|0,rr=0|t[$e>>0],nr=he):(er=fe,rr=ue,nr=de),de=nr+(255&rr)|0,o[O>>2]=de,fe=65535&(ue=0|i[er+2>>1]),(0|de)>31&&ee(g),he=(de=fe+-2|0)>>1,((tr=(65535&ue)<4?fe:(0|ne(g,he))+((1&fe|2)<120?ir=tr+-119|0:(he=0|a[3584+tr>>0],ir=(0|(fe=(0|l(he>>>4,n))+(8-(15&he))|0))>1?fe:1),0|o[U>>2]){pe=N,Ce=j,ye=U,Ie=1,Ee=111;break e}if((0|o[Y>>2])==(0|o[z>>2])&&(0|o[O>>2])>=65){Le=N,xe=j,Se=U,Ee=108;break e}if(((he=(fe=j)-S|0)>>2|0)<(0|ir))break e;if(((he=X-fe|0)>>2|0)<(0|re))break e;he=j+(0-ir<<2)|0;do{if(0==(3&fe|0)&(0|re)>3&(0|ir)<3){1==(0|ir)?(or=ue=0|o[he>>2],ar=ue,fr=ue):(or=de=0|o[(ue=he)>>2],ar=de,fr=0|o[ue+4>>2]),4&fe?(o[j>>2]=or,Ar=He,ur=j+4|0,sr=he+4|0,lr=fr,cr=ar):(Ar=re,ur=j,sr=he,lr=ar,cr=fr),ue=Ar>>>1,de=0;do{o[($e=ur+(de<<3)|0)>>2]=lr,o[$e+4>>2]=cr,de=de+1|0}while(de>>>0>>0);if(ue=de<<1,!(1&Ar))break;o[ur+(ue<<2)>>2]=o[sr+(ue<<2)>>2]}else{if((0|ir)>=(0|re)){In(0|j,0|he,re<<2|0);break}if((0|re)<=0)break;ue=0;do{o[j+(ue<<2)>>2]=o[he+(ue<<2)>>2],ue=ue+1|0}while((0|ue)!=(0|re))}}while(0);he=j+(re<<2)|0,fe=re+V|0;r:do{if((0|fe)<(0|n))dr=N,hr=fe;else{if(Q)for(ce=fe,le=N;;){if(ue=le+1|0,(0|(Ae=ce-n|0))<(0|n)){dr=ue,hr=Ae;break r}ce=Ae,le=ue}for(le=fe,ce=N;;){if(ue=le-n|0,(0|ce)<(0|u)&0==(15&(Ae=ce+1|0)|0)&&Un[3&s](e,Ae),(0|ue)<(0|n)){dr=Ae,hr=ue;break}le=ue,ce=Ae}}}while(0);if(hr&D?((fe=0|o[F>>2])?(re=0|l(0|o[G>>2],fe?dr>>fe:dr),br=0|o[(0|o[T>>2])+(re+(fe?hr>>fe:hr)<<2)>>2]):br=0,vr=(0|o[R>>2])+(548*br|0)|0):vr=ae,!(I&H>>>0>>0)){gr=he,wr=dr,mr=hr,kr=vr,pr=H;break}fe=0|o[E>>2],ce=(re=j+3+((He<<2)-J)|0)>>>2,re=H;do{le=0|o[re>>2],re=re+4|0,Ae=0|o[W>>2],ue=0|l(le,506832829),o[fe+((Ae?ue>>>Ae:ue)<<2)>>2]=le}while(re>>>0>>0);gr=he,wr=dr,mr=hr,kr=vr,pr=H+4+(ce<<2)|0}}while(0);if(45==(0|Ee)&&(Ee=0,o[j>>2]=Pe,_e=Me,Be=Fe,Ee=46),46==(0|Ee))if(Ee=0,J=j+4|0,(0|(re=V+1|0))>=(0|n))if(q&(0|N)<(0|u)&0==(15&(fe=N+1|0)|0)&&Un[3&s](e,fe),I&_e>>>0>>0){for(le=0|o[E>>2],Ae=(ue=(_e>>>0>j>>>0?_e:j)+3+(0-Be)|0)>>>2,ue=_e;de=0|o[ue>>2],$e=0|o[W>>2],Je=0|l(de,506832829),o[le+(($e?Je>>>$e:Je)<<2)>>2]=de,ue>>>0>>0;)ue=ue+4|0;gr=J,wr=fe,mr=0,kr=ae,pr=_e+4+(Ae<<2)|0}else gr=J,wr=fe,mr=0,kr=ae,pr=_e;else gr=J,wr=N,mr=re,kr=ae,pr=_e;if(!(gr>>>0>>0)){Le=wr,xe=gr,Se=U,Ee=108;break}N=wr,V=mr,j=gr,H=pr,Z=$,K=kr}else Le=h,xe=w,Se=e+48|0,Ee=108}while(0);if(108==(0|Ee)&&(0|o[Se>>2]?(pe=Le,Ce=xe,ye=Se,Ie=1,Ee=111):(0|o[e+40>>2])==(0|o[e+36>>2])?(pe=Le,Ce=xe,ye=Se,Ie=(0|o[e+44>>2])>64&1,Ee=111):(pe=Le,Ce=xe,ye=Se,Ie=0,Ee=111)),111==(0|Ee)){if(o[ye>>2]=Ie,Ce>>>0>>0&(1^((ye=0==(0|Ie))|0==(0|o[x>>2]))))return o[e>>2]=5,x=e+64|0,o[g>>2]=o[x>>2],o[g+4>>2]=o[x+4>>2],o[g+8>>2]=o[x+8>>2],o[g+12>>2]=o[x+12>>2],o[g+16>>2]=o[x+16>>2],o[g+20>>2]=o[x+20>>2],o[g+24>>2]=o[x+24>>2],o[g+28>>2]=o[x+28>>2],o[c>>2]=o[e+96>>2],(0|o[p>>2])<=0?1:(ie(e+136|0,L),1);if(ye)return 0|s&&Un[3&s](e,(0|pe)>(0|u)?u:pe),o[e>>2]=0,pe=Ce-r|0,o[c>>2]=pe>>2,1}return o[e>>2]=3,0}function ie(e,r){e|=0,In(0|o[(r|=0)>>2],0|o[e>>2],4<>2]|0)}function oe(e,r,n,i,a){r|=0,n|=0,i|=0,a|=0;var f,A,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0;switch(f=O,O=O+16|0,u=f,A=0|o[(s=8+(e|=0)|0)>>2],0|o[e>>2]){case 2:return function(e,r,n){e|=0,n|=0;var t=0,i=0,a=0;if(!((0|(r|=0))<=0)){t=0;do{a=(i=0|o[e+(t<<2)>>2])>>>8&255,o[n+(t<<2)>>2]=(a<<16|a)+(16711935&i)&16711935|-16711936&i,t=t+1|0}while((0|t)!=(0|r))}}(i,0|l(A,n-r|0),a),void(O=f);case 0:if(r)w=r,m=i,k=a,p=A+-1|0;else{if(d=(c=0|o[i>>2])-16777216&-16711936|16711935&c,o[a>>2]=d,c=i+4|0,h=A+-1|0,v=a+4|0,(0|A)>1){b=0,g=d;do{g=(-16711936&(d=0|o[c+(b<<2)>>2]))+(-16711936&g)&-16711936|(16711935&d)+(16711935&g)&16711935,o[v+(b<<2)>>2]=g,b=b+1|0}while((0|b)!=(0|h))}w=1,m=i+(A<<2)|0,k=a+(A<<2)|0,p=h}g=(b=1<<(h=0|o[e+4>>2]))-1|0,v=b+p|0,p=h?v>>>h:v;e:do{if((0|w)<(0|n)){if(v=0-A|0,c=0-b|0,(0|A)<=1)for(d=w,C=m,y=k;;){if(I=0|o[y+(v<<2)>>2],E=0|o[C>>2],o[y>>2]=(-16711936&E)+(-16711936&I)&-16711936|(16711935&E)+(16711935&I)&16711935,(0|(d=d+1|0))==(0|n))break e;C=C+(A<<2)|0,y=y+(A<<2)|0}for(y=(0|o[e+16>>2])+((0|l(p,h?w>>h:w))<<2)|0,C=w,d=m,I=k;;){for(E=0|o[I+(v<<2)>>2],D=0|o[d>>2],o[I>>2]=(-16711936&D)+(-16711936&E)&-16711936|(16711935&D)+(16711935&E)&16711935,E=1,D=y;L=0|o[D>>2],S=E,E=(0|(x=(E&c)+b|0))>(0|A)?A:x,_=I+(S<<2)|0,Yn[31&o[9488+((L>>>8&15)<<2)>>2]](d+(S<<2)|0,_+(v<<2)|0,E-S|0,_),!((0|A)<=(0|x));)D=D+4|0;if((0|(D=C+1|0))==(0|n))break;y=0==(D&g|0)?y+(p<<2)|0:y,C=D,d=d+(A<<2)|0,I=I+(A<<2)|0}}}while(0);return(0|o[e+12>>2])==(0|n)?void(O=f):(In(a+(0-A<<2)|0,a+((0|l(A,~r+n|0))<<2)|0,A<<2|0),void(O=f));case 1:if(m=A-(k=A&0-(g=1<<(p=0|o[e+4>>2])))|0,w=(b=g+-1|0)+A|0,h=p?w>>>p:w,(0|n)<=(0|r))return void(O=f);if(w=(0|o[e+16>>2])+((0|l(h,p?r>>p:r))<<2)|0,p=u+1|0,I=u+2|0,(0|k)<=0){for(d=(0|A)>0,C=a,y=w,v=r,c=i;t[u>>0]=0,t[u+1>>0]=0,t[u+2>>0]=0,d?(D=0|o[y>>2],t[u>>0]=D,t[p>>0]=D>>>8,t[I>>0]=D>>>16,xe(u,c,m,C),B=c+(m<<2)|0,M=C+(m<<2)|0):(B=c,M=C),(0|(D=v+1|0))!=(0|n);)C=M,y=0==(D&b|0)?y+(h<<2)|0:y,v=D,c=B;return void(O=f)}for(B=a,c=w,w=r,v=i;;){t[u>>0]=0,t[u+1>>0]=0,t[u+2>>0]=0,y=v+(k<<2)|0,M=c,C=v,d=B;do{D=M,M=M+4|0,E=0|o[D>>2],t[u>>0]=E,t[p>>0]=E>>>8,t[I>>0]=E>>>16,xe(u,C,g,d),C=C+(g<<2)|0,d=d+(g<<2)|0}while(C>>>0>>0);if(C>>>0<(v+(A<<2)|0)>>>0?(y=0|o[M>>2],t[u>>0]=y,t[p>>0]=y>>>8,t[I>>0]=y>>>16,xe(u,C,m,d),F=C+(m<<2)|0,P=d+(m<<2)|0):(F=C,P=d),(0|(y=w+1|0))==(0|n))break;B=P,c=0==(y&b|0)?c+(h<<2)|0:c,w=y,v=F}return void(O=f);case 3:if((0|i)==(0|a)&(0|(v=0|o[(F=e+4|0)>>2]))>0){if(h=A+-1+(1<>>v:h,w))<<2)|0),0|i,b<<2|0),b=0|o[F>>2],F=0|o[s>>2],s=0|o[e+16>>2],(0|(c=b?8>>>b:8))>=8)return Be(w,s,i,r,n,F),void(O=f);if(h=(1<(0|r)&(0|F)>0))return void(O=f);for(P=w,w=i,B=r;;){for(m=0,u=0,I=P,p=w;m&h?(R=u,T=I):(R=(g=0|o[I>>2])>>>8&255,T=I+4|0),o[p>>2]=o[s+((R&b)<<2)>>2],(0|(m=m+1|0))!=(0|F);)u=c?R>>>c:R,I=T,p=p+4|0;if((0|(B=B+1|0))==(0|n))break;P=T,w=w+(F<<2)|0}return void(O=f)}if(F=0|o[e+16>>2],(0|(e=v?8>>>v:8))>=8)return Be(i,F,a,r,n,A),void(O=f);if(w=(1<(0|r)&(0|A)>0))return void(O=f);for(T=i,i=a,a=r;;){for(r=0,P=0,B=T,R=i;r&w?(G=P,q=B):(G=(c=0|o[B>>2])>>>8&255,q=B+4|0),o[R>>2]=o[F+((G&v)<<2)>>2],(0|(r=r+1|0))!=(0|A);)P=e?G>>>e:G,B=q,R=R+4|0;if((0|(a=a+1|0))==(0|n))break;T=q,i=i+(A<<2)|0}return void(O=f);default:return void(O=f)}}function ae(e,r){var n,t;return r|=0,n=0|o[32+(e|=0)>>2],0|((0|(t=((0|o[e+24>>2])-1+n|0)/(0|n)|0))>(0|r)?r:t)}function fe(e,r,n,t,i){r|=0,n|=0,i|=0;var o=0,a=0;if(!((0|(t|=0))<=0))for(o=0,a=e|=0;de(a,n,i),(0|(o=o+1|0))!=(0|t);)a=a+r|0}function Ae(e,r,n,t){t|=0;var i,a,f,A,u,s,c,d,h,v,b=0,g=0,w=0,m=0,k=0,p=0,C=0;if(i=24+(e|=0)|0,(0|(r|=0))<=0)return 0;for(a=e+56|0,f=e+64|0,A=e+4|0,u=e+76|0,s=e+80|0,c=e+8|0,d=e+52|0,h=e+60|0,v=e+32|0,g=n|=0,n=0;;){if((0|o[f>>2])<(0|o[a>>2])&&(0|o[i>>2])<=0){b=n,w=12;break}if(0|o[A>>2]&&(m=0|o[u>>2],o[u>>2]=o[s>>2],o[s>>2]=m),le(e,g),0==(0|o[A>>2])&&(0|l(0|o[d>>2],0|o[c>>2]))>0){m=0|o[s>>2],k=0|o[u>>2],p=0;do{o[(C=k+(p<<2)|0)>>2]=(0|o[C>>2])+(0|o[m+(p<<2)>>2]),p=p+1|0}while((0|p)<(0|l(0|o[d>>2],0|o[c>>2])))}if(o[h>>2]=1+(0|o[h>>2]),p=n+1|0,o[i>>2]=(0|o[i>>2])-(0|o[v>>2]),!((0|p)<(0|r))){b=p,w=12;break}g=g+t|0,n=p}return 12==(0|w)?0|b:0}function ue(e){var r=0,n=0,i=0,a=0,f=0,A=0,u=0;if(!((0|o[(r=24+(e|=0)|0)>>2])>=1)){do{if(0|o[e+4>>2])Ge(e);else{if(0|o[e+20>>2]){Oe(e);break}if(n=e+8|0,(0|l(0|o[(i=e+52|0)>>2],0|o[n>>2]))>0){f=e+68|0,A=0,u=0|o[(a=e+76|0)>>2];do{t[(0|o[f>>2])+A>>0]=o[u+(A<<2)>>2],u=0|o[a>>2],o[u+(A<<2)>>2]=0,A=A+1|0}while((0|A)<(0|l(0|o[i>>2],0|o[n>>2])))}}}while(0);o[r>>2]=(0|o[r>>2])+(0|o[e+28>>2]),o[(r=e+68|0)>>2]=(0|o[r>>2])+(0|o[e+72>>2]),o[(r=e+64|0)>>2]=1+(0|o[r>>2])}}function se(e,r,n,i){e|=0,r|=0,i|=0;var a=0,f=0,A=0,u=0;switch(0|(n|=0)){case 0:return void function(e,r,n){var i;if(n|=0,i=(e|=0)+((r|=0)<<2)|0,!((0|r)<=0))for(r=n,n=e;e=0|o[n>>2],n=n+4|0,t[r>>0]=e>>>16,t[r+1>>0]=e>>>8,t[r+2>>0]=e,!(n>>>0>=i>>>0);)r=r+3|0}(e,r,i);case 1:return void Se(e,r,i);case 7:return Se(e,r,i),void be(i,0,r,1,0);case 2:return void function(e,r,n){var i;if(n|=0,i=(e|=0)+((r|=0)<<2)|0,!((0|r)<=0))for(r=n,n=e;e=0|o[n>>2],n=n+4|0,t[r>>0]=e,t[r+1>>0]=e>>>8,t[r+2>>0]=e>>>16,!(n>>>0>=i>>>0);)r=r+3|0}(e,r,i);case 3:return void In(0|i,0|e,r<<2|0);case 8:return In(0|i,0|e,r<<2|0),void be(i,0,r,1,0);case 4:if(a=e+(r<<2)|0,(0|r)<=0)return;for(f=i,A=e;u=0|yn(0|o[A>>2]),A=A+4|0,t[f>>0]=u,t[f+1>>0]=u>>8,t[f+2>>0]=u>>16,t[f+3>>0]=u>>24,!(A>>>0>=a>>>0);)f=f+4|0;return;case 9:if(f=e+(r<<2)|0,(0|r)>0)for(a=i,A=e;u=0|yn(0|o[A>>2]),A=A+4|0,t[a>>0]=u,t[a+1>>0]=u>>8,t[a+2>>0]=u>>16,t[a+3>>0]=u>>24,!(A>>>0>=f>>>0);)a=a+4|0;return void be(i,1,r,1,0);case 5:return void _e(e,r,i);case 10:return _e(e,r,i),void ve(i,r,1,0);case 6:return void function(e,r,n){var i;if(n|=0,i=(e|=0)+((r|=0)<<2)|0,!((0|r)<=0))for(r=n,n=e;e=0|o[n>>2],n=n+4|0,t[r>>0]=e>>>16&248|e>>>13&7,t[r+1>>0]=e>>>5&224|e>>>3&31,!(n>>>0>=i>>>0);)r=r+2|0}(e,r,i);default:return}}function le(e,r){return r|=0,0|o[(e|=0)>>2]?void function(e,r){r|=0;var n,t,i=0,f=0,A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0;if(n=0|o[8+(e|=0)>>2],t=0|l(0|o[e+52>>2],n),!((0|n)<=0)){i=e+36|0,f=e+44|0,A=e+80|0,u=e+40|0,e=0;do{if(s=0|o[i>>2],c=0|a[r+e>>0],d=e+n|0,h=(0|o[f>>2])>1?0|a[r+d>>0]:c,v=0|l(s,c),b=0|o[A>>2],o[b+(e<<2)>>2]=v,(0|d)<(0|t))for(v=c,c=s,s=d,g=h,w=d;m=s+n|0,(0|(d=c-(0|o[u>>2])|0))<0?(k=0|o[i>>2],p=0|a[r+m>>0],C=g,y=k+d|0,I=m,E=k):(p=g,C=v,y=d,I=s,E=0|o[i>>2]),d=(0|l(E,p))+(0|l(C-p|0,y))|0,o[b+(w<<2)>>2]=d,!((0|(w=w+n|0))>=(0|t));)v=C,c=y,s=I,g=p;e=e+1|0}while((0|e)!=(0|n))}}(e,r):void qe(e,r)}function ce(e,r,n,i,f){r|=0,n|=0,i|=0,f|=0;var A,u,s,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0;if(A=(l=0|o[4+(e|=0)>>2])?8>>>l:8,u=0|o[e+8>>2],s=0|o[e+16>>2],(0|A)>=8)!function(e,r,n,i,f,A){e|=0,r|=0,n|=0;var u=0,s=0,l=0,c=0;if((0|(i|=0))<(0|(f|=0))&(0|(A|=0))>0)for(u=i,i=e,e=n;;){for(n=0,s=e,l=i,i=i+A|0;c=0|o[r+((0|a[l>>0])<<2)>>2],t[s>>0]=c>>>8,(0|(n=n+1|0))!=(0|A);)s=s+1|0,l=l+1|0;if((0|(u=u+1|0))==(0|f))break;e=e+A|0}}(i,s,f,r,n,u);else if(e=(1<0)for(c=i,i=f,f=r;;){for(r=0,d=0,h=c,v=i;d&e?(b=r,g=h):(b=0|a[h>>0],g=h+1|0),w=0|o[s+((b&l)<<2)>>2],t[v>>0]=w>>>8,(0|(d=d+1|0))!=(0|u);)r=A?b>>>A:b,h=g,v=v+1|0;if((0|(f=f+1|0))==(0|n))break;c=g,i=i+u|0}}function de(e,r,n){e|=0,n|=0;var t=0,i=0,a=0,f=0,A=0,u=0;if(!((0|(r|=0))<=0))if(n){n=0;do{(t=0|o[(a=e+(n<<2)|0)>>2])>>>0<4278190080&&(u=t>>>0<16777216?0:(8388608+(0|l(A=4278190080/(t>>>24>>>0)|0,255&t))|0)>>>24|-16777216&t|(i=8388608+(0|l(A,t>>>8&255))|0)>>>24<<8|(8388608+(0|l(A,t>>>16&255))|0)>>>24<<16,o[a>>2]=u),n=n+1|0}while((0|n)!=(0|r))}else{n=0;do{(i=0|o[(t=e+(n<<2)|0)>>2])>>>0<4278190080&&(a=i>>>0<16777216?0:(8388608+(0|l(f=65793*(i>>>24)|0,255&i))|0)>>>24|-16777216&i|(8388608+(0|l(f,i>>>8&255))|0)>>>24<<8|(A=8388608+(0|l(f,i>>>16&255))|0)>>>24<<16,o[t>>2]=a),n=n+1|0}while((0|n)!=(0|r))}}function he(e,r,n,i){e|=0,r|=0,i|=0;var o=0,f=0,A=0;if(!((0|(n|=0))<=0))if(i){i=0;do{switch((A=0|t[r+i>>0])<<24>>24){case-1:break;case 0:t[e+i>>0]=0;break;default:o=8388608+(0|l(4278190080/((255&A)>>>0)|0,0|a[(f=e+i|0)>>0]))|0,t[f>>0]=o>>>24}i=i+1|0}while((0|i)!=(0|n))}else{i=0;do{switch((o=0|t[r+i>>0])<<24>>24){case-1:break;case 0:t[e+i>>0]=0;break;default:A=8388608+(0|l(65793*(255&o)|0,0|a[(f=e+i|0)>>0]))|0,t[f>>0]=A>>>24}i=i+1|0}while((0|i)!=(0|n))}}function ve(e,r,n,i){e|=0,i|=0;var o=0,f=0,A=0,u=0,s=0,c=0,d=0,h=0,v=0;if((0|(r|=0))>0&(0|(n|=0))>0)for(o=e,e=n;;){n=0;do{A=o+(f=n<<1)|0,c=4369*(255&(s=15&(f=0|t[(u=o+(1|f)|0)>>0])))|0,d=0|a[A>>0],h=0|l(c,240&d|d>>>4),v=0|l(d<<4&240|15&d,c),f=0|l(240&(d=255&f)|d>>>4,c),t[A>>0]=v>>>20&15|h>>>16&240,t[u>>0]=f>>>16&255&-16|s,n=n+1|0}while((0|n)!=(0|r));if(!((0|e)>1))break;o=o+i|0,e=e+-1|0}}function be(e,r,n,i,o){e|=0,r|=0,n|=0,o|=0;var f,A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0;if(!((0|(i|=0))<=0||(r=1&(A=0!=(0|r)),f=A?0:3,(0|n)<=0)))for(A=e,e=i;;){i=e,e=e+-1|0,u=A+r|0,s=A+f|0,c=0;do{(h=0|t[s+(d=c<<2)>>0])<<24>>24!=-1&&(b=0|l(v=32897*(255&h)|0,0|a[(h=u+d|0)>>0]),t[h>>0]=b>>>23,h=0|l(v,0|a[(b=u+(1|d)|0)>>0]),t[b>>0]=h>>>23,d=0|l(v,0|a[(h=u+(2|d)|0)>>0]),t[h>>0]=d>>>23),c=c+1|0}while((0|c)!=(0|n));if((0|i)<=1)break;A=A+o|0}}function ge(e,r,n,i,o,a){r|=0,a|=0;var f=0,A=0,u=0,s=0,l=0;if(!((0|(i|=0))>0&(0|(n|=0))>0))return 0;for(f=0,A=255,u=o|=0,o=e|=0;;){e=0,s=A;do{l=0|t[o+e>>0],t[u+(e<<2)>>0]=l,s=255&s&l,e=e+1|0}while((0|e)!=(0|n));if((0|(f=f+1|0))==(0|i))break;A=s,u=u+a|0,o=o+r|0}return 0|255!=(0|s)&1}function we(e,r,n,i,o,a){r|=0,a|=0;var f=0,A=0,u=0,s=0,l=0;if(!((0|(i|=0))>0&(0|(n|=0))>0))return 1;for(f=0,A=-1,u=o|=0,o=e|=0;;){e=0,s=A;do{l=0|t[o+(e<<2)>>0],t[u+e>>0]=l,s&=l,e=e+1|0}while((0|e)!=(0|n));if((0|(f=f+1|0))==(0|i))break;A=s,u=u+a|0,o=o+r|0}return 0|s<<24>>24==-1&1}function me(e,r,n){e|=0,r|=0;var i=0,a=0;if(!((0|(n|=0))<=0)){i=0;do{a=0|o[e+(i<<2)>>2],t[r+i>>0]=a>>>8,i=i+1|0}while((0|i)!=(0|n))}}function ke(){0|o[2029]&&(o[2388]=1,o[2389]=2,o[2390]=3,o[2391]=4,o[2392]=5,o[2393]=6,o[2394]=7,o[2395]=8,o[2396]=9,o[2397]=10,o[2398]=11,o[2399]=12,o[2400]=13,o[2401]=14,o[2402]=1,o[2403]=1,o[2420]=1,o[2421]=2,o[2422]=3,o[2423]=4,o[2424]=5,o[2425]=6,o[2426]=7,o[2427]=8,o[2428]=9,o[2429]=10,o[2430]=11,o[2431]=12,o[2432]=13,o[2433]=14,o[2434]=1,o[2435]=1,o[2372]=4,o[2373]=5,o[2374]=6,o[2375]=7,o[2376]=8,o[2377]=9,o[2378]=10,o[2379]=11,o[2380]=12,o[2381]=13,o[2382]=14,o[2383]=15,o[2384]=16,o[2385]=17,o[2386]=4,o[2387]=4,o[2404]=4,o[2405]=5,o[2406]=6,o[2407]=7,o[2408]=8,o[2409]=9,o[2410]=10,o[2411]=11,o[2412]=12,o[2413]=13,o[2414]=14,o[2415]=15,o[2416]=16,o[2417]=17,o[2418]=4,o[2419]=4),o[2029]=0}function pe(e,r,n){r|=0,n|=0;var t=0,i=0,f=0,A=0,u=0,s=0,l=0;if(o[12+(e|=0)>>2]=n,o[(t=e)>>2]=0,o[t+4>>2]=0,o[e+20>>2]=0,o[e+24>>2]=0,t=n>>>0<8?n:8)for(n=0,A=0,u=0;;){if(l=(s=0|Cn(0|a[r+n>>0],0,n<<3|0))|A,s=0|v()|u,(n=n+1|0)>>>0>=t>>>0){i=l,f=s;break}A=l,u=s}else i=0,f=0;o[(u=e)>>2]=i,o[u+4>>2]=f,o[e+16>>2]=t,o[e+8>>2]=r}function Ce(e,r,n,A,u){e|=0,r|=0,u|=0;var s,c,d,h,b,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0,Y=0,z=0,Q=0,j=0,H=0,Z=0,K=0,J=0,$=0,ee=0,re=0,ie=0,oe=0,ae=0,fe=0,Ae=0,ue=0,se=0,le=0,ce=0,de=0,he=0,ve=0,be=0,ge=0,we=0,me=0,ke=0,pe=0,De=0,Le=0,xe=0,Se=0,_e=0,Be=0,Me=0;s=O,O=O+16|0,c=s,d=24+(A|=0)|0,h=A+120|0,b=0!=(0|(n|=0));e:do{if(b)for(g=A+176|0,w=A+260|0,m=e;;){if(!(0|ne(d,1))){k=m,p=18;break e}if(C=0|o[g>>2],y=0|ne(d,2),(I=0|o[w>>2])&(E=1<>2]=I|E,o[A+180+(20*C|0)>>2]=y,o[(E=A+180+(20*C|0)+8|0)>>2]=m,o[(I=A+180+(20*C|0)+12|0)>>2]=r,o[(D=A+180+(20*C|0)+16|0)>>2]=0,o[g>>2]=1+(0|o[g>>2]),0|y){case 1:case 0:y=2+(0|ne(d,3))|0,o[A+180+(20*C|0)+4>>2]=y,x=(L=(1<>2])|0,S=L+(0|o[I>>2])|0,_=0|Ce(y?x>>>y:x,y?S>>>y:S,0,A,D),B=m;break;case 3:if(M=(0|(S=1+(0|ne(d,8))|0))>16?0:(0|S)>4?1:(0|S)>2?2:3,y=(0|o[E>>2])-1+(1<>>M:y,o[(y=A+180+(20*C|0)+4|0)>>2]=M,!(0|Ce(S,1,0,A,D))){p=73;break e}if(!(C=0|V(y=1<<((C=0|o[y>>2])?8>>>C:8),((0|y)<0)<<31>>31,4))){p=73;break e}if(x=0|o[D>>2],o[C>>2]=o[x>>2],I=S<<2,(0|S)>1)for(S=4;;){if(t[C+S>>0]=(0|a[C+(S+-4)>>0])+(0|a[x+S>>0]),!((0|(L=S+1|0))<(0|I))){F=L;break}S=L}else F=4;(0|(S=y<<2))>(0|F)&&Dn(C+F|0,0,S-F|0),U(0|o[D>>2]),o[D>>2]=C,_=1,B=E;break;default:_=1,B=m}if(!_){p=73;break e}m=B}else k=e,p=18}while(0);do{if(18==(0|p)){if(0|ne(d,1)){if(!(((e=0|ne(d,4))-1|0)>>>0<11)){o[A>>2]=3,R=0;break}P=e}else P=0;o[c>>2]=0,e=0|f[3824+(P<<1)>>1];do{if(0!=(0|n)&&0!=(0|ne(d,1)))if(F=(_=(1<<(B=2+(0|ne(d,3))|0))-1|0)+k|0,M=B?F>>>B:F,F=_+r|0,F=0|l(M,_=B?F>>>B:F),0|Ce(M,_,0,A,c)){if(o[A+152>>2]=B,B=(0|F)>0)for(_=0|o[c>>2],M=0,m=1;;){if(S=(w=0|o[(g=_+(M<<2)|0)>>2])>>>8&65535,o[g>>2]=S,g=(0|S)<(0|m)?m:S+1|0,(0|(M=M+1|0))==(0|F)){T=g;break}m=g}else T=1;if((0|T)>1e3|(0|T)>(0|l(k,r))){if(!(m=0|V(T,((0|T)<0)<<31>>31,4))){o[A>>2]=1,G=0,q=0,Y=1,z=0,Q=0;break}if(Dn(0|m,-1,T<<2|0),B)for(M=0|o[c>>2],_=0,E=0;;){if(D=m+(o[(C=M+(E<<2)|0)>>2]<<2)|0,-1==(0|(y=0|o[D>>2]))?(o[D>>2]=_,j=_+1|0,H=_):(j=_,H=y),o[C>>2]=H,(0|(E=E+1|0))==(0|F)){Z=m,K=T,J=j,$=m,p=35;break}_=j}else Z=m,K=T,J=0,$=m,p=35}else Z=0,K=T,J=T,$=0,p=35}else G=0,q=0,Y=1,z=0,Q=0;else Z=0,K=1,J=1,$=0,p=35}while(0);e:do{if(35==(0|p))if(0|o[A+48>>2])G=0,q=0,Y=1,z=0,Q=$;else{if(F=1<0)?(ee=(0|(E=(0|F)>-24?F+280|0:256))>40?E:40,re=0):(ee=280,re=0),E=0|N(ee,re,4),0==(0|(B=0|V(M=0|l(J,e),((0|M)<0)<<31>>31,4)))|0==(0|E)|0==(0|(M=0|ye(J)))){o[A>>2]=1,G=M,q=B,Y=1,z=E,Q=$;break}if((0|K)>0)for(C=0==(0|Z),y=F+280|0,D=(0|F)>-279,g=F+280|0,F=B,S=0;;){do{if(C)oe=S,p=49;else{if(-1==(0|(w=0|o[Z+(S<<2)>>2]))){if(_){if(!(0|Ie(g,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(!(0|Ie(256,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(!(0|Ie(256,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(!(0|Ie(256,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(0|Ie(40,A,E,0)){ie=F;break}G=M,q=B,Y=1,z=E,Q=$;break e}if(!(0|Ie(280,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(!(0|Ie(256,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(!(0|Ie(256,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(!(0|Ie(256,A,E,0))){G=M,q=B,Y=1,z=E,Q=$;break e}if(0|Ie(40,A,E,0)){ie=F;break}G=M,q=B,Y=1,z=E,Q=$;break e}oe=w,p=49}}while(0);do{if(49==(0|p)){if(p=0,o[(w=M+(548*oe|0)|0)>>2]=F,_){if(!(I=0|Ie(y,A,E,F))){G=M,q=B,Y=1,z=E,Q=$;break e}if(x=0|a[F>>0],L=F+(I<<2)|0,I=0|o[E>>2],D)for(ae=1,fe=I;;){if(ue=(0|(Ae=0|o[E+(ae<<2)>>2]))>(0|fe)?Ae:fe,(0|(ae=ae+1|0))==(0|y)){se=ue;break}fe=ue}else se=I;if(o[M+(548*oe|0)+4>>2]=L,!(fe=0|Ie(256,A,E,L))){G=M,q=B,Y=1,z=E,Q=$;break e}ue=x+(255&(ae=0|t[L>>0]))|0,Ae=L+(fe<<2)|0,fe=1,le=0|o[E>>2];do{le=(0|(ce=0|o[E+(fe<<2)>>2]))>(0|le)?ce:le,fe=fe+1|0}while(256!=(0|fe));if(fe=le+se|0,o[M+(548*oe|0)+8>>2]=Ae,!(L=0|Ie(256,A,E,Ae))){G=M,q=B,Y=1,z=E,Q=$;break e}I=ae|(x=0|t[Ae>>0]),ce=ue+(255&x)|0,x=Ae+(L<<2)|0,L=1,de=0|o[E>>2];do{de=(0|(he=0|o[E+(L<<2)>>2]))>(0|de)?he:de,L=L+1|0}while(256!=(0|L));if(L=de+fe|0,o[M+(548*oe|0)+12>>2]=x,!(Ae=0|Ie(256,A,E,x))){G=M,q=B,Y=1,z=E,Q=$;break e}ae=I|(ue=0|t[x>>0]),le=ce+(255&ue)|0,ue=x+(Ae<<2)|0,Ae=1,he=0|o[E>>2];do{he=(0|(ve=0|o[E+(Ae<<2)>>2]))>(0|he)?ve:he,Ae=Ae+1|0}while(256!=(0|Ae));if(o[M+(548*oe|0)+16>>2]=ue,!(Ae=0|Ie(40,A,E,ue))){G=M,q=B,Y=1,z=E,Q=$;break e}be=he+L|0,ge=ae,we=le+(0|a[ue>>0])|0,me=ue+(Ae<<2)|0}else{if(!(Ae=0|Ie(280,A,E,F))){G=M,q=B,Y=1,z=E,Q=$;break e}x=0|a[F>>0],ce=F+(Ae<<2)|0,Ae=1,I=0|o[E>>2];do{I=(0|(fe=0|o[E+(Ae<<2)>>2]))>(0|I)?fe:I,Ae=Ae+1|0}while(Ae>>>0<280);if(o[M+(548*oe|0)+4>>2]=ce,!(Ae=0|Ie(256,A,E,ce))){G=M,q=B,Y=1,z=E,Q=$;break e}le=x+(255&(ue=0|t[ce>>0]))|0,ae=ce+(Ae<<2)|0,Ae=1,L=0|o[E>>2];do{L=(0|(he=0|o[E+(Ae<<2)>>2]))>(0|L)?he:L,Ae=Ae+1|0}while(Ae>>>0<256);if(Ae=L+I|0,o[M+(548*oe|0)+8>>2]=ae,!(ce=0|Ie(256,A,E,ae))){G=M,q=B,Y=1,z=E,Q=$;break e}he=ue|(x=0|t[ae>>0]),fe=le+(255&x)|0,x=ae+(ce<<2)|0,ce=1,de=0|o[E>>2];do{de=(0|(ve=0|o[E+(ce<<2)>>2]))>(0|de)?ve:de,ce=ce+1|0}while(ce>>>0<256);if(ce=de+Ae|0,o[M+(548*oe|0)+12>>2]=x,!(ae=0|Ie(256,A,E,x))){G=M,q=B,Y=1,z=E,Q=$;break e}ue=he|(le=0|t[x>>0]),I=fe+(255&le)|0,le=x+(ae<<2)|0,ae=1,L=0|o[E>>2];do{L=(0|(ve=0|o[E+(ae<<2)>>2]))>(0|L)?ve:L,ae=ae+1|0}while(ae>>>0<256);if(o[M+(548*oe|0)+16>>2]=le,!(ae=0|Ie(40,A,E,le))){G=M,q=B,Y=1,z=E,Q=$;break e}be=L+ce|0,ge=ue,we=I+(0|a[le>>0])|0,me=le+(ae<<2)|0}if(ae=ge<<24>>24==0,o[M+(548*oe|0)+20>>2]=1&ae,o[(x=M+(548*oe|0)+28|0)>>2]=0,ae&&(ae=(0|f[2+(0|o[M+(548*oe|0)+4>>2])>>1])<<16|0|f[2+(0|o[M+(548*oe|0)+8>>2])>>1]|(0|f[2+(0|o[M+(548*oe|0)+12>>2])>>1])<<24,o[(fe=M+(548*oe|0)+24|0)>>2]=ae,0==(0|we))&&(65535&(he=0|i[2+(0|o[w>>2])>>1]))<256){o[x>>2]=1,o[fe>>2]=(65535&he)<<8|ae,o[M+(548*oe|0)+32>>2]=0,ie=me;break}if(ae=(0|be)<6,o[M+(548*oe|0)+32>>2]=1&ae,ae){ae=M+(548*oe|0)+4|0,he=M+(548*oe|0)+8|0,fe=M+(548*oe|0)+12|0,x=0|o[w>>2],Ae=0;do{de=M+(548*oe|0)+36+(Ae<<3)|0,(65535&(ve=(ke=f[(ve=x+(Ae<<2)|0)>>1]|f[ve+2>>1]<<16)>>>16))>255?(o[de>>2]=255&ke|256,o[M+(548*oe|0)+36+(Ae<<3)+4>>2]=ve):(pe=M+(548*oe|0)+36+(Ae<<3)+4|0,De=255&ke,o[de>>2]=De,ke=ve<<8,o[pe>>2]=ke,ve=De?Ae>>>De:Ae,Le=0|o[ae>>2],xe=0|i[Le+(ve<<2)+2>>1],Le=De+(Se=0|a[Le+(ve<<2)>>0])|0,o[de>>2]=Le,De=(65535&xe)<<16|ke,o[pe>>2]=De,ke=Se?ve>>>Se:ve,ve=0|o[he>>2],Se=0|i[ve+(ke<<2)+2>>1],ve=Le+(xe=0|a[ve+(ke<<2)>>0])|0,o[de>>2]=ve,Le=De|65535&Se,o[pe>>2]=Le,Se=xe?ke>>>xe:ke,ke=0|o[fe>>2],xe=0|i[ke+(Se<<2)+2>>1],o[de>>2]=ve+(0|a[ke+(Se<<2)>>0]),o[pe>>2]=(65535&xe)<<24|Le),Ae=Ae+1|0}while(64!=(0|Ae));ie=me}else ie=me}}while(0);if((0|(S=S+1|0))>=(0|K))break;F=ie}o[A+160>>2]=o[c>>2],o[A+164>>2]=J,o[A+168>>2]=M,o[A+172>>2]=B,G=M,q=B,Y=0,z=E,Q=$}}while(0);if(U(z),U(Q),Y){U(0|o[c>>2]),U(q),W(G),p=73;break}if((0|P)>0){if(o[h>>2]=1<>2]=1,R=0;break}}else o[h>>2]=0;if(e=0|o[A+152>>2],o[A+100>>2]=k,o[A+104>>2]=r,S=(F=(1<>2]=e?S>>>e:S,o[A+148>>2]=0==(0|e)?-1:F,b)o[A+4>>2]=1,_e=0;else{if(!(e=0|V(F=0|vn(0|k,((0|k)<0)<<31>>31|0,0|r,((0|r)<0)<<31>>31|0),0|v(),4))){o[A>>2]=1,R=0;break}if(!(0|te(A,e,k,r,r,0))){R=e;break}if(0|o[A+48>>2]){R=e;break}_e=e}if(0|u&&(o[u>>2]=_e),o[A+112>>2]=0,b)return O=s,1;U(0|o[A+160>>2]),U(0|o[A+172>>2]),W(0|o[A+168>>2]),X(A+124|0),X(A+136|0),Me=(Be=h)+56|0;do{o[Be>>2]=0,Be=Be+4|0}while((0|Be)<(0|Me));return O=s,1}}while(0);73==(0|p)&&(o[A>>2]=3,R=0),U(R),U(0|o[A+160>>2]),U(0|o[A+172>>2]),W(0|o[A+168>>2]),X(A+124|0),X(A+136|0),Me=(Be=h)+56|0;do{o[Be>>2]=0,Be=Be+4|0}while((0|Be)<(0|Me));return O=s,0}function ye(e){return 0|V(e|=0,((0|e)<0)<<31>>31,548)}function Ie(e,r,n,t){e|=0,n|=0,t|=0;var f,A,u,s,l,c=0,d=0,h=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0;f=O,O=O+592|0,A=f+80|0,u=f,l=0|ne(s=24+(r|=0)|0,1),Dn(0|n,0,e<<2|0);e:do{if(l)c=0|ne(s,1),d=0==(0|ne(s,1)),h=n+((0|ne(s,d?1:8))<<2)|0,o[h>>2]=1,1==(0|c)?(c=n+((0|ne(s,8))<<2)|0,o[c>>2]=1,b=26):b=26;else{h=(c=u)+76|0;do{o[c>>2]=0,c=c+4|0}while((0|c)<(0|h));if((0|(c=4+(0|ne(s,4))|0))>19)return o[r>>2]=3,O=f,0;if((0|c)>0){h=0;do{d=0|ne(s,3),o[u+((0|a[3856+h>>0])<<2)>>2]=d,h=h+1|0}while((0|h)!=(0|c))}r:do{if(0|De(A,7,u,19)){if(0|ne(s,1)){if((0|(c=2+(0|ne(s,2+((0|ne(s,3))<<1)|0))|0))>(0|e))break;g=c}else g=e;n:do{if((0|e)>0)for(c=r+44|0,h=0,d=8,w=g;;){if(!w)break n;if(w=w+-1|0,(0|(m=0|o[c>>2]))>31?(ee(s),k=0|o[c>>2]):k=m,p=0|pn(0|o[(m=s)>>2],0|o[m+4>>2],63&k|0),v(),m=127&p,o[c>>2]=k+(0|a[A+(m<<2)>>0]),m=65535&(p=0|i[A+(m<<2)+2>>1]),(65535&p)>=16){if(y=0|a[8680+(C=m+-16|0)>>0],((I=(0|ne(s,0|a[8677+C>>0]))+y|0)+h|0)>(0|e))break r;if(y=p<<16>>16==16?d:0,(0|I)>0)for(C=I,I=h;;){if(E=I+1|0,o[n+(I<<2)>>2]=y,!((0|C)>1)){D=d,L=E;break}C=C+-1|0,I=E}else D=d,L=h}else o[n+(h<<2)>>2]=m,D=p<<16>>16==0?d:m,L=h+1|0;if((0|L)>=(0|e))break;h=L,d=D}}while(0);b=26;break e}}while(0);o[r>>2]=3}}while(0);return 26==(0|b)&&0==(0|o[r+48>>2])&&0|(b=0|De(t,8,n,e))?(O=f,0|b):(o[r>>2]=3,O=f,0)}function Ee(e,r){var n,t;return e|=0,t=0|N(n=1<<(r|=0),((0|n)<0)<<31>>31,4),o[e>>2]=t,t?(o[e+4>>2]=32-r,o[e+8>>2]=r,1):0}function De(e,r,n,t){e|=0,r|=0,n|=0,t|=0;var i,o,a=0,f=0,A=0;i=O,O=O+1024|0,o=i;do{if(e){if((0|t)<513){a=0|Le(e,r,n,t,o);break}(f=0|V(t,((0|t)<0)<<31>>31,2))?(A=0|Le(e,r,n,t,f),U(f),a=A):a=0}else a=0|Le(0,r,n,t,0)}while(0);return O=i,0|a}function Le(e,r,n,a,A){e|=0,n|=0,a|=0,A|=0;var u,s,l,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0,K=0,J=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,fe=0,Ae=0,ue=0,se=0,le=0,ce=0,de=0,he=0,ve=0,be=0,ge=0;u=O,O=O+128|0,c=u,l=1<<(r|=0),h=64+(d=s=u+64|0)|0;do{o[d>>2]=0,d=d+4|0}while((0|d)<(0|h));d=(0|a)>0;do{if(d){for(h=0;;){if((0|(v=0|o[n+(h<<2)>>2]))>15){b=0,g=69;break}if(o[(w=s+(v<<2)|0)>>2]=1+(0|o[w>>2]),(0|(h=h+1|0))>=(0|a)){g=5;break}}if(5==(0|g)){m=0|o[s>>2];break}if(69==(0|g))return O=u,0|b}else m=0}while(0);if((0|m)==(0|a))return O=u,0;if(o[c+4>>2]=0,(0|(m=0|o[s+4>>2]))>2)return O=u,0;if(o[c+8>>2]=m,(0|(h=0|o[s+8>>2]))>4)return O=u,0;if(w=m+h|0,o[c+12>>2]=w,(0|(h=0|o[s+12>>2]))>8)return O=u,0;if(v=w+h|0,o[c+16>>2]=v,(0|(h=0|o[s+16>>2]))>16)return O=u,0;if(w=v+h|0,o[c+20>>2]=w,(0|(h=0|o[s+20>>2]))>32)return O=u,0;if(v=w+h|0,o[c+24>>2]=v,(0|(h=0|o[s+24>>2]))>64)return O=u,0;if(w=v+h|0,o[c+28>>2]=w,(0|(h=0|o[s+28>>2]))>128)return O=u,0;if(v=w+h|0,o[c+32>>2]=v,(0|(h=0|o[s+32>>2]))>256)return O=u,0;if(w=v+h|0,o[c+36>>2]=w,(0|(h=0|o[s+36>>2]))>512)return O=u,0;if(v=w+h|0,o[c+40>>2]=v,(0|(h=0|o[s+40>>2]))>1024)return O=u,0;if(w=v+h|0,o[c+44>>2]=w,(0|(h=0|o[s+44>>2]))>2048)return O=u,0;if(v=w+h|0,o[c+48>>2]=v,(0|(h=0|o[s+48>>2]))>4096)return O=u,0;if(w=v+h|0,o[c+52>>2]=w,(0|(h=0|o[s+52>>2]))>8192)return O=u,0;if(v=w+h|0,o[c+56>>2]=v,(0|(h=0|o[s+56>>2]))>16384)return O=u,0;if(w=v+h|0,o[(h=c+60|0)>>2]=w,d){if(A){d=0;do{(0|(k=0|o[n+(d<<2)>>2]))>0&&(k=0|o[(v=c+(k<<2)|0)>>2],o[v>>2]=k+1,i[A+(k<<1)>>1]=d),d=d+1|0}while((0|d)!=(0|a))}else{d=0;do{(0|(v=0|o[n+(d<<2)>>2]))>0&&(o[(k=c+(v<<2)|0)>>2]=1+(0|o[k>>2])),d=d+1|0}while((0|d)!=(0|a))}p=0|o[h>>2]}else p=w;if(1==(0|p)){if(!A)return O=u,0|l;w=(0|f[A>>1])<<16,a=l;do{d=a,i[(c=e+((a=a+-1|0)<<2)|0)>>1]=w,i[c+2>>1]=w>>>16}while((0|d)>1);return O=u,0|l}if(w=l+-1|0,(0|r)>=1){d=(0|(a=2-m|0))<0;e:do{if(e){if(d)return O=u,0;for(k=0,n=2,c=1,v=0,D=m,L=s+4|0,x=a,S=3;;){if((0|D)>0){_=255&c,B=1<>1])<<16|_,G=l;do{i[(q=R+((G=G-n|0)<<2)|0)>>1]=T,i[q+2>>1]=T>>>16}while((0|G)>0);for(G=B;G&M;)G>>>=1;F=F+1|0,M=0==(0|G)?M:(G+-1&M)+G|0,T=P,P=P+-1|0}while((0|T)>1);o[L>>2]=P,U=M,Y=F}else U=k,Y=v;if(B=c+1|0,(0|c)>=(0|r)){C=x,y=S,I=U,E=Y;break e}if((0|(x=(_=x<<1)-(D=0|o[s+(B<<2)>>2])|0))<0){b=0;break}k=U,n<<=1,c=B,v=Y,L=s+(B<<2)|0,S=_+S|0}return O=u,0|b}if(d)return O=u,0;for(c=1,n=a,k=3;;){if((0|c)>=(0|r)){C=n,y=k,I=0,E=0;break e}if((0|(n=(v=n<<1)-(0|o[s+((c=c+1|0)<<2)>>2])|0))<0){b=0;break}k=v+k|0}return O=u,0|b}while(0);(0|r)<15?(z=C,W=y,X=I,Q=E,g=42):(N=l,V=y,j=p)}else z=1,W=1,X=0,Q=0,g=42;do{if(42==(0|g)){for(p=0!=(0|e),y=e,E=-1,I=e,C=l,Y=l,U=z,a=W,m=2,d=r,S=X,L=Q;;){if(v=d,a=(c=U<<1)+a|0,(0|(U=c-(k=0|o[(n=s+((d=d+1|0)<<2)|0)>>2])|0))<0){b=0,g=69;break}e:do{if(p&(0|k)>0){if(x=255&(c=d-r|0),D=1<=14)for(_=255&d,B=E,T=I,R=C,q=Y,H=S,Z=L;;){(0|(K=H&w))==(0|B)?(J=q,$=B,ee=T,re=R):(ne=T+(q<<2)|0,t[e+(K<<2)>>0]=_,te=ne-y|0,i[e+(K<<2)+2>>1]=(te>>>2)-K,J=D,$=K,ee=ne,re=D+R|0),ne=ee+((r?H>>>r:H)<<2)|0,K=(0|f[A+(Z<<1)>>1])<<16|x,te=J;do{i[(ie=ne+((te=te-m|0)<<2)|0)>>1]=K,i[ie+2>>1]=K>>>16}while((0|te)>0);for(te=c;te&H;)te>>>=1;if(K=Z+1|0,ne=0==(0|te)?H:(te+-1&H)+te|0,ie=0|o[n>>2],o[n>>2]=ie+-1,!((0|ie)>1)){oe=J,ae=$,fe=ee,Ae=re,ue=ne,se=K;break e}B=$,T=ee,R=re,q=J,H=ne,Z=K}for(Z=E,H=I,q=C,R=Y,T=S,B=L,_=k;;){if((0|(G=T&w))==(0|Z))le=R,ce=Z,de=H,he=q;else{K=H+(R<<2)|0,ne=D-_|0;r:do{if((0|ne)<1)ve=d;else for(ie=d,be=ne;;){if(ge=ie+1|0,(0|ie)>=14){ve=ge;break r}if((0|(be=(be<<1)-(0|o[s+(ge<<2)>>2])|0))<1){ve=ge;break}ie=ge}}while(0);ne=1<>0]=ve,te=K-y|0,i[e+(G<<2)+2>>1]=(te>>>2)-G,le=ne,ce=G,de=K,he=ne+q|0}ne=de+((r?T>>>r:T)<<2)|0,te=(0|f[A+(B<<1)>>1])<<16|x,ie=le;do{i[(be=ne+((ie=ie-m|0)<<2)|0)>>1]=te,i[be+2>>1]=te>>>16}while((0|ie)>0);for(ie=c;ie&T;)ie>>>=1;if(te=B+1|0,ne=0==(0|ie)?T:(ie+-1&T)+ie|0,_=(K=0|o[n>>2])-1|0,o[n>>2]=_,(0|K)<=1){oe=le,ae=ce,fe=de,Ae=he,ue=ne,se=te;break}Z=ce,H=de,q=he,R=le,T=ne,B=te}}else oe=Y,ae=E,fe=I,Ae=C,ue=S,se=L}while(0);if((0|v)>=14){g=67;break}E=ae,I=fe,C=Ae,Y=oe,m<<=1,S=ue,L=se}if(67==(0|g)){N=Ae,V=a,j=0|o[h>>2];break}if(69==(0|g))return O=u,0|b}}while(0);return O=u,0|((0|V)==((j<<1)-1|0)?N:0)}function xe(e,r,n,i){e|=0,r|=0,i|=0;var a,f,A,u=0,s=0,c=0,d=0,h=0;if(!((0|(n|=0))<=0)){a=0|t[e>>0],f=0|t[e+1>>0],A=0|t[e+2>>0],e=0;do{u=0|o[r+(e<<2)>>2],d=((s=0|l(c=(s=u<<16)>>24,a))>>5)+(u>>>16)|0,s=0|l(c,f),h=0|l((c=d<<24)>>24,A),o[i+(e<<2)>>2]=d<<16&16711680|-16711936&u|(s>>>5)+u+(h>>>5)&255,e=e+1|0}while((0|e)!=(0|n))}}function Se(e,r,n){var i;if(n|=0,i=(e|=0)+((r|=0)<<2)|0,!((0|r)<=0))for(r=n,n=e;e=0|o[n>>2],n=n+4|0,t[r>>0]=e>>>16,t[r+1>>0]=e>>>8,t[r+2>>0]=e,t[r+3>>0]=e>>>24,!(n>>>0>=i>>>0);)r=r+4|0}function _e(e,r,n){var i;if(n|=0,i=(e|=0)+((r|=0)<<2)|0,!((0|r)<=0))for(r=n,n=e;e=0|o[n>>2],n=n+4|0,t[r>>0]=e>>>16&240|e>>>12&15,t[r+1>>0]=240&e|e>>>28,!(n>>>0>=i>>>0);)r=r+2|0}function Be(e,r,n,t,i,a){e|=0,r|=0,n|=0;var f=0,A=0,u=0,s=0;if((0|(t|=0))<(0|(i|=0))&(0|(a|=0))>0)for(f=t,t=e,e=n;;){for(n=0,A=e,u=t,t=t+(a<<2)|0;s=0|o[u>>2],o[A>>2]=o[r+((s>>>8&255)<<2)>>2],(0|(n=n+1|0))!=(0|a);)A=A+4|0,u=u+4|0;if((0|(f=f+1|0))==(0|i))break;e=e+(a<<2)|0}}function Me(e,r,n){e|=0,n|=0;var t,i,a,f,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0;if(t=O,O=O+16|0,i=t+4|0,A=t,a=0|o[(r|=0)>>2],f=0|o[r+4>>2],u=0!=(0|e))if(s=(0|o[e+8>>2])>0,o[r+72>>2]=1&s,s){if(s=0|o[e+20>>2],l=0|o[e+24>>2],c=0|o[e+12>>2],d=0|o[e+16>>2],n=(h=n>>>0>10)?-2&c:c,((c=h?-2&d:d)+l|0)>(0|f)|(n+s|0)>(0|a)|(0|l)<1|(0|s)<1|(c|n|0)<0)return O=t,0;v=l,b=s,g=c,w=n}else v=f,b=a,g=0,w=0;else o[r+72>>2]=0,v=f,b=a,g=0,w=0;if(o[r+76>>2]=w,o[r+84>>2]=g,o[r+80>>2]=b+w,o[r+88>>2]=v+g,o[r+12>>2]=b,o[r+16>>2]=v,!u)return o[r+92>>2]=0,o[r+68>>2]=0,o[r+56>>2]=1,O=t,1;u=(0|o[e+28>>2])>0,o[(g=r+92|0)>>2]=1&u;do{if(u){if(o[i>>2]=o[e+32>>2],o[A>>2]=o[e+36>>2],0|Ue(b,v,i,A)){o[r+96>>2]=o[i>>2],o[r+100>>2]=o[A>>2],m=0==(0|o[g>>2]);break}return O=t,0}m=1}while(0);return o[(g=r+68|0)>>2]=0!=(0|o[e>>2])&1,o[(A=r+56|0)>>2]=0==(0|o[e+4>>2])&1,m?(O=t,1):(k=(0|o[r+96>>2])<(0|(3*a|0)/4)?(0|o[r+100>>2])<(0|(3*f|0)/4)&1:0,o[g>>2]=k,o[A>>2]=0,O=t,1)}function Fe(){0|o[2033]&&(o[2437]=1,o[2439]=2,o[2443]=1,o[2444]=2,o[2436]=3,o[2438]=4,o[2440]=5,o[2441]=6,o[2442]=7,o[2445]=5,o[2446]=6),o[2033]=0}function Pe(e,r,n,t,i,a,f,A,u){n|=0,t|=0,a|=0,f|=0,A|=0,u|=0;var s,c=0,d=0;c=(0|(r|=0))<(0|(i|=0)),o[(e|=0)>>2]=1&c,s=(0|n)<(0|a),o[e+4>>2]=1&s,o[e+44>>2]=r,o[e+48>>2]=n,o[e+52>>2]=i,o[e+56>>2]=a,o[e+60>>2]=0,o[e+64>>2]=0,o[e+68>>2]=t,o[e+72>>2]=f,o[e+8>>2]=A,f=c?i+-1|0:r,o[e+36>>2]=f,t=c?r+-1|0:i,o[e+40>>2]=t,c||(c=0|kn(0,1,0|t,((0|t)<0)<<31>>31|0),v(),o[e+12>>2]=c),t=(c=s<<31>>31)+n|0,o[e+28>>2]=t,n=c+a|0,o[e+32>>2]=n,c=e+24|0,s?(o[c>>2]=n,d=f):(o[c>>2]=t,c=(0|(f=0|kn(0,0|a,0|(c=0|l(t,f)),((0|c)<0)<<31>>31|0)))==(0|f)&0==(0|v()),o[e+20>>2]=c?f:0,d=n),n=0|kn(0,1,0|d,((0|d)<0)<<31>>31|0),v(),o[e+16>>2]=n,o[e+76>>2]=u,n=u+((0|l(A,i))<<2)|0,o[e+80>>2]=n,Dn(0|u,0,0|l(i<<3,A)),o[2032]=0}function Re(e){var r,n,t,i=0,a=0,f=0,A=0;if(r=24+(e|=0)|0,n=e+56|0,(0|o[(t=e+64|0)>>2])>=(0|o[n>>2]))return 0;for(a=0;;){if((0|o[r>>2])>0){i=a,f=5;break}if(ue(e),A=a+1|0,!((0|o[t>>2])<(0|o[n>>2]))){i=A,f=5;break}a=A}return 5==(0|f)?0|i:0}function Te(e,r,n,t,i,o,a){e|=0,r|=0,n|=0,t|=0,i|=0,a|=0;var f=0;if(!((0|(o|=0))<=0))for(f=e,e=n,n=0;he(f,e,i,a),(0|(n=n+1|0))!=(0|o);)f=f+r|0,e=e+t|0}function Ge(e){var r,n,i,a,f=0,A=0,u=0,s=0,c=0,d=0,h=0,b=0;if(r=0|o[68+(e|=0)>>2],n=0|o[e+76>>2],i=0|l(0|o[e+8>>2],0|o[e+52>>2]),a=0|o[e+80>>2],f=0|o[e+24>>2]){if(A=0|kn(0,0-f|0,0|(u=0|o[e+32>>2]),((0|u)<0)<<31>>31|0),v(),(0|i)<=0)return;u=0-A|0,f=e+16|0,e=0;do{s=0|vn(0|o[a+(e<<2)>>2],0,0|u,0),c=0|v(),d=0|vn(0|A,0,0|o[n+(e<<2)>>2],0),h=0|v(),b=0|bn(0|s,0|c,-2147483648,0),bn(0|b,0|v(),0|d,0|h),bn(0|(d=0|vn(0|(h=0|v()),0,0|o[f>>2],0)),0|v(),-2147483648,0),d=0|v(),t[r+e>>0]=(0|d)>255?-1:255&d,e=e+1|0}while((0|e)!=(0|i))}else if(!((0|i)<=0)){A=e+16|0,u=0;do{bn(0|(s=0|vn(0|o[A>>2],0,0|o[a+(u<<2)>>2],0)),0|v(),-2147483648,0),s=0|v(),t[r+u>>0]=(0|s)>255?-1:255&s,u=u+1|0}while((0|u)!=(0|i))}}function Oe(e){var r,n,i,a,f,A=0,u=0,s=0,c=0,d=0;if(r=0|o[68+(e|=0)>>2],n=0|o[e+76>>2],i=0|l(0|o[e+8>>2],0|o[e+52>>2]),a=0|o[e+80>>2],A=(0|i)>0,f=0|l(0|o[e+24>>2],0-(0|o[e+16>>2])|0)){if(!A)return;A=e+20|0,e=0;do{vn(0|o[a+(e<<2)>>2],0,0|f,0),s=0|v(),bn(0|(c=0|vn((0|o[(u=n+(e<<2)|0)>>2])-s|0,0,0|o[A>>2],0)),0|v(),-2147483648,0),c=0|v(),t[r+e>>0]=(0|c)>255?-1:255&c,o[u>>2]=s,e=e+1|0}while((0|e)!=(0|i))}else if(A){u=e+20|0,s=0;do{c=n+(s<<2)|0,bn(0|(d=0|vn(0|o[u>>2],0,0|o[c>>2],0)),0|v(),-2147483648,0),d=0|v(),t[r+s>>0]=(0|d)>255?-1:255&d,o[c>>2]=0,s=s+1|0}while((0|s)!=(0|i))}}function qe(e,r){r|=0;var n,i,a,f,A,u,s=0,c=0,d=0,h=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0;if(n=0|o[8+(e|=0)>>2],i=0|l(0|o[e+52>>2],n),!((0|n)<=0)){a=e+36|0,f=e+40|0,A=e+80|0,u=e+12|0,e=0;do{if((0|e)<(0|i))for(s=0,c=0,d=e,h=e;;){if(b=(0|o[a>>2])+s|0,g=0|o[f>>2],(0|b)>0){w=c,m=h,k=b;do{k=k-g|0,w=w+(255&(p=0|t[r+m>>0]))|0,m=m+n|0}while((0|k)>0);C=255&p,y=k,I=w,E=m}else C=0,y=b,I=c,E=h;if(D=0|l(C,0-y|0),L=(0|l(g,I))-D|0,o[(0|o[A>>2])+(d<<2)>>2]=L,bn(0|(L=0|vn(0|o[u>>2],0,0|D,0)),0|v(),-2147483648,0),c=0|v(),(0|(d=d+n|0))>=(0|i))break;s=y,h=E}e=e+1|0}while((0|e)!=(0|n))}}function Ue(e,r,n,t){e|=0,r|=0,t|=0;var i,a,f=0,A=0,u=0,s=0,l=0,c=0,d=0;return f=0|o[(n|=0)>>2],i=0|o[t>>2],A=((0|r)<0)<<31>>31,a=((0|e)<0)<<31>>31,(0|r)>0&0==(0|f)?(u=0|vn(0|i,((0|i)<0)<<31>>31|0,0|e,0|a),s=0|v(),l=0|bn(0|r,0|A,-1,-1),s=0|kn(0|bn(0|l,0|v(),0|u,0|s),0|v(),0|r,0|A),v(),c=s):c=f,(0|e)>0&0==(0|i)?(f=0|vn(0|c,((0|c)<0)<<31>>31|0,0|r,0|A),A=0|v(),r=0|bn(0|e,0|a,-1,-1),A=0|kn(0|(s=0|bn(0|r,0|v(),0|f,0|A)),0|v(),0|e,0|a),v(),d=A):d=i,(0|c)<1|(0|d)<1?0:(o[n>>2]=c,o[t>>2]=d,1)}function Ye(e,r,n,i){var a,f=0,A=0,u=0,s=0,c=0,d=0,h=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0;if(a=O,O=O+16|0,f=a+4|0,A=a,(0|(r|=0))<1|(0|(e|=0))<1|0==(0|(i|=0)))return O=a,2;if(u=0!=(0|(n|=0))){if(0|o[n+8>>2]){if(s=0|o[n+20>>2],c=0|o[n+24>>2],d=0|o[n+12>>2],(0|c)<1|(0|s)<1|((h=0|o[n+16>>2])|d|0)<0)return O=a,2;if(((-2&d)+s|0)>(0|e)|((-2&h)+c|0)>(0|r))return O=a,2;b=s,g=c}else b=e,g=r;if(0|o[n+28>>2]){if(o[f>>2]=o[n+32>>2],o[A>>2]=o[n+36>>2],c=0==(0|Ue(b,g,f,A)))return O=a,2;w=0|o[f>>2],m=0|o[A>>2]}else w=b,m=g}else w=e,m=r;if(o[i+4>>2]=w,o[(r=i+8|0)>>2]=m,(0|m)<1|(0|w)<1|(e=0|o[i>>2])>>>0>12)return O=a,2;do{if((0|o[i+12>>2])<1&&0==(0|o[(g=i+80|0)>>2])){if(b=((0|w)<0)<<31>>31,f=0|vn(255&(A=0|t[8683+e>>0])|0,0,0|w,0|b),(c=0|v())>>>0>0|0==(0|c)&f>>>0>4294967295)return O=a,2;if(c=0|vn(0|(f=0|l(w,255&A)),((0|f)<0)<<31>>31|0,0|m,0|(A=((0|m)<0)<<31>>31)),s=0|v(),(h=e>>>0>10)?(p=0|vn(0|(d=(w+1|0)/2|0),((0|d)<0)<<31>>31|0,0|(k=(m+1|0)/2|0),((0|k)<0)<<31>>31|0),k=0|v(),C=12==(0|e),y=0|vn(0|w,0|b,0|m,0|A),A=0|v(),I=d,E=C?w:0,D=p,L=k,x=C?y:0,S=C?A:0):(I=0,E=0,D=0,L=0,x=0,S=0),A=0|Cn(0|D,0|L,1),C=0|v(),y=0|bn(0|x,0|S,0|c,0|s),!(C=0|V(s=0|bn(0|y,0|v(),0|A,0|C),0|v(),1)))return O=a,1;if(o[g>>2]=C,o[i+16>>2]=C,!h){o[i+20>>2]=f,o[i+24>>2]=c;break}o[i+32>>2]=f,o[i+48>>2]=c,f=C+c|0,o[i+20>>2]=f,o[i+36>>2]=I,o[i+52>>2]=D,o[i+24>>2]=f+D,o[i+40>>2]=I,o[i+56>>2]=D,12==(0|e)&&(o[i+28>>2]=f+A),o[i+60>>2]=x,o[i+44>>2]=E}}while(0);return 0!=(0|(E=0|ze(i)))|1^u?(O=a,0|E):0|o[n+48>>2]?(n=(0|o[r>>2])-1|0,(0|o[i>>2])>>>0<=10?(E=0|o[(r=i+20|0)>>2],u=0|l(E,n),o[(x=i+16|0)>>2]=(0|o[x>>2])+u,o[r>>2]=0-E,O=a,0):(r=0|o[(E=i+32|0)>>2],u=0|l(r,n),o[(x=i+16|0)>>2]=(0|o[x>>2])+u,o[E>>2]=0-r,r=n>>1,u=0|o[(E=i+36|0)>>2],x=0|l(u,r),o[(e=i+20|0)>>2]=(0|o[e>>2])+x,o[E>>2]=0-u,E=0|o[(u=i+40|0)>>2],x=0|l(E,r),o[(r=i+24|0)>>2]=(0|o[r>>2])+x,o[u>>2]=0-E,(u=0|o[(E=i+28|0)>>2])?(i=0|o[(x=i+44|0)>>2],r=u+(0|l(i,n))|0,o[E>>2]=r,o[x>>2]=0-i,O=a,0):(O=a,0))):(O=a,0)}function ze(e){var r,n,t,i=0,f=0,A=0,u=0,s=0,c=0,d=0,h=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0;if(r=0|o[(e|=0)>>2],n=0|o[e+4>>2],t=0|o[e+8>>2],r>>>0>12)return 2;do{if(r>>>0>10){if(i=(n+1|0)/2|0,A=(0|(f=0|o[e+32>>2]))>-1?f:0-f|0,u=(0|(f=0|o[e+36>>2]))>-1?f:0-f|0,s=(0|(f=0|o[e+40>>2]))>-1?f:0-f|0,c=(0|(f=0|o[e+44>>2]))>-1?f:0-f|0,b=((0|n)<0)<<31>>31,g=0|bn(0|(h=0|vn(0|A,((0|A)<0)<<31>>31|0,0|(f=t+-1|0),0|(d=((0|f)<0)<<31>>31))),0|v(),0|n,0|b),h=0|v(),p=((0|i)<0)<<31>>31,C=0|bn(0|(k=0|vn(0|u,((0|u)<0)<<31>>31|0,0|(w=((t+1|0)/2|0)-1|0),0|(m=((0|w)<0)<<31>>31))),0|v(),0|i,0|p),k=0|v(),m=0|bn(0|(y=0|vn(0|s,((0|s)<0)<<31>>31|0,0|w,0|m)),0|v(),0|i,0|p),p=0|v(),y=0!=(0|o[e+24>>2])&0!=(0|o[e+20>>2])&0!=(0|o[e+16>>2])&(0|s)>=(0|i)&(0|u)>=(0|i)&(0|A)>=(0|n)&(h>>>0<0|(0==(0|h)?g>>>0<=(0|o[e+48>>2])>>>0:0))&(k>>>0<0|(0==(0|k)?C>>>0<=(0|o[e+52>>2])>>>0:0))&(p>>>0<0|(0==(0|p)?m>>>0<=(0|o[e+56>>2])>>>0:0)),12==(0|r)){if(d=0|bn(0|(m=0|vn(0|c,((0|c)<0)<<31>>31|0,0|f,0|d)),0|v(),0|n,0|b),b=0|v(),0!=(0|o[e+28>>2])&(0|c)>=(0|n)&y&(b>>>0<0|(0==(0|b)?d>>>0<=(0|o[e+60>>2])>>>0:0)))break;return 2}if(y)break;return 2}if(m=0|bn(0|(b=0|vn(0|(d=(0|(y=0|o[e+20>>2]))>-1?y:0-y|0),((0|d)<0)<<31>>31|0,0|(y=t+-1|0),((0|y)<0)<<31>>31|0)),0|(y=0|v()),0|(c=0|l(n,0|a[8683+r>>0])),((0|c)<0)<<31>>31|0),y=0|v(),!(0!=(0|o[e+16>>2])&(0|d)>=(0|c)&(y>>>0<0|(0==(0|y)?m>>>0<=(0|o[e+24>>2])>>>0:0))))return 2}while(0);return 0}function We(e,r){if(0==(0|(e|=0))|512!=(-256&(r|=0)|0))return 0;e=(r=e)+84|0;do{o[r>>2]=0,r=r+4|0}while((0|r)<(0|e));return 1}function Xe(e){var r;(e|=0)&&(r=e+80|0,(0|o[e+12>>2])<1&&U(0|o[r>>2]),o[r>>2]=0)}function Qe(e,r){var n,t,i,f=0,A=0;if(n=4+(e|=0)|0,o[4+(r|=0)>>2]=o[n>>2],t=e+8|0,o[r+8>>2]=o[t>>2],0|ze(r))return 2;if(i=0|o[e>>2],f=0|o[e+16>>2],i>>>0<=10)return A=0|l(0|o[n>>2],0|a[8683+i>>0]),Ne(f,0|o[e+20>>2],0|o[r+16>>2],0|o[r+20>>2],A,0|o[t>>2]),0;switch(Ne(f,0|o[e+32>>2],0|o[r+16>>2],0|o[r+32>>2],0|o[n>>2],0|o[t>>2]),Ne(0|o[e+20>>2],0|o[e+36>>2],0|o[r+20>>2],0|o[r+36>>2],(1+(0|o[n>>2])|0)/2|0,(1+(0|o[t>>2])|0)/2|0),Ne(0|o[e+24>>2],0|o[e+40>>2],0|o[r+24>>2],0|o[r+40>>2],(1+(0|o[n>>2])|0)/2|0,(1+(0|o[t>>2])|0)/2|0),0|(f=0|o[e>>2])){case 1:case 3:case 4:case 5:case 12:break;default:if((f+-7|0)>>>0>3)return 0}return Ne(0|o[e+28>>2],0|o[e+44>>2],0|o[r+28>>2],0|o[r+44>>2],0|o[n>>2],0|o[t>>2]),0}function Ne(e,r,n,t,i,o){e|=0,r|=0,t|=0,i|=0;var a=0;if(!((0|(o|=0))<=0))for(a=o,o=e,e=n|=0;In(0|e,0|o,0|i),(0|a)>1;)a=a+-1|0,o=o+r|0,e=e+t|0}function Ve(e,r){return r|=0,(0|o[12+(e|=0)>>2])<=1?0:0|r&&((0|o[e>>2])-7|0)>>>0<4?0|0!=(0|o[r+8>>2])&1:0}function je(e,r){r|=0;var n,t=0,i=0,f=0,A=0,u=0,s=0;if(e|=0){n=0|o[e+44>>2];do{if((0|n)>=0){if((0|n)<=100){if(!((0|(t=255*n|0))>99))break;i=(0|t)/100|0}else i=255;(0|(t=0|o[r+800>>2]))<12?(t=(0|l(i,0|a[8696+((0|t)>0?t:0)>>0]))>>3,o[r+804>>2]=t,f=t):f=0|o[r+804>>2],(0|(t=0|o[r+832>>2]))<12?(t=(0|l(i,0|a[8696+((0|t)>0?t:0)>>0]))>>3,o[r+836>>2]=t,A=t):A=0|o[r+836>>2],(0|(t=0|o[r+864>>2]))<12?(t=(0|l(i,0|a[8696+((0|t)>0?t:0)>>0]))>>3,o[r+868>>2]=t,u=t):u=0|o[r+868>>2],(0|(t=0|o[r+896>>2]))<12?(t=(0|l(i,0|a[8696+((0|t)>0?t:0)>>0]))>>3,o[r+900>>2]=t,s=t):s=0|o[r+900>>2],s|u|A|f|0&&(He(r+544|0,1),o[r+540>>2]=1)}}while(0);f=0|o[e+52>>2],o[(e=r+2372|0)>>2]=f,(0|f)>100?o[e>>2]=100:(0|f)>=0||(o[e>>2]=0)}}function He(e,r){r=+r;var n;In(8+(e|=0)|0,3888,220),o[e>>2]=0,o[e+4>>2]=31,n=r<0?0:r>1?256:~~(256*r)>>>0,o[e+228>>2]=n}function Ze(e,r){r|=0;var n,t=0,i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0;if(t=160+(e|=0)|0,a=(0|o[e+2308>>2])>0&&(0|(i=0|o[e+2300>>2]))>=(0|o[e+300>>2])?(0|i)<=(0|o[e+308>>2]):0,i=1&a,!(0|o[(f=e+148|0)>>2]))return o[e+164>>2]=o[e+2300>>2],o[e+168>>2]=i,Ke(e,t),0|Je(e,r);if(n=e+124|0,!(1&(0|Rn[7&o[(u=8148)>>2]](n))))return 0;u=r,r=108+(A=e+180|0)|0;do{o[A>>2]=o[u>>2],A=A+4|0,u=u+4|0}while((0|A)<(0|r));return u=e+152|0,o[t>>2]=o[u>>2],o[e+164>>2]=o[e+2300>>2],o[e+168>>2]=i,2==(0|o[f>>2])?(i=0|o[(f=e+176|0)>>2],A=e+2304|0,o[f>>2]=o[A>>2],o[A>>2]=i):Ke(e,t),a?(t=0|o[(a=e+172|0)>>2],i=e+2260|0,o[a>>2]=o[i>>2],o[i>>2]=t,s=0|o[2038],qn[31&s](n),c=(0|(l=1+(0|o[u>>2])|0))==(0|o[(e+156|0)>>2])?0:l,o[u>>2]=c,1):(s=0|o[2038],qn[31&s](n),c=(0|(l=1+(0|o[u>>2])|0))==(0|o[(e+156|0)>>2])?0:l,o[u>>2]=c,1)}function Ke(e,r){e|=0;var n,i,A,u,s,c,d,h,v,b,g,w,m,k,p,C,y,I,E,D,L,x,S,_,B,M,F,P,R,T,G,O,q,U,Y,z,W,X,Q,N,V,j,H,Z,K,J,$,ee,re,ne,te,ie,oe,ae,fe,Ae,ue,se,le,ce,de,he,ve,be,ge,we,me,ke,pe,Ce,ye,Ie,Ee,De,Le,xe,Se,_e,Be,Me,Fe,Pe,Re,Te,Ge,Oe,qe,Ue,Ye,ze,We,Xe,Qe,Ne,Ve,je,He,Ze,Ke,Je,$e,er,rr,nr,Ar,ur,sr,lr,cr,dr,hr,vr,br,gr,wr,mr,kr,pr,Cr,yr,Ir,Er,Dr,Lr=0,xr=0,Sr=0,_r=0,Br=0,Mr=0,Fr=0,Pr=0,Rr=0,Tr=0,Gr=0,Or=0,qr=0,Ur=0,Yr=0,zr=0,Wr=0,Xr=0;if(n=0|o[4+(r|=0)>>2],Lr=0|o[r>>2],i=40+(xr=0|o[e+2264>>2])|0,A=xr+584|0,t[xr+39>>0]=-127,t[xr+71>>0]=-127,t[xr+103>>0]=-127,t[xr+135>>0]=-127,t[xr+167>>0]=-127,t[xr+199>>0]=-127,t[xr+231>>0]=-127,t[xr+263>>0]=-127,t[xr+295>>0]=-127,t[xr+327>>0]=-127,t[xr+359>>0]=-127,t[xr+391>>0]=-127,t[xr+423>>0]=-127,t[xr+455>>0]=-127,t[xr+487>>0]=-127,t[xr+519>>0]=-127,u=xr+600|0,t[xr+583>>0]=-127,t[xr+599>>0]=-127,t[xr+615>>0]=-127,t[xr+631>>0]=-127,t[xr+647>>0]=-127,t[xr+663>>0]=-127,t[xr+679>>0]=-127,t[xr+695>>0]=-127,t[xr+711>>0]=-127,t[xr+727>>0]=-127,t[xr+743>>0]=-127,t[xr+759>>0]=-127,t[xr+775>>0]=-127,t[xr+791>>0]=-127,t[xr+807>>0]=-127,t[xr+823>>0]=-127,s=(0|n)>0)t[xr+567>>0]=-127,t[xr+551>>0]=-127,t[xr+7>>0]=-127;else{_r=21+(Sr=xr+7|0)|0;do{t[Sr>>0]=127,Sr=Sr+1|0}while((0|Sr)<(0|_r));_r=9+(Sr=xr+551|0)|0;do{t[Sr>>0]=127,Sr=Sr+1|0}while((0|Sr)<(0|_r));_r=9+(Sr=xr+567|0)|0;do{t[Sr>>0]=127,Sr=Sr+1|0}while((0|Sr)<(0|_r))}if(!((0|o[(c=e+288|0)>>2])<=0)){d=r+16|0,r=e+2252|0,h=xr+8|0,v=xr+552|0,b=xr+568|0,g=xr+24|0,w=xr+408|0,m=xr+280|0,k=xr+152|0,p=(Br=0==(0|n))?6:5,C=Br?4:0,Br=e+292|0,y=xr+520|0,I=xr+808|0,E=xr+824|0,D=Lr<<4,L=e+2280|0,x=Lr<<3,Lr=e+2284|0,S=e+2268|0,_=e+2272|0,B=e+2276|0,e=xr+4|0,M=xr+20|0,F=xr+36|0,P=xr+52|0,R=xr+68|0,T=xr+84|0,G=xr+100|0,O=xr+116|0,q=xr+132|0,U=xr+148|0,Y=xr+164|0,z=xr+180|0,W=xr+196|0,X=xr+212|0,Q=xr+228|0,N=xr+244|0,V=xr+260|0,j=xr+276|0,H=xr+292|0,Z=xr+308|0,K=xr+324|0,J=xr+340|0,$=xr+356|0,ee=xr+372|0,re=xr+388|0,ne=xr+404|0,te=xr+420|0,ie=xr+436|0,oe=xr+452|0,ae=xr+468|0,fe=xr+484|0,Ae=xr+500|0,ue=xr+516|0,se=xr+532|0,le=xr+548|0,ce=xr+556|0,de=xr+564|0,he=xr+572|0,ve=xr+580|0,be=xr+588|0,ge=xr+596|0,we=xr+604|0,me=xr+612|0,ke=xr+620|0,pe=xr+628|0,Ce=xr+636|0,ye=xr+644|0,Ie=xr+652|0,Ee=xr+660|0,De=xr+668|0,Le=xr+676|0,xe=xr+684|0,Se=xr+692|0,_e=xr+700|0,Be=xr+708|0,Me=xr+716|0,Fe=xr+724|0,Pe=xr+732|0,Re=xr+740|0,Te=xr+748|0,Ge=xr+756|0,Oe=xr+764|0,qe=xr+772|0,Ue=xr+780|0,Ye=xr+788|0,ze=xr+796|0,We=xr+804|0,Xe=xr+812|0,Qe=xr+820|0,Ne=xr+828|0,Ve=xr+72|0,je=xr+104|0,He=xr+136|0,Ze=xr+168|0,Ke=xr+200|0,Je=xr+232|0,$e=xr+264|0,er=xr+296|0,r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]=Or,t[qr+1>>0]=Or>>8,t[qr+2>>0]=Or>>16,t[qr+3>>0]=Or>>24}e:do{if(0|t[Mr+(800*xr|0)+768>>0]){do{if(s){if((0|xr)<((0|o[c>>2])-1|0)){qr=a[(Or=Rr+32|0)>>0]|a[Or+1>>0]<<8|a[Or+2>>0]<<16|a[Or+3>>0]<<24,t[g>>0]=qr,t[g+1>>0]=qr>>8,t[g+2>>0]=qr>>16,t[g+3>>0]=qr>>24,Xr=qr;break}Dn(0|g,0|(qr=0|t[Pr+(xr<<5)+15>>0]),4),Xr=(qr=(Or=255&qr)<<8|Or)|qr<<16;break}Xr=0|o[g>>2]}while(0);for(o[w>>2]=Xr,o[m>>2]=Xr,o[k>>2]=Xr,qr=Tr,Or=0;;){switch(Ur=i+(0|f[4112+(Or<<1)>>1])|0,qn[31&o[9376+((255&t[Mr+(800*xr|0)+769+Or>>0])<<2)>>2]](Ur),Wr=Mr+(800*xr|0)+(Or<<4<<1)|0,qr>>>30&3){case 3:tr(Wr,Ur,0);break;case 2:or(Wr,Ur);break;case 1:ir(Wr,Ur)}if(16==(0|(Or=Or+1|0)))break;qr<<=2}zr=Fr?p:C}else if(Or=0|t[Mr+(800*xr|0)+769>>0],qr=Fr?p:C,qn[31&o[9344+((Or<<24>>24==0?qr:255&Or)<<2)>>2]](i),Tr)for(Or=Tr,Ur=0;;){switch(Yr=Mr+(800*xr|0)+(Ur<<4<<1)|0,Wr=i+(0|f[4112+(Ur<<1)>>1])|0,Or>>>30&3){case 3:tr(Yr,Wr,0);break;case 2:or(Yr,Wr);break;case 1:ir(Yr,Wr)}if(16==(0|(Ur=Ur+1|0))){zr=qr;break e}Or<<=2}else zr=qr}while(0);Fr=0|o[Mr+(800*xr|0)+792>>2],Tr=0|t[Mr+(800*xr|0)+785>>0],qn[31&o[(qr=9424+((Tr<<24>>24==0?zr:255&Tr)<<2)|0)>>2]](A),qn[31&o[qr>>2]](u),qr=Mr+(800*xr|0)+512|0;do{if(255&Fr|0){if(170&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o[u>>2],R=0|o[M>>2],T=(0|o[D>>2])+(0|l(_<<4,P))+(x<<4)|0,G=0|a[R+(x<<2)+1>>0],U=255&(q=0|t[R+(x<<2)>>0]);do{if(q<<24>>24){if(1==(0|o[y>>2])){if((0|x)>0&&hr(T,P,U+4|0),0|t[(Y=R+(x<<2)+2|0)>>0]&&br(T,P,U),F&&dr(T,P,U+4|0),!(0|t[Y>>0]))break;vr(T,P,U);break}if(Y=0|o[c>>2],z=0|l(Y,_<<3),W=x<<3,X=(0|o[b>>2])+z+W|0,N=(0|o[m>>2])+z+W|0,W=0|a[R+(x<<2)+3>>0],z=U+4|0,(0|x)>0&&(sr(T,P,z,G,W),wr(X,N,Y,z,G,W)),0|t[(V=R+(x<<2)+2|0)>>0]&&(gr(T,P,U,G,W),mr(X,N,Y,U,G,W)),F&&(Ar(T,P,z,G,W),lr(X,N,Y,z,G,W)),!(0|t[V>>0]))break;ur(T,P,U,G,W),cr(X,N,Y,U,G,W);break}}while(0);x=x+1|0}while((0|x)<(0|o[B>>2]))}if(0|o[e+540>>2]&&(0|(B=0|o[e+296>>2]))<(0|(F=0|o[(x=e+304|0)>>2])))for(y=e+176|0,M=e+544|0,G=e+548|0,U=B,B=F;;){if(F=0|o[c>>2],P=(0|o[y>>2])+(800*U|0)+796|0,(255&(T=0|t[P>>0]))>3){R=255&T,T=0|o[b>>2],_=0|l(o[f>>2]<<3,F),q=0|o[m>>2],W=0,Y=0|o[M>>2],N=0|o[G>>2];do{V=(0|o[(X=e+552+(Y<<2)|0)>>2])-(0|o[e+552+(N<<2)>>2])|0,o[X>>2]=2147483647&V,Y=55==(0|(X=1+(0|o[M>>2])|0))?0:X,o[M>>2]=Y,N=55==(0|(X=1+(0|o[G>>2])|0))?0:X,o[G>>2]=N,V=0|l((X=V<<1)>>24,R),t[i+W>>0]=128+(V>>>8),W=W+1|0}while(64!=(0|W));kr(i,T+_+(W=U<<3)|0,F),R=0|a[P>>0],N=0,Y=0|o[M>>2],V=0|o[G>>2];do{z=(0|o[(X=e+552+(Y<<2)|0)>>2])-(0|o[e+552+(V<<2)>>2])|0,o[X>>2]=2147483647&z,Y=55==(0|(X=1+(0|o[M>>2])|0))?0:X,o[M>>2]=Y,V=55==(0|(X=1+(0|o[G>>2])|0))?0:X,o[G>>2]=V,z=0|l((X=z<<1)>>24,R),t[i+N>>0]=128+(z>>>8),N=N+1|0}while(64!=(0|N));kr(i,q+_+W|0,F),j=0|o[x>>2]}else j=B;if((0|(U=U+1|0))>=(0|j))break;B=j}if(0|o[(j=r+44|0)>>2]){if(B=p<<4,S?(o[r+20>>2]=(0|o[D>>2])+L,o[r+24>>2]=(0|o[b>>2])+E,H=0,Z=(0|o[m>>2])+E|0):(o[r+20>>2]=v,o[r+24>>2]=w,H=B-I|0,Z=k),o[r+28>>2]=Z,B=(0|(Z=B+16+(C?0:0-I|0)|0))>(0|(I=0|o[r+88>>2]))?I:Z,o[(Z=r+104|0)>>2]=0,0!=(0|o[e+2348>>2])&(0|B)>(0|H)){if(I=0|Q(e,r,H,B-H|0),o[Z>>2]=I,!I)return K=0|$e(e,3,8711),O=n,0|K;J=I}else J=0;(0|(I=0|o[r+84>>2]))>(0|H)?(E=I-H|0,L=0|l(0|o[u>>2],E),o[(S=r+20|0)>>2]=(0|o[S>>2])+L,L=0|l(0|o[c>>2],E>>1),o[(S=r+24|0)>>2]=(0|o[S>>2])+L,o[(S=r+28|0)>>2]=(0|o[S>>2])+L,J?(L=J+(0|l(0|o[r>>2],E))|0,o[Z>>2]=L,$=I,ee=L):($=I,ee=0)):($=H,ee=J),(0|B)>(0|$)?(J=0|o[r+76>>2],o[(H=r+20|0)>>2]=(0|o[H>>2])+J,H=J>>1,o[(L=r+24|0)>>2]=(0|o[L>>2])+H,o[(L=r+28|0)>>2]=(0|o[L>>2])+H,0|ee&&(o[Z>>2]=ee+J),o[r+8>>2]=$-I,o[r+12>>2]=(0|o[r+80>>2])-J,o[r+16>>2]=B-$,re=0|Rn[7&o[j>>2]](r)):re=1}else re=1;return C|(A+1|0)!=(0|o[e+156>>2])?(O=n,0|(K=re)):(In((0|o[D>>2])+h|0,v+(o[u>>2]<<4)|0,0|s),In((0|o[b>>2])+g|0,w+(o[c>>2]<<3)|0,0|d),In((0|o[m>>2])+g|0,k+(o[c>>2]<<3)|0,0|d),O=n,0|(K=re))}function $e(e,r,n){return r|=0,n|=0,0|o[(e|=0)>>2]?0:(o[e>>2]=r,o[e+8>>2]=n,o[e+4>>2]=0,0)}function er(e,r){e|=0;var n=0,i=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0;if(0|(n=0|o[48+(r|=0)>>2])&&0==(0|Rn[7&n](r)))return $e(e,6,8740),0|o[e>>2];if(n=e+2308|0,0|o[r+68>>2]?(o[n>>2]=0,c=0,d=0,l=8):(i=0|o[n>>2],f=0|a[8708+i>>0],2==(0|i)?(o[e+296>>2]=0,A=f,u=2,s=e+300|0,l=11):(c=i,d=f,l=8)),8==(0|l)&&(n=(0|o[r+76>>2])-d|0,o[(f=e+296|0)>>2]=n>>4,i=(0|o[r+84>>2])-d|0,o[(h=e+300|0)>>2]=i>>4,(0|n)<0&&(o[f>>2]=0),(0|i)<0?(A=d,u=c,s=h,l=11):(v=d,b=c)),11==(0|l)&&(o[s>>2]=0,v=A,b=u),A=(v=(u=v+15|0)+(0|o[r+88>>2])|0)>>4,o[(v=e+308|0)>>2]=A,r=(s=u+(0|o[r+80>>2])|0)>>4,s=0|o[e+288>>2],o[e+304>>2]=(0|r)>(0|s)?s:r,(0|A)>(0|(r=0|o[e+292>>2]))&&(o[v>>2]=r),(0|b)<=0)return 0;b=e+60|0,r=e+68|0,v=e+72|0,A=e+64|0,s=e+88|0,u=e+112|0,l=0==(0|o[e+104>>2]),c=0;do{l?g=0|o[b>>2]:(d=0|t[e+120+c>>0],g=0|o[u>>2]?d:(0|o[b>>2])+d|0),0|o[r>>2]?(i=(0|(h=(0|(d=(0|o[v>>2])+g|0))<63?d:63))>0?h:0,(0|d)>0?(n=(f=(0|(h=0|o[A>>2]))>4?2:1)?i>>>f:i,f=9-h|0,n=(0|(w=(0|h)>0?(0|n)>(0|f)?f:n:i))>1?w:1,t[e+2312+(c<<3)+1>>0]=n,t[e+2312+(c<<3)+3>>0]=(0|i)>39?2:(0|i)>14&1,m=n+(i<<1)&255):m=0,t[e+2312+(c<<3)>>0]=m,t[e+2312+(c<<3)+2>>0]=0,n=(0|(d=(0|(i=(0|o[s>>2])+d|0))<63?i:63))>0?d:0,(0|i)>0?(w=(d=(0|(i=0|o[A>>2]))>4?2:1)?n>>>d:n,d=9-i|0,w=(0|(f=(0|i)>0?(0|w)>(0|d)?d:w:n))>1?f:1,t[e+2312+(c<<3)+5>>0]=w,t[e+2312+(c<<3)+7>>0]=(0|n)>39?2:(0|n)>14&1,k=w+(n<<1)&255):k=0):(w=(0|(n=(0|g)<63?g:63))>0?n:0,(0|g)>0?(d=(f=(0|(n=0|o[A>>2]))>4?2:1)?w>>>f:w,f=9-n|0,i=255&(d=(0|(i=(0|n)>0?(0|d)>(0|f)?f:d:w))>1?i:1),t[e+2312+(c<<3)+1>>0]=i,f=(0|w)>39?2:(0|w)>14&1,t[e+2312+(c<<3)+3>>0]=f,t[e+2312+(c<<3)+5>>0]=i,t[e+2312+(c<<3)+7>>0]=f,p=d+(w<<1)&255):p=0,t[e+2312+(c<<3)>>0]=p,t[e+2312+(c<<3)+2>>0]=0,k=p),t[e+2312+(c<<3)+4>>0]=k,t[e+2312+(c<<3)+6>>0]=1,c=c+1|0}while(4!=(0|c));return 0}function rr(e,r){r|=0;var n,t,i,A,u,s,c=0,d=0,h=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0;o[(n=152+(e|=0)|0)>>2]=0,c=e+148|0;do{if((0|o[c>>2])>0){if(0|Rn[7&o[(d=8144)>>2]](e+124|0)){o[e+136>>2]=e,o[e+140>>2]=e+180,o[e+132>>2]=20,d=(0|o[e+2308>>2])>0?3:2,o[e+156>>2]=d,h=d;break}if(0|$e(e,1,8759)){h=0|o[e+156>>2];break}return 0}o[e+156>>2]=1,h=1}while(0);if(t=(d=0|o[e+288>>2])<<2,b=d<<5,i=2+(d<<1)|0,w=0|o[(g=e+2308|0)>>2],m=0|o[c>>2],k=0|l((0|m)>0?2:1,t),p=(0|w)>0?k:0,k=0|l(800*d|0,2==(0|m)?2:1),A=0|l((3*((C=h<<4)+(0|a[8708+w>>0])|0)|0)/2|0,b),0|o[e+2348>>2]?(y=w=0|vn(0|f[e+50>>1],0,0|f[e+48>>1],0),I=0|v()):(y=0,I=0),w=0|bn(0|b,0,863,0),E=0|bn(0|w,0|v(),0|t,0),w=0|bn(0|E,0|v(),0|i,0),E=0|bn(0|w,0|v(),0|k,0),w=0|bn(0|E,0|v(),0|p,0),E=0|bn(0|w,0|v(),0|A,0),!((0|(w=0|bn(0|E,0|v(),0|y,0|I)))==(0|w)&0==(0|(E=0|v()))))return 0;u=e+2292|0,D=0|o[(s=e+2288|0)>>2];do{if(E>>>0>0|(0==(0|E)?w>>>0>(0|o[u>>2])>>>0:0)){if(U(D),o[u>>2]=0,L=0|V(w,E,1),o[s>>2]=L,0|L){o[u>>2]=w,x=0|o[c>>2],S=L,_=13;break}if(0|$e(e,1,8789)){B=e+2276|0,M=e+2280|0,F=e+2284|0,P=e+2268|0,R=e+2272|0;break}return 0}x=m,S=D,_=13}while(0);return 13==(0|_)&&(o[(_=e+2244|0)>>2]=S,D=S+t|0,o[e+2252>>2]=D,b=2+(S=D+b|0)|0,o[e+2256>>2]=b,D=S+i|0,S=0==(0|p)?0:D,o[e+2260>>2]=S,o[e+160>>2]=0,o[e+172>>2]=(0|x)>0?S+(d<<2)|0:S,S=D+p+31&-32,o[e+2264>>2]=S,p=S+832|0,o[e+2304>>2]=p,o[(S=e+176|0)>>2]=p,2==(0|x)&&(o[S>>2]=p+(800*d|0)),S=p+k|0,k=d<<4,o[(p=e+2280|0)>>2]=k,x=d<<3,o[(d=e+2284|0)>>2]=x,D=0|a[8708+(0|o[g>>2])>>0],g=0|l(k,D),m=0|l(D>>>1,x),D=S+g|0,o[(g=e+2268|0)>>2]=D,c=D+(0|l(k,C))+m|0,o[(C=e+2272|0)>>2]=c,k=c+(0|l(h<<3,x))+m|0,o[(m=e+2276|0)>>2]=k,o[n>>2]=0,o[e+2364>>2]=0==(0|y)&0==(0|I)?0:S+A|0,Dn(b+-2|0,0,0|i),nr(e),Dn(0|o[_>>2],0,0|t),B=m,M=p,F=d,P=g,R=C),o[r+8>>2]=0,o[r+20>>2]=o[P>>2],o[r+24>>2]=o[R>>2],o[r+28>>2]=o[B>>2],o[r+32>>2]=o[M>>2],o[r+36>>2]=o[F>>2],o[r+104>>2]=0,function(){var e=0;0|o[2041]?(o[2344]=6,o[2345]=7,o[2346]=8,o[2348]=9,o[2350]=10,o[2347]=11,o[2349]=12,o[2351]=13,o[2352]=14,o[2353]=15,o[2336]=16,o[2337]=17,o[2338]=18,o[2339]=19,o[2340]=20,o[2341]=21,o[2342]=22,o[2356]=23,o[2357]=24,o[2358]=25,o[2359]=26,o[2360]=27,o[2361]=28,o[2362]=29,e=0|o[2485]):e=0,o[2041]=e}(),1}function nr(e){var r;r=0|o[2256+(e|=0)>>2],t[r+-2>>0]=0,t[r+-1>>0]=0,o[e+2248>>2]=0,o[e+2296>>2]=0}function tr(e,r,n){n|=0,yr(e|=0,r|=0),n&&yr(e+32|0,r+4|0)}function ir(e,r){r|=0;var n=0,o=0;n=(e=(n=4+(0|i[(e|=0)>>1])|0)>>3)+(0|a[r>>0])|0,t[r>>0]=n>>>0>255?255+(n>>>31)|0:n,o=e+(0|a[(n=r+1|0)>>0])|0,t[n>>0]=o>>>0>255?255+(o>>>31)|0:o,n=e+(0|a[(o=r+2|0)>>0])|0,t[o>>0]=n>>>0>255?255+(n>>>31)|0:n,o=e+(0|a[(n=r+3|0)>>0])|0,t[n>>0]=o>>>0>255?255+(o>>>31)|0:o,n=e+(0|a[(o=r+32|0)>>0])|0,t[o>>0]=n>>>0>255?255+(n>>>31)|0:n,o=e+(0|a[(n=r+33|0)>>0])|0,t[n>>0]=o>>>0>255?255+(o>>>31)|0:o,n=e+(0|a[(o=r+34|0)>>0])|0,t[o>>0]=n>>>0>255?255+(n>>>31)|0:n,o=e+(0|a[(n=r+35|0)>>0])|0,t[n>>0]=o>>>0>255?255+(o>>>31)|0:o,n=e+(0|a[(o=r+64|0)>>0])|0,t[o>>0]=n>>>0>255?255+(n>>>31)|0:n,o=e+(0|a[(n=r+65|0)>>0])|0,t[n>>0]=o>>>0>255?255+(o>>>31)|0:o,n=e+(0|a[(o=r+66|0)>>0])|0,t[o>>0]=n>>>0>255?255+(n>>>31)|0:n,o=e+(0|a[(n=r+67|0)>>0])|0,t[n>>0]=o>>>0>255?255+(o>>>31)|0:o,n=e+(0|a[(o=r+96|0)>>0])|0,t[o>>0]=n>>>0>255?255+(n>>>31)|0:n,o=e+(0|a[(n=r+97|0)>>0])|0,t[n>>0]=o>>>0>255?255+(o>>>31)|0:o,n=e+(0|a[(o=r+98|0)>>0])|0,t[o>>0]=n>>>0>255?255+(n>>>31)|0:n,r=e+(0|a[(n=r+99|0)>>0])|0,t[n>>0]=r>>>0>255?255+(r>>>31)|0:r}function or(e,r){r|=0;var n=0,o=0,f=0,A=0,u=0,s=0,l=0,c=0;n=4+(0|i[(e|=0)>>1])|0,A=(f=35468*(o=0|i[e+8>>1])|0)>>16,u=((f=20091*o|0)>>16)+o|0,f=(e=35468*(o=0|i[e+2>>1])|0)>>16,s=((e=20091*o|0)>>16)+o|0,l=((e=(o=u+n|0)+s|0)>>3)+(0|a[r>>0])|0,t[r>>0]=l>>>0>255?255+(l>>>31)|0:l,c=((e=o+f|0)>>3)+(0|a[(l=r+1|0)>>0])|0,t[l>>0]=c>>>0>255?255+(c>>>31)|0:c,e=((l=o-f|0)>>3)+(0|a[(c=r+2|0)>>0])|0,t[c>>0]=e>>>0>255?255+(e>>>31)|0:e,o=((c=o-s|0)>>3)+(0|a[(e=r+3|0)>>0])|0,t[e>>0]=o>>>0>255?255+(o>>>31)|0:o,l=((c=s+(o=A+n|0)|0)>>3)+(0|a[(e=r+32|0)>>0])|0,t[e>>0]=l>>>0>255?255+(l>>>31)|0:l,c=((e=o+f|0)>>3)+(0|a[(l=r+33|0)>>0])|0,t[l>>0]=c>>>0>255?255+(c>>>31)|0:c,e=((l=o-f|0)>>3)+(0|a[(c=r+34|0)>>0])|0,t[c>>0]=e>>>0>255?255+(e>>>31)|0:e,o=((c=o-s|0)>>3)+(0|a[(e=r+35|0)>>0])|0,t[e>>0]=o>>>0>255?255+(o>>>31)|0:o,c=((e=s+(o=n-A|0)|0)>>3)+(0|a[(A=r+64|0)>>0])|0,t[A>>0]=c>>>0>255?255+(c>>>31)|0:c,e=((A=o+f|0)>>3)+(0|a[(c=r+65|0)>>0])|0,t[c>>0]=e>>>0>255?255+(e>>>31)|0:e,A=((c=o-f|0)>>3)+(0|a[(e=r+66|0)>>0])|0,t[e>>0]=A>>>0>255?255+(A>>>31)|0:A,o=((e=o-s|0)>>3)+(0|a[(A=r+67|0)>>0])|0,t[A>>0]=o>>>0>255?255+(o>>>31)|0:o,A=((n=(o=n-u|0)+s|0)>>3)+(0|a[(u=r+96|0)>>0])|0,t[u>>0]=A>>>0>255?255+(A>>>31)|0:A,n=((u=o+f|0)>>3)+(0|a[(A=r+97|0)>>0])|0,t[A>>0]=n>>>0>255?255+(n>>>31)|0:n,f=((A=o-f|0)>>3)+(0|a[(n=r+98|0)>>0])|0,t[n>>0]=f>>>0>255?255+(f>>>31)|0:f,f=r+99|0,s=((r=o-s|0)>>3)+(0|a[f>>0])|0,t[f>>0]=s>>>0>255?255+(s>>>31)|0:s}function ar(e,r){tr(e|=0,r|=0,1),tr(e+64|0,r+128|0,1)}function fr(e,r){r|=0;var n=0;0|i[(e|=0)>>1]&&ir(e,r),0|i[(n=e+32|0)>>1]&&ir(n,r+4|0),0|i[(n=e+64|0)>>1]&&ir(n,r+128|0),0|i[(n=e+96|0)>>1]&&ir(n,r+132|0)}function Ar(e,r,n,t,i){Cr(e|=0,r|=0,1,16,n|=0,t|=0,i|=0)}function ur(e,r,n,t,i){var o,a;pr(a=(e|=0)+(o=(r|=0)<<2)|0,r,1,16,n|=0,t|=0,i|=0),pr(e=a+o|0,r,1,16,n,t,i),pr(e+o|0,r,1,16,n,t,i)}function sr(e,r,n,t,i){Cr(e|=0,1,r|=0,16,n|=0,t|=0,i|=0)}function lr(e,r,n,t,i,o){r|=0,Cr(e|=0,n|=0,1,8,t|=0,i|=0,o|=0),Cr(r,n,1,8,t,i,o)}function cr(e,r,n,t,i,o){var a;r|=0,pr((e|=0)+(a=(n|=0)<<2)|0,n,1,8,t|=0,i|=0,o|=0),pr(r+a|0,n,1,8,t,i,o)}function dr(e,r,n){e|=0;var i,f,A,u,s,c,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0;i=(n|=0)<<1|1,n=0|l(r|=0,-2),f=0-r|0,A=0|o[2027],u=0|o[2024],s=0|o[2025],c=0|o[2026],d=0;do{b=0|a[(v=(h=e+d|0)+f|0)>>0],g=0|a[h>>0],w=(0|a[h+n>>0])-(0|a[h+r>>0])|0,((a[A+(b-g)>>0]<<2)+(0|a[A+w>>0])|0)<=(0|i)&&(m=(3*(g-b|0)|0)+(0|t[u+w>>0])|0,k=0|t[s+((w=m+4|0)>>3)>>0],w=m+3|0,t[v>>0]=0|t[c+((0|t[s+(w>>3)>>0])+b)>>0],t[h>>0]=0|t[c+(g-k)>>0]),d=d+1|0}while(16!=(0|d))}function hr(e,r,n){e|=0,r|=0;var i,f,A,u,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0;i=(n|=0)<<1|1,n=0|o[2027],f=0|o[2024],A=0|o[2025],u=0|o[2026],s=0;do{c=e+(0|l(s,r))|0,h=0|a[(d=c+-1|0)>>0],v=0|a[c>>0],b=(0|a[c+-2>>0])-(0|a[c+1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d>>3)>>0])+v)>>0],t[c>>0]=0|t[u+(m-b)>>0]),e=e+1|0}while(16!=(0|e))}function gr(e,r,n,t,i){pr(4+(e|=0)|0,1,r|=0,16,n|=0,t|=0,i|=0),pr(e+8|0,1,r,16,n,t,i),pr(e+12|0,1,r,16,n,t,i)}function wr(e,r,n,t,i,o){r|=0,Cr(e|=0,1,n|=0,8,t|=0,i|=0,o|=0),Cr(r,1,n,8,t,i,o)}function mr(e,r,n,t,i,o){r|=0,pr(4+(e|=0)|0,1,n|=0,8,t|=0,i|=0,o|=0),pr(r+4|0,1,n,8,t,i,o)}function kr(e,r,n){e|=0,r|=0;var i=0,o=0,f=0,A=0,u=0,s=0,l=0;if(1!=(0|(n|=0)))for(f=r,r=0,i=e;o=((e=(0|a[i>>0])-120|0)>>4)+(0|a[f>>0])|0,t[f>>0]=o>>>0>255?255+(o>>>31)|0:o,A=((o=(0|a[i+1>>0])-120|0)>>4)+(0|a[(e=f+1|0)>>0])|0,t[e>>0]=A>>>0>255?255+(A>>>31)|0:A,o=((A=(0|a[i+2>>0])-120|0)>>4)+(0|a[(e=f+2|0)>>0])|0,t[e>>0]=o>>>0>255?255+(o>>>31)|0:o,A=((o=(0|a[i+3>>0])-120|0)>>4)+(0|a[(e=f+3|0)>>0])|0,t[e>>0]=A>>>0>255?255+(A>>>31)|0:A,o=((A=(0|a[i+4>>0])-120|0)>>4)+(0|a[(e=f+4|0)>>0])|0,t[e>>0]=o>>>0>255?255+(o>>>31)|0:o,A=((o=(0|a[i+5>>0])-120|0)>>4)+(0|a[(e=f+5|0)>>0])|0,t[e>>0]=A>>>0>255?255+(A>>>31)|0:A,o=((A=(0|a[i+6>>0])-120|0)>>4)+(0|a[(e=f+6|0)>>0])|0,t[e>>0]=o>>>0>255?255+(o>>>31)|0:o,A=((o=(0|a[i+7>>0])-120|0)>>4)+(0|a[(e=f+7|0)>>0])|0,t[e>>0]=A>>>0>255?255+(A>>>31)|0:A,8!=(0|(r=r+1|0));)f=f+n|0,i=i+8|0;else for(i=r,o=0,f=e,A=0|t[r+6>>0];s=((u=(0|a[f>>0])-120|0)>>4)+(0|a[i>>0])|0,t[i>>0]=s>>>0>255?255+(s>>>31)|0:s,l=((s=(0|a[f+1>>0])-120|0)>>4)+(0|a[(u=i+1|0)>>0])|0,t[u>>0]=l>>>0>255?255+(l>>>31)|0:l,s=((l=(0|a[f+2>>0])-120|0)>>4)+(0|a[(u=i+2|0)>>0])|0,t[u>>0]=s>>>0>255?255+(s>>>31)|0:s,l=((s=(0|a[f+3>>0])-120|0)>>4)+(0|a[(u=i+3|0)>>0])|0,t[u>>0]=l>>>0>255?255+(l>>>31)|0:l,s=((l=(0|a[f+4>>0])-120|0)>>4)+(0|a[(u=i+4|0)>>0])|0,t[u>>0]=s>>>0>255?255+(s>>>31)|0:s,l=((s=(0|a[f+5>>0])-120|0)>>4)+(0|a[(u=i+5|0)>>0])|0,t[u>>0]=l>>>0>255?255+(l>>>31)|0:l,u=((l=(0|a[f+6>>0])-120|0)>>4)+(255&A)|0,t[i+6>>0]=u>>>0>255?255+(u>>>31)|0:u,A=255&((s=((u=(0|a[f+7>>0])-120|0)>>4)+(0|a[(l=i+7|0)>>0])|0)>>>0>255?255+(s>>>31)|0:s),t[l>>0]=A,8!=(0|(o=o+1|0));)i=i+n|0,f=f+8|0}function pr(e,r,n,i,f,A,u){e|=0,r|=0,n|=0,A|=0,u|=0;var s,c,d,h,v,b,g,w,m,k,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0;if(s=(f|=0)<<1|1,!((0|(i|=0))<=0))for(f=0|l(r,-3),c=0|l(r,-2),d=0-r|0,h=r<<1,v=3*r|0,b=0|o[2027],g=0|l(r,-4),w=0|o[2024],m=0|o[2025],k=0|o[2026],p=e,e=i;;){i=e,e=e+-1|0,C=0|a[p+f>>0],I=0|a[(y=p+c|0)>>0],D=0|a[(E=p+d|0)>>0],L=0|a[p>>0],S=0|a[(x=p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x)>>0]<<2)+(0|a[b+P>>0])|0)<=(0|s)&&(0|a[b+((0|a[p+g>>0])-y)>>0])<=(0|A)&&(0|a[b+(y-E)>>0])<=(0|A)&&(0|(R=0|a[b+(E-L)>>0]))<=(0|A)&&(0|a[b+(F-M)>>0])<=(0|A)&&(0|a[b+(M-_)>>0])<=(0|A)&&(0|(T=0|a[b+(_-x)>>0]))<=(0|A)){if(G=(3*(x-L|0)|0)+(0|t[w+P>>0])|0,(0|R)>(0|u)|(0|T)>(0|u)){R=0|t[m+((T=G+4|0)>>3)>>0],T=G+3|0,t[D>>0]=0|t[k+((0|t[m+(T>>3)>>0])+L)>>0],t[p>>0]=0|t[k+(x-R)>>0];break}T=(G=63+(27*(R=0|t[w+G>>0])|0)|0)>>7,O=(G=63+(18*R|0)|0)>>7,R=(G=63+(9*R|0)|0)>>7,t[C>>0]=0|t[k+(R+y)>>0],t[I>>0]=0|t[k+(O+E)>>0],t[D>>0]=0|t[k+(T+L)>>0],t[p>>0]=0|t[k+(x-T)>>0],t[S>>0]=0|t[k+(_-O)>>0],t[B>>0]=0|t[k+(M-R)>>0];break}}while(0);if((0|i)<=1)break;p=p+n|0}}function yr(e,r){r|=0;var n,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0;n=O,O=O+64|0,f=n,A=0|i[(e|=0)>>1],s=(u=0|i[e+16>>1])+A|0,l=A-u|0,h=((A=35468*(u=0|i[e+8>>1])|0)>>16)-(c=0|i[e+24>>1])-((d=20091*c|0)>>16)|0,c=((d=20091*u|0)>>16)+u+((A=35468*c|0)>>16)|0,o[f>>2]=c+s,o[(A=f+4|0)>>2]=h+l,o[f+8>>2]=l-h,o[f+12>>2]=s-c,c=0|i[e+2>>1],h=(s=0|i[e+18>>1])+c|0,l=c-s|0,v=((c=35468*(s=0|i[e+10>>1])|0)>>16)-(u=0|i[e+26>>1])-((d=20091*u|0)>>16)|0,c=(u=((d=20091*s|0)>>16)+s+((c=35468*u|0)>>16)|0)+h|0,o[f+16>>2]=c,o[f+20>>2]=v+l,o[f+24>>2]=l-v,o[f+28>>2]=h-u,u=0|i[e+4>>1],v=(h=0|i[e+20>>1])+u|0,l=u-h|0,b=((u=35468*(h=0|i[e+12>>1])|0)>>16)-(s=0|i[e+28>>1])-((d=20091*s|0)>>16)|0,u=(s=((d=20091*h|0)>>16)+h+((u=35468*s|0)>>16)|0)+v|0,o[f+32>>2]=u,o[f+36>>2]=b+l,o[f+40>>2]=l-b,o[f+44>>2]=v-s,s=0|i[e+6>>1],b=(v=0|i[e+22>>1])+s|0,l=s-v|0,d=((s=35468*(v=0|i[e+14>>1])|0)>>16)-(h=0|i[e+30>>1])-((e=20091*h|0)>>16)|0,s=(h=((e=20091*v|0)>>16)+v+((s=35468*h|0)>>16)|0)+b|0,o[f+48>>2]=s,v=d+l|0,o[f+52>>2]=v,o[f+56>>2]=l-d,o[f+60>>2]=b-h,b=(h=4+(0|o[f>>2])|0)+u|0,d=h-u|0,l=((u=35468*c|0)>>16)-s-((h=20091*s|0)>>16)|0,c=((u=(s=((h=20091*c|0)>>16)+c+((u=35468*s|0)>>16)|0)+b|0)>>3)+(0|a[r>>0])|0,t[r>>0]=c>>>0>255?255+(c>>>31)|0:c,h=((u=l+d|0)>>3)+(0|a[(c=r+1|0)>>0])|0,t[c>>0]=h>>>0>255?255+(h>>>31)|0:h,l=((c=d-l|0)>>3)+(0|a[(h=r+2|0)>>0])|0,t[h>>0]=l>>>0>255?255+(l>>>31)|0:l,s=((h=b-s|0)>>3)+(0|a[(l=r+3|0)>>0])|0,t[l>>0]=s>>>0>255?255+(s>>>31)|0:s,s=r+32|0,h=(l=4+(0|o[A>>2])|0)+(A=0|o[f+36>>2])|0,b=l-A|0,d=((l=35468*(A=0|o[f+20>>2])|0)>>16)-v-((c=20091*v|0)>>16)|0,A=((l=(v=((c=20091*A|0)>>16)+A+((l=35468*v|0)>>16)|0)+h|0)>>3)+(0|a[s>>0])|0,t[s>>0]=A>>>0>255?255+(A>>>31)|0:A,l=((s=d+b|0)>>3)+(0|a[(A=r+33|0)>>0])|0,t[A>>0]=l>>>0>255?255+(l>>>31)|0:l,d=((A=b-d|0)>>3)+(0|a[(l=r+34|0)>>0])|0,t[l>>0]=d>>>0>255?255+(d>>>31)|0:d,v=((l=h-v|0)>>3)+(0|a[(d=r+35|0)>>0])|0,t[d>>0]=v>>>0>255?255+(v>>>31)|0:v,v=r+64|0,h=(d=4+(0|o[f+8>>2])|0)+(l=0|o[f+40>>2])|0,A=d-l|0,c=((d=35468*(l=0|o[f+24>>2])|0)>>16)-(b=0|o[f+56>>2])-((s=20091*b|0)>>16)|0,l=((d=(b=((s=20091*l|0)>>16)+l+((d=35468*b|0)>>16)|0)+h|0)>>3)+(0|a[v>>0])|0,t[v>>0]=l>>>0>255?255+(l>>>31)|0:l,d=((v=c+A|0)>>3)+(0|a[(l=r+65|0)>>0])|0,t[l>>0]=d>>>0>255?255+(d>>>31)|0:d,c=((l=A-c|0)>>3)+(0|a[(d=r+66|0)>>0])|0,t[d>>0]=c>>>0>255?255+(c>>>31)|0:c,b=((d=h-b|0)>>3)+(0|a[(c=r+67|0)>>0])|0,t[c>>0]=b>>>0>255?255+(b>>>31)|0:b,b=r+96|0,h=(c=4+(0|o[f+12>>2])|0)+(d=0|o[f+44>>2])|0,l=c-d|0,v=((c=35468*(d=0|o[f+28>>2])|0)>>16)-(A=0|o[f+60>>2])-((f=20091*A|0)>>16)|0,d=((c=(A=((f=20091*d|0)>>16)+d+((c=35468*A|0)>>16)|0)+h|0)>>3)+(0|a[b>>0])|0,t[b>>0]=d>>>0>255?255+(d>>>31)|0:d,c=((b=v+l|0)>>3)+(0|a[(d=r+97|0)>>0])|0,t[d>>0]=c>>>0>255?255+(c>>>31)|0:c,v=((d=l-v|0)>>3)+(0|a[(c=r+98|0)>>0])|0,t[c>>0]=v>>>0>255?255+(v>>>31)|0:v,v=r+99|0,A=((r=h-A|0)>>3)+(0|a[v>>0])|0,t[v>>0]=A>>>0>255?255+(A>>>31)|0:A,O=n}function Ir(e,r,n,t){var i;if(r|=0,0==(0|(e|=0))|0==(0|(n|=0))|512!=(-256&(t|=0)|0))return 2;i=(t=n)+40|0;do{o[t>>2]=0,t=t+4|0}while((0|t)<(0|i));return 0|Er(e,r,n,n+4|0,n+8|0,n+12|0,n+16|0,0)}function Er(e,r,n,t,i,f,A,u){r|=0,n|=0,t|=0,i|=0,f|=0,A|=0,u|=0;var s,c,d,h,v,b,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0,K=0,J=0,$=0,ee=0;if(s=O,O=O+16|0,d=s,h=e|=0,o[(c=s+4|0)>>2]=0,o[d>>2]=0,b=(v=0!=(0|u))?0|o[u+8>>2]:0,0==(0|e)|r>>>0<12)return O=s,7;if(0|Hr(e,8828,4))k=r,p=h,C=0,y=0;else{if(0|Hr(e+8|0,8833,4))return O=s,3;if(((w=(0|a[e+5>>0])<<8|0|a[e+4>>0]|((0|a[e+7>>0])<<8|0|a[e+6>>0])<<16)-12|0)>>>0>4294967274)return O=s,3;if((m=r+-12|0)>>>0<8|0!=(0|b)&w>>>0>(r+-8|0)>>>0)return O=s,7;k=m,p=e+12|0,C=w,y=1}if(0|Hr(w=p,8838,4))L=0,x=0,S=0,_=0,B=k,M=0,F=p,P=0,R=0;else{if(10!=((0|a[w+5>>0])<<8|0|a[w+4>>0]|((0|a[w+7>>0])<<8|0|a[w+6>>0])<<16|0))return O=s,3;if(k>>>0<18)return O=s,7;if(e=0|a[w+8>>0],m=1+((0|a[w+13>>0])<<8|0|a[w+12>>0]|(0|a[w+14>>0])<<16)|0,I=1+((0|a[w+16>>0])<<8|0|a[w+15>>0]|(0|a[w+17>>0])<<16)|0,E=0|l(m,I),!(D=0==(0|I))&&(0|(E>>>0)/((D?1:I)>>>0))!=(0|m))return O=s,3;if(!y)return O=s,3;L=e,x=1,S=I,_=m,B=k+-18|0,M=(D=2&e)>>>1,F=w+18|0,P=0!=(0|D),R=1}(p=0==(0|i))||(o[i>>2]=L>>>4&1),0|f&&(o[f>>2]=M),(f=0==(0|A))||(o[A>>2]=0),o[c>>2]=_,o[d>>2]=S,L=0==(0|u);e:do{if(L&R&P)ee=0;else{r:do{if(B>>>0>=4){y&0!=(0|x)?(T=F,G=25):0==(x|C|0)&&0==(0|Hr(k=F,8843,4))?(T=k,G=25):(q=B,U=F,Y=0,z=0);n:do{if(25==(0|G)){if(B>>>0<8){W=0;break r}if(!C){for(k=T,D=B,w=F,m=0,I=0;;){if((e=(0|a[k+5>>0])<<8|0|a[k+4>>0]|((0|a[k+7>>0])<<8|0|a[k+6>>0])<<16)>>>0>4294967286){g=3;break}if(E=e+9&-2,!(0|Hr(k,8848,4))){q=D,U=w,Y=m,z=I;break n}if(!(0|Hr(k,8853,4))){q=D,U=w,Y=m,z=I;break n}if(D>>>0>>0){W=I;break r}if(Q=(X=0==(0|Hr(k,8843,4)))?k+8|0:I,N=k+E|0,(V=D-E|0)>>>0<8){W=Q;break r}k=N,D=V,w=N,m=X?e:m,I=Q}return O=s,0|g}for(I=T,m=22,w=B,D=F,k=0,Q=0;;){if((e=(0|a[I+5>>0])<<8|0|a[I+4>>0]|((0|a[I+7>>0])<<8|0|a[I+6>>0])<<16)>>>0>4294967286){g=3,G=65;break}if((N=(X=e+9&-2)+m|0)>>>0>C>>>0){g=3,G=65;break}if(!(0|Hr(I,8848,4))){q=w,U=D,Y=k,z=Q;break n}if(!(0|Hr(I,8853,4))){q=w,U=D,Y=k,z=Q;break n}if(w>>>0>>0){W=Q;break r}if(E=(V=0==(0|Hr(I,8843,4)))?I+8|0:Q,j=I+X|0,(H=w-X|0)>>>0<8){W=E;break r}I=j,m=N,w=H,D=j,k=V?e:k,Q=E}if(65==(0|G))return O=s,0|g}}while(0);if(D=1&(k=0==(0|Hr(Q=U,8853,4))),!(q>>>0<8)){if(k|0==(0|Hr(Q,8848,4))){if(C>>>0>11&(k=(0|a[Q+5>>0])<<8|0|a[Q+4>>0]|((0|a[Q+7>>0])<<8|0|a[Q+6>>0])<<16)>>>0>(C+-12|0)>>>0)return O=s,3;if(0!=(0|b)&k>>>0>(w=q+-8|0)>>>0){W=z;break}Z=w,K=Q+8|0,J=k,$=D}else Z=q,K=U,J=q,$=0|Dr(Q,q);if(J>>>0>4294967286)return O=s,3;if(f|0!=(0|M)||(o[A>>2]=0==(0|$)?1:2),$){if(Z>>>0<5){W=z;break}if(!(0|xr(K,Z,c,d,i)))return O=s,3}else{if(Z>>>0<10){W=z;break}if(!(0|Lr(K,Z,J,c,d)))return O=s,3}if(0|x&&((0|_)!=(0|o[c>>2])||(0|S)!=(0|o[d>>2])))return O=s,3;if(!v){ee=z;break e}o[u>>2]=h,o[u+4>>2]=r,o[(Q=u+8|0)>>2]=0,o[Q+4>>2]=0,o[u+16>>2]=z,o[u+20>>2]=Y,o[u+24>>2]=J,o[u+28>>2]=C,o[u+32>>2]=$,o[u+12>>2]=K-h,ee=z;break e}W=z}else W=0}while(0);if(!(L&0!=(0|x)))return O=s,7;ee=W}}while(0);return p||(o[i>>2]=o[i>>2]|0!=(0|ee)),0|n&&(o[n>>2]=o[c>>2]),t?(o[t>>2]=o[d>>2],O=s,0|(g=0)):(O=s,0|(g=0))}function Dr(e,r){return e|=0,(r|=0)>>>0<=4?0:47!=(0|t[e>>0])?0:0|(0|a[e+4>>0])<32&1}function Lr(e,r,n,i,f){var A,u,s;return n|=0,i|=0,f|=0,0==(0|(e|=0))|(r|=0)>>>0<10?0:-99!=(0|t[e+3>>0])?0:1!=(0|t[e+4>>0])?0:42!=(0|t[e+5>>0])?0:(r=0|a[e>>0],A=a[e+1>>0]<<8|r|a[e+2>>0]<<16,u=a[e+7>>0]<<8&16128|a[e+6>>0],s=a[e+9>>0]<<8&16128|a[e+8>>0],16==(25&r|0)&A>>>5>>>0>>0?0==(0|u)|0==(0|s)?0:(0|i&&(o[i>>2]=u),f?(o[f>>2]=s,1):1):0)}function xr(e,r,n,i,f){n|=0,i|=0,f|=0;var A,u,s=0,l=0;return A=O,O=O+32|0,u=A,0==(0|(e|=0))|(r|=0)>>>0<5?(O=A,0):47!=(0|t[e>>0])?(O=A,0):(0|a[e+4>>0])>31?(O=A,0):(pe(u,e,r),47==(0|ne(u,8))&&(r=1+(0|ne(u,14))|0,e=1+(0|ne(u,14))|0,s=0|ne(u,1),0==(0|ne(u,3)))&&0==(0|o[u+24>>2])?(0|n&&(o[n>>2]=r),0|i&&(o[i>>2]=e),f?(o[f>>2]=s,l=1):l=1):l=0,O=A,0|l)}function Sr(e,r){r|=0;var n,f,A,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0;if(!(e|=0))return 0;if(o[e>>2]=0,o[(n=e+8|0)>>2]=8858,!r)return o[e>>2]=2,o[n>>2]=8861,o[e+4>>2]=0,0;if(u=0|o[r+64>>2],(s=0|o[r+60>>2])>>>0<4)return o[e>>2]=7,o[n>>2]=8898,o[e+4>>2]=0,0;if(l=0|a[u>>0],c=a[u+1>>0]<<8|l|a[u+2>>0]<<16,f=255&(1&l^1),t[(A=e+40|0)>>0]=f,d=l>>>1&7,t[e+41>>0]=d,h=l>>>4&1,t[e+42>>0]=h,l=c>>>5,o[(c=e+44|0)>>2]=l,(255&d)>3)return o[e>>2]=3,o[n>>2]=8916,o[e+4>>2]=0,0;if(!(h<<24>>24))return o[e>>2]=4,o[n>>2]=8947,o[e+4>>2]=0,0;h=u+3|0,d=s+-3|0;do{if(f<<24>>24){if(d>>>0<7)return o[e>>2]=7,o[n>>2]=8970,o[e+4>>2]=0,0;if(-99==(0|t[h>>0])&&1==(0|t[u+4>>0])&&42==(0|t[u+5>>0])){m=a[(w=u+7|0)>>0]<<8&16128|a[u+6>>0],i[e+48>>1]=m,k=0|t[w>>0],t[e+52>>0]=(255&k)>>>6,w=a[(k=u+9|0)>>0]<<8&16128|a[u+8>>0],i[e+50>>1]=w,p=0|t[k>>0],t[e+53>>0]=(255&p)>>>6,p=m+15|0,o[e+288>>2]=p>>>4,p=w+15|0,o[e+292>>2]=p>>>4,o[r>>2]=m,o[r+4>>2]=w,o[r+72>>2]=0,o[r+84>>2]=0,o[r+76>>2]=0,o[r+80>>2]=m,o[r+88>>2]=w,o[r+92>>2]=0,o[r+96>>2]=m,o[r+100>>2]=w,o[r+12>>2]=m,o[r+16>>2]=w,Rr(e+904|0),o[e+104>>2]=0,o[e+108>>2]=0,o[e+112>>2]=1,o[e+116>>2]=0,o[e+120>>2]=0,v=u+10|0,b=s+-10|0,g=0|o[c>>2];break}return o[e>>2]=3,o[n>>2]=8998,o[e+4>>2]=0,0}v=h,b=d,g=l}while(0);if(g>>>0>b>>>0)return 0|o[e>>2]?0:(o[e>>2]=7,o[n>>2]=9012,o[e+4>>2]=0,0);if(Tr(s=e+12|0,v,g),c=v+(g=0|o[c>>2])|0,u=b-g|0,0|t[A>>0]&&(g=255&(0|Gr(s,1)),t[e+54>>0]=g,g=255&(0|Gr(s,1)),t[e+55>>0]=g),g=0|Gr(s,1),o[e+104>>2]=g,g?(g=0|Gr(s,1),o[(r=e+108|0)>>2]=g,0|Gr(s,1)&&(g=0|Gr(s,1),o[e+112>>2]=g,C=0|Gr(s,1)?255&(0|Or(s,7)):0,t[e+116>>0]=C,y=0|Gr(s,1)?255&(0|Or(s,7)):0,t[e+117>>0]=y,I=0|Gr(s,1)?255&(0|Or(s,7)):0,t[e+118>>0]=I,E=0|Gr(s,1)?255&(0|Or(s,7)):0,t[e+119>>0]=E,D=0|Gr(s,1)?255&(0|Or(s,6)):0,t[e+120>>0]=D,L=0|Gr(s,1)?255&(0|Or(s,6)):0,t[e+121>>0]=L,x=0|Gr(s,1)?255&(0|Or(s,6)):0,t[e+122>>0]=x,S=0|Gr(s,1)?255&(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if(Tr(e+316+(28*b|0)|0,R,P),R>>>0>>0)return qr(e),0|t[A>>0]?(Gr(s,1),Ur(s,e),o[e+4>>2]=1,1):0|o[e>>2]?0:(o[e>>2]=4,o[n>>2]=9112,o[e+4>>2]=0,0);T=5}else T=7;return 0|o[e>>2]?0:(o[e>>2]=T,o[n>>2]=9088,o[e+4>>2]=0,0)}function _r(e,r){e|=0;var n,i,f,A,u,s,d,h,v,b,g,w,m,k,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0,K=0,J=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,fe=0,Ae=0,ue=0,se=0,le=0,ce=0,de=0,he=0,ve=0,be=0,ge=0,we=0,me=0,ke=0,pe=0,Ce=0,ye=0,Ie=0,Ee=0,De=0,Le=0,xe=0,Se=0,_e=0,Be=0,Me=0,Fe=0,Pe=0,Re=0,Te=0,Ge=0,Oe=0;if((0|o[(n=288+(r|=0)|0)>>2])<=0)return 0|1&0==(0|o[(r+36|0)>>2]);i=r+2244|0,f=r+2248|0,A=r+2304|0,u=r+108|0,s=r+2236|0,d=r+904|0,h=e+4|0,v=e+8|0,b=r+2240|0,g=e+12|0,w=e+20|0,m=r+906|0,k=r+905|0,p=0;do{if(C=(0|o[i>>2])+(p<<2)|0,y=0|o[A>>2],0|o[u>>2]){E=0|a[d>>0],D=0|o[h>>2],L=0|o[v>>2];do{if((0|L)<0){if((x=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){S=a[x>>0]|a[x+1>>0]<<8|a[x+2>>0]<<16|a[x+3>>0]<<24,o[g>>2]=x+3,x=0|yn(0|S),o[e>>2]=o[e>>2]<<24|x>>>8,x=L+24|0,o[v>>2]=x,_=x;break}Pr(e),_=0|o[v>>2];break}_=L}while(0);if(x=(L=0|l(D,E))>>>8,L=0|o[e>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B+1<>2]=E,L=(Q<>2]=L,t[y+(800*p|0)+797>>0]=1&D,z=E,W=L}else z=0|o[v>>2],W=0|o[h>>2];do{if((0|z)<0){if((L=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){E=a[L>>0]|a[L+1>>0]<<8|a[L+2>>0]<<16|a[L+3>>0]<<24,o[g>>2]=L+3,L=0|yn(0|E),o[e>>2]=o[e>>2]<<24|L>>>8,L=z+24|0,o[v>>2]=L,N=L;break}Pr(e),N=0|o[v>>2];break}N=z}while(0);if(x=(S=145*W|0)>>>8,S=0|o[e>>2],(L=(N?S>>>N:S)>>>0>x>>>0)?(E=S-(x+1<>2]=E,V=W-x|0,j=E):(V=x+1|0,j=S),x=N-(S=24^(0|c(0|V)))|0,o[v>>2]=x,E=(V<>2]=E,t[y+(800*p|0)+768>>0]=1&(1^L),L){do{if((0|x)<0){if((L=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){S=a[L>>0]|a[L+1>>0]<<8|a[L+2>>0]<<16|a[L+3>>0]<<24,o[g>>2]=L+3,S=(L=0|yn(0|S))>>>8|j<<24,o[e>>2]=S,L=x+24|0,o[v>>2]=L,H=S,Z=L;break}Pr(e),H=0|o[e>>2],Z=0|o[v>>2];break}H=j,Z=x}while(0);if((x=(Z?H>>>Z:H)>>>0>(L=(x=156*E|0)>>>8)>>>0)?(S=H-(L+1<>2]=S,K=E-L|0,J=S):(K=L+1|0,J=H),S=Z-(L=24^(0|c(0|K)))|0,o[v>>2]=S,D=(K<>2]=D,L=(0|S)<0,x){do{if(L){if((x=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){B=a[x>>0]|a[x+1>>0]<<8|a[x+2>>0]<<16|a[x+3>>0]<<24,o[g>>2]=x+3,B=(x=0|yn(0|B))>>>8|J<<24,o[e>>2]=B,x=S+24|0,o[v>>2]=x,$=B,ee=x;break}Pr(e),$=0|o[e>>2],ee=0|o[v>>2];break}$=J,ee=S}while(0);(x=(ee?$>>>ee:$)>>>0>(E=D>>>1&16777215)>>>0)?(o[e>>2]=$-(E+1<>2]=ee-E,o[h>>2]=(re<>2])>>>0<(0|o[w>>2])>>>0){E=a[x>>0]|a[x+1>>0]<<8|a[x+2>>0]<<16|a[x+3>>0]<<24,o[g>>2]=x+3,E=(x=0|yn(0|E))>>>8|J<<24,o[e>>2]=E,x=S+24|0,o[v>>2]=x,te=E,ie=x;break}Pr(e),te=0|o[e>>2],ie=0|o[v>>2];break}te=J,ie=S}while(0);(S=(ie?te>>>ie:te)>>>0>(L=(S=163*D|0)>>>8)>>>0)?(o[e>>2]=te-(L+1<>2]=ie-L,o[h>>2]=(oe<>0]=S,Dn(0|C,0|S,4),Dn(0|f,0|S,4)}else for(S=y+(800*p|0)+769|0,L=0;;){E=0,B=0|a[(x=r+2248+L|0)>>0];do{ae=0|a[(P=C+E|0)>>0],fe=0|a[4144+(90*ae|0)+(9*B|0)>>0],Ae=0|o[h>>2],ue=0|o[v>>2];do{if((0|ue)<0){if((se=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){le=a[se>>0]|a[se+1>>0]<<8|a[se+2>>0]<<16|a[se+3>>0]<<24,o[g>>2]=se+3,se=0|yn(0|le),o[e>>2]=o[e>>2]<<24|se>>>8,se=ue+24|0,o[v>>2]=se,ce=se;break}Pr(e),ce=0|o[v>>2];break}ce=ue}while(0);if(se=(ue=0|l(Ae,fe))>>>8,ue=0|o[e>>2],de=1&(le=(ce?ue>>>ce:ue)>>>0>se>>>0),le?(le=ue-(se+1<>2]=le,he=Ae-se|0,ve=le):(he=se+1|0,ve=ue),se=ce-(ue=24^(0|c(0|he)))|0,o[v>>2]=se,le=(he<>2]=le,ue=0|t[5056+de>>0],1&(de?41706>>>de:41706)){for(de=ue,ue=se,se=ve,ge=le;;){le=de<<1,we=0|a[4144+(90*ae|0)+(9*B|0)+de>>0];do{if((0|ue)<0){if((me=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){ke=a[me>>0]|a[me+1>>0]<<8|a[me+2>>0]<<16|a[me+3>>0]<<24,o[g>>2]=me+3,ke=(me=0|yn(0|ke))>>>8|se<<24,o[e>>2]=ke,me=ue+24|0,o[v>>2]=me,pe=ke,Ce=me;break}Pr(e),pe=0|o[e>>2],Ce=0|o[v>>2];break}pe=se,Ce=ue}while(0);if((me=(Ce?pe>>>Ce:pe)>>>0>(ke=(me=0|l(ge,we))>>>8)>>>0)?(ye=pe-(ke+1<>2]=ye,Ie=ge-ke|0,Ee=ye):(Ie=ke+1|0,Ee=pe),ue=Ce-(ke=24^(0|c(0|Ie)))|0,o[v>>2]=ue,ge=(Ie<>2]=ge,De=0|t[5056+(ke=le|1&me)>>0],!(1&(ke?41706>>>ke:41706)))break;de=De<<24>>24,se=Ee}be=De<<24>>24}else be=ue;Le=255&(B=0-be|0),t[P>>0]=Le,E=E+1|0}while(4!=(0|E));if(E=a[C>>0]|a[C+1>>0]<<8|a[C+2>>0]<<16|a[C+3>>0]<<24,t[S>>0]=E,t[S+1>>0]=E>>8,t[S+2>>0]=E>>16,t[S+3>>0]=E>>24,t[x>>0]=Le,4==(0|(L=L+1|0)))break;S=S+4|0}S=0|o[h>>2],L=0|o[v>>2];do{if((0|L)<0){if((C=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){D=a[C>>0]|a[C+1>>0]<<8|a[C+2>>0]<<16|a[C+3>>0]<<24,o[g>>2]=C+3,C=0|yn(0|D),o[e>>2]=o[e>>2]<<24|C>>>8,C=L+24|0,o[v>>2]=C,xe=C;break}Pr(e),xe=0|o[v>>2];break}xe=L}while(0);if(C=(L=142*S|0)>>>8,L=0|o[e>>2],(D=(xe?L>>>xe:L)>>>0>C>>>0)?(E=L-(C+1<>2]=E,Se=S-C|0,_e=E):(Se=C+1|0,_e=L),C=xe-(L=24^(0|c(0|Se)))|0,o[v>>2]=C,E=(Se<>2]=E,D){do{if((0|C)<0){if((D=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){L=a[D>>0]|a[D+1>>0]<<8|a[D+2>>0]<<16|a[D+3>>0]<<24,o[g>>2]=D+3,L=(D=0|yn(0|L))>>>8|_e<<24,o[e>>2]=L,D=C+24|0,o[v>>2]=D,Be=L,Me=D;break}Pr(e),Be=0|o[e>>2],Me=0|o[v>>2];break}Be=_e,Me=C}while(0);if((C=(Me?Be>>>Me:Be)>>>0>(S=(C=114*E|0)>>>8)>>>0)?(D=Be-(S+1<>2]=D,Fe=E-S|0,Pe=D):(Fe=S+1|0,Pe=Be),D=Me-(S=24^(0|c(0|Fe)))|0,o[v>>2]=D,L=(Fe<>2]=L,C){do{if((0|D)<0){if((C=0|o[g>>2])>>>0<(0|o[w>>2])>>>0){S=a[C>>0]|a[C+1>>0]<<8|a[C+2>>0]<<16|a[C+3>>0]<<24,o[g>>2]=C+3,S=(C=0|yn(0|S))>>>8|Pe<<24,o[e>>2]=S,C=D+24|0,o[v>>2]=C,Re=S,Te=C;break}Pr(e),Re=0|o[e>>2],Te=0|o[v>>2];break}Re=Pe,Te=D}while(0);(D=(Te?Re>>>Te:Re)>>>0>(E=(D=183*L|0)>>>8)>>>0)?(o[e>>2]=Re-(E+1<>2]=Te-E,o[h>>2]=(Ge<>0]=Oe,p=p+1|0}while((0|p)<(0|o[n>>2]));return 0|1&0==(0|o[(r+36|0)>>2])}function Br(e,r){r|=0;var n,f,A,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0;if(n=O,O=O+32|0,u=n,f=(s=0|o[2256+(e|=0)>>2])+((c=0|o[(l=e+2296|0)>>2])<<1)|0,A=0|o[e+2304>>2],0!=(0|o[e+2236>>2])&&(h=255&(d=0|t[A+(800*c|0)+797>>0]),d<<24>>24!=0))t[f>>0]=0,t[s+-2>>0]=0,0|t[A+(800*c|0)+768>>0]||(t[s+(c<<1)+1>>0]=0,t[s+-1>>0]=0),o[A+(800*c|0)+788>>2]=0,o[A+(800*c|0)+792>>2]=0,t[A+(800*c|0)+796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,o[a+44>>2]=p,e=y+C|0,o[a+28>>2]=e,w=C-y|0,o[a+60>>2]=w,y=v+l|0,C=l-v|0,v=(a=A+3|0)-m|0,m=y+(A=a+m|0)|0,i[r>>1]=m>>>3,m=C+v|0,i[r+32>>1]=m>>>3,m=A-y|0,i[r+64>>1]=m>>>3,m=v-C|0,i[r+96>>1]=m>>>3,C=k+b|0,v=b-k|0,k=(m=3+(0|o[c>>2])|0)-e|0,e=C+(c=m+e|0)|0,i[r+128>>1]=e>>>3,e=v+k|0,i[r+160>>1]=e>>>3,e=c-C|0,i[r+192>>1]=e>>>3,e=k-v|0,i[r+224>>1]=e>>>3,f=(e=3+(0|o[f>>2])|0)+p|0,d=g+(v=0|o[d>>2])|0,k=v-g|0,g=e-p|0,p=d+f|0,i[r+256>>1]=p>>>3,p=k+g|0,i[r+288>>1]=p>>>3,p=f-d|0,i[r+320>>1]=p>>>3,p=g-k|0,i[r+352>>1]=p>>>3,u=(p=3+(0|o[u>>2])|0)+w|0,k=0|o[s>>2],h=(s=0|o[h>>2])+k|0,g=k-s|0,s=p-w|0,w=h+u|0,i[r+384>>1]=w>>>3,w=g+s|0,i[r+416>>1]=w>>>3,w=u-h|0,i[r+448>>1]=w>>>3,w=s-g|0,i[r+480>>1]=w>>>3,O=n}(u,h):(u=(w=3+(0|i[u>>1])|0)>>3&65535,i[A+(800*c|0)>>1]=u,i[A+(800*c|0)+32>>1]=u,i[A+(800*c|0)+64>>1]=u,i[A+(800*c|0)+96>>1]=u,i[A+(800*c|0)+128>>1]=u,i[A+(800*c|0)+160>>1]=u,i[A+(800*c|0)+192>>1]=u,i[A+(800*c|0)+224>>1]=u,i[A+(800*c|0)+256>>1]=u,i[A+(800*c|0)+288>>1]=u,i[A+(800*c|0)+320>>1]=u,i[A+(800*c|0)+352>>1]=u,i[A+(800*c|0)+384>>1]=u,i[A+(800*c|0)+416>>1]=u,i[A+(800*c|0)+448>>1]=u,i[A+(800*c|0)+480>>1]=u),k=1,p=0),u=e+1964+(68*p|0)|0,p=s+-2|0,s=e+776+(d<<5)|0,w=h,h=15&t[f>>0],m=15&t[p>>0],b=0,g=0;C=255&m,y=255&h,y=(E=(0|(I=0|On[1&o[2549]](r,u,(1&C)+(1&y)|0,s,k,w)))>(0|k)&1)<<7|(D=y>>>1),L=0!=(0|i[w>>1])&1,x=w+32|0,y=(E=(0|(S=0|On[1&o[2549]](r,u,(1&D)+E|0,s,k,x)))>(0|k)&1)<<7|(D=y>>>1),_=((0|S)>3?3:(0|S)>1?2:0!=(0|i[x>>1])&1)|((0|I)>3?12:(0|I)>1?8:L<<2),L=w+64|0,E=(0|(I=0|On[1&o[2549]](r,u,(1&D)+E|0,s,k,L)))>(0|k)&1,D=y>>>1,y=((0|I)>3?3:(0|I)>1?2:0!=(0|i[L>>1])&1)|_<<2,_=w+96|0,L=E<<7|224&D,h=(255&(D=255&((E=((0|(I=0|On[1&o[2549]](r,u,(1&D)+E|0,s,k,_)))>(0|k)&1)<<7)|L>>>1)))>>>4,B=E|C>>>1,b=y<<2|b<<8|((0|I)>3?3:(0|I)>1?2:0!=(0|i[_>>1])&1),4!=(0|(g=g+1|0));)w=w+128|0,m=255&B;m=A+(800*c|0)+512|0,w=e+2100|0,g=e+776+(d<<5)+16|0,k=0|a[f>>0],s=0|a[p>>0],_=(0|(u=0|On[1&o[2549]](r,w,(s>>>4&1)+(k>>>4&1)|0,g,0,m)))>0&1,I=0!=(0|i[m>>1])&1,m=A+(800*c|0)+544|0,k=(0|(y=0|On[1&o[2549]](r,w,(k>>>5&1)+_|0,g,0,m)))>0&1,C=((0|y)>3?3:(0|y)>1?2:0!=(0|i[m>>1])&1)|((0|u)>3?12:(0|u)>1?8:I<<2),I=A+(800*c|0)+576|0,_=(0|(u=0|On[1&o[2549]](r,w,(s>>>5&1)+_|0,g,0,I)))>0&1,s=((0|u)>3?3:(0|u)>1?2:0!=(0|i[I>>1])&1)|C<<2,C=A+(800*c|0)+608|0,u=(0|(I=0|On[1&o[2549]](r,w,_+k|0,g,0,C)))>0&1,m=((0|I)>3?3:(0|I)>1?2:0!=(0|i[C>>1])&1)|s<<2,s=A+(800*c|0)+640|0,C=0|a[f>>0],I=0|a[p>>0],E=(0|(y=0|On[1&o[2549]](r,w,(I>>>6&1)+(C>>>6&1)|0,g,0,s)))>0&1,D=0!=(0|i[s>>1])&1,s=A+(800*c|0)+672|0,C=(0|(L=0|On[1&o[2549]](r,w,(C>>>7)+E|0,g,0,s)))>0&1,x=((0|L)>3?3:(0|L)>1?2:0!=(0|i[s>>1])&1)|((0|y)>3?12:(0|y)>1?8:D<<2),D=A+(800*c|0)+704|0,E=(0|(y=0|On[1&o[2549]](r,w,(I>>>7)+E|0,g,0,D)))>0&1,I=((0|y)>3?3:(0|y)>1?2:0!=(0|i[D>>1])&1)|x<<2,x=A+(800*c|0)+736|0,g=(0|(D=0|On[1&o[2549]](r,w,E+C|0,g,0,x)))>0&1,w=m|(((0|D)>3?3:(0|D)>1?2:0!=(0|i[x>>1])&1)|I<<2)<<8,t[f>>0]=(u<<1|_)<<4|255&h|(g<<1|E)<<6,t[p>>0]=k<<4|B>>>4|u<<5|C<<6|g<<7,o[A+(800*c|0)+788>>2]=b,o[A+(800*c|0)+792>>2]=w,M=43690&w?0:255&o[e+776+(d<<5)+28>>2],t[A+(800*c|0)+796>>0]=M,v=0==(w|b|0)&1}return(0|o[e+2308>>2])<=0?(F=0|o[(r+24|0)>>2],O=n,0|1&0==(0|F)):(l=(b=0|o[e+2260>>2])+((w=0|o[l>>2])<<2)|0,M=e+2312+(a[A+(800*c|0)+798>>0]<<3)+(a[A+(800*c|0)+768>>0]<<2)|0,c=a[M>>0]|a[M+1>>0]<<8|a[M+2>>0]<<16|a[M+3>>0]<<24,t[l>>0]=c,t[l+1>>0]=c>>8,t[l+2>>0]=c>>16,t[l+3>>0]=c>>24,t[(c=b+(w<<2)+2|0)>>0]=a[c>>0]|0==(0|v),F=0|o[(r+24|0)>>2],O=n,0|1&0==(0|F))}function Mr(e,r,n){e|=0,r|=0;var i=0,a=0,f=0;if(!((0|(n|=0))<=0)){i=0;do{f=1081344+(6420*(255&(a=0|o[e+(i<<2)>>2]))|0)+(16839*(a>>>16&255)|0)+(33059*(a>>>8&255)|0)|0,t[r+i>>0]=f>>>16,i=i+1|0}while((0|i)!=(0|n))}}function Fr(e,r,n,i,f){e|=0,r|=0,n|=0,f|=0;var A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0;if(A=(i|=0)>>1,(0|i)>1)if(f)for(u=0;;){if(h=0|o[e+((v=u<<1)<<2)>>2],v=((d=0|o[e+((1|v)<<2)>>2])>>>15&510)+(h>>>15&510)|0,c=(d<<1&510)+(h<<1&510)|0,b=(d=33685504+(h=(0|l(s=(d>>>7&510)+(h>>>7&510)|0,-19081))+(0|l(v,-9719))+(28800*c|0)|0)|0)>>18,v=(c=33685504+(d=(0|l(s,-24116))+(28800*v|0)+(0|l(c,-4684))|0)|0)>>18,t[r+u>>0]=b>>>0<256?b:(0|h)<-33685504?0:255,t[n+u>>0]=v>>>0<256?v:(0|d)<-33685504?0:255,!((0|(d=u+1|0))<(0|A))){g=d;break}u=d}else for(u=0;;){if(c=0|o[e+((s=u<<1)<<2)>>2],s=((d=0|o[e+((1|s)<<2)>>2])>>>15&510)+(c>>>15&510)|0,v=(d<<1&510)+(c<<1&510)|0,b=(d=33685504+(c=(0|l(h=(d>>>7&510)+(c>>>7&510)|0,-19081))+(0|l(s,-9719))+(28800*v|0)|0)|0)>>18,s=(v=33685504+(d=(0|l(h,-24116))+(28800*s|0)+(0|l(v,-4684))|0)|0)>>18,h=(b>>>0<256?b:(0|c)<-33685504?0:255)+1+(0|a[(v=r+u|0)>>0])|0,t[v>>0]=h>>>1,v=(s>>>0<256?s:(0|d)<-33685504?0:255)+1+(0|a[(h=n+u|0)>>0])|0,t[h>>0]=v>>>1,!((0|(v=u+1|0))<(0|A))){g=v;break}u=v}else g=0;if(1&i)return e=(i=0|o[e+(g<<1<<2)>>2])>>>14&1020,A=i<<2&1020,d=(v=(d=33685504+(i=(0|l(u=i>>>6&1020,-19081))+(0|l(e,-9719))+(28800*A|0)|0)|0)>>18)>>>0<256?v:(0|i)<-33685504?0:255,A=(e=(A=33685504+(i=(0|l(u,-24116))+(28800*e|0)+(0|l(A,-4684))|0)|0)>>18)>>>0<256?e:(0|i)<-33685504?0:255,f?(t[r+g>>0]=d,void(t[n+g>>0]=A)):(i=d+1+(0|a[(f=r+g|0)>>0])|0,t[f>>0]=i>>>1,f=A+1+(0|a[(i=n+g|0)>>0])|0,void(t[i>>0]=f>>>1))}function Pr(e){var r=0,n=0,t=0;return(n=0|o[(r=12+(e|=0)|0)>>2])>>>0<(0|o[e+16>>2])>>>0?(o[(t=e+8|0)>>2]=8+(0|o[t>>2]),o[r>>2]=n+1,void(o[e>>2]=o[e>>2]<<8|0|a[n>>0])):0|o[(n=e+24|0)>>2]?void(o[e+8>>2]=0):(o[e>>2]=o[e>>2]<<8,o[(r=e+8|0)>>2]=8+(0|o[r>>2]),void(o[n>>2]=1))}function Rr(e){i[(e|=0)>>1]=65535,t[e+2>>0]=255}function Tr(e,r,n){r|=0,n|=0;var t,i,f,A=0,u=0;return o[4+(e|=0)>>2]=254,o[e>>2]=0,o[(t=e+8|0)>>2]=-8,o[(i=e+24|0)>>2]=0,o[(f=e+12|0)>>2]=r,A=r+n|0,o[e+16>>2]=A,u=n>>>0>3?A+-4+1|0:r,o[e+20>>2]=u,u>>>0>r>>>0?(u=a[r>>0]|a[r+1>>0]<<8|a[r+2>>0]<<16|a[r+3>>0]<<24,o[f>>2]=r+3,A=0|yn(0|u),o[e>>2]=A>>>8,void(o[t>>2]=16)):(0|n)>0?(o[t>>2]=0,o[f>>2]=r+1,void(o[e>>2]=a[r>>0])):(o[e>>2]=0,o[t>>2]=0,void(o[i>>2]=1))}function Gr(e,r){var n,t,i,f,A,u,s=0,l=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0;if((0|(r|=0))<=0)return 0;for(n=4+(e|=0)|0,i=e+12|0,f=e+20|0,A=e+16|0,u=e+24|0,l=0,d=r,r=0|o[(t=e+8|0)>>2],h=0|o[n>>2];;){v=d,d=d+-1|0;do{if((0|r)<0){if((b=0|o[i>>2])>>>0<(0|o[f>>2])>>>0){g=a[b>>0]|a[b+1>>0]<<8|a[b+2>>0]<<16|a[b+3>>0]<<24,o[i>>2]=b+3,w=0|yn(0|g),o[e>>2]=o[e>>2]<<24|w>>>8,w=r+24|0,o[t>>2]=w,m=w;break}if(b>>>0<(0|o[A>>2])>>>0){w=r+8|0,o[t>>2]=w,o[i>>2]=b+1,o[e>>2]=o[e>>2]<<8|0|a[b>>0],m=w;break}if(0|o[u>>2]){o[t>>2]=0,m=0;break}o[e>>2]=o[e>>2]<<8,w=r+8|0,o[t>>2]=w,o[u>>2]=1,m=w;break}m=r}while(0);if(w=h>>>1&16777215,b=0|o[e>>2],(g=(m?b>>>m:b)>>>0>w>>>0)?(o[e>>2]=b-(w+1<>2]=r,h=(k<>2]=h,w=(1&g)<>2]),h=0;do{i?h?(o[(g=e+776+(h<<5)|0)>>2]=o[n>>2],o[g+4>>2]=o[n+4>>2],o[g+8>>2]=o[n+8>>2],o[g+12>>2]=o[n+12>>2],o[g+16>>2]=o[n+16>>2],o[g+20>>2]=o[n+20>>2],o[g+24>>2]=o[n+24>>2],o[g+28>>2]=o[n+28>>2]):(v=r,b=16):(v=(0==(0|o[d>>2])?r:0)+(0|t[e+116+h>>0])|0,b=16),16==(0|b)&&(b=0,w=(0|(g=v+A|0))<127?g:127,o[e+776+(h<<5)>>2]=a[7200+((0|w)>0?w:0)>>0],w=(0|v)<127?v:127,o[e+776+(h<<5)+4>>2]=f[7328+(((0|w)>0?w:0)<<1)>>1],g=(0|(w=v+u|0))<127?w:127,o[e+776+(h<<5)+8>>2]=a[7200+((0|g)>0?g:0)>>0]<<1,g=101581*(0|f[7328+(((0|(w=(0|(g=v+s|0))<127?g:127))>0?w:0)<<1)>>1])|0,o[e+776+(h<<5)+12>>2]=g>>>0<524288?8:g>>>16,w=(0|(g=v+l|0))<117?g:117,o[e+776+(h<<5)+16>>2]=a[7200+((0|w)>0?w:0)>>0],g=(0|(w=v+c|0))<127?w:127,o[e+776+(h<<5)+20>>2]=f[7328+(((0|g)>0?g:0)<<1)>>1],o[e+776+(h<<5)+24>>2]=w),h=h+1|0}while(4!=(0|h))}function Ur(e,r){r|=0;var n,i,f,A,u=0,s=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0;n=4+(e|=0)|0,i=e+8|0,f=e+12|0,A=e+20|0,u=0;do{s=0;do{d=0;do{h=0|a[5088+(264*u|0)+(33*s|0)+d>>0],v=0|o[n>>2],b=0|o[i>>2];do{if((0|b)<0){if((g=0|o[f>>2])>>>0<(0|o[A>>2])>>>0){w=a[g>>0]|a[g+1>>0]<<8|a[g+2>>0]<<16|a[g+3>>0]<<24,o[f>>2]=g+3,g=0|yn(0|w),o[e>>2]=o[e>>2]<<24|g>>>8,g=b+24|0,o[i>>2]=g,m=g;break}Pr(e),m=0|o[i>>2];break}m=b}while(0);g=(b=0|l(v,h))>>>8,b=0|o[e>>2],(w=(m?b>>>m:b)>>>0>g>>>0)?(o[e>>2]=b-(g+1<>2]=m-g,o[n>>2]=(k<>0],t[r+907+(264*u|0)+(33*s|0)+d>>0]=p,d=d+1|0}while(11!=(0|d));d=0;do{w=0|a[5088+(264*u|0)+(33*s|0)+11+d>>0],g=0|o[n>>2],b=0|o[i>>2];do{if((0|b)<0){if((C=0|o[f>>2])>>>0<(0|o[A>>2])>>>0){y=a[C>>0]|a[C+1>>0]<<8|a[C+2>>0]<<16|a[C+3>>0]<<24,o[f>>2]=C+3,C=0|yn(0|y),o[e>>2]=o[e>>2]<<24|C>>>8,C=b+24|0,o[i>>2]=C,I=C;break}Pr(e),I=0|o[i>>2];break}I=b}while(0);v=(b=0|l(g,w))>>>8,b=0|o[e>>2],(h=(I?b>>>I:b)>>>0>v>>>0)?(o[e>>2]=b-(v+1<>2]=I-v,o[n>>2]=(E<>0],t[r+907+(264*u|0)+(33*s|0)+11+d>>0]=D,d=d+1|0}while(11!=(0|d));d=0;do{h=0|a[5088+(264*u|0)+(33*s|0)+22+d>>0],v=0|o[n>>2],b=0|o[i>>2];do{if((0|b)<0){if((C=0|o[f>>2])>>>0<(0|o[A>>2])>>>0){y=a[C>>0]|a[C+1>>0]<<8|a[C+2>>0]<<16|a[C+3>>0]<<24,o[f>>2]=C+3,C=0|yn(0|y),o[e>>2]=o[e>>2]<<24|C>>>8,C=b+24|0,o[i>>2]=C,L=C;break}Pr(e),L=0|o[i>>2];break}L=b}while(0);g=(b=0|l(v,h))>>>8,b=0|o[e>>2],(w=(L?b>>>L:b)>>>0>g>>>0)?(o[e>>2]=b-(g+1<>2]=L-g,o[n>>2]=(x<>0],t[r+907+(264*u|0)+(33*s|0)+22+d>>0]=S,d=d+1|0}while(11!=(0|d));s=s+1|0}while(8!=(0|s));s=r+907+(264*u|0)|0,o[r+1964+(68*u|0)>>2]=s,o[r+1964+(68*u|0)+4>>2]=r+907+(264*u|0)+33,o[r+1964+(68*u|0)+8>>2]=r+907+(264*u|0)+66,o[r+1964+(68*u|0)+12>>2]=r+907+(264*u|0)+99,d=r+907+(264*u|0)+198|0,o[r+1964+(68*u|0)+16>>2]=d,o[r+1964+(68*u|0)+20>>2]=r+907+(264*u|0)+132,o[r+1964+(68*u|0)+24>>2]=r+907+(264*u|0)+165,o[r+1964+(68*u|0)+28>>2]=d,o[r+1964+(68*u|0)+32>>2]=d,o[r+1964+(68*u|0)+36>>2]=d,o[r+1964+(68*u|0)+40>>2]=d,o[r+1964+(68*u|0)+44>>2]=d,o[r+1964+(68*u|0)+48>>2]=d,o[r+1964+(68*u|0)+52>>2]=d,o[r+1964+(68*u|0)+56>>2]=d,o[r+1964+(68*u|0)+60>>2]=r+907+(264*u|0)+231,o[r+1964+(68*u|0)+64>>2]=s,u=u+1|0}while(4!=(0|u));u=0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]=m,!b)return 2;b=0|a[r+5>>0];do{if((0|d)<0){if((k=0|o[(w=e+12|0)>>2])>>>0<(0|o[e+20>>2])>>>0){h=a[k>>0]|a[k+1>>0]<<8|a[k+2>>0]<<16|a[k+3>>0]<<24,o[w>>2]=k+3,h=p<<24|(k=0|yn(0|h))>>>8,o[e>>2]=h,k=d+24|0,o[f>>2]=k,C=h,y=k;break}Pr(e),C=0|o[e>>2],y=0|o[f>>2];break}C=p,y=d}while(0);return(d=(y?C>>>y:C)>>>0>(b=(d=0|l(m,b))>>>8)>>>0)?(o[e>>2]=C-(b+1<>2]=y-b,o[n>>2]=(I<>0];do{if((0|A)<0){if((I=0|o[(b=e+12|0)>>2])>>>0<(0|o[e+20>>2])>>>0){y=a[I>>0]|a[I+1>>0]<<8|a[I+2>>0]<<16|a[I+3>>0]<<24,o[b>>2]=I+3,y=g<<24|(I=0|yn(0|y))>>>8,o[e>>2]=y,I=A+24|0,o[f>>2]=I,E=y,D=I;break}Pr(e),E=0|o[e>>2],D=0|o[f>>2];break}E=g,D=A}while(0);if((A=(D?E>>>D:E)>>>0>(d=(A=0|l(v,d))>>>8)>>>0)?(g=E-(d+1<>2]=g,L=v-d|0,x=g):(L=d+1|0,x=E),d=D-(E=24^(0|c(0|L)))|0,o[f>>2]=d,D=(L<>2]=D,A){A=0|a[r+8>>0];do{if((0|d)<0){if((L=0|o[(E=e+12|0)>>2])>>>0<(0|o[e+20>>2])>>>0){g=a[L>>0]|a[L+1>>0]<<8|a[L+2>>0]<<16|a[L+3>>0]<<24,o[E>>2]=L+3,g=x<<24|(L=0|yn(0|g))>>>8,o[e>>2]=g,L=d+24|0,o[f>>2]=L,S=g,_=L;break}Pr(e),S=0|o[e>>2],_=0|o[f>>2];break}S=x,_=d}while(0);g=1&(L=(_?S>>>_:S)>>>0>(A=(L=0|l(D,A))>>>8)>>>0),L?(E=S-(A+1<<_)|0,o[e>>2]=E,B=D-A|0,M=E):(B=A+1|0,M=S),A=_-(S=24^(0|c(0|B)))|0,o[f>>2]=A,_=(B<>2]=_,S=0|a[r+(L?10:9)>>0];do{if((0|A)<0){if((B=0|o[(L=e+12|0)>>2])>>>0<(0|o[e+20>>2])>>>0){E=a[B>>0]|a[B+1>>0]<<8|a[B+2>>0]<<16|a[B+3>>0]<<24,o[L>>2]=B+3,E=M<<24|(B=0|yn(0|E))>>>8,o[e>>2]=E,B=A+24|0,o[f>>2]=B,F=E,P=B;break}Pr(e),F=0|o[e>>2],P=0|o[f>>2];break}F=M,P=A}while(0);if((A=(P?F>>>P:F)>>>0>(S=(A=0|l(_,S))>>>8)>>>0)?(M=F-(S+1<>2]=M,R=_-S|0,T=M):(R=S+1|0,T=F),S=P-(F=24^(0|c(0|R)))|0,o[f>>2]=S,P=(R<>2]=P,A=0|o[7600+((F=g<<1|1&A)<<2)>>2],(g=0|t[A>>0])<<24>>24)for(R=e+12|0,M=e+20|0,_=A,A=0,B=g,g=S,S=T,T=P;;){P=255&B;do{if((0|g)<0){if((E=0|o[R>>2])>>>0<(0|o[M>>2])>>>0){L=a[E>>0]|a[E+1>>0]<<8|a[E+2>>0]<<16|a[E+3>>0]<<24,o[R>>2]=E+3,L=S<<24|(E=0|yn(0|L))>>>8,o[e>>2]=L,E=g+24|0,o[f>>2]=E,O=L,q=E;break}Pr(e),O=0|o[e>>2],q=0|o[f>>2];break}O=S,q=g}while(0);if((E=(q?O>>>q:O)>>>0>(L=(E=0|l(T,P))>>>8)>>>0)?(v=O-(L+1<>2]=v,U=T-L|0,Y=v):(U=L+1|0,Y=O),g=q-(L=24^(0|c(0|U)))|0,o[f>>2]=g,T=(U<>2]=T,L=A<<1|1&E,!((B=0|t[(_=_+1|0)>>0])<<24>>24)){G=L;break}A=L,S=Y}else G=0;return 0|G+(8<>0];do{if((0|d)<0){if((G=0|o[(r=e+12|0)>>2])>>>0<(0|o[e+20>>2])>>>0){Y=a[G>>0]|a[G+1>>0]<<8|a[G+2>>0]<<16|a[G+3>>0]<<24,o[r>>2]=G+3,Y=x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))>>>8,o[e>>2]=z,K=Q+24|0,o[f>>2]=K,$=z,ee=K;break}Pr(e),$=0|o[e>>2],ee=0|o[f>>2];break}$=J,ee=Q}while(0);return(Q=(ee?$>>>ee:$)>>>0>(J=(Q=145*Z|0)>>>8)>>>0)?(o[e>>2]=$-(J+1<>2]=ee-J,o[n>>2]=(re<>2]?0:(o[e>>2]=2,o[e+8>>2]=9156,o[e+4>>2]=0,0);if(0==(0|o[(n=e+4|0)>>2])&&0==(0|Sr(e,r)))return 0;if(!(0|er(e,r))){e:do{if(0|rr(e,r)){o[(a=e+2300|0)>>2]=0,f=e+308|0;r:do{if((0|o[f>>2])>0){A=e+312|0,u=e+12|0,s=e+2296|0,l=e+288|0,c=e+2256|0,d=e+2248|0,h=0;n:for(;;){if(v=e+316+(28*(o[A>>2]&h)|0)|0,!(0|_r(u,e))){b=12;break}if((0|o[s>>2])<(0|o[l>>2]))do{if(!(0|Br(e,v))){b=17;break n}g=1+(0|o[s>>2])|0,o[s>>2]=g}while((0|g)<(0|o[l>>2]));if(v=0|o[c>>2],t[v+-2>>0]=0,t[v+-1>>0]=0,o[d>>2]=0,o[s>>2]=0,!(0|Ze(e,r))){b=21;break}if(h=1+(0|o[a>>2])|0,o[a>>2]=h,(0|h)>=(0|o[f>>2]))break r}if(12==(0|b)){if(0|o[e>>2]){i=0;break e}o[e>>2]=7,o[e+8>>2]=9193,o[n>>2]=0,i=0;break e}if(17==(0|b)){if(0|o[e>>2]){i=0;break e}o[e>>2]=7,o[e+8>>2]=9234,o[n>>2]=0,i=0;break e}if(21==(0|b)){if(0|o[e>>2]){i=0;break e}o[e>>2]=6,o[e+8>>2]=9269,o[n>>2]=0,i=0;break e}}}while(0);if((0|o[e+148>>2])>0&&0==(0|Rn[7&o[(f=8148)>>2]](e+124|0))){i=0;break}i=1}else i=0}while(0);if(0|(b=(0|function(e,r){r|=0;var n;return n=(0|o[148+(e|=0)>>2])>0?0|Rn[7&o[2037]](e+124|0):1,(e=0|o[r+52>>2])?(qn[31&e](r),0|n):0|n}(e,r))&i))return o[n>>2]=0,0|b}return qn[31&o[(b=8160)>>2]](e+124|0),q(e),U(0|o[(b=e+2288|0)>>2]),o[b>>2]=0,o[e+2292>>2]=0,o[(b=e+12|0)>>2]=0,o[b+4>>2]=0,o[b+8>>2]=0,o[b+12>>2]=0,o[b+16>>2]=0,o[b+20>>2]=0,o[b+24>>2]=0,o[n>>2]=0,0}function Wr(e,r,n){e|=0,r|=0,n|=0;var t,i,a,f=0,A=0,u=0,s=0,c=0,d=0,h=0,b=0,g=0;if(t=O,O=O+160|0,f=t+148|0,A=t+144|0,i=t+36|0,o[(a=t)>>2]=e,o[(u=a+4|0)>>2]=r,o[a+8>>2]=1,o[A>>2]=0,s=0|Er(e,r,0,0,0,A,0,a),o[f>>2]=s,0|o[f>>2]?7==(0|o[f>>2])&0!=(0|o[A>>2])&&(c=4):0|o[A>>2]&&(c=4),4==(0|c)&&(o[f>>2]=4),0|(c=0|o[f>>2]))return O=t,0|c;if(j(i,520),c=0|o[a+12>>2],o[i+64>>2]=(0|o[a>>2])+c,o[i+60>>2]=(0|o[u>>2])-c,H(n,i),0|o[a+32>>2]){if(!(h=0|function(){var e;return(e=0|N(1,0,272))?(o[e>>2]=0,o[e+4>>2]=2,ke(),0|e):0}()))return O=t,1;g=0|function(e,r){var n,t=0,i=0;return(e|=0)?(r|=0)?(o[e+8>>2]=r,o[e>>2]=0,pe(n=e+24|0,0|o[r+64>>2],0|o[r+60>>2]),47==(0|ne(n,8))&&(t=1+(0|ne(n,14))|0,i=1+(0|ne(n,14))|0,ne(n,1),0==(0|ne(n,3)))&&0==(0|o[e+48>>2])?(o[e+4>>2]=2,o[r>>2]=t,o[r+4>>2]=i,0|Ce(t,i,1,e,0)?1:(z(e),0)):(o[e>>2]=3,z(e),0)):(o[e>>2]=2,0):0}(h,i)?(c=0|Ye(0|o[i>>2],0|o[i+4>>2],0|o[n+20>>2],0|o[n>>2]))||(0|function(e){var r,n,t,i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0;if(!(e|=0))return 0;r=0|o[e+8>>2],n=0|o[r+40>>2],t=e+4|0;e:do{if(0|o[t>>2]){if(o[(u=e+12|0)>>2]=o[n>>2],!(0|Me(0|o[n+20>>2],r,3))){o[e>>2]=2;break}if(s=0|o[r>>2],c=0|o[(l=e+100|0)>>2],b=0|vn(0|(h=0|o[(d=e+104|0)>>2]),((0|h)<0)<<31>>31|0,0|c,((0|c)<0)<<31>>31|0),c=0|v(),h=65535&s,s=0|bn(0|(g=0|Cn(0|s,((0|s)<0)<<31>>31|0,4)),0|v(),0|h,0),c=0|V(g=0|bn(0|s,0|v(),0|b,0|c),0|v(),4),o[(g=e+16|0)>>2]=c,!c){o[e>>2]=1,o[e+20>>2]=0;break}o[e+20>>2]=c+(b<<2)+(h<<2),h=r+92|0;do{if(0|o[h>>2]){if(b=0|o[r+12>>2],c=0|o[r+96>>2],s=0|o[r+16>>2],w=0|o[r+100>>2],p=0|bn(0|(k=0|Cn(0|c,0|(m=((0|c)<0)<<31>>31),5)),0|v(),84,0),C=0|V(m=0|bn(0|p,0|v(),0|(C=0|Cn(0|c,0|m,2)),0|v()),0|v(),1)){if(o[e+264>>2]=C,o[e+268>>2]=C,Pe(C,b,s,(m=C+84|0)+k|0,c,w,0,4,m),0|o[h>>2]){A=13;break}A=12;break}o[e>>2]=1;break e}A=12}while(0);if(12==(0|A)&&(((h=0|o[o[u>>2]>>2])-7|0)>>>0>3?y=h:A=13),13==(0|A)&&($(),y=0|o[o[u>>2]>>2]),y>>>0>10&&(o[2042]=0,0|o[28+(0|o[u>>2])>>2])&&$(),0|o[e+56>>2]&&(0|o[e+120>>2])>0&&0==(0|o[(h=e+136|0)>>2])&&0==(0|Ee(h,0|o[e+132>>2]))){o[e>>2]=1;break}o[t>>2]=0,i=g,a=l,f=d,A=23}else i=e+16|0,a=e+100|0,f=e+104|0,A=23}while(0);return 23==(0|A)&&0|te(e,0|o[i>>2],0|o[a>>2],0|o[f>>2],0|o[r+88>>2],2)?(o[n+16>>2]=o[e+116>>2],1):(z(e),0)}(h)?0:0|o[h>>2]):0|o[h>>2],Y(h),b=g}else{if(!(c=0|function(){var e;return(e=0|N(1,0,2376))?(o[e>>2]=0,o[e+8>>2]=8858,qn[31&o[2035]](e+124|0),o[e+4>>2]=0,o[e+312>>2]=0,0|o[2549]?0|e:(o[2549]=1,0|e)):0|e}()))return O=t,1;o[c+2348>>2]=o[a+16>>2],o[c+2352>>2]=o[a+20>>2],0|Sr(c,i)?(u=i+4|0,f=n+20|0,(A=0|Ye(0|o[i>>2],0|o[u>>2],0|o[f>>2],0|o[n>>2]))?h=A:(s=0|function(e,r,n,t){return n|=0,(e|=0)?0|(0==(0|o[e+40>>2])?0:(0|n)>511?2:0):0}(0|o[f>>2],0,0|o[i>>2],o[u>>2]),o[c+148>>2]=s,je(0|o[f>>2],c),h=0|zr(c,i)?0:0|o[c>>2])):h=0|o[c>>2],function(e){var r=0;(e|=0)&&(qn[31&o[(r=8160)>>2]](e+124|0),q(e),U(0|o[(r=e+2288|0)>>2]),o[r>>2]=0,o[e+2292>>2]=0,o[(r=e+12|0)>>2]=0,o[r+4>>2]=0,o[r+8>>2]=0,o[r+12>>2]=0,o[r+16>>2]=0,o[r+20>>2]=0,o[r+24>>2]=0,o[e+4>>2]=0,U(e))}(c),b=h}return 0|b?(Xe(0|o[n>>2]),O=t,0|(d=b)):(b=0|o[n+20>>2])&&0|o[b+48>>2]?(d=0|function(e){var r,n,t=0,i=0,a=0,f=0;return(e|=0)?(r=(0|o[e+8>>2])-1|0,(0|o[e>>2])>>>0<=10?(i=0|o[(t=e+20|0)>>2],a=0|l(i,r),o[(f=e+16|0)>>2]=(0|o[f>>2])+a,o[t>>2]=0-i,0):(t=0|o[(i=e+32|0)>>2],a=0|l(t,r),o[(f=e+16|0)>>2]=(0|o[f>>2])+a,o[i>>2]=0-t,t=r>>1,a=0|o[(i=e+36|0)>>2],f=0|l(a,t),o[(n=e+20|0)>>2]=(0|o[n>>2])+f,o[i>>2]=0-a,i=0|o[(a=e+40|0)>>2],f=0|l(i,t),o[(t=e+24|0)>>2]=(0|o[t>>2])+f,o[a>>2]=0-i,(a=0|o[(i=e+28|0)>>2])?(e=0|o[(f=e+44|0)>>2],t=a+(0|l(e,r))|0,o[i>>2]=t,o[f>>2]=0-e,0):0)):2}(0|o[n>>2]),O=t,0|d):(O=t,0|(d=0))}function Xr(e,r,n){e|=0,r|=0;var t,i,a,f=0,A=0,u=0,s=0,l=0,c=0,d=0;if(t=O,O=O+144|0,i=t+88|0,a=t,!(n|=0))return O=t,2;e:do{if(e){s=(u=n)+40|0;do{o[u>>2]=0,u=u+4|0}while((0|u)<(0|s));switch(0|(c=0|Er(e,r,n,l=n+4|0,n+8|0,n+12|0,n+16|0,0))){case 0:break;case 7:return O=t,3;default:A=c;break e}s=52+(u=i+4|0)|0;do{o[u>>2]=0,u=u+4|0}while((0|u)<(0|s));return o[i+20>>2]=n+124,u=n+40|0,o[i>>2]=u,0|Ve(u,n)?(We(a,520),o[a>>2]=o[u>>2],o[a+4>>2]=o[n>>2],o[a+8>>2]=o[l>>2],o[i>>2]=a,d=(s=0|Wr(e,r,i))||0|Qe(a,u),Xe(a),O=t,0|(f=d)):(f=0|Wr(e,r,i),O=t,0|f)}A=2}while(0);return O=t,0|A}function Qr(e){e|=0;var r,n=0,t=0,i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0,K=0,J=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,fe=0,Ae=0,ue=0,se=0,le=0,ce=0,de=0,he=0,ve=0,be=0,ge=0,we=0,me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2]))break;w=s}f=w,A=(s=(g=(-8&o[w+4>>2])-t|0)>>>0>>0)?w:A,d=s?g:d}if((f=A+t|0)>>>0>A>>>0){g=0|o[A+24>>2],s=0|o[A+12>>2];do{if((0|s)==(0|A)){if(l=0|o[(u=A+20|0)>>2])C=l,y=u;else{if(!(k=0|o[(m=A+16|0)>>2])){p=0;break}C=k,y=m}for(u=C,l=y;;){if(k=0|o[(m=u+20|0)>>2])D=k,L=m;else{if(!(E=0|o[(I=u+16|0)>>2]))break;D=E,L=I}u=D,l=L}o[l>>2]=0,p=u}else m=0|o[A+8>>2],o[m+12>>2]=s,o[s+8>>2]=m,p=s}while(0);do{if(0|g){if(s=0|o[A+28>>2],(0|A)==(0|o[(m=10504+(s<<2)|0)>>2])){if(o[m>>2]=p,!p){o[2551]=i&~(1<>2])==(0|A)?s:g+20|0)>>2]=p,!p)break;o[p+24>>2]=g,0|(s=0|o[A+16>>2])&&(o[p+16>>2]=s,o[s+24>>2]=p),0|(s=0|o[A+20>>2])&&(o[p+20>>2]=s,o[s+24>>2]=p)}}while(0);return d>>>0<16?(g=d+t|0,o[A+4>>2]=3|g,o[(i=A+g+4|0)>>2]=1|o[i>>2]):(o[A+4>>2]=3|t,o[f+4>>2]=1|d,o[f+d>>2]=d,0|c&&(i=0|o[2555],s=10240+((g=c>>>3)<<1<<2)|0,(m=1<>2],S=m):(o[2550]=m|a,x=s,S=s+8|0),o[S>>2]=i,o[x+12>>2]=i,o[i+8>>2]=x,o[i+12>>2]=s),o[2552]=d,o[2555]=f),O=r,0|A+8}_=t}else _=t}else _=t}else if(e>>>0<=4294967231)if(i=-8&(s=e+11|0),m=0|o[2551]){g=0-i|0,B=(k=s>>>8)?i>>>0>16777215?31:1&((s=7+(k=14-((E=(k=520192+(s=k<<(I=(s=k+1048320|0)>>>16&8))|0)>>>16&4)|I|(M=(s=245760+(k=s<>>16&2))+((s=k<>>15)|0)|0)?i>>>s:i)|k<<1:0,k=0|o[10504+(B<<2)>>2];e:do{if(k)for(s=0,M=g,I=k,E=i<<(31==(0|B)?0:25-(B>>>1)|0),G=0;;){if((q=(-8&o[I+4>>2])-i|0)>>>0>>0){if(!q){U=I,Y=0,z=I,T=65;break e}W=I,X=q}else W=s,X=M;if(Q=0==(0|(q=0|o[I+20>>2]))|(0|q)==(0|(I=0|o[I+16+(E>>>31<<2)>>2]))?G:q,!I){F=Q,P=W,R=X,T=61;break}s=W,M=X,E<<=1,G=Q}else F=0,P=0,R=g,T=61}while(0);if(61==(0|T)){if(0==(0|F)&0==(0|P)){if(!(g=((k=2<>>12&16)?k>>>g:k)>>>5&8)|g|(t=(A=k?t>>>k:t)>>>2&4)|(A=(f=t?A>>>t:A)>>>1&2)|(f=(d=A?f>>>A:f)>>>1&1))+(f?d>>>f:d)<<2)>>2]}else N=P,V=F;V?(U=N,Y=R,z=V,T=65):(j=N,H=R)}if(65==(0|T))for(d=U,f=Y,A=z;;){if(k=(g=(t=(-8&o[A+4>>2])-i|0)>>>0>>0)?t:f,t=g?A:d,!(Z=(g=0|o[A+16>>2])||0|o[A+20>>2])){j=t,H=k;break}d=t,f=k,A=Z}if(0!=(0|j)&&H>>>0<((0|o[2552])-i|0)>>>0&&(A=j+i|0)>>>0>j>>>0){f=0|o[j+24>>2],d=0|o[j+12>>2];do{if((0|d)==(0|j)){if(t=0|o[(k=j+20|0)>>2])J=t,$=k;else{if(!(a=0|o[(g=j+16|0)>>2])){K=0;break}J=a,$=g}for(k=J,t=$;;){if(a=0|o[(g=k+20|0)>>2])ee=a,re=g;else{if(!(G=0|o[(c=k+16|0)>>2]))break;ee=G,re=c}k=ee,t=re}o[t>>2]=0,K=k}else g=0|o[j+8>>2],o[g+12>>2]=d,o[d+8>>2]=g,K=d}while(0);do{if(f){if(d=0|o[j+28>>2],(0|j)==(0|o[(g=10504+(d<<2)|0)>>2])){if(o[g>>2]=K,!K){g=m&~(1<>2])==(0|j)?g:f+20|0)>>2]=K,!K){ne=m;break}o[K+24>>2]=f,0|(g=0|o[j+16>>2])&&(o[K+16>>2]=g,o[g+24>>2]=K),(g=0|o[j+20>>2])?(o[K+20>>2]=g,o[g+24>>2]=K,ne=m):ne=m}else ne=m}while(0);e:do{if(H>>>0<16)m=H+i|0,o[j+4>>2]=3|m,o[(f=j+m+4|0)>>2]=1|o[f>>2];else{if(o[j+4>>2]=3|i,o[A+4>>2]=1|H,o[A+H>>2]=H,f=H>>>3,H>>>0<256){m=10240+(f<<1<<2)|0,(g=0|o[2550])&(d=1<>2],ie=d):(o[2550]=g|d,te=m,ie=m+8|0),o[ie>>2]=A,o[te+12>>2]=A,o[A+8>>2]=te,o[A+12>>2]=m;break}if(oe=(m=H>>>8)?H>>>0>16777215?31:1&((d=7+(m=14-((f=(m=520192+(d=m<<(g=(d=m+1048320|0)>>>16&8))|0)>>>16&4)|g|(a=(d=245760+(m=d<>>16&2))+((d=m<>>15)|0)|0)?H>>>d:H)|m<<1:0,m=10504+(oe<<2)|0,o[A+28>>2]=oe,o[4+(d=A+16|0)>>2]=0,o[d>>2]=0,!(ne&(d=1<>2]=A,o[A+24>>2]=m,o[A+12>>2]=A,o[A+8>>2]=A;break}d=0|o[m>>2];r:do{if((-8&o[d+4>>2]|0)!=(0|H)){for(m=H<<(31==(0|oe)?0:25-(oe>>>1)|0),a=d;g=0|o[(fe=a+16+(m>>>31<<2)|0)>>2];){if((-8&o[g+4>>2]|0)==(0|H)){ae=g;break r}m<<=1,a=g}o[fe>>2]=A,o[A+24>>2]=a,o[A+12>>2]=A,o[A+8>>2]=A;break e}ae=d}while(0);k=0|o[(d=ae+8|0)>>2],o[k+12>>2]=A,o[d>>2]=A,o[A+8>>2]=k,o[A+12>>2]=ae,o[A+24>>2]=0}}while(0);return O=r,0|j+8}_=i}else _=i;else _=-1}while(0);if((j=0|o[2552])>>>0>=_>>>0)return ae=j-_|0,fe=0|o[2555],ae>>>0>15?(H=fe+_|0,o[2555]=H,o[2552]=ae,o[H+4>>2]=1|ae,o[fe+j>>2]=ae,o[fe+4>>2]=3|_):(o[2552]=0,o[2555]=0,o[fe+4>>2]=3|j,o[(ae=fe+j+4|0)>>2]=1|o[ae>>2]),O=r,0|fe+8;if((fe=0|o[2553])>>>0>_>>>0)return ae=fe-_|0,o[2553]=ae,H=(j=0|o[2556])+_|0,o[2556]=H,o[H+4>>2]=1|ae,o[j+4>>2]=3|_,O=r,0|j+8;if(0|o[2668]?Ae=0|o[2670]:(o[2670]=4096,o[2669]=4096,o[2671]=-1,o[2672]=-1,o[2673]=0,o[2661]=0,o[2668]=-16&n^1431655768,Ae=4096),n=_+48|0,(Ae=(ae=Ae+(j=_+47|0)|0)&(H=0-Ae|0))>>>0<=_>>>0)return O=r,0;if(0|(oe=0|o[2660])&&(te=(ne=0|o[2658])+Ae|0)>>>0<=ne>>>0|te>>>0>oe>>>0)return O=r,0;e:do{if(4&o[2661])he=0,T=143;else{oe=0|o[2556];r:do{if(oe){for(te=10648;!((ne=0|o[te>>2])>>>0<=oe>>>0&&(ne+(0|o[te+4>>2])|0)>>>0>oe>>>0);){if(!(ne=0|o[te+8>>2])){T=128;break r}te=ne}if((ne=ae-fe&H)>>>0<2147483647)if((0|(ie=0|Ln(0|ne)))==((0|o[te>>2])+(0|o[te+4>>2])|0)){if(-1!=(0|ie)){se=ne,le=ie,T=145;break e}ue=ne}else ce=ie,de=ne,T=136;else ue=0}else T=128}while(0);do{if(128==(0|T))if(-1!=(0|(oe=0|Ln(0)))&&(i=oe,ne=(K=(0==((ie=(ne=0|o[2669])-1|0)&i|0)?0:(ie+i&0-ne)-i|0)+Ae|0)+(i=0|o[2658])|0,K>>>0>_>>>0&K>>>0<2147483647)){if(0|(ie=0|o[2660])&&ne>>>0<=i>>>0|ne>>>0>ie>>>0){ue=0;break}if((0|(ie=0|Ln(0|K)))==(0|oe)){se=K,le=oe,T=145;break e}ce=ie,de=K,T=136}else ue=0}while(0);do{if(136==(0|T)){if(K=0-de|0,!(n>>>0>de>>>0&de>>>0<2147483647&-1!=(0|ce))){if(-1==(0|ce)){ue=0;break}se=de,le=ce,T=145;break e}if((oe=j-de+(ie=0|o[2670])&0-ie)>>>0>=2147483647){se=de,le=ce,T=145;break e}if(-1==(0|Ln(0|oe))){Ln(0|K),ue=0;break}se=oe+de|0,le=ce,T=145;break e}}while(0);o[2661]=4|o[2661],he=ue,T=143}}while(0);if(143==(0|T)&&Ae>>>0<2147483647&&!(-1==(0|(ue=0|Ln(0|Ae)))|1^(de=(ce=(Ae=0|Ln(0))-ue|0)>>>0>(_+40|0)>>>0)|ue>>>0>>0&-1!=(0|ue)&-1!=(0|Ae)^1)&&(se=de?ce:he,le=ue,T=145),145==(0|T)){ue=(0|o[2658])+se|0,o[2658]=ue,ue>>>0>(0|o[2659])>>>0&&(o[2659]=ue),ue=0|o[2556];e:do{if(ue){for(he=10648;;){if((0|le)==((ve=0|o[he>>2])+(be=0|o[he+4>>2])|0)){T=154;break}if(!(ce=0|o[he+8>>2]))break;he=ce}if(154==(0|T)&&(ce=he+4|0,0==(8&o[he+12>>2]|0))&&le>>>0>ue>>>0&ve>>>0<=ue>>>0){o[ce>>2]=be+se,de=ue+(Ae=0==(7&(de=ue+8|0)|0)?0:0-de&7)|0,j=(ce=(0|o[2553])+se|0)-Ae|0,o[2556]=de,o[2553]=j,o[de+4>>2]=1|j,o[ue+ce+4>>2]=40,o[2557]=o[2672];break}for(le>>>0<(0|o[2554])>>>0&&(o[2554]=le),ce=le+se|0,j=10648;;){if((0|o[j>>2])==(0|ce)){T=162;break}if(!(de=0|o[j+8>>2]))break;j=de}if(162==(0|T)&&0==(8&o[j+12>>2]|0)){o[j>>2]=le,o[(he=j+4|0)>>2]=(0|o[he>>2])+se,de=le+(0==(7&(he=le+8|0)|0)?0:0-he&7)|0,Ae=ce+(0==(7&(he=ce+8|0)|0)?0:0-he&7)|0,he=de+_|0,n=Ae-de-_|0,o[de+4>>2]=3|_;r:do{if((0|ue)==(0|Ae))H=(0|o[2553])+n|0,o[2553]=H,o[2556]=he,o[he+4>>2]=1|H;else{if((0|o[2555])==(0|Ae)){H=(0|o[2552])+n|0,o[2552]=H,o[2555]=he,o[he+4>>2]=1|H,o[he+H>>2]=H;break}if(1==(3&(H=0|o[Ae+4>>2])|0)){fe=-8&H,ae=H>>>3;n:do{if(H>>>0<256){if(oe=0|o[Ae+8>>2],(0|(K=0|o[Ae+12>>2]))==(0|oe)){o[2550]=o[2550]&~(1<>2]=K,o[K+8>>2]=oe;break}oe=0|o[Ae+24>>2],K=0|o[Ae+12>>2];do{if((0|K)==(0|Ae)){if(i=0|o[(ne=4+(ie=Ae+16|0)|0)>>2])we=i,me=ne;else{if(!(re=0|o[ie>>2])){ge=0;break}we=re,me=ie}for(ne=we,i=me;;){if(re=0|o[(ie=ne+20|0)>>2])ke=re,pe=ie;else{if(!($=0|o[(ee=ne+16|0)>>2]))break;ke=$,pe=ee}ne=ke,i=pe}o[i>>2]=0,ge=ne}else ie=0|o[Ae+8>>2],o[ie+12>>2]=K,o[K+8>>2]=ie,ge=K}while(0);if(!oe)break;a=10504+((K=0|o[Ae+28>>2])<<2)|0;do{if((0|o[a>>2])==(0|Ae)){if(o[a>>2]=ge,0|ge)break;o[2551]=o[2551]&~(1<>2])==(0|Ae)?ie:oe+20|0)>>2]=ge,!ge)break n}while(0);if(o[ge+24>>2]=oe,0|(a=0|o[(K=Ae+16|0)>>2])&&(o[ge+16>>2]=a,o[a+24>>2]=ge),!(a=0|o[K+4>>2]))break;o[ge+20>>2]=a,o[a+24>>2]=ge}while(0);Ce=Ae+fe|0,ye=fe+n|0}else Ce=Ae,ye=n;if(o[(ae=Ce+4|0)>>2]=-2&o[ae>>2],o[he+4>>2]=1|ye,o[he+ye>>2]=ye,ae=ye>>>3,ye>>>0<256){H=10240+(ae<<1<<2)|0,(te=0|o[2550])&(a=1<>2],Ee=a):(o[2550]=te|a,Ie=H,Ee=H+8|0),o[Ee>>2]=he,o[Ie+12>>2]=he,o[he+8>>2]=Ie,o[he+12>>2]=H;break}H=ye>>>8;do{if(H){if(ye>>>0>16777215){De=31;break}De=1&((a=7+(ae=14-((K=(ae=520192+(a=H<<(te=(a=H+1048320|0)>>>16&8))|0)>>>16&4)|te|(ie=(a=245760+(ae=a<>>16&2))+((a=ae<>>15)|0)|0)?ye>>>a:ye)|ae<<1}else De=0}while(0);if(H=10504+(De<<2)|0,o[he+28>>2]=De,o[4+(fe=he+16|0)>>2]=0,o[fe>>2]=0,!((fe=0|o[2551])&(ae=1<>2]=he,o[he+24>>2]=H,o[he+12>>2]=he,o[he+8>>2]=he;break}ae=0|o[H>>2];n:do{if((-8&o[ae+4>>2]|0)!=(0|ye)){for(H=ye<<(31==(0|De)?0:25-(De>>>1)|0),fe=ae;a=0|o[(xe=fe+16+(H>>>31<<2)|0)>>2];){if((-8&o[a+4>>2]|0)==(0|ye)){Le=a;break n}H<<=1,fe=a}o[xe>>2]=he,o[he+24>>2]=fe,o[he+12>>2]=he,o[he+8>>2]=he;break r}Le=ae}while(0);H=0|o[(ae=Le+8|0)>>2],o[H+12>>2]=he,o[ae>>2]=he,o[he+8>>2]=H,o[he+12>>2]=Le,o[he+24>>2]=0}}while(0);return O=r,0|de+8}for(he=10648;!((n=0|o[he>>2])>>>0<=ue>>>0&&(Se=n+(0|o[he+4>>2])|0)>>>0>ue>>>0);)he=0|o[he+8>>2];n=(he=(n=(he=Se+-47|0)+(0==(7&(de=he+8|0)|0)?0:0-de&7)|0)>>>0<(de=ue+16|0)>>>0?ue:n)+8|0,ce=le+(j=0==(7&(ce=le+8|0)|0)?0:0-ce&7)|0,H=(Ae=se+-40|0)-j|0,o[2556]=ce,o[2553]=H,o[ce+4>>2]=1|H,o[le+Ae+4>>2]=40,o[2557]=o[2672],o[(Ae=he+4|0)>>2]=27,o[n>>2]=o[2662],o[n+4>>2]=o[2663],o[n+8>>2]=o[2664],o[n+12>>2]=o[2665],o[2662]=le,o[2663]=se,o[2665]=0,o[2664]=n,n=he+24|0;do{H=n,o[(n=n+4|0)>>2]=7}while((H+8|0)>>>0>>0);if((0|he)!=(0|ue)){if(n=he-ue|0,o[Ae>>2]=-2&o[Ae>>2],o[ue+4>>2]=1|n,o[he>>2]=n,H=n>>>3,n>>>0<256){ce=10240+(H<<1<<2)|0,(j=0|o[2550])&(ae=1<>2],Be=ae):(o[2550]=j|ae,_e=ce,Be=ce+8|0),o[Be>>2]=ue,o[_e+12>>2]=ue,o[ue+8>>2]=_e,o[ue+12>>2]=ce;break}if(Me=(ce=n>>>8)?n>>>0>16777215?31:1&((ae=7+(ce=14-((H=(ce=520192+(ae=ce<<(j=(ae=ce+1048320|0)>>>16&8))|0)>>>16&4)|j|(oe=(ae=245760+(ce=ae<>>16&2))+((ae=ce<>>15)|0)|0)?n>>>ae:n)|ce<<1:0,ce=10504+(Me<<2)|0,o[ue+28>>2]=Me,o[ue+20>>2]=0,o[de>>2]=0,!((ae=0|o[2551])&(oe=1<>2]=ue,o[ue+24>>2]=ce,o[ue+12>>2]=ue,o[ue+8>>2]=ue;break}oe=0|o[ce>>2];r:do{if((-8&o[oe+4>>2]|0)!=(0|n)){for(ce=n<<(31==(0|Me)?0:25-(Me>>>1)|0),ae=oe;j=0|o[(Pe=ae+16+(ce>>>31<<2)|0)>>2];){if((-8&o[j+4>>2]|0)==(0|n)){Fe=j;break r}ce<<=1,ae=j}o[Pe>>2]=ue,o[ue+24>>2]=ae,o[ue+12>>2]=ue,o[ue+8>>2]=ue;break e}Fe=oe}while(0);oe=0|o[(n=Fe+8|0)>>2],o[oe+12>>2]=ue,o[n>>2]=ue,o[ue+8>>2]=oe,o[ue+12>>2]=Fe,o[ue+24>>2]=0}}else 0==(0|(oe=0|o[2554]))|le>>>0>>0&&(o[2554]=le),o[2662]=le,o[2663]=se,o[2665]=0,o[2559]=o[2668],o[2558]=-1,o[2563]=10240,o[2562]=10240,o[2565]=10248,o[2564]=10248,o[2567]=10256,o[2566]=10256,o[2569]=10264,o[2568]=10264,o[2571]=10272,o[2570]=10272,o[2573]=10280,o[2572]=10280,o[2575]=10288,o[2574]=10288,o[2577]=10296,o[2576]=10296,o[2579]=10304,o[2578]=10304,o[2581]=10312,o[2580]=10312,o[2583]=10320,o[2582]=10320,o[2585]=10328,o[2584]=10328,o[2587]=10336,o[2586]=10336,o[2589]=10344,o[2588]=10344,o[2591]=10352,o[2590]=10352,o[2593]=10360,o[2592]=10360,o[2595]=10368,o[2594]=10368,o[2597]=10376,o[2596]=10376,o[2599]=10384,o[2598]=10384,o[2601]=10392,o[2600]=10392,o[2603]=10400,o[2602]=10400,o[2605]=10408,o[2604]=10408,o[2607]=10416,o[2606]=10416,o[2609]=10424,o[2608]=10424,o[2611]=10432,o[2610]=10432,o[2613]=10440,o[2612]=10440,o[2615]=10448,o[2614]=10448,o[2617]=10456,o[2616]=10456,o[2619]=10464,o[2618]=10464,o[2621]=10472,o[2620]=10472,o[2623]=10480,o[2622]=10480,o[2625]=10488,o[2624]=10488,n=le+(de=0==(7&(n=le+8|0)|0)?0:0-n&7)|0,he=(oe=se+-40|0)-de|0,o[2556]=n,o[2553]=he,o[n+4>>2]=1|he,o[le+oe+4>>2]=40,o[2557]=o[2672]}while(0);if((le=0|o[2553])>>>0>_>>>0)return se=le-_|0,o[2553]=se,ue=(le=0|o[2556])+_|0,o[2556]=ue,o[ue+4>>2]=1|se,o[le+4>>2]=3|_,O=r,0|le+8}return o[(le=10696)>>2]=12,O=r,0}function Nr(e){var r,n=0,t=0,i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0;if(e|=0){n=e+-8|0,t=0|o[2554],r=n+(e=-8&(i=0|o[e+-4>>2]))|0;do{if(1&i)l=n,c=e,d=n;else{if(a=0|o[n>>2],!(3&i))return;if(A=a+e|0,(f=n+(0-a)|0)>>>0>>0)return;if((0|o[2555])==(0|f)){if(3!=(3&(s=0|o[(u=r+4|0)>>2])|0)){l=f,c=A,d=f;break}return o[2552]=A,o[u>>2]=-2&s,o[f+4>>2]=1|A,void(o[f+A>>2]=A)}if(s=a>>>3,a>>>0<256){if(a=0|o[f+8>>2],(0|(u=0|o[f+12>>2]))==(0|a)){o[2550]=o[2550]&~(1<>2]=u,o[u+8>>2]=a,l=f,c=A,d=f;break}a=0|o[f+24>>2],u=0|o[f+12>>2];do{if((0|u)==(0|f)){if(v=0|o[(h=4+(s=f+16|0)|0)>>2])w=v,m=h;else{if(!(b=0|o[s>>2])){g=0;break}w=b,m=s}for(h=w,v=m;;){if(b=0|o[(s=h+20|0)>>2])C=b,y=s;else{if(!(p=0|o[(k=h+16|0)>>2]))break;C=p,y=k}h=C,v=y}o[v>>2]=0,g=h}else s=0|o[f+8>>2],o[s+12>>2]=u,o[u+8>>2]=s,g=u}while(0);if(a){if(u=0|o[f+28>>2],(0|o[(s=10504+(u<<2)|0)>>2])==(0|f)){if(o[s>>2]=g,!g){o[2551]=o[2551]&~(1<>2])==(0|f)?u:a+20|0)>>2]=g,!g){l=f,c=A,d=f;break}o[g+24>>2]=a,0|(s=0|o[(u=f+16|0)>>2])&&(o[g+16>>2]=s,o[s+24>>2]=g),(s=0|o[u+4>>2])?(o[g+20>>2]=s,o[s+24>>2]=g,l=f,c=A,d=f):(l=f,c=A,d=f)}else l=f,c=A,d=f}}while(0);if(!(d>>>0>=r>>>0)&&1&(e=0|o[(n=r+4|0)>>2])){if(2&e)o[n>>2]=-2&e,o[l+4>>2]=1|c,o[d+c>>2]=c,S=c;else{if((0|o[2556])==(0|r)){if(g=(0|o[2553])+c|0,o[2553]=g,o[2556]=l,o[l+4>>2]=1|g,(0|l)!=(0|o[2555]))return;return o[2555]=0,void(o[2552]=0)}if((0|o[2555])==(0|r))return g=(0|o[2552])+c|0,o[2552]=g,o[2555]=d,o[l+4>>2]=1|g,void(o[d+g>>2]=g);g=(-8&e)+c|0,y=e>>>3;do{if(e>>>0<256){if(C=0|o[r+8>>2],(0|(m=0|o[r+12>>2]))==(0|C)){o[2550]=o[2550]&~(1<>2]=m,o[m+8>>2]=C;break}C=0|o[r+24>>2],m=0|o[r+12>>2];do{if((0|m)==(0|r)){if(i=0|o[(t=4+(w=r+16|0)|0)>>2])E=i,D=t;else{if(!(s=0|o[w>>2])){I=0;break}E=s,D=w}for(t=E,i=D;;){if(s=0|o[(w=t+20|0)>>2])L=s,x=w;else{if(!(b=0|o[(u=t+16|0)>>2]))break;L=b,x=u}t=L,i=x}o[i>>2]=0,I=t}else h=0|o[r+8>>2],o[h+12>>2]=m,o[m+8>>2]=h,I=m}while(0);if(0|C){if(m=0|o[r+28>>2],(0|o[(f=10504+(m<<2)|0)>>2])==(0|r)){if(o[f>>2]=I,!I){o[2551]=o[2551]&~(1<>2])==(0|r)?m:C+20|0)>>2]=I,!I)break;o[I+24>>2]=C,0|(f=0|o[(m=r+16|0)>>2])&&(o[I+16>>2]=f,o[f+24>>2]=I),0|(f=0|o[m+4>>2])&&(o[I+20>>2]=f,o[f+24>>2]=I)}}while(0);if(o[l+4>>2]=1|g,o[d+g>>2]=g,(0|l)==(0|o[2555]))return void(o[2552]=g);S=g}if(c=S>>>3,S>>>0<256)return d=10240+(c<<1<<2)|0,(e=0|o[2550])&(n=1<>2],B=n):(o[2550]=e|n,_=d,B=d+8|0),o[B>>2]=l,o[_+12>>2]=l,o[l+8>>2]=_,void(o[l+12>>2]=d);M=(d=S>>>8)?S>>>0>16777215?31:1&((_=7+(d=14-((n=(d=520192+(_=d<<(B=(_=d+1048320|0)>>>16&8))|0)>>>16&4)|B|(e=(_=245760+(d=_<>>16&2))+((_=d<>>15)|0)|0)?S>>>_:S)|d<<1:0,d=10504+(M<<2)|0,o[l+28>>2]=M,o[l+20>>2]=0,o[l+16>>2]=0,_=0|o[2551],e=1<>2];r:do{if((-8&o[B+4>>2]|0)!=(0|S)){for(n=S<<(31==(0|M)?0:25-(M>>>1)|0),c=B;g=0|o[(P=c+16+(n>>>31<<2)|0)>>2];){if((-8&o[g+4>>2]|0)==(0|S)){F=g;break r}n<<=1,c=g}o[P>>2]=l,o[l+24>>2]=c,o[l+12>>2]=l,o[l+8>>2]=l;break e}F=B}while(0);C=0|o[(B=F+8|0)>>2],o[C+12>>2]=l,o[B>>2]=l,o[l+8>>2]=C,o[l+12>>2]=F,o[l+24>>2]=0}else o[2551]=_|e,o[d>>2]=l,o[l+24>>2]=d,o[l+12>>2]=l,o[l+8>>2]=l}while(0);if(l=(0|o[2558])-1|0,o[2558]=l,!(0|l)){for(l=10656;F=0|o[l>>2];)l=F+8|0;o[2558]=-1}}}}function Vr(e,r){r|=0;var n=0,t=0;return(e|=0)?(n=0|l(r,e),t=(r|e)>>>0>65535?(0|(n>>>0)/(e>>>0))==(0|r)?n:-1:n):t=0,(n=0|Qr(t))&&3&o[n+-4>>2]?(Dn(0|n,0,0|t),0|n):0|n}function jr(e){var r=0;return(e|=0)>>>0>4294963200?(o[2674]=0-e,r=-1):r=e,0|r}function Hr(e,r,n){e|=0,r|=0,n|=0;var i=0,o=0,a=0,f=0,A=0,u=0;e:do{if(n){for(o=e,a=n,f=r;(A=0|t[o>>0])<<24>>24==(u=0|t[f>>0])<<24>>24;){if(!(a=a+-1|0)){i=0;break e}o=o+1|0,f=f+1|0}i=(255&A)-(255&u)|0}else i=0}while(0);return 0|i}function Zr(e,r,n){e|=0;var i,a=0,f=0,A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0;i=255&(r|=0),a=0!=(0|(n|=0));e:do{if(a&0!=(3&e|0))for(f=255&r,A=e,u=n;;){if((0|t[A>>0])==f<<24>>24){s=A,c=u,d=6;break e}if(!((b=0!=(0|(v=u+-1|0)))&0!=(3&(h=A+1|0)|0))){g=h,w=v,m=b,d=5;break}A=h,u=v}else g=e,w=n,m=a,d=5}while(0);5==(0|d)&&(m?(s=g,c=w,d=6):d=16);e:do{if(6==(0|d)){if(w=255&r,(0|t[s>>0])==w<<24>>24){if(c){k=s;break}d=16;break}g=0|l(i,16843009);r:do{if(c>>>0>3)for(m=s,a=c;;){if((-2139062144&(n=o[m>>2]^g)^-2139062144)&n+-16843009|0){p=a,C=m;break r}if(n=m+4|0,!((e=a+-4|0)>>>0>3)){y=n,I=e,d=11;break}m=n,a=e}else y=s,I=c,d=11}while(0);if(11==(0|d)){if(!I){d=16;break}p=I,C=y}for(g=C,a=p;;){if((0|t[g>>0])==w<<24>>24){k=g;break e}if(!(a=a+-1|0)){d=16;break}g=g+1|0}}}while(0);return 16==(0|d)&&(k=0),0|k}function Kr(e){return((e|=0)-48|0)>>>0<10|0}function Jr(e,r,n){e|=0,r|=0,n|=0;var i,a,f,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0;i=O,O=O+224|0,a=i+208|0,f=i+80|0,u=i,l=40+(s=A=i+160|0)|0;do{o[s>>2]=0,s=s+4|0}while((0|s)<(0|l));return o[a>>2]=o[n>>2],(0|$r(0,r,a,f,A))<0?c=-1:((0|o[e+76>>2])>-1?1:0,s=32&(n=0|o[e>>2]),(0|t[e+74>>0])<1&&(o[e>>2]=-33&n),0|o[(n=e+48|0)>>2]?g=0|$r(e,r,a,f,A):(d=0|o[(l=e+44|0)>>2],o[l>>2]=u,o[(h=e+28|0)>>2]=u,o[(v=e+20|0)>>2]=u,o[n>>2]=80,o[(b=e+16|0)>>2]=u+80,u=0|$r(e,r,a,f,A),d?(Gn[15&o[e+36>>2]](e,0,0),w=0==(0|o[v>>2])?-1:u,o[l>>2]=d,o[n>>2]=0,o[b>>2]=0,o[h>>2]=0,o[v>>2]=0,g=w):g=u),A=0|o[e>>2],o[e>>2]=A|s,c=0==(32&A|0)?g:-1),O=i,0|c}function $r(e,r,n,a,f){e|=0,r|=0,n|=0,a|=0,f|=0;var u,s,l,c,d,h,b,g,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0,K=0,J=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,fe=0,Ae=0,ue=0,se=0,le=0,ce=0,de=0,he=0,ve=0,be=0,ge=0,we=0,me=0,ke=0,pe=0,Ce=0,ye=0,Ie=0,Ee=0,De=0,Le=0,xe=0;u=O,O=O+64|0,l=u+40|0,w=u,c=u+48|0,d=u+60|0,o[(s=u+56|0)>>2]=r,r=0!=(0|e),b=h=w+40|0,g=w+39|0,w=c+4|0,m=0,k=0,p=0;e:for(;;){for(C=m,y=k;;){do{if((0|y)>-1){if((0|C)>(2147483647-y|0)){o[(I=10696)>>2]=75,E=-1;break}E=C+y|0;break}E=y}while(0);if(D=0|o[s>>2],!((I=0|t[D>>0])<<24>>24)){L=92;break e}x=I,I=D;r:for(;;){switch(x<<24>>24){case 37:L=10;break r;case 0:S=I;break r}_=I+1|0,o[s>>2]=_,x=0|t[_>>0],I=_}r:do{if(10==(0|L))for(L=0,x=I,_=I;;){if(37!=(0|t[_+1>>0])){S=x;break r}if(B=x+1|0,_=_+2|0,o[s>>2]=_,37!=(0|t[_>>0])){S=B;break}x=B}}while(0);if(C=S-D|0,r&&en(e,D,C),!C)break;y=E}if(y=0==(0|Kr(0|t[1+(0|o[s>>2])>>0])),C=0|o[s>>2],y||36!=(0|t[C+2>>0])?(M=-1,F=p,P=1):(M=(0|t[C+1>>0])-48|0,F=1,P=3),y=C+P|0,o[s>>2]=y,(I=((C=0|t[y>>0])<<24>>24)-32|0)>>>0>31|0==(1<>2]=_,(x=((B=0|t[_>>0])<<24>>24)-32|0)>>>0>31|0==(1<>24==42){if(0!=(0|Kr(0|t[G+1>>0]))&&(I=0|o[s>>2],36==(0|t[I+2>>0])))o[f+((0|t[(C=I+1|0)>>0])-48<<2)>>2]=10,q=0|o[a+((0|t[C>>0])-48<<3)>>2],U=1,Y=I+3|0;else{if(0|F){z=-1;break}r?(I=3+(0|o[n>>2])&-4,C=0|o[I>>2],o[n>>2]=I+4,W=C):W=0,q=W,U=0,Y=1+(0|o[s>>2])|0}o[s>>2]=Y,X=(C=(0|q)<0)?0-q|0:q,Q=C?8192|R:R,N=U,V=Y}else{if((0|(C=0|rn(s)))<0){z=-1;break}X=C,Q=R,N=F,V=0|o[s>>2]}do{if(46==(0|t[V>>0])){if(42!=(0|t[(C=V+1|0)>>0])){o[s>>2]=C,j=C=0|rn(s),H=0|o[s>>2];break}if(0|Kr(0|t[V+2>>0])&&(C=0|o[s>>2],36==(0|t[C+3>>0]))){o[f+((0|t[(I=C+2|0)>>0])-48<<2)>>2]=10,x=0|o[a+((0|t[I>>0])-48<<3)>>2],I=C+4|0,o[s>>2]=I,j=x,H=I;break}if(0|N){z=-1;break e}r?(I=3+(0|o[n>>2])&-4,x=0|o[I>>2],o[n>>2]=I+4,Z=x):Z=0,x=2+(0|o[s>>2])|0,o[s>>2]=x,j=Z,H=x}else j=-1,H=V}while(0);for(x=0,I=H;;){if(((0|t[I>>0])-65|0)>>>0>57){z=-1;break e}if(C=I,I=I+1|0,o[s>>2]=I,((J=255&(K=0|t[(0|t[C>>0])-65+(7616+(58*x|0))>>0]))-1|0)>>>0>=8)break;x=J}if(!(K<<24>>24)){z=-1;break}C=(0|M)>-1;do{if(K<<24>>24==19){if(C){z=-1;break e}L=54}else{if(C){o[f+(M<<2)>>2]=J,y=0|o[4+(_=a+(M<<3)|0)>>2],o[(B=l)>>2]=o[_>>2],o[B+4>>2]=y,L=54;break}if(!r){z=0;break e}nn(l,J,n),$=0|o[s>>2],L=55}}while(0);54==(0|L)&&(L=0,r?($=I,L=55):ee=0);r:do{if(55==(0|L)){L=0,y=0!=(0|x)&3==(15&(C=0|t[$+-1>>0])|0)?-33&C:C,C=-65537&Q,B=0==(8192&Q|0)?Q:C;n:do{switch(0|y){case 110:switch((255&x)<<24>>24){case 0:case 1:o[o[l>>2]>>2]=E,ee=0;break r;case 2:_=0|o[l>>2],o[_>>2]=E,o[_+4>>2]=((0|E)<0)<<31>>31,ee=0;break r;case 3:i[o[l>>2]>>1]=E,ee=0;break r;case 4:t[o[l>>2]>>0]=E,ee=0;break r;case 6:o[o[l>>2]>>2]=E,ee=0;break r;case 7:_=0|o[l>>2],o[_>>2]=E,o[_+4>>2]=((0|E)<0)<<31>>31,ee=0;break r;default:ee=0;break r}break;case 112:re=120,ne=j>>>0>8?j:8,te=8|B,L=67;break;case 88:case 120:re=y,ne=j,te=B,L=67;break;case 111:fe=_=0|on(ie=0|o[(_=l)>>2],oe=0|o[_+4>>2],h),Ae=0,ue=9285,se=0==(8&B|0)|(0|j)>(0|(ae=b-_|0))?j:ae+1|0,le=B,ce=ie,de=oe,L=73;break;case 105:case 100:if(ie=0|o[(oe=l)>>2],(0|(ae=0|o[oe+4>>2]))<0){oe=0|gn(0,0,0|ie,0|ae),_=0|v(),o[(he=l)>>2]=oe,o[he+4>>2]=_,ve=1,be=9285,ge=oe,we=_,L=72;break n}ve=0!=(2049&B|0)&1,be=0==(2048&B|0)?0==(1&B|0)?9285:9287:9286,ge=ie,we=ae,L=72;break n;case 117:ve=0,be=9285,ge=0|o[(ae=l)>>2],we=0|o[ae+4>>2],L=72;break;case 99:t[g>>0]=o[l>>2],me=g,ke=0,pe=9285,Ce=1,ye=C,Ie=b;break;case 115:me=ie=0==(0|(ae=0|o[l>>2]))?9295:ae,ke=0,pe=9285,Ce=(_=0==(0|(ae=0|Zr(ie,0,j))))?j:ae-ie|0,ye=C,Ie=_?ie+j|0:ae;break;case 67:o[c>>2]=o[l>>2],o[w>>2]=0,o[l>>2]=c,Ee=-1,L=79;break;case 83:j?(Ee=j,L=79):(fn(e,32,X,0,B),De=0,L=89);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:ee=0|un(e,+A[l>>3],X,j,B,y);break r;default:me=D,ke=0,pe=9285,Ce=j,ye=B,Ie=b}}while(0);n:do{if(67==(0|L))L=0,fe=y=0|tn(C=0|o[(y=l)>>2],ae=0|o[y+4>>2],h,32&re),Ae=(ie=0==(8&te|0)|0==(0|C)&0==(0|ae))?0:2,ue=ie?9285:9285+(re>>>4)|0,se=ne,le=te,ce=C,de=ae,L=73;else if(72==(0|L))L=0,fe=0|an(ge,we,h),Ae=ve,ue=be,se=j,le=B,ce=ge,de=we,L=73;else if(79==(0|L)){for(L=0,ae=0|o[l>>2],C=0;;){if(!(ie=0|o[ae>>2])){Le=C;break}if((xe=(0|(y=0|An(d,ie)))<0)|y>>>0>(Ee-C|0)>>>0){L=83;break}if(!(Ee>>>0>(ie=y+C|0)>>>0)){Le=ie;break}ae=ae+4|0,C=ie}if(83==(0|L)){if(L=0,xe){z=-1;break e}Le=C}if(fn(e,32,X,Le,B),Le)for(ae=0|o[l>>2],ie=0;;){if(!(y=0|o[ae>>2])){De=Le,L=89;break n}if((0|(ie=(_=0|An(d,y))+ie|0))>(0|Le)){De=Le,L=89;break n}if(en(e,d,_),ie>>>0>=Le>>>0){De=Le,L=89;break}ae=ae+4|0}else De=0,L=89}}while(0);if(73==(0|L))L=0,C=b-fe+(1&(1^(ae=0!=(0|ce)|0!=(0|de))))|0,me=(ie=0!=(0|se)|ae)?fe:h,ke=Ae,pe=ue,Ce=ie?(0|se)>(0|C)?se:C:0,ye=(0|se)>-1?-65537&le:le,Ie=b;else if(89==(0|L)){L=0,fn(e,32,X,De,8192^B),ee=(0|X)>(0|De)?X:De;break}fn(e,32,_=(0|X)<(0|(ae=(ie=(0|Ce)<(0|(C=Ie-me|0))?C:Ce)+ke|0))?ae:X,ae,ye),en(e,pe,ke),fn(e,48,_,ae,65536^ye),fn(e,48,ie,C,0),en(e,me,C),fn(e,32,_,ae,8192^ye),ee=_}}while(0);m=ee,k=E,p=N}e:do{if(92==(0|L))if(e)z=E;else if(p){for(N=1;k=0|o[f+(N<<2)>>2];){if(nn(a+(N<<3)|0,k,n),!((k=N+1|0)>>>0<10)){z=1;break e}N=k}for(k=N;;){if(0|o[f+(k<<2)>>2]){z=-1;break e}if((k=k+1|0)>>>0>=10){z=1;break}}}else z=0}while(0);return O=u,0|z}function en(e,r,n){r|=0,n|=0,32&o[(e|=0)>>2]||dn(r,n,e)}function rn(e){var r=0,n=0,i=0,a=0,f=0;if(0|Kr(0|t[o[(e|=0)>>2]>>0]))for(n=0;;){if(i=0|o[e>>2],a=(10*n|0)-48+(0|t[i>>0])|0,f=i+1|0,o[e>>2]=f,!(0|Kr(0|t[f>>0]))){r=a;break}n=a}else r=0;return 0|r}function nn(e,r,n){e|=0,r|=0,n|=0;var t=0,i=0,a=0,f=0,u=0;e:do{if(r>>>0<=20)switch(0|r){case 9:t=3+(0|o[n>>2])&-4,i=0|o[t>>2],o[n>>2]=t+4,o[e>>2]=i;break e;case 10:i=3+(0|o[n>>2])&-4,t=0|o[i>>2],o[n>>2]=i+4,o[(i=e)>>2]=t,o[i+4>>2]=((0|t)<0)<<31>>31;break e;case 11:t=3+(0|o[n>>2])&-4,i=0|o[t>>2],o[n>>2]=t+4,o[(t=e)>>2]=i,o[t+4>>2]=0;break e;case 12:t=7+(0|o[n>>2])&-8,a=0|o[(i=t)>>2],f=0|o[i+4>>2],o[n>>2]=t+8,o[(t=e)>>2]=a,o[t+4>>2]=f;break e;case 13:f=3+(0|o[n>>2])&-4,t=0|o[f>>2],o[n>>2]=f+4,f=(65535&t)<<16>>16,o[(t=e)>>2]=f,o[t+4>>2]=((0|f)<0)<<31>>31;break e;case 14:f=3+(0|o[n>>2])&-4,t=0|o[f>>2],o[n>>2]=f+4,o[(f=e)>>2]=65535&t,o[f+4>>2]=0;break e;case 15:f=3+(0|o[n>>2])&-4,t=0|o[f>>2],o[n>>2]=f+4,f=(255&t)<<24>>24,o[(t=e)>>2]=f,o[t+4>>2]=((0|f)<0)<<31>>31;break e;case 16:f=3+(0|o[n>>2])&-4,t=0|o[f>>2],o[n>>2]=f+4,o[(f=e)>>2]=255&t,o[f+4>>2]=0;break e;case 17:case 18:f=7+(0|o[n>>2])&-8,u=+A[f>>3],o[n>>2]=f+8,A[e>>3]=u;break e;default:break e}}while(0)}function tn(e,r,n,i){n|=0,i|=0;var o=0,f=0;if(0==(0|(e|=0))&0==(0|(r|=0)))o=n;else for(f=n,n=r,r=e;;){if(t[(e=f+-1|0)>>0]=0|a[8080+(15&r)>>0]|i,0==(0|(r=0|pn(0|r,0|n,4)))&0==(0|(n=0|v()))){o=e;break}f=e}return 0|o}function on(e,r,n){n|=0;var i=0,o=0;if(0==(0|(e|=0))&0==(0|(r|=0)))i=n;else for(o=n,n=r,r=e;;){if(t[(e=o+-1|0)>>0]=7&r|48,0==(0|(r=0|pn(0|r,0|n,3)))&0==(0|(n=0|v()))){i=e;break}o=e}return 0|i}function an(e,r,n){n|=0;var i=0,o=0,a=0,f=0,A=0,u=0,s=0,l=0;if((r|=0)>>>0>0|0==(0|r)&(e|=0)>>>0>4294967295){i=n,o=e,a=r;do{A=0|gn(0|(r=o),0|(f=a),0|vn(0|(o=0|kn(0|o,0|a,10,0)),0|(a=0|v()),10,0),0|v()),v(),t[(i=i+-1|0)>>0]=255&A|48}while(f>>>0>9|9==(0|f)&r>>>0>4294967295);u=o,s=i}else u=e,s=n;if(u)for(n=u,u=s;;){if(s=n,n=(n>>>0)/10|0,t[(e=u+-1|0)>>0]=s-(10*n|0)|48,s>>>0<10){l=e;break}u=e}else l=s;return 0|l}function fn(e,r,n,t,i){e|=0,r|=0;var o,a,f=0;if(o=O,O=O+256|0,a=o,(0|(n|=0))>(0|(t|=0))&0==(73728&(i|=0)|0)){if(Dn(0|a,r<<24>>24|0,0|((i=n-t|0)>>>0<256?i:256)),i>>>0>255){r=n-t|0,t=i;do{en(e,a,256),t=t+-256|0}while(t>>>0>255);f=255&r}else f=i;en(e,a,f)}O=o}function An(e,r){return 0|((e|=0)?0|cn(e,r|=0):0)}function un(e,r,n,i,f,A){e|=0,r=+r,n|=0,i|=0,f|=0,A|=0;var u,s,c,d,h,b,g,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0,K=0,J=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,fe=0,Ae=0,ue=0,se=0,le=0,ce=0,de=0,he=0,ve=0,be=0,ge=0,we=0,me=0,ke=0,pe=0,Ce=0,ye=0,Ie=0,Ee=0,De=0,Le=0,xe=0,Se=0,_e=0,Be=0,Me=0,Fe=0,Pe=0;u=O,O=O+560|0,s=u+32|0,h=d=u,b=u+540|0,o[(c=u+536|0)>>2]=0,g=b+12|0,w=0|sn(r),(0|(m=0|v()))<0?(p=0|sn(k=-r),C=k,y=1,I=9302,E=0|v(),D=p):(C=r,y=0!=(2049&f|0)&1,I=0==(2048&f|0)?0==(1&f|0)?9303:9308:9305,E=m,D=w);do{if(!0&2146435072==(2146435072&E|0))w=0!=(32&A|0),fn(e,32,n,D=y+3|0,-65537&f),en(e,I,y),en(e,C!=C|!1?w?9329:9333:w?9321:9325,3),fn(e,32,n,D,8192^f),L=D;else{if((D=0!=(r=2*+ln(C,c)))&&(o[c>>2]=(0|o[c>>2])-1),97==(0|(w=32|A))){p=0==(0|(m=32&A))?I:I+9|0,x=2|y,S=12-i|0;do{if(!(i>>>0>11|0==(0|S))){k=8,_=S;do{_=_+-1|0,k*=16}while(0!=(0|_));if(45==(0|t[p>>0])){B=-(k+(-r-k));break}B=r+k-k;break}B=r}while(0);for((0|(M=0|an(_=(0|(S=0|o[c>>2]))<0?0-S|0:S,((0|_)<0)<<31>>31,g)))==(0|g)?(t[(_=b+11|0)>>0]=48,F=_):F=M,t[F+-1>>0]=43+(S>>31&2),t[(S=F+-2|0)>>0]=A+15,M=(0|i)<1,_=0==(8&f|0),P=d,R=B;T=~~R,G=P+1|0,t[P>>0]=m|a[8080+T>>0],R=16*(R-+(0|T)),1!=(G-h|0)||_&M&0==R?q=G:(t[G>>0]=46,q=P+2|0),0!=R;)P=q;P=q,0!=(0|i)&&(-2-h+P|0)<(0|i)?(U=i+2+(M=g)-(_=S)|0,Y=M,z=_):(U=(_=g)-h-(M=S)+P|0,Y=_,z=M),fn(e,32,n,M=U+x|0,f),en(e,p,x),fn(e,48,n,M,65536^f),en(e,d,_=P-h|0),fn(e,48,U-(_+(P=Y-z|0))|0,0,0),en(e,S,P),fn(e,32,n,M,8192^f),L=M;break}M=(0|i)<0?6:i,D?(P=(0|o[c>>2])-28|0,o[c>>2]=P,W=268435456*r,X=P):(W=r,X=0|o[c>>2]),_=P=(0|X)<0?s:s+288|0,R=W;do{m=~~R>>>0,o[_>>2]=m,_=_+4|0,R=1e9*(R-+(m>>>0))}while(0!=R);if(D=P,(0|X)>0)for(S=P,x=_,p=X;;){if(m=(0|p)<29?p:29,(G=x+-4|0)>>>0>=S>>>0){T=G,G=0;do{j=0|gn(0|(N=0|bn(0|(Q=0|Cn(0|o[T>>2],0,0|m)),0|v(),0|G,0)),0|(Q=0|v()),0|(V=0|vn(0|(G=0|kn(0|N,0|Q,1e9,0)),0|v(),1e9,0)),0|v()),v(),o[T>>2]=j,T=T+-4|0}while(T>>>0>=S>>>0);G?(o[(T=S+-4|0)>>2]=G,H=T):H=S}else H=S;e:do{if(x>>>0>H>>>0)for(T=x;;){if(0|o[(j=T+-4|0)>>2]){Z=T;break e}if(!(j>>>0>H>>>0)){Z=j;break}T=j}else Z=x}while(0);if(G=(0|o[c>>2])-m|0,o[c>>2]=G,!((0|G)>0)){K=H,J=Z,$=G;break}S=H,x=Z,p=G}else K=P,J=_,$=X;if((0|$)<0)for(p=1+((M+25|0)/9|0)|0,x=102==(0|w),S=K,G=J,T=$;;){if(V=(0|(j=0-T|0))<9?j:9,S>>>0>>0){j=(1<>>V:1e9,N=0,ee=S;do{re=0|o[ee>>2],o[ee>>2]=(V?re>>>V:re)+N,N=0|l(re&j,Q),ee=ee+4|0}while(ee>>>0>>0);ee=0==(0|o[S>>2])?S+4|0:S,N?(o[G>>2]=N,ne=G+4|0,te=ee):(ne=G,te=ee)}else ne=G,te=0==(0|o[S>>2])?S+4|0:S;if(j=((Q=ne-(ee=x?P:te)|0)>>2|0)>(0|p)?ee+(p<<2)|0:ne,T=(0|o[c>>2])+V|0,o[c>>2]=T,(0|T)>=0){ie=te,oe=j;break}S=te,G=j}else ie=K,oe=J;if(ie>>>0>>0)if(S=9*((G=D-ie|0)>>2)|0,(G=0|o[ie>>2])>>>0<10)ae=S;else for(T=S,S=10;;){if(p=T+1|0,G>>>0<(S=10*S|0)>>>0){ae=p;break}T=p}else ae=0;if((0|(G=M-(102==(0|w)?0:ae)+(((S=0!=(0|M))&(T=103==(0|w)))<<31>>31)|0))<((9*((p=oe-D|0)>>2)|0)-9|0)){if(x=P+4+((G=(0|(p=G+9216|0))/9|0)-1024<<2)|0,(0|(_=p-(9*G|0)|0))<8)for(G=_,_=10;;){if(p=10*_|0,!((0|G)<7)){fe=p;break}G=G+1|0,_=p}else fe=10;if((p=(x+4|0)==(0|oe))&0==(0|(w=(_=0|o[x>>2])-(0|l(G=(_>>>0)/(fe>>>0)|0,fe))|0)))de=x,he=ae,ve=ie;else if(k=0==(1&G|0)?9007199254740992:9007199254740994,R=w>>>0<(G=fe>>>1)>>>0?.5:p&(0|w)==(0|G)?1:1.5,y?(Ae=(G=45==(0|t[I>>0]))?-R:R,ue=G?-k:k):(Ae=R,ue=k),G=_-w|0,o[x>>2]=G,ue+Ae!=ue){if(w=G+fe|0,o[x>>2]=w,w>>>0>999999999)for(w=x,G=ie;;){if(_=w+-4|0,o[w>>2]=0,_>>>0>>0?(o[(p=G+-4|0)>>2]=0,se=p):se=G,p=1+(0|o[_>>2])|0,o[_>>2]=p,!(p>>>0>999999999)){le=_,ce=se;break}w=_,G=se}else le=x,ce=ie;if(w=9*((G=D-ce|0)>>2)|0,(G=0|o[ce>>2])>>>0<10)de=le,he=w,ve=ce;else for(_=w,w=10;;){if(p=_+1|0,G>>>0<(w=10*w|0)>>>0){de=le,he=p,ve=ce;break}_=p}}else de=x,he=ae,ve=ie;be=he,ge=oe>>>0>(_=de+4|0)>>>0?_:oe,we=ve}else be=ae,ge=oe,we=ie;_=0-be|0;e:do{if(ge>>>0>we>>>0)for(w=ge;;){if(0|o[(G=w+-4|0)>>2]){me=w,ke=1;break e}if(!(G>>>0>we>>>0)){me=G,ke=0;break}w=G}else me=ge,ke=0}while(0);do{if(T){if((0|(x=M+(1&(1^S))|0))>(0|be)&(0|be)>-5?(pe=A+-1|0,Ce=x+-1-be|0):(pe=A+-2|0,Ce=x+-1|0),!(8&f)){if(ke&&0!=(0|(x=0|o[me+-4>>2])))if((x>>>0)%10|0)ye=0;else for(w=0,V=10;;){if(N=w+1|0,0|(x>>>0)%((V=10*V|0)>>>0)){ye=N;break}w=N}else ye=9;if(V=(9*((w=me-D|0)>>2)|0)-9|0,102==(32|pe)){Ie=pe,Ee=(0|Ce)<(0|(x=(0|(w=V-ye|0))>0?w:0))?Ce:x;break}Ie=pe,Ee=(0|Ce)<(0|(V=(0|(x=V+be-ye|0))>0?x:0))?Ce:V;break}Ie=pe,Ee=Ce}else Ie=A,Ee=M}while(0);if(D=(M=0!=(0|Ee))?1:f>>>3&1,S=102==(32|Ie))De=0,Le=(0|be)>0?be:0;else{if(V=0|an(T=(0|be)<0?_:be,((0|T)<0)<<31>>31,g),((T=g)-V|0)<2)for(x=V;;){if(t[(w=x+-1|0)>>0]=48,!((T-w|0)<2)){xe=w;break}x=w}else xe=V;t[xe+-1>>0]=43+(be>>31&2),t[(x=xe+-2|0)>>0]=Ie,De=x,Le=T-x|0}if(fn(e,32,n,x=y+1+Ee+D+Le|0,f),en(e,I,y),fn(e,48,n,x,65536^f),S){N=w=d+9|0,G=d+8|0,p=_=we>>>0>P>>>0?P:we;do{if(j=0|an(0|o[p>>2],0,w),(0|p)==(0|_))(0|j)==(0|w)?(t[G>>0]=48,Se=G):Se=j;else if(j>>>0>d>>>0)for(Dn(0|d,48,j-h|0),ee=j;;){if(!((Q=ee+-1|0)>>>0>d>>>0)){Se=Q;break}ee=Q}else Se=j;en(e,Se,N-Se|0),p=p+4|0}while(p>>>0<=P>>>0);if(0==(8&f|0)&(1^M)||en(e,9337,1),p>>>0>>0&(0|Ee)>0)for(P=Ee,N=p;;){if((G=0|an(0|o[N>>2],0,w))>>>0>d>>>0)for(Dn(0|d,48,G-h|0),_=G;;){if(!((S=_+-1|0)>>>0>d>>>0)){_e=S;break}_=S}else _e=G;if(en(e,_e,(0|P)<9?P:9),_=P+-9|0,!((N=N+4|0)>>>0>>0&(0|P)>9)){Be=_;break}P=_}else Be=Ee;fn(e,48,Be+9|0,9,0)}else{if(we>>>0<(P=ke?me:we+4|0)>>>0&(0|Ee)>-1)for(w=0==(8&f|0),p=N=d+9|0,M=0-h|0,_=d+8|0,j=Ee,S=we;;){(0|(D=0|an(0|o[S>>2],0,N)))==(0|N)?(t[_>>0]=48,Me=_):Me=D;do{if((0|S)==(0|we)){if(D=Me+1|0,en(e,Me,1),w&(0|j)<1){Fe=D;break}en(e,9337,1),Fe=D}else{if(Me>>>0<=d>>>0){Fe=Me;break}for(Dn(0|d,48,Me+M|0),D=Me;;){if(!((T=D+-1|0)>>>0>d>>>0)){Fe=T;break}D=T}}}while(0);if(en(e,Fe,(0|j)>(0|(G=p-Fe|0))?G:j),!((S=S+4|0)>>>0

    >>0&(0|(D=j-G|0))>-1)){Pe=D;break}j=D}else Pe=Ee;fn(e,48,Pe+18|0,18,0),en(e,De,g-De|0)}fn(e,32,n,x,8192^f),L=x}}while(0);return O=u,0|((0|L)<(0|n)?n:L)}function sn(e){var r;return e=+e,A[u>>3]=e,r=0|o[u>>2],h(0|o[u+4>>2]),0|r}function ln(e,r){return+ +function e(r,n){r=+r,n|=0;var t,i,a,f=0,s=0,l=0;switch(A[u>>3]=r,a=0|pn(0|(t=0|o[u>>2]),0|(i=0|o[u+4>>2]),52),v(),2047&a){case 0:0!=r?(f=+e(0x10000000000000000*r,n),s=(0|o[n>>2])-64|0):(f=r,s=0),o[n>>2]=s,l=f;break;case 2047:l=r;break;default:o[n>>2]=(2047&a)-1022,o[u>>2]=t,o[u+4>>2]=-2146435073&i|1071644672,l=+A[u>>3]}return+l}(e=+e,r|=0)}function cn(e,r,n){e|=0,r|=0;var i=0;do{if(e){if(r>>>0<128){t[e>>0]=r,i=1;break}if(!(0|o[o[2122]>>2])){if(57216==(-128&r|0)){t[e>>0]=r,i=1;break}o[2674]=84,i=-1;break}if(r>>>0<2048){t[e>>0]=r>>>6|192,t[e+1>>0]=63&r|128,i=2;break}if(r>>>0<55296|57344==(-8192&r|0)){t[e>>0]=r>>>12|224,t[e+1>>0]=r>>>6&63|128,t[e+2>>0]=63&r|128,i=3;break}if((r+-65536|0)>>>0<1048576){t[e>>0]=r>>>18|240,t[e+1>>0]=r>>>12&63|128,t[e+2>>0]=r>>>6&63|128,t[e+3>>0]=63&r|128,i=4;break}o[2674]=84,i=-1;break}i=1}while(0);return 0|i}function dn(e,r,n){e|=0,r|=0;var i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0;(a=0|o[(i=16+(n|=0)|0)>>2])?(f=a,A=5):0|function(e){var r=0,n=0,i=0;return n=0|t[(r=74+(e|=0)|0)>>0],t[r>>0]=n+255|n,8&(n=0|o[e>>2])?(o[e>>2]=32|n,i=-1):(o[e+8>>2]=0,o[e+4>>2]=0,r=0|o[e+44>>2],o[e+28>>2]=r,o[e+20>>2]=r,o[e+16>>2]=r+(0|o[e+48>>2]),i=0),0|i}(n)?u=0:(f=0|o[i>>2],A=5);e:do{if(5==(0|A)){if(s=i=0|o[(a=n+20|0)>>2],(f-i|0)>>>0>>0){u=0|Gn[15&o[n+36>>2]](n,e,r);break}r:do{if((0|t[n+75>>0])<0|0==(0|r))l=0,c=e,d=r,h=s;else{for(i=r;10!=(0|t[e+(v=i+-1|0)>>0]);){if(!v){l=0,c=e,d=r,h=s;break r}i=v}if((v=0|Gn[15&o[n+36>>2]](n,e,i))>>>0>>0){u=v;break e}l=i,c=e+i|0,d=r-i|0,h=0|o[a>>2]}}while(0);In(0|h,0|c,0|d),o[a>>2]=(0|o[a>>2])+d,u=l+d|0}}while(0);return 0|u}function hn(e,r,n){var t,i;return e|=0,r|=0,n|=0,t=O,O=O+16|0,o[(i=t)>>2]=n,n=0|Jr(e,r,i),O=t,0|n}function vn(e,r,n,t){var i,o;return r|=0,t|=0,n=0|function(e,r){var n,t,i,o=0;return e=((t=0|l(o=65535&(r|=0),n=65535&(e|=0)))>>>16)+(0|l(o,i=e>>>16))|0,r=0|l(o=r>>>16,n),0|(h((e>>>16)+(0|l(o,i))+(((65535&e)+r|0)>>>16)|0),e+r<<16|65535&t|0)}(i=e|=0,e=n|=0),o=0|v(),0|(h((0|l(r,e))+(0|l(t,i))+o|0&o|0),0|n)}function bn(e,r,n,t){var i;return 0|(h((r|=0)+(t|=0)+((i=(e|=0)+(n|=0)>>>0)>>>0>>0|0)>>>0|0),0|i)}function gn(e,r,n,t){return 0|(h(0|(r|=0)-(t|=0)-((n|=0)>>>0>(e|=0)>>>0|0)>>>0),e-n>>>0|0)}function wn(e){return 0|((e|=0)?31-(0|c(e^e-1))|0:32)}function mn(e,r,n,t,i){i|=0;var a,f=0,A=0,u=0,s=0,l=0,d=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0;if(f=e|=0,a=n|=0,l=s=t|=0,!(u=A=r|=0))return d=0!=(0|i),l?d?(o[i>>2]=0|e,o[i+4>>2]=0&r,g=0,0|(h(0|(b=0)),g)):(g=0,0|(h(0|(b=0)),g)):(d&&(o[i>>2]=(f>>>0)%(a>>>0),o[i+4>>2]=0),g=(f>>>0)/(a>>>0)>>>0,0|(h(0|(b=0)),g));d=0==(0|l);do{if(a){if(!d){if((w=(0|c(0|l))-(0|c(0|u))|0)>>>0<=31){C=m=w+1|0,y=f>>>(m>>>0)&(p=w-31>>31)|u<<(k=31-w|0),I=u>>>(m>>>0)&p,E=0,D=f<>2]=0|e,o[i+4>>2]=A|0&r,g=0,0|(h(0|(b=0)),g)):(g=0,0|(h(0|(b=0)),g))}if((k=a-1|0)&a|0){C=p=33+(0|c(0|a))-(0|c(0|u))|0,y=(w=32-p|0)-1>>31&u>>>((x=p-32|0)>>>0)|(u<>>(p>>>0))&(S=x>>31),I=S&u>>>(p>>>0),E=f<<(m=64-p|0)&(L=w>>31),D=(u<>>(x>>>0))&L|f<>31;break}return 0|i&&(o[i>>2]=k&f,o[i+4>>2]=0),1==(0|a)?(g=0|e,0|(h(0|(b=A|0&r)),g)):(g=u<<32-(k=0|wn(0|a))|f>>>(k>>>0)|0,0|(h(0|(b=u>>>(k>>>0)|0)),g))}if(d)return 0|i&&(o[i>>2]=(u>>>0)%(a>>>0),o[i+4>>2]=0),g=(u>>>0)/(a>>>0)>>>0,0|(h(0|(b=0)),g);if(!f)return 0|i&&(o[i>>2]=0,o[i+4>>2]=(u>>>0)%(l>>>0)),g=(u>>>0)/(l>>>0)>>>0,0|(h(0|(b=0)),g);if(!((k=l-1|0)&l))return 0|i&&(o[i>>2]=0|e,o[i+4>>2]=k&u|0&r),b=0,g=u>>>((0|wn(0|l))>>>0),0|(h(0|b),g);if((k=(0|c(0|l))-(0|c(0|u))|0)>>>0<=30){C=p=k+1|0,y=u<<(w=31-k|0)|f>>>(p>>>0),I=u>>>(p>>>0),E=0,D=f<>2]=0|e,o[i+4>>2]=A|0&r,g=0,0|(h(0|(b=0)),g)):(g=0,0|(h(0|(b=0)),g))}while(0);if(C){t=0|bn(0|(r=0|n),0|(n=s|0&t),-1,-1),s=0|v(),A=D,D=E,E=I,I=y,y=C,C=0;do{e=A,A=D>>>31|A<<1,D=C|D<<1,gn(0|t,0|s,0|(f=I<<1|e>>>31|0),0|(e=I>>>31|E<<1|0)),C=1&(l=(u=0|v())>>31|((0|u)<0?-1:0)<<1),I=0|gn(0|f,0|e,l&r|0,(((0|u)<0?-1:0)>>31|((0|u)<0?-1:0)<<1)&n|0),E=0|v(),y=y-1|0}while(0!=(0|y));_=A,B=D,M=E,F=I,P=0,R=C}else _=D,B=E,M=I,F=y,P=0,R=0;return C=B,B=0,0|i&&(o[i>>2]=F,o[i+4>>2]=M),g=-2&(C<<1|0)|R,0|(h(0|(b=(0|C)>>>31|(_|B)<<1|0&(B<<1|C>>>31)|P)),g)}function kn(e,r,n,t){return 0|mn(e|=0,r|=0,n|=0,t|=0,0)}function pn(e,r,n){return e|=0,r|=0,(0|(n|=0))<32?(h(r>>>n|0),e>>>n|(r&(1<>>n-32|0)}function Cn(e,r,n){return e|=0,(0|(n|=0))<32?(h((r|=0)<>>32-n|0),e<>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function In(e,r,n){e|=0,r|=0;var i,a,f=0;if((0|(n|=0))>=8192)return S(0|e,0|r,0|n),0|e;if(i=0|e,a=e+n|0,(3&e)==(3&r)){for(;3&e;){if(!n)return 0|i;t[e>>0]=0|t[r>>0],e=e+1|0,r=r+1|0,n=n-1|0}for(n=(f=-4&a|0)-64|0;(0|e)<=(0|n);)o[e>>2]=o[r>>2],o[e+4>>2]=o[r+4>>2],o[e+8>>2]=o[r+8>>2],o[e+12>>2]=o[r+12>>2],o[e+16>>2]=o[r+16>>2],o[e+20>>2]=o[r+20>>2],o[e+24>>2]=o[r+24>>2],o[e+28>>2]=o[r+28>>2],o[e+32>>2]=o[r+32>>2],o[e+36>>2]=o[r+36>>2],o[e+40>>2]=o[r+40>>2],o[e+44>>2]=o[r+44>>2],o[e+48>>2]=o[r+48>>2],o[e+52>>2]=o[r+52>>2],o[e+56>>2]=o[r+56>>2],o[e+60>>2]=o[r+60>>2],e=e+64|0,r=r+64|0;for(;(0|e)<(0|f);)o[e>>2]=o[r>>2],e=e+4|0,r=r+4|0}else for(f=a-4|0;(0|e)<(0|f);)t[e>>0]=0|t[r>>0],t[e+1>>0]=0|t[r+1>>0],t[e+2>>0]=0|t[r+2>>0],t[e+3>>0]=0|t[r+3>>0],e=e+4|0,r=r+4|0;for(;(0|e)<(0|a);)t[e>>0]=0|t[r>>0],e=e+1|0,r=r+1|0;return 0|i}function En(e,r,n){var i=0;if((0|(r|=0))<(0|(e|=0))&(0|e)<(r+(n|=0)|0)){for(i=e,r=r+n|0,e=e+n|0;(0|n)>0;)r=r-1|0,n=n-1|0,t[(e=e-1|0)>>0]=0|t[r>>0];e=i}else In(e,r,n);return 0|e}function Dn(e,r,n){r|=0;var i,a=0,f=0,A=0;if(i=(e|=0)+(n|=0)|0,r&=255,(0|n)>=67){for(;3&e;)t[e>>0]=r,e=e+1|0;for(f=r|r<<8|r<<16|r<<24,A=(a=-4&i|0)-64|0;(0|e)<=(0|A);)o[e>>2]=f,o[e+4>>2]=f,o[e+8>>2]=f,o[e+12>>2]=f,o[e+16>>2]=f,o[e+20>>2]=f,o[e+24>>2]=f,o[e+28>>2]=f,o[e+32>>2]=f,o[e+36>>2]=f,o[e+40>>2]=f,o[e+44>>2]=f,o[e+48>>2]=f,o[e+52>>2]=f,o[e+56>>2]=f,o[e+60>>2]=f,e=e+64|0;for(;(0|e)<(0|a);)o[e>>2]=f,e=e+4|0}for(;(0|e)<(0|i);)t[e>>0]=r,e=e+1|0;return i-n|0}function Ln(e){var r,n;return(0|(e|=0))>0&(0|(n=(r=0|o[s>>2])+e|0))<(0|r)|(0|n)<0?(G(0|n),I(12),-1):(0|n)>(0|x())&&0==(0|_(0|n))?(I(12),-1):(o[s>>2]=n,0|r)}function xn(e){return d(0),0}function Sn(e,r){return d(1),0}function _n(e,r,n){return d(2),0}function Bn(e){d(4)}function Mn(e,r){d(5)}function Fn(e,r,n,t){d(6)}function Pn(e,r,n,t,i){d(7)}var Rn=[xn,function(e){var r,n,t=0,i=0,a=0;switch(o[(r=20+(e|=0)|0)>>2]=0,0|(t=0|o[(n=e+4|0)>>2])){case 0:if(i=0|N(1,0,80),o[e>>2]=i,!i)return 0;do{if(0|M(0|(a=i+28|0),0))break;if(0|R(i+76|0,0,6,0|e)){B(0|a);break}return o[n>>2]=1,1}while(0);return U(i),o[e>>2]=0,0;case 1:return 0|t;default:if(!(t=0|o[e>>2]))return 1;if((0|o[n>>2])>>>0>=2){e=t+28|0;do{P(0|e,0|t)}while(1!=(0|o[n>>2]))}return 0|0==(0|o[r>>2])&1}return 0},function(e){var r,n=0,t=0;if(0|(r=0|o[(e|=0)>>2])&&(0|o[(n=e+4|0)>>2])>>>0>=2){t=r+28|0;do{P(0|t,0|r)}while(1!=(0|o[n>>2]))}return 0==(0|o[e+20>>2])|0},function(e){var r,n,t=0;return r=O,O=O+16|0,n=r,t=0|function(e){return 0|e}(0|o[60+(e|=0)>>2]),o[n>>2]=t,t=0|jr(0|L(6,0|n)),O=r,0|t},function(e){var r,n,t;return r=0|o[40+(e|=0)>>2],(0|o[e+12>>2])<1||(0|o[e+16>>2])<1?0:(n=0|Tn[31&o[r+44>>2]](e,r),0|(t=0|o[r+48>>2])&&Gn[15&t](e,r,n),o[(e=r+16|0)>>2]=(0|o[e>>2])+n,1)},function(e){var r,n,t,i,a=0,f=0,A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0;if(r=0|o[40+(e|=0)>>2],f=(a=0|o[o[r>>2]>>2])>>>0<11,s=(A=a+-1|0)>>>0<12&&0!=(1&((u=65535&A)?2077>>>u:2077))?1:(a+-7|0)>>>0<4,A=r+44|0,n=r+48|0,t=r+52|0,o[(u=r+40|0)>>2]=0,o[u+4>>2]=0,o[u+8>>2]=0,o[u+12>>2]=0,!(0|Me(0|o[r+20>>2],e,s?11:12)))return 0;if((a+-7|0)>>>0>3|1^s||Fe(),!(0|o[e+92>>2])){do{if(f){if(0|o[2030]&&(o[2468]=11,o[2469]=12,o[2470]=13,o[2471]=14,o[2472]=15,o[2473]=16,o[2474]=17,o[2475]=12,o[2476]=14,o[2477]=15,o[2478]=16),o[2030]=0,o[A>>2]=17,0|o[e+56>>2]){if(v=0|V(1,0,(-2&(h=1+(d=0|o[(c=e+12|0)>>2])|0))+d|0),o[u>>2]=v,v){o[r+4>>2]=v,d=v+(0|o[c>>2])|0,o[r+8>>2]=d,o[r+12>>2]=d+(h>>1),o[A>>2]=18,Fe();break}return 0}}else o[A>>2]=19}while(0);if(!s)return 1;switch(0|a){case 5:case 10:b=9;break;default:b=f?6:5}return o[n>>2]=b,f?($(),1):1}if(b=0|o[r>>2],h=(s=(a=0|o[b>>2])-1|0)>>>0<12,!f)return g=h&&0!=(1&((f=65535&s)?2077>>>f:2077))?1:(a+-7|0)>>>0<4,v=(c=1+(f=0|o[e+96>>2])|0)>>1,m=(w=1+(d=0|o[e+100>>2])|0)>>1,p=(k=1+(0|o[(w=e+12|0)>>2])|0)>>1,y=(C=1+(0|o[(k=e+16|0)>>2])|0)>>1,D=0|V(1,0,(E=((c=(I=-2&c)<<1)+(C=f<<1)<<2)+(g?f<<3:0)|0)+(g?367:283)|0),o[u>>2]=D,D?(L=D+E+31&-32,o[r+24>>2]=L,o[(E=r+28|0)>>2]=L+84,o[(x=r+32|0)>>2]=L+168,o[(S=r+36|0)>>2]=g?L+252|0:0,Pe(L,0|o[w>>2],0|o[k>>2],0|o[b+16>>2],f,d,0|o[b+32>>2],1,D),L=D+(C<<2)|0,Pe(0|o[E>>2],p,y,0|o[b+20>>2],v,m,0|o[b+36>>2],1,L),Pe(0|o[x>>2],p,y,0|o[b+24>>2],v,m,0|o[b+40>>2],1,L+(I<<2)|0),o[A>>2]=16,g?(Pe(0|o[S>>2],0|o[w>>2],0|o[k>>2],0|o[b+28>>2],f,d,0|o[b+44>>2],1,L+(c<<2)|0),o[n>>2]=4,$(),1):1):0;if(i=h&&0!=(1&((h=65535&s)?2077>>>h:2077))?1:(a+-7|0)>>>0<4,a=0|o[e+96>>2],h=0|o[e+100>>2],L=(c=1+(0|o[(s=e+12|0)>>2])|0)>>1,b=(e=1+(0|o[(c=e+16|0)>>2])|0)>>1,e=a<<1,d=6*a|0,k=0|V(1,0,(f=0|l(a,i?36:27))+(i?367:283)|0),o[u>>2]=k,!k)return 0;if(u=k+((i?a<<3:d)<<2)|0,w=k+f+31&-32,o[r+24>>2]=w,o[(f=r+28|0)>>2]=w+84,o[(S=r+32|0)>>2]=w+168,o[(g=r+36|0)>>2]=i?w+252|0:0,Pe(w,0|o[s>>2],0|o[c>>2],u,a,h,0,1,k),Pe(0|o[f>>2],L,b,u+a|0,a,h,0,1,k+(e<<2)|0),Pe(0|o[S>>2],L,b,u+e|0,a,h,0,1,k+(a<<2<<2)|0),o[A>>2]=15,0|o[2031]&&(o[2453]=4,o[2455]=5,o[2452]=6,o[2454]=7,o[2456]=8,o[2457]=9,o[2458]=10,o[2459]=4,o[2460]=5,o[2461]=8,o[2462]=9),o[2031]=0,!i)return 1;switch(Pe(0|o[g>>2],0|o[s>>2],0|o[c>>2],u+(3*a|0)|0,a,h,0,1,k+(d<<2)|0),o[n>>2]=3,0|o[o[r>>2]>>2]){case 10:case 5:_=7;break;default:_=8}return o[t>>2]=_,$(),1},function(e){var r,n,t,i=0;n=4+(e|=0)|0,t=28+(r=0|o[e>>2])|0;e:for(;;){r:for(;;){switch(0|o[n>>2]){case 0:break e;case 2:i=5;break r;case 1:break;default:i=7;break r}P(0|t,0|r)}5==(0|i)?(i=0,qn[31&o[2039]](e),o[n>>2]=1,F(0|t)):7==(0|i)&&(i=0,F(0|t))}return F(0|t),0},xn],Tn=[Sn,function(e,r){return-16777216},function(e,r){return 0|e},function(e,r){return 0|o[(r|=0)>>2]},function(e,r){return 0|o[4+(r|=0)>>2]},function(e,r){return 0|o[(r|=0)-4>>2]},function(e,r){var n,t,i;return e|=0,n=0|o[(r|=0)>>2],((e=(i=((r=(t=0|o[r+4>>2])^e)>>>1&2139062143)+(t&e)|0)^n)>>>1&2139062143)+(i&n)|0},function(e,r){var n;return e|=0,((r=(n=0|o[(r|=0)-4>>2])^e)>>>1&2139062143)+(n&e)|0},function(e,r){var n;return e|=0,((r=(n=0|o[(r|=0)>>2])^e)>>>1&2139062143)+(n&e)|0},function(e,r){var n;return e|=0,e=0|o[(r|=0)-4>>2],((r=(n=0|o[r>>2])^e)>>>1&2139062143)+(n&e)|0},function(e,r){var n;return e|=0,e=0|o[(r|=0)>>2],((r=(n=0|o[r+4>>2])^e)>>>1&2139062143)+(n&e)|0},function(e,r){e|=0;var n,t,i=0,a=0;return i=0|o[(r|=0)-4>>2],a=0|o[r>>2],n=0|o[r+4>>2],t=((r=i^e)>>>1&2139062143)+(i&e)|0,((a=(i=((e=n^a)>>>1&2139062143)+(n&a)|0)^t)>>>1&2139062143)+(i&t)|0},function(e,r){e|=0;var n,t,i,a,f,A,u,s,l=0;return n=0|o[(r|=0)>>2],t=(e>>>24)-(r=(l=0|o[r+-4>>2])>>>24)|0,i=(n>>>24)-r|0,a=(e>>>16&255)-(r=l>>>16&255)|0,f=(n>>>16&255)-r|0,A=(e>>>8&255)-(r=l>>>8&255)|0,u=(n>>>8&255)-r|0,0|((((0|(l=(255&e)-(r=255&l)|0))>-1?l:0-l|0)-((0|(s=(255&n)-r|0))>-1?s:0-s|0)-((0|i)>-1?i:0-i|0)+((0|t)>-1?t:0-t|0)-((0|u)>-1?u:0-u|0)+((0|A)>-1?A:0-A|0)-((0|f)>-1?f:0-f|0)+((0|a)>-1?a:0-a|0)|0)<1?n:e)},function(e,r){var n,t,i,a,f;return e|=0,((r=((n=0|o[(r|=0)>>2])>>>24)+(e>>>24)-((t=0|o[r+-4>>2])>>>24)|0)>>>0<256?r:r>>>24^255)<<24|((f=(255&n)+(255&e)-(255&t)|0)>>>0<256?f:f>>>24^255)|((i=(n>>>16&255)+(e>>>16&255)-(t>>>16&255)|0)>>>0<256?i:i>>>24^255)<<16|((a=(n>>>8&255)+(e>>>8&255)-(t>>>8&255)|0)>>>0<256?a:a>>>24^255)<<8|0},function(e,r){e|=0;var n,t,i=0,a=0;return i=0|o[(r|=0)>>2],n=0|o[r+-4>>2],i=(((e=(a=((r=i^e)>>>1&2139062143)+(i&e)|0)>>>24)-(n>>>24)|0)/2|0)+e|0,r=(((e=a>>>16&255)-(n>>>16&255)|0)/2|0)+e|0,t=(((e=a>>>8&255)-(n>>>8&255)|0)/2|0)+e|0,(i>>>0<256?i:i>>>24^255)<<24|((a=(((e=255&a)-(255&n)|0)/2|0)+e|0)>>>0<256?a:a>>>24^255)|(r>>>0<256?r:r>>>24^255)<<16|(t>>>0<256?t:t>>>24^255)<<8|0},function(e,r){r|=0;var n,t,i,a,f,A,u,s,c,d,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0;if(t=(1+(n=0|o[16+(e|=0)>>2])|0)>>1,(0|n)<=0)return 0;for(i=e+20|0,a=e+32|0,f=r+28|0,A=e+24|0,u=e+36|0,s=r+32|0,c=e+28|0,e=r+16|0,v=0,b=0,g=0,w=0|o[(d=r+24|0)>>2];;){m=0|o[a>>2],g=(0|Ae(w,n-g|0,(0|o[i>>2])+(0|l(m,g))|0,m))+g|0,m=t-v|0,0|ae(0|o[f>>2],m)?(p=0|o[u>>2],C=0|Ae(0|o[f>>2],m,(0|o[A>>2])+(0|l(p,v))|0,p),p=0|o[u>>2],Ae(0|o[s>>2],m,(0|o[c>>2])+(0|l(p,v))|0,p),k=C+v|0):k=v,C=0|o[r>>2],p=0|o[9808+(o[C>>2]<<2)>>2],m=C+20|0,y=0|o[d>>2];e:do{if((0|o[y+64>>2])<(0|o[y+56>>2]))for(I=(0|o[C+16>>2])+(0|l(0|o[m>>2],(0|o[e>>2])+b|0))|0,E=0,D=y;;){if((0|o[D+24>>2])>0){L=E,x=D;break e}if(S=0|o[f>>2],(0|o[S+64>>2])>=(0|o[S+56>>2])){L=E,x=D;break e}if((0|o[S+24>>2])>0){L=E,x=D;break e}if(ue(D),ue(0|o[f>>2]),ue(0|o[s>>2]),S=0|o[d>>2],zn[31&p](0|o[S+68>>2],0|o[68+(0|o[f>>2])>>2],0|o[68+(0|o[s>>2])>>2],I,0|o[S+52>>2]),S=E+1|0,_=0|o[d>>2],!((0|o[_+64>>2])<(0|o[_+56>>2]))){L=S,x=_;break}I=I+(0|o[m>>2])|0,E=S,D=_}else L=0,x=y}while(0);if(y=L+b|0,(0|n)<=(0|g)){h=y;break}v=k,b=y,w=x}return 0|h},function(e,r){r|=0;var n=0,t=0,i=0,a=0,f=0,A=0,u=0,s=0;switch(i=(t=1+(n=0|o[16+(e|=0)>>2])|0)>>1,t=0|o[r+24>>2],0|(a=0|o[o[r>>2]>>2])){case 1:case 3:case 4:case 5:case 12:f=3;break;default:(a+-7|0)>>>0<=3&&(f=3)}if(3==(0|f)&&0|(f=0|o[e+104>>2])&&Te(0|o[e+20>>2],0|o[e+32>>2],f,0|o[e>>2],0|o[e+12>>2],n,0),f=0|o[e+32>>2],!(a=(0|n)>0))return 0;A=0,u=n,n=0|o[e+20>>2];do{s=0|Ae(t,u,n,f),n=n+(0|l(s,f))|0,u=u-s|0,A=(0|Re(t))+A|0}while((0|u)>0);if(t=0|o[(u=e+36|0)>>2],f=0|o[r+28>>2],!a)return 0|A;a=i,n=0|o[e+24>>2];do{s=0|Ae(f,a,n,t),n=n+(0|l(s,t))|0,a=a-s|0,Re(f)}while((0|a)>0);a=0|o[u>>2],u=0|o[r+32>>2],r=i,i=0|o[e+28>>2];do{e=0|Ae(u,r,i,a),i=i+(0|l(e,a))|0,r=r-e|0,Re(u)}while((0|r)>0);return 0|A},function(e,r){var n,t,i;return e|=0,n=0|o[(r|=0)>>2],r=0|o[n+20>>2],t=(0|o[n+16>>2])+(0|l(r,0|o[e+8>>2]))|0,i=e+16|0,function(e,r,n,t,i,o,a,f,A,u){e|=0,r|=0,n|=0,t|=0,i|=0,o|=0,a|=0,f|=0,u|=0;var s=0,l=0;if(!((0|(A|=0))<=0))for(s=e,e=n,n=t,t=o,o=0;zn[31&u](s,e,n,t,f),l=0==(1&o|0),(0|(o=o+1|0))!=(0|A);)s=s+r|0,e=l?e:e+i|0,n=l?n:n+i|0,t=t+a|0}(0|o[e+20>>2],0|o[e+32>>2],0|o[e+24>>2],0|o[e+28>>2],0|o[e+36>>2],t,r,0|o[e+12>>2],0|o[i>>2],0|o[9872+(o[n>>2]<<2)>>2]),0|o[i>>2]},function(e,r){r|=0;var n,t,i,a,f,A,u,s,c,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0;if(d=0|o[16+(e|=0)>>2],h=0|o[r>>2],v=0|o[e+8>>2],b=0|o[(n=h+20|0)>>2],t=(0|o[h+16>>2])+(0|l(b,v))|0,i=0|o[9744+(o[h>>2]<<2)>>2],h=0|o[e+20>>2],g=0|o[e+24>>2],a=0|o[e+28>>2],f=r+8|0,A=r+12|0,u=v+d|0,c=(1+(s=0|o[e+12>>2])|0)/2|0,v?(Wn[7&i](0|o[r+4>>2],h,0|o[f>>2],0|o[A>>2],g,a,t+(0-b)|0,t,s),w=d+1|0):(Wn[7&i](h,0,g,a,g,a,t,0,s),w=d),(0|(d=v+2|0))<(0|u))for(v=e+36|0,b=e+32|0,m=t,k=h,p=a,C=g,y=d;;){if(I=C+(d=0|o[v>>2])|0,E=p+d|0,D=m+((d=0|o[n>>2])<<1)|0,x=k+((L=0|o[b>>2])<<1)|0,Wn[7&i](x+(0-L)|0,x,C,p,I,E,D+(0-d)|0,D,s),(0|(y=y+2|0))>=(0|u)){S=D,_=x,B=E,M=I,F=b;break}m=D,k=x,p=E,C=I}else S=t,_=h,B=a,M=g,F=e+32|0;return g=_+(0|o[F>>2])|0,((0|o[e+84>>2])+u|0)<(0|o[e+88>>2])?(In(0|o[r+4>>2],0|g,0|s),In(0|o[f>>2],0|M,0|c),In(0|o[A>>2],0|B,0|c),0|w+-1):1&u|0?0|w:(Wn[7&i](g,0,M,B,M,B,S+(0|o[n>>2])|0,0,s),0|w)},function(e,r){e|=0;var n,t,i,a,f,A,u,s,c,d=0,h=0,v=0,b=0,g=0;if(d=0|o[(r|=0)>>2],r=0|o[e+8>>2],n=d+32|0,t=(0|o[d+16>>2])+(0|l(0|o[n>>2],r))|0,h=r>>1,r=d+36|0,i=(0|o[d+20>>2])+(0|l(0|o[r>>2],h))|0,a=d+40|0,f=(0|o[d+24>>2])+(0|l(0|o[a>>2],h))|0,A=(1+(h=0|o[e+12>>2])|0)/2|0,u=(1+(v=0|o[(d=e+16|0)>>2])|0)/2|0,!(b=(0|v)>0))return 0|o[d>>2];if(c=e+32|0,In(0|t,0|o[(s=e+20|0)>>2],0|h),1!=(0|v)){g=1;do{In(0|t+(0|l(0|o[n>>2],g)),(0|o[s>>2])+(0|l(0|o[c>>2],g))|0,0|h),g=g+1|0}while((0|g)!=(0|v))}if(!b)return 0|o[d>>2];b=e+24|0,v=e+36|0,g=e+28|0,e=0;do{In(0|(h=i+(0|l(0|o[r>>2],e))|0),(0|o[b>>2])+(0|l(0|o[v>>2],e))|0,0|A),In(0|(h=f+(0|l(0|o[a>>2],e))|0),(0|o[g>>2])+(0|l(0|o[v>>2],e))|0,0|A),e=e+1|0}while((0|e)<(0|u));return 0|o[d>>2]},Je,Sn,Sn,Sn,Sn,Sn,Sn,Sn,Sn,Sn,Sn,Sn],Gn=[_n,function(e,r,n){r|=0,n|=0;var t,i,a,f,A,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0;t=O,O=O+48|0,i=t+32|0,u=t+16|0,a=t,s=0|o[(f=28+(e|=0)|0)>>2],o[a>>2]=s,l=(0|o[(A=e+20|0)>>2])-s|0,o[a+4>>2]=l,o[a+8>>2]=r,o[a+12>>2]=n,r=l+n|0,l=e+60|0,o[u>>2]=o[l>>2],o[u+4>>2]=a,o[u+8>>2]=2,s=0|jr(0|D(146,0|u));e:do{if((0|r)!=(0|s)){for(u=2,c=r,d=a,h=s;!((0|h)<0);){if(c=c-h|0,w=u+((b=h>>>0>(v=0|o[d+4>>2])>>>0)<<31>>31)|0,m=h-(b?v:0)|0,o[(g=b?d+8|0:d)>>2]=(0|o[g>>2])+m,o[(v=g+4|0)>>2]=(0|o[v>>2])-m,o[i>>2]=o[l>>2],o[i+4>>2]=g,o[i+8>>2]=w,(0|c)==(0|(h=0|jr(0|D(146,0|i))))){k=3;break e}u=w,d=g}o[e+16>>2]=0,o[f>>2]=0,o[A>>2]=0,o[e>>2]=32|o[e>>2],p=2==(0|u)?0:n-(0|o[d+4>>2])|0}else k=3}while(0);return 3==(0|k)&&(k=0|o[e+44>>2],o[e+16>>2]=k+(0|o[e+48>>2]),e=k,o[f>>2]=e,o[A>>2]=e,p=n),O=t,0|p},function(e,r,n){e|=0,r|=0,n|=0;var t,i,a,f=0;return t=O,O=O+32|0,a=t+20|0,o[(i=t)>>2]=o[e+60>>2],o[i+4>>2]=0,o[i+8>>2]=r,o[i+12>>2]=a,o[i+16>>2]=n,(0|jr(0|E(140,0|i)))<0?(o[a>>2]=-1,f=-1):f=0|o[a>>2],O=t,0|f},function(e,r,n){r|=0,n|=0;var t,i,a,f,A,u,s,c=0,d=0,h=0,v=0;if(!(c=0|o[(t=104+(e|=0)|0)>>2]))return 0;if(i=0|o[r+36>>2],a=(0|o[r+16>>2])+n|0,(0|n)<=0)return 0;for(f=i+60|0,A=e+8|0,u=e+16|0,s=r+52|0,d=n,n=c;c=0|o[f>>2],h=0|o[A>>2],v=0|o[e>>2],Ae(i,h-c+(0|o[u>>2])|0,n+(0|l(v,c-h|0))|0,v),!((0|(v=d-(0|Gn[15&o[s>>2]](r,a-d|0,d))|0))<=0);)d=v,n=0|o[t>>2];return 0},function(e,r,n){e|=0,n|=0;var t,i,a,f=0,A=0,u=0,s=0,c=0,d=0,h=0;if(f=0|o[(r|=0)>>2],A=0|o[f+28>>2],t=0|o[r+16>>2],u=0|o[(i=f+44|0)>>2],a=A+(0|l(u,t))|0,!(s=0|o[e+104>>2])){if(!A)return 0;if(A=0|o[e+96>>2],(0|n)<=0)return 0;for(c=a,d=0;Dn(0|c,-1,0|A),(0|(d=d+1|0))!=(0|n);)c=c+u|0;return 0}if(u=0|o[f+16>>2],f=0|o[(c=f+32|0)>>2],n=0|o[e>>2],d=0|o[e+16>>2],r=0|o[(e=r+36|0)>>2],(0|d)<=0)return 0;A=0,h=d,d=s;do{s=0|Ae(r,h,d,n),d=d+(0|l(s,n))|0,h=h-s|0,A=(0|Re(r))+A|0}while((0|h)>0);return(0|A)<=0?0:(Te(h=u+(0|l(f,t))|0,0|o[c>>2],a,0|o[i>>2],0|o[52+(0|o[e>>2])>>2],A,1),0)},function(e,r,n){r|=0,n|=0;var t,i,a=0,f=0,A=0,u=0;if(n=0|o[104+(e|=0)>>2],a=0|o[r>>2],r=0|o[e+12>>2],t=0|o[e+16>>2],f=0|o[a+28>>2],a=0|o[(i=a+44|0)>>2],A=f+(0|l(a,0|o[e+8>>2]))|0,n){if((0|t)<=0)return 0;for(a=A,A=n,n=0;In(0|a,0|A,0|r),(0|(n=n+1|0))!=(0|t);)a=a+(0|o[i>>2])|0,A=A+(0|o[e>>2])|0;return 0}if(!((0|t)>0&0!=(0|f)))return 0;for(f=A,u=0;Dn(0|f,-1,0|r),(0|(u=u+1|0))!=(0|t);)f=f+a|0;return 0},function(e,r,n){r|=0,n|=0;var t,i,a,f,A,u,s=0,c=0,d=0,h=0,v=0,b=0,g=0;return(n=0|o[104+(e|=0)>>2])?(t=0|o[e+12>>2],i=0|o[r>>2],f=1&(a=4==(0|(r=0|o[i>>2]))|9==(0|r)),A=0|o[e+8>>2],u=0|o[e+16>>2],0|o[e+56>>2]?(A?(h=u,v=A+-1|0,b=n+(0-(0|o[e>>2]))|0):(h=u+-1|0,v=0,b=n),s=(0|(g=u+A+(n=0|o[e+84>>2])|0))==(0|o[e+88>>2])?g-(n+v)|0:h,c=v,d=b):(s=u,c=A,d=n),v=0|o[(b=i+20|0)>>2],h=(0|o[i+16>>2])+(0|l(v,c))|0,(r+-7|0)>>>0>3|0==(0|ge(d,0|o[e>>2],t,s,h+(a?0:3)|0,v))?0:(be(h,f,t,s,0|o[b>>2]),0)):0},function(e,r,n){r|=0,n|=0;var i,f,A,u,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0;if(i=20+(s=0|o[(e|=0)>>2])|0,f=(0|o[s+16>>2])+(0|l(0|o[i>>2],r))|0,e=0|o[(r=e+36|0)>>2],A=0|o[e+52>>2],u=((0|o[s>>2])-7|0)>>>0<4,(0|o[e+64>>2])>=(0|o[e+56>>2]))return 0;if((0|A)<=0){for(s=0,d=e;;){if(!((0|s)<(0|n)&&(0|o[d+24>>2])<1)){c=s,h=13;break}if(ue(d),v=s+1|0,d=0|o[r>>2],(0|o[d+64>>2])>=(0|o[d+56>>2])){c=v,h=13;break}s=v}if(13==(0|h))return 0|c}for(h=15,s=0,d=f+1|0,v=e;;){if(!((0|s)<(0|n)&&(0|o[v+24>>2])<1)){b=h,g=s;break}ue(v),e=0,w=h;do{k=(m=0|a[(0|o[68+(0|o[r>>2])>>2])+e>>0])>>>4,t[(m=d+(e<<1)|0)>>0]=k|-16&t[m>>0]&255,w&=k,e=e+1|0}while((0|e)!=(0|A));if(e=s+1|0,v=0|o[r>>2],(0|o[v+64>>2])>=(0|o[v+56>>2])){b=w,g=e;break}h=w,s=e,d=d+(0|o[i>>2])|0}return u&15!=(0|b)?(ve(f,A,g,0|o[i>>2]),0|(c=g)):0|(c=g)},function(e,r,n){r|=0,n|=0;var t,i,a,f,A,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0;if(u=0|o[(e|=0)>>2],s=0|o[(t=u+20|0)>>2],i=(0|o[u+16>>2])+(0|l(s,r))|0,a=1&(u=4==(0|(r=0|o[u>>2]))|9==(0|r)),f=(r+-7|0)>>>0<4,e=0|o[(r=e+36|0)>>2],A=0|o[e+52>>2],(0|o[e+64>>2])>=(0|o[e+56>>2]))return 0;for(c=0,d=0,h=i+(u?0:3)|0,u=e,e=s;;){if(!((0|d)<(0|n)&&(0|o[u+24>>2])<1)){v=c,b=d,g=e;break}if(ue(u),s=0|ge(0|o[68+(0|o[r>>2])>>2],0,A,1,h,0)|c,w=0|o[t>>2],m=d+1|0,u=0|o[r>>2],(0|o[u+64>>2])>=(0|o[u+56>>2])){v=s,b=m,g=w;break}c=s,d=m,h=h+w|0,e=w}return f&0!=(0|v)?(be(i,a,A,b,g),0|b):0|b},function(e,r,n){r|=0,n|=0;var i,f,A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0;if(!(n=0|o[104+(e|=0)>>2]))return 0;if(i=0|o[e+12>>2],A=0|o[r>>2],r=0|o[A>>2],u=0|o[e+8>>2],f=0|o[e+16>>2],0|o[e+56>>2]?(u?(h=u+-1|0,v=f,b=n+(0-(0|o[e>>2]))|0):(h=0,v=f+-1|0,b=n),s=h,c=(0|(g=f+u+(n=0|o[e+84>>2])|0))==(0|o[e+88>>2])?g-(n+h)|0:v,d=b):(s=u,c=f,d=n),b=A+20|0,v=(0|o[A+16>>2])+(0|l(0|o[b>>2],s))|0,(0|c)<=0)return 0;if((0|i)<=0)return 0;for(s=0,A=15,h=v+1|0,n=d;;){d=0,w=A;do{u=(g=0|a[n+d>>0])>>>4,t[(g=h+(d<<1)|0)>>0]=u|-16&t[g>>0]&255,w&=u,d=d+1|0}while((0|d)!=(0|i));if(m=0|o[b>>2],(0|(s=s+1|0))==(0|c))break;A=w,h=h+m|0,n=n+(0|o[e>>2])|0}return(r+-7|0)>>>0>3|15==(0|w)?0:(ve(v,i,c,m),0)},_n,_n,_n,_n,_n,_n],On=[function(e,r,n,t,i,o){return d(3),0},function(e,r,n,t,f,A){n|=0,t|=0,A|=0;var u,s,d,h,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0;if((0|(f|=0))>=16)return 16;u=4+(e|=0)|0,s=e+8|0,d=e+12|0,h=e+20|0,b=(0|o[(r|=0)+(f<<2)>>2])+(11*n|0)|0,n=f,f=0|o[s>>2],g=0|o[u>>2];e:for(;;){w=0|a[b>>0];do{if((0|f)<0){if((m=0|o[d>>2])>>>0<(0|o[h>>2])>>>0){k=a[m>>0]|a[m+1>>0]<<8|a[m+2>>0]<<16|a[m+3>>0]<<24,o[d>>2]=m+3,m=0|yn(0|k),o[e>>2]=o[e>>2]<<24|m>>>8,m=f+24|0,o[s>>2]=m,p=m;break}Pr(e),p=0|o[s>>2];break}p=f}while(0);if(k=(m=0|l(g,w))>>>8,m=0|o[e>>2],(C=(p?m>>>p:m)>>>0>k>>>0)?(y=m-(k+1<>2]=y,I=g-k|0,E=y):(I=k+1|0,E=m),k=p-(m=24^(0|c(0|I)))|0,o[s>>2]=k,y=(I<>2]=y,!C){v=n,D=37;break}for(C=b,m=n,L=k,k=E,x=y;;){y=0|a[C+1>>0];do{if((0|L)<0){if((S=0|o[d>>2])>>>0<(0|o[h>>2])>>>0){_=a[S>>0]|a[S+1>>0]<<8|a[S+2>>0]<<16|a[S+3>>0]<<24,o[d>>2]=S+3,_=k<<24|(S=0|yn(0|_))>>>8,o[e>>2]=_,S=L+24|0,o[s>>2]=S,B=_,M=S;break}Pr(e),B=0|o[e>>2],M=0|o[s>>2];break}B=k,M=L}while(0);if((S=(M?B>>>M:B)>>>0>(_=(S=0|l(x,y))>>>8)>>>0)?(F=B-(_+1<>2]=F,P=x-_|0,R=F):(P=_+1|0,R=B),T=M-(_=24^(0|c(0|P)))|0,o[s>>2]=T,G=(P<<_)-1|0,o[u>>2]=G,O=m+1|0,S)break;if(16==(0|O)){v=16,D=37;break e}C=0|o[r+(O<<2)>>2],m=O,L=T,k=R,x=G}x=0|o[r+(O<<2)>>2],k=0|a[C+2>>0];do{if((0|T)<0){if((L=0|o[d>>2])>>>0<(0|o[h>>2])>>>0){w=a[L>>0]|a[L+1>>0]<<8|a[L+2>>0]<<16|a[L+3>>0]<<24,o[d>>2]=L+3,w=R<<24|(L=0|yn(0|w))>>>8,o[e>>2]=w,L=T+24|0,o[s>>2]=L,q=w,U=L;break}Pr(e),q=0|o[e>>2],U=0|o[s>>2];break}q=R,U=T}while(0);(L=(U?q>>>U:q)>>>0>(w=(L=0|l(G,k))>>>8)>>>0)?(o[e>>2]=q-(w+1<>2]=S,o[u>>2]=(Y<>2]):(z=1,W=x+11|0,X=S);do{if((0|X)<0){if((S=0|o[d>>2])>>>0<(0|o[h>>2])>>>0){L=a[S>>0]|a[S+1>>0]<<8|a[S+2>>0]<<16|a[S+3>>0]<<24,o[d>>2]=S+3,S=0|yn(0|L),o[e>>2]=o[e>>2]<<24|S>>>8,S=X+24|0,o[s>>2]=S,Q=S;break}Pr(e),Q=0|o[s>>2];break}Q=X}while(0);if(C=(x=0|o[u>>2])>>>1,k=0|o[e>>2],L=(S=C-(Q?k>>>Q:k)|0)>>31,S=Q+-1|0,o[s>>2]=S,w=L+x|1,o[u>>2]=w,o[e>>2]=k-((L&C+1)<0&1)<<2)>>2])),i[A+((0|a[7584+m>>0])<<1)>>1]=C,!((0|m)<15)){v=16,D=37;break}b=W,n=O,f=S,g=w}return 37==(0|D)?0|v:0}],qn=[Bn,function(e){o[(e|=0)>>2]=0,o[e+4>>2]=0,o[e+8>>2]=0,o[e+12>>2]=0,o[e+16>>2]=0,o[e+20>>2]=0},function(e){var r,n,t=0,i=0;if(r=0|o[(e|=0)>>2]){switch(0|o[(n=e+4|0)>>2]){case 0:break;case 1:t=r+28|0,i=6;break;default:e=r+28|0;do{P(0|e,0|r)}while(1!=(0|o[n>>2]));t=e,i=6}6==(0|i)&&(o[n>>2]=2,F(0|t))}},function(e){var r,n=0;(n=0|o[8+(e|=0)>>2])&&(r=0==(0|Tn[31&n](0|o[e+12>>2],0|o[e+16>>2]))&1,o[(n=e+20|0)>>2]=o[n>>2]|r)},function(e){var r,n,t=0,i=0,a=0;if(r=0|o[(e|=0)>>2]){switch(0|o[(n=e+4|0)>>2]){case 0:break;case 1:t=r+28|0,i=6;break;default:a=r+28|0;do{P(0|a,0|r)}while(1!=(0|o[n>>2]));t=a,i=6}6==(0|i)&&(o[n>>2]=0,F(0|t)),T(0|o[r+76>>2],0),B(r+28|0),U(r),o[e>>2]=0}},function(e){var r;r=40+(0|o[40+(e|=0)>>2])|0,U(0|o[r>>2]),o[r>>2]=0},function(e){var r;Dn(0|(e|=0),0|(r=(4+(0|a[e+-32>>0])+(0|a[e+-1>>0])+(0|a[e+-31>>0])+(0|a[e+31>>0])+(0|a[e+-30>>0])+(0|a[e+63>>0])+(0|a[e+-29>>0])+(0|a[e+95>>0])|0)>>>3&255),4),Dn(e+32|0,0|r,4),Dn(e+64|0,0|r,4),Dn(e+96|0,0|r,4)},function(e){e|=0;var r,n,i,f,A,u=0;u=(r=(0|o[2026])+(0-(0|a[e+-33>>0]))|0)+(0|a[e+-1>>0])|0,n=0|a[e+-32>>0],t[e>>0]=0|t[u+n>>0],i=0|a[e+-31>>0],t[e+1>>0]=0|t[u+i>>0],f=0|a[e+-30>>0],t[e+2>>0]=0|t[u+f>>0],A=0|a[e+-29>>0],t[e+3>>0]=0|t[u+A>>0],u=r+(0|a[e+31>>0])|0,t[e+32>>0]=0|t[u+n>>0],t[e+33>>0]=0|t[u+i>>0],t[e+34>>0]=0|t[u+f>>0],t[e+35>>0]=0|t[u+A>>0],u=r+(0|a[e+63>>0])|0,t[e+64>>0]=0|t[u+n>>0],t[e+65>>0]=0|t[u+i>>0],t[e+66>>0]=0|t[u+f>>0],t[e+67>>0]=0|t[u+A>>0],u=r+(0|a[e+95>>0])|0,t[e+96>>0]=0|t[u+n>>0],t[e+97>>0]=0|t[u+i>>0],t[e+98>>0]=0|t[u+f>>0],t[e+99>>0]=0|t[u+A>>0]},function(e){var r,n,i,o=0,f=0,A=0,u=0;o=0|a[(e|=0)-32>>0],n=(A=(r=2+(f=0|a[e+-31>>0])|0)+(0|a[e+-33>>0])+(o<<1)|0)>>>2&255,f=(u=(i=2+(A=0|a[e+-30>>0])|0)+o+(f<<1)|0)>>>2&255,A=(o=r+(A<<1)+(u=0|a[e+-29>>0])|0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>>2&255,t[e+64>>0]=A,t[e+33>>0]=A,t[e+2>>0]=A,l=(A=l+(u<<1)+s|0)>>>2&255,t[e+96>>0]=l,t[e+65>>0]=l,t[e+34>>0]=l,t[e+3>>0]=l,u=(l=u+2+(s<<1)+n|0)>>>2&255,t[e+97>>0]=u,t[e+66>>0]=u,t[e+35>>0]=u,s=(u=s+2+(n<<1)+i|0)>>>2&255,t[e+98>>0]=s,t[e+67>>0]=s,s=n+2+i+(i<<1)|0,t[e+99>>0]=s>>>2},function(e){var r,n,i=0,o=0,f=0,A=0,u=0;r=0|a[(e|=0)-1>>0],i=0|a[e+31>>0],o=0|a[e+63>>0],f=0|a[e+95>>0],A=(n=i+2|0)+(0|a[e+-33>>0])+(r<<1)|0,u=0|l(A>>>2&255,16843009),t[e>>0]=u,t[e+1>>0]=u>>8,t[e+2>>0]=u>>16,t[e+3>>0]=u>>24,u=e+32|0,i=0|l(((A=o+2|0)+r+(i<<1)|0)>>>2&255,16843009),t[u>>0]=i,t[u+1>>0]=i>>8,t[u+2>>0]=i>>16,t[u+3>>0]=i>>24,i=e+64|0,o=0|l((u=n+(o<<1)+f|0)>>>2&255,16843009),t[i>>0]=o,t[i+1>>0]=o>>8,t[i+2>>0]=o>>16,t[i+3>>0]=o>>24,o=e+96|0,f=0|l((e=A+f+(f<<1)|0)>>>2&255,16843009),t[o>>0]=f,t[o+1>>0]=f>>8,t[o+2>>0]=f>>16,t[o+3>>0]=f>>24},function(e){var r,n,i,o,f,A=0,u=0,s=0,l=0,c=0;r=0|a[(e|=0)-1>>0],n=0|a[e+31>>0],A=0|a[e+63>>0],u=0|a[e+-33>>0],s=0|a[e+-32>>0],i=0|a[e+-31>>0],o=0|a[e+-30>>0],f=0|a[e+-29>>0],c=((l=s+1|0)+u|0)>>>1&255,t[e+65>>0]=c,t[e>>0]=c,l=(c=l+i|0)>>>1&255,t[e+66>>0]=l,t[e+1>>0]=l,c=(l=i+1+o|0)>>>1&255,t[e+67>>0]=c,t[e+2>>0]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0)>>>1&255,t[e+34>>0]=c,t[e>>0]=c,l=(c=l+f|0)>>>1&255,t[e+66>>0]=l,t[e+32>>0]=l,c=(l=f+1+n|0)>>>1&255,t[e+98>>0]=c,t[e+64>>0]=c,c=n+1+i|0,t[e+96>>0]=c>>>1,c=u+2+(s<<1)+o|0,t[e+3>>0]=c>>>2,c=A+2+(u<<1)+s|0,t[e+2>>0]=c>>>2,u=(s=(c=r+2|0)+(A<<1)+u|0)>>>2&255,t[e+35>>0]=u,t[e+1>>0]=u,A=(s=(u=f+2|0)+(r<<1)+A|0)>>>2&255,t[e+67>>0]=A,t[e+33>>0]=A,f=(A=c+n+(f<<1)|0)>>>2&255,t[e+99>>0]=f,t[e+65>>0]=f,f=u+i+(n<<1)|0,t[e+97>>0]=f>>>2},function(e){var r,n,i,o=0,f=0,A=0,u=0;r=0|a[(e|=0)-1>>0],n=0|a[e+31>>0],o=0|a[e+63>>0],f=255&(i=0|t[e+95>>0]),u=(A=n+1|0)+r|0,t[e>>0]=u>>>1,A=(u=A+o|0)>>>1&255,t[e+32>>0]=A,t[e+2>>0]=A,u=(A=o+1+f|0)>>>1&255,t[e+64>>0]=u,t[e+34>>0]=u,A=(u=o+2|0)+r+(n<<1)|0,t[e+1>>0]=A>>>2,o=(A=f+2+n+(o<<1)|0)>>>2&255,t[e+33>>0]=o,t[e+3>>0]=o,f=(o=u+f+(f<<1)|0)>>>2&255,t[e+65>>0]=f,t[e+35>>0]=f,t[e+66>>0]=i,t[e+67>>0]=i,Dn(e+96|0,0|i,4)},function(e){var r;Dn(0|(e|=0),0|(r=(16+(0|a[e+-1>>0])+(0|a[e+-32>>0])+(0|a[e+31>>0])+(0|a[e+-31>>0])+(0|a[e+63>>0])+(0|a[e+-30>>0])+(0|a[e+95>>0])+(0|a[e+-29>>0])+(0|a[e+127>>0])+(0|a[e+-28>>0])+(0|a[e+159>>0])+(0|a[e+-27>>0])+(0|a[e+191>>0])+(0|a[e+-26>>0])+(0|a[e+223>>0])+(0|a[e+-25>>0])+(0|a[e+255>>0])+(0|a[e+-24>>0])+(0|a[e+287>>0])+(0|a[e+-23>>0])+(0|a[e+319>>0])+(0|a[e+-22>>0])+(0|a[e+351>>0])+(0|a[e+-21>>0])+(0|a[e+383>>0])+(0|a[e+-20>>0])+(0|a[e+415>>0])+(0|a[e+-19>>0])+(0|a[e+447>>0])+(0|a[e+-18>>0])+(0|a[e+479>>0])+(0|a[e+-17>>0])|0)>>>5&255),16),Dn(e+32|0,0|r,16),Dn(e+64|0,0|r,16),Dn(e+96|0,0|r,16),Dn(e+128|0,0|r,16),Dn(e+160|0,0|r,16),Dn(e+192|0,0|r,16),Dn(e+224|0,0|r,16),Dn(e+256|0,0|r,16),Dn(e+288|0,0|r,16),Dn(e+320|0,0|r,16),Dn(e+352|0,0|r,16),Dn(e+384|0,0|r,16),Dn(e+416|0,0|r,16),Dn(e+448|0,0|r,16),Dn(e+480|0,0|r,16)},function(e){var r,n,i,f,A,u,s,l,c,d,h,v,b,g,w,m,k,p=0,C=0;for(r=(e|=0)-32|0,n=(0|o[2026])+(0-(0|a[e+-33>>0]))|0,i=e+-31|0,f=e+-30|0,A=e+-29|0,u=e+-28|0,s=e+-27|0,l=e+-26|0,c=e+-25|0,d=e+-24|0,h=e+-23|0,v=e+-22|0,b=e+-21|0,g=e+-20|0,w=e+-19|0,m=e+-18|0,k=e+-17|0,p=e,e=0;C=n+(0|a[p+-1>>0])|0,t[p>>0]=0|t[C+(0|a[r>>0])>>0],t[p+1>>0]=0|t[C+(0|a[i>>0])>>0],t[p+2>>0]=0|t[C+(0|a[f>>0])>>0],t[p+3>>0]=0|t[C+(0|a[A>>0])>>0],t[p+4>>0]=0|t[C+(0|a[u>>0])>>0],t[p+5>>0]=0|t[C+(0|a[s>>0])>>0],t[p+6>>0]=0|t[C+(0|a[l>>0])>>0],t[p+7>>0]=0|t[C+(0|a[c>>0])>>0],t[p+8>>0]=0|t[C+(0|a[d>>0])>>0],t[p+9>>0]=0|t[C+(0|a[h>>0])>>0],t[p+10>>0]=0|t[C+(0|a[v>>0])>>0],t[p+11>>0]=0|t[C+(0|a[b>>0])>>0],t[p+12>>0]=0|t[C+(0|a[g>>0])>>0],t[p+13>>0]=0|t[C+(0|a[w>>0])>>0],t[p+14>>0]=0|t[C+(0|a[m>>0])>>0],t[p+15>>0]=0|t[C+(0|a[k>>0])>>0],16!=(0|(e=e+1|0));)p=p+32|0},function(e){var r,n=0,i=0,o=0;i=r=(e|=0)-32|0,o=(n=e)+16|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+32|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+64|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+96|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+128|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+160|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+192|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+224|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+256|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+288|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+320|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+352|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+384|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+416|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+448|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o));i=r,o=16+(n=e+480|0)|0;do{t[n>>0]=0|t[i>>0],n=n+1|0,i=i+1|0}while((0|n)<(0|o))},function(e){Dn(0|(e|=0),0|t[e+-1>>0],16),Dn(e+32|0,0|t[e+31>>0],16),Dn(e+64|0,0|t[e+63>>0],16),Dn(e+96|0,0|t[e+95>>0],16),Dn(e+128|0,0|t[e+127>>0],16),Dn(e+160|0,0|t[e+159>>0],16),Dn(e+192|0,0|t[e+191>>0],16),Dn(e+224|0,0|t[e+223>>0],16),Dn(e+256|0,0|t[e+255>>0],16),Dn(e+288|0,0|t[e+287>>0],16),Dn(e+320|0,0|t[e+319>>0],16),Dn(e+352|0,0|t[e+351>>0],16),Dn(e+384|0,0|t[e+383>>0],16),Dn(e+416|0,0|t[e+415>>0],16),Dn(e+448|0,0|t[e+447>>0],16),Dn(e+480|0,0|t[e+479>>0],16)},function(e){var r;Dn(0|(e|=0),0|(r=(8+(0|a[e+-1>>0])+(0|a[e+31>>0])+(0|a[e+63>>0])+(0|a[e+95>>0])+(0|a[e+127>>0])+(0|a[e+159>>0])+(0|a[e+191>>0])+(0|a[e+223>>0])+(0|a[e+255>>0])+(0|a[e+287>>0])+(0|a[e+319>>0])+(0|a[e+351>>0])+(0|a[e+383>>0])+(0|a[e+415>>0])+(0|a[e+447>>0])+(0|a[e+479>>0])|0)>>>4&255),16),Dn(e+32|0,0|r,16),Dn(e+64|0,0|r,16),Dn(e+96|0,0|r,16),Dn(e+128|0,0|r,16),Dn(e+160|0,0|r,16),Dn(e+192|0,0|r,16),Dn(e+224|0,0|r,16),Dn(e+256|0,0|r,16),Dn(e+288|0,0|r,16),Dn(e+320|0,0|r,16),Dn(e+352|0,0|r,16),Dn(e+384|0,0|r,16),Dn(e+416|0,0|r,16),Dn(e+448|0,0|r,16),Dn(e+480|0,0|r,16)},function(e){var r;Dn(0|(e|=0),0|(r=(8+(0|a[e+-32>>0])+(0|a[e+-31>>0])+(0|a[e+-30>>0])+(0|a[e+-29>>0])+(0|a[e+-28>>0])+(0|a[e+-27>>0])+(0|a[e+-26>>0])+(0|a[e+-25>>0])+(0|a[e+-24>>0])+(0|a[e+-23>>0])+(0|a[e+-22>>0])+(0|a[e+-21>>0])+(0|a[e+-20>>0])+(0|a[e+-19>>0])+(0|a[e+-18>>0])+(0|a[e+-17>>0])|0)>>>4&255),16),Dn(e+32|0,0|r,16),Dn(e+64|0,0|r,16),Dn(e+96|0,0|r,16),Dn(e+128|0,0|r,16),Dn(e+160|0,0|r,16),Dn(e+192|0,0|r,16),Dn(e+224|0,0|r,16),Dn(e+256|0,0|r,16),Dn(e+288|0,0|r,16),Dn(e+320|0,0|r,16),Dn(e+352|0,0|r,16),Dn(e+384|0,0|r,16),Dn(e+416|0,0|r,16),Dn(e+448|0,0|r,16),Dn(e+480|0,0|r,16)},function(e){var r=0,n=0;n=16+(r=e|=0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+32|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+64|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+96|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+128|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+160|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+192|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+224|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+256|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+288|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+320|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+352|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+384|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+416|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+448|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n));n=16+(r=e+480|0)|0;do{t[r>>0]=128,r=r+1|0}while((0|r)<(0|n))},function(e){var r;Dn(0|(e|=0),0|(r=(8+(0|a[e+-32>>0])+(0|a[e+-1>>0])+(0|a[e+-31>>0])+(0|a[e+31>>0])+(0|a[e+-30>>0])+(0|a[e+63>>0])+(0|a[e+-29>>0])+(0|a[e+95>>0])+(0|a[e+-28>>0])+(0|a[e+127>>0])+(0|a[e+-27>>0])+(0|a[e+159>>0])+(0|a[e+-26>>0])+(0|a[e+191>>0])+(0|a[e+-25>>0])+(0|a[e+223>>0])|0)>>>4&255),8),Dn(e+32|0,0|r,8),Dn(e+64|0,0|r,8),Dn(e+96|0,0|r,8),Dn(e+128|0,0|r,8),Dn(e+160|0,0|r,8),Dn(e+192|0,0|r,8),Dn(e+224|0,0|r,8)},function(e){var r,n,i,f,A,u,s,l,c,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0;r=(e|=0)-32|0,d=(n=(0|o[2026])+(0-(0|a[e+-33>>0]))|0)+(0|a[e+-1>>0])|0,h=0|a[r>>0],t[e>>0]=0|t[d+h>>0],v=0|a[(i=e+-31|0)>>0],t[e+1>>0]=0|t[d+v>>0],b=0|a[(f=e+-30|0)>>0],t[e+2>>0]=0|t[d+b>>0],g=0|a[(A=e+-29|0)>>0],t[e+3>>0]=0|t[d+g>>0],w=0|a[(u=e+-28|0)>>0],t[e+4>>0]=0|t[d+w>>0],m=0|a[(s=e+-27|0)>>0],t[e+5>>0]=0|t[d+m>>0],k=0|a[(l=e+-26|0)>>0],t[e+6>>0]=0|t[d+k>>0],p=0|a[(c=e+-25|0)>>0],t[e+7>>0]=0|t[d+p>>0],d=n+(0|a[e+31>>0])|0,t[e+32>>0]=0|t[d+h>>0],t[e+33>>0]=0|t[d+v>>0],t[e+34>>0]=0|t[d+b>>0],t[e+35>>0]=0|t[d+g>>0],t[e+36>>0]=0|t[d+w>>0],t[e+37>>0]=0|t[d+m>>0],t[e+38>>0]=0|t[d+k>>0],t[e+39>>0]=0|t[d+p>>0],d=n+(0|a[e+63>>0])|0,t[e+64>>0]=0|t[d+h>>0],t[e+65>>0]=0|t[d+v>>0],t[e+66>>0]=0|t[d+b>>0],t[e+67>>0]=0|t[d+g>>0],t[e+68>>0]=0|t[d+w>>0],t[e+69>>0]=0|t[d+m>>0],t[e+70>>0]=0|t[d+k>>0],t[e+71>>0]=0|t[d+p>>0],p=n+(0|a[e+95>>0])|0,d=0|a[r>>0],t[e+96>>0]=0|t[p+d>>0],k=0|a[i>>0],t[e+97>>0]=0|t[p+k>>0],m=0|a[f>>0],t[e+98>>0]=0|t[p+m>>0],w=0|a[A>>0],t[e+99>>0]=0|t[p+w>>0],g=0|a[u>>0],t[e+100>>0]=0|t[p+g>>0],b=0|a[s>>0],t[e+101>>0]=0|t[p+b>>0],v=0|a[l>>0],t[e+102>>0]=0|t[p+v>>0],h=0|a[c>>0],t[e+103>>0]=0|t[p+h>>0],p=n+(0|a[e+127>>0])|0,t[e+128>>0]=0|t[p+d>>0],t[e+129>>0]=0|t[p+k>>0],t[e+130>>0]=0|t[p+m>>0],t[e+131>>0]=0|t[p+w>>0],t[e+132>>0]=0|t[p+g>>0],t[e+133>>0]=0|t[p+b>>0],t[e+134>>0]=0|t[p+v>>0],t[e+135>>0]=0|t[p+h>>0],h=n+(0|a[e+159>>0])|0,t[e+160>>0]=0|t[h+d>>0],t[e+161>>0]=0|t[h+k>>0],t[e+162>>0]=0|t[h+(0|a[f>>0])>>0],t[e+163>>0]=0|t[h+(0|a[A>>0])>>0],t[e+164>>0]=0|t[h+(0|a[u>>0])>>0],t[e+165>>0]=0|t[h+(0|a[s>>0])>>0],t[e+166>>0]=0|t[h+(0|a[l>>0])>>0],t[e+167>>0]=0|t[h+(0|a[c>>0])>>0],h=n+(0|a[e+191>>0])|0,t[e+192>>0]=0|t[h+(0|a[r>>0])>>0],t[e+193>>0]=0|t[h+(0|a[i>>0])>>0],t[e+194>>0]=0|t[h+(0|a[f>>0])>>0],t[e+195>>0]=0|t[h+(0|a[A>>0])>>0],t[e+196>>0]=0|t[h+(0|a[u>>0])>>0],t[e+197>>0]=0|t[h+(0|a[s>>0])>>0],t[e+198>>0]=0|t[h+(0|a[l>>0])>>0],t[e+199>>0]=0|t[h+(0|a[c>>0])>>0],h=n+(0|a[e+223>>0])|0,t[e+224>>0]=0|t[h+(0|a[r>>0])>>0],t[e+225>>0]=0|t[h+(0|a[i>>0])>>0],t[e+226>>0]=0|t[h+(0|a[f>>0])>>0],t[e+227>>0]=0|t[h+(0|a[A>>0])>>0],t[e+228>>0]=0|t[h+(0|a[u>>0])>>0],t[e+229>>0]=0|t[h+(0|a[s>>0])>>0],t[e+230>>0]=0|t[h+(0|a[l>>0])>>0],t[e+231>>0]=0|t[h+(0|a[c>>0])>>0]},function(e){var r=0,n=0,i=0,o=0;i=a[(n=r=(e|=0)-32|0)>>0]|a[n+1>>0]<<8|a[n+2>>0]<<16|a[n+3>>0]<<24,r=a[(n=r+4|0)>>0]|a[n+1>>0]<<8|a[n+2>>0]<<16|a[n+3>>0]<<24,t[(o=n=e)>>0]=i,t[o+1>>0]=i>>8,t[o+2>>0]=i>>16,t[o+3>>0]=i>>24,t[(o=n+4|0)>>0]=r,t[o+1>>0]=r>>8,t[o+2>>0]=r>>16,t[o+3>>0]=r>>24,t[(n=o=e+32|0)>>0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),Dn(e+192|0,0|t[e+191>>0],8),Dn(e+224|0,0|t[e+223>>0],8)},function(e){var r;Dn(0|(e|=0),0|(r=(4+(0|a[e+-1>>0])+(0|a[e+31>>0])+(0|a[e+63>>0])+(0|a[e+95>>0])+(0|a[e+127>>0])+(0|a[e+159>>0])+(0|a[e+191>>0])+(0|a[e+223>>0])|0)>>>3&255),8),Dn(e+32|0,0|r,8),Dn(e+64|0,0|r,8),Dn(e+96|0,0|r,8),Dn(e+128|0,0|r,8),Dn(e+160|0,0|r,8),Dn(e+192|0,0|r,8),Dn(e+224|0,0|r,8)},function(e){var r;Dn(0|(e|=0),0|(r=(4+(0|a[e+-32>>0])+(0|a[e+-31>>0])+(0|a[e+-30>>0])+(0|a[e+-29>>0])+(0|a[e+-28>>0])+(0|a[e+-27>>0])+(0|a[e+-26>>0])+(0|a[e+-25>>0])|0)>>>3&255),8),Dn(e+32|0,0|r,8),Dn(e+64|0,0|r,8),Dn(e+96|0,0|r,8),Dn(e+128|0,0|r,8),Dn(e+160|0,0|r,8),Dn(e+192|0,0|r,8),Dn(e+224|0,0|r,8)},function(e){var r=0,n=0;t[(n=r=e|=0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(n=r+4|0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(r=n=e+32|0)>>0]=-2139062144,t[r+1>>0]=-8355712,t[r+2>>0]=-32640,t[r+3>>0]=-128,t[(r=n+4|0)>>0]=-2139062144,t[r+1>>0]=-8355712,t[r+2>>0]=-32640,t[r+3>>0]=-128,t[(n=r=e+64|0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(n=r+4|0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(r=n=e+96|0)>>0]=-2139062144,t[r+1>>0]=-8355712,t[r+2>>0]=-32640,t[r+3>>0]=-128,t[(r=n+4|0)>>0]=-2139062144,t[r+1>>0]=-8355712,t[r+2>>0]=-32640,t[r+3>>0]=-128,t[(n=r=e+128|0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(n=r+4|0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(r=n=e+160|0)>>0]=-2139062144,t[r+1>>0]=-8355712,t[r+2>>0]=-32640,t[r+3>>0]=-128,t[(r=n+4|0)>>0]=-2139062144,t[r+1>>0]=-8355712,t[r+2>>0]=-32640,t[r+3>>0]=-128,t[(n=r=e+192|0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(n=r+4|0)>>0]=-2139062144,t[n+1>>0]=-8355712,t[n+2>>0]=-32640,t[n+3>>0]=-128,t[(e=n=e+224|0)>>0]=-2139062144,t[e+1>>0]=-8355712,t[e+2>>0]=-32640,t[e+3>>0]=-128,t[(e=n+4|0)>>0]=-2139062144,t[e+1>>0]=-8355712,t[e+2>>0]=-32640,t[e+3>>0]=-128},Bn,Bn],Un=[Mn,function(e,r){var n,t,i,a,f,A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0;if(t=100+(e|=0)|0,(0|(u=(r|=0)-(A=0|o[(n=e+108|0)>>2])|0))<=0)return o[(e+116|0)>>2]=r,void(o[n>>2]=r);for(s=0|o[t>>2],i=e+8|0,a=e+20|0,f=e+176|0,c=u,u=(0|o[e+16>>2])+((0|l(s,A))<<2)|0,d=A,h=A,A=s;;){if(s=(0|c)<16?c:16,v=0|o[i>>2],b=0|o[v+40>>2],g=0|o[v>>2],v=0|l(g,s),w=(0|o[b+136>>2])+(0|l(g,d))|0,m=0|o[a>>2],p=h+s|0,(0|(k=0|o[f>>2]))>0){if(oe(e+180+(20*(C=k+-1|0)|0)|0,h,p,u,m),1!=(0|k)){k=C;do{C=k,oe(e+180+(20*(k=k+-1|0)|0)|0,h,p,m,m)}while((0|C)>1)}}else(0|m)!=(0|u)&&In(0|m,0|u,0|l(s<<2,A));if(me(m,w,v),p=s+d|0,0|(C=0|o[(k=b+12|0)>>2])){if(I=0|o[(y=b+140|0)>>2],(0|c)>0){if(E=0|l(g,s+-1|0),Yn[31&o[9472+(C<<2)>>2]](I,w,w,g),(0|(C=d+1|0))!=(0|p)){D=w,L=C;do{C=D,D=D+g|0,Yn[31&o[9472+(o[k>>2]<<2)>>2]](C,D,D,g),L=L+1|0}while((0|L)!=(0|p))}x=w+E|0}else x=I;o[y>>2]=x}if(L=c-s|0,g=0|o[t>>2],(0|L)<=0)break;c=L,u=D=u+((0|l(g,s))<<2)|0,d=p,h=0|o[n>>2],A=g}o[(e+116|0)>>2]=r,o[n>>2]=r},function(e,r){var n,t,i,a=0,f=0,A=0,u=0,s=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0;if((0|(f=(r|=0)-(a=0|o[(n=108+(e|=0)|0)>>2])|0))<=0)o[n>>2]=r;else{if(A=0|o[e+100>>2],u=(0|o[e+16>>2])+((0|l(A,a))<<2)|0,t=0|o[e+8>>2],s=0|o[e+20>>2],i=o[t>>2]<<2,d=s,(0|(c=0|o[e+176>>2]))>0){if(oe(e+180+(20*(h=c+-1|0)|0)|0,a,r,u,d),1!=(0|c)){c=h;do{h=c,oe(e+180+(20*(c=c+-1|0)|0)|0,a,r,d,d)}while((0|h)>1)}}else(0|u)!=(0|d)&&In(0|s,0|u,0|l(f<<2,A));if(A=0|o[n>>2],(0|(u=(0|(f=0|o[t+88>>2]))<(0|r)?f:r))<=(0|(a=(d=(0|(f=0|o[t+84>>2]))>(0|A))?f:A)))o[n>>2]=r;else{if(c=s+(0|l(f-A|0,i))|0,h=(d?c:s)+((A=0|o[t+76>>2])<<2)|0,o[t+8>>2]=a-f,f=(0|o[t+80>>2])-A|0,o[t+12>>2]=f,A=u-a|0,o[t+16>>2]=A,u=0|o[(a=e+12|0)>>2],(s=0|o[u>>2])>>>0<=10){if(c=e+116|0,d=0|o[u+20>>2],v=(0|o[u+16>>2])+(0|l(d,0|o[c>>2]))|0,b=(0|A)>0,0|o[t+92>>2])if(b)for(b=e+268|0,m=0,w=0;;){g=h+(0|l(w,i))|0,p=v+(0|l(m,d))|0,C=A-w|0,y=0|ae(0|o[b>>2],C),fe(g,i,0|o[44+(0|o[b>>2])>>2],y,0),w=(0|Ae(0|o[b>>2],C,g,i))+w|0,g=0|o[b>>2],C=0|o[g+68>>2],y=0|o[g+52>>2],I=g+24|0,E=g+56|0,D=g+64|0;e:do{if((0|o[D>>2])<(0|o[E>>2]))for(L=0;;){if((0|o[I>>2])>0){x=L;break e}if(S=p+(0|l(L,d))|0,ue(g),de(C,y,1),se(C,y,s,S),S=L+1|0,!((0|o[D>>2])<(0|o[E>>2]))){x=S;break}L=S}else x=0}while(0);if(E=x+m|0,(0|w)>=(0|A)){k=E;break}m=E}else k=0;else if(b)for(g=A,w=h,m=v;;){if(se(w,f,s,m),!((0|g)>1)){k=A;break}g=g+-1|0,w=w+i|0,m=m+d|0}else k=A;return o[c>>2]=(0|o[c>>2])+k,void(o[n>>2]=r)}c=0|o[(k=e+116|0)>>2],m=(0|A)>0;e:do{if(0|o[t+92>>2])if(m)for(d=e+268|0,s=0,x=c,w=h;;){b=A-s|0,v=0|ae(0|o[d>>2],b),fe(w,i,0|o[44+(0|o[d>>2])>>2],v,0),s=(0|Ae(0|o[d>>2],b,w,i))+s|0,w=w+(0|l(v,i))|0,v=0|o[d>>2],b=0|o[v+68>>2],E=0|o[v+52>>2],D=v+24|0,y=v+56|0,C=v+64|0;r:do{if((0|o[C>>2])<(0|o[y>>2]))for(g=b+3|0,p=x,I=0;;){if((0|o[D>>2])>0){B=I;break r}if(ue(v),de(b,E,1),L=0|o[a>>2],Mr(b,(0|o[L+16>>2])+(0|l(0|o[L+32>>2],p))|0,E),S=p>>1,Fr(b,(0|o[L+20>>2])+(0|l(0|o[L+36>>2],S))|0,(0|o[L+24>>2])+(0|l(0|o[L+40>>2],S))|0,E,1&p^1),0|(S=0|o[L+28>>2])&&we(g,0,E,1,S+(0|l(0|o[L+44>>2],p))|0,0),L=I+1|0,!((0|o[C>>2])<(0|o[y>>2]))){B=L;break}p=p+1|0,I=L}else B=0}while(0);if(y=B+x|0,(0|s)>=(0|A)){_=y;break}x=y}else _=c;else if(m)for(w=A,x=h,s=c,d=u;;){if(Mr(x,(0|o[d+16>>2])+(0|l(0|o[d+32>>2],s))|0,f),b=s>>1,Fr(x,v=(0|o[d+20>>2])+(0|l(0|o[d+36>>2],b))|0,(0|o[d+24>>2])+(0|l(0|o[d+40>>2],b))|0,f,1&s^1),0|(b=0|o[d+28>>2])&&we(x+3|0,0,f,1,b+(0|l(0|o[d+44>>2],s))|0,0),b=s+1|0,(0|w)<=1){_=b;break e}w=w+-1|0,x=x+i|0,s=b,d=0|o[a>>2]}else _=c}while(0);o[k>>2]=_,o[n>>2]=r}}},Mn],Yn=[Fn,function(e,r,n,i){r|=0,n|=0,i|=0;var o=0;if(o=(e|=0)?0|t[e>>0]:0,!((0|i)<=0)){e=o,o=0;do{e=(0|a[r+o>>0])+(255&e)&255,t[n+o>>0]=e,o=o+1|0}while((0|o)!=(0|i))}},function(e,r,n,i){r|=0,n|=0;var o=0,f=0,A=0;if(o=(0|(i|=0))>0,e|=0){if(!o)return;o=0;do{t[n+o>>0]=(0|a[r+o>>0])+(0|a[e+o>>0]),o=o+1|0}while((0|o)!=(0|i))}else if(o){f=0,A=0;do{f=(255&f)+(0|a[r+A>>0])|0,t[n+A>>0]=f,A=A+1|0}while((0|A)!=(0|i))}},function(e,r,n,i){r|=0,n|=0,i|=0;var o=0,f=0,A=0,u=0,s=0;if(e|=0){if(f=0|t[e>>0],!((0|i)<=0)&&(A=((o=(255&f)-(255&f)+(255&f)|0)>>>0<256?o:255+(o>>>31)|0)+(0|a[r>>0])|0,t[n>>0]=A,1!=(0|i))){o=1,u=A,A=f;do{u=((s=(255&u)-(255&(f=A))+(255&(A=0|t[e+o>>0]))|0)>>>0<256?s:255+(s>>>31)|0)+(0|a[r+o>>0])|0,t[n+o>>0]=u,o=o+1|0}while((0|o)!=(0|i))}}else{if((0|i)<=0)return;o=0,f=0;do{o=(255&o)+(0|a[r+f>>0])|0,t[n+f>>0]=o,f=f+1|0}while((0|f)!=(0|i))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0;if(!((0|(n|=0))<=0)){r=0;do{i=0|o[e+(r<<2)>>2],o[t+(r<<2)>>2]=i+-16777216&-16711936|16711935&i,r=r+1|0}while((0|r)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0;if(!((0|(n|=0))<=0)){r=0,i=0|o[t+-4>>2];do{i=(-16711936&(a=0|o[e+(r<<2)>>2]))+(-16711936&i)&-16711936|(16711935&a)+(16711935&i)&16711935,o[t+(r<<2)>>2]=i,r=r+1|0}while((0|r)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0;if(!((0|(n|=0))<=0)){i=0;do{a=0|o[r+(i<<2)>>2],f=0|o[e+(i<<2)>>2],o[t+(i<<2)>>2]=(-16711936&f)+(-16711936&a)&-16711936|(16711935&f)+(16711935&a)&16711935,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0;if(!((0|(n|=0))<=0)){i=0;do{a=0|o[r+(i<<2)+4>>2],f=0|o[e+(i<<2)>>2],o[t+(i<<2)>>2]=(-16711936&f)+(-16711936&a)&-16711936|(16711935&f)+(16711935&a)&16711935,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0;if(!((0|(n|=0))<=0)){i=0;do{a=0|o[r+(i<<2)+-4>>2],f=0|o[e+(i<<2)>>2],o[t+(i<<2)>>2]=(-16711936&f)+(-16711936&a)&-16711936|(16711935&f)+(16711935&a)&16711935,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0,u=0,s=0;if(!((0|(n|=0))<=0)){i=0,a=0|o[t+-4>>2];do{A=0|o[(f=r+(i<<2)|0)>>2],a=(-16711936&(f=((u=(s=((f=(u=0|o[f+4>>2])^a)>>>1&2139062143)+(u&a)|0)^A)>>>1&2139062143)+(s&A)|0))+(-16711936&(A=0|o[e+(i<<2)>>2]))&-16711936|(16711935&f)+(16711935&A)&16711935,o[t+(i<<2)>>2]=a,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0;if(!((0|(n|=0))<=0)){i=0,a=0|o[t+-4>>2];do{a=(-16711936&(A=(((f=0|o[r+(i<<2)+-4>>2])^a)>>>1&2139062143)+(f&a)|0))+(-16711936&(f=0|o[e+(i<<2)>>2]))&-16711936|(16711935&A)+(16711935&f)&16711935,o[t+(i<<2)>>2]=a,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0;if(!((0|(n|=0))<=0)){i=0,a=0|o[t+-4>>2];do{a=(-16711936&(A=(((f=0|o[r+(i<<2)>>2])^a)>>>1&2139062143)+(f&a)|0))+(-16711936&(f=0|o[e+(i<<2)>>2]))&-16711936|(16711935&A)+(16711935&f)&16711935,o[t+(i<<2)>>2]=a,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0,u=0;if(!((0|(n|=0))<=0)){i=0;do{f=0|o[(a=r+(i<<2)|0)-4>>2],u=((a=(A=0|o[a>>2])^f)>>>1&2139062143)+(A&f)|0,f=0|o[e+(i<<2)>>2],o[t+(i<<2)>>2]=(-16711936&u)+(-16711936&f)&-16711936|(16711935&u)+(16711935&f)&16711935,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0,u=0;if(!((0|(n|=0))<=0)){i=0;do{f=0|o[(a=r+(i<<2)|0)>>2],u=((a=(A=0|o[a+4>>2])^f)>>>1&2139062143)+(A&f)|0,f=0|o[e+(i<<2)>>2],o[t+(i<<2)>>2]=(-16711936&u)+(-16711936&f)&-16711936|(16711935&u)+(16711935&f)&16711935,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0,u=0,s=0,l=0;if(!((0|(n|=0))<=0)){i=0,a=0|o[t+-4>>2];do{A=0|o[(f=r+(i<<2)|0)-4>>2],u=0|o[f>>2],s=0|o[f+4>>2],l=((f=A^a)>>>1&2139062143)+(A&a)|0,a=(-16711936&(s=((u=(f=((A=s^u)>>>1&2139062143)+(s&u)|0)^l)>>>1&2139062143)+(f&l)|0))+(-16711936&(l=0|o[e+(i<<2)>>2]))&-16711936|(16711935&s)+(16711935&l)&16711935,o[t+(i<<2)>>2]=a,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0;if(!((0|(n|=0))<=0)){i=0,a=0|o[t+-4>>2];do{A=0|o[(f=r+(i<<2)|0)>>2],s=(a>>>24)-(f=(u=0|o[f+-4>>2])>>>24)|0,l=(A>>>24)-f|0,c=(a>>>16&255)-(f=u>>>16&255)|0,d=(A>>>16&255)-f|0,h=(a>>>8&255)-(f=u>>>8&255)|0,v=(A>>>8&255)-f|0,a=(-16711936&(f=(((0|(u=(255&a)-(f=255&u)|0))>-1?u:0-u|0)-((0|(b=(255&A)-f|0))>-1?b:0-b|0)-((0|l)>-1?l:0-l|0)+((0|s)>-1?s:0-s|0)-((0|v)>-1?v:0-v|0)+((0|h)>-1?h:0-h|0)-((0|d)>-1?d:0-d|0)+((0|c)>-1?c:0-c|0)|0)<1?A:a))+(-16711936&(A=0|o[e+(i<<2)>>2]))&-16711936|(16711935&f)+(16711935&A)&16711935,o[t+(i<<2)>>2]=a,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0;if(!((0|(n|=0))<=0)){i=0,a=0|o[t+-4>>2];do{a=(-16711936&(u=((f=((A=0|o[(f=r+(i<<2)|0)>>2])>>>24)+(a>>>24)-((u=0|o[f+-4>>2])>>>24)|0)>>>0<256?f:f>>>24^255)<<24|((c=(255&A)+(255&a)-(255&u)|0)>>>0<256?c:c>>>24^255)|((s=(A>>>16&255)+(a>>>16&255)-(u>>>16&255)|0)>>>0<256?s:s>>>24^255)<<16|((l=(A>>>8&255)+(a>>>8&255)-(u>>>8&255)|0)>>>0<256?l:l>>>24^255)<<8))+(-16711936&(l=0|o[e+(i<<2)>>2]))&-16711936|(16711935&u)+(16711935&l)&16711935,o[t+(i<<2)>>2]=a,i=i+1|0}while((0|i)!=(0|n))}},function(e,r,n,t){e|=0,r|=0,t|=0;var i=0,a=0,f=0,A=0,u=0,s=0,l=0,c=0;if(!((0|(n|=0))<=0)){i=0,a=0|o[t+-4>>2];do{A=0|o[(f=r+(i<<2)|0)>>2],u=0|o[f+-4>>2],f=(((A=(s=((f=A^a)>>>1&2139062143)+(A&a)|0)>>>24)-(u>>>24)|0)/2|0)+A|0,l=(((A=s>>>16&255)-(u>>>16&255)|0)/2|0)+A|0,c=(((A=s>>>8&255)-(u>>>8&255)|0)/2|0)+A|0,a=(-16711936&(A=(f>>>0<256?f:f>>>24^255)<<24|((s=(((A=255&s)-(255&u)|0)/2|0)+A|0)>>>0<256?s:s>>>24^255)|(l>>>0<256?l:l>>>24^255)<<16|(c>>>0<256?c:c>>>24^255)<<8))+(-16711936&(c=0|o[e+(i<<2)>>2]))&-16711936|(16711935&A)+(16711935&c)&16711935,o[t+(i<<2)>>2]=a,i=i+1|0}while((0|i)!=(0|n))}},Fn,Fn,Fn,Fn,Fn,Fn,Fn,Fn,Fn,Fn,Fn,Fn,Fn,Fn],zn=[Pn,function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f,A=0,u=0,s=0,l=0,c=0;if(t[(o|=0)>>0]=0|t[e>>0],A=e+1|0,u=o+1|0,f=r+-1|0,s=(0|r)>1){r=0;do{t[u+r>>0]=(0|a[A+r>>0])-(0|a[e+r>>0]),r=r+1|0}while((0|r)!=(0|f))}if(r=e+i|0,A=o+i|0,!((0|n)<=1))if(s)for(l=1,u=r,r=A,A=e;;){t[r>>0]=(0|a[u>>0])-(0|a[A>>0]),e=u+1|0,o=r+1|0,s=0;do{t[o+s>>0]=(0|a[e+s>>0])-(0|a[u+s>>0]),s=s+1|0}while((0|s)!=(0|f));if((0|(l=l+1|0))==(0|n))break;s=u,u=u+i|0,r=r+i|0,A=s}else for(s=1,o=r,u=A,l=e;t[u>>0]=(0|a[o>>0])-(0|a[l>>0]),(0|(s=s+1|0))!=(0|n);)c=o,o=o+i|0,u=u+i|0,l=c},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f,A=0,u=0,s=0;if(t[(o|=0)>>0]=0|t[e>>0],A=e+1|0,f=o+1|0,u=r+-1|0,(0|r)>1){s=0;do{t[f+s>>0]=(0|a[A+s>>0])-(0|a[e+s>>0]),s=s+1|0}while((0|s)!=(0|u))}if((0|r)>0&(0|n)>1){u=1,s=o,o=e;do{e=o,o=o+i|0,s=s+i|0,A=0;do{t[s+A>>0]=(0|a[o+A>>0])-(0|a[e+A>>0]),A=A+1|0}while((0|A)!=(0|r));u=u+1|0}while((0|u)!=(0|n))}},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f=0,A=0,u=0,s=0,l=0,c=0,d=0;if(t[(o|=0)>>0]=0|t[e>>0],f=e+1|0,A=o+1|0,u=r+-1|0,s=(0|r)>1){l=0;do{t[A+l>>0]=(0|a[f+l>>0])-(0|a[e+l>>0]),l=l+1|0}while((0|l)!=(0|u))}if(u=o+i|0,o=e+i|0,!((0|n)<=1))if(l=~i,s)for(c=1,A=u,u=o,o=e;;){t[A>>0]=(0|a[u>>0])-(0|a[o>>0]),e=1;do{f=(0|a[o+e>>0])+(0|a[u+(e+-1)>>0])-(0|a[u+(e+l)>>0])|0,t[A+e>>0]=(0|a[u+e>>0])-(f>>>0<256?f:255+(f>>>31)|0),e=e+1|0}while((0|e)!=(0|r));if((0|(c=c+1|0))==(0|n))break;e=u,A=A+i|0,u=u+i|0,o=e}else for(s=1,f=u,A=o,c=e;t[f>>0]=(0|a[A>>0])-(0|a[c>>0]),(0|(s=s+1|0))!=(0|n);)d=A,f=f+i|0,A=A+i|0,c=d},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0;if(!((0|(o|=0))<=0)){f=0;do{A=i+(f<<2)|0,u=0|a[r+f>>0],s=0|a[n+f>>0],d=(c=(l=(19077*(0|a[e+f>>0])|0)>>>8)-14234+((26149*s|0)>>>8)|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[A>>0]=d,h=(s=l+8708-((c=6419*u|0)>>>8)-((13320*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,t[A+1>>0]=h,v=(u=l+-17685+((s=33050*u|0)>>>8)|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,t[A+2>>0]=v,t[A+3>>0]=-1,f=f+1|0}while((0|f)!=(0|o))}},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0;if(!((0|(o|=0))<=0)){f=0;do{A=i+(f<<2)|0,u=0|a[r+f>>0],s=0|a[n+f>>0],h=(d=(c=(l=19077*(0|a[e+f>>0])|0)>>>8)-17685+((l=33050*u|0)>>>8)|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,t[A>>0]=h,v=(l=c+8708-((d=6419*u|0)>>>8)-((u=13320*s|0)>>>8)|0)>>>0<16384?l>>>6:255+(l>>31&-255)|0,t[A+1>>0]=v,b=(s=c+-14234+((l=26149*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,t[A+2>>0]=b,t[A+3>>0]=-1,f=f+1|0}while((0|f)!=(0|o))}},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0;if(!((0|(o|=0))<=0)){f=0;do{A=0|a[r+f>>0],u=0|a[n+f>>0],s=i+(3*f|0)|0,d=(c=(l=(19077*(0|a[e+f>>0])|0)>>>8)-14234+((26149*u|0)>>>8)|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[s>>0]=d,h=(u=l+8708-((c=6419*A|0)>>>8)-((13320*u|0)>>>8)|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,t[s+1>>0]=h,v=(A=l+-17685+((u=33050*A|0)>>>8)|0)>>>0<16384?A>>>6:255+(A>>31&-255)|0,t[s+2>>0]=v,f=f+1|0}while((0|f)!=(0|o))}},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0;if(!((0|(o|=0))<=0)){f=0;do{A=0|a[r+f>>0],u=0|a[n+f>>0],s=i+(3*f|0)|0,h=(d=(c=(l=19077*(0|a[e+f>>0])|0)>>>8)-17685+((l=33050*A|0)>>>8)|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,t[s>>0]=h,v=(l=c+8708-((d=6419*A|0)>>>8)-((A=13320*u|0)>>>8)|0)>>>0<16384?l>>>6:255+(l>>31&-255)|0,t[s+1>>0]=v,b=(u=c+-14234+((l=26149*u|0)>>>8)|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,t[s+2>>0]=b,f=f+1|0}while((0|f)!=(0|o))}},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var a=0,f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0;if(!((0|(o|=0))<=0)){a=0;do{f=0|t[e+a>>0],A=0|t[r+a>>0],u=0|t[n+a>>0],t[(s=i+(a<<2)|0)>>0]=-1,l=255&A,A=255&u,d=(c=(f=(u=19077*(255&f)|0)>>>8)-14234+((u=26149*A|0)>>>8)|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[s+1>>0]=d,h=(A=f+8708-((c=6419*l|0)>>>8)-((u=13320*A|0)>>>8)|0)>>>0<16384?A>>>6:255+(A>>31&-255)|0,t[s+2>>0]=h,v=(l=f+-17685+((A=33050*l|0)>>>8)|0)>>>0<16384?l>>>6:255+(l>>31&-255)|0,t[s+3>>0]=v,a=a+1|0}while((0|a)!=(0|o))}},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0;if(!((0|(o|=0))<=0)){f=0;do{A=0|a[r+f>>0],u=0|a[n+f>>0],s=i+(f<<1)|0,d=(c=(l=(19077*(0|a[e+f>>0])|0)>>>8)-14234+((26149*u|0)>>>8)|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,h=(u=l+8708-((c=6419*A|0)>>>8)-((13320*u|0)>>>8)|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,v=(A=l+-17685+((u=33050*A|0)>>>8)|0)>>>0<16384?A>>>6:255+(A>>31&-255)|0,t[s>>0]=h>>>4|240&d,t[s+1>>0]=15|v,f=f+1|0}while((0|f)!=(0|o))}},function(e,r,n,i,o){e|=0,r|=0,n|=0,i|=0;var f=0,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0;if(!((0|(o|=0))<=0)){f=0;do{A=0|a[r+f>>0],u=0|a[n+f>>0],s=i+(f<<1)|0,d=(c=(l=(19077*(0|a[e+f>>0])|0)>>>8)-14234+((26149*u|0)>>>8)|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,h=(u=l+8708-((c=6419*A|0)>>>8)-((13320*u|0)>>>8)|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,v=(A=l+-17685+((u=33050*A|0)>>>8)|0)>>>0<16384?A>>>6:255+(A>>31&-255)|0,t[s>>0]=h>>>5|248&d,t[s+1>>0]=v>>>3|h<<3&224,f=f+1|0}while((0|f)!=(0|o))}},function(e,r,n,i,o){e|=0,r|=0,n|=0;var f,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0;if(f=(i|=0)+(3*(A=-2&(o|=0))|0)|0,A)for(A=r,r=i,i=n,n=e;;){if(e=0|a[A>>0],d=0|a[i>>0],g=(b=(v=(h=19077*(0|a[n>>0])|0)>>>8)-14234+((h=26149*d|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[r>>0]=g,w=(d=v+8708-((b=6419*e|0)>>>8)-((h=13320*d|0)>>>8)|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,t[r+1>>0]=w,m=(e=v+-17685+((d=33050*e|0)>>>8)|0)>>>0<16384?e>>>6:255+(e>>31&-255)|0,t[r+2>>0]=m,e=0|a[A>>0],d=0|a[i>>0],k=(b=(h=(v=19077*(0|a[n+1>>0])|0)>>>8)-14234+((v=26149*d|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[r+3>>0]=k,p=(d=h+8708-((b=6419*e|0)>>>8)-((v=13320*d|0)>>>8)|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,t[r+4>>0]=p,C=(e=h+-17685+((d=33050*e|0)>>>8)|0)>>>0<16384?e>>>6:255+(e>>31&-255)|0,t[r+5>>0]=C,e=n+2|0,d=A+1|0,h=i+1|0,(0|(r=r+6|0))==(0|f)){u=e,s=d,l=f,c=h;break}A=d,i=h,n=e}else u=e,s=r,l=i,c=n;1&o&&(o=0|a[s>>0],s=0|a[c>>0],y=(n=(u=(c=19077*(0|a[u>>0])|0)>>>8)-14234+((c=26149*s|0)>>>8)|0)>>>0<16384?n>>>6:255+(n>>31&-255)|0,t[l>>0]=y,I=(s=u+8708-((y=6419*o|0)>>>8)-((n=13320*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,t[l+1>>0]=I,E=(o=u+-17685+((I=33050*o|0)>>>8)|0)>>>0<16384?o>>>6:255+(o>>31&-255)|0,t[l+2>>0]=E)},function(e,r,n,i,o){e|=0,r|=0,n|=0;var f,A,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0;if(A=(i|=0)+(f=(o|=0)<<2&-8)|0,f){for(h=2+((d=f+-8|0)>>>2)|0,d=r+(v=1+(d>>>3)|0)|0,b=r,r=i,g=n,w=e;m=0|a[b>>0],k=0|a[g>>0],I=(y=(C=(p=19077*(0|a[w>>0])|0)>>>8)-14234+((p=26149*k|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,t[r>>0]=I,E=(k=C+8708-((y=6419*m|0)>>>8)-((p=13320*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[r+1>>0]=E,D=(m=C+-17685+((k=33050*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r+2>>0]=D,t[r+3>>0]=-1,m=0|a[b>>0],k=0|a[g>>0],L=(y=(p=(C=19077*(0|a[w+1>>0])|0)>>>8)-14234+((C=26149*k|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,t[r+4>>0]=L,x=(k=p+8708-((y=6419*m|0)>>>8)-((C=13320*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[r+5>>0]=x,S=(m=p+-17685+((k=33050*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r+6>>0]=S,t[r+7>>0]=-1,(0|(r=r+8|0))!=(0|A);)b=b+1|0,g=g+1|0,w=w+2|0;u=e+h|0,s=d,l=i+f|0,c=n+v|0}else u=e,s=r,l=i,c=n;1&o&&(o=0|a[s>>0],s=0|a[c>>0],_=(v=(u=(c=19077*(0|a[u>>0])|0)>>>8)-14234+((c=26149*s|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[l>>0]=_,B=(s=u+8708-((_=6419*o|0)>>>8)-((v=13320*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,t[l+1>>0]=B,M=(o=u+-17685+((B=33050*o|0)>>>8)|0)>>>0<16384?o>>>6:255+(o>>31&-255)|0,t[l+2>>0]=M,t[l+3>>0]=-1)},function(e,r,n,i,o){e|=0,r|=0,n|=0;var f,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0;if(f=(i|=0)+(3*(A=-2&(o|=0))|0)|0,A)for(A=r,r=i,i=n,n=e;;){if(e=0|a[A>>0],d=0|a[i>>0],g=(b=(v=(h=19077*(0|a[n>>0])|0)>>>8)-17685+((h=33050*e|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[r>>0]=g,w=(h=v+8708-((b=6419*e|0)>>>8)-((e=13320*d|0)>>>8)|0)>>>0<16384?h>>>6:255+(h>>31&-255)|0,t[r+1>>0]=w,m=(d=v+-14234+((h=26149*d|0)>>>8)|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,t[r+2>>0]=m,d=0|a[A>>0],h=0|a[i>>0],k=(b=(e=(v=19077*(0|a[n+1>>0])|0)>>>8)-17685+((v=33050*d|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[r+3>>0]=k,p=(v=e+8708-((b=6419*d|0)>>>8)-((d=13320*h|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[r+4>>0]=p,C=(h=e+-14234+((v=26149*h|0)>>>8)|0)>>>0<16384?h>>>6:255+(h>>31&-255)|0,t[r+5>>0]=C,h=n+2|0,v=A+1|0,e=i+1|0,(0|(r=r+6|0))==(0|f)){u=h,s=v,l=f,c=e;break}A=v,i=e,n=h}else u=e,s=r,l=i,c=n;1&o&&(o=0|a[s>>0],s=0|a[c>>0],y=(n=(u=(c=19077*(0|a[u>>0])|0)>>>8)-17685+((c=33050*o|0)>>>8)|0)>>>0<16384?n>>>6:255+(n>>31&-255)|0,t[l>>0]=y,I=(n=u+8708-((y=6419*o|0)>>>8)-((o=13320*s|0)>>>8)|0)>>>0<16384?n>>>6:255+(n>>31&-255)|0,t[l+1>>0]=I,E=(s=u+-14234+((I=26149*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,t[l+2>>0]=E)},function(e,r,n,i,o){e|=0,r|=0,n|=0;var f,A,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0;if(A=(i|=0)+(f=(o|=0)<<2&-8)|0,f){for(h=2+((d=f+-8|0)>>>2)|0,d=r+(v=1+(d>>>3)|0)|0,b=r,r=i,g=n,w=e;m=0|a[b>>0],k=0|a[g>>0],I=(y=(C=(p=19077*(0|a[w>>0])|0)>>>8)-17685+((p=33050*m|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,t[r>>0]=I,E=(p=C+8708-((y=6419*m|0)>>>8)-((m=13320*k|0)>>>8)|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[r+1>>0]=E,D=(k=C+-14234+((p=26149*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[r+2>>0]=D,t[r+3>>0]=-1,k=0|a[b>>0],p=0|a[g>>0],L=(y=(m=(C=19077*(0|a[w+1>>0])|0)>>>8)-17685+((C=33050*k|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,t[r+4>>0]=L,x=(C=m+8708-((y=6419*k|0)>>>8)-((k=13320*p|0)>>>8)|0)>>>0<16384?C>>>6:255+(C>>31&-255)|0,t[r+5>>0]=x,S=(p=m+-14234+((C=26149*p|0)>>>8)|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[r+6>>0]=S,t[r+7>>0]=-1,(0|(r=r+8|0))!=(0|A);)b=b+1|0,g=g+1|0,w=w+2|0;u=e+h|0,s=d,l=i+f|0,c=n+v|0}else u=e,s=r,l=i,c=n;1&o&&(o=0|a[s>>0],s=0|a[c>>0],_=(v=(u=(c=19077*(0|a[u>>0])|0)>>>8)-17685+((c=33050*o|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[l>>0]=_,B=(v=u+8708-((_=6419*o|0)>>>8)-((o=13320*s|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[l+1>>0]=B,M=(s=u+-14234+((B=26149*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,t[l+2>>0]=M,t[l+3>>0]=-1)},function(e,r,n,i,o){e|=0,r|=0,n|=0;var a,f,A=0,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0;if(f=(i|=0)+(a=(o|=0)<<2&-8)|0,a){for(d=2+((c=a+-8|0)>>>2)|0,c=r+(h=1+(c>>>3)|0)|0,v=r,r=i,b=n,g=e;w=0|t[g>>0],m=0|t[v>>0],k=0|t[b>>0],t[r>>0]=-1,p=255&m,m=255&k,y=(C=(w=(k=19077*(255&w)|0)>>>8)-14234+((k=26149*m|0)>>>8)|0)>>>0<16384?C>>>6:255+(C>>31&-255)|0,t[r+1>>0]=y,I=(m=w+8708-((C=6419*p|0)>>>8)-((k=13320*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r+2>>0]=I,E=(p=w+-17685+((m=33050*p|0)>>>8)|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[r+3>>0]=E,p=0|t[g+1>>0],m=0|t[v>>0],w=0|t[b>>0],t[r+4>>0]=-1,k=255&m,m=255&w,D=(C=(p=(w=19077*(255&p)|0)>>>8)-14234+((w=26149*m|0)>>>8)|0)>>>0<16384?C>>>6:255+(C>>31&-255)|0,t[r+5>>0]=D,L=(m=p+8708-((C=6419*k|0)>>>8)-((w=13320*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r+6>>0]=L,x=(k=p+-17685+((m=33050*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[r+7>>0]=x,(0|(r=r+8|0))!=(0|f);)v=v+1|0,b=b+1|0,g=g+2|0;A=e+d|0,u=c,s=i+a|0,l=n+h|0}else A=e,u=r,s=i,l=n;1&o&&(o=0|t[A>>0],A=0|t[u>>0],u=0|t[l>>0],t[s>>0]=-1,l=255&A,A=255&u,S=(h=(o=(u=19077*(255&o)|0)>>>8)-14234+((u=26149*A|0)>>>8)|0)>>>0<16384?h>>>6:255+(h>>31&-255)|0,t[s+1>>0]=S,_=(A=o+8708-((S=6419*l|0)>>>8)-((h=13320*A|0)>>>8)|0)>>>0<16384?A>>>6:255+(A>>31&-255)|0,t[s+2>>0]=_,B=(l=o+-17685+((_=33050*l|0)>>>8)|0)>>>0<16384?l>>>6:255+(l>>31&-255)|0,t[s+3>>0]=B)},function(e,r,n,i,o){e|=0,r|=0,n|=0;var f,A,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0;if(A=(i|=0)+(f=(o|=0)<<1&-4)|0,f){for(h=2+((d=f+-4|0)>>>1)|0,d=r+(v=1+(d>>>2)|0)|0,b=r,r=i,g=n,w=e;m=0|a[b>>0],k=0|a[g>>0],I=(y=(C=(p=19077*(0|a[w>>0])|0)>>>8)-14234+((p=26149*k|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,E=(k=C+8708-((y=6419*m|0)>>>8)-((p=13320*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,D=(m=C+-17685+((k=33050*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r>>0]=E>>>4|240&I,t[r+1>>0]=15|D,m=0|a[b>>0],k=0|a[g>>0],L=(y=(p=(C=19077*(0|a[w+1>>0])|0)>>>8)-14234+((C=26149*k|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,x=(k=p+8708-((y=6419*m|0)>>>8)-((C=13320*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,S=(m=p+-17685+((k=33050*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r+2>>0]=x>>>4|240&L,t[r+3>>0]=15|S,(0|(r=r+4|0))!=(0|A);)b=b+1|0,g=g+1|0,w=w+2|0;u=e+h|0,s=d,l=i+f|0,c=n+v|0}else u=e,s=r,l=i,c=n;1&o&&(o=0|a[s>>0],s=0|a[c>>0],_=(v=(u=(c=19077*(0|a[u>>0])|0)>>>8)-14234+((c=26149*s|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,B=(s=u+8708-((v=6419*o|0)>>>8)-((c=13320*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,M=(o=u+-17685+((s=33050*o|0)>>>8)|0)>>>0<16384?o>>>6:255+(o>>31&-255)|0,t[l>>0]=B>>>4|240&_,t[l+1>>0]=15|M)},function(e,r,n,i,o){e|=0,r|=0,n|=0;var f,A,u=0,s=0,l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0;if(A=(i|=0)+(f=(o|=0)<<1&-4)|0,f){for(h=2+((d=f+-4|0)>>>1)|0,d=r+(v=1+(d>>>2)|0)|0,b=r,r=i,g=n,w=e;m=0|a[b>>0],k=0|a[g>>0],I=(y=(C=(p=19077*(0|a[w>>0])|0)>>>8)-14234+((p=26149*k|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,E=(k=C+8708-((y=6419*m|0)>>>8)-((p=13320*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,D=(m=C+-17685+((k=33050*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r>>0]=E>>>5|248&I,t[r+1>>0]=D>>>3|E<<3&224,m=0|a[b>>0],k=0|a[g>>0],L=(y=(p=(C=19077*(0|a[w+1>>0])|0)>>>8)-14234+((C=26149*k|0)>>>8)|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,x=(k=p+8708-((y=6419*m|0)>>>8)-((C=13320*k|0)>>>8)|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,S=(m=p+-17685+((k=33050*m|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[r+2>>0]=x>>>5|248&L,t[r+3>>0]=S>>>3|x<<3&224,(0|(r=r+4|0))!=(0|A);)b=b+1|0,g=g+1|0,w=w+2|0;u=e+h|0,s=d,l=i+f|0,c=n+v|0}else u=e,s=r,l=i,c=n;1&o&&(o=0|a[s>>0],s=0|a[c>>0],_=(v=(u=(c=19077*(0|a[u>>0])|0)>>>8)-14234+((c=26149*s|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,B=(s=u+8708-((v=6419*o|0)>>>8)-((c=13320*s|0)>>>8)|0)>>>0<16384?s>>>6:255+(s>>31&-255)|0,M=(o=u+-17685+((s=33050*o|0)>>>8)|0)>>>0<16384?o>>>6:255+(o>>31&-255)|0,t[l>>0]=B>>>5|248&_,t[l+1>>0]=M>>>3|B<<3&224)},Pn,Pn,Pn,Pn,Pn,Pn,Pn,Pn,Pn,Pn,Pn,Pn,Pn,Pn],Wn=[function(e,r,n,t,i,o,a,f,A){d(8)},function(e,r,n,i,o,f,A,u,s){e|=0,r|=0,n|=0,o|=0,f|=0,A|=0,u|=0;var l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0;if(c=(l=(s|=0)-1|0)>>1,b=(v=131074+(3*(d=(0|a[(i|=0)>>0])<<16|0|a[n>>0])|0)+(h=(0|a[f>>0])<<16|0|a[o>>0])|0)>>>2&255,g=v>>>18&255,k=(m=(w=(v=19077*(0|a[e>>0])|0)>>>8)-14234+((v=26149*g|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[A>>0]=k,p=(g=w+8708-((k=6419*b|0)>>>8)-((m=13320*g|0)>>>8)|0)>>>0<16384?g>>>6:255+(g>>31&-255)|0,t[A+1>>0]=p,C=(b=w+-17685+((p=33050*b|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[A+2>>0]=C,t[A+3>>0]=-1,(C=0!=(0|r))&&(p=(b=d+131074+(3*h|0)|0)>>>2&255,w=b>>>18&255,g=(b=19077*(0|a[r>>0])|0)>>>8,y=(m=((b=26149*w|0)>>>8)-14234+g|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[u>>0]=y,I=(w=8708-((y=6419*p|0)>>>8)-((m=13320*w|0)>>>8)+g|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,t[u+1>>0]=I,E=(p=((I=33050*p|0)>>>8)-17685+g|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[u+2>>0]=E,t[u+3>>0]=-1),(0|s)<3)D=d,L=h;else for(E=d,d=h,h=1;;){if(I=(m=(w=524296+(I=(p=(0|a[i+h>>0])<<16|0|a[n+h>>0])+d|0)+E+(g=(0|a[f+h>>0])<<16|0|a[o+h>>0])|0)+(I<<1)|0)>>>3,y=(w=(m=w+(g+E<<1)|0)>>>3)+p|0,x=A+(v=(k=(b=h<<1)-1|0)<<2)|0,S=(m=I+E|0)>>>1&255,_=m>>>17&255,F=(M=(B=(m=19077*(0|a[e+k>>0])|0)>>>8)-14234+((m=26149*_|0)>>>8)|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[x>>0]=F,P=(_=B+8708-((M=6419*S|0)>>>8)-((m=13320*_|0)>>>8)|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[x+1>>0]=P,R=(S=B+-17685+((_=33050*S|0)>>>8)|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,t[x+2>>0]=R,t[x+3>>0]=-1,S=A+(x=h<<3)|0,_=y>>>1&255,B=y>>>17&255,m=(y=19077*(0|a[e+b>>0])|0)>>>8,T=(M=((y=26149*B|0)>>>8)-14234+m|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[S>>0]=T,G=(B=8708-((M=6419*_|0)>>>8)-((y=13320*B|0)>>>8)+m|0)>>>0<16384?B>>>6:255+(B>>31&-255)|0,t[S+1>>0]=G,O=(_=((B=33050*_|0)>>>8)-17685+m|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[S+2>>0]=O,t[S+3>>0]=-1,C&&(S=w+d|0,w=I+g|0,I=u+v|0,v=S>>>1&255,_=S>>>17&255,k=(S=19077*(0|a[r+k>>0])|0)>>>8,q=(m=((S=26149*_|0)>>>8)-14234+k|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[I>>0]=q,U=(_=8708-((m=6419*v|0)>>>8)-((S=13320*_|0)>>>8)+k|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[I+1>>0]=U,Y=(v=((_=33050*v|0)>>>8)-17685+k|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[I+2>>0]=Y,t[I+3>>0]=-1,I=u+x|0,x=w>>>1&255,v=w>>>17&255,b=(w=19077*(0|a[r+b>>0])|0)>>>8,z=(k=((w=26149*v|0)>>>8)-14234+b|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[I>>0]=z,W=(v=8708-((k=6419*x|0)>>>8)-((w=13320*v|0)>>>8)+b|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[I+1>>0]=W,X=(x=((v=33050*x|0)>>>8)-17685+b|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[I+2>>0]=X,t[I+3>>0]=-1),!((0|h)<(0|c))){D=p,L=g;break}E=p,d=g,h=h+1|0}1&s|0||(d=A+(h=l<<2)|0,A=(s=L+131074+(3*D|0)|0)>>>2&255,E=s>>>18&255,e=(s=19077*(0|a[e+l>>0])|0)>>>8,Q=(c=((s=26149*E|0)>>>8)-14234+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[d>>0]=Q,N=(E=8708-((Q=6419*A|0)>>>8)-((c=13320*E|0)>>>8)+e|0)>>>0<16384?E>>>6:255+(E>>31&-255)|0,t[d+1>>0]=N,V=(A=((N=33050*A|0)>>>8)-17685+e|0)>>>0<16384?A>>>6:255+(A>>31&-255)|0,t[d+2>>0]=V,t[d+3>>0]=-1,C&&(C=D+131074+(3*L|0)|0,L=u+h|0,h=C>>>2&255,u=C>>>18&255,l=(C=19077*(0|a[r+l>>0])|0)>>>8,j=(r=((C=26149*u|0)>>>8)-14234+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,t[L>>0]=j,H=(u=8708-((j=6419*h|0)>>>8)-((r=13320*u|0)>>>8)+l|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,t[L+1>>0]=H,Z=(h=((H=33050*h|0)>>>8)-17685+l|0)>>>0<16384?h>>>6:255+(h>>31&-255)|0,t[L+2>>0]=Z,t[L+3>>0]=-1))},function(e,r,n,i,o,f,A,u,s){e|=0,r|=0,n|=0,o|=0,f|=0,A|=0,u|=0;var l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0;if(c=(l=(s|=0)-1|0)>>1,b=(v=131074+(3*(d=(0|a[(i|=0)>>0])<<16|0|a[n>>0])|0)+(h=(0|a[f>>0])<<16|0|a[o>>0])|0)>>>2&255,g=v>>>18&255,k=(m=(w=(v=19077*(0|a[e>>0])|0)>>>8)-17685+((v=33050*b|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[A>>0]=k,p=(m=w+8708-((k=6419*b|0)>>>8)-((b=13320*g|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[A+1>>0]=p,C=(g=w+-14234+((p=26149*g|0)>>>8)|0)>>>0<16384?g>>>6:255+(g>>31&-255)|0,t[A+2>>0]=C,t[A+3>>0]=-1,(C=0!=(0|r))&&(p=(g=d+131074+(3*h|0)|0)>>>2&255,w=g>>>18&255,m=(g=19077*(0|a[r>>0])|0)>>>8,y=(b=((g=33050*p|0)>>>8)-17685+m|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[u>>0]=y,I=(b=8708-((y=6419*p|0)>>>8)-((p=13320*w|0)>>>8)+m|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[u+1>>0]=I,E=(w=((I=26149*w|0)>>>8)-14234+m|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,t[u+2>>0]=E,t[u+3>>0]=-1),(0|s)<3)D=d,L=h;else for(E=d,d=h,h=1;;){if(I=(p=(b=524296+(I=(w=(0|a[i+h>>0])<<16|0|a[n+h>>0])+d|0)+E+(m=(0|a[f+h>>0])<<16|0|a[o+h>>0])|0)+(I<<1)|0)>>>3,y=(b=(p=b+(m+E<<1)|0)>>>3)+w|0,x=A+(v=(k=(g=h<<1)-1|0)<<2)|0,S=(p=I+E|0)>>>1&255,_=p>>>17&255,F=(M=(B=(p=19077*(0|a[e+k>>0])|0)>>>8)-17685+((p=33050*S|0)>>>8)|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[x>>0]=F,P=(p=B+8708-((M=6419*S|0)>>>8)-((S=13320*_|0)>>>8)|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[x+1>>0]=P,R=(_=B+-14234+((p=26149*_|0)>>>8)|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[x+2>>0]=R,t[x+3>>0]=-1,_=A+(x=h<<3)|0,p=y>>>1&255,B=y>>>17&255,S=(y=19077*(0|a[e+g>>0])|0)>>>8,T=(M=((y=33050*p|0)>>>8)-17685+S|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[_>>0]=T,G=(y=8708-((M=6419*p|0)>>>8)-((p=13320*B|0)>>>8)+S|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,t[_+1>>0]=G,O=(B=((y=26149*B|0)>>>8)-14234+S|0)>>>0<16384?B>>>6:255+(B>>31&-255)|0,t[_+2>>0]=O,t[_+3>>0]=-1,C&&(_=b+d|0,b=I+m|0,I=u+v|0,v=_>>>1&255,B=_>>>17&255,k=(_=19077*(0|a[r+k>>0])|0)>>>8,q=(S=((_=33050*v|0)>>>8)-17685+k|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,t[I>>0]=q,U=(_=8708-((S=6419*v|0)>>>8)-((v=13320*B|0)>>>8)+k|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[I+1>>0]=U,Y=(B=((_=26149*B|0)>>>8)-14234+k|0)>>>0<16384?B>>>6:255+(B>>31&-255)|0,t[I+2>>0]=Y,t[I+3>>0]=-1,I=u+x|0,x=b>>>1&255,B=b>>>17&255,g=(b=19077*(0|a[r+g>>0])|0)>>>8,z=(k=((b=33050*x|0)>>>8)-17685+g|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[I>>0]=z,W=(b=8708-((k=6419*x|0)>>>8)-((x=13320*B|0)>>>8)+g|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[I+1>>0]=W,X=(B=((b=26149*B|0)>>>8)-14234+g|0)>>>0<16384?B>>>6:255+(B>>31&-255)|0,t[I+2>>0]=X,t[I+3>>0]=-1),!((0|h)<(0|c))){D=w,L=m;break}E=w,d=m,h=h+1|0}1&s|0||(d=A+(h=l<<2)|0,A=(s=L+131074+(3*D|0)|0)>>>2&255,E=s>>>18&255,e=(s=19077*(0|a[e+l>>0])|0)>>>8,Q=(c=((s=33050*A|0)>>>8)-17685+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[d>>0]=Q,N=(c=8708-((Q=6419*A|0)>>>8)-((A=13320*E|0)>>>8)+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[d+1>>0]=N,V=(E=((N=26149*E|0)>>>8)-14234+e|0)>>>0<16384?E>>>6:255+(E>>31&-255)|0,t[d+2>>0]=V,t[d+3>>0]=-1,C&&(C=D+131074+(3*L|0)|0,L=u+h|0,h=C>>>2&255,u=C>>>18&255,l=(C=19077*(0|a[r+l>>0])|0)>>>8,j=(r=((C=33050*h|0)>>>8)-17685+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,t[L>>0]=j,H=(r=8708-((j=6419*h|0)>>>8)-((h=13320*u|0)>>>8)+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,t[L+1>>0]=H,Z=(u=((H=26149*u|0)>>>8)-14234+l|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,t[L+2>>0]=Z,t[L+3>>0]=-1))},function(e,r,n,i,o,f,A,u,s){e|=0,r|=0,n|=0,o|=0,f|=0,A|=0,u|=0;var l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0;if(c=(l=(s|=0)-1|0)>>1,b=(v=131074+(3*(d=(0|a[(i|=0)>>0])<<16|0|a[n>>0])|0)+(h=(0|a[f>>0])<<16|0|a[o>>0])|0)>>>2&255,g=v>>>18,k=(m=(w=(v=19077*(0|a[e>>0])|0)>>>8)-14234+((v=26149*g|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[A>>0]=k,p=(g=w+8708-((m=13320*g|0)>>>8)-((k=6419*b|0)>>>8)|0)>>>0<16384?g>>>6:255+(g>>31&-255)|0,t[A+1>>0]=p,C=(b=w+-17685+((p=33050*b|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[A+2>>0]=C,(C=0!=(0|r))&&(p=(b=d+131074+(3*h|0)|0)>>>2&255,w=b>>>18,g=(b=19077*(0|a[r>>0])|0)>>>8,y=(k=((b=26149*w|0)>>>8)-14234+g|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[u>>0]=y,I=(w=8708-((k=13320*w|0)>>>8)-((y=6419*p|0)>>>8)+g|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,t[u+1>>0]=I,E=(p=((I=33050*p|0)>>>8)-17685+g|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[u+2>>0]=E),(0|s)<3)D=d,L=h;else for(E=d,d=h,h=1;;){if(I=(y=(w=524296+(I=(p=(0|a[i+h>>0])<<16|0|a[n+h>>0])+d|0)+E+(g=(0|a[f+h>>0])<<16|0|a[o+h>>0])|0)+(I<<1)|0)>>>3,k=(w=(y=w+(g+E<<1)|0)>>>3)+p|0,v=(y=I+E|0)>>>1&255,x=y>>>17,S=A+(y=3*(m=(b=h<<1)-1|0)|0)|0,F=(M=(B=(_=19077*(0|a[e+m>>0])|0)>>>8)-14234+((_=26149*x|0)>>>8)|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[S>>0]=F,P=(x=B+8708-((_=13320*x|0)>>>8)-((M=6419*v|0)>>>8)|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[S+1>>0]=P,R=(v=B+-17685+((x=33050*v|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[S+2>>0]=R,S=k>>>1&255,v=k>>>17,x=A+(k=6*h|0)|0,M=(B=19077*(0|a[e+b>>0])|0)>>>8,T=(_=((B=26149*v|0)>>>8)-14234+M|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[x>>0]=T,G=(v=8708-((B=13320*v|0)>>>8)-((_=6419*S|0)>>>8)+M|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[x+1>>0]=G,O=(S=((v=33050*S|0)>>>8)-17685+M|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,t[x+2>>0]=O,C&&(x=w+d|0,w=I+g|0,I=x>>>1&255,S=x>>>17,x=u+y|0,m=(y=19077*(0|a[r+m>>0])|0)>>>8,q=(M=((y=26149*S|0)>>>8)-14234+m|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[x>>0]=q,U=(S=8708-((y=13320*S|0)>>>8)-((M=6419*I|0)>>>8)+m|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,t[x+1>>0]=U,Y=(I=((S=33050*I|0)>>>8)-17685+m|0)>>>0<16384?I>>>6:255+(I>>31&-255)|0,t[x+2>>0]=Y,x=w>>>1&255,I=w>>>17,w=u+k|0,b=(k=19077*(0|a[r+b>>0])|0)>>>8,z=(m=((k=26149*I|0)>>>8)-14234+b|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[w>>0]=z,W=(I=8708-((k=13320*I|0)>>>8)-((m=6419*x|0)>>>8)+b|0)>>>0<16384?I>>>6:255+(I>>31&-255)|0,t[w+1>>0]=W,X=(x=((I=33050*x|0)>>>8)-17685+b|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[w+2>>0]=X),!((0|h)<(0|c))){D=p,L=g;break}E=p,d=g,h=h+1|0}1&s|0||(h=(s=L+131074+(3*D|0)|0)>>>2&255,d=s>>>18,E=A+(s=3*l|0)|0,e=(A=19077*(0|a[e+l>>0])|0)>>>8,Q=(c=((A=26149*d|0)>>>8)-14234+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[E>>0]=Q,N=(d=8708-((c=13320*d|0)>>>8)-((Q=6419*h|0)>>>8)+e|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,t[E+1>>0]=N,V=(h=((N=33050*h|0)>>>8)-17685+e|0)>>>0<16384?h>>>6:255+(h>>31&-255)|0,t[E+2>>0]=V,C&&(L=(C=D+131074+(3*L|0)|0)>>>2&255,D=C>>>18,C=u+s|0,l=(s=19077*(0|a[r+l>>0])|0)>>>8,j=(r=((s=26149*D|0)>>>8)-14234+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,t[C>>0]=j,H=(D=8708-((r=13320*D|0)>>>8)-((j=6419*L|0)>>>8)+l|0)>>>0<16384?D>>>6:255+(D>>31&-255)|0,t[C+1>>0]=H,Z=(L=((H=33050*L|0)>>>8)-17685+l|0)>>>0<16384?L>>>6:255+(L>>31&-255)|0,t[C+2>>0]=Z))},function(e,r,n,i,o,f,A,u,s){e|=0,r|=0,n|=0,o|=0,f|=0,A|=0,u|=0;var l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0;if(c=(l=(s|=0)-1|0)>>1,b=(v=131074+(3*(d=(0|a[(i|=0)>>0])<<16|0|a[n>>0])|0)+(h=(0|a[f>>0])<<16|0|a[o>>0])|0)>>>2&255,g=v>>>18,k=(m=(w=(v=19077*(0|a[e>>0])|0)>>>8)-17685+((v=33050*b|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[A>>0]=k,k=6419*b|0,p=(m=w+8708-((b=13320*g|0)>>>8)-(k>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[A+1>>0]=p,C=(g=w+-14234+((p=26149*g|0)>>>8)|0)>>>0<16384?g>>>6:255+(g>>31&-255)|0,t[A+2>>0]=C,(C=0!=(0|r))&&(p=(g=d+131074+(3*h|0)|0)>>>2&255,w=g>>>18,m=(g=19077*(0|a[r>>0])|0)>>>8,y=(k=((g=33050*p|0)>>>8)-17685+m|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[u>>0]=y,y=6419*p|0,I=(k=8708-((p=13320*w|0)>>>8)-(y>>>8)+m|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[u+1>>0]=I,E=(w=((I=26149*w|0)>>>8)-14234+m|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,t[u+2>>0]=E),(0|s)<3)D=d,L=h;else for(E=d,d=h,h=1;;){if(I=(y=(k=524296+(I=(w=(0|a[i+h>>0])<<16|0|a[n+h>>0])+d|0)+E+(m=(0|a[f+h>>0])<<16|0|a[o+h>>0])|0)+(I<<1)|0)>>>3,p=(k=(y=k+(m+E<<1)|0)>>>3)+w|0,v=(y=I+E|0)>>>1&255,x=y>>>17,S=A+(y=3*(b=(g=h<<1)-1|0)|0)|0,F=(M=(B=(_=19077*(0|a[e+b>>0])|0)>>>8)-17685+((_=33050*v|0)>>>8)|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[S>>0]=F,M=6419*v|0,P=(_=B+8708-((v=13320*x|0)>>>8)-(M>>>8)|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[S+1>>0]=P,R=(x=B+-14234+((_=26149*x|0)>>>8)|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[S+2>>0]=R,S=p>>>1&255,x=p>>>17,_=A+(p=6*h|0)|0,M=(B=19077*(0|a[e+g>>0])|0)>>>8,T=(v=((B=33050*S|0)>>>8)-17685+M|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[_>>0]=T,v=6419*S|0,G=(B=8708-((S=13320*x|0)>>>8)-(v>>>8)+M|0)>>>0<16384?B>>>6:255+(B>>31&-255)|0,t[_+1>>0]=G,O=(x=((B=26149*x|0)>>>8)-14234+M|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[_+2>>0]=O,C&&(_=k+d|0,k=I+m|0,I=_>>>1&255,x=_>>>17,_=u+y|0,b=(y=19077*(0|a[r+b>>0])|0)>>>8,q=(M=((y=33050*I|0)>>>8)-17685+b|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[_>>0]=q,M=6419*I|0,U=(y=8708-((I=13320*x|0)>>>8)-(M>>>8)+b|0)>>>0<16384?y>>>6:255+(y>>31&-255)|0,t[_+1>>0]=U,Y=(x=((y=26149*x|0)>>>8)-14234+b|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[_+2>>0]=Y,_=k>>>1&255,x=k>>>17,k=u+p|0,g=(p=19077*(0|a[r+g>>0])|0)>>>8,z=(b=((p=33050*_|0)>>>8)-17685+g|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[k>>0]=z,b=6419*_|0,W=(p=8708-((_=13320*x|0)>>>8)-(b>>>8)+g|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[k+1>>0]=W,X=(x=((p=26149*x|0)>>>8)-14234+g|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[k+2>>0]=X),!((0|h)<(0|c))){D=w,L=m;break}E=w,d=m,h=h+1|0}1&s|0||(h=(s=L+131074+(3*D|0)|0)>>>2&255,d=s>>>18,E=A+(s=3*l|0)|0,e=(A=19077*(0|a[e+l>>0])|0)>>>8,Q=(c=((A=33050*h|0)>>>8)-17685+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[E>>0]=Q,Q=6419*h|0,N=(c=8708-((h=13320*d|0)>>>8)-(Q>>>8)+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[E+1>>0]=N,V=(d=((N=26149*d|0)>>>8)-14234+e|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,t[E+2>>0]=V,C&&(L=(C=D+131074+(3*L|0)|0)>>>2&255,D=C>>>18,C=u+s|0,l=(s=19077*(0|a[r+l>>0])|0)>>>8,j=(r=((s=33050*L|0)>>>8)-17685+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,t[C>>0]=j,j=6419*L|0,H=(r=8708-((L=13320*D|0)>>>8)-(j>>>8)+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,t[C+1>>0]=H,Z=(D=((H=26149*D|0)>>>8)-14234+l|0)>>>0<16384?D>>>6:255+(D>>31&-255)|0,t[C+2>>0]=Z))},function(e,r,n,i,o,f,A,u,s){e|=0,r|=0,n|=0,o|=0,f|=0,A|=0,u|=0;var l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0;if(c=(l=(s|=0)-1|0)>>1,v=131074+(3*(d=(0|a[(i|=0)>>0])<<16|0|a[n>>0])|0)+(h=(0|a[f>>0])<<16|0|a[o>>0])|0,b=0|t[e>>0],t[A>>0]=-1,g=v>>>2&255,w=v>>>18&255,k=(m=(b=(v=19077*(255&b)|0)>>>8)-14234+((v=26149*w|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[A+1>>0]=k,p=(w=b+8708-((k=6419*g|0)>>>8)-((m=13320*w|0)>>>8)|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,t[A+2>>0]=p,C=(g=b+-17685+((p=33050*g|0)>>>8)|0)>>>0<16384?g>>>6:255+(g>>31&-255)|0,t[A+3>>0]=C,(C=0!=(0|r))&&(g=d+131074+(3*h|0)|0,p=0|t[r>>0],t[u>>0]=-1,b=g>>>2&255,w=g>>>18&255,p=(g=19077*(255&p)|0)>>>8,y=(m=((g=26149*w|0)>>>8)-14234+p|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[u+1>>0]=y,I=(w=8708-((y=6419*b|0)>>>8)-((m=13320*w|0)>>>8)+p|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,t[u+2>>0]=I,E=(b=((I=33050*b|0)>>>8)-17685+p|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[u+3>>0]=E),(0|s)<3)D=d,L=h;else for(E=d,d=h,h=1;;){if(I=(m=(w=524296+(I=(b=(0|a[i+h>>0])<<16|0|a[n+h>>0])+d|0)+E+(p=(0|a[f+h>>0])<<16|0|a[o+h>>0])|0)+(I<<1)|0)>>>3,w=(m=w+(p+E<<1)|0)>>>3,m=I+E|0,y=w+b|0,v=0|t[e+(k=(g=h<<1)-1|0)>>0],t[(S=A+(x=k<<2)|0)>>0]=-1,_=m>>>1&255,B=m>>>17&255,F=(M=(v=(m=19077*(255&v)|0)>>>8)-14234+((m=26149*B|0)>>>8)|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[S+1>>0]=F,P=(B=v+8708-((M=6419*_|0)>>>8)-((m=13320*B|0)>>>8)|0)>>>0<16384?B>>>6:255+(B>>31&-255)|0,t[S+2>>0]=P,R=(_=v+-17685+((B=33050*_|0)>>>8)|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[S+3>>0]=R,S=0|t[e+g>>0],t[(B=A+(_=h<<3)|0)>>0]=-1,v=y>>>1&255,m=y>>>17&255,S=(y=19077*(255&S)|0)>>>8,T=(M=((y=26149*m|0)>>>8)-14234+S|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,t[B+1>>0]=T,G=(m=8708-((M=6419*v|0)>>>8)-((y=13320*m|0)>>>8)+S|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,t[B+2>>0]=G,O=(v=((m=33050*v|0)>>>8)-17685+S|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[B+3>>0]=O,C&&(B=w+d|0,w=I+p|0,I=0|t[r+k>>0],t[(k=u+x|0)>>0]=-1,x=B>>>1&255,v=B>>>17&255,I=(B=19077*(255&I)|0)>>>8,q=(S=((B=26149*v|0)>>>8)-14234+I|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,t[k+1>>0]=q,U=(v=8708-((S=6419*x|0)>>>8)-((B=13320*v|0)>>>8)+I|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[k+2>>0]=U,Y=(x=((v=33050*x|0)>>>8)-17685+I|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[k+3>>0]=Y,k=0|t[r+g>>0],t[(g=u+_|0)>>0]=-1,_=w>>>1&255,x=w>>>17&255,k=(w=19077*(255&k)|0)>>>8,z=(I=((w=26149*x|0)>>>8)-14234+k|0)>>>0<16384?I>>>6:255+(I>>31&-255)|0,t[g+1>>0]=z,W=(x=8708-((I=6419*_|0)>>>8)-((w=13320*x|0)>>>8)+k|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[g+2>>0]=W,X=(_=((x=33050*_|0)>>>8)-17685+k|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,t[g+3>>0]=X),!((0|h)<(0|c))){D=b,L=p;break}E=b,d=p,h=h+1|0}1&s|0||(s=L+131074+(3*D|0)|0,h=0|t[e+l>>0],t[(d=A+(e=l<<2)|0)>>0]=-1,A=s>>>2&255,E=s>>>18&255,h=(s=19077*(255&h)|0)>>>8,Q=(c=((s=26149*E|0)>>>8)-14234+h|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,t[d+1>>0]=Q,N=(E=8708-((Q=6419*A|0)>>>8)-((c=13320*E|0)>>>8)+h|0)>>>0<16384?E>>>6:255+(E>>31&-255)|0,t[d+2>>0]=N,V=(A=((N=33050*A|0)>>>8)-17685+h|0)>>>0<16384?A>>>6:255+(A>>31&-255)|0,t[d+3>>0]=V,C&&(C=D+131074+(3*L|0)|0,L=0|t[r+l>>0],t[(l=u+e|0)>>0]=-1,e=C>>>2&255,u=C>>>18&255,L=(C=19077*(255&L)|0)>>>8,j=(r=((C=26149*u|0)>>>8)-14234+L|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,t[l+1>>0]=j,H=(u=8708-((j=6419*e|0)>>>8)-((r=13320*u|0)>>>8)+L|0)>>>0<16384?u>>>6:255+(u>>31&-255)|0,t[l+2>>0]=H,Z=(e=((H=33050*e|0)>>>8)-17685+L|0)>>>0<16384?e>>>6:255+(e>>31&-255)|0,t[l+3>>0]=Z))},function(e,r,n,i,o,f,A,u,s){e|=0,r|=0,n|=0,o|=0,f|=0,A|=0,u|=0;var l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0;if(c=(l=(s|=0)-1|0)>>1,b=(v=131074+(3*(d=(0|a[(i|=0)>>0])<<16|0|a[n>>0])|0)+(h=(0|a[f>>0])<<16|0|a[o>>0])|0)>>>2&255,g=v>>>18,k=(m=(w=(v=19077*(0|a[e>>0])|0)>>>8)-14234+((v=26149*g|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,p=(g=w+8708-((v=13320*g|0)>>>8)-((m=6419*b|0)>>>8)|0)>>>0<16384?g>>>6:255+(g>>31&-255)|0,C=(b=w+-17685+((g=33050*b|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[A>>0]=p>>>4|240&k,t[A+1>>0]=15|C,(C=0!=(0|r))&&(p=(k=d+131074+(3*h|0)|0)>>>2&255,b=k>>>18,g=(k=19077*(0|a[r>>0])|0)>>>8,y=(w=((k=26149*b|0)>>>8)-14234+g|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,I=(b=8708-((k=13320*b|0)>>>8)-((w=6419*p|0)>>>8)+g|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,E=(p=((b=33050*p|0)>>>8)-17685+g|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[u>>0]=I>>>4|240&y,t[u+1>>0]=15|E),(0|s)<3)D=d,L=h;else for(E=d,d=h,h=1;;){if(p=(b=(g=524296+(p=(y=(0|a[i+h>>0])<<16|0|a[n+h>>0])+d|0)+E+(I=(0|a[f+h>>0])<<16|0|a[o+h>>0])|0)+(p<<1)|0)>>>3,w=(g=(b=g+(I+E<<1)|0)>>>3)+y|0,v=(b=p+E|0)>>>1&255,x=b>>>17,S=A+(b=(m=(k=h<<1)-1|0)<<1)|0,F=(M=(B=(_=19077*(0|a[e+m>>0])|0)>>>8)-14234+((_=26149*x|0)>>>8)|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,P=(x=B+8708-((_=13320*x|0)>>>8)-((M=6419*v|0)>>>8)|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,R=(v=B+-17685+((x=33050*v|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[S>>0]=P>>>4|240&F,t[S+1>>0]=15|R,S=w>>>1&255,v=w>>>17,x=A+(w=h<<2)|0,M=(B=19077*(0|a[e+k>>0])|0)>>>8,T=(_=((B=26149*v|0)>>>8)-14234+M|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,G=(v=8708-((B=13320*v|0)>>>8)-((_=6419*S|0)>>>8)+M|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,O=(S=((v=33050*S|0)>>>8)-17685+M|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,t[x>>0]=G>>>4|240&T,t[x+1>>0]=15|O,C&&(x=g+d|0,g=p+I|0,p=x>>>1&255,S=x>>>17,x=u+b|0,m=(b=19077*(0|a[r+m>>0])|0)>>>8,q=(M=((b=26149*S|0)>>>8)-14234+m|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,U=(S=8708-((b=13320*S|0)>>>8)-((M=6419*p|0)>>>8)+m|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,Y=(p=((S=33050*p|0)>>>8)-17685+m|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,t[x>>0]=U>>>4|240&q,t[x+1>>0]=15|Y,x=g>>>1&255,p=g>>>17,g=u+w|0,k=(w=19077*(0|a[r+k>>0])|0)>>>8,z=(m=((w=26149*p|0)>>>8)-14234+k|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,W=(p=8708-((w=13320*p|0)>>>8)-((m=6419*x|0)>>>8)+k|0)>>>0<16384?p>>>6:255+(p>>31&-255)|0,X=(x=((p=33050*x|0)>>>8)-17685+k|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[g>>0]=W>>>4|240&z,t[g+1>>0]=15|X),!((0|h)<(0|c))){D=y,L=I;break}E=y,d=I,h=h+1|0}1&s|0||(h=(s=L+131074+(3*D|0)|0)>>>2&255,d=s>>>18,E=A+(s=l<<1)|0,e=(A=19077*(0|a[e+l>>0])|0)>>>8,Q=(c=((A=26149*d|0)>>>8)-14234+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,N=(d=8708-((A=13320*d|0)>>>8)-((c=6419*h|0)>>>8)+e|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,V=(h=((d=33050*h|0)>>>8)-17685+e|0)>>>0<16384?h>>>6:255+(h>>31&-255)|0,t[E>>0]=N>>>4|240&Q,t[E+1>>0]=15|V,C&&(L=(C=D+131074+(3*L|0)|0)>>>2&255,D=C>>>18,C=u+s|0,l=(s=19077*(0|a[r+l>>0])|0)>>>8,j=(r=((s=26149*D|0)>>>8)-14234+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,H=(D=8708-((s=13320*D|0)>>>8)-((r=6419*L|0)>>>8)+l|0)>>>0<16384?D>>>6:255+(D>>31&-255)|0,Z=(L=((D=33050*L|0)>>>8)-17685+l|0)>>>0<16384?L>>>6:255+(L>>31&-255)|0,t[C>>0]=H>>>4|240&j,t[C+1>>0]=15|Z))},function(e,r,n,i,o,f,A,u,s){e|=0,r|=0,n|=0,o|=0,f|=0,A|=0,u|=0;var l=0,c=0,d=0,h=0,v=0,b=0,g=0,w=0,m=0,k=0,p=0,C=0,y=0,I=0,E=0,D=0,L=0,x=0,S=0,_=0,B=0,M=0,F=0,P=0,R=0,T=0,G=0,O=0,q=0,U=0,Y=0,z=0,W=0,X=0,Q=0,N=0,V=0,j=0,H=0,Z=0;if(c=(l=(s|=0)-1|0)>>1,b=(v=131074+(3*(d=(0|a[(i|=0)>>0])<<16|0|a[n>>0])|0)+(h=(0|a[f>>0])<<16|0|a[o>>0])|0)>>>2&255,g=v>>>18,k=(m=(w=(v=19077*(0|a[e>>0])|0)>>>8)-14234+((v=26149*g|0)>>>8)|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,p=(g=w+8708-((v=13320*g|0)>>>8)-((m=6419*b|0)>>>8)|0)>>>0<16384?g>>>6:255+(g>>31&-255)|0,C=(b=w+-17685+((g=33050*b|0)>>>8)|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,t[A>>0]=p>>>5|248&k,t[A+1>>0]=C>>>3|p<<3&224,(p=0!=(0|r))&&(k=(C=d+131074+(3*h|0)|0)>>>2&255,b=C>>>18,g=(C=19077*(0|a[r>>0])|0)>>>8,y=(w=((C=26149*b|0)>>>8)-14234+g|0)>>>0<16384?w>>>6:255+(w>>31&-255)|0,I=(b=8708-((C=13320*b|0)>>>8)-((w=6419*k|0)>>>8)+g|0)>>>0<16384?b>>>6:255+(b>>31&-255)|0,E=(k=((b=33050*k|0)>>>8)-17685+g|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[u>>0]=I>>>5|248&y,t[u+1>>0]=E>>>3|I<<3&224),(0|s)<3)D=d,L=h;else for(I=d,d=h,h=1;;){if(k=(b=(g=524296+(k=(E=(0|a[i+h>>0])<<16|0|a[n+h>>0])+d|0)+I+(y=(0|a[f+h>>0])<<16|0|a[o+h>>0])|0)+(k<<1)|0)>>>3,w=(g=(b=g+(y+I<<1)|0)>>>3)+E|0,v=(b=k+I|0)>>>1&255,x=b>>>17,S=A+(b=(m=(C=h<<1)-1|0)<<1)|0,F=(M=(B=(_=19077*(0|a[e+m>>0])|0)>>>8)-14234+((_=26149*x|0)>>>8)|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,P=(x=B+8708-((_=13320*x|0)>>>8)-((M=6419*v|0)>>>8)|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,R=(v=B+-17685+((x=33050*v|0)>>>8)|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,t[S>>0]=P>>>5|248&F,t[S+1>>0]=R>>>3|P<<3&224,S=w>>>1&255,v=w>>>17,x=A+(w=h<<2)|0,M=(B=19077*(0|a[e+C>>0])|0)>>>8,T=(_=((B=26149*v|0)>>>8)-14234+M|0)>>>0<16384?_>>>6:255+(_>>31&-255)|0,G=(v=8708-((B=13320*v|0)>>>8)-((_=6419*S|0)>>>8)+M|0)>>>0<16384?v>>>6:255+(v>>31&-255)|0,O=(S=((v=33050*S|0)>>>8)-17685+M|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,t[x>>0]=G>>>5|248&T,t[x+1>>0]=O>>>3|G<<3&224,p&&(x=g+d|0,g=k+y|0,k=x>>>1&255,S=x>>>17,x=u+b|0,m=(b=19077*(0|a[r+m>>0])|0)>>>8,q=(M=((b=26149*S|0)>>>8)-14234+m|0)>>>0<16384?M>>>6:255+(M>>31&-255)|0,U=(S=8708-((b=13320*S|0)>>>8)-((M=6419*k|0)>>>8)+m|0)>>>0<16384?S>>>6:255+(S>>31&-255)|0,Y=(k=((S=33050*k|0)>>>8)-17685+m|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,t[x>>0]=U>>>5|248&q,t[x+1>>0]=Y>>>3|U<<3&224,x=g>>>1&255,k=g>>>17,g=u+w|0,C=(w=19077*(0|a[r+C>>0])|0)>>>8,z=(m=((w=26149*k|0)>>>8)-14234+C|0)>>>0<16384?m>>>6:255+(m>>31&-255)|0,W=(k=8708-((w=13320*k|0)>>>8)-((m=6419*x|0)>>>8)+C|0)>>>0<16384?k>>>6:255+(k>>31&-255)|0,X=(x=((k=33050*x|0)>>>8)-17685+C|0)>>>0<16384?x>>>6:255+(x>>31&-255)|0,t[g>>0]=W>>>5|248&z,t[g+1>>0]=X>>>3|W<<3&224),!((0|h)<(0|c))){D=E,L=y;break}I=E,d=y,h=h+1|0}1&s|0||(h=(s=L+131074+(3*D|0)|0)>>>2&255,d=s>>>18,I=A+(s=l<<1)|0,e=(A=19077*(0|a[e+l>>0])|0)>>>8,Q=(c=((A=26149*d|0)>>>8)-14234+e|0)>>>0<16384?c>>>6:255+(c>>31&-255)|0,N=(d=8708-((A=13320*d|0)>>>8)-((c=6419*h|0)>>>8)+e|0)>>>0<16384?d>>>6:255+(d>>31&-255)|0,V=(h=((d=33050*h|0)>>>8)-17685+e|0)>>>0<16384?h>>>6:255+(h>>31&-255)|0,t[I>>0]=N>>>5|248&Q,t[I+1>>0]=V>>>3|N<<3&224,p&&(L=(p=D+131074+(3*L|0)|0)>>>2&255,D=p>>>18,p=u+s|0,l=(s=19077*(0|a[r+l>>0])|0)>>>8,j=(r=((s=26149*D|0)>>>8)-14234+l|0)>>>0<16384?r>>>6:255+(r>>31&-255)|0,H=(D=8708-((s=13320*D|0)>>>8)-((r=6419*L|0)>>>8)+l|0)>>>0<16384?D>>>6:255+(D>>31&-255)|0,Z=(L=((D=33050*L|0)>>>8)-17685+l|0)>>>0<16384?L>>>6:255+(L>>31&-255)|0,t[p>>0]=H>>>5|248&j,t[p+1>>0]=Z>>>3|H<<3&224))}];return{_WebpToSDL:function(e,r){e|=0,r|=0;var n,t,i,a,f,A,u=0,s=0,c=0,d=0,h=0,v=0,I=0,E=0;if(n=O,O=O+224|0,t=n+16|0,i=n+8|0,a=n,A=40+(f=n+24|0)|0,!(0|function(e,r){return 0==(0|(e|=0))|512!=(-256&(r|=0)|0)?0:(Dn(0|e,0,200),We(e+40|0,520),1)}(f,520)))return function(e,r,n,t){t|=0;var i;i=0|l(n|=0,r|=0),(0|o[t+76>>2])>-1?(n=!1,dn(8544,i,t)):dn(8544,i,t)}(0,26,1,0|o[2043]),O=n,0;0|o[2484]||(m(32),o[2484]=1);do{if(0|Ir(e,r,f,520))h=0,v=0,I=0;else{if(u=f+4|0,!(s=0|p(0|o[f>>2],0|o[u>>2],32,0))){c=0|o[2043],d=0|o[u>>2],o[a>>2]=o[f>>2],o[a+4>>2]=d,hn(c,8571,a),h=0,v=0,I=0;break}if(!(c=0|b(0,0|o[f>>2],0|o[u>>2],32,255,65280,16711680,-16777216))){d=0|o[2043],E=0|o[u>>2],o[i>>2]=o[f>>2],o[i+4>>2]=E,hn(d,8612,i),h=0,v=s,I=0;break}if(k(0|c),o[A>>2]=1,o[f+44>>2]=o[c+8>>2],d=c+12|0,o[f+48>>2]=o[d>>2],o[f+56>>2]=o[c+20>>2],E=c+16|0,o[f+60>>2]=o[E>>2],u=0|l(0|o[d>>2],0|o[E>>2]),o[f+64>>2]=u,o[f+52>>2]=1,0|(u=0|Xr(e,r,f))){E=0|o[2043],o[t>>2]=u,hn(E,8650,t),h=c,v=s,I=0;break}C(0|c),0|y(0|c,0,0|s,0)?(h=c,v=s,I=0):(h=c,v=s,I=0==(0|g(0|s))&1)}}while(0);return w(0|h),w(0|v),Xe(A),O=n,0|I},___errno_location:function(){return 10696},___muldi3:vn,___udivdi3:kn,_bitshift64Lshr:pn,_bitshift64Shl:Cn,_emscripten_replace_memory:function(e){return t=new Int8Array(e),a=new Uint8Array(e),i=new Int16Array(e),f=new Uint16Array(e),o=new Int32Array(e),new Float32Array(e),A=new Float64Array(e),n=e,!0},_free:Nr,_i64Add:bn,_i64Subtract:gn,_llvm_bswap_i32:yn,_malloc:Qr,_memcpy:In,_memmove:En,_memset:Dn,_sbrk:Ln,dynCall_ii:function(e,r){return r|=0,0|Rn[7&(e|=0)](0|r)},dynCall_iii:function(e,r,n){return r|=0,n|=0,0|Tn[31&(e|=0)](0|r,0|n)},dynCall_iiii:function(e,r,n,t){return r|=0,n|=0,t|=0,0|Gn[15&(e|=0)](0|r,0|n,0|t)},dynCall_iiiiiii:function(e,r,n,t,i,o,a){return r|=0,n|=0,t|=0,i|=0,o|=0,a|=0,0|On[1&(e|=0)](0|r,0|n,0|t,0|i,0|o,0|a)},dynCall_vi:function(e,r){r|=0,qn[31&(e|=0)](0|r)},dynCall_vii:function(e,r,n){r|=0,n|=0,Un[3&(e|=0)](0|r,0|n)},dynCall_viiii:function(e,r,n,t,i){r|=0,n|=0,t|=0,i|=0,Yn[31&(e|=0)](0|r,0|n,0|t,0|i)},dynCall_viiiii:function(e,r,n,t,i,o){r|=0,n|=0,t|=0,i|=0,o|=0,zn[31&(e|=0)](0|r,0|n,0|t,0|i,0|o)},dynCall_viiiiiiiii:function(e,r,n,t,i,o,a,f,A,u){r|=0,n|=0,t|=0,i|=0,o|=0,a|=0,f|=0,A|=0,u|=0,Wn[7&(e|=0)](0|r,0|n,0|t,0|i,0|o,0|a,0|f,0|A,0|u)},establishStackSpace:function(e,r){O=e|=0},stackAlloc:function(e){var r;return r=O,O=15+(O=O+(e|=0)|0)&-16,0|r},stackRestore:function(e){O=e|=0},stackSave:function(){return 0|O}}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:ke,b:function(e){s=e},c:function(){return s},d:function(e,r,n,t,i,o,a,f){return J.makeSurface(r,n,e,!1,"CreateRGBSurface",i,o,a,f)},e:function(e){},f:function(e){e&&J.freeSurface(e)},g:H,h:function(e){if(J.startTime=Date.now(),J.initFlags=e,!t.doNotCaptureKeyboard){var r=t.keyboardListeningElement||document;r.addEventListener("keydown",J.receiveEvent),r.addEventListener("keyup",J.receiveEvent),r.addEventListener("keypress",J.receiveEvent),window.addEventListener("focus",J.receiveEvent),window.addEventListener("blur",J.receiveEvent),document.addEventListener("visibilitychange",J.receiveEvent)}return window.addEventListener("unload",J.receiveEvent),J.keyboardState=Ae(65536),se(J.keyboardState,0,65536),J.DOMEventToSDLEvent.keydown=768,J.DOMEventToSDLEvent.keyup=769,J.DOMEventToSDLEvent.keypress=771,J.DOMEventToSDLEvent.mousedown=1025,J.DOMEventToSDLEvent.mouseup=1026,J.DOMEventToSDLEvent.mousemove=1024,J.DOMEventToSDLEvent.wheel=1027,J.DOMEventToSDLEvent.touchstart=1792,J.DOMEventToSDLEvent.touchend=1793,J.DOMEventToSDLEvent.touchmove=1794,J.DOMEventToSDLEvent.unload=256,J.DOMEventToSDLEvent.resize=28673,J.DOMEventToSDLEvent.visibilitychange=512,J.DOMEventToSDLEvent.focus=512,J.DOMEventToSDLEvent.blur=512,J.DOMEventToSDLEvent.joystick_axis_motion=1536,J.DOMEventToSDLEvent.joystick_button_down=1539,J.DOMEventToSDLEvent.joystick_button_up=1540,0},i:Z,j:function(e,r,n,i){["touchstart","touchend","touchmove","mousedown","mouseup","mousemove","DOMMouseScroll","mousewheel","wheel","mouseout"].forEach(function(e){t.canvas.addEventListener(e,J.receiveEvent,!0)});var o=t.canvas;return 0==e&&0==r&&(e=o.width,r=o.height),J.addedResizeListener||(J.addedResizeListener=!0,j.resizeListeners.push(function(e,r){J.settingVideoMode||J.receiveEvent({type:"resize",w:e,h:r})})),J.settingVideoMode=!0,j.setCanvasSize(e,r),J.settingVideoMode=!1,J.screen&&J.freeSurface(J.screen),J.GL&&(i|=67108864),J.screen=J.makeSurface(e,r,i,!0,"screen"),J.screen},k:function(e){var r=J.surfaces[e];if(r.locked&&!(--r.locked>0)){if(r.isFlagSet(2097152))J.copyIndexedColorData(r);else if(r.colors)for(var n=t.canvas.width,i=t.canvas.height,o=r.buffer,a=(c=r.image.data,r.colors),f=0;f>0];var s=A+4*u;c[s]=a[w],c[s+1]=a[w+1],c[s+2]=a[w+2]}o+=3*n}else{var l,c=r.image.data,d=r.buffer>>2,h=0,b=e==J.screen;if("undefined"!=typeof CanvasPixelArray&&c instanceof CanvasPixelArray)for(l=c.length;h>8&255,c[h+2]=w>>16&255,c[h+3]=b?255:w>>24&255,d++,h+=4}else{var m=new Uint32Array(c.buffer);if(b&&J.defaults.opaqueFrontBuffer){l=m.length,m.set(g.subarray(d,d+l));var k=new Uint8Array(c.buffer),p=3,C=p+4*l;if(l%8==0)for(;p>2]=e),e},n:function(e,n){ee.varargs=n;try{var t=ee.getStreamFromFD(),i=(ee.get(),ee.get()),o=ee.get(),a=ee.get(),f=i;return FS.llseek(t,f,a),g[o>>2]=t.position,t.getdents&&0===f&&0===a&&(t.getdents=null),0}catch(r){return"undefined"!=typeof FS&&r instanceof FS.ErrnoError||ke(r),-r.errno}},o:function(e,n){ee.varargs=n;try{for(var t=ee.get(),i=ee.get(),o=ee.get(),a=0,f=0;f>2],u=g[i+(8*f+4)>>2],s=0;s2130706432)return!1;for(var n=Math.max(r,16777216);n0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),x.unshift(e);var e;L(x)}(),G>0||t.calledRun||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),r()},1)):r()))}function ke(e){throw t.onAbort&&t.onAbort(e),void 0!==e?(f(e),A(e),e=JSON.stringify(e)):e="",l=!0,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}if(we.prototype=new Error,we.prototype.constructor=we,q=function e(){t.calledRun||me(),t.calledRun||(q=e)},t.run=me,t.abort=ke,t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();t.noExitRuntime=!0,me(),this.Module=t,this.webpToSdl=t.cwrap("WebpToSDL","number",["array","number"]),this.setCanvas=function(e){t.canvas=e}}}}).call(this,n({}).setImmediate);var x,S={},_=this&&this.__extends||(x=function(e,r){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])})(e,r)},function(e,r){function n(){this.constructor=e}x(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),B=this&&this.__awaiter||function(e,n,t,i){return new(t||(t=Promise))(function(o,a){function f(e){try{u(i.next(e))}catch(r){a(r)}}function A(e){try{u(i.throw(e))}catch(r){a(r)}}function u(e){e.done?o(e.value):new t(function(r){r(e.value)}).then(f,A)}u((i=i.apply(e,n||[])).next())})},M=this&&this.__generator||function(e,n){var t,i,o,a,f={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:A(0),throw:A(1),return:A(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function A(a){return function(A){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;f;)try{if(t=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,i=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(o=(o=f.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){f=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]