Repository: elmsln/lrnwebcomponents Branch: master Commit: 756abd513672 Files: 5437 Total size: 76.5 MB Directory structure: gitextract_7f7q_zj8/ ├── .continue/ │ └── README.md ├── .devcontainer/ │ └── devcontainer.json ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ └── workflows/ │ ├── build.yml │ ├── cla.yml │ └── ossf_scorecard.yml ├── .gitignore ├── .jshintrc ├── .lvimrc ├── .prettierignore ├── .stylelintrc.json ├── .vscode/ │ ├── extensions.json │ ├── launch.json │ └── settings.json ├── .wcflibcache.json ├── .well-known/ │ └── funding-manifest-urls ├── AGENTS.md ├── CHANGELOG.md ├── CLA-README.md ├── CLA.md ├── CODE_OF_CONDUCT.md ├── COMPONENT-GALLERY.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── VERSION.txt ├── _optional_dev_patches/ │ └── @web+dev-server-core+0.7.2.patch ├── api/ │ ├── hydrateSsr.js │ ├── package.json │ └── patches/ │ └── @lit-labs+ssr+3.2.2.patch ├── automate-theme-screenshots.js ├── build-haxcms.js ├── build.js ├── dist/ │ ├── app.js │ ├── build-cms.js │ ├── build-elmsln.js │ ├── build-full.js │ ├── build-haxcms.js │ ├── build-home.js │ ├── build-install.js │ ├── build-legacy.js │ ├── build.html │ ├── build.js │ ├── dev/ │ │ ├── appstore.json │ │ ├── archiveSite.json │ │ ├── connectionSettings.json │ │ ├── copySite.json │ │ ├── createSite.json │ │ ├── deleteSite.json │ │ ├── downloadSite.json │ │ ├── getConfigPath.json │ │ ├── getNodeFieldsPath.json │ │ ├── getSiteFieldsPath.json │ │ ├── login.json │ │ ├── logout.json │ │ ├── saveManifestPath.json │ │ ├── saveNode.json │ │ ├── savePage.json │ │ ├── sites.json │ │ ├── sitesEmpty.json │ │ └── userData.json │ ├── dev.html │ ├── hax-elements-registry.json │ ├── sites.json │ └── wc-registry.json ├── elements/ │ ├── .gitkeep │ ├── .idea/ │ │ ├── .gitignore │ │ ├── elements.iml │ │ ├── modules.xml │ │ └── vcs.xml │ ├── .vscode/ │ │ └── settings.json │ ├── README.md │ ├── a11y-behaviors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-behaviors.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-behaviors.test.js │ ├── a11y-carousel/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-carousel.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── a11y-carousel-button.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-carousel.test.js │ ├── a11y-collapse/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-collapse.js │ │ ├── demo/ │ │ │ ├── group.html │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── a11y-collapse-group.haxProperties.json │ │ │ ├── a11y-collapse-group.js │ │ │ └── a11y-collapse.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-collapse.test.js │ ├── a11y-compare-image/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-compare-image.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-compare-image.test.js │ ├── a11y-details/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-details.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-details.test.js │ ├── a11y-figure/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-figure.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-figure.test.js │ ├── a11y-gif-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-gif-player.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── a11y-gif-player.haxProperties.json │ │ ├── locales/ │ │ │ └── a11y-gif-player.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-gif-player.test.js │ ├── a11y-media-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-media-player.js │ │ ├── demo/ │ │ │ ├── audio.html │ │ │ ├── index.html │ │ │ ├── samples/ │ │ │ │ ├── bueller.vtt │ │ │ │ ├── sintel-de.vtt │ │ │ │ ├── sintel-en.vtt │ │ │ │ ├── sintel-es.vtt │ │ │ │ ├── stclair.srt │ │ │ │ └── stclair.vtt │ │ │ └── youtube.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── a11y-media-button.js │ │ │ ├── a11y-media-play-button.js │ │ │ ├── a11y-media-state-manager.js │ │ │ ├── a11y-media-transcript-cue.js │ │ │ └── a11y-media-youtube.js │ │ ├── locales/ │ │ │ ├── a11y-media-player.bg.json │ │ │ ├── a11y-media-player.cy.json │ │ │ ├── a11y-media-player.da.json │ │ │ ├── a11y-media-player.en.json │ │ │ ├── a11y-media-player.es.json │ │ │ ├── a11y-media-player.et.json │ │ │ ├── a11y-media-player.fa.json │ │ │ ├── a11y-media-player.ga.json │ │ │ ├── a11y-media-player.ha.json │ │ │ ├── a11y-media-player.hr.json │ │ │ ├── a11y-media-player.is.json │ │ │ ├── a11y-media-player.ka.json │ │ │ ├── a11y-media-player.km.json │ │ │ ├── a11y-media-player.lt.json │ │ │ ├── a11y-media-player.lv.json │ │ │ ├── a11y-media-player.mk.json │ │ │ ├── a11y-media-player.mt.json │ │ │ ├── a11y-media-player.my.json │ │ │ ├── a11y-media-player.sk.json │ │ │ ├── a11y-media-player.sr.json │ │ │ ├── a11y-media-player.sw.json │ │ │ ├── a11y-media-player.ta.json │ │ │ ├── a11y-media-player.te.json │ │ │ └── a11y-media-player.yo.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-media-player.test.js │ ├── a11y-menu-button/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-menu-button.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── a11y-menu-button-item.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-menu-button.test.js │ ├── a11y-tabs/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-tabs.js │ │ ├── demo/ │ │ │ ├── breakpoints.html │ │ │ ├── index.html │ │ │ ├── sticky.html │ │ │ └── vertical.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── a11y-tab.js │ │ │ └── a11y-tabs.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-tabs.test.js │ ├── a11y-utils/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── a11y-utils.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── a11y-utils.test.js │ ├── absolute-position-behavior/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── absolute-position-behavior.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── absolute-position-state-manager.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── absolute-position-behavior.test.js │ ├── accent-card/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── accent-card.js │ │ ├── demo/ │ │ │ ├── borders.html │ │ │ ├── colors.html │ │ │ ├── imageWidth.html │ │ │ ├── images.html │ │ │ ├── index.html │ │ │ └── orientation.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── accent-card.test.js │ ├── aframe-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── aframe-player.js │ │ ├── demo/ │ │ │ ├── animatedbox.gltf │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── aframe-player.test.js │ ├── ai-usage-license/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ai-usage-license.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── v1.json │ │ ├── locales/ │ │ │ ├── ai-usage-license.ar.haxProperties.json │ │ │ ├── ai-usage-license.ar.json │ │ │ ├── ai-usage-license.bn.haxProperties.json │ │ │ ├── ai-usage-license.bn.json │ │ │ ├── ai-usage-license.es.haxProperties.json │ │ │ ├── ai-usage-license.es.json │ │ │ ├── ai-usage-license.fr.haxProperties.json │ │ │ ├── ai-usage-license.fr.json │ │ │ ├── ai-usage-license.hi.haxProperties.json │ │ │ ├── ai-usage-license.hi.json │ │ │ ├── ai-usage-license.ja.haxProperties.json │ │ │ ├── ai-usage-license.ja.json │ │ │ ├── ai-usage-license.pt.haxProperties.json │ │ │ ├── ai-usage-license.pt.json │ │ │ ├── ai-usage-license.ru.haxProperties.json │ │ │ ├── ai-usage-license.ru.json │ │ │ ├── ai-usage-license.zh.haxProperties.json │ │ │ └── ai-usage-license.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── ai-usage-license.test.js │ │ └── web-dev-server.config.mjs │ ├── air-horn/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── air-horn.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── air-horn.test.js │ ├── anchor-behaviors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── anchor-behaviors.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── anchor-behaviors.test.js │ ├── app-hax/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── app-hax.js │ │ ├── demo/ │ │ │ ├── appstore.json │ │ │ ├── archiveSite.json │ │ │ ├── copySite.json │ │ │ ├── createSite.json │ │ │ ├── deleteSite.json │ │ │ ├── downloadSite.json │ │ │ ├── getUserData.json │ │ │ ├── haxiamAddUserAccess.json │ │ │ ├── home.html │ │ │ ├── index.html │ │ │ ├── login.json │ │ │ ├── logout.json │ │ │ ├── sites.json │ │ │ ├── sitesEmpty.json │ │ │ ├── skeletons/ │ │ │ │ ├── blog-site-template.json │ │ │ │ ├── course-site-template.json │ │ │ │ ├── documentation-site-template.json │ │ │ │ └── portfolio-site-template.json │ │ │ └── skeletons.json │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── app-hax-theme.js │ │ │ ├── assets/ │ │ │ │ └── sounds/ │ │ │ │ └── LICENSE.txt │ │ │ ├── random-word/ │ │ │ │ └── random-word.js │ │ │ ├── rpg-character-toast/ │ │ │ │ └── rpg-character-toast.js │ │ │ ├── v1/ │ │ │ │ ├── AppHaxBackendAPI.js │ │ │ │ ├── AppHaxRouter.js │ │ │ │ ├── AppHaxStore.js │ │ │ │ ├── app-hax-button.js │ │ │ │ ├── app-hax-hat-progress.js │ │ │ │ ├── app-hax-label.js │ │ │ │ ├── app-hax-search-bar.js │ │ │ │ ├── app-hax-search-results.js │ │ │ │ ├── app-hax-site-bar.js │ │ │ │ ├── app-hax-site-button.js │ │ │ │ ├── app-hax-site-details.js │ │ │ │ ├── app-hax-site-login.js │ │ │ │ ├── app-hax-steps.js │ │ │ │ ├── app-hax-toast.js │ │ │ │ ├── app-hax-top-bar.js │ │ │ │ ├── app-hax-user-menu-button.js │ │ │ │ ├── app-hax-user-menu.js │ │ │ │ └── app-hax-wired-toggle.js │ │ │ ├── v2/ │ │ │ │ ├── AppHaxBackendAPI.js │ │ │ │ ├── AppHaxRouter.js │ │ │ │ ├── AppHaxStore.js │ │ │ │ ├── HAXIAM_API_SPEC.md │ │ │ │ ├── app-hax-button.js │ │ │ │ ├── app-hax-confirmation-modal.js │ │ │ │ ├── app-hax-filter-tag.js │ │ │ │ ├── app-hax-hat-progress.js │ │ │ │ ├── app-hax-label.js │ │ │ │ ├── app-hax-scroll-button.js │ │ │ │ ├── app-hax-search-results.js │ │ │ │ ├── app-hax-simple-hat-progress.js │ │ │ │ ├── app-hax-site-bar.js │ │ │ │ ├── app-hax-site-button.js │ │ │ │ ├── app-hax-site-creation-modal.js │ │ │ │ ├── app-hax-site-details.js │ │ │ │ ├── app-hax-site-login.js │ │ │ │ ├── app-hax-steps.js │ │ │ │ ├── app-hax-toast.js │ │ │ │ ├── app-hax-use-case-filter.js │ │ │ │ ├── app-hax-use-case.js │ │ │ │ ├── app-hax-user-access-modal.js │ │ │ │ ├── app-hax-user-menu-button.js │ │ │ │ ├── app-hax-user-menu.js │ │ │ │ ├── app-hax-wired-toggle.js │ │ │ │ ├── skeleton-loader.js │ │ │ │ └── skeleton-uuid-manager.js │ │ │ └── wired-darkmode-toggle/ │ │ │ └── wired-darkmode-toggle.js │ │ ├── locales/ │ │ │ ├── app-hax.af.json │ │ │ ├── app-hax.am.json │ │ │ ├── app-hax.ar.json │ │ │ ├── app-hax.az.json │ │ │ ├── app-hax.be.json │ │ │ ├── app-hax.bg.json │ │ │ ├── app-hax.bn.json │ │ │ ├── app-hax.bs.json │ │ │ ├── app-hax.ca.json │ │ │ ├── app-hax.co.json │ │ │ ├── app-hax.cs.json │ │ │ ├── app-hax.cy.json │ │ │ ├── app-hax.da.json │ │ │ ├── app-hax.de.json │ │ │ ├── app-hax.el.json │ │ │ ├── app-hax.en.json │ │ │ ├── app-hax.eo.json │ │ │ ├── app-hax.es.json │ │ │ ├── app-hax.et.json │ │ │ ├── app-hax.eu.json │ │ │ ├── app-hax.fa.json │ │ │ ├── app-hax.fi.json │ │ │ ├── app-hax.fo.json │ │ │ ├── app-hax.fr.json │ │ │ ├── app-hax.fy.json │ │ │ ├── app-hax.ga.json │ │ │ ├── app-hax.gl.json │ │ │ ├── app-hax.gn.json │ │ │ ├── app-hax.gu.json │ │ │ ├── app-hax.ha.json │ │ │ ├── app-hax.haw.json │ │ │ ├── app-hax.he.json │ │ │ ├── app-hax.hi.json │ │ │ ├── app-hax.hr.json │ │ │ ├── app-hax.hu.json │ │ │ ├── app-hax.hy.json │ │ │ ├── app-hax.id.json │ │ │ ├── app-hax.ig.json │ │ │ ├── app-hax.is.json │ │ │ ├── app-hax.it.json │ │ │ ├── app-hax.ja.json │ │ │ ├── app-hax.jv.json │ │ │ ├── app-hax.ka.json │ │ │ ├── app-hax.kk.json │ │ │ ├── app-hax.km.json │ │ │ ├── app-hax.kn.json │ │ │ ├── app-hax.ko.json │ │ │ ├── app-hax.ku.json │ │ │ ├── app-hax.ky.json │ │ │ ├── app-hax.lb.json │ │ │ ├── app-hax.lo.json │ │ │ ├── app-hax.lt.json │ │ │ ├── app-hax.lv.json │ │ │ ├── app-hax.mi.json │ │ │ ├── app-hax.mk.json │ │ │ ├── app-hax.ml.json │ │ │ ├── app-hax.mn.json │ │ │ ├── app-hax.mr.json │ │ │ ├── app-hax.ms.json │ │ │ ├── app-hax.mt.json │ │ │ ├── app-hax.my.json │ │ │ ├── app-hax.nb.json │ │ │ ├── app-hax.ne.json │ │ │ ├── app-hax.nl.json │ │ │ ├── app-hax.no.json │ │ │ ├── app-hax.ny.json │ │ │ ├── app-hax.om.json │ │ │ ├── app-hax.pa.json │ │ │ ├── app-hax.pl.json │ │ │ ├── app-hax.pnb.json │ │ │ ├── app-hax.ps.json │ │ │ ├── app-hax.pt.json │ │ │ ├── app-hax.qu.json │ │ │ ├── app-hax.ro.json │ │ │ ├── app-hax.ru.json │ │ │ ├── app-hax.sd.json │ │ │ ├── app-hax.si.json │ │ │ ├── app-hax.sk.json │ │ │ ├── app-hax.sl.json │ │ │ ├── app-hax.sn.json │ │ │ ├── app-hax.so.json │ │ │ ├── app-hax.sq.json │ │ │ ├── app-hax.sr.json │ │ │ ├── app-hax.sv.json │ │ │ ├── app-hax.sw.json │ │ │ ├── app-hax.ta.json │ │ │ ├── app-hax.te.json │ │ │ ├── app-hax.tg.json │ │ │ ├── app-hax.th.json │ │ │ ├── app-hax.tk.json │ │ │ ├── app-hax.tl.json │ │ │ ├── app-hax.tr.json │ │ │ ├── app-hax.tt.json │ │ │ ├── app-hax.uk.json │ │ │ ├── app-hax.ur.json │ │ │ ├── app-hax.uz.json │ │ │ ├── app-hax.vi.json │ │ │ ├── app-hax.wuu.json │ │ │ ├── app-hax.xh.json │ │ │ ├── app-hax.yi.json │ │ │ ├── app-hax.yo.json │ │ │ ├── app-hax.zh.json │ │ │ ├── app-hax.zh_CN.json │ │ │ └── app-hax.zu.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── app-hax.test.js │ ├── audio-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── audio-player.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── audio-player.test.js │ ├── author-card/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── author-card.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── author-card.haxProperties.json │ │ ├── locales/ │ │ │ ├── author-card.ar.haxProperties.json │ │ │ ├── author-card.ar.json │ │ │ ├── author-card.bn.haxProperties.json │ │ │ ├── author-card.bn.json │ │ │ ├── author-card.en.json │ │ │ ├── author-card.es.haxProperties.json │ │ │ ├── author-card.es.json │ │ │ ├── author-card.fr.haxProperties.json │ │ │ ├── author-card.fr.json │ │ │ ├── author-card.hi.haxProperties.json │ │ │ ├── author-card.hi.json │ │ │ ├── author-card.ja.haxProperties.json │ │ │ ├── author-card.ja.json │ │ │ ├── author-card.pt.haxProperties.json │ │ │ ├── author-card.pt.json │ │ │ ├── author-card.ru.haxProperties.json │ │ │ ├── author-card.ru.json │ │ │ ├── author-card.zh.haxProperties.json │ │ │ └── author-card.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── author-card.test.js │ │ └── web-dev-server.config.mjs │ ├── awesome-explosion/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── awesome-explosion.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── awesome-explosion.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── awesome-explosion.test.js │ ├── b-r/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .idea/ │ │ │ ├── .gitignore │ │ │ ├── b-r.iml │ │ │ ├── modules.xml │ │ │ └── vcs.xml │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── b-r.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── b-r.test.js │ ├── barcode-reader/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .idea/ │ │ │ ├── barcode-reader.iml │ │ │ ├── modules.xml │ │ │ ├── prettier.xml │ │ │ ├── vcs.xml │ │ │ └── workspace.xml │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── barcode-reader.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── zxing.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── barcode-reader.test.js │ ├── baseline-build-hax/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── baseline-build-hax.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── baseline-build-hax.test.js │ ├── beaker-broker/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── beaker-broker.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── beaker-broker.test.js │ ├── bootstrap-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── bootstrap-theme.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── BootstrapBreadcrumb.js │ │ │ ├── BootstrapFooter.js │ │ │ ├── BootstrapSearch.js │ │ │ └── BootstrapUserStylesMenuMixin.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── bootstrap-theme.test.js │ ├── chartist-render/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── chartist-render.js │ │ ├── demo/ │ │ │ ├── bar.csv │ │ │ ├── csv.html │ │ │ ├── donut.csv │ │ │ ├── index.html │ │ │ ├── line.csv │ │ │ └── pie.csv │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── chartist/ │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── LICENSE-WTFPL │ │ │ │ ├── README.md │ │ │ │ └── dist/ │ │ │ │ ├── chartist.css │ │ │ │ └── chartist.js │ │ │ ├── chartist-plugin-axistitle/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ └── dist/ │ │ │ │ ├── LICENSE │ │ │ │ └── chartist-plugin-axistitle.js │ │ │ ├── chartist-plugin-fill-donut/ │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── dist/ │ │ │ │ │ └── chartist-plugin-fill-donut.js │ │ │ │ └── src/ │ │ │ │ └── scripts/ │ │ │ │ └── chartist-plugin-fill-donut.js │ │ │ └── chartist-plugin-pointlabels/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── dist/ │ │ │ ├── LICENSE │ │ │ └── chartist-plugin-pointlabels.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── chartist-render.test.js │ ├── chat-agent/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── chat-agent.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── chat-agent-store.js │ │ │ ├── chat-button.js │ │ │ ├── chat-control-bar.js │ │ │ ├── chat-developer-panel.js │ │ │ ├── chat-input.js │ │ │ ├── chat-interface.js │ │ │ ├── chat-message.js │ │ │ └── chat-suggestion.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── chat-agent.test.js │ ├── check-it-out/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── check-it-out.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── check-it-out.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── check-it-out.test.js │ ├── citation-builder/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── citation-builder.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── citation-builder.haxProperties.json │ │ │ └── citation-item.js │ │ ├── locales/ │ │ │ ├── citation-builder.ar.haxProperties.json │ │ │ ├── citation-builder.ar.json │ │ │ ├── citation-builder.bn.haxProperties.json │ │ │ ├── citation-builder.bn.json │ │ │ ├── citation-builder.es.haxProperties.json │ │ │ ├── citation-builder.es.json │ │ │ ├── citation-builder.fr.haxProperties.json │ │ │ ├── citation-builder.fr.json │ │ │ ├── citation-builder.hi.haxProperties.json │ │ │ ├── citation-builder.hi.json │ │ │ ├── citation-builder.ja.haxProperties.json │ │ │ ├── citation-builder.ja.json │ │ │ ├── citation-builder.pt.haxProperties.json │ │ │ ├── citation-builder.pt.json │ │ │ ├── citation-builder.ru.haxProperties.json │ │ │ ├── citation-builder.ru.json │ │ │ ├── citation-builder.zh.haxProperties.json │ │ │ └── citation-builder.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── citation-builder.test.js │ │ └── web-dev-server.config.mjs │ ├── citation-element/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── citation-element.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── citation-element.test.js │ ├── clean-one/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── clean-one.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── clean-one-search-box.js │ │ ├── locales/ │ │ │ ├── clean-one.de.json │ │ │ ├── clean-one.es.json │ │ │ ├── clean-one.fr.json │ │ │ └── clean-one.ja.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── clean-one.test.js │ ├── clean-portfolio-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── clean-portfolio-theme.js │ │ ├── index.html │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── clean-portfolio-theme.test.js │ │ └── web-dev-server.config.mjs │ ├── clean-two/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── clean-two.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── clean-two.test.js │ ├── cms-hax/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── cms-hax.js │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── sample-store.json │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── cms-block.js │ │ │ ├── cms-entity.js │ │ │ ├── cms-token.js │ │ │ └── cms-views.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── cms-hax.test.js │ ├── code-editor/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── code-editor.js │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── updating.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── code-pen-button.js │ │ │ └── monaco-element/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── monaco-element.js │ │ │ ├── monaco.js │ │ │ └── utils.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── code-editor.test.js │ ├── code-sample/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── code-sample.js │ │ ├── demo/ │ │ │ ├── code-sample-theme.js │ │ │ ├── css/ │ │ │ │ └── demo.css │ │ │ ├── demo.js │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── highlightjs/ │ │ │ │ ├── highlight.js │ │ │ │ ├── languages/ │ │ │ │ │ ├── css.js │ │ │ │ │ ├── javascript.js │ │ │ │ │ ├── json.js │ │ │ │ │ ├── php.js │ │ │ │ │ ├── xml.js │ │ │ │ │ └── yaml.js │ │ │ │ └── styles/ │ │ │ │ ├── a11y-dark.css │ │ │ │ ├── a11y-light.css │ │ │ │ ├── agate.css │ │ │ │ ├── an-old-hope.css │ │ │ │ ├── androidstudio.css │ │ │ │ ├── arduino-light.css │ │ │ │ ├── arta.css │ │ │ │ ├── ascetic.css │ │ │ │ ├── atelier-cave-dark.css │ │ │ │ ├── atelier-cave-light.css │ │ │ │ ├── atelier-dune-dark.css │ │ │ │ ├── atelier-dune-light.css │ │ │ │ ├── atelier-estuary-dark.css │ │ │ │ ├── atelier-estuary-light.css │ │ │ │ ├── atelier-forest-dark.css │ │ │ │ ├── atelier-forest-light.css │ │ │ │ ├── atelier-heath-dark.css │ │ │ │ ├── atelier-heath-light.css │ │ │ │ ├── atelier-lakeside-dark.css │ │ │ │ ├── atelier-lakeside-light.css │ │ │ │ ├── atelier-plateau-dark.css │ │ │ │ ├── atelier-plateau-light.css │ │ │ │ ├── atelier-savanna-dark.css │ │ │ │ ├── atelier-savanna-light.css │ │ │ │ ├── atelier-seaside-dark.css │ │ │ │ ├── atelier-seaside-light.css │ │ │ │ ├── atelier-sulphurpool-dark.css │ │ │ │ ├── atelier-sulphurpool-light.css │ │ │ │ ├── atom-one-dark-reasonable.css │ │ │ │ ├── atom-one-dark.css │ │ │ │ ├── atom-one-light.css │ │ │ │ ├── brown-paper.css │ │ │ │ ├── codepen-embed.css │ │ │ │ ├── color-brewer.css │ │ │ │ ├── darcula.css │ │ │ │ ├── dark.css │ │ │ │ ├── darkula.css │ │ │ │ ├── default.css │ │ │ │ ├── docco.css │ │ │ │ ├── dracula.css │ │ │ │ ├── far.css │ │ │ │ ├── foundation.css │ │ │ │ ├── github-gist.css │ │ │ │ ├── github.css │ │ │ │ ├── gml.css │ │ │ │ ├── googlecode.css │ │ │ │ ├── grayscale.css │ │ │ │ ├── gruvbox-dark.css │ │ │ │ ├── gruvbox-light.css │ │ │ │ ├── hopscotch.css │ │ │ │ ├── hybrid.css │ │ │ │ ├── idea.css │ │ │ │ ├── ir-black.css │ │ │ │ ├── isbl-editor-dark.css │ │ │ │ ├── isbl-editor-light.css │ │ │ │ ├── kimbie.dark.css │ │ │ │ ├── kimbie.light.css │ │ │ │ ├── lightfair.css │ │ │ │ ├── magula.css │ │ │ │ ├── mono-blue.css │ │ │ │ ├── monokai-sublime.css │ │ │ │ ├── monokai.css │ │ │ │ ├── nord.css │ │ │ │ ├── obsidian.css │ │ │ │ ├── ocean.css │ │ │ │ ├── paraiso-dark.css │ │ │ │ ├── paraiso-light.css │ │ │ │ ├── pojoaque.css │ │ │ │ ├── purebasic.css │ │ │ │ ├── qtcreator_dark.css │ │ │ │ ├── qtcreator_light.css │ │ │ │ ├── railscasts.css │ │ │ │ ├── rainbow.css │ │ │ │ ├── routeros.css │ │ │ │ ├── school-book.css │ │ │ │ ├── shades-of-purple.css │ │ │ │ ├── solarized-dark.css │ │ │ │ ├── solarized-light.css │ │ │ │ ├── sunburst.css │ │ │ │ ├── tomorrow-night-blue.css │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ ├── tomorrow-night-eighties.css │ │ │ │ ├── tomorrow-night.css │ │ │ │ ├── tomorrow.css │ │ │ │ ├── vs.css │ │ │ │ ├── vs2015.css │ │ │ │ ├── xcode.css │ │ │ │ ├── xt256.css │ │ │ │ └── zenburn.css │ │ │ └── themes/ │ │ │ ├── default.js │ │ │ ├── github.js │ │ │ ├── kustom-dark.js │ │ │ ├── kustom-light.js │ │ │ ├── one-dark.js │ │ │ ├── one-light.js │ │ │ ├── solarized-dark.js │ │ │ └── solarized-light.js │ │ ├── locales/ │ │ │ └── code-sample.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── code-sample.test.js │ ├── collection-list/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── collection-list.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── collection-item.haxProperties.json │ │ │ ├── collection-item.js │ │ │ ├── collection-list.haxProperties.json │ │ │ ├── collection-row.js │ │ │ ├── collections-theme-banner.js │ │ │ └── collections-theme.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── collection-list.test.js │ ├── count-up/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── count-up.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── countup.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── count-up.test.js │ ├── course-design/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── course-design.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── activity-box.haxProperties.json │ │ │ ├── activity-box.js │ │ │ ├── block-quote.haxProperties.json │ │ │ ├── block-quote.js │ │ │ ├── course-intro-footer.js │ │ │ ├── course-intro-header.js │ │ │ ├── course-intro-lesson-plan.js │ │ │ ├── course-intro-lesson-plans.js │ │ │ ├── course-intro.js │ │ │ ├── ebook-button.js │ │ │ ├── learning-component.js │ │ │ ├── lrn-h5p.js │ │ │ ├── responsive-iframe.js │ │ │ └── worksheet-download.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── course-design.test.js │ ├── course-model/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── course-model.js │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── models/ │ │ │ ├── arm/ │ │ │ │ └── models_arm.gltf │ │ │ └── guns/ │ │ │ └── colt-1911/ │ │ │ ├── colt_1911_clip.gltf │ │ │ ├── colt_1911_full.gltf │ │ │ ├── colt_1911_half.gltf │ │ │ └── colt_1911_parts.gltf │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── course-model.haxProperties.json │ │ │ ├── model-info.js │ │ │ └── model-option.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── course-model.test.js │ ├── csv-render/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── csv-render.js │ │ ├── demo/ │ │ │ ├── demo.csv │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── csv-render.test.js │ ├── d-d-d/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .todo │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── d-d-d.js │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── mini-map.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── DDDPaletteRegistry.js │ │ │ ├── DDDStyleGuidePresets.js │ │ │ ├── DDDStyles.js │ │ │ ├── DesignSystemManager.js │ │ │ ├── ddd-brochure-theme.js │ │ │ ├── ddd-card.haxProperties.json │ │ │ ├── ddd-card.js │ │ │ ├── ddd-steps-list-item.haxProperties.json │ │ │ ├── ddd-steps-list-item.js │ │ │ ├── ddd-steps-list.haxProperties.json │ │ │ ├── ddd-steps-list.js │ │ │ ├── hax-palette-picker.js │ │ │ └── mini-map.js │ │ ├── locales/ │ │ │ └── ddd-card.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── d-d-d.test.js │ ├── d-d-docs/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── d-d-docs.js │ │ ├── index.html │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── d-d-docs.test.js │ │ └── web-dev-server.config.mjs │ ├── data-viz/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── data-viz.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── data-viz.test.js │ ├── date-card/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── date-card.js │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── date-card.haxProperties.json │ │ │ └── date-chip.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── date-card.test.js │ ├── deduping-fix/ │ │ ├── README.md │ │ ├── deduping-fix.js │ │ ├── gulpfile.cjs │ │ └── package.json │ ├── demo-snippet/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── demo-snippet.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── demo-snippet.haxProperties.json │ │ ├── locales/ │ │ │ ├── demo-snippet.ar.haxProperties.json │ │ │ ├── demo-snippet.ar.json │ │ │ ├── demo-snippet.bn.haxProperties.json │ │ │ ├── demo-snippet.bn.json │ │ │ ├── demo-snippet.es.haxProperties.json │ │ │ ├── demo-snippet.es.json │ │ │ ├── demo-snippet.fr.haxProperties.json │ │ │ ├── demo-snippet.fr.json │ │ │ ├── demo-snippet.hi.haxProperties.json │ │ │ ├── demo-snippet.hi.json │ │ │ ├── demo-snippet.ja.haxProperties.json │ │ │ ├── demo-snippet.ja.json │ │ │ ├── demo-snippet.pt.haxProperties.json │ │ │ ├── demo-snippet.pt.json │ │ │ ├── demo-snippet.ru.haxProperties.json │ │ │ ├── demo-snippet.ru.json │ │ │ ├── demo-snippet.zh.haxProperties.json │ │ │ └── demo-snippet.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── demo-snippet.test.js │ │ └── web-dev-server.config.mjs │ ├── discord-embed/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── discord-embed.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── discord-embed.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── discord-embed.test.js │ ├── disqus-embed/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── disqus-embed.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── haxcms-site-disqus.haxProperties.json │ │ │ └── haxcms-site-disqus.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── disqus-embed.test.js │ ├── dl-behavior/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── dl-behavior.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── dl-behavior.test.js │ ├── documentation-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── documentation-player.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── documentation-player.test.js │ ├── dynamic-import-registry/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── dynamic-import-registry.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── dynamic-import-registry.test.js │ ├── editable-table/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── advanced.html │ │ │ ├── display.html │ │ │ ├── editmode.html │ │ │ ├── exporting.html │ │ │ ├── foods.csv │ │ │ ├── game.csv │ │ │ ├── importing.html │ │ │ ├── index.html │ │ │ ├── local-import.html │ │ │ └── numeric.html │ │ ├── editable-table.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── editable-table-behaviors.js │ │ │ ├── editable-table-display.js │ │ │ ├── editable-table-edit.js │ │ │ ├── editable-table-editor-rowcol.js │ │ │ ├── editable-table-filter.js │ │ │ ├── editable-table-sort.js │ │ │ └── editable-table.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── editable-table.test.js │ ├── elmsln-loading/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── elmsln-loading.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── elmsln-loading.test.js │ ├── enhanced-text/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── enhanced-text.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── enhanced-text.test.js │ ├── es-global-bridge/ │ │ ├── README.md │ │ ├── es-global-bridge.js │ │ ├── gulpfile.cjs │ │ ├── package.json │ │ └── test/ │ │ └── es-global-bridge.test.js │ ├── event-badge/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── event-badge.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── event-badge.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── event-badge.test.js │ ├── example-hax-element/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── example-hax-element.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── example-hax-element.haxProperties.json │ │ ├── locales/ │ │ │ ├── example-hax-element.ar.haxProperties.json │ │ │ ├── example-hax-element.ar.json │ │ │ ├── example-hax-element.es.haxProperties.json │ │ │ ├── example-hax-element.es.json │ │ │ ├── example-hax-element.hi.haxProperties.json │ │ │ ├── example-hax-element.hi.json │ │ │ ├── example-hax-element.zh.haxProperties.json │ │ │ └── example-hax-element.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── example-hax-element.test.js │ │ └── web-dev-server.config.mjs │ ├── example-haxcms-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── demo/ │ │ │ └── site.json │ │ ├── example-haxcms-theme.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── example-haxcms-theme.haxProperties.json │ │ ├── locales/ │ │ │ ├── example-haxcms-theme.ar.haxProperties.json │ │ │ ├── example-haxcms-theme.ar.json │ │ │ ├── example-haxcms-theme.es.haxProperties.json │ │ │ ├── example-haxcms-theme.es.json │ │ │ ├── example-haxcms-theme.hi.haxProperties.json │ │ │ ├── example-haxcms-theme.hi.json │ │ │ ├── example-haxcms-theme.zh.haxProperties.json │ │ │ └── example-haxcms-theme.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── example-haxcms-theme.test.js │ │ └── web-dev-server.config.mjs │ ├── figure-label/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── figure-label.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── figure-label.test.js │ ├── file-system-broker/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── MOBILE_SUPPORT.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── docx.html │ │ │ ├── index.html │ │ │ ├── mobile-test.html │ │ │ └── xlsx.html │ │ ├── file-system-broker.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── docx-file-system-broker.js │ │ │ ├── mammoth/ │ │ │ │ └── LICENSE │ │ │ ├── xlsx/ │ │ │ │ ├── LICENSE │ │ │ │ ├── dist/ │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── cpexcel.js │ │ │ │ ├── jszip.js │ │ │ │ ├── xlsx.js │ │ │ │ └── xlsxworker.js │ │ │ └── xlsx-file-system-broker.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── file-system-broker.test.js │ ├── fill-in-the-blanks/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── _.gitignore │ │ ├── _.npmignore │ │ ├── custom-elements.json │ │ ├── demo/ │ │ │ └── index.html │ │ ├── fill-in-the-blanks.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── fill-in-the-blanks.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ ├── fill-in-the-blanks.test.js │ │ ├── fill-in-the-blanks_test.html │ │ └── index.html │ ├── flash-card/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── flash-card.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── flash-card-answer-box.js │ │ │ ├── flash-card-prompt-img.js │ │ │ ├── flash-card-set.js │ │ │ └── flash-card.haxProperties.json │ │ ├── locales/ │ │ │ ├── flash-card-answer-box.es.json │ │ │ ├── flash-card-answer-box.fr.json │ │ │ └── flash-card-answer-box.ja.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── flash-card.test.js │ ├── fluid-type/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── fluid-type.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── fluid-type.test.js │ ├── full-width-image/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── full-width-image.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── full-width-image.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── full-width-image.test.js │ ├── fullscreen-behaviors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── fullscreen-behaviors-demo.js │ │ │ └── index.html │ │ ├── fullscreen-behaviors.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── fullscreen-behaviors.test.js │ ├── future-terminal-text/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── future-terminal-text.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── FutureTerminalTextSuper.js │ │ │ └── future-terminal-text-lite.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── future-terminal-text.test.js │ ├── git-corner/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── git-corner.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── git-corner.test.js │ ├── github-preview/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── github-preview.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── github-rpg-contributors.haxProperties.json │ │ │ ├── github-rpg-contributors.js │ │ │ └── wc-markdown.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── github-preview.test.js │ ├── glossy-portfolio-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── glossy-portfolio-theme.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── data.json │ │ │ ├── glossy-portfolio-about.js │ │ │ ├── glossy-portfolio-breadcrumb.js │ │ │ ├── glossy-portfolio-card.js │ │ │ ├── glossy-portfolio-footer.js │ │ │ ├── glossy-portfolio-grid.js │ │ │ ├── glossy-portfolio-header.js │ │ │ ├── glossy-portfolio-home.js │ │ │ └── graphic-portfolio.haxProperties.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── glossy-portfolio-theme.test.js │ │ └── web-dev-server.config.mjs │ ├── grade-book/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── backend.json │ │ │ ├── index.html │ │ │ ├── letter-grade-picker.html │ │ │ └── lite.html │ │ ├── grade-book.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── GradeBookUIPieces.js │ │ │ ├── grade-book-lite.js │ │ │ ├── grade-book-pop-up.js │ │ │ ├── grade-book-store.js │ │ │ ├── grade-book-student-block.js │ │ │ ├── grade-book-table.js │ │ │ ├── letter-grade-picker.js │ │ │ └── letter-grade.js │ │ ├── locales/ │ │ │ ├── grade-book.de.json │ │ │ ├── grade-book.es.json │ │ │ └── grade-book.fr.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── grade-book.test.js │ ├── grid-plate/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── grid-plate.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── grid-plate.test.js │ ├── h-a-x/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── appstore.json │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── h-a-x.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── h-a-x-dependencies.js │ │ ├── package.json │ │ └── test/ │ │ └── h-a-x.test.js │ ├── h5p-element/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── h5p-element.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── h5p/ │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── README.txt │ │ │ │ ├── composer.json │ │ │ │ ├── doc/ │ │ │ │ │ └── spec_en.html │ │ │ │ ├── js/ │ │ │ │ │ ├── h5p-action-bar.js │ │ │ │ │ ├── h5p-confirmation-dialog.js │ │ │ │ │ ├── h5p-content-type.js │ │ │ │ │ ├── h5p-content-upgrade-process.js │ │ │ │ │ ├── h5p-content-upgrade-worker.js │ │ │ │ │ ├── h5p-content-upgrade.js │ │ │ │ │ ├── h5p-data-view.js │ │ │ │ │ ├── h5p-display-options.js │ │ │ │ │ ├── h5p-embed.js │ │ │ │ │ ├── h5p-event-dispatcher.js │ │ │ │ │ ├── h5p-library-details.js │ │ │ │ │ ├── h5p-library-list.js │ │ │ │ │ ├── h5p-resizer.js │ │ │ │ │ ├── h5p-utils.js │ │ │ │ │ ├── h5p-version.js │ │ │ │ │ ├── h5p-x-api-event.js │ │ │ │ │ ├── h5p-x-api.js │ │ │ │ │ ├── h5p.js │ │ │ │ │ ├── jquery.js │ │ │ │ │ └── settings/ │ │ │ │ │ └── h5p-disable-hub.js │ │ │ │ └── styles/ │ │ │ │ ├── h5p-admin.css │ │ │ │ ├── h5p-confirmation-dialog.css │ │ │ │ ├── h5p-core-button.css │ │ │ │ └── h5p.css │ │ │ ├── h5p-element.haxProperties.json │ │ │ ├── h5p-resizer.js │ │ │ └── h5p-wrapped-element.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── h5p-element.test.js │ ├── hal-9000/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── hal-9000.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── hal-9000-ui/ │ │ │ └── hal-9000-ui.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hal-9000.test.js │ ├── hax-body/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── allthethings.html │ │ │ ├── app-item.html │ │ │ ├── appstore.json │ │ │ ├── bueller.vtt │ │ │ ├── index.html │ │ │ ├── local-save.html │ │ │ ├── shoelace.html │ │ │ └── shoelace.json │ │ ├── gulpfile.cjs │ │ ├── hax-body.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── buttons/ │ │ │ │ ├── hax-text-editor-alignment-picker.js │ │ │ │ ├── hax-text-editor-heading-picker.js │ │ │ │ └── hax-text-editor-tag-toggle.js │ │ │ ├── hax-app-picker.js │ │ │ ├── hax-app-search.js │ │ │ ├── hax-app.js │ │ │ ├── hax-autoloader.js │ │ │ ├── hax-cancel-dialog.js │ │ │ ├── hax-context-behaviors.js │ │ │ ├── hax-context-item-textop.js │ │ │ ├── hax-context-item.js │ │ │ ├── hax-element-demo.js │ │ │ ├── hax-export-dialog.js │ │ │ ├── hax-gizmo-browser.js │ │ │ ├── hax-map.js │ │ │ ├── hax-picker.js │ │ │ ├── hax-plate-context.js │ │ │ ├── hax-preferences-dialog.js │ │ │ ├── hax-stax-browser.js │ │ │ ├── hax-store.js │ │ │ ├── hax-text-editor-button.js │ │ │ ├── hax-text-editor-paste-button.js │ │ │ ├── hax-text-editor-toolbar.js │ │ │ ├── hax-text-editor.js │ │ │ ├── hax-toolbar-item.js │ │ │ ├── hax-toolbar-menu.js │ │ │ ├── hax-toolbar.js │ │ │ ├── hax-tray-button.js │ │ │ ├── hax-tray-upload.js │ │ │ ├── hax-tray.js │ │ │ ├── hax-ui-styles.js │ │ │ ├── hax-upload-field.js │ │ │ └── hax-view-source.js │ │ ├── locales/ │ │ │ ├── hax.af.json │ │ │ ├── hax.am.json │ │ │ ├── hax.ar.json │ │ │ ├── hax.az.json │ │ │ ├── hax.be.json │ │ │ ├── hax.bg.json │ │ │ ├── hax.bn.json │ │ │ ├── hax.bs.json │ │ │ ├── hax.ca.json │ │ │ ├── hax.co.json │ │ │ ├── hax.cs.json │ │ │ ├── hax.cy.json │ │ │ ├── hax.da.json │ │ │ ├── hax.de.json │ │ │ ├── hax.el.json │ │ │ ├── hax.eo.json │ │ │ ├── hax.es.json │ │ │ ├── hax.et.json │ │ │ ├── hax.eu.json │ │ │ ├── hax.fa.json │ │ │ ├── hax.fi.json │ │ │ ├── hax.fo.json │ │ │ ├── hax.fr.json │ │ │ ├── hax.fy.json │ │ │ ├── hax.ga.json │ │ │ ├── hax.gl.json │ │ │ ├── hax.gn.json │ │ │ ├── hax.gu.json │ │ │ ├── hax.ha.json │ │ │ ├── hax.haw.json │ │ │ ├── hax.he.json │ │ │ ├── hax.hi.json │ │ │ ├── hax.hr.json │ │ │ ├── hax.hu.json │ │ │ ├── hax.hy.json │ │ │ ├── hax.id.json │ │ │ ├── hax.ig.json │ │ │ ├── hax.is.json │ │ │ ├── hax.it.json │ │ │ ├── hax.ja.json │ │ │ ├── hax.jv.json │ │ │ ├── hax.ka.json │ │ │ ├── hax.kk.json │ │ │ ├── hax.km.json │ │ │ ├── hax.kn.json │ │ │ ├── hax.ko.json │ │ │ ├── hax.ku.json │ │ │ ├── hax.ky.json │ │ │ ├── hax.lb.json │ │ │ ├── hax.lo.json │ │ │ ├── hax.lt.json │ │ │ ├── hax.lv.json │ │ │ ├── hax.mi.json │ │ │ ├── hax.mk.json │ │ │ ├── hax.ml.json │ │ │ ├── hax.mn.json │ │ │ ├── hax.mr.json │ │ │ ├── hax.ms.json │ │ │ ├── hax.mt.json │ │ │ ├── hax.my.json │ │ │ ├── hax.nb.json │ │ │ ├── hax.ne.json │ │ │ ├── hax.nl.json │ │ │ ├── hax.no.json │ │ │ ├── hax.ny.json │ │ │ ├── hax.om.json │ │ │ ├── hax.pa.json │ │ │ ├── hax.pl.json │ │ │ ├── hax.pnb.json │ │ │ ├── hax.ps.json │ │ │ ├── hax.pt.json │ │ │ ├── hax.qu.json │ │ │ ├── hax.ro.json │ │ │ ├── hax.ru.json │ │ │ ├── hax.sd.json │ │ │ ├── hax.si.json │ │ │ ├── hax.sk.json │ │ │ ├── hax.sl.json │ │ │ ├── hax.sn.json │ │ │ ├── hax.so.json │ │ │ ├── hax.sq.json │ │ │ ├── hax.sr.json │ │ │ ├── hax.sv.json │ │ │ ├── hax.sw.json │ │ │ ├── hax.ta.json │ │ │ ├── hax.te.json │ │ │ ├── hax.tg.json │ │ │ ├── hax.th.json │ │ │ ├── hax.tk.json │ │ │ ├── hax.tr.json │ │ │ ├── hax.tt.json │ │ │ ├── hax.uk.json │ │ │ ├── hax.ur.json │ │ │ ├── hax.uz.json │ │ │ ├── hax.vi.json │ │ │ ├── hax.wuu.json │ │ │ ├── hax.xh.json │ │ │ ├── hax.yi.json │ │ │ ├── hax.yo.json │ │ │ ├── hax.zh.json │ │ │ └── hax.zu.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ ├── hax-body.test.js │ │ └── hax-text-editor-toolbar.test.js │ ├── hax-body-behaviors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── hax-body-behaviors.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── HAXFields.js │ │ │ ├── HAXLayouts.js │ │ │ └── HAXWiring.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hax-body-behaviors.test.js │ ├── hax-bookmarklet/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── BOOKMARKLET-SOURCE.js │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── appstore.json │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── hax-bookmarklet.js │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hax-bookmarklet.test.js │ ├── hax-cloud/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── dist/ │ │ │ │ ├── app.js │ │ │ │ ├── build-cms.js │ │ │ │ ├── build-elmsln.js │ │ │ │ ├── build-full.js │ │ │ │ ├── build-haxcms.js │ │ │ │ ├── build-home.js │ │ │ │ ├── build-install.js │ │ │ │ ├── build-legacy.js │ │ │ │ ├── build.html │ │ │ │ ├── build.js │ │ │ │ ├── dev/ │ │ │ │ │ ├── appstore.json │ │ │ │ │ ├── connectionSettings.json │ │ │ │ │ ├── createNodePath.json │ │ │ │ │ ├── getConfigPath.json │ │ │ │ │ ├── getNodeFieldsPath.json │ │ │ │ │ ├── getSiteFieldsPath.json │ │ │ │ │ ├── login.json │ │ │ │ │ ├── logout.json │ │ │ │ │ ├── saveManifestPath.json │ │ │ │ │ ├── saveNode.json │ │ │ │ │ ├── savePage.json │ │ │ │ │ └── userData.json │ │ │ │ ├── dev.html │ │ │ │ ├── my-custom-elements.js │ │ │ │ └── sites.json │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ └── wc-registry.json │ │ ├── gulpfile.cjs │ │ ├── hax-cloud.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── appstore.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hax-cloud.test.js │ ├── hax-iconset/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── iconset.html │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── hax-iconset.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── build.sh │ │ │ ├── elmsln-custom-iconset.js │ │ │ ├── hax-iconset-manifest.js │ │ │ ├── simple-hax-iconset.js │ │ │ └── svgs/ │ │ │ └── mdi-social/ │ │ │ └── iconlist.txt │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hax-iconset.test.js │ ├── hax-logo/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── site.html │ │ ├── gulpfile.cjs │ │ ├── hax-logo.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── hax-logo.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hax-logo.test.js │ ├── haxcms-elements/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── KEYBOARD_SHORTCUTS.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── automation/ │ │ │ ├── README.md │ │ │ ├── check-status.js │ │ │ ├── package.json │ │ │ └── puppeteer-theme-automation.js │ │ ├── demo/ │ │ │ ├── 404.html │ │ │ ├── CNAME │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── assets/ │ │ │ │ ├── build-legacy.js │ │ │ │ ├── build-polyfills.js │ │ │ │ ├── legacy-outline.css │ │ │ │ └── upgrade-browser.html │ │ │ ├── atom.xml │ │ │ ├── beaker.html │ │ │ ├── browserconfig.xml │ │ │ ├── build-haxcms.js │ │ │ ├── build-legacy-es5-support.js │ │ │ ├── build-legacy.js │ │ │ ├── build-polyfills.js │ │ │ ├── build.js │ │ │ ├── create-cli.recipe │ │ │ ├── custom/ │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── package.json │ │ │ │ ├── rollup.config.js │ │ │ │ └── src/ │ │ │ │ ├── custom-journey-theme.js │ │ │ │ └── custom.js │ │ │ ├── dat.json │ │ │ ├── dist/ │ │ │ │ ├── app.js │ │ │ │ ├── build-cms.js │ │ │ │ ├── build-elmsln.js │ │ │ │ ├── build-full.js │ │ │ │ ├── build-haxcms.js │ │ │ │ ├── build-home.js │ │ │ │ ├── build-install.js │ │ │ │ ├── build-legacy.js │ │ │ │ ├── build.html │ │ │ │ ├── build.js │ │ │ │ ├── dev/ │ │ │ │ │ ├── appstore.json │ │ │ │ │ ├── connectionSettings.json │ │ │ │ │ ├── contentSearchPath.json │ │ │ │ │ ├── createNodePath.json │ │ │ │ │ ├── getConfigPath.json │ │ │ │ │ ├── getNodeFieldsPath.json │ │ │ │ │ ├── getSiteFieldsPath.json │ │ │ │ │ ├── login.json │ │ │ │ │ ├── logout.json │ │ │ │ │ ├── saveAllowedBlocksPath.json │ │ │ │ │ ├── saveAppearanceSettingsPath.json │ │ │ │ │ ├── saveEditorSettingsPath.json │ │ │ │ │ ├── saveManifestPath.json │ │ │ │ │ ├── saveNode.json │ │ │ │ │ ├── savePage.json │ │ │ │ │ ├── savePlatformSettingsPath.json │ │ │ │ │ ├── saveSeoSettingsPath.json │ │ │ │ │ └── userData.json │ │ │ │ ├── dev.html │ │ │ │ ├── my-custom-elements.js │ │ │ │ └── sites.json │ │ │ ├── fake/ │ │ │ │ └── dev/ │ │ │ │ ├── ._.DS_Store │ │ │ │ ├── appstore.json │ │ │ │ ├── contentSearchPath.json │ │ │ │ ├── getConfigPath.json │ │ │ │ ├── getNodeFieldsPath.json │ │ │ │ ├── getSiteFieldsPath.json │ │ │ │ ├── login.json │ │ │ │ ├── logout.json │ │ │ │ ├── saveManifestPath.json │ │ │ │ ├── saveNode.json │ │ │ │ ├── savePage.json │ │ │ │ └── saveSeoSettingsPath.json │ │ │ ├── false │ │ │ ├── index.html │ │ │ ├── index.php │ │ │ ├── legacy-outline.html │ │ │ ├── lunrSearchIndex.json │ │ │ ├── manifest.json │ │ │ ├── package.json │ │ │ ├── pages/ │ │ │ │ ├── .gitkeep │ │ │ │ ├── item-012ec894-f7a5-4d12-b0e5-f8e131d7c2b8/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0265920d-6055-404d-a0e6-1ae71c4ce258/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-06108b56-48b5-4c50-b262-81659edc750e/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0714dbb2-8908-463c-9945-05be546b4c11/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0842ac8e-9e65-4715-be25-e3ef4c0baf8b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0ae1c6fb-3f57-4917-8caa-91853eda4982/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0af79ce5-d4ef-4602-8207-b67c711d8cc7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0d0372ea-0057-45bb-8625-0f921921701e/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0d30bca9-c852-4b30-ae4e-abc519262d31/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-0e12b64d-2eb5-4cea-8a85-829ec279cfc7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-104df0b1-7f96-4c26-96f4-d445fff8a868/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-12563166-de6a-42ed-baa6-9d9f694e8312/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-13056366-d039-4d51-b3ae-a3fcd12cd107/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-13bfe233-f320-41ef-94c0-855fe639e778/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-14b2032a-5465-43dc-b1b3-122e9f09d5e4/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-14ee9de9-51d1-4a0d-9944-3ba6856ac053/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-15525242-f6e9-4201-bbb1-cdd8f29176f6/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-178875ba-a955-48b5-855a-9e1435d5d840/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-1d680323-87f4-4f28-bbd2-7268c9d4e172/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-1fa59985-6bf9-4ac7-802b-bc52035f9323/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-20addb32-74be-47bb-ab21-a8237d545b07/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-22596832-8320-4c7f-b7ae-f403d1d9ca31/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-225b6f65-9b18-4960-9ae8-7dd9face20a7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-23eb212e-a523-4d7b-862a-0a00cb786321/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-2a102879-1110-4db4-a6b8-3b687f0fd2b1/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-2b292b5e-6eb5-4031-9c82-7f3b7f87b236/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-2ba3a0b9-8b5b-4e3f-bfed-a19c1a5edff3/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-2bb2159d-c18b-4819-9760-988f227e2c3b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-2eccc2a9-90b2-4dab-a4cb-f36bc45bc0ff/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-2fdd27a1-190a-47c8-8192-910bc1afe0f5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-348f69b5-8bbb-4cf8-8eda-26b4141fffa6/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3577db8a-6017-4df6-a2bb-8ecad1a2bbe7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3938a1cf-d097-473e-8e27-47d34c2e8e4b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-39d2b3f7-0ebc-43a6-88a3-5c1efd876b25/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-39f2e47c-f0fb-4d87-9180-f0f8dedfbe44/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3af50499-d450-4068-b2d2-5893283d0e27/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3be9e67a-53cb-4b3a-9f5b-dc0b40cda743/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3c1bf773-d9e2-4658-84f8-6ab5e3f42ab2/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3c4f0dbd-ef6a-4c8d-acaa-27b295243948/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3e882dd4-4f71-4035-9ea0-26d840853c29/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-3f3cc6fc-18c9-47cb-95bf-0295b6a9e82d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-40583b55-32bf-40c7-8e81-99c054b9a764/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-41d063cb-b6b6-4c42-8a0e-6208a4f98a89/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4277ed25-a0ca-414c-a4ca-62e7d093d2f8/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-42b47c5a-8ad2-4507-bef1-0488c65cc54a/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4550bc1f-bef7-4891-85f0-58647624a26b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4622057f-76f3-40dd-962b-0b6e640e4058/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4b504f9b-4efd-46a1-81a6-ec67c349c835/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4b62f800-7fb9-4a42-b28a-eacefa7bb53c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4b788e81-94f5-4699-b885-37b664eb8d7f/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4bb1088a-8d44-4c7c-bf7c-89abe3787458/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4c29eaf9-75db-4e33-8cd3-de1f4d64d6ca/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-4d1a84b2-ddcb-4dbc-9b37-2d135442c32d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-50802aa4-f49e-4207-98d2-7ef3745568fc/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-51b1acee-9e5c-4756-998e-d6f3ba97882c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-52613cf2-1d34-47ed-9a53-dcc1d84dd5f4/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-526ae84e-2f82-4007-a443-7dbe1115571c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-54584e9b-9350-45aa-8b4f-cf92272cb53d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-56f0a907-0dad-40eb-8302-c18aa6bbc374/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-585825f8-7d6a-4cf3-80cd-8fbed78053e6/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-58846489-4cbe-496e-8330-444fa9c69252/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-5931cf01-9b8d-4bdd-990b-6f4465174dcf/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-59855d23-c026-4b44-9c9f-d5414cc80e55/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-5bcfc9da-de7b-4e0c-858d-1f7adde911a9/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-5d3a6d3d-fd0d-4075-b9da-4116eefdca0b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-5e315843-9d4e-4b67-b046-faa245b67716/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-62df18a5-fe1c-416e-9429-8d3288e7afa7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-635fe9b5-9bda-4658-a1af-3a366d123657/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-63badd6e-1fda-4773-a747-5ac79dbaeb45/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-642b98a6-d2f7-4e66-9278-9f7a59ed44f8/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-6516e05a-35ca-4e30-94c9-da8f32ed7ac8/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-6527bda6-5e79-4530-a7b2-1c8885bcd89e/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-680a9a59-5691-424e-8f84-ee9019e39849/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-68ecb822-ae89-466a-bce2-20b33332451a/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-6cf36319-fe20-4a72-9cb3-97e44e80f8b9/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-6dd95e13-27ae-449b-9c6f-816636d849f5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-6ecf99f9-5623-4892-a651-9472ec0c74a5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-73d866cd-ebd0-4124-ad99-b1b18455327d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-73fd1ab6-ba79-472d-9cc2-7828277a8e27/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-7607700d-d318-4479-a588-837ea13ecd8b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-76c7ae2d-0520-48f6-957c-f4ec9f623736/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-76e43829-027c-481b-8b39-5d215b2b9670/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-778bd19b-566a-422b-99d1-20f564f12489/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-7a54e617-a1cf-456d-866c-442b200d9e53/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-7b57c34b-d8b4-4401-baed-01e39cc0cd77/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-7c0ed8c2-f65d-41a6-93df-ccdc3fc43c9b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-7c4e5edc-892b-4272-8513-248dd4d4efe5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-7d7e9a33-1d6a-4b29-a442-35cef09ee666/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-7ee4ecbe-f90d-4745-a164-9bbd11ddd763/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-80c5b6c1-cbe0-4955-b80e-b2acccf7a3fe/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-82db2727-136d-4ee0-b965-9d847d8631c6/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-846f3fba-27bb-4e82-ba0e-fc1b381f7d17/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-8477c368-ebc7-403d-b576-5d1c450a629c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-861b84da-33c7-49e8-bf25-7aa8d9206d3b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-86b505f8-dc95-4b86-8fdd-5104ecc4f02b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-873f7ad0-8fdd-4c51-81e0-e8f55ea612a5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-8991f223-d78f-42c3-a5f4-da79658ad80e/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-8a5bf844-d498-4f75-bf96-110eaedb42d9/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-8c122112-a265-4ef1-8968-1f12423da119/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-8dfd19ae-77ec-4737-9981-72e4d5880cb9/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-8ec9cf78-ab0c-42ec-abee-7c906be0a487/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-8f14a636-3409-4174-890d-560ac20ad8d7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-903151c6-bd94-4bbb-9335-4649de2f9445/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-90f04b0e-75f3-424d-9e6f-4841af66ab6c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-9622913f-bd24-4595-bbc7-23cf38e2d668/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-96fcae63-7aa1-4bd5-a847-e8b2a49de877/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-99c45cf5-0c3b-4911-83de-70886b9d0c0d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-9cdc0d02-056e-4171-ac0a-207fb3dd6678/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-9e33c86c-9065-4313-b384-853d8fa2e97f/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-9ffa23ac-c130-4a0c-92ee-481698e444a0/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-a13f6fde-9c55-4a1c-bd64-cf8498be649d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-a1b1587a-b40a-463f-ad4a-e5a05a98fd8c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-a54cdc47-2f1c-4d82-8baf-fce180194a81/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-a806cf22-5f68-4b66-b255-150adf678ea4/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-a9108086-6b38-43b0-84b0-0447cab9c123/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-a92e0dfc-e26f-4a7c-aa1d-f0d977b27d8f/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-a9fbc83f-b923-4af7-b998-5da6864a527a/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-aae73811-4bb1-44ba-9215-05c90b9f9007/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ac8baab4-f493-4fd9-9826-5f79e2e44c03/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ad0933f8-c4c7-4e67-94dc-879abe4d1a12/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ad71d26c-8288-4a47-9b38-7e93baa49c53/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-adb4f6d7-5f7a-4620-ad3a-b0ff14343e60/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-af1b0cec-dcf5-4974-9b3b-8d82e8ce1dab/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-af5ebc9a-83b4-48e6-9465-7f2e94f305b5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-af6cc6b8-3436-48fd-89c5-987cf0fa1e0b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-author-card-test/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-b1a951b6-6989-4c62-aca2-e446bdc17bc9/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-b1cf2586-d6a6-44b7-ba16-82fdfee99f01/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-b29033b8-b3a4-4025-8f6a-f869e044a1be/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-b2b17986-f13e-4d6e-93a6-6bd21c930c3c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-b88f694c-46ef-4b3c-91aa-a5d1e8a0cf1b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-b8f8fb5d-b05d-448d-814d-fac40fac14f6/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ba8ad453-896b-4890-b536-f769981e1d67/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-bcbf0a5d-9a15-43c7-809a-cd079036197c/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-bfaeda43-323f-4da7-b441-a9fe170deb19/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-bfe943ba-4746-494a-b184-932c63b60909/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-c1713fc0-f797-405a-b293-46a1d755bf57/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-c47bf439-54fa-4c41-8f39-a72dc0d40b60/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-c7a62f87-28f5-4049-95ce-10b1ddb94201/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-c835c36d-38f5-43ac-9296-0b1be7851ce6/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-c8edb5fb-6fa9-4d47-b07f-e030d26c2a9f/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ca6807b1-e87c-4cb5-989c-cb4331b5d031/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ca708b68-1af2-47b5-83d9-7cb94b42da91/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-cb3070a2-9525-41df-a6bb-91c2844c5ed5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-cd65aa07-4bab-4f8f-8ffc-c2184f49ce9a/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ce9cfcf5-e94f-4fc7-bdce-bda88e477a7f/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d090faf0-5374-4039-8aee-c6dad760c5e1/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d0e6ac0b-fc44-4be3-8e32-3647ddaeddd7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d131e688-d93c-4cbc-b32d-f0d052aeb8d0/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d161c1a3-d246-44fd-ad22-f321e355d0e9/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d345a07f-c3ee-4d20-909f-ec7293bd83b3/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d4b650a4-47af-4734-b891-7a6db766ca3e/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d57321c6-4106-45ec-89a4-8ebdf0af67f2/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d597021d-28f9-402d-9d2c-8edff8c96e59/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d64f8a31-bd4c-499d-a0e0-e97ad1c9d1cb/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d673110e-8d91-4294-b80f-74a38cf51533/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d7a7736b-3262-4d0e-8df7-a9af7823a2b7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-d8ea3243-d6e0-43e6-894a-1f595f952d7e/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-da269799-25d5-4389-9e02-12ba64c14845/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-db474841-bf84-4cbd-a2dc-a337b38b5991/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-dd03f4e6-1fa8-47e8-8c32-b7f36856e6db/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-de9dbbb5-949b-49c0-95ad-dbbc84835db0/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-dec72ecf-71ad-480d-bb4b-105c4c83b676/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e0580363-6b05-4092-8711-7413ae36a221/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e115dd47-3a78-4e40-963e-46466a268290/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e1c254e5-af7b-47ed-a25b-ced6ce8c0f77/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e26fa70d-3b7b-4523-9779-909bc83b073d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e56349a0-bcf9-427b-8b68-e092ae15061f/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e5e58d0e-aa0b-4749-a9cb-e791b08d4105/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e6b422fc-8920-45b1-9068-173399ca50b2/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-e730662d-1e5e-4519-b2cc-6689657eeced/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ec1d856c-fc63-49c5-a405-6391feb4b1ea/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ecd1ac41-cf5f-412c-9a1b-a4fe62e4167d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ed0d786a-105e-46ac-b848-49073917809b/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-ed31d08a-a26c-4357-a2a5-249705a63b81/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-edcd6f86-05b5-43a9-8766-8a56709451c8/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-eddf89ce-60f6-417b-8295-c0525219c230/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-f37eeda2-e9b9-4039-84d5-f983ece1a6e5/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-f3c9734c-89d9-41a9-b886-55d782c63114/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-f424af2a-f6a2-46fb-b052-ef69836a1e2e/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-f44c0f01-32e2-4e61-b965-3b24778abba0/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-f5fc4e19-d3a6-48c3-bab5-a272ab4b288d/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-f74ecc94-2b62-44c7-bb23-820e3d0cf9f3/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-f826380c-963c-49ff-a558-9337edbc6245/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-fbb47697-aa83-4b41-a3b4-ed8f9b2709c7/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-fcf11a73-7e2a-4034-8fbd-545893c621dd/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-fd8d0496-8026-4f47-bd7f-8182e32cda98/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-link-github-repo/ │ │ │ │ │ └── index.html │ │ │ │ ├── item-link-haxtheweb-homepage/ │ │ │ │ │ └── index.html │ │ │ │ └── mlid-1483/ │ │ │ │ └── index.html │ │ │ ├── polymer.json │ │ │ ├── push-manifest.json │ │ │ ├── robots.txt │ │ │ ├── rss.xml │ │ │ ├── service-worker.js │ │ │ ├── site-random-content-test.html │ │ │ ├── site.json │ │ │ ├── sitemap.xml │ │ │ ├── system/ │ │ │ │ └── listFiles │ │ │ ├── theme/ │ │ │ │ ├── ._.DS_Store │ │ │ │ ├── style-guide.html │ │ │ │ ├── theme.css │ │ │ │ └── theme.html │ │ │ ├── upgrade-browser.html │ │ │ └── wc-registry.json │ │ ├── full-theme-automation.js │ │ ├── gulpfile.cjs │ │ ├── haxcms-elements.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── base.css │ │ │ ├── core/ │ │ │ │ ├── HAXCMSLitElementTheme.js │ │ │ │ ├── HAXCMSPolymerElementTheme.js │ │ │ │ ├── HAXCMSThemeWiring.js │ │ │ │ ├── backends/ │ │ │ │ │ ├── haxcms-backend-beaker.js │ │ │ │ │ ├── haxcms-backend-demo.js │ │ │ │ │ ├── haxcms-backend-nodejs.js │ │ │ │ │ ├── haxcms-backend-php.js │ │ │ │ │ └── haxcms-backend-userfs.js │ │ │ │ ├── haxcms-appearance-admin-dialog.js │ │ │ │ ├── haxcms-cheat-codes.js │ │ │ │ ├── haxcms-content-admin-dialog.js │ │ │ │ ├── haxcms-darkmode-toggle.js │ │ │ │ ├── haxcms-editor-builder.js │ │ │ │ ├── haxcms-files-admin-dialog.js │ │ │ │ ├── haxcms-outline-editor-dialog.js │ │ │ │ ├── haxcms-seo-admin-dialog.js │ │ │ │ ├── haxcms-site-builder.js │ │ │ │ ├── haxcms-site-dashboard.js │ │ │ │ ├── haxcms-site-editor-ui.js │ │ │ │ ├── haxcms-site-editor.js │ │ │ │ ├── haxcms-site-insights.js │ │ │ │ ├── haxcms-site-router.js │ │ │ │ ├── haxcms-site-settings-dashboard.js │ │ │ │ ├── haxcms-site-store.js │ │ │ │ ├── haxcms-theme-picker.js │ │ │ │ ├── haxcms-toast.js │ │ │ │ ├── micros/ │ │ │ │ │ ├── haxcms-button-add.js │ │ │ │ │ └── haxcms-page-operations.js │ │ │ │ ├── themes/ │ │ │ │ │ ├── haxcms-basic-theme.js │ │ │ │ │ ├── haxcms-blank-theme.js │ │ │ │ │ ├── haxcms-custom-theme.js │ │ │ │ │ ├── haxcms-json-theme.js │ │ │ │ │ ├── haxcms-minimalist-theme.js │ │ │ │ │ ├── haxcms-print-theme.js │ │ │ │ │ └── haxcms-slide-theme.js │ │ │ │ ├── ui/ │ │ │ │ │ ├── app-hax-top-bar.js │ │ │ │ │ ├── app-hax-user-menu-button.js │ │ │ │ │ ├── app-hax-user-menu.js │ │ │ │ │ ├── hax-confirm-dialog.js │ │ │ │ │ ├── haxcms-about-dialog-ui.js │ │ │ │ │ ├── haxcms-allowed-blocks-ui.js │ │ │ │ │ ├── haxcms-editor-settings-dialog-ui.js │ │ │ │ │ ├── haxcms-page-get-started.js │ │ │ │ │ ├── haxcms-site-platform-ui.js │ │ │ │ │ ├── haxcms-theme-preview-panel.js │ │ │ │ │ ├── rpg-character-toast/ │ │ │ │ │ │ └── rpg-character-toast.js │ │ │ │ │ └── wired-darkmode-toggle/ │ │ │ │ │ └── wired-darkmode-toggle.js │ │ │ │ └── utils/ │ │ │ │ ├── EditDescriptionProgram.js │ │ │ │ ├── EditSlugProgram.js │ │ │ │ ├── EditTagsProgram.js │ │ │ │ ├── EditTitleProgram.js │ │ │ │ ├── EmailPageMixin.js │ │ │ │ ├── ExportPageProgram.js │ │ │ │ ├── ExportSiteProgram.js │ │ │ │ ├── HAXCMSButton.js │ │ │ │ ├── HAXCMSI18NMixin.js │ │ │ │ ├── HAXCMSKeyboardShortcuts.js │ │ │ │ ├── HAXCMSMobileMenu.js │ │ │ │ ├── HAXCMSOperationButtons.js │ │ │ │ ├── HAXCMSRememberRoute.js │ │ │ │ ├── HAXCMSThemeParts.js │ │ │ │ ├── HAXCMSUserStylesMenu.js │ │ │ │ ├── LTIResizingMixin.js │ │ │ │ ├── PDFPageMixin.js │ │ │ │ ├── PrintBranchMixin.js │ │ │ │ ├── PrintProgram.js │ │ │ │ ├── QRCodeMixin.js │ │ │ │ ├── example-restricted-skeleton.json │ │ │ │ └── site-skeleton-generator.js │ │ │ ├── development/ │ │ │ │ ├── haxcms-dev-theme.js │ │ │ │ └── haxcms-theme-developer.js │ │ │ ├── hax-elements-registry.json │ │ │ ├── themes.json │ │ │ └── ui-components/ │ │ │ ├── active-item/ │ │ │ │ ├── site-active-fields.js │ │ │ │ ├── site-active-media-banner.js │ │ │ │ ├── site-active-tags.js │ │ │ │ ├── site-active-title.js │ │ │ │ ├── site-git-corner.js │ │ │ │ └── site-share-widget.js │ │ │ ├── blocks/ │ │ │ │ ├── site-children-block.js │ │ │ │ ├── site-outline-block.js │ │ │ │ └── site-recent-content-block.js │ │ │ ├── layout/ │ │ │ │ ├── site-drawer.js │ │ │ │ ├── site-footer.js │ │ │ │ ├── site-modal.js │ │ │ │ └── site-region.js │ │ │ ├── lesson-overview/ │ │ │ │ ├── lesson-overview.js │ │ │ │ └── lib/ │ │ │ │ ├── .gitkeep │ │ │ │ ├── lesson-highlight.haxProperties.json │ │ │ │ ├── lesson-highlight.js │ │ │ │ └── lesson-overview.haxProperties.json │ │ │ ├── magic/ │ │ │ │ ├── active-when-visible.js │ │ │ │ ├── site-ai-chat.js │ │ │ │ ├── site-collection-list.haxProperties.json │ │ │ │ ├── site-collection-list.js │ │ │ │ └── site-view.js │ │ │ ├── navigation/ │ │ │ │ ├── site-breadcrumb.js │ │ │ │ ├── site-dot-indicator.js │ │ │ │ ├── site-menu-button.js │ │ │ │ ├── site-menu-content.js │ │ │ │ ├── site-menu.js │ │ │ │ └── site-top-menu.js │ │ │ ├── query/ │ │ │ │ ├── site-query-menu-slice.js │ │ │ │ ├── site-query.js │ │ │ │ └── site-render-query.js │ │ │ ├── routes/ │ │ │ │ ├── site-home-route.js │ │ │ │ ├── site-print-route.js │ │ │ │ ├── site-random-route.js │ │ │ │ ├── site-tags-route.js │ │ │ │ ├── site-theme-style-guide-route.js │ │ │ │ └── site-views-route.js │ │ │ ├── site/ │ │ │ │ ├── site-print-button.js │ │ │ │ ├── site-random-content.js │ │ │ │ ├── site-remote-content.js │ │ │ │ ├── site-rss-button.js │ │ │ │ ├── site-search.js │ │ │ │ ├── site-title.js │ │ │ │ └── site-uuid-link.js │ │ │ ├── templates/ │ │ │ │ ├── basic-template.js │ │ │ │ └── minimalist-template.js │ │ │ └── utilities/ │ │ │ └── site-available-themes.js │ │ ├── locales/ │ │ │ ├── haxcms.af.json │ │ │ ├── haxcms.am.json │ │ │ ├── haxcms.ar.json │ │ │ ├── haxcms.az.json │ │ │ ├── haxcms.be.json │ │ │ ├── haxcms.bg.json │ │ │ ├── haxcms.bn.json │ │ │ ├── haxcms.bs.json │ │ │ ├── haxcms.ca.json │ │ │ ├── haxcms.co.json │ │ │ ├── haxcms.cs.json │ │ │ ├── haxcms.cy.json │ │ │ ├── haxcms.da.json │ │ │ ├── haxcms.de.json │ │ │ ├── haxcms.el.json │ │ │ ├── haxcms.eo.json │ │ │ ├── haxcms.es.json │ │ │ ├── haxcms.et.json │ │ │ ├── haxcms.eu.json │ │ │ ├── haxcms.fa.json │ │ │ ├── haxcms.fi.json │ │ │ ├── haxcms.fo.json │ │ │ ├── haxcms.fr.json │ │ │ ├── haxcms.fy.json │ │ │ ├── haxcms.ga.json │ │ │ ├── haxcms.gl.json │ │ │ ├── haxcms.gn.json │ │ │ ├── haxcms.gu.json │ │ │ ├── haxcms.ha.json │ │ │ ├── haxcms.haw.json │ │ │ ├── haxcms.he.json │ │ │ ├── haxcms.hi.json │ │ │ ├── haxcms.hr.json │ │ │ ├── haxcms.hu.json │ │ │ ├── haxcms.hy.json │ │ │ ├── haxcms.id.json │ │ │ ├── haxcms.ig.json │ │ │ ├── haxcms.is.json │ │ │ ├── haxcms.it.json │ │ │ ├── haxcms.ja.json │ │ │ ├── haxcms.jv.json │ │ │ ├── haxcms.ka.json │ │ │ ├── haxcms.kk.json │ │ │ ├── haxcms.km.json │ │ │ ├── haxcms.kn.json │ │ │ ├── haxcms.ko.json │ │ │ ├── haxcms.ku.json │ │ │ ├── haxcms.ky.json │ │ │ ├── haxcms.lb.json │ │ │ ├── haxcms.lo.json │ │ │ ├── haxcms.lt.json │ │ │ ├── haxcms.lv.json │ │ │ ├── haxcms.mi.json │ │ │ ├── haxcms.mk.json │ │ │ ├── haxcms.ml.json │ │ │ ├── haxcms.mn.json │ │ │ ├── haxcms.mr.json │ │ │ ├── haxcms.ms.json │ │ │ ├── haxcms.mt.json │ │ │ ├── haxcms.my.json │ │ │ ├── haxcms.nb.json │ │ │ ├── haxcms.ne.json │ │ │ ├── haxcms.nl.json │ │ │ ├── haxcms.no.json │ │ │ ├── haxcms.ny.json │ │ │ ├── haxcms.om.json │ │ │ ├── haxcms.pl.json │ │ │ ├── haxcms.pnb.json │ │ │ ├── haxcms.ps.json │ │ │ ├── haxcms.pt.json │ │ │ ├── haxcms.qu.json │ │ │ ├── haxcms.ro.json │ │ │ ├── haxcms.ru.json │ │ │ ├── haxcms.sd.json │ │ │ ├── haxcms.si.json │ │ │ ├── haxcms.sk.json │ │ │ ├── haxcms.sl.json │ │ │ ├── haxcms.sn.json │ │ │ ├── haxcms.so.json │ │ │ ├── haxcms.sq.json │ │ │ ├── haxcms.sr.json │ │ │ ├── haxcms.sv.json │ │ │ ├── haxcms.sw.json │ │ │ ├── haxcms.ta.json │ │ │ ├── haxcms.te.json │ │ │ ├── haxcms.tg.json │ │ │ ├── haxcms.th.json │ │ │ ├── haxcms.tk.json │ │ │ ├── haxcms.tr.json │ │ │ ├── haxcms.tt.json │ │ │ ├── haxcms.uk.json │ │ │ ├── haxcms.ur.json │ │ │ ├── haxcms.uz.json │ │ │ ├── haxcms.vi.json │ │ │ ├── haxcms.wuu.json │ │ │ ├── haxcms.xh.json │ │ │ ├── haxcms.yi.json │ │ │ ├── haxcms.yo.json │ │ │ ├── haxcms.zh.json │ │ │ └── haxcms.zu.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── haxcms-elements.test.js │ │ └── theme-screenshot-automation.js │ ├── haxma-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── haxma-theme.js │ │ ├── index.html │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── haxma-theme.test.js │ │ └── web-dev-server.config.mjs │ ├── haxor-slevin/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── haxor-slevin.js │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── haxor-slevin.test.js │ ├── hex-picker/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── hex-picker.js │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hex-picker.test.js │ ├── hexagon-loader/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── hexagon.html │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── hexagon-loader.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── hex-a-gon.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── hexagon-loader.test.js │ ├── html-block/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── html-block.js │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── html-block.test.js │ ├── i18n-manager/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── i18n-manager.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── I18NMixin.js │ │ │ └── translation-manifest.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── i18n-manager.test.js │ ├── iframe-loader/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── iframe-loader.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── iframe-loader.haxProperties.json │ │ │ └── loading-indicator.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── iframe-loader.test.js │ ├── image-compare-slider/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── image-compare-slider.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── image-compare-slider.haxProperties.json │ │ ├── locales/ │ │ │ └── image-compare-slider.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── image-compare-slider.test.js │ ├── image-inspector/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── image-inspector.js │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── image-inspector.test.js │ ├── img-pan-zoom/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── img-pan-zoom.js │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── img-loader.js │ │ │ └── openseadragon/ │ │ │ └── LICENSE.txt │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── img-pan-zoom.test.js │ ├── img-view-modal/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── viewer.html │ │ ├── gulpfile.cjs │ │ ├── img-view-modal.js │ │ ├── index.html │ │ ├── lib/ │ │ │ └── img-view-viewer.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── img-view-modal.test.js │ ├── inline-audio/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── inline-audio.js │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── inline-audio.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── inline-audio.test.js │ ├── intersection-element/ │ │ ├── README.md │ │ ├── gulpfile.cjs │ │ ├── lib/ │ │ │ └── IntersectionObserverMixin.js │ │ ├── package.json │ │ └── test/ │ │ └── intersection-observer-mixin.test.js │ ├── journey-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.html │ │ ├── journey-theme.js │ │ ├── lib/ │ │ │ ├── journey-menu.js │ │ │ ├── journey-sidebar-theme-styles.js │ │ │ ├── journey-sidebar-theme.js │ │ │ ├── journey-topbar-theme-styles.js │ │ │ └── journey-topbar-theme.js │ │ ├── locales/ │ │ │ ├── journey-theme.ar.json │ │ │ ├── journey-theme.es.json │ │ │ ├── journey-theme.hi.json │ │ │ └── journey-theme.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ ├── journey-sidebar-theme.test.js │ │ │ └── journey-theme.test.js │ │ └── web-dev-server.config.mjs │ ├── json-outline-schema/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ ├── listing.html │ │ │ ├── site.json │ │ │ └── siteList.json │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── json-outline-schema.js │ │ ├── lib/ │ │ │ ├── jos-render.js │ │ │ └── json-outline-schema-item.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── json-outline-schema.test.js │ ├── jwt-login/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── jwt-request-flow.drawio │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── jwt-login.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── jwt-login.test.js │ ├── la-tex/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── la-tex.js │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── la-tex.haxProperties.json │ │ │ └── latex2html5.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── la-tex.test.js │ ├── lazy-image-helpers/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lazy-image-helpers.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lazy-image-helpers.test.js │ ├── lazy-import-discover/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lazy-import-discover.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lazy-import-discover.test.js │ ├── learn-two-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── learn-two-theme.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── learn-two-theme.test.js │ ├── license-element/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── license-element.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── license-element.test.js │ ├── lorem-data/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── lorem-data-behaviors.js │ │ ├── lorem-data.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lorem-data.test.js │ ├── lrn-gitgraph/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── api.json │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── gitgraphjs/ │ │ │ └── src/ │ │ │ ├── gitgraph.css │ │ │ └── gitgraph.js │ │ ├── lrn-gitgraph.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrn-gitgraph.test.js │ ├── lrn-math/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lrn-math.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrn-math.test.js │ ├── lrn-table/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── demo.csv │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── lrn-table.haxProperties.json │ │ ├── lrn-table.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrn-table.test.js │ ├── lrn-vocab/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lrn-vocab.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrn-vocab.test.js │ ├── lrndesign-chart/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── bar.csv │ │ │ ├── bar.html │ │ │ ├── index.html │ │ │ ├── line.csv │ │ │ ├── line.html │ │ │ ├── pie.csv │ │ │ └── pie.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── lrndesign-bar.js │ │ │ ├── lrndesign-line.js │ │ │ └── lrndesign-pie.js │ │ ├── lrndesign-chart.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrndesign-chart.test.js │ ├── lrndesign-imagemap/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── process.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── lrndesign-imagemap-hotspot.js │ │ ├── lrndesign-imagemap.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrndesign-imagemap.test.js │ ├── lrndesign-timeline/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lrndesign-timeline.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrndesign-timeline.test.js │ ├── lrs-elements/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── lrs-bridge-haxcms.js │ │ │ ├── lrs-bridge.js │ │ │ └── lrs-emitter.js │ │ ├── lrs-elements.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lrs-elements.test.js │ ├── lunr-search/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── lunrSearchIndex.json │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lunr-search.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── lunr-search.test.js │ ├── map-menu/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── map-menu-builder.js │ │ │ ├── map-menu-container.js │ │ │ ├── map-menu-header.js │ │ │ ├── map-menu-item.js │ │ │ └── map-menu-submenu.js │ │ ├── locales/ │ │ │ └── map-menu.es.json │ │ ├── map-menu.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── map-menu.test.js │ ├── mark-the-words/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── mark-the-words.haxProperties.json │ │ ├── mark-the-words.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── mark-the-words.test.js │ ├── matching-question/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── _.gitignore │ │ ├── _.npmignore │ │ ├── custom-elements.json │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── matching-question.haxProperties.json │ │ ├── matching-question.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ ├── index.html │ │ ├── matching-question.test.js │ │ └── matching-question_test.html │ ├── md-block/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── md-block.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── md-block.test.js │ ├── media-behaviors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── media-behaviors.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── media-behaviors.test.js │ ├── media-image/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── media-image.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── media-image.test.js │ ├── media-quote/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── _.gitignore │ │ ├── _.npmignore │ │ ├── custom-elements.json │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── media-quote.haxProperties.json │ │ ├── media-quote.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ ├── index.html │ │ ├── media-quote.test.js │ │ └── media-quote_test.html │ ├── meme-maker/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── meme-maker.haxProperties.json │ │ ├── locales/ │ │ │ ├── meme-maker.haxProperties.ar.json │ │ │ ├── meme-maker.haxProperties.bn.json │ │ │ ├── meme-maker.haxProperties.de.json │ │ │ ├── meme-maker.haxProperties.es.json │ │ │ ├── meme-maker.haxProperties.fr.json │ │ │ ├── meme-maker.haxProperties.gu.json │ │ │ ├── meme-maker.haxProperties.he.json │ │ │ ├── meme-maker.haxProperties.hi.json │ │ │ ├── meme-maker.haxProperties.id.json │ │ │ ├── meme-maker.haxProperties.it.json │ │ │ ├── meme-maker.haxProperties.ja.json │ │ │ ├── meme-maker.haxProperties.kn.json │ │ │ ├── meme-maker.haxProperties.ko.json │ │ │ ├── meme-maker.haxProperties.ml.json │ │ │ ├── meme-maker.haxProperties.mr.json │ │ │ ├── meme-maker.haxProperties.my.json │ │ │ ├── meme-maker.haxProperties.nl.json │ │ │ ├── meme-maker.haxProperties.pl.json │ │ │ ├── meme-maker.haxProperties.pnb.json │ │ │ ├── meme-maker.haxProperties.pt.json │ │ │ ├── meme-maker.haxProperties.ro.json │ │ │ ├── meme-maker.haxProperties.ru.json │ │ │ ├── meme-maker.haxProperties.sv.json │ │ │ ├── meme-maker.haxProperties.ta.json │ │ │ ├── meme-maker.haxProperties.te.json │ │ │ ├── meme-maker.haxProperties.th.json │ │ │ ├── meme-maker.haxProperties.tl.json │ │ │ ├── meme-maker.haxProperties.tr.json │ │ │ ├── meme-maker.haxProperties.uk.json │ │ │ ├── meme-maker.haxProperties.ur.json │ │ │ ├── meme-maker.haxProperties.uz.json │ │ │ ├── meme-maker.haxProperties.vi.json │ │ │ ├── meme-maker.haxProperties.wuu.json │ │ │ └── meme-maker.haxProperties.zh.json │ │ ├── meme-maker.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ ├── meme-maker-i18n.test.js │ │ └── meme-maker.test.js │ ├── merit-badge/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── badge-sticker.js │ │ │ ├── date-title.js │ │ │ └── locked-badge.js │ │ ├── merit-badge.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── merit-badge.test.js │ ├── micro-frontend-registry/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── docx-example.js │ │ │ ├── index.html │ │ │ └── mf-htmlmd-example.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── microServices.js │ │ ├── micro-frontend-registry.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── micro-frontend-registry.test.js │ ├── moar-sarcasm/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── moar-sarcasm.haxProperties.json │ │ ├── moar-sarcasm.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── moar-sarcasm.test.js │ ├── moment-element/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── moment/ │ │ │ ├── LICENSE │ │ │ └── moment.js │ │ ├── moment-element.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── moment-element.test.js │ ├── multiple-choice/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── QuestionElement.js │ │ │ ├── confetti-container.js │ │ │ ├── multiple-choice.haxProperties.json │ │ │ ├── short-answer-question.haxProperties.json │ │ │ ├── short-answer-question.js │ │ │ ├── true-false-question.haxProperties.json │ │ │ └── true-false-question.js │ │ ├── multiple-choice.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── multiple-choice.test.js │ ├── music-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── html-midi-player.js │ │ │ └── music-player.haxProperties.json │ │ ├── music-player.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── music-player.test.js │ ├── mutation-observer-import-mixin/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── MutationObserverImportMixin.js │ │ ├── mutation-observer-import-mixin.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── mutation-observer-import-mixin.test.js │ ├── oer-schema/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── oerschema.js │ │ ├── oer-schema.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── oer-schema.test.js │ ├── outline-designer/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── ANALYSIS_AND_RECOMMENDATIONS.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── example.json │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── outline-designer.es.json │ │ ├── outline-designer.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── outline-designer.test.js │ ├── outline-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── content/ │ │ │ │ ├── Welcome%20to%20the%20jungle.html │ │ │ │ ├── page1.html │ │ │ │ ├── page2.html │ │ │ │ ├── page3.html │ │ │ │ ├── page4.html │ │ │ │ ├── page5.html │ │ │ │ └── page6.html │ │ │ ├── index.html │ │ │ └── outline.json │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── outline-player.js │ │ ├── package.json │ │ ├── polymer.json │ │ └── test/ │ │ └── outline-player.test.js │ ├── page-break/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── page-anchor.haxProperties.json │ │ │ ├── page-anchor.js │ │ │ ├── page-break-manager.js │ │ │ ├── page-break-outline.js │ │ │ ├── page-break.haxProperties.json │ │ │ └── page-template.js │ │ ├── locales/ │ │ │ ├── page-break.af.json │ │ │ ├── page-break.am.json │ │ │ ├── page-break.ar.json │ │ │ ├── page-break.az.json │ │ │ ├── page-break.be.json │ │ │ ├── page-break.bg.json │ │ │ ├── page-break.bn.json │ │ │ ├── page-break.bs.json │ │ │ ├── page-break.ca.json │ │ │ ├── page-break.co.json │ │ │ ├── page-break.cs.json │ │ │ ├── page-break.cy.json │ │ │ ├── page-break.da.json │ │ │ ├── page-break.de.json │ │ │ ├── page-break.el.json │ │ │ ├── page-break.eo.json │ │ │ ├── page-break.es.json │ │ │ ├── page-break.et.json │ │ │ ├── page-break.eu.json │ │ │ ├── page-break.fa.json │ │ │ ├── page-break.fi.json │ │ │ ├── page-break.fo.json │ │ │ ├── page-break.fr.json │ │ │ ├── page-break.fy.json │ │ │ ├── page-break.ga.json │ │ │ ├── page-break.gl.json │ │ │ ├── page-break.gn.json │ │ │ ├── page-break.gu.json │ │ │ ├── page-break.ha.json │ │ │ ├── page-break.haw.json │ │ │ ├── page-break.he.json │ │ │ ├── page-break.hi.json │ │ │ ├── page-break.hr.json │ │ │ ├── page-break.hu.json │ │ │ ├── page-break.hy.json │ │ │ ├── page-break.id.json │ │ │ ├── page-break.ig.json │ │ │ ├── page-break.is.json │ │ │ ├── page-break.it.json │ │ │ ├── page-break.ja.json │ │ │ ├── page-break.jv.json │ │ │ ├── page-break.ka.json │ │ │ ├── page-break.kk.json │ │ │ ├── page-break.km.json │ │ │ ├── page-break.kn.json │ │ │ ├── page-break.ko.json │ │ │ ├── page-break.ku.json │ │ │ ├── page-break.ky.json │ │ │ ├── page-break.lb.json │ │ │ ├── page-break.lo.json │ │ │ ├── page-break.lt.json │ │ │ ├── page-break.lv.json │ │ │ ├── page-break.mi.json │ │ │ ├── page-break.mk.json │ │ │ ├── page-break.ml.json │ │ │ ├── page-break.mn.json │ │ │ ├── page-break.mr.json │ │ │ ├── page-break.ms.json │ │ │ ├── page-break.mt.json │ │ │ ├── page-break.my.json │ │ │ ├── page-break.nb.json │ │ │ ├── page-break.ne.json │ │ │ ├── page-break.nl.json │ │ │ ├── page-break.no.json │ │ │ ├── page-break.ny.json │ │ │ ├── page-break.om.json │ │ │ ├── page-break.pa.json │ │ │ ├── page-break.pl.json │ │ │ ├── page-break.pnb.json │ │ │ ├── page-break.ps.json │ │ │ ├── page-break.pt.json │ │ │ ├── page-break.qu.json │ │ │ ├── page-break.ro.json │ │ │ ├── page-break.ru.json │ │ │ ├── page-break.sd.json │ │ │ ├── page-break.si.json │ │ │ ├── page-break.sk.json │ │ │ ├── page-break.sl.json │ │ │ ├── page-break.sn.json │ │ │ ├── page-break.so.json │ │ │ ├── page-break.sq.json │ │ │ ├── page-break.sr.json │ │ │ ├── page-break.sv.json │ │ │ ├── page-break.sw.json │ │ │ ├── page-break.ta.json │ │ │ ├── page-break.te.json │ │ │ ├── page-break.tg.json │ │ │ ├── page-break.th.json │ │ │ ├── page-break.tk.json │ │ │ ├── page-break.tr.json │ │ │ ├── page-break.tt.json │ │ │ ├── page-break.uk.json │ │ │ ├── page-break.ur.json │ │ │ ├── page-break.uz.json │ │ │ ├── page-break.vi.json │ │ │ ├── page-break.wuu.json │ │ │ ├── page-break.xh.json │ │ │ ├── page-break.yi.json │ │ │ ├── page-break.yo.json │ │ │ ├── page-break.zh.json │ │ │ └── page-break.zu.json │ │ ├── package.json │ │ ├── page-break.js │ │ ├── polymer.json │ │ └── test/ │ │ └── page-break.test.js │ ├── page-contents-menu/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── page-contents-menu.js │ │ ├── polymer.json │ │ └── test/ │ │ └── page-contents-menu.test.js │ ├── page-flag/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── page-flag-comment.js │ │ │ └── page-flag.haxProperties.json │ │ ├── package.json │ │ ├── page-flag.js │ │ ├── polymer.json │ │ └── test/ │ │ └── page-flag.test.js │ ├── page-scroll-position/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── page-scroll-position.js │ │ ├── polymer.json │ │ └── test/ │ │ └── page-scroll-position.test.js │ ├── page-section/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── page-section.haxProperties.json │ │ ├── package.json │ │ ├── page-section.js │ │ ├── polymer.json │ │ └── test/ │ │ └── page-section.test.js │ ├── paper-input-flagged/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── paper-input-flagged.js │ │ ├── polymer.json │ │ └── test/ │ │ └── paper-input-flagged.test.js │ ├── paper-stepper/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── paper-icon-step.js │ │ │ ├── paper-icon-stepper.js │ │ │ └── paper-step.js │ │ ├── package.json │ │ ├── paper-stepper.js │ │ ├── polymer.json │ │ └── test/ │ │ └── paper-stepper.test.js │ ├── parallax-image/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── parallax-image.js │ │ ├── polymer.json │ │ └── test/ │ │ └── parallax-image.test.js │ ├── pdf-browser-viewer/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── pdf-browser-viewer.js │ │ ├── polymer.json │ │ └── test/ │ │ └── pdf-browser-viewer.test.js │ ├── person-testimonial/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── person-testimonial.haxProperties.json │ │ ├── package.json │ │ ├── person-testimonial.js │ │ ├── polymer.json │ │ └── test/ │ │ └── person-testimonial.test.js │ ├── place-holder/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── place-holder.js │ │ ├── polymer.json │ │ └── test/ │ │ └── place-holder.test.js │ ├── play-list/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── SLStyleManager.js │ │ │ ├── dark.css │ │ │ ├── light.css │ │ │ └── play-list.haxProperties.json │ │ ├── package.json │ │ ├── play-list.js │ │ ├── polymer.json │ │ └── test/ │ │ └── play-list.test.js │ ├── polaris-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── polaris-cta.js │ │ │ ├── polaris-flex-sidebar.js │ │ │ ├── polaris-flex-theme.js │ │ │ ├── polaris-invent-theme.js │ │ │ ├── polaris-mark.js │ │ │ ├── polaris-story-card.js │ │ │ └── polaris-tile.js │ │ ├── package.json │ │ ├── polaris-theme.js │ │ ├── polymer.json │ │ └── test/ │ │ └── polaris-theme.test.js │ ├── portal-launcher/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── portal-launcher.js │ │ └── test/ │ │ └── portal-launcher.test.js │ ├── post-card/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── PostCardPhoto.js │ │ │ ├── PostCardPostmark.js │ │ │ ├── PostCardStamp.js │ │ │ └── post-card.haxProperties.json │ │ ├── locales/ │ │ │ ├── post-card.de.json │ │ │ ├── post-card.es.json │ │ │ ├── post-card.fr.json │ │ │ ├── post-card.it.json │ │ │ ├── post-card.ja.json │ │ │ └── post-card.zh_CN.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── post-card.js │ │ └── test/ │ │ └── post-card.test.js │ ├── pouch-db/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── pouch-db.js │ │ └── test/ │ │ └── pouch-db.test.js │ ├── product-card/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── hax.html │ │ │ ├── index.html │ │ │ └── wc-registry.json │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── course-card.js │ │ │ ├── fields.json │ │ │ ├── hax-element-card-list.js │ │ │ ├── hax-element-list-selector.js │ │ │ └── product-banner.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── product-card.js │ │ └── test/ │ │ └── product-card.test.js │ ├── product-glance/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── product-glance.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── product-glance.js │ │ └── test/ │ │ ├── product-glance-basic.test.js │ │ ├── product-glance-minimal.test.js │ │ └── product-glance.test.js │ ├── product-offering/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ ├── product-offering.js │ │ └── test/ │ │ └── product-offering.test.js │ ├── progress-donut/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── progress-donut.js │ │ └── test/ │ │ └── progress-donut.test.js │ ├── promise-progress/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── basic.html │ │ │ ├── index.html │ │ │ ├── registry.json │ │ │ └── wc-preload.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── promise-progress-lite.js │ │ │ └── wc-preload-progress.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── promise-progress.js │ │ └── test/ │ │ └── promise-progress.test.js │ ├── q-r/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── q-r.haxProperties.json │ │ │ ├── qr-code.js │ │ │ └── qr.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── q-r.js │ │ └── test/ │ │ └── q-r.test.js │ ├── radio-behaviors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── figure-carousel.js │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── radio-behaviors.js │ │ └── test/ │ │ └── radio-behaviors.test.js │ ├── relative-heading/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── demo.css │ │ │ ├── demo.js │ │ │ ├── index.html │ │ │ ├── lite.html │ │ │ ├── nolinks.html │ │ │ └── rightalign.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── relative-heading-lite.js │ │ │ └── relative-heading-state-manager.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── relative-heading.js │ │ └── test/ │ │ └── relative-heading.test.js │ ├── replace-tag/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── magicDeviceMethod.html │ │ │ ├── magicMethod.html │ │ │ ├── performance/ │ │ │ │ └── dist/ │ │ │ │ ├── assets/ │ │ │ │ │ ├── babel-top.js │ │ │ │ │ ├── build-legacy.js │ │ │ │ │ ├── build-polyfills.js │ │ │ │ │ └── upgrade-browser.html │ │ │ │ └── build.js │ │ │ ├── traditionalDeviceMethod.html │ │ │ ├── traditionalMethod.html │ │ │ └── wc-registry.json │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── LoadingHelper.js │ │ │ ├── PerformanceDetect.js │ │ │ ├── loading-styles.css │ │ │ └── loading-styles.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── replace-tag.js │ │ └── test/ │ │ └── replace-tag.test.js │ ├── responsive-grid/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── performancetest.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── responsive-grid-clear.js │ │ │ ├── responsive-grid-col.js │ │ │ └── responsive-grid-row.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── responsive-grid.js │ │ └── test/ │ │ └── responsive-grid.test.js │ ├── responsive-utility/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── responsive-utility-behaviors.js │ │ │ └── responsive-utility-element.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── responsive-utility.js │ │ └── test/ │ │ └── responsive-utility.test.js │ ├── retro-card/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── retro-card.js │ │ └── test/ │ │ └── retro-card.test.js │ ├── rich-text-editor/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── button.html │ │ │ ├── buttons.html │ │ │ ├── config.html │ │ │ ├── full.html │ │ │ ├── index.html │ │ │ ├── mini.html │ │ │ ├── rawhtml.html │ │ │ ├── selection.html │ │ │ └── toolbar.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── buttons/ │ │ │ │ ├── rich-text-editor-button.js │ │ │ │ ├── rich-text-editor-emoji-picker.js │ │ │ │ ├── rich-text-editor-heading-picker.js │ │ │ │ ├── rich-text-editor-icon-picker.js │ │ │ │ ├── rich-text-editor-image.js │ │ │ │ ├── rich-text-editor-link.js │ │ │ │ ├── rich-text-editor-picker.js │ │ │ │ ├── rich-text-editor-prompt-button.js │ │ │ │ ├── rich-text-editor-source-code.js │ │ │ │ ├── rich-text-editor-symbol-picker.js │ │ │ │ ├── rich-text-editor-underline.js │ │ │ │ └── rich-text-editor-unlink.js │ │ │ ├── open-apis/ │ │ │ │ └── link-preview-card.js │ │ │ ├── singletons/ │ │ │ │ ├── rich-text-editor-clipboard.js │ │ │ │ ├── rich-text-editor-highlight.js │ │ │ │ ├── rich-text-editor-prompt.js │ │ │ │ ├── rich-text-editor-range-behaviors.js │ │ │ │ └── rich-text-editor-source.js │ │ │ └── toolbars/ │ │ │ ├── rich-text-editor-breadcrumbs.js │ │ │ ├── rich-text-editor-toolbar-full.js │ │ │ ├── rich-text-editor-toolbar-mini.js │ │ │ └── rich-text-editor-toolbar.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── rich-text-editor.js │ │ └── test/ │ │ └── rich-text-editor.test.js │ ├── rpg-character/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── rpg-character.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── rpg-character.js │ │ └── test/ │ │ └── rpg-character.test.js │ ├── runkit-embed/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── _.gitignore │ │ ├── _.npmignore │ │ ├── custom-elements.json │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── runkit-embed.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── runkit-embed.js │ │ └── test/ │ │ ├── index.html │ │ ├── runkit-embed.test.js │ │ └── runkit-embed_test.html │ ├── schema-behaviors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── schema-behaviors.js │ │ └── test/ │ │ └── schema-behaviors.test.js │ ├── screen-recorder/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.html │ │ ├── lib/ │ │ │ └── screen-recorder.haxProperties.json │ │ ├── locales/ │ │ │ ├── screen-recorder.ar.haxProperties.json │ │ │ ├── screen-recorder.ar.json │ │ │ ├── screen-recorder.bn.haxProperties.json │ │ │ ├── screen-recorder.bn.json │ │ │ ├── screen-recorder.es.haxProperties.json │ │ │ ├── screen-recorder.es.json │ │ │ ├── screen-recorder.fr.haxProperties.json │ │ │ ├── screen-recorder.fr.json │ │ │ ├── screen-recorder.hi.haxProperties.json │ │ │ ├── screen-recorder.hi.json │ │ │ ├── screen-recorder.ja.haxProperties.json │ │ │ ├── screen-recorder.ja.json │ │ │ ├── screen-recorder.pt.haxProperties.json │ │ │ ├── screen-recorder.pt.json │ │ │ ├── screen-recorder.ru.haxProperties.json │ │ │ ├── screen-recorder.ru.json │ │ │ ├── screen-recorder.zh.haxProperties.json │ │ │ └── screen-recorder.zh.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── screen-recorder.js │ │ ├── test/ │ │ │ └── screen-recorder.test.js │ │ └── web-dev-server.config.mjs │ ├── scroll-button/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── locales/ │ │ │ └── scroll-button.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── scroll-button.js │ │ └── test/ │ │ └── scroll-button.test.js │ ├── self-check/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── self-check.haxProperties.json │ │ ├── locales/ │ │ │ ├── self-check.es.json │ │ │ ├── self-check.he.json │ │ │ └── self-check.ja.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── self-check.js │ │ └── test/ │ │ └── self-check.test.js │ ├── shadow-style/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── shadow-style.js │ │ └── test/ │ │ └── shadow-style.test.js │ ├── simple-autocomplete/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── simple-autocomplete-text-trigger.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-autocomplete.js │ │ └── test/ │ │ └── simple-autocomplete.test.js │ ├── simple-blog/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── simple-blog-footer.js │ │ │ ├── simple-blog-header.js │ │ │ ├── simple-blog-listing.js │ │ │ ├── simple-blog-overview.js │ │ │ └── simple-blog-post.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-blog.js │ │ └── test/ │ │ └── simple-blog.test.js │ ├── simple-colors/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── colors.html │ │ │ ├── extending.html │ │ │ ├── how.html │ │ │ ├── index.html │ │ │ └── picker.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── demo/ │ │ │ │ ├── simple-colors-swatch-info.js │ │ │ │ └── simple-colors-swatches.js │ │ │ └── simple-colors-picker.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-colors.js │ │ └── test/ │ │ └── simple-colors.test.js │ ├── simple-colors-shared-styles/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-colors-shared-styles.js │ │ └── test/ │ │ └── simple-colors-shared-styles.test.js │ ├── simple-cta/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── lrnsys-button.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-cta.js │ │ └── test/ │ │ └── simple-cta.test.js │ ├── simple-datetime/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── LICENSE │ │ │ └── date.format.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-datetime.js │ │ └── test/ │ │ └── simple-datetime.test.js │ ├── simple-emoji/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-emoji.js │ │ └── test/ │ │ └── simple-emoji.test.js │ ├── simple-fields/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── backend.json │ │ │ ├── conditional.html │ │ │ ├── container.html │ │ │ ├── data/ │ │ │ │ ├── fields.json │ │ │ │ └── schema.json │ │ │ ├── field.html │ │ │ ├── form-lite.html │ │ │ ├── form.html │ │ │ ├── index.html │ │ │ ├── lite.html │ │ │ ├── schema.html │ │ │ ├── subschema.html │ │ │ ├── tags.html │ │ │ └── upload.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── simple-context-menu.js │ │ │ ├── simple-fields-array-item.js │ │ │ ├── simple-fields-array.js │ │ │ ├── simple-fields-code.js │ │ │ ├── simple-fields-combo.js │ │ │ ├── simple-fields-container.js │ │ │ ├── simple-fields-field.js │ │ │ ├── simple-fields-fieldset.js │ │ │ ├── simple-fields-form-lite.js │ │ │ ├── simple-fields-form.js │ │ │ ├── simple-fields-html-block.js │ │ │ ├── simple-fields-lite.js │ │ │ ├── simple-fields-tab.js │ │ │ ├── simple-fields-tabs.js │ │ │ ├── simple-fields-tag-list.js │ │ │ ├── simple-fields-ui.js │ │ │ ├── simple-fields-upload.js │ │ │ ├── simple-fields-url-combo-item.js │ │ │ ├── simple-fields-url-combo.js │ │ │ ├── simple-tag-lite.js │ │ │ ├── simple-tag.js │ │ │ ├── simple-tags.haxProperties.json │ │ │ └── simple-tags.js │ │ ├── locales/ │ │ │ └── simple-fields.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-fields.js │ │ └── test/ │ │ └── simple-fields.test.js │ ├── simple-filter/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-filter.js │ │ └── test/ │ │ └── simple-filter.test.js │ ├── simple-icon/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── button-lite.html │ │ │ ├── button.html │ │ │ ├── iconset.html │ │ │ ├── index.html │ │ │ └── lite.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── build.sh │ │ │ ├── simple-icon-button-lite.js │ │ │ ├── simple-icon-button.js │ │ │ ├── simple-icon-lite.js │ │ │ ├── simple-icon.haxProperties.json │ │ │ ├── simple-icons.js │ │ │ ├── simple-iconset-demo.js │ │ │ ├── simple-iconset-manifest.js │ │ │ └── simple-iconset.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-icon.js │ │ └── test/ │ │ └── simple-icon.test.js │ ├── simple-icon-picker/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-icon-picker.js │ │ └── test/ │ │ └── simple-icon-picker.test.js │ ├── simple-img/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── simple-img.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-img.js │ │ └── test/ │ │ └── simple-img.test.js │ ├── simple-login/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── simple-camera-snap.js │ │ │ ├── simple-login-avatar.js │ │ │ └── simple-login-camera.js │ │ ├── locales/ │ │ │ └── simple-login.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-login.js │ │ └── test/ │ │ └── simple-login.test.js │ ├── simple-modal/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── css.html │ │ │ ├── details.html │ │ │ ├── index.html │ │ │ └── template.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── simple-modal-handler.js │ │ │ └── simple-modal-template.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-modal.js │ │ └── test/ │ │ └── simple-modal.test.js │ ├── simple-picker/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── SimplePickerEmojis.js │ │ │ ├── simple-emoji-picker.js │ │ │ ├── simple-picker-option.js │ │ │ └── simple-symbol-picker.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-picker.js │ │ ├── simple-picker.js.rej │ │ └── test/ │ │ └── simple-picker.test.js │ ├── simple-popover/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── tour.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── SimpleTourFinder.js │ │ │ ├── simple-popover-manager.js │ │ │ ├── simple-popover-selection.js │ │ │ └── simple-tour.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-popover.js │ │ └── test/ │ │ └── simple-popover.test.js │ ├── simple-progress/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-progress.js │ │ └── test/ │ │ └── simple-progress.test.js │ ├── simple-range-input/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-range-input.js │ │ └── test/ │ │ └── simple-range-input.test.js │ ├── simple-search/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── selector.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── simple-search-content.js │ │ │ └── simple-search-match.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-search.js │ │ └── test/ │ │ └── simple-search.test.js │ ├── simple-toast/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── simple-toast-el.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-toast.js │ │ └── test/ │ │ └── simple-toast.test.js │ ├── simple-toolbar/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── buttons.html │ │ │ ├── grid.html │ │ │ ├── index.html │ │ │ └── menu.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── simple-button-grid.js │ │ │ ├── simple-toolbar-button-group.js │ │ │ ├── simple-toolbar-button.js │ │ │ ├── simple-toolbar-field.js │ │ │ ├── simple-toolbar-menu-item.js │ │ │ ├── simple-toolbar-menu.js │ │ │ └── simple-toolbar-more-button.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-toolbar.js │ │ └── test/ │ │ └── simple-toolbar.test.js │ ├── simple-tooltip/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-tooltip.js │ │ └── test/ │ │ └── simple-tooltip.test.js │ ├── simple-wc/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── index.html │ │ │ └── simple-wc-demo.js │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── simple-wc.js │ │ └── test/ │ │ └── simple-wc.test.js │ ├── social-share-link/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── social-share-link.js │ │ └── test/ │ │ └── social-share-link.test.js │ ├── sorting-question/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── sorting-option.js │ │ │ └── sorting-question.haxProperties.json │ │ ├── locales/ │ │ │ ├── sorting-question.es.json │ │ │ ├── sorting-question.he.json │ │ │ └── sorting-question.ja.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── sorting-question.js │ │ └── test/ │ │ └── sorting-question.test.js │ ├── spacebook-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.html │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── spacebook-theme.js │ │ ├── test/ │ │ │ └── spacebook-theme.test.js │ │ └── web-dev-server.config.mjs │ ├── spotify-embed/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── spotify-embed.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── spotify-embed.js │ │ └── test/ │ │ └── spotify-embed.test.js │ ├── star-rating/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ ├── star-rating.js │ │ └── test/ │ │ └── star-rating.test.js │ ├── stop-note/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── iconsets.json │ │ │ └── stop-note.haxProperties.json │ │ ├── locales/ │ │ │ └── stop-note.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── stop-note.js │ │ └── test/ │ │ └── stop-note.test.js │ ├── super-daemon/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── super-daemon-row.js │ │ │ ├── super-daemon-search.js │ │ │ ├── super-daemon-toast.js │ │ │ └── super-daemon-ui.js │ │ ├── locales/ │ │ │ ├── super-daemon.af.json │ │ │ ├── super-daemon.am.json │ │ │ ├── super-daemon.ar.json │ │ │ ├── super-daemon.az.json │ │ │ ├── super-daemon.be.json │ │ │ ├── super-daemon.bn.json │ │ │ ├── super-daemon.cs.json │ │ │ ├── super-daemon.de.json │ │ │ ├── super-daemon.el.json │ │ │ ├── super-daemon.en.json │ │ │ ├── super-daemon.es.json │ │ │ ├── super-daemon.eu.json │ │ │ ├── super-daemon.fi.json │ │ │ ├── super-daemon.fr.json │ │ │ ├── super-daemon.he.json │ │ │ ├── super-daemon.hi.json │ │ │ ├── super-daemon.hy.json │ │ │ ├── super-daemon.id.json │ │ │ ├── super-daemon.it.json │ │ │ ├── super-daemon.ja.json │ │ │ ├── super-daemon.ko.json │ │ │ ├── super-daemon.ms.json │ │ │ ├── super-daemon.nl.json │ │ │ ├── super-daemon.no.json │ │ │ ├── super-daemon.pl.json │ │ │ ├── super-daemon.pt.json │ │ │ ├── super-daemon.ro.json │ │ │ ├── super-daemon.ru.json │ │ │ ├── super-daemon.sq.json │ │ │ ├── super-daemon.sv.json │ │ │ ├── super-daemon.th.json │ │ │ ├── super-daemon.tr.json │ │ │ ├── super-daemon.uk.json │ │ │ ├── super-daemon.ur.json │ │ │ ├── super-daemon.vi.json │ │ │ └── super-daemon.zh.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── super-daemon.js │ │ └── test/ │ │ └── super-daemon.test.js │ ├── tagging-question/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── _.gitignore │ │ ├── _.npmignore │ │ ├── custom-elements.json │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── tagging-question.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── tagging-question.js │ │ └── test/ │ │ ├── index.html │ │ ├── tagging-question.test.js │ │ └── tagging-question_test.html │ ├── terrible-themes/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── terrible-best-themes.js │ │ │ ├── terrible-outlet-themes.js │ │ │ ├── terrible-productionz-themes.js │ │ │ └── terrible-resume-themes.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── terrible-themes.js │ │ └── test/ │ │ └── terrible-themes.test.js │ ├── training-theme/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ ├── training-button.js │ │ │ └── training-top.js │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── training-theme.test.js │ │ └── training-theme.js │ ├── twitter-embed/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── twitter-embed-vanilla.js │ │ │ └── twitter-embed.haxProperties.json │ │ ├── locales/ │ │ │ └── twitter-embed.haxProperties.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── twitter-embed.test.js │ │ └── twitter-embed.js │ ├── type-writer/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── type-writer.test.js │ │ └── type-writer.js │ ├── un-sdg/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.html │ │ ├── lib/ │ │ │ └── un-sdg.haxProperties.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── un-sdg.test.js │ │ ├── un-sdg.js │ │ └── web-dev-server.config.mjs │ ├── undo-manager/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── undo-manager.test.js │ │ └── undo-manager.js │ ├── unity-webgl/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── example/ │ │ │ │ ├── build web.data.unityweb │ │ │ │ ├── build web.framework.js.unityweb │ │ │ │ ├── build web.loader.js │ │ │ │ └── build web.wasm.unityweb │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── unity-webgl.test.js │ │ └── unity-webgl.js │ ├── user-action/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── UserActionBroker.js │ │ │ └── user-action.haxProperties.json │ │ ├── locales/ │ │ │ └── user-action.haxProperties.es.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── user-action.test.js │ │ └── user-action.js │ ├── user-scaffold/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── .gitkeep │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── user-scaffold.test.js │ │ └── user-scaffold.js │ ├── utils/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── lib/ │ │ │ ├── activeStateBehavior.js │ │ │ ├── demo/ │ │ │ │ └── index.html │ │ │ ├── gSheetsInterface.js │ │ │ ├── marked.js │ │ │ ├── nodejs-fake-dom-polyfill.cjs │ │ │ └── remoteLinkBehavior.js │ │ ├── package.json │ │ ├── test/ │ │ │ └── utils.test.js │ │ ├── utils.js │ │ └── web-dev-server.config.mjs │ ├── video-player/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── audio-description.html │ │ │ ├── index.html │ │ │ ├── lecture-player.html │ │ │ └── samples/ │ │ │ ├── HAXshort.vtt │ │ │ ├── bueller.vtt │ │ │ ├── sintel-de.vtt │ │ │ ├── sintel-en.vtt │ │ │ ├── sintel-es.vtt │ │ │ ├── stclair-images.vtt │ │ │ ├── stclair.srt │ │ │ └── stclair.vtt │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── lecture-anchor.js │ │ │ └── lecture-player.js │ │ ├── locales/ │ │ │ ├── video-player.af.json │ │ │ ├── video-player.am.json │ │ │ ├── video-player.ar.json │ │ │ ├── video-player.az.json │ │ │ ├── video-player.be.json │ │ │ ├── video-player.bg.json │ │ │ ├── video-player.bn.json │ │ │ ├── video-player.bs.json │ │ │ ├── video-player.ca.json │ │ │ ├── video-player.co.json │ │ │ ├── video-player.cs.json │ │ │ ├── video-player.cy.json │ │ │ ├── video-player.da.json │ │ │ ├── video-player.de.json │ │ │ ├── video-player.el.json │ │ │ ├── video-player.en.json │ │ │ ├── video-player.eo.json │ │ │ ├── video-player.es.json │ │ │ ├── video-player.et.json │ │ │ ├── video-player.eu.json │ │ │ ├── video-player.fa.json │ │ │ ├── video-player.fi.json │ │ │ ├── video-player.fo.json │ │ │ ├── video-player.fr.json │ │ │ ├── video-player.fy.json │ │ │ ├── video-player.ga.json │ │ │ ├── video-player.gl.json │ │ │ ├── video-player.gn.json │ │ │ ├── video-player.gu.json │ │ │ ├── video-player.ha.json │ │ │ ├── video-player.haw.json │ │ │ ├── video-player.he.json │ │ │ ├── video-player.hi.json │ │ │ ├── video-player.hr.json │ │ │ ├── video-player.hu.json │ │ │ ├── video-player.hy.json │ │ │ ├── video-player.id.json │ │ │ ├── video-player.ig.json │ │ │ ├── video-player.is.json │ │ │ ├── video-player.it.json │ │ │ ├── video-player.ja.json │ │ │ ├── video-player.jv.json │ │ │ ├── video-player.ka.json │ │ │ ├── video-player.kk.json │ │ │ ├── video-player.km.json │ │ │ ├── video-player.kn.json │ │ │ ├── video-player.ko.json │ │ │ ├── video-player.ku.json │ │ │ ├── video-player.ky.json │ │ │ ├── video-player.lb.json │ │ │ ├── video-player.lo.json │ │ │ ├── video-player.lt.json │ │ │ ├── video-player.lv.json │ │ │ ├── video-player.mi.json │ │ │ ├── video-player.mk.json │ │ │ ├── video-player.ml.json │ │ │ ├── video-player.mn.json │ │ │ ├── video-player.mr.json │ │ │ ├── video-player.ms.json │ │ │ ├── video-player.mt.json │ │ │ ├── video-player.my.json │ │ │ ├── video-player.nb.json │ │ │ ├── video-player.ne.json │ │ │ ├── video-player.nl.json │ │ │ ├── video-player.no.json │ │ │ ├── video-player.ny.json │ │ │ ├── video-player.om.json │ │ │ ├── video-player.pa.json │ │ │ ├── video-player.pl.json │ │ │ ├── video-player.pnb.json │ │ │ ├── video-player.ps.json │ │ │ ├── video-player.pt.json │ │ │ ├── video-player.qu.json │ │ │ ├── video-player.ro.json │ │ │ ├── video-player.ru.json │ │ │ ├── video-player.sd.json │ │ │ ├── video-player.si.json │ │ │ ├── video-player.sk.json │ │ │ ├── video-player.sl.json │ │ │ ├── video-player.sn.json │ │ │ ├── video-player.so.json │ │ │ ├── video-player.sq.json │ │ │ ├── video-player.sr.json │ │ │ ├── video-player.sv.json │ │ │ ├── video-player.sw.json │ │ │ ├── video-player.ta.json │ │ │ ├── video-player.te.json │ │ │ ├── video-player.tg.json │ │ │ ├── video-player.th.json │ │ │ ├── video-player.tk.json │ │ │ ├── video-player.tr.json │ │ │ ├── video-player.tt.json │ │ │ ├── video-player.uk.json │ │ │ ├── video-player.ur.json │ │ │ ├── video-player.uz.json │ │ │ ├── video-player.vi.json │ │ │ ├── video-player.wuu.json │ │ │ ├── video-player.xh.json │ │ │ ├── video-player.yi.json │ │ │ ├── video-player.yo.json │ │ │ ├── video-player.zh.json │ │ │ └── video-player.zu.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── video-player.test.js │ │ └── video-player.js │ ├── vocab-term/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── .gitkeep │ │ │ └── vocab-term.haxProperties.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── vocab-term.test.js │ │ └── vocab-term.js │ ├── voice-recorder/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── vmsg-fork.js │ │ │ └── vmsg.wasm │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── voice-recorder.test.js │ │ └── voice-recorder.js │ ├── wc-autoload/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ ├── cantvas.html │ │ │ ├── elmsln.html │ │ │ ├── index.html │ │ │ ├── mixed-registries.html │ │ │ ├── multiple-registries.html │ │ │ ├── thing1.json │ │ │ ├── thing2.json │ │ │ └── wc-registry-tag.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── wc-autoload.test.js │ │ └── wc-autoload.js │ ├── web-container/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .github/ │ │ │ └── workflows/ │ │ │ └── main.yml │ │ ├── .gitignore │ │ ├── .nojekyll │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.html │ │ ├── lib/ │ │ │ ├── loading.html │ │ │ ├── web-container-doc-player.haxProperties.json │ │ │ ├── web-container-doc-player.js │ │ │ ├── web-container-wc-registry-docs.js │ │ │ └── web-container.haxProperties.json │ │ ├── netlify.toml │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test/ │ │ │ └── web-container.test.js │ │ ├── web-container.js │ │ └── web-dev-server.config.mjs │ ├── wikipedia-query/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── lib/ │ │ │ └── wikipedia-query.haxProperties.json │ │ ├── locales/ │ │ │ ├── wikipedia-query.haxProperties.es.json │ │ │ └── wikipedia-query.haxProperties.fr.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── wikipedia-query.test.js │ │ └── wikipedia-query.js │ ├── word-count/ │ │ ├── .dddignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .surgeignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── demo/ │ │ │ └── index.html │ │ ├── gulpfile.cjs │ │ ├── index.html │ │ ├── locales/ │ │ │ ├── word-count.es.json │ │ │ ├── word-count.fr.json │ │ │ └── word-count.ja.json │ │ ├── package.json │ │ ├── polymer.json │ │ ├── test/ │ │ │ └── word-count.test.js │ │ └── word-count.js │ └── wysiwyg-hax/ │ ├── .dddignore │ ├── .editorconfig │ ├── .gitignore │ ├── .npmignore │ ├── .surgeignore │ ├── .travis.yml │ ├── LICENSE.md │ ├── README.md │ ├── demo/ │ │ ├── index.html │ │ └── sample-store.json │ ├── gulpfile.cjs │ ├── index.html │ ├── package.json │ ├── polymer.json │ ├── test/ │ │ └── wysiwyg-hax.test.js │ └── wysiwyg-hax.js ├── generate-theme-screenshots-with-server.js ├── generate-theme-screenshots.js ├── gulpfile.mjs ├── hax-elements-registry.json ├── lerna.json ├── package.json ├── patches/ │ ├── @lit-labs+ssr+3.2.2.patch │ ├── @lit-labs+ssr+3.3.1.patch │ └── polymer-build+3.1.4.patch ├── polymer.json ├── prettier.config.cjs ├── publishnpm.sh ├── renovate.json ├── scripts/ │ ├── build-component-gallery.js │ ├── gallery-dev-server.js │ ├── generate-translation-manifest.js │ ├── hax-elements-discovery.js │ ├── haxthewebme.ps1 │ ├── haxthewebme.sh │ ├── postinstall.js │ ├── preinstall.js │ ├── stats.sh │ ├── theme-discovery.js │ ├── ubiquity-push.sh │ └── ubiquity-testing.sh ├── signatures/ │ └── version1/ │ └── cla.json ├── utilities/ │ ├── package.json │ └── requestHelpers.js ├── vercel.json ├── wc-registry.json ├── wct.conf.json ├── web-dev-server.config.mjs ├── web-dev-server.haxcms.config.cjs └── web-test-runner.config.mjs ================================================ FILE CONTENTS ================================================ ================================================ FILE: .continue/README.md ================================================ # Continue + Penn State AI Studio Setup This folder provides a starter Continue configuration for Azure-based AI Studio. ## 1) Fill in `.continue/config.yaml` Replace the placeholders: - `REPLACE_WITH_RESOURCE_NAME` - Your Azure OpenAI resource host prefix. - Example endpoint in Azure portal: `https://my-resource.openai.azure.com/` - In this case, `my-resource` is the resource name. - `REPLACE_WITH_CHAT_DEPLOYMENT_NAME` - The exact Azure deployment name you use for chat. - `REPLACE_WITH_AUTOCOMPLETE_DEPLOYMENT_NAME` - A fast model deployment name for autocomplete (optional). - `REPLACE_WITH_API_KEY` - Your Azure AI Studio / Azure OpenAI key. ## 2) Restart VS Code Reload window after editing config so Continue picks up changes. ## 3) Validate in Continue - Open Continue chat. - Ask a small prompt like: `Reply with OK and model name`. - If it fails, verify `apiBase`, `model` deployment names, and `apiVersion`. ## Security note Avoid committing real API keys. Keep keys local-only or switch `apiKey` to an environment variable once confirmed working. ================================================ FILE: .devcontainer/devcontainer.json ================================================ // For format details, see https://aka.ms/devcontainer.json. { "name": "haxtheweb/webcomponents Dev Container", "image": "ghcr.io/haxtheweb/devcontainer-nodejs:latest", // Compatibility with SELinux "runArgs": ["--security-opt", "label=disable"], // Configure tool-specific properties. "customizations": { "vscode": { "settings": {}, "extensions": [ "runem.lit-plugin", "bierner.lit-html", "deque-systems.vscode-axe-linter", "ecmel.vscode-html-css", "oliversturm.fix-json", "yzhang.markdown-all-in-one", "zdodson.dddignore" ] } }, // Use 'portsAttributes' to set default properties for specific forwarded ports. // More info: https://containers.dev/implementors/json_reference/#port-attributes "portsAttributes": { "3000": { "label": "Express Port", "onAutoForward": "silent" }, "8000": { "label": "HAXsite/Web Component Port", "onAutoForward": "silent" } }, "workspaceFolder": "/home/node/${localWorkspaceFolderBasename}", "workspaceMount": "source=${localWorkspaceFolder},target=${containerWorkspaceFolder},type=bind,consistency=cached", "postCreateCommand": "bash scripts/haxthewebme.sh" } ================================================ FILE: .editorconfig ================================================ # EditorConfig helps developers define and maintain consistent # coding styles between different editors and IDEs # http://editorconfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 2 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true # set charset charset = utf-8 # skip trailing whitespace on markdown files [*.md] trim_trailing_whitespace = false ================================================ FILE: .gitattributes ================================================ * text=auto *.sh text eol=lf ================================================ FILE: .github/CODEOWNERS ================================================ # Global ownership # Bryan Ollendyke (btopro) is the primary maintainer and creator of HAXTheWeb * @btopro # HAXTheWeb ecosystem is developed and maintained by: # Bryan Ollendyke (@btopro) - Penn State University # Copyright (c) 2015-2025 The Pennsylvania State University ================================================ FILE: .github/workflows/build.yml ================================================ name: build on: push: branches: [master] pull_request: branches: [master] jobs: build-and-test: name: "${{ matrix.platform }}: node.js ${{ matrix.node-version }}" strategy: fail-fast: false matrix: platform: [ubuntu-latest] node-version: [22] include: - platform: ubuntu-latest node-version: 22 runs-on: ${{ matrix.platform }} steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - name: Cache Yarn uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-node-${{ matrix.node-version }}-yarn- - name: Install run: yarn install - name: Rebuild Elements README run: cd elements && for dir in */; do head -4 $dir/README.md; done > README.md ================================================ FILE: .github/workflows/cla.yml ================================================ name: "CLA Assistant" on: issue_comment: types: [created] pull_request_target: types: [opened, closed, synchronize] # explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings permissions: actions: write contents: read # this can be 'read' if the signatures are in remote repository pull-requests: write statuses: write jobs: CLAAssistant: runs-on: ubuntu-latest steps: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' uses: contributor-assistant/github-action@v2.6.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACCESS_TOKEN }} with: path-to-signatures: 'signatures/version1/cla.json' path-to-document: 'https://github.com/haxtheweb/cla/blob/main/CLA.md' # branch should not be protected branch: 'main' allowlist: bot* # the followings are the optional inputs - If the optional inputs are not given, then default values will be taken remote-organization-name: 'haxtheweb' remote-repository-name: 'cla' create-file-commit-message: 'Creating file for storing CLA Signatures' signed-commit-message: 'CLA signed by $contributorName' custom-notsigned-prcomment: 'Thank you for your contribution! Before we can merge your PR, we need you to sign our Contributor License Agreement (CLA). Please comment **"I have read the CLA Document and I hereby sign the CLA"** to agree to the [CLA terms](https://github.com/haxtheweb/cla/blob/main/CLA.md).' custom-allsigned-prcomment: 'All contributors have signed the CLA. Thank you!' ================================================ FILE: .github/workflows/ossf_scorecard.yml ================================================ --- # This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation. name: OSSF Scorecard on: # For Branch-Protection check. Only the default branch is supported. See https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection. branch_protection_rule: # To guarantee Maintained check is occasionally updated. See https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained. schedule: - cron: "0 0 * * 1" push: branches: [main, master] workflow_dispatch: # Declare default permissions as read only. permissions: read-all jobs: analysis: name: Scorecard analysis runs-on: ubuntu-24.04 # Delete the conditional below if you are using the OSSF Scorecard on a public repository. if: ${{ github.event.repository.private == false }} permissions: # Needed if using Code Scanning alerts. security-events: write # Needed for GitHub OIDC token if publish_results is true. id-token: write # Uncomment the permissions below if you are using the OSSF Scorecard on a private repository. # contents: read # actions: read # issues: read # To allow GraphQL ListCommits to work # pull-requests: read # To allow GraphQL ListCommits to work # checks: read # To detect SAST tools steps: - name: Check out the codebase uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false - name: Run analysis uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 with: results_file: results.sarif results_format: sarif # (Optional) fine-grained personal access token. Uncomment the `repo_token` line below if you want to enable the Branch-Protection or Webhooks check on a *private* repository. # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional. # repo_token: ${{ secrets.SCORECARD_TOKEN }} # Publish the results for public repositories to enable scorecard badges. For more details, see https://github.com/ossf/scorecard-action#publishing-results. # For private repositories, `publish_results` will automatically be set to `false`, regardless of the value entered here. publish_results: true # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF format to the repository Actions tab. - name: Upload artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: SARIF file path: results.sarif retention-days: 5 # Upload the results to GitHub's code scanning dashboard. - name: Upload SARIF results to code scanning uses: github/codeql-action/upload-sarif@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8 with: sarif_file: results.sarif ================================================ FILE: .gitignore ================================================ node_modules .DS_Store arth111-jeopardy lerna-debug.log *.local.umd.js *.local.js build npm-debug.log test/.wct-kludge .yo-rc.json *-*.tgz analysis.json yarn-error.log .cache .yarn yarn.lock test/index.html component-gallery.html elements/video-player/demo/samples/ad/ elements/haxcms-elements/demo/files/ # No end-/ because node_modules is a symlink elements/haxcms-elements/demo/node_modules elements/grade-book/demo/psu/ elements/elmsln-apps/lib/lrnapp-studio-instructor/demo/* elements/elmsln-apps/lib/lrnapp-studio-instructor/lrnapp-studio-submission/api/submissions/353 elements/elmsln-apps/lib/lrnapp-studio-instructor/demo/data.json elements/elmsln-apps/lib/lrnapp-studio-instructor/lrnapp-studio-submission/api/submissions/1868 .vercel .env .continue/config.yaml .continue/*.local.yaml ================================================ FILE: .jshintrc ================================================ { "node": true, "esnext": true, "bitwise": true, "camelcase": true, "curly": true, "eqeqeq": true, "immed": true, "indent": 2, "latedef": true, "newcap": true, "noarg": true, "quotmark": "single", "regexp": true, "undef": true, "unused": true, "strict": true, "trailing": true, "smarttabs": true, "white": true } ================================================ FILE: .lvimrc ================================================ let g:ale_fixers = {} let g:ale_fixers['javascript'] = ['prettier'] let g:ale_fixers['json'] = ['prettier'] let g:ale_fix_on_save = 1 ================================================ FILE: .prettierignore ================================================ *.umd.js *.amd.js *.es6.js *.min.js package-lock.json analysis-error.json code-sample/lib/highlightjs/languages/*.js elements/h5p-element/lib elements/wave-player/lib elements/moment-element/lib elements/barcode-reader/lib ================================================ FILE: .stylelintrc.json ================================================ { "rules": { "block-no-empty": null, "color-no-invalid-hex": true, "comment-empty-line-before": [ "always", { "ignore": ["stylelint-commands", "after-comment"] } ], "declaration-colon-space-after": "always", "indentation": [ 2, { "except": ["value"] } ], "max-empty-lines": 2, "rule-empty-line-before": [ "always", { "except": ["first-nested"], "ignore": ["after-comment"] } ] } } ================================================ FILE: .vscode/extensions.json ================================================ { "recommendations": [ "bierner.lit-html", "deque-systems.vscode-axe-linter", "ecmel.vscode-html-css", "oliversturm.fix-json", "runem.lit-plugin", "yzhang.markdown-all-in-one", "zdodson.dddignore", "ms-vscode-remote.remote-containers" ] } ================================================ FILE: .vscode/launch.json ================================================ { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "pwa-chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:8080", "webRoot": "${workspaceFolder}" } ] } ================================================ FILE: .vscode/settings.json ================================================ { "editor.tabSize": 2, "editor.detectIndentation": false, "html.customData": [ "elements/*/custom-elements.json", "vscode-html-custom-data.json", "custom-elements.json" ], "workbench.colorCustomizations": { "activityBarBadge.background": "#06b9a5", "activityBarBadge.foreground": "#15202b", "commandCenter.activeBackground": "#00a17d", "commandCenter.background": "#00a17d", "commandCenter.border": "#15202b99", "sash.hoverBorder": "#06b9a5", "statusBar.background": "#ab2101", "statusBar.foreground": "#ffffff", "statusBarItem.hoverBackground": "#930d0d", "statusBarItem.remoteForeground": "#2b2615", "statusBarItem.remoteBackground": "#06b9a5", "titleBar.activeBackground": "#ab2101", "titleBar.activeForeground": "#ffffff", "titleBar.inactiveBackground": "#930d0d", "titleBar.inactiveForeground": "#dadada" } } ================================================ FILE: .wcflibcache.json ================================================ [{ "name": "Vanilla", "description": "HTMLElement class extension, 0 dependencies", "wcfactory": { "customElementClass": "HTMLElement", "templateReturnFunctionPart": "get html() {\n return ", "propertyBinding": false }, "main": "HTMLElement/HTMLElement.js", "version": "0.0.1", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && node --experimental-json-modules ../../node_modules/.bin/rollup --config && prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && wca analyze \"**/*.js\" --outFile custom-elements.json", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs" }, "dependencies": {}, "devDependencies": { "web-animations-js": "2.3.2", "@haxtheweb/deduping-fix": "^9.0.0-alpha.0", "gulp-babel": "8.0.0", "@web/dev-server": "0.4.6", "concurrently": "5.3.0", "polymer-build": "3.1.4", "wct-browser-legacy": "1.0.2", "@open-wc/testing": "4.0.0" } } , { "name": "lit-element", "description": "data binding ++, about as small as possible library", "wcfactory": { "customElementClass": "LitElement", "templateReturnFunctionPart": "render() {\n return html", "propertyBinding": { "prefix": "${this.", "suffix": "}" } }, "main": "LitElement/LitElement.js", "version": "0.0.1", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && node --experimental-json-modules ../../node_modules/.bin/rollup --config && prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && wca analyze \"**/*.js\" --outFile custom-elements.json", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs" }, "dependencies": { "lit": "^3.3.1" }, "devDependencies": { "@haxtheweb/deduping-fix": "^9.0.0-alpha.0", "concurrently": "5.3.0", "gulp-babel": "8.0.0", "polymer-build": "3.1.4", "@web/dev-server": "0.4.6", "wct-browser-legacy": "1.0.2", "web-animations-js": "2.3.2", "@open-wc/testing": "4.0.0" } },{}] ================================================ FILE: .well-known/funding-manifest-urls ================================================ https://www.apereo.org/funding.json ================================================ FILE: AGENTS.md ================================================ # AGENTS.md This file provides comprehensive instructions for AI coding agents working within the HAX ecosystem. HAX (Headless Authoring eXperience) is a comprehensive web development ecosystem that enables rapid creation of accessible, performant web components and static sites. Follow these guidelines to set up, develop, test, and contribute effectively to HAX projects. ## HAX Ecosystem Overview The HAX ecosystem consists of multiple interconnected repositories, each serving specific purposes: ### Core Repositories - **`webcomponents`** - The heart of HAX: a monorepo containing 250+ LitElement-based web components, themes, and the DDD design system. All components are built with accessibility, performance, and HAX compatibility in mind. - **`create` (@haxtheweb/create)** - The HAX CLI tool for scaffolding new web components, HAXsites, and managing the development workflow. This is your primary interface for creating new HAX projects. - **`haxcms-php`** - PHP backend implementation of HAXcms, providing content management capabilities, API endpoints, and server-side rendering for HAXsites. - **`haxcms-nodejs`** - Node.js backend implementation of HAXcms, offering the same capabilities as the PHP version but in a JavaScript environment. - **`desktop`** - Electron-based desktop application that provides a local development environment for HAX, combining the power of HAXcms with desktop convenience. ### Supporting Repositories - **`hax11ty`** - Integration layer that bridges HAX components with Eleventy (11ty) static site generator, enabling HAX components in traditional static sites. - **`json-outline-schema`** - Defines the JSON schema used by HAXcms for content structure, site navigation, and metadata management. - **`hax-schema`** - Contains HAX property schemas that define how web components integrate with the HAX authoring interface. - **`open-apis`** - Microservice APIs and shared infrastructure for HAXTheWeb ecosystem. Contains Express-based Vercel endpoints deployed at https://open-apis.hax.cloud/ providing advanced capabilities like content importing, parsing, analysis, site conversion, and migration services. Also hosts the pre-built Storybook documentation for HAX components. - **`docs`** - Official HAX documentation site built as a HAXcms site. Contains comprehensive documentation about HAX philosophy, pillars, community guidelines, tutorials, and developer resources. Structure follows HAXcms conventions with site.json (JSON Outline Schema), pages/ directory for content, and files/ for assets. - **`issues`** - Unified issue tracking repository for the entire HAX ecosystem, where all bugs, features, and discussions are centralized. ### Development Philosophy & Community Pillars HAX is built on a foundation of community pillars that guide all development decisions and community interactions. These are not just technical specifications but ethical commitments: #### Core Pillars - **Accessible**: HAX maximizes accessibility while removing the knowledge required to maintain accessibility standards. Components adhere to WCAG 2.0 AA standards, with automated color contrast ratios and expert-audited implementations. - **Extensible**: Built for sustainable extension through web standards, microservices, and modular architecture that grows with user needs. - **Free and Open**: Open community welcoming all (Penn State and beyond), embracing the 5Rs of OER (Retain, Reuse, Revise, Remix, Redistribute) for content and code. - **Efficient**: Optimized for performance through web standards over heavy libraries, lazy loading, offline capability, and minimal resource usage. - **Platform Agnostic**: Works anywhere - standalone HAXsites, integrated HAXcms, static web pages, or existing CMS platforms. - **Remixable**: Maximizes remix-ability through modular design, open licensing, and semantic content structures. - **Sustainable**: Environmental (less data, lower battery usage), technological (web standards-based longevity), and community (inclusive, collaborative governance) sustainability. #### Technical Emphasis - **Rapid Development**: Scaffolding tools and design systems accelerate creation - **Unbundled Delivery**: Pure JavaScript, HTML, CSS approach without compilation steps - **Modularity**: Components work independently and compose together seamlessly - **Ubiquitous Web**: The web needs a file format - content should "just work" regardless of how it was built ## Development Environment Setup ### Issue Management Before starting any work, check the unified issue queue: - All HAX ecosystem issues are tracked at `haxtheweb/issues` - Use GitHub CLI to check issues: `gh issue list` - Reference existing issues when making contributions ## Setup Commands - **Install HAX CLI globally**: ```bash npm install @haxtheweb/create --global ``` - **Install project dependencies** (run from the project root): ```bash npm install ``` - **Start interactive CLI** (for web components or HAXsites): ```bash hax start ``` - Launches an interactive CLI with ASCII art (via Clack). - **Start development server** (for HAXsites): ```bash hax serve ``` - Launches the site in development mode at `http://localhost`. - **Create a new web component**: ```bash hax webcomponent my-element --y ``` - Creates a LitElement-based web component with DDD design system and i18n support. - In a monorepo, places the component in the correct location and inherits settings. - **Create a new HAXsite**: ```bash hax site mysite --y ``` - Generates a HAXcms-based static site with templated files. - **Update HAX CLI**: ```bash hax update ``` - **Alternative usage** (one-time execution without global install): ```bash npx @haxtheweb/create ``` or ```bash npm init @haxtheweb ``` - **Windows-specific setup**: - If issues occur, set a custom npm cache path: ```bash npm config set cache C:\tmp\nodejs\npm-cache --global ``` - For PowerShell, check execution policy to allow scripts: ```bash Get-ExecutionPolicy ``` Adjust if needed using `Set-ExecutionPolicy` (see [Microsoft documentation](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.4)). ## Code Style & Standards ### JavaScript-Only Architecture - **Language**: Pure JavaScript with LitElement for web components - **NO TypeScript**: HAX strictly avoids TypeScript to eliminate compilation requirements - **Unbundled Approach**: Components ship as native JS/HTML/CSS for maximum compatibility - **Third-party Libraries**: When using libraries written in TypeScript, always import the pre-compiled JavaScript distribution - **External Dependencies**: Leverage libraries like `vaadin-upload`, `shoelace-carousel`, etc. but always use their JS builds ### JavaScript Standards - **Global References**: Use `globalThis` instead of `window` for consistency across environments - **Formatting**: - Use single quotes (`'`) - Avoid semicolons where possible - Prefer functional programming patterns - Use Prettier for consistent formatting - **ES Modules**: Use standard ES6 import/export syntax - **Modern JavaScript**: Leverage ES2018+ features while maintaining browser compatibility ### Design System Integration - **DDD System**: All components MUST adhere to the DDD (Design, Develop, Destroy) design system - Location: `elements/d-d-d` in the webcomponents repository - Use DDD for fonts, colors, padding, spacing, margins, and other design tokens - Inherit from `DDDSuper` class for automatic DDD integration - Reference `.dddignore` file to exclude irrelevant files during audits ### Component Architecture - **HAX Properties**: Include `haxProperties` in web components for HAX compatibility (use `--writeHaxProperties` flag) - **Theme Development**: HAXcms themes should extend `HAXCMSLitElement` class - **File Structure**: - Web components: Place source files in `src/` or `lib/` directories - HAXsites: Pages in `pages/`, themes in `theme/`, assets in `assets/` - Monorepo: Each component gets its own directory in `elements/` ### Naming Conventions - **Web Components**: Use hyphenated names (e.g., `my-element`) - **Package Names**: Match component/site name in `package.json` - **CSS Classes**: Follow BEM methodology when not using DDD tokens ### Internationalization (i18n) - Use provided i18n wiring for web components (automatically included with `hax webcomponent`) - Support multiple languages from the start ## Build System & Testing ### Build Process Understanding The HAX ecosystem uses a sophisticated build pipeline optimized for unbundled JavaScript delivery: 1. **Gulp**: Handles asset compilation and processing 2. **Prettier**: Ensures consistent code formatting 3. **CEM (Custom Elements Manifest)**: Generates `custom-elements.json` for component metadata 4. **Lerna**: Manages monorepo dependencies and publishing 5. **No TypeScript Compilation**: Pure JavaScript workflow eliminates build complexity ### Build Commands - **Standard build** (from component root): ```bash yarn run build ``` - Compiles assets, formats code, generates custom-elements.json - **CRITICAL**: Always run this after changes to HAXCMSLitElement themes - Do NOT manually edit `custom-elements.json` - it's auto-generated - **Development build with watching**: ```bash yarn run dev ``` - **Monorepo build** (from webcomponents root): ```bash yarn run build ``` - Builds all components in the monorepo ### Testing Instructions - **Run tests** (from project or component root): ```bash npm test ``` - **Monorepo testing**: ```bash npm run test --filter ``` - Tests specific component in monorepo - Use Lerna for more complex filtering ### DDD Compliance Auditing - **Audit web components for DDD compliance**: ```bash hax audit ``` - Checks CSS and structure against DDD design system standards - Ignores files listed in `.dddignore` - Run from component root for accurate results - **Required** before submitting theme components ### Code Quality - **Linting**: ```bash npm run lint ``` - Ensures code style compliance before committing - Uses ESLint, Prettier, and Stylelint - **Fix issues automatically**: ```bash npm run lint:fix ``` ### Example `.dddignore` Template ```plaintext /node_modules /dist /build /public /test /.github /.vscode /.idea /locales LICENSE .dddignore .editorconfig .gitignore .npmignore *.md *.yml *.json *.png *.svg ``` ## Pull Request Instructions - **PR Title Format**: `[] ` - Example: `[my-element] Add dynamic property binding` - **Pre-commit checks**: - Run `npm test` to ensure all tests pass. - Run `npm run lint` to verify code style. - Run `hax audit` for web components to confirm DDD compliance. - **Commit Guidelines**: - Use clear, descriptive commit messages (e.g., "Add i18n support to my-element"). - Include relevant changes to tests or documentation. - **HAXsite PRs**: - Test locally with `hax serve` to verify page rendering. - Ensure new pages or content updates align with `site.json` and JSON Outline Schema. ## CLI Command Options The HAX CLI supports various options for fine-tuned control. Use `hax help`, `hax webcomponent --help`, or `hax site --help` for details. Key options include: - `--v`: Verbose output. - `--debug`: Developer-focused output. - `--format `: Output format (json, yaml; default: json). - `--path `: Directory to perform operation. - `--name `: Project or component name. - `--npm-client `: Package manager (npm, yarn, pnpm; default: npm). - `--y` or `--auto`: Auto-accept all prompts. - `--skip`: Skip animations for faster execution. - `--quiet`: Suppress console logging. - `--no-i`: Prevent interactive sub-processes (ideal for scripting). - `--to-file `: Redirect output to a file. - `--no-extras`: Skip automatic command processing. - `--root `: Root directory for command execution. - `--org `: Organization for `package.json`. - `--author `: Author for site or `package.json`. - `--writeHaxProperties`: Write `haxProperties` for web components. - `--import-site `: URL of site to import. - `--import-structure `: Import method (e.g., pressbooksToSite, htmlToSite). - `--custom-theme-name `: Custom theme name for HAXsites. - `--custom-theme-template `: Theme template (base, polaris-flex, polaris-sidebar). - `--repos `: Repositories to clone. ## HAX Theme Development ### Theme Architecture - **Base Class**: HAXcms themes extend `HAXCMSLitElement` class - **Design Integration**: Themes inherit DDD design system automatically - **Template Options**: Choose from `base`, `polaris-flex`, `polaris-sidebar` - **Custom Themes**: Create entirely custom themes with full control - **Pure JavaScript**: All theme code written in JavaScript, HTML, CSS only ### Theme Creation Workflow 1. **Create custom theme**: ```bash hax site --custom-theme-name my-theme --custom-theme-template base ``` 2. **Modify theme files** in the generated theme directory - Edit JavaScript files directly (no TypeScript compilation needed) - Use standard HTML templates - Apply CSS with DDD tokens 3. **Build theme** (CRITICAL STEP): ```bash yarn run build ``` - Generates `custom-elements.json` - Compiles styles and assets - Updates component metadata 4. **Test theme locally**: ```bash hax serve ``` ### Theme Best Practices - Use DDD tokens for consistent styling - Import external libraries from their JavaScript distributions - Implement responsive design patterns - Ensure accessibility compliance - Test across different content types - Follow HAX component patterns ## Monorepo Navigation & Management ### Repository Structure ``` ~/Documents/git/haxtheweb/ ├── webcomponents/ # Component library & themes │ └── elements/ # Individual components │ ├── d-d-d/ # Design system │ ├── clean-two/ # Example theme │ └── [250+ more]/ # All other components ├── create/ # HAX CLI tool ├── haxcms-php/ # PHP backend ├── haxcms-nodejs/ # Node.js backend ├── desktop/ # Electron app ├── hax11ty/ # 11ty integration ├── json-outline-schema/ # Content schemas ├── hax-schema/ # HAX property schemas ├── open-apis/ # Microservice APIs & Component Gallery │ ├── api/ # Express Vercel endpoints │ │ ├── apps/ # HAXcms conversion services │ │ ├── services/ # Media processing, analysis │ │ ├── users/ # Authentication endpoints │ │ └── utilities/ # Shared API helpers │ └── component-gallery/# Component documentation ├── docs/ # Official HAX documentation │ ├── site.json # JSON Outline Schema structure │ ├── pages/ # Documentation content (HTML) │ └── files/ # Assets and media └── issues/ # Unified issue tracking ``` ### Working Across Repositories - **Component Development**: Work in `webcomponents/elements/[component-name]/` - **CLI Development**: Work in `create/` - **Backend Development**: Choose `haxcms-php/` or `haxcms-nodejs/` - **API/Microservices**: Develop Express endpoints in `open-apis/api/` - **Documentation**: Update in `docs/` (HAXcms site format) - **Schema Changes**: Update in `json-outline-schema/` or `hax-schema/` - **Issues**: Always check `issues/` first ### Lerna Management (webcomponents repo) ```bash # Run command across all components lerna run build # Publish components (maintainers only) lerna publish # Add dependency to specific component lerna add package-name --scope=@haxtheweb/component-name ``` ## Advanced HAX Patterns ### Content Import & Migration - **Import from external sources**: ```bash hax site --import-site https://example.com --import-structure htmlToSite ``` - **Supported import methods**: - `pressbooksToSite` - Academic textbook platform - `elmslnToSite` - ELMS Learning Network - `haxcmsToSite` - Between HAXcms instances - `notionToSite` - Notion workspace - `gitbookToSite` - GitBook documentation - `evolutionToSite` - Evolution CMS - `htmlToSite` - Generic HTML import - `docxToSite` - Microsoft Word documents ### Site Management - **Add pages programmatically**: ```bash hax site --title "New Page" --content "

Content

" --slug "new-page" ``` - **Advanced page options**: ```bash hax site --title "Page" --parent "parent-slug" --order 3 --theme "custom-theme" --hide-in-menu ``` ### GitHub CLI Integration - **Check issues**: `gh issue list` - **Create issues**: `gh issue create` - **Review PRs**: `gh pr review` - **CLI is pre-installed** - use directly without verification ### External Library Integration - **Vaadin Components**: Import from `@vaadin/[component]/[component].js` - **Shoelace Components**: Import from `@shoelace-style/shoelace/dist/components/[component]/[component].js` - **Other Libraries**: Always use the `/dist/` or compiled JavaScript version - **Open APIs**: Leverage https://open-apis.hax.cloud/ for conversion, analysis, and processing services - **Avoid**: Direct TypeScript imports or source files requiring compilation ## Additional Instructions ## HAX Cloud Infrastructure ### HAX.cloud Services HAX leverages cloud infrastructure at https://hax.cloud for: - **CDN**: Content delivery network for component libraries - **AI Services**: Content analysis and processing capabilities - **Documentation**: Centralized documentation and community resources - **Open Infrastructure**: Publicly available APIs and services ### Microservice Architecture - **open-apis.hax.cloud**: Conversion, analysis, and processing services - **Stateless Design**: Services designed for scalability and reliability - **REST APIs**: Standard HTTP interfaces for integration - **Vercel Deployment**: Serverless functions for optimal performance ## Ecosystem-Specific Guidance ### Development Workflows - **Monorepo Support**: Place additional `AGENTS.md` files in subproject folders for component-specific instructions - **Schema Evolution**: Changes to JSON schemas require coordination across repositories - **Component Dependencies**: Use `@haxtheweb/` scope for internal dependencies - **Version Synchronization**: Components should maintain version alignment - **No Compilation Step**: Pure JavaScript approach means faster development cycles - **API Development**: Express endpoints in `open-apis/` deploy automatically to Vercel at https://open-apis.hax.cloud/ ### Documentation Standards - **HAXcms Format**: Documentation sites use HAXcms structure (site.json + pages/ + files/) - **JSON Outline Schema**: All content structure follows standardized schema - **Semantic HTML**: Content authored in semantic HTML for maximum portability - **Asset Management**: Media files organized in files/ directory with proper metadata ### Community Governance - **Pillar-Driven Development**: All decisions evaluated against community pillars - **Inclusive Decision Making**: Community input welcomed on major changes - **Issue-Driven Development**: Work organized through GitHub issues with pillar labels - **Educational Mission**: Remember HAX's roots in empowering educators and learners ## Educational & Pedagogical Context HAX has deep roots in educational technology, evolving from over a decade of work in online learning: ### Educational Heritage - **ELMS:LN Legacy**: HAX evolved from ELMS Learning Network (2012-2022), a Next Generation Digital Learning Environment (NGDLE) that powered hundreds of online courses at Penn State and beyond - **OER Commitment**: Embraces the 5Rs of Open Educational Resources (Retain, Reuse, Revise, Remix, Redistribute) - **Instructional Design Focus**: Built-in support for pedagogical patterns through specialized components ### Educational Components HAX includes purpose-built components for learning: - **Question Types**: Multiple choice, fill-in-the-blanks, drag-and-drop, true/false, short answer, sorting, tagging - **Instructional Tools**: Self-check activities, stop notes, timelines, math notation (MathML/LaTeX) - **Assessment Features**: Immediate feedback, progressive disclosure, formative assessment patterns - **Accessibility in Learning**: Screen reader compatibility, keyboard navigation, high contrast support ### Pedagogical Patterns - **Chunked Content**: Break complex topics into digestible components - **Active Learning**: Interactive elements encourage engagement over passive consumption - **Universal Design for Learning**: Multiple means of representation, engagement, and expression - **Evidence-Based Design**: Components based on learning science research ### Related Educational Projects - **ELMS:LN**: Legacy platform still maintained but effectively replaced by HAX - **Course Design Templates**: Pre-built pedagogical frameworks for common course structures - **Learning Analytics**: Integration points for tracking learner engagement and progress ### Community & Support - **HAX Community**: Run `hax party` for involvement opportunities - **Discord**: https://bit.ly/hax-discord - **Issue Reporting**: Use `haxtheweb/issues` or GitHub interface - **Merlin Integration**: Use "Issue" command in HAX spaces for automated reporting - **Documentation**: Run `man hax` (Linux/macOS) for comprehensive CLI docs - **Educational Resources**: Complete documentation at https://haxtheweb.org/ ## Security Considerations - **Dependencies**: Keep dependencies updated before running `npm install` - **Sensitive Data**: Avoid committing API keys or sensitive data to `package.json`, `site.json`, or public files - **Site Imports**: Validate source URLs when using `--import-site` to prevent malicious content - **File Permissions**: Ensure scripts have correct execution permissions (`chmod +x script.sh`) - **Component Security**: Sanitize user inputs in custom components - **Schema Validation**: Validate against JSON schemas before processing content - **Library Security**: Only import from trusted, well-maintained JavaScript distributions ## Troubleshooting Common Issues ### Build Failures - **Missing custom-elements.json**: Run `yarn run build` from component root - **DDD Audit Failures**: Check `.dddignore` and fix CSS token usage - **Lerna Issues**: Run `lerna clean && lerna bootstrap` ### Development Environment - **Wrong Directory**: Always work from `haxtheweb/` - **CLI Not Found**: Ensure `@haxtheweb/create` is globally installed - **Permission Errors**: Check file permissions and ownership ### Component Issues - **Theme Not Loading**: Verify HAXCMSLitElement inheritance and build process - **DDD Tokens Missing**: Import DDD properly and use CSS custom properties - **HAX Integration**: Ensure `haxProperties` are defined correctly - **Library Import Errors**: Verify you're importing JavaScript distributions, not TypeScript sources ### Performance Issues - **Slow Loading**: Check for unnecessary dependencies or large imports - **Bundle Size**: HAX's unbundled approach should keep individual files small - **Memory Usage**: Monitor component lifecycle and cleanup --- *This AGENTS.md file is maintained across all HAX ecosystem repositories to ensure consistent development experience regardless of entry point.* ================================================ FILE: CHANGELOG.md ================================================ # Changelog All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. ================================================ FILE: CLA-README.md ================================================ # Contributor License Agreement (CLA) Process ## How it Works This repository uses an automated CLA (Contributor License Agreement) process to ensure legal compliance for all contributions. Here's how it works: ### For New Contributors 1. **Open a Pull Request**: When you submit your first pull request, the CLA bot will automatically post a comment asking you to sign the CLA. 2. **Sign the CLA**: To sign the CLA, simply comment on your pull request with: ``` I have read the CLA Document and I hereby sign the CLA ``` 3. **Automatic Processing**: Once you sign, the bot will: - Record your signature in the repository - Update the pull request status - Allow your PR to proceed with the review process ### For Returning Contributors If you've already signed the CLA for this repository, you don't need to sign it again for future pull requests. The bot will automatically recognize you as a signed contributor. ### Important Notes - **Exact Comment Required**: You must use the exact comment text: `I have read the CLA Document and I hereby sign the CLA` - **Read the CLA**: Please read the [full CLA document](./CLA.md) before signing - **One-Time Process**: You only need to sign once per repository - **Bot Users**: Automated bot users are automatically allowlisted and don't need to sign ### Troubleshooting If you're having issues with the CLA process: 1. **Re-check Status**: Comment `recheck` on your pull request to have the bot re-evaluate your CLA status 2. **Contact Maintainers**: If problems persist, mention a maintainer in your pull request ### Technical Details - CLA signatures are stored in `signatures/version1/cla.json` in this repository - The CLA bot is implemented using the [contributor-assistant/github-action](https://github.com/contributor-assistant/github-action) - No third-party services are used; everything is handled within GitHub --- **Questions?** Feel free to open an issue or ask in your pull request if you need help with the CLA process. ================================================ FILE: CLA.md ================================================ # Contributor License Agreement ## HAXtheWeb Webcomponents Project Thank you for your interest in contributing to the HAXtheWeb Webcomponents project owned by Penn State University ("We" or "Us"). This Contributor License Agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us. ### 1. Definitions **"You"** (or **"Your"**) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Us. **"Contribution"** shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Us for inclusion in, or documentation of, any of the products owned or managed by Us (the "Work"). ### 2. Grant of Rights #### Copyright License Subject to the terms and conditions of this Agreement, You hereby grant to Us and to recipients of software distributed by Us a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Work, and to permit persons to whom the Work is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Work. #### Patent License Subject to the terms and conditions of this Agreement, You hereby grant to Us and to recipients of software distributed by Us a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work. ### 3. Representations You represent that: 1. You are legally entitled to grant the above license. 2. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you have received permission to make Contributions on behalf of that employer, or your employer has waived such rights for your Contributions to Us. 3. Each of Your Contributions is Your original creation. 4. Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions. ### 4. You are not expected to provide support You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. --- **By commenting "I have read the CLA Document and I hereby sign the CLA" on a Pull Request, you are agreeing to the terms of this Contributor License Agreement.** ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # HAXTheWeb Code of Conduct ## Our pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project as awesome as we possibly can. It is the policy of HAXTheWeb to maintain an environment free of harassment and free of discrimination against any person because of age, race, color, ancestry, national origin, religion, creed, service in the uniformed services (as defined in state and federal law), veteran status, sex, sexual orientation, marital or family status, pregnancy, pregnancy-related conditions, physical or mental disability, gender, perceived gender, gender identity, genetic information or political ideas. Discriminatory conduct and harassment, as well as sexual misconduct and harassment or relationship violence, violates the dignity of individuals, impedes the realization of HAXTheWeb’s mission, and will not be tolerated in our community. ## Our standards How you will keep our community awesome: * Showing empathy to everyone * Being respectful of differing viewpoints and experiences * Accepting constructive criticism * Acting in the best interests of the community Behaviors our community will not tolerate: * Harassment - public or private * Unwelcome sexual attention or advances * Trolling - derogatory interactions and personal or political attacks * Doxing - publishing others' private information without permission * Any conduct reasonably considered inappropriate in professional settings ## Our responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right to remove or modify comments, commits, code, documentation, issues, and other contributions that are not aligned to this Code of Conduct. ## Scope This Code of Conduct applies both within project spaces and in spaces where an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an official representative at an event. Representation of a project may be further defined and clarified by project maintainers. The HAXcms Code of Conduct applies to anyone involved in the project, including project maintainers. ## Enforcement Instances of behavior which violates the HAXcms Code of Conduct may be reported by contacting project leadership at hax@psu.edu. The project leadership will review and investigate all complaints, and will respond in a way that it deems appropriate. The project leadership is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. The HAXcms Code of Conduct was originally produced in the United States of America and operates based on US legal norms which presumes innocence until guilt is proven. ## CoC attribution The HAXcms Code of Conduct has been forked from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4 ================================================ FILE: COMPONENT-GALLERY.md ================================================ # HAX Web Components Gallery A simple, fast, and reliable component gallery system that replaces Storybook for showcasing your web components. Built using your existing demo pages and styled with the DDD design system. ## Features - 🔍 **Search functionality** - Find components quickly by name or description - 📱 **Responsive design** - Works great on all devices - 🎨 **DDD Design System** - Uses your own design tokens for consistent styling - ⚡ **Fast and reliable** - No complex build processes or breaking dependencies - 🔗 **Links to existing demos** - Leverages all your existing demo pages - 📊 **Categorized view** - Components grouped by prefix for better organization ## Usage ### Development ```bash # Generate and serve the gallery locally yarn gallery # Just generate the gallery file yarn build-gallery ``` ### Production The gallery is automatically built during your main build process: ```bash yarn build # This now includes yarn build-gallery ``` ## How it Works The gallery system: 1. **Scans** your `elements/` directory for components with `demo/index.html` files 2. **Reads** each component's `package.json` for metadata 3. **Groups** components by their prefix (e.g., `a11y-`, `hax-`, etc.) 4. **Generates** a single HTML file with embedded CSS and JavaScript 5. **Serves** the gallery with a simple HTTP server ## Design System Integration The gallery uses your DDD design system variables: - **Typography**: `--ddd-font-primary`, `--ddd-font-secondary`, `--ddd-font-navigation` - **Spacing**: `--ddd-spacing-*` variables for consistent margins and padding - **Colors**: Penn State brand colors from the DDD theme - **Shadows & Borders**: `--ddd-boxShadow-*` and `--ddd-border-*` variables ## File Structure ``` webcomponents/ ├── scripts/ │ └── build-component-gallery.js # Gallery generator script ├── component-gallery.html # Generated gallery (gitignored) └── elements/ └── [component-name]/ ├── package.json # Component metadata └── demo/ ├── index.html # Main demo (required) └── [other].html # Additional demos (optional) ``` ## Customization ### Adding Component Categories Components are automatically categorized by their prefix (the part before the first `-`). For example: - `a11y-carousel` → **A11Y Components** - `hax-tray` → **HAX Components** - `simple-icon` → **SIMPLE Components** ### Styling The gallery inherits styling from your DDD design system. To customize: 1. Modify the CSS variables in your DDD theme 2. Edit `scripts/build-component-gallery.js` for structural changes 3. Regenerate with `yarn build-gallery` ## Migration from Storybook ### What Changed - `yarn storybook` → `yarn gallery` - `yarn build-storybook` → `yarn build-gallery` - No more complex webpack configuration - No more breaking Storybook dependencies - Uses your existing demo pages instead of stories ### Benefits - ✅ **Reliable**: No more build failures - ✅ **Fast**: Instant startup, no complex bundling - ✅ **Simple**: Single HTML file output - ✅ **Consistent**: Uses your actual design system - ✅ **Maintainable**: Leverages existing demo infrastructure ## Deployment The generated `component-gallery.html` file is completely self-contained and can be: - Served statically from any web server - Deployed to GitHub Pages, Netlify, Vercel, etc. - Opened directly in a browser - Embedded in documentation sites ## Troubleshooting ### No components found - Ensure components have a `demo/index.html` file - Check that `package.json` files are valid JSON - Verify you're running from the repository root ### Gallery not loading properly - Check that the DDD design system is properly imported - Ensure all demo links are relative paths - Verify `d-d-d.js` is accessible from the gallery location ### Search not working - JavaScript must be enabled - Check browser console for errors - Ensure component data is properly embedded in the HTML ## Contributing To improve the gallery system: 1. Edit `scripts/build-component-gallery.js` 2. Test with `yarn build-gallery` 3. Submit a PR with your changes The gallery system is designed to be simple and maintainable - keep that philosophy when making changes! ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing - [Contributing](#contributing) - [What is HAX and this Project?](#what-is-hax-and-this-project) - [Getting Started](#getting-started) - [Prerequisites](#prerequisites) - [Install: w/ Dev Containers](#install-w-dev-containers) - [Install: w/ Bash script (supporting Git Bash/WSL/macOS/Linux)](#install-w-bash-script-supporting-git-bashwslmacoslinux) - [Windows Support](#windows-support) - [Manual Install](#manual-install) - [First-time Setup Verification](#first-time-setup-verification) - [Finding Issues to Work On](#finding-issues-to-work-on) - [Development Workflow](#development-workflow) - [Working on Web Components](#working-on-web-components) - [Code Standards](#code-standards) - [Common Issues](#common-issues) - [Communication](#communication) - [GitHub workflow](#github-workflow) - [Opening a Pull Request](#opening-a-pull-request) - [Code Review](#code-review) - [Best practices](#best-practices) - [Testing](#testing) - [Security](#security) HAX is open source, but many of the people working on it do so as their day job. In order to avoid forcing people to be "at work" effectively 24/7, we want to establish some semi-formal protocols around development. Hopefully, these rules make things go more smoothly. As a potential contributor, your changes and ideas are welcome at any hour of the day or night, weekdays, weekends, and holidays. Please do not ever hesitate to ask a question or send a pull request. ## What is HAX and this Project? HAX is an authoring experience that enables rapid creation of fast, static websites. This webcomponents monorepo contains reusable web components built with [Lit](https://lit.dev/) that power the HAX ecosystem. These components work standalone or as part of the broader HAX authoring platform. **Key Technologies:** - **Lit** - Modern web components library - **Lerna** - Monorepo management - **Yarn** - Package management - **Node.js** - Runtime environment - **Web Components** - Standards-based component architecture This project contains 200+ web components in the `elements/` directory, each designed to be lightweight, accessible, and framework-agnostic. ## Getting Started ### Prerequisites Before setting up your development environment, ensure you have: - **Git** or **GitHub Desktop** for version control - A **GitHub account** for submitting contributions ### Install: w/ Dev Containers Our project follows the [Dev Container specification](https://containers.dev/implementors/spec/) to provide a consistent, UX-focused experience across operating systems. The container isolation ensures that users on Windows, macOS, and Linux can all develop with the same curated environment. If you're interested in **Dev Containers** (but want a more personalized setup), follow along these general steps: 1. Install [Docker](https://docs.docker.com/get-started/get-docker/) (or another container runtime) * **Dev Containers** are broadly supported across OCI-compliant runtimes like Docker, [Podman](https://podman.io/docs/installation), and [OrbStack](https://docs.orbstack.dev/quick-start). 2. Install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for **VS Code** * Open **VS Code**, then select **Install Recommended Extensions** * Accepting the alert will automatically download this with other helpful extensions 3. Afterwards, another alert will pop up in the **bottom right** corner of **VS Code** * Select **Reopen in Container** Wait a few minutes for your **Dev Container** to be built, then you're ready to go! Otherwise, please check out the [Quick install](README.md#getting-started) section in our README. This is a full, step-by-step walkthrough of a **Dev Container** installation (using simple applications and sane defaults)! ### Install: w/ Bash script (supporting Git Bash/WSL/macOS/Linux) ```bash curl -fsSL https://raw.githubusercontent.com/haxtheweb/webcomponents/master/scripts/haxthewebme.sh -o haxthewebme.sh && sh haxthewebme.sh ``` ### Windows Support [Docker](https://docs.docker.com/desktop/setup/install/windows-install/), [Git Bash](https://git-scm.com/install/windows), or [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install) are recommended for the best cross-compatibility with HAX's developer tooling. We also support **PowerShell** for Windows contributors, although certain utilities may experience instability. #### Windows Developer Mode The monorepo uses symlinks in many parts of its local environment. This allows us to emulate the functionality of a live HAXsite without running the full system. On Windows, symlinks normally require running the shell as *Administrator*. Enable **Developer Mode** to remove this *Administrator* requirement for common development tasks. Start by opening your **Windows Settings**: * On Windows 10: Update and Security -> For developers -> Developer Mode * On Windows 11: System -> Advanced -> For developers -> Developer Mode #### Install: w/ PowerShell script (Windows) ```powershell irm https://raw.githubusercontent.com/haxtheweb/webcomponents/master/scripts/haxthewebme.ps1 | iex ``` ### Manual Install *Notice: You will need to use [Node](https://nodejs.org/en/) version 6.0 or higher. Verify that you have yarn enabled — if not [install yarn globally](https://yarnpkg.com/lang/en/docs/install/). These web components are written in [ES6](https://tc39.es/ecma262/) and build routines compile to es5 to encompass legacy browsers.* 1. **Install Node.js** Visit [nodejs.org](https://nodejs.org/), then install **Node.js version 22.0** or higher * We recommend **fnm** as a cross-platform Node.js manager 2. **Fork and Clone the Repository** ```bash # Fork the repo on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/webcomponents.git cd webcomponents # Add upstream remote for syncing git remote add upstream https://github.com/haxtheweb/webcomponents.git ``` 3. **Install Dependencies** ```bash # Install HAX CLI and yarn globally npm install --global @haxtheweb/create yarn # Install web component analyzer yarn global add web-component-analyzer # Install project dependencies (this may take a few minutes) yarn install ``` 4. **Start the Development Server** ```bash # Start the main development server yarn start ``` This will start the development environment at `http://localhost:8000/elements/haxcms-elements/demo/` ### First-time Setup Verification Verify your setup is working: 1. **Check that the development server runs:** - Navigate to `http://localhost:8000/elements/haxcms-elements/demo/` in your browser - You should see the HAX development interface 2. **Test building components:** ```bash # Build all components (this may take several minutes first time) yarn run build ``` 3. **Browse component demos:** - Navigate to `http://localhost:8000/elements/` to see available components - Click into individual component directories to view their demos ## Finding Issues to Work On **New Contributors - Start Here:** 1. **Browse the unified issue queue:** https://github.com/haxtheweb/issues/issues - Look for issues labeled with `good first issue` or `help wanted` - Issues labeled `documentation` are often beginner-friendly 2. **Component-specific issues:** - Each component in `elements/` may have its own issues - Look for small bug fixes or feature enhancements 3. **Documentation improvements:** - Update component README files - Improve JSDoc comments - Enhance demo pages in component `demo/` directories 4. **Ask for guidance:** - Join our [Discord](https://bit.ly/hax-discord) and introduce yourself - Ask "What's a good first issue for someone new to the project?" **Before starting work:** - Comment on the issue saying you'd like to work on it - Wait for maintainer acknowledgment to avoid duplicate work - Ask questions if the requirements aren't clear ## Development Workflow ### Working on Web Components **To work on an existing component:** 1. **Navigate to the component:** ```bash cd elements/COMPONENT_NAME # e.g., cd elements/simple-button ``` 2. **Start component development:** ```bash yarn start # Starts dev server for this specific component ``` 3. **File structure:** ``` elements/component-name/ ├── lib/ # Supporting files and utilities ├── component-name.js # Main component source code ├── demo/ # Demo HTML files ├── test/ # Test files └── package.json # Component-specific dependencies ``` 4. **Making changes:** - Edit `component-name.js` for the main component logic - Update `demo/` files to test your changes - Modify files in `lib/` for supporting utilities - The dev server will auto-reload on changes **To create a new component:** ```bash # From the project root hax webcomponent my-new-element --y cd elements/my-new-element yarn start ``` ### Code Standards **JavaScript/Lit:** - Follow existing code style in the project - Use Lit's best practices for web components - Ensure components are accessible (ARIA attributes, keyboard navigation) - Components should work in all modern browsers **Formatting:** - Code is automatically formatted with Prettier on commit - CSS is formatted with Stylelint - Run `yarn run format` to format all files **Documentation:** - Add JSDoc comments to all public methods and properties - Update component README files - Create comprehensive demo pages showing component usage **Testing:** - Write unit tests for new functionality when possible - Ensure existing tests still pass: `yarn test` - Test in multiple browsers if making significant changes ### Lerna This monorepo has configuration settings for lerna. Lerna is for the core team, but to bulk run commands against the monorepo consider things like `npx lerna run build` to run build against all elements. This is useful when getting ready to ship. ## Common Issues New contributors often encounter these issues. Here are solutions to the most common problems: ### Setup and Installation Issues **"Port 8000 already in use" error:** ```bash # Find and kill processes using port 8000 kill -9 $(lsof -t -i:8000) # Or try a different port range PORT=8001 yarn start ``` **Yarn install fails or hangs:** ```bash # Clear cache and reinstall rm -rf node_modules yarn.lock yarn cache clean yarn install ``` **Permission errors on global installs:** ```bash # Configure npm to use a different directory npm config set prefix ~/.npm-global export PATH=~/.npm-global/bin:$PATH # Add the export line to your ~/.bashrc or ~/.zshrc ``` **Node version issues:** ```bash # Check your Node version node --version # If using nvm, switch to Node 22+ nvm install 22 nvm use 22 ``` ### Development Issues **Build errors after pulling latest changes:** ```bash # Update dependencies after pulling yarn install # If that doesn't work, clean and reinstall rm -rf node_modules yarn.lock yarn install yarn run build ``` **"Component not found" or import errors:** - Ensure you're in the correct component directory: `cd elements/component-name` - Check that the component name matches the directory name - Verify the main component file exists: `ls component-name.js` **Hot reload not working:** - Make sure you're editing the correct files (`component-name.js`, not files in `dist/` or `build/`) - Try restarting the dev server: `Ctrl+C` then `yarn start` - Clear browser cache or try an incognito window **Lerna-related errors:** ```bash # Bootstrap all packages npx lerna bootstrap # Or clean and rebuild everything npx lerna clean yarn install ``` ### Testing Issues **Tests failing locally:** ```bash # Run tests for a specific component cd elements/component-name yarn test # Run tests with browser open for debugging yarn test -- -p ``` **"Chromium not found" test errors:** ```bash # On Ubuntu/Debian sudo apt-get install chromium-browser # On macOS brew install chromium ``` ### Git and GitHub Issues **Fork is out of sync:** ```bash # Sync your fork with upstream git fetch upstream git checkout master git merge upstream/master git push origin master ``` **Accidentally committed to master instead of a branch:** ```bash # Create a new branch with your changes git branch feature-branch-name # Reset master to upstream git reset --hard upstream/master # Switch to your feature branch git checkout feature-branch-name ``` ### Performance Issues **Slow build times:** - Close unnecessary applications to free up memory - Build specific components instead of everything: `cd elements/component-name && yarn build` - Consider increasing Node's memory limit: `export NODE_OPTIONS="--max-old-space-size=4096"` ### Still Having Issues? 1. **Check if it's a known issue:** Search https://github.com/haxtheweb/issues/issues 2. **Ask on Discord:** Join https://bit.ly/hax-discord and describe your problem 3. **Include helpful details:** - Your operating system and version - Node.js version (`node --version`) - Yarn version (`yarn --version`) - Full error message (use code blocks in Discord/GitHub) - What you were trying to do when the error occurred ## Communication Reporting issues? Our unified issue queue is a good place for this: https://github.com/haxtheweb/issues/issues Need to discuss something via chat? Our [Discord can be joined here](https://bit.ly/hax-discord). ## GitHub workflow We work primarily using pull requests and forks. In order to work most effectively, we ask that you FORK any project you are wanting to contribute to in our ecosystem. After taking a fork, submit a pull request while pointing to the associated issue tied to this pull request. ## Opening a Pull Request Pull requests are often called a "PR". HAX generally follows the standard [github pull request](https://help.github.com/articles/about-pull-requests/) process. Common new contributor PR issues are: - Not referencing the issue that the PR resolves - Not describing the scope of the solution effectively - Include mentions (like @person) and [keywords](https://help.github.com/en/articles/closing-issues-using-keywords) which could close the issue (like fixes #xxxx) in commit messages. ## Code Review To make it easier for your PR to receive reviews, consider the reviewers will need you to: - Write [good commit messages](https://chris.beams.io/posts/git-commit/) - Break large changes into a logical series of smaller patches which individually make easily understandable changes, and in aggregate solve a broader issue When reviewing PRs from others [The Gentle Art of Patch Review](http://sage.thesharps.us/2014/09/01/the-gentle-art-of-patch-review/) suggests an iterative series of focuses which is designed to lead new contributors to positive collaboration without inundating them initially with nuances: - Is the idea behind the contribution sound? - Is the contribution architected correctly? - Is the contribution polished? Note: if your pull request isn't getting enough attention, you can use our [Discord channel](https://bit.ly/hax-discord) to get help finding reviewers. ## Best practices - Write clear and meaningful git commit messages. - If the PR will *completely* fix a specific issue, include `fixes #123` in the PR body (where 123 is the specific issue number the PR will fix. This will automatically close the issue when the PR is merged. - Make sure you don't include `@mentions` or `fixes` keywords in your git commit messages. These should be included in the PR body instead. - When you make a PR for small change (such as fixing a typo, style change, or grammar fix), please squash your commits so that we can maintain a cleaner git history. - Make sure you include a clear and detailed PR description explaining the reasons for the changes, and ensuring there is sufficient information for the reviewer to understand your PR. - Additional Readings: - [chris.beams.io/posts/git-commit/](https://chris.beams.io/posts/git-commit/) - [github.com/blog/1506-closing-issues-via-pull-requests ](https://github.com/blog/1506-closing-issues-via-pull-requests) - [davidwalsh.name/squash-commits-git ](https://davidwalsh.name/squash-commits-git) - [https://mtlynch.io/code-review-love/](https://mtlynch.io/code-review-love/) ## Testing Unit tests are ideal but not required to be written for proposed changes and enhancements. ## Security If you discover what you deem to be a critical security issue please reach out on our Discord channel privately to discuss whether this should be resolved in the open prior or if disclosure should happen after a solution has been crafted. ================================================ FILE: LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================ [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/haxtheweb/webcomponents/badge)](https://securityscorecards.dev/viewer/?uri=github.com/haxtheweb/webcomponents) [![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](/SUPPORT.md) [![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](/CODE_OF_CONDUCT.md) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/EKYJAjqGhf) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/) [![Lit](https://img.shields.io/badge/-Lit-324fff?style=flat&logo=data:image/svg%2bxml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMTYwIDIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMTYwIDgwdjgwbC00MC00MHptLTQwIDQwdjgwbDQwLTQwem0wLTgwdjgwbC00MC00MHptLTQwIDQwdjgwbDQwLTQwem0tNDAtNDB2ODBsNDAtNDB6bTQwLTQwdjgwbC00MC00MHptLTQwIDEyMHY4MGwtNDAtNDB6bS00MC00MHY4MGw0MC00MHoiLz48L3N2Zz4%3D)](https://lit.dev/) [![#HAXTheWeb](https://img.shields.io/badge/-HAXTheWeb-999999FF?style=flat&logo=data:image/svg%2bxml;base64,PHN2ZyBpZD0iZmVhMTExZTAtMjEwZC00Y2QwLWJhMWQtZGZmOTQyODc0Njg1IiBkYXRhLW5hbWU9IkxheWVyIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4NC40IDEzNS45NyI+PGRlZnM+PHN0eWxlPi5lMWJjMjAyNS0xODAwLTRkYzItODc4NS1jNDZlZDEwM2Y0OTJ7ZmlsbDojMjMxZjIwO308L3N0eWxlPjwvZGVmcz48cGF0aCBjbGFzcz0iZTFiYzIwMjUtMTgwMC00ZGMyLTg3ODUtYzQ2ZWQxMDNmNDkyIiBkPSJNNzguMDcsODMuNDVWNTVIODYuMnY4LjEzaDE2LjI2djQuMDdoNC4wN1Y4My40NUg5OC40VjY3LjE5SDg2LjJWODMuNDVaIi8+PHBvbHlnb24gcG9pbnRzPSIxNTMuMTMgNjMuNyAxNTMuMTMgNTEuMzkgMTQwLjU0IDUxLjM5IDE0MC41NCAzOS4wOSAxMjcuOTUgMzkuMDkgMTI3Ljk1IDI2Ljc5IDEwMi43OCAyNi43OSAxMDIuNzggMzkuMDkgMTE1LjM2IDM5LjA5IDExNS4zNiA1MS4zOSAxMjcuOTUgNTEuMzkgMTI3Ljk1IDYzLjcgMTQwLjU0IDYzLjcgMTQwLjU0IDc2IDEyNy4zNiA3NiAxMjcuMzYgODguMyAxMTQuNzggODguMyAxMTQuNzggMTAwLjYxIDEwMi4xOSAxMDAuNjEgMTAyLjE5IDExMi45MSAxMjcuMzYgMTEyLjkxIDEyNy4zNiAxMDAuNjEgMTM5Ljk1IDEwMC42MSAxMzkuOTUgODguMyAxNTIuNTQgODguMyAxNTIuNTQgNzYgMTY1LjcyIDc2IDE2NS43MiA2My43IDE1My4xMyA2My43Ii8+PHBvbHlnb24gcG9pbnRzPSIzMy4xMyA2My43IDMzLjEzIDUxLjM5IDQ1LjcyIDUxLjM5IDQ1LjcyIDM5LjA5IDU4LjMxIDM5LjA5IDU4LjMxIDI2Ljc5IDgzLjQ4IDI2Ljc5IDgzLjQ4IDM5LjA5IDcwLjg5IDM5LjA5IDcwLjg5IDUxLjM5IDU4LjMxIDUxLjM5IDU4LjMxIDYzLjcgNDUuNzIgNjMuNyA0NS43MiA3NiA1OC44OSA3NiA1OC44OSA4OC4zIDcxLjQ4IDg4LjMgNzEuNDggMTAwLjYxIDg0LjA3IDEwMC42MSA4NC4wNyAxMTIuOTEgNTguODkgMTEyLjkxIDU4Ljg5IDEwMC42MSA0Ni4zMSAxMDAuNjEgNDYuMzEgODguMyAzMy43MiA4OC4zIDMzLjcyIDc2IDIwLjU0IDc2IDIwLjU0IDYzLjcgMzMuMTMgNjMuNyIvPjwvc3ZnPg==)](https://haxtheweb.org/) [![Published on npm](https://img.shields.io/npm/v/@haxtheweb/h-a-x?style=flat)](https://www.npmjs.com/search?q=@haxtheweb) [![build](https://github.com/haxtheweb/webcomponents/workflows/build/badge.svg?branch=master)](https://github.com/haxtheweb/webcomponents/actions?query=branch%3Amaster) [![X](https://img.shields.io/twitter/follow/haxtheweb.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=haxtheweb) # Welcome to the HaxTheWeb project! Web components that can work in just about anything, are very small (Vanila or Lit based) and have full on authoring solutions if you dig deeper; Enjoy! ## Getting Started ### Quick install: Dev Containers (as a core dev, forks preferrable) HAXTheWeb is dedicated to making contribution an accessible and simple experience. Follow the step-by-step guide below to explore our curated development environment: ### Prerequisites * On **Windows**: Update **WSL 2** * There are two methods available: * Open **WSL 2** in the [Microsoft Store](https://aka.ms/wslstorepage), select **Install/Update** * Open **PowerShell**, run the command: `wsl --update` * Why: Certain Windows editions are bundled with an outdated **WSL 2** version. * On macOS or Linux: None --- ### Guide 1. Install **Docker Desktop** * [Windows](https://docs.docker.com/desktop/setup/install/windows-install/) * Select the **WSL 2 Backend** option * **Restart** after installing * [macOS](https://docs.docker.com/desktop/setup/install/mac-install/) * [Linux](https://docs.docker.com/desktop/setup/install/linux/) * **Docker Desktop** must remain open for **VS Code** to connect with it. 2. Install [GitHub Desktop](https://desktop.github.com/download/) (optional) 3. Clone the repository with **Git** * Using **GitHub Desktop**: select **Clone Repository**, then select the **URL** option. * Enter the link to your repository: `https://github.com/haxtheweb/webcomponents` 4. Open the repository in **VS Code** * Using **GitHub Desktop**: simply select **Open in VS Code** 5. Some alerts with pop up in the **bottom right** corner of **VS Code**: * Select **Install Recommended Extensions** * Select **Reopen in Container** Wait a few minutes for your **Dev Container** to be built, then you're ready to go! Try the following command to open a demo HAXsite: ```bash yarn run haxsite ``` ### Alternative installs If you're interested in other installation methods, visit our [Contributing Docs](CONTRIBUTING.md#getting-started)! We provide native Bash and PowerShell scripts, in addition to manual instructions. ----------------------------------------------- ## What is HAX The authoring experience of HAX and the ability to make fast, static file backed websites rapidly. Get all the details you want on [HAX docs](https://haxtheweb.org/)! HAX seeks to be the smallest possible back-end CMS to make HAX work and be able to build websites with it. Leveraging JSON Outline Schema, HAX is able to author multiple pages, which it then writes onto the file system. This way a slim server layer is just for basic authentication, knowing how to save files, and placing them in version control. Watch and Learn more about HAX here: - Try Hax: https://hax.cloud - HAXCellence https://haxtheweb.org/what-is-hax - Youtube channel - https://www.youtube.com/@haxtheweb ### Issues / Support / Community - Discord Channel - https://bit.ly/hax-discord - Unified issue queue - https://github.com/haxtheweb/issues/issues - Using Merlin directly in any HAX spaces and type "Issue" to jump start a report! ### Related links and tech - [HAXcms (NodeJS)](https://github.com/haxtheweb/haxcms-nodejs) - [HAXcms (PHP)](https://github.com/haxtheweb/haxcms-php) - [Storybook docs](https://open-apis.hax.cloud/) - [HAX [dot] PSU](https://hax.psu.edu) - [HAX doc site](https://haxtheweb.org/) - [HAX + 11ty](https://github.com/haxtheweb/hax11ty) ## To work on any element in our repo ```bash cd elements/ELEMENTNAME yarn start ``` Edit files in `lib/`, `src/`, `locales/` and `demo/` in order to modify the element to contribute back to us via PR. ## Scripts - `hax webcomponent my-element --y` - Run HAX CLI to create a new web component - `yarn test` - Run tests on ALL webcomponents. - `yarn run build` - Run build on ALL webcomponents. - `yarn run gallery` - Run component gallery (replaces storybook) - `yarn run build-gallery` - Build component gallery for deployment ## Web Component development Because this is a monorepo, each web component will need to be independently built in order to actively work on and preview the changes. Every web component has its own Gulp file and Yarn/NPM script. While still running `yarn start` in one terminal window (which runs the local server), you will need to open another terminal window, drill into the directory of the web component you'd like to work on, and execute the `yarn run dev` command. This command will use gulp tasks to watch the files within that web component directory and will automatically re-run the build command and refresh the browser when you make changes to the web component. ### Working on elements (new-element) Run `hax webcomponent` to make a new element. Go to the new element following the directions generated at the end of the element's creation. To work on the new-element run `yarn start` from it's directory. If you are pulling in another element to use, run `yarn add projectname --save` or edit the `package.json` file local to the element you are working on. **ALWAYS INSTALL FROM THE REPO ROOT, NOT THE ELEMENT YOU ARE WORKING ON** ### Example development on a web component ```bash cd /Sites/webcomponents yarn start # SHIFT + CTRL + T to open a new tab in Terminal cd elements your-card # or any other web component yarn run dev ``` Make a change to the web component and save. The gulpfile will handle transpiling the element down to ES5 and will bring in the HTML and Sass into the template in the web component. ## Test To test all webcomponents, run `yarn test` from the root of the repo. If you only want to test the web component you're working on: ```bash cd elements/your-card yarn test ``` Also, if your tests are failing and you want access to a live browser to investigate why, the following flag will keep the browser open. ```bash yarn test -- -p ``` Then open the URL that will be printed in the terminal. It looks something like this: `http://localhost:8081/components/@@haxtheweb/haxtheweb/generated-index.html?cli_browser_id=0`. ## Component Gallery We've replaced [Storybook](https://storybook.js.org/) with our own **Component Gallery** to preview and document our web components. The Component Gallery provides a better integrated experience with HAX design system and build tools. To run the component gallery locally ```bash yarn run gallery ``` This will build the gallery and start a web server. Navigate to the URL shown in the terminal to see the Component Gallery in action. The gallery will automatically rebuild when components change. To build the component gallery for deployment ```bash yarn run build-gallery ``` This generates the component gallery as a single HTML file: `component-gallery.html`. ### Component Gallery Features - **HAX Integration**: Built-in support for HAX-enabled components - **DDD Design System**: Uses our Design, Develop, Destroy design tokens - **Live Demos**: Interactive component demonstrations - **CodePen Export**: Direct export to CodePen for experimentation - **Search & Filter**: Easy component discovery - **Mobile Responsive**: Works on all device sizes ## Tech Stack **Client:** JavaScript, LitElement, Lit(https://lit.dev/) **Server:** Node.js ## Contributing Contributions are always welcome! ## Active contributors - [@btopro](https://www.github.com/btopro) ## Additional contributions Past contributors, student and larger community, can be found here: https://github.com/haxtheweb/webcomponents/graphs/contributors ![HAX Traveler: World Changer](https://raw.githubusercontent.com/haxtheweb/art/refs/heads/main/haxtheweb/hax-traveler-world-changer.jpg) ================================================ FILE: SECURITY.md ================================================ # Security Policy ## Supported Versions We often run master on production systems or slightly behind master. Tagged releases of all web components in this repo are published to npm and managed via lerna. If we get a security issue in a specific version, we are going to fix it in a newer release of the web component and you should update to the latest stable at that time. ## Reporting a Vulnerability Security related issues should be filed in our general issue queue https://github.com/haxtheweb/issues/issues ================================================ FILE: SUPPORT.md ================================================ # Support ## Getting Help If you need help with this project, please use the following resources: ### Community Support - **Discord**: Join our community Discord server for real-time help and discussion: [HAXTheWeb Discord](https://discord.gg/EKYJAjqGhf) - **Documentation**: Visit our comprehensive documentation: [HAXTheWeb Docs](https://haxtheweb.org/documentation) - **Issues**: For bug reports and feature requests, please use our unified issue queue: [HAXTheWeb Issues](https://github.com/haxtheweb/issues/issues) ### Getting Started - Check out our [documentation](https://haxtheweb.org/documentation) for guides and tutorials - Explore and play with HAX components: [HAX Magic Script Playground](https://hax.cloud/magicscript.html) - Join the discussion on [Discord](https://discord.gg/EKYJAjqGhf) to connect with other developers ### Before Opening an Issue Before creating a new issue, please: 1. Search existing issues in our [unified issue queue](https://github.com/haxtheweb/issues/issues) 2. Check our [documentation](https://haxtheweb.org/documentation) 3. Ask for help on [Discord](https://discord.gg/EKYJAjqGhf) This helps keep our issue queue focused on actual bugs and feature requests. ## Contributing We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to get involved. ================================================ FILE: VERSION.txt ================================================ 25.0.0 ================================================ FILE: _optional_dev_patches/@web+dev-server-core+0.7.2.patch ================================================ diff --git a/node_modules/@web/dev-server-core/dist/middleware/serveFilesMiddleware.js b/node_modules/@web/dev-server-core/dist/middleware/serveFilesMiddleware.js index 36c6de2..fab0a7c 100644 --- a/node_modules/@web/dev-server-core/dist/middleware/serveFilesMiddleware.js +++ b/node_modules/@web/dev-server-core/dist/middleware/serveFilesMiddleware.js @@ -17,7 +17,9 @@ function serveFilesMiddleware(rootDir) { brotli: false, gzip: false, setHeaders(res) { - res.setHeader('cache-control', 'no-cache'); + res.setHeader('Cross-Origin-Opener-Policy', 'same-origin'); + res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp'); + res.setHeader('cache-control', 'no-cache'); }, }; // the wds-root-dir parameter indicates using a different root directory as a path relative ================================================ FILE: api/hydrateSsr.js ================================================ import { stdResponse, invalidRequest, stdPostBody } from "../utilities/requestHelpers.js"; //import { render } from '@lit-labs/ssr'; import { render } from '@lit-labs/ssr/lib/render-with-global-dom-shim.js'; import {collectResult} from '@lit-labs/ssr/lib/render-result.js'; import { html } from 'lit'; import { unsafeHTML } from "lit/directives/unsafe-html.js"; // node parser import { parse } from 'node-html-parser'; import wcRegistry from "../wc-registry.json" assert { type: 'json' }; export default async function handler(req, res) { // destructing GET params after ? available in this object // use this if POST data is what's being sent let body = {}; let q = null; if (req.query.q) { body = req.query; } else { body = stdPostBody(req); } // fallback support for post if (body && body.q) { q = body.q; } if (body && body.type == "link") { q = await fetch(q).then((d) => d.ok ? d.text() : ''); } // need to know what we're searching for otherwise bail if (q) { let pastImports = {}; const doc = parse(q); // can select all the dt's for term // then all the dd's for definition // array lengths should match if valid HTML // also ensure we have any results at all if (doc.querySelectorAll('*').length > 0) { const allEls = doc.querySelectorAll('*'); for (var i=0; i < allEls.length; i++) { // see if it's in the registry if (wcRegistry[allEls[i].tagName.toLowerCase()] && !pastImports[wcRegistry[allEls[i].tagName.toLowerCase()]]) { pastImports[wcRegistry[allEls[i].tagName.toLowerCase()]] = true; try { await import(wcRegistry[allEls[i].tagName.toLowerCase()]); } catch(e) { console.log(`failed to load: ${wcRegistry[allEls[i].tagName.toLowerCase()]}`); console.log(e); } } } } const myServerTemplate = html`
${unsafeHTML(q)}
`; const ssrResult = render(myServerTemplate); const content = await collectResult(ssrResult); // Awaits promises res = stdResponse(res, content, {cache: 86400,type : 'text/html' }); } else { // invalidate the response and provide a reason // this optionally takes in a status code otherwise default is 400 // vercel will through a 500 if there was any bricking issue so we don't // need to throw that most likely res = invalidRequest(res, 'missing `q` param'); } } ================================================ FILE: api/package.json ================================================ { "type": "module", "name": "vercel-api-webcomponents", "scripts": { "postinstall": "./node_modules/.bin/patch-package" }, "dependencies": { "patch-package": "^8.0.0", "lit-html": "3.3.2", "@lit-labs/ssr": "^3.3.1", "lit": "3.3.2", "node-html-parser": "^6.1.13", "@haxtheweb/course-design": "^25.0.0", "@haxtheweb/lrn-math": "^25.0.0", "@haxtheweb/media-image": "^25.0.0", "@haxtheweb/video-player": "^25.0.0" } } ================================================ FILE: api/patches/@lit-labs+ssr+3.2.2.patch ================================================ diff --git a/node_modules/@lit-labs/ssr/lib/render-result.js b/node_modules/@lit-labs/ssr/lib/render-result.js index 25c9490..c8fac1a 100644 --- a/node_modules/@lit-labs/ssr/lib/render-result.js +++ b/node_modules/@lit-labs/ssr/lib/render-result.js @@ -8,9 +8,12 @@ */ export const collectResult = async (result) => { let value = ''; - for (const chunk of result) { + if (result) { + for (const chunk of result) { + //console.log(chunk); value += - typeof chunk === 'string' ? chunk : await collectResult(await chunk); + typeof chunk === 'string' ? chunk : await collectResult(await chunk); + } } return value; }; ================================================ FILE: automate-theme-screenshots.js ================================================ #!/usr/bin/env node /** * Complete HAX Theme Screenshot Automation Workflow * * This script provides the complete automation workflow for generating * screenshots of all HAX themes and updating the registry. * * Usage: This is the automation guide for MCP puppeteer tools */ import { readFileSync, writeFileSync } from 'fs'; import { join, dirname } from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const THEMES_JSON_PATH = join(__dirname, 'elements/haxcms-elements/lib/themes.json'); const SCREENSHOTS_DIR = join(dirname(THEMES_JSON_PATH), 'theme-screenshots'); // Load themes const themes = JSON.parse(readFileSync(THEMES_JSON_PATH, 'utf8')); const themeList = Object.entries(themes); console.log('\n=== HAX Theme Screenshot Automation Workflow ===\n'); /** * STEP 1: Verify Setup */ console.log('✓ Themes loaded:', themeList.length); console.log('✓ Screenshots directory:', SCREENSHOTS_DIR); console.log('✓ Updated themes.json with paths'); /** * STEP 2: Automation Commands * These are the MCP puppeteer commands to run: */ console.log('\n=== PUPPETEER AUTOMATION COMMANDS ===\n'); console.log('1. Navigate to demo site:'); console.log(` puppeteer_navigate({"allowDangerous":true, "launchOptions":{"args":["--no-sandbox", "--disable-setuid-sandbox"], "headless":true}, "url":"http://localhost:8080"})`); console.log('\n2. Wait for HAXCMS to load (run this first):'); console.log(` puppeteer_evaluate({"script":"new Promise(resolve => { const wait = () => { if (globalThis.HAXCMS && globalThis.HAXCMS.setTheme) { console.log('HAXCMS ready!'); const currentTheme = globalThis.HAXCMS.instance && globalThis.HAXCMS.instance.store && globalThis.HAXCMS.instance.store.manifest && globalThis.HAXCMS.instance.store.manifest.metadata && globalThis.HAXCMS.instance.store.manifest.metadata.theme && globalThis.HAXCMS.instance.store.manifest.metadata.theme.element; resolve({ready: true, currentTheme: currentTheme}); } else { console.log('Still waiting...'); setTimeout(wait, 2000); } }; wait(); })"})`); console.log('\n3. Theme switching and screenshot commands:'); console.log(' For each theme, run these 3 commands in sequence:\n'); // Generate commands for first 5 themes as examples const exampleThemes = themeList.slice(0, 5); exampleThemes.forEach(([themeKey, themeData], index) => { console.log(`--- Theme ${index + 1}: ${themeData.name} (${themeData.element}) ---`); console.log(`a) Switch theme:`); console.log(` puppeteer_evaluate({"script":"globalThis.HAXCMS.setTheme('${themeData.element}'); 'Theme switched to ${themeData.element}'"})`); console.log(`b) Wait for theme to load (3 seconds):`); console.log(` puppeteer_evaluate({"script":"new Promise(resolve => setTimeout(() => resolve('Theme loaded'), 3000))"})`); console.log(`c) Take screenshot:`); console.log(` puppeteer_screenshot({"height":800, "width":1280, "name":"${themeData.element}"})`); console.log(''); }); console.log(`... repeat for all ${themeList.length} themes\n`); /** * STEP 3: Popular themes for quick demo */ const popularThemes = [ 'polaris-flex-sidebar', 'polaris-flex-theme', 'clean-one', 'journey-theme', 'learn-two-theme', 'spacebook-theme', 'bootstrap-theme' ].filter(themeName => themes[themeName]); console.log('=== QUICK DEMO: Popular Themes ===\n'); console.log(`Popular themes to screenshot first (${popularThemes.length} themes):\n`); popularThemes.forEach((themeKey, index) => { const themeData = themes[themeKey]; console.log(`${index + 1}. ${themeData.name}`); console.log(` Element: ${themeData.element}`); console.log(` Switch: globalThis.HAXCMS.setTheme('${themeData.element}')`); console.log(` Screenshot: ${themeData.element}.jpg`); console.log(''); }); /** * STEP 4: File Saving */ console.log('\n=== FILE SAVING INSTRUCTIONS ===\n'); console.log('When saving screenshot files:'); console.log('1. Save each screenshot as: {theme-element-name}.jpg'); console.log(`2. Save to directory: ${SCREENSHOTS_DIR}`); console.log('3. The themes.json is already updated with correct paths'); console.log('4. Screenshots will be relative to themes.json location'); console.log('\n=== VERIFICATION ===\n'); console.log('After screenshots are taken, verify:'); console.log('1. Check screenshot files exist in theme-screenshots/'); console.log('2. Themes.json has correct paths'); console.log('3. V2 app-hax can load themes.json and display screenshots'); /** * Export automation data for programmatic use */ export const automationWorkflow = { totalThemes: themeList.length, popularThemes: popularThemes, screenshotsDir: SCREENSHOTS_DIR, // Generate command for specific theme generateCommands: (themeElement) => { const theme = Object.values(themes).find(t => t.element === themeElement); if (!theme) return null; return { switchTheme: `globalThis.HAXCMSContext="nodejs";globalThis.HAXCMS.setTheme('${theme.element}')`, wait: `new Promise(resolve => setTimeout(() => resolve('Theme loaded'), 2000))`, screenshot: { name: theme.element, width: 1280, height: 800 } }; }, // All themes list allThemes: themeList.map(([key, data]) => ({ key, element: data.element, name: data.name, screenshotPath: `theme-screenshots/${data.element}.jpg` })) }; console.log('\n=== READY FOR AUTOMATION ==='); console.log('Run the puppeteer commands above to generate all theme screenshots!'); console.log('The complete theme registry will be ready for v2 app-hax use-cases.'); ================================================ FILE: build-haxcms.js ================================================ // overload how define works so that we can prevent bricking issues // when classes get loaded from multiple sources with the same name space // this is a copy of the dedup-fix.js script we use in local testing / es5 routines const _customElementsDefine = globalThis.customElements.define; globalThis.customElements.define = (name, cl, conf) => { if (!globalThis.customElements.get(name)) { _customElementsDefine.call(globalThis.customElements, name, cl, conf); } else { console.warn(`${name} has been defined twice`); } }; // HAXcms specific clean up and platforn integration // this ties in custom theme files as well as removes DOM nodes related // to serving a legacy audience in the event this is evergreen (most times) if (/^h/.test(document.location)) { try { var scriptDef = document.getElementsByTagName('script')[0]; // if a dynamic import fails, we bail over to the compiled version new Function('import("");'); // remove fallback cause if we passed dynamic import then we are evergreen if (document.getElementById("haxcmsoutdatedfallback")) { document.body.removeChild(document.getElementById("haxcmsoutdatedfallback")); } if (!window.__appCustomEnv) { var build2 = document.createElement('script'); build2.src = './custom/build/custom.es6.js'; build2.type = 'module'; scriptDef.parentNode.insertBefore(build2, scriptDef); } } catch (err) { var ancient=false; try { if (typeof Symbol == "undefined") { // IE 11, at least try to serve a watered down site ancient = true; } new Function('let a;'); // bizarre but needed for Safari 9 bc of when it was made } catch (err) { ancient = true; } if (!ancient) { // remove fallback cause if we passed dynamic import then we are evergreen if (document.getElementById("haxcmsoutdatedfallback")) { document.body.removeChild(document.getElementById("haxcmsoutdatedfallback")); } } else { // we bombed somewhere above, this implies that it's some odd between version // most likely Safari 9ish, IE pre 11 and anything uber old. Serve no JS variation if (document.getElementById('site')) { document.getElementById('site').style.display = 'none'; document.getElementById('haxcmsoutdatedfallbacksuperold').style.display = 'block'; } } } } else { // this implies we are offline, viewing the files locally // so let's show the simplistic site viewer / iframe theme if (document.getElementById('site')) { document.getElementById('site').style.display = 'none'; document.getElementById('haxcmsoutdatedfallbacksuperold').style.display = 'block'; } } var cdn = "./"; if (window.__appCDN) { cdn = window.__appCDN; } // reset styles that we apply to all hax sites for some level of normalization // across base HTML tags as well as css vars for styling system wide things from 1 place var baseResetStyles = 'build/es6/node_modules/@haxtheweb/haxcms-elements/lib/base.css'; // css files load faster when implemented this way var link = document.createElement('link'); link.rel = 'stylesheet'; link.href = cdn + baseResetStyles; link.type = 'text/css'; link.onerror = (e) => { haxcmsFallbackStylesError(e);}; // get first link in the document var linkDef = document.getElementsByTagName('link')[0]; linkDef.parentNode.insertBefore(link, linkDef); if (!window.__appCustomEnv) { var link2 = document.createElement('link'); link2.rel = 'stylesheet'; link2.href = './theme/theme.css'; link2.type = 'text/css'; linkDef.parentNode.insertBefore(link2, linkDef); } // if we fail to load the module, we need to fall back to known sources // and reattempt to inject the CDN location. This is a last ditch effort // though opens the ability for us to download user sites and if plugged // into other hax housing then it'll work but also just work stand alone // as a downloaded package var haxCdn = cdn; function haxcmsFallbackStylesError(e) { var cdn = haxCdn; if (!window.__appCDNBlockFallback) { var link = document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.onerror = (e) => { haxcmsFallbackStylesError(e);}; // if the module fails to load at the set CDN location, try to fail back to known sources if (cdn === "./") { // hax cloud fallback haxCdn = "https://cdn.hax.cloud/cdn/"; link.href = haxCdn + baseResetStyles; linkDef.parentNode.insertBefore(link, linkDef); console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn); } else if (cdn === "https://cdn.hax.cloud/cdn/") { // psu mirror haxCdn = "https://cdn.webcomponents.psu.edu/cdn/"; link.href = haxCdn + baseResetStyles; linkDef.parentNode.insertBefore(link, linkDef); console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn); } else if (cdn === "https://cdn.webcomponents.psu.edu/cdn/") { // known mirror haxCdn = "https://cdn.waxam.io/"; link.href = haxCdn + baseResetStyles; linkDef.parentNode.insertBefore(link, linkDef); console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn); } else { // :( we're out of options, just reset these values to default // but we aren't working in this scenario bc both CDNs failed // and local delivery could not be found haxCdn = "./"; console.error("Styles Local delivery failed and all alternative CDNs failed to load. You might be offline, in a secure environment or doing testing intentionally to generate this *shrug*"); } } } ================================================ FILE: build.js ================================================ window.process={env:{NODE_ENV:"production"}};var cdn="./";window.WCGlobalCDNPath&&(cdn=window.WCGlobalCDNPath),window.__appCDN&&(cdn=window.__appCDN);var fname="wc-registry.json";window.WCGlobalRegistryFileName&&(fname=window.WCGlobalRegistryFileName),window.WCAutoloadRegistryFile=cdn+fname;var autoloaderScriptLocation="build/es6/node_modules/@haxtheweb/wc-autoload/wc-autoload.js";try{var def=document.getElementsByTagName("script")[0];new Function("import('');"),animationPolyfillTest();var build=document.createElement("script");build.src=cdn+autoloaderScriptLocation,build.type="module",build.onerror=e=>{!function fallbackChecks(e){var cdn=window.__appCDN;if(!window.__appCDNBlockFallback){var build=document.createElement("script");build.type="module",build.onerror=e=>{fallbackChecks(e)},"./"===cdn?(window.__appCDN="https://cdn.hax.cloud/cdn/",window.WCAutoloadRegistryFile=window.WCAutoloadRegistryFile.replace(cdn,window.__appCDN),build.src=window.__appCDN+autoloaderScriptLocation,def.parentNode.insertBefore(build,def),console.warn(cdn+" failed to respond, falling back to alternative: "+window.__appCDN)):"https://cdn.hax.cloud/cdn/"===cdn?(window.__appCDN="https://cdn.webcomponents.psu.edu/cdn/",window.WCAutoloadRegistryFile=window.WCAutoloadRegistryFile.replace(cdn,window.__appCDN),build.src=window.__appCDN+autoloaderScriptLocation,def.parentNode.insertBefore(build,def),console.warn(cdn+" failed to respond, falling back to alternative: "+window.__appCDN)):"https://cdn.webcomponents.psu.edu/cdn/"===cdn?(window.__appCDN="https://cdn.waxam.io/",window.WCAutoloadRegistryFile=window.WCAutoloadRegistryFile.replace(cdn,window.__appCDN),build.src=window.__appCDN+autoloaderScriptLocation,def.parentNode.insertBefore(build,def),console.warn(cdn+" failed to respond, falling back to alternative: "+window.__appCDN)):(window.__appCDN="./",window.WCAutoloadRegistryFile=window.WCAutoloadRegistryFile.replace(cdn,window.__appCDN),console.error("Local delivery failed and all alternative CDNs failed to load. You might be offline, in a secure environment or doing testing intentionally to generate this *shrug*")),animationPolyfillTest()}}()},def.parentNode.insertBefore(build,def)}catch(err){var buildLegacy=document.createElement("script");buildLegacy.src=cdn+"assets/build-legacy.js",def.parentNode.insertBefore(buildLegacy,def)}function animationPolyfillTest(){if(!Element.prototype.animate){var ani=document.createElement("script");ani.src=window.__appCDN+"build/es6/node_modules/web-animations-js/web-animations-next-lite.min.js",def.parentNode.insertBefore(ani,def)}} ================================================ FILE: dist/app.js ================================================ // build default for all our properties is for CMSs other than HAXcms // HAXcms will tack onto this routine through another method if integration // that is similar import "./build-cms.js"; ================================================ FILE: dist/build-cms.js ================================================ // for use in most CMSs //import "@haxtheweb/baseline-build-hax/baseline-build-hax.js"; import "@haxtheweb/h-a-x/h-a-x.js"; import "@haxtheweb/hax-body/hax-body.js"; import "@haxtheweb/hax-body-behaviors/hax-body-behaviors.js"; // common in CMSs import "@haxtheweb/cms-hax/cms-hax.js"; import "@haxtheweb/wysiwyg-hax/wysiwyg-hax.js"; ================================================ FILE: dist/build-elmsln.js ================================================ /*import "@haxtheweb/h-a-x/h-a-x.js"; import "@haxtheweb/cms-hax/cms-hax.js"; import "@haxtheweb/cms-hax/lib/cms-views.js"; import "@haxtheweb/cms-hax/lib/cms-token.js"; import "@haxtheweb/cms-hax/lib/cms-entity.js"; import "@haxtheweb/cms-hax/lib/cms-block.js"; import "@haxtheweb/wysiwyg-hax/wysiwyg-hax.js"; import "@haxtheweb/lrn-page/lrn-page.js"; import "@haxtheweb/lrn-content/lrn-content.js"; import "@haxtheweb/elmsln-loading/elmsln-loading.js"; import "@haxtheweb/lrnsys-layout/lib/lrnsys-drawer.js"; import "@haxtheweb/lrnsys-layout/lib/lrnsys-dialog.js"; import "@haxtheweb/lrnsys-button/lrnsys-button.js"; import "@lrnwebcomponents/lrndesign-drawer/lrndesign-drawer.js"; import "@lrnwebcomponents/lrndesign-panelcard/lrndesign-panelcard.js"; import "@lrnwebcomponents/lrndesign-blockquote/lrndesign-blockquote.js"; import "@haxtheweb/lrndesign-avatar/lrndesign-avatar.js"; import "@lrnwebcomponents/lrnapp-fab-menu/lrnapp-fab-menu.js"; import "@lrnwebcomponents/dropdown-select/dropdown-select.js"; import "@haxtheweb/a11y-gif-player/a11y-gif-player.js"; import "@haxtheweb/citation-element/citation-element.js"; import "@haxtheweb/image-compare-slider/image-compare-slider.js"; import "@haxtheweb/license-element/license-element.js"; import "@haxtheweb/lrn-math/lrn-math.js"; import "@haxtheweb/lrn-table/lrn-table.js"; import "@haxtheweb/lrn-vocab/lrn-vocab.js"; import "@haxtheweb/md-block/md-block.js"; import "@lrnwebcomponents/lrndesign-blockquote/lrndesign-blockquote.js"; import "@haxtheweb/media-behaviors/media-behaviors.js"; import "@haxtheweb/media-image/media-image.js"; import "@haxtheweb/meme-maker/meme-maker.js"; import "@haxtheweb/multiple-choice/multiple-choice.js"; import "@haxtheweb/person-testimonial/person-testimonial.js"; import "@haxtheweb/place-holder/place-holder.js"; import "@haxtheweb/q-r/q-r.js"; import "@haxtheweb/full-width-image/full-width-image.js"; import "@haxtheweb/self-check/self-check.js"; import "@haxtheweb/stop-note/stop-note.js"; import "@haxtheweb/video-player/video-player.js"; import "@haxtheweb/wikipedia-query/wikipedia-query.js"; import "@haxtheweb/html-block/html-block.js"; import "@haxtheweb/a11y-media-player/a11y-media-player.js"; import "@haxtheweb/elmsln-apps/elmsln-apps.js";*/ ================================================ FILE: dist/build-full.js ================================================ // the base line build that's used to setup everything in a production environment import "./build.js"; import "./app.js"; import "./build-home.js"; import "./build-install.js"; import "./build-haxcms.js"; // we build elmsln dependency trees from here since there's so much overlap. import "./build-elmsln.js"; // important in smaller builds import "@haxtheweb/baseline-build-hax/baseline-build-hax.js"; window.process = { env: { NODE_ENV: 'production' } }; // just make it work import "web-dialog/index.js"; // supported backends import "@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-beaker.js"; import "@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-demo.js"; import "@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-php.js"; // core HAXcms import "@haxtheweb/haxcms-elements/haxcms-elements.js"; import "@haxtheweb/haxcms-elements/lib/core/haxcms-editor-builder.js"; import "@haxtheweb/haxcms-elements/lib/core/haxcms-outline-editor-dialog.js"; import "@haxtheweb/haxcms-elements/lib/core/haxcms-site-builder.js"; import "@haxtheweb/haxcms-elements/lib/core/haxcms-site-editor-ui.js"; import "@haxtheweb/haxcms-elements/lib/core/haxcms-site-editor.js"; import "@haxtheweb/haxcms-elements/lib/core/haxcms-site-router.js"; import "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; import "@haxtheweb/haxcms-elements/lib/core/HAXCMSThemeWiring.js"; // pieces of UI import "@haxtheweb/haxcms-elements/lib/ui-components/active-item/site-active-title.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/blocks/site-children-block.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-menu-button.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-menu.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-top-menu.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/query/site-render-query.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/query/site-query.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/query/site-query-menu-slice.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/site/site-rss-button.js"; import "@haxtheweb/haxcms-elements/lib/ui-components/site/site-title.js"; // themes are dynamically imported and without directly being mentioned import "@haxtheweb/haxcms-elements/lib/development/haxcms-dev-theme.js"; import "@haxtheweb/haxcms-elements/lib/development/haxcms-theme-developer.js"; import "@haxtheweb/haxcms-elements/lib/core/themes/haxcms-slide-theme.js"; import "@haxtheweb/haxcms-elements/lib/core/themes/haxcms-minimalist-theme.js"; import "@haxtheweb/haxcms-elements/lib/core/themes/haxcms-basic-theme.js"; import "@haxtheweb/haxcms-elements/lib/core/themes/haxcms-custom-theme.js"; import "@haxtheweb/outline-player/outline-player.js"; import "@haxtheweb/simple-blog/simple-blog.js"; import "@haxtheweb/learn-two-theme/learn-two-theme.js"; import "@haxtheweb/haxor-slevin/haxor-slevin.js"; // these should all be dynamically imported as well import "@haxtheweb/voice-recorder/voice-recorder.js"; import "@haxtheweb/h5p-element/h5p-element.js"; import "@haxtheweb/hax-logo/hax-logo.js"; import "@haxtheweb/a11y-gif-player/a11y-gif-player.js"; import "@haxtheweb/citation-element/citation-element.js"; import "@haxtheweb/image-compare-slider/image-compare-slider.js"; import "@haxtheweb/license-element/license-element.js"; import "@haxtheweb/lrn-math/lrn-math.js"; import "@haxtheweb/lrn-table/lrn-table.js"; import "@haxtheweb/lrn-vocab/lrn-vocab.js"; import "@haxtheweb/md-block/md-block.js"; import "@haxtheweb/media-behaviors/media-behaviors.js"; import "@haxtheweb/media-image/media-image.js"; import "@haxtheweb/meme-maker/meme-maker.js"; import "@haxtheweb/multiple-choice/multiple-choice.js"; import "@haxtheweb/person-testimonial/person-testimonial.js"; import "@haxtheweb/place-holder/place-holder.js"; import "@haxtheweb/q-r/q-r.js"; import "@haxtheweb/full-width-image/full-width-image.js"; import "@haxtheweb/self-check/self-check.js"; import "@haxtheweb/stop-note/stop-note.js"; import "@haxtheweb/video-player/video-player.js"; import "@haxtheweb/wikipedia-query/wikipedia-query.js"; import "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js"; import "@haxtheweb/html-block/html-block.js"; import "@haxtheweb/user-action/user-action.js"; import "@haxtheweb/grid-plate/grid-plate.js"; ================================================ FILE: dist/build-haxcms.js ================================================ import "@haxtheweb/haxcms-elements/lib/core/haxcms-site-builder.js"; // this can be used for customizations / additional elements to get pulled in // this assumes you're operating in a bit of a pro mode where you know to compile // via polymer build and that you're managing your own fork of the package.json we ship ================================================ FILE: dist/build-home.js ================================================ import "@haxtheweb/app-hax/app-hax.js"; ================================================ FILE: dist/build-install.js ================================================ import "@haxtheweb/hax-logo/hax-logo.js"; import "@haxtheweb/simple-icon/simple-icon.js"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import "@haxtheweb/git-corner/git-corner.js"; ================================================ FILE: dist/build-legacy.js ================================================ // this can be used for customizations / additional elements to get pulled in // this assumes you're operating in a bit of a pro mode where you know to compile // via polymer build and that you're managing your own fork of the package.json we ship ================================================ FILE: dist/build.html ================================================ haxcms build housing to ensure assets resolve ================================================ FILE: dist/build.js ================================================ // build default for all our properties is for CMSs other than HAXcms // HAXcms will tack onto this routine through another method if integration // that is similar import "./build-haxcms.js"; ================================================ FILE: dist/dev/appstore.json ================================================ { "status": 200, "apps": [ { "details": { "title": "Youtube", "icon": "mdi-action:youtube-play", "color": "red", "author": "Google, Youtube LLC", "description": "The most popular online video sharing and remix site.", "status": "available", "tags": [ "video", "crowdsourced" ], "tos": [ { "title": "YouTube Terms of Service", "link": "https://www.youtube.com/t/terms" }, { "title": "Google Privacy Policy", "link": "https://policies.google.com/privacy" } ] }, "connection": { "protocol": "https", "url": "www.googleapis.com/youtube/v3", "data": { "key": "AIzaSyDiSvloa49gHUJG0YAt3Ys_I6IEoiscPUM" }, "operations": { "browse": { "method": "GET", "endPoint": "search", "pagination": { "style": "page", "props": { "previous": "prevPageToken", "next": "nextPageToken", "total_items": "pageInfo.totalResults" } }, "search": { "q": { "title": "Search", "type": "string" } }, "data": { "part": "snippet", "type": "video", "maxResults": "20" }, "url": "https://www.youtube.com/watch?v=", "resultMap": { "defaultGizmoType": "video", "items": "items", "preview": { "title": "snippet.title", "details": "snippet.description", "image": "snippet.thumbnails.default.url", "id": "id.videoId" }, "gizmo": { "title": "snippet.title", "description": "snippet.description", "id": "id.videoId", "_url_source": "https://www.youtube.com/watch?v=<%= id %>", "caption": "snippet.description", "citation": "snippet.channelTitle" } } } } } }, { "details": { "title": "NASA", "icon": "places:all-inclusive", "color": "blue", "author": "US Government", "description": "The cozmos through one simple API.", "status": "available", "tags": [ "images", "government", "space" ] }, "connection": { "protocol": "https", "url": "images-api.nasa.gov", "operations": { "browse": { "method": "GET", "endPoint": "search", "pagination": { "style": "page", "props": { "page": "page" } }, "search": { "q": { "title": "Search", "type": "string" } }, "data": { "media_type": "image" }, "resultMap": { "defaultGizmoType": "image", "items": "collection.items", "preview": { "title": "data.0.title", "details": "data.0.description", "image": "links.0.href", "id": "links.0.href" }, "gizmo": { "id": "links.0.href", "source": "links.0.href", "title": "data.0.title", "caption": "data.0.description", "description": "data.0.description", "citation": "data.0.photographer", "type": "data.0.media_type" } } } } } }, { "details": { "title": "Sketchfab", "icon": "icons:3d-rotation", "color": "purple", "author": "Sketchfab", "description": "3D sharing community.", "status": "available", "rating": "0", "tags": [ "3D", "creative commons", "crowdsourced" ] }, "connection": { "protocol": "https", "url": "api.sketchfab.com", "data": { "type": "models" }, "operations": { "browse": { "method": "GET", "endPoint": "v3/search", "pagination": { "style": "page", "props": { "per_page": "photos.perpage", "total_pages": "photos.pages", "page": "photos.page" } }, "search": { "q": { "title": "Search", "type": "string" }, "license": { "title": "License type", "type": "string", "value": "", "component": { "name": "dropdown-select", "valueProperty": "value", "slot": "AnyAttributionAttribution ShareAlikeAttribution NoDerivativesAttribution-NonCommercialAttribution NonCommercial ShareAlikeAttribution NonCommercial NoDerivativesPublic Domain Dedication (CC0)" } } }, "resultMap": { "defaultGizmoType": "video", "items": "results", "preview": { "title": "name", "details": "description._content", "image": "thumbnails.images.2.url", "id": "uid" }, "gizmo": { "title": "name", "source": "embedUrl", "alt": "description" } } } } } }, { "details": { "title": "Dailymotion", "icon": "av:play-circle-filled", "color": "blue", "author": "Dailymotion", "description": "A crowdsourced video platform that is ad supported.", "status": "available", "tags": [ "video", "crowdsourced" ] }, "connection": { "protocol": "https", "url": "api.dailymotion.com", "operations": { "browse": { "method": "GET", "endPoint": "videos", "pagination": { "style": "page", "props": { "total_items": "total", "total_pages": "total_pages", "page": "page" } }, "search": { "search": { "title": "Search", "type": "string" } }, "data": { "fields": "description,embed_url,thumbnail_240_url,title,id", "no_live": "1", "ssl_assets": "true", "sort": "relevance", "limit": "20" }, "resultMap": { "defaultGizmoType": "video", "items": "list", "preview": { "title": "title", "details": "description", "image": "thumbnail_240_url", "id": "id" }, "gizmo": { "title": "title", "description": "description", "source": "embed_url", "alt": "description", "caption": "description" } } } } } }, { "details": { "title": "Wikipedia", "icon": "account-balance", "color": "grey", "author": "Wikimedia", "description": "Encyclopedia of the world.", "status": "available", "tags": [ "content", "encyclopedia", "wiki" ] }, "connection": { "protocol": "https", "url": "en.wikipedia.org", "data": { "action": "query", "list": "search", "format": "json", "origin": "*" }, "operations": { "browse": { "method": "GET", "endPoint": "w/api.php", "pagination": { "style": "offset", "props": { "offset": "sroffset" } }, "search": { "srsearch": { "title": "Search", "type": "string" } }, "data": {}, "resultMap": { "image": "https://en.wikipedia.org/static/images/project-logos/enwiki.png", "defaultGizmoType": "wikipedia", "items": "query.search", "preview": { "title": "title", "details": "snippet", "id": "title" }, "gizmo": { "_url_source": "https://en.wikipedia.org/wiki/<%= id %>", "id": "title", "title": "title", "caption": "snippet", "description": "snippet" } } } } } }, { "details": { "title": "CC Mixter", "icon": "av:library-music", "color": "purple", "author": "CC Mixter", "description": "User submitted audio files and music.", "status": "available", "tags": [ "audio", "crowdsourced" ] }, "connection": { "protocol": "http", "url": "ccmixter.org", "data": { "format": "json", "sort": "name", "limit": "20" }, "operations": { "browse": { "method": "GET", "endPoint": "api/query", "pagination": { "style": "link", "props": { "first": "paging.first", "next": "paging.next", "previous": "paging.previous", "last": "paging.last" } }, "search": { "tags": { "title": "Search", "type": "string" } }, "data": { "direction": "asc", "sort": "alphabetical", "filter": "CC", "per_page": "20" }, "resultMap": { "defaultGizmoType": "audio", "items": "", "preview": { "title": "upload_name", "details": "upload_description_plain", "image": "license_logo_url", "id": "upload_id" }, "gizmo": { "source": "files.0.download_url", "id": "upload_id", "title": "upload_name", "caption": "upload_description_plain", "description": "upload_description_plain", "citation": "license_name" } } } } } }, { "details": { "title": "Codepen.io", "icon": "code", "color": "green", "author": "Code pen", "description": "HTML / CSS / JS sharing community", "status": "available", "rating": "0", "tags": [ "code", "development", "html", "js", "crowdsourced" ] }, "connection": { "protocol": "https", "url": "cpv2api.com", "operations": { "browse": { "method": "GET", "endPoint": "search/pens", "pagination": { "style": "page", "props": { "per_page": "photos.perpage", "total_pages": "photos.pages", "page": "photos.page" } }, "search": { "q": { "title": "Search", "type": "string" } }, "resultMap": { "defaultGizmoType": "video", "items": "data", "preview": { "title": "title", "details": "details", "image": "images.small", "id": "id" }, "gizmo": { "_url_source": "https://codepen.io/fchazal/embed/<%= id %>/?theme-id=0&default-tab=html,result&embed-version=2", "id": "id", "image": "images.large", "title": "title", "caption": "details", "description": "details" } } } } } }, { "details": { "title": "Local files", "icon": "perm-media", "color": "light-blue", "author": "HAXCMS", "description": "HAXCMS integration for HAX", "tags": [ "media" ] }, "connection": { "protocol": "https", "url": "haxcms.ddev.site/", "operations": { "browse": { "method": "GET", "endPoint": "system/api/listFiles", "pagination": { "style": "link", "props": { "first": "page.first", "next": "page.next", "previous": "page.previous", "last": "page.last" } }, "search": { "filename": { "title": "File name", "type": "string" } }, "data": { "__HAXJWT__": true, "__HAXAPPENDUPLOADENDPOINT__": true }, "resultMap": { "defaultGizmoType": "image", "items": "list", "preview": { "title": "name", "details": "mime", "image": "url", "id": "uuid" }, "gizmo": { "source": "url", "id": "uuid", "title": "name", "mimetype": "mimetype" } } }, "add": { "method": "POST", "endPoint": "system/api/saveFile", "acceptsGizmoTypes": [ "image", "video", "audio", "pdf", "svg", "document", "csv", "archive", "markdown", "*", "html" ], "resultMap": { "item": "data.file", "defaultGizmoType": "image", "gizmo": { "source": "url", "id": "uuid" } } } } } } ], "stax": [ { "details": { "title": "Example Lesson", "image": "", "author": "ELMS:LN", "description": "An example of what HAX can do", "status": "available", "rating": "0", "tags": [ "example" ] }, "stax": [ { "tag": "h2", "properties": {}, "content": "Introduction to ELMS: Learning Network" }, { "tag": "p", "properties": {}, "content": "What is ELMS: Learning Network? How is it fundamentally different from other learning technologies? Why is it your reading this when it's example text that you've just added to see how to make a really solid introduction to a new unit of instruction? Let's keep reading to find out!" }, { "tag": "video-player", "properties": { "style": "width: 75%; margin: 0px auto; display: block;", "source": "https://www.youtube.com/watch?v=pKLPQ4ufo64", "src": "https://www.youtube-nocookie.com/embed/pKLPQ4ufo64?showinfo=0&controls=1&rel=0", "iframed": true, "sandboxed": false, "width": "560", "height": "315", "responsive": true, "caption": "What is ELMS:LN? Why is it fundamentally different from any other educational technology that's ever existed? What is sustainable innovation? Why is this so ...", "secondaryColor": "#fff9c4", "textColor": "#000000", "secondaryColorClass": "yellow lighten-4", "textColorClass": "black-text", "ytNocookie": true, "ytSuggested": false, "ytControls": true, "ytTitle": false, "vimeoTitle": false, "vimeoByline": false, "vimeoPortrait": false, "videoColor": "FF031D", "resource": "#86bfd28d-8b57-a3b9-b2e5", "prefix": "oer:http://oerschema.org/ schema:http://schema.org/ dc:http://purl.org/dc/terms/ foaf:http://xmlns.com/foaf/0.1/ cc:http://creativecommons.org/ns# bib:http://bib.schema.org " }, "content": "" }, { "tag": "h3", "properties": {}, "content": "Pretest" }, { "tag": "self-check", "properties": { "style": "width: 50%; float: right;", "title": "Self-Check", "image": "https://farm1.staticflickr.com/642/21641107852_3602f9c1a8_b.jpg", "alt": "A few stickers associated with ELMS:LN are shown presented on the back of a laptop.", "correct": false, "textColor": "#000000", "textColorClass": "black-text", "backgroundColor": "#b2dfdb", "backgroundColorClass": "teal lighten-4", "resource": "#08d09967-a7c9-3d02-8935", "prefix": "oer:http://oerschema.org/ schema:http://schema.org/ dc:http://purl.org/dc/terms/ foaf:http://xmlns.com/foaf/0.1/ cc:http://creativecommons.org/ns# bib:http://bib.schema.org " }, "content": " True or False. ELMS:LN is a traditional learning management system.\n\n FALSE. ELMS: Learning Network is considered to be a Next Generation Digital Learning Environment.\nLearn more about NGDLE in this blog post on Educause\n.\n\n" }, { "tag": "p", "properties": {}, "content": "If you think you already know about ELMS:LN, let's find out ahead of time! Take the self-check on the right to find out if ELMS:LN is a traditional Learning Management system or something more" }, { "tag": "hr", "properties": { "style": "width: 75%;" }, "content": "" }, { "tag": "h3", "properties": {}, "content": "History Review" }, { "tag": "p", "properties": {}, "content": "Now that we've read about what ELMS:LN is (and is not). Let's take a different kind of self-check to illustrate the flexibility of the HAX authoring platform." }, { "tag": "multiple-choice", "properties": { "style": "width: 75%; margin: 0px auto; display: block;", "checkLabel": "Check guess", "resetLabel": "Clear", "hideTitle": true, "question": "Who founded the ELMS:LN Platform?", "answers": [ { "correct": true, "label": "Bryan Ollendyke" }, { "correct": false, "label": "Mythic Elves" }, { "correct": false, "label": "Michael Potter" }, { "correct": false, "label": "Nikki Massaro Kauffman" }, { "correct": false, "label": "Charles Lavera" } ], "correctText": "Great job!", "incorrectText": "Try again", "randomize": true, "typeof": "oer:Assessment", "resource": "#97ffed48-c928-39ae-1bea", "prefix": "oer:http://oerschema.org/ schema:http://schema.org/ dc:http://purl.org/dc/terms/ foaf:http://xmlns.com/foaf/0.1/ cc:http://creativecommons.org/ns# bib:http://bib.schema.org " }, "content": "" }, { "tag": "multiple-choice", "properties": { "style": "width: 75%; margin: 0px auto; display: block;", "title": "ELMS Development team", "checkLabel": "Check your guess", "resetLabel": "Clear answers", "hideTitle": false, "question": "Who is responsible for ELMS:LN existing? Who improves it and wants it to be the best NGDLE solution to transform education and the world?", "answers": [ { "correct": true, "label": "Nikki Massaro Kauffman" }, { "correct": true, "label": "Michael Potter" }, { "correct": true, "label": "Charles Lavera" }, { "correct": true, "label": "Bryan Ollendyke" }, { "correct": true, "label": "Anyone, ELMS:LN is an open community developed by multiple organizations!" } ], "displayedAnswers": [ { "correct": true, "label": "Nikki Massaro Kauffman" }, { "correct": true, "label": "Michael Potter" }, { "correct": true, "label": "Charles Lavera" }, { "correct": true, "label": "Bryan Ollendyke" }, { "correct": true, "label": "Anyone, ELMS:LN is an open community developed by multiple organizations!" } ], "correctText": "Great job! You got our trick question!", "incorrectText": "Try again, there's some more answers...", "randomize": true, "typeof": "oer:Assessment", "resource": "#59426af4-ecf2-f49d-06a6", "prefix": "oer:http://oerschema.org/ schema:http://schema.org/ dc:http://purl.org/dc/terms/ foaf:http://xmlns.com/foaf/0.1/ cc:http://creativecommons.org/ns# bib:http://bib.schema.org " }, "content": "" } ] }, { "details": { "title": "About the course", "image": "", "author": "ELMS:LN", "description": "An example about the course page.", "status": "available", "rating": "0", "tags": [ "example" ] }, "stax": [ { "tag": "h2", "properties": {}, "content": "About this course" }, { "tag": "p", "properties": {}, "content": "DMD 100: Digital Multimedia Design Foundations introduces design process and thinking skills to support and facilitate creative and reasoned approaches to ambiguous and ill-defined problem spaces. It introduces concepts, skills, language, and principles of practice related to art and design, communications, and information sciences — three discreet disciplines in which students can pursue further study while developing their learning pathways. With the aid of a standard design process, we walk through methods, tools, and mental attitudes necessary to approach ambiguous problems. This course is not meant to be a comprehensive design process catalog, and instead should inspire and build confidence in the act of design. The concept of \"design\" for DMD students is a frame through which complex issues can be discovered and defined and solutions can be best developed and delivered." }, { "tag": "h3", "properties": {}, "content": "Course Structure" }, { "tag": "p", "properties": {}, "content": "DMD 100 is comprised of 5 lessons that introduce design topics, approaches, and considerations. Each lesson will span one to 4 weeks depending on the semester. Students will read assigned chapters and course pages, review supplemental media including podcasts and videos, and complete design exercises employing the double-diamond method, culminating in a lesson project and critique. Students are expected to practice the design process throughout the course, and therefore will be assigned several activities a week to provide opportunity for practice and iteration." }, { "tag": "h3", "properties": {}, "content": "Digital course technology" }, { "tag": "p", "properties": {}, "content": "A course is not software or a website, but rather the delivery of pedagogy for particular subject matter over a set period of time. Without getting too far into learning theory, you can think of pedagogy as the todo list that an instructor gives students in order to meaningfully engage with and learn course content." }, { "tag": "p", "properties": {}, "content": "Delivering pedagogy online has its own set of challenges. We'll be using a mix of online software to meet the needs of this online course. Canvas\n\n\n\n\n is a Learning Management System (LMS) that stores the assignment calendar, grades, and provides an easy way to send messages to everyone in the course. We host the core course text and image-based content in ELMS Learning Network, which is similar to an LMS, but with some custom in-house built tools. One such tool is the Studio, which allows students to more easily share project progress with each other. You will be guided to perform actions through a combination of the Canvas calendar, emails, and explicit assignment instructions. Contact your course instructor via Penn State E-Mail if you are ever confused. It is your responsibility as a student to know when assignments are due." }, { "tag": "h3", "properties": {}, "content": "Technical and material requirements" }, { "tag": "h4", "properties": {}, "content": "Hardware" }, { "tag": "ol", "properties": {}, "content": "\n
  • Computer:\n\n\n This fully online course will require access to a computer that meets the minimum requirements set by World Campus.
  • \n\n\n\n\n\n
  • Internet:\n\n\n You will need broadband Internet to view videos and other media content.
  • \n\n\n\n\n\n
  • Camera or cellphone camera:\n\n\n You will be asked to document various aspects of your work
  • \n\n\n\n\n\n
  • Printer/scanner:\n\n\n A printer will be helpful for printing out paper templates. A scanner is optional, but would be helpful.
  • \n\n\n\n\n\n" }, { "tag": "h4", "properties": {}, "content": "Software" }, { "tag": "ol", "properties": {}, "content": "\n
  • Web browser: You will need to have the latest version of either Google Chrome, Safari, Firefox, or Microsoft Edge.
  • \n\n\n\n\n\n
  • Accounts: In addition to general University account access, you will be required to create an account with InvisionApp.com
  • \n\n\n\n\n\n
  • Software installs: You will need to download and install an open-source desktop application called Twine from Twinery.org. It is possible to use a web version of this software if you cannot or wish not to install it on your computer.
  • \n\n\n\n\n\n" }, { "tag": "h4", "properties": {}, "content": "Materials" }, { "tag": "ol", "properties": {}, "content": "\n
  • Journal\n\n
      \n
    • Any journal is fine. I recommend the Moleskine Cahier Journal, Large, Squared, Kraft Brown, Soft Cover (5 x 8.25) Amazon purchase link\n\n\n
    • \n\n\n\n
    \n\n\n
  • \n\n\n\n\n\n
  • Pens, pencils, markers\n\n
      \n
    • Any that you already own are fine, you do not need to purchase special ones for this course. However, the following recommendations are professional grade if you are so inclined to invest in quality drawing tools.\n\n
        \n
      • Pencil: Palomino Blackwing 602
      • \n\n\n\n
      • Pen: Copic Multiliner Marker 0.5 - Black
      • \n\n\n\n
      • Marker: Copic N2
      • \n\n\n\n
      \n\n\n
    • \n\n\n\n
    \n\n\n
  • \n\n\n\n\n\n
  • Scissors
  • \n\n\n\n\n\n
  • Post-it Notes
  • \n\n\n\n\n\n
  • Poster board (or large open wall space) for the post-its
  • \n\n\n\n\n\n" }, { "tag": "h4", "properties": {}, "content": "Book" }, { "tag": "p", "properties": {}, "content": "We will be reading Design and Truth\n\n\n\n\n by Robert Grudin. You will need to purchase a copy of this book." }, { "tag": "h4", "properties": {}, "content": "Misc" }, { "tag": "p", "properties": {}, "content": "FYI, students get free Amazon Prime\n\n\n\n\n shipping." }, { "tag": "license-element", "properties": { "style": "width: 100%;", "title": "DMD 100", "creator": "Michael Collins", "source": "https://github.com/dmd-program/", "licenseName": "Creative Commons: Attribution", "licenseLink": "https://creativecommons.org/licenses/by/4.0/", "license": "by", "moreLabel": "by checking out the OER schema project", "moreLink": "http://oerschema.org/", "hasMore": true, "resource": "#ee77aae6-561a-fbf8-d738", "prefix": "oer:http://oerschema.org/ schema:http://schema.org/ dc:http://purl.org/dc/terms/ foaf:http://xmlns.com/foaf/0.1/ cc:http://creativecommons.org/ns# bib:http://bib.schema.org " }, "content": "" } ] }, { "details": { "title": "Example Assignment", "image": "", "author": "ELMS:LN", "description": "An example assignment with OER Schema.", "status": "available", "rating": "0", "tags": [ "example" ] }, "stax": [ { "tag": "h2", "properties": {}, "content": "\n\n" }, { "tag": "h3", "properties": { "class": " " }, "content": "Description" }, { "tag": "p", "properties": {}, "content": "\n\n" }, { "tag": "h3", "properties": {}, "content": "Learning Objectives" }, { "tag": "ol", "properties": {}, "content": "
  • \n \n \n \n \n Gain understanding of critical writing discourse.\n \n \n\n
  • \n\n\n
  • \n \n \n \n \n Apply relevant course topics and issues in a writing context.\n \n \n\n
  • \n\n\n" }, { "tag": "h3", "properties": {}, "content": "Learning Resources" }, { "tag": "p", "properties": {}, "content": " \n \n \n \n \n Writing Essays for Dummies. Mary Page; Carrie Winstanley. Wiley. January, 2012\n \n \n\n\n\n\n: Download Link\n\n\n" }, { "tag": "h3", "properties": { "class": " " }, "content": "Instructions" }, { "tag": "ol", "properties": {}, "content": "
  • \n \n \n \n \n Read the course texts and choose two critical issues to discuss.\n \n \n\n
  • \n\n\n
  • \n \n \n \n \n  Write a 400 word paper discussing these critical issues.\n \n \n\n
  • \n\n\n
  • \n \n \n \n \n Proof read your writing.\n \n \n\n
  • \n\n\n
  • \n \n \n \n \n Submit the digital file to the dropbox.\n \n \n\n
  • \n\n\n" } ] } ], "blox": [ { "details": { "title": "50% columns", "author": "ELMS:LN", "icon": "hax:6/6", "status": "available", "layout": "6/6" }, "blox": [ { "tag": "h2", "properties": { "slot": "col-1" }, "content": "Heading" }, { "tag": "p", "properties": { "slot": "col-1" }, "content": "A paragraph of text would go here to describe the work." }, { "tag": "place-holder", "properties": { "slot": "col-2", "type": "image" }, "content": "" } ] }, { "details": { "title": "66 / 33 columns", "author": "ELMS:LN", "icon": "hax:8/4", "status": "available", "layout": "8/4" }, "blox": [ { "tag": "place-holder", "properties": { "slot": "col-1", "type": "text" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-2", "type": "image" }, "content": "" } ] }, { "details": { "title": "33% columns", "author": "ELMS:LN", "icon": "hax:4/4/4", "status": "available", "layout": "4/4/4" }, "blox": [ { "tag": "place-holder", "properties": { "slot": "col-1", "type": "image" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-2", "type": "image" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-3", "type": "image" }, "content": "" } ] }, { "details": { "title": "33 / 66 columns", "author": "ELMS:LN", "icon": "hax:4/8", "status": "available", "layout": "4/8" }, "blox": [ { "tag": "place-holder", "properties": { "slot": "col-2", "type": "text" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-1", "type": "image" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-1", "type": "image" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-1", "type": "image" }, "content": "" } ] }, { "details": { "title": "25% columns", "author": "ELMS:LN", "icon": "hax:3/3/3/3", "status": "available", "layout": "3/3/3/3" }, "blox": [ { "tag": "place-holder", "properties": { "slot": "col-1", "type": "image" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-2", "type": "image" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-3", "type": "image" }, "content": "" }, { "tag": "place-holder", "properties": { "slot": "col-4", "type": "image" }, "content": "" } ] } ], "autoloader": { "lesson-overview": "@haxtheweb/haxcms-elements/lib/ui-components/lesson-overview/lesson-overview.js", "lesson-highlight": "@haxtheweb/haxcms-elements/lib/ui-components/lesson-overview/lib/lesson-highlight.js", "rpg-character": "@haxtheweb/rpg-character/rpg-character.js", "page-break": "@haxtheweb/page-break/page-break.js", "a11y-figure": "@haxtheweb/a11y-figure/a11y-figure.js", "accent-card": "@haxtheweb/accent-card/accent-card.js", "a11y-gif-player": "@haxtheweb/a11y-gif-player/a11y-gif-player.js", "code-sample": "@haxtheweb/code-sample/code-sample.js", "citation-element": "@haxtheweb/citation-element/citation-element.js", "hero-banner": "@haxtheweb/hero-banner/hero-banner.js", "image-compare-slider": "@haxtheweb/image-compare-slider/image-compare-slider.js", "license-element": "@haxtheweb/license-element/license-element.js", "lrn-math": "@haxtheweb/lrn-math/lrn-math.js", "lrn-table": "@haxtheweb/lrn-table/lrn-table.js", "lrn-vocab": "@haxtheweb/lrn-vocab/lrn-vocab.js", "lrndesign-blockquote": "@haxtheweb/lrndesign-blockquote/lrndesign-blockquote.js", "magazine-cover": "@haxtheweb/magazine-cover/magazine-cover.js", "media-image": "@haxtheweb/media-image/media-image.js", "meme-maker": "@haxtheweb/meme-maker/meme-maker.js", "music-player": "@haxtheweb/music-player/music-player.js", "twitter-embed": "@haxtheweb/twitter-embed/twitter-embed.js", "grid-plate": "@haxtheweb/grid-plate/grid-plate.js", "md-block": "@haxtheweb/md-block/md-block.js", "github-preview": "@haxtheweb/github-preview/github-preview.js", "multiple-choice": "@haxtheweb/multiple-choice/multiple-choice.js", "person-testimonial": "@haxtheweb/person-testimonial/person-testimonial.js", "place-holder": "@haxtheweb/place-holder/place-holder.js", "q-r": "@haxtheweb/q-r/q-r.js", "full-width-image": "@haxtheweb/full-width-image/full-width-image.js", "self-check": "@haxtheweb/self-check/self-check.js", "stop-note": "@haxtheweb/stop-note/stop-note.js", "task-list": "@haxtheweb/task-list/task-list.js", "video-player": "@haxtheweb/video-player/video-player.js", "wikipedia-query": "@haxtheweb/wikipedia-query/wikipedia-query.js", "lrndesign-gallery": "@haxtheweb/lrndesign-gallery/lrndesign-gallery.js", "lrndesign-timeline": "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js", "html-block": "@haxtheweb/html-block/html-block.js", "user-action": "@haxtheweb/user-action/user-action.js", "date-card": "@haxtheweb/date-card/date-card.js", "flash-card": "@haxtheweb/flash-card/flash-card.js" } } ================================================ FILE: dist/dev/archiveSite.json ================================================ { "status": 200, "data": { "detail": "Site archived", "name": "ist342" } } ================================================ FILE: dist/dev/connectionSettings.json ================================================ {} ================================================ FILE: dist/dev/copySite.json ================================================ { "status": 200, "data": { "detail": "Site copied", "name": "ist342" } } ================================================ FILE: dist/dev/createSite.json ================================================ { "status": 200, "data": { "id": "ddffg44-e00f-4033-ae3e-4692f6f5a73e", "title": "IST 342", "author": "", "description": "A great course", "license": "by-sa", "metadata": { "author": { "image": "files/ECrfY0IXUAA4qsQ.jpeg", "name": "Bryan Ollendyke", "email": "bto108@psu.edu", "socialLink": "https://twitter.com/btopro" }, "site": { "name": "ist342", "created": 1565898366, "updated": 1615262120, "git": { "autoPush": false, "branch": "master", "staticBranch": "gh-pages", "vendor": "github", "publicRepoUrl": "https://github.com/btopro/ist402/blob/master/", "url": "git@github.com:btopro/ist402.git" }, "version": "2.0.8", "domain": "", "logo": "files/1633609907554_48eae0bf5903e0f3b990_132.jpg", "static": { "cdn": "build", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": true, "forceUpgrade": true, "sw": false } }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-deep-purple-7", "icon": "icons:cloud-circle" } }, "node": { "fields": {} }, "pageCount": 48 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/ist342/", "slug": "/bto108/sites/ist342/" } } ================================================ FILE: dist/dev/deleteSite.json ================================================ { "status": 200, "data": { "detail": "Site deleted", "name": "ist342" } } ================================================ FILE: dist/dev/downloadSite.json ================================================ { "status": 200, "data": { "link": "/bto108/published/ist342.zip", "name": "ist342.zip" } } ================================================ FILE: dist/dev/getConfigPath.json ================================================ { "schema": { "$schema": "http:\/\/json-schema.org\/schema#", "title": "HAXCMS Config", "type": "object", "properties": { "publishing": { "title": "Publishing settings", "type": "object", "properties": { "vendor": { "title": "Vendor", "type": "string", "value": "github", "component": { "name": "paper-input", "valueProperty": "value", "slot": "
    Name for this provided (github currently supported)<\/div>" } }, "branch": { "title": "Branch", "type": "string", "value": "gh-pages", "component": { "name": "paper-input", "valueProperty": "value", "slot": "
    Project code branch (like master or gh-pages)<\/div>" } }, "url": { "title": "Repo url", "type": "string", "value": "git@github.com:elmsln", "component": { "name": "paper-input", "valueProperty": "value", "slot": "
    Base address \/ organization that new sites will be saved under<\/div>" } }, "user": { "title": "User \/ Org", "type": "string", "value": "btopro", "component": { "name": "paper-input", "valueProperty": "value", "slot": "
    Set, to change this manually edit _config\/config.json.<\/div>", "attributes": { "disabled": "disabled" } } }, "email": { "title": "Email", "type": "string", "value": "bto108@psu.edu", "component": { "name": "paper-input", "valueProperty": "value", "slot": "
    Set, to change this manually edit _config\/config.json.<\/div>", "attributes": { "disabled": "disabled" } } }, "cdn": { "title": "CDN", "type": "string", "value": "cdn.webcomponents.psu.edu", "component": { "name": "paper-input", "valueProperty": "value", "slot": "
    A CDN address that supports HAXCMS<\/div>" } } } }, "apis": { "title": "API Connectivity", "type": "object", "properties": { "youtube": { "title": "YouTube", "type": "string", "value": "AIzaSyAF9zKXv-fxus9GNqn40SHzTn6F8A7h-Yo", "component": { "slot": "
    See YouTube developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } }, "googlepoly": { "title": "Google Poly", "type": "string", "value": "AIzaSyDiSvloa49gHUJG0YAt3Ys_I6IEoiscPUM", "component": { "slot": "
    See Google Poly developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } }, "memegenerator": { "title": "Meme generator", "type": "string", "value": "e7fbcd7f-8d76-4513-9698-e20de4362d99", "component": { "slot": "
    See Meme generator developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } }, "vimeo": { "title": "Vimeo", "type": "string", "value": "0a718b853bad87571d52e9fb554e0a43", "component": { "slot": "
    See Vimeo developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } }, "giphy": { "title": "Giphy", "type": "string", "value": "mr3blNkTT0HeTvtyPPT4TIftqUSgyHoO", "component": { "slot": "
    See Giphy developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } }, "unsplash": { "title": "Unsplash", "type": "string", "value": "0e1fa3a203724415c10c03581e8db8a43e8bc8906ad934e0f321d28be16281ff", "component": { "slot": "
    See Unsplash developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } }, "flickr": { "title": "Flickr", "type": "string", "value": "43ccc969703b7afd4e2a1b16f02ce84e", "component": { "slot": "
    See Flickr developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } }, "pixabay": { "title": "Pixabay", "type": "string", "value": "7839766-f49bb4174cd49cb587944a5f7", "component": { "slot": "
    See Pixabay developer docs.<\/a><\/div>", "name": "paper-input", "valueProperty": "value" } } } } } }, "values": { "themes": { "haxcms-dev-theme": { "element": "haxcms-dev-theme", "path": "@haxtheweb\/haxcms-elements\/lib\/haxcms-dev-theme.js", "name": "Developer theme" }, "outline-player": { "element": "outline-player", "path": "@haxtheweb\/outline-player\/outline-player.js", "name": "Outline player" }, "simple-blog": { "element": "simple-blog", "path": "@haxtheweb\/simple-blog\/simple-blog.js", "name": "Simple blog" }, "haxcms-slide-theme": { "element": "haxcms-slide-theme", "path": "@haxtheweb\/haxcms-elements\/lib\/haxcms-slide-theme.js", "name": "Slide player" } }, "appStore": { "apiKeys": { "youtube": "", "googlepoly": "", "memegenerator": "", "vimeo": "", "giphy": "", "unsplash": "", "flickr": "", "pixabay": "" } }, "publishing": { "git": { "vendor": "github", "branch": "gh-pages", "url": "git@github.com:elmsln", "user": "", "email": "", "cdn": "cdn.webcomponents.psu.edu" } } } } ================================================ FILE: dist/dev/getNodeFieldsPath.json ================================================ { "status": 200, "data": { "fields": [{ "property": "node", "inputMethod": "tabs", "properties": [ { "property": "configure", "title": "Configure", "description": "Change node settings", "properties": [ { "property": "node-configure-title", "description": "Title of the page", "inputMethod": "textfield", "required": true, "icon": "editor:title" }, { "property": "node-configure-slug", "description": "Location used in the URL", "inputMethod": "textfield", "required": true, "disabled": true, "icon": "device:gps-fixed" }, { "property": "node-configure-description", "description": "Description for the post", "inputMethod": "textfield", "required": false, "icon": "editor:short-text" }, { "property": "node-configure-images", "description": "List of images", "required": false, "icon": "image:collections", "title": "Other sources", "inputMethod": "array", "properties": [ { "property": "src", "title": "Source", "description": "The URL for the image", "inputMethod": "textfield" }, { "property": "alt", "title": "Alt", "description": "Alt text", "inputMethod": "textfield" } ] }, { "property": "node-configure-subtitle", "title": "Subtitle", "description": "An additional subtitle", "inputMethod": "textfield", "icon": "editor:text-fields" }, { "property": "node-configure-accentColor", "title": "Accent color", "description": "Select the accent color for the player.", "inputMethod": "colorpicker", "icon": "editor:format-color-fill" } ] }, { "property": "advanced", "title": "Advanced", "description": "less common node settings", "properties": [ { "property": "node-advanced-created", "description": "Created timestamp", "inputMethod": "textfield", "required": true, "icon": "device:access-time" }, { "property": "node-advanced-theme", "description": "Page theme", "inputMethod": "select", "required": false, "icon": "editor:format-paint", "options": { "odl-haxtheme": "Eberly ODL", "key": "haxcms-theme-developer", "learn-two-theme": "Learn", "outline-player": "Documentation", "simple-blog": "Simple blog", "haxcms-basic-theme": "Basic site", "haxcms-minimalist-theme": "Minimalist site", "haxcms-slide-theme": "Slide deck", "haxcms-dev-theme": "DEVELOPER: Test theme", "haxcms-theme-developer": "EXPERIMENTAL: HAX Theme Maker" } } ] } ]} ], "value": { "node": { "configure": { "node-configure-title": "Functions", "node-configure-slug": "functions", "node-configure-description": "" }, "advanced": { "node-advanced-created": 1552651607, "node-advanced-theme": "haxor-slevin" } } } } } ================================================ FILE: dist/dev/getSiteFieldsPath.json ================================================ { "status": 200, "data": { "fields": [{ "property": "manifest", "inputMethod": "tabs", "properties": [{ "property": "site", "title": "Site", "description": "Settings directly related to the internals of the site", "properties": [{ "property": "manifest-title", "title": "title", "description": "Name of the site", "inputMethod": "textfield", "required": true, "icon": "editor:title" }, { "property": "manifest-metadata-site-domain", "title": "Domain", "description": "Domain of this website", "inputMethod": "textfield", "required": false, "icon": "icons:open-in-browser" }, { "property": "manifest-description", "title": "Description", "description": "Simple description of the site", "inputMethod": "textfield", "required": false, "icon": "editor:short-text" }, { "property": "manifest-metadata-site-logo", "title": "Logo", "description": "Logo for thumbnails, browser tabs and used on phones", "inputMethod": "haxupload", "required": false, "noVoiceRecord": true }, { "property": "manifest-metadata-site-homePageId", "title": "Home page", "description": "Select a page for the home page of the site", "inputMethod": "select", "required": false, "icon": "icons:home" }] }, { "property": "theme", "title": "Theme", "description": "Theme and design settings applied to the entire site", "properties": [{ "property": "manifest-metadata-theme-element", "title": "Theme", "description": "Design and presentation layer for your site", "inputMethod": "select", "required": false, "icon": "editor:format-paint", "options": { "clean-one": "Course theme", "clean-two": "Course theme 2", "learn-two-theme": "Course theme 3", "haxor-slevin": "Coder blog", "outline-player": "Documentation" } }, { "property": "manifest-metadata-theme-variables-image", "title": "Banner", "description": "Banner image aplied to themes that implement one", "inputMethod": "haxupload", "required": false, "icon": "image:image", "noVoiceRecord": true }, { "property": "manifest-metadata-theme-variables-cssVariable", "title": "Accent color", "description": "Accent color applied to themes that implement it", "inputMethod": "colorpicker", "required": true, "icon": "editor:format-color-fill" }, { "property": "manifest-metadata-theme-variables-icon", "title": "Icon", "description": "Icon to represent the site in themes that implement it", "inputMethod": "iconpicker", "required": false, "icon": "icons:send" }] }, { "property": "seo", "title": "SEO", "description": "Search engine and detailed internal path handling", "properties": [{ "property": "manifest-metadata-site-settings-pathauto", "title": "Pathauto", "description": "Automatically maintain and update page paths", "inputMethod": "boolean", "icon": "icons:link" }, { "property": "manifest-metadata-site-settings-publishPagesOn", "title": "Hide unpublished pages", "description": "Check the box to hide unpublished pages", "inputMethod": "boolean", "icon": "icons:link" }, { "property": "manifest-metadata-site-settings-sw", "title": "Add service worker to dynamic page", "description": "Whether or not add the service worker to the .php version. Disable this if you need users to see changes instantly.", "inputMethod": "boolean", "required": false }, { "property": "manifest-metadata-site-settings-forceUpgrade", "title": "Force browser upgrade", "description": "Force users viewing the site to have evergreen browsers (not recommended)", "inputMethod": "boolean", "icon": "icons:link" }] }, { "property": "author", "title": "Author", "description": "Tell us about you and the site you are making", "properties": [{ "property": "manifest-license", "title": "License", "description": "The source url for the element this is citing.", "inputMethod": "select", "options": { "by": "Attribution", "by-nc": "Attribution non-commercial", "by-nc-nd": "Attribution Non-commercial No derivatives", "by-nc-sa": "Attribution non-commercial share a like", "by-nd": "Attribution No derivatives", "by-sa": "Attribution Share a like" }, "icon": "link" }, { "property": "manifest-metadata-author-image", "title": "Image", "description": "Photo", "inputMethod": "haxupload", "noVoiceRecord": true }, { "property": "manifest-metadata-author-name", "title": "Name", "description": "Name", "inputMethod": "textfield" }, { "property": "manifest-metadata-author-email", "title": "Email", "description": "email address", "inputMethod": "textfield" }, { "property": "manifest-metadata-author-socialLink", "title": "Social media link", "description": "A primary social space \/ point of contact", "inputMethod": "textfield" }] }, { "property": "static", "title": "Publishing", "description": "Publishing options", "properties": [{ "property": "manifest-metadata-site-static-cdn", "title": "CDN", "description": "CDN to use for published assets", "inputMethod": "select", "required": true, "options": { "cdn.webcomponents.psu.edu": "Penn State CDN", "cdn.hax.cloud": "Penn State CDN", "cdn.waxam.io": "Waxam CDN", "build": "Local (no CDN)" }, "icon": "link" }, { "property": "manifest-metadata-site-static-offline", "title": "Offline", "description": "Published site will work when completely offline", "inputMethod": "boolean", "required": false }] }] }], "value": { "manifest": { "site": { "manifest-title": "hax.camp", "manifest-description": "HAXcampd", "manifest-metadata-site-homePageId": null, "manifest-metadata-site-domain": "https:\/\/hax.camp", "manifest-metadata-site-logo": "files\/overflow.png" }, "author": { "manifest-license": "by-nc", "manifest-metadata-author-image": "files\/headshot.jpg", "manifest-metadata-author-name": "Bryan Ollendyke", "manifest-metadata-author-email": "btopro@outlook.com", "manifest-metadata-author-socialLink": "https:\/\/twitter.com\/btopro" }, "theme": { "manifest-metadata-theme-element": "simple-blog", "manifest-metadata-theme-variables-image": "assets\/banner.jpg", "manifest-metadata-theme-variables-hexCode": "#3a00ff", "manifest-metadata-theme-variables-cssVariable": "indigo", "manifest-metadata-theme-variables-icon": "icons:record-voice-over" }, "seo": { "manifest-metadata-site-settings-pathauto": null, "manifest-metadata-site-settings-publishPagesOn": null, "manifest-metadata-site-settings-sw": null, "manifest-metadata-site-settings-forceUpgrade": null }, "static": { "manifest-metadata-site-static-cdn": "cdn.waxam.io", "manifest-metadata-site-static-offline": null } }, "haxcms_form_id": "siteSettings", "haxcms_form_token": "FRoqGTelTArsZIP06Z1ipJ9UH4mGSzpN43PtzYsXEcY" } } } ================================================ FILE: dist/dev/login.json ================================================ { "status": 200, "jwt": "supDudeImmaJwat" } ================================================ FILE: dist/dev/logout.json ================================================ { "status": 200, "data": "logged out" } ================================================ FILE: dist/dev/saveManifestPath.json ================================================ { "file": "\/var\/www\/html\/_sites\/neato\/site.json", "id": "6048ae14-a9d7-4be2-b687-6cf460df67be", "title": "neato", "author": "", "description": "cool beans", "license": "by-sa", "metadata": { "siteName": "neato", "domain": "https:\/\/btopro.github.io\/neato", "created": 1554178142, "updated": 1554206147, "theme": { "element": "learn-two-theme", "path": "@haxtheweb\/learn-two-theme\/learn-two-theme.js", "name": "Learn" }, "image": "assets\/banner.jpg", "hexCode": "#aeff00", "cssVariable": "purple", "publishing": { "git": { "vendor": "github", "branch": "gh-pages", "url": "git@github.com:elmsln\/neato.git", "cdn": "cdn.waxam.io" } } } } ================================================ FILE: dist/dev/saveNode.json ================================================ 86 ================================================ FILE: dist/dev/savePage.json ================================================ 86 ================================================ FILE: dist/dev/sites.json ================================================ { "status": 200, "data": { "id": "123-123-123-123", "title": "My sites", "author": "me", "description": "All of my micro sites I know and love.", "license": "by-sa", "metadata": [], "items": [ { "id": "d0ce73f6-4351-426f-a015-202e686e68db", "title": "edtechjoker", "author": "", "description": "Resources to improve education one piece at at time.", "license": "by-sa", "metadata": { "author": { "image": "", "name": "", "email": "", "socialLink": "" }, "site": { "name": "edtechjoker", "logo": "assets/banner.jpg", "created": 1629208877, "updated": 1642013655, "git": { "autoPush": false, "branch": "", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" }, "version": "3.0.0", "domain": "", "static": { "cdn": "", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false } }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "image": "", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7", "icon": "av:closed-caption" } }, "node": { "fields": {} }, "pageCount": 13 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/edtechjoker/", "slug": "/bto108/sites/edtechjoker/" }, { "id": "e09d9e24-0c1f-4926-89c6-9af296db833f", "title": "microfrontends", "author": "", "description": "", "license": "by-sa", "metadata": { "author": {}, "site": { "name": "microfrontends", "logo": "assets/banner.jpg", "created": 1635276018, "updated": 1635276048, "git": {} }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "icon": "icons:add-circle-outline", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7" } }, "node": { "fields": {} }, "pageCount": 3 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/microfrontends/", "slug": "/bto108/sites/microfrontends/" }, { "id": "827f15f9-e0ab-4872-a917-89c3af531761", "title": "fgdgfdg", "author": "", "description": "own course", "license": "by-sa", "metadata": { "author": {}, "site": { "name": "fgdgfdg", "logo": "assets/banner.jpg", "lang": "en", "created": 1651780270, "updated": 1651780270, "git": {} }, "theme": { "element": "clean-two", "path": "@haxtheweb/clean-two/clean-two.js", "name": "Clean two theme", "thumbnail": "build/es6/node_modules/@haxtheweb/app-hax/lib/assets/images/PartyStyle.svg", "variables": { "icon": "icons:link", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7" } }, "node": { "fields": {} }, "pageCount": 1 }, "location": "/bto108/sites/fgdgfdg/", "indent": 0, "order": 0, "parent": null, "slug": "/bto108/sites/fgdgfdg/" }, { "id": "be5f376a-9cc3-4dd5-a441-5024b336a1d5", "title": "ldsc", "author": "", "description": "", "license": "by-sa", "metadata": { "author": { "image": "", "name": "", "email": "", "socialLink": "" }, "site": { "name": "ldsc", "logo": "assets/banner.jpg", "created": 1594994550, "updated": 1595266163, "git": { "autoPush": false, "branch": "", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" }, "version": "1.2.8", "domain": "", "static": { "cdn": "", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false } }, "theme": { "element": "clean-two", "path": "@haxtheweb/clean-one/clean-two.js", "name": "Course theme 2", "variables": { "image": "", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7", "icon": "icons:add-circle-outline" } }, "node": { "fields": {} }, "pageCount": 2 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/ldsc/", "slug": "/bto108/sites/ldsc/" }, { "id": "44d3fd13-4cec-4999-9a83-678334123d55", "title": "astro130", "author": "", "description": "", "license": "by-sa", "metadata": { "siteName": "astro130", "domain": null, "created": 1558624482, "updated": 1558624504, "theme": { "element": "learn-two-theme", "path": "@haxtheweb/learn-two-theme/learn-two-theme.js", "name": "Learn" }, "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "", "publishing": { "git": { "vendor": "github", "branch": "gh-pages" } }, "dynamicElementLoader": { "a11y-gif-player": "@haxtheweb/a11y-gif-player/a11y-gif-player.js", "code-sample": "@haxtheweb/code-sample/code-sample.js", "citation-element": "@haxtheweb/citation-element/citation-element.js", "hero-banner": "@haxtheweb/hero-banner/hero-banner.js", "image-compare-slider": "@haxtheweb/image-compare-slider/image-compare-slider.js", "license-element": "@haxtheweb/license-element/license-element.js", "lrn-calendar": "@haxtheweb/lrn-calendar/lrn-calendar.js", "lrn-math": "@haxtheweb/lrn-math/lrn-math.js", "lrn-table": "@haxtheweb/lrn-table/lrn-table.js", "lrn-vocab": "@haxtheweb/lrn-vocab/lrn-vocab.js", "lrndesign-blockquote": "@haxtheweb/lrndesign-blockquote/lrndesign-blockquote.js", "magazine-cover": "@haxtheweb/magazine-cover/magazine-cover.js", "media-behaviors": "@haxtheweb/media-behaviors/media-behaviors.js", "media-image": "@haxtheweb/media-image/media-image.js", "meme-maker": "@haxtheweb/meme-maker/meme-maker.js", "grid-plate": "@haxtheweb/grid-plate/grid-plate.js", "md-block": "@haxtheweb/md-block/md-block.js", "multiple-choice": "@haxtheweb/multiple-choice/multiple-choice.js", "paper-audio-player": "@haxtheweb/paper-audio-player/paper-audio-player.js", "person-testimonial": "@haxtheweb/person-testimonial/person-testimonial.js", "place-holder": "@haxtheweb/place-holder/place-holder.js", "q-r": "@haxtheweb/q-r/q-r.js", "full-width-image": "@haxtheweb/full-width-image/full-width-image.js", "self-check": "@haxtheweb/self-check/self-check.js", "simple-concept-network": "@haxtheweb/simple-concept-network/simple-concept-network.js", "stop-note": "@haxtheweb/stop-note/stop-note.js", "tab-list": "@haxtheweb/tab-list/tab-list.js", "task-list": "@haxtheweb/task-list/task-list.js", "video-player": "@haxtheweb/video-player/video-player.js", "wave-player": "@haxtheweb/wave-player/wave-player.js", "wikipedia-query": "@haxtheweb/wikipedia-query/wikipedia-query.js", "lrndesign-gallery": "@haxtheweb/lrndesign-gallery/lrndesign-gallery.js", "lrndesign-timeline": "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js" }, "pageCount": 92 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/astro130/", "slug": "/bto108/sites/astro130/" }, { "id": "2f8e931f-9af7-414a-a026-7079f70af361", "title": "geodz511", "author": "", "description": "Geo Design 511", "license": "by-sa", "metadata": { "author": { "image": "", "name": "", "socialLink": "", "email": "" }, "site": { "name": "geodz511", "created": 1569349769, "updated": 1640014827, "git": { "vendor": "github", "branch": "master", "autoPush": false, "staticBranch": "gh-pages", "publicRepoUrl": "", "url": "" }, "domain": "", "static": { "cdn": "webcomponents.psu.edu", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false }, "version": "3.0.0", "logo": "" }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "image": "", "hexCode": "", "cssVariable": "--simple-colors-default-theme-green-7", "icon": "device:graphic-eq" } }, "node": { "fields": {}, "dynamicElementLoader": { "h5p-element": "@haxtheweb/h5p-element/h5p-element.js", "hax-logo": "@haxtheweb/hax-logo/hax-logo.js", "a11y-gif-player": "@haxtheweb/a11y-gif-player/a11y-gif-player.js", "code-sample": "@haxtheweb/code-sample/code-sample.js", "citation-element": "@haxtheweb/citation-element/citation-element.js", "hero-banner": "@haxtheweb/hero-banner/hero-banner.js", "image-compare-slider": "@haxtheweb/image-compare-slider/image-compare-slider.js", "license-element": "@haxtheweb/license-element/license-element.js", "lrn-calendar": "@haxtheweb/lrn-calendar/lrn-calendar.js", "lrn-math": "@haxtheweb/lrn-math/lrn-math.js", "lrn-table": "@haxtheweb/lrn-table/lrn-table.js", "lrn-vocab": "@haxtheweb/lrn-vocab/lrn-vocab.js", "lrndesign-blockquote": "@haxtheweb/lrndesign-blockquote/lrndesign-blockquote.js", "magazine-cover": "@haxtheweb/magazine-cover/magazine-cover.js", "media-behaviors": "@haxtheweb/media-behaviors/media-behaviors.js", "media-image": "@haxtheweb/media-image/media-image.js", "meme-maker": "@haxtheweb/meme-maker/meme-maker.js", "grid-plate": "@haxtheweb/grid-plate/grid-plate.js", "md-block": "@haxtheweb/md-block/md-block.js", "multiple-choice": "@haxtheweb/multiple-choice/multiple-choice.js", "paper-audio-player": "@haxtheweb/paper-audio-player/paper-audio-player.js", "person-testimonial": "@haxtheweb/person-testimonial/person-testimonial.js", "place-holder": "@haxtheweb/place-holder/place-holder.js", "q-r": "@haxtheweb/q-r/q-r.js", "full-width-image": "@haxtheweb/full-width-image/full-width-image.js", "self-check": "@haxtheweb/self-check/self-check.js", "simple-concept-network": "@haxtheweb/simple-concept-network/simple-concept-network.js", "stop-note": "@haxtheweb/stop-note/stop-note.js", "tab-list": "@haxtheweb/tab-list/tab-list.js", "task-list": "@haxtheweb/task-list/task-list.js", "video-player": "@haxtheweb/video-player/video-player.js", "wave-player": "@haxtheweb/wave-player/wave-player.js", "wikipedia-query": "@haxtheweb/wikipedia-query/wikipedia-query.js", "lrndesign-gallery": "@haxtheweb/lrndesign-gallery/lrndesign-gallery.js", "lrndesign-timeline": "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js", "html-block": "@haxtheweb/html-block/html-block.js", "user-action": "@haxtheweb/user-action/user-action.js", "rss-items": "@haxtheweb/rss-items/rss-items.js" } }, "pageCount": 106 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/geodz511/", "slug": "/bto108/sites/geodz511/" }, { "id": "53f32f42-f80d-46c1-816f-23d49fcabc50", "title": "acctg211", "author": "", "description": "accounting", "license": "by-sa", "metadata": { "site": { "name": "acctg211", "created": 1610048864, "updated": 1612555993, "version": "2.0.9", "domain": "", "logo": "", "static": { "cdn": "build", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": true }, "git": { "autoPush": false, "branch": "master", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" } }, "theme": { "element": "clean-two", "path": "@haxtheweb/clean-two/clean-two.js", "name": "Course theme 2", "variables": { "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7", "icon": "device:battery-charging-full" } }, "updated": 1610048865, "author": { "image": "", "name": "", "email": "", "socialLink": "" }, "node": { "fields": {} }, "pageCount": 220 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/acctg211/", "slug": "/bto108/sites/acctg211/" }, { "id": "ab9357ac-c097-46aa-bf92-c0ae965c61b3", "title": "example", "author": "", "description": "", "license": "by-sa", "metadata": { "author": {}, "site": { "name": "example", "logo": "assets/banner.jpg", "lang": "en", "created": 1651194692, "updated": 1651194692, "git": {} }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "icon": "icons:add-circle-outline", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7" } }, "node": { "fields": {} }, "pageCount": 1 }, "location": "/bto108/sites/example/", "indent": 0, "order": 0, "parent": null, "slug": "/bto108/sites/example/" }, { "id": "879550a7-ef12-40d6-a491-051a628a10cb", "title": "IST 210", "author": "", "description": "Databases", "license": "by-nc", "metadata": { "author": { "image": "", "name": "Bryan Ollendyke", "email": "bto108@psu.edu", "socialLink": "https://twitter.com/btopro" }, "site": { "name": "ist210", "created": 1592403069, "updated": 1598281185, "git": { "autoPush": false, "branch": "", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" }, "version": "1.2.6", "domain": "", "logo": "files/headshot619778.2699999998.jpg", "static": { "cdn": "", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false } }, "theme": { "element": "clean-two", "path": "@haxtheweb/clean-two/clean-two.js", "name": "Course theme 2", "variables": { "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-red-7", "icon": "notification:confirmation-number" } }, "node": { "fields": {} }, "pageCount": 31 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/ist210/", "slug": "/bto108/sites/ist210/" }, { "id": "0e28ad66-e00f-4033-ae3e-4692f6f5a73e", "title": "IST 402", "author": "", "description": "Web Technologies and Activism", "license": "by-sa", "metadata": { "author": { "image": "files/ECrfY0IXUAA4qsQ.jpeg", "name": "Bryan Ollendyke", "email": "bto108@psu.edu", "socialLink": "https://twitter.com/btopro" }, "site": { "name": "ist402", "created": 1565898366, "updated": 1615262120, "git": { "autoPush": false, "branch": "master", "staticBranch": "gh-pages", "vendor": "github", "publicRepoUrl": "https://github.com/btopro/ist402/blob/master/", "url": "git@github.com:btopro/ist402.git" }, "version": "2.0.8", "domain": "", "logo": "files/1633609907554_48eae0bf5903e0f3b990_132.jpg", "static": { "cdn": "build", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": true, "forceUpgrade": true, "sw": false } }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-deep-purple-7", "icon": "icons:cloud-circle" } }, "node": { "fields": {}, "dynamicElementLoader": { "h5p-element": "@haxtheweb/h5p-element/h5p-element.js", "hax-logo": "@haxtheweb/hax-logo/hax-logo.js", "a11y-gif-player": "@haxtheweb/a11y-gif-player/a11y-gif-player.js", "code-sample": "@haxtheweb/code-sample/code-sample.js", "citation-element": "@haxtheweb/citation-element/citation-element.js", "hero-banner": "@haxtheweb/hero-banner/hero-banner.js", "image-compare-slider": "@haxtheweb/image-compare-slider/image-compare-slider.js", "license-element": "@haxtheweb/license-element/license-element.js", "lrn-calendar": "@haxtheweb/lrn-calendar/lrn-calendar.js", "lrn-math": "@haxtheweb/lrn-math/lrn-math.js", "lrn-table": "@haxtheweb/lrn-table/lrn-table.js", "lrn-vocab": "@haxtheweb/lrn-vocab/lrn-vocab.js", "lrndesign-blockquote": "@haxtheweb/lrndesign-blockquote/lrndesign-blockquote.js", "magazine-cover": "@haxtheweb/magazine-cover/magazine-cover.js", "media-behaviors": "@haxtheweb/media-behaviors/media-behaviors.js", "media-image": "@haxtheweb/media-image/media-image.js", "meme-maker": "@haxtheweb/meme-maker/meme-maker.js", "grid-plate": "@haxtheweb/grid-plate/grid-plate.js", "md-block": "@haxtheweb/md-block/md-block.js", "multiple-choice": "@haxtheweb/multiple-choice/multiple-choice.js", "paper-audio-player": "@haxtheweb/paper-audio-player/paper-audio-player.js", "person-testimonial": "@haxtheweb/person-testimonial/person-testimonial.js", "place-holder": "@haxtheweb/place-holder/place-holder.js", "q-r": "@haxtheweb/q-r/q-r.js", "full-width-image": "@haxtheweb/full-width-image/full-width-image.js", "self-check": "@haxtheweb/self-check/self-check.js", "simple-concept-network": "@haxtheweb/simple-concept-network/simple-concept-network.js", "stop-note": "@haxtheweb/stop-note/stop-note.js", "tab-list": "@haxtheweb/tab-list/tab-list.js", "task-list": "@haxtheweb/task-list/task-list.js", "video-player": "@haxtheweb/video-player/video-player.js", "wave-player": "@haxtheweb/wave-player/wave-player.js", "wikipedia-query": "@haxtheweb/wikipedia-query/wikipedia-query.js", "lrndesign-gallery": "@haxtheweb/lrndesign-gallery/lrndesign-gallery.js", "lrndesign-timeline": "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js", "html-block": "@haxtheweb/html-block/html-block.js", "user-action": "@haxtheweb/user-action/user-action.js", "rss-items": "@haxtheweb/rss-items/rss-items.js" } }, "pageCount": 48 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/ist402/", "slug": "/bto108/sites/ist402/" } ] } } ================================================ FILE: dist/dev/sitesEmpty.json ================================================ { "status": 200, "data": { "id": "123-123-123-123", "title": "My sites", "author": "me", "description": "All of my micro sites I know and love.", "license": "by-sa", "metadata": [], "items": [] } } ================================================ FILE: dist/dev/userData.json ================================================ { "status": 200, "data": { "userName": "admin", "fName": "Bryan", "lName": "Ollendyke", "userPicture": "https://btopro.com/files/headshot.jpg", "social": { "twitter": "https://twitter.com/btopro", "website": "https://btopro" }, "integrations": { "github": { "token": "....", "name": "btopro", "email": "btopro@outlook.com" } } } } ================================================ FILE: dist/dev.html ================================================ HAXCMS

    Loading site..

    ================================================ FILE: dist/hax-elements-registry.json ================================================ { "-omfofks": "label", "a11y-collapse": "A11y Collapse", "a11y-collapse-group": "A11y Collapse Group", "a11y-details": "Accessible Details Button", "a11y-figure": "Descriptive Figure", "a11y-gif-player": "A11y Gif Player", "a11y-tab": "Tab", "a11y-tabs": "A11y Tabs", "accent-card": "Card", "activity-box": "Activity Box", "aframe-player": "3D player", "ai-usage-license": "AI Usage License", "app-hax-site-bar": "App Hax Site Bar", "app-hax-site-button": "App Hax Site Button", "audio": "Audio", "audio-player": "caption", "author-card": "Author Card", "awesome-explosion": "Awesome Explosion", "b": "Bold", "beaker-broker": "Beaker Broker", "bkXE4h-7": "title", "block-quote": "Block Quote", "blockquote": "Block quote", "C-KOWwKf": "label", "caption": "Caption", "check-it-out": "Check It Out", "citation-builder": "Citation Builder", "citation-element": "title", "citation-item": "citation-item", "cite": "Citation", "cms-block": "CMS Block", "cms-entity": "CMS Entity", "cms-token": "CMS Token", "cms-views": "CMS View", "code": "Code", "code-sample": "Code sample", "collection-item": "Collection Item", "collection-list": "Collection List", "collection-row": "Collection Row", "count-up": "Count up", "course-model": "3d Model", "Ctdgwp-s": "Ctdgwp S", "d-d-docs": "Design, Develop, Destroy", "date-card": "Date Card", "dd": "Data definition", "ddd-card": "Ddd Card", "ddd-steps-list": "Ddd Steps List", "ddd-steps-list-item": "Ddd Steps List Item", "discord-embed": "Discord Embed", "div": "DIV", "dl": "Data list", "dt": "Data term", "ebook-button": "title", "editable-table": "Editable Table", "em": "Emphasis", "embed": "Embedded object", "enhanced-text": "Enhanced text", "event-badge": "Event Badge", "example-hax-element": "Example Hax Element", "figure-label": "Figure label", "fill-in-the-blanks": "Fill In The Blanks", "flash-card": "Flash Card", "flash-card-set": "Flash Card Set", "full-width-image": "Full Width Image", "github-preview": "Github Preview", "github-rpg-contributors": "Github Rpg Contributors", "glossy-portfolio-about": "Glossy Portfolio About", "glossy-portfolio-breadcrumb": "Glossy Portfolio Breadcrumb", "glossy-portfolio-card": "Glossy Portfolio Card", "glossy-portfolio-footer": "Glossy Portfolio Footer", "glossy-portfolio-grid": "Glossy Portfolio Grid", "glossy-portfolio-header": "Glossy Portfolio Header", "glossy-portfolio-home": "Glossy Portfolio Home", "glossy-portfolio-theme": "Glossy Portfolio Theme", "grid-plate": "Column layout", "h1": "Heading", "h2": "Heading", "h3": "Heading", "h4": "Heading", "h5": "Heading", "h5p-element": "H5p Element", "h6": "Heading", "hax-autoloader": "Hax Autoloader", "hax-body": "Hax Body", "hax-context-item": "Hax Context Item", "hax-context-item-textop": "Hax Context Item Textop", "hax-element-list-selector": "Hax Element List Selector", "hax-logo": "Hax Logo", "hax-store": "Image Gallery", "haxcms-site-disqus": "Haxcms Site Disqus", "haxcms-site-editor-ui": "Load component schema", "hex-picker": "Hex Picker", "html-block": "Html block", "i": "Italic", "iframe-loader": "Iframe Loader", "image-compare-slider": "Image Compare Slider", "inline-audio": "Inline Audio", "instruction-card": "Image Gallery", "la-tex": "La Tex", "learning-component": "Learning Component", "lecture-player": "caption", "lesson-highlight": "Lesson Highlight", "lesson-overview": "Lesson Overview", "li": "List item", "license-element": "title", "lrn-h5p": "H5P Element", "lrn-math": "Math", "lrn-table": "Lrn Table", "lrn-vocab": "Vocab", "lrndesign-bar": "Lrndesign Bar", "lrndesign-chart": "Lrndesign Chart", "lrndesign-line": "Lrndesign Line", "lrndesign-pie": "Lrndesign Pie", "lrndesign-timeline": "Timeline", "lrs-emitter": "Lrs emitter", "mark-the-words": "Mark The Words", "matching-question": "Matching Question", "md-block": "Markdown", "media-image": "alt", "media-quote": "Media Quote", "meme-maker": "Meme Maker", "moar-sarcasm": "Moar Sarcasm", "multiple-choice": "Multiple Choice", "music-player": "Music Player", "oer-schema": "Schema", "ol": "Numbered list", "page-anchor": "Page Anchor", "page-break": "Page Break", "page-flag": "Page Flag", "page-section": "Page Section", "page-template": "Page Template", "parallax-image": "Parallax image", "person-testimonial": "Person Testimonial", "picture": "Picture", "place-holder": "Placeholder", "play-list": "Play List", "post-card": "Post Card", "pre": "Preformatted", "product-glance": "Product Glance", "progress-donut": "Progress Donut", "q-r": "Q R", "relative-heading": "Relative heading", "responsive-iframe": "Responsive iframe", "retro-card": "Retro card", "rpg-character": "Rpg Character", "runkit-embed": "Runkit Embed", "screen-recorder": "Screen Recorder", "section": "Section", "self-check": "Self Check", "short-answer-question": "Short Answer Question", "simple-cta": "label", "simple-fields": "Simple Fields", "simple-icon": "Simple Icon", "simple-img": "Simple Img", "simple-tags": "Simple Tags", "simple-toolbar": "Tag name", "simple-wc": "Simple Wc", "site-active-title": "HAXcms active title", "site-available-themes": "Available Themes", "site-breadcrumb": "HAXcms active title", "site-children-block": "HAXcms: child block", "site-collection-list": "Site Collection List", "site-menu": "HAXcms active title", "site-menu-button": "HAXcms active title", "site-query": "HAXcms active title", "site-random-content": "Random Page Content", "site-remote-content": "Remote Content", "site-rss-button": "HAXcms active title", "site-title": "HAXcms active title", "site-uuid-link": "HAX link", "site-view": "Site View", "sorting-question": "Sorting Question", "span": "SPAN", "spotify-embed": "Spotify Embed", "stop-note": "Stop Note", "strike": "Cross out", "strong": "Bold", "sub": "Subscript", "sup": "Superscript", "tagging-question": "Tagging Question", "time": "Time", "true-false-question": "True False Question", "twitter-embed": "Twitter Embed", "type-writer": "Type writer", "u": "Underline", "ul": "Bulleted list", "un-sdg": "Un Sdg", "unity-webgl": "Unity Player", "user-action": "User Action", "video": "Video", "video-player": "caption", "vocab-term": "Vocab Term", "web-container": "Web Container", "web-container-doc-player": "Web Container Doc Player", "wikipedia-query": "title", "worksheet-download": "Worksheet Download" } ================================================ FILE: dist/sites.json ================================================ { "status": 200, "data": { "id": "123-123-123-123", "title": "My sites", "author": "me", "description": "All of my micro sites I know and love.", "license": "by-sa", "metadata": [], "items": [ { "id": "0e28ad66-e00f-4033-ae3e-4692f6f5a73e", "title": "IST 402", "author": "", "description": "Web Technologies and Activism", "license": "by-sa", "metadata": { "author": { "image": "files/ECrfY0IXUAA4qsQ.jpeg", "name": "Bryan Ollendyke", "email": "bto108@psu.edu", "socialLink": "https://twitter.com/btopro" }, "site": { "name": "ist402", "created": 1565898366, "updated": 1615262120, "git": { "autoPush": false, "branch": "master", "staticBranch": "gh-pages", "vendor": "github", "publicRepoUrl": "https://github.com/btopro/ist402/blob/master/", "url": "git@github.com:btopro/ist402.git" }, "version": "2.0.8", "domain": "", "logo": "files/1633609907554_48eae0bf5903e0f3b990_132.jpg", "static": { "cdn": "build", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": true, "forceUpgrade": true, "sw": false } }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-deep-purple-7", "icon": "icons:cloud-circle" } }, "node": { "fields": {}, "dynamicElementLoader": { "h5p-element": "@haxtheweb/h5p-element/h5p-element.js", "hax-logo": "@haxtheweb/hax-logo/hax-logo.js", "a11y-gif-player": "@haxtheweb/a11y-gif-player/a11y-gif-player.js", "code-sample": "@haxtheweb/code-sample/code-sample.js", "citation-element": "@haxtheweb/citation-element/citation-element.js", "hero-banner": "@haxtheweb/hero-banner/hero-banner.js", "image-compare-slider": "@haxtheweb/image-compare-slider/image-compare-slider.js", "license-element": "@haxtheweb/license-element/license-element.js", "lrn-calendar": "@haxtheweb/lrn-calendar/lrn-calendar.js", "lrn-math": "@haxtheweb/lrn-math/lrn-math.js", "lrn-table": "@haxtheweb/lrn-table/lrn-table.js", "lrn-vocab": "@haxtheweb/lrn-vocab/lrn-vocab.js", "lrndesign-blockquote": "@haxtheweb/lrndesign-blockquote/lrndesign-blockquote.js", "magazine-cover": "@haxtheweb/magazine-cover/magazine-cover.js", "media-behaviors": "@haxtheweb/media-behaviors/media-behaviors.js", "media-image": "@haxtheweb/media-image/media-image.js", "meme-maker": "@haxtheweb/meme-maker/meme-maker.js", "grid-plate": "@haxtheweb/grid-plate/grid-plate.js", "md-block": "@haxtheweb/md-block/md-block.js", "multiple-choice": "@haxtheweb/multiple-choice/multiple-choice.js", "paper-audio-player": "@haxtheweb/paper-audio-player/paper-audio-player.js", "person-testimonial": "@haxtheweb/person-testimonial/person-testimonial.js", "place-holder": "@haxtheweb/place-holder/place-holder.js", "q-r": "@haxtheweb/q-r/q-r.js", "full-width-image": "@haxtheweb/full-width-image/full-width-image.js", "self-check": "@haxtheweb/self-check/self-check.js", "simple-concept-network": "@haxtheweb/simple-concept-network/simple-concept-network.js", "stop-note": "@haxtheweb/stop-note/stop-note.js", "tab-list": "@haxtheweb/tab-list/tab-list.js", "task-list": "@haxtheweb/task-list/task-list.js", "video-player": "@haxtheweb/video-player/video-player.js", "wave-player": "@haxtheweb/wave-player/wave-player.js", "wikipedia-query": "@haxtheweb/wikipedia-query/wikipedia-query.js", "lrndesign-gallery": "@haxtheweb/lrndesign-gallery/lrndesign-gallery.js", "lrndesign-timeline": "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js", "html-block": "@haxtheweb/html-block/html-block.js", "user-action": "@haxtheweb/user-action/user-action.js", "rss-items": "@haxtheweb/rss-items/rss-items.js" } }, "pageCount": 48 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/ist402/", "slug": "/bto108/sites/ist402/" }, { "id": "53f32f42-f80d-46c1-816f-23d49fcabc50", "title": "acctg211", "author": "", "description": "accounting", "license": "by-sa", "metadata": { "site": { "name": "acctg211", "created": 1610048864, "updated": 1612555993, "version": "2.0.9", "domain": "", "logo": "", "static": { "cdn": "build", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": true }, "git": { "autoPush": false, "branch": "master", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" } }, "theme": { "element": "clean-two", "path": "@haxtheweb/clean-two/clean-two.js", "name": "Course theme 2", "variables": { "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7", "icon": "device:battery-charging-full" } }, "updated": 1610048865, "author": { "image": "", "name": "", "email": "", "socialLink": "" }, "node": { "fields": {} }, "pageCount": 220 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/acctg211/", "slug": "/bto108/sites/acctg211/" }, { "id": "2f8e931f-9af7-414a-a026-7079f70af361", "title": "geodz511", "author": "", "description": "Geo Design 511", "license": "by-sa", "metadata": { "author": { "image": "", "name": "", "socialLink": "", "email": "" }, "site": { "name": "geodz511", "created": 1569349769, "updated": 1640014827, "git": { "vendor": "github", "branch": "master", "autoPush": false, "staticBranch": "gh-pages", "publicRepoUrl": "", "url": "" }, "domain": "", "static": { "cdn": "webcomponents.psu.edu", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false }, "version": "3.0.0", "logo": "" }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "image": "", "hexCode": "", "cssVariable": "--simple-colors-default-theme-green-7", "icon": "device:graphic-eq" } }, "node": { "fields": {}, "dynamicElementLoader": { "h5p-element": "@haxtheweb/h5p-element/h5p-element.js", "hax-logo": "@haxtheweb/hax-logo/hax-logo.js", "a11y-gif-player": "@haxtheweb/a11y-gif-player/a11y-gif-player.js", "code-sample": "@haxtheweb/code-sample/code-sample.js", "citation-element": "@haxtheweb/citation-element/citation-element.js", "hero-banner": "@haxtheweb/hero-banner/hero-banner.js", "image-compare-slider": "@haxtheweb/image-compare-slider/image-compare-slider.js", "license-element": "@haxtheweb/license-element/license-element.js", "lrn-calendar": "@haxtheweb/lrn-calendar/lrn-calendar.js", "lrn-math": "@haxtheweb/lrn-math/lrn-math.js", "lrn-table": "@haxtheweb/lrn-table/lrn-table.js", "lrn-vocab": "@haxtheweb/lrn-vocab/lrn-vocab.js", "lrndesign-blockquote": "@haxtheweb/lrndesign-blockquote/lrndesign-blockquote.js", "magazine-cover": "@haxtheweb/magazine-cover/magazine-cover.js", "media-behaviors": "@haxtheweb/media-behaviors/media-behaviors.js", "media-image": "@haxtheweb/media-image/media-image.js", "meme-maker": "@haxtheweb/meme-maker/meme-maker.js", "grid-plate": "@haxtheweb/grid-plate/grid-plate.js", "md-block": "@haxtheweb/md-block/md-block.js", "multiple-choice": "@haxtheweb/multiple-choice/multiple-choice.js", "paper-audio-player": "@haxtheweb/paper-audio-player/paper-audio-player.js", "person-testimonial": "@haxtheweb/person-testimonial/person-testimonial.js", "place-holder": "@haxtheweb/place-holder/place-holder.js", "q-r": "@haxtheweb/q-r/q-r.js", "full-width-image": "@haxtheweb/full-width-image/full-width-image.js", "self-check": "@haxtheweb/self-check/self-check.js", "simple-concept-network": "@haxtheweb/simple-concept-network/simple-concept-network.js", "stop-note": "@haxtheweb/stop-note/stop-note.js", "tab-list": "@haxtheweb/tab-list/tab-list.js", "task-list": "@haxtheweb/task-list/task-list.js", "video-player": "@haxtheweb/video-player/video-player.js", "wave-player": "@haxtheweb/wave-player/wave-player.js", "wikipedia-query": "@haxtheweb/wikipedia-query/wikipedia-query.js", "lrndesign-gallery": "@haxtheweb/lrndesign-gallery/lrndesign-gallery.js", "lrndesign-timeline": "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js", "html-block": "@haxtheweb/html-block/html-block.js", "user-action": "@haxtheweb/user-action/user-action.js", "rss-items": "@haxtheweb/rss-items/rss-items.js" } }, "pageCount": 106 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/geodz511/", "slug": "/bto108/sites/geodz511/" }, { "id": "e09d9e24-0c1f-4926-89c6-9af296db833f", "title": "microfrontends", "author": "", "description": "", "license": "by-sa", "metadata": { "author": {}, "site": { "name": "microfrontends", "logo": "assets/banner.jpg", "created": 1635276018, "updated": 1635276048, "git": {} }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "icon": "icons:add-circle-outline", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7" } }, "node": { "fields": {} }, "pageCount": 3 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/microfrontends/", "slug": "/bto108/sites/microfrontends/" }, { "id": "b47fe456-cb6f-438c-9182-bd6694c2cfb3", "title": "static-this-shit", "author": "", "description": "", "license": "by-sa", "metadata": { "author": {}, "site": { "name": "static-this-shit", "logo": "assets/banner.jpg", "created": 1635530037, "updated": 1635530037, "git": {} }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "icon": "icons:add-circle-outline", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7" } }, "node": { "fields": {} }, "pageCount": 2 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/static-this-shit/", "slug": "/bto108/sites/static-this-shit/" }, { "id": "879550a7-ef12-40d6-a491-051a628a10cb", "title": "IST 210", "author": "", "description": "Databases", "license": "by-nc", "metadata": { "author": { "image": "", "name": "Bryan Ollendyke", "email": "bto108@psu.edu", "socialLink": "https://twitter.com/btopro" }, "site": { "name": "ist210", "created": 1592403069, "updated": 1598281185, "git": { "autoPush": false, "branch": "", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" }, "version": "1.2.6", "domain": "", "logo": "files/headshot619778.2699999998.jpg", "static": { "cdn": "", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false } }, "theme": { "element": "clean-two", "path": "@haxtheweb/clean-two/clean-two.js", "name": "Course theme 2", "variables": { "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-red-7", "icon": "notification:confirmation-number" } }, "node": { "fields": {} }, "pageCount": 31 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/ist210/", "slug": "/bto108/sites/ist210/" }, { "id": "be5f376a-9cc3-4dd5-a441-5024b336a1d5", "title": "ldsc", "author": "", "description": "", "license": "by-sa", "metadata": { "author": { "image": "", "name": "", "email": "", "socialLink": "" }, "site": { "name": "ldsc", "logo": "assets/banner.jpg", "created": 1594994550, "updated": 1595266163, "git": { "autoPush": false, "branch": "", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" }, "version": "1.2.8", "domain": "", "static": { "cdn": "", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false } }, "theme": { "element": "clean-two", "path": "@haxtheweb/clean-one/clean-two.js", "name": "Course theme 2", "variables": { "image": "", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7", "icon": "icons:add-circle-outline" } }, "node": { "fields": {} }, "pageCount": 2 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/ldsc/", "slug": "/bto108/sites/ldsc/" }, { "id": "d0ce73f6-4351-426f-a015-202e686e68db", "title": "edtechjoker", "author": "", "description": "Resources to improve education one piece at at time.", "license": "by-sa", "metadata": { "author": { "image": "", "name": "", "email": "", "socialLink": "" }, "site": { "name": "edtechjoker", "logo": "assets/banner.jpg", "created": 1629208877, "updated": 1642013655, "git": { "autoPush": false, "branch": "", "staticBranch": "", "vendor": "", "publicRepoUrl": "", "url": "" }, "version": "3.0.0", "domain": "", "static": { "cdn": "", "offline": false }, "settings": { "pathauto": false, "publishPagesOn": false, "sw": false, "forceUpgrade": false } }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "image": "", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7", "icon": "av:closed-caption" } }, "node": { "fields": {} }, "pageCount": 13 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/edtechjoker/", "slug": "/bto108/sites/edtechjoker/" }, { "id": "e2074368-55a5-4aee-95ca-b906afd30f52", "title": "clunkyform", "author": "", "description": "and im riffing on purpose", "license": "by-sa", "metadata": { "author": {}, "site": { "name": "clunkyform", "logo": "assets/banner.jpg", "created": 1644856484, "updated": 1644856484, "git": {} }, "theme": { "element": "clean-one", "path": "@haxtheweb/clean-one/clean-one.js", "name": "Course theme", "variables": { "icon": "icons:add-circle-outline", "hexCode": "#aeff00", "cssVariable": "--simple-colors-default-theme-light-blue-7" } }, "node": { "fields": {} }, "pageCount": 4 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/clunkyform/", "slug": "/bto108/sites/clunkyform/" }, { "id": "44d3fd13-4cec-4999-9a83-678334123d55", "title": "astro130", "author": "", "description": "", "license": "by-sa", "metadata": { "siteName": "astro130", "domain": null, "site": { "created": 1558624482, "updated": 1558624504 }, "theme": { "element": "learn-two-theme", "path": "@haxtheweb/learn-two-theme/learn-two-theme.js", "name": "Learn" }, "image": "assets/banner.jpg", "hexCode": "#aeff00", "cssVariable": "", "publishing": { "git": { "vendor": "github", "branch": "gh-pages" } }, "dynamicElementLoader": { "a11y-gif-player": "@haxtheweb/a11y-gif-player/a11y-gif-player.js", "code-sample": "@haxtheweb/code-sample/code-sample.js", "citation-element": "@haxtheweb/citation-element/citation-element.js", "hero-banner": "@haxtheweb/hero-banner/hero-banner.js", "image-compare-slider": "@haxtheweb/image-compare-slider/image-compare-slider.js", "license-element": "@haxtheweb/license-element/license-element.js", "lrn-calendar": "@haxtheweb/lrn-calendar/lrn-calendar.js", "lrn-math": "@haxtheweb/lrn-math/lrn-math.js", "lrn-table": "@haxtheweb/lrn-table/lrn-table.js", "lrn-vocab": "@haxtheweb/lrn-vocab/lrn-vocab.js", "lrndesign-blockquote": "@haxtheweb/lrndesign-blockquote/lrndesign-blockquote.js", "magazine-cover": "@haxtheweb/magazine-cover/magazine-cover.js", "media-behaviors": "@haxtheweb/media-behaviors/media-behaviors.js", "media-image": "@haxtheweb/media-image/media-image.js", "meme-maker": "@haxtheweb/meme-maker/meme-maker.js", "grid-plate": "@haxtheweb/grid-plate/grid-plate.js", "md-block": "@haxtheweb/md-block/md-block.js", "multiple-choice": "@haxtheweb/multiple-choice/multiple-choice.js", "paper-audio-player": "@haxtheweb/paper-audio-player/paper-audio-player.js", "person-testimonial": "@haxtheweb/person-testimonial/person-testimonial.js", "place-holder": "@haxtheweb/place-holder/place-holder.js", "q-r": "@haxtheweb/q-r/q-r.js", "full-width-image": "@haxtheweb/full-width-image/full-width-image.js", "self-check": "@haxtheweb/self-check/self-check.js", "simple-concept-network": "@haxtheweb/simple-concept-network/simple-concept-network.js", "stop-note": "@haxtheweb/stop-note/stop-note.js", "tab-list": "@haxtheweb/tab-list/tab-list.js", "task-list": "@haxtheweb/task-list/task-list.js", "video-player": "@haxtheweb/video-player/video-player.js", "wave-player": "@haxtheweb/wave-player/wave-player.js", "wikipedia-query": "@haxtheweb/wikipedia-query/wikipedia-query.js", "lrndesign-gallery": "@haxtheweb/lrndesign-gallery/lrndesign-gallery.js", "lrndesign-timeline": "@haxtheweb/lrndesign-timeline/lrndesign-timeline.js" }, "pageCount": 92 }, "indent": 0, "order": 0, "parent": null, "location": "/bto108/sites/astro130/", "slug": "/bto108/sites/astro130/" } ] } } ================================================ FILE: dist/wc-registry.json ================================================ {"focus-trap":"@a11y/focus-trap/focus-trap.js","local-time":"@github/time-elements/dist/local-time-element.js","relative-time":"@github/time-elements/dist/relative-time-element.js","time-ago":"@github/time-elements/dist/time-ago-element.js","time-until":"@github/time-elements/dist/time-until-element.js","model-viewer":"@google/model-viewer/dist/model-viewer.js","a11y-carousel":"@haxtheweb/a11y-carousel/a11y-carousel.js","a11y-carousel-button":"@haxtheweb/a11y-carousel/lib/a11y-carousel-button.js","a11y-collapse":"@haxtheweb/a11y-collapse/a11y-collapse.js","a11y-collapse-group":"@haxtheweb/a11y-collapse/lib/a11y-collapse-group.js","a11y-compare-image":"@haxtheweb/a11y-compare-image/a11y-compare-image.js","a11y-details":"@haxtheweb/a11y-details/a11y-details.js","a11y-figure":"@haxtheweb/a11y-figure/a11y-figure.js","a11y-gif-player":"@haxtheweb/a11y-gif-player/a11y-gif-player.js","a11y-media-player":"@haxtheweb/a11y-media-player/a11y-media-player.js","a11y-media-button":"@haxtheweb/a11y-media-player/lib/a11y-media-button.js","a11y-media-play-button":"@haxtheweb/a11y-media-player/lib/a11y-media-play-button.js","a11y-media-state-manager":"@haxtheweb/a11y-media-player/lib/a11y-media-state-manager.js","a11y-media-transcript-cue":"@haxtheweb/a11y-media-player/lib/a11y-media-transcript-cue.js","a11y-media-youtube":"@haxtheweb/a11y-media-player/lib/a11y-media-youtube.js","a11y-menu-button":"@haxtheweb/a11y-menu-button/a11y-menu-button.js","a11y-menu-button-item":"@haxtheweb/a11y-menu-button/lib/a11y-menu-button-item.js","a11y-tabs":"@haxtheweb/a11y-tabs/a11y-tabs.js","a11y-tab":"@haxtheweb/a11y-tabs/lib/a11y-tab.js","absolute-position-behavior":"@haxtheweb/absolute-position-behavior/absolute-position-behavior.js","absolute-position-state-manager":"@haxtheweb/absolute-position-behavior/lib/absolute-position-state-manager.js","accent-card":"@haxtheweb/accent-card/accent-card.js","aframe-player":"@haxtheweb/aframe-player/aframe-player.js","ai-usage-license":"@haxtheweb/ai-usage-license/ai-usage-license.js","air-horn":"@haxtheweb/air-horn/air-horn.js","app-hax":"@haxtheweb/app-hax/app-hax.js","app-hax-theme":"@haxtheweb/app-hax/lib/app-hax-theme.js","random-word":"@haxtheweb/app-hax/lib/random-word/random-word.js","rpg-character-toast":"@haxtheweb/haxcms-elements/lib/core/ui/rpg-character-toast/rpg-character-toast.js","app-hax-button":"@haxtheweb/app-hax/lib/v2/app-hax-button.js","app-hax-hat-progress":"@haxtheweb/app-hax/lib/v2/app-hax-hat-progress.js","app-hax-label":"@haxtheweb/app-hax/lib/v2/app-hax-label.js","app-hax-search-bar":"@haxtheweb/app-hax/lib/v1/app-hax-search-bar.js","app-hax-search-results":"@haxtheweb/app-hax/lib/v2/app-hax-search-results.js","app-hax-site-bar":"@haxtheweb/app-hax/lib/v2/app-hax-site-bar.js","app-hax-site-button":"@haxtheweb/app-hax/lib/v2/app-hax-site-button.js","app-hax-site-details":"@haxtheweb/app-hax/lib/v2/app-hax-site-details.js","app-hax-site-login":"@haxtheweb/app-hax/lib/v2/app-hax-site-login.js","app-hax-steps":"@haxtheweb/app-hax/lib/v2/app-hax-steps.js","app-hax-toast":"@haxtheweb/app-hax/lib/v2/app-hax-toast.js","app-hax-top-bar":"@haxtheweb/haxcms-elements/lib/core/ui/app-hax-top-bar.js","app-hax-user-menu-button":"@haxtheweb/haxcms-elements/lib/core/ui/app-hax-user-menu-button.js","app-hax-user-menu":"@haxtheweb/haxcms-elements/lib/core/ui/app-hax-user-menu.js","app-hax-wired-toggle":"@haxtheweb/app-hax/lib/v2/app-hax-wired-toggle.js","app-hax-backend-api":"@haxtheweb/app-hax/lib/v2/AppHaxBackendAPI.js","app-hax-router":"@haxtheweb/app-hax/lib/v2/AppHaxRouter.js","app-hax-confirmation-modal":"@haxtheweb/app-hax/lib/v2/app-hax-confirmation-modal.js","app-hax-filter-tag":"@haxtheweb/app-hax/lib/v2/app-hax-filter-tag.js","app-hax-scroll-button":"@haxtheweb/app-hax/lib/v2/app-hax-scroll-button.js","app-hax-simple-hat-progress":"@haxtheweb/app-hax/lib/v2/app-hax-simple-hat-progress.js","app-hax-site-creation-modal":"@haxtheweb/app-hax/lib/v2/app-hax-site-creation-modal.js","app-hax-use-case-filter":"@haxtheweb/app-hax/lib/v2/app-hax-use-case-filter.js","app-hax-use-case":"@haxtheweb/app-hax/lib/v2/app-hax-use-case.js","app-hax-user-access-modal":"@haxtheweb/app-hax/lib/v2/app-hax-user-access-modal.js","wired-darkmode-toggle":"@haxtheweb/haxcms-elements/lib/core/ui/wired-darkmode-toggle/wired-darkmode-toggle.js","audio-player":"@haxtheweb/audio-player/audio-player.js","author-card":"@haxtheweb/author-card/author-card.js","awesome-explosion":"@haxtheweb/awesome-explosion/awesome-explosion.js","b-r":"@haxtheweb/b-r/b-r.js","barcode-reader":"@haxtheweb/barcode-reader/barcode-reader.js","beaker-broker":"@haxtheweb/beaker-broker/beaker-broker.js","bootstrap-theme":"@haxtheweb/bootstrap-theme/bootstrap-theme.js","bootstrap-breadcrumb":"@haxtheweb/bootstrap-theme/lib/BootstrapBreadcrumb.js","bootstrap-footer":"@haxtheweb/bootstrap-theme/lib/BootstrapFooter.js","bootstrap-search":"@haxtheweb/bootstrap-theme/lib/BootstrapSearch.js","chartist-render":"@haxtheweb/chartist-render/chartist-render.js","chat-agent":"@haxtheweb/chat-agent/chat-agent.js","chat-button":"@haxtheweb/chat-agent/lib/chat-button.js","chat-control-bar":"@haxtheweb/chat-agent/lib/chat-control-bar.js","chat-developer-panel":"@haxtheweb/chat-agent/lib/chat-developer-panel.js","chat-input":"@haxtheweb/chat-agent/lib/chat-input.js","chat-interface":"@haxtheweb/chat-agent/lib/chat-interface.js","chat-message":"@haxtheweb/chat-agent/lib/chat-message.js","chat-suggestion":"@haxtheweb/chat-agent/lib/chat-suggestion.js","check-it-out":"@haxtheweb/check-it-out/check-it-out.js","citation-builder":"@haxtheweb/citation-builder/citation-builder.js","citation-item":"@haxtheweb/citation-builder/lib/citation-item.js","citation-element":"@haxtheweb/citation-element/citation-element.js","clean-one":"@haxtheweb/clean-one/clean-one.js","clean-one-search-box":"@haxtheweb/clean-one/lib/clean-one-search-box.js","clean-portfolio-theme":"@haxtheweb/clean-portfolio-theme/clean-portfolio-theme.js","clean-two":"@haxtheweb/clean-two/clean-two.js","cms-hax":"@haxtheweb/cms-hax/cms-hax.js","cms-block":"@haxtheweb/cms-hax/lib/cms-block.js","cms-entity":"@haxtheweb/cms-hax/lib/cms-entity.js","cms-token":"@haxtheweb/cms-hax/lib/cms-token.js","cms-views":"@haxtheweb/cms-hax/lib/cms-views.js","code-editor":"@haxtheweb/code-editor/code-editor.js","code-pen-button":"@haxtheweb/code-editor/lib/code-pen-button.js","monaco-element":"@haxtheweb/code-editor/lib/monaco-element/monaco-element.js","code-sample":"@haxtheweb/code-sample/code-sample.js","collection-list":"@haxtheweb/collection-list/collection-list.js","collection-item":"@haxtheweb/collection-list/lib/collection-item.js","collection-row":"@haxtheweb/collection-list/lib/collection-row.js","collections-theme-banner":"@haxtheweb/collection-list/lib/collections-theme-banner.js","collections-theme":"@haxtheweb/collection-list/lib/collections-theme.js","count-up":"@haxtheweb/count-up/count-up.js","course-design":"@haxtheweb/course-design/course-design.js","activity-box":"@haxtheweb/course-design/lib/activity-box.js","block-quote":"@haxtheweb/course-design/lib/block-quote.js","course-intro-header":"@haxtheweb/course-design/lib/course-intro-header.js","course-intro-lesson-plan":"@haxtheweb/course-design/lib/course-intro-lesson-plan.js","course-intro-lesson-plans":"@haxtheweb/course-design/lib/course-intro-lesson-plans.js","course-intro":"@haxtheweb/course-design/lib/course-intro.js","ebook-button":"@haxtheweb/course-design/lib/ebook-button.js","learning-component":"@haxtheweb/course-design/lib/learning-component.js","lrn-h5p":"@haxtheweb/course-design/lib/lrn-h5p.js","responsive-iframe":"@haxtheweb/course-design/lib/responsive-iframe.js","worksheet-download":"@haxtheweb/course-design/lib/worksheet-download.js","course-model":"@haxtheweb/course-model/course-model.js","model-info":"@haxtheweb/course-model/lib/model-info.js","model-option":"@haxtheweb/course-model/lib/model-option.js","csv-render":"@haxtheweb/csv-render/csv-render.js","d-d-d":"@haxtheweb/d-d-d/d-d-d.js","ddd-brochure-theme":"@haxtheweb/d-d-d/lib/ddd-brochure-theme.js","ddd-card":"@haxtheweb/d-d-d/lib/ddd-card.js","ddd-steps-list-item":"@haxtheweb/d-d-d/lib/ddd-steps-list-item.js","ddd-steps-list":"@haxtheweb/d-d-d/lib/ddd-steps-list.js","design-system":"@haxtheweb/d-d-d/lib/DesignSystemManager.js","hax-palette-picker":"@haxtheweb/d-d-d/lib/hax-palette-picker.js","mini-map":"@haxtheweb/d-d-d/lib/mini-map.js","d-d-docs":"@haxtheweb/d-d-docs/d-d-docs.js","data-viz":"@haxtheweb/data-viz/data-viz.js","date-card":"@haxtheweb/date-card/date-card.js","date-chip":"@haxtheweb/date-card/lib/date-chip.js","demo-snippet":"@haxtheweb/demo-snippet/demo-snippet.js","discord-embed":"@haxtheweb/discord-embed/discord-embed.js","disqus-embed":"@haxtheweb/disqus-embed/disqus-embed.js","haxcms-site-disqus":"@haxtheweb/disqus-embed/lib/haxcms-site-disqus.js","documentation-player":"@haxtheweb/documentation-player/documentation-player.js","dynamic-import-registry":"@haxtheweb/dynamic-import-registry/dynamic-import-registry.js","editable-outline":"@haxtheweb/editable-outline/editable-outline.js","editable-table":"@haxtheweb/editable-table/editable-table.js","editable-table-display":"@haxtheweb/editable-table/lib/editable-table-display.js","editable-table-edit":"@haxtheweb/editable-table/lib/editable-table-edit.js","editable-table-editor-rowcol":"@haxtheweb/editable-table/lib/editable-table-editor-rowcol.js","editable-table-filter":"@haxtheweb/editable-table/lib/editable-table-filter.js","editable-table-sort":"@haxtheweb/editable-table/lib/editable-table-sort.js","elmsln-loading":"@haxtheweb/elmsln-loading/elmsln-loading.js","enhanced-text":"@haxtheweb/enhanced-text/enhanced-text.js","event-badge":"@haxtheweb/event-badge/event-badge.js","example-hax-element":"@haxtheweb/example-hax-element/example-hax-element.js","example-haxcms-theme":"@haxtheweb/example-haxcms-theme/example-haxcms-theme.js","figure-label":"@haxtheweb/figure-label/figure-label.js","file-system-broker":"@haxtheweb/file-system-broker/file-system-broker.js","docx-file-system-broker":"@haxtheweb/file-system-broker/lib/docx-file-system-broker.js","xlsx-file-system-broker":"@haxtheweb/file-system-broker/lib/xlsx-file-system-broker.js","fill-in-the-blanks":"@haxtheweb/fill-in-the-blanks/fill-in-the-blanks.js","flash-card":"@haxtheweb/flash-card/flash-card.js","flash-card-answer-box":"@haxtheweb/flash-card/lib/flash-card-answer-box.js","flash-card-image-prompt":"@haxtheweb/flash-card/lib/flash-card-prompt-img.js","flash-card-set":"@haxtheweb/flash-card/lib/flash-card-set.js","fluid-type":"@haxtheweb/fluid-type/fluid-type.js","full-width-image":"@haxtheweb/full-width-image/full-width-image.js","fullscreen-behaviors":"@haxtheweb/fullscreen-behaviors/fullscreen-behaviors.js","future-terminal-text":"@haxtheweb/future-terminal-text/future-terminal-text.js","future-terminal-text-lite":"@haxtheweb/future-terminal-text/lib/future-terminal-text-lite.js","git-corner":"@haxtheweb/git-corner/git-corner.js","github-preview":"@haxtheweb/github-preview/github-preview.js","github-rpg-contributors":"@haxtheweb/github-preview/lib/github-rpg-contributors.js","wc-markdown":"@haxtheweb/github-preview/lib/wc-markdown.js","glossy-portfolio-theme":"@haxtheweb/glossy-portfolio-theme/glossy-portfolio-theme.js","glossy-portfolio-about":"@haxtheweb/glossy-portfolio-theme/lib/glossy-portfolio-about.js","glossy-portfolio-breadcrumb":"@haxtheweb/glossy-portfolio-theme/lib/glossy-portfolio-breadcrumb.js","glossy-portfolio-card":"@haxtheweb/glossy-portfolio-theme/lib/glossy-portfolio-card.js","glossy-portfolio-footer":"@haxtheweb/glossy-portfolio-theme/lib/glossy-portfolio-footer.js","glossy-portfolio-grid":"@haxtheweb/glossy-portfolio-theme/lib/glossy-portfolio-grid.js","glossy-portfolio-header":"@haxtheweb/glossy-portfolio-theme/lib/glossy-portfolio-header.js","glossy-portfolio-home":"@haxtheweb/glossy-portfolio-theme/lib/glossy-portfolio-home.js","grade-book":"@haxtheweb/grade-book/grade-book.js","grade-book-lite":"@haxtheweb/grade-book/lib/grade-book-lite.js","grade-book-pop-up":"@haxtheweb/grade-book/lib/grade-book-pop-up.js","grade-book-store":"@haxtheweb/grade-book/lib/grade-book-store.js","grade-book-student-block":"@haxtheweb/grade-book/lib/grade-book-student-block.js","grade-book-table":"@haxtheweb/grade-book/lib/grade-book-table.js","letter-grade-picker":"@haxtheweb/grade-book/lib/letter-grade-picker.js","letter-grade":"@haxtheweb/grade-book/lib/letter-grade.js","grid-plate":"@haxtheweb/grid-plate/grid-plate.js","h-a-x":"@haxtheweb/h-a-x/h-a-x.js","h5p-element":"@haxtheweb/h5p-element/h5p-element.js","h5p-wrapped-element":"@haxtheweb/h5p-element/lib/h5p-wrapped-element.js","hal-9000":"@haxtheweb/hal-9000/hal-9000.js","hal-9000-ui":"@haxtheweb/hal-9000/lib/hal-9000-ui/hal-9000-ui.js","hax-body":"@haxtheweb/hax-body/hax-body.js","hax-text-editor-alignment-picker":"@haxtheweb/hax-body/lib/buttons/hax-text-editor-alignment-picker.js","hax-text-editor-heading-picker":"@haxtheweb/hax-body/lib/buttons/hax-text-editor-heading-picker.js","hax-text-editor-tag-toggle":"@haxtheweb/hax-body/lib/buttons/hax-text-editor-tag-toggle.js","hax-app-picker":"@haxtheweb/hax-body/lib/hax-app-picker.js","hax-app-search":"@haxtheweb/hax-body/lib/hax-app-search.js","hax-app":"@haxtheweb/hax-body/lib/hax-app.js","hax-autoloader":"@haxtheweb/hax-body/lib/hax-autoloader.js","hax-cancel-dialog":"@haxtheweb/hax-body/lib/hax-cancel-dialog.js","hax-context-item-textop":"@haxtheweb/hax-body/lib/hax-context-item-textop.js","hax-context-item":"@haxtheweb/hax-body/lib/hax-context-item.js","hax-element-demo":"@haxtheweb/hax-body/lib/hax-element-demo.js","hax-export-dialog":"@haxtheweb/hax-body/lib/hax-export-dialog.js","hax-gizmo-browser":"@haxtheweb/hax-body/lib/hax-gizmo-browser.js","hax-map":"@haxtheweb/hax-body/lib/hax-map.js","hax-picker":"@haxtheweb/hax-body/lib/hax-picker.js","hax-plate-context":"@haxtheweb/hax-body/lib/hax-plate-context.js","hax-preferences-dialog":"@haxtheweb/hax-body/lib/hax-preferences-dialog.js","hax-stax-browser":"@haxtheweb/hax-body/lib/hax-stax-browser.js","hax-store":"@haxtheweb/hax-body/lib/hax-store.js","hax-text-editor-button":"@haxtheweb/hax-body/lib/hax-text-editor-button.js","hax-text-editor-paste-button":"@haxtheweb/hax-body/lib/hax-text-editor-paste-button.js","hax-text-editor-toolbar":"@haxtheweb/hax-body/lib/hax-text-editor-toolbar.js","hax-text-editor":"@haxtheweb/hax-body/lib/hax-text-editor.js","hax-toolbar-item":"@haxtheweb/hax-body/lib/hax-toolbar-item.js","hax-toolbar-menu":"@haxtheweb/hax-body/lib/hax-toolbar-menu.js","hax-toolbar":"@haxtheweb/hax-body/lib/hax-toolbar.js","hax-tray-button":"@haxtheweb/hax-body/lib/hax-tray-button.js","hax-tray-upload":"@haxtheweb/hax-body/lib/hax-tray-upload.js","hax-tray":"@haxtheweb/hax-body/lib/hax-tray.js","hax-ui-styles":"@haxtheweb/hax-body/lib/hax-ui-styles.js","hax-upload-field":"@haxtheweb/hax-body/lib/hax-upload-field.js","hax-view-source":"@haxtheweb/hax-body/lib/hax-view-source.js","hax-cloud":"@haxtheweb/hax-cloud/hax-cloud.js","hax-logo":"@haxtheweb/hax-logo/hax-logo.js","haxcms-backend-beaker":"@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-beaker.js","haxcms-backend-demo":"@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-demo.js","haxcms-backend-nodejs":"@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-nodejs.js","haxcms-backend-php":"@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-php.js","haxcms-backend-userfs":"@haxtheweb/haxcms-elements/lib/core/backends/haxcms-backend-userfs.js","haxcms-appearance-admin-dialog":"@haxtheweb/haxcms-elements/lib/core/haxcms-appearance-admin-dialog.js","haxcms-content-admin-dialog":"@haxtheweb/haxcms-elements/lib/core/haxcms-content-admin-dialog.js","haxcms-darkmode-toggle":"@haxtheweb/haxcms-elements/lib/core/haxcms-darkmode-toggle.js","haxcms-editor-builder":"@haxtheweb/haxcms-elements/lib/core/haxcms-editor-builder.js","haxcms-files-admin-dialog":"@haxtheweb/haxcms-elements/lib/core/haxcms-files-admin-dialog.js","haxcms-outline-editor-dialog":"@haxtheweb/haxcms-elements/lib/core/haxcms-outline-editor-dialog.js","haxcms-seo-admin-dialog":"@haxtheweb/haxcms-elements/lib/core/haxcms-seo-admin-dialog.js","haxcms-site-builder":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-builder.js","haxcms-site-dashboard":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-dashboard.js","haxcms-site-editor-ui":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-editor-ui.js","haxcms-site-editor":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-editor.js","haxcms-site-insights":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-insights.js","haxcms-site-router":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-router.js","haxcms-site-settings-dashboard":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-settings-dashboard.js","haxcms-site-store":"@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js","haxcms-theme-picker":"@haxtheweb/haxcms-elements/lib/core/haxcms-theme-picker.js","haxcms-toast":"@haxtheweb/haxcms-elements/lib/core/haxcms-toast.js","haxcms-button-add":"@haxtheweb/haxcms-elements/lib/core/micros/haxcms-button-add.js","haxcms-page-operations":"@haxtheweb/haxcms-elements/lib/core/micros/haxcms-page-operations.js","haxcms-basic-theme":"@haxtheweb/haxcms-elements/lib/core/themes/haxcms-basic-theme.js","haxcms-blank-theme":"@haxtheweb/haxcms-elements/lib/core/themes/haxcms-blank-theme.js","haxcms-json-theme":"@haxtheweb/haxcms-elements/lib/core/themes/haxcms-json-theme.js","haxcms-minimalist-theme":"@haxtheweb/haxcms-elements/lib/core/themes/haxcms-minimalist-theme.js","haxcms-print-theme":"@haxtheweb/haxcms-elements/lib/core/themes/haxcms-print-theme.js","haxcms-slide-theme":"@haxtheweb/haxcms-elements/lib/core/themes/haxcms-slide-theme.js","hax-confirm-dialog":"@haxtheweb/haxcms-elements/lib/core/ui/hax-confirm-dialog.js","haxcms-about-dialog-ui":"@haxtheweb/haxcms-elements/lib/core/ui/haxcms-about-dialog-ui.js","haxcms-allowed-blocks-ui":"@haxtheweb/haxcms-elements/lib/core/ui/haxcms-allowed-blocks-ui.js","haxcms-editor-settings-dialog-ui":"@haxtheweb/haxcms-elements/lib/core/ui/haxcms-editor-settings-dialog-ui.js","haxcms-page-get-started":"@haxtheweb/haxcms-elements/lib/core/ui/haxcms-page-get-started.js","haxcms-site-platform-ui":"@haxtheweb/haxcms-elements/lib/core/ui/haxcms-site-platform-ui.js","haxcms-theme-preview-panel":"@haxtheweb/haxcms-elements/lib/core/ui/haxcms-theme-preview-panel.js","haxcms-dev-theme":"@haxtheweb/haxcms-elements/lib/development/haxcms-dev-theme.js","haxcms-theme-developer":"@haxtheweb/haxcms-elements/lib/development/haxcms-theme-developer.js","site-active-fields":"@haxtheweb/haxcms-elements/lib/ui-components/active-item/site-active-fields.js","site-active-media-banner":"@haxtheweb/haxcms-elements/lib/ui-components/active-item/site-active-media-banner.js","site-active-tags":"@haxtheweb/haxcms-elements/lib/ui-components/active-item/site-active-tags.js","site-active-title":"@haxtheweb/haxcms-elements/lib/ui-components/active-item/site-active-title.js","site-git-corner":"@haxtheweb/haxcms-elements/lib/ui-components/active-item/site-git-corner.js","site-share-widget":"@haxtheweb/haxcms-elements/lib/ui-components/active-item/site-share-widget.js","site-children-block":"@haxtheweb/haxcms-elements/lib/ui-components/blocks/site-children-block.js","site-outline-block":"@haxtheweb/haxcms-elements/lib/ui-components/blocks/site-outline-block.js","site-recent-content-block":"@haxtheweb/haxcms-elements/lib/ui-components/blocks/site-recent-content-block.js","site-drawer":"@haxtheweb/haxcms-elements/lib/ui-components/layout/site-drawer.js","site-footer":"@haxtheweb/haxcms-elements/lib/ui-components/layout/site-footer.js","site-modal":"@haxtheweb/haxcms-elements/lib/ui-components/layout/site-modal.js","site-region":"@haxtheweb/haxcms-elements/lib/ui-components/layout/site-region.js","lesson-overview":"@haxtheweb/haxcms-elements/lib/ui-components/lesson-overview/lesson-overview.js","lesson-highlight":"@haxtheweb/haxcms-elements/lib/ui-components/lesson-overview/lib/lesson-highlight.js","active-when-visible":"@haxtheweb/haxcms-elements/lib/ui-components/magic/active-when-visible.js","site-ai-chat":"@haxtheweb/haxcms-elements/lib/ui-components/magic/site-ai-chat.js","site-collection-list":"@haxtheweb/haxcms-elements/lib/ui-components/magic/site-collection-list.js","site-view":"@haxtheweb/haxcms-elements/lib/ui-components/magic/site-view.js","site-breadcrumb":"@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js","site-dot-indicator":"@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-dot-indicator.js","site-menu-button":"@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-menu-button.js","site-menu-content":"@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-menu-content.js","site-menu":"@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-menu.js","site-top-menu":"@haxtheweb/haxcms-elements/lib/ui-components/navigation/site-top-menu.js","site-query-menu-slice":"@haxtheweb/haxcms-elements/lib/ui-components/query/site-query-menu-slice.js","site-query":"@haxtheweb/haxcms-elements/lib/ui-components/query/site-query.js","site-render-query":"@haxtheweb/haxcms-elements/lib/ui-components/query/site-render-query.js","site-home-route":"@haxtheweb/haxcms-elements/lib/ui-components/routes/site-home-route.js","site-print-route":"@haxtheweb/haxcms-elements/lib/ui-components/routes/site-print-route.js","site-random-route":"@haxtheweb/haxcms-elements/lib/ui-components/routes/site-random-route.js","site-tags-route":"@haxtheweb/haxcms-elements/lib/ui-components/routes/site-tags-route.js","site-theme-style-guide-route":"@haxtheweb/haxcms-elements/lib/ui-components/routes/site-theme-style-guide-route.js","site-views-route":"@haxtheweb/haxcms-elements/lib/ui-components/routes/site-views-route.js","site-print-button":"@haxtheweb/haxcms-elements/lib/ui-components/site/site-print-button.js","site-random-content":"@haxtheweb/haxcms-elements/lib/ui-components/site/site-random-content.js","site-remote-content":"@haxtheweb/haxcms-elements/lib/ui-components/site/site-remote-content.js","site-rss-button":"@haxtheweb/haxcms-elements/lib/ui-components/site/site-rss-button.js","site-search":"@haxtheweb/haxcms-elements/lib/ui-components/site/site-search.js","site-title":"@haxtheweb/haxcms-elements/lib/ui-components/site/site-title.js","site-uuid-link":"@haxtheweb/haxcms-elements/lib/ui-components/site/site-uuid-link.js","basic-template":"@haxtheweb/haxcms-elements/lib/ui-components/templates/basic-template.js","minimalist-template":"@haxtheweb/haxcms-elements/lib/ui-components/templates/minimalist-template.js","site-available-themes":"@haxtheweb/haxcms-elements/lib/ui-components/utilities/site-available-themes.js","haxma-theme":"@haxtheweb/haxma-theme/haxma-theme.js","haxor-slevin":"@haxtheweb/haxor-slevin/haxor-slevin.js","hex-picker":"@haxtheweb/hex-picker/hex-picker.js","hexagon-loader":"@haxtheweb/hexagon-loader/hexagon-loader.js","hex-a-gon":"@haxtheweb/hexagon-loader/lib/hex-a-gon.js","html-block":"@haxtheweb/html-block/html-block.js","i18n-manager":"@haxtheweb/i18n-manager/i18n-manager.js","iframe-loader":"@haxtheweb/iframe-loader/iframe-loader.js","loading-indicator":"@haxtheweb/iframe-loader/lib/loading-indicator.js","image-compare-slider":"@haxtheweb/image-compare-slider/image-compare-slider.js","image-inspector":"@haxtheweb/image-inspector/image-inspector.js","img-pan-zoom":"@haxtheweb/img-pan-zoom/img-pan-zoom.js","img-loader":"@haxtheweb/img-pan-zoom/lib/img-loader.js","img-view-modal":"@haxtheweb/img-view-modal/img-view-modal.js","img-view-viewer":"@haxtheweb/img-view-modal/lib/img-view-viewer.js","inline-audio":"@haxtheweb/inline-audio/inline-audio.js","journey-theme":"@haxtheweb/journey-theme/journey-theme.js","journey-menu":"@haxtheweb/journey-theme/lib/journey-menu.js","journey-sidebar-theme":"@haxtheweb/journey-theme/lib/journey-sidebar-theme.js","journey-topbar-theme":"@haxtheweb/journey-theme/lib/journey-topbar-theme.js","json-editor":"@haxtheweb/json-editor/json-editor.js","json-outline-schema":"@haxtheweb/json-outline-schema/json-outline-schema.js","jos-render":"@haxtheweb/json-outline-schema/lib/jos-render.js","jwt-login":"@haxtheweb/jwt-login/jwt-login.js","la-tex":"@haxtheweb/la-tex/la-tex.js","lazy-image":"@haxtheweb/lazy-image-helpers/lazy-image-helpers.js","lazy-import-discover":"@haxtheweb/lazy-import-discover/lazy-import-discover.js","learn-two-theme":"@haxtheweb/learn-two-theme/learn-two-theme.js","license-element":"@haxtheweb/license-element/license-element.js","lorem-data":"@haxtheweb/lorem-data/lorem-data.js","lrn-gitgraph":"@haxtheweb/lrn-gitgraph/lrn-gitgraph.js","lrn-math":"@haxtheweb/lrn-math/lrn-math.js","lrn-table":"@haxtheweb/lrn-table/lrn-table.js","lrn-vocab":"@haxtheweb/lrn-vocab/lrn-vocab.js","lrndesign-avatar":"@haxtheweb/lrndesign-avatar/lrndesign-avatar.js","lrndesign-bar":"@haxtheweb/lrndesign-chart/lib/lrndesign-bar.js","lrndesign-line":"@haxtheweb/lrndesign-chart/lib/lrndesign-line.js","lrndesign-pie":"@haxtheweb/lrndesign-chart/lib/lrndesign-pie.js","lrndesign-imagemap-hotspot":"@haxtheweb/lrndesign-imagemap/lib/lrndesign-imagemap-hotspot.js","lrndesign-imagemap":"@haxtheweb/lrndesign-imagemap/lrndesign-imagemap.js","lrndesign-sidenote":"@haxtheweb/lrndesign-sidenote/lrndesign-sidenote.js","lrndesign-timeline":"@haxtheweb/lrndesign-timeline/lrndesign-timeline.js","lrs-bridge-haxcms":"@haxtheweb/lrs-elements/lib/lrs-bridge-haxcms.js","lrs-bridge":"@haxtheweb/lrs-elements/lib/lrs-bridge.js","lrs-emitter":"@haxtheweb/lrs-elements/lib/lrs-emitter.js","lunr-search":"@haxtheweb/lunr-search/lunr-search.js","map-menu-builder":"@haxtheweb/map-menu/lib/map-menu-builder.js","map-menu-container":"@haxtheweb/map-menu/lib/map-menu-container.js","map-menu-header":"@haxtheweb/map-menu/lib/map-menu-header.js","map-menu-item":"@haxtheweb/map-menu/lib/map-menu-item.js","map-menu-submenu":"@haxtheweb/map-menu/lib/map-menu-submenu.js","map-menu":"@haxtheweb/map-menu/map-menu.js","mark-the-words":"@haxtheweb/mark-the-words/mark-the-words.js","matching-question":"@haxtheweb/matching-question/matching-question.js","md-block":"@haxtheweb/md-block/md-block.js","media-image":"@haxtheweb/media-image/media-image.js","media-quote":"@haxtheweb/media-quote/media-quote.js","meme-maker":"@haxtheweb/meme-maker/meme-maker.js","badge-sticker":"@haxtheweb/merit-badge/lib/badge-sticker.js","date-title":"@haxtheweb/merit-badge/lib/date-title.js","locked-badge":"@haxtheweb/merit-badge/lib/locked-badge.js","merit-badge":"@haxtheweb/merit-badge/merit-badge.js","micro-frontend-registry":"@haxtheweb/micro-frontend-registry/micro-frontend-registry.js","moar-sarcasm":"@haxtheweb/moar-sarcasm/moar-sarcasm.js","moment-element":"@haxtheweb/moment-element/moment-element.js","confetti-container":"@haxtheweb/multiple-choice/lib/confetti-container.js","short-answer-question":"@haxtheweb/multiple-choice/lib/short-answer-question.js","true-false-question":"@haxtheweb/multiple-choice/lib/true-false-question.js","multiple-choice":"@haxtheweb/multiple-choice/multiple-choice.js","midi-player":"@haxtheweb/music-player/lib/html-midi-player.js","music-player":"@haxtheweb/music-player/music-player.js","mutation-observer-import":"@haxtheweb/mutation-observer-import-mixin/mutation-observer-import-mixin.js","oer-schema":"@haxtheweb/oer-schema/oer-schema.js","outline-designer":"@haxtheweb/outline-designer/outline-designer.js","outline-player":"@haxtheweb/outline-player/outline-player.js","page-anchor":"@haxtheweb/page-break/lib/page-anchor.js","page-break-manager":"@haxtheweb/page-break/lib/page-break-manager.js","page-break-outline":"@haxtheweb/page-break/lib/page-break-outline.js","page-template":"@haxtheweb/page-break/lib/page-template.js","page-break":"@haxtheweb/page-break/page-break.js","page-contents-menu":"@haxtheweb/page-contents-menu/page-contents-menu.js","page-flag-comment":"@haxtheweb/page-flag/lib/page-flag-comment.js","page-flag":"@haxtheweb/page-flag/page-flag.js","page-scroll-position":"@haxtheweb/page-scroll-position/page-scroll-position.js","page-section":"@haxtheweb/page-section/page-section.js","paper-avatar":"@haxtheweb/paper-avatar/paper-avatar.js","paper-input-flagged":"@haxtheweb/paper-input-flagged/paper-input-flagged.js","paper-icon-step":"@haxtheweb/paper-stepper/lib/paper-icon-step.js","paper-icon-stepper":"@haxtheweb/paper-stepper/lib/paper-icon-stepper.js","paper-step":"@haxtheweb/paper-stepper/lib/paper-step.js","paper-stepper":"@haxtheweb/paper-stepper/paper-stepper.js","parallax-image":"@haxtheweb/parallax-image/parallax-image.js","pdf-browser-viewer":"@haxtheweb/pdf-browser-viewer/pdf-browser-viewer.js","person-testimonial":"@haxtheweb/person-testimonial/person-testimonial.js","place-holder":"@haxtheweb/place-holder/place-holder.js","play-list":"@haxtheweb/play-list/play-list.js","polaris-cta":"@haxtheweb/polaris-theme/lib/polaris-cta.js","polaris-flex-sidebar":"@haxtheweb/polaris-theme/lib/polaris-flex-sidebar.js","polaris-flex-theme":"@haxtheweb/polaris-theme/lib/polaris-flex-theme.js","polaris-invent-theme":"@haxtheweb/polaris-theme/lib/polaris-invent-theme.js","polaris-mark":"@haxtheweb/polaris-theme/lib/polaris-mark.js","polaris-story-card":"@haxtheweb/polaris-theme/lib/polaris-story-card.js","polaris-tile":"@haxtheweb/polaris-theme/lib/polaris-tile.js","polaris-theme":"@haxtheweb/polaris-theme/polaris-theme.js","portal-launcher":"@haxtheweb/portal-launcher/portal-launcher.js","post-card-photo":"@haxtheweb/post-card/lib/PostCardPhoto.js","post-card-postmark":"@haxtheweb/post-card/lib/PostCardPostmark.js","post-card-stamp":"@haxtheweb/post-card/lib/PostCardStamp.js","post-card":"@haxtheweb/post-card/post-card.js","pouch-db":"@haxtheweb/pouch-db/pouch-db.js","course-card":"@haxtheweb/product-card/lib/course-card.js","hax-element-card-list":"@haxtheweb/product-card/lib/hax-element-card-list.js","hax-element-list-selector":"@haxtheweb/product-card/lib/hax-element-list-selector.js","product-banner":"@haxtheweb/product-card/lib/product-banner.js","product-card":"@haxtheweb/product-card/product-card.js","product-glance":"@haxtheweb/product-glance/product-glance.js","product-offering":"@haxtheweb/product-offering/product-offering.js","progress-donut":"@haxtheweb/progress-donut/progress-donut.js","promise-progress-lite":"@haxtheweb/promise-progress/lib/promise-progress-lite.js","wc-preload-progress":"@haxtheweb/promise-progress/lib/wc-preload-progress.js","promise-progress":"@haxtheweb/promise-progress/promise-progress.js","qr-code":"@haxtheweb/q-r/lib/qr-code.js","q-r":"@haxtheweb/q-r/q-r.js","relative-heading-lite":"@haxtheweb/relative-heading/lib/relative-heading-lite.js","relative-heading-state-manager":"@haxtheweb/relative-heading/lib/relative-heading-state-manager.js","relative-heading":"@haxtheweb/relative-heading/relative-heading.js","performance-detect":"@haxtheweb/replace-tag/lib/PerformanceDetect.js","replace-tag":"@haxtheweb/replace-tag/replace-tag.js","responsive-grid-clear":"@haxtheweb/responsive-grid/lib/responsive-grid-clear.js","responsive-grid-col":"@haxtheweb/responsive-grid/lib/responsive-grid-col.js","responsive-grid-row":"@haxtheweb/responsive-grid/lib/responsive-grid-row.js","responsive-utility-element":"@haxtheweb/responsive-utility/lib/responsive-utility-element.js","responsive-utility":"@haxtheweb/responsive-utility/responsive-utility.js","retro-card":"@haxtheweb/retro-card/retro-card.js","rich-text-editor-button":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-button.js","rich-text-editor-emoji-picker":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-emoji-picker.js","rich-text-editor-heading-picker":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-heading-picker.js","rich-text-editor-icon-picker":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-icon-picker.js","rich-text-editor-image":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-image.js","rich-text-editor-link":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-link.js","rich-text-editor-picker":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-picker.js","rich-text-editor-prompt-button":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-prompt-button.js","rich-text-editor-source-code":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-source-code.js","rich-text-editor-symbol-picker":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-symbol-picker.js","rich-text-editor-underline":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-underline.js","rich-text-editor-unlink":"@haxtheweb/rich-text-editor/lib/buttons/rich-text-editor-unlink.js","link-preview-card":"@haxtheweb/rich-text-editor/lib/open-apis/link-preview-card.js","rich-text-editor-clipboard":"@haxtheweb/rich-text-editor/lib/singletons/rich-text-editor-clipboard.js","rich-text-editor-highlight":"@haxtheweb/rich-text-editor/lib/singletons/rich-text-editor-highlight.js","rich-text-editor-prompt":"@haxtheweb/rich-text-editor/lib/singletons/rich-text-editor-prompt.js","rich-text-editor-source":"@haxtheweb/rich-text-editor/lib/singletons/rich-text-editor-source.js","rich-text-editor-breadcrumbs":"@haxtheweb/rich-text-editor/lib/toolbars/rich-text-editor-breadcrumbs.js","rich-text-editor-toolbar-full":"@haxtheweb/rich-text-editor/lib/toolbars/rich-text-editor-toolbar-full.js","rich-text-editor-toolbar-mini":"@haxtheweb/rich-text-editor/lib/toolbars/rich-text-editor-toolbar-mini.js","rich-text-editor-toolbar":"@haxtheweb/rich-text-editor/lib/toolbars/rich-text-editor-toolbar.js","rich-text-editor":"@haxtheweb/rich-text-editor/rich-text-editor.js","rpg-character":"@haxtheweb/rpg-character/rpg-character.js","runkit-embed":"@haxtheweb/runkit-embed/runkit-embed.js","screen-recorder":"@haxtheweb/screen-recorder/screen-recorder.js","scroll-button":"@haxtheweb/scroll-button/scroll-button.js","self-check":"@haxtheweb/self-check/self-check.js","shadow-style":"@haxtheweb/shadow-style/shadow-style.js","simple-autocomplete-text-trigger":"@haxtheweb/simple-autocomplete/lib/simple-autocomplete-text-trigger.js","simple-autocomplete":"@haxtheweb/simple-autocomplete/simple-autocomplete.js","simple-blog-card":"@haxtheweb/simple-blog-card/simple-blog-card.js","simple-blog-footer":"@haxtheweb/simple-blog/lib/simple-blog-footer.js","simple-blog-header":"@haxtheweb/simple-blog/lib/simple-blog-header.js","simple-blog-listing":"@haxtheweb/simple-blog/lib/simple-blog-listing.js","simple-blog-overview":"@haxtheweb/simple-blog/lib/simple-blog-overview.js","simple-blog-post":"@haxtheweb/simple-blog/lib/simple-blog-post.js","simple-blog":"@haxtheweb/simple-blog/simple-blog.js","simple-colors-shared-styles":"@haxtheweb/simple-colors-shared-styles/simple-colors-shared-styles.js","simple-colors-swatch-info":"@haxtheweb/simple-colors/lib/demo/simple-colors-swatch-info.js","simple-colors-swatches":"@haxtheweb/simple-colors/lib/demo/simple-colors-swatches.js","simple-colors-picker":"@haxtheweb/simple-colors/lib/simple-colors-picker.js","simple-colors":"@haxtheweb/simple-colors/simple-colors.js","lrnsys-button":"@haxtheweb/simple-cta/lib/lrnsys-button.js","simple-cta":"@haxtheweb/simple-cta/simple-cta.js","simple-datetime":"@haxtheweb/simple-datetime/simple-datetime.js","simple-emoji":"@haxtheweb/simple-emoji/simple-emoji.js","simple-context-menu":"@haxtheweb/simple-fields/lib/simple-context-menu.js","simple-fields-array":"@haxtheweb/simple-fields/lib/simple-fields-array.js","simple-fields-code":"@haxtheweb/simple-fields/lib/simple-fields-code.js","simple-fields-combo":"@haxtheweb/simple-fields/lib/simple-fields-combo.js","simple-fields-container":"@haxtheweb/simple-fields/lib/simple-fields-container.js","simple-fields-field":"@haxtheweb/simple-fields/lib/simple-fields-field.js","simple-fields-fieldset":"@haxtheweb/simple-fields/lib/simple-fields-fieldset.js","simple-fields-form-lite":"@haxtheweb/simple-fields/lib/simple-fields-form-lite.js","simple-fields-form":"@haxtheweb/simple-fields/lib/simple-fields-form.js","simple-fields-html-block":"@haxtheweb/simple-fields/lib/simple-fields-html-block.js","simple-fields-lite":"@haxtheweb/simple-fields/lib/simple-fields-lite.js","simple-fields-tab":"@haxtheweb/simple-fields/lib/simple-fields-tab.js","simple-fields-tabs":"@haxtheweb/simple-fields/lib/simple-fields-tabs.js","simple-fields-tag-list":"@haxtheweb/simple-fields/lib/simple-fields-tag-list.js","simple-fields-upload":"@haxtheweb/simple-fields/lib/simple-fields-upload.js","simple-fields-url-combo-item":"@haxtheweb/simple-fields/lib/simple-fields-url-combo-item.js","simple-fields-url-combo":"@haxtheweb/simple-fields/lib/simple-fields-url-combo.js","simple-tag-lite":"@haxtheweb/simple-fields/lib/simple-tag-lite.js","simple-tag":"@haxtheweb/simple-fields/lib/simple-tag.js","simple-tags":"@haxtheweb/simple-fields/lib/simple-tags.js","simple-fields":"@haxtheweb/simple-fields/simple-fields.js","simple-icon-picker":"@haxtheweb/simple-icon-picker/simple-icon-picker.js","simple-icon-button-lite":"@haxtheweb/simple-icon/lib/simple-icon-button-lite.js","simple-icon-button":"@haxtheweb/simple-icon/lib/simple-icon-button.js","simple-icon-lite":"@haxtheweb/simple-icon/lib/simple-icon-lite.js","simple-iconset-demo":"@haxtheweb/simple-icon/lib/simple-iconset-demo.js","simple-iconset":"@haxtheweb/simple-icon/lib/simple-iconset.js","simple-icon":"@haxtheweb/simple-icon/simple-icon.js","simple-img":"@haxtheweb/simple-img/simple-img.js","simple-camera-snap":"@haxtheweb/simple-login/lib/simple-camera-snap.js","simple-login-avatar":"@haxtheweb/simple-login/lib/simple-login-avatar.js","simple-login-camera":"@haxtheweb/simple-login/lib/simple-login-camera.js","simple-login":"@haxtheweb/simple-login/simple-login.js","simple-modal-template":"@haxtheweb/simple-modal/lib/simple-modal-template.js","simple-modal":"@haxtheweb/simple-modal/simple-modal.js","simple-emoji-picker":"@haxtheweb/simple-picker/lib/simple-emoji-picker.js","simple-picker-option":"@haxtheweb/simple-picker/lib/simple-picker-option.js","simple-symbol-picker":"@haxtheweb/simple-picker/lib/simple-symbol-picker.js","simple-picker":"@haxtheweb/simple-picker/simple-picker.js","simple-popover-manager":"@haxtheweb/simple-popover/lib/simple-popover-manager.js","simple-popover-selection":"@haxtheweb/simple-popover/lib/simple-popover-selection.js","simple-tour":"@haxtheweb/simple-popover/lib/simple-tour.js","simple-popover":"@haxtheweb/simple-popover/simple-popover.js","simple-progress":"@haxtheweb/simple-progress/simple-progress.js","simple-range-input":"@haxtheweb/simple-range-input/simple-range-input.js","simple-search-content":"@haxtheweb/simple-search/lib/simple-search-content.js","simple-search-match":"@haxtheweb/simple-search/lib/simple-search-match.js","simple-search":"@haxtheweb/simple-search/simple-search.js","simple-toast-el":"@haxtheweb/simple-toast/lib/simple-toast-el.js","simple-toast":"@haxtheweb/simple-toast/simple-toast.js","simple-button-grid":"@haxtheweb/simple-toolbar/lib/simple-button-grid.js","simple-toolbar-button-group":"@haxtheweb/simple-toolbar/lib/simple-toolbar-button-group.js","simple-toolbar-button":"@haxtheweb/simple-toolbar/lib/simple-toolbar-button.js","simple-toolbar-field":"@haxtheweb/simple-toolbar/lib/simple-toolbar-field.js","simple-toolbar-menu-item":"@haxtheweb/simple-toolbar/lib/simple-toolbar-menu-item.js","simple-toolbar-menu":"@haxtheweb/simple-toolbar/lib/simple-toolbar-menu.js","simple-toolbar-more-button":"@haxtheweb/simple-toolbar/lib/simple-toolbar-more-button.js","simple-toolbar":"@haxtheweb/simple-toolbar/simple-toolbar.js","simple-tooltip":"@haxtheweb/simple-tooltip/simple-tooltip.js","social-share-link":"@haxtheweb/social-share-link/social-share-link.js","sorting-option":"@haxtheweb/sorting-question/lib/sorting-option.js","sorting-question":"@haxtheweb/sorting-question/sorting-question.js","spacebook-theme":"@haxtheweb/spacebook-theme/spacebook-theme.js","spotify-embed":"@haxtheweb/spotify-embed/spotify-embed.js","star-rating":"@haxtheweb/star-rating/star-rating.js","stop-note":"@haxtheweb/stop-note/stop-note.js","super-daemon-row":"@haxtheweb/super-daemon/lib/super-daemon-row.js","super-daemon-search":"@haxtheweb/super-daemon/lib/super-daemon-search.js","super-daemon-toast":"@haxtheweb/super-daemon/lib/super-daemon-toast.js","super-daemon-ui":"@haxtheweb/super-daemon/lib/super-daemon-ui.js","super-daemon":"@haxtheweb/super-daemon/super-daemon.js","tagging-question":"@haxtheweb/tagging-question/tagging-question.js","terrible-best-themes":"@haxtheweb/terrible-themes/lib/terrible-best-themes.js","terrible-outlet-themes":"@haxtheweb/terrible-themes/lib/terrible-outlet-themes.js","terrible-productionz-themes":"@haxtheweb/terrible-themes/lib/terrible-productionz-themes.js","terrible-resume-themes":"@haxtheweb/terrible-themes/lib/terrible-resume-themes.js","terrible-themes":"@haxtheweb/terrible-themes/terrible-themes.js","training-button":"@haxtheweb/training-theme/lib/training-button.js","training-top":"@haxtheweb/training-theme/lib/training-top.js","training-theme":"@haxtheweb/training-theme/training-theme.js","twitter-embed-vanilla":"@haxtheweb/twitter-embed/lib/twitter-embed-vanilla.js","twitter-embed":"@haxtheweb/twitter-embed/twitter-embed.js","type-writer":"@haxtheweb/type-writer/type-writer.js","un-sdg":"@haxtheweb/un-sdg/un-sdg.js","undo-manager":"@haxtheweb/undo-manager/undo-manager.js","unity-webgl":"@haxtheweb/unity-webgl/unity-webgl.js","user-action":"@haxtheweb/user-action/user-action.js","user-scaffold":"@haxtheweb/user-scaffold/user-scaffold.js","lecture-anchor":"@haxtheweb/video-player/lib/lecture-anchor.js","lecture-player":"@haxtheweb/video-player/lib/lecture-player.js","video-player":"@haxtheweb/video-player/video-player.js","vocab-term":"@haxtheweb/vocab-term/vocab-term.js","voice-recorder":"@haxtheweb/voice-recorder/voice-recorder.js","wc-registry":"@haxtheweb/wc-autoload/wc-autoload.js","web-container-doc-player":"@haxtheweb/web-container/lib/web-container-doc-player.js","web-container-wc-registry-docs":"@haxtheweb/web-container/lib/web-container-wc-registry-docs.js","web-container":"@haxtheweb/web-container/web-container.js","wikipedia-query":"@haxtheweb/wikipedia-query/wikipedia-query.js","word-count":"@haxtheweb/word-count/word-count.js","wysiwyg-hax":"@haxtheweb/wysiwyg-hax/wysiwyg-hax.js","lit-virtualizer":"@lit-labs/virtualizer/lit-virtualizer.js","app-box":"@polymer/app-layout/app-box/app-box.js","app-drawer-layout":"@polymer/app-layout/app-drawer-layout/app-drawer-layout.js","app-drawer":"@polymer/app-layout/app-drawer/app-drawer.js","app-header-layout":"@polymer/app-layout/app-header-layout/app-header-layout.js","app-header":"@polymer/app-layout/app-header/app-header.js","x-container":"@polymer/app-layout/app-scroll-effects/test/x-container.js","app-toolbar":"@polymer/app-layout/app-toolbar/app-toolbar.js","iron-a11y-announcer":"@polymer/iron-a11y-announcer/iron-a11y-announcer.js","iron-a11y-keys":"@polymer/iron-a11y-keys/iron-a11y-keys.js","iron-ajax":"@polymer/iron-ajax/iron-ajax.js","iron-request":"@polymer/iron-ajax/iron-request.js","iron-autogrow-textarea":"@polymer/iron-autogrow-textarea/iron-autogrow-textarea.js","iron-icon":"@polymer/iron-icon/iron-icon.js","iron-iconset-svg":"@polymer/iron-iconset-svg/iron-iconset-svg.js","iron-image":"@polymer/iron-image/iron-image.js","iron-input":"@polymer/iron-input/iron-input.js","iron-list":"@polymer/iron-list/iron-list.js","iron-media-query":"@polymer/iron-media-query/iron-media-query.js","iron-meta":"@polymer/iron-meta/iron-meta.js","marked-element":"@polymer/marked-element/marked-element.js","paper-card":"@polymer/paper-card/paper-card.js","paper-input-char-counter":"@polymer/paper-input/paper-input-char-counter.js","paper-input-container":"@polymer/paper-input/paper-input-container.js","paper-input-error":"@polymer/paper-input/paper-input-error.js","paper-input":"@polymer/paper-input/paper-input.js","paper-textarea":"@polymer/paper-input/paper-textarea.js","paper-spinner-lite":"@polymer/paper-spinner/paper-spinner-lite.js","paper-spinner":"@polymer/paper-spinner/paper-spinner.js","array-selector":"@polymer/polymer/lib/elements/array-selector.js","custom-style":"@polymer/polymer/lib/elements/custom-style.js","dom-bind":"@polymer/polymer/lib/elements/dom-bind.js","dom-if":"@polymer/polymer/lib/elements/dom-if.js","dom-module":"@polymer/polymer/lib/elements/dom-module.js","dom-repeat":"@polymer/polymer/lib/elements/dom-repeat.js","vaadin-button":"@vaadin/vaadin-button/src/vaadin-button.js","vaadin-checkbox-group":"@vaadin/vaadin-checkbox/src/vaadin-checkbox-group.js","vaadin-checkbox":"@vaadin/vaadin-checkbox/src/vaadin-checkbox.js","vaadin-grid-column-group":"@vaadin/vaadin-grid/src/vaadin-grid-column-group.js","vaadin-grid-column":"@vaadin/vaadin-grid/src/vaadin-grid-column.js","vaadin-grid-filter-column":"@vaadin/vaadin-grid/src/vaadin-grid-filter-column.js","vaadin-grid-filter":"@vaadin/vaadin-grid/src/vaadin-grid-filter.js","vaadin-grid-scroller":"@vaadin/vaadin-grid/src/vaadin-grid-scroller.js","vaadin-grid-selection-column":"@vaadin/vaadin-grid/src/vaadin-grid-selection-column.js","vaadin-grid-sort-column":"@vaadin/vaadin-grid/src/vaadin-grid-sort-column.js","vaadin-grid-sorter":"@vaadin/vaadin-grid/src/vaadin-grid-sorter.js","vaadin-grid-templatizer":"@vaadin/vaadin-grid/src/vaadin-grid-templatizer.js","vaadin-grid-tree-column":"@vaadin/vaadin-grid/src/vaadin-grid-tree-column.js","vaadin-grid-tree-toggle":"@vaadin/vaadin-grid/src/vaadin-grid-tree-toggle.js","vaadin-grid":"@vaadin/vaadin-grid/src/vaadin-grid.js","vaadin-lumo-styles":"@vaadin/vaadin-lumo-styles/version.js","vaadin-material-styles":"@vaadin/vaadin-material-styles/version.js","vaadin-progress-bar":"@vaadin/vaadin-progress-bar/src/vaadin-progress-bar.js","vaadin-email-field":"@vaadin/vaadin-text-field/src/vaadin-email-field.js","vaadin-integer-field":"@vaadin/vaadin-text-field/src/vaadin-integer-field.js","vaadin-number-field":"@vaadin/vaadin-text-field/src/vaadin-number-field.js","vaadin-password-field":"@vaadin/vaadin-text-field/src/vaadin-password-field.js","vaadin-text-area":"@vaadin/vaadin-text-field/src/vaadin-text-area.js","vaadin-text-field":"@vaadin/vaadin-text-field/src/vaadin-text-field.js","vaadin-upload-file":"@vaadin/vaadin-upload/src/vaadin-upload-file.js","vaadin-upload":"@vaadin/vaadin-upload/src/vaadin-upload.js","scrollable-component":"scrollable-component/index.js","web-dialog":"web-dialog/web-dialog.js"} ================================================ FILE: elements/.gitkeep ================================================ ================================================ FILE: elements/.idea/.gitignore ================================================ # Default ignored files /shelf/ /workspace.xml # Editor-based HTTP Client requests /httpRequests/ ================================================ FILE: elements/.idea/elements.iml ================================================ ================================================ FILE: elements/.idea/modules.xml ================================================ ================================================ FILE: elements/.idea/vcs.xml ================================================ ================================================ FILE: elements/.vscode/settings.json ================================================ { "search.usePCRE2": true } ================================================ FILE: elements/README.md ================================================ # <a11y-behaviors> 11 > Behaviors / mixins to improve A11y in elements # <a11y-carousel> Compare > Slider that allows comparison of two images # <a11y-collapse> 11 > Start of a11y-collapse # <a11y-compare-image> Compare > Slider that allows comparison of two images # <a11y-details> 11 > accessible progressive disclosure with detail and summary # <a11y-figure> 11 > accessible figure with image description in details # <a11y-gif-player> 11 > An accessible animated gif "player" # <a11y-media-player> 11 > # <a11y-menu-button> 11 > Start of a11y-menu-button # <a11y-tabs> 11 > accessible and responsive tabbed interface # <a11y-utils> 11 > a collection of accessibility patterns and styles # <absolute-position-behavior> Position > Abstracting the positioning behavior from paper-tooltip to be resusable in other elements # <accent-card> Card > Start of accent-card # <aframe-player> Player > 3D Player and data binding for a-frame elements # <air-horn> Horn > demonstrative purposes via meme # <anchor-behaviors> Behaviors > handles anchors and params in the url # <app-hax> Hax > HAX+HAXcms as a full app experience # <audio-player> Player > simple audio web component to match video # <awesome-explosion> Explosion > A stinking awesome, explosion. # <barcode-reader> Reader > Element to read barcodes and QR codes through a video stream # <baseline-build-hax> Build > create an inflexible baseline build of hax with all elements # <beaker-broker> Broker > A broker element that can play nicely with Beaker Browser and make the API even easier to work with then it already is. # <bootstrap-theme> Theme > Hax bootstrap themeing # <b-r> R > Creates break statements to show conditional rendering # <chartist-render> Render > Chartist render wrapper # <chat-agent> Agent > chatbot agent style chat widget # <check-it-out> It > View codepen or stackblitz demos # <citation-element> Element > Correctly cite a resource on the internet # <clean-one> One > Clean HAXcms theme, one. # <clean-two> Two > A 2nd clean theme # <cms-hax> Hax > HAX integration for CMSs # <code-editor> Editor > Code editor element with data binding # <code-sample> Sample > A wrapper element for highlight.js # <collection-list> List > listing and display elements for collections of items # <count-up> Up > count up js wrapper with minimal styling # <course-design> Design > some different elements specific to the design of educational materials. Lots of small elements and a catch all repo # <course-model> Model > view 3d models with multiple angel rotation for a course experience # <csv-render> Render > Render a CSV file as a highly accessible table element # <data-viz> Viz > display pouch-db data using graphs # <date-card> Card > A simple presentation of a date # <d-d-d> D > design, develop, destroy the competition # Deduping fix This is a utility that helps fix a core issue with "the platform" in that if two things try to call window.customElements.define('tag-name',ClassName) and reference the same tag-name, it is a hard bricking issue. This problem can pop up in local development for a number of reasons (or timing with legacy platforms and dynamically imported assets) and so this little utility helps rewrite this global function to perform it's same function, but issue a warning if already defined as opposed to outright failing.# <discord-embed> Embed > widgetbot.io based embed widget for discord threads and channels # <disqus-embed> Embed > Disqus service integration # <dl-behavior> File > Start of dl-behavior fork # <documentation-player> Player > playlist like element but for documenting web components in the context of hax # <dynamic-import-registry> Import > maintain manage the registration and usage of dynamic imports # <editable-table> Table > A table that can be edited on the front end # <elmsln-loading> Loading > ELMS:LN logo that spins as a loading icon # <enhanced-text> Text > take text and process it with various enhancements # ES Global bridge This project helps bridge legacy, non-ESM code with modern ESM code. It generates a Promise for adding a script tag to the page. Then when it's resolved (loaded) it generates an event that can be listened for to make sure that the global classes in that file resolve correctly.# <event-badge> Badge > a conference style badge # <a11y-menu-button> 11 > Start of a11y-menu-button # <example-haxcms-theme> Haxcms > A basic, well documented example theme for HAXcms # <example-hax-element> Hax > Provide an example to pick apart of a working HAX element # <figure-label> Label > Figure label element to mark media assets within content. # <file-system-broker> System > singleton to simplify interactions with the file system on a user's device # <fill-in-the-blanks> In > Fill in the blanks question # <flash-card> Card > self check for a card that has a definition on the back # <fluid-type> Type > A simple fluid-type sizing wrapper element to apply to anything # <simple-colors> Colors > a utilty that provides a global set of color classes and variables based on theme and accent color attributes # <full-width-image> Width > full width image that flows beyond boundaries # <future-terminal-text> Terminal > cyberpunk 2077 inspired text for robots presentation # <git-corner> Corner > display a quick link with styling to a repo to help with contributions # <github-preview> Preview > A simple element that displays information about a github repository. # <grade-book> Book > A headless gradebook that supports multiple backends with rubrics # <grid-plate> Plate > a grid element with 1 to 4 columns via slots # <h5p-element> 5 > h5p wrapper for loading and presenting unpacked .h5p file directories # <hal-9000> 9000 > Robot assistant tag, hopefully not evil # <h-a-x> A > Single tag to transform authoring # <hax-body> # HAX Headless Authoring eXperience or HAX for short, is a new way of authoring content that works across platforms. Written in webcomponents, HAX allows users to effectively write HTML by touching the interface directly. Think WYSIWYG if it was built with modern and future proof tools and libraries instead of based on the work of the early 2000s. # <hax-body-behaviors> Body > Wire any element up to HAX # <hax-bookmarklet> Bookmarklet > HAX as a bookmarklet script # <hax-cloud> Cloud > Turn any website into authorware with one tag and a computer # <haxcms-elements> Elements > HAX CMS series of elements to provide a full on CMS # <hax-iconset> Iconset > HAX-specific icons # <hax-logo> Logo > logo element for hax, obviously as a hax capable element. # <haxor-slevin> Slevin > Tech blogger theme # <hexagon-loader> Loader > # <hex-picker> Picker > Choose a color by hex or rgba code # <html-block> Block > A basic HTML block that provides HAXschema wiring # <i18n-manager> 18 > internationalization management singleton and helper classes # <iframe-loader> Loader > Adds a loading indicator for iframes. # <image-compare-slider> Compare > Slider that allows comparison of two images # <image-inspector> Inspector > Inspector tools on an image wrapping open seadragon library # <img-pan-zoom> Pan > Start of img-pan-zoom # <img-view-modal> Compare > Slider that allows comparison of two images # <inline-audio> Audio > audio that enhances the experience but is not required by being selectable inline with text content # intersection-element VanillaJS intersection oberver partcial element. Does nothing on it's own but wires up an element to correctly do intersection observation and running a callback when visible in the browsing window. Reasonable defaults that can be overloaded as needed.# <json-outline-schema> Outline > # <jwt-login> Login > JSON Web Token login broker / manager # <lazy-image-helpers> Image > helpers for building lazy loading images # <lazy-import-discover> Import > Break people's brains on simplifying webcomponent integrations # <learn-two-theme> Two > Learn2 theme for HAXcms # <lesson-overview> Overview > Clean presentation of what to expect in an upcoming lesson of instruction # <license-element> Element > Semantically accurate license for a work # <lorem-data> 11 > Start of lorem-data # <lrndesign-chart> Chart > Automated conversion of lrndesign-chart/ # <lrndesign-imagemap> Imagemap > Automated conversion of lrndesign-imagemap/ # <lrndesign-timeline> Timeline > an element that displays events on a timeline # <lrn-gitgraph> Gitgraph > Render git data in a graphing tree format # <lrn-math> Math > MathJAX element with HAX capabilities baked in # <lrn-table> Table > Generate a table that can be downloaded by users from a csv file # <lrn-vocab> Vocab > A simple vocabulary term highlighted with pop up for more details # <lrs-elements> Elements > elements for interfacing with learning record stores # <lunr-search> Search > LunrJS search element # <map-menu> Menu > Automated conversion of map-menu/ # <mark-the-words> The > Mark desired words in a sentence # <matching-question> Question > Match concepts question type # <md-block> Block > a markdown block # <media-behaviors> Behaviors > Automated conversion of media-behaviors/ # <media-image> Image > Automated conversion of media-image/ # <media-quote> Quote > A quote focused around a piece of media with citation with an optional caption. # <meme-maker> Maker > Automated conversion of meme-maker/ # <merit-badge> Badge > visual badge to communicate obtaining a skill # <micro-copy-heading> Copy > small call to action / attention that acts as a heading too # <micro-frontend-registry> Frontend > A singleton for registration and managing access to leverage microservices for web components # <moar-sarcasm> Sarcasm > Provide a laugh and a good example of VanillaJS for demos # <moment-element> Element > Start of moment-element # <multiple-choice> Choice > Automated conversion of multiple-choice/ # <music-player> Player > Visualize different types of music and simple format player # <mutation-observer-import-mixin> Observer > a SuperClass mixin that dynamically imports undefined custom element definitions # <oer-schema> Schema > Automated conversion of oer-schema/ # <opt-img> Img > an optimized image delivery # <outline-designer> Designer > tools to modify and visualize JSON Outline Schema for editing # <outline-player> Player > Automated conversion of outline-player/ # <page-break> Break > a visual break but also helps manage hierarchy # <page-contents-menu> Contents > Links that jump you to the right place in the page's content # <page-flag> Flag > visual flag for notes about a piece of content # <page-scroll-position> Scroll > Automated conversion of page-scroll-position/ # <page-section> Section > A well designed section of a page with many options for marketing purposes # <paper-input-flagged> Input > Automated conversion of paper-input-flagged/ # <paper-stepper> Stepper > Start of paper-stepper # <parallax-image> Image > Automated conversion of parallax-image/ # <pdf-browser-viewer> Browser > Start of pdf-browser-viewer # <person-testimonial> Testimonial > Automated conversion of person-testimonial/ # <place-holder> Holder > Automated conversion of place-holder/ # <play-list> List > scrollable component that accepts lightDom or data driven lists and generates a content player # <polaris-theme> Theme > A polaris PSU based branding styled theme # <portal-launcher> Launcher > silly thing to play with portal tag and progressive enhancement # <post-card> Card > sending you mail from afar, or the browser. # <pouch-db> Db > read and write localized data elements # <product-card> Card > basic display of a product with advanced data driven helpers # <product-glance> Glance > glance / overview of a product feature # <product-offering> Offering > Simple card for displaying product info # <progress-donut> Donut > Start of progress-donut # <promise-progress> Progress > An element to display the progress visually of forfilling an array of JS Promise objects # <q-r> R > Automated conversion of q-r/ # <simple-colors> Colors > a utilty that provides a global set of color classes and variables based on theme and accent color attributes # <relative-heading> Heading > outputs the correct heading hierarchy based on parent's heading # <replace-tag> Helpers > Loading helpers and css # <responsive-grid> Grid > Automated conversion of responsive-grid/ # <responsive-utility> Utility > Automated conversion of responsive-utility/ # <retro-card> Card > Simple card in a cool retro design based off of PSU DMD program style # <rich-text-editor> Text > a standalone rich text editor # <rpg-character> Character > Little RPG character that's remixable # <runkit-embed> Embed > # <schema-behaviors> Behaviors > Automated conversion of schema-behaviors/ # <scroll-button> Button > button to scroll to an area or back to top # <secure-request> Request > Automated conversion of secure-request/ # <self-check> Check > Automated conversion of self-check/ # <shadow-style> Style > write css that is for piercing shadow roots and applying CSS automatically # <simple-autocomplete> Autocomplete > auto complete either from an endpoint or local json array # <simple-blog> Blog > Automated conversion of simple-blog/ # <simple-colors> Colors > a utilty that provides a global set of color classes and variables based on theme and accent color attributes # <simple-colors-shared-styles> Colors > shared styles for simple-colors # <simple-cta> Cta > Simple call to action button # <simple-datetime> Datetime > Automated conversion of simple-datetime/ # <simple-emoji> Emoji > simplify emoji creation and management # <simple-fields> Fields > Uses JSON Schema or an array of fieldsto display a series of fields # <simple-filter> Filter > a super class element to provide filtering capabilities # <simple-icon> Icon > Render an SVG based icon # <simple-icon-picker> Icon > Uses simple-picker to create an icon picker # <simple-img> Img > simple image manipulation with a microservice # <simple-login> Login > a simple login form # <simple-modal> Modal > A simple modal that ensures accessibility and stack order context appropriately # <simple-picker> Picker > a simple picker for swatches, icons, etc. # <simple-popover> Popover > A popover alertdialog that is positioned next to a target element # <simple-progress> Progress > a simple progress slider bar # <simple-range-input> Range > simple styling on a range input # <simple-search> Search > Automated conversion of simple-search # <simple-toast> Toast > A singular toast / message for conistency # <simple-toolbar> Toolbar > a customizable toolbar # <simple-tooltip> Tooltip > a simple tooltip forked from paper-tooltip with the same api # <simple-wc> Wc > A simple web component wrapper to simplify consistent patterns of element creation # <social-share-link> Share > a link to share content on social # <sorting-question> Question > sorting questions to be in the right order when they are randomized. # <spotify-embed> Embed > embed spotify playlists # <star-rating> Rating > rating display and interaction widget # <stop-note> Note > Automated conversion of stop-note/ # Storybook utilities This provides some utility functions for working with storybook and our monorepo. It is for internal purposes only though it is published for maintainability.# <super-daemon> Daemon > # <tagging-question> Question > Answer question by applying related tags # <terrible-themes> Themes > themes inspired by creations by btopro from his youth. legitimate, terrible websites. # <training-theme> Theme > theme for training content in HAXcms # <twitter-embed> Embed > A simple twitter embed w/ singleton for performance / multiple embed # <type-writer> Writer > typewritter effect # <undo-manager> Manager > an undo history manager element # <unity-webgl> Webgl > Unity WebGL player # <user-action> Action > track user actions and allow them to talk to xAPI stores easily # <user-scaffold> Scaffold > memory and context to establish and maintain appropriate user scaffolding # Utils A series of functions that are reusable acros many JS contexts, many written to help with sanitization and clean up of data in a web component context.# <video-player> Player > Automated conversion of video-player/ # <vocab-term> Term > a vocabulary term visualized in the page # <voice-recorder> Recorder > LAME bridge # <wc-autoload> Autoload > automatically load new tags in the dom # <wikipedia-query> Query > Query and present information from wikipedia with correct citation # <word-count> Count > Counts the words in the slotted text and provides a small text badge # <wysiwyg-hax> Hax > Start of wysiwyg-hax fork ================================================ FILE: elements/a11y-behaviors/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg ================================================ FILE: elements/a11y-behaviors/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/a11y-behaviors/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/a11y-behaviors/.npmignore ================================================ node_modules ================================================ FILE: elements/a11y-behaviors/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/a11y-behaviors/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/a11y-behaviors/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/a11y-behaviors/README.md ================================================ # <a11y-behaviors> 11 > Behaviors / mixins to improve A11y in elements ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing module / web component */ import '@haxtheweb/a11y-behaviors/a11y-behaviors.js'; ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-behaviors/a11y-behaviors.js ================================================ export const A11yBehaviors = function (SuperClass) { return class extends SuperClass { /** * Get a a11y safe text color based on background color * @prop {string} bgColor hexadecimal value for the color * @return {string} hexadecimal value for the color */ getTextContrastColor(bgColor) { // verify the value is hex value let color = ""; // strip hash from string const colorBuffer = bgColor.replace("#", ""); // convert rrggbb to decimal const rgb = parseInt(colorBuffer, 16); // extract RGB const r = (rgb >> 16) & 0xff; const g = (rgb >> 8) & 0xff; const b = (rgb >> 0) & 0xff; // calculate luma const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; // per ITU-R BT.709 // if the luma is to low switch to white text if (luma < 141) { color = "#ffffff"; } else { color = "#000000"; } // Set color and background color vars return color; } /** * Validate and modify the text contrast to ensure the correct contrast */ computeTextPropContrast(textprop, bgprop) { // verify the value is hex value if (this[bgprop].includes("#")) { const color = this.getTextContrastColor(this[bgprop]); // Set color and background color vars this.set(textprop, color); } } }; }; ================================================ FILE: elements/a11y-behaviors/demo/index.html ================================================ A11YBehaviors: a11y-behaviors Demo

    Basic a11y-behaviors demo

    ================================================ FILE: elements/a11y-behaviors/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/a11y-behaviors/index.html ================================================ a11y-behaviors documentation ================================================ FILE: elements/a11y-behaviors/package.json ================================================ { "name": "@haxtheweb/a11y-behaviors", "wcfactory": { "className": "A11YBehaviors", "customElementClass": "PolymerElement", "elementName": "a11y-behaviors", "generator-wcfactory-version": "0.3.1", "useHAX": false, "useSass": false, "files": { "js": "src/a11y-behaviors.js" }, "sharedStyles": [] }, "version": "25.0.0", "description": "Accessibility behaviors / mix-ins to improve a11y overall", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "a11y-behaviors.js", "module": "a11y-behaviors.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/a11y-behaviors/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/a11y-behaviors/test/a11y-behaviors.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import { LitElement } from "lit"; import { A11yBehaviors } from "../a11y-behaviors.js"; // Create a test element that uses the A11yBehaviors mixin class TestA11yBehaviors extends A11yBehaviors(LitElement) { static get properties() { return { backgroundColor: { type: String }, textColor: { type: String }, }; } constructor() { super(); this.backgroundColor = "#ffffff"; this.textColor = "#000000"; } render() { return html`
    Test content with accessible colors
    `; } // Helper method for testing set(prop, value) { this[prop] = value; } static get tag() { return "test-a11y-behaviors"; } } globalThis.customElements.define(TestA11yBehaviors.tag, TestA11yBehaviors); describe("A11yBehaviors mixin test", () => { let element; beforeEach(async () => { element = await fixture(html` `); }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("test-a11y-behaviors"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("getTextContrastColor method", () => { it("should return white text for dark backgrounds", () => { // Very dark background expect(element.getTextContrastColor("#000000")).to.equal("#ffffff"); // Dark blue expect(element.getTextContrastColor("#003366")).to.equal("#ffffff"); // Dark red expect(element.getTextContrastColor("#660000")).to.equal("#ffffff"); // Medium dark color expect(element.getTextContrastColor("#666666")).to.equal("#ffffff"); }); it("should return black text for light backgrounds", () => { // Very light background expect(element.getTextContrastColor("#ffffff")).to.equal("#000000"); // Light yellow expect(element.getTextContrastColor("#ffff99")).to.equal("#000000"); // Light blue expect(element.getTextContrastColor("#ccddff")).to.equal("#000000"); // Light gray expect(element.getTextContrastColor("#cccccc")).to.equal("#000000"); }); it("should handle colors with hash symbol", () => { expect(element.getTextContrastColor("#000000")).to.equal("#ffffff"); expect(element.getTextContrastColor("#ffffff")).to.equal("#000000"); }); it("should handle colors without hash symbol", () => { expect(element.getTextContrastColor("000000")).to.equal("#ffffff"); expect(element.getTextContrastColor("ffffff")).to.equal("#000000"); }); it("should handle 3-digit hex colors expanded to 6-digit", () => { // Note: The current implementation expects 6-digit hex, but let's test edge cases // These might not work perfectly with current implementation but document expected behavior expect(element.getTextContrastColor("000")).to.not.be.undefined; expect(element.getTextContrastColor("fff")).to.not.be.undefined; }); it("should handle specific accessibility-critical color combinations", () => { // Test colors around the luma threshold (141) // Colors that should trigger white text expect(element.getTextContrastColor("#808080")).to.equal("#ffffff"); // Colors that should trigger black text expect(element.getTextContrastColor("#c0c0c0")).to.equal("#000000"); }); }); describe("computeTextPropContrast method", () => { beforeEach(async () => { element.backgroundColor = "#ffffff"; element.textColor = "#000000"; await element.updateComplete; }); it("should compute and set text color for valid hex background colors", async () => { // Set a dark background element.backgroundColor = "#000000"; element.computeTextPropContrast("textColor", "backgroundColor"); expect(element.textColor).to.equal("#ffffff"); await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should compute and set text color for light backgrounds", async () => { // Set a light background element.backgroundColor = "#ffffff"; element.computeTextPropContrast("textColor", "backgroundColor"); expect(element.textColor).to.equal("#000000"); await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should not modify text color for non-hex background colors", async () => { const originalTextColor = element.textColor; // Set non-hex background colors element.backgroundColor = "red"; element.computeTextPropContrast("textColor", "backgroundColor"); expect(element.textColor).to.equal(originalTextColor); element.backgroundColor = "rgb(255, 0, 0)"; element.computeTextPropContrast("textColor", "backgroundColor"); expect(element.textColor).to.equal(originalTextColor); element.backgroundColor = "transparent"; element.computeTextPropContrast("textColor", "backgroundColor"); expect(element.textColor).to.equal(originalTextColor); }); it("should handle various hex color formats in background", async () => { // Test with hash element.backgroundColor = "#ff0000"; element.computeTextPropContrast("textColor", "backgroundColor"); expect(element.textColor).to.equal("#ffffff"); // Red background should get white text await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should work with different property names", async () => { // Create additional properties for testing element.primaryColor = "#000000"; element.primaryTextColor = "#cccccc"; element.computeTextPropContrast("primaryTextColor", "primaryColor"); expect(element.primaryTextColor).to.equal("#ffffff"); }); }); describe("Accessibility compliance scenarios", () => { it("should maintain accessibility with computed high contrast colors", async () => { // Test various background colors and ensure accessibility const testColors = [ "#000000", // Black "#ffffff", // White "#ff0000", // Red "#00ff00", // Green "#0000ff", // Blue "#ffff00", // Yellow "#ff00ff", // Magenta "#00ffff", // Cyan "#808080", // Gray "#c0c0c0", // Light gray ]; for (const bgColor of testColors) { element.backgroundColor = bgColor; element.computeTextPropContrast("textColor", "backgroundColor"); await element.updateComplete; // Verify the element remains accessible with computed colors await expect(element).shadowDom.to.be.accessible(); } }); it("should handle edge cases that might affect accessibility", async () => { // Test with colors very close to the luma threshold const edgeCaseColors = [ "#8d8d8d", // Right around the threshold "#8e8e8e", // Just above threshold "#8c8c8c", // Just below threshold ]; for (const bgColor of edgeCaseColors) { element.backgroundColor = bgColor; element.computeTextPropContrast("textColor", "backgroundColor"); await element.updateComplete; // The computed color should be either pure black or pure white expect(["#000000", "#ffffff"]).to.include(element.textColor); await expect(element).shadowDom.to.be.accessible(); } }); }); describe("Integration with Lit properties and accessibility", () => { it("should work when properties change dynamically", async () => { // Start with light background element.backgroundColor = "#ffffff"; element.computeTextPropContrast("textColor", "backgroundColor"); await element.updateComplete; expect(element.textColor).to.equal("#000000"); await expect(element).shadowDom.to.be.accessible(); // Change to dark background element.backgroundColor = "#000000"; element.computeTextPropContrast("textColor", "backgroundColor"); await element.updateComplete; expect(element.textColor).to.equal("#ffffff"); await expect(element).shadowDom.to.be.accessible(); }); it("should maintain accessibility throughout property changes", async () => { const colorTransitions = [ ["#ffffff", "#000000"], // White to black ["#000000", "#ffffff"], // Black to white ["#ff0000", "#00ff00"], // Red to green ["#0000ff", "#ffff00"], // Blue to yellow ]; for (const [fromColor, toColor] of colorTransitions) { element.backgroundColor = fromColor; element.computeTextPropContrast("textColor", "backgroundColor"); await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); element.backgroundColor = toColor; element.computeTextPropContrast("textColor", "backgroundColor"); await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); } }); }); }); ================================================ FILE: elements/a11y-carousel/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/a11y-carousel/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/a11y-carousel/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/a11y-carousel/.npmignore ================================================ node_modules ================================================ FILE: elements/a11y-carousel/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/a11y-carousel/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/a11y-carousel/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/a11y-carousel/README.md ================================================ # <a11y-carousel> Compare > Slider that allows comparison of two images ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing module / web component */ import '@haxtheweb/a11y-carousel/a11y-carousel.js'; ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-carousel/a11y-carousel.js ================================================ import { LitElement, html, css } from "lit"; import { RadioBehaviors } from "@haxtheweb/radio-behaviors/radio-behaviors.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import "./lib/a11y-carousel-button.js"; /** * `a11y-carousel` * Layers images over each other with a slider interface to compare them * @demo demo/index.html * @element a11y-carousel */ class a11yCarousel extends RadioBehaviors(LitElement) { //styles function static get styles() { return [ css` :host { margin: 15px 0; --a11y-carousel-background-image: none; } ::slotted(figure) { margin: 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; } :host([hidden]), ::slotted(figure:not([active])) { display: none !important; } .sr-only { position: absolute; left: -99999px; width: 0; overflow: hidden; } @media screen { #inner { margin-bottom: 10px; position: relative; z-index: 2; } .buttons { display: flex; align-items: stretch; justify-content: center; z-index: 200; } a11y-carousel-button.prevnext { position: absolute; margin: 0; padding: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; border: 0px solid transparent; width: 50%; } a11y-carousel-button.prevnext simple-icon-lite { opacity: 0; --simple-icon-width: 30%; --simple-icon-height: 30%; transition: 0.5s all ease-in-out; } a11y-carousel-button.prevnext:focus, a11y-carousel-button.prevnext:hover { outline: none; } a11y-carousel-button.prevnext:focus simple-icon-lite, a11y-carousel-button.prevnext:hover simple-icon-lite { opacity: 1; color: var(--a11y-carousel-button-background-color, black); } a11y-carousel-button[button-type="prev"] { left: 0; right: 50%; } a11y-carousel-button[button-type="next"] { right: 0; left: 50%; align-items: flex-end; } a11y-carousel-button.button { flex: 0 0 var(--a11y-carousel-button-width, 40px); height: var(--a11y-carousel-button-height, 10px); margin: var(--a11y-carousel-button-margin, 5px); padding: var(--a11y-carousel-button-padding, 0px); background-color: var( --a11y-carousel-button-background-color, black ); border: var(--a11y-carousel-button-border, 1px solid black); border-radius: var( --a11y-carousel-button-border-radius, 1px solid black ); } } `, ]; } render() { return html`
    ${this.noPrevNext ? `` : html` ${this.nextLabel} ${this.nextLabel} `}
    ${this.noButtons ? `` : html`
    ${(this.itemData || []).map( (item) => html` ${item.index + 1} `, )}
    `}
    `; } // properties available to the custom element for data binding static get properties() { return { ...super.properties, nextLabel: { type: String, }, noPrevNext: { type: Boolean, attribute: "no-prev-next", }, noButtons: { type: Boolean, attribute: "no-buttons", }, prevLabel: { type: String, }, }; } /** * Store the tag name to make it easier to obtain directly. * @notice function name must be here for tooling to operate correctly */ static get tag() { return "a11y-carousel"; } constructor() { super(); this.noButtons = false; this.noPrevNext = false; this.prevLabel = "previous"; this.nextLabel = "next"; } /** * overrides query selector for slotted children * @readonly */ get __query() { return "figure"; } /** * * overrides attribute to apply to selected item * @readonly */ get __selected() { return "active"; } /** * overrides name of event that selects item * @readonly */ get __selectEvent() { return "select-carousel-item"; } /** * gets id for first figure * * @readonly * @memberof a11yCarousel */ get first() { return this.itemData && this.itemData[0] ? this.itemData[0].id : undefined; } /** * gets id for previous figure * * @readonly * @memberof a11yCarousel */ get prev() { return this.itemData && this.itemData[this.selectedIndex - 1] ? this.itemData[this.selectedIndex - 1].id : this.first; } /** * gets id for last figure * * @readonly * @memberof a11yCarousel */ get last() { return this.itemData && this.itemData[this.itemData.length - 1] ? this.itemData[this.itemData.length - 1].id : undefined; } /** * gets id for next figure * * @readonly * @memberof a11yCarousel */ get next() { return this.itemData && this.itemData[this.selectedIndex + 1] ? this.itemData[this.selectedIndex + 1].id : this.last; } firstUpdated(changedProperties) { if (super.firstUpdated) super.firstUpdated(changedProperties); this._handleSelectionChange(); } /** * gets image css for selected image * * @returns * @memberof a11yCarousel */ _getImage() { let img = this.querySelector(`figure#${this.selection} > img`) || this.querySelector(`figure > img`); return img ? `url("${img.src}")` : undefined; } /** * shows or hides items based on selection */ _handleSelectionChange() { super._handleSelectionChange(); this._updateItemData(); let buttons = this.querySelectorAll(`a11y-carousel-button`); this.style.setProperty( "--a11y-carousel-background-image", this._getImage(), ); Object.keys(buttons || {}).forEach((key) => { let button = buttons[key]; if (button.buttonType === "first") button.controls = this.first; if (button.buttonType === "prev") button.controls = this.prev; if (button.buttonType === "next") button.controls = this.next; if (button.buttonType === "last") button.controls = this.last; button.active = button.controls === this.selection; }); } } globalThis.customElements.define(a11yCarousel.tag, a11yCarousel); export { a11yCarousel }; ================================================ FILE: elements/a11y-carousel/demo/index.html ================================================ a11yCarousel: a11y-carousel Demo

    Basic a11y-carousel demo

    ================================================ FILE: elements/a11y-carousel/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/a11y-carousel/index.html ================================================ a11y-carousel documentation ================================================ FILE: elements/a11y-carousel/lib/a11y-carousel-button.js ================================================ import { LitElement, html, css } from "lit"; /** * `a11y-carousel-button` * button that controls a carousel * @demo demo/index.html * @element a11y-carousel-button */ class a11yCarouselButton extends LitElement { //styles function static get styles() { return [ css` :host { display: inline; background-color: transparent; border: 1px solid black; padding: 2px 5px; margin: 15px 2px; text-align: center; } :host([hidden]) { display: none !important; } :host([disabled]) { opacity: 0.5; } @media print { :host { display: none !important; } } `, ]; } render() { return html` `; } // properties available to the custom element for data binding static get properties() { return { active: { type: Boolean, attribute: "active", reflect: true, }, buttonType: { type: String, attribute: "button-type", reflect: true, }, controls: { type: String, attribute: "controls", reflect: true, }, disabled: { type: Boolean, attribute: "disabled", reflect: true, }, hidden: { type: Boolean, attribute: "hidden", reflect: true, }, }; } /** * Store the tag name to make it easier to obtain directly. * @notice function name must be here for tooling to operate correctly */ static get tag() { return "a11y-carousel-button"; } constructor() { super(); this.tabindex = 0; this.setAttribute("role", "button"); this.setAttribute("tabindex", 0); this.addEventListener("click", this._handleClick); this.addEventListener("keydown", this._handleClick); this.active = false; this.hidden = false; this.disabled = false; } disconnectedCallback() { this.removeEventListener("click", this._handleClick); this.removeEventListener("keydown", this._handleClick); if (super.disconnectedCallback) super.disconnectedCallback(); } updated(changedProperties) { if (super.updated) super.updated(changedProperties); changedProperties.forEach((oldValue, propName) => { if (["controls", "active"].includes(propName)) this.disabled = !this.controls || this.active; }); } /** * Fires when clicked. * * @event select-carousel-item */ _handleClick(e) { if ( e.type !== "keydown" || e.key === " " || e.key === "Enter" || e.key === "Spacebar" ) { if (!this.disabled) { e.preventDefault(); this.dispatchEvent( new CustomEvent("select-carousel-item", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); } } } } globalThis.customElements.define(a11yCarouselButton.tag, a11yCarouselButton); export { a11yCarouselButton }; ================================================ FILE: elements/a11y-carousel/package.json ================================================ { "name": "@haxtheweb/a11y-carousel", "wcfactory": { "className": "a11yCarousel", "customElementClass": "PolymerElement", "elementName": "a11y-carousel", "generator-wcfactory-version": "0.3.1", "useHAX": true, "useSass": false, "files": { "css": "src/a11y-carousel.css", "html": "src/a11y-carousel.html", "js": "src/a11y-carousel.js", "properties": "src/a11y-carousel-properties.json", "hax": "src/a11y-carousel-hax.json" }, "sharedStyles": [] }, "version": "25.0.0", "description": "Slider that allows comparison of two images", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "a11y-carousel.js", "module": "a11y-carousel.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/a11y-details": "^25.0.0", "@haxtheweb/radio-behaviors": "^25.0.0", "@haxtheweb/simple-icon": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/a11y-carousel/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/a11y-carousel/test/a11y-carousel.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../a11y-carousel.js"; describe("a11y-carousel test", () => { let element; beforeEach(async () => { element = await fixture(html`
    Random Kitten, 400 X 200
    Item 1
    Random Kitten, 300 X 100
    Item 2
    Random Kitten, 400 X 300
    Item 3
    `); }); it("basic setup", async () => { expect(element).to.exist; expect(element.noPrevNext).to.equal(true); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Slot functionality", () => { it("should have all named slots with correct content", async () => { const testElement = await fixture(html`
    Above content
    Slotted Image
    Slotted Image
    Default Image
    Default Image
    Below content
    `); await testElement.updateComplete; // Test above slot const aboveSlot = testElement.shadowRoot.querySelector('slot[name="above"]'); expect(aboveSlot).to.exist; const aboveNodes = aboveSlot.assignedNodes({ flatten: true }); expect(aboveNodes.length).to.be.greaterThan(0); expect(aboveNodes[0].textContent).to.include("Above content"); // Test img slot const imgSlot = testElement.shadowRoot.querySelector('slot[name="img"]'); expect(imgSlot).to.exist; const imgNodes = imgSlot.assignedNodes({ flatten: true }); expect(imgNodes.length).to.be.greaterThan(0); // Test default slot const defaultSlot = testElement.shadowRoot.querySelector("slot:not([name])"); expect(defaultSlot).to.exist; const defaultNodes = defaultSlot.assignedNodes({ flatten: true }); expect(defaultNodes.length).to.be.greaterThan(0); // Test below slot const belowSlot = testElement.shadowRoot.querySelector('slot[name="below"]'); expect(belowSlot).to.exist; const belowNodes = belowSlot.assignedNodes({ flatten: true }); expect(belowNodes.length).to.be.greaterThan(0); expect(belowNodes[0].textContent).to.include("Below content"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle empty slots gracefully", async () => { const testElement = await fixture(html`
    Only Image
    Only Image
    `); await testElement.updateComplete; const slots = testElement.shadowRoot.querySelectorAll("slot"); expect(slots.length).to.be.greaterThan(0); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Property type validation with accessibility", () => { let testElement; beforeEach(async () => { testElement = await fixture(html`
    Test Image 1
    Test Image 1
    Test Image 2
    Test Image 2
    `); await testElement.updateComplete; }); describe("nextLabel property", () => { it("should accept valid string values and maintain accessibility", async () => { testElement.nextLabel = "Forward"; await testElement.updateComplete; expect(testElement.nextLabel).to.equal("Forward"); await expect(testElement).shadowDom.to.be.accessible(); testElement.nextLabel = "Next Item"; await testElement.updateComplete; expect(testElement.nextLabel).to.equal("Next Item"); await expect(testElement).shadowDom.to.be.accessible(); // Note: Empty string labels can cause accessibility issues testElement.nextLabel = ""; await testElement.updateComplete; expect(testElement.nextLabel).to.equal(""); // Skip accessibility test for empty labels as they cause violations }); it("should accept non-string values but maintain type in JavaScript", async () => { testElement.nextLabel = 123; await testElement.updateComplete; expect(testElement.nextLabel).to.equal(123); // Skip accessibility test for numeric values - they render as strings but may not be ideal testElement.nextLabel = true; await testElement.updateComplete; expect(testElement.nextLabel).to.equal(true); // Skip accessibility test for boolean values testElement.nextLabel = null; await testElement.updateComplete; expect(testElement.nextLabel).to.equal(null); // Skip accessibility test for null values as they cause empty title violations }); it("should have correct default value", () => { expect(testElement.nextLabel).to.equal("next"); }); }); describe("prevLabel property", () => { it("should accept valid string values and maintain accessibility", async () => { testElement.prevLabel = "Back"; await testElement.updateComplete; expect(testElement.prevLabel).to.equal("Back"); await expect(testElement).shadowDom.to.be.accessible(); testElement.prevLabel = "Previous Item"; await testElement.updateComplete; expect(testElement.prevLabel).to.equal("Previous Item"); await expect(testElement).shadowDom.to.be.accessible(); testElement.prevLabel = ""; await testElement.updateComplete; expect(testElement.prevLabel).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept non-string values but maintain type in JavaScript", async () => { testElement.prevLabel = 456; await testElement.updateComplete; expect(testElement.prevLabel).to.equal(456); await expect(testElement).shadowDom.to.be.accessible(); testElement.prevLabel = false; await testElement.updateComplete; expect(testElement.prevLabel).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); testElement.prevLabel = undefined; await testElement.updateComplete; expect(testElement.prevLabel).to.equal(undefined); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.prevLabel).to.equal("previous"); }); }); describe("noPrevNext property", () => { it("should accept boolean values and maintain accessibility", async () => { testElement.noPrevNext = true; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); testElement.noPrevNext = false; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept non-boolean values but maintain type in JavaScript", async () => { testElement.noPrevNext = 1; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal(1); await expect(testElement).shadowDom.to.be.accessible(); testElement.noPrevNext = "true"; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal("true"); await expect(testElement).shadowDom.to.be.accessible(); testElement.noPrevNext = "any string"; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal("any string"); await expect(testElement).shadowDom.to.be.accessible(); testElement.noPrevNext = {}; await testElement.updateComplete; expect(testElement.noPrevNext).to.deep.equal({}); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept falsy values and maintain accessibility", async () => { testElement.noPrevNext = 0; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal(0); await expect(testElement).shadowDom.to.be.accessible(); testElement.noPrevNext = ""; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); testElement.noPrevNext = null; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal(null); await expect(testElement).shadowDom.to.be.accessible(); testElement.noPrevNext = undefined; await testElement.updateComplete; expect(testElement.noPrevNext).to.equal(undefined); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.noPrevNext).to.equal(false); }); }); describe("noButtons property", () => { it("should accept boolean values and maintain accessibility", async () => { testElement.noButtons = true; await testElement.updateComplete; expect(testElement.noButtons).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); testElement.noButtons = false; await testElement.updateComplete; expect(testElement.noButtons).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept non-boolean values but maintain type in JavaScript", async () => { testElement.noButtons = 42; await testElement.updateComplete; expect(testElement.noButtons).to.equal(42); await expect(testElement).shadowDom.to.be.accessible(); testElement.noButtons = "false"; await testElement.updateComplete; expect(testElement.noButtons).to.equal("false"); await expect(testElement).shadowDom.to.be.accessible(); testElement.noButtons = []; await testElement.updateComplete; expect(testElement.noButtons).to.deep.equal([]); await expect(testElement).shadowDom.to.be.accessible(); testElement.noButtons = { test: true }; await testElement.updateComplete; expect(testElement.noButtons).to.deep.equal({ test: true }); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept falsy values and maintain accessibility", async () => { testElement.noButtons = 0; await testElement.updateComplete; expect(testElement.noButtons).to.equal(0); await expect(testElement).shadowDom.to.be.accessible(); testElement.noButtons = ""; await testElement.updateComplete; expect(testElement.noButtons).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); testElement.noButtons = null; await testElement.updateComplete; expect(testElement.noButtons).to.equal(null); await expect(testElement).shadowDom.to.be.accessible(); testElement.noButtons = undefined; await testElement.updateComplete; expect(testElement.noButtons).to.equal(undefined); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.noButtons).to.equal(false); }); }); }); describe("Attribute to property mapping", () => { it("should set noPrevNext property from no-prev-next attribute", async () => { const testElement = await fixture(html`
    Test Image 1
    Test Image 1
    `); expect(testElement.noPrevNext).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); it("should set noButtons property from no-buttons attribute", async () => { const testElement = await fixture(html`
    Test Image 1
    Test Image 1
    `); expect(testElement.noButtons).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Navigation functionality and RadioBehaviors integration", () => { let navElement; beforeEach(async () => { navElement = await fixture(html` `); await navElement.updateComplete; }); it("should have correct navigation properties from RadioBehaviors", async () => { // Test inherited RadioBehaviors properties expect(navElement.first).to.exist; expect(navElement.last).to.exist; expect(navElement.prev).to.exist; expect(navElement.next).to.exist; expect(navElement.itemData).to.exist; expect(navElement.itemData.length).to.equal(3); await expect(navElement).shadowDom.to.be.accessible(); }); it("should correctly calculate navigation IDs", async () => { const firstId = navElement.first; const lastId = navElement.last; const prevId = navElement.prev; const nextId = navElement.next; expect(firstId).to.equal("nav-fig-1"); expect(lastId).to.equal("nav-fig-3"); expect(prevId).to.equal("nav-fig-3"); // wraps to last when on first expect(nextId).to.equal("nav-fig-2"); // next item await expect(navElement).shadowDom.to.be.accessible(); }); it("should handle selection changes and maintain accessibility", async () => { // Test initial selection expect(navElement.selection).to.exist; // Simulate selection change const changeEvent = new CustomEvent("select-carousel-item", { detail: { value: "nav-fig-2" }, }); navElement.dispatchEvent(changeEvent); await navElement.updateComplete; // Check that navigation IDs update accordingly expect(navElement.prev).to.equal("nav-fig-1"); expect(navElement.next).to.equal("nav-fig-3"); await expect(navElement).shadowDom.to.be.accessible(); }); it("should maintain accessibility when navigation buttons are rendered", async () => { // Force full navigation (buttons + prev/next) navElement.noButtons = false; navElement.noPrevNext = false; await navElement.updateComplete; // Check that navigation buttons exist in shadow DOM const buttons = navElement.shadowRoot.querySelectorAll( "a11y-carousel-button", ); expect(buttons.length).to.be.greaterThan(0); await expect(navElement).shadowDom.to.be.accessible(); }); }); describe("Image management and background functionality", () => { it("should manage background image CSS property based on selection", async () => { const testElement = await fixture(html`
    Background Image 1
    Background Image 1
    Background Image 2
    Background Image 2
    `); await testElement.updateComplete; // Check that background image CSS property is set const bgImageValue = testElement.style.getPropertyValue( "--a11y-carousel-background-image", ); expect(bgImageValue).to.exist; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle missing images gracefully", async () => { const testElement = await fixture(html`
    No Image Figure
    `); await testElement.updateComplete; // Should not throw error even without images expect(testElement._getImage()).to.be.undefined; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Accessibility scenarios with different property combinations", () => { it("should remain accessible with no navigation buttons", async () => { const testElement = await fixture(html`
    Image 1
    Image 1
    Image 2
    Image 2
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with custom labels via properties", async () => { const testElement = await fixture(html`
    Image 1
    Image 1
    Image 2
    Image 2
    `); // Set properties programmatically since attributes don't map to properties automatically testElement.nextLabel = "Go Forward"; testElement.prevLabel = "Go Back"; await testElement.updateComplete; expect(testElement.nextLabel).to.equal("Go Forward"); expect(testElement.prevLabel).to.equal("Go Back"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle edge case of programmatically set empty labels", async () => { const testElement = await fixture(html`
    Image 1
    Image 1
    Image 2
    Image 2
    `); // Set empty labels programmatically testElement.nextLabel = ""; testElement.prevLabel = ""; await testElement.updateComplete; expect(testElement.nextLabel).to.equal(""); expect(testElement.prevLabel).to.equal(""); // Note: Empty labels might cause accessibility warnings, but component should still function // Skip accessibility test for empty labels as they cause violations }); }); describe("Event handling and lifecycle", () => { it("should handle selection change events correctly", async () => { const testElement = await fixture(html`
    Event Image 1
    Event Image 1
    Event Image 2
    Event Image 2
    `); await testElement.updateComplete; let eventFired = false; testElement.addEventListener("select-carousel-item", () => { eventFired = true; }); // Trigger selection change const event = new CustomEvent("select-carousel-item", { detail: { value: "event-fig-2" }, }); testElement.dispatchEvent(event); await testElement.updateComplete; expect(eventFired).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle firstUpdated lifecycle correctly", async () => { const testElement = await fixture(html`
    Lifecycle Image 1
    Lifecycle Image 1
    `); await testElement.updateComplete; // Element should be properly initialized expect(testElement.itemData).to.exist; expect(testElement.itemData.length).to.be.greaterThan(0); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Edge cases and error handling", () => { it("should handle unusual label values without breaking functionality", async () => { const testElement = await fixture(html`
    Edge Image 1
    Edge Image 1
    `); const unusualValues = [ " \t\n ", // whitespace "", // potentially dangerous content "\u00A0\u2000\u2001", // various unicode spaces "🎠 carousel navigation 🎠", // emoji "Very long navigation label that might cause display issues or layout problems with the carousel interface", "Multi\nline\nlabel", // multiline "Label with 'quotes' and \"double quotes\" and special chars: !@#$%^&*()", ]; for (const value of unusualValues) { testElement.nextLabel = value; testElement.prevLabel = value; await testElement.updateComplete; expect(testElement.nextLabel).to.equal(value); expect(testElement.prevLabel).to.equal(value); // Most of these should maintain accessibility if (!value.includes(" ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-collapse/a11y-collapse.js ================================================ import { html, css } from "lit"; import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import "@haxtheweb/simple-icon/lib/simple-icon-button-lite.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import "@haxtheweb/simple-tooltip/simple-tooltip.js"; class A11yCollapse extends DDD { static get styles() { return [ super.styles, css` :host { display: block; margin: var(--a11y-collapse-margin, var(--ddd-spacing-4) 0); border: var(--a11y-collapse-border, var(--ddd-border-sm)); border-color: var( --a11y-collapse-border-color, var(--ddd-theme-default-coalyGray) ); transition: all 0.5s cubic-bezier(0.075, 0.82, 0.165, 1); } :host([heading-button]) #heading { cursor: pointer; } :host(:not(:first-of-type)) { border-top: var( --a11y-collapse-border-between, var(--a11y-collapse-border, var(--ddd-border-xs)) ); } :host([disabled]) { opacity: 0.5; } *[aria-controls="content"][disabled] { cursor: not-allowed; } button { background: transparent; border: 0; padding: 0; margin: 0; width: 100%; text-align: left; font-size: var(--ddd-theme-body-font-size); font-family: var(--ddd-font-primary); } #heading { display: flex; justify-content: stretch; align-items: center; padding: 0 var( --a11y-collapse-padding-right, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ) 0 var( --a11y-collapse-padding-left, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ); font-weight: var( --a11y-collapse-heading-font-weight, var(--ddd-font-weight-bold) ); margin: var(--a11y-collapse-margin); color: var(--a11y-collapse-heading-color); background-color: var(--a11y-collapse-heading-background-color); } #text { flex-grow: 1; overflow: hidden; } #expand { transform: rotate(var(--a11y-collapse-transform-deg, 0deg)); transition: transform 0.75s ease; } #content { padding: var( --a11y-collapse-padding-top, var(--a11y-collapse-vertical-padding, var(--ddd-spacing-4)) ) var( --a11y-collapse-padding-right, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ) var( --a11y-collapse-padding-bottom, var(--a11y-collapse-vertical-padding, var(--ddd-spacing-4)) ) var( --a11y-collapse-padding-left, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ); border-top: var(--a11y-collapse-border, var(--ddd-border-xs)); border-color: var( --a11y-collapse-border-color, var(--ddd-theme-default-coalyGray) ); } @media screen { #expand.rotated { transform: rotate( var(--a11y-collapse-transform-rotated-deg, -90deg) ); transition: transform 0.75s ease; } :host #content { padding: 0 var( --a11y-collapse-padding-right, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ) 0 var( --a11y-collapse-padding-left, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ); border-top: none; border-color: var(--a11y-collapse-border-color); max-height: 0; transition: visibility var(--a11y-collapse-transition-duration, 0.75s) ease, opacity var(--a11y-collapse-transition-duration, 0.75s) ease, max-height var(--a11y-collapse-transition-duration, 0.75s) ease; overflow-y: hidden; opacity: 1; visibility: visible; } :host #content-inner { max-height: 0; overflow-y: var(--a11y-collapse-overflow-y, hidden); } :host([expanded]) #content { padding: var( --a11y-collapse-padding-top, var(--a11y-collapse-vertical-padding, var(--ddd-spacing-4)) ) var( --a11y-collapse-padding-right, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ) var( --a11y-collapse-padding-bottom, var(--a11y-collapse-vertical-padding, var(--ddd-spacing-4)) ) var( --a11y-collapse-padding-left, var(--a11y-collapse-horizontal-padding, var(--ddd-spacing-4)) ); border-top: var(--a11y-collapse-border, var(--ddd-border-xs)); border-color: var( --a11y-collapse-border-color, var(--ddd-theme-default-coalyGray) ); max-height: 200000000000vh; /* why is this needed? */ } :host([expanded]) #content-inner { max-height: var(--a11y-collapse-max-height, 200000000000vh); transition: max-height 0.75s ease; } :host(:not([expanded])) #content { visibility: hidden; opacity: 0; height: 0; } } `, ]; } render() { return html` ${this.headingButton || this.accordion ? this._makeHeadingButton() : this._makeIconButton()}
    ${this.expanded ? html`` : ``}
    `; } static get tag() { return "a11y-collapse"; } static get properties() { return { ...super.properties, /** * Heading is the expand button. */ headingButton: { type: Boolean, reflect: true, attribute: "heading-button", }, /** * disabled */ disabled: { type: Boolean, reflect: true, }, /** * hidden */ hidden: { type: Boolean, reflect: true, }, /** * icon when expanded */ expanded: { type: Boolean, reflect: true, }, /** * icon for the button */ icon: { type: String, }, /** * icon when expanded */ iconExpanded: { type: String, attribute: "icon-expanded", }, /** * label for the button */ label: { type: String, }, /** * heading / title for the button */ heading: { type: String, }, /** * optional label for the button when expanded */ labelExpanded: { type: String, attribute: "label-expanded", }, /** * tooltip for the button */ tooltip: { type: String, }, /** * optional tooltip for the button when expanded */ tooltipExpanded: { type: String, attribute: "tooltip-expanded", }, /** * @deprecated Use {@link headingButton} instead */ accordion: { type: Boolean, reflect: true, }, }; } constructor() { super(); this.headingButton = false; this.accordion = false; this.disabled = false; this.hidden = false; this.expanded = false; this.heading = null; this.icon = "icons:expand-more"; this.label = "expand"; this.tooltip = "expand"; } /** * haxProperties integration via file reference */ static get haxProperties() { return new URL(`./lib/${this.tag}.haxProperties.json`, import.meta.url) .href; } connectedCallback() { super.connectedCallback(); setTimeout(() => { /** * Fires when constructed, so that parent radio group can listen for it. * * @event a11y-collapse-attached */ this.dispatchEvent( new CustomEvent("a11y-collapse-attached", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); }, 0); } /** * Let the group know that this is gone. */ disconnectedCallback() { /** * Fires when detatched, so that parent radio group will no longer listen for it. * * @event a11y-collapse-detached */ this.dispatchEvent( new CustomEvent("a11y-collapse-detached", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); super.disconnectedCallback(); } /** * Collapses the content */ collapse() { this.toggle(false); } /**button /** * Toggles based on mode * @param {boolean} open whether to toggle open */ toggle(open = !this.expanded) { this.expanded = open; } updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { if (propName === "expanded") this._fireToggleEvents(); }); } /** * Fires toggling events */ _fireToggleEvents() { /** * Fires when toggled. * * @event toggle */ this.dispatchEvent( new CustomEvent("toggle", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); /** * Fires when toggled. @deprecated Use `toggle` instead * * @event a11y-collapse-toggle */ this.dispatchEvent( new CustomEvent("a11y-collapse-toggle", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); if (this.expanded) { /** * Fires when expanded. * * @event expand */ this.dispatchEvent( new CustomEvent("expand", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); this.label = "collapse"; this.tooltip = "collapse"; } else { /** * Fires when collapsed. * * @event collapse */ this.dispatchEvent( new CustomEvent("collapse", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); this.label = "expand"; this.tooltip = "expand"; } } /** * determines the property based on expanded state * @param {string} defaultProp default property * @param {string} expandedProp property when expanded * @param {boolean} expanded whether a11y-collapse is expanded * @returns {string} property based on expanded state */ _getExpanded(defaultProp, expandedProp, expanded) { return expanded && expandedProp ? expandedProp : defaultProp; } /** * renders collapse item where only entire heading is clickable button * @returns {object} html template for a heading as a clickable button */ _makeHeadingButton() { return html` ${this._getExpanded( this.tooltip, this.tooltipExpanded, this.expanded, )} `; } /** * renders collapse item where only icon is a clickable button * @returns {object} html template for a heading with an icon button */ _makeIconButton() { return html`
    ${this.heading ? html`

    ${this.heading}

    ` : ``}
    ${this._getExpanded( this.tooltip, this.tooltipExpanded, this.expanded, )}
    `; } /** * Handle click */ _onClick() { if (!this.disabled) { this.toggle(); this.shadowRoot.querySelector("simple-tooltip").hide(); /** * Fires when clicked. * * @event a11y-collapse-click */ this.dispatchEvent( new CustomEvent("a11y-collapse-click", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); } } /** * @deprecated Use {@link _makeHeadingButton} instead * * @memberof A11yCollapse */ _makeAccordionButton() { this._makeHeadingButton(); } } globalThis.customElements.define(A11yCollapse.tag, A11yCollapse); export { A11yCollapse }; ================================================ FILE: elements/a11y-collapse/demo/group.html ================================================ a11y-collapse-group Demo

    a11y-collapse-group Demo

    Basic a11y-collapse-group

    Radio a11y-collapse-groups

    ================================================ FILE: elements/a11y-collapse/demo/index.html ================================================ a11y-collapse Demo

    a11y-collapse demo property

    By default, the clicking the icon button triggers expand/collapse.

    a11y-collapse demo slotted

    By default, the clicking the icon button triggers expand/collapse.

    a11y-collapse prop, with accordion attribute

    With the accordion attribute, the clicking anywhere on the heading triggers expand/collapse.

    a11y-collapse slot, with accordion attribute

    With the accordion attribute, the clicking anywhere on the heading triggers expand/collapse.

    ================================================ FILE: elements/a11y-collapse/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/a11y-collapse/index.html ================================================ a11y-collapse documentation ================================================ FILE: elements/a11y-collapse/lib/a11y-collapse-group.haxProperties.json ================================================ { "canScale": false, "canEditSource": true, "type": "grid", "gizmo": { "title": "Expand Collapse Group", "description": "A group of expand collapse elements.", "icon": "icons:view-day", "color": "grey", "tags": ["Layout"] }, "settings": { "configure": [ { "property": "radio", "title": "Expand only one", "description": "Only one item can be expanded.", "inputMethod": "boolean" }, { "slot": "", "title": "Collapse Items", "description": "The collapse items.", "inputMethod": "code-editor", "slotWrapper": "a11y-collapse", "editMode": { "disabled": false } } ], "advanced": [] }, "saveOptions": { "unsetAttributes": ["expanded"] }, "demoSchema": [ { "tag": "a11y-collapse-group", "properties": {}, "content": "

    Optional info

    Hidden content 1.

    Hidden content 2.

    " } ] } ================================================ FILE: elements/a11y-collapse/lib/a11y-collapse-group.js ================================================ import { LitElement, html, css } from "lit"; import { A11yCollapse } from "../a11y-collapse.js"; /** * `a11y-collapse-group` * a group of `a11y-collapse` elements * ### Styling `` provides the following custom properties for styling: Custom property | Description | Default ----------------|-------------|---------- `--a11y-collapse-group-margin` | margin around the a11y-collapse-group | 15px 0 * * @customElement * @extends LitElement * @see ../a11y-collapse.js * @demo ./demo/group.html collapse groups */ class A11yCollapseGroup extends LitElement { static get styles() { return [ css` :host { display: block; margin: var(--a11y-collapse-group-margin, 15px 0); --a11y-collapse-margin: 15px; } :host([hidden]) { display: none; } #heading { font-weight: bold; } .wrapper { border-radius: 0; display: block; --a11y-collapse-margin: 0 0; --a11y-collapse-border-between: none; } `, ]; } render() { return html`
    `; } constructor() { super(); this.globalOptions = {}; this.radio = false; this.__items = []; this.addEventListener("a11y-collapse-attached", (e) => { e.stopPropagation(); e.stopImmediatePropagation(); this._attachItem(e.detail); }); this.addEventListener("a11y-collapse-detached", (e) => { e.stopPropagation(); e.stopImmediatePropagation(); this._detachItem(e.detail); }); this.addEventListener("a11y-collapse-click", (e) => { e.stopPropagation(); e.stopImmediatePropagation(); this.radioToggle(e.detail); }); this.addEventListener("toggle", (e) => { e.stopPropagation(); e.stopImmediatePropagation(); this.radioToggle(e.detail); }); } static get tag() { return "a11y-collapse-group"; } static get properties() { return { ...super.properties, ...A11yCollapse.properties, /** * an array of globalProperties to override every a11y-collapse item * For example, {"icon": "arrow-drop-down"} would set every item's icon to "arrow-drop-down" */ globalOptions: { type: Object, attribute: "global-options", reflect: true, }, /** * Acts like a radio button. (Items can only be expanded one at a time.) */ radio: { type: Boolean, reflect: true, }, /** * is radio button */ __items: { type: Array, }, }; } /** * haxProperties integration via file reference */ static get haxProperties() { return new URL(`./${this.tag}.haxProperties.json`, import.meta.url).href; } get items() { return this.__items; } /** * Adds a11y-collapse item to __items array. * @param {object} item an a11y-collapse item */ _attachItem(item) { this.__items.push(item); Object.keys(A11yCollapseGroup.properties || {}).forEach((propName) => this._updateItem(item, propName), ); } /** * Updates a11y-collapse item when properties change */ updated(changedProperties) { changedProperties.forEach((oldValue, propName) => { this.__items.forEach((item) => this._updateItem(item, propName, oldValue), ); }); } _updateItem(item, propName, oldValue = undefined) { if (propName === "globalOptions" || propName === "__items") { if (this.globalOptions != {}) for (let key in this.globalOptions) { if (this.globalOptions.hasOwnProperty(key)) { item[key] = this.globalOptions[key]; } } } else if (propName === "radio" && this.radio) { item.expanded = false; } else { if (this[propName] !== null || typeof this[propName] !== typeof undefined) item[propName] = this[propName]; } } /** * Removes a detached item from __items array. * @param {object} item an a11y-collapse item */ _detachItem(item) { if (this.__items && item) { for (let i = 0; i < this.__items.length; i++) { if (this.__items[i] === item) this.__items.splice(i, 1); } } } /** * Toggles off all previous choices. * @param {object} item an a11y-collapse item */ radioToggle(item) { if (this.radio && item.expanded) { for (let i = 0; i < this.__items.length; i++) { if (this.__items[i] !== item) this.__items[i].toggle(false); } } } } globalThis.customElements.define(A11yCollapseGroup.tag, A11yCollapseGroup); export { A11yCollapseGroup }; ================================================ FILE: elements/a11y-collapse/lib/a11y-collapse.haxProperties.json ================================================ { "canScale": false, "canEditSource": true, "type": "grid", "gizmo": { "title": "Collapsible container", "description": "A single instance of an expand collapse.", "icon": "icons:view-day", "color": "grey", "tags": ["Layout"] }, "settings": { "configure": [ { "property": "heading", "title": "Heading", "description": "The text for the collapse.", "inputMethod": "textfield" }, { "property": "expanded", "title": "Expanded", "description": "Expand by default", "inputMethod": "boolean" }, { "property": "headingButton", "title": "Heading Button", "description": "Make entire heading clickble instead of just the icon.", "inputMethod": "boolean" }, { "property": "icon", "title": "Icon", "description": "The icon for the toggle expand/collapse button.", "inputMethod": "iconpicker" }, { "property": "iconExpanded", "title": "Icon (when expanded)", "description": "Optional: The icon for the toggle expand/collapse button when expanded", "inputMethod": "iconpicker" }, { "slot": "", "title": "Content", "description": "The content for the collapse.", "inputMethod": "code-editor", "slotWrapper": "p", "editMode": { "expanded": true, "disabled": false } } ], "advanced": [ { "property": "tooltip", "title": "Tooltip", "description": "The tooltip for the toggle expand/collapse button", "inputMethod": "textfield" }, { "property": "tooltipExpanded", "title": "Tooltip (when expanded)", "description": "The tooltip for the toggle expand/collapse button when expanded", "inputMethod": "textfield" } ] }, "saveOptions": { "unsetAttributes": ["expanded"] }, "demoSchema": [ { "tag": "a11y-collapse", "properties": { "heading": "Heading", "headingButton": true }, "content": "

    Content goes here.

    " } ] } ================================================ FILE: elements/a11y-collapse/package.json ================================================ { "name": "@haxtheweb/a11y-collapse", "wcfactory": { "className": "A11yCollapse", "customElementClass": "LitElement", "elementName": "a11y-collapse", "generator-wcfactory-version": "0.3.2", "useHAX": true, "useSass": false, "files": { "css": "src/a11y-collapse.css", "html": "src/a11y-collapse.html", "js": "src/a11y-collapse.js", "properties": "src/a11y-collapse-properties.json", "hax": "src/a11y-collapse-hax.json" }, "sharedStyles": [] }, "version": "25.0.0", "description": "Start of a11y-collapse", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "a11y-collapse.js", "module": "a11y-collapse.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/d-d-d": "^25.0.0", "@haxtheweb/simple-icon": "^25.0.0", "@haxtheweb/simple-tooltip": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/a11y-collapse/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/a11y-collapse/test/a11y-collapse.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import { A11yCollapse } from "../a11y-collapse.js"; describe("a11y-collapse test", () => { let element; beforeEach(async () => { element = await fixture(html`
    Test Heading
    Test content
    `); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Property type validation with accessibility (Lit-aware)", () => { let testElement; beforeEach(async () => { testElement = await fixture(html`
    Test Heading
    Test content to expand/collapse
    `); await testElement.updateComplete; }); describe("Boolean properties with reflect behavior", () => { describe("headingButton property", () => { it("should have correct default value", () => { expect(testElement.headingButton).to.equal(false); }); it("should accept boolean values and maintain accessibility", async () => { testElement.headingButton = true; await testElement.updateComplete; expect(testElement.headingButton).to.equal(true); expect(testElement.hasAttribute("heading-button")).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); testElement.headingButton = false; await testElement.updateComplete; expect(testElement.headingButton).to.equal(false); expect(testElement.hasAttribute("heading-button")).to.be.false; await expect(testElement).shadowDom.to.be.accessible(); }); it("should preserve JavaScript types (no automatic conversion)", async () => { testElement.headingButton = 1; await testElement.updateComplete; expect(testElement.headingButton).to.equal(1); testElement.headingButton = "true"; await testElement.updateComplete; expect(testElement.headingButton).to.equal("true"); testElement.headingButton = null; await testElement.updateComplete; expect(testElement.headingButton).to.equal(null); }); }); describe("disabled property", () => { it("should have correct default value", () => { expect(testElement.disabled).to.equal(false); }); it("should reflect to attribute and maintain accessibility", async () => { testElement.disabled = true; await testElement.updateComplete; expect(testElement.disabled).to.equal(true); expect(testElement.hasAttribute("disabled")).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); testElement.disabled = false; await testElement.updateComplete; expect(testElement.disabled).to.equal(false); expect(testElement.hasAttribute("disabled")).to.be.false; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("expanded property", () => { it("should have correct default value", () => { expect(testElement.expanded).to.equal(false); }); it("should reflect to attribute and maintain accessibility", async () => { testElement.expanded = true; await testElement.updateComplete; expect(testElement.expanded).to.equal(true); expect(testElement.hasAttribute("expanded")).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); testElement.expanded = false; await testElement.updateComplete; expect(testElement.expanded).to.equal(false); expect(testElement.hasAttribute("expanded")).to.be.false; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("hidden property", () => { it("should have correct default value", () => { expect(testElement.hidden).to.equal(false); }); it("should reflect to attribute", async () => { testElement.hidden = true; await testElement.updateComplete; expect(testElement.hidden).to.equal(true); expect(testElement.hasAttribute("hidden")).to.be.true; testElement.hidden = false; await testElement.updateComplete; expect(testElement.hidden).to.equal(false); expect(testElement.hasAttribute("hidden")).to.be.false; }); }); describe("accordion property (deprecated)", () => { it("should have correct default value", () => { expect(testElement.accordion).to.equal(false); }); it("should reflect to attribute and maintain accessibility", async () => { testElement.accordion = true; await testElement.updateComplete; expect(testElement.accordion).to.equal(true); expect(testElement.hasAttribute("accordion")).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); }); }); describe("String properties", () => { describe("icon property", () => { it("should have correct default value", () => { expect(testElement.icon).to.equal("icons:expand-more"); }); it("should accept string values and maintain accessibility", async () => { testElement.icon = "icons:keyboard-arrow-down"; await testElement.updateComplete; expect(testElement.icon).to.equal("icons:keyboard-arrow-down"); await expect(testElement).shadowDom.to.be.accessible(); testElement.icon = ""; await testElement.updateComplete; expect(testElement.icon).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); }); it("should preserve JavaScript types", async () => { testElement.icon = 123; await testElement.updateComplete; expect(testElement.icon).to.equal(123); testElement.icon = null; await testElement.updateComplete; expect(testElement.icon).to.equal(null); }); }); describe("label property", () => { it("should have correct default value", () => { expect(testElement.label).to.equal("expand"); }); it("should accept string values and maintain accessibility", async () => { testElement.label = "Show details"; await testElement.updateComplete; expect(testElement.label).to.equal("Show details"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("heading property", () => { it("should have correct default value", () => { expect(testElement.heading).to.equal(null); }); it("should accept string values and maintain accessibility", async () => { testElement.heading = "Section Title"; await testElement.updateComplete; expect(testElement.heading).to.equal("Section Title"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("tooltip property", () => { it("should have correct default value", () => { expect(testElement.tooltip).to.equal("expand"); }); it("should accept string values and maintain accessibility", async () => { testElement.tooltip = "Click to expand section"; await testElement.updateComplete; expect(testElement.tooltip).to.equal("Click to expand section"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("iconExpanded property (with attribute mapping)", () => { it("should have no default value", () => { expect(testElement.iconExpanded).to.be.undefined; }); it("should accept string values and maintain accessibility", async () => { testElement.iconExpanded = "icons:expand-less"; await testElement.updateComplete; expect(testElement.iconExpanded).to.equal("icons:expand-less"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("labelExpanded property (with attribute mapping)", () => { it("should have no default value", () => { expect(testElement.labelExpanded).to.be.undefined; }); it("should accept string values and maintain accessibility", async () => { testElement.labelExpanded = "Hide details"; await testElement.updateComplete; expect(testElement.labelExpanded).to.equal("Hide details"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("tooltipExpanded property (with attribute mapping)", () => { it("should have no default value", () => { expect(testElement.tooltipExpanded).to.be.undefined; }); it("should accept string values and maintain accessibility", async () => { testElement.tooltipExpanded = "Click to collapse section"; await testElement.updateComplete; expect(testElement.tooltipExpanded).to.equal( "Click to collapse section", ); await expect(testElement).shadowDom.to.be.accessible(); }); }); }); }); describe("Attribute to property mapping", () => { it("should map heading-button attribute to headingButton property", async () => { const testElement = await fixture(html`
    Test
    Content
    `); expect(testElement.headingButton).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); it("should map icon-expanded attribute to iconExpanded property", async () => { const testElement = await fixture(html`
    Test
    Content
    `); expect(testElement.iconExpanded).to.equal("icons:expand-less"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should map label-expanded attribute to labelExpanded property", async () => { const testElement = await fixture(html`
    Test
    Content
    `); expect(testElement.labelExpanded).to.equal("collapse"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should map tooltip-expanded attribute to tooltipExpanded property", async () => { const testElement = await fixture(html`
    Test
    Content
    `); expect(testElement.tooltipExpanded).to.equal("Click to hide"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Functional behavior with accessibility", () => { let testElement; beforeEach(async () => { testElement = await fixture(html`
    Collapsible Section
    This content can be expanded or collapsed
    `); await testElement.updateComplete; }); it("should toggle expanded state and maintain accessibility", async () => { expect(testElement.expanded).to.equal(false); testElement.toggle(true); await testElement.updateComplete; expect(testElement.expanded).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); testElement.toggle(false); await testElement.updateComplete; expect(testElement.expanded).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle disabled state properly", async () => { testElement.disabled = true; await testElement.updateComplete; expect(testElement.disabled).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); it("should work with heading-button mode", async () => { testElement.headingButton = true; await testElement.updateComplete; expect(testElement.headingButton).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Slot functionality", () => { it("should have heading slot with correct content", async () => { const testElement = await fixture(html`
    Custom Heading Content
    Main content
    `); await testElement.updateComplete; const headingSlot = testElement.shadowRoot.querySelector( 'slot[name="heading"]', ); expect(headingSlot).to.exist; const assignedNodes = headingSlot.assignedNodes({ flatten: true }); expect(assignedNodes.length).to.be.greaterThan(0); expect(assignedNodes[0].textContent).to.include("Custom Heading Content"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have content slot with correct content", async () => { const testElement = await fixture(html`
    Heading
    Named content slot
    Default slot content
    `); await testElement.updateComplete; const contentSlot = testElement.shadowRoot.querySelector( 'slot[name="content"]', ); expect(contentSlot).to.exist; const contentNodes = contentSlot.assignedNodes({ flatten: true }); expect(contentNodes.length).to.be.greaterThan(0); expect(contentNodes[0].textContent).to.include("Named content slot"); const defaultSlot = testElement.shadowRoot.querySelector("slot:not([name])"); expect(defaultSlot).to.exist; const defaultNodes = defaultSlot.assignedNodes({ flatten: true }); expect(defaultNodes.length).to.be.greaterThan(0); expect(defaultNodes[0].textContent).to.include("Default slot content"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle empty slots gracefully", async () => { const testElement = await fixture(html`
    Only default slot content
    `); await testElement.updateComplete; const slots = testElement.shadowRoot.querySelectorAll("slot"); expect(slots.length).to.be.greaterThan(0); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Event handling and lifecycle", () => { let eventElement; beforeEach(async () => { eventElement = await fixture(html`
    Event Test Heading
    Event test content
    `); await eventElement.updateComplete; }); it("should fire toggle event when toggled", async () => { let toggleEventFired = false; let toggleEventDetail = null; eventElement.addEventListener("toggle", (e) => { toggleEventFired = true; toggleEventDetail = e.detail; }); eventElement.toggle(true); await eventElement.updateComplete; expect(toggleEventFired).to.be.true; expect(toggleEventDetail).to.equal(eventElement); await expect(eventElement).shadowDom.to.be.accessible(); }); it("should fire expand event when expanded", async () => { let expandEventFired = false; let expandEventDetail = null; eventElement.addEventListener("expand", (e) => { expandEventFired = true; expandEventDetail = e.detail; }); eventElement.toggle(true); await eventElement.updateComplete; expect(expandEventFired).to.be.true; expect(expandEventDetail).to.equal(eventElement); await expect(eventElement).shadowDom.to.be.accessible(); }); it("should fire collapse event when collapsed", async () => { // First expand it eventElement.expanded = true; await eventElement.updateComplete; let collapseEventFired = false; let collapseEventDetail = null; eventElement.addEventListener("collapse", (e) => { collapseEventFired = true; collapseEventDetail = e.detail; }); eventElement.toggle(false); await eventElement.updateComplete; expect(collapseEventFired).to.be.true; expect(collapseEventDetail).to.equal(eventElement); await expect(eventElement).shadowDom.to.be.accessible(); }); it("should fire deprecated a11y-collapse-toggle event", async () => { let deprecatedEventFired = false; eventElement.addEventListener("a11y-collapse-toggle", () => { deprecatedEventFired = true; }); eventElement.toggle(); await eventElement.updateComplete; expect(deprecatedEventFired).to.be.true; await expect(eventElement).shadowDom.to.be.accessible(); }); it("should fire click event when clicked", async () => { let clickEventFired = false; eventElement.addEventListener("a11y-collapse-click", () => { clickEventFired = true; }); eventElement._onClick(); await eventElement.updateComplete; expect(clickEventFired).to.be.true; await expect(eventElement).shadowDom.to.be.accessible(); }); it("should fire attached event on connectedCallback", async () => { let attachedEventFired = false; let attachedEventDetail = null; const container = globalThis.document.createElement("div"); globalThis.document.body.appendChild(container); container.addEventListener("a11y-collapse-attached", (e) => { attachedEventFired = true; attachedEventDetail = e.detail; }); const newElement = globalThis.document.createElement("a11y-collapse"); container.appendChild(newElement); // Wait for the setTimeout in connectedCallback await new Promise((resolve) => setTimeout(resolve, 10)); expect(attachedEventFired).to.be.true; expect(attachedEventDetail).to.equal(newElement); // Cleanup globalThis.document.body.removeChild(container); }); it("should fire detached event on disconnectedCallback", async () => { let detachedEventFired = false; let detachedEventDetail = null; const container = globalThis.document.createElement("div"); globalThis.document.body.appendChild(container); const newElement = globalThis.document.createElement("a11y-collapse"); container.appendChild(newElement); container.addEventListener("a11y-collapse-detached", (e) => { detachedEventFired = true; detachedEventDetail = e.detail; }); container.removeChild(newElement); expect(detachedEventFired).to.be.true; expect(detachedEventDetail).to.equal(newElement); // Cleanup globalThis.document.body.removeChild(container); }); }); describe("Click handling and interaction", () => { it("should handle click when not disabled", async () => { const testElement = await fixture(html`
    Clickable Heading
    Clickable content
    `); await testElement.updateComplete; expect(testElement.expanded).to.be.false; testElement._onClick(); await testElement.updateComplete; expect(testElement.expanded).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); it("should not handle click when disabled", async () => { const testElement = await fixture(html`
    Disabled Heading
    Disabled content
    `); await testElement.updateComplete; const initialExpanded = testElement.expanded; testElement._onClick(); await testElement.updateComplete; expect(testElement.expanded).to.equal(initialExpanded); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Button rendering modes", () => { it("should render heading button mode correctly", async () => { const testElement = await fixture(html`
    Heading Button Mode
    Content for heading button mode
    `); await testElement.updateComplete; // Should have a button element in heading button mode const button = testElement.shadowRoot.querySelector("button"); expect(button).to.exist; // Should not have simple-icon-button-lite in heading button mode const iconButton = testElement.shadowRoot.querySelector( "simple-icon-button-lite", ); expect(iconButton).to.not.exist; await expect(testElement).shadowDom.to.be.accessible(); }); it("should render icon button mode correctly", async () => { const testElement = await fixture(html`
    Icon Button Mode
    Content for icon button mode
    `); await testElement.updateComplete; // Should not have a button element in icon button mode const button = testElement.shadowRoot.querySelector("button"); expect(button).to.not.exist; // Should have simple-icon-button-lite in icon button mode const iconButton = testElement.shadowRoot.querySelector( "simple-icon-button-lite", ); expect(iconButton).to.exist; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle deprecated accordion property correctly", async () => { const testElement = await fixture(html`
    Accordion Mode
    Content for accordion mode
    `); await testElement.updateComplete; // Should render as heading button when accordion is true const button = testElement.shadowRoot.querySelector("button"); expect(button).to.exist; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Expanded state helpers", () => { it("should return correct values from _getExpanded helper", () => { const testElement = globalThis.document.createElement("a11y-collapse"); // When not expanded, should return default expect(testElement._getExpanded("default", "expanded", false)).to.equal( "default", ); // When expanded and expanded prop exists, should return expanded expect(testElement._getExpanded("default", "expanded", true)).to.equal( "expanded", ); // When expanded but no expanded prop, should return default expect(testElement._getExpanded("default", null, true)).to.equal( "default", ); expect(testElement._getExpanded("default", undefined, true)).to.equal( "default", ); }); }); describe("Label and tooltip management", () => { it("should update labels and tooltips based on expanded state", async () => { const testElement = await fixture(html`
    Label Test
    Content for label testing
    `); await testElement.updateComplete; // Initially should have expand labels expect(testElement.label).to.equal("expand"); expect(testElement.tooltip).to.equal("expand"); // When expanded, should change to collapse testElement.toggle(true); await testElement.updateComplete; expect(testElement.label).to.equal("collapse"); expect(testElement.tooltip).to.equal("collapse"); // When collapsed again, should change back to expand testElement.toggle(false); await testElement.updateComplete; expect(testElement.label).to.equal("expand"); expect(testElement.tooltip).to.equal("expand"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should use custom expanded labels when provided", async () => { const testElement = await fixture(html`
    Custom Labels
    Content with custom labels
    `); await testElement.updateComplete; // Should use custom labels when collapsed expect(testElement.label).to.equal("Show more"); expect(testElement.tooltip).to.equal("Click to show"); // When expanded, should use custom expanded labels testElement.toggle(true); await testElement.updateComplete; expect(testElement.label).to.equal("Show less"); expect(testElement.tooltip).to.equal("Click to hide"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("HAX integration", () => { it("should have haxProperties defined", () => { expect(A11yCollapse.haxProperties).to.exist; expect(typeof A11yCollapse.haxProperties).to.equal("string"); expect(A11yCollapse.haxProperties).to.include( "a11y-collapse.haxProperties.json", ); }); }); describe("Edge cases and property combinations", () => { it("should remain accessible with multiple properties set", async () => { const testElement = await fixture(html`
    Advanced Section
    Complex content with multiple properties configured
    `); await testElement.updateComplete; expect(testElement.headingButton).to.equal(true); expect(testElement.expanded).to.equal(true); // Note: label and tooltip get automatically set to "collapse" when expanded=true in _fireToggleEvents expect(testElement.label).to.equal("collapse"); expect(testElement.tooltip).to.equal("collapse"); expect(testElement.iconExpanded).to.equal("icons:expand-less"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle unusual property values without breaking functionality", async () => { const testElement = await fixture(html`
    Edge Case Test
    Content for edge case testing
    `); const unusualValues = [ " \t\n ", // whitespace "", // potentially dangerous content "\u00A0\u2000\u2001", // various unicode spaces "🔽 collapsible section 🔽", // emoji "Very long label that might cause display issues or layout problems with the collapse interface and button sizing", "Multi\nline\nlabel", // multiline "Label with 'quotes' and \"double quotes\" and special chars: !@#$%^&*()", ]; for (const value of unusualValues) { testElement.label = value; testElement.tooltip = value; testElement.heading = value; testElement.icon = value; await testElement.updateComplete; expect(testElement.label).to.equal(value); expect(testElement.tooltip).to.equal(value); expect(testElement.heading).to.equal(value); expect(testElement.icon).to.equal(value); // Most should maintain accessibility, but skip dangerous content if (!value.includes(" ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-compare-image/a11y-compare-image.js ================================================ import { html, css } from "lit"; import { SimpleColors } from "@haxtheweb/simple-colors/simple-colors.js"; /** * `a11y-compare-image` * Layers images over each other with a slider interface to compare them * @demo demo/index.html * @element a11y-compare-image */ class a11yCompareImage extends SimpleColors { /** * LitElement constructable styles enhancement */ static get styles() { return [ super.styles, css` :host { display: inline-flex; margin: 15px 0; --simple-range-input-track-height: 4pxsnow; --simple-range-input-pin-height: 20px; --simple-range-offet: calc( var(--simple-range-input-pin-height, 20px) / 2 ); } :host([hidden]) { display: none !important; } figure { margin: 0; } #container, #container > div { margin: 0; padding: 0; } #container, #input { position: relative; } /* Added background-size: cover to adjust the bottom layer to match top in first example */ #container { background-size: cover; background-repeat: no-repeat; } #layer { top: 0; left: 0; position: absolute; height: 100%; opacity: var(--a11y-compare-image-opacity, 1); width: var(--a11y-compare-image-width, 50%); background-size: cover; background-position-x: 0%; background-repeat: no-repeat; } #placeholder { opacity: 0; } #bottom { width: 100%; } #slider { top: calc(0px - var(--simple-range-offet, 10px)); left: 0; position: absolute; width: 100%; margin: 0; } .marker { z-index: 1; top: calc(0px - var(--simple-range-input-pin-height, 20px) / 2); position: absolute; width: 1px; outline: 1px solid var( --simple-range-input-bg, var(--simple-colors-default-theme-accent-2, grey) ); background-color: var( --simple-range-input-color, var(--simple-colors-default-theme-accent-8, grey) ); padding-top: var(--simple-range-input-pin-height, 20px); } #placeholder ::slotted([slot="bottom"]) { max-width: 100%; } `, ]; } constructor() { super(); this.opacity = false; this.position = 50; this.accentColor = "blue"; this.__markers = []; this.label = "Compare images"; import("@haxtheweb/simple-range-input/simple-range-input.js"); } render() { return html`
    ${this.__markers.map( (marker) => html`
    `, )}
    `; } _valueChanged(e) { this.position = e.detail.value; } static get tag() { return "a11y-compare-image"; } static get properties() { return { ...super.properties, activeLayer: { type: Number, attribute: "active-layer", reflect: true, }, /** * mode for the slider: wipe */ opacity: { type: Boolean, }, label: { type: String, }, position: { type: Number, reflect: true, }, __lower: { type: String, }, __upper: { type: String, }, __markers: { type: Array, }, }; } firstUpdated(changedProperties) { if (super.firstUpdated) super.firstUpdated(changedProperties); this._slide(); } updated(changedProperties) { super.updated(changedProperties); changedProperties.forEach((oldValue, propName) => { if (propName === "position" && this.position !== oldValue) { this._slide(); } }); } /** * updates the slider */ _slide() { let container = this.shadowRoot.querySelector("#container"); let layers = this.querySelectorAll("[slot=top],[slot=bottom]"); // This is the total number of transitions between layers let total = layers.length - 1; //This is percent of the slider for each section let section = 100 / total; // Index of the upper image let active = Math.floor(this.position / section) || 0; // This is the layer number that is current on top. this.activeLayer = active + 1; // This is the slider percent when upper image is at 0. let lastSection = section * active; // How far we are into the current section. let relativePosition = this.position - lastSection; /* Percentage into the current section if (this.position === 100 && relativePosition === 0) { } else { this.position = (relativePosition * 100) / section || 0; }*/ // Set background images this.__upper = layers[active + 1] ? layers[active + 1].src : layers[active] ? layers[active].src : ""; this.__lower = layers[active] ? layers[active].src : ""; // Adding Fake markers behind the slider. if (total - 1 != this.__markers.length) { this._updateMarkers(total); } if (container && this.opacity === false) { container.style.setProperty( "--a11y-compare-image-width", this.position + "%", ); container.style.setProperty("--a11y-compare-image-opacity", 1); } else if (container) { container.style.setProperty("--a11y-compare-image-width", "100%"); container.style.setProperty( "--a11y-compare-image-opacity", this.position / 100, ); } } _updateMarkers(total) { this.__markers = []; if (total != 0) { let step = 100 / total; for (let i = step; i <= 100; i += step) { this.__markers.push(i); } } } } globalThis.customElements.define(a11yCompareImage.tag, a11yCompareImage); export { a11yCompareImage }; ================================================ FILE: elements/a11y-compare-image/demo/index.html ================================================ a11yCompareImage: a11y-compare-image Demo

    Basic a11y-compare-image demo

    ================================================ FILE: elements/a11y-compare-image/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/a11y-compare-image/index.html ================================================ a11y-compare-image documentation ================================================ FILE: elements/a11y-compare-image/package.json ================================================ { "name": "@haxtheweb/a11y-compare-image", "wcfactory": { "className": "a11yCompareImage", "customElementClass": "PolymerElement", "elementName": "a11y-compare-image", "generator-wcfactory-version": "0.3.1", "useHAX": true, "useSass": false, "files": { "css": "src/a11y-compare-image.css", "html": "src/a11y-compare-image.html", "js": "src/a11y-compare-image.js", "properties": "src/a11y-compare-image-properties.json", "hax": "src/a11y-compare-image-hax.json" }, "sharedStyles": [] }, "version": "25.0.0", "description": "Slider that allows comparison of two images", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "a11y-compare-image.js", "module": "a11y-compare-image.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/simple-colors": "^25.0.0", "@haxtheweb/simple-range-input": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/a11y-compare-image/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/a11y-compare-image/test/a11y-compare-image.test.js ================================================ ================================================ FILE: elements/a11y-details/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/a11y-details/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/a11y-details/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/a11y-details/.npmignore ================================================ node_modules ================================================ FILE: elements/a11y-details/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/a11y-details/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/a11y-details/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2020 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/a11y-details/README.md ================================================ # <a11y-details> 11 > accessible progressive disclosure with detail and summary ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/a11y-details/a11y-details.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-details/a11y-details.js ================================================ /** * Copyright 2020 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; /** * `a11y-details` * accessible progressive disclosure with detail and summary ### Styling #### Summary Button Custom property | Description | Default ----------------|-------------|---------- --a11y-details-summary-fontSize | font-size | 0.8em --a11y-details-summary-color | text color | #000 --a11y-details-summary-backgroundColor | background-color | #fff --a11y-details-summary-borderColor | border-color | #000 --a11y-details-summary-borderWidth | border-width | 1px --a11y-details-summary-borderStyle | border-style | solid --a11y-details-summary-borderRadius | border-radius | 3px --a11y-details-summary-padding | padding | 0.5em #### Summary Button (:focus state) Custom property | Description | Default ----------------|-------------|---------- --a11y-details-summary-focus-color | text color | #000 --a11y-details-summary-focus-backgroundColor | background-color | #fff --a11y-details-summary-focus-borderColor | border-color | #000 --a11y-details-summary-focus-borderWidth | border-width | 1px --a11y-details-summary-focus-borderStyle | border-style | dotted --a11y-details-summary-focus-borderRadius | border-radius | 3px #### Details Custom property | Description | Default ----------------|-------------|---------- --a11y-details-fontSize | font-size | 0.8em --a11y-details-color | text color | #000 --a11y-details-backgroundColor | background-color | rgba(255,255,255,1) --a11y-details-borderColor | border-color | #000 --a11y-details-borderWidth | border-width | 1px --a11y-details-borderStyle | border-style | solid --a11y-details-borderRadius | border-radius | 3px --a11y-details-padding | padding | 0.5em --a11y-details-left | left position | 0 --a11y-details-right | right position | 0 --a11y-details-maxHeight | max-height | 400px * * @microcopy - language worth noting: * - * * @customElement * @lit-html * @lit-element * @demo demo/index.html */ class A11yDetails extends LitElement { //styles function static get styles() { return [ css` :host, details { display: inline-flex; overflow: visible; } :host([hidden]) { display: none !important; } summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: var(--a11y-details-summary-fontSize, 0.8em); color: var(--a11y-details-summary-color, #000); background-color: var(--a11y-details-summary-backgroundColor, #fff); border-color: var(--a11y-details-summary-borderColor, #ddd); border-width: var(--a11y-details-summary-borderWidth, 1px); border-style: var(--a11y-details-summary-borderStyle, solid); border-radius: var(--a11y-details-summary-borderRadius, 3px); padding: var(--a11y-details-summary-padding, 0.5em); } summary:focus { outline: var(--a11y-details-summary-focus-outline, 1px solid #006688); color: var( --a11y-details-summary-focus-color, var(--a11y-details-summary-color, #000) ); background-color: var( --a11y-details-summary-focus-backgroundColor, var(--a11y-details-summary-backgroundColor, #fff) ); border-color: var( --a11y-details-summary-focus-borderColor, var(--a11y-details-borderColor, #999) ); border-width: var( --a11y-details-summary-focus-borderWidth, var(--a11y-details-summary-borderWidth, 1px) ); border-style: var( --a11y-details-summary-focus-borderStyle, var(--a11y-details-summary-borderStyle, dotted) ); border-radius: var( --a11y-details-summary-focus-borderRadius, var(--a11y-details-summary-borderRadius, 3px) ); } #details-inner { position: absolute; display: none; max-height: 0px; transition: all 0.7s ease-in-out 0.2s; overflow-y: auto; padding: 0; font-size: var(--a11y-details-fontSize, 0.8em); color: var(--a11y-details-color, #000); background-color: var( --a11y-details-backgroundColor, rgba(255, 255, 255, 1) ); border-color: var(--a11y-details-borderColor, #999); border-width: var(--a11y-details-borderWidth, 1px); border-style: var(--a11y-details-borderStyle, solid); border-radius: var(--a11y-details-borderRadius, 3px); } ::slotted(*:not[slot="summary"]) { display: none; } .close-text, details[open] .open-text, details:not([open]) .has-open-text, details[open] .has-close-text { display: none; } details[open] .close-text { display: inline; } ::slotted([slot="details"]) { display: block; height: auto; max-height: 0; overflow: hidden; transition: all 0.7s ease-in-out 0.2s; } details[open] ::slotted([slot="details"]) { max-height: var(--a11y-details-maxHeight, 400px); transition: all 0.7s ease-in-out 0.2s; } details[open] #details-inner { z-index: 9999999999; display: block; left: var(--a11y-details-left, unset); right: var(--a11y-details-right, unset); padding: var(--a11y-details-padding, 0.5em); max-height: var(--a11y-details-maxHeight, 400px); padding: var(--a11y-details-padding, 0.5em); width: calc(auto - 2 * var(--a11y-details-padding, 0.5em)); transition: all 0.7s ease-in-out 0.2s; } `, ]; } // render function render() { return html`
    ${this.openText} ${this.closeText}
    `; } // haxProperty definition static get haxProperties() { return { canScale: true, canEditSource: true, gizmo: { title: "Accessible Details Button", description: "Accessible progressive disclosure with detail and summary", icon: "icons:arrow-drop-down", color: "grey", tags: ["Layout", "Details", "Summary", "Button", "Accessible"], handles: [ { type: "", }, ], meta: { author: "HAXTheWeb core team", owner: "The Pennsylvania State University", }, }, settings: { configure: [ { slot: "summary", title: "Button", description: 'Summary of the content that if concealed, eg. "info", "medatadata", etc. ', inputMethod: "code-editor", }, { slot: "details", title: "Decription", description: "Detailed description that can be hidden or shown", inputMethod: "code-editor", }, { slot: "", title: "Decription Button", description: 'Default for button that shows/hides description text, eg. "info", "medatadata", etc. ', inputMethod: "code-editor", }, ], advanced: [ { property: "openText", title: "Optional summary text when details are open", inputMethod: "textfield", required: false, }, { property: "closeText", title: "Optional summary text when details are closed", inputMethod: "textfield", required: false, }, ], }, demoSchema: [ { tag: "a11y-details", properties: { openText: "Show Aenean", closeText: "Hide Aenean", }, content: '
    Show Aenean
    \n
    Aenean eget nisl volutpat, molestie purus eget, bibendum metus. Pellentesque magna velit, tincidunt quis pharetra id, gravida placerat erat. Maecenas id dui pretium risus pulvinar feugiat vel nec leo. Praesent non congue tellus. Suspendisse ac tincidunt purus. Donec eu dui a metus vehicula bibendum sed nec tortor. Nunc convallis justo sed nibh consectetur, at pharetra nulla accumsan.\n
    ', }, ], }; } // properties available to the custom element for data binding static get properties() { return { ...super.properties, /** * optional text for when summary button is open, * eg. "Hide", "Less" or "Close" */ closeText: { type: String, attribute: "close-text", reflect: true, }, /** * optional text for when summary button is closed, * eg. "Show", "More" or "Open" */ openText: { type: String, attribute: "open-text", reflect: true, }, }; } /** * Store the tag name to make it easier to obtain directly. * @notice function name must be here for tooling to operate correctly */ static get tag() { return "a11y-details"; } // life cycle constructor() { super(); this.closeText = ""; this.openText = ""; this.tag = A11yDetails.tag; } /** * life cycle, element is removed from the DOM */ disconnectedCallback() { if (this.observer && this.observer.disconnect) this.observer.disconnect(); super.disconnectedCallback(); } firstUpdated() { if (super.firstUpdated) super.firstUpdated(); this._updateElement(); this.observer.observe(this, { childList: true, subtree: true }); } /** * gets the details element in shadowRoot * * @readonly * @memberof A11yDetails */ get details() { return this && this.shadowRoot && this.shadowRoot.querySelector("details") ? this.shadowRoot.querySelector("details") : undefined; } /** * gets classe sfor summary to hide summary slot if open/closed text is provided * * @readonly * @memberof A11yDetails */ get summaryClasses() { return [ this.openText && this.openText.trim && this.openText.trim() !== "" ? "has-open-text" : "", this.closeText && this.closeText.trim && this.closeText.trim() !== "" ? "has-close-text" : "", ].join(" "); } /** * mutation observer for a11y-details * @readonly * @returns {object} */ get observer() { let callback = (mutationsList) => this._watchChildren(mutationsList); return new MutationObserver(callback); } /** * mutation observer for
    in unnamed slot * @readonly * @returns {object} */ get detailsObserver() { let callback = () => this._updateElement(); return new MutationObserver(callback); } /** * provides click for keyboard if open property is not supported by browser * * @param {event} e * @memberof A11yDetails */ _handleClick(e) { if (this.details && typeof this.details.open === "undefined") { this.toggleOpen(); e.preventDefault(); e.stopPropagation(); } } /** * provides support for keyboard if open property is not supported by browser * * @param {event} e * @memberof A11yDetails */ _handleKeyup(e) { if ( (this.details && typeof this.details.open === "undefined" && e.keyCode == 13) || e.keyCode == 32 ) { this.toggleOpen(); e.preventDefault(); e.stopPropagation(); } } /** * toggles the element */ toggleOpen() { if (this.details.hasAttribute("open")) { this.details.removeAttribute("open"); if (this.details.open) this.details.open = false; } else { this.details.setAttribute("open", ""); if (this.details.open) this.details.open = true; } } /** * updates an element based on changes in slot * * @memberof A11yDetails */ _updateElement() { let details = this.querySelector("* > details"), summary = details ? details.querySelector("* > summary") : undefined; if (summary) this._copyToSlot("summary", summary.cloneNode(true)); if (details) { let clone = details.cloneNode(true), filtered = clone.querySelectorAll("* > summary"); Object.keys(filtered || {}).forEach((i) => filtered[i].remove()); this._copyToSlot("details", clone, "div"); } } /** * watches the element's slots for a
    element * * @param {object} mutationsList * @memberof A11yDetails */ _watchChildren(mutationsList) { if (this._hasMutations(mutationsList)) { this._updateElement(); this.detailsObserver.observe(this.querySelector("* > details"), { childList: true, subtree: true, characterData: true, }); } else if ( this._hasMutations(mutationsList, "removedNodes") && !this.querySelector("* > details") && this.detailsObserver.disconnect ) { this.detailsObserver.disconnect(); } } /** * searches a mutations list to see if a
    element was added or removed * * @param {object} mutationsList * @param {string} [nodeListType="addedNodes"] "addedNodes" of "removedNodes" * @returns {boolean} * @memberof A11yDetails */ _hasMutations(mutationsList, nodeListType = "addedNodes") { return ( Object.keys(mutationsList || {}).filter((i) => { let nodes = mutationsList[i][nodeListType]; return ( Object.keys(nodes || {}).filter((j) => { let nodeName = nodes[j].tagName; return nodeName === "DETAILS"; }).length > 0 ); }).length > 0 ); } /** * moves content cloned from unnamed slot to designated named slot * * @param {string} slotName 'details' or 'summary' slot * @param {string} tagName the tag that will become a slot * @param {object} clone content cloned from unnamed slot * @memberof A11yDetails */ _copyToSlot(slotName, clone, tagName = "span") { let filteredNodes = Object.keys(clone.childNodes || {}) .filter((i) => { let node = clone.childNodes[i]; return !!node.tagName || node.textContent.trim().length > 0; }) .map((i) => clone.childNodes[parseInt(i)]); if (filteredNodes.length === 1 && filteredNodes[0].tagName) { clone = filteredNodes[0]; tagName = clone.tagName; } let slot = this._getSlot(slotName, tagName); slot.innerHTML = clone.innerHTML; clone.remove(); } /** * gets an existing named slot or makes one * * @param {string} slotName * @returns {object} * @memberof A11yDetails */ _getSlot(slotName, tagName = "span") { let slot = this.querySelector(`[slot=${slotName}]`); if (slot && slot.tagName !== tagName) slot.remove(); if (!slot) { slot = globalThis.document.createElement(tagName); slot.slot = slotName; this.append(slot); } return slot; } } globalThis.customElements.define("a11y-details", A11yDetails); export { A11yDetails }; ================================================ FILE: elements/a11y-details/demo/index.html ================================================ A11yDetails: a11y-details Demo

    Basic a11y-details demo

    a11y-details with custom more/less text

    a11y-details with progressive enhancement

    a11y-details with custom more/less text

    ================================================ FILE: elements/a11y-details/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/a11y-details/index.html ================================================ a11y-details documentation ================================================ FILE: elements/a11y-details/package.json ================================================ { "name": "@haxtheweb/a11y-details", "wcfactory": { "className": "A11yDetails", "customElementClass": "LitElement", "elementName": "a11y-details", "generator-wcfactory-version": "0.7.1", "useHAX": true, "useSass": false, "files": { "css": "src/a11y-details.css", "html": "src/a11y-details.html", "js": "src/a11y-details.js", "properties": "src/a11y-details-properties.json", "hax": "src/a11y-details-hax.json" } }, "version": "25.0.0", "description": "accessible progressive disclosure with detail and summary", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "a11y-details.js", "module": "a11y-details.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/absolute-position-behavior": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/a11y-details/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/a11y-details/test/a11y-details.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../a11y-details.js"; describe("a11y-details test", () => { let element; beforeEach(async () => { element = await fixture(html` Click to expand

    This is the detailed content that can be shown or hidden.

    It supports multiple paragraphs and complex content.

    `); }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("a11y-details"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Slot functionality", () => { it("should have summary slot with correct content", () => { const summarySlot = element.shadowRoot.querySelector( 'slot[name="summary"]', ); expect(summarySlot).to.exist; const assignedNodes = summarySlot.assignedNodes({ flatten: true }); expect(assignedNodes.length).to.be.greaterThan(0); expect(assignedNodes[0].textContent).to.equal("Click to expand"); }); it("should have details slot with correct content", () => { const detailsSlot = element.shadowRoot.querySelector( 'slot[name="details"]', ); expect(detailsSlot).to.exist; const assignedNodes = detailsSlot.assignedNodes({ flatten: true }); expect(assignedNodes.length).to.be.greaterThan(0); }); it("should have default hidden slot", () => { const defaultSlot = element.shadowRoot.querySelector( "slot[hidden]:not([name])", ); expect(defaultSlot).to.exist; }); }); describe("Property type validation with accessibility", () => { let testElement; beforeEach(async () => { testElement = await fixture(html` Test Summary
    Test details content
    `); await testElement.updateComplete; }); describe("closeText property", () => { it("should accept valid string values and maintain accessibility", async () => { testElement.closeText = "Hide Details"; await testElement.updateComplete; expect(testElement.closeText).to.equal("Hide Details"); await expect(testElement).shadowDom.to.be.accessible(); testElement.closeText = "Close"; await testElement.updateComplete; expect(testElement.closeText).to.equal("Close"); await expect(testElement).shadowDom.to.be.accessible(); testElement.closeText = "Less"; await testElement.updateComplete; expect(testElement.closeText).to.equal("Less"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept non-string values but maintain type in JavaScript", async () => { testElement.closeText = 123; await testElement.updateComplete; expect(testElement.closeText).to.equal(123); await expect(testElement).shadowDom.to.be.accessible(); testElement.closeText = true; await testElement.updateComplete; expect(testElement.closeText).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); testElement.closeText = null; await testElement.updateComplete; expect(testElement.closeText).to.equal(null); await expect(testElement).shadowDom.to.be.accessible(); testElement.closeText = undefined; await testElement.updateComplete; expect(testElement.closeText).to.equal(undefined); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept falsy values and maintain accessibility", async () => { testElement.closeText = ""; await testElement.updateComplete; expect(testElement.closeText).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); testElement.closeText = 0; await testElement.updateComplete; expect(testElement.closeText).to.equal(0); await expect(testElement).shadowDom.to.be.accessible(); testElement.closeText = false; await testElement.updateComplete; expect(testElement.closeText).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.closeText).to.equal(""); }); }); describe("openText property", () => { it("should accept valid string values and maintain accessibility", async () => { testElement.openText = "Show Details"; await testElement.updateComplete; expect(testElement.openText).to.equal("Show Details"); await expect(testElement).shadowDom.to.be.accessible(); testElement.openText = "Open"; await testElement.updateComplete; expect(testElement.openText).to.equal("Open"); await expect(testElement).shadowDom.to.be.accessible(); testElement.openText = "More"; await testElement.updateComplete; expect(testElement.openText).to.equal("More"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept non-string values but maintain type in JavaScript", async () => { testElement.openText = 456; await testElement.updateComplete; expect(testElement.openText).to.equal(456); await expect(testElement).shadowDom.to.be.accessible(); testElement.openText = false; await testElement.updateComplete; expect(testElement.openText).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); testElement.openText = []; await testElement.updateComplete; expect(testElement.openText).to.deep.equal([]); await expect(testElement).shadowDom.to.be.accessible(); testElement.openText = {}; await testElement.updateComplete; expect(testElement.openText).to.deep.equal({}); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept falsy values and maintain accessibility", async () => { testElement.openText = ""; await testElement.updateComplete; expect(testElement.openText).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); testElement.openText = null; await testElement.updateComplete; expect(testElement.openText).to.equal(null); await expect(testElement).shadowDom.to.be.accessible(); testElement.openText = undefined; await testElement.updateComplete; expect(testElement.openText).to.equal(undefined); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.openText).to.equal(""); }); }); }); describe("Attribute to property mapping", () => { it("should set closeText property from close-text attribute", async () => { const testElement = await fixture(html` Summary
    Details
    `); expect(testElement.closeText).to.equal("Hide Info"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should set openText property from open-text attribute", async () => { const testElement = await fixture(html` Summary
    Details
    `); expect(testElement.openText).to.equal("Show Info"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should reflect closeText property to close-text attribute", async () => { const testElement = await fixture(html` Summary
    Details
    `); testElement.closeText = "Hide Content"; await testElement.updateComplete; expect(testElement.getAttribute("close-text")).to.equal("Hide Content"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should reflect openText property to open-text attribute", async () => { const testElement = await fixture(html` Summary
    Details
    `); testElement.openText = "Show Content"; await testElement.updateComplete; expect(testElement.getAttribute("open-text")).to.equal("Show Content"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Accessibility scenarios with different property combinations", () => { it("should remain accessible with custom open and close text", async () => { const testElement = await fixture(html` Information

    Additional Information

    This is some detailed information that can be toggled.

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with only open text", async () => { const testElement = await fixture(html` Click to expand
    Expanded content here.
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with only close text", async () => { const testElement = await fixture(html` Click to expand
    Expanded content here.
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with empty text properties", async () => { const testElement = await fixture(html` Static summary
    Details content
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with complex slotted content", async () => { const testElement = await fixture(html`
    Complex Summary with multiple elements

    Detailed Information

    • Item 1
    • Item 2
    • Item 3

    Additional paragraph with link.

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Interactive functionality and accessibility", () => { it("should maintain accessibility when toggling details programmatically", async () => { const testElement = await fixture(html` Toggle Me
    Hidden content
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); // Test toggle functionality if (testElement.toggleOpen) { testElement.toggleOpen(); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); testElement.toggleOpen(); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); } }); it("should have proper ARIA attributes and roles", async () => { const testElement = await fixture(html` Accessible Summary
    Accessible details
    `); await testElement.updateComplete; const summary = testElement.shadowRoot.querySelector("summary"); expect(summary).to.exist; expect(summary.getAttribute("role")).to.equal("button"); expect(summary.getAttribute("tabindex")).to.equal("0"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle keyboard interactions accessibly", async () => { const testElement = await fixture(html` Keyboard Test
    Content for keyboard test
    `); await testElement.updateComplete; const summary = testElement.shadowRoot.querySelector("summary"); expect(summary).to.exist; // Test that the summary is focusable summary.focus(); expect(globalThis.document.activeElement).to.equal(testElement); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Dynamic content and slot changes", () => { it("should remain accessible when slot content changes", async () => { const testElement = await fixture(html` Original Summary
    Original details
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); // Change summary content const summaryElement = testElement.querySelector('[slot="summary"]'); summaryElement.textContent = "Updated Summary"; await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); // Change details content const detailsElement = testElement.querySelector('[slot="details"]'); detailsElement.innerHTML = "

    Updated details with formatting

    "; await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with programmatic text updates", async () => { const testElement = await fixture(html` Summary
    Details
    `); await testElement.updateComplete; // Update properties programmatically testElement.openText = "View Details"; testElement.closeText = "Hide Details"; await testElement.updateComplete; expect(testElement.openText).to.equal("View Details"); expect(testElement.closeText).to.equal("Hide Details"); await expect(testElement).shadowDom.to.be.accessible(); // Clear properties testElement.openText = ""; testElement.closeText = ""; await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Edge cases and error handling", () => { it("should remain accessible with no slotted content", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with only summary slot", async () => { const testElement = await fixture(html` Only summary `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with only details slot", async () => { const testElement = await fixture(html`
    Only details
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle malformed or unusual text values", async () => { const testElement = await fixture(html` Test Summary
    Test details
    `); // Test with various unusual values const unusualValues = [ " \t\n ", // whitespace "", // potentially dangerous content "\u00A0\u2000\u2001", // various unicode spaces "🚀 emoji content 🎉", // emoji "Very long text that might cause layout issues or accessibility problems when used as button text for the summary element", "Multi\nline\ntext", // multiline "Text with 'quotes' and \"double quotes\" and special chars: !@#$%^&*()", ]; for (const value of unusualValues) { testElement.openText = value; testElement.closeText = value; await testElement.updateComplete; expect(testElement.openText).to.equal(value); expect(testElement.closeText).to.equal(value); await expect(testElement).shadowDom.to.be.accessible(); } }); it("should maintain accessibility with native details elements in default slot", async () => { const testElement = await fixture(html`
    Native details summary

    Native details content

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("HAX Properties and Integration", () => { it("should have haxProperties defined", () => { expect(element.constructor.haxProperties).to.exist; expect(element.constructor.haxProperties.gizmo).to.exist; expect(element.constructor.haxProperties.settings).to.exist; }); it("should maintain accessibility with HAX demo schema", async () => { const demoSchema = element.constructor.haxProperties.demoSchema[0]; const haxTestElement = await fixture(html` ${html([demoSchema.content])} `); await haxTestElement.updateComplete; await expect(haxTestElement).shadowDom.to.be.accessible(); }); }); }); ================================================ FILE: elements/a11y-figure/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/a11y-figure/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/a11y-figure/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/a11y-figure/.npmignore ================================================ node_modules ================================================ FILE: elements/a11y-figure/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/a11y-figure/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/a11y-figure/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2020 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/a11y-figure/README.md ================================================ # <a11y-figure> 11 > accessible figure with image description in details ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/a11y-figure/a11y-figure.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-figure/a11y-figure.js ================================================ /** * Copyright 2020 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { html, css } from "lit"; import { A11yDetails } from "@haxtheweb/a11y-details/a11y-details.js"; /** * `a11y-figure` * accessible progressive disclosure with detail and summary ### Styling #### Figure Caption Custom property | Description | Default ----------------|-------------|---------- --a11y-details-figcaption-fontSize | font-size | unset --a11y-details-figcaption-color | text color | #000 --a11y-details-figcaption-backgroundColor | background-color | #fff --a11y-details-figcaption-margin | padding | 0 --a11y-details-figcaption-padding | padding | 0 #### Summary Button Custom property | Description | Default ----------------|-------------|---------- --a11y-details-summary-fontSize | font-size | 0.8em --a11y-details-summary-color | text color | #000 --a11y-details-summary-backgroundColor | background-color | #fff --a11y-details-summary-borderColor | border-color | #000 --a11y-details-summary-borderWidth | border-width | 1px --a11y-details-summary-borderStyle | border-style | solid --a11y-details-summary-borderRadius | border-radius | 3px --a11y-details-summary-padding | padding | 0.5em #### Summary Button (:focus state) Custom property | Description | Default ----------------|-------------|---------- --a11y-details-summary-focus-color | text color | #000 --a11y-details-summary-focus-backgroundColor | background-color | #fff --a11y-details-summary-focus-borderColor | border-color | #000 --a11y-details-summary-focus-borderWidth | border-width | 1px --a11y-details-summary-focus-borderStyle | border-style | dotted --a11y-details-summary-focus-borderRadius | border-radius | 3px #### Details Custom property | Description | Default ----------------|-------------|---------- --a11y-details-fontSize | font-size | 0.8em --a11y-details-color | text color | #000 --a11y-details-backgroundColor | background-color | rgba(255,255,255,1) --a11y-details-borderColor | border-color | #000 --a11y-details-borderWidth | border-width | 1px --a11y-details-borderStyle | border-style | solid --a11y-details-borderRadius | border-radius | 3px --a11y-details-padding | padding | 0.5em --a11y-details-maxHeight | max-height | 400px * @lit-html * @lit-element * @demo demo/index.html */ class A11yFigure extends A11yDetails { //styles function static get styles() { return [ css` :host { display: inline-block; padding: 5px; border: 1px solid #ddd; } :host([hidden]) { display: none; } figure { display: inline-table; position: relative; margin: 0; } figcaption { display: table-caption; caption-side: bottom; position: relative; margin: var(--a11y-figure-figcaption-margin, 0); padding: var(--a11y-figure-figcaption-padding, 0); font-size: var(--a11y-figure-figcaption-fontSize, unset); background-color: var(--a11y-figure-figcaption-backgroundColor, #fff); color: var(--a11y-figure-figcaption-color, #000); --a11y-details-left: var(--a11y-figure-details-left, 0); --a11y-details-right: var(--a11y-figure-details-right, 0); --a11y-details-fontSize: var(--a11y-figure-details-fontSize, 0.8em); } ::slotted([slot="figcaption"]) { margin: 0; flex: 1 1 auto; } img, ::slotted([slot="image"]) { width: 100%; } a11y-details:not([hidden]) { display: flex; justify-content: flex-end; } `, ]; } // render function render() { return html`
    ${this.imgSrc ? html` ${this.imgAlt} ` : ``}
    `; } // haxProperty definition static get haxProperties() { return { canScale: true, canEditSource: true, type: "grid", gizmo: { title: "Descriptive Figure", description: "Accessible figure with long description", icon: "hax:figure", color: "grey", tags: [ "content", "figure", "a11y", "accessibility", "image", "caption", "description", ], handles: [ { type: "image", source: "imgSrc", alt: "imgAlt", caption: "figcaption", }, ], meta: { author: "HAXTheWeb core team", owner: "The Pennsylvania State University", }, }, settings: { configure: [ { property: "imgSrc", title: "Image", inputMethod: "haxupload", noVoiceRecord: true, }, { property: "imgAlt", title: "Alt Text", inputMethod: "alt", required: true, }, { slot: "figcaption", title: "Figure Caption", description: "Figure caption text that is always visible.", inputMethod: "code-editor", }, { slot: "details", title: "Decription", description: "Detailed image description that can be hidden or shown", inputMethod: "code-editor", }, { slot: "summary", title: "Decription Button", description: 'Default for button that shows/hides description text, eg. "info", "medatadata", etc. ', inputMethod: "code-editor", }, ], advanced: [ { property: "openText", title: "Optional summary text when details are open", inputMethod: "textfield", required: false, }, { property: "closeText", title: "Optional summary text when details are closed", inputMethod: "textfield", required: false, }, ], }, demoSchema: [ { tag: "a11y-figure", properties: { imgSrc: "https://placehold.co/500x300", imgAlt: "", openText: "Show Description", closeText: "Hide Description", style: "max-width:400px", }, content: '

    Random

    \n
    Image Description
    \n
    Aenean eget nisl volutpat, molestie purus eget, bibendum metus. Pellentesque magna velit, tincidunt quis pharetra id, gravida placerat erat. Maecenas id dui pretium risus pulvinar feugiat vel nec leo. Praesent non congue tellus. Suspendisse ac tincidunt purus. Donec eu dui a metus vehicula bibendum sed nec tortor. Nunc convallis justo sed nibh consectetur, at pharetra nulla accumsan.
    ', }, ], }; } // properties available to the custom element for data binding static get properties() { return { ...super.properties, imgSrc: { type: String, attribute: "img-src", }, imgAlt: { type: String, attribute: "img-alt", }, __hasDetail: { type: Boolean, }, }; } /** * Store the tag name to make it easier to obtain directly. * @notice function name must be here for tooling to operate correctly */ static get tag() { return "a11y-figure"; } // life cycle constructor() { super(); this.tag = A11yFigure.tag; } /** * mutation observer for a11y-details * @readonly * @returns {object} */ get observer() { let callback = (mutationsList) => this._watchChildren(mutationsList); return new MutationObserver(callback); } /** * mutation observer for
    in unnamed slot * @readonly * @returns {object} */ get figureObserver() { let callback = () => this._updateElement(); return new MutationObserver(callback); } /** * updates an element based on changes in slot * * @memberof A11yDetails */ _updateElement() { let figure = this.querySelector("* > figure"), image = figure ? figure.querySelector("* > img") : undefined, figcaption = figure ? figure.querySelector("* > figcaption") : undefined; if (image) { (this.querySelectorAll("[slot=image]") || []).forEach((image) => image.remove(), ); image.cloneNode(); image.slot = "image"; this.appendChild(image); } this.__hasDetail = !!this.querySelector("summary") || !!this.querySelector("*[slot=summary]"); if (figcaption) { this._copyAndFilter(figcaption.cloneNode(true), [ "figcaption", "details", "summary", ]); } } _copyAndFilter(clone, nodenames = [], i = 0) { let childname = nodenames[i + 1], child = clone && childname ? clone.querySelector(`* > ${childname}`) : undefined; if (child) { this._copyAndFilter(child, nodenames, i + 1); Object.keys(child || {}).forEach((index) => child[index].remove()); } this._copyToSlot(nodenames[i], clone); } /** * watches the element's slots for a
    element * * @param {object} mutationsList * @memberof A11yDetails */ _watchChildren(mutationsList) { if (this._hasMutations(mutationsList)) { this._updateElement(); this.figureObserver.observe(this.querySelector("* > figure"), { childList: true, subtree: true, characterData: true, }); } else if ( this._hasMutations(mutationsList, "removedNodes") && !this.querySelector("* > figureObserver") && this.detailsObserver.disconnect ) { this.detailsObserver.disconnect(); } } } globalThis.customElements.define("a11y-figure", A11yFigure); export { A11yFigure }; ================================================ FILE: elements/a11y-figure/demo/index.html ================================================ A11yFigure: a11y-figure Demo

    a11y-figure demo

    a11y-figure demo with progressive enhancement

    ================================================ FILE: elements/a11y-figure/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/a11y-figure/index.html ================================================ a11y-figure documentation ================================================ FILE: elements/a11y-figure/package.json ================================================ { "name": "@haxtheweb/a11y-figure", "wcfactory": { "className": "A11yFigure", "customElementClass": "LitElement", "elementName": "a11y-figure", "generator-wcfactory-version": "0.7.1", "useHAX": true, "useSass": false, "files": { "js": "src/a11y-figure.js" } }, "version": "25.0.0", "description": "accessible figure with image description in details", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "a11y-figure.js", "module": "a11y-figure.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/a11y-details": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/a11y-figure/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/a11y-figure/test/a11y-figure.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../a11y-figure.js"; describe("a11y-figure test", () => { let element; beforeEach(async () => { element = await fixture(html`

    Figure caption text

    Image description
    Detailed image description with more information about the image.
    `); }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("a11y-figure"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Slot functionality", () => { it("should have figcaption slot with correct content", () => { const slot = element.shadowRoot.querySelector('slot[name="figcaption"]'); expect(slot).to.exist; const assignedNodes = slot.assignedNodes({ flatten: true }); expect(assignedNodes.length).to.be.greaterThan(0); expect(assignedNodes[0].textContent).to.equal("Figure caption text"); }); it("should have image slot", () => { const slot = element.shadowRoot.querySelector('slot[name="image"]'); expect(slot).to.exist; }); it("should have summary slot", () => { // The summary slot is nested within the a11y-details component const a11yDetails = element.shadowRoot.querySelector("a11y-details"); expect(a11yDetails).to.exist; // We can't directly test the slot content due to shadow DOM encapsulation, // but we can ensure our component passes it correctly const slotContainer = element.querySelector('[slot="summary"]'); expect(slotContainer).to.exist; expect(slotContainer.textContent).to.equal("Image description"); }); it("should have details slot", () => { const slotContainer = element.querySelector('[slot="details"]'); expect(slotContainer).to.exist; expect(slotContainer.textContent).to.contain( "Detailed image description", ); }); it("should have default hidden slot", () => { const defaultSlot = element.shadowRoot.querySelector("slot[hidden]"); expect(defaultSlot).to.exist; }); }); describe("Property type validation with accessibility", () => { let testElement; beforeEach(async () => { testElement = await fixture(html`

    Test Figure

    `); await testElement.updateComplete; }); describe("imgSrc property", () => { it("should accept valid URL values and maintain accessibility", async () => { testElement.imgSrc = "https://placehold.co/400x300"; await testElement.updateComplete; expect(testElement.imgSrc).to.equal("https://placehold.co/400x300"); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgSrc = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; await testElement.updateComplete; expect(testElement.imgSrc).to.equal( "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", ); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgSrc = ""; await testElement.updateComplete; expect(testElement.imgSrc).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept non-string values but maintain type in JavaScript", async () => { testElement.imgSrc = 123; await testElement.updateComplete; expect(testElement.imgSrc).to.equal(123); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgSrc = true; await testElement.updateComplete; expect(testElement.imgSrc).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgSrc = null; await testElement.updateComplete; expect(testElement.imgSrc).to.equal(null); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgSrc = undefined; await testElement.updateComplete; expect(testElement.imgSrc).to.equal(undefined); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.imgSrc).to.be.undefined; }); }); describe("imgAlt property", () => { it("should accept string values and maintain accessibility", async () => { testElement.imgAlt = "Test alt text"; await testElement.updateComplete; expect(testElement.imgAlt).to.equal("Test alt text"); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgAlt = ""; await testElement.updateComplete; expect(testElement.imgAlt).to.equal(""); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgAlt = "Long descriptive alt text for a complex image that provides context for screen reader users"; await testElement.updateComplete; expect(testElement.imgAlt).to.equal( "Long descriptive alt text for a complex image that provides context for screen reader users", ); await expect(testElement).shadowDom.to.be.accessible(); }); it("should accept non-string values but maintain type in JavaScript", async () => { testElement.imgAlt = 456; await testElement.updateComplete; expect(testElement.imgAlt).to.equal(456); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgAlt = false; await testElement.updateComplete; expect(testElement.imgAlt).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); testElement.imgAlt = null; await testElement.updateComplete; expect(testElement.imgAlt).to.equal(null); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.imgAlt).to.be.undefined; }); }); describe("__hasDetail property (internal)", () => { it("should be set correctly when details or summary slots are used", async () => { // No summary or details initially expect(testElement.__hasDetail).to.be.false; // Add a summary element const summaryElem = document.createElement("div"); summaryElem.setAttribute("slot", "summary"); summaryElem.textContent = "Test Summary"; testElement.appendChild(summaryElem); await testElement.updateComplete; // Test that __hasDetail is now true expect(testElement.__hasDetail).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); // Remove the summary element testElement.removeChild(summaryElem); // Add a details element const detailsElem = document.createElement("div"); detailsElem.setAttribute("slot", "details"); detailsElem.textContent = "Test Details"; testElement.appendChild(detailsElem); await testElement.updateComplete; // Test that __hasDetail remains true expect(testElement.__hasDetail).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); }); // Inherits openText and closeText from a11y-details, so test those too describe("inherited openText property", () => { it("should accept valid string values and maintain accessibility", async () => { testElement.openText = "Show More Details"; await testElement.updateComplete; expect(testElement.openText).to.equal("Show More Details"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.openText).to.equal(""); }); }); describe("inherited closeText property", () => { it("should accept valid string values and maintain accessibility", async () => { testElement.closeText = "Hide Details"; await testElement.updateComplete; expect(testElement.closeText).to.equal("Hide Details"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should have correct default value", () => { expect(testElement.closeText).to.equal(""); }); }); }); describe("Attribute to property mapping", () => { it("should set imgSrc property from img-src attribute", async () => { const testElement = await fixture(html`

    Test Figure

    `); expect(testElement.imgSrc).to.equal("https://placehold.co/200x100"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should set imgAlt property from img-alt attribute", async () => { const testElement = await fixture(html`

    Test Figure

    `); expect(testElement.imgAlt).to.equal("Test alt text"); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Accessibility scenarios with different property combinations", () => { it("should remain accessible with image and alt text", async () => { const testElement = await fixture(html`

    Simple figure

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with custom open and close text", async () => { const testElement = await fixture(html`

    Figure with description

    Image Description
    Detailed description of the image.
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with only image and no details", async () => { const testElement = await fixture(html`

    Figure without details

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with slotted image instead of src", async () => { const testElement = await fixture(html` Slotted placeholder

    Figure with slotted image

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with no image and only description", async () => { const testElement = await fixture(html`

    Figure without image

    Description
    This figure has description but no image.
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Interactive functionality and accessibility", () => { it("should maintain accessibility when interacting with the nested a11y-details", async () => { const testElement = await fixture(html`

    Interactive figure

    Description
    Hidden description content.
    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); // This is a bit limited since we can't directly access the nested a11y-details component // due to shadow DOM encapsulation, but we're testing the setup is accessible const nestedA11yDetails = testElement.shadowRoot.querySelector("a11y-details"); expect(nestedA11yDetails).to.exist; expect(nestedA11yDetails.getAttribute("open-text")).to.equal("Show"); expect(nestedA11yDetails.getAttribute("close-text")).to.equal("Hide"); }); }); describe("Edge cases and error handling", () => { it("should remain accessible with malformed image URL", async () => { const testElement = await fixture(html`

    Figure with invalid image URL

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with empty figcaption", async () => { const testElement = await fixture(html`

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with no figcaption", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with missing alt text but still provide a placeholder", async () => { const testElement = await fixture(html`

    Figure with missing alt text

    `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("HAX Properties and Integration", () => { it("should have haxProperties defined", () => { expect(element.constructor.haxProperties).to.exist; expect(element.constructor.haxProperties.gizmo).to.exist; expect(element.constructor.haxProperties.settings).to.exist; expect(element.constructor.haxProperties.demoSchema).to.exist; }); it("should handle HAX image upload integration", () => { const haxProps = element.constructor.haxProperties; const configItems = haxProps.settings.configure; // Verify imgSrc property has haxupload input method const imgSrcProp = configItems.find((item) => item.property === "imgSrc"); expect(imgSrcProp).to.exist; expect(imgSrcProp.inputMethod).to.equal("haxupload"); // Verify imgAlt property exists and is required const imgAltProp = configItems.find((item) => item.property === "imgAlt"); expect(imgAltProp).to.exist; expect(imgAltProp.required).to.be.true; }); it("should maintain accessibility with HAX demo schema", async () => { const demoSchema = element.constructor.haxProperties.demoSchema[0]; const haxTestElement = await fixture(html` ${html([demoSchema.content])} `); await haxTestElement.updateComplete; await expect(haxTestElement).shadowDom.to.be.accessible(); }); }); }); ================================================ FILE: elements/a11y-gif-player/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/a11y-gif-player/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/a11y-gif-player/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/a11y-gif-player/.npmignore ================================================ node_modules ================================================ FILE: elements/a11y-gif-player/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/a11y-gif-player/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/a11y-gif-player/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/a11y-gif-player/README.md ================================================ # <a11y-gif-player> 11 > An accessible animated gif "player" ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing module / web component */ import '@haxtheweb/a11y-gif-player/a11y-gif-player.js'; ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-gif-player/a11y-gif-player.js ================================================ /** * Copyright 2019 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; import { SchemaBehaviors } from "@haxtheweb/schema-behaviors/schema-behaviors.js"; import { IntersectionObserverMixin } from "@haxtheweb/intersection-element/lib/IntersectionObserverMixin.js"; import { I18NMixin } from "@haxtheweb/i18n-manager/lib/I18NMixin.js"; /** * `a11y-gif-player` * plays gifs in an accessible way by having the user click to play their animation ### Styling `` provides the following custom properties for styling: Custom property | Description | Default ----------------|-------------|---------- `--a11y-gif-player-border` | border around player/button | none `--a11y-gif-player-border-radius` | border-radius for player/button | 0 `--a11y-gif-player-focus-border` | border-radius for player/button when hovered or focused | none `--a11y-gif-player-cursor` | cursor for player/button when hovered or focused | pointer `--a11y-gif-player-outline` | outline for player/button when hovered or focused | `--a11y-gif-player-disabled-cursor` | cursor for player/button when disabled | not-allowed `--a11y-gif-player-arrow-size` | arrow icon size | 30% `--a11y-gif-player-arrow-opacity` | default arrow icon opacity | 0.5 `--a11y-gif-player-button-focus-opacity` | arrow icon opacity when hovered or focused | 0.7 `--a11y-gif-player-button-color` | arrow icon color | #000000 `--a11y-gif-player-arrow-border-color` | arrow icon border color | #ffffff `--a11y-gif-player-arrow-border-width` | arrow icon border width | 15px `--a11y-gif-player-button-text-color` | arrow icon text color | #ffffff `--a11y-gif-player-button-bg` | button background color when no static image | #cccccc * * @demo ./demo/index.html * @element a11y-gif-player */ class A11yGifPlayer extends I18NMixin( IntersectionObserverMixin(SchemaBehaviors(LitElement)), ) { constructor() { super(); this.windowControllers = new AbortController(); this.__gifLoaded = false; this.disabled = false; this.__playing = false; this._updateFromSlot(); this.t = { toggleAnimation: "Toggle animation", }; this.registerLocalization({ context: this, basePath: import.meta.url, }); } /** * LitElement render styles */ static get styles() { return [ css` :host { display: block; } :host([hidden]) { display: none; } .sr-only { position: absolute; left: -9999999px; top: 0; width: 0; overflow: hidden; } #container { padding: 0; margin: 0; position: relative; border: var(--a11y-gif-player-border, none); border-radius: var(--a11y-gif-player-border-radius, 0); } img { width: 100%; } button { position: absolute; width: 100%; min-height: 100px; top: 0; left: 0; bottom: 0; right: 0; background-size: contain; background-color: var(--a11y-gif-player-button-bg, #cccccc); } button:active, button:focus, button:hover { border: var(--a11y-gif-player-focus-border, none); outline: var(--a11y-gif-player-outline, 3px solid); } button[disabled] { cursor: var(--a11y-gif-player-disabled-cursor, not-allowed); } button[aria-pressed="true"] { opacity: 0; } svg { position: absolute; top: 35%; left: 35%; width: var(--a11y-gif-player-arrow-size, 30%); height: var(--a11y-gif-player-arrow-size, 30%); } g { opacity: var(--a11y-gif-player-arrow-opacity, 0.5); } button:not([disabled]):active g, button:not([disabled]):hover g, button:not([disabled]):focus g { opacity: var(--a11y-gif-player-button-focus-opacity, 0.7); } polygon { fill: var(--a11y-gif-player-button-color, #000000); stroke: var(--a11y-gif-player-arrow-border-color, #ffffff); stroke-width: var(--a11y-gif-player-arrow-border-width, 15px); } text { fill: var(--a11y-gif-player-button-text-color, #ffffff); } #longdesc { position: absolute; left: 2px; bottom: 2px; width: calc(100% - 2px); font-size: 80%; } `, ]; } __imageLoaded(e) { this.__gifLoaded = true; } render() { return html`${this.elementVisible ? html`
    ${this.alt} ${this.__playing ? html`` : ``}
    info
    ${this.longdesc}
    ` : ``} `; } /** * Convention */ static get tag() { return "a11y-gif-player"; } /** * LitElement / popular convention */ static get properties() { return { ...super.properties, /** * Alt text of gif */ alt: { type: String, }, /** * Whether button is disabled */ disabled: { type: Boolean, }, /* * other id's to add to aria-describedby */ describedBy: { attribute: "described-by", type: String, }, /** * longer image description for accesibility */ longdesc: { type: String, attribute: "longdesc", }, /** * Source of animated gif */ src: { type: String, }, /** * Source of static version of image */ srcWithoutAnimation: { type: String, attribute: "src-without-animation", }, /** * whether GIF is playing */ __playing: { type: Boolean, }, /** * if the gif source is loaded to avoid jarring on load */ __gifLoaded: { type: Boolean, }, }; } /** * LitElement updated life-cycle */ updated(changedProperties) { super.updated(changedProperties); changedProperties.forEach((oldValue, propName) => { // import on visibility if (propName === "elementVisible" && this[propName]) { import("@haxtheweb/a11y-details/a11y-details.js"); // support for automatic web service scrape of the gif for a still image if (this.shadowRoot && !this.srcWithoutAnimation && this.src) { // import registry import( "@haxtheweb/micro-frontend-registry/micro-frontend-registry.js" ).then(async () => { this._automaticStill = true; this.srcWithoutAnimation = await this.generateStill(this.src); }); } } // support src changing after the fact, we are visible, and set to automatic generation if ( this.shadowRoot && propName === "src" && this[propName] && this.elementVisible && this._automaticStill ) { setTimeout(async () => { this.srcWithoutAnimation = await this.generateStill(this.src); }, 0); } }); } async generateStill(src) { // enable core services, though should be available const MicroFrontendRegistry = globalThis.MicroFrontendRegistry.requestAvailability(); await import( "@haxtheweb/micro-frontend-registry/lib/microServices.js" ).then((e) => { MicroFrontendRegistry.enableServices(["core"]); }); return MicroFrontendRegistry.url("@core/imgManipulate", { quality: 50, src: src, }); } /** * mutation observer for a11y-details * @readonly * @returns {object} */ get observer() { let callback = () => this._updateFromSlot(); return new MutationObserver(callback); } connectedCallback() { if (super.connectedCallback) super.connectedCallback(); this.observer.observe(this, { attributes: false, childList: true, subtree: true, }); globalThis.addEventListener( "beforeprint", (event) => { this.shadowRoot.querySelector("#longdesc").toggleOpen(); }, { signal: this.windowControllers.signal }, ); globalThis.addEventListener( "afterprint", (event) => { this.shadowRoot.querySelector("#longdesc").toggleOpen(); }, { signal: this.windowControllers.signal }, ); } disconnectedCallback() { this.observer.disconnect(); this.windowControllers.abort(); if (super.disconnectedCallback) super.disconnectedCallback(); } /** * plays the animation regarless of previous state */ play() { this.__playing = true; } /** * stops the animation regarless of previous state */ stop() { this.__playing = false; } /** * toggles the animation based on current state */ toggle() { if (this.__playing) { this.stop(); } else { this.play(); } } /** * deprecated. toggles the animation based on current state */ toggleAnimation() { if (this.__playing) { this.stop(); } else { this.play(); } } /** * when slot changes update with animated gif */ _updateFromSlot() { // ensures ssr works if (this.querySelector) { let img = this.querySelector("img"); if (img) { let src = img.src || null; let alt = img.alt || null; if (src) this.srcWithoutAnimation = src; if (alt) this.alt = alt; } // support simple-img tag since it can auto-convert gif to static! img = this.querySelector("simple-img"); if (img) { let src = img.srcconverted || null; let alt = img.alt || null; if (src) this.srcWithoutAnimation = src; if (alt) this.alt = alt; } } } /** * haxProperties integration via file reference */ static get haxProperties() { return new URL(`./lib/${this.tag}.haxProperties.json`, import.meta.url) .href; } } globalThis.customElements.define(A11yGifPlayer.tag, A11yGifPlayer); export { A11yGifPlayer }; ================================================ FILE: elements/a11y-gif-player/demo/index.html ================================================ A11yGifPlayer: a11y-gif-player Demo

    Basic a11y-gif-player demo

    ================================================ FILE: elements/a11y-gif-player/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/a11y-gif-player/index.html ================================================ a11y-gif-player documentation ================================================ FILE: elements/a11y-gif-player/lib/a11y-gif-player.haxProperties.json ================================================ { "canScale": true, "canEditSource": true, "gizmo": { "title": "GIF", "description": "Make animated GIFs accessible.", "icon": "gif", "color": "grey", "tags": [ "Media", "player", "gif", "media", "a11y", "accessibility", "animation", "image" ], "handles": [ { "type": "gif", "type_exclusive": true, "source": "src", "source2": "srcWithoutAnimation", "alt": "alt" }, { "type": "image", "source": "src", "source2": "srcWithoutAnimation", "alt": "alt" } ], "meta": { "author": "HAXTheWeb core team" } }, "settings": { "configure": [ { "property": "src", "title": "Animated GIF", "description": "The URL to your animated GIF.", "inputMethod": "haxupload", "noVoiceRecord": true, "icon": "link", "validationType": "url", "required": true }, { "property": "alt", "title": "Alt Text", "description": "Alternative text for the image.", "inputMethod": "alt", "icon": "accessibility", "required": true }, { "property": "longdesc", "title": "Long Description", "description": "Long descriptions of the GIF for accessibiility", "inputMethod": "textarea" } ], "advanced": [ { "property": "srcWithoutAnimation", "title": "Still Image", "description": "The URL to a still image version of your GIF.", "inputMethod": "haxupload", "noVoiceRecord": true, "icon": "link", "validationType": "url", "required": true } ] }, "saveOptions": { "unsetAttributes": ["__playing", "__gif-loaded", "element-visible", "t"] }, "demoSchema": [ { "tag": "a11y-gif-player", "properties": { "alt": "It's Always Sunny in Philadelphia Pepe Silvia Meme with GIFs", "src": "https://media0.giphy.com/media/zHaPZZvl6cVHi/giphy.gif", "longdesc": "Pepe Silvia scene from It's Always Sunny in Philadelphia. The GIF's don't stop.", "elementVisible": true } } ] } ================================================ FILE: elements/a11y-gif-player/locales/a11y-gif-player.es.json ================================================ { "toggleAnimation": "Alternar animación" } ================================================ FILE: elements/a11y-gif-player/package.json ================================================ { "name": "@haxtheweb/a11y-gif-player", "wcfactory": { "className": "A11yGifPlayer", "customElementClass": "LitElement", "elementName": "a11y-gif-player", "generator-wcfactory-version": "0.3.1", "useHAX": true, "useSass": false, "files": { "js": "src/a11y-gif-player.js" }, "sharedStyles": [] }, "version": "25.0.0", "description": "Play gifs in an accessible way by having the user click to play their animation", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "a11y-gif-player.js", "module": "a11y-gif-player.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/a11y-details": "^25.0.0", "@haxtheweb/i18n-manager": "^25.0.0", "@haxtheweb/intersection-element": "^25.0.0", "@haxtheweb/micro-frontend-registry": "^25.0.0", "@haxtheweb/schema-behaviors": "^25.0.0", "@haxtheweb/simple-tooltip": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@haxtheweb/simple-img": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/a11y-gif-player/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/a11y-gif-player/test/a11y-gif-player.test.js ================================================ ================================================ FILE: elements/a11y-media-player/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/a11y-media-player/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/a11y-media-player/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/a11y-media-player/.npmignore ================================================ node_modules ================================================ FILE: elements/a11y-media-player/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/a11y-media-player/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/a11y-media-player/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2019 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/a11y-media-player/README.md ================================================ # <a11y-media-player> 11 > ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/a11y-media-player/a11y-media-player.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/a11y-media-player/a11y-media-player.js ================================================ /** * Copyright 2019 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import { FullscreenBehaviors } from "@haxtheweb/fullscreen-behaviors/fullscreen-behaviors.js"; import { I18NMixin } from "@haxtheweb/i18n-manager/lib/I18NMixin.js"; import "@haxtheweb/anchor-behaviors/anchor-behaviors.js"; import "@haxtheweb/responsive-utility/responsive-utility.js"; import { normalizeEventPath } from "@haxtheweb/utils/utils.js"; import "@haxtheweb/absolute-position-behavior/absolute-position-behavior.js"; import "@haxtheweb/simple-tooltip/simple-tooltip.js"; import "@haxtheweb/simple-search/simple-search.js"; import "@haxtheweb/simple-range-input/simple-range-input.js"; import "@haxtheweb/simple-fields/lib/simple-fields-field.js"; import "./lib/a11y-media-play-button.js"; import "./lib/a11y-media-state-manager.js"; import "./lib/a11y-media-button.js"; import "./lib/a11y-media-transcript-cue.js"; import "./lib/a11y-media-youtube.js"; /** * `a11y-media-player` * an accessible video player * ### Styling `` provides the following basic custom properties for styling: #### Basic Styling Custom property | Description | Default ----------------|-------------|---------- `--a11y-media-color` | default text color | `--simple-colors-default-theme-grey-11` `--a11y-media-bg-color` | default background color | `--simple-colors-default-theme-grey-2` `--a11y-media-border-color` | default border color | `--simple-colors-default-theme-grey-3` `--a11y-media-hover-color` | text color when hovering | `--simple-colors-default-theme-grey-12` `--a11y-media-hover-bg-color` | background color when hovering | `--simple-colors-default-theme-grey-2` `--a11y-media-accent-color` | accent color | `--simple-colors-default-theme-accent-9` `--a11y-media-faded-accent-color` | accent color when faded | `--simple-colors-default-theme-accent-8` `--a11y-media-disabled-color` | color for disabled items | `--simple-colors-default-theme-grey-5` `--a11y-media-transcript-color` | default text color of transcript | `--simple-colors-default-theme-grey-7` `--a11y-media-transcript-bg-color` | default background color of transcript | `--simple-colors-default-theme-grey-1` `--a11y-media-transcript-accent-color` | default accent color of transcript | `--simple-colors-default-theme-accent-8` `--a11y-media-transcript-faded-accent-color` | accent color of transcript, faded | `--simple-colors-default-theme-accent-10` `--a11y-media-transcript-cue-color` | text color of transcript cue | `--simple-colors-fixed-theme-grey-12` `--a11y-media-transcript-cue-bg-color` | background color of transcript cue | `--simple-colors-fixed-theme-grey-1` `--a11y-media-transcript-active-cue-color` | text color of active transcript cue | `--simple-colors-fixed-theme-grey-12` `--a11y-media-transcript-active-cue-bg-color` | background color of active transcript cue | `--simple-colors-fixed-theme-accent-1` `--a11y-media-transcript-focused-cue-color` | text color of focused transcript cue | `--simple-colors-fixed-theme-grey-12` `--a11y-media-transcript-focused-cue-bg-color` | background color of focused transcript cue | `--simple-colors-fixed-theme-grey-2` `--a11y-media-transcript-match-color` | text color of matched term in transcript search | `--simple-colors-fixed-theme-grey-1` `--a11y-media-transcript-match-bg-color` | background color of matched term in transcript search | `--simple-colors-fixed-theme-accent-10` `--a11y-media-transcript-match-border-color` | border color of matched term in transcript search | `--simple-colors-fixed-theme-accent-12` #### Controls Custom property | Description | Default ----------------|-------------|---------- `--a11y-media-scrollbar-width` | default width of scrollbars | `5px` `--a11y-media-controls-font-family` | font-family of controls #### Buttons Custom property | Description | Default ----------------|-------------|---------- `--a11y-media-button-color` | button text color | `--a11y-media-color` `--a11y-media-button-bg-color` | button background color | `--a11y-media-bg-color` `--a11y-media-button-hover-color` | button text color when hovering | `--a11y-media-accent-color` `--a11y-media-button-hover-bg-color` | button background color when hovering | `--a11y-media-hover-bg-color` `--a11y-media-button-disabled-color` | button text color when disabled | `--a11y-media-disabled-color` `--a11y-media-button-toggle-color` | button text color when toggled | `--a11y-media-faded-accent-color` #### Sliders Custom property | Description | Default ----------------|-------------|---------- `--simple-range-input-active-color` | slider color when active | `--a11y-media-accent-color` `--simple-range-input-secondary-color` | slider color for buffering | `--a11y-media-faded-accent-color` `--simple-range-input-pin-color` | slider pin color | `--a11y-media-bg-color` `--simple-range-input-pin-start-color` | slider pin color in start position | `--a11y-media-bg-color` `--simple-range-input-pin-end-color` | slider pin color in end position | `--a11y-media-bg-color` `--simple-range-input-knob-color` | slider knob color | `--a11y-media-accent-color` `--simple-range-input-knob-start-color` | slider knob color in start position | `--a11y-media-accent-color` `--simple-range-input-knob-end-color` | slider knob color in end position | `--a11y-media-bg-accent-color` `--simple-range-input-knob-border-color` | slider knob border color | `--a11y-media-accent-color` `--simple-range-input-knob-start-border-color` | slider knob border color in start position | `--a11y-media-bg-color` `--simple-range-input-knob-end-border-color` | slider knob border color in end position | `--a11y-media-bg-color` #### Settings Menu Custom property | Description | Default ----------------|-------------|---------- `--a11y-media-settings-menu-color` | settings menu text color | `--a11y-media-color` `--a11y-media-settings-menu-bg-color` | settings menu background color | `--a11y-media-bg-color` `--a11y-media-settings-menu-hover-color` | settings menu text color when hovering | `--a11y-media-hover-color` `--a11y-media-settings-menu-hover-bg-color` | settings menu background color when hovering | `--a11y-media-hover-bg-color` #### Link Sharing Toast Custom property | Description | Default ----------------|-------------|---------- `--simple-toast-color` | toast text color | `--a11y-media-color` `--simple-toast-background-color` | toast background color | `--a11y-media-bg-color` * * @element a11y-media-player * @extends DDD * @demo ./demo/index.html video demo * @demo ./demo/audio.html audio demo * @demo ./demo/youtube.html YouTube demo */ class A11yMediaPlayer extends I18NMixin(FullscreenBehaviors(DDD)) { //styles function static get styles() { return [ super.styles, css` :host { display: block; overflow: hidden; width: calc(100% - 2px); font-family: var(--ddd-font-navigation); --a11y-media-controls-font-family: var(--ddd-font-navigation); --a11y-media-player-height: unset; --a11y-media-color: var( --simple-colors-default-theme-grey-11, #111111 ); --a11y-media-bg-color: var( --simple-colors-default-theme-grey-2, #eeeeee ); --a11y-media-border-color: var( --simple-colors-default-theme-grey-3, #dddddd ); --a11y-media-hover-color: var( --simple-colors-default-theme-grey-12, #000000 ); --a11y-media-hover-bg-color: var( --simple-colors-default-theme-grey-2, #eeeeee ); --a11y-media-accent-color: var( --simple-colors-default-theme-accent-9, #333333 ); --a11y-media-faded-accent-color: var( --simple-colors-default-theme-accent-8, #444444 ); --a11y-media-disabled-color: var( --simple-colors-default-theme-grey-5, #bbbbbb ); border: 1px solid var( --a11y-media-border-color, var(--simple-colors-default-theme-grey-3) ); --a11y-media-settings-menu-color: var(--a11y-media-color); --a11y-media-settings-menu-bg-color: var(--a11y-media-bg-color); --a11y-media-settings-menu-hover-color: var(--a11y-media-hover-color); --a11y-media-settings-menu-hover-bg-color: var( --a11y-media-hover-bg-color ); --simple-fields-accent-color: var(--a11y-media-accent-color); --simple-fields-background-color: var(--a11y-media-bg-color); --simple-fields-color: var(--a11y-media-color); --simple-fields-border-color: var(--a11y-media-border-color); --simple-fields-border-color-light: var( --a11y-media-border-color-light, var(--a11y-media-border-color) ); --a11y-media-button-color: var(--a11y-media-color); --a11y-media-button-bg-color: var(--a11y-media-bg-color); --a11y-media-button-hover-color: var(--a11y-media-accent-color); --a11y-media-button-hover-bg-color: var(--a11y-media-hover-bg-color); --a11y-media-button-disabled-color: var(--a11y-media-disabled-color); --a11y-media-button-toggle-color: var( --a11y-media-faded-accent-color ); --simple-range-input-bg: var(--a11y-media-accent-color); --simple-range-input-color: var(--a11y-media-color); --simple-range-input-track-height: 4px; --simple-range-input-pin-height: 10px; --simple-toast-color: var(--a11y-media-color); --simple-toast-background-color: var(--a11y-media-bg-color); --a11y-media-transcript-color: var( --simple-colors-default-theme-grey-7, #666666 ); --a11y-media-transcript-bg-color: var( --simple-colors-default-theme-grey-1, #ffffff ); --a11y-media-transcript-accent-color: var( --simple-colors-default-theme-accent-8, #444444 ); --a11y-media-transcript-faded-accent-color: var( --simple-colors-default-theme-accent-10, #222222 ); --a11y-media-transcript-cue-color: var( --simple-colors-fixed-theme-grey-12, #000000 ); --a11y-media-transcript-cue-bg-color: var( --simple-colors-fixed-theme-grey-1, #ffffff ); --a11y-media-transcript-active-cue-color: var( --simple-colors-fixed-theme-grey-12, #000000 ); --a11y-media-transcript-active-cue-bg-color: var( --simple-colors-fixed-theme-accent-1, #ffffff ); --a11y-media-transcript-focused-cue-color: var( --simple-colors-fixed-theme-grey-12, #000000 ); --a11y-media-transcript-focused-cue-bg-color: var( --simple-colors-fixed-theme-grey-2, #eeeeee ); --a11y-media-transcript-match-color: var( --simple-colors-fixed-theme-grey-1, #ffffff ); --a11y-media-transcript-match-bg-color: var( --simple-colors-fixed-theme-accent-10, #222222 ); --a11y-media-transcript-match-border-color: var( --simple-colors-fixed-theme-accent-12, #000000 ); } :host([dark]) { border: 1px solid var(--simple-colors-default-theme-grey-1, #000000); } :host([dark-transcript]) { --a11y-media-transcript-bg-color: var( --simple-colors-dark-theme-grey-1, #000000 ); --a11y-media-transcript-cue-color: var( --simple-colors-dark-theme-grey-12, #ffffff ); --a11y-media-transcript-cue-bg-color: var( --simple-colors-dark-theme-grey-1, #000000 ); --a11y-media-transcript-active-cue-color: var( --simple-colors-dark-theme-accent-10, #dddddd ); --a11y-media-transcript-active-cue-bg-color: var( --simple-colors-dark-theme-grey-1, #000000 ); --a11y-media-transcript-match-color: var( --simple-colors-dark-theme-grey-1, #000000 ); --a11y-media-transcript-match-bg-color: var( --simple-colors-dark-theme-accent-10, #dddddd ); --a11y-media-transcript-match-border-color: var( --simple-colors-dark-theme-accent-12, #ffffff ); --a11y-media-transcript-focused-cue-color: var( --simple-colors-dark-theme-grey-12, #ffffff ); --a11y-media-transcript-focused-cue-bg-color: var( --simple-colors-dark-theme-grey-2, #111111 ); } :host *::-webkit-scrollbar { width: var(--a11y-media-scrollbar-width, 5px); } :host([hidden]), *[hidden] { display: none !important; } :host([height]) { height: calc(var(--a11y-media-player-height) - 2px); max-height: calc(var(--a11y-media-player-height) - 2px); overflow: unset; } :host([height]) #player-section { max-height: var(--a11y-media-player-height); } :host([height]) #player-and-controls { max-height: calc(100% - 32px - 44px); } :host([height]) #player { height: calc(100% - 32px - 44px); padding-top: unset; } :host, #player-section { color: var(--a11y-media-hover-color); background-color: var(--a11y-media-bg-color); } :host > * { transition: all 0.5s; } :host, #player-section, #player, #transcript-section, #transcript-and-controls { display: flex; flex-flow: column; align-items: stretch; align-content: stretch; } #captionlink:link { text-decoration: none; } #player-and-controls, #player, #player > *, #cc-custom, #cc-text, #slider, #controls, #player-section, #transcript-section, #transcript-and-controls { width: 100%; } #transcript-and-controls > * { width: calc(100% - 1px); } :host > *, #player-and-controls, #player, #player > *, #cc-text { flex: 1 1 auto; } #controls, #searchbar { flex: 0 0 44px; } #player-and-controls { margin: 0 auto; display: flex; } #player { height: 400px; position: relative; background-size: cover; background-position: center; } #player > * { position: absolute; top: 0; left: 0; height: 100%; } #playbutton, #slider, #controls { z-index: 2; } #html5 { min-width: 100px; display: flex; align-items: stretch; } :host([audio-only]) #playbutton { opacity: 0; } #slider { flex: 0 0 32px; height: 32px; background-color: var(--a11y-media-bg-color); --simple-range-input-pin-height: 15px; } a11y-media-youtube { opacity: 1; transition: opacity 0.5s; } a11y-media-youtube.hidden { opacity: 0; } #cc-custom:not([hidden]) { font-size: 20px; transition: font-size 0.25s; display: flex; } #cc-text { align-self: flex-end; font-family: sans-serif; color: white; margin: 4px 10px; padding: 0.15em 4px; background-color: black; background-color: rgba(0, 0, 0, 0.8); transition: all 0.5s; } #player-and-controls[audio-no-thumb] #cc-text { align-self: center; color: var(--a11y-media-color); background-color: transparent; } #controls { display: block; width: 100%; max-width: 100%; height: 44px; max-height: 44px; position: relative; color: var(--a11y-media-color); background-color: var(--a11y-media-bg-color); --primary-text-color: var(--a11y-media-settings-menu-color); } #controls-left { position: absolute; left: 0; min-width: 200px; } #controls-right { position: absolute; right: 0; top: 0; } absolute-position-behavior { background-color: var(--a11y-media-settings-menu-bg-color); color: var(--a11y-media-settings-menu-color); border: 1px solid var( --a11y-media-border-color, var(--simple-colors-default-theme-grey-3) ); max-height: 200px; overflow-y: scroll; overflow-x: hidden; } absolute-position-behavior::-webkit-scrollbar-track { background-color: var(--a11y-media-settings-menu-bg-color); } absolute-position-behavior::-webkit-scrollbar-thumb { background-color: var(--a11y-media-settings-menu-color); } absolute-position-behavior .setting { min-height: 42px; padding: 2px 10px; display: flex; justify-content: space-between; align-items: center; } absolute-position-behavior simple-field-field { margin-top: 0 !important; margin-bottom: 0 !important; background-color: var(--a11y-media-settings-menu-bg-color); color: var(--a11y-media-settings-menu-color); } .setting-text { margin-right: 1em; font-family: var(--a11y-media-controls-font-family); } .setting-control { max-width: 110px; } .setting-slider { flex: 0 0 110px; margin-left: -15px; margin-right: -15px; } #loop { flex: 0 0 40px; } #loop-label { flex: 1 1 auto; } .play-status { border: none; position: relative; font-size: 85%; font-family: var(--a11y-media-controls-font-family); } .play-status.control-bar { padding: 8px 13px 8px; } :host([hide-play-status]) .play-status { display: none; } #volume-and-mute { display: inline-block; position: relative; } #volume { position: absolute; left: 30px; top: 0px; width: 0; height: 40px; overflow: hidden; transition: width 0.5s; z-index: 3; border-radius: 4px; background-color: var(--a11y-media-bg-color); } #volume:active, #volume:focus, #volume:hover, #volume.focus, #volume-and-mute:active #volume, #volume-and-mute:focus #volume, #volume-and-mute:hover #volume { overflow: visible; width: 100px; } :host([responsive-size="xs"]) #volume:active, :host([responsive-size="xs"]) #volume:focus, :host([responsive-size="xs"]) #volume:hover, :host([responsive-size="xs"]) #volume.focus, :host([responsive-size="xs"]) #volume-and-mute:active #volume, :host([responsive-size="xs"]) #volume-and-mute:focus #volume, :host([responsive-size="xs"]) #volume-and-mute:hover #volume, :host([width]) #volume:active, :host([width]) #volume:focus, :host([width]) #volume:hover, :host([width]) #volume.focus, :host([width]) #volume-and-mute:active #volume, :host([width]) #volume-and-mute:focus #volume, :host([width]) #volume-and-mute:hover #volume { top: 0px; } #print-thumbnail { width: 100%; margin: 0; display: block; border-top: 1px solid #aaaaaa; } .media-caption:not(:empty) { padding: var(--ddd-spacing-2) var(--ddd-spacing-4); font-size: var(--ddd-font-size-xs); font-weight: bold; } .media-type { font-style: italic; } #searchbar { display: flex; align-items: stretch; justify-content: space-between; height: 44px; max-height: 44px; min-height: 44px; width: 100%; color: var(--a11y-media-color); background-color: var(--a11y-media-transcript-bg-color); --simple-fields-color: var(--a11y-media-color); --a11y-media-button-bg-color: var(--a11y-media-transcript-bg-color); --a11y-media-button-hover-bg-color: var( --a11y-media-transcript-bg-color ); --simple-search-input-background-color: var( --a11y-media-transcript-bg-color ); --simple-search-input-text-color: var(--a11y-media-color); --simple-search-input-line-color: var(--a11y-media-accent-color); --simple-search-input-placeholder-color: var(--a11y-media-color); --simple-search-button-color: var(--a11y-media-accent-color); --simple-search-button-hover-color: var( --a11y-media-faded-accent-color ); --simple-search-button-bg-color: var( --a11y-media-transcript-bg-color ); --simple-search-button-border-color: var( --a11y-media-transcript-bg-color ); --simple-search-button-hover-border-color: var( --a11y-media-transcript-bg-color ); --simple-search-button-disabled-color: var( --a11y-media-disabled-color ); --simple-search-button-disabled-bg-color: var( --a11y-media-transcript-bg-color ); --simple-search-button-disabled-border-color: var( --a11y-media-border-color ); --simple-search-padding: 0 15px; } :host([dark]) #searchbar { background-color: var(--a11y-media-bg-color); --a11y-media-button-bg-color: var(--a11y-media-bg-color); --a11y-media-button-hover-bg-color: var(--a11y-media-bg-color); --simple-search-input-background-color: var(--a11y-media-bg-color); --simple-search-button-bg-color: var(--a11y-media-bg-color); --simple-search-button-border-color: var(--a11y-media-bg-color); --simple-search-button-hover-border-color: var(--a11y-media-bg-color); --simple-search-button-disabled-bg-color: var(--a11y-media-bg-color); } #searching { flex-grow: 2; } #autoscroll { padding-right: 8px; } #scrolling, #printing { display: flex; align-items: center; } #transcript-section { padding: 0 1px 0 0; } #transcript-and-controls { flex: 1 0 194px; } #transcript { flex: 1 0 150px; max-height: var(--a11y-media-transcript-max-height, unset); overflow-y: scroll; color: var(--a11y-media-transcript-cue-color); background-color: var(--a11y-media-transcript-cue-bg-color); border-left: 1px solid var(--a11y-media-transcript-bg-color); } #transcript::-webkit-scrollbar-track { background-color: var(--a11y-media-transcript-cue-bg-color); } #transcript::-webkit-scrollbar-thumb { background-color: var(--a11y-media-transcript-cue-color); } .transcript-from-track { display: table; width: calc(100% - 30px); padding: 0 15px 15px; color: var(--a11y-media-transcript-cue-color); background-color: var(--a11y-media-transcript-cue-bg-color); font-size: var(--a11y-media-transcript-cue-font-size, 14px); line-height: var(--a11y-media-transcript-cue-line-height, 28px); } .transcript-from-track[hideTimestamps] { display: block; } .sr-only { position: absolute; left: -9999px; font-size: 0; height: 0; width: 0; overflow: hidden; } absolute-position-behavior:not(:defined), simple-tooltip:not(:defined) { display: none; } ::slotted(iframe) { display: none; } @media screen { :host([full-flex]) { flex-flow: row; padding: 0; } :host([full-flex]) #player-section { max-width: 50%; flex: 1 0 auto; } :host([full-flex]) #transcript-section { min-width: 50%; flex: 0 1 auto; } :host([full-flex]) #transcript { position: absolute; top: 44px; left: 0; right: 0; bottom: 0; overflow-y: scroll; } #transcript-and-controls { position: relative; } :host([sticky-mode]) #player-section { position: fixed; top: 5px; right: 5px; width: 200px; max-width: 200px; z-index: 999999; border: 1px solid var(--a11y-media-bg-color); box-shadow: 1px 1px 20px 1px rgba(125, 125, 125); border-radius: 3.2px; } :host([fullscreen]) #player-section { width: 100%; height: 100vh; max-width: 100vw; position: absolute; position: sticky; left: 0; top: 0; z-index: 100000; transition: all 0.5s; } :host([dark][sticky-mode]) #player-section { border: 1px solid var(--a11y-media-bg-color); } :host([sticky][sticky-corner="top-left"]) #player-section { right: unset; left: 5px; } :host( :not([no-height]):not([stacked-layout]):not( [responsive-size="xs"] ):not([responsive-size="sm"]) ) #player-and-controls.totop { position: absolute; top: 0; left: 0; width: 200px !important; z-index: 9999; } :host([sticky][sticky-corner="bottom-left"]) #player-and-controls { top: unset; right: unset; bottom: 5px; } :host([sticky][sticky-corner="bottom-right"]) #player-and-controls { top: unset; bottom: 5px; } :host([sticky-mode]) .screen-only.media-caption, :host([responsive-size="xs"]) .screen-only.media-caption { display: none; } :host([sticky-mode]) #player-and-controls[audio-no-thumb] { max-height: 0px; overflow: hidden; } :host([sticky-mode]) .hide-sticky, :host([sticky-mode]) .hide-full-xs, :host([sticky-mode]) .hide-full-sm, :host([sticky-mode]) .hide-flex, :host([width]) .hide-full-xs, :host([width]) .hide-full-sm, :host([width]) .hide-full-flex, :host([responsive-size="xs"]) .hide-full-xs, :host([responsive-size="xs"]) .hide-full-sm, :host([responsive-size="xs"]) .hide-full-flex, :host([responsive-size="sm"]) .hide-full-sm, :host([responsive-size="sm"]) .hide-full-flex, :host([flex-layout]) .hide-flex { display: none; } :host([responsive-size="xl"]) #cc-custom { font-size: 16px; } :host([responsive-size="lg"]) #cc-custom, :host([flex-layout][responsive-size="xl"]) #cc-custom { font-size: 14px; } :host([responsive-size="md"]) #cc-custom, :host([flex-layout][responsive-size="lg"]) #cc-custom { font-size: 12px; } :host([responsive-size="xs"]) #cc-custom, :host([width]) #cc-custom, :host([flex-layout][responsive-size="md"]) #cc-custom, :host([flex-layout][responsive-size="sm"]) #cc-custom { font-size: 10px; } :host([sticky-mode]) #cc-custom, :host([flex-layout][width]) #cc-custom, :host([flex-layout][responsive-size="xs"]) #cc-custom { display: none; } .media-caption { color: var( --a11y-media-caption-color, light-dark( var(--simple-colors-default-theme-grey-12), var(--simple-colors-default-theme-grey-1) ) ); background-color: var(--a11y-media-accent-color); } #audio-only { text-align: center; font-style: italic; width: 100%; line-height: 160%; } #print-thumbnail, .print-only { width: 0; display: none; } } @media print { :host, :host([dark]) { outline: 1px solid #aaaaaa; background-color: #ffffff; } .screen-only, #searchbar, #print-thumbnail:not([src]), :host(:not([thumbnail-src])) #player { display: none; } .media-caption { background-color: #cccccc; color: #000000; font-size: 120%; } #transcript { padding: 0 15px 5px; color: #000; background-color: #ffffff; border-top: 1px solid #aaa; } } `, ]; } // render function render() { return html`
    ${this.mediaCaption}
    ${this.videoId && this.__playerReady ? html` ` : ``} ${Object.keys(this.captionCues || []).length === 0 || !this.showCustomCaptions ? html`` : html`
    ${!this.captionCues ? `` : Object.keys(this.captionCues).map( (key) => html`${this.captionCues[key].text ? this.captionCues[key].text : ""}`, )}
    `}
    ${this.t.seekSliderLabel}
    ${this.status}
    -1) || this.learningMode}" ?toggle="${this.transcriptTrackKey > -1}" @click="${(e) => this.toggleTranscript()}" > ${this.isYoutube ? html` ` : ``}
    ${this.t.captionsLabel}
    ${this.t.transcriptLabel}
    ${this.t.downloadLabel}
    ${this.t.loopLabel}
    ${this.t.speedLabel}
    ${this.poster ? html`` : ``}
    ${this.t.transcriptSkip} ${this.transcriptCues.length > 0 ? html`
    ${this.transcriptCues.map((cue, index) => { return html` ${cue.text} `; })}
    ` : html`
    ${this.status}
    `}
    `; } // properties available to the custom element for data binding static get properties() { return { ...super.properties, __playerReady: { type: Boolean }, /** * Allow this media to play concurrently with other a11y-media-players? * Default is to pause this a11y-media-player when other a11y-media-player starts playing. */ allowConcurrent: { attribute: "allow-concurrent", type: Boolean, }, /** * Is this an audio file? */ audioOnly: { attribute: "audio-only", type: Boolean, reflect: true, }, /** * autoplay is an option, * but generally not recommended for a11y */ autoplay: { attribute: "autoplay", type: Boolean, }, /** * the selected track */ captionsTrack: { attribute: "captions-track", type: Object, }, /** * show closed captions */ cc: { attribute: "cc", type: Boolean, }, /** * current time for video playback */ currentTime: { type: Number, }, /** * crossorigin attribute for
    `; } } customElements.define(AppHaxSiteDetails.tag, AppHaxSiteDetails); ================================================ FILE: elements/app-hax/lib/v2/app-hax-site-login.js ================================================ import { LitElement, html, css } from "lit"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; import { DDDSuper } from "@haxtheweb/d-d-d/d-d-d.js"; import "@haxtheweb/rpg-character/rpg-character.js"; import { store } from "./AppHaxStore.js"; export class AppHaxSiteLogin extends DDDSuper(LitElement) { // a convention I enjoy so you can change the tag name in 1 place static get tag() { return "app-hax-site-login"; } // HTMLElement life-cycle, built in; use this for setting defaults constructor() { super(); this.windowControllers = new AbortController(); this.username = ""; this.password = ""; this.errorMSG = "Enter User name"; this.hidePassword = true; this.hasPass = false; } // properties that you wish to use as data in HTML, CSS, and the updated life-cycle static get properties() { return { ...super.properties, username: { type: String }, password: { type: String }, errorMSG: { type: String }, hidePassword: { type: Boolean }, hasPass: { type: Boolean }, }; } firstUpdated() { super.firstUpdated(); setTimeout(() => { this.shadowRoot.querySelector("input").focus(); }, 0); } // updated fires every time a property defined above changes // this allows you to react to variables changing and use javascript to perform logic // updated(changedProperties) { // changedProperties.forEach((oldValue, propName) => { // }); // } // CSS - specific to Lit static get styles() { return [ super.styles, css` :host { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: var(--ddd-spacing-6, 24px); text-align: center; font-family: var(--ddd-font-primary, sans-serif); background: var(--ddd-theme-default-white, white); color: var(--ddd-theme-default-nittanyNavy, #001e44); } rpg-character { display: block; margin: 0 0 var(--ddd-spacing-4, 16px) 0; width: 120px; height: 120px; } #errorText { color: var(--ddd-theme-default-original87Pink, #e4007c); font-size: var(--ddd-font-size-xs, 14px); margin: var(--ddd-spacing-2, 8px) 0; min-height: var(--ddd-spacing-5, 20px); font-weight: var(--ddd-font-weight-medium, 500); } #inputcontainer { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--ddd-spacing-4, 16px); } .form-group { width: 100%; position: relative; } input { width: 100%; padding: var(--ddd-spacing-3, 12px); border: var(--ddd-border-sm, 2px solid) var(--ddd-theme-default-slateGray, #666); border-radius: var(--ddd-radius-sm, 4px); font-size: var(--ddd-font-size-s, 16px); font-family: var(--ddd-font-primary, sans-serif); box-sizing: border-box; transition: border-color 0.2s ease; background-color: var(--ddd-theme-default-limestoneMaxLight, #f5f5f5); color: var(--ddd-theme-default-coalyGray, #444); } input:focus { outline: none; border-color: var(--ddd-theme-default-nittanyNavy, #001e44); } input::placeholder { color: var(--ddd-theme-default-slateGray, #666); text-transform: capitalize; } button { padding: var(--ddd-spacing-3, 12px) var(--ddd-spacing-4, 16px); border-radius: var(--ddd-radius-sm, 4px); font-size: var(--ddd-font-size-s, 16px); font-weight: var(--ddd-font-weight-medium, 500); font-family: var(--ddd-font-primary, sans-serif); cursor: pointer; transition: all 0.2s ease; border: none; display: flex; align-items: center; justify-content: center; gap: var(--ddd-spacing-2, 8px); width: 100%; min-height: var(--ddd-spacing-10, 40px); background: var(--ddd-theme-default-nittanyNavy, #001e44); color: var(--ddd-theme-default-white, white); } button:disabled { opacity: 0.5; cursor: not-allowed; } button:hover:not(:disabled) { background: var(--ddd-theme-default-keystoneYellow, #ffd100); color: var(--ddd-theme-default-nittanyNavy, #001e44); transform: translateY(-1px); box-shadow: var(--ddd-boxShadow-md); } .notyou { padding: var(--ddd-spacing-2, 8px); font-size: var(--ddd-font-size-s, 16px); color: var(--ddd-theme-default-coalyGray, #444); } .notyou a { color: var(--ddd-theme-default-nittanyNavy, #001e44); text-decoration: underline; cursor: pointer; font-weight: var(--ddd-font-weight-medium, 500); } .notyou a:hover { color: var(--ddd-theme-default-keystoneYellow, #ffd100); } .visibility-icon { position: absolute; right: var(--ddd-spacing-3, 12px); top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--ddd-theme-default-slateGray, #666); cursor: pointer; padding: var(--ddd-spacing-1, 4px); border-radius: var(--ddd-radius-xs, 2px); transition: color 0.2s ease; --simple-icon-width: var(--ddd-icon-xs, 16px); --simple-icon-height: var(--ddd-icon-xs, 16px); } .visibility-icon:hover { color: var(--ddd-theme-default-nittanyNavy, #001e44); } .external { text-align: center; width: 100%; margin-top: var(--ddd-spacing-4, 16px); } @media (max-width: 600px) { :host { padding: var(--ddd-spacing-4, 16px); } rpg-character { width: 80px; height: 80px; } button { font-size: var(--ddd-font-size-xs, 14px); padding: var(--ddd-spacing-2, 8px) var(--ddd-spacing-3, 12px); } } `, ]; } // eslint-disable-next-line class-methods-use-this checkUsername() { // eslint-disable-next-line prefer-destructuring const value = this.shadowRoot.querySelector("#username").value; this.hidePassword = false; this.errorMSG = ""; this.username = value; store.appEl.playSound("click2"); setTimeout(() => { this.shadowRoot.querySelector("input").focus(); }, 0); } // eslint-disable-next-line class-methods-use-this async checkPassword() { store.appEl.playSound("click2"); // eslint-disable-next-line prefer-destructuring const value = this.shadowRoot.querySelector("#password").value; // attempt login and wait for response from the jwt-login tag via // jwt-logged-in event @see _jwtLoggedIn globalThis.dispatchEvent( new CustomEvent("jwt-login-login", { composed: true, bubbles: true, cancelable: false, detail: { username: this.username, password: value, }, }), ); } // eslint-disable-next-line class-methods-use-this reset() { this.errorMSG = ""; this.username = ""; this.hasPass = false; this.hidePassword = true; } nameChange() { this.username = this.shadowRoot.querySelector("#username").value; } connectedCallback() { super.connectedCallback(); globalThis.addEventListener("jwt-logged-in", this._jwtLoggedIn.bind(this), { signal: this.windowControllers.signal, }); globalThis.addEventListener( "jwt-login-login-failed", this._jwtLoginFailed.bind(this), { signal: this.windowControllers.signal }, ); } disconnectedCallback() { this.windowControllers.abort(); super.disconnectedCallback(); } // implies that it failed to connect via the login credentials _jwtLoginFailed(e) { this.hidePassword = true; this.errorMSG = "Invalid Username or Password"; store.appEl.playSound("error"); } _jwtLoggedIn(e) { if (e.detail) { store.user = { name: this.username, }; store.appEl.playSound("success"); this.dispatchEvent( new CustomEvent("simple-modal-hide", { bubbles: true, composed: true, cancelable: true, detail: {}, }), ); store.toast(`Welcome ${this.username}! Let's go!`, 5000, { hat: "construction", }); // just to be safe store.appEl.reset(); } } passChange(e) { const value = this.shadowRoot.querySelector("#password").value; if (value) { this.hasPass = true; } else { this.hasPass = false; } } toggleViewPass(e) { const password = this.shadowRoot.querySelector("#password"); const type = password.getAttribute("type") === "password" ? "text" : "password"; password.setAttribute("type", type); e.target.icon = type === "text" ? "lrn:visible" : "lrn:view-off"; } handleKeyDown(e) { if (e.key === "Enter") { if (this.hidePassword) { this.checkUsername(); } else { this.checkPassword(); } } } render() { return html`

    ${this.errorMSG}

    ${this.hidePassword ? html`
    ` : html`
    Welcome back, ${this.username}! Not you?
    `}
    `; } } customElements.define(AppHaxSiteLogin.tag, AppHaxSiteLogin); ================================================ FILE: elements/app-hax/lib/v2/app-hax-steps.js ================================================ /* eslint-disable lit/attribute-value-entities */ /* eslint-disable lit/binding-positions */ /* eslint-disable import/no-unresolved */ /* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable class-methods-use-this */ import { html, css, unsafeCSS } from "lit"; import { SimpleColors } from "@haxtheweb/simple-colors/simple-colors.js"; import { autorun, toJS } from "mobx"; import { store } from "./AppHaxStore.js"; import { localStorageSet } from "@haxtheweb/utils/utils.js"; import "scrollable-component/index.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; import { MicroFrontendRegistry } from "@haxtheweb/micro-frontend-registry/micro-frontend-registry.js"; import { enableServices } from "@haxtheweb/micro-frontend-registry/lib/microServices.js"; import "./app-hax-site-button.js"; import "./app-hax-hat-progress.js"; import "./app-hax-button.js"; const homeIcon = new URL("../assets/images/Home.svg", import.meta.url).href; const disabledCircle = new URL( "../assets/images/DisabledCircle.svg", import.meta.url, ).href; const transparentCircle = new URL( "../assets/images/TransparentCircle.svg", import.meta.url, ).href; const enabledCircle = new URL( "../assets/images/EnabledCircle.svg", import.meta.url, ).href; const themeContext = { collection: ["collections-theme", "bootstrap-theme"], blog: ["haxor-slevin"], course: ["clean-one", "clean-two", "learn-two-theme"], website: ["polaris-flex-theme"], training: ["training-theme"], import: ["clean-one", "clean-two", "learn-two-theme"], }; export class AppHaxSteps extends SimpleColors { static get tag() { return "app-hax-steps"; } constructor() { super(); this.unlockComingSoon = false; this.unlockTerrible = false; this.windowControllers = new AbortController(); this.nameTyped = ""; this.stepRoutes = []; this._progressReady = false; this.step = null; this.loaded = false; this.themeNames = []; this.appSettings = {}; autorun(() => { this.appSettings = toJS(store.appSettings); const contextKey = toJS(store.site.structure); this.themeNames = Object.keys(this.appSettings.themes).filter( (value) => contextKey && themeContext[contextKey] && themeContext[contextKey].includes(value), ); }); autorun(() => { this.dark = toJS(store.darkMode); }); autorun(() => { localStorageSet("app-hax-step", toJS(store.step)); }); autorun(() => { localStorageSet("app-hax-site", toJS(store.site)); this.step = store.stepTest(this.step); }); autorun(() => { if (toJS(store.createSiteSteps) && toJS(store.location)) { this.step = store.stepTest(this.step); } }); // routes, but only the ones that have a step property autorun(() => { const routes = toJS(store.routes); this.stepRoutes = routes.filter((item) => item.step); }); } static get properties() { return { ...super.properties, step: { type: Number, reflect: true }, stepRoutes: { type: Array }, themeNames: { type: Array }, unlockComingSoon: { type: Boolean, reflect: true, attribute: "unlock-coming-soon", }, unlockTerrible: { type: Boolean, reflect: true, attribute: "unlock-terrible", }, loaded: { type: Boolean, reflect: true }, appSettings: { type: Object }, nameTyped: { type: String }, }; } // step 1 chooseStructure(e) { if (!e.target.comingSoon) { const { value } = e.target; store.site.structure = value; // @note for now, auto select type and theme if making a course // we might want to revisit this in the future if (value === "course") { store.site.type = "own"; store.site.theme = "clean-one"; } if (value === "blog") { store.site.type = "own"; store.site.theme = "haxor-slevin"; } if (value === "collection") { store.site.type = "own"; store.site.theme = "collections-theme"; } if (value === "website") { store.site.type = "own"; store.site.theme = "polaris-flex-theme"; } if (value === "training") { store.site.type = "own"; store.site.theme = "training-theme"; } store.appEl.playSound("click2"); } } // step 2 chooseType(e) { if (!e.target.comingSoon) { const { type } = e.target; store.site.type = type; store.appEl.playSound("click2"); } } // step 2, doc import async docxImport(e) { if (!e.target.comingSoon) { const { type } = e.target; import( "@haxtheweb/file-system-broker/lib/docx-file-system-broker.js" ).then(async (e) => { // enable core services enableServices(["haxcms"]); // get the broker for docx selection const broker = globalThis.FileSystemBroker.requestAvailability(); const file = await broker.loadFile("docx"); // tee up as a form for upload const formData = new FormData(); formData.append("method", "site"); // this is a site based importer formData.append("type", toJS(store.site.structure)); formData.append("upload", file); this.setProcessingVisual(); const response = await MicroFrontendRegistry.call( "@haxcms/docxToSite", formData, ); store.toast(`Processed!`, 300); // must be a valid response and have at least SOME html to bother attempting if ( response.status == 200 && response.data && response.data.contents != "" ) { store.items = response.data.items; if (response.data.files) { store.itemFiles = response.data.files; } // invoke a file broker for a docx file // send to the endpoint and wait // if it comes back with content, then we engineer details off of it this.nameTyped = response.data.filename .replace(".docx", "") .replace("outline", "") .replace(/\s/g, "") .replace(/-/g, "") .toLowerCase(); setTimeout(() => { this.shadowRoot.querySelector("#sitename").value = this.nameTyped; this.shadowRoot.querySelector("#sitename").select(); }, 800); store.site.type = type; store.site.theme = "clean-one"; store.appEl.playSound("click2"); } else { store.appEl.playSound("error"); store.toast(`File did not return valid HTML structure`); } }); } } // evolution import async evoImport(e) { if (!e.target.comingSoon) { const { type } = e.target; import("@haxtheweb/file-system-broker/file-system-broker.js").then( async (e) => { // enable core services enableServices(["haxcms"]); // get the broker for docx selection const broker = globalThis.FileSystemBroker.requestAvailability(); const file = await broker.loadFile("zip"); // tee up as a form for upload const formData = new FormData(); formData.append("method", "site"); // this is a site based importer formData.append("type", toJS(store.site.structure)); formData.append("upload", file); // local end point + stupid JWT thing this.setProcessingVisual(); const response = await MicroFrontendRegistry.call( "@haxcms/evolutionToSite", formData, null, null, "?jwt=" + toJS(store.AppHaxAPI.jwt), ); store.toast(`Processed!`, 300); // must be a valid response and have at least SOME html to bother attempting if ( response.status == 200 && response.data && response.data.contents != "" ) { store.items = response.data.items; // invoke a file broker for a docx file // send to the endpoint and wait // if it comes back with content, then we engineer details off of it this.nameTyped = response.data.filename .replace(".zip", "") .replace("outline", "") .replace(/\s/g, "") .replace(/-/g, "") .toLowerCase(); setTimeout(() => { this.shadowRoot.querySelector("#sitename").value = this.nameTyped; this.shadowRoot.querySelector("#sitename").select(); }, 800); store.site.type = type; store.site.theme = "clean-one"; store.appEl.playSound("click2"); } else { store.appEl.playSound("error"); store.toast(`File did not return valid HTML structure`); } }, ); } } // gitbook import endpoint async gbImport(e) { if (!e.target.comingSoon) { const { type } = e.target; let gbURL = globalThis.prompt("URL for the Gitbook repo"); enableServices(["haxcms"]); this.setProcessingVisual(); const response = await MicroFrontendRegistry.call( "@haxcms/gitbookToSite", { md: gbURL }, ); store.toast(`Processed!`, 300); // must be a valid response and have at least SOME html to bother attempting if ( response.status == 200 && response.data && response.data.contents != "" ) { store.items = response.data.items; if (response.data.files) { store.itemFiles = response.data.files; } // invoke a file broker for a docx file // send to the endpoint and wait // if it comes back with content, then we engineer details off of it this.nameTyped = response.data.filename .replace(/\s/g, "") .replace(/-/g, "") .toLowerCase(); setTimeout(() => { this.shadowRoot.querySelector("#sitename").value = this.nameTyped; this.shadowRoot.querySelector("#sitename").select(); }, 800); store.site.type = type; store.site.theme = "clean-one"; store.appEl.playSound("click2"); } else { store.appEl.playSound("error"); store.toast(`Repo did not return valid structure`); } } } async importFromURL(e) { const { type, prompt, callback, param } = e.target; if (!e.target.comingSoon) { let promptUrl = globalThis.prompt(prompt); enableServices(["haxcms"]); this.setProcessingVisual(); const params = {}; params[param] = promptUrl; const response = await MicroFrontendRegistry.call(callback, params); store.toast(`Processed!`, 300); // must be a valid response and have at least SOME html to bother attempting if ( response.status == 200 && response.data && response.data.contents != "" ) { store.items = response.data.items; if (response.data.files) { store.itemFiles = response.data.files; } // invoke a file broker for a docx file // send to the endpoint and wait // if it comes back with content, then we engineer details off of it this.nameTyped = response.data.filename .replace(/\s/g, "") .replace(/-/g, "") .toLowerCase(); setTimeout(() => { this.shadowRoot.querySelector("#sitename").value = this.nameTyped; this.shadowRoot.querySelector("#sitename").select(); }, 800); store.site.type = type; store.site.theme = "clean-one"; store.appEl.playSound("click2"); } else { store.appEl.playSound("error"); store.toast(`Repo did not return valid structure`); } } } // notion import endpoint async notionImport(e) { if (!e.target.comingSoon) { const { type } = e.target; let notionUrl = globalThis.prompt("URL for the Github Notion repo"); enableServices(["haxcms"]); this.setProcessingVisual(); const response = await MicroFrontendRegistry.call( "@haxcms/notionToSite", { repoUrl: notionUrl }, ); store.toast(`Processed!`, 300); // must be a valid response and have at least SOME html to bother attempting if ( response.status == 200 && response.data && response.data.contents != "" ) { store.items = response.data.items; if (response.data.files) { store.itemFiles = response.data.files; } // invoke a file broker for a docx file // send to the endpoint and wait // if it comes back with content, then we engineer details off of it this.nameTyped = response.data.filename .replace(/\s/g, "") .replace(/-/g, "") .toLowerCase(); setTimeout(() => { this.shadowRoot.querySelector("#sitename").value = this.nameTyped; this.shadowRoot.querySelector("#sitename").select(); }, 800); store.site.type = type; store.site.theme = "clean-one"; store.appEl.playSound("click2"); } else { store.appEl.playSound("error"); store.toast(`Repo did not return valid structure`); } } } // pressbooks import endpoint async pressbooksImport(e) { if (!e.target.comingSoon) { const { type } = e.target; import( "@haxtheweb/file-system-broker/lib/docx-file-system-broker.js" ).then(async (e) => { // enable core services enableServices(["haxcms"]); // get the broker for docx selection const broker = globalThis.FileSystemBroker.requestAvailability(); const file = await broker.loadFile("html"); // tee up as a form for upload const formData = new FormData(); formData.append("method", "site"); // this is a site based importer formData.append("type", toJS(store.site.structure)); formData.append("upload", file); this.setProcessingVisual(); const response = await MicroFrontendRegistry.call( "@haxcms/pressbooksToSite", formData, ); store.toast(`Processed!`, 300); // must be a valid response and have at least SOME html to bother attempting if ( response.status == 200 && response.data && response.data.contents != "" ) { store.items = response.data.items; if (response.data.files) { store.itemFiles = response.data.files; } // invoke a file broker for a html file // send to the endpoint and wait // if it comes back with content, then we engineer details off of it this.nameTyped = response.data.filename .replace(".html", "") .replace("outline", "") .replace(/\s/g, "") .replace(/-/g, "") .toLowerCase(); setTimeout(() => { this.shadowRoot.querySelector("#sitename").value = this.nameTyped; this.shadowRoot.querySelector("#sitename").select(); }, 800); store.site.type = type; store.site.theme = "clean-one"; store.appEl.playSound("click2"); } else { store.appEl.playSound("error"); store.toast(`File did not return valid HTML structure`); } }); } } // makes guy have hat on, shows it's doing something setProcessingVisual() { let loadingIcon = globalThis.document.createElement("simple-icon-lite"); loadingIcon.icon = "hax:loading"; loadingIcon.style.setProperty("--simple-icon-height", "40px"); loadingIcon.style.setProperty("--simple-icon-width", "40px"); loadingIcon.style.height = "150px"; loadingIcon.style.marginLeft = "8px"; store.toast(`Processing`, 60000, { hat: "construction", slot: loadingIcon, }); } // step 3 chooseTheme(e) { if (!e.target.comingSoon) { const { value } = e.target; store.site.theme = value; store.appEl.playSound("click2"); } } // step 4 chooseName() { if (this.nameTyped !== "") { const value = this.shadowRoot.querySelector("#sitename").value; store.site.name = value; store.appEl.playSound("click2"); } } progressReady(e) { if (e.detail) { this._progressReady = true; if (this.step === 5) { setTimeout(() => { this.shadowRoot.querySelector("app-hax-hat-progress").process(); }, 300); } } } updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { // set input field to whats in store if we have it if (this.step === 4 && propName === "step" && this.shadowRoot) { this.shadowRoot.querySelector("#sitename").value = toJS( store.site.name, ); } // progress if ( this.step === 5 && propName === "step" && this.shadowRoot && this._progressReady ) { setTimeout(() => { this.shadowRoot.querySelector("app-hax-hat-progress").process(); }, 600); } // update the store for step when it changes internal to our step flow if (propName === "step") { store.step = this.step; } if (propName === "unlockTerrible" && this[propName]) { Object.keys(themeContext).forEach((key) => { themeContext[key] = [ ...themeContext[key], "terrible-themes", "terrible-productionz-themes", "terrible-outlet-themes", "terrible-best-themes", "terrible-resume-themes", ]; }); const contextKey = toJS(store.site.structure); this.themeNames = Object.keys(this.appSettings.themes).filter( (value) => contextKey && themeContext[contextKey] && themeContext[contextKey].includes(value), ); } }); } connectedCallback() { super.connectedCallback(); globalThis.addEventListener("resize", this.maintainScroll.bind(this), { signal: this.windowControllers.signal, }); globalThis.addEventListener("popstate", this.popstateListener.bind(this), { signal: this.windowControllers.signal, }); } disconnectedCallback() { this.windowControllers.abort(); super.disconnectedCallback(); } // see if user navigates forward or backward while in app popstateListener(e) { // filter out vaadin link clicks which have a state signature if (e.type === "popstate" && e.state === null) { // a lot going on here, just to be safe try { // the delay allows clicking for step to change, process, and then testing it setTimeout(() => { const link = e.target.document.location.pathname.split("/").pop(); // other links we don't care about validating state if (link.includes("createSite")) { const step = parseInt(link.replace("createSite-step-", "")); if (step < store.stepTest(step)) { this.shadowRoot.querySelector("#link-step-" + step).click(); } else if (step > store.stepTest(step)) { store.toast(`Please select an option`); this.step = store.stepTest(step); // forces state by maintaining where we are this.shadowRoot.querySelector("#link-step-" + this.step).click(); } } }, 0); } catch (e) {} } } // account for resizing maintainScroll() { if (this.shadowRoot && this.step) { this.scrollToThing(`#step-${this.step}`, { behavior: "instant", block: "start", inline: "nearest", }); // account for an animated window drag... stupid. setTimeout(() => { this.scrollToThing(`#step-${this.step}`, { behavior: "instant", block: "start", inline: "nearest", }); }, 100); } } firstUpdated(changedProperties) { if (super.firstUpdated) { super.firstUpdated(changedProperties); } setTimeout(() => { // ensure paint issues not a factor for null step if (this.step === null) { this.step = 1; } this.scrollToThing(`#step-${this.step}`, { behavior: "instant", block: "start", inline: "nearest", }); }, 100); autorun(() => { // verify we are in the site creation process if (toJS(store.createSiteSteps) && toJS(store.appReady)) { const location = toJS(store.location); if (location.route && location.route.step && location.route.name) { // account for an animated window drag... stupid. setTimeout(() => { this.scrollToThing("#".concat(location.route.name), { behavior: "smooth", block: "start", inline: "nearest", }); /// just for step 4 since it has an input if (location.route.step === 4 && store.stepTest(4) === 4) { setTimeout(() => { this.shadowRoot.querySelector("#sitename").focus(); this.scrollToThing(`#step-4`, { behavior: "instant", block: "start", inline: "nearest", }); }, 800); } }, 300); // this delay helps w/ initial paint timing but also user perception // there's a desire to have a delay especialy when tapping things of // about 300ms } } }); autorun(() => { if ( this.shadowRoot && toJS(store.createSiteSteps) && toJS(store.appReady) ) { const activeItem = toJS(store.activeItem); if ( activeItem && activeItem.name && activeItem.step && !this.__overrideProgression ) { this.shadowRoot .querySelector("#link-".concat(activeItem.name)) .click(); } } }); } /** * Yet another reason Apple doesn't let us have nice things. * This detects the NONSTANDARD BS VERSION OF SCROLLINTOVIEW * and then ensures that it incorrectly calls to scroll into view * WITHOUT the wonderful params that ALL OTHER BROWSERS ACCEPT * AND MAKE OUR LIVES SO WONDERFUL TO SCROLL TO THINGS SMOOTHLY */ scrollToThing(sel, props) { const isSafari = globalThis.safari !== undefined; if ( this.shadowRoot.querySelector(".carousel-with-snapping-item.active-step") ) { this.shadowRoot .querySelector(".carousel-with-snapping-item.active-step") .classList.remove("active-step"); } if (isSafari) { this.shadowRoot.querySelector(sel).scrollIntoView(); } else { this.shadowRoot.querySelector(sel).scrollIntoView(props); } this.shadowRoot.querySelector(sel).classList.add("active-step"); } static get styles() { return [ super.styles, css` :host { display: block; } scrollable-component { --scrollbar-width: 0px; --scrollbar-height: 0px; --scrollbar-padding: 0; --viewport-overflow-x: hidden; overflow: hidden; } #grid-container { display: grid; grid-template-columns: 160px 160px 160px; background: transparent; } .carousel-with-snapping-track { display: grid; grid-auto-flow: column; grid-gap: 30px; } .carousel-with-snapping-item { display: flex; flex-direction: column; align-items: center; justify-content: normal; scroll-snap-align: center; scroll-snap-stop: always; scrollbar-gutter: stable; width: var(--viewport-width); font-size: 1.5rem; text-align: center; overflow-x: hidden; max-height: 60vh; padding-top: 1vh; } #step-links { padding: 0; margin: 0; } ul, li { list-style: none; } li { vertical-align: middle; display: inline-flex; margin: 5px; } li.step { border-radius: 50%; background-color: transparent; } li a { font-size: 12px; color: var(--simple-colors-default-theme-grey-12, white); text-decoration: none; padding: 5px; width: 20px; height: 20px; line-height: 20px; margin: 0; display: block; border: 0; border-radius: 50%; background-repeat: no-repeat; background-size: 30px 30px; background-color: var(--simple-colors-default-theme-grey-1, white); background-image: url("${unsafeCSS(enabledCircle)}"); transition: 0.3s ease-in-out background, 0.3s ease-in-out color; transition-delay: 0.6s, 0.3s; } li a[disabled] { background-image: url("${unsafeCSS(disabledCircle)}"); pointer-events: none; color: var(--simple-colors-default-theme-grey-7, grey); user-select: none; } li[disabled] { background-color: grey; } li.active-step a { background-color: orange; background-image: url("${unsafeCSS(transparentCircle)}"); } app-hax-button { padding: 10px 0px 10px 0px; background: transparent; } #theme-container { display: flex; flex-direction: row; align-items: center; justify-content: center; } img { pointer-events: none; } #themeContainer { width: 70vw; height: 55vh; } .theme-button { background-color: transparent; color: var(--simple-colors-default-theme-grey-12, white); border: none; margin: 8px; padding: 8px; width: 245px; } .theme-button div { font-size: 14px; margin-top: 12px; } .theme-button:focus, .theme-button:hover { outline: 4px solid var(--app-hax-accent-color, var(--accent-color)); outline-offset: 4px; background-color: transparent; border: none; cursor: pointer; } #sitename { font-size: 32px; padding: 8px; width: 40vw; } #homebtn { --simple-icon-height: 30px; --simple-icon-width: 30px; border-radius: 50%; cursor: pointer; background-color: var(--simple-colors-default-theme-grey-1, white); } .homelnk { background-image: none; display: flex; padding: 0; margin: 0; height: 30px; width: 30px; } app-hax-site-button { justify-content: center; --app-hax-site-button-width: 35vw; --app-hax-site-button-min-width: 240px; } app-hax-hat-progress { height: 400px; width: 400px; display: block; } @media (max-width: 800px) { .theme-button { width: unset; padding: 0; } .theme-button div { font-size: 12px; margin-top: 8px; } .theme-button img { height: 70px; } app-hax-site-button { width: 320px; max-width: 60vw; --app-hax-site-button-font-size: 2.5vw; } #sitename { width: 70vw; font-size: 20px; } #grid-container { grid-template-columns: 120px 120px 120px; } } @media (max-height: 600px) { .carousel-with-snapping-item { padding-top: 4px; max-height: 57vh; } #sitename { width: 40vw; font-size: 14px; } app-hax-hat-progress { transform: scale(0.5); margin-top: -18vh; } } @media (max-width: 500px) { app-hax-hat-progress { transform: scale(0.5); margin-top: -15vh; } } @media (max-height: 400px) { .carousel-with-snapping-item { padding-top: 4px; max-height: 40vh; } app-hax-hat-progress { transform: scale(0.3); } .carousel-with-snapping-item.active-step app-hax-hat-progress { position: fixed; top: 20%; left: 20%; } } `, ]; } progressFinished(e) { if (e.detail) { this.loaded = true; store.appEl.playSound("success"); // focus the button for going to the site e.target.shadowRoot.querySelector(".game").focus(); this.scrollToThing(`#step-${this.step}`, { behavior: "instant", block: "start", inline: "nearest", }); } } typeKey() { this.nameTyped = this.shadowRoot.querySelector("#sitename").value; } keydown(e) { // some trapping for common characters that make us sad if ( [ " ", "/", "\\", "&", "#", "?", "+", "=", "{", "}", "|", "^", "~", "[", "]", "`", '"', "'", ].includes(e.key) ) { store.appEl.playSound("error"); store.toast(`"${e.key}" is not allowed. Use - or _`); e.preventDefault(); } else if (e.key === "Enter") { this.chooseName(); } else if ( ["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"].includes(e.key) ) { // do nothing, directional keys for modifying word } else { store.appEl.playSound("click"); } } stepLinkClick(e) { const clickedStep = parseInt(e.target.getAttribute("data-step"), 10); if (this.step < clickedStep) { e.preventDefault(); } else if (e.target.getAttribute("data-step") === null) { store.createSiteSteps = false; store.appMode = "home"; this.nameTyped = ""; store.siteReady = false; store.site.structure = null; store.site.type = null; store.site.theme = null; store.site.name = null; } // means user went backwards else if (this.step > clickedStep) { this.nameTyped = ""; store.siteReady = false; if (clickedStep === 1) { store.site.structure = null; store.site.type = null; store.site.theme = null; store.site.name = null; } else if (clickedStep === 2) { store.site.type = null; store.site.theme = null; store.site.name = null; } else if (clickedStep === 3) { store.site.theme = null; store.site.name = null; } else if (clickedStep === 4) { store.site.name = null; } this.step = clickedStep; } } renderTypes(step) { const structure = toJS(store.site.structure); var template = html``; switch (structure) { case "collection": template = html` `; break; default: case "course": template = html` `; break; case "website": template = html` `; break; case "training": template = html` `; break; case "blog": template = html` `; break; case "import": template = html` `; break; } return template; } render() { return html`
    `; } } customElements.define(AppHaxSteps.tag, AppHaxSteps); ================================================ FILE: elements/app-hax/lib/v2/app-hax-toast.js ================================================ import { autorun, toJS } from "mobx"; import { css } from "lit"; import { store } from "./AppHaxStore.js"; import { RPGCharacterToast } from "@haxtheweb/haxcms-elements/lib/core/ui/rpg-character-toast/rpg-character-toast.js"; export class AppHaxToast extends RPGCharacterToast { static get tag() { return "app-hax-toast"; } static get styles() { return [ super.styles, css` :host { --simple-toast-top: var( --app-hax-toast-top, calc( var(--top-bar-height, var(--ddd-spacing-16, 64px)) ) ); --app-hax-toast-user-menu-offset: 0; --simple-toast-right: var( --app-hax-toast-right, var(--app-hax-toast-user-menu-offset) ); --simple-toast-bottom: auto; --simple-toast-slide-offset-y: calc(var(--ddd-spacing-8, 32px) * -1); --simple-toast-z-index: 100000001; top: var(--simple-toast-top); right: var(--simple-toast-right); left: auto; bottom: auto; height: auto; width: min( 520px, calc(100vw - var(--simple-toast-right) - var(--ddd-spacing-3, 12px)) ); min-width: min( 320px, calc(100vw - var(--simple-toast-right) - var(--ddd-spacing-3, 12px)) ); font-family: var(--ddd-font-primary, sans-serif); color: var(--ddd-theme-default-coalyGray, #222); background-color: light-dark( var(--ddd-theme-default-white, white), var(--ddd-theme-default-coalyGray, #222) ); border-radius: var(--ddd-radius-md, 8px); border-top-left-radius: 0; border-top-right-radius: 0; box-shadow: var(--ddd-boxShadow-sm); padding: var(--ddd-spacing-1, 4px); } rpg-character::part(rpg-character-item) { width: 100%; height: 100%; } :host([dark-mode]) { color: var(--ddd-theme-default-white, white); background-color: var(--ddd-theme-default-coalyGray, #222); } .bubble { height: auto; } .bubble-wrapper { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dismiss message avatar" "actions actions actions"; column-gap: var(--ddd-spacing-2, 8px); row-gap: var(--ddd-spacing-1, 4px); align-items: start; min-width: 0; width: 100%; } .leftedge, .rightedge { display: none; } .mid { grid-area: message; min-width: 0; line-height: normal; padding: var(--ddd-spacing-3, 12px); background-image: none; border: var(--ddd-border-xs, 1px solid); border-color: var(--ddd-theme-default-limestoneGray, #d9d9d9); border-radius: var(--ddd-radius-md, 8px); box-shadow: var(--ddd-boxShadow-sm); background-color: var(--ddd-theme-default-white, white); } :host([dark-mode]) .mid { border-color: var(--ddd-theme-default-slateGray, #666); background-color: var(--ddd-theme-default-coalyGray, #222); box-shadow: none; } .message { margin: 0; height: auto; line-height: 1.45; font-size: var(--ddd-font-size-3xs, 12px); text-align: left; color: inherit; } rpg-character, .merlin, .awaiting-input { grid-area: avatar; align-self: end; margin: 0; } rpg-character, .merlin { --app-hax-toast-avatar-size: var(--ddd-icon-l, 48px); width: var(--app-hax-toast-avatar-size); height: var(--app-hax-toast-avatar-size); padding: 0; overflow: hidden; border: var(--ddd-border-xs, 1px solid); border-color: var(--ddd-theme-default-limestoneGray, #d9d9d9); border-radius: var(--ddd-radius-sm, 4px); background-color: var(--ddd-theme-default-white, white); box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; } :host([dark-mode]) rpg-character, :host([dark-mode]) .merlin { border-color: var(--ddd-theme-default-slateGray, #666); background-color: var(--ddd-theme-default-coalyGray, #222); } .awaiting-input { --app-hax-toast-avatar-size: var(--ddd-icon-l, 48px); --simple-icon-height: var(--app-hax-toast-avatar-size); --simple-icon-width: var(--app-hax-toast-avatar-size); width: var(--app-hax-toast-avatar-size); height: var(--app-hax-toast-avatar-size); padding: var(--ddd-spacing-1, 4px); border-radius: var(--ddd-radius-sm, 4px); background-color: var(--ddd-theme-default-limestoneGray, #f5f5f5); color: var(--ddd-theme-default-wonderPurple, #9933cc); } :host([dark-mode]) .awaiting-input { background-color: var(--ddd-theme-default-slateGray, #666); color: var(--ddd-theme-default-white, white); } .dismiss-wrap { grid-area: dismiss; align-self: start; justify-self: start; } .buttons { grid-area: actions; display: flex; justify-content: flex-end; align-items: center; line-height: normal; font-size: var(--ddd-font-size-4xs, 10px); height: auto; margin: 0; } .dismiss { margin: 0; color: inherit; background-color: transparent; --simple-icon-height: var(--ddd-icon-xs, 20px); --simple-icon-width: var(--ddd-icon-xs, 20px); --simple-icon-button-padding: var(--ddd-spacing-1, 4px); --simple-icon-button-border: var(--ddd-border-xs, 1px solid); --simple-icon-button-border-radius: var(--ddd-radius-sm, 4px); --simple-icon-button-background-color: transparent; --simple-icon-button-focus-background-color: var( --ddd-theme-default-limestoneGray, #f5f5f5 ); --simple-icon-button-focus-opacity: 1; } .dismiss::part(button) { border-color: currentColor; background-color: transparent; } :host([dark-mode]) .dismiss { --simple-icon-button-focus-background-color: var( --ddd-theme-default-slateGray, #666 ); } .progress { border: none; height: var(--ddd-spacing-1, 4px); margin: 0 0 var(--ddd-spacing-1, 4px) 0; border-radius: var(--ddd-radius-xs, 2px); overflow: hidden; background-color: var(--ddd-theme-default-limestoneGray, #f5f5f5); } :host([dark-mode]) .progress { background-color: var(--ddd-theme-default-slateGray, #666); } .progress .progress__bar { background-color: var(--ddd-theme-default-keystoneYellow, #ffd100); } `, ]; } constructor() { super(); this.windowControllers = new AbortController(); this.characterHeight = 48; this.characterWidth = 48; autorun(() => { this.userName = toJS(store.user.name); }); autorun(() => { this.darkMode = toJS(store.darkMode); }); } connectedCallback() { super.connectedCallback(); globalThis.addEventListener( "haxcms-toast-hide", this.hideSimpleToast.bind(this), { signal: this.windowControllers.signal }, ); globalThis.addEventListener( "haxcms-toast-show", this.showSimpleToast.bind(this), { signal: this.windowControllers.signal }, ); } hideSimpleToast(e) { this.hide(); } /** * life cycle, element is removed from the DOM */ disconnectedCallback() { this.windowControllers.abort(); super.disconnectedCallback(); } } customElements.define(AppHaxToast.tag, AppHaxToast); globalThis.AppHaxToast = globalThis.AppHaxToast || {}; globalThis.AppHaxToast.requestAvailability = () => { if (!globalThis.AppHaxToast.instance) { globalThis.AppHaxToast.instance = globalThis.document.createElement( AppHaxToast.tag, ); globalThis.document.body.appendChild(globalThis.AppHaxToast.instance); } return globalThis.AppHaxToast.instance; }; export const AppHaxToastInstance = globalThis.AppHaxToast.requestAvailability(); ================================================ FILE: elements/app-hax/lib/v2/app-hax-use-case-filter.js ================================================ /* eslint-disable no-return-assign */ import { LitElement, html, css } from "lit"; import "@haxtheweb/simple-tooltip/simple-tooltip.js"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; import "@haxtheweb/hax-iconset/lib/simple-hax-iconset.js"; import { store } from "./AppHaxStore.js"; import "./app-hax-use-case.js"; import "./app-hax-search-results.js"; import "./app-hax-filter-tag.js"; import "./app-hax-scroll-button.js"; import "./app-hax-site-creation-modal.js"; export class AppHaxUseCaseFilter extends LitElement { static get tag() { return "app-hax-use-case-filter"; } constructor() { super(); this.windowControllers = new AbortController(); this.searchTerm = ""; this.disabled = false; this.showSearch = false; this.items = []; this.filteredItems = []; this.filteredSites = []; this.activeFilters = []; this.filters = []; this.searchQuery = ""; this.demoLink = ""; this.errorMessage = ""; this.loading = false; this.selectedCardIndex = null; this.returningSites = []; this.allFilters = new Set(); this.dark = false; this.isMobile = false; this.isLoggedIn = false; this.sortMenuOpen = false; // Default to sorting sites by most recently updated this.sortOption = "newest"; // Advanced template visibility (controlled via Merlin programs) this.showTerrible = false; this.showHidden = false; // URL-driven flow: allow deep-linking into a specific template / use-case // Example: ?use-case=course-template this.__useCaseParamHandled = false; this.__useCaseParamHandling = false; // Listen to store changes for dark mode and manifest updates if (typeof store !== "undefined") { import("mobx").then(({ autorun, toJS }) => { autorun(() => { this.dark = toJS(store.darkMode); }); autorun(() => { this.isMobile = toJS(store.isMobile); }); // Watch for appReady AND login state to trigger skeleton loading let hasLoaded = false; autorun(() => { const appReady = toJS(store.appReady); const loggedIn = toJS(store.isLoggedIn); this.isLoggedIn = loggedIn; // Track advanced template visibility flags from the store this.showTerrible = toJS(store.showTerribleTemplates); this.showHidden = toJS(store.showHiddenTemplates); // Trigger skeleton/theme loading when both app is ready and user is logged in // Only load once per session if (appReady && loggedIn && !hasLoaded) { hasLoaded = true; this.updateSkeletonResults(); this.updateSiteResults(); } }); // Rebuild skeleton/theme listing when toggles change let lastShowTerrible = null; let lastShowHidden = null; autorun(() => { const appReady = toJS(store.appReady); const loggedIn = toJS(store.isLoggedIn); const showTerrible = toJS(store.showTerribleTemplates); const showHidden = toJS(store.showHiddenTemplates); if ( lastShowTerrible === null && lastShowHidden === null ) { lastShowTerrible = showTerrible; lastShowHidden = showHidden; return; } if ( appReady && loggedIn && (showTerrible !== lastShowTerrible || showHidden !== lastShowHidden) ) { lastShowTerrible = showTerrible; lastShowHidden = showHidden; this.updateSkeletonResults(); // maintain filters list by re-appending site tags after rebuild this.updateSiteResults(); } }); // Watch for manifest changes and update site results autorun(() => { const manifest = toJS(store.manifest); if (manifest && manifest.items && manifest.items.length > 0) { this.updateSiteResults(); } }); }); } } static get properties() { return { searchTerm: { type: String }, showSearch: { type: Boolean, reflect: true, attribute: "show-search" }, showFilter: { type: Boolean, reflect: true, attribute: "show-filter" }, disabled: { type: Boolean, reflect: true }, items: { type: Array }, filteredItems: { type: Array }, filteredSites: { type: Array }, activeFilters: { type: Array }, filters: { type: Array }, searchQuery: { type: String }, demoLink: { type: String }, errorMessage: { type: String }, loading: { type: Boolean }, selectedCardIndex: { type: Number }, returningSites: { type: Array }, allFilters: { attribute: false }, dark: { type: Boolean, reflect: true }, isMobile: { type: Boolean, attribute: false }, isLoggedIn: { type: Boolean }, sortOption: { type: String, attribute: "sort-option" }, sortMenuOpen: { type: Boolean }, showTerrible: { type: Boolean, attribute: false }, showHidden: { type: Boolean, attribute: false }, }; } static get styles() { return [ css` :root { --page-column-width: 800px; } :host { overflow: hidden; display: block; max-width: 100%; font-family: var(--ddd-font-primary, sans-serif); margin-top: 2px; } :host([dark]) { --accent-color: var(--ddd-theme-default-white, white); } :host([light]) { --accent-color: var(--ddd-theme-default-nittanyNavy, #001e44); } .contentSection { width: 100%; margin: 0; padding: 0; box-sizing: border-box; } .quick-create { padding: var(--ddd-spacing-5, 20px) var(--ddd-spacing-5, 20px) var(--ddd-spacing-4, 16px); background-color: var(--ddd-theme-default-limestoneLight); color: var(--ddd-theme-default-nittanyNavy, #001e44); } :host([dark]) .quick-create, body.dark-mode .quick-create { background-color: var(--ddd-theme-default-nittanyNavy, #001e44); color: var(--accent-color); } .quick-create h2 { color: inherit; margin: 0 0 var(--ddd-spacing-4, 16px) 0; } .quick-create-grid { display: flex; justify-content: center; gap: var(--ddd-spacing-4, 16px); overflow-x: auto; overflow-y: hidden; padding-bottom: var(--ddd-spacing-2, 8px); scrollbar-width: thin; scroll-snap-type: x mandatory; } .quick-create-grid > div { flex: 0 0 auto; scroll-snap-align: start; } .quick-create-grid app-hax-use-case { flex: 0 0 auto; } .template-group { width: 100%; box-sizing: border-box; } .template-group-heading { font-family: var(--ddd-font-primary, sans-serif); color: var(--accent-color); margin: 0 0 var(--ddd-spacing-4, 16px) var(--ddd-spacing-7, 28px); text-decoration: underline; text-decoration-thickness: var(--ddd-border-size-xs, 1px); text-underline-offset: var(--ddd-spacing-1, 4px); } .template-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 0fr)); gap: var(--ddd-spacing-4, 16px); justify-content: flex-start; justify-items: center; padding: 0 var(--ddd-spacing-5, 20px); box-sizing: border-box; } #returnToSection { padding-left: var(--ddd-spacing-6, 24px); padding-right: var(--ddd-spacing-6, 24px); } #returnToSection app-hax-search-results { box-sizing: border-box; } #startJourneySection { padding-left: var(--ddd-spacing-6, 24px); padding-right: var(--ddd-spacing-6, 24px); } .decorative-line { border-bottom: 4px solid var(--ddd-theme-default-skyBlue); box-sizing: border-box; width: 100%; margin: 0 0 var(--ddd-spacing-3, 12px) 0; } #from-template-heading { margin-top: var(--ddd-spacing-5, 20px); } :host(:not([show-filter])) app-hax-search-results { width: 100%; } h2, .returnTo h2, .startNew h2 { font-family: var(--ddd-font-primary, sans-serif); font-size: var(--ddd-font-size-m); color: var(--accent-color); margin: 0 0 var(--ddd-spacing-4, 16px) 0; } .startNew, .returnTo { position: relative; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; } .upper-filter { position: relative; display: inline-block; flex: 1; min-width: 200px; width: 60%; } input[type="text"] { width: 100%; padding: var(--ddd-spacing-3, 12px) var(--ddd-spacing-3, 12px) var(--ddd-spacing-3, 12px) var(--ddd-spacing-3, 12px); font-size: var(--ddd-font-size-xs, 12px); border-radius: 12px; border: var(--ddd-border-s, 2px solid); border-color: var(--ddd-theme-default-limestoneGray); background: var(--ddd-theme-default-limestoneLight); color: var(--ddd-theme-default-coalyGray, #222); transition: all 0.2s ease; box-sizing: border-box; font-family: var(--ddd-font-primary, sans-serif); margin: 0; min-height: var(--ddd-spacing-12, 48px); } :host([dark]) input[type="text"], body.dark-mode input[type="text"] { background: var(--ddd-theme-default-coalyGray, #333); color: var(--ddd-theme-default-white, white); border-color: var(--ddd-theme-default-slateGray, #666); } input[type="text"]:focus { border: var(--ddd-border-md, 2px solid); border-color: var(--ddd-theme-default-accent); outline: none; } :host([dark]) input[type="text"]:focus, body.dark-mode input[type="text"]:focus { background: var(--ddd-theme-default-coalyGray, #333); border-color: var(--ddd-theme-default-accent); } .search-icon { position: absolute; right: var(--ddd-spacing-3, 12px); top: 50%; transform: translateY(-50%); font-size: var(--ddd-font-size-xs, 14px); color: var(--ddd-theme-default-nittanyNavy, #001e44); pointer-events: none; z-index: 1; --simple-icon-width: 25px; --simple-icon-height: 25px; } :host([dark]) .search-icon, body.dark-mode .search-icon { color: var(--ddd-theme-default-white, white); } .filter { margin: var(--ddd-spacing-4, 16px) auto; width: 100%; max-width: 700px; box-sizing: border-box; font-family: var(--ddd-font-primary, sans-serif); transition: box-shadow 0.2s ease; padding-left: var(--ddd-spacing-5, 20px); padding-right: var(--ddd-spacing-5, 20px); display: flex; flex-wrap: wrap; gap: var(--ddd-spacing-3, 12px); align-items: center; } .contentSection > div:has(.filter) { display: flex; justify-content: center; } input[type="checkbox"] { display: none; } .sort-control { margin-top: var(--ddd-spacing-2, 8px); margin-bottom: var(--ddd-spacing-3, 12px); display: flex; align-items: center; gap: var(--ddd-spacing-1, 4px); position: relative; } .sort-button { color: var(--ddd-theme-default-nittanyNavy, #001e44); background: transparent; border: none; box-shadow: none; padding: var(--ddd-spacing-2, 8px); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; outline: none; min-height: var(--ddd-spacing-7, 28px); min-width: var(--ddd-spacing-7, 28px); --simple-icon-width: 40px; --simple-icon-height: 40px; } :host([dark]) .sort-button, body.dark-mode .sort-button { color: var(--ddd-theme-default-white, white); } :host([dark]) .sort-button:hover, body.dark-mode .sort-button:hover { color: var(--ddd-theme-default-limestoneGray); } .sort-button:hover, body.dark-mode .sort-button:hover{ color: var(--ddd-theme-default-accent); } .sort-menu { position: absolute; top: 100%; left: 0; margin-top: var(--ddd-spacing-1, 4px); background: var(--ddd-theme-default-limestoneLight); border: var(--ddd-border-xs, 1px solid) var(--ddd-theme-default-limestoneLight); border-radius: var(--ddd-radius-sm, 4px); box-shadow: var(--ddd-boxShadow-md); min-width: 200px; z-index: 1000; } .sort-menu-item { display: block; width: 100%; padding: var(--ddd-spacing-2, 8px) var(--ddd-spacing-3, 12px); background: none; border: none; text-align: left; cursor: pointer; font-family: var(--ddd-font-primary, sans-serif); font-size: var(--ddd-font-size-3xs, 11px); color: var(--ddd-theme-default-coalyGray, #222); transition: all 0.2s ease; } .sort-menu-item:hover { background: var(--ddd-theme-default-limestoneGray, #f5f5f5); } .sort-menu-item:focus { outline: var(--ddd-border-md, 2px solid) var(--ddd-theme-default-keystoneYellow, #ffd100); outline-offset: -2px; } :host([dark]) .sort-menu-item, body.dark-mode .sort-menu-item { color: var(--ddd-theme-default-black); } :host([dark]) .sort-menu-item:hover, body.dark-mode .sort-menu-item:hover { background: var(--ddd-theme-default-limestoneGray); } .sort-select { width: 100%; padding: var(--ddd-spacing-1, 4px) var(--ddd-spacing-2, 8px); font-size: var(--ddd-font-size-3xs, 11px); border-radius: var(--ddd-radius-sm, 4px); border: var(--ddd-border-xs, 1px solid) var(--ddd-theme-default-slateGray, #666); background: var(--ddd-theme-default-white, white); color: var(--ddd-theme-default-coalyGray, #222); font-family: var(--ddd-font-primary, sans-serif); box-sizing: border-box; } :host([dark]) .sort-select, body.dark-mode .sort-select { background: var(--ddd-theme-default-coalyGray, #333); color: var(--ddd-theme-default-white, white); border-color: var(--ddd-theme-default-slateGray, #666); } .sort-select:focus { outline: var(--ddd-border-md, 2px solid) var(--ddd-theme-default-keystoneYellow, #ffd100); outline-offset: var(--ddd-spacing-1, 2px); } .reset-button { margin-top: var(--ddd-spacing-1, 4px); background: var(--ddd-theme-default-original87Pink, #e4007c); border: var(--ddd-border-xs, 1px solid) transparent; color: var(--ddd-theme-default-white, white); border-radius: var(--ddd-radius-sm, 4px); font-size: var(--ddd-font-size-3xs, 11px); font-family: var(--ddd-font-primary, sans-serif); font-weight: var(--ddd-font-weight-medium, 500); padding: var(--ddd-spacing-2, 8px) var(--ddd-spacing-3, 12px); display: flex; align-items: center; justify-content: center; gap: var(--ddd-spacing-1, 4px); box-shadow: var(--ddd-boxShadow-sm); cursor: pointer; transition: all 0.2s ease; min-height: var(--ddd-spacing-7, 28px); } .reset-button:hover, .reset-button:focus { background: var(--ddd-theme-default-beaver70, #c85c2c); transform: translateY(-1px); } .reset-button:focus { outline: var(--ddd-border-md, 2px solid) var(--ddd-theme-default-keystoneYellow, #ffd100); outline-offset: var(--ddd-spacing-1, 2px); } :host([dark]) .reset-button, body.dark-mode .reset-button { background: var(--ddd-theme-default-beaver70, #c85c2c); } :host([dark]) .reset-button:hover, :host([dark]) .reset-button:focus, body.dark-mode .reset-button:hover, body.dark-mode .reset-button:focus { background: var(--ddd-theme-default-original87Pink, #e4007c); } .collapseFilter { display: none; } /* Visually hidden content for screen readers */ .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } /* Loading and fallback messages */ .loading-message, .no-results { grid-column: 1 / -1; text-align: center; padding: var(--ddd-spacing-8, 32px); font-size: var(--ddd-font-size-s, 16px); color: var(--ddd-theme-default-slateGray, #666); font-family: var(--ddd-font-primary, sans-serif); } :host([dark]) .loading-message, :host([dark]) .no-results, body.dark-mode .loading-message, body.dark-mode .no-results { color: var(--ddd-theme-default-limestoneGray, #ccc); } .fallback-message { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: var(--ddd-spacing-4, 16px); } .fallback-message .no-results { padding: var(--ddd-spacing-4, 16px) 0; } .fallback-message app-hax-use-case { max-width: 300px; } @media (max-width: 780px) { .contentSection { display: block; } :host([show-filter]) .filter { display: flex; width: 250px; max-width: 20vw; } :host .collapseFilter { display: flex; } h4, .returnTo h4, .startNew h4 { font-size: var(--ddd-font-size-m, 20px); } } @media (max-width: 600px) { .contentSection { display: block; } :host .collapseFilter { display: flex; } h4, .returnTo h4, .startNew h4 { font-size: var(--ddd-font-size-s, 18px); } .template-group-heading { margin-left: var(--ddd-spacing-3, 12px); } .template-results { grid-template-columns: repeat( auto-fit, minmax(clamp(120px, 30vw, 144px), 1fr) ); gap: var(--ddd-spacing-2, 8px); padding: 0 var(--ddd-spacing-3, 12px); } } @media (max-width: 480px) { h4, .returnTo h4, .startNew h4 { font-size: var(--ddd-font-size-s, 16px); margin: 0 0 var(--ddd-spacing-3, 12px) 0; } .template-results { grid-template-columns: repeat(2, minmax(0, 1fr)); } #returnToSection app-hax-search-results { min-width: 100%; } } .no-results { font-size: var(--ddd-font-size-s, 16px); color: light-dark( var(--ddd-theme-default-coalyGray, #222), var(--ddd-theme-default-white, white) ); } `, ]; } _getUseCaseParamFromUrl() { try { const url = new URL(globalThis.location.href) const useCase = url.searchParams.get('use-case') if (useCase) { return useCase } const useCaseAlt = url.searchParams.get('use_case') if (useCaseAlt) { return useCaseAlt } const useCaseAlt2 = url.searchParams.get('useCase') if (useCaseAlt2) { return useCaseAlt2 } } catch (e) { // do nothing } return '' } _updateUrlQueryParam(param, value) { if (!param || typeof param !== 'string') { return } try { const url = new URL(globalThis.location.href) if (value === null || typeof value === 'undefined' || value === '') { url.searchParams.delete(param) } else { url.searchParams.set(param, value) } globalThis.history.replaceState( globalThis.history.state, '', `${url.pathname}${url.search}${url.hash}`, ) } catch (e) { // do nothing } } _getUseCaseMachineNameForTemplate(template) { if (!template) { return '' } const candidates = this._getTemplateMachineNameCandidates(template) if (candidates && candidates.length > 0) { return candidates[0] } return '' } _normalizeUseCaseMachineName(raw) { if (!raw || typeof raw !== 'string') { return '' } let name = raw.trim().toLowerCase() // If it's a path/URL-ish string, take the last segment if (name.indexOf('/') !== -1) { name = name.split('/').pop() } // Strip query/hash if present if (name.indexOf('?') !== -1) { name = name.split('?').shift() } if (name.indexOf('#') !== -1) { name = name.split('#').shift() } // Remove file extension (e.g. .json) name = name.replace(/\.[^/.]+$/, '') // Normalize separators + strip non-url-safe chars name = name.replace(/[\s_]+/g, '-') name = name.replace(/[^a-z0-9-]/g, '-') name = name.replace(/-+/g, '-') name = name.replace(/^-+/, '').replace(/-+$/, '') return name } _looseNormalizeUseCaseMachineName(raw) { let name = this._normalizeUseCaseMachineName(raw) if (!name) { return '' } // Many templates wind up with an extra "-site-" segment in their machine names. // Strip that segment so that (course-template) can match (course-site-template). name = name.replace(/-site-/g, '-') if (name.indexOf('-site') !== -1 && name.lastIndexOf('-site') === name.length - 5) { name = name.replace(/-site$/, '') } name = name.replace(/-+/g, '-') name = name.replace(/^-+/, '').replace(/-+$/, '') return name } _deriveTemplateMachineName(primary, fallbackTitle = '') { const derived = this._normalizeUseCaseMachineName(primary) if (derived) { return derived } return this._normalizeUseCaseMachineName(fallbackTitle) } _getTemplateMachineNameCandidates(template) { const candidates = [] if (!template) { return candidates } if (template.machineName) { candidates.push(template.machineName) } if (template.skeletonUrl) { candidates.push(template.skeletonUrl) } if (template.importType) { candidates.push('import-' + template.importType) candidates.push(template.importType) } if (template.themeElement) { candidates.push(template.themeElement) } if (template.originalData && template.originalData.element) { candidates.push(template.originalData.element) } if (template.useCaseTitle) { candidates.push(template.useCaseTitle) } const normalized = candidates .map((c) => this._normalizeUseCaseMachineName(c)) .filter((c) => c) return [...new Set(normalized)] } _matchesUseCaseParam(template, rawParam) { const target = this._normalizeUseCaseMachineName(rawParam) const targetLoose = this._looseNormalizeUseCaseMachineName(rawParam) if (!target) { return false } const candidates = this._getTemplateMachineNameCandidates(template) for (let i = 0; i < candidates.length; i++) { const cand = candidates[i] if (cand === target) { return true } const candLoose = this._looseNormalizeUseCaseMachineName(cand) if (candLoose && candLoose === targetLoose) { return true } } return false } _scrollUseCaseIndexIntoView(index) { if (typeof index !== 'number' || index < 0) { return } const el = this.shadowRoot && this.shadowRoot.querySelector( `app-hax-use-case[data-item-index="${index}"]`, ) if (el && typeof el.scrollIntoView === 'function') { try { el.scrollIntoView({ behavior: 'smooth', block: 'center' }) } catch (e) { el.scrollIntoView() } } } _findTemplateByUseCaseParam(rawParam) { const list = Array.isArray(this.__allItems) && this.__allItems.length > 0 ? this.__allItems : this.items; if (!rawParam || !Array.isArray(list) || list.length === 0) { return null } const target = this._normalizeUseCaseMachineName(rawParam) const targetLoose = this._looseNormalizeUseCaseMachineName(rawParam) // Pass 1: exact match for (let i = 0; i < list.length; i++) { const item = list[i] const candidates = this._getTemplateMachineNameCandidates(item) if (candidates.indexOf(target) !== -1) { return item } } // Pass 2: loose match for (let i = 0; i < list.length; i++) { const item = list[i] const candidates = this._getTemplateMachineNameCandidates(item) for (let j = 0; j < candidates.length; j++) { const candLoose = this._looseNormalizeUseCaseMachineName(candidates[j]) if (candLoose && candLoose === targetLoose) { return item } } } return null } async _maybeAutoOpenUseCaseFromUrl() { if (this.__useCaseParamHandled || this.__useCaseParamHandling) { return } const useCaseParam = this._getUseCaseParamFromUrl() if (!useCaseParam) { this.__useCaseParamHandled = true return } if ( (!Array.isArray(this.items) || this.items.length === 0) && (!Array.isArray(this.__allItems) || this.__allItems.length === 0) ) { return } this.__useCaseParamHandling = true try { await this.updateComplete const template = this._findTemplateByUseCaseParam(useCaseParam) if (template) { // Update selection state so the UI reflects what was deep-linked. if (Array.isArray(this.filteredItems) && this.filteredItems.length > 0) { const idx = this.filteredItems.findIndex((i) => this._matchesUseCaseParam(i, useCaseParam), ) if (idx !== -1) { this.selectedCardIndex = idx if (this.filteredItems[idx]) { this.filteredItems[idx].isSelected = true this.filteredItems[idx].showContinue = true } // Ensure the selected card is visible in the viewport. this._scrollUseCaseIndexIntoView(idx) } else if (template && template.dataType) { // Fallback: scroll to the relevant group heading. if (template.dataType === 'skeleton') { this.scrollToGroup('from-template-heading', 'skeleton') } if (template.dataType === 'blank') { this.scrollToGroup('from-scratch-heading', 'blank') } if (template.dataType === 'import') { this.scrollToGroup('from-existing-heading', 'import') } } } await this.openTemplateModal(template) } else if (store && store.toast) { store.toast(`Could not find use-case: ${useCaseParam}`, 4000) } this.__useCaseParamHandled = true } catch (e) { this.__useCaseParamHandled = true } this.__useCaseParamHandling = false } testKeydown(e) { if (e.key === "Escape" || e.key === "Enter") { this.toggleSearch(); } } toggleFilterVisibility() { this.showFilter = !this.showFilter; } handleFilterKeydown(e, filter) { // Handle keyboard interaction for filter labels (Space and Enter) if (e.key === " " || e.key === "Enter") { e.preventDefault(); this.toggleFilterByButton(filter); } } scrollToGroup(headingId, dataTypeToFocus) { const heading = this.shadowRoot && headingId ? this.shadowRoot.querySelector("#" + headingId) : null; if (heading) { heading.scrollIntoView({ behavior: "smooth", block: "start" }); setTimeout(() => { this.focusFirstOption(dataTypeToFocus); }, 350); } } focusFirstOption(dataType) { if (!dataType || !Array.isArray(this.filteredItems)) { return; } const index = this.filteredItems.findIndex( (item) => item && item.dataType === dataType, ); if (index === -1) { return; } const el = this.shadowRoot && this.shadowRoot.querySelector( `app-hax-use-case[data-item-index="${index}"]`, ); if (el && el.shadowRoot) { const focusTarget = el.shadowRoot.querySelector( "button.card, button.select, button, a[href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])", ); if (focusTarget && typeof focusTarget.focus === "function") { try { focusTarget.focus({ preventScroll: true }); } catch (e) { focusTarget.focus(); } return; } } // Fallback focus if (el && typeof el.focus === "function") { if (!el.hasAttribute("tabindex")) { el.setAttribute("tabindex", "-1"); } el.focus(); } } render() { const isMobile = this.isMobile; const skeletons = Array.isArray(this.items) ? this.items.filter((i) => i && i.dataType === "skeleton") : []; const quickSkeletons = isMobile ? [] : skeletons.slice(0, 3); return html`

    Create New Site...

    ${quickSkeletons.map( (item) => html`
    this.openTemplateModal(item)} >
    `, )}
    this.scrollToGroup("from-template-heading", "skeleton")} >
    ${!isMobile ? html`
    this.scrollToGroup("from-scratch-heading", "blank")} >
    ` : ""} ${!isMobile ? html`
    this.scrollToGroup("from-existing-heading", "import")} >
    ` : ""}

    Return to...

    Create New Site

    ${this.filteredItems.length} options available
    ${this.filteredItems.length > 0 ? (() => { const skeletonEntries = []; const blankEntries = []; const importEntries = []; this.filteredItems.forEach((item, index) => { if (item && item.dataType === "skeleton") { skeletonEntries.push({ item, index }); } if (item && item.dataType === "blank") { blankEntries.push({ item, index }); } if (item && item.dataType === "import") { importEntries.push({ item, index }); } }); const renderEntries = (entries, typeLabel) => { return entries.map( (entry, gridIndex) => html`
    this.toggleDisplay(entry.index, e)} @continue-action=${() => this.continueAction(entry.index)} >
    `, ) }; return html`

    From Template

    ${skeletonEntries.length > 0 ? html`
    ${renderEntries(skeletonEntries, "Template")}
    ` : html`

    No templates match your current filters.

    `}

    From Scratch Using Theme

    ${blankEntries.length > 0 ? html`
    ${renderEntries(blankEntries, "Theme")}
    ` : html`

    No themes match your current filters.

    `}
    ${!isMobile ? html`

    From Existing Site

    ${importEntries.length > 0 ? html`
    ${renderEntries(importEntries, "Import")}
    ` : html`

    No import options match your current filters.

    `}
    ` : ""} ` })() : this.loading ? html`

    Loading templates...

    ` : this.items && this.items.length > 0 ? html`

    No templates match your current filters. Reset filters to see more options.

    ` : html`

    ${this.errorMessage || "No templates available. You can still create a blank site."}

    this.toggleDisplay(-1, e)} @continue-action=${() => this.continueAction(-1)} >
    `}
    `; } getImportItems() { // These are local-only actions (no fetch) that kick off import/migration flows. // They are added into the same `items` array so search + filtering still works. return [ { dataType: "import", importKind: "file", importType: "docx", callback: "@haxcms/docxToSite", fileType: "docx", useCaseTitle: "Word Doc", useCaseImage: "", useCaseDescription: "Import a .docx outline into a new HAX site", useCaseIcon: [{ icon: "hax:file-docx", tooltip: "DOCX import" }], useCaseTag: ["Import", "Docx"], demoLink: "#", }, { dataType: "import", importKind: "url", importType: "gitbook", callback: "@haxcms/gitbookToSite", prompt: "URL for the GitBook git repo", param: "md", useCaseTitle: "GitBook", useCaseImage: "", useCaseDescription: "Import a GitBook repo into a new HAX site", useCaseIcon: [ { icon: "mdi-social:github-circle", tooltip: "Git-based import" }, ], useCaseTag: ["Import", "Git"], demoLink: "#", }, { dataType: "import", importKind: "url", importType: "haxcms", callback: "@haxcms/haxcmsToSite", prompt: "URL for the HAXcms site", param: "repoUrl", useCaseTitle: "HAXcms", useCaseImage: "", useCaseDescription: "Import content from an existing HAXcms site", useCaseIcon: [{ icon: "hax:hax2022", tooltip: "HAXcms import" }], useCaseTag: ["Import", "HAXcms"], demoLink: "#", }, { dataType: "import", importKind: "url", importType: "notion", callback: "@haxcms/notionToSite", prompt: "URL for the Notion git repo", param: "repoUrl", useCaseTitle: "Notion", useCaseImage: "", useCaseDescription: "Import a Notion-exported git repo", useCaseIcon: [{ icon: "book", tooltip: "Notion import" }], useCaseTag: ["Import", "Notion"], demoLink: "#", }, { dataType: "import", importKind: "url", importType: "html", callback: "@haxcms/htmlToSite", prompt: "URL for the HTML content", param: "repoUrl", useCaseTitle: "HTML", useCaseImage: "", useCaseDescription: "Import a remote HTML site into HAX", useCaseIcon: [{ icon: "icons:code", tooltip: "HTML import" }], useCaseTag: ["Import", "HTML"], demoLink: "#", }, { dataType: "import", importKind: "file", importType: "pressbooks", callback: "@haxcms/pressbooksToSite", fileType: "html", useCaseTitle: "Pressbooks", useCaseImage: "", useCaseDescription: "Import a Pressbooks export (HTML) into HAX", useCaseIcon: [{ icon: "hax:wordpress", tooltip: "Pressbooks import" }], useCaseTag: ["Import", "Pressbooks"], demoLink: "#", }, ]; } iconForFilter(filter) { switch (filter.toLowerCase()) { case "blog": return "lrn:write"; case "brochure": return "icons:description"; case "course": return "hax:lesson"; case "portfolio": return "icons:perm-identity"; case "blank": return "hax:bricks"; case "import": return "icons:cloud-download"; default: return "icons:label"; } } toggleFilterByButton(filter) { if (this.activeFilters.includes(filter)) { this.activeFilters = this.activeFilters.filter((f) => f !== filter); } else { this.activeFilters = [...this.activeFilters, filter]; } this.applyFilters(); this.requestUpdate(); } _handleOutsideSortClick(e) { if (!this.sortMenuOpen) return; const sortControl = this.shadowRoot.querySelector(".sort-control"); if (!sortControl) return; if (!sortControl.contains(e.target)) { this.sortMenuOpen = false; this.requestUpdate(); } } connectedCallback() { super.connectedCallback(); globalThis.addEventListener("jwt-logged-in", this._jwtLoggedIn.bind(this), { signal: this.windowControllers.signal, }); this._boundOutsideSortClick = this._handleOutsideSortClick.bind(this); document.addEventListener("click", this._boundOutsideSortClick); } disconnectedCallback() { document.removeEventListener("click", this._boundOutsideSortClick); this.windowControllers.abort(); super.disconnectedCallback(); } _jwtLoggedIn(e) { // When login status changes to true, refresh skeleton list if (e.detail === true) { this.isLoggedIn = true; this.updateSkeletonResults(); this.updateSiteResults(); } else if (e.detail === false) { this.isLoggedIn = false; } } firstUpdated() { super.firstUpdated(); // Skeleton and site results are loaded via autorun watching appReady + isLoggedIn } updated(changedProperties) { if ( changedProperties.has("searchQuery") || changedProperties.has("activeFilters") || changedProperties.has("items") ) { this.applyFilters(); } // If a URL param like `?use-case=course-template` is present, try to // auto-open the corresponding template once the items are loaded. if (changedProperties.has("items")) { this._maybeAutoOpenUseCaseFromUrl() } } toggleSearch() { if (!this.disabled) { this.shadowRoot.querySelector("#searchField").value = ""; store.appEl.playSound("click"); this.showSearch = !this.showSearch; setTimeout(() => { this.shadowRoot.querySelector("#searchField").focus(); }, 300); } } toggleSelection(index) { if (this.activeUseCase === index) { this.activeUseCase = false; // Deselect if the same card is clicked } else { this.activeUseCase = index; // Select the new card } this.requestUpdate(); } handleSearch(event) { const searchTerm = event.target.value.toLowerCase(); this.searchTerm = searchTerm; // keep store in sync for other consumers like app-hax-search-results UI store.searchTerm = searchTerm; // delegate actual filtering to applyFilters so search + filters stay in sync this.applyFilters(); } handleSortChange(value) { const sortValue = typeof value === "string" ? value : (value && value.target && value.target.value ? value.target.value : "newest"); this.sortOption = sortValue; this.sortMenuOpen = false; this.requestUpdate(); } toggleFilter(event) { const filterValue = event.target.value; if (this.activeFilters.includes(filterValue)) { this.activeFilters = [ ...this.activeFilters.filter((f) => f !== filterValue), ]; } else { this.activeFilters = [...this.activeFilters, filterValue]; } this.applyFilters(); } applyFilters() { const lowerCaseQuery = this.searchTerm.toLowerCase(); // Filter skeletons and blank themes (from this.items) this.filteredItems = [ ...this.items.filter((item) => { if ( item.dataType !== "skeleton" && item.dataType !== "blank" && item.dataType !== "import" ) return false; const matchesSearch = lowerCaseQuery === "" || item.useCaseTitle.toLowerCase().includes(lowerCaseQuery) || (item.useCaseTag && item.useCaseTag.some((tag) => tag.toLowerCase().includes(lowerCaseQuery), )); const matchesFilters = this.activeFilters.length === 0 || (item.useCaseTag && this.activeFilters.some((filter) => item.useCaseTag.includes(filter), )); return matchesSearch && matchesFilters; }), ]; // Filter sites (from this.returningSites) this.filteredSites = [ ...this.returningSites.filter((item) => { if (item.dataType !== "site") { return false; } const original = item.originalData || {}; const metadata = original.metadata || {}; const siteMeta = metadata.site || {}; // Prefer explicit site category metadata, but fall back to the // useCaseTag list (which may be populated from build data) so that // newly created sites still filter correctly by type. let siteCategory = typeof siteMeta.category !== "undefined" && siteMeta.category !== null ? siteMeta.category : item.useCaseTag || []; const title = (original.title || "").toLowerCase(); const description = (original.description || "").toLowerCase(); const author = (original.author || "").toLowerCase(); const slug = (original.slug || "").toLowerCase(); const tags = item.useCaseTag || []; const matchesSearch = lowerCaseQuery === "" || title.indexOf(lowerCaseQuery) !== -1 || description.indexOf(lowerCaseQuery) !== -1 || author.indexOf(lowerCaseQuery) !== -1 || slug.indexOf(lowerCaseQuery) !== -1 || tags.some((tag) => tag.toLowerCase().indexOf(lowerCaseQuery) !== -1) || (typeof siteCategory === "string" && siteCategory.toLowerCase().indexOf(lowerCaseQuery) !== -1) || (Array.isArray(siteCategory) && siteCategory.some( (cat) => typeof cat === "string" && cat.toLowerCase().indexOf(lowerCaseQuery) !== -1, )); const matchesFilters = this.activeFilters.length === 0 || this.activeFilters.some((filter) => { if (typeof siteCategory === "string") { return siteCategory === filter; } if (Array.isArray(siteCategory)) { return siteCategory.indexOf(filter) !== -1; } return false; }); return matchesSearch && matchesFilters; }), ]; } removeFilter(event) { const filterToRemove = event.detail; this.activeFilters = this.activeFilters.filter((f) => f !== filterToRemove); this.applyFilters(); // Re-filter results this.requestUpdate(); } resetFilters() { this.searchTerm = ""; store.searchTerm = ""; this.activeFilters = []; // Show all options (templates, themes, and imports) and all sites this.filteredItems = [ ...this.items.filter( (item) => item.dataType === "skeleton" || item.dataType === "blank" || item.dataType === "import", ), ]; this.filteredSites = [...this.returningSites]; // Clear UI elements this.shadowRoot.querySelector("#searchField").value = ""; this.shadowRoot .querySelectorAll('input[type="checkbox"]') .forEach((cb) => (cb.checked = false)); this.requestUpdate(); } updateSkeletonResults() { this.loading = true; this.errorMessage = ""; // Require configured endpoint if (!store.appSettings || !store.appSettings.skeletonsList) { this.errorMessage = "Skeletons endpoint not configured"; this.loading = false; return; } // Reset filters for a clean rebuild this.allFilters = new Set(); // Build promises: backend call for skeletons, appSettings themes or fallback fetch const skeletonsPromise = store.AppHaxAPI && store.AppHaxAPI.makeCall ? store.AppHaxAPI.makeCall("skeletonsList") : Promise.reject(new Error("API not available")); // Prefer themes from appSettings (injected by backend); fallback to static file let themesPromise; if ( store.appSettings && store.appSettings.themes && Object.keys(store.appSettings.themes).length > 0 ) { // Use themes from appSettings if available and not empty themesPromise = Promise.resolve(store.appSettings.themes); } else { // Fallback to loading themes.json from static file const themesUrl = new URL( "../../../haxcms-elements/lib/themes.json", import.meta.url, ).href; themesPromise = fetch(themesUrl) .then((response) => { if (!response.ok) throw new Error(`Failed Themes (${response.status})`); return response.json(); }) .catch((error) => { console.warn( "Failed to load themes.json, using minimal fallback:", error, ); // Return minimal fallback with just clean-one theme return { "clean-one": { element: "clean-one", name: "Clean One", description: "A clean, simple theme", category: ["Blank"], hidden: false, }, }; }); } Promise.allSettled([skeletonsPromise, themesPromise]) .then(([skeletonsData, themesData]) => { // Process skeletons data (expects { status, data: [] }) const skeletonArray = skeletonsData.value && skeletonsData.value.data && Array.isArray(skeletonsData.value.data) ? skeletonsData.value.data : []; // Priority ordering: negative numbers float to the top. // 0 is default, positive numbers sink lower in the UI. const _getUseCasePriority = (useCase) => { if (!useCase) { return 0; } const original = useCase.originalData ? useCase.originalData : {}; const raw = typeof original.priority !== "undefined" ? original.priority : typeof useCase.priority !== "undefined" ? useCase.priority : 0; const num = typeof raw === "number" ? raw : Number(raw); return Number.isFinite(num) ? num : 0; }; const _sortUseCasesByPriority = (a, b) => { const pa = _getUseCasePriority(a); const pb = _getUseCasePriority(b); if (pa !== pb) { return pa - pb; } const at = a && a.useCaseTitle ? a.useCaseTitle : ""; const bt = b && b.useCaseTitle ? b.useCaseTitle : ""; return at.localeCompare(bt); }; const skeletonItemsAll = skeletonArray.map((item) => { let tags = []; if (Array.isArray(item.category)) { tags = item.category.filter( (c) => typeof c === "string" && c.trim() !== "", ); } else if ( typeof item.category === "string" && item.category.trim() !== "" ) { tags = [item.category.trim()]; } if (tags.length === 0) tags = ["Empty"]; // Only add filter tags when this entry will be visible. const isHidden = item && item.hidden ? true : false; const isTerrible = item && item.terrible ? true : false; const visible = (!isHidden || this.showHidden) && (!isTerrible || this.showTerrible); if (visible) { tags.forEach((tag) => this.allFilters.add(tag)); } const icons = Array.isArray(item.attributes) ? item.attributes.map((attr) => ({ icon: attr.icon || "", tooltip: attr.tooltip || "", })) : []; let thumbnailPath = item.image || ""; if (thumbnailPath && thumbnailPath.startsWith("@haxtheweb/")) { // Navigate from current file to simulate node_modules structure and resolve path // Current file: elements/app-hax/lib/v2/app-hax-use-case-filter.js // Need to go up to webcomponents root, then navigate to the package // In node_modules: @haxtheweb/package-name becomes ../../../@haxtheweb/package-name const packagePath = "../../../../" + thumbnailPath; thumbnailPath = new URL(packagePath, import.meta.url).href; } const skeletonUrl = item["skeleton-url"] || ""; const machineName = this._deriveTemplateMachineName( item.machineName || item.name || item["machine-name"] || skeletonUrl || item.title || "", item.title || "", ); return { dataType: "skeleton", machineName: machineName, hidden: isHidden, terrible: isTerrible, useCaseTitle: item.title || "Untitled Template", useCaseImage: thumbnailPath || "", useCaseDescription: item.description || "", useCaseIcon: icons, useCaseTag: tags, demoLink: item["demo-url"] || "#", skeletonUrl: skeletonUrl, originalData: item, }; }) || []; // Sort templates by priority so system defaults can float above legacy options. skeletonItemsAll.sort(_sortUseCasesByPriority); const skeletonItems = skeletonItemsAll.filter( (i) => i && (!i.hidden || this.showHidden) && (!i.terrible || this.showTerrible), ); // Process themes data into blank use cases (filter out hidden themes) const themeSource = themesData.value || {}; const themeItemsAll = Object.entries(themeSource) .map(([themeMachineName, theme]) => { let tags = []; if (Array.isArray(theme.category)) { tags = theme.category.filter( (c) => typeof c === "string" && c.trim() !== "", ); } else if ( typeof theme.category === "string" && theme.category.trim() !== "" ) { tags = [theme.category.trim()]; } if (tags.length === 0) tags = ["Blank"]; const isHidden = theme && theme.hidden ? true : false; let isTerrible = theme && theme.terrible ? true : false; // Fallback: infer terrible themes by machine name prefix if backend didn't supply flag if ( !isTerrible && typeof themeMachineName === "string" && themeMachineName.indexOf("terrible") === 0 ) { isTerrible = true; } const visible = (!isHidden || this.showHidden) && (!isTerrible || this.showTerrible); if (visible) { tags.forEach((tag) => this.allFilters.add(tag)); } // Simple icon array for blank themes const icons = [{ icon: "icons:build", tooltip: "Customizable" }]; // Resolve thumbnail path using import.meta.url navigation let thumbnailPath = theme.thumbnail || ""; if (thumbnailPath && thumbnailPath.startsWith("@haxtheweb/")) { // Navigate from current file to simulate node_modules structure and resolve path // Current file: elements/app-hax/lib/v2/app-hax-use-case-filter.js // Need to go up to webcomponents root, then navigate to the package // In node_modules: @haxtheweb/package-name becomes ../../../@haxtheweb/package-name const packagePath = "../../../../" + thumbnailPath; thumbnailPath = new URL(packagePath, import.meta.url).href; } const themeElement = theme && theme.element ? theme.element : themeMachineName; return { dataType: "blank", machineName: themeMachineName, themeElement: themeElement, hidden: isHidden, terrible: isTerrible, useCaseTitle: theme.name || "Untitled Theme", useCaseImage: thumbnailPath || "", useCaseDescription: theme.description || "Start with a blank site using this theme", useCaseIcon: icons, useCaseTag: tags, demoLink: `https://playground.hax.cloud/site.html?theme=${themeMachineName}`, originalData: theme, }; }); // Sort themes by priority so recommended themes float above legacy options. themeItemsAll.sort(_sortUseCasesByPriority); const themeItems = themeItemsAll.filter( (i) => i && (!i.hidden || this.showHidden) && (!i.terrible || this.showTerrible), ); // Add import options (local definitions) const importItems = this.getImportItems(); // Ensure their tags are included in the global filter list importItems.forEach((item) => { if (item && Array.isArray(item.useCaseTag)) { item.useCaseTag.forEach((tag) => this.allFilters.add(tag)); } }); // Combine skeleton, theme, and import items this.__allItems = [...skeletonItemsAll, ...themeItemsAll, ...importItems]; this.items = [...skeletonItems, ...themeItems, ...importItems]; this.filters = Array.from(this.allFilters).sort(); // Set AFTER all visible items if (this.items.length === 0 && !this.errorMessage) { this.errorMessage = "No Templates Found"; } this.resetFilters(); }) .catch((error) => { this.errorMessage = `Failed to load data: ${error.message}`; this.items = []; this.filters = []; }) .finally(() => { this.loading = false; }); } updateSiteResults() { this.loading = true; this.errorMessage = ""; try { // Use store.manifest data instead of demo JSON const sitesData = store.manifest; if (!sitesData || !sitesData.items) { throw new Error("No manifest data available"); } const siteItems = Array.isArray(sitesData.items) ? sitesData.items.map((item) => { // Start with any explicit category information at the site level let categorySource = item.metadata && item.metadata.site ? item.metadata.site.category : null; let tags = []; if (Array.isArray(categorySource)) { tags = categorySource.filter( (c) => typeof c === "string" && c.trim() !== "", ); } else if ( typeof categorySource === "string" && categorySource.trim() !== "" ) { tags = [categorySource.trim()]; } // Incorporate site tags from the manifest so that any tags the // user edits there become available as filters in the dashboard. let manifestTagsSource = null; if (item.metadata && item.metadata.site && item.metadata.site.tags) { manifestTagsSource = item.metadata.site.tags; } else if (item.metadata && item.metadata.tags) { manifestTagsSource = item.metadata.tags; } if (Array.isArray(manifestTagsSource)) { manifestTagsSource .filter((c) => typeof c === "string" && c.trim() !== "") .forEach((t) => tags.push(t.trim())); } else if ( typeof manifestTagsSource === "string" && manifestTagsSource.trim() !== "" ) { manifestTagsSource .split(",") .map((t) => t.trim()) .filter((t) => t !== "") .forEach((t) => tags.push(t)); } // Incorporate build data (e.g., course, website) into tags when // available so new sites filter correctly by type let buildType = null; if (item.build && item.build.type) { buildType = item.build.type; } else if ( item.metadata && item.metadata.build && item.metadata.build.type ) { buildType = item.metadata.build.type; } if (typeof buildType === "string" && buildType.trim() !== "") { tags.push(buildType.trim()); } // Normalize, dedupe, and provide a sensible default. If no // category / tag info exists, assume the site is a generic Website // so that the Website filter still shows these sites. tags = [ ...new Set( tags.filter( (c) => typeof c === "string" && c.trim() !== "", ), ), ]; if (tags.length === 0) tags = ["Website"]; tags.forEach((tag) => this.allFilters.add(tag)); // Add to global Set return { dataType: "site", useCaseTag: tags, originalData: item, ...item, // this spreads every prop into this area that way it can be filtered correctly }; }) : []; this.returningSites = [...siteItems]; this.filters = Array.from(this.allFilters).sort(); // Set AFTER all items this.filteredSites = [...siteItems]; if (siteItems.length === 0 && !this.errorMessage) { this.errorMessage = "No Sites Found"; } this.requestUpdate(); this.loading = false; } catch (error) { this.errorMessage = `Failed to load data: ${error.message}`; this.returningSites = []; this.filteredSites = []; this.filters = []; this.loading = false; } } toggleDisplay(index, event) { const isSelected = event.detail.isSelected; if (this.selectedCardIndex !== null && this.selectedCardIndex !== index) { // Deselect the previously selected card (only if it's not the fallback) if ( this.selectedCardIndex !== -1 && this.filteredItems[this.selectedCardIndex] ) { this.filteredItems[this.selectedCardIndex].isSelected = false; this.filteredItems[this.selectedCardIndex].showContinue = false; } } if (isSelected) { // Select the new card this.selectedCardIndex = index; } else { // Deselect the current card this.selectedCardIndex = null; } // Update the item state only if it exists (not fallback) if (index !== -1 && this.filteredItems[index]) { this.filteredItems[index].isSelected = isSelected; this.filteredItems[index].showContinue = isSelected; } this.requestUpdate(); } async continueAction(index) { const modal = this.shadowRoot.querySelector("#siteCreationModal"); if (!modal) { return; } // Handle fallback case when index is -1 (blank site with clean-one) if (index === -1) { // Keep URL in sync for link sharing this._updateUrlQueryParam('use-case', 'blank-site') modal.title = "Blank Site"; modal.description = "Create a blank site using the clean-one theme"; modal.source = ""; modal.template = "Blank Site"; modal.themeElement = "clean-one"; modal.skeletonMachineName = null; // Generate skeleton data for fallback blank site with Home page modal.skeletonData = { meta: { name: "clean-one", type: "skeleton", }, site: { name: "clean-one", theme: "clean-one", }, build: { type: "skeleton", structure: "from-skeleton", items: [ { id: "item-home-clean-one", title: "Home", slug: "home", order: 0, parent: null, indent: 0, content: "

    Edit this page to get started on your HAX site!

    ", metadata: { published: true, hideInMenu: false, tags: [], }, }, ], files: [], }, theme: {}, }; // Use the template title as the default site name for the blank site modal.siteName = modal.title; modal.openModal(); return; } const selectedTemplate = Array.isArray(this.filteredItems) && typeof index === "number" ? this.filteredItems[index] : null; if (!selectedTemplate) { console.warn("No template found at index:", index); return; } await this.openTemplateModal(selectedTemplate); } _resolveSameOriginPath(rawUrl) { if (!rawUrl || typeof rawUrl !== "string") { return ""; } const url = rawUrl.trim(); if (url === "" || url === "#") { return ""; } // Disallow scheme and scheme-relative URLs if (url.indexOf("://") !== -1 || url.indexOf("//") === 0) { return ""; } // Root-relative is already safe if (url.indexOf("/") === 0) { return url; } // Resolve other relative URLs to a same-origin absolute path try { const resolved = new URL(url, globalThis.location.href); if (resolved.origin !== globalThis.location.origin) { return ""; } return `${resolved.pathname}${resolved.search}${resolved.hash}`; } catch (e) { return ""; } } async openTemplateModal(selectedTemplate) { const modal = this.shadowRoot.querySelector("#siteCreationModal"); if (!modal || !selectedTemplate) { return; } // Keep URL in sync for link sharing const useCaseMachineName = this._getUseCaseMachineNameForTemplate(selectedTemplate) if (useCaseMachineName) { this._updateUrlQueryParam('use-case', useCaseMachineName) } // Set the template details in the modal modal.title = selectedTemplate.useCaseTitle; modal.description = selectedTemplate.useCaseDescription; modal.source = selectedTemplate.useCaseImage; modal.template = selectedTemplate.useCaseTitle; modal.skeletonMachineName = null; // Import options (existing sites / migrations) if (selectedTemplate.dataType === "import") { modal.themeElement = "clean-one"; await this.processImportTemplate(selectedTemplate, modal); return; } // Handle skeleton templates by loading the skeleton file if (selectedTemplate.dataType === "skeleton" && !selectedTemplate.skeletonUrl) { if (store && store.appEl && store.appEl.playSound) { store.appEl.playSound("error"); } if (store && store.toast) { store.toast("This template isn't configured yet (missing skeleton URL).", 4000); } return; } if (selectedTemplate.dataType === "skeleton" && selectedTemplate.skeletonUrl) { try { if ( selectedTemplate.machineName && typeof selectedTemplate.machineName === "string" ) { modal.skeletonMachineName = selectedTemplate.machineName; } const rawUrl = selectedTemplate.skeletonUrl || ""; const safeUrl = this._resolveSameOriginPath(rawUrl); // Ensure skeleton URLs stay on this origin; allow relative paths in demos // but do not allow absolute external hosts. if (!safeUrl) { if (store && store.appEl && store.appEl.playSound) { store.appEl.playSound("error"); } if (store && store.toast) { store.toast( "This template isn't configured yet (invalid skeleton URL).", 4000, ); } console.warn("Refusing to load skeleton from URL:", rawUrl); return; } const response = await fetch(safeUrl); if (response.ok) { const skeletonData = await response.json(); // Store skeleton data for use in site creation modal.skeletonData = skeletonData.data || skeletonData; if (!modal.skeletonMachineName && modal.skeletonData.meta) { if ( modal.skeletonData.meta.machineName && typeof modal.skeletonData.meta.machineName === "string" ) { modal.skeletonMachineName = modal.skeletonData.meta.machineName; } else if ( modal.skeletonData.meta.name && typeof modal.skeletonData.meta.name === "string" ) { modal.skeletonMachineName = modal.skeletonData.meta.name; } } modal.themeElement = (modal.skeletonData.site && modal.skeletonData.site.theme) || "clean-one"; } else { if (store && store.appEl && store.appEl.playSound) { store.appEl.playSound("error"); } if (store && store.toast) { store.toast("Failed to load template skeleton.", 4000); } console.warn(`Failed to load skeleton from ${safeUrl}`); modal.themeElement = "clean-one"; // fallback return; } } catch (error) { if (store && store.appEl && store.appEl.playSound) { store.appEl.playSound("error"); } if (store && store.toast) { store.toast("Failed to load template skeleton.", 4000); } console.warn("Error loading skeleton:", error); modal.themeElement = "clean-one"; // fallback return; } } else if (selectedTemplate.dataType === "blank") { modal.skeletonMachineName = null; // Generate skeleton data for blank themes with a Home page const themeElement = selectedTemplate.themeElement || (selectedTemplate.originalData && selectedTemplate.originalData.element ? selectedTemplate.originalData.element : selectedTemplate.machineName || ""); if (themeElement) { modal.themeElement = themeElement; modal.skeletonData = { meta: { name: themeElement, type: "skeleton", }, site: { name: themeElement, theme: themeElement, }, build: { type: "skeleton", structure: "from-skeleton", items: [ { id: `item-home-${themeElement}`, title: "Home", slug: "home", order: 0, parent: null, indent: 0, content: "

    Edit this page to get started on your HAX site!

    ", metadata: { published: true, hideInMenu: false, tags: [], }, }, ], files: [], }, theme: {}, }; } else { modal.themeElement = "clean-one"; // fallback } } else { modal.skeletonMachineName = null; modal.themeElement = "clean-one"; // fallback } // Prepopulate the site name from the selected template's title modal.siteName = selectedTemplate.useCaseTitle || modal.title || "New site"; // Open the modal modal.openModal(); } _normalizeImportedName(rawName) { if (!rawName || typeof rawName !== "string") { return "Imported site"; } // Remove file extension (if present), normalize separators, and trim. let name = rawName.replace(/\.[^/.]+$/, ""); name = name.replace(/[_-]+/g, " "); name = name.replace(/\s+/g, " ").trim(); return name || "Imported site"; } async processImportTemplate(selectedTemplate, modal) { try { const [{ MicroFrontendRegistry }, { enableServices }] = await Promise.all([ import( "@haxtheweb/micro-frontend-registry/micro-frontend-registry.js" ), import("@haxtheweb/micro-frontend-registry/lib/microServices.js"), ]); enableServices(["haxcms"]); let response = null; if (selectedTemplate.importKind === "file") { const fileType = selectedTemplate.fileType || "docx"; // Ensure the file broker is available await import("@haxtheweb/file-system-broker/lib/docx-file-system-broker.js"); const broker = globalThis.FileSystemBroker.requestAvailability(); const file = await broker.loadFile(fileType); if (!file) { return; } const formData = new FormData(); formData.append("method", "site"); formData.append("type", "import"); formData.append("upload", file); response = await MicroFrontendRegistry.call(selectedTemplate.callback, formData); } else if (selectedTemplate.importKind === "url") { const promptText = selectedTemplate.prompt || "Enter a URL"; const promptUrl = globalThis.prompt(promptText); if (!promptUrl) { return; } const params = {}; params[selectedTemplate.param || "repoUrl"] = promptUrl; response = await MicroFrontendRegistry.call(selectedTemplate.callback, params); } if ( response && response.status == 200 && response.data && response.data.contents != "" && Array.isArray(response.data.items) ) { const items = response.data.items; const files = response.data.files ? response.data.files : []; const importedName = this._normalizeImportedName( response.data.filename || selectedTemplate.useCaseTitle, ); modal.themeElement = modal.themeElement || "clean-one"; modal.skeletonMachineName = null; modal.skeletonData = { meta: { name: selectedTemplate.importType, type: "import", }, build: { type: selectedTemplate.importType, structure: "import", items: items, files: files, }, site: { name: importedName, theme: modal.themeElement, }, theme: {}, }; modal.siteName = importedName; modal.openModal(); } else { if (store && store.appEl && store.appEl.playSound) { store.appEl.playSound("error"); } if (store && store.toast) { store.toast("Import did not return a valid structure", 3000); } console.warn("Import did not return a valid structure:", response); } } catch (error) { if (store && store.appEl && store.appEl.playSound) { store.appEl.playSound("error"); } if (store && store.toast) { store.toast("Import failed", 3000); } console.warn("Import error:", error); } } handleModalClosed(event) { // If modal was cancelled (not completed), reset selected states if (event.detail && event.detail.cancelled) { // Reset the selected card if one was selected if ( this.selectedCardIndex !== null && this.filteredItems[this.selectedCardIndex] ) { this.filteredItems[this.selectedCardIndex].isSelected = false; this.filteredItems[this.selectedCardIndex].showContinue = false; this.selectedCardIndex = null; this.requestUpdate(); } } } } customElements.define("app-hax-use-case-filter", AppHaxUseCaseFilter); ================================================ FILE: elements/app-hax/lib/v2/app-hax-use-case.js ================================================ /* eslint-disable no-return-assign */ import { LitElement, html, css } from "lit"; import "@haxtheweb/simple-tooltip/simple-tooltip.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; import { store } from "./AppHaxStore.js"; export class AppHaxUseCase extends LitElement { static get tag() { return "app-hax-use-case"; } constructor() { super(); this.title = ""; this.description = ""; this.source = ""; this.demoLink = ""; this.iconImage = []; this.isSelected = false; this.showContinue = false; } static get properties() { return { title: { type: String }, description: { type: String }, source: { type: String }, demoLink: { type: String }, iconImage: { type: Array }, isSelected: { type: Boolean, reflect: true }, showContinue: { type: Boolean }, }; } static get styles() { return [ css` :host { display: flex; flex-direction: column; align-items: center; margin: 0; --app-hax-use-case-card-width: 180px; --app-hax-use-case-card-height: 300px; --app-hax-use-case-image-height: 240px; --app-hax-use-case-title-font-size: var(--ddd-font-size-4xs, 14px); text-align: left; font-family: var(--ddd-font-primary); color: light-dark( var(--ddd-theme-default-nittanyNavy), var(--ddd-theme-default-white) ); cursor: pointer; transition: all 0.2s ease; } .card:hover .image, .card:focus .image, .card:focus-within .image { transform: translateY(-2px) scale(1.02); border: var(--ddd-border-lg); box-shadow: light-dark( 4px 8px 24px rgba(28, 28, 28, 0.15), 4px 8px 24px rgba(0, 0, 0, 0.5) ); border-color:var(--ddd-theme-default-beaverBlue); outline: none; } :host([dark]) .card:hover .image, :host([dark]) .card:focus .image, :host([dark]) .card:focus-within .image { border-color: var(--ddd-theme-default-skyBlue); } /* Layout Containers */ .card { outline: none; display: flex; flex-direction: column; padding: var(--ddd-spacing-1, 4px); height: var(--app-hax-use-case-card-height); width: var(--app-hax-use-case-card-width); background-color: transparent; border: none; text-align: left; } .image { transition: transform 0.2s ease-in-out; height: var(--app-hax-use-case-image-height); flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; border: var(--ddd-border-xs); border-color: var(--ddd-theme-default-slateGray, #c4c4c4); box-shadow: light-dark( 0 1px 3px rgba(28, 28, 28, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3) ); background-color: white; } .image img, .image-placeholder { width: 85%; height: 85%; } .image img { object-fit: cover; display: block; object-position: left; } .image-placeholder { display: flex; align-items: center; justify-content: center; } /* Icons */ .icons { position: absolute; bottom: 14px; left: 8px; display: flex; gap: 4px; z-index: 10; } .icon-wrapper { position: relative; width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .icon-wrapper::before { content: ""; position: absolute; width: 100%; height: 100%; background-color: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } simple-icon-lite { color: var(--ddd-theme-default-nittanyNavy, #001e44); --simple-icon-width: var(--ddd-icon-4xs, 20px); --simple-icon-height: var(--ddd-icon-4xs, 20px); } .image-placeholder simple-icon-lite { --simple-icon-height: var(--ddd-icon-xl, 64px); --simple-icon-width: var(--ddd-icon-xl, 64px); } /* Tooltip */ .tooltip-container { display: none; position: absolute; top: 32px; left: 0; flex-direction: column; width: max-content; padding: 8px; background-color: white; color: black; border-radius: 6px; box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 6px; z-index: 20; } .icons:hover .tooltip-container { display: block; } .tooltip-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-bottom: 1px solid #ccc; } .tooltip-row:last-child { border-bottom: none; } .tooltip { font-size: 12px; white-space: nowrap; } .tooltip-icon { width: 20px; height: 20px; } /* Links */ a:link { display: flex; align-items: center; justify-content: center; font-family: var(--ddd-font-primary, sans-serif); font-size: var(--ddd-font-size-3xs, 11px); font-weight: var(--ddd-font-weight-medium, 500); color: var(--ddd-theme-default-nittanyNavy, #001e44); text-decoration: underline; transition: color 0.2s ease; } a:visited { color: var(--ddd-theme-default-slateGray, #666); } a:hover, a:focus { color: var(--ddd-theme-default-keystoneYellow, #ffd100); text-decoration: none; } /* Title */ .title { display: flex; flex-direction: column; margin: 0; padding: 4px var(--ddd-spacing-1, 4px) 0; } .title h3 { font-size: var(--app-hax-use-case-title-font-size); line-height: 1.2; height: calc(1.2em * 2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 2px 0 0 0; } /* Responsive */ @media (max-width: 780px) { :host { margin: 0; min-height: auto; width: auto; max-width: 100%; } .card { padding: var(--ddd-spacing-1, 4px); } } @media (max-width: 640px) { :host { --app-hax-use-case-card-width: clamp(120px, 30vw, 144px); --app-hax-use-case-card-height: 220px; --app-hax-use-case-image-height: 170px; --app-hax-use-case-title-font-size: var(--ddd-font-size-5xs, 12px); } } `, ]; } toggleDisplay() { this.isSelected = !this.isSelected; this.showContinue = this.isSelected; this.dispatchEvent( new CustomEvent("toggle-display", { detail: { isSelected: this.isSelected }, bubbles: true, composed: true, }), ); // If selected, immediately trigger the continue action to open modal if (this.isSelected) { setTimeout(() => { this.continueAction(); }, 100); // Small delay to allow state to update } } continueAction() { this.dispatchEvent( new CustomEvent("continue-action", { detail: { title: this.title, description: this.description, source: this.source, template: this.title, // Using title as template identifier }, bubbles: true, composed: true, }), ); } openDemo() { if (this.demoLink) { globalThis.open(this.demoLink, "_blank"); } } render() { const hasSource = this.source && typeof this.source === "string" && this.source.trim() !== ""; const primaryIcon = Array.isArray(this.iconImage) && this.iconImage[0] && this.iconImage[0].icon ? this.iconImage[0].icon : "icons:cloud-download"; return html` `; } } customElements.define(AppHaxUseCase.tag, AppHaxUseCase); ================================================ FILE: elements/app-hax/lib/v2/app-hax-user-access-modal.js ================================================ /** * Copyright 2025 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { html, css } from "lit"; import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import { I18NMixin } from "@haxtheweb/i18n-manager/lib/I18NMixin.js"; import "@haxtheweb/rpg-character/rpg-character.js"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import "@haxtheweb/simple-icon/lib/simple-icon-button.js"; import { store } from "./AppHaxStore.js"; /** * `app-hax-user-access-modal` * `Modal for managing user access to HAXiam sites` * * @demo demo/index.html * @element app-hax-user-access-modal */ class AppHaxUserAccessModal extends I18NMixin(DDD) { /** * Convention we use */ static get tag() { return "app-hax-user-access-modal"; } constructor() { super(); this.username = ""; this.loading = false; this.error = ""; this.siteTitle = ""; this.t = { userAccess: "User Access", enterUsername: "Enter username to grant access", usernamePlaceholder: "Username", addUser: "Add User", cancel: "Cancel", userAccessGranted: "User access granted successfully!", userNotFound: "User not found or unauthorized", loadingAddingUser: "Adding user...", grantAccessTo: "Grant access to:", }; } static get properties() { return { ...super.properties, /** * Username to add */ username: { type: String, }, /** * Loading state */ loading: { type: Boolean, }, /** * Error message */ error: { type: String, }, /** * Current site title */ siteTitle: { type: String, }, }; } static get styles() { return [ super.styles, css` :host { display: block; font-family: var(--ddd-font-primary); background-color: light-dark( var(--ddd-theme-default-white, white), var(--ddd-theme-default-coalyGray, #1c1c1c) ); color: light-dark( var(--ddd-theme-default-coalyGray, #1c1c1c), var(--ddd-theme-default-white, white) ); border-radius: var(--ddd-radius-sm); padding: var(--ddd-spacing-6); min-width: 420px; max-width: 500px; } .modal-content { display: flex; flex-direction: column; align-items: center; gap: var(--ddd-spacing-4); } .site-info { text-align: center; margin-bottom: var(--ddd-spacing-2); } .site-title { color: light-dark( var(--ddd-theme-default-nittanyNavy, #001e44), var(--ddd-theme-default-skyBlue, #7eb3ff) ); font-weight: var(--ddd-font-weight-bold); font-size: var(--ddd-font-size-s); margin: var(--ddd-spacing-1) 0; } .character-container { display: flex; justify-content: center; margin: var(--ddd-spacing-2) 0; padding: var(--ddd-spacing-3); border-radius: var(--ddd-radius-sm); background-color: light-dark( var(--ddd-theme-default-limestoneLight, #f5f5f5), var(--ddd-theme-default-slateGray, #2b2b2b) ); } .input-container { width: 100%; display: flex; flex-direction: column; gap: var(--ddd-spacing-2); } input { padding: var(--ddd-spacing-3); border: var(--ddd-border-sm); border-radius: var(--ddd-radius-xs); font-family: var(--ddd-font-primary); font-size: var(--ddd-font-size-s); color: light-dark( var(--ddd-theme-default-coalyGray, #1c1c1c), var(--ddd-theme-default-white, white) ); background-color: light-dark( var(--ddd-theme-default-white, white), var(--ddd-theme-default-slateGray, #2b2b2b) ); width: 100%; box-sizing: border-box; transition: border-color 0.2s ease, box-shadow 0.2s ease; } input::placeholder { color: light-dark( var(--ddd-theme-default-slateGray, #6f6f6f), var(--ddd-theme-default-limestoneGray, #d0d0d0) ); } input:focus { outline: none; border-color: light-dark( var(--ddd-theme-default-nittanyNavy, #001e44), var(--ddd-theme-default-skyBlue, #7eb3ff) ); box-shadow: 0 0 0 2px var(--ddd-theme-default-potential30); } .buttons { display: flex; gap: var(--ddd-spacing-3); justify-content: center; width: 100%; margin-top: var(--ddd-spacing-3); } button { background: var(--ddd-theme-default-nittanyNavy, #001e44); color: var(--ddd-theme-default-white, white); border: none; border-radius: var(--ddd-radius-sm); padding: var(--ddd-spacing-3) var(--ddd-spacing-5); font-family: var(--ddd-font-primary); font-size: var(--ddd-font-size-s); font-weight: var(--ddd-font-weight-medium); cursor: pointer; transition: all 0.2s ease; min-width: 100px; display: flex; align-items: center; justify-content: center; } button:hover:not(:disabled) { background: var(--ddd-theme-default-keystoneYellow, #ffd100); color: var(--ddd-theme-default-nittanyNavy, #001e44); transform: translateY(-1px); box-shadow: var(--ddd-boxShadow-sm); } button:disabled { background: var(--ddd-theme-default-slateGray); cursor: not-allowed; transform: none; box-shadow: none; opacity: 0.6; } .cancel-button { background: transparent; color: light-dark( var(--ddd-theme-default-nittanyNavy, #001e44), var(--ddd-theme-default-white, white) ); border: var(--ddd-border-sm); } .cancel-button:hover:not(:disabled) { background: light-dark( var(--ddd-theme-default-slateLight, #ececec), var(--ddd-theme-default-slateGray, #2b2b2b) ); color: light-dark( var(--ddd-theme-default-nittanyNavy, #001e44), var(--ddd-theme-default-white, white) ); transform: translateY(-1px); } .error { color: var(--ddd-theme-default-original87Pink); font-size: var(--ddd-font-size-xs); text-align: center; background-color: var(--ddd-theme-default-original87Pink10); padding: var(--ddd-spacing-2); border-radius: var(--ddd-radius-xs); border: 1px solid var(--ddd-theme-default-original87Pink30); } .loading { display: flex; align-items: center; gap: var(--ddd-spacing-2); justify-content: center; } .loading simple-icon { --simple-icon-width: 16px; --simple-icon-height: 16px; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } h3 { margin: 0; color: light-dark( var(--ddd-theme-default-nittanyNavy, #001e44), var(--ddd-theme-default-white, white) ); font-size: var(--ddd-font-size-l); text-align: center; font-weight: var(--ddd-font-weight-bold); } p { margin: 0; color: light-dark( var(--ddd-theme-default-coalyGray, #1c1c1c), var(--ddd-theme-default-white, white) ); font-size: var(--ddd-font-size-s); text-align: center; line-height: 1.4; } .empty-character { display: flex; align-items: center; justify-content: center; width: 120px; height: 120px; color: light-dark( var(--ddd-theme-default-slateGray, #6f6f6f), var(--ddd-theme-default-limestoneGray, #d0d0d0) ); font-size: var(--ddd-font-size-xs); text-align: center; } `, ]; } render() { return html` `; } /** * Handle username input changes */ _handleUsernameInput(e) { this.username = e.target.value; // Clear error when user types if (this.error) { this.error = ""; } } /** * Handle keydown events */ _handleKeydown(e) { if (e.key === "Enter" && this.username.trim() && !this.loading) { this._handleAddUser(); } else if (e.key === "Escape") { this._handleCancel(); } } /** * Handle add user button click */ async _handleAddUser() { if (!this.username.trim()) { return; } this.loading = true; this.error = ""; try { const response = await this._addUserAccess(this.username.trim()); if (response.status == "success") { // Play success sound if (store.appEl && store.appEl.playSound) { store.appEl.playSound("success"); } // Success - show toast and close modal this._showSuccessToast(); this._closeModal(); // Reset form this.username = ""; } else { // User not found or unauthorized this.error = this.t.userNotFound; } } catch (error) { console.error("Error adding user access:", error); this.error = "Network error occurred. Please try again."; } finally { this.loading = false; } } /** * Handle cancel button click */ _handleCancel() { // Removed sound effects for modal close/cancel as requested this._closeModal(); } /** * Add user access via HAXiam API */ async _addUserAccess(username) { // Get the site name from the store - this should be the directory name let siteName = null; if (store.activeSite && store.activeSite.name) { siteName = store.activeSite.name; } else if ( store.activeSite && store.activeSite.metadata && store.activeSite.metadata.site && store.activeSite.metadata.site.name ) { siteName = store.activeSite.metadata.site.name; } if (!siteName) { throw new Error("Unable to determine site name"); } // Use the secure AppHaxAPI.makeCall method with proper token validation const response = await store.AppHaxAPI.makeCall("haxiamAddUserAccess", { userName: username, siteName: siteName, }); // Convert to fetch-like response object for compatibility with existing error handling return response; } /** * Show success toast with RPG character matching the added user */ _showSuccessToast() { // Use the existing toast system but with the character seed matching the added user store.toast(this.t.userAccessGranted, 4000, { hat: "construction", userName: this.username, // This ensures the toast character matches the user we just added }); } /** * Close the modal */ _closeModal() { // Restore body scrolling document.body.style.overflow = ""; globalThis.dispatchEvent( new CustomEvent("simple-modal-hide", { bubbles: true, composed: true, cancelable: true, detail: {}, }), ); } /** * Focus input when modal opens */ firstUpdated() { super.firstUpdated(); // Set site title from store if available if (store.activeSite && store.activeSite.title) { this.siteTitle = store.activeSite.title; } // Focus input after a brief delay setTimeout(() => { const input = this.shadowRoot.querySelector("input"); if (input) { input.focus(); } }, 100); } /** * Reset form when modal opens */ connectedCallback() { super.connectedCallback(); this.username = ""; this.error = ""; this.loading = false; // Prevent body scrolling when modal is connected/opened document.body.style.overflow = "hidden"; } } globalThis.customElements.define( AppHaxUserAccessModal.tag, AppHaxUserAccessModal, ); export { AppHaxUserAccessModal }; ================================================ FILE: elements/app-hax/lib/v2/app-hax-user-menu-button.js ================================================ // TODO: Text-overflow-ellipses // dependencies / things imported import { LitElement, html, css } from "lit"; import { DDDSuper } from "@haxtheweb/d-d-d/d-d-d.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; export class AppHaxUserMenuButton extends DDDSuper(LitElement) { // a convention I enjoy so you can change the tag name in 1 place static get tag() { return "app-hax-user-menu-button"; } constructor() { super(); this.icon = "account-circle"; this.label = "Default"; } handleClick(e) { // Find the parent anchor element and trigger its click const parentAnchor = this.parentElement; if (parentAnchor && parentAnchor.tagName.toLowerCase() === "a") { e.stopPropagation(); parentAnchor.click(); } } static get properties() { return { icon: { type: String }, label: { type: String }, }; } static get styles() { return [ super.styles, css` :host { font-family: var(--ddd-font-primary, sans-serif); text-align: center; width: 100%; display: block; } .menu-button { display: flex; align-items: center; width: 100%; border: none; margin: 0; padding: var(--ddd-spacing-2, 8px) var(--ddd-spacing-3, 12px); font-size: var(--ddd-font-size-3xs, 12px); text-align: left; color: light-dark(var(--ddd-theme-default-coalyGray, #222), var(--ddd-theme-default-white, white)); background: transparent; cursor: pointer; font-family: var(--ddd-font-primary, sans-serif); transition: all 0.2s ease; min-height: var(--ddd-spacing-8, 32px); box-sizing: border-box; } :host([dark]) .menu-button, body.dark-mode .menu-button { color: var(--ddd-theme-default-white, white); } .menu-button:hover, .menu-button:active, .menu-button:focus { background: var(--ddd-theme-default-limestoneGray, #f5f5f5); color: var(--ddd-theme-default-nittanyNavy, #001e44); outline: none; } :host([dark]) .menu-button:hover, :host([dark]) .menu-button:active, :host([dark]) .menu-button:focus, body.dark-mode .menu-button:hover, body.dark-mode .menu-button:active, body.dark-mode .menu-button:focus { background: var(--ddd-theme-default-slateGray, #666); color: var(--ddd-theme-default-white, white); } :host(.logout) .menu-button:hover, :host(.logout) .menu-button:active, :host(.logout) .menu-button:focus { background: var(--ddd-theme-default-original87Pink, #e4007c); color: var(--ddd-theme-default-white, white); } .icon { padding-right: var(--ddd-spacing-2, 8px); font-size: var(--ddd-font-size-xs, 14px); flex-shrink: 0; display: flex; align-items: center; } .label { flex: 1; text-align: left; } `, ]; } render() { return html` `; } } customElements.define(AppHaxUserMenuButton.tag, AppHaxUserMenuButton); ================================================ FILE: elements/app-hax/lib/v2/app-hax-user-menu.js ================================================ // TODO: Create app-hax-user-menu-button to be tossed into this // TODO: Create prefix and suffix sections for sound/light toggles and other shtuff // dependencies / things imported import { LitElement, html, css } from "lit"; import { DDDSuper } from "@haxtheweb/d-d-d/d-d-d.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; export class AppHaxUserMenu extends DDDSuper(LitElement) { // a convention I enjoy so you can change the tag name in 1 place static get tag() { return "app-hax-user-menu"; } constructor() { super(); this.isOpen = false; this.icon = "account-circle"; this.addEventListener("keydown", this._handleKeydown.bind(this)); } static get properties() { return { isOpen: { type: Boolean, reflect: true, attribute: "is-open" }, icon: { type: String, reflect: true }, }; } static get styles() { return [ super.styles, css` :host { font-family: var(--ddd-font-primary, sans-serif); text-align: center; display: inline-block; margin: 0px; padding: 0px; position: relative; } .entireComponent { height: var(--ddd-spacing-16, 64px); } .menuToggle { cursor: pointer; height: var(--ddd-spacing-16, 64px); } .user-menu { display: none; } .user-menu.open { display: block; top: var(--ddd-spacing-16, 64px); right: 0px; position: absolute; border: var(--ddd-border-xs, 1px solid) var(--ddd-theme-default-slateGray, #666); background-color: light-dark(white, black); border-radius: none; box-shadow: var(--ddd-boxShadow-lg); min-width: var(--ddd-spacing-30, 200px); z-index: 1000; overflow: hidden; } .user-menu.open ::slotted(*) { display: block; width: 100%; margin: 0; font-size: var(--ddd-font-size-3xs, 12px); text-align: left; font-family: var(--ddd-font-primary, sans-serif); color: light-dark(black, white); background-color: light-dark(white, black); text-decoration: none; } :host([dark]) .user-menu.open ::slotted(*), body.dark-mode .user-menu.open ::slotted(*) { color: var(--ddd-theme-default-white, white); } .user-menu.open .main-menu ::slotted(*:hover), .user-menu.open .main-menu ::slotted(*:active), .user-menu.open .main-menu ::slotted(*:focus) { background-color: light-dark(var(--ddd-theme-default-limestoneGray, #f5f5f5), var(--ddd-theme-default-coalyGray, #333)); } :host([dark]) .user-menu.open .main-menu ::slotted(*:hover), :host([dark]) .user-menu.open .main-menu ::slotted(*:active), :host([dark]) .user-menu.open .main-menu ::slotted(*:focus), body.dark-mode .user-menu.open .main-menu ::slotted(*:hover), body.dark-mode .user-menu.open .main-menu ::slotted(*:active), body.dark-mode .user-menu.open .main-menu ::slotted(*:focus) { color: var(--ddd-theme-default-white, white); } .user-menu.open .post-menu ::slotted(*:hover), .user-menu.open .post-menu ::slotted(*:active), .user-menu.open .post-menu ::slotted(*:focus) { background-color: var(--ddd-theme-default-original87Pink, #e4007c); } .user-menu ::slotted(button) { cursor: pointer; } .user-menu ::slotted(*) simple-icon-lite { padding-right: var(--ddd-spacing-2, 8px); } .pre-menu, .post-menu { border-top: var(--ddd-border-xs, 1px solid) var(--ddd-theme-default-limestoneGray, #f5f5f5); } .pre-menu:first-child, .main-menu:first-child { border-top: none; } /* Keyboard focus indicators */ .user-menu ::slotted(*:focus), .user-menu ::slotted(*[tabindex="0"]:focus) { outline: var(--ddd-border-sm, 2px solid) var(--ddd-theme-default-keystoneYellow, #ffd100); outline-offset: -2px; } `, ]; } render() { return html`
    `; } /** * Handle keyboard navigation for menu toggle */ _handleMenuToggleKeydown(e) { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); this._toggleMenu(); } else if (e.key === "Escape" && this.isOpen) { e.preventDefault(); this._closeMenu(); } } /** * Handle keyboard navigation within menu */ _handleKeydown(e) { if (!this.isOpen) return; const menuItems = this._getMenuItems(); const currentIndex = this._getCurrentMenuItemIndex(menuItems); switch (e.key) { case "Escape": e.preventDefault(); this._closeMenu(); this._focusToggle(); break; case "ArrowDown": e.preventDefault(); this._focusNextItem(menuItems, currentIndex); break; case "ArrowUp": e.preventDefault(); this._focusPreviousItem(menuItems, currentIndex); break; case "Home": e.preventDefault(); this._focusFirstItem(menuItems); break; case "End": e.preventDefault(); this._focusLastItem(menuItems); break; } } /** * Toggle menu open/closed state */ _toggleMenu() { this.isOpen = !this.isOpen; if (this.isOpen) { // Focus first menu item when opening setTimeout(() => { const menuItems = this._getMenuItems(); if (menuItems.length > 0) { menuItems[0].focus(); } }, 0); } } /** * Close menu and restore focus */ _closeMenu() { this.isOpen = false; } /** * Focus the menu toggle button */ _focusToggle() { const toggle = this.shadowRoot.querySelector(".menuToggle"); if (toggle) { toggle.focus(); } } /** * Get all focusable menu items */ _getMenuItems() { const menu = this.shadowRoot.querySelector(".user-menu"); if (!menu) return []; const items = menu.querySelectorAll("slot"); const menuItems = []; items.forEach((slot) => { const assignedElements = slot.assignedElements(); assignedElements.forEach((el) => { // Find focusable elements within slotted content const focusable = el.matches('a, button, [tabindex="0"]') ? [el] : el.querySelectorAll('a, button, [tabindex="0"]'); menuItems.push(...focusable); }); }); return menuItems; } /** * Get current focused menu item index */ _getCurrentMenuItemIndex(menuItems) { const activeElement = this.shadowRoot.activeElement || document.activeElement; return menuItems.indexOf(activeElement); } /** * Focus next menu item */ _focusNextItem(menuItems, currentIndex) { const nextIndex = currentIndex < menuItems.length - 1 ? currentIndex + 1 : 0; if (menuItems[nextIndex]) { menuItems[nextIndex].focus(); } } /** * Focus previous menu item */ _focusPreviousItem(menuItems, currentIndex) { const prevIndex = currentIndex > 0 ? currentIndex - 1 : menuItems.length - 1; if (menuItems[prevIndex]) { menuItems[prevIndex].focus(); } } /** * Focus first menu item */ _focusFirstItem(menuItems) { if (menuItems[0]) { menuItems[0].focus(); } } /** * Focus last menu item */ _focusLastItem(menuItems) { if (menuItems[menuItems.length - 1]) { menuItems[menuItems.length - 1].focus(); } } } customElements.define(AppHaxUserMenu.tag, AppHaxUserMenu); ================================================ FILE: elements/app-hax/lib/v2/app-hax-wired-toggle.js ================================================ import { autorun, toJS } from "mobx"; import { html, css } from "lit"; import { store } from "./AppHaxStore.js"; import { WiredDarkmodeToggle } from "@haxtheweb/haxcms-elements/lib/core/ui/wired-darkmode-toggle/wired-darkmode-toggle.js"; import { SimpleTourFinder } from "@haxtheweb/simple-popover/lib/SimpleTourFinder.js"; export class AppHAXWiredToggle extends SimpleTourFinder(WiredDarkmodeToggle) { constructor() { super(); this.tourName = "hax"; // Create a media query to monitor platform color scheme changes this.darkModeMediaQuery = globalThis.matchMedia( "(prefers-color-scheme: dark)", ); // Function to handle both autorun updates and media query changes this._updateToggleState = () => { this.checked = toJS(store.darkMode); // Disable toggle when platform is in dark mode, preventing switch to light mode if (this.darkModeMediaQuery.matches) { this.disabled = true; } else { this.disabled = false; } }; // Set up autorun for store changes autorun(this._updateToggleState); // Listen for platform color scheme changes this.darkModeMediaQuery.addEventListener("change", this._updateToggleState); } static get tag() { return "app-hax-wired-toggle"; } disconnectedCallback() { super.disconnectedCallback(); // Clean up media query event listener if (this.darkModeMediaQuery && this._updateToggleState) { this.darkModeMediaQuery.removeEventListener( "change", this._updateToggleState, ); } } updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { if (propName === "checked" && oldValue !== undefined) { store.darkMode = this[propName]; } }); } static get styles() { return [ super.styles, css` /* Screen reader only text */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } `, ]; } render() { return html`
    ${super.render()}
    Toggle between light and dark mode themes
    You can toggle your user interface between "light" and "dark" for your viewing enjoyment.
    `; } } customElements.define(AppHAXWiredToggle.tag, AppHAXWiredToggle); ================================================ FILE: elements/app-hax/lib/v2/skeleton-loader.js ================================================ /** * Skeleton Loader Utility * * Handles loading and processing skeleton files for the app-hax v2 system. * Since skeleton files now match the createSite API format directly, * this utility focuses on loading, validation, and metadata extraction. */ export class SkeletonLoader { /** * Load skeleton from JSON data and prepare for app-hax usage * @param {Object} skeletonData - Raw skeleton JSON data * @param {Object} options - Loading options * @returns {Object} Processed skeleton ready for app-hax */ static loadSkeleton(skeletonData, options = {}) { // Validate skeleton format if (!this.isValidSkeleton(skeletonData)) { throw new Error("Invalid skeleton format"); } // Extract metadata for app-hax use case display const useCaseData = { dataType: "skeleton", useCaseTitle: skeletonData.meta.useCaseTitle || skeletonData.meta.name, useCaseDescription: skeletonData.meta.useCaseDescription || skeletonData.meta.description, useCaseImage: skeletonData.meta.useCaseImage || options.defaultImage || "", useCaseIcon: options.defaultIcons || [ { icon: "hax:site", tooltip: "Site Template" }, ], useCaseTag: this.extractTags(skeletonData), demoLink: skeletonData.meta.sourceUrl || "#", originalData: skeletonData, // App-hax specific properties isSelected: false, showContinue: false, }; return { // Use case display data ...useCaseData, // Direct createSite API data (no transformation needed) createSiteData: { site: skeletonData.site, build: skeletonData.build, theme: skeletonData.theme, }, }; } /** * Extract tags for filtering from skeleton * @param {Object} skeleton - Skeleton data * @returns {Array} Tags array */ static extractTags(skeleton) { const tags = []; // Add categories and tags from meta if (skeleton.meta.category && Array.isArray(skeleton.meta.category)) { tags.push(...skeleton.meta.category); } if (skeleton.meta.tags && Array.isArray(skeleton.meta.tags)) { tags.push(...skeleton.meta.tags); } // Add build type as tag if (skeleton.build && skeleton.build.type) { tags.push(skeleton.build.type); } // Add theme as tag if (skeleton.site && skeleton.site.theme) { tags.push(`theme-${skeleton.site.theme}`); } // Deduplicate and filter empty return [...new Set(tags.filter((tag) => tag && tag.trim() !== ""))]; } /** * Validate skeleton format * @param {Object} skeleton - Skeleton to validate * @returns {boolean} Is valid skeleton */ static isValidSkeleton(skeleton) { if (!skeleton || typeof skeleton !== "object") return false; // Check required top-level structure if (!skeleton.meta || skeleton.meta.type !== "skeleton") return false; if (!skeleton.site || !skeleton.build) return false; // Check site structure if (!skeleton.site.name || !skeleton.site.theme) return false; // Check build structure if (!skeleton.build.items || !Array.isArray(skeleton.build.items)) return false; return true; } /** * Load multiple skeletons from an array of skeleton data * @param {Array} skeletonArray - Array of skeleton JSON objects * @param {Object} options - Loading options * @returns {Array} Array of processed skeletons */ static loadSkeletons(skeletonArray, options = {}) { if (!Array.isArray(skeletonArray)) { throw new Error("Expected array of skeletons"); } return skeletonArray .map((skeleton, index) => { try { return this.loadSkeleton(skeleton, { ...options, index, }); } catch (error) { console.warn(`Failed to load skeleton at index ${index}:`, error); return null; } }) .filter(Boolean); // Remove failed loads } /** * Apply user customizations to skeleton createSite data * @param {Object} skeleton - Processed skeleton from loadSkeleton() * @param {Object} customizations - User customizations * @returns {Object} CreateSite data with customizations applied */ static applyCustomizations(skeleton, customizations = {}) { const createSiteData = JSON.parse(JSON.stringify(skeleton.createSiteData)); // Deep clone // Apply site customizations if (customizations.siteName) { createSiteData.site.name = customizations.siteName; } if (customizations.siteDescription) { createSiteData.site.description = customizations.siteDescription; } if (customizations.theme) { createSiteData.site.theme = customizations.theme; } // Apply theme customizations if (customizations.color) { createSiteData.theme.color = customizations.color; } if (customizations.icon) { createSiteData.theme.icon = customizations.icon; } // Apply any additional theme settings if (customizations.themeSettings) { Object.assign(createSiteData.theme, customizations.themeSettings); } return createSiteData; } /** * Generate skeleton metadata for directory processing * @param {Object} skeleton - Skeleton data * @returns {Object} Metadata for backend use */ static generateSkeletonMetadata(skeleton) { return { name: skeleton.meta.name, title: skeleton.meta.useCaseTitle || skeleton.meta.name, description: skeleton.meta.useCaseDescription || skeleton.meta.description, type: skeleton.build.type || "skeleton", theme: skeleton.site.theme, itemCount: skeleton.build.items ? skeleton.build.items.length : 0, fileCount: skeleton.build.files ? skeleton.build.files.length : 0, created: skeleton.meta.created, tags: this.extractTags(skeleton), sourceUrl: skeleton.meta.sourceUrl || null, }; } } export default SkeletonLoader; ================================================ FILE: elements/app-hax/lib/v2/skeleton-uuid-manager.js ================================================ /** * UUID Manager for Skeleton Generation * Handles UUID generation, mapping, and rewriting for skeleton templates */ export class SkeletonUuidManager { constructor() { this.uuidMap = new Map(); this.usedUuids = new Set(); } /** * Generate a new UUID v4 * @returns {string} UUID */ generateUuid() { // Simple UUID v4 generation without crypto dependency return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace( /[xy]/g, function (c) { const r = (Math.random() * 16) | 0; const v = c === "x" ? r : (r & 0x3) | 0x8; return v.toString(16); }, ); } /** * Get or create UUID for an item * @param {string} originalId - Original item ID * @returns {string} UUID */ getUuidForItem(originalId) { if (this.uuidMap.has(originalId)) { return this.uuidMap.get(originalId); } let newUuid; do { newUuid = this.generateUuid(); } while (this.usedUuids.has(newUuid)); this.uuidMap.set(originalId, newUuid); this.usedUuids.add(newUuid); return newUuid; } /** * Create mapping for parent-child relationships * @param {Array} items - Site items * @returns {Object} UUID mapping with relationships */ createRelationshipMap(items) { const relationships = {}; items.forEach((item) => { const itemUuid = this.getUuidForItem(item.id); relationships[itemUuid] = { originalId: item.id, uuid: itemUuid, parentUuid: item.parent ? this.getUuidForItem(item.parent) : null, children: [], }; }); // Build children arrays Object.values(relationships).forEach((item) => { if (item.parentUuid && relationships[item.parentUuid]) { relationships[item.parentUuid].children.push(item.uuid); } }); return relationships; } /** * Rewrite UUIDs in skeleton data for new site creation * @param {Object} skeleton - Skeleton data * @returns {Object} Skeleton with new UUIDs */ rewriteSkeletonUuids(skeleton) { const newManager = new SkeletonUuidManager(); const oldToNewMap = new Map(); // Create new UUIDs for all items skeleton.structure.forEach((item) => { if (item.uuid) { const newUuid = newManager.generateUuid(); oldToNewMap.set(item.uuid, newUuid); } }); // Rewrite structure with new UUIDs const newStructure = skeleton.structure.map((item) => { const newItem = { ...item }; if (item.uuid) { newItem.uuid = oldToNewMap.get(item.uuid); } if (item.parentUuid && oldToNewMap.has(item.parentUuid)) { newItem.parentUuid = oldToNewMap.get(item.parentUuid); } return newItem; }); return { ...skeleton, structure: newStructure, meta: { ...skeleton.meta, created: new Date().toISOString(), sourceUuids: "rewritten", }, }; } /** * Reset the manager */ reset() { this.uuidMap.clear(); this.usedUuids.clear(); } } export default SkeletonUuidManager; ================================================ FILE: elements/app-hax/lib/wired-darkmode-toggle/wired-darkmode-toggle.js ================================================ import { rectangle, hachureEllipseFill, ellipse, svgNode, } from "wired-elements/lib/wired-lib.js"; import { WiredToggle } from "wired-elements/lib/wired-toggle.js"; import { html, css, unsafeCSS } from "lit"; // need to highjack in order to alter the scale so we can fit our icon // for states const sun = new URL("./images/sunIcon.png", import.meta.url).href; const moon = new URL("./images/moonIcon.png", import.meta.url).href; export class WiredDarkmodeToggle extends WiredToggle { constructor() { super(); this.checked = false; this.label = "Dark mode"; this.knobFill = svgNode("circle"); } // eslint-disable-next-line class-methods-use-this canvasSize() { return [100, 48]; } static get tag() { return "wired-darkmode-toggle"; } draw(svg, size) { //const rect = rectangle(svg, 0, 0, size[0], 48, this.seed); //rect.classList.add("toggle-bar"); this.knob = svgNode("g"); this.knob.classList.add("knob"); svg.appendChild(this.knob); this.knobFill.setAttribute("cx", 26); this.knobFill.setAttribute("cy", 26); this.knobFill.setAttribute("r", 20); this.knobFill.setAttribute( "style", "fill: var(--wired-toggle-off-color); transition: fill 0.3s ease-in-out;", ); this.knobFill.classList.add("knobfill"); this.knob.appendChild(this.knobFill); ellipse(this.knob, 26, 26, 40, 40, this.seed); } toggleMode(checked) { if (checked) { this.knobFill.setAttribute( "style", "fill: var(--wired-toggle-on-color);", ); } else { this.knobFill.setAttribute( "style", "fill: var(--wired-toggle-off-color);", ); } } onChange(event) { this.checked = event.target.checked; this.toggleMode(this.checked); this.dispatchEvent(new Event("change", { bubbles: true, composed: true })); } static get properties() { return { checked: { type: Boolean, reflect: true, }, disabled: { type: Boolean, reflect: true, }, label: { type: String, }, }; } render() { return html`
    `; } static get styles() { return [ super.styles, css` :host { opacity: 1; display: inline-flex; vertical-align: top; } :host div { background-image: url("${unsafeCSS(sun)}"); background-repeat: no-repeat; --wired-toggle-off-color: var(--simple-colors-fixed-theme-amber-7); --wired-toggle-on-color: var( --simple-colors-fixed-theme-light-blue-9 ); background-position-x: 60px; background-position-y: 8px; width: 100px; display: inline-flex; } :host([checked]) div { background-image: url("${unsafeCSS(moon)}"); background-position-x: 12px; background-position-y: 12px; background-size: 22px, 22px; } :host([disabled]) { opacity: 0.5; pointer-events: none; cursor: not-allowed; } input { width: 100px; height: 48px; padding: 0; margin: 0; } label { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } /*img { top: 8px; max-width: 20 height: 35; }*/ `, ]; } } globalThis.customElements.define(WiredDarkmodeToggle.tag, WiredDarkmodeToggle); ================================================ FILE: elements/app-hax/locales/app-hax.af.json ================================================ { "selectPage": "Kies bladsy", "backToSiteList": "Terug na werfslys", "listMySites": "Lys my werwe", "cancel": "Kanselleer", "editDetails": "Bladsy besonderhede", "add": "Voeg by", "editSettings": "Redigeer instellings", "source": "Bron", "viewSource": "Bekyk bron", "findMedia": "Vind media", "undo": "Ontdoen", "redo": "Herdoen", "media": "Media", "outline": "Uiteensetting", "blocks": "Blokke", "addBlock": "Voeg blok by", "addPage": "Voeg bladsy by", "addChildPage": "Voeg kinderblad by", "clonePage": "Kloon bladsy", "delete": "Vee bladsy uit", "siteSettings": "Werf instellings", "close": "Sluit", "settings": "Instellings", "edit": "Redigeer", "configureBlock": "Konfigureer blok", "configure": "Konfigureer", "save": "Stoor", "home": "Tuis", "startNewJourney": "Begin nuwe reis", "newJourney": "Nuwe Reis", "accountInfo": "Rekening Info", "outlineDesigner": "Uiteensetting ontwerper", "pageOutline": "Bladsy uiteensetting", "more": "Meer", "siteActions": "Werf aksies", "insights": "Insigte paneelbord", "merlin": "Merlin", "summonMerlin": "Roep Merlin", "logOut": "Teken uit", "menu": "Kieslys", "showMore": "Wys meer" } ================================================ FILE: elements/app-hax/locales/app-hax.am.json ================================================ { "selectPage": "ገፅ ምረጥ", "backToSiteList": "ወደ ድረ-ገፅ ዝርዝር መመለስ", "listMySites": "የእኔ ድረ-ገፆች ዝርዝር", "cancel": "ሰርዝ", "editDetails": "ገፅ ዝርዝሮች", "add": "አክል", "editSettings": "ቅንብሮችን አስተካከል", "source": "ምንጭ", "viewSource": "ምንጭ ተመልከት", "findMedia": "ሚዲያ አግኝ", "undo": "ወደ ኋላ መመለስ", "redo": "እንደገና አከናውን", "media": "ሚዲያ", "outline": "ወጣቢ ስእል", "blocks": "ብሎኮች", "addBlock": "ብሎክ አክል", "addPage": "ገፅ አክል", "addChildPage": "ልጅ ገፅ አክል", "clonePage": "ገፅን አንጸባርቅ", "delete": "ገፅ ሰርዝ", "siteSettings": "የድረ-ገፅ ቅንብሮች", "close": "ዝጋ", "settings": "ቅንብሮች", "edit": "አስተካክል", "configureBlock": "ብሎክን ያዋቅሩ", "configure": "አዋቅር", "save": "አስቀምጥ", "home": "ቤት", "startNewJourney": "አዲስ ጉዞ ጀምር", "newJourney": "አዲስ ጉዞ", "accountInfo": "የመለያ መረጃ", "outlineDesigner": "ወጣቢ ስእል ዲዛይነር", "pageOutline": "ገፅ ወጣቢ ስእል", "more": "ተጨማሪ", "siteActions": "የድረ-ገፅ እርምጃዎች", "insights": "ግንዛቤዎች ዳሽቦርድ", "merlin": "መርሊን", "summonMerlin": "መርሊንን ጥራ", "logOut": "ውጣ", "menu": "ዝርዝር", "showMore": "ተጨማሪ አሳይ" } ================================================ FILE: elements/app-hax/locales/app-hax.ar.json ================================================ { "selectPage": "اختر الصفحة", "backToSiteList": "العودة إلى قائمة المواقع", "listMySites": "اعرض مواقعي", "cancel": "إلغاء", "editDetails": "تفاصيل الصفحة", "add": "إضافة", "editSettings": "تعديل الإعدادات", "source": "المصدر", "viewSource": "عرض المصدر", "findMedia": "البحث عن الوسائط", "undo": "تراجع", "redo": "إعادة", "media": "الوسائط", "outline": "المخطط", "blocks": "الكتل", "addBlock": "إضافة كتلة", "addPage": "إضافة صفحة", "addChildPage": "إضافة صفحة فرعية", "clonePage": "استنساخ الصفحة", "delete": "حذف الصفحة", "siteSettings": "إعدادات الموقع", "close": "إغلاق", "settings": "الإعدادات", "edit": "تحرير", "configureBlock": "تكوين الكتلة", "configure": "تكوين", "save": "حفظ", "home": "الرئيسية", "startNewJourney": "بدء رحلة جديدة", "newJourney": "رحلة جديدة", "accountInfo": "معلومات الحساب", "outlineDesigner": "مصمم المخطط", "pageOutline": "مخطط الصفحة", "more": "المزيد", "siteActions": "إجراءات الموقع", "insights": "لوحة الرؤى", "merlin": "مرلين", "summonMerlin": "استدعاء مرلين", "logOut": "تسجيل خروج", "menu": "القائمة", "showMore": "المزيد" } ================================================ FILE: elements/app-hax/locales/app-hax.az.json ================================================ { "selectPage": "Səhifə seç", "backToSiteList": "Sayt siyahısına geri dön", "listMySites": "Saytlarımı göstər", "cancel": "Ləğv et", "editDetails": "Səhifə təfərrüatları", "add": "Əlavə et", "editSettings": "Parametrləri redaktə et", "source": "Mənbə", "viewSource": "Mənbəni gör", "findMedia": "Media tap", "undo": "Geri al", "redo": "Təkrarla", "media": "Media", "outline": "Kontur", "blocks": "Bloklar", "addBlock": "Blok əlavə et", "addPage": "Səhifə əlavə et", "addChildPage": "Alt səhifə əlavə et", "clonePage": "Səhifəni kopyala", "delete": "Səhifəni sil", "siteSettings": "Sayt parametrləri", "close": "Bağla", "settings": "Parametrlər", "edit": "Redaktə et", "configureBlock": "Bloku konfiqurasiya et", "configure": "Konfiqurasiya et", "save": "Yadda saxla", "home": "Ana səhifə", "startNewJourney": "Yeni səyahətə başla", "newJourney": "Yeni Səyahət", "accountInfo": "Hesab Məlumatları", "outlineDesigner": "Kontur dizayneri", "pageOutline": "Səhifə konturu", "more": "Daha çox", "siteActions": "Sayt əməliyyatları", "insights": "Analitik panel", "merlin": "Merlin", "summonMerlin": "Merlini çağır", "logOut": "Çıxış", "menu": "Menyu", "showMore": "Daha çox göstər" } ================================================ FILE: elements/app-hax/locales/app-hax.be.json ================================================ { "selectPage": "Выбраць старонку", "backToSiteList": "Назад да спісу сайтаў", "listMySites": "Спіс маіх сайтаў", "cancel": "Скасаваць", "editDetails": "Падрабязнасці старонкі", "add": "Дадаць", "editSettings": "Рэдагаваць налады", "source": "Крыніца", "viewSource": "Прагледзець крыніцу", "findMedia": "Знайсці медыя", "undo": "Адмяніць", "redo": "Паўтарыць", "media": "Медыя", "outline": "Контур", "blocks": "Блокі", "addBlock": "Дадаць блок", "addPage": "Дадаць старонку", "addChildPage": "Дадаць даччыную старонку", "clonePage": "Капіраваць старонку", "delete": "Выдаліць старонку", "siteSettings": "Налады сайта", "close": "Зачыніць", "settings": "Налады", "edit": "Рэдагаваць", "configureBlock": "Канфігураваць блок", "configure": "Канфігураваць", "save": "Захаваць", "home": "Галоўная", "startNewJourney": "Пачаць новае падарожжа", "newJourney": "Новае падарожжа", "accountInfo": "Інфармацыя пра рахунак", "outlineDesigner": "Дызайнер контураў", "pageOutline": "Контур старонкі", "more": "Больш", "siteActions": "Дзеянні сайта", "insights": "Панэль аналітыкі", "merlin": "Мерлін", "summonMerlin": "Выклікаць Мерліна", "logOut": "Выйсці", "menu": "Меню", "showMore": "Паказаць больш" } ================================================ FILE: elements/app-hax/locales/app-hax.bg.json ================================================ { "selectPage": "Изберете страница", "backToSiteList": "Назад към списъка на сайтовете", "listMySites": "Списък на моите сайтове", "cancel": "Отказ", "editDetails": "Детайли за страницата", "add": "Добави", "editSettings": "Редактирай настройки", "source": "Източник", "viewSource": "Виж източника", "findMedia": "Намери медия", "undo": "Отмени", "redo": "Повтори", "media": "Медия", "outline": "План", "blocks": "Блокове", "addBlock": "Добави блок", "addPage": "Добави страница", "addChildPage": "Добави дъщерна страница", "clonePage": "Клонирай страница", "delete": "Изтрий страница", "siteSettings": "Настройки на сайта", "close": "Затвори", "settings": "Настройки", "edit": "Редактирай", "configureBlock": "Конфигурирай блок", "configure": "Конфигурирай", "save": "Запази", "home": "Начало", "startNewJourney": "Започни ново пътешествие", "newJourney": "Ново пътешествие", "accountInfo": "Информация за акаунта", "outlineDesigner": "Дизайнер на планове", "pageOutline": "План на страницата", "more": "Още", "siteActions": "Действия на сайта", "insights": "Табло за анализи", "merlin": "Мерлин", "summonMerlin": "Извикай Мерлин", "logOut": "Излез", "menu": "Меню", "showMore": "Покажи още" } ================================================ FILE: elements/app-hax/locales/app-hax.bn.json ================================================ { "selectPage": "পৃষ্ঠা নির্বাচন করুন", "backToSiteList": "সাইটের তালিকায় ফিরে যান", "listMySites": "আমার সাইটগুলি দেখান", "cancel": "বাতিল", "editDetails": "পৃষ্ঠার বিস্তারিত", "add": "যোগ করুন", "editSettings": "সেটিংস সম্পাদনা করুন", "source": "উৎস", "viewSource": "উৎস দেখুন", "findMedia": "মিডিয়া খুঁজুন", "undo": "পূর্বাবস্থায় ফিরান", "redo": "আবার করুন", "media": "মিডিয়া", "outline": "রূপরেখা", "blocks": "ব্লক", "addBlock": "ব্লক যোগ করুন", "addPage": "পৃষ্ঠা যোগ করুন", "addChildPage": "শিশু পৃষ্ঠা যোগ করুন", "clonePage": "পৃষ্ঠা ক্লোন করুন", "delete": "পৃষ্ঠা মুছুন", "siteSettings": "সাইট সেটিংস", "close": "বন্ধ করুন", "settings": "সেটিংস", "edit": "সম্পাদনা করুন", "configureBlock": "ব্লক কনফিগার করুন", "configure": "কনফিগার করুন", "save": "সংরক্ষণ করুন", "home": "হোম", "startNewJourney": "নতুন যাত্রা শুরু করুন", "newJourney": "নতুন যাত্রা", "accountInfo": "অ্যাকাউন্টের তথ্য", "outlineDesigner": "রূপরেখা ডিজাইনার", "pageOutline": "পৃষ্ঠার রূপরেখা", "more": "আরো", "siteActions": "সাইটের ক্রিয়া", "insights": "অন্তর্দৃষ্টি ড্যাশবোর্ড", "merlin": "মার্লিন", "summonMerlin": "মার্লিনকে ডাকুন", "logOut": "লগ আউট", "menu": "মেনু", "showMore": "আরো দেখান" } ================================================ FILE: elements/app-hax/locales/app-hax.bs.json ================================================ { "selectPage": "Odaberite stranicu", "backToSiteList": "Povratak na listu sajtova", "listMySites": "Lista mojih sajtova", "cancel": "Odustani", "editDetails": "Detalji stranice", "add": "Dodaj", "editSettings": "Uredi postavke", "source": "Izvor", "viewSource": "Prikaži izvor", "findMedia": "Pronađi medije", "undo": "Poništi", "redo": "Ponovi", "media": "Mediji", "outline": "Pregled", "blocks": "Blokovi", "addBlock": "Dodaj blok", "addPage": "Dodaj stranicu", "addChildPage": "Dodaj podstranicu", "clonePage": "Kloniraj stranicu", "delete": "Obriši stranicu", "siteSettings": "Postavke sajta", "close": "Zatvori", "settings": "Postavke", "edit": "Uredi", "configureBlock": "Konfiguriši blok", "configure": "Konfiguriši", "save": "Sačuvaj", "home": "Početna", "startNewJourney": "Započni novo putovanje", "newJourney": "Novo putovanje", "accountInfo": "Informacije računa", "outlineDesigner": "Dizajner pregleda", "pageOutline": "Pregled stranice", "more": "Više", "siteActions": "Akcije sajta", "insights": "Kontrolna tabla uvida", "merlin": "Merlin", "summonMerlin": "Pozovi Merlina", "logOut": "Odjavi se", "menu": "Meni", "showMore": "Prikaži više" } ================================================ FILE: elements/app-hax/locales/app-hax.ca.json ================================================ { "selectPage": "Selecciona pàgina", "backToSiteList": "Torna a la llista de llocs", "listMySites": "Llista els meus llocs", "cancel": "Cancel·la", "editDetails": "Detalls de la pàgina", "add": "Afegeix", "editSettings": "Edita configuració", "source": "Font", "viewSource": "Veure font", "findMedia": "Cercar mitjans", "undo": "Desfés", "redo": "Refés", "media": "Mitjans", "outline": "Esquema", "blocks": "Blocs", "addBlock": "Afegeix bloc", "addPage": "Afegeix pàgina", "addChildPage": "Afegeix subpàgina", "clonePage": "Clona pàgina", "delete": "Elimina pàgina", "siteSettings": "Configuració del lloc", "close": "Tanca", "settings": "Configuració", "edit": "Edita", "configureBlock": "Configura bloc", "configure": "Configura", "save": "Desa", "home": "Inici", "startNewJourney": "Comencça nou viatge", "newJourney": "Nou viatge", "accountInfo": "Informació del compte", "outlineDesigner": "Dissenyador d'esquemes", "pageOutline": "Esquema de la pàgina", "more": "Més", "siteActions": "Accions del lloc", "insights": "Tauler d'anàlisis", "merlin": "Merlin", "summonMerlin": "Invoca Merlin", "logOut": "Tancar sessió", "menu": "Menú", "showMore": "Mostra més" } ================================================ FILE: elements/app-hax/locales/app-hax.co.json ================================================ { "selectPage": "Selezziunà pagina", "backToSiteList": "Torna à a lista di siti", "listMySites": "Mostra i mo siti", "cancel": "Annullà", "editDetails": "Dettagli di a pagina", "add": "Aghjunghje", "editSettings": "Mudificà e preferenze", "source": "Fonte", "viewSource": "Vede a fonte", "findMedia": "Truvà media", "undo": "Annullà", "redo": "Rifà", "media": "Media", "outline": "Schema", "blocks": "Blocchi", "addBlock": "Aghjunghje bloccu", "addPage": "Aghjunghje pagina", "addChildPage": "Aghjunghje sottupagina", "clonePage": "Duplicà pagina", "delete": "Sguassà pagina", "siteSettings": "Preferenze di u situ", "close": "Chjude", "settings": "Preferenze", "edit": "Mudificà", "configureBlock": "Cunfigurà bloccu", "configure": "Cunfigurà", "save": "Salvà", "home": "Casa", "startNewJourney": "Inizià novu viaghju", "newJourney": "Novu Viaghju", "accountInfo": "Infurmazioni di u contu", "outlineDesigner": "Cuncettore di schema", "pageOutline": "Schema di a pagina", "more": "Di più", "siteActions": "Azzioni di u situ", "insights": "Pannellu d'analisi", "merlin": "Merlin", "summonMerlin": "Invucà Merlin", "logOut": "Esce", "menu": "Menu", "showMore": "Mostra di più" } ================================================ FILE: elements/app-hax/locales/app-hax.cs.json ================================================ { "selectPage": "Vybrat stránku", "backToSiteList": "Zpět na seznam stránek", "listMySites": "Seznam mých stránek", "cancel": "Zrušit", "editDetails": "Podrobnosti stránky", "add": "Přidat", "editSettings": "Upravit nastavení", "source": "Zdroj", "viewSource": "Zobrazit zdroj", "findMedia": "Najít média", "undo": "Zpět", "redo": "Opakovat", "media": "Média", "outline": "Osnova", "blocks": "Bloky", "addBlock": "Přidat blok", "addPage": "Přidat stránku", "addChildPage": "Přidat podstránku", "clonePage": "Klonovat stránku", "delete": "Smazat stránku", "siteSettings": "Nastavení stránek", "close": "Zavřít", "settings": "Nastavení", "edit": "Upravit", "configureBlock": "Konfigurovat blok", "configure": "Konfigurovat", "save": "Uložit", "home": "Domů", "startNewJourney": "Začít novou cestu", "newJourney": "Nová cesta", "accountInfo": "Informace o účtu", "outlineDesigner": "Návrhář osnov", "pageOutline": "Osnova stránky", "more": "Více", "siteActions": "Akce stránky", "insights": "Přehled analýz", "merlin": "Merlin", "summonMerlin": "Pvolat Merlina", "logOut": "Odhlásit se", "menu": "Menu", "showMore": "Zobrazit více" } ================================================ FILE: elements/app-hax/locales/app-hax.cy.json ================================================ { "selectPage": "Dewis tudalen", "backToSiteList": "Yn ôl i'r rhestr safleoedd", "listMySites": "Rhestr fy safleoedd", "cancel": "Canslo", "editDetails": "Manylion tudalen", "add": "Ychwanegu", "editSettings": "Golygu gosodiadau", "source": "Ffynhonnell", "viewSource": "Gweld ffynhonnell", "findMedia": "Dod o hyd i gyfryngau", "undo": "Dadwneud", "redo": "Ailwneud", "media": "Cyfryngau", "outline": "Amlinell", "blocks": "Blociau", "addBlock": "Ychwanegu bloc", "addPage": "Ychwanegu tudalen", "addChildPage": "Ychwanegu is-dudalen", "clonePage": "Clonio tudalen", "delete": "Dileu tudalen", "siteSettings": "Gosodiadau safle", "close": "Cau", "settings": "Gosodiadau", "edit": "Golygu", "configureBlock": "Ffurfweddu bloc", "configure": "Ffurfweddu", "save": "Cadw", "home": "Cartref", "startNewJourney": "Dechrau taith newydd", "newJourney": "Taith Newydd", "accountInfo": "Gwybodaeth Cyfrif", "outlineDesigner": "Dylunydd amlinell", "pageOutline": "Amlinell tudalen", "more": "Mwy", "siteActions": "Gweithredoedd safle", "insights": "Dashfwrdd mewnwelediadau", "merlin": "Merlin", "summonMerlin": "Galw Merlin", "logOut": "Allgofnodi", "menu": "Dewislen", "showMore": "Dangos mwy" } ================================================ FILE: elements/app-hax/locales/app-hax.da.json ================================================ { "selectPage": "Vælg side", "backToSiteList": "Tilbage til siteliste", "listMySites": "Vis mine sites", "cancel": "Annuller", "editDetails": "Sidedetaljer", "add": "Tilføj", "editSettings": "Rediger indstillinger", "source": "Kilde", "viewSource": "Se kilde", "findMedia": "Find medier", "undo": "Fortryd", "redo": "Gendan", "media": "Medier", "outline": "Oversigt", "blocks": "Blokke", "addBlock": "Tilføj blok", "addPage": "Tilføj side", "addChildPage": "Tilføj underside", "clonePage": "Klon side", "delete": "Slet side", "siteSettings": "Siteindstillinger", "close": "Luk", "settings": "Indstillinger", "edit": "Rediger", "configureBlock": "Konfigurer blok", "configure": "Konfigurer", "save": "Gem", "home": "Hjem", "startNewJourney": "Start ny rejse", "newJourney": "Ny rejse", "accountInfo": "Kontoinformation", "outlineDesigner": "Oversigtsdesigner", "pageOutline": "Sideoversigt", "more": "Mere", "siteActions": "Sitehandlinger", "insights": "Indsigt dashboard", "merlin": "Merlin", "summonMerlin": "Kald Merlin", "logOut": "Log ud", "menu": "Menu", "showMore": "Vis mere" } ================================================ FILE: elements/app-hax/locales/app-hax.de.json ================================================ { "selectPage": "Seite auswählen", "backToSiteList": "Zurück zur Seitenliste", "listMySites": "Meine Seiten auflisten", "cancel": "Abbrechen", "editDetails": "Seitendetails", "add": "Hinzufügen", "editSettings": "Einstellungen bearbeiten", "source": "Quelle", "viewSource": "Quelle anzeigen", "findMedia": "Medien finden", "undo": "Rückgängig", "redo": "Wiederholen", "media": "Medien", "outline": "Gliederung", "blocks": "Blöcke", "addBlock": "Block hinzufügen", "addPage": "Seite hinzufügen", "addChildPage": "Unterseite hinzufügen", "clonePage": "Seite klonen", "delete": "Seite löschen", "siteSettings": "Site-Einstellungen", "close": "Schließen", "settings": "Einstellungen", "edit": "Bearbeiten", "configureBlock": "Block konfigurieren", "configure": "Konfigurieren", "save": "Speichern", "home": "Startseite", "startNewJourney": "Neue Reise beginnen", "newJourney": "Neue Reise", "accountInfo": "Kontoinformationen", "outlineDesigner": "Gliederungsdesigner", "pageOutline": "Seitengliederung", "more": "Mehr", "siteActions": "Site-Aktionen", "insights": "Einblicke-Dashboard", "merlin": "Merlin", "summonMerlin": "Merlin beschwören", "logOut": "Abmelden", "menu": "Menü", "showMore": "Mehr" } ================================================ FILE: elements/app-hax/locales/app-hax.el.json ================================================ { "selectPage": "Επιλέξτε σελίδα", "backToSiteList": "Επιστροφή στη λίστα ιστοτόπων", "listMySites": "Λίστα των ιστοτόπων μου", "cancel": "Ακύρωση", "editDetails": "Λεπτομέρειες σελίδας", "add": "Προσθήκη", "editSettings": "Επεξεργασία ρυθμίσεων", "source": "Πηγή", "viewSource": "Προβολή πηγής", "findMedia": "Εύρεση μέσων", "undo": "Αναίρεση", "redo": "Επανάληψη", "media": "Μέσα", "outline": "Περίγραμμα", "blocks": "Μπλοκ", "addBlock": "Προσθήκη μπλοκ", "addPage": "Προσθήκη σελίδας", "addChildPage": "Προσθήκη υποσελίδας", "clonePage": "Κλωνοποίηση σελίδας", "delete": "Διαγραφή σελίδας", "siteSettings": "Ρυθμίσεις ιστοτόπου", "close": "Κλείσιμο", "settings": "Ρυθμίσεις", "edit": "Επεξεργασία", "configureBlock": "Διαμόρφωση μπλοκ", "configure": "Διαμόρφωση", "save": "Αποθήκευση", "home": "Αρχική", "startNewJourney": "Έναρξη νέου ταξιδιού", "newJourney": "Νέο ταξίδι", "accountInfo": "Στοιχεία λογαριασμού", "outlineDesigner": "Σχεδιαστής περιγράμματος", "pageOutline": "Περίγραμμα σελίδας", "more": "Περισσότερα", "siteActions": "Ενέργειες ιστοτόπου", "insights": "Πίνακας αναλύσεων", "merlin": "Μέρλιν", "summonMerlin": "Κάλεσμα Μέρλιν", "logOut": "Αποσύνδεση", "menu": "Μενού", "showMore": "Εμφάνιση περισσότερων" } ================================================ FILE: elements/app-hax/locales/app-hax.en.json ================================================ { "selectPage": "Select page", "backToSiteList": "Back to site list", "listMySites": "List my sites", "cancel": "Cancel", "editDetails": "Page details", "add": "Add", "editSettings": "Edit settings", "source": "Source", "viewSource": "View source", "findMedia": "Find media", "undo": "Undo", "redo": "Redo", "media": "Media", "outline": "Outline", "blocks": "Blocks", "addBlock": "Add block", "addPage": "Add page", "addChildPage": "Add child page", "clonePage": "Clone page", "delete": "Delete page", "siteSettings": "Site Settings", "close": "Close", "settings": "Settings", "edit": "Edit", "configureBlock": "Configure block", "configure": "Configure", "save": "Save", "home": "Home", "startNewJourney": "Start new journey", "newJourney": "New Journey", "accountInfo": "Account Info", "outlineDesigner": "Site Outline", "pageOutline": "Structure", "more": "More", "siteActions": "Site actions", "insights": "Insights dashboard", "merlin": "Merlin", "summonMerlin": "Summon Merlin", "logOut": "Log out", "menu": "Menu", "showMore": "More" } ================================================ FILE: elements/app-hax/locales/app-hax.eo.json ================================================ { "selectPage": "Elektu paĝon", "backToSiteList": "Reen al retejlisto", "listMySites": "Listi miajn retejojn", "cancel": "Nuligi", "editDetails": "Paĝaj detaloj", "add": "Aldoni", "editSettings": "Redakti agordojn", "source": "Fonto", "viewSource": "Vidi fonton", "findMedia": "Trovi amaskomunikilon", "undo": "Malfari", "redo": "Refari", "media": "Amaskomunikilo", "outline": "Skizo", "blocks": "Blokoj", "addBlock": "Aldoni blokon", "addPage": "Aldoni paĝon", "addChildPage": "Aldoni infanpaĝon", "clonePage": "Kloni paĝon", "delete": "Forŝtreki paĝon", "siteSettings": "Retejaj agordoj", "close": "Fermi", "settings": "Agordoj", "edit": "Redakti", "configureBlock": "Agordi blokon", "configure": "Agordi", "save": "Konservi", "home": "Hejmo", "startNewJourney": "Komenci novan vojaĝon", "newJourney": "Nova Vojaĝo", "accountInfo": "Kontaj Informoj", "outlineDesigner": "Skiza dizajnisto", "pageOutline": "Paĝa skizo", "more": "Pli", "siteActions": "Retejaj agoj", "insights": "Komprenojn tabulo", "merlin": "Merlin", "summonMerlin": "Voki Merlinon", "logOut": "Elsaluti", "menu": "Menuo", "showMore": "Montri pli" } ================================================ FILE: elements/app-hax/locales/app-hax.es.json ================================================ { "selectPage": "Seleccionar página", "backToSiteList": "Volver a la lista de sitios", "listMySites": "Listar mis sitios", "cancel": "Cancelar", "editDetails": "Detalles de la página", "add": "Agregar", "editSettings": "Editar configuración", "source": "Fuente", "viewSource": "Ver fuente", "findMedia": "Buscar medios", "undo": "Deshacer", "redo": "Rehacer", "media": "Medios", "outline": "Esquema", "blocks": "Bloques", "addBlock": "Agregar bloque", "addPage": "Agregar página", "addChildPage": "Agregar página hija", "clonePage": "Clonar página", "delete": "Eliminar página", "siteSettings": "Configuración del sitio", "close": "Cerrar", "settings": "Configuración", "edit": "Editar", "configureBlock": "Configurar bloque", "configure": "Configurar", "save": "Guardar", "home": "Inicio", "startNewJourney": "Comenzar nuevo viaje", "newJourney": "Nuevo Viaje", "accountInfo": "Información de la cuenta", "outlineDesigner": "Diseñador de esquemas", "pageOutline": "Esquema de página", "more": "Más", "siteActions": "Acciones del sitio", "insights": "Panel de información", "merlin": "Merlin", "summonMerlin": "Invocar a Merlin", "logOut": "Cerrar sesión", "menu": "Menú", "showMore": "Mostrar más" } ================================================ FILE: elements/app-hax/locales/app-hax.et.json ================================================ { "selectPage": "Vali lehekülg", "backToSiteList": "Tagasi saitide loendisse", "listMySites": "Kuva minu saidid", "cancel": "Tühista", "editDetails": "Lehe üksikasjad", "add": "Lisa", "editSettings": "Muuda seadeid", "source": "Allikas", "viewSource": "Vaata allikat", "findMedia": "Otsi meediat", "undo": "Võta tagasi", "redo": "Tee uuesti", "media": "Meedia", "outline": "Kirjeldus", "blocks": "Plokid", "addBlock": "Lisa plokk", "addPage": "Lisa lehekülg", "addChildPage": "Lisa alamlehekülg", "clonePage": "Klooni lehekülg", "delete": "Kustuta lehekülg", "siteSettings": "Saidi seaded", "close": "Sulge", "settings": "Seaded", "edit": "Muuda", "configureBlock": "Seadista plokk", "configure": "Seadista", "save": "Salvesta", "home": "Avaleht", "startNewJourney": "Alusta uut teekonda", "newJourney": "Uus teekond", "accountInfo": "Konto info", "outlineDesigner": "Kirjelduse disainer", "pageOutline": "Lehe kirjeldus", "more": "Rohkem", "siteActions": "Saidi toimingud", "insights": "Ülevaate juhtpaneel", "merlin": "Merlin", "summonMerlin": "Kutsu Merlin", "logOut": "Logi välja", "menu": "Menüü", "showMore": "Näita rohkem" } ================================================ FILE: elements/app-hax/locales/app-hax.eu.json ================================================ { "selectPage": "Orrialdea aukeratu", "backToSiteList": "Webguneen zerrendara itzuli", "listMySites": "Nire webguneak zerrendatu", "cancel": "Ezeztatu", "editDetails": "Orrialde xehetasunak", "add": "Gehitu", "editSettings": "Ezarpenak editatu", "source": "Iturria", "viewSource": "Iturria ikusi", "findMedia": "Multimedia aurkitu", "undo": "Desegin", "redo": "Berregin", "media": "Multimedia", "outline": "Eskema", "blocks": "Blokeak", "addBlock": "Blokea gehitu", "addPage": "Orrialdea gehitu", "addChildPage": "Azpi-orrialdea gehitu", "clonePage": "Orrialdea klonatu", "delete": "Orrialdea ezabatu", "siteSettings": "Webgunearen ezarpenak", "close": "Itxi", "settings": "Ezarpenak", "edit": "Editatu", "configureBlock": "Blokea konfiguratu", "configure": "Konfiguratu", "save": "Gorde", "home": "Hasiera", "startNewJourney": "Bidaia berria hasi", "newJourney": "Bidaia Berria", "accountInfo": "Kontuaren Informazioa", "outlineDesigner": "Eskema diseinatzailea", "pageOutline": "Orrialde eskema", "more": "Gehiago", "siteActions": "Webgunearen ekintzak", "insights": "Ikuspegien panela", "merlin": "Merlin", "summonMerlin": "Merlin deitu", "logOut": "Saioa itxi", "menu": "Menua", "showMore": "Gehiago erakutsi" } ================================================ FILE: elements/app-hax/locales/app-hax.fa.json ================================================ { "selectPage": "انتخاب صفحه", "backToSiteList": "بازگشت به لیست سایت‌ها", "listMySites": "لیست سایت‌های من", "cancel": "لغو", "editDetails": "جزئیات صفحو", "add": "افزودن", "editSettings": "ویرایش تنظیمات", "source": "منبع", "viewSource": "مشاهده منبع", "findMedia": "یافتن رسانه", "undo": "بازگرداندن", "redo": "بازانجام", "media": "رسانه", "outline": "طرح کلی", "blocks": "بلوک‌ها", "addBlock": "افزودن بلوک", "addPage": "افزودن صفحه", "addChildPage": "افزودن صفحه زیرمجموعه", "clonePage": "کپی صفحه", "delete": "حذف صفحه", "siteSettings": "تنظیمات سایت", "close": "بستن", "settings": "تنظیمات", "edit": "ویرایش", "configureBlock": "پیکربندی بلوک", "configure": "پیکربندی", "save": "ذخیره", "home": "خانه", "startNewJourney": "شروع سفر جدید", "newJourney": "سفر جدید", "accountInfo": "اطلاعات حساب", "outlineDesigner": "طراح طرح کلی", "pageOutline": "طرح کلی صفحه", "more": "بیشتر", "siteActions": "عملیات سایت", "insights": "داشبورد بینش‌ها", "merlin": "مرلین", "summonMerlin": "فراخوانی مرلین", "logOut": "خروج", "menu": "منو", "showMore": "نمایش بیشتر" } ================================================ FILE: elements/app-hax/locales/app-hax.fi.json ================================================ { "selectPage": "Valitse sivu", "backToSiteList": "Takaisin sivustoluetteloon", "listMySites": "Näytä sivustoni", "cancel": "Peruuta", "editDetails": "Sivun tiedot", "add": "Lisää", "editSettings": "Muokkaa asetuksia", "source": "Lähde", "viewSource": "Näytä lähde", "findMedia": "Etsi mediaa", "undo": "Kumoa", "redo": "Tee uudelleen", "media": "Media", "outline": "Jäsennys", "blocks": "Lohkot", "addBlock": "Lisää lohko", "addPage": "Lisää sivu", "addChildPage": "Lisää alasivu", "clonePage": "Kloonaa sivu", "delete": "Poista sivu", "siteSettings": "Sivuston asetukset", "close": "Sulje", "settings": "Asetukset", "edit": "Muokkaa", "configureBlock": "Määritä lohko", "configure": "Määritä", "save": "Tallenna", "home": "Koti", "startNewJourney": "Aloita uusi matka", "newJourney": "Uusi matka", "accountInfo": "Tilin tiedot", "outlineDesigner": "Jäsennyksen suunnittelija", "pageOutline": "Sivun jäsennys", "more": "Lisää", "siteActions": "Sivuston toiminnot", "insights": "Näkemysten kojelauta", "merlin": "Merlin", "summonMerlin": "Kutsu Merlin", "logOut": "Kirjaudu ulos", "menu": "Valikko", "showMore": "Näytä lisää" } ================================================ FILE: elements/app-hax/locales/app-hax.fo.json ================================================ { "selectPage": "Vel síðu", "backToSiteList": "Aftur til heimasaíðulista", "listMySites": "Lista mínar heimasaíður", "cancel": "Strika", "editDetails": "Síðu smáluti", "add": "Legg í", "editSettings": "Broyt stillingar", "source": "Kelda", "viewSource": "Vís keldu", "findMedia": "Finn miðil", "undo": "Ger aftur", "redo": "Ger um aftur", "media": "Miðil", "outline": "Skipan", "blocks": "Blokkar", "addBlock": "Legg bløkk í", "addPage": "Legg síðu í", "addChildPage": "Legg undersíðu í", "clonePage": "Avrita síðu", "delete": "Strika síðu", "siteSettings": "Heimasaíðustillingar", "close": "Lat", "settings": "Stillingar", "edit": "Broyt", "configureBlock": "Set bløkk upp", "configure": "Set upp", "save": "Goym", "home": "Heim", "startNewJourney": "Byrja nýa ferð", "newJourney": "Ný ferð", "accountInfo": "Kontu upplýsingar", "outlineDesigner": "Skipanarhugskotari", "pageOutline": "Síðuskipan", "more": "Meira", "siteActions": "Heimasaíðu háttir", "insights": "Innísýn dashborð", "merlin": "Merlin", "summonMerlin": "Kall Merlin", "logOut": "Rita út", "menu": "Skrá", "showMore": "Vís meira" } ================================================ FILE: elements/app-hax/locales/app-hax.fr.json ================================================ { "selectPage": "Sélectionner une page", "backToSiteList": "Retour à la liste des sites", "listMySites": "Lister mes sites", "cancel": "Annuler", "editDetails": "Détails de la page", "add": "Ajouter", "editSettings": "Modifier les paramètres", "source": "Source", "viewSource": "Voir la source", "findMedia": "Rechercher des médias", "undo": "Annuler", "redo": "Refaire", "media": "Média", "outline": "Plan", "blocks": "Blocs", "addBlock": "Ajouter un bloc", "addPage": "Ajouter une page", "addChildPage": "Ajouter une page enfant", "clonePage": "Cloner la page", "delete": "Supprimer la page", "siteSettings": "Paramètres du site", "close": "Fermer", "settings": "Paramètres", "edit": "Modifier", "configureBlock": "Configurer le bloc", "configure": "Configurer", "save": "Enregistrer", "home": "Accueil", "startNewJourney": "Commencer un nouveau voyage", "newJourney": "Nouveau voyage", "accountInfo": "Informations du compte", "outlineDesigner": "Concepteur de plan", "pageOutline": "Plan de la page", "more": "Plus", "siteActions": "Actions du site", "insights": "Tableau de bord des aperçus", "merlin": "Merlin", "summonMerlin": "Invoquer Merlin", "logOut": "Se déconnecter", "menu": "Menu", "showMore": "Afficher plus" } ================================================ FILE: elements/app-hax/locales/app-hax.fy.json ================================================ { "selectPage": "Selektearje side", "backToSiteList": "Werom nei sitelist", "listMySites": "List fan myn sites", "cancel": "Ôfbrekke", "editDetails": "Side details", "add": "Tafoegje", "editSettings": "Ynstellings bewurkje", "source": "Boarne", "viewSource": "Boarne besjen", "findMedia": "Media fine", "undo": "Ûngedien meitsje", "redo": "Op 'e nij dwaan", "media": "Media", "outline": "Omtrek", "blocks": "Blokken", "addBlock": "Blok tafoegje", "addPage": "Side tafoegje", "addChildPage": "Bern side tafoegje", "clonePage": "Side klone", "delete": "Side wiskje", "siteSettings": "Site ynstellings", "close": "Slute", "settings": "Ynstellings", "edit": "Bewurkje", "configureBlock": "Blok konfigurearje", "configure": "Konfigurearje", "save": "Bewarje", "home": "Thús", "startNewJourney": "Nije reis begjinne", "newJourney": "Nije Reis", "accountInfo": "Akkountynfo", "outlineDesigner": "Omtrek ûntwerper", "pageOutline": "Side omtrek", "more": "Mear", "siteActions": "Site aksjes", "insights": "Ynsjoch dashboerd", "merlin": "Merlin", "summonMerlin": "Merlin oproppe", "logOut": "Útlogge", "menu": "Menu", "showMore": "Mear sjen litte" } ================================================ FILE: elements/app-hax/locales/app-hax.ga.json ================================================ { "selectPage": "Roghnaigh leathanach", "backToSiteList": "Ar ais chuig liosta na suíomhanna", "listMySites": "Liosta mo shuíomhanna", "cancel": "Cealaigh", "editDetails": "Sonraí an leathanaigh", "add": "Cuir leis", "editSettings": "Cuir na socruithe in eagar", "source": "Foinse", "viewSource": "Féach ar an bhfoinse", "findMedia": "Faigh meáin", "undo": "Cealaigh", "redo": "Déan arís", "media": "Meáin", "outline": "Imlíne", "blocks": "Bloic", "addBlock": "Cuir bloc leis", "addPage": "Cuir leathanach leis", "addChildPage": "Cuir leathanach linbh leis", "clonePage": "Clónáil leathanach", "delete": "Scrios leathanach", "siteSettings": "Socruithe suímh", "close": "Dún", "settings": "Socruithe", "edit": "Cuir in eagar", "configureBlock": "Cumraigh bloc", "configure": "Cumraigh", "save": "Sábháil", "home": "Baile", "startNewJourney": "Tosaigh turas nua", "newJourney": "Turas Nua", "accountInfo": "Eolas Cuntais", "outlineDesigner": "Dearthóir imlíne", "pageOutline": "Imlíne leathanaigh", "more": "Tuilleadh", "siteActions": "Gníomhartha suímh", "insights": "Painéal léargas", "merlin": "Merlin", "summonMerlin": "Glaoigh ar Merlin", "logOut": "Logáil amach", "menu": "Roghchlár", "showMore": "Taispeáin tuilleadh" } ================================================ FILE: elements/app-hax/locales/app-hax.gl.json ================================================ { "selectPage": "Seleccionar páxina", "backToSiteList": "Volver á lista de sitios", "listMySites": "Lista dos meus sitios", "cancel": "Cancelar", "editDetails": "Detalles da páxina", "add": "Engadir", "editSettings": "Editar configuración", "source": "Orixe", "viewSource": "Ver orixe", "findMedia": "Buscar medios", "undo": "Desfacer", "redo": "Refacer", "media": "Medios", "outline": "Esquema", "blocks": "Bloques", "addBlock": "Engadir bloque", "addPage": "Engadir páxina", "addChildPage": "Engadir páxina filla", "clonePage": "Clonar páxina", "delete": "Eliminar páxina", "siteSettings": "Configuración do sitio", "close": "Pechar", "settings": "Configuración", "edit": "Editar", "configureBlock": "Configurar bloque", "configure": "Configurar", "save": "Gardar", "home": "Inicio", "startNewJourney": "Comezar nova viaxe", "newJourney": "Nova Viaxe", "accountInfo": "Información da Conta", "outlineDesigner": "Deseñador de esquemas", "pageOutline": "Esquema da páxina", "more": "Máis", "siteActions": "Accións do sitio", "insights": "Panel de información", "merlin": "Merlin", "summonMerlin": "Invocar a Merlin", "logOut": "Pechar sesión", "menu": "Menú", "showMore": "Mostrar máis" } ================================================ FILE: elements/app-hax/locales/app-hax.gn.json ================================================ { "selectPage": "Jeporavo kuatiavé", "backToSiteList": "Jeku jevy kuatiavéñemi rysyivépe", "listMySites": "Che kuatiavéñemi rysyi", "cancel": "Ani", "editDetails": "Kuatiavé mba'ekúapa", "add": "Mbojuaju", "editSettings": "Moambueá ñemboheko", "source": "Teúve", "viewSource": "Jehecha teúve", "findMedia": "Jeheka ra'anguapy", "undo": "Mboguevi", "redo": "Jejapo jey", "media": "Ra'anguapy", "outline": "Jehaipyre rape", "blocks": "Yketuá", "addBlock": "Mbojuaju yketuá", "addPage": "Mbojuaju kuatiavé", "addChildPage": "Mbojuaju mita'i kuatiavé", "clonePage": "Monguáti kuatiavé", "delete": "Mboguete kuatiavé", "siteSettings": "Kuatiavéñemi ñemboheko", "close": "Mboty", "settings": "Ñemboheko", "edit": "Moambueá", "configureBlock": "Mboheko yketuá", "configure": "Mboheko", "save": "Moiguarei", "home": "Togue", "startNewJourney": "Ñepyrõ peñemi pyahu", "newJourney": "Peñemi Pyahu", "accountInfo": "Cuenta marandu", "outlineDesigner": "Jehaipyre tape jeguará", "pageOutline": "Kuatiavé jehaipyre rape", "more": "Hetavé", "siteActions": "Kuatiavéñemi mba'e", "insights": "Jeikuaa ra'anga pyñenda", "merlin": "Merlin", "summonMerlin": "Hendu Merlin", "logOut": "Jeseha", "menu": "Menú", "showMore": "Jehechauka hetavé" } ================================================ FILE: elements/app-hax/locales/app-hax.gu.json ================================================ { "selectPage": "પેજ પસંદ કરો", "backToSiteList": "સાઇટ યાદીમાં વાપસ જાનો", "listMySites": "મારી સાઇટ્સની યાદી", "cancel": "રદ કરો", "editDetails": "પેજ વિવરણો", "add": "જોડો", "editSettings": "સેટિંગ્સ સંપાદિત કરો", "source": "સ્રોત", "viewSource": "સ્રોત જવો", "findMedia": "મીડિયા શોધો", "undo": "રદ કરો", "redo": "વળી કરો", "media": "મીડિયા", "outline": "રૂપરેખા", "blocks": "બ્લોક્સ", "addBlock": "બ્લોક જોડો", "addPage": "પેજ જોડો", "addChildPage": "બાળ પેજ જોડો", "clonePage": "પેજ ક્લોન કરો", "delete": "પેજ ડિલીટ કરો", "siteSettings": "સાઇટ સેટિંગ્સ", "close": "બંધ કરો", "settings": "સેટિંગ્સ", "edit": "સંપાદન", "configureBlock": "બ્લોક કોન્ફિગર કરો", "configure": "કોન્ફિગર કરો", "save": "સેવ કરો", "home": "ઘર", "startNewJourney": "નવી યાત્રા શરૂ કરો", "newJourney": "નવી યાત્રા", "accountInfo": "ખાતાની માહિતી", "outlineDesigner": "રૂપરેખા ડિજાઇનર", "pageOutline": "પેજ રૂપરેખા", "more": "વધુ", "siteActions": "સાઇટ ક્રિયાઓ", "insights": "અંતરદૃષ્ટિ ડેશબોર્ડ", "merlin": "મર્લિન", "summonMerlin": "મર્લિનને બોલાવો", "logOut": "લોગ આઉટ", "menu": "મેનુ", "showMore": "વધુ દર્શાવો" } ================================================ FILE: elements/app-hax/locales/app-hax.ha.json ================================================ { "selectPage": "Zaɓi shafi", "backToSiteList": "Koma ga lissafin shafukan yanar gizo", "listMySites": "Lissafin shafukan yanar gizo na", "cancel": "Soke", "editDetails": "Bayanan shafi", "add": "Ƙara", "editSettings": "Gyara saiti", "source": "Tushe", "viewSource": "Duba tushe", "findMedia": "Nemo kafofin watsa labarai", "undo": "Mayar da baya", "redo": "Sake yi", "media": "Kafofin watsa labarai", "outline": "Tsarin aiki", "blocks": "Shingen", "addBlock": "Ƙara shinge", "addPage": "Ƙara shafi", "addChildPage": "Ƙara shafin yaro", "clonePage": "Kwafi shafi", "delete": "Share shafi", "siteSettings": "Saitunan shafin yanar gizo", "close": "Rufe", "settings": "Saiti", "edit": "Gyara", "configureBlock": "Saita shinge", "configure": "Saita", "save": "Ajiye", "home": "Gida", "startNewJourney": "Fara sabuwar tafiya", "newJourney": "Sabuwar Tafiya", "accountInfo": "Bayanan Asusun", "outlineDesigner": "Mai tsarin aiki", "pageOutline": "Tsarin aikin shafi", "more": "Kari", "siteActions": "Ayyukan shafin yanar gizo", "insights": "Allon bayani", "merlin": "Merlin", "summonMerlin": "Kira Merlin", "logOut": "Fita", "menu": "Menu", "showMore": "Nuna kari" } ================================================ FILE: elements/app-hax/locales/app-hax.haw.json ================================================ { "selectPage": "Koho i ka 'ao'ao", "backToSiteList": "Ho'i i ka papa inoa pūnaewele", "listMySites": "Papa inoa o ko'u mau pūnaewele", "cancel": "Ho'oki", "editDetails": "Nā kikowaena 'ao'ao", "add": "Ho'ohui", "editSettings": "Ho'ololi i nā ho'onohonoho", "source": "Kumu", "viewSource": "Nānā i ke kumu", "findMedia": "'Imi i ka media", "undo": "Ho'iho'i", "redo": "Hana hou", "media": "Media", "outline": "Palapala kuhikuhi", "blocks": "Nā poloka", "addBlock": "Ho'ohui poloka", "addPage": "Ho'ohui 'ao'ao", "addChildPage": "Ho'ohui 'ao'ao keiki", "clonePage": "Kope i ka 'ao'ao", "delete": "Holoi i ka 'ao'ao", "siteSettings": "Nā ho'onohonoho pūnaewele", "close": "Pani", "settings": "Nā ho'onohonoho", "edit": "Ho'ololi", "configureBlock": "Ho'oponopono i ka poloka", "configure": "Ho'oponopono", "save": "Mālama", "home": "Home", "startNewJourney": "Ho'omaka i ka huaka'i hou", "newJourney": "Huaka'i Hou", "accountInfo": "'Ike Moho'ohana", "outlineDesigner": "Mea hana palapala kuhikuhi", "pageOutline": "Palapala kuhikuhi 'ao'ao", "more": "Hou aku", "siteActions": "Nā hana pūnaewele", "insights": "Papa hale 'ike", "merlin": "Merlin", "summonMerlin": "Kāhea iā Merlin", "logOut": "Ho'oku'u", "menu": "Papa kuhikuhi", "showMore": "Ho'ike hou aku" } ================================================ FILE: elements/app-hax/locales/app-hax.he.json ================================================ { "selectPage": "בחר עמוד", "backToSiteList": "חזר לרשימת אתרים", "listMySites": "רשימת האתרים שלי", "cancel": "ביטול", "editDetails": "פרטי העמוד", "add": "הוסף", "editSettings": "ערוך הגדרות", "source": "מקור", "viewSource": "צפה במקור", "findMedia": "מצא מדיה", "undo": "בטל", "redo": "בצע שוב", "media": "מדיה", "outline": "מתאר", "blocks": "בלוקים", "addBlock": "הוסף בלוק", "addPage": "הוסף עמוד", "addChildPage": "הוסף תת-עמוד", "clonePage": "שכפל עמוד", "delete": "מחק עמוד", "siteSettings": "הגדרות אתר", "close": "סגור", "settings": "הגדרות", "edit": "עריכה", "configureBlock": "הגדר בלוק", "configure": "הגדר", "save": "שמור", "home": "בית", "startNewJourney": "התחל מסע חדש", "newJourney": "מסע חדש", "accountInfo": "מידע חשבון", "outlineDesigner": "מעצב מתארים", "pageOutline": "מתאר עמוד", "more": "עוד", "siteActions": "פעולות אתר", "insights": "לוח מחוווים תובנות", "merlin": "מרלין", "summonMerlin": "קרא למרלין", "logOut": "התנתק", "menu": "תפריט", "showMore": "הראה עוד" } ================================================ FILE: elements/app-hax/locales/app-hax.hi.json ================================================ { "selectPage": "पृष्ठ चुनें", "backToSiteList": "साइट सूची पर वापस जाएं", "listMySites": "मेरी साइटों की सूची", "cancel": "रद्द करें", "editDetails": "पृष्ठ विवरण", "add": "जोड़ें", "editSettings": "सेटिंग्स संपादित करें", "source": "स्रोत", "viewSource": "स्रोत देखें", "findMedia": "मीडिया खोजें", "undo": "पूर्ववत करें", "redo": "फिर से करें", "media": "मीडिया", "outline": "रूपरेखा", "blocks": "ब्लॉक्स", "addBlock": "ब्लॉक जोड़ें", "addPage": "पृष्ठ जोड़ें", "addChildPage": "उप पृष्ठ जोड़ें", "clonePage": "पृष्ठ क्लोन करें", "delete": "पृष्ठ हटाएं", "siteSettings": "साइट सेटिंग्स", "close": "बंद करें", "settings": "सेटिंग्स", "edit": "संपादित करें", "configureBlock": "ब्लॉक कॉन्फ़िगर करें", "configure": "कॉन्फ़िगर करें", "save": "सेव करें", "home": "होम", "startNewJourney": "नई यात्रा शुरू करें", "newJourney": "नई यात्रा", "accountInfo": "खाता जानकारी", "outlineDesigner": "रूपरेखा डिज़ाइनर", "pageOutline": "पृष्ठ रूपरेखा", "more": "और", "siteActions": "साइट क्रियाएं", "insights": "अंतर्दृष्टि डैशबोर्ड", "merlin": "मर्लिन", "summonMerlin": "मर्लिन को बुलाएं", "logOut": "लॉग आउट", "menu": "मेनू", "showMore": "और दिखाएं" } ================================================ FILE: elements/app-hax/locales/app-hax.hr.json ================================================ { "selectPage": "Odaberi stranicu", "backToSiteList": "Natrag na popis stranica", "listMySites": "Popiši moje stranice", "cancel": "Otkaži", "editDetails": "Detalji stranice", "add": "Dodaj", "editSettings": "Uredi postavke", "source": "Izvor", "viewSource": "Pogledaj izvor", "findMedia": "Pronađi medije", "undo": "Vrati", "redo": "Ponovi", "media": "Mediji", "outline": "Obris", "blocks": "Blokovi", "addBlock": "Dodaj blok", "addPage": "Dodaj stranicu", "addChildPage": "Dodaj podstranicu", "clonePage": "Kloniraj stranicu", "delete": "Obriši stranicu", "siteSettings": "Postavke stranice", "close": "Zatvori", "settings": "Postavke", "edit": "Uredi", "configureBlock": "Konfiguriraj blok", "configure": "Konfiguriraj", "save": "Spremi", "home": "Početna", "startNewJourney": "Počni novo putovanje", "newJourney": "Novo putovanje", "accountInfo": "Podaci računa", "outlineDesigner": "Dizajner obrisa", "pageOutline": "Obris stranice", "more": "Više", "siteActions": "Radnje stranice", "insights": "Kontrolna ploča uvida", "merlin": "Merlin", "summonMerlin": "Pozovi Merlina", "logOut": "Odjavi se", "menu": "Izbornik", "showMore": "Pokaži više" } ================================================ FILE: elements/app-hax/locales/app-hax.hu.json ================================================ { "selectPage": "Oldal kiválasztása", "backToSiteList": "Vissza az oldal listához", "listMySites": "Oldalak listázása", "cancel": "Mégse", "editDetails": "Oldal részletei", "add": "Hozzáadás", "editSettings": "Beállítások szerkesztése", "source": "Forrás", "viewSource": "Forrás megtekintése", "findMedia": "Média keresése", "undo": "Visszavonás", "redo": "Megismétlés", "media": "Média", "outline": "Vázlat", "blocks": "Blokkok", "addBlock": "Blokk hozzáadása", "addPage": "Oldal hozzáadása", "addChildPage": "Gyermek oldal hozzáadása", "clonePage": "Oldal klónozása", "delete": "Oldal törlése", "siteSettings": "Webhely beállítások", "close": "Bezárás", "settings": "Beállítások", "edit": "Szerkesztés", "configureBlock": "Blokk konfigurálása", "configure": "Konfigurálás", "save": "Mentés", "home": "Főoldal", "startNewJourney": "Új utazás indítása", "newJourney": "Új utazás", "accountInfo": "Fiók információk", "outlineDesigner": "Vázlat tervező", "pageOutline": "Oldal vázlat", "more": "Több", "siteActions": "Webhely műveletek", "insights": "Belátások irányítópult", "merlin": "Merlin", "summonMerlin": "Merlin megidézése", "logOut": "Kijelentkezés", "menu": "Menü", "showMore": "Több megjelenítése" } ================================================ FILE: elements/app-hax/locales/app-hax.hy.json ================================================ { "selectPage": "Զվալեք էջը", "backToSiteList": "Վերադառնալ կայքերի ցանկում", "listMySites": "Այլ իմ կայքերը", "cancel": "Լվացնել", "editDetails": "Էջի մանրամասները", "add": "Ավելացնել", "editSettings": "Խմբագրել օրենքները", "source": "Աղբյուր", "viewSource": "Տեսնել աղբյուրը", "findMedia": "Գտնել մեդիա", "undo": "Էարատակել", "redo": "Կրկնել", "media": "Մեդիա", "outline": "Գծագիր", "blocks": "Բլոկներ", "addBlock": "Ավելացնել բլոկ", "addPage": "Ավելացնել էջ", "addChildPage": "Ավելացնել ընկեր էջ", "clonePage": "Պատճենել էջը", "delete": "Ջնջել էջը", "siteSettings": "Կայքի օրենքներ", "close": "Փակել", "settings": "օրենքներ", "edit": "Խմբագրել", "configureBlock": "Կարգավորել բլոկը", "configure": "Կարգավորել", "save": "Պահտանել", "home": "Տուն", "startNewJourney": "Սկսել նոր ուղևորություն", "newJourney": "Նոր ուղևորություն", "accountInfo": "Հաշվի տեղեկություններ", "outlineDesigner": "Գծագրի դիզայներ", "pageOutline": "Էջի գծագիր", "more": "Ավելին", "siteActions": "Կայքի գործողություններ", "insights": "Ջնսայացների պանել", "merlin": "Մերլին", "summonMerlin": "Կանչել Մերլինին", "logOut": "Ելք գալ", "menu": "Ցանկ", "showMore": "Ցուցադրել ավելին" } ================================================ FILE: elements/app-hax/locales/app-hax.id.json ================================================ { "selectPage": "Pilih halaman", "backToSiteList": "Kembali ke daftar situs", "listMySites": "Daftar situs saya", "cancel": "Batal", "editDetails": "Detail halaman", "add": "Tambah", "editSettings": "Edit pengaturan", "source": "Sumber", "viewSource": "Lihat sumber", "findMedia": "Cari media", "undo": "Urungkan", "redo": "Ulangi", "media": "Media", "outline": "Kerangka", "blocks": "Blok", "addBlock": "Tambah blok", "addPage": "Tambah halaman", "addChildPage": "Tambah halaman anak", "clonePage": "Salin halaman", "delete": "Hapus halaman", "siteSettings": "Pengaturan situs", "close": "Tutup", "settings": "Pengaturan", "edit": "Edit", "configureBlock": "Konfigurasi blok", "configure": "Konfigurasi", "save": "Simpan", "home": "Beranda", "startNewJourney": "Mulai perjalanan baru", "newJourney": "Perjalanan baru", "accountInfo": "Info akun", "outlineDesigner": "Desainer kerangka", "pageOutline": "Kerangka halaman", "more": "Lebih banyak", "siteActions": "Aksi situs", "insights": "Dashboard wawasan", "merlin": "Merlin", "summonMerlin": "Panggil Merlin", "logOut": "Keluar", "menu": "Menu", "showMore": "Tampilkan lebih banyak" } ================================================ FILE: elements/app-hax/locales/app-hax.ig.json ================================================ { "selectPage": "Họrọ peeji", "backToSiteList": "Laghachi na ndepụta saịtị", "listMySites": "Ndepụta saịtị m", "cancel": "Kagbuo", "editDetails": "Nkọwa peeji", "add": "Tinye", "editSettings": "Dezie ntọala", "source": "Isi mmalite", "viewSource": "Lee isi mmalite", "findMedia": "Chọta media", "undo": "Weghachi azụ", "redo": "Mee ọzọ", "media": "Media", "outline": "Ndepụta isi", "blocks": "Ngọngọ", "addBlock": "Tinye ngọngọ", "addPage": "Tinye peeji", "addChildPage": "Tinye peeji nwa", "clonePage": "Depụta peeji", "delete": "Hichapụ peeji", "siteSettings": "Ntọala saịtị", "close": "Mechie", "settings": "Ntọala", "edit": "Dezie", "configureBlock": "Dozie ngọngọ", "configure": "Dozie", "save": "Chekwaa", "home": "Ụlọ", "startNewJourney": "Malite njem ọhụrụ", "newJourney": "Njem Ọhụrụ", "accountInfo": "Ozi Akaụntụ", "outlineDesigner": "Onye na-eme ndepụta isi", "pageOutline": "Ndepụta isi peeji", "more": "Ọzọ", "siteActions": "Omume saịtị", "insights": "Bọọdụ nghọta", "merlin": "Merlin", "summonMerlin": "Kpọọ Merlin", "logOut": "Pụọ", "menu": "Menu", "showMore": "Gosipụta ọzọ" } ================================================ FILE: elements/app-hax/locales/app-hax.is.json ================================================ { "selectPage": "Veldu síðu", "backToSiteList": "Til baka í vefsvæðalistann", "listMySites": "Sýna mínar síður", "cancel": "Hætta við", "editDetails": "Síðu upplýsingar", "add": "Bæta við", "editSettings": "Breyta stillingar", "source": "Uppspretta", "viewSource": "Skoða uppsprettu", "findMedia": "Finna miðla", "undo": "Afturkalla", "redo": "Endurtaka", "media": "Miðlar", "outline": "Útlínur", "blocks": "Kubbar", "addBlock": "Bæta við kubb", "addPage": "Bæta við síðu", "addChildPage": "Bæta við undirsíðu", "clonePage": "Afrita síðu", "delete": "Eyða síðu", "siteSettings": "Stillingar vefsvæðis", "close": "Loka", "settings": "Stillingar", "edit": "Breyta", "configureBlock": "Stilla kubb", "configure": "Stilla", "save": "Vista", "home": "Heim", "startNewJourney": "Byrja nýtt ferðalag", "newJourney": "Nýt ferðalag", "accountInfo": "Reikningsupplýsingar", "outlineDesigner": "Útlínuhannórinn", "pageOutline": "Síðuútlínur", "more": "Fleira", "siteActions": "Aðgerðir vefsvæðis", "insights": "Innsýnar töflur", "merlin": "Merlin", "summonMerlin": "Kalla á Merlin", "logOut": "Skrá út", "menu": "Valmynd", "showMore": "Sýna meira" } ================================================ FILE: elements/app-hax/locales/app-hax.it.json ================================================ { "selectPage": "Seleziona pagina", "backToSiteList": "Torna alla lista dei siti", "listMySites": "Elenca i miei siti", "cancel": "Annulla", "editDetails": "Dettagli pagina", "add": "Aggiungi", "editSettings": "Modifica impostazioni", "source": "Sorgente", "viewSource": "Visualizza sorgente", "findMedia": "Trova media", "undo": "Annulla", "redo": "Ripeti", "media": "Media", "outline": "Schema", "blocks": "Blocchi", "addBlock": "Aggiungi blocco", "addPage": "Aggiungi pagina", "addChildPage": "Aggiungi sottopagina", "clonePage": "Clona pagina", "delete": "Elimina pagina", "siteSettings": "Impostazioni sito", "close": "Chiudi", "settings": "Impostazioni", "edit": "Modifica", "configureBlock": "Configura blocco", "configure": "Configura", "save": "Salva", "home": "Home", "startNewJourney": "Inizia nuovo viaggio", "newJourney": "Nuovo viaggio", "accountInfo": "Informazioni account", "outlineDesigner": "Designer schema", "pageOutline": "Schema pagina", "more": "Altro", "siteActions": "Azioni sito", "insights": "Dashboard approfondimenti", "merlin": "Merlin", "summonMerlin": "Evoca Merlin", "logOut": "Disconnetti", "menu": "Menu", "showMore": "Mostra altro" } ================================================ FILE: elements/app-hax/locales/app-hax.ja.json ================================================ { "selectPage": "ページを選択", "backToSiteList": "サイト一覧に戻る", "listMySites": "マイサイト一覧", "cancel": "キャンセル", "editDetails": "ページの詳細", "add": "追加", "editSettings": "設定を編集", "source": "ソース", "viewSource": "ソースを表示", "findMedia": "メディアを検索", "undo": "元に戻す", "redo": "やり直し", "media": "メディア", "outline": "アウトライン", "blocks": "ブロック", "addBlock": "ブロックを追加", "addPage": "ページを追加", "addChildPage": "子ページを追加", "clonePage": "ページを複製", "delete": "ページを削除", "siteSettings": "サイト設定", "close": "閉じる", "settings": "設定", "edit": "編集", "configureBlock": "ブロックを設定", "configure": "設定", "save": "保存", "home": "ホーム", "startNewJourney": "新しい旅を始める", "newJourney": "新しい旅", "accountInfo": "アカウント情報", "outlineDesigner": "アウトラインデザイナー", "pageOutline": "ページアウトライン", "more": "もっと", "siteActions": "サイトアクション", "insights": "インサイトダッシュボード", "merlin": "マーリン", "summonMerlin": "マーリンを召喚", "logOut": "ログアウト", "menu": "メニュー", "showMore": "もっと" } ================================================ FILE: elements/app-hax/locales/app-hax.jv.json ================================================ { "selectPage": "Pilih halaman", "backToSiteList": "Bali menyang dhaptar situs", "listMySites": "Dhaptar situs kula", "cancel": "Batalaken", "editDetails": "Rincian kaca", "add": "Tambahi", "editSettings": "Sunting pangaturan", "source": "Sumber", "viewSource": "Tingali sumber", "findMedia": "Goleki media", "undo": "Batali", "redo": "Baleni", "media": "Media", "outline": "Garis gedhe", "blocks": "Blok-blok", "addBlock": "Tambahi blok", "addPage": "Tambahi kaca", "addChildPage": "Tambahi kaca anak", "clonePage": "Kloning kaca", "delete": "Busek kaca", "siteSettings": "Pangaturan situs", "close": "Tutup", "settings": "Pangaturan", "edit": "Sunting", "configureBlock": "Atur blok", "configure": "Atur", "save": "Simpen", "home": "Omah", "startNewJourney": "Miwiti perjalanan anyar", "newJourney": "Perjalanan Anyar", "accountInfo": "Informasi Akun", "outlineDesigner": "Pangripta garis gedhe", "pageOutline": "Garis gedhe kaca", "more": "Luwih akeh", "siteActions": "Tumindak situs", "insights": "Dashboard wawasan", "merlin": "Merlin", "summonMerlin": "Celuk Merlin", "logOut": "Metu", "menu": "Menu", "showMore": "Tuduhaken luwih akeh" } ================================================ FILE: elements/app-hax/locales/app-hax.ka.json ================================================ { "selectPage": "აირჩიეთ გვერდი", "backToSiteList": "საიტის სიაში დაბრუნება", "listMySites": "ჩემი საიტების სია", "cancel": "გაუქმება", "editDetails": "გვერდის დეტალები", "add": "დამატება", "editSettings": "რედაქტირების პარამეტრები", "source": "წყარო", "viewSource": "წყაროს ნახვა", "findMedia": "მედიის მოძებნა", "undo": "გაუქმება", "redo": "გამეორება", "media": "მედია", "outline": "კონტური", "blocks": "ბლოკები", "addBlock": "ბლოკის დამატება", "addPage": "გვერდის დამატება", "addChildPage": "შვილობილი გვერდის დამატება", "clonePage": "გვერდის კლონირება", "delete": "გვერდის წაშლა", "siteSettings": "საიტის პარამეტრები", "close": "დახურვა", "settings": "პარამეტრები", "edit": "რედაქტირება", "configureBlock": "ბლოკის კონფიგურაცია", "configure": "კონფიგურაცია", "save": "შენახვა", "home": "მთავარი", "startNewJourney": "ახალი მოგზაურობის დაწყება", "newJourney": "ახალი მოგზაურობა", "accountInfo": "ანგარიშის ინფორმაცია", "outlineDesigner": "კონტურის დიზაინერი", "pageOutline": "გვერდის კონტური", "more": "მეტი", "siteActions": "საიტის მოქმედებები", "insights": "შეგნებათა დაფა", "merlin": "მერლინი", "summonMerlin": "მერლინის გამოძახება", "logOut": "გასვლა", "menu": "მენიუ", "showMore": "მეტის ჩვენება" } ================================================ FILE: elements/app-hax/locales/app-hax.kk.json ================================================ { "selectPage": "Бетті таңдау", "backToSiteList": "Сайттар тізіміне оралу", "listMySites": "Менің сайттарымның тізімі", "cancel": "Болдырмау", "editDetails": "Бет мәліметтері", "add": "Қосу", "editSettings": "Параметрлерді өңдеу", "source": "Көз", "viewSource": "Көзді көру", "findMedia": "Медианы табу", "undo": "Кері қайтару", "redo": "Қайталау", "media": "Медиа", "outline": "Сыртқы сызық", "blocks": "Блоктар", "addBlock": "Блок қосу", "addPage": "Бет қосу", "addChildPage": "Балалар бетін қосу", "clonePage": "Бетті көшіру", "delete": "Бетті жою", "siteSettings": "Сайт параметрлері", "close": "Жабу", "settings": "Параметрлер", "edit": "Өңдеу", "configureBlock": "Блокты конфигурациялау", "configure": "Конфигурациялау", "save": "Сақтау", "home": "Үй", "startNewJourney": "Жаңа саяхат бастау", "newJourney": "Жаңа саяхат", "accountInfo": "Есептік жазба ақпараты", "outlineDesigner": "Сыртқы сызық дизайнері", "pageOutline": "Бет сыртқы сызығы", "more": "Көбірек", "siteActions": "Сайт әрекеттері", "insights": "Аналитика панелі", "merlin": "Мерлин", "summonMerlin": "Мерлинді шақыру", "logOut": "Шығу", "menu": "Мәзір", "showMore": "Көбірек көрсету" } ================================================ FILE: elements/app-hax/locales/app-hax.km.json ================================================ { "selectPage": "ជ្រើសរើសទំពារ់", "backToSiteList": "ត្រឡប់ទៅបញ្ជីកត្រា", "listMySites": "បញ្ជីកត្រារបស់ខ្ញុំ", "cancel": "បោះបង់", "editDetails": "ព័ត៌មានរបស់ទំពារ់", "add": "បន្ថែម", "editSettings": "ភ្វើឆនែរើវបការកំណត់", "source": "ព័ងពោល", "viewSource": "មើលព័ងពោល", "findMedia": "រកមេឌ៊ណ", "undo": "មិនត្មាំវិញ", "redo": "ត្មាំវិញម្តងទៀត", "media": "មេឌ៊ណ", "outline": "រូបទំរង់", "blocks": "ប្លូក", "addBlock": "បន្ថែមប្លូក", "addPage": "បន្ថែមទំពារ់", "addChildPage": "បន្ថែមទំពារ់កូន", "clonePage": "ចម្លងទំពារ់", "delete": "លុបទំពារ់", "siteSettings": "កំណត់ត្រា", "close": "បិទ", "settings": "កំណត់", "edit": "កែសម្រួល", "configureBlock": "កំណត់ប្លូក", "configure": "កំណត់", "save": "រក្សាទុក", "home": "ទំពារ់ដើម", "startNewJourney": "ចម្ភើងដមណើរថ្មី", "newJourney": "ដមណើរថ្មី", "accountInfo": "ព័ត៌មានគណណី", "outlineDesigner": "អ្នករចនារូបទំរង់", "pageOutline": "រូបទំរង់ទំពារ់", "more": "ឆ្នាងទៀត", "siteActions": "សម្មពារ់ត្រា", "insights": "បញ្ជាតប្ឈាលព័ត៌មាន", "merlin": "ម៉ាលាំញ់", "summonMerlin": "កំកខះម៉ាលាំញ់", "logOut": "ចេញចាក", "menu": "មីនី័វ", "showMore": "បង្ហាញឆ្នាងទៀត" } ================================================ FILE: elements/app-hax/locales/app-hax.kn.json ================================================ { "selectPage": "ಪುಟನ್ನು ಆಯ್ಕೆ ಮಾಡಿ", "backToSiteList": "ಸೈಟ್ ಪಟ್ಟಿಗೆ ವಾಪಸು ಹೋಗಿ", "listMySites": "ನನ್ನ ಸೈಟ್ಗಳ ಪಟ್ಟಿ", "cancel": "ರದ್ದುಮಾಡಿ", "editDetails": "ಪುಟ ವಿವರಗಳು", "add": "ಸೇರಿಸಿ", "editSettings": "ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಸಂಪಾದನೆ ಮಾಡಿ", "source": "ಮೂಲ", "viewSource": "ಮೂಲನ್ನು ನೋಡಿ", "findMedia": "ಮೀಡಿಯಾ ಹುಡುಕಿ", "undo": "ರದ್ದು ಮಾಡಿ", "redo": "ಮರುಮಾಡಿ", "media": "ಮೀಡಿಯಾ", "outline": "ರೂಪರೇಖೆ", "blocks": "ಬ್ಲಾಕ್‌ಗಳು", "addBlock": "ಬ್ಲಾಕ್ ಸೇರಿಸಿ", "addPage": "ಪುಟ ಸೇರಿಸಿ", "addChildPage": "ಮಕ್ಕಳ ಪುಟ ಸೇರಿಸಿ", "clonePage": "ಪುಟನನ್ನು ಕ್ಲೋನ್ ಮಾಡಿ", "delete": "ಪುಟನ್ನು ಅಳಿಸಿ", "siteSettings": "ಸೈಟ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳು", "close": "ಮುಚ್ಚಿಸಿ", "settings": "ಸೆಟ್ಟಿಂಗ್‌ಗಳು", "edit": "ಸಂಪಾದನೆ", "configureBlock": "ಬ್ಲಾಕ್ ಕಾನ್ಫಿಗರ್ ಮಾಡಿ", "configure": "ಕಾನ್ಫಿಗರ್ ಮಾಡಿ", "save": "ಸೇವ್ ಮಾಡಿ", "home": "ಮನೆ", "startNewJourney": "ಹೊಸ ಪ್ರಯಾಣ ಶುರುಮಾಡಿ", "newJourney": "ಹೊಸ ಪ್ರಯಾಣ", "accountInfo": "ಖಾತೆ ಮಾಹಿತಿ", "outlineDesigner": "ರೂಪರೇಖೆ ಡಿಜೈನರ್", "pageOutline": "ಪುಟ ರೂಪರೇಖೆ", "more": "ಇನ್ನೂ ಅಧಿಕ", "siteActions": "ಸೈಟ್ ಕರ್ಮಗಳು", "insights": "ಅಂತರ್ದೃಷ್ಟಿ ಡ್ಯಾಶ್‌ಬೋರ್ಡ್", "merlin": "ಮೆರ್ಲಿನ್", "summonMerlin": "ಮೆರ್ಲಿನ್ ಅನ್ನು ಕರೆಯಿಸಿ", "logOut": "ಲಾಗ್ ಆಉಟ್", "menu": "ಮೆನು", "showMore": "ಇನ್ನೂ ಅಧಿಕ ತೋರಿಸಿ" } ================================================ FILE: elements/app-hax/locales/app-hax.ko.json ================================================ { "selectPage": "페이지 선택", "backToSiteList": "사이트 목록으로 돌아가기", "listMySites": "내 사이트 목록", "cancel": "취소", "editDetails": "페이지 세부사항", "add": "추가", "editSettings": "설정 편집", "source": "소스", "viewSource": "소스 보기", "findMedia": "미디어 찾기", "undo": "실행취소", "redo": "다시 실행", "media": "미디어", "outline": "개요", "blocks": "블록", "addBlock": "블록 추가", "addPage": "페이지 추가", "addChildPage": "하위 페이지 추가", "clonePage": "페이지 복제", "delete": "페이지 삭제", "siteSettings": "사이트 설정", "close": "닫기", "settings": "설정", "edit": "편집", "configureBlock": "블록 구성", "configure": "구성", "save": "저장", "home": "홈", "startNewJourney": "새로운 여행 시작", "newJourney": "새로운 여행", "accountInfo": "계정 정보", "outlineDesigner": "개요 디자이너", "pageOutline": "페이지 개요", "more": "더 보기", "siteActions": "사이트 작업", "insights": "인사이트 대시보드", "merlin": "머린", "summonMerlin": "머린 소환", "logOut": "로그아웃", "menu": "메뉴", "showMore": "더 많이 보기" } ================================================ FILE: elements/app-hax/locales/app-hax.ku.json ================================================ { "selectPage": "Rûpelê hilbijêre", "backToSiteList": "Vegere lîsteya malan", "listMySites": "Lîsteya malên min", "cancel": "Betal bike", "editDetails": "Hûrguliyên rûpelê", "add": "Zêde bike", "editSettings": "Sazkariyên guherandinê", "source": "Çavkanî", "viewSource": "Çavkanî bibîne", "findMedia": "Medya bibîne", "undo": "Paşve bike", "redo": "Dîsa bike", "media": "Medya", "outline": "Nexşe", "blocks": "Blok", "addBlock": "Blok zêde bike", "addPage": "Rûpel zêde bike", "addChildPage": "Rûpelek zarok zêde bike", "clonePage": "Rûpelê kopî bike", "delete": "Rûpelê jê bibe", "siteSettings": "Sazkariyên malê", "close": "Bigire", "settings": "Sazkari", "edit": "Biguherîne", "configureBlock": "Blokê veava bike", "configure": "Veava bike", "save": "Tomar bike", "home": "Mal", "startNewJourney": "Rêwîtinek nû dest pê bike", "newJourney": "Rêwîtinek Nû", "accountInfo": "Agahiyên Hesêbê", "outlineDesigner": "Sêwirkarê nexşeyê", "pageOutline": "Nexşeya rûpelê", "more": "Zêdetir", "siteActions": "Kiryarên malê", "insights": "Panela têgihiştinê", "merlin": "Merlin", "summonMerlin": "Merlin bi xwere", "logOut": "Derkeve", "menu": "Menu", "showMore": "Zêdetir nîşan bide" } ================================================ FILE: elements/app-hax/locales/app-hax.ky.json ================================================ { "selectPage": "Баракты тандаңыз", "backToSiteList": "Сайттар тизмесине кайтуу", "listMySites": "Менин сайттарымдын тизмеси", "cancel": "Жокко чыгаруу", "editDetails": "Барактын маялыктары", "add": "Кошуу", "editSettings": "Орнотууларды өзгөртүү", "source": "Булак", "viewSource": "Булакты көрүү", "findMedia": "Медиа тапкыла", "undo": "Кери кайтаруу", "redo": "Кайра жасоо", "media": "Медиа", "outline": "Контур", "blocks": "Блоктор", "addBlock": "Блок кошуу", "addPage": "Барак кошуу", "addChildPage": "Бала баракты кошуу", "clonePage": "Баракты клондоо", "delete": "Баракты өчүрүү", "siteSettings": "Сайттын орнотуулары", "close": "Жабуу", "settings": "Орнотуулар", "edit": "Өзгөртүү", "configureBlock": "Блокту жөндөө", "configure": "Жөндөө", "save": "Сактоо", "home": "Үй", "startNewJourney": "Жаңы саякатты баштоо", "newJourney": "Жаңы Саякат", "accountInfo": "Эсеп маалыматы", "outlineDesigner": "Контур дизайнери", "pageOutline": "Барактын контуру", "more": "Көбүрөөк", "siteActions": "Сайттын аракеттери", "insights": "Баянаттар таблосу", "merlin": "Мерлин", "summonMerlin": "Мерлинди чакыруу", "logOut": "Чыгуу", "menu": "Меню", "showMore": "Көбүрөөк көрсөтүү" } ================================================ FILE: elements/app-hax/locales/app-hax.lb.json ================================================ { "selectPage": "Säit eraussichen", "backToSiteList": "Zréck op d'Websiten-Lëscht", "listMySites": "Lëscht vun menge Websiten", "cancel": "Ofbriechen", "editDetails": "Säiten-Detailer", "add": "Dobäisetzen", "editSettings": "Astellungen änneren", "source": "Quell", "viewSource": "Quell ukucken", "findMedia": "Media fannen", "undo": "Réckgängeg maachen", "redo": "Nach eng Kéier maachen", "media": "Media", "outline": "Onnerlinn", "blocks": "Bléck", "addBlock": "Block dobäisetzen", "addPage": "Säit dobäisetzen", "addChildPage": "Kanner-Säit dobäisetzen", "clonePage": "Säit kopéëren", "delete": "Säit läschen", "siteSettings": "Websiten-Astellungen", "close": "Zoumaachen", "settings": "Astellungen", "edit": "Änneren", "configureBlock": "Block konfiguréëren", "configure": "Konfiguréëren", "save": "Späicheren", "home": "Doheem", "startNewJourney": "Nei Rees ufänken", "newJourney": "Nei Rees", "accountInfo": "Kont-Informatioun", "outlineDesigner": "Onnerlinn-Designer", "pageOutline": "Säiten-Onnerlinn", "more": "Méi", "siteActions": "Websiten-Aktiounen", "insights": "Abléck-Dashboard", "merlin": "Merlin", "summonMerlin": "Merlin ruffen", "logOut": "Ofmellen", "menu": "Menü", "showMore": "Méi weisen" } ================================================ FILE: elements/app-hax/locales/app-hax.lo.json ================================================ { "selectPage": "ເລືອກຫ້າ", "backToSiteList": "ກັບໄປຢັງລາຍການເວບໄ຋ທ໌", "listMySites": "ລາຍການເວບໄ຋ທ໌ຂອງຂ້ອຍ", "cancel": "ຢົກເລິກ", "editDetails": "ລາຍລະອຽດຫ້າ", "add": "ເພີ່ມ", "editSettings": "ແກ້ໄຂການຕັ້ງຄ່າ", "source": "ແຫລ່ງທີ່ມາ", "viewSource": "ດູແຫລ່ງທີ່ມາ", "findMedia": "ຫາມີເດີຍ", "undo": "ເລິກທໍາ", "redo": "ທໍາເຄີ່ຍ", "media": "ມີເດີຍ", "outline": "ໂຄ້ງສາ້ງ", "blocks": "ບ້ວກ", "addBlock": "ເພີ່ມບ້ວກ", "addPage": "ເພີ່ມຫ້າ", "addChildPage": "ເພີ່ມຫ້າລູກ", "clonePage": "ຄັດລອກຫ້າ", "delete": "ລົບຫ້າ", "siteSettings": "ການຕັ້ງຄ່າເວບໄ຋ທ໌", "close": "ປີດ", "settings": "ການຕັ້ງຄ່າ", "edit": "ແກ້ໄຂ", "configureBlock": "ຕັ້ງຄ່າບ້ວກ", "configure": "ຕັ້ງຄ່າ", "save": "ບັນທຶກ", "home": "ຫ້າແຮກ", "startNewJourney": "ເລີ່ມຕ້ອນການໄດເດີນທາງຮມ້", "newJourney": "ການໄດເດີນທາງໃຮມ້", "accountInfo": "ຂໍ້ມູນບັນຊີ", "outlineDesigner": "ນັກອອກແບບໂຄ້ງສາ້ງ", "pageOutline": "ໂຄ້ງສາ້ງຫ້າ", "more": "ເພີ່ມເຕີມ", "siteActions": "ກິດຈະກໍາເວບໄ຋ທ໌", "insights": "ແຜ່ນຄວບຄຸມຂໍ້ມູນເຊິງລຶກ", "merlin": "ເມ໇ຮລິນ", "summonMerlin": "ເປີ່າເມ໇ຮລິນ", "logOut": "ອອກຈາກລະບົບ", "menu": "ເມນູ", "showMore": "ສະແດງເພີ່ມເຕີມ" } ================================================ FILE: elements/app-hax/locales/app-hax.lt.json ================================================ { "selectPage": "Pasirinkti puslapį", "backToSiteList": "Grįžti į svetainių sąrašą", "listMySites": "Rodеti mano svetaines", "cancel": "Atšaukti", "editDetails": "Puslapio išsamūs duomenys", "add": "Pridėti", "editSettings": "Redaguoti nustatym us", "source": "Šaltinis", "viewSource": "Žiūrėti šaltinį", "findMedia": "Rasti med ja", "undo": "Atšaukti", "redo": "Pakartoti", "media": "Medija", "outline": "Plentas", "blocks": "Blokai", "addBlock": "Pridėti bloką", "addPage": "Pridėti puslapį", "addChildPage": "Pridėti vaikų puslapį", "clonePage": "Klonuoti puslapį", "delete": "Ištrinti puslapį", "siteSettings": "Svetainės nustatymai", "close": "Uždaryti", "settings": "Nustatymai", "edit": "Redaguoti", "configureBlock": "Konfigrūuoti bloką", "configure": "Konfigrūuoti", "save": "Išsaugoti", "home": "Pagrindinis", "startNewJourney": "Pradėti naują kelionę", "newJourney": "Nauja kelionė", "accountInfo": "Paskyros informacija", "outlineDesigner": "Plano dizaineris", "pageOutline": "Puslapio planas", "more": "Daugiau", "siteActions": "Svetainės veiksmai", "insights": "Įžvalgų skydas", "merlin": "Merlin", "summonMerlin": "Iškviesti Merliną", "logOut": "Atsijungti", "menu": "Meniu", "showMore": "Rodеti daugiau" } ================================================ FILE: elements/app-hax/locales/app-hax.lv.json ================================================ { "selectPage": "Izvēlēties lapu", "backToSiteList": "Atpakaļ uz vietni sarakstu", "listMySites": "Parādīt manas vietnes", "cancel": "Atcelt", "editDetails": "Lapas detaļas", "add": "Pievienot", "editSettings": "Rediģēt iestatījumus", "source": "Avots", "viewSource": "Skatīt avotu", "findMedia": "Atrast mēdijus", "undo": "Atcelt", "redo": "Atkartot", "media": "Mēdiji", "outline": "Konspekts", "blocks": "Bloki", "addBlock": "Pievienot bloku", "addPage": "Pievienot lapu", "addChildPage": "Pievienot apakšlapu", "clonePage": "Klonēt lapu", "delete": "Dzēst lapu", "siteSettings": "Vietnes iestatījumi", "close": "Aizvērt", "settings": "Iestatījumi", "edit": "Rediģēt", "configureBlock": "Konfigurēt bloku", "configure": "Konfigurēt", "save": "Saglabāt", "home": "Sākumlapa", "startNewJourney": "Sākt jaunu ceļojumu", "newJourney": "Jauns ceļojums", "accountInfo": "Konta informācija", "outlineDesigner": "Konspekta dizainers", "pageOutline": "Lapas konspekts", "more": "Vairāk", "siteActions": "Vietnes darbības", "insights": "Ieskatu panelis", "merlin": "Merlin", "summonMerlin": "Iesaukt Mērlinu", "logOut": "Iziet", "menu": "Izvēlne", "showMore": "Rādīt vairāk" } ================================================ FILE: elements/app-hax/locales/app-hax.mi.json ================================================ { "selectPage": "Kōwhiri whaarangi", "backToSiteList": "Hoki ki te rārangi pae", "listMySites": "Rārangi o ōku pae", "cancel": "Whakakore", "editDetails": "Kōhia o te whaarangi", "add": "Tāpiri", "editSettings": "Whakatika ngā whiringa", "source": "Pūtake", "viewSource": "Tiro ki te pūtake", "findMedia": "Kimi pāpangatanga", "undo": "Whakakore", "redo": "Mahi anō", "media": "Pāpangatanga", "outline": "Tahuhu", "blocks": "Porokē", "addBlock": "Tāpiri porokē", "addPage": "Tāpiri whaarangi", "addChildPage": "Tāpiri whaarangi tamaiti", "clonePage": "Tāruarua whaarangi", "delete": "Muku whaarangi", "siteSettings": "Ngā whiringa pae", "close": "Kati", "settings": "Ngā whiringa", "edit": "Whakatika", "configureBlock": "Whirihora porokē", "configure": "Whirihora", "save": "Tiaki", "home": "Kāinga", "startNewJourney": "Tīmatā i tētāhi koki hou", "newJourney": "Koki Hou", "accountInfo": "Mōhiotanga Kaute", "outlineDesigner": "Kaihoahoa tahuhu", "pageOutline": "Tahuhu whaarangi", "more": "Atu", "siteActions": "Ngā mahi pae", "insights": "Papa whakaatu mōhiotanga", "merlin": "Merlin", "summonMerlin": "Karanga a Merlin", "logOut": "Takiputa", "menu": "Tahua", "showMore": "Whakaatu atu" } ================================================ FILE: elements/app-hax/locales/app-hax.mk.json ================================================ { "selectPage": "Одбери страница", "backToSiteList": "Назад кон листата на сајтови", "listMySites": "Прикажи моите сајтови", "cancel": "Откажи", "editDetails": "Детали од страницата", "add": "Додај", "editSettings": "Измени поставки", "source": "Извор", "viewSource": "Погледни го изворот", "findMedia": "Најди медија", "undo": "Отповикај", "redo": "Повтори", "media": "Медија", "outline": "Конспект", "blocks": "Блокови", "addBlock": "Додај блок", "addPage": "Додај страница", "addChildPage": "Додај подстраница", "clonePage": "Клонирај страница", "delete": "Избриши страница", "siteSettings": "Поставки на сајтот", "close": "Затвори", "settings": "Поставки", "edit": "Измени", "configureBlock": "Конфигурирај блок", "configure": "Конфигурирај", "save": "Зачувај", "home": "Почетна", "startNewJourney": "Почни ново патување", "newJourney": "Ново патување", "accountInfo": "Информации за сметката", "outlineDesigner": "Дизајнер на конспект", "pageOutline": "Конспект на страницата", "more": "Повеќе", "siteActions": "Акции на сајтот", "insights": "Интерактивно табло", "merlin": "Мерлин", "summonMerlin": "Повикај го Мерлин", "logOut": "Одјави се", "menu": "Мени", "showMore": "Прикажи повеќе" } ================================================ FILE: elements/app-hax/locales/app-hax.ml.json ================================================ { "selectPage": "പേജ് തേർന്നെടുക്കുക", "backToSiteList": "സൈറ്റ് പട്ടികയിലേക്ക് കൊവ്ള്മുന്പോയ്", "listMySites": "എന്റെ സൈറ്റുകളുടെ പട്ടിക", "cancel": "റദ്ദുക്കി ചെയ്യുക", "editDetails": "പേജ് വിവരങ്ങള്", "add": "കൂട്ടിക്കെരുത്തുക", "editSettings": "സെറ്റിങ്ങള് എഡിറ്റ് ചെയ്യുക", "source": "ഉത്‌സ", "viewSource": "ഉത്‌സ കാണുക", "findMedia": "മീഡിയ കാണുക", "undo": "തിരിച്ചു തരിക", "redo": "വീണ്ടും ചെയ്യുക", "media": "മീഡിയ", "outline": "രൂപരേഖ", "blocks": "ബ്ലോക്കുകള്", "addBlock": "ബ്ലോക്ക് കൂട്ടിക്കെരുത്തുക", "addPage": "പേജ് കൂട്ടിക്കെരുത്തുക", "addChildPage": "ഈ പേജ് കൂട്ടിക്കെരുത്തുക", "clonePage": "പേജ് ക്ളോന് ചെയ്യുക", "delete": "പേജ് ഡിലീര് ചെയ്യുക", "siteSettings": "സൈറ്റ് സെറ്റിങ്ങള്", "close": "അടയ്ക്കുക", "settings": "സെറ്റിങ്ങള്", "edit": "എഡിറ്റ് ചെയ്യുക", "configureBlock": "ബ്ലോക്ക് കൺഫിഗർ ചെയ്യുക", "configure": "കൺഫിഗർ ചെയ്യുക", "save": "സേവ് ചെയ്യുക", "home": "വീട്", "startNewJourney": "പുതിയ യാത്ര ആരംഭിക്കുക", "newJourney": "പുതിയ യാത്ര", "accountInfo": "അക്കൗണ്ട് വിവരം", "outlineDesigner": "രൂപരേഖ ഡിസയിനർ", "pageOutline": "പേജ് രൂപരേഖ", "more": "കൂടുതല്", "siteActions": "സൈറ്റ് ഇരണ൉ള്", "insights": "ഗാഺവവാദ൉ള് ഡാഷ്‌ബോർഡ്", "merlin": "മർലിന്", "summonMerlin": "മർലിനെ വിളിക്കുക", "logOut": "ലൊഗ് ആഊട്", "menu": "മെണ്യൂ", "showMore": "കൂടുതല് കാണിക്കുക" } ================================================ FILE: elements/app-hax/locales/app-hax.mn.json ================================================ { "selectPage": "Хуудас сонгоно уу", "backToSiteList": "Сайтуудын жагсаалт буцах", "listMySites": "Миний сайтуудын жагсаалт", "cancel": "Цуцлах", "editDetails": "Хуудсын дэлгэрэнгүй", "add": "Нэмэх", "editSettings": "Тохиргоог засах", "source": "Эх үүсвэр", "viewSource": "Эх үүсвэрийг үзэх", "findMedia": "Медиа олох", "undo": "Буцаах", "redo": "Дахин хийх", "media": "Медиа", "outline": "Тойм", "blocks": "Блокууд", "addBlock": "Блок нэмэх", "addPage": "Хуудас нэмэх", "addChildPage": "Дэд хуудас нэмэх", "clonePage": "Хуудсыг хуулах", "delete": "Хуудсыг устгах", "siteSettings": "Сайтын тохиргоо", "close": "Хаах", "settings": "Тохиргоо", "edit": "Засах", "configureBlock": "Блок тохируулах", "configure": "Тохируулах", "save": "Хадгалах", "home": "Гэр", "startNewJourney": "Шинэ аялал эхлүүлэх", "newJourney": "Шинэ Аялал", "accountInfo": "Дансны Мэдээлэл", "outlineDesigner": "Тойм дизайнер", "pageOutline": "Хуудсын тойм", "more": "Дэлгэрэнгүй", "siteActions": "Сайтын үйлдэлүүд", "insights": "Шинжлэх үйлэин самбар", "merlin": "Мэрлин", "summonMerlin": "Мэрлинийг дуудах", "logOut": "Гарах", "menu": "Цэс", "showMore": "Цаашаа үзүүлэх" } ================================================ FILE: elements/app-hax/locales/app-hax.mr.json ================================================ { "selectPage": "पान निवडा", "backToSiteList": "साइट यादीला परत या", "listMySites": "माझ्या साइट्सची यादी", "cancel": "रद्द करा", "editDetails": "पेज विवरण", "add": "जोडा", "editSettings": "सेटिंग्स संपादित करा", "source": "स्रोत", "viewSource": "स्रोत पाहा", "findMedia": "मीडिया शोधा", "undo": "पूर्ववत करा", "redo": "पुन्हा करा", "media": "मीडिया", "outline": "रूपरेखा", "blocks": "ब्लॉक्स", "addBlock": "ब्लॉक जोडा", "addPage": "पेज जोडा", "addChildPage": "बाल पेज जोडा", "clonePage": "पेज क्लोन करा", "delete": "पेज हटवा", "siteSettings": "साइट सेटिंग्स", "close": "बंद करा", "settings": "सेटिंग्स", "edit": "संपादित करा", "configureBlock": "ब्लॉक कॉन्फिगर करा", "configure": "कॉन्फिगर करा", "save": "जतन करा", "home": "घर", "startNewJourney": "नवा प्रवास सुरू करा", "newJourney": "नवा प्रवास", "accountInfo": "खाते माहिती", "outlineDesigner": "रूपरेखा डिझाइनर", "pageOutline": "पेज रूपरेखा", "more": "अधिक", "siteActions": "साइट कृती", "insights": "अंतर्दृष्टी डॅशबोर्ड", "merlin": "मर्लिन", "summonMerlin": "मर्लिनला बोलवा", "logOut": "लॉग आउट", "menu": "मेनू", "showMore": "अधिक दाखवा" } ================================================ FILE: elements/app-hax/locales/app-hax.ms.json ================================================ { "selectPage": "Pilih halaman", "backToSiteList": "Kembali ke senarai laman web", "listMySites": "Senaraikan laman web saya", "cancel": "Batal", "editDetails": "Butiran halaman", "add": "Tambah", "editSettings": "Edit tetapan", "source": "Sumber", "viewSource": "Lihat sumber", "findMedia": "Cari media", "undo": "Buat asal", "redo": "Buat semula", "media": "Media", "outline": "Rangka", "blocks": "Blok", "addBlock": "Tambah blok", "addPage": "Tambah halaman", "addChildPage": "Tambah halaman anak", "clonePage": "Klon halaman", "delete": "Padam halaman", "siteSettings": "Tetapan laman web", "close": "Tutup", "settings": "Tetapan", "edit": "Edit", "configureBlock": "Konfigur blok", "configure": "Konfigur", "save": "Simpan", "home": "Laman utama", "startNewJourney": "Mulakan perjalanan baru", "newJourney": "Perjalanan baru", "accountInfo": "Maklumat akaun", "outlineDesigner": "Pereka rangka", "pageOutline": "Rangka halaman", "more": "Lagi", "siteActions": "Tindakan laman web", "insights": "Papan pemuka pandangan", "merlin": "Merlin", "summonMerlin": "Panggil Merlin", "logOut": "Log keluar", "menu": "Menu", "showMore": "Tunjuk lagi" } ================================================ FILE: elements/app-hax/locales/app-hax.mt.json ================================================ { "selectPage": "Agħżel paġna", "backToSiteList": "Lura għal-lista tas-siti", "listMySites": "Lista tas-siti tiegħi", "cancel": "Ikkanċella", "editDetails": "Dettalji tal-paġna", "add": "Żid", "editSettings": "Editja s-settings", "source": "Sors", "viewSource": "Ara s-sors", "findMedia": "Sib media", "undo": "Annulla", "redo": "Erġa' agħmel", "media": "Media", "outline": "Kontorn", "blocks": "Blokks", "addBlock": "Żid blokk", "addPage": "Żid paġna", "addChildPage": "Żid paġna tat-tfal", "clonePage": "Ikklona paġna", "delete": "Ħassar paġna", "siteSettings": "Settings tas-sit", "close": "Agħlaq", "settings": "Settings", "edit": "Editja", "configureBlock": "Ikkonfigura blokk", "configure": "Ikkonfigura", "save": "Ħaffi", "home": "Dar", "startNewJourney": "Ibda vjaġġ ġdid", "newJourney": "Vjaġġ Ġdid", "accountInfo": "Informazzjoni dwar il-Kont", "outlineDesigner": "Disinjatur tal-kontorn", "pageOutline": "Kontorn tal-paġna", "more": "Aktar", "siteActions": "Azzjonijiet tas-sit", "insights": "Dashboard tal-għarfien", "merlin": "Merlin", "summonMerlin": "Sejjaħ lil Merlin", "logOut": "Oħroġ", "menu": "Menu", "showMore": "Uri aktar" } ================================================ FILE: elements/app-hax/locales/app-hax.my.json ================================================ { "selectPage": "ပြန်ပြုံတ္တားရှုပါတ္တား", "backToSiteList": "ဝက်စားက်ရှို့တက် နေခ္ထာ ဖွဲ့သွေသည်", "listMySites": "ခဝန်နေးစာ ဝက်စားက်ရှို့ အရှို့တက်", "cancel": "အန်အမှားဘတ်ပဲပန်", "editDetails": "ပြန် အရှို့အရှားမှား", "add": "ခမ်းမှားမှား", "editSettings": "စည်ဒပ်မှား အဧးဖွဲ့သွေသည်", "source": "ရှားမှုံး", "viewSource": "ရှားမှုံးပါ ခြတ်သိပြပါ", "findMedia": "မီဒီယာတက် အရေးပြါ့ဒဲ", "undo": "အန်ရွမ္မန် ဖွဲ့ဖွဲ့ရွမ္မန်", "redo": "အရှက္ ဖွဲ့အရှက္မှားမှား", "media": "မီဒီယာ", "outline": "ရှုပ္ပြာဖွဲ့", "blocks": "အဣ်မှား", "addBlock": "အဣ်မှား ခမ်းမှားမှား", "addPage": "ပြန် ခမ်းမှားမှား", "addChildPage": "က္လဲးပြန် ခမ်းမှားမှား", "clonePage": "ပြန်ပါ ခက်ပဲအရှာ့ဖွဲ့သား", "delete": "ပြန်ပါ နှစ်နှစ်ဘတ်ပဲပန်", "siteSettings": "ဝက်စားတက် စည်ဒပ်မှား", "close": "ပိတ်ဖွဲ့သား", "settings": "စည်ဒပ်မှား", "edit": "အဧးဖွဲ့သွေသည်", "configureBlock": "အဣ်မှား စည်ဒပ်ထိတ်ဖွဲ့သား", "configure": "စည်ဒပ်ထိတ်ဖွဲ့သား", "save": "ခဝန်နေး သမ်းသွဳ့ဖွဲ့သား", "home": "အင်း", "startNewJourney": "ခမ်းမှား မိင္းခေးတက် တောင်တွေ့ပါ", "newJourney": "ခမ်းမှား မိင္းခေးတက်", "accountInfo": "အကားကုံးတက် အရှို့အရှားမှား", "outlineDesigner": "ရှုပ္ပြာစင်စင် ဒီဇာင်မှား", "pageOutline": "ပြန် ရှုပ္ပြာဖွဲ့", "more": "အမှားခမ်းမှား", "siteActions": "ဝက်စားတက် အပြုပြားမှား", "insights": "မှန္းမာ ဒသ့ဘူးဒ်", "merlin": "မားလင်း", "summonMerlin": "မားလင်းပါ ဖွဲ့ဘားသား", "logOut": "လေ့က် ပိတ်ဖွဲ့သား", "menu": "မီနံဥာ", "showMore": "အမှားခမ်းမှား ပါပါပါ" } ================================================ FILE: elements/app-hax/locales/app-hax.nb.json ================================================ { "selectPage": "Velg side", "backToSiteList": "Tilbake til nettstedliste", "listMySites": "Liste mine nettsteder", "cancel": "Avbryt", "editDetails": "Sidedetaljer", "add": "Legg til", "editSettings": "Rediger innstillinger", "source": "Kilde", "viewSource": "Se kilde", "findMedia": "Finn media", "undo": "Angre", "redo": "Gjør om", "media": "Media", "outline": "Disposisjon", "blocks": "Blokker", "addBlock": "Legg til blokk", "addPage": "Legg til side", "addChildPage": "Legg til underside", "clonePage": "Klon side", "delete": "Slett side", "siteSettings": "Nettstedsinnstillinger", "close": "Lukk", "settings": "Innstillinger", "edit": "Rediger", "configureBlock": "Konfigurer blokk", "configure": "Konfigurer", "save": "Lagre", "home": "Hjem", "startNewJourney": "Start ny reise", "newJourney": "Ny reise", "accountInfo": "Kontoinformasjon", "outlineDesigner": "Disposisjonsdesigner", "pageOutline": "Sidedisposisjon", "more": "Mer", "siteActions": "Nettstedhandlinger", "insights": "Innsiktsdashbord", "merlin": "Merlin", "summonMerlin": "Kall Merlin", "logOut": "Logg ut", "menu": "Meny", "showMore": "Vis mer" } ================================================ FILE: elements/app-hax/locales/app-hax.ne.json ================================================ { "selectPage": "पृष्ठ चयन गर्नुहोस्", "backToSiteList": "साइटहरूको सूचीमा फिर्ता", "listMySites": "मेरा साइटहरूको सूची", "cancel": "रद्द गर्नुहोस्", "editDetails": "पृष्ठ बिवरणहरू", "add": "थप्नुहोस्", "editSettings": "सेटिङहरू सम्पादन गर्नुहोस्", "source": "स्रोत", "viewSource": "स्रोत हेर्नुहोस्", "findMedia": "मिडिया फेला पार्नुहोस्", "undo": "पूर्वावस्थामा फर्काउनुहोस्", "redo": "फेरि गर्नुहोस्", "media": "मिडिया", "outline": "रूपरेखा", "blocks": "ब्लकहरू", "addBlock": "ब्लक थप्नुहोस्", "addPage": "पृष्ठ थप्नुहोस्", "addChildPage": "चाइल्ड पेज थप्नुहोस्", "clonePage": "पृष्ठ क्लोन गर्नुहोस्", "delete": "पृष्ठ मेटाउनुहोस्", "siteSettings": "साइट सेटिङहरू", "close": "बन्द गर्नुहोस्", "settings": "सेटिङहरू", "edit": "सम्पादन", "configureBlock": "ब्लक कन्फिगर गर्नुहोस्", "configure": "कन्फिगर गर्नुहोस्", "save": "सुरक्षित गर्नुहोस्", "home": "घर", "startNewJourney": "नयाँ यात्रा सुरु गर्नुहोस्", "newJourney": "नयाँ यात्रा", "accountInfo": "खाता जानकारी", "outlineDesigner": "रूपरेखा डिजाइनर", "pageOutline": "पृष्ठ रूपरेखा", "more": "थप", "siteActions": "साइट कार्यहरू", "insights": "इनसाइट ड्यासबोर्ड", "merlin": "मर्लिन", "summonMerlin": "मर्लिन बोलाउनुहोस्", "logOut": "लग आउट", "menu": "मेनु", "showMore": "थप देखाउनुहोस्" } ================================================ FILE: elements/app-hax/locales/app-hax.nl.json ================================================ { "selectPage": "Pagina selecteren", "backToSiteList": "Terug naar sitelijst", "listMySites": "Mijn sites weergeven", "cancel": "Annuleren", "editDetails": "Pagina details", "add": "Toevoegen", "editSettings": "Instellingen bewerken", "source": "Bron", "viewSource": "Bron bekijken", "findMedia": "Media zoeken", "undo": "Ongedaan maken", "redo": "Opnieuw doen", "media": "Media", "outline": "Overzicht", "blocks": "Blokken", "addBlock": "Blok toevoegen", "addPage": "Pagina toevoegen", "addChildPage": "Subpagina toevoegen", "clonePage": "Pagina klonen", "delete": "Pagina verwijderen", "siteSettings": "Site-instellingen", "close": "Sluiten", "settings": "Instellingen", "edit": "Bewerken", "configureBlock": "Blok configureren", "configure": "Configureren", "save": "Opslaan", "home": "Home", "startNewJourney": "Nieuwe reis beginnen", "newJourney": "Nieuwe reis", "accountInfo": "Accountinformatie", "outlineDesigner": "Overzichtontwerper", "pageOutline": "Pagina overzicht", "more": "Meer", "siteActions": "Site acties", "insights": "Inzichten dashboard", "merlin": "Merlin", "summonMerlin": "Merlin oproepen", "logOut": "Uitloggen", "menu": "Menu", "showMore": "Meer tonen" } ================================================ FILE: elements/app-hax/locales/app-hax.no.json ================================================ { "selectPage": "Velg side", "backToSiteList": "Tilbake til nettsideliste", "listMySites": "List mine nettsider", "cancel": "Avbryt", "editDetails": "Side detaljer", "add": "Legg til", "editSettings": "Rediger innstillinger", "source": "Kilde", "viewSource": "Se kilde", "findMedia": "Finn media", "undo": "Angre", "redo": "Gjør om", "media": "Media", "outline": "Disposisjon", "blocks": "Blokker", "addBlock": "Legg til blokk", "addPage": "Legg til side", "addChildPage": "Legg til underside", "clonePage": "Klon side", "delete": "Slett side", "siteSettings": "Nettside innstillinger", "close": "Lukk", "settings": "Innstillinger", "edit": "Rediger", "configureBlock": "Konfigurer blokk", "configure": "Konfigurer", "save": "Lagre", "home": "Hjem", "startNewJourney": "Start ny reise", "newJourney": "Ny reise", "accountInfo": "Kontoinformasjon", "outlineDesigner": "Disposisjonsdesigner", "pageOutline": "Side disposisjon", "more": "Mer", "siteActions": "Nettside handlinger", "insights": "Innsikt dashbord", "merlin": "Merlin", "summonMerlin": "Kall Merlin", "logOut": "Logg ut", "menu": "Meny", "showMore": "Vis mer" } ================================================ FILE: elements/app-hax/locales/app-hax.ny.json ================================================ { "selectPage": "Sankhani tsamba", "backToSiteList": "Bwererani ku mndandanda wa masamba", "listMySites": "Mndandanda wa masamba anga", "cancel": "Lekani", "editDetails": "Zambiri za tsamba", "add": "Onjezani", "editSettings": "Sinthani zikhazikitso", "source": "Gwero", "viewSource": "Onani gwero", "findMedia": "Pezani zowulutsa", "undo": "Bwezetsani", "redo": "Chitaninso", "media": "Zowulutsa", "outline": "Dongosololi", "blocks": "Midadada", "addBlock": "Onjezani chidadada", "addPage": "Onjezani tsamba", "addChildPage": "Onjezani tsamba la mwana", "clonePage": "Tengani tsamba", "delete": "Chotsani tsamba", "siteSettings": "Zikhazikitso za tsamba", "close": "Tsekani", "settings": "Zikhazikitso", "edit": "Sinthani", "configureBlock": "Konzani chidadada", "configure": "Konzani", "save": "Sungani", "home": "Nyumba", "startNewJourney": "Yambitsani ulendo watsopano", "newJourney": "Ulendo Watsopano", "accountInfo": "Zidziwitso Za Akaunti", "outlineDesigner": "Wopanga dongosololi", "pageOutline": "Dongosololi la tsamba", "more": "Zambiri", "siteActions": "Zochita za tsamba", "insights": "Bolodi lachidziwitso", "merlin": "Merlin", "summonMerlin": "Itanani Merlin", "logOut": "Tulukani", "menu": "Menu", "showMore": "Onetsani zambiri" } ================================================ FILE: elements/app-hax/locales/app-hax.om.json ================================================ { "selectPage": "Fuula fili", "backToSiteList": "Gara tarree marsaawwaniitti deebi'i", "listMySites": "Tarree marsaawwanii koo", "cancel": "Dhiisi", "editDetails": "Bal'ina fuulaa", "add": "Dabali", "editSettings": "Qindaa'ina gulaali", "source": "Madda", "viewSource": "Madda ilaali", "findMedia": "Miidiyaa barbadi", "undo": "Gara duubaatti deebisi", "redo": "Irra deebi'i", "media": "Miidiyaa", "outline": "Karoora", "blocks": "Kutaalee", "addBlock": "Kutaa dabali", "addPage": "Fuula dabali", "addChildPage": "Fuula ijoollee dabali", "clonePage": "Fuula garagalchi", "delete": "Fuula haqxi", "siteSettings": "Qindaa'ina marsaa", "close": "Cufii", "settings": "Qindaa'ina", "edit": "Gulaali", "configureBlock": "Kutaa qindeessi", "configure": "Qindeessi", "save": "Olkaa'i", "home": "Mana", "startNewJourney": "Imala haaraa jalqabi", "newJourney": "Imala Haaraa", "accountInfo": "Odeeffannoo Akkaawuntii", "outlineDesigner": "Karoora dizaayinarii", "pageOutline": "Karoora fuulaa", "more": "Dabalata", "siteActions": "Gochoota marsaa", "insights": "Gabatee hubannoo", "merlin": "Merlin", "summonMerlin": "Merlin waami", "logOut": "Ba'i", "menu": "Baafata", "showMore": "Dabalata agarsiisi" } ================================================ FILE: elements/app-hax/locales/app-hax.pa.json ================================================ { "selectPage": "ਪੰਨਾ ਚੁਣੋ", "backToSiteList": "ਸਾਈਟ ਦੀ ਸੂਚੀ ਵਿੱਚ ਵਾਪਸ ਜਾਓ", "listMySites": "ਮੇਰੀਆਂ ਸਾਈਟਾਂ ਦੀ ਸੂਚੀ", "cancel": "ਰੱਦ ਕਰੋ", "editDetails": "ਪੰਨੇ ਦਾ ਵੇਰਵਾ", "add": "ਜੋੜੋ", "editSettings": "ਸੈਟਿੰਗਾਂ ਨੂੰ ਸੰਪਾਦਿਤ ਕਰੋ", "source": "ਸਰੋਤ", "viewSource": "ਸਰੋਤ ਵੇਖੋ", "findMedia": "ਮੀਡੀਆ ਲੱਭੋ", "undo": "ਵਾਪਸ ਕਰੋ", "redo": "ਦੁਬਾਰਾ ਕਰੋ", "media": "ਮੀਡੀਆ", "outline": "ਰੂਪਰੇਖਾ", "blocks": "ਬਲਾਕ", "addBlock": "ਬਲਾਕ ਜੋੜੋ", "addPage": "ਪੰਨਾ ਜੋੜੋ", "addChildPage": "ਬੈਚ ਪੰਨਾ ਜੋੜੋ", "clonePage": "ਪੰਨੇ ਦੀ ਕਲੋਨ ਬਣਾਓ", "delete": "ਪੰਨਾ ਮਿਟਾਓ", "siteSettings": "ਸਾਈਟ ਸੈਟਿੰਗਾਂ", "close": "ਬੰਦ ਕਰੋ", "settings": "ਸੈਟਿੰਗਾਂ", "edit": "ਸੰਪਾਦਨ", "configureBlock": "ਬਲਾਕ ਕੰਫ਼ਿਗਰ ਕਰੋ", "configure": "ਕੰਫ਼ਿਗਰ ਕਰੋ", "save": "ਸੇਵ ਕਰੋ", "home": "ਘਰ", "startNewJourney": "ਨਵਾਂ ਸਫ਼ਰ ਸ਼ੁਰੂ ਕਰੋ", "newJourney": "ਨਵਾਂ ਸਫ਼ਰ", "accountInfo": "ਖਾਤੇ ਦੀ ਜਾਣਕਾਰੀ", "outlineDesigner": "ਰੂਪਰੇਖਾ ਡਿਜ਼ਾਈਨਰ", "pageOutline": "ਪੰਨੇ ਦੀ ਰੂਪਰੇਖਾ", "more": "ਵੱਧ ਅ", "siteActions": "ਸਾਈਟ ਦੀਆਂ ਕਾਰਵਾਈਆਂ", "insights": "ਸਮਝ ਡੈਸ਼ਬੋਰਡ", "merlin": "ਮਰਲਿਨ", "summonMerlin": "ਮਰਲਿਨ ਨੂੰ ਬੁਲਾਓ", "logOut": "ਲਾਗ ਆਊਟ", "menu": "ਮੇਨੂ", "showMore": "ਵੱਧ ਦਿਖਾਓ" } ================================================ FILE: elements/app-hax/locales/app-hax.pl.json ================================================ { "selectPage": "Wybierz stronę", "backToSiteList": "Powróć do listy stron", "listMySites": "Lista moich stron", "cancel": "Anuluj", "editDetails": "Szczegóły strony", "add": "Dodaj", "editSettings": "Edytuj ustawienia", "source": "Źródło", "viewSource": "Zobacz źródło", "findMedia": "Znajdź media", "undo": "Cofnij", "redo": "Powtórz", "media": "Media", "outline": "Konspekt", "blocks": "Bloki", "addBlock": "Dodaj blok", "addPage": "Dodaj stronę", "addChildPage": "Dodaj podstronę", "clonePage": "Sklonuj stronę", "delete": "Usuń stronę", "siteSettings": "Ustawienia strony", "close": "Zamknij", "settings": "Ustawienia", "edit": "Edytuj", "configureBlock": "Skonfiguruj blok", "configure": "Skonfiguruj", "save": "Zapisz", "home": "Strona główna", "startNewJourney": "Rozpocznij nową podróż", "newJourney": "Nowa Podróż", "accountInfo": "Informacje o koncie", "outlineDesigner": "Projektant konspektu", "pageOutline": "Konspekt strony", "more": "Więcej", "siteActions": "Działania strony", "insights": "Pulpit analizy", "merlin": "Merlin", "summonMerlin": "Przyzwij Merlina", "logOut": "Wyloguj", "menu": "Menu", "showMore": "Pokaż więcej" } ================================================ FILE: elements/app-hax/locales/app-hax.pnb.json ================================================ { "selectPage": "صفحہ منتخب کریں", "backToSiteList": "سائٹ دی لسٹ وِچ واپس جاوو", "listMySites": "میریاں سائٹاں دی لسٹ", "cancel": "رد کرو", "editDetails": "صفحے دے تفصیلات", "add": "شامل کرو", "editSettings": "سیٹنگاں تبدیل کرو", "source": "ذریعہ", "viewSource": "ذریعہ ویکھو", "findMedia": "میڈیا لبھو", "undo": "واپس کرو", "redo": "دوبارہ کرو", "media": "میڈیا", "outline": "نقشہ", "blocks": "بلاک", "addBlock": "بلاک شامل کرو", "addPage": "صفحہ شامل کرو", "addChildPage": "بچے دا صفحہ شامل کرو", "clonePage": "صفحہ کاپی کرو", "delete": "صفحہ ختم کرو", "siteSettings": "سائٹ دیاں سیٹنگاں", "close": "بند کرو", "settings": "سیٹنگاں", "edit": "تبدیلی", "configureBlock": "بلاک تیار کرو", "configure": "تیار کرو", "save": "محفوظ کرو", "home": "گر", "startNewJourney": "نواں سفر شروع کرو", "newJourney": "نواں سفر", "accountInfo": "کھاتے دی جانکاری", "outlineDesigner": "نقشہ بناون والا", "pageOutline": "صفحے دا نقشہ", "more": "ہور", "siteActions": "سائٹ دے کم", "insights": "سمجھ ڈیش بورڈ", "merlin": "مرلن", "summonMerlin": "مرلن کوں بلاوو", "logOut": "لاگ آؤٹ", "menu": "مینیو", "showMore": "ہور وکھاوو" } ================================================ FILE: elements/app-hax/locales/app-hax.ps.json ================================================ { "selectPage": "پاڼه غوره کړئ", "backToSiteList": "د سایٽونو فهرست ته بیرته ولاړه", "listMySites": "د زما سایٽونو فهرست", "cancel": "لغوه کړه", "editDetails": "د پاڼے جزیات", "add": "ور ګخے", "editSettings": "تنظیمات تغییر کړه", "source": "سرچینه", "viewSource": "سرچینه وګوره", "findMedia": "رسنۍ ومونده", "undo": "بیرته ولاړه", "redo": "بیا کول", "media": "رسنۍ", "outline": "خاکه", "blocks": "بلاکونه", "addBlock": "بلاک ورګخے", "addPage": "پاڼه ورګخے", "addChildPage": "د ماشوم پاڼه ورګخے", "clonePage": "پاڼه کاپۍ کړه", "delete": "پاڼه حذف کړه", "siteSettings": "د سایٽ تنظیمات", "close": "بند کړه", "settings": "تنظیمات", "edit": "تغییر", "configureBlock": "بلاک تنظیم کړه", "configure": "تنظیم کړه", "save": "ساتل", "home": "کور", "startNewJourney": "نوۍ سفر پیل کړه", "newJourney": "نوۍ سفر", "accountInfo": "د حساب معلومات", "outlineDesigner": "د خاکه ای افرینونکی", "pageOutline": "د پاڼے خاکه", "more": "نور", "siteActions": "د سایٽ کارونه", "insights": "د پیژندنے ډیش بورډ", "merlin": "میرلین", "summonMerlin": "میرلین راوبلا", "logOut": "وزا", "menu": "مینیو", "showMore": "نور وګایا" } ================================================ FILE: elements/app-hax/locales/app-hax.pt.json ================================================ { "selectPage": "Selecionar página", "backToSiteList": "Voltar à lista de sites", "listMySites": "Listar meus sites", "cancel": "Cancelar", "editDetails": "Detalhes da página", "add": "Adicionar", "editSettings": "Editar configurações", "source": "Origem", "viewSource": "Ver origem", "findMedia": "Encontrar mídia", "undo": "Desfazer", "redo": "Refazer", "media": "Mídia", "outline": "Esboço", "blocks": "Blocos", "addBlock": "Adicionar bloco", "addPage": "Adicionar página", "addChildPage": "Adicionar subpágina", "clonePage": "Clonar página", "delete": "Excluir página", "siteSettings": "Configurações do site", "close": "Fechar", "settings": "Configurações", "edit": "Editar", "configureBlock": "Configurar bloco", "configure": "Configurar", "save": "Salvar", "home": "Início", "startNewJourney": "Iniciar nova jornada", "newJourney": "Nova jornada", "accountInfo": "Informações da conta", "outlineDesigner": "Designer de esboços", "pageOutline": "Esboço da página", "more": "Mais", "siteActions": "Ações do site", "insights": "Painel de insights", "merlin": "Merlin", "summonMerlin": "Invocar Merlin", "logOut": "Sair", "menu": "Menu", "showMore": "Mostrar mais" } ================================================ FILE: elements/app-hax/locales/app-hax.qu.json ================================================ { "selectPage": "P'anqata akllay", "backToSiteList": "Sitiokunap listanman kutiy", "listMySites": "Ñoqap sitiokunap listan", "cancel": "Ama niy", "editDetails": "P'anqap willayninkunata", "add": "Yapay", "editSettings": "Allichaykunata llamk'achiy", "source": "Pukyu", "viewSource": "Pukyuta qhaway", "findMedia": "Mediata maskay", "undo": "Ñawpaqman kutichiy", "redo": "Yapamanta ruray", "media": "Media", "outline": "Siq'i", "blocks": "Bloquekunata", "addBlock": "Bloqueqta yapay", "addPage": "P'anqata yapay", "addChildPage": "Wawap p'anqantan yapay", "clonePage": "P'anqata rikch'arichiy", "delete": "P'anqata qichuy", "siteSettings": "Sitioq allichayninkunata", "close": "Wichay", "settings": "Allichayninkunata", "edit": "Llamk'achiy", "configureBlock": "Bloqueta wakichiy", "configure": "Wakichiy", "save": "Waqaychay", "home": "Wasi", "startNewJourney": "Mosoq puriyta qallariy", "newJourney": "Mosoq Puriy", "accountInfo": "Cuentaq willayninkunata", "outlineDesigner": "Siq'i rurana", "pageOutline": "P'anqap siq'in", "more": "Aswan", "siteActions": "Sitioq ruwayninkunata", "insights": "Yachaykunap tablero", "merlin": "Merlin", "summonMerlin": "Merlinta waqyay", "logOut": "Lluqsiy", "menu": "Menu", "showMore": "Aswan rikuchiy" } ================================================ FILE: elements/app-hax/locales/app-hax.ro.json ================================================ { "selectPage": "Selectați pagina", "backToSiteList": "Înapoierea la lista site-ului", "listMySites": "Lista site-urile mele", "cancel": "Anulează", "editDetails": "Detaliile paginii", "add": "Adăugați", "editSettings": "Editați setările", "source": "Sursa", "viewSource": "Vezi sursa", "findMedia": "Găsiți media", "undo": "Anulați", "redo": "Refaceți", "media": "Media", "outline": "Contur", "blocks": "Blocuri", "addBlock": "Adăugați bloc", "addPage": "Adăugați pagina", "addChildPage": "Adăugați pagina copil", "clonePage": "Clonați pagina", "delete": "Ștergeți pagina", "siteSettings": "Setările site-ului", "close": "Închideți", "settings": "Setări", "edit": "Editați", "configureBlock": "Configurați blocul", "configure": "Configurați", "save": "Salvați", "home": "Acasă", "startNewJourney": "Începeți o nouă călătorie", "newJourney": "Călătoria nouă", "accountInfo": "Informațiile contului", "outlineDesigner": "Designerul conturului", "pageOutline": "Conturul paginii", "more": "Mai mult", "siteActions": "Acțiunile site-ului", "insights": "Tabloul de bord al percepțiilor", "merlin": "Merlin", "summonMerlin": "Chemați pe Merlin", "logOut": "Ieșiți", "menu": "Meniul", "showMore": "Afișați mai mult" } ================================================ FILE: elements/app-hax/locales/app-hax.ru.json ================================================ { "selectPage": "Выбрать страницу", "backToSiteList": "Назад к списку сайтов", "listMySites": "Список моих сайтов", "cancel": "Отменить", "editDetails": "Детали страницы", "add": "Добавить", "editSettings": "Редактировать настройки", "source": "Исходник", "viewSource": "Посмотреть исходник", "findMedia": "Найти медиа", "undo": "Отменить", "redo": "Повторить", "media": "Медиа", "outline": "Конспект", "blocks": "Блоки", "addBlock": "Добавить блок", "addPage": "Добавить страницу", "addChildPage": "Добавить дочернюю страницу", "clonePage": "Клонировать страницу", "delete": "Удалить страницу", "siteSettings": "Настройки сайта", "close": "Закрыть", "settings": "Настройки", "edit": "Редактировать", "configureBlock": "Настроить блок", "configure": "Настроить", "save": "Сохранить", "home": "Главная", "startNewJourney": "Начать новое путешествие", "newJourney": "Новое путешествие", "accountInfo": "Информация об аккаунте", "outlineDesigner": "Дизайнер конспектов", "pageOutline": "Конспект страницы", "more": "Больше", "siteActions": "Действия сайта", "insights": "Панель аналитики", "merlin": "Мерлин", "summonMerlin": "Вызвать Мерлина", "logOut": "Выйти", "menu": "Меню", "showMore": "Показать больше" } ================================================ FILE: elements/app-hax/locales/app-hax.sd.json ================================================ { "selectPage": "صفحو چُنيو", "backToSiteList": "سائيٽن جي فهرسٽ مان واپس وا۽و", "listMySites": "موۼ سائيٽن جو فهرسٽ", "cancel": "رد ڪريو", "editDetails": "صفحو جا تفصيل", "add": "شامل ڪريو", "editSettings": "سیٽنگز تبديل ڪريو", "source": "ماخذ", "viewSource": "ماخذ ڧئيو", "findMedia": "ميڈيا ڳوليو", "undo": "واپس ڪريو", "redo": "مڧر ڪريو", "media": "ميڈيا", "outline": "مختصر", "blocks": "بلاڪ", "addBlock": "بلاڪ شامل ڪريو", "addPage": "صفحو شامل ڪريو", "addChildPage": "فرزند صفحو شامل ڪريو", "clonePage": "صفحو ڪاپي ڪريو", "delete": "صفحو خارج ڪريو", "siteSettings": "سائيٽ جا سیٽنگز", "close": "بند ڪريو", "settings": "سیٽنگز", "edit": "تبديل ڪريو", "configureBlock": "بلاڪ ترتيب ديو", "configure": "ترتيب ديو", "save": "محفوظ ڪريو", "home": "گهر", "startNewJourney": "نئو سفر شروع ڪريو", "newJourney": "نئو سفر", "accountInfo": "کھاتو جي معلومات", "outlineDesigner": "مختصر ڈزائنر", "pageOutline": "صفحو جو مختصر", "more": "واڅو", "siteActions": "سائيٽ جا ڪم", "insights": "انسائٽ ڈاش بورډ", "merlin": "مرلن", "summonMerlin": "مرلن ڤريو", "logOut": "لاگ آءٽ", "menu": "مينيو", "showMore": "وچو ڊُأيو" } ================================================ FILE: elements/app-hax/locales/app-hax.si.json ================================================ { "selectPage": "පෙට තොරන්න", "backToSiteList": "කෙතර පිට සන්ද පරිසරයට පග යමු", "listMySites": "මගේ කෙතර පිටවල සන්දය", "cancel": "රද්ද කරන්න", "editDetails": "පෙට සුනිතරු", "add": "එකතු කරන්න", "editSettings": "සජරණ සංශොධනය කරන්න", "source": "මූලාශ්රය", "viewSource": "මූලාශ්රය බලන්න", "findMedia": "මාධ්ය ශොධන්න", "undo": "වයරදෙට කරන්න", "redo": "නැවකට කරන්න", "media": "මාධ්ය", "outline": "මඝහනු", "blocks": "විබාග", "addBlock": "විබාගයක් එකතු කරන්න", "addPage": "පෙටයක් එකතු කරන්න", "addChildPage": "පුත පෙටයක් එකතු කරන්න", "clonePage": "පෙට නකලය කරන්න", "delete": "පෙට මකන්න", "siteSettings": "කෙතර පිට සජරණ", "close": "වසන්න", "settings": "සජරණ", "edit": "සංශොධනය කරන්න", "configureBlock": "විබාගය සංවිධානය කරන්න", "configure": "සංවිධානය කරන්න", "save": "භාර කරන්න", "home": "ගෙහෙන්", "startNewJourney": "නව ප්‍රවාසයක් හරඬරංක කරන්න", "newJourney": "නව ප්‍රවාසය", "accountInfo": "෋කැකර සිවිසුම්", "outlineDesigner": "මඝහනු ශිල්පී", "pageOutline": "පෙට මඝහනු", "more": "වැඩි", "siteActions": "කෙතර පිට ක්‍රියා", "insights": "ඉන්රාශ් ඩැශ්වඕදය", "merlin": "Merlin", "summonMerlin": "Merlin වැඩා ගන්න", "logOut": "ස්වාමීන් විසින් කරන්න", "menu": "ලිස්තුව", "showMore": "වැඩි සිරඊිම කරන්න" } ================================================ FILE: elements/app-hax/locales/app-hax.sk.json ================================================ { "selectPage": "Vybrať stránku", "backToSiteList": "Späť na zoznam stránok", "listMySites": "Zoznam mojich stránok", "cancel": "Zrušiť", "editDetails": "Podrobnosti stránky", "add": "Pridať", "editSettings": "Upraviť nastavenia", "source": "Zdroj", "viewSource": "Zobraziť zdroj", "findMedia": "Nájsť médiá", "undo": "Späť", "redo": "Opakovať", "media": "Médiá", "outline": "Osnova", "blocks": "Bloky", "addBlock": "Pridať blok", "addPage": "Pridať stránku", "addChildPage": "Pridať podstránku", "clonePage": "Klonovať stránku", "delete": "Vymazať stránku", "siteSettings": "Nastavenia stránky", "close": "Zavrieť", "settings": "Nastavenia", "edit": "Upraviť", "configureBlock": "Konfigurovať blok", "configure": "Konfigurovať", "save": "Uložiť", "home": "Domov", "startNewJourney": "Začať novú cestu", "newJourney": "Nová cesta", "accountInfo": "Informácie o účte", "outlineDesigner": "Návrhár osnovy", "pageOutline": "Osnova stránky", "more": "Viac", "siteActions": "Akcie stránky", "insights": "Prehladová doska", "merlin": "Merlin", "summonMerlin": "Vyvolať Merlina", "logOut": "Odhlásiť sa", "menu": "Menu", "showMore": "Zobraziť viac" } ================================================ FILE: elements/app-hax/locales/app-hax.sl.json ================================================ { "selectPage": "Izberi stran", "backToSiteList": "Nazaj na seznam spletnih strani", "listMySites": "Seznam mojih spletnih strani", "cancel": "Prekliči", "editDetails": "Podrobnosti strani", "add": "Dodaj", "editSettings": "Uredi nastavitve", "source": "Vir", "viewSource": "Poglej vir", "findMedia": "Najdi medije", "undo": "Razveljavi", "redo": "Ponovi", "media": "Mediji", "outline": "Oris", "blocks": "Bloki", "addBlock": "Dodaj blok", "addPage": "Dodaj stran", "addChildPage": "Dodaj podstran", "clonePage": "Kloniraj stran", "delete": "Izbriši stran", "siteSettings": "Nastavitve spletne strani", "close": "Zapri", "settings": "Nastavitve", "edit": "Uredi", "configureBlock": "Konfiguriraj blok", "configure": "Konfiguriraj", "save": "Shrani", "home": "Domov", "startNewJourney": "Začni novo potovanje", "newJourney": "Novo potovanje", "accountInfo": "Informacije o računu", "outlineDesigner": "Oblikovalec orisa", "pageOutline": "Oris strani", "more": "Več", "siteActions": "Dejanja spletne strani", "insights": "Nadzorna plošča vpogledov", "merlin": "Merlin", "summonMerlin": "Pokliči Merlina", "logOut": "Odjavi se", "menu": "Meni", "showMore": "Prikaži več" } ================================================ FILE: elements/app-hax/locales/app-hax.sn.json ================================================ { "selectPage": "Sarudza peji", "backToSiteList": "Dzokera kurondedzero yemasaiti", "listMySites": "Rondedzero yemasaiti angu", "cancel": "Kanzura", "editDetails": "Rondedzero dzepeji", "add": "Wedzera", "editSettings": "Gadziridza zvigadziriso", "source": "Chitubu", "viewSource": "Ona chitubu", "findMedia": "Tsvaga midhiya", "undo": "Dzosa shure", "redo": "Ita zvakare", "media": "Midhiya", "outline": "Dhizaini", "blocks": "Mabhuroki", "addBlock": "Wedzera bhuroka", "addPage": "Wedzera peji", "addChildPage": "Wedzera peji remwana", "clonePage": "Dzvanyira peji", "delete": "Dzima peji", "siteSettings": "Zvigadziriso zvesaiti", "close": "Vhara", "settings": "Zvigadziriso", "edit": "Gadziridza", "configureBlock": "Gadzira bhuroka", "configure": "Gadzira", "save": "Chengetedza", "home": "Kumba", "startNewJourney": "Tanga rwendo rutsva", "newJourney": "Rwendo Rutsva", "accountInfo": "Ruzivo Rweaccount", "outlineDesigner": "Mugadziri wedhizaini", "pageOutline": "Dhizaini repeji", "more": "Zvimwe", "siteActions": "Zviito zvesaiti", "insights": "Dashboard yekuona", "merlin": "Merlin", "summonMerlin": "Dana Merlin", "logOut": "Buda", "menu": "Menu", "showMore": "Ratidza zvimwe" } ================================================ FILE: elements/app-hax/locales/app-hax.so.json ================================================ { "selectPage": "Dooro bog", "backToSiteList": "Dib ugu noqo liiska bogagga", "listMySites": "Liiska bogaggayga", "cancel": "Jooji", "editDetails": "Faahfaahinta bogga", "add": "Ku dar", "editSettings": "Wax ka beddel dejinta", "source": "Isha", "viewSource": "Eeg isha", "findMedia": "Raadi warbaahinta", "undo": "Dib u celi", "redo": "Dib u samee", "media": "Warbaahinta", "outline": "Dulmar", "blocks": "Xayeysiiska", "addBlock": "Ku dar xadhig", "addPage": "Ku dar bog", "addChildPage": "Ku dar bog caruur", "clonePage": "Nuqul ka samee bogga", "delete": "Tir bogga", "siteSettings": "Dejinta bogga", "close": "Xir", "settings": "Dejinta", "edit": "Wax ka beddel", "configureBlock": "Qaabeey xadhigga", "configure": "Qaabeey", "save": "Keydi", "home": "Guriga", "startNewJourney": "Bilow safar cusub", "newJourney": "Safar Cusub", "accountInfo": "Macluumaadka Koontada", "outlineDesigner": "Naqshadeeyaha dulmar", "pageOutline": "Dulmar bogga", "more": "Wax badan", "siteActions": "Ficillada bogga", "insights": "Guddiga fahamka", "merlin": "Merlin", "summonMerlin": "U yeedh Merlin", "logOut": "Ka bax", "menu": "Liiska", "showMore": "Muuji wax badan" } ================================================ FILE: elements/app-hax/locales/app-hax.sq.json ================================================ { "selectPage": "Zgjidh faqen", "backToSiteList": "Kthehu te lista e faqeve", "listMySites": "Listo faqet e mia", "cancel": "Anulo", "editDetails": "Detajet e faqes", "add": "Shto", "editSettings": "Ndrysho rregullimet", "source": "Burimi", "viewSource": "Shiko burimin", "findMedia": "Gjej media", "undo": "Zhbëj", "redo": "Ribëj", "media": "Media", "outline": "Përmbledhje", "blocks": "Blloqe", "addBlock": "Shto bllok", "addPage": "Shto faqe", "addChildPage": "Shto nënbllok faqeje", "clonePage": "Klono faqen", "delete": "Fshi faqen", "siteSettings": "Rregullimet e faqes", "close": "Mbyll", "settings": "Rregullime", "edit": "Ndrysho", "configureBlock": "Konfiguro bllokun", "configure": "Konfiguro", "save": "Ruaj", "home": "Kreu", "startNewJourney": "Nis një udhëtim të ri", "newJourney": "Udhëtim i ri", "accountInfo": "Informacion i llogarisë", "outlineDesigner": "Dizajneri i përmbledhjes", "pageOutline": "Përmbledhja e faqes", "more": "Më shumë", "siteActions": "Veprimet e faqes", "insights": "Pulti i njohurive", "merlin": "Merlin", "summonMerlin": "Thirr Merlinin", "logOut": "Dil", "menu": "Meny", "showMore": "Shfaq më shumë" } ================================================ FILE: elements/app-hax/locales/app-hax.sr.json ================================================ { "selectPage": "Izaberi stranu", "backToSiteList": "Nazad na listu sajtova", "listMySites": "Prikaži moje sajtove", "cancel": "Otkaži", "editDetails": "Detalji strane", "add": "Dodaj", "editSettings": "Uredi podešavanja", "source": "Izvor", "viewSource": "Prikaz izvora", "findMedia": "Pronađi medije", "undo": "Opozovi", "redo": "Ponovi", "media": "Mediji", "outline": "Skica", "blocks": "Blokovi", "addBlock": "Dodaj blok", "addPage": "Dodaj stranu", "addChildPage": "Dodaj podstranu", "clonePage": "Kloniraj stranu", "delete": "Obriši stranu", "siteSettings": "Podešavanja sajta", "close": "Zatvori", "settings": "Podešavanja", "edit": "Uredi", "configureBlock": "Konfiguriraj blok", "configure": "Konfiguriraj", "save": "Sačuvaj", "home": "Početna", "startNewJourney": "Začni novo putovanje", "newJourney": "Novo putovanje", "accountInfo": "Podaci o nalogu", "outlineDesigner": "Dizajner skice", "pageOutline": "Skica strane", "more": "Više", "siteActions": "Akcije sajta", "insights": "Kontrolna tabla uvida", "merlin": "Merlin", "summonMerlin": "Pozovi Merlina", "logOut": "Odjavi se", "menu": "Meni", "showMore": "Prikaži više" } ================================================ FILE: elements/app-hax/locales/app-hax.sv.json ================================================ { "selectPage": "Välj sida", "backToSiteList": "Tillbaka till webbplatslista", "listMySites": "Lista mina webbplatser", "cancel": "Avbryt", "editDetails": "Siddetaljer", "add": "Lägg till", "editSettings": "Redigera inställningar", "source": "Källa", "viewSource": "Visa källa", "findMedia": "Hitta media", "undo": "Ångra", "redo": "Gör om", "media": "Media", "outline": "Disposition", "blocks": "Block", "addBlock": "Lägg till block", "addPage": "Lägg till sida", "addChildPage": "Lägg till undersida", "clonePage": "Klona sida", "delete": "Ta bort sida", "siteSettings": "Webbplatsinställningar", "close": "Stäng", "settings": "Inställningar", "edit": "Redigera", "configureBlock": "Konfigurera block", "configure": "Konfigurera", "save": "Spara", "home": "Hem", "startNewJourney": "Starta ny resa", "newJourney": "Ny resa", "accountInfo": "Kontoinformation", "outlineDesigner": "Dispositionsdesigner", "pageOutline": "Siddisposition", "more": "Mer", "siteActions": "Webbplatsåtgärder", "insights": "Insikter instrumentpanel", "merlin": "Merlin", "summonMerlin": "Kalla på Merlin", "logOut": "Logga ut", "menu": "Meny", "showMore": "Visa mer" } ================================================ FILE: elements/app-hax/locales/app-hax.sw.json ================================================ { "selectPage": "Chagua ukurasa", "backToSiteList": "Rudi kwenye orodha ya tovuti", "listMySites": "Orodhesha tovuti zangu", "cancel": "Ghairi", "editDetails": "Maelezo ya ukurasa", "add": "Ongeza", "editSettings": "Hariri mipangilio", "source": "Chanzo", "viewSource": "Ona chanzo", "findMedia": "Tafuta midia", "undo": "Tendua", "redo": "Rudia", "media": "Midia", "outline": "Muhtasari", "blocks": "Vizuizi", "addBlock": "Ongeza kizuizi", "addPage": "Ongeza ukurasa", "addChildPage": "Ongeza ukurasa wa mtoto", "clonePage": "Nakili ukurasa", "delete": "Futa ukurasa", "siteSettings": "Mipangilio ya tovuti", "close": "Funga", "settings": "Mipangilio", "edit": "Hariri", "configureBlock": "Sanidi kizuizi", "configure": "Sanidi", "save": "Hifadhi", "home": "Nyumbani", "startNewJourney": "Anza safari mpya", "newJourney": "Safari mpya", "accountInfo": "Taarifa za akaunti", "outlineDesigner": "Mbuniaji wa muhtasari", "pageOutline": "Muhtasari wa ukurasa", "more": "Zaidi", "siteActions": "Vitendo vya tovuti", "insights": "Dashibodi ya ufahamu", "merlin": "Merlin", "summonMerlin": "Ita Merlin", "logOut": "Toka", "menu": "Menyu", "showMore": "Onyesha zaidi" } ================================================ FILE: elements/app-hax/locales/app-hax.ta.json ================================================ { "selectPage": "பக்கத்தை தேர்வு செய்யவும்", "backToSiteList": "தள பட்டியலுக்கு திரும்பவும்", "listMySites": "என்னுடைய தளங்களின் பட்டியல்", "cancel": "ரத்து செய்யவும்", "editDetails": "பக்க விவரங்கள்", "add": "சேர்க்கவும்", "editSettings": "அமைப்புகளை தரும் செய்யவும்", "source": "மூலம்", "viewSource": "மூலத்தை பார்க்கவும்", "findMedia": "ஊடகத்தை கண்டுபிடிக்கவும்", "undo": "விலக்கவும்", "redo": "மீண்டும் செய்யவும்", "media": "ஊடகம்", "outline": "வன்மை", "blocks": "தடைகள்", "addBlock": "தடையை சேர்க்கவும்", "addPage": "பக்கத்தை சேர்க்கவும்", "addChildPage": "குழந்தை பக்கத்தை சேர்க்கவும்", "clonePage": "பக்கத்தை நகலேடு செய்யவும்", "delete": "பக்கத்தை நீக்கவும்", "siteSettings": "தள அமைப்புகள்", "close": "மூடவும்", "settings": "அமைப்புகள்", "edit": "திருத்தவும்", "configureBlock": "தடையை கண்ஃபிகர் செய்யவும்", "configure": "கண்ஃபிகர் செய்யவும்", "save": "சேமிக்கவும்", "home": "வீடு", "startNewJourney": "புதிய பயணத்தை துவங்கவும்", "newJourney": "புதிய பயணம்", "accountInfo": "கணக்கு தகவல்", "outlineDesigner": "வன்மை வடிவமைப்பாளர்", "pageOutline": "பக்க வன்மை", "more": "மேலும்", "siteActions": "தள செயல்கள்", "insights": "நுளைவுகள் டாஷ்‌போர்ட்", "merlin": "மெர்லின்", "summonMerlin": "மெர்லினை அழைக்கவும்", "logOut": "வெளியேறவும்", "menu": "பட்டியல்", "showMore": "மேலும் காட்டவும்" } ================================================ FILE: elements/app-hax/locales/app-hax.te.json ================================================ { "selectPage": "పేజీని ఎంచుకోండి", "backToSiteList": "సైట్ పట్టికి వెళ్ళండి", "listMySites": "నా సైట్ల పట్టి", "cancel": "రద్దు చేయండి", "editDetails": "పేజీ వివరాలు", "add": "చేర్చండి", "editSettings": "సెట్టింగులను ఎడిట్ చేయండి", "source": "మూలం", "viewSource": "మూలం చూడండి", "findMedia": "మీడియా కనుగొనండి", "undo": "రద్దు చేయండి", "redo": "మరలా చేయండి", "media": "మీడియా", "outline": "రూపరేఖ", "blocks": "బ్లాకులు", "addBlock": "బ్లాకు చేర్చండి", "addPage": "పేజీ చేర్చండి", "addChildPage": "పిల్లల పేజీ చేర్చండి", "clonePage": "పేజీని క్లోన్ చేయండి", "delete": "పేజీని తీసివేయండి", "siteSettings": "సైట్ సెట్టింగులు", "close": "మూసివేయండి", "settings": "సెట్టింగులు", "edit": "ఎడిట్ చేయండి", "configureBlock": "బ్లాకును కాన్ఫిగర్ చేయండి", "configure": "కాన్ఫిగర్ చేయండి", "save": "సేవ్ చేయండి", "home": "ఇల్లు", "startNewJourney": "కొత్త యాత్ర శురువు చేయండి", "newJourney": "కొత్త యాత్ర", "accountInfo": "ఖాతా సమాచారం", "outlineDesigner": "రూపరేఖ డిజైనర్", "pageOutline": "పేజీ రూపరేఖ", "more": "ఇంకా", "siteActions": "సైట్ కార్యాలు", "insights": "ఇన్‌సైట్స్ డ్యాష్‌బోర్డ్", "merlin": "మెర్లిన్", "summonMerlin": "మెర్లిన్ను ఆహ్వానించండి", "logOut": "లాగ్ ఆఉట్", "menu": "మెను", "showMore": "ఇంకా చూపించండి" } ================================================ FILE: elements/app-hax/locales/app-hax.tg.json ================================================ { "selectPage": "Саҳифаро интихоб кунед", "backToSiteList": "Бозгашт ба рӯйхати сайтҳо", "listMySites": "Рӯйхати сайтҳои ман", "cancel": "Бекор кардан", "editDetails": "Тафсилоти саҳифа", "add": "Илова кардан", "editSettings": "Танзимоти таҳрир", "source": "Манбаъ", "viewSource": "Дидани манбаъ", "findMedia": "Ёфтани медиа", "undo": "Бекор кардан", "redo": "Такрор кардан", "media": "Медиа", "outline": "Тарҳвора", "blocks": "Блокҳо", "addBlock": "Блок илова кардан", "addPage": "Саҳифа илова кардан", "addChildPage": "Саҳифаи фарзанд илова кардан", "clonePage": "Нусха бардоштани саҳифа", "delete": "Нест кардани саҳифа", "siteSettings": "Танзимоти сайт", "close": "Пӯшидан", "settings": "Танзимот", "edit": "Таҳрир кардан", "configureBlock": "Танзими блок", "configure": "Танзим кардан", "save": "Нигоҳ доштан", "home": "Хона", "startNewJourney": "Сафари нав оғоз кунед", "newJourney": "Сафари нав", "accountInfo": "Маълумоти ҳисоб", "outlineDesigner": "Тарроҳии тарҳвора", "pageOutline": "Тарҳворaи саҳифа", "more": "Бештар", "siteActions": "Амалҳои сайт", "insights": "Дашборди таҳлилот", "merlin": "Мерлин", "summonMerlin": "Даъват кардани Мерлин", "logOut": "Баромад", "menu": "Меню", "showMore": "Бештар нишон додан" } ================================================ FILE: elements/app-hax/locales/app-hax.th.json ================================================ { "selectPage": "เลือกหน้า", "backToSiteList": "กลับไปยังรายการเว็บไซต์", "listMySites": "แสดงรายการเว็บไซต์ของฉัน", "cancel": "ยกเลิก", "editDetails": "รายละเอียดหน้า", "add": "เพิ่ม", "editSettings": "แก้ไขการตั้งค่า", "source": "แหล่งที่มา", "viewSource": "ดูแหล่งที่มา", "findMedia": "ค้นหาสื่อ", "undo": "เลิกทำ", "redo": "ทำซ้ำ", "media": "สื่อ", "outline": "โครงสร้าง", "blocks": "บล็อก", "addBlock": "เพิ่มบล็อก", "addPage": "เพิ่มหน้า", "addChildPage": "เพิ่มหน้าย่อย", "clonePage": "โคลนหน้า", "delete": "ลบหน้า", "siteSettings": "การตั้งค่าเว็บไซต์", "close": "ปิด", "settings": "การตั้งค่า", "edit": "แก้ไข", "configureBlock": "กำหนดค่าบล็อก", "configure": "กำหนดค่า", "save": "บันทึก", "home": "หน้าแรก", "startNewJourney": "เริ่มการเดินทางใหม่", "newJourney": "การเดินทางใหม่", "accountInfo": "ข้อมูลบัญชี", "outlineDesigner": "ตัวออกแบบโครงสร้าง", "pageOutline": "โครงสร้างหน้า", "more": "เพิ่มเติม", "siteActions": "การดำเนินการเว็บไซต์", "insights": "แดชบอร์ดข้อมูลเชิงลึก", "merlin": "เมอร์ลิน", "summonMerlin": "เรียกเมอร์ลิน", "logOut": "ออกจากระบบ", "menu": "เมนู", "showMore": "แสดงเพิ่มเติม" } ================================================ FILE: elements/app-hax/locales/app-hax.tk.json ================================================ { "selectPage": "Sahypa saýlañ", "backToSiteList": "Saýt sanawyna gaýt", "listMySites": "Meniñ saýtlarymñ sanawy", "cancel": "Ýatyr", "editDetails": "Sahypa jikme-jiklikleri", "add": "Goş", "editSettings": "Sazlamalary üýgetmek", "source": "Çeşme", "viewSource": "Çeşmä seretmek", "findMedia": "Media tapmak", "undo": "Yza gaýtar", "redo": "Gaýtadan et", "media": "Media", "outline": "Meýilnama", "blocks": "Bloklar", "addBlock": "Blok goşmak", "addPage": "Sahypa goşmak", "addChildPage": "Çaga sahypasyny goşmak", "clonePage": "Sahypa näsgesiñi almak", "delete": "Sahypa pozmak", "siteSettings": "Saýt sazlamalary", "close": "Ýapmak", "settings": "Sazlamalar", "edit": "Üýgetmek", "configureBlock": "Blok sazlamak", "configure": "Sazlamak", "save": "Saklamak", "home": "Öý", "startNewJourney": "Täze syýahat başlamak", "newJourney": "Täze syýahat", "accountInfo": "Hasap maglumat", "outlineDesigner": "Meýilnama dizaýneri", "pageOutline": "Sahypa meýilnamasy", "more": "Has köp", "siteActions": "Saýt herekatleri", "insights": "Düzüm paneli", "merlin": "Merlin", "summonMerlin": "Merlin çağyrmak", "logOut": "Çykmak", "menu": "Menýu", "showMore": "Has köp görkezmek" } ================================================ FILE: elements/app-hax/locales/app-hax.tl.json ================================================ { "selectPage": "Piliin ang pahina", "backToSiteList": "Bumalik sa listahan ng site", "listMySites": "Listahan ng aking mga site", "cancel": "Kanselahin", "editDetails": "Mga detalye ng pahina", "add": "Idagdag", "editSettings": "I-edit ang mga setting", "source": "Pinagmulan", "viewSource": "Tingnan ang pinagmulan", "findMedia": "Maghanap ng media", "undo": "Ibalik", "redo": "Ulitin", "media": "Media", "outline": "Balangkas", "blocks": "Mga bloke", "addBlock": "Magdagdag ng bloke", "addPage": "Magdagdag ng pahina", "addChildPage": "Magdagdag ng child page", "clonePage": "I-clone ang pahina", "delete": "Tanggalin ang pahina", "siteSettings": "Mga setting ng site", "close": "Isara", "settings": "Mga setting", "edit": "I-edit", "configureBlock": "I-configure ang bloke", "configure": "I-configure", "save": "I-save", "home": "Tahanan", "startNewJourney": "Magsimula ng bagong paglalakbay", "newJourney": "Bagong paglalakbay", "accountInfo": "Impormasyon ng account", "outlineDesigner": "Tagadisenyo ng balangkas", "pageOutline": "Balangkas ng pahina", "more": "Higit pa", "siteActions": "Mga aksyon ng site", "insights": "Dashboard ng mga insight", "merlin": "Merlin", "summonMerlin": "Tawagin si Merlin", "logOut": "Mag-log out", "menu": "Menu", "showMore": "Ipakita ang higit pa" } ================================================ FILE: elements/app-hax/locales/app-hax.tr.json ================================================ { "selectPage": "Sayfa seç", "backToSiteList": "Site listesine geri dön", "listMySites": "Sitelerimi listele", "cancel": "İptal", "editDetails": "Sayfa detayları", "add": "Ekle", "editSettings": "Ayarları düzenle", "source": "Kaynak", "viewSource": "Kaynağı görüntüle", "findMedia": "Medya bul", "undo": "Geri al", "redo": "Yinele", "media": "Medya", "outline": "Taslak", "blocks": "Bloklar", "addBlock": "Blok ekle", "addPage": "Sayfa ekle", "addChildPage": "Alt sayfa ekle", "clonePage": "Sayfayı kopyala", "delete": "Sayfayı sil", "siteSettings": "Site ayarları", "close": "Kapat", "settings": "Ayarlar", "edit": "Düzenle", "configureBlock": "Blok yapılandır", "configure": "Yapılandır", "save": "Kaydet", "home": "Ana sayfa", "startNewJourney": "Yeni yolculuğa başla", "newJourney": "Yeni yolculuk", "accountInfo": "Hesap bilgileri", "outlineDesigner": "Taslak tasarımcısı", "pageOutline": "Sayfa taslağı", "more": "Daha fazla", "siteActions": "Site eylemleri", "insights": "İçgörüler panosu", "merlin": "Merlin", "summonMerlin": "Merlin'ı çağır", "logOut": "Çıkış yap", "menu": "Menü", "showMore": "Daha fazla göster" } ================================================ FILE: elements/app-hax/locales/app-hax.tt.json ================================================ { "selectPage": "Бит сайлагыз", "backToSiteList": "Сайтлар исемлегенә кире кайту", "listMySites": "Минем сайтларым исемлеге", "cancel": "Баш тарту", "editDetails": "Бит тулыландыру", "add": "Өстәү", "editSettings": "Көйләүләрне үзгәртү", "source": "Чыганак", "viewSource": "Чыганакны карау", "findMedia": "Медиа табу", "undo": "Кире кайтару", "redo": "Кабатлау", "media": "Медиа", "outline": "Планлаштыру", "blocks": "Блоклар", "addBlock": "Блок өстәү", "addPage": "Бит өстәү", "addChildPage": "Бала бите өстәү", "clonePage": "Битне күчерү", "delete": "Битне бетерү", "siteSettings": "Сайт көйләүләре", "close": "Ябу", "settings": "Көйләүләр", "edit": "Үзгәртү", "configureBlock": "Блокны көйләү", "configure": "Көйләү", "save": "Саклау", "home": "Өй", "startNewJourney": "Яңа сәяхәт башлау", "newJourney": "Яңа Сәяхәт", "accountInfo": "Хисап мәгълүматы", "outlineDesigner": "Планлаштыру дизайнеры", "pageOutline": "Бит планлаштыруы", "more": "Күбрәк", "siteActions": "Сайт гамәлләре", "insights": "Аналитика панеле", "merlin": "Мерлин", "summonMerlin": "Мерлинны чакыру", "logOut": "Чыгу", "menu": "Меню", "showMore": "Күбрәк күрсәтү" } ================================================ FILE: elements/app-hax/locales/app-hax.uk.json ================================================ { "selectPage": "Вибрати сторінку", "backToSiteList": "Назад до списку сайтів", "listMySites": "Показати мої сайти", "cancel": "Відмінити", "editDetails": "Деталі сторінки", "add": "Додати", "editSettings": "Редагувати налаштування", "source": "Джерело", "viewSource": "Переглянути джерело", "findMedia": "Знайти медіа", "undo": "Відмінити", "redo": "Повторити", "media": "Медіа", "outline": "Конспект", "blocks": "Блоки", "addBlock": "Додати блок", "addPage": "Додати сторінку", "addChildPage": "Додати підсторінку", "clonePage": "Клонувати сторінку", "delete": "Видалити сторінку", "siteSettings": "Налаштування сайту", "close": "Закрити", "settings": "Налаштування", "edit": "Редагувати", "configureBlock": "Налаштувати блок", "configure": "Налаштувати", "save": "Зберегти", "home": "Головна", "startNewJourney": "Почати нову подорож", "newJourney": "Нова подорож", "accountInfo": "Інформація про акаунт", "outlineDesigner": "Дизайнер конспекту", "pageOutline": "Конспект сторінки", "more": "Більше", "siteActions": "Дії сайту", "insights": "Панель аналітики", "merlin": "Мерлін", "summonMerlin": "Покликати Мерліна", "logOut": "Вийти", "menu": "Меню", "showMore": "Показати більше" } ================================================ FILE: elements/app-hax/locales/app-hax.ur.json ================================================ { "selectPage": "صفحہ منتخب کریں", "backToSiteList": "سائٹ کی فہرست پر واپس جائیں", "listMySites": "میری سائٹس کی فہرست", "cancel": "منسوخ کریں", "editDetails": "صفحہ کی تفصیلات", "add": "شامل کریں", "editSettings": "سیٹنگز تدوین کریں", "source": "ذریعہ", "viewSource": "ذریعہ دیکھیں", "findMedia": "میڈیا تلاش کریں", "undo": "واپس کریں", "redo": "دوبارہ کریں", "media": "میڈیا", "outline": "خاکہ", "blocks": "بلاکس", "addBlock": "بلاک شامل کریں", "addPage": "صفحہ شامل کریں", "addChildPage": "ذیلی صفحہ شامل کریں", "clonePage": "صفحہ کلون کریں", "delete": "صفحہ حذف کریں", "siteSettings": "سائٹ کی سیٹنگز", "close": "بند کریں", "settings": "سیٹنگز", "edit": "تدوین کریں", "configureBlock": "بلاک کانفیگر کریں", "configure": "کانفیگر کریں", "save": "محفوظ کریں", "home": "گھر", "startNewJourney": "نیا سفر شروع کریں", "newJourney": "نیا سفر", "accountInfo": "اکاؤنٹ کی معلومات", "outlineDesigner": "خاکہ ڈزائنر", "pageOutline": "صفحہ کا خاکہ", "more": "مزید", "siteActions": "سائٹ کے اعمال", "insights": "بصیرت ڈیش بورڈ", "merlin": "مرلن", "summonMerlin": "مرلن کو بلائیں", "logOut": "لاگ آؤٹ", "menu": "مینو", "showMore": "مزید دکھائیں" } ================================================ FILE: elements/app-hax/locales/app-hax.uz.json ================================================ { "selectPage": "Sahifani tanlang", "backToSiteList": "Saytlar ro'yxatiga qaytish", "listMySites": "Mening saytlarim ro'yxati", "cancel": "Bekor qilish", "editDetails": "Sahifa tafsilotlari", "add": "Qo'shish", "editSettings": "Sozlamalarni tahrirlash", "source": "Manba", "viewSource": "Manbani ko'rish", "findMedia": "Media topish", "undo": "Bekor qilish", "redo": "Qaytarish", "media": "Media", "outline": "Reja", "blocks": "Bloklar", "addBlock": "Blok qo'shish", "addPage": "Sahifa qo'shish", "addChildPage": "Bola sahifasini qo'shish", "clonePage": "Sahifani nusxalash", "delete": "Sahifani o'chirish", "siteSettings": "Sayt sozlamalari", "close": "Yopish", "settings": "Sozlamalar", "edit": "Tahrirlash", "configureBlock": "Blokni sozlash", "configure": "Sozlash", "save": "Saqlash", "home": "Bosh sahifa", "startNewJourney": "Yangi safar boshlash", "newJourney": "Yangi Safar", "accountInfo": "Hisob Ma'lumotlari", "outlineDesigner": "Reja dizayneri", "pageOutline": "Sahifa rejasi", "more": "Ko'proq", "siteActions": "Sayt harakatlari", "insights": "Ma'lumot paneli", "merlin": "Merlin", "summonMerlin": "Merlinni chaqirish", "logOut": "Chiqish", "menu": "Menyu", "showMore": "Ko'proq ko'rsatish" } ================================================ FILE: elements/app-hax/locales/app-hax.vi.json ================================================ { "selectPage": "Chọn trang", "backToSiteList": "Trở về danh sách trang web", "listMySites": "Liệt kê các trang web của tôi", "cancel": "Hủy", "editDetails": "Chi tiết trang", "add": "Thêm", "editSettings": "Chỉnh sửa cài đặt", "source": "Nguồn", "viewSource": "Xem nguồn", "findMedia": "Tìm phương tiện", "undo": "Hoàn tác", "redo": "Làm lại", "media": "Phương tiện", "outline": "Phác thảo", "blocks": "Khối", "addBlock": "Thêm khối", "addPage": "Thêm trang", "addChildPage": "Thêm trang con", "clonePage": "Sao chép trang", "delete": "Xóa trang", "siteSettings": "Cài đặt trang web", "close": "Đóng", "settings": "Cài đặt", "edit": "Chỉnh sửa", "configureBlock": "Cấu hình khối", "configure": "Cấu hình", "save": "Lưu", "home": "Trang chủ", "startNewJourney": "Bắt đầu hành trình mới", "newJourney": "Hành trình mới", "accountInfo": "Thông tin tài khoản", "outlineDesigner": "Thiết kế phác thảo", "pageOutline": "Phác thảo trang", "more": "Thêm", "siteActions": "Hành động trang web", "insights": "Bảng điều khiển thông tin chi tiết", "merlin": "Merlin", "summonMerlin": "Gọi Merlin", "logOut": "Đăng xuất", "menu": "Trình đơn", "showMore": "Hiển thị thêm" } ================================================ FILE: elements/app-hax/locales/app-hax.wuu.json ================================================ { "selectPage": "選頁面", "backToSiteList": "轉去網站列表", "listMySites": "我個網站列表", "cancel": "取消", "editDetails": "頁面詳情", "add": "添加", "editSettings": "修改設定", "source": "源頭", "viewSource": "看源頭", "findMedia": "尋媒體", "undo": "撤銷", "redo": "重做", "media": "媒體", "outline": "大綱", "blocks": "塊", "addBlock": "加塊", "addPage": "加頁面", "addChildPage": "加子頁面", "clonePage": "複製頁面", "delete": "刪頁面", "siteSettings": "網站設定", "close": "關閉", "settings": "設定", "edit": "編輯", "configureBlock": "配置塊", "configure": "配置", "save": "保存", "home": "屋裡", "startNewJourney": "開始新旅程", "newJourney": "新旅程", "accountInfo": "賬戶信息", "outlineDesigner": "大綱設計師", "pageOutline": "頁面大綱", "more": "更多", "siteActions": "網站操作", "insights": "洞察儀表板", "merlin": "默林", "summonMerlin": "召喚默林", "logOut": "退出", "menu": "菜單", "showMore": "顯示更多" } ================================================ FILE: elements/app-hax/locales/app-hax.xh.json ================================================ { "selectPage": "Khetha iphepha", "backToSiteList": "Buyela kuluhlu lwewebhusayithi", "listMySites": "Uluhlu lwazo iwebhusayithi zam", "cancel": "Rhoxisa", "editDetails": "Iinkcukacha zephepha", "add": "Engeza", "editSettings": "Hlela iisetingi", "source": "Uvimba", "viewSource": "Jonga uvimba", "findMedia": "Fumana imidiya", "undo": "Cima", "redo": "Phinda", "media": "Imidiya", "outline": "Isishwankathelo", "blocks": "Iibhloko", "addBlock": "Yongeza ibhloko", "addPage": "Yongeza iphepha", "addChildPage": "Yongeza iphepha lomntwana", "clonePage": "Kopa iphepha", "delete": "Cima iphepha", "siteSettings": "Iisetingi zewebhusayithi", "close": "Vala", "settings": "Iisetingi", "edit": "Hlela", "configureBlock": "Misela ibhloko", "configure": "Misela", "save": "Gcina", "home": "Ekhaya", "startNewJourney": "Qala uhambo olutsha", "newJourney": "Uhambo Olutsha", "accountInfo": "Ulwazi Lweakhawunti", "outlineDesigner": "Umyili wesishwankathelo", "pageOutline": "Isishwankathelo sephepha", "more": "Ngaphezulu", "siteActions": "Iintshukumo zewebhusayithi", "insights": "Ideshibhodi yokufumana ulwazi", "merlin": "Merlin", "summonMerlin": "Biza uMerlin", "logOut": "Phuma", "menu": "Imenyu", "showMore": "Bonisa ngaphezulu" } ================================================ FILE: elements/app-hax/locales/app-hax.yi.json ================================================ { "selectPage": "קליבן א בלאט", "backToSiteList": "צוריק צו דער וועבסייט ליסטע", "listMySites": "ליסטע פון מיין וועבסייטן", "cancel": "אנולירן", "editDetails": "בלאט דעטאילס", "add": "צולייגן", "editSettings": "רעדאקטירן סעטינגס", "source": "מקור", "viewSource": "באקוקן מקור", "findMedia": "געפינען מעדיע", "undo": "אנולירן", "redo": "מאכן נאך אמאל", "media": "מעדיע", "outline": "אוטליין", "blocks": "בלעקס", "addBlock": "צולייגן בלאק", "addPage": "צולייגן בלאט", "addChildPage": "צולייגן קינד בלאט", "clonePage": "קלאנירן בלאט", "delete": "איישמעקן בלאט", "siteSettings": "וועבסייט סעטינגס", "close": "פארמאכן", "settings": "סעטינגס", "edit": "רעדאקטירן", "configureBlock": "קאנפיגורירן בלאק", "configure": "קאנפיגורירן", "save": "ראטעווען", "home": "היים", "startNewJourney": "אנהייבן נייע רייזע", "newJourney": "נייע רייזע", "accountInfo": "קאנטע אינפארמאציע", "outlineDesigner": "אוטליין דיזיינער", "pageOutline": "בלאט אוטליין", "more": "מער", "siteActions": "וועבסייט אקציעס", "insights": "איינבליק טאףל", "merlin": "מערלין", "summonMerlin": "רופן מערלין", "logOut": "ארויסלאגירן", "menu": "מעניו", "showMore": "ווייזן מער" } ================================================ FILE: elements/app-hax/locales/app-hax.yo.json ================================================ { "selectPage": "Yan ojú-ìwé náà", "backToSiteList": "Padà sí àtokọ awọn ibí", "listMySites": "Àtokọ awọn ibí mi", "cancel": "Fàgíle", "editDetails": "Awọn alkúnnia ojú-ìwé", "add": "Fí kún", "editSettings": "Ṣe àyẹwò awọn etò", "source": "Orísín", "viewSource": "Wo orísín", "findMedia": "Wa mídíà", "undo": "Yîpàdà", "redo": "Túnmọ̀", "media": "Mídíà", "outline": "Àla", "blocks": "Awọn pẹlẹbẹ", "addBlock": "Fí pẹlẹbẹ kún", "addPage": "Fí ojú-ìwé kún", "addChildPage": "Fí ojú-ìwé ọmọ kún", "clonePage": "Dà ojú-ìwé náà kọ", "delete": "Pa ojú-ìwé náà rẹ́", "siteSettings": "Awọn etò ibí", "close": "Ti", "settings": "Awọn etò", "edit": "Ṣe àyẹwò", "configureBlock": "Tò pẹlẹbẹ náà", "configure": "Tò", "save": "Fi pamọ́", "home": "Ile", "startNewJourney": "Bẹ̀rẹ̀ ìrìn àjò tuntun", "newJourney": "Ìrìn Àjò Tuntun", "accountInfo": "Àlaye Akúnde", "outlineDesigner": "Oníṣe àla", "pageOutline": "Àla ojú-ìwé", "more": "Diẹ sí i", "siteActions": "Awọn ìṣe ibí", "insights": "Pépe ìmò", "merlin": "Merlin", "summonMerlin": "Pe Merlin", "logOut": "Jade", "menu": "Menu", "showMore": "Fi diẹ sí i han" } ================================================ FILE: elements/app-hax/locales/app-hax.zh.json ================================================ { "selectPage": "选择页面", "backToSiteList": "返回站点列表", "listMySites": "列出我的站点", "cancel": "取消", "editDetails": "页面详情", "add": "添加", "editSettings": "编辑设置", "source": "来源", "viewSource": "查看源代码", "findMedia": "查找媒体", "undo": "撤销", "redo": "重做", "media": "媒体", "outline": "大纲", "blocks": "块", "addBlock": "添加块", "addPage": "添加页面", "addChildPage": "添加子页面", "clonePage": "克隆页面", "delete": "删除页面", "siteSettings": "站点设置", "close": "关闭", "settings": "设置", "edit": "编辑", "configureBlock": "配置块", "configure": "配置", "save": "保存", "home": "首页", "startNewJourney": "开始新旅程", "newJourney": "新旅程", "accountInfo": "账户信息", "outlineDesigner": "大纲设计器", "pageOutline": "页面大纲", "more": "更多", "siteActions": "站点操作", "insights": "洞察仪表板", "merlin": "梅林", "summonMerlin": "召唤梅林", "logOut": "登出", "menu": "菜单", "showMore": "更多" } ================================================ FILE: elements/app-hax/locales/app-hax.zh_CN.json ================================================ { "selectPage": "选择页面", "backToSiteList": "返回站点列表", "listMySites": "列出我的站点", "cancel": "取消", "editDetails": "页面详情", "add": "添加", "editSettings": "编辑设置", "source": "源代码", "viewSource": "查看源代码", "findMedia": "查找媒体", "undo": "撤销", "redo": "重做", "media": "媒体", "outline": "大纲", "blocks": "块", "addBlock": "添加块", "addPage": "添加页面", "addChildPage": "添加子页面", "clonePage": "克隆页面", "delete": "删除页面", "siteSettings": "站点设置", "close": "关闭", "settings": "设置", "edit": "编辑", "configureBlock": "配置块", "configure": "配置", "save": "保存", "home": "首页", "startNewJourney": "开始新旅程", "newJourney": "新旅程", "accountInfo": "账户信息", "outlineDesigner": "大纲设计器", "pageOutline": "页面大纲", "more": "更多", "siteActions": "站点操作", "insights": "洞察仪表板", "merlin": "梅林", "summonMerlin": "召唤梅林", "logOut": "退出登录", "menu": "菜单", "showMore": "显示更多" } ================================================ FILE: elements/app-hax/locales/app-hax.zu.json ================================================ { "selectPage": "Khetha ikhasi", "backToSiteList": "Buyela kuluhlu lwewebhusayithi", "listMySites": "Uhlu lwamawebhusayithi ami", "cancel": "Khansela", "editDetails": "Imininingwane yekhasi", "add": "Engeza", "editSettings": "Hlela izilungiselelo", "source": "Umthombo", "viewSource": "Buka umthombo", "findMedia": "Thola imidiya", "undo": "Hlehlisa", "redo": "Phinda", "media": "Imidiya", "outline": "Uhlaka", "blocks": "Amabhulokhi", "addBlock": "Engeza ibhulokhi", "addPage": "Engeza ikhasi", "addChildPage": "Engeza ikhasi lengane", "clonePage": "Kopisha ikhasi", "delete": "Susa ikhasi", "siteSettings": "Izilungiselelo zewebhusayithi", "close": "Vala", "settings": "Izilungiselelo", "edit": "Hlela", "configureBlock": "Lungisa ibhulokhi", "configure": "Lungisa", "save": "Gcina", "home": "Ekhaya", "startNewJourney": "Qala uhambo olusha", "newJourney": "Uhambo Olusha", "accountInfo": "Ulwazi Lwe-akhawunti", "outlineDesigner": "Umklami wohlaka", "pageOutline": "Uhlaka lwekhasi", "more": "Okuningi", "siteActions": "Izenzo zewebhusayithi", "insights": "Ibhodi yokuqonda", "merlin": "Merlin", "summonMerlin": "Biza uMerlin", "logOut": "Phuma", "menu": "Imenyu", "showMore": "Bonisa okuningi" } ================================================ FILE: elements/app-hax/package.json ================================================ { "name": "@haxtheweb/app-hax", "wcfactory": { "className": "AppHax", "customElementClass": "LitElement", "elementName": "app-hax", "generator-wcfactory-version": "0.13.1", "useHAX": false, "useSass": false, "files": { "css": "src/app-hax.css", "html": "src/app-hax.html", "js": "src/app-hax.js", "properties": "src/app-hax-properties.json", "hax": "src/app-hax-hax.json" }, "iconset": {}, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "HAX+HAXcms as a full app experience", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "app-hax.js", "module": "app-hax.js", "scripts": { "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --timeout 10000", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --watch --config=../../web-test-runner.config.mjs --playwright --browsers chromium --timeout 10000", "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "cd demo && web-dev-server -c ../../../web-dev-server.haxcms.config.cjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/d-d-d": "^25.0.0", "@haxtheweb/future-terminal-text": "^25.0.0", "@haxtheweb/grid-plate": "^25.0.0", "@haxtheweb/h-a-x": "^25.0.0", "@haxtheweb/hax-iconset": "^25.0.0", "@haxtheweb/haxcms-elements": "^25.0.0", "@haxtheweb/i18n-manager": "^25.0.0", "@haxtheweb/jwt-login": "^25.0.0", "@haxtheweb/micro-frontend-registry": "^25.0.0", "@haxtheweb/multiple-choice": "^25.0.0", "@haxtheweb/promise-progress": "^25.0.0", "@haxtheweb/replace-tag": "^25.0.0", "@haxtheweb/rpg-character": "^25.0.0", "@haxtheweb/scroll-button": "^25.0.0", "@haxtheweb/simple-colors": "^25.0.0", "@haxtheweb/simple-colors-shared-styles": "^25.0.0", "@haxtheweb/simple-datetime": "^25.0.0", "@haxtheweb/simple-fields": "^25.0.0", "@haxtheweb/simple-icon": "^25.0.0", "@haxtheweb/simple-modal": "^25.0.0", "@haxtheweb/simple-popover": "^25.0.0", "@haxtheweb/simple-toast": "^25.0.0", "@haxtheweb/simple-toolbar": "^25.0.0", "@haxtheweb/simple-tooltip": "^25.0.0", "@haxtheweb/super-daemon": "^25.0.0", "@haxtheweb/utils": "^25.0.0", "@haxtheweb/wc-autoload": "^25.0.0", "@lit-labs/motion": "^1.0.7", "@vaadin/router": "^1.7.5", "lit": "3.3.2", "mobx": "6.13.7", "roughjs": "4.4.5", "scrollable-component": "^1.2.0", "wired-elements": "3.0.0-rc.6" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/app-hax/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/app-hax/test/app-hax.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import { store } from "../lib/v1/AppHaxStore.js"; import "../app-hax.js"; describe("app-hax test", () => { let element; beforeEach(async () => { // Reset store state before each test if (store) { store.appMode = "home"; store.darkMode = false; store.soundStatus = false; store.appReady = false; } element = await fixture(html` Example University
    `); await element.updateComplete; }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("app-hax"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Component structure and properties", () => { it("should have correct tag name", () => { expect(element.constructor.tag).to.equal("app-hax"); }); it("should initialize with default properties", () => { expect(element.unlockComingSoon).to.equal(false); expect(element.unlockTerrible).to.equal(false); expect(element.basePath).to.equal("/test/"); expect(element.token).to.equal("test-token"); }); it("should have translation object", () => { expect(element.t).to.be.an("object"); expect(element.t.save).to.equal("Save"); expect(element.t.cancel).to.equal("Cancel"); expect(element.t.home).to.equal("Home"); }); }); describe("Property validation with accessibility", () => { let testElement; beforeEach(async () => { testElement = await fixture(html` `); await testElement.updateComplete; }); describe("Boolean properties", () => { it("should handle unlockComingSoon property", async () => { testElement.unlockComingSoon = true; await testElement.updateComplete; expect(testElement.unlockComingSoon).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); testElement.unlockComingSoon = false; await testElement.updateComplete; expect(testElement.unlockComingSoon).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle unlockTerrible property", async () => { testElement.unlockTerrible = true; await testElement.updateComplete; expect(testElement.unlockTerrible).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle isNewUser property", async () => { testElement.isNewUser = true; await testElement.updateComplete; expect(testElement.isNewUser).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle userMenuOpen property", async () => { testElement.userMenuOpen = true; await testElement.updateComplete; expect(testElement.userMenuOpen).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle siteReady property", async () => { testElement.siteReady = true; await testElement.updateComplete; expect(testElement.siteReady).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("String properties", () => { it("should handle basePath property", async () => { testElement.basePath = "/custom/path/"; await testElement.updateComplete; expect(testElement.basePath).to.equal("/custom/path/"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle token property", async () => { testElement.token = "custom-auth-token"; await testElement.updateComplete; expect(testElement.token).to.equal("custom-auth-token"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle userName property", async () => { testElement.userName = "Test User"; await testElement.updateComplete; expect(testElement.userName).to.equal("Test User"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle searchTerm property", async () => { testElement.searchTerm = "test search"; await testElement.updateComplete; expect(testElement.searchTerm).to.equal("test search"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle appMode property", async () => { const modes = ["home", "search", "create", "404"]; for (const mode of modes) { testElement.appMode = mode; await testElement.updateComplete; expect(testElement.appMode).to.equal(mode); await expect(testElement).shadowDom.to.be.accessible(); } }); }); describe("Object and Array properties", () => { it("should handle courses property", async () => { const testCourses = [ { id: 1, name: "Course 1" }, { id: 2, name: "Course 2" }, ]; testElement.courses = testCourses; await testElement.updateComplete; expect(testElement.courses).to.deep.equal(testCourses); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle activeItem property", async () => { const testItem = { id: "test", title: "Test Item" }; testElement.activeItem = testItem; await testElement.updateComplete; expect(testElement.activeItem).to.deep.equal(testItem); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle phrases property", async () => { const testPhrases = { welcome: "Welcome!", goodbye: "Goodbye!" }; testElement.phrases = testPhrases; await testElement.updateComplete; expect(testElement.phrases).to.deep.equal(testPhrases); await expect(testElement).shadowDom.to.be.accessible(); }); }); }); describe("Slot functionality", () => { it("should have app-header-pre slot with correct content", () => { const slottedLink = element.querySelector('a[slot="app-header-pre"]'); expect(slottedLink).to.exist; expect(slottedLink.getAttribute("href")).to.equal( "https://www.example.edu", ); const slottedImg = slottedLink.querySelector("img"); expect(slottedImg).to.exist; expect(slottedImg.getAttribute("alt")).to.equal("Example University"); }); it("should have externalproviders slot", () => { const slottedProviders = element.querySelector( 'div[slot="externalproviders"]', ); expect(slottedProviders).to.exist; const button = slottedProviders.querySelector("button"); expect(button).to.exist; expect(button.textContent).to.equal("External Login"); }); }); describe("Sound functionality", () => { let originalAudio; let mockAudio; beforeEach(() => { originalAudio = globalThis.Audio; mockAudio = { play: () => Promise.resolve(), pause: () => {}, volume: 1, onended: null, }; globalThis.Audio = function (src) { Object.assign(this, mockAudio); this.src = src; return this; }; }); afterEach(() => { globalThis.Audio = originalAudio; }); it("should play sound when sound is enabled", async () => { element.store.soundStatus = true; element.store.appReady = true; let playCalled = false; mockAudio.play = () => { playCalled = true; return Promise.resolve(); }; await element.playSound("click"); expect(playCalled).to.be.true; }); it("should not play sound when sound is disabled", async () => { element.store.soundStatus = false; let playCalled = false; mockAudio.play = () => { playCalled = true; return Promise.resolve(); }; await element.playSound("click"); expect(playCalled).to.be.false; }); it("should handle different sound types", async () => { element.store.soundStatus = true; element.store.appReady = true; const soundTypes = ["click", "click2", "coin", "coin2", "hit", "success"]; for (const sound of soundTypes) { let capturedSrc = null; globalThis.Audio = function (src) { capturedSrc = src; Object.assign(this, mockAudio); return this; }; await element.playSound(sound); expect(capturedSrc).to.include(`${sound}.mp3`); } }); it("should fallback to 'hit' sound for invalid sound types", async () => { element.store.soundStatus = true; element.store.appReady = true; let capturedSrc = null; globalThis.Audio = function (src) { capturedSrc = src; Object.assign(this, mockAudio); return this; }; await element.playSound("invalid-sound"); expect(capturedSrc).to.include("hit.mp3"); }); }); describe("Authentication functionality", () => { it("should handle JWT login events", () => { let eventFired = false; element.__logoutUserAction = true; const mockEvent = { detail: false, }; expect(() => { element._jwtLoggedIn(mockEvent); }).to.not.throw(); }); it("should dispatch logout event", () => { let logoutEventFired = false; element.addEventListener("jwt-login-logout", () => { logoutEventFired = true; }); element.logout(); expect(logoutEventFired).to.be.true; }); it("should handle token refresh failures", () => { let refreshFailureHandled = false; element.addEventListener("jwt-login-logout", () => { refreshFailureHandled = true; }); element._tokenRefreshFailed({}); expect(refreshFailureHandled).to.be.true; }); }); describe("Navigation and routing", () => { let originalLocation; beforeEach(() => { originalLocation = globalThis.location; }); afterEach(() => { globalThis.location = originalLocation; }); it("should navigate to specified location", () => { let capturedLocation = null; Object.defineProperty(globalThis, "location", { set: (value) => { capturedLocation = value; }, configurable: true, }); element.goToLocation("https://example.com"); expect(capturedLocation).to.equal("https://example.com"); }); it("should open external links", () => { let openedUrl = null; let openedTarget = null; globalThis.open = (url, target) => { openedUrl = url; openedTarget = target; }; element._openExternalLink("https://external.com"); expect(openedUrl).to.equal("https://external.com"); expect(openedTarget).to.equal("_blank"); }); }); describe("Store contribution functionality", () => { let originalOpen; let originalNavigator; beforeEach(() => { originalOpen = globalThis.open; originalNavigator = globalThis.navigator; globalThis.navigator = { userAgent: "Test Browser", userAgentData: { platform: "Test OS" }, deviceMemory: 8, hardwareConcurrency: 4, connection: { effectiveType: "4g" }, }; }); afterEach(() => { globalThis.open = originalOpen; globalThis.navigator = originalNavigator; }); it("should create bug report URL", async () => { let capturedUrl = null; globalThis.open = (url, target) => { capturedUrl = url; }; await element._haxStoreContribute("bug", "bug,ui"); expect(capturedUrl).to.include("github.com/haxtheweb/issues"); expect(capturedUrl).to.include("labels=bug,ui"); expect(capturedUrl).to.include("[bug]%20User%20report"); }); it("should create feature request URL", async () => { let capturedUrl = null; globalThis.open = (url, target) => { capturedUrl = url; }; await element._haxStoreContribute("feature", "feature,enhancement"); expect(capturedUrl).to.include("github.com/haxtheweb/issues"); expect(capturedUrl).to.include("labels=feature,enhancement"); expect(capturedUrl).to.include("[feature]%20User%20report"); }); it("should create merlin command request", async () => { let capturedUrl = null; globalThis.open = (url, target) => { capturedUrl = url; }; await element._haxStoreContribute("merlin", "merlin", "test command"); expect(capturedUrl).to.include("[merlin]%20New%20command%20request"); expect(capturedUrl).to.include("test%20command"); }); }); describe("Unlock features", () => { beforeEach(() => { // Mock SuperDaemonInstance globalThis.SuperDaemonInstance = { merlinSpeak: () => {}, }; // Mock store.appEl to have playSound method if (element.store) { element.store.appEl = element; } }); it("should fire unlock terrible feature", async () => { expect(element.unlockTerrible).to.be.false; element.fireTerrible(); expect(element.unlockTerrible).to.be.true; }); it("should fire unlock coming soon feature", async () => { expect(element.unlockComingSoon).to.be.false; element.fireUnlocked(); expect(element.unlockComingSoon).to.be.true; }); }); describe("Reset functionality", () => { let originalLocalStorage; let originalLocation; beforeEach(() => { originalLocalStorage = globalThis.localStorage; originalLocation = globalThis.location; globalThis.localStorage = { removeItem: () => {}, }; }); afterEach(() => { globalThis.localStorage = originalLocalStorage; globalThis.location = originalLocation; }); it("should clear localStorage items", () => { let removedItems = []; globalThis.localStorage.removeItem = (key) => { removedItems.push(key); }; element.reset(false); expect(removedItems).to.include("app-hax-step"); expect(removedItems).to.include("app-hax-site"); }); it("should handle localStorage errors gracefully", () => { globalThis.localStorage.removeItem = () => { throw new Error("Access denied"); }; expect(() => { element.reset(false); }).to.not.throw(); }); }); describe("Accessibility scenarios", () => { it("should remain accessible in different app modes", async () => { const modes = ["home", "search", "create", "404"]; for (const mode of modes) { element.appMode = mode; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); } }); it("should remain accessible with user menu open", async () => { element.userMenuOpen = true; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should remain accessible with different user states", async () => { element.isNewUser = true; element.siteReady = true; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); }); describe("Edge cases and error handling", () => { it("should handle missing slots gracefully", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle undefined store gracefully", () => { const testElement = new element.constructor(); expect(() => { testElement.connectedCallback(); }).to.not.throw(); }); it("should handle missing browser APIs gracefully", async () => { const originalNavigator = globalThis.navigator; globalThis.navigator = { userAgent: "Test", }; await element._haxStoreContribute("bug", "test"); globalThis.navigator = originalNavigator; }); }); describe("CSS styles and theming", () => { it("should have proper CSS custom properties", () => { const styles = element.constructor.styles; expect(styles).to.exist; expect(styles.length).to.be.greaterThan(0); const styleString = styles[styles.length - 1].cssText || styles[styles.length - 1].toString(); expect(styleString).to.include("--app-hax-accent-color"); expect(styleString).to.include("--app-hax-background-color"); expect(styleString).to.include(":host"); }); it("should support dark mode theming", () => { const styles = element.constructor.styles; const styleString = styles[styles.length - 1].cssText || styles[styles.length - 1].toString(); expect(styleString).to.include("light-dark"); }); }); describe("WindowControllers and cleanup", () => { it("should initialize window controllers", () => { const testElement = new element.constructor(); expect(testElement.windowControllers).to.exist; expect(testElement.windowControllers.constructor.name).to.equal( "AbortController", ); }); it("should clean up on disconnect", () => { const testElement = new element.constructor(); let abortCalled = false; testElement.windowControllers.abort = () => { abortCalled = true; }; testElement.disconnectedCallback(); expect(abortCalled).to.be.true; }); }); }); ================================================ FILE: elements/audio-player/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/audio-player/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/audio-player/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/audio-player/.npmignore ================================================ node_modules ================================================ FILE: elements/audio-player/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/audio-player/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/audio-player/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2023 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/audio-player/README.md ================================================ # <audio-player> Player > simple audio web component to match video ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/audio-player/audio-player.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/audio-player/audio-player.js ================================================ /** * Copyright 2023 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { VideoPlayer } from "@haxtheweb/video-player/video-player.js"; /** * `audio-player` * `simple audio web component to match video` * @demo demo/index.html * @element audio-player */ class AudioPlayer extends VideoPlayer { /** * HTMLElement */ constructor() { super(); } get audioOnly() { return true; } /** * Convention we use */ static get tag() { return "audio-player"; } // haxProperty definition static get haxProperties() { return { canScale: true, canEditSource: true, gizmo: { title: "Audio", description: "This can present video in a highly accessible manner regardless of source.", icon: "av:music-video", color: "green", tags: ["Media", "Media", "listen", "mp3"], handles: [ { type: "audio", type_exclusive: true, source: "source", title: "caption", caption: "caption", description: "caption", color: "primaryColor", }, ], meta: { author: "HAXTheWeb core team", }, }, settings: { configure: [ { property: "source", title: "Source", description: "The URL for this media.", inputMethod: "haxupload", noCamera: true, validationType: "url", }, { property: "mediaTitle", title: "Title", description: "Simple title for under video", inputMethod: "textfield", validationType: "text", }, { property: "accentColor", title: "Accent color", description: "Select the accent color for the player.", inputMethod: "colorpicker", }, { property: "track", title: "Closed captions", description: "The URL for the captions file.", inputMethod: "haxupload", noCamera: true, noVoiceRecord: true, validationType: "url", }, ], advanced: [ { property: "thumbnailSrc", title: "Thumbnail image", description: "Optional. The URL for a thumbnail/poster image.", inputMethod: "haxupload", noVoiceRecord: true, validationType: "url", }, { property: "learningMode", title: "Enable learning mode", description: "Disables fast forward and rewind.", inputMethod: "boolean", }, { property: "hideYoutubeLink", title: "Remove open on YouTube button", description: "Removes the button for opening the video on YouTube.", inputMethod: "boolean", }, { property: "linkable", title: "Include a share link?", description: "Provides a link to share the video.", inputMethod: "boolean", }, ], developer: [ { property: "crossorigin", title: "Crossorigin", description: "Indicates whether to use CORS.", inputMethod: "select", options: { "": "", anonymous: "anonymous", "use-credentials": "use-credentials", }, }, { property: "allowBackgroundPlay", title: "Allow background playback", description: "Videos pause / play automatically when tab loses focus; this enables video to play without tab having focus", inputMethod: "boolean", }, { property: "darkTranscript", title: "Dark theme for transcript", description: "Enable dark theme for the transcript.", inputMethod: "boolean", }, { property: "disableInteractive", title: "Disable Interactive", description: "Disable interactive mode that makes transcript clickable.", inputMethod: "boolean", }, { property: "hideTimestamps", title: "Hide timestamps", description: "Hide the time stamps on the transcript.", inputMethod: "boolean", }, { property: "hideTranscript", title: "Hide Transcript", description: "Hide transcript by default.", inputMethod: "boolean", }, { property: "lang", title: "Language", description: "Language of the media.", inputMethod: "textfield", validationType: "text", }, ], }, saveOptions: { unsetAttributes: ["__utils", "__stand-alone", "colors"], }, demoSchema: [ { tag: "audio-player", properties: { mediaTitle: "Jonny Quest Theme", crossorigin: "anonymous", source: "https://archive.org/download/tvtunes_4710/Jonny%20Quest.mp3", }, content: "", }, ], }; } } globalThis.customElements.define(AudioPlayer.tag, AudioPlayer); export { AudioPlayer }; ================================================ FILE: elements/audio-player/demo/index.html ================================================ AudioPlayer: audio-player Demo

    Basic audio-player demo

    ================================================ FILE: elements/audio-player/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); // discover iconset and build json structure gulp.task("iconset", (done) => { const iconset = packageJson.wcfactory.iconset || {}; if(iconset.svgsPath && iconset.svgsPath !== ''){ const path = iconset.svgsPath; const manifestFilename = iconset.manifestFilename || `${packageJson.wcfactory.elementName}-iconsets-manifest.js` const manifestPath = iconset.manifestPath || `./lib`; const exportName = iconset.exportName || `${packageJson.wcfactory.className}IconsetsManifest`; const jsonContent = JSON.stringify(dirTree(path).icons, null, 2); const iconVar = `import { SimpleIconsetStore } from "@haxtheweb/simple-icon/lib/simple-iconset.js"; /** * @const ${exportName} */ export const ${exportName} = ${jsonContent}; SimpleIconsetStore.registerManifest(${exportName});` fs.writeFile(`${manifestPath}/${manifestFilename}.js`, iconVar, 'utf8', function (err) { if (err) { console.log("An error occured while writing iconset manifest Object to File."); return console.log(err); } console.log("Iconset SVGs and manifest JS file has been saved."); return true; }); } else { console.log("No Iconset Manifest"); } done(); }); gulp.task( "default", gulp.series("analyze") ); ================================================ FILE: elements/audio-player/index.html ================================================ audio-player documentation ================================================ FILE: elements/audio-player/lib/.gitkeep ================================================ ================================================ FILE: elements/audio-player/package.json ================================================ { "name": "@haxtheweb/audio-player", "wcfactory": { "className": "AudioPlayer", "customElementClass": "LitElement", "elementName": "audio-player", "generator-wcfactory-version": "0.13.1", "useHAX": false, "useSass": false, "files": { "css": "src/audio-player.css", "html": "src/audio-player.html", "js": "src/audio-player.js", "properties": "src/audio-player-properties.json", "hax": "src/audio-player-hax.json" }, "iconset": {}, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "simple audio web component to match video", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "main": "audio-player.js", "module": "audio-player.js", "scripts": { "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --watch --config=../../web-test-runner.config.mjs --playwright --browsers chromium", "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/video-player": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/audio-player/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/audio-player/test/audio-player.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../audio-player.js"; describe("audio-player test", () => { let element; beforeEach(async () => { element = await fixture(html` `); await element.updateComplete; }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("audio-player"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Component structure and inheritance", () => { it("should have correct tag name", () => { expect(element.constructor.tag).to.equal("audio-player"); }); it("should extend VideoPlayer", () => { expect(element.constructor.name).to.equal("AudioPlayer"); expect(element).to.be.instanceOf( globalThis.customElements.get("video-player") || Object, ); }); it("should always return audioOnly as true", () => { expect(element.audioOnly).to.equal(true); // Test that it's always true regardless of attempts to change it element.audioOnly = false; expect(element.audioOnly).to.equal(true); }); }); describe("Property validation with accessibility", () => { let testElement; beforeEach(async () => { testElement = await fixture(html` `); await testElement.updateComplete; }); describe("Inherited properties from VideoPlayer", () => { it("should handle source property", async () => { testElement.source = "https://example.com/audio.mp3"; await testElement.updateComplete; expect(testElement.source).to.equal("https://example.com/audio.mp3"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle mediaTitle property", async () => { testElement.mediaTitle = "Custom Audio Title"; await testElement.updateComplete; expect(testElement.mediaTitle).to.equal("Custom Audio Title"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle accentColor property", async () => { testElement.accentColor = "red"; await testElement.updateComplete; expect(testElement.accentColor).to.equal("red"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle track property for captions", async () => { testElement.track = "https://example.com/captions.vtt"; await testElement.updateComplete; expect(testElement.track).to.equal("https://example.com/captions.vtt"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle thumbnailSrc property", async () => { testElement.thumbnailSrc = "https://example.com/thumbnail.jpg"; await testElement.updateComplete; expect(testElement.thumbnailSrc).to.equal( "https://example.com/thumbnail.jpg", ); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle boolean properties", async () => { const booleanProps = [ "learningMode", "hideYoutubeLink", "linkable", "allowBackgroundPlay", "darkTranscript", "disableInteractive", "hideTimestamps", "hideTranscript", ]; for (const prop of booleanProps) { if ( testElement.hasOwnProperty(prop) || prop in testElement.constructor.properties ) { testElement[prop] = true; await testElement.updateComplete; expect(testElement[prop]).to.equal(true); await expect(testElement).shadowDom.to.be.accessible(); testElement[prop] = false; await testElement.updateComplete; expect(testElement[prop]).to.equal(false); await expect(testElement).shadowDom.to.be.accessible(); } } }); it("should handle crossorigin property", async () => { const crossOriginValues = ["", "anonymous", "use-credentials"]; for (const value of crossOriginValues) { testElement.crossorigin = value; await testElement.updateComplete; expect(testElement.crossorigin).to.equal(value); await expect(testElement).shadowDom.to.be.accessible(); } }); it("should handle lang property", async () => { testElement.lang = "en-US"; await testElement.updateComplete; expect(testElement.lang).to.equal("en-US"); await expect(testElement).shadowDom.to.be.accessible(); }); }); }); describe("Audio-specific functionality", () => { it("should initialize as audio-only player", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.audioOnly).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle audio sources correctly", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.source).to.include(".mp3"); expect(testElement.mediaTitle).to.equal("Audio Test"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should support different audio formats", async () => { const audioFormats = [ "https://example.com/audio.mp3", "https://example.com/audio.wav", "https://example.com/audio.ogg", "https://example.com/audio.m4a", ]; for (const format of audioFormats) { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.source).to.equal(format); expect(testElement.audioOnly).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); } }); }); describe("Accessibility scenarios with audio content", () => { it("should remain accessible with captions/transcript", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with learning mode enabled", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with transcript options", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with interactive features disabled", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("HAX Properties and Integration", () => { it("should have haxProperties defined", () => { expect(element.constructor.haxProperties).to.exist; expect(element.constructor.haxProperties.gizmo).to.exist; expect(element.constructor.haxProperties.settings).to.exist; expect(element.constructor.haxProperties.demoSchema).to.exist; }); it("should have proper HAX gizmo configuration for audio", () => { const haxProps = element.constructor.haxProperties; expect(haxProps.gizmo.title).to.equal("Audio"); expect(haxProps.gizmo.description).to.contain("accessible"); expect(haxProps.gizmo.icon).to.equal("av:music-video"); expect(haxProps.gizmo.color).to.equal("green"); expect(haxProps.gizmo.tags).to.include("Media"); expect(haxProps.gizmo.tags).to.include("mp3"); }); it("should handle audio file types correctly", () => { const haxProps = element.constructor.haxProperties; const handles = haxProps.gizmo.handles; const audioHandle = handles.find((handle) => handle.type === "audio"); expect(audioHandle).to.exist; expect(audioHandle.type_exclusive).to.be.true; expect(audioHandle.source).to.equal("source"); }); it("should have proper HAX settings configuration", () => { const haxProps = element.constructor.haxProperties; const configItems = haxProps.settings.configure; // Verify source property configuration const sourceProp = configItems.find((item) => item.property === "source"); expect(sourceProp).to.exist; expect(sourceProp.inputMethod).to.equal("haxupload"); expect(sourceProp.noCamera).to.be.true; expect(sourceProp.validationType).to.equal("url"); // Verify mediaTitle property const titleProp = configItems.find( (item) => item.property === "mediaTitle", ); expect(titleProp).to.exist; expect(titleProp.inputMethod).to.equal("textfield"); // Verify accentColor property const colorProp = configItems.find( (item) => item.property === "accentColor", ); expect(colorProp).to.exist; expect(colorProp.inputMethod).to.equal("colorpicker"); // Verify track property for captions const trackProp = configItems.find((item) => item.property === "track"); expect(trackProp).to.exist; expect(trackProp.noVoiceRecord).to.be.true; }); it("should maintain accessibility with HAX demo schema", async () => { const demoSchema = element.constructor.haxProperties.demoSchema[0]; const haxTestElement = await fixture(html` `); await haxTestElement.updateComplete; await expect(haxTestElement).shadowDom.to.be.accessible(); }); }); describe("Edge cases and error handling", () => { it("should remain accessible with missing source", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should remain accessible with invalid source URL", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle missing media title gracefully", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle malformed caption files", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle unusual property values", async () => { const testElement = await fixture(html``); const edgeCaseValues = [ " \t\n ", // whitespace "🎵 audio with emoji 🎶", // emoji "Very long audio title that might cause layout issues or other display problems", "Multi\nline\ntitle", // multiline "Title with 'quotes' and \"double quotes\" and special chars: !@#$%^&*()", ]; for (const value of edgeCaseValues) { testElement.mediaTitle = value; testElement.source = value; await testElement.updateComplete; expect(testElement.mediaTitle).to.equal(value); expect(testElement.source).to.equal(value); await expect(testElement).shadowDom.to.be.accessible(); } }); }); describe("Audio playback and controls", () => { it("should maintain audioOnly property throughout lifecycle", async () => { const testElement = await fixture(html` `); // Test during initialization expect(testElement.audioOnly).to.be.true; // Test after update testElement.source = "https://example.com/another-audio.mp3"; await testElement.updateComplete; expect(testElement.audioOnly).to.be.true; // Test after property changes testElement.mediaTitle = "New Title"; testElement.accentColor = "purple"; await testElement.updateComplete; expect(testElement.audioOnly).to.be.true; }); it("should handle background playback settings", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.allowBackgroundPlay).to.be.true; expect(testElement.audioOnly).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); it("should support learning mode restrictions", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.learningMode).to.be.true; expect(testElement.audioOnly).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Constructor and inheritance behavior", () => { it("should call super() in constructor", () => { const testElement = new element.constructor(); expect(testElement).to.be.instanceOf(element.constructor); }); it("should maintain audioOnly getter behavior", () => { const testElement = new element.constructor(); // Test getter behavior expect(testElement.audioOnly).to.be.true; // Attempt to override (should still return true) Object.defineProperty(testElement, "audioOnly", { value: false, writable: true, }); // Getter should still return true expect(testElement.audioOnly).to.be.true; }); }); describe("Customization and theming", () => { it("should support custom accent colors", async () => { const colors = [ "red", "blue", "green", "#FF5733", "rgb(255, 87, 51)", "hsl(9, 100%, 60%)", ]; for (const color of colors) { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.accentColor).to.equal(color); await expect(testElement).shadowDom.to.be.accessible(); } }); it("should support transcript customization", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.darkTranscript).to.be.true; expect(testElement.hideTimestamps).to.be.true; expect(testElement.disableInteractive).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); }); }); ================================================ FILE: elements/author-card/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg ================================================ FILE: elements/author-card/.editorconfig ================================================ # EditorConfig helps developers define and maintain consistent # coding styles between different editors and IDEs # editorconfig.org root = true [*] # Change these settings to your own preference indent_style = space indent_size = 2 # We recommend you to keep these unchanged end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false [*.json] indent_size = 2 [*.{html,js,md}] block_comment_start = /** block_comment = * block_comment_end = */ ================================================ FILE: elements/author-card/.github/workflows/main.yml ================================================ name: Build and Deploy on: [push] jobs: build-and-deploy: permissions: contents: write runs-on: ubuntu-latest steps: - name: ACTIONS_ALLOW_UNSECURE_COMMANDS id: ACTIONS_ALLOW_UNSECURE_COMMANDS run: echo 'ACTIONS_ALLOW_UNSECURE_COMMANDS=true' >> $GITHUB_ENV - name: set env variable actor run: echo 'GITHUB_ACTOR=$GITHUB_ACTOR' >> $GITHUB_ENV - name: set env variable repo run: echo 'GITHUB_REPOSITORY=$GITHUB_REPOSITORY' >> $GITHUB_ENV - name: Checkout 🛎️ uses: actions/checkout@v4.1.7 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. with: persist-credentials: false - name: Read CNAME id: cname uses: juliangruber/read-file-action@v1 with: path: ./CNAME - name: set env variable CNAME run: echo 'CNAME=${{ steps.cname.outputs.content }}' >> $GITHUB_ENV - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. run: | npm install npm run build - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4.6.3 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages # The branch the action should deploy to. FOLDER: public # The folder the action should deploy. ================================================ FILE: elements/author-card/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/author-card/.nojekyll ================================================ ================================================ FILE: elements/author-card/.npmignore ================================================ node_modules ================================================ FILE: elements/author-card/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/author-card/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install script: - xvfb-run npm run test ================================================ FILE: elements/author-card/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (c) 2025 haxtheweb Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/author-card/README.md ================================================ # author-card DDD + Lit web component based on OpenWC toolchain. This is intended to provide the following: - Look good via DDD, HAX design system - Simple, easy to read code via Lit - Great workflow via OpenWC tooling + Vercel for sharing demos - Simplify contribution to the HAX ecosystem - Publish and distribute via npmjs.com ## Install dependencies - `npm install` - installs dependencies so you can work ## Commands - `npm start` - runs your web component for development, reloading on file changes - `npm run build` - builds your web component and outputs it in your `dist` directory for placement on web servers in a compiled form. Vercel automatically does this on commit to github. - `npm run release` - this will build your code, update the version, and publish it to npm for others to use ## Working with your web component - edit `./author-card.js` - edit your 'demo' by modifying `./index.html` - add dependencies using `npm install --save @whatever/repo` or editing `./package.json` directly - if you must reference additional non-JS files, ensure you use the `new URL('./my-file.jpg', import.meta.url).href` syntax so that it builds correctly - if you add additional `.js` files / web components then place them under `/lib/` - to improve HAX wiring edit file in `/lib/author-card.haxProperties.json` - for i18n / internationalization efforts, see associated language `.json` files in `/locales/` as well as `/lib/` for haxProperties related translation examples. ## Recommended setup - Load VS code in 1 window to project root - Browser open - Right click -> Inspect and open the Console to see error output ## Recommended Integrated Development Environment (IDE) - [VSCode](https://code.visualstudio.com/Download) ### Plugins Name: lit-html Description: Syntax highlighting and IntelliSense for html inside of JavaScript and TypeScript tagged template strings Publisher: Matt Bierner VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=bierner.lit-html Name: lit-plugin Description: Syntax highlighting, type checking and code completion for lit-html Publisher: Rune Mehlsen VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin # Credits A brighter future dreamed and developed by the Penn State [HAXTheWeb](https://hax.psu.edu/) initative. Never. Stop. innovating. ================================================ FILE: elements/author-card/author-card.js ================================================ /** * Copyright 2025 haxtheweb * @license Apache-2.0, see LICENSE for full text. */ import { LitElement, html, css } from "lit"; import { DDDSuper } from "@haxtheweb/d-d-d/d-d-d.js"; import { I18NMixin } from "@haxtheweb/i18n-manager/lib/I18NMixin.js"; /** * `author-card` * * @demo index.html * @element author-card */ export class AuthorCard extends DDDSuper(I18NMixin(LitElement)) { static get tag() { return "author-card"; } constructor() { super(); this.name = ""; this.title = ""; this.description = ""; this.image = ""; this.profileUrl = ""; this.socialLink = ""; this.socialHandle = ""; this.dark = false; // Set default accent and primary values this.accentColor = "blue"; this.primaryColor = "blue"; this.t = this.t || {}; this.t = { ...this.t, visitProfile: "Visit profile", profileAlt: "Visit profile", }; this.registerLocalization({ context: this, localesPath: new URL("./locales/author-card.ar.json", import.meta.url).href + "/../", locales: ["ar", "es", "hi", "zh", "pt", "bn", "ru", "fr", "ja"], }); } // Lit reactive properties static get properties() { return { ...super.properties, name: { type: String }, title: { type: String }, description: { type: String }, image: { type: String }, profileUrl: { type: String, attribute: "profile-url" }, socialLink: { type: String, attribute: "social-link" }, socialHandle: { type: String, attribute: "social-handle" }, dark: { type: Boolean }, accentColor: { type: String, attribute: "accent-color", reflect: true }, primaryColor: { type: String, attribute: "primary-color", reflect: true }, }; } // Lit scoped styles static get styles() { return [super.styles, css` :host { display: block; margin: var(--ddd-spacing-4) 0; font-family: var(--ddd-font-primary); container-type: inline-size; /* Theme variables with light-dark support */ --author-card-background: light-dark(var(--ddd-theme-default-white), var(--ddd-theme-default-coalyGray)); --author-card-color: light-dark(var(--ddd-theme-default-coalyGray), var(--ddd-theme-default-white)); --author-card-border: light-dark(var(--ddd-theme-default-limestoneGray), var(--ddd-theme-default-slateGray)); --author-card-job-title-color: light-dark(var(--ddd-theme-default-slateGray), var(--ddd-theme-default-slateLight)); --author-card-link-color: light-dark(var(--ddd-theme-default-link), var(--ddd-theme-default-linkLight)); --author-card-link-hover-color: light-dark(var(--ddd-theme-default-linkHover), var(--ddd-theme-default-linkHoverLight)); --author-card-border-radius: var(--ddd-radius-sm); --author-card-image-size: 64px; } /* Override for explicit dark mode */ :host([dark]) { --author-card-background: var(--ddd-theme-default-coalyGray); --author-card-color: var(--ddd-theme-default-white); --author-card-border: var(--ddd-theme-default-slateGray); --author-card-job-title-color: var(--ddd-theme-default-slateLight); --author-card-link-color: var(--ddd-theme-default-linkLight); --author-card-link-hover-color: var(--ddd-theme-default-linkHoverLight); } /* Primary color for main border */ :host([data-primary]) { --author-card-border: var(--ddd-theme-primary); } /* Accent color variations */ :host([data-accent]) { --author-card-accent-border: var(--ddd-theme-accent); } .author { background: var(--author-card-background); color: var(--author-card-color); border-radius: var(--author-card-border-radius); border: var(--ddd-border-xs); border-color: var(--author-card-border); padding: var(--ddd-spacing-4); } /* Accent color styling */ :host([data-accent]) .author { border-left: var(--ddd-border-lg); border-left-color: var(--ddd-theme-accent); } .inner { display: flex; gap: var(--ddd-spacing-4); align-items: flex-start; } .left { flex-shrink: 0; } .image { width: var(--author-card-image-size); height: var(--author-card-image-size); border-radius: 50%; object-fit: cover; display: block; } .right { flex: 1; min-width: 0; } .name { font-size: var(--ddd-font-size-ml); font-weight: var(--ddd-font-weight-medium); margin: 0 0 var(--ddd-spacing-1); color: inherit; } .job-title { font-size: var(--ddd-font-size-sm); color: var(--author-card-job-title-color); margin: 0 0 var(--ddd-spacing-2); } .bio { font-size: var(--ddd-font-size-sm); line-height: var(--ddd-lh-150); margin: 0 0 var(--ddd-spacing-2); } a.link { display: inline-flex; align-items: center; font-size: var(--ddd-font-size-sm); text-decoration: none; color: var(--author-card-link-color); transition: color 0.2s ease; background-color: transparent; } a.link:hover, a.link:focus { color: var(--author-card-link-hover-color); text-decoration: underline; } .profile-link { color: inherit; text-decoration: none; } .profile-link:hover, .profile-link:focus { text-decoration: underline; } /* Responsive behavior */ @container (max-width: 320px) { .inner { flex-direction: column; text-align: center; } .image { align-self: center; } } `]; } // Lit render the HTML render() { return html`
    ${this.name ? html` ${this.profileUrl ? html`` : ''}

    ${this.name}

    ${this.profileUrl ? html`
    ` : ''} ` : ''} ${this.title ? html`

    ${this.title}

    ` : ''} ${this.description ? html`
    ${this.description}
    ` : ''} ${this.socialLink ? html` ${this.socialHandle || this.t.visitProfile} → ` : ''}
    `; } /** * haxProperties integration via file reference */ static get haxProperties() { return new URL(`./lib/${this.tag}.haxProperties.json`, import.meta.url) .href; } } globalThis.customElements.define(AuthorCard.tag, AuthorCard); ================================================ FILE: elements/author-card/index.html ================================================ author-card

    Author Card

    Display author information with photo, bio, and social links

    Basic Example

    Without Image

    Minimal Version

    Dark Theme

    How to Develop

    You can edit the current page by modifying index.html
    To edit your author-card tag, modify src/author-card.js. This file contains all the HTML, CSS and JavaScript used to render your elements above!

    Web components are easy to follow once you get used to their pattern. Below are links to help on your journey. Good luck, we need you!

    Join and Share HAX

    Learn the languages and tools

    Find purpose and inspiration

    ================================================ FILE: elements/author-card/lib/author-card.haxProperties.json ================================================ { "api": "1", "canScale": false, "canEditSource": false, "type": "element", "designSystem": { "accent": true, "primary": true, "card": false, "text": false, "designTreatment": false }, "gizmo": { "title": "Author Card", "description": "Display author information with photo, bio, and social links", "icon": "social:person", "color": "blue", "tags": [ "Other" ], "handles": [ { "type": "image", "source": "image", "title": "name", "caption": "title" } ], "meta": { "author": "HAXTheWeb core team" } }, "settings": { "configure": [ { "property": "name", "title": "Author Name", "description": "Full name of the author", "inputMethod": "textfield", "icon": "social:person" }, { "property": "image", "title": "Profile Image", "description": "Author profile photo", "inputMethod": "haxupload", "noVoiceRecord": true, "icon": "editor:insert-photo" }, { "property": "title", "title": "Job Title", "description": "Author's position or role", "inputMethod": "textfield", "icon": "icons:work" }, { "property": "description", "title": "Bio", "description": "Short author biography", "inputMethod": "textarea", "icon": "editor:short-text" }, { "property": "profileUrl", "title": "Profile URL", "description": "Link to author's profile page", "inputMethod": "url", "icon": "icons:link" }, { "property": "socialLink", "title": "Social Link", "description": "Link to social media profile", "inputMethod": "url", "icon": "communication:chat" }, { "property": "socialHandle", "title": "Social Handle", "description": "Social media handle (e.g., @username)", "inputMethod": "textfield", "icon": "communication:alternate-email" } ], "advanced": [] }, "saveOptions": { "wipeSlot": false, "unsetAttributes": [] }, "demoSchema": [ { "tag": "author-card", "properties": { "name": "btopro", "title": "Developer & Educator", "description": "btopro is a developer and educator working on HAX and web components.", "image": "https://github.com/btopro.png", "profileUrl": "/u/btopro", "socialLink": "https://x.com/btopro", "socialHandle": "@btopro" }, "content": "" } ] } ================================================ FILE: elements/author-card/locales/author-card.ar.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "عنوان" } ] }, "demoSchema": [ { "properties": { "title": "قيمة مخصصة" } } ] } ================================================ FILE: elements/author-card/locales/author-card.ar.json ================================================ { "visitProfile": "زيارة الملف الشخصي", "profileAlt": "زيارة الملف الشخصي" } ================================================ FILE: elements/author-card/locales/author-card.bn.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "শিরোনাম" } ] }, "demoSchema": [ { "properties": { "title": "কাস্টম মান" } } ] } ================================================ FILE: elements/author-card/locales/author-card.bn.json ================================================ { "title": "শিরোনাম" } ================================================ FILE: elements/author-card/locales/author-card.en.json ================================================ { "visitProfile": "Visit profile", "profileAlt": "Visit profile" } ================================================ FILE: elements/author-card/locales/author-card.es.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Título" } ] }, "demoSchema": [ { "properties": { "title": "Valor personalizado" } } ] } ================================================ FILE: elements/author-card/locales/author-card.es.json ================================================ { "visitProfile": "Visitar perfil", "profileAlt": "Visitar perfil" } ================================================ FILE: elements/author-card/locales/author-card.fr.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Titre" } ] }, "demoSchema": [ { "properties": { "title": "Valeur personnalisée" } } ] } ================================================ FILE: elements/author-card/locales/author-card.fr.json ================================================ { "title": "titre" } ================================================ FILE: elements/author-card/locales/author-card.hi.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "शीर्षक" } ] }, "demoSchema": [ { "properties": { "title": "कस्टम मूल्य" } } ] } ================================================ FILE: elements/author-card/locales/author-card.hi.json ================================================ { "title": "शीर्षक" } ================================================ FILE: elements/author-card/locales/author-card.ja.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "タイトル" } ] }, "demoSchema": [ { "properties": { "title": "カスタム値" } } ] } ================================================ FILE: elements/author-card/locales/author-card.ja.json ================================================ { "title": "タイトル" } ================================================ FILE: elements/author-card/locales/author-card.pt.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Título" } ] }, "demoSchema": [ { "properties": { "title": "Valor personalizado" } } ] } ================================================ FILE: elements/author-card/locales/author-card.pt.json ================================================ { "title": "título" } ================================================ FILE: elements/author-card/locales/author-card.ru.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Заголовок" } ] }, "demoSchema": [ { "properties": { "title": "Пользовательское значение" } } ] } ================================================ FILE: elements/author-card/locales/author-card.ru.json ================================================ { "title": "заголовок" } ================================================ FILE: elements/author-card/locales/author-card.zh.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "标题" } ] }, "demoSchema": [ { "properties": { "title": "定制值" } } ] } ================================================ FILE: elements/author-card/locales/author-card.zh.json ================================================ { "title": "标题" } ================================================ FILE: elements/author-card/netlify.toml ================================================ [build] publish = "public" command = "npm run build" [[headers]] for = "/*" [headers.values] Cache-Control = "max-age=31536001" Cross-Origin-Opener-Policy = "same-origin" Cross-Origin-Embedder-Policy = "require-corp" [[headers]] for = "/" [headers.values] Cache-Control = "no-cache" [[headers]] for = "/*.html" [headers.values] Cache-Control = "no-cache" ================================================ FILE: elements/author-card/package.json ================================================ { "name": "@haxtheweb/author-card", "version": "25.0.0", "description": "Webcomponent author-card following hax / open-wc recommendations", "license": "Apache-2.0", "author": { "name": "haxtheweb" }, "keywords": [ "webcomponents", "lit", "haxtheweb" ], "repository": { "type": "git", "url": "" }, "type": "module", "main": "author-card.js", "module": "author-card.js", "scripts": { "start": "web-dev-server", "build": "rimraf public && rollup -c rollup.config.js && npm run analyze", "analyze": "cem analyze --litelement --exclude public", "dddaudit": "hax audit", "release": "npm run build && commit-and-tag-version && git push --follow-tags origin main && npm publish", "test": "web-test-runner test/**/*.test.js --coverage --node-resolve", "test:watch": "web-test-runner test/**/*.test.js --node-resolve --watch" }, "dependencies": { "@haxtheweb/d-d-d": "^25.0.0", "@haxtheweb/i18n-manager": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@babel/preset-env": "^7.16.4", "@custom-elements-manifest/analyzer": "0.10.4", "@open-wc/building-rollup": "^3.0.2", "@open-wc/testing": "4.0.0", "@rollup/plugin-babel": "6.0.4", "@rollup/plugin-node-resolve": "16.0.1", "@rollup/plugin-terser": "^0.4.4", "@web/dev-server": "0.4.6", "@web/rollup-plugin-html": "^2.3.0", "@web/rollup-plugin-import-meta-assets": "2.3.0", "@web/test-runner": "^0.19.0", "babel-plugin-template-html-minifier": "^4.1.0", "babel-plugin-transform-dynamic-import": "^2.1.0", "commit-and-tag-version": "12.5.1", "rimraf": "^5.0.7", "rollup-plugin-esbuild": "6.2.1" }, "private": false, "publishConfig": { "access": "public" }, "hax": { "cli": true }, "customElements": "custom-elements.json", "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/author-card/rollup.config.js ================================================ import nodeResolve from '@rollup/plugin-node-resolve'; import babel from '@rollup/plugin-babel'; import { rollupPluginHTML as html } from '@web/rollup-plugin-html'; import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets'; import esbuild from 'rollup-plugin-esbuild'; export default { input: 'index.html', output: { entryFileNames: '[hash].js', chunkFileNames: '[hash].js', assetFileNames: '[hash][extname]', format: 'es', dir: 'public', }, preserveEntrySignatures: false, plugins: [ /** Enable using HTML as rollup entrypoint */ html({ minify: true, }), /** Resolve bare module imports */ nodeResolve(), /** Minify JS, compile JS to a lower language target */ esbuild({ minify: true, target: ['chrome64', 'firefox67', 'safari11.1'], }), /** Bundle assets references via import.meta.url */ importMetaAssets(), /** Minify html and css tagged template literals */ babel({ plugins: [ [ 'babel-plugin-template-html-minifier', { modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] }, failOnError: false, strictCSS: true, htmlMinifier: { collapseWhitespace: true, conservativeCollapse: true, removeComments: true, caseSensitive: true, minifyCSS: true, }, }, ], ], }), ], }; ================================================ FILE: elements/author-card/test/author-card.test.js ================================================ import { html, fixture, expect } from '@open-wc/testing'; import "../author-card.js"; describe("AuthorCard test", () => { let element; beforeEach(async () => { element = await fixture(html` `); }); it("basic will it blend", async () => { expect(element).to.exist; }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); }); ================================================ FILE: elements/author-card/web-dev-server.config.mjs ================================================ // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr'; /** Use Hot Module replacement by adding --hmr to the start command */ const hmr = process.argv.includes('--hmr'); export default /** @type {import('@web/dev-server').DevServerConfig} */ ({ open: '/', watch: !hmr, https: true, dedupe: true, /** Resolve bare module imports */ nodeResolve: { exportConditions: ['browser', 'development'], }, /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */ // esbuildTarget: 'auto' /** Set appIndex to enable SPA routing */ // appIndex: 'demo/index.html', plugins: [ /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */ // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }), ], // See documentation for all available options }); ================================================ FILE: elements/awesome-explosion/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/awesome-explosion/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/awesome-explosion/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/awesome-explosion/.npmignore ================================================ node_modules ================================================ FILE: elements/awesome-explosion/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/awesome-explosion/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/awesome-explosion/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/awesome-explosion/README.md ================================================ # <awesome-explosion> Explosion > A stinking awesome, explosion. ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing module / web component */ import '@haxtheweb/awesome-explosion/awesome-explosion.js'; ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Explosion ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/awesome-explosion/awesome-explosion.js ================================================ /** * Copyright 2018 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; import { DDDSuper } from "@haxtheweb/d-d-d/d-d-d.js"; /** * `awesome-explosion` * `An awesome, explosion.` * * @silly * @demo demo/index.html * @element awesome-explosion */ class AwesomeExplosion extends DDDSuper(LitElement) { /** * LitElement constructable styles enhancement */ static get styles() { return [ super.styles, css` :host { display: inline-block; cursor: pointer; transition: transform var(--ddd-duration-fast) var(--ddd-timing-ease); } :host(:hover) { transform: scale(1.05); } :host(:focus-visible) { outline: var(--ddd-focus-ring); outline-offset: var(--ddd-focus-offset); } /* DDD-based sizing using icon variables */ :host([size="tiny"]) #image { width: var(--ddd-icon-sm); height: var(--ddd-icon-sm); } :host([size="small"]) #image { width: var(--ddd-icon-lg); height: var(--ddd-icon-lg); } :host([size="medium"]) #image { width: var(--ddd-icon-xl); height: var(--ddd-icon-xl); } :host([size="large"]) #image { width: var(--ddd-icon-2xl); height: var(--ddd-icon-2xl); } :host([size="epic"]) #image { width: var(--ddd-icon-4xl); height: var(--ddd-icon-4xl); } /* DDD-based color theming with dark mode support */ :host([color="red"]) #image { filter: sepia() saturate(10000%) hue-rotate(30deg) brightness(0.9); } :host([color="purple"]) #image { filter: sepia() saturate(10000%) hue-rotate(290deg) brightness(0.9); } :host([color="blue"]) #image { filter: sepia() saturate(10000%) hue-rotate(210deg) brightness(0.9); } :host([color="orange"]) #image { filter: sepia() saturate(10000%) hue-rotate(320deg) brightness(0.9); } :host([color="yellow"]) #image { filter: sepia() saturate(10000%) hue-rotate(70deg) brightness(0.9); } /* Dark mode adjustments */ @media (prefers-color-scheme: dark) { :host([color]) #image { filter-brightness: 1.2; } } /* Respect reduced motion preference */ @media (prefers-reduced-motion: reduce) { :host { transition: none; } :host(:hover) { transform: none; } #image { animation: none !important; } } #image { width: var(--ddd-icon-xl); height: var(--ddd-icon-xl); border-radius: var(--ddd-radius-sm); transition: filter var(--ddd-duration-fast) var(--ddd-timing-ease); } /* Accessibility improvements */ :host([disabled]) { pointer-events: none; opacity: var(--ddd-opacity-40); } .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } `, ]; } constructor() { super(); this.state = "stop"; this.image = new URL("./assets/explode.gif", import.meta.url).href; this.sound = new URL( "./assets/273320__clagnut__fireworks.mp3", import.meta.url, ).href; this.size = "medium"; this.color = ""; this.resetSound = false; this.soundEnabled = true; this.disabled = false; this.tabIndex = 0; // Check for user preferences this._checkUserPreferences(); setTimeout(() => { this.addEventListener("click", this._handleClick.bind(this)); this.addEventListener("keydown", this._handleKeydown.bind(this)); // Only add hover listeners if sound is enabled and motion is not reduced if ( this.soundEnabled && !globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches ) { this.addEventListener("mouseover", this._handleMouseOver.bind(this)); this.addEventListener("mouseout", this._handleMouseOut.bind(this)); } }, 0); } render() { return html` ${this._getAltText()} ${this.soundEnabled ? "Click or hover to play explosion sound" : "Visual explosion effect (sound disabled)"} `; } static get tag() { return "awesome-explosion"; } /** * HAXSchema for proper integration with the HAX editor */ static get haxProperties() { return new URL(`./lib/${this.tag}.haxProperties.json`, import.meta.url) .href; } updated(changedProperties) { changedProperties.forEach((oldValue, propName) => { if (propName == "state") { this.stopped = this._calculateStopped(this.state); this.playing = this._calculatePlaying(this.state); this.paused = this._calculatePaused(this.state); } }); } static get properties() { return { ...super.properties, /** * State is for setting: * Possible values: play, pause, stop */ state: { type: String, reflect: true, }, /** * Allow for stopping the sound effect. */ stopped: { type: Boolean, }, /** * Allow for playing the sound effect. */ playing: { type: Boolean, }, /** * Allow for pausing the sound effect. */ paused: { type: Boolean, }, /** * This allows you to swap out the image */ image: { type: String, }, /** * This allows you to swap out the sound. */ sound: { type: String, }, /** * This is the size of the element. Possible values are: * tiny, small, medium, large, epic */ size: { type: String, reflect: true, }, /** * This is to change the color of the element. Possible values are: * red, blue, orange, yellow, purple */ color: { type: String, reflect: true, }, /** * Allow for resetting the sound effect. */ resetSound: { type: Boolean, reflect: true, attribute: "reset-sound", }, /** * Enable/disable sound effects globally */ soundEnabled: { type: Boolean, reflect: true, attribute: "sound-enabled", }, /** * Disable the entire component */ disabled: { type: Boolean, reflect: true, }, }; } /** * calculate if it is stopped */ _calculateStopped(newValue, oldValue) { if (newValue == "stop") { this.stopped = true; if (typeof globalThis.audio !== typeof undefined) { globalThis.audio.currentTime = 0; } this._stopSound(); this.dispatchEvent( new CustomEvent("awesome-event", { bubbles: true, cancelable: true, composed: true, detail: { message: "Sound stopped" }, }), ); } else { this.stopped = false; } } /** * calculate if it is stopped */ _calculatePlaying(newValue, oldValue) { if (newValue == "play") { this.playing = true; this._playSound(); this.dispatchEvent( new CustomEvent("awesome-event", { bubbles: true, cancelable: true, composed: true, detail: { message: "Sound played" }, }), ); } else { this.playing = false; } } /** * calculate if it is stopped */ _calculatePaused(newValue, oldValue) { if (newValue == "pause") { this.paused = true; this._stopSound(); this.dispatchEvent( new CustomEvent("awesome-event", { bubbles: true, cancelable: true, composed: true, detail: { message: "Sound paused" }, }), ); } else { this.paused = false; } } /** * Stop the sound effect. */ _stopSound() { if (typeof globalThis.audio !== typeof undefined) { globalThis.audio.pause(); if (this.resetSound) { globalThis.audio.currentTime = 0; } } } /** * Handle click events with accessibility considerations */ _handleClick(e) { if (this.disabled) return; if (this.state === "play") { this.state = "stop"; } else { this.state = "play"; } } /** * Handle keyboard interactions */ _handleKeydown(e) { if (this.disabled) return; // Space or Enter key if (e.key === " " || e.key === "Enter") { e.preventDefault(); this._handleClick(e); } } /** * Handle mouse over with reduced motion consideration */ _handleMouseOver(e) { if (this.disabled || !this.soundEnabled) return; // Only play on hover if not reduced motion if (!globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) { this.state = "play"; } } /** * Handle mouse out */ _handleMouseOut(e) { if (this.disabled) return; this.state = "pause"; } /** * Check user preferences for accessibility */ _checkUserPreferences() { // Check for reduced motion preference const prefersReducedMotion = globalThis.matchMedia( "(prefers-reduced-motion: reduce)", ).matches; // Check for user sound preference (could be stored in localStorage) const userSoundPref = globalThis.localStorage && globalThis.localStorage.getItem("awesome-explosion-sound-enabled"); if (userSoundPref !== null) { this.soundEnabled = userSoundPref === "true"; } // Disable sound on hover if reduced motion is preferred if (prefersReducedMotion) { this.soundEnabled = false; } } /** * Get appropriate alt text for the image */ _getAltText() { const colorText = this.color ? ` ${this.color}` : ""; const sizeText = this.size !== "medium" ? ` ${this.size}` : ""; return `${sizeText}${colorText} explosion animation`; } /** * Get appropriate ARIA label */ _getAriaLabel() { const stateText = this.playing ? "playing" : "stopped"; const soundText = this.soundEnabled ? " with sound" : " (muted)"; return `Explosion animation ${stateText}${soundText}. Click to toggle.`; } /** * Set the state to play from an event. */ _setPlaySound(e) { this.state = "play"; } /** * Set the state to stop from an event. */ _setStopSound(e) { this.state = "pause"; } /** * Play the sound effect with accessibility considerations. */ _playSound() { if (!this.soundEnabled || this.disabled) return; // Respect reduced motion preference if (globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) { return; } if (typeof globalThis.audio === typeof undefined) { globalThis.audio = new Audio(this.sound); // Set volume to a reasonable level globalThis.audio.volume = 0.1; } // Catch and handle audio play errors gracefully globalThis.audio.play().catch((error) => { console.warn("Audio playback failed:", error); // Could dispatch an event here to notify parent components }); } } globalThis.customElements.define(AwesomeExplosion.tag, AwesomeExplosion); export { AwesomeExplosion }; ================================================ FILE: elements/awesome-explosion/demo/index.html ================================================ AwesomeExplosion: awesome-explosion Demo

    Awesome Explosion - DDD Design System & Accessibility Enhanced

    Accessibility Notes:

    • ✅ Uses DDD design system variables for consistent sizing
    • ✅ Respects prefers-reduced-motion settings
    • ✅ Keyboard accessible (Tab + Enter/Space)
    • ✅ Screen reader friendly with proper ARIA labels
    • ✅ Sound can be controlled globally via attributes
    • ✅ Dark mode compatible with DDD theming
    • ✅ Focus indicators follow DDD focus system
    ================================================ FILE: elements/awesome-explosion/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/awesome-explosion/index.html ================================================ awesome-explosion documentation ================================================ FILE: elements/awesome-explosion/lib/awesome-explosion.haxProperties.json ================================================ { "api": "1", "type": "element", "editingElement": "core", "canScale": false, "canPosition": true, "canEditSource": false, "gizmo": { "title": "Awesome Explosion", "description": "An interactive explosion animation with optional sound effects", "icon": "av:fiber-manual-record", "color": "orange", "tags": ["Silly", "Animation", "Interactive", "Sound", "Effect"], "handles": [], "meta": { "author": "HAX The Web", "inlineOnly": false, "requiresChildren": false } }, "settings": { "configure": [ { "property": "size", "title": "Size", "description": "Control the size of the explosion", "inputMethod": "select", "options": { "tiny": "Tiny", "small": "Small", "medium": "Medium", "large": "Large", "epic": "Epic" } }, { "property": "color", "title": "Color", "description": "Color theme for the explosion", "inputMethod": "select", "options": { "": "Default", "red": "Red", "blue": "Blue", "purple": "Purple", "orange": "Orange", "yellow": "Yellow" } }, { "property": "soundEnabled", "title": "Sound Effects", "description": "Enable or disable sound effects", "inputMethod": "boolean" }, { "property": "resetSound", "title": "Reset Sound", "description": "Reset sound to beginning each time", "inputMethod": "boolean" }, { "property": "image", "title": "Custom Image", "description": "Optional custom explosion image URL", "inputMethod": "haxupload", "validationType": "url" }, { "property": "sound", "title": "Custom Sound", "description": "Optional custom sound effect URL", "inputMethod": "haxupload", "validationType": "url" } ], "advanced": [ { "property": "disabled", "title": "Disabled", "description": "Disable all interactions", "inputMethod": "boolean" } ] }, "demoSchema": [ { "tag": "awesome-explosion", "properties": { "size": "medium", "color": "orange" }, "content": "", "description": "A medium orange explosion" }, { "tag": "awesome-explosion", "properties": { "size": "large", "color": "blue", "soundEnabled": false }, "content": "", "description": "A large blue explosion without sound" }, { "tag": "awesome-explosion", "properties": { "size": "epic", "color": "red" }, "content": "", "description": "An epic red explosion with sound" } ] } ================================================ FILE: elements/awesome-explosion/package.json ================================================ { "name": "@haxtheweb/awesome-explosion", "wcfactory": { "className": "AwesomeExplosion", "customElementClass": "LitElement", "elementName": "awesome-explosion", "generator-wcfactory-version": "0.3.1", "useHAX": false, "useSass": false, "files": { "js": "src/awesome-explosion.js" }, "sharedStyles": [] }, "version": "25.0.0", "description": "An awesome, explosion.", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "awesome-explosion.js", "module": "awesome-explosion.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/awesome-explosion/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/awesome-explosion/test/awesome-explosion.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../awesome-explosion.js"; describe("awesome-explosion test", () => { let element; let originalAudio; beforeEach(async () => { // Mock global audio to prevent actual sound playback during tests originalAudio = globalThis.audio; globalThis.audio = { play: () => Promise.resolve(), pause: () => {}, currentTime: 0, }; element = await fixture(html` `); await element.updateComplete; }); afterEach(() => { // Restore original global audio globalThis.audio = originalAudio; }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("awesome-explosion"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Component structure and properties", () => { it("should have correct tag name", () => { expect(element.constructor.tag).to.equal("awesome-explosion"); }); it("should initialize with default properties", () => { expect(element.state).to.equal("stop"); expect(element.size).to.equal("medium"); expect(element.color).to.equal("blue"); expect(element.resetSound).to.equal(false); }); it("should have default image and sound URLs", () => { expect(element.image).to.be.a("string"); expect(element.image).to.include("explode.gif"); expect(element.sound).to.be.a("string"); expect(element.sound).to.include(".mp3"); }); }); describe("Property validation with accessibility", () => { let testElement; beforeEach(async () => { testElement = await fixture(html` `); await testElement.updateComplete; }); describe("Size property", () => { it("should handle all valid size values and maintain accessibility", async () => { const validSizes = ["tiny", "small", "medium", "large", "epic"]; for (const size of validSizes) { testElement.size = size; await testElement.updateComplete; expect(testElement.size).to.equal(size); expect(testElement.hasAttribute("size")).to.be.true; expect(testElement.getAttribute("size")).to.equal(size); await expect(testElement).shadowDom.to.be.accessible(); } }); it("should have correct default size", () => { expect(testElement.size).to.equal("medium"); }); }); describe("Color property", () => { it("should handle all valid color values and maintain accessibility", async () => { const validColors = ["red", "purple", "blue", "orange", "yellow", ""]; for (const color of validColors) { testElement.color = color; await testElement.updateComplete; expect(testElement.color).to.equal(color); if (color) { expect(testElement.hasAttribute("color")).to.be.true; expect(testElement.getAttribute("color")).to.equal(color); } await expect(testElement).shadowDom.to.be.accessible(); } }); it("should have correct default color", () => { expect(testElement.color).to.equal(""); }); }); describe("State property", () => { it("should handle all valid state values and maintain accessibility", async () => { const validStates = ["play", "pause", "stop"]; for (const state of validStates) { testElement.state = state; await testElement.updateComplete; expect(testElement.state).to.equal(state); expect(testElement.hasAttribute("state")).to.be.true; expect(testElement.getAttribute("state")).to.equal(state); await expect(testElement).shadowDom.to.be.accessible(); } }); it("should have correct default state", () => { expect(testElement.state).to.equal("stop"); }); }); describe("Boolean properties", () => { it("should handle resetSound property", async () => { testElement.resetSound = true; await testElement.updateComplete; expect(testElement.resetSound).to.equal(true); expect(testElement.hasAttribute("reset-sound")).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); testElement.resetSound = false; await testElement.updateComplete; expect(testElement.resetSound).to.equal(false); expect(testElement.hasAttribute("reset-sound")).to.be.false; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle computed boolean properties", async () => { // Test stopped state testElement.state = "stop"; await testElement.updateComplete; expect(testElement.stopped).to.be.true; expect(testElement.playing).to.be.false; expect(testElement.paused).to.be.false; // Test playing state testElement.state = "play"; await testElement.updateComplete; expect(testElement.stopped).to.be.false; expect(testElement.playing).to.be.true; expect(testElement.paused).to.be.false; // Test paused state testElement.state = "pause"; await testElement.updateComplete; expect(testElement.stopped).to.be.false; expect(testElement.playing).to.be.false; expect(testElement.paused).to.be.true; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Media source properties", () => { it("should handle custom image property", async () => { testElement.image = "https://example.com/custom-explosion.gif"; await testElement.updateComplete; expect(testElement.image).to.equal( "https://example.com/custom-explosion.gif", ); const img = testElement.shadowRoot.querySelector("#image"); expect(img.src).to.equal("https://example.com/custom-explosion.gif"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle custom sound property", async () => { testElement.sound = "https://example.com/custom-explosion.mp3"; await testElement.updateComplete; expect(testElement.sound).to.equal( "https://example.com/custom-explosion.mp3", ); await expect(testElement).shadowDom.to.be.accessible(); }); }); }); describe("Visual rendering and image display", () => { it("should render image element with correct attributes", () => { const img = element.shadowRoot.querySelector("#image"); expect(img).to.exist; expect(img.tagName.toLowerCase()).to.equal("img"); expect(img.getAttribute("loading")).to.equal("lazy"); expect(img.getAttribute("alt")).to.equal(""); expect(img.classList.contains("image-tag")).to.be.true; }); it("should update image source when image property changes", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; const img = testElement.shadowRoot.querySelector("#image"); expect(img.src).to.equal("https://example.com/test.gif"); }); it("should apply size-based CSS classes correctly", async () => { const sizes = ["tiny", "small", "medium", "large", "epic"]; for (const size of sizes) { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.getAttribute("size")).to.equal(size); await expect(testElement).shadowDom.to.be.accessible(); } }); it("should apply color-based CSS filters correctly", async () => { const colors = ["red", "purple", "blue", "orange", "yellow"]; for (const color of colors) { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.getAttribute("color")).to.equal(color); await expect(testElement).shadowDom.to.be.accessible(); } }); }); describe("Sound functionality and audio controls", () => { let mockAudio; beforeEach(() => { let playCallCount = 0; let pauseCallCount = 0; mockAudio = { play: () => { playCallCount++; return Promise.resolve(); }, pause: () => { pauseCallCount++; }, currentTime: 0, getPlayCallCount: () => playCallCount, getPauseCallCount: () => pauseCallCount, }; globalThis.audio = mockAudio; }); it("should play sound when state changes to play", async () => { const testElement = await fixture(html` `); testElement.state = "play"; await testElement.updateComplete; expect(mockAudio.getPlayCallCount()).to.be.greaterThan(0); expect(testElement.playing).to.be.true; }); it("should pause sound when state changes to pause", async () => { const testElement = await fixture(html` `); testElement.state = "pause"; await testElement.updateComplete; expect(mockAudio.getPauseCallCount()).to.be.greaterThan(0); expect(testElement.paused).to.be.true; }); it("should stop sound when state changes to stop", async () => { const testElement = await fixture(html` `); testElement.state = "stop"; await testElement.updateComplete; expect(mockAudio.getPauseCallCount()).to.be.greaterThan(0); expect(testElement.stopped).to.be.true; expect(mockAudio.currentTime).to.equal(0); }); it("should reset sound currentTime when resetSound is true", async () => { const testElement = await fixture(html` `); mockAudio.currentTime = 5.5; // Set some progress testElement.state = "pause"; await testElement.updateComplete; expect(mockAudio.currentTime).to.equal(0); }); it("should create new Audio instance if not exists", async () => { delete globalThis.audio; const testElement = await fixture(html` `); // Mock the Audio constructor const originalAudio = globalThis.Audio; let audioCreated = false; globalThis.Audio = function (src) { audioCreated = true; this.play = () => Promise.resolve(); this.pause = () => {}; this.currentTime = 0; return this; }; testElement.state = "play"; await testElement.updateComplete; expect(audioCreated).to.be.true; globalThis.Audio = originalAudio; }); }); describe("Event handling and user interaction", () => { it("should respond to click events", (done) => { const testElement = new element.constructor(); // Wait for event listeners to be attached setTimeout(() => { expect(testElement.state).to.equal("stop"); testElement.click(); setTimeout(() => { expect(testElement.state).to.equal("play"); done(); }, 10); }, 10); }); it("should respond to mouseover events", (done) => { const testElement = new element.constructor(); setTimeout(() => { expect(testElement.state).to.equal("stop"); const mouseoverEvent = new MouseEvent("mouseover"); testElement.dispatchEvent(mouseoverEvent); setTimeout(() => { expect(testElement.state).to.equal("play"); done(); }, 10); }, 10); }); it("should respond to mouseout events", (done) => { const testElement = new element.constructor(); setTimeout(() => { testElement.state = "play"; const mouseoutEvent = new MouseEvent("mouseout"); testElement.dispatchEvent(mouseoutEvent); setTimeout(() => { expect(testElement.state).to.equal("pause"); done(); }, 10); }, 10); }); }); describe("Custom events and communication", () => { it("should dispatch awesome-event when playing", (done) => { const testElement = new element.constructor(); testElement.addEventListener("awesome-event", (e) => { expect(e.detail.message).to.equal("Sound played"); expect(e.bubbles).to.be.true; expect(e.cancelable).to.be.true; expect(e.composed).to.be.true; done(); }); testElement.state = "play"; }); it("should dispatch awesome-event when paused", (done) => { const testElement = new element.constructor(); testElement.addEventListener("awesome-event", (e) => { expect(e.detail.message).to.equal("Sound paused"); done(); }); testElement.state = "pause"; }); it("should dispatch awesome-event when stopped", (done) => { const testElement = new element.constructor(); testElement.addEventListener("awesome-event", (e) => { expect(e.detail.message).to.equal("Sound stopped"); done(); }); testElement.state = "stop"; }); }); describe("Accessibility scenarios", () => { it("should remain accessible with different sizes", async () => { const sizes = ["tiny", "small", "medium", "large", "epic"]; for (const size of sizes) { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); } }); it("should remain accessible with different colors", async () => { const colors = ["red", "purple", "blue", "orange", "yellow"]; for (const color of colors) { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); } }); it("should remain accessible during state changes", async () => { const testElement = await fixture(html` `); const states = ["play", "pause", "stop"]; for (const state of states) { testElement.state = state; await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); } }); it("should remain accessible with custom media sources", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Edge cases and error handling", () => { it("should handle missing global audio gracefully", () => { delete globalThis.audio; const testElement = new element.constructor(); expect(() => { testElement._stopSound(); }).to.not.throw(); }); it("should handle invalid state values", async () => { const testElement = await fixture(html` `); testElement.state = "invalid-state"; await testElement.updateComplete; expect(testElement.state).to.equal("invalid-state"); expect(testElement.stopped).to.be.false; expect(testElement.playing).to.be.false; expect(testElement.paused).to.be.false; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle invalid size and color values", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.size).to.equal("invalid-size"); expect(testElement.color).to.equal("invalid-color"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle malformed media URLs", async () => { const testElement = await fixture(html` `); await testElement.updateComplete; expect(testElement.image).to.equal("invalid-url"); expect(testElement.sound).to.equal("malformed-url"); await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle unusual property values", async () => { const testElement = await fixture( html``, ); const edgeCaseValues = [ " \t\n ", // whitespace "💥 explosion with emoji 💥", // emoji "Very long size name that might cause issues", "Multi\nline\nvalue", // multiline "Value with 'quotes' and \"double quotes\" and special chars: !@#$%^&*()", ]; for (const value of edgeCaseValues) { testElement.size = value; testElement.color = value; testElement.image = value; testElement.sound = value; await testElement.updateComplete; expect(testElement.size).to.equal(value); expect(testElement.color).to.equal(value); expect(testElement.image).to.equal(value); expect(testElement.sound).to.equal(value); await expect(testElement).shadowDom.to.be.accessible(); } }); }); describe("CSS styles and visual effects", () => { it("should have proper CSS styles defined", () => { const styles = element.constructor.styles; expect(styles).to.exist; expect(styles.length).to.be.greaterThan(0); const styleString = styles[0].cssText || styles[0].toString(); expect(styleString).to.include(":host"); expect(styleString).to.include("display: inline-block"); expect(styleString).to.include("#image"); }); it("should include size-specific CSS rules", () => { const styles = element.constructor.styles; const styleString = styles[0].cssText || styles[0].toString(); expect(styleString).to.include(':host([size="tiny"])'); expect(styleString).to.include(':host([size="small"])'); expect(styleString).to.include(':host([size="medium"])'); expect(styleString).to.include(':host([size="large"])'); expect(styleString).to.include(':host([size="epic"])'); }); it("should include color filter CSS rules", () => { const styles = element.constructor.styles; const styleString = styles[0].cssText || styles[0].toString(); expect(styleString).to.include(':host([color="red"])'); expect(styleString).to.include(':host([color="purple"])'); expect(styleString).to.include(':host([color="blue"])'); expect(styleString).to.include(':host([color="orange"])'); expect(styleString).to.include(':host([color="yellow"])'); expect(styleString).to.include("filter: sepia()"); }); }); describe("Lifecycle and initialization", () => { it("should set up event listeners after timeout", (done) => { const testElement = new element.constructor(); // Initially the event listeners shouldn't be set up yet expect(testElement.state).to.equal("stop"); // After timeout, event listeners should work setTimeout(() => { testElement.click(); setTimeout(() => { expect(testElement.state).to.equal("play"); done(); }, 10); }, 10); }); it("should initialize with correct default media URLs", () => { const testElement = new element.constructor(); expect(testElement.image).to.include("explode.gif"); expect(testElement.sound).to.include(".mp3"); expect(testElement.sound).to.include("fireworks"); }); }); }); ================================================ FILE: elements/b-r/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/b-r/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/b-r/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/b-r/.idea/.gitignore ================================================ # Default ignored files /shelf/ /workspace.xml # Editor-based HTTP Client requests /httpRequests/ ================================================ FILE: elements/b-r/.idea/b-r.iml ================================================ ================================================ FILE: elements/b-r/.idea/modules.xml ================================================ ================================================ FILE: elements/b-r/.idea/vcs.xml ================================================ ================================================ FILE: elements/b-r/.npmignore ================================================ node_modules ================================================ FILE: elements/b-r/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/b-r/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/b-r/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2021 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/b-r/README.md ================================================ # <b-r> R > Creates break statements to show conditional rendering ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/b-r/b-r.js'; /* CDN */ ``` # Tag Properties `amount="number"` Specify the number of br tags to be inserted. No value or 0 will use the screen height to generate br tags. ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/b-r/b-r.js ================================================ /** * Copyright 2021 * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; /** * `b-r` * `Creates break statements to show conditional rendering` * @demo demo/index.html * @element b-r */ class BR extends LitElement { /** * HTMLElement */ constructor() { super(); this.amount = 0; } /** * LitElement render callback */ render() { return html`${this.renderBR(this.amount)}
    `; } static get properties() { return { amount: { type: Number, }, }; } renderBR(amount) { let count = 0; const content = []; if (amount === 0) { amount = globalThis.innerHeight / 21; } while (count < amount) { content.push(html`
    `); count++; } return content; } /** * Convention we use */ static get tag() { return "b-r"; } } globalThis.customElements.define(BR.tag, BR); export { BR }; ================================================ FILE: elements/b-r/demo/index.html ================================================ BR: b-r Demo

    Basic b-r demo

    ================================================ FILE: elements/b-r/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); // discover iconset and build json structure gulp.task("iconset", (done) => { const iconset = packageJson.wcfactory.iconset || {}; if(iconset.svgsPath && iconset.svgsPath !== ''){ const path = iconset.svgsPath; const manifestFilename = iconset.manifestFilename || `${packageJson.wcfactory.elementName}-iconsets-manifest.js` const manifestPath = iconset.manifestPath || `./lib`; const exportName = iconset.exportName || `${packageJson.wcfactory.className}IconsetsManifest`; const jsonContent = JSON.stringify(dirTree(path).icons, null, 2); const iconVar = `export const ${exportName} = ${jsonContent};` fs.writeFile(`${manifestPath}/${manifestFilename}.js`, iconVar, 'utf8', function (err) { if (err) { console.log("An error occured while writing iconset manifest Object to File."); return console.log(err); } console.log("Iconset SVGs and manifest JS file has been saved."); return true; }); } else { console.log("No Iconset Manifest"); } done(); }); gulp.task( "default", gulp.series("analyze") ); ================================================ FILE: elements/b-r/index.html ================================================ b-r documentation ================================================ FILE: elements/b-r/lib/.gitkeep ================================================ ================================================ FILE: elements/b-r/package.json ================================================ { "name": "@haxtheweb/b-r", "wcfactory": { "className": "BR", "customElementClass": "LitElement", "elementName": "b-r", "generator-wcfactory-version": "0.11.0", "useHAX": false, "useSass": false, "files": { "css": "src/b-r.css", "html": "src/b-r.html", "js": "src/b-r.js", "properties": "src/b-r-properties.json", "hax": "src/b-r-hax.json" }, "iconset": {}, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "Creates break statements to show conditional rendering", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "b-r.js", "module": "b-r.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/b-r/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/b-r/test/b-r.test.js ================================================ ================================================ FILE: elements/barcode-reader/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/barcode-reader/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/barcode-reader/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/barcode-reader/.idea/barcode-reader.iml ================================================ ================================================ FILE: elements/barcode-reader/.idea/modules.xml ================================================ ================================================ FILE: elements/barcode-reader/.idea/prettier.xml ================================================ ================================================ FILE: elements/barcode-reader/.idea/vcs.xml ================================================ ================================================ FILE: elements/barcode-reader/.idea/workspace.xml ================================================ 1617996372672 1618177235893 1618247020546 1618256435504 1618452340594 1618523440140 1618523635191 1618860908816 1619821399388
    `; } constructor() { super(); this.value = ""; this.hideinput = false; globalThis.ESGlobalBridge.requestAvailability().load( "ZXing", decodeURIComponent(import.meta.url) + "/../lib/zxing.js", ); globalThis.addEventListener( `es-bridge-zxing-loaded`, this._control.bind(this), ); } _control() { let videoElement = this.shadowRoot.querySelector("video"); let canvas = this.shadowRoot.querySelector("canvas"); let ctx = canvas.getContext("2d"); let buttonGo = this.shadowRoot.querySelector(".go"); let isPaused = false; let videoWidth = 640, videoHeight = 480; let mobileVideoWidth = 240, mobileVideoHeight = 320; let isPC = true; let ZXing = null; let decodePtr = null; var tick = function () { if (globalThis.ZXing) { setTimeout(() => { console.log("loaded zxing instance"); ZXing = new globalThis.ZXing(); decodePtr = ZXing.Runtime.addFunction(decodeCallback); }, 100); //Slow down execution. Error when loaded before getting devices } else { setTimeout(tick, 100); } }; tick(); // we got a match! var decodeCallback = async (ptr, len, resultIndex, resultCount) => { var result = new Uint8Array(ZXing.HEAPU8.buffer, ptr, len); console.log(String.fromCharCode.apply(null, result)); this.value = String.fromCharCode.apply(null, result); buttonGo.removeAttribute("disabled"); }; // check devices function browserRedirect() { var deviceType; var sUserAgent = globalThis.navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp = sUserAgent.match(/midp/i) == "midp"; var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; if ( bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM ) { deviceType = "phone"; } else { deviceType = "pc"; } return deviceType; } if (browserRedirect() == "pc") { isPC = true; } else { isPC = false; } buttonGo.onclick = () => { console.log("click"); this.value = ""; canvas.style.display = "none"; isPaused = false; buttonGo.setAttribute("disabled", ""); scanBarcode(); }; // scan barcode function scanBarcode() { if (ZXing == null) { buttonGo.removeAttribute("disabled"); alert("Barcode Reader is not ready!"); return; } var data = null, context = null, width = 0, height = 0, dbrCanvas = null; if (isPC) { context = ctx; width = videoWidth; height = videoHeight; dbrCanvas = canvas; } else { context = mobileCtx; width = mobileVideoWidth; height = mobileVideoHeight; } context.drawImage(videoElement, 0, 0, width, height); var barcodeCanvas = globalThis.document.createElement("canvas"); barcodeCanvas.width = vid.videoWidth; barcodeCanvas.height = vid.videoHeight; var barcodeContext = barcodeCanvas.getContext("2d"); var imageWidth = vid.videoWidth, imageHeight = vid.videoHeight; barcodeContext.drawImage(videoElement, 0, 0, imageWidth, imageHeight); var imageData = barcodeContext.getImageData( 0, 0, imageWidth, imageHeight, ); var idd = imageData.data; var image = ZXing._resize(imageWidth, imageHeight); console.time("decode barcode"); for (var i = 0, j = 0; i < idd.length; i += 4, j++) { ZXing.HEAPU8[image + j] = idd[i]; } var err = ZXing._decode_any(decodePtr); console.timeEnd("decode barcode"); console.log(err); if (err == -2) { setTimeout(scanBarcode, 30); } else if (err == -3) { console.error("error code: ", err); buttonGo.removeAttribute("disabled"); } else if (err === 0) { buttonGo.removeAttribute("disabled"); } } var videoSelect = this.shadowRoot.querySelector("select"); globalThis.navigator.mediaDevices .enumerateDevices() .then(gotDevices) .then(getStream) .catch(handleError); videoSelect.onchange = getStream; function gotDevices(deviceInfos) { for (var i = deviceInfos.length - 1; i >= 0; --i) { var deviceInfo = deviceInfos[i]; var option = globalThis.document.createElement("option"); option.value = deviceInfo.deviceId; if (deviceInfo.kind === "videoinput") { option.text = deviceInfo.label || "camera " + (videoSelect.length + 1); videoSelect.appendChild(option); } else { console.log("Found one other kind of source/device: ", deviceInfo); } } } function getStream() { buttonGo.removeAttribute("disabled"); if (globalThis.stream) { globalThis.stream.getTracks().forEach(function (track) { track.stop(); }); } var constraints = { video: { deviceId: { exact: videoSelect.value }, }, }; globalThis.navigator.mediaDevices .getUserMedia(constraints) .then(gotStream) .catch(handleError); } function gotStream(stream) { globalThis.stream = stream; // make stream available to console videoElement.srcObject = stream; } this.shadowRoot.querySelector(".render").addEventListener("click", () => { if (this.shadowRoot.querySelector(".render").innerHTML === "Show") { if (globalThis.stream) { globalThis.stream.getTracks().forEach(function (track) {}); let constraints = { video: { deviceId: { exact: videoSelect.value }, }, }; globalThis.navigator.mediaDevices .getUserMedia(constraints) .then(gotStream) .catch(handleError); } } }); function handleError(error) { console.error("Error: ", error); } } /** * Convention we use */ static get tag() { return "barcode-reader"; } updated(changedProperties) { changedProperties.forEach((oldValue, propName) => { if (propName === "value") { this.dispatchEvent( new CustomEvent("value-changed", { detail: this, }), ); } }); } /** * LitElement ready */ firstUpdated() { this.start().then((r) => {}); this.__context = this.shadowRoot.querySelector("canvas").getContext("2d"); this.__video = this.shadowRoot.querySelector("video"); this.__videoInputSelector = this.shadowRoot.querySelector("#videoInput"); vid = this.shadowRoot.querySelector("video"); this._renderVideo().then((r) => {}); if (!this.hideinput) { this.shadowRoot.querySelector(".input").removeAttribute("hidden"); } } async _onFrame() { if (this.__video.videoWidth > 0) { this._drawFrame(this.__video); } this.__animationFrameId = requestAnimationFrame(this._onFrame.bind(this)); } _drawFrame(frameData) { this.__context.drawImage( frameData, 0, 0, this.width, this.height, 0, 0, this.width, this.height, ); } async start() { this.shadowRoot .querySelector("simple-icon-button") .addEventListener("click", () => { if ( this.shadowRoot.querySelector(".render").innerHTML === "Initialize" ) { this._control(); } }); } async _renderVideo() { let video = this.shadowRoot.querySelector(".hidden"); let button = this.shadowRoot.querySelector("simple-icon-button"); let extraButtons = this.shadowRoot.querySelector(".hidden2"); video.style.display = "none"; this.shadowRoot .querySelector("simple-icon-button") .addEventListener("click", () => { setTimeout(() => { if (video.style.display === "none") { video.style.display = "inline"; button.innerHTML = "Hide"; extraButtons.style.display = "inline"; } else { video.style.display = "none"; button.innerHTML = "Show"; extraButtons.style.display = "none"; globalThis.stream.getTracks().forEach(function (track) { track.stop(); }); } }, 100); }); } } globalThis.customElements.define(BarcodeReader.tag, BarcodeReader); export { BarcodeReader }; ================================================ FILE: elements/barcode-reader/demo/index.html ================================================ BarcodeReader: barcode-reader Demo

    Basic barcode-reader demo

    ================================================ FILE: elements/barcode-reader/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); // discover iconset and build json structure gulp.task("iconset", (done) => { const iconset = packageJson.wcfactory.iconset || {}; if(iconset.svgsPath && iconset.svgsPath !== ''){ const path = iconset.svgsPath; const manifestFilename = iconset.manifestFilename || `${packageJson.wcfactory.elementName}-iconsets-manifest.js` const manifestPath = iconset.manifestPath || `./lib`; const exportName = iconset.exportName || `${packageJson.wcfactory.className}IconsetsManifest`; const jsonContent = JSON.stringify(dirTree(path).icons, null, 2); const iconVar = `export const ${exportName} = ${jsonContent};` fs.writeFile(`${manifestPath}/${manifestFilename}.js`, iconVar, 'utf8', function (err) { if (err) { console.log("An error occured while writing iconset manifest Object to File."); return console.log(err); } console.log("Iconset SVGs and manifest JS file has been saved."); return true; }); } else { console.log("No Iconset Manifest"); } done(); }); gulp.task( "default", gulp.series("analyze") ); ================================================ FILE: elements/barcode-reader/index.html ================================================ barcode-reader documentation ================================================ FILE: elements/barcode-reader/lib/.gitkeep ================================================ ================================================ FILE: elements/barcode-reader/lib/zxing.js ================================================ var ZXing = function(ZXing) { ZXing = ZXing || {}; var Module=typeof ZXing!=="undefined"?ZXing:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=console.log;if(!Module["printErr"])Module["printErr"]=console.warn;var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;ret=tryParseAsDataURI(filename);if(!ret){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename)}return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));process["on"]("unhandledRejection",(function(reason,p){process["exit"](1)}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}else{Module["read"]=function shell_read(){throw"no read() available"}}Module["readBinary"]=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){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)};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function shell_print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function shell_printErr(x){console.warn(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw new Error("Unknown runtime environment. Where are we?")}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}if(!Module["quit"]){Module["quit"]=(function(status,toThrow){throw toThrow})}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var Runtime={setTempRet0:(function(value){tempRet0=value;return value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,prepVararg:(function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr}),getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],addFunction:(function(func){for(var i=0;i>2];var end=(ret+size+15|0)&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var ABORT=0;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}var JSfuncs={"stackSave":(function(){Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore()}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=Runtime.stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};function ccall(ident,returnType,argTypes,args,opts){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_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return UTF8ToString(ptr)}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}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 if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;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:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}var HEAP,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 STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(TOTAL_MEMORY0){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 __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}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}assert(Math["imul"]&&Math["fround"]&&Math["clz32"]&&Math["trunc"],"this is a legacy browser, build with LEGACY_VM_SUPPORT");var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var ASM_CONSTS=[];STATIC_BASE=Runtime.GLOBAL_BASE;STATICTOP=STATIC_BASE+61824;__ATINIT__.push({func:(function(){__GLOBAL__sub_I_zxing_js_cpp()})},{func:(function(){__GLOBAL__sub_I_CharacterSetECI_cpp()})},{func:(function(){__GLOBAL__sub_I_GlobalHistogramBinarizer_cpp()})},{func:(function(){__GLOBAL__sub_I_GenericGF_cpp()})},{func:(function(){__GLOBAL__sub_I_Version_cpp()})},{func:(function(){__GLOBAL__sub_I_Code39Reader_cpp()})},{func:(function(){__GLOBAL__sub_I_Code93Reader_cpp()})},{func:(function(){__GLOBAL__sub_I_ITFReader_cpp()})},{func:(function(){__GLOBAL__sub_I_UPCEANReader_cpp()})},{func:(function(){__GLOBAL__sub_I_UPCEReader_cpp()})},{func:(function(){__GLOBAL__sub_I_DecodedBitStreamParser_cpp()})},{func:(function(){__GLOBAL__sub_I_ModulusGF_cpp()})},{func:(function(){__GLOBAL__sub_I_LinesSampler_cpp()})},{func:(function(){__GLOBAL__sub_I_ErrorCorrectionLevel_cpp()})},{func:(function(){__GLOBAL__sub_I_Version_cpp_601()})},{func:(function(){__GLOBAL__sub_I_DataMask_cpp()})},{func:(function(){__GLOBAL__sub_I_Mode_cpp()})},{func:(function(){__GLOBAL__sub_I_bind_cpp()})});memoryInitializer="data:application/octet-stream;base64,5J8AAAqkAAD4CwAAAAAAAOSfAADwowAACAAAAAAAAADknwAAHaQAAMAAAAAAAAAAvJ8AAEakAADknwAAMaQAADgAAAAAAAAA5J8AAFekAAA4AAAAAAAAAOSfAABppAAAOAAAAAAAAADknwAAmKQAADgAAAAAAAAA5J8AAKukAAA4AAAAAAAAAOSfAADCpAAAGAAAAAAAAADknwAA+aQAABgAAAAAAAAA5J8AABOlAADAAAAAAAAAAOSfAACXpQAAOAAAAAAAAAA4AAAAAAAAADAHAABDAAAARAAAAMj////I////MAcAAEUAAABGAAAA5J8AALGlAAAoBwAAAAAAAOSfAADzpQAAMAcAAAAAAADknwAAOaYAACgBAAAAAAAA5J8AAFWmAAA4AAAAAAAAAOSfAABlpgAAOAAAAAAAAADknwAAdaYAADgAAAAAAAAA5J8AAKSmAABoAQAAAAAAAOSfAACLpgAAOAAAAAAAAADknwAA96YAACgBAAAAAAAA5J8AAMimAAA4AAAAAAAAAOSfAADgpgAAOAAAAAAAAADknwAAbagAADgAAAAAAAAA5J8AAIKoAAA4AAAAAAAAAOSfAADGqAAAOAAAAAAAAADknwAAe6kAADgAAAAAAAAA5J8AALGpAAAYAAAAAAAAAOSfAACQqQAAOAAAAAAAAADknwAAzakAADgAAAAAAAAA5J8AAN+pAAA4AAAAAAAAAOSfAACMrAAAOAAAAAAAAADknwAAs6wAADgAAAAAAAAA5J8AAM+sAAA4AAAAAAAAAOSfAADnrAAAcAAAAAAAAADknwAAMK0AAFgCAAAAAAAA5J8AAEqtAAAIAAAAAAAAAOSfAABtrQAAOAAAAAAAAADknwAAjK0AADgAAAAAAAAA5J8AAC2uAAA4AAAAAAAAAOSfAACjrgAAOAAAAAAAAADknwAAqa8AABgAAAAAAAAA5J8AAMmvAAAIAAAAAAAAAOSfAADorwAAKAEAAAAAAADknwAAD7AAADgAAAAAAAAA5J8AANmwAAA4AAAAAAAAAOSfAAD/sAAAOAAAAAAAAADknwAA07IAADgAAAAAAAAA5J8AAOayAAA4AAAAAAAAAOSfAAAEswAAOAAAAAAAAADknwAANbMAAGgDAAAAAAAA5J8AAGKzAAA4AAAAAAAAANCgAACIswAAAQAAAAIAAAAoBQAAAgAAAGgDAAACDAAA5J8AAKqzAAAoBgAAAAAAANCgAADZswAAAAAAAAEAAADAAwAAAAQAALyfAAACtAAA5J8AAEG0AABYBAAAAAAAAOSfAABetAAAWAQAAAAAAADknwAAqLQAAFgEAAAAAAAA5J8AAPW0AABYBAAAAAAAAOSfAAARtQAAiAQAAAAAAADknwAALLUAAIgEAAAAAAAA5J8AAEa1AABYBAAAAAAAAOSfAABetQAAWAQAAAAAAADknwAAg7UAAFgEAAAAAAAA5J8AAKq1AAAoAQAAAAAAAOSfAADEtQAASAEAAAAAAADknwAA47UAAIgEAAAAAAAA5J8AAP21AABYBAAAAAAAAOSfAAAktgAAiAQAAAAAAADknwAAPrYAACgBAAAAAAAA5J8AAFy2AAA4AAAAAAAAAOSfAACWtwAAOAAAAAAAAADknwAAtrcAADgAAAAAAAAA5J8AAIi5AAA4AAAAAAAAAOSfAABQugAAOAAAAAAAAAC0oAAAt7oAAAAAAAB4AgAA5J8AAAi8AAA4AAAAAAAAAOSfAAArvAAAKAEAAAAAAADknwAASbwAADgAAAAAAAAA5J8AAKy8AAA4AAAAAAAAAOSfAAAlvQAAOAAAAAAAAADknwAAkL0AADgAAAAAAAAA5J8AAKm9AABoBQAAAAAAAOSfAADGvQAAaAUAAAAAAADknwAA470AAGgFAAAAAAAA5J8AAAC+AABoBQAAAAAAAOSfAAAdvgAAaAUAAAAAAADknwAAOr4AAGgFAAAAAAAA5J8AAFe+AABoBQAAAAAAAOSfAAB0vgAAaAUAAAAAAADknwAAUr8AADgAAAAAAAAA5J8AAPe/AABIAQAAAAAAAOSfAAAZwAAAOAAAAAAAAADknwAAYsAAADgAAAAAAAAA5J8AAMbAAABIAQAAAAAAAOSfAAAKwQAAOAAAAAAAAAC8nwAAp8UAALyfAADmxQAAvJ8AACTGAAC8nwAAasYAALyfAACnxgAAvJ8AAMbGAAC8nwAA5cYAALyfAAAExwAAvJ8AACPHAAC8nwAAQscAALyfAABhxwAAvJ8AAJ7HAAC8nwAAvccAANCgAADQxwAAAAAAAAEAAADYBgAAAAAAALyfAAAPyAAA0KAAADXIAAAAAAAAAQAAANgGAAAAAAAA0KAAAHTIAAAAAAAAAQAAANgGAAAAAAAA5J8AACbUAAAgBwAAAAAAALyfAAAU1AAAvJ8AAFDUAADQoAAAgdQAAAAAAAABAAAAEAcAAAP0///knwAA3dQAANALAAAAAAAA5J8AAPvUAADoCwAAAAAAAOSfAAAl1QAAeAcAAAAAAADknwAAOdUAAMgLAAAAAAAA5J8AAE/VAAB4BwAAAAAAANCgAACJ1QAAAAAAAAIAAAB4BwAAAgAAALgHAAAAAAAA0KAAAM3VAAAAAAAAAQAAANAHAAAAAAAAvJ8AAOPVAADQoAAA/NUAAAAAAAACAAAAeAcAAAIAAAD4BwAAAAAAANCgAABA1gAAAAAAAAEAAADQBwAAAAAAANCgAABp1gAAAAAAAAIAAAB4BwAAAgAAADAIAAAAAAAA0KAAAK3WAAAAAAAAAQAAAEgIAAAAAAAAvJ8AAMPWAADQoAAA3NYAAAAAAAACAAAAeAcAAAIAAABwCAAAAAAAANCgAAAg1wAAAAAAAAEAAABICAAAAAAAANCgAAB22AAAAAAAAAMAAAB4BwAAAgAAALAIAAACAAAAuAgAAAAIAAC8nwAA3dgAALyfAAC72AAA0KAAAPDYAAAAAAAAAwAAAHgHAAACAAAAsAgAAAIAAADoCAAAAAgAALyfAAA12QAA0KAAAFfZAAAAAAAAAgAAAHgHAAACAAAAEAkAAAAIAAC8nwAAnNkAANCgAADG2QAAAAAAAAIAAAB4BwAAAgAAABAJAAAACAAA0KAAAAvaAAAAAAAAAgAAAHgHAAACAAAAWAkAAAIAAAC8nwAAJ9oAANCgAAA82gAAAAAAAAIAAAB4BwAAAgAAAFgJAAACAAAA0KAAAFjaAAAAAAAAAgAAAHgHAAACAAAAWAkAAAIAAADQoAAAdNoAAAAAAAACAAAAeAcAAAIAAABYCQAAAgAAANCgAACv2gAAAAAAAAIAAAB4BwAAAgAAAOAJAAAAAAAAvJ8AAPXaAADQoAAAGdsAAAAAAAACAAAAeAcAAAIAAAAICgAAAAAAALyfAABf2wAA0KAAAH7bAAAAAAAAAgAAAHgHAAACAAAAMAoAAAAAAAC8nwAAxNsAANCgAADd2wAAAAAAAAIAAAB4BwAAAgAAAFgKAAAAAAAAvJ8AACPcAADQoAAAPNwAAAAAAAACAAAAeAcAAAIAAACACgAAAgAAALyfAABR3AAA0KAAAOjcAAAAAAAAAgAAAHgHAAACAAAAgAoAAAIAAADknwAAadwAALgKAAAAAAAA0KAAAIzcAAAAAAAAAgAAAHgHAAACAAAA2AoAAAIAAAC8nwAAr9wAAOSfAADG3AAAuAoAAAAAAADQoAAA/dwAAAAAAAACAAAAeAcAAAIAAADYCgAAAgAAANCgAAAf3QAAAAAAAAIAAAB4BwAAAgAAANgKAAACAAAA0KAAAEHdAAAAAAAAAgAAAHgHAAACAAAA2AoAAAIAAADknwAAZN0AAHgHAAAAAAAA0KAAAHrdAAAAAAAAAgAAAHgHAAACAAAAgAsAAAIAAAC8nwAAjN0AANCgAACh3QAAAAAAAAIAAAB4BwAAAgAAAIALAAACAAAA5J8AAL7dAAB4BwAAAAAAAOSfAADT3QAAeAcAAAAAAAC8nwAA790AAOSfAADa3gAA4AsAAAAAAAC8nwAA8d4AAOSfAAAK3wAAWAwAAAAAAAC8nwAAtd8AAOSfAAAV4AAAEAwAAAAAAADknwAAwt8AACAMAAAAAAAAvJ8AAOPfAADknwAA8N8AAAAMAAAAAAAA5J8AADjhAAD4CwAAAAAAAOSfAABU4QAA+AsAAAAAAADknwAAZOEAAPgLAAAAAAAA5J8AAHbhAABIDAAAAAAAAOSfAACH4QAASAwAAAAAAADknwAApuEAAPgLAAAAAAAA5J8AANbhAAAQDAAAAAAAAOSfAACy4QAAmAwAAAAAAADknwAA+OEAABAMAAAAAAAAmKAAAOinAACYoAAAIOIAAJigAADCpwAAmKAAAMSnAAC0oAAAI+IAAAEAAADgDAAAmKAAAM6nAACYoAAAwKcAAJigAADipwAAmKAAAOSnAACYoAAA0KcAAJigAADSpwAAmKAAAGfWAACYoAAA1qcAAJigAADKpwAAmKAAAManAADknwAAJ+IAAAAMAAAAAAAAAAAAACgAAAAqAAAAKwAAACoAAAAqAAAAKgAAACoAAAArAAAAKwAAACwAAAAAAAAAQAAAACwAAAAtAAAAAAAAADgAAAAuAAAALwAAAAAAAABQAAAAMAAAADEAAAAAAAAAYAAAADIAAAAzAAAAAAAAAHAAAAA0AAAANQAAACoAAAAqAAAAKgAAAAAAAACAAAAANgAAADcAAAAAAAAAkAAAADgAAAA5AAAALAAAAAAAAAAIAAAAOgAAADsAAAAsAAAAAAAAABgAAAA6AAAAPAAAACwAAAAAAABA/rsBAAAAAAAAAAAAoAAAAD0AAAA+AAAALAAAAAAAAACwAAAAPwAAAEAAAAArAAAALQAAAC0AAAArAAAALgAAAC4AAAAvAAAAAAAAAMAAAABBAAAAQgAAACoAAAAqAAAAKgAAACoAAAArAAAAKwAAACwAAAA4AAAAAAAAAAgBAABHAAAASAAAAMj////I////CAEAAEkAAABKAAAAAAAAAPgAAABLAAAATAAAADAAAAAqAAAALAAAACwAAAAvAAAAMAAAACsAAAAxAAAAMgAAACoAAAAsAAAAKwAAALAOAADcAAAA8AAAAMQOAAAAAAAAGAEAAE0AAABOAAAAKgAAAC0AAAAAAAAAKAEAAE8AAABQAAAAKwAAACoAAAAAAAAAOAEAAFEAAABSAAAAAAAAAEgBAABTAAAAVAAAACoAAAArAAAAAAAAAFgBAABVAAAAVgAAAAAAAABoAQAAVQAAAFcAAAAAAAAAeAEAAFgAAABZAAAALAAAAC4AAAAAAAAAiAEAAFoAAABbAAAAAAAAAJgBAABcAAAAXQAAABOnAAAbpwAAAqgAAASoAACH1QAABqgAAAioAAAKqAAADKgAAN67AAAOqAAAEKgAABKoAABc1gAA4rsAABSoAAAWqAAAGKgAAOC7AAAaqAAAHKgAAB6oAAAgqAAAIqgAACSoAAAmqAAAKKgAACqoAACopwAA8qcAAPqnAAC4pwAAE6cAABunAADApwAAwqcAAMSnAADGpwAAyKcAAMqnAADMpwAAzqcAANCnAADSpwAA1KcAAGfWAADWpwAA2KcAANqnAADcpwAA3qcAAOCnAADipwAA5KcAAOanAADopwAA6qcAAOynAADupwAA8KcAADenAADypwAA+qcAALinAAATpwAAG6cAAHanAAB4pwAAeqcAAHynAAB+pwAAgKcAAIKnAACEpwAAhqcAAIinAACKpwAAjKcAAD+nAACOpwAAkKcAAJKnAACUpwAAlqcAAJinAACapwAAnKcAAJ6nAACgpwAAoqcAAKSnAACmpwAAqKcAAC+nAACwpwAAuKcAAH3xAAA/pwAAQacAAESnAABHpwAAId8AAEqnAABMpwAATqcAAFCnAABSpwAAVKcAAFanAABYpwAAWqcAAFynAABepwAALq0AAHfBAAAyzAAAYKcAAGKnAABkpwAAZqcAAGinAABqpwAAbKcAAG6nAABwpwAAcqcAAHSnAAAvpwAAE6cAABunAACPwwAAHacAAB+nAAAhpwAAI6cAACWnAAAnpwAAKacAACunAAAtpwAALq0AADLMAAAvpwAAN6cAAAAAAABoAAAA8AAAAJgBAABgAgAAAAAAABEAAAAoAAAAMwAAAEwAAAAAAAAAgAAAACABAADgAQAAwAIAAMADAADgBAAAIAYAAIAHAAAACQAAoAoAAGAMAABADgAAQBAAAGASAACgFAAAABcAAIAZAAAgHAAA4B4AAMAhAADAJAAA4CcAACArAACALgAAADIAAKA1AABgOQAAQD0AAEBBAABgRQAAoEkAAABOAAAAAAAAFQAAADAAAAA8AAAAWAAAAHgAAACcAAAAxAAAAPAAAADmAAAAEAEAADwBAABsAQAAoAEAANYBAAAQAgAATAIAAIwCAADQAgAAFgMAAGADAACsAwAA/AMAAJgDAADgAwAAKgQAAHgEAADIBAAAGgUAAHAFAADIBQAAIgYAAIAGAAAAAAAAqAEAAF4AAABfAAAAAAAAALgBAABgAAAAYQAAAAAAAADIAQAAYgAAAGMAAAAAAAAA2AEAAC4AAABkAAAAAAAAAPgBAABlAAAAZgAAAAAAAAAIAgAAZwAAAGgAAAAAAAAAGAIAAGkAAABqAAAAAAAAAAIAAAD/////rawAAAAAAAABAAAAAwAAAP////93rAAAgawAAAAAAAAEAAAA/////2KsAABsrAAAAAAAAAUAAAD/////TawAAFesAAAAAAAABgAAAP////84rAAAQqwAAAAAAAAHAAAA/////yOsAAAtrAAAAAAAAAgAAAD/////DqwAABisAAAAAAAACQAAAP/////5qwAAA6wAAAAAAAAKAAAA/////+SrAADuqwAAAAAAAAsAAAD/////z6sAANmrAAAAAAAADAAAAP////+4qwAAw6sAAAAAAAANAAAA/////6GrAACsqwAAAAAAAA8AAAD/////iqsAAJWrAAAAAAAAEAAAAP////9zqwAAfqsAAAAAAAARAAAA/////1yrAABnqwAAAAAAABIAAAD/////RasAAFCrAAAAAAAAFAAAAP////82qwAAO6sAAAAAAAAVAAAA/////yKrAAApqwAAAAAAABYAAAD/////DqsAABWrAAAAAAAAFwAAAP/////6qgAAAasAAAAAAAAYAAAA/////+aqAADtqgAAAAAAABkAAAD/////v6oAANKqAADbqgAAAAAAABoAAAD/////uqoAAJytAAAAAAAAGwAAAKoAAAD/////oq0AALGqAAAAAAAAHAAAAP////+sqgAAAAAAAB0AAAD/////kqoAAJqqAAChqgAAqKoAAAAAAAAeAAAA/////4SqAACLqgAAAAAAAAAAAAAoAgAALgAAAGsAAAAAAAAASAIAAGwAAABtAAAAAAAAADgCAABuAAAAbwAAAAAAAABYAgAAcAAAAHEAAAAvAAAAMQAAAC0AAAAAAAAA6AEAADoAAAByAAAALAAAAAAAAABoAgAAcwAAAHQAAAAvAAAAMgAAAC4AAAAAAAAAeAIAAHUAAAB2AAAALAAAAAAAAACIAgAALgAAAHcAAAAAAAAAmAIAAHgAAAB5AAAAoq0AAAAAAACoAgAAegAAAHsAAAAAAAAAuAIAAHwAAAB9AAAAAAAAAMgCAAA6AAAAfgAAACwAAAAAAAAA2AIAAH8AAACAAAAALAAAAAAAAADoAgAAgQAAAIIAAAArAAAAMAAAAAAAAAD4AgAAgwAAAIQAAAAAAAAACAMAAIUAAACGAAAAAAAAABgDAACHAAAAiAAAAAAAAAAoAwAAiQAAAIoAAAAAAAAAOAMAAIsAAACMAAAAKgAAAAAAAABIAwAAjQAAAI4AAAAAAAAAWAMAAI8AAACQAAAALwAAADEAAAAAAAAAaAMAAJEAAACSAAAALwAAACoAAAAAAAAAeAMAAJMAAACUAAAAKwAAADIAAAAzAAAA9P///3gDAACVAAAAlgAAAC8AAAA0AAAAAAAAAJgDAACXAAAAmAAAACoAAAAwAAAAAAAAAKgDAACZAAAAmgAAADEAAAAAAAAAyAMAAJsAAACcAAAAKwAAADUAAAA2AAAAAwAAAAYAAAAJAAAAYAAAABIAAABCAAAAIQAAACQAAAAwAAAASAAAAAwAAAAYAAAARQAAAFEAAABUAAAAFQAAABoAAAApAAAACwAAAA4AAAAAAAAA2AMAAJ0AAACeAAAAKwAAADUAAAA3AAAAAgAAAAEAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAQAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAABAAAAAQAAAAIAAAABAAAAAgAAAAIAAAADAAAAAQAAAAIAAAABAAAAAwAAAAIAAAACAAAAAQAAAAMAAAABAAAAAgAAAAIAAAACAAAAAQAAAAIAAAACAAAAAgAAAAEAAAADAAAAAQAAAAIAAAACAAAAAwAAAAEAAAACAAAAAQAAAAMAAAACAAAAAgAAAAEAAAACAAAAAgAAAAIAAAABAAAAAgAAAAEAAAADAAAAAgAAAAIAAAABAAAAAwAAAAEAAAACAAAAAgAAAAMAAAABAAAAAgAAAAEAAAACAAAAAQAAAAEAAAACAAAAAgAAAAMAAAACAAAAAQAAAAIAAAACAAAAAQAAAAMAAAACAAAAAQAAAAIAAAACAAAAAgAAAAMAAAABAAAAAQAAAAEAAAADAAAAAgAAAAIAAAACAAAAAQAAAAIAAAADAAAAAQAAAAIAAAACAAAAAQAAAAIAAAADAAAAAgAAAAIAAAABAAAAAgAAAAIAAAADAAAAAgAAAAEAAAABAAAAAgAAAAIAAAABAAAAAQAAAAMAAAACAAAAAgAAAAIAAAABAAAAAgAAAAMAAAABAAAAAgAAAAEAAAADAAAAAgAAAAEAAAACAAAAAgAAAAIAAAADAAAAAQAAAAEAAAACAAAAAwAAAAEAAAACAAAAAQAAAAMAAAABAAAAAwAAAAEAAAABAAAAAgAAAAIAAAACAAAAAwAAAAIAAAABAAAAAQAAAAIAAAACAAAAAwAAAAIAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAACAAAAAgAAAAEAAAACAAAAAwAAAAIAAAACAAAAAQAAAAEAAAACAAAAAwAAAAIAAAACAAAAAgAAAAEAAAABAAAAAgAAAAEAAAACAAAAAQAAAAIAAAADAAAAAgAAAAEAAAACAAAAAwAAAAIAAAABAAAAAgAAAAMAAAACAAAAAQAAAAIAAAABAAAAAQAAAAEAAAABAAAAAwAAAAIAAAADAAAAAQAAAAMAAAABAAAAAQAAAAIAAAADAAAAAQAAAAMAAAABAAAAAwAAAAIAAAABAAAAAQAAAAEAAAACAAAAAwAAAAEAAAADAAAAAQAAAAMAAAACAAAAAQAAAAEAAAADAAAAAQAAAAMAAAACAAAAAwAAAAEAAAABAAAAAgAAAAEAAAABAAAAAwAAAAEAAAADAAAAAgAAAAMAAAABAAAAAQAAAAEAAAADAAAAAgAAAAMAAAABAAAAAwAAAAEAAAABAAAAAQAAAAEAAAACAAAAAQAAAAMAAAADAAAAAQAAAAEAAAACAAAAAwAAAAMAAAABAAAAAQAAAAMAAAACAAAAAQAAAAMAAAABAAAAAQAAAAEAAAADAAAAAQAAAAIAAAADAAAAAQAAAAEAAAADAAAAAwAAAAIAAAABAAAAAQAAAAMAAAADAAAAAQAAAAIAAAABAAAAAwAAAAEAAAADAAAAAQAAAAIAAAABAAAAAgAAAAEAAAABAAAAAwAAAAMAAAABAAAAAgAAAAMAAAABAAAAAQAAAAMAAAABAAAAAgAAAAEAAAADAAAAAQAAAAEAAAADAAAAAgAAAAEAAAADAAAAAwAAAAEAAAABAAAAAgAAAAEAAAADAAAAAQAAAAMAAAABAAAAAwAAAAEAAAABAAAAAQAAAAIAAAADAAAAAwAAAAEAAAABAAAAAwAAAAIAAAABAAAAAwAAAAMAAAABAAAAAQAAAAIAAAABAAAAAwAAAAEAAAACAAAAAQAAAAEAAAADAAAAAwAAAAEAAAACAAAAAwAAAAEAAAABAAAAAwAAAAMAAAACAAAAAQAAAAEAAAABAAAAAwAAAAEAAAAEAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAABAAAAAEAAAABAAAABAAAAAMAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAAEAAAAAQAAAAEAAAABAAAABAAAAAIAAAACAAAAAQAAAAIAAAABAAAAAQAAAAIAAAAEAAAAAQAAAAIAAAABAAAABAAAAAIAAAABAAAAAQAAAAQAAAABAAAAAQAAAAIAAAACAAAAAQAAAAQAAAABAAAAAgAAAAIAAAABAAAAAQAAAAEAAAACAAAAAgAAAAEAAAAEAAAAAQAAAAEAAAACAAAABAAAAAEAAAACAAAAAQAAAAIAAAACAAAAAQAAAAEAAAAEAAAAAQAAAAIAAAACAAAABAAAAAEAAAABAAAAAQAAAAQAAAACAAAAAQAAAAEAAAACAAAAAQAAAAQAAAACAAAAAgAAAAEAAAABAAAAAgAAAAQAAAABAAAAAgAAAAEAAAABAAAAAgAAAAIAAAABAAAAAQAAAAEAAAAEAAAABAAAAAEAAAADAAAAAQAAAAEAAAABAAAAAgAAAAQAAAABAAAAAQAAAAEAAAACAAAAAQAAAAMAAAAEAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAgAAAAQAAAACAAAAAQAAAAIAAAABAAAAAQAAAAQAAAACAAAAAQAAAAIAAAABAAAAAgAAAAQAAAABAAAAAQAAAAEAAAAEAAAAAgAAAAEAAAACAAAAAQAAAAIAAAAEAAAAAQAAAAEAAAACAAAAAQAAAAIAAAAEAAAAAgAAAAEAAAABAAAABAAAAAEAAAABAAAAAgAAAAEAAAACAAAABAAAAAIAAAABAAAAAQAAAAEAAAACAAAABAAAAAIAAAABAAAAAgAAAAEAAAABAAAAAgAAAAEAAAACAAAAAQAAAAQAAAABAAAAAgAAAAEAAAAEAAAAAQAAAAIAAAABAAAABAAAAAEAAAACAAAAAQAAAAIAAAABAAAAAQAAAAEAAAABAAAAAQAAAAQAAAADAAAAAQAAAAEAAAABAAAAAwAAAAQAAAABAAAAAQAAAAMAAAABAAAAAQAAAAQAAAABAAAAAQAAAAEAAAAEAAAAAQAAAAEAAAADAAAAAQAAAAEAAAAEAAAAAwAAAAEAAAABAAAABAAAAAEAAAABAAAAAQAAAAEAAAADAAAABAAAAAEAAAABAAAAAwAAAAEAAAABAAAAAQAAAAEAAAADAAAAAQAAAAQAAAABAAAAAQAAAAEAAAAEAAAAAQAAAAMAAAABAAAAAwAAAAEAAAABAAAAAQAAAAQAAAABAAAABAAAAAEAAAABAAAAAQAAAAMAAAABAAAAAgAAAAEAAAABAAAABAAAAAEAAAACAAAAAgAAAAEAAAABAAAAAgAAAAEAAAAEAAAAAgAAAAEAAAABAAAAAgAAAAMAAAACAAAAAgAAAAMAAAADAAAAAQAAAAEAAAABAAAAAAAAAOgDAACfAAAAoAAAACsAAAA1AAAAOAAAADQAAAAhAQAAYQAAAGABAAAxAAAAMAEAAHAAAAAlAAAAJAEAAGQAAAAJAQAASQAAAEgBAAAZAAAAGAEAAFgAAAANAAAADAEAAEwAAAAcAAAAAwEAAEMAAABCAQAAEwAAABIBAABSAAAABwAAAAYBAABGAAAAFgAAAIEBAADBAAAAwAEAAJEAAACQAQAA0AAAAIUAAACEAQAAxAAAAJQAAACoAAAAogAAAIoAAAAqAAAAAAAAAPgDAAChAAAAogAAACsAAAA1AAAAOQAAABQBAABIAQAARAEAAEIBAAAoAQAAJAEAACIBAABQAQAAEgEAAAoBAACoAQAApAEAAKIBAACUAQAAkgEAAIoBAABoAQAAZAEAAGIBAAA0AQAAGgEAAFgBAABMAQAARgEAACwBAAAWAQAAtAEAALIBAACsAQAApgEAAJYBAACaAQAAbAEAAGYBAAA2AQAAOgEAAC4BAADUAQAA0gEAAMoBAABuAQAAdgEAAK4BAAAmAQAA2gEAANYBAAAyAQAAXgEAAAAAAAAIBAAAowAAAKQAAAArAAAANQAAADoAAAA7AAAAKgAAACoAAAAsAAAAMwAAAAAAAAALAAAADQAAAA4AAAATAAAAGQAAABwAAAAVAAAAFgAAABoAAAAAAAAAGAQAAKUAAACmAAAAKwAAADUAAAA6AAAAOwAAACsAAAAqAAAALAAAADQAAAAAAAAAKAQAAKcAAACoAAAAKwAAADUAAAA8AAAAAQAAAAEAAAADAAAAAwAAAAEAAAADAAAAAQAAAAEAAAABAAAAAwAAAAEAAAADAAAAAQAAAAEAAAADAAAAAwAAAAMAAAABAAAAAQAAAAEAAAABAAAAAQAAAAMAAAABAAAAAwAAAAMAAAABAAAAAwAAAAEAAAABAAAAAQAAAAMAAAADAAAAAQAAAAEAAAABAAAAAQAAAAEAAAADAAAAAwAAAAMAAAABAAAAAQAAAAMAAAABAAAAAQAAAAMAAAABAAAAAwAAAAEAAAABAAAAAQAAAAMAAAABAAAAAQAAAAEAAAABAAAAMAAAACwAAAAYAAAAFAAAABIAAAAQAAAADgAAAAwAAAAKAAAACAAAAAYAAAAAAAAAOAQAAKkAAACqAAAAKwAAADUAAAA9AAAAAAAAAEgEAACrAAAArAAAACsAAAA1AAAAPgAAAAAAAABYBAAArQAAAK4AAAArAAAANQAAACoAAAAAAAAAaAQAAFMAAACvAAAAKgAAACsAAAAAAAAAeAQAALAAAACxAAAAKwAAAD8AAABAAAAAOwAAACwAAAArAAAALAAAADUAAAAAAAAAiAQAALIAAACzAAAAKwAAADUAAAA6AAAAOwAAACoAAAAqAAAALAAAACoAAAADAAAAAgAAAAEAAAABAAAAAgAAAAIAAAACAAAAAQAAAAIAAAABAAAAAgAAAAIAAAABAAAABAAAAAEAAAABAAAAAQAAAAEAAAADAAAAAgAAAAEAAAACAAAAAwAAAAEAAAABAAAAAQAAAAEAAAAEAAAAAQAAAAMAAAABAAAAAgAAAAEAAAACAAAAAQAAAAMAAAADAAAAAQAAAAEAAAACAAAAAQAAAAEAAAACAAAAAwAAAAEAAAACAAAAAgAAAAIAAAACAAAAAgAAAAEAAAACAAAAAQAAAAEAAAAEAAAAAQAAAAIAAAADAAAAAQAAAAEAAAABAAAAAwAAAAIAAAABAAAABAAAAAEAAAABAAAAAQAAAAIAAAABAAAAAwAAAAEAAAADAAAAAQAAAAIAAAABAAAAAgAAAAEAAAABAAAAAwAAAAMAAAACAAAAAQAAAAEAAAACAAAAAgAAAAIAAAABAAAAAgAAAAEAAAACAAAAAgAAAAEAAAAEAAAAAQAAAAEAAAABAAAAAQAAAAMAAAACAAAAAQAAAAIAAAADAAAAAQAAAAEAAAABAAAAAQAAAAQAAAABAAAAAwAAAAEAAAACAAAAAQAAAAIAAAABAAAAAwAAAAMAAAABAAAAAQAAAAIAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAACYBAAAtAAAALUAAAArAAAANQAAADoAAABBAAAALQAAACoAAAAtAAAANgAAADgAAAA0AAAAMgAAADEAAAAsAAAAJgAAACMAAAAqAAAAKQAAACUAAAAHAAAACwAAAA0AAAAOAAAAEwAAABkAAAAcAAAAFQAAABYAAAAaAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAKgEAABPAAAAtgAAACsAAABCAAAA4woAAF4CAQB6AgEAngIBALwCAQDyAgEA9AIBAC4DAQBOAwEAXAMBAJYDAQCmAwEArAMBACIEAQAoBAEANgQBAEIEAQBEBAEASAQBAFAEAQBeBAEAZgQBAGwEAQB6BAEAggQBAJ4EAQCgBAEAvAQBAMYEAQDYBAEA7gQBAPIEAQD0BAEABAUBAAgFAQAQBQEAHgUBACAFAQA8BQEAQAUBAHgFAQCGBQEAjAUBAJgFAQCwBQEAvgUBAM4FAQDcBQEA4gUBAOQFAQDoBQEA9gUBAC4GAQBOBgEAXAYBAI4GAQCcBgEAuAYBAN4GAQD6BgEAFgcBACYHAQAsBwEARgcBAEwHAQBYBwEAbgcBAJIHAQCUBwEAogcBAKQHAQCoBwEAtgcBACIIAQAoCAEAQggBAEgIAQBQCAEAXggBAGYIAQBsCAEAeggBAIIIAQCECAEAkAgBAJ4IAQCgCAEAvAgBAMYIAQDMCAEA2AgBAO4IAQDyCAEA9AgBAAIJAQAICQEAHgkBACAJAQA8CQEAQAkBAHgJAQCGCQEAmAkBALAJAQC+CQEAzgkBANwJAQDiCQEA5AkBAOgJAQD2CQEACAoBABAKAQAeCgEAIAoBADwKAQBACgEAeAoBAPAKAQAGCwEADAsBABgLAQAwCwEAPgsBAGALAQB8CwEAjgsBAJwLAQC4CwEAwgsBAMQLAQDICwEA0AsBAN4LAQDmCwEA7AsBAC4MAQBODAEAXAwBAGIMAQBkDAEAaAwBAHYMAQCODAEAnAwBALgMAQDCDAEAxAwBAMgMAQDQDAEA3gwBAOYMAQDsDAEA+gwBAA4NAQAcDQEAOA0BAHANAQB+DQEAgg0BAIQNAQCIDQEAkA0BAJ4NAQCgDQEAvA0BAMYNAQDMDQEA2A0BAO4NAQDyDQEA9A0BABYOAQAmDgEALA4BAEYOAQBYDgEAbg4BAIYOAQCMDgEAmA4BALAOAQC+DgEAzg4BANwOAQAKDwEAEg8BABQPAQAiDwEAKA8BADYPAQBCDwEARA8BAEgPAQBQDwEAXg8BAGYPAQBsDwEAsg8BALQPAQAiEAEAKBABAEIQAQBIEAEAUBABAF4QAQB6EAEAghABAIQQAQCQEAEAnhABAKAQAQC8EAEAxhABAMwQAQDYEAEA7hABAPIQAQD0EAEAAhEBAB4RAQAgEQEAPBEBAEARAQB4EQEAhhEBAJgRAQCwEQEAvhEBAM4RAQDcEQEA4hEBAOQRAQDoEQEA9hEBAAgSAQAeEgEAIBIBAHgSAQDwEgEADBMBADATAQA+EwEAYBMBAHwTAQCOEwEAnBMBALgTAQDCEwEAyBMBANATAQDeEwEA5hMBAOwTAQAIFAEAEBQBAB4UAQAgFAEAPBQBAEAUAQB4FAEA8BQBAOAVAQAMFgEAGBYBADAWAQA+FgEAYBYBAHwWAQDAFgEA+BYBABwXAQA4FwEAcBcBAH4XAQCCFwEAhBcBAIgXAQCQFwEAnhcBAKAXAQC8FwEAxhcBAMwXAQDYFwEA7hcBAC4YAQA0GAEAThgBAFwYAQBiGAEAZBgBAGgYAQB2GAEAjhgBAJwYAQC4GAEAwhgBAMgYAQDQGAEA3hgBAOYYAQDsGAEA+hgBAA4ZAQAcGQEAOBkBAHAZAQB+GQEAghkBAIQZAQCQGQEAnhkBAKAZAQC8GQEAxhkBAMwZAQDYGQEA7hkBAPIZAQD0GQEADhoBABwaAQA4GgEAcBoBAH4aAQDgGgEA/BoBAAgbAQAQGwEAHhsBACAbAQA8GwEAQBsBAHgbAQCMGwEAmBsBALAbAQC+GwEAzhsBANwbAQDiGwEA5BsBAOgbAQD2GwEAFhwBACYcAQAsHAEARhwBAEwcAQBYHAEAbhwBAIYcAQCYHAEAsBwBAL4cAQDOHAEA3BwBAOIcAQDkHAEA6BwBAPYcAQAGHQEADB0BABgdAQAwHQEAPh0BAGAdAQB8HQEAjh0BAJwdAQC4HQEAxB0BAMgdAQDQHQEA3h0BAOYdAQDsHQEA+h0BAAoeAQASHgEAFB4BACIeAQAkHgEAKB4BADYeAQBCHgEARB4BAFAeAQBeHgEAZh4BAGweAQCCHgEAhB4BAIgeAQCQHgEAnh4BAKAeAQC8HgEAxh4BAMweAQDYHgEA7h4BABofAQAuHwEAMh8BADQfAQBOHwEAXB8BAGIfAQBkHwEAaB8BAHYfAQBIIAEAXiABAIIgAQCEIAEAkCABAJ4gAQCgIAEAvCABANggAQDyIAEA9CABAAghAQAeIQEAICEBADwhAQBAIQEAeCEBAIYhAQCYIQEAsCEBAL4hAQDiIQEA5CEBAOghAQD2IQEABCIBABAiAQAeIgEAICIBAHgiAQDwIgEABiMBAAwjAQAwIwEAPiMBAGAjAQB8IwEAjiMBAJwjAQC4IwEAwiMBAMgjAQDQIwEA5iMBAOwjAQAeJAEAICQBADwkAQDwJAEA4CUBABgmAQA+JgEAYCYBAHwmAQDAJgEA+CYBADgnAQBwJwEAficBAIInAQCEJwEAkCcBAJ4nAQCgJwEAvCcBAMYnAQDMJwEA2CcBAO4nAQAgKAEAPCgBAEAoAQB4KAEA8CgBAOApAQDAKwEAGCwBADAsAQA+LAEAYCwBAHwsAQDALAEA+CwBAPAtAQAcLgEAOC4BAHAuAQB+LgEA4C4BAPwuAQAELwEACC8BABAvAQAgLwEAPC8BAEAvAQB4LwEAhi8BAIwvAQCYLwEAsC8BAL4vAQDOLwEA3C8BAC4wAQBOMAEAXDABAGIwAQBoMAEAjjABAJwwAQC4MAEAwjABAMgwAQDQMAEA3jABAOwwAQD6MAEADjEBADgxAQBwMQEAfjEBAIIxAQCEMQEAkDEBAJ4xAQCgMQEAvDEBAMYxAQDMMQEA2DEBAPIxAQD0MQEADjIBABwyAQBwMgEAfjIBAOAyAQD8MgEACDMBAB4zAQAgMwEAPDMBAEAzAQB4MwEAhjMBAJgzAQCwMwEAvjMBAM4zAQDcMwEA4jMBAOQzAQDoMwEA9jMBAA40AQAcNAEAODQBAHA0AQB+NAEA4DQBAPw0AQDANQEA+DUBAAg2AQAQNgEAHjYBACA2AQA8NgEAQDYBAHg2AQDwNgEADDcBABg3AQAwNwEAPjcBAGA3AQB8NwEAnDcBALg3AQDCNwEAxDcBAMg3AQDQNwEA3jcBAOY3AQDsNwEAFjgBACY4AQAsOAEARjgBAEw4AQBYOAEAbjgBAHQ4AQCGOAEAmDgBALA4AQC+OAEAzjgBANw4AQDiOAEA5DgBAOg4AQAGOQEADDkBADA5AQA+OQEAYDkBAHw5AQCOOQEAnDkBALg5AQDIOQEA0DkBAN45AQDmOQEA7DkBAPo5AQAGOgEADDoBABg6AQAwOgEAPjoBAGA6AQB8OgEAwDoBAPg6AQAOOwEAHDsBADg7AQBwOwEAfjsBAIg7AQCQOwEAnjsBAKA7AQC8OwEAzDsBANg7AQDuOwEA8jsBAPQ7AQASPAEAFDwBACI8AQAkPAEAKDwBADY8AQBCPAEASDwBAFA8AQBePAEAZjwBAGw8AQCCPAEAhDwBAJA8AQCePAEAoDwBALw8AQDGPAEAzDwBANg8AQDuPAEAAj0BAAQ9AQAIPQEAED0BAB49AQAgPQEAPD0BAEA9AQB4PQEAhj0BAIw9AQCYPQEAsD0BAL49AQDOPQEA3D0BAOQ9AQDoPQEA9j0BABo+AQAuPgEAMj4BADQ+AQBOPgEAXD4BAGI+AQBkPgEAaD4BAHY+AQCOPgEAnD4BALg+AQDCPgEAxD4BAMg+AQDQPgEA3j4BAOY+AQDsPgEAJj8BACw/AQA6PwEARj8BAEw/AQBYPwEAbj8BAHI/AQB0PwEAgkABAJ5AAQCgQAEAvEABAARBAQAIQQEAEEEBAB5BAQAgQQEAPEEBAEBBAQB4QQEAjEEBAJhBAQCwQQEAvkEBAOJBAQDkQQEA6EEBAAhCAQAQQgEAHkIBACBCAQA8QgEAQEIBAHhCAQDwQgEABkMBAAxDAQAYQwEAMEMBAD5DAQBgQwEAfEMBAI5DAQDCQwEAxEMBAMhDAQDQQwEA5kMBAOxDAQAIRAEAEEQBAB5EAQAgRAEAPEQBAEBEAQB4RAEA8EQBAOBFAQAMRgEAGEYBADBGAQA+RgEAYEYBAHxGAQDARgEA+EYBABxHAQA4RwEAcEcBAH5HAQCCRwEAhEcBAIhHAQCQRwEAoEcBALxHAQDGRwEAzEcBANhHAQDuRwEAEEgBACBIAQA8SAEAQEgBAHhIAQDwSAEA4EkBAMBLAQAwTAEAPkwBAGBMAQB8TAEAwEwBAPhMAQDwTQEAOE4BAHBOAQB+TgEA4E4BAPxOAQAETwEACE8BABBPAQAeTwEAIE8BADxPAQBATwEAeE8BAIZPAQCMTwEAmE8BALBPAQDOTwEA3E8BACBQAQBAUAEAeFABAPBQAQDgUQEAwFMBAGBYAQB8WAEAwFgBAPhYAQDwWQEA4FsBAHBcAQB+XAEA4FwBAPxcAQDAXQEA+F0BAAheAQAQXgEAIF4BAEBeAQB4XgEA8F4BAAxfAQAYXwEAMF8BAGBfAQB8XwEAjl8BAJxfAQC4XwEATmABAFxgAQCOYAEAnGABALhgAQDCYAEAxGABAMhgAQDeYAEADmEBABxhAQA4YQEAcGEBAH5hAQCEYQEAiGEBAJBhAQCeYQEAoGEBALxhAQDGYQEAzGEBANhhAQDyYQEA9GEBAA5iAQAcYgEAOGIBAHBiAQB+YgEA4GIBAPxiAQAEYwEACGMBABBjAQAeYwEAIGMBADxjAQBAYwEAeGMBAIZjAQCMYwEAmGMBALBjAQC+YwEAzmMBANxjAQDiYwEA5GMBAOhjAQD2YwEADmQBABxkAQA4ZAEAcGQBAH5kAQDgZAEA/GQBAMBlAQD4ZQEAEGYBAB5mAQAgZgEAPGYBAEBmAQB4ZgEA8GYBABhnAQAwZwEAPmcBAGBnAQB8ZwEAjmcBAJxnAQC4ZwEAwmcBAMRnAQDIZwEA0GcBAN5nAQDmZwEA7GcBABxoAQA4aAEAcGgBAOBoAQD8aAEAwGkBAPhpAQDwawEAEGwBAB5sAQAgbAEAPGwBAEBsAQB4bAEA8GwBAOBtAQAYbgEAMG4BAD5uAQBgbgEAfG4BAMBuAQD4bgEAHG8BADhvAQBwbwEAfm8BAIRvAQCIbwEAkG8BAJ5vAQCgbwEAvG8BAMZvAQDMbwEA2G8BACZwAQAscAEARnABAExwAQBYcAEAbnABAIZwAQCMcAEAmHABALBwAQC+cAEAznABANxwAQDocAEABnEBAAxxAQAYcQEAMHEBAD5xAQBgcQEAfHEBAI5xAQCccQEAuHEBAMJxAQDEcQEAyHEBANBxAQDecQEA5nEBAOxxAQD6cQEABnIBAAxyAQAYcgEAMHIBAD5yAQBgcgEAfHIBAMByAQD4cgEADnMBABxzAQA4cwEAcHMBAH5zAQCIcwEAkHMBAJ5zAQCgcwEAvHMBAMxzAQDYcwEA7nMBAPJzAQD0cwEADHQBABh0AQAwdAEAPnQBAGB0AQB8dAEAwHQBAPh0AQDwdQEADnYBABx2AQA4dgEAcHYBAH52AQDgdgEA/HYBAAh3AQAQdwEAHncBACB3AQA8dwEAQHcBAHh3AQCYdwEAsHcBAL53AQDcdwEA4ncBAOR3AQDodwEAIngBACR4AQAoeAEANngBAEJ4AQBEeAEASHgBAFB4AQBeeAEAZngBAGx4AQCCeAEAhHgBAIh4AQCQeAEAnngBAKB4AQC8eAEAxngBAMx4AQDYeAEA7ngBAPJ4AQD0eAEAAnkBAAR5AQAIeQEAEHkBAB55AQAgeQEAPHkBAEB5AQB4eQEAhnkBAIx5AQCYeQEAsHkBAL55AQDOeQEA3HkBAOJ5AQDkeQEA6HkBAPZ5AQAEegEACHoBABB6AQAeegEAIHoBADx6AQBAegEAeHoBAPB6AQAGewEADHsBABh7AQAwewEAPnsBAGB7AQB8ewEAjnsBAJx7AQC4ewEAxHsBAMh7AQDQewEA3nsBAOZ7AQDsewEALnwBADJ8AQA0fAEATnwBAFx8AQBifAEAZHwBAGh8AQB2fAEAjnwBAJx8AQC4fAEAwnwBAMR8AQDIfAEA0HwBAN58AQDmfAEA7HwBAA59AQAcfQEAOH0BAHB9AQCCfQEAhH0BAIh9AQCQfQEAnn0BAKB9AQC8fQEAxn0BAMx9AQDYfQEA7n0BACZ+AQAsfgEAOn4BAEZ+AQBMfgEAWH4BAG5+AQByfgEAdH4BAIZ+AQCMfgEAmH4BALB+AQDOfgEA3H4BAOJ+AQDkfgEA6H4BAPZ+AQA6gQEAcoEBAHSBAQAWggEAJoIBADqCAQBMggEAWIIBAG6CAQByggEAdIIBAJiCAQC+ggEA4oIBAOSCAQDoggEA9oIBAF6DAQB6gwEAroMBANaDAQAWhAEAJoQBACyEAQA6hAEARoQBAFiEAQBuhAEAcoQBAHSEAQCGhAEAsIQBAL6EAQDOhAEA3IQBAOKEAQDkhAEA6IQBAPaEAQAGhQEADIUBABiFAQAwhQEAPoUBAGCFAQB8hQEAjoUBAJyFAQC4hQEAwoUBAMSFAQDIhQEA0IUBAN6FAQDmhQEA7IUBAPqFAQAShgEAFIYBACKGAQAohgEANoYBAEKGAQBQhgEAXoYBAHqGAQCChgEAhIYBAIiGAQCQhgEAnoYBAKCGAQC8hgEAxoYBAMyGAQDYhgEA7oYBAPKGAQD0hgEALocBAE6HAQBchwEAlocBAKaHAQCshwEA0ocBANSHAQAmiAEALIgBADqIAQBGiAEATIgBAFiIAQBuiAEAcogBAHSIAQCGiAEAmIgBALCIAQC+iAEAzogBANyIAQDiiAEA5IgBAOiIAQD2iAEADIkBADCJAQA+iQEAYIkBAHyJAQCOiQEAuIkBAMKJAQDIiQEA0IkBAN6JAQDmiQEA7IkBAPqJAQAYigEAMIoBAD6KAQBgigEAfIoBAMCKAQD4igEAHIsBADiLAQBwiwEAfosBAIKLAQCEiwEAiIsBAJCLAQCeiwEAoIsBALyLAQDGiwEAzIsBANiLAQDuiwEA8osBAPSLAQAijAEAJIwBACiMAQA2jAEAQowBAEiMAQBQjAEAXowBAGaMAQB6jAEAgowBAISMAQCQjAEAnowBAKCMAQC8jAEAzIwBAPKMAQD0jAEABI0BAAiNAQAQjQEAHo0BACCNAQA8jQEAQI0BAHiNAQCGjQEAmI0BAM6NAQDijQEA5I0BAOiNAQAujgEAMo4BADSOAQBOjgEAXI4BAGKOAQBkjgEAaI4BAI6OAQCcjgEAuI4BAMKOAQDEjgEAyI4BANCOAQD6jgEAFo8BACaPAQAsjwEARo8BAEyPAQBYjwEAbo8BAIqPAQCSjwEAlI8BAKKPAQCkjwEAqI8BALaPAQAskAEAOpABAEaQAQBMkAEAWJABAHKQAQB0kAEAhpABAJiQAQCwkAEAvpABAM6QAQDckAEA4pABAOiQAQD2kAEABpEBAAyRAQAwkQEAPpEBAGCRAQB8kQEAjpEBAJyRAQC4kQEAwpEBAMiRAQDQkQEA3pEBAOaRAQDskQEA+pEBABiSAQA+kgEAYJIBAHySAQDAkgEA+JIBADiTAQBwkwEAfpMBAIKTAQCEkwEAkJMBAJ6TAQCgkwEAvJMBAMaTAQDMkwEA2JMBAO6TAQDykwEA9JMBADCUAQA+lAEAYJQBAHyUAQDAlAEA+JQBAPCVAQA4lgEAcJYBAH6WAQDglgEA/JYBAAKXAQAElwEACJcBABCXAQAglwEAPJcBAECXAQB4lwEAhpcBAIyXAQCYlwEAsJcBAL6XAQDOlwEA3JcBAOKXAQDklwEA6JcBACKYAQAkmAEAQpgBAEiYAQBQmAEAXpgBAGaYAQB6mAEAgpgBAISYAQCQmAEAnpgBAKCYAQC8mAEAzJgBAPKYAQD0mAEAApkBAAiZAQAemQEAIJkBADyZAQBAmQEAeJkBAIaZAQCYmQEAzpkBAOKZAQDkmQEA6JkBAAiaAQAQmgEAHpoBACCaAQA8mgEAQJoBAHiaAQDwmgEAGJsBAD6bAQBgmwEAnJsBAMKbAQDEmwEAyJsBANCbAQDmmwEALpwBADScAQBOnAEAXJwBAGKcAQBknAEAaJwBAI6cAQCcnAEAuJwBAMKcAQDInAEA0JwBAOacAQD6nAEADp0BABydAQA4nQEAcJ0BAH6dAQCCnQEAhJ0BAIidAQCQnQEAoJ0BAMydAQDynQEA9J0BABaeAQAmngEALJ4BAEaeAQBMngEAWJ4BAHSeAQCGngEAjJ4BAJieAQCwngEAvp4BAM6eAQDingEA5J4BAOieAQAKnwEAEp8BABSfAQAinwEAJJ8BACifAQBCnwEARJ8BAEifAQBQnwEAXp8BAGyfAQCanwEArp8BALKfAQC0nwEARqABAEygAQByoAEAdKABAIagAQCMoAEAmKABALCgAQC+oAEA4qABAOSgAQDooAEA9qABAAahAQAMoQEAGKEBADChAQA+oQEAYKEBAHyhAQCOoQEAnKEBALihAQDCoQEAxKEBAMihAQDQoQEA3qEBAOahAQDsoQEAGKIBADCiAQA+ogEAYKIBAHyiAQDAogEA+KIBAByjAQA4owEAcKMBAH6jAQCCowEAhKMBAIijAQCQowEAnqMBAKCjAQC8owEAxqMBAMyjAQDYowEA7qMBAPKjAQD0owEAGKQBADCkAQA+pAEAYKQBAHykAQDApAEA+KQBAPClAQAcpgEAOKYBAHCmAQB+pgEA4KYBAPymAQACpwEABKcBAAinAQAQpwEAHqcBACCnAQA8pwEAQKcBAHinAQCGpwEAjKcBAJinAQCwpwEAvqcBAM6nAQDcpwEA4qcBAOSnAQDopwEAMKgBAGCoAQB8qAEAwKgBAPioAQDwqQEA4KsBAHCsAQB+rAEA4KwBAPysAQDArQEA+K0BAASuAQAIrgEAEK4BACCuAQA8rgEAQK4BAHiuAQDwrgEABq8BAAyvAQAYrwEAMK8BAD6vAQBgrwEAfK8BAI6vAQCcrwEAuK8BAMSvAQDIrwEA0K8BAN6vAQBCsAEAXrABAHqwAQCCsAEAhLABAIiwAQCQsAEAnrABAKCwAQC8sAEAzLABAPKwAQD0sAEAArEBAASxAQAIsQEAELEBAB6xAQAgsQEAPLEBAECxAQB4sQEAhrEBAJixAQDOsQEA4rEBAOSxAQDosQEABLIBAAiyAQAQsgEAHrIBACCyAQA8sgEAQLIBAHiyAQDwsgEADLMBAD6zAQBgswEAnLMBAMKzAQDEswEAyLMBANCzAQDmswEAELQBAB60AQAgtAEAPLQBAEC0AQB4tAEA8LQBAOC1AQAYtgEAYLYBAHy2AQDAtgEAOLcBAIK3AQCEtwEAiLcBAJC3AQCetwEAoLcBAMy3AQAuuAEATrgBAFy4AQCOuAEAnLgBALi4AQDCuAEAxLgBAMi4AQDQuAEA5rgBAPq4AQAOuQEAHLkBADi5AQBwuQEAfrkBAIK5AQCEuQEAiLkBAJC5AQCeuQEAoLkBAMy5AQDyuQEA9LkBAA66AQAcugEAOLoBAHC6AQB+ugEA4LoBAPy6AQAIuwEAELsBACC7AQA8uwEAQLsBAJi7AQDOuwEA4rsBAOS7AQDouwEAFrwBACa8AQAsvAEARrwBAEy8AQBYvAEAcrwBAHS8AQCGvAEAjLwBAJi8AQCwvAEAvrwBAM68AQDivAEA5LwBAOi8AQAGvQEADL0BABi9AQAwvQEAPr0BAGC9AQB8vQEAnL0BAMK9AQDEvQEAyL0BANC9AQDmvQEA+r0BABK+AQAUvgEAIr4BACS+AQAovgEAQr4BAES+AQBIvgEAUL4BAF6+AQBmvgEAgr4BAIS+AQCIvgEAkL4BAJ6+AQCgvgEAvL4BAMy+AQD0vgEAGr8BAC6/AQAyvwEANL8BAE6/AQBcvwEAYr8BAGS/AQBovwEAmsABALLAAQC0wAEAGsEBADLBAQA0wQEAYsEBAGTBAQBowQEAdsEBALrBAQAawgEAMsIBADTCAQBOwgEAXMIBAGLCAQBkwgEAaMIBAHbCAQCOwgEAwsIBAMTCAQDIwgEA0MIBAN7CAQDmwgEA7MIBAPrCAQAWwwEAJsMBADrDAQBGwwEATMMBAHLDAQB0wwEAGsQBAC7EAQAyxAEANMQBAE7EAQBcxAEAYsQBAGTEAQBoxAEAdsQBAI7EAQCcxAEAuMQBAMLEAQDIxAEA0MQBAN7EAQDmxAEA7MQBAPrEAQAcxQEAOMUBAHDFAQB+xQEAgsUBAITFAQCIxQEAkMUBAJ7FAQCgxQEAvMUBAMbFAQDMxQEA2MUBAO7FAQDyxQEA9MUBABbGAQAmxgEALMYBADrGAQBGxgEATMYBAFjGAQBuxgEAcsYBAHTGAQCGxgEAjMYBAJjGAQCwxgEAvsYBAM7GAQDcxgEA4sYBAOTGAQDoxgEAEscBABTHAQAixwEAKMcBADbHAQBCxwEARMcBAEjHAQBQxwEAXscBAGbHAQBsxwEAescBAK7HAQDWxwEA6scBABrIAQAuyAEAMsgBADTIAQBOyAEAXMgBAGLIAQBkyAEAaMgBAHbIAQCOyAEAnMgBALjIAQDCyAEAyMgBANDIAQDeyAEA5sgBAOzIAQD6yAEADskBADjJAQBwyQEAfskBAILJAQCEyQEAkMkBAJ7JAQCgyQEAvMkBAMbJAQDMyQEA2MkBAO7JAQDyyQEA9MkBADjKAQBwygEAfsoBAODKAQD8ygEAAssBAATLAQAIywEAEMsBACDLAQA8ywEAQMsBAHjLAQCGywEAjMsBAJjLAQCwywEAvssBAM7LAQDcywEA4ssBAOTLAQDoywEA9ssBABbMAQAmzAEALMwBADrMAQBGzAEAWMwBAHLMAQB0zAEAhswBALDMAQC+zAEAzswBAOLMAQDkzAEA6MwBAAbNAQAMzQEAGM0BADDNAQA+zQEAYM0BAHzNAQCczQEAws0BAMTNAQDIzQEA0M0BAN7NAQDmzQEA+s0BACLOAQAozgEAQs4BAFDOAQBezgEAZs4BAHrOAQCCzgEAhM4BAIjOAQCQzgEAns4BAKDOAQC8zgEAzM4BAPLOAQD0zgEALs8BADLPAQA0zwEATs8BAFzPAQBizwEAZM8BAGjPAQCWzwEAps8BAKzPAQDKzwEA0s8BANTPAQAu0AEAMtABADTQAQBO0AEAXNABAGLQAQBk0AEAaNABAHbQAQCO0AEAnNABALjQAQDC0AEAxNABAMjQAQDQ0AEA3tABAObQAQDs0AEA+tABABzRAQA40QEAcNEBAH7RAQCC0QEAhNEBAIjRAQCQ0QEAntEBAKDRAQC80QEAxtEBAMzRAQDY0QEA7tEBAPLRAQD00QEAHNIBADjSAQBw0gEAftIBAODSAQD80gEAAtMBAATTAQAI0wEAENMBAB7TAQAg0wEAPNMBAEDTAQB40wEAhtMBAIzTAQCY0wEAsNMBAL7TAQDO0wEA3NMBAOLTAQDk0wEA6NMBAPbTAQBw1AEAftQBAODUAQD81AEAwNUBAPjVAQAE1gEACNYBABDWAQAg1gEAQNYBAHjWAQDw1gEABtcBAAzXAQAY1wEAMNcBAD7XAQBg1wEAfNcBAI7XAQCc1wEAuNcBAMLXAQDE1wEAyNcBANDXAQDe1wEA5tcBAOzXAQAm2AEALNgBADrYAQBG2AEATNgBAFjYAQBy2AEAdNgBAIbYAQCM2AEAmNgBALDYAQC+2AEAztgBAOLYAQDk2AEA6NgBAPbYAQAM2QEAGNkBADDZAQA+2QEAYNkBAHzZAQCc2QEAwtkBAMTZAQDI2QEA0NkBAObZAQD62QEADNoBABjaAQAw2gEAPtoBAGDaAQB82gEAwNoBAPjaAQA42wEAgtsBAITbAQCI2wEAkNsBAJ7bAQCg2wEAzNsBAPLbAQD02wEAItwBAELcAQBE3AEASNwBAFDcAQBe3AEAZtwBAHrcAQCC3AEAhNwBAIjcAQCQ3AEAntwBAKDcAQC83AEAzNwBAPLcAQD03AEABN0BAAjdAQAQ3QEAHt0BACDdAQA83QEAQN0BAHjdAQCG3QEAmN0BAM7dAQDi3QEA5N0BAOjdAQAu3gEAMt4BADTeAQBO3gEAXN4BAGLeAQBk3gEAaN4BAI7eAQCc3gEAuN4BAMLeAQDE3gEAyN4BANDeAQDm3gEA+t4BABbfAQAm3wEALN8BAEbfAQBM3wEAWN8BAHLfAQB03wEAit8BAJLfAQCU3wEAot8BAKTfAQCo3wEAiuABAJLgAQCU4AEAouABAKTgAQCo4AEAtuABANrgAQAK4QEAEuEBABThAQAi4QEAJOEBACjhAQA24QEAQuEBAEThAQBI4QEAUOEBAGbhAQBs4QEAeuEBAJrhAQCy4QEAtOEBAAriAQAS4gEAFOIBACLiAQAk4gEAKOIBADbiAQBC4gEASOIBAFDiAQBe4gEAZuIBAGziAQB64gEAguIBAITiAQCI4gEAkOIBAKDiAQC84gEAxuIBAMziAQDY4gEA7uIBAPLiAQD04gEAGuMBADLjAQA04wEAXOMBAGLjAQBk4wEAaOMBALrjAQAK5AEAEuQBABTkAQAi5AEAKOQBADbkAQBC5AEASOQBAFDkAQBe5AEAZuQBAGzkAQB65AEAguQBAITkAQCQ5AEAnuQBAKDkAQC85AEAxuQBAMzkAQDY5AEA7uQBAPLkAQD05AEAAuUBAATlAQAI5QEAEOUBAB7lAQAg5QEAPOUBAEDlAQB45QEAhuUBAIzlAQCY5QEAsOUBAL7lAQDO5QEA3OUBAOLlAQDk5QEA6OUBAPblAQAa5gEALuYBADLmAQA05gEATuYBAFzmAQBi5gEAaOYBAI7mAQCc5gEAuOYBAMLmAQDE5gEAyOYBANDmAQDm5gEA+uYBABbnAQAm5wEALOcBADrnAQBG5wEATOcBAFjnAQBy5wEAdOcBAJLnAQCU5wEAoucBAKTnAQCo5wEAtucBABLoAQAU6AEAIugBACToAQAo6AEANugBAELoAQBE6AEASOgBAFDoAQBe6AEAZugBAGzoAQB66AEAgugBAIToAQCI6AEAkOgBAJ7oAQCg6AEAvOgBAMboAQDM6AEA2OgBAO7oAQDy6AEA9OgBAALpAQAE6QEACOkBABDpAQAg6QEAPOkBAEDpAQB46QEAhukBAIzpAQCY6QEAsOkBAL7pAQDO6QEA3OkBAOLpAQDk6QEA6OkBAPbpAQAE6gEACOoBABDqAQAg6gEAQOoBAHjqAQDw6gEABusBAAzrAQAY6wEAMOsBAD7rAQBg6wEAfOsBAI7rAQCc6wEAuOsBAMLrAQDE6wEAyOsBANDrAQDe6wEA5usBAOzrAQAa7AEALuwBADLsAQA07AEATuwBAFzsAQBi7AEAZOwBAGjsAQCO7AEAnOwBALjsAQDC7AEAxOwBAMjsAQDQ7AEA5uwBAPrsAQAO7QEAHO0BADjtAQBw7QEAfu0BAILtAQCE7QEAiO0BAJDtAQCe7QEAoO0BAMztAQDy7QEA9O0BABbuAQAm7gEALO4BADruAQBG7gEATO4BAFjuAQBu7gEAcu4BAHTuAQCG7gEAjO4BAJjuAQCw7gEAvu4BAM7uAQDc7gEA4u4BAOTuAQDo7gEAEu8BACLvAQAk7wEAKO8BADbvAQBC7wEARO8BAEjvAQBQ7wEAXu8BAGbvAQBs7wEAeu8BAK7vAQCy7wEAtO8BANbvAQCW8AEApvABAKzwAQC68AEAyvABANLwAQDU8AEAFvEBACbxAQAs8QEAOvEBAEbxAQBM8QEAWPEBAG7xAQBy8QEAdPEBAIrxAQCS8QEAlPEBAKLxAQCk8QEAqPEBANrxAQAW8gEAJvIBACzyAQA68gEARvIBAFjyAQBu8gEAcvIBAHTyAQCG8gEAjPIBAJjyAQCw8gEAvvIBAM7yAQDc8gEA4vIBAOTyAQDo8gEA9vIBAArzAQAS8wEAFPMBACLzAQAo8wEAQvMBAETzAQBI8wEAUPMBAF7zAQBm8wEAevMBAJrzAQCu8wEAsvMBALTzAQAW9AEAJvQBACz0AQA69AEARvQBAEz0AQBY9AEAbvQBAHL0AQB09AEAhvQBAIz0AQCY9AEAsPQBAL70AQDO9AEA3PQBAOL0AQDk9AEA6PQBAPb0AQAG9QEADPUBABj1AQAw9QEAPvUBAGD1AQB89QEAjvUBAJz1AQC49QEAwvUBAMT1AQDI9QEA0PUBAN71AQDm9QEA7PUBAPr1AQAK9gEAEvYBABT2AQAi9gEAJPYBACj2AQA29gEAQvYBAET2AQBI9gEAUPYBAF72AQBm9gEAevYBAIL2AQCE9gEAiPYBAJD2AQCe9gEAoPYBALz2AQDM9gEA8vYBAPT2AQAa9wEALvcBADL3AQA09wEATvcBAFz3AQBi9wEAZPcBAGj3AQB29wEAlvcBAKb3AQCs9wEAuvcBANL3AQDU9wEAmvgBAK74AQCy+AEAtPgBANb4AQDq+AEAGvkBAC75AQAy+QEANPkBAE75AQBc+QEAYvkBAGT5AQBo+QEAdvkBAJb5AQCm+QEArPkBALr5AQDK+QEA0vkBANT5AQAa+gEALvoBADL6AQA0+gEATvoBAFz6AQBi+gEAZPoBAGj6AQB2+gEAjvoBAJz6AQC4+gEAwvoBAMT6AQDI+gEA0PoBAN76AQDm+gEA7PoBABb7AQAm+wEALPsBADr7AQBG+wEATPsBAFj7AQBu+wEAcvsBAHT7AQCK+wEAkvsBAJT7AQCi+wEApPsBAKj7AQC2+wEA2vsBAEMKAAAbBwAAPgoAAD0KAAAVBwAAFAcAAKkKAACkCgAAowoAANsKAADWCgAA1QoAAIYDAACAAwAAjAMAAGQDAABhAwAAXQMAAFsDAADPCQAAaQMAAGcDAAD0BgAAQwMAAL0JAAA5AwAAuwkAAEoDAABFAwAATAMAAOQGAADiBgAAKwMAACoDAAApAwAAswkAACcDAACyCQAAJgMAALAJAAAvAwAALgMAAC0DAAAsAwAAtAkAADEDAAAwAwAA0QYAANAGAADOBgAA0gYAAF8KAABNCgAASwoAAEIKAABBCgAAPwoAAEQKAAAcBwAAwAoAALMKAACxCgAAqAoAAKcKAAClCgAAqgoAAOEKAADfCgAA2goAANkKAADXCgAA3AoAABMDAAANAwAA6wIAAOMCAADgAgAAbQkAAPICAADwAgAAtwYAALQCAACxAgAAqQIAAEMJAACmAgAAQQkAALwCAAC5AgAAtgIAAL8CAACYBgAAlgYAAIICAAB+AgAAJwkAAHcCAAAlCQAAcwIAACIJAACLAgAAhgIAAIMCAAApCQAAjgIAAIwCAAB0BgAAcgYAAG8GAAB2BgAAWQIAAFcCAAASCQAAVAIAABEJAABSAgAADwkAAA0JAABjAgAAYgIAAGACAABeAgAAFAkAAFsCAAATCQAAZwIAAGYCAABkAgAAUQYAAFAGAABOBgAATAYAAGgCAABTBgAAUgYAAA8KAADqCQAA6AkAAIkDAACFAwAAggMAAI0DAADNCQAAywkAAMgJAABmAwAAYwMAAGADAABcAwAA0AkAAGsDAABoAwAA9QYAALoJAAC5CQAAtwkAALUJAADUBgAARAMAAEIDAABAAwAAPgMAAL4JAAA7AwAAvAkAAEsDAABJAwAARwMAAE0DAADlBgAA4wYAAI0KAAB0CgAAcgoAAF0KAABYCgAAYAoAAEoKAABJCgAARwoAAEUKAAAdBwAATgoAAEwKAADSCgAAywoAAMkKAAC+CgAAuQoAAMEKAACwCgAArwoAAK0KAACrCgAAOAcAALQKAACyCgAA4goAAOAKAABPAgAATAIAAEACAAA5AgAANgIAAPgIAAA2BgAAGQIAABYCAAAOAgAA5AgAAAoCAADiCAAAIQIAAB4CAAAbAgAAJAIAACQGAAAiBgAA4QEAAMUIAADSAQAAwggAAM4BAAC/CAAA7AEAAOUBAADiAQAAyQgAAPABAADuAQAA/gUAAPsFAAD4BQAAAgYAAJ0BAACUCAAAlgEAAI8IAACMCAAAqQEAAKMBAACaCAAAnwEAAJcIAACwAQAArgEAAKsBAADABQAAuwUAALgFAACxAQAAxAUAAMIFAABwAQAAbwEAAHAIAABtAQAAbwgAAGoBAABtCAAAawgAAGgIAAB6AQAAeQEAAHcBAAB2CAAAdAEAAHUIAABxAQAAcggAAH8BAAB9AQAAewEAAHgIAACLBQAAigUAAIgFAACGBQAAgQEAAIMFAACAAQAAjwUAAI4FAACMBQAAkAUAAJ0JAAAiAwAAiQkAAIcJAAAWAwAAEgMAAA8DAAAaAwAAaQkAAGYJAABjCQAA7gIAAOYCAADiAgAAbgkAAPQCAADxAgAAuAYAAD8JAAA9CQAAOgkAADcJAAB/BgAAtQIAALMCAACsAgAARQkAAKgCAABCCQAAvgIAALsCAAC4AgAAwAIAAJoGAACXBgAAIQkAACAJAAAeCQAAHAkAAFgGAAAZCQAAVgYAAIACAAB9AgAAKAkAAHoCAAAmCQAAdgIAACQJAACKAgAAiAIAAIUCAAAqCQAAjwIAAI0CAAB1BgAAcwYAAHEGAAB3BgAANAoAACUKAAAjCgAACwoAAAgKAAAFCgAAEAoAAOYJAADhCQAA3gkAAPsGAADsCQAA6QkAAIsDAACIAwAAhAMAAI4DAADHCQAAxgkAAMQJAADCCQAA6AYAAL8JAADnBgAAzgkAAMwJAADKCQAAZQMAAGIDAABfAwAA0QkAAGwDAABqAwAA9gYAAKAKAACZCgAAlwoAAIkKAACGCgAAgwoAAI4KAABwCgAAbgoAAGgKAAAkBwAAdgoAAHMKAABXCgAAVgoAAFQKAABSCgAAHwcAAE8KAAAeBwAAXgoAAFwKAABaCgAAYQoAANMKAAA/BwAAzQoAAMoKAAA6BwAAOQcAAL8KAAC9CgAAuwoAAMIKAABhAQAAZAgAAFgBAABWAQAAUAEAAF4IAABMAQAAXAgAAFkBAABfBQAAXQUAADIBAABSCAAAKwEAAFAIAAAnAQAATQgAAD8BAAA6AQAANwEAAFQIAABKBQAASAUAAEUFAABMBQAABgEAAAEBAAA1CAAA/QAAADAIAAAtCAAAEgEAABEBAAALAQAAOwgAAAcBAAA4CAAAGAEAABYBAAATAQAAJAUAAB8FAAAcBQAAKAUAACYFAAAECAAAygAAAAIIAAD8BwAA+AcAANsAAAAPCAAA1AAAAAwIAADQAAAABwgAAOAAAADdAAAAEggAAOwEAADqBAAA5AQAAOcAAADgBAAA5QAAAPIEAADwBAAA7QQAAPQEAACbAAAAzgcAAJkAAADMBwAAygcAAMcHAADEBwAApQAAAKQAAADXBwAAogAAANYHAACfAAAA0wcAANAHAACsAAAAqwAAAKkAAADcBwAApgAAANoHAACiBAAAoAQAAJ4EAACbBAAArwAAAJgEAACtAAAAqAQAAKcEAAClBAAAowQAALAAAACqBAAAqQQAAAkJAAADCQAAAQkAAFACAABNAgAA9ggAAPQIAADxCAAAQgIAADwCAAA4AgAA+QgAAEQCAAA3BgAA4AgAANsIAADYCAAACwYAABoCAAAYAgAAEQIAAOYIAAANAgAA4wgAACMCAAAgAgAAHQIAACYGAAAjBgAAvQgAALsIAAC1CAAA1QUAALEIAADRBQAA3gEAAMcIAADWAQAAxAgAANEBAADBCAAA7QEAAOgBAADkAQAAyggAAPIBAADvAQAAAAYAAP0FAAD6BQAAAwYAAIsIAACKCAAAiAgAAIYIAACYBQAAgwgAAJYFAACACAAAkwUAAJ4BAACcAQAAlQgAAJkBAACTCAAAlQEAAJEIAACOCAAAqgEAAKgBAAClAQAAmwgAAKIBAACZCAAArwEAAK0BAADBBQAAvwUAAL0FAAC6BQAAsgEAAMUFAADDBQAArgkAAKgJAACmCQAAmwkAAJkJAACWCQAAngkAACMDAACFCQAAgAkAAH0JAAC+BgAAiwkAAIgJAAAYAwAAFQMAABEDAABhCQAAXwkAAFkJAACmBgAAVQkAAKMGAABrCQAAaAkAAGUJAADpAgAA5QIAAG8JAAD2AgAA8wIAALkGAAA2CQAANQkAADMJAAAxCQAAfQYAAC4JAAB8BgAAKwkAAHkGAABACQAAPgkAADwJAAA5CQAAggYAALICAACvAgAARgkAAKsCAABECQAAvQIAALoCAADBAgAAmwYAAJkGAAA7CgAAOQoAADIKAAAwCgAALQoAADUKAAAhCgAAHAoAABkKAAALBwAAJwoAACQKAAADCgAAAQoAAPsJAAAFBwAA9wkAAAMHAAANCgAACgoAAAcKAAARCgAA3QkAANwJAADaCQAA2AkAAPoGAADVCQAA+QYAANIJAAD3BgAA5wkAAOUJAADjCQAA4AkAAPwGAADtCQAA6wkAAIoDAACHAwAAjwMAAKEKAAA0BwAAmwoAAJgKAAAuBwAALAcAAIsKAACICgAAhQoAAI8KAAAjBwAAIgcAACAHAABxCgAAbwoAAG0KAABqCgAAJQcAAHcKAAB1CgAAQgcAAEEHAADUCgAAPgcAAD0HAAA7BwAAQAcAAM4KAADMCgAAjwAAAMMHAACLAAAAwgcAAIcAAACFAAAAgwAAAMAHAACAAAAAvwcAAH0AAAC9BwAAigAAAIkAAACIAAAAwQcAAG0EAABsBAAAagQAAHAAAABuAAAAtgcAAGsAAAC1BwAAaAAAALMHAACxBwAAegAAAHkAAAB3AAAAdQAAALkHAAByAAAAuAcAAHwAAABbBAAAWgQAAFgEAABWBAAAXQQAAFwEAABUAAAAUwAAAKEHAABRAAAAoAcAAE4AAACeBwAAnAcAAJkHAABeAAAAXQAAAFsAAACnBwAAWAAAAKYHAABVAAAAowcAAGMAAABhAAAAXwAAAKkHAAA+BAAAPQQAADsEAAA5BAAANgQAAGQAAABCBAAAQQQAAD8EAABDBAAAMQAAAC8AAAB9BwAALAAAAHsHAAB5BwAAdgcAAHMHAAA7AAAAhgcAADgAAACFBwAANQAAAIIHAAB/BwAAQgAAAEAAAACLBwAAPQAAAIkHAAASBAAAEAQAAA4EAABHAAAACwQAAEYAAAAIBAAARAAAABgEAAAXBAAAFQQAABMEAAAaBAAAGQQAAAwAAAAKAAAATQcAAEsHAABIBwAARQcAABUAAABYBwAAEwAAAFUHAABSBwAATwcAABwAAABgBwAAGQAAAF4HAAAWAAAAWwcAANYDAADUAwAA0QMAAM4DAAAgAAAAHgAAAN8DAADdAwAA2wMAANgDAAAiAAAA4wMAAOIDAADgAwAAZwgAAGYIAABjCAAAYggAAGAIAABkAQAAYwEAAGIBAABlCAAAWwgAAFoIAABYCAAAVggAAE8FAABXAQAAVQEAAFIBAABfCAAATwEAAF0IAABcAQAAWwEAAFoBAABgBQAAXgUAAEwIAABLCAAASQgAAEcIAAAuBQAARAgAACwFAAA2AQAANAEAADEBAABTCAAALgEAAFEIAAAqAQAATwgAAEABAAA+AQAAPAEAADkBAABVCAAAQgEAAEEBAABLBQAASQUAAEcFAABNBQAALAgAACsIAAApCAAAJwgAAPwEAAAkCAAA+gQAACEIAAD3BAAAAwEAADYIAAAAAQAANAgAAPwAAAAyCAAALwgAABABAAANAQAAPAgAAAoBAAA6CAAAGQEAABcBAAAVAQAAJQUAACMFAAAhBQAAHgUAABoBAAApBQAAJwUAAPcHAAD1BwAA8wcAAPAHAACzBAAA7QcAALAEAACtBAAAzwAAAAUIAADNAAAAAwgAAMkAAAABCAAA/gcAAPsHAADcAAAA2gAAABAIAADXAAAADggAANMAAAALCAAA5AAAAOIAAADfAAAAFQgAAOsEAADpBAAA5gQAAOgAAADjBAAA5gAAAPMEAADxBAAA7wQAAAwJAAALCQAACAkAAAcJAAAFCQAACgkAAAAJAAD/CAAA/QgAAPsIAAA5BgAABAkAAAIJAABOAgAA8AgAAO8IAADtCAAA6wgAACoGAADoCAAAKQYAAPcIAAD1CAAA8wgAAEMCAABBAgAAPgIAADsCAAD6CAAARgIAAEUCAAA4BgAA1wgAANYIAADUCAAA0ggAAAkGAADPCAAACAYAAMwIAAAFBgAA4QgAAN8IAADdCAAA2ggAAA4GAAAXAgAAFAIAAOcIAAAQAgAA5QgAACICAAAfAgAAJQIAACcGAAAlBgAAsAgAAK4IAACsCAAAzgUAAKkIAADNBQAApggAAMoFAADHBQAAvggAALwIAAC6CAAAtwgAANgFAAC0CAAA1AUAAOABAADdAQAAyAgAANkBAADGCAAA1QEAAMMIAADqAQAA5wEAAMsIAADxAQAAAQYAAP8FAAD8BQAArQkAAKwJAACqCQAArwkAAKUJAACkCQAAogkAAKAJAADCBgAAqQkAAKcJAACVCQAAlAkAAJIJAACQCQAAwQYAAI0JAADABgAAnAkAAJoJAACYCQAAnwkAACUDAAAkAwAAfAkAAHsJAAB5CQAAdwkAAL0GAAB0CQAAvAYAAHEJAAC6BgAAhgkAAIQJAACCCQAAfwkAAL8GAACMCQAAigkAABkDAAAXAwAAFAMAABsDAABUCQAAUgkAAFAJAAChBgAATQkAAKAGAABKCQAAngYAAJwGAABiCQAAYAkAAF4JAABbCQAApwYAAFgJAAClBgAAbAkAAGoJAABnCQAA7wIAAOwCAADoAgAAcAkAAPcCAAD1AgAADwcAADwKAAA6CgAADgcAAA0HAAAzCgAAMQoAAC8KAAA2CgAACgcAAAkHAAAHBwAAIgoAACAKAAAeCgAAGwoAAAwHAAAoCgAAJgoAAAIHAAABBwAA/wYAAP0GAAAECgAAAgoAAAAKAAD9CQAABgcAAPoJAAAEBwAADgoAAAwKAAAJCgAAEgoAADcHAAA2BwAAogoAADMHAAAyBwAAMAcAADUHAACcCgAAmgoAACsHAAAqBwAAKAcAACYHAAAvBwAALQcAAIwKAACKCgAAhwoAAJAKAAAZBwAAEwcAABIHAACBAwAAXgMAAPEGAAA9AwAAOgMAAEYDAADgBgAA3gYAACgDAACxCQAAzQYAAMwGAADKBgAAzwYAAEAKAAAaBwAApgoAANgKAAAOAwAA5AIAAOECAACzBgAArgIAAKcCAAC3AgAAkgYAAJAGAAB/AgAAdAIAACMJAACHAgAAhAIAAG0GAABrBgAAaAYAAHAGAABaAgAAWAIAAFUCAABTAgAAEAkAAFECAAAOCQAAYQIAAF8CAABcAgAASwYAAEoGAABIBgAARgYAAGUCAABPBgAATQYAABgJAACeAwAAnAMAAHwDAAB2AwAAgwMAAFkDAABSAwAAyQkAAPIGAAA4AwAANwMAADUDAAAzAwAAuAkAADIDAAC2CQAAQQMAAD8DAAA8AwAASAMAAOEGAADfBgAAWQoAAEgKAABGCgAAugoAAK4KAACsCgAA3goAAN0KAAA6AgAANwIAADMGAAATAgAADwIAAAsCAAAcAgAAHgYAABwGAADcAQAA0wEAAM8BAADACAAA5gEAAOMBAAD0BQAA8QUAAO4FAAD5BQAAmwEAAJMBAACQCAAAjwEAAI0IAACnAQAAoAEAALYFAACxBQAArgUAAKwBAAC8BQAAuQUAAKIIAABuAQAAawEAAG4IAABoAQAAbAgAAGUBAABpCAAAeAEAAHUBAAByAQAAcwgAAIIFAACBBQAAfwUAAH0FAAB+AQAAegUAAHwBAACJBQAAhwUAAIQFAACNBQAAfwgAAH4IAAAJAwAABgMAAAMDAAAQAwAA3AIAANUCAADSAgAAZAkAAOcCAAC0BgAApAIAAKICAACcAgAAOwkAAJkCAAA4CQAArQIAAJQGAACRBgAAcgIAAHACAABuAgAAHwkAAGwCAAAdCQAAaQIAABoJAACBAgAAewIAAIkCAABuBgAAbAYAAGoGAAAGCgAAoAMAAJ0DAADiCQAA3wkAAH4DAAB7AwAAeAMAAMUJAADDCQAAwAkAAFoDAABYAwAAVgMAAFMDAADzBgAAhAoAAGwKAABpCgAAVQoAAFMKAABQCgAAWwoAANAKAADHCgAAxQoAALgKAAC3CgAAtQoAALwKAABgAQAAZgUAAFQBAABRAQAATQEAAFsFAABZBQAAMwEAACwBAAAoAQAATggAADsBAAA4AQAAQwUAAD4FAABGBQAABQEAAAIBAAD6AAAAMQgAAPYAAAAuCAAADwEAAAwBAAAIAQAAGgUAABUFAAASBQAAFAEAACAFAAAdBQAAQwgAAMsAAAAACAAAwwAAAP0HAAC/AAAA+QcAANUAAADRAAAACAgAAN4EAADcBAAA1gQAAOEAAADSBAAA3gAAAOgEAADlBAAA4QQAAO4EAAAgCAAAHwgAAJoAAADNBwAAlgAAAMsHAACTAAAAyAcAAMUHAACjAAAAoAAAANQHAACcAAAA0QcAAJcEAACWBAAAlAQAAJIEAACPBAAAqgAAAIwEAACnAAAAoQQAAJ8EAACcBAAAmQQAAK4AAACmBAAApAQAAOkHAADoBwAA5gcAAEsCAABKAgAANAIAAC8CAAAsAgAA8ggAAD0CAAA0BgAACAIAAAYCAAAAAgAA3AgAAPwBAADZCAAAEgIAACAGAAAdBgAAzQEAAMkBAAC5CAAAwgEAALYIAAC+AQAAsggAAN8BAADXAQAA6QEAAPYFAADzBQAA8AUAAI0BAACLAQAAiQgAAIgBAACHCAAAhQEAAIQIAACBCAAAmgEAAJIIAACSAQAApgEAALcFAAC1BQAAswUAALAFAAC+BQAAlwkAAB8DAACBCQAAfgkAAAsDAAAIAwAABQMAAF0JAABaCQAAVgkAAN4CAADYAgAA1AIAAOoCAAC1BgAANAkAADIJAAAvCQAALAkAAHoGAAClAgAAowIAAKECAACeAgAAmwIAALACAACVBgAAkwYAAC4KAAAdCgAAGgoAAP8JAAD8CQAA+AkAAJ8DAADbCQAA2QkAANYJAADTCQAA+AYAAOQJAAB/AwAAfQMAAHoDAACeCgAAlQoAAJMKAACBCgAAfwoAAHwKAABnCgAAZgoAAGQKAABiCgAAIQcAAGsKAADRCgAAPAcAAMgKAADGCgAAjgAAAI0AAABzBAAAcgQAAIYAAACEAAAAgQAAAH4AAAC+BwAAaQQAAGgEAABmBAAAawQAAHEAAABvAAAAbAAAAGkAAAC0BwAAZQAAALIHAAB4AAAAdgAAAHMAAABVBAAAVAQAAFIEAABQBAAAewAAAFkEAABXBAAAUgAAAE8AAACfBwAASwAAAJ0HAABIAAAAmgcAAFwAAABZAAAAVgAAAKQHAAA1BAAANAQAADIEAAAwBAAAYgAAAC0EAABgAAAAPAQAADoEAAA3BAAAQAQAALAHAACvBwAAMAAAAC0AAAB8BwAAKgAAAHoHAAAnAAAAdwcAAHQHAAA8AAAAOQAAADYAAACDBwAAMgAAAIAHAAAHBAAABgQAAAQEAAACBAAAQwAAAP8DAABBAAAA/AMAAD4AAAARBAAADwQAAAwEAAAJBAAARQAAABYEAAAUBAAAmAcAAJcHAACVBwAACwAAAAkAAABMBwAABwAAAEkHAABGBwAAQwcAABQAAABWBwAAEAAAAFMHAAANAAAAUAcAAMoDAADIAwAAxgMAAMMDAAAdAAAAwAMAABoAAAAXAAAA1wMAANUDAADSAwAAzwMAACEAAADLAwAAHwAAAN4DAADcAwAA2QMAAHIHAABwBwAAbgcAAOEDAABfAQAAYQgAAGcFAABLAQAASgEAAEgBAABGAQAAWQgAAEMBAABXCAAAUwEAAFwFAABaBQAAJgEAACUBAAAjAQAAIQEAAEoIAAAeAQAASAgAABsBAABFCAAANQEAAC8BAAA9AQAARAUAAEIFAABABQAA9QAAAPQAAADyAAAAKggAAO8AAAAoCAAA7AAAACUIAAAiCAAABAEAADMIAAD5AAAADgEAABsFAAAZBQAAFwUAABQFAAAiBQAAvQAAAPYHAAC6AAAA9AcAALcAAADxBwAA7gcAAOoHAADOAAAAxgAAAP8HAADCAAAA2AAAAN8EAADdBAAA2wQAANgEAADjAAAA1QQAAOcEAAAGCQAA/ggAAPwIAADuCAAA7AgAAOkIAAA1AgAAMwIAADECAAAuAgAAPwIAADUGAADVCAAA0wgAANAIAADNCAAABgYAAAkCAAAHAgAABQIAAAICAADeCAAA/wEAABUCAAAhBgAAHwYAAK8IAACtCAAAqggAAKcIAADLBQAAowgAAMgFAADLAQAAyAEAAMUBAAC4CAAAwQEAANoBAADrAQAA9wUAAPUFAADyBQAAqwkAAKMJAAChCQAAkwkAAJEJAACOCQAAIQMAACADAAB6CQAAeAkAAHUJAAByCQAAuwYAAIMJAAAMAwAACgMAAAcDAABTCQAAUQkAAE4JAABLCQAAnwYAAEcJAACdBgAAXAkAAN8CAADdAgAA2gIAANcCAADtAgAAtgYAADgKAAA3CgAALAoAACsKAAApCgAAGAoAABcKAAAVCgAAEwoAAAgHAAAfCgAA9gkAAPUJAADzCQAA8QkAAAAHAADuCQAA/gYAAP4JAAChAwAAnwoAADEHAACWCgAAlAoAACkHAAAnBwAAggoAAIAKAAB+CgAAFwcAABEHAAAQBwAA7gYAANwGAADaBgAAyQYAAMgGAADGBgAAywYAABgHAACvBgAAjAYAAIoGAAB5AgAAdQIAAGYGAABkBgAAYQYAAGkGAABWAgAARQYAAEQGAABCBgAAQAYAAF0CAABJBgAARwYAABcJAAB3AwAAVQMAAO8GAAA2AwAANAMAAN0GAADbBgAAMAYAAAwCAAAYBgAAFgYAANQBAADQAQAA6gUAAOcFAADkBQAA7wUAAJgBAACUAQAAkAEAAKwFAACnBQAApAUAAKEBAACyBQAArwUAAKAIAABsAQAAaQEAAGYBAABqCAAAeQUAAHgFAAB2BQAAdAUAAHYBAABxBQAAcwEAAIAFAAB+BQAAewUAAIUFAAB9CAAAfAgAAAQDAADWAgAA0wIAALAGAACgAgAAnQIAAJoCAACqAgAAjgYAAIsGAABxAgAAbwIAAG0CAABqAgAAGwkAAHwCAAB4AgAAZwYAAGUGAABjBgAAmAMAAJYDAAB0AwAAcAMAAHkDAABRAwAAUAMAAE8DAABOAwAAwQkAAFcDAABUAwAA8AYAAFEKAAC2CgAA4woAAGQFAABOAQAAVwUAAFUFAAAtAQAAKQEAADwFAAA6BQAANwUAAD8FAAD/AAAA+wAAAPcAAAAQBQAACwUAAAgFAAAJAQAAFgUAABMFAABBCAAAzAAAAMQAAADAAAAA+gcAANAEAADOBAAAyAQAANYAAADEBAAA0gAAANoEAADXBAAA0wQAAOIEAAAdCAAAGwgAAJcAAACUAAAAyQcAAJAAAADGBwAAiwQAAIoEAACIBAAAhgQAAIMEAAChAAAAgAQAAJ0AAACVBAAAkwQAAJAEAACNBAAAqAAAAJ0EAACaBAAA5QcAAOQHAADiBwAA5wcAAEkCAAAwAgAALQIAADEGAAAEAgAA/QEAABoGAAAXBgAAygEAAL8BAACzCAAA2AEAAOwFAADpBQAA5gUAAI4BAACMAQAAiQEAAIYBAACFCAAAggEAAIIIAACXAQAArQUAAKsFAACpBQAApgUAAKQBAAC0BQAAoQgAAAEDAAD8AgAA0AIAAMgCAABXCQAA2QIAALEGAACYAgAAlwIAAJUCAACTAgAAMAkAAJACAAAtCQAAnwIAAI8GAACNBgAA+QkAAJoDAACXAwAA1wkAANQJAAB1AwAAcwMAAHEDAAB9CgAAZQoAAGMKAADPCgAAxAoAAMMKAACMAAAAcQQAAHAEAACCAAAAfwAAAGUEAABkBAAAYgQAAGcEAABtAAAAagAAAGYAAABPBAAATgQAAEwEAABKBAAAdAAAAFMEAABRBAAAvAcAAFAAAABMAAAASQAAAJsHAAAsBAAAKwQAACkEAAAnBAAAWgAAACQEAABXAAAAMwQAADEEAAAuBAAAOAQAAK4HAACtBwAALgAAACsAAAAoAAAAeAcAACQAAAB1BwAA+wMAAPoDAAD4AwAA9gMAADoAAADzAwAANwAAAPADAAAzAAAABQQAAAMEAAAABAAA/QMAAD8AAAANBAAACgQAAJQHAACTBwAAkQcAAJYHAAAIAAAASgcAAAQAAABHBwAAAQAAAEQHAAC8AwAAugMAALgDAAC1AwAAsgMAABEAAAAOAAAAyQMAAMcDAADEAwAAwQMAABsAAAC9AwAAGAAAANMDAADQAwAAzAMAAG0HAABsBwAAagcAAGgHAADaAwAAcQcAAG8HAABeAQAAXQEAAGUFAABJAQAARwEAAEQBAABYBQAAVgUAACQBAAAiAQAAHwEAABwBAABGCAAAMAEAAD0FAAA7BQAAOQUAAEEFAADzAAAA8AAAAO0AAAAmCAAA6QAAACMIAAD+AAAAEQUAAA8FAAANBQAACgUAABgFAABCCAAAvgAAALsAAAC4AAAA8gcAALQAAADvBwAAsQAAAOsHAADHAAAA0QQAAM8EAADNBAAAygQAANkAAADHBAAA2QQAAB4IAAAcCAAASAIAACsCAAAqAgAAKAIAACYCAADqCAAAMgIAADIGAAD7AQAA+gEAAPgBAAD2AQAA0QgAAPMBAADOCAAAAwIAABsGAAAZBgAAvQEAALsBAAC5AQAAqwgAALYBAACoCAAAswEAAKQIAADMAQAAxgEAANsBAADtBQAA6wUAAOgFAACPCQAAHgMAAB0DAAB2CQAAcwkAAAIDAAAAAwAA/gIAAE8JAABMCQAASAkAANECAADPAgAAzQIAAMoCAADbAgAAsgYAACoKAAAWCgAAFAoAAPQJAADyCQAA7wkAAJsDAACZAwAAnQoAAJIKAACRCgAAewoAAHoKAAB4CgAA6wYAANgGAADWBgAAxQYAAMQGAADDBgAAxwYAABYHAACrBgAAhgYAAIQGAABfBgAAXQYAAFoGAABiBgAAPwYAAD4GAAA8BgAAOgYAAEMGAABBBgAAFgkAAOwGAADZBgAA1wYAAC0GAAASBgAAEAYAAOAFAADdBQAA2gUAAOUFAACiBQAAnQUAAJoFAACRAQAAqAUAAKUFAACeCAAAcAUAAG8FAABtBQAAawUAAGgFAABnAQAAdwUAAHUFAAByBQAAfAUAAHsIAAB6CAAArAYAAIgGAACFBgAAawIAAGAGAABeBgAAXAYAAO0GAABiBQAAUwUAAFEFAAA1BQAAMAUAADgFAAAGBQAAAQUAAP4EAAD4AAAADAUAAAkFAAA/CAAAwgQAAMAEAAC6BAAAxQAAALYEAADBAAAAzAQAAMkEAADFBAAA1AQAABkIAAAXCAAAfwQAAH4EAAB8BAAAegQAAJgAAAB3BAAAlQAAAHQEAACRAAAAiQQAAIcEAACEBAAAgQQAAJ4AAACRBAAAjgQAAOEHAADgBwAA3gcAAOMHAAAuBgAA/gEAABQGAAARBgAAxAEAAMABAADiBQAA3AUAAIoBAACHAQAAgwEAAKMFAAChBQAAnwUAAJwFAACqBQAAnwgAAP0CAADMAgAAyQIAAK0GAACWAgAAlAIAAJECAACJBgAAhwYAAJQDAACSAwAAbwMAAG4DAABtAwAAcgMAAG8EAABuBAAAYQQAAGAEAABeBAAAYwQAAEkEAABIBAAARgQAAEQEAABnAAAATQQAAEsEAAC7BwAAIwQAACIEAAAgBAAAHgQAAE0AAAAbBAAASgAAACoEAAAoBAAAJQQAAC8EAACsBwAAqwcAAO8DAADuAwAA7AMAAOoDAADnAwAAKQAAAOQDAAAlAAAA+QMAAPcDAAD0AwAA8QMAADQAAAABBAAA/gMAAJAHAACPBwAAjQcAAJIHAACuAwAArAMAAKoDAACnAwAApAMAAAUAAAACAAAAuwMAALkDAAC2AwAAswMAABIAAACvAwAADwAAAMUDAADCAwAAvgMAAGcHAABmBwAAZAcAAGIHAADNAwAAawcAAGkHAABjBQAARQEAAFQFAABSBQAAIAEAAB0BAAA2BQAANAUAADIFAADxAAAA7gAAAOoAAAAHBQAABQUAAAMFAAAABQAADgUAAEAIAAC8AAAAuQAAALUAAACyAAAA7AcAAMMEAADBBAAAvwQAALwEAADIAAAAuQQAAMsEAAAaCAAAGAgAAEcCAAApAgAAJwIAAC8GAAD5AQAA9wEAAPQBAAABAgAAFQYAABMGAAC8AQAAugEAALcBAAC0AQAApQgAAMcBAADDAQAA4wUAAOEFAADeBQAAHAMAAPsCAAD6AgAA+AIAAP8CAADHAgAAxgIAAMQCAADCAgAASQkAAM4CAADLAgAArgYAAPAJAACVAwAAkwMAAHkKAABbBgAAPQYAADsGAAAVCQAA6QYAANUGAADTBgAA2wUAAJ4FAACbBQAAnAgAAG4FAABsBQAAaQUAAHMFAAB5CAAAdwgAAKgGAACBBgAAfgYAAFkGAABXBgAAVAYAAOoGAAAxBQAAAgUAAP8EAAA9CAAAvgQAALcEAADGBAAAFAgAABEIAAB9BAAAewQAAHgEAAB1BAAAkgAAAIUEAACCBAAA3QcAANsHAADYBwAA3wcAACsGAAANBgAACgYAANcFAADPBQAAmQUAAJcFAACUBQAAkQUAAIQBAACgBQAAnQgAAKkGAACSAgAAgwYAAIAGAABfBAAARwQAAEUEAAC6BwAAIQQAAB8EAAAcBAAAJgQAAKoHAACoBwAA7QMAAOsDAADoAwAA5QMAACYAAAD1AwAA8gMAAIwHAACKBwAAhwcAAI4HAACtAwAAqwMAAKgDAAClAwAABgAAAKIDAAADAAAAtwMAALQDAACwAwAAYQcAAF8HAABcBwAAWQcAAL8DAABlBwAAYwcAACMAAABhBQAAUAUAAE4FAAAvBQAALQUAACoFAAAzBQAA/QQAAPsEAAD4BAAA9QQAAOsAAAAEBQAAPggAALUEAAC0BAAAsQQAAK4EAAC2AAAAqwQAALMAAAC9BAAAFggAABMIAAAsBgAA9QEAAA8GAAAMBgAAuAEAALUBAADZBQAA1gUAANIFAADfBQAA+QIAAMUCAADDAgAAqgYAAJEDAACQAwAAlggAAGoFAAB0CAAAcQgAAFUGAADmBgAANwgAALgEAAAKCAAABggAAHkEAAB2BAAA1QcAANIHAADPBwAA2QcAANAFAACVBQAAkgUAAJgIAACiBgAAewYAAHgGAAC3BwAAHQQAAKUHAACiBwAA6QMAAOYDAACEBwAAgQcAAH4HAACIBwAAqQMAAKYDAACjAwAAVwcAAFQHAABRBwAATgcAALEDAABdBwAAWgcAACsFAAD5BAAA9gQAADkIAACyBAAArwQAAKwEAAC7BAAADQgAAAkIAAAoBgAABwYAAAQGAADMBQAAyQUAAMYFAADTBQAApAYAAAAAAAC4BAAAtwAAALgAAAAAAAAAyAQAALkAAAC6AAAAAAAAANgEAAC7AAAAvAAAAAAAAADoBAAALgAAAL0AAAAAAAAA+AQAAL4AAAC/AAAACAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAMAAAADAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAACAAAAAcAAAABAAAAAQAAAAMAAAABAAAAAQAAAAEAAAACAAAAAQAAAAEAAAACAAAAAQAAAAEAAAABAAAAAwAAAAEAAAABAAAABwAAADTmAAAg5gAAXOYAAEjmAAASVAAAAAAAACVRAAABAAAAfF4AAAIAAABLWwAAAwAAAPlFAAAEAAAAzkAAAAUAAACXTwAABgAAAKBKAAAHAAAAxHcAAAgAAADzcgAACQAAAKp9AAAKAAAAnXgAAAsAAAAvZgAADAAAABhjAAANAAAAQWwAAA4AAAB2aQAADwAAAIkWAAAQAAAAvhMAABEAAADnHAAAEgAAANAZAAATAAAAYgcAABQAAABVAgAAFQAAAAwNAAAWAAAAOwgAABcAAABfNQAAGAAAAGgwAAAZAAAAMT8AABoAAAAGOgAAGwAAALQkAAAcAAAAgyEAAB0AAADaLgAAHgAAAO0rAAAfAAAAAAAAAAEAAAABAAAAAgAAAAEAAAACAAAAAgAAAAMAAAABAAAAAgAAAAIAAAADAAAAAgAAAAMAAAADAAAABAAAAAAAAAAYBQAALgAAAMAAAAAAAAAAKAUAAMEAAADCAAAAKwAAADIAAACUfAAAvIUAAJmaAADTpAAA9rsAAGLHAABH2AAADeYAACj5AAB4CwEAXRQBABcqAQAyNQEApkkBAINWAQDJaAEA7HcBAMSOAQDhkQEAq68BAI6wAQAazAEAP9MBAHXtAQBQ8gEA1QkCAPAWAgC6KAIAnzcCAAtLAgAuVAIAZGoCAEF1AgBpjAIAAAAAADgFAADDAAAAxAAAAAAAAABIBQAAxQAAAMYAAAAAAAAAWAUAAMcAAADIAAAAAAAAAGgFAADJAAAAygAAACoAAAAAAAAAeAUAAMkAAADLAAAALQAAAAAAAACIBQAAyQAAAMwAAAAuAAAAAAAAAJgFAADJAAAAzQAAAC8AAAAAAAAAqAUAAMkAAADOAAAAMAAAAAAAAAC4BQAAyQAAAM8AAAAxAAAAAAAAAMgFAADJAAAA0AAAADIAAAAAAAAA2AUAAMkAAADRAAAAMwAAAAAAAADoBQAAyQAAANIAAAA0AAAAAAAAAPgFAADTAAAA1AAAAAAAAAAIBgAAUwAAANUAAAAqAAAAKwAAAAAAAAAYBgAA1gAAANcAAAAAAAAAKAYAANgAAADZAAAAKgAAAAAAAAA4BgAAUwAAANoAAAAqAAAAKwAAAAAAAABIBgAA2wAAANwAAACwhAAAFAAAAEMuVVRGLTgAAAAAAAAAAAAAAAAA3hIElQAAAAD///////////////+UhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAADAAwAAwAQAAMAFAADABgAAwAcAAMAIAADACQAAwAoAAMALAADADAAAwA0AAMAOAADADwAAwBAAAMARAADAEgAAwBMAAMAUAADAFQAAwBYAAMAXAADAGAAAwBkAAMAaAADAGwAAwBwAAMAdAADAHgAAwB8AAMAAAACzAQAAwwIAAMMDAADDBAAAwwUAAMMGAADDBwAAwwgAAMMJAADDCgAAwwsAAMMMAADDDQAA0w4AAMMPAADDAAAMuwEADMMCAAzDAwAMwwQADNOshQAABQAAAAAAAAAAAAAANwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANQAAADYAAAB98QAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAA//////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlOkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8KEAAKCJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACQAAAAlAAAAJgAAACcAAAAoAAAAKQAAACoAAAArAAAALAAAAC0AAAAuAAAALwAAADAAAAAxAAAAMgAAADMAAAA0AAAANQAAADYAAAA3AAAAOAAAADkAAAA6AAAAOwAAADwAAAA9AAAAPgAAAD8AAABAAAAAYQAAAGIAAABjAAAAZAAAAGUAAABmAAAAZwAAAGgAAABpAAAAagAAAGsAAABsAAAAbQAAAG4AAABvAAAAcAAAAHEAAAByAAAAcwAAAHQAAAB1AAAAdgAAAHcAAAB4AAAAeQAAAHoAAABbAAAAXAAAAF0AAABeAAAAXwAAAGAAAABhAAAAYgAAAGMAAABkAAAAZQAAAGYAAABnAAAAaAAAAGkAAABqAAAAawAAAGwAAABtAAAAbgAAAG8AAABwAAAAcQAAAHIAAABzAAAAdAAAAHUAAAB2AAAAdwAAAHgAAAB5AAAAegAAAHsAAAB8AAAAfQAAAH4AAAB/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACkjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAACAAAAAhAAAAIgAAACMAAAAkAAAAJQAAACYAAAAnAAAAKAAAACkAAAAqAAAAKwAAACwAAAAtAAAALgAAAC8AAAAwAAAAMQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAAAA5AAAAOgAAADsAAAA8AAAAPQAAAD4AAAA/AAAAQAAAAEEAAABCAAAAQwAAAEQAAABFAAAARgAAAEcAAABIAAAASQAAAEoAAABLAAAATAAAAE0AAABOAAAATwAAAFAAAABRAAAAUgAAAFMAAABUAAAAVQAAAFYAAABXAAAAWAAAAFkAAABaAAAAWwAAAFwAAABdAAAAXgAAAF8AAABgAAAAQQAAAEIAAABDAAAARAAAAEUAAABGAAAARwAAAEgAAABJAAAASgAAAEsAAABMAAAATQAAAE4AAABPAAAAUAAAAFEAAABSAAAAUwAAAFQAAABVAAAAVgAAAFcAAABYAAAAWQAAAFoAAAB7AAAAfAAAAH0AAAB+AAAAfwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAGQAAADoAwAAECcAAKCGAQBAQg8AgJaYAADh9QVfcIkA/wkvDwAAAAAgBwAA3QAAAN4AAAAAAAAAKAcAAN8AAADgAAAAMAAAACoAAAAtAAAAQwAAAC8AAAAwAAAAKwAAADgAAAAyAAAALgAAACwAAAAvAAAABAAAAAAAAAAwBwAAQwAAAEQAAAD8/////P///zAHAABFAAAARgAAACiUAAA8lAAAAAAAAEgHAADhAAAA4gAAADkAAAAyAAAAOAAAADkAAAAzAAAAAAAAAFgHAADjAAAA5AAAADoAAABUlAAAAAAAAGgHAADlAAAA5gAAAOcAAAAqAAAARAAAADoAAAAAAAAAiAcAAOgAAADpAAAA5wAAACsAAABFAAAAOwAAAAAAAACYBwAA6gAAAOsAAADnAAAAKgAAACsAAAAsAAAALQAAAC4AAAAvAAAAMAAAADEAAAAyAAAAMwAAADQAAAAAAAAA2AcAAOwAAADtAAAA5wAAADUAAAA2AAAANwAAADgAAAA5AAAAOgAAADsAAAA8AAAAPQAAAD4AAAA/AAAAAAAAABAIAADuAAAA7wAAAOcAAAAsAAAALQAAAEAAAAAuAAAAQQAAACoAAAArAAAALwAAAAAAAABQCAAA8AAAAPEAAADnAAAAMAAAADEAAABCAAAAMgAAAEMAAAAsAAAALQAAADMAAAAAAAAAiAgAAPIAAADzAAAA5wAAADsAAABEAAAARQAAAEYAAABHAAAASAAAACoAAAD4////iAgAADwAAAA9AAAAPgAAAD8AAABAAAAAQQAAAEIAAAAAAAAAwAgAAPQAAAD1AAAA5wAAAEMAAABJAAAASgAAAEsAAABMAAAATQAAACsAAAD4////wAgAAEQAAABFAAAARgAAAEcAAABIAAAASQAAAEoAAAAlAAAASAAAADoAAAAlAAAATQAAADoAAAAlAAAAUwAAAAAAAAAlAAAAbQAAAC8AAAAlAAAAZAAAAC8AAAAlAAAAeQAAAAAAAAAlAAAASQAAADoAAAAlAAAATQAAADoAAAAlAAAAUwAAACAAAAAlAAAAcAAAAAAAAAAlAAAAYQAAACAAAAAlAAAAYgAAACAAAAAlAAAAZAAAACAAAAAlAAAASAAAADoAAAAlAAAATQAAADoAAAAlAAAAUwAAACAAAAAlAAAAWQAAAAAAAABBAAAATQAAAAAAAABQAAAATQAAAAAAAABKAAAAYQAAAG4AAAB1AAAAYQAAAHIAAAB5AAAAAAAAAEYAAABlAAAAYgAAAHIAAAB1AAAAYQAAAHIAAAB5AAAAAAAAAE0AAABhAAAAcgAAAGMAAABoAAAAAAAAAEEAAABwAAAAcgAAAGkAAABsAAAAAAAAAE0AAABhAAAAeQAAAAAAAABKAAAAdQAAAG4AAABlAAAAAAAAAEoAAAB1AAAAbAAAAHkAAAAAAAAAQQAAAHUAAABnAAAAdQAAAHMAAAB0AAAAAAAAAFMAAABlAAAAcAAAAHQAAABlAAAAbQAAAGIAAABlAAAAcgAAAAAAAABPAAAAYwAAAHQAAABvAAAAYgAAAGUAAAByAAAAAAAAAE4AAABvAAAAdgAAAGUAAABtAAAAYgAAAGUAAAByAAAAAAAAAEQAAABlAAAAYwAAAGUAAABtAAAAYgAAAGUAAAByAAAAAAAAAEoAAABhAAAAbgAAAAAAAABGAAAAZQAAAGIAAAAAAAAATQAAAGEAAAByAAAAAAAAAEEAAABwAAAAcgAAAAAAAABKAAAAdQAAAG4AAAAAAAAASgAAAHUAAABsAAAAAAAAAEEAAAB1AAAAZwAAAAAAAABTAAAAZQAAAHAAAAAAAAAATwAAAGMAAAB0AAAAAAAAAE4AAABvAAAAdgAAAAAAAABEAAAAZQAAAGMAAAAAAAAAUwAAAHUAAABuAAAAZAAAAGEAAAB5AAAAAAAAAE0AAABvAAAAbgAAAGQAAABhAAAAeQAAAAAAAABUAAAAdQAAAGUAAABzAAAAZAAAAGEAAAB5AAAAAAAAAFcAAABlAAAAZAAAAG4AAABlAAAAcwAAAGQAAABhAAAAeQAAAAAAAABUAAAAaAAAAHUAAAByAAAAcwAAAGQAAABhAAAAeQAAAAAAAABGAAAAcgAAAGkAAABkAAAAYQAAAHkAAAAAAAAAUwAAAGEAAAB0AAAAdQAAAHIAAABkAAAAYQAAAHkAAAAAAAAAUwAAAHUAAABuAAAAAAAAAE0AAABvAAAAbgAAAAAAAABUAAAAdQAAAGUAAAAAAAAAVwAAAGUAAABkAAAAAAAAAFQAAABoAAAAdQAAAAAAAABGAAAAcgAAAGkAAAAAAAAAUwAAAGEAAAB0AAAAAAAAACUAAABtAAAALwAAACUAAABkAAAALwAAACUAAAB5AAAAJQAAAFkAAAAtAAAAJQAAAG0AAAAtAAAAJQAAAGQAAAAlAAAASQAAADoAAAAlAAAATQAAADoAAAAlAAAAUwAAACAAAAAlAAAAcAAAACUAAABIAAAAOgAAACUAAABNAAAAJQAAAEgAAAA6AAAAJQAAAE0AAAA6AAAAJQAAAFMAAAAlAAAASAAAADoAAAAlAAAATQAAADoAAAAlAAAAUwAAAAAAAADwCAAA9gAAAPcAAADnAAAAKgAAAAAAAAAYCQAA+AAAAPkAAADnAAAAKwAAAAAAAAA4CQAA+gAAAPsAAADnAAAASwAAAEwAAAAzAAAANAAAADUAAAA2AAAATQAAADcAAAA4AAAAAAAAAGAJAAD8AAAA/QAAAOcAAABOAAAATwAAADkAAAA6AAAAOwAAADwAAABQAAAAPQAAAD4AAAAAAAAAgAkAAP4AAAD/AAAA5wAAAFEAAABSAAAAPwAAAEAAAABBAAAAQgAAAFMAAABDAAAARAAAAAAAAACgCQAAAAEAAAEBAADnAAAAVAAAAFUAAABFAAAARgAAAEcAAABIAAAAVgAAAEkAAABKAAAAAAAAAMAJAAACAQAAAwEAAOcAAAAsAAAALQAAAAAAAADoCQAABAEAAAUBAADnAAAALgAAAC8AAAAAAAAAEAoAAAYBAAAHAQAA5wAAACoAAABOAAAAAAAAADgKAAAIAQAACQEAAOcAAAArAAAATwAAAAAAAABgCgAACgEAAAsBAADnAAAAPAAAAC4AAABLAAAAAAAAAIgKAAAMAQAADQEAAOcAAAA9AAAALwAAAEwAAAAAAAAA4AoAAA4BAAAPAQAA5wAAACwAAAAtAAAANAAAAFcAAABYAAAANQAAAFkAAAAAAAAAqAoAAA4BAAAQAQAA5wAAACwAAAAtAAAANAAAAFcAAABYAAAANQAAAFkAAAAAAAAAEAsAABEBAAASAQAA5wAAAC4AAAAvAAAANgAAAFoAAABbAAAANwAAAFwAAAAAAAAAUAsAABMBAAAUAQAA5wAAAAAAAABgCwAAFQEAABYBAADnAAAAMAAAAD4AAAAxAAAAPwAAADIAAAAuAAAAQAAAADgAAAAAAAAAqAsAABcBAAAYAQAA5wAAAF0AAABeAAAATQAAAE4AAABPAAAAAAAAALgLAAAZAQAAGgEAAOcAAABfAAAAYAAAAFAAAABRAAAAUgAAAGYAAABhAAAAbAAAAHMAAABlAAAAAAAAAHQAAAByAAAAdQAAAGUAAAAAAAAAAAAAAHgHAAAOAQAAGwEAAOcAAAAAAAAAiAsAAA4BAAAcAQAA5wAAAEEAAAAvAAAAMAAAADEAAAAzAAAAQgAAADQAAABDAAAANQAAADIAAABEAAAAOQAAAAAAAADwCgAADgEAAB0BAADnAAAAMAAAADEAAAA6AAAAYQAAAGIAAAA7AAAAYwAAAAAAAAAwCwAADgEAAB4BAADnAAAAMgAAADMAAAA8AAAAZAAAAGUAAAA9AAAAZgAAAAAAAAC4CgAADgEAAB8BAADnAAAALAAAAC0AAAA0AAAAVwAAAFgAAAA1AAAAWQAAAAAAAAC4CAAAPAAAAD0AAAA+AAAAPwAAAEAAAABBAAAAQgAAAAAAAADoCAAARAAAAEUAAABGAAAARwAAAEgAAABJAAAASgAAAAAAAADoCwAAIAEAACEBAAA6AAAAKwAAAAAAAAAADAAAIgEAACMBAAAkAQAAJQEAAEUAAAAwAAAALAAAAEYAAAAAAAAAKAwAACIBAAAmAQAAJAEAACUBAABFAAAAMQAAAC0AAABHAAAAAAAAADgMAAAnAQAAKAEAAGcAAAAAAAAA+AsAACkBAAAqAQAAaAAAAAAAAABIDAAAKwEAACwBAABpAAAAAAAAAFgMAAAtAQAALgEAADoAAAAAAAAAaAwAACsBAAAvAQAAaQAAAAAAAAB4DAAAKwEAADABAABpAAAAAAAAAIgMAAAxAQAAMgEAAGoAAAAAAAAAuAwAACIBAAAzAQAAJAEAACUBAABGAAAAAAAAAKgMAAAiAQAANAEAACQBAAAlAQAARwAAAAAAAABIDQAAIgEAADUBAAAkAQAAJQEAAEUAAAAyAAAALgAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgACAAIAAgACAAIAAgACAAIAAyACIAIgAiACIAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAFgBMAEwATABMAEwATABMAEwATABMAEwATABMAEwATACNgI2AjYCNgI2AjYCNgI2AjYCNgEwATABMAEwATABMAEwAjVCNUI1QjVCNUI1QjFCMUIxQjFCMUIxQjFCMUIxQjFCMUIxQjFCMUIxQjFCMUIxQjFCMUEwATABMAEwATABMAI1gjWCNYI1gjWCNYIxgjGCMYIxgjGCMYIxgjGCMYIxgjGCMYIxgjGCMYIxgjGCMYIxgjGBMAEwATABMACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABONXp4aW5nMTVSZWFkZXJFeGNlcHRpb25FAE41enhpbmc5RXhjZXB0aW9uRQAxN0ltYWdlUmVhZGVyU291cmNlAE41enhpbmc4QXJyYXlSZWZJY0VFAE41enhpbmc3Q291bnRlZEUATjV6eGluZzVBcnJheUljRUUATjV6eGluZzhBcnJheVJlZklOU18zUmVmSU5TXzExUmVzdWx0UG9pbnRFRUVFRQBONXp4aW5nOUJpbmFyaXplckUATjV6eGluZzEyQmluYXJ5Qml0bWFwRQBONXp4aW5nMTdDaGVja3N1bUV4Y2VwdGlvbkUAVW5yZWNvZ25pemQgYmFyY29kZSBmb3JtYXQATjV6eGluZzE1Rm9ybWF0RXhjZXB0aW9uRQBONXp4aW5nMjNJbnZlcnRlZEx1bWluYW5jZVNvdXJjZUUAVGhpcyBsdW1pbmFuY2Ugc291cmNlIGRvZXMgbm90IHN1cHBvcnQgcm90YXRpb24uAFRoaXMgbHVtaW5hbmNlIHNvdXJjZSBkb2VzIG5vdCBzdXBwb3J0IGNyb3BwaW5nLgBONXp4aW5nMTVMdW1pbmFuY2VTb3VyY2VFAE5TdDNfXzIxNWJhc2ljX3N0cmluZ2J1ZkljTlNfMTFjaGFyX3RyYWl0c0ljRUVOU185YWxsb2NhdG9ySWNFRUVFAE5TdDNfXzIxOWJhc2ljX29zdHJpbmdzdHJlYW1JY05TXzExY2hhcl90cmFpdHNJY0VFTlNfOWFsbG9jYXRvckljRUVFRQBONXp4aW5nMTdNdWx0aUZvcm1hdFJlYWRlckUATjV6eGluZzZSZWFkZXJFAE41enhpbmc2UmVzdWx0RQBONXp4aW5nMTFSZXN1bHRQb2ludEUATjV6eGluZzE0RGV0ZWN0b3JSZXN1bHRFAE41enhpbmc1YXp0ZWMxOUF6dGVjRGV0ZWN0b3JSZXN1bHRFAE41enhpbmc1YXp0ZWM4RGV0ZWN0b3JFAE41enhpbmc1YXp0ZWM3RGVjb2RlckUATjV6eGluZzVhenRlYzExQXp0ZWNSZWFkZXJFAENUUkxfUFMAIAAxADIAMwA0ADUANgA3ADgAOQBDVFJMX1VMAENUUkxfVVMADQANCgAuIAAsIAAhACIAIwAkACUAJgAnACgAKQAqACsALwA6ADsAPAA9AD4APwBbAF0AewB9AAEAAgADAAQABQAGAAcACAAJAAoACwAMABsAHAAdAB4AHwBAAFwAXgBfAGAAfAB+AH8AQ1RSTF9MTABDVFJMX1BMAENUUkxfQlMAYQBiAGMAZABlAGYAZwBoAGkAagBrAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAegBDVFJMX01MAENUUkxfREwAQQBCAEQARQBGAEcASQBKAEsATgBPAFAAUgBTAFQAVQBWAFcAWABZAFoAaW52YWxpZCBpbnB1dCBkYXRhAENUUkxfAHJzIGRlY29kaW5nIGZhaWxlZABiaXQgd2FzIG5vdCBpbnZlcnRlZABONXp4aW5nOEFycmF5UmVmSWlFRQBONXp4aW5nNUFycmF5SWlFRQBkYXRhIGlzIHRvbyBsb25nAG1hdHJpeCBleHRlbmRzIG92ZXIgaW1hZ2UgYm91bmRzAE41enhpbmc1QXJyYXlJTlNfM1JlZklOU18xMVJlc3VsdFBvaW50RUVFRUUAY291bGQgbm90IGRldGVybWluZSBvcmllbnRhdGlvbgBmYWlsZWQgdG8gZGVjb2RlIHBhcmFtZXRlciBkYXRhAGVuY291bnRlcmVkIHdyb25nIGJ1bGxzZXllIHJpbmcgY291bnQAYnVsbHNleWUgZXh0ZW5kcyBvdmVyIGltYWdlIGJvdW5kcwBONXp4aW5nNWF6dGVjNVBvaW50RQBONXp4aW5nMjJXaGl0ZVJlY3RhbmdsZURldGVjdG9yRQBONXp4aW5nMTdOb3RGb3VuZEV4Y2VwdGlvbkUATjV6eGluZzhCaXRBcnJheUUATjV6eGluZzlCaXRNYXRyaXhFAEJvdGggZGltZW5zaW9ucyBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAwAExlZnQgYW5kIHRvcCBtdXN0IGJlIG5vbm5lZ2F0aXZlAEhlaWdodCBhbmQgd2lkdGggbXVzdCBiZSBhdCBsZWFzdCAxAFRoZSByZWdpb24gbXVzdCBmaXQgaW5zaWRlIHRoZSBtYXRyaXgARVVDX0tSAEVVQy1LUgBHQjE4MDMwAEdCMjMxMgBFVUNfQ04AR0JLAEJpZzUAVVMtQVNDSUkAVVRGOABVbmljb2RlQmlnVW5tYXJrZWQAVVRGLTE2QkUAVW5pY29kZUJpZwBDcDEyNTYAd2luZG93cy0xMjU2AENwMTI1MgB3aW5kb3dzLTEyNTIAQ3AxMjUxAHdpbmRvd3MtMTI1MQBDcDEyNTAAd2luZG93cy0xMjUwAFNKSVMAU2hpZnRfSklTAElTTzg4NTlfMTYASVNPLTg4NTktMTYASVNPODg1OV8xNQBJU08tODg1OS0xNQBJU084ODU5XzE0AElTTy04ODU5LTE0AElTTzg4NTlfMTMASVNPLTg4NTktMTMASVNPODg1OV8xMQBJU08tODg1OS0xMQBJU084ODU5XzEwAElTTy04ODU5LTEwAElTTzg4NTlfOQBJU08tODg1OS05AElTTzg4NTlfOABJU08tODg1OS04AElTTzg4NTlfNwBJU08tODg1OS03AElTTzg4NTlfNgBJU08tODg1OS02AElTTzg4NTlfNQBJU08tODg1OS01AElTTzg4NTlfNABJU08tODg1OS00AElTTzg4NTlfMwBJU08tODg1OS0zAElTTzg4NTlfMgBJU08tODg1OS0yAElTTzg4NTlfMQBJU08tODg1OS0xAE41enhpbmc2Y29tbW9uMTVDaGFyYWN0ZXJTZXRFQ0lFAENwNDM3AE41enhpbmc4QXJyYXlSZWZJTlMwX0ljRUVFRQBONXp4aW5nMTNEZWNvZGVyUmVzdWx0RQBONXp4aW5nMjRHbG9iYWxIaXN0b2dyYW1CaW5hcml6ZXJFAFRyYW5zZm9ybWVkIHBvaW50IG91dCBvZiBib3VuZHMgYXQgACwATjV6eGluZzE1SHlicmlkQmluYXJpemVyRQBONXp4aW5nMjRJbGxlZ2FsQXJndW1lbnRFeGNlcHRpb25FAE41enhpbmcyMFBlcnNwZWN0aXZlVHJhbnNmb3JtRQBONXp4aW5nNlN0cmluZ0UAVVRGLTgAQVNDSUkAU0hJRlRfSklTAElTTzg4NTktMQBJbnZhbGlkIGRpbWVuc2lvbnMgV2hpdGVSZWN0YW5nbGVEZXRlY3RvcgB6ID09IE5VTEwAdCA9PSBOVUxMAHggPT0gTlVMTAB5ID09IE5VTEwATm8gYmxhY2sgcG9pbnQgZm91bmQgb24gYm9yZGVyAE41enhpbmc5R2VuZXJpY0dGRQBEZWdyZWUgbXVzdCBiZSBub24tbmVnYXRpdmUAY2Fubm90IGdpdmUgbG9nKDApAENhbm5vdCBjYWxjdWxhdGUgdGhlIGludmVyc2Ugb2YgMABuZWVkIGNvZWZmaWNpZW50cwBONXp4aW5nMTNHZW5lcmljR0ZQb2x5RQBHZW5lcmljR0ZQb2x5cyBkbyBub3QgaGF2ZSBzYW1lIEdlbmVyaWNHRiBmaWVsZABkZWdyZWUgbXVzdCBub3QgYmUgbGVzcyB0aGVuIDAAQmFkIGVycm9yIGxvY2F0aW9uAEVycm9yIGxvY2F0b3IgZGVncmVlIGRvZXMgbm90IG1hdGNoIG51bWJlciBvZiByb290cwByX3tpLTF9IHdhcyB6ZXJvAERpdmlzaW9uIGFsZ29yaXRobSBmYWlsZWQgdG8gcmVkdWNlIHBvbHlub21pYWw/AHNpZ21hVGlsZGUoMCkgd2FzIHplcm8ATjV6eGluZzIxSWxsZWdhbFN0YXRlRXhjZXB0aW9uRQBONXp4aW5nMjBSZWVkU29sb21vbkV4Y2VwdGlvbkUATjV6eGluZzEwZGF0YW1hdHJpeDE2RGF0YU1hdHJpeFJlYWRlckUATjV6eGluZzEwZGF0YW1hdHJpeDdWZXJzaW9uRQBOdW1iZXIgb2Ygcm93cyBhbmQgY29sdW1ucyBtdXN0IGJlIGV2ZW4ARXJyb3IgdmVyc2lvbiBub3QgZm91bmQARGltZW5zaW9uIG11c3QgYmUgZXZlbiwgPiA4IDwgMTQ0AERpbWVuc2lvbiBvZiBiaXRNYXRyaXggbXVzdCBtYXRjaCB0aGUgdmVyc2lvbiBzaXplAENvdWxkbid0IGRlY29kZSB2ZXJzaW9uAE41enhpbmcxMGRhdGFtYXRyaXgxNUJpdE1hdHJpeFBhcnNlckUATjV6eGluZzEwZGF0YW1hdHJpeDlEYXRhQmxvY2tFACoqKiAwMTIzNDU2Nzg5QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVohIiMkJSYnKCkqKywtLi86Ozw9Pj9AW1xdXl8qKiogMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6J0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlae3x9fn9VbnN1cHBvcnRlZCBtb2RlIGluZGljYXRvcgBOZWdhdGl2ZUFycmF5U2l6ZUV4Y2VwdGlvbgBieXRlU2VnbWVudHMAZGVjb2RlQW5zaVgxMlNlZ21lbnQ6IG5vIGNhc2UAZGVjb2RlVGV4dFNlZ21lbnQ6IFVwcGVyIFNoaWZ0AGRlY29kZVRleHRTZWdtZW50OiBubyBjYXNlAGRlY29kZUM0MFNlZ21lbnQ6IFVwcGVyIFNoaWZ0AGRlY29kZUM0MFNlZ21lbnQ6IG5vIGNhc2UATm90IGVub3VnaCBiaXRzIHRvIGRlY29kZQBbKT5SUzA1R1MAUlNFT1QAWyk+UlMwNkdTAE5vdCB0byBiZSB1c2VkIGluIEFTQ0lJIGVuY29kYXRpb24ATjV6eGluZzlCaXRTb3VyY2VFAE41enhpbmcxMGRhdGFtYXRyaXg4RGV0ZWN0b3JFAE41enhpbmcxMGRhdGFtYXRyaXgyNlJlc3VsdFBvaW50c0FuZFRyYW5zaXRpb25zRQBONXp4aW5nNW11bHRpMjhHZW5lcmljTXVsdGlwbGVCYXJjb2RlUmVhZGVyRQBONXp4aW5nNW11bHRpMjFNdWx0aXBsZUJhcmNvZGVSZWFkZXJFAE41enhpbmc1bXVsdGkxN1FSQ29kZU11bHRpUmVhZGVyRQBONXp4aW5nNW11bHRpMTNNdWx0aURldGVjdG9yRQBObyBjb2RlIGRldGVjdGVkAE41enhpbmc1bXVsdGkyNE11bHRpRmluZGVyUGF0dGVybkZpbmRlckUATjV6eGluZzZxcmNvZGUxOUZpbmRlclBhdHRlcm5GaW5kZXJFADAxMjM0NTY3ODktJDovLitBQkNEAEFCQ0QATjV6eGluZzRvbmVkMTNDb2RhQmFyUmVhZGVyRQBONXp4aW5nNG9uZWQxM0NvZGUxMjhSZWFkZXJFADAxMjM0NTY3ODlBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWi0uICokLyslAE41enhpbmc0b25lZDEyQ29kZTM5UmVhZGVyRQAwMTIzNDU2Nzg5QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVotLiAkLyslYWJjZCoATjV6eGluZzRvbmVkMTJDb2RlOTNSZWFkZXJFAE41enhpbmc0b25lZDExRUFOMTNSZWFkZXJFAE41enhpbmc0b25lZDEwRUFOOFJlYWRlckUATjV6eGluZzRvbmVkOUlURlJlYWRlckUATjV6eGluZzRvbmVkMjFNdWx0aUZvcm1hdE9uZURSZWFkZXJFAE41enhpbmc0b25lZDIzTXVsdGlGb3JtYXRVUENFQU5SZWFkZXJFAE41enhpbmc0b25lZDEwT25lRFJlYWRlckUATjV6eGluZzRvbmVkMTVPbmVEUmVzdWx0UG9pbnRFAE41enhpbmc0b25lZDEwVVBDQVJlYWRlckUATjV6eGluZzRvbmVkMTJVUENFQU5SZWFkZXJFADAwMDAAMDAwMDAATjV6eGluZzRvbmVkMTBVUENFUmVhZGVyRQBONXp4aW5nNnBkZjQxNzEyUERGNDE3UmVhZGVyRQBONXp4aW5nNnBkZjQxNzdkZWNvZGVyMTVCaXRNYXRyaXhQYXJzZXJFAEJpdE1hdHJpeFBhcnNlcjo6cmVhZENvZGV3b3JkcyhQREYpOiBUb28gbWFueSByb3dzIQBCaXRNYXRyaXhQYXJzZXI6OnRyaW1BcnJheTogbmVnYXRpdmUgc2l6ZSEAQml0TWF0cml4UGFyc2VyOjpwcm9jZXNzUm93KFBERjQxNyk6IGVyYXNlQ291bnQgdG9vIGJpZyEAQml0TWF0cml4UGFyc2VyOjpwcm9jZXNzUm93KFBERjQxNyk6IGNvZGV3b3JkcyBpbmRleCBvdXQgb2YgYm91bmQuADs8PkBbXH1fYH4hDQksOgotLiQvInwqKCk/e30nMDEyMzQ1Njc4OSYNCSw6Iy0uJC8rJSo9Xk41enhpbmc4QXJyYXlSZWZJMTBCaWdJbnRlZ2VyRUUATjV6eGluZzVBcnJheUkxMEJpZ0ludGVnZXJFRQBEZWNvZGVkQml0U3RyZWFtUGFyc2VyOjpkZWNvZGVCYXNlOTAwdG9CYXNlMTA6IFN0cmluZyBkb2VzIG5vdCBiZWdpbiB3aXRoIDEAUERGOkRlY29kZXI6ZGVjb2RlOiBjYW5ub3QgcmVhZCBjb2Rld29yZHMAUERGOkRlY29kZXI6dmVyaWZ5Q29kZXdvcmRDb3VudDogY29kZXdvcmQgYXJyYXkgdG9vIHNtYWxsIQBQREY6RGVjb2Rlcjp2ZXJpZnlDb2Rld29yZENvdW50OiBiYWQgY29kZXdvcmQgbnVtYmVyIGRlc2NyaXB0b3IhAFBERjpEZWNvZGVyOnZlcmlmeUNvZGV3b3JkQ291bnQ6IGJhZCBlcnJvciBjb3JyZWN0aW9uIGN3IG51bWJlciEAUERGOkRlY29kZXI6Y29ycmVjdEVycm9yczogVG9vIG1hbnkgZXJyb3JzIG9yIEVDIENvZGV3b3JkcyBjb3JydXB0ZWQAUERGOkRlY29kZXI6Y29ycmVjdEVycm9yczogRXJyb3IgY29ycmVjdGlvbiBkaWQgbm90IHN1Y2NlZWQhAE41enhpbmc2cGRmNDE3N2RlY29kZXIyZWMxNUVycm9yQ29ycmVjdGlvbkUAQmFkIGVycm9yIGxvY2F0aW9uIQBFcnJvciBudW1iZXIgaW5jb25zaXN0ZW5jeSEARXVjbGlkZWFuIGFsZ29yaXRobSBhbHJlYWR5IHRlcm1pbmF0ZWQ/AHNpZ21hVGlsZGUgPSAwIQBtb25vbWlhbDogZGVncmVlIDwgMCEAbG9nIG9mIHplcm8hAGludmVyc2Ugb2YgemVybyEATjV6eGluZzZwZGY0MTc3ZGVjb2RlcjJlYzExTW9kdWx1c1BvbHlFAG5vIGNvZWZmaWNpZW50cyEATW9kdWx1c1BvbHlzIGRvIG5vdCBoYXZlIHNhbWUgTW9kdWx1c0dGIGZpZWxkAFBONXp4aW5nMjRJbGxlZ2FsQXJndW1lbnRFeGNlcHRpb25FAG5lZ2F0aXZlIGRlZ3JlZSEATm8gdmVydGljZXMgZm91bmQuAEJhZCBtb2R1bGUgd2lkdGguAEJhZCBkaW1lbnNpb24uAENhbm5vdCBmaW5kIGVub3VnaCBQREY0MTcgZ3VhcmQgcGF0dGVybnMhAFBERjpEZXRlY3RvcjogY2Fubm90IGZpbmQgdGhlIGNyb3NzaW5nIG9mIHBhcmFsbGVsIGxpbmVzIQBQREY6RGV0ZWN0b3I6IGNyb3NzaW5nIHBvaW50cyBvdXQgb2YgcmVnaW9uIQBJbmNvbnNpc3RlbnQgbnVtYmVyIG9mIHN5bWJvbHMgaW4gdGhpcyBsaW5lLgBIAFEATQBFbGxlZ2FsIGVycm9yIGNvcnJlY3Rpb24gbGV2ZWwgYml0cwBONXp4aW5nNnFyY29kZTE3Rm9ybWF0SW5mb3JtYXRpb25FAE41enhpbmc2cXJjb2RlMTJRUkNvZGVSZWFkZXJFAE41enhpbmc2cXJjb2RlN1ZlcnNpb25FAHZlcnNpb25OdW1iZXIgbXVzdCBiZSBiZXR3ZWVuIDEgYW5kIDQwAERpbWVuc2lvbiBtdXN0IGJlIDEgbW9kIDQgYW5kID49IDIxAE41enhpbmc2cXJjb2RlMTVCaXRNYXRyaXhQYXJzZXJFAENvdWxkIG5vdCBkZWNvZGUgZm9ybWF0IGluZm9ybWF0aW9uAENvdWxkIG5vdCBkZWNvZGUgdmVyc2lvbgBEaWQgbm90IHJlYWQgYWxsIGNvZGV3b3JkcwBONXp4aW5nNnFyY29kZTlEYXRhQmxvY2tFAERhdGEgYmxvY2sgc2l6ZXMgZGlmZmVyIGJ5IG1vcmUgdGhhbiAxAHJhd0NvZGV3b3Jkc09mZnNldCAhPSByYXdDb2Rld29yZHMubGVuZ3RoAE41enhpbmc2cXJjb2RlOERhdGFNYXNrRQBONXp4aW5nNnFyY29kZTExRGF0YU1hc2sxMTFFAE41enhpbmc2cXJjb2RlMTFEYXRhTWFzazExMEUATjV6eGluZzZxcmNvZGUxMURhdGFNYXNrMTAxRQBONXp4aW5nNnFyY29kZTExRGF0YU1hc2sxMDBFAE41enhpbmc2cXJjb2RlMTFEYXRhTWFzazAxMUUATjV6eGluZzZxcmNvZGUxMURhdGFNYXNrMDEwRQBONXp4aW5nNnFyY29kZTExRGF0YU1hc2swMDFFAE41enhpbmc2cXJjb2RlMTFEYXRhTWFzazAwMEUAcmVmZXJlbmNlIG11c3QgYmUgYmV0d2VlbiAwIGFuZCA3ADAxMjM0NTY3ODlBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWiAkJSorLS4vOmZvcm1hdCBleGNlcHRpb24ASWxsZWdhbCB2YWx1ZSBmb3IgMy1kaWdpdCB1bml0OiAASWxsZWdhbCB2YWx1ZSBmb3IgMi1kaWdpdCB1bml0OiAASWxsZWdhbCB2YWx1ZSBmb3IgZGlnaXQgdW5pdDogAE41enhpbmc1QXJyYXlJTlNfOEFycmF5UmVmSWNFRUVFAEhBTlpJAEZOQzFfU0VDT05EX1BPU0lUSU9OAEZOQzFfRklSU1RfUE9TSVRJT04AS0FOSkkARUNJAEJZVEUAU1RSVUNUVVJFRF9BUFBFTkQAQUxQSEFOVU1FUklDAE5VTUVSSUMAVEVSTUlOQVRPUgBJbGxlZ2FsIG1vZGUgYml0czogAE41enhpbmc2cXJjb2RlMTZBbGlnbm1lbnRQYXR0ZXJuRQBONXp4aW5nNnFyY29kZTIyQWxpZ25tZW50UGF0dGVybkZpbmRlckUAQ291bGQgbm90IGZpbmQgYWxpZ25tZW50IHBhdHRlcm4ATjV6eGluZzZxcmNvZGU4RGV0ZWN0b3JFAGJhZCBtb2R1bGUgc2l6ZQByZWdpb24gdG9vIHNtYWxsIHRvIGhvbGQgYWxpZ25tZW50IHBhdHRlcm4AQmFkIGRpbWVuc2lvbjogAE41enhpbmc2cXJjb2RlMTNGaW5kZXJQYXR0ZXJuRQBDb3VsZCBub3QgZmluZCB0aHJlZSBmaW5kZXIgcGF0dGVybnMATjV6eGluZzZxcmNvZGUxN0ZpbmRlclBhdHRlcm5JbmZvRQBCaWdVbnNpZ25lZDo6dG88UHJpbWl0aXZlPjogVmFsdWUgaXMgdG9vIGJpZyB0byBmaXQgaW4gdGhlIHJlcXVlc3RlZCB0eXBlAC0AQmlnVW5zaWduZWQgY29uc3RydWN0b3I6IENhbm5vdCBjb25zdHJ1Y3QgYSBCaWdVbnNpZ25lZCBmcm9tIGEgbmVnYXRpdmUgbnVtYmVyAEJpZ1Vuc2lnbmVkOjpzdWJ0cmFjdDogTmVnYXRpdmUgcmVzdWx0IGluIHVuc2lnbmVkIGNhbGN1bGF0aW9uAEJpZ1Vuc2lnbmVkOjpkaXZpZGVXaXRoUmVtYWluZGVyOiBDYW5ub3Qgd3JpdGUgcXVvdGllbnQgYW5kIHJlbWFpbmRlciBpbnRvIHRoZSBzYW1lIHZhcmlhYmxlAEJpZ1Vuc2lnbmVkSW5BQmFzZShCaWdVbnNpZ25lZCwgQmFzZSk6IFRoZSBiYXNlIG11c3QgYmUgYXQgbGVhc3QgMgBCaWdVbnNpZ25lZEluQUJhc2UgPT0+IHN0ZDo6c3RyaW5nOiBUaGUgZGVmYXVsdCBzdHJpbmcgY29udmVyc2lvbiByb3V0aW5lcyB1c2UgdGhlIHN5bWJvbCBzZXQgMC05LCBBLVogYW5kIHRoZXJlZm9yZSBzdXBwb3J0IG9ubHkgdXAgdG8gYmFzZSAzNi4gIFlvdSB0cmllZCBhIGNvbnZlcnNpb24gd2l0aCBhIGJhc2Ugb3ZlciAzNjsgd3JpdGUgeW91ciBvd24gc3RyaW5nIGNvbnZlcnNpb24gcm91dGluZS4AMAB2b2lkAGJvb2wAc3RkOjpzdHJpbmcAc3RkOjpiYXNpY19zdHJpbmc8dW5zaWduZWQgY2hhcj4Ac3RkOjp3c3RyaW5nAGVtc2NyaXB0ZW46OnZhbABlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxzaWduZWQgY2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgY2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8c2hvcnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIHNob3J0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIGludD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQxNl90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50MTZfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50MzJfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dWludDMyX3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGxvbmcgZG91YmxlPgBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0llRUUAZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8ZG91YmxlPgBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lkRUUAZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8ZmxvYXQ+AE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWZFRQBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1bnNpZ25lZCBsb25nPgBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0ltRUUAZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8bG9uZz4ATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJbEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWpFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lpRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJdEVFAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SXNFRQBOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0loRUUATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJYUVFAGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGNoYXI+AE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWNFRQBOMTBlbXNjcmlwdGVuM3ZhbEUATlN0M19fMjEyYmFzaWNfc3RyaW5nSXdOU18xMWNoYXJfdHJhaXRzSXdFRU5TXzlhbGxvY2F0b3JJd0VFRUUATlN0M19fMjIxX19iYXNpY19zdHJpbmdfY29tbW9uSUxiMUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJaE5TXzExY2hhcl90cmFpdHNJaEVFTlNfOWFsbG9jYXRvckloRUVFRQBOU3QzX18yMTJiYXNpY19zdHJpbmdJY05TXzExY2hhcl90cmFpdHNJY0VFTlNfOWFsbG9jYXRvckljRUVFRQBkb3VibGUAZmxvYXQAdW5zaWduZWQgbG9uZwBsb25nAHVuc2lnbmVkIGludABpbnQAdW5zaWduZWQgc2hvcnQAc2hvcnQAdW5zaWduZWQgY2hhcgBzaWduZWQgY2hhcgBjaGFyAP////////////////////////////////////////////////////////////////8AAQIDBAUGBwgJ/////////woLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIj////////CgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiP/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAECBAcDBgUAEQAKABEREQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAARAA8KERERAwoHAAETCQsLAAAJBgsAAAsABhEAAAAREREAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAEQAKChEREQAKAAACAAkLAAAACQALAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAADAAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAANAAAABA0AAAAACQ4AAAAAAA4AAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAADwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASEhIAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAKAAAAAAoAAAAACQsAAAAAAAsAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAtKyAgIDBYMHgAKG51bGwpAC0wWCswWCAwWC0weCsweCAweABpbmYASU5GAE5BTgAwMTIzNDU2Nzg5QUJDREVGLgBUISIZDQECAxFLHAwQBAsdEh4naG5vcHFiIAUGDxMUFRoIFgcoJBcYCQoOGx8lI4OCfSYqKzw9Pj9DR0pNWFlaW1xdXl9gYWNkZWZnaWprbHJzdHl6e3wASWxsZWdhbCBieXRlIHNlcXVlbmNlAERvbWFpbiBlcnJvcgBSZXN1bHQgbm90IHJlcHJlc2VudGFibGUATm90IGEgdHR5AFBlcm1pc3Npb24gZGVuaWVkAE9wZXJhdGlvbiBub3QgcGVybWl0dGVkAE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkATm8gc3VjaCBwcm9jZXNzAEZpbGUgZXhpc3RzAFZhbHVlIHRvbyBsYXJnZSBmb3IgZGF0YSB0eXBlAE5vIHNwYWNlIGxlZnQgb24gZGV2aWNlAE91dCBvZiBtZW1vcnkAUmVzb3VyY2UgYnVzeQBJbnRlcnJ1cHRlZCBzeXN0ZW0gY2FsbABSZXNvdXJjZSB0ZW1wb3JhcmlseSB1bmF2YWlsYWJsZQBJbnZhbGlkIHNlZWsAQ3Jvc3MtZGV2aWNlIGxpbmsAUmVhZC1vbmx5IGZpbGUgc3lzdGVtAERpcmVjdG9yeSBub3QgZW1wdHkAQ29ubmVjdGlvbiByZXNldCBieSBwZWVyAE9wZXJhdGlvbiB0aW1lZCBvdXQAQ29ubmVjdGlvbiByZWZ1c2VkAEhvc3QgaXMgZG93bgBIb3N0IGlzIHVucmVhY2hhYmxlAEFkZHJlc3MgaW4gdXNlAEJyb2tlbiBwaXBlAEkvTyBlcnJvcgBObyBzdWNoIGRldmljZSBvciBhZGRyZXNzAEJsb2NrIGRldmljZSByZXF1aXJlZABObyBzdWNoIGRldmljZQBOb3QgYSBkaXJlY3RvcnkASXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AAGluZmluaXR5AG5hbgBMQ19BTEwATENfQ1RZUEUAAAAATENfTlVNRVJJQwAATENfVElNRQAAAAAATENfQ09MTEFURQAATENfTU9ORVRBUlkATENfTUVTU0FHRVMATEFORwBDLlVURi04AFBPU0lYAE1VU0xfTE9DUEFUSABOU3QzX18yOGlvc19iYXNlRQBOU3QzX18yOWJhc2ljX2lvc0ljTlNfMTFjaGFyX3RyYWl0c0ljRUVFRQBOU3QzX18yMTViYXNpY19zdHJlYW1idWZJY05TXzExY2hhcl90cmFpdHNJY0VFRUUATlN0M19fMjEzYmFzaWNfb3N0cmVhbUljTlNfMTFjaGFyX3RyYWl0c0ljRUVFRQB1bnNwZWNpZmllZCBpb3N0cmVhbV9jYXRlZ29yeSBlcnJvcgBpb3N0cmVhbQBOU3QzX18yMTlfX2lvc3RyZWFtX2NhdGVnb3J5RQBOU3QzX18yOGlvc19iYXNlN2ZhaWx1cmVFAGlvc19iYXNlOjpjbGVhcgBOU3QzX18yN2NvbGxhdGVJY0VFAE5TdDNfXzI2bG9jYWxlNWZhY2V0RQBOU3QzX18yN2NvbGxhdGVJd0VFADAxMjM0NTY3ODlhYmNkZWZBQkNERUZ4WCstcFBpSW5OACVwAEMATlN0M19fMjdudW1fZ2V0SWNOU18xOWlzdHJlYW1idWZfaXRlcmF0b3JJY05TXzExY2hhcl90cmFpdHNJY0VFRUVFRQBOU3QzX18yOV9fbnVtX2dldEljRUUATlN0M19fMjE0X19udW1fZ2V0X2Jhc2VFAE5TdDNfXzI3bnVtX2dldEl3TlNfMTlpc3RyZWFtYnVmX2l0ZXJhdG9ySXdOU18xMWNoYXJfdHJhaXRzSXdFRUVFRUUATlN0M19fMjlfX251bV9nZXRJd0VFACVwAAAAAEwAbGwAJQAAAAAAbABOU3QzX18yN251bV9wdXRJY05TXzE5b3N0cmVhbWJ1Zl9pdGVyYXRvckljTlNfMTFjaGFyX3RyYWl0c0ljRUVFRUVFAE5TdDNfXzI5X19udW1fcHV0SWNFRQBOU3QzX18yMTRfX251bV9wdXRfYmFzZUUATlN0M19fMjdudW1fcHV0SXdOU18xOW9zdHJlYW1idWZfaXRlcmF0b3JJd05TXzExY2hhcl90cmFpdHNJd0VFRUVFRQBOU3QzX18yOV9fbnVtX3B1dEl3RUUAJUg6JU06JVMAJW0vJWQvJXkAJUk6JU06JVMgJXAAJWEgJWIgJWQgJUg6JU06JVMgJVkAQU0AUE0ASmFudWFyeQBGZWJydWFyeQBNYXJjaABBcHJpbABNYXkASnVuZQBKdWx5AEF1Z3VzdABTZXB0ZW1iZXIAT2N0b2JlcgBOb3ZlbWJlcgBEZWNlbWJlcgBKYW4ARmViAE1hcgBBcHIASnVuAEp1bABBdWcAU2VwAE9jdABOb3YARGVjAFN1bmRheQBNb25kYXkAVHVlc2RheQBXZWRuZXNkYXkAVGh1cnNkYXkARnJpZGF5AFNhdHVyZGF5AFN1bgBNb24AVHVlAFdlZABUaHUARnJpAFNhdAAlbS8lZC8leSVZLSVtLSVkJUk6JU06JVMgJXAlSDolTSVIOiVNOiVTJUg6JU06JVNOU3QzX18yOHRpbWVfZ2V0SWNOU18xOWlzdHJlYW1idWZfaXRlcmF0b3JJY05TXzExY2hhcl90cmFpdHNJY0VFRUVFRQBOU3QzX18yMjBfX3RpbWVfZ2V0X2Nfc3RvcmFnZUljRUUATlN0M19fMjl0aW1lX2Jhc2VFAE5TdDNfXzI4dGltZV9nZXRJd05TXzE5aXN0cmVhbWJ1Zl9pdGVyYXRvckl3TlNfMTFjaGFyX3RyYWl0c0l3RUVFRUVFAE5TdDNfXzIyMF9fdGltZV9nZXRfY19zdG9yYWdlSXdFRQBOU3QzX18yOHRpbWVfcHV0SWNOU18xOW9zdHJlYW1idWZfaXRlcmF0b3JJY05TXzExY2hhcl90cmFpdHNJY0VFRUVFRQBOU3QzX18yMTBfX3RpbWVfcHV0RQBsb2NhbGUgbm90IHN1cHBvcnRlZABOU3QzX18yOHRpbWVfcHV0SXdOU18xOW9zdHJlYW1idWZfaXRlcmF0b3JJd05TXzExY2hhcl90cmFpdHNJd0VFRUVFRQBOU3QzX18yMTBtb25leXB1bmN0SWNMYjBFRUUATlN0M19fMjEwbW9uZXlfYmFzZUUATlN0M19fMjEwbW9uZXlwdW5jdEljTGIxRUVFAE5TdDNfXzIxMG1vbmV5cHVuY3RJd0xiMEVFRQBOU3QzX18yMTBtb25leXB1bmN0SXdMYjFFRUUAMDEyMzQ1Njc4OQAlTGYAbW9uZXlfZ2V0IGVycm9yAE5TdDNfXzI5bW9uZXlfZ2V0SWNOU18xOWlzdHJlYW1idWZfaXRlcmF0b3JJY05TXzExY2hhcl90cmFpdHNJY0VFRUVFRQBOU3QzX18yMTFfX21vbmV5X2dldEljRUUAMDEyMzQ1Njc4OQBOU3QzX18yOW1vbmV5X2dldEl3TlNfMTlpc3RyZWFtYnVmX2l0ZXJhdG9ySXdOU18xMWNoYXJfdHJhaXRzSXdFRUVFRUUATlN0M19fMjExX19tb25leV9nZXRJd0VFACUuMExmAE5TdDNfXzI5bW9uZXlfcHV0SWNOU18xOW9zdHJlYW1idWZfaXRlcmF0b3JJY05TXzExY2hhcl90cmFpdHNJY0VFRUVFRQBOU3QzX18yMTFfX21vbmV5X3B1dEljRUUATlN0M19fMjltb25leV9wdXRJd05TXzE5b3N0cmVhbWJ1Zl9pdGVyYXRvckl3TlNfMTFjaGFyX3RyYWl0c0l3RUVFRUVFAE5TdDNfXzIxMV9fbW9uZXlfcHV0SXdFRQBOU3QzX18yOG1lc3NhZ2VzSWNFRQBOU3QzX18yMTNtZXNzYWdlc19iYXNlRQBOU3QzX18yMTdfX3dpZGVuX2Zyb21fdXRmOElMajMyRUVFAE5TdDNfXzI3Y29kZWN2dElEaWMxMV9fbWJzdGF0ZV90RUUATlN0M19fMjEyY29kZWN2dF9iYXNlRQBOU3QzX18yMTZfX25hcnJvd190b191dGY4SUxqMzJFRUUATlN0M19fMjhtZXNzYWdlc0l3RUUATlN0M19fMjdjb2RlY3Z0SWNjMTFfX21ic3RhdGVfdEVFAE5TdDNfXzI3Y29kZWN2dEl3YzExX19tYnN0YXRlX3RFRQBOU3QzX18yN2NvZGVjdnRJRHNjMTFfX21ic3RhdGVfdEVFAE5TdDNfXzI2bG9jYWxlNV9faW1wRQBOU3QzX18yNWN0eXBlSWNFRQBOU3QzX18yMTBjdHlwZV9iYXNlRQBOU3QzX18yNWN0eXBlSXdFRQBmYWxzZQB0cnVlAE5TdDNfXzI4bnVtcHVuY3RJY0VFAE5TdDNfXzI4bnVtcHVuY3RJd0VFAHZlY3RvcgBOU3QzX18yMTRfX3NoYXJlZF9jb3VudEUAYmFzaWNfc3RyaW5nAGFsbG9jYXRvcjxUPjo6YWxsb2NhdGUoc2l6ZV90IG4pICduJyBleGNlZWRzIG1heGltdW0gc3VwcG9ydGVkIHNpemUAVW5rbm93biBlcnJvciAlZABuZXdfZXJybm8gPT0gRVJBTkdFAEc6XGVtc2RrLXBvcnRhYmxlLTY0Yml0XGVtc2NyaXB0ZW5cMS4zNy4yNlxzeXN0ZW1cbGliXGxpYmN4eFxzeXN0ZW1fZXJyb3IuY3BwAGRvX3N0cmVycm9yX3IATlN0M19fMjEyX19kb19tZXNzYWdlRQBOU3QzX18yMTRlcnJvcl9jYXRlZ29yeUUATlN0M19fMjEyc3lzdGVtX2Vycm9yRQA6IAB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzOiAlcwB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzAHRlcm1pbmF0aW5nIHdpdGggJXMgZm9yZWlnbiBleGNlcHRpb24AdGVybWluYXRpbmcAdW5jYXVnaHQAU3Q5ZXhjZXB0aW9uAE4xMF9fY3h4YWJpdjExNl9fc2hpbV90eXBlX2luZm9FAFN0OXR5cGVfaW5mbwBOMTBfX2N4eGFiaXYxMjBfX3NpX2NsYXNzX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAHB0aHJlYWRfb25jZSBmYWlsdXJlIGluIF9fY3hhX2dldF9nbG9iYWxzX2Zhc3QoKQBjYW5ub3QgY3JlYXRlIHB0aHJlYWQga2V5IGZvciBfX2N4YV9nZXRfZ2xvYmFscygpAGNhbm5vdCB6ZXJvIG91dCB0aHJlYWQgdmFsdWUgZm9yIF9fY3hhX2dldF9nbG9iYWxzKCkAdGVybWluYXRlX2hhbmRsZXIgdW5leHBlY3RlZGx5IHJldHVybmVkAHRlcm1pbmF0ZV9oYW5kbGVyIHVuZXhwZWN0ZWRseSB0aHJldyBhbiBleGNlcHRpb24Ac3RkOjpiYWRfYWxsb2MAU3Q5YmFkX2FsbG9jAHN0ZDo6ZXhjZXB0aW9uAFN0MTFsb2dpY19lcnJvcgBTdDEzcnVudGltZV9lcnJvcgBTdDEybGVuZ3RoX2Vycm9yAFN0MTJvdXRfb2ZfcmFuZ2UAc3RkOjpiYWRfY2FzdABTdDhiYWRfY2FzdABOMTBfX2N4eGFiaXYxMTlfX3BvaW50ZXJfdHlwZV9pbmZvRQBOMTBfX2N4eGFiaXYxMTdfX3BiYXNlX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTIzX19mdW5kYW1lbnRhbF90eXBlX2luZm9FAERuAFBLYwBOMTBfX2N4eGFiaXYxMjFfX3ZtaV9jbGFzc190eXBlX2luZm9F";var tempDoublePtr=STATICTOP;STATICTOP+=16;function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}function ___assert_fail(condition,filename,line,func){ABORT=true;throw"Assertion failed: "+Pointer_stringify(condition)+", at: "+[filename?Pointer_stringify(filename):"unknown filename",line,func?Pointer_stringify(func):"unknown function"]+" at "+stackTrace()}function ___cxa_allocate_exception(size){return _malloc(size)}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:(function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted}),addRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++}),decRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___cxa_begin_catch(ptr){var info=EXCEPTIONS.infos[ptr];if(info&&!info.caught){info.caught=true;__ZSt18uncaught_exceptionv.uncaught_exception--}if(info)info.rethrown=false;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function ___cxa_call_unexpected(exception){Module.printErr("Unexpected exception thrown, this is not properly supported - aborting");ABORT=true;throw exception}function ___cxa_free_exception(ptr){try{return _free(ptr)}catch(e){}}function ___cxa_end_catch(){Module["setThrew"](0);var ptr=EXCEPTIONS.caught.pop();if(ptr){EXCEPTIONS.decRef(EXCEPTIONS.deAdjust(ptr));EXCEPTIONS.last=0}}function ___cxa_find_matching_catch_2(){return ___cxa_find_matching_catch.apply(null,arguments)}function ___cxa_find_matching_catch_3(){return ___cxa_find_matching_catch.apply(null,arguments)}function ___cxa_find_matching_catch_4(){return ___cxa_find_matching_catch.apply(null,arguments)}function ___cxa_find_matching_catch_6(){return ___cxa_find_matching_catch.apply(null,arguments)}function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}function ___cxa_rethrow(){var ptr=EXCEPTIONS.caught.pop();if(!EXCEPTIONS.infos[ptr].rethrown){EXCEPTIONS.caught.push(ptr);EXCEPTIONS.infos[ptr].rethrown=true}EXCEPTIONS.last=ptr;throw ptr}function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}throw ptr}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(Runtime.setTempRet0(0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(Runtime.setTempRet0(0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i>2];info.adjusted=thrown;return(Runtime.setTempRet0(typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(Runtime.setTempRet0(throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr}function ___gxx_personality_v0(){}function ___lock(){}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}function ___map_file(pathname,size){___setErrNo(ERRNO_CODES.EPERM);return-1}var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var PATH={splitPath:(function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)}),normalizeArray:(function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts}),normalize:(function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path}),dirname:(function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir}),basename:(function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)}),extname:(function(path){return PATH.splitPath(path)[3]}),join:(function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))}),join2:(function(l,r){return PATH.normalize(l+"/"+r)}),resolve:(function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter((function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."}),relative:(function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof globalThis.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()}),put_char:(function(tty,val){if(val===null||val===10){Module["print"](UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}}),flush:(function(tty){if(tty.output&&tty.output.length>0){Module["print"](UTF8ArrayToString(tty.output,0));tty.output=[]}})},default_tty1_ops:{put_char:(function(tty,val){if(val===null||val===10){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}}),flush:(function(tty){if(tty.output&&tty.output.length>0){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[]}})}};var MEMFS={ops_table:null,mount:(function(mount){return MEMFS.createNode(null,"/",16384|511,0)}),createNode:(function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node}),getFileDataAsRegularArray:(function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;inode.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.lengthnewSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}}));var remove=[];Object.keys(dst.entries).forEach((function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}}));if(!total){return callback(null)}var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=(function(e){done(this.error);e.preventDefault()});create.sort().forEach((function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}))}else{IDBFS.loadLocalEntry(path,(function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)}))}}));remove.sort().reverse().forEach((function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}}))})};var NODEFS={isWindows:false,staticInit:(function(){NODEFS.isWindows=!!process.platform.match(/^win/)}),mount:(function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)}),createNode:(function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node}),getMode:(function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&146)>>1}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode}),realPath:(function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)}),flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:(function(flags){flags&=~2097152;flags&=~2048;flags&=~32768;flags&=~524288;if(flags in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[flags]}else{throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}}),node_ops:{getattr:(function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}}),setattr:(function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),lookup:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)}),mknod:(function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node}),rename:(function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),unlink:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),rmdir:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readdir:(function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),symlink:(function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readlink:(function(node){var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}})},stream_ops:{open:(function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),close:(function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),read:(function(stream,buffer,offset,length,position){if(length===0)return 0;var nbuffer=new Buffer(length);var res;try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0){for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size}),write:(function(stream,buffer,offset,length,position){throw new FS.ErrnoError(ERRNO_CODES.EIO)}),llseek:(function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return position})}};STATICTOP+=16;STATICTOP+=16;STATICTOP+=16;var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:(function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)}),lookupPath:(function(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var parts=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:current_path,node:current}}),getPath:(function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}}),hashName:(function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length}),hashAddNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node}),hashRemoveNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}}),lookupNode:(function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)}),createNode:(function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=(function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev});FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:(function(){return(this.mode&readMode)===readMode}),set:(function(val){val?this.mode|=readMode:this.mode&=~readMode})},write:{get:(function(){return(this.mode&writeMode)===writeMode}),set:(function(val){val?this.mode|=writeMode:this.mode&=~writeMode})},isFolder:{get:(function(){return FS.isDir(this.mode)})},isDevice:{get:(function(){return FS.isChrdev(this.mode)})}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node}),destroyNode:(function(node){FS.hashRemoveNode(node)}),isRoot:(function(node){return node===node.parent}),isMountpoint:(function(node){return!!node.mounted}),isFile:(function(mode){return(mode&61440)===32768}),isDir:(function(mode){return(mode&61440)===16384}),isLink:(function(mode){return(mode&61440)===40960}),isChrdev:(function(mode){return(mode&61440)===8192}),isBlkdev:(function(mode){return(mode&61440)===24576}),isFIFO:(function(mode){return(mode&61440)===4096}),isSocket:(function(mode){return(mode&49152)===49152}),flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:(function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags}),flagsToPermissionString:(function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms}),nodePermissions:(function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES}return 0}),mayLookup:(function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return ERRNO_CODES.EACCES;return 0}),mayCreate:(function(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")}),mayDelete:(function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR}}return 0}),mayOpen:(function(node,flags){if(!node){return ERRNO_CODES.ENOENT}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return ERRNO_CODES.EISDIR}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))}),MAX_OPEN_FDS:4096,nextfd:(function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)}),getStream:(function(fd){return FS.streams[fd]}),createStream:(function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=(function(){});FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:(function(){return this.node}),set:(function(val){this.node=val})},isRead:{get:(function(){return(this.flags&2097155)!==1})},isWrite:{get:(function(){return(this.flags&2097155)!==0})},isAppend:{get:(function(){return this.flags&1024})}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream}),closeStream:(function(fd){FS.streams[fd]=null}),chrdev_stream_ops:{open:(function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}}),llseek:(function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)})},major:(function(dev){return dev>>8}),minor:(function(dev){return dev&255}),makedev:(function(ma,mi){return ma<<8|mi}),registerDevice:(function(dev,ops){FS.devices[dev]={stream_ops:ops}}),getDevice:(function(dev){return FS.devices[dev]}),getMounts:(function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts}),syncfs:(function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(err){assert(FS.syncFSRequests>0);FS.syncFSRequests--;return callback(err)}function done(err){if(err){if(!done.errored){done.errored=true;return doCallback(err)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach((function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)}))}),mount:(function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot}),unmount:(function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach((function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}}));node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)}),lookup:(function(parent,name){return parent.node_ops.lookup(parent,name)}),mknod:(function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.mknod(parent,name,mode,dev)}),create:(function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)}),mkdir:(function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)}),mkdirTree:(function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}});var lazyArray=this;lazyArray.setDataGetter((function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]}));if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;console.log("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._length})},chunkSize:{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize})}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:(function(){return this.contents.length})}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach((function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;HEAP32[buf+36>>2]=stat.size;HEAP32[buf+40>>2]=4096;HEAP32[buf+44>>2]=stat.blocks;HEAP32[buf+48>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+52>>2]=0;HEAP32[buf+56>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ino;return 0}),doMsync:(function(addr,stream,len,flags){var buffer=new Uint8Array(HEAPU8.subarray(addr,addr+len));FS.msync(stream,buffer,0,len,flags)}),doMkdir:(function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}),doMknod:(function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}FS.mknod(path,mode,dev);return 0}),doReadlink:(function(path,buf,bufsize){if(bufsize<=0)return-ERRNO_CODES.EINVAL;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len}),doAccess:(function(path,amode){if(amode&~7){return-ERRNO_CODES.EINVAL}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-ERRNO_CODES.EACCES}return 0}),doDup:(function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd}),doReadv:(function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret}),varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),getStreamFromFD:(function(){var stream=FS.getStream(SYSCALLS.get());if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return stream}),getSocketFromFD:(function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return socket}),getSocketAddress:(function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};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 ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doWritev(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall91(which,varargs){SYSCALLS.varargs=varargs;try{var addr=SYSCALLS.get(),len=SYSCALLS.get();var info=SYSCALLS.mappings[addr];if(!info)return 0;if(len===info.len){var stream=FS.getStream(info.fd);SYSCALLS.doMsync(addr,stream,len,info.flags);FS.munmap(stream);SYSCALLS.mappings[addr]=null;if(info.allocated){_free(info.malloc)}}return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___unlock(){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+size)}}function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return(new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n"))(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,(function(message){this.name=errorName;this.message=message;var stack=(new Error(message)).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}}));errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=(function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}});return errorClass}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach((function(type){typeDependencies[type]=dependentTypes}));function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i>shift])}),destructorFunction:null})}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i>2])}function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":(function(handle){var rv=emval_handle_array[handle].value;__emval_decref(handle);return rv}),"toWireType":(function(destructors,value){return __emval_register(value)}),"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})}function _embind_repr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return(function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])});case 3:return(function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])});default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":(function(value){return value}),"toWireType":(function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}return value}),"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=(function(value){return value});if(minRange===0){var bitshift=32-8*size;fromWireType=(function(value){return value<>>bitshift})}var isUnsignedType=name.indexOf("unsigned")!=-1;registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":(function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}if(valuemaxRange){throw new TypeError('Passing a number "'+_embind_repr(value)+'" from JS side to C/C++ side to an argument of type "'+name+'", which is outside the valid range ['+minRange+", "+maxRange+"]!")}return isUnsignedType?value>>>0:value|0}),"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(heap["buffer"],data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":(function(value){var length=HEAPU32[value>>2];var a=new Array(length);for(var i=0;i>2]=length;for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+4+i]=charCode}if(destructors!==null){destructors.push(_free,ptr)}return ptr}),"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:(function(ptr){_free(ptr)})})}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var getHeap,shift;if(charSize===2){getHeap=(function(){return HEAPU16});shift=1}else if(charSize===4){getHeap=(function(){return HEAPU32});shift=2}registerType(rawType,{name:name,"fromWireType":(function(value){var HEAP=getHeap();var length=HEAPU32[value>>2];var a=new Array(length);var start=value+4>>shift;for(var i=0;i>2]=length;var start=ptr+4>>shift;for(var i=0;i>2]=poolPtr;HEAP32[_environ>>2]=envPtr}else{envPtr=HEAP32[_environ>>2];poolPtr=HEAP32[envPtr>>2]}var strings=[];var totalSize=0;for(var key in env){if(typeof env[key]==="string"){var line=key+"="+env[key];strings.push(line);totalSize+=line.length}}if(totalSize>TOTAL_ENV_SIZE){throw new Error("Environment size exceeded TOTAL_ENV_SIZE!")}var ptrSize=4;for(var i=0;i>2]=poolPtr;poolPtr+=line.length+1}HEAP32[envPtr+strings.length*ptrSize>>2]=0}var ENV={};function _getenv(name){if(name===0)return 0;name=Pointer_stringify(name);if(!ENV.hasOwnProperty(name))return 0;if(_getenv.ret)_free(_getenv.ret);_getenv.ret=allocate(intArrayFromString(ENV[name]),"i8",ALLOC_NORMAL);return _getenv.ret}function _llvm_eh_typeid_for(type){return type}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}function _pthread_cond_wait(){return 0}var PTHREAD_SPECIFIC={};function _pthread_getspecific(key){return PTHREAD_SPECIFIC[key]||0}var PTHREAD_SPECIFIC_NEXT_KEY=1;function _pthread_key_create(key,destructor){if(key==0){return ERRNO_CODES.EINVAL}HEAP32[key>>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Module["dynCall_v"](func);_pthread_once.seen[ptr]=1}function _pthread_setspecific(key,value){if(!(key in PTHREAD_SPECIFIC)){return ERRNO_CODES.EINVAL}PTHREAD_SPECIFIC[key]=value;return 0}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]);return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?Pointer_stringify(tm_zone):""};var pattern=Pointer_stringify(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":(function(date){return WEEKDAYS[date.tm_wday].substring(0,3)}),"%A":(function(date){return WEEKDAYS[date.tm_wday]}),"%b":(function(date){return MONTHS[date.tm_mon].substring(0,3)}),"%B":(function(date){return MONTHS[date.tm_mon]}),"%C":(function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)}),"%d":(function(date){return leadingNulls(date.tm_mday,2)}),"%e":(function(date){return leadingSomething(date.tm_mday,2," ")}),"%g":(function(date){return getWeekBasedYear(date).toString().substring(2)}),"%G":(function(date){return getWeekBasedYear(date)}),"%H":(function(date){return leadingNulls(date.tm_hour,2)}),"%I":(function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)}),"%j":(function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)}),"%m":(function(date){return leadingNulls(date.tm_mon+1,2)}),"%M":(function(date){return leadingNulls(date.tm_min,2)}),"%n":(function(){return"\n"}),"%p":(function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}}),"%S":(function(date){return leadingNulls(date.tm_sec,2)}),"%t":(function(){return"\t"}),"%u":(function(date){var day=new Date(date.tm_year+1900,date.tm_mon+1,date.tm_mday,0,0,0,0);return day.getDay()||7}),"%U":(function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"}),"%V":(function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)}),"%Z":(function(date){return date.tm_zone}),"%%":(function(){return"%"})};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}FS.staticInit();__ATINIT__.unshift((function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init()}));__ATMAIN__.push((function(){FS.ignorePermissions=false}));__ATEXIT__.push((function(){FS.quit()}));Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;__ATINIT__.unshift((function(){TTY.init()}));__ATEXIT__.push((function(){TTY.shutdown()}));if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");InternalError=Module["InternalError"]=extendError(Error,"InternalError");init_emval();___buildEnvironment(ENV);DYNAMICTOP_PTR=Runtime.staticAlloc(4);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;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 keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var decodeBase64=typeof atob==="function"?atob:(function(input){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]=q;c[$>>2]=R;_=$+4|0;c[_>>2]=354;c[S>>2]=R;c[L>>2]=R+400;c[U>>2]=0;c[U+4>>2]=0;c[U+8>>2]=0;q=0;while(1){if((q|0)==3)break;c[U+(q<<2)>>2]=0;q=q+1|0}c[V>>2]=0;c[V+4>>2]=0;c[V+8>>2]=0;q=0;while(1){if((q|0)==3)break;c[V+(q<<2)>>2]=0;q=q+1|0}c[W>>2]=0;c[W+4>>2]=0;c[W+8>>2]=0;q=0;while(1){if((q|0)==3)break;c[W+(q<<2)>>2]=0;q=q+1|0}c[X>>2]=0;c[X+4>>2]=0;c[X+8>>2]=0;q=0;while(1){if((q|0)==3)break;c[X+(q<<2)>>2]=0;q=q+1|0}c[Y>>2]=0;c[Y+4>>2]=0;c[Y+8>>2]=0;q=0;while(1){if((q|0)==3)break;c[Y+(q<<2)>>2]=0;q=q+1|0}o=0;tb(42,g|0,h|0,M|0,N|0,O|0,U|0,V|0,W|0,X|0,P|0);R=o;o=0;a:do if(R&1)g=Fb()|0;else{c[p>>2]=c[n>>2];F=m+8|0;G=W+11|0;H=W+4|0;I=X+11|0;J=X+4|0;x=(i&512|0)!=0;y=V+11|0;z=V+4|0;A=Y+11|0;B=Y+4|0;C=M+3|0;D=U+11|0;E=U+4|0;R=0;w=0;b:while(1){m=(R|0)!=0;if(w>>>0>=4){Q=246;break}q=c[e>>2]|0;do if(q){g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else q=bh(a[g>>0]|0)|0;if(Yg(q,Qg()|0)|0){c[e>>2]=0;h=1;break}else{h=(c[e>>2]|0)==0;break}}else h=1;while(0);g=c[f>>2]|0;do if(g){q=c[g+12>>2]|0;if((q|0)==(c[g+16>>2]|0)){o=0;q=fa(c[(c[g>>2]|0)+36>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else q=bh(a[q>>0]|0)|0;if(!(Yg(q,Qg()|0)|0))if(h){v=g;break}else{Q=246;break b}else{c[f>>2]=0;Q=32;break}}else Q=32;while(0);if((Q|0)==32){Q=0;if(h){Q=246;break}else v=0}q=(w|0)!=3;c:do switch(a[M+w>>0]|0){case 1:{if(q){q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;Q=o;o=0;if(Q&1){Q=35;break b}}else q=bh(a[g>>0]|0)|0;if((q&255)<<24>>24<=-1){Q=47;break b}if(!(b[(c[F>>2]|0)+(q<<24>>24<<1)>>1]&8192)){Q=47;break b}q=c[e>>2]|0;g=q+12|0;h=c[g>>2]|0;if((h|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;Q=o;o=0;if(Q&1){Q=35;break b}}else{c[g>>2]=h+1;q=bh(a[h>>0]|0)|0}o=0;Xa(109,Y|0,q&255|0);Q=o;o=0;if(Q&1){Q=35;break b}else{q=v;m=v;Q=49}}else q=R;break}case 0:{if(q){q=v;m=v;Q=49}else q=R;break}case 3:{q=a[G>>0]|0;q=q<<24>>24<0?c[H>>2]|0:q&255;m=a[I>>0]|0;m=m<<24>>24<0?c[J>>2]|0:m&255;if((q|0)==(0-m|0))q=R;else{if(!q){q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else q=bh(a[g>>0]|0)|0;if((q&255)<<24>>24!=(a[((a[I>>0]|0)<0?c[X>>2]|0:X)>>0]|0)){q=R;break c}q=c[e>>2]|0;g=q+12|0;h=c[g>>2]|0;if((h|0)==(c[q+16>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else{c[g>>2]=h+1;bh(a[h>>0]|0)|0}a[k>>0]=1;q=a[I>>0]|0;q=(q<<24>>24<0?c[J>>2]|0:q&255)>>>0>1?X:R;break c}q=c[e>>2]|0;g=c[q+12>>2]|0;h=(g|0)==(c[q+16>>2]|0);if(!m){if(h){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else q=bh(a[g>>0]|0)|0;if((q&255)<<24>>24!=(a[((a[G>>0]|0)<0?c[W>>2]|0:W)>>0]|0)){a[k>>0]=1;q=R;break c}q=c[e>>2]|0;g=q+12|0;h=c[g>>2]|0;if((h|0)==(c[q+16>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else{c[g>>2]=h+1;bh(a[h>>0]|0)|0}q=a[G>>0]|0;q=(q<<24>>24<0?c[H>>2]|0:q&255)>>>0>1?W:R;break c}if(h){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else q=bh(a[g>>0]|0)|0;g=c[e>>2]|0;h=g+12|0;m=c[h>>2]|0;i=(m|0)==(c[g+16>>2]|0);if((q&255)<<24>>24==(a[((a[G>>0]|0)<0?c[W>>2]|0:W)>>0]|0)){if(i){o=0;fa(c[(c[g>>2]|0)+40>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else{c[h>>2]=m+1;bh(a[m>>0]|0)|0}q=a[G>>0]|0;q=(q<<24>>24<0?c[H>>2]|0:q&255)>>>0>1?W:R;break c}if(i){o=0;q=fa(c[(c[g>>2]|0)+36>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else q=bh(a[m>>0]|0)|0;if((q&255)<<24>>24!=(a[((a[I>>0]|0)<0?c[X>>2]|0:X)>>0]|0)){Q=109;break b}q=c[e>>2]|0;g=q+12|0;h=c[g>>2]|0;if((h|0)==(c[q+16>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else{c[g>>2]=h+1;bh(a[h>>0]|0)|0}a[k>>0]=1;q=a[I>>0]|0;q=(q<<24>>24<0?c[J>>2]|0:q&255)>>>0>1?X:R}break}case 2:{if(!(w>>>0<2|m)?!(x|(w|0)==2&(a[C>>0]|0)!=0):0){q=0;break c}g=a[y>>0]|0;q=g<<24>>24<0;t=c[V>>2]|0;h=q?t:V;s=h;d:do if((w|0)!=0?(d[M+(w+-1)>>0]|0)<2:0){q=h+(q?c[z>>2]|0:g&255)|0;r=s;while(1){m=r;if((m|0)==(q|0))break;i=a[m>>0]|0;if(i<<24>>24<=-1)break;if(!(b[(c[F>>2]|0)+(i<<24>>24<<1)>>1]&8192))break;r=m+1|0}i=r-s|0;m=a[A>>0]|0;q=m<<24>>24<0;m=q?c[B>>2]|0:m&255;if(i>>>0<=m>>>0){m=(q?c[Y>>2]|0:Y)+m|0;q=m+(0-i)|0;while(1){if((q|0)==(m|0)){u=v;h=r;q=t;m=v;break d}if((a[q>>0]|0)!=(a[h>>0]|0)){u=v;h=s;q=t;m=v;break d}h=h+1|0;q=q+1|0}}else{u=v;h=s;q=t;m=v}}else{u=v;h=s;q=t;m=v}while(0);e:while(1){r=g<<24>>24<0;q=(r?q:V)+(r?c[z>>2]|0:g&255)|0;r=h;if((r|0)==(q|0))break;q=c[e>>2]|0;do if(q){g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=148;break b}}else q=bh(a[g>>0]|0)|0;if(Yg(q,Qg()|0)|0){c[e>>2]=0;g=1;break}else{g=(c[e>>2]|0)==0;break}}else g=1;while(0);do if(m){q=c[m+12>>2]|0;if((q|0)==(c[m+16>>2]|0)){o=0;q=fa(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;v=o;o=0;if(v&1){Q=148;break b}}else q=bh(a[q>>0]|0)|0;if(!(Yg(q,Qg()|0)|0))if(g^(u|0)==0){q=u;i=u;break}else{q=r;break e}else{c[f>>2]=0;q=0;Q=138;break}}else{q=u;Q=138}while(0);if((Q|0)==138){Q=0;if(g){q=r;break}else i=0}g=c[e>>2]|0;h=c[g+12>>2]|0;if((h|0)==(c[g+16>>2]|0)){o=0;g=fa(c[(c[g>>2]|0)+36>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=148;break b}}else g=bh(a[h>>0]|0)|0;if((g&255)<<24>>24!=(a[r>>0]|0)){q=r;break}g=c[e>>2]|0;h=g+12|0;m=c[h>>2]|0;if((m|0)==(c[g+16>>2]|0)){o=0;fa(c[(c[g>>2]|0)+40>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=149;break b}}else{c[h>>2]=m+1;bh(a[m>>0]|0)|0}u=q;h=r+1|0;g=a[y>>0]|0;q=c[V>>2]|0;m=i}if(x?(v=a[y>>0]|0,u=v<<24>>24<0,(q|0)!=((u?c[V>>2]|0:V)+(u?c[z>>2]|0:v&255)|0)):0){Q=152;break b}else q=R;break}case 4:{s=0;q=v;m=v;f:while(1){g=c[e>>2]|0;do if(g){h=c[g+12>>2]|0;if((h|0)==(c[g+16>>2]|0)){o=0;g=fa(c[(c[g>>2]|0)+36>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else g=bh(a[h>>0]|0)|0;if(Yg(g,Qg()|0)|0){c[e>>2]=0;h=1;break}else{h=(c[e>>2]|0)==0;break}}else h=1;while(0);do if(m){g=c[m+12>>2]|0;if((g|0)==(c[m+16>>2]|0)){o=0;g=fa(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else g=bh(a[g>>0]|0)|0;if(!(Yg(g,Qg()|0)|0))if(h^(q|0)==0){i=q;r=q;break}else{m=q;break f}else{c[f>>2]=0;q=0;Q=166;break}}else Q=166;while(0);if((Q|0)==166){Q=0;if(h){m=q;break}else{i=q;r=0}}q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else q=bh(a[g>>0]|0)|0;g=q&255;if(g<<24>>24>-1?(b[(c[F>>2]|0)+(q<<24>>24<<1)>>1]&2048)!=0:0){q=c[p>>2]|0;if((q|0)==(c[K>>2]|0)){o=0;bb(152,n|0,p|0,K|0);v=o;o=0;if(v&1){Q=244;break b}q=c[p>>2]|0}c[p>>2]=q+1;a[q>>0]=g;q=s+1|0}else{v=a[D>>0]|0;if(!(g<<24>>24==(a[O>>0]|0)&(s|0?((v<<24>>24<0?c[E>>2]|0:v&255)|0)!=0:0))){m=i;break}q=c[S>>2]|0;if((q|0)==(c[L>>2]|0)){o=0;bb(153,$|0,S|0,L|0);v=o;o=0;if(v&1){Q=244;break b}q=c[S>>2]|0}c[S>>2]=q+4;c[q>>2]=s;q=0}g=c[e>>2]|0;h=g+12|0;m=c[h>>2]|0;if((m|0)==(c[g+16>>2]|0)){o=0;fa(c[(c[g>>2]|0)+40>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=244;break b}else{s=q;q=i;m=r;continue}}else{c[h>>2]=m+1;bh(a[m>>0]|0)|0;s=q;q=i;m=r;continue}}q=c[S>>2]|0;if(s|0?(c[$>>2]|0)!=(q|0):0){if((q|0)==(c[L>>2]|0)){o=0;bb(153,$|0,S|0,L|0);v=o;o=0;if(v&1){Q=244;break b}q=c[S>>2]|0}c[S>>2]=q+4;c[q>>2]=s}g:do if((c[P>>2]|0)>0){q=c[e>>2]|0;do if(q){g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else q=bh(a[g>>0]|0)|0;if(Yg(q,Qg()|0)|0){c[e>>2]=0;g=1;break}else{g=(c[e>>2]|0)==0;break}}else g=1;while(0);do if(m){q=c[m+12>>2]|0;if((q|0)==(c[m+16>>2]|0)){o=0;q=fa(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else q=bh(a[q>>0]|0)|0;if(!(Yg(q,Qg()|0)|0))if(g)break;else{Q=243;break b}else{c[f>>2]=0;Q=204;break}}else Q=204;while(0);if((Q|0)==204){Q=0;if(g){Q=243;break b}else m=0}q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else q=bh(a[g>>0]|0)|0;if((q&255)<<24>>24!=(a[N>>0]|0)){Q=243;break b}q=c[e>>2]|0;g=q+12|0;h=c[g>>2]|0;if((h|0)==(c[q+16>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=244;break b}else q=m}else{c[g>>2]=h+1;bh(a[h>>0]|0)|0;q=m}while(1){if((c[P>>2]|0)<=0)break g;g=c[e>>2]|0;do if(g){h=c[g+12>>2]|0;if((h|0)==(c[g+16>>2]|0)){o=0;g=fa(c[(c[g>>2]|0)+36>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else g=bh(a[h>>0]|0)|0;if(Yg(g,Qg()|0)|0){c[e>>2]=0;h=1;break}else{h=(c[e>>2]|0)==0;break}}else h=1;while(0);do if(m){g=c[m+12>>2]|0;if((g|0)==(c[m+16>>2]|0)){o=0;g=fa(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else g=bh(a[g>>0]|0)|0;if(!(Yg(g,Qg()|0)|0))if(h^(q|0)==0){i=q;m=q;break}else{Q=243;break b}else{c[f>>2]=0;q=0;Q=227;break}}else Q=227;while(0);if((Q|0)==227){Q=0;if(h){Q=243;break b}else{i=q;m=0}}q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else q=bh(a[g>>0]|0)|0;if((q&255)<<24>>24<=-1){Q=243;break b}if(!(b[(c[F>>2]|0)+(q<<24>>24<<1)>>1]&2048)){Q=243;break b}if((c[p>>2]|0)==(c[K>>2]|0)?(o=0,bb(152,n|0,p|0,K|0),v=o,o=0,v&1):0){Q=244;break b}q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=244;break b}}else q=bh(a[g>>0]|0)|0;g=c[p>>2]|0;c[p>>2]=g+1;a[g>>0]=q;c[P>>2]=(c[P>>2]|0)+-1;q=c[e>>2]|0;g=q+12|0;h=c[g>>2]|0;if((h|0)==(c[q+16>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=244;break b}else{q=i;continue}}else{c[g>>2]=h+1;bh(a[h>>0]|0)|0;q=i;continue}}}while(0);if((c[p>>2]|0)==(c[n>>2]|0)){Q=243;break b}else q=R;break}default:q=R}while(0);h:do if((Q|0)==49)while(1){Q=0;g=c[e>>2]|0;do if(g){h=c[g+12>>2]|0;if((h|0)==(c[g+16>>2]|0)){o=0;g=fa(c[(c[g>>2]|0)+36>>2]|0,g|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else g=bh(a[h>>0]|0)|0;if(Yg(g,Qg()|0)|0){c[e>>2]=0;h=1;break}else{h=(c[e>>2]|0)==0;break}}else h=1;while(0);do if(m){g=c[m+12>>2]|0;if((g|0)==(c[m+16>>2]|0)){o=0;g=fa(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else g=bh(a[g>>0]|0)|0;if(!(Yg(g,Qg()|0)|0))if(h^(q|0)==0){i=q;m=q;break}else{q=R;break h}else{c[f>>2]=0;q=0;Q=62;break}}else Q=62;while(0);if((Q|0)==62){Q=0;if(h){q=R;break h}else{i=q;m=0}}q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;v=o;o=0;if(v&1){Q=35;break b}}else q=bh(a[g>>0]|0)|0;if((q&255)<<24>>24<=-1){q=R;break h}if(!(b[(c[F>>2]|0)+(q<<24>>24<<1)>>1]&8192)){q=R;break h}q=c[e>>2]|0;g=q+12|0;h=c[g>>2]|0;if((h|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;Q=o;o=0;if(Q&1){Q=35;break b}}else{c[g>>2]=h+1;q=bh(a[h>>0]|0)|0}o=0;Xa(109,Y|0,q&255|0);Q=o;o=0;if(Q&1){Q=35;break b}else{q=i;Q=49}}while(0);R=q;w=w+1|0}i:do if((Q|0)==35){g=Fb()|0;break a}else if((Q|0)==47){c[j>>2]=c[j>>2]|4;g=0}else if((Q|0)==109){c[j>>2]=c[j>>2]|4;g=0}else if((Q|0)==148){g=Fb()|0;break a}else if((Q|0)==149){g=Fb()|0;break a}else if((Q|0)==152){c[j>>2]=c[j>>2]|4;g=0}else if((Q|0)==243){c[j>>2]=c[j>>2]|4;g=0}else if((Q|0)==244){g=Fb()|0;break a}else if((Q|0)==246){j:do if(m){i=R+11|0;r=R+4|0;m=1;k:while(1){q=a[i>>0]|0;if(q<<24>>24<0)q=c[r>>2]|0;else q=q&255;if(m>>>0>=q>>>0)break j;q=c[e>>2]|0;do if(q){g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;p=o;o=0;if(p&1){Q=274;break k}}else q=bh(a[g>>0]|0)|0;if(Yg(q,Qg()|0)|0){c[e>>2]=0;h=1;break}else{h=(c[e>>2]|0)==0;break}}else h=1;while(0);q=c[f>>2]|0;do if(q){g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;p=o;o=0;if(p&1){Q=274;break k}}else q=bh(a[g>>0]|0)|0;if(!(Yg(q,Qg()|0)|0))if(h)break;else{Q=273;break k}else{c[f>>2]=0;Q=265;break}}else Q=265;while(0);if((Q|0)==265?(Q=0,h):0){Q=273;break}q=c[e>>2]|0;g=c[q+12>>2]|0;if((g|0)==(c[q+16>>2]|0)){o=0;q=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;p=o;o=0;if(p&1){Q=274;break}}else q=bh(a[g>>0]|0)|0;if((a[i>>0]|0)<0)g=c[R>>2]|0;else g=R;if((q&255)<<24>>24!=(a[g+m>>0]|0)){Q=273;break}q=m+1|0;g=c[e>>2]|0;h=g+12|0;m=c[h>>2]|0;if((m|0)==(c[g+16>>2]|0)){o=0;fa(c[(c[g>>2]|0)+40>>2]|0,g|0)|0;p=o;o=0;if(p&1){Q=274;break}else{m=q;continue}}else{c[h>>2]=m+1;bh(a[m>>0]|0)|0;m=q;continue}}if((Q|0)==273){c[j>>2]=c[j>>2]|4;g=0;break i}else if((Q|0)==274){g=Fb()|0;break a}}while(0);g=c[$>>2]|0;q=c[S>>2]|0;if((g|0)!=(q|0)){c[T>>2]=0;o=0;db(107,U|0,g|0,q|0,T|0);S=o;o=0;if(S&1){g=Fb()|0;break a}if(!(c[T>>2]|0)){g=1;break}else{c[j>>2]=c[j>>2]|4;g=0;break}}else g=1}while(0);pU(Y);pU(X);pU(W);pU(V);pU(U);q=c[$>>2]|0;c[$>>2]=0;if(q|0?(o=0,Na(c[_>>2]|0,q|0),$=o,o=0,$&1):0){$=Gb(0)|0;_g($)}l=Z;return g|0}while(0);pU(Y);pU(X);pU(W);pU(V);pU(U);q=c[$>>2]|0;c[$>>2]=0;if(q|0?(o=0,Na(c[_>>2]|0,q|0),$=o,o=0,$&1):0){$=Gb(0)|0;_g($)}Qb(g|0);return 0}function gQ(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,m=0,n=0,p=0,q=0,r=0;r=l;l=l+16|0;k=d;q=r+12|0;i=r;p=b+11|0;g=a[p>>0]|0;f=g<<24>>24<0;if(f){j=(c[b+8>>2]&2147483647)+-1|0;m=c[b+4>>2]|0}else{j=10;m=g&255}n=e-k|0;do if(n|0){if(f){g=c[b>>2]|0;h=g;f=c[b+4>>2]|0}else{h=b;f=g&255;g=b}if(hQ(d,g,h+f|0)|0){c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;if(n>>>0>4294967279)lU(i);if(n>>>0<11){a[i+11>>0]=n;g=i}else{p=n+16&-16;g=aU(p)|0;c[i>>2]=g;c[i+8>>2]=p|-2147483648;c[i+4>>2]=n}f=g;while(1){if((d|0)==(e|0))break;ah(f,d);d=d+1|0;f=f+1|0}a[q>>0]=0;ah(g+n|0,q);q=a[i+11>>0]|0;e=q<<24>>24<0;o=0;la(74,b|0,(e?c[i>>2]|0:i)|0,(e?c[i+4>>2]|0:q&255)|0)|0;q=o;o=0;if(q&1){r=Fb()|0;pU(i);Qb(r|0)}else{pU(i);break}}else{i=m+n|0;if((j-m|0)>>>0>>0)yU(b,j,i-j|0,m,m,0,0);if((a[p>>0]|0)<0)h=c[b>>2]|0;else h=b;g=e+(m-k)|0;f=h+m|0;while(1){if((d|0)==(e|0))break;ah(f,d);f=f+1|0;d=d+1|0}a[q>>0]=0;ah(h+g|0,q);if((a[p>>0]|0)<0){c[b+4>>2]=i;break}else{a[p>>0]=i;break}}}while(0);l=r;return b|0}function hQ(a,b,c){a=a|0;b=b|0;c=c|0;return b>>>0<=a>>>0&a>>>0>>0|0}function iQ(b,d,e,f,g,h,i,j,k,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,p=0,q=0;q=l;l=l+16|0;n=q+12|0;p=q;if(b){d=VL(d,61600)|0;kd[c[(c[d>>2]|0)+44>>2]&511](n,d);b=c[n>>2]|0;a[e>>0]=b;a[e+1>>0]=b>>8;a[e+2>>0]=b>>16;a[e+3>>0]=b>>24;kd[c[(c[d>>2]|0)+32>>2]&511](p,d);b=k+11|0;if((a[b>>0]|0)<0){e=c[k>>2]|0;a[n>>0]=0;ah(e,n);c[k+4>>2]=0}else{a[n>>0]=0;ah(k,n);a[b>>0]=0}o=0;Xa(172,k|0,0);e=o;o=0;if(e&1){e=Gb(0)|0;_g(e)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[d>>2]|0)+28>>2]&511](p,d);b=j+11|0;if((a[b>>0]|0)<0){k=c[j>>2]|0;a[n>>0]=0;ah(k,n);c[j+4>>2]=0}else{a[n>>0]=0;ah(j,n);a[b>>0]=0}o=0;Xa(172,j|0,0);k=o;o=0;if(k&1){k=Gb(0)|0;_g(k)};c[j>>2]=c[p>>2];c[j+4>>2]=c[p+4>>2];c[j+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);a[f>>0]=Qc[c[(c[d>>2]|0)+12>>2]&255](d)|0;a[g>>0]=Qc[c[(c[d>>2]|0)+16>>2]&255](d)|0;kd[c[(c[d>>2]|0)+20>>2]&511](p,d);b=h+11|0;if((a[b>>0]|0)<0){g=c[h>>2]|0;a[n>>0]=0;ah(g,n);c[h+4>>2]=0}else{a[n>>0]=0;ah(h,n);a[b>>0]=0}o=0;Xa(172,h|0,0);g=o;o=0;if(g&1){g=Gb(0)|0;_g(g)};c[h>>2]=c[p>>2];c[h+4>>2]=c[p+4>>2];c[h+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[d>>2]|0)+24>>2]&511](p,d);b=i+11|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;a[n>>0]=0;ah(h,n);c[i+4>>2]=0}else{a[n>>0]=0;ah(i,n);a[b>>0]=0}o=0;Xa(172,i|0,0);n=o;o=0;if(n&1){n=Gb(0)|0;_g(n)};c[i>>2]=c[p>>2];c[i+4>>2]=c[p+4>>2];c[i+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);b=Qc[c[(c[d>>2]|0)+36>>2]&255](d)|0}else{d=VL(d,61592)|0;kd[c[(c[d>>2]|0)+44>>2]&511](n,d);b=c[n>>2]|0;a[e>>0]=b;a[e+1>>0]=b>>8;a[e+2>>0]=b>>16;a[e+3>>0]=b>>24;kd[c[(c[d>>2]|0)+32>>2]&511](p,d);b=k+11|0;if((a[b>>0]|0)<0){e=c[k>>2]|0;a[n>>0]=0;ah(e,n);c[k+4>>2]=0}else{a[n>>0]=0;ah(k,n);a[b>>0]=0}o=0;Xa(172,k|0,0);e=o;o=0;if(e&1){e=Gb(0)|0;_g(e)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[d>>2]|0)+28>>2]&511](p,d);b=j+11|0;if((a[b>>0]|0)<0){k=c[j>>2]|0;a[n>>0]=0;ah(k,n);c[j+4>>2]=0}else{a[n>>0]=0;ah(j,n);a[b>>0]=0}o=0;Xa(172,j|0,0);k=o;o=0;if(k&1){k=Gb(0)|0;_g(k)};c[j>>2]=c[p>>2];c[j+4>>2]=c[p+4>>2];c[j+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);a[f>>0]=Qc[c[(c[d>>2]|0)+12>>2]&255](d)|0;a[g>>0]=Qc[c[(c[d>>2]|0)+16>>2]&255](d)|0;kd[c[(c[d>>2]|0)+20>>2]&511](p,d);b=h+11|0;if((a[b>>0]|0)<0){g=c[h>>2]|0;a[n>>0]=0;ah(g,n);c[h+4>>2]=0}else{a[n>>0]=0;ah(h,n);a[b>>0]=0}o=0;Xa(172,h|0,0);g=o;o=0;if(g&1){g=Gb(0)|0;_g(g)};c[h>>2]=c[p>>2];c[h+4>>2]=c[p+4>>2];c[h+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[d>>2]|0)+24>>2]&511](p,d);b=i+11|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;a[n>>0]=0;ah(h,n);c[i+4>>2]=0}else{a[n>>0]=0;ah(i,n);a[b>>0]=0}o=0;Xa(172,i|0,0);n=o;o=0;if(n&1){n=Gb(0)|0;_g(n)};c[i>>2]=c[p>>2];c[i+4>>2]=c[p+4>>2];c[i+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);b=Qc[c[(c[d>>2]|0)+36>>2]&255](d)|0}c[m>>2]=b;l=q;return}function jQ(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;j=a+4|0;e=(c[j>>2]|0)!=354;h=c[a>>2]|0;f=(c[d>>2]|0)-h|0;f=f>>>0<2147483647?f<<1:-1;f=(f|0)==0?1:f;g=(c[b>>2]|0)-h|0;h=pI(e?h:0,f)|0;if(!h)eU();do if(!e){e=c[a>>2]|0;c[a>>2]=h;if(e){o=0;Na(c[j>>2]|0,e|0);h=o;o=0;if(h&1){h=Gb(0)|0;_g(h)}else{i=c[a>>2]|0;break}}else i=h}else{c[a>>2]=h;i=h}while(0);c[j>>2]=356;c[b>>2]=i+g;c[d>>2]=(c[a>>2]|0)+f;return}function kQ(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;j=a+4|0;e=(c[j>>2]|0)!=354;h=c[a>>2]|0;f=(c[d>>2]|0)-h|0;f=f>>>0<2147483647?f<<1:-1;f=(f|0)==0?4:f;g=(c[b>>2]|0)-h>>2;h=pI(e?h:0,f)|0;if(!h)eU();do if(!e){e=c[a>>2]|0;c[a>>2]=h;if(e){o=0;Na(c[j>>2]|0,e|0);h=o;o=0;if(h&1){h=Gb(0)|0;_g(h)}else{i=c[a>>2]|0;break}}else i=h}else{c[a>>2]=h;i=h}while(0);c[j>>2]=356;c[b>>2]=i+(g<<2);c[d>>2]=(c[a>>2]|0)+(f>>>2<<2);return}function lQ(a){a=a|0;BL(a);return}function mQ(a){a=a|0;BL(a);cU(a);return}function nQ(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;t=l;l=l+576|0;p=t+424|0;s=t;b=t+24|0;v=t+16|0;r=t+12|0;u=t+8|0;n=t+564|0;j=t+4|0;q=t+464|0;c[v>>2]=b;x=v+4|0;c[x>>2]=354;k=b+400|0;o=0;Xa(107,u|0,g|0);m=o;o=0;if(!(m&1)){o=0;m=ja(57,u|0,59912)|0;b=o;o=0;if(b&1)j=Fb()|0;else{a[n>>0]=0;c[j>>2]=c[e>>2];b=c[g+4>>2]|0;o=0;c[p>>2]=c[j>>2];b=Ha(43,d|0,p|0,f|0,u|0,b|0,h|0,n|0,m|0,v|0,r|0,k|0)|0;g=o;o=0;a:do if(g&1)y=11;else{b:do if(b){o=0;pa(c[(c[m>>2]|0)+48>>2]|0,m|0,56078,56088,p|0)|0;g=o;o=0;if(g&1)b=Fb()|0;else{k=c[r>>2]|0;f=c[v>>2]|0;b=k-f|0;if((b|0)>392){b=nI((b>>>2)+2|0)|0;j=b;if(!b){o=0;La(45);o=0}else y=16}else{b=q;j=0;y=16}do if((y|0)==16){if(a[n>>0]|0){a[b>>0]=45;b=b+1|0}g=p+40|0;n=p;while(1){if(f>>>0>=k>>>0)break;m=c[f>>2]|0;k=p;while(1){if((k|0)==(g|0)){k=g;break}if((c[k>>2]|0)==(m|0))break;k=k+4|0}a[b>>0]=a[56078+(k-n>>2)>>0]|0;f=f+4|0;b=b+1|0;k=c[r>>2]|0}a[b>>0]=0;c[s>>2]=i;if((gK(q,55963,s)|0)!=1){o=0;Na(355,55967);o=0;break}if(j|0)oI(j);break b}while(0);b=Fb()|0;if(j|0)oI(j)}break a}while(0);b=c[d>>2]|0;do if(b){j=c[b+12>>2]|0;if((j|0)==(c[b+16>>2]|0)){o=0;b=fa(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;i=o;o=0;if(i&1){y=11;break a}}else b=ZK(c[j>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;k=1;break}else{k=(c[d>>2]|0)==0;break}}else k=1;while(0);j=c[e>>2]|0;do if(j){b=c[j+12>>2]|0;if((b|0)==(c[j+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,j|0)|0;i=o;o=0;if(i&1){y=11;break a}}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(k)break;else{y=46;break}else{c[e>>2]=0;y=44;break}}else y=44;while(0);if((y|0)==44?k:0)y=46;if((y|0)==46)c[h>>2]=c[h>>2]|2;j=c[d>>2]|0;WL(u);b=c[v>>2]|0;c[v>>2]=0;if(b|0?(o=0,Na(c[x>>2]|0,b|0),y=o,o=0,y&1):0){y=Gb(0)|0;_g(y)}l=t;return j|0}while(0);if((y|0)==11)b=Fb()|0;j=b}WL(u);b=c[v>>2]|0;c[v>>2]=0;if(!b)w=j;else{k=c[x>>2]|0;y=54}}else{j=Fb()|0;c[v>>2]=0;k=354;y=54}if((y|0)==54){o=0;Na(k|0,b|0);y=o;o=0;if(y&1){y=Gb(0)|0;_g(y)}else w=j}Qb(w|0);return 0}function oQ(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;u=l;l=l+432|0;m=u+424|0;b=u+24|0;w=u+16|0;q=u+8|0;t=u;n=u+428|0;j=u+4|0;c[w>>2]=b;y=w+4|0;c[y>>2]=354;k=b+400|0;o=0;Xa(107,t|0,g|0);s=o;o=0;if(!(s&1)){o=0;p=ja(57,t|0,59912)|0;s=o;o=0;if(s&1)j=Fb()|0;else{a[n>>0]=0;s=c[e>>2]|0;c[j>>2]=s;b=c[g+4>>2]|0;r=s;o=0;c[m>>2]=c[j>>2];b=Ha(43,d|0,m|0,f|0,t|0,b|0,h|0,n|0,p|0,w|0,q|0,k|0)|0;f=o;o=0;a:do if(!(f&1)){if(b){b=i+8+3|0;if((a[b>>0]|0)<0){f=c[i>>2]|0;c[m>>2]=0;HL(f,m);c[i+4>>2]=0}else{c[m>>2]=0;HL(i,m);a[b>>0]=0}if(a[n>>0]|0){o=0;b=ja(c[(c[p>>2]|0)+44>>2]|0,p|0,45)|0;n=o;o=0;if(n&1)break;o=0;Xa(372,i|0,b|0);n=o;o=0;if(n&1)break}o=0;g=ja(c[(c[p>>2]|0)+44>>2]|0,p|0,48)|0;p=o;o=0;if(p&1)break;j=c[q>>2]|0;k=j+-4|0;b=c[w>>2]|0;while(1){if(b>>>0>=k>>>0)break;if((c[b>>2]|0)!=(g|0))break;b=b+4|0}o=0;la(105,i|0,b|0,j|0)|0;i=o;o=0;if(i&1)break}b=c[d>>2]|0;do if(b){j=c[b+12>>2]|0;if((j|0)==(c[b+16>>2]|0)){o=0;b=fa(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;i=o;o=0;if(i&1)break a}else b=ZK(c[j>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;j=1;break}else{j=(c[d>>2]|0)==0;break}}else j=1;while(0);do if(s){b=c[r+12>>2]|0;if((b|0)==(c[r+16>>2]|0)){o=0;b=fa(c[(c[s>>2]|0)+36>>2]|0,r|0)|0;s=o;o=0;if(s&1)break a}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(j)break;else{x=34;break}else{c[e>>2]=0;x=32;break}}else x=32;while(0);if((x|0)==32?j:0)x=34;if((x|0)==34)c[h>>2]=c[h>>2]|2;j=c[d>>2]|0;WL(t);b=c[w>>2]|0;c[w>>2]=0;if(b|0?(o=0,Na(c[y>>2]|0,b|0),y=o,o=0,y&1):0){y=Gb(0)|0;_g(y)}l=u;return j|0}while(0);j=Fb()|0}WL(t);b=c[w>>2]|0;c[w>>2]=0;if(!b)v=j;else x=41}else{j=Fb()|0;c[w>>2]=0;x=41}if((x|0)==41){o=0;Na(c[y>>2]|0,b|0);y=o;o=0;if(y&1){y=Gb(0)|0;_g(y)}else v=j}Qb(v|0);return 0}function pQ(b,e,f,g,h,i,j,k,m,n,p){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;p=p|0;var 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,Z=0,_=0;Y=l;l=l+512|0;J=Y+496|0;Q=Y+96|0;_=Y+88|0;R=Y+80|0;K=Y+76|0;L=Y+500|0;M=Y+72|0;N=Y+68|0;T=Y+56|0;U=Y+44|0;V=Y+32|0;W=Y+20|0;X=Y+8|0;O=Y+4|0;S=Y;c[J>>2]=p;c[_>>2]=Q;Z=_+4|0;c[Z>>2]=354;c[R>>2]=Q;c[K>>2]=Q+400;c[T>>2]=0;c[T+4>>2]=0;c[T+8>>2]=0;p=0;while(1){if((p|0)==3)break;c[T+(p<<2)>>2]=0;p=p+1|0}c[U>>2]=0;c[U+4>>2]=0;c[U+8>>2]=0;p=0;while(1){if((p|0)==3)break;c[U+(p<<2)>>2]=0;p=p+1|0}c[V>>2]=0;c[V+4>>2]=0;c[V+8>>2]=0;p=0;while(1){if((p|0)==3)break;c[V+(p<<2)>>2]=0;p=p+1|0}c[W>>2]=0;c[W+4>>2]=0;c[W+8>>2]=0;p=0;while(1){if((p|0)==3)break;c[W+(p<<2)>>2]=0;p=p+1|0}c[X>>2]=0;c[X+4>>2]=0;c[X+8>>2]=0;p=0;while(1){if((p|0)==3)break;c[X+(p<<2)>>2]=0;p=p+1|0}o=0;tb(43,f|0,g|0,L|0,M|0,N|0,T|0,U|0,V|0,W|0,O|0);Q=o;o=0;a:do if(Q&1)f=Fb()|0;else{c[n>>2]=c[m>>2];F=V+8+3|0;G=V+4|0;H=W+8+3|0;I=W+4|0;x=(h&512|0)!=0;y=U+8+3|0;z=U+4|0;A=X+8+3|0;B=X+4|0;C=L+3|0;D=T+11|0;E=T+4|0;Q=0;w=0;b:while(1){h=(Q|0)!=0;if(w>>>0>=4){P=247;break}p=c[b>>2]|0;do if(p){f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else p=ZK(c[f>>2]|0)|0;if(oL(p,YK()|0)|0){c[b>>2]=0;g=1;break}else{g=(c[b>>2]|0)==0;break}}else g=1;while(0);f=c[e>>2]|0;do if(f){p=c[f+12>>2]|0;if((p|0)==(c[f+16>>2]|0)){o=0;p=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=35;break b}}else p=ZK(c[p>>2]|0)|0;if(!(oL(p,YK()|0)|0))if(g){v=f;break}else{P=247;break b}else{c[e>>2]=0;P=32;break}}else P=32;while(0);if((P|0)==32){P=0;if(g){P=247;break}else v=0}p=(w|0)!=3;c:do switch(a[L+w>>0]|0){case 1:{if(p){p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;P=o;o=0;if(P&1){P=35;break b}}else p=ZK(c[f>>2]|0)|0;o=0;p=la(c[(c[k>>2]|0)+12>>2]|0,k|0,8192,p|0)|0;P=o;o=0;if(P&1){P=35;break b}if(!p){P=47;break b}p=c[b>>2]|0;f=p+12|0;g=c[f>>2]|0;if((g|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;P=o;o=0;if(P&1){P=35;break b}}else{c[f>>2]=g+4;p=ZK(c[g>>2]|0)|0}o=0;Xa(372,X|0,p|0);P=o;o=0;if(P&1){P=35;break b}else{p=v;h=v;P=49}}else p=Q;break}case 0:{if(p){p=v;h=v;P=49}else p=Q;break}case 3:{p=a[F>>0]|0;p=p<<24>>24<0?c[G>>2]|0:p&255;h=a[H>>0]|0;h=h<<24>>24<0?c[I>>2]|0:h&255;if((p|0)==(0-h|0))p=Q;else{if(!p){p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else p=ZK(c[f>>2]|0)|0;if((p|0)!=(c[((a[H>>0]|0)<0?c[W>>2]|0:W)>>2]|0)){p=Q;break c}p=c[b>>2]|0;f=p+12|0;g=c[f>>2]|0;if((g|0)==(c[p+16>>2]|0)){o=0;fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else{c[f>>2]=g+4;ZK(c[g>>2]|0)|0}a[j>>0]=1;p=a[H>>0]|0;p=(p<<24>>24<0?c[I>>2]|0:p&255)>>>0>1?W:Q;break c}p=c[b>>2]|0;f=c[p+12>>2]|0;g=(f|0)==(c[p+16>>2]|0);if(!h){if(g){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else p=ZK(c[f>>2]|0)|0;if((p|0)!=(c[((a[F>>0]|0)<0?c[V>>2]|0:V)>>2]|0)){a[j>>0]=1;p=Q;break c}p=c[b>>2]|0;f=p+12|0;g=c[f>>2]|0;if((g|0)==(c[p+16>>2]|0)){o=0;fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else{c[f>>2]=g+4;ZK(c[g>>2]|0)|0}p=a[F>>0]|0;p=(p<<24>>24<0?c[G>>2]|0:p&255)>>>0>1?V:Q;break c}if(g){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else p=ZK(c[f>>2]|0)|0;f=c[b>>2]|0;g=f+12|0;h=c[g>>2]|0;q=(h|0)==(c[f+16>>2]|0);if((p|0)==(c[((a[F>>0]|0)<0?c[V>>2]|0:V)>>2]|0)){if(q){o=0;fa(c[(c[f>>2]|0)+40>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=35;break b}}else{c[g>>2]=h+4;ZK(c[h>>2]|0)|0}p=a[F>>0]|0;p=(p<<24>>24<0?c[G>>2]|0:p&255)>>>0>1?V:Q;break c}if(q){o=0;p=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=35;break b}}else p=ZK(c[h>>2]|0)|0;if((p|0)!=(c[((a[H>>0]|0)<0?c[W>>2]|0:W)>>2]|0)){P=109;break b}p=c[b>>2]|0;f=p+12|0;g=c[f>>2]|0;if((g|0)==(c[p+16>>2]|0)){o=0;fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else{c[f>>2]=g+4;ZK(c[g>>2]|0)|0}a[j>>0]=1;p=a[H>>0]|0;p=(p<<24>>24<0?c[I>>2]|0:p&255)>>>0>1?W:Q}break}case 2:{if(!(w>>>0<2|h)?!(x|(w|0)==2&(a[C>>0]|0)!=0):0){p=0;break c}g=a[y>>0]|0;f=c[U>>2]|0;p=g<<24>>24<0?f:U;d:do if((w|0)!=0?(d[L+(w+-1)>>0]|0)<2:0){t=p;p=g;while(1){u=p<<24>>24<0;g=t;if((g|0)==((u?f:U)+((u?c[z>>2]|0:p&255)<<2)|0))break;o=0;p=la(c[(c[k>>2]|0)+12>>2]|0,k|0,8192,c[g>>2]|0)|0;u=o;o=0;if(u&1){P=119;break b}if(!p){P=117;break}t=g+4|0;p=a[y>>0]|0;f=c[U>>2]|0}if((P|0)==117){P=0;p=a[y>>0]|0;f=c[U>>2]|0}h=p<<24>>24<0?f:U;s=h;r=t-s>>2;q=a[A>>0]|0;g=q<<24>>24<0;q=g?c[B>>2]|0:q&255;if(r>>>0>q>>>0){u=v;h=s;g=v}else{q=(g?c[X>>2]|0:X)+(q<<2)|0;g=q+(0-r<<2)|0;while(1){if((g|0)==(q|0)){u=v;h=t;g=v;break d}if((c[g>>2]|0)!=(c[h>>2]|0)){u=v;h=s;g=v;break d}h=h+4|0;g=g+4|0}}}else{u=v;h=p;p=g;g=v}while(0);e:while(1){r=p<<24>>24<0;p=(r?f:U)+((r?c[z>>2]|0:p&255)<<2)|0;r=h;if((r|0)==(p|0))break;p=c[b>>2]|0;do if(p){f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=149;break b}}else p=ZK(c[f>>2]|0)|0;if(oL(p,YK()|0)|0){c[b>>2]=0;f=1;break}else{f=(c[b>>2]|0)==0;break}}else f=1;while(0);do if(g){p=c[g+12>>2]|0;if((p|0)==(c[g+16>>2]|0)){o=0;p=fa(c[(c[g>>2]|0)+36>>2]|0,g|0)|0;v=o;o=0;if(v&1){P=149;break b}}else p=ZK(c[p>>2]|0)|0;if(!(oL(p,YK()|0)|0))if(f^(u|0)==0){p=u;q=u;break}else{p=r;break e}else{c[e>>2]=0;p=0;P=139;break}}else{p=u;P=139}while(0);if((P|0)==139){P=0;if(f){p=r;break}else q=0}f=c[b>>2]|0;g=c[f+12>>2]|0;if((g|0)==(c[f+16>>2]|0)){o=0;f=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=149;break b}}else f=ZK(c[g>>2]|0)|0;if((f|0)!=(c[r>>2]|0)){p=r;break}f=c[b>>2]|0;g=f+12|0;h=c[g>>2]|0;if((h|0)==(c[f+16>>2]|0)){o=0;fa(c[(c[f>>2]|0)+40>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=150;break b}}else{c[g>>2]=h+4;ZK(c[h>>2]|0)|0}u=p;h=r+4|0;p=a[y>>0]|0;f=c[U>>2]|0;g=q}if(x?(v=a[y>>0]|0,u=v<<24>>24<0,(p|0)!=((u?c[U>>2]|0:U)+((u?c[z>>2]|0:v&255)<<2)|0)):0){P=153;break b}else p=Q;break}case 4:{s=0;p=v;h=v;f:while(1){f=c[b>>2]|0;do if(f){g=c[f+12>>2]|0;if((g|0)==(c[f+16>>2]|0)){o=0;f=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=245;break b}}else f=ZK(c[g>>2]|0)|0;if(oL(f,YK()|0)|0){c[b>>2]=0;g=1;break}else{g=(c[b>>2]|0)==0;break}}else g=1;while(0);do if(h){f=c[h+12>>2]|0;if((f|0)==(c[h+16>>2]|0)){o=0;f=fa(c[(c[h>>2]|0)+36>>2]|0,h|0)|0;v=o;o=0;if(v&1){P=245;break b}}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(g^(p|0)==0){q=p;r=p;break}else{h=p;break f}else{c[e>>2]=0;p=0;P=167;break}}else P=167;while(0);if((P|0)==167){P=0;if(g){h=p;break}else{q=p;r=0}}p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=245;break b}}else p=ZK(c[f>>2]|0)|0;o=0;f=la(c[(c[k>>2]|0)+12>>2]|0,k|0,2048,p|0)|0;v=o;o=0;if(v&1){P=245;break b}if(f){f=c[n>>2]|0;if((f|0)==(c[J>>2]|0)){o=0;bb(154,m|0,n|0,J|0);v=o;o=0;if(v&1){P=245;break b}f=c[n>>2]|0}c[n>>2]=f+4;c[f>>2]=p;p=s+1|0}else{v=a[D>>0]|0;if(!((p|0)==(c[N>>2]|0)&(s|0?((v<<24>>24<0?c[E>>2]|0:v&255)|0)!=0:0))){h=q;break}p=c[R>>2]|0;if((p|0)==(c[K>>2]|0)){o=0;bb(153,_|0,R|0,K|0);v=o;o=0;if(v&1){P=245;break b}p=c[R>>2]|0}c[R>>2]=p+4;c[p>>2]=s;p=0}f=c[b>>2]|0;g=f+12|0;h=c[g>>2]|0;if((h|0)==(c[f+16>>2]|0)){o=0;fa(c[(c[f>>2]|0)+40>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=245;break b}else{s=p;p=q;h=r;continue}}else{c[g>>2]=h+4;ZK(c[h>>2]|0)|0;s=p;p=q;h=r;continue}}p=c[R>>2]|0;if(s|0?(c[_>>2]|0)!=(p|0):0){if((p|0)==(c[K>>2]|0)){o=0;bb(153,_|0,R|0,K|0);v=o;o=0;if(v&1){P=245;break b}p=c[R>>2]|0}c[R>>2]=p+4;c[p>>2]=s}g:do if((c[O>>2]|0)>0){p=c[b>>2]|0;do if(p){f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=245;break b}}else p=ZK(c[f>>2]|0)|0;if(oL(p,YK()|0)|0){c[b>>2]=0;f=1;break}else{f=(c[b>>2]|0)==0;break}}else f=1;while(0);do if(h){p=c[h+12>>2]|0;if((p|0)==(c[h+16>>2]|0)){o=0;p=fa(c[(c[h>>2]|0)+36>>2]|0,h|0)|0;v=o;o=0;if(v&1){P=245;break b}}else p=ZK(c[p>>2]|0)|0;if(!(oL(p,YK()|0)|0))if(f)break;else{P=244;break b}else{c[e>>2]=0;P=205;break}}else P=205;while(0);if((P|0)==205){P=0;if(f){P=244;break b}else h=0}p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=245;break b}}else p=ZK(c[f>>2]|0)|0;if((p|0)!=(c[M>>2]|0)){P=244;break b}p=c[b>>2]|0;f=p+12|0;g=c[f>>2]|0;if((g|0)==(c[p+16>>2]|0)){o=0;fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=245;break b}else p=h}else{c[f>>2]=g+4;ZK(c[g>>2]|0)|0;p=h}while(1){if((c[O>>2]|0)<=0)break g;f=c[b>>2]|0;do if(f){g=c[f+12>>2]|0;if((g|0)==(c[f+16>>2]|0)){o=0;f=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=245;break b}}else f=ZK(c[g>>2]|0)|0;if(oL(f,YK()|0)|0){c[b>>2]=0;g=1;break}else{g=(c[b>>2]|0)==0;break}}else g=1;while(0);do if(h){f=c[h+12>>2]|0;if((f|0)==(c[h+16>>2]|0)){o=0;f=fa(c[(c[h>>2]|0)+36>>2]|0,h|0)|0;v=o;o=0;if(v&1){P=245;break b}}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(g^(p|0)==0){q=p;h=p;break}else{P=244;break b}else{c[e>>2]=0;p=0;P=228;break}}else P=228;while(0);if((P|0)==228){P=0;if(g){P=244;break b}else{q=p;h=0}}p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=245;break b}}else p=ZK(c[f>>2]|0)|0;o=0;p=la(c[(c[k>>2]|0)+12>>2]|0,k|0,2048,p|0)|0;v=o;o=0;if(v&1){P=245;break b}if(!p){P=244;break b}if((c[n>>2]|0)==(c[J>>2]|0)?(o=0,bb(154,m|0,n|0,J|0),v=o,o=0,v&1):0){P=245;break b}p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=245;break b}}else p=ZK(c[f>>2]|0)|0;f=c[n>>2]|0;c[n>>2]=f+4;c[f>>2]=p;c[O>>2]=(c[O>>2]|0)+-1;p=c[b>>2]|0;f=p+12|0;g=c[f>>2]|0;if((g|0)==(c[p+16>>2]|0)){o=0;fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=245;break b}else{p=q;continue}}else{c[f>>2]=g+4;ZK(c[g>>2]|0)|0;p=q;continue}}}while(0);if((c[n>>2]|0)==(c[m>>2]|0)){P=244;break b}else p=Q;break}default:p=Q}while(0);h:do if((P|0)==49)while(1){P=0;f=c[b>>2]|0;do if(f){g=c[f+12>>2]|0;if((g|0)==(c[f+16>>2]|0)){o=0;f=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;v=o;o=0;if(v&1){P=35;break b}}else f=ZK(c[g>>2]|0)|0;if(oL(f,YK()|0)|0){c[b>>2]=0;g=1;break}else{g=(c[b>>2]|0)==0;break}}else g=1;while(0);do if(h){f=c[h+12>>2]|0;if((f|0)==(c[h+16>>2]|0)){o=0;f=fa(c[(c[h>>2]|0)+36>>2]|0,h|0)|0;v=o;o=0;if(v&1){P=35;break b}}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(g^(p|0)==0){q=p;h=p;break}else{p=Q;break h}else{c[e>>2]=0;p=0;P=62;break}}else P=62;while(0);if((P|0)==62){P=0;if(g){p=Q;break h}else{q=p;h=0}}p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1){P=35;break b}}else p=ZK(c[f>>2]|0)|0;o=0;p=la(c[(c[k>>2]|0)+12>>2]|0,k|0,8192,p|0)|0;v=o;o=0;if(v&1){P=35;break b}if(!p){p=Q;break h}p=c[b>>2]|0;f=p+12|0;g=c[f>>2]|0;if((g|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;P=o;o=0;if(P&1){P=35;break b}}else{c[f>>2]=g+4;p=ZK(c[g>>2]|0)|0}o=0;Xa(372,X|0,p|0);P=o;o=0;if(P&1){P=35;break b}else{p=q;P=49}}while(0);Q=p;w=w+1|0}i:switch(P|0){case 35:{f=Fb()|0;break a}case 47:{c[i>>2]=c[i>>2]|4;f=0;break}case 109:{c[i>>2]=c[i>>2]|4;f=0;break}case 119:{f=Fb()|0;break a}case 149:{f=Fb()|0;break a}case 150:{f=Fb()|0;break a}case 153:{c[i>>2]=c[i>>2]|4;f=0;break}case 244:{c[i>>2]=c[i>>2]|4;f=0;break}case 245:{f=Fb()|0;break a}case 247:{j:do if(h){q=Q+8+3|0;r=Q+4|0;h=1;k:while(1){p=a[q>>0]|0;if(p<<24>>24<0)p=c[r>>2]|0;else p=p&255;if(h>>>0>=p>>>0)break j;p=c[b>>2]|0;do if(p){f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;n=o;o=0;if(n&1){P=275;break k}}else p=ZK(c[f>>2]|0)|0;if(oL(p,YK()|0)|0){c[b>>2]=0;g=1;break}else{g=(c[b>>2]|0)==0;break}}else g=1;while(0);p=c[e>>2]|0;do if(p){f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;n=o;o=0;if(n&1){P=275;break k}}else p=ZK(c[f>>2]|0)|0;if(!(oL(p,YK()|0)|0))if(g)break;else{P=274;break k}else{c[e>>2]=0;P=266;break}}else P=266;while(0);if((P|0)==266?(P=0,g):0){P=274;break}p=c[b>>2]|0;f=c[p+12>>2]|0;if((f|0)==(c[p+16>>2]|0)){o=0;p=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;n=o;o=0;if(n&1){P=275;break}}else p=ZK(c[f>>2]|0)|0;if((a[q>>0]|0)<0)f=c[Q>>2]|0;else f=Q;if((p|0)!=(c[f+(h<<2)>>2]|0)){P=274;break}p=h+1|0;f=c[b>>2]|0;g=f+12|0;h=c[g>>2]|0;if((h|0)==(c[f+16>>2]|0)){o=0;fa(c[(c[f>>2]|0)+40>>2]|0,f|0)|0;n=o;o=0;if(n&1){P=275;break}else{h=p;continue}}else{c[g>>2]=h+4;ZK(c[h>>2]|0)|0;h=p;continue}}if((P|0)==274){c[i>>2]=c[i>>2]|4;f=0;break i}else if((P|0)==275){f=Fb()|0;break a}}while(0);f=c[_>>2]|0;p=c[R>>2]|0;if((f|0)!=(p|0)){c[S>>2]=0;o=0;db(107,T|0,f|0,p|0,S|0);R=o;o=0;if(R&1){f=Fb()|0;break a}if(!(c[S>>2]|0)){f=1;break}else{c[i>>2]=c[i>>2]|4;f=0;break}}else f=1;break}}FU(X);FU(W);FU(V);FU(U);pU(T);p=c[_>>2]|0;c[_>>2]=0;if(p|0?(o=0,Na(c[Z>>2]|0,p|0),_=o,o=0,_&1):0){_=Gb(0)|0;_g(_)}l=Y;return f|0}while(0);FU(X);FU(W);FU(V);FU(U);pU(T);p=c[_>>2]|0;c[_>>2]=0;if(p|0?(o=0,Na(c[Z>>2]|0,p|0),_=o,o=0,_&1):0){_=Gb(0)|0;_g(_)}Qb(f|0);return 0}function qQ(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,m=0,n=0,p=0,q=0,r=0;r=l;l=l+16|0;q=r+12|0;n=r;f=b+8|0;p=f+3|0;i=a[p>>0]|0;g=i<<24>>24<0;if(g){j=(c[f>>2]&2147483647)+-1|0;m=c[b+4>>2]|0}else{j=1;m=i&255}k=e-d>>2;do if(k|0){if(g){g=c[b>>2]|0;h=g;f=c[b+4>>2]|0}else{h=b;f=i&255;g=b}if(!(rQ(d,g,h+(f<<2)|0)|0)){g=m+k|0;if((j-m|0)>>>0>>0)LU(b,j,g-j|0,m,m,0,0);if((a[p>>0]|0)<0)f=c[b>>2]|0;else f=b;f=f+(m<<2)|0;while(1){if((d|0)==(e|0))break;HL(f,d);f=f+4|0;d=d+4|0}c[q>>2]=0;HL(f,q);if((a[p>>0]|0)<0){c[b+4>>2]=g;break}else{a[p>>0]=g;break}};c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;if(k>>>0>1073741807)lU(n);do if(k>>>0>=2){f=k+4&-4;if(f>>>0<=1073741823){p=aU(f<<2)|0;c[n>>2]=p;c[n+8>>2]=f|-2147483648;c[n+4>>2]=k;f=p;break}d=Ab(8)|0;o=0;Xa(98,d|0,56853);r=o;o=0;if(r&1){r=Fb()|0;Jb(d|0);Qb(r|0)}else{c[d>>2]=41052;Mb(d|0,3176,299)}}else{a[n+8+3>>0]=k;f=n}while(0);while(1){if((d|0)==(e|0))break;HL(f,d);d=d+4|0;f=f+4|0}c[q>>2]=0;HL(f,q);q=a[n+8+3>>0]|0;e=q<<24>>24<0;o=0;la(106,b|0,(e?c[n>>2]|0:n)|0,(e?c[n+4>>2]|0:q&255)|0)|0;q=o;o=0;if(q&1){r=Fb()|0;FU(n);Qb(r|0)}else{FU(n);break}}while(0);l=r;return b|0}function rQ(a,b,c){a=a|0;b=b|0;c=c|0;return b>>>0<=a>>>0&a>>>0>>0|0}function sQ(b,d,e,f,g,h,i,j,k,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,p=0,q=0;q=l;l=l+16|0;n=q+12|0;p=q;if(b){d=VL(d,61616)|0;kd[c[(c[d>>2]|0)+44>>2]&511](n,d);b=c[n>>2]|0;a[e>>0]=b;a[e+1>>0]=b>>8;a[e+2>>0]=b>>16;a[e+3>>0]=b>>24;kd[c[(c[d>>2]|0)+32>>2]&511](p,d);b=k+8+3|0;if((a[b>>0]|0)<0){e=c[k>>2]|0;c[n>>2]=0;HL(e,n);c[k+4>>2]=0}else{c[n>>2]=0;HL(k,n);a[b>>0]=0}o=0;Xa(373,k|0,0);e=o;o=0;if(e&1){e=Gb(0)|0;_g(e)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);kd[c[(c[d>>2]|0)+28>>2]&511](p,d);b=j+8+3|0;if((a[b>>0]|0)<0){k=c[j>>2]|0;c[n>>2]=0;HL(k,n);c[j+4>>2]=0}else{c[n>>2]=0;HL(j,n);a[b>>0]=0}o=0;Xa(373,j|0,0);k=o;o=0;if(k&1){k=Gb(0)|0;_g(k)};c[j>>2]=c[p>>2];c[j+4>>2]=c[p+4>>2];c[j+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);c[f>>2]=Qc[c[(c[d>>2]|0)+12>>2]&255](d)|0;c[g>>2]=Qc[c[(c[d>>2]|0)+16>>2]&255](d)|0;kd[c[(c[d>>2]|0)+20>>2]&511](p,d);b=h+11|0;if((a[b>>0]|0)<0){g=c[h>>2]|0;a[n>>0]=0;ah(g,n);c[h+4>>2]=0}else{a[n>>0]=0;ah(h,n);a[b>>0]=0}o=0;Xa(172,h|0,0);g=o;o=0;if(g&1){g=Gb(0)|0;_g(g)};c[h>>2]=c[p>>2];c[h+4>>2]=c[p+4>>2];c[h+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[d>>2]|0)+24>>2]&511](p,d);b=i+8+3|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;c[n>>2]=0;HL(h,n);c[i+4>>2]=0}else{c[n>>2]=0;HL(i,n);a[b>>0]=0}o=0;Xa(373,i|0,0);n=o;o=0;if(n&1){n=Gb(0)|0;_g(n)};c[i>>2]=c[p>>2];c[i+4>>2]=c[p+4>>2];c[i+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);b=Qc[c[(c[d>>2]|0)+36>>2]&255](d)|0}else{d=VL(d,61608)|0;kd[c[(c[d>>2]|0)+44>>2]&511](n,d);b=c[n>>2]|0;a[e>>0]=b;a[e+1>>0]=b>>8;a[e+2>>0]=b>>16;a[e+3>>0]=b>>24;kd[c[(c[d>>2]|0)+32>>2]&511](p,d);b=k+8+3|0;if((a[b>>0]|0)<0){e=c[k>>2]|0;c[n>>2]=0;HL(e,n);c[k+4>>2]=0}else{c[n>>2]=0;HL(k,n);a[b>>0]=0}o=0;Xa(373,k|0,0);e=o;o=0;if(e&1){e=Gb(0)|0;_g(e)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);kd[c[(c[d>>2]|0)+28>>2]&511](p,d);b=j+8+3|0;if((a[b>>0]|0)<0){k=c[j>>2]|0;c[n>>2]=0;HL(k,n);c[j+4>>2]=0}else{c[n>>2]=0;HL(j,n);a[b>>0]=0}o=0;Xa(373,j|0,0);k=o;o=0;if(k&1){k=Gb(0)|0;_g(k)};c[j>>2]=c[p>>2];c[j+4>>2]=c[p+4>>2];c[j+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);c[f>>2]=Qc[c[(c[d>>2]|0)+12>>2]&255](d)|0;c[g>>2]=Qc[c[(c[d>>2]|0)+16>>2]&255](d)|0;kd[c[(c[d>>2]|0)+20>>2]&511](p,d);b=h+11|0;if((a[b>>0]|0)<0){g=c[h>>2]|0;a[n>>0]=0;ah(g,n);c[h+4>>2]=0}else{a[n>>0]=0;ah(h,n);a[b>>0]=0}o=0;Xa(172,h|0,0);g=o;o=0;if(g&1){g=Gb(0)|0;_g(g)};c[h>>2]=c[p>>2];c[h+4>>2]=c[p+4>>2];c[h+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[d>>2]|0)+24>>2]&511](p,d);b=i+8+3|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;c[n>>2]=0;HL(h,n);c[i+4>>2]=0}else{c[n>>2]=0;HL(i,n);a[b>>0]=0}o=0;Xa(373,i|0,0);n=o;o=0;if(n&1){n=Gb(0)|0;_g(n)};c[i>>2]=c[p>>2];c[i+4>>2]=c[p+4>>2];c[i+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);b=Qc[c[(c[d>>2]|0)+36>>2]&255](d)|0}c[m>>2]=b;l=q;return}function tQ(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;j=a+4|0;e=(c[j>>2]|0)!=354;h=c[a>>2]|0;f=(c[d>>2]|0)-h|0;f=f>>>0<2147483647?f<<1:-1;f=(f|0)==0?4:f;g=(c[b>>2]|0)-h>>2;h=pI(e?h:0,f)|0;if(!h)eU();do if(!e){e=c[a>>2]|0;c[a>>2]=h;if(e){o=0;Na(c[j>>2]|0,e|0);h=o;o=0;if(h&1){h=Gb(0)|0;_g(h)}else{i=c[a>>2]|0;break}}else i=h}else{c[a>>2]=h;i=h}while(0);c[j>>2]=356;c[b>>2]=i+(g<<2);c[d>>2]=(c[a>>2]|0)+(f>>>2<<2);return}function uQ(a){a=a|0;BL(a);return}function vQ(a){a=a|0;BL(a);cU(a);return}function wQ(b,d,e,f,g,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=+i;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;C=l;l=l+384|0;v=C+8|0;k=C;b=C+284|0;p=C+72|0;j=C+184|0;H=C+68|0;w=C+180|0;x=C+177|0;y=C+176|0;E=C+56|0;F=C+44|0;G=C+32|0;q=C+28|0;n=C+76|0;z=C+24|0;A=C+16|0;B=C+20|0;c[p>>2]=b;h[v>>3]=i;b=YJ(b,100,56184,v)|0;do if(b>>>0>99){o=0;b=da(44)|0;u=o;o=0;if(!(u&1)?(o=0,h[k>>3]=i,m=pa(65,p|0,b|0,56184,k|0)|0,u=o,o=0,!(u&1)):0){b=c[p>>2]|0;if(!b){o=0;La(45);o=0;k=0;b=0;u=6;break}j=nI(m)|0;k=j;if(!j){o=0;La(45);o=0;u=6}else{t=m;u=9}}else{k=0;b=0;u=6}}else{t=b;k=0;b=0;u=9}while(0);if((u|0)==9){o=0;Xa(107,H|0,f|0);s=o;o=0;if(s&1)u=6;else{o=0;s=ja(57,H|0,59880)|0;r=o;o=0;do if(r&1)j=Fb()|0;else{r=c[p>>2]|0;o=0;pa(c[(c[s>>2]|0)+32>>2]|0,s|0,r|0,r+t|0,j|0)|0;r=o;o=0;if(r&1){j=Fb()|0;break}if(!t)r=0;else r=(a[c[p>>2]>>0]|0)==45;c[E>>2]=0;c[E+4>>2]=0;c[E+8>>2]=0;m=0;while(1){if((m|0)==3)break;c[E+(m<<2)>>2]=0;m=m+1|0}c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;m=0;while(1){if((m|0)==3)break;c[F+(m<<2)>>2]=0;m=m+1|0}c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;m=0;while(1){if((m|0)==3)break;c[G+(m<<2)>>2]=0;m=m+1|0}o=0;tb(44,e|0,r|0,H|0,w|0,x|0,y|0,E|0,F|0,G|0,q|0);e=o;o=0;if(e&1)j=Fb()|0;else{e=c[q>>2]|0;if((t|0)>(e|0)){p=a[G+11>>0]|0;q=a[F+11>>0]|0;m=1;p=(p<<24>>24<0?c[G+4>>2]|0:p&255)+(t-e<<1)|0;q=q<<24>>24<0?c[F+4>>2]|0:q&255}else{q=a[G+11>>0]|0;p=a[F+11>>0]|0;m=2;p=p<<24>>24<0?c[F+4>>2]|0:p&255;q=q<<24>>24<0?c[G+4>>2]|0:q&255}m=q+e+p+m|0;if(m>>>0>100){n=nI(m)|0;m=n;if(!n){o=0;La(45);o=0;j=Fb()|0}else u=33}else{m=0;u=33}if((u|0)==33){o=0;vb(42,n|0,z|0,A|0,c[f+4>>2]|0,j|0,j+t|0,s|0,r|0,w|0,a[x>>0]|0,a[y>>0]|0,E|0,F|0,G|0,e|0);y=o;o=0;if(!(y&1)?(c[B>>2]=c[d>>2],d=c[z>>2]|0,D=c[A>>2]|0,o=0,c[v>>2]=c[B>>2],D=za(80,v|0,n|0,d|0,D|0,f|0,g|0)|0,g=o,o=0,!(g&1)):0){if(m|0)oI(m);pU(G);pU(F);pU(E);WL(H);if(k|0)oI(k);if(b|0)oI(b);l=C;return D|0}j=Fb()|0}if(m|0)oI(m)}pU(G);pU(F);pU(E)}while(0);WL(H)}}if((u|0)==6)j=Fb()|0;if(k|0)oI(k);if(b|0)oI(b);Qb(j|0);return 0}function xQ(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;z=l;l=l+176|0;r=z+56|0;F=z+52|0;w=z+164|0;x=z+161|0;y=z+160|0;B=z+40|0;C=z+28|0;D=z+16|0;m=z+12|0;p=z+60|0;s=z+8|0;t=z+4|0;u=z;nL(F,f);o=0;v=ja(57,F|0,59880)|0;q=o;o=0;a:do if(q&1)b=Fb()|0;else{j=h+11|0;q=a[j>>0]|0;b=q<<24>>24<0;k=h+4|0;do if((b?c[k>>2]|0:q&255)|0){b=a[(b?c[h>>2]|0:h)>>0]|0;o=0;i=ja(c[(c[v>>2]|0)+28>>2]|0,v|0,45)|0;q=o;o=0;if(q&1){b=Fb()|0;break a}else{q=b<<24>>24==i<<24>>24;break}}else q=0;while(0);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[B+(b<<2)>>2]=0;b=b+1|0}c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[D+(b<<2)>>2]=0;b=b+1|0}o=0;tb(44,e|0,q|0,F|0,w|0,x|0,y|0,B|0,C|0,D|0,m|0);n=o;o=0;if(n&1)b=Fb()|0;else{e=a[j>>0]|0;n=e<<24>>24<0;k=n?c[k>>2]|0:e&255;e=c[m>>2]|0;if((k|0)>(e|0)){i=a[D+11>>0]|0;j=a[C+11>>0]|0;b=1;i=(i<<24>>24<0?c[D+4>>2]|0:i&255)+(k-e<<1)|0;j=j<<24>>24<0?c[C+4>>2]|0:j&255}else{j=a[D+11>>0]|0;i=a[C+11>>0]|0;b=2;i=i<<24>>24<0?c[C+4>>2]|0:i&255;j=j<<24>>24<0?c[D+4>>2]|0:j&255}b=j+e+i+b|0;if(b>>>0>100){b=nI(b)|0;i=b;if(!b){o=0;La(45);o=0;b=Fb()|0}else E=24}else{b=p;i=0;E=24}if((E|0)==24){E=n?c[h>>2]|0:h;o=0;vb(42,b|0,s|0,t|0,c[f+4>>2]|0,E|0,E+k|0,v|0,q|0,w|0,a[x>>0]|0,a[y>>0]|0,B|0,C|0,D|0,e|0);E=o;o=0;if(!(E&1)?(c[u>>2]=c[d>>2],E=c[s>>2]|0,A=c[t>>2]|0,o=0,c[r>>2]=c[u>>2],A=za(80,r|0,b|0,E|0,A|0,f|0,g|0)|0,E=o,o=0,!(E&1)):0){if(i|0)oI(i);pU(D);pU(C);pU(B);WL(F);l=z;return A|0}b=Fb()|0}if(i|0)oI(i)}pU(D);pU(C);pU(B)}while(0);WL(F);Qb(b|0);return 0}function yQ(b,d,e,f,g,h,i,j,k,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,p=0,q=0,r=0;r=l;l=l+16|0;p=r+12|0;q=r;if(b){n=VL(e,61600)|0;if(d){kd[c[(c[n>>2]|0)+44>>2]&511](p,n);b=c[p>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[n>>2]|0)+32>>2]&511](q,n);b=k+11|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;a[p>>0]=0;ah(f,p);c[k+4>>2]=0}else{a[p>>0]=0;ah(k,p);a[b>>0]=0}o=0;Xa(172,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[q>>2];c[k+4>>2]=c[q+4>>2];c[k+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);e=n}else{kd[c[(c[n>>2]|0)+40>>2]&511](p,n);b=c[p>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[n>>2]|0)+28>>2]&511](q,n);b=k+11|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;a[p>>0]=0;ah(f,p);c[k+4>>2]=0}else{a[p>>0]=0;ah(k,p);a[b>>0]=0}o=0;Xa(172,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[q>>2];c[k+4>>2]=c[q+4>>2];c[k+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);e=n}a[g>>0]=Qc[c[(c[n>>2]|0)+12>>2]&255](n)|0;a[h>>0]=Qc[c[(c[n>>2]|0)+16>>2]&255](n)|0;kd[c[(c[e>>2]|0)+20>>2]&511](q,n);b=i+11|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;a[p>>0]=0;ah(h,p);c[i+4>>2]=0}else{a[p>>0]=0;ah(i,p);a[b>>0]=0}o=0;Xa(172,i|0,0);h=o;o=0;if(h&1){h=Gb(0)|0;_g(h)};c[i>>2]=c[q>>2];c[i+4>>2]=c[q+4>>2];c[i+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);kd[c[(c[e>>2]|0)+24>>2]&511](q,n);b=j+11|0;if((a[b>>0]|0)<0){i=c[j>>2]|0;a[p>>0]=0;ah(i,p);c[j+4>>2]=0}else{a[p>>0]=0;ah(j,p);a[b>>0]=0}o=0;Xa(172,j|0,0);p=o;o=0;if(p&1){p=Gb(0)|0;_g(p)};c[j>>2]=c[q>>2];c[j+4>>2]=c[q+4>>2];c[j+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);b=Qc[c[(c[n>>2]|0)+36>>2]&255](n)|0}else{n=VL(e,61592)|0;if(d){kd[c[(c[n>>2]|0)+44>>2]&511](p,n);b=c[p>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[n>>2]|0)+32>>2]&511](q,n);b=k+11|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;a[p>>0]=0;ah(f,p);c[k+4>>2]=0}else{a[p>>0]=0;ah(k,p);a[b>>0]=0}o=0;Xa(172,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[q>>2];c[k+4>>2]=c[q+4>>2];c[k+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);e=n}else{kd[c[(c[n>>2]|0)+40>>2]&511](p,n);b=c[p>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[n>>2]|0)+28>>2]&511](q,n);b=k+11|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;a[p>>0]=0;ah(f,p);c[k+4>>2]=0}else{a[p>>0]=0;ah(k,p);a[b>>0]=0}o=0;Xa(172,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[q>>2];c[k+4>>2]=c[q+4>>2];c[k+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);e=n}a[g>>0]=Qc[c[(c[n>>2]|0)+12>>2]&255](n)|0;a[h>>0]=Qc[c[(c[n>>2]|0)+16>>2]&255](n)|0;kd[c[(c[e>>2]|0)+20>>2]&511](q,n);b=i+11|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;a[p>>0]=0;ah(h,p);c[i+4>>2]=0}else{a[p>>0]=0;ah(i,p);a[b>>0]=0}o=0;Xa(172,i|0,0);h=o;o=0;if(h&1){h=Gb(0)|0;_g(h)};c[i>>2]=c[q>>2];c[i+4>>2]=c[q+4>>2];c[i+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);kd[c[(c[e>>2]|0)+24>>2]&511](q,n);b=j+11|0;if((a[b>>0]|0)<0){i=c[j>>2]|0;a[p>>0]=0;ah(i,p);c[j+4>>2]=0}else{a[p>>0]=0;ah(j,p);a[b>>0]=0}o=0;Xa(172,j|0,0);p=o;o=0;if(p&1){p=Gb(0)|0;_g(p)};c[j>>2]=c[q>>2];c[j+4>>2]=c[q+4>>2];c[j+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);b=Qc[c[(c[n>>2]|0)+36>>2]&255](n)|0}c[m>>2]=b;l=r;return}function zQ(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var 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;c[f>>2]=d;z=q+11|0;H=q+4|0;A=p+11|0;B=p+4|0;C=(g&512|0)==0;D=j+8|0;E=(r|0)>0;F=o+11|0;G=o+4|0;y=0;while(1){if((y|0)==4)break;a:do switch(a[l+y>>0]|0){case 0:{c[e>>2]=c[f>>2];break}case 1:{c[e>>2]=c[f>>2];w=Sc[c[(c[j>>2]|0)+28>>2]&127](j,32)|0;x=c[f>>2]|0;c[f>>2]=x+1;a[x>>0]=w;break}case 3:{x=a[z>>0]|0;s=x<<24>>24<0;if((s?c[H>>2]|0:x&255)|0){w=a[(s?c[q>>2]|0:q)>>0]|0;x=c[f>>2]|0;c[f>>2]=x+1;a[x>>0]=w}break}case 2:{t=a[A>>0]|0;s=t<<24>>24<0;t=s?c[B>>2]|0:t&255;if(!(C|(t|0)==0)){x=s?c[p>>2]|0:p;u=x+t|0;s=c[f>>2]|0;t=x;while(1){if((t|0)==(u|0))break;a[s>>0]=a[t>>0]|0;s=s+1|0;t=t+1|0}c[f>>2]=s}break}case 4:{t=c[f>>2]|0;h=k?h+1|0:h;u=h;while(1){if(u>>>0>=i>>>0)break;s=a[u>>0]|0;if(s<<24>>24<=-1)break;if(!(b[(c[D>>2]|0)+(s<<24>>24<<1)>>1]&2048))break;u=u+1|0}if(E){v=r;while(1){s=(v|0)>0;if(!(u>>>0>h>>>0&s))break;x=u+-1|0;s=a[x>>0]|0;w=c[f>>2]|0;c[f>>2]=w+1;a[w>>0]=s;v=v+-1|0;u=x}if(s)w=Sc[c[(c[j>>2]|0)+28>>2]&127](j,48)|0;else w=0;s=v;while(1){v=c[f>>2]|0;c[f>>2]=v+1;if((s|0)<=0)break;a[v>>0]=w;s=s+-1|0}a[v>>0]=m}b:do if((u|0)==(h|0)){w=Sc[c[(c[j>>2]|0)+28>>2]&127](j,48)|0;x=c[f>>2]|0;c[f>>2]=x+1;a[x>>0]=w}else{x=a[F>>0]|0;s=x<<24>>24<0;if(!((s?c[G>>2]|0:x&255)|0)){w=-1;v=0;x=0}else{w=a[(s?c[o>>2]|0:o)>>0]|0;v=0;x=0}while(1){if((u|0)==(h|0))break b;if((x|0)==(w|0)){w=c[f>>2]|0;c[f>>2]=w+1;a[w>>0]=n;v=v+1|0;w=a[F>>0]|0;s=w<<24>>24<0;if(v>>>0<(s?c[G>>2]|0:w&255)>>>0){w=a[(s?c[o>>2]|0:o)+v>>0]|0;w=w<<24>>24==127?-1:w<<24>>24;s=0}else{w=x;s=0}}else s=x;I=u+-1|0;J=a[I>>0]|0;x=c[f>>2]|0;c[f>>2]=x+1;a[x>>0]=J;x=s+1|0;u=I}}while(0);s=c[f>>2]|0;if((t|0)!=(s|0))while(1){s=s+-1|0;if(t>>>0>=s>>>0)break a;J=a[t>>0]|0;a[t>>0]=a[s>>0]|0;a[s>>0]=J;t=t+1|0}break}default:{}}while(0);y=y+1|0}h=a[z>>0]|0;s=h<<24>>24<0;h=s?c[H>>2]|0:h&255;if(h>>>0>1){J=s?c[q>>2]|0:q;t=J+h|0;s=c[f>>2]|0;h=J;while(1){h=h+1|0;if((h|0)==(t|0))break;a[s>>0]=a[h>>0]|0;s=s+1|0}c[f>>2]=s}switch((g&176)<<24>>24){case 32:{c[e>>2]=c[f>>2];break}case 16:break;default:c[e>>2]=d}return}function AQ(a){a=a|0;BL(a);return}function BQ(a){a=a|0;BL(a);cU(a);return}function CQ(b,d,e,f,g,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=+i;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;C=l;l=l+1008|0;v=C+8|0;k=C;b=C+896|0;p=C+888|0;j=C+488|0;H=C+480|0;w=C+892|0;x=C+476|0;y=C+472|0;E=C+460|0;F=C+448|0;G=C+436|0;q=C+432|0;n=C+32|0;z=C+24|0;A=C+16|0;B=C+20|0;c[p>>2]=b;h[v>>3]=i;b=YJ(b,100,56184,v)|0;do if(b>>>0>99){o=0;b=da(44)|0;u=o;o=0;if(!(u&1)?(o=0,h[k>>3]=i,m=pa(65,p|0,b|0,56184,k|0)|0,u=o,o=0,!(u&1)):0){b=c[p>>2]|0;if(!b){o=0;La(45);o=0;k=0;b=0;u=6;break}j=nI(m<<2)|0;k=j;if(!j){o=0;La(45);o=0;u=6}else{t=m;u=9}}else{k=0;b=0;u=6}}else{t=b;k=0;b=0;u=9}while(0);if((u|0)==9){o=0;Xa(107,H|0,f|0);s=o;o=0;if(s&1)u=6;else{o=0;s=ja(57,H|0,59912)|0;r=o;o=0;do if(r&1)j=Fb()|0;else{r=c[p>>2]|0;o=0;pa(c[(c[s>>2]|0)+48>>2]|0,s|0,r|0,r+t|0,j|0)|0;r=o;o=0;if(r&1){j=Fb()|0;break}if(!t)r=0;else r=(a[c[p>>2]>>0]|0)==45;c[E>>2]=0;c[E+4>>2]=0;c[E+8>>2]=0;m=0;while(1){if((m|0)==3)break;c[E+(m<<2)>>2]=0;m=m+1|0}c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;m=0;while(1){if((m|0)==3)break;c[F+(m<<2)>>2]=0;m=m+1|0}c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;m=0;while(1){if((m|0)==3)break;c[G+(m<<2)>>2]=0;m=m+1|0}o=0;tb(45,e|0,r|0,H|0,w|0,x|0,y|0,E|0,F|0,G|0,q|0);e=o;o=0;if(e&1)j=Fb()|0;else{e=c[q>>2]|0;if((t|0)>(e|0)){p=a[G+8+3>>0]|0;q=a[F+8+3>>0]|0;m=1;p=(p<<24>>24<0?c[G+4>>2]|0:p&255)+(t-e<<1)|0;q=q<<24>>24<0?c[F+4>>2]|0:q&255}else{q=a[G+8+3>>0]|0;p=a[F+8+3>>0]|0;m=2;p=p<<24>>24<0?c[F+4>>2]|0:p&255;q=q<<24>>24<0?c[G+4>>2]|0:q&255}m=q+e+p+m|0;if(m>>>0>100){n=nI(m<<2)|0;m=n;if(!n){o=0;La(45);o=0;j=Fb()|0}else u=33}else{m=0;u=33}if((u|0)==33){o=0;vb(43,n|0,z|0,A|0,c[f+4>>2]|0,j|0,j+(t<<2)|0,s|0,r|0,w|0,c[x>>2]|0,c[y>>2]|0,E|0,F|0,G|0,e|0);y=o;o=0;if(!(y&1)?(c[B>>2]=c[d>>2],d=c[z>>2]|0,D=c[A>>2]|0,o=0,c[v>>2]=c[B>>2],D=za(81,v|0,n|0,d|0,D|0,f|0,g|0)|0,g=o,o=0,!(g&1)):0){if(m|0)oI(m);FU(G);FU(F);pU(E);WL(H);if(k|0)oI(k);if(b|0)oI(b);l=C;return D|0}j=Fb()|0}if(m|0)oI(m)}FU(G);FU(F);pU(E)}while(0);WL(H)}}if((u|0)==6)j=Fb()|0;if(k|0)oI(k);if(b|0)oI(b);Qb(j|0);return 0}function DQ(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;z=l;l=l+480|0;r=z+468|0;F=z+464|0;w=z+472|0;x=z+460|0;y=z+456|0;B=z+444|0;C=z+432|0;D=z+420|0;m=z+416|0;p=z+16|0;s=z+8|0;t=z+4|0;u=z;nL(F,f);o=0;v=ja(57,F|0,59912)|0;q=o;o=0;a:do if(q&1)b=Fb()|0;else{j=h+8+3|0;q=a[j>>0]|0;b=q<<24>>24<0;k=h+4|0;do if((b?c[k>>2]|0:q&255)|0){b=c[(b?c[h>>2]|0:h)>>2]|0;o=0;i=ja(c[(c[v>>2]|0)+44>>2]|0,v|0,45)|0;q=o;o=0;if(q&1){b=Fb()|0;break a}else{q=(b|0)==(i|0);break}}else q=0;while(0);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[B+(b<<2)>>2]=0;b=b+1|0}c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[D+(b<<2)>>2]=0;b=b+1|0}o=0;tb(45,e|0,q|0,F|0,w|0,x|0,y|0,B|0,C|0,D|0,m|0);n=o;o=0;if(n&1)b=Fb()|0;else{e=a[j>>0]|0;n=e<<24>>24<0;k=n?c[k>>2]|0:e&255;e=c[m>>2]|0;if((k|0)>(e|0)){i=a[D+8+3>>0]|0;j=a[C+8+3>>0]|0;b=1;i=(i<<24>>24<0?c[D+4>>2]|0:i&255)+(k-e<<1)|0;j=j<<24>>24<0?c[C+4>>2]|0:j&255}else{j=a[D+8+3>>0]|0;i=a[C+8+3>>0]|0;b=2;i=i<<24>>24<0?c[C+4>>2]|0:i&255;j=j<<24>>24<0?c[D+4>>2]|0:j&255}b=j+e+i+b|0;if(b>>>0>100){b=nI(b<<2)|0;i=b;if(!b){o=0;La(45);o=0;b=Fb()|0}else E=24}else{b=p;i=0;E=24}if((E|0)==24){E=n?c[h>>2]|0:h;o=0;vb(43,b|0,s|0,t|0,c[f+4>>2]|0,E|0,E+(k<<2)|0,v|0,q|0,w|0,c[x>>2]|0,c[y>>2]|0,B|0,C|0,D|0,e|0);E=o;o=0;if(!(E&1)?(c[u>>2]=c[d>>2],E=c[s>>2]|0,A=c[t>>2]|0,o=0,c[r>>2]=c[u>>2],A=za(81,r|0,b|0,E|0,A|0,f|0,g|0)|0,E=o,o=0,!(E&1)):0){if(i|0)oI(i);FU(D);FU(C);pU(B);WL(F);l=z;return A|0}b=Fb()|0}if(i|0)oI(i)}FU(D);FU(C);pU(B)}while(0);WL(F);Qb(b|0);return 0}function EQ(b,d,e,f,g,h,i,j,k,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,p=0,q=0;q=l;l=l+16|0;n=q+12|0;p=q;if(b){e=VL(e,61616)|0;if(d){kd[c[(c[e>>2]|0)+44>>2]&511](n,e);b=c[n>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[e>>2]|0)+32>>2]&511](p,e);b=k+8+3|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;c[n>>2]=0;HL(f,n);c[k+4>>2]=0}else{c[n>>2]=0;HL(k,n);a[b>>0]=0}o=0;Xa(373,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p)}else{kd[c[(c[e>>2]|0)+40>>2]&511](n,e);b=c[n>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[e>>2]|0)+28>>2]&511](p,e);b=k+8+3|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;c[n>>2]=0;HL(f,n);c[k+4>>2]=0}else{c[n>>2]=0;HL(k,n);a[b>>0]=0}o=0;Xa(373,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p)}c[g>>2]=Qc[c[(c[e>>2]|0)+12>>2]&255](e)|0;c[h>>2]=Qc[c[(c[e>>2]|0)+16>>2]&255](e)|0;kd[c[(c[e>>2]|0)+20>>2]&511](p,e);b=i+11|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;a[n>>0]=0;ah(h,n);c[i+4>>2]=0}else{a[n>>0]=0;ah(i,n);a[b>>0]=0}o=0;Xa(172,i|0,0);h=o;o=0;if(h&1){h=Gb(0)|0;_g(h)};c[i>>2]=c[p>>2];c[i+4>>2]=c[p+4>>2];c[i+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[e>>2]|0)+24>>2]&511](p,e);b=j+8+3|0;if((a[b>>0]|0)<0){i=c[j>>2]|0;c[n>>2]=0;HL(i,n);c[j+4>>2]=0}else{c[n>>2]=0;HL(j,n);a[b>>0]=0}o=0;Xa(373,j|0,0);n=o;o=0;if(n&1){n=Gb(0)|0;_g(n)};c[j>>2]=c[p>>2];c[j+4>>2]=c[p+4>>2];c[j+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);b=Qc[c[(c[e>>2]|0)+36>>2]&255](e)|0}else{e=VL(e,61608)|0;if(d){kd[c[(c[e>>2]|0)+44>>2]&511](n,e);b=c[n>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[e>>2]|0)+32>>2]&511](p,e);b=k+8+3|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;c[n>>2]=0;HL(f,n);c[k+4>>2]=0}else{c[n>>2]=0;HL(k,n);a[b>>0]=0}o=0;Xa(373,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p)}else{kd[c[(c[e>>2]|0)+40>>2]&511](n,e);b=c[n>>2]|0;a[f>>0]=b;a[f+1>>0]=b>>8;a[f+2>>0]=b>>16;a[f+3>>0]=b>>24;kd[c[(c[e>>2]|0)+28>>2]&511](p,e);b=k+8+3|0;if((a[b>>0]|0)<0){f=c[k>>2]|0;c[n>>2]=0;HL(f,n);c[k+4>>2]=0}else{c[n>>2]=0;HL(k,n);a[b>>0]=0}o=0;Xa(373,k|0,0);f=o;o=0;if(f&1){f=Gb(0)|0;_g(f)};c[k>>2]=c[p>>2];c[k+4>>2]=c[p+4>>2];c[k+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p)}c[g>>2]=Qc[c[(c[e>>2]|0)+12>>2]&255](e)|0;c[h>>2]=Qc[c[(c[e>>2]|0)+16>>2]&255](e)|0;kd[c[(c[e>>2]|0)+20>>2]&511](p,e);b=i+11|0;if((a[b>>0]|0)<0){h=c[i>>2]|0;a[n>>0]=0;ah(h,n);c[i+4>>2]=0}else{a[n>>0]=0;ah(i,n);a[b>>0]=0}o=0;Xa(172,i|0,0);h=o;o=0;if(h&1){h=Gb(0)|0;_g(h)};c[i>>2]=c[p>>2];c[i+4>>2]=c[p+4>>2];c[i+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}pU(p);kd[c[(c[e>>2]|0)+24>>2]&511](p,e);b=j+8+3|0;if((a[b>>0]|0)<0){i=c[j>>2]|0;c[n>>2]=0;HL(i,n);c[j+4>>2]=0}else{c[n>>2]=0;HL(j,n);a[b>>0]=0}o=0;Xa(373,j|0,0);n=o;o=0;if(n&1){n=Gb(0)|0;_g(n)};c[j>>2]=c[p>>2];c[j+4>>2]=c[p+4>>2];c[j+8>>2]=c[p+8>>2];b=0;while(1){if((b|0)==3)break;c[p+(b<<2)>>2]=0;b=b+1|0}FU(p);b=Qc[c[(c[e>>2]|0)+36>>2]&255](e)|0}c[m>>2]=b;l=q;return}function FQ(b,d,e,f,g,h,i,j,k,l,m,n,o,p,q){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var 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;c[e>>2]=b;B=p+8+3|0;I=p+4|0;C=o+8+3|0;D=o+4|0;E=(f&512|0)==0;F=(q|0)>0;G=n+11|0;H=n+4|0;A=0;while(1){if((A|0)==4)break;a:do switch(a[k+A>>0]|0){case 0:{c[d>>2]=c[e>>2];break}case 1:{c[d>>2]=c[e>>2];y=Sc[c[(c[i>>2]|0)+44>>2]&127](i,32)|0;z=c[e>>2]|0;c[e>>2]=z+4;c[z>>2]=y;break}case 3:{z=a[B>>0]|0;r=z<<24>>24<0;if((r?c[I>>2]|0:z&255)|0){y=c[(r?c[p>>2]|0:p)>>2]|0;z=c[e>>2]|0;c[e>>2]=z+4;c[z>>2]=y}break}case 2:{v=a[C>>0]|0;r=v<<24>>24<0;v=r?c[D>>2]|0:v&255;if(!(E|(v|0)==0)){u=r?c[o>>2]|0:o;s=u+(v<<2)|0;t=c[e>>2]|0;r=t;while(1){if((u|0)==(s|0))break;c[r>>2]=c[u>>2];r=r+4|0;u=u+4|0}c[e>>2]=t+(v<<2)}break}case 4:{s=c[e>>2]|0;g=j?g+4|0:g;r=g;while(1){if(r>>>0>=h>>>0)break;if(!(Tc[c[(c[i>>2]|0)+12>>2]&127](i,2048,c[r>>2]|0)|0))break;r=r+4|0}if(F){u=q;while(1){t=(u|0)>0;if(!(r>>>0>g>>>0&t))break;z=r+-4|0;x=c[z>>2]|0;y=c[e>>2]|0;c[e>>2]=y+4;c[y>>2]=x;u=u+-1|0;r=z}if(t)w=Sc[c[(c[i>>2]|0)+44>>2]&127](i,48)|0;else w=0;v=c[e>>2]|0;while(1){t=v+4|0;if((u|0)<=0)break;c[v>>2]=w;u=u+-1|0;v=t}c[e>>2]=t;c[v>>2]=l}if((r|0)==(g|0)){y=Sc[c[(c[i>>2]|0)+44>>2]&127](i,48)|0;z=c[e>>2]|0;r=z+4|0;c[e>>2]=r;c[z>>2]=y}else{z=a[G>>0]|0;y=z<<24>>24<0;z=z&255;if(!((y?c[H>>2]|0:z)|0)){v=-1;t=0;w=0}else{v=a[(y?c[n>>2]|0:n)>>0]|0;t=0;w=0}while(1){if((r|0)==(g|0))break;u=c[e>>2]|0;if((w|0)==(v|0)){x=u+4|0;c[e>>2]=x;c[u>>2]=m;t=t+1|0;if(t>>>0<(y?c[H>>2]|0:z)>>>0){v=a[(y?c[n>>2]|0:n)+t>>0]|0;v=v<<24>>24==127?-1:v<<24>>24;w=0;u=x}else{v=w;w=0;u=x}}x=r+-4|0;J=c[x>>2]|0;c[e>>2]=u+4;c[u>>2]=J;w=w+1|0;r=x}r=c[e>>2]|0}if((s|0)!=(r|0))while(1){r=r+-4|0;if(s>>>0>=r>>>0)break a;J=c[s>>2]|0;c[s>>2]=c[r>>2];c[r>>2]=J;s=s+4|0}break}default:{}}while(0);A=A+1|0}g=a[B>>0]|0;r=g<<24>>24<0;g=r?c[I>>2]|0:g&255;if(g>>>0>1){r=r?c[p>>2]|0:p;u=r+4|0;r=r+(g<<2)|0;s=c[e>>2]|0;t=r-u|0;g=s;while(1){if((u|0)==(r|0))break;c[g>>2]=c[u>>2];g=g+4|0;u=u+4|0}c[e>>2]=s+(t>>>2<<2)}switch((f&176)<<24>>24){case 32:{c[d>>2]=c[e>>2];break}case 16:break;default:c[d>>2]=b}return}function GQ(a){a=a|0;BL(a);return}function HQ(a){a=a|0;BL(a);cU(a);return}function IQ(b,d,e){b=b|0;d=d|0;e=e|0;e=KJ((a[d+11>>0]|0)<0?c[d>>2]|0:d,1)|0;return e>>>((e|0)!=(-1|0)&1)|0}function JQ(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;i=l;l=l+16|0;j=i;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[j+(d<<2)>>2]=0;d=d+1|0}k=a[h+11>>0]|0;m=k<<24>>24<0;d=m?c[h>>2]|0:h;h=d+(m?c[h+4>>2]|0:k&255)|0;while(1){if(d>>>0>=h>>>0){h=8;break}o=0;Xa(109,j|0,a[d>>0]|0);m=o;o=0;if(m&1){h=9;break}d=d+1|0}do if((h|0)==8){d=(a[j+11>>0]|0)<0?c[j>>2]|0:j;o=0;e=pa(67,((e|0)==-1?-1:e<<1)|0,f|0,g|0,d|0)|0;m=o;o=0;if(m&1){d=Fb()|0;break};c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;h=0;while(1){if((h|0)==3)break;c[b+(h<<2)>>2]=0;h=h+1|0}h=d+(LJ(e)|0)|0;while(1){if(d>>>0>=h>>>0){h=19;break}o=0;Xa(109,b|0,a[d>>0]|0);m=o;o=0;if(m&1){h=18;break}d=d+1|0}if((h|0)==18){d=Fb()|0;pU(b);break}else if((h|0)==19){pU(j);l=i;return}}else if((h|0)==9)d=Fb()|0;while(0);pU(j);Qb(d|0)}function KQ(a,b){a=a|0;b=b|0;return}function LQ(a){a=a|0;BL(a);return}function MQ(a){a=a|0;BL(a);cU(a);return}function NQ(b,d,e){b=b|0;d=d|0;e=e|0;e=KJ((a[d+11>>0]|0)<0?c[d>>2]|0:d,1)|0;return e>>>((e|0)!=(-1|0)&1)|0}function OQ(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;x=l;l=l+224|0;m=x+184|0;n=x+192|0;p=x+180|0;q=x+176|0;s=x+168|0;t=x+40|0;u=x+32|0;v=x+28|0;y=x+16|0;r=x+8|0;w=x;c[y>>2]=0;c[y+4>>2]=0;c[y+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[y+(d<<2)>>2]=0;d=d+1|0}c[r+4>>2]=0;c[r>>2]=40224;j=a[h+8+3>>0]|0;k=j<<24>>24<0;d=k?c[h>>2]|0:h;j=d+((k?c[h+4>>2]|0:j&255)<<2)|0;k=n+32|0;h=d;d=0;a:while(1){if(!((d|0)!=2&h>>>0>>0)){n=13;break}c[q>>2]=h;o=0;i=Da(c[(c[r>>2]|0)+12>>2]|0,r|0,m|0,h|0,j|0,q|0,n|0,k|0,p|0)|0;d=o;o=0;if(d&1){n=14;break}if((i|0)==2?1:(c[q>>2]|0)==(h|0)){n=8;break}else d=n;while(1){if(d>>>0>=(c[p>>2]|0)>>>0)break;o=0;Xa(109,y|0,a[d>>0]|0);h=o;o=0;if(h&1){n=14;break a}d=d+1|0}h=c[q>>2]|0;d=i}do if((n|0)==8){o=0;Na(355,55729);o=0;n=14}else if((n|0)==13){BL(r);i=(a[y+11>>0]|0)<0?c[y>>2]|0:y;o=0;h=pa(67,((e|0)==-1?-1:e<<1)|0,f|0,g|0,i|0)|0;g=o;o=0;if(g&1){d=Fb()|0;break};c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[b+(d<<2)>>2]=0;d=d+1|0}c[w+4>>2]=0;c[w>>2]=40272;j=i+(LJ(h)|0)|0;k=j;m=t+128|0;h=i;d=0;b:while(1){if(!((d|0)!=2&h>>>0>>0)){n=27;break}c[v>>2]=h;o=0;i=Da(c[(c[w>>2]|0)+16>>2]|0,w|0,s|0,h|0,((k-h|0)>32?h+32|0:j)|0,v|0,t|0,m|0,u|0)|0;g=o;o=0;if(g&1)break;if((i|0)==2?1:(c[v>>2]|0)==(h|0)){n=22;break}else d=t;while(1){if(d>>>0>=(c[u>>2]|0)>>>0)break;o=0;Xa(372,b|0,c[d>>2]|0);g=o;o=0;if(g&1)break b;d=d+4|0}h=c[v>>2]|0;d=i}if((n|0)==22){o=0;Na(355,55729);o=0}else if((n|0)==27){BL(w);pU(y);l=x;return}d=Fb()|0;BL(w);FU(b)}while(0);if((n|0)==14){d=Fb()|0;BL(r)}pU(y);Qb(d|0)}function PQ(a,b){a=a|0;b=b|0;return}function QQ(a){a=a|0;BL(a);cU(a);return}function RQ(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0;b=l;l=l+16|0;j=b+4|0;a=b;c[j>>2]=d;c[a>>2]=g;h=_Q(d,e,j,g,h,a,1114111,0)|0;c[f>>2]=c[j>>2];c[i>>2]=c[a>>2];l=b;return h|0}function SQ(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0;b=l;l=l+16|0;j=b+4|0;a=b;c[j>>2]=d;c[a>>2]=g;h=ZQ(d,e,j,g,h,a,1114111,0)|0;c[f>>2]=c[j>>2];c[i>>2]=c[a>>2];l=b;return h|0}function TQ(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;c[f>>2]=d;return 3}function UQ(a){a=a|0;return 0}function VQ(a){a=a|0;return 0}function WQ(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return YQ(c,d,e,1114111,0)|0}function XQ(a){a=a|0;return 4}function YQ(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;o=c;p=b;if(((o-p|0)>2&(g&4|0)!=0?(a[b>>0]|0)==-17:0)?(a[b+1>>0]|0)==-69:0){n=0;b=(a[b+2>>0]|0)==-65?b+3|0:b}else n=0;a:while(1){if(!(n>>>0>>0&b>>>0>>0)){q=30;break}k=a[b>>0]|0;m=k&255;h=b+1|0;do if(k<<24>>24>-1)if(m>>>0>f>>>0){q=30;break a}else b=h;else{if((k&255)<194){q=30;break a}i=b+2|0;l=b;g=o-l|0;if((k&255)<224){if((g|0)<2){q=30;break a}g=d[h>>0]|0;if((g&192|0)!=128){q=30;break a}if((g&63|m<<6&1984)>>>0>f>>>0){q=30;break a}else{b=i;break}}j=b+3|0;if((k&255)<240){if((g|0)<3){q=30;break a}i=a[i>>0]|0;h=d[h>>0]|0;g=h&224;switch(k<<24>>24){case -32:{if((g|0)!=160){b=l;break a}break}case -19:{if((g|0)!=128){b=l;break a}break}default:if((h&192|0)!=128){b=l;break a}}g=i&255;if((g&192|0)!=128){q=30;break a}if((h<<6&4032|m<<12&61440|g&63)>>>0>f>>>0){q=30;break a}else{b=j;break}}if((g|0)<4|(k&255)>244){q=30;break a}h=a[h>>0]|0;g=a[i>>0]|0;i=a[j>>0]|0;j=h&255;switch(k<<24>>24){case -16:{if((h+112&255)>=48){b=l;break a}break}case -12:{if((j&240|0)!=128){b=l;break a}break}default:if((j&192|0)!=128){b=l;break a}}h=g&255;if((h&192|0)!=128){q=30;break a}g=i&255;if((g&192|0)!=128){q=30;break a}if((j<<12&258048|m<<18&1835008|h<<6&4032|g&63)>>>0>f>>>0){q=30;break a}else b=b+4|0}while(0);n=n+1|0}return b-p|0}function ZQ(b,e,f,g,h,i,j,k){b=b|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;c[f>>2]=b;c[i>>2]=g;q=e;if((((k&4|0?(l=c[f>>2]|0,(q-l|0)>2):0)?(a[l>>0]|0)==-17:0)?(a[l+1>>0]|0)==-69:0)?(a[l+2>>0]|0)==-65:0)c[f>>2]=l+3;a:while(1){m=c[f>>2]|0;if(m>>>0>=e>>>0){b=0;break}p=c[i>>2]|0;if(p>>>0>=h>>>0){b=1;break}n=a[m>>0]|0;o=n&255;b=m+1|0;do if(n<<24>>24>-1){if(o>>>0>j>>>0){b=2;break a}c[p>>2]=o}else{if((n&255)<194){b=2;break a}l=m+2|0;g=q-m|0;if((n&255)<224){if((g|0)<2){b=1;break a}b=d[b>>0]|0;if((b&192|0)!=128){b=2;break a}b=b&63|o<<6&1984;if(b>>>0>j>>>0){b=2;break a}c[p>>2]=b;b=l;break}k=m+3|0;if((n&255)<240){if((g|0)<3){b=1;break a}g=a[l>>0]|0;l=d[b>>0]|0;b=l&224;switch(n<<24>>24){case -32:{if((b|0)!=160){b=2;break a}break}case -19:{if((b|0)!=128){b=2;break a}break}default:if((l&192|0)!=128){b=2;break a}}b=g&255;if((b&192|0)!=128){b=2;break a}b=l<<6&4032|o<<12&61440|b&63;if(b>>>0>j>>>0){b=2;break a}c[p>>2]=b;b=k;break}if((n&255)>=245){b=2;break a}if((g|0)<4){b=1;break a}g=a[b>>0]|0;b=a[l>>0]|0;l=a[k>>0]|0;k=g&255;switch(n<<24>>24){case -16:{if((g+112&255)>=48){b=2;break a}break}case -12:{if((k&240|0)!=128){b=2;break a}break}default:if((k&192|0)!=128){b=2;break a}}g=b&255;if((g&192|0)!=128){b=2;break a}b=l&255;if((b&192|0)!=128){b=2;break a}b=k<<12&258048|o<<18&1835008|g<<6&4032|b&63;if(b>>>0>j>>>0){b=2;break a}c[p>>2]=b;b=m+4|0}while(0);c[f>>2]=b;c[i>>2]=(c[i>>2]|0)+4}return b|0}function _Q(b,d,e,f,g,h,i,j){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;c[e>>2]=b;c[h>>2]=f;if(j&2)if((g-f|0)<3)b=1;else{c[h>>2]=f+1;a[f>>0]=-17;k=c[h>>2]|0;c[h>>2]=k+1;a[k>>0]=-69;k=c[h>>2]|0;c[h>>2]=k+1;a[k>>0]=-65;k=4}else k=4;a:do if((k|0)==4){b=c[e>>2]|0;while(1){if(b>>>0>=d>>>0){b=0;break a}m=c[b>>2]|0;if(m>>>0>i>>>0|(m&-2048|0)==55296){b=2;break a}do if(m>>>0>=128){l=(m&63|128)&255;if(m>>>0<2048){b=c[h>>2]|0;if((g-b|0)<2){b=1;break a}c[h>>2]=b+1;a[b>>0]=m>>>6|192;m=c[h>>2]|0;c[h>>2]=m+1;a[m>>0]=l;break}b=c[h>>2]|0;f=g-b|0;j=b+1|0;k=(m>>>6&63|128)&255;if(m>>>0<65536){if((f|0)<3){b=1;break a}c[h>>2]=j;a[b>>0]=m>>>12|224;m=c[h>>2]|0;c[h>>2]=m+1;a[m>>0]=k;m=c[h>>2]|0;c[h>>2]=m+1;a[m>>0]=l;break}else{if((f|0)<4){b=1;break a}c[h>>2]=j;a[b>>0]=m>>>18|240;j=c[h>>2]|0;c[h>>2]=j+1;a[j>>0]=m>>>12&63|128;m=c[h>>2]|0;c[h>>2]=m+1;a[m>>0]=k;m=c[h>>2]|0;c[h>>2]=m+1;a[m>>0]=l;break}}else{b=c[h>>2]|0;if((g-b|0)<1){b=1;break a}c[h>>2]=b+1;a[b>>0]=m}while(0);b=(c[e>>2]|0)+4|0;c[e>>2]=b}}while(0);return b|0}function $Q(a){a=a|0;BL(a);cU(a);return}function aR(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;c[f>>2]=d;c[i>>2]=g;return 3}function bR(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;c[f>>2]=d;c[i>>2]=g;return 3}function cR(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;c[f>>2]=d;return 3}function dR(a){a=a|0;return 1}function eR(a){a=a|0;return 1}function fR(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;d=d-c|0;return (d>>>0>>0?d:e)|0}function gR(a){a=a|0;return 1}function hR(b,d,e,f,g,h,i,j){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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+16|0;s=t;q=t+8|0;m=e;while(1){if((m|0)==(f|0)){m=f;break}if(!(c[m>>2]|0))break;m=m+4|0}c[j>>2]=h;c[g>>2]=e;p=i;r=b+8|0;a:while(1){if((h|0)==(i|0)|(e|0)==(f|0)){k=e;b=53;break}u=d;b=c[u+4>>2]|0;n=s;c[n>>2]=c[u>>2];c[n+4>>2]=b;n=$J(c[r>>2]|0)|0;o=0;b=va(64,h|0,g|0,m-e>>2|0,p-h|0,d|0)|0;u=o;o=0;if(u&1){b=11;break}if(n|0?(o=0,fa(165,n|0)|0,u=o,o=0,u&1):0){b=10;break}switch(b|0){case -1:{b=16;break a}case 0:{k=1;b=50;break a}default:{}}h=(c[j>>2]|0)+b|0;c[j>>2]=h;if((h|0)==(i|0)){b=51;break}if((m|0)==(f|0)){m=f;e=c[g>>2]|0}else{e=$J(c[r>>2]|0)|0;o=0;h=la(107,q|0,0,d|0)|0;u=o;o=0;if(u&1){b=36;break}if(e|0?(o=0,fa(165,e|0)|0,u=o,o=0,u&1):0){b=35;break}if((h|0)==-1){k=2;b=49;break}if(h>>>0>(p-(c[j>>2]|0)|0)>>>0){k=1;b=49;break}else e=q;while(1){if(!h)break;n=a[e>>0]|0;u=c[j>>2]|0;c[j>>2]=u+1;a[u>>0]=n;e=e+1|0;h=h+-1|0}e=(c[g>>2]|0)+4|0;c[g>>2]=e;m=e;while(1){if((m|0)==(f|0)){m=f;break}if(!(c[m>>2]|0))break;m=m+4|0}h=c[j>>2]|0}}do if((b|0)==10){u=Gb(0)|0;_g(u)}else if((b|0)==11){k=Fb()|0;if(n|0?(o=0,fa(165,n|0)|0,u=o,o=0,u&1):0){u=Gb(0)|0;_g(u)}Qb(k|0)}else if((b|0)==16){c[j>>2]=h;while(1){if((e|0)==(c[g>>2]|0)){b=28;break}u=c[e>>2]|0;m=$J(c[r>>2]|0)|0;o=0;h=la(107,h|0,u|0,s|0)|0;u=o;o=0;if(u&1){b=22;break}if(m|0?(o=0,fa(165,m|0)|0,u=o,o=0,u&1):0){b=21;break}if((h|0)==-1){b=28;break}h=(c[j>>2]|0)+h|0;c[j>>2]=h;e=e+4|0}if((b|0)==21){u=Gb(0)|0;_g(u)}else if((b|0)==22){k=Fb()|0;if(m|0?(o=0,fa(165,m|0)|0,u=o,o=0,u&1):0){u=Gb(0)|0;_g(u)}Qb(k|0)}else if((b|0)==28){c[g>>2]=e;k=2;b=50;break}}else if((b|0)==35){u=Gb(0)|0;_g(u)}else if((b|0)==36){k=Fb()|0;if(e|0?(o=0,fa(165,e|0)|0,u=o,o=0,u&1):0){u=Gb(0)|0;_g(u)}Qb(k|0)}else if((b|0)==49)b=50;else if((b|0)==51){k=c[g>>2]|0;b=53}while(0);if((b|0)!=50)if((b|0)==53)k=(k|0)!=(f|0)&1;l=t;return k|0}function iR(b,d,e,f,g,h,i,j){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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+16|0;s=t;m=e;while(1){if((m|0)==(f|0)){m=f;break}if(!(a[m>>0]|0))break;m=m+1|0}c[j>>2]=h;c[g>>2]=e;n=i;r=b+8|0;b=h;while(1){if((b|0)==(i|0)|(e|0)==(f|0)){k=e;n=50;break}h=d;p=c[h+4>>2]|0;q=s;c[q>>2]=c[h>>2];c[q+4>>2]=p;q=m;p=$J(c[r>>2]|0)|0;o=0;h=va(65,b|0,g|0,q-e|0,n-b>>2|0,d|0)|0;u=o;o=0;if(u&1){n=11;break}if(p|0?(o=0,fa(165,p|0)|0,u=o,o=0,u&1):0){n=10;break}if((h|0)==-1){m=b;n=16;break}b=(c[j>>2]|0)+(h<<2)|0;c[j>>2]=b;if((b|0)==(i|0)){n=47;break}e=c[g>>2]|0;if((m|0)==(f|0))m=f;else{h=$J(c[r>>2]|0)|0;o=0;m=pa(68,b|0,e|0,1,d|0)|0;u=o;o=0;if(u&1){n=37;break}if(h|0?(o=0,fa(165,h|0)|0,u=o,o=0,u&1):0){n=36;break}if(m|0){k=2;n=46;break}c[j>>2]=(c[j>>2]|0)+4;e=(c[g>>2]|0)+1|0;c[g>>2]=e;m=e;while(1){if((m|0)==(f|0)){m=f;break}if(!(a[m>>0]|0))break;m=m+1|0}b=c[j>>2]|0}}do if((n|0)==10){u=Gb(0)|0;_g(u)}else if((n|0)==11){k=Fb()|0;if(p|0?(o=0,fa(165,p|0)|0,u=o,o=0,u&1):0){u=Gb(0)|0;_g(u)}Qb(k|0)}else if((n|0)==16){a:while(1){c[j>>2]=m;if((e|0)==(c[g>>2]|0)){n=30;break}b=$J(c[r>>2]|0)|0;o=0;m=pa(68,m|0,e|0,q-e|0,s|0)|0;u=o;o=0;if(u&1){n=21;break}if(b|0?(o=0,fa(165,b|0)|0,u=o,o=0,u&1):0){n=20;break}switch(m|0){case -1:{n=27;break a}case -2:{n=28;break a}case 0:{m=1;break}default:{}}e=e+m|0;m=(c[j>>2]|0)+4|0;n=16}if((n|0)==20){u=Gb(0)|0;_g(u)}else if((n|0)==21){k=Fb()|0;if(b|0?(o=0,fa(165,b|0)|0,u=o,o=0,u&1):0){u=Gb(0)|0;_g(u)}Qb(k|0)}else if((n|0)==27){c[g>>2]=e;k=2;n=46;break}else if((n|0)==28){c[g>>2]=e;k=1;n=46;break}else if((n|0)==30){c[g>>2]=e;k=(e|0)!=(f|0)&1;n=46;break}}else if((n|0)==36){u=Gb(0)|0;_g(u)}else if((n|0)==37){k=Fb()|0;if(h|0?(o=0,fa(165,h|0)|0,u=o,o=0,u&1):0){u=Gb(0)|0;_g(u)}Qb(k|0)}else if((n|0)==47){k=c[g>>2]|0;n=50}while(0);if((n|0)!=46)if((n|0)==50)k=(k|0)!=(f|0)&1;l=t;return k|0}function jR(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;i=l;l=l+16|0;h=i;c[g>>2]=e;e=$J(c[b+8>>2]|0)|0;o=0;b=la(107,h|0,0,d|0)|0;d=o;o=0;if(d&1){b=Fb()|0;if(e|0?(o=0,fa(165,e|0)|0,i=o,o=0,i&1):0){i=Gb(0)|0;_g(i)}Qb(b|0)}if(e|0?(o=0,fa(165,e|0)|0,d=o,o=0,d&1):0){d=Gb(0)|0;_g(d)}a:do switch(b|0){case 0:case -1:{b=2;break}default:{b=b+-1|0;if(b>>>0>(f-(c[g>>2]|0)|0)>>>0)b=1;else while(1){if(!b){b=0;break a}d=a[h>>0]|0;f=c[g>>2]|0;c[g>>2]=f+1;a[f>>0]=d;h=h+1|0;b=b+-1|0}}}while(0);l=i;return b|0}function kR(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a+8|0;o=0;d=fa(165,c[b>>2]|0)|0;e=o;o=0;do if(e&1)f=21;else{o=0;e=la(108,0,0,4)|0;a=o;o=0;if(a&1){a=Gb(0)|0;if(!d)break;o=0;fa(165,d|0)|0;g=o;o=0;if(!(g&1))break;g=Gb(0)|0;_g(g)}if(d|0?(o=0,fa(165,d|0)|0,g=o,o=0,g&1):0){g=Gb(0)|0;_g(g)}if(!e){a=c[b>>2]|0;if(!a)a=1;else{o=0;b=fa(165,a|0)|0;g=o;o=0;if(g&1){f=21;break}o=0;d=da(45)|0;g=o;o=0;if(g&1){a=Gb(0)|0;if(!b)break;o=0;fa(165,b|0)|0;g=o;o=0;if(!(g&1))break;g=Gb(0)|0;_g(g)}if(b|0?(o=0,fa(165,b|0)|0,g=o,o=0,g&1):0){g=Gb(0)|0;_g(g)}return (d|0)==1|0}}else a=-1;return a|0}while(0);if((f|0)==21)a=Gb(0)|0;_g(a);return 0}function lR(a){a=a|0;return 0}function mR(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;k=e;i=a+8|0;g=0;j=0;a:while(1){if((d|0)==(e|0)|g>>>0>=f>>>0){a=14;break}h=$J(c[i>>2]|0)|0;o=0;a=la(109,d|0,k-d|0,b|0)|0;l=o;o=0;if(l&1){a=7;break}if(h|0?(o=0,fa(165,h|0)|0,l=o,o=0,l&1):0){a=6;break}switch(a|0){case -2:case -1:{a=14;break a}case 0:{a=1;break}default:{}}g=g+1|0;j=a+j|0;d=d+a|0}if((a|0)==6){l=Gb(0)|0;_g(l)}else if((a|0)==7){a=Fb()|0;if(h|0?(o=0,fa(165,h|0)|0,l=o,o=0,l&1):0){l=Gb(0)|0;_g(l)}Qb(a|0)}else if((a|0)==14)return j|0;return 0}function nR(a){a=a|0;var b=0,d=0,e=0,f=0;a=c[a+8>>2]|0;a:do if(!a)d=1;else{o=0;b=fa(165,a|0)|0;a=o;o=0;do if(!(a&1)){o=0;a=da(45)|0;f=o;o=0;if(f&1){a=Gb(0)|0;if(!b){e=a;break}o=0;fa(165,b|0)|0;f=o;o=0;if(!(f&1)){e=a;break}f=Gb(0)|0;_g(f)}else{if(!b){d=a;break a}o=0;fa(165,b|0)|0;f=o;o=0;if(!(f&1)){d=a;break a}f=Gb(0)|0;_g(f)}}else e=Gb(0)|0;while(0);_g(e)}while(0);return d|0}function oR(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=40320;b=a+8|0;d=c[b>>2]|0;o=0;e=da(44)|0;f=o;o=0;do if(!(f&1)){if((d|0)!=(e|0)?(o=0,Na(353,c[b>>2]|0),f=o,o=0,f&1):0)break;BL(a);return}while(0);f=Gb(0)|0;BL(a);_g(f)}function pR(a){a=a|0;oR(a);cU(a);return}function qR(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0;b=l;l=l+16|0;j=b+4|0;a=b;c[j>>2]=d;c[a>>2]=g;h=zR(d,e,j,g,h,a,1114111,0)|0;c[f>>2]=c[j>>2];c[i>>2]=c[a>>2];l=b;return h|0}function rR(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0;b=l;l=l+16|0;j=b+4|0;a=b;c[j>>2]=d;c[a>>2]=g;h=yR(d,e,j,g,h,a,1114111,0)|0;c[f>>2]=c[j>>2];c[i>>2]=c[a>>2];l=b;return h|0}function sR(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;c[f>>2]=d;return 3}function tR(a){a=a|0;return 0}function uR(a){a=a|0;return 0}function vR(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return xR(c,d,e,1114111,0)|0}function wR(a){a=a|0;return 4}function xR(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;p=c;q=b;if(((p-q|0)>2&(g&4|0)!=0?(a[b>>0]|0)==-17:0)?(a[b+1>>0]|0)==-69:0){o=0;b=(a[b+2>>0]|0)==-65?b+3|0:b}else o=0;a:while(1){if(!(o>>>0>>0&b>>>0>>0)){r=31;break}k=a[b>>0]|0;n=k&255;if(n>>>0>f>>>0){r=31;break}i=b+1|0;do if(k<<24>>24<=-1){if((k&255)<194){r=31;break a}j=b+2|0;l=b;g=p-l|0;if((k&255)<224){if((g|0)<2){r=31;break a}g=d[i>>0]|0;if((g&192|0)!=128){r=31;break a}if((g&63|n<<6&1984)>>>0>f>>>0){r=31;break a}else{g=o;b=j;break}}m=b+3|0;if((k&255)<240){if((g|0)<3){r=31;break a}h=a[j>>0]|0;i=d[i>>0]|0;g=i&224;switch(k<<24>>24){case -32:{if((g|0)!=160){b=l;break a}break}case -19:{if((g|0)!=128){b=l;break a}break}default:if((i&192|0)!=128){b=l;break a}}g=h&255;if((g&192|0)!=128){r=31;break a}if((i<<6&4032|n<<12&61440|g&63)>>>0>f>>>0){r=31;break a}else{g=o;b=m;break}}if((k&255)>=245){r=31;break a}if((e-o|0)>>>0<2|(g|0)<4){r=31;break a}h=a[i>>0]|0;g=a[j>>0]|0;i=a[m>>0]|0;j=h&255;switch(k<<24>>24){case -16:{if((h+112&255)>=48){b=l;break a}break}case -12:{if((j&240|0)!=128){b=l;break a}break}default:if((j&192|0)!=128){b=l;break a}}h=g&255;if((h&192|0)!=128){r=31;break a}g=i&255;if((g&192|0)!=128){r=31;break a}if((j<<12&258048|n<<18&1835008|h<<6&4032|g&63)>>>0>f>>>0){r=31;break a}else{g=o+1|0;b=b+4|0}}else{g=o;b=i}while(0);o=g+1|0}return b-q|0}function yR(e,f,g,h,i,j,k,l){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;c[g>>2]=e;c[j>>2]=h;s=f;if((((l&4|0?(m=c[g>>2]|0,(s-m|0)>2):0)?(a[m>>0]|0)==-17:0)?(a[m+1>>0]|0)==-69:0)?(a[m+2>>0]|0)==-65:0)c[g>>2]=m+3;r=i;a:while(1){h=c[g>>2]|0;e=h>>>0>>0;if(!e){t=40;break}q=c[j>>2]|0;if(q>>>0>=i>>>0){t=40;break}o=a[h>>0]|0;p=o&255;if(p>>>0>k>>>0){e=2;break}e=h+1|0;do if(o<<24>>24>-1)b[q>>1]=o&255;else{if((o&255)<194){e=2;break a}m=s-h|0;l=h+2|0;if((o&255)<224){if((m|0)<2){e=1;break a}e=d[e>>0]|0;if((e&192|0)!=128){e=2;break a}e=e&63|p<<6&1984;if(e>>>0>k>>>0){e=2;break a}b[q>>1]=e;e=l;break}n=h+3|0;if((o&255)<240){if((m|0)<3){e=1;break a}h=a[l>>0]|0;m=d[e>>0]|0;e=m&224;switch(o<<24>>24){case -32:{if((e|0)!=160){e=2;break a}break}case -19:{if((e|0)!=128){e=2;break a}break}default:if((m&192|0)!=128){e=2;break a}}e=h&255;if((e&192|0)!=128){e=2;break a}e=m<<6&4032|p<<12|e&63;if((e&65535)>>>0>k>>>0){e=2;break a}b[q>>1]=e;e=n;break}if((o&255)>=245){e=2;break a}if((m|0)<4){e=1;break a}m=a[e>>0]|0;e=a[l>>0]|0;h=a[n>>0]|0;n=m&255;switch(o<<24>>24){case -16:{if((m+112&255)>=48){e=2;break a}break}case -12:{if((n&240|0)!=128){e=2;break a}break}default:if((n&192|0)!=128){e=2;break a}}l=e&255;if((l&192|0)!=128){e=2;break a}e=h&255;if((e&192|0)!=128){e=2;break a}if((r-q|0)<4){e=1;break a}h=p&7;m=l<<6;e=e&63;if((n<<12&258048|h<<18|m&4032|e)>>>0>k>>>0){e=2;break a}b[q>>1]=n<<2&60|l>>>4&3|((n>>>4&3|h<<2)<<6)+16320|55296;q=q+2|0;c[j>>2]=q;b[q>>1]=e|m&960|56320;e=(c[g>>2]|0)+4|0}while(0);c[g>>2]=e;c[j>>2]=(c[j>>2]|0)+2}if((t|0)==40)e=e&1;return e|0}function zR(d,f,g,h,i,j,k,l){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0;c[g>>2]=d;c[j>>2]=h;if(l&2)if((i-h|0)<3)d=1;else{c[j>>2]=h+1;a[h>>0]=-17;m=c[j>>2]|0;c[j>>2]=m+1;a[m>>0]=-69;m=c[j>>2]|0;c[j>>2]=m+1;a[m>>0]=-65;m=4}else m=4;a:do if((m|0)==4){q=f;d=c[g>>2]|0;while(1){if(d>>>0>=f>>>0){d=0;break a}h=b[d>>1]|0;p=h&65535;if(p>>>0>k>>>0){d=2;break a}do if((h&65535)<128){d=c[j>>2]|0;if((i-d|0)<1){d=1;break a}c[j>>2]=d+1;a[d>>0]=h}else{n=p&63;o=(n|128)&255;if((h&65535)<2048){d=c[j>>2]|0;if((i-d|0)<2){d=1;break a}c[j>>2]=d+1;a[d>>0]=p>>>6|192;p=c[j>>2]|0;c[j>>2]=p+1;a[p>>0]=o;break}l=(p>>>12|224)&255;m=(p>>>6&63|128)&255;if((h&65535)<55296){d=c[j>>2]|0;if((i-d|0)<3){d=1;break a}c[j>>2]=d+1;a[d>>0]=l;p=c[j>>2]|0;c[j>>2]=p+1;a[p>>0]=m;p=c[j>>2]|0;c[j>>2]=p+1;a[p>>0]=o;break}if((h&65535)>=56320){if((h&65535)<57344){d=2;break a}d=c[j>>2]|0;if((i-d|0)<3){d=1;break a}c[j>>2]=d+1;a[d>>0]=l;p=c[j>>2]|0;c[j>>2]=p+1;a[p>>0]=m;p=c[j>>2]|0;c[j>>2]=p+1;a[p>>0]=o;break}if((q-d|0)<4){d=1;break a}d=d+2|0;h=e[d>>1]|0;if((h&64512|0)!=56320){d=2;break a}if((i-(c[j>>2]|0)|0)<4){d=1;break a}l=p&960;if(((l<<10)+65536|n<<10|h&1023)>>>0>k>>>0){d=2;break a}c[g>>2]=d;n=(l>>>6)+1|0;o=c[j>>2]|0;c[j>>2]=o+1;a[o>>0]=n>>>2|240;o=c[j>>2]|0;c[j>>2]=o+1;a[o>>0]=p>>>2&15|n<<4&48|128;o=c[j>>2]|0;c[j>>2]=o+1;a[o>>0]=p<<4&48|h>>>6&15|128;p=c[j>>2]|0;c[j>>2]=p+1;a[p>>0]=h&63|128}while(0);d=(c[g>>2]|0)+2|0;c[g>>2]=d}}while(0);return d|0}function AR(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=40368;e=a+8|0;f=a+12|0;d=0;while(1){b=c[e>>2]|0;if(d>>>0>=(c[f>>2]|0)-b>>2>>>0)break;b=c[b+(d<<2)>>2]|0;if(b|0)ZT(b)|0;d=d+1|0}pU(a+144|0);CR(e);BL(a);return}function BR(a){a=a|0;AR(a);cU(a);return}function CR(b){b=b|0;var d=0,e=0,f=0,g=0;d=c[b>>2]|0;do if(d|0){e=b+4|0;f=c[e>>2]|0;while(1){if((f|0)==(d|0))break;g=f+-4|0;c[e>>2]=g;f=g}if((b+16|0)==(d|0)){a[b+128>>0]=0;break}else{cU(d);break}}while(0);return}function DR(b){b=b|0;var d=0;c[b>>2]=40388;d=c[b+8>>2]|0;if(d|0?a[b+12>>0]|0:0)dU(d);BL(b);return}function ER(a){a=a|0;DR(a);cU(a);return}function FR(a,b){a=a|0;b=b|0;if(b<<24>>24>-1)b=c[(OR()|0)+((b&255)<<2)>>2]&255;return b|0}function GR(b,d,e){b=b|0;d=d|0;e=e|0;while(1){if((d|0)==(e|0))break;b=a[d>>0]|0;if(b<<24>>24>-1){b=OR()|0;b=c[b+(a[d>>0]<<2)>>2]&255}a[d>>0]=b;d=d+1|0}return e|0}function HR(a,b){a=a|0;b=b|0;if(b<<24>>24>-1)b=c[(NR()|0)+(b<<24>>24<<2)>>2]&255;return b|0}function IR(b,d,e){b=b|0;d=d|0;e=e|0;while(1){if((d|0)==(e|0))break;b=a[d>>0]|0;if(b<<24>>24>-1){b=NR()|0;b=c[b+(a[d>>0]<<2)>>2]&255}a[d>>0]=b;d=d+1|0}return e|0}function JR(a,b){a=a|0;b=b|0;return b|0}function KR(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;while(1){if((c|0)==(d|0))break;a[e>>0]=a[c>>0]|0;e=e+1|0;c=c+1|0}return d|0}function LR(a,b,c){a=a|0;b=b|0;c=c|0;return (b<<24>>24>-1?b:c)|0}function MR(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;while(1){if((c|0)==(d|0))break;b=a[c>>0]|0;a[f>>0]=b<<24>>24>-1?b:e;f=f+1|0;c=c+1|0}return d|0}function NR(){var a=0,b=0;o=0;a=da(46)|0;b=o;o=0;if(b&1){b=Gb(0)|0;_g(b)}else return c[a>>2]|0;return 0}function OR(){var a=0,b=0;o=0;a=da(47)|0;b=o;o=0;if(b&1){b=Gb(0)|0;_g(b)}else return c[a>>2]|0;return 0}function PR(){var a=0,b=0;o=0;a=da(48)|0;b=o;o=0;if(b&1){b=Gb(0)|0;_g(b)}else return c[a>>2]|0;return 0}function QR(a){a=a|0;c[a>>2]=40440;pU(a+12|0);BL(a);return}function RR(a){a=a|0;QR(a);cU(a);return}function SR(b){b=b|0;return a[b+8>>0]|0}function TR(b){b=b|0;return a[b+9>>0]|0}function UR(a,b){a=a|0;b=b|0;nU(a,b+12|0);return}function VR(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=Uh(56761)|0;if(f>>>0>4294967279)lU(b);if(f>>>0<11){a[b+11>>0]=f;d=b}else{h=f+16&-16;d=aU(h)|0;c[b>>2]=d;c[b+8>>2]=h|-2147483648;c[b+4>>2]=f}_i(d,56761,f)|0;a[e>>0]=0;ah(d+f|0,e);l=g;return}function WR(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=Uh(56755)|0;if(f>>>0>4294967279)lU(b);if(f>>>0<11){a[b+11>>0]=f;d=b}else{h=f+16&-16;d=aU(h)|0;c[b>>2]=d;c[b+8>>2]=h|-2147483648;c[b+4>>2]=f}_i(d,56755,f)|0;a[e>>0]=0;ah(d+f|0,e);l=g;return}function XR(a){a=a|0;c[a>>2]=40480;pU(a+16|0);BL(a);return}function YR(a){a=a|0;XR(a);cU(a);return}function ZR(a){a=a|0;return c[a+8>>2]|0}function _R(a){a=a|0;return c[a+12>>2]|0}function $R(a,b){a=a|0;b=b|0;nU(a,b+16|0);return}function aS(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=FO(40536)|0;if(f>>>0>1073741807)lU(b);do if(f>>>0>=2){d=f+4&-4;if(d>>>0<=1073741823){h=aU(d<<2)|0;c[b>>2]=h;c[b+8>>2]=d|-2147483648;c[b+4>>2]=f;d=h;break}d=Ab(8)|0;o=0;Xa(98,d|0,56853);h=o;o=0;if(h&1){h=Fb()|0;Jb(d|0);Qb(h|0)}else{c[d>>2]=41052;Mb(d|0,3176,299)}}else{a[b+8+3>>0]=f;d=b}while(0);_K(d,40536,f)|0;c[e>>2]=0;HL(d+(f<<2)|0,e);l=g;return}function bS(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=FO(40512)|0;if(f>>>0>1073741807)lU(b);do if(f>>>0>=2){d=f+4&-4;if(d>>>0<=1073741823){h=aU(d<<2)|0;c[b>>2]=h;c[b+8>>2]=d|-2147483648;c[b+4>>2]=f;d=h;break}d=Ab(8)|0;o=0;Xa(98,d|0,56853);h=o;o=0;if(h&1){h=Fb()|0;Jb(d|0);Qb(h|0)}else{c[d>>2]=41052;Mb(d|0,3176,299)}}else{a[b+8+3>>0]=f;d=b}while(0);_K(d,40512,f)|0;c[e>>2]=0;HL(d+(f<<2)|0,e);l=g;return}function cS(a){a=a|0;BL(a);cU(a);return}function dS(a){a=a|0;BL(a);cU(a);return}function eS(a,c,d){a=a|0;c=c|0;d=d|0;if(d>>>0<128)a=(b[(PR()|0)+(d<<1)>>1]&c)<<16>>16!=0;else a=0;return a|0}function fS(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;while(1){if((d|0)==(f|0))break;if((c[d>>2]|0)>>>0<128){a=PR()|0;a=e[a+(c[d>>2]<<1)>>1]|0}else a=0;b[g>>1]=a;g=g+2|0;d=d+4|0}return f|0}function gS(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;while(1){if((e|0)==(f|0)){e=f;break}if((c[e>>2]|0)>>>0<128?(a=PR()|0,(b[a+(c[e>>2]<<1)>>1]&d)<<16>>16):0)break;e=e+4|0}return e|0}function hS(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;while(1){if((e|0)==(f|0)){e=f;break}if((c[e>>2]|0)>>>0>=128)break;a=PR()|0;if(!((b[a+(c[e>>2]<<1)>>1]&d)<<16>>16))break;e=e+4|0}return e|0}function iS(a,b){a=a|0;b=b|0;if(b>>>0<128)b=c[(OR()|0)+(b<<2)>>2]|0;return b|0}function jS(a,b,d){a=a|0;b=b|0;d=d|0;while(1){if((b|0)==(d|0))break;a=c[b>>2]|0;if(a>>>0<128){a=OR()|0;a=c[a+(c[b>>2]<<2)>>2]|0}c[b>>2]=a;b=b+4|0}return d|0}function kS(a,b){a=a|0;b=b|0;if(b>>>0<128)b=c[(NR()|0)+(b<<2)>>2]|0;return b|0}function lS(a,b,d){a=a|0;b=b|0;d=d|0;while(1){if((b|0)==(d|0))break;a=c[b>>2]|0;if(a>>>0<128){a=NR()|0;a=c[a+(c[b>>2]<<2)>>2]|0}c[b>>2]=a;b=b+4|0}return d|0}function mS(a,b){a=a|0;b=b|0;return b<<24>>24|0}function nS(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;while(1){if((d|0)==(e|0))break;c[f>>2]=a[d>>0];f=f+4|0;d=d+1|0}return e|0}function oS(a,b,c){a=a|0;b=b|0;c=c|0;return (b>>>0<128?b&255:c)|0}function pS(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;h=(e-d|0)>>>2;b=g;g=d;while(1){if((g|0)==(e|0))break;i=c[g>>2]|0;a[b>>0]=i>>>0<128?i&255:f;b=b+1|0;g=g+4|0}return d+(h<<2)|0}function qS(a){a=a|0;BL(a);cU(a);return}function rS(a){a=a|0;BL(a);cU(a);return}function sS(a){a=a|0;BL(a);cU(a);return}function tS(a){a=a|0;c[a>>2]=40796;return}function uS(a){a=a|0;c[a>>2]=40832;return}function vS(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;c[b+4>>2]=f+-1;c[b>>2]=40388;f=b+8|0;c[f>>2]=d;a[b+12>>0]=e&1;if(!d)c[f>>2]=PR()|0;return}function wS(a){a=a|0;var b=0;a=Ab(8)|0;o=0;Xa(98,a|0,56808);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function xS(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+16|0;g=j;c[b+4>>2]=d+-1;c[b>>2]=40368;i=b+8|0;o=0;Xa(374,i|0,28);h=o;o=0;if(h&1)d=Fb()|0;else{h=b+144|0;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;f=Uh(54663)|0;do if(f>>>0>4294967279){o=0;Na(320,h|0);o=0;k=66}else{if(f>>>0<11){a[h+11>>0]=f;d=h}else{e=f+16&-16;o=0;d=fa(107,e|0)|0;m=o;o=0;if(m&1){k=66;break}c[h>>2]=d;c[b+152>>2]=e|-2147483648;c[b+148>>2]=f}_i(d,54663,f)|0;a[g>>0]=0;ah(d+f|0,g);d=c[i>>2]|0;e=b+12|0;f=c[e>>2]|0;while(1){if((f|0)==(d|0))break;m=f+-4|0;c[e>>2]=m;f=m}o=0;La(52);m=o;o=0;do if(((((((((((((!(m&1)?(o=0,Xa(375,b|0,58120),m=o,o=0,!(m&1)):0)?(o=0,La(53),m=o,o=0,!(m&1)):0)?(o=0,Xa(376,b|0,58128),m=o,o=0,!(m&1)):0)?(DS(),o=0,Xa(377,b|0,58136),m=o,o=0,!(m&1)):0)?(o=0,La(54),m=o,o=0,!(m&1)):0)?(o=0,Xa(378,b|0,58152),m=o,o=0,!(m&1)):0)?(o=0,La(55),m=o,o=0,!(m&1)):0)?(o=0,Xa(379,b|0,58160),m=o,o=0,!(m&1)):0)?(o=0,La(56),m=o,o=0,!(m&1)):0)?(o=0,Xa(380,b|0,58168),m=o,o=0,!(m&1)):0)?(o=0,La(57),m=o,o=0,!(m&1)):0)?(o=0,Xa(381,b|0,58184),m=o,o=0,!(m&1)):0)?(o=0,La(58),m=o,o=0,!(m&1)):0){o=0;Xa(382,b|0,58192);m=o;o=0;if(m&1)break;PS();o=0;Xa(383,b|0,58200);m=o;o=0;if(m&1)break;RS();o=0;Xa(384,b|0,58224);m=o;o=0;if(m&1)break;o=0;La(59);m=o;o=0;if(m&1)break;o=0;Xa(385,b|0,58256);m=o;o=0;if(m&1)break;o=0;La(60);m=o;o=0;if(m&1)break;o=0;Xa(386,b|0,58264);m=o;o=0;if(m&1)break;o=0;La(61);m=o;o=0;if(m&1)break;o=0;Xa(387,b|0,58272);m=o;o=0;if(m&1)break;o=0;La(62);m=o;o=0;if(m&1)break;o=0;Xa(388,b|0,58280);m=o;o=0;if(m&1)break;o=0;La(63);m=o;o=0;if(m&1)break;o=0;Xa(389,b|0,58288);m=o;o=0;if(m&1)break;o=0;La(64);m=o;o=0;if(m&1)break;o=0;Xa(390,b|0,58296);m=o;o=0;if(m&1)break;o=0;La(65);m=o;o=0;if(m&1)break;o=0;Xa(391,b|0,58304);m=o;o=0;if(m&1)break;o=0;La(66);m=o;o=0;if(m&1)break;o=0;Xa(392,b|0,58312);m=o;o=0;if(m&1)break;o=0;La(67);m=o;o=0;if(m&1)break;o=0;Xa(393,b|0,58320);m=o;o=0;if(m&1)break;o=0;La(68);m=o;o=0;if(m&1)break;o=0;Xa(394,b|0,58328);m=o;o=0;if(m&1)break;o=0;La(69);m=o;o=0;if(m&1)break;o=0;Xa(395,b|0,58336);m=o;o=0;if(m&1)break;o=0;La(70);m=o;o=0;if(m&1)break;o=0;Xa(396,b|0,58344);m=o;o=0;if(m&1)break;o=0;La(71);m=o;o=0;if(m&1)break;o=0;Xa(397,b|0,58352);m=o;o=0;if(m&1)break;o=0;La(72);m=o;o=0;if(m&1)break;o=0;Xa(398,b|0,58368);m=o;o=0;if(m&1)break;o=0;La(73);m=o;o=0;if(m&1)break;o=0;Xa(399,b|0,58384);m=o;o=0;if(m&1)break;o=0;La(74);m=o;o=0;if(m&1)break;o=0;Xa(400,b|0,58400);m=o;o=0;if(m&1)break;o=0;La(75);m=o;o=0;if(m&1)break;o=0;Xa(401,b|0,58416);m=o;o=0;if(m&1)break;o=0;La(76);m=o;o=0;if(m&1)break;o=0;Xa(402,b|0,58424);m=o;o=0;if(m&1)break;l=j;return}while(0);d=Fb()|0;pU(h)}while(0);if((k|0)==66)d=Fb()|0;CR(i)}BL(b);Qb(d|0)}function yS(b,d){b=b|0;d=d|0;var e=0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;a[b+128>>0]=0;do if(d|0){o=0;Xa(403,b|0,d|0);e=o;o=0;if(!(e&1)?(o=0,Xa(404,b|0,d|0),e=o,o=0,!(e&1)):0)break;e=Fb()|0;CR(b);Qb(e|0)}while(0);return}function zS(){c[14531]=0;c[14530]=38032;return}function AS(a,b){a=a|0;b=b|0;BT(a,b,_L(59864)|0);return}function BS(){c[14533]=0;c[14532]=38064;return}function CS(a,b){a=a|0;b=b|0;BT(a,b,_L(59872)|0);return}function DS(){vS(58136,0,0,1);return}function ES(a,b){a=a|0;b=b|0;BT(a,b,_L(59880)|0);return}function FS(){c[14539]=0;c[14538]=40584;return}function GS(a,b){a=a|0;b=b|0;BT(a,b,_L(59912)|0);return}function HS(){c[14541]=0;c[14540]=40652;return}function IS(a,b){a=a|0;b=b|0;BT(a,b,_L(61672)|0);return}function JS(){NT(58168,1);return}function KS(a,b){a=a|0;b=b|0;BT(a,b,_L(61680)|0);return}function LS(){c[14547]=0;c[14546]=40700;return}function MS(a,b){a=a|0;b=b|0;BT(a,b,_L(61688)|0);return}function NS(){c[14549]=0;c[14548]=40748;return}function OS(a,b){a=a|0;b=b|0;BT(a,b,_L(61696)|0);return}function PS(){MT(58200,1);return}function QS(a,b){a=a|0;b=b|0;BT(a,b,_L(59896)|0);return}function RS(){LT(58224,1);return}function SS(a,b){a=a|0;b=b|0;BT(a,b,_L(59920)|0);return}function TS(){c[14565]=0;c[14564]=38096;return}function US(a,b){a=a|0;b=b|0;BT(a,b,_L(59904)|0);return}function VS(){c[14567]=0;c[14566]=38160;return}function WS(a,b){a=a|0;b=b|0;BT(a,b,_L(59928)|0);return}function XS(){c[14569]=0;c[14568]=38224;return}function YS(a,b){a=a|0;b=b|0;BT(a,b,_L(59936)|0);return}function ZS(){c[14571]=0;c[14570]=38276;return}function _S(a,b){a=a|0;b=b|0;BT(a,b,_L(59944)|0);return}function $S(){c[14573]=0;c[14572]=39824;return}function aT(a,b){a=a|0;b=b|0;BT(a,b,_L(61592)|0);return}function bT(){c[14575]=0;c[14574]=39880;return}function cT(a,b){a=a|0;b=b|0;BT(a,b,_L(61600)|0);return}function dT(){c[14577]=0;c[14576]=39936;return}function eT(a,b){a=a|0;b=b|0;BT(a,b,_L(61608)|0);return}function fT(){c[14579]=0;c[14578]=39992;return}function gT(a,b){a=a|0;b=b|0;BT(a,b,_L(61616)|0);return}function hT(){c[14581]=0;c[14580]=40048;return}function iT(a,b){a=a|0;b=b|0;BT(a,b,_L(61624)|0);return}function jT(){c[14583]=0;c[14582]=40076;return}function kT(a,b){a=a|0;b=b|0;BT(a,b,_L(61632)|0);return}function lT(){c[14585]=0;c[14584]=40104;return}function mT(a,b){a=a|0;b=b|0;BT(a,b,_L(61640)|0);return}function nT(){c[14587]=0;c[14586]=40132;return}function oT(a,b){a=a|0;b=b|0;BT(a,b,_L(61648)|0);return}function pT(){c[14589]=0;c[14588]=40564;tS(58360);c[14588]=38328;c[14590]=38376;return}function qT(a,b){a=a|0;b=b|0;BT(a,b,_L(60756)|0);return}function rT(){c[14593]=0;c[14592]=40564;uS(58376);c[14592]=38412;c[14594]=38460;return}function sT(a,b){a=a|0;b=b|0;BT(a,b,_L(61568)|0);return}function tT(){var a=0,b=0;c[14597]=0;c[14596]=40564;o=0;a=da(44)|0;b=o;o=0;if(b&1){b=Fb()|0;BL(58384);Qb(b|0)}else{c[14598]=a;c[14596]=39776;return}}function uT(a,b){a=a|0;b=b|0;BT(a,b,_L(61576)|0);return}function vT(){var a=0,b=0;c[14601]=0;c[14600]=40564;o=0;a=da(44)|0;b=o;o=0;if(b&1){b=Fb()|0;BL(58400);Qb(b|0)}else{c[14602]=a;c[14600]=39800;return}}function wT(a,b){a=a|0;b=b|0;BT(a,b,_L(61584)|0);return}function xT(){c[14605]=0;c[14604]=40160;return}function yT(a,b){a=a|0;b=b|0;BT(a,b,_L(61656)|0);return}function zT(){c[14607]=0;c[14606]=40192;return}function AT(a,b){a=a|0;b=b|0;BT(a,b,_L(61664)|0);return}function BT(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;XT(b);f=a+8|0;e=c[f>>2]|0;do if((c[a+12>>2]|0)-e>>2>>>0>d>>>0)g=f;else{o=0;Xa(405,f|0,d+1|0);g=o;o=0;if(!(g&1)){g=f;e=c[f>>2]|0;break}e=Fb()|0;if(b|0)DT(b);Qb(e|0)}while(0);a=c[e+(d<<2)>>2]|0;if(a){ZT(a)|0;e=c[g>>2]|0}c[e+(d<<2)>>2]=b;return}function CT(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=a+4|0;d=c[g>>2]|0;f=c[a>>2]|0;e=d-f>>2;a:do if(e>>>0>=b>>>0){if(e>>>0>b>>>0){a=f+(b<<2)|0;while(1){if((d|0)==(a|0))break a;f=d+-4|0;c[g>>2]=f;d=f}}}else ET(a,b-e|0);while(0);return}function DT(a){a=a|0;ZT(a)|0;return}function ET(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;i=l;l=l+32|0;f=i;g=a+8|0;h=a+4|0;d=c[h>>2]|0;do if((c[g>>2]|0)-d>>2>>>0>>0){d=(d-(c[a>>2]|0)>>2)+b|0;e=GT(a)|0;if(e>>>0>>0)wS(a);j=c[a>>2]|0;k=(c[g>>2]|0)-j|0;g=k>>1;HT(f,k>>2>>>0>>1>>>0?(g>>>0>>0?d:g):e,(c[h>>2]|0)-j>>2,a+16|0);o=0;Xa(406,f|0,b|0);h=o;o=0;if(!(h&1)?(o=0,Xa(407,a|0,f|0),k=o,o=0,!(k&1)):0){KT(f);break}k=Fb()|0;KT(f);Qb(k|0)}else FT(a,b);while(0);l=i;return}function FT(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{c[b>>2]=0;b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function GT(a){a=a|0;return 1073741823}function HT(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0;c[b+12>>2]=0;c[b+16>>2]=f;do if(d){g=f+112|0;if(d>>>0<29&(a[g>>0]|0)==0){a[g>>0]=1;break}else{f=aU(d<<2)|0;break}}else f=0;while(0);c[b>>2]=f;e=f+(e<<2)|0;c[b+8>>2]=e;c[b+4>>2]=e;c[b+12>>2]=f+(d<<2);return}function IT(a,b){a=a|0;b=b|0;var d=0;d=a+8|0;a=b;b=c[d>>2]|0;do{c[b>>2]=0;b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function JT(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;h=a+4|0;g=b+4|0;f=(c[h>>2]|0)-e|0;d=(c[g>>2]|0)+(0-(f>>2)<<2)|0;c[g>>2]=d;if((f|0)>0){wW(d|0,e|0,f|0)|0;e=g;d=c[g>>2]|0}else e=g;g=c[a>>2]|0;c[a>>2]=d;c[e>>2]=g;g=b+8|0;f=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=f;g=a+8|0;h=b+12|0;a=c[g>>2]|0;c[g>>2]=c[h>>2];c[h>>2]=a;c[b>>2]=c[e>>2];return}function KT(b){b=b|0;var d=0,e=0,f=0,g=0;d=c[b+4>>2]|0;e=b+8|0;f=c[e>>2]|0;while(1){if((f|0)==(d|0))break;g=f+-4|0;c[e>>2]=g;f=g}e=c[b>>2]|0;do if(e|0){d=c[b+16>>2]|0;if((d|0)==(e|0)){a[d+112>>0]=0;break}else{cU(e);break}}while(0);return}function LT(a,b){a=a|0;b=b|0;c[a+4>>2]=b+-1;c[a>>2]=40480;c[a+8>>2]=46;c[a+12>>2]=44;b=a+16|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;a=0;while(1){if((a|0)==3)break;c[b+(a<<2)>>2]=0;a=a+1|0}return}function MT(b,d){b=b|0;d=d|0;c[b+4>>2]=d+-1;c[b>>2]=40440;a[b+8>>0]=46;a[b+9>>0]=44;d=b+12|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}return}function NT(a,b){a=a|0;b=b|0;var d=0;c[a+4>>2]=b+-1;c[a>>2]=40320;o=0;b=da(44)|0;d=o;o=0;if(d&1){d=Fb()|0;BL(a);Qb(d|0)}else{c[a+8>>2]=b;return}}function OT(b,d){b=b|0;d=d|0;var e=0;if((GT(b)|0)>>>0>>0)wS(b);e=b+128|0;if(d>>>0<29&(a[e>>0]|0)==0){a[e>>0]=1;e=b+16|0}else e=aU(d<<2)|0;c[b+4>>2]=e;c[b>>2]=e;c[b+8>>2]=e+(d<<2);return}function PT(){var b=0;do if((a[58432]|0)==0?cW(58432)|0:0){o=0;da(49)|0;b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15427]=61704;break}}while(0);return c[15427]|0}function QT(){RT();c[15426]=58440;return 61704}function RT(){xS(58440,1);return}function ST(){TT(61712,PT()|0);return 61712}function TT(a,b){a=a|0;b=b|0;b=c[b>>2]|0;c[a>>2]=b;XT(b);return}function UT(){var b=0;do if((a[58600]|0)==0?cW(58600)|0:0){o=0;da(50)|0;b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15429]=61712;break}}while(0);return c[15429]|0}function VT(a){a=a|0;var b=0,d=0;o=0;b=da(51)|0;d=o;o=0;if(d&1){d=Gb(0)|0;_g(d)}else{d=c[b>>2]|0;c[a>>2]=d;XT(d);return}}function WT(a){a=a|0;return}function XT(a){a=a|0;YT(a+4|0);return}function YT(a){a=a|0;c[a>>2]=(c[a>>2]|0)+1;return}function ZT(a){a=a|0;if((_T(a+4|0)|0)==-1){fd[c[(c[a>>2]|0)+8>>2]&511](a);a=1}else a=0;return a|0}function _T(a){a=a|0;var b=0;b=c[a>>2]|0;c[a>>2]=b+-1;return b+-1|0}function $T(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;AW(61720)|0;while(1){if((c[a>>2]|0)!=1)break;nc(61748,61720)|0}do if(!(c[a>>2]|0)){c[a>>2]=1;o=0;fa(167,61720)|0;e=o;o=0;if((((!(e&1)?(o=0,Na(d|0,b|0),e=o,o=0,!(e&1)):0)?(o=0,fa(168,61720)|0,e=o,o=0,!(e&1)):0)?(c[a>>2]=-1,o=0,fa(167,61720)|0,e=o,o=0,!(e&1)):0)?(o=0,fa(169,61748)|0,e=o,o=0,!(e&1)):0)break;e=Gb(0)|0;Bb(e|0)|0;o=0;fa(168,61720)|0;e=o;o=0;if((!(e&1)?(c[a>>2]=0,o=0,fa(167,61720)|0,e=o,o=0,!(e&1)):0)?(o=0,fa(169,61748)|0,e=o,o=0,!(e&1)):0){o=0;La(77);o=0}a=Fb()|0;o=0;La(44);e=o;o=0;if(e&1){e=Gb(0)|0;_g(e)}else Qb(a|0)}else BW(61720)|0;while(0);return}function aU(a){a=a|0;var b=0,c=0;b=(a|0)==0?1:a;while(1){c=nI(b)|0;if(c|0){a=6;break}a=gW()|0;if(!a){a=5;break}ed[a&127]()}if((a|0)==5){c=Ab(4)|0;fW(c);Mb(c|0,3128,295)}else if((a|0)==6)return c|0;return 0}function bU(a){a=a|0;return aU(a)|0}function cU(a){a=a|0;oI(a);return}function dU(a){a=a|0;cU(a);return}function eU(){var a=0;a=Ab(4)|0;fW(a);Mb(a|0,3128,295)}function fU(a,b){a=a|0;b=b|0;var d=0,e=0;e=LJ(b)|0;d=aU(e+13|0)|0;c[d>>2]=e;c[d+4>>2]=e;c[d+8>>2]=0;d=gU(d)|0;wW(d|0,b|0,e+1|0)|0;c[a>>2]=d;return}function gU(a){a=a|0;return a+12|0}function hU(a,b){a=a|0;b=b|0;c[a>>2]=41012;o=0;Xa(408,a+4|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else return}function iU(a){a=a|0;return 1}function jU(b,d){b=b|0;d=d|0;c[b>>2]=41032;o=0;Xa(408,b+4|0,((a[d+11>>0]|0)<0?c[d>>2]|0:d)|0);d=o;o=0;if(d&1){d=Fb()|0;Qb(d|0)}else return}function kU(a,b){a=a|0;b=b|0;c[a>>2]=41032;o=0;Xa(408,a+4|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else return}function lU(a){a=a|0;var b=0;a=Ab(8)|0;o=0;Xa(98,a|0,56840);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function mU(a){a=a|0;var b=0;a=Ab(8)|0;o=0;Xa(98,a|0,56840);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else{c[a>>2]=41072;Mb(a|0,3192,299)}}function nU(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;e=g;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;if((a[d+11>>0]|0)<0){f=c[d>>2]|0;d=c[d+4>>2]|0;if(d>>>0>4294967279)lU(b);if(d>>>0<11)a[b+11>>0]=d;else{i=d+16&-16;h=aU(i)|0;c[b>>2]=h;c[b+8>>2]=i|-2147483648;c[b+4>>2]=d;b=h}_i(b,f,d)|0;a[e>>0]=0;ah(b+d|0,e)}else{c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2]}l=g;return}function oU(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;j=l;l=l+16|0;i=j;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;h=a[d+11>>0]|0;g=h<<24>>24<0;h=g?c[d+4>>2]|0:h&255;if(h>>>0>>0)mU(b);d=(g?c[d>>2]|0:d)+e|0;g=h-e|0;g=g>>>0>>0?g:f;if(g>>>0>4294967279)lU(b);if(g>>>0<11)a[b+11>>0]=g;else{e=g+16&-16;f=aU(e)|0;c[b>>2]=f;c[b+8>>2]=e|-2147483648;c[b+4>>2]=g;b=f}_i(b,d,g)|0;a[i>>0]=0;ah(b+g|0,i);l=j;return}function pU(b){b=b|0;if((a[b+11>>0]|0)<0)cU(c[b>>2]|0);return}function qU(b,d){b=b|0;d=d|0;var e=0,f=0;if((b|0)!=(d|0)){e=a[d+11>>0]|0;f=e<<24>>24<0;rU(b,f?c[d>>2]|0:d,f?c[d+4>>2]|0:e&255)|0}return b|0}function rU(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;k=l;l=l+16|0;i=k;j=b+11|0;f=a[j>>0]|0;g=f<<24>>24<0;if(g)h=(c[b+8>>2]&2147483647)+-1|0;else h=10;do if(h>>>0>=e>>>0){if(g)f=c[b>>2]|0;else f=b;sU(f,d,e)|0;a[i>>0]=0;ah(f+e|0,i);if((a[j>>0]|0)<0){c[b+4>>2]=e;break}else{a[j>>0]=e;break}}else{if(g)f=c[b+4>>2]|0;else f=f&255;tU(b,h,e-h|0,f,0,f,e,d)}while(0);l=k;return b|0}function sU(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)xW(a|0,b|0,c|0)|0;return a|0}function tU(b,d,e,f,g,h,i,j){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,m=0,n=0,o=0,p=0;p=l;l=l+16|0;o=p;if((-18-d|0)>>>0>>0)lU(b);if((a[b+11>>0]|0)<0)n=c[b>>2]|0;else n=b;if(d>>>0<2147483623){k=e+d|0;m=d<<1;k=k>>>0>>0?m:k;k=k>>>0<11?11:k+16&-16}else k=-17;m=aU(k)|0;if(g|0)_i(m,n,g)|0;if(i|0)_i(m+g|0,j,i)|0;e=f-h|0;f=e-g|0;if(f|0)_i(m+g+i|0,n+g+h|0,f)|0;if((d|0)!=10)cU(n);c[b>>2]=m;c[b+8>>2]=k|-2147483648;i=e+i|0;c[b+4>>2]=i;a[o>>0]=0;ah(m+i|0,o);l=p;return}function uU(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if(d>>>0>4294967279)lU(b);i=b+11|0;f=a[i>>0]|0;g=f<<24>>24<0;if(g){j=c[b+4>>2]|0;e=(c[b+8>>2]&2147483647)+-1|0}else{j=f&255;e=10}h=j>>>0>d>>>0?j:d;d=h>>>0<11;h=d?10:(h+16&-16)+-1|0;a:do if((h|0)!=(e|0)){do if(d){d=c[b>>2]|0;if(g){e=d;f=0;d=b;g=17}else{_i(b,d,(f&255)+1|0)|0;cU(d);g=19}}else{d=h+1|0;if(h>>>0<=e>>>0){o=0;d=fa(107,d|0)|0;e=o;o=0;if(e&1){j=Gb(0)|0;Bb(j|0)|0;Db();break a}}else d=aU(d)|0;if(g){e=c[b>>2]|0;f=1;g=17;break}else{_i(d,b,(f&255)+1|0)|0;g=18;break}}while(0);if((g|0)==17){_i(d,e,(c[b+4>>2]|0)+1|0)|0;cU(e);if(f)g=18;else g=19}if((g|0)==18){c[b+8>>2]=h+1|-2147483648;c[b+4>>2]=j;c[b>>2]=d;break}else if((g|0)==19){a[i>>0]=j;break}}while(0);return}function vU(a,b){a=a|0;b=b|0;return rU(a,b,Uh(b)|0)|0}function wU(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j;h=b+11|0;f=a[h>>0]|0;i=f<<24>>24<0;if(i)f=c[b+4>>2]|0;else f=f&255;do if(f>>>0>=d>>>0)if(i){i=(c[b>>2]|0)+d|0;a[g>>0]=0;ah(i,g);c[b+4>>2]=d;break}else{a[g>>0]=0;ah(b+d|0,g);a[h>>0]=d;break}else xU(b,d-f|0,e)|0;while(0);l=j;return}function xU(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,m=0;m=l;l=l+16|0;j=m;if(d|0){k=b+11|0;f=a[k>>0]|0;if(f<<24>>24<0){g=(c[b+8>>2]&2147483647)+-1|0;h=c[b+4>>2]|0}else{g=10;h=f&255}i=h+d|0;if((g-h|0)>>>0>>0){yU(b,g,i-g|0,h,h,0,0);f=a[k>>0]|0}if(f<<24>>24<0)f=c[b>>2]|0;else f=b;$g(f+h|0,d,e)|0;if((a[k>>0]|0)<0)c[b+4>>2]=i;else a[k>>0]=i;a[j>>0]=0;ah(f+i|0,j)}l=m;return b|0}function yU(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0;if((-17-d|0)>>>0>>0)lU(b);if((a[b+11>>0]|0)<0)l=c[b>>2]|0;else l=b;if(d>>>0<2147483623){j=e+d|0;k=d<<1;j=j>>>0>>0?k:j;j=j>>>0<11?11:j+16&-16}else j=-17;k=aU(j)|0;if(g|0)_i(k,l,g)|0;e=f-h-g|0;if(e|0)_i(k+g+i|0,l+g+h|0,e)|0;if((d|0)!=10)cU(l);c[b>>2]=k;c[b+8>>2]=j|-2147483648;return}function zU(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,m=0,n=0;n=l;l=l+16|0;k=n;m=b+11|0;f=a[m>>0]|0;j=f<<24>>24<0;if(j){g=(c[b+8>>2]&2147483647)+-1|0;h=c[b+4>>2]|0}else{g=10;h=f&255}i=h+e|0;if((g-h|0)>>>0>=e>>>0){if(e|0){if(j)f=c[b>>2]|0;else f=b;_i(f+h|0,d,e)|0;if((a[m>>0]|0)<0)c[b+4>>2]=i;else a[m>>0]=i;a[k>>0]=0;ah(f+i|0,k)}}else tU(b,g,i-g|0,h,h,0,e,d);l=n;return b|0}function AU(a,b){a=a|0;b=b|0;return zU(a,b,Uh(b)|0)|0}function BU(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;h=j+1|0;i=j;a[h>>0]=d;f=b+11|0;d=a[f>>0]|0;e=d<<24>>24<0;if(e){g=c[b+4>>2]|0;d=(c[b+8>>2]&2147483647)+-1|0}else{g=d&255;d=10}if((g|0)==(d|0)){yU(b,d,1,d,d,0,0);d=d+1|0;if((a[f>>0]|0)<0)e=8;else e=7}else{d=g+1|0;if(e)e=8;else e=7}if((e|0)==7){a[f>>0]=d;d=b}else if((e|0)==8){f=c[b>>2]|0;c[b+4>>2]=d;d=f}b=d+g|0;ah(b,h);a[i>>0]=0;ah(b+1|0,i);l=j;return}function CU(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,m=0,n=0;n=l;l=l+16|0;k=n;m=b+11|0;g=a[m>>0]|0;i=g<<24>>24<0;if(i)h=c[b+4>>2]|0;else h=g&255;if(h>>>0>>0)mU(b);if(e|0){if(i)g=(c[b+8>>2]&2147483647)+-1|0;else g=10;j=h+e|0;if((g-h|0)>>>0>=e>>>0){if(i)g=c[b>>2]|0;else g=b;h=h-d|0;if(h){i=g+d|0;sU(i+e|0,i,h)|0}}else{yU(b,g,j-g|0,h,d,0,e);g=c[b>>2]|0}$g(g+d|0,e,f)|0;if((a[m>>0]|0)<0)c[b+4>>2]=j;else a[m>>0]=j;a[k>>0]=0;ah(g+j|0,k)}l=n;return b|0}function DU(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,m=0;m=l;l=l+16|0;j=m;k=b+11|0;g=a[k>>0]|0;f=g<<24>>24<0;if(f)h=c[b+4>>2]|0;else h=g&255;if(h>>>0>>0)mU(b);if(e|0){if(f)i=c[b>>2]|0;else i=b;f=h-d|0;e=f>>>0>>0?f:e;f=f-e|0;if(f){g=i+d|0;sU(g,g+e|0,f)|0;g=a[k>>0]|0}f=h-e|0;if(g<<24>>24<0)c[b+4>>2]=f;else a[k>>0]=f;a[j>>0]=0;ah(i+f|0,j)}l=m;return b|0}function EU(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;g=h;f=a[b+11>>0]|0;if(f<<24>>24<0){f=c[b+4>>2]|0;b=c[b>>2]|0}else f=f&255;a[g>>0]=d;if(f>>>0>e>>>0){g=bj(b+e|0,f-e|0,g)|0;b=(g|0)==0?-1:g-b|0}else b=-1;l=h;return b|0}function FU(b){b=b|0;if((a[b+8+3>>0]|0)<0)cU(c[b>>2]|0);return}function GU(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,m=0;m=l;l=l+16|0;j=m;f=b+8|0;k=f+3|0;h=a[k>>0]|0;i=h<<24>>24<0;if(i)g=(c[f>>2]&2147483647)+-1|0;else g=1;do if(g>>>0>=e>>>0){if(i)f=c[b>>2]|0;else f=b;HU(f,d,e)|0;c[j>>2]=0;HL(f+(e<<2)|0,j);if((a[k>>0]|0)<0){c[b+4>>2]=e;break}else{a[k>>0]=e;break}}else{if(i)f=c[b+4>>2]|0;else f=h&255;IU(b,g,e-g|0,f,0,f,e,d)}while(0);l=m;return b|0}function HU(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c|0)!=0?(o=0,la(110,a|0,b|0,c|0)|0,c=o,o=0,c&1):0){c=Gb(0)|0;_g(c)}else d=a;return d|0}function IU(b,d,e,f,g,h,i,j){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,m=0,n=0,p=0,q=0;q=l;l=l+16|0;p=q;if((1073741806-d|0)>>>0>>0)lU(b);m=b+8|0;if((a[m+3>>0]|0)<0)n=c[b>>2]|0;else n=b;if(d>>>0<536870887){e=e+d|0;k=d<<1;e=e>>>0>>0?k:e;e=e>>>0<2?2:e+4&-4;if(e>>>0>1073741823){e=Ab(8)|0;o=0;Xa(98,e|0,56853);q=o;o=0;if(q&1){q=Fb()|0;Jb(e|0);Qb(q|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}}else e=1073741807;k=aU(e<<2)|0;if(g|0)_K(k,n,g)|0;if(i|0)_K(k+(g<<2)|0,j,i)|0;f=f-h|0;j=f-g|0;if(j|0)_K(k+(g<<2)+(i<<2)|0,n+(g<<2)+(h<<2)|0,j)|0;if((d|0)!=1)cU(n);c[b>>2]=k;c[m>>2]=e|-2147483648;i=f+i|0;c[b+4>>2]=i;c[p>>2]=0;HL(k+(i<<2)|0,p);l=q;return}function JU(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;if(d>>>0>1073741807)lU(b);m=b+8|0;j=m+3|0;g=a[j>>0]|0;h=g<<24>>24<0;if(h){l=c[b+4>>2]|0;f=(c[m>>2]&2147483647)+-1|0}else{l=g&255;f=1}i=l>>>0>d>>>0?l:d;d=i>>>0<2;i=d?1:(i+4&-4)+-1|0;a:do if((i|0)!=(f|0)){do if(d){d=c[b>>2]|0;if(h){e=d;f=0;d=b;k=26}else{_K(b,d,(g&255)+1|0)|0;cU(d);k=28}}else{d=i+1|0;e=d>>>0>1073741823;b:do if(i>>>0>f>>>0){if(!e){d=aU(d<<2)|0;break}d=Ab(8)|0;o=0;Xa(98,d|0,56853);m=o;o=0;if(m&1){m=Fb()|0;Jb(d|0);Qb(m|0)}else{c[d>>2]=41052;Mb(d|0,3176,299)}}else{do if(e){d=Ab(8)|0;o=0;Xa(98,d|0,56853);m=o;o=0;if(m&1){m=Gb(0)|0;Jb(d|0);d=m;break}else{c[d>>2]=41052;o=0;bb(68,d|0,3176,299);o=0;k=19;break}}else{o=0;d=fa(107,d<<2|0)|0;k=o;o=0;if(k&1)k=19;else break b}while(0);if((k|0)==19)d=Gb(0)|0;Bb(d|0)|0;Db();break a}while(0);if(h){e=c[b>>2]|0;f=1;k=26;break}else{_K(d,b,(g&255)+1|0)|0;k=27;break}}while(0);if((k|0)==26){_K(d,e,(c[b+4>>2]|0)+1|0)|0;cU(e);if(f)k=27;else k=28}if((k|0)==27){c[m>>2]=i+1|-2147483648;c[b+4>>2]=l;c[b>>2]=d;break}else if((k|0)==28){a[j>>0]=l;break}}while(0);return}function KU(a,b){a=a|0;b=b|0;return GU(a,b,FO(b)|0)|0}function LU(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0;if((1073741807-d|0)>>>0>>0)lU(b);l=b+8|0;if((a[l+3>>0]|0)<0)k=c[b>>2]|0;else k=b;if(d>>>0<536870887){e=e+d|0;j=d<<1;e=e>>>0>>0?j:e;e=e>>>0<2?2:e+4&-4;if(e>>>0>1073741823){e=Ab(8)|0;o=0;Xa(98,e|0,56853);l=o;o=0;if(l&1){l=Fb()|0;Jb(e|0);Qb(l|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}}else e=1073741807;j=aU(e<<2)|0;if(g|0)_K(j,k,g)|0;f=f-h-g|0;if(f|0)_K(j+(g<<2)+(i<<2)|0,k+(g<<2)+(h<<2)|0,f)|0;if((d|0)!=1)cU(k);c[b>>2]=j;c[l>>2]=e|-2147483648;return}function MU(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,m=0;m=l;l=l+16|0;j=m;f=b+8|0;k=f+3|0;g=a[k>>0]|0;i=g<<24>>24<0;if(i){f=(c[f>>2]&2147483647)+-1|0;g=c[b+4>>2]|0}else{f=1;g=g&255}h=g+e|0;if((f-g|0)>>>0>=e>>>0){if(e|0){if(i)f=c[b>>2]|0;else f=b;_K(f+(g<<2)|0,d,e)|0;if((a[k>>0]|0)<0)c[b+4>>2]=h;else a[k>>0]=h;c[j>>2]=0;HL(f+(h<<2)|0,j)}}else IU(b,f,h-f|0,g,g,0,e,d);l=m;return b|0}function NU(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k+4|0;j=k;c[i>>2]=d;e=b+8|0;g=e+3|0;d=a[g>>0]|0;f=d<<24>>24<0;if(f){h=c[b+4>>2]|0;d=(c[e>>2]&2147483647)+-1|0}else{h=d&255;d=1}if((h|0)==(d|0)){LU(b,d,1,d,d,0,0);d=d+1|0;if((a[g>>0]|0)<0)e=8;else e=7}else{d=h+1|0;if(f)e=8;else e=7}if((e|0)==7){a[g>>0]=d;d=b}else if((e|0)==8){g=c[b>>2]|0;c[b+4>>2]=d;d=g}b=d+(h<<2)|0;HL(b,i);c[j>>2]=0;HL(b+4|0,j);l=k;return}function OU(a){a=a|0;return}function PU(a,b,d){a=a|0;b=b|0;d=d|0;c[a>>2]=d;c[a+4>>2]=b;return}function QU(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=l;l=l+16|0;e=f;nd[c[(c[a>>2]|0)+12>>2]&255](e,a,b);if((c[e+4>>2]|0)==(c[d+4>>2]|0))a=(c[e>>2]|0)==(c[d>>2]|0);else a=0;l=f;return a|0}function RU(a,b,d){a=a|0;b=b|0;d=d|0;return ((c[b>>2]|0)==(d|0)?(c[b+4>>2]|0)==(a|0):0)|0}function SU(a,b,c){a=a|0;b=b|0;c=c|0;TU(a,c);return}function TU(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+1040|0;h=k;g=k+1032|0;j=k+8|0;f=c[(xI()|0)>>2]|0;e=DK(d,j,1024)|0;switch(e|0){case 0:{c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;e=Uh(j)|0;if(e>>>0>4294967279)lU(b);if(e>>>0<11)a[b+11>>0]=e;else{f=e+16&-16;h=aU(f)|0;c[b>>2]=h;c[b+8>>2]=f|-2147483648;c[b+4>>2]=e;b=h}_i(b,j,e)|0;a[g>>0]=0;ah(b+e|0,g);break}case -1:{e=c[(xI()|0)>>2]|0;i=3;break}default:i=3}a:do if((i|0)==3){c[(xI()|0)>>2]=f;switch(e|0){case 22:{c[h>>2]=d;YJ(j,1024,56921,h)|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;e=Uh(j)|0;if(e>>>0>4294967279)lU(b);if(e>>>0<11)a[b+11>>0]=e;else{g=e+16&-16;i=aU(g)|0;c[b>>2]=i;c[b+8>>2]=g|-2147483648;c[b+4>>2]=e;b=i}_i(b,j,e)|0;a[h>>0]=0;ah(b+e|0,h);break a}case 34:{ic();break}default:yb(56938,56958,99,57036)}}while(0);l=k;return}function UU(a){a=a|0;JV(a);return}function VU(a){a=a|0;UU(a);cU(a);return}function WU(a,b){a=a|0;b=b|0;var d=0;d=c[b+4>>2]|0;nd[c[(c[d>>2]|0)+24>>2]&255](a,d,c[b>>2]|0);return}function XU(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;g=h;do if(c[d>>2]|0){f=a[e+11>>0]|0;if(f<<24>>24<0)f=c[e+4>>2]|0;else f=f&255;if(f|0)AU(e,57121)|0;WU(g,d);d=a[g+11>>0]|0;f=d<<24>>24<0;o=0;la(74,e|0,(f?c[g>>2]|0:g)|0,(f?c[g+4>>2]|0:d&255)|0)|0;d=o;o=0;if(d&1){h=Fb()|0;pU(g);Qb(h|0)}else{pU(g);break}}while(0);c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];f=0;while(1){if((f|0)==3)break;c[e+(f<<2)>>2]=0;f=f+1|0}l=h;return}function YU(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,m=0;j=l;l=l+32|0;g=j+24|0;h=j+12|0;k=j;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;i=Uh(e)|0;if(i>>>0>4294967279)lU(k);if(i>>>0<11){a[k+11>>0]=i;f=k}else{m=i+16&-16;f=aU(m)|0;c[k>>2]=f;c[k+8>>2]=m|-2147483648;c[k+4>>2]=i}_i(f,e,i)|0;a[g>>0]=0;ah(f+i|0,g);o=0;bb(155,h|0,d|0,k|0);m=o;o=0;do if(!(m&1)){o=0;Xa(409,b|0,h|0);m=o;o=0;if(m&1){f=Fb()|0;pU(h);break}else{pU(h);pU(k);c[b>>2]=40868;i=d;k=c[i+4>>2]|0;m=b+8|0;c[m>>2]=c[i>>2];c[m+4>>2]=k;l=j;return}}else f=Fb()|0;while(0);pU(k);Qb(f|0)}function ZU(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,i=0;f=l;l=l+48|0;h=f+32|0;d=f+24|0;i=f+16|0;g=f;f=f+36|0;a=_U()|0;if(a|0?(e=c[a>>2]|0,e|0):0){a=e+48|0;b=c[a>>2]|0;a=c[a+4>>2]|0;if(!((b&-256|0)==1126902528&(a|0)==1129074247)){c[d>>2]=57260;$U(57210,d)}if((b|0)==1126902529&(a|0)==1129074247)a=c[e+44>>2]|0;else a=e+80|0;c[f>>2]=a;e=c[e>>2]|0;a=c[e+4>>2]|0;if(Tc[c[(c[766]|0)+16>>2]&127](3064,e,f)|0){i=c[f>>2]|0;i=Qc[c[(c[i>>2]|0)+8>>2]&255](i)|0;c[g>>2]=57260;c[g+4>>2]=a;c[g+8>>2]=i;$U(57124,g)}else{c[i>>2]=57260;c[i+4>>2]=a;$U(57169,i)}}$U(57248,h)}function _U(){var a=0,b=0;a=l;l=l+16|0;if(!(qc(61796,78)|0)){b=oc(c[15450]|0)|0;l=a;return b|0}else $U(57399,a);return 0}function $U(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d>>2]=b;b=c[8554]|0;QI(b,a,d)|0;vK(10,b)|0;ic()}function aV(a){a=a|0;return}function bV(a){a=a|0;aV(a);cU(a);return}function cV(a){a=a|0;return}function dV(a){a=a|0;return}function eV(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+64|0;f=h;if(!(iV(a,b,0)|0))if((b|0)!=0?(g=mV(b,3088,3072,0)|0,(g|0)!=0):0){b=f+4|0;e=b+52|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(e|0));c[f>>2]=g;c[f+8>>2]=a;c[f+12>>2]=-1;c[f+48>>2]=1;od[c[(c[g>>2]|0)+28>>2]&127](g,f,c[d>>2]|0,1);if((c[f+24>>2]|0)==1){c[d>>2]=c[f+16>>2];b=1}else b=0}else b=0;else b=1;l=h;return b|0}function fV(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;if(iV(a,c[b+8>>2]|0,g)|0)lV(0,b,d,e,f);return}function gV(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;do if(!(iV(b,c[d+8>>2]|0,g)|0)){if(iV(b,c[d>>2]|0,g)|0){b=d+32|0;if((c[d+16>>2]|0)!=(e|0)?(h=d+20|0,(c[h>>2]|0)!=(e|0)):0){c[b>>2]=f;c[h>>2]=e;f=d+40|0;c[f>>2]=(c[f>>2]|0)+1;if((c[d+36>>2]|0)==1?(c[d+24>>2]|0)==2:0)a[d+54>>0]=1;c[d+44>>2]=4;break}if((f|0)==1)c[b>>2]=1}}else kV(0,d,e,f);while(0);return}function hV(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if(iV(a,c[b+8>>2]|0,0)|0)jV(0,b,d,e);return}function iV(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function jV(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;b=d+16|0;g=c[b>>2]|0;h=d+36|0;i=d+24|0;do if(g){if((g|0)!=(e|0)){c[h>>2]=(c[h>>2]|0)+1;c[i>>2]=2;a[d+54>>0]=1;break}if((c[i>>2]|0)==2)c[i>>2]=f}else{c[b>>2]=e;c[i>>2]=f;c[h>>2]=1}while(0);return}function kV(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;if((c[b+4>>2]|0)==(d|0)?(f=b+28|0,(c[f>>2]|0)!=1):0)c[f>>2]=e;return}function lV(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;a[d+53>>0]=1;do if((c[d+4>>2]|0)==(f|0)){a[d+52>>0]=1;f=d+16|0;h=c[f>>2]|0;j=d+54|0;k=d+48|0;i=d+24|0;b=d+36|0;if(!h){c[f>>2]=e;c[i>>2]=g;c[b>>2]=1;if(!((c[k>>2]|0)==1&(g|0)==1))break;a[j>>0]=1;break}if((h|0)!=(e|0)){c[b>>2]=(c[b>>2]|0)+1;a[j>>0]=1;break}b=c[i>>2]|0;if((b|0)==2){c[i>>2]=g;b=g}if((c[k>>2]|0)==1&(b|0)==1)a[j>>0]=1}while(0);return}function mV(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+64|0;o=q;n=c[d>>2]|0;p=d+(c[n+-8>>2]|0)|0;n=c[n+-4>>2]|0;c[o>>2]=f;c[o+4>>2]=d;c[o+8>>2]=e;c[o+12>>2]=g;d=o+16|0;e=o+20|0;g=o+24|0;h=o+28|0;i=o+32|0;j=o+40|0;k=d;m=k+36|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(m|0));b[d+36>>1]=0;a[d+38>>0]=0;a:do if(iV(n,f,0)|0){c[o+48>>2]=1;rd[c[(c[n>>2]|0)+20>>2]&63](n,o,p,p,1,0);d=(c[g>>2]|0)==1?p:0}else{qd[c[(c[n>>2]|0)+24>>2]&63](n,o,p,1,0);switch(c[o+36>>2]|0){case 0:{d=(c[j>>2]|0)==1&(c[h>>2]|0)==1&(c[i>>2]|0)==1?c[e>>2]|0:0;break a}case 1:break;default:{d=0;break a}}if((c[g>>2]|0)!=1?!((c[j>>2]|0)==0&(c[h>>2]|0)==1&(c[i>>2]|0)==1):0){d=0;break}d=c[d>>2]|0}while(0);l=q;return d|0}function nV(a){a=a|0;aV(a);cU(a);return}function oV(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;if(iV(a,c[b+8>>2]|0,g)|0)lV(0,b,d,e,f);else{a=c[a+8>>2]|0;rd[c[(c[a>>2]|0)+20>>2]&63](a,b,d,e,f,g)}return}function pV(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;do if(!(iV(b,c[d+8>>2]|0,g)|0)){h=b+8|0;if(!(iV(b,c[d>>2]|0,g)|0)){j=c[h>>2]|0;qd[c[(c[j>>2]|0)+24>>2]&63](j,d,e,f,g);break}b=d+32|0;if((c[d+16>>2]|0)!=(e|0)?(i=d+20|0,(c[i>>2]|0)!=(e|0)):0){c[b>>2]=f;f=d+44|0;if((c[f>>2]|0)==4)break;b=d+52|0;a[b>>0]=0;k=d+53|0;a[k>>0]=0;h=c[h>>2]|0;rd[c[(c[h>>2]|0)+20>>2]&63](h,d,e,e,1,g);if(a[k>>0]|0)if(!(a[b>>0]|0)){b=3;j=11}else b=3;else{b=4;j=11}if((j|0)==11){c[i>>2]=e;k=d+40|0;c[k>>2]=(c[k>>2]|0)+1;if((c[d+36>>2]|0)==1?(c[d+24>>2]|0)==2:0)a[d+54>>0]=1}c[f>>2]=b;break}if((f|0)==1)c[b>>2]=1}else kV(0,d,e,f);while(0);return}function qV(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if(iV(a,c[b+8>>2]|0,0)|0)jV(0,b,d,e);else{a=c[a+8>>2]|0;od[c[(c[a>>2]|0)+28>>2]&127](a,b,d,e)}return}function rV(a){a=a|0;return}function sV(){var a=0;a=l;l=l+16|0;if(!(pc(61800,357)|0)){l=a;return}else $U(57448,a)}function tV(a){a=a|0;var b=0;b=l;l=l+16|0;oI(a);if(!(rc(c[15450]|0,0)|0)){l=b;return}else $U(57498,b)}function uV(){var a=0,b=0,d=0;o=0;a=da(52)|0;d=o;o=0;if(d&1){d=Gb(0)|0;_g(d)}if((a|0?(b=c[a>>2]|0,b|0):0)?(d=b+48|0,(c[d>>2]&-256|0)==1126902528?(c[d+4>>2]|0)==1129074247:0):0)vV(c[b+12>>2]|0);vV(wV()|0)}function vV(a){a=a|0;var b=0;b=l;l=l+16|0;o=0;La(a|0);a=o;o=0;if(!(a&1)){o=0;Xa(410,57551,b|0);o=0}a=Gb(0)|0;Bb(a|0)|0;o=0;Xa(410,57591,b+8|0);o=0;a=Gb(0)|0;o=0;La(44);b=o;o=0;if(b&1){b=Gb(0)|0;_g(b)}else _g(a)}function wV(){var a=0;a=c[10220]|0;c[10220]=a+0;return a|0}function xV(a){a=a|0;return}function yV(a){a=a|0;xV(a);cU(a);return}function zV(a){a=a|0;return 57641}function AV(a){a=a|0;return}function BV(a){a=a|0;cU(a);return}function CV(a){a=a|0;return 57669}function DV(a){a=a|0;c[a>>2]=41012;HV(a+4|0);return}function EV(a){a=a|0;DV(a);cU(a);return}function FV(a){a=a|0;return GV(a+4|0)|0}function GV(a){a=a|0;return c[a>>2]|0}function HV(a){a=a|0;var b=0,d=0;if(iU(a)|0?(b=IV(c[a>>2]|0)|0,d=b+8|0,a=c[d>>2]|0,c[d>>2]=a+-1,(a+-1|0)<0):0)cU(b);return}function IV(a){a=a|0;return a+-12|0}function JV(a){a=a|0;c[a>>2]=41032;HV(a+4|0);return}function KV(a){a=a|0;JV(a);cU(a);return}function LV(a){a=a|0;return GV(a+4|0)|0}function MV(a){a=a|0;DV(a);cU(a);return}function NV(a){a=a|0;DV(a);cU(a);return}function OV(a){a=a|0;return}function PV(a){a=a|0;OV(a);cU(a);return}function QV(a){a=a|0;return 57752}function RV(a){a=a|0;aV(a);cU(a);return}function SV(a,b,c){a=a|0;b=b|0;c=c|0;return iV(a,b,0)|0}function TV(a){a=a|0;aV(a);cU(a);return}function UV(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;j=l;l=l+64|0;h=j;c[d>>2]=c[c[d>>2]>>2];if(!(VV(a,b,0)|0))if(((b|0)!=0?(e=mV(b,3088,3240,0)|0,(e|0)!=0):0)?(c[e+8>>2]&~c[a+8>>2]|0)==0:0){a=a+12|0;b=e+12|0;if(!(iV(c[a>>2]|0,c[b>>2]|0,0)|0)?!(iV(c[a>>2]|0,3272,0)|0):0){a=c[a>>2]|0;if((((a|0)!=0?(g=mV(a,3088,3072,0)|0,(g|0)!=0):0)?(f=c[b>>2]|0,(f|0)!=0):0)?(i=mV(f,3088,3072,0)|0,(i|0)!=0):0){a=h+4|0;b=a+52|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[h>>2]=i;c[h+8>>2]=g;c[h+12>>2]=-1;c[h+48>>2]=1;od[c[(c[i>>2]|0)+28>>2]&127](i,h,c[d>>2]|0,1);if((c[h+24>>2]|0)==1){c[d>>2]=c[h+16>>2];a=1}else a=0}else a=0}else a=1}else a=0;else a=1;l=j;return a|0}function VV(a,b,c){a=a|0;b=b|0;c=c|0;if(iV(a,b,0)|0)a=1;else a=iV(b,3280,0)|0;return a|0}function WV(a){a=a|0;aV(a);cU(a);return}function XV(b,d,e,f,g,h){b=b|0;d=d|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;if(iV(b,c[d+8>>2]|0,h)|0)lV(0,d,e,f,g);else{p=d+52|0;i=a[p>>0]|0;j=d+53|0;k=a[j>>0]|0;o=c[b+12>>2]|0;l=b+16+(o<<3)|0;a[p>>0]=0;a[j>>0]=0;$V(b+16|0,d,e,f,g,h);a:do if((o|0)>1){m=d+24|0;n=d+54|0;o=b+8|0;b=b+24|0;do{if(a[n>>0]|0)break a;if(!(a[p>>0]|0)){if(a[j>>0]|0?(c[o>>2]&1|0)==0:0)break a}else{if((c[m>>2]|0)==1)break a;if(!(c[o>>2]&2))break a}a[p>>0]=0;a[j>>0]=0;$V(b,d,e,f,g,h);b=b+8|0}while(b>>>0>>0)}while(0);a[p>>0]=i;a[j>>0]=k}return}function YV(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,r=0,s=0;a:do if(!(iV(b,c[d+8>>2]|0,g)|0)){i=b+12|0;q=d+24|0;r=d+36|0;s=d+54|0;o=b+8|0;m=b+16|0;if(!(iV(b,c[d>>2]|0,g)|0)){p=c[i>>2]|0;j=b+16+(p<<3)|0;aW(m,d,e,f,g);h=b+24|0;if((p|0)<=1)break;i=c[o>>2]|0;if((i&2|0)==0?(c[r>>2]|0)!=1:0){if(!(i&1))while(1){if(a[s>>0]|0)break a;if((c[r>>2]|0)==1)break a;aW(h,d,e,f,g);h=h+8|0;if(h>>>0>=j>>>0)break a}while(1){if(a[s>>0]|0)break a;if((c[r>>2]|0)==1?(c[q>>2]|0)==1:0)break a;aW(h,d,e,f,g);h=h+8|0;if(h>>>0>=j>>>0)break a}}while(1){if(a[s>>0]|0)break a;aW(h,d,e,f,g);h=h+8|0;if(h>>>0>=j>>>0)break a}}h=d+32|0;if((c[d+16>>2]|0)!=(e|0)?(p=d+20|0,(c[p>>2]|0)!=(e|0)):0){c[h>>2]=f;n=d+44|0;if((c[n>>2]|0)==4)break;f=b+16+(c[i>>2]<<3)|0;k=d+52|0;l=d+53|0;h=0;b=m;j=0;b:while(1){if(b>>>0>=f>>>0){i=18;break}a[k>>0]=0;a[l>>0]=0;$V(b,d,e,e,1,g);if(a[s>>0]|0){i=18;break}do if(a[l>>0]|0){if(!(a[k>>0]|0))if(!(c[o>>2]&1)){h=1;i=18;break b}else{h=1;i=j;break}if((c[q>>2]|0)==1){i=23;break b}if(!(c[o>>2]&2)){i=23;break b}else{h=1;i=1}}else i=j;while(0);b=b+8|0;j=i}do if((i|0)==18){if((!j?(c[p>>2]=e,e=d+40|0,c[e>>2]=(c[e>>2]|0)+1,(c[r>>2]|0)==1):0)?(c[q>>2]|0)==2:0){a[s>>0]=1;if(h){i=23;break}else{h=4;break}}if(h)i=23;else h=4}while(0);if((i|0)==23)h=3;c[n>>2]=h;break}if((f|0)==1)c[h>>2]=1}else kV(0,d,e,f);while(0);return}function ZV(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;a:do if(!(iV(b,c[d+8>>2]|0,0)|0)){h=c[b+12>>2]|0;g=b+16+(h<<3)|0;_V(b+16|0,d,e,f);if((h|0)>1){h=d+54|0;b=b+24|0;do{_V(b,d,e,f);if(a[h>>0]|0)break a;b=b+8|0}while(b>>>0>>0)}}else jV(0,d,e,f);while(0);return}function _V(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=c[a+4>>2]|0;f=g>>8;if(g&1)f=c[(c[d>>2]|0)+f>>2]|0;a=c[a>>2]|0;od[c[(c[a>>2]|0)+28>>2]&127](a,b,d+f|0,g&2|0?e:2);return}function $V(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;i=c[a+4>>2]|0;h=i>>8;if(i&1)h=c[(c[e>>2]|0)+h>>2]|0;a=c[a>>2]|0;rd[c[(c[a>>2]|0)+20>>2]&63](a,b,d,e+h|0,i&2|0?f:2,g);return}function aW(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;h=c[a+4>>2]|0;g=h>>8;if(h&1)g=c[(c[d>>2]|0)+g>>2]|0;a=c[a>>2]|0;qd[c[(c[a>>2]|0)+24>>2]&63](a,b,d+g|0,h&2|0?e:2,f);return}function bW(a){a=a|0;c[a>>2]=41092;return}function cW(b){b=b|0;if((a[b>>0]|0)==1)b=0;else{a[b>>0]=1;b=1}return b|0}function dW(a){a=a|0;return}function eW(a){a=a|0;return}function fW(a){a=a|0;c[a>>2]=40972;return}function gW(){var a=0;a=c[15451]|0;c[15451]=a+0;return a|0}function hW(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=l;l=l+16|0;e=f;c[e>>2]=c[d>>2];a=Tc[c[(c[a>>2]|0)+16>>2]&127](a,b,e)|0;if(a)c[d>>2]=c[e>>2];l=f;return a&1|0}function iW(a){a=a|0;if(!a)a=0;else a=(mV(a,3088,3240,0)|0)!=0;return a&1|0}function jW(){}function kW(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=O(e,f)|0;d=a>>>16;a=(c>>>16)+(O(e,d)|0)|0;e=b>>>16;b=O(e,f)|0;return (z=(a>>>16)+(O(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function lW(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=kW(e,f)|0;a=z;return (z=(O(b,f)|0)+(O(d,e)|0)+a|a&0,c|0|0)|0}function mW(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (z=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function nW(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (z=d,a-c>>>0|0)|0}function oW(b){b=b|0;var c=0;c=a[n+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[n+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (a[n+(b>>>24)>>0]|0)+24|0}function pW(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;l=a;j=b;k=j;h=d;n=e;i=n;if(!k){g=(f|0)!=0;if(!i){if(g){c[f>>2]=(l>>>0)%(h>>>0);c[f+4>>2]=0}n=0;f=(l>>>0)/(h>>>0)>>>0;return (z=n,f)|0}else{if(!g){n=0;f=0;return (z=n,f)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;f=0;return (z=n,f)|0}}g=(i|0)==0;do if(h){if(!g){g=(R(i|0)|0)-(R(k|0)|0)|0;if(g>>>0<=31){m=g+1|0;i=31-g|0;b=g-31>>31;h=m;a=l>>>(m>>>0)&b|k<>>(m>>>0)&b;g=0;i=l<>2]=a|0;c[f+4>>2]=j|b&0;n=0;f=0;return (z=n,f)|0}g=h-1|0;if(g&h|0){i=(R(h|0)|0)+33-(R(k|0)|0)|0;p=64-i|0;m=32-i|0;j=m>>31;o=i-32|0;b=o>>31;h=i;a=m-1>>31&k>>>(o>>>0)|(k<>>(i>>>0))&b;b=b&k>>>(i>>>0);g=l<>>(o>>>0))&j|l<>31;break}if(f|0){c[f>>2]=g&l;c[f+4>>2]=0}if((h|0)==1){o=j|b&0;p=a|0|0;return (z=o,p)|0}else{p=oW(h|0)|0;o=k>>>(p>>>0)|0;p=k<<32-p|l>>>(p>>>0)|0;return (z=o,p)|0}}else{if(g){if(f|0){c[f>>2]=(k>>>0)%(h>>>0);c[f+4>>2]=0}o=0;p=(k>>>0)/(h>>>0)>>>0;return (z=o,p)|0}if(!l){if(f|0){c[f>>2]=0;c[f+4>>2]=(k>>>0)%(i>>>0)}o=0;p=(k>>>0)/(i>>>0)>>>0;return (z=o,p)|0}g=i-1|0;if(!(g&i)){if(f|0){c[f>>2]=a|0;c[f+4>>2]=g&k|b&0}o=0;p=k>>>((oW(i|0)|0)>>>0);return (z=o,p)|0}g=(R(i|0)|0)-(R(k|0)|0)|0;if(g>>>0<=30){b=g+1|0;i=31-g|0;h=b;a=k<>>(b>>>0);b=k>>>(b>>>0);g=0;i=l<>2]=a|0;c[f+4>>2]=j|b&0;o=0;p=0;return (z=o,p)|0}while(0);if(!h){k=i;j=0;i=0}else{m=d|0|0;l=n|e&0;k=mW(m|0,l|0,-1,-1)|0;d=z;j=i;i=0;do{e=j;j=g>>>31|j<<1;g=i|g<<1;e=a<<1|e>>>31|0;n=a>>>31|b<<1|0;nW(k|0,d|0,e|0,n|0)|0;p=z;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;a=nW(e|0,n|0,o&m|0,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l|0)|0;b=z;h=h-1|0}while((h|0)!=0);k=j;j=0}h=0;if(f|0){c[f>>2]=a;c[f+4>>2]=b}o=(g|0)>>>31|(k|h)<<1|(h<<1|g>>>31)&0|j;p=(g<<1|0>>>31)&-2|i;return (z=o,p)|0}function qW(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return pW(a,b,c,d,0)|0}function rW(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=l;l=l+16|0;f=g|0;pW(a,b,d,e,f)|0;l=g;return (z=c[f+4>>2]|0,c[f>>2]|0)|0}function sW(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){z=b>>c;return a>>>c|(b&(1<>c-32|0}function tW(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){z=b>>>c;return a>>>c|(b&(1<>>c-32|0}function uW(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){z=b<>>32-c;return a<>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function wW(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return kc(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|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)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|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 h|0}function xW(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 wW(b,c,d)|0;return b|0}function yW(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function zW(a){a=a|0;return 0}function AW(a){a=a|0;return 0}function BW(a){a=a|0;return 0}function CW(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){W()|0;Rb(12);return -1}c[i>>2]=a;if((a|0)>(V()|0)?(U()|0)==0:0){c[i>>2]=b;Rb(12);return -1}return b|0}function DW(a,b){a=a|0;b=b|0;return +Lc[a&63](b|0)}function EW(a){a=a|0;return +Y(0,a|0)}function FW(a){a=a|0;return +Y(1,a|0)}function GW(a){a=a|0;return +Y(2,a|0)}function HW(a){a=a|0;return +Y(3,a|0)}function IW(a){a=a|0;return +Y(4,a|0)}function JW(a){a=a|0;return +Y(5,a|0)}function KW(a){a=a|0;return +Y(6,a|0)}function LW(a){a=a|0;return +Y(7,a|0)}function MW(a){a=a|0;return +Y(8,a|0)}function NW(a){a=a|0;return +Y(9,a|0)}function OW(a){a=a|0;return +Y(10,a|0)}function PW(a){a=a|0;return +Y(11,a|0)}function QW(a){a=a|0;return +Y(12,a|0)}function RW(a){a=a|0;return +Y(13,a|0)}function SW(a){a=a|0;return +Y(14,a|0)}function TW(a){a=a|0;return +Y(15,a|0)}function UW(a){a=a|0;return +Y(16,a|0)}function VW(a){a=a|0;return +Y(17,a|0)}function WW(a){a=a|0;return +Y(18,a|0)}function XW(a){a=a|0;return +Y(19,a|0)}function YW(a,b,c){a=a|0;b=b|0;c=c|0;return +Mc[a&63](b|0,c|0)}function ZW(a,b){a=a|0;b=b|0;return +_(0,a|0,b|0)}function _W(a,b){a=a|0;b=b|0;return +_(1,a|0,b|0)}function $W(a,b){a=a|0;b=b|0;return +_(2,a|0,b|0)}function aX(a,b){a=a|0;b=b|0;return +_(3,a|0,b|0)}function bX(a,b){a=a|0;b=b|0;return +_(4,a|0,b|0)}function cX(a,b){a=a|0;b=b|0;return +_(5,a|0,b|0)}function dX(a,b){a=a|0;b=b|0;return +_(6,a|0,b|0)}function eX(a,b){a=a|0;b=b|0;return +_(7,a|0,b|0)}function fX(a,b){a=a|0;b=b|0;return +_(8,a|0,b|0)}function gX(a,b){a=a|0;b=b|0;return +_(9,a|0,b|0)}function hX(a,b){a=a|0;b=b|0;return +_(10,a|0,b|0)}function iX(a,b){a=a|0;b=b|0;return +_(11,a|0,b|0)}function jX(a,b){a=a|0;b=b|0;return +_(12,a|0,b|0)}function kX(a,b){a=a|0;b=b|0;return +_(13,a|0,b|0)}function lX(a,b){a=a|0;b=b|0;return +_(14,a|0,b|0)}function mX(a,b){a=a|0;b=b|0;return +_(15,a|0,b|0)}function nX(a,b){a=a|0;b=b|0;return +_(16,a|0,b|0)}function oX(a,b){a=a|0;b=b|0;return +_(17,a|0,b|0)}function pX(a,b){a=a|0;b=b|0;return +_(18,a|0,b|0)}function qX(a,b){a=a|0;b=b|0;return +_(19,a|0,b|0)}function rX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +Nc[a&63](b|0,c|0,d|0)}function sX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(0,a|0,b|0,c|0)}function tX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(1,a|0,b|0,c|0)}function uX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(2,a|0,b|0,c|0)}function vX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(3,a|0,b|0,c|0)}function wX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(4,a|0,b|0,c|0)}function xX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(5,a|0,b|0,c|0)}function yX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(6,a|0,b|0,c|0)}function zX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(7,a|0,b|0,c|0)}function AX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(8,a|0,b|0,c|0)}function BX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(9,a|0,b|0,c|0)}function CX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(10,a|0,b|0,c|0)}function DX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(11,a|0,b|0,c|0)}function EX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(12,a|0,b|0,c|0)}function FX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(13,a|0,b|0,c|0)}function GX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(14,a|0,b|0,c|0)}function HX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(15,a|0,b|0,c|0)}function IX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(16,a|0,b|0,c|0)}function JX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(17,a|0,b|0,c|0)}function KX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(18,a|0,b|0,c|0)}function LX(a,b,c){a=a|0;b=b|0;c=c|0;return +aa(19,a|0,b|0,c|0)}function MX(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return +Oc[a&63](b|0,c|0,d|0,e|0)}function NX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(0,a|0,b|0,c|0,d|0)}function OX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(1,a|0,b|0,c|0,d|0)}function PX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(2,a|0,b|0,c|0,d|0)}function QX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(3,a|0,b|0,c|0,d|0)}function RX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(4,a|0,b|0,c|0,d|0)}function SX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(5,a|0,b|0,c|0,d|0)}function TX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(6,a|0,b|0,c|0,d|0)}function UX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(7,a|0,b|0,c|0,d|0)}function VX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(8,a|0,b|0,c|0,d|0)}function WX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(9,a|0,b|0,c|0,d|0)}function XX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(10,a|0,b|0,c|0,d|0)}function YX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(11,a|0,b|0,c|0,d|0)}function ZX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(12,a|0,b|0,c|0,d|0)}function _X(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(13,a|0,b|0,c|0,d|0)}function $X(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(14,a|0,b|0,c|0,d|0)}function aY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(15,a|0,b|0,c|0,d|0)}function bY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(16,a|0,b|0,c|0,d|0)}function cY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(17,a|0,b|0,c|0,d|0)}function dY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(18,a|0,b|0,c|0,d|0)}function eY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ca(19,a|0,b|0,c|0,d|0)}function fY(a){a=a|0;return Pc[a&63]()|0}function gY(){return ea(0)|0}function hY(){return ea(1)|0}function iY(){return ea(2)|0}function jY(){return ea(3)|0}function kY(){return ea(4)|0}function lY(){return ea(5)|0}function mY(){return ea(6)|0}function nY(){return ea(7)|0}function oY(){return ea(8)|0}function pY(){return ea(9)|0}function qY(){return ea(10)|0}function rY(){return ea(11)|0}function sY(){return ea(12)|0}function tY(){return ea(13)|0}function uY(){return ea(14)|0}function vY(){return ea(15)|0}function wY(){return ea(16)|0}function xY(){return ea(17)|0}function yY(){return ea(18)|0}function zY(){return ea(19)|0}function AY(a,b){a=a|0;b=b|0;return Qc[a&255](b|0)|0}function BY(a){a=a|0;return ga(0,a|0)|0}function CY(a){a=a|0;return ga(1,a|0)|0}function DY(a){a=a|0;return ga(2,a|0)|0}function EY(a){a=a|0;return ga(3,a|0)|0}function FY(a){a=a|0;return ga(4,a|0)|0}function GY(a){a=a|0;return ga(5,a|0)|0}function HY(a){a=a|0;return ga(6,a|0)|0}function IY(a){a=a|0;return ga(7,a|0)|0}function JY(a){a=a|0;return ga(8,a|0)|0}function KY(a){a=a|0;return ga(9,a|0)|0}function LY(a){a=a|0;return ga(10,a|0)|0}function MY(a){a=a|0;return ga(11,a|0)|0}function NY(a){a=a|0;return ga(12,a|0)|0}function OY(a){a=a|0;return ga(13,a|0)|0}function PY(a){a=a|0;return ga(14,a|0)|0}function QY(a){a=a|0;return ga(15,a|0)|0}function RY(a){a=a|0;return ga(16,a|0)|0}function SY(a){a=a|0;return ga(17,a|0)|0}function TY(a){a=a|0;return ga(18,a|0)|0}function UY(a){a=a|0;return ga(19,a|0)|0}function VY(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;return Rc[a&63](b|0,+c,+d,+e)|0}function WY(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(0,a|0,+b,+c,+d)|0}function XY(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(1,a|0,+b,+c,+d)|0}function YY(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(2,a|0,+b,+c,+d)|0}function ZY(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(3,a|0,+b,+c,+d)|0}function _Y(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(4,a|0,+b,+c,+d)|0}function $Y(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(5,a|0,+b,+c,+d)|0}function aZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(6,a|0,+b,+c,+d)|0}function bZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(7,a|0,+b,+c,+d)|0}function cZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(8,a|0,+b,+c,+d)|0}function dZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(9,a|0,+b,+c,+d)|0}function eZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(10,a|0,+b,+c,+d)|0}function fZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(11,a|0,+b,+c,+d)|0}function gZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(12,a|0,+b,+c,+d)|0}function hZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(13,a|0,+b,+c,+d)|0}function iZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(14,a|0,+b,+c,+d)|0}function jZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(15,a|0,+b,+c,+d)|0}function kZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(16,a|0,+b,+c,+d)|0}function lZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(17,a|0,+b,+c,+d)|0} function wM(d,e,f,g,h,i){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;B=l;l=l+224|0;t=B+198|0;u=B+196|0;C=B+184|0;D=B+172|0;v=B+168|0;y=B+8|0;z=B+4|0;w=B;x=pM(g)|0;qM(C,g,t,u);c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[D+(d<<2)>>2]=0;d=d+1|0}s=D+11|0;if((a[s>>0]|0)<0)d=(c[D+8>>2]&2147483647)+-1|0;else d=10;o=0;bb(58,D|0,d|0,0);r=o;o=0;if(r&1)d=Fb()|0;else{d=(a[s>>0]|0)<0?c[D>>2]|0:D;c[v>>2]=d;c[z>>2]=y;c[w>>2]=0;q=D+4|0;r=D+8|0;k=c[e>>2]|0;j=k;a:while(1){if(j){g=c[j+12>>2]|0;if((g|0)==(c[j+16>>2]|0)){o=0;g=fa(c[(c[j>>2]|0)+36>>2]|0,j|0)|0;p=o;o=0;if(p&1)break}else g=bh(a[g>>0]|0)|0;if(Yg(g,Qg()|0)|0){c[e>>2]=0;p=0;k=0;m=1}else{p=j;m=0}}else{p=0;k=0;m=1}j=c[f>>2]|0;do if(j){g=c[j+12>>2]|0;if((g|0)==(c[j+16>>2]|0)){o=0;g=fa(c[(c[j>>2]|0)+36>>2]|0,j|0)|0;n=o;o=0;if(n&1)break a}else g=bh(a[g>>0]|0)|0;if(!(Yg(g,Qg()|0)|0))if(m)break;else{E=37;break a}else{c[f>>2]=0;E=20;break}}else E=20;while(0);if((E|0)==20){E=0;if(m){j=0;E=37;break}else j=0}g=a[s>>0]|0;g=g<<24>>24<0?c[q>>2]|0:g&255;if((c[v>>2]|0)==(d+g|0)){o=0;bb(58,D|0,g<<1|0,0);n=o;o=0;if(n&1)break;if((a[s>>0]|0)<0)d=(c[r>>2]&2147483647)+-1|0;else d=10;o=0;bb(58,D|0,d|0,0);n=o;o=0;if(n&1)break;d=(a[s>>0]|0)<0?c[D>>2]|0:D;c[v>>2]=d+g}m=p+12|0;g=c[m>>2]|0;n=p+16|0;if((g|0)==(c[n>>2]|0)){o=0;g=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;F=o;o=0;if(F&1)break}else g=bh(a[g>>0]|0)|0;o=0;g=Fa(42,g&255|0,x|0,d|0,v|0,w|0,a[u>>0]|0,C|0,y|0,z|0,t|0)|0;F=o;o=0;if(F&1)break;if(g|0){E=37;break}g=c[m>>2]|0;if((g|0)==(c[n>>2]|0)){o=0;fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;F=o;o=0;if(F&1)break;else{j=p;continue}}else{c[m>>2]=g+1;bh(a[g>>0]|0)|0;j=p;continue}}b:do if((E|0)==37){F=a[C+11>>0]|0;if((F<<24>>24<0?c[C+4>>2]|0:F&255)|0?(A=c[z>>2]|0,(A-y|0)<160):0){F=c[w>>2]|0;c[z>>2]=A+4;c[A>>2]=F}o=0;d=pa(62,d|0,c[v>>2]|0,h|0,x|0)|0;F=o;o=0;if(!(F&1)?(b[i>>1]=d,o=0,db(107,C|0,y|0,c[z>>2]|0,h|0),F=o,o=0,!(F&1)):0){if(p){d=c[p+12>>2]|0;if((d|0)==(c[p+16>>2]|0)){o=0;d=fa(c[(c[k>>2]|0)+36>>2]|0,p|0)|0;F=o;o=0;if(F&1)break}else d=bh(a[d>>0]|0)|0;if(Yg(d,Qg()|0)|0){c[e>>2]=0;g=1}else g=0}else g=1;do if(j){d=c[j+12>>2]|0;if((d|0)==(c[j+16>>2]|0)){o=0;d=fa(c[(c[j>>2]|0)+36>>2]|0,j|0)|0;F=o;o=0;if(F&1)break b}else d=bh(a[d>>0]|0)|0;if(!(Yg(d,Qg()|0)|0))if(g)break;else{E=56;break}else{c[f>>2]=0;E=54;break}}else E=54;while(0);if((E|0)==54?g:0)E=56;if((E|0)==56)c[h>>2]=c[h>>2]|2;F=c[e>>2]|0;pU(D);pU(C);l=B;return F|0}}while(0);d=Fb()|0}pU(D);pU(C);Qb(d|0);return 0}function xM(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;j=l;l=l+16|0;h=j;do if((b|0)==(d|0)){c[e>>2]=4;b=0}else{if((a[b>>0]|0)==45){c[e>>2]=4;b=0;break}i=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;b=BI(b,h,f,YL()|0)|0;f=z;g=c[(xI()|0)>>2]|0;if(!g)c[(xI()|0)>>2]=i;do if((c[h>>2]|0)==(d|0))if(f>>>0>0|(f|0)==0&b>>>0>65535|(g|0)==34){c[e>>2]=4;b=-1;break}else{b=b&65535;break}else{c[e>>2]=4;b=0}while(0)}while(0);l=j;return b|0}function yM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0;B=l;l=l+224|0;s=B+198|0;t=B+196|0;C=B+184|0;D=B+172|0;u=B+168|0;y=B+8|0;A=B+4|0;v=B;w=pM(f)|0;qM(C,f,s,t);c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[D+(b<<2)>>2]=0;b=b+1|0}r=D+11|0;if((a[r>>0]|0)<0)b=(c[D+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b;c[A>>2]=y;c[v>>2]=0;n=D+4|0;p=D+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;q=o;o=0;if(q&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;q=0;j=0;k=1}else{q=i;k=0}}else{q=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(k)break;else{E=37;break a}else{c[e>>2]=0;E=20;break}}else E=20;while(0);if((E|0)==20){E=0;if(k){i=0;E=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[n>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,D|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[p>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b+f}k=q+12|0;f=c[k>>2]|0;m=q+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Fa(42,f&255|0,w|0,b|0,u|0,v|0,a[t>>0]|0,C|0,y|0,A|0,s|0)|0;F=o;o=0;if(F&1)break;if(f|0){E=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;F=o;o=0;if(F&1)break;else{i=q;continue}}else{c[k>>2]=f+1;bh(a[f>>0]|0)|0;i=q;continue}}b:do if((E|0)==37){F=a[C+11>>0]|0;if((F<<24>>24<0?c[C+4>>2]|0:F&255)|0?(x=c[A>>2]|0,(x-y|0)<160):0){F=c[v>>2]|0;c[A>>2]=x+4;c[x>>2]=F}o=0;b=pa(63,b|0,c[u>>2]|0,g|0,w|0)|0;f=z;F=o;o=0;if(!(F&1)?(F=h,c[F>>2]=b,c[F+4>>2]=f,o=0,db(107,C|0,y|0,c[A>>2]|0,g|0),F=o,o=0,!(F&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;F=o;o=0;if(F&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{E=56;break}else{c[e>>2]=0;E=54;break}}else E=54;while(0);if((E|0)==54?f:0)E=56;if((E|0)==56)c[g>>2]=c[g>>2]|2;F=c[d>>2]|0;pU(D);pU(C);l=B;return F|0}}while(0);b=Fb()|0}pU(D);pU(C);Qb(b|0);return 0}function zM(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;i=l;l=l+16|0;g=i;if((a|0)==(b|0)){c[d>>2]=4;e=0;a=0}else{h=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;a=KI(a,g,e,YL()|0)|0;e=z;f=c[(xI()|0)>>2]|0;if(!f)c[(xI()|0)>>2]=h;if((c[g>>2]|0)==(b|0)){if((f|0)==34){c[d>>2]=4;e=(e|0)>0|(e|0)==0&a>>>0>0;a=e?-1:0;e=e?2147483647:-2147483648}}else{c[d>>2]=4;a=0;e=0}}z=e;l=i;return a|0}function AM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+224|0;s=A+198|0;t=A+196|0;B=A+184|0;C=A+172|0;u=A+168|0;x=A+8|0;y=A+4|0;v=A;w=pM(f)|0;qM(B,f,s,t);c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}r=C+11|0;if((a[r>>0]|0)<0)b=(c[C+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b;c[y>>2]=x;c[v>>2]=0;p=C+4|0;q=C+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;n=o;o=0;if(n&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;n=0;j=0;k=1}else{n=i;k=0}}else{n=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(k)break;else{D=37;break a}else{c[e>>2]=0;D=20;break}}else D=20;while(0);if((D|0)==20){D=0;if(k){i=0;D=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[p>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,C|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[q>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b+f}k=n+12|0;f=c[k>>2]|0;m=n+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Fa(42,f&255|0,w|0,b|0,u|0,v|0,a[t>>0]|0,B|0,x|0,y|0,s|0)|0;E=o;o=0;if(E&1)break;if(f|0){D=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[n>>2]|0)+40>>2]|0,n|0)|0;E=o;o=0;if(E&1)break;else{i=n;continue}}else{c[k>>2]=f+1;bh(a[f>>0]|0)|0;i=n;continue}}b:do if((D|0)==37){E=a[B+11>>0]|0;if((E<<24>>24<0?c[B+4>>2]|0:E&255)|0?(z=c[y>>2]|0,(z-x|0)<160):0){E=c[v>>2]|0;c[y>>2]=z+4;c[z>>2]=E}o=0;b=pa(64,b|0,c[u>>2]|0,g|0,w|0)|0;E=o;o=0;if(!(E&1)?(c[h>>2]=b,o=0,db(107,B|0,x|0,c[y>>2]|0,g|0),E=o,o=0,!(E&1)):0){if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;E=o;o=0;if(E&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{D=56;break}else{c[e>>2]=0;D=54;break}}else D=54;while(0);if((D|0)==54?f:0)D=56;if((D|0)==56)c[g>>2]=c[g>>2]|2;E=c[d>>2]|0;pU(C);pU(B);l=A;return E|0}}while(0);b=Fb()|0}pU(C);pU(B);Qb(b|0);return 0}function BM(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;i=l;l=l+16|0;g=i;if((a|0)==(b|0)){c[d>>2]=4;a=0}else{h=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;a=KI(a,g,e,YL()|0)|0;e=z;f=c[(xI()|0)>>2]|0;if(!f)c[(xI()|0)>>2]=h;a:do if((c[g>>2]|0)==(b|0)){do if((f|0)==34){c[d>>2]=4;if((e|0)>0|(e|0)==0&a>>>0>0){a=2147483647;break a}}else{if((e|0)<-1|(e|0)==-1&a>>>0<2147483648){c[d>>2]=4;break}if((e|0)>0|(e|0)==0&a>>>0>2147483647){c[d>>2]=4;a=2147483647;break a}else break a}while(0);a=-2147483648}else{c[d>>2]=4;a=0}while(0)}l=i;return a|0}function CM(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+112|0;j=y;m=(f-e|0)/12|0;do if(m>>>0>100){k=nI(m)|0;if(!k){o=0;La(45);o=0;e=Fb()|0;break}else{j=k;x=k;z=5;break}}else{x=0;z=5}while(0);if((z|0)==5){p=e;q=j;k=0;while(1){if((p|0)==(f|0))break;n=a[p+11>>0]|0;if(n<<24>>24<0)n=c[p+4>>2]|0;else n=n&255;if(!n){a[q>>0]=2;k=k+1|0;m=m+-1|0}else a[q>>0]=1;p=p+12|0;q=q+1|0}w=0;u=k;a:while(1){k=c[b>>2]|0;do if(k){n=c[k+12>>2]|0;if((n|0)==(c[k+16>>2]|0)){o=0;k=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;v=o;o=0;if(v&1)break a}else k=bh(a[n>>0]|0)|0;if(Yg(k,Qg()|0)|0){c[b>>2]=0;q=1;break}else{q=(c[b>>2]|0)==0;break}}else q=1;while(0);n=c[d>>2]|0;if(n){k=c[n+12>>2]|0;if((k|0)==(c[n+16>>2]|0)){o=0;k=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;v=o;o=0;if(v&1)break}else k=bh(a[k>>0]|0)|0;if(Yg(k,Qg()|0)|0){c[d>>2]=0;n=0;k=1}else k=0}else{n=0;k=1}p=c[b>>2]|0;if(!((m|0)!=0&(q^k))){z=29;break}k=c[p+12>>2]|0;if((k|0)==(c[p+16>>2]|0)){o=0;k=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1)break}else k=bh(a[k>>0]|0)|0;k=k&255;if(!i){o=0;k=ja(c[(c[g>>2]|0)+12>>2]|0,g|0,k|0)|0;v=o;o=0;if(v&1)break}v=w+1|0;s=e;r=0;t=j;while(1){if((s|0)==(f|0))break;do if((a[t>>0]|0)==1){p=s+11|0;if((a[p>>0]|0)<0)n=c[s>>2]|0;else n=s;n=a[n+w>>0]|0;if(!i){o=0;n=ja(c[(c[g>>2]|0)+12>>2]|0,g|0,n|0)|0;q=o;o=0;if(q&1)break a}q=m+-1|0;if(k<<24>>24!=n<<24>>24){a[t>>0]=0;n=r;p=u;m=q;break}n=a[p>>0]|0;if(n<<24>>24<0)n=c[s+4>>2]|0;else n=n&255;if((n|0)==(v|0)){a[t>>0]=2;n=1;p=u+1|0;m=q}else{n=1;p=u}}else{n=r;p=u}while(0);s=s+12|0;r=n;t=t+1|0;u=p}if(!r){w=v;continue}k=c[b>>2]|0;n=k+12|0;p=c[n>>2]|0;if((p|0)==(c[k+16>>2]|0)){o=0;fa(c[(c[k>>2]|0)+40>>2]|0,k|0)|0;w=o;o=0;if(w&1)break}else{c[n>>2]=p+1;bh(a[p>>0]|0)|0}if((u+m|0)>>>0>1){p=e;q=j;k=u}else{w=v;continue}while(1){if((p|0)==(f|0)){w=v;u=k;continue a}if((a[q>>0]|0)==2){n=a[p+11>>0]|0;if(n<<24>>24<0)n=c[p+4>>2]|0;else n=n&255;if((n|0)!=(v|0)){a[q>>0]=0;k=k+-1|0}}p=p+12|0;q=q+1|0}}b:do if((z|0)==29){do if(p){k=c[p+12>>2]|0;if((k|0)==(c[p+16>>2]|0)){o=0;k=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;i=o;o=0;if(i&1)break b}else k=bh(a[k>>0]|0)|0;if(Yg(k,Qg()|0)|0){c[b>>2]=0;m=1;break}else{m=(c[b>>2]|0)==0;break}}else m=1;while(0);do if(n){k=c[n+12>>2]|0;if((k|0)==(c[n+16>>2]|0)){o=0;k=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;b=o;o=0;if(b&1)break b}else k=bh(a[k>>0]|0)|0;if(!(Yg(k,Qg()|0)|0))if(m)break;else{z=78;break}else{c[d>>2]=0;z=76;break}}else z=76;while(0);if((z|0)==76)if(m)z=78;if((z|0)==78)c[h>>2]=c[h>>2]|2;while(1){if((e|0)==(f|0)){z=82;break}if((a[j>>0]|0)==2)break;e=e+12|0;j=j+1|0}if((z|0)==82){c[h>>2]=c[h>>2]|4;e=f}if(x|0)oI(x);l=y;return e|0}while(0);e=Fb()|0;if(x)oI(x)}Qb(e|0);return 0}function DM(a){a=a|0;BL(a);return}function EM(a){a=a|0;BL(a);cU(a);return}function FM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0;p=l;l=l+48|0;m=p+40|0;q=p+16|0;i=p+12|0;j=p+8|0;k=p+4|0;n=p;a:do if(!(c[f+4>>2]&1)){c[i>>2]=-1;n=c[(c[b>>2]|0)+16>>2]|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];c[q>>2]=c[j>>2];c[m>>2]=c[k>>2];c[d>>2]=_c[n&127](b,q,m,f,g,i)|0;switch(c[i>>2]|0){case 0:{a[h>>0]=0;break}case 1:{a[h>>0]=1;break}default:{a[h>>0]=1;c[g>>2]=4}}b=c[d>>2]|0}else{nL(m,f);o=0;j=ja(57,m|0,59912)|0;k=o;o=0;do if(!(k&1)){WL(m);nL(m,f);o=0;b=ja(57,m|0,59920)|0;f=o;o=0;if(f&1){b=Fb()|0;WL(m);break}WL(m);o=0;Xa(c[(c[b>>2]|0)+24>>2]|0,q|0,b|0);f=o;o=0;if(f&1){b=Fb()|0;break}o=0;Xa(c[(c[b>>2]|0)+28>>2]|0,q+12|0,b|0);f=o;o=0;if(f&1){b=Fb()|0;FU(q);break}c[n>>2]=c[e>>2];i=q+24|0;o=0;c[m>>2]=c[n>>2];b=Ba(49,d|0,m|0,q|0,i|0,j|0,g|0,1)|0;n=o;o=0;if(n&1){b=Fb()|0;j=z;do{i=i+-12|0;FU(i)}while((i|0)!=(q|0));break}else{a[h>>0]=(b|0)==(q|0)&1;b=c[d>>2]|0;do{i=i+-12|0;FU(i)}while((i|0)!=(q|0));break a}}else{b=Fb()|0;WL(m)}while(0);Qb(b|0)}while(0);l=p;return b|0}function GM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=aN(a,j,i,e,f,g)|0;l=h;return g|0}function HM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=$M(a,j,i,e,f,g)|0;l=h;return g|0}function IM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=_M(a,j,i,e,f,g)|0;l=h;return g|0}function JM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=ZM(a,j,i,e,f,g)|0;l=h;return g|0}function KM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=YM(a,j,i,e,f,g)|0;l=h;return g|0}function LM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=WM(a,j,i,e,f,g)|0;l=h;return g|0}function MM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=VM(a,j,i,e,f,g)|0;l=h;return g|0}function NM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=UM(a,j,i,e,f,g)|0;l=h;return g|0}function OM(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=RM(a,j,i,e,f,g)|0;l=h;return g|0}function PM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+320|0;v=E;t=E+208|0;G=E+192|0;F=E+180|0;u=E+176|0;q=E+16|0;r=E+8|0;s=E+4|0;c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[G+(b<<2)>>2]=0;b=b+1|0}o=0;Xa(107,F|0,f|0);p=o;o=0;do if(p&1){b=Fb()|0;H=36}else{o=0;b=ja(57,F|0,59912)|0;p=o;o=0;if(!(p&1)?(o=0,pa(c[(c[b>>2]|0)+48>>2]|0,b|0,54627,54653,t|0)|0,p=o,o=0,!(p&1)):0){WL(F);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}p=F+11|0;if((a[p>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);n=o;o=0;if(n&1)b=Fb()|0;else{j=(a[p>>0]|0)<0?c[F>>2]|0:F;c[u>>2]=j;c[r>>2]=q;c[s>>2]=0;m=F+4|0;n=F+8|0;i=c[d>>2]|0;f=i;a:while(1){if(f){b=c[f+12>>2]|0;if((b|0)==(c[f+16>>2]|0)){o=0;b=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;k=o;o=0;if(k&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;x=0;C=0;f=1}else{x=f;C=i;f=0}}else{x=0;C=0;f=1}i=c[e>>2]|0;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;k=o;o=0;if(k&1)break a}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{w=j;D=i;H=46;break a}else{c[e>>2]=0;H=26;break}}else H=26;while(0);if((H|0)==26){H=0;if(f){w=j;D=0;H=46;break}else i=0}f=a[p>>0]|0;f=f<<24>>24<0?c[m>>2]|0:f&255;if((c[u>>2]|0)==(j+f|0)){o=0;bb(58,F|0,f<<1|0,0);k=o;o=0;if(k&1)break;if((a[p>>0]|0)<0)b=(c[n>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);k=o;o=0;if(k&1)break;k=(a[p>>0]|0)<0?c[F>>2]|0:F;c[u>>2]=k+f;f=k}else f=j;j=x+12|0;b=c[j>>2]|0;k=x+16|0;if((b|0)==(c[k>>2]|0)){o=0;b=fa(c[(c[x>>2]|0)+36>>2]|0,x|0)|0;I=o;o=0;if(I&1)break}else b=ZK(c[b>>2]|0)|0;o=0;b=Fa(43,b|0,16,f|0,u|0,s|0,0,G|0,q|0,r|0,t|0)|0;I=o;o=0;if(I&1)break;if(b|0){w=f;D=i;H=46;break}b=c[j>>2]|0;if((b|0)==(c[k>>2]|0)){o=0;fa(c[(c[x>>2]|0)+40>>2]|0,x|0)|0;I=o;o=0;if(I&1)break;else{j=f;f=x;i=C;continue}}else{c[j>>2]=b+4;ZK(c[b>>2]|0)|0;j=f;f=x;i=C;continue}}b:do if((((H|0)==46?(o=0,bb(58,F|0,(c[u>>2]|0)-w|0,0),I=o,o=0,!(I&1)):0)?(y=a[p>>0]|0,z=c[F>>2]|0,o=0,A=da(44)|0,I=o,o=0,!(I&1)):0)?(o=0,c[v>>2]=h,B=pa(58,(y<<24>>24<0?z:F)|0,A|0,54660,v|0)|0,I=o,o=0,!(I&1)):0){if((B|0)!=1)c[g>>2]=4;if(x){b=c[x+12>>2]|0;if((b|0)==(c[x+16>>2]|0)){o=0;b=fa(c[(c[C>>2]|0)+36>>2]|0,x|0)|0;I=o;o=0;if(I&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(D){b=c[D+12>>2]|0;if((b|0)==(c[D+16>>2]|0)){o=0;b=fa(c[(c[D>>2]|0)+36>>2]|0,D|0)|0;I=o;o=0;if(I&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{H=65;break}else{c[e>>2]=0;H=63;break}}else H=63;while(0);if((H|0)==63?f:0)H=65;if((H|0)==65)c[g>>2]=c[g>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}while(0);b=Fb()|0}pU(F);break}b=Fb()|0;WL(F);H=36}while(0);pU(G);Qb(b|0);return 0}function QM(b,d,e,f,g,h,i,j,k,l){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0;o=c[f>>2]|0;p=(o|0)==(e|0);do if(p){m=(c[l+96>>2]|0)==(b|0);if(!m?(c[l+100>>2]|0)!=(b|0):0){n=5;break}c[f>>2]=e+1;a[e>>0]=m?43:45;c[g>>2]=0;m=0}else n=5;while(0);a:do if((n|0)==5){n=a[i+11>>0]|0;if((b|0)==(h|0)?((n<<24>>24<0?c[i+4>>2]|0:n&255)|0)!=0:0){m=c[k>>2]|0;if((m-j|0)>=160){m=0;break}f=c[g>>2]|0;c[k>>2]=m+4;c[m>>2]=f;c[g>>2]=0;m=0;break}i=l+104|0;h=0;while(1){m=l+(h<<2)|0;if((h|0)==26){m=i;break}if((c[m>>2]|0)==(b|0))break;else h=h+1|0}m=m-l|0;h=m>>2;if((m|0)>92)m=-1;else{i=54627+h|0;switch(d|0){case 10:case 8:{if((h|0)>=(d|0)){m=-1;break a}break}case 16:{if((m|0)>=88){if(p){m=-1;break a}if((o-e|0)>=3){m=-1;break a}if((a[o+-1>>0]|0)!=48){m=-1;break a}c[g>>2]=0;m=a[i>>0]|0;c[f>>2]=o+1;a[o>>0]=m;m=0;break a}break}default:{}}m=a[i>>0]|0;c[f>>2]=o+1;a[o>>0]=m;c[g>>2]=(c[g>>2]|0)+1;m=0}}while(0);return m|0}function RM(b,d,e,f,g,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+352|0;v=E+208|0;w=E+200|0;x=E+196|0;G=E+184|0;F=E+172|0;y=E+168|0;B=E+8|0;C=E+4|0;z=E;A=E+337|0;u=E+336|0;SM(G,f,v,w,x);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}t=F+11|0;if((a[t>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);s=o;o=0;if(s&1)b=Fb()|0;else{b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b;c[C>>2]=B;c[z>>2]=0;a[A>>0]=1;a[u>>0]=69;r=F+4|0;s=F+8|0;m=c[d>>2]|0;k=m;a:while(1){if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;q=o;o=0;if(q&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;q=0;m=0;n=1}else{q=k;n=0}}else{q=0;m=0;n=1}k=c[e>>2]|0;do if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;p=o;o=0;if(p&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(n)break;else{H=37;break a}else{c[e>>2]=0;H=20;break}}else H=20;while(0);if((H|0)==20){H=0;if(n){k=0;H=37;break}else k=0}f=a[t>>0]|0;f=f<<24>>24<0?c[r>>2]|0:f&255;if((c[y>>2]|0)==(b+f|0)){o=0;bb(58,F|0,f<<1|0,0);p=o;o=0;if(p&1)break;if((a[t>>0]|0)<0)b=(c[s>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);p=o;o=0;if(p&1)break;b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b+f}n=q+12|0;f=c[n>>2]|0;p=q+16|0;if((f|0)==(c[p>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Ja(43,f|0,A|0,u|0,b|0,y|0,c[w>>2]|0,c[x>>2]|0,G|0,B|0,C|0,z|0,v|0)|0;I=o;o=0;if(I&1)break;if(f|0){H=37;break}f=c[n>>2]|0;if((f|0)==(c[p>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;I=o;o=0;if(I&1)break;else{k=q;continue}}else{c[n>>2]=f+4;ZK(c[f>>2]|0)|0;k=q;continue}}b:do if((H|0)==37){I=a[G+11>>0]|0;if(!((a[A>>0]|0)==0?1:((I<<24>>24<0?c[G+4>>2]|0:I&255)|0)==0)?(D=c[C>>2]|0,(D-B|0)<160):0){I=c[z>>2]|0;c[C>>2]=D+4;c[D>>2]=I}o=0;j=+$(44,b|0,c[y>>2]|0,g|0);I=o;o=0;if(!(I&1)?(h[i>>3]=j,o=0,db(107,G|0,B|0,c[C>>2]|0,g|0),I=o,o=0,!(I&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[m>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(k){b=c[k+12>>2]|0;if((b|0)==(c[k+16>>2]|0)){o=0;b=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;I=o;o=0;if(I&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{H=56;break}else{c[e>>2]=0;H=54;break}}else H=54;while(0);if((H|0)==54?f:0)H=56;if((H|0)==56)c[g>>2]=c[g>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}}while(0);b=Fb()|0}pU(F);pU(G);Qb(b|0);return 0}function SM(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,m=0;k=l;l=l+16|0;j=k;nL(j,b);o=0;b=ja(57,j|0,59912)|0;m=o;o=0;if(((((!(m&1)?(o=0,pa(c[(c[b>>2]|0)+48>>2]|0,b|0,54627,54659,d|0)|0,m=o,o=0,!(m&1)):0)?(o=0,g=ja(57,j|0,59920)|0,m=o,o=0,!(m&1)):0)?(o=0,h=fa(c[(c[g>>2]|0)+12>>2]|0,g|0)|0,m=o,o=0,!(m&1)):0)?(c[e>>2]=h,o=0,i=fa(c[(c[g>>2]|0)+16>>2]|0,g|0)|0,m=o,o=0,!(m&1)):0)?(c[f>>2]=i,o=0,Xa(c[(c[g>>2]|0)+20>>2]|0,a|0,g|0),m=o,o=0,!(m&1)):0){WL(j);l=k;return}m=Fb()|0;WL(j);Qb(m|0)}function TM(b,d,e,f,g,h,i,j,k,l,m,n){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0;p=k;a:do if((b|0)==(h|0))if(a[d>>0]|0){a[d>>0]=0;e=c[g>>2]|0;c[g>>2]=e+1;a[e>>0]=46;g=a[j+11>>0]|0;if(((g<<24>>24<0?c[j+4>>2]|0:g&255)|0)!=0?(o=c[l>>2]|0,(o-p|0)<160):0){k=c[m>>2]|0;c[l>>2]=o+4;c[o>>2]=k;k=0}else k=0}else k=-1;else{if((b|0)==(i|0)?(i=a[j+11>>0]|0,(i<<24>>24<0?c[j+4>>2]|0:i&255)|0):0){if(!(a[d>>0]|0)){k=-1;break}k=c[l>>2]|0;if((k-p|0)>=160){k=0;break}g=c[m>>2]|0;c[l>>2]=k+4;c[k>>2]=g;c[m>>2]=0;k=0;break}h=n+128|0;o=0;while(1){k=n+(o<<2)|0;if((o|0)==32){k=h;break}if((c[k>>2]|0)==(b|0))break;else o=o+1|0}o=k-n|0;k=o>>2;if((o|0)<=124){h=a[54627+k>>0]|0;switch(k|0){case 24:case 25:{k=c[g>>2]|0;if((k|0)!=(f|0)?(a[k+-1>>0]&95)!=(a[e>>0]&127):0){k=-1;break a}c[g>>2]=k+1;a[k>>0]=h;k=0;break a}case 23:case 22:{a[e>>0]=80;break}default:{k=h&95;if((((k|0)==(a[e>>0]|0)?(a[e>>0]=k|128,a[d>>0]|0):0)?(a[d>>0]=0,e=a[j+11>>0]|0,(e<<24>>24<0?c[j+4>>2]|0:e&255)|0):0)?(q=c[l>>2]|0,(q-p|0)<160):0){e=c[m>>2]|0;c[l>>2]=q+4;c[q>>2]=e}}}l=c[g>>2]|0;c[g>>2]=l+1;a[l>>0]=h;if((o|0)>84)k=0;else{c[m>>2]=(c[m>>2]|0)+1;k=0}}else k=-1}while(0);return k|0}function UM(b,d,e,f,g,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+352|0;v=E+208|0;w=E+200|0;x=E+196|0;G=E+184|0;F=E+172|0;y=E+168|0;B=E+8|0;C=E+4|0;z=E;A=E+337|0;u=E+336|0;SM(G,f,v,w,x);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}t=F+11|0;if((a[t>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);s=o;o=0;if(s&1)b=Fb()|0;else{b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b;c[C>>2]=B;c[z>>2]=0;a[A>>0]=1;a[u>>0]=69;r=F+4|0;s=F+8|0;m=c[d>>2]|0;k=m;a:while(1){if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;q=o;o=0;if(q&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;q=0;m=0;n=1}else{q=k;n=0}}else{q=0;m=0;n=1}k=c[e>>2]|0;do if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;p=o;o=0;if(p&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(n)break;else{H=37;break a}else{c[e>>2]=0;H=20;break}}else H=20;while(0);if((H|0)==20){H=0;if(n){k=0;H=37;break}else k=0}f=a[t>>0]|0;f=f<<24>>24<0?c[r>>2]|0:f&255;if((c[y>>2]|0)==(b+f|0)){o=0;bb(58,F|0,f<<1|0,0);p=o;o=0;if(p&1)break;if((a[t>>0]|0)<0)b=(c[s>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);p=o;o=0;if(p&1)break;b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b+f}n=q+12|0;f=c[n>>2]|0;p=q+16|0;if((f|0)==(c[p>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Ja(43,f|0,A|0,u|0,b|0,y|0,c[w>>2]|0,c[x>>2]|0,G|0,B|0,C|0,z|0,v|0)|0;I=o;o=0;if(I&1)break;if(f|0){H=37;break}f=c[n>>2]|0;if((f|0)==(c[p>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;I=o;o=0;if(I&1)break;else{k=q;continue}}else{c[n>>2]=f+4;ZK(c[f>>2]|0)|0;k=q;continue}}b:do if((H|0)==37){I=a[G+11>>0]|0;if(!((a[A>>0]|0)==0?1:((I<<24>>24<0?c[G+4>>2]|0:I&255)|0)==0)?(D=c[C>>2]|0,(D-B|0)<160):0){I=c[z>>2]|0;c[C>>2]=D+4;c[D>>2]=I}o=0;j=+$(45,b|0,c[y>>2]|0,g|0);I=o;o=0;if(!(I&1)?(h[i>>3]=j,o=0,db(107,G|0,B|0,c[C>>2]|0,g|0),I=o,o=0,!(I&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[m>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(k){b=c[k+12>>2]|0;if((b|0)==(c[k+16>>2]|0)){o=0;b=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;I=o;o=0;if(I&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{H=56;break}else{c[e>>2]=0;H=54;break}}else H=54;while(0);if((H|0)==54?f:0)H=56;if((H|0)==56)c[g>>2]=c[g>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}}while(0);b=Fb()|0}pU(F);pU(G);Qb(b|0);return 0}function VM(b,d,e,f,h,i){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+352|0;v=E+208|0;w=E+200|0;x=E+196|0;G=E+184|0;F=E+172|0;y=E+168|0;B=E+8|0;C=E+4|0;z=E;A=E+337|0;u=E+336|0;SM(G,f,v,w,x);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}t=F+11|0;if((a[t>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);s=o;o=0;if(s&1)b=Fb()|0;else{b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b;c[C>>2]=B;c[z>>2]=0;a[A>>0]=1;a[u>>0]=69;r=F+4|0;s=F+8|0;m=c[d>>2]|0;k=m;a:while(1){if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;q=o;o=0;if(q&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;q=0;m=0;n=1}else{q=k;n=0}}else{q=0;m=0;n=1}k=c[e>>2]|0;do if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;p=o;o=0;if(p&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(n)break;else{H=37;break a}else{c[e>>2]=0;H=20;break}}else H=20;while(0);if((H|0)==20){H=0;if(n){k=0;H=37;break}else k=0}f=a[t>>0]|0;f=f<<24>>24<0?c[r>>2]|0:f&255;if((c[y>>2]|0)==(b+f|0)){o=0;bb(58,F|0,f<<1|0,0);p=o;o=0;if(p&1)break;if((a[t>>0]|0)<0)b=(c[s>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);p=o;o=0;if(p&1)break;b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b+f}n=q+12|0;f=c[n>>2]|0;p=q+16|0;if((f|0)==(c[p>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Ja(43,f|0,A|0,u|0,b|0,y|0,c[w>>2]|0,c[x>>2]|0,G|0,B|0,C|0,z|0,v|0)|0;I=o;o=0;if(I&1)break;if(f|0){H=37;break}f=c[n>>2]|0;if((f|0)==(c[p>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;I=o;o=0;if(I&1)break;else{k=q;continue}}else{c[n>>2]=f+4;ZK(c[f>>2]|0)|0;k=q;continue}}b:do if((H|0)==37){I=a[G+11>>0]|0;if(!((a[A>>0]|0)==0?1:((I<<24>>24<0?c[G+4>>2]|0:I&255)|0)==0)?(D=c[C>>2]|0,(D-B|0)<160):0){I=c[z>>2]|0;c[C>>2]=D+4;c[D>>2]=I}o=0;j=+$(46,b|0,c[y>>2]|0,h|0);I=o;o=0;if(!(I&1)?(g[i>>2]=j,o=0,db(107,G|0,B|0,c[C>>2]|0,h|0),I=o,o=0,!(I&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[m>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(k){b=c[k+12>>2]|0;if((b|0)==(c[k+16>>2]|0)){o=0;b=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;I=o;o=0;if(I&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{H=56;break}else{c[e>>2]=0;H=54;break}}else H=54;while(0);if((H|0)==54?f:0)H=56;if((H|0)==56)c[h>>2]=c[h>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}}while(0);b=Fb()|0}pU(F);pU(G);Qb(b|0);return 0}function WM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0;B=l;l=l+304|0;s=B+200|0;t=B+196|0;C=B+184|0;D=B+172|0;u=B+168|0;y=B+8|0;A=B+4|0;v=B;w=pM(f)|0;XM(C,f,s,t);c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[D+(b<<2)>>2]=0;b=b+1|0}r=D+11|0;if((a[r>>0]|0)<0)b=(c[D+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b;c[A>>2]=y;c[v>>2]=0;n=D+4|0;p=D+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;q=o;o=0;if(q&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;q=0;j=0;k=1}else{q=i;k=0}}else{q=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(k)break;else{E=37;break a}else{c[e>>2]=0;E=20;break}}else E=20;while(0);if((E|0)==20){E=0;if(k){i=0;E=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[n>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,D|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[p>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b+f}k=q+12|0;f=c[k>>2]|0;m=q+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Fa(43,f|0,w|0,b|0,u|0,v|0,c[t>>2]|0,C|0,y|0,A|0,s|0)|0;F=o;o=0;if(F&1)break;if(f|0){E=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;F=o;o=0;if(F&1)break;else{i=q;continue}}else{c[k>>2]=f+4;ZK(c[f>>2]|0)|0;i=q;continue}}b:do if((E|0)==37){F=a[C+11>>0]|0;if((F<<24>>24<0?c[C+4>>2]|0:F&255)|0?(x=c[A>>2]|0,(x-y|0)<160):0){F=c[v>>2]|0;c[A>>2]=x+4;c[x>>2]=F}o=0;b=pa(59,b|0,c[u>>2]|0,g|0,w|0)|0;f=z;F=o;o=0;if(!(F&1)?(F=h,c[F>>2]=b,c[F+4>>2]=f,o=0,db(107,C|0,y|0,c[A>>2]|0,g|0),F=o,o=0,!(F&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;F=o;o=0;if(F&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{E=56;break}else{c[e>>2]=0;E=54;break}}else E=54;while(0);if((E|0)==54?f:0)E=56;if((E|0)==56)c[g>>2]=c[g>>2]|2;F=c[d>>2]|0;pU(D);pU(C);l=B;return F|0}}while(0);b=Fb()|0}pU(D);pU(C);Qb(b|0);return 0}function XM(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;i=l;l=l+16|0;h=i;nL(h,b);o=0;b=ja(57,h|0,59912)|0;j=o;o=0;if((((!(j&1)?(o=0,pa(c[(c[b>>2]|0)+48>>2]|0,b|0,54627,54653,d|0)|0,j=o,o=0,!(j&1)):0)?(o=0,f=ja(57,h|0,59920)|0,j=o,o=0,!(j&1)):0)?(o=0,g=fa(c[(c[f>>2]|0)+16>>2]|0,f|0)|0,j=o,o=0,!(j&1)):0)?(c[e>>2]=g,o=0,Xa(c[(c[f>>2]|0)+20>>2]|0,a|0,f|0),j=o,o=0,!(j&1)):0){WL(h);l=i;return}j=Fb()|0;WL(h);Qb(j|0)}function YM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+304|0;s=A+200|0;t=A+196|0;B=A+184|0;C=A+172|0;u=A+168|0;x=A+8|0;y=A+4|0;v=A;w=pM(f)|0;XM(B,f,s,t);c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}r=C+11|0;if((a[r>>0]|0)<0)b=(c[C+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b;c[y>>2]=x;c[v>>2]=0;p=C+4|0;q=C+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;n=o;o=0;if(n&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;n=0;j=0;k=1}else{n=i;k=0}}else{n=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(k)break;else{D=37;break a}else{c[e>>2]=0;D=20;break}}else D=20;while(0);if((D|0)==20){D=0;if(k){i=0;D=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[p>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,C|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[q>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b+f}k=n+12|0;f=c[k>>2]|0;m=n+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Fa(43,f|0,w|0,b|0,u|0,v|0,c[t>>2]|0,B|0,x|0,y|0,s|0)|0;E=o;o=0;if(E&1)break;if(f|0){D=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[n>>2]|0)+40>>2]|0,n|0)|0;E=o;o=0;if(E&1)break;else{i=n;continue}}else{c[k>>2]=f+4;ZK(c[f>>2]|0)|0;i=n;continue}}b:do if((D|0)==37){E=a[B+11>>0]|0;if((E<<24>>24<0?c[B+4>>2]|0:E&255)|0?(z=c[y>>2]|0,(z-x|0)<160):0){E=c[v>>2]|0;c[y>>2]=z+4;c[z>>2]=E}o=0;b=pa(60,b|0,c[u>>2]|0,g|0,w|0)|0;E=o;o=0;if(!(E&1)?(c[h>>2]=b,o=0,db(107,B|0,x|0,c[y>>2]|0,g|0),E=o,o=0,!(E&1)):0){if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;E=o;o=0;if(E&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{D=56;break}else{c[e>>2]=0;D=54;break}}else D=54;while(0);if((D|0)==54?f:0)D=56;if((D|0)==56)c[g>>2]=c[g>>2]|2;E=c[d>>2]|0;pU(C);pU(B);l=A;return E|0}}while(0);b=Fb()|0}pU(C);pU(B);Qb(b|0);return 0}function ZM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+304|0;s=A+200|0;t=A+196|0;B=A+184|0;C=A+172|0;u=A+168|0;x=A+8|0;y=A+4|0;v=A;w=pM(f)|0;XM(B,f,s,t);c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}r=C+11|0;if((a[r>>0]|0)<0)b=(c[C+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b;c[y>>2]=x;c[v>>2]=0;p=C+4|0;q=C+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;n=o;o=0;if(n&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;n=0;j=0;k=1}else{n=i;k=0}}else{n=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(k)break;else{D=37;break a}else{c[e>>2]=0;D=20;break}}else D=20;while(0);if((D|0)==20){D=0;if(k){i=0;D=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[p>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,C|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[q>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b+f}k=n+12|0;f=c[k>>2]|0;m=n+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Fa(43,f|0,w|0,b|0,u|0,v|0,c[t>>2]|0,B|0,x|0,y|0,s|0)|0;E=o;o=0;if(E&1)break;if(f|0){D=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[n>>2]|0)+40>>2]|0,n|0)|0;E=o;o=0;if(E&1)break;else{i=n;continue}}else{c[k>>2]=f+4;ZK(c[f>>2]|0)|0;i=n;continue}}b:do if((D|0)==37){E=a[B+11>>0]|0;if((E<<24>>24<0?c[B+4>>2]|0:E&255)|0?(z=c[y>>2]|0,(z-x|0)<160):0){E=c[v>>2]|0;c[y>>2]=z+4;c[z>>2]=E}o=0;b=pa(61,b|0,c[u>>2]|0,g|0,w|0)|0;E=o;o=0;if(!(E&1)?(c[h>>2]=b,o=0,db(107,B|0,x|0,c[y>>2]|0,g|0),E=o,o=0,!(E&1)):0){if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;E=o;o=0;if(E&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{D=56;break}else{c[e>>2]=0;D=54;break}}else D=54;while(0);if((D|0)==54?f:0)D=56;if((D|0)==56)c[g>>2]=c[g>>2]|2;E=c[d>>2]|0;pU(C);pU(B);l=A;return E|0}}while(0);b=Fb()|0}pU(C);pU(B);Qb(b|0);return 0}function _M(d,e,f,g,h,i){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;B=l;l=l+304|0;t=B+200|0;u=B+196|0;C=B+184|0;D=B+172|0;v=B+168|0;y=B+8|0;z=B+4|0;w=B;x=pM(g)|0;XM(C,g,t,u);c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[D+(d<<2)>>2]=0;d=d+1|0}s=D+11|0;if((a[s>>0]|0)<0)d=(c[D+8>>2]&2147483647)+-1|0;else d=10;o=0;bb(58,D|0,d|0,0);r=o;o=0;if(r&1)d=Fb()|0;else{d=(a[s>>0]|0)<0?c[D>>2]|0:D;c[v>>2]=d;c[z>>2]=y;c[w>>2]=0;q=D+4|0;r=D+8|0;k=c[e>>2]|0;j=k;a:while(1){if(j){g=c[j+12>>2]|0;if((g|0)==(c[j+16>>2]|0)){o=0;g=fa(c[(c[j>>2]|0)+36>>2]|0,j|0)|0;p=o;o=0;if(p&1)break}else g=ZK(c[g>>2]|0)|0;if(oL(g,YK()|0)|0){c[e>>2]=0;p=0;k=0;m=1}else{p=j;m=0}}else{p=0;k=0;m=1}j=c[f>>2]|0;do if(j){g=c[j+12>>2]|0;if((g|0)==(c[j+16>>2]|0)){o=0;g=fa(c[(c[j>>2]|0)+36>>2]|0,j|0)|0;n=o;o=0;if(n&1)break a}else g=ZK(c[g>>2]|0)|0;if(!(oL(g,YK()|0)|0))if(m)break;else{E=37;break a}else{c[f>>2]=0;E=20;break}}else E=20;while(0);if((E|0)==20){E=0;if(m){j=0;E=37;break}else j=0}g=a[s>>0]|0;g=g<<24>>24<0?c[q>>2]|0:g&255;if((c[v>>2]|0)==(d+g|0)){o=0;bb(58,D|0,g<<1|0,0);n=o;o=0;if(n&1)break;if((a[s>>0]|0)<0)d=(c[r>>2]&2147483647)+-1|0;else d=10;o=0;bb(58,D|0,d|0,0);n=o;o=0;if(n&1)break;d=(a[s>>0]|0)<0?c[D>>2]|0:D;c[v>>2]=d+g}m=p+12|0;g=c[m>>2]|0;n=p+16|0;if((g|0)==(c[n>>2]|0)){o=0;g=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;F=o;o=0;if(F&1)break}else g=ZK(c[g>>2]|0)|0;o=0;g=Fa(43,g|0,x|0,d|0,v|0,w|0,c[u>>2]|0,C|0,y|0,z|0,t|0)|0;F=o;o=0;if(F&1)break;if(g|0){E=37;break}g=c[m>>2]|0;if((g|0)==(c[n>>2]|0)){o=0;fa(c[(c[p>>2]|0)+40>>2]|0,p|0)|0;F=o;o=0;if(F&1)break;else{j=p;continue}}else{c[m>>2]=g+4;ZK(c[g>>2]|0)|0;j=p;continue}}b:do if((E|0)==37){F=a[C+11>>0]|0;if((F<<24>>24<0?c[C+4>>2]|0:F&255)|0?(A=c[z>>2]|0,(A-y|0)<160):0){F=c[w>>2]|0;c[z>>2]=A+4;c[A>>2]=F}o=0;d=pa(62,d|0,c[v>>2]|0,h|0,x|0)|0;F=o;o=0;if(!(F&1)?(b[i>>1]=d,o=0,db(107,C|0,y|0,c[z>>2]|0,h|0),F=o,o=0,!(F&1)):0){if(p){d=c[p+12>>2]|0;if((d|0)==(c[p+16>>2]|0)){o=0;d=fa(c[(c[k>>2]|0)+36>>2]|0,p|0)|0;F=o;o=0;if(F&1)break}else d=ZK(c[d>>2]|0)|0;if(oL(d,YK()|0)|0){c[e>>2]=0;g=1}else g=0}else g=1;do if(j){d=c[j+12>>2]|0;if((d|0)==(c[j+16>>2]|0)){o=0;d=fa(c[(c[j>>2]|0)+36>>2]|0,j|0)|0;F=o;o=0;if(F&1)break b}else d=ZK(c[d>>2]|0)|0;if(!(oL(d,YK()|0)|0))if(g)break;else{E=56;break}else{c[f>>2]=0;E=54;break}}else E=54;while(0);if((E|0)==54?g:0)E=56;if((E|0)==56)c[h>>2]=c[h>>2]|2;F=c[e>>2]|0;pU(D);pU(C);l=B;return F|0}}while(0);d=Fb()|0}pU(D);pU(C);Qb(d|0);return 0}function $M(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0;B=l;l=l+304|0;s=B+200|0;t=B+196|0;C=B+184|0;D=B+172|0;u=B+168|0;y=B+8|0;A=B+4|0;v=B;w=pM(f)|0;XM(C,f,s,t);c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[D+(b<<2)>>2]=0;b=b+1|0}r=D+11|0;if((a[r>>0]|0)<0)b=(c[D+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b;c[A>>2]=y;c[v>>2]=0;n=D+4|0;p=D+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;q=o;o=0;if(q&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;q=0;j=0;k=1}else{q=i;k=0}}else{q=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(k)break;else{E=37;break a}else{c[e>>2]=0;E=20;break}}else E=20;while(0);if((E|0)==20){E=0;if(k){i=0;E=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[n>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,D|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[p>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b+f}k=q+12|0;f=c[k>>2]|0;m=q+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Fa(43,f|0,w|0,b|0,u|0,v|0,c[t>>2]|0,C|0,y|0,A|0,s|0)|0;F=o;o=0;if(F&1)break;if(f|0){E=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;F=o;o=0;if(F&1)break;else{i=q;continue}}else{c[k>>2]=f+4;ZK(c[f>>2]|0)|0;i=q;continue}}b:do if((E|0)==37){F=a[C+11>>0]|0;if((F<<24>>24<0?c[C+4>>2]|0:F&255)|0?(x=c[A>>2]|0,(x-y|0)<160):0){F=c[v>>2]|0;c[A>>2]=x+4;c[x>>2]=F}o=0;b=pa(63,b|0,c[u>>2]|0,g|0,w|0)|0;f=z;F=o;o=0;if(!(F&1)?(F=h,c[F>>2]=b,c[F+4>>2]=f,o=0,db(107,C|0,y|0,c[A>>2]|0,g|0),F=o,o=0,!(F&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;F=o;o=0;if(F&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{E=56;break}else{c[e>>2]=0;E=54;break}}else E=54;while(0);if((E|0)==54?f:0)E=56;if((E|0)==56)c[g>>2]=c[g>>2]|2;F=c[d>>2]|0;pU(D);pU(C);l=B;return F|0}}while(0);b=Fb()|0}pU(D);pU(C);Qb(b|0);return 0}function aN(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+304|0;s=A+200|0;t=A+196|0;B=A+184|0;C=A+172|0;u=A+168|0;x=A+8|0;y=A+4|0;v=A;w=pM(f)|0;XM(B,f,s,t);c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}r=C+11|0;if((a[r>>0]|0)<0)b=(c[C+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b;c[y>>2]=x;c[v>>2]=0;p=C+4|0;q=C+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;n=o;o=0;if(n&1)break}else f=ZK(c[f>>2]|0)|0;if(oL(f,YK()|0)|0){c[d>>2]=0;n=0;j=0;k=1}else{n=i;k=0}}else{n=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=ZK(c[f>>2]|0)|0;if(!(oL(f,YK()|0)|0))if(k)break;else{D=37;break a}else{c[e>>2]=0;D=20;break}}else D=20;while(0);if((D|0)==20){D=0;if(k){i=0;D=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[p>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,C|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[q>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b+f}k=n+12|0;f=c[k>>2]|0;m=n+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else f=ZK(c[f>>2]|0)|0;o=0;f=Fa(43,f|0,w|0,b|0,u|0,v|0,c[t>>2]|0,B|0,x|0,y|0,s|0)|0;E=o;o=0;if(E&1)break;if(f|0){D=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[n>>2]|0)+40>>2]|0,n|0)|0;E=o;o=0;if(E&1)break;else{i=n;continue}}else{c[k>>2]=f+4;ZK(c[f>>2]|0)|0;i=n;continue}}b:do if((D|0)==37){E=a[B+11>>0]|0;if((E<<24>>24<0?c[B+4>>2]|0:E&255)|0?(z=c[y>>2]|0,(z-x|0)<160):0){E=c[v>>2]|0;c[y>>2]=z+4;c[z>>2]=E}o=0;b=pa(64,b|0,c[u>>2]|0,g|0,w|0)|0;E=o;o=0;if(!(E&1)?(c[h>>2]=b,o=0,db(107,B|0,x|0,c[y>>2]|0,g|0),E=o,o=0,!(E&1)):0){if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else b=ZK(c[b>>2]|0)|0;if(oL(b,YK()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;E=o;o=0;if(E&1)break b}else b=ZK(c[b>>2]|0)|0;if(!(oL(b,YK()|0)|0))if(f)break;else{D=56;break}else{c[e>>2]=0;D=54;break}}else D=54;while(0);if((D|0)==54?f:0)D=56;if((D|0)==56)c[g>>2]=c[g>>2]|2;E=c[d>>2]|0;pU(C);pU(B);l=A;return E|0}}while(0);b=Fb()|0}pU(C);pU(B);Qb(b|0);return 0}function bN(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+112|0;j=y;m=(f-e|0)/12|0;do if(m>>>0>100){k=nI(m)|0;if(!k){o=0;La(45);o=0;e=Fb()|0;break}else{j=k;x=k;z=5;break}}else{x=0;z=5}while(0);if((z|0)==5){p=e;q=j;k=0;while(1){if((p|0)==(f|0))break;n=a[p+8+3>>0]|0;if(n<<24>>24<0)n=c[p+4>>2]|0;else n=n&255;if(!n){a[q>>0]=2;k=k+1|0;m=m+-1|0}else a[q>>0]=1;p=p+12|0;q=q+1|0}w=0;u=k;a:while(1){k=c[b>>2]|0;do if(k){n=c[k+12>>2]|0;if((n|0)==(c[k+16>>2]|0)){o=0;k=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;v=o;o=0;if(v&1)break a}else k=ZK(c[n>>2]|0)|0;if(oL(k,YK()|0)|0){c[b>>2]=0;q=1;break}else{q=(c[b>>2]|0)==0;break}}else q=1;while(0);n=c[d>>2]|0;if(n){k=c[n+12>>2]|0;if((k|0)==(c[n+16>>2]|0)){o=0;k=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;v=o;o=0;if(v&1)break}else k=ZK(c[k>>2]|0)|0;if(oL(k,YK()|0)|0){c[d>>2]=0;n=0;k=1}else k=0}else{n=0;k=1}p=c[b>>2]|0;if(!((m|0)!=0&(q^k))){z=29;break}k=c[p+12>>2]|0;if((k|0)==(c[p+16>>2]|0)){o=0;k=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;v=o;o=0;if(v&1)break}else k=ZK(c[k>>2]|0)|0;if(!i){o=0;k=ja(c[(c[g>>2]|0)+28>>2]|0,g|0,k|0)|0;v=o;o=0;if(v&1)break}v=w+1|0;s=e;r=0;t=j;while(1){if((s|0)==(f|0))break;do if((a[t>>0]|0)==1){p=s+8+3|0;if((a[p>>0]|0)<0)n=c[s>>2]|0;else n=s;n=c[n+(w<<2)>>2]|0;if(!i){o=0;n=ja(c[(c[g>>2]|0)+28>>2]|0,g|0,n|0)|0;q=o;o=0;if(q&1)break a}q=m+-1|0;if((k|0)!=(n|0)){a[t>>0]=0;n=r;p=u;m=q;break}n=a[p>>0]|0;if(n<<24>>24<0)n=c[s+4>>2]|0;else n=n&255;if((n|0)==(v|0)){a[t>>0]=2;n=1;p=u+1|0;m=q}else{n=1;p=u}}else{n=r;p=u}while(0);s=s+12|0;r=n;t=t+1|0;u=p}if(!r){w=v;continue}k=c[b>>2]|0;n=k+12|0;p=c[n>>2]|0;if((p|0)==(c[k+16>>2]|0)){o=0;fa(c[(c[k>>2]|0)+40>>2]|0,k|0)|0;w=o;o=0;if(w&1)break}else{c[n>>2]=p+4;ZK(c[p>>2]|0)|0}if((u+m|0)>>>0>1){p=e;q=j;k=u}else{w=v;continue}while(1){if((p|0)==(f|0)){w=v;u=k;continue a}if((a[q>>0]|0)==2){n=a[p+8+3>>0]|0;if(n<<24>>24<0)n=c[p+4>>2]|0;else n=n&255;if((n|0)!=(v|0)){a[q>>0]=0;k=k+-1|0}}p=p+12|0;q=q+1|0}}b:do if((z|0)==29){do if(p){k=c[p+12>>2]|0;if((k|0)==(c[p+16>>2]|0)){o=0;k=fa(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;i=o;o=0;if(i&1)break b}else k=ZK(c[k>>2]|0)|0;if(oL(k,YK()|0)|0){c[b>>2]=0;m=1;break}else{m=(c[b>>2]|0)==0;break}}else m=1;while(0);do if(n){k=c[n+12>>2]|0;if((k|0)==(c[n+16>>2]|0)){o=0;k=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;b=o;o=0;if(b&1)break b}else k=ZK(c[k>>2]|0)|0;if(!(oL(k,YK()|0)|0))if(m)break;else{z=78;break}else{c[d>>2]=0;z=76;break}}else z=76;while(0);if((z|0)==76)if(m)z=78;if((z|0)==78)c[h>>2]=c[h>>2]|2;while(1){if((e|0)==(f|0)){z=82;break}if((a[j>>0]|0)==2)break;e=e+12|0;j=j+1|0}if((z|0)==82){c[h>>2]=c[h>>2]|4;e=f}if(x|0)oI(x);l=y;return e|0}while(0);e=Fb()|0;if(x)oI(x)}Qb(e|0);return 0}function cN(a){a=a|0;BL(a);return}function dN(a){a=a|0;BL(a);cU(a);return}function eN(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,m=0;m=l;l=l+16|0;k=m+4|0;h=m;a:do if(!(c[e+4>>2]&1)){j=c[(c[b>>2]|0)+24>>2]|0;c[h>>2]=c[d>>2];c[k>>2]=c[h>>2];b=Yc[j&127](b,k,e,f,g&1)|0}else{nL(k,e);o=0;b=ja(57,k|0,59896)|0;i=o;o=0;do if(!(i&1)){WL(k);e=c[b>>2]|0;if(g)kd[c[e+24>>2]&511](k,b);else kd[c[e+28>>2]&511](k,b);i=k+11|0;b=a[i>>0]|0;if(b<<24>>24<0){e=b;b=c[k>>2]|0;j=9}else g=k;while(1){if((j|0)==9){g=b;b=e}j=b<<24>>24<0;if((g|0)==((j?c[k>>2]|0:k)+(j?c[k+4>>2]|0:b&255)|0)){j=11;break}b=a[g>>0]|0;e=c[d>>2]|0;if(e|0){f=e+24|0;h=c[f>>2]|0;if((h|0)==(c[e+28>>2]|0)){j=c[(c[e>>2]|0)+52>>2]|0;b=bh(b)|0;o=0;b=ja(j|0,e|0,b|0)|0;j=o;o=0;if(j&1){j=20;break}}else{c[f>>2]=h+1;a[h>>0]=b;b=bh(b)|0}if(Yg(b,Qg()|0)|0)c[d>>2]=0}e=a[i>>0]|0;b=g+1|0;j=9}if((j|0)==11){b=c[d>>2]|0;pU(k);break a}else if((j|0)==20){b=Fb()|0;pU(k);break}}else{b=Fb()|0;WL(k)}while(0);Qb(b|0)}while(0);l=m;return b|0}function fN(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,m=0,n=0,p=0,q=0;m=l;l=l+64|0;b=m;n=m+52|0;p=m+39|0;i=m+16|0;j=m+12|0;k=m+4|0;h=m+8|0;a[n>>0]=a[54881]|0;a[n+1>>0]=a[54882]|0;a[n+2>>0]=a[54883]|0;a[n+3>>0]=a[54884]|0;a[n+4>>0]=a[54885]|0;a[n+5>>0]=a[54886]|0;rN(n+1|0,54887,1,c[e+4>>2]|0);q=YL()|0;c[b>>2]=g;g=p+(mN(p,13,q,n,b)|0)|0;n=nN(p,g,e)|0;nL(b,e);o=0;nb(50,p|0,n|0,g|0,i|0,j|0,k|0,b|0);g=o;o=0;if(g&1){q=Fb()|0;WL(b);Qb(q|0)}else{WL(b);c[h>>2]=c[d>>2];p=c[j>>2]|0;q=c[k>>2]|0;c[b>>2]=c[h>>2];q=Zg(b,i,p,q,e,f)|0;l=m;return q|0}return 0}function gN(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,m=0,n=0,p=0,q=0,r=0;m=l;l=l+96|0;a=m+8|0;p=m;n=m+71|0;j=m+28|0;k=m+24|0;h=m+16|0;i=m+20|0;q=p;c[q>>2]=37;c[q+4>>2]=0;rN(p+1|0,54878,1,c[d+4>>2]|0);q=YL()|0;r=a;c[r>>2]=f;c[r+4>>2]=g;g=n+(mN(n,23,q,p,a)|0)|0;f=nN(n,g,d)|0;nL(a,d);o=0;nb(50,n|0,f|0,g|0,j|0,k|0,h|0,a|0);g=o;o=0;if(g&1){r=Fb()|0;WL(a);Qb(r|0)}else{WL(a);c[i>>2]=c[b>>2];q=c[k>>2]|0;r=c[h>>2]|0;c[a>>2]=c[i>>2];r=Zg(a,j,q,r,d,e)|0;l=m;return r|0}return 0}function hN(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,m=0,n=0,p=0,q=0;m=l;l=l+64|0;b=m;n=m+52|0;p=m+40|0;i=m+16|0;j=m+12|0;k=m+4|0;h=m+8|0;a[n>>0]=a[54881]|0;a[n+1>>0]=a[54882]|0;a[n+2>>0]=a[54883]|0;a[n+3>>0]=a[54884]|0;a[n+4>>0]=a[54885]|0;a[n+5>>0]=a[54886]|0;rN(n+1|0,54887,0,c[e+4>>2]|0);q=YL()|0;c[b>>2]=g;g=p+(mN(p,12,q,n,b)|0)|0;n=nN(p,g,e)|0;nL(b,e);o=0;nb(50,p|0,n|0,g|0,i|0,j|0,k|0,b|0);g=o;o=0;if(g&1){q=Fb()|0;WL(b);Qb(q|0)}else{WL(b);c[h>>2]=c[d>>2];p=c[j>>2]|0;q=c[k>>2]|0;c[b>>2]=c[h>>2];q=Zg(b,i,p,q,e,f)|0;l=m;return q|0}return 0}function iN(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,m=0,n=0,p=0,q=0,r=0;m=l;l=l+96|0;a=m+8|0;p=m;n=m+71|0;j=m+28|0;k=m+24|0;h=m+16|0;i=m+20|0;q=p;c[q>>2]=37;c[q+4>>2]=0;rN(p+1|0,54878,0,c[d+4>>2]|0);q=YL()|0;r=a;c[r>>2]=f;c[r+4>>2]=g;g=n+(mN(n,23,q,p,a)|0)|0;f=nN(n,g,d)|0;nL(a,d);o=0;nb(50,n|0,f|0,g|0,j|0,k|0,h|0,a|0);g=o;o=0;if(g&1){r=Fb()|0;WL(a);Qb(r|0)}else{WL(a);c[i>>2]=c[b>>2];q=c[k>>2]|0;r=c[h>>2]|0;c[a>>2]=c[i>>2];r=Zg(a,j,q,r,d,e)|0;l=m;return r|0}return 0}function jN(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;var g=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+176|0;u=y+72|0;m=y+48|0;k=y+32|0;i=y+24|0;g=y+8|0;q=y;s=y+134|0;r=y+68|0;t=y+76|0;x=y+64|0;v=y+60|0;w=y+56|0;j=q;c[j>>2]=37;c[j+4>>2]=0;j=oN(q+1|0,61821,c[d+4>>2]|0)|0;c[r>>2]=s;a=YL()|0;if(j){c[g>>2]=c[d+8>>2];h[g+8>>3]=f;a=mN(s,30,a,q,g)|0}else{h[i>>3]=f;a=mN(s,30,a,q,i)|0}a:do if((a|0)>29){if(j){o=0;a=da(44)|0;p=o;o=0;if(!(p&1)?(o=0,c[k>>2]=c[d+8>>2],h[k+8>>3]=f,n=pa(65,r|0,a|0,q|0,k|0)|0,q=o,o=0,!(q&1)):0){a=n;z=12}}else{o=0;a=da(44)|0;n=o;o=0;if(!(n&1)?(o=0,h[m>>3]=f,p=pa(65,r|0,a|0,q|0,m|0)|0,q=o,o=0,!(q&1)):0){a=p;z=12}}do if((z|0)==12){g=c[r>>2]|0;if(!g){o=0;La(45);o=0;break}else{n=g;k=g;z=15;break a}}while(0);a=Fb()|0}else{n=0;k=c[r>>2]|0;z=15}while(0);if((z|0)==15){j=k+a|0;m=nN(k,j,d)|0;do if((k|0)!=(s|0)){a=nI(a<<1)|0;if(!a){o=0;La(45);o=0;a=Fb()|0;break}else{g=a;i=a;z=19;break}}else{g=t;i=0;z=19}while(0);if((z|0)==19){o=0;Xa(107,u|0,d|0);t=o;o=0;do if(t&1){a=Fb()|0;z=29}else{o=0;nb(51,k|0,m|0,j|0,g|0,x|0,v|0,u|0);t=o;o=0;if(t&1){a=Fb()|0;WL(u);z=29;break}WL(u);c[w>>2]=c[b>>2];x=c[x>>2]|0;a=c[v>>2]|0;o=0;c[u>>2]=c[w>>2];a=za(80,u|0,g|0,x|0,a|0,d|0,e|0)|0;e=o;o=0;if(e&1){a=Fb()|0;break}c[b>>2]=a;if(i|0)oI(i);if(n|0)oI(n);l=y;return a|0}while(0);if(i)oI(i)}if(n)oI(n)}Qb(a|0);return 0}function kN(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;var g=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+176|0;u=y+72|0;m=y+48|0;k=y+32|0;i=y+24|0;g=y+8|0;q=y;s=y+134|0;r=y+68|0;t=y+76|0;x=y+64|0;v=y+60|0;w=y+56|0;j=q;c[j>>2]=37;c[j+4>>2]=0;j=oN(q+1|0,54876,c[d+4>>2]|0)|0;c[r>>2]=s;a=YL()|0;if(j){c[g>>2]=c[d+8>>2];h[g+8>>3]=f;a=mN(s,30,a,q,g)|0}else{h[i>>3]=f;a=mN(s,30,a,q,i)|0}a:do if((a|0)>29){if(j){o=0;a=da(44)|0;p=o;o=0;if(!(p&1)?(o=0,c[k>>2]=c[d+8>>2],h[k+8>>3]=f,n=pa(65,r|0,a|0,q|0,k|0)|0,q=o,o=0,!(q&1)):0){a=n;z=12}}else{o=0;a=da(44)|0;n=o;o=0;if(!(n&1)?(o=0,h[m>>3]=f,p=pa(65,r|0,a|0,q|0,m|0)|0,q=o,o=0,!(q&1)):0){a=p;z=12}}do if((z|0)==12){g=c[r>>2]|0;if(!g){o=0;La(45);o=0;break}else{n=g;k=g;z=15;break a}}while(0);a=Fb()|0}else{n=0;k=c[r>>2]|0;z=15}while(0);if((z|0)==15){j=k+a|0;m=nN(k,j,d)|0;do if((k|0)!=(s|0)){a=nI(a<<1)|0;if(!a){o=0;La(45);o=0;a=Fb()|0;break}else{g=a;i=a;z=19;break}}else{g=t;i=0;z=19}while(0);if((z|0)==19){o=0;Xa(107,u|0,d|0);t=o;o=0;do if(t&1){a=Fb()|0;z=29}else{o=0;nb(51,k|0,m|0,j|0,g|0,x|0,v|0,u|0);t=o;o=0;if(t&1){a=Fb()|0;WL(u);z=29;break}WL(u);c[w>>2]=c[b>>2];x=c[x>>2]|0;a=c[v>>2]|0;o=0;c[u>>2]=c[w>>2];a=za(80,u|0,g|0,x|0,a|0,d|0,e|0)|0;e=o;o=0;if(e&1){a=Fb()|0;break}c[b>>2]=a;if(i|0)oI(i);if(n|0)oI(n);l=y;return a|0}while(0);if(i)oI(i)}if(n)oI(n)}Qb(a|0);return 0}function lN(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,m=0,n=0,p=0,q=0;p=l;l=l+80|0;j=p;b=p+68|0;k=p+48|0;m=p+8|0;n=p+4|0;a[b>>0]=a[54870]|0;a[b+1>>0]=a[54871]|0;a[b+2>>0]=a[54872]|0;a[b+3>>0]=a[54873]|0;a[b+4>>0]=a[54874]|0;a[b+5>>0]=a[54875]|0;h=YL()|0;c[j>>2]=g;b=mN(k,20,h,b,j)|0;g=k+b|0;h=nN(k,g,e)|0;nL(j,e);o=0;i=ja(57,j|0,59880)|0;q=o;o=0;if(q&1){q=Fb()|0;WL(j);Qb(q|0)}else{WL(j);Vc[c[(c[i>>2]|0)+32>>2]&127](i,k,g,m)|0;q=m+b|0;c[n>>2]=c[d>>2];c[j>>2]=c[n>>2];q=Zg(j,m,(h|0)==(g|0)?q:m+(h-k)|0,q,e,f)|0;l=p;return q|0}return 0}function mN(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;g=l;l=l+16|0;h=g;c[h>>2]=f;f=$J(d)|0;d=PI(a,b,e,h)|0;if(f|0?(o=0,fa(165,f|0)|0,h=o,o=0,h&1):0){h=Gb(0)|0;_g(h)}l=g;return d|0}function nN(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;a:do switch((c[e+4>>2]&176)<<24>>24){case 16:{e=a[b>>0]|0;f=b+1|0;switch(e<<24>>24){case 43:case 45:{b=f;break a}default:{}}if((d-b|0)>1&e<<24>>24==48){switch(a[f>>0]|0){case 88:case 120:break;default:{g=6;break a}}b=b+2|0}else g=6;break}case 32:{b=d;break}default:g=6}while(0);return b|0}function oN(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;if(d&2048){a[b>>0]=43;b=b+1|0}if(d&1024){a[b>>0]=35;b=b+1|0}h=d&260;e=(d&16384|0)!=0;f=(h|0)==260;if(f)g=0;else{a[b>>0]=46;a[b+1>>0]=42;g=1;b=b+2|0}while(1){d=a[c>>0]|0;if(!(d<<24>>24))break;a[b>>0]=d;c=c+1|0;b=b+1|0}a:do switch(h&511){case 4:{d=e?70:102;break}case 256:{d=e?69:101;break}default:if(f){d=e?65:97;break a}else{d=e?71:103;break a}}while(0);a[b>>0]=d;return g|0}function pN(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=l;l=l+16|0;g=f;c[g>>2]=e;e=$J(b)|0;o=0;b=la(102,a|0,d|0,g|0)|0;d=o;o=0;if(d&1){b=Fb()|0;if(e|0?(o=0,fa(165,e|0)|0,g=o,o=0,g&1):0){g=Gb(0)|0;_g(g)}Qb(b|0)}else{if(e|0?(o=0,fa(165,e|0)|0,g=o,o=0,g&1):0){g=Gb(0)|0;_g(g)}l=f;return b|0}return 0}function qN(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+16|0;w=y;x=VL(i,59880)|0;u=VL(i,59896)|0;kd[c[(c[u>>2]|0)+20>>2]&511](w,u);c[h>>2]=f;i=a[b>>0]|0;switch(i<<24>>24){case 43:case 45:{o=0;i=ja(c[(c[x>>2]|0)+28>>2]|0,x|0,i|0)|0;t=o;o=0;if(!(t&1)){m=c[h>>2]|0;c[h>>2]=m+1;a[m>>0]=i;m=b+1|0;v=4}break}default:{m=b;v=4}}a:do if((v|0)==4){t=e;b:do if((t-m|0)>1?(a[m>>0]|0)==48:0){j=m+1|0;switch(a[j>>0]|0){case 88:case 120:break;default:{i=m;v=15;break b}}o=0;i=ja(c[(c[x>>2]|0)+28>>2]|0,x|0,48)|0;s=o;o=0;if(s&1)break a;s=c[h>>2]|0;c[h>>2]=s+1;a[s>>0]=i;m=m+2|0;o=0;i=ja(c[(c[x>>2]|0)+28>>2]|0,x|0,a[j>>0]|0)|0;s=o;o=0;if(s&1)break a;s=c[h>>2]|0;c[h>>2]=s+1;a[s>>0]=i;i=m;while(1){if(i>>>0>=e>>>0)break b;j=a[i>>0]|0;o=0;k=da(44)|0;s=o;o=0;if(s&1)break a;o=0;j=ja(108,j<<24>>24|0,k|0)|0;s=o;o=0;if(s&1)break a;if(!j)break b;i=i+1|0}}else{i=m;v=15}while(0);c:do if((v|0)==15)while(1){v=0;if(i>>>0>=e>>>0)break c;j=a[i>>0]|0;o=0;k=da(44)|0;s=o;o=0;if(s&1)break a;o=0;j=ja(109,j<<24>>24|0,k|0)|0;s=o;o=0;if(s&1)break a;if(!j)break c;i=i+1|0;v=15}while(0);p=w+11|0;n=a[p>>0]|0;q=w+4|0;r=m;s=b;d:do if((n<<24>>24<0?c[q>>2]|0:n&255)|0){e:do if((m|0)!=(i|0)){j=i;k=m;while(1){j=j+-1|0;if(k>>>0>=j>>>0)break e;n=a[k>>0]|0;a[k>>0]=a[j>>0]|0;a[j>>0]=n;k=k+1|0}}while(0);o=0;n=fa(c[(c[u>>2]|0)+16>>2]|0,u|0)|0;b=o;o=0;if(b&1)break a;j=0;k=0;while(1){if(m>>>0>=i>>>0)break;b=a[((a[p>>0]|0)<0?c[w>>2]|0:w)+j>>0]|0;if(b<<24>>24>0&(k|0)==(b<<24>>24|0)){k=c[h>>2]|0;c[h>>2]=k+1;a[k>>0]=n;k=a[p>>0]|0;j=(j>>>0<((k<<24>>24<0?c[q>>2]|0:k&255)+-1|0)>>>0&1)+j|0;k=0}o=0;b=ja(c[(c[x>>2]|0)+28>>2]|0,x|0,a[m>>0]|0)|0;z=o;o=0;if(z&1)break a;z=c[h>>2]|0;c[h>>2]=z+1;a[z>>0]=b;m=m+1|0;k=k+1|0}k=f+(r-s)|0;j=c[h>>2]|0;if((k|0)==(j|0))k=x;else while(1){j=j+-1|0;if(k>>>0>=j>>>0){k=x;break d}z=a[k>>0]|0;a[k>>0]=a[j>>0]|0;a[j>>0]=z;k=k+1|0}}else{o=0;pa(c[(c[x>>2]|0)+32>>2]|0,x|0,m|0,i|0,c[h>>2]|0)|0;z=o;o=0;if(z&1)break a;c[h>>2]=(c[h>>2]|0)+(i-r);k=x}while(0);while(1){if(i>>>0>=e>>>0)break;j=a[i>>0]|0;i=i+1|0;if(j<<24>>24==46){v=39;break}o=0;j=ja(c[(c[k>>2]|0)+28>>2]|0,x|0,j|0)|0;z=o;o=0;if(z&1)break a;z=c[h>>2]|0;c[h>>2]=z+1;a[z>>0]=j}if((v|0)==39){o=0;j=fa(c[(c[u>>2]|0)+12>>2]|0,u|0)|0;z=o;o=0;if(z&1)break;z=c[h>>2]|0;c[h>>2]=z+1;a[z>>0]=j}o=0;pa(c[(c[x>>2]|0)+32>>2]|0,x|0,i|0,e|0,c[h>>2]|0)|0;z=o;o=0;if(!(z&1)){z=(c[h>>2]|0)+(t-i)|0;c[h>>2]=z;c[g>>2]=(d|0)==(e|0)?z:f+(d-s)|0;pU(w);l=y;return}}while(0);z=Fb()|0;pU(w);Qb(z|0)}function rN(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0;if(e&2048){a[b>>0]=43;b=b+1|0}if(!(e&512))f=b;else{a[b>>0]=35;f=b+1|0}while(1){b=a[c>>0]|0;if(!(b<<24>>24))break;a[f>>0]=b;c=c+1|0;f=f+1|0}switch(e&74){case 64:{b=111;break}case 8:{b=e&16384|0?88:120;break}default:b=d?100:117}a[f>>0]=b;return}function sN(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+16|0;t=u;r=VL(i,59880)|0;k=VL(i,59896)|0;kd[c[(c[k>>2]|0)+20>>2]&511](t,k);p=t+11|0;n=a[p>>0]|0;q=t+4|0;j=e;s=b;a:do if(!((n<<24>>24<0?c[q>>2]|0:n&255)|0)){o=0;pa(c[(c[r>>2]|0)+32>>2]|0,r|0,b|0,e|0,f|0)|0;r=o;o=0;if(r&1)j=28;else{i=f+(j-s)|0;c[h>>2]=i;j=27}}else{c[h>>2]=f;i=a[b>>0]|0;switch(i<<24>>24){case 43:case 45:{o=0;i=ja(c[(c[r>>2]|0)+28>>2]|0,r|0,i|0)|0;n=o;o=0;if(n&1){j=28;break a}n=c[h>>2]|0;c[h>>2]=n+1;a[n>>0]=i;b=b+1|0;break}default:{}}b:do if((j-b|0)>1?(a[b>>0]|0)==48:0){i=b+1|0;switch(a[i>>0]|0){case 88:case 120:break;default:break b}o=0;j=ja(c[(c[r>>2]|0)+28>>2]|0,r|0,48)|0;n=o;o=0;if(n&1){j=28;break a}n=c[h>>2]|0;c[h>>2]=n+1;a[n>>0]=j;o=0;i=ja(c[(c[r>>2]|0)+28>>2]|0,r|0,a[i>>0]|0)|0;n=o;o=0;if(n&1){j=28;break a}n=c[h>>2]|0;c[h>>2]=n+1;a[n>>0]=i;b=b+2|0}while(0);c:do if((b|0)!=(e|0)){i=e;j=b;while(1){i=i+-1|0;if(j>>>0>=i>>>0)break c;n=a[j>>0]|0;a[j>>0]=a[i>>0]|0;a[i>>0]=n;j=j+1|0}}while(0);o=0;n=fa(c[(c[k>>2]|0)+16>>2]|0,k|0)|0;m=o;o=0;if(!(m&1)){m=b;i=0;j=0;while(1){if(m>>>0>=e>>>0)break;k=a[((a[p>>0]|0)<0?c[t>>2]|0:t)+i>>0]|0;if(k<<24>>24!=0&(j|0)==(k<<24>>24|0)){j=c[h>>2]|0;c[h>>2]=j+1;a[j>>0]=n;j=a[p>>0]|0;i=(i>>>0<((j<<24>>24<0?c[q>>2]|0:j&255)+-1|0)>>>0&1)+i|0;j=0}o=0;k=ja(c[(c[r>>2]|0)+28>>2]|0,r|0,a[m>>0]|0)|0;v=o;o=0;if(v&1){j=28;break a}v=c[h>>2]|0;c[h>>2]=v+1;a[v>>0]=k;m=m+1|0;j=j+1|0}i=f+(b-s)|0;j=c[h>>2]|0;if((i|0)==(j|0))j=27;else{while(1){j=j+-1|0;if(i>>>0>=j>>>0)break;v=a[i>>0]|0;a[i>>0]=a[j>>0]|0;a[j>>0]=v;i=i+1|0}i=c[h>>2]|0;j=27}}else j=28}while(0);if((j|0)==27){c[g>>2]=(d|0)==(e|0)?i:f+(d-s)|0;pU(t);l=u;return}else if((j|0)==28){v=Fb()|0;pU(t);Qb(v|0)}}function tN(a){a=a|0;BL(a);return}function uN(a){a=a|0;BL(a);cU(a);return}function vN(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,m=0;m=l;l=l+16|0;k=m+4|0;h=m;a:do if(!(c[e+4>>2]&1)){j=c[(c[b>>2]|0)+24>>2]|0;c[h>>2]=c[d>>2];c[k>>2]=c[h>>2];b=Yc[j&127](b,k,e,f,g&1)|0}else{nL(k,e);o=0;b=ja(57,k|0,59920)|0;j=o;o=0;do if(!(j&1)){WL(k);e=c[b>>2]|0;if(g)kd[c[e+24>>2]&511](k,b);else kd[c[e+28>>2]&511](k,b);i=k+8+3|0;b=a[i>>0]|0;e=c[k>>2]|0;j=k+4|0;g=b<<24>>24<0?e:k;while(1){h=b<<24>>24<0;if((g|0)==((h?e:k)+((h?c[j>>2]|0:b&255)<<2)|0)){e=9;break}b=c[g>>2]|0;e=c[d>>2]|0;if(e|0){f=e+24|0;h=c[f>>2]|0;if((h|0)==(c[e+28>>2]|0)){h=c[(c[e>>2]|0)+52>>2]|0;b=ZK(b)|0;o=0;b=ja(h|0,e|0,b|0)|0;h=o;o=0;if(h&1){e=18;break}}else{c[f>>2]=h+4;c[h>>2]=b;b=ZK(b)|0}if(oL(b,YK()|0)|0)c[d>>2]=0}g=g+4|0;b=a[i>>0]|0;e=c[k>>2]|0}if((e|0)==9){b=c[d>>2]|0;FU(k);break a}else if((e|0)==18){b=Fb()|0;FU(k);break}}else{b=Fb()|0;WL(k)}while(0);Qb(b|0)}while(0);l=m;return b|0}function wN(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,m=0,n=0,p=0,q=0;m=l;l=l+128|0;b=m;n=m+122|0;p=m+108|0;i=m+16|0;j=m+12|0;k=m+4|0;h=m+8|0;a[n>>0]=a[54881]|0;a[n+1>>0]=a[54882]|0;a[n+2>>0]=a[54883]|0;a[n+3>>0]=a[54884]|0;a[n+4>>0]=a[54885]|0;a[n+5>>0]=a[54886]|0;rN(n+1|0,54887,1,c[e+4>>2]|0);q=YL()|0;c[b>>2]=g;g=p+(mN(p,13,q,n,b)|0)|0;n=nN(p,g,e)|0;nL(b,e);o=0;nb(52,p|0,n|0,g|0,i|0,j|0,k|0,b|0);g=o;o=0;if(g&1){q=Fb()|0;WL(b);Qb(q|0)}else{WL(b);c[h>>2]=c[d>>2];p=c[j>>2]|0;q=c[k>>2]|0;c[b>>2]=c[h>>2];q=DN(b,i,p,q,e,f)|0;l=m;return q|0}return 0}function xN(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,m=0,n=0,p=0,q=0,r=0;m=l;l=l+224|0;a=m+8|0;p=m;n=m+200|0;j=m+28|0;k=m+24|0;h=m+16|0;i=m+20|0;q=p;c[q>>2]=37;c[q+4>>2]=0;rN(p+1|0,54878,1,c[d+4>>2]|0);q=YL()|0;r=a;c[r>>2]=f;c[r+4>>2]=g;g=n+(mN(n,23,q,p,a)|0)|0;f=nN(n,g,d)|0;nL(a,d);o=0;nb(52,n|0,f|0,g|0,j|0,k|0,h|0,a|0);g=o;o=0;if(g&1){r=Fb()|0;WL(a);Qb(r|0)}else{WL(a);c[i>>2]=c[b>>2];q=c[k>>2]|0;r=c[h>>2]|0;c[a>>2]=c[i>>2];r=DN(a,j,q,r,d,e)|0;l=m;return r|0}return 0}function yN(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,m=0,n=0,p=0,q=0;m=l;l=l+128|0;b=m;n=m+112|0;p=m+100|0;i=m+16|0;j=m+12|0;k=m+4|0;h=m+8|0;a[n>>0]=a[54881]|0;a[n+1>>0]=a[54882]|0;a[n+2>>0]=a[54883]|0;a[n+3>>0]=a[54884]|0;a[n+4>>0]=a[54885]|0;a[n+5>>0]=a[54886]|0;rN(n+1|0,54887,0,c[e+4>>2]|0);q=YL()|0;c[b>>2]=g;g=p+(mN(p,12,q,n,b)|0)|0;n=nN(p,g,e)|0;nL(b,e);o=0;nb(52,p|0,n|0,g|0,i|0,j|0,k|0,b|0);g=o;o=0;if(g&1){q=Fb()|0;WL(b);Qb(q|0)}else{WL(b);c[h>>2]=c[d>>2];p=c[j>>2]|0;q=c[k>>2]|0;c[b>>2]=c[h>>2];q=DN(b,i,p,q,e,f)|0;l=m;return q|0}return 0}function zN(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,m=0,n=0,p=0,q=0,r=0;m=l;l=l+224|0;a=m+8|0;p=m;n=m+200|0;j=m+28|0;k=m+24|0;h=m+16|0;i=m+20|0;q=p;c[q>>2]=37;c[q+4>>2]=0;rN(p+1|0,54878,0,c[d+4>>2]|0);q=YL()|0;r=a;c[r>>2]=f;c[r+4>>2]=g;g=n+(mN(n,23,q,p,a)|0)|0;f=nN(n,g,d)|0;nL(a,d);o=0;nb(52,n|0,f|0,g|0,j|0,k|0,h|0,a|0);g=o;o=0;if(g&1){r=Fb()|0;WL(a);Qb(r|0)}else{WL(a);c[i>>2]=c[b>>2];q=c[k>>2]|0;r=c[h>>2]|0;c[a>>2]=c[i>>2];r=DN(a,j,q,r,d,e)|0;l=m;return r|0}return 0}function AN(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;var g=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+336|0;u=y+300|0;m=y+48|0;k=y+32|0;i=y+24|0;g=y+8|0;q=y;s=y+304|0;r=y+296|0;t=y+68|0;x=y+64|0;v=y+60|0;w=y+56|0;j=q;c[j>>2]=37;c[j+4>>2]=0;j=oN(q+1|0,61821,c[d+4>>2]|0)|0;c[r>>2]=s;a=YL()|0;if(j){c[g>>2]=c[d+8>>2];h[g+8>>3]=f;a=mN(s,30,a,q,g)|0}else{h[i>>3]=f;a=mN(s,30,a,q,i)|0}a:do if((a|0)>29){if(j){o=0;a=da(44)|0;p=o;o=0;if(!(p&1)?(o=0,c[k>>2]=c[d+8>>2],h[k+8>>3]=f,n=pa(65,r|0,a|0,q|0,k|0)|0,q=o,o=0,!(q&1)):0){a=n;z=12}}else{o=0;a=da(44)|0;n=o;o=0;if(!(n&1)?(o=0,h[m>>3]=f,p=pa(65,r|0,a|0,q|0,m|0)|0,q=o,o=0,!(q&1)):0){a=p;z=12}}do if((z|0)==12){g=c[r>>2]|0;if(!g){o=0;La(45);o=0;break}else{n=g;k=g;z=15;break a}}while(0);a=Fb()|0}else{n=0;k=c[r>>2]|0;z=15}while(0);if((z|0)==15){j=k+a|0;m=nN(k,j,d)|0;do if((k|0)!=(s|0)){a=nI(a<<3)|0;if(!a){o=0;La(45);o=0;a=Fb()|0;break}else{g=a;i=a;z=19;break}}else{g=t;i=0;z=19}while(0);if((z|0)==19){o=0;Xa(107,u|0,d|0);t=o;o=0;do if(t&1){a=Fb()|0;z=29}else{o=0;nb(53,k|0,m|0,j|0,g|0,x|0,v|0,u|0);t=o;o=0;if(t&1){a=Fb()|0;WL(u);z=29;break}WL(u);c[w>>2]=c[b>>2];x=c[x>>2]|0;a=c[v>>2]|0;o=0;c[u>>2]=c[w>>2];a=za(81,u|0,g|0,x|0,a|0,d|0,e|0)|0;e=o;o=0;if(e&1){a=Fb()|0;break}c[b>>2]=a;if(i|0)oI(i);if(n|0)oI(n);l=y;return a|0}while(0);if(i)oI(i)}if(n)oI(n)}Qb(a|0);return 0}function BN(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;var g=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+336|0;u=y+300|0;m=y+48|0;k=y+32|0;i=y+24|0;g=y+8|0;q=y;s=y+304|0;r=y+296|0;t=y+68|0;x=y+64|0;v=y+60|0;w=y+56|0;j=q;c[j>>2]=37;c[j+4>>2]=0;j=oN(q+1|0,54876,c[d+4>>2]|0)|0;c[r>>2]=s;a=YL()|0;if(j){c[g>>2]=c[d+8>>2];h[g+8>>3]=f;a=mN(s,30,a,q,g)|0}else{h[i>>3]=f;a=mN(s,30,a,q,i)|0}a:do if((a|0)>29){if(j){o=0;a=da(44)|0;p=o;o=0;if(!(p&1)?(o=0,c[k>>2]=c[d+8>>2],h[k+8>>3]=f,n=pa(65,r|0,a|0,q|0,k|0)|0,q=o,o=0,!(q&1)):0){a=n;z=12}}else{o=0;a=da(44)|0;n=o;o=0;if(!(n&1)?(o=0,h[m>>3]=f,p=pa(65,r|0,a|0,q|0,m|0)|0,q=o,o=0,!(q&1)):0){a=p;z=12}}do if((z|0)==12){g=c[r>>2]|0;if(!g){o=0;La(45);o=0;break}else{n=g;k=g;z=15;break a}}while(0);a=Fb()|0}else{n=0;k=c[r>>2]|0;z=15}while(0);if((z|0)==15){j=k+a|0;m=nN(k,j,d)|0;do if((k|0)!=(s|0)){a=nI(a<<3)|0;if(!a){o=0;La(45);o=0;a=Fb()|0;break}else{g=a;i=a;z=19;break}}else{g=t;i=0;z=19}while(0);if((z|0)==19){o=0;Xa(107,u|0,d|0);t=o;o=0;do if(t&1){a=Fb()|0;z=29}else{o=0;nb(53,k|0,m|0,j|0,g|0,x|0,v|0,u|0);t=o;o=0;if(t&1){a=Fb()|0;WL(u);z=29;break}WL(u);c[w>>2]=c[b>>2];x=c[x>>2]|0;a=c[v>>2]|0;o=0;c[u>>2]=c[w>>2];a=za(81,u|0,g|0,x|0,a|0,d|0,e|0)|0;e=o;o=0;if(e&1){a=Fb()|0;break}c[b>>2]=a;if(i|0)oI(i);if(n|0)oI(n);l=y;return a|0}while(0);if(i)oI(i)}if(n)oI(n)}Qb(a|0);return 0}function CN(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,m=0,n=0,p=0,q=0;p=l;l=l+192|0;j=p;b=p+176|0;k=p+156|0;m=p+4|0;n=p+152|0;a[b>>0]=a[54870]|0;a[b+1>>0]=a[54871]|0;a[b+2>>0]=a[54872]|0;a[b+3>>0]=a[54873]|0;a[b+4>>0]=a[54874]|0;a[b+5>>0]=a[54875]|0;h=YL()|0;c[j>>2]=g;b=mN(k,20,h,b,j)|0;g=k+b|0;h=nN(k,g,e)|0;nL(j,e);o=0;i=ja(57,j|0,59912)|0;q=o;o=0;if(q&1){q=Fb()|0;WL(j);Qb(q|0)}else{WL(j);Vc[c[(c[i>>2]|0)+48>>2]&127](i,k,g,m)|0;q=m+(b<<2)|0;c[n>>2]=c[d>>2];c[j>>2]=c[n>>2];q=DN(j,m,(h|0)==(g|0)?q:m+(h-k<<2)|0,q,e,f)|0;l=p;return q|0}return 0}function DN(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0;r=l;l=l+16|0;p=r+12|0;q=r;i=c[b>>2]|0;a:do if(!i)i=0;else{j=d;k=f-j>>2;n=g+12|0;m=c[n>>2]|0;k=(m|0)>(k|0)?m-k|0:0;m=e;j=m-j|0;g=j>>2;if((j|0)>0?(Tc[c[(c[i>>2]|0)+48>>2]&127](i,d,g)|0)!=(g|0):0){c[b>>2]=0;i=0;break}do if((k|0)>0){c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;if(k>>>0>1073741807)lU(q);do if(k>>>0>=2){g=k+4&2147483644;if(g>>>0<=1073741823){j=aU(g<<2)|0;c[q>>2]=j;d=q+8|0;c[d>>2]=g|-2147483648;c[q+4>>2]=k;g=j;d=d+3|0;j=q;break}i=Ab(8)|0;o=0;Xa(98,i|0,56853);r=o;o=0;if(r&1){r=Fb()|0;Jb(i|0);Qb(r|0)}else{c[i>>2]=41052;Mb(i|0,3176,299)}}else{d=q+8+3|0;a[d>>0]=k;g=q;j=q}while(0);EN(g,k,h)|0;c[p>>2]=0;HL(g+(k<<2)|0,p);o=0;g=la(c[(c[i>>2]|0)+48>>2]|0,i|0,((a[d>>0]|0)<0?c[q>>2]|0:j)|0,k|0)|0;p=o;o=0;if(p&1){r=Fb()|0;FU(q);Qb(r|0)}if((g|0)==(k|0)){FU(q);break}else{c[b>>2]=0;FU(q);i=0;break a}}while(0);q=f-m|0;f=q>>2;if((q|0)>0?(Tc[c[(c[i>>2]|0)+48>>2]&127](i,e,f)|0)!=(f|0):0){c[b>>2]=0;i=0;break}c[n>>2]=0}while(0);l=r;return i|0}function EN(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)!=0?(o=0,la(103,a|0,c|0,b|0)|0,c=o,o=0,c&1):0){c=Gb(0)|0;_g(c)}else d=a;return d|0}function FN(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;z=l;l=l+16|0;x=z;y=VL(i,59912)|0;u=VL(i,59920)|0;kd[c[(c[u>>2]|0)+20>>2]&511](x,u);c[h>>2]=f;i=a[b>>0]|0;switch(i<<24>>24){case 43:case 45:{o=0;i=ja(c[(c[y>>2]|0)+44>>2]|0,y|0,i|0)|0;v=o;o=0;if(!(v&1)){m=c[h>>2]|0;c[h>>2]=m+4;c[m>>2]=i;m=b+1|0;w=4}break}default:{m=b;w=4}}a:do if((w|0)==4){v=e;b:do if((v-m|0)>1?(a[m>>0]|0)==48:0){j=m+1|0;switch(a[j>>0]|0){case 88:case 120:break;default:{j=m;w=15;break b}}o=0;i=ja(c[(c[y>>2]|0)+44>>2]|0,y|0,48)|0;t=o;o=0;if(t&1)break a;t=c[h>>2]|0;c[h>>2]=t+4;c[t>>2]=i;m=m+2|0;o=0;i=ja(c[(c[y>>2]|0)+44>>2]|0,y|0,a[j>>0]|0)|0;t=o;o=0;if(t&1)break a;j=c[h>>2]|0;c[h>>2]=j+4;c[j>>2]=i;j=m;while(1){if(j>>>0>=e>>>0)break b;i=a[j>>0]|0;o=0;k=da(44)|0;t=o;o=0;if(t&1)break a;o=0;i=ja(108,i<<24>>24|0,k|0)|0;t=o;o=0;if(t&1)break a;if(!i)break b;j=j+1|0}}else{j=m;w=15}while(0);c:do if((w|0)==15)while(1){w=0;if(j>>>0>=e>>>0)break c;i=a[j>>0]|0;o=0;k=da(44)|0;t=o;o=0;if(t&1)break a;o=0;i=ja(109,i<<24>>24|0,k|0)|0;t=o;o=0;if(t&1)break a;if(!i)break c;j=j+1|0;w=15}while(0);q=x+11|0;p=a[q>>0]|0;r=x+4|0;s=m;t=b;d:do if((p<<24>>24<0?c[r>>2]|0:p&255)|0){e:do if((m|0)!=(j|0)){i=j;k=m;while(1){i=i+-1|0;if(k>>>0>=i>>>0)break e;p=a[k>>0]|0;a[k>>0]=a[i>>0]|0;a[i>>0]=p;k=k+1|0}}while(0);o=0;p=fa(c[(c[u>>2]|0)+16>>2]|0,u|0)|0;n=o;o=0;if(n&1)break a;k=0;b=0;while(1){if(m>>>0>=j>>>0)break;i=a[q>>0]|0;n=i<<24>>24<0;A=a[(n?c[x>>2]|0:x)+k>>0]|0;if(A<<24>>24>0&(b|0)==(A<<24>>24|0)){b=c[h>>2]|0;c[h>>2]=b+4;c[b>>2]=p;k=(k>>>0<((n?c[r>>2]|0:i&255)+-1|0)>>>0&1)+k|0;b=0}o=0;i=ja(c[(c[y>>2]|0)+44>>2]|0,y|0,a[m>>0]|0)|0;A=o;o=0;if(A&1)break a;A=c[h>>2]|0;c[h>>2]=A+4;c[A>>2]=i;m=m+1|0;b=b+1|0}i=f+(s-t<<2)|0;m=c[h>>2]|0;if((i|0)==(m|0))k=y;else{k=m;while(1){k=k+-4|0;if(i>>>0>=k>>>0){k=y;i=m;break d}A=c[i>>2]|0;c[i>>2]=c[k>>2];c[k>>2]=A;i=i+4|0}}}else{o=0;pa(c[(c[y>>2]|0)+48>>2]|0,y|0,m|0,j|0,c[h>>2]|0)|0;A=o;o=0;if(A&1)break a;i=(c[h>>2]|0)+(j-s<<2)|0;c[h>>2]=i;k=y}while(0);while(1){if(j>>>0>=e>>>0)break;i=a[j>>0]|0;j=j+1|0;if(i<<24>>24==46){w=39;break}o=0;i=ja(c[(c[k>>2]|0)+44>>2]|0,y|0,i|0)|0;A=o;o=0;if(A&1)break a;s=c[h>>2]|0;A=s+4|0;c[h>>2]=A;c[s>>2]=i;i=A}if((w|0)==39){o=0;i=fa(c[(c[u>>2]|0)+12>>2]|0,u|0)|0;A=o;o=0;if(A&1)break;w=c[h>>2]|0;A=w+4|0;c[h>>2]=A;c[w>>2]=i;i=A}o=0;pa(c[(c[y>>2]|0)+48>>2]|0,y|0,j|0,e|0,i|0)|0;A=o;o=0;if(!(A&1)){A=(c[h>>2]|0)+(v-j<<2)|0;c[h>>2]=A;c[g>>2]=(d|0)==(e|0)?A:f+(d-t<<2)|0;pU(x);l=z;return}}while(0);A=Fb()|0;pU(x);Qb(A|0)}function GN(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;v=l;l=l+16|0;u=v;s=VL(i,59912)|0;k=VL(i,59920)|0;kd[c[(c[k>>2]|0)+20>>2]&511](u,k);q=u+11|0;p=a[q>>0]|0;r=u+4|0;j=e;t=b;a:do if(!((p<<24>>24<0?c[r>>2]|0:p&255)|0)){o=0;pa(c[(c[s>>2]|0)+48>>2]|0,s|0,b|0,e|0,f|0)|0;s=o;o=0;if(s&1)j=28;else{i=f+(j-t<<2)|0;c[h>>2]=i;j=27}}else{c[h>>2]=f;i=a[b>>0]|0;switch(i<<24>>24){case 43:case 45:{o=0;i=ja(c[(c[s>>2]|0)+44>>2]|0,s|0,i|0)|0;p=o;o=0;if(p&1){j=28;break a}p=c[h>>2]|0;c[h>>2]=p+4;c[p>>2]=i;b=b+1|0;break}default:{}}b:do if((j-b|0)>1?(a[b>>0]|0)==48:0){i=b+1|0;switch(a[i>>0]|0){case 88:case 120:break;default:break b}o=0;j=ja(c[(c[s>>2]|0)+44>>2]|0,s|0,48)|0;p=o;o=0;if(p&1){j=28;break a}p=c[h>>2]|0;c[h>>2]=p+4;c[p>>2]=j;o=0;i=ja(c[(c[s>>2]|0)+44>>2]|0,s|0,a[i>>0]|0)|0;p=o;o=0;if(p&1){j=28;break a}p=c[h>>2]|0;c[h>>2]=p+4;c[p>>2]=i;b=b+2|0}while(0);c:do if((b|0)!=(e|0)){i=e;j=b;while(1){i=i+-1|0;if(j>>>0>=i>>>0)break c;p=a[j>>0]|0;a[j>>0]=a[i>>0]|0;a[i>>0]=p;j=j+1|0}}while(0);o=0;p=fa(c[(c[k>>2]|0)+16>>2]|0,k|0)|0;n=o;o=0;if(!(n&1)){n=b;j=0;k=0;while(1){if(n>>>0>=e>>>0)break;i=a[q>>0]|0;m=i<<24>>24<0;w=a[(m?c[u>>2]|0:u)+j>>0]|0;if(w<<24>>24!=0&(k|0)==(w<<24>>24|0)){k=c[h>>2]|0;c[h>>2]=k+4;c[k>>2]=p;j=(j>>>0<((m?c[r>>2]|0:i&255)+-1|0)>>>0&1)+j|0;k=0}o=0;i=ja(c[(c[s>>2]|0)+44>>2]|0,s|0,a[n>>0]|0)|0;w=o;o=0;if(w&1){j=28;break a}w=c[h>>2]|0;c[h>>2]=w+4;c[w>>2]=i;n=n+1|0;k=k+1|0}i=f+(b-t<<2)|0;j=c[h>>2]|0;if((i|0)==(j|0))j=27;else{while(1){j=j+-4|0;if(i>>>0>=j>>>0)break;w=c[i>>2]|0;c[i>>2]=c[j>>2];c[j>>2]=w;i=i+4|0}i=c[h>>2]|0;j=27}}else j=28}while(0);if((j|0)==27){c[g>>2]=(d|0)==(e|0)?i:f+(d-t<<2)|0;pU(u);l=v;return}else if((j|0)==28){w=Fb()|0;pU(u);Qb(w|0)}}function HN(a){a=a|0;BL(a);return}function IN(a){a=a|0;BL(a);cU(a);return}function JN(a){a=a|0;return 2}function KN(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=aO(a,j,i,e,f,g,55406,55414)|0;l=h;return g|0}function LN(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0;i=l;l=l+16|0;j=i+12|0;k=i+8|0;n=i+4|0;m=i;o=b+8|0;o=Qc[c[(c[o>>2]|0)+20>>2]&255](o)|0;c[n>>2]=c[d>>2];c[m>>2]=c[e>>2];e=a[o+11>>0]|0;p=e<<24>>24<0;d=p?c[o>>2]|0:o;e=d+(p?c[o+4>>2]|0:e&255)|0;c[k>>2]=c[n>>2];c[j>>2]=c[m>>2];h=aO(b,k,j,f,g,h,d,e)|0;l=i;return h|0}function MN(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;j=l;l=l+16|0;h=j+4|0;i=j;nL(h,e);o=0;e=ja(57,h|0,59880)|0;k=o;o=0;if(k&1){k=Fb()|0;WL(h);Qb(k|0)}else{WL(h);c[i>>2]=c[d>>2];c[h>>2]=c[i>>2];_N(a,g+24|0,b,h,f,e);l=j;return c[b>>2]|0}return 0}function NN(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;j=l;l=l+16|0;h=j+4|0;i=j;nL(h,e);o=0;e=ja(57,h|0,59880)|0;k=o;o=0;if(k&1){k=Fb()|0;WL(h);Qb(k|0)}else{WL(h);c[i>>2]=c[d>>2];c[h>>2]=c[i>>2];$N(a,g+16|0,b,h,f,e);l=j;return c[b>>2]|0}return 0}function ON(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;j=l;l=l+16|0;h=j+4|0;i=j;nL(h,e);o=0;e=ja(57,h|0,59880)|0;k=o;o=0;if(k&1){k=Fb()|0;WL(h);Qb(k|0)}else{WL(h);c[i>>2]=c[d>>2];c[h>>2]=c[i>>2];lO(a,g+20|0,b,h,f,e);l=j;return c[b>>2]|0}return 0}function PN(b,d,e,f,g,h,i,j){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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,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;Y=l;l=l+144|0;k=Y+128|0;j=Y+112|0;W=Y+124|0;X=Y+120|0;m=Y+116|0;n=Y+108|0;p=Y+104|0;q=Y+100|0;r=Y+96|0;s=Y+92|0;t=Y+88|0;u=Y+84|0;v=Y+80|0;w=Y+76|0;x=Y+72|0;y=Y+68|0;z=Y+64|0;A=Y+60|0;B=Y+56|0;C=Y+52|0;D=Y+48|0;E=Y+44|0;F=Y+40|0;G=Y+36|0;H=Y+32|0;I=Y+28|0;J=Y+24|0;K=Y+20|0;L=Y+16|0;M=Y+12|0;N=Y+8|0;O=Y+4|0;P=Y;c[g>>2]=0;nL(k,f);o=0;Q=ja(57,k|0,59880)|0;V=o;o=0;if(V&1){Z=Fb()|0;WL(k);Qb(Z|0)}WL(k);R=h+16|0;S=h+8|0;T=h+20|0;U=h+24|0;V=b+8|0;do switch(i<<24>>24|0){case 65:case 97:{c[W>>2]=c[e>>2];c[k>>2]=c[W>>2];_N(b,U,d,k,g,Q);Z=28;break}case 104:case 66:case 98:{c[X>>2]=c[e>>2];c[k>>2]=c[X>>2];$N(b,R,d,k,g,Q);Z=28;break}case 99:{X=Qc[c[(c[V>>2]|0)+12>>2]&255](V)|0;c[m>>2]=c[d>>2];c[n>>2]=c[e>>2];Z=a[X+11>>0]|0;e=Z<<24>>24<0;i=e?c[X>>2]|0:X;Z=i+(e?c[X+4>>2]|0:Z&255)|0;c[j>>2]=c[m>>2];c[k>>2]=c[n>>2];c[d>>2]=aO(b,j,k,f,g,h,i,Z)|0;Z=28;break}case 101:case 100:{c[p>>2]=c[e>>2];c[k>>2]=c[p>>2];bO(b,h+12|0,d,k,g,Q);Z=28;break}case 68:{c[q>>2]=c[d>>2];c[r>>2]=c[e>>2];c[j>>2]=c[q>>2];c[k>>2]=c[r>>2];c[d>>2]=aO(b,j,k,f,g,h,55366,55374)|0;Z=28;break}case 70:{c[s>>2]=c[d>>2];c[t>>2]=c[e>>2];c[j>>2]=c[s>>2];c[k>>2]=c[t>>2];c[d>>2]=aO(b,j,k,f,g,h,55374,55382)|0;Z=28;break}case 72:{c[u>>2]=c[e>>2];c[k>>2]=c[u>>2];cO(b,S,d,k,g,Q);Z=28;break}case 73:{c[v>>2]=c[e>>2];c[k>>2]=c[v>>2];dO(b,S,d,k,g,Q);Z=28;break}case 106:{c[w>>2]=c[e>>2];c[k>>2]=c[w>>2];eO(b,h+28|0,d,k,g,Q);Z=28;break}case 109:{c[x>>2]=c[e>>2];c[k>>2]=c[x>>2];fO(b,R,d,k,g,Q);Z=28;break}case 77:{c[y>>2]=c[e>>2];c[k>>2]=c[y>>2];gO(b,h+4|0,d,k,g,Q);Z=28;break}case 116:case 110:{c[z>>2]=c[e>>2];c[k>>2]=c[z>>2];hO(b,d,k,g,Q);Z=28;break}case 112:{c[A>>2]=c[e>>2];c[k>>2]=c[A>>2];iO(b,S,d,k,g,Q);Z=28;break}case 114:{c[B>>2]=c[d>>2];c[C>>2]=c[e>>2];c[j>>2]=c[B>>2];c[k>>2]=c[C>>2];c[d>>2]=aO(b,j,k,f,g,h,55382,55393)|0;Z=28;break}case 82:{c[D>>2]=c[d>>2];c[E>>2]=c[e>>2];c[j>>2]=c[D>>2];c[k>>2]=c[E>>2];c[d>>2]=aO(b,j,k,f,g,h,55393,55398)|0;Z=28;break}case 83:{c[F>>2]=c[e>>2];c[k>>2]=c[F>>2];jO(b,h,d,k,g,Q);Z=28;break}case 84:{c[G>>2]=c[d>>2];c[H>>2]=c[e>>2];c[j>>2]=c[G>>2];c[k>>2]=c[H>>2];c[d>>2]=aO(b,j,k,f,g,h,55398,55406)|0;Z=28;break}case 119:{c[I>>2]=c[e>>2];c[k>>2]=c[I>>2];kO(b,U,d,k,g,Q);Z=28;break}case 120:{i=c[(c[b>>2]|0)+20>>2]|0;c[J>>2]=c[d>>2];c[K>>2]=c[e>>2];c[j>>2]=c[J>>2];c[k>>2]=c[K>>2];j=_c[i&127](b,j,k,f,g,h)|0;break}case 88:{X=Qc[c[(c[V>>2]|0)+24>>2]&255](V)|0;c[L>>2]=c[d>>2];c[M>>2]=c[e>>2];Z=a[X+11>>0]|0;e=Z<<24>>24<0;i=e?c[X>>2]|0:X;Z=i+(e?c[X+4>>2]|0:Z&255)|0;c[j>>2]=c[L>>2];c[k>>2]=c[M>>2];c[d>>2]=aO(b,j,k,f,g,h,i,Z)|0;Z=28;break}case 121:{c[N>>2]=c[e>>2];c[k>>2]=c[N>>2];lO(b,T,d,k,g,Q);Z=28;break}case 89:{c[O>>2]=c[e>>2];c[k>>2]=c[O>>2];mO(b,T,d,k,g,Q);Z=28;break}case 37:{c[P>>2]=c[e>>2];c[k>>2]=c[P>>2];nO(b,d,k,g,Q);Z=28;break}default:{c[g>>2]=c[g>>2]|4;Z=28}}while(0);if((Z|0)==28)j=c[d>>2]|0;l=Y;return j|0}function QN(b){b=b|0;do if((a[58024]|0)==0?cW(58024)|0:0){o=0;La(46);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15188]=60584;break}}while(0);return c[15188]|0}function RN(b){b=b|0;do if((a[58008]|0)==0?cW(58008)|0:0){o=0;La(47);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15145]=60292;break}}while(0);return c[15145]|0}function SN(b){b=b|0;do if((a[57992]|0)==0?cW(57992)|0:0){o=0;La(48);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15072]=6e4;break}}while(0);return c[15072]|0}function TN(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[57984]|0)==0?cW(57984)|0:0){c[14997]=0;c[14998]=0;c[14999]=0;f=Uh(55124)|0;do if(f>>>0>4294967279){o=0;Na(320,59988);o=0}else{if(f>>>0<11){a[59999]=f;b=59988}else{d=f+16&-16;o=0;b=fa(107,d|0)|0;h=o;o=0;if(h&1)break;c[14997]=b;c[14999]=d|-2147483648;c[14998]=f}_i(b,55124,f)|0;a[e>>0]=0;ah(b+f|0,e);break a}while(0);h=Fb()|0;Qb(h|0)}while(0);l=g;return 59988}function UN(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[57976]|0)==0?cW(57976)|0:0){c[14994]=0;c[14995]=0;c[14996]=0;f=Uh(55112)|0;do if(f>>>0>4294967279){o=0;Na(320,59976);o=0}else{if(f>>>0<11){a[59987]=f;b=59976}else{d=f+16&-16;o=0;b=fa(107,d|0)|0;h=o;o=0;if(h&1)break;c[14994]=b;c[14996]=d|-2147483648;c[14995]=f}_i(b,55112,f)|0;a[e>>0]=0;ah(b+f|0,e);break a}while(0);h=Fb()|0;Qb(h|0)}while(0);l=g;return 59976}function VN(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[57968]|0)==0?cW(57968)|0:0){c[14991]=0;c[14992]=0;c[14993]=0;f=Uh(55103)|0;do if(f>>>0>4294967279){o=0;Na(320,59964);o=0}else{if(f>>>0<11){a[59975]=f;b=59964}else{d=f+16&-16;o=0;b=fa(107,d|0)|0;h=o;o=0;if(h&1)break;c[14991]=b;c[14993]=d|-2147483648;c[14992]=f}_i(b,55103,f)|0;a[e>>0]=0;ah(b+f|0,e);break a}while(0);h=Fb()|0;Qb(h|0)}while(0);l=g;return 59964}function WN(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[57960]|0)==0?cW(57960)|0:0){c[14988]=0;c[14989]=0;c[14990]=0;f=Uh(55094)|0;do if(f>>>0>4294967279){o=0;Na(320,59952);o=0}else{if(f>>>0<11){a[59963]=f;b=59952}else{d=f+16&-16;o=0;b=fa(107,d|0)|0;h=o;o=0;if(h&1)break;c[14988]=b;c[14990]=d|-2147483648;c[14989]=f}_i(b,55094,f)|0;a[e>>0]=0;ah(b+f|0,e);break a}while(0);h=Fb()|0;Qb(h|0)}while(0);l=g;return 59952}function XN(){var b=0,d=0;if((a[58e3]|0)==0?cW(58e3)|0:0){d=6e4;do{c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}d=d+12|0}while((d|0)!=60288)}vU(6e4,55145)|0;vU(60012,55148)|0;return}function YN(){var b=0,d=0;if((a[58016]|0)==0?cW(58016)|0:0){d=60292;do{c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}d=d+12|0}while((d|0)!=60580)}vU(60292,55151)|0;vU(60304,55159)|0;vU(60316,55168)|0;vU(60328,55174)|0;vU(60340,55180)|0;vU(60352,55184)|0;vU(60364,55189)|0;vU(60376,55194)|0;vU(60388,55201)|0;vU(60400,55211)|0;vU(60412,55219)|0;vU(60424,55228)|0;vU(60436,55237)|0;vU(60448,55241)|0;vU(60460,55245)|0;vU(60472,55249)|0;vU(60484,55180)|0;vU(60496,55253)|0;vU(60508,55257)|0;vU(60520,55261)|0;vU(60532,55265)|0;vU(60544,55269)|0;vU(60556,55273)|0;vU(60568,55277)|0;return}function ZN(){var b=0,d=0;if((a[58032]|0)==0?cW(58032)|0:0){d=60584;do{c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}d=d+12|0}while((d|0)!=60752)}vU(60584,55281)|0;vU(60596,55288)|0;vU(60608,55295)|0;vU(60620,55303)|0;vU(60632,55313)|0;vU(60644,55322)|0;vU(60656,55329)|0;vU(60668,55338)|0;vU(60680,55342)|0;vU(60692,55346)|0;vU(60704,55350)|0;vU(60716,55354)|0;vU(60728,55358)|0;vU(60740,55362)|0;return}function _N(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;h=l;l=l+16|0;i=h+4|0;j=h;a=a+8|0;a=Qc[c[c[a>>2]>>2]&255](a)|0;c[j>>2]=c[e>>2];c[i>>2]=c[j>>2];a=(CM(d,i,a,a+168|0,g,f,0)|0)-a|0;if((a|0)<168)c[b>>2]=((a|0)/12|0|0)%7|0;l=h;return}function $N(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;h=l;l=l+16|0;i=h+4|0;j=h;a=a+8|0;a=Qc[c[(c[a>>2]|0)+4>>2]&255](a)|0;c[j>>2]=c[e>>2];c[i>>2]=c[j>>2];a=(CM(d,i,a,a+288|0,g,f,0)|0)-a|0;if((a|0)<288)c[b>>2]=((a|0)/12|0|0)%12|0;l=h;return}function aO(d,e,f,g,h,i,j,k){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=l;l=l+16|0;v=C+12|0;u=C+8|0;y=C+4|0;A=C;nL(v,g);o=0;w=ja(57,v|0,59880)|0;x=o;o=0;if(x&1){C=Fb()|0;WL(v);Qb(C|0)}WL(v);c[h>>2]=0;x=w+8|0;m=0;a:while(1){t=(j|0)!=(k|0);n=m;while(1){m=c[e>>2]|0;if(!(t&(n|0)==0))break a;p=m;if(m){n=c[m+12>>2]|0;if((n|0)==(c[m+16>>2]|0))n=Qc[c[(c[m>>2]|0)+36>>2]&255](m)|0;else n=bh(a[n>>0]|0)|0;if(Yg(n,Qg()|0)|0){c[e>>2]=0;m=0;r=1;s=0}else{r=0;s=p}}else{m=0;r=1;s=p}q=c[f>>2]|0;n=q;do if(q){p=c[q+12>>2]|0;if((p|0)==(c[q+16>>2]|0))p=Qc[c[(c[q>>2]|0)+36>>2]&255](q)|0;else p=bh(a[p>>0]|0)|0;if(!(Yg(p,Qg()|0)|0))if(r)break;else{B=63;break a}else{c[f>>2]=0;n=0;B=17;break}}else B=17;while(0);if((B|0)==17){B=0;if(r){B=63;break a}else q=0}if((Tc[c[(c[w>>2]|0)+36>>2]&127](w,a[j>>0]|0,0)|0)<<24>>24==37){B=21;break}n=a[j>>0]|0;if(n<<24>>24>-1?(z=c[x>>2]|0,b[z+(n<<24>>24<<1)>>1]&8192):0){B=29;break}p=m+12|0;n=c[p>>2]|0;q=m+16|0;if((n|0)==(c[q>>2]|0))n=Qc[c[(c[m>>2]|0)+36>>2]&255](m)|0;else n=bh(a[n>>0]|0)|0;s=Sc[c[(c[w>>2]|0)+12>>2]&127](w,n&255)|0;if(s<<24>>24==(Sc[c[(c[w>>2]|0)+12>>2]&127](w,a[j>>0]|0)|0)<<24>>24){B=59;break}c[h>>2]=4;n=4}b:do if((B|0)==21){B=0;r=j+1|0;if((r|0)==(k|0)){B=63;break a}p=Tc[c[(c[w>>2]|0)+36>>2]&127](w,a[r>>0]|0,0)|0;switch(p<<24>>24){case 48:case 69:{j=j+2|0;if((j|0)==(k|0)){B=63;break a}q=p;m=Tc[c[(c[w>>2]|0)+36>>2]&127](w,a[j>>0]|0,0)|0;j=r;break}default:{q=0;m=p}}t=c[(c[d>>2]|0)+36>>2]|0;c[y>>2]=s;c[A>>2]=n;c[u>>2]=c[y>>2];c[v>>2]=c[A>>2];c[e>>2]=ad[t&63](d,u,v,g,h,i,m,q)|0;j=j+2|0}else if((B|0)==29){while(1){B=0;j=j+1|0;if((j|0)==(k|0)){j=k;break}n=a[j>>0]|0;if(n<<24>>24<=-1)break;if(!(b[z+(n<<24>>24<<1)>>1]&8192))break;else B=29}n=q;while(1){if(m){p=c[m+12>>2]|0;if((p|0)==(c[m+16>>2]|0))p=Qc[c[(c[m>>2]|0)+36>>2]&255](m)|0;else p=bh(a[p>>0]|0)|0;if(Yg(p,Qg()|0)|0){c[e>>2]=0;r=1;m=0}else r=0}else{r=1;m=0}do if(q){p=c[q+12>>2]|0;if((p|0)==(c[q+16>>2]|0))p=Qc[c[(c[q>>2]|0)+36>>2]&255](q)|0;else p=bh(a[p>>0]|0)|0;if(!(Yg(p,Qg()|0)|0))if(r^(n|0)==0){s=n;q=n;break}else break b;else{c[f>>2]=0;n=0;B=45;break}}else B=45;while(0);if((B|0)==45){B=0;if(r)break b;else{s=n;q=0}}p=m+12|0;n=c[p>>2]|0;r=m+16|0;if((n|0)==(c[r>>2]|0))n=Qc[c[(c[m>>2]|0)+36>>2]&255](m)|0;else n=bh(a[n>>0]|0)|0;if((n&255)<<24>>24<=-1)break b;if(!(b[(c[x>>2]|0)+(n<<24>>24<<1)>>1]&8192))break b;n=c[p>>2]|0;if((n|0)==(c[r>>2]|0)){Qc[c[(c[m>>2]|0)+40>>2]&255](m)|0;n=s;continue}else{c[p>>2]=n+1;bh(a[n>>0]|0)|0;n=s;continue}}}else if((B|0)==59){B=0;j=j+1|0;n=c[p>>2]|0;if((n|0)==(c[q>>2]|0)){Qc[c[(c[m>>2]|0)+40>>2]&255](m)|0;break}else{c[p>>2]=n+1;bh(a[n>>0]|0)|0;break}}while(0);m=c[h>>2]|0}if((B|0)==63)c[h>>2]=4;if(m){j=c[m+12>>2]|0;if((j|0)==(c[m+16>>2]|0))j=Qc[c[(c[m>>2]|0)+36>>2]&255](m)|0;else j=bh(a[j>>0]|0)|0;if(Yg(j,Qg()|0)|0){c[e>>2]=0;m=0;p=1}else p=0}else{m=0;p=1}j=c[f>>2]|0;do if(j){n=c[j+12>>2]|0;if((n|0)==(c[j+16>>2]|0))j=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else j=bh(a[n>>0]|0)|0;if(!(Yg(j,Qg()|0)|0))if(p)break;else{B=78;break}else{c[f>>2]=0;B=76;break}}else B=76;while(0);if((B|0)==76?p:0)B=78;if((B|0)==78)c[h>>2]=c[h>>2]|2;l=C;return m|0}function bO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a+-1|0)>>>0<31&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function cO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<24&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function dO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a+-1|0)>>>0<12&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function eO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,3)|0;d=c[f>>2]|0;if((a|0)<366&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function fO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<13&(d&4|0)==0)c[b>>2]=a+-1;else c[f>>2]=d|4;l=h;return}function gO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<60&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function hO(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0;j=h+8|0;a:while(1){d=c[e>>2]|0;do if(d){h=c[d+12>>2]|0;if((h|0)==(c[d+16>>2]|0))d=Qc[c[(c[d>>2]|0)+36>>2]&255](d)|0;else d=bh(a[h>>0]|0)|0;if(Yg(d,Qg()|0)|0){c[e>>2]=0;i=1;break}else{i=(c[e>>2]|0)==0;break}}else i=1;while(0);h=c[f>>2]|0;do if(h){d=c[h+12>>2]|0;if((d|0)==(c[h+16>>2]|0))d=Qc[c[(c[h>>2]|0)+36>>2]&255](h)|0;else d=bh(a[d>>0]|0)|0;if(!(Yg(d,Qg()|0)|0))if(i){i=h;break}else{i=h;break a}else{c[f>>2]=0;k=15;break}}else k=15;while(0);if((k|0)==15){k=0;if(i){i=0;break}else i=0}d=c[e>>2]|0;h=c[d+12>>2]|0;if((h|0)==(c[d+16>>2]|0))d=Qc[c[(c[d>>2]|0)+36>>2]&255](d)|0;else d=bh(a[h>>0]|0)|0;if((d&255)<<24>>24<=-1)break;if(!(b[(c[j>>2]|0)+(d<<24>>24<<1)>>1]&8192))break;d=c[e>>2]|0;h=d+12|0;i=c[h>>2]|0;if((i|0)==(c[d+16>>2]|0)){Qc[c[(c[d>>2]|0)+40>>2]&255](d)|0;continue}else{c[h>>2]=i+1;bh(a[i>>0]|0)|0;continue}}d=c[e>>2]|0;do if(d){h=c[d+12>>2]|0;if((h|0)==(c[d+16>>2]|0))d=Qc[c[(c[d>>2]|0)+36>>2]&255](d)|0;else d=bh(a[h>>0]|0)|0;if(Yg(d,Qg()|0)|0){c[e>>2]=0;h=1;break}else{h=(c[e>>2]|0)==0;break}}else h=1;while(0);do if(i){d=c[i+12>>2]|0;if((d|0)==(c[i+16>>2]|0))d=Qc[c[(c[i>>2]|0)+36>>2]&255](i)|0;else d=bh(a[d>>0]|0)|0;if(!(Yg(d,Qg()|0)|0))if(h)break;else{k=40;break}else{c[f>>2]=0;k=38;break}}else k=38;while(0);if((k|0)==38?h:0)k=40;if((k|0)==40)c[g>>2]=c[g>>2]|2;return}function iO(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0;n=l;l=l+16|0;k=n+4|0;m=n;j=b+8|0;j=Qc[c[(c[j>>2]|0)+8>>2]&255](j)|0;b=a[j+11>>0]|0;if(b<<24>>24<0)i=c[j+4>>2]|0;else i=b&255;b=a[j+12+11>>0]|0;if(b<<24>>24<0)b=c[j+16>>2]|0;else b=b&255;do if((i|0)!=(0-b|0)){c[m>>2]=c[f>>2];c[k>>2]=c[m>>2];b=(CM(e,k,j,j+24|0,h,g,0)|0)-j|0;i=c[d>>2]|0;if((i|0)==12&(b|0)==0){c[d>>2]=0;break}if((i|0)<12&(b|0)==12)c[d>>2]=i+12}else c[g>>2]=c[g>>2]|4;while(0);l=n;return}function jO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<61&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function kO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,1)|0;d=c[f>>2]|0;if((a|0)<7&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function lO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,4)|0;if(!(c[f>>2]&4)){if((a|0)<69)a=a+2e3|0;else a=(a|0)<100?a+1900|0:a;c[b>>2]=a+-1900}l=h;return}function mO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=oO(d,a,f,g,4)|0;if(!(c[f>>2]&4))c[b>>2]=a+-1900;l=h;return}function nO(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;b=c[d>>2]|0;do if(b){h=c[b+12>>2]|0;if((h|0)==(c[b+16>>2]|0))b=Qc[c[(c[b>>2]|0)+36>>2]&255](b)|0;else b=bh(a[h>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;i=1;break}else{i=(c[d>>2]|0)==0;break}}else i=1;while(0);h=c[e>>2]|0;do if(h){b=c[h+12>>2]|0;if((b|0)==(c[h+16>>2]|0))b=Qc[c[(c[h>>2]|0)+36>>2]&255](h)|0;else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(i){j=h;k=16;break}else{b=6;k=38;break}else{c[e>>2]=0;k=14;break}}else k=14;while(0);if((k|0)==14)if(i){b=6;k=38}else{j=0;k=16}a:do if((k|0)==16){b=c[d>>2]|0;h=c[b+12>>2]|0;if((h|0)==(c[b+16>>2]|0))b=Qc[c[(c[b>>2]|0)+36>>2]&255](b)|0;else b=bh(a[h>>0]|0)|0;if((Tc[c[(c[g>>2]|0)+36>>2]&127](g,b&255,0)|0)<<24>>24==37){b=c[d>>2]|0;h=b+12|0;i=c[h>>2]|0;if((i|0)==(c[b+16>>2]|0))Qc[c[(c[b>>2]|0)+40>>2]&255](b)|0;else{c[h>>2]=i+1;bh(a[i>>0]|0)|0}b=c[d>>2]|0;do if(b){h=c[b+12>>2]|0;if((h|0)==(c[b+16>>2]|0))b=Qc[c[(c[b>>2]|0)+36>>2]&255](b)|0;else b=bh(a[h>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;h=1;break}else{h=(c[d>>2]|0)==0;break}}else h=1;while(0);do if(j|0){b=c[j+12>>2]|0;if((b|0)==(c[j+16>>2]|0))b=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(h)break a;else{b=2;k=38;break a}else{c[e>>2]=0;break}}while(0);if(h){b=2;k=38}}else{b=4;k=38}}while(0);if((k|0)==38)c[f>>2]=c[f>>2]|b;return}function oO(d,e,f,g,h){d=d|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[d>>2]|0;do if(i){j=c[i+12>>2]|0;if((j|0)==(c[i+16>>2]|0))i=Qc[c[(c[i>>2]|0)+36>>2]&255](i)|0;else i=bh(a[j>>0]|0)|0;if(Yg(i,Qg()|0)|0){c[d>>2]=0;k=1;break}else{k=(c[d>>2]|0)==0;break}}else k=1;while(0);j=c[e>>2]|0;do if(j){i=c[j+12>>2]|0;if((i|0)==(c[j+16>>2]|0))i=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else i=bh(a[i>>0]|0)|0;if(!(Yg(i,Qg()|0)|0))if(k){s=17;break}else{s=16;break}else{c[e>>2]=0;s=14;break}}else s=14;while(0);if((s|0)==14)if(k)s=16;else{j=0;s=17}a:do if((s|0)==16){c[f>>2]=c[f>>2]|6;i=0}else if((s|0)==17){i=c[d>>2]|0;k=c[i+12>>2]|0;if((k|0)==(c[i+16>>2]|0))i=Qc[c[(c[i>>2]|0)+36>>2]&255](i)|0;else i=bh(a[k>>0]|0)|0;k=i&255;if(k<<24>>24>-1?(r=g+8|0,b[(c[r>>2]|0)+(i<<24>>24<<1)>>1]&2048):0){i=(Tc[c[(c[g>>2]|0)+36>>2]&127](g,k,0)|0)<<24>>24;k=c[d>>2]|0;l=k+12|0;m=c[l>>2]|0;if((m|0)==(c[k+16>>2]|0)){Qc[c[(c[k>>2]|0)+40>>2]&255](k)|0;n=j;l=j}else{c[l>>2]=m+1;bh(a[m>>0]|0)|0;n=j;l=j}while(1){i=i+-48|0;q=h+-1|0;j=c[d>>2]|0;do if(j){k=c[j+12>>2]|0;if((k|0)==(c[j+16>>2]|0))j=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else j=bh(a[k>>0]|0)|0;if(Yg(j,Qg()|0)|0){c[d>>2]=0;m=1;break}else{m=(c[d>>2]|0)==0;break}}else m=1;while(0);do if(l){j=c[l+12>>2]|0;if((j|0)==(c[l+16>>2]|0))j=Qc[c[(c[l>>2]|0)+36>>2]&255](l)|0;else j=bh(a[j>>0]|0)|0;if(Yg(j,Qg()|0)|0){c[e>>2]=0;p=0;j=1;o=0;break}else{p=n;j=(n|0)==0;o=n;break}}else{p=n;j=1;o=0}while(0);k=c[d>>2]|0;if(!((h|0)>1&(m^j)))break;j=c[k+12>>2]|0;if((j|0)==(c[k+16>>2]|0))j=Qc[c[(c[k>>2]|0)+36>>2]&255](k)|0;else j=bh(a[j>>0]|0)|0;k=j&255;if(k<<24>>24<=-1)break a;if(!(b[(c[r>>2]|0)+(j<<24>>24<<1)>>1]&2048))break a;i=((Tc[c[(c[g>>2]|0)+36>>2]&127](g,k,0)|0)<<24>>24)+(i*10|0)|0;j=c[d>>2]|0;k=j+12|0;l=c[k>>2]|0;if((l|0)==(c[j+16>>2]|0)){Qc[c[(c[j>>2]|0)+40>>2]&255](j)|0;h=q;n=p;l=o;continue}else{c[k>>2]=l+1;bh(a[l>>0]|0)|0;h=q;n=p;l=o;continue}}do if(k){j=c[k+12>>2]|0;if((j|0)==(c[k+16>>2]|0))j=Qc[c[(c[k>>2]|0)+36>>2]&255](k)|0;else j=bh(a[j>>0]|0)|0;if(Yg(j,Qg()|0)|0){c[d>>2]=0;k=1;break}else{k=(c[d>>2]|0)==0;break}}else k=1;while(0);do if(p){j=c[p+12>>2]|0;if((j|0)==(c[p+16>>2]|0))j=Qc[c[(c[p>>2]|0)+36>>2]&255](p)|0;else j=bh(a[j>>0]|0)|0;if(!(Yg(j,Qg()|0)|0))if(k)break a;else break;else{c[e>>2]=0;s=62;break}}else s=62;while(0);if((s|0)==62?!k:0)break;c[f>>2]=c[f>>2]|2;break}c[f>>2]=c[f>>2]|4;i=0}while(0);return i|0}function pO(a){a=a|0;BL(a);return}function qO(a){a=a|0;BL(a);cU(a);return}function rO(a){a=a|0;return 2}function sO(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=LO(a,j,i,e,f,g,39736,39768)|0;l=h;return g|0}function tO(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0;i=l;l=l+16|0;j=i+12|0;k=i+8|0;n=i+4|0;m=i;o=b+8|0;o=Qc[c[(c[o>>2]|0)+20>>2]&255](o)|0;c[n>>2]=c[d>>2];c[m>>2]=c[e>>2];e=a[o+8+3>>0]|0;p=e<<24>>24<0;d=p?c[o>>2]|0:o;e=d+((p?c[o+4>>2]|0:e&255)<<2)|0;c[k>>2]=c[n>>2];c[j>>2]=c[m>>2];h=LO(b,k,j,f,g,h,d,e)|0;l=i;return h|0}function uO(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;j=l;l=l+16|0;h=j+4|0;i=j;nL(h,e);o=0;e=ja(57,h|0,59912)|0;k=o;o=0;if(k&1){k=Fb()|0;WL(h);Qb(k|0)}else{WL(h);c[i>>2]=c[d>>2];c[h>>2]=c[i>>2];JO(a,g+24|0,b,h,f,e);l=j;return c[b>>2]|0}return 0}function vO(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;j=l;l=l+16|0;h=j+4|0;i=j;nL(h,e);o=0;e=ja(57,h|0,59912)|0;k=o;o=0;if(k&1){k=Fb()|0;WL(h);Qb(k|0)}else{WL(h);c[i>>2]=c[d>>2];c[h>>2]=c[i>>2];KO(a,g+16|0,b,h,f,e);l=j;return c[b>>2]|0}return 0}function wO(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;j=l;l=l+16|0;h=j+4|0;i=j;nL(h,e);o=0;e=ja(57,h|0,59912)|0;k=o;o=0;if(k&1){k=Fb()|0;WL(h);Qb(k|0)}else{WL(h);c[i>>2]=c[d>>2];c[h>>2]=c[i>>2];WO(a,g+20|0,b,h,f,e);l=j;return c[b>>2]|0}return 0}function xO(b,d,e,f,g,h,i,j){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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,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;Y=l;l=l+144|0;k=Y+128|0;j=Y+112|0;W=Y+124|0;X=Y+120|0;m=Y+116|0;n=Y+108|0;p=Y+104|0;q=Y+100|0;r=Y+96|0;s=Y+92|0;t=Y+88|0;u=Y+84|0;v=Y+80|0;w=Y+76|0;x=Y+72|0;y=Y+68|0;z=Y+64|0;A=Y+60|0;B=Y+56|0;C=Y+52|0;D=Y+48|0;E=Y+44|0;F=Y+40|0;G=Y+36|0;H=Y+32|0;I=Y+28|0;J=Y+24|0;K=Y+20|0;L=Y+16|0;M=Y+12|0;N=Y+8|0;O=Y+4|0;P=Y;c[g>>2]=0;nL(k,f);o=0;Q=ja(57,k|0,59912)|0;V=o;o=0;if(V&1){Z=Fb()|0;WL(k);Qb(Z|0)}WL(k);R=h+16|0;S=h+8|0;T=h+20|0;U=h+24|0;V=b+8|0;do switch(i<<24>>24|0){case 65:case 97:{c[W>>2]=c[e>>2];c[k>>2]=c[W>>2];JO(b,U,d,k,g,Q);Z=28;break}case 104:case 66:case 98:{c[X>>2]=c[e>>2];c[k>>2]=c[X>>2];KO(b,R,d,k,g,Q);Z=28;break}case 99:{X=Qc[c[(c[V>>2]|0)+12>>2]&255](V)|0;c[m>>2]=c[d>>2];c[n>>2]=c[e>>2];Z=a[X+8+3>>0]|0;e=Z<<24>>24<0;i=e?c[X>>2]|0:X;Z=i+((e?c[X+4>>2]|0:Z&255)<<2)|0;c[j>>2]=c[m>>2];c[k>>2]=c[n>>2];c[d>>2]=LO(b,j,k,f,g,h,i,Z)|0;Z=28;break}case 101:case 100:{c[p>>2]=c[e>>2];c[k>>2]=c[p>>2];MO(b,h+12|0,d,k,g,Q);Z=28;break}case 68:{c[q>>2]=c[d>>2];c[r>>2]=c[e>>2];c[j>>2]=c[q>>2];c[k>>2]=c[r>>2];c[d>>2]=LO(b,j,k,f,g,h,39576,39608)|0;Z=28;break}case 70:{c[s>>2]=c[d>>2];c[t>>2]=c[e>>2];c[j>>2]=c[s>>2];c[k>>2]=c[t>>2];c[d>>2]=LO(b,j,k,f,g,h,39608,39640)|0;Z=28;break}case 72:{c[u>>2]=c[e>>2];c[k>>2]=c[u>>2];NO(b,S,d,k,g,Q);Z=28;break}case 73:{c[v>>2]=c[e>>2];c[k>>2]=c[v>>2];OO(b,S,d,k,g,Q);Z=28;break}case 106:{c[w>>2]=c[e>>2];c[k>>2]=c[w>>2];PO(b,h+28|0,d,k,g,Q);Z=28;break}case 109:{c[x>>2]=c[e>>2];c[k>>2]=c[x>>2];QO(b,R,d,k,g,Q);Z=28;break}case 77:{c[y>>2]=c[e>>2];c[k>>2]=c[y>>2];RO(b,h+4|0,d,k,g,Q);Z=28;break}case 116:case 110:{c[z>>2]=c[e>>2];c[k>>2]=c[z>>2];SO(b,d,k,g,Q);Z=28;break}case 112:{c[A>>2]=c[e>>2];c[k>>2]=c[A>>2];TO(b,S,d,k,g,Q);Z=28;break}case 114:{c[B>>2]=c[d>>2];c[C>>2]=c[e>>2];c[j>>2]=c[B>>2];c[k>>2]=c[C>>2];c[d>>2]=LO(b,j,k,f,g,h,39640,39684)|0;Z=28;break}case 82:{c[D>>2]=c[d>>2];c[E>>2]=c[e>>2];c[j>>2]=c[D>>2];c[k>>2]=c[E>>2];c[d>>2]=LO(b,j,k,f,g,h,39684,39704)|0;Z=28;break}case 83:{c[F>>2]=c[e>>2];c[k>>2]=c[F>>2];UO(b,h,d,k,g,Q);Z=28;break}case 84:{c[G>>2]=c[d>>2];c[H>>2]=c[e>>2];c[j>>2]=c[G>>2];c[k>>2]=c[H>>2];c[d>>2]=LO(b,j,k,f,g,h,39704,39736)|0;Z=28;break}case 119:{c[I>>2]=c[e>>2];c[k>>2]=c[I>>2];VO(b,U,d,k,g,Q);Z=28;break}case 120:{i=c[(c[b>>2]|0)+20>>2]|0;c[J>>2]=c[d>>2];c[K>>2]=c[e>>2];c[j>>2]=c[J>>2];c[k>>2]=c[K>>2];j=_c[i&127](b,j,k,f,g,h)|0;break}case 88:{X=Qc[c[(c[V>>2]|0)+24>>2]&255](V)|0;c[L>>2]=c[d>>2];c[M>>2]=c[e>>2];Z=a[X+8+3>>0]|0;e=Z<<24>>24<0;i=e?c[X>>2]|0:X;Z=i+((e?c[X+4>>2]|0:Z&255)<<2)|0;c[j>>2]=c[L>>2];c[k>>2]=c[M>>2];c[d>>2]=LO(b,j,k,f,g,h,i,Z)|0;Z=28;break}case 121:{c[N>>2]=c[e>>2];c[k>>2]=c[N>>2];WO(b,T,d,k,g,Q);Z=28;break}case 89:{c[O>>2]=c[e>>2];c[k>>2]=c[O>>2];XO(b,T,d,k,g,Q);Z=28;break}case 37:{c[P>>2]=c[e>>2];c[k>>2]=c[P>>2];YO(b,d,k,g,Q);Z=28;break}default:{c[g>>2]=c[g>>2]|4;Z=28}}while(0);if((Z|0)==28)j=c[d>>2]|0;l=Y;return j|0}function yO(b){b=b|0;do if((a[58104]|0)==0?cW(58104)|0:0){o=0;La(49);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15391]=61396;break}}while(0);return c[15391]|0}function zO(b){b=b|0;do if((a[58088]|0)==0?cW(58088)|0:0){o=0;La(50);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15348]=61104;break}}while(0);return c[15348]|0}function AO(b){b=b|0;do if((a[58072]|0)==0?cW(58072)|0:0){o=0;La(51);b=o;o=0;if(b&1){b=Fb()|0;Qb(b|0)}else{c[15275]=60812;break}}while(0);return c[15275]|0}function BO(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[58064]|0)==0?cW(58064)|0:0){c[15200]=0;c[15201]=0;c[15202]=0;f=FO(38608)|0;b:do if(f>>>0>1073741807){o=0;Na(320,60800);o=0;h=15}else{do if(f>>>0>=2){d=f+4&-4;if(d>>>0<=1073741823){o=0;b=fa(107,d<<2|0)|0;h=o;o=0;if(h&1){h=15;break b}c[15200]=b;c[15202]=d|-2147483648;c[15201]=f;break}b=Ab(8)|0;o=0;Xa(98,b|0,56853);g=o;o=0;if(g&1){g=Fb()|0;Jb(b|0);b=g;break b}else{c[b>>2]=41052;o=0;bb(68,b|0,3176,299);o=0;h=15;break b}}else{a[60811]=f;b=60800}while(0);_K(b,38608,f)|0;c[e>>2]=0;HL(b+(f<<2)|0,e);break a}while(0);if((h|0)==15)b=Fb()|0;Qb(b|0)}while(0);l=g;return 60800}function CO(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[58056]|0)==0?cW(58056)|0:0){c[15197]=0;c[15198]=0;c[15199]=0;f=FO(38560)|0;b:do if(f>>>0>1073741807){o=0;Na(320,60788);o=0;h=15}else{do if(f>>>0>=2){d=f+4&-4;if(d>>>0<=1073741823){o=0;b=fa(107,d<<2|0)|0;h=o;o=0;if(h&1){h=15;break b}c[15197]=b;c[15199]=d|-2147483648;c[15198]=f;break}b=Ab(8)|0;o=0;Xa(98,b|0,56853);g=o;o=0;if(g&1){g=Fb()|0;Jb(b|0);b=g;break b}else{c[b>>2]=41052;o=0;bb(68,b|0,3176,299);o=0;h=15;break b}}else{a[60799]=f;b=60788}while(0);_K(b,38560,f)|0;c[e>>2]=0;HL(b+(f<<2)|0,e);break a}while(0);if((h|0)==15)b=Fb()|0;Qb(b|0)}while(0);l=g;return 60788}function DO(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[58048]|0)==0?cW(58048)|0:0){c[15194]=0;c[15195]=0;c[15196]=0;f=FO(38524)|0;b:do if(f>>>0>1073741807){o=0;Na(320,60776);o=0;h=15}else{do if(f>>>0>=2){d=f+4&-4;if(d>>>0<=1073741823){o=0;b=fa(107,d<<2|0)|0;h=o;o=0;if(h&1){h=15;break b}c[15194]=b;c[15196]=d|-2147483648;c[15195]=f;break}b=Ab(8)|0;o=0;Xa(98,b|0,56853);g=o;o=0;if(g&1){g=Fb()|0;Jb(b|0);b=g;break b}else{c[b>>2]=41052;o=0;bb(68,b|0,3176,299);o=0;h=15;break b}}else{a[60787]=f;b=60776}while(0);_K(b,38524,f)|0;c[e>>2]=0;HL(b+(f<<2)|0,e);break a}while(0);if((h|0)==15)b=Fb()|0;Qb(b|0)}while(0);l=g;return 60776}function EO(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g;a:do if((a[58040]|0)==0?cW(58040)|0:0){c[15191]=0;c[15192]=0;c[15193]=0;f=FO(38488)|0;b:do if(f>>>0>1073741807){o=0;Na(320,60764);o=0;h=15}else{do if(f>>>0>=2){d=f+4&-4;if(d>>>0<=1073741823){o=0;b=fa(107,d<<2|0)|0;h=o;o=0;if(h&1){h=15;break b}c[15191]=b;c[15193]=d|-2147483648;c[15192]=f;break}b=Ab(8)|0;o=0;Xa(98,b|0,56853);g=o;o=0;if(g&1){g=Fb()|0;Jb(b|0);b=g;break b}else{c[b>>2]=41052;o=0;bb(68,b|0,3176,299);o=0;h=15;break b}}else{a[60775]=f;b=60764}while(0);_K(b,38488,f)|0;c[e>>2]=0;HL(b+(f<<2)|0,e);break a}while(0);if((h|0)==15)b=Fb()|0;Qb(b|0)}while(0);l=g;return 60764}function FO(a){a=a|0;var b=0;o=0;a=fa(166,a|0)|0;b=o;o=0;if(b&1){b=Gb(0)|0;_g(b)}else return a|0;return 0}function GO(){var b=0,d=0;if((a[58080]|0)==0?cW(58080)|0:0){d=60812;do{c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}d=d+12|0}while((d|0)!=61100)}KU(60812,38692)|0;KU(60824,38704)|0;return}function HO(){var b=0,d=0;if((a[58096]|0)==0?cW(58096)|0:0){d=61104;do{c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}d=d+12|0}while((d|0)!=61392)}KU(61104,38716)|0;KU(61116,38748)|0;KU(61128,38784)|0;KU(61140,38808)|0;KU(61152,38832)|0;KU(61164,38848)|0;KU(61176,38868)|0;KU(61188,38888)|0;KU(61200,38916)|0;KU(61212,38956)|0;KU(61224,38988)|0;KU(61236,39024)|0;KU(61248,39060)|0;KU(61260,39076)|0;KU(61272,39092)|0;KU(61284,39108)|0;KU(61296,38832)|0;KU(61308,39124)|0;KU(61320,39140)|0;KU(61332,39156)|0;KU(61344,39172)|0;KU(61356,39188)|0;KU(61368,39204)|0;KU(61380,39220)|0;return}function IO(){var b=0,d=0;if((a[58112]|0)==0?cW(58112)|0:0){d=61396;do{c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}d=d+12|0}while((d|0)!=61564)}KU(61396,39236)|0;KU(61408,39264)|0;KU(61420,39292)|0;KU(61432,39324)|0;KU(61444,39364)|0;KU(61456,39400)|0;KU(61468,39428)|0;KU(61480,39464)|0;KU(61492,39480)|0;KU(61504,39496)|0;KU(61516,39512)|0;KU(61528,39528)|0;KU(61540,39544)|0;KU(61552,39560)|0;return}function JO(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;h=l;l=l+16|0;i=h+4|0;j=h;a=a+8|0;a=Qc[c[c[a>>2]>>2]&255](a)|0;c[j>>2]=c[e>>2];c[i>>2]=c[j>>2];a=(bN(d,i,a,a+168|0,g,f,0)|0)-a|0;if((a|0)<168)c[b>>2]=((a|0)/12|0|0)%7|0;l=h;return}function KO(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;h=l;l=l+16|0;i=h+4|0;j=h;a=a+8|0;a=Qc[c[(c[a>>2]|0)+4>>2]&255](a)|0;c[j>>2]=c[e>>2];c[i>>2]=c[j>>2];a=(bN(d,i,a,a+288|0,g,f,0)|0)-a|0;if((a|0)<288)c[b>>2]=((a|0)/12|0|0)%12|0;l=h;return}function LO(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+16|0;t=y+12|0;s=y+8|0;v=y+4|0;w=y;nL(t,e);o=0;u=ja(57,t|0,59912)|0;r=o;o=0;if(r&1){y=Fb()|0;WL(t);Qb(y|0)}WL(t);c[f>>2]=0;j=0;a:while(1){r=(h|0)!=(i|0);k=j;while(1){j=c[b>>2]|0;if(!(r&(k|0)==0))break a;m=j;if(j){k=c[j+12>>2]|0;if((k|0)==(c[j+16>>2]|0))k=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else k=ZK(c[k>>2]|0)|0;if(oL(k,YK()|0)|0){c[b>>2]=0;j=0;p=1;q=0}else{p=0;q=m}}else{j=0;p=1;q=m}n=c[d>>2]|0;k=n;do if(n){m=c[n+12>>2]|0;if((m|0)==(c[n+16>>2]|0))m=Qc[c[(c[n>>2]|0)+36>>2]&255](n)|0;else m=ZK(c[m>>2]|0)|0;if(!(oL(m,YK()|0)|0))if(p)break;else{x=60;break a}else{c[d>>2]=0;k=0;x=17;break}}else x=17;while(0);if((x|0)==17){x=0;if(p){x=60;break a}else n=0}if((Tc[c[(c[u>>2]|0)+52>>2]&127](u,c[h>>2]|0,0)|0)<<24>>24==37){x=21;break}if(Tc[c[(c[u>>2]|0)+12>>2]&127](u,8192,c[h>>2]|0)|0){x=28;break}m=j+12|0;k=c[m>>2]|0;n=j+16|0;if((k|0)==(c[n>>2]|0))k=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else k=ZK(c[k>>2]|0)|0;q=Sc[c[(c[u>>2]|0)+28>>2]&127](u,k)|0;if((q|0)==(Sc[c[(c[u>>2]|0)+28>>2]&127](u,c[h>>2]|0)|0)){x=56;break}c[f>>2]=4;k=4}b:do if((x|0)==21){x=0;p=h+4|0;if((p|0)==(i|0)){x=60;break a}m=Tc[c[(c[u>>2]|0)+52>>2]&127](u,c[p>>2]|0,0)|0;switch(m<<24>>24){case 48:case 69:{h=h+8|0;if((h|0)==(i|0)){x=60;break a}n=m;j=Tc[c[(c[u>>2]|0)+52>>2]&127](u,c[h>>2]|0,0)|0;h=p;break}default:{n=0;j=m}}r=c[(c[a>>2]|0)+36>>2]|0;c[v>>2]=q;c[w>>2]=k;c[s>>2]=c[v>>2];c[t>>2]=c[w>>2];c[b>>2]=ad[r&63](a,s,t,e,f,g,j,n)|0;h=h+8|0}else if((x|0)==28){while(1){x=0;h=h+4|0;if((h|0)==(i|0)){h=i;break}if(Tc[c[(c[u>>2]|0)+12>>2]&127](u,8192,c[h>>2]|0)|0)x=28;else break}k=n;while(1){if(j){m=c[j+12>>2]|0;if((m|0)==(c[j+16>>2]|0))m=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else m=ZK(c[m>>2]|0)|0;if(oL(m,YK()|0)|0){c[b>>2]=0;p=1;j=0}else p=0}else{p=1;j=0}do if(n){m=c[n+12>>2]|0;if((m|0)==(c[n+16>>2]|0))m=Qc[c[(c[n>>2]|0)+36>>2]&255](n)|0;else m=ZK(c[m>>2]|0)|0;if(!(oL(m,YK()|0)|0))if(p^(k|0)==0){q=k;n=k;break}else break b;else{c[d>>2]=0;k=0;x=43;break}}else x=43;while(0);if((x|0)==43){x=0;if(p)break b;else{q=k;n=0}}m=j+12|0;k=c[m>>2]|0;p=j+16|0;if((k|0)==(c[p>>2]|0))k=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else k=ZK(c[k>>2]|0)|0;if(!(Tc[c[(c[u>>2]|0)+12>>2]&127](u,8192,k)|0))break b;k=c[m>>2]|0;if((k|0)==(c[p>>2]|0)){Qc[c[(c[j>>2]|0)+40>>2]&255](j)|0;k=q;continue}else{c[m>>2]=k+4;ZK(c[k>>2]|0)|0;k=q;continue}}}else if((x|0)==56){x=0;h=h+4|0;k=c[m>>2]|0;if((k|0)==(c[n>>2]|0)){Qc[c[(c[j>>2]|0)+40>>2]&255](j)|0;break}else{c[m>>2]=k+4;ZK(c[k>>2]|0)|0;break}}while(0);j=c[f>>2]|0}if((x|0)==60)c[f>>2]=4;if(j){h=c[j+12>>2]|0;if((h|0)==(c[j+16>>2]|0))h=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else h=ZK(c[h>>2]|0)|0;if(oL(h,YK()|0)|0){c[b>>2]=0;j=0;m=1}else m=0}else{j=0;m=1}h=c[d>>2]|0;do if(h){k=c[h+12>>2]|0;if((k|0)==(c[h+16>>2]|0))h=Qc[c[(c[h>>2]|0)+36>>2]&255](h)|0;else h=ZK(c[k>>2]|0)|0;if(!(oL(h,YK()|0)|0))if(m)break;else{x=75;break}else{c[d>>2]=0;x=73;break}}else x=73;while(0);if((x|0)==73?m:0)x=75;if((x|0)==75)c[f>>2]=c[f>>2]|2;l=y;return j|0}function MO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a+-1|0)>>>0<31&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function NO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<24&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function OO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a+-1|0)>>>0<12&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function PO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,3)|0;d=c[f>>2]|0;if((a|0)<366&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function QO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<13&(d&4|0)==0)c[b>>2]=a+-1;else c[f>>2]=d|4;l=h;return}function RO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<60&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function SO(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;a:while(1){a=c[b>>2]|0;do if(a){g=c[a+12>>2]|0;if((g|0)==(c[a+16>>2]|0))a=Qc[c[(c[a>>2]|0)+36>>2]&255](a)|0;else a=ZK(c[g>>2]|0)|0;if(oL(a,YK()|0)|0){c[b>>2]=0;h=1;break}else{h=(c[b>>2]|0)==0;break}}else h=1;while(0);g=c[d>>2]|0;do if(g){a=c[g+12>>2]|0;if((a|0)==(c[g+16>>2]|0))a=Qc[c[(c[g>>2]|0)+36>>2]&255](g)|0;else a=ZK(c[a>>2]|0)|0;if(!(oL(a,YK()|0)|0))if(h){h=g;break}else{h=g;break a}else{c[d>>2]=0;i=15;break}}else i=15;while(0);if((i|0)==15){i=0;if(h){h=0;break}else h=0}a=c[b>>2]|0;g=c[a+12>>2]|0;if((g|0)==(c[a+16>>2]|0))a=Qc[c[(c[a>>2]|0)+36>>2]&255](a)|0;else a=ZK(c[g>>2]|0)|0;if(!(Tc[c[(c[f>>2]|0)+12>>2]&127](f,8192,a)|0))break;a=c[b>>2]|0;g=a+12|0;h=c[g>>2]|0;if((h|0)==(c[a+16>>2]|0)){Qc[c[(c[a>>2]|0)+40>>2]&255](a)|0;continue}else{c[g>>2]=h+4;ZK(c[h>>2]|0)|0;continue}}a=c[b>>2]|0;do if(a){g=c[a+12>>2]|0;if((g|0)==(c[a+16>>2]|0))a=Qc[c[(c[a>>2]|0)+36>>2]&255](a)|0;else a=ZK(c[g>>2]|0)|0;if(oL(a,YK()|0)|0){c[b>>2]=0;g=1;break}else{g=(c[b>>2]|0)==0;break}}else g=1;while(0);do if(h){a=c[h+12>>2]|0;if((a|0)==(c[h+16>>2]|0))a=Qc[c[(c[h>>2]|0)+36>>2]&255](h)|0;else a=ZK(c[a>>2]|0)|0;if(!(oL(a,YK()|0)|0))if(g)break;else{i=39;break}else{c[d>>2]=0;i=37;break}}else i=37;while(0);if((i|0)==37?g:0)i=39;if((i|0)==39)c[e>>2]=c[e>>2]|2;return}function TO(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0;n=l;l=l+16|0;k=n+4|0;m=n;j=b+8|0;j=Qc[c[(c[j>>2]|0)+8>>2]&255](j)|0;b=a[j+8+3>>0]|0;if(b<<24>>24<0)i=c[j+4>>2]|0;else i=b&255;b=a[j+20+3>>0]|0;if(b<<24>>24<0)b=c[j+16>>2]|0;else b=b&255;do if((i|0)!=(0-b|0)){c[m>>2]=c[f>>2];c[k>>2]=c[m>>2];b=(bN(e,k,j,j+24|0,h,g,0)|0)-j|0;i=c[d>>2]|0;if((i|0)==12&(b|0)==0){c[d>>2]=0;break}if((i|0)<12&(b|0)==12)c[d>>2]=i+12}else c[g>>2]=c[g>>2]|4;while(0);l=n;return}function UO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,2)|0;d=c[f>>2]|0;if((a|0)<61&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function VO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,1)|0;d=c[f>>2]|0;if((a|0)<7&(d&4|0)==0)c[b>>2]=a;else c[f>>2]=d|4;l=h;return}function WO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,4)|0;if(!(c[f>>2]&4)){if((a|0)<69)a=a+2e3|0;else a=(a|0)<100?a+1900|0:a;c[b>>2]=a+-1900}l=h;return}function XO(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;h=l;l=l+16|0;a=h+4|0;i=h;c[i>>2]=c[e>>2];c[a>>2]=c[i>>2];a=ZO(d,a,f,g,4)|0;if(!(c[f>>2]&4))c[b>>2]=a+-1900;l=h;return}function YO(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;a=c[b>>2]|0;do if(a){g=c[a+12>>2]|0;if((g|0)==(c[a+16>>2]|0))a=Qc[c[(c[a>>2]|0)+36>>2]&255](a)|0;else a=ZK(c[g>>2]|0)|0;if(oL(a,YK()|0)|0){c[b>>2]=0;h=1;break}else{h=(c[b>>2]|0)==0;break}}else h=1;while(0);g=c[d>>2]|0;do if(g){a=c[g+12>>2]|0;if((a|0)==(c[g+16>>2]|0))a=Qc[c[(c[g>>2]|0)+36>>2]&255](g)|0;else a=ZK(c[a>>2]|0)|0;if(!(oL(a,YK()|0)|0))if(h){i=g;j=16;break}else{a=6;j=38;break}else{c[d>>2]=0;j=14;break}}else j=14;while(0);if((j|0)==14)if(h){a=6;j=38}else{i=0;j=16}a:do if((j|0)==16){a=c[b>>2]|0;g=c[a+12>>2]|0;if((g|0)==(c[a+16>>2]|0))a=Qc[c[(c[a>>2]|0)+36>>2]&255](a)|0;else a=ZK(c[g>>2]|0)|0;if((Tc[c[(c[f>>2]|0)+52>>2]&127](f,a,0)|0)<<24>>24==37){a=c[b>>2]|0;g=a+12|0;h=c[g>>2]|0;if((h|0)==(c[a+16>>2]|0))Qc[c[(c[a>>2]|0)+40>>2]&255](a)|0;else{c[g>>2]=h+4;ZK(c[h>>2]|0)|0}a=c[b>>2]|0;do if(a){g=c[a+12>>2]|0;if((g|0)==(c[a+16>>2]|0))a=Qc[c[(c[a>>2]|0)+36>>2]&255](a)|0;else a=ZK(c[g>>2]|0)|0;if(oL(a,YK()|0)|0){c[b>>2]=0;g=1;break}else{g=(c[b>>2]|0)==0;break}}else g=1;while(0);do if(i|0){a=c[i+12>>2]|0;if((a|0)==(c[i+16>>2]|0))a=Qc[c[(c[i>>2]|0)+36>>2]&255](i)|0;else a=ZK(c[a>>2]|0)|0;if(!(oL(a,YK()|0)|0))if(g)break a;else{a=2;j=38;break a}else{c[d>>2]=0;break}}while(0);if(g){a=2;j=38}}else{a=4;j=38}}while(0);if((j|0)==38)c[e>>2]=c[e>>2]|a;return}function ZO(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;g=c[a>>2]|0;do if(g){h=c[g+12>>2]|0;if((h|0)==(c[g+16>>2]|0))g=Qc[c[(c[g>>2]|0)+36>>2]&255](g)|0;else g=ZK(c[h>>2]|0)|0;if(oL(g,YK()|0)|0){c[a>>2]=0;i=1;break}else{i=(c[a>>2]|0)==0;break}}else i=1;while(0);h=c[b>>2]|0;do if(h){g=c[h+12>>2]|0;if((g|0)==(c[h+16>>2]|0))g=Qc[c[(c[h>>2]|0)+36>>2]&255](h)|0;else g=ZK(c[g>>2]|0)|0;if(!(oL(g,YK()|0)|0))if(i){p=17;break}else{p=16;break}else{c[b>>2]=0;p=14;break}}else p=14;while(0);if((p|0)==14)if(i)p=16;else{h=0;p=17}a:do if((p|0)==16){c[d>>2]=c[d>>2]|6;g=0}else if((p|0)==17){g=c[a>>2]|0;i=c[g+12>>2]|0;if((i|0)==(c[g+16>>2]|0))g=Qc[c[(c[g>>2]|0)+36>>2]&255](g)|0;else g=ZK(c[i>>2]|0)|0;if(!(Tc[c[(c[e>>2]|0)+12>>2]&127](e,2048,g)|0)){c[d>>2]=c[d>>2]|4;g=0;break}g=(Tc[c[(c[e>>2]|0)+52>>2]&127](e,g,0)|0)<<24>>24;i=c[a>>2]|0;j=i+12|0;k=c[j>>2]|0;if((k|0)==(c[i+16>>2]|0)){Qc[c[(c[i>>2]|0)+40>>2]&255](i)|0;l=h;j=h}else{c[j>>2]=k+4;ZK(c[k>>2]|0)|0;l=h;j=h}while(1){g=g+-48|0;o=f+-1|0;h=c[a>>2]|0;do if(h){i=c[h+12>>2]|0;if((i|0)==(c[h+16>>2]|0))h=Qc[c[(c[h>>2]|0)+36>>2]&255](h)|0;else h=ZK(c[i>>2]|0)|0;if(oL(h,YK()|0)|0){c[a>>2]=0;k=1;break}else{k=(c[a>>2]|0)==0;break}}else k=1;while(0);do if(j){h=c[j+12>>2]|0;if((h|0)==(c[j+16>>2]|0))h=Qc[c[(c[j>>2]|0)+36>>2]&255](j)|0;else h=ZK(c[h>>2]|0)|0;if(oL(h,YK()|0)|0){c[b>>2]=0;n=0;h=1;m=0;break}else{n=l;h=(l|0)==0;m=l;break}}else{n=l;h=1;m=0}while(0);i=c[a>>2]|0;if(!((f|0)>1&(k^h)))break;h=c[i+12>>2]|0;if((h|0)==(c[i+16>>2]|0))h=Qc[c[(c[i>>2]|0)+36>>2]&255](i)|0;else h=ZK(c[h>>2]|0)|0;if(!(Tc[c[(c[e>>2]|0)+12>>2]&127](e,2048,h)|0))break a;g=((Tc[c[(c[e>>2]|0)+52>>2]&127](e,h,0)|0)<<24>>24)+(g*10|0)|0;h=c[a>>2]|0;i=h+12|0;j=c[i>>2]|0;if((j|0)==(c[h+16>>2]|0)){Qc[c[(c[h>>2]|0)+40>>2]&255](h)|0;f=o;l=n;j=m;continue}else{c[i>>2]=j+4;ZK(c[j>>2]|0)|0;f=o;l=n;j=m;continue}}do if(i){h=c[i+12>>2]|0;if((h|0)==(c[i+16>>2]|0))h=Qc[c[(c[i>>2]|0)+36>>2]&255](i)|0;else h=ZK(c[h>>2]|0)|0;if(oL(h,YK()|0)|0){c[a>>2]=0;i=1;break}else{i=(c[a>>2]|0)==0;break}}else i=1;while(0);do if(n){h=c[n+12>>2]|0;if((h|0)==(c[n+16>>2]|0))h=Qc[c[(c[n>>2]|0)+36>>2]&255](n)|0;else h=ZK(c[h>>2]|0)|0;if(!(oL(h,YK()|0)|0))if(i)break a;else break;else{c[b>>2]=0;p=60;break}}else p=60;while(0);if((p|0)==60?!i:0)break;c[d>>2]=c[d>>2]|2}while(0);return g|0}function _O(a){a=a|0;dP(a+8|0);BL(a);return}function $O(a){a=a|0;dP(a+8|0);BL(a);cU(a);return}function aP(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0;j=l;l=l+112|0;e=j+4|0;f=j;c[f>>2]=e+100;bP(b+8|0,e,f,g,h,i);i=c[f>>2]|0;h=e;e=c[d>>2]|0;while(1){if((h|0)==(i|0))break;f=a[h>>0]|0;if(!e)e=0;else{b=e+24|0;g=c[b>>2]|0;if((g|0)==(c[e+28>>2]|0)){d=c[(c[e>>2]|0)+52>>2]|0;f=bh(f)|0;f=Sc[d&127](e,f)|0}else{c[b>>2]=g+1;a[g>>0]=f;f=bh(f)|0}d=Yg(f,Qg()|0)|0;e=d?0:e}h=h+1|0}l=j;return e|0}function bP(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;m=l;l=l+16|0;i=m;a[i>>0]=37;j=i+1|0;a[j>>0]=g;k=i+2|0;a[k>>0]=h;a[i+3>>0]=0;if(h<<24>>24){a[j>>0]=h;a[k>>0]=g}k=cP(d,c[e>>2]|0)|0;c[e>>2]=d+(tc(d|0,k|0,i|0,f|0,c[b>>2]|0)|0);l=m;return}function cP(a,b){a=a|0;b=b|0;return b-a|0}function dP(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;o=0;d=da(44)|0;e=o;o=0;do if(!(e&1)){if((b|0)!=(d|0)?(o=0,Na(353,c[a>>2]|0),e=o,o=0,e&1):0)break;return}while(0);e=Gb(0)|0;_g(e)}function eP(a){a=a|0;dP(a+8|0);BL(a);return}function fP(a){a=a|0;dP(a+8|0);BL(a);cU(a);return}function gP(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;i=l;l=l+416|0;d=i+8|0;e=i;c[e>>2]=d+400;hP(a+8|0,d,e,f,g,h);h=c[e>>2]|0;g=d;d=c[b>>2]|0;while(1){if((g|0)==(h|0))break;e=c[g>>2]|0;if(!d)d=0;else{a=d+24|0;f=c[a>>2]|0;if((f|0)==(c[d+28>>2]|0)){b=c[(c[d>>2]|0)+52>>2]|0;e=ZK(e)|0;e=Sc[b&127](d,e)|0}else{c[a>>2]=f+4;c[f>>2]=e;e=ZK(e)|0}b=oL(e,YK()|0)|0;d=b?0:d}g=g+4|0}l=i;return d|0}function hP(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,m=0;h=l;l=l+128|0;k=h+16|0;m=h+12|0;i=h;j=h+8|0;c[m>>2]=k+100;bP(a,k,m,e,f,g);g=i;c[g>>2]=0;c[g+4>>2]=0;c[j>>2]=k;g=iP(b,c[d>>2]|0)|0;e=$J(c[a>>2]|0)|0;o=0;a=pa(66,b|0,j|0,g|0,i|0)|0;g=o;o=0;if(g&1){a=Fb()|0;if(e|0?(o=0,fa(165,e|0)|0,m=o,o=0,m&1):0){m=Gb(0)|0;_g(m)}Qb(a|0)}if(e|0?(o=0,fa(165,e|0)|0,m=o,o=0,m&1):0){m=Gb(0)|0;_g(m)}if((a|0)==-1)jP(55729);else{c[d>>2]=b+(a<<2);l=h;return}}function iP(a,b){a=a|0;b=b|0;return b-a>>2|0}function jP(a){a=a|0;var b=0;b=Ab(8)|0;o=0;Xa(371,b|0,a|0);a=o;o=0;if(a&1){a=Fb()|0;Jb(b|0);Qb(a|0)}else Mb(b|0,3160,301)}function kP(a){a=a|0;BL(a);return}function lP(a){a=a|0;BL(a);cU(a);return}function mP(a){a=a|0;return 127}function nP(a){a=a|0;return 127}function oP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function pP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function qP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function rP(b,d){b=b|0;d=d|0;var e=0;d=l;l=l+16|0;e=d;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;a[b+11>>0]=1;$g(b,1,45)|0;a[e>>0]=0;ah(b+1|0,e);l=d;return}function sP(a){a=a|0;return 0}function tP(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function uP(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function vP(a){a=a|0;BL(a);return}function wP(a){a=a|0;BL(a);cU(a);return}function xP(a){a=a|0;return 127}function yP(a){a=a|0;return 127}function zP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function AP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function BP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function CP(b,d){b=b|0;d=d|0;var e=0;d=l;l=l+16|0;e=d;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;a[b+11>>0]=1;$g(b,1,45)|0;a[e>>0]=0;ah(b+1|0,e);l=d;return}function DP(a){a=a|0;return 0}function EP(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function FP(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function GP(a){a=a|0;BL(a);return}function HP(a){a=a|0;BL(a);cU(a);return}function IP(a){a=a|0;return 2147483647}function JP(a){a=a|0;return 2147483647}function KP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function LP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function MP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function NP(b,d){b=b|0;d=d|0;var e=0;d=l;l=l+16|0;e=d;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;a[b+8+3>>0]=1;EN(b,1,45)|0;c[e>>2]=0;HL(b+4|0,e);l=d;return}function OP(a){a=a|0;return 0}function PP(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function QP(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function RP(a){a=a|0;BL(a);return}function SP(a){a=a|0;BL(a);cU(a);return}function TP(a){a=a|0;return 2147483647}function UP(a){a=a|0;return 2147483647}function VP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function WP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function XP(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+(b<<2)>>2]=0;b=b+1|0}return}function YP(b,d){b=b|0;d=d|0;var e=0;d=l;l=l+16|0;e=d;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;a[b+8+3>>0]=1;EN(b,1,45)|0;c[e>>2]=0;HL(b+4|0,e);l=d;return}function ZP(a){a=a|0;return 0}function _P(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function $P(b,c){b=b|0;c=c|0;a[b>>0]=2;a[b+1>>0]=3;a[b+2>>0]=0;a[b+3>>0]=4;return}function aQ(a){a=a|0;BL(a);return}function bQ(a){a=a|0;BL(a);cU(a);return}function cQ(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;t=l;l=l+240|0;p=t+24|0;s=t;b=t+140|0;v=t+16|0;r=t+12|0;u=t+8|0;n=t+136|0;j=t+4|0;q=t+36|0;c[v>>2]=b;x=v+4|0;c[x>>2]=354;k=b+100|0;o=0;Xa(107,u|0,g|0);m=o;o=0;if(!(m&1)){o=0;m=ja(57,u|0,59880)|0;b=o;o=0;if(b&1)j=Fb()|0;else{a[n>>0]=0;c[j>>2]=c[e>>2];b=c[g+4>>2]|0;o=0;c[p>>2]=c[j>>2];b=Ha(42,d|0,p|0,f|0,u|0,b|0,h|0,n|0,m|0,v|0,r|0,k|0)|0;g=o;o=0;a:do if(g&1)y=11;else{b:do if(b){o=0;pa(c[(c[m>>2]|0)+32>>2]|0,m|0,55952,55962,p|0)|0;g=o;o=0;if(g&1)b=Fb()|0;else{k=c[r>>2]|0;f=c[v>>2]|0;b=k-f|0;if((b|0)>98){b=nI(b+2|0)|0;j=b;if(!b){o=0;La(45);o=0}else y=16}else{b=q;j=0;y=16}do if((y|0)==16){if(a[n>>0]|0){a[b>>0]=45;b=b+1|0}g=p+10|0;n=p;while(1){if(f>>>0>=k>>>0)break;m=a[f>>0]|0;k=p;while(1){if((k|0)==(g|0)){k=g;break}if((a[k>>0]|0)==m<<24>>24)break;k=k+1|0}a[b>>0]=a[55952+(k-n)>>0]|0;f=f+1|0;b=b+1|0;k=c[r>>2]|0}a[b>>0]=0;c[s>>2]=i;if((gK(q,55963,s)|0)!=1){o=0;Na(355,55967);o=0;break}if(j|0)oI(j);break b}while(0);b=Fb()|0;if(j|0)oI(j)}break a}while(0);b=c[d>>2]|0;do if(b){j=c[b+12>>2]|0;if((j|0)==(c[b+16>>2]|0)){o=0;b=fa(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;i=o;o=0;if(i&1){y=11;break a}}else b=bh(a[j>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;k=1;break}else{k=(c[d>>2]|0)==0;break}}else k=1;while(0);b=c[e>>2]|0;do if(b){j=c[b+12>>2]|0;if((j|0)==(c[b+16>>2]|0)){o=0;b=fa(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;i=o;o=0;if(i&1){y=11;break a}}else b=bh(a[j>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(k)break;else{y=46;break}else{c[e>>2]=0;y=44;break}}else y=44;while(0);if((y|0)==44?k:0)y=46;if((y|0)==46)c[h>>2]=c[h>>2]|2;j=c[d>>2]|0;WL(u);b=c[v>>2]|0;c[v>>2]=0;if(b|0?(o=0,Na(c[x>>2]|0,b|0),y=o,o=0,y&1):0){y=Gb(0)|0;_g(y)}l=t;return j|0}while(0);if((y|0)==11)b=Fb()|0;j=b}WL(u);b=c[v>>2]|0;c[v>>2]=0;if(!b)w=j;else{k=c[x>>2]|0;y=54}}else{j=Fb()|0;c[v>>2]=0;k=354;y=54}if((y|0)==54){o=0;Na(k|0,b|0);y=o;o=0;if(y&1){y=Gb(0)|0;_g(y)}else w=j}Qb(w|0);return 0}function dQ(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;u=l;l=l+144|0;m=u+24|0;b=u+32|0;w=u+16|0;q=u+8|0;t=u+4|0;n=u+28|0;j=u;c[w>>2]=b;y=w+4|0;c[y>>2]=354;k=b+100|0;o=0;Xa(107,t|0,g|0);s=o;o=0;if(!(s&1)){o=0;p=ja(57,t|0,59880)|0;s=o;o=0;if(s&1)j=Fb()|0;else{a[n>>0]=0;s=c[e>>2]|0;c[j>>2]=s;b=c[g+4>>2]|0;r=s;o=0;c[m>>2]=c[j>>2];b=Ha(42,d|0,m|0,f|0,t|0,b|0,h|0,n|0,p|0,w|0,q|0,k|0)|0;f=o;o=0;a:do if(!(f&1)){if(b){b=i+11|0;if((a[b>>0]|0)<0){f=c[i>>2]|0;a[m>>0]=0;ah(f,m);c[i+4>>2]=0}else{a[m>>0]=0;ah(i,m);a[b>>0]=0}if(a[n>>0]|0){o=0;b=ja(c[(c[p>>2]|0)+28>>2]|0,p|0,45)|0;n=o;o=0;if(n&1)break;o=0;Xa(109,i|0,b|0);n=o;o=0;if(n&1)break}o=0;g=ja(c[(c[p>>2]|0)+28>>2]|0,p|0,48)|0;p=o;o=0;if(p&1)break;j=c[q>>2]|0;k=j+-1|0;b=c[w>>2]|0;while(1){if(b>>>0>=k>>>0)break;if((a[b>>0]|0)!=g<<24>>24)break;b=b+1|0}o=0;la(104,i|0,b|0,j|0)|0;i=o;o=0;if(i&1)break}b=c[d>>2]|0;do if(b){j=c[b+12>>2]|0;if((j|0)==(c[b+16>>2]|0)){o=0;b=fa(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;i=o;o=0;if(i&1)break a}else b=bh(a[j>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;j=1;break}else{j=(c[d>>2]|0)==0;break}}else j=1;while(0);do if(s){b=c[r+12>>2]|0;if((b|0)==(c[r+16>>2]|0)){o=0;b=fa(c[(c[s>>2]|0)+36>>2]|0,r|0)|0;s=o;o=0;if(s&1)break a}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(j)break;else{x=34;break}else{c[e>>2]=0;x=32;break}}else x=32;while(0);if((x|0)==32?j:0)x=34;if((x|0)==34)c[h>>2]=c[h>>2]|2;j=c[d>>2]|0;WL(t);b=c[w>>2]|0;c[w>>2]=0;if(b|0?(o=0,Na(c[y>>2]|0,b|0),y=o,o=0,y&1):0){y=Gb(0)|0;_g(y)}l=u;return j|0}while(0);j=Fb()|0}WL(t);b=c[w>>2]|0;c[w>>2]=0;if(!b)v=j;else x=41}else{j=Fb()|0;c[w>>2]=0;x=41}if((x|0)==41){o=0;Na(c[y>>2]|0,b|0);y=o;o=0;if(y&1){y=Gb(0)|0;_g(y)}else v=j}Qb(v|0);return 0}function eQ(a){a=a|0;return} function IH(){return JH()|0}function JH(){return 1704}function KH(){return LH()|0}function LH(){return 1712}function MH(){return 1720}function NH(){return 1728}function OH(){return 1760}function PH(){return 1784}function QH(){return RH()|0}function RH(){return 3392}function SH(){return TH()|0}function TH(){return 3384}function UH(){return VH()|0}function VH(){return 3376}function WH(){return XH()|0}function XH(){return 3368}function YH(){return ZH()|0}function ZH(){return 3360}function _H(){return $H()|0}function $H(){return 3352}function aI(){return bI()|0}function bI(){return 3344}function cI(){return dI()|0}function dI(){return 3336}function eI(){return fI()|0}function fI(){return 3320}function gI(){return hI()|0}function hI(){return 3328}function iI(){return jI()|0}function jI(){return 3296}function kI(){return 3288}function lI(){return 3272}function mI(a){a=a|0;return fK(c[a+4>>2]|0)|0}function nI(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=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;x=l;l=l+16|0;o=x;do if(a>>>0<245){k=a>>>0<11?16:a+11&-8;a=k>>>3;n=c[14815]|0;d=n>>>a;if(d&3|0){b=(d&1^1)+a|0;a=59300+(b<<1<<2)|0;d=a+8|0;e=c[d>>2]|0;f=e+8|0;g=c[f>>2]|0;if((a|0)==(g|0))c[14815]=n&~(1<>2]=a;c[d>>2]=g}w=b<<3;c[e+4>>2]=w|3;w=e+w+4|0;c[w>>2]=c[w>>2]|1;w=f;l=x;return w|0}m=c[14817]|0;if(k>>>0>m>>>0){if(d|0){b=2<>>12&16;b=b>>>h;d=b>>>5&8;b=b>>>d;f=b>>>2&4;b=b>>>f;a=b>>>1&2;b=b>>>a;e=b>>>1&1;e=(d|h|f|a|e)+(b>>>e)|0;b=59300+(e<<1<<2)|0;a=b+8|0;f=c[a>>2]|0;h=f+8|0;d=c[h>>2]|0;if((b|0)==(d|0)){a=n&~(1<>2]=b;c[a>>2]=d;a=n}g=(e<<3)-k|0;c[f+4>>2]=k|3;e=f+k|0;c[e+4>>2]=g|1;c[e+g>>2]=g;if(m|0){f=c[14820]|0;b=m>>>3;d=59300+(b<<1<<2)|0;b=1<>2]|0}c[a>>2]=f;c[b+12>>2]=f;c[f+8>>2]=b;c[f+12>>2]=d}c[14817]=g;c[14820]=e;w=h;l=x;return w|0}i=c[14816]|0;if(i){d=(i&0-i)+-1|0;h=d>>>12&16;d=d>>>h;g=d>>>5&8;d=d>>>g;j=d>>>2&4;d=d>>>j;e=d>>>1&2;d=d>>>e;a=d>>>1&1;a=c[59564+((g|h|j|e|a)+(d>>>a)<<2)>>2]|0;d=(c[a+4>>2]&-8)-k|0;e=c[a+16+(((c[a+16>>2]|0)==0&1)<<2)>>2]|0;if(!e){j=a;g=d}else{do{h=(c[e+4>>2]&-8)-k|0;j=h>>>0>>0;d=j?h:d;a=j?e:a;e=c[e+16+(((c[e+16>>2]|0)==0&1)<<2)>>2]|0}while((e|0)!=0);j=a;g=d}h=j+k|0;if(j>>>0>>0){f=c[j+24>>2]|0;b=c[j+12>>2]|0;do if((b|0)==(j|0)){a=j+20|0;b=c[a>>2]|0;if(!b){a=j+16|0;b=c[a>>2]|0;if(!b){d=0;break}}while(1){d=b+20|0;e=c[d>>2]|0;if(e|0){b=e;a=d;continue}d=b+16|0;e=c[d>>2]|0;if(!e)break;else{b=e;a=d}}c[a>>2]=0;d=b}else{d=c[j+8>>2]|0;c[d+12>>2]=b;c[b+8>>2]=d;d=b}while(0);do if(f|0){b=c[j+28>>2]|0;a=59564+(b<<2)|0;if((j|0)==(c[a>>2]|0)){c[a>>2]=d;if(!d){c[14816]=i&~(1<>2]|0)!=(j|0)&1)<<2)>>2]=d;if(!d)break}c[d+24>>2]=f;b=c[j+16>>2]|0;if(b|0){c[d+16>>2]=b;c[b+24>>2]=d}b=c[j+20>>2]|0;if(b|0){c[d+20>>2]=b;c[b+24>>2]=d}}while(0);if(g>>>0<16){w=g+k|0;c[j+4>>2]=w|3;w=j+w+4|0;c[w>>2]=c[w>>2]|1}else{c[j+4>>2]=k|3;c[h+4>>2]=g|1;c[h+g>>2]=g;if(m|0){e=c[14820]|0;b=m>>>3;d=59300+(b<<1<<2)|0;b=1<>2]|0}c[a>>2]=e;c[b+12>>2]=e;c[e+8>>2]=b;c[e+12>>2]=d}c[14817]=g;c[14820]=h}w=j+8|0;l=x;return w|0}else n=k}else n=k}else n=k}else if(a>>>0<=4294967231){a=a+11|0;k=a&-8;j=c[14816]|0;if(j){e=0-k|0;a=a>>>8;if(a)if(k>>>0>16777215)i=31;else{n=(a+1048320|0)>>>16&8;v=a<>>16&4;v=v<>>16&2;i=14-(m|n|i)+(v<>>15)|0;i=k>>>(i+7|0)&1|i<<1}else i=0;d=c[59564+(i<<2)>>2]|0;a:do if(!d){d=0;a=0;v=57}else{a=0;h=k<<((i|0)==31?0:25-(i>>>1)|0);g=0;while(1){f=(c[d+4>>2]&-8)-k|0;if(f>>>0>>0)if(!f){a=d;e=0;f=d;v=61;break a}else{a=d;e=f}f=c[d+20>>2]|0;d=c[d+16+(h>>>31<<2)>>2]|0;g=(f|0)==0|(f|0)==(d|0)?g:f;f=(d|0)==0;if(f){d=g;v=57;break}else h=h<<((f^1)&1)}}while(0);if((v|0)==57){if((d|0)==0&(a|0)==0){a=2<>>12&16;n=n>>>h;g=n>>>5&8;n=n>>>g;i=n>>>2&4;n=n>>>i;m=n>>>1&2;n=n>>>m;d=n>>>1&1;a=0;d=c[59564+((g|h|i|m|d)+(n>>>d)<<2)>>2]|0}if(!d){i=a;h=e}else{f=d;v=61}}if((v|0)==61)while(1){v=0;d=(c[f+4>>2]&-8)-k|0;n=d>>>0>>0;d=n?d:e;a=n?f:a;f=c[f+16+(((c[f+16>>2]|0)==0&1)<<2)>>2]|0;if(!f){i=a;h=d;break}else{e=d;v=61}}if((i|0)!=0?h>>>0<((c[14817]|0)-k|0)>>>0:0){g=i+k|0;if(i>>>0>=g>>>0){w=0;l=x;return w|0}f=c[i+24>>2]|0;b=c[i+12>>2]|0;do if((b|0)==(i|0)){a=i+20|0;b=c[a>>2]|0;if(!b){a=i+16|0;b=c[a>>2]|0;if(!b){b=0;break}}while(1){d=b+20|0;e=c[d>>2]|0;if(e|0){b=e;a=d;continue}d=b+16|0;e=c[d>>2]|0;if(!e)break;else{b=e;a=d}}c[a>>2]=0}else{w=c[i+8>>2]|0;c[w+12>>2]=b;c[b+8>>2]=w}while(0);do if(f){a=c[i+28>>2]|0;d=59564+(a<<2)|0;if((i|0)==(c[d>>2]|0)){c[d>>2]=b;if(!b){e=j&~(1<>2]|0)!=(i|0)&1)<<2)>>2]=b;if(!b){e=j;break}}c[b+24>>2]=f;a=c[i+16>>2]|0;if(a|0){c[b+16>>2]=a;c[a+24>>2]=b}a=c[i+20>>2]|0;if(a){c[b+20>>2]=a;c[a+24>>2]=b;e=j}else e=j}else e=j;while(0);do if(h>>>0>=16){c[i+4>>2]=k|3;c[g+4>>2]=h|1;c[g+h>>2]=h;b=h>>>3;if(h>>>0<256){d=59300+(b<<1<<2)|0;a=c[14815]|0;b=1<>2]|0}c[a>>2]=g;c[b+12>>2]=g;c[g+8>>2]=b;c[g+12>>2]=d;break}b=h>>>8;if(b)if(h>>>0>16777215)b=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;b=14-(u|v|b)+(w<>>15)|0;b=h>>>(b+7|0)&1|b<<1}else b=0;d=59564+(b<<2)|0;c[g+28>>2]=b;a=g+16|0;c[a+4>>2]=0;c[a>>2]=0;a=1<>2]=g;c[g+24>>2]=d;c[g+12>>2]=g;c[g+8>>2]=g;break}a=h<<((b|0)==31?0:25-(b>>>1)|0);d=c[d>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(h|0)){v=97;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=96;break}else{a=a<<1;d=b}}if((v|0)==96){c[e>>2]=g;c[g+24>>2]=d;c[g+12>>2]=g;c[g+8>>2]=g;break}else if((v|0)==97){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=g;c[v>>2]=g;c[g+8>>2]=w;c[g+12>>2]=d;c[g+24>>2]=0;break}}else{w=h+k|0;c[i+4>>2]=w|3;w=i+w+4|0;c[w>>2]=c[w>>2]|1}while(0);w=i+8|0;l=x;return w|0}else n=k}else n=k}else n=-1;while(0);d=c[14817]|0;if(d>>>0>=n>>>0){b=d-n|0;a=c[14820]|0;if(b>>>0>15){w=a+n|0;c[14820]=w;c[14817]=b;c[w+4>>2]=b|1;c[w+b>>2]=b;c[a+4>>2]=n|3}else{c[14817]=0;c[14820]=0;c[a+4>>2]=d|3;w=a+d+4|0;c[w>>2]=c[w>>2]|1}w=a+8|0;l=x;return w|0}h=c[14818]|0;if(h>>>0>n>>>0){u=h-n|0;c[14818]=u;w=c[14821]|0;v=w+n|0;c[14821]=v;c[v+4>>2]=u|1;c[w+4>>2]=n|3;w=w+8|0;l=x;return w|0}if(!(c[14933]|0)){c[14935]=4096;c[14934]=4096;c[14936]=-1;c[14937]=-1;c[14938]=0;c[14926]=0;a=o&-16^1431655768;c[o>>2]=a;c[14933]=a;a=4096}else a=c[14935]|0;i=n+48|0;j=n+47|0;g=a+j|0;f=0-a|0;k=g&f;if(k>>>0<=n>>>0){w=0;l=x;return w|0}a=c[14925]|0;if(a|0?(m=c[14923]|0,o=m+k|0,o>>>0<=m>>>0|o>>>0>a>>>0):0){w=0;l=x;return w|0}b:do if(!(c[14926]&4)){d=c[14821]|0;c:do if(d){e=59708;while(1){a=c[e>>2]|0;if(a>>>0<=d>>>0?(r=e+4|0,(a+(c[r>>2]|0)|0)>>>0>d>>>0):0)break;a=c[e+8>>2]|0;if(!a){v=118;break c}else e=a}b=g-h&f;if(b>>>0<2147483647){a=CW(b|0)|0;if((a|0)==((c[e>>2]|0)+(c[r>>2]|0)|0)){if((a|0)!=(-1|0)){h=b;g=a;v=135;break b}}else{e=a;v=126}}else b=0}else v=118;while(0);do if((v|0)==118){d=CW(0)|0;if((d|0)!=(-1|0)?(b=d,p=c[14934]|0,q=p+-1|0,b=((q&b|0)==0?0:(q+b&0-p)-b|0)+k|0,p=c[14923]|0,q=b+p|0,b>>>0>n>>>0&b>>>0<2147483647):0){r=c[14925]|0;if(r|0?q>>>0<=p>>>0|q>>>0>r>>>0:0){b=0;break}a=CW(b|0)|0;if((a|0)==(d|0)){h=b;g=d;v=135;break b}else{e=a;v=126}}else b=0}while(0);do if((v|0)==126){d=0-b|0;if(!(i>>>0>b>>>0&(b>>>0<2147483647&(e|0)!=(-1|0))))if((e|0)==(-1|0)){b=0;break}else{h=b;g=e;v=135;break b}a=c[14935]|0;a=j-b+a&0-a;if(a>>>0>=2147483647){h=b;g=e;v=135;break b}if((CW(a|0)|0)==(-1|0)){CW(d|0)|0;b=0;break}else{h=a+b|0;g=e;v=135;break b}}while(0);c[14926]=c[14926]|4;v=133}else{b=0;v=133}while(0);if(((v|0)==133?k>>>0<2147483647:0)?(u=CW(k|0)|0,r=CW(0)|0,s=r-u|0,t=s>>>0>(n+40|0)>>>0,!((u|0)==(-1|0)|t^1|u>>>0>>0&((u|0)!=(-1|0)&(r|0)!=(-1|0))^1)):0){h=t?s:b;g=u;v=135}if((v|0)==135){b=(c[14923]|0)+h|0;c[14923]=b;if(b>>>0>(c[14924]|0)>>>0)c[14924]=b;j=c[14821]|0;do if(j){b=59708;while(1){a=c[b>>2]|0;d=b+4|0;e=c[d>>2]|0;if((g|0)==(a+e|0)){v=145;break}f=c[b+8>>2]|0;if(!f)break;else b=f}if(((v|0)==145?(c[b+12>>2]&8|0)==0:0)?j>>>0>>0&j>>>0>=a>>>0:0){c[d>>2]=e+h;w=j+8|0;w=(w&7|0)==0?0:0-w&7;v=j+w|0;w=(c[14818]|0)+(h-w)|0;c[14821]=v;c[14818]=w;c[v+4>>2]=w|1;c[v+w+4>>2]=40;c[14822]=c[14937];break}if(g>>>0<(c[14819]|0)>>>0)c[14819]=g;d=g+h|0;b=59708;while(1){if((c[b>>2]|0)==(d|0)){v=153;break}a=c[b+8>>2]|0;if(!a)break;else b=a}if((v|0)==153?(c[b+12>>2]&8|0)==0:0){c[b>>2]=g;m=b+4|0;c[m>>2]=(c[m>>2]|0)+h;m=g+8|0;m=g+((m&7|0)==0?0:0-m&7)|0;b=d+8|0;b=d+((b&7|0)==0?0:0-b&7)|0;k=m+n|0;i=b-m-n|0;c[m+4>>2]=n|3;do if((b|0)!=(j|0)){if((b|0)==(c[14820]|0)){w=(c[14817]|0)+i|0;c[14817]=w;c[14820]=k;c[k+4>>2]=w|1;c[k+w>>2]=w;break}a=c[b+4>>2]|0;if((a&3|0)==1){h=a&-8;e=a>>>3;d:do if(a>>>0<256){a=c[b+8>>2]|0;d=c[b+12>>2]|0;if((d|0)==(a|0)){c[14815]=c[14815]&~(1<>2]=d;c[d+8>>2]=a;break}}else{g=c[b+24>>2]|0;a=c[b+12>>2]|0;do if((a|0)==(b|0)){e=b+16|0;d=e+4|0;a=c[d>>2]|0;if(!a){a=c[e>>2]|0;if(!a){a=0;break}else d=e}while(1){e=a+20|0;f=c[e>>2]|0;if(f|0){a=f;d=e;continue}e=a+16|0;f=c[e>>2]|0;if(!f)break;else{a=f;d=e}}c[d>>2]=0}else{w=c[b+8>>2]|0;c[w+12>>2]=a;c[a+8>>2]=w}while(0);if(!g)break;d=c[b+28>>2]|0;e=59564+(d<<2)|0;do if((b|0)!=(c[e>>2]|0)){c[g+16+(((c[g+16>>2]|0)!=(b|0)&1)<<2)>>2]=a;if(!a)break d}else{c[e>>2]=a;if(a|0)break;c[14816]=c[14816]&~(1<>2]=g;d=b+16|0;e=c[d>>2]|0;if(e|0){c[a+16>>2]=e;c[e+24>>2]=a}d=c[d+4>>2]|0;if(!d)break;c[a+20>>2]=d;c[d+24>>2]=a}while(0);b=b+h|0;f=h+i|0}else f=i;b=b+4|0;c[b>>2]=c[b>>2]&-2;c[k+4>>2]=f|1;c[k+f>>2]=f;b=f>>>3;if(f>>>0<256){d=59300+(b<<1<<2)|0;a=c[14815]|0;b=1<>2]|0}c[a>>2]=k;c[b+12>>2]=k;c[k+8>>2]=b;c[k+12>>2]=d;break}b=f>>>8;do if(!b)b=0;else{if(f>>>0>16777215){b=31;break}v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;b=14-(u|v|b)+(w<>>15)|0;b=f>>>(b+7|0)&1|b<<1}while(0);e=59564+(b<<2)|0;c[k+28>>2]=b;a=k+16|0;c[a+4>>2]=0;c[a>>2]=0;a=c[14816]|0;d=1<>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}a=f<<((b|0)==31?0:25-(b>>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(f|0)){v=194;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=193;break}else{a=a<<1;d=b}}if((v|0)==193){c[e>>2]=k;c[k+24>>2]=d;c[k+12>>2]=k;c[k+8>>2]=k;break}else if((v|0)==194){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=k;c[v>>2]=k;c[k+8>>2]=w;c[k+12>>2]=d;c[k+24>>2]=0;break}}else{w=(c[14818]|0)+i|0;c[14818]=w;c[14821]=k;c[k+4>>2]=w|1}while(0);w=m+8|0;l=x;return w|0}b=59708;while(1){a=c[b>>2]|0;if(a>>>0<=j>>>0?(w=a+(c[b+4>>2]|0)|0,w>>>0>j>>>0):0)break;b=c[b+8>>2]|0}f=w+-47|0;a=f+8|0;a=f+((a&7|0)==0?0:0-a&7)|0;f=j+16|0;a=a>>>0>>0?j:a;b=a+8|0;d=g+8|0;d=(d&7|0)==0?0:0-d&7;v=g+d|0;d=h+-40-d|0;c[14821]=v;c[14818]=d;c[v+4>>2]=d|1;c[v+d+4>>2]=40;c[14822]=c[14937];d=a+4|0;c[d>>2]=27;c[b>>2]=c[14927];c[b+4>>2]=c[14928];c[b+8>>2]=c[14929];c[b+12>>2]=c[14930];c[14927]=g;c[14928]=h;c[14930]=0;c[14929]=b;b=a+24|0;do{v=b;b=b+4|0;c[b>>2]=7}while((v+8|0)>>>0>>0);if((a|0)!=(j|0)){g=a-j|0;c[d>>2]=c[d>>2]&-2;c[j+4>>2]=g|1;c[a>>2]=g;b=g>>>3;if(g>>>0<256){d=59300+(b<<1<<2)|0;a=c[14815]|0;b=1<>2]|0}c[a>>2]=j;c[b+12>>2]=j;c[j+8>>2]=b;c[j+12>>2]=d;break}b=g>>>8;if(b)if(g>>>0>16777215)d=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;d=14-(u|v|d)+(w<>>15)|0;d=g>>>(d+7|0)&1|d<<1}else d=0;e=59564+(d<<2)|0;c[j+28>>2]=d;c[j+20>>2]=0;c[f>>2]=0;b=c[14816]|0;a=1<>2]=j;c[j+24>>2]=e;c[j+12>>2]=j;c[j+8>>2]=j;break}a=g<<((d|0)==31?0:25-(d>>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(g|0)){v=216;break}e=d+16+(a>>>31<<2)|0;b=c[e>>2]|0;if(!b){v=215;break}else{a=a<<1;d=b}}if((v|0)==215){c[e>>2]=j;c[j+24>>2]=d;c[j+12>>2]=j;c[j+8>>2]=j;break}else if((v|0)==216){v=d+8|0;w=c[v>>2]|0;c[w+12>>2]=j;c[v>>2]=j;c[j+8>>2]=w;c[j+12>>2]=d;c[j+24>>2]=0;break}}}else{w=c[14819]|0;if((w|0)==0|g>>>0>>0)c[14819]=g;c[14927]=g;c[14928]=h;c[14930]=0;c[14824]=c[14933];c[14823]=-1;b=0;do{w=59300+(b<<1<<2)|0;c[w+12>>2]=w;c[w+8>>2]=w;b=b+1|0}while((b|0)!=32);w=g+8|0;w=(w&7|0)==0?0:0-w&7;v=g+w|0;w=h+-40-w|0;c[14821]=v;c[14818]=w;c[v+4>>2]=w|1;c[v+w+4>>2]=40;c[14822]=c[14937]}while(0);b=c[14818]|0;if(b>>>0>n>>>0){u=b-n|0;c[14818]=u;w=c[14821]|0;v=w+n|0;c[14821]=v;c[v+4>>2]=u|1;c[w+4>>2]=n|3;w=w+8|0;l=x;return w|0}}c[(xI()|0)>>2]=12;w=0;l=x;return w|0}function oI(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if(!a)return;d=a+-8|0;f=c[14819]|0;a=c[a+-4>>2]|0;b=a&-8;j=d+b|0;do if(!(a&1)){e=c[d>>2]|0;if(!(a&3))return;h=d+(0-e)|0;g=e+b|0;if(h>>>0>>0)return;if((h|0)==(c[14820]|0)){a=j+4|0;b=c[a>>2]|0;if((b&3|0)!=3){i=h;b=g;break}c[14817]=g;c[a>>2]=b&-2;c[h+4>>2]=g|1;c[h+g>>2]=g;return}d=e>>>3;if(e>>>0<256){a=c[h+8>>2]|0;b=c[h+12>>2]|0;if((b|0)==(a|0)){c[14815]=c[14815]&~(1<>2]=b;c[b+8>>2]=a;i=h;b=g;break}}f=c[h+24>>2]|0;a=c[h+12>>2]|0;do if((a|0)==(h|0)){d=h+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){a=0;break}else b=d}while(1){d=a+20|0;e=c[d>>2]|0;if(e|0){a=e;b=d;continue}d=a+16|0;e=c[d>>2]|0;if(!e)break;else{a=e;b=d}}c[b>>2]=0}else{i=c[h+8>>2]|0;c[i+12>>2]=a;c[a+8>>2]=i}while(0);if(f){b=c[h+28>>2]|0;d=59564+(b<<2)|0;if((h|0)==(c[d>>2]|0)){c[d>>2]=a;if(!a){c[14816]=c[14816]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=a;if(!a){i=h;b=g;break}}c[a+24>>2]=f;b=h+16|0;d=c[b>>2]|0;if(d|0){c[a+16>>2]=d;c[d+24>>2]=a}b=c[b+4>>2]|0;if(b){c[a+20>>2]=b;c[b+24>>2]=a;i=h;b=g}else{i=h;b=g}}else{i=h;b=g}}else{i=d;h=d}while(0);if(h>>>0>=j>>>0)return;a=j+4|0;e=c[a>>2]|0;if(!(e&1))return;if(!(e&2)){a=c[14820]|0;if((j|0)==(c[14821]|0)){j=(c[14818]|0)+b|0;c[14818]=j;c[14821]=i;c[i+4>>2]=j|1;if((i|0)!=(a|0))return;c[14820]=0;c[14817]=0;return}if((j|0)==(a|0)){j=(c[14817]|0)+b|0;c[14817]=j;c[14820]=h;c[i+4>>2]=j|1;c[h+j>>2]=j;return}f=(e&-8)+b|0;d=e>>>3;do if(e>>>0<256){b=c[j+8>>2]|0;a=c[j+12>>2]|0;if((a|0)==(b|0)){c[14815]=c[14815]&~(1<>2]=a;c[a+8>>2]=b;break}}else{g=c[j+24>>2]|0;a=c[j+12>>2]|0;do if((a|0)==(j|0)){d=j+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){d=0;break}else b=d}while(1){d=a+20|0;e=c[d>>2]|0;if(e|0){a=e;b=d;continue}d=a+16|0;e=c[d>>2]|0;if(!e)break;else{a=e;b=d}}c[b>>2]=0;d=a}else{d=c[j+8>>2]|0;c[d+12>>2]=a;c[a+8>>2]=d;d=a}while(0);if(g|0){a=c[j+28>>2]|0;b=59564+(a<<2)|0;if((j|0)==(c[b>>2]|0)){c[b>>2]=d;if(!d){c[14816]=c[14816]&~(1<>2]|0)!=(j|0)&1)<<2)>>2]=d;if(!d)break}c[d+24>>2]=g;a=j+16|0;b=c[a>>2]|0;if(b|0){c[d+16>>2]=b;c[b+24>>2]=d}a=c[a+4>>2]|0;if(a|0){c[d+20>>2]=a;c[a+24>>2]=d}}}while(0);c[i+4>>2]=f|1;c[h+f>>2]=f;if((i|0)==(c[14820]|0)){c[14817]=f;return}}else{c[a>>2]=e&-2;c[i+4>>2]=b|1;c[h+b>>2]=b;f=b}a=f>>>3;if(f>>>0<256){d=59300+(a<<1<<2)|0;b=c[14815]|0;a=1<>2]|0}c[b>>2]=i;c[a+12>>2]=i;c[i+8>>2]=a;c[i+12>>2]=d;return}a=f>>>8;if(a)if(f>>>0>16777215)a=31;else{h=(a+1048320|0)>>>16&8;j=a<>>16&4;j=j<>>16&2;a=14-(g|h|a)+(j<>>15)|0;a=f>>>(a+7|0)&1|a<<1}else a=0;e=59564+(a<<2)|0;c[i+28>>2]=a;c[i+20>>2]=0;c[i+16>>2]=0;b=c[14816]|0;d=1<>>1)|0);d=c[e>>2]|0;while(1){if((c[d+4>>2]&-8|0)==(f|0)){a=73;break}e=d+16+(b>>>31<<2)|0;a=c[e>>2]|0;if(!a){a=72;break}else{b=b<<1;d=a}}if((a|0)==72){c[e>>2]=i;c[i+24>>2]=d;c[i+12>>2]=i;c[i+8>>2]=i;break}else if((a|0)==73){h=d+8|0;j=c[h>>2]|0;c[j+12>>2]=i;c[h>>2]=i;c[i+8>>2]=j;c[i+12>>2]=d;c[i+24>>2]=0;break}}else{c[14816]=b|d;c[e>>2]=i;c[i+24>>2]=e;c[i+12>>2]=i;c[i+8>>2]=i}while(0);j=(c[14823]|0)+-1|0;c[14823]=j;if(!j)a=59716;else return;while(1){a=c[a>>2]|0;if(!a)break;else a=a+8|0}c[14823]=-1;return}function pI(a,b){a=a|0;b=b|0;var d=0,e=0;if(!a){b=nI(b)|0;return b|0}if(b>>>0>4294967231){c[(xI()|0)>>2]=12;b=0;return b|0}d=qI(a+-8|0,b>>>0<11?16:b+11&-8)|0;if(d|0){b=d+8|0;return b|0}d=nI(b)|0;if(!d){b=0;return b|0}e=c[a+-4>>2]|0;e=(e&-8)-((e&3|0)==0?8:4)|0;wW(d|0,a|0,(e>>>0>>0?e:b)|0)|0;oI(a);b=d;return b|0}function qI(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;m=a+4|0;l=c[m>>2]|0;d=l&-8;i=a+d|0;if(!(l&3)){if(b>>>0<256){a=0;return a|0}if(d>>>0>=(b+4|0)>>>0?(d-b|0)>>>0<=c[14935]<<1>>>0:0)return a|0;a=0;return a|0}if(d>>>0>=b>>>0){d=d-b|0;if(d>>>0<=15)return a|0;k=a+b|0;c[m>>2]=l&1|b|2;c[k+4>>2]=d|3;m=k+d+4|0;c[m>>2]=c[m>>2]|1;rI(k,d);return a|0}if((i|0)==(c[14821]|0)){k=(c[14818]|0)+d|0;d=k-b|0;e=a+b|0;if(k>>>0<=b>>>0){a=0;return a|0}c[m>>2]=l&1|b|2;c[e+4>>2]=d|1;c[14821]=e;c[14818]=d;return a|0}if((i|0)==(c[14820]|0)){f=(c[14817]|0)+d|0;if(f>>>0>>0){a=0;return a|0}d=f-b|0;e=l&1;if(d>>>0>15){l=a+b|0;k=l+d|0;c[m>>2]=e|b|2;c[l+4>>2]=d|1;c[k>>2]=d;e=k+4|0;c[e>>2]=c[e>>2]&-2;e=l}else{c[m>>2]=e|f|2;e=a+f+4|0;c[e>>2]=c[e>>2]|1;e=0;d=0}c[14817]=d;c[14820]=e;return a|0}e=c[i+4>>2]|0;if(e&2|0){a=0;return a|0}j=(e&-8)+d|0;if(j>>>0>>0){a=0;return a|0}k=j-b|0;f=e>>>3;do if(e>>>0<256){e=c[i+8>>2]|0;d=c[i+12>>2]|0;if((d|0)==(e|0)){c[14815]=c[14815]&~(1<>2]=d;c[d+8>>2]=e;break}}else{h=c[i+24>>2]|0;d=c[i+12>>2]|0;do if((d|0)==(i|0)){f=i+16|0;e=f+4|0;d=c[e>>2]|0;if(!d){d=c[f>>2]|0;if(!d){f=0;break}else g=f}else g=e;while(1){f=d+20|0;e=c[f>>2]|0;if(e|0){d=e;g=f;continue}e=d+16|0;f=c[e>>2]|0;if(!f)break;else{d=f;g=e}}c[g>>2]=0;f=d}else{f=c[i+8>>2]|0;c[f+12>>2]=d;c[d+8>>2]=f;f=d}while(0);if(h|0){d=c[i+28>>2]|0;e=59564+(d<<2)|0;if((i|0)==(c[e>>2]|0)){c[e>>2]=f;if(!f){c[14816]=c[14816]&~(1<>2]|0)!=(i|0)&1)<<2)>>2]=f;if(!f)break}c[f+24>>2]=h;d=i+16|0;e=c[d>>2]|0;if(e|0){c[f+16>>2]=e;c[e+24>>2]=f}d=c[d+4>>2]|0;if(d|0){c[f+20>>2]=d;c[d+24>>2]=f}}}while(0);d=l&1;if(k>>>0<16){c[m>>2]=j|d|2;m=a+j+4|0;c[m>>2]=c[m>>2]|1;return a|0}else{l=a+b|0;c[m>>2]=d|b|2;c[l+4>>2]=k|3;m=l+k+4|0;c[m>>2]=c[m>>2]|1;rI(l,k);return a|0}return 0}function rI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=a+b|0;d=c[a+4>>2]|0;do if(!(d&1)){e=c[a>>2]|0;if(!(d&3))return;g=a+(0-e)|0;h=e+b|0;if((g|0)==(c[14820]|0)){a=j+4|0;d=c[a>>2]|0;if((d&3|0)!=3){i=g;d=h;break}c[14817]=h;c[a>>2]=d&-2;c[g+4>>2]=h|1;c[g+h>>2]=h;return}b=e>>>3;if(e>>>0<256){a=c[g+8>>2]|0;d=c[g+12>>2]|0;if((d|0)==(a|0)){c[14815]=c[14815]&~(1<>2]=d;c[d+8>>2]=a;i=g;d=h;break}}f=c[g+24>>2]|0;a=c[g+12>>2]|0;do if((a|0)==(g|0)){b=g+16|0;d=b+4|0;a=c[d>>2]|0;if(!a){a=c[b>>2]|0;if(!a){a=0;break}else d=b}while(1){b=a+20|0;e=c[b>>2]|0;if(e|0){a=e;d=b;continue}b=a+16|0;e=c[b>>2]|0;if(!e)break;else{a=e;d=b}}c[d>>2]=0}else{i=c[g+8>>2]|0;c[i+12>>2]=a;c[a+8>>2]=i}while(0);if(f){d=c[g+28>>2]|0;b=59564+(d<<2)|0;if((g|0)==(c[b>>2]|0)){c[b>>2]=a;if(!a){c[14816]=c[14816]&~(1<>2]|0)!=(g|0)&1)<<2)>>2]=a;if(!a){i=g;d=h;break}}c[a+24>>2]=f;d=g+16|0;b=c[d>>2]|0;if(b|0){c[a+16>>2]=b;c[b+24>>2]=a}d=c[d+4>>2]|0;if(d){c[a+20>>2]=d;c[d+24>>2]=a;i=g;d=h}else{i=g;d=h}}else{i=g;d=h}}else{i=a;d=b}while(0);a=j+4|0;e=c[a>>2]|0;if(!(e&2)){a=c[14820]|0;if((j|0)==(c[14821]|0)){j=(c[14818]|0)+d|0;c[14818]=j;c[14821]=i;c[i+4>>2]=j|1;if((i|0)!=(a|0))return;c[14820]=0;c[14817]=0;return}if((j|0)==(a|0)){j=(c[14817]|0)+d|0;c[14817]=j;c[14820]=i;c[i+4>>2]=j|1;c[i+j>>2]=j;return}g=(e&-8)+d|0;b=e>>>3;do if(e>>>0<256){d=c[j+8>>2]|0;a=c[j+12>>2]|0;if((a|0)==(d|0)){c[14815]=c[14815]&~(1<>2]=a;c[a+8>>2]=d;break}}else{f=c[j+24>>2]|0;a=c[j+12>>2]|0;do if((a|0)==(j|0)){b=j+16|0;d=b+4|0;a=c[d>>2]|0;if(!a){a=c[b>>2]|0;if(!a){b=0;break}else d=b}while(1){b=a+20|0;e=c[b>>2]|0;if(e|0){a=e;d=b;continue}b=a+16|0;e=c[b>>2]|0;if(!e)break;else{a=e;d=b}}c[d>>2]=0;b=a}else{b=c[j+8>>2]|0;c[b+12>>2]=a;c[a+8>>2]=b;b=a}while(0);if(f|0){a=c[j+28>>2]|0;d=59564+(a<<2)|0;if((j|0)==(c[d>>2]|0)){c[d>>2]=b;if(!b){c[14816]=c[14816]&~(1<>2]|0)!=(j|0)&1)<<2)>>2]=b;if(!b)break}c[b+24>>2]=f;a=j+16|0;d=c[a>>2]|0;if(d|0){c[b+16>>2]=d;c[d+24>>2]=b}a=c[a+4>>2]|0;if(a|0){c[b+20>>2]=a;c[a+24>>2]=b}}}while(0);c[i+4>>2]=g|1;c[i+g>>2]=g;if((i|0)==(c[14820]|0)){c[14817]=g;return}else d=g}else{c[a>>2]=e&-2;c[i+4>>2]=d|1;c[i+d>>2]=d}a=d>>>3;if(d>>>0<256){b=59300+(a<<1<<2)|0;d=c[14815]|0;a=1<>2]|0}c[d>>2]=i;c[a+12>>2]=i;c[i+8>>2]=a;c[i+12>>2]=b;return}a=d>>>8;if(a)if(d>>>0>16777215)a=31;else{h=(a+1048320|0)>>>16&8;j=a<>>16&4;j=j<>>16&2;a=14-(g|h|a)+(j<>>15)|0;a=d>>>(a+7|0)&1|a<<1}else a=0;f=59564+(a<<2)|0;c[i+28>>2]=a;c[i+20>>2]=0;c[i+16>>2]=0;b=c[14816]|0;e=1<>2]=i;c[i+24>>2]=f;c[i+12>>2]=i;c[i+8>>2]=i;return}b=d<<((a|0)==31?0:25-(a>>>1)|0);e=c[f>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(d|0)){a=69;break}f=e+16+(b>>>31<<2)|0;a=c[f>>2]|0;if(!a){a=68;break}else{b=b<<1;e=a}}if((a|0)==68){c[f>>2]=i;c[i+24>>2]=e;c[i+12>>2]=i;c[i+8>>2]=i;return}else if((a|0)==69){h=e+8|0;j=c[h>>2]|0;c[j+12>>2]=i;c[h>>2]=i;c[i+8>>2]=j;c[i+12>>2]=e;c[i+24>>2]=0;return}}function sI(){return 59756}function tI(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=AI(c[a+60>>2]|0)|0;a=wI(Ub(6,d|0)|0)|0;l=b;return a|0}function uI(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,m=0,n=0,o=0,p=0;n=l;l=l+48|0;k=n+16|0;g=n;f=n+32|0;i=a+28|0;e=c[i>>2]|0;c[f>>2]=e;j=a+20|0;e=(c[j>>2]|0)-e|0;c[f+4>>2]=e;c[f+8>>2]=b;c[f+12>>2]=d;e=e+d|0;h=a+60|0;c[g>>2]=c[h>>2];c[g+4>>2]=f;c[g+8>>2]=2;g=wI(Tb(146,g|0)|0)|0;a:do if((e|0)!=(g|0)){b=2;while(1){if((g|0)<0)break;e=e-g|0;p=c[f+4>>2]|0;o=g>>>0>p>>>0;f=o?f+8|0:f;b=(o<<31>>31)+b|0;p=g-(o?p:0)|0;c[f>>2]=(c[f>>2]|0)+p;o=f+4|0;c[o>>2]=(c[o>>2]|0)-p;c[k>>2]=c[h>>2];c[k+4>>2]=f;c[k+8>>2]=b;g=wI(Tb(146,k|0)|0)|0;if((e|0)==(g|0)){m=3;break a}}c[a+16>>2]=0;c[i>>2]=0;c[j>>2]=0;c[a>>2]=c[a>>2]|32;if((b|0)==2)d=0;else d=d-(c[f+4>>2]|0)|0}else m=3;while(0);if((m|0)==3){p=c[a+44>>2]|0;c[a+16>>2]=p+(c[a+48>>2]|0);c[i>>2]=p;c[j>>2]=p}l=n;return d|0}function vI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+32|0;g=f;e=f+20|0;c[g>>2]=c[a+60>>2];c[g+4>>2]=0;c[g+8>>2]=b;c[g+12>>2]=e;c[g+16>>2]=d;if((wI(Sb(140,g|0)|0)|0)<0){c[e>>2]=-1;a=-1}else a=c[e>>2]|0;l=f;return a|0}function wI(a){a=a|0;if(a>>>0>4294963200){c[(xI()|0)>>2]=0-a;a=-1}return a|0}function xI(){return (yI()|0)+64|0}function yI(){return zI()|0}function zI(){return 34344}function AI(a){a=a|0;return a|0}function BI(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=CI(a,b,c)|0;return d|0}function CI(a,b,c){a=a|0;b=b|0;c=c|0;c=DI(a,b,c,-1,-1)|0;return c|0}function DI(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;j=l;l=l+128|0;h=j;c[h>>2]=0;i=h+4|0;c[i>>2]=a;c[h+44>>2]=a;g=h+8|0;c[g>>2]=(a|0)<0?-1:a+2147483647|0;c[h+76>>2]=-1;EI(h,0);d=FI(h,d,1,e,f)|0;if(b|0)c[b>>2]=a+((c[i>>2]|0)+(c[h+108>>2]|0)-(c[g>>2]|0));l=j;return d|0}function EI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a+104>>2]=b;d=c[a+8>>2]|0;e=c[a+4>>2]|0;f=d-e|0;c[a+108>>2]=f;c[a+100>>2]=(b|0)!=0&(f|0)>(b|0)?e+b|0:d;return}function FI(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;a:do if(e>>>0>36){c[(xI()|0)>>2]=22;h=0;g=0}else{r=b+4|0;q=b+100|0;do{i=c[r>>2]|0;if(i>>>0<(c[q>>2]|0)>>>0){c[r>>2]=i+1;i=d[i>>0]|0}else i=GI(b)|0}while((HI(i)|0)!=0);b:do switch(i|0){case 43:case 45:{i=((i|0)==45)<<31>>31;j=c[r>>2]|0;if(j>>>0<(c[q>>2]|0)>>>0){c[r>>2]=j+1;p=i;i=d[j>>0]|0;break b}else{p=i;i=GI(b)|0;break b}}default:p=0}while(0);j=(e|0)==0;do if((e|16|0)==16&(i|0)==48){i=c[r>>2]|0;if(i>>>0<(c[q>>2]|0)>>>0){c[r>>2]=i+1;i=d[i>>0]|0}else i=GI(b)|0;if((i|32|0)!=120)if(j){e=8;n=46;break}else{n=32;break}i=c[r>>2]|0;if(i>>>0<(c[q>>2]|0)>>>0){c[r>>2]=i+1;i=d[i>>0]|0}else i=GI(b)|0;if((d[51481+i>>0]|0)>15){g=(c[q>>2]|0)!=0;if(g)c[r>>2]=(c[r>>2]|0)+-1;if(!f){EI(b,0);h=0;g=0;break a}if(!g){h=0;g=0;break a}c[r>>2]=(c[r>>2]|0)+-1;h=0;g=0;break a}else{e=16;n=46}}else{e=j?10:e;if((d[51481+i>>0]|0)>>>0>>0)n=32;else{if(c[q>>2]|0)c[r>>2]=(c[r>>2]|0)+-1;EI(b,0);c[(xI()|0)>>2]=22;h=0;g=0;break a}}while(0);c:do if((n|0)==32)if((e|0)==10){e=i+-48|0;if(e>>>0<10){i=0;j=e;do{i=(i*10|0)+j|0;e=c[r>>2]|0;if(e>>>0<(c[q>>2]|0)>>>0){c[r>>2]=e+1;e=d[e>>0]|0}else e=GI(b)|0;j=e+-48|0}while(j>>>0<10&i>>>0<429496729);f=0}else{e=i;i=0;f=0}k=e+-48|0;if(k>>>0<10){j=e;do{e=lW(i|0,f|0,10,0)|0;l=z;m=((k|0)<0)<<31>>31;o=~m;if(l>>>0>o>>>0|(l|0)==(o|0)&e>>>0>~k>>>0){e=10;n=72;break c}i=mW(e|0,l|0,k|0,m|0)|0;f=z;e=c[r>>2]|0;if(e>>>0<(c[q>>2]|0)>>>0){c[r>>2]=e+1;j=d[e>>0]|0}else j=GI(b)|0;k=j+-48|0}while(k>>>0<10&(f>>>0<429496729|(f|0)==429496729&i>>>0<2576980378));if(k>>>0>9){j=p;e=f}else{e=10;n=72}}else{j=p;e=f}}else n=46;while(0);d:do if((n|0)==46){if(!(e+-1&e)){n=a[51737+((e*23|0)>>>5&7)>>0]|0;f=a[51481+i>>0]|0;j=f&255;if(j>>>0>>0){i=0;k=j;do{i=k|i<>2]|0;if(j>>>0<(c[q>>2]|0)>>>0){c[r>>2]=j+1;j=d[j>>0]|0}else j=GI(b)|0;f=a[51481+j>>0]|0;k=f&255}while(i>>>0<134217728&k>>>0>>0);k=0}else{j=i;k=0;i=0}l=tW(-1,-1,n|0)|0;m=z;if((f&255)>>>0>=e>>>0|(k>>>0>m>>>0|(k|0)==(m|0)&i>>>0>l>>>0)){f=k;n=72;break}else j=k;while(1){i=uW(i|0,j|0,n|0)|0;k=z;i=f&255|i;j=c[r>>2]|0;if(j>>>0<(c[q>>2]|0)>>>0){c[r>>2]=j+1;j=d[j>>0]|0}else j=GI(b)|0;f=a[51481+j>>0]|0;if((f&255)>>>0>=e>>>0|(k>>>0>m>>>0|(k|0)==(m|0)&i>>>0>l>>>0)){f=k;n=72;break d}else j=k}}f=a[51481+i>>0]|0;j=f&255;if(j>>>0>>0){i=0;k=j;do{i=k+(O(i,e)|0)|0;j=c[r>>2]|0;if(j>>>0<(c[q>>2]|0)>>>0){c[r>>2]=j+1;j=d[j>>0]|0}else j=GI(b)|0;f=a[51481+j>>0]|0;k=f&255}while(i>>>0<119304647&k>>>0>>0);k=0}else{j=i;i=0;k=0}if((f&255)>>>0>>0){n=qW(-1,-1,e|0,0)|0;o=z;m=k;while(1){if(m>>>0>o>>>0|(m|0)==(o|0)&i>>>0>n>>>0){f=m;n=72;break d}k=lW(i|0,m|0,e|0,0)|0;l=z;f=f&255;if(l>>>0>4294967295|(l|0)==-1&k>>>0>~f>>>0){f=m;n=72;break d}i=mW(f|0,0,k|0,l|0)|0;k=z;j=c[r>>2]|0;if(j>>>0<(c[q>>2]|0)>>>0){c[r>>2]=j+1;j=d[j>>0]|0}else j=GI(b)|0;f=a[51481+j>>0]|0;if((f&255)>>>0>=e>>>0){f=k;n=72;break}else m=k}}else{f=k;n=72}}while(0);if((n|0)==72)if((d[51481+j>>0]|0)>>>0>>0){do{i=c[r>>2]|0;if(i>>>0<(c[q>>2]|0)>>>0){c[r>>2]=i+1;i=d[i>>0]|0}else i=GI(b)|0}while((d[51481+i>>0]|0)>>>0>>0);c[(xI()|0)>>2]=34;j=(g&1|0)==0&0==0?p:0;e=h;i=g}else{j=p;e=f}if(c[q>>2]|0)c[r>>2]=(c[r>>2]|0)+-1;if(!(e>>>0>>0|(e|0)==(h|0)&i>>>0>>0)){if(!((g&1|0)!=0|0!=0|(j|0)!=0)){c[(xI()|0)>>2]=34;g=mW(g|0,h|0,-1,-1)|0;h=z;break}if(e>>>0>h>>>0|(e|0)==(h|0)&i>>>0>g>>>0){c[(xI()|0)>>2]=34;break}}g=((j|0)<0)<<31>>31;g=nW(i^j|0,e^g|0,j|0,g|0)|0;h=z}while(0);z=h;return g|0}function GI(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=b+104|0;j=c[f>>2]|0;if((j|0)!=0?(c[b+108>>2]|0)>=(j|0):0)k=4;else{e=II(b)|0;if((e|0)>=0){g=c[f>>2]|0;f=b+8|0;if(g){i=c[f>>2]|0;f=c[b+4>>2]|0;h=b+108|0;g=g-(c[h>>2]|0)|0;j=i;if((i-f|0)<(g|0)){i=j;g=j}else{i=f+(g+-1)|0;g=j}}else{g=c[f>>2]|0;h=b+108|0;i=g;f=c[b+4>>2]|0}c[b+100>>2]=i;if(g|0)c[h>>2]=g+1-f+(c[h>>2]|0);f=f+-1|0;if((d[f>>0]|0|0)!=(e|0))a[f>>0]=e}else k=4}if((k|0)==4){c[b+100>>2]=0;e=-1}return e|0}function HI(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function II(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;if((JI(a)|0)==0?(Tc[c[a+32>>2]&127](a,b,1)|0)==1:0)a=d[b>>0]|0;else a=-1;l=e;return a|0}function JI(b){b=b|0;var d=0,e=0;d=b+74|0;e=a[d>>0]|0;a[d>>0]=e+255|e;d=b+20|0;e=b+28|0;if((c[d>>2]|0)>>>0>(c[e>>2]|0)>>>0)Tc[c[b+36>>2]&127](b,0,0)|0;c[b+16>>2]=0;c[e>>2]=0;c[d>>2]=0;d=c[b>>2]|0;if(!(d&4)){e=(c[b+44>>2]|0)+(c[b+48>>2]|0)|0;c[b+8>>2]=e;c[b+4>>2]=e;d=d<<27>>31}else{c[b>>2]=d|32;d=-1}return d|0}function KI(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=LI(a,b,c)|0;return d|0}function LI(a,b,c){a=a|0;b=b|0;c=c|0;c=DI(a,b,c,0,-2147483648)|0;return c|0}function MI(a,b){a=+a;b=+b;var d=0,e=0;h[j>>3]=a;e=c[j>>2]|0;d=c[j+4>>2]|0;h[j>>3]=b;d=c[j+4>>2]&-2147483648|d&2147483647;c[j>>2]=e;c[j+4>>2]=d;return +(+h[j>>3])}function NI(b,c){b=b|0;c=c|0;var d=0,e=0;d=a[b>>0]|0;e=a[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24)b=e;else{do{b=b+1|0;c=c+1|0;d=a[b>>0]|0;e=a[c>>0]|0}while(!(d<<24>>24==0?1:d<<24>>24!=e<<24>>24));b=e}return (d&255)-(b&255)|0}function OI(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;a:do if(!d)b=0;else{while(1){e=a[b>>0]|0;f=a[c>>0]|0;if(e<<24>>24!=f<<24>>24)break;d=d+-1|0;if(!d){b=0;break a}else{b=b+1|0;c=c+1|0}}b=(e&255)-(f&255)|0}while(0);return b|0}function PI(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,m=0,n=0;n=l;l=l+128|0;g=n+124|0;m=n;h=m;i=34588;j=h+124|0;do{c[h>>2]=c[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(j|0));if((d+-1|0)>>>0>2147483646)if(!d){b=g;d=1;k=4}else{c[(xI()|0)>>2]=75;d=-1}else k=4;if((k|0)==4){k=-2-b|0;k=d>>>0>k>>>0?k:d;c[m+48>>2]=k;g=m+20|0;c[g>>2]=b;c[m+44>>2]=b;d=b+k|0;b=m+16|0;c[b>>2]=d;c[m+28>>2]=d;d=QI(m,e,f)|0;if(k){m=c[g>>2]|0;a[m+(((m|0)==(c[b>>2]|0))<<31>>31)>>0]=0}}l=n;return d|0}function QI(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,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+224|0;n=s+120|0;o=s+80|0;q=s;r=s+136|0;f=o;g=f+40|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));c[n>>2]=c[e>>2];if((RI(0,d,n,q,o)|0)<0)e=-1;else{if((c[b+76>>2]|0)>-1)p=SI(b)|0;else p=0;e=c[b>>2]|0;m=e&32;if((a[b+74>>0]|0)<1)c[b>>2]=e&-33;f=b+48|0;if(!(c[f>>2]|0)){g=b+44|0;h=c[g>>2]|0;c[g>>2]=r;i=b+28|0;c[i>>2]=r;j=b+20|0;c[j>>2]=r;c[f>>2]=80;k=b+16|0;c[k>>2]=r+80;e=RI(b,d,n,q,o)|0;if(h){Tc[c[b+36>>2]&127](b,0,0)|0;e=(c[j>>2]|0)==0?-1:e;c[g>>2]=h;c[f>>2]=0;c[k>>2]=0;c[i>>2]=0;c[j>>2]=0}}else e=RI(b,d,n,q,o)|0;f=c[b>>2]|0;c[b>>2]=f|m;if(p|0)TI(b);e=(f&32|0)==0?e:-1}l=s;return e|0}function RI(d,e,f,g,i){d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0,k=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,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;H=l;l=l+64|0;D=H+16|0;E=H;B=H+24|0;F=H+8|0;G=H+20|0;c[D>>2]=e;x=(d|0)!=0;y=B+40|0;A=y;B=B+39|0;C=F+4|0;k=0;j=0;p=0;a:while(1){do if((j|0)>-1)if((k|0)>(2147483647-j|0)){c[(xI()|0)>>2]=75;j=-1;break}else{j=k+j|0;break}while(0);k=a[e>>0]|0;if(!(k<<24>>24)){w=87;break}else m=e;b:while(1){switch(k<<24>>24){case 37:{k=m;w=9;break b}case 0:{k=m;break b}default:{}}v=m+1|0;c[D>>2]=v;k=a[v>>0]|0;m=v}c:do if((w|0)==9)while(1){w=0;if((a[m+1>>0]|0)!=37)break c;k=k+1|0;m=m+2|0;c[D>>2]=m;if((a[m>>0]|0)==37)w=9;else break}while(0);k=k-e|0;if(x)UI(d,e,k);if(k|0){e=m;continue}n=m+1|0;k=(a[n>>0]|0)+-48|0;if(k>>>0<10){v=(a[m+2>>0]|0)==36;u=v?k:-1;p=v?1:p;n=v?m+3|0:n}else u=-1;c[D>>2]=n;k=a[n>>0]|0;m=(k<<24>>24)+-32|0;d:do if(m>>>0<32){o=0;q=k;while(1){k=1<>2]=n;k=a[n>>0]|0;m=(k<<24>>24)+-32|0;if(m>>>0>=32)break;else q=k}}else o=0;while(0);if(k<<24>>24==42){m=n+1|0;k=(a[m>>0]|0)+-48|0;if(k>>>0<10?(a[n+2>>0]|0)==36:0){c[i+(k<<2)>>2]=10;k=c[g+((a[m>>0]|0)+-48<<3)>>2]|0;p=1;n=n+3|0}else{if(p|0){j=-1;break}if(x){p=(c[f>>2]|0)+(4-1)&~(4-1);k=c[p>>2]|0;c[f>>2]=p+4;p=0;n=m}else{k=0;p=0;n=m}}c[D>>2]=n;v=(k|0)<0;k=v?0-k|0:k;o=v?o|8192:o}else{k=VI(D)|0;if((k|0)<0){j=-1;break}n=c[D>>2]|0}do if((a[n>>0]|0)==46){if((a[n+1>>0]|0)!=42){c[D>>2]=n+1;m=VI(D)|0;n=c[D>>2]|0;break}q=n+2|0;m=(a[q>>0]|0)+-48|0;if(m>>>0<10?(a[n+3>>0]|0)==36:0){c[i+(m<<2)>>2]=10;m=c[g+((a[q>>0]|0)+-48<<3)>>2]|0;n=n+4|0;c[D>>2]=n;break}if(p|0){j=-1;break a}if(x){v=(c[f>>2]|0)+(4-1)&~(4-1);m=c[v>>2]|0;c[f>>2]=v+4}else m=0;c[D>>2]=q;n=q}else m=-1;while(0);t=0;while(1){if(((a[n>>0]|0)+-65|0)>>>0>57){j=-1;break a}v=n+1|0;c[D>>2]=v;q=a[(a[n>>0]|0)+-65+(51746+(t*58|0))>>0]|0;r=q&255;if((r+-1|0)>>>0<8){t=r;n=v}else break}if(!(q<<24>>24)){j=-1;break}s=(u|0)>-1;do if(q<<24>>24==19)if(s){j=-1;break a}else w=49;else{if(s){c[i+(u<<2)>>2]=r;s=g+(u<<3)|0;u=c[s+4>>2]|0;w=E;c[w>>2]=c[s>>2];c[w+4>>2]=u;w=49;break}if(!x){j=0;break a}WI(E,r,f)}while(0);if((w|0)==49?(w=0,!x):0){k=0;e=v;continue}n=a[n>>0]|0;n=(t|0)!=0&(n&15|0)==3?n&-33:n;s=o&-65537;u=(o&8192|0)==0?o:s;e:do switch(n|0){case 110:switch((t&255)<<24>>24){case 0:{c[c[E>>2]>>2]=j;k=0;e=v;continue a}case 1:{c[c[E>>2]>>2]=j;k=0;e=v;continue a}case 2:{k=c[E>>2]|0;c[k>>2]=j;c[k+4>>2]=((j|0)<0)<<31>>31;k=0;e=v;continue a}case 3:{b[c[E>>2]>>1]=j;k=0;e=v;continue a}case 4:{a[c[E>>2]>>0]=j;k=0;e=v;continue a}case 6:{c[c[E>>2]>>2]=j;k=0;e=v;continue a}case 7:{k=c[E>>2]|0;c[k>>2]=j;c[k+4>>2]=((j|0)<0)<<31>>31;k=0;e=v;continue a}default:{k=0;e=v;continue a}}case 112:{n=120;m=m>>>0>8?m:8;e=u|8;w=61;break}case 88:case 120:{e=u;w=61;break}case 111:{n=E;e=c[n>>2]|0;n=c[n+4>>2]|0;r=YI(e,n,y)|0;s=A-r|0;o=0;q=52210;m=(u&8|0)==0|(m|0)>(s|0)?m:s+1|0;s=u;w=67;break}case 105:case 100:{n=E;e=c[n>>2]|0;n=c[n+4>>2]|0;if((n|0)<0){e=nW(0,0,e|0,n|0)|0;n=z;o=E;c[o>>2]=e;c[o+4>>2]=n;o=1;q=52210;w=66;break e}else{o=(u&2049|0)!=0&1;q=(u&2048|0)==0?((u&1|0)==0?52210:52212):52211;w=66;break e}}case 117:{n=E;o=0;q=52210;e=c[n>>2]|0;n=c[n+4>>2]|0;w=66;break}case 99:{a[B>>0]=c[E>>2];e=B;o=0;q=52210;r=y;n=1;m=s;break}case 109:{n=_I(c[(xI()|0)>>2]|0)|0;w=71;break}case 115:{n=c[E>>2]|0;n=n|0?n:52220;w=71;break}case 67:{c[F>>2]=c[E>>2];c[C>>2]=0;c[E>>2]=F;r=-1;n=F;w=75;break}case 83:{e=c[E>>2]|0;if(!m){aJ(d,32,k,0,u);e=0;w=84}else{r=m;n=e;w=75}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{k=cJ(d,+h[E>>3],k,m,u,n)|0;e=v;continue a}default:{o=0;q=52210;r=y;n=m;m=u}}while(0);f:do if((w|0)==61){u=E;t=c[u>>2]|0;u=c[u+4>>2]|0;r=XI(t,u,y,n&32)|0;q=(e&8|0)==0|(t|0)==0&(u|0)==0;o=q?0:2;q=q?52210:52210+(n>>4)|0;s=e;e=t;n=u;w=67}else if((w|0)==66){r=ZI(e,n,y)|0;s=u;w=67}else if((w|0)==71){w=0;u=$I(n,0,m)|0;t=(u|0)==0;e=n;o=0;q=52210;r=t?n+m|0:u;n=t?m:u-n|0;m=s}else if((w|0)==75){w=0;q=n;e=0;m=0;while(1){o=c[q>>2]|0;if(!o)break;m=bJ(G,o)|0;if((m|0)<0|m>>>0>(r-e|0)>>>0)break;e=m+e|0;if(r>>>0>e>>>0)q=q+4|0;else break}if((m|0)<0){j=-1;break a}aJ(d,32,k,e,u);if(!e){e=0;w=84}else{o=0;while(1){m=c[n>>2]|0;if(!m){w=84;break f}m=bJ(G,m)|0;o=m+o|0;if((o|0)>(e|0)){w=84;break f}UI(d,G,m);if(o>>>0>=e>>>0){w=84;break}else n=n+4|0}}}while(0);if((w|0)==67){w=0;n=(e|0)!=0|(n|0)!=0;u=(m|0)!=0|n;n=((n^1)&1)+(A-r)|0;e=u?r:y;r=y;n=u?((m|0)>(n|0)?m:n):m;m=(m|0)>-1?s&-65537:s}else if((w|0)==84){w=0;aJ(d,32,k,e,u^8192);k=(k|0)>(e|0)?k:e;e=v;continue}t=r-e|0;s=(n|0)<(t|0)?t:n;u=s+o|0;k=(k|0)<(u|0)?u:k;aJ(d,32,k,u,m);UI(d,q,o);aJ(d,48,k,u,m^65536);aJ(d,48,s,t,0);UI(d,e,t);aJ(d,32,k,u,m^8192);e=v}g:do if((w|0)==87)if(!d)if(!p)j=0;else{j=1;while(1){e=c[i+(j<<2)>>2]|0;if(!e)break;WI(g+(j<<3)|0,e,f);j=j+1|0;if((j|0)>=10){j=1;break g}}while(1){if(c[i+(j<<2)>>2]|0){j=-1;break g}j=j+1|0;if((j|0)>=10){j=1;break}}}while(0);l=H;return j|0}function SI(a){a=a|0;return 0}function TI(a){a=a|0;return}function UI(a,b,d){a=a|0;b=b|0;d=d|0;if(!(c[a>>2]&32))oJ(b,d,a)|0;return}function VI(b){b=b|0;var d=0,e=0,f=0;e=c[b>>2]|0;f=(a[e>>0]|0)+-48|0;if(f>>>0<10){d=0;do{d=f+(d*10|0)|0;e=e+1|0;c[b>>2]=e;f=(a[e>>0]|0)+-48|0}while(f>>>0<10)}else d=0;return d|0}function WI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{e=(c[d>>2]|0)+(4-1)&~(4-1);b=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=b;break a}case 10:{e=(c[d>>2]|0)+(4-1)&~(4-1);b=c[e>>2]|0;c[d>>2]=e+4;e=a;c[e>>2]=b;c[e+4>>2]=((b|0)<0)<<31>>31;break a}case 11:{e=(c[d>>2]|0)+(4-1)&~(4-1);b=c[e>>2]|0;c[d>>2]=e+4;e=a;c[e>>2]=b;c[e+4>>2]=0;break a}case 12:{e=(c[d>>2]|0)+(8-1)&~(8-1);b=e;f=c[b>>2]|0;b=c[b+4>>2]|0;c[d>>2]=e+8;e=a;c[e>>2]=f;c[e+4>>2]=b;break a}case 13:{f=(c[d>>2]|0)+(4-1)&~(4-1);e=c[f>>2]|0;c[d>>2]=f+4;e=(e&65535)<<16>>16;f=a;c[f>>2]=e;c[f+4>>2]=((e|0)<0)<<31>>31;break a}case 14:{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&65535;c[f+4>>2]=0;break a}case 15:{f=(c[d>>2]|0)+(4-1)&~(4-1);e=c[f>>2]|0;c[d>>2]=f+4;e=(e&255)<<24>>24;f=a;c[f>>2]=e;c[f+4>>2]=((e|0)<0)<<31>>31;break a}case 16:{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&255;c[f+4>>2]=0;break a}case 17:{f=(c[d>>2]|0)+(8-1)&~(8-1);g=+h[f>>3];c[d>>2]=f+8;h[a>>3]=g;break a}case 18:{f=(c[d>>2]|0)+(8-1)&~(8-1);g=+h[f>>3];c[d>>2]=f+8;h[a>>3]=g;break a}default:break a}while(0);while(0);return}function XI(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;if(!((b|0)==0&(c|0)==0))do{e=e+-1|0;a[e>>0]=d[52258+(b&15)>>0]|0|f;b=tW(b|0,c|0,4)|0;c=z}while(!((b|0)==0&(c|0)==0));return e|0}function YI(b,c,d){b=b|0;c=c|0;d=d|0;if(!((b|0)==0&(c|0)==0))do{d=d+-1|0;a[d>>0]=b&7|48;b=tW(b|0,c|0,3)|0;c=z}while(!((b|0)==0&(c|0)==0));return d|0}function ZI(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if(c>>>0>0|(c|0)==0&b>>>0>4294967295){while(1){e=rW(b|0,c|0,10,0)|0;d=d+-1|0;a[d>>0]=e&255|48;e=b;b=qW(b|0,c|0,10,0)|0;if(!(c>>>0>9|(c|0)==9&e>>>0>4294967295))break;else c=z}c=b}else c=b;if(c)while(1){d=d+-1|0;a[d>>0]=(c>>>0)%10|0|48;if(c>>>0<10)break;else c=(c>>>0)/10|0}return d|0}function _I(a){a=a|0;return jJ(a,c[(iJ()|0)+188>>2]|0)|0}function $I(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=d&255;f=(e|0)!=0;a:do if(f&(b&3|0)!=0){g=d&255;while(1){if((a[b>>0]|0)==g<<24>>24){i=6;break a}b=b+1|0;e=e+-1|0;f=(e|0)!=0;if(!(f&(b&3|0)!=0)){i=5;break}}}else i=5;while(0);if((i|0)==5)if(f)i=6;else e=0;b:do if((i|0)==6){g=d&255;if((a[b>>0]|0)!=g<<24>>24){f=O(h,16843009)|0;c:do if(e>>>0>3)while(1){h=c[b>>2]^f;if((h&-2139062144^-2139062144)&h+-16843009|0)break;b=b+4|0;e=e+-4|0;if(e>>>0<=3){i=11;break c}}else i=11;while(0);if((i|0)==11)if(!e){e=0;break}while(1){if((a[b>>0]|0)==g<<24>>24)break b;b=b+1|0;e=e+-1|0;if(!e){e=0;break}}}}while(0);return (e|0?b:0)|0}function aJ(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;g=l;l=l+256|0;f=g;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;yW(f|0,b|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;do{UI(a,f,256);e=e+-256|0}while(e>>>0>255);e=b&255}UI(a,f,e)}l=g;return}function bJ(a,b){a=a|0;b=b|0;if(!a)a=0;else a=gJ(a,b,0)|0;return a|0}function cJ(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,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;H=l;l=l+560|0;m=H+8|0;u=H;G=H+524|0;F=G;n=H+512|0;c[u>>2]=0;E=n+12|0;dJ(e)|0;if((z|0)<0){e=-e;C=1;B=52227}else{C=(h&2049|0)!=0&1;B=(h&2048|0)==0?((h&1|0)==0?52228:52233):52230}dJ(e)|0;D=z&2146435072;do if(D>>>0<2146435072|(D|0)==2146435072&0<0){r=+eJ(e,u)*2.0;j=r!=0.0;if(j)c[u>>2]=(c[u>>2]|0)+-1;w=i|32;if((w|0)==97){s=i&32;q=(s|0)==0?B:B+9|0;p=C|2;j=12-g|0;do if(!(g>>>0>11|(j|0)==0)){e=8.0;do{j=j+-1|0;e=e*16.0}while((j|0)!=0);if((a[q>>0]|0)==45){e=-(e+(-r-e));break}else{e=r+e-e;break}}else e=r;while(0);k=c[u>>2]|0;j=(k|0)<0?0-k|0:k;j=ZI(j,((j|0)<0)<<31>>31,E)|0;if((j|0)==(E|0)){j=n+11|0;a[j>>0]=48}a[j+-1>>0]=(k>>31&2)+43;o=j+-2|0;a[o>>0]=i+15;n=(g|0)<1;m=(h&8|0)==0;j=G;do{D=~~e;k=j+1|0;a[j>>0]=d[52258+D>>0]|s;e=(e-+(D|0))*16.0;if((k-F|0)==1?!(m&(n&e==0.0)):0){a[k>>0]=46;j=j+2|0}else j=k}while(e!=0.0);D=j-F|0;F=E-o|0;E=(g|0)!=0&(D+-2|0)<(g|0)?g+2|0:D;j=F+p+E|0;aJ(b,32,f,j,h);UI(b,q,p);aJ(b,48,f,j,h^65536);UI(b,G,D);aJ(b,48,E-D|0,0,0);UI(b,o,F);aJ(b,32,f,j,h^8192);break}k=(g|0)<0?6:g;if(j){j=(c[u>>2]|0)+-28|0;c[u>>2]=j;e=r*268435456.0}else{e=r;j=c[u>>2]|0}D=(j|0)<0?m:m+288|0;m=D;do{y=~~e>>>0;c[m>>2]=y;m=m+4|0;e=(e-+(y>>>0))*1.0e9}while(e!=0.0);if((j|0)>0){n=D;p=m;while(1){o=(j|0)<29?j:29;j=p+-4|0;if(j>>>0>=n>>>0){m=0;do{x=uW(c[j>>2]|0,0,o|0)|0;x=mW(x|0,z|0,m|0,0)|0;y=z;v=rW(x|0,y|0,1e9,0)|0;c[j>>2]=v;m=qW(x|0,y|0,1e9,0)|0;j=j+-4|0}while(j>>>0>=n>>>0);if(m){n=n+-4|0;c[n>>2]=m}}m=p;while(1){if(m>>>0<=n>>>0)break;j=m+-4|0;if(!(c[j>>2]|0))m=j;else break}j=(c[u>>2]|0)-o|0;c[u>>2]=j;if((j|0)>0)p=m;else break}}else n=D;if((j|0)<0){g=((k+25|0)/9|0)+1|0;t=(w|0)==102;do{s=0-j|0;s=(s|0)<9?s:9;if(n>>>0>>0){o=(1<>>s;q=0;j=n;do{y=c[j>>2]|0;c[j>>2]=(y>>>s)+q;q=O(y&o,p)|0;j=j+4|0}while(j>>>0>>0);j=(c[n>>2]|0)==0?n+4|0:n;if(!q){n=j;j=m}else{c[m>>2]=q;n=j;j=m+4|0}}else{n=(c[n>>2]|0)==0?n+4|0:n;j=m}m=t?D:n;m=(j-m>>2|0)>(g|0)?m+(g<<2)|0:j;j=(c[u>>2]|0)+s|0;c[u>>2]=j}while((j|0)<0);j=n;g=m}else{j=n;g=m}y=D;if(j>>>0>>0){m=(y-j>>2)*9|0;o=c[j>>2]|0;if(o>>>0>=10){n=10;do{n=n*10|0;m=m+1|0}while(o>>>0>=n>>>0)}}else m=0;t=(w|0)==103;v=(k|0)!=0;n=k-((w|0)!=102?m:0)+((v&t)<<31>>31)|0;if((n|0)<(((g-y>>2)*9|0)+-9|0)){n=n+9216|0;s=D+4+(((n|0)/9|0)+-1024<<2)|0;n=((n|0)%9|0)+1|0;if((n|0)<9){o=10;do{o=o*10|0;n=n+1|0}while((n|0)!=9)}else o=10;p=c[s>>2]|0;q=(p>>>0)%(o>>>0)|0;n=(s+4|0)==(g|0);if(!(n&(q|0)==0)){r=(((p>>>0)/(o>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;x=(o|0)/2|0;e=q>>>0>>0?.5:n&(q|0)==(x|0)?1.0:1.5;if(C){x=(a[B>>0]|0)==45;e=x?-e:e;r=x?-r:r}n=p-q|0;c[s>>2]=n;if(r+e!=r){x=n+o|0;c[s>>2]=x;if(x>>>0>999999999){m=s;while(1){n=m+-4|0;c[m>>2]=0;if(n>>>0>>0){j=j+-4|0;c[j>>2]=0}x=(c[n>>2]|0)+1|0;c[n>>2]=x;if(x>>>0>999999999)m=n;else break}}else n=s;m=(y-j>>2)*9|0;p=c[j>>2]|0;if(p>>>0>=10){o=10;do{o=o*10|0;m=m+1|0}while(p>>>0>=o>>>0)}}else n=s}else n=s;n=n+4|0;n=g>>>0>n>>>0?n:g;x=j}else{n=g;x=j}w=n;while(1){if(w>>>0<=x>>>0){u=0;break}j=w+-4|0;if(!(c[j>>2]|0))w=j;else{u=1;break}}g=0-m|0;do if(t){j=((v^1)&1)+k|0;if((j|0)>(m|0)&(m|0)>-5){o=i+-1|0;k=j+-1-m|0}else{o=i+-2|0;k=j+-1|0}j=h&8;if(!j){if(u?(A=c[w+-4>>2]|0,(A|0)!=0):0)if(!((A>>>0)%10|0)){n=0;j=10;do{j=j*10|0;n=n+1|0}while(!((A>>>0)%(j>>>0)|0|0))}else n=0;else n=9;j=((w-y>>2)*9|0)+-9|0;if((o|32|0)==102){s=j-n|0;s=(s|0)>0?s:0;k=(k|0)<(s|0)?k:s;s=0;break}else{s=j+m-n|0;s=(s|0)>0?s:0;k=(k|0)<(s|0)?k:s;s=0;break}}else s=j}else{o=i;s=h&8}while(0);t=k|s;p=(t|0)!=0&1;q=(o|32|0)==102;if(q){v=0;j=(m|0)>0?m:0}else{j=(m|0)<0?g:m;j=ZI(j,((j|0)<0)<<31>>31,E)|0;n=E;if((n-j|0)<2)do{j=j+-1|0;a[j>>0]=48}while((n-j|0)<2);a[j+-1>>0]=(m>>31&2)+43;j=j+-2|0;a[j>>0]=o;v=j;j=n-j|0}j=C+1+k+p+j|0;aJ(b,32,f,j,h);UI(b,B,C);aJ(b,48,f,j,h^65536);if(q){o=x>>>0>D>>>0?D:x;s=G+9|0;p=s;q=G+8|0;n=o;do{m=ZI(c[n>>2]|0,0,s)|0;if((n|0)==(o|0)){if((m|0)==(s|0)){a[q>>0]=48;m=q}}else if(m>>>0>G>>>0){yW(G|0,48,m-F|0)|0;do m=m+-1|0;while(m>>>0>G>>>0)}UI(b,m,p-m|0);n=n+4|0}while(n>>>0<=D>>>0);if(t|0)UI(b,52274,1);if(n>>>0>>0&(k|0)>0)while(1){m=ZI(c[n>>2]|0,0,s)|0;if(m>>>0>G>>>0){yW(G|0,48,m-F|0)|0;do m=m+-1|0;while(m>>>0>G>>>0)}UI(b,m,(k|0)<9?k:9);n=n+4|0;m=k+-9|0;if(!(n>>>0>>0&(k|0)>9)){k=m;break}else k=m}aJ(b,48,k+9|0,9,0)}else{t=u?w:x+4|0;if((k|0)>-1){u=G+9|0;s=(s|0)==0;g=u;p=0-F|0;q=G+8|0;o=x;do{m=ZI(c[o>>2]|0,0,u)|0;if((m|0)==(u|0)){a[q>>0]=48;m=q}do if((o|0)==(x|0)){n=m+1|0;UI(b,m,1);if(s&(k|0)<1){m=n;break}UI(b,52274,1);m=n}else{if(m>>>0<=G>>>0)break;yW(G|0,48,m+p|0)|0;do m=m+-1|0;while(m>>>0>G>>>0)}while(0);F=g-m|0;UI(b,m,(k|0)>(F|0)?F:k);k=k-F|0;o=o+4|0}while(o>>>0>>0&(k|0)>-1)}aJ(b,48,k+18|0,18,0);UI(b,v,E-v|0)}aJ(b,32,f,j,h^8192)}else{G=(i&32|0)!=0;j=C+3|0;aJ(b,32,f,j,h&-65537);UI(b,B,C);UI(b,e!=e|0.0!=0.0?(G?54177:52254):G?52246:52250,3);aJ(b,32,f,j,h^8192)}while(0);l=H;return ((j|0)<(f|0)?f:j)|0}function dJ(a){a=+a;var b=0;h[j>>3]=a;b=c[j>>2]|0;z=c[j+4>>2]|0;return b|0}function eJ(a,b){a=+a;b=b|0;return +(+fJ(a,b))}function fJ(a,b){a=+a;b=b|0;var d=0,e=0,f=0;h[j>>3]=a;d=c[j>>2]|0;e=c[j+4>>2]|0;f=tW(d|0,e|0,52)|0;switch(f&2047){case 0:{if(a!=0.0){a=+fJ(a*18446744073709551616.0,b);d=(c[b>>2]|0)+-64|0}else d=0;c[b>>2]=d;break}case 2047:break;default:{c[b>>2]=(f&2047)+-1022;c[j>>2]=d;c[j+4>>2]=e&-2146435073|1071644672;a=+h[j>>3]}}return +a}function gJ(b,d,e){b=b|0;d=d|0;e=e|0;do if(b){if(d>>>0<128){a[b>>0]=d;b=1;break}if(!(c[c[(hJ()|0)+188>>2]>>2]|0))if((d&-128|0)==57216){a[b>>0]=d;b=1;break}else{c[(xI()|0)>>2]=84;b=-1;break}if(d>>>0<2048){a[b>>0]=d>>>6|192;a[b+1>>0]=d&63|128;b=2;break}if(d>>>0<55296|(d&-8192|0)==57344){a[b>>0]=d>>>12|224;a[b+1>>0]=d>>>6&63|128;a[b+2>>0]=d&63|128;b=3;break}if((d+-65536|0)>>>0<1048576){a[b>>0]=d>>>18|240;a[b+1>>0]=d>>>12&63|128;a[b+2>>0]=d>>>6&63|128;a[b+3>>0]=d&63|128;b=4;break}else{c[(xI()|0)>>2]=84;b=-1;break}}else b=1;while(0);return b|0}function hJ(){return zI()|0}function iJ(){return zI()|0}function jJ(b,e){b=b|0;e=e|0;var f=0,g=0;g=0;while(1){if((d[52276+g>>0]|0)==(b|0)){b=2;break}f=g+1|0;if((f|0)==87){f=52364;g=87;b=5;break}else g=f}if((b|0)==2)if(!g)f=52364;else{f=52364;b=5}if((b|0)==5)while(1){do{b=f;f=f+1|0}while((a[b>>0]|0)!=0);g=g+-1|0;if(!g)break;else b=5}return kJ(f,c[e+20>>2]|0)|0}function kJ(a,b){a=a|0;b=b|0;return lJ(a,b)|0}function lJ(a,b){a=a|0;b=b|0;if(!b)b=0;else b=mJ(c[b>>2]|0,c[b+4>>2]|0,a)|0;return (b|0?b:a)|0}function mJ(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;o=(c[b>>2]|0)+1794895138|0;h=nJ(c[b+8>>2]|0,o)|0;f=nJ(c[b+12>>2]|0,o)|0;g=nJ(c[b+16>>2]|0,o)|0;a:do if((h>>>0>>2>>>0?(n=d-(h<<2)|0,f>>>0>>0&g>>>0>>0):0)?((g|f)&3|0)==0:0){n=f>>>2;m=g>>>2;l=0;while(1){j=h>>>1;k=l+j|0;i=k<<1;g=i+n|0;f=nJ(c[b+(g<<2)>>2]|0,o)|0;g=nJ(c[b+(g+1<<2)>>2]|0,o)|0;if(!(g>>>0>>0&f>>>0<(d-g|0)>>>0)){f=0;break a}if(a[b+(g+f)>>0]|0){f=0;break a}f=NI(e,b+g|0)|0;if(!f)break;f=(f|0)<0;if((h|0)==1){f=0;break a}else{l=f?l:k;h=f?j:h-j|0}}f=i+m|0;g=nJ(c[b+(f<<2)>>2]|0,o)|0;f=nJ(c[b+(f+1<<2)>>2]|0,o)|0;if(f>>>0>>0&g>>>0<(d-f|0)>>>0)f=(a[b+(f+g)>>0]|0)==0?b+f|0:0;else f=0}else f=0;while(0);return f|0}function nJ(a,b){a=a|0;b=b|0;var c=0;c=vW(a|0)|0;return ((b|0)==0?a:c)|0}function oJ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=e+16|0;g=c[f>>2]|0;if(!g)if(!(pJ(e)|0)){g=c[f>>2]|0;h=5}else f=0;else h=5;a:do if((h|0)==5){j=e+20|0;i=c[j>>2]|0;f=i;if((g-i|0)>>>0>>0){f=Tc[c[e+36>>2]&127](e,b,d)|0;break}b:do if((a[e+75>>0]|0)>-1){i=d;while(1){if(!i){h=0;g=b;break b}g=i+-1|0;if((a[b+g>>0]|0)==10)break;else i=g}f=Tc[c[e+36>>2]&127](e,b,i)|0;if(f>>>0>>0)break a;h=i;g=b+i|0;d=d-i|0;f=c[j>>2]|0}else{h=0;g=b}while(0);wW(f|0,g|0,d|0)|0;c[j>>2]=(c[j>>2]|0)+d;f=h+d|0}while(0);return f|0}function pJ(b){b=b|0;var d=0,e=0;d=b+74|0;e=a[d>>0]|0;a[d>>0]=e+255|e;d=c[b>>2]|0;if(!(d&8)){c[b+8>>2]=0;c[b+4>>2]=0;e=c[b+44>>2]|0;c[b+28>>2]=e;c[b+20>>2]=e;c[b+16>>2]=e+(c[b+48>>2]|0);b=0}else{c[b>>2]=d|32;b=-1}return b|0}function qJ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=a+20|0;f=c[e>>2]|0;a=(c[a+16>>2]|0)-f|0;a=a>>>0>d>>>0?d:a;wW(f|0,b|0,a|0)|0;c[e>>2]=(c[e>>2]|0)+a;return d|0}function rJ(a){a=a|0;var b=0;b=a;while(1)if(!(c[b>>2]|0))break;else b=b+4|0;return b-a>>2|0}function sJ(a){a=a|0;return ((a+-48|0)>>>0<10|((a|32)+-97|0)>>>0<6)&1|0}function tJ(){return 34712}function uJ(){var a=0;a=(c[c[(vJ()|0)+188>>2]>>2]|0)!=0;return (a?4:1)|0}function vJ(){return zI()|0}function wJ(){return 34716}function xJ(){return 36256}function yJ(b,e,f){b=b|0;e=e|0;f=f|0;var g=0.0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;switch(e|0){case 0:{l=-149;m=24;j=4;break}case 1:{l=-1074;m=53;j=4;break}case 2:{l=-1074;m=53;j=4;break}default:g=0.0}a:do if((j|0)==4){o=b+4|0;n=b+100|0;do{e=c[o>>2]|0;if(e>>>0<(c[n>>2]|0)>>>0){c[o>>2]=e+1;e=d[e>>0]|0}else e=GI(b)|0}while((HI(e)|0)!=0);b:do switch(e|0){case 43:case 45:{i=1-(((e|0)==45&1)<<1)|0;e=c[o>>2]|0;if(e>>>0<(c[n>>2]|0)>>>0){c[o>>2]=e+1;h=d[e>>0]|0;break b}else{h=GI(b)|0;break b}}default:{h=e;i=1}}while(0);e=0;do{if((h|32|0)!=(a[54168+e>>0]|0))break;do if(e>>>0<7){h=c[o>>2]|0;if(h>>>0<(c[n>>2]|0)>>>0){c[o>>2]=h+1;h=d[h>>0]|0;break}else{h=GI(b)|0;break}}while(0);e=e+1|0}while(e>>>0<8);c:do switch(e|0){case 8:break;case 3:{j=23;break}default:{k=(f|0)!=0;if(k&e>>>0>3)if((e|0)==8)break c;else{j=23;break c}d:do if(!e){e=0;do{if((h|32|0)!=(a[54177+e>>0]|0))break d;do if(e>>>0<2){h=c[o>>2]|0;if(h>>>0<(c[n>>2]|0)>>>0){c[o>>2]=h+1;h=d[h>>0]|0;break}else{h=GI(b)|0;break}}while(0);e=e+1|0}while(e>>>0<3)}while(0);switch(e|0){case 3:{e=c[o>>2]|0;if(e>>>0<(c[n>>2]|0)>>>0){c[o>>2]=e+1;e=d[e>>0]|0}else e=GI(b)|0;if((e|0)==40)e=1;else{if(!(c[n>>2]|0)){g=s;break a}c[o>>2]=(c[o>>2]|0)+-1;g=s;break a}while(1){h=c[o>>2]|0;if(h>>>0<(c[n>>2]|0)>>>0){c[o>>2]=h+1;h=d[h>>0]|0}else h=GI(b)|0;if(!((h+-48|0)>>>0<10|(h+-65|0)>>>0<26)?!((h|0)==95|(h+-97|0)>>>0<26):0)break;e=e+1|0}if((h|0)==41){g=s;break a}h=(c[n>>2]|0)==0;if(!h)c[o>>2]=(c[o>>2]|0)+-1;if(!k){c[(xI()|0)>>2]=22;EI(b,0);g=0.0;break a}if(!e){g=s;break a}while(1){e=e+-1|0;if(!h)c[o>>2]=(c[o>>2]|0)+-1;if(!e){g=s;break a}}}case 0:{if((h|0)==48){e=c[o>>2]|0;if(e>>>0<(c[n>>2]|0)>>>0){c[o>>2]=e+1;e=d[e>>0]|0}else e=GI(b)|0;if((e|32|0)==120){g=+zJ(b,m,l,i,f);break a}if(!(c[n>>2]|0))e=48;else{c[o>>2]=(c[o>>2]|0)+-1;e=48}}else e=h;g=+AJ(b,e,m,l,i,f);break a}default:{if(c[n>>2]|0)c[o>>2]=(c[o>>2]|0)+-1;c[(xI()|0)>>2]=22;EI(b,0);g=0.0;break a}}}}while(0);if((j|0)==23){h=(c[n>>2]|0)==0;if(!h)c[o>>2]=(c[o>>2]|0)+-1;if((f|0)!=0&e>>>0>3)do{if(!h)c[o>>2]=(c[o>>2]|0)+-1;e=e+-1|0}while(e>>>0>3)}g=+(i|0)*t}while(0);return +g}function zJ(a,b,e,f,g){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;var h=0.0,i=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=a+4|0;i=c[w>>2]|0;v=a+100|0;if(i>>>0<(c[v>>2]|0)>>>0){c[w>>2]=i+1;i=d[i>>0]|0;j=0}else{i=GI(a)|0;j=0}a:while(1){switch(i|0){case 46:{n=8;break a}case 48:break;default:{s=0;t=0;p=1.0;h=0.0;u=0;r=j;j=0;q=0;m=0;l=0;break a}}i=c[w>>2]|0;if(i>>>0<(c[v>>2]|0)>>>0){c[w>>2]=i+1;i=d[i>>0]|0;j=1;continue}else{i=GI(a)|0;j=1;continue}}if((n|0)==8){i=c[w>>2]|0;if(i>>>0<(c[v>>2]|0)>>>0){c[w>>2]=i+1;i=d[i>>0]|0}else i=GI(a)|0;if((i|0)==48){l=0;j=0;do{i=c[w>>2]|0;if(i>>>0<(c[v>>2]|0)>>>0){c[w>>2]=i+1;i=d[i>>0]|0}else i=GI(a)|0;l=mW(l|0,j|0,-1,-1)|0;j=z}while((i|0)==48);s=1;t=0;p=1.0;h=0.0;u=0;r=1;q=0;m=0}else{s=1;t=0;p=1.0;h=0.0;u=0;r=j;j=0;q=0;m=0;l=0}}while(1){n=i+-48|0;o=(i|0)==46;if(n>>>0>=10?!(o|((i|32)+-97|0)>>>0<6):0)break;if(o)if(!s){s=1;n=t;k=p;i=u;l=m;j=q}else{i=46;break}else{i=(i|0)>57?(i|32)+-87|0:n;do if(!((q|0)<0|(q|0)==0&m>>>0<8))if((q|0)<0|(q|0)==0&m>>>0<14){p=p*.0625;n=t;k=p;h=h+p*+(i|0);i=u;break}else{i=(t|0)!=0|(i|0)==0;n=i?t:1;k=p;h=i?h:h+p*.5;i=u;break}else{n=t;k=p;i=i+(u<<4)|0}while(0);m=mW(m|0,q|0,1,0)|0;r=1;q=z}o=c[w>>2]|0;if(o>>>0<(c[v>>2]|0)>>>0){c[w>>2]=o+1;t=n;p=k;u=i;i=d[o>>0]|0;continue}else{t=n;p=k;u=i;i=GI(a)|0;continue}}do if(!r){i=c[v>>2]|0;j=(i|0)!=0;if(j)c[w>>2]=(c[w>>2]|0)+-1;if(g){if(j)c[w>>2]=(c[w>>2]|0)+-1;if(!((s|0)==0|(i|0)==0))c[w>>2]=(c[w>>2]|0)+-1}else EI(a,0);h=+(f|0)*0.0}else{n=(s|0)==0;o=n?m:l;n=n?q:j;if((q|0)<0|(q|0)==0&m>>>0<8){j=u;l=q;do{j=j<<4;m=mW(m|0,l|0,1,0)|0;l=z}while((l|0)<0|(l|0)==0&m>>>0<8);m=j}else m=u;if((i|32|0)==112){j=BJ(a,g)|0;i=z;if((j|0)==0&(i|0)==-2147483648){if(!g){EI(a,0);h=0.0;break}if(!(c[v>>2]|0)){j=0;i=0}else{c[w>>2]=(c[w>>2]|0)+-1;j=0;i=0}}}else if(!(c[v>>2]|0)){j=0;i=0}else{c[w>>2]=(c[w>>2]|0)+-1;j=0;i=0}l=uW(o|0,n|0,2)|0;l=mW(l|0,z|0,-32,-1)|0;l=mW(l|0,z|0,j|0,i|0)|0;i=z;if(!m){h=+(f|0)*0.0;break}w=0-e|0;g=((w|0)<0)<<31>>31;if((i|0)>(g|0)|(i|0)==(g|0)&l>>>0>w>>>0){c[(xI()|0)>>2]=34;h=+(f|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}w=e+-106|0;g=((w|0)<0)<<31>>31;if((i|0)<(g|0)|(i|0)==(g|0)&l>>>0>>0){c[(xI()|0)>>2]=34;h=+(f|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if((m|0)>-1){j=m;do{w=!(h>=.5);j=j<<1|(w^1)&1;h=h+(w?h:h+-1.0);l=mW(l|0,i|0,-1,-1)|0;i=z}while((j|0)>-1);p=h;m=j}else p=h;w=((b|0)<0)<<31>>31;e=nW(32,0,e|0,((e|0)<0)<<31>>31|0)|0;i=mW(e|0,z|0,l|0,i|0)|0;e=z;if((w|0)>(e|0)|(w|0)==(e|0)&b>>>0>i>>>0)if((i|0)>0)n=59;else{j=0;i=84;n=61}else{i=b;n=59}if((n|0)==59)if((i|0)<53){j=i;i=84-i|0;n=61}else{k=0.0;h=+(f|0)}if((n|0)==61){h=+(f|0);k=+DJ(+CJ(1.0,i),h);i=j}f=(m&1|0)==0&(p!=0.0&(i|0)<32);h=h*(f?0.0:p)+(k+h*+(((f&1)+m|0)>>>0))-k;if(!(h!=0.0))c[(xI()|0)>>2]=34;h=+FJ(h,l)}while(0);return +h}function AJ(a,b,e,f,g,h){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,A=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0;J=l;l=l+512|0;G=J;H=f+e|0;I=0-H|0;D=a+4|0;E=a+100|0;k=0;a:while(1){switch(b|0){case 46:{A=6;break a}case 48:break;default:{v=0;p=k;q=0;o=0;break a}}b=c[D>>2]|0;if(b>>>0<(c[E>>2]|0)>>>0){c[D>>2]=b+1;b=d[b>>0]|0;k=1;continue}else{b=GI(a)|0;k=1;continue}}if((A|0)==6){b=c[D>>2]|0;if(b>>>0<(c[E>>2]|0)>>>0){c[D>>2]=b+1;b=d[b>>0]|0}else b=GI(a)|0;if((b|0)==48){k=0;b=0;while(1){k=mW(k|0,b|0,-1,-1)|0;o=z;b=c[D>>2]|0;if(b>>>0<(c[E>>2]|0)>>>0){c[D>>2]=b+1;b=d[b>>0]|0}else b=GI(a)|0;if((b|0)==48)b=o;else{v=1;p=1;q=k;break}}}else{v=1;p=k;q=0;o=0}}c[G>>2]=0;n=b+-48|0;m=(b|0)==46;b:do if(m|n>>>0<10){C=G+496|0;w=0;k=0;u=0;x=v;y=p;A=n;p=0;n=0;c:while(1){do if(m)if(!x){x=1;q=p;o=n}else break c;else{p=mW(p|0,n|0,1,0)|0;n=z;v=(b|0)!=48;if((k|0)>=125){if(!v)break;c[C>>2]=c[C>>2]|1;break}m=G+(k<<2)|0;if(!w)b=A;else b=b+-48+((c[m>>2]|0)*10|0)|0;c[m>>2]=b;w=w+1|0;y=(w|0)==9;w=y?0:w;k=(y&1)+k|0;u=v?p:u;y=1}while(0);b=c[D>>2]|0;if(b>>>0<(c[E>>2]|0)>>>0){c[D>>2]=b+1;b=d[b>>0]|0}else b=GI(a)|0;A=b+-48|0;m=(b|0)==46;if(!(m|A>>>0<10)){v=x;m=y;A=29;break b}}b=w;m=(y|0)!=0;A=37}else{w=0;k=0;u=0;m=p;p=0;n=0;A=29}while(0);do if((A|0)==29){C=(v|0)==0;q=C?p:q;o=C?n:o;m=(m|0)!=0;if(!(m&(b|32|0)==101))if((b|0)>-1){b=w;A=37;break}else{b=w;A=39;break}m=BJ(a,h)|0;b=z;if((m|0)==0&(b|0)==-2147483648){if(!h){EI(a,0);i=0.0;break}if(!(c[E>>2]|0)){m=0;b=0}else{c[D>>2]=(c[D>>2]|0)+-1;m=0;b=0}}y=mW(m|0,b|0,q|0,o|0)|0;b=w;o=z;A=41}while(0);if((A|0)==37)if(c[E>>2]|0){c[D>>2]=(c[D>>2]|0)+-1;if(m){y=q;A=41}else A=40}else A=39;if((A|0)==39)if(m){y=q;A=41}else A=40;do if((A|0)==40){c[(xI()|0)>>2]=22;EI(a,0);i=0.0}else if((A|0)==41){m=c[G>>2]|0;if(!m){i=+(g|0)*0.0;break}if(((n|0)<0|(n|0)==0&p>>>0<10)&((y|0)==(p|0)&(o|0)==(n|0))?(e|0)>30|(m>>>e|0)==0:0){i=+(g|0)*+(m>>>0);break}a=(f|0)/-2|0;E=((a|0)<0)<<31>>31;if((o|0)>(E|0)|(o|0)==(E|0)&y>>>0>a>>>0){c[(xI()|0)>>2]=34;i=+(g|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}a=f+-106|0;E=((a|0)<0)<<31>>31;if((o|0)<(E|0)|(o|0)==(E|0)&y>>>0>>0){c[(xI()|0)>>2]=34;i=+(g|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if(b){if((b|0)<9){n=G+(k<<2)|0;m=c[n>>2]|0;do{m=m*10|0;b=b+1|0}while((b|0)!=9);c[n>>2]=m}k=k+1|0}if((u|0)<9?(u|0)<=(y|0)&(y|0)<18:0){b=c[G>>2]|0;if((y|0)==9){i=+(g|0)*+(b>>>0);break}if((y|0)<9){i=+(g|0)*+(b>>>0)/+(c[37796+(8-y<<2)>>2]|0);break}a=e+27+(O(y,-3)|0)|0;if((a|0)>30|(b>>>a|0)==0){i=+(g|0)*+(b>>>0)*+(c[37796+(y+-10<<2)>>2]|0);break}}b=(y|0)%9|0;if(!b){b=0;n=0}else{u=(y|0)>-1?b:b+9|0;p=c[37796+(8-u<<2)>>2]|0;if(k){q=1e9/(p|0)|0;n=0;o=0;m=y;b=0;do{D=G+(b<<2)|0;E=c[D>>2]|0;a=((E>>>0)/(p>>>0)|0)+n|0;c[D>>2]=a;n=O(q,(E>>>0)%(p>>>0)|0)|0;a=(b|0)==(o|0)&(a|0)==0;m=a?m+-9|0:m;o=a?o+1&127:o;b=b+1|0}while((b|0)!=(k|0));if(!n)n=o;else{c[G+(k<<2)>>2]=n;n=o;k=k+1|0}}else{n=0;k=0;m=y}b=0;y=9-u+m|0}d:while(1){u=(y|0)<18;v=(y|0)==18;w=G+(n<<2)|0;while(1){if(!u){if(!v){m=y;break d}if((c[w>>2]|0)>>>0>=9007199){m=18;break d}}m=0;x=k;k=k+127|0;while(1){o=k&127;p=G+(o<<2)|0;k=uW(c[p>>2]|0,0,29)|0;k=mW(k|0,z|0,m|0,0)|0;m=z;if(m>>>0>0|(m|0)==0&k>>>0>1e9){q=qW(k|0,m|0,1e9,0)|0;k=rW(k|0,m|0,1e9,0)|0}else q=0;c[p>>2]=k;a=(o|0)==(n|0);x=(k|0)==0&(((o|0)!=(x+127&127|0)|a)^1)?o:x;if(a)break;else{m=q;k=o+-1|0}}b=b+-29|0;if(q|0)break;else k=x}n=n+127&127;k=x+127&127;m=G+((x+126&127)<<2)|0;if((n|0)==(x|0))c[m>>2]=c[m>>2]|c[G+(k<<2)>>2];else k=x;c[G+(n<<2)>>2]=q;y=y+9|0}e:while(1){w=k+1&127;x=G+((k+127&127)<<2)|0;while(1){q=(m|0)==18;v=(m|0)>27?9:1;y=n;while(1){n=0;while(1){o=n+y&127;if((o|0)==(k|0)){F=2;A=88;break}o=c[G+(o<<2)>>2]|0;p=c[37828+(n<<2)>>2]|0;if(o>>>0

    >>0){F=2;A=88;break}if(o>>>0>p>>>0)break;n=n+1|0;if((n|0)>=2){F=n;A=88;break}}if((A|0)==88?(A=0,q&(F|0)==2):0){i=0.0;o=0;break e}b=v+b|0;if((y|0)==(k|0))y=k;else break}q=(1<>>v;p=0;n=y;o=y;do{D=G+(o<<2)|0;E=c[D>>2]|0;a=(E>>>v)+p|0;c[D>>2]=a;p=O(E&q,u)|0;a=(o|0)==(n|0)&(a|0)==0;m=a?m+-9|0:m;n=a?n+1&127:n;o=o+1&127}while((o|0)!=(k|0));if(!p)continue;if((w|0)!=(n|0))break;c[x>>2]=c[x>>2]|1}c[G+(k<<2)>>2]=p;k=w}do{n=o+y&127;m=k+1&127;if((n|0)==(k|0)){c[G+(m+-1<<2)>>2]=0;k=m}i=i*1.0e9+ +((c[G+(n<<2)>>2]|0)>>>0);o=o+1|0}while((o|0)!=2);t=+(g|0);j=t*i;o=b+53|0;p=o-f|0;q=(p|0)<(e|0);n=q?((p|0)>0?p:0):e;if((n|0)<53){K=+DJ(+CJ(1.0,105-n|0),j);r=+EJ(j,+CJ(1.0,53-n|0));s=K;i=r;r=K+(j-r)}else{s=0.0;i=0.0;r=j}m=y+2&127;if((m|0)!=(k|0)){m=c[G+(m<<2)>>2]|0;do if(m>>>0>=5e8){if((m|0)!=5e8){i=t*.75+i;break}if((y+3&127|0)==(k|0)){i=t*.5+i;break}else{i=t*.75+i;break}}else{if((m|0)==0?(y+3&127|0)==(k|0):0)break;i=t*.25+i}while(0);if((53-n|0)>1?!(+EJ(i,1.0)!=0.0):0)j=i+1.0;else j=i}else j=i;i=r+j-s;do if((o&2147483647|0)>(-2-H|0)){H=!(+B(+i)>=9007199254740992.0);b=((H^1)&1)+b|0;i=H?i:i*.5;if((b+50|0)<=(I|0)?!(j!=0.0&(q&((n|0)!=(p|0)|H))):0)break;c[(xI()|0)>>2]=34}while(0);i=+FJ(i,b)}while(0);l=J;return +i}function BJ(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=a+4|0;e=c[k>>2]|0;j=a+100|0;if(e>>>0<(c[j>>2]|0)>>>0){c[k>>2]=e+1;e=d[e>>0]|0}else e=GI(a)|0;switch(e|0){case 43:case 45:{f=(e|0)==45&1;e=c[k>>2]|0;if(e>>>0<(c[j>>2]|0)>>>0){c[k>>2]=e+1;e=d[e>>0]|0}else e=GI(a)|0;if((b|0)!=0&(e+-48|0)>>>0>9?(c[j>>2]|0)!=0:0)c[k>>2]=(c[k>>2]|0)+-1;break}default:f=0}if((e+-48|0)>>>0>9)if(!(c[j>>2]|0)){f=-2147483648;e=0}else{c[k>>2]=(c[k>>2]|0)+-1;f=-2147483648;e=0}else{g=0;do{g=e+-48+(g*10|0)|0;e=c[k>>2]|0;if(e>>>0<(c[j>>2]|0)>>>0){c[k>>2]=e+1;e=d[e>>0]|0}else e=GI(a)|0}while((e+-48|0)>>>0<10&(g|0)<214748364);b=((g|0)<0)<<31>>31;if((e+-48|0)>>>0<10){do{b=lW(g|0,b|0,10,0)|0;g=z;e=mW(e|0,((e|0)<0)<<31>>31|0,-48,-1)|0;g=mW(e|0,z|0,b|0,g|0)|0;b=z;e=c[k>>2]|0;if(e>>>0<(c[j>>2]|0)>>>0){c[k>>2]=e+1;e=d[e>>0]|0}else e=GI(a)|0}while((e+-48|0)>>>0<10&((b|0)<21474836|(b|0)==21474836&g>>>0<2061584302));h=e;i=g}else{h=e;i=g}e=c[j>>2]|0;if((h+-48|0)>>>0<10)do{g=c[k>>2]|0;if(g>>>0>>0){c[k>>2]=g+1;g=d[g>>0]|0}else{g=GI(a)|0;e=c[j>>2]|0}}while((g+-48|0)>>>0<10);if(e|0)c[k>>2]=(c[k>>2]|0)+-1;k=(f|0)!=0;e=nW(0,0,i|0,b|0)|0;f=k?z:b;e=k?e:i}z=f;return e|0}function CJ(a,b){a=+a;b=b|0;var d=0,e=0;if((b|0)<=1023){if((b|0)<-1022){a=a*2.2250738585072014e-308;d=b+1022|0;e=(d|0)<-1022;b=b+2044|0;a=e?a*2.2250738585072014e-308:a;b=e?((b|0)>-1022?b:-1022):d}}else{a=a*8988465674311579538646525.0e283;e=b+-1023|0;d=(e|0)>1023;b=b+-2046|0;a=d?a*8988465674311579538646525.0e283:a;b=d?((b|0)<1023?b:1023):e}d=uW(b+1023|0,0,52)|0;e=z;c[j>>2]=d;c[j+4>>2]=e;return +(a*+h[j>>3])}function DJ(a,b){a=+a;b=+b;return +(+MI(a,b))}function EJ(a,b){a=+a;b=+b;return +(+GJ(a,b))}function FJ(a,b){a=+a;b=b|0;return +(+CJ(a,b))}function GJ(a,b){a=+a;b=+b;var d=0,e=0,f=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h[j>>3]=a;i=c[j>>2]|0;l=c[j+4>>2]|0;h[j>>3]=b;n=c[j>>2]|0;o=c[j+4>>2]|0;e=tW(i|0,l|0,52)|0;e=e&2047;m=tW(n|0,o|0,52)|0;m=m&2047;p=l&-2147483648;g=uW(n|0,o|0,1)|0;k=z;a:do if(!((g|0)==0&(k|0)==0)?(f=HJ(b)|0,d=z&2147483647,!((e|0)==2047|(d>>>0>2146435072|(d|0)==2146435072&f>>>0>0))):0){d=uW(i|0,l|0,1)|0;f=z;if(!(f>>>0>k>>>0|(f|0)==(k|0)&d>>>0>g>>>0))return +((d|0)==(g|0)&(f|0)==(k|0)?a*0.0:a);if(!e){d=uW(i|0,l|0,12)|0;f=z;if((f|0)>-1|(f|0)==-1&d>>>0>4294967295){e=0;do{e=e+-1|0;d=uW(d|0,f|0,1)|0;f=z}while((f|0)>-1|(f|0)==-1&d>>>0>4294967295)}else e=0;i=uW(i|0,l|0,1-e|0)|0;g=z}else g=l&1048575|1048576;if(!m){f=uW(n|0,o|0,12)|0;k=z;if((k|0)>-1|(k|0)==-1&f>>>0>4294967295){d=0;do{d=d+-1|0;f=uW(f|0,k|0,1)|0;k=z}while((k|0)>-1|(k|0)==-1&f>>>0>4294967295)}else d=0;n=uW(n|0,o|0,1-d|0)|0;m=d;l=z}else l=o&1048575|1048576;f=nW(i|0,g|0,n|0,l|0)|0;d=z;k=(d|0)>-1|(d|0)==-1&f>>>0>4294967295;b:do if((e|0)>(m|0)){while(1){if(k){if((f|0)==0&(d|0)==0)break}else{f=i;d=g}i=uW(f|0,d|0,1)|0;g=z;e=e+-1|0;f=nW(i|0,g|0,n|0,l|0)|0;d=z;k=(d|0)>-1|(d|0)==-1&f>>>0>4294967295;if((e|0)<=(m|0))break b}b=a*0.0;break a}while(0);if(k){if((f|0)==0&(d|0)==0){b=a*0.0;break}}else{d=g;f=i}if(d>>>0<1048576|(d|0)==1048576&f>>>0<0)do{f=uW(f|0,d|0,1)|0;d=z;e=e+-1|0}while(d>>>0<1048576|(d|0)==1048576&f>>>0<0);if((e|0)>0){o=mW(f|0,d|0,0,-1048576)|0;d=z;e=uW(e|0,0,52)|0;d=d|z;e=o|e}else{e=tW(f|0,d|0,1-e|0)|0;d=z}c[j>>2]=e;c[j+4>>2]=d|p;b=+h[j>>3]}else q=3;while(0);if((q|0)==3){b=a*b;b=b/b}return +b}function HJ(a){a=+a;var b=0;h[j>>3]=a;b=c[j>>2]|0;z=c[j+4>>2]|0;return b|0}function IJ(a){a=a|0;return 0}function JJ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return d|0}function KJ(a,b){a=a|0;b=b|0;return -1|0}function LJ(b){b=b|0;var d=0,e=0,f=0;f=b;a:do if(!(f&3))e=4;else{d=f;while(1){if(!(a[b>>0]|0)){b=d;break a}b=b+1|0;d=b;if(!(d&3)){e=4;break}}}while(0);if((e|0)==4){while(1){d=c[b>>2]|0;if(!((d&-2139062144^-2139062144)&d+-16843009))b=b+4|0;else break}if((d&255)<<24>>24)do b=b+1|0;while((a[b>>0]|0)!=0)}return b-f|0}function MJ(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;b=wI(Vb(91,e|0)|0)|0;l=d;return b|0}function NJ(b,c){b=b|0;c=c|0;b=OJ(b,c)|0;return ((a[b>>0]|0)==(c&255)<<24>>24?b:0)|0}function OJ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;f=d&255;a:do if(!f)b=b+(LJ(b)|0)|0;else{if(b&3){e=d&255;do{g=a[b>>0]|0;if(g<<24>>24==0?1:g<<24>>24==e<<24>>24)break a;b=b+1|0}while((b&3|0)!=0)}f=O(f,16843009)|0;e=c[b>>2]|0;b:do if(!((e&-2139062144^-2139062144)&e+-16843009))do{g=e^f;if((g&-2139062144^-2139062144)&g+-16843009|0)break b;b=b+4|0;e=c[b>>2]|0}while(!((e&-2139062144^-2139062144)&e+-16843009|0));while(0);e=d&255;while(1){g=a[b>>0]|0;if(g<<24>>24==0?1:g<<24>>24==e<<24>>24)break;else b=b+1|0}}while(0);return b|0}function PJ(){return}function QJ(a){a=a|0;if(RJ(a)|0)oI(a);return}function RJ(a){a=a|0;return (a|0)!=33988&((a|0)!=0&(a|0)!=59820)&1|0}function SJ(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,m=0;k=l;l=l+16|0;g=k;i=(f|0)==0?59844:f;f=c[i>>2]|0;a:do if(!d)if(!f)f=0;else j=17;else{h=(b|0)==0?g:b;if(!e)f=-2;else{if(!f){f=a[d>>0]|0;if(f<<24>>24>-1){c[h>>2]=f&255;f=f<<24>>24!=0&1;break}g=(c[c[(TJ()|0)+188>>2]>>2]|0)==0;f=a[d>>0]|0;if(g){c[h>>2]=f<<24>>24&57343;f=1;break}f=(f&255)+-194|0;if(f>>>0>50){j=17;break}f=c[34012+(f<<2)>>2]|0;g=e+-1|0;if(g){d=d+1|0;j=11}}else{g=e;j=11}b:do if((j|0)==11){b=a[d>>0]|0;m=(b&255)>>>3;if((m+-16|m+(f>>26))>>>0>7){j=17;break a}while(1){d=d+1|0;f=(b&255)+-128|f<<6;g=g+-1|0;if((f|0)>=0)break;if(!g)break b;b=a[d>>0]|0;if((b&-64)<<24>>24!=-128){j=17;break a}}c[i>>2]=0;c[h>>2]=f;f=e-g|0;break a}while(0);c[i>>2]=f;f=-2}}while(0);if((j|0)==17){c[i>>2]=0;c[(xI()|0)>>2]=84;f=-1}l=k;return f|0}function TJ(){return zI()|0}function UJ(a,b){a=a|0;b=b|0;return (a+-48|0)>>>0<10|0}function VJ(a,b){a=a|0;b=b|0;return sJ(a)|0}function WJ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+272|0;n=p+8|0;o=p;do if(!(a[d>>0]|0)){d=lc(54181)|0;if(d|0?a[d>>0]|0:0)break;d=lc(54188+(b*12|0)|0)|0;if(d|0?a[d>>0]|0:0)break;d=lc(54260)|0;if(d|0?a[d>>0]|0:0)break;d=54265}while(0);e=0;a:do{switch(a[d+e>>0]|0){case 47:case 0:break a;default:{}}e=e+1|0}while(e>>>0<15);f=a[d>>0]|0;if(f<<24>>24!=46?(a[d+e>>0]|0)==0:0)if(f<<24>>24==67)m=15;else{k=d;m=16}else{d=54265;m=15}if((m|0)==15)if(!(a[d+1>>0]|0))m=18;else{k=d;m=16}b:do if((m|0)==16)if((NI(k,54265)|0)!=0?(NI(k,54273)|0)!=0:0){d=c[14962]|0;if(d|0)do{if(!(NI(k,d+8|0)|0))break b;d=c[d+24>>2]|0}while((d|0)!=0);Ob(59852);d=c[14962]|0;c:do if(d|0){while(1){if(!(NI(k,d+8|0)|0))break;d=c[d+24>>2]|0;if(!d)break c}Wb(59852);break b}while(0);d:do if(((c[14941]|0)==0?(g=lc(54279)|0,(g|0)!=0):0)?(a[g>>0]|0)!=0:0){i=254-e|0;j=e+1|0;f=g;while(1){h=OJ(f,58)|0;d=a[h>>0]|0;g=((d<<24>>24!=0)<<31>>31)+(h-f)|0;if(g>>>0>>0){wW(n|0,f|0,g|0)|0;f=n+g|0;a[f>>0]=47;wW(f+1|0,k|0,e|0)|0;a[n+(j+g)>>0]=0;g=Pb(n|0,o|0)|0;if(g|0)break;d=a[h>>0]|0}f=h+(d<<24>>24!=0&1)|0;if(!(a[f>>0]|0)){m=41;break d}}d=nI(28)|0;f=c[o>>2]|0;if(!d){MJ(g,f)|0;m=41;break}else{c[d>>2]=g;c[d+4>>2]=f;o=d+8|0;wW(o|0,k|0,e|0)|0;a[o+e>>0]=0;c[d+24>>2]=c[14962];c[14962]=d;break}}else m=41;while(0);if((m|0)==41){d=nI(28)|0;if(d){c[d>>2]=c[8485];c[d+4>>2]=c[8486];o=d+8|0;wW(o|0,k|0,e|0)|0;a[o+e>>0]=0;c[d+24>>2]=c[14962];c[14962]=d}}Wb(59852);d=(b|0)==0&(d|0)==0?33940:d}else{d=k;m=18}while(0);do if((m|0)==18){if((b|0)==0?(a[d+1>>0]|0)==46:0){d=33940;break}d=0}while(0);l=p;return d|0}function XJ(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;j=l;l=l+32|0;h=j;a:do if(!(RJ(d)|0)){i=(d|0)==0;f=0;g=0;do{e=(1<>2]|0;f=((e|0)!=0&1)+f|0;c[h+(g<<2)>>2]=e;g=g+1|0}while((g|0)!=6);switch(f|0){case 0:{d=59820;break a}case 1:{if((c[h>>2]|0)==33940){d=33988;break a}break}default:{}}}else{e=0;do{if(1<>2]=WJ(e,b)|0;e=e+1|0}while((e|0)!=6)}while(0);l=j;return d|0}function YJ(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=l;l=l+16|0;g=f;c[g>>2]=e;e=PI(a,b,d,g)|0;l=f;return e|0}function ZJ(a,b){a=a|0;b=b|0;_J(a,b)|0;return a|0}function _J(b,d){b=b|0;d=d|0;var e=0,f=0;e=d;a:do if(!((e^b)&3)){if(e&3)do{e=a[d>>0]|0;a[b>>0]=e;if(!(e<<24>>24))break a;d=d+1|0;b=b+1|0}while((d&3|0)!=0);e=c[d>>2]|0;if(!((e&-2139062144^-2139062144)&e+-16843009)){f=b;while(1){d=d+4|0;b=f+4|0;c[f>>2]=e;e=c[d>>2]|0;if((e&-2139062144^-2139062144)&e+-16843009|0)break;else f=b}}f=8}else f=8;while(0);if((f|0)==8){f=a[d>>0]|0;a[b>>0]=f;if(f<<24>>24)do{d=d+1|0;b=b+1|0;f=a[d>>0]|0;a[b>>0]=f}while(f<<24>>24!=0)}return b|0}function $J(a){a=a|0;var b=0,d=0;b=(aK()|0)+188|0;d=c[b>>2]|0;if(a|0)c[b>>2]=(a|0)==(-1|0)?59796:a;return ((d|0)==59796?-1:d)|0}function aK(){return zI()|0}function bK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if(d|0){e=a;while(1){d=d+-1|0;c[e>>2]=c[b>>2];if(!d)break;else{b=b+4|0;e=e+4|0}}}return a|0}function cK(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;j=m;k=e&255;a[j>>0]=k;g=b+16|0;h=c[g>>2]|0;if(!h)if(!(pJ(b)|0)){h=c[g>>2]|0;i=4}else f=-1;else i=4;do if((i|0)==4){i=b+20|0;g=c[i>>2]|0;if(g>>>0>>0?(f=e&255,(f|0)!=(a[b+75>>0]|0)):0){c[i>>2]=g+1;a[g>>0]=k;break}if((Tc[c[b+36>>2]&127](b,j,1)|0)==1)f=d[j>>0]|0;else f=-1}while(0);l=m;return f|0}function dK(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j;a:do if(!e)b=0;else{do if(f|0){i=(b|0)==0?g:b;b=a[e>>0]|0;if(b<<24>>24>-1){c[i>>2]=b&255;b=b<<24>>24!=0&1;break a}h=(c[c[(eK()|0)+188>>2]>>2]|0)==0;b=a[e>>0]|0;if(h){c[i>>2]=b<<24>>24&57343;b=1;break a}b=(b&255)+-194|0;if(b>>>0<=50){g=e+1|0;h=c[34012+(b<<2)>>2]|0;if(f>>>0<4?h&-2147483648>>>((f*6|0)+-6|0)|0:0)break;b=d[g>>0]|0;f=b>>>3;if((f+-16|f+(h>>26))>>>0<=7){b=b+-128|h<<6;if((b|0)>=0){c[i>>2]=b;b=2;break a}g=(d[e+2>>0]|0)+-128|0;if(g>>>0<=63){g=g|b<<6;if((g|0)>=0){c[i>>2]=g;b=3;break a}b=(d[e+3>>0]|0)+-128|0;if(b>>>0<=63){c[i>>2]=b|g<<6;b=4;break a}}}}}while(0);c[(xI()|0)>>2]=84;b=-1}while(0);l=j;return b|0}function eK(){return zI()|0}function fK(a){a=a|0;var b=0,c=0;c=(LJ(a)|0)+1|0;b=nI(c)|0;if(!b)b=0;else wW(b|0,a|0,c|0)|0;return b|0}function gK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e;c[f>>2]=d;d=hK(a,b,f)|0;l=e;return d|0}function hK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+128|0;e=g;f=e;h=f+124|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(h|0));c[e+32>>2]=99;c[e+44>>2]=a;c[e+76>>2]=-1;c[e+84>>2]=a;h=jK(e,b,d)|0;l=g;return h|0}function iK(a,b,c){a=a|0;b=b|0;c=c|0;return nK(a,b,c)|0}function jK(b,e,f){b=b|0;e=e|0;f=f|0;var i=0,j=0,k=0,m=0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=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;Q=l;l=l+288|0;K=Q+8|0;L=Q+17|0;M=Q;N=Q+16|0;if((c[b+76>>2]|0)>-1)P=SI(b)|0;else P=0;i=a[e>>0]|0;a:do if(i<<24>>24){A=b+4|0;B=b+100|0;C=b+108|0;D=b+8|0;E=L+10|0;F=L+33|0;y=K+4|0;G=L+46|0;H=L+94|0;I=L+1|0;J=L+1|0;m=e;u=0;e=0;k=0;j=0;b:while(1){c:do if(!(HI(i&255)|0)){i=i<<24>>24==37;d:do if(i){p=m+1|0;n=a[p>>0]|0;e:do switch(n<<24>>24){case 37:break d;case 42:{x=0;m=m+2|0;break}default:{i=(n&255)+-48|0;if(i>>>0<10?(a[m+2>>0]|0)==36:0){x=kK(f,i)|0;m=m+3|0;break e}m=(c[f>>2]|0)+(4-1)&~(4-1);x=c[m>>2]|0;c[f>>2]=m+4;m=p}}while(0);i=a[m>>0]|0;n=i&255;if((n+-48|0)>>>0<10){p=0;do{p=(p*10|0)+-48+n|0;m=m+1|0;i=a[m>>0]|0;n=i&255}while((n+-48|0)>>>0<10)}else p=0;i=i<<24>>24==109;w=(x|0)!=0;k=i?0:k;j=i?0:j;m=i?m+1|0:m;i=w&i;n=m+1|0;switch(a[m>>0]|0){case 104:{v=(a[n>>0]|0)==104;q=v?-2:-1;m=v?m+2|0:n;break}case 108:{v=(a[n>>0]|0)==108;q=v?3:1;m=v?m+2|0:n;break}case 106:{q=3;m=n;break}case 116:case 122:{q=1;m=n;break}case 76:{q=2;m=n;break}case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101:case 97:case 120:case 117:case 111:case 105:case 100:{q=0;break}default:{O=137;break b}}s=d[m>>0]|0;t=(s&47|0)==3;s=t?s|32:s;t=t?1:q;r=s&255;switch(r<<24>>24){case 99:{p=(p|0)>1?p:1;break}case 91:break;case 110:{lK(x,t,u,((u|0)<0)<<31>>31);n=u;break c}default:{EI(b,0);do{n=c[A>>2]|0;if(n>>>0<(c[B>>2]|0)>>>0){c[A>>2]=n+1;n=d[n>>0]|0}else n=GI(b)|0}while((HI(n)|0)!=0);if(!(c[B>>2]|0))n=c[A>>2]|0;else{n=(c[A>>2]|0)+-1|0;c[A>>2]=n}u=(c[C>>2]|0)+u+n-(c[D>>2]|0)|0}}EI(b,p);n=c[A>>2]|0;q=c[B>>2]|0;if(n>>>0>>0)c[A>>2]=n+1;else{if((GI(b)|0)<0){O=137;break b}q=c[B>>2]|0}if(q|0)c[A>>2]=(c[A>>2]|0)+-1;f:do switch(r<<24>>24){case 91:case 99:case 115:{v=(s|0)==99;g:do if((s|16|0)==115){yW(I|0,-1,256)|0;a[L>>0]=0;if((s|0)==115){a[F>>0]=0;a[E>>0]=0;a[E+1>>0]=0;a[E+2>>0]=0;a[E+3>>0]=0;a[E+4>>0]=0}}else{n=m+1|0;s=(a[n>>0]|0)==94;r=s&1;m=s?m+2|0:n;yW(J|0,s&1|0,256)|0;a[L>>0]=0;switch(a[m>>0]|0){case 45:{n=G;O=64;break}case 93:{n=H;O=64;break}default:s=(r^1)&255}if((O|0)==64){O=0;s=(r^1)&255;a[n>>0]=s;m=m+1|0}while(1){n=a[m>>0]|0;h:do switch(n<<24>>24){case 0:{O=137;break b}case 93:break g;case 45:{r=m+1|0;n=a[r>>0]|0;switch(n<<24>>24){case 93:case 0:{n=45;break h}default:{}}m=a[m+-1>>0]|0;if((m&255)<(n&255)){m=m&255;do{m=m+1|0;a[L+m>>0]=s;n=a[r>>0]|0}while((m|0)<(n&255|0));m=r}else m=r;break}default:{}}while(0);a[L+((n&255)+1)>>0]=s;m=m+1|0}}while(0);n=v?p+1|0:31;s=(t|0)==1;i:do if(s){if(i){j=nI(n<<2)|0;if(!j){k=0;j=0;i=1;O=137;break b}}else j=x;c[K>>2]=0;c[y>>2]=0;r=n;k=0;j:while(1){q=(j|0)==0;do{k:while(1){n=c[A>>2]|0;if(n>>>0<(c[B>>2]|0)>>>0){c[A>>2]=n+1;n=d[n>>0]|0}else n=GI(b)|0;if(!(a[L+(n+1)>>0]|0))break j;a[N>>0]=n;switch(SJ(M,N,1,K)|0){case -1:{k=0;O=137;break b}case -2:break;default:break k}}if(!q){c[j+(k<<2)>>2]=c[M>>2];k=k+1|0}}while(!(i&(k|0)==(r|0)));k=r<<1|1;n=pI(j,k<<2)|0;if(!n){k=0;i=1;O=137;break b}else{t=r;r=k;j=n;k=t}}if(!(mK(K)|0)){k=0;O=137;break b}else{n=k;k=0;r=j}}else{if(i){k=nI(n)|0;if(!k){k=0;j=0;i=1;O=137;break b}else{q=n;j=0}while(1){do{n=c[A>>2]|0;if(n>>>0<(c[B>>2]|0)>>>0){c[A>>2]=n+1;n=d[n>>0]|0}else n=GI(b)|0;if(!(a[L+(n+1)>>0]|0)){n=j;r=0;j=0;break i}a[k+j>>0]=n;j=j+1|0}while((j|0)!=(q|0));j=q<<1|1;n=pI(k,j)|0;if(!n){j=0;i=1;O=137;break b}else{t=q;q=j;k=n;j=t}}}if(!x){k=q;while(1){j=c[A>>2]|0;if(j>>>0>>0){c[A>>2]=j+1;j=d[j>>0]|0}else j=GI(b)|0;if(!(a[L+(j+1)>>0]|0)){n=0;k=0;r=0;j=0;break i}k=c[B>>2]|0}}else{n=0;k=q;while(1){j=c[A>>2]|0;if(j>>>0>>0){c[A>>2]=j+1;j=d[j>>0]|0}else j=GI(b)|0;if(!(a[L+(j+1)>>0]|0)){k=x;r=0;j=0;break i}a[x+n>>0]=j;n=n+1|0;k=c[B>>2]|0}}}while(0);if(!(c[B>>2]|0))q=c[A>>2]|0;else{q=(c[A>>2]|0)+-1|0;c[A>>2]=q}q=q-(c[D>>2]|0)+(c[C>>2]|0)|0;if(!q){O=139;break b}if(!((q|0)==(p|0)|v^1)){O=139;break b}do if(i)if(s){c[x>>2]=r;break}else{c[x>>2]=k;break}while(0);if(!v){if(r|0)c[r+(n<<2)>>2]=0;if(!k){k=0;break f}a[k+n>>0]=0}break}case 120:case 88:case 112:{n=16;O=125;break}case 111:{n=8;O=125;break}case 117:case 100:{n=10;O=125;break}case 105:{n=0;O=125;break}case 71:case 103:case 70:case 102:case 69:case 101:case 65:case 97:{o=+yJ(b,t,0);if((c[C>>2]|0)==((c[D>>2]|0)-(c[A>>2]|0)|0)){O=139;break b}if(x)switch(t|0){case 0:{g[x>>2]=o;break f}case 1:{h[x>>3]=o;break f}case 2:{h[x>>3]=o;break f}default:break f}break}default:{}}while(0);do if((O|0)==125){O=0;n=FI(b,n,0,-1,-1)|0;if((c[C>>2]|0)==((c[D>>2]|0)-(c[A>>2]|0)|0)){O=139;break b}if(w&(s|0)==112){c[x>>2]=n;break}else{lK(x,t,n,z);break}}while(0);e=(w&1)+e|0;n=(c[C>>2]|0)+u+(c[A>>2]|0)-(c[D>>2]|0)|0;break c}while(0);m=m+(i&1)|0;EI(b,0);i=c[A>>2]|0;if(i>>>0<(c[B>>2]|0)>>>0){c[A>>2]=i+1;i=d[i>>0]|0}else i=GI(b)|0;if((i|0)!=(d[m>>0]|0)){O=22;break b}n=u+1|0}else{while(1){i=m+1|0;if(!(HI(d[i>>0]|0)|0))break;else m=i}EI(b,0);do{i=c[A>>2]|0;if(i>>>0<(c[B>>2]|0)>>>0){c[A>>2]=i+1;i=d[i>>0]|0}else i=GI(b)|0}while((HI(i)|0)!=0);if(!(c[B>>2]|0))i=c[A>>2]|0;else{i=(c[A>>2]|0)+-1|0;c[A>>2]=i}n=(c[C>>2]|0)+u+i-(c[D>>2]|0)|0}while(0);m=m+1|0;i=a[m>>0]|0;if(!(i<<24>>24))break a;else u=n}if((O|0)==22){if(c[B>>2]|0)c[A>>2]=(c[A>>2]|0)+-1;if((e|0)!=0|(i|0)>-1)break;else{i=0;O=138}}else if((O|0)==137){i=i&1;if(!e)O=138}else if((O|0)==139)i=i&1;if((O|0)==138)e=-1;if(i){oI(k);oI(j)}}else e=0;while(0);if(P|0)TI(b);l=Q;return e|0}function kK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;d=e;c[d>>2]=c[a>>2];while(1){f=(c[d>>2]|0)+(4-1)&~(4-1);a=c[f>>2]|0;c[d>>2]=f+4;if(b>>>0>1)b=b+-1|0;else break}l=e;return a|0}function lK(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;a:do if(d|0)switch(e|0){case -2:{a[d>>0]=f;break a}case -1:{b[d>>1]=f;break a}case 0:{c[d>>2]=f;break a}case 1:{c[d>>2]=f;break a}case 3:{e=d;c[e>>2]=f;c[e+4>>2]=g;break a}default:break a}while(0);return}function mK(a){a=a|0;if(!a)a=1;else a=(c[a>>2]|0)==0;return a&1|0}function nK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=a+84|0;g=c[e>>2]|0;h=d+256|0;f=$I(g,0,h)|0;f=(f|0)==0?h:f-g|0;d=f>>>0>>0?f:d;wW(b|0,g|0,d|0)|0;c[a+4>>2]=g+d;b=g+f|0;c[a+8>>2]=b;c[e>>2]=b;return d|0}function oK(a,b,c){a=a|0;b=b|0;c=c|0;return SJ(0,a,b,c|0?c:59860)|0}function pK(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,m=0,n=0,o=0;o=l;l=l+1040|0;k=o+8|0;m=o;j=c[b>>2]|0;c[m>>2]=j;n=(a|0)!=0;h=n?e:256;a=n?a:k;g=j;a:do if((h|0)!=0&(j|0)!=0){e=0;j=d;while(1){i=j>>>2;d=i>>>0>=h>>>0;if(!(j>>>0>131|d)){d=j;break a}g=d?h:i;d=j-g|0;g=qK(a,m,g,f)|0;if((g|0)==-1)break;j=(a|0)==(k|0);h=h-(j?0:g)|0;a=j?a:a+(g<<2)|0;e=g+e|0;g=c[m>>2]|0;if((h|0)!=0&(g|0)!=0)j=d;else break a}e=-1;h=0;g=c[m>>2]|0}else e=0;while(0);b:do if((g|0)!=0?(h|0)!=0&(d|0)!=0:0){i=a;while(1){a=SJ(i,g,d,f)|0;if((a+2|0)>>>0<3)break;g=(c[m>>2]|0)+a|0;c[m>>2]=g;d=d-a|0;h=h+-1|0;e=e+1|0;if(!((h|0)!=0&(d|0)!=0))break b;else i=i+4|0}switch(a|0){case -1:{e=-1;break b}case 0:{c[m>>2]=0;break b}default:{c[f>>2]=0;break b}}}while(0);if(n)c[b>>2]=c[m>>2];l=o;return e|0}function qK(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;h=c[e>>2]|0;if((g|0)!=0?(i=c[g>>2]|0,(i|0)!=0):0)if(!b){j=h;g=f;l=25}else{c[g>>2]=0;k=f;j=h;l=43}else l=5;a:do if((l|0)==5){g=(b|0)!=0;if(c[c[(rK()|0)+188>>2]>>2]|0)if(g){g=f;l=15;break}else{g=f;l=14;break}if(!g){f=LJ(h)|0;l=59;break}b:do if(f){g=f;while(1){i=a[h>>0]|0;if(!(i<<24>>24))break;h=h+1|0;c[b>>2]=i<<24>>24&57343;g=g+-1|0;if(!g)break b;else b=b+4|0}c[b>>2]=0;c[e>>2]=0;f=f-g|0;l=59;break a}while(0);c[e>>2]=h;l=59}while(0);c:while(1){d:do if((l|0)==14){while(1){i=a[h>>0]|0;if(((i&255)+-1|0)>>>0<127?(h&3|0)==0:0){l=c[h>>2]|0;i=l&255;if(!((l+-16843009|l)&-2139062144)){do{h=h+4|0;g=g+-4|0;i=c[h>>2]|0}while(!((i+-16843009|i)&-2139062144|0));i=i&255}}i=i&255;if((i+-1|0)>>>0>=127)break;h=h+1|0;g=g+-1|0}i=i+-194|0;if(i>>>0>50)l=53;else{i=c[34012+(i<<2)>>2]|0;j=h+1|0;l=25;continue c}}else if((l|0)==15){e:do if(g){while(1){i=a[h>>0]|0;do if(((i&255)+-1|0)>>>0<127?g>>>0>4&(h&3|0)==0:0){while(1){i=c[h>>2]|0;if((i+-16843009|i)&-2139062144|0){l=38;break}c[b>>2]=i&255;c[b+4>>2]=d[h+1>>0];c[b+8>>2]=d[h+2>>0];j=h+4|0;i=b+16|0;c[b+12>>2]=d[h+3>>0];g=g+-4|0;if(g>>>0>4){b=i;h=j}else{l=37;break}}if((l|0)==37){b=i;h=j;i=a[j>>0]|0;break}else if((l|0)==38){i=i&255;break}}while(0);i=i&255;if((i+-1|0)>>>0>=127)break;h=h+1|0;c[b>>2]=i;g=g+-1|0;if(!g)break e;else b=b+4|0}i=i+-194|0;if(i>>>0>50){l=53;break d}i=c[34012+(i<<2)>>2]|0;k=g;j=h+1|0;l=43;continue c}while(0);c[e>>2]=h;l=59;continue c}else if((l|0)==25){l=(d[j>>0]|0)>>>3;if((l+-16|l+(i>>26))>>>0>7){h=j;l=52}else{h=j+1|0;if(i&33554432){if((a[h>>0]&-64)<<24>>24!=-128){h=j;l=52;break}h=j+2|0;if(i&524288){if((a[h>>0]&-64)<<24>>24!=-128){h=j;l=52;break}h=j+3|0}}g=g+-1|0;l=14;continue c}}else if((l|0)==43){l=0;g=d[j>>0]|0;h=g>>>3;if((h+-16|h+(i>>26))>>>0>7){h=j;g=k;l=52}else{h=j+1|0;g=g+-128|i<<6;do if((g|0)<0){i=(d[h>>0]|0)+-128|0;if(i>>>0>63){h=j+-1|0;f=b;break d}h=j+2|0;g=i|g<<6;if((g|0)<0){i=(d[h>>0]|0)+-128|0;if(i>>>0>63){h=j+-1|0;f=b;break d}else{h=j+3|0;g=i|g<<6;break}}}while(0);c[b>>2]=g;b=b+4|0;g=k+-1|0;l=15;continue c}}else if((l|0)==59)return f|0;while(0);if((l|0)==52){l=0;h=h+-1|0;if(!i)l=53;else f=b}if((l|0)==53)if(!(a[h>>0]|0)){if(b|0){c[b>>2]=0;c[e>>2]=0}f=f-g|0;l=59;continue}else f=b;c[(xI()|0)>>2]=84;if(!f){f=-1;l=59;continue}c[e>>2]=h;f=-1;l=59}return 0}function rK(){return zI()|0}function sK(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,m=0;m=l;l=l+272|0;i=m+8|0;j=m;h=c[b>>2]|0;c[j>>2]=h;k=(a|0)!=0;g=k?e:256;a=k?a:i;e=h;a:do if((g|0)!=0&(h|0)!=0){f=0;h=e;while(1){e=d>>>0>=g>>>0;if(!(e|d>>>0>32)){e=h;break a}e=e?g:d;d=d-e|0;e=tK(a,j,e,0)|0;if((e|0)==-1)break;h=(a|0)==(i|0);g=g-(h?0:e)|0;a=h?a:a+e|0;f=e+f|0;e=c[j>>2]|0;if((g|0)!=0&(e|0)!=0)h=e;else break a}f=-1;g=0;e=c[j>>2]|0}else f=0;while(0);b:do if((e|0)!=0?(g|0)!=0&(d|0)!=0:0){h=a;while(1){a=gJ(h,c[e>>2]|0,0)|0;if((a+1|0)>>>0<2)break;e=(c[j>>2]|0)+4|0;c[j>>2]=e;d=d+-1|0;g=g-a|0;f=a+f|0;if(!((g|0)!=0&(d|0)!=0))break b;else h=h+a|0}if(!a)c[j>>2]=0;else f=-1}while(0);if(k)c[b>>2]=c[j>>2];l=m;return f|0}function tK(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;j=l;l=l+16|0;i=j;a:do if(!b){e=c[d>>2]|0;f=c[e>>2]|0;if(!f)e=0;else{b=e;e=0;do{if(f>>>0>127){f=gJ(i,f,0)|0;if((f|0)==-1){e=-1;break a}}else f=1;e=f+e|0;b=b+4|0;f=c[b>>2]|0}while((f|0)!=0)}}else{b:do if(e>>>0>3){f=e;g=c[d>>2]|0;while(1){h=c[g>>2]|0;if((h+-1|0)>>>0>126){if(!h)break;h=gJ(b,h,0)|0;if((h|0)==-1){e=-1;break a}b=b+h|0;f=f-h|0}else{a[b>>0]=h;b=b+1|0;f=f+-1|0;g=c[d>>2]|0}g=g+4|0;c[d>>2]=g;if(f>>>0<=3)break b}a[b>>0]=0;c[d>>2]=0;e=e-f|0;break a}else f=e;while(0);if(f){g=c[d>>2]|0;while(1){h=c[g>>2]|0;if((h+-1|0)>>>0>126){if(!h){g=19;break}h=gJ(i,h,0)|0;if((h|0)==-1){e=-1;break a}if(f>>>0>>0){g=22;break}gJ(b,c[g>>2]|0,0)|0;b=b+h|0;f=f-h|0}else{a[b>>0]=h;b=b+1|0;f=f+-1|0;g=c[d>>2]|0}g=g+4|0;c[d>>2]=g;if(!f)break a}if((g|0)==19){a[b>>0]=0;c[d>>2]=0;e=e-f|0;break}else if((g|0)==22){e=e-f|0;break}}}while(0);l=j;return e|0}function uK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h;c[e>>2]=c[d>>2];e=PI(0,0,b,e)|0;if((e|0)>=0?(f=e+1|0,g=nI(f)|0,c[a>>2]=g,(g|0)!=0):0)a=PI(g,f,b,d)|0;else a=-1;l=h;return a|0}function vK(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=b&255;e=b&255;if((c[d+76>>2]|0)>=0?(SI(d)|0)!=0:0){if((e|0)!=(a[d+75>>0]|0)?(h=d+20|0,i=c[h>>2]|0,i>>>0<(c[d+16>>2]|0)>>>0):0){c[h>>2]=i+1;a[i>>0]=j}else e=cK(d,b)|0;TI(d)}else k=3;do if((k|0)==3){if((e|0)!=(a[d+75>>0]|0)?(f=d+20|0,g=c[f>>2]|0,g>>>0<(c[d+16>>2]|0)>>>0):0){c[f>>2]=g+1;a[g>>0]=j;break}e=cK(d,b)|0}while(0);return e|0}function wK(a,b){a=a|0;b=b|0;return +(+xK(a,b,1))}function xK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,g=0,h=0,i=0;i=l;l=l+128|0;h=i;f=h;g=f+124|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));f=h+4|0;c[f>>2]=a;g=h+8|0;c[g>>2]=-1;c[h+44>>2]=a;c[h+76>>2]=-1;EI(h,0);e=+yJ(h,d,1);d=(c[f>>2]|0)-(c[g>>2]|0)+(c[h+108>>2]|0)|0;if(b|0)c[b>>2]=d|0?a+d|0:a;l=i;return +e}function yK(a,b){a=a|0;b=b|0;return +(+xK(a,b,0))}function zK(a,b){a=a|0;b=b|0;return +(+xK(a,b,2))}function AK(a,b,c){a=a|0;b=b|0;c=c|0;return +(+yK(a,b))}function BK(a,b,c){a=a|0;b=b|0;c=c|0;return +(+wK(a,b))}function CK(a,b,c){a=a|0;b=b|0;c=c|0;return +(+zK(a,b))}function DK(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;e=_I(b)|0;b=LJ(e)|0;if(b>>>0>=d>>>0){b=d+-1|0;if(!d)b=34;else{wW(c|0,e|0,b|0)|0;a[c+b>>0]=0;b=34}}else{wW(c|0,e|0,b+1|0)|0;b=0}return b|0}function EK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if(d|0){e=a;while(1){d=d+-1|0;c[e>>2]=b;if(!d)break;else e=e+4|0}}return a|0}function FK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if(a-b>>2>>>0>=d>>>0){if(d|0){e=a;while(1){d=d+-1|0;c[e>>2]=c[b>>2];if(!d)break;else{b=b+4|0;e=e+4|0}}}}else do{d=d+-1|0;c[a+(d<<2)>>2]=c[b+(d<<2)>>2]}while((d|0)!=0);return a|0}function GK(a){a=a|0;HK(a);return}function HK(a){a=a|0;var b=0;c[a>>2]=37844;o=0;Xa(370,a|0,0);b=o;o=0;if(b&1){b=Gb(0)|0;_g(b)}else{WL(a+28|0);oI(c[a+32>>2]|0);oI(c[a+36>>2]|0);oI(c[a+48>>2]|0);oI(c[a+60>>2]|0);return}}function IK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=a+32|0;f=a+36|0;d=c[a+40>>2]|0;while(1){if(!d)break;g=d+-1|0;nd[c[(c[e>>2]|0)+(g<<2)>>2]&255](b,a,c[(c[f>>2]|0)+(g<<2)>>2]|0);d=g}return}function JK(a){a=a|0;HK(a);cU(a);return}function KK(a){a=a|0;c[a>>2]=37860;WL(a+4|0);return}function LK(a){a=a|0;KK(a);cU(a);return}function MK(a,b){a=a|0;b=b|0;return}function NK(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function OK(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;g=a;c[g>>2]=0;c[g+4>>2]=0;g=a+8|0;c[g>>2]=-1;c[g+4>>2]=-1;return}function PK(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;e=a;c[e>>2]=0;c[e+4>>2]=0;e=a+8|0;c[e>>2]=-1;c[e+4>>2]=-1;return}function QK(a){a=a|0;return 0}function RK(a){a=a|0;return 0}function SK(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;Qg()|0;i=b+12|0;j=b+16|0;h=0;while(1){if((h|0)>=(e|0))break;f=c[i>>2]|0;g=c[j>>2]|0;if(f>>>0>>0){g=g-f|0;k=e-h|0;g=(k|0)<(g|0)?k:g;_i(d,f,g)|0;c[i>>2]=(c[i>>2]|0)+g;d=d+g|0;h=g+h|0;continue}f=Qc[c[(c[b>>2]|0)+40>>2]&255](b)|0;if((f|0)==-1)break;a[d>>0]=jh(f)|0;d=d+1|0;h=h+1|0}return h|0}function TK(a){a=a|0;return Qg()|0}function UK(b){b=b|0;var d=0;d=Qc[c[(c[b>>2]|0)+36>>2]&255](b)|0;if((d|0)==(Qg()|0))b=Qg()|0;else{d=b+12|0;b=c[d>>2]|0;c[d>>2]=b+1;b=bh(a[b>>0]|0)|0}return b|0}function VK(a,b){a=a|0;b=b|0;return Qg()|0}function WK(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;i=Qg()|0;j=b+24|0;k=b+28|0;f=0;while(1){if((f|0)>=(e|0))break;g=c[j>>2]|0;h=c[k>>2]|0;if(g>>>0>>0){h=h-g|0;l=e-f|0;h=(l|0)<(h|0)?l:h;_i(g,d,h)|0;c[j>>2]=(c[j>>2]|0)+h;d=d+h|0;f=h+f|0;continue}h=c[(c[b>>2]|0)+52>>2]|0;l=bh(a[d>>0]|0)|0;if((Sc[h&127](b,l)|0)==(i|0))break;d=d+1|0;f=f+1|0}return f|0}function XK(a,b){a=a|0;b=b|0;return Qg()|0}function YK(){return -1}function ZK(a){a=a|0;return a|0}function _K(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c|0)!=0?(o=0,la(100,a|0,b|0,c|0)|0,c=o,o=0,c&1):0){c=Gb(0)|0;_g(c)}else d=a;return d|0}function $K(a){a=a|0;dL(a,37956);GK(a+4|0);return}function aL(a){a=a|0;$K(a);cU(a);return}function bL(a){a=a|0;$K(a+(c[(c[a>>2]|0)+-12>>2]|0)|0);return}function cL(a){a=a|0;aL(a+(c[(c[a>>2]|0)+-12>>2]|0)|0);return}function dL(a,b){a=a|0;b=b|0;return}function eL(a){a=a|0;cU(a);return}function fL(a){a=a|0;return 54484}function gL(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;g=l;l=l+16|0;f=g;if((e|0)!=1&(e|0)<257)SU(b,d,e);else{c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;d=Uh(54448)|0;if(d>>>0>4294967279)lU(b);if(d>>>0<11)a[b+11>>0]=d;else{h=d+16&-16;e=aU(h)|0;c[b>>2]=e;c[b+8>>2]=h|-2147483648;c[b+4>>2]=d;b=e}_i(b,54448,d)|0;a[f>>0]=0;ah(b+d|0,f)}l=g;return}function hL(a){a=a|0;UU(a);return}function iL(a){a=a|0;hL(a);cU(a);return}function jL(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;b=(c[a+24>>2]|0)==0|b;c[a+16>>2]=b;if(!(b&c[a+20>>2])){l=d;return}a=Ab(16)|0;kL()|0;c[e>>2]=1;c[e+4>>2]=38020;o=0;bb(151,a|0,54549,e|0);e=o;o=0;if(e&1){e=Fb()|0;Jb(a|0);a=e}else{o=0;bb(68,a|0,1880,227);o=0;a=Fb()|0}Qb(a|0)}function kL(){(a[57944]|0)==0?cW(57944)|0:0;return 38020}function lL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;f=e+8|0;g=e;i=d;h=c[i+4>>2]|0;d=g;c[d>>2]=c[i>>2];c[d+4>>2]=h;c[f>>2]=c[g>>2];c[f+4>>2]=c[g+4>>2];YU(a,f,b);c[a>>2]=38008;l=e;return}function mL(a,b){a=a|0;b=b|0;var d=0;c[a+24>>2]=b;c[a+16>>2]=(b|0)==0&1;c[a+20>>2]=0;c[a+4>>2]=4098;c[a+12>>2]=0;c[a+8>>2]=6;d=a+28|0;b=a+32|0;a=b+40|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(a|0));VT(d);return}function nL(a,b){a=a|0;b=b|0;TT(a,b+28|0);return}function oL(a,b){a=a|0;b=b|0;return (a|0)==(b|0)|0}function pL(a){a=a|0;c[a>>2]=37860;VT(a+4|0);a=a+8|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 qL(b){b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;a:do if(c[b+(c[(c[b>>2]|0)+-12>>2]|0)+24>>2]|0){o=0;Xa(106,d|0,b|0);e=o;o=0;b:do if(e&1)d=Gb(0)|0;else{do if(a[d>>0]|0){e=c[b+(c[(c[b>>2]|0)+-12>>2]|0)+24>>2]|0;o=0;e=fa(c[(c[e>>2]|0)+24>>2]|0,e|0)|0;g=o;o=0;if(!(g&1)){if((e|0)!=-1)break;g=b+(c[(c[b>>2]|0)+-12>>2]|0)|0;o=0;Xa(108,g|0,c[g+16>>2]|1|0);g=o;o=0;if(!(g&1))break}g=Gb(0)|0;sL(d);d=g;break b}while(0);sL(d);break a}while(0);Bb(d|0)|0;o=0;Na(314,b+(c[(c[b>>2]|0)+-12>>2]|0)|0);g=o;o=0;if(!(g&1)){Db();break}d=Fb()|0;o=0;La(44);g=o;o=0;if(g&1){g=Gb(0)|0;_g(g)}else Qb(d|0)}while(0);l=f;return b|0}function rL(b,d){b=b|0;d=d|0;a[b>>0]=0;c[b+4>>2]=d;d=d+(c[(c[d>>2]|0)+-12>>2]|0)|0;if(!(c[d+16>>2]|0)){d=c[d+72>>2]|0;if(d|0)qL(d)|0;a[b>>0]=1}return}function sL(a){a=a|0;var b=0,d=0;a=a+4|0;b=c[a>>2]|0;b=b+(c[(c[b>>2]|0)+-12>>2]|0)|0;do if(((c[b+24>>2]|0?(c[b+16>>2]|0)==0:0)?c[b+4>>2]&8192|0:0)?!(xb()|0):0){b=c[a>>2]|0;b=c[b+(c[(c[b>>2]|0)+-12>>2]|0)+24>>2]|0;o=0;b=fa(c[(c[b>>2]|0)+24>>2]|0,b|0)|0;d=o;o=0;if(!(d&1)){if((b|0)!=-1)break;d=c[a>>2]|0;d=d+(c[(c[d>>2]|0)+-12>>2]|0)|0;o=0;Xa(108,d|0,c[d+16>>2]|1|0);d=o;o=0;if(!(d&1))break}d=Gb(0)|0;Bb(d|0)|0;o=0;La(44);d=o;o=0;if(d&1){d=Gb(0)|0;_g(d)}}while(0);return}function tL(a){a=a|0;var b=0;b=a+16|0;c[b>>2]=c[b>>2]|1;if(!(c[a+20>>2]&1))return;else Lb()}function uL(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0;q=l;l=l+16|0;i=q+12|0;k=q+8|0;n=q;o=0;Xa(106,n|0,b|0);m=o;o=0;a:do if(m&1){e=Gb(0)|0;p=20}else{b:do if(a[n>>0]|0){nL(i,b+(c[(c[b>>2]|0)+-12>>2]|0)|0);o=0;j=ja(57,i|0,59936)|0;m=o;o=0;c:do if(m&1){e=Gb(0)|0;WL(i)}else{WL(i);f=b+(c[(c[b>>2]|0)+-12>>2]|0)|0;m=c[f+24>>2]|0;e=Qg()|0;h=f+76|0;do if(Yg(e,c[h>>2]|0)|0){nL(i,f);o=0;e=ja(57,i|0,59880)|0;r=o;o=0;if(!(r&1)?(o=0,g=ja(c[(c[e>>2]|0)+28>>2]|0,e|0,32)|0,r=o,o=0,!(r&1)):0){WL(i);e=g<<24>>24;c[h>>2]=e;p=10;break}e=Gb(0)|0;WL(i)}else{e=c[h>>2]|0;p=10}while(0);do if((p|0)==10){r=c[(c[j>>2]|0)+16>>2]|0;c[k>>2]=m;o=0;c[i>>2]=c[k>>2];e=va(r|0,j|0,i|0,f|0,e&255|0,d|0)|0;r=o;o=0;if(r&1){e=Gb(0)|0;break}if(e|0)break b;r=b+(c[(c[b>>2]|0)+-12>>2]|0)|0;o=0;Xa(108,r|0,c[r+16>>2]|5|0);r=o;o=0;if(!(r&1))break b;e=Gb(0)|0;break c}while(0)}while(0);sL(n);p=20;break a}while(0);sL(n)}while(0);do if((p|0)==20){Bb(e|0)|0;o=0;Na(314,b+(c[(c[b>>2]|0)+-12>>2]|0)|0);r=o;o=0;if(!(r&1)){Db();break}e=Fb()|0;o=0;La(44);r=o;o=0;if(r&1){r=Gb(0)|0;_g(r)}else Qb(e|0)}while(0);l=q;return b|0}function vL(a){a=a|0;BL(a);return}function wL(a){a=a|0;vL(a);cU(a);return}function xL(a){a=a|0;if(a|0)fd[c[(c[a>>2]|0)+4>>2]&511](a);return}function yL(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;b=c;while(1){if((e|0)==(f|0)){h=7;break}if((b|0)==(d|0)){b=-1;break}c=a[b>>0]|0;g=a[e>>0]|0;if(c<<24>>24>24){b=-1;break}if(g<<24>>24>24){b=1;break}e=e+1|0;b=b+1|0}if((h|0)==7)b=(b|0)!=(d|0)&1;return b|0}function zL(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;j=l;l=l+16|0;h=j;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;i=f-e|0;if(i>>>0>4294967279)lU(b);if(i>>>0<11){a[b+11>>0]=i;g=b}else{d=i+16&-16;g=aU(d)|0;c[b>>2]=g;c[b+8>>2]=d|-2147483648;c[b+4>>2]=i}d=e;b=g;while(1){if((d|0)==(f|0))break;ah(b,d);d=d+1|0;b=b+1|0}a[h>>0]=0;ah(g+i|0,h);l=j;return}function AL(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;b=0;while(1){if((c|0)==(d|0))break;e=(a[c>>0]|0)+(b<<4)|0;f=e&-268435456;b=(f>>>24|f)^e;c=c+1|0}return b|0}function BL(a){a=a|0;return}function CL(a){a=a|0;BL(a);return}function DL(a){a=a|0;CL(a);cU(a);return}function EL(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;a=b;while(1){if((e|0)==(f|0)){h=7;break}if((a|0)==(d|0)){a=-1;break}b=c[a>>2]|0;g=c[e>>2]|0;if((b|0)<(g|0)){a=-1;break}if((g|0)<(b|0)){a=1;break}e=e+4|0;a=a+4|0}if((h|0)==7)a=(a|0)!=(d|0)&1;return a|0}function FL(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;i=l;l=l+16|0;h=i;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;g=f-e>>2;if(g>>>0>1073741807)lU(b);do if(g>>>0>=2){d=g+4&-4;if(d>>>0<=1073741823){j=aU(d<<2)|0;c[b>>2]=j;c[b+8>>2]=d|-2147483648;c[b+4>>2]=g;d=j;break}d=Ab(8)|0;o=0;Xa(98,d|0,56853);j=o;o=0;if(j&1){j=Fb()|0;Jb(d|0);Qb(j|0)}else{c[d>>2]=41052;Mb(d|0,3176,299)}}else{a[b+8+3>>0]=g;d=b}while(0);while(1){if((e|0)==(f|0))break;HL(d,e);e=e+4|0;d=d+4|0}c[h>>2]=0;HL(d,h);l=i;return}function GL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;a=0;while(1){if((b|0)==(d|0))break;e=(c[b>>2]|0)+(a<<4)|0;f=e&-268435456;a=(f>>>24|f)^e;b=b+4|0}return a|0}function HL(a,b){a=a|0;b=b|0;c[a>>2]=c[b>>2];return}function IL(a){a=a|0;BL(a);return}function JL(a){a=a|0;BL(a);cU(a);return}function KL(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0;p=l;l=l+48|0;m=p+40|0;q=p+16|0;i=p+12|0;j=p+8|0;k=p+4|0;n=p;a:do if(!(c[f+4>>2]&1)){c[i>>2]=-1;n=c[(c[b>>2]|0)+16>>2]|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];c[q>>2]=c[j>>2];c[m>>2]=c[k>>2];c[d>>2]=_c[n&127](b,q,m,f,g,i)|0;switch(c[i>>2]|0){case 0:{a[h>>0]=0;break}case 1:{a[h>>0]=1;break}default:{a[h>>0]=1;c[g>>2]=4}}b=c[d>>2]|0}else{nL(m,f);o=0;j=ja(57,m|0,59880)|0;k=o;o=0;do if(!(k&1)){WL(m);nL(m,f);o=0;b=ja(57,m|0,59896)|0;f=o;o=0;if(f&1){b=Fb()|0;WL(m);break}WL(m);o=0;Xa(c[(c[b>>2]|0)+24>>2]|0,q|0,b|0);f=o;o=0;if(f&1){b=Fb()|0;break}o=0;Xa(c[(c[b>>2]|0)+28>>2]|0,q+12|0,b|0);f=o;o=0;if(f&1){b=Fb()|0;pU(q);break}c[n>>2]=c[e>>2];i=q+24|0;o=0;c[m>>2]=c[n>>2];b=Ba(48,d|0,m|0,q|0,i|0,j|0,g|0,1)|0;n=o;o=0;if(n&1){b=Fb()|0;j=z;do{i=i+-12|0;pU(i)}while((i|0)!=(q|0));break}else{a[h>>0]=(b|0)==(q|0)&1;b=c[d>>2]|0;do{i=i+-12|0;pU(i)}while((i|0)!=(q|0));break a}}else{b=Fb()|0;WL(m)}while(0);Qb(b|0)}while(0);l=p;return b|0}function LL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=AM(a,j,i,e,f,g)|0;l=h;return g|0}function ML(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=yM(a,j,i,e,f,g)|0;l=h;return g|0}function NL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=wM(a,j,i,e,f,g)|0;l=h;return g|0}function OL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=uM(a,j,i,e,f,g)|0;l=h;return g|0}function PL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=sM(a,j,i,e,f,g)|0;l=h;return g|0}function QL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=oM(a,j,i,e,f,g)|0;l=h;return g|0}function RL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=mM(a,j,i,e,f,g)|0;l=h;return g|0}function SL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=kM(a,j,i,e,f,g)|0;l=h;return g|0}function TL(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,m=0;h=l;l=l+16|0;i=h+12|0;j=h+8|0;m=h+4|0;k=h;c[m>>2]=c[b>>2];c[k>>2]=c[d>>2];c[j>>2]=c[m>>2];c[i>>2]=c[k>>2];g=fM(a,j,i,e,f,g)|0;l=h;return g|0}function UL(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+240|0;v=E;t=E+204|0;G=E+192|0;F=E+180|0;u=E+176|0;q=E+16|0;r=E+8|0;s=E+4|0;c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[G+(b<<2)>>2]=0;b=b+1|0}o=0;Xa(107,F|0,f|0);p=o;o=0;do if(p&1){b=Fb()|0;H=36}else{o=0;b=ja(57,F|0,59880)|0;p=o;o=0;if(!(p&1)?(o=0,pa(c[(c[b>>2]|0)+32>>2]|0,b|0,54627,54653,t|0)|0,p=o,o=0,!(p&1)):0){WL(F);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}p=F+11|0;if((a[p>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);n=o;o=0;if(n&1)b=Fb()|0;else{j=(a[p>>0]|0)<0?c[F>>2]|0:F;c[u>>2]=j;c[r>>2]=q;c[s>>2]=0;m=F+4|0;n=F+8|0;i=c[d>>2]|0;f=i;a:while(1){if(f){b=c[f+12>>2]|0;if((b|0)==(c[f+16>>2]|0)){o=0;b=fa(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;k=o;o=0;if(k&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;x=0;C=0;f=1}else{x=f;C=i;f=0}}else{x=0;C=0;f=1}i=c[e>>2]|0;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;k=o;o=0;if(k&1)break a}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{w=j;D=i;H=46;break a}else{c[e>>2]=0;H=26;break}}else H=26;while(0);if((H|0)==26){H=0;if(f){w=j;D=0;H=46;break}else i=0}f=a[p>>0]|0;f=f<<24>>24<0?c[m>>2]|0:f&255;if((c[u>>2]|0)==(j+f|0)){o=0;bb(58,F|0,f<<1|0,0);k=o;o=0;if(k&1)break;if((a[p>>0]|0)<0)b=(c[n>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);k=o;o=0;if(k&1)break;k=(a[p>>0]|0)<0?c[F>>2]|0:F;c[u>>2]=k+f;f=k}else f=j;j=x+12|0;b=c[j>>2]|0;k=x+16|0;if((b|0)==(c[k>>2]|0)){o=0;b=fa(c[(c[x>>2]|0)+36>>2]|0,x|0)|0;I=o;o=0;if(I&1)break}else b=bh(a[b>>0]|0)|0;o=0;b=Fa(42,b&255|0,16,f|0,u|0,s|0,0,G|0,q|0,r|0,t|0)|0;I=o;o=0;if(I&1)break;if(b|0){w=f;D=i;H=46;break}b=c[j>>2]|0;if((b|0)==(c[k>>2]|0)){o=0;fa(c[(c[x>>2]|0)+40>>2]|0,x|0)|0;I=o;o=0;if(I&1)break;else{j=f;f=x;i=C;continue}}else{c[j>>2]=b+1;bh(a[b>>0]|0)|0;j=f;f=x;i=C;continue}}b:do if((((H|0)==46?(o=0,bb(58,F|0,(c[u>>2]|0)-w|0,0),I=o,o=0,!(I&1)):0)?(y=a[p>>0]|0,z=c[F>>2]|0,o=0,A=da(44)|0,I=o,o=0,!(I&1)):0)?(o=0,c[v>>2]=h,B=pa(58,(y<<24>>24<0?z:F)|0,A|0,54660,v|0)|0,I=o,o=0,!(I&1)):0){if((B|0)!=1)c[g>>2]=4;if(x){b=c[x+12>>2]|0;if((b|0)==(c[x+16>>2]|0)){o=0;b=fa(c[(c[C>>2]|0)+36>>2]|0,x|0)|0;I=o;o=0;if(I&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(D){b=c[D+12>>2]|0;if((b|0)==(c[D+16>>2]|0)){o=0;b=fa(c[(c[D>>2]|0)+36>>2]|0,D|0)|0;I=o;o=0;if(I&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{H=65;break}else{c[e>>2]=0;H=63;break}}else H=63;while(0);if((H|0)==63?f:0)H=65;if((H|0)==65)c[g>>2]=c[g>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}while(0);b=Fb()|0}pU(F);break}b=Fb()|0;WL(F);H=36}while(0);pU(G);Qb(b|0);return 0}function VL(a,b){a=a|0;b=b|0;a=c[a>>2]|0;return $L(a,_L(b)|0)|0}function WL(a){a=a|0;ZT(c[a>>2]|0)|0;return}function XL(b,d,e,f,g,h,i,j,k,l){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0;o=c[f>>2]|0;p=(o|0)==(e|0);do if(p){m=(a[l+24>>0]|0)==b<<24>>24;if(!m?(a[l+25>>0]|0)!=b<<24>>24:0){n=5;break}c[f>>2]=e+1;a[e>>0]=m?43:45;c[g>>2]=0;m=0}else n=5;while(0);a:do if((n|0)==5){n=a[i+11>>0]|0;if(b<<24>>24==h<<24>>24?((n<<24>>24<0?c[i+4>>2]|0:n&255)|0)!=0:0){m=c[k>>2]|0;if((m-j|0)>=160){m=0;break}f=c[g>>2]|0;c[k>>2]=m+4;c[m>>2]=f;c[g>>2]=0;m=0;break}i=l+26|0;h=0;while(1){m=l+h|0;if((h|0)==26){m=i;break}if((a[m>>0]|0)==b<<24>>24)break;else h=h+1|0}m=m-l|0;if((m|0)>23)m=-1;else{h=54627+m|0;switch(d|0){case 10:case 8:{if((m|0)>=(d|0)){m=-1;break a}break}case 16:{if((m|0)>=22){if(p){m=-1;break a}if((o-e|0)>=3){m=-1;break a}if((a[o+-1>>0]|0)!=48){m=-1;break a}c[g>>2]=0;m=a[h>>0]|0;c[f>>2]=o+1;a[o>>0]=m;m=0;break a}break}default:{}}m=a[h>>0]|0;c[f>>2]=o+1;a[o>>0]=m;c[g>>2]=(c[g>>2]|0)+1;m=0}}while(0);return m|0}function YL(){var b=0,d=0;do if((a[57952]|0)==0?cW(57952)|0:0){o=0;b=la(101,2147483647,54663,0)|0;d=o;o=0;if(d&1){d=Fb()|0;Qb(d|0)}else{c[14972]=b;break}}while(0);return c[14972]|0}function ZL(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=l;l=l+16|0;g=f;c[g>>2]=e;e=$J(b)|0;b=hK(a,d,g)|0;if(e|0?(o=0,fa(165,e|0)|0,g=o,o=0,g&1):0){g=Gb(0)|0;_g(g)}l=f;return b|0}function _L(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=l;l=l+48|0;b=f+32|0;d=f+24|0;e=f;g=f+16|0;c[g>>2]=351;c[g+4>>2]=0;c[b>>2]=c[g>>2];c[b+4>>2]=c[g+4>>2];cM(e,b,a);if((c[a>>2]|0)!=-1){c[b>>2]=e;c[d>>2]=b;$T(a,d,352)}l=f;return (c[a+4>>2]|0)+-1|0}function $L(a,b){a=a|0;b=b|0;if(aM(a,b)|0)return c[(c[a+8>>2]|0)+(b<<2)>>2]|0;else{b=Ab(4)|0;bW(b);Mb(b|0,3208,305)}return 0}function aM(a,b){a=a|0;b=b|0;var d=0;d=c[a+8>>2]|0;if((c[a+12>>2]|0)-d>>2>>>0>b>>>0)a=(c[d+(b<<2)>>2]|0)!=0;else a=0;return a|0}function bM(a){a=a|0;var b=0;b=c[14973]|0;c[14973]=b+1;c[a+4>>2]=b+1;return}function cM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[b>>2]|0;b=c[b+4>>2]|0;c[a>>2]=d;c[a+4>>2]=e;c[a+8>>2]=b;return}function dM(a){a=a|0;eM(c[c[a>>2]>>2]|0);return}function eM(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;e=c[a+8>>2]|0;d=(c[a>>2]|0)+(e>>1)|0;if(!(e&1))a=b;else a=c[(c[d>>2]|0)+b>>2]|0;fd[a&511](d);return}function fM(b,d,e,f,g,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+240|0;v=E+200|0;w=E+199|0;x=E+198|0;G=E+184|0;F=E+172|0;y=E+168|0;B=E+8|0;C=E+4|0;z=E;A=E+197|0;u=E+196|0;gM(G,f,v,w,x);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}t=F+11|0;if((a[t>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);s=o;o=0;if(s&1)b=Fb()|0;else{b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b;c[C>>2]=B;c[z>>2]=0;a[A>>0]=1;a[u>>0]=69;r=F+4|0;s=F+8|0;m=c[d>>2]|0;k=m;a:while(1){if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;q=o;o=0;if(q&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;q=0;m=0;n=1}else{q=k;n=0}}else{q=0;m=0;n=1}k=c[e>>2]|0;do if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;p=o;o=0;if(p&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(n)break;else{H=37;break a}else{c[e>>2]=0;H=20;break}}else H=20;while(0);if((H|0)==20){H=0;if(n){k=0;H=37;break}else k=0}f=a[t>>0]|0;f=f<<24>>24<0?c[r>>2]|0:f&255;if((c[y>>2]|0)==(b+f|0)){o=0;bb(58,F|0,f<<1|0,0);p=o;o=0;if(p&1)break;if((a[t>>0]|0)<0)b=(c[s>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);p=o;o=0;if(p&1)break;b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b+f}n=q+12|0;f=c[n>>2]|0;p=q+16|0;if((f|0)==(c[p>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Ja(42,f&255|0,A|0,u|0,b|0,y|0,a[w>>0]|0,a[x>>0]|0,G|0,B|0,C|0,z|0,v|0)|0;I=o;o=0;if(I&1)break;if(f|0){H=37;break}f=c[n>>2]|0;if((f|0)==(c[p>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;I=o;o=0;if(I&1)break;else{k=q;continue}}else{c[n>>2]=f+1;bh(a[f>>0]|0)|0;k=q;continue}}b:do if((H|0)==37){I=a[G+11>>0]|0;if(!((a[A>>0]|0)==0?1:((I<<24>>24<0?c[G+4>>2]|0:I&255)|0)==0)?(D=c[C>>2]|0,(D-B|0)<160):0){I=c[z>>2]|0;c[C>>2]=D+4;c[D>>2]=I}o=0;j=+$(44,b|0,c[y>>2]|0,g|0);I=o;o=0;if(!(I&1)?(h[i>>3]=j,o=0,db(107,G|0,B|0,c[C>>2]|0,g|0),I=o,o=0,!(I&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[m>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(k){b=c[k+12>>2]|0;if((b|0)==(c[k+16>>2]|0)){o=0;b=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;I=o;o=0;if(I&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{H=56;break}else{c[e>>2]=0;H=54;break}}else H=54;while(0);if((H|0)==54?f:0)H=56;if((H|0)==56)c[g>>2]=c[g>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}}while(0);b=Fb()|0}pU(F);pU(G);Qb(b|0);return 0}function gM(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,m=0,n=0;m=l;l=l+16|0;k=m;nL(k,d);o=0;d=ja(57,k|0,59880)|0;n=o;o=0;if(((((!(n&1)?(o=0,pa(c[(c[d>>2]|0)+32>>2]|0,d|0,54627,54659,e|0)|0,n=o,o=0,!(n&1)):0)?(o=0,h=ja(57,k|0,59896)|0,n=o,o=0,!(n&1)):0)?(o=0,i=fa(c[(c[h>>2]|0)+12>>2]|0,h|0)|0,n=o,o=0,!(n&1)):0)?(a[f>>0]=i,o=0,j=fa(c[(c[h>>2]|0)+16>>2]|0,h|0)|0,n=o,o=0,!(n&1)):0)?(a[g>>0]=j,o=0,Xa(c[(c[h>>2]|0)+20>>2]|0,b|0,h|0),n=o,o=0,!(n&1)):0){WL(k);l=m;return}n=Fb()|0;WL(k);Qb(n|0)}function hM(b,d,e,f,g,h,i,j,k,l,m,n){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0;p=k;a:do if(b<<24>>24==h<<24>>24)if(a[d>>0]|0){a[d>>0]=0;e=c[g>>2]|0;c[g>>2]=e+1;a[e>>0]=46;g=a[j+11>>0]|0;if(((g<<24>>24<0?c[j+4>>2]|0:g&255)|0)!=0?(o=c[l>>2]|0,(o-p|0)<160):0){k=c[m>>2]|0;c[l>>2]=o+4;c[o>>2]=k;k=0}else k=0}else k=-1;else{if(b<<24>>24==i<<24>>24?(i=a[j+11>>0]|0,(i<<24>>24<0?c[j+4>>2]|0:i&255)|0):0){if(!(a[d>>0]|0)){k=-1;break}k=c[l>>2]|0;if((k-p|0)>=160){k=0;break}g=c[m>>2]|0;c[l>>2]=k+4;c[k>>2]=g;c[m>>2]=0;k=0;break}h=n+32|0;o=0;while(1){k=n+o|0;if((o|0)==32){k=h;break}if((a[k>>0]|0)==b<<24>>24)break;else o=o+1|0}o=k-n|0;if((o|0)>31)k=-1;else{h=a[54627+o>>0]|0;switch(o|0){case 24:case 25:{k=c[g>>2]|0;if((k|0)!=(f|0)?(a[k+-1>>0]&95)!=(a[e>>0]&127):0){k=-1;break a}c[g>>2]=k+1;a[k>>0]=h;k=0;break a}case 23:case 22:{a[e>>0]=80;k=c[g>>2]|0;c[g>>2]=k+1;a[k>>0]=h;k=0;break a}default:{k=h&95;if((((k|0)==(a[e>>0]|0)?(a[e>>0]=k|128,a[d>>0]|0):0)?(a[d>>0]=0,e=a[j+11>>0]|0,(e<<24>>24<0?c[j+4>>2]|0:e&255)|0):0)?(q=c[l>>2]|0,(q-p|0)<160):0){e=c[m>>2]|0;c[l>>2]=q+4;c[q>>2]=e}l=c[g>>2]|0;c[g>>2]=l+1;a[l>>0]=h;if((o|0)>21){k=0;break a}c[m>>2]=(c[m>>2]|0)+1;k=0;break a}}}}while(0);return k|0}function iM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i;if((a|0)==(b|0)){c[d>>2]=4;e=0.0}else{g=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;e=+CK(a,f,YL()|0);a=c[(xI()|0)>>2]|0;if(!a)c[(xI()|0)>>2]=g;if((c[f>>2]|0)==(b|0)){if((a|0)==34)h=6}else{e=0.0;h=6}if((h|0)==6)c[d>>2]=4}l=i;return +e}function jM(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;k=a[b+11>>0]|0;j=k<<24>>24<0;i=b+4|0;g=c[i>>2]|0;k=k&255;do if((j?g:k)|0){if((d|0)!=(e|0)){g=e;h=d;while(1){g=g+-4|0;if(h>>>0>=g>>>0)break;m=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=m;h=h+4|0}g=c[i>>2]|0}m=j?c[b>>2]|0:b;e=e+-4|0;b=m+(j?g:k)|0;g=m;while(1){h=a[g>>0]|0;i=h<<24>>24>0&h<<24>>24!=127;if(d>>>0>=e>>>0)break;if(i?(h<<24>>24|0)!=(c[d>>2]|0):0){l=10;break}d=d+4|0;g=(b-g|0)>1?g+1|0:g}if((l|0)==10){c[f>>2]=4;break}if(i?((c[e>>2]|0)+-1|0)>>>0>=h<<24>>24>>>0:0)c[f>>2]=4}while(0);return}function kM(b,d,e,f,g,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+240|0;v=E+200|0;w=E+199|0;x=E+198|0;G=E+184|0;F=E+172|0;y=E+168|0;B=E+8|0;C=E+4|0;z=E;A=E+197|0;u=E+196|0;gM(G,f,v,w,x);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}t=F+11|0;if((a[t>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);s=o;o=0;if(s&1)b=Fb()|0;else{b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b;c[C>>2]=B;c[z>>2]=0;a[A>>0]=1;a[u>>0]=69;r=F+4|0;s=F+8|0;m=c[d>>2]|0;k=m;a:while(1){if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;q=o;o=0;if(q&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;q=0;m=0;n=1}else{q=k;n=0}}else{q=0;m=0;n=1}k=c[e>>2]|0;do if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;p=o;o=0;if(p&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(n)break;else{H=37;break a}else{c[e>>2]=0;H=20;break}}else H=20;while(0);if((H|0)==20){H=0;if(n){k=0;H=37;break}else k=0}f=a[t>>0]|0;f=f<<24>>24<0?c[r>>2]|0:f&255;if((c[y>>2]|0)==(b+f|0)){o=0;bb(58,F|0,f<<1|0,0);p=o;o=0;if(p&1)break;if((a[t>>0]|0)<0)b=(c[s>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);p=o;o=0;if(p&1)break;b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b+f}n=q+12|0;f=c[n>>2]|0;p=q+16|0;if((f|0)==(c[p>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Ja(42,f&255|0,A|0,u|0,b|0,y|0,a[w>>0]|0,a[x>>0]|0,G|0,B|0,C|0,z|0,v|0)|0;I=o;o=0;if(I&1)break;if(f|0){H=37;break}f=c[n>>2]|0;if((f|0)==(c[p>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;I=o;o=0;if(I&1)break;else{k=q;continue}}else{c[n>>2]=f+1;bh(a[f>>0]|0)|0;k=q;continue}}b:do if((H|0)==37){I=a[G+11>>0]|0;if(!((a[A>>0]|0)==0?1:((I<<24>>24<0?c[G+4>>2]|0:I&255)|0)==0)?(D=c[C>>2]|0,(D-B|0)<160):0){I=c[z>>2]|0;c[C>>2]=D+4;c[D>>2]=I}o=0;j=+$(45,b|0,c[y>>2]|0,g|0);I=o;o=0;if(!(I&1)?(h[i>>3]=j,o=0,db(107,G|0,B|0,c[C>>2]|0,g|0),I=o,o=0,!(I&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[m>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(k){b=c[k+12>>2]|0;if((b|0)==(c[k+16>>2]|0)){o=0;b=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;I=o;o=0;if(I&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{H=56;break}else{c[e>>2]=0;H=54;break}}else H=54;while(0);if((H|0)==54?f:0)H=56;if((H|0)==56)c[g>>2]=c[g>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}}while(0);b=Fb()|0}pU(F);pU(G);Qb(b|0);return 0}function lM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i;if((a|0)==(b|0)){c[d>>2]=4;e=0.0}else{g=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;e=+BK(a,f,YL()|0);a=c[(xI()|0)>>2]|0;if(!a)c[(xI()|0)>>2]=g;if((c[f>>2]|0)==(b|0)){if((a|0)==34)h=6}else{e=0.0;h=6}if((h|0)==6)c[d>>2]=4}l=i;return +e}function mM(b,d,e,f,h,i){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=l;l=l+240|0;v=E+200|0;w=E+199|0;x=E+198|0;G=E+184|0;F=E+172|0;y=E+168|0;B=E+8|0;C=E+4|0;z=E;A=E+197|0;u=E+196|0;gM(G,f,v,w,x);c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[F+(b<<2)>>2]=0;b=b+1|0}t=F+11|0;if((a[t>>0]|0)<0)b=(c[F+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);s=o;o=0;if(s&1)b=Fb()|0;else{b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b;c[C>>2]=B;c[z>>2]=0;a[A>>0]=1;a[u>>0]=69;r=F+4|0;s=F+8|0;m=c[d>>2]|0;k=m;a:while(1){if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;q=o;o=0;if(q&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;q=0;m=0;n=1}else{q=k;n=0}}else{q=0;m=0;n=1}k=c[e>>2]|0;do if(k){f=c[k+12>>2]|0;if((f|0)==(c[k+16>>2]|0)){o=0;f=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;p=o;o=0;if(p&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(n)break;else{H=37;break a}else{c[e>>2]=0;H=20;break}}else H=20;while(0);if((H|0)==20){H=0;if(n){k=0;H=37;break}else k=0}f=a[t>>0]|0;f=f<<24>>24<0?c[r>>2]|0:f&255;if((c[y>>2]|0)==(b+f|0)){o=0;bb(58,F|0,f<<1|0,0);p=o;o=0;if(p&1)break;if((a[t>>0]|0)<0)b=(c[s>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,F|0,b|0,0);p=o;o=0;if(p&1)break;b=(a[t>>0]|0)<0?c[F>>2]|0:F;c[y>>2]=b+f}n=q+12|0;f=c[n>>2]|0;p=q+16|0;if((f|0)==(c[p>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Ja(42,f&255|0,A|0,u|0,b|0,y|0,a[w>>0]|0,a[x>>0]|0,G|0,B|0,C|0,z|0,v|0)|0;I=o;o=0;if(I&1)break;if(f|0){H=37;break}f=c[n>>2]|0;if((f|0)==(c[p>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;I=o;o=0;if(I&1)break;else{k=q;continue}}else{c[n>>2]=f+1;bh(a[f>>0]|0)|0;k=q;continue}}b:do if((H|0)==37){I=a[G+11>>0]|0;if(!((a[A>>0]|0)==0?1:((I<<24>>24<0?c[G+4>>2]|0:I&255)|0)==0)?(D=c[C>>2]|0,(D-B|0)<160):0){I=c[z>>2]|0;c[C>>2]=D+4;c[D>>2]=I}o=0;j=+$(46,b|0,c[y>>2]|0,h|0);I=o;o=0;if(!(I&1)?(g[i>>2]=j,o=0,db(107,G|0,B|0,c[C>>2]|0,h|0),I=o,o=0,!(I&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[m>>2]|0)+36>>2]|0,q|0)|0;I=o;o=0;if(I&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(k){b=c[k+12>>2]|0;if((b|0)==(c[k+16>>2]|0)){o=0;b=fa(c[(c[k>>2]|0)+36>>2]|0,k|0)|0;I=o;o=0;if(I&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{H=56;break}else{c[e>>2]=0;H=54;break}}else H=54;while(0);if((H|0)==54?f:0)H=56;if((H|0)==56)c[h>>2]=c[h>>2]|2;I=c[d>>2]|0;pU(F);pU(G);l=E;return I|0}}while(0);b=Fb()|0}pU(F);pU(G);Qb(b|0);return 0}function nM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i;if((a|0)==(b|0)){c[d>>2]=4;e=0.0}else{g=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;e=+AK(a,f,YL()|0);a=c[(xI()|0)>>2]|0;if(!a)c[(xI()|0)>>2]=g;if((c[f>>2]|0)==(b|0)){if((a|0)==34)h=6}else{e=0.0;h=6}if((h|0)==6)c[d>>2]=4}l=i;return +e}function oM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0;B=l;l=l+224|0;s=B+198|0;t=B+196|0;C=B+184|0;D=B+172|0;u=B+168|0;y=B+8|0;A=B+4|0;v=B;w=pM(f)|0;qM(C,f,s,t);c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[D+(b<<2)>>2]=0;b=b+1|0}r=D+11|0;if((a[r>>0]|0)<0)b=(c[D+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b;c[A>>2]=y;c[v>>2]=0;n=D+4|0;p=D+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;q=o;o=0;if(q&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;q=0;j=0;k=1}else{q=i;k=0}}else{q=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(k)break;else{E=37;break a}else{c[e>>2]=0;E=20;break}}else E=20;while(0);if((E|0)==20){E=0;if(k){i=0;E=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[n>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,D|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[p>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,D|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[D>>2]|0:D;c[u>>2]=b+f}k=q+12|0;f=c[k>>2]|0;m=q+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[q>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Fa(42,f&255|0,w|0,b|0,u|0,v|0,a[t>>0]|0,C|0,y|0,A|0,s|0)|0;F=o;o=0;if(F&1)break;if(f|0){E=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[q>>2]|0)+40>>2]|0,q|0)|0;F=o;o=0;if(F&1)break;else{i=q;continue}}else{c[k>>2]=f+1;bh(a[f>>0]|0)|0;i=q;continue}}b:do if((E|0)==37){F=a[C+11>>0]|0;if((F<<24>>24<0?c[C+4>>2]|0:F&255)|0?(x=c[A>>2]|0,(x-y|0)<160):0){F=c[v>>2]|0;c[A>>2]=x+4;c[x>>2]=F}o=0;b=pa(59,b|0,c[u>>2]|0,g|0,w|0)|0;f=z;F=o;o=0;if(!(F&1)?(F=h,c[F>>2]=b,c[F+4>>2]=f,o=0,db(107,C|0,y|0,c[A>>2]|0,g|0),F=o,o=0,!(F&1)):0){if(q){b=c[q+12>>2]|0;if((b|0)==(c[q+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,q|0)|0;F=o;o=0;if(F&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;F=o;o=0;if(F&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{E=56;break}else{c[e>>2]=0;E=54;break}}else E=54;while(0);if((E|0)==54?f:0)E=56;if((E|0)==56)c[g>>2]=c[g>>2]|2;F=c[d>>2]|0;pU(D);pU(C);l=B;return F|0}}while(0);b=Fb()|0}pU(D);pU(C);Qb(b|0);return 0}function pM(a){a=a|0;switch(c[a+4>>2]&74){case 64:{a=8;break}case 8:{a=16;break}case 0:{a=0;break}default:a=10}return a|0}function qM(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;j=l;l=l+16|0;i=j;nL(i,d);o=0;d=ja(57,i|0,59880)|0;k=o;o=0;if((((!(k&1)?(o=0,pa(c[(c[d>>2]|0)+32>>2]|0,d|0,54627,54653,e|0)|0,k=o,o=0,!(k&1)):0)?(o=0,g=ja(57,i|0,59896)|0,k=o,o=0,!(k&1)):0)?(o=0,h=fa(c[(c[g>>2]|0)+16>>2]|0,g|0)|0,k=o,o=0,!(k&1)):0)?(a[f>>0]=h,o=0,Xa(c[(c[g>>2]|0)+20>>2]|0,b|0,g|0),k=o,o=0,!(k&1)):0){WL(i);l=j;return}k=Fb()|0;WL(i);Qb(k|0)}function rM(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;k=l;l=l+16|0;h=k;do if((b|0)==(d|0)){c[e>>2]=4;f=0;b=0}else{if((a[b>>0]|0)==45){c[e>>2]=4;f=0;b=0;break}i=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;b=BI(b,h,f,YL()|0)|0;f=z;g=c[(xI()|0)>>2]|0;if(!g)c[(xI()|0)>>2]=i;if((c[h>>2]|0)==(d|0)){if((g|0)==34){b=-1;f=-1;j=8}}else{b=0;f=0;j=8}if((j|0)==8)c[e>>2]=4}while(0);z=f;l=k;return b|0}function sM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+224|0;s=A+198|0;t=A+196|0;B=A+184|0;C=A+172|0;u=A+168|0;x=A+8|0;y=A+4|0;v=A;w=pM(f)|0;qM(B,f,s,t);c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}r=C+11|0;if((a[r>>0]|0)<0)b=(c[C+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b;c[y>>2]=x;c[v>>2]=0;p=C+4|0;q=C+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;n=o;o=0;if(n&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;n=0;j=0;k=1}else{n=i;k=0}}else{n=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(k)break;else{D=37;break a}else{c[e>>2]=0;D=20;break}}else D=20;while(0);if((D|0)==20){D=0;if(k){i=0;D=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[p>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,C|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[q>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b+f}k=n+12|0;f=c[k>>2]|0;m=n+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Fa(42,f&255|0,w|0,b|0,u|0,v|0,a[t>>0]|0,B|0,x|0,y|0,s|0)|0;E=o;o=0;if(E&1)break;if(f|0){D=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[n>>2]|0)+40>>2]|0,n|0)|0;E=o;o=0;if(E&1)break;else{i=n;continue}}else{c[k>>2]=f+1;bh(a[f>>0]|0)|0;i=n;continue}}b:do if((D|0)==37){E=a[B+11>>0]|0;if((E<<24>>24<0?c[B+4>>2]|0:E&255)|0?(z=c[y>>2]|0,(z-x|0)<160):0){E=c[v>>2]|0;c[y>>2]=z+4;c[z>>2]=E}o=0;b=pa(60,b|0,c[u>>2]|0,g|0,w|0)|0;E=o;o=0;if(!(E&1)?(c[h>>2]=b,o=0,db(107,B|0,x|0,c[y>>2]|0,g|0),E=o,o=0,!(E&1)):0){if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;E=o;o=0;if(E&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{D=56;break}else{c[e>>2]=0;D=54;break}}else D=54;while(0);if((D|0)==54?f:0)D=56;if((D|0)==56)c[g>>2]=c[g>>2]|2;E=c[d>>2]|0;pU(C);pU(B);l=A;return E|0}}while(0);b=Fb()|0}pU(C);pU(B);Qb(b|0);return 0}function tM(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;j=l;l=l+16|0;h=j;do if((b|0)==(d|0)){c[e>>2]=4;b=0}else{if((a[b>>0]|0)==45){c[e>>2]=4;b=0;break}i=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;b=BI(b,h,f,YL()|0)|0;f=z;g=c[(xI()|0)>>2]|0;if(!g)c[(xI()|0)>>2]=i;do if((c[h>>2]|0)==(d|0))if(f>>>0>0|(f|0)==0&b>>>0>4294967295|(g|0)==34){c[e>>2]=4;b=-1;break}else break;else{c[e>>2]=4;b=0}while(0)}while(0);l=j;return b|0}function uM(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+224|0;s=A+198|0;t=A+196|0;B=A+184|0;C=A+172|0;u=A+168|0;x=A+8|0;y=A+4|0;v=A;w=pM(f)|0;qM(B,f,s,t);c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[C+(b<<2)>>2]=0;b=b+1|0}r=C+11|0;if((a[r>>0]|0)<0)b=(c[C+8>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);q=o;o=0;if(q&1)b=Fb()|0;else{b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b;c[y>>2]=x;c[v>>2]=0;p=C+4|0;q=C+8|0;j=c[d>>2]|0;i=j;a:while(1){if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;n=o;o=0;if(n&1)break}else f=bh(a[f>>0]|0)|0;if(Yg(f,Qg()|0)|0){c[d>>2]=0;n=0;j=0;k=1}else{n=i;k=0}}else{n=0;j=0;k=1}i=c[e>>2]|0;do if(i){f=c[i+12>>2]|0;if((f|0)==(c[i+16>>2]|0)){o=0;f=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;m=o;o=0;if(m&1)break a}else f=bh(a[f>>0]|0)|0;if(!(Yg(f,Qg()|0)|0))if(k)break;else{D=37;break a}else{c[e>>2]=0;D=20;break}}else D=20;while(0);if((D|0)==20){D=0;if(k){i=0;D=37;break}else i=0}f=a[r>>0]|0;f=f<<24>>24<0?c[p>>2]|0:f&255;if((c[u>>2]|0)==(b+f|0)){o=0;bb(58,C|0,f<<1|0,0);m=o;o=0;if(m&1)break;if((a[r>>0]|0)<0)b=(c[q>>2]&2147483647)+-1|0;else b=10;o=0;bb(58,C|0,b|0,0);m=o;o=0;if(m&1)break;b=(a[r>>0]|0)<0?c[C>>2]|0:C;c[u>>2]=b+f}k=n+12|0;f=c[k>>2]|0;m=n+16|0;if((f|0)==(c[m>>2]|0)){o=0;f=fa(c[(c[n>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else f=bh(a[f>>0]|0)|0;o=0;f=Fa(42,f&255|0,w|0,b|0,u|0,v|0,a[t>>0]|0,B|0,x|0,y|0,s|0)|0;E=o;o=0;if(E&1)break;if(f|0){D=37;break}f=c[k>>2]|0;if((f|0)==(c[m>>2]|0)){o=0;fa(c[(c[n>>2]|0)+40>>2]|0,n|0)|0;E=o;o=0;if(E&1)break;else{i=n;continue}}else{c[k>>2]=f+1;bh(a[f>>0]|0)|0;i=n;continue}}b:do if((D|0)==37){E=a[B+11>>0]|0;if((E<<24>>24<0?c[B+4>>2]|0:E&255)|0?(z=c[y>>2]|0,(z-x|0)<160):0){E=c[v>>2]|0;c[y>>2]=z+4;c[z>>2]=E}o=0;b=pa(61,b|0,c[u>>2]|0,g|0,w|0)|0;E=o;o=0;if(!(E&1)?(c[h>>2]=b,o=0,db(107,B|0,x|0,c[y>>2]|0,g|0),E=o,o=0,!(E&1)):0){if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){o=0;b=fa(c[(c[j>>2]|0)+36>>2]|0,n|0)|0;E=o;o=0;if(E&1)break}else b=bh(a[b>>0]|0)|0;if(Yg(b,Qg()|0)|0){c[d>>2]=0;f=1}else f=0}else f=1;do if(i){b=c[i+12>>2]|0;if((b|0)==(c[i+16>>2]|0)){o=0;b=fa(c[(c[i>>2]|0)+36>>2]|0,i|0)|0;E=o;o=0;if(E&1)break b}else b=bh(a[b>>0]|0)|0;if(!(Yg(b,Qg()|0)|0))if(f)break;else{D=56;break}else{c[e>>2]=0;D=54;break}}else D=54;while(0);if((D|0)==54?f:0)D=56;if((D|0)==56)c[g>>2]=c[g>>2]|2;E=c[d>>2]|0;pU(C);pU(B);l=A;return E|0}}while(0);b=Fb()|0}pU(C);pU(B);Qb(b|0);return 0}function vM(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;j=l;l=l+16|0;h=j;do if((b|0)==(d|0)){c[e>>2]=4;b=0}else{if((a[b>>0]|0)==45){c[e>>2]=4;b=0;break}i=c[(xI()|0)>>2]|0;c[(xI()|0)>>2]=0;b=BI(b,h,f,YL()|0)|0;f=z;g=c[(xI()|0)>>2]|0;if(!g)c[(xI()|0)>>2]=i;do if((c[h>>2]|0)==(d|0))if(f>>>0>0|(f|0)==0&b>>>0>4294967295|(g|0)==34){c[e>>2]=4;b=-1;break}else break;else{c[e>>2]=4;b=0}while(0)}while(0);l=j;return b|0} function nB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;f=l;l=l+16|0;e=f;c[e>>2]=b;d=aU(12)|0;o=0;Xa(324,d|0,a|0);b=o;o=0;if(b&1){f=Fb()|0;cU(d);Qb(f|0)}b=0;while(1){if((b|0)==(a|0))break;h=(c[e>>2]|0)+(4-1)&~(4-1);g=c[h>>2]|0;c[e>>2]=h+4;c[(c[d>>2]|0)+(b<<2)>>2]=g;b=b+1|0}l=f;return d|0}function oB(a,b,d){a=a|0;b=b|0;d=d|0;c[a>>2]=b;c[a+4>>2]=d;return}function pB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e;c[f>>2]=d;c[a>>2]=b;wB(a+4|0,1,f);l=e;return}function qB(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;cf(a);c[a>>2]=33604;c[a+8>>2]=b;c[a+12>>2]=d;b=a+16|0;o=0;Xa(325,b|0,4);i=o;o=0;if(i&1){i=Fb()|0;ff(a);Qb(i|0)}i=a+28|0;c[i>>2]=0;c[c[b>>2]>>2]=e;c[(c[b>>2]|0)+4>>2]=f;c[(c[b>>2]|0)+8>>2]=g;c[(c[b>>2]|0)+12>>2]=h;g=JB(e)|0;f=KB(e)|0;a=c[f>>2]|0;f=(c[f+4>>2]|0)-a>>2;b=0;d=0;while(1){if((d|0)==(f|0))break;h=c[a+(d<<2)>>2]|0;e=LB(h)|0;b=(O((MB(h)|0)+g|0,e)|0)+b|0;d=d+1|0}c[i>>2]=b;return}function rB(a,b){a=a|0;b=b|0;c[a>>2]=0;HB(a,b);return}function sB(a,b){a=a|0;b=b|0;c[a>>2]=0;HB(a,c[b>>2]|0);return}function tB(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=DB(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;EB(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;sB(c[g>>2]|0,b);c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(326,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;GB(d);Qb(k|0)}else{GB(d);l=h;return}}function uB(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function vB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=d;c[g>>2]=e;c[a>>2]=b;b=a+4|0;wB(b,1,f);d=a+8|0;f=c[d>>2]|0;if((f|0)==(c[a+12>>2]|0)){o=0;Xa(327,b|0,g|0);g=o;o=0;if(g&1){h=Fb()|0;iB(b);Qb(h|0)}}else{c[f>>2]=e;c[d>>2]=(c[d>>2]|0)+4}l=h;return}function wB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;e=a+4|0;c[e>>2]=0;c[a+8>>2]=0;if(b|0){o=0;Xa(328,a|0,b|0);f=o;o=0;if(f&1){f=Fb()|0;iB(a);Qb(f|0)}a=c[e>>2]|0;do{c[a>>2]=c[d>>2];a=(c[e>>2]|0)+4|0;c[e>>2]=a;b=b+-1|0}while((b|0)!=0)}return}function xB(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=yB(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;zB(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;c[c[g>>2]>>2]=c[b>>2];c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(329,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;BB(d);Qb(k|0)}else{BB(d);l=h;return}}function yB(a){a=a|0;return 1073741823}function zB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function AB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;h=a+4|0;g=b+4|0;f=(c[h>>2]|0)-e|0;d=(c[g>>2]|0)+(0-(f>>2)<<2)|0;c[g>>2]=d;if((f|0)>0){wW(d|0,e|0,f|0)|0;e=g;d=c[g>>2]|0}else e=g;g=c[a>>2]|0;c[a>>2]=d;c[e>>2]=g;g=b+8|0;f=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=f;g=a+8|0;h=b+12|0;a=c[g>>2]|0;c[g>>2]=c[h>>2];c[h>>2]=a;c[b>>2]=c[e>>2];return}function BB(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+4>>2]|0;d=a+8|0;e=c[d>>2]|0;while(1){if((e|0)==(b|0))break;f=e+-4|0;c[d>>2]=f;e=f}a=c[a>>2]|0;if(a|0)cU(a);return}function CB(a,b){a=a|0;b=b|0;var d=0;if((yB(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function DB(a){a=a|0;return 1073741823}function EB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function FB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;sB((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function GB(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;uB(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function HB(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function IB(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(330,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(331,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;gB(a);Qb(d|0)}while(0);return}function JB(a){a=a|0;return c[a>>2]|0}function KB(a){a=a|0;return a+4|0}function LB(a){a=a|0;return c[a>>2]|0}function MB(a){a=a|0;return c[a+4>>2]|0}function NB(a,b){a=a|0;b=b|0;var d=0;if((PB(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function OB(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{c[b>>2]=0;b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function PB(a){a=a|0;return 1073741823}function QB(a){a=a|0;return c[a+8>>2]|0}function RB(a){a=a|0;return c[a+12>>2]|0}function SB(a){a=a|0;return c[a+28>>2]|0}function TB(a){a=a|0;return (c[a+8>>2]<<2)+17|0}function UB(a,b){a=a|0;b=b|0;b=KA(b)|0;return c[(c[a+16>>2]|0)+(b<<2)>>2]|0}function VB(a){a=a|0;var b=0,c=0;do if(((a|0)%4|0|0)==1){o=0;a=fa(143,a+-17>>2|0)|0;c=o;o=0;if(!(c&1))return a|0;a=Gb(632)|0;c=z;if((c|0)==(mc(632)|0)){Bb(a|0)|0;a=Ab(8)|0;o=0;Na(325,a|0);c=o;o=0;if(c&1){c=Fb()|0;Jb(a|0);a=c}else{o=0;bb(68,a|0,160,61);o=0;a=Fb()|0}o=0;La(44);c=o;o=0;if(c&1){c=Gb(0)|0;_g(c)}else b=a}else b=a}else{a=Ab(8)|0;o=0;Na(325,a|0);c=o;o=0;if(c&1){b=Fb()|0;Jb(a|0);break}else Mb(a|0,160,61)}while(0);Qb(b|0);return 0}function WB(a){a=a|0;if((a|0)<1|(c[14751]|0)<(a|0)){a=Ab(8)|0;hg(a,48225);Mb(a|0,24,58)}else return XB((c[14748]|0)+(a+-1<<2)|0)|0;return 0}function XB(a){a=a|0;return c[a>>2]|0}function YB(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;g=2147483647;d=0;b=0;while(1){if((d|0)>=34){d=5;break}e=c[33460+(d<<2)>>2]|0;f=d+7|0;if((e|0)==(a|0)){b=f;d=6;break}h=RA(a,e)|0;e=(h|0)<(g|0);g=e?h:g;d=d+1|0;b=e?f:b}if((d|0)==5)if((g|0)<4)d=6;else b=0;if((d|0)==6)b=WB(b)|0;return b|0}function ZB(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;n=TB(b)|0;e=aU(32)|0;o=0;Xa(164,e|0,n|0);l=o;o=0;if(l&1){d=Fb()|0;cU(e)}else{ae(a,e);l=be(a)|0;o=0;hb(58,l|0,0,0,9,9);l=o;o=0;a:do if((!(l&1)?(l=be(a)|0,d=n+-8|0,o=0,hb(58,l|0,d|0,0,8,9),l=o,o=0,!(l&1)):0)?(l=be(a)|0,o=0,hb(58,l|0,0,d|0,9,8),l=o,o=0,!(l&1)):0){g=b+12|0;h=c[g>>2]|0;h=(c[h+4>>2]|0)-(c[h>>2]|0)>>2;i=h+-1|0;e=0;while(1){if(e>>>0>=h>>>0)break;j=(c[(c[c[g>>2]>>2]|0)+(e<<2)>>2]|0)+-2|0;k=(e|0)==0;f=(e|0)==(i|0);d=0;while(1){if(d>>>0>=h>>>0)break;l=(d|0)==0;if(k){if(!(l|(d|0)==(i|0)))m=15}else if(!(f&l))m=15;if((m|0)==15?(m=0,l=be(a)|0,o=0,hb(58,l|0,(c[(c[c[g>>2]>>2]|0)+(d<<2)>>2]|0)+-2|0,j|0,5,5),l=o,o=0,l&1):0)break a;d=d+1|0}e=e+1|0}m=be(a)|0;d=n+-17|0;o=0;hb(58,m|0,6,9,1,d|0);m=o;o=0;if(!(m&1)?(m=be(a)|0,o=0,hb(58,m|0,9,6,d|0,1),m=o,o=0,!(m&1)):0){if((c[b+8>>2]|0)>6){b=be(a)|0;d=n+-11|0;o=0;hb(58,b|0,d|0,0,3,6);n=o;o=0;if(n&1)break;n=be(a)|0;o=0;hb(58,n|0,0,d|0,6,3);n=o;o=0;if(n&1)break}return}}while(0);d=Fb()|0;de(a)}Qb(d|0)}function _B(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return (xj(be(a+8|0)|0,b,c)|0)&1|d<<1|0}function $B(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;cf(a);c[a>>2]=33620;e=a+8|0;o=0;Xa(128,e|0,b|0);d=o;o=0;if(d&1)b=Fb()|0;else{c[a+12>>2]=0;d=a+16|0;o=0;Xa(332,d|0,0);f=o;o=0;if(f&1)b=Fb()|0;else{b=be(b)|0;o=0;b=fa(114,b|0)|0;f=o;o=0;do if(!(f&1))if(b>>>0>20&(b&3|0)==1)return;else{f=Ab(8)|0;hg(f,48264);o=0;bb(68,f|0,24,58);o=0;break}while(0);b=Fb()|0;WA(d)}de(e)}ff(a);Qb(b|0)}function aC(a){a=a|0;c[a>>2]=33620;WA(a+16|0);de(a+8|0);ff(a);return}function bC(a){a=a|0;aC(a);cU(a);return}function cC(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k;j=b+16|0;do if(!(UA(j,0)|0)){d=0;c=0;while(1){if((c|0)==6)break;d=_B(b,c,8,d)|0;c=c+1|0}c=5;h=_B(b,8,7,_B(b,8,8,_B(b,7,8,d)|0)|0)|0;while(1){if((c|0)<=-1)break;g=_B(b,8,c,h)|0;c=c+-1|0;h=g}g=_k(be(b+8|0)|0)|0;f=g+-7|0;e=g;c=0;while(1){d=e+-1|0;if((e|0)<=(f|0))break;e=d;c=_B(b,8,d,c)|0}d=g+-8|0;while(1){if((d|0)>=(g|0))break;f=_B(b,d,8,c)|0;d=d+1|0;c=f}SA(i,h,c);dC(j,i)|0;WA(i);if(UA(j,0)|0){VA(a,j);break}else{k=Ab(8)|0;hg(k,48333);Mb(k|0,24,58)}}else VA(a,j);while(0);l=k;return}function dC(a,b){a=a|0;b=b|0;XA(a,c[b>>2]|0);return a|0}function eC(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=a+12|0;b=c[j>>2]|0;do if(!b){i=_k(be(a+8|0)|0)|0;b=i+-17>>2;if((b|0)<7){b=WB(b)|0;break}f=i+-11|0;g=i+-9|0;e=5;b=0;while(1){if((e|0)>-1)d=g;else break;while(1){if((d|0)<(f|0))break;k=_B(a,d,e,b)|0;d=d+-1|0;b=k}e=e+-1|0}b=YB(b)|0;c[j>>2]=b;if(!((b|0)!=0?(TB(b)|0)==(i|0):0)){e=5;b=0;h=11}do if((h|0)==11){while(1){if((e|0)>-1)d=g;else break;while(1){if((d|0)<(f|0))break;k=_B(a,e,d,b)|0;d=d+-1|0;b=k}e=e+-1|0;h=11}b=YB(b)|0;c[j>>2]=b;if(b|0?(TB(b)|0)==(i|0):0)break;k=Ab(8)|0;hg(k,48369);Mb(k|0,24,58)}while(0);b=c[j>>2]|0}while(0);return b|0}function fC(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;v=l;l=l+16|0;x=v+4|0;w=v;cC(x,c);o=0;t=fa(144,c|0)|0;r=o;o=0;do if(r&1)c=Fb()|0;else{d=gC(x)|0;o=0;d=fa(145,d|0)|0;r=o;o=0;if(!(r&1)?(o=0,e=fa(146,d<<24>>24|0)|0,r=o,o=0,!(r&1)):0){q=c+8|0;r=be(q)|0;o=0;r=fa(114,r|0)|0;p=o;o=0;if(p&1){c=Fb()|0;break}p=hC(q)|0;o=0;bb(138,e|0,p|0,r|0);p=o;o=0;if(!(p&1)?(o=0,Xa(333,w|0,t|0),p=o,o=0,!(p&1)):0){o=0;c=fa(147,t|0)|0;p=o;o=0;if(!(p&1)?(o=0,Xa(103,b|0,c|0),p=o,o=0,!(p&1)):0){p=r+-1|0;c=p;d=0;e=0;m=0;n=1;a:while(1){if((c|0)<=0){u=11;break}j=(((c|0)==6)<<31>>31)+c|0;k=0;f=m;while(1){if((k|0)>=(r|0))break;i=n?p-k|0:k;h=0;g=f;while(1){if((h|0)>=2)break;c=be(w)|0;f=j-h|0;o=0;c=la(72,c|0,f|0,i|0)|0;y=o;o=0;if(y&1)break a;do if(c)c=g;else{d=d+1|0;c=be(q)|0;o=0;c=la(72,c|0,f|0,i|0)|0;y=o;o=0;if(y&1)break a;e=c&1|e<<1;if((d|0)!=8){c=g;break}o=0;c=ja(56,b|0,g|0)|0;y=o;o=0;if(y&1)break a;a[c>>0]=e;d=0;c=g+1|0;e=0}while(0);h=h+1|0;g=c}k=k+1|0;f=g}c=j+-2|0;m=f;n=n^1}do if((u|0)==11?(o=0,s=fa(147,t|0)|0,y=o,o=0,!(y&1)):0)if((m|0)==(s|0)){de(w);WA(x);l=v;return}else{y=Ab(8)|0;hg(y,48394);o=0;bb(68,y|0,24,58);o=0;break}while(0);c=Fb()|0;Nd(b)}else c=Fb()|0;de(w);break}c=Fb()|0;break}c=Fb()|0}while(0);WA(x);Qb(c|0)}function gC(a){a=a|0;return c[a>>2]|0}function hC(a){a=a|0;return c[a>>2]|0}function iC(a,b,d){a=a|0;b=b|0;d=d|0;cf(a);c[a>>2]=33636;c[a+8>>2]=b;o=0;Xa(83,a+12|0,d|0);d=o;o=0;if(d&1){d=Fb()|0;ff(a);Qb(d|0)}else return}function jC(a){a=a|0;c[a>>2]=33636;Nd(a+12|0);ff(a);return}function kC(a){a=a|0;jC(a);cU(a);return}function lC(a){a=a|0;return c[a+8>>2]|0}function mC(a,b){a=a|0;b=b|0;Gd(a,b+12|0);return}function nC(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;v=u+28|0;q=u+16|0;n=u+12|0;p=u;r=UB(e,f)|0;oC(v,KB(r)|0);m=v+4|0;g=0;f=0;while(1){e=c[v>>2]|0;if(f>>>0>=(c[m>>2]|0)-e>>2>>>0){t=3;break}o=0;e=fa(148,c[e+(f<<2)>>2]|0)|0;t=o;o=0;if(t&1){t=7;break}g=e+g|0;f=f+1|0}do if((t|0)==3){o=0;Xa(334,b|0,g|0);t=o;o=0;if(t&1){e=Fb()|0;break}s=0;j=0;a:while(1){e=c[v>>2]|0;if(j>>>0>=(c[m>>2]|0)-e>>2>>>0){t=9;break}i=c[e+(j<<2)>>2]|0;h=0;g=s;while(1){o=0;e=fa(148,i|0)|0;t=o;o=0;if(t&1){t=16;break a}if((h|0)>=(e|0))break;o=0;f=fa(149,i|0)|0;t=o;o=0;if(t&1){t=16;break a}o=0;e=fa(150,r|0)|0;t=o;o=0;if(t&1){t=25;break a}o=0;Xa(103,q|0,e+f|0);t=o;o=0;if(t&1){t=26;break a}o=0;k=fa(107,24)|0;t=o;o=0;if(t&1){t=27;break a}o=0;Xa(83,p|0,q|0);t=o;o=0;if(t&1){t=28;break a}o=0;bb(139,k|0,f|0,p|0);t=o;o=0;if(t&1){f=1;t=29;break a}o=0;Xa(335,n|0,k|0);t=o;o=0;if(t&1){f=0;t=29;break a}Nd(p);sC((c[b>>2]|0)+(g<<2)|0,n)|0;tC(n);Nd(q);h=h+1|0;g=g+1|0}s=g;j=j+1|0}b:do if((t|0)==9){i=Ud(Td((qC(c[b>>2]|0)|0)+12|0)|0)|0;f=c[b>>2]|0;q=(c[b+4>>2]|0)-f|0;e=(q>>2)+-1|0;c:do if((q|0)>0){h=i+1|0;g=e;e=f;while(1){e=Ud(Td((qC(e+(g<<2)|0)|0)+12|0)|0)|0;if((e|0)==(i|0)){m=g;break c}if((e|0)!=(h|0))break;e=g+-1|0;if((g|0)<=0){m=e;break c}g=e;e=c[b>>2]|0}e=Ab(8)|0;o=0;Xa(102,e|0,48447);u=o;o=0;if(u&1){u=Fb()|0;Jb(e|0);e=u;break b}else{o=0;bb(68,e|0,632,117);o=0;e=Fb()|0;break b}}else m=e;while(0);o=0;e=fa(150,r|0)|0;r=o;o=0;if(r&1){e=Fb()|0;break}j=i-e|0;i=0;f=0;d:while(1){if((i|0)<(j|0))h=0;else{e=m;h=f;break}while(1){if((h|0)>=(s|0))break;o=0;e=ja(56,d|0,f|0)|0;r=o;o=0;if(r&1){t=48;break d}e=a[e>>0]|0;g=(qC((c[b>>2]|0)+(h<<2)|0)|0)+12|0;o=0;g=ja(56,g|0,i|0)|0;r=o;o=0;if(r&1){t=48;break d}a[g>>0]=e;h=h+1|0;f=f+1|0}i=i+1|0}if((t|0)==48){e=Fb()|0;break}while(1){e=e+1|0;if((e|0)>=(s|0))break;o=0;f=ja(56,d|0,h|0)|0;r=o;o=0;if(r&1){t=54;break}f=a[f>>0]|0;g=(qC((c[b>>2]|0)+(e<<2)|0)|0)+12|0;o=0;g=ja(56,g|0,j|0)|0;r=o;o=0;if(r&1){t=54;break}a[g>>0]=f;h=h+1|0}if((t|0)==54){e=Fb()|0;break}k=Ud(Td((qC(c[b>>2]|0)|0)+12|0)|0)|0;e=h;e:while(1){if((j|0)>=(k|0))break;i=j+1|0;h=0;while(1){if((h|0)>=(s|0)){j=i;continue e}o=0;f=ja(56,d|0,e|0)|0;r=o;o=0;if(r&1){t=62;break e}f=a[f>>0]|0;g=(qC((c[b>>2]|0)+(h<<2)|0)|0)+12|0;o=0;g=ja(56,g|0,((h|0)<=(m|0)?j:i)|0)|0;r=o;o=0;if(r&1){t=62;break e}a[g>>0]=f;h=h+1|0;e=e+1|0}}if((t|0)==62){e=Fb()|0;break}if((e|0)==(Ud(Td(d)|0)|0)){iB(v);l=u;return}e=Ab(8)|0;o=0;Xa(102,e|0,48486);u=o;o=0;if(u&1){u=Fb()|0;Jb(e|0);e=u;break}else{o=0;bb(68,e|0,632,117);o=0;e=Fb()|0;break}}else if((t|0)==16)e=Fb()|0;else if((t|0)==25)e=Fb()|0;else if((t|0)==26)e=Fb()|0;else if((t|0)==27){e=Fb()|0;t=31}else if((t|0)==28){e=Fb()|0;t=30}else if((t|0)==29){e=Fb()|0;Nd(p);if(f)t=30;else t=31}while(0);if((t|0)==30){cU(k);t=31}if((t|0)==31)Nd(q);uC(b)}else if((t|0)==7)e=Fb()|0;while(0);iB(v);Qb(e|0)}function oC(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;d=b+4|0;e=(c[d>>2]|0)-(c[b>>2]|0)>>2;do if(e|0){o=0;Xa(328,a|0,e|0);f=o;o=0;if(!(f&1)?(o=0,db(101,a|0,c[b>>2]|0,c[d>>2]|0,e|0),f=o,o=0,!(f&1)):0)break;f=Fb()|0;iB(a);Qb(f|0)}while(0);return}function pC(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(336,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(337,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;uC(a);Qb(d|0)}while(0);return}function qC(a){a=a|0;return c[a>>2]|0}function rC(a,b){a=a|0;b=b|0;c[a>>2]=0;vC(a,b);return}function sC(a,b){a=a|0;b=b|0;vC(a,c[b>>2]|0);return a|0}function tC(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function uC(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;tC(e)}cU(c[a>>2]|0)}return}function vC(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function wC(a,b){a=a|0;b=b|0;var d=0;if((yC(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function xC(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{rC(b,0);b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function yC(a){a=a|0;return 1073741823}function zC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;e=a+4|0;a=d-b|0;if((a|0)>0){wW(c[e>>2]|0,b|0,a|0)|0;c[e>>2]=(c[e>>2]|0)+(a>>>2<<2)}return}function AC(a){a=a|0;ff(a);return}function BC(a){a=a|0;AC(a);cU(a);return}function CC(){DC();EC();return}function DC(){c[14752]=0;c[14753]=0;c[14754]=0;return}function EC(){FC()|0;return}function FC(){var a=0,b=0,d=0,e=0,f=0;d=l;l=l+16|0;b=d;a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(343,a|0);f=o;o=0;a:do if(f&1){e=Fb()|0;cU(a);a=e;e=44}else{HC(b,a);a=c[14753]|0;if(a>>>0<(c[14754]|0)>>>0){o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1)e=43;else c[14753]=(c[14753]|0)+4}else{o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=43}if((e|0)==43){a=Fb()|0;KC(b);e=44;break}KC(b);a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(344,a|0);f=o;o=0;do if(f&1){f=Fb()|0;cU(a);a=f}else{HC(b,a);a=c[14753]|0;if(a>>>0<(c[14754]|0)>>>0){o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1)e=46;else c[14753]=(c[14753]|0)+4}else{o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=46}if((e|0)==46){a=Fb()|0;KC(b);break}KC(b);a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(345,a|0);f=o;o=0;do if(f&1){f=Fb()|0;cU(a);a=f}else{HC(b,a);a=c[14753]|0;if(a>>>0<(c[14754]|0)>>>0){o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1)e=49;else c[14753]=(c[14753]|0)+4}else{o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=49}if((e|0)==49){a=Fb()|0;KC(b);break}KC(b);a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(346,a|0);f=o;o=0;do if(f&1){f=Fb()|0;cU(a);a=f}else{HC(b,a);a=c[14753]|0;if(a>>>0<(c[14754]|0)>>>0){o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1)e=52;else c[14753]=(c[14753]|0)+4}else{o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=52}if((e|0)==52){a=Fb()|0;KC(b);break}KC(b);a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(347,a|0);f=o;o=0;do if(f&1){f=Fb()|0;cU(a);a=f}else{HC(b,a);a=c[14753]|0;if(a>>>0<(c[14754]|0)>>>0){o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1)e=55;else c[14753]=(c[14753]|0)+4}else{o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=55}if((e|0)==55){a=Fb()|0;KC(b);break}KC(b);a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(348,a|0);f=o;o=0;do if(f&1){f=Fb()|0;cU(a);a=f}else{HC(b,a);a=c[14753]|0;if(a>>>0<(c[14754]|0)>>>0){o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1)e=58;else c[14753]=(c[14753]|0)+4}else{o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=58}if((e|0)==58){a=Fb()|0;KC(b);break}KC(b);a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(349,a|0);f=o;o=0;do if(f&1){f=Fb()|0;cU(a);a=f}else{HC(b,a);a=c[14753]|0;do if(a>>>0>=(c[14754]|0)>>>0){o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=61}else{o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1){e=61;break}c[14753]=(c[14753]|0)+4}while(0);if((e|0)==61){a=Fb()|0;KC(b);break}KC(b);a=aU(8)|0;f=a;c[f>>2]=0;c[f+4>>2]=0;o=0;Na(350,a|0);f=o;o=0;do if(!(f&1)){HC(b,a);a=c[14753]|0;do if(a>>>0>=(c[14754]|0)>>>0){o=0;Xa(339,59008,b|0);f=o;o=0;if(f&1)e=64;else e=41}else{o=0;Xa(338,a|0,b|0);f=o;o=0;if(f&1){e=64;break}c[14753]=(c[14753]|0)+4;e=41}while(0);if((e|0)==41){KC(b);l=d;return (c[14753]|0)-(c[14752]|0)>>2|0}else if((e|0)==64){a=Fb()|0;KC(b);break}}else{f=Fb()|0;cU(a);a=f}while(0);break a}while(0);break a}while(0);break a}while(0);break a}while(0);break a}while(0);break a}while(0)}while(0);Qb(a|0);return 0}function GC(a){a=a|0;SC(a);c[a>>2]=33812;return}function HC(a,b){a=a|0;b=b|0;c[a>>2]=0;jD(a,b);return}function IC(a,b){a=a|0;b=b|0;c[a>>2]=0;jD(a,c[b>>2]|0);return}function JC(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;h=l;l=l+32|0;g=h;d=a+4|0;e=((c[d>>2]|0)-(c[a>>2]|0)>>2)+1|0;f=fD(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;gD(g,k>>2>>>0>>1>>>0?(j>>>0>>0?e:j):f,(c[d>>2]|0)-i>>2,a+8|0);d=g+8|0;o=0;Xa(338,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+4,o=0,Xa(340,a|0,g|0),k=o,o=0,!(k&1)):0){iD(g);l=h;return}k=Fb()|0;iD(g);Qb(k|0)}function KC(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function LC(a){a=a|0;SC(a);c[a>>2]=33792;return}function MC(a){a=a|0;SC(a);c[a>>2]=33772;return}function NC(a){a=a|0;SC(a);c[a>>2]=33752;return}function OC(a){a=a|0;SC(a);c[a>>2]=33732;return}function PC(a){a=a|0;SC(a);c[a>>2]=33712;return}function QC(a){a=a|0;SC(a);c[a>>2]=33692;return}function RC(a){a=a|0;SC(a);c[a>>2]=33672;return}function SC(a){a=a|0;cf(a);c[a>>2]=33652;return}function TC(a){a=a|0;AC(a);cU(a);return}function UC(a,b,c){a=a|0;b=b|0;c=c|0;return (c+b+(((O(c,b)|0)>>>0)%3|0)&1|0)==0|0}function VC(a){a=a|0;AC(a);cU(a);return}function WC(a,b,c){a=a|0;b=b|0;c=c|0;c=O(c,b)|0;return (((c>>>0)%3|0)+c&1|0)==0|0}function XC(a){a=a|0;AC(a);cU(a);return}function YC(a,b,c){a=a|0;b=b|0;c=c|0;c=O(c,b)|0;return (c&1|0)==(0-((c>>>0)%3|0)|0)|0}function ZC(a){a=a|0;AC(a);cU(a);return}function _C(a,b,c){a=a|0;b=b|0;c=c|0;return (((c>>>0)/3|0)+(b>>>1)&1|0)==0|0}function $C(a){a=a|0;AC(a);cU(a);return}function aD(a,b,c){a=a|0;b=b|0;c=c|0;return (((c+b|0)>>>0)%3|0|0)==0|0}function bD(a){a=a|0;AC(a);cU(a);return}function cD(a,b,c){a=a|0;b=b|0;c=c|0;return ((c>>>0)%3|0|0)==0|0}function dD(a){a=a|0;AC(a);cU(a);return}function eD(a,b,c){a=a|0;b=b|0;c=c|0;return (b&1|0)==0|0}function fD(a){a=a|0;return 1073741823}function gD(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function hD(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;IC((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function iD(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;KC(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function jD(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function kD(a){a=a|0;AC(a);cU(a);return}function lD(a,b,c){a=a|0;b=b|0;c=c|0;return (c+b&1|0)==0|0}function mD(a){a=a|0;var b=0;if(a>>>0<=7)return nD((c[14752]|0)+(a<<2)|0)|0;a=Ab(8)|0;o=0;Xa(102,a|0,48785);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else Mb(a|0,632,117);return 0}function nD(a){a=a|0;return c[a>>2]|0}function oD(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=0;while(1){if((f|0)==(d|0))break;else e=0;while(1){if((e|0)==(d|0))break;if(Tc[c[(c[a>>2]|0)+8>>2]&127](a,f,e)|0)Xk(b,e,f);e=e+1|0}f=f+1|0}return}function pD(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;e=a[d+11>>0]|0;f=e<<24>>24<0;qD(b,f?c[d>>2]|0:d,f?c[d+4>>2]|0:e&255,0);return}function qD(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;zU(a,b,c)|0;return}function rD(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=sD(b)|0;do if((d*13|0)>(al(f)|0)){b=Ab(8)|0;o=0;Na(325,b|0);h=o;o=0;if(h&1){h=Fb()|0;Jb(b|0);break}else Mb(b|0,160,61)}else{e=d<<1;g=bU(e)|0;b=d;d=0;while(1){if((b|0)<=0)break;i=$k(f,13)|0;i=((i|0)/96|0)<<8|((i|0)%96|0);i=((i|0)<959?41377:42657)+i|0;a[g+d>>0]=i>>>8;a[g+(d|1)>>0]=i;b=b+-1|0;d=d+2|0}o=0;db(102,c|0,g|0,e|0,0);i=o;o=0;if(!(i&1)){dU(g);return}b=Gb(24)|0;i=z;if((i|0)==(mc(24)|0)){Bb(b|0)|0;dU(g);b=Ab(8)|0;o=0;Na(325,b|0);i=o;o=0;if(i&1){i=Fb()|0;Jb(b|0);b=i}else{o=0;bb(68,b|0,160,61);o=0;b=Fb()|0}o=0;La(44);i=o;o=0;if(i&1){i=Gb(0)|0;_g(i)}else h=b}else h=b}while(0);Qb(h|0)}function sD(a){a=a|0;return c[a>>2]|0}function tD(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=d<<1;g=bU(f)|0;e=0;while(1){if((d|0)<=0)break;i=$k(rq(b)|0,13)|0;i=((i|0)/192|0)<<8|((i|0)%192|0);i=((i|0)<7936?33088:49472)+i|0;a[g+e>>0]=i>>>8;a[g+(e|1)>>0]=i;d=d+-1|0;e=e+2|0}o=0;db(102,c|0,g|0,f|0,0);i=o;o=0;if(!(i&1)){dU(g);return}d=Gb(24)|0;i=z;if((i|0)==(mc(24)|0)){Bb(d|0)|0;dU(g);d=Ab(8)|0;o=0;Na(325,d|0);i=o;o=0;if(i&1){i=Fb()|0;Jb(d|0);d=i}else{o=0;bb(68,d|0,160,61);o=0;d=Fb()|0}o=0;La(44);i=o;o=0;if(i&1){i=Gb(0)|0;_g(i)}else h=d}else h=d;Qb(h|0)}function uD(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;s=l;l=l+48|0;m=s+36|0;u=s+24|0;t=s+12|0;q=s;j=sD(b)|0;do if((e<<3|0)>(al(j)|0)){i=Ab(8)|0;o=0;Na(325,i|0);u=o;o=0;if(u&1){u=Fb()|0;Jb(i|0);i=u;break}else Mb(i|0,160,61)}else{Ld(u,e);p=vD(u)|0;o=0;p=ja(102,p|0,0)|0;k=o;o=0;do if(k&1)i=Fb()|0;else{b=0;while(1){if((b|0)>=(e|0))break;o=0;k=ja(103,j|0,8)|0;v=o;o=0;if(v&1){r=14;break}a[p+b>>0]=k;b=b+1|0}if((r|0)==14){i=Fb()|0;break};c[t>>2]=0;c[t+4>>2]=0;c[t+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[t+(b<<2)>>2]=0;b=b+1|0}do if(f){o=0;b=fa(151,f|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(104,t|0,b|0)|0,v=o,o=0,!(v&1)):0)r=29;else r=28}else{o=0;db(103,q|0,p|0,e|0,h|0);v=o;o=0;if(v&1){i=Fb()|0;break}b=t+11|0;if((a[b>>0]|0)<0){v=c[t>>2]|0;a[m>>0]=0;ah(v,m);c[t+4>>2]=0}else{a[m>>0]=0;ah(t,m);a[b>>0]=0}o=0;Xa(172,t|0,0);v=o;o=0;if(v&1){v=Gb(0)|0;_g(v)};c[t>>2]=c[q>>2];c[t+4>>2]=c[q+4>>2];c[t+8>>2]=c[q+8>>2];b=0;while(1){if((b|0)==3)break;c[q+(b<<2)>>2]=0;b=b+1|0}pU(q);r=29}while(0);do if((r|0)==29){o=0;db(102,d|0,p|0,e|0,0);v=o;o=0;if(!(v&1)){i=xD(wD(g)|0)|0;b=i+4|0;j=c[b>>2]|0;if((j|0)==(c[i+8>>2]|0)){o=0;Xa(341,i|0,u|0);v=o;o=0;if(v&1){r=28;break}}else{o=0;Xa(83,j|0,u|0);v=o;o=0;if(v&1){r=28;break}c[b>>2]=(c[b>>2]|0)+12}pU(t);Nd(u);l=s;return}b=Gb(24)|0;v=z;if((v|0)==(mc(24)|0)){Bb(b|0)|0;b=Ab(8)|0;o=0;Na(325,b|0);v=o;o=0;if(v&1){v=Fb()|0;Jb(b|0);b=v}else{o=0;bb(68,b|0,160,61);o=0;b=Fb()|0}o=0;La(44);v=o;o=0;if(v&1){v=Gb(0)|0;_g(v)}else i=b}else i=b}while(0);if((r|0)==28)i=Fb()|0;pU(t)}while(0);Nd(u)}while(0);Qb(i|0)}function vD(a){a=a|0;return c[a+8>>2]|0}function wD(a){a=a|0;return c[a+8>>2]|0}function xD(a){a=a|0;return a+8|0}function yD(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;h=l;l=l+32|0;g=h;d=a+4|0;e=(((c[d>>2]|0)-(c[a>>2]|0)|0)/12|0)+1|0;f=zD(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=((c[a+8>>2]|0)-i|0)/12|0;j=k<<1;AD(g,k>>>0>>1>>>0?(j>>>0>>0?e:j):f,((c[d>>2]|0)-i|0)/12|0,a+8|0);d=g+8|0;o=0;Xa(83,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+12,o=0,Xa(342,a|0,g|0),k=o,o=0,!(k&1)):0){CD(g);l=h;return}k=Fb()|0;CD(g);Qb(k|0)}function zD(a){a=a|0;return 357913941}function AD(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=357913941){e=aU(b*12|0)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d*12|0)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b*12|0);return}function BD(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-12|0;Gd((c[g>>2]|0)+-12|0,h);c[g>>2]=(c[g>>2]|0)+-12;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function CD(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;fd[c[c[e>>2]>>2]&511](e)}a=c[a>>2]|0;if(a|0)cU(a);return}function DD(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,m=0,n=0,p=0,q=0;k=l;l=l+160|0;n=k+136|0;q=k;m=bU((e|0)>-1?e:-1)|0;h=e;g=0;while(1){j=m+g|0;f=m+(g+1)|0;if((h|0)<=2){p=28;break}if((al(rq(b)|0)|0)<10){p=4;break}i=$k(rq(b)|0,10)|0;if((i|0)>999){p=6;break}a[j>>0]=a[48819+((i|0)/100|0)>>0]|0;a[f>>0]=a[48819+(((i|0)/10|0|0)%10|0)>>0]|0;a[m+(g+2)>>0]=a[48819+((i|0)%10|0)>>0]|0;h=h+-3|0;g=g+3|0}a:do if((p|0)==4){dU(m);q=Ab(8)|0;hg(q,48864);Mb(q|0,24,58)}else if((p|0)==6){h=q+56|0;b=q+4|0;c[q>>2]=220;c[h>>2]=240;o=0;Xa(156,q+56|0,b|0);k=o;o=0;if(k&1)f=Fb()|0;else{c[q+128>>2]=0;c[q+132>>2]=Qg()|0;c[q>>2]=3760;c[h>>2]=3780;o=0;Na(324,b|0);k=o;o=0;do if(k&1)f=Fb()|0;else{c[b>>2]=3796;g=q+36|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[g+(f<<2)>>2]=0;f=f+1|0}c[q+48>>2]=0;c[q+52>>2]=16;c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[n+(f<<2)>>2]=0;f=f+1|0}o=0;Xa(157,b|0,n|0);k=o;o=0;if(k&1){f=Fb()|0;pU(n);pU(g);KK(b);break}pU(n);o=0;f=ja(66,q|0,48881)|0;k=o;o=0;do if(!(k&1)?(o=0,ja(62,f|0,i|0)|0,k=o,o=0,!(k&1)):0){dU(m);f=Ab(8)|0;o=0;Xa(158,n|0,b|0);m=o;o=0;if(m&1){n=Fb()|0;Jb(f|0);f=n;break}else{hg(f,(a[n+11>>0]|0)<0?c[n>>2]|0:n);o=0;bb(68,f|0,24,58);o=0;f=Fb()|0;pU(n);break}}else p=24;while(0);if((p|0)==24)f=Fb()|0;Ug(q);break a}while(0);dL(q,3856)}GK(h);Qb(f|0)}else if((p|0)==28){b:do switch(h|0){case 2:{if((al(rq(b)|0)|0)<7){dU(m);q=Ab(8)|0;hg(q,48864);Mb(q|0,24,58)}i=$k(rq(b)|0,7)|0;if((i|0)<=99){a[j>>0]=a[48819+((i|0)/10|0)>>0]|0;g=(i|0)%10|0;p=78;break b}h=q+56|0;b=q+4|0;c[q>>2]=220;c[h>>2]=240;o=0;Xa(156,q+56|0,b|0);k=o;o=0;if(k&1)f=Fb()|0;else{c[q+128>>2]=0;c[q+132>>2]=Qg()|0;c[q>>2]=3760;c[h>>2]=3780;o=0;Na(324,b|0);k=o;o=0;do if(k&1)f=Fb()|0;else{c[b>>2]=3796;g=q+36|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[g+(f<<2)>>2]=0;f=f+1|0}c[q+48>>2]=0;c[q+52>>2]=16;c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[n+(f<<2)>>2]=0;f=f+1|0}o=0;Xa(157,b|0,n|0);k=o;o=0;if(k&1){f=Fb()|0;pU(n);pU(g);KK(b);break}pU(n);o=0;f=ja(66,q|0,48914)|0;k=o;o=0;do if(!(k&1)?(o=0,ja(62,f|0,i|0)|0,k=o,o=0,!(k&1)):0){dU(m);f=Ab(8)|0;o=0;Xa(158,n|0,b|0);m=o;o=0;if(m&1){n=Fb()|0;Jb(f|0);f=n;break}else{hg(f,(a[n+11>>0]|0)<0?c[n>>2]|0:n);o=0;bb(68,f|0,24,58);o=0;f=Fb()|0;pU(n);break}}else p=50;while(0);if((p|0)==50)f=Fb()|0;Ug(q);break a}while(0);dL(q,3856)}GK(h);Qb(f|0)}case 1:{if((al(rq(b)|0)|0)<4){dU(m);q=Ab(8)|0;hg(q,48864);Mb(q|0,24,58)}g=$k(rq(b)|0,4)|0;if((g|0)>9){b=q+56|0;i=q+4|0;c[q>>2]=220;c[b>>2]=240;o=0;Xa(156,q+56|0,i|0);k=o;o=0;if(k&1)f=Fb()|0;else{c[q+128>>2]=0;c[q+132>>2]=Qg()|0;c[q>>2]=3760;c[b>>2]=3780;o=0;Na(324,i|0);k=o;o=0;do if(k&1)f=Fb()|0;else{c[i>>2]=3796;h=q+36|0;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[h+(f<<2)>>2]=0;f=f+1|0}c[q+48>>2]=0;c[q+52>>2]=16;c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[n+(f<<2)>>2]=0;f=f+1|0}o=0;Xa(157,i|0,n|0);k=o;o=0;if(k&1){f=Fb()|0;pU(n);pU(h);KK(i);break}pU(n);o=0;f=ja(66,q|0,48947)|0;k=o;o=0;do if(!(k&1)?(o=0,ja(62,f|0,g|0)|0,k=o,o=0,!(k&1)):0){dU(m);f=Ab(8)|0;o=0;Xa(158,n|0,i|0);m=o;o=0;if(m&1){n=Fb()|0;Jb(f|0);f=n;break}else{hg(f,(a[n+11>>0]|0)<0?c[n>>2]|0:n);o=0;bb(68,f|0,24,58);o=0;f=Fb()|0;pU(n);break}}else p=75;while(0);if((p|0)==75)f=Fb()|0;Ug(q);break a}while(0);dL(q,3856)}GK(b);Qb(f|0)}else{f=j;p=78}break}default:{}}while(0);if((p|0)==78)a[f>>0]=a[48819+g>>0]|0;qD(d,m,e,0);dU(m);l=k;return}while(0);Qb(f|0)}function ED(b){b=b|0;var c=0;if(b>>>0<=44)return a[48819+b>>0]|0;b=Ab(8)|0;o=0;Na(325,b|0);c=o;o=0;if(c&1){c=Fb()|0;Jb(b|0);Qb(c|0)}else Mb(b|0,160,61);return 0}function FD(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,m=0,n=0,p=0,q=0,r=0;n=l;l=l+320|0;k=n+304|0;r=n+168|0;q=n+152|0;p=n+16|0;m=n;i=sD(b)|0;h=r+56|0;j=r+4|0;c[r>>2]=220;c[h>>2]=240;o=0;Xa(156,r+56|0,j|0);g=o;o=0;if(g&1)b=Fb()|0;else{c[r+128>>2]=0;c[r+132>>2]=Qg()|0;c[r>>2]=3760;c[h>>2]=3780;o=0;Na(324,j|0);g=o;o=0;do if(g&1)b=Fb()|0;else{c[j>>2]=3796;g=r+36|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[g+(b<<2)>>2]=0;b=b+1|0}c[r+48>>2]=0;c[r+52>>2]=16;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[k+(b<<2)>>2]=0;b=b+1|0}o=0;Xa(157,j|0,k|0);b=o;o=0;if(b&1){b=Fb()|0;pU(k);pU(g);KK(j);break}pU(k);while(1){if((e|0)<=1){g=30;break}o=0;b=fa(126,i|0)|0;h=o;o=0;if(h&1){g=21;break}if((b|0)<11){g=19;break}o=0;b=ja(103,i|0,11)|0;h=o;o=0;if(h&1){g=21;break}o=0;g=fa(152,(b|0)/45|0|0)|0;h=o;o=0;if(h&1){g=29;break}o=0;ja(105,r|0,g|0)|0;h=o;o=0;if(h&1){g=29;break}o=0;b=fa(152,(b|0)%45|0|0)|0;h=o;o=0;if(h&1){g=29;break}o=0;ja(105,r|0,b|0)|0;h=o;o=0;if(h&1){g=29;break}e=e+-2|0}a:do if((g|0)==19){b=Ab(8)|0;o=0;Na(325,b|0);q=o;o=0;if(q&1){q=Fb()|0;Jb(b|0);b=q;break}else{o=0;bb(68,b|0,160,61);o=0;g=21;break}}else if((g|0)==29)b=Fb()|0;else if((g|0)==30){do if((e|0)==1){o=0;b=fa(126,i|0)|0;h=o;o=0;if(h&1){g=21;break a}if((b|0)<6){b=Ab(8)|0;o=0;Na(325,b|0);q=o;o=0;if(q&1){q=Fb()|0;Jb(b|0);b=q;break a}else{o=0;bb(68,b|0,160,61);o=0;g=21;break a}}else{o=0;b=ja(103,i|0,6)|0;i=o;o=0;if(i&1){g=21;break a}o=0;b=fa(152,b|0)|0;i=o;o=0;if(i&1){g=21;break a}o=0;ja(105,r|0,b|0)|0;i=o;o=0;if(i&1){g=21;break a}else break}}while(0);o=0;Xa(158,q|0,j|0);j=o;o=0;if(j&1)g=21;else{b:do if(f){e=p+56|0;f=p+4|0;c[p>>2]=220;c[e>>2]=240;o=0;Xa(156,p+56|0,f|0);j=o;o=0;if(j&1)b=Fb()|0;else{c[p+128>>2]=0;c[p+132>>2]=Qg()|0;c[p>>2]=3760;c[e>>2]=3780;o=0;Na(324,f|0);j=o;o=0;do if(j&1)b=Fb()|0;else{c[f>>2]=3796;g=p+36|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[g+(b<<2)>>2]=0;b=b+1|0}c[p+48>>2]=0;c[p+52>>2]=16;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[k+(b<<2)>>2]=0;b=b+1|0}o=0;Xa(157,f|0,k|0);j=o;o=0;if(j&1){b=Fb()|0;pU(k);pU(g);KK(f);break}pU(k);i=q+11|0;j=q+4|0;b=0;c:while(1){e=a[i>>0]|0;g=e<<24>>24<0;e=g?c[j>>2]|0:e&255;if(b>>>0>=e>>>0){g=57;break}h=g?c[q>>2]|0:q;g=a[h+b>>0]|0;d:do if(g<<24>>24==37){do if(b>>>0<(e+-1|0)>>>0){g=b+1|0;if((a[h+g>>0]|0)!=37)break;o=0;ja(105,p|0,37)|0;h=o;o=0;if(h&1){g=62;break c}else{b=g;break d}}while(0);o=0;ja(105,p|0,29)|0;h=o;o=0;if(h&1){g=62;break c}}else{o=0;ja(105,p|0,g|0)|0;h=o;o=0;if(h&1){g=62;break c}}while(0);b=b+1|0}do if((g|0)==57){o=0;Xa(158,m|0,f|0);f=o;o=0;if(f&1){b=Fb()|0;break}if((a[i>>0]|0)<0){f=c[q>>2]|0;a[k>>0]=0;ah(f,k);c[j>>2]=0}else{a[k>>0]=0;ah(q,k);a[i>>0]=0}o=0;Xa(172,q|0,0);k=o;o=0;if(k&1){k=Gb(0)|0;_g(k)};c[q>>2]=c[m>>2];c[q+4>>2]=c[m+4>>2];c[q+8>>2]=c[m+8>>2];b=0;while(1){if((b|0)==3)break;c[m+(b<<2)>>2]=0;b=b+1|0}pU(m);Ug(p);g=79;break b}else if((g|0)==62)b=Fb()|0;while(0);Ug(p);break b}while(0);dL(p,3856)}GK(e);g=59}else g=79;while(0);do if((g|0)==79){o=0;bb(140,d|0,q|0,c[1442]|0);p=o;o=0;if(p&1){b=Fb()|0;g=59;break}else{pU(q);Ug(r);l=n;return}}while(0);pU(q)}}while(0);if((g|0)==21)b=Fb()|0;Ug(r);Qb(b|0)}while(0);dL(r,3856)}GK(h);Qb(b|0)}function GD(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0;u=l;l=l+80|0;y=u+72|0;A=u+60|0;B=u+48|0;s=u+44|0;t=u+28|0;p=u+24|0;q=u+20|0;r=u+16|0;x=u+4|0;w=u;v=u+32|0;h=aU(28)|0;o=0;Xa(199,h|0,b|0);m=o;o=0;if(m&1){g=Fb()|0;cU(h)}else{hq(y,h);m=sD(y)|0;c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;h=0;while(1){if((h|0)==3)break;c[A+(h<<2)>>2]=0;h=h+1|0}o=0;Xa(172,A|0,50);k=o;o=0;do if(!(k&1)?(o=0,Xa(343,B|0,0),k=o,o=0,!(k&1)):0){h=0;k=0;while(1){o=0;i=fa(126,m|0)|0;j=o;o=0;if(j&1){j=11;break}if((i|0)<4){j=63;break}o=0;i=ja(103,m|0,4)|0;j=o;o=0;if(j&1){j=14;break}o=0;j=fa(153,i|0)|0;i=o;o=0;if(i&1){j=14;break}if((j|0)==59020){j=63;break}if((j|0)==59188|(j|0)==59212){j=h;k=1;h=j;continue}if((j|0)==59092){o=0;i=fa(126,m|0)|0;j=o;o=0;if(j&1){j=11;break}if((i|0)<16){j=21;break}o=0;ja(103,m|0,16)|0;j=o;o=0;if(j&1){j=11;break}else{i=k;j=h;k=i;h=j;continue}}if((j|0)==59140){o=0;h=fa(154,m|0)|0;j=o;o=0;if(j&1){j=11;break}o=0;h=fa(155,h|0)|0;j=o;o=0;if(j&1){j=31;break}if(!h){j=29;break}else{j=k;k=j;continue}}if((j|0)==59236){o=0;j=ja(103,m|0,4)|0;i=o;o=0;if(i&1){j=11;break}o=0;i=ja(106,59236,d|0)|0;C=o;o=0;if(C&1){j=40;break}o=0;i=ja(103,m|0,i|0)|0;C=o;o=0;if(C&1){j=40;break}if((j|0)!=1){j=k;C=h;k=j;h=C;continue}iq(s,y);o=0;bb(141,s|0,A|0,i|0);C=o;o=0;if(C&1){j=41;break}kq(s);j=k;C=h;k=j;h=C;continue}o=0;i=ja(106,j|0,d|0)|0;C=o;o=0;if(C&1){j=11;break}o=0;i=ja(103,m|0,i|0)|0;C=o;o=0;if(C&1){j=11;break}if((j|0)==59044){iq(t,y);o=0;bb(142,t|0,A|0,i|0);C=o;o=0;if(C&1){j=47;break}kq(t);j=k;C=h;k=j;h=C;continue}if((j|0)==59068){iq(p,y);o=0;db(104,p|0,A|0,i|0,k|0);C=o;o=0;if(C&1){j=51;break}kq(p);j=k;C=h;k=j;h=C;continue}if((j|0)==59116){iq(q,y);o=0;jb(59,q|0,A|0,i|0,h|0,B|0,f|0);C=o;o=0;if(C&1){j=55;break}kq(q);j=k;C=h;k=j;h=C;continue}if((j|0)!=59164){j=60;break}iq(r,y);o=0;bb(143,r|0,A|0,i|0);C=o;o=0;if(C&1){j=59;break}kq(r);j=k;C=h;k=j;h=C}a:switch(j|0){case 14:{h=Gb(632)|0;i=z;if((i|0)==(mc(632)|0)){i=Bb(h|0)|0;h=Ab(8)|0;ID(h,i);o=0;bb(68,h|0,632,117);o=0;h=Gb(632)|0;i=z;o=0;La(44);C=o;o=0;if(C&1)j=90;else j=64}else j=64;break}case 21:{h=Ab(8)|0;o=0;Na(325,h|0);C=o;o=0;if(C&1){j=Gb(632)|0;i=z;Jb(h|0);h=j;j=64;break}else{o=0;bb(68,h|0,160,61);o=0;j=11;break}}case 29:{h=Ab(8)|0;o=0;Na(325,h|0);C=o;o=0;if(C&1){j=Gb(632)|0;i=z;Jb(h|0);h=j;j=64;break}else{o=0;bb(68,h|0,160,61);o=0;j=31;break}}case 40:{h=Gb(632)|0;i=z;j=64;break}case 41:{h=Gb(632)|0;i=z;kq(s);j=64;break}case 47:{h=Gb(632)|0;i=z;kq(t);j=64;break}case 51:{h=Gb(632)|0;i=z;kq(p);j=64;break}case 55:{h=Gb(632)|0;i=z;kq(q);j=64;break}case 59:{h=Gb(632)|0;i=z;kq(r);j=64;break}case 60:{h=Ab(8)|0;o=0;Na(325,h|0);C=o;o=0;if(C&1){j=Gb(632)|0;i=z;Jb(h|0);h=j;j=64;break}else{o=0;bb(68,h|0,160,61);o=0;h=Gb(632)|0;i=z;j=64;break}}case 63:{o=0;i=fa(107,48)|0;C=o;o=0;if(C&1){g=Fb()|0;j=87;break}o=0;Xa(83,x|0,b|0);C=o;o=0;b:do if(C&1)g=Fb()|0;else{o=0;g=fa(107,20)|0;C=o;o=0;do if(!(C&1)){o=0;Xa(140,g|0,A|0);C=o;o=0;if(C&1){C=Fb()|0;cU(g);g=C;break}o=0;Xa(173,w|0,g|0);C=o;o=0;if(!(C&1)){o=0;g=fa(156,e|0)|0;C=o;o=0;if(!(C&1)?(o=0,Xa(95,v|0,g|0),C=o,o=0,!(C&1)):0){o=0;hb(59,i|0,x|0,w|0,B|0,v|0);C=o;o=0;if(!(C&1)){o=0;Xa(130,a|0,i|0);C=o;o=0;if(C&1)g=0;else{pU(v);Ke(w);Nd(x);Kl(B);pU(A);kq(y);l=u;return}}else g=1;C=Fb()|0;pU(v);h=g;g=C}else{g=Fb()|0;h=1}Ke(w);Nd(x);if(h)break b;else{j=87;break a}}else j=80}else j=80;while(0);if((j|0)==80)g=Fb()|0;Nd(x)}while(0);cU(i);j=87;break}}if((j|0)==11){h=Gb(632)|0;i=z;j=64}else if((j|0)==31){h=Gb(632)|0;i=z;j=64}if((j|0)==64)if((i|0)==(mc(632)|0)){Bb(h|0)|0;h=Ab(8)|0;o=0;Na(325,h|0);C=o;o=0;if(C&1){C=Fb()|0;Jb(h|0);h=C}else{o=0;bb(68,h|0,160,61);o=0;h=Fb()|0}o=0;La(44);C=o;o=0;if(C&1)j=90;else{g=h;j=87}}else{g=h;j=87}if((j|0)==87){Kl(B);break}else if((j|0)==90){C=Gb(0)|0;_g(C)}}else j=10;while(0);if((j|0)==10)g=Fb()|0;pU(A);kq(y)}Qb(g|0)}function HD(a,b){a=a|0;b=b|0;var d=0,e=0;cf(a);c[a>>2]=5632;c[a+8>>2]=0;o=0;d=fa(107,20)|0;e=o;o=0;do if(!(e&1)){o=0;Xa(344,d|0,b|0);e=o;o=0;if(e&1){b=Fb()|0;cU(d);break}else{Ml(a,d);return}}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function ID(a,b){a=a|0;b=b|0;au(a,b);c[a>>2]=5724;return}function JD(a){a=a|0;var b=0;b=$k(a,8)|0;do if(b&128){if((b&192|0)==128){a=$k(a,8)|0|b<<8&16128;break}if((b&224|0)==192){a=$k(a,16)|0|b<<16&2031616;break}a=Ab(8)|0;o=0;Na(325,a|0);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else Mb(a|0,160,61)}else a=b&127;while(0);return a|0}function KD(a,b){a=a|0;b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;cf(a);c[a>>2]=33832;Pg(d);o=0;bb(144,a+8|0,b|0,d|0);b=o;o=0;if(b&1){e=Fb()|0;Nd(d);ff(a);Qb(e|0)}else{Nd(d);l=e;return}}function LD(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;f=a+4|0;c[f>>2]=0;c[a+8>>2]=0;a:do if(b|0){o=0;Xa(345,a|0,b|0);e=o;o=0;b:do if(!(e&1)){e=c[f>>2]|0;while(1){o=0;Xa(83,e|0,d|0);e=o;o=0;if(e&1)break b;e=(c[f>>2]|0)+12|0;c[f>>2]=e;b=b+-1|0;if(!b)break a}}while(0);f=Fb()|0;ND(a);Qb(f|0)}while(0);return}function MD(a,b){a=a|0;b=b|0;var d=0;if((zD(a)|0)>>>0>>0)wS(a);if(b>>>0<=357913941){d=aU(b*12|0)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b*12|0);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function ND(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;fd[c[c[e>>2]>>2]&511](e)}cU(c[a>>2]|0)}return}function OD(a){a=a|0;c[a>>2]=33832;ND(a+8|0);ff(a);return}function PD(a){a=a|0;OD(a);cU(a);return}function QD(a){a=a|0;var b=0,c=0;c=l;l=l+16|0;b=c;dj(b,58700);o=0;Xa(137,a|0,b|0);a=o;o=0;if(a&1){c=Fb()|0;gj(b);Qb(c|0)}else{gj(b);l=c;return}}function RD(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,m=0,n=0,p=0;m=l;l=l+32|0;n=m+12|0;i=m;j=Ud(Td(d)|0)|0;fj(n,j);h=0;while(1){if((h|0)>=(j|0)){h=3;break}o=0;f=ja(56,d|0,h|0)|0;g=o;o=0;if(g&1){h=7;break}f=a[f>>0]|0;o=0;g=ja(60,n|0,h|0)|0;p=o;o=0;if(p&1){h=7;break}c[g>>2]=f&255;h=h+1|0}a:do if((h|0)==3){o=0;Xa(138,i|0,n|0);p=o;o=0;do if(!(p&1)){o=0;bb(69,b|0,i|0,j-e|0);p=o;o=0;if(p&1){f=Gb(728)|0;g=z;ij(i);break}ij(i);h=0;while(1){if((h|0)>=(e|0)){h=15;break}o=0;f=ja(60,n|0,h|0)|0;p=o;o=0;if(p&1){h=19;break}f=c[f>>2]|0;o=0;g=ja(56,d|0,h|0)|0;p=o;o=0;if(p&1){h=19;break}a[g>>0]=f;h=h+1|0}if((h|0)==15){ij(n);l=m;return}else if((h|0)==19){k=Fb()|0;break a}}else{f=Gb(728)|0;g=z}while(0);if((g|0)==(mc(728)|0)){Bb(f|0)|0;f=Ab(8)|0;dg(f);o=0;bb(68,f|0,144,56);o=0;f=Fb()|0;o=0;La(44);p=o;o=0;if(p&1){p=Gb(0)|0;_g(p)}else k=f}else k=f}else if((h|0)==7)k=Fb()|0;while(0);ij(n);Qb(k|0)}function SD(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;r=l;l=l+128|0;t=r+112|0;x=r+92|0;f=r+76|0;g=r+72|0;w=r+80|0;v=r+60|0;h=r+24|0;u=r+48|0;s=r+36|0;p=r+12|0;q=r;ki(f,e);o=0;Xa(346,x|0,f|0);n=o;o=0;if(n&1){e=Fb()|0;de(f)}else{de(f);o=0;m=fa(144,x|0)|0;n=o;o=0;do if(n&1)e=Fb()|0;else{o=0;Xa(347,g|0,x|0);n=o;o=0;if(n&1){e=Fb()|0;break}n=gC(g)|0;o=0;n=fa(157,n|0)|0;k=o;o=0;if(k&1){e=Fb()|0;WA(g);break}WA(g);o=0;Xa(348,w|0,x|0);k=o;o=0;if(k&1){e=Fb()|0;break}o=0;Xa(83,h|0,w|0);k=o;o=0;do if(k&1)e=Fb()|0;else{o=0;db(105,v|0,h|0,m|0,n|0);k=o;o=0;if(k&1){e=Fb()|0;Nd(h);break}Nd(h);k=v+4|0;f=0;g=0;while(1){e=c[v>>2]|0;if(f>>>0>=(c[k>>2]|0)-e>>2>>>0){f=10;break}e=qC(e+(f<<2)|0)|0;o=0;e=fa(158,e|0)|0;j=o;o=0;if(j&1){f=21;break}f=f+1|0;g=e+g|0}do if((f|0)==10){o=0;Xa(103,u|0,g|0);j=o;o=0;if(j&1){e=Fb()|0;break}j=0;f=0;a:while(1){e=c[v>>2]|0;if(j>>>0>=(c[k>>2]|0)-e>>2>>>0){f=23;break}o=0;Xa(349,t|0,e+(j<<2)|0);i=o;o=0;if(i&1){f=33;break}i=qC(t)|0;o=0;Xa(350,s|0,i|0);i=o;o=0;if(i&1){f=34;break}i=qC(t)|0;o=0;i=fa(158,i|0)|0;h=o;o=0;if(h&1){f=35;break}o=0;Xa(83,p|0,s|0);h=o;o=0;if(h&1){f=36;break}o=0;bb(145,d|0,p|0,i|0);h=o;o=0;if(h&1){f=37;break}Nd(p);h=0;while(1){if((h|0)>=(i|0))break;o=0;e=ja(56,s|0,h|0)|0;g=o;o=0;if(g&1){f=41;break a}e=a[e>>0]|0;o=0;g=ja(56,u|0,f|0)|0;y=o;o=0;if(y&1){f=41;break a}a[g>>0]=e;h=h+1|0;f=f+1|0}Nd(s);tC(t);j=j+1|0}do if((f|0)==23){o=0;Xa(83,q|0,u|0);y=o;o=0;if(y&1){e=Fb()|0;break}UD(s,t);o=0;hb(60,b|0,q|0,m|0,n|0,s|0);y=o;o=0;if(y&1){e=Fb()|0;VD(s);Nd(q);break}else{VD(s);Nd(q);Nd(u);uC(v);Nd(w);aC(x);l=r;return}}else if((f|0)==33)e=Fb()|0;else if((f|0)==34){e=Fb()|0;f=43}else if((f|0)==35){e=Fb()|0;f=42}else if((f|0)==36){e=Fb()|0;f=42}else if((f|0)==37){e=Fb()|0;Nd(p);f=42}else if((f|0)==41){e=Fb()|0;f=42}while(0);if((f|0)==42){Nd(s);f=43}if((f|0)==43)tC(t);Nd(u)}else if((f|0)==21)e=Fb()|0;while(0);uC(v)}while(0);Nd(w)}while(0);aC(x)}Qb(e|0)}function TD(a,b){a=a|0;b=b|0;c[a>>2]=0;vC(a,c[b>>2]|0);return}function UD(a,b){a=a|0;b=b|0;c[a+4>>2]=0;c[a+8>>2]=0;c[a>>2]=a+4;return}function VD(a){a=a|0;WD(a);return}function WD(a){a=a|0;XD(a,c[a+4>>2]|0);return}function XD(a,b){a=a|0;b=b|0;if(!b)return;else{XD(a,c[b>>2]|0);XD(a,c[b+4>>2]|0);YD(b+16|0);cU(b);return}}function YD(a){a=a|0;pU(a+4|0);return}function ZD(){_D();$D();aE();bE();cE();dE();eE();fE();gE();hE();return}function _D(){iE(59020,0,0,0,0,49112);return}function $D(){iE(59044,10,12,14,0,49104);return}function aE(){iE(59068,9,11,13,0,49091);return}function bE(){iE(59092,0,0,0,0,49073);return}function cE(){iE(59116,8,16,16,0,49068);return}function dE(){iE(59140,0,0,0,0,49064);return}function eE(){iE(59164,8,10,12,0,49058);return}function fE(){iE(59188,0,0,0,0,49038);return}function gE(){iE(59212,0,0,0,0,49017);return}function hE(){iE(59236,8,10,12,0,49011);return}function iE(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0;j=l;l=l+16|0;i=j;c[b>>2]=d;c[b+4>>2]=e;c[b+8>>2]=f;g=b+12|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;d=Uh(h)|0;if(d>>>0>4294967279)lU(g);if(d>>>0<11)a[g+11>>0]=d;else{e=d+16&-16;f=aU(e)|0;c[g>>2]=f;c[b+20>>2]=e|-2147483648;c[b+16>>2]=d;g=f}_i(g,h,d)|0;a[i>>0]=0;ah(g+d|0,i);l=j;return}function jE(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=l;l=l+160|0;h=e+136|0;j=e;do switch(b|0){case 0:{d=59020;break}case 1:{d=59044;break}case 2:{d=59068;break}case 3:{d=59092;break}case 4:{d=59116;break}case 5:{d=59188;break}case 7:{d=59140;break}case 8:{d=59164;break}case 9:{d=59212;break}case 13:{d=59236;break}default:{f=j+56|0;g=j+4|0;c[j>>2]=220;c[f>>2]=240;o=0;Xa(156,j+56|0,g|0);e=o;o=0;if(e&1)d=Fb()|0;else{c[j+128>>2]=0;c[j+132>>2]=Qg()|0;c[j>>2]=3760;c[f>>2]=3780;o=0;Na(324,g|0);e=o;o=0;do if(e&1)d=Fb()|0;else{c[g>>2]=3796;e=j+36|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[e+(d<<2)>>2]=0;d=d+1|0}c[j+48>>2]=0;c[j+52>>2]=16;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[h+(d<<2)>>2]=0;d=d+1|0}o=0;Xa(157,g|0,h|0);d=o;o=0;if(d&1){d=Fb()|0;pU(h);pU(e);KK(g);break}pU(h);o=0;d=ja(66,j|0,49123)|0;f=o;o=0;do if(!(f&1)?(o=0,ja(62,d|0,b|0)|0,f=o,o=0,!(f&1)):0){d=Ab(8)|0;o=0;Xa(158,h|0,g|0);g=o;o=0;if(g&1){h=Fb()|0;Jb(d|0);d=h;break}else{hg(d,(a[h+11>>0]|0)<0?c[h>>2]|0:h);o=0;bb(68,d|0,24,58);o=0;d=Fb()|0;pU(h);break}}else i=29;while(0);if((i|0)==29)d=Fb()|0;Ug(j);Qb(d|0)}while(0);dL(j,3856)}GK(f);Qb(d|0)}}while(0);l=e;return d|0}function kE(a,b){a=a|0;b=b|0;b=QB(b)|0;do if((b|0)>=10)if((b|0)<27){a=a+4|0;break}else{a=a+8|0;break}while(0);return c[a>>2]|0}function lE(a,b,d,e){a=a|0;b=+b;d=+d;e=+e;Zh(a,b,d);c[a>>2]=33848;g[a+16>>2]=e;return}function mE(a){a=a|0;Vh(a);cU(a);return}function nE(a,b,d,e){a=a|0;b=+b;d=+d;e=+e;if(+B(+(d-+Lc[c[(c[a>>2]|0)+12>>2]&63](a)))<=b?+B(+(e-+Lc[c[(c[a>>2]|0)+8>>2]&63](a)))<=b:0){e=+g[a+16>>2];d=+B(+(b-e));if(!(d<=1.0))a=d<=e;else a=1}else a=0;return a|0}function oE(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=+e;f=+f;var h=0,i=0.0;i=(+Lc[c[(c[b>>2]|0)+8>>2]&63](b)+e)*.5;e=(+Lc[c[(c[b>>2]|0)+12>>2]&63](b)+d)*.5;f=(+g[b+16>>2]+f)*.5;b=aU(20)|0;o=0;Ra(42,b|0,+i,+e,+f);h=o;o=0;if(h&1){h=Fb()|0;cU(b);Qb(h|0)}else{pE(a,b);return}}function pE(a,b){a=a|0;b=b|0;c[a>>2]=0;qE(a,b);return}function qE(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function rE(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=33872;d=a+12|0;b=0;while(1){e=c[d>>2]|0;f=c[e>>2]|0;if((b|0)>=((c[e+4>>2]|0)-f>>2|0))break;af(c[f+(b<<2)>>2]|0);c[(c[c[d>>2]>>2]|0)+(b<<2)>>2]=0;b=b+1|0}if(e|0){tE(e);cU(e)}bf(a+36|0);de(a+8|0);ff(a);return}function sE(a){a=a|0;rE(a);cU(a);return}function tE(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-4|0;c[a>>2]=e;b=e}cU(d)}return}function uE(a,b){a=a|0;b=b|0;a=c[a>>2]|0;return +(+(b-(c[a+8>>2]|0)|0)-+(c[a+4>>2]|0)*.5)}function vE(a,b){a=a|0;b=b|0;var d=0.0,e=0.0;d=+g[a+32>>2];e=d*.5;b=c[b>>2]|0;a=0;while(1){if((a|0)>=3){a=1;break}if(!(+B(+(d-+(c[b+(a<<2)>>2]|0)))>=e))a=a+1|0;else{a=0;break}}return a|0}function wE(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0;s=l;l=l+16|0;r=s+4|0;m=s;p=a+8|0;q=_k(be(p)|0)|0;c[m>>2]=0;nj(r,3,m);m=b;while(1){if((m|0)<=-1){k=7;break}j=be(p)|0;o=0;j=la(72,j|0,d|0,m|0)|0;n=o;o=0;if(n&1){k=38;break}i=c[r>>2]|0;k=i+4|0;n=c[k>>2]|0;if((n|0)>(e|0)|j^1){k=6;break}c[k>>2]=n+1;m=m+-1|0}a:do if((k|0)==6)if((n|0)>(e|0))k=7;else{while(1){if((m|0)<=-1){k=11;break}j=be(p)|0;o=0;j=la(72,j|0,d|0,m|0)|0;n=o;o=0;if(n&1){k=38;break a}i=c[r>>2]|0;if(j){k=11;break}j=c[i>>2]|0;if((j|0)>(e|0)){i=j;break}c[i>>2]=j+1;m=m+-1|0}if((k|0)==11)i=c[i>>2]|0;if((i|0)>(e|0)){g=+xE();break}while(1){b=b+1|0;if((b|0)>=(q|0))break;i=be(p)|0;o=0;i=la(72,i|0,d|0,b|0)|0;n=o;o=0;if(n&1){k=38;break a}if(!i)break;i=(c[r>>2]|0)+4|0;j=c[i>>2]|0;if((j|0)>(e|0))break;c[i>>2]=j+1}if((b|0)!=(q|0)?(h=c[r>>2]|0,(c[h+4>>2]|0)<=(e|0)):0){while(1){if((b|0)>=(q|0)){k=27;break}i=be(p)|0;o=0;i=la(72,i|0,d|0,b|0)|0;n=o;o=0;if(n&1){k=38;break a}h=c[r>>2]|0;if(i){k=27;break}j=h+8|0;i=c[j>>2]|0;if((i|0)>(e|0))break;c[j>>2]=i+1;b=b+1|0}if((k|0)==27)i=c[h+8>>2]|0;if((i|0)>(e|0)){g=+xE();break}e=i-f+(c[h>>2]|0)+(c[h+4>>2]|0)|0;if((((e|0)>-1?e:0-e|0)*5|0)>=(f<<1|0)){g=+xE();break}if(vE(a,r)|0){g=+uE(r,b);break}else{g=+xE();break}}g=+xE()}while(0);if((k|0)==7)g=+xE();else if((k|0)==38){s=Fb()|0;pj(r);Qb(s|0)}pj(r);l=s;return +g}function xE(){return +s}function yE(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,i=0,j=0.0,k=0.0,m=0,n=0;n=l;l=l+16|0;m=n;i=c[d>>2]|0;h=c[i+4>>2]|0;i=h+(c[i>>2]|0)+(c[i+8>>2]|0)|0;k=+uE(d,f);j=+wE(b,e,~~k,h<<1,i);a:do if(zE(j)|0)e=18;else{h=c[d>>2]|0;g=+((c[h+4>>2]|0)+(c[h>>2]|0)+(c[h+8>>2]|0)|0)/3.0;h=b+12|0;e=c[h>>2]|0;e=(c[e+4>>2]|0)-(c[e>>2]|0)>>2;f=0;while(1){if((f|0)>=(e|0)){e=9;break}pE(m,c[(c[c[h>>2]>>2]|0)+(f<<2)>>2]|0);d=AE(m)|0;o=0;d=ha(42,d|0,+g,+j,+k)|0;i=o;o=0;if(i&1){e=7;break}if(d){e=6;break}BE(m);f=f+1|0}do if((e|0)==6){b=AE(m)|0;o=0;Za(42,a|0,b|0,+j,+k,+g);a=o;o=0;if(a&1)e=7;else{BE(m);break a}}else if((e|0)==9){i=aU(20)|0;o=0;Ra(42,i|0,+k,+j,+g);d=o;o=0;if(d&1){f=Fb()|0;cU(i);break}c[m>>2]=i;$e(i)|0;f=c[h>>2]|0;e=f+4|0;d=c[e>>2]|0;if((d|0)==(c[f+8>>2]|0))CE(f,m);else{c[d>>2]=i;c[e>>2]=(c[e>>2]|0)+4}f=b+36|0;if(uw(f,0)|0){b=vw(f)|0;kd[c[(c[b>>2]|0)+8>>2]&511](b,c[m>>2]|0)}e=18;break a}while(0);if((e|0)==7){f=Fb()|0;BE(m)}Qb(f|0)}while(0);if((e|0)==18){pE(m,0);DE(a,m);BE(m)}l=n;return}function zE(a){a=+a;return ((IE(a)|0)&2147483647)>>>0>2139095040|0}function AE(a){a=a|0;return c[a>>2]|0}function BE(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function CE(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=EE(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;FE(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;c[c[g>>2]>>2]=c[b>>2];c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(351,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;HE(d);Qb(k|0)}else{HE(d);l=h;return}}function DE(a,b){a=a|0;b=b|0;c[a>>2]=0;qE(a,c[b>>2]|0);return}function EE(a){a=a|0;return 1073741823}function FE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function GE(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;h=a+4|0;g=b+4|0;f=(c[h>>2]|0)-e|0;d=(c[g>>2]|0)+(0-(f>>2)<<2)|0;c[g>>2]=d;if((f|0)>0){wW(d|0,e|0,f|0)|0;e=g;d=c[g>>2]|0}else e=g;g=c[a>>2]|0;c[a>>2]=d;c[e>>2]=g;g=b+8|0;f=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=f;g=a+8|0;h=b+12|0;a=c[g>>2]|0;c[g>>2]=c[h>>2];c[h>>2]=a;c[b>>2]=c[e>>2];return}function HE(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+4>>2]|0;d=a+8|0;e=c[d>>2]|0;while(1){if((e|0)==(b|0))break;f=e+-4|0;c[d>>2]=f;e=f}a=c[a>>2]|0;if(a|0)cU(a);return}function IE(a){a=+a;return (g[j>>2]=a,c[j>>2]|0)|0}function JE(a,b,d,e,f,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=+i;j=j|0;var k=0,l=0;cf(a);c[a>>2]=33872;k=a+8|0;o=0;Xa(128,k|0,b|0);b=o;o=0;if(b&1)b=Fb()|0;else{o=0;b=fa(107,12)|0;l=o;o=0;if(!(l&1)?(c[b>>2]=0,c[b+4>>2]=0,c[b+8>>2]=0,c[a+12>>2]=b,c[a+16>>2]=d,c[a+20>>2]=e,c[a+24>>2]=f,c[a+28>>2]=h,g[a+32>>2]=i,o=0,Xa(352,a+36|0,j|0),l=o,o=0,!(l&1)):0)return;b=Fb()|0;de(k)}ff(a);Qb(b|0)}function KE(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,m=0,n=0,p=0,q=0,r=0,s=0;r=l;l=l+16|0;s=r+4|0;m=r;p=b+16|0;q=(c[b+24>>2]|0)+(c[p>>2]|0)|0;j=b+28|0;k=(c[j>>2]>>1)+(c[b+20>>2]|0)|0;c[m>>2]=0;nj(s,3,m);m=b+8|0;d=0;a:while(1){if((d|0)>=(c[j>>2]|0)){e=32;break}n=d+1|0;i=n>>1;i=k+((d&1|0)==0?i:0-i|0)|0;e=c[s>>2]|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;e=c[p>>2]|0;while(1){if((e|0)>=(q|0)){d=0;break}d=be(m)|0;o=0;d=la(72,d|0,e|0,i|0)|0;h=o;o=0;if(h&1){e=8;break a}if(d){d=0;break}e=e+1|0}while(1){if((e|0)>=(q|0))break;f=be(m)|0;o=0;f=la(72,f|0,e|0,i|0)|0;h=o;o=0;if(h&1){e=14;break a}g=(d|0)==1;h=d+1|0;do if(f){if(g){d=(c[s>>2]|0)+4|0;c[d>>2]=(c[d>>2]|0)+1;d=1;break}if((d|0)!=2){d=(c[s>>2]|0)+(h<<2)|0;c[d>>2]=(c[d>>2]|0)+1;d=h;break}if(vE(b,s)|0){o=0;hb(61,a|0,b|0,s|0,i|0,e|0);h=o;o=0;if(h&1){e=14;break a}o=0;d=ja(107,a|0,0)|0;h=o;o=0;if(h&1){e=20;break a}if(d){e=36;break a}BE(a)}h=c[s>>2]|0;d=h+8|0;c[h>>2]=c[d>>2];c[h+4>>2]=1;c[d>>2]=0;d=1}else{d=g?h:d;h=(c[s>>2]|0)+(d<<2)|0;c[h>>2]=(c[h>>2]|0)+1}while(0);e=e+1|0}if(!(vE(b,s)|0)){d=n;continue}o=0;hb(61,a|0,b|0,s|0,i|0,q|0);i=o;o=0;if(i&1){e=14;break}o=0;d=ja(107,a|0,0)|0;i=o;o=0;if(i&1){e=30;break}if(d){e=36;break}BE(a);d=n}do if((e|0)==8){d=Fb()|0;e=37}else if((e|0)==14){d=Fb()|0;e=37}else if((e|0)==20){d=Fb()|0;BE(a);e=37}else if((e|0)==30){d=Fb()|0;BE(a);e=37}else if((e|0)==32){b=c[b+12>>2]|0;d=c[b>>2]|0;if((c[b+4>>2]|0)!=(d|0)){o=0;Xa(353,a|0,c[d>>2]|0);a=o;o=0;if(!(a&1)){e=36;break}}else{r=Ab(8)|0;hg(r,49217);o=0;bb(68,r|0,24,58);o=0}d=Fb()|0;e=37}while(0);if((e|0)==36){pj(s);l=r;return}else if((e|0)==37){pj(s);Qb(d|0)}}function LE(a,b){a=a|0;b=b|0;return (ME(a,b)|0)^1|0}function ME(a,b){a=a|0;b=b|0;return (c[a>>2]|0)==(b|0)|0}function NE(a){a=a|0;ss(a);cU(a);return}function OE(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;l=+(h|0)+-3.5;if(nn(g,0)|0){h=Pe(g)|0;i=+Lc[c[(c[h>>2]|0)+8>>2]&63](h);g=Pe(g)|0;j=l+-3.0;k=+Lc[c[(c[g>>2]|0)+12>>2]&63](g)}else{g=Pe(e)|0;i=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe(d)|0;i=i-+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe(f)|0;i=i+ +Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe(e)|0;k=+Lc[c[(c[g>>2]|0)+12>>2]&63](g);g=Pe(d)|0;k=k-+Lc[c[(c[g>>2]|0)+12>>2]&63](g);g=Pe(f)|0;j=l;k=k+ +Lc[c[(c[g>>2]|0)+12>>2]&63](g)}g=Pe(d)|0;q=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);d=Pe(d)|0;p=+Lc[c[(c[d>>2]|0)+12>>2]&63](d);d=Pe(e)|0;o=+Lc[c[(c[d>>2]|0)+8>>2]&63](d);e=Pe(e)|0;n=+Lc[c[(c[e>>2]|0)+12>>2]&63](e);e=Pe(f)|0;m=+Lc[c[(c[e>>2]|0)+8>>2]&63](e);f=Pe(f)|0;Km(a,3.5,3.5,l,3.5,j,j,3.5,l,q,p,o,n,i,k,m,+Lc[c[(c[f>>2]|0)+12>>2]&63](f));return}function PE(a,b){a=a|0;b=b|0;var d=0;cf(a);c[a>>2]=33888;d=a+8|0;o=0;Xa(128,d|0,b|0);b=o;o=0;do if(!(b&1)){o=0;Xa(354,a+12|0,0);b=o;o=0;if(b&1){b=Fb()|0;de(d);break}else return}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function QE(a,b){a=a|0;b=b|0;ki(a,b+8|0);return}function RE(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=l;l=l+48|0;h=e+16|0;f=e+8|0;g=e+4|0;d=e;pg(h,c);jg(b+12|0,h)|0;bf(h);ki(f,b+8|0);o=0;Xa(224,g|0,c|0);j=o;o=0;do if(j&1){a=Fb()|0;i=9}else{o=0;bb(99,h|0,f|0,g|0);j=o;o=0;if(j&1){a=Fb()|0;bf(g);i=9;break}bf(g);de(f);o=0;bb(146,g|0,h|0,c|0);j=o;o=0;if(j&1)a=Fb()|0;else{o=0;Xa(225,d|0,g|0);j=o;o=0;do if(!(j&1)){o=0;bb(97,a|0,b|0,d|0);j=o;o=0;if(j&1){a=Fb()|0;ls(d);break}else{ls(d);ls(g);ht(h);l=e;return}}else a=Fb()|0;while(0);ls(g)}ht(h)}while(0);if((i|0)==9)de(f);Qb(a|0)}function SE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0.0,g=0.0,h=0.0,i=0,j=0.0,k=0,m=0,n=0,p=0.0,q=0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;y=l;l=l+112|0;J=y+96|0;I=y+92|0;H=y+88|0;n=y+80|0;k=y+72|0;e=y+68|0;q=y+60|0;m=y+56|0;i=y+40|0;F=y+84|0;E=y+76|0;x=y+36|0;w=y+32|0;u=y+28|0;s=y+24|0;D=y+64|0;v=y+20|0;t=y+16|0;C=y+44|0;A=y+12|0;B=y;WF(J,Us(d)|0);K=Us(d)|0;o=0;Xa(241,I|0,K|0);K=o;o=0;if(K&1)d=Fb()|0;else{K=Us(d)|0;o=0;Xa(240,H|0,K|0);K=o;o=0;if(K&1)d=Fb()|0;else{o=0;Xa(239,n|0,J|0);K=o;o=0;a:do if(K&1)d=Fb()|0;else{o=0;Xa(239,k|0,I|0);K=o;o=0;if(K&1)d=Fb()|0;else{o=0;Xa(239,e|0,H|0);K=o;o=0;do if(K&1)d=Fb()|0;else{o=0;r=+ba(42,b|0,n|0,k|0,e|0);K=o;o=0;if(K&1){d=Fb()|0;fi(e);break}fi(e);fi(k);fi(n);if(!(r<1.0)){o=0;Xa(239,q|0,J|0);K=o;o=0;if(!(K&1)){o=0;Xa(239,m|0,I|0);K=o;o=0;if(K&1)d=Fb()|0;else{o=0;Xa(239,i|0,H|0);K=o;o=0;do if(K&1)d=Fb()|0;else{o=0;n=na(42,q|0,m|0,i|0,+r)|0;K=o;o=0;if(K&1){d=Fb()|0;fi(i);break}fi(i);fi(m);fi(q);o=0;e=fa(159,n|0)|0;K=o;o=0;if(K&1){d=Fb()|0;break a}o=0;d=fa(160,e|0)|0;K=o;o=0;if(K&1){d=Fb()|0;break a}i=d+-7|0;o=0;Xa(353,F|0,0);K=o;o=0;if(K&1){d=Fb()|0;break a}o=0;d=fa(161,e|0)|0;K=o;o=0;b:do if(K&1)G=47;else{c:do if((c[d+4>>2]|0)!=(c[d>>2]|0)){K=Ss(I)|0;o=0;g=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;if(K&1){G=47;break b}K=Ss(J)|0;o=0;h=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;if(K&1){G=47;break b}K=Ss(H)|0;o=0;f=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;if(K&1){G=47;break b}j=g-h+f;K=Ss(I)|0;o=0;f=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;do if(!(K&1)){K=Ss(J)|0;o=0;g=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;if(K&1)break;K=Ss(H)|0;o=0;h=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;if(K&1)break;p=f-g+h;h=1.0-3.0/+(i|0);K=Ss(J)|0;o=0;f=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;do if(!(K&1)){K=Ss(J)|0;o=0;g=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;if(K&1)break;k=~~(f+h*(j-g));K=Ss(J)|0;o=0;f=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;do if(!(K&1)){K=Ss(J)|0;o=0;g=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;if(K&1)break;i=~~(f+h*(p-g));e=4;while(1){if((e|0)>=17)break;o=0;$a(42,E|0,b|0,+r,k|0,i|0,+(+(e|0)));K=o;o=0;if(!(K&1)){G=52;break}d=Gb(24)|0;K=z;if((K|0)!=(mc(24)|0))break b;Bb(d|0)|0;o=0;La(44);K=o;o=0;if(K&1){G=56;break}e=e<<1}if((G|0)==52){WE(F,E)|0;BE(E)}else if((G|0)==56){d=Fb()|0;break b}ME(F,0)|0;break c}while(0);d=Fb()|0;break b}while(0);d=Fb()|0;break b}while(0);d=Fb()|0;break b}while(0);d=c[(c[b>>2]|0)+8>>2]|0;o=0;Xa(239,x|0,J|0);K=o;o=0;if(K&1){G=47;break}o=0;Xa(239,w|0,I|0);K=o;o=0;if(K&1)d=Fb()|0;else{o=0;Xa(239,u|0,H|0);K=o;o=0;if(K&1)d=Fb()|0;else{o=0;Xa(355,s|0,F|0);K=o;o=0;do if(K&1)d=Fb()|0;else{o=0;nb(d|0,E|0,b|0,x|0,w|0,u|0,s|0,n|0);K=o;o=0;if(K&1){d=Fb()|0;fi(s);break}fi(s);fi(u);fi(w);fi(x);o=0;Xa(128,v|0,b+8|0);K=o;o=0;d:do if(K&1)d=Fb()|0;else{o=0;Xa(168,t|0,E|0);K=o;o=0;do if(K&1)d=Fb()|0;else{o=0;db(106,D|0,v|0,n|0,t|0);K=o;o=0;if(K&1){d=Fb()|0;qm(t);break}qm(t);de(v);o=0;d=fa(107,20)|0;K=o;o=0;do if(K&1)G=86;else{o=0;Xa(213,d|0,4);K=o;o=0;if(K&1){K=Fb()|0;cU(d);d=K;break}o=0;Xa(214,C|0,d|0);K=o;o=0;if(K&1){G=86;break}o=0;d=ja(55,C|0,0)|0;K=o;o=0;e:do if(K&1)G=88;else{gi(d,ZE(H)|0);o=0;d=ja(55,C|0,1)|0;K=o;o=0;if(K&1){G=88;break}gi(d,ZE(J)|0);o=0;d=ja(55,C|0,2)|0;K=o;o=0;if(K&1){G=88;break}gi(d,ZE(I)|0);f:do if(LE(F,0)|0){o=0;d=ja(55,C|0,3)|0;K=o;o=0;if(K&1){G=88;break e}gi(d,_E(F)|0)}else{K=Ss(I)|0;o=0;f=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;if(K&1){G=88;break e}K=Ss(J)|0;o=0;g=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;if(K&1){G=88;break e}K=Ss(H)|0;o=0;h=+X(c[(c[K>>2]|0)+8>>2]|0,K|0);K=o;o=0;if(K&1){G=88;break e}j=f-g+h;K=Ss(I)|0;o=0;f=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;do if(!(K&1)){K=Ss(J)|0;o=0;g=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;if(K&1)break;K=Ss(H)|0;o=0;h=+X(c[(c[K>>2]|0)+12>>2]|0,K|0);K=o;o=0;if(K&1)break;f=f-g+h;o=0;d=ja(55,C|0,3)|0;K=o;o=0;do if(!(K&1)){o=0;e=fa(107,16)|0;K=o;o=0;if(K&1)break;o=0;Pa(42,e|0,+j,+f);K=o;o=0;if(K&1){d=Fb()|0;cU(e);break e}else{gi(d,e);break f}}while(0);d=Fb()|0;break e}while(0);d=Fb()|0;break e}while(0);o=0;i=fa(107,24)|0;K=o;o=0;if(K&1){G=88;break}o=0;Xa(128,A|0,D|0);K=o;o=0;do if(!(K&1)){o=0;Xa(96,B|0,C|0);K=o;o=0;if(K&1){d=Fb()|0;de(A);break}o=0;bb(60,i|0,A|0,B|0);K=o;o=0;do if(K&1)e=1;else{o=0;Xa(215,a|0,i|0);K=o;o=0;if(K&1){e=0;break}Qe(B);de(A);Qe(C);de(D);qm(E);BE(F);Is(H);Is(I);Is(J);l=y;return}while(0);d=Fb()|0;Qe(B);de(A);if(!e)break e}else d=Fb()|0;while(0);cU(i)}while(0);if((G|0)==88)d=Fb()|0;Qe(C)}while(0);if((G|0)==86)d=Fb()|0;de(D);break d}while(0);de(v)}while(0);qm(E);break b}while(0);fi(u)}fi(w)}fi(x)}while(0);if((G|0)==47)d=Fb()|0;BE(F);break a}while(0);fi(m)}fi(q);break a}}else{K=Ab(8)|0;hg(K,49275);o=0;bb(68,K|0,24,58);o=0}d=Fb()|0;break a}while(0);fi(k)}fi(n)}while(0);Is(H)}Is(I)}Is(J);Qb(d|0)}function TE(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,f=0.0,g=0,h=0,i=0,j=0,k=0;h=l;l=l+16|0;k=h+12|0;j=h+8|0;i=h+4|0;g=h;di(k,b);o=0;Xa(117,j|0,c|0);c=o;o=0;if(c&1)c=Fb()|0;else{o=0;f=+$(43,a|0,k|0,j|0);c=o;o=0;if(!(c&1)?(o=0,Xa(117,i|0,b|0),b=o,o=0,!(b&1)):0){o=0;Xa(117,g|0,d|0);d=o;o=0;do if(!(d&1)){o=0;e=+$(43,a|0,i|0,g|0);d=o;o=0;if(d&1){c=Fb()|0;fi(g);break}else{fi(g);fi(i);fi(j);fi(k);l=h;return +((f+e)*.5)}}else c=Fb()|0;while(0);fi(i)}else c=Fb()|0;fi(j)}fi(k);Qb(c|0);return 0.0}function UE(b,d,e,f){b=b|0;d=d|0;e=e|0;f=+f;var g=0.0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0;m=l;l=l+176|0;n=m+152|0;i=m+12|0;h=m+8|0;k=m+4|0;j=m;p=m+16|0;di(i,b);o=0;Xa(117,h|0,d|0);d=o;o=0;a:do if(d&1){d=Fb()|0;q=8}else{o=0;g=+Z(42,i|0,h|0);d=o;o=0;if(d&1){d=Fb()|0;fi(h);q=8;break}d=Qj(g/f)|0;fi(h);fi(i);di(k,b);o=0;Xa(117,j|0,e|0);i=o;o=0;do if(i&1)d=Fb()|0;else{o=0;g=+Z(42,k|0,j|0);i=o;o=0;if(i&1){d=Fb()|0;fi(j);break}b=Qj(g/f)|0;fi(j);fi(k);b=b+d>>1;d=b+7|0;switch(d&3){case 0:{d=b+8|0;break}case 2:{d=b+6|0;break}case 3:{h=p+56|0;i=p+4|0;c[p>>2]=220;c[h>>2]=240;o=0;Xa(156,p+56|0,i|0);m=o;o=0;if(m&1)d=Fb()|0;else{c[p+128>>2]=0;c[p+132>>2]=Qg()|0;c[p>>2]=3760;c[h>>2]=3780;o=0;Na(324,i|0);m=o;o=0;do if(m&1)d=Fb()|0;else{c[i>>2]=3796;e=p+36|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[e+(b<<2)>>2]=0;b=b+1|0}c[p+48>>2]=0;c[p+52>>2]=16;c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[n+(b<<2)>>2]=0;b=b+1|0}o=0;Xa(157,i|0,n|0);m=o;o=0;if(m&1){d=Fb()|0;pU(n);pU(e);KK(i);break}pU(n);o=0;b=ja(66,p|0,49334)|0;m=o;o=0;do if(!(m&1)?(o=0,ja(62,b|0,d|0)|0,m=o,o=0,!(m&1)):0){d=Ab(8)|0;o=0;Xa(158,n|0,i|0);m=o;o=0;if(m&1){n=Fb()|0;Jb(d|0);d=n;break}else{hg(d,(a[n+11>>0]|0)<0?c[n>>2]|0:n);o=0;bb(68,d|0,24,58);o=0;d=Fb()|0;pU(n);break}}else q=32;while(0);if((q|0)==32)d=Fb()|0;Ug(p);break a}while(0);dL(p,3856)}GK(h);Qb(d|0)}default:{}}l=m;return d|0}while(0);fi(k)}while(0);if((q|0)==8)fi(i);Qb(d|0);return 0}function VE(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0;p=l;l=l+48|0;m=p+8|0;n=p;i=~~(c*f);j=d-i|0;j=(j|0)>0?j:0;k=b+8|0;h=(Zk(be(k)|0)|0)+-1|0;g=i+d|0;h=((g|0)<(h|0)?g:h)-j|0;f=c*3.0;if(+(h|0)0?g:0;d=(_k(be(k)|0)|0)+-1|0;e=i+e|0;d=((e|0)<(d|0)?e:d)-g|0;if(+(d|0)>2]|0);return a|0}function XE(a,b){a=a|0;b=b|0;c[a>>2]=0;gi(a,c[b>>2]|0);return}function YE(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;h=g+4|0;e=g;f=sm()|0;ki(h,b);o=0;Xa(168,e|0,d|0);d=o;o=0;do if(!(d&1)){o=0;hb(50,a|0,f|0,h|0,c|0,e|0);f=o;o=0;if(f&1){a=Fb()|0;qm(e);break}else{qm(e);de(h);l=g;return}}else a=Fb()|0;while(0);de(h);Qb(a|0)}function ZE(a){a=a|0;return c[a>>2]|0}function _E(a){a=a|0;return c[a>>2]|0}function $E(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0.0,g=0,h=0,i=0,j=0;j=Pe(b)|0;j=~~+Lc[c[(c[j>>2]|0)+8>>2]&63](j);g=Pe(b)|0;g=~~+Lc[c[(c[g>>2]|0)+12>>2]&63](g);h=Pe(d)|0;h=~~+Lc[c[(c[h>>2]|0)+8>>2]&63](h);i=Pe(d)|0;f=+aF(a,j,g,h,~~+Lc[c[(c[i>>2]|0)+12>>2]&63](i));i=Pe(d)|0;i=~~+Lc[c[(c[i>>2]|0)+8>>2]&63](i);h=Pe(d)|0;h=~~+Lc[c[(c[h>>2]|0)+12>>2]&63](h);g=Pe(b)|0;g=~~+Lc[c[(c[g>>2]|0)+8>>2]&63](g);d=Pe(b)|0;e=+aF(a,i,h,g,~~+Lc[c[(c[d>>2]|0)+12>>2]&63](d));if(zE(f)|0)return +e;else{j=zE(e)|0;return +(j?f:(f+e)/14.0)}return 0.0}function aF(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0.0,g=0,h=0.0,i=0,j=0.0,k=0.0;k=+bF(a,b,c,d,e);g=d-b|0;d=b-g|0;i=a+8|0;j=+(b|0);if((d|0)>=0)if((d|0)<(Zk(be(i)|0)|0))f=1.0;else{f=+((Zk(be(i)|0)|0)+~b|0)/+(0-g|0);d=(Zk(be(i)|0)|0)+-1|0}else{d=0;f=j/+(g|0)}h=+(c|0);e=~~(h-+(e-c|0)*f);if((e|0)>=0)if((e|0)<(_k(be(i)|0)|0)){g=e;f=1.0}else{f=+((_k(be(i)|0)|0)+~c|0)/+(e-c|0);g=(_k(be(i)|0)|0)+-1|0}else{g=0;f=h/+(c-e|0)}return +(k+ +bF(a,b,c,~~(j+ +(d-b|0)*f),g)+-1.0)}function bF(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0.0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;p=e-c|0;o=d-b|0;o=(((p|0)>-1?p:0-p|0)|0)>(((o|0)>-1?o:0-o|0)|0);p=o?d:e;m=o?e:d;n=o?b:c;l=o?c:b;h=m-l|0;h=(h|0)>-1?h:0-h|0;i=p-n|0;i=(i|0)>-1?i:0-i|0;j=(m|0)>(l|0)?1:-1;k=(p|0)>(n|0)?1:-1;m=j+m|0;a=a+8|0;c=n;g=l;d=0;e=0-h>>1;while(1){if((g|0)==(m|0)){e=10;break}if(!((d|0)==1^(xj(be(a)|0,o?c:g,o?g:c)|0))){if((d|0)==2){e=9;break}d=d+1|0}e=e+i|0;if((e|0)>0)if((c|0)==(p|0)){e=10;break}else{b=e-h|0;e=c+k|0}else{b=e;e=c}c=e;g=g+j|0;e=b}do if((e|0)==9)f=+cF(g,c,l,n);else if((e|0)==10)if((d|0)==2){f=+cF(m,p,l,n);break}else{f=+xE();break}while(0);return +f}function cF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a-c|0;d=b-d|0;return +(+C(+(+((O(d,d)|0)+(O(c,c)|0)|0))))}function dF(a,b,d,e){a=a|0;b=+b;d=+d;e=+e;Zh(a,b,d);c[a>>2]=33908;g[a+16>>2]=e;c[a+20>>2]=1;return}function eF(a){a=a|0;Vh(a);cU(a);return}function fF(a,b,d,e,f){a=a|0;b=+b;d=+d;e=+e;f=f|0;Zh(a,b,d);c[a>>2]=33908;g[a+16>>2]=e;c[a+20>>2]=f;return}function gF(a){a=a|0;return c[a+20>>2]|0}function hF(a){a=a|0;return +(+g[a+16>>2])}function iF(a,b,d,e){a=a|0;b=+b;d=+d;e=+e;if(+B(+(d-+Lc[c[(c[a>>2]|0)+12>>2]&63](a)))<=b?+B(+(e-+Lc[c[(c[a>>2]|0)+8>>2]&63](a)))<=b:0){e=+g[a+16>>2];d=+B(+(b-e));if(!(d<=1.0))a=d<=e;else a=1}else a=0;return a|0}function jF(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=+e;f=+f;var g=0,h=0.0,i=0.0,j=0,k=0;j=b+20|0;k=c[j>>2]|0;g=k+1|0;i=+(g|0);h=(+(k|0)*+Lc[c[(c[b>>2]|0)+8>>2]&63](b)+e)/i;e=+(c[j>>2]|0);e=(e*+Lc[c[(c[b>>2]|0)+12>>2]&63](b)+d)/i;d=+(c[j>>2]|0);f=(d*+hF(b)+f)/i;b=aU(24)|0;o=0;Va(42,b|0,+h,+e,+f,g|0);g=o;o=0;if(g&1){k=Fb()|0;cU(b);Qb(k|0)}else{kF(a,b);return}}function kF(a,b){a=a|0;b=b|0;c[a>>2]=0;Ns(a,b);return}function lF(a,b){a=a|0;b=b|0;return +(+(b-(c[a+16>>2]|0)-(c[a+12>>2]|0)|0)-+(c[a+8>>2]|0)*.5)}function mF(a){a=a|0;var b=0,d=0,e=0.0,f=0,g=0.0,h=0;b=0;d=0;while(1){if((d|0)>=5){h=5;break}f=c[a+(d<<2)>>2]|0;if(!f){b=0;break}b=f+b|0;d=d+1|0}if((h|0)==5)if(((((b|0)>=7?(g=+(b|0)/7.0,e=g*.5,+B(+(g-+(c[a>>2]|0)))>2]|0)))>2]|0)))>2]|0)))>2]|0)))>2]=0;h=h+1|0}n=q+8|0;h=b;m=c[n>>2]|0;while(1){if((h|0)<=-1){k=9;break}if(!(xj(be(a)|0,d,h)|0)){k=7;break}h=h+-1|0;m=m+1|0}do if((k|0)==7){c[n>>2]=m;j=q+4|0;p=c[j>>2]|0;while(1){if((h|0)<=-1){k=15;break}i=(p|0)>(e|0);if(xj(be(a)|0,d,h)|0|i){k=13;break}h=h+-1|0;p=p+1|0}if((k|0)==13){c[j>>2]=p;if(!i){o=c[q>>2]|0;while(1){if((h|0)<=-1)break;if((o|0)>(e|0)|(xj(be(a)|0,d,h)|0)^1)break;h=h+-1|0;o=o+1|0}c[q>>2]=o;if((o|0)>(e|0)){g=+xE();break}h=b;i=c[n>>2]|0;while(1){h=h+1|0;if((h|0)>=(r|0))break;if(!(xj(be(a)|0,d,h)|0))break;i=m+1|0;m=i}c[n>>2]=i;if((h|0)==(r|0)){g=+xE();break}i=q+12|0;k=c[i>>2]|0;while(1){if((h|0)>=(r|0))break;if(!((k|0)<(e|0)&((xj(be(a)|0,d,h)|0)^1)))break;h=h+1|0;k=k+1|0}c[i>>2]=k;if(!((h|0)!=(r|0)&(k|0)<(e|0))){g=+xE();break}j=q+16|0;i=c[j>>2]|0;while(1){if((h|0)>=(r|0))break;if(!((xj(be(a)|0,d,h)|0)&(i|0)<(e|0)))break;h=h+1|0;i=i+1|0}c[j>>2]=i;if((i|0)>=(e|0)){g=+xE();break}r=i-f+o+p+m+k|0;if((((r|0)>-1?r:0-r|0)*5|0)>=(f<<1|0)){g=+xE();break}if(mF(q)|0){g=+lF(q,h);break}else{g=+xE();break}}}else if((k|0)==15)c[j>>2]=p;g=+xE()}else if((k|0)==9){c[n>>2]=m;g=+xE()}while(0);l=s;return +g}function oF(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+32|0;q=s;r=Zk(be(a)|0)|0;h=0;while(1){if((h|0)==5)break;c[q+(h<<2)>>2]=0;h=h+1|0}n=q+8|0;h=b;m=c[n>>2]|0;while(1){if((h|0)<=-1){k=9;break}if(!(xj(be(a)|0,h,d)|0)){k=7;break}h=h+-1|0;m=m+1|0}do if((k|0)==7){c[n>>2]=m;j=q+4|0;p=c[j>>2]|0;while(1){if((h|0)<=-1){k=15;break}i=(p|0)>(e|0);if(xj(be(a)|0,h,d)|0|i){k=13;break}h=h+-1|0;p=p+1|0}if((k|0)==13){c[j>>2]=p;if(!i){o=c[q>>2]|0;while(1){if((h|0)<=-1)break;if((o|0)>(e|0)|(xj(be(a)|0,h,d)|0)^1)break;h=h+-1|0;o=o+1|0}c[q>>2]=o;if((o|0)>(e|0)){g=+xE();break}h=b;i=c[n>>2]|0;while(1){h=h+1|0;if((h|0)>=(r|0))break;if(!(xj(be(a)|0,h,d)|0))break;i=m+1|0;m=i}c[n>>2]=i;if((h|0)==(r|0)){g=+xE();break}i=q+12|0;k=c[i>>2]|0;while(1){if((h|0)>=(r|0))break;if(!((k|0)<(e|0)&((xj(be(a)|0,h,d)|0)^1)))break;h=h+1|0;k=k+1|0}c[i>>2]=k;if(!((h|0)!=(r|0)&(k|0)<(e|0))){g=+xE();break}j=q+16|0;i=c[j>>2]|0;while(1){if((h|0)>=(r|0))break;if(!((xj(be(a)|0,h,d)|0)&(i|0)<(e|0)))break;h=h+1|0;i=i+1|0}c[j>>2]=i;if((i|0)>=(e|0)){g=+xE();break}r=i-f+o+p+m+k|0;if((((r|0)>-1?r:0-r|0)*5|0)>=(f|0)){g=+xE();break}if(mF(q)|0){g=+lF(q,h);break}else{g=+xE();break}}}else if((k|0)==15)c[j>>2]=p;g=+xE()}else if((k|0)==9){c[n>>2]=m;g=+xE()}while(0);l=s;return +g}function pF(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0.0,i=0.0,j=0,k=0.0,m=0,n=0,p=0,q=0,r=0;p=l;l=l+16|0;q=p+4|0;j=p;f=b+8|0;r=c[f>>2]|0;g=(c[b+4>>2]|0)+(c[b>>2]|0)+r+(c[b+12>>2]|0)+(c[b+16>>2]|0)|0;b=~~+lF(b,e)>>>0;i=+nF(a,d,b,r,g);a:do if(!(zE(i)|0)?(k=+oF(a,b,~~i>>>0,c[f>>2]|0,g),!(zE(k)|0)):0){h=+(g|0)/7.0;f=a+4|0;g=a+8|0;b=(c[g>>2]|0)-(c[f>>2]|0)>>2;d=0;while(1){if(d>>>0>=b>>>0){e=16;break}Ms(q,(c[f>>2]|0)+(d<<2)|0);e=Ss(q)|0;o=0;e=ha(43,e|0,+h,+i,+k)|0;r=o;o=0;if(r&1){e=9;break}if(e){e=7;break}Is(q);d=d+1|0}do if((e|0)==7){r=Ss(q)|0;o=0;Za(43,j|0,r|0,+i,+k,+h);r=o;o=0;do if(!(r&1)){o=0;ja(81,(c[f>>2]|0)+(d<<2)|0,j|0)|0;r=o;o=0;if(r&1){b=Fb()|0;Is(j);break}else{Is(j);Is(q);b=1;break a}}else b=Fb()|0;while(0);e=15}else if((e|0)==9){b=Fb()|0;e=15}else if((e|0)==16){b=aU(24)|0;o=0;Ra(43,b|0,+k,+i,+h);r=o;o=0;if(r&1){r=Fb()|0;cU(b);b=r;break}kF(q,b);b=c[g>>2]|0;if((b|0)==(c[a+12>>2]|0)){o=0;Xa(237,f|0,q|0);r=o;o=0;if(!(r&1))e=21}else{o=0;Xa(357,b|0,q|0);r=o;o=0;if(!(r&1)){c[g>>2]=(c[g>>2]|0)+4;e=21}}do if((e|0)==21?(m=a+20|0,o=0,n=ja(87,m|0,0)|0,r=o,o=0,!(r&1)):0){if(n?(n=vw(m)|0,m=c[(c[n>>2]|0)+8>>2]|0,r=qF(q)|0,o=0,Xa(m|0,n|0,r|0),r=o,o=0,r&1):0)break;Is(q);b=1;break a}while(0);b=Fb()|0;Is(q)}while(0);if((e|0)==15)Is(q);Qb(b|0)}else b=0;while(0);l=p;return b|0}function qF(a){a=a|0;return c[a>>2]|0}function rF(b){b=b|0;var d=0,e=0.0,f=0.0,g=0.0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0;p=l;l=l+16|0;n=p+4|0;m=p;j=b+4|0;k=(c[b+8>>2]|0)-(c[j>>2]|0)>>2;do if(k>>>0<2)b=0;else{kF(n,0);i=b+16|0;h=0;b=0;a:while(1){if(h>>>0>=k>>>0){b=0;d=17;break}o=0;Xa(357,m|0,(c[j>>2]|0)+(h<<2)|0);d=o;o=0;if(d&1){d=9;break}d=Ss(m)|0;o=0;d=fa(162,d|0)|0;q=o;o=0;if(q&1){d=10;break}do if((d|0)<2)d=1;else{if(sF(n,0)|0){o=0;ja(81,n|0,m|0)|0;q=o;o=0;if(q&1){d=10;break a}else{d=1;break}}a[i>>0]=1;q=Ss(n)|0;o=0;e=+X(c[(c[q>>2]|0)+8>>2]|0,q|0);q=o;o=0;if(q&1){d=10;break a}q=Ss(m)|0;o=0;f=+X(c[(c[q>>2]|0)+8>>2]|0,q|0);q=o;o=0;if(q&1){d=10;break a}e=+B(+(e-f));q=Ss(n)|0;o=0;f=+X(c[(c[q>>2]|0)+12>>2]|0,q|0);q=o;o=0;if(q&1){d=10;break a}q=Ss(m)|0;o=0;g=+X(c[(c[q>>2]|0)+12>>2]|0,q|0);q=o;o=0;if(q&1){d=10;break a}d=0;b=(~~(e-+B(+(f-g)))|0)/2|0}while(0);Is(m);if(d)h=h+1|0;else{d=17;break}}if((d|0)==9)b=Fb()|0;else if((d|0)==10){b=Fb()|0;Is(m)}else if((d|0)==17){Is(n);break}Is(n);Qb(b|0)}while(0);l=p;return b|0}function sF(a,b){a=a|0;b=b|0;return (c[a>>2]|0)==(b|0)|0}function tF(a){a=a|0;var b=0.0,d=0.0,e=0.0,f=0.0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+16|0;j=m;k=a+4|0;i=(c[a+8>>2]|0)-(c[k>>2]|0)>>2;g=0;h=0;b=0.0;while(1){if(g>>>0>=i>>>0){g=3;break}Ms(j,(c[k>>2]|0)+(g<<2)|0);a=Ss(j)|0;o=0;a=fa(162,a|0)|0;n=o;o=0;if(n&1){g=8;break}if((a|0)<2)a=h;else{n=Ss(j)|0;o=0;d=+X(44,n|0);n=o;o=0;if(n&1){g=8;break}a=h+1|0;b=b+d}Is(j);g=g+1|0;h=a}a:do if((g|0)==3){do if((h|0)>=3){d=b/+(i>>>0);a=0;f=0.0;while(1){if(a>>>0>=i>>>0){g=12;break}Ms(j,(c[k>>2]|0)+(a<<2)|0);n=Ss(j)|0;o=0;e=+X(44,n|0);n=o;o=0;if(n&1){g=15;break}e=f+ +B(+(e-d));Is(j);a=a+1|0;f=e}if((g|0)==12){a=f<=b*.05000000074505806;break}else if((g|0)==15){a=Fb()|0;Is(j);break a}}else a=0;while(0);l=m;return a|0}else if((g|0)==8){a=Fb()|0;Is(j)}while(0);Qb(a|0);return 0}function uF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0.0,h=0,i=0,j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0.0;t=l;l=l+32|0;p=t;n=t+20|0;i=t+16|0;m=t+12|0;q=t+8|0;r=t+4|0;s=b+4|0;k=b+8|0;e=c[k>>2]|0;d=c[s>>2]|0;h=e-d>>2;if(h>>>0<3){t=Ab(8)|0;hg(t,49381);Mb(t|0,24,58)}a:do if((h|0)==3)b=d;else{f=0.0;g=0.0;b=0;while(1){if((b|0)==(h|0))break;j=+hF(Ss((c[s>>2]|0)+(b<<2)|0)|0);f=f+j;g=g+j*j;b=b+1|0}u=+(h>>>0);j=f/u;g=+C(+(g/u-j*j));e=c[s>>2]|0;h=c[k>>2]|0;vF(i,j);c[p>>2]=c[i>>2];wF(e,h,p);f=j*.20000000298023224;f=f>2]|0;d=c[s>>2]|0;i=e-d>>2;b=d;if(!(h>>>0>>0&i>>>0>3))break a;if(+B(+(+hF(Ss(b+(h<<2)|0)|0)-j))>f){d=c[k>>2]|0;e=(c[s>>2]|0)+(h<<2)|0;while(1){b=e+4|0;if((b|0)==(d|0))break;Zs(e,b)|0;e=b}while(1){b=c[k>>2]|0;if((b|0)==(e|0))break;i=b+-4|0;c[k>>2]=i;Is(i)}b=h+-1|0}else b=h;h=b+1|0}}while(0);if(e-d>>2>>>0>3){f=0.0;h=0;while(1){d=e-d>>2;if(h>>>0>=d>>>0)break;u=f+ +hF(Ss(b+(h<<2)|0)|0);i=c[s>>2]|0;f=u;h=h+1|0;e=c[k>>2]|0;d=i;b=i}xF(m,f/+(d>>>0));c[p>>2]=c[m>>2];yF(b,e,p);b=c[s>>2]|0;e=c[k>>2]|0;d=b}if(e-d>>2>>>0>3){c[q>>2]=b+12;c[r>>2]=e;c[n>>2]=c[q>>2];c[p>>2]=c[r>>2];zF(s,n,p)|0}AF(a,3);o=0;ja(81,c[a>>2]|0,c[s>>2]|0)|0;r=o;o=0;if((!(r&1)?(o=0,ja(81,(c[a>>2]|0)+4|0,(c[s>>2]|0)+4|0)|0,r=o,o=0,!(r&1)):0)?(o=0,ja(81,(c[a>>2]|0)+8|0,(c[s>>2]|0)+8|0)|0,s=o,o=0,!(s&1)):0){l=t;return}t=Fb()|0;As(a);Qb(t|0)}function vF(a,b){a=a|0;b=+b;g[a>>2]=b;return}function wF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;I=l;l=l+96|0;E=I+80|0;J=I+76|0;F=I+72|0;G=I+68|0;v=I+64|0;H=I+60|0;w=I+56|0;x=I+52|0;n=I+48|0;y=I+44|0;p=I+40|0;z=I+36|0;q=I+32|0;A=I+28|0;r=I+24|0;B=I+20|0;s=I+16|0;C=I+12|0;t=I+8|0;D=I+4|0;u=I;a:while(1){k=b;m=b+-4|0;while(1){j=a;b:while(1){i=j;d=k-i|0;e=d>>2;a=j+4|0;switch(e|0){case 1:case 0:{K=116;break a}case 2:{K=5;break a}case 3:{K=15;break a}case 4:{K=16;break a}case 5:{K=17;break a}default:{}}if((d|0)<28){K=19;break a}g=j+(((e|0)/2|0)<<2)|0;if((d|0)>3996){f=(e|0)/4|0;f=LF(j,j+(f<<2)|0,g,g+(f<<2)|0,m,c)|0}else f=JF(j,g,m,c)|0;Ms(G,j);o=0;Xa(357,v|0,g|0);h=o;o=0;if(h&1){K=31;break a}o=0;d=la(97,c|0,G|0,v|0)|0;h=o;o=0;if(h&1){K=32;break a}Is(v);Is(G);if(d){d=m;break}else d=m;while(1){d=d+-4|0;if((j|0)==(d|0))break;Ms(A,d);o=0;Xa(357,r|0,g|0);h=o;o=0;if(h&1){K=75;break a}o=0;e=la(97,c|0,A|0,r|0)|0;h=o;o=0;if(h&1){K=76;break a}Is(r);Is(A);if(e){K=71;break b}}Ms(H,j);o=0;Xa(357,w|0,m|0);i=o;o=0;if(i&1){K=34;break a}o=0;d=la(97,c|0,H|0,w|0)|0;i=o;o=0;if(i&1){K=35;break a}Is(w);Is(H);if(!d){while(1){if((a|0)==(m|0)){K=116;break a}Ms(x,j);o=0;Xa(357,n|0,a|0);i=o;o=0;if(i&1){K=44;break a}o=0;d=la(97,c|0,x|0,n|0)|0;i=o;o=0;if(i&1){K=45;break a}Is(n);Is(x);if(d)break;a=a+4|0}Ms(E,a);o=0;ja(81,a|0,m|0)|0;i=o;o=0;if(i&1){K=42;break a}o=0;ja(81,m|0,E|0)|0;i=o;o=0;if(i&1){K=42;break a}Is(E);a=a+4|0}if((a|0)==(m|0)){K=116;break a}else d=m;while(1){while(1){Ms(y,j);o=0;Xa(357,p|0,a|0);i=o;o=0;if(i&1){K=54;break a}o=0;e=la(97,c|0,y|0,p|0)|0;i=o;o=0;if(i&1){K=55;break a}Is(p);Is(y);if(e)break;a=a+4|0}do{Ms(z,j);d=d+-4|0;o=0;Xa(357,q|0,d|0);i=o;o=0;if(i&1){K=60;break a}o=0;e=la(97,c|0,z|0,q|0)|0;i=o;o=0;if(i&1){K=61;break a}Is(q);Is(z)}while(e);if(a>>>0>=d>>>0){j=a;continue b}Ms(E,a);o=0;ja(81,a|0,d|0)|0;i=o;o=0;if(i&1){K=66;break a}o=0;ja(81,d|0,E|0)|0;i=o;o=0;if(i&1){K=66;break a}Is(E);a=a+4|0}}if((K|0)==71){K=0;Ms(E,j);o=0;ja(81,j|0,d|0)|0;h=o;o=0;if(h&1){K=73;break a}o=0;ja(81,d|0,E|0)|0;h=o;o=0;if(h&1){K=73;break a}Is(E);f=f+1|0}c:do if(a>>>0>>0){h=g;while(1){while(1){Ms(B,a);o=0;Xa(357,s|0,h|0);g=o;o=0;if(g&1){K=83;break a}o=0;e=la(97,c|0,B|0,s|0)|0;g=o;o=0;if(g&1){K=84;break a}Is(s);Is(B);g=a+4|0;if(e)a=g;else break}do{d=d+-4|0;Ms(C,d);o=0;Xa(357,t|0,h|0);e=o;o=0;if(e&1){K=89;break a}o=0;e=la(97,c|0,C|0,t|0)|0;L=o;o=0;if(L&1){K=90;break a}Is(t);Is(C)}while(!e);if(a>>>0>d>>>0){e=h;d=f;f=a;break c}Ms(E,a);o=0;ja(81,a|0,d|0)|0;L=o;o=0;if(L&1){K=95;break a}o=0;ja(81,d|0,E|0)|0;L=o;o=0;if(L&1){K=95;break a}Is(E);h=(h|0)==(a|0)?d:h;a=g;f=f+1|0}}else{e=g;d=f;f=a}while(0);if((f|0)!=(e|0)){Ms(D,e);o=0;Xa(357,u|0,f|0);L=o;o=0;if(L&1){K=105;break a}o=0;a=la(97,c|0,D|0,u|0)|0;L=o;o=0;if(L&1){K=106;break a}Is(u);Is(D);if(a){Ms(E,f);o=0;ja(81,f|0,e|0)|0;L=o;o=0;if(L&1){K=103;break a}o=0;ja(81,e|0,E|0)|0;L=o;o=0;if(L&1){K=103;break a}Is(E);a=d+1|0}else a=d}else a=d;if(!a){d=NF(j,f,c)|0;a=f+4|0;if(NF(a,b,c)|0){K=114;break}if(d)continue}L=f;if((L-i|0)>=(k-L|0)){K=113;break}wF(j,f,c);a=f+4|0}if((K|0)==113){K=0;wF(f+4|0,b,c);a=j;b=f;continue}else if((K|0)==114){K=0;if(d){K=116;break}else{a=j;b=f;continue}}}d:switch(K|0){case 5:{Ms(J,m);o=0;Xa(357,F|0,j|0);L=o;o=0;do if(L&1)a=Fb()|0;else{o=0;a=la(97,c|0,J|0,F|0)|0;L=o;o=0;if(L&1){a=Fb()|0;Is(F);break}Is(F);Is(J);if(!a){K=116;break d}Ms(E,j);o=0;ja(81,j|0,m|0)|0;L=o;o=0;if(!(L&1)?(o=0,ja(81,m|0,E|0)|0,L=o,o=0,!(L&1)):0){Is(E);K=116;break d}L=Fb()|0;Is(E);Qb(L|0)}while(0);Is(J);break}case 15:{JF(j,a,m,c)|0;K=116;break}case 16:{KF(j,a,j+8|0,m,c)|0;K=116;break}case 17:{LF(j,a,j+8|0,j+12|0,m,c)|0;K=116;break}case 19:{MF(j,b,c);K=116;break}case 31:{a=Fb()|0;K=33;break}case 32:{a=Fb()|0;Is(v);K=33;break}case 34:{a=Fb()|0;K=36;break}case 35:{a=Fb()|0;Is(w);K=36;break}case 42:{L=Fb()|0;Is(E);Qb(L|0)}case 44:{a=Fb()|0;K=46;break}case 45:{a=Fb()|0;Is(n);K=46;break}case 54:{a=Fb()|0;K=56;break}case 55:{a=Fb()|0;Is(p);K=56;break}case 60:{a=Fb()|0;K=62;break}case 61:{a=Fb()|0;Is(q);K=62;break}case 66:{L=Fb()|0;Is(E);Qb(L|0)}case 73:{L=Fb()|0;Is(E);Qb(L|0)}case 75:{a=Fb()|0;K=77;break}case 76:{a=Fb()|0;Is(r);K=77;break}case 83:{a=Fb()|0;K=85;break}case 84:{a=Fb()|0;Is(s);K=85;break}case 89:{a=Fb()|0;K=91;break}case 90:{a=Fb()|0;Is(t);K=91;break}case 95:{L=Fb()|0;Is(E);Qb(L|0)}case 103:{L=Fb()|0;Is(E);Qb(L|0)}case 105:{a=Fb()|0;K=107;break}case 106:{a=Fb()|0;Is(u);K=107;break}}switch(K|0){case 33:{Is(G);break}case 36:{Is(H);break}case 46:{Is(x);break}case 56:{Is(y);break}case 62:{Is(z);break}case 77:{Is(A);break}case 85:{Is(B);break}case 91:{Is(C);break}case 107:{Is(D);break}case 116:{l=I;return}}Qb(a|0)}function xF(a,b){a=a|0;b=+b;g[a>>2]=b;return}function yF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;I=l;l=l+96|0;E=I+80|0;J=I+76|0;F=I+72|0;G=I+68|0;v=I+64|0;H=I+60|0;w=I+56|0;x=I+52|0;n=I+48|0;y=I+44|0;p=I+40|0;z=I+36|0;q=I+32|0;A=I+28|0;r=I+24|0;B=I+20|0;s=I+16|0;C=I+12|0;t=I+8|0;D=I+4|0;u=I;a:while(1){k=b;m=b+-4|0;while(1){j=a;b:while(1){i=j;d=k-i|0;e=d>>2;a=j+4|0;switch(e|0){case 1:case 0:{K=116;break a}case 2:{K=5;break a}case 3:{K=15;break a}case 4:{K=16;break a}case 5:{K=17;break a}default:{}}if((d|0)<28){K=19;break a}g=j+(((e|0)/2|0)<<2)|0;if((d|0)>3996){f=(e|0)/4|0;f=FF(j,j+(f<<2)|0,g,g+(f<<2)|0,m,c)|0}else f=DF(j,g,m,c)|0;Ms(G,j);o=0;Xa(357,v|0,g|0);h=o;o=0;if(h&1){K=31;break a}o=0;d=la(98,c|0,G|0,v|0)|0;h=o;o=0;if(h&1){K=32;break a}Is(v);Is(G);if(d){d=m;break}else d=m;while(1){d=d+-4|0;if((j|0)==(d|0))break;Ms(A,d);o=0;Xa(357,r|0,g|0);h=o;o=0;if(h&1){K=75;break a}o=0;e=la(98,c|0,A|0,r|0)|0;h=o;o=0;if(h&1){K=76;break a}Is(r);Is(A);if(e){K=71;break b}}Ms(H,j);o=0;Xa(357,w|0,m|0);i=o;o=0;if(i&1){K=34;break a}o=0;d=la(98,c|0,H|0,w|0)|0;i=o;o=0;if(i&1){K=35;break a}Is(w);Is(H);if(!d){while(1){if((a|0)==(m|0)){K=116;break a}Ms(x,j);o=0;Xa(357,n|0,a|0);i=o;o=0;if(i&1){K=44;break a}o=0;d=la(98,c|0,x|0,n|0)|0;i=o;o=0;if(i&1){K=45;break a}Is(n);Is(x);if(d)break;a=a+4|0}Ms(E,a);o=0;ja(81,a|0,m|0)|0;i=o;o=0;if(i&1){K=42;break a}o=0;ja(81,m|0,E|0)|0;i=o;o=0;if(i&1){K=42;break a}Is(E);a=a+4|0}if((a|0)==(m|0)){K=116;break a}else d=m;while(1){while(1){Ms(y,j);o=0;Xa(357,p|0,a|0);i=o;o=0;if(i&1){K=54;break a}o=0;e=la(98,c|0,y|0,p|0)|0;i=o;o=0;if(i&1){K=55;break a}Is(p);Is(y);if(e)break;a=a+4|0}do{Ms(z,j);d=d+-4|0;o=0;Xa(357,q|0,d|0);i=o;o=0;if(i&1){K=60;break a}o=0;e=la(98,c|0,z|0,q|0)|0;i=o;o=0;if(i&1){K=61;break a}Is(q);Is(z)}while(e);if(a>>>0>=d>>>0){j=a;continue b}Ms(E,a);o=0;ja(81,a|0,d|0)|0;i=o;o=0;if(i&1){K=66;break a}o=0;ja(81,d|0,E|0)|0;i=o;o=0;if(i&1){K=66;break a}Is(E);a=a+4|0}}if((K|0)==71){K=0;Ms(E,j);o=0;ja(81,j|0,d|0)|0;h=o;o=0;if(h&1){K=73;break a}o=0;ja(81,d|0,E|0)|0;h=o;o=0;if(h&1){K=73;break a}Is(E);f=f+1|0}c:do if(a>>>0>>0){h=g;while(1){while(1){Ms(B,a);o=0;Xa(357,s|0,h|0);g=o;o=0;if(g&1){K=83;break a}o=0;e=la(98,c|0,B|0,s|0)|0;g=o;o=0;if(g&1){K=84;break a}Is(s);Is(B);g=a+4|0;if(e)a=g;else break}do{d=d+-4|0;Ms(C,d);o=0;Xa(357,t|0,h|0);e=o;o=0;if(e&1){K=89;break a}o=0;e=la(98,c|0,C|0,t|0)|0;L=o;o=0;if(L&1){K=90;break a}Is(t);Is(C)}while(!e);if(a>>>0>d>>>0){e=h;d=f;f=a;break c}Ms(E,a);o=0;ja(81,a|0,d|0)|0;L=o;o=0;if(L&1){K=95;break a}o=0;ja(81,d|0,E|0)|0;L=o;o=0;if(L&1){K=95;break a}Is(E);h=(h|0)==(a|0)?d:h;a=g;f=f+1|0}}else{e=g;d=f;f=a}while(0);if((f|0)!=(e|0)){Ms(D,e);o=0;Xa(357,u|0,f|0);L=o;o=0;if(L&1){K=105;break a}o=0;a=la(98,c|0,D|0,u|0)|0;L=o;o=0;if(L&1){K=106;break a}Is(u);Is(D);if(a){Ms(E,f);o=0;ja(81,f|0,e|0)|0;L=o;o=0;if(L&1){K=103;break a}o=0;ja(81,e|0,E|0)|0;L=o;o=0;if(L&1){K=103;break a}Is(E);a=d+1|0}else a=d}else a=d;if(!a){d=HF(j,f,c)|0;a=f+4|0;if(HF(a,b,c)|0){K=114;break}if(d)continue}L=f;if((L-i|0)>=(k-L|0)){K=113;break}yF(j,f,c);a=f+4|0}if((K|0)==113){K=0;yF(f+4|0,b,c);a=j;b=f;continue}else if((K|0)==114){K=0;if(d){K=116;break}else{a=j;b=f;continue}}}d:switch(K|0){case 5:{Ms(J,m);o=0;Xa(357,F|0,j|0);L=o;o=0;do if(L&1)a=Fb()|0;else{o=0;a=la(98,c|0,J|0,F|0)|0;L=o;o=0;if(L&1){a=Fb()|0;Is(F);break}Is(F);Is(J);if(!a){K=116;break d}Ms(E,j);o=0;ja(81,j|0,m|0)|0;L=o;o=0;if(!(L&1)?(o=0,ja(81,m|0,E|0)|0,L=o,o=0,!(L&1)):0){Is(E);K=116;break d}L=Fb()|0;Is(E);Qb(L|0)}while(0);Is(J);break}case 15:{DF(j,a,m,c)|0;K=116;break}case 16:{EF(j,a,j+8|0,m,c)|0;K=116;break}case 17:{FF(j,a,j+8|0,j+12|0,m,c)|0;K=116;break}case 19:{GF(j,b,c);K=116;break}case 31:{a=Fb()|0;K=33;break}case 32:{a=Fb()|0;Is(v);K=33;break}case 34:{a=Fb()|0;K=36;break}case 35:{a=Fb()|0;Is(w);K=36;break}case 42:{L=Fb()|0;Is(E);Qb(L|0)}case 44:{a=Fb()|0;K=46;break}case 45:{a=Fb()|0;Is(n);K=46;break}case 54:{a=Fb()|0;K=56;break}case 55:{a=Fb()|0;Is(p);K=56;break}case 60:{a=Fb()|0;K=62;break}case 61:{a=Fb()|0;Is(q);K=62;break}case 66:{L=Fb()|0;Is(E);Qb(L|0)}case 73:{L=Fb()|0;Is(E);Qb(L|0)}case 75:{a=Fb()|0;K=77;break}case 76:{a=Fb()|0;Is(r);K=77;break}case 83:{a=Fb()|0;K=85;break}case 84:{a=Fb()|0;Is(s);K=85;break}case 89:{a=Fb()|0;K=91;break}case 90:{a=Fb()|0;Is(t);K=91;break}case 95:{L=Fb()|0;Is(E);Qb(L|0)}case 103:{L=Fb()|0;Is(E);Qb(L|0)}case 105:{a=Fb()|0;K=107;break}case 106:{a=Fb()|0;Is(u);K=107;break}}switch(K|0){case 33:{Is(G);break}case 36:{Is(H);break}case 46:{Is(x);break}case 56:{Is(y);break}case 62:{Is(z);break}case 77:{Is(A);break}case 85:{Is(B);break}case 91:{Is(C);break}case 107:{Is(D);break}case 116:{l=I;return}}Qb(a|0)}function zF(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;g=c[a>>2]|0;f=c[b>>2]|0;g=g+(f-g>>2<<2)|0;b=c[d>>2]|0;a:do if((f|0)!=(b|0)){e=a+4|0;d=c[e>>2]|0;a=g;b=g+(b-f>>2<<2)|0;while(1){if((b|0)==(d|0))break;Zs(a,b)|0;a=a+4|0;b=b+4|0}while(1){b=c[e>>2]|0;if((b|0)==(a|0))break a;f=b+-4|0;c[e>>2]=f;Is(f)}}while(0);return g|0}function AF(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(242,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(358,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;As(a);Qb(d|0)}while(0);return}function BF(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{kF(b,0);b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function CF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0.0,f=0.0;d=gF(Ss(b)|0)|0;d=(d|0)==(gF(Ss(c)|0)|0);b=Ss(b)|0;if(d){f=+hF(b);f=+B(+(f-+g[a>>2]));e=+hF(Ss(c)|0);b=f<+B(+(e-+g[a>>2]))}else{b=gF(b)|0;b=(b|0)>(gF(Ss(c)|0)|0)}return b|0}function DF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;s=l;l=l+48|0;r=s+40|0;h=s+36|0;f=s+32|0;n=s+28|0;i=s+24|0;q=s+20|0;j=s+16|0;k=s+12|0;g=s+8|0;p=s+4|0;m=s;Ms(h,b);o=0;Xa(357,f|0,a|0);e=o;o=0;a:do if(e&1){e=Fb()|0;t=9}else{o=0;e=la(98,d|0,h|0,f|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(f);t=9;break}Is(f);Is(h);b:do if(e){Ms(k,c);o=0;Xa(357,g|0,b|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(98,d|0,k|0,g|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(g);break}Is(g);Is(k);if(e){Ms(r,a);o=0;ja(81,a|0,c|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,c|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);e=1;break b}u=Fb()|0;Is(r);Qb(u|0)}Ms(r,a);o=0;ja(81,a|0,b|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,b|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);Ms(p,c);o=0;Xa(357,m|0,b|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(98,d|0,p|0,m|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(m);break}Is(m);Is(p);if(!e){e=1;break b}Ms(r,b);o=0;ja(81,b|0,c|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,c|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);e=2;break b}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(p);break a}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(k);break a}else{Ms(n,c);o=0;Xa(357,i|0,b|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(98,d|0,n|0,i|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(i);break}Is(i);Is(n);if(!e){e=0;break b}Ms(r,b);o=0;ja(81,b|0,c|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,c|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);Ms(q,b);o=0;Xa(357,j|0,a|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(98,d|0,q|0,j|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(j);break}Is(j);Is(q);if(!e){e=1;break b}Ms(r,a);o=0;ja(81,a|0,b|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,b|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);e=2;break b}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(q);break a}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(n);break a}while(0);l=s;return e|0}while(0);if((t|0)==9)Is(h);Qb(e|0);return 0}function EF(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0;q=l;l=l+32|0;n=q+24|0;i=q+20|0;h=q+16|0;k=q+12|0;j=q+8|0;p=q+4|0;m=q;f=DF(a,b,c,e)|0;Ms(i,d);o=0;Xa(357,h|0,c|0);g=o;o=0;a:do if(g&1){f=Fb()|0;r=22}else{o=0;g=la(98,e|0,i|0,h|0)|0;s=o;o=0;if(s&1){f=Fb()|0;Is(h);r=22;break}Is(h);Is(i);b:do if(g){Ms(n,c);o=0;ja(81,c|0,d|0)|0;s=o;o=0;if(!(s&1)?(o=0,ja(81,d|0,n|0)|0,s=o,o=0,!(s&1)):0){Is(n);g=f+1|0;Ms(k,c);o=0;Xa(357,j|0,b|0);s=o;o=0;do if(s&1)f=Fb()|0;else{o=0;d=la(98,e|0,k|0,j|0)|0;s=o;o=0;if(s&1){f=Fb()|0;Is(j);break}Is(j);Is(k);if(!d){f=g;break b}Ms(n,b);o=0;ja(81,b|0,c|0)|0;s=o;o=0;if(!(s&1)?(o=0,ja(81,c|0,n|0)|0,s=o,o=0,!(s&1)):0){Is(n);d=f+2|0;Ms(p,b);o=0;Xa(357,m|0,a|0);s=o;o=0;do if(s&1)f=Fb()|0;else{o=0;g=la(98,e|0,p|0,m|0)|0;s=o;o=0;if(s&1){f=Fb()|0;Is(m);break}Is(m);Is(p);if(!g){f=d;break b}Ms(n,a);o=0;ja(81,a|0,b|0)|0;s=o;o=0;do if(!(s&1)){o=0;ja(81,b|0,n|0)|0;s=o;o=0;if(s&1)break;Is(n);f=f+3|0;break b}while(0);s=Fb()|0;Is(n);Qb(s|0)}while(0);Is(p);break a}s=Fb()|0;Is(n);Qb(s|0)}while(0);Is(k);break a}s=Fb()|0;Is(n);Qb(s|0)}while(0);l=q;return f|0}while(0);if((r|0)==22)Is(i);Qb(f|0);return 0}function FF(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;t=l;l=l+48|0;r=t+32|0;j=t+28|0;i=t+24|0;m=t+20|0;k=t+16|0;p=t+12|0;n=t+8|0;s=t+4|0;q=t;g=EF(a,b,c,d,f)|0;Ms(j,e);o=0;Xa(357,i|0,d|0);h=o;o=0;a:do if(h&1){g=Fb()|0;u=28}else{o=0;h=la(98,f|0,j|0,i|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(i);u=28;break}Is(i);Is(j);b:do if(h){Ms(r,d);o=0;ja(81,d|0,e|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(81,e|0,r|0)|0,v=o,o=0,!(v&1)):0){Is(r);h=g+1|0;Ms(m,d);o=0;Xa(357,k|0,c|0);v=o;o=0;do if(v&1)g=Fb()|0;else{o=0;e=la(98,f|0,m|0,k|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(k);break}Is(k);Is(m);if(!e){g=h;break b}Ms(r,c);o=0;ja(81,c|0,d|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(81,d|0,r|0)|0,v=o,o=0,!(v&1)):0){Is(r);h=g+2|0;Ms(p,c);o=0;Xa(357,n|0,b|0);v=o;o=0;do if(v&1)g=Fb()|0;else{o=0;e=la(98,f|0,p|0,n|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(n);break}Is(n);Is(p);if(!e){g=h;break b}Ms(r,b);o=0;ja(81,b|0,c|0)|0;v=o;o=0;do if(!(v&1)){o=0;ja(81,c|0,r|0)|0;v=o;o=0;if(v&1)break;Is(r);e=g+3|0;Ms(s,b);o=0;Xa(357,q|0,a|0);v=o;o=0;do if(v&1)g=Fb()|0;else{o=0;h=la(98,f|0,s|0,q|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(q);break}Is(q);Is(s);if(!h){g=e;break b}Ms(r,a);o=0;ja(81,a|0,b|0)|0;v=o;o=0;do if(!(v&1)){o=0;ja(81,b|0,r|0)|0;v=o;o=0;if(v&1)break;Is(r);g=g+4|0;break b}while(0);v=Fb()|0;Is(r);Qb(v|0)}while(0);Is(s);break a}while(0);v=Fb()|0;Is(r);Qb(v|0)}while(0);Is(p);break a}v=Fb()|0;Is(r);Qb(v|0)}while(0);Is(m);break a}v=Fb()|0;Is(r);Qb(v|0)}while(0);l=t;return g|0}while(0);if((u|0)==28)Is(j);Qb(g|0);return 0}function GF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0;j=l;l=l+32|0;k=j+16|0;h=j+8|0;n=j+12|0;m=j+4|0;i=j;d=a+8|0;DF(a,a+4|0,d,c)|0;g=a+12|0;a:while(1){if((g|0)==(b|0)){e=3;break}Ms(k,g);o=0;Xa(357,h|0,d|0);f=o;o=0;if(f&1){e=16;break}o=0;e=la(98,c|0,k|0,h|0)|0;f=o;o=0;if(f&1){e=17;break}Is(h);Is(k);if(e){Ms(n,g);e=g;while(1){o=0;ja(81,e|0,d|0)|0;f=o;o=0;if(f&1){e=19;break a}if((d|0)==(a|0)){d=a;break}o=0;Xa(357,m|0,n|0);f=o;o=0;if(f&1){e=19;break a}e=d+-4|0;o=0;Xa(357,i|0,e|0);f=o;o=0;if(f&1){e=20;break a}o=0;f=la(98,c|0,m|0,i|0)|0;p=o;o=0;if(p&1){e=21;break a}Is(i);Is(m);if(f){p=d;d=e;e=p}else break}o=0;ja(81,d|0,n|0)|0;p=o;o=0;if(p&1){e=19;break}Is(n)}d=g;g=g+4|0}if((e|0)==3){l=j;return}else if((e|0)==16){d=Fb()|0;e=18}else if((e|0)==17){d=Fb()|0;Is(h);e=18}else if((e|0)==19){d=Fb()|0;e=23}else if((e|0)==20){d=Fb()|0;e=22}else if((e|0)==21){d=Fb()|0;Is(i);e=22}if((e|0)==18)Is(k);else if((e|0)==22){Is(m);e=23}if((e|0)==23)Is(n);Qb(d|0)}function HF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0;p=l;l=l+32|0;n=p+24|0;h=p+20|0;g=p+16|0;k=p+12|0;i=p+8|0;m=p+4|0;j=p;f=b+-4|0;e=a+8|0;d=a+4|0;a:do switch(b-a>>2|0){case 1:case 0:{d=1;f=39;break}case 2:{Ms(h,f);o=0;Xa(357,g|0,a|0);m=o;o=0;do if(m&1)d=Fb()|0;else{o=0;d=la(98,c|0,h|0,g|0)|0;m=o;o=0;if(m&1){d=Fb()|0;Is(g);break}Is(g);Is(h);if(!d){d=1;f=39;break a}Ms(n,a);o=0;ja(81,a|0,f|0)|0;m=o;o=0;if(!(m&1)?(o=0,ja(81,f|0,n|0)|0,m=o,o=0,!(m&1)):0){Is(n);d=1;f=39;break a}p=Fb()|0;Is(n);Qb(p|0)}while(0);Is(h);f=40;break}case 3:{DF(a,d,f,c)|0;d=1;f=39;break}case 4:{EF(a,d,e,f,c)|0;d=1;f=39;break}case 5:{FF(a,d,e,a+12|0,f,c)|0;d=1;f=39;break}default:{DF(a,d,e,c)|0;h=a+12|0;d=0;b:while(1){if((h|0)==(b|0)){e=1;d=0;f=38;break}Ms(k,h);o=0;Xa(357,i|0,e|0);g=o;o=0;if(g&1){f=29;break}o=0;f=la(98,c|0,k|0,i|0)|0;g=o;o=0;if(g&1){f=30;break}Is(i);Is(k);if(f){Ms(n,h);f=h;while(1){o=0;ja(81,f|0,e|0)|0;g=o;o=0;if(g&1){f=32;break b}if((e|0)==(a|0)){e=a;break}o=0;Xa(357,m|0,n|0);g=o;o=0;if(g&1){f=32;break b}f=e+-4|0;o=0;Xa(357,j|0,f|0);g=o;o=0;if(g&1){f=33;break b}o=0;g=la(98,c|0,m|0,j|0)|0;q=o;o=0;if(q&1){f=34;break b}Is(j);Is(m);if(g){q=e;e=f;f=q}else break}o=0;ja(81,e|0,n|0)|0;q=o;o=0;if(q&1){f=32;break}d=d+1|0;Is(n);if((d|0)==8){e=0;d=(h+4|0)==(b|0);f=38;break}}e=h;h=h+4|0}if((f|0)==29){d=Fb()|0;f=31}else if((f|0)==30){d=Fb()|0;Is(i);f=31}else if((f|0)==32)d=Fb()|0;else if((f|0)==33){d=Fb()|0;f=35}else if((f|0)==34){d=Fb()|0;Is(j);f=35}else if((f|0)==38){d=d|e;f=39;break a}if((f|0)==31){Is(k);f=40;break a}else if((f|0)==35)Is(m);Is(n);f=40}}while(0);if((f|0)==39){l=p;return d|0}else if((f|0)==40)Qb(d|0);return 0}function IF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0;e=+hF(Ss(b)|0);e=+B(+(e-+g[a>>2]));d=+hF(Ss(c)|0);return e>+B(+(d-+g[a>>2]))|0}function JF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;s=l;l=l+48|0;r=s+40|0;h=s+36|0;f=s+32|0;n=s+28|0;i=s+24|0;q=s+20|0;j=s+16|0;k=s+12|0;g=s+8|0;p=s+4|0;m=s;Ms(h,b);o=0;Xa(357,f|0,a|0);e=o;o=0;a:do if(e&1){e=Fb()|0;t=9}else{o=0;e=la(97,d|0,h|0,f|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(f);t=9;break}Is(f);Is(h);b:do if(e){Ms(k,c);o=0;Xa(357,g|0,b|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(97,d|0,k|0,g|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(g);break}Is(g);Is(k);if(e){Ms(r,a);o=0;ja(81,a|0,c|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,c|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);e=1;break b}u=Fb()|0;Is(r);Qb(u|0)}Ms(r,a);o=0;ja(81,a|0,b|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,b|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);Ms(p,c);o=0;Xa(357,m|0,b|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(97,d|0,p|0,m|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(m);break}Is(m);Is(p);if(!e){e=1;break b}Ms(r,b);o=0;ja(81,b|0,c|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,c|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);e=2;break b}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(p);break a}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(k);break a}else{Ms(n,c);o=0;Xa(357,i|0,b|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(97,d|0,n|0,i|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(i);break}Is(i);Is(n);if(!e){e=0;break b}Ms(r,b);o=0;ja(81,b|0,c|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,c|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);Ms(q,b);o=0;Xa(357,j|0,a|0);u=o;o=0;do if(u&1)e=Fb()|0;else{o=0;e=la(97,d|0,q|0,j|0)|0;u=o;o=0;if(u&1){e=Fb()|0;Is(j);break}Is(j);Is(q);if(!e){e=1;break b}Ms(r,a);o=0;ja(81,a|0,b|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,b|0,r|0)|0,u=o,o=0,!(u&1)):0){Is(r);e=2;break b}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(q);break a}u=Fb()|0;Is(r);Qb(u|0)}while(0);Is(n);break a}while(0);l=s;return e|0}while(0);if((t|0)==9)Is(h);Qb(e|0);return 0}function KF(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0;q=l;l=l+32|0;n=q+24|0;i=q+20|0;h=q+16|0;k=q+12|0;j=q+8|0;p=q+4|0;m=q;f=JF(a,b,c,e)|0;Ms(i,d);o=0;Xa(357,h|0,c|0);g=o;o=0;a:do if(g&1){f=Fb()|0;r=22}else{o=0;g=la(97,e|0,i|0,h|0)|0;s=o;o=0;if(s&1){f=Fb()|0;Is(h);r=22;break}Is(h);Is(i);b:do if(g){Ms(n,c);o=0;ja(81,c|0,d|0)|0;s=o;o=0;if(!(s&1)?(o=0,ja(81,d|0,n|0)|0,s=o,o=0,!(s&1)):0){Is(n);g=f+1|0;Ms(k,c);o=0;Xa(357,j|0,b|0);s=o;o=0;do if(s&1)f=Fb()|0;else{o=0;d=la(97,e|0,k|0,j|0)|0;s=o;o=0;if(s&1){f=Fb()|0;Is(j);break}Is(j);Is(k);if(!d){f=g;break b}Ms(n,b);o=0;ja(81,b|0,c|0)|0;s=o;o=0;if(!(s&1)?(o=0,ja(81,c|0,n|0)|0,s=o,o=0,!(s&1)):0){Is(n);d=f+2|0;Ms(p,b);o=0;Xa(357,m|0,a|0);s=o;o=0;do if(s&1)f=Fb()|0;else{o=0;g=la(97,e|0,p|0,m|0)|0;s=o;o=0;if(s&1){f=Fb()|0;Is(m);break}Is(m);Is(p);if(!g){f=d;break b}Ms(n,a);o=0;ja(81,a|0,b|0)|0;s=o;o=0;do if(!(s&1)){o=0;ja(81,b|0,n|0)|0;s=o;o=0;if(s&1)break;Is(n);f=f+3|0;break b}while(0);s=Fb()|0;Is(n);Qb(s|0)}while(0);Is(p);break a}s=Fb()|0;Is(n);Qb(s|0)}while(0);Is(k);break a}s=Fb()|0;Is(n);Qb(s|0)}while(0);l=q;return f|0}while(0);if((r|0)==22)Is(i);Qb(f|0);return 0}function LF(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;t=l;l=l+48|0;r=t+32|0;j=t+28|0;i=t+24|0;m=t+20|0;k=t+16|0;p=t+12|0;n=t+8|0;s=t+4|0;q=t;g=KF(a,b,c,d,f)|0;Ms(j,e);o=0;Xa(357,i|0,d|0);h=o;o=0;a:do if(h&1){g=Fb()|0;u=28}else{o=0;h=la(97,f|0,j|0,i|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(i);u=28;break}Is(i);Is(j);b:do if(h){Ms(r,d);o=0;ja(81,d|0,e|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(81,e|0,r|0)|0,v=o,o=0,!(v&1)):0){Is(r);h=g+1|0;Ms(m,d);o=0;Xa(357,k|0,c|0);v=o;o=0;do if(v&1)g=Fb()|0;else{o=0;e=la(97,f|0,m|0,k|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(k);break}Is(k);Is(m);if(!e){g=h;break b}Ms(r,c);o=0;ja(81,c|0,d|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(81,d|0,r|0)|0,v=o,o=0,!(v&1)):0){Is(r);h=g+2|0;Ms(p,c);o=0;Xa(357,n|0,b|0);v=o;o=0;do if(v&1)g=Fb()|0;else{o=0;e=la(97,f|0,p|0,n|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(n);break}Is(n);Is(p);if(!e){g=h;break b}Ms(r,b);o=0;ja(81,b|0,c|0)|0;v=o;o=0;do if(!(v&1)){o=0;ja(81,c|0,r|0)|0;v=o;o=0;if(v&1)break;Is(r);e=g+3|0;Ms(s,b);o=0;Xa(357,q|0,a|0);v=o;o=0;do if(v&1)g=Fb()|0;else{o=0;h=la(97,f|0,s|0,q|0)|0;v=o;o=0;if(v&1){g=Fb()|0;Is(q);break}Is(q);Is(s);if(!h){g=e;break b}Ms(r,a);o=0;ja(81,a|0,b|0)|0;v=o;o=0;do if(!(v&1)){o=0;ja(81,b|0,r|0)|0;v=o;o=0;if(v&1)break;Is(r);g=g+4|0;break b}while(0);v=Fb()|0;Is(r);Qb(v|0)}while(0);Is(s);break a}while(0);v=Fb()|0;Is(r);Qb(v|0)}while(0);Is(p);break a}v=Fb()|0;Is(r);Qb(v|0)}while(0);Is(m);break a}v=Fb()|0;Is(r);Qb(v|0)}while(0);l=t;return g|0}while(0);if((u|0)==28)Is(j);Qb(g|0);return 0}function MF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0;j=l;l=l+32|0;k=j+16|0;h=j+8|0;n=j+12|0;m=j+4|0;i=j;d=a+8|0;JF(a,a+4|0,d,c)|0;g=a+12|0;a:while(1){if((g|0)==(b|0)){e=3;break}Ms(k,g);o=0;Xa(357,h|0,d|0);f=o;o=0;if(f&1){e=16;break}o=0;e=la(97,c|0,k|0,h|0)|0;f=o;o=0;if(f&1){e=17;break}Is(h);Is(k);if(e){Ms(n,g);e=g;while(1){o=0;ja(81,e|0,d|0)|0;f=o;o=0;if(f&1){e=19;break a}if((d|0)==(a|0)){d=a;break}o=0;Xa(357,m|0,n|0);f=o;o=0;if(f&1){e=19;break a}e=d+-4|0;o=0;Xa(357,i|0,e|0);f=o;o=0;if(f&1){e=20;break a}o=0;f=la(97,c|0,m|0,i|0)|0;p=o;o=0;if(p&1){e=21;break a}Is(i);Is(m);if(f){p=d;d=e;e=p}else break}o=0;ja(81,d|0,n|0)|0;p=o;o=0;if(p&1){e=19;break}Is(n)}d=g;g=g+4|0}if((e|0)==3){l=j;return}else if((e|0)==16){d=Fb()|0;e=18}else if((e|0)==17){d=Fb()|0;Is(h);e=18}else if((e|0)==19){d=Fb()|0;e=23}else if((e|0)==20){d=Fb()|0;e=22}else if((e|0)==21){d=Fb()|0;Is(i);e=22}if((e|0)==18)Is(k);else if((e|0)==22){Is(m);e=23}if((e|0)==23)Is(n);Qb(d|0)}function NF(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0;p=l;l=l+32|0;n=p+24|0;h=p+20|0;g=p+16|0;k=p+12|0;i=p+8|0;m=p+4|0;j=p;f=b+-4|0;e=a+8|0;d=a+4|0;a:do switch(b-a>>2|0){case 1:case 0:{d=1;f=39;break}case 2:{Ms(h,f);o=0;Xa(357,g|0,a|0);m=o;o=0;do if(m&1)d=Fb()|0;else{o=0;d=la(97,c|0,h|0,g|0)|0;m=o;o=0;if(m&1){d=Fb()|0;Is(g);break}Is(g);Is(h);if(!d){d=1;f=39;break a}Ms(n,a);o=0;ja(81,a|0,f|0)|0;m=o;o=0;if(!(m&1)?(o=0,ja(81,f|0,n|0)|0,m=o,o=0,!(m&1)):0){Is(n);d=1;f=39;break a}p=Fb()|0;Is(n);Qb(p|0)}while(0);Is(h);f=40;break}case 3:{JF(a,d,f,c)|0;d=1;f=39;break}case 4:{KF(a,d,e,f,c)|0;d=1;f=39;break}case 5:{LF(a,d,e,a+12|0,f,c)|0;d=1;f=39;break}default:{JF(a,d,e,c)|0;h=a+12|0;d=0;b:while(1){if((h|0)==(b|0)){e=1;d=0;f=38;break}Ms(k,h);o=0;Xa(357,i|0,e|0);g=o;o=0;if(g&1){f=29;break}o=0;f=la(97,c|0,k|0,i|0)|0;g=o;o=0;if(g&1){f=30;break}Is(i);Is(k);if(f){Ms(n,h);f=h;while(1){o=0;ja(81,f|0,e|0)|0;g=o;o=0;if(g&1){f=32;break b}if((e|0)==(a|0)){e=a;break}o=0;Xa(357,m|0,n|0);g=o;o=0;if(g&1){f=32;break b}f=e+-4|0;o=0;Xa(357,j|0,f|0);g=o;o=0;if(g&1){f=33;break b}o=0;g=la(97,c|0,m|0,j|0)|0;q=o;o=0;if(q&1){f=34;break b}Is(j);Is(m);if(g){q=e;e=f;f=q}else break}o=0;ja(81,e|0,n|0)|0;q=o;o=0;if(q&1){f=32;break}d=d+1|0;Is(n);if((d|0)==8){e=0;d=(h+4|0)==(b|0);f=38;break}}e=h;h=h+4|0}if((f|0)==29){d=Fb()|0;f=31}else if((f|0)==30){d=Fb()|0;Is(i);f=31}else if((f|0)==32)d=Fb()|0;else if((f|0)==33){d=Fb()|0;f=35}else if((f|0)==34){d=Fb()|0;Is(j);f=35}else if((f|0)==38){d=d|e;f=39;break a}if((f|0)==31){Is(k);f=40;break a}else if((f|0)==35)Is(m);Is(n);f=40}}while(0);if((f|0)==39){l=p;return d|0}else if((f|0)==40)Qb(d|0);return 0}function OF(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0.0,g=0.0,h=0,i=0,j=0,k=0,m=0,n=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0;v=l;l=l+48|0;h=v+32|0;d=v+28|0;j=v+20|0;i=v+12|0;m=v+4|0;k=v;y=v+36|0;x=v+24|0;w=v+16|0;s=v+8|0;Vs(h,c[b>>2]|0);o=0;Xa(239,d|0,(c[b>>2]|0)+4|0);A=o;o=0;a:do if(A&1){d=Fb()|0;z=15}else{o=0;g=+Z(43,h|0,d|0);A=o;o=0;if(A&1){z=Fb()|0;fi(d);d=z;z=15;break}fi(d);fi(h);Vs(j,(c[b>>2]|0)+4|0);o=0;Xa(239,i|0,(c[b>>2]|0)+8|0);A=o;o=0;do if(A&1)d=Fb()|0;else{o=0;f=+Z(43,j|0,i|0);A=o;o=0;if(A&1){d=Fb()|0;fi(i);break}fi(i);fi(j);Vs(m,c[b>>2]|0);o=0;Xa(239,k|0,(c[b>>2]|0)+8|0);A=o;o=0;do if(A&1)d=Fb()|0;else{o=0;e=+Z(43,m|0,k|0);A=o;o=0;if(A&1){d=Fb()|0;fi(k);break}fi(k);fi(m);kF(y,0);o=0;Xa(359,x|0,0);A=o;o=0;if(A&1)d=Fb()|0;else{o=0;Xa(359,w|0,0);A=o;o=0;if(A&1)d=Fb()|0;else{do if(!(f>=g)|!(f>=e)){d=c[b>>2]|0;if(!(e>=f)|!(e>=g)){o=0;ja(81,y|0,d+8|0)|0;A=o;o=0;if(A&1){z=24;break}o=0;ja(81,x|0,c[b>>2]|0)|0;A=o;o=0;if(A&1){z=24;break}o=0;ja(81,w|0,(c[b>>2]|0)+4|0)|0;A=o;o=0;if(A&1){z=24;break}else{z=32;break}}else{o=0;ja(81,y|0,d+4|0)|0;A=o;o=0;if(A&1){z=24;break}o=0;ja(81,x|0,c[b>>2]|0)|0;A=o;o=0;if(A&1){z=24;break}o=0;ja(81,w|0,(c[b>>2]|0)+8|0)|0;A=o;o=0;if(A&1){z=24;break}else{z=32;break}}}else{o=0;ja(81,y|0,c[b>>2]|0)|0;A=o;o=0;if((!(A&1)?(o=0,ja(81,x|0,(c[b>>2]|0)+4|0)|0,A=o,o=0,!(A&1)):0)?(o=0,ja(81,w|0,(c[b>>2]|0)+8|0)|0,A=o,o=0,!(A&1)):0)z=32;else z=24}while(0);b:do if((z|0)==32){A=Ss(w)|0;o=0;e=+X(c[(c[A>>2]|0)+12>>2]|0,A|0);A=o;o=0;if((((!(A&1)?(A=Ss(y)|0,o=0,n=+X(c[(c[A>>2]|0)+12>>2]|0,A|0),A=o,o=0,!(A&1)):0)?(p=e-n,A=Ss(x)|0,o=0,q=+X(c[(c[A>>2]|0)+8>>2]|0,A|0),A=o,o=0,!(A&1)):0)?(A=Ss(y)|0,o=0,r=+X(c[(c[A>>2]|0)+8>>2]|0,A|0),A=o,o=0,!(A&1)):0)?(t=p*(q-r),A=Ss(w)|0,o=0,u=+X(c[(c[A>>2]|0)+8>>2]|0,A|0),A=o,o=0,!(A&1)):0){A=Ss(y)|0;o=0;e=+X(c[(c[A>>2]|0)+8>>2]|0,A|0);A=o;o=0;if(A&1){z=24;break}A=Ss(x)|0;o=0;f=+X(c[(c[A>>2]|0)+12>>2]|0,A|0);A=o;o=0;if(A&1){z=24;break}A=Ss(y)|0;o=0;g=+X(c[(c[A>>2]|0)+12>>2]|0,A|0);A=o;o=0;if(A&1){z=24;break}c:do if(t<(u-e)*(f-g)){o=0;Xa(357,s|0,x|0);A=o;o=0;if(A&1){z=24;break b}o=0;ja(81,x|0,w|0)|0;A=o;o=0;do if(!(A&1)){o=0;ja(81,w|0,s|0)|0;A=o;o=0;if(A&1)break;Is(s);break c}while(0);d=Fb()|0;Is(s);break b}while(0);o=0;Xa(360,a|0,3);A=o;o=0;if(A&1){z=24;break}o=0;ja(81,c[a>>2]|0,w|0)|0;A=o;o=0;do if(!(A&1)){o=0;ja(81,(c[a>>2]|0)+4|0,y|0)|0;A=o;o=0;if(A&1)break;o=0;ja(81,(c[a>>2]|0)+8|0,x|0)|0;A=o;o=0;if(A&1)break;Is(w);Is(x);Is(y);l=v;return}while(0);d=Fb()|0;As(a)}else z=24}while(0);if((z|0)==24)d=Fb()|0;Is(w)}Is(x)}Is(y);break a}while(0);fi(m);break a}while(0);fi(j)}while(0);if((z|0)==15)fi(h);Qb(d|0)}function PF(a,b){a=a|0;b=b|0;var d=0.0,e=0.0,f=0;f=Pe(a)|0;e=+Lc[c[(c[f>>2]|0)+8>>2]&63](f);f=Pe(b)|0;e=e-+Lc[c[(c[f>>2]|0)+8>>2]&63](f);a=Pe(a)|0;d=+Lc[c[(c[a>>2]|0)+12>>2]&63](a);b=Pe(b)|0;d=d-+Lc[c[(c[b>>2]|0)+12>>2]&63](b);return +(+C(+(e*e+d*d)))}function QF(b,d,e){b=b|0;d=d|0;e=e|0;ki(b,d);d=b+4|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;a[d+12>>0]=0;o=0;Xa(352,b+20|0,e|0);e=o;o=0;if(e&1){e=Fb()|0;As(d);de(b);Qb(e|0)}else return}function RF(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;B=l;l=l+80|0;w=B+69|0;x=B+68|0;y=B+48|0;D=B+36|0;z=B+24|0;A=B+12|0;C=B;p=og(e)|0;m=_k(be(d)|0)|0;n=Zk(be(d)|0)|0;e=((m*3|0)>>>0)/(57<<2>>>0)|0;e=p|(e|0)<3?3:e;p=hC(d)|0;q=y+4|0;r=y+8|0;s=y+12|0;t=y+16|0;u=d+16|0;v=n+-1|0;f=0;g=e+-1|0;while(1){if(g>>>0>=m>>>0|f)break;c[y>>2]=0;c[y+4>>2]=0;c[y+8>>2]=0;c[y+12>>2]=0;c[y+16>>2]=0;h=0;k=0;f=0;while(1){if(h>>>0>=n>>>0)break;i=k+1|0;j=(k&1|0)==0;do if(xj(p,h,g)|0){i=j?k:i;k=y+(i<<2)|0;c[k>>2]=(c[k>>2]|0)+1}else{if(!j){i=y+(k<<2)|0;c[i>>2]=(c[i>>2]|0)+1;i=k;break}if((k|0)!=4){k=y+(i<<2)|0;c[k>>2]=(c[k>>2]|0)+1;break}if(!(mF(y)|0)){c[y>>2]=c[r>>2];c[q>>2]=c[s>>2];c[r>>2]=c[t>>2];c[s>>2]=1;c[t>>2]=0;i=3;break}if(pF(d,y,g,h)|0){if(!(a[u>>0]|0)){j=rF(d)|0;k=c[r>>2]|0;i=(j|0)>(k|0);h=i?v:h;g=(i?j+-2-k|0:0)+g|0}else f=tF(d)|0;c[y>>2]=0;c[q>>2]=0;i=0;e=2;j=0;k=0}else{c[y>>2]=c[r>>2];c[q>>2]=c[s>>2];i=3;j=1;k=c[t>>2]|0}c[r>>2]=k;c[s>>2]=j;c[t>>2]=0}while(0);h=h+1|0;k=i}if(mF(y)|0?pF(d,y,g,n)|0:0){e=c[y>>2]|0;if(a[u>>0]|0)f=tF(d)|0}g=e+g|0}uF(D,d);o=0;Xa(231,A|0,D|0);y=o;o=0;do if(y&1){e=Fb()|0;E=35}else{o=0;Xa(232,z|0,A|0);y=o;o=0;if(y&1){e=Fb()|0;As(A);E=35;break};a[w>>0]=a[x>>0]|0;zs(D,z,w);As(z);As(A);o=0;g=fa(107,20)|0;A=o;o=0;if(A&1){e=Fb()|0;break}o=0;Xa(231,C|0,D|0);A=o;o=0;if(!(A&1)){o=0;Xa(233,g|0,C|0);A=o;o=0;if(!(A&1)){o=0;Xa(234,b|0,g|0);b=o;o=0;if(b&1)f=0;else{As(C);As(D);l=B;return}}else f=1;e=Fb()|0;As(C);if(!f)break}else e=Fb()|0;cU(g)}while(0);As(D);Qb(e|0)}function SF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;cf(a);c[a>>2]=33932;e=a+8|0;o=0;Xa(357,e|0,c[b>>2]|0);d=o;o=0;if(d&1)b=Fb()|0;else{d=a+12|0;o=0;Xa(357,d|0,(c[b>>2]|0)+4|0);f=o;o=0;do if(!(f&1)){o=0;Xa(357,a+16|0,(c[b>>2]|0)+8|0);f=o;o=0;if(f&1){b=Fb()|0;Is(d);break}else return}else b=Fb()|0;while(0);Is(e)}ff(a);Qb(b|0)}function TF(a){a=a|0;c[a>>2]=33932;Is(a+16|0);Is(a+12|0);Is(a+8|0);ff(a);return}function UF(a){a=a|0;TF(a);cU(a);return}function VF(a,b){a=a|0;b=b|0;Ms(a,b+8|0);return}function WF(a,b){a=a|0;b=b|0;Ms(a,b+12|0);return}function XF(a,b){a=a|0;b=b|0;Ms(a,b+16|0);return}function YF(a,b){a=a|0;b=b|0;if((a|0)!=(b|0)){c[a>>2]=c[b>>2];ZF(a+4|0,b+4|0)}return}function ZF(a,b){a=a|0;b=b|0;_F(a,b);return}function _F(a,b){a=a|0;b=b|0;var d=0,e=0;a:do if((a|0)!=(b|0)){d=c[b+4>>2]|0;e=a+4|0;c[e>>2]=d;$F(a,d);e=c[e>>2]|0;d=c[b+8>>2]|0;a=a+8|0;b=0;while(1){if((b|0)==(e|0))break a;c[(c[a>>2]|0)+(b<<2)>>2]=c[d+(b<<2)>>2];b=b+1|0}}while(0);return}function $F(a,b){a=a|0;b=b|0;var d=0,e=0;if((c[a>>2]|0)>>>0>>0){d=a+8|0;e=c[d>>2]|0;if(e|0)dU(e);c[a>>2]=b;c[d>>2]=bU(b>>>0>1073741823?-1:b<<2)|0}return}function aG(a){a=a|0;return bG(a)|0}function bG(a){a=a|0;return (c[a+4>>2]|0)==0|0}function cG(a){a=a|0;var b=0,d=0;d=a+8|0;b=a+4|0;a=c[b>>2]|0;while(1){if(!a)break;a=a+-1|0;if(c[(c[d>>2]|0)+(a<<2)>>2]|0)break;c[b>>2]=a}return}function dG(a,b){a=a|0;b=b|0;c[a>>2]=eG(b)|0;pG(a+4|0,fG(b)|0);return}function eG(a){a=a|0;return ((a|0)==0?0:(a|0)>0?1:-1)|0}function fG(a){a=a|0;return ((a|0)<0?0-a|0:a)|0}function gG(a){a=a|0;var b=0;switch(c[a+4>>2]|0){case 0:{a=0;b=4;break}case 1:{a=c[c[a+8>>2]>>2]|0;if((a&65535|0)==(a|0)){a=a&65535;b=4}else b=3;break}default:b=3}if((b|0)==3){b=Ab(4)|0;c[b>>2]=49453;Mb(b|0,3304,0)}else if((b|0)==4)return a|0;return 0}function hG(a){a=a|0;return c[a+4>>2]|0}function iG(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;k=l;l=l+16|0;j=k;a:do if((a|0)==(b|0)|(a|0)==(d|0)){Ww(j);o=0;bb(117,j|0,b|0,d|0);d=o;o=0;if(!(d&1)?(o=0,Xa(268,a|0,j|0),d=o,o=0,!(d&1)):0){Sw(j);b=18;break}a=Fb()|0;Sw(j);b=19}else{e=c[b>>2]|0;if(!e){YF(a,d);b=18;break}f=c[d>>2]|0;if(!f){YF(a,b);b=18;break}g=b+4|0;h=a+4|0;i=d+4|0;if((e|0)==(f|0)){c[a>>2]=e;zG(h,g,i);b=18;break}switch(yG(g,i)|0){case 0:{tG(j,0);o=0;Xa(361,h|0,j|0);d=o;o=0;if(d&1){a=Fb()|0;Zw(j);b=19;break a}else{Zw(j);c[a>>2]=0;b=18;break a}}case 1:{c[a>>2]=c[b>>2];AG(h,g,i);b=18;break a}case -1:{c[a>>2]=c[d>>2];AG(h,i,g);b=18;break a}default:{b=18;break a}}}while(0);if((b|0)==18){l=k;return}else if((b|0)==19)Qb(a|0)}function jG(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h;do if(!((a|0)==(b|0)|(a|0)==(d|0))){e=c[b>>2]|0;if(e|0?(f=c[d>>2]|0,f|0):0){c[a>>2]=(e|0)==(f|0)?1:-1;BG(a+4|0,b+4|0,d+4|0);b=12;break}c[a>>2]=0;tG(g,0);o=0;Xa(361,a+4|0,g|0);d=o;o=0;if(d&1){a=Fb()|0;Zw(g);b=13;break}else{Zw(g);b=12;break}}else{Ww(g);o=0;bb(113,g|0,b|0,d|0);d=o;o=0;if(!(d&1)?(o=0,Xa(268,a|0,g|0),d=o,o=0,!(d&1)):0){Sw(g);b=12;break}a=Fb()|0;Sw(g);b=13}while(0);if((b|0)==12){l=h;return}else if((b|0)==13)Qb(a|0)}function kG(a){a=a|0;return a+4|0}function lG(a,b){a=a|0;b=b|0;var c=0,d=0;d=l;l=l+16|0;c=d;EG(c,b,10);o=0;Xa(362,a|0,c|0);b=o;o=0;if(b&1){d=Fb()|0;mG(c);Qb(d|0)}else{mG(c);l=d;return}}function mG(a){a=a|0;a=c[a+8>>2]|0;if(a|0)dU(a);return}function nG(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;g=i+12|0;h=i;a:do if((oG(d)|0)!=-1){h=kG(d)|0;o=0;Xa(363,b|0,h|0);h=o;o=0;if(h&1){e=Fb()|0;d=19}else d=14}else{c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;f=Uh(49527)|0;if(f>>>0>4294967279)lU(h);if(f>>>0<11){a[h+11>>0]=f;e=h}else{j=f+16&-16;e=aU(j)|0;c[h>>2]=e;c[h+8>>2]=j|-2147483648;c[h+4>>2]=f}_i(e,49527,f)|0;a[g>>0]=0;ah(e+f|0,g);j=kG(d)|0;o=0;Xa(363,g|0,j|0);j=o;o=0;do if(j&1)e=Fb()|0;else{d=a[g+11>>0]|0;j=d<<24>>24<0;o=0;d=la(74,h|0,(j?c[g>>2]|0:g)|0,(j?c[g+4>>2]|0:d&255)|0)|0;j=o;o=0;if(j&1){e=Fb()|0;pU(g);break};c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];e=0;while(1){if((e|0)==3)break;c[d+(e<<2)>>2]=0;e=e+1|0}pU(g);pU(h);d=14;break a}while(0);pU(h);d=19}while(0);if((d|0)==14){l=i;return}else if((d|0)==19)Qb(e|0)}function oG(a){a=a|0;return c[a>>2]|0}function pG(a,b){a=a|0;b=b|0;Yw(a);o=0;Xa(364,a|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;Zw(a);Qb(b|0)}else return}function qG(a,b){a=a|0;b=b|0;var d=0;if(b|0){c[a>>2]=1;d=bU(4)|0;c[a+8>>2]=d;c[a+4>>2]=1;c[d>>2]=b}return}function rG(a,b){a=a|0;b=b|0;Yw(a);o=0;Xa(365,a|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;Zw(a);Qb(b|0)}else return}function sG(a,b){a=a|0;b=b|0;var d=0;if(b<<16>>16){c[a>>2]=1;d=bU(4)|0;c[a+8>>2]=d;c[a+4>>2]=1;c[d>>2]=b&65535}return}function tG(a,b){a=a|0;b=b|0;Yw(a);o=0;Xa(366,a|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;Zw(a);Qb(b|0)}else return}function uG(a,b){a=a|0;b=b|0;if((b|0)<0){b=Ab(4)|0;c[b>>2]=49529;Mb(b|0,3304,0)}else{vG(a,b);return}}function vG(a,b){a=a|0;b=b|0;var d=0;if(b|0){c[a>>2]=1;d=bU(4)|0;c[a+8>>2]=d;c[a+4>>2]=1;c[d>>2]=b}return}function wG(a){a=a|0;return gG(a)|0}function xG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;if((c[a>>2]|0)>>>0>>0){f=a+8|0;e=c[f>>2]|0;c[a>>2]=b;d=bU(b>>>0>1073741823?-1:b<<2)|0;c[f>>2]=d;a=c[a+4>>2]|0;b=0;while(1){if((b|0)==(a|0))break;c[d+(b<<2)>>2]=c[e+(b<<2)>>2];b=b+1|0}if(e|0)dU(e)}return}function yG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=c[a+4>>2]|0;d=c[b+4>>2]|0;a:do if(f>>>0>=d>>>0)if(f>>>0>d>>>0)a=1;else{g=a+8|0;e=c[b+8>>2]|0;a=f;do{if(!a){a=0;break a}a=a+-1|0;d=c[(c[g>>2]|0)+(a<<2)>>2]|0;b=c[e+(a<<2)>>2]|0}while((d|0)==(b|0));a=d>>>0>b>>>0?1:-1}else a=-1;while(0);return a|0}function zG(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,m=0,n=0;j=l;l=l+16|0;e=j;do if(!((a|0)==(b|0)|(a|0)==(d|0))){e=c[b+4>>2]|0;if(!e){ZF(a,d);break}f=c[d+4>>2]|0;if(!f){ZF(a,b);break}g=e>>>0>>0;i=g?d:b;d=g?b:d;g=i+4|0;e=(c[g>>2]|0)+1|0;h=a+4|0;c[h>>2]=e;$F(a,e);e=c[d+4>>2]|0;i=i+8|0;a=a+8|0;d=d+8|0;b=0;f=0;while(1){if((b|0)==(e|0))break;m=c[(c[i>>2]|0)+(b<<2)>>2]|0;n=(c[(c[d>>2]|0)+(b<<2)>>2]|0)+m|0;k=n+1|0;c[(c[a>>2]|0)+(b<<2)>>2]=f?k:n;b=b+1|0;f=n>>>0>>0|f&(k|0)==0}b=c[g>>2]|0;while(1){if(!(f&e>>>0>>0))break;f=(c[(c[i>>2]|0)+(e<<2)>>2]|0)+1|0;c[(c[a>>2]|0)+(e<<2)>>2]=f;e=e+1|0;f=(f|0)==0}while(1){if(e>>>0>=b>>>0)break;c[(c[a>>2]|0)+(e<<2)>>2]=c[(c[i>>2]|0)+(e<<2)>>2];e=e+1|0}if(f){c[(c[a>>2]|0)+(e<<2)>>2]=1;break}else{c[h>>2]=(c[h>>2]|0)+-1;break}}else{Xw(e);o=0;bb(147,e|0,b|0,d|0);n=o;o=0;if(!(n&1)?(o=0,Xa(361,a|0,e|0),n=o,o=0,!(n&1)):0){Zw(e);break}n=Fb()|0;Zw(e);Qb(n|0)}while(0);l=j;return}function AG(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,m=0,n=0,p=0;m=l;l=l+16|0;e=m;do if((a|0)==(b|0)|(a|0)==(d|0)){Xw(e);o=0;bb(148,e|0,b|0,d|0);k=o;o=0;if(!(k&1)?(o=0,Xa(361,a|0,e|0),a=o,o=0,!(a&1)):0){Zw(e);break}m=Fb()|0;Zw(e);Qb(m|0)}else{f=d+4|0;e=c[f>>2]|0;if(!e){ZF(a,b);break}h=b+4|0;g=c[h>>2]|0;if(g>>>0>>0){m=Ab(4)|0;c[m>>2]=49608;Mb(m|0,3304,0)}k=a+4|0;c[k>>2]=g;$F(a,g);e=c[f>>2]|0;j=a+8|0;i=c[b+8>>2]|0;b=c[d+8>>2]|0;g=0;f=0;while(1){if((g|0)==(e|0))break;d=c[i+(g<<2)>>2]|0;n=d-(c[b+(g<<2)>>2]|0)|0;p=n+-1|0;c[(c[j>>2]|0)+(g<<2)>>2]=f?p:n;g=g+1|0;f=f?p>>>0>=d>>>0:n>>>0>d>>>0}g=c[h>>2]|0;while(1){if(!(f&e>>>0>>0))break;f=c[i+(e<<2)>>2]|0;c[(c[j>>2]|0)+(e<<2)>>2]=f+-1;e=e+1|0;f=(f|0)==0}if(f){c[k>>2]=0;p=Ab(4)|0;c[p>>2]=49608;Mb(p|0,3304,0)}while(1){if(e>>>0>=g>>>0)break;c[(c[j>>2]|0)+(e<<2)>>2]=c[i+(e<<2)>>2];e=e+1|0}cG(a)}while(0);l=m;return}function BG(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,m=0,n=0,p=0,q=0,r=0,s=0;n=l;l=l+16|0;e=n;do if((a|0)==(b|0)|(a|0)==(d|0)){Xw(e);o=0;bb(149,e|0,b|0,d|0);d=o;o=0;if(!(d&1)?(o=0,Xa(361,a|0,e|0),d=o,o=0,!(d&1)):0){Zw(e);break}n=Fb()|0;Zw(e);Qb(n|0)}else{j=b+4|0;e=c[j>>2]|0;k=a+4|0;if(e|0?(m=d+4|0,f=c[m>>2]|0,f|0):0){f=f+e|0;c[k>>2]=f;$F(a,f);f=c[k>>2]|0;i=a+8|0;e=0;while(1){if((e|0)==(f|0))break;c[(c[i>>2]|0)+(e<<2)>>2]=0;e=e+1|0}h=b+8|0;g=0;while(1){if(g>>>0<(c[j>>2]|0)>>>0)b=0;else break;while(1){if((b|0)==32)break;a:do if(c[(c[h>>2]|0)+(g<<2)>>2]&1<>>0>(c[m>>2]|0)>>>0)break;r=c[(c[i>>2]|0)+(e<<2)>>2]|0;r=(CG(d,a,b)|0)+r|0;q=(c[i>>2]|0)+(e<<2)|0;s=r+1|0;p=r>>>0<(c[q>>2]|0)>>>0|f&(s|0)==0;c[q>>2]=f?s:r;f=p;e=e+1|0;a=a+1|0}while(1){if(!f)break a;s=(c[i>>2]|0)+(e<<2)|0;f=(c[s>>2]|0)+1|0;c[s>>2]=f;f=(f|0)==0;e=e+1|0}}while(0);b=b+1|0}g=g+1|0}e=(c[k>>2]|0)+-1|0;if(c[(c[i>>2]|0)+(e<<2)>>2]|0)break;c[k>>2]=e;break}c[k>>2]=0}while(0);l=n;return}function CG(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=a+8|0;if((b|0)==0|(d|0)==0)f=0;else f=(c[(c[e>>2]|0)+(b+-1<<2)>>2]|0)>>>(32-d|0);if((c[a+4>>2]|0)==(b|0))a=0;else a=c[(c[e>>2]|0)+(b<<2)>>2]<>2]=49671;Mb(q|0,3304,0)}do if((a|0)==(b|0)|(d|0)==(b|0)){fx(e,b);o=0;bb(150,a|0,e|0,d|0);a=o;o=0;if(a&1){q=Fb()|0;Zw(e);Qb(q|0)}else{Zw(e);break}}else{m=b+4|0;e=c[m>>2]|0;p=d+4|0;if(!e){c[p>>2]=0;break}f=a+4|0;n=c[f>>2]|0;if(n>>>0>>0){c[p>>2]=0;break}xG(a,n+1|0);k=(c[f>>2]|0)+1|0;c[f>>2]=k;i=a+8|0;c[(c[i>>2]|0)+(n<<2)>>2]=0;k=bU(k>>>0>1073741823?-1:k<<2)|0;e=n-(c[m>>2]|0)+1|0;c[p>>2]=e;$F(d,e);e=c[p>>2]|0;j=d+8|0;d=c[j>>2]|0;f=0;while(1){if((f|0)==(e|0))break;c[d+(f<<2)>>2]=0;f=f+1|0}a:while(1){if(!e)break;e=e+-1|0;c[(c[j>>2]|0)+(e<<2)>>2]=0;f=32;b:while(1){if(!f)continue a;f=f+-1|0;g=0;h=0;d=e;while(1){if(g>>>0>(c[m>>2]|0)>>>0)break;s=c[(c[i>>2]|0)+(d<<2)>>2]|0;s=s-(CG(b,g,f)|0)|0;r=c[(c[i>>2]|0)+(d<<2)>>2]|0;t=s+-1|0;c[k+(d<<2)>>2]=h?t:s;g=g+1|0;h=h?t>>>0>=r>>>0:s>>>0>r>>>0;d=d+1|0}while(1){if(!(d>>>0>>0&h))break;h=c[(c[i>>2]|0)+(d<<2)>>2]|0;c[k+(d<<2)>>2]=h+-1;h=(h|0)==0;d=d+1|0}if(h)continue;t=(c[j>>2]|0)+(e<<2)|0;c[t>>2]=c[t>>2]|1<>>0<=e>>>0)continue b;t=d+-1|0;c[(c[i>>2]|0)+(t<<2)>>2]=c[k+(t<<2)>>2];d=t}}}e=(c[p>>2]|0)+-1|0;if(!(c[(c[j>>2]|0)+(e<<2)>>2]|0))c[p>>2]=e;cG(a);dU(k)}while(0);l=q;return}function EG(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;i=l;l=l+48|0;k=i+24|0;j=i+12|0;h=i;FG(a);do if((e&65535)<2){d=Ab(4)|0;c[d>>2]=49764;o=0;bb(68,d|0,3304,0);o=0;d=Fb()|0}else{b[a+12>>1]=e;f=(hG(d)|0)<<5;f=HG(f,(GG(e&65535)|0)+-1|0)|0;g=a+4|0;c[g>>2]=f;o=0;Xa(367,a|0,f|0);f=o;o=0;if(!(f&1)?(o=0,Xa(368,k|0,d|0),f=o,o=0,!(f&1)):0){o=0;Xa(369,j|0,e|0);f=o;o=0;if(f&1)d=Fb()|0;else{e=a+8|0;f=0;while(1){o=0;d=fa(163,k|0)|0;m=o;o=0;if(m&1){e=15;break}if(d){e=17;break}o=0;Xa(368,h|0,k|0);m=o;o=0;if(m&1){e=15;break}o=0;bb(150,h|0,j|0,k|0);m=o;o=0;if(m&1){e=16;break}o=0;d=fa(164,h|0)|0;m=o;o=0;if(m&1){e=16;break}b[(c[e>>2]|0)+(f<<1)>>1]=d;Zw(h);f=f+1|0}if((e|0)==15)d=Fb()|0;else if((e|0)==16){d=Fb()|0;Zw(h)}else if((e|0)==17){c[g>>2]=f;Zw(j);Zw(k);l=i;return}Zw(j)}Zw(k);break}d=Fb()|0}while(0);mG(a);Qb(d|0)}function FG(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;return}function GG(a){a=a|0;var b=0;b=0;while(1){if(!a)break;b=b+1|0;a=a>>>1}return b|0}function HG(a,b){a=a|0;b=b|0;return ((a+-1+b|0)>>>0)/(b>>>0)|0|0}function IG(a,b){a=a|0;b=b|0;var d=0,e=0;if((c[a>>2]|0)>>>0>>0){d=a+8|0;e=c[d>>2]|0;if(e|0)dU(e);c[a>>2]=b;c[d>>2]=bU(b>>>0>2147483647?-1:b<<1)|0}return}function JG(d,f){d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+16|0;m=n+12|0;k=n;if((e[f+12>>1]|0)>36){n=Ab(4)|0;c[n>>2]=49831;Mb(n|0,3304,0)}i=c[f+4>>2]|0;if(!i){c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;f=Uh(50063)|0;if(f>>>0>4294967279)lU(d);if(f>>>0<11)a[d+11>>0]=f;else{j=f+16&-16;k=aU(j)|0;c[d>>2]=k;c[d+8>>2]=j|-2147483648;c[d+4>>2]=f;d=k}_i(d,50063,f)|0;a[m>>0]=0;ah(d+f|0,m)}else{j=bU(i+1|0)|0;a[j+i>>0]=0;h=i+-1|0;g=f+8|0;f=0;while(1){if((f|0)==(i|0))break;o=b[(c[g>>2]|0)+(h-f<<1)>>1]|0;a[j+f>>0]=((o&65535)<10?48:55)+(o&65535);f=f+1|0}c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;g=Uh(j)|0;if(g>>>0>4294967279)lU(k);if(g>>>0<11){a[k+11>>0]=g;f=k}else{o=g+16&-16;f=aU(o)|0;c[k>>2]=f;c[k+8>>2]=o|-2147483648;c[k+4>>2]=g}_i(f,j,g)|0;a[m>>0]=0;ah(f+g|0,m);dU(j);c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];d=0;while(1){if((d|0)==3)break;c[k+(d<<2)>>2]=0;d=d+1|0}pU(k)}l=n;return}function KG(){LG();return}function LG(){MG(0);return}function MG(a){a=a|0;ec(NG()|0,50065);Zb(OG()|0,50070,1,1,0);PG();QG();RG();SG();TG();UG();VG();WG();XG();YG();ZG();cc(_G()|0,50075);cc($G()|0,50087);dc(aH()|0,4,50120);_b(bH()|0,50133);cH();dH(50149);eH(50186);fH(50225);gH(50256);hH(50296);iH(50325);jH();kH();dH(50363);eH(50395);fH(50428);gH(50461);hH(50495);iH(50528);lH();mH();nH();return}function NG(){return lI()|0}function OG(){return kI()|0}function PG(){ac(iI()|0,51475,1,-128,127);return}function QG(){ac(gI()|0,51463,1,-128,127);return}function RG(){ac(eI()|0,51449,1,0,255);return}function SG(){ac(cI()|0,51443,2,-32768,32767);return}function TG(){ac(aI()|0,51428,2,0,65535);return}function UG(){ac(_H()|0,51424,4,-2147483648,2147483647);return}function VG(){ac(YH()|0,51411,4,0,-1);return}function WG(){ac(WH()|0,51406,4,-2147483648,2147483647);return}function XG(){ac(UH()|0,51392,4,0,-1);return}function YG(){$b(SH()|0,51386,4);return}function ZG(){$b(QH()|0,51379,8);return}function _G(){return PH()|0}function $G(){return OH()|0}function aH(){return NH()|0}function bH(){return MH()|0}function cH(){bc(KH()|0,0,51072);return}function dH(a){a=a|0;bc(IH()|0,0,a|0);return}function eH(a){a=a|0;bc(GH()|0,1,a|0);return}function fH(a){a=a|0;bc(EH()|0,2,a|0);return}function gH(a){a=a|0;bc(CH()|0,3,a|0);return}function hH(a){a=a|0;bc(AH()|0,4,a|0);return}function iH(a){a=a|0;bc(yH()|0,5,a|0);return}function jH(){bc(wH()|0,4,50825);return}function kH(){bc(uH()|0,5,50755);return}function lH(){bc(sH()|0,6,50693);return}function mH(){bc(qH()|0,7,50630);return}function nH(){bc(oH()|0,7,50562);return}function oH(){return pH()|0}function pH(){return 1624}function qH(){return rH()|0}function rH(){return 1632}function sH(){return tH()|0}function tH(){return 1640}function uH(){return vH()|0}function vH(){return 1648}function wH(){return xH()|0}function xH(){return 1656}function yH(){return zH()|0}function zH(){return 1664}function AH(){return BH()|0}function BH(){return 1672}function CH(){return DH()|0}function DH(){return 1680}function EH(){return FH()|0}function FH(){return 1688}function GH(){return HH()|0}function HH(){return 1696} function yd(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function zd(){return l|0}function Ad(a){a=a|0;l=a}function Bd(a,b){a=a|0;b=b|0;l=a;m=b}function Cd(a,b){a=a|0;b=b|0;if(!o){o=a;p=b}}function Dd(a){a=a|0;z=a}function Ed(){return z|0}function Fd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Og(a,d,e);c[a>>2]=3424;o=0;Xa(83,a+16|0,b|0);e=o;o=0;if(e&1){e=Fb()|0;Hg(a);Qb(e|0)}else return}function Gd(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=3468;c[a+8>>2]=0;df(a,c[b+8>>2]|0);return}function Hd(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h;g=Id(c+16|0,0)|0;g=g+(O(Jd(c)|0,d)|0)|0;do if(Kd(e)|0){Ld(f,Jd(c)|0);o=0;ja(54,e|0,f|0)|0;d=o;o=0;if(d&1){h=Fb()|0;Nd(f);Qb(h|0)}else{Nd(f);d=0;break}}else d=0;while(0);while(1){if((d|0)>=(Jd(c)|0))break;f=a[g+d>>0]|0;a[(Od(e,d)|0)>>0]=f;d=d+1|0}Gd(b,e);l=h;return}function Id(a,b){a=a|0;b=b|0;return hf(c[a+8>>2]|0,b)|0}function Jd(a){a=a|0;return c[a+8>>2]|0}function Kd(a){a=a|0;return (c[a+8>>2]|0)==0|0}function Ld(a,b){a=a|0;b=b|0;var d=0,e=0;cf(a);c[a>>2]=3468;c[a+8>>2]=0;o=0;d=fa(107,20)|0;e=o;o=0;do if(!(e&1)){o=0;Xa(84,d|0,b|0);e=o;o=0;if(e&1){b=Fb()|0;cU(d);break}else{df(a,d);return}}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function Md(a,b){a=a|0;b=b|0;qf(a,b);return a|0}function Nd(a){a=a|0;var b=0,d=0;c[a>>2]=3468;b=a+8|0;d=c[b>>2]|0;if(d|0)af(d);c[b>>2]=0;ff(a);return}function Od(a,b){a=a|0;b=b|0;return hf(c[a+8>>2]|0,b)|0}function Pd(a,b){a=a|0;b=b|0;Gd(a,b+16|0);return}function Qd(){Ld(58608,0);return}function Rd(a,b){a=a|0;b=b|0;c[a>>2]=0;rf(a,c[b>>2]|0);return}function Sd(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Td(a){a=a|0;return c[a+8>>2]|0}function Ud(a){a=a|0;return (c[a+12>>2]|0)-(c[a+8>>2]|0)|0}function Vd(a){a=a|0;return c[a>>2]|0}function Wd(a,b){a=a|0;b=b|0;return (c[a>>2]|0)==(b|0)|0}function Xd(a){a=a|0;return c[a>>2]|0}function Yd(a,b){a=a|0;b=b|0;sf(a,b);return a|0}function Zd(a,b){a=a|0;b=b|0;a=Xe(a+12|0,b>>5)|0;c[a>>2]=c[a>>2]|1<<(b&31);return}function _d(a,b){a=a|0;b=b|0;c[a>>2]=0;sf(a,c[b>>2]|0);return}function $d(a){a=a|0;return c[a+12>>2]|0}function ae(a,b){a=a|0;b=b|0;c[a>>2]=0;tf(a,b);return}function be(a){a=a|0;return c[a>>2]|0}function ce(a,b,d){a=a|0;b=b|0;d=d|0;d=Xe(a+20|0,(O(c[a+16>>2]|0,d)|0)+(b>>5)|0)|0;c[d>>2]=c[d>>2]|1<<(b&31);return}function de(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function ee(a,b){a=a|0;b=b|0;c[a>>2]=0;uf(a,b);return}function fe(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;h=l;l=l+32|0;k=h+16|0;g=h+12|0;j=h+8|0;i=h;e=aU(12)|0;o=0;Na(310,e|0);f=o;o=0;if(f&1){k=Fb()|0;cU(e);e=k}else{ge(k,e);e=he(k)|0;f=c[(c[e>>2]|0)+12>>2]|0;o=0;Xa(85,j|0,b|0);b=o;o=0;if(b&1)e=Fb()|0;else{o=0;Xa(86,i|0,d|0);d=o;o=0;if(d&1)e=Fb()|0;else{o=0;db(f|0,g|0,e|0,j|0,i|0);d=o;o=0;do if(!(d&1)){o=0;bb(52,a|0,1,g|0);d=o;o=0;if(d&1){e=Fb()|0;le(g);break}else{le(g);me(i);ne(j);oe(k);l=h;return}}else e=Fb()|0;while(0);me(i)}ne(j)}oe(k)}Qb(e|0)}function ge(a,b){a=a|0;b=b|0;c[a>>2]=0;vf(a,b);return}function he(a){a=a|0;return c[a>>2]|0}function ie(a,b){a=a|0;b=b|0;c[a>>2]=0;wf(a,c[b>>2]|0);return}function je(a,b){a=a|0;b=b|0;c[a>>2]=c[b>>2];Ze(a+4|0,b+4|0);return}function ke(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;f=a+4|0;c[f>>2]=0;c[a+8>>2]=0;a:do if(b|0){o=0;Xa(87,a|0,b|0);e=o;o=0;b:do if(!(e&1)){e=c[f>>2]|0;while(1){o=0;Xa(88,e|0,d|0);e=o;o=0;if(e&1)break b;e=(c[f>>2]|0)+4|0;c[f>>2]=e;b=b+-1|0;if(!b)break a}}while(0);f=Fb()|0;He(a);Qb(f|0)}while(0);return}function le(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function me(a){a=a|0;bf(a+4|0);return}function ne(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function oe(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function pe(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;h=l;l=l+16|0;j=h+12|0;i=h+8|0;g=h;e=aU(20)|0;o=0;Na(311,e|0);f=o;o=0;if(f&1){j=Fb()|0;cU(e);e=j}else{qe(j,e+12|0);e=re(j)|0;f=c[(c[e>>2]|0)+12>>2]|0;o=0;Xa(85,i|0,b|0);b=o;o=0;if(b&1)e=Fb()|0;else{o=0;Xa(86,g|0,d|0);d=o;o=0;do if(!(d&1)){o=0;db(f|0,a|0,e|0,i|0,g|0);d=o;o=0;if(d&1){e=Fb()|0;me(g);break}else{me(g);ne(i);se(j);l=h;return}}else e=Fb()|0;while(0);ne(i)}se(j)}Qb(e|0)}function qe(a,b){a=a|0;b=b|0;c[a>>2]=0;Bf(a,b);return}function re(a){a=a|0;return c[a>>2]|0}function se(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function te(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;h=l;l=l+32|0;k=h+16|0;g=h+12|0;j=h+8|0;i=h;e=aU(28)|0;o=0;Na(312,e|0);f=o;o=0;if(f&1){k=Fb()|0;cU(e);e=k}else{ge(k,e);e=he(k)|0;f=c[(c[e>>2]|0)+12>>2]|0;o=0;Xa(85,j|0,b|0);b=o;o=0;if(b&1)e=Fb()|0;else{o=0;Xa(86,i|0,d|0);d=o;o=0;if(d&1)e=Fb()|0;else{o=0;db(f|0,g|0,e|0,j|0,i|0);d=o;o=0;do if(!(d&1)){o=0;bb(52,a|0,1,g|0);d=o;o=0;if(d&1){e=Fb()|0;le(g);break}else{le(g);me(i);ne(j);oe(k);l=h;return}}else e=Fb()|0;while(0);me(i)}ne(j)}oe(k)}Qb(e|0)}function ue(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;e=l;l=l+64|0;h=e+24|0;g=e+12|0;f=e+8|0;d=e;Fh(h);o=0;Xa(89,g|0,h|0);i=o;o=0;if(i&1)a=Fb()|0;else{o=0;Xa(85,f|0,b|0);i=o;o=0;if(i&1)a=Fb()|0;else{o=0;Xa(86,d|0,c|0);i=o;o=0;do if(!(i&1)){o=0;db(49,a|0,g|0,f|0,d|0);i=o;o=0;if(i&1){a=Fb()|0;me(d);break}else{me(d);ne(f);Ir(g);oh(h);l=e;return}}else a=Fb()|0;while(0);ne(f)}Ir(g)}oh(h);Qb(a|0)}function ve(){we(58620,0);return}function we(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=3468;c[a+8>>2]=0;df(a,b);return}function xe(){ye(58632,0);return}function ye(a,b){a=a|0;b=b|0;c[a>>2]=0;rf(a,b);return}function ze(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;f=l;l=l+32|0;d=f+12|0;e=f;Ld(d,O(b,a)|0);o=0;ja(54,58620,d|0)|0;g=o;o=0;if(g&1){a=Fb()|0;Nd(d)}else{Nd(d);c[14659]=Od(58620,0)|0;g=aU(28)|0;o=0;Xa(83,e|0,58620);h=o;o=0;do if(!(h&1)){o=0;db(73,g|0,e|0,a|0,b|0);h=o;o=0;if(h&1){a=Fb()|0;Nd(e);break}else{ye(d,g);Ae(58632,d)|0;Sd(d);Nd(e);l=f;return c[14659]|0}}else a=Fb()|0;while(0);cU(g)}Qb(a|0);return 0}function Ae(a,b){a=a|0;b=b|0;rf(a,c[b>>2]|0);return a|0}function Be(b,d){b=b|0;d=d|0;var e=0,f=0.0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+160|0;w=A+140|0;u=A+128|0;D=A+108|0;B=A+104|0;C=A+96|0;y=A+64|0;e=A+124|0;k=A+120|0;v=A+48|0;n=A+100|0;g=A+88|0;p=A+80|0;h=A+40|0;q=A+32|0;i=A+24|0;r=A+16|0;j=A+8|0;s=A;c[D>>2]=0;t=D+4|0;c[t>>2]=0;c[D+8>>2]=0;o=0;Xa(90,B|0,0);m=o;o=0;do if(!(m&1)){Ce(C,0);o=0;Xa(86,y|0,3632);m=o;o=0;a:do if(m&1){e=Ib(24,632,8,3064)|0;b=z;x=53}else{o=0;m=fa(107,44)|0;E=o;o=0;b:do if(E&1)x=15;else{o=0;Xa(91,e|0,58632);E=o;o=0;do if(E&1){e=Ib(24,632,8,3064)|0;b=z}else{o=0;Xa(92,m|0,e|0);E=o;o=0;if(E&1){E=Ib(24,632,8,3064)|0;b=z;Sd(e);e=E;break}De(B,m)|0;Sd(e);o=0;e=fa(107,12)|0;E=o;o=0;if(E&1){x=15;break b}Ee(k,B);o=0;Xa(93,e|0,k|0);E=o;o=0;if(E&1){E=Ib(24,632,8,3064)|0;b=z;Ge(k);cU(e);e=E;break b}Fe(C,e)|0;Ge(k);c:do switch(b|0){case 0:{o=0;Xa(85,n|0,C|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z}else{o=0;Xa(86,g|0,y|0);E=o;o=0;do if(!(E&1)){o=0;bb(53,v|0,n|0,g|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z;me(g);break}else{a[w>>0]=a[u>>0]|0;Cf(D,v,w);He(v);me(g);ne(n);break c}}else{e=Ib(24,632,8,3064)|0;b=z}while(0);ne(n)}break b}case 1:{o=0;Xa(85,p|0,C|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z}else{o=0;Xa(86,h|0,y|0);E=o;o=0;do if(!(E&1)){o=0;bb(54,v|0,p|0,h|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z;me(h);break}else{a[w>>0]=a[u>>0]|0;Cf(D,v,w);He(v);me(h);ne(p);break c}}else{e=Ib(24,632,8,3064)|0;b=z}while(0);ne(p)}break b}case 2:{o=0;Xa(85,q|0,C|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z}else{o=0;Xa(86,i|0,y|0);E=o;o=0;do if(!(E&1)){o=0;bb(55,v|0,q|0,i|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z;me(i);break}else{a[w>>0]=a[u>>0]|0;Cf(D,v,w);He(v);me(i);ne(q);break c}}else{e=Ib(24,632,8,3064)|0;b=z}while(0);ne(q)}break b}default:{o=0;Xa(85,r|0,C|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z}else{o=0;Xa(86,j|0,y|0);E=o;o=0;do if(!(E&1)){o=0;bb(56,v|0,r|0,j|0);E=o;o=0;if(E&1){e=Ib(24,632,8,3064)|0;b=z;me(j);break}else{a[w>>0]=a[u>>0]|0;Cf(D,v,w);He(v);me(j);ne(r);break c}}else{e=Ib(24,632,8,3064)|0;b=z}while(0);ne(r)}break b}}while(0);me(y);h=w+11|0;i=w+4|0;j=y+4|0;k=v+4|0;m=y+8|0;n=v+8|0;p=y+12|0;q=v+12|0;g=0;d:while(1){e=c[D>>2]|0;if(g>>>0>=(c[t>>2]|0)-e>>2>>>0){e=0;x=83;break a}E=Ie(e+(g<<2)|0)|0;o=0;Xa(94,s|0,E|0);E=o;o=0;if(E&1){x=72;break}e=Je(s)|0;o=0;e=fa(108,e|0)|0;E=o;o=0;if(E&1){x=73;break}o=0;Xa(95,w|0,e|0);E=o;o=0;if(E&1){x=73;break}Ke(s);e=Ie((c[D>>2]|0)+(g<<2)|0)|0;o=0;e=fa(109,e|0)|0;E=o;o=0;if(E&1){x=74;break}o=0;Xa(96,u|0,e|0);E=o;o=0;if(E&1){x=74;break};c[y>>2]=0;c[y+4>>2]=0;c[y+8>>2]=0;c[y+12>>2]=0;c[v>>2]=0;c[v+4>>2]=0;c[v+8>>2]=0;c[v+12>>2]=0;b=0;while(1){if((b|0)>=(Ne(Me(u)|0)|0))break;o=0;e=ja(55,u|0,b|0)|0;E=o;o=0;if(E&1){x=81;break d}E=Pe(e)|0;o=0;f=+X(c[(c[E>>2]|0)+8>>2]|0,E|0);E=o;o=0;if(E&1){x=81;break d}c[y+(b<<2)>>2]=~~f;o=0;e=ja(55,u|0,b|0)|0;E=o;o=0;if(E&1){x=81;break d}E=Pe(e)|0;o=0;f=+X(c[(c[E>>2]|0)+12>>2]|0,E|0);E=o;o=0;if(E&1){x=81;break d}c[v+(b<<2)>>2]=~~f;b=b+1|0}E=a[h>>0]|0;x=E<<24>>24<0;o=0;ta(d|0,(x?c[w>>2]|0:w)|0,(x?c[i>>2]|0:E&255)|0,g|0,(c[t>>2]|0)-(c[D>>2]|0)>>2|0,+(+(c[y>>2]|0)),+(+(c[v>>2]|0)),+(+(c[j>>2]|0)),+(+(c[k>>2]|0)),+(+(c[m>>2]|0)),+(+(c[n>>2]|0)),+(+(c[p>>2]|0)),+(+(c[q>>2]|0)))|0;E=o;o=0;if(E&1){x=81;break}Qe(u);pU(w);g=g+1|0}if((x|0)==72){e=Fb()|0;x=84;break a}else if((x|0)==73){e=Fb()|0;Ke(s);x=84;break a}else if((x|0)==74)e=Fb()|0;else if((x|0)==81){e=Fb()|0;Qe(u)}pU(w);x=84;break a}while(0);cU(m)}while(0);if((x|0)==15){e=Ib(24,632,8,3064)|0;b=z}me(y);x=53}while(0);e:do if((x|0)==53){do if((b|0)==(mc(24)|0)){Bb(e|0)|0;o=0;La(44);E=o;o=0;if(!(E&1)){e=-2;x=83;break e}}else{if((b|0)==(mc(632)|0)){Bb(e|0)|0;o=0;La(44);E=o;o=0;if(E&1)break;else{e=-3;x=83;break e}}if((b|0)==(mc(8)|0)){Bb(e|0)|0;o=0;La(44);E=o;o=0;if(E&1)break;else{e=-4;x=83;break e}}if((b|0)!=(mc(3064)|0)){x=84;break e}Bb(e|0)|0;o=0;La(44);E=o;o=0;if(!(E&1)){e=-5;x=83;break e}}while(0);e=Fb()|0;x=84}while(0);if((x|0)==83){ne(C);Ge(B);He(D);l=A;return e|0}else if((x|0)==84){ne(C);Ge(B);break}}else e=Fb()|0;while(0);He(D);Qb(e|0);return 0}function Ce(a,b){a=a|0;b=b|0;c[a>>2]=0;wf(a,b);return}function De(a,b){a=a|0;b=b|0;uf(a,b);return a|0}function Ee(a,b){a=a|0;b=b|0;c[a>>2]=0;uf(a,c[b>>2]|0);return}function Fe(a,b){a=a|0;b=b|0;wf(a,b);return a|0}function Ge(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function He(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;le(e)}cU(c[a>>2]|0)}return}function Ie(a){a=a|0;return c[a>>2]|0}function Je(a){a=a|0;return c[a>>2]|0}function Ke(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Le(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=3516;c[a+8>>2]=0;Ef(a,c[b+8>>2]|0);return}function Me(a){a=a|0;return c[a+8>>2]|0}function Ne(a){a=a|0;return (c[a+12>>2]|0)-(c[a+8>>2]|0)>>2|0}function Oe(a,b){a=a|0;b=b|0;return Gf(c[a+8>>2]|0,b)|0}function Pe(a){a=a|0;return c[a>>2]|0}function Qe(a){a=a|0;var b=0,d=0;c[a>>2]=3516;b=a+8|0;d=c[b>>2]|0;if(d|0)af(d);c[b>>2]=0;ff(a);return}function Re(a){a=a|0;return Be(0,a)|0}function Se(a){a=a|0;return Be(1,a)|0}function Te(a){a=a|0;return Be(2,a)|0}function Ue(a){a=a|0;return Be(3,a)|0}function Ve(a){a=a|0;c[a>>2]=3424;Nd(a+16|0);Hg(a);return}function We(a){a=a|0;Ve(a);cU(a);return}function Xe(a,b){a=a|0;b=b|0;return Ye(c[a+8>>2]|0,b)|0}function Ye(a,b){a=a|0;b=b|0;return (c[a+8>>2]|0)+(b<<2)|0}function Ze(a,b){a=a|0;b=b|0;c[a>>2]=0;_e(a,c[b>>2]|0);return}function _e(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function $e(a){a=a|0;var b=0;b=a+4|0;c[b>>2]=(c[b>>2]|0)+1;return a|0}function af(a){a=a|0;var b=0,d=0;b=a+4|0;d=(c[b>>2]|0)+-1|0;c[b>>2]=d;if(!d){c[b>>2]=-559026175;fd[c[(c[a>>2]|0)+4>>2]&511](a)}return}function bf(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function cf(a){a=a|0;c[a>>2]=3484;c[a+4>>2]=0;return}function df(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;a=a+8|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function ef(a){a=a|0;Nd(a);cU(a);return}function ff(a){a=a|0;return}function gf(a){a=a|0;ff(a);cU(a);return}function hf(a,b){a=a|0;b=b|0;return (c[a+8>>2]|0)+b|0}function jf(b,d){b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e;cf(b);c[b>>2]=3500;a[f>>0]=0;o=0;bb(57,b+8|0,d|0,f|0);d=o;o=0;if(d&1){f=Fb()|0;ff(b);Qb(f|0)}else{l=e;return}}function kf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;c[b>>2]=0;f=b+4|0;c[f>>2]=0;c[b+8>>2]=0;if(d|0){o=0;Xa(97,b|0,d|0);g=o;o=0;if(g&1){g=Fb()|0;pf(b);Qb(g|0)}b=c[f>>2]|0;do{a[b>>0]=a[e>>0]|0;b=(c[f>>2]|0)+1|0;c[f>>2]=b;d=d+-1|0}while((d|0)!=0)}return}function lf(a){a=a|0;c[a>>2]=3500;pf(a+8|0);ff(a);return}function mf(a){a=a|0;lf(a);cU(a);return}function nf(a,b){a=a|0;b=b|0;var d=0;if((of(a)|0)>>>0>>0)wS(a);else{d=aU(b)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+b;return}}function of(a){a=a|0;return 2147483647}function pf(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-1|0;c[a>>2]=e;b=e}cU(d)}return}function qf(a,b){a=a|0;b=b|0;df(a,c[b+8>>2]|0);return}function rf(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function sf(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function tf(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function uf(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function vf(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function wf(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function xf(a,b){a=a|0;b=b|0;var d=0;if((yf(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function yf(a){a=a|0;return 1073741823}function zf(a,b){a=a|0;b=b|0;c[a>>2]=0;Af(a,c[b>>2]|0);return}function Af(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Bf(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Cf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;Df(a);c[a>>2]=c[b>>2];d=b+4|0;c[a+4>>2]=c[d>>2];e=b+8|0;c[a+8>>2]=c[e>>2];c[e>>2]=0;c[d>>2]=0;c[b>>2]=0;return}function Df(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;le(e)}cU(c[a>>2]|0);c[a+8>>2]=0;c[d>>2]=0;c[a>>2]=0}return}function Ef(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;a=a+8|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Ff(a){a=a|0;Qe(a);cU(a);return}function Gf(a,b){a=a|0;b=b|0;return (c[a+8>>2]|0)+(b<<2)|0}function Hf(){Qd();ve();xe();return}function If(a){a=a|0;c[a>>2]=3532;Sd(a+8|0);ff(a);return}function Jf(a){a=a|0;If(a);cU(a);return}function Kf(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=3532;o=0;Xa(91,a+8|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else return}function Lf(a,b){a=a|0;b=b|0;Rd(a,b+8|0);return}function Mf(a){a=a|0;return c[a>>2]|0}function Nf(a){a=a|0;c[a>>2]=3560;Ge(a+8|0);ff(a);return}function Of(a){a=a|0;Nf(a);cU(a);return}function Pf(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=3560;o=0;Xa(99,a+8|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else return}function Qf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;g=l;l=l+16|0;f=g;b=Rf(b+8|0)|0;h=c[(c[b>>2]|0)+8>>2]|0;_d(f,e);o=0;db(h|0,a|0,b|0,d|0,f|0);e=o;o=0;if(e&1){h=Fb()|0;Sf(f);Qb(h|0)}else{Sf(f);l=g;return}}function Rf(a){a=a|0;return c[a>>2]|0}function Sf(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Tf(a,b){a=a|0;b=b|0;b=Rf(b+8|0)|0;kd[c[(c[b>>2]|0)+12>>2]&511](a,b);return}function Uf(a){a=a|0;var b=0,c=0;b=l;l=l+16|0;c=b;Vf(c,a);a=Jd(Mf(c)|0)|0;Sd(c);l=b;return a|0}function Vf(a,b){a=a|0;b=b|0;Lf(a,Rf(b+8|0)|0);return}function Wf(a){a=a|0;var b=0,c=0;b=l;l=l+16|0;c=b;Vf(c,a);a=$d(Mf(c)|0)|0;Sd(c);l=b;return a|0}function Xf(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,m=0,n=0,p=0,q=0;j=l;l=l+16|0;k=j+8|0;m=j+4|0;n=j;p=aU(12)|0;h=Rf(b+8|0)|0;i=c[(c[h>>2]|0)+16>>2]|0;o=0;Xa(100,n|0,b|0);b=o;o=0;do if(!(b&1)){b=Mf(n)|0;o=0;jb(c[(c[b>>2]|0)+20>>2]|0,m|0,b|0,d|0,e|0,f|0,g|0);g=o;o=0;if(g&1){a=Fb()|0;Sd(n);q=12;break}o=0;bb(i|0,k|0,h|0,m|0);g=o;o=0;if(g&1){a=Fb()|0;b=1}else{o=0;Xa(93,p|0,k|0);g=o;o=0;if(!(g&1)){o=0;Xa(101,a|0,p|0);g=o;o=0;if(g&1)b=0;else{Ge(k);Sd(m);Sd(n);l=j;return}}else b=1;a=Fb()|0;Ge(k)}Sd(m);Sd(n);if(b)q=12}else{a=Fb()|0;q=12}while(0);if((q|0)==12)cU(p);Qb(a|0)}function Yf(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;b=d;Vf(b,a);a=Mf(b)|0;o=0;a=fa(c[(c[a>>2]|0)+24>>2]|0,a|0)|0;e=o;o=0;if(e&1){e=Fb()|0;Sd(b);Qb(e|0)}else{Sd(b);l=d;return a|0}return 0}function Zf(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;f=l;l=l+16|0;g=f+8|0;h=f+4|0;i=f;j=aU(12)|0;e=Rf(b+8|0)|0;d=c[(c[e>>2]|0)+16>>2]|0;o=0;Xa(100,i|0,b|0);b=o;o=0;do if(!(b&1)){b=Mf(i)|0;o=0;Xa(c[(c[b>>2]|0)+32>>2]|0,h|0,b|0);b=o;o=0;if(b&1){a=Fb()|0;Sd(i);k=12;break}o=0;bb(d|0,g|0,e|0,h|0);e=o;o=0;if(e&1){a=Fb()|0;b=1}else{o=0;Xa(93,j|0,g|0);e=o;o=0;if(!(e&1)){o=0;Xa(101,a|0,j|0);e=o;o=0;if(e&1)b=0;else{Ge(g);Sd(h);Sd(i);l=f;return}}else b=1;a=Fb()|0;Ge(g)}Sd(h);Sd(i);if(b)k=12}else{a=Fb()|0;k=12}while(0);if((k|0)==12)cU(j);Qb(a|0)}function _f(a){a=a|0;bg(a);return}function $f(a){a=a|0;_f(a);cU(a);return}function ag(a){a=a|0;a=c[a+4>>2]|0;return ((a|0)==0?61821:a)|0}function bg(a){a=a|0;c[a>>2]=3596;if(c[a+4>>2]|0?(o=0,Na(313,a|0),a=o,o=0,a&1):0){a=Fb()|0;Cb(a|0)}return}function cg(a){a=a|0;bg(a);cU(a);return}function dg(a){a=a|0;eg(a);c[a>>2]=3576;return}function eg(a){a=a|0;fg(a);c[a>>2]=3616;return}function fg(a){a=a|0;c[a>>2]=3596;c[a+4>>2]=0;return}function gg(a){a=a|0;bg(a);cU(a);return}function hg(a,b){a=a|0;b=b|0;ig(a,b);c[a>>2]=3616;return}function ig(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=3596;o=0;b=fa(110,b|0)|0;d=o;o=0;if(d&1){d=Fb()|0;Cb(d|0)}else{c[a+4>>2]=b;return}}function jg(a,b){a=a|0;b=b|0;_e(a,c[b>>2]|0);return a|0}function kg(a,b){a=a|0;b=b|0;c[a>>2]=0;_e(a,b);return}function lg(a){a=a|0;kg(a+4|0,0);c[a>>2]=0;return}function mg(a){a=a|0;return c[a>>2]|0}function ng(a,b){a=a|0;b=b|0;do switch(mg(b)|0){case 1:{b=2;break}case 2:{b=4;break}case 3:{b=8;break}case 4:{b=16;break}case 5:{b=32;break}case 6:{b=64;break}case 7:{b=128;break}case 8:{b=256;break}case 9:{b=512;break}case 10:{b=1024;break}case 11:{b=2048;break}case 12:{b=4096;break}case 13:{b=8192;break}case 14:{b=16384;break}case 15:{b=32768;break}case 16:{b=65536;break}case 17:{b=131072;break}default:{b=Ab(8)|0;o=0;Xa(102,b|0,42206);a=o;o=0;if(a&1){a=Fb()|0;Jb(b|0);Qb(a|0)}else Mb(b|0,632,117)}}while(0);return (c[a>>2]&b|0)!=0|0}function og(a){a=a|0;return (c[a>>2]|0)<0|0}function pg(a,b){a=a|0;b=b|0;Ze(a,b+4|0);return}function qg(a){a=a|0;dU(c[a+4>>2]|0);return}function rg(a){a=a|0;var b=0;if((a|0)!=0?(b=(LJ(a)|0)+1|0,(b|0)!=0):0){b=bU((b|0)>-1?b:-1)|0;ZJ(b,a)|0;a=b}else a=0;return a|0}function sg(a){a=a|0;bg(a);return}function tg(a){a=a|0;sg(a);cU(a);return}function ug(a){a=a|0;eg(a);c[a>>2]=3648;return}function vg(a,b){a=a|0;b=b|0;hg(a,b);c[a>>2]=3648;return}function wg(){if((a[57936]|0)==0?cW(57936)|0:0)ug(58640);return 58640}function xg(a){a=a|0;c[a>>2]=3668;Sd(a+16|0);Hg(a);return}function yg(a){a=a|0;xg(a);cU(a);return}function zg(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;i=l;l=l+32|0;g=i+12|0;h=i;j=Mf(d+16|0)|0;k=c[(c[j>>2]|0)+8>>2]|0;Gd(h,f);o=0;db(k|0,g|0,j|0,e|0,h|0);e=o;o=0;do if(e&1)d=Fb()|0;else{o=0;ja(54,f|0,g|0)|0;k=o;o=0;if(k&1){d=Fb()|0;Nd(g);break}Nd(g);Nd(h);e=Jd(d)|0;d=0;while(1){if((d|0)>=(e|0))break;k=~a[(Od(f,d)|0)>>0];a[(Od(f,d)|0)>>0]=k;d=d+1|0}Gd(b,f);l=i;return}while(0);Nd(h);Qb(d|0)}function Ag(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+16|0;i=h;g=Mf(d+16|0)|0;kd[c[(c[g>>2]|0)+12>>2]&511](i,g);g=Jd(d)|0;g=O($d(d)|0,g)|0;o=0;Xa(103,b|0,g|0);f=o;o=0;do if(!(f&1)){f=0;while(1){if((f|0)>=(g|0)){e=8;break}o=0;d=ja(56,i|0,f|0)|0;e=o;o=0;if(e&1){e=7;break}d=a[d>>0]|0;o=0;e=ja(56,b|0,f|0)|0;j=o;o=0;if(j&1){e=7;break}a[e>>0]=~d;f=f+1|0}if((e|0)==7){d=Fb()|0;Nd(b);break}else if((e|0)==8){Nd(i);l=h;return}}else d=Fb()|0;while(0);Nd(i);Qb(d|0)}function Bg(a){a=a|0;a=Mf(a+16|0)|0;return Qc[c[(c[a>>2]|0)+16>>2]&255](a)|0}function Cg(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;h=l;l=l+16|0;i=h;j=aU(20)|0;b=Mf(b+16|0)|0;o=0;jb(c[(c[b>>2]|0)+20>>2]|0,i|0,b|0,d|0,e|0,f|0,g|0);g=o;o=0;if(!(g&1)){o=0;Xa(104,j|0,i|0);g=o;o=0;if(!(g&1)){o=0;Xa(105,a|0,j|0);g=o;o=0;if(g&1)b=0;else{Sd(i);l=h;return}}else b=1;a=Fb()|0;Sd(i);if(b)k=7}else{a=Fb()|0;k=7}if((k|0)==7)cU(j);Qb(a|0)}function Dg(a){a=a|0;a=Mf(a+16|0)|0;return Qc[c[(c[a>>2]|0)+24>>2]&255](a)|0}function Eg(a,b){a=a|0;b=b|0;Rd(a,b+16|0);return}function Fg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;e=d;f=aU(20)|0;b=Mf(b+16|0)|0;o=0;Xa(c[(c[b>>2]|0)+32>>2]|0,e|0,b|0);b=o;o=0;if(!(b&1)){o=0;Xa(104,f|0,e|0);b=o;o=0;if(!(b&1)){o=0;Xa(105,a|0,f|0);b=o;o=0;if(b&1)b=0;else{Sd(e);l=d;return}}else b=1;a=Fb()|0;Sd(e);if(b)g=7}else{a=Fb()|0;g=7}if((g|0)==7)cU(f);Qb(a|0)}function Gg(a,b){a=a|0;b=b|0;var d=0;d=Jd(Mf(b)|0)|0;Og(a,d,$d(Mf(b)|0)|0);c[a>>2]=3668;o=0;Xa(91,a+16|0,b|0);b=o;o=0;if(b&1){d=Fb()|0;Hg(a);Qb(d|0)}else return}function Hg(a){a=a|0;ff(a);return}function Ig(a){a=a|0;Hg(a);cU(a);return}function Jg(a){a=a|0;return 0}function Kg(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;a=Ab(8)|0;o=0;Xa(102,a|0,42342);f=o;o=0;if(f&1){f=Fb()|0;Jb(a|0);Qb(f|0)}else Mb(a|0,632,117)}function Lg(a){a=a|0;return 0}function Mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=l;l=l+16|0;d=c;e=aU(20)|0;o=0;Xa(105,d|0,b|0);b=o;o=0;if(!(b&1)){o=0;Xa(104,e|0,d|0);b=o;o=0;if(!(b&1)){o=0;Xa(105,a|0,e|0);b=o;o=0;if(b&1)b=0;else{Sd(d);l=c;return}}else b=1;a=Fb()|0;Sd(d);if(b)f=7}else{a=Fb()|0;f=7}if((f|0)==7)cU(e);Qb(a|0)}function Ng(a,b){a=a|0;b=b|0;a=Ab(8)|0;o=0;Xa(102,a|0,42293);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else Mb(a|0,632,117)}function Og(a,b,d){a=a|0;b=b|0;d=d|0;cf(a);c[a>>2]=3712;c[a+8>>2]=b;c[a+12>>2]=d;return}function Pg(a){a=a|0;cf(a);c[a>>2]=3468;c[a+8>>2]=0;return}function Qg(){return -1}function Rg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=b+32|0;qU(i,d)|0;h=b+44|0;c[h>>2]=0;j=b+48|0;g=c[j>>2]|0;if(g&8|0){d=a[i+11>>0]|0;if(d<<24>>24<0){d=c[i>>2]|0;e=d;f=d;d=d+(c[b+36>>2]|0)|0}else{e=i;f=i;d=i+(d&255)|0}c[h>>2]=d;c[b+8>>2]=e;c[b+12>>2]=f;c[b+16>>2]=d}if(g&16|0){e=i+11|0;d=a[e>>0]|0;if(d<<24>>24<0){g=c[b+36>>2]|0;c[h>>2]=(c[i>>2]|0)+g;d=(c[b+40>>2]&2147483647)+-1|0;h=g}else{g=d&255;c[h>>2]=i+g;d=10;h=g}wU(i,d,0);d=a[e>>0]|0;if(d<<24>>24<0){e=c[i>>2]|0;g=e;f=c[b+36>>2]|0}else{g=i;f=d&255;e=i}d=b+24|0;c[d>>2]=e;c[b+20>>2]=e;c[b+28>>2]=g+f;if(c[j>>2]&3|0)c[d>>2]=e+h}return}function Sg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j;e=c[d+48>>2]|0;a:do if(!(e&16)){if(!(e&8)){c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;e=0;while(1){if((e|0)==3)break a;c[b+(e<<2)>>2]=0;e=e+1|0}}e=c[d+8>>2]|0;d=c[d+16>>2]|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;h=d-e|0;if(h>>>0>4294967279)lU(b);if(h>>>0<11){a[b+11>>0]=h;g=b}else{f=h+16&-16;g=aU(f)|0;c[b>>2]=g;c[b+8>>2]=f|-2147483648;c[b+4>>2]=h}f=g;while(1){if((e|0)==(d|0))break;ah(f,e);e=e+1|0;f=f+1|0}a[i>>0]=0;ah(g+h|0,i)}else{f=d+44|0;g=c[f>>2]|0;e=c[d+24>>2]|0;if(g>>>0>>0){c[f>>2]=e;g=e}e=c[d+20>>2]|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;d=g-e|0;if(d>>>0>4294967279)lU(b);if(d>>>0<11)a[b+11>>0]=d;else{f=d+16&-16;h=aU(f)|0;c[b>>2]=h;c[b+8>>2]=f|-2147483648;c[b+4>>2]=d;b=h}f=b;while(1){if((e|0)==(g|0))break;ah(f,e);e=e+1|0;f=f+1|0}a[i>>0]=0;ah(b+d|0,i)}while(0);l=j;return}function Tg(b,c){b=b|0;c=c|0;var d=0,e=0;d=l;l=l+16|0;e=d;a[e>>0]=c;c=Xg(b,e,1)|0;l=d;return c|0}function Ug(a){a=a|0;Vg(a,3852);GK(a+56|0);return}function Vg(a,b){a=a|0;b=b|0;var d=0;d=c[b>>2]|0;c[a>>2]=d;c[a+(c[d+-12>>2]|0)>>2]=c[b+12>>2];Wg(a+4|0);dL(a,b+4|0);return}function Wg(a){a=a|0;c[a>>2]=3796;pU(a+32|0);KK(a);return}function Xg(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,m=0,n=0,p=0,q=0,r=0;q=l;l=l+16|0;i=q+12|0;n=q;m=q+8|0;o=0;Xa(106,n|0,b|0);k=o;o=0;a:do if(k&1){e=Gb(0)|0;p=18}else{do if(a[n>>0]|0){j=(c[b>>2]|0)+-12|0;c[m>>2]=c[b+(c[j>>2]|0)+24>>2];j=b+(c[j>>2]|0)|0;k=c[j+4>>2]|0;g=d+e|0;f=Qg()|0;e=j+76|0;do if(Yg(f,c[e>>2]|0)|0){o=0;Xa(107,i|0,j|0);f=o;o=0;if(f&1)p=15;else{o=0;f=ja(57,i|0,59880)|0;r=o;o=0;if(!(r&1)?(o=0,h=ja(c[(c[f>>2]|0)+28>>2]|0,f|0,32)|0,r=o,o=0,!(r&1)):0){WL(i);p=h<<24>>24;c[e>>2]=p;e=p;p=10;break}e=Gb(0)|0;WL(i)}}else{e=c[e>>2]|0;p=10}while(0);if((p|0)==10){o=0;c[i>>2]=c[m>>2];e=za(80,i|0,d|0,((k&176|0)==32?g:d)|0,g|0,j|0,e&255|0)|0;r=o;o=0;if(r&1)p=15;else{if(e|0)break;r=b+(c[(c[b>>2]|0)+-12>>2]|0)|0;o=0;Xa(108,r|0,c[r+16>>2]|5|0);r=o;o=0;if(!(r&1))break;e=Gb(0)|0}}if((p|0)==15)e=Gb(0)|0;sL(n);p=18;break a}while(0);sL(n)}while(0);do if((p|0)==18){Bb(e|0)|0;o=0;Na(314,b+(c[(c[b>>2]|0)+-12>>2]|0)|0);r=o;o=0;if(!(r&1)){Db();break}e=Fb()|0;o=0;La(44);r=o;o=0;if(r&1){r=Gb(0)|0;_g(r)}else Qb(e|0)}while(0);l=q;return b|0}function Yg(a,b){a=a|0;b=b|0;return (a|0)==(b|0)|0}function Zg(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0;r=l;l=l+16|0;p=r+12|0;q=r;i=c[b>>2]|0;a:do if(!i)i=0;else{j=d;k=f-j|0;n=g+12|0;m=c[n>>2]|0;k=(m|0)>(k|0)?m-k|0:0;m=e;g=m-j|0;if((g|0)>0?(Tc[c[(c[i>>2]|0)+48>>2]&127](i,d,g)|0)!=(g|0):0){c[b>>2]=0;i=0;break}do if((k|0)>0){c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;if(k>>>0<11){d=q+11|0;a[d>>0]=k;g=q;j=q}else{d=k+16&-16;g=aU(d)|0;c[q>>2]=g;c[q+8>>2]=d|-2147483648;c[q+4>>2]=k;d=q+11|0;j=q}$g(g,k,h)|0;a[p>>0]=0;ah(g+k|0,p);o=0;g=la(c[(c[i>>2]|0)+48>>2]|0,i|0,((a[d>>0]|0)<0?c[j>>2]|0:q)|0,k|0)|0;p=o;o=0;if(p&1){r=Fb()|0;pU(q);Qb(r|0)}if((g|0)==(k|0)){pU(q);break}else{c[b>>2]=0;pU(q);i=0;break a}}while(0);f=f-m|0;if((f|0)>0?(Tc[c[(c[i>>2]|0)+48>>2]&127](i,e,f)|0)!=(f|0):0){c[b>>2]=0;i=0;break}c[n>>2]=0}while(0);l=r;return i|0}function _g(a){a=a|0;Bb(a|0)|0;uV()}function $g(a,b,c){a=a|0;b=b|0;c=c|0;if(b|0)yW(a|0,(bh(c)|0)&255|0,b|0)|0;return a|0}function ah(b,c){b=b|0;c=c|0;a[b>>0]=a[c>>0]|0;return}function bh(a){a=a|0;return a&255|0}function ch(a){a=a|0;Wg(a);cU(a);return}function dh(b,d,e,f,g,h){b=b|0;d=d|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;i=d+44|0;j=c[i>>2]|0;o=d+24|0;p=c[o>>2]|0;l=p;if(j>>>0

    >>0){c[i>>2]=p;n=l}else n=j;m=h&24;a:do if((m|0)!=0?!((g|0)==1&(m|0)==24):0){m=(h&8|0)!=0;k=d+32|0;b:do switch(g|0){case 0:{i=0;j=0;break}case 1:if(m){j=(c[d+12>>2]|0)-(c[d+8>>2]|0)|0;i=j;j=((j|0)<0)<<31>>31;break b}else{j=l-(c[d+20>>2]|0)|0;i=j;j=((j|0)<0)<<31>>31;break b}case 2:{if((a[k+11>>0]|0)<0)i=c[k>>2]|0;else i=k;j=n-i|0;i=j;j=((j|0)<0)<<31>>31;break}default:{j=-1;i=-1;break a}}while(0);j=mW(i|0,j|0,e|0,f|0)|0;i=z;if((i|0)>=0){if((a[k+11>>0]|0)<0)k=c[k>>2]|0;f=n-k|0;e=((f|0)<0)<<31>>31;if(!((e|0)<(i|0)|(e|0)==(i|0)&f>>>0>>0)){k=(h&16|0)!=0;do if(!((j|0)==0&(i|0)==0))if(m)if((c[d+12>>2]|0)==0|k&(p|0)==0){j=-1;i=-1;break a}else break;else if(k&(p|0)==0){j=-1;i=-1;break a}else break;while(0);if(m){c[d+12>>2]=(c[d+8>>2]|0)+j;c[d+16>>2]=n}if(k)c[o>>2]=(c[d+20>>2]|0)+j}else{j=-1;i=-1}}else{j=-1;i=-1}}else{j=-1;i=-1}while(0);p=b;c[p>>2]=0;c[p+4>>2]=0;b=b+8|0;c[b>>2]=j;c[b+4>>2]=i;return}function eh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;d=d+8|0;rd[c[(c[b>>2]|0)+16>>2]&63](a,b,c[d>>2]|0,c[d+4>>2]|0,0,e);return}function fh(b){b=b|0;var d=0,e=0,f=0,g=0;d=b+44|0;f=c[d>>2]|0;e=c[b+24>>2]|0;if(f>>>0>>0){c[d>>2]=e;f=e}if(c[b+48>>2]&8){d=b+16|0;e=c[d>>2]|0;if(e>>>0>>0){c[d>>2]=f;e=f}d=c[b+12>>2]|0;if(d>>>0>>0)d=bh(a[d>>0]|0)|0;else g=8}else g=8;if((g|0)==8)d=Qg()|0;return d|0}function gh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;f=b+44|0;e=c[b+24>>2]|0;if((c[f>>2]|0)>>>0>>0)c[f>>2]=e;e=b+12|0;do if((c[b+8>>2]|0)>>>0<(c[e>>2]|0)>>>0){if(Yg(d,Qg()|0)|0){f=c[f>>2]|0;c[e>>2]=(c[e>>2]|0)+-1;c[b+16>>2]=f;d=ih(d)|0;break}if((c[b+48>>2]&16|0)==0?(h=jh(d)|0,!(kh(h,a[(c[e>>2]|0)+-1>>0]|0)|0)):0){g=9;break}h=c[f>>2]|0;c[e>>2]=(c[e>>2]|0)+-1;c[b+16>>2]=h;h=jh(d)|0;a[c[e>>2]>>0]=h}else g=9;while(0);if((g|0)==9)d=Qg()|0;return d|0}function hh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+16|0;p=u;a:do if(!(Yg(d,Qg()|0)|0)){q=b+12|0;r=b+8|0;s=(c[q>>2]|0)-(c[r>>2]|0)|0;t=b+24|0;f=c[t>>2]|0;m=b+28|0;g=c[m>>2]|0;e=b+32|0;n=b+44|0;do if((f|0)==(g|0)){h=b+48|0;if(!(c[h>>2]&16)){e=Qg()|0;break a}k=b+20|0;j=c[k>>2]|0;i=f-j|0;j=(c[n>>2]|0)-j|0;o=0;Xa(109,e|0,0);g=o;o=0;if(!(g&1)){f=e+11|0;if((a[f>>0]|0)<0)g=(c[b+40>>2]&2147483647)+-1|0;else g=10;o=0;bb(58,e|0,g|0,0);g=o;o=0;if(!(g&1)){f=a[f>>0]|0;if(f<<24>>24<0){g=c[e>>2]|0;f=c[b+36>>2]|0}else{g=e;f=f&255}v=g+f|0;c[k>>2]=g;c[m>>2]=v;k=g+i|0;c[t>>2]=k;f=g+j|0;c[n>>2]=f;i=n;g=v;break}}e=Gb(0)|0;Bb(e|0)|0;e=Qg()|0;Db();break a}else{h=b+48|0;i=n;k=f;f=c[n>>2]|0}while(0);j=k+1|0;c[p>>2]=j;f=c[(j>>>0>>0?n:p)>>2]|0;c[i>>2]=f;if(c[h>>2]&8|0){if((a[e+11>>0]|0)<0)e=c[e>>2]|0;c[r>>2]=e;c[q>>2]=e+s;c[b+16>>2]=f}e=d&255;if((k|0)==(g|0)){v=c[(c[b>>2]|0)+52>>2]|0;e=bh(e)|0;e=Sc[v&127](b,e)|0;break}else{c[t>>2]=j;a[k>>0]=e;e=bh(e)|0;break}}else e=ih(d)|0;while(0);l=u;return e|0}function ih(a){a=a|0;if(Yg(a,Qg()|0)|0)a=~(Qg()|0);return a|0}function jh(a){a=a|0;return a&255|0}function kh(a,b){a=a|0;b=b|0;return a<<24>>24==b<<24>>24|0}function lh(a){a=a|0;Ug(a);cU(a);return}function mh(a){a=a|0;Ug(a+(c[(c[a>>2]|0)+-12>>2]|0)|0);return}function nh(a){a=a|0;lh(a+(c[(c[a>>2]|0)+-12>>2]|0)|0);return}function oh(a){a=a|0;c[a>>2]=3876;me(a+20|0);Eh(a+8|0);Gh(a);return}function ph(a){a=a|0;oh(a);cU(a);return}function qh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;e=f;je(d,3632);o=0;Xa(110,b|0,d|0);g=o;o=0;do if(!(g&1)){me(d);ie(e,c);o=0;bb(59,a|0,b|0,e|0);g=o;o=0;if(g&1){a=Fb()|0;ne(e);break}else{ne(e);l=f;return}}else{a=Fb()|0;me(d)}while(0);Qb(a|0)}function rh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;f=g;je(e,d);o=0;Xa(110,b|0,e|0);d=o;o=0;do if(!(d&1)){me(e);ie(f,c);o=0;bb(59,a|0,b|0,f|0);e=o;o=0;if(e&1){a=Fb()|0;ne(f);break}else{ne(f);l=g;return}}else{a=Fb()|0;me(e)}while(0);Qb(a|0)}function sh(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;E=l;l=l+112|0;B=E+96|0;j=E+92|0;k=E+88|0;m=E+84|0;n=E+80|0;p=E+76|0;q=E+72|0;r=E+68|0;s=E+64|0;f=E+60|0;g=E+56|0;h=E+52|0;i=E+48|0;u=E+40|0;t=E+36|0;v=E+32|0;w=E+28|0;x=E+24|0;y=E+16|0;z=E+8|0;F=E;uh(a+20|0,b)|0;C=a+8|0;d=c[C>>2]|0;D=a+12|0;while(1){e=c[D>>2]|0;if((e|0)==(d|0))break;A=e+-4|0;c[D>>2]=A;oe(A)}A=og(b)|0;vh(j,16);c[B>>2]=c[j>>2];if((((((((((!(ng(b,B)|0)?(vh(k,15),c[B>>2]=c[k>>2],!(ng(b,B)|0)):0)?(vh(m,16),c[B>>2]=c[m>>2],!(ng(b,B)|0)):0)?(vh(n,8),c[B>>2]=c[n>>2],!(ng(b,B)|0)):0)?(vh(p,7),c[B>>2]=c[p>>2],!(ng(b,B)|0)):0)?(vh(q,2),c[B>>2]=c[q>>2],!(ng(b,B)|0)):0)?(vh(r,3),c[B>>2]=c[r>>2],!(ng(b,B)|0)):0)?(vh(s,4),c[B>>2]=c[s>>2],!(ng(b,B)|0)):0)?(vh(f,5),c[B>>2]=c[f>>2],!(ng(b,B)|0)):0)?(vh(g,9),c[B>>2]=c[g>>2],!(ng(b,B)|0)):0)?(vh(h,13),c[B>>2]=c[h>>2],!(ng(b,B)|0)):0){vh(i,14);c[B>>2]=c[i>>2];d=ng(b,B)|0}else d=1;e=d^1;a:do if(A|e)G=29;else{f=aU(20)|0;o=0;Xa(86,u|0,b|0);s=o;o=0;do if(!(s&1)){o=0;Xa(111,f|0,u|0);s=o;o=0;if(!(s&1)){o=0;Xa(112,B|0,f|0);s=o;o=0;if(s&1)e=0;else{d=c[D>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);s=o;o=0;if(s&1){d=Fb()|0;oe(B);me(u);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);me(u);G=29;break a}}else e=1;d=Fb()|0;me(u);if(e)G=27}else{d=Fb()|0;G=27}while(0);if((G|0)==27)cU(f)}while(0);b:do if((G|0)==29){vh(t,12);c[B>>2]=c[t>>2];c:do if(ng(b,B)|0){d=aU(12)|0;o=0;Na(310,d|0);u=o;o=0;do if(u&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);u=o;o=0;if(u&1){d=Fb()|0;oe(B);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);break c}while(0);break b}while(0);vh(v,6);c[B>>2]=c[v>>2];d:do if(ng(b,B)|0){d=aU(12)|0;o=0;Na(315,d|0);v=o;o=0;do if(v&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);v=o;o=0;if(v&1){d=Fb()|0;oe(B);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);break d}while(0);break b}while(0);vh(w,1);c[B>>2]=c[w>>2];e:do if(ng(b,B)|0){d=aU(32)|0;o=0;Na(316,d|0);w=o;o=0;do if(w&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);w=o;o=0;if(w&1){d=Fb()|0;oe(B);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);break e}while(0);break b}while(0);vh(x,11);c[B>>2]=c[x>>2];f:do if(ng(b,B)|0){d=aU(12)|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;o=0;Na(317,d|0);x=o;o=0;do if(x&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);x=o;o=0;if(x&1){d=Fb()|0;oe(B);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);break f}while(0);break b}while(0);g:do if(!(A^1|e)){f=aU(20)|0;o=0;Xa(86,y|0,b|0);x=o;o=0;do if(!(x&1)){o=0;Xa(111,f|0,y|0);x=o;o=0;if(!(x&1)){o=0;Xa(112,B|0,f|0);x=o;o=0;if(x&1)e=0;else{d=c[D>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);x=o;o=0;if(x&1){d=Fb()|0;oe(B);me(y);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);me(y);break g}}else e=1;d=Fb()|0;me(y);if(e)G=76}else{d=Fb()|0;G=76}while(0);if((G|0)==76)cU(f);break b}while(0);h:do if((c[D>>2]|0)==(c[C>>2]|0)){i:do if(!A){f=aU(20)|0;o=0;Xa(86,z|0,b|0);y=o;o=0;do if(!(y&1)){o=0;Xa(111,f|0,z|0);y=o;o=0;if(!(y&1)){o=0;Xa(112,B|0,f|0);y=o;o=0;if(y&1)e=0;else{d=c[D>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);y=o;o=0;if(y&1){d=Fb()|0;oe(B);me(z);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);me(z);break i}}else e=1;d=Fb()|0;me(z);if(e)G=90}else{d=Fb()|0;G=90}while(0);if((G|0)==90)cU(f);break b}while(0);d=aU(12)|0;o=0;Na(310,d|0);z=o;o=0;do if(z&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;e=a+16|0;if(d>>>0>=(c[e>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);z=o;o=0;if(z&1){d=Fb()|0;oe(B);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);d=aU(12)|0;o=0;Na(315,d|0);z=o;o=0;do if(z&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;if(d>>>0>=(c[e>>2]|0)>>>0){o=0;Xa(113,C|0,B|0);z=o;o=0;if(z&1){d=Fb()|0;oe(B);break}}else{wh(d,B);c[D>>2]=(c[D>>2]|0)+4}oe(B);d=aU(32)|0;o=0;Na(316,d|0);z=o;o=0;j:do if(z&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){wh(d,B);c[D>>2]=(c[D>>2]|0)+4}else{o=0;Xa(113,C|0,B|0);z=o;o=0;if(!(z&1))break;d=Fb()|0;oe(B);break j}while(0);oe(B);d=aU(12)|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;o=0;Na(317,d|0);z=o;o=0;k:do if(z&1){G=Fb()|0;cU(d);d=G}else{ge(B,d);d=c[D>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){wh(d,B);c[D>>2]=(c[D>>2]|0)+4}else{o=0;Xa(113,C|0,B|0);z=o;o=0;if(!(z&1))break;d=Fb()|0;oe(B);break k}while(0);oe(B);if(!A)break h;f=aU(20)|0;o=0;Xa(86,F|0,b|0);b=o;o=0;l:do if(!(b&1)){o=0;Xa(111,f|0,F|0);b=o;o=0;do if(b&1)e=1;else{o=0;Xa(112,B|0,f|0);b=o;o=0;if(b&1){e=0;break}d=c[D>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){wh(d,B);c[D>>2]=(c[D>>2]|0)+4}else{o=0;Xa(113,C|0,B|0);D=o;o=0;if(!(D&1))break;d=Fb()|0;oe(B);me(F);break l}while(0);oe(B);me(F);break h}while(0);d=Fb()|0;me(F);if(e)G=131}else{d=Fb()|0;G=131}while(0);if((G|0)==131)cU(f);break b}while(0);break b}while(0);break b}while(0);break b}while(0);break b}while(0);l=E;return}while(0);Qb(d|0)}function th(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,m=0,n=0;m=l;l=l+16|0;j=m+8|0;k=m;h=b+8|0;i=b+12|0;g=b+20|0;f=0;while(1){b=c[h>>2]|0;if(f>>>0>=(c[i>>2]|0)-b>>2>>>0){b=14;break}b=he(b+(f<<2)|0)|0;e=c[(c[b>>2]|0)+12>>2]|0;o=0;Xa(85,j|0,d|0);n=o;o=0;if(n&1){e=Gb(24)|0;b=z}else{o=0;Xa(86,k|0,g|0);n=o;o=0;if(n&1){e=Gb(24)|0;b=z}else{o=0;db(e|0,a|0,b|0,j|0,k|0);n=o;o=0;if(!(n&1)){b=6;break}e=Gb(24)|0;b=z;me(k)}ne(j)}if((b|0)!=(mc(24)|0)){b=13;break}Bb(e|0)|0;Db();f=f+1|0}if((b|0)==6){me(k);ne(j);l=m;return}else if((b|0)==13)Qb(e|0);else if((b|0)==14){n=Ab(8)|0;hg(n,46024);Mb(n|0,24,58)}}function uh(a,b){a=a|0;b=b|0;c[a>>2]=c[b>>2];jg(a+4|0,b+4|0)|0;return a|0}function vh(a,b){a=a|0;b=b|0;c[a>>2]=b;return}function wh(a,b){a=a|0;b=b|0;c[a>>2]=0;vf(a,c[b>>2]|0);return}function xh(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=Ah(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Bh(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;wh(c[g>>2]|0,b);c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(114,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;Dh(d);Qb(k|0)}else{Dh(d);l=h;return}}function yh(a){a=a|0;zh(a);c[a>>2]=10552;return}function zh(a){a=a|0;cf(a);c[a>>2]=3900;return}function Ah(a){a=a|0;return 1073741823}function Bh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Ch(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;wh((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function Dh(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;oe(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function Eh(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;oe(e)}cU(c[a>>2]|0)}return}function Fh(a){a=a|0;var b=0,d=0;zh(a);c[a>>2]=3876;b=a+8|0;c[b>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;o=0;Na(318,a+20|0);d=o;o=0;if(d&1){d=Fb()|0;Eh(b);Gh(a);Qb(d|0)}else return}function Gh(a){a=a|0;ff(a);return}function Hh(a){a=a|0;Gh(a);cU(a);return}function Ih(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;h=g+8|0;e=g;f=c[(c[b>>2]|0)+12>>2]|0;ie(h,d);o=0;Xa(86,e|0,3632);d=o;o=0;do if(!(d&1)){o=0;db(f|0,a|0,b|0,h|0,e|0);f=o;o=0;if(f&1){a=Fb()|0;me(e);break}else{me(e);ne(h);l=g;return}}else a=Fb()|0;while(0);ne(h);Qb(a|0)}function Jh(a){a=a|0;c[a>>2]=3924;Qe(a+24|0);Nd(a+12|0);Ke(a+8|0);ff(a);return}function Kh(a){a=a|0;Jh(a);cU(a);return}function Lh(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;cf(a);c[a>>2]=3924;g=a+8|0;o=0;Xa(115,g|0,b|0);b=o;o=0;if(b&1)b=Fb()|0;else{b=a+12|0;o=0;Xa(83,b|0,d|0);d=o;o=0;do if(!(d&1)){o=0;Xa(96,a+24|0,e|0);e=o;o=0;if(e&1){f=Fb()|0;Nd(b);b=f;break}else{c[a+36>>2]=c[f>>2];return}}else b=Fb()|0;while(0);Ke(g)}ff(a);Qb(b|0)}function Mh(a,b){a=a|0;b=b|0;c[a>>2]=0;Nh(a,c[b>>2]|0);return}function Nh(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Oh(a,b){a=a|0;b=b|0;Mh(a,b+8|0);return}function Ph(a,b){a=a|0;b=b|0;Gd(a,b+12|0);return}function Qh(a){a=a|0;return a+24|0}function Rh(a){a=a|0;return c[a+36>>2]|0}function Sh(b,d){b=b|0;d=d|0;var e=0,f=0;e=a[d+11>>0]|0;f=e<<24>>24<0;return Xg(b,f?c[d>>2]|0:d,f?c[d+4>>2]|0:e&255)|0}function Th(a,b){a=a|0;b=b|0;return Xg(a,b,Uh(b)|0)|0}function Uh(a){a=a|0;return LJ(a)|0}function Vh(a){a=a|0;ff(a);return}function Wh(a){a=a|0;Vh(a);cU(a);return}function Xh(a){a=a|0;return +(+g[a+8>>2])}function Yh(a){a=a|0;return +(+g[a+12>>2])}function Zh(a,b,d){a=a|0;b=+b;d=+d;cf(a);c[a>>2]=3940;g[a+8>>2]=b;g[a+12>>2]=d;return}function _h(a,b){a=a|0;b=b|0;var d=0,e=0.0;e=+g[a+8>>2];d=Pe(b)|0;if(e==+Lc[c[(c[d>>2]|0)+8>>2]&63](d)){e=+g[a+12>>2];a=Pe(b)|0;a=e==+Lc[c[(c[a>>2]|0)+12>>2]&63](a)}else a=0;return a|0}function $h(a){a=a|0;var b=0,d=0.0,e=0.0,f=0.0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0.0,s=0.0;j=l;l=l+32|0;q=j+24|0;p=j+20|0;n=j+16|0;m=j+8|0;k=j+4|0;h=j;i=j+12|0;g=Pe(c[a>>2]|0)|0;s=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe((c[a>>2]|0)+4|0)|0;r=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe(c[a>>2]|0)|0;d=+Lc[c[(c[g>>2]|0)+12>>2]&63](g);g=Pe((c[a>>2]|0)+4|0)|0;d=+ai(s,r,d,+Lc[c[(c[g>>2]|0)+12>>2]&63](g));g=Pe((c[a>>2]|0)+4|0)|0;r=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe((c[a>>2]|0)+8|0)|0;s=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe((c[a>>2]|0)+4|0)|0;e=+Lc[c[(c[g>>2]|0)+12>>2]&63](g);g=Pe((c[a>>2]|0)+8|0)|0;e=+ai(r,s,e,+Lc[c[(c[g>>2]|0)+12>>2]&63](g));g=Pe(c[a>>2]|0)|0;s=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe((c[a>>2]|0)+8|0)|0;r=+Lc[c[(c[g>>2]|0)+8>>2]&63](g);g=Pe(c[a>>2]|0)|0;f=+Lc[c[(c[g>>2]|0)+12>>2]&63](g);g=Pe((c[a>>2]|0)+8|0)|0;f=+ai(s,r,f,+Lc[c[(c[g>>2]|0)+12>>2]&63](g));bi(q,0);o=0;Xa(116,p|0,0);g=o;o=0;if(g&1)b=Fb()|0;else{o=0;Xa(116,n|0,0);g=o;o=0;if(g&1)b=Fb()|0;else{do if(!(e>=d)|!(e>=f)){b=c[a>>2]|0;if(!(f>=e)|!(f>=d)){o=0;ja(58,p|0,b+8|0)|0;g=o;o=0;if(g&1){g=9;break}o=0;ja(58,q|0,c[a>>2]|0)|0;g=o;o=0;if(g&1){g=9;break}o=0;ja(58,n|0,(c[a>>2]|0)+4|0)|0;g=o;o=0;if(g&1){g=9;break}else{g=17;break}}else{o=0;ja(58,p|0,b+4|0)|0;g=o;o=0;if(g&1){g=9;break}o=0;ja(58,q|0,c[a>>2]|0)|0;g=o;o=0;if(g&1){g=9;break}o=0;ja(58,n|0,(c[a>>2]|0)+8|0)|0;g=o;o=0;if(g&1){g=9;break}else{g=17;break}}}else{o=0;ja(58,p|0,c[a>>2]|0)|0;g=o;o=0;if((!(g&1)?(o=0,ja(58,q|0,(c[a>>2]|0)+4|0)|0,g=o,o=0,!(g&1)):0)?(o=0,ja(58,n|0,(c[a>>2]|0)+8|0)|0,g=o,o=0,!(g&1)):0)g=17;else g=9}while(0);a:do if((g|0)==17){o=0;Xa(117,m|0,q|0);b=o;o=0;if(b&1)g=9;else{o=0;Xa(117,k|0,p|0);b=o;o=0;if(b&1)b=Fb()|0;else{o=0;Xa(117,h|0,n|0);b=o;o=0;do if(b&1)b=Fb()|0;else{o=0;d=+$(42,m|0,k|0,h|0);b=o;o=0;if(b&1){b=Fb()|0;fi(h);break}fi(h);fi(k);fi(m);do if(d<0.0){o=0;Xa(117,i|0,q|0);m=o;o=0;if(m&1){g=9;break a}o=0;ja(58,q|0,n|0)|0;m=o;o=0;if(!(m&1)?(o=0,ja(58,n|0,i|0)|0,m=o,o=0,!(m&1)):0){fi(i);break}b=Fb()|0;fi(i);break a}while(0);o=0;ja(58,c[a>>2]|0,q|0)|0;m=o;o=0;if(m&1){g=9;break a}o=0;ja(58,(c[a>>2]|0)+4|0,p|0)|0;m=o;o=0;if(m&1){g=9;break a}o=0;ja(58,(c[a>>2]|0)+8|0,n|0)|0;m=o;o=0;if(m&1){g=9;break a}fi(n);fi(p);fi(q);l=j;return}while(0);fi(k)}fi(m)}}while(0);if((g|0)==9)b=Fb()|0;fi(n)}fi(p)}fi(q);Qb(b|0)}function ai(a,b,c,d){a=+a;b=+b;c=+c;d=+d;b=a-b;d=c-d;return +(+C(+(b*b+d*d)))}function bi(a,b){a=a|0;b=b|0;c[a>>2]=0;gi(a,b);return}function ci(a,b){a=a|0;b=b|0;gi(a,c[b>>2]|0);return a|0}function di(a,b){a=a|0;b=b|0;c[a>>2]=0;gi(a,c[b>>2]|0);return}function ei(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0.0,g=0.0,h=0;h=Pe(b)|0;e=+Lc[c[(c[h>>2]|0)+8>>2]&63](h);b=Pe(b)|0;f=+Lc[c[(c[b>>2]|0)+12>>2]&63](b);b=Pe(d)|0;g=+Lc[c[(c[b>>2]|0)+8>>2]&63](b)-e;b=Pe(a)|0;g=g*(+Lc[c[(c[b>>2]|0)+12>>2]&63](b)-f);d=Pe(d)|0;f=+Lc[c[(c[d>>2]|0)+12>>2]&63](d)-f;d=Pe(a)|0;return +(g-f*(+Lc[c[(c[d>>2]|0)+8>>2]&63](d)-e))}function fi(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function gi(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function hi(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0.0;e=+g[(Pe(a)|0)+8>>2];d=+g[(Pe(a)|0)+12>>2];c=+g[(Pe(b)|0)+8>>2];return +(+ii(e,d,c,+g[(Pe(b)|0)+12>>2]))}function ii(a,b,c,d){a=+a;b=+b;c=+c;d=+d;c=a-c;d=b-d;return +(+C(+(c*c+d*d)))}function ji(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0;j=l;l=l+16|0;k=j+12|0;i=j;f=f&1;ki(k,d);o=0;Xa(96,i|0,e|0);e=o;o=0;do if(!(e&1)){o=0;bb(60,b|0,k|0,i|0);e=o;o=0;if(e&1){f=Fb()|0;Qe(i);break}else{Qe(i);de(k);c[b>>2]=3964;a[b+24>>0]=f;c[b+28>>2]=g;c[b+32>>2]=h;l=j;return}}else f=Fb()|0;while(0);de(k);Qb(f|0)}function ki(a,b){a=a|0;b=b|0;c[a>>2]=0;tf(a,c[b>>2]|0);return}function li(a){a=a|0;c[a>>2]=3980;Qe(a+12|0);de(a+8|0);ff(a);return}function mi(a){a=a|0;li(a);cU(a);return}function ni(a){a=a|0;li(a);cU(a);return}function oi(b){b=b|0;return (a[b+24>>0]|0)!=0|0}function pi(a){a=a|0;return c[a+28>>2]|0}function qi(a){a=a|0;return c[a+32>>2]|0}function ri(a){a=a|0;c[a>>2]=3996;Fi(a+8|0);Gh(a);return}function si(a){a=a|0;ri(a);cU(a);return}function ti(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,m=0,n=0,p=0,q=0,r=0;i=l;l=l+112|0;g=i+96|0;r=i+64|0;e=i+52|0;q=i+56|0;p=i+40|0;n=i+36|0;f=i+32|0;m=i+28|0;k=i+16|0;j=i+4|0;h=i;Tf(e,vi(d)|0);o=0;Xa(118,r|0,e|0);d=o;o=0;if(d&1){b=Fb()|0;de(e)}else{de(e);o=0;Xa(119,q|0,r|0);e=o;o=0;if(e&1)b=Fb()|0;else{e=wi(q)|0;o=0;Xa(120,p|0,e|0);e=o;o=0;if(e&1)b=Fb()|0;else{o=0;Xa(121,f|0,q|0);e=o;o=0;do if(e&1)b=Fb()|0;else{o=0;bb(61,n|0,b+8|0,f|0);e=o;o=0;if(e&1){b=Fb()|0;yi(f);break}yi(f);o=0;e=fa(107,40)|0;f=o;o=0;a:do if(f&1)b=Fb()|0;else{f=zi(n)|0;o=0;Xa(122,m|0,f|0);f=o;o=0;do if(!(f&1)){f=zi(n)|0;o=0;Xa(123,k|0,f|0);f=o;o=0;if(f&1){b=Fb()|0;Ke(m);break}o=0;Xa(96,j|0,p|0);f=o;o=0;if(f&1){b=Fb()|0;d=1}else{vh(h,1);o=0;c[g>>2]=c[h>>2];hb(47,e|0,m|0,k|0,j|0,g|0);h=o;o=0;if(!(h&1)){o=0;Xa(124,a|0,e|0);h=o;o=0;if(h&1)d=0;else{Qe(j);Nd(k);Ke(m);Bi(n);Qe(p);yi(q);Ci(r);l=i;return}}else d=1;b=Fb()|0;Qe(j)}Nd(k);Ke(m);if(!d)break a}else b=Fb()|0;while(0);cU(e)}while(0);Bi(n)}while(0);Qe(p)}yi(q)}Ci(r)}Qb(b|0)}function ui(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=l;l=l+16|0;e=f;g=c[(c[b>>2]|0)+8>>2]|0;ie(e,d);o=0;bb(g|0,a|0,b|0,e|0);d=o;o=0;if(d&1){g=Fb()|0;ne(e);Qb(g|0)}else{ne(e);l=f;return}}function vi(a){a=a|0;return c[a>>2]|0}function wi(a){a=a|0;return c[a>>2]|0}function xi(a,b){a=a|0;b=b|0;c[a>>2]=0;Ei(a,c[b>>2]|0);return}function yi(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function zi(a){a=a|0;return c[a>>2]|0}function Ai(a,b){a=a|0;b=b|0;c[a>>2]=0;Af(a,b);return}function Bi(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Ci(a){a=a|0;c[a>>2]=4020;de(a+8|0);ff(a);return}function Di(a){a=a|0;Ci(a);cU(a);return}function Ei(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Fi(a){a=a|0;c[a>>2]=4036;yi(a+16|0);ff(a);return}function Gi(a){a=a|0;Fi(a);cU(a);return}function Hi(a){a=a|0;var b=0;zh(a);c[a>>2]=3996;o=0;Na(319,a+8|0);b=o;o=0;if(b&1){b=Fb()|0;Gh(a);Qb(b|0)}else return}function Ii(a){a=a|0;switch(a<<24>>24|0){case 76:{a=1;break}case 80:{a=4;break}case 77:{a=2;break}case 68:{a=3;break}case 66:{a=5;break}default:a=0}return a|0}function Ji(a,b){a=a|0;b=b|0;var d=0;switch(a|0){case 0:{a=4044+(b<<2)|0;d=7;break}case 1:{a=4172+(b<<2)|0;d=7;break}case 2:{a=4300+(b<<2)|0;d=7;break}case 4:{a=4428+(b<<2)|0;d=7;break}case 3:{a=4556+(b<<2)|0;d=7;break}default:a=61821}if((d|0)==7)a=c[a>>2]|0;return a|0}function Ki(a){a=a|0;var b=0;cf(a);c[a>>2]=4036;o=0;Xa(125,a+16|0,0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else return}function Li(a,b){a=a|0;b=b|0;c[a>>2]=0;Ei(a,b);return}function Mi(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;j=l;l=l+64|0;t=j+56|0;s=j+52|0;g=j+48|0;h=j+40|0;q=j+44|0;i=j+32|0;p=j+36|0;e=j+16|0;n=j+20|0;k=j+4|0;m=j;f=c+16|0;Ni(f,d)|0;Ul(t,wi(d)|0);d=wi(f)|0;o=0;d=fa(111,d|0)|0;u=o;o=0;a:do if(!(u&1)){b:do if(!d){u=wi(f)|0;o=0;Xa(126,g|0,u|0);u=o;o=0;do if(!(u&1)){o=0;Xa(127,s|0,g|0);u=o;o=0;if(u&1){d=Fb()|0;de(g);break}else{Pi(t,s)|0;de(s);de(g);break b}}else d=Fb()|0;while(0);break a}while(0);o=0;Xa(128,h|0,t|0);u=o;o=0;if(!(u&1)){o=0;bb(62,s|0,c|0,h|0);u=o;o=0;if(u&1){d=Fb()|0;de(h);break}de(h);o=0;Xa(129,i|0,s|0);u=o;o=0;do if(u&1)d=Fb()|0;else{o=0;bb(63,q|0,c|0,i|0);u=o;o=0;if(u&1){d=Fb()|0;Sf(i);break}Sf(i);o=0;Xa(129,e|0,q|0);u=o;o=0;do if(u&1)d=Fb()|0;else{o=0;bb(64,p|0,c|0,e|0);u=o;o=0;if(u&1){d=Fb()|0;Sf(e);break}Sf(e);d=Xd(q)|0;o=0;d=fa(112,d|0)|0;u=o;o=0;if(!(u&1)?(o=0,Xa(103,n|0,d|0),u=o,o=0,!(u&1)):0){d=0;while(1){if((d|0)>=(Ti(Xd(q)|0)|0)){r=19;break}c=Xd(q)|0;o=0;c=ja(59,c|0,d|0)|0;u=o;o=0;if(u&1){r=26;break}o=0;e=ja(56,n|0,d|0)|0;u=o;o=0;if(u&1){r=26;break}a[e>>0]=c&1;d=d+1|0}c:do if((r|0)==19){o=0;e=fa(107,48)|0;u=o;o=0;if(u&1){d=Fb()|0;break}o=0;Xa(83,k|0,n|0);u=o;o=0;do if(!(u&1)){o=0;Xa(115,m|0,p|0);u=o;o=0;if(u&1){d=Fb()|0;Nd(k);break}o=0;bb(65,e|0,k|0,m|0);u=o;o=0;do if(u&1)c=1;else{o=0;Xa(130,b|0,e|0);u=o;o=0;if(u&1){c=0;break}Ke(m);Nd(k);Nd(n);Ke(p);Sf(q);Sf(s);de(t);l=j;return}while(0);d=Fb()|0;Ke(m);Nd(k);if(!c)break c}else d=Fb()|0;while(0);cU(e)}else if((r|0)==26)d=Fb()|0;while(0);Nd(n)}else d=Fb()|0;Ke(p)}while(0);Sf(q)}while(0);Sf(s)}else r=6}else r=6;while(0);if((r|0)==6)d=Fb()|0;de(t);Qb(d|0)}function Ni(a,b){a=a|0;b=b|0;Ei(a,c[b>>2]|0);return a|0}function Oi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=(((Zk(be(b)|0)|0)+-1|0)/32|0)<<1|1;f=aU(32)|0;c=be(b)|0;o=0;c=fa(113,c|0)|0;g=o;o=0;do if((!(g&1)?(d=be(b)|0,o=0,d=fa(114,d|0)|0,g=o,o=0,!(g&1)):0)?(o=0,bb(66,f|0,c-e|0,d-e|0),g=o,o=0,!(g&1)):0){ae(a,f);g=0;c=0;a:while(1){d=be(b)|0;o=0;d=fa(113,d|0)|0;f=o;o=0;if(f&1){d=21;break}if((g|0)>=(d|0)){d=22;break}d=be(b)|0;o=0;d=fa(113,d|0)|0;f=o;o=0;if(f&1){d=21;break}if(((d|0)/2|0)-g&15){f=0;d=0;while(1){e=be(b)|0;o=0;e=fa(114,e|0)|0;h=o;o=0;if(h&1){d=21;break a}if((f|0)>=(e|0))break;e=be(b)|0;o=0;e=fa(113,e|0)|0;h=o;o=0;if(h&1){d=21;break a}if(((e|0)/2|0)-f&15){e=be(b)|0;o=0;e=la(72,e|0,g|0,f|0)|0;h=o;o=0;if(h&1){d=21;break a}if(e?(h=be(a)|0,o=0,bb(67,h|0,c|0,d|0),h=o,o=0,h&1):0){d=21;break a}d=d+1|0}f=f+1|0}c=c+1|0}g=g+1|0}if((d|0)==21){c=Fb()|0;de(a);break}else if((d|0)==22)return}else d=7;while(0);if((d|0)==7){c=Fb()|0;cU(f)}Qb(c|0)}function Pi(a,b){a=a|0;b=b|0;tf(a,c[b>>2]|0);return a|0}function Qi(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;v=l;l=l+32|0;h=v+25|0;i=v+24|0;x=v+12|0;j=v;c[x>>2]=0;u=x+4|0;c[u>>2]=0;c[x+8>>2]=0;k=d+16|0;f=wi(k)|0;o=0;f=fa(111,f|0)|0;t=o;o=0;a:do if(!(t&1)){g=wi(k)|0;do if(f){o=0;f=fa(115,g|0)|0;t=o;o=0;if(t&1){w=7;break a}if((f|0)>5){f=Ab(8)|0;o=0;Xa(131,f|0,43156);v=o;o=0;if(v&1){v=Fb()|0;Jb(f|0);f=v;break a}else{o=0;bb(68,f|0,160,61);o=0;w=7;break a}}f=wi(k)|0;o=0;f=fa(115,f|0)|0;t=o;o=0;if(!(t&1)?(o=0,Xa(132,j|0,c[4620+(f<<2)>>2]|0),t=o,o=0,!(t&1)):0){a[h>>0]=a[i>>0]|0;vj(x,j,h);wj(j);f=wi(k)|0;o=0;f=fa(115,f|0)|0;t=o;o=0;if(t&1){w=7;break a}f=4640+(f<<2)|0;break}f=Fb()|0;break a}else{o=0;f=fa(115,g|0)|0;t=o;o=0;if(t&1){w=7;break a}if((f|0)>33){f=Ab(8)|0;o=0;Xa(131,f|0,43156);v=o;o=0;if(v&1){v=Fb()|0;Jb(f|0);f=v;break a}else{o=0;bb(68,f|0,160,61);o=0;w=7;break a}}f=wi(k)|0;o=0;f=fa(115,f|0)|0;t=o;o=0;if(!(t&1)?(o=0,Xa(132,j|0,c[4660+(f<<2)>>2]|0),t=o,o=0,!(t&1)):0){a[h>>0]=a[i>>0]|0;vj(x,j,h);wj(j);f=wi(k)|0;o=0;f=fa(115,f|0)|0;t=o;o=0;if(t&1){w=7;break a}f=4792+(f<<2)|0;break}f=Fb()|0;break a}while(0);c[d+8>>2]=c[f>>2];g=wi(k)|0;o=0;g=fa(115,g|0)|0;t=o;o=0;if(!(t&1)){f=be(e)|0;o=0;f=fa(114,f|0)|0;t=o;o=0;if(t&1){f=Fb()|0;break}else{s=0;t=0}b:while(1){if(!g)break;q=f<<1;k=q+-4|0;r=f+-1+s|0;m=k+t|0;j=0;d=0;while(1){if((j|0)>=(k|0))break;i=be(e)|0;h=((j|0)/2|0)+s|0;o=0;i=la(72,i|0,d+s|0,h|0)|0;p=o;o=0;if(p&1){w=39;break b}n=j+t|0;p=(c[x>>2]|0)+(n>>>5<<2)|0;n=1<<(n&31);y=c[p>>2]|0;c[p>>2]=i?y|n:y&~n;p=be(e)|0;o=0;h=la(72,p|0,h|0,r-d|0)|0;p=o;o=0;if(p&1){w=39;break b}p=m+j|0;y=(c[x>>2]|0)+(p>>>5<<2)|0;p=1<<(p&31);n=c[y>>2]|0;c[y>>2]=h?n|p:n&~p;j=j+1|0;d=(d+1|0)%2|0}m=s+-1|0;n=(f<<2)+-7+t|0;p=(f*6|0)+-11+t|0;j=q|1;d=0;while(1){if((j|0)<=5)break;i=be(e)|0;h=m+(j>>>1)|0;o=0;i=la(72,i|0,r-d|0,h|0)|0;y=o;o=0;if(y&1){w=39;break b}k=q-j|0;z=n+k|0;y=(c[x>>2]|0)+(z>>>5<<2)|0;z=1<<(z&31);A=c[y>>2]|0;c[y>>2]=i?A|z:A&~z;y=be(e)|0;o=0;h=la(72,y|0,h|0,d+s|0)|0;y=o;o=0;if(y&1){w=39;break b}z=p+k|0;A=(c[x>>2]|0)+(z>>>5<<2)|0;z=1<<(z&31);y=c[A>>2]|0;c[A>>2]=h?y|z:y&~z;j=j+-1|0;d=(d+1|0)%2|0}s=s+2|0;t=(f<<3)+-16+t|0;f=f+-4|0;g=g+-1|0}if((w|0)==39){f=Fb()|0;break}o=0;f=fa(107,24)|0;A=o;o=0;if(A&1){f=Fb()|0;break}o=0;Xa(133,f|0,c[u>>2]|0);A=o;o=0;if(A&1){A=Fb()|0;cU(f);f=A;break}jj(b,f);f=0;while(1){if((f|0)>=(c[u>>2]|0)){w=50;break}if(c[(c[x>>2]|0)+(f>>>5<<2)>>2]&1<<(f&31)|0?(A=Xd(b)|0,o=0,Xa(134,A|0,f|0),A=o,o=0,A&1):0){w=48;break}f=f+1|0}if((w|0)==48){f=Fb()|0;Sf(b);break}else if((w|0)==50){wj(x);l=v;return}}else w=7}else w=7;while(0);if((w|0)==7)f=Fb()|0;wj(x);Qb(f|0)}function Ri(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;v=l;l=l+48|0;x=v+32|0;w=v+20|0;p=v+16|0;m=v+12|0;n=v;dj(x,58692);h=b+16|0;e=wi(h)|0;o=0;e=fa(115,e|0)|0;u=o;o=0;a:do if(!(u&1)){u=b+12|0;do if((e|0)>=3){e=wi(h)|0;o=0;e=fa(115,e|0)|0;s=o;o=0;if(s&1){q=4;break a}if((e|0)<9){c[u>>2]=8;ej(x,58708)|0;break}e=wi(h)|0;o=0;e=fa(115,e|0)|0;s=o;o=0;if(s&1){q=4;break a}if((e|0)<23){c[u>>2]=10;ej(x,58688)|0;break}else{c[u>>2]=12;ej(x,58684)|0;break}}else{c[u>>2]=6;ej(x,58692)|0}while(0);s=wi(h)|0;o=0;s=fa(116,s|0)|0;k=o;o=0;if(!(k&1)){e=wi(h)|0;o=0;e=fa(111,e|0)|0;k=o;o=0;do if(!(k&1)){f=wi(h)|0;k=b+8|0;if(e){o=0;e=fa(115,f|0)|0;j=o;o=0;if(j&1)break;e=c[4620+(e<<2)>>2]|0;f=c[k>>2]|0;g=c[u>>2]|0;h=wi(h)|0;o=0;h=fa(115,h|0)|0;j=o;o=0;if(j&1)break;j=e-(O(g,f)|0)|0;e=4640+(h<<2)|0}else{o=0;e=fa(115,f|0)|0;j=o;o=0;if(j&1)break;e=c[4660+(e<<2)>>2]|0;f=c[k>>2]|0;g=c[u>>2]|0;h=wi(h)|0;o=0;h=fa(115,h|0)|0;j=o;o=0;if(j&1)break;j=e-(O(g,f)|0)|0;e=4792+(h<<2)|0}i=(c[e>>2]|0)-s|0;o=0;Xa(135,w|0,c[k>>2]|0);h=o;o=0;if(!(h&1)){h=0;b:while(1){if((h|0)<(c[k>>2]|0)){f=1;g=1}else{q=24;break}while(1){if((f|0)>(c[u>>2]|0))break;q=Xd(d)|0;e=c[u>>2]|0;e=j-f+e+(O(e,h)|0)|0;o=0;e=ja(59,q|0,e|0)|0;q=o;o=0;if(q&1){q=31;break b}if(e){o=0;e=ja(60,w|0,h|0)|0;q=o;o=0;if(q&1){q=31;break b}c[e>>2]=(c[e>>2]|0)+g}f=f+1|0;g=g<<1}h=h+1|0}c:do if((q|0)==24){o=0;Xa(136,m|0,x|0);q=o;o=0;d:do if(q&1){e=Hb(728,632)|0;f=z;q=42}else{o=0;Xa(137,p|0,m|0);q=o;o=0;if(q&1){e=Hb(728,632)|0;f=z;gj(m);q=42;break}gj(m);o=0;Xa(138,n|0,w|0);q=o;o=0;do if(!(q&1)){o=0;bb(69,p|0,n|0,i|0);q=o;o=0;if(q&1){e=Hb(728,632)|0;f=z;ij(n);break}else{ij(n);to(p);q=50;break d}}else{e=Hb(728,632)|0;f=z}while(0);to(p);q=42}while(0);do if((q|0)==42){if((f|0)!=(mc(728)|0)){if((f|0)!=(mc(632)|0))break c;Bb(e|0)|0;o=0;La(44);p=o;o=0;if(p&1)break;else{q=50;break}}Bb(e|0)|0;e=Ab(8)|0;o=0;Xa(131,e|0,43077);p=o;o=0;if(p&1){p=Fb()|0;Jb(e|0);e=p}else{o=0;bb(68,e|0,160,61);o=0;e=Fb()|0}o=0;La(44);p=o;o=0;if(!(p&1))break c;p=Gb(0)|0;_g(p)}while(0);if((q|0)==50?(t=b+20|0,c[t>>2]=0,o=0,r=fa(107,24)|0,b=o,o=0,!(b&1)):0){b=O(c[u>>2]|0,s)|0;o=0;Xa(133,r|0,b|0);b=o;o=0;if(b&1){e=Fb()|0;cU(r);break}jj(a,r);m=0;e=0;e:while(1){if((m|0)>=(s|0)){q=72;break}f=c[u>>2]|0;k=0;d=1<=(f|0))break;o=0;f=ja(60,w|0,m|0)|0;r=o;o=0;if(r&1){q=63;break e}j=(c[f>>2]&d|0)==(d|0);f=c[u>>2]|0;i=h^j;do if((g|0)==(f+-1|0)){if(!i){q=61;break e}c[t>>2]=(c[t>>2]|0)+1;g=0;h=0;e=e+1|0}else{h=i?j:h;g=i?1:g+1|0;if(!j)break;b=Xd(a)|0;r=k-e+(O(c[u>>2]|0,m)|0)|0;o=0;Xa(134,b|0,r|0);r=o;o=0;if(r&1){q=65;break e}f=c[u>>2]|0}while(0);k=k+1|0;d=d>>>1}m=m+1|0}do if((q|0)==61){e=Ab(8)|0;o=0;Xa(131,e|0,43096);v=o;o=0;if(v&1){v=Fb()|0;Jb(e|0);e=v;break}else{o=0;bb(68,e|0,160,61);o=0;q=65;break}}else if((q|0)==63)e=Fb()|0;else if((q|0)==72){ij(w);gj(x);l=v;return}while(0);if((q|0)==65)e=Fb()|0;Sf(a);break}e=Fb()|0}else if((q|0)==31)e=Fb()|0;while(0);ij(w);break a}}while(0);e=Fb()|0}else q=4}else q=4;while(0);if((q|0)==4)e=Fb()|0;gj(x);Qb(e|0)}function Si(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;C=l;l=l+48|0;v=C+44|0;D=C+32|0;x=C+16|0;y=C+12|0;z=C+8|0;A=C+4|0;B=C;w=C+20|0;u=c[d+12>>2]|0;u=O(pi(wi(d+16|0)|0)|0,u)|0;u=u-(c[d+20>>2]|0)|0;do if((u|0)>(Dk(Xd(e)|0)|0)){d=Ab(8)|0;o=0;Xa(131,d|0,43052);D=o;o=0;if(D&1){D=Fb()|0;Jb(d|0);d=D;break}else Mb(d|0,160,61)}else{c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[D+(d<<2)>>2]=0;d=d+1|0}r=w+11|0;s=w+4|0;t=w+8|0;g=0;m=0;p=0;i=0;q=0;d=0;a:while(1){if(d){f=57;break}n=q?p:m;f=u-g|0;b:do if(i){if((f|0)<5){f=57;break a}o=0;Xa(129,x|0,e|0);k=o;o=0;if(k&1){f=16;break a}o=0;f=la(73,x|0,g|0,5)|0;k=o;o=0;if(k&1){f=17;break a}Sf(x);d=g+5|0;if(!f){if((u-d|0)<11){f=57;break a}o=0;Xa(129,y|0,e|0);k=o;o=0;if(k&1){f=21;break a}o=0;d=la(73,y|0,d|0,11)|0;k=o;o=0;if(k&1){f=22;break a}Sf(y);f=d+31|0;d=g+16|0}h=0;g=d;while(1){if((h|0)>=(f|0)){d=0;f=m;h=q;i=0;break b}if((u-g|0)<8){d=1;f=m;h=q;i=0;break b}o=0;Xa(129,z|0,e|0);k=o;o=0;if(k&1){f=30;break a}o=0;d=la(73,z|0,g|0,8)|0;k=o;o=0;if(k&1){f=31;break a}Sf(z);o=0;Xa(139,D|0,d&255|0);k=o;o=0;if(k&1){f=30;break a}h=h+1|0;g=g+8|0}}else{if((m|0)==5){if((f|0)<8){f=57;break a}o=0;Xa(129,A|0,e|0);m=o;o=0;if(m&1){f=16;break a}o=0;d=la(73,A|0,g|0,8)|0;m=o;o=0;if(m&1){f=37;break a}Sf(A);o=0;Xa(139,D|0,d&255|0);m=o;o=0;if(m&1){f=16;break a}else{d=0;f=5;h=q;i=0;g=g+8|0;break}}d=(m|0)==3?4:5;if((f|0)<(d|0)){f=57;break a}o=0;Xa(129,B|0,e|0);k=o;o=0;if(k&1){f=50;break a}o=0;f=la(73,B|0,g|0,d|0)|0;k=o;o=0;if(k&1){f=51;break a}Sf(B);g=d+g|0;k=Ji(m,f)|0;c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;h=Uh(k)|0;if(h>>>0>4294967279){f=42;break a}if(h>>>0<11){a[r>>0]=h;d=w}else{f=h+16&-16;o=0;d=fa(107,f|0)|0;j=o;o=0;if(j&1){f=52;break a}c[w>>2]=d;c[t>>2]=f|-2147483648;c[s>>2]=h}_i(d,k,h)|0;a[v>>0]=0;ah(d+h|0,v);d=a[r>>0]|0;f=d<<24>>24<0;h=c[s>>2]|0;i=f?c[w>>2]|0:w;j=Uh(43071)|0;if((j|0)!=0?(h=i+(f?h:d&255)|0,j=$i(i,h,43071,43071+j|0)|0,(j|0)==(h|0)|(j-i|0)==-1):0){k=a[r>>0]|0;j=k<<24>>24<0;o=0;la(74,D|0,(j?c[w>>2]|0:w)|0,(j?c[s>>2]|0:k&255)|0)|0;k=o;o=0;if(k&1){f=53;break a}else{f=m;h=q;i=0}}else{m=a[k+5>>0]|0;f=Ii(m)|0;i=(a[k+6>>0]|0)==83;h=q|i;i=m<<24>>24==66&i}pU(w);d=0}while(0);m=q?p:f;p=n;q=h&(q^1)}switch(f|0){case 16:{d=Fb()|0;break}case 17:{d=Fb()|0;Sf(x);break}case 21:{d=Fb()|0;break}case 22:{d=Fb()|0;Sf(y);break}case 30:{d=Fb()|0;break}case 31:{d=Fb()|0;Sf(z);break}case 37:{d=Fb()|0;Sf(A);break}case 42:{o=0;Na(320,w|0);o=0;f=52;break}case 50:{d=Fb()|0;break}case 51:{d=Fb()|0;Sf(B);break}case 53:{d=Fb()|0;pU(w);break}case 57:{o=0;d=fa(107,20)|0;B=o;o=0;if(B&1){d=Fb()|0;break}o=0;Xa(140,d|0,D|0);B=o;o=0;if(B&1){C=Fb()|0;cU(d);d=C;break}else{aj(b,d);pU(D);l=C;return}}}if((f|0)==52)d=Fb()|0;pU(D)}while(0);Qb(d|0)}function Ti(a){a=a|0;return c[a+4>>2]|0}function Ui(a,b){a=a|0;b=b|0;return (c[(Xi(a+12|0,b>>5)|0)>>2]&1<<(b&31)|0)!=0|0}function Vi(a,b){a=a|0;b=b|0;c[a>>2]=0;Wi(a,b);return}function Wi(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Xi(a,b){a=a|0;b=b|0;return Ye(c[a+8>>2]|0,b)|0}function Yi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=c+b|0;c=b;b=0;while(1){if((c|0)>=(d|0))break;e=(Ui(Xd(a)|0,c)|0)&1|b<<1;c=c+1|0;b=e}return b|0}function Zi(a,b){a=a|0;b=b|0;BU(a,b);return}function _i(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)wW(a|0,b|0,c|0)|0;return a|0}function $i(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j;g=e-d|0;if(g){h=c;if((h-b|0)<(g|0))b=c;else{a[i>>0]=a[d>>0]|0;f=1-g|0;while(1){e=h-b|0;if((e|0)<(g|0)){b=c;break}b=bj(b,f+e|0,i)|0;if(!b){b=c;break}if(!(cj(b,d,g)|0))break;b=b+1|0}}}l=j;return b|0}function aj(a,b){a=a|0;b=b|0;c[a>>2]=0;Nh(a,b);return}function bj(b,c,d){b=b|0;c=c|0;d=d|0;if(!c)b=0;else b=$I(b,bh(a[d>>0]|0)|0,c)|0;return b|0}function cj(a,b,c){a=a|0;b=b|0;c=c|0;if(!c)a=0;else a=OI(a,b,c)|0;return a|0}function dj(a,b){a=a|0;b=b|0;c[a>>2]=0;tj(a,c[b>>2]|0);return}function ej(a,b){a=a|0;b=b|0;tj(a,c[b>>2]|0);return a|0}function fj(a,b){a=a|0;b=b|0;var d=0,e=0;cf(a);c[a>>2]=4932;c[a+8>>2]=0;o=0;d=fa(107,20)|0;e=o;o=0;do if(!(e&1)){o=0;Xa(141,d|0,b|0);e=o;o=0;if(e&1){b=Fb()|0;cU(d);break}else{lj(a,d);return}}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function gj(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function hj(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=4932;c[a+8>>2]=0;lj(a,c[b+8>>2]|0);return}function ij(a){a=a|0;var b=0,d=0;c[a>>2]=4932;b=a+8|0;d=c[b>>2]|0;if(d|0)af(d);c[b>>2]=0;ff(a);return}function jj(a,b){a=a|0;b=b|0;c[a>>2]=0;sf(a,b);return}function kj(a){a=a|0;ij(a);cU(a);return}function lj(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;a=a+8|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function mj(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;cf(a);c[a>>2]=4948;c[e>>2]=0;o=0;bb(70,a+8|0,b|0,e|0);b=o;o=0;if(b&1){e=Fb()|0;ff(a);Qb(e|0)}else{l=d;return}}function nj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;c[a>>2]=0;g=a+4|0;c[g>>2]=0;c[a+8>>2]=0;if(b|0){o=0;Xa(142,a|0,b|0);f=o;o=0;if(f&1){g=Fb()|0;pj(a);Qb(g|0)}e=c[g>>2]|0;a=b;f=e;while(1){c[f>>2]=c[d>>2];a=a+-1|0;if(!a)break;else f=f+4|0}c[g>>2]=e+(b<<2)}return}function oj(a,b){a=a|0;b=b|0;var d=0;if((qj(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function pj(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-4|0;c[a>>2]=e;b=e}cU(d)}return}function qj(a){a=a|0;return 1073741823}function rj(a){a=a|0;c[a>>2]=4948;pj(a+8|0);ff(a);return}function sj(a){a=a|0;rj(a);cU(a);return}function tj(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function uj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;c[a>>2]=0;e=a+4|0;c[e>>2]=0;c[a+8>>2]=0;if(b|0){zj(a,b);g=c[e>>2]|0;c[e>>2]=g+b;c[d>>2]=(c[a>>2]|0)+(g>>>5<<2);c[d+4>>2]=g&31;Aj(d,b)}l=f;return}function vj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;yj(a);c[a>>2]=c[b>>2];e=b+4|0;c[a+4>>2]=c[e>>2];d=b+8|0;c[a+8>>2]=c[d>>2];c[b>>2]=0;c[e>>2]=0;c[d>>2]=0;return}function wj(a){a=a|0;a=c[a>>2]|0;if(a|0)cU(a);return}function xj(a,b,d){a=a|0;b=b|0;d=d|0;return (c[(Xi(a+20|0,(O(c[a+16>>2]|0,d)|0)+(b>>5)|0)|0)>>2]&1<<(b&31)|0)!=0|0}function yj(a){a=a|0;var b=0;b=c[a>>2]|0;if(b|0){cU(b);c[a>>2]=0;c[a+8>>2]=0;c[a+4>>2]=0}return}function zj(a,b){a=a|0;b=b|0;if((Bj(a)|0)>>>0>>0)wS(a);else{b=((b+-1|0)>>>5)+1|0;c[a>>2]=aU(b<<2)|0;c[a+4>>2]=0;c[a+8>>2]=b;return}}function Aj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=c[a+4>>2]|0;if(!d){e=a;d=c[a>>2]|0}else{g=32-d|0;e=g>>>0>b>>>0?b:g;f=c[a>>2]|0;c[f>>2]=c[f>>2]&~(-1>>>(g-e|0)&-1<>2]=d;b=b-e|0;e=a}a=b>>>5;yW(d|0,0,a<<2|0)|0;b=b-(a<<5)|0;if(b|0){g=(c[e>>2]|0)+(a<<2)|0;c[e>>2]=g;c[g>>2]=c[g>>2]&~(-1>>>(32-b|0))}return}function Bj(a){a=a|0;return 2147483647}function Cj(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=4020;o=0;Xa(128,a+8|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else{c[a+16>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;return}}function Dj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;j=l;l=l+96|0;v=j+92|0;t=j+80|0;e=j+64|0;f=j+48|0;s=j+68|0;g=j+36|0;r=j+60|0;q=j+32|0;m=j+28|0;k=j+24|0;i=j+20|0;h=j+16|0;n=j+12|0;p=j;Ej(v,d);o=0;Xa(143,e|0,v|0);w=o;o=0;do if(w&1)e=Fb()|0;else{o=0;bb(71,t|0,d|0,e|0);w=o;o=0;if(w&1){w=Fb()|0;Hj(e);e=w;break}Hj(e);o=0;Xa(144,f|0,t|0);w=o;o=0;do if(!(w&1)){o=0;Xa(145,d|0,f|0);w=o;o=0;if(w&1){e=Fb()|0;Kj(f);break}Kj(f);o=0;Xa(144,g|0,t|0);w=o;o=0;if(!(w&1)){o=0;bb(72,s|0,d|0,g|0);w=o;o=0;if(w&1){e=Fb()|0;Kj(g);break}Kj(g);o=0;Xa(128,q|0,d+8|0);w=o;o=0;a:do if(w&1)e=Fb()|0;else{f=d+28|0;o=0;e=ja(55,s|0,(c[f>>2]|0)%4|0|0)|0;w=o;o=0;if(!(w&1)?(o=0,Xa(117,m|0,e|0),w=o,o=0,!(w&1)):0){o=0;e=ja(55,s|0,((c[f>>2]|0)+3|0)%4|0|0)|0;w=o;o=0;if(!(w&1)?(o=0,Xa(117,k|0,e|0),w=o,o=0,!(w&1)):0){o=0;e=ja(55,s|0,((c[f>>2]|0)+2|0)%4|0|0)|0;w=o;o=0;if(!(w&1)?(o=0,Xa(117,i|0,e|0),w=o,o=0,!(w&1)):0){o=0;e=ja(55,s|0,((c[f>>2]|0)+1|0)%4|0|0)|0;w=o;o=0;do if(w&1)u=32;else{o=0;Xa(117,h|0,e|0);w=o;o=0;if(w&1){u=32;break}o=0;nb(43,r|0,d|0,q|0,m|0,k|0,i|0,h|0);w=o;o=0;if(w&1){e=Fb()|0;fi(h);break}fi(h);fi(i);fi(k);fi(m);de(q);o=0;g=fa(107,36)|0;w=o;o=0;b:do if(w&1)e=Fb()|0;else{o=0;Xa(128,n|0,r|0);w=o;o=0;do if(!(w&1)){o=0;Xa(96,p|0,s|0);w=o;o=0;if(w&1){e=Fb()|0;de(n);break}o=0;jb(51,g|0,n|0,p|0,(a[d+12>>0]|0)!=0|0,c[d+20>>2]|0,c[d+16>>2]|0);w=o;o=0;do if(w&1)f=1;else{o=0;Xa(125,b|0,g|0);w=o;o=0;if(w&1){f=0;break}Qe(p);de(n);de(r);Qe(s);Kj(t);Hj(v);l=j;return}while(0);e=Fb()|0;Qe(p);de(n);if(!f)break b}else e=Fb()|0;while(0);cU(g)}while(0);de(r);break a}while(0);if((u|0)==32)e=Fb()|0;fi(i)}else e=Fb()|0;fi(k)}else e=Fb()|0;fi(m)}else e=Fb()|0;de(q)}while(0);Qe(s)}else u=25}else u=25;while(0);if((u|0)==25)e=Fb()|0;Kj(t)}while(0);Hj(v);Qb(e|0)}function Ej(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0.0,h=0.0,i=0.0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,A=0.0,B=0.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.0,Q=0,R=0,S=0,T=0,U=0,V=0;Q=l;l=l+176|0;V=Q+168|0;U=Q+164|0;T=Q+160|0;S=Q+156|0;e=Q+144|0;D=Q+108|0;k=Q+104|0;q=Q+100|0;r=Q+96|0;s=Q+92|0;t=Q+88|0;u=Q+84|0;v=Q+44|0;w=Q+40|0;x=Q+36|0;K=Q+48|0;E=Q+32|0;G=Q+28|0;H=Q+24|0;I=Q+20|0;J=Q+16|0;L=Q+12|0;M=Q+8|0;N=Q+4|0;O=Q;bi(V,0);o=0;Xa(116,U|0,0);R=o;o=0;if(R&1)d=Fb()|0;else{o=0;Xa(116,T|0,0);R=o;o=0;if(R&1)d=Fb()|0;else{o=0;Xa(116,S|0,0);R=o;o=0;if(R&1)d=Fb()|0;else{C=b+8|0;F=mc(488)|0;o=0;Xa(128,k|0,C|0);R=o;o=0;a:do if(R&1){e=Gb(488)|0;j=z;R=19}else{o=0;Xa(146,D|0,k|0);R=o;o=0;do if(R&1){e=Gb(488)|0;j=z}else{o=0;Xa(147,e|0,D|0);R=o;o=0;if(R&1){e=Gb(488)|0;j=z;wk(D);break}wk(D);de(k);o=0;ja(58,V|0,c[e>>2]|0)|0;R=o;o=0;if(((!(R&1)?(o=0,ja(58,U|0,(c[e>>2]|0)+4|0)|0,R=o,o=0,!(R&1)):0)?(o=0,ja(58,T|0,(c[e>>2]|0)+8|0)|0,R=o,o=0,!(R&1)):0)?(o=0,ja(58,S|0,(c[e>>2]|0)+12|0)|0,R=o,o=0,!(R&1)):0){ak(e);R=41;break a}R=Gb(488)|0;j=z;ak(e);e=R;R=21;break a}while(0);de(k);R=19}while(0);if((R|0)==19)R=21;b:do if((R|0)==21)if((j|0)==(F|0)){Bb(e|0)|0;e=be(C)|0;o=0;e=fa(113,e|0)|0;p=o;o=0;c:do if(p&1)e=Fb()|0;else{n=(e|0)/2|0;e=be(C)|0;o=0;e=fa(114,e|0)|0;p=o;o=0;if(p&1){e=Fb()|0;break}j=(e|0)/2|0;o=0;e=fa(107,16)|0;p=o;o=0;if(p&1)e=Fb()|0;else{m=n+7|0;p=j+-7|0;mk(e,m,p);nk(r,e);o=0;jb(52,q|0,b|0,r|0,0,1,-1);k=o;o=0;if(k&1)e=Fb()|0;else{k=Nj(q)|0;o=0;Xa(148,D|0,k|0);k=o;o=0;do if(k&1)e=Fb()|0;else{o=0;ja(58,V|0,D|0)|0;k=o;o=0;if(k&1){e=Fb()|0;fi(D);break}fi(D);Hj(q);Hj(r);o=0;e=fa(107,16)|0;r=o;o=0;if(r&1)e=Fb()|0;else{k=j+7|0;mk(e,m,k);nk(t,e);o=0;jb(52,s|0,b|0,t|0,0,1,1);r=o;o=0;if(r&1)e=Fb()|0;else{r=Nj(s)|0;o=0;Xa(148,D|0,r|0);r=o;o=0;do if(r&1)e=Fb()|0;else{o=0;ja(58,U|0,D|0)|0;r=o;o=0;if(r&1){e=Fb()|0;fi(D);break}fi(D);Hj(s);Hj(t);o=0;e=fa(107,16)|0;t=o;o=0;if(t&1)e=Fb()|0;else{j=n+-7|0;mk(e,j,k);nk(v,e);o=0;jb(52,u|0,b|0,v|0,0,-1,-1);t=o;o=0;if(t&1)e=Fb()|0;else{t=Nj(u)|0;o=0;Xa(148,D|0,t|0);t=o;o=0;do if(t&1)e=Fb()|0;else{o=0;ja(58,T|0,D|0)|0;t=o;o=0;if(t&1){e=Fb()|0;fi(D);break}fi(D);Hj(u);Hj(v);o=0;e=fa(107,16)|0;v=o;o=0;if(v&1)e=Fb()|0;else{mk(e,j,p);nk(x,e);o=0;jb(52,w|0,b|0,x|0,0,-1,-1);v=o;o=0;if(v&1)e=Fb()|0;else{v=Nj(w)|0;o=0;Xa(148,D|0,v|0);v=o;o=0;do if(!(v&1)){o=0;ja(58,S|0,D|0)|0;v=o;o=0;if(!(v&1)){fi(D);Hj(w);Hj(x);o=0;La(44);R=o;o=0;if(R&1){R=88;break b}else{R=41;break b}}else{e=Fb()|0;fi(D);break}}else e=Fb()|0;while(0);Hj(w)}Hj(x)}break c}while(0);Hj(u)}Hj(v)}break c}while(0);Hj(s)}Hj(t)}break c}while(0);Hj(q)}Hj(r)}}while(0);o=0;La(44);Q=o;o=0;if(Q&1)R=158;else d=e}else d=e;while(0);d:do if((R|0)==41){x=Pe(V)|0;o=0;f=+X(c[(c[x>>2]|0)+8>>2]|0,x|0);x=o;o=0;if(((!(x&1)?(x=Pe(S)|0,o=0,g=+X(c[(c[x>>2]|0)+8>>2]|0,x|0),x=o,o=0,!(x&1)):0)?(x=Pe(U)|0,o=0,h=+X(c[(c[x>>2]|0)+8>>2]|0,x|0),x=o,o=0,!(x&1)):0)?(x=Pe(T)|0,o=0,i=+X(c[(c[x>>2]|0)+8>>2]|0,x|0),x=o,o=0,!(x&1)):0){n=Qj((f+g+h+i)*.25)|0;x=Pe(V)|0;o=0;f=+X(c[(c[x>>2]|0)+12>>2]|0,x|0);x=o;o=0;if(((!(x&1)?(x=Pe(S)|0,o=0,y=+X(c[(c[x>>2]|0)+12>>2]|0,x|0),x=o,o=0,!(x&1)):0)?(x=Pe(U)|0,o=0,A=+X(c[(c[x>>2]|0)+12>>2]|0,x|0),x=o,o=0,!(x&1)):0)?(x=Pe(T)|0,o=0,B=+X(c[(c[x>>2]|0)+12>>2]|0,x|0),x=o,o=0,!(x&1)):0){k=Qj((f+y+A+B)*.25)|0;o=0;Xa(128,E|0,C|0);R=o;o=0;e:do if(R&1){e=Gb(488)|0;j=z;R=94}else{o=0;hb(48,K|0,E|0,15,n|0,k|0);R=o;o=0;do if(R&1){e=Gb(488)|0;j=z}else{o=0;Xa(147,D|0,K|0);R=o;o=0;if(R&1){e=Gb(488)|0;j=z;wk(K);break}wk(K);de(E);o=0;ja(58,V|0,c[D>>2]|0)|0;R=o;o=0;do if(!(R&1)){o=0;ja(58,U|0,(c[D>>2]|0)+4|0)|0;R=o;o=0;if(R&1)break;o=0;ja(58,T|0,(c[D>>2]|0)+8|0)|0;R=o;o=0;if(R&1)break;o=0;ja(58,S|0,(c[D>>2]|0)+12|0)|0;R=o;o=0;if(R&1)break;ak(D);R=114;break e}while(0);e=Gb(488)|0;j=z;ak(D);R=96;break e}while(0);de(E);R=94}while(0);if((R|0)==94)R=96;f:do if((R|0)==96){if((j|0)!=(F|0)){d=e;break d}Bb(e|0)|0;o=0;e=fa(107,16)|0;F=o;o=0;g:do if(F&1){e=Fb()|0;R=130}else{j=n+7|0;m=k+-7|0;mk(e,j,m);nk(H,e);o=0;jb(52,G|0,b|0,H|0,0,1,-1);F=o;o=0;if(F&1)e=Fb()|0;else{F=Nj(G)|0;o=0;Xa(148,K|0,F|0);F=o;o=0;do if(F&1)e=Fb()|0;else{o=0;ja(58,V|0,K|0)|0;F=o;o=0;if(F&1){e=Fb()|0;fi(K);break}fi(K);Hj(G);Hj(H);o=0;e=fa(107,16)|0;H=o;o=0;if(H&1)e=Fb()|0;else{k=k+7|0;mk(e,j,k);nk(J,e);o=0;jb(52,I|0,b|0,J|0,0,1,1);H=o;o=0;if(H&1)e=Fb()|0;else{H=Nj(I)|0;o=0;Xa(148,K|0,H|0);H=o;o=0;do if(H&1)e=Fb()|0;else{o=0;ja(58,U|0,K|0)|0;H=o;o=0;if(H&1){e=Fb()|0;fi(K);break}fi(K);Hj(I);Hj(J);o=0;e=fa(107,16)|0;J=o;o=0;if(J&1)e=Fb()|0;else{j=n+-7|0;mk(e,j,k);nk(M,e);o=0;jb(52,L|0,b|0,M|0,0,-1,1);J=o;o=0;if(J&1)e=Fb()|0;else{J=Nj(L)|0;o=0;Xa(148,K|0,J|0);J=o;o=0;do if(J&1)e=Fb()|0;else{o=0;ja(58,T|0,K|0)|0;J=o;o=0;if(J&1){e=Fb()|0;fi(K);break}fi(K);Hj(L);Hj(M);o=0;e=fa(107,16)|0;M=o;o=0;if(M&1)e=Fb()|0;else{mk(e,j,m);nk(O,e);o=0;jb(52,N|0,b|0,O|0,0,-1,-1);M=o;o=0;if(M&1)e=Fb()|0;else{M=Nj(N)|0;o=0;Xa(148,K|0,M|0);M=o;o=0;do if(!(M&1)){o=0;ja(58,S|0,K|0)|0;M=o;o=0;if(!(M&1)){fi(K);Hj(N);Hj(O);o=0;La(44);O=o;o=0;if(O&1)break f;else{R=114;break f}}else{e=Fb()|0;fi(K);break}}else e=Fb()|0;while(0);Hj(N)}Hj(O)}break g}while(0);Hj(L)}Hj(M)}break g}while(0);Hj(I)}Hj(J)}break g}while(0);Hj(G)}Hj(H);R=130}while(0);o=0;La(44);Q=o;o=0;if(Q&1){R=158;break d}else{d=e;break d}}while(0);do if((R|0)==114?(O=Pe(V)|0,o=0,P=+X(c[(c[O>>2]|0)+8>>2]|0,O|0),O=o,o=0,!(O&1)):0){O=Pe(S)|0;o=0;f=+X(c[(c[O>>2]|0)+8>>2]|0,O|0);O=o;o=0;if(O&1)break;O=Pe(U)|0;o=0;g=+X(c[(c[O>>2]|0)+8>>2]|0,O|0);O=o;o=0;if(O&1)break;O=Pe(T)|0;o=0;h=+X(c[(c[O>>2]|0)+8>>2]|0,O|0);O=o;o=0;if(O&1)break;j=Qj((P+f+g+h)*.25)|0;O=Pe(V)|0;o=0;f=+X(c[(c[O>>2]|0)+12>>2]|0,O|0);O=o;o=0;if(O&1)break;O=Pe(S)|0;o=0;g=+X(c[(c[O>>2]|0)+12>>2]|0,O|0);O=o;o=0;if(O&1)break;O=Pe(U)|0;o=0;h=+X(c[(c[O>>2]|0)+12>>2]|0,O|0);O=o;o=0;if(O&1)break;O=Pe(T)|0;o=0;i=+X(c[(c[O>>2]|0)+12>>2]|0,O|0);O=o;o=0;if(O&1)break;d=Qj((f+g+h+i)*.25)|0;o=0;e=fa(107,16)|0;O=o;o=0;if(O&1)break;mk(e,j,d);nk(a,e);fi(S);fi(T);fi(U);fi(V);l=Q;return}while(0);d=Fb()|0;break}d=Fb()|0}else R=88}while(0);if((R|0)==88)d=Fb()|0;else if((R|0)==158){R=Gb(0)|0;_g(R)}fi(S)}fi(T)}fi(U)}fi(V);Qb(d|0)}function Fj(a,b){a=a|0;b=b|0;c[a>>2]=0;sk(a,c[b>>2]|0);return}function Gj(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.0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0.0,I=0.0;A=l;l=l+80|0;G=A+76|0;F=A+72|0;E=A+68|0;D=A+64|0;B=A+60|0;r=A+52|0;z=A+56|0;i=A+44|0;y=A+48|0;j=A+36|0;x=A+40|0;m=A+32|0;u=A+28|0;s=A+24|0;n=A+20|0;p=A+16|0;w=A+12|0;v=A+8|0;t=A+4|0;q=A;Fj(G,e);o=0;Xa(143,F|0,e|0);h=o;o=0;if(h&1)e=Fb()|0;else{o=0;Xa(143,E|0,e|0);h=o;o=0;if(h&1)e=Fb()|0;else{o=0;Xa(143,D|0,e|0);h=o;o=0;if(h&1)e=Fb()|0;else{h=d+24|0;f=1;e=1;a:while(1){c[h>>2]=e;if((e|0)>=9){C=58;break}o=0;Xa(143,r|0,G|0);g=o;o=0;if(g&1){C=29;break}o=0;jb(52,B|0,d|0,r|0,f|0,1,-1);g=o;o=0;if(g&1){C=30;break}Hj(r);o=0;Xa(143,i|0,F|0);g=o;o=0;if(g&1){C=31;break}o=0;jb(52,z|0,d|0,i|0,f|0,1,1);g=o;o=0;if(g&1){C=32;break}Hj(i);o=0;Xa(143,j|0,E|0);g=o;o=0;if(g&1){C=33;break}o=0;jb(52,y|0,d|0,j|0,f|0,-1,1);g=o;o=0;if(g&1){C=34;break}Hj(j);o=0;Xa(143,m|0,D|0);g=o;o=0;if(g&1){C=35;break}o=0;jb(52,x|0,d|0,m|0,f|0,-1,-1);g=o;o=0;if(g&1){C=36;break}Hj(m);do if((c[h>>2]|0)>2){o=0;Xa(143,u|0,x|0);g=o;o=0;if(g&1){C=37;break a}o=0;Xa(143,s|0,B|0);g=o;o=0;if(g&1){C=38;break a}k=+fk(u,s);k=k*+(c[h>>2]|0);o=0;Xa(143,n|0,D|0);g=o;o=0;if(g&1){C=39;break a}o=0;Xa(143,p|0,G|0);g=o;o=0;if(g&1){C=40;break a}H=+fk(n,p);k=k/(H*+((c[h>>2]|0)+2|0));Hj(p);Hj(n);Hj(s);Hj(u);if(k<.75|k>1.25){g=0;break}o=0;Xa(143,w|0,B|0);g=o;o=0;if(g&1){C=43;break a}o=0;Xa(143,v|0,z|0);g=o;o=0;if(g&1){C=44;break a}o=0;Xa(143,t|0,y|0);g=o;o=0;if(g&1){C=45;break a}o=0;Xa(143,q|0,x|0);g=o;o=0;if(g&1){C=46;break a}o=0;e=va(62,d|0,w|0,v|0,t|0,q|0)|0;g=o;o=0;if(g&1){C=47;break a}Hj(q);Hj(t);Hj(v);Hj(w);if(!e)g=0;else C=51}else C=51;while(0);if((C|0)==51){C=0;lk(G,B)|0;lk(F,z)|0;lk(E,y)|0;lk(D,x)|0;f=f^1;g=1}Hj(x);Hj(y);Hj(z);Hj(B);e=c[h>>2]|0;if(!g){C=58;break}e=e+1|0}b:switch(C|0){case 30:{e=Fb()|0;Hj(r);break}case 31:{e=Fb()|0;C=57;break}case 32:{e=Fb()|0;Hj(i);C=57;break}case 33:{e=Fb()|0;C=56;break}case 34:{e=Fb()|0;Hj(j);C=56;break}case 35:{e=Fb()|0;C=55;break}case 36:{e=Fb()|0;Hj(m);C=55;break}case 37:{e=Fb()|0;C=54;break}case 38:{e=Fb()|0;C=42;break}case 39:{e=Fb()|0;C=41;break}case 40:{e=Fb()|0;Hj(n);C=41;break}case 43:{e=Fb()|0;C=54;break}case 44:{e=Fb()|0;C=50;break}case 45:{e=Fb()|0;C=49;break}case 46:{e=Fb()|0;C=48;break}case 47:{e=Fb()|0;Hj(q);C=48;break}case 58:{switch(e|0){case 7:case 5:break;default:{C=Ab(8)|0;hg(C,43314);o=0;bb(68,C|0,24,58);o=0;C=29;break b}}a[d+12>>0]=(e|0)==5&1;H=1.5/+((e<<1)+-3|0);m=(Oj(Nj(G)|0)|0)-(Oj(Nj(D)|0)|0)|0;n=(Pj(Nj(G)|0)|0)-(Pj(Nj(E)|0)|0)|0;I=H*+(m|0);m=Qj(+(Oj(Nj(E)|0)|0)-I)|0;k=H*+(n|0);n=Qj(+(Pj(Nj(E)|0)|0)-k)|0;f=Qj(I+ +(Oj(Nj(G)|0)|0))|0;g=Qj(k+ +(Pj(Nj(G)|0)|0))|0;p=(Oj(Nj(F)|0)|0)-(Oj(Nj(D)|0)|0)|0;q=(Pj(Nj(F)|0)|0)-(Pj(Nj(D)|0)|0)|0;k=H*+(p|0);p=Qj(+(Oj(Nj(D)|0)|0)-k)|0;H=H*+(q|0);q=Qj(+(Pj(Nj(D)|0)|0)-H)|0;h=Qj(k+ +(Oj(Nj(F)|0)|0))|0;i=Qj(H+ +(Pj(Nj(F)|0)|0))|0;o=0;e=la(75,d|0,f|0,g|0)|0;z=o;o=0;do if(!(z&1)){if(e){o=0;e=la(75,d|0,h|0,i|0)|0;z=o;o=0;if(z&1)break;if(e){o=0;e=la(75,d|0,m|0,n|0)|0;z=o;o=0;if(z&1)break;if(e){o=0;e=la(75,d|0,p|0,q|0)|0;d=o;o=0;if(d&1)break;if(e){c[b>>2]=0;j=b+4|0;c[j>>2]=0;c[b+8>>2]=0;o=0;e=fa(107,16)|0;d=o;o=0;c:do if(d&1){e=Fb()|0;C=93}else{mk(e,f,g);nk(B,e);e=c[j>>2]|0;f=b+8|0;do if(e>>>0>=(c[f>>2]|0)>>>0){o=0;Xa(149,b|0,B|0);d=o;o=0;if(d&1)C=92}else{o=0;Xa(143,e|0,B|0);d=o;o=0;if(d&1){C=92;break}c[j>>2]=(c[j>>2]|0)+4}while(0);if((C|0)==92){e=Fb()|0;Hj(B);C=93;break}Hj(B);o=0;e=fa(107,16)|0;d=o;o=0;do if(d&1)e=Fb()|0;else{mk(e,h,i);nk(B,e);e=c[j>>2]|0;do if(e>>>0>=(c[f>>2]|0)>>>0){o=0;Xa(149,b|0,B|0);d=o;o=0;if(d&1)C=95}else{o=0;Xa(143,e|0,B|0);d=o;o=0;if(d&1){C=95;break}c[j>>2]=(c[j>>2]|0)+4}while(0);if((C|0)==95){e=Fb()|0;Hj(B);break}Hj(B);o=0;e=fa(107,16)|0;d=o;o=0;do if(d&1)e=Fb()|0;else{mk(e,m,n);nk(B,e);e=c[j>>2]|0;do if(e>>>0>=(c[f>>2]|0)>>>0){o=0;Xa(149,b|0,B|0);d=o;o=0;if(d&1)C=98}else{o=0;Xa(143,e|0,B|0);d=o;o=0;if(d&1){C=98;break}c[j>>2]=(c[j>>2]|0)+4}while(0);if((C|0)==98){e=Fb()|0;Hj(B);break}Hj(B);o=0;e=fa(107,16)|0;d=o;o=0;do if(!(d&1)){mk(e,p,q);nk(B,e);e=c[j>>2]|0;do if(e>>>0>=(c[f>>2]|0)>>>0){o=0;Xa(149,b|0,B|0);C=o;o=0;if(C&1)C=101;else C=90}else{o=0;Xa(143,e|0,B|0);C=o;o=0;if(C&1){C=101;break}c[j>>2]=(c[j>>2]|0)+4;C=90}while(0);if((C|0)==90){Hj(B);Hj(D);Hj(E);Hj(F);Hj(G);l=A;return}else if((C|0)==101){e=Fb()|0;Hj(B);break}}else e=Fb()|0;while(0);break c}while(0);break c}while(0)}while(0);Kj(b);break b}}}}B=Ab(8)|0;hg(B,43352);o=0;bb(68,B|0,24,58);o=0}while(0);e=Fb()|0;break}}if((C|0)==29)e=Fb()|0;else if((C|0)==41){Hj(s);C=42}else if((C|0)==48){Hj(t);C=49}if((C|0)==42){Hj(u);C=54}else if((C|0)==49){Hj(v);C=50}if((C|0)==50){Hj(w);C=54}if((C|0)==54){Hj(x);C=55}if((C|0)==55){Hj(y);C=56}if((C|0)==56){Hj(z);C=57}if((C|0)==57)Hj(B);Hj(D)}Hj(E)}Hj(F)}Hj(G);Qb(e|0)}function Hj(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Ij(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;d=b+4|0;e=(c[d>>2]|0)-(c[b>>2]|0)>>2;do if(e|0){o=0;Xa(150,a|0,e|0);f=o;o=0;if(!(f&1)?(o=0,db(74,a|0,c[b>>2]|0,c[d>>2]|0,e|0),f=o,o=0,!(f&1)):0)break;f=Fb()|0;Kj(a);Qb(f|0)}while(0);return}function Jj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;s=l;l=l+64|0;y=s+60|0;k=s+56|0;h=s+44|0;x=s+52|0;m=s+36|0;i=s+28|0;w=s+48|0;n=s+20|0;e=s+16|0;v=s+40|0;j=s+12|0;f=s+8|0;u=s+32|0;t=s+24|0;q=s+4|0;r=s;p=c[b+24>>2]<<1;Fj(k,c[d>>2]|0);o=0;Xa(143,h|0,(c[d>>2]|0)+4|0);g=o;o=0;do if(g&1){d=Fb()|0;z=18}else{g=p|1;o=0;hb(49,y|0,b|0,k|0,h|0,g|0);A=o;o=0;if(A&1){d=Fb()|0;Hj(h);z=18;break}Hj(h);Hj(k);o=0;Xa(143,m|0,(c[d>>2]|0)+4|0);A=o;o=0;a:do if(A&1)d=Fb()|0;else{o=0;Xa(143,i|0,(c[d>>2]|0)+8|0);A=o;o=0;do if(A&1)d=Fb()|0;else{o=0;hb(49,x|0,b|0,m|0,i|0,g|0);A=o;o=0;if(A&1){d=Fb()|0;Hj(i);break}Hj(i);Hj(m);o=0;Xa(143,n|0,(c[d>>2]|0)+8|0);A=o;o=0;b:do if(A&1)d=Fb()|0;else{o=0;Xa(143,e|0,(c[d>>2]|0)+12|0);A=o;o=0;do if(A&1)d=Fb()|0;else{o=0;hb(49,w|0,b|0,n|0,e|0,g|0);A=o;o=0;if(A&1){d=Fb()|0;Hj(e);break}Hj(e);Hj(n);o=0;Xa(143,j|0,(c[d>>2]|0)+12|0);A=o;o=0;c:do if(A&1)d=Fb()|0;else{o=0;Xa(143,f|0,c[d>>2]|0);A=o;o=0;do if(A&1)d=Fb()|0;else{o=0;hb(49,v|0,b|0,j|0,f|0,g|0);A=o;o=0;if(A&1){d=Fb()|0;Hj(f);break}Hj(f);Hj(j);d=Xd(y)|0;o=0;d=ja(59,d|0,0)|0;A=o;o=0;d:do if(A&1)z=31;else{if(d){d=Xd(y)|0;o=0;d=ja(59,d|0,p|0)|0;A=o;o=0;if(A&1){z=31;break}if(d)d=0;else z=32}else z=32;do if((z|0)==32){d=Xd(x)|0;o=0;d=ja(59,d|0,0)|0;A=o;o=0;if(A&1){z=31;break d}if(d){d=Xd(x)|0;o=0;d=ja(59,d|0,p|0)|0;A=o;o=0;if(A&1){z=31;break d}if(d){d=1;break}}d=Xd(w)|0;o=0;d=ja(59,d|0,0)|0;A=o;o=0;if(A&1){z=31;break d}if(d){d=Xd(w)|0;o=0;d=ja(59,d|0,p|0)|0;A=o;o=0;if(A&1){z=31;break d}if(d){d=2;break}}d=Xd(v)|0;o=0;d=ja(59,d|0,0)|0;A=o;o=0;if(A&1){z=31;break d}if(d){d=Xd(v)|0;o=0;d=ja(59,d|0,p|0)|0;A=o;o=0;if(A&1){z=31;break d}if(d){d=3;break}}z=Ab(8)|0;hg(z,43250);o=0;bb(68,z|0,24,58);o=0;z=31;break d}while(0);h=b+28|0;c[h>>2]=d;o=0;d=fa(107,24)|0;A=o;o=0;if(A&1){z=31;break}g=b+12|0;o=0;Xa(133,d|0,(a[g>>0]|0?28:40)|0);A=o;o=0;if(A&1){A=Fb()|0;cU(d);d=A;break}jj(u,d);o=0;d=fa(107,24)|0;A=o;o=0;do if(A&1)d=Fb()|0;else{o=0;Xa(133,d|0,(a[g>>0]|0?28:40)|0);A=o;o=0;if(A&1){A=Fb()|0;cU(d);d=A;break}jj(t,d);e:do if(!(a[g>>0]|0)){f=0;f:while(1){if((f|0)>=11){d=0;break}e=f+2|0;do if((f|0)<5){d=Xd(y)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f|0),A=o,o=0,A&1):0){z=79;break f}d=Xd(x)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+10|0),A=o,o=0,A&1):0){z=79;break f}d=Xd(w)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+20|0),A=o,o=0,A&1):0){z=79;break f}d=Xd(v)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(!d)break;A=Xd(t)|0;o=0;Xa(134,A|0,f+30|0);A=o;o=0;if(A&1){z=79;break f}else z=89}else z=89;while(0);do if((z|0)==89){z=0;if((f|0)<=5)break;d=Xd(y)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+-1|0),A=o,o=0,A&1):0){z=79;break f}d=Xd(x)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+9|0),A=o,o=0,A&1):0){z=79;break f}d=Xd(w)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+19|0),A=o,o=0,A&1):0){z=79;break f}d=Xd(v)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=79;break f}if(!d)break;A=Xd(t)|0;o=0;Xa(134,A|0,f+29|0);A=o;o=0;if(A&1){z=79;break f}}while(0);f=f+1|0}if((z|0)==79){d=Fb()|0;break}while(1){if((d|0)>=40){z=109;break e}e=Xd(t)|0;o=0;e=ja(59,e|0,(((c[h>>2]|0)*10|0)+d|0)%40|0|0)|0;A=o;o=0;if(A&1)break;if(e?(A=Xd(u)|0,o=0,Xa(134,A|0,d|0),A=o,o=0,A&1):0)break;d=d+1|0}d=Fb()|0}else{f=0;while(1){if((f|0)>=7){d=0;break}d=Xd(y)|0;e=f+2|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=57;break}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f|0),A=o,o=0,A&1):0){z=57;break}d=Xd(x)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=57;break}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+7|0),A=o,o=0,A&1):0){z=57;break}d=Xd(w)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=57;break}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+14|0),A=o,o=0,A&1):0){z=57;break}d=Xd(v)|0;o=0;d=ja(59,d|0,e|0)|0;A=o;o=0;if(A&1){z=57;break}if(d?(A=Xd(t)|0,o=0,Xa(134,A|0,f+21|0),A=o,o=0,A&1):0){z=57;break}f=f+1|0}if((z|0)==57){d=Fb()|0;break}while(1){if((d|0)>=28){z=109;break e}e=Xd(t)|0;o=0;e=ja(59,e|0,(((c[h>>2]|0)*7|0)+d|0)%28|0|0)|0;A=o;o=0;if(A&1)break;if(e?(A=Xd(u)|0,o=0,Xa(134,A|0,d|0),A=o,o=0,A&1):0)break;d=d+1|0}d=Fb()|0}while(0);g:do if((z|0)==109){o=0;Xa(129,q|0,u|0);A=o;o=0;do if(!(A&1)){o=0;Xa(151,q|0,(a[g>>0]|0)!=0|0);A=o;o=0;if(A&1){d=Fb()|0;Sf(q);break g}Sf(q);o=0;Xa(129,r|0,u|0);A=o;o=0;if(A&1)break;o=0;Xa(152,b|0,r|0);A=o;o=0;if(A&1){d=Fb()|0;Sf(r);break g}else{Sf(r);Sf(t);Sf(u);Sf(v);Sf(w);Sf(x);Sf(y);l=s;return}}while(0);d=Fb()|0}while(0);Sf(t)}while(0);Sf(u)}while(0);if((z|0)==31)d=Fb()|0;Sf(v);break c}while(0);Hj(j)}while(0);Sf(w);break b}while(0);Hj(n)}while(0);Sf(x);break a}while(0);Hj(m)}while(0);Sf(y)}while(0);if((z|0)==18)Hj(k);Qb(d|0)}function Kj(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Hj(e)}cU(c[a>>2]|0)}return}function Lj(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0.0;r=l;l=l+16|0;q=r;i=c[b+16>>2]|0;t=+(((i|0)>4|i<<1)+((i+-4|0)/8|0)|0)/(+(c[b+24>>2]|0)*2.0);i=Oj(Nj(c[d>>2]|0)|0)|0;i=i-(Oj(Nj((c[d>>2]|0)+8|0)|0)|0)|0;j=Pj(Nj(c[d>>2]|0)|0)|0;j=j-(Pj(Nj((c[d>>2]|0)+8|0)|0)|0)|0;v=t*+(((i|0)>0?1:-1)+i|0);i=Qj(+(Oj(Nj((c[d>>2]|0)+8|0)|0)|0)-v)|0;u=t*+(((j|0)>0?1:-1)+j|0);j=Qj(+(Pj(Nj((c[d>>2]|0)+8|0)|0)|0)-u)|0;e=Qj(v+ +(Oj(Nj(c[d>>2]|0)|0)|0))|0;f=Qj(u+ +(Pj(Nj(c[d>>2]|0)|0)|0))|0;n=Oj(Nj((c[d>>2]|0)+4|0)|0)|0;n=n-(Oj(Nj((c[d>>2]|0)+12|0)|0)|0)|0;p=Pj(Nj((c[d>>2]|0)+4|0)|0)|0;p=p-(Pj(Nj((c[d>>2]|0)+12|0)|0)|0)|0;u=t*+(((n|0)>0?1:-1)+n|0);n=Qj(+(Oj(Nj((c[d>>2]|0)+12|0)|0)|0)-u)|0;t=t*+(((p|0)>0?1:-1)+p|0);p=Qj(+(Pj(Nj((c[d>>2]|0)+12|0)|0)|0)-t)|0;h=Qj(u+ +(Oj(Nj((c[d>>2]|0)+4|0)|0)|0))|0;g=Qj(t+ +(Pj(Nj((c[d>>2]|0)+4|0)|0)|0))|0;if(((Rj(b,e,f)|0?Rj(b,h,g)|0:0)?Rj(b,i,j)|0:0)?Rj(b,n,p)|0:0){k=aU(20)|0;Sj(k);m=Tj(k)|0;d=aU(16)|0;o=0;Pa(42,d|0,+(+(e|0)),+(+(f|0)));f=o;o=0;a:do if(f&1){s=Fb()|0;cU(d);d=s;s=29}else{bi(q,d);b=m+4|0;d=c[b>>2]|0;e=m+8|0;if(d>>>0<(c[e>>2]|0)>>>0){o=0;Xa(117,d|0,q|0);f=o;o=0;if(f&1)s=28;else c[b>>2]=(c[b>>2]|0)+4}else{o=0;Xa(153,m|0,q|0);f=o;o=0;if(f&1)s=28}if((s|0)==28){d=Fb()|0;fi(q);s=29;break}fi(q);d=aU(16)|0;o=0;Pa(42,d|0,+(+(h|0)),+(+(g|0)));h=o;o=0;do if(h&1){r=Fb()|0;cU(d);d=r}else{bi(q,d);d=c[b>>2]|0;if(d>>>0<(c[e>>2]|0)>>>0){o=0;Xa(117,d|0,q|0);h=o;o=0;if(h&1)s=31;else c[b>>2]=(c[b>>2]|0)+4}else{o=0;Xa(153,m|0,q|0);h=o;o=0;if(h&1)s=31}if((s|0)==31){d=Fb()|0;fi(q);break}fi(q);d=aU(16)|0;o=0;Pa(42,d|0,+(+(i|0)),+(+(j|0)));j=o;o=0;do if(j&1){r=Fb()|0;cU(d);d=r}else{bi(q,d);d=c[b>>2]|0;if(d>>>0<(c[e>>2]|0)>>>0){o=0;Xa(117,d|0,q|0);j=o;o=0;if(j&1)s=34;else c[b>>2]=(c[b>>2]|0)+4}else{o=0;Xa(153,m|0,q|0);j=o;o=0;if(j&1)s=34}if((s|0)==34){d=Fb()|0;fi(q);break}fi(q);d=aU(16)|0;o=0;Pa(42,d|0,+(+(n|0)),+(+(p|0)));p=o;o=0;do if(!(p&1)){bi(q,d);d=c[b>>2]|0;if(d>>>0<(c[e>>2]|0)>>>0){o=0;Xa(117,d|0,q|0);s=o;o=0;if(s&1)s=37;else{c[b>>2]=(c[b>>2]|0)+4;s=26}}else{o=0;Xa(153,m|0,q|0);s=o;o=0;if(s&1)s=37;else s=26}if((s|0)==26){fi(q);Vj(a,k);l=r;return}else if((s|0)==37){d=Fb()|0;fi(q);break}}else{r=Fb()|0;cU(d);d=r}while(0);break a}while(0);break a}while(0)}while(0);Qb(d|0)}s=Ab(8)|0;hg(s,43173);Mb(s|0,24,58)}function Mj(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0.0,k=0.0,m=0,n=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0.0,w=0.0,x=0,y=0;y=l;l=l+16|0;u=y+4|0;x=y;m=c[d+16>>2]|0;n=m<<2;do if(!(a[d+12>>0]|0))if((m|0)<5){d=n+15|0;break}else{d=n+17+(((m+-4|0)/8|0)<<1)|0;break}else d=n+11|0;while(0);ki(x,e);j=+(d|0)+-.5;e=Pe(f)|0;o=0;k=+X(c[(c[e>>2]|0)+8>>2]|0,e|0);e=o;o=0;if((((((((!(e&1)?(f=Pe(f)|0,o=0,p=+X(c[(c[f>>2]|0)+12>>2]|0,f|0),f=o,o=0,!(f&1)):0)?(f=Pe(i)|0,o=0,q=+X(c[(c[f>>2]|0)+8>>2]|0,f|0),f=o,o=0,!(f&1)):0)?(i=Pe(i)|0,o=0,r=+X(c[(c[i>>2]|0)+12>>2]|0,i|0),i=o,o=0,!(i&1)):0)?(i=Pe(h)|0,o=0,s=+X(c[(c[i>>2]|0)+8>>2]|0,i|0),i=o,o=0,!(i&1)):0)?(i=Pe(h)|0,o=0,t=+X(c[(c[i>>2]|0)+12>>2]|0,i|0),i=o,o=0,!(i&1)):0)?(i=Pe(g)|0,o=0,v=+X(c[(c[i>>2]|0)+8>>2]|0,i|0),i=o,o=0,!(i&1)):0)?(i=Pe(g)|0,o=0,w=+X(c[(c[i>>2]|0)+12>>2]|0,i|0),i=o,o=0,!(i&1)):0)?(o=0,fb(42,b|0,u|0,x|0,d|0,.5,.5,+j,.5,+j,+j,.5,+j,+k,+p,+q,+r,+s,+t,+v,+w),u=o,o=0,!(u&1)):0){de(x);l=y;return}y=Fb()|0;de(x);Qb(y|0)}function Nj(a){a=a|0;return c[a>>2]|0}function Oj(a){a=a|0;return c[a+8>>2]|0}function Pj(a){a=a|0;return c[a+12>>2]|0}function Qj(a){a=+a;return ~~(a+.5)|0}function Rj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)>-1?(d=a+8|0,(c|0)>0&(Zk(be(d)|0)|0)>(b|0)):0)a=(_k(be(d)|0)|0)>(c|0);else a=0;return a|0}function Sj(a){a=a|0;cf(a);c[a>>2]=4964;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;return}function Tj(a){a=a|0;return a+8|0}function Uj(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;h=l;l=l+32|0;g=h;d=a+4|0;e=((c[d>>2]|0)-(c[a>>2]|0)>>2)+1|0;f=Wj(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Xj(g,k>>2>>>0>>1>>>0?(j>>>0>>0?e:j):f,(c[d>>2]|0)-i>>2,a+8|0);d=g+8|0;o=0;Xa(117,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+4,o=0,Xa(154,a|0,g|0),k=o,o=0,!(k&1)):0){Zj(g);l=h;return}k=Fb()|0;Zj(g);Qb(k|0)}function Vj(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=3516;c[a+8>>2]=0;Ef(a,b);return}function Wj(a){a=a|0;return 1073741823}function Xj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Yj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;di((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function Zj(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;fi(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function _j(a){a=a|0;c[a>>2]=4964;ak(a+8|0);ff(a);return}function $j(a){a=a|0;_j(a);cU(a);return}function ak(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;fi(e)}cU(c[a>>2]|0)}return}function bk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0.0,j=0.0,k=0.0,m=0.0,n=0,p=0;n=l;l=l+16|0;f=n+4|0;g=n;h=aU(24)|0;o=0;Xa(133,h|0,e|0);p=o;o=0;if(p&1){f=Fb()|0;cU(h)}else{jj(a,h);o=0;Xa(143,f|0,c|0);p=o;o=0;do if(!(p&1)){o=0;Xa(143,g|0,d|0);p=o;o=0;if(p&1){p=Fb()|0;Hj(f);f=p;break}k=+fk(f,g);Hj(g);Hj(f);j=k/+(e+-1|0);h=Oj(Nj(d)|0)|0;m=j*+(h-(Oj(Nj(c)|0)|0)|0)/k;h=Pj(Nj(d)|0)|0;k=j*+(h-(Pj(Nj(c)|0)|0)|0)/k;j=+(Oj(Nj(c)|0)|0);h=b+8|0;g=0;i=+(Pj(Nj(c)|0)|0);while(1){if((g|0)>=(e|0)){g=14;break}c=be(h)|0;p=Qj(j)|0;f=Qj(i)|0;o=0;f=la(72,c|0,p|0,f|0)|0;p=o;o=0;if(p&1){g=12;break}if(f?(p=Xd(a)|0,o=0,Xa(134,p|0,g|0),p=o,o=0,p&1):0){g=12;break}g=g+1|0;i=k+i;j=m+j}if((g|0)==12){f=Fb()|0;break}else if((g|0)==14){l=n;return}}else f=Fb()|0;while(0);Sf(a)}Qb(f|0)}function ck(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0;r=l;l=l+32|0;s=r+20|0;p=r+16|0;m=r+12|0;n=r;q=b?2:4;j=b?7:10;k=b?5:6;b=aU(20)|0;o=0;Xa(141,b|0,j|0);h=o;o=0;if(h&1){d=Fb()|0;cU(b)}else{ek(s,b);g=0;a:while(1){if((g|0)>=(j|0)){f=5;break}h=(g<<2)+4|0;e=1;f=1;while(1){if((e|0)>=5)break;b=Xd(a)|0;o=0;b=ja(59,b|0,h-e|0)|0;t=o;o=0;if(t&1){f=13;break a}if(b){o=0;b=ja(60,s|0,g|0)|0;t=o;o=0;if(t&1){f=13;break a}c[b>>2]=(c[b>>2]|0)+f}e=e+1|0;f=f<<1}g=g+1|0}b:do if((f|0)==5){o=0;Xa(136,m|0,58696);t=o;o=0;do if(t&1){b=Gb(728)|0;e=z}else{o=0;Xa(137,p|0,m|0);t=o;o=0;if(t&1){b=Gb(728)|0;e=z;gj(m);break}gj(m);o=0;Xa(138,n|0,s|0);t=o;o=0;do if(!(t&1)){o=0;bb(69,p|0,n|0,k|0);t=o;o=0;if(t&1){b=Gb(728)|0;e=z;ij(n);break}ij(n);to(p);t=Xd(a)|0;o=0;Na(321,t|0);t=o;o=0;if(t&1){d=Fb()|0;break b}else e=0;c:while(1){if((e|0)>=(q|0)){f=28;break}f=(e<<2)+4|0;d=1;b=1;while(1){if((d|0)>=5)break;o=0;g=ja(60,s|0,e|0)|0;t=o;o=0;if(t&1){f=35;break c}if((c[g>>2]&b|0)==(b|0)?(t=Xd(a)|0,o=0,Xa(134,t|0,f-d|0),t=o,o=0,t&1):0){f=35;break c}d=d+1|0;b=b<<1}e=e+1|0}if((f|0)==28){ij(s);l=r;return}else if((f|0)==35){d=Fb()|0;break b}}else{b=Gb(728)|0;e=z}while(0);to(p)}while(0);if((e|0)==(mc(728)|0)){Bb(b|0)|0;b=Ab(8)|0;hg(b,43282);o=0;bb(68,b|0,24,58);o=0;b=Fb()|0;o=0;La(44);t=o;o=0;if(t&1){t=Gb(0)|0;_g(t)}else d=b}else d=b}else if((f|0)==13)d=Fb()|0;while(0);ij(s)}Qb(d|0)}function dk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=b+16|0;c[g>>2]=0;h=b+20|0;c[h>>2]=0;f=(a[b+12>>0]|0)==0;b=f?5:2;e=0;while(1){if((e|0)>=(b|0))break;c[g>>2]=c[g>>2]<<1;if(Ui(Xd(d)|0,e)|0)c[g>>2]=(c[g>>2]|0)+1;e=e+1|0}e=f?16:8;while(1){if((b|0)>=(e|0))break;c[h>>2]=c[h>>2]<<1;if(Ui(Xd(d)|0,b)|0)c[h>>2]=(c[h>>2]|0)+1;b=b+1|0}c[g>>2]=(c[g>>2]|0)+1;c[h>>2]=(c[h>>2]|0)+1;return}function ek(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=4932;c[a+8>>2]=0;lj(a,b);return}function fk(a,b){a=a|0;b=b|0;var c=0,d=0;c=Oj(Nj(a)|0)|0;c=c-(Oj(Nj(b)|0)|0)|0;d=Oj(Nj(a)|0)|0;c=O(d-(Oj(Nj(b)|0)|0)|0,c)|0;d=Pj(Nj(a)|0)|0;d=d-(Pj(Nj(b)|0)|0)|0;a=Pj(Nj(a)|0)|0;return +(+C(+(+((O(a-(Pj(Nj(b)|0)|0)|0,d)|0)+c|0))))}function gk(a,b){a=a|0;b=b|0;var d=0;if((ik(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function hk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;a=a+4|0;while(1){if((b|0)==(d|0))break;Fj(c[a>>2]|0,b);c[a>>2]=(c[a>>2]|0)+4;b=b+4|0}return}function ik(a){a=a|0;return 1073741823}function jk(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=Oj(Nj(c)|0)|0;j=b+8|0;c=Pj(Nj(c)|0)|0;while(1){h=c+f|0;i=g+e|0;if(!(Rj(b,i,h)|0))break;if((xj(be(j)|0,i,h)|0)^d)break;else{g=i;c=h}}while(1){if(!(Rj(b,g,c)|0))break;if((xj(be(j)|0,g,c)|0)^d)break;g=g+e|0}g=g-e|0;while(1){if(!(Rj(b,g,c)|0))break;if((xj(be(j)|0,g,c)|0)^d)break;c=c+f|0}d=aU(16)|0;mk(d,g,c-f|0);nk(a,d);return}function kk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0;q=l;l=l+32|0;g=q+28|0;f=q+24|0;j=q+20|0;h=q+16|0;n=q+12|0;i=q+8|0;p=q+4|0;k=q;m=aU(16)|0;s=(Oj(Nj(b)|0)|0)+-3|0;mk(m,s,(Pj(Nj(b)|0)|0)+3|0);uk(b,m)|0;m=aU(16)|0;s=(Oj(Nj(c)|0)|0)+-3|0;mk(m,s,(Pj(Nj(c)|0)|0)+-3|0);uk(c,m)|0;m=aU(16)|0;s=(Oj(Nj(d)|0)|0)+3|0;mk(m,s,(Pj(Nj(d)|0)|0)+-3|0);uk(d,m)|0;m=aU(16)|0;s=(Oj(Nj(e)|0)|0)+3|0;mk(m,s,(Pj(Nj(e)|0)|0)+3|0);uk(e,m)|0;Fj(g,e);o=0;Xa(143,f|0,b|0);m=o;o=0;a:do if(m&1){b=Fb()|0;r=6}else{o=0;m=la(76,a|0,g|0,f|0)|0;s=o;o=0;if(s&1){b=Fb()|0;Hj(f);r=6;break}Hj(f);Hj(g);b:do if(!m)b=0;else{Fj(j,b);o=0;Xa(143,h|0,c|0);s=o;o=0;do if(s&1)b=Fb()|0;else{o=0;b=la(76,a|0,j|0,h|0)|0;s=o;o=0;if(s&1){b=Fb()|0;Hj(h);break}Hj(h);Hj(j);if((b|0)!=(m|0)){b=0;break b}Fj(n,c);o=0;Xa(143,i|0,d|0);s=o;o=0;do if(s&1)b=Fb()|0;else{o=0;b=la(76,a|0,n|0,i|0)|0;s=o;o=0;if(s&1){b=Fb()|0;Hj(i);break}Hj(i);Hj(n);if((b|0)!=(m|0)){b=0;break b}Fj(p,d);o=0;Xa(143,k|0,e|0);s=o;o=0;do if(!(s&1)){o=0;b=la(76,a|0,p|0,k|0)|0;s=o;o=0;if(s&1){b=Fb()|0;Hj(k);break}else{Hj(k);Hj(p);b=(b|0)==(m|0);break b}}else b=Fb()|0;while(0);Hj(p);break a}while(0);Hj(n);break a}while(0);Hj(j);break a}while(0);l=q;return b|0}while(0);if((r|0)==6)Hj(g);Qb(b|0);return 0}function lk(a,b){a=a|0;b=b|0;sk(a,c[b>>2]|0);return a|0}function mk(a,b,d){a=a|0;b=b|0;d=d|0;cf(a);c[a>>2]=4980;c[a+8>>2]=b;c[a+12>>2]=d;return}function nk(a,b){a=a|0;b=b|0;c[a>>2]=0;sk(a,b);return}function ok(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;h=l;l=l+32|0;g=h;d=a+4|0;e=((c[d>>2]|0)-(c[a>>2]|0)>>2)+1|0;f=ik(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;pk(g,k>>2>>>0>>1>>>0?(j>>>0>>0?e:j):f,(c[d>>2]|0)-i>>2,a+8|0);d=g+8|0;o=0;Xa(143,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+4,o=0,Xa(155,a|0,g|0),k=o,o=0,!(k&1)):0){rk(g);l=h;return}k=Fb()|0;rk(g);Qb(k|0)}function pk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function qk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;Fj((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function rk(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Hj(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function sk(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function tk(a){a=a|0;ff(a);cU(a);return}function uk(a,b){a=a|0;b=b|0;sk(a,b);return a|0}function vk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0,m=0,n=0.0,p=0.0;k=l;l=l+16|0;d=k+4|0;e=k;Fj(d,b);o=0;Xa(143,e|0,c|0);m=o;o=0;if(m&1){m=Fb()|0;Hj(d);Qb(m|0)}j=+fk(d,e);Hj(e);Hj(d);d=Oj(Nj(c)|0)|0;i=+(d-(Oj(Nj(b)|0)|0)|0)/j;d=Pj(Nj(c)|0)|0;h=+(d-(Pj(Nj(b)|0)|0)|0)/j;g=+(Oj(Nj(b)|0)|0);f=+(Pj(Nj(b)|0)|0);a=a+8|0;d=be(a)|0;c=Oj(Nj(b)|0)|0;c=xj(d,c,Pj(Nj(b)|0)|0)|0;d=0;e=0;while(1){if(!(+(d|0).10000000149011612&p<.8999999761581421?0:c^p<=.1?-1:1)|0}function wk(a){a=a|0;c[a>>2]=4996;de(a+8|0);ff(a);return}function xk(a,b){a=a|0;b=b|0;var d=0;d=aU(16)|0;o=0;Pa(42,d|0,+(+(c[b+8>>2]|0)),+(+(c[b+12>>2]|0)));b=o;o=0;if(b&1){b=Fb()|0;cU(d);Qb(b|0)}else{bi(a,d);return}}function yk(a){a=a|0;wk(a);cU(a);return}function zk(a){a=a|0;c[a>>2]=5012;ij(a+12|0);ff(a);return}function Ak(a){a=a|0;zk(a);cU(a);return}function Bk(a){a=a|0;return a+31>>5|0}function Ck(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=5012;c[a+8>>2]=b;b=Bk(b)|0;o=0;Xa(135,a+12|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else return}function Dk(a){a=a|0;return c[a+8>>2]|0}function Ek(a){a=a|0;var b=0,d=0;b=a+12|0;d=Gk(Fk(b)|0)|0;a=0;while(1){if((a|0)>=(d|0))break;c[(Xe(b,a)|0)>>2]=0;a=a+1|0}return}function Fk(a){a=a|0;return c[a+8>>2]|0}function Gk(a){a=a|0;return (c[a+12>>2]|0)-(c[a+8>>2]|0)>>2|0}function Hk(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)<(b|0)){d=Ab(8)|0;o=0;Na(322,d|0);e=o;o=0;if(e&1){e=Fb()|0;Jb(d|0);Qb(e|0)}else Mb(d|0,632,117)}a:do if((d|0)==(b|0))d=1;else{i=d+-1|0;j=b>>5;k=i>>5;h=b&31;i=i&31;g=a+12|0;f=j;while(1){if((f|0)>(k|0)){d=1;break a}d=(f|0)>(j|0)?0:h;a=(f|0)<(k|0)?31:i;b:do if((d|0)==0&(a|0)==31)d=-1;else{b=d;d=0;while(1){if((b|0)>(a|0))break b;l=1<>2]&d;if((l|0)==((e?d:0)|0))f=f+1|0;else{d=0;break}}}while(0);return d|0}function Ik(a){a=a|0;return a+8|0}function Jk(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;e=j;f=a+12|0;fj(e,Gk(Fk(f)|0)|0);g=c[a+8>>2]|0;h=g+-1|0;d=0;while(1){if((g|0)<=(d|0)){i=3;break}o=0;b=ja(59,a|0,h-d|0)|0;k=o;o=0;if(k&1)break;if(b){o=0;b=ja(60,e|0,d>>5|0)|0;k=o;o=0;if(k&1)break;c[b>>2]=c[b>>2]|1<<(d&31)}d=d+1|0}if((i|0)==3?(o=0,ja(61,f|0,e|0)|0,k=o,o=0,!(k&1)):0){ij(e);l=j;return}k=Fb()|0;ij(e);Qb(k|0)}function Kk(a,b){a=a|0;b=b|0;Lk(a,b);return a|0}function Lk(a,b){a=a|0;b=b|0;lj(a,c[b+8>>2]|0);return}function Mk(a,b){a=a|0;b=b|0;_d(a,b);b=Xd(a)|0;o=0;Na(323,b|0);b=o;o=0;if(b&1){b=Fb()|0;Sf(a);Qb(b|0)}else return}function Nk(a){a=a|0;var b=0;b=Xd(a)|0;o=0;Na(323,b|0);b=o;o=0;if(b&1){b=Gb(0)|0;Sf(a);_g(b)}else{Sf(a);return}}function Ok(a,b){a=a|0;b=b|0;var d=0,e=0;e=a+8|0;d=c[e>>2]|0;do if((d|0)>(b|0)){d=b>>5;a=a+12|0;b=c[(Xe(a,d)|0)>>2]&-1<<(b&31);while(1){if(b|0){a=7;break}d=d+1|0;if((d|0)==(Gk(Fk(a)|0)|0)){a=5;break}b=c[(Xe(a,d)|0)>>2]|0}if((a|0)==5){d=c[e>>2]|0;break}else if((a|0)==7){d=(Pk(b)|0)+(d<<5)|0;e=c[e>>2]|0;d=(d|0)>(e|0)?e:d;break}}while(0);return d|0}function Pk(a){a=a|0;var b=0,c=0,d=0;if(!a)a=32;else{c=a<<16;d=(c|0)==0;a=d?a:c;d=d?31:15;c=a<<8;b=(c|0)==0;c=b?a:c;d=b?d:d+-8|0;b=c<<4;a=(b|0)==0;b=a?c:b;d=a?d:d+-4|0;a=b<<2;c=(a|0)==0;a=(c?d:d+-2|0)-((c?b:a)>>>30&1)|0}return a|0}function Qk(a,b){a=a|0;b=b|0;var d=0,e=0;e=a+8|0;d=c[e>>2]|0;do if((d|0)>(b|0)){d=b>>5;a=a+12|0;b=-1<<(b&31)&~c[(Xe(a,d)|0)>>2];while(1){if(b|0){a=7;break}d=d+1|0;if((d|0)==(Gk(Fk(a)|0)|0)){a=5;break}b=~c[(Xe(a,d)|0)>>2]}if((a|0)==5){d=c[e>>2]|0;break}else if((a|0)==7){d=(Pk(b)|0)+(d<<5)|0;e=c[e>>2]|0;d=(d|0)>(e|0)?e:d;break}}while(0);return d|0}function Rk(a){a=a|0;c[a>>2]=5028;ij(a+20|0);ff(a);return}function Sk(a){a=a|0;Rk(a);cU(a);return}function Tk(a,b){a=a|0;b=b|0;var d=0;cf(a);c[a>>2]=5028;d=a+20|0;Uk(d);o=0;bb(73,a|0,b|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ij(d);ff(a);Qb(b|0)}else return}function Uk(a){a=a|0;cf(a);c[a>>2]=4932;c[a+8>>2]=0;return}function Vk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=l;l=l+16|0;e=f;do if((b|0)<1|(d|0)<1){a=Ab(8)|0;o=0;Xa(102,a|0,43506);f=o;o=0;if(f&1){f=Fb()|0;Jb(a|0);a=f;break}else Mb(a|0,632,117)}else{c[a+8>>2]=b;c[a+12>>2]=d;b=b+31>>5;c[a+16>>2]=b;fj(e,O(b,d)|0);o=0;ja(61,a+20|0,e|0)|0;d=o;o=0;if(d&1){a=Fb()|0;ij(e);break}else{ij(e);l=f;return}}while(0);Qb(a|0)}function Wk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;cf(a);c[a>>2]=5028;e=a+20|0;Uk(e);o=0;bb(73,a|0,b|0,d|0);d=o;o=0;if(d&1){d=Fb()|0;ij(e);ff(a);Qb(d|0)}else return}function Xk(a,b,d){a=a|0;b=b|0;d=d|0;d=Xe(a+20|0,(O(c[a+16>>2]|0,d)|0)+(b>>5)|0)|0;c[d>>2]=c[d>>2]^1<<(b&31);return}function Yk(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;do if((d|b|0)<0){e=Ab(8)|0;o=0;Xa(102,e|0,43545);b=o;o=0;if(b&1){b=Fb()|0;Jb(e|0);e=b;break}else Mb(e|0,632,117)}else{if((e|0)<1|(f|0)<1){e=Ab(8)|0;o=0;Xa(102,e|0,43578);b=o;o=0;if(b&1){b=Fb()|0;Jb(e|0);e=b;break}else Mb(e|0,632,117)}j=e+b|0;h=f+d|0;if((h|0)<=(c[a+12>>2]|0)?(j|0)<=(c[a+8>>2]|0):0){i=a+16|0;g=a+20|0;f=d;while(1){if((f|0)>=(h|0))break;a=O(c[i>>2]|0,f)|0;e=b;while(1){if((e|0)>=(j|0))break;d=Xe(g,(e>>5)+a|0)|0;c[d>>2]=c[d>>2]|1<<(e&31);e=e+1|0}f=f+1|0}return}e=Ab(8)|0;o=0;Xa(102,e|0,43614);b=o;o=0;if(b&1){b=Fb()|0;Jb(e|0);e=b;break}else Mb(e|0,632,117)}while(0);Qb(e|0)}function Zk(a){a=a|0;return c[a+8>>2]|0}function _k(a){a=a|0;return c[a+12>>2]|0}function $k(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+160|0;i=k+136|0;j=k;if(e>>>0<=32?(al(b)|0)>=(e|0):0){i=b+24|0;f=c[i>>2]|0;j=b+8|0;h=b+20|0;if((f|0)>0){f=8-f|0;g=(f|0)>(e|0)?e:f;f=f-g|0;f=(a[(Od(j,c[h>>2]|0)|0)>>0]&255>>>(8-g|0)<>f;e=e-g|0;g=(c[i>>2]|0)+g|0;c[i>>2]=g;if((g|0)==8){c[i>>2]=0;c[h>>2]=(c[h>>2]|0)+1}}else f=0;if((e|0)>0){g=~e;g=e+((g|0)>-8?g:-8)+8&-8;b=e;while(1){if((b|0)<=7)break;m=d[(Od(j,c[h>>2]|0)|0)>>0]|f<<8;c[h>>2]=(c[h>>2]|0)+1;b=b+-8|0;f=m}e=e-g|0;if((e|0)>0){m=8-e|0;f=(a[(Od(j,c[h>>2]|0)|0)>>0]&255>>>m<>m|f<>2]=(c[i>>2]|0)+e}}l=k;return f|0}h=j+56|0;g=j+4|0;c[j>>2]=220;c[h>>2]=240;o=0;Xa(156,j+56|0,g|0);m=o;o=0;if(m&1)f=Fb()|0;else{c[j+128>>2]=0;c[j+132>>2]=Qg()|0;c[j>>2]=3760;c[h>>2]=3780;o=0;Na(324,g|0);m=o;o=0;do if(m&1)f=Fb()|0;else{c[g>>2]=3796;b=j+36|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[b+(f<<2)>>2]=0;f=f+1|0}c[j+48>>2]=0;c[j+52>>2]=16;c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[i+(f<<2)>>2]=0;f=f+1|0}o=0;Xa(157,g|0,i|0);m=o;o=0;if(m&1){f=Fb()|0;pU(i);pU(b);KK(g);break}pU(i);o=0;ja(62,j|0,e|0)|0;m=o;o=0;do if(m&1)f=Fb()|0;else{b=Ab(8)|0;o=0;Xa(158,i|0,g|0);m=o;o=0;if(!(m&1)){o=0;Xa(102,b|0,((a[i+11>>0]|0)<0?c[i>>2]|0:i)|0);m=o;o=0;if(m&1)e=1;else{o=0;bb(68,b|0,632,117);o=0;e=0}f=Fb()|0;pU(i);if(!e)break}else f=Fb()|0;Jb(b|0)}while(0);Ug(j);Qb(f|0)}while(0);dL(j,3856)}GK(h);Qb(f|0);return 0}function al(a){a=a|0;var b=0;b=Ud(Td(a+8|0)|0)|0;return (b-(c[a+20>>2]|0)<<3)-(c[a+24>>2]|0)|0}function bl(){cl();dl();el();return}function cl(){var a=0;a=l;l=l+16|0;El(58648,a);l=a;return}function dl(){var a=0;a=l;l=l+16|0;Dl(58660,a);l=a;return}function el(){fl()|0;a[61808]=1;return}function fl(){gl(5036,5048);gl(5056,5068);gl(5080,5088);gl(5100,5108);gl(5120,5128);gl(5140,5148);gl(5160,5168);gl(5180,5188);gl(5200,5208);gl(5220,5228);gl(5240,5248);gl(5260,5268);gl(5280,5288);gl(5300,5308);gl(5320,5328);gl(5340,5348);gl(5360,5368);gl(5380,5388);gl(5400,5408);gl(5420,5428);gl(5440,5448);gl(5460,5468);gl(5484,5492);gl(5504,5516);gl(5528,5536);gl(5544,5552);gl(5572,5580);return 1}function gl(a,b){a=a|0;b=b|0;var c=0;c=aU(16)|0;o=0;bb(74,c|0,a|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;cU(c);Qb(b|0)}else return}function hl(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,m=0,n=0,p=0,q=0,r=0;p=l;l=l+32|0;m=p+16|0;q=p+12|0;n=p;cf(b);c[b>>2]=5600;f=b+8|0;c[f>>2]=d;g=b+12|0;c[g>>2]=e;o=0;Xa(159,q|0,b|0);k=o;o=0;if(k&1)d=Fb()|0;else{d=c[f>>2]|0;while(1){if((c[d>>2]|0)==-1){e=4;break}o=0;e=ja(63,58648,d|0)|0;k=o;o=0;if(k&1){e=9;break}o=0;ja(64,e|0,q|0)|0;k=o;o=0;if(k&1){e=9;break}d=d+4|0}if((e|0)==4){i=n+11|0;j=n+8|0;k=n+4|0;h=c[g>>2]|0;while(1){f=c[h>>2]|0;if(!f){e=11;break};c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;g=Uh(f)|0;if(g>>>0>4294967279){e=13;break}if(g>>>0<11){a[i>>0]=g;d=n}else{e=g+16&-16;o=0;d=fa(107,e|0)|0;r=o;o=0;if(r&1){e=21;break}c[n>>2]=d;c[j>>2]=e|-2147483648;c[k>>2]=g}_i(d,f,g)|0;a[m>>0]=0;ah(d+g|0,m);o=0;d=ja(65,58660,n|0)|0;r=o;o=0;if(r&1){e=22;break}o=0;ja(64,d|0,q|0)|0;r=o;o=0;if(r&1){e=22;break}pU(n);h=h+4|0}if((e|0)==11){ll(q);l=p;return}else if((e|0)==13){o=0;Na(320,n|0);o=0;e=21}else if((e|0)==22){d=Fb()|0;pU(n)}if((e|0)==21)d=Fb()|0}else if((e|0)==9)d=Fb()|0;ll(q)}ff(b);Qb(d|0)}function il(a,b){a=a|0;b=b|0;c[a>>2]=0;wl(a,b);return}function jl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+32|0;d=e+8|0;f=e;c[f>>2]=b;xl(d,a,b,61809,f,e+16|0);l=e;return (c[d>>2]|0)+20|0}function kl(a,b){a=a|0;b=b|0;wl(a,c[b>>2]|0);return a|0}function ll(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function ml(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+32|0;d=e+8|0;f=e;c[f>>2]=b;nl(d,a,b,61809,f,e+16|0);l=e;return (c[d>>2]|0)+28|0}function nl(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;m=l;l=l+16|0;j=m+12|0;k=m;i=ol(d,j,e)|0;e=c[i>>2]|0;if(!e){pl(k,d,f,g,h);ql(d,c[j>>2]|0,i,c[k>>2]|0);e=c[k>>2]|0;i=1}else i=0;c[b>>2]=e;a[b+4>>0]=i;l=m;return}function ol(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;f=b+4|0;g=c[f>>2]|0;b=vl(b)|0;do if(g){j=e+11|0;k=e+4|0;i=g;while(1){h=i+16|0;f=h+11|0;m=a[f>>0]|0;l=m<<24>>24<0;g=i+20|0;m=l?c[g>>2]|0:m&255;n=a[j>>0]|0;o=n<<24>>24<0;n=o?c[k>>2]|0:n&255;l=cj(o?c[e>>2]|0:e,l?c[h>>2]|0:h,m>>>0>>0?m:n)|0;if((((l|0)==0?(n>>>0>>0?-2147483648:0):l)|0)<0){f=c[i>>2]|0;if(!f){f=6;break}else b=i}else{n=a[j>>0]|0;o=n<<24>>24<0;n=o?c[k>>2]|0:n&255;m=a[f>>0]|0;l=m<<24>>24<0;m=l?c[g>>2]|0:m&255;o=cj(l?c[h>>2]|0:h,o?c[e>>2]|0:e,n>>>0>>0?n:m)|0;if((((o|0)==0?(m>>>0>>0?-2147483648:0):o)|0)>=0){f=10;break}b=i+4|0;f=c[b>>2]|0;if(!f){f=9;break}}i=f}if((f|0)==6){c[d>>2]=i;b=i;break}else if((f|0)==9){c[d>>2]=i;break}else if((f|0)==10){c[d>>2]=i;break}}else{c[d>>2]=f;b=f}while(0);return b|0}function pl(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;h=aU(32)|0;c[b>>2]=h;c[b+4>>2]=d+4;i=b+8|0;a[i>>0]=0;d=h+16|0;g=c[f>>2]|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];e=0;while(1){if((e|0)==3)break;c[g+(e<<2)>>2]=0;e=e+1|0}o=0;Xa(159,h+28|0,0);h=o;o=0;if(!(h&1)){a[i>>0]=1;return}g=Fb()|0;pU(d);e=c[b>>2]|0;c[b>>2]=0;if(e|0){if(a[i>>0]|0)ul(e+16|0);cU(e)}Qb(g|0)}function ql(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=b;c[d>>2]=e;b=c[a>>2]|0;if(c[b>>2]|0){c[a>>2]=c[b>>2];e=c[d>>2]|0}rl(c[a+4>>2]|0,e);a=a+8|0;c[a>>2]=(c[a>>2]|0)+1;return}function rl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a[d+12>>0]=(d|0)==(b|0)&1;g=d;while(1){if((g|0)==(b|0))break;e=c[g+8>>2]|0;i=e+12|0;if(a[i>>0]|0)break;h=e+8|0;d=c[h>>2]|0;f=c[d>>2]|0;if((f|0)==(e|0)){f=c[d+4>>2]|0;if(!f){j=8;break}f=f+12|0;if(!(a[f>>0]|0))e=f;else{j=8;break}}else{if(!f){j=13;break}f=f+12|0;if(!(a[f>>0]|0))e=f;else{j=13;break}}a[i>>0]=1;a[d+12>>0]=(d|0)==(b|0)&1;a[e>>0]=1;g=d}if((j|0)==8){if((c[e>>2]|0)!=(g|0)){sl(e);d=c[h>>2]|0;e=d;d=c[d+8>>2]|0}a[e+12>>0]=1;a[d+12>>0]=0;tl(d)}else if((j|0)==13){if((c[e>>2]|0)==(g|0)){tl(e);d=c[h>>2]|0;e=d;d=c[d+8>>2]|0}a[e+12>>0]=1;a[d+12>>0]=0;sl(d)}return}function sl(a){a=a|0;var b=0,d=0,e=0;e=a+4|0;b=c[e>>2]|0;d=c[b>>2]|0;c[e>>2]=d;if(d|0)c[d+8>>2]=a;e=a+8|0;c[b+8>>2]=c[e>>2];d=c[e>>2]|0;c[((c[d>>2]|0)==(a|0)?d:d+4|0)>>2]=b;c[b>>2]=a;c[e>>2]=b;return}function tl(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a>>2]|0;d=b+4|0;e=c[d>>2]|0;c[a>>2]=e;if(e|0)c[e+8>>2]=a;e=a+8|0;c[b+8>>2]=c[e>>2];f=c[e>>2]|0;c[((c[f>>2]|0)==(a|0)?f:f+4|0)>>2]=b;c[d>>2]=a;c[e>>2]=b;return}function ul(a){a=a|0;ll(a+12|0);pU(a);return}function vl(a){a=a|0;return a+4|0}function wl(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function xl(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;m=l;l=l+16|0;j=m+12|0;k=m;i=yl(d,j,e)|0;e=c[i>>2]|0;if(!e){zl(k,d,f,g,h);Al(d,c[j>>2]|0,i,c[k>>2]|0);e=c[k>>2]|0;i=1}else i=0;c[b>>2]=e;a[b+4>>0]=i;l=m;return}function yl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=a+4|0;e=c[f>>2]|0;a=Bl(a)|0;do if(e){f=c[d>>2]|0;while(1){d=c[e+16>>2]|0;if((f|0)<(d|0)){d=c[e>>2]|0;if(!d){d=6;break}else{a=e;e=d}}else{if((d|0)>=(f|0)){d=10;break}a=e+4|0;d=c[a>>2]|0;if(!d){d=9;break}else e=d}}if((d|0)==6){c[b>>2]=e;a=e;break}else if((d|0)==9){c[b>>2]=e;break}else if((d|0)==10){c[b>>2]=e;break}}else{c[b>>2]=f;a=f}while(0);return a|0}function zl(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;g=aU(24)|0;c[b>>2]=g;c[b+4>>2]=d+4;e=b+8|0;a[e>>0]=0;c[g+16>>2]=c[c[f>>2]>>2];o=0;Xa(159,g+20|0,0);f=o;o=0;if(f&1){f=Fb()|0;c[b>>2]=0;cU(g);Qb(f|0)}else{a[e>>0]=1;return}}function Al(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=b;c[d>>2]=e;b=c[a>>2]|0;if(c[b>>2]|0){c[a>>2]=c[b>>2];e=c[d>>2]|0}rl(c[a+4>>2]|0,e);a=a+8|0;c[a>>2]=(c[a>>2]|0)+1;return}function Bl(a){a=a|0;return a+4|0}function Cl(a){a=a|0;ff(a);cU(a);return}function Dl(a,b){a=a|0;b=b|0;c[a+4>>2]=0;c[a+8>>2]=0;c[a>>2]=a+4;return}function El(a,b){a=a|0;b=b|0;c[a+4>>2]=0;c[a+8>>2]=0;c[a>>2]=a+4;return}function Fl(a){a=a|0;return c[c[a+12>>2]>>2]|0}function Gl(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(a>>>0<=899){b=Hl(jl(58648,b)|0)|0;l=d;return b|0}a=Ab(8)|0;o=0;Na(325,a|0);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else Mb(a|0,160,61);return 0}function Hl(a){a=a|0;return c[a>>2]|0}function Il(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;cf(a);c[a>>2]=5616;h=a+8|0;o=0;Xa(83,h|0,b|0);g=o;o=0;if(g&1)b=Fb()|0;else{g=a+20|0;o=0;Xa(115,g|0,d|0);d=o;o=0;if(d&1)b=Fb()|0;else{b=a+24|0;o=0;Xa(160,b|0,e|0);e=o;o=0;do if(!(e&1)){o=0;Xa(95,a+36|0,f|0);f=o;o=0;if(f&1){f=Fb()|0;Kl(b);b=f;break}else return}else b=Fb()|0;while(0);Ke(g)}Nd(h)}ff(a);Qb(b|0)}function Jl(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=5632;c[a+8>>2]=0;Ml(a,c[b+8>>2]|0);return}function Kl(a){a=a|0;var b=0,d=0;c[a>>2]=5632;b=a+8|0;d=c[b>>2]|0;if(d|0)af(d);c[b>>2]=0;ff(a);return}function Ll(a){a=a|0;Kl(a);cU(a);return}function Ml(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;a=a+8|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Nl(a){a=a|0;c[a>>2]=5616;pU(a+36|0);Kl(a+24|0);Ke(a+20|0);Nd(a+8|0);ff(a);return}function Ol(a){a=a|0;Nl(a);cU(a);return}function Pl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;cf(a);c[a>>2]=5616;e=a+8|0;o=0;Xa(83,e|0,b|0);b=o;o=0;do if(b&1)b=Fb()|0;else{o=0;Xa(115,a+20|0,d|0);d=o;o=0;if(d&1){b=Fb()|0;Nd(e);break}Ql(a+24|0);d=a+36|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}return}while(0);ff(a);Qb(b|0)}function Ql(a){a=a|0;cf(a);c[a>>2]=5632;c[a+8>>2]=0;return}function Rl(a,b){a=a|0;b=b|0;Gd(a,b+8|0);return}function Sl(a,b){a=a|0;b=b|0;Mh(a,b+20|0);return}function Tl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;cf(a);c[a>>2]=3980;e=a+8|0;o=0;Xa(128,e|0,b|0);b=o;o=0;do if(!(b&1)){o=0;Xa(96,a+12|0,d|0);d=o;o=0;if(d&1){b=Fb()|0;de(e);break}else return}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function Ul(a,b){a=a|0;b=b|0;ki(a,b+8|0);return}function Vl(a,b){a=a|0;b=b|0;Le(a,b+12|0);return}function Wl(a){a=a|0;c[a>>2]=5648;ij(a+24|0);Nd(a+12|0);If(a);return}function Xl(a){a=a|0;Wl(a);cU(a);return}function Yl(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;t=l;l=l+48|0;m=t+36|0;u=t+24|0;i=t;s=t+12|0;Lf(m,e);j=Vd(m)|0;Sd(m);m=Jd(j)|0;if(!(Wd(g,0)|0)?(Dk(Xd(g)|0)|0)>=(m|0):0){Ek(Xd(g)|0);n=7}else n=3;do if((n|0)==3){h=aU(24)|0;o=0;Xa(133,h|0,m|0);v=o;o=0;if(v&1){e=Fb()|0;cU(h);break}else{Yd(g,h)|0;n=7;break}}while(0);do if((n|0)==7){am(e,m);v=c[(c[j>>2]|0)+8>>2]|0;Gd(i,e+12|0);o=0;db(v|0,u|0,j|0,f|0,i|0);v=o;o=0;if(v&1){e=Fb()|0;Nd(i);break}Nd(i);o=0;Xa(138,s|0,e+24|0);v=o;o=0;if(v&1)e=Fb()|0;else{h=0;while(1){if((h|0)>=(m|0)){n=10;break}o=0;e=ja(56,u|0,h|0)|0;v=o;o=0;if(v&1)break;o=0;e=ja(60,s|0,(d[e>>0]|0)>>>3|0)|0;v=o;o=0;if(v&1)break;c[e>>2]=(c[e>>2]|0)+1;h=h+1|0}a:do if((((n|0)==10?(o=0,r=fa(117,s|0)|0,v=o,o=0,!(v&1)):0)?(o=0,k=ja(56,u|0,0)|0,v=o,o=0,!(v&1)):0)?(q=a[k>>0]|0,o=0,p=ja(56,u|0,1)|0,v=o,o=0,!(v&1)):0){k=m+-1|0;j=1;i=d[p>>0]|0;f=q&255;while(1){if((j|0)>=(k|0))break;h=j;j=j+1|0;o=0;e=ja(56,u|0,j|0)|0;v=o;o=0;if(v&1)break a;e=d[e>>0]|0;if(((i<<2)-f-e>>1|0)>=(r|0)){f=i;i=e;continue}v=Xd(g)|0;o=0;Xa(134,v|0,h|0);v=o;o=0;if(v&1)break a;else{f=i;i=e}}_d(b,g);ij(s);Nd(u);l=t;return}while(0);e=Fb()|0;ij(s)}Nd(u)}while(0);Qb(e|0)}function Zl(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0;r=l;l=l+64|0;p=r+48|0;s=r+36|0;j=r+24|0;k=r;n=r+12|0;Lf(p,b);m=Vd(p)|0;Sd(p);p=Jd(m)|0;q=$d(m)|0;e=aU(32)|0;o=0;bb(66,e|0,p|0,q|0);i=o;o=0;if(i&1){b=Fb()|0;cU(e)}else{ae(a,e);o=0;Xa(161,b|0,p|0);i=o;o=0;if(!(i&1)?(o=0,Xa(138,s|0,b+24|0),i=o,o=0,!(i&1)):0){g=b+12|0;h=(p<<2|0)/5|0;i=(p|0)/5|0;f=1;a:while(1){if((f|0)>=5){e=6;break}b=c[(c[m>>2]|0)+8>>2]|0;o=0;Xa(83,k|0,g|0);e=o;o=0;if(e&1){e=14;break}e=(O(f,q)|0)/5|0;o=0;db(b|0,j|0,m|0,e|0,k|0);e=o;o=0;if(e&1){e=15;break}Nd(k);e=i;while(1){if((e|0)>=(h|0))break;o=0;b=ja(56,j|0,e|0)|0;t=o;o=0;if(t&1){e=19;break a}o=0;b=ja(60,s|0,(d[b>>0]|0)>>>3|0)|0;t=o;o=0;if(t&1){e=19;break a}c[b>>2]=(c[b>>2]|0)+1;e=e+1|0}Nd(j);f=f+1|0}do if((e|0)==6){o=0;h=fa(117,s|0)|0;t=o;o=0;if(t&1){b=Fb()|0;break}o=0;Xa(c[(c[m>>2]|0)+12>>2]|0,n|0,m|0);t=o;o=0;if(t&1){b=Fb()|0;break}else e=0;b:while(1){if((e|0)>=(q|0)){e=22;break}f=O(e,p)|0;b=0;while(1){if((b|0)>=(p|0))break;o=0;g=ja(56,n|0,b+f|0)|0;t=o;o=0;if(t&1){e=32;break b}if((d[g>>0]|0|0)<(h|0)?(t=be(a)|0,o=0,bb(67,t|0,b|0,e|0),t=o,o=0,t&1):0){e=32;break b}b=b+1|0}e=e+1|0}if((e|0)==22){Nd(n);ij(s);l=r;return}else if((e|0)==32){b=Fb()|0;Nd(n);break}}else if((e|0)==14)b=Fb()|0;else if((e|0)==15){b=Fb()|0;Nd(k)}else if((e|0)==19){b=Fb()|0;Nd(j)}while(0);ij(s)}else b=Fb()|0;de(a)}Qb(b|0)}function _l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;b=l;l=l+16|0;d=b;e=aU(36)|0;o=0;Xa(91,d|0,c|0);c=o;o=0;if(!(c&1)){o=0;Xa(162,e|0,d|0);c=o;o=0;if(!(c&1)){o=0;Xa(90,a|0,e|0);c=o;o=0;if(c&1)a=0;else{Sd(d);l=b;return}}else a=1;b=Fb()|0;Sd(d);if(a)f=7}else{b=Fb()|0;f=7}if((f|0)==7)cU(e);Qb(b|0)}function $l(a,b){a=a|0;b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;Rd(d,b);o=0;Xa(163,a|0,d|0);b=o;o=0;if(b&1){b=Fb()|0;Sd(d)}else{Sd(d);c[a>>2]=5648;b=a+12|0;o=0;Xa(83,b|0,58672);d=o;o=0;do if(!(d&1)){o=0;Xa(135,a+24|0,32);d=o;o=0;if(d&1){e=Fb()|0;Nd(b);b=e;break}else{l=e;return}}else b=Fb()|0;while(0);If(a)}Qb(b|0)}function am(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f;e=a+12|0;do if((Ud(Td(e)|0)|0)<(b|0)){Ld(d,b);o=0;ja(54,e|0,d|0)|0;e=o;o=0;if(e&1){f=Fb()|0;Nd(d);Qb(f|0)}else{Nd(d);break}}while(0);b=a+24|0;a=0;while(1){if((a|0)==32)break;c[(Xe(b,a)|0)>>2]=0;a=a+1|0}l=f;return}function bm(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=Gk(Fk(a)|0)|0;b=0;g=0;d=0;f=0;while(1){if((f|0)>=(i|0)){f=0;d=0;e=0;break}if((c[(Xi(a,f)|0)>>2]|0)>(d|0)){e=f;d=c[(Xi(a,f)|0)>>2]|0}else e=g;if((c[(Xi(a,f)|0)>>2]|0)>(b|0))b=c[(Xi(a,f)|0)>>2]|0;g=e;f=f+1|0}while(1){if((d|0)>=(i|0))break;h=d-g|0;h=O(O(h,h)|0,c[(Xi(a,d)|0)>>2]|0)|0;j=(h|0)>(e|0);f=j?d:f;d=d+1|0;e=j?h:e}j=(g|0)>(f|0);h=j?g:f;g=j?f:g;if((h-g|0)<=(i>>4|0)){j=Ab(8)|0;cm(j);Mb(j|0,488,58)}f=h+-1|0;d=f;e=-1;while(1){if((d|0)<=(g|0))break;i=d-g|0;i=O(O(i,i)|0,h-d|0)|0;i=O(i,b-(c[(Xi(a,d)|0)>>2]|0)|0)|0;k=(i|0)>(e|0);j=k?d:f;d=d+-1|0;e=k?i:e;f=j}return f<<3|0}function cm(a){a=a|0;eg(a);c[a>>2]=5676;return}function dm(a){a=a|0;bg(a);cU(a);return}function em(){fm();return}function fm(){Ld(58672,0);return}function gm(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0.0,j=0,k=0,m=0,n=0,p=0,q=0,r=0;p=l;l=l+32|0;q=p+8|0;b=p+4|0;n=p;h=aU(32)|0;o=0;Xa(164,h|0,e|0);m=o;o=0;if(m&1){b=Fb()|0;cU(h)}else{ae(a,h);g[b>>2]=0.0;o=0;bb(75,q|0,e<<1|0,b|0);m=o;o=0;if(m&1)b=Fb()|0;else{k=q+4|0;j=0;a:while(1){if((j|0)>=(e|0)){h=5;break}h=c[q>>2]|0;m=(c[k>>2]|0)-h>>2;i=+(j|0)+.5;b=0;while(1){if((b|0)>=(m|0))break;g[h+(b<<2)>>2]=+(b>>1|0)+.5;g[h+((b|1)<<2)>>2]=i;b=b+2|0}h=jm(f)|0;o=0;Xa(165,h|0,q|0);h=o;o=0;if(h&1){h=17;break}o=0;Xa(128,n|0,d|0);h=o;o=0;if(h&1){h=17;break}o=0;Xa(166,n|0,q|0);h=o;o=0;if(h&1){h=18;break}de(n);b=0;while(1){if((b|0)>=(m|0))break;r=be(d)|0;h=c[q>>2]|0;o=0;h=la(72,r|0,~~+g[h+(b<<2)>>2]|0,~~+g[h+((b|1)<<2)>>2]|0)|0;r=o;o=0;if(r&1){h=22;break a}if(h?(r=be(a)|0,o=0,bb(67,r|0,b>>1|0,j|0),r=o,o=0,r&1):0){h=22;break a}b=b+2|0}j=j+1|0}if((h|0)==5){im(q);l=p;return}else if((h|0)==17)b=Fb()|0;else if((h|0)==18){b=Fb()|0;de(n)}else if((h|0)==22)b=Fb()|0;im(q)}de(a)}Qb(b|0)}function hm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;c[a>>2]=0;f=a+4|0;c[f>>2]=0;c[a+8>>2]=0;if(b|0){o=0;Xa(167,a|0,b|0);e=o;o=0;if(e&1){f=Fb()|0;im(a);Qb(f|0)}g=c[f>>2]|0;e=g+(b<<2)|0;a=b;b=g;while(1){c[b>>2]=c[d>>2];a=a+-1|0;if(!a)break;else b=b+4|0}c[f>>2]=e}return}function im(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-4|0;c[a>>2]=e;b=e}cU(d)}return}function jm(a){a=a|0;return c[a>>2]|0}function km(b,d){b=b|0;d=d|0;var e=0,f=0,h=0.0,i=0.0,j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;p=l;l=l+160|0;u=p+136|0;w=p;n=Zk(be(b)|0)|0;m=_k(be(b)|0)|0;e=c[d>>2]|0;f=(c[d+4>>2]|0)-e>>2;i=+(m+-1|0);j=+(n+-1|0);d=0;while(1){if(d>>>0>=f>>>0){v=3;break}b=e+(d<<2)|0;q=~~+g[b>>2];k=e+((d|1)<<2)|0;r=~~+g[k>>2];if((q|0)<-1)break;if((r|0)>(m|0)|((q|0)>(n|0)|(r|0)<-1))break;if((q|0)!=-1){if((q|0)==(n|0)){h=j;v=31}}else{h=0.0;v=31}if((v|0)==31){v=0;g[b>>2]=h}if((r|0)!=-1){if((r|0)==(m|0)){h=i;v=34}}else{h=0.0;v=34}if((v|0)==34){v=0;g[k>>2]=h}d=d+2|0}if((v|0)==3){l=p;return}e=w+56|0;f=w+4|0;c[w>>2]=220;c[e>>2]=240;o=0;Xa(156,w+56|0,f|0);p=o;o=0;if(p&1)b=Fb()|0;else{c[w+128>>2]=0;c[w+132>>2]=Qg()|0;c[w>>2]=3760;c[e>>2]=3780;o=0;Na(324,f|0);p=o;o=0;do if(p&1)b=Fb()|0;else{c[f>>2]=3796;d=w+36|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}c[w+48>>2]=0;c[w+52>>2]=16;c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[u+(b<<2)>>2]=0;b=b+1|0}o=0;Xa(157,f|0,u|0);p=o;o=0;if(p&1){b=Fb()|0;pU(u);pU(d);KK(f);break}pU(u);o=0;b=ja(66,w|0,44298)|0;p=o;o=0;do if(((!(p&1)?(o=0,s=ja(62,b|0,q|0)|0,q=o,o=0,!(q&1)):0)?(o=0,t=ja(66,s|0,44334)|0,s=o,o=0,!(s&1)):0)?(o=0,ja(62,t|0,r|0)|0,t=o,o=0,!(t&1)):0){b=Ab(8)|0;o=0;Xa(158,u|0,f|0);t=o;o=0;if(t&1){u=Fb()|0;Jb(b|0);b=u;break}else{hg(b,(a[u+11>>0]|0)<0?c[u>>2]|0:u);o=0;bb(68,b|0,24,58);o=0;b=Fb()|0;pU(u);break}}else v=26;while(0);if((v|0)==26)b=Fb()|0;Ug(w);Qb(b|0)}while(0);dL(w,3856)}GK(e);Qb(b|0)}function lm(a,b){a=a|0;b=b|0;var d=0;if((mm(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function mm(a){a=a|0;return 1073741823} function Vt(a,b){a=a|0;b=b|0;return a+(b<<2)|0}function Wt(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;g=c[a>>2]|0;h=(c[a+4>>2]|0)-g>>2;f=0;a=0;while(1){if((a|0)>=(h|0)){e=0;a=0;break}f=(c[g+(a<<2)>>2]|0)+f|0;a=a+1|0}while(1){if((e|0)>=(h|0))break;b=((c[g+(e<<2)>>2]|0)*2304|0)/(f|0)|0;b=((b&128)>>>0>127&1)+(b>>8)|0;if((b+-1|0)>>>0>3){a=-1;break}a:do if(!(e&1)){d=0;while(1){if((d|0)>=(b|0))break a;d=d+1|0;a=a<<1|1}}else a=a<=48){b=5;break}if((c[9048+(d<<2)>>2]|0)==(b|0)){b=6;break}d=d+1|0}if((b|0)==5){d=Ab(8)|0;cm(d);Mb(d|0,488,58)}else if((b|0)==6)return a[46276+d>>0]|0;return 0}function Yt(b){b=b|0;var d=0;d=a[b+11>>0]|0;d=d<<24>>24<0?c[b+4>>2]|0:d&255;cu(b,d+-2|0,20);cu(b,d+-1|0,15);return}function Zt(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0;n=l;l=l+16|0;p=n;m=d+11|0;f=a[m>>0]|0;g=c[d+4>>2]|0;h=f&255;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;e=0;while(1){if((e|0)==3)break;c[p+(e<<2)>>2]=0;e=e+1|0}k=f<<24>>24<0?g:h;j=k+-1|0;e=0;a:while(1){if((e|0)>=(k|0)){g=6;break}g=(a[m>>0]|0)<0?c[d>>2]|0:d;f=a[g+e>>0]|0;i=f<<24>>24;if((f+-97&255)<4){if((e|0)>=(j|0)){g=9;break}e=e+1|0;f=a[g+e>>0]|0;g=f<<24>>24;h=f<<24>>24<91;b:do switch(i|0){case 100:{if(f<<24>>24<65|h^1){g=16;break a}f=g+32&255;break}case 97:{if((f+-65&255)>25){g=22;break a}f=g+192&255;break}case 98:{if((f+-65&255)<5){f=g+218&255;break b}if((f+-70&255)<5){f=g+245&255;break b}if((f+-75&255)<=4){f=g+16&255;break b}if((f&-4)<<24>>24!=80)if(f<<24>>24<84|h^1){g=34;break a}else{f=127;break b}else{f=g+43&255;break b}}case 99:if((f+-65&255)>14)if(f<<24>>24==90){f=58;break b}else{g=40;break a}else{f=g+224&255;break b}default:f=0}while(0);o=0;la(84,p|0,1,f|0)|0;i=o;o=0;if(i&1){g=19;break}}else{o=0;la(84,p|0,1,f|0)|0;i=o;o=0;if(i&1){g=12;break}}e=e+1|0}do if((g|0)==6){o=0;e=fa(107,20)|0;m=o;o=0;if(m&1){e=Fb()|0;break}o=0;Xa(140,e|0,p|0);m=o;o=0;if(m&1){n=Fb()|0;cU(e);e=n;break}else{aj(b,e);pU(p);l=n;return}}else if((g|0)==9){e=Ab(8)|0;o=0;f=da(42)|0;n=o;o=0;if(n&1){n=Fb()|0;Jb(e|0);e=n;break}else{_t(e,f);o=0;bb(68,e|0,160,61);o=0;g=12;break}}else if((g|0)==16){e=Ab(8)|0;o=0;f=da(42)|0;n=o;o=0;if(n&1){n=Fb()|0;Jb(e|0);e=n;break}else{_t(e,f);o=0;bb(68,e|0,160,61);o=0;g=19;break}}else if((g|0)==22){e=Ab(8)|0;o=0;f=da(42)|0;n=o;o=0;if(n&1){n=Fb()|0;Jb(e|0);e=n;break}else{_t(e,f);o=0;bb(68,e|0,160,61);o=0;g=19;break}}else if((g|0)==34){e=Ab(8)|0;o=0;f=da(42)|0;n=o;o=0;if(n&1){n=Fb()|0;Jb(e|0);e=n;break}else{_t(e,f);o=0;bb(68,e|0,160,61);o=0;g=19;break}}else if((g|0)==40){e=Ab(8)|0;o=0;f=da(42)|0;n=o;o=0;if(n&1){n=Fb()|0;Jb(e|0);e=n;break}else{_t(e,f);o=0;bb(68,e|0,160,61);o=0;g=19;break}}while(0);if((g|0)==12)e=Fb()|0;else if((g|0)==19)e=Fb()|0;pU(p);Qb(e|0)}function _t(a,b){a=a|0;b=b|0;$t(a,b);c[a>>2]=3648;return}function $t(a,b){a=a|0;b=b|0;au(a,b);c[a>>2]=3616;return}function au(a,b){a=a|0;b=b|0;var d=0;bu(a,b);c[a>>2]=3596;o=0;b=fa(110,c[b+4>>2]|0)|0;d=o;o=0;if(d&1){d=Fb()|0;Cb(d|0)}else{c[a+4>>2]=b;return}}function bu(a,b){a=a|0;b=b|0;c[a>>2]=40992;return}function cu(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;j=b+11|0;g=d;h=0;i=1;while(1){f=g+-1|0;k=(a[j>>0]|0)<0?c[b>>2]|0:b;if((g|0)<=0)break;k=(O(EU(58744,a[k+f>>0]|0,0)|0,i)|0)+h|0;g=f;h=k;i=(i|0)>=(e|0)?1:i+1|0}if((a[k+d>>0]|0)==(a[46276+((h|0)%47|0)>>0]|0))return;else{k=Ab(8)|0;dg(k);Mb(k|0,144,56)}}function du(a,b,d){a=a|0;b=b|0;d=d|0;c[a>>2]=b;c[a+4>>2]=d;return}function eu(){fu();return}function fu(){var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;c[14686]=0;c[14687]=0;c[14688]=0;e=Uh(46276)|0;if(e>>>0>4294967279)lU(58744);if(e>>>0<11){a[58755]=e;b=58744}else{g=e+16&-16;b=aU(g)|0;c[14686]=b;c[14688]=g|-2147483648;c[14687]=e}_i(b,46276,e)|0;a[d>>0]=0;ah(b+e|0,d);l=f;return}function gu(a){a=a|0;var b=0,d=0,e=0;wv(a);c[a>>2]=9028;d=a+8|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}b=a+20|0;c[b>>2]=0;c[a+24>>2]=0;c[a+28>>2]=0;o=0;Xa(172,d|0,20);e=o;o=0;if(!(e&1)?(o=0,Xa(251,b|0,6),e=o,o=0,!(e&1)):0)return;e=Fb()|0;pj(b);pU(d);pv(a);Qb(e|0)}function hu(a){a=a|0;c[a>>2]=9248;pj(a+20|0);Lv(a);return}function iu(a){a=a|0;hu(a);cU(a);return}function ju(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+32|0;k=t+16|0;n=t+8|0;m=t+4|0;r=t;s=a+20|0;f=c[s>>2]|0;q=a+24|0;a=c[q>>2]|0;while(1){if((a|0)==(f|0))break;p=a+-4|0;c[q>>2]=p;a=p}En(s,4);p=Dk(Xd(b)|0)|0;a=c[(lu(d,1)|0)>>2]|0;j=0;f=0;while(1){if(!((f|0)<6&(a|0)<(p|0))){f=6;break}_d(k,b);o=0;g=pa(55,k|0,s|0,a|0,58828)|0;i=o;o=0;if(i&1){f=11;break}Sf(k);xU(e,1,((g|0)%10|0)+48&255)|0;i=c[s>>2]|0;h=(c[q>>2]|0)-i>>2;d=0;while(1){if((d|0)>=(h|0))break;u=(c[i+(d<<2)>>2]|0)+a|0;d=d+1|0;a=u}j=((g|0)>9?1<<5-f:0)|j;f=f+1|0}do if((f|0)==6){mu(e,j);_d(m,b);o=0;hb(53,n|0,m|0,a|0,1,58804);u=o;o=0;if(u&1){a=Fb()|0;Sf(m);break}Sf(m);i=0;h=c[(Vt(n,1)|0)>>2]|0;while(1){if(!((i|0)<6&(h|0)<(p|0))){f=15;break}_d(r,b);o=0;a=pa(55,r|0,s|0,h|0,58816)|0;u=o;o=0;if(u&1){f=21;break}Sf(r);xU(e,1,a+48&255)|0;g=c[s>>2]|0;d=(c[q>>2]|0)-g>>2;f=0;a=h;while(1){if((f|0)>=(d|0))break;u=(c[g+(f<<2)>>2]|0)+a|0;f=f+1|0;a=u}i=i+1|0;h=a}if((f|0)==15){l=t;return h|0}else if((f|0)==21){a=Fb()|0;Sf(r);break}}else if((f|0)==11){a=Fb()|0;Sf(k)}while(0);Qb(a|0);return 0}function ku(a){a=a|0;var b=0;b=l;l=l+16|0;a=b;vh(a,8);l=b;return c[a>>2]|0}function lu(a,b){a=a|0;b=b|0;return a+(b<<2)|0}function mu(a,b){a=a|0;b=b|0;var d=0;d=0;while(1){if((d|0)>=10){b=6;break}if((c[9288+(d<<2)>>2]|0)==(b|0)){b=4;break}d=d+1|0}if((b|0)==4){CU(a,0,1,d+48&255)|0;return}else if((b|0)==6){a=Ab(8)|0;cm(a);Mb(a|0,488,58)}}function nu(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;ew(a);c[a>>2]=9248;c[d>>2]=0;o=0;bb(70,a+20|0,4,d|0);d=o;o=0;if(d&1){d=Fb()|0;Lv(a);Qb(d|0)}else{l=b;return}}function ou(a){a=a|0;c[a>>2]=9336;pj(a+20|0);Lv(a);return}function pu(a){a=a|0;ou(a);cU(a);return}function qu(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,m=0,n=0,p=0,q=0,r=0,s=0;s=l;l=l+32|0;j=s+16|0;m=s+8|0;k=s+4|0;q=s;r=a+20|0;p=c[r>>2]|0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;p=Dk(Xd(b)|0)|0;n=a+24|0;h=c[(lu(d,1)|0)>>2]|0;i=0;while(1){if(!((i|0)<4&(h|0)<(p|0))){d=3;break}_d(j,b);o=0;a=pa(55,j|0,r|0,h|0,58816)|0;g=o;o=0;if(g&1){d=8;break}Sf(j);xU(e,1,a+48&255)|0;g=c[r>>2]|0;f=(c[n>>2]|0)-g>>2;d=0;a=h;while(1){if((d|0)>=(f|0))break;h=(c[g+(d<<2)>>2]|0)+a|0;d=d+1|0;a=h}h=a;i=i+1|0}do if((d|0)==3){_d(k,b);o=0;hb(53,m|0,k|0,h|0,1,58804);j=o;o=0;if(j&1){a=Fb()|0;Sf(k);break}Sf(k);i=0;h=c[(Vt(m,1)|0)>>2]|0;while(1){if(!((i|0)<4&(h|0)<(p|0))){d=12;break}_d(q,b);o=0;a=pa(55,q|0,r|0,h|0,58816)|0;m=o;o=0;if(m&1){d=18;break}Sf(q);xU(e,1,a+48&255)|0;g=c[r>>2]|0;f=(c[n>>2]|0)-g>>2;d=0;a=h;while(1){if((d|0)>=(f|0))break;m=(c[g+(d<<2)>>2]|0)+a|0;d=d+1|0;a=m}i=i+1|0;h=a}if((d|0)==12){l=s;return h|0}else if((d|0)==18){a=Fb()|0;Sf(q);break}}else if((d|0)==8){a=Fb()|0;Sf(j)}while(0);Qb(a|0);return 0}function ru(a){a=a|0;var b=0;b=l;l=l+16|0;a=b;vh(a,7);l=b;return c[a>>2]|0}function su(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;ew(a);c[a>>2]=9336;c[d>>2]=0;o=0;bb(70,a+20|0,4,d|0);d=o;o=0;if(d&1){d=Fb()|0;Lv(a);Qb(d|0)}else{l=b;return}}function tu(a){a=a|0;pv(a);return}function uu(a){a=a|0;tu(a);cU(a);return}function vu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0.0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0.0;p=l;l=l+112|0;m=p+104|0;j=p+96|0;f=p+80|0;k=p+88|0;g=p+60|0;x=p+68|0;i=p+44|0;v=p+64|0;w=p+48|0;u=p+32|0;r=p+28|0;s=p+16|0;q=p+4|0;n=p;_d(f,e);o=0;bb(104,j|0,b|0,f|0);y=o;o=0;if(y&1){b=Fb()|0;Sf(f)}else{Sf(f);_d(g,e);o=0;bb(105,k|0,b|0,g|0);y=o;o=0;if(y&1){b=Fb()|0;Sf(g)}else{Sf(g);c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[x+(b<<2)>>2]=0;b=b+1|0}o=0;Xa(129,i|0,e|0);y=o;o=0;do if(!(y&1)){e=c[(Vt(j,1)|0)>>2]|0;y=c[(Vt(k,0)|0)>>2]|0;o=0;db(87,i|0,e|0,y|0,x|0);y=o;o=0;if(y&1){b=Fb()|0;Sf(i);break}Sf(i);o=0;b=fa(107,20)|0;y=o;o=0;if(!(y&1)){o=0;Xa(140,b|0,x|0);y=o;o=0;if(y&1){y=Fb()|0;cU(b);b=y;break}o=0;Xa(173,v|0,b|0);y=o;o=0;if(!(y&1)){Uk(w);if(zu(w)|0?(o=0,ja(61,w|0,58756)|0,y=o,o=0,y&1):0)t=18;else t=19;a:do if((t|0)==19){f=Je(v)|0;o=0;f=fa(134,f|0)|0;y=o;o=0;if(y&1)t=18;else{g=Gk(Fk(w)|0)|0;b=0;while(1){if((b|0)>=(g|0)){t=25;break}o=0;e=ja(60,w|0,b|0)|0;y=o;o=0;if(y&1){t=24;break}if((f|0)==(c[e>>2]|0)){t=29;break}else b=b+1|0}do if((t|0)==24){b=Fb()|0;break a}else if((t|0)==25){b=Ab(8)|0;o=0;Na(325,b|0);y=o;o=0;if(y&1){y=Fb()|0;Jb(b|0);b=y;break a}else{o=0;bb(68,b|0,160,61);o=0;break}}else if((t|0)==29?(o=0,Xa(249,u|0,2),y=o,o=0,!(y&1)):0){o=0;b=fa(107,16)|0;y=o;o=0;b:do if(!(y&1)){z=+(c[(Vt(j,1)|0)>>2]|0);h=+(d|0);o=0;Pa(43,b|0,+z,+h);y=o;o=0;if(y&1){t=Fb()|0;cU(b);b=t;t=46;break}o=0;Xa(247,m|0,b|0);y=o;o=0;if(!(y&1)){o=0;b=ja(55,u|0,0)|0;y=o;o=0;if(y&1){b=Fb()|0;ut(m);t=46;break}tt(b,m)|0;ut(m);o=0;b=fa(107,16)|0;y=o;o=0;do if(y&1)t=47;else{z=+(c[(Vt(k,0)|0)>>2]|0);o=0;Pa(43,b|0,+z,+h);y=o;o=0;if(y&1){y=Fb()|0;cU(b);b=y;break}o=0;Xa(247,m|0,b|0);y=o;o=0;if(y&1){t=47;break}o=0;b=ja(55,u|0,1)|0;y=o;o=0;if(y&1){b=Fb()|0;ut(m);break}tt(b,m)|0;ut(m);o=0;g=fa(107,40)|0;y=o;o=0;if(y&1){b=Fb()|0;break b}Mh(r,v);Pg(s);o=0;Xa(96,q|0,u|0);y=o;o=0;if(y&1){b=Fb()|0;f=1}else{vh(n,9);o=0;c[m>>2]=c[n>>2];hb(47,g|0,r|0,s|0,q|0,m|0);y=o;o=0;do if(y&1)b=1;else{o=0;Xa(124,a|0,g|0);y=o;o=0;if(y&1){b=0;break}Qe(q);Nd(s);Ke(r);Qe(u);ij(w);Ke(v);pU(x);l=p;return}while(0);y=Fb()|0;Qe(q);f=b;b=y}Nd(s);Ke(r);if(!f)break b;cU(g);break b}while(0);if((t|0)==47)b=Fb()|0}else t=43}else t=43;while(0);if((t|0)==43){b=Fb()|0;t=46}Qe(u);break a}while(0);b=Fb()|0}}while(0);if((t|0)==18)b=Fb()|0;ij(w);Ke(v)}else t=15}else t=15}else t=15;while(0);if((t|0)==15)b=Fb()|0;pU(x)}}Qb(b|0)}function wu(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;i=l;l=l+16|0;e=i+8|0;f=i+4|0;g=i;_d(e,d);o=0;h=fa(135,e|0)|0;j=o;o=0;do if(!(j&1)){Sf(e);_d(f,d);o=0;db(88,a|0,f|0,h|0,58780);j=o;o=0;if(j&1){a=Fb()|0;Sf(f);break}Sf(f);j=c[(Vt(a,1)|0)>>2]|0;c[b+8>>2]=j-(c[(Vt(a,0)|0)>>2]|0)>>2;_d(g,d);j=c[(Vt(a,0)|0)>>2]|0;o=0;bb(106,b|0,g|0,j|0);j=o;o=0;if(j&1){a=Fb()|0;Sf(g);break}else{Sf(g);l=i;return}}else{a=Fb()|0;Sf(e)}while(0);Qb(a|0)}function xu(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,m=0;j=l;l=l+32|0;k=j+16|0;e=j+12|0;f=j+8|0;g=j+4|0;h=j;_d(e,d);o=0;Xa(252,k|0,e|0);m=o;o=0;if(m&1){m=Fb()|0;Sf(e);e=m}else{Sf(e);o=0;Xa(129,f|0,d|0);m=o;o=0;do if(m&1)e=Fb()|0;else{o=0;e=fa(135,f|0)|0;m=o;o=0;if(m&1){e=Fb()|0;Sf(f);break}Sf(f);o=0;Xa(129,g|0,d|0);m=o;o=0;if(!(m&1)){o=0;db(88,a|0,g|0,e|0,58768);m=o;o=0;if(m&1){e=Fb()|0;Sf(g);break}Sf(g);o=0;Xa(129,h|0,d|0);m=o;o=0;if(!(m&1)){m=c[(Vt(a,0)|0)>>2]|0;o=0;bb(106,b|0,h|0,m|0);m=o;o=0;if(m&1){e=Fb()|0;Sf(h);break}Sf(h);e=c[(Vt(a,0)|0)>>2]|0;b=Xd(d)|0;o=0;b=fa(112,b|0)|0;m=o;o=0;if(!(m&1)?(i=b-(c[(Vt(a,1)|0)>>2]|0)|0,c[(Vt(a,0)|0)>>2]=i,i=Xd(d)|0,o=0,i=fa(112,i|0)|0,m=o,o=0,!(m&1)):0){c[(Vt(a,1)|0)>>2]=i-e;Nk(k);l=j;return}e=Fb()|0;break}}e=Fb()|0}while(0);Nk(k)}Qb(e|0)}function yu(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,m=0,n=0,p=0,q=0,r=0;m=l;l=l+48|0;q=m+32|0;p=m+20|0;n=m+8|0;f=m;k=m+4|0;c[p>>2]=0;nj(q,10,p);c[n>>2]=0;o=0;bb(70,p|0,5,n|0);j=o;o=0;if(j&1)f=Fb()|0;else{c[f>>2]=0;o=0;bb(70,n|0,5,f|0);j=o;o=0;if(j&1)f=Fb()|0;else{j=q+4|0;a:while(1){if((b|0)>=(d|0)){b=22;break}o=0;Xa(129,k|0,a|0);i=o;o=0;if(i&1){b=12;break}o=0;bb(100,k|0,b|0,q|0);i=o;o=0;if(i&1){b=13;break}Sf(k);g=c[q>>2]|0;h=c[p>>2]|0;i=c[n>>2]|0;f=0;while(1){if((f|0)==5)break;r=f<<1;c[h+(f<<2)>>2]=c[g+(r<<2)>>2];c[i+(f<<2)>>2]=c[g+((r|1)<<2)>>2];f=f+1|0}o=0;f=fa(136,p|0)|0;r=o;o=0;if(r&1){b=12;break}o=0;la(84,e|0,1,f+48&255|0)|0;r=o;o=0;if(r&1){b=20;break}o=0;f=fa(136,n|0)|0;r=o;o=0;if(r&1){b=20;break}o=0;la(84,e|0,1,f+48&255|0)|0;r=o;o=0;if(r&1){b=20;break}g=c[q>>2]|0;h=(c[j>>2]|0)-g>>2;f=0;while(1){if((f|0)>=(h|0))continue a;r=(c[g+(f<<2)>>2]|0)+b|0;f=f+1|0;b=r}}if((b|0)==12)f=Fb()|0;else if((b|0)==13){f=Fb()|0;Sf(k)}else if((b|0)==20)f=Fb()|0;else if((b|0)==22){pj(n);pj(p);pj(q);l=m;return}pj(n)}pj(p)}pj(q);Qb(f|0)}function zu(a){a=a|0;return (c[a+8>>2]|0)==0|0}function Au(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=107;c=-1;d=0;while(1){if((d|0)==10)break;f=yv(a,9404+(d*20|0)|0,199)|0;e=(f|0)<(b|0);b=e?f:b;c=e?d:c;d=d+1|0}if((c|0)>-1)return c|0;else{f=Ab(8)|0;cm(f);Mb(f|0,488,58)}return 0}function Bu(a){a=a|0;var b=0;b=Dk(Xd(a)|0)|0;a=Ok(Xd(a)|0,0)|0;if((a|0)==(b|0)){b=Ab(8)|0;cm(b);Mb(b|0,488,58)}else return a|0;return 0}function Cu(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+16|0;s=t;q=(c[e+4>>2]|0)-(c[e>>2]|0)>>2;Eu(s,q);m=Xd(b)|0;o=0;m=fa(112,m|0)|0;r=o;o=0;a:do if(!(r&1)){n=q+-1|0;p=q+-2|0;r=d;j=d;f=0;k=0;while(1){if((r|0)>=(m|0)){d=17;break}d=Xd(b)|0;o=0;d=ja(59,d|0,r|0)|0;i=o;o=0;if(i&1)break a;if(k^d){g=(c[s>>2]|0)+(f<<2)|0;c[g>>2]=(c[g>>2]|0)+1;g=k;d=j}else{if((f|0)==(n|0)){o=0;d=la(86,s|0,c[e>>2]|0,199)|0;i=o;o=0;if(i&1)break a;if((d|0)<107){d=10;break}h=c[s>>2]|0;i=c[h+4>>2]|0;g=(c[h>>2]|0)+j|0;d=2;while(1){if((d|0)>=(q|0))break;c[h+(d+-2<<2)>>2]=c[h+(d<<2)>>2];d=d+1|0}d=c[s>>2]|0;c[d+(p<<2)>>2]=0;c[d+(n<<2)>>2]=0;d=g+i|0;g=-1}else{d=j;g=1}f=g+f|0;c[(c[s>>2]|0)+(f<<2)>>2]=1;g=k^1}r=r+1|0;j=d;k=g}if((d|0)==10){du(a,j,r);pj(s);l=t;return}else if((d|0)==17){t=Ab(8)|0;cm(t);o=0;bb(68,t|0,488,58);o=0;break}}while(0);t=Fb()|0;pj(s);Qb(t|0)}function Du(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=(c[a+8>>2]|0)*10|0;while(1){a=d+-1|0;if(!((e|0)>0&(d|0)>0)){f=5;break}if(Ui(Xd(b)|0,a)|0)break;d=a;e=e+-1|0}if((f|0)==5?(e|0)==0:0)return;f=Ab(8)|0;cm(f);Mb(f|0,488,58)}function Eu(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(142,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(253,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;pj(a);Qb(d|0)}while(0);return}function Fu(){Gu();Hu();Iu();return}function Gu(){var a=0,b=0;a=aU(20)|0;o=0;bb(107,a|0,9632,9676);b=o;o=0;if(b&1){b=Fb()|0;cU(a);Qb(b|0)}else{ek(58756,a);return}}function Hu(){Ju(58780,9616,9632);return}function Iu(){Ju(58768,9604,9616);return}function Ju(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;e=d-b>>2;do if(e|0){o=0;Xa(142,a|0,e|0);f=o;o=0;if(!(f&1)?(o=0,db(89,a|0,b|0,d|0,e|0),f=o,o=0,!(f&1)):0)break;f=Fb()|0;pj(a);Qb(f|0)}while(0);return}function Ku(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;a=a+4|0;while(1){if((b|0)==(d|0))break;e=c[a>>2]|0;c[e>>2]=c[b>>2];c[a>>2]=e+4;b=b+4|0}return}function Lu(a,b,d){a=a|0;b=b|0;d=d|0;cf(a);c[a>>2]=4948;o=0;bb(108,a+8|0,b|0,d|0);d=o;o=0;if(d&1){d=Fb()|0;ff(a);Qb(d|0)}else return}function Mu(a){a=a|0;wv(a);c[a>>2]=9384;c[a+8>>2]=-1;return}function Nu(a){a=a|0;c[a>>2]=9684;Ru(a+8|0);pv(a);return}function Ou(a){a=a|0;Nu(a);cU(a);return}function Pu(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,m=0;k=l;l=l+16|0;j=k;i=b+8|0;h=(c[b+12>>2]|0)-(c[i>>2]|0)>>2;g=0;while(1){if((g|0)>=(h|0)){b=10;break}b=Qu((c[i>>2]|0)+(g<<2)|0)|0;f=c[(c[b>>2]|0)+16>>2]|0;o=0;Xa(129,j|0,e|0);m=o;o=0;if(m&1){f=Gb(24)|0;b=z}else{o=0;db(f|0,a|0,b|0,d|0,j|0);m=o;o=0;if(!(m&1)){b=11;break}f=Gb(24)|0;b=z;Sf(j)}if((b|0)!=(mc(24)|0)){b=9;break}Bb(f|0)|0;Db();g=g+1|0}if((b|0)==9)Qb(f|0);else if((b|0)==10){m=Ab(8)|0;cm(m);Mb(m|0,488,58)}else if((b|0)==11){Sf(j);l=k;return}}function Qu(a){a=a|0;return c[a>>2]|0}function Ru(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Su(e)}cU(c[a>>2]|0)}return}function Su(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Tu(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;s=l;l=l+64|0;q=s+56|0;d=s+52|0;e=s+48|0;f=s+44|0;g=s+40|0;i=s+32|0;h=s+24|0;j=s+20|0;k=s+16|0;m=s+12|0;n=s+8|0;p=s;wv(a);c[a>>2]=9684;t=a+8|0;c[t>>2]=0;r=a+12|0;c[r>>2]=0;c[a+16>>2]=0;vh(d,8);o=0;c[q>>2]=c[d>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;a:do if(!(v&1)){if(!d){vh(e,7);o=0;c[q>>2]=c[e>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(v&1){u=17;break}if(!d){vh(f,15);o=0;c[q>>2]=c[f>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(v&1){u=17;break}if(!d){vh(g,16);o=0;c[q>>2]=c[g>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(v&1){u=17;break}if(d)u=9}else u=9}else u=9}else u=9;b:do if((u|0)==9){o=0;f=fa(107,20)|0;v=o;o=0;do if(v&1)d=Fb()|0;else{o=0;Xa(86,i|0,b|0);v=o;o=0;if(!(v&1)){o=0;Xa(254,f|0,i|0);v=o;o=0;if(!(v&1)){o=0;Xa(255,q|0,f|0);v=o;o=0;if(v&1)e=0;else{d=c[r>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(256,t|0,q|0);v=o;o=0;if(v&1){d=Fb()|0;Su(q);me(i);break}}else{Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}Su(q);me(i);break b}}else e=1;d=Fb()|0;me(i);if(!e)break}else d=Fb()|0;cU(f)}while(0);break a}while(0);vh(h,3);o=0;c[q>>2]=c[h>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(!(v&1)){c:do if(d){o=0;d=fa(107,36)|0;v=o;o=0;do if(!(v&1)){o=0;Na(330,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(!(v&1)){d=c[r>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(256,t|0,q|0);v=o;o=0;if(v&1){d=Fb()|0;Su(q);break}}else{Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}Su(q);break c}else u=33}else u=33;while(0);if((u|0)==33)d=Fb()|0;break a}while(0);vh(j,4);o=0;c[q>>2]=c[j>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(!(v&1)){d:do if(d){o=0;d=fa(107,32)|0;v=o;o=0;do if(!(v&1)){o=0;Na(331,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(!(v&1)){d=c[r>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(256,t|0,q|0);v=o;o=0;if(v&1){d=Fb()|0;Su(q);break}}else{Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}Su(q);break d}else u=46}else u=46;while(0);if((u|0)==46)d=Fb()|0;break a}while(0);vh(k,5);o=0;c[q>>2]=c[k>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(!(v&1)){e:do if(d){o=0;d=fa(107,8)|0;v=o;o=0;do if(!(v&1)){o=0;Na(332,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(!(v&1)){d=c[r>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(256,t|0,q|0);v=o;o=0;if(v&1){d=Fb()|0;Su(q);break}}else{Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}Su(q);break e}else u=59}else u=59;while(0);if((u|0)==59)d=Fb()|0;break a}while(0);vh(m,9);o=0;c[q>>2]=c[m>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(!(v&1)){f:do if(d){o=0;d=fa(107,12)|0;v=o;o=0;do if(!(v&1)){o=0;Na(333,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(!(v&1)){d=c[r>>2]|0;if(d>>>0>=(c[a+16>>2]|0)>>>0){o=0;Xa(256,t|0,q|0);v=o;o=0;if(v&1){d=Fb()|0;Su(q);break}}else{Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}Su(q);break f}else u=72}else u=72;while(0);if((u|0)==72)d=Fb()|0;break a}while(0);vh(n,2);o=0;c[q>>2]=c[n>>2];d=ja(84,b|0,q|0)|0;v=o;o=0;if(!(v&1)){g:do if(d){o=0;d=fa(107,36)|0;v=o;o=0;h:do if(!(v&1)){o=0;Na(334,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(!(v&1)){d=c[r>>2]|0;do if(d>>>0<(c[a+16>>2]|0)>>>0){Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}else{o=0;Xa(256,t|0,q|0);v=o;o=0;if(!(v&1))break;d=Fb()|0;Su(q);break h}while(0);Su(q);break g}else u=85}else u=85;while(0);if((u|0)==85)d=Fb()|0;break a}while(0);i:do if((c[r>>2]|0)==(c[t>>2]|0)){o=0;f=fa(107,20)|0;v=o;o=0;j:do if(v&1)d=Fb()|0;else{o=0;Xa(86,p|0,b|0);v=o;o=0;if(!(v&1)){o=0;Xa(254,f|0,p|0);v=o;o=0;do if(v&1)e=1;else{o=0;Xa(255,q|0,f|0);v=o;o=0;if(v&1){e=0;break}d=c[r>>2]|0;e=a+16|0;do if(d>>>0<(c[e>>2]|0)>>>0){Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}else{o=0;Xa(256,t|0,q|0);v=o;o=0;if(!(v&1))break;d=Fb()|0;Su(q);me(p);break j}while(0);Su(q);me(p);o=0;d=fa(107,36)|0;v=o;o=0;k:do if(v&1)u=134;else{o=0;Na(330,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(v&1){u=134;break}d=c[r>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}else{o=0;Xa(256,t|0,q|0);v=o;o=0;if(!(v&1))break;d=Fb()|0;Su(q);break k}while(0);Su(q);o=0;d=fa(107,36)|0;v=o;o=0;l:do if(v&1)u=138;else{o=0;Na(334,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(v&1){u=138;break}d=c[r>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}else{o=0;Xa(256,t|0,q|0);v=o;o=0;if(!(v&1))break;d=Fb()|0;Su(q);break l}while(0);Su(q);o=0;d=fa(107,32)|0;v=o;o=0;m:do if(v&1)u=142;else{o=0;Na(331,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(v&1){u=142;break}d=c[r>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}else{o=0;Xa(256,t|0,q|0);v=o;o=0;if(!(v&1))break;d=Fb()|0;Su(q);break m}while(0);Su(q);o=0;d=fa(107,8)|0;v=o;o=0;n:do if(v&1)u=146;else{o=0;Na(332,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(v&1){u=146;break}d=c[r>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}else{o=0;Xa(256,t|0,q|0);v=o;o=0;if(!(v&1))break;d=Fb()|0;Su(q);break n}while(0);Su(q);o=0;d=fa(107,12)|0;v=o;o=0;o:do if(v&1)u=150;else{o=0;Na(333,d|0);v=o;o=0;if(v&1){v=Fb()|0;cU(d);d=v;break}o=0;Xa(255,q|0,d|0);v=o;o=0;if(v&1){u=150;break}d=c[r>>2]|0;do if(d>>>0<(c[e>>2]|0)>>>0){Vu(d,q);c[r>>2]=(c[r>>2]|0)+4}else{o=0;Xa(256,t|0,q|0);v=o;o=0;if(!(v&1))break;d=Fb()|0;Su(q);break o}while(0);Su(q);break i}while(0);if((u|0)==150)d=Fb()|0;break a}while(0);if((u|0)==146)d=Fb()|0;break a}while(0);if((u|0)==142)d=Fb()|0;break a}while(0);if((u|0)==138)d=Fb()|0;break a}while(0);if((u|0)==134)d=Fb()|0;break a}while(0);d=Fb()|0;me(p);if(!e)break}else d=Fb()|0;cU(f)}while(0);break a}while(0);l=s;return}else u=17}else u=17}else u=17}else u=17}else u=17}else u=17;while(0);if((u|0)==17)d=Fb()|0;Ru(t);pv(a);Qb(d|0)}function Uu(a,b){a=a|0;b=b|0;c[a>>2]=0;$u(a,b);return}function Vu(a,b){a=a|0;b=b|0;c[a>>2]=0;$u(a,c[b>>2]|0);return}function Wu(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=Xu(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Yu(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;Vu(c[g>>2]|0,b);c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(257,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;_u(d);Qb(k|0)}else{_u(d);l=h;return}}function Xu(a){a=a|0;return 1073741823}function Yu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Zu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;Vu((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function _u(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Su(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function $u(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function av(a){a=a|0;c[a>>2]=9712;hv(a+8|0);pv(a);return}function bv(a){a=a|0;av(a);cU(a);return}function cv(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;r=l;l=l+80|0;p=r+72|0;j=r+64|0;f=r+52|0;x=r+56|0;w=r+48|0;k=r+44|0;m=r+40|0;n=r+36|0;u=r+32|0;v=r+28|0;t=r+16|0;s=r+4|0;q=r;_d(f,e);o=0;Xa(258,j|0,f|0);i=o;o=0;if(i&1){x=Fb()|0;Sf(f);f=x}else{Sf(f);i=b+8|0;h=(c[b+12>>2]|0)-(c[i>>2]|0)>>2;g=0;while(1){if((g|0)>=(h|0)){b=43;break}dv(x,(c[i>>2]|0)+(g<<2)|0);o=0;Xa(124,w|0,0);b=o;o=0;if(b&1){b=9;break}f=ev(x)|0;b=c[(c[f>>2]|0)+28>>2]|0;o=0;Xa(129,k|0,e|0);y=o;o=0;if(y&1){f=Gb(24)|0;b=z}else{o=0;hb(b|0,p|0,f|0,d|0,k|0,j|0);y=o;o=0;if(!(y&1)){b=8;break}f=Gb(24)|0;b=z;Sf(k)}if((b|0)!=(mc(24)|0)){b=40;break}Bb(f|0)|0;o=0;La(44);y=o;o=0;if(y&1){b=14;break}le(w);fv(x);g=g+1|0}a:do if((b|0)==8){Mr(w,p)|0;le(p);Sf(k);f=Ie(w)|0;o=0;f=fa(130,f|0)|0;y=o;o=0;if(y&1)b=14;else{c[m>>2]=f;b:do if((mg(m)|0)==8){y=Ie(w)|0;o=0;Xa(94,n|0,y|0);y=o;o=0;if(y&1){b=14;break a}f=Je(n)|0;o=0;f=ja(85,f|0,0)|0;y=o;o=0;if(y&1){f=Fb()|0;Ke(n);b=40;break a}Ke(n);if(f<<24>>24==48){o=0;g=fa(107,40)|0;y=o;o=0;if(y&1){f=Fb()|0;b=40;break a}y=Ie(w)|0;o=0;Xa(94,v|0,y|0);y=o;o=0;do if(!(y&1)){y=Je(v)|0;o=0;bb(109,u|0,y|0,1);y=o;o=0;if(y&1){f=Fb()|0;Ke(v);break}y=Ie(w)|0;o=0;Xa(219,t|0,y|0);y=o;o=0;if(y&1){f=Fb()|0;b=1}else{f=Ie(w)|0;o=0;f=fa(109,f|0)|0;y=o;o=0;if(!(y&1)?(o=0,Xa(96,s|0,f|0),y=o,o=0,!(y&1)):0){vh(q,15);o=0;c[p>>2]=c[q>>2];hb(47,g|0,u|0,t|0,s|0,p|0);y=o;o=0;do if(y&1)f=1;else{o=0;Xa(124,a|0,g|0);y=o;o=0;if(y&1){f=0;break}Qe(s);Nd(t);Ke(u);Ke(v);break b}while(0);y=Fb()|0;Qe(s);b=f;f=y}else{f=Fb()|0;b=1}Nd(t)}Ke(u);Ke(v);if(!b){b=40;break a}}else f=Fb()|0;while(0);cU(g);b=40;break a}else b=38}else b=38;while(0);if((b|0)==38)zf(a,w);le(w);fv(x);l=r;return}}else if((b|0)==9)f=Fb()|0;else if((b|0)==43){y=Ab(8)|0;cm(y);Mb(y|0,488,58)}while(0);if((b|0)==14){f=Fb()|0;b=40}if((b|0)==40)le(w);fv(x)}Qb(f|0)}function dv(a,b){a=a|0;b=b|0;c[a>>2]=0;gv(a,c[b>>2]|0);return}function ev(a){a=a|0;return c[a>>2]|0}function fv(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function gv(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function hv(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;fv(e)}cU(c[a>>2]|0)}return}function iv(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,m=0,n=0;j=l;l=l+32|0;h=j+16|0;e=j+12|0;d=j+8|0;f=j+4|0;g=j;wv(a);c[a>>2]=9712;m=a+8|0;c[m>>2]=0;i=a+12|0;c[i>>2]=0;c[a+16>>2]=0;vh(e,8);o=0;c[h>>2]=c[e>>2];e=ja(84,b|0,h|0)|0;n=o;o=0;a:do if(!(n&1)){b:do if(!e){vh(d,15);o=0;c[h>>2]=c[d>>2];d=ja(84,b|0,h|0)|0;n=o;o=0;if(n&1){k=11;break a}if(d){o=0;d=fa(107,52)|0;n=o;o=0;do if(!(n&1)){o=0;Na(336,d|0);n=o;o=0;if(n&1){n=Fb()|0;cU(d);d=n;break}o=0;Xa(259,h|0,d|0);n=o;o=0;if(!(n&1)){d=c[i>>2]|0;if(d>>>0<(c[a+16>>2]|0)>>>0){o=0;Xa(260,d|0,h|0);n=o;o=0;if(n&1)k=28;else{c[i>>2]=(c[i>>2]|0)+4;k=25}}else{o=0;Xa(261,m|0,h|0);n=o;o=0;if(n&1)k=28;else k=25}if((k|0)==25){fv(h);break b}else if((k|0)==28){d=Fb()|0;fv(h);break}}else k=26}else k=26;while(0);if((k|0)==26)d=Fb()|0;break a}}else{o=0;d=fa(107,32)|0;n=o;o=0;do if(!(n&1)){o=0;Na(335,d|0);n=o;o=0;if(n&1){n=Fb()|0;cU(d);d=n;break}o=0;Xa(259,h|0,d|0);n=o;o=0;if(!(n&1)){d=c[i>>2]|0;if(d>>>0<(c[a+16>>2]|0)>>>0){o=0;Xa(260,d|0,h|0);n=o;o=0;if(n&1)k=14;else{c[i>>2]=(c[i>>2]|0)+4;k=10}}else{o=0;Xa(261,m|0,h|0);n=o;o=0;if(n&1)k=14;else k=10}if((k|0)==10){fv(h);break b}else if((k|0)==14){d=Fb()|0;fv(h);break}}else k=12}else k=12;while(0);if((k|0)==12)d=Fb()|0;break a}while(0);vh(f,7);o=0;c[h>>2]=c[f>>2];d=ja(84,b|0,h|0)|0;n=o;o=0;if(!(n&1)){c:do if(d){o=0;d=fa(107,32)|0;n=o;o=0;do if(!(n&1)){o=0;Na(337,d|0);n=o;o=0;if(n&1){n=Fb()|0;cU(d);d=n;break}o=0;Xa(259,h|0,d|0);n=o;o=0;if(!(n&1)){d=c[i>>2]|0;if(d>>>0<(c[a+16>>2]|0)>>>0){o=0;Xa(260,d|0,h|0);n=o;o=0;if(n&1)k=42;else{c[i>>2]=(c[i>>2]|0)+4;k=39}}else{o=0;Xa(261,m|0,h|0);n=o;o=0;if(n&1)k=42;else k=39}if((k|0)==39){fv(h);break c}else if((k|0)==42){d=Fb()|0;fv(h);break}}else k=40}else k=40;while(0);if((k|0)==40)d=Fb()|0;break a}while(0);vh(g,16);o=0;c[h>>2]=c[g>>2];d=ja(84,b|0,h|0)|0;n=o;o=0;if(!(n&1)){d:do if(d){o=0;d=fa(107,32)|0;n=o;o=0;do if(!(n&1)){o=0;Na(338,d|0);n=o;o=0;if(n&1){n=Fb()|0;cU(d);d=n;break}o=0;Xa(259,h|0,d|0);n=o;o=0;if(!(n&1)){d=c[i>>2]|0;if(d>>>0<(c[a+16>>2]|0)>>>0){o=0;Xa(260,d|0,h|0);n=o;o=0;if(n&1)k=56;else{c[i>>2]=(c[i>>2]|0)+4;k=53}}else{o=0;Xa(261,m|0,h|0);n=o;o=0;if(n&1)k=56;else k=53}if((k|0)==53){fv(h);break d}else if((k|0)==56){d=Fb()|0;fv(h);break}}else k=54}else k=54;while(0);if((k|0)==54)d=Fb()|0;break a}while(0);e:do if((c[i>>2]|0)==(c[m>>2]|0)){o=0;d=fa(107,32)|0;n=o;o=0;do if(!(n&1)){o=0;Na(335,d|0);n=o;o=0;if(n&1){n=Fb()|0;cU(d);d=n;break}o=0;Xa(259,h|0,d|0);n=o;o=0;if(!(n&1)){d=c[i>>2]|0;e=a+16|0;if(d>>>0<(c[e>>2]|0)>>>0){o=0;Xa(260,d|0,h|0);n=o;o=0;if(n&1)k=83;else c[i>>2]=(c[i>>2]|0)+4}else{o=0;Xa(261,m|0,h|0);n=o;o=0;if(n&1)k=83}if((k|0)==83){d=Fb()|0;fv(h);break}fv(h);o=0;d=fa(107,32)|0;n=o;o=0;do if(!(n&1)){o=0;Na(337,d|0);n=o;o=0;if(n&1){n=Fb()|0;cU(d);d=n;break}o=0;Xa(259,h|0,d|0);n=o;o=0;if(!(n&1)){d=c[i>>2]|0;do if(d>>>0>=(c[e>>2]|0)>>>0){o=0;Xa(261,m|0,h|0);n=o;o=0;if(n&1)k=87}else{o=0;Xa(260,d|0,h|0);n=o;o=0;if(n&1){k=87;break}c[i>>2]=(c[i>>2]|0)+4}while(0);if((k|0)==87){d=Fb()|0;fv(h);break}fv(h);o=0;d=fa(107,32)|0;n=o;o=0;do if(!(n&1)){o=0;Na(338,d|0);n=o;o=0;if(n&1){n=Fb()|0;cU(d);d=n;break}o=0;Xa(259,h|0,d|0);n=o;o=0;if(n&1){k=89;break}d=c[i>>2]|0;do if(d>>>0>=(c[e>>2]|0)>>>0){o=0;Xa(261,m|0,h|0);n=o;o=0;if(n&1)k=91;else k=80}else{o=0;Xa(260,d|0,h|0);n=o;o=0;if(n&1){k=91;break}c[i>>2]=(c[i>>2]|0)+4;k=80}while(0);if((k|0)==80){fv(h);break e}else if((k|0)==91){d=Fb()|0;fv(h);break}}else k=89;while(0);if((k|0)==89)d=Fb()|0;break a}else k=85}else k=85;while(0);if((k|0)==85)d=Fb()|0;break a}else k=81}else k=81;while(0);if((k|0)==81)d=Fb()|0;break a}while(0);l=j;return}else k=11}else k=11}else k=11;while(0);if((k|0)==11)d=Fb()|0;hv(m);pv(a);Qb(d|0)}function jv(a,b){a=a|0;b=b|0;c[a>>2]=0;gv(a,b);return}function kv(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;h=l;l=l+32|0;g=h;d=a+4|0;e=((c[d>>2]|0)-(c[a>>2]|0)>>2)+1|0;f=lv(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;mv(g,k>>2>>>0>>1>>>0?(j>>>0>>0?e:j):f,(c[d>>2]|0)-i>>2,a+8|0);d=g+8|0;o=0;Xa(260,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+4,o=0,Xa(262,a|0,g|0),k=o,o=0,!(k&1)):0){ov(g);l=h;return}k=Fb()|0;ov(g);Qb(k|0)}function lv(a){a=a|0;return 1073741823}function mv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function nv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;dv((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function ov(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;fv(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function pv(a){a=a|0;Gh(a);return}function qv(a){a=a|0;pv(a);cU(a);return}function rv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,h=0,i=0.0,j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0;q=l;l=l+32|0;k=q+28|0;f=q+16|0;r=q+24|0;p=q+8|0;n=q;o=0;Xa(85,k|0,d|0);h=o;o=0;a:do if(h&1){f=Gb(488)|0;h=z;m=9}else{o=0;Xa(86,f|0,e|0);h=o;o=0;do if(!(h&1)){o=0;db(90,a|0,b|0,k|0,f|0);h=o;o=0;if(h&1){m=Gb(488)|0;h=z;me(f);f=m;break}else{me(f);ne(k);break a}}else{f=Gb(488)|0;h=z}while(0);ne(k);m=9}while(0);b:do if((m|0)==9){if((h|0)==(mc(488)|0)){h=Bb(f|0)|0;o=0;f=fa(137,e|0)|0;k=o;o=0;do if(k&1)f=Fb()|0;else{if(f){f=vi(d)|0;o=0;f=fa(138,f|0)|0;k=o;o=0;if(!(k&1))if(f){d=vi(d)|0;o=0;Xa(263,r|0,d|0);d=o;o=0;if(!(d&1)){o=0;Xa(85,p|0,r|0);d=o;o=0;c:do if(d&1)f=Fb()|0;else{o=0;Xa(86,n|0,e|0);e=o;o=0;do if(e&1)f=Fb()|0;else{o=0;db(90,a|0,b|0,p|0,n|0);e=o;o=0;if(e&1){f=Fb()|0;me(n);break}me(n);ne(p);m=Ie(a)|0;o=0;m=fa(109,m|0)|0;p=o;o=0;d:do if(p&1)f=Fb()|0;else{e:do if(tv(m)|0){if(Pr(Me(m)|0)|0)break;f=vi(r)|0;o=0;f=fa(129,f|0)|0;p=o;o=0;if(p&1){f=Fb()|0;break d}j=+(f|0);h=0;while(1){if((h|0)>=(Ne(Me(m)|0)|0))break e;o=0;k=ja(55,m|0,h|0)|0;p=o;o=0;if(p&1){m=32;break}o=0;b=fa(107,16)|0;p=o;o=0;if(p&1){m=32;break}o=0;f=ja(55,m|0,h|0)|0;p=o;o=0;if(p&1){m=41;break}p=Pe(f)|0;o=0;i=+X(c[(c[p>>2]|0)+12>>2]|0,p|0);p=o;o=0;if(p&1){m=41;break}o=0;f=ja(55,m|0,h|0)|0;p=o;o=0;if(p&1){m=41;break}p=Pe(f)|0;o=0;g=+X(c[(c[p>>2]|0)+8>>2]|0,p|0);p=o;o=0;if(p&1){m=41;break}o=0;Pa(43,b|0,+(j-i+-1.0),+g);p=o;o=0;if(p&1){m=41;break}gi(k,b);h=h+1|0}if((m|0)==32){f=Fb()|0;break d}else if((m|0)==41){f=Fb()|0;cU(b);break d}}while(0);ne(r);Db();break b}while(0);le(a);break c}while(0);ne(p)}while(0);ne(r);break}}else m=45}else m=45;if((m|0)==45){r=Ab(8)|0;uv(r,h);o=0;bb(68,r|0,488,58);o=0}f=Fb()|0}while(0);o=0;La(44);r=o;o=0;if(r&1){r=Gb(0)|0;_g(r)}else s=f}else s=f;Qb(s|0)}while(0);l=q;return}function sv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0.0,i=0.0,j=0,k=0.0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;x=l;l=l+32|0;y=x+24|0;s=x+20|0;t=x+4|0;u=x;v=x+8|0;g=Uf(vi(d)|0)|0;r=Wf(vi(d)|0)|0;f=aU(24)|0;o=0;Xa(133,f|0,g|0);q=o;o=0;if(q&1){y=Fb()|0;cU(f);f=y}else{jj(y,f);q=r>>1;o=0;f=fa(137,e|0)|0;p=o;o=0;a:do if(p&1)f=Fb()|0;else{p=r>>(f?8:5);p=(p|0)>1?p:1;n=f?r:15;k=+(g|0);f=0;b:while(1){if((f|0)>=(n|0)){w=53;break}m=f+1|0;j=m>>1;j=(O((f&1|0)==0?j:0-j|0,p)|0)+q|0;if(!((j|0)>-1&(j|0)<(r|0))){w=53;break}g=vi(d)|0;_d(t,y);o=0;db(91,s|0,g|0,j|0,t|0);g=o;o=0;if(g&1){f=Gb(488)|0;j=z;Sf(t);if((j|0)!=(mc(488)|0))break a;Bb(f|0)|0;o=0;La(44);j=o;o=0;if(j&1){w=12;break}else{f=m;continue}}vv(y,s)|0;Sf(s);Sf(t);g=0;while(1){if((g|0)>=2){f=m;continue b}f=(g|0)==1;if(f?(e=Xd(y)|0,o=0,Na(323,e|0),e=o,o=0,e&1):0){w=16;break b}e=c[(c[b>>2]|0)+16>>2]|0;_d(u,y);o=0;db(e|0,a|0,b|0,j|0,u|0);e=o;o=0;if(e&1){f=Gb(24)|0;e=z;Sf(u)}else{Sf(u);if(!f)break b;f=Ie(a)|0;o=0;f=fa(109,f|0)|0;e=o;o=0;if(!(e&1)?(o=0,Xa(96,v|0,f|0),e=o,o=0,!(e&1)):0){if(!(tv(v)|0)){w=47;break b}o=0;e=fa(107,16)|0;f=o;o=0;c:do if(f&1){f=Gb(24)|0;e=z;w=42}else{o=0;f=ja(55,v|0,0)|0;A=o;o=0;do if(!(A&1)){A=Pe(f)|0;o=0;i=+X(c[(c[A>>2]|0)+8>>2]|0,A|0);A=o;o=0;if(A&1)break;o=0;f=ja(55,v|0,0)|0;A=o;o=0;if(A&1)break;A=Pe(f)|0;o=0;h=+X(c[(c[A>>2]|0)+12>>2]|0,A|0);A=o;o=0;if(A&1)break;o=0;Pa(43,e|0,+(k-i+-1.0),+h);A=o;o=0;if(A&1)break;bi(s,e);o=0;f=ja(55,v|0,0)|0;A=o;o=0;if(A&1){f=Gb(24)|0;e=z;fi(s);w=42;break c}ci(f,s)|0;fi(s);o=0;e=fa(107,16)|0;A=o;o=0;d:do if(A&1){f=Gb(24)|0;e=z}else{o=0;f=ja(55,v|0,1)|0;A=o;o=0;do if(!(A&1)){A=Pe(f)|0;o=0;i=+X(c[(c[A>>2]|0)+8>>2]|0,A|0);A=o;o=0;if(A&1)break;o=0;f=ja(55,v|0,1)|0;A=o;o=0;if(A&1)break;A=Pe(f)|0;o=0;h=+X(c[(c[A>>2]|0)+12>>2]|0,A|0);A=o;o=0;if(A&1)break;o=0;Pa(43,e|0,+(k-i+-1.0),+h);A=o;o=0;if(A&1)break;bi(s,e);o=0;f=ja(55,v|0,1)|0;A=o;o=0;if(!(A&1)){w=36;break b}f=Gb(24)|0;e=z;fi(s);break d}while(0);f=Gb(24)|0;A=z;cU(e);e=A}while(0);break c}while(0);f=Gb(24)|0;w=z;cU(e);e=w;w=42}while(0);if((w|0)==42)w=0;Qe(v)}else{f=Gb(24)|0;e=z}le(a)}if((e|0)!=(mc(24)|0))break a;Bb(f|0)|0;o=0;La(44);A=o;o=0;if(A&1){w=16;break b}g=g+1|0}}if((w|0)==12){f=Fb()|0;break}else if((w|0)==16){f=Fb()|0;break}else if((w|0)==36){ci(f,s)|0;fi(s);w=47}else if((w|0)==53){f=Ab(8)|0;cm(f);o=0;bb(68,f|0,488,58);o=0;f=Fb()|0;break}if((w|0)==47)Qe(v);Sf(y);l=x;return}while(0);Sf(y)}Qb(f|0)}function tv(a){a=a|0;return (c[a+8>>2]|0)!=0|0}function uv(a,b){a=a|0;b=b|0;$t(a,b);c[a>>2]=5676;return}function vv(a,b){a=a|0;b=b|0;sf(a,c[b>>2]|0);return a|0}function wv(a){a=a|0;zh(a);c[a>>2]=9740;return}function xv(a,b,d){a=a|0;b=b|0;d=d|0;return yv(a,c[b>>2]|0,d)|0}function yv(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;i=c[a>>2]|0;j=(c[a+4>>2]|0)-i>>2;h=0;a=0;e=0;while(1){if((e|0)>=(j|0))break;h=(c[i+(e<<2)>>2]|0)+h|0;a=(c[b+(e<<2)>>2]|0)+a|0;e=e+1|0}a:do if(h>>>0>>0)a=2147483647;else{g=(h<<8>>>0)/(a>>>0)|0;d=(O(g,d)|0)>>8;a=0;e=0;while(1){if((a|0)>=(j|0))break;f=c[i+(a<<2)>>2]<<8;k=O(c[b+(a<<2)>>2]|0,g)|0;f=(f|0)>(k|0)?f-k|0:k-f|0;if((f|0)>(d|0)){a=2147483647;break a}a=a+1|0;e=f+e|0}a=(e>>>0)/(h>>>0)|0}while(0);return a|0}function zv(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;f=c[d>>2]|0;i=(c[d+4>>2]|0)-f>>2;e=0;while(1){if((e|0)>=(i|0))break;c[f+(e<<2)>>2]=0;e=e+1|0}h=Dk(Xd(a)|0)|0;if((h|0)<=(b|0)){j=Ab(8)|0;cm(j);Mb(j|0,488,58)}g=b;e=0;f=(Ui(Xd(a)|0,b)|0)^1;while(1){if((g|0)>=(h|0)){j=13;break}if(f^(Ui(Xd(a)|0,g)|0)){b=(c[d>>2]|0)+(e<<2)|0;c[b>>2]=(c[b>>2]|0)+1}else{b=e+1|0;if((b|0)==(i|0))break;c[(c[d>>2]|0)+(b<<2)>>2]=1;e=b;f=f^1}g=g+1|0}if(((j|0)==13?(e|0)!=(i|0):0)?!((g|0)==(h|0)&(e|0)==(i+-1|0)):0){j=Ab(8)|0;cm(j);Mb(j|0,488,58)}return}function Av(a,b,d){a=a|0;b=+b;d=+d;Zh(a,b,d);c[a>>2]=9768;return}function Bv(a){a=a|0;Vh(a);cU(a);return}function Cv(a){a=a|0;c[a>>2]=9792;hu(a+20|0);Lv(a);return}function Dv(a){a=a|0;Cv(a);cU(a);return}function Ev(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;f=l;l=l+16|0;e=f+12|0;h=f+8|0;g=f;ie(h,c);o=0;Xa(86,g|0,d|0);d=o;o=0;if(d&1)a=Fb()|0;else{o=0;db(53,e|0,b+20|0,h|0,g|0);d=o;o=0;do if(!(d&1)){o=0;Xa(264,a|0,e|0);d=o;o=0;if(d&1){a=Fb()|0;le(e);break}else{le(e);me(g);ne(h);l=f;return}}else a=Fb()|0;while(0);me(g)}ne(h);Qb(a|0)}function Fv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+16|0;e=f+4|0;g=f;_d(g,d);o=0;db(58,e|0,b+20|0,c|0,g|0);d=o;o=0;do if(!(d&1)){o=0;Xa(264,a|0,e|0);d=o;o=0;if(d&1){a=Fb()|0;le(e);break}else{le(e);Sf(g);l=f;return}}else a=Fb()|0;while(0);Sf(g);Qb(a|0)}function Gv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=l;l=l+16|0;e=f;_d(e,b);o=0;a=pa(42,a+20|0,e|0,c|0,d|0)|0;d=o;o=0;if(d&1){f=Fb()|0;Sf(e);Qb(f|0)}else{Sf(e);l=f;return a|0}return 0}function Hv(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;g=l;l=l+16|0;f=g+4|0;h=g;_d(h,d);o=0;hb(42,f|0,b+20|0,c|0,h|0,e|0);e=o;o=0;do if(!(e&1)){o=0;Xa(264,a|0,f|0);e=o;o=0;if(e&1){a=Fb()|0;le(f);break}else{le(f);Sf(h);l=g;return}}else a=Fb()|0;while(0);Sf(h);Qb(a|0)}function Iv(a){a=a|0;var b=0;b=l;l=l+16|0;a=b;vh(a,15);l=b;return c[a>>2]|0}function Jv(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0;i=l;l=l+64|0;k=i+40|0;e=i+36|0;p=i+32|0;m=i+28|0;n=i+16|0;j=i+4|0;h=i;Oh(e,Ie(d)|0);f=Je(e)|0;o=0;f=fa(108,f|0)|0;g=o;o=0;do if(g&1){p=Fb()|0;Ke(e);e=p}else{Ke(e);if((a[((a[f+11>>0]|0)<0?c[f>>2]|0:f)>>0]|0)!=48){e=Ab(8)|0;o=0;Na(325,e|0);p=o;o=0;if(p&1){p=Fb()|0;Jb(e|0);e=p;break}else Mb(e|0,160,61)}g=aU(20)|0;o=0;hb(51,k|0,f|0,1,-1,f|0);f=o;o=0;if(!(f&1)){o=0;Xa(140,g|0,k|0);f=o;o=0;if(!(f&1)){o=0;Xa(173,p|0,g|0);f=o;o=0;if(f&1)f=0;else{pU(k);o=0;g=fa(107,40)|0;f=o;o=0;do if(f&1)e=Fb()|0;else{Mh(m,p);f=Ie(d)|0;o=0;Xa(219,n|0,f|0);f=o;o=0;if(!(f&1)){e=Ie(d)|0;o=0;e=fa(109,e|0)|0;d=o;o=0;if(!(d&1)?(o=0,Xa(96,j|0,e|0),d=o,o=0,!(d&1)):0){vh(h,15);o=0;c[k>>2]=c[h>>2];hb(47,g|0,m|0,n|0,j|0,k|0);k=o;o=0;if(!(k&1)){o=0;Xa(124,b|0,g|0);k=o;o=0;if(k&1)e=0;else{Qe(j);Nd(n);Ke(m);Ke(p);l=i;return}}else e=1;k=Fb()|0;Qe(j);f=e;e=k}else{e=Fb()|0;f=1}Nd(n);Ke(m);if(!f)break}else{e=Fb()|0;Ke(m)}cU(g)}while(0);Ke(p);break}}else f=1;e=Fb()|0;pU(k);if(!f)break}else e=Fb()|0;cU(g)}while(0);Qb(e|0)}function Kv(a){a=a|0;var b=0;ew(a);c[a>>2]=9792;o=0;Na(335,a+20|0);b=o;o=0;if(b&1){b=Fb()|0;Lv(a);Qb(b|0)}else return}function Lv(a){a=a|0;c[a>>2]=9840;pU(a+8|0);pv(a);return}function Mv(a){a=a|0;Lv(a);cU(a);return}function Nv(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;i=l;l=l+32|0;j=i+16|0;f=i+8|0;g=i;h=c[(c[b>>2]|0)+28>>2]|0;_d(j,e);o=0;Xa(129,g|0,e|0);e=o;o=0;if(e&1)a=Fb()|0;else{o=0;Xa(258,f|0,g|0);e=o;o=0;if(!(e&1)?(o=0,hb(h|0,a|0,b|0,d|0,j|0,f|0),h=o,o=0,!(h&1)):0){Sf(g);Sf(j);l=i;return}a=Fb()|0;Sf(g)}Sf(j);Qb(a|0)}function Ov(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=l;l=l+16|0;b=e;_d(b,c);o=0;hb(53,a|0,b|0,d|0,0,58792);d=o;o=0;if(d&1){d=Fb()|0;Sf(b);Qb(d|0)}else{Sf(b);l=e;return}}function Pv(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.0,m=0.0,n=0.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;u=l;l=l+80|0;s=u+64|0;i=u+60|0;r=u+48|0;j=u+56|0;z=u+44|0;y=u+32|0;w=u+28|0;x=u+16|0;v=u+4|0;t=u;q=d+8|0;p=q+11|0;if((a[p>>0]|0)<0){h=c[q>>2]|0;a[s>>0]=0;ah(h,s);c[d+12>>2]=0}else{a[s>>0]=0;ah(q,s);a[p>>0]=0}h=c[(c[d>>2]|0)+24>>2]|0;_d(i,f);o=0;h=pa(h|0,d|0,i|0,g|0,q|0)|0;B=o;o=0;do if(B&1){h=Fb()|0;Sf(i)}else{Sf(i);B=c[(c[d>>2]|0)+20>>2]|0;_d(j,f);o=0;db(B|0,r|0,d|0,j|0,h|0);B=o;o=0;if(B&1){h=Fb()|0;Sf(j);break}Sf(j);h=c[(Vt(r,1)|0)>>2]|0;i=h-(c[(Vt(r,0)|0)>>2]|0)+h|0;if((i|0)<(Dk(Xd(f)|0)|0)?Hk(Xd(f)|0,h,i,0)|0:0){h=a[p>>0]|0;if(h<<24>>24<0)h=c[d+12>>2]|0;else h=h&255;do if(h>>>0<8){h=Ab(8)|0;o=0;Na(325,h|0);B=o;o=0;if(B&1){B=Fb()|0;Jb(h|0);h=B;break}else Mb(h|0,160,61)}else{h=aU(20)|0;o=0;Xa(140,h|0,q|0);B=o;o=0;if(B&1){B=Fb()|0;cU(h);h=B;break}aj(z,h);o=0;h=ja(c[(c[d>>2]|0)+32>>2]|0,d|0,z|0)|0;B=o;o=0;do if(B&1)A=23;else{if(!h){A=Ab(8)|0;dg(A);o=0;bb(68,A|0,144,56);o=0;A=23;break}i=c[(lu(g,1)|0)>>2]|0;m=+((c[(lu(g,0)|0)>>2]|0)+i|0)*.5;i=c[(Vt(r,1)|0)>>2]|0;n=+((c[(Vt(r,0)|0)>>2]|0)+i|0)*.5;o=0;i=fa(c[(c[d>>2]|0)+36>>2]|0,d|0)|0;B=o;o=0;if(B&1){h=Fb()|0;break}o=0;Xa(249,y|0,2);B=o;o=0;if(B&1){h=Fb()|0;break}o=0;h=fa(107,16)|0;B=o;o=0;a:do if(B&1){h=Fb()|0;A=42}else{k=+(e|0);o=0;Pa(43,h|0,+m,+k);B=o;o=0;if(B&1){A=Fb()|0;cU(h);h=A;A=42;break}bi(s,h);o=0;h=ja(55,y|0,0)|0;B=o;o=0;if(B&1){h=Fb()|0;fi(s);A=42;break}ci(h,s)|0;fi(s);o=0;h=fa(107,16)|0;B=o;o=0;do if(B&1)h=Fb()|0;else{o=0;Pa(43,h|0,+n,+k);B=o;o=0;if(B&1){B=Fb()|0;cU(h);h=B;break}bi(s,h);o=0;h=ja(55,y|0,1)|0;B=o;o=0;if(B&1){h=Fb()|0;fi(s);break}ci(h,s)|0;fi(s);o=0;j=fa(107,40)|0;B=o;o=0;if(B&1){h=Fb()|0;break a}Mh(w,z);Pg(x);o=0;Xa(96,v|0,y|0);B=o;o=0;if(B&1){h=Fb()|0;i=1}else{c[t>>2]=i;o=0;c[s>>2]=c[t>>2];hb(47,j|0,w|0,x|0,v|0,s|0);B=o;o=0;do if(B&1)h=1;else{o=0;Xa(124,b|0,j|0);B=o;o=0;if(B&1){h=0;break}Qe(v);Nd(x);Ke(w);Qe(y);Ke(z);l=u;return}while(0);B=Fb()|0;Qe(v);i=h;h=B}Nd(x);Ke(w);if(!i)break a;cU(j);break a}while(0)}while(0);Qe(y)}while(0);if((A|0)==23)h=Fb()|0;Ke(z)}while(0);break}B=Ab(8)|0;cm(B);Mb(B|0,488,58)}while(0);Qb(h|0)}function Qv(a,b){a=a|0;b=b|0;return Rv(b)|0}function Rv(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;b=Vm(Je(b)|0)|0;g=a[b+11>>0]|0;d=g<<24>>24<0;g=d?c[b+4>>2]|0:g&255;a:do if(!g)b=0;else{h=d?c[b>>2]|0:b;b=g;f=0;while(1){b=b+-2|0;if((b|0)<=-1)break;e=a[h+b>>0]|0;d=(e<<24>>24)+-48|0;e=e<<24>>24<48|(d|0)>9;if(e){b=0;break a}else f=(e?0:d)+f|0}e=g+-1|0;b=f*3|0;while(1){if((e|0)<=-1)break;g=a[h+e>>0]|0;d=(g<<24>>24)+-48|0;if(g<<24>>24<48|(d|0)>9){b=0;break a}e=e+-2|0;b=d+b|0}b=((b|0)%10|0|0)==0}while(0);return b|0}function Sv(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;h=l;l=l+32|0;i=h+8|0;j=h+4|0;g=h;k=(c[f+4>>2]|0)-(c[f>>2]|0)>>2;c[j>>2]=0;nj(i,k,j);o=0;Xa(129,g|0,b|0);b=o;o=0;do if(!(b&1)){o=0;jb(58,a|0,g|0,d|0,e|0,f|0,i|0);k=o;o=0;if(k&1){a=Fb()|0;Sf(g);break}else{Sf(g);pj(i);l=h;return}}else a=Fb()|0;while(0);pj(i);Qb(a|0)}function Tv(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,l=0,m=0,n=0,o=0,p=0;o=(c[f+4>>2]|0)-(c[f>>2]|0)>>2;p=Dk(Xd(b)|0)|0;h=Xd(b)|0;if(e){h=Qk(h,d)|0;d=1}else{h=Ok(h,d)|0;d=0}l=o+-1|0;m=o+-2|0;n=h;i=h;e=0;while(1){if((n|0)>=(p|0)){h=17;break}if(d^(Ui(Xd(b)|0,n)|0)){h=(c[g>>2]|0)+(e<<2)|0;c[h>>2]=(c[h>>2]|0)+1;h=i}else{if((e|0)==(l|0)){if((xv(g,f,179)|0)<122){h=10;break}j=c[g>>2]|0;k=c[j+4>>2]|0;i=(c[j>>2]|0)+i|0;h=2;while(1){if((h|0)>=(o|0))break;c[j+(h+-2<<2)>>2]=c[j+(h<<2)>>2];h=h+1|0}h=c[g>>2]|0;c[h+(m<<2)>>2]=0;c[h+(l<<2)>>2]=0;h=i+k|0;i=-1}else{h=i;i=1}e=i+e|0;c[(c[g>>2]|0)+(e<<2)>>2]=1;d=d^1}n=n+1|0;i=h}if((h|0)==10){du(a,i,n);return}else if((h|0)==17){a=Ab(8)|0;cm(a);Mb(a|0,488,58)}}function Uv(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;j=l;l=l+32|0;k=j+12|0;h=j;i=j+8|0;Vv(a);e=(c[14699]|0)-(c[14698]|0)>>2;c[h>>2]=0;nj(k,e,h);e=0;d=0;a:while(1){if(e){e=14;break}do{f=(c[14699]|0)-(c[14698]|0)>>2;g=c[k>>2]|0;e=0;while(1){if((e|0)>=(f|0))break;c[g+(e<<2)>>2]=0;e=e+1|0}o=0;Xa(129,i|0,b|0);g=o;o=0;if(g&1){e=10;break a}o=0;jb(58,h|0,i|0,d|0,0,58792,k|0);g=o;o=0;if(g&1){e=11;break a}f=h;d=c[f+4>>2]|0;e=a;c[e>>2]=c[f>>2];c[e+4>>2]=d;Sf(i);e=c[(Vt(a,0)|0)>>2]|0;d=c[(Vt(a,1)|0)>>2]|0;f=e-d+e|0}while((f|0)<=-1);g=Xd(b)|0;o=0;e=pa(54,g|0,f|0,e|0,0)|0;g=o;o=0;if(g&1){e=13;break}}if((e|0)==10){d=Fb()|0;e=12}else if((e|0)==11){d=Fb()|0;Sf(i);e=12}else if((e|0)==13)d=Fb()|0;else if((e|0)==14){pj(k);l=j;return}pj(k);Qb(d|0)}function Vv(a){a=a|0;return}function Wv(){Xv();Yv();Zv();_v();return}function Xv(){Ju(58792,10380,10392);return}function Yv(){Ju(58804,10360,10380);return}function Zv(){$v(58816,10200,10360);return}function _v(){$v(58828,9880,10200);return}function $v(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;e=d-b>>4;do if(e|0){o=0;Xa(265,a|0,e|0);f=o;o=0;if(!(f&1)?(o=0,db(92,a|0,b|0,d|0,e|0),f=o,o=0,!(f&1)):0)break;f=Fb()|0;aw(a);Qb(f|0)}while(0);return}function aw(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-4|0;c[a>>2]=e;b=e}cU(d)}return}function bw(a,b){a=a|0;b=b|0;var d=0;if((dw(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function cw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;a=a+4|0;while(1){if((b|0)==(d|0))break;c[c[a>>2]>>2]=b;c[a>>2]=(c[a>>2]|0)+4;b=b+16|0}return}function dw(a){a=a|0;return 1073741823}function ew(a){a=a|0;var b=0;wv(a);c[a>>2]=9840;b=a+8|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;a=0;while(1){if((a|0)==3)break;c[b+(a<<2)>>2]=0;a=a+1|0}return}function fw(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;h=l;l=l+16|0;f=h;_d(f,a);o=0;bb(100,f|0,d|0,b|0);g=o;o=0;if(g&1){h=Fb()|0;Sf(f);Qb(h|0)}Sf(f);g=(c[e+4>>2]|0)-(c[e>>2]|0)>>2;a=122;d=-1;f=0;while(1){if((f|0)>=(g|0))break;j=yv(b,c[(c[e>>2]|0)+(f<<2)>>2]|0,179)|0;i=(j|0)<(a|0);a=i?j:a;d=i?f:d;f=f+1|0}if((d|0)>-1){l=h;return d|0}else{j=Ab(8)|0;cm(j);Mb(j|0,488,58)}return 0}function gw(a){a=a|0;c[a>>2]=10400;pj(a+20|0);Lv(a);return}function hw(a){a=a|0;gw(a);cU(a);return}function iw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=l;l=l+16|0;b=e;_d(b,c);o=0;hb(53,a|0,b|0,d|0,1,58840);d=o;o=0;if(d&1){d=Fb()|0;Sf(b);Qb(d|0)}else{Sf(b);l=e;return}}function jw(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,m=0,n=0,p=0,q=0,r=0;r=l;l=l+16|0;q=r;p=a+20|0;f=c[p>>2]|0;n=a+24|0;a=c[n>>2]|0;while(1){if((a|0)==(f|0))break;m=a+-4|0;c[n>>2]=m;a=m}En(p,4);m=Dk(Xd(b)|0)|0;f=c[(lu(d,1)|0)>>2]|0;k=0;g=0;while(1){if(!((g|0)<6&(f|0)<(m|0))){a=6;break}_d(q,b);o=0;h=pa(55,q|0,p|0,f|0,58828)|0;j=o;o=0;if(j&1){a=11;break}Sf(q);xU(e,1,((h|0)%10|0)+48&255)|0;j=c[p>>2]|0;i=(c[n>>2]|0)-j>>2;d=0;a=f;while(1){if((d|0)>=(i|0))break;f=(c[j+(d<<2)>>2]|0)+a|0;d=d+1|0;a=f}f=a;k=((h|0)>9?1<<5-g:0)|k;g=g+1|0}if((a|0)==6){nw(e,k)|0;l=r;return f|0}else if((a|0)==11){r=Fb()|0;Sf(q);Qb(r|0)}return 0}function kw(a,b){a=a|0;b=b|0;var c=0,d=0;d=l;l=l+16|0;c=d;mw(c,b);o=0;a=ja(44,a|0,c|0)|0;b=o;o=0;if(b&1){d=Fb()|0;Ke(c);Qb(d|0)}else{Ke(c);l=d;return a|0}return 0}function lw(a){a=a|0;var b=0;b=l;l=l+16|0;a=b;vh(a,16);l=b;return c[a>>2]|0}function mw(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;j=l;l=l+32|0;k=j+12|0;h=j;f=Vm(Je(d)|0)|0;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[k+(d<<2)>>2]=0;d=d+1|0}e=f+11|0;o=0;la(84,k|0,1,a[((a[e>>0]|0)<0?c[f>>2]|0:f)>>0]|0)|0;d=o;o=0;a:do if(d&1)d=Fb()|0;else{d=a[((a[e>>0]|0)<0?c[f>>2]|0:f)+6>>0]|0;b:do switch(d<<24>>24|0){case 50:case 49:case 48:{o=0;hb(51,h|0,f|0,1,2,f|0);m=o;o=0;do if(m&1)d=Fb()|0;else{m=a[h+11>>0]|0;n=m<<24>>24<0;o=0;la(74,k|0,(n?c[h>>2]|0:h)|0,(n?c[h+4>>2]|0:m&255)|0)|0;m=o;o=0;if(m&1){d=Fb()|0;pU(h);break}pU(h);o=0;la(84,k|0,1,d|0)|0;n=o;o=0;if(n&1)break b;o=0;ja(86,k|0,46617)|0;n=o;o=0;if(n&1)break b;o=0;hb(51,h|0,f|0,3,3,f|0);n=o;o=0;do if(!(n&1)){n=a[h+11>>0]|0;m=n<<24>>24<0;o=0;la(74,k|0,(m?c[h>>2]|0:h)|0,(m?c[h+4>>2]|0:n&255)|0)|0;n=o;o=0;if(n&1){d=Fb()|0;pU(h);break}else{pU(h);i=47;break b}}else d=Fb()|0;while(0);break a}while(0);break a}case 51:{o=0;hb(51,h|0,f|0,1,3,f|0);n=o;o=0;do if(n&1)d=Fb()|0;else{n=a[h+11>>0]|0;m=n<<24>>24<0;o=0;la(74,k|0,(m?c[h>>2]|0:h)|0,(m?c[h+4>>2]|0:n&255)|0)|0;n=o;o=0;if(n&1){d=Fb()|0;pU(h);break}pU(h);o=0;ja(86,k|0,46622)|0;n=o;o=0;if(n&1)break b;o=0;hb(51,h|0,f|0,4,2,f|0);n=o;o=0;do if(!(n&1)){n=a[h+11>>0]|0;m=n<<24>>24<0;o=0;la(74,k|0,(m?c[h>>2]|0:h)|0,(m?c[h+4>>2]|0:n&255)|0)|0;n=o;o=0;if(n&1){d=Fb()|0;pU(h);break}else{pU(h);i=47;break b}}else d=Fb()|0;while(0);break a}while(0);break a}case 52:{o=0;hb(51,h|0,f|0,1,4,f|0);n=o;o=0;do if(!(n&1)){n=a[h+11>>0]|0;m=n<<24>>24<0;o=0;la(74,k|0,(m?c[h>>2]|0:h)|0,(m?c[h+4>>2]|0:n&255)|0)|0;n=o;o=0;if(n&1){d=Fb()|0;pU(h);break}pU(h);o=0;ja(86,k|0,46622)|0;n=o;o=0;if(n&1)break b;o=0;la(84,k|0,1,a[((a[e>>0]|0)<0?c[f>>2]|0:f)+5>>0]|0)|0;n=o;o=0;if(n&1)break b;else{i=47;break b}}else d=Fb()|0;while(0);break a}default:{o=0;hb(51,h|0,f|0,1,5,f|0);n=o;o=0;do if(!(n&1)){n=a[h+11>>0]|0;m=n<<24>>24<0;o=0;la(74,k|0,(m?c[h>>2]|0:h)|0,(m?c[h+4>>2]|0:n&255)|0)|0;n=o;o=0;if(n&1){d=Fb()|0;pU(h);break}pU(h);o=0;ja(86,k|0,46617)|0;n=o;o=0;if(n&1)break b;o=0;la(84,k|0,1,d|0)|0;n=o;o=0;if(n&1)break b;else{i=47;break b}}else d=Fb()|0;while(0);break a}}while(0);if(((i|0)==47?(o=0,la(84,k|0,1,a[((a[e>>0]|0)<0?c[f>>2]|0:f)+7>>0]|0)|0,n=o,o=0,!(n&1)):0)?(o=0,g=fa(107,20)|0,n=o,o=0,!(n&1)):0){o=0;Xa(140,g|0,k|0);n=o;o=0;if(n&1){d=Fb()|0;cU(g);break}o=0;Xa(173,b|0,g|0);n=o;o=0;if(!(n&1)){pU(k);l=j;return}}d=Fb()|0}while(0);pU(k);Qb(d|0)}function nw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=0;a:while(1){if((e|0)<2)d=0;else{d=0;break}while(1){if((d|0)>=10)break;if((c[10440+(e*40|0)+(d<<2)>>2]|0)==(b|0)){f=6;break a}d=d+1|0}e=e+1|0}if((f|0)==6){CU(a,0,1,e+48&255)|0;xU(a,1,d+48&255)|0;d=1}return d|0}function ow(){pw();return}function pw(){Ju(58840,10520,10544);return}function qw(a){a=a|0;ew(a);c[a>>2]=10400;c[a+20>>2]=0;c[a+24>>2]=0;c[a+28>>2]=0;return}function rw(a){a=a|0;Gh(a);cU(a);return}function sw(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;m=l;l=l+80|0;i=m+64|0;v=m+60|0;u=m+56|0;f=m+48|0;t=m+52|0;r=m+36|0;k=m+32|0;p=m+28|0;q=m+16|0;n=m+4|0;j=m;Vi(v,0);o=0;Xa(85,f|0,d|0);h=o;o=0;do if(h&1)d=Fb()|0;else{o=0;Xa(266,u|0,f|0);h=o;o=0;if(h&1){d=Fb()|0;ne(f);break}ne(f);o=0;bb(110,t|0,u|0,e|0);h=o;o=0;if(h&1)d=Fb()|0;else{h=Io(t)|0;o=0;Xa(120,r|0,h|0);h=o;o=0;if(h&1)d=Fb()|0;else{a:do if(!(tw(e)|0)){o=0;Xa(224,i|0,e|0);h=o;o=0;if(h&1)s=14;else{o=0;d=ja(87,i|0,0)|0;h=o;o=0;b:do if(!(h&1)){c:do if(d){d=0;while(1){if((d|0)>=(Ne(Me(r)|0)|0))break c;f=vw(i)|0;g=c[(c[f>>2]|0)+8>>2]|0;o=0;h=ja(55,r|0,d|0)|0;w=o;o=0;if(w&1)break b;w=ww(h)|0;o=0;Xa(g|0,f|0,w|0);w=o;o=0;if(w&1)break b;d=d+1|0}}while(0);bf(i);s=20;break a}while(0);d=Fb()|0;bf(i)}}else s=20;while(0);d:do if((s|0)==20){w=Io(t)|0;o=0;Xa(126,k|0,w|0);w=o;o=0;if(w&1)d=Fb()|0;else{o=0;db(93,i|0,b+8|0,k|0,e|0);w=o;o=0;do if(w&1)d=Fb()|0;else{o=0;ja(88,v|0,i|0)|0;w=o;o=0;if(w&1){d=Fb()|0;Bi(i);break}Bi(i);de(k);o=0;g=fa(107,40)|0;w=o;o=0;if(w&1){s=14;break d}w=zi(v)|0;o=0;Xa(122,p|0,w|0);w=o;o=0;do if(!(w&1)){w=zi(v)|0;o=0;Xa(123,q|0,w|0);w=o;o=0;if(w&1){d=Fb()|0;Ke(p);break}o=0;Xa(96,n|0,r|0);w=o;o=0;if(w&1){d=Fb()|0;f=1}else{vh(j,11);o=0;c[i>>2]=c[j>>2];hb(47,g|0,p|0,q|0,n|0,i|0);w=o;o=0;do if(w&1)d=1;else{o=0;Xa(124,a|0,g|0);w=o;o=0;if(w&1){d=0;break}Qe(n);Nd(q);Ke(p);Qe(r);Jo(t);yw(u);Bi(v);l=m;return}while(0);w=Fb()|0;Qe(n);f=d;d=w}Nd(q);Ke(p);if(!f)break d}else d=Fb()|0;while(0);cU(g);break d}while(0);de(k)}}while(0);if((s|0)==14)d=Fb()|0;Qe(r)}Jo(t)}yw(u)}while(0);Bi(v);Qb(d|0)}function tw(a){a=a|0;return (c[a>>2]|0)==0|0}function uw(a,b){a=a|0;b=b|0;return (zw(a,b)|0)^1|0}function vw(a){a=a|0;return c[a>>2]|0}function ww(a){a=a|0;return c[a>>2]|0}function xw(a,b){a=a|0;b=b|0;Wi(a,c[b>>2]|0);return a|0}function yw(a){a=a|0;ne(a);return}function zw(a,b){a=a|0;b=b|0;return (c[a>>2]|0)==(b|0)|0}function Aw(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=32876;o=0;Xa(128,a+8|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}Uk(a+52|0);c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;b=0;while(1){if((b|0)==3)break;c[a+24+(b<<2)>>2]=0;c[a+36+(b<<2)>>2]=0;b=b+1|0}c[a+48>>2]=0;c[a+64>>2]=-1;return}function Bw(a){a=a|0;c[a>>2]=32876;ij(a+52|0);de(a+8|0);ff(a);return}function Cw(a){a=a|0;Bw(a);cU(a);return}function Dw(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,m=0,n=0,p=0;k=l;l=l+64|0;n=k+48|0;h=k+36|0;i=k+24|0;m=k+12|0;j=k;f=_k(be(b+8|0)|0)|0;d=aU(20)|0;o=0;Xa(141,d|0,929);g=o;o=0;do if(g&1){n=Fb()|0;cU(d);d=n}else{g=b+52|0;Ew(g,d)|0;d=aU(20)|0;o=0;Xa(141,d|0,929);e=o;o=0;if(e&1){n=Fb()|0;cU(d);d=n;break}ek(n,d);e=0;d=0;while(1){if((e|0)>=(f|0)){e=5;break}if((e|0)>89){e=9;break}o=0;Xa(138,h|0,n|0);p=o;o=0;if(p&1){e=12;break}o=0;d=pa(56,b|0,e|0,h|0,d|0)|0;p=o;o=0;if(p&1){e=16;break}ij(h);e=e+1|0}a:do if((e|0)==5){o=0;Xa(138,m|0,g|0);p=o;o=0;if(p&1)d=Fb()|0;else{o=0;bb(111,i|0,m|0,c[b+48>>2]|0);p=o;o=0;do if(!(p&1)){o=0;ja(61,g|0,i|0)|0;p=o;o=0;if(p&1){d=Fb()|0;ij(i);break}ij(i);ij(m);o=0;Xa(138,j|0,n|0);p=o;o=0;if(p&1){d=Fb()|0;break a}o=0;bb(111,a|0,j|0,d|0);p=o;o=0;if(p&1){d=Fb()|0;ij(j);break a}else{ij(j);ij(n);l=k;return}}else d=Fb()|0;while(0);ij(m)}}else if((e|0)==9){d=Ab(8)|0;o=0;Xa(131,d|0,46725);p=o;o=0;if(p&1){p=Fb()|0;Jb(d|0);d=p;break}else{o=0;bb(68,d|0,160,61);o=0;e=12;break}}else if((e|0)==16){d=Fb()|0;ij(h)}while(0);if((e|0)==12)d=Fb()|0;ij(n)}while(0);Qb(d|0)}function Ew(a,b){a=a|0;b=b|0;lj(a,b);return a|0}function Fw(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0;A=l;l=l+16|0;r=A;s=a+8|0;t=Zk(be(s)|0)|0;c[r>>2]=-1;y=(b|0)%3|0;u=t+-17|0;m=a+48|0;n=a+52|0;p=a+24+(y<<2)|0;v=a+64|0;q=(y|0)==1;w=a+16|0;j=0;k=0;while(1){if((j|0)>=(t|0)){f=4;break}g=j+16|0;f=16;h=0;i=0;while(1){if((f|0)<=-1)break;B=xj(be(s)|0,g-f|0,b)|0;C=uW(1,0,f|0)|0;f=f+-1|0;h=(B?C:0)|h;i=(B?z:0)|i}c[r>>2]=-1;f=Hw(h,i,r)|0;if((k|0)<=0){c[p>>2]=f;if(q&(c[v>>2]|0)<0)c[w>>2]=f}else{C=c[r>>2]|0;f=(C|0)<0|(C|0)==(y|0)?f:-1;if((j|0)<(u|0)&(f|0)<0){C=c[m>>2]|0;if((C|0)>=(Gk(Fk(n)|0)|0)){f=10;break}c[(Xe(n,c[m>>2]|0)|0)>>2]=e;c[m>>2]=(c[m>>2]|0)+1}else{if((e|0)>=(Gk(Fk(d)|0)|0)){f=15;break}c[(Xe(d,e)|0)>>2]=f}e=e+1|0}j=j+17|0;k=k+1|0}do if((f|0)==4){if((k|0)>1){e=e+-1|0;c[a+36+(y<<2)>>2]=c[(Xe(d,e)|0)>>2];if((y|0)==2){if((c[v>>2]|0)<0?(x=c[(Xe(d,e)|0)>>2]|0,c[a+20>>2]=x,C=c[w>>2]|0,(x|0)==(C|0)&(C|0)>0):0)c[v>>2]=(((x|0)%30|0)-((c[a+12>>2]|0)%3|0)|0)/3|0;Iw(a,b)|0}c[(Xe(d,e)|0)>>2]=0}l=A;return e|0}else if((f|0)==10){e=Ab(8)|0;o=0;Xa(131,e|0,46820);C=o;o=0;if(C&1){C=Fb()|0;Jb(e|0);e=C;break}else Mb(e|0,160,61)}else if((f|0)==15){e=Ab(8)|0;o=0;Xa(131,e|0,46877);C=o;o=0;if(C&1){C=Fb()|0;Jb(e|0);e=C;break}else Mb(e|0,160,61)}while(0);Qb(e|0);return 0}function Gw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;do if((d|0)<0){e=Ab(8)|0;o=0;Xa(102,e|0,46777);a=o;o=0;if(a&1){a=Fb()|0;Jb(e|0);e=a;break}else Mb(e|0,632,117)}else{e=aU(20)|0;o=0;Xa(141,e|0,d|0);g=o;o=0;if(g&1){a=Fb()|0;cU(e);e=a;break}ek(a,e);g=0;while(1){if((g|0)>=(d|0)){f=13;break}o=0;e=ja(60,b|0,g|0)|0;f=o;o=0;if(f&1){f=12;break}e=c[e>>2]|0;o=0;f=ja(60,a|0,g|0)|0;h=o;o=0;if(h&1){f=12;break}c[f>>2]=e;g=g+1|0}if((f|0)==12){e=Fb()|0;ij(a);break}else if((f|0)==13)return}while(0);Qb(e|0)}function Hw(a,b,d){a=a|0;b=b|0;d=d|0;a=Kw(a&262143,0)|0;if((a|0)==-1)a=-1;else{a=(c[21720+(a<<2)>>2]|0)+-1|0;if(d|0)c[d>>2]=(a|0)/929|0;a=(a|0)%929|0}return a|0}function Iw(a,b){a=a|0;b=b|0;Jw(0,a+24|0,a+40|0,b)|0;Jw(0,a+28|0,a+44|0,b)|0;Jw(0,a+32|0,a+36|0,b)|0;return 1}function Jw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=c[b>>2]|0;a=c[d>>2]|0;if(!((a|0)==-1|((g|0)==-1|(g|0)==(a|0)))){e=((e|0)/3|0)*30|0;f=e+29|0;if((g|0)<(e|0)|(g|0)>(f|0)){c[b>>2]=-1;a=c[d>>2]|0}if((a|0)<(e|0)|(a|0)>(f|0))c[d>>2]=-1}return 1}function Kw(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;e=0;f=2787;g=0;while(1){if((g|0)>=(f|0)){d=-1;break}j=(f+g|0)>>>1;l=c[10572+(j<<2)>>2]|0;k=((l|0)<0)<<31>>31;h=(k|0)>(b|0)|(k|0)==(b|0)&l>>>0>a>>>0;i=(k|0)<(b|0)|(k|0)==(b|0)&l>>>0>>0;d=i?e:j;if((l|0)==(a|0)&(k|0)==(b|0))break;else{e=h?e:d;f=h?j:f;g=h?g:i?j+1|0:g}}return d|0}function Lw(){Mw();return}function Mw(){Nw(58852);return}function Nw(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=l;l=l+32|0;f=e+16|0;d=e;Qw(a,16);o=0;Xa(267,f|0,1);b=o;o=0;do if(b&1){b=Fb()|0;c=12}else{o=0;b=ja(89,a|0,0)|0;g=o;o=0;if(!(g&1)?(o=0,Xa(268,b|0,f|0),g=o,o=0,!(g&1)):0){Sw(f);o=0;Xa(267,f|0,900);g=o;o=0;if(g&1){b=Fb()|0;break}o=0;b=ja(89,a|0,1)|0;g=o;o=0;if(!(g&1)?(o=0,Xa(268,b|0,f|0),g=o,o=0,!(g&1)):0){c=2;while(1){if((c|0)>=(Uw(Tw(a)|0)|0)){c=9;break}o=0;b=ja(89,a|0,c+-1|0)|0;g=o;o=0;if(g&1){c=20;break}o=0;bb(112,d|0,b|0,f|0);g=o;o=0;if(g&1){c=20;break}o=0;b=ja(89,a|0,c|0)|0;g=o;o=0;if(g&1){c=21;break}o=0;Xa(268,b|0,d|0);g=o;o=0;if(g&1){c=21;break}Sw(d);c=c+1|0}if((c|0)==9){Sw(f);l=e;return}else if((c|0)==20)b=Fb()|0;else if((c|0)==21){b=Fb()|0;Sw(d)}}else b=Fb()|0;Sw(f);break}b=Fb()|0;Sw(f);c=12}while(0);Ow(a);Qb(b|0)}function Ow(a){a=a|0;var b=0,d=0;c[a>>2]=32892;b=a+8|0;d=c[b>>2]|0;if(d|0)af(d);c[b>>2]=0;ff(a);return}function Pw(a){a=a|0;Ow(a);cU(a);return}function Qw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;cf(a);c[a>>2]=32892;c[a+8>>2]=0;o=0;d=fa(107,20)|0;f=o;o=0;do if(!(f&1)){o=0;Xa(269,d|0,b|0);f=o;o=0;if(f&1){b=Fb()|0;cU(d);break}o=0;Xa(270,a|0,d|0);f=o;o=0;if(!(f&1))return;else e=5}else e=5;while(0);if((e|0)==5)b=Fb()|0;ff(a);Qb(b|0)}function Rw(a,b){a=a|0;b=b|0;return _w(c[a+8>>2]|0,b)|0}function Sw(a){a=a|0;Zw(a+4|0);return}function Tw(a){a=a|0;return c[a+8>>2]|0}function Uw(a){a=a|0;return (c[a+12>>2]|0)-(c[a+8>>2]|0)>>4|0}function Vw(a,b,c){a=a|0;b=b|0;c=c|0;Ww(a);o=0;bb(113,a|0,b|0,c|0);c=o;o=0;if(c&1){c=Fb()|0;Sw(a);Qb(c|0)}else return}function Ww(a){a=a|0;c[a>>2]=0;Xw(a+4|0);return}function Xw(a){a=a|0;Yw(a);return}function Yw(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;return}function Zw(a){a=a|0;a=c[a+8>>2]|0;if(a|0)dU(a);return}function _w(a,b){a=a|0;b=b|0;return (c[a+8>>2]|0)+(b<<4)|0}function $w(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;d=e;cf(a);c[a>>2]=32908;o=0;Na(339,d|0);f=o;o=0;do if(!(f&1)){o=0;bb(114,a+8|0,b|0,d|0);f=o;o=0;if(f&1){b=Fb()|0;Sw(d);break}else{Sw(d);l=e;return}}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function ax(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;a=a+8|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function bx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;f=a+4|0;c[f>>2]=0;c[a+8>>2]=0;a:do if(b|0){o=0;Xa(271,a|0,b|0);e=o;o=0;b:do if(!(e&1)){e=c[f>>2]|0;while(1){o=0;Xa(272,e|0,d|0);e=o;o=0;if(e&1)break b;e=(c[f>>2]|0)+16|0;c[f>>2]=e;b=b+-1|0;if(!b)break a}}while(0);f=Fb()|0;ex(a);Qb(f|0)}while(0);return}function cx(a,b){a=a|0;b=b|0;var d=0;if((hx(a)|0)>>>0>>0)wS(a);if(b>>>0<=268435455){d=aU(b<<4)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<4);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function dx(a,b){a=a|0;b=b|0;c[a>>2]=c[b>>2];fx(a+4|0,b+4|0);return}function ex(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-16|0;c[d>>2]=e;Sw(e)}cU(c[a>>2]|0)}return}function fx(a,b){a=a|0;b=b|0;gx(a,b);return}function gx(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[b+4>>2]|0;c[a+4>>2]=d;c[a>>2]=d;e=bU(d>>>0>1073741823?-1:d<<2)|0;c[a+8>>2]=e;b=c[b+8>>2]|0;a=0;while(1){if((a|0)==(d|0))break;c[e+(a<<2)>>2]=c[b+(a<<2)>>2];a=a+1|0}return}function hx(a){a=a|0;return 268435455}function ix(a){a=a|0;c[a>>2]=32908;ex(a+8|0);ff(a);return}function jx(a){a=a|0;ix(a);cU(a);return}function kx(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;v=l;l=l+128|0;z=v+112|0;m=v+100|0;n=v+96|0;p=v+84|0;q=v+80|0;r=v+68|0;s=v+64|0;t=v+52|0;g=v+48|0;h=v+36|0;i=v+32|0;j=v+20|0;k=v+16|0;w=v+4|0;x=v;d=aU(20)|0;o=0;Xa(273,d|0,100);f=o;o=0;if(f&1){z=Fb()|0;cU(d);d=z}else{aj(z,d);o=0;d=ja(60,b|0,1)|0;f=o;o=0;a:do if(f&1)d=Fb()|0;else{f=2;b:while(1){d=c[d>>2]|0;o=0;e=ja(60,b|0,0)|0;A=o;o=0;if(A&1)break;if((f|0)>=(c[e>>2]|0)){u=39;break}switch(d|0){case 900:{o=0;Xa(138,m|0,b|0);A=o;o=0;if(A&1)break b;Mh(n,z);o=0;d=la(87,m|0,f|0,n|0)|0;A=o;o=0;if(A&1){u=12;break b}Ke(n);ij(m);e=d;break}case 901:{o=0;Xa(138,p|0,b|0);A=o;o=0;if(A&1)break b;Mh(q,z);o=0;d=pa(57,901,p|0,f|0,q|0)|0;A=o;o=0;if(A&1){u=16;break b}Ke(q);ij(p);e=d;break}case 902:{o=0;Xa(138,r|0,b|0);A=o;o=0;if(A&1)break b;Mh(s,z);o=0;d=la(88,r|0,f|0,s|0)|0;A=o;o=0;if(A&1){u=20;break b}Ke(s);ij(r);e=d;break}case 913:{o=0;Xa(138,t|0,b|0);A=o;o=0;if(A&1)break b;Mh(g,z);o=0;d=pa(57,913,t|0,f|0,g|0)|0;A=o;o=0;if(A&1){u=24;break b}Ke(g);ij(t);e=d;break}case 924:{o=0;Xa(138,h|0,b|0);A=o;o=0;if(A&1)break b;Mh(i,z);o=0;d=pa(57,924,h|0,f|0,i|0)|0;A=o;o=0;if(A&1){u=28;break b}Ke(i);ij(h);e=d;break}default:{o=0;Xa(138,j|0,b|0);A=o;o=0;if(A&1)break b;Mh(k,z);o=0;d=la(87,j|0,f+-1|0,k|0)|0;A=o;o=0;if(A&1){u=32;break b}Ke(k);ij(j);e=d}}if((e|0)>=(Gk(Fk(b)|0)|0)){u=36;break}o=0;d=ja(60,b|0,e|0)|0;A=o;o=0;if(A&1)break;f=e+1|0}do if((u|0)==12){d=Fb()|0;Ke(n);ij(m);break a}else if((u|0)==16){d=Fb()|0;Ke(q);ij(p);break a}else if((u|0)==20){d=Fb()|0;Ke(s);ij(r);break a}else if((u|0)==24){d=Fb()|0;Ke(g);ij(t);break a}else if((u|0)==28){d=Fb()|0;Ke(i);ij(h);break a}else if((u|0)==32){d=Fb()|0;Ke(k);ij(j);break a}else if((u|0)==36){d=Ab(8)|0;o=0;Na(325,d|0);A=o;o=0;if(A&1){A=Fb()|0;Jb(d|0);d=A;break a}else{o=0;bb(68,d|0,160,61);o=0;break}}else if((u|0)==39?(o=0,y=fa(107,48)|0,A=o,o=0,!(A&1)):0){Pg(w);Mh(x,z);o=0;bb(65,y|0,w|0,x|0);A=o;o=0;if(!(A&1)){o=0;Xa(130,a|0,y|0);A=o;o=0;if(A&1)e=0;else{Ke(x);Nd(w);Ke(z);l=v;return}}else e=1;d=Fb()|0;Ke(x);Nd(w);if(!e)break a;cU(y);break a}while(0);d=Fb()|0}while(0);Ke(z)}Qb(d|0)}function lx(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,m=0,n=0,p=0;j=l;l=l+64|0;n=j+40|0;m=j+28|0;k=j+16|0;h=j+4|0;i=j;fj(n,c[(Xe(a,0)|0)>>2]<<1);o=0;e=ja(60,a|0,0)|0;g=o;o=0;if(!(g&1)?(o=0,Xa(135,m|0,c[e>>2]<<1|0),g=o,o=0,!(g&1)):0){g=0;e=b;a:while(1){b:while(1){b=0;c:while(1){o=0;f=ja(60,a|0,0)|0;p=o;o=0;if(p&1){b=14;break a}if(b|(e|0)>=(c[f>>2]|0)){b=23;break a}o=0;b=ja(60,a|0,e|0)|0;p=o;o=0;if(p&1){b=14;break a}f=c[b>>2]|0;if((f|0)<900){b=10;break b}switch(f|0){case 900:{b=17;break b}case 913:{b=19;break b}case 924:case 902:case 901:{b=1;break}default:break c}}e=e+1|0}if((b|0)==10){o=0;b=ja(60,n|0,g|0)|0;p=o;o=0;if(p&1){b=15;break}c[b>>2]=(f|0)/30|0;o=0;b=ja(60,n|0,g+1|0)|0;p=o;o=0;if(p&1){b=15;break}c[b>>2]=(f|0)%30|0;g=g+2|0;e=e+1|0;continue}else if((b|0)==17){o=0;b=ja(60,n|0,g|0)|0;p=o;o=0;if(p&1){b=15;break}c[b>>2]=900;g=g+1|0;e=e+1|0;continue}else if((b|0)==19){o=0;b=ja(60,n|0,g|0)|0;p=o;o=0;if(p&1){b=15;break}c[b>>2]=913;o=0;b=ja(60,a|0,e+1|0)|0;p=o;o=0;if(p&1){b=15;break}b=c[b>>2]|0;o=0;f=ja(60,m|0,g|0)|0;p=o;o=0;if(p&1){b=15;break}c[f>>2]=b;g=g+1|0;e=e+2|0;continue}}if((b|0)==15)e=Fb()|0;else if((b|0)==23){o=0;Xa(138,k|0,n|0);p=o;o=0;if(p&1)b=14;else{o=0;Xa(138,h|0,m|0);p=o;o=0;do if(!(p&1)){Mh(i,d);o=0;db(94,k|0,h|0,g|0,i|0);p=o;o=0;if(p&1){e=Fb()|0;Ke(i);ij(h);break}else{Ke(i);ij(h);ij(k);ij(m);ij(n);l=j;return e|0}}else e=Fb()|0;while(0);ij(k)}}if((b|0)==14)e=Fb()|0;ij(m)}else e=Fb()|0;ij(n);Qb(e|0);return 0}function mx(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;v=l;l=l+48|0;t=v+36|0;w=v+24|0;s=v+12|0;u=v;a:do switch(b|0){case 901:{b=aU(20)|0;o=0;Xa(84,b|0,6);r=o;o=0;if(r&1){e=Fb()|0;cU(b);h=69;break a}we(w,b);o=0;b=fa(107,20)|0;r=o;o=0;do if(!(r&1)){o=0;Xa(141,b|0,6);r=o;o=0;if(r&1){e=Fb()|0;cU(b);break}o=0;Xa(177,s|0,b|0);r=o;o=0;if(!(r&1)){o=0;b=ja(60,d|0,e|0)|0;r=o;o=0;b:do if(r&1)e=Fb()|0;else{p=u+11|0;q=u+8|0;r=u+4|0;k=c[b>>2]|0;j=0;g=0;i=0;h=0;c:while(1){e=e+1|0;o=0;b=ja(60,d|0,0)|0;n=o;o=0;if(n&1){h=18;break}m=g+1|0;if(j|(e|0)>=(c[b>>2]|0)){h=35;break}o=0;b=ja(60,s|0,g|0)|0;n=o;o=0;if(n&1){h=18;break}c[b>>2]=k;i=lW(i|0,h|0,900,0)|0;i=mW(k|0,((k|0)<0)<<31>>31|0,i|0,z|0)|0;h=z;o=0;b=ja(60,d|0,e|0)|0;n=o;o=0;if(n&1){h=18;break}n=c[b>>2]|0;switch(n|0){case 900:case 901:case 902:case 922:case 923:case 924:case 928:{k=n;j=1;g=m;continue c}default:{}}if((g|0)>-1&((m|0)%5|0|0)==0){g=0;m=i}else{k=n;j=0;g=m;continue}while(1){if((g|0)>=6)break;o=0;b=ja(56,w|0,5-g|0)|0;k=o;o=0;if(k&1){h=29;break c}a[b>>0]=m;k=sW(m|0,h|0,8)|0;g=g+1|0;m=k;h=z}i=Je(f)|0;j=c[(rx(Td(w)|0)|0)>>2]|0;k=rx(Td(w)|0)|0;k=(c[k+4>>2]|0)-(c[k>>2]|0)|0;c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;if(k>>>0>4294967279){h=22;break}if(k>>>0<11){a[p>>0]=k;b=u}else{g=k+16&-16;o=0;b=fa(107,g|0)|0;x=o;o=0;if(x&1){h=32;break}c[u>>2]=b;c[q>>2]=g|-2147483648;c[r>>2]=k}_i(b,j,k)|0;a[t>>0]=0;ah(b+k|0,t);o=0;Xa(274,i|0,u|0);x=o;o=0;if(x&1){h=33;break}pU(u);k=n;j=0;g=0;i=m}do if((h|0)==22){o=0;Na(320,u|0);o=0;h=32}else if((h|0)==29){e=Fb()|0;break b}else if((h|0)==33){e=Fb()|0;pU(u)}else if((h|0)==35){o=0;b=ja(60,d|0,0)|0;x=o;o=0;if(!(x&1)){if((k|0)<900?(e|0)==(c[b>>2]|0):0){o=0;b=ja(60,s|0,g|0)|0;x=o;o=0;if(x&1){h=18;break}c[b>>2]=k;g=m}b=0;while(1){if((b|0)>=(g|0)){h=41;break}h=Je(f)|0;o=0;i=ja(60,s|0,b|0)|0;x=o;o=0;if(x&1){h=45;break}o=0;Xa(275,h|0,c[i>>2]&255|0);x=o;o=0;if(x&1){h=45;break}b=b+1|0}if((h|0)==41){ij(s);Nd(w);h=68;break a}else if((h|0)==45){e=Fb()|0;break b}}else h=18}while(0);if((h|0)==18){e=Fb()|0;break}else if((h|0)==32)e=Fb()|0}while(0);ij(s)}else h=15}else h=15;while(0);if((h|0)==15)e=Fb()|0;Nd(w);h=69;break}case 924:{m=w+11|0;n=w+6|0;g=0;j=0;i=0;h=0;d:while(1){if(g|(e|0)>=(c[(Xe(d,0)|0)>>2]|0)){h=68;break a}g=e+1|0;b=c[(Xe(d,e)|0)>>2]|0;e:do if((b|0)<900){i=lW(i|0,h|0,900,0)|0;i=mW(b|0,((b|0)<0)<<31>>31|0,i|0,z|0)|0;k=0;b=j+1|0;e=g;h=z}else{switch(b|0){case 900:case 901:case 902:case 922:case 923:case 924:case 928:break;default:{k=0;b=j;e=g;break e}}k=1;b=j}while(0);if(!((b|0)>0&((b|0)%5|0|0)==0)){g=k;j=b;continue}b=aU(20)|0;o=0;Xa(84,b|0,6);x=o;o=0;if(x&1){h=58;break}we(u,b);g=0;while(1){if((g|0)>=6)break;o=0;b=ja(56,u|0,5-g|0)|0;x=o;o=0;if(x&1){h=61;break d}a[b>>0]=i;x=sW(i|0,h|0,8)|0;g=g+1|0;i=x;h=z}b=Je(f)|0;o=0;g=ja(56,u|0,0)|0;x=o;o=0;if(x&1){h=64;break};c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;a[m>>0]=6;_i(w,g,6)|0;a[t>>0]=0;ah(n,t);o=0;Xa(274,b|0,w|0);x=o;o=0;if(x&1){h=65;break}pU(w);Nd(u);g=k;j=0}if((h|0)==58){e=Fb()|0;cU(b);h=69;break a}else if((h|0)==61)e=Fb()|0;else if((h|0)==64){e=Fb()|0;h=66}else if((h|0)==65){e=Fb()|0;pU(w);h=66}Nd(u);h=69;break}default:h=68}while(0);if((h|0)==68){l=v;return e|0}else if((h|0)==69)Qb(e|0);return 0}function nx(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,m=0,n=0,p=0;n=l;l=l+32|0;p=n+16|0;j=n+12|0;k=n;e=aU(20)|0;o=0;Xa(141,e|0,15);i=o;o=0;if(i&1){b=Fb()|0;cU(e)}else{ek(p,e);f=0;h=0;while(1){o=0;e=ja(60,a|0,0)|0;i=o;o=0;if(i&1){m=9;break}if(f|(b|0)>=(c[e>>2]|0)){m=22;break}i=b+1|0;o=0;e=ja(60,a|0,b|0)|0;g=o;o=0;if(g&1){m=9;break}f=c[e>>2]|0;o=0;e=ja(60,a|0,0)|0;g=o;o=0;if(g&1){m=10;break}g=(i|0)==(c[e>>2]|0);if((f|0)<900){o=0;b=ja(60,p|0,h|0)|0;m=o;o=0;if(m&1){m=10;break}c[b>>2]=f;e=h+1|0;m=14}else switch(f|0){case 900:case 901:case 922:case 923:case 924:case 928:{e=h;g=1;break}default:{e=h;m=14}}if((m|0)==14){m=0;if(g|((f|0)==902|((e|0)%15|0|0)==0))b=i;else{b=i;f=0;h=e;continue}}o=0;Xa(138,k|0,p|0);i=o;o=0;if(i&1){m=10;break}o=0;bb(115,j|0,k|0,e|0);i=o;o=0;if(i&1){m=20;break}ij(k);e=Je(d)|0;f=Je(j)|0;o=0;f=fa(108,f|0)|0;i=o;o=0;if(i&1){m=21;break}o=0;Xa(274,e|0,f|0);i=o;o=0;if(i&1){m=21;break}Ke(j);f=g;h=0}if((m|0)==9)b=Fb()|0;else if((m|0)==10)b=Fb()|0;else if((m|0)==20){b=Fb()|0;ij(k)}else if((m|0)==21){b=Fb()|0;Ke(j)}else if((m|0)==22){ij(p);l=n;return b|0}ij(p)}Qb(b|0);return 0}function ox(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;p=l;l=l+96|0;j=p+72|0;q=p+56|0;t=p+40|0;s=p+16|0;r=p;k=p+32|0;n=p+12|0;dG(t,0);i=e+-1|0;f=0;while(1){if((f|0)>=(e|0)){e=3;break}o=0;g=ja(89,58852,i-f|0)|0;h=o;o=0;if(h&1){e=11;break}o=0;h=ja(60,d|0,f|0)|0;u=o;o=0;if(u&1){e=12;break}o=0;Xa(267,s|0,c[h>>2]|0);u=o;o=0;if(u&1){e=12;break}o=0;bb(112,q|0,g|0,s|0);u=o;o=0;if(u&1){e=13;break}o=0;bb(116,j|0,t|0,q|0);u=o;o=0;if(u&1){e=14;break}o=0;Xa(268,t|0,j|0);u=o;o=0;if(u&1){e=15;break}Sw(j);Sw(q);Sw(s);f=f+1|0}do if((e|0)==3){o=0;Xa(276,s|0,t|0);u=o;o=0;if(u&1){f=Fb()|0;break}d=a[s+11>>0]|0;g=d<<24>>24<0;h=g?c[s>>2]|0:s;do if((a[h>>0]|0)!=49){f=Ab(8)|0;o=0;Xa(131,f|0,47059);u=o;o=0;if(u&1){u=Fb()|0;Jb(f|0);f=u;break}else{o=0;bb(68,f|0,160,61);o=0;f=Fb()|0;break}}else{c[r>>2]=0;c[r+4>>2]=0;c[r+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[r+(f<<2)>>2]=0;f=f+1|0}c[k>>2]=h+1;c[n>>2]=h+(g?c[s+4>>2]|0:d&255);o=0;c[q>>2]=c[k>>2];c[j>>2]=c[n>>2];la(89,r|0,q|0,j|0)|0;u=o;o=0;do if(!(u&1)?(o=0,m=fa(107,20)|0,u=o,o=0,!(u&1)):0){o=0;Xa(140,m|0,r|0);u=o;o=0;if(u&1){f=Fb()|0;cU(m);break}o=0;Xa(173,b|0,m|0);u=o;o=0;if(!(u&1)){pU(r);pU(s);Sw(t);l=p;return}else e=32}else e=32;while(0);if((e|0)==32)f=Fb()|0;pU(r)}while(0);pU(s)}else if((e|0)==11){f=Fb()|0;e=19}else if((e|0)==12){f=Fb()|0;e=18}else if((e|0)==13){f=Fb()|0;e=17}else if((e|0)==14){f=Fb()|0;e=16}else if((e|0)==15){f=Fb()|0;Sw(j);e=16}while(0);if((e|0)==16){Sw(q);e=17}if((e|0)==17){Sw(s);e=18}if((e|0)==18)e=19;Sw(t);Qb(f|0)}function px(a,b,c){a=a|0;b=b|0;c=c|0;Ww(a);o=0;bb(117,a|0,b|0,c|0);c=o;o=0;if(c&1){c=Fb()|0;Sw(a);Qb(c|0)}else return}function qx(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,m=0,n=0;n=l;l=l+16|0;m=n;f=c[d>>2]|0;i=c[e>>2]|0;j=i-f|0;k=b+11|0;e=a[k>>0]|0;g=e<<24>>24<0;if(g)h=(c[b+8>>2]&2147483647)+-1|0;else h=10;if(j>>>0>h>>>0){if(g)e=c[b+4>>2]|0;else e=e&255;yU(b,h,j-h|0,e,0,e,0);e=a[k>>0]|0}if(e<<24>>24<0)e=c[b>>2]|0;else e=b;while(1){if((f|0)==(i|0))break;ah(e,f);h=f+1|0;c[d>>2]=h;e=e+1|0;f=h}a[m>>0]=0;ah(e,m);if((a[k>>0]|0)<0)c[b+4>>2]=j;else a[k>>0]=j;l=n;return b|0}function rx(a){a=a|0;return a+8|0}function sx(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,r=0,s=0,t=0;g=0;s=0;h=0;while(1){if((s|0)>=(e|0))break;p=c[(Xe(b,s)|0)>>2]|0;m=(p|0)==28;n=(p|0)<29;o=(p|0)==26;q=(p|0)==900;k=(p|0)<26;i=46944+p|0;l=p+65&255;r=(p|0)==913;j=(p|0)==29;a:do switch(g|0){case 0:{g=(p|0)<27;if(!(k|(p+-26|0)>>>0<4))if(r){i=Je(f)|0;_m(i,c[(Xe(d,s)|0)>>2]&255);i=h;g=0}else{i=h;g=0}else{l=g?(k?l:32):0;g=n?((p|0)<28?(g^1)&1:2):5;h=n?h:0;t=32}break}case 1:{if(k){l=p+97&255;g=1;t=32;break a}j=(p|1|0)==27;i=m|j;if((p+-26|0)>>>0>=4)if(r){i=Je(f)|0;_m(i,c[(Xe(d,s)|0)>>2]&255);i=h;g=1;break a}else{i=h;g=(q^1)&1;break a}else{l=o&j?32:0;g=i?(j?(o?1:4):2):5;h=i?(j?(o?h:1):h):1;t=32}break}case 2:{if((p|0)<25){l=a[46973+p>>0]|0;g=2;t=32;break a}j=(p|0)==25;g=p+-25|0;i=g>>>0<2;k=g>>>0<4;if(g>>>0>=5)if(r){i=Je(f)|0;_m(i,c[(Xe(d,s)|0)>>2]&255);i=h;g=2;break a}else{i=h;g=q?0:2;break a}else{l=i?(j?0:32):0;g=k?(g>>>0<3?(i?(j?3:2):1):0):5;h=k?h:2;t=32}break}case 3:{if(n){l=a[i>>0]|0;g=3;t=32;break a}if(!j)if(r){i=Je(f)|0;_m(i,c[(Xe(d,s)|0)>>2]&255);i=h;g=3;break a}else{i=h;g=q?0:3;break a}else{i=h;g=0}break}case 4:{if((p|0)<27){l=k?l:32;g=h;t=32}else{i=h;g=q?0:h}break}case 5:{if(n){l=a[i>>0]|0;g=h;t=32;break a}if(!j)if(r){i=Je(f)|0;_m(i,c[(Xe(d,s)|0)>>2]&255);i=h;g=h;break a}else{i=h;g=q?0:h;break a}else{i=h;g=0}break}default:i=h}while(0);if((t|0)==32){t=0;if(!(l<<24>>24))i=h;else{_m(Je(f)|0,l);i=h}}s=s+1|0;h=i}return}function tx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;g=l;l=l+144|0;m=g+76|0;b=g+72|0;j=g+60|0;i=g+48|0;h=g+36|0;f=g+24|0;d=g+12|0;e=g;ki(b,c);o=0;Xa(277,m|0,b|0);c=o;o=0;if(c&1){m=Fb()|0;de(b);b=m}else{de(b);o=0;Xa(278,j|0,m|0);c=o;o=0;if(c&1)b=Fb()|0;else{do if(!(Gk(Fk(j)|0)|0)){b=Ab(8)|0;o=0;Xa(131,b|0,47135);k=o;o=0;if(k&1){k=Fb()|0;Jb(b|0);b=k;break}else{o=0;bb(68,b|0,160,61);o=0;b=Fb()|0;break}}else{b=1<<(ux(m)|0)+1;o=0;Xa(279,i|0,m|0);c=o;o=0;if(c&1){b=Fb()|0;break}o=0;Xa(138,h|0,j|0);c=o;o=0;a:do if(c&1)k=19;else{o=0;Xa(138,f|0,i|0);c=o;o=0;do if(!(c&1)){o=0;db(95,0,h|0,f|0,b|0);c=o;o=0;if(c&1){b=Fb()|0;ij(f);break}ij(f);ij(h);o=0;Xa(138,d|0,j|0);h=o;o=0;if(h&1){k=19;break a}o=0;Xa(280,d|0,b|0);h=o;o=0;if(h&1){b=Fb()|0;ij(d);break a}ij(d);o=0;Xa(138,e|0,j|0);h=o;o=0;if(h&1){k=19;break a}o=0;Xa(281,a|0,e|0);a=o;o=0;if(a&1){b=Fb()|0;ij(e);break a}else{ij(e);ij(i);ij(j);Bw(m);l=g;return}}else b=Fb()|0;while(0);ij(h)}while(0);if((k|0)==19)b=Fb()|0;ij(i)}while(0);ij(j)}Bw(m)}Qb(b|0)}function ux(a){a=a|0;return c[a+64>>2]|0}function vx(a,b){a=a|0;b=b|0;hj(a,b+52|0);return}function wx(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;h=l;l=l+32|0;j=h+24|0;g=h+12|0;f=h;do if(e>>>0>512|(Gk(Fk(d)|0)|0)>(((e|0)/2|0)+3|0)){a=Ab(8)|0;o=0;Xa(131,a|0,47366);j=o;o=0;if(j&1){j=Fb()|0;Jb(a|0);a=j;break}else Mb(a|0,160,61)}else{a=aU(12)|0;o=0;Na(340,a|0);k=o;o=0;if(k&1){k=Fb()|0;cU(a);a=k;break}yx(j,a);a=zx(j)|0;o=0;Xa(138,g|0,b|0);k=o;o=0;a:do if(k&1)a=Fb()|0;else{o=0;Xa(138,f|0,d|0);k=o;o=0;do if(k&1)a=Fb()|0;else{o=0;db(96,a|0,g|0,e|0,f|0);k=o;o=0;if(k&1){a=Fb()|0;ij(f);break}ij(f);ij(g);a=0;while(1){if((a|0)>=(Gk(Fk(b)|0)|0)){i=11;break}o=0;f=ja(60,b|0,a|0)|0;k=o;o=0;if(k&1)break;if((c[f>>2]|0)<0){i=20;break}else a=a+1|0}if((i|0)==11){Ax(j);l=h;return}do if((i|0)==20){a=Ab(8)|0;o=0;Xa(131,a|0,47435);k=o;o=0;if(k&1){k=Fb()|0;Jb(a|0);a=k;break a}else{o=0;bb(68,a|0,160,61);o=0;break}}while(0);a=Fb()|0;break a}while(0);ij(g)}while(0);Ax(j)}while(0);Qb(a|0)}function xx(a,b){a=a|0;b=b|0;var d=0,e=0;e=Gk(Fk(a)|0)|0;a:do if((e|0)<4){a=Ab(8)|0;o=0;Xa(131,a|0,47177);e=o;o=0;if(e&1){e=Fb()|0;Jb(a|0);a=e;break}else Mb(a|0,160,61)}else{d=c[(Xe(a,0)|0)>>2]|0;if((d|0)>(e|0)){a=Ab(8)|0;o=0;Xa(131,a|0,47236);e=o;o=0;if(e&1){e=Fb()|0;Jb(a|0);a=e;break}else Mb(a|0,160,61)}do if(!d){if((e|0)>(b|0)){c[(Xe(a,0)|0)>>2]=e-b;break}a=Ab(8)|0;o=0;Xa(131,a|0,47301);e=o;o=0;if(e&1){e=Fb()|0;Jb(a|0);a=e;break a}else Mb(a|0,160,61)}while(0);return}while(0);Qb(a|0)}function yx(a,b){a=a|0;b=b|0;c[a>>2]=0;Bx(a,b);return}function zx(a){a=a|0;return c[a>>2]|0}function Ax(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Bx(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Cx(a){a=a|0;cf(a);c[a>>2]=32924;c[a+8>>2]=58864;return}function Dx(a){a=a|0;ff(a);cU(a);return}function Ex(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;w=l;l=l+160|0;F=w+144|0;h=w+120|0;E=w+132|0;D=w+116|0;C=w+104|0;z=w+100|0;k=w+84|0;B=w+96|0;j=w+68|0;t=w+56|0;y=w+72|0;m=w+28|0;n=w+24|0;x=w+44|0;p=w+20|0;u=w+32|0;r=w+16|0;s=w+12|0;q=w;i=aU(24)|0;v=a+8|0;f=c[v>>2]|0;o=0;Xa(138,h|0,b|0);g=o;o=0;do if(!(g&1)){o=0;bb(118,i|0,f|0,h|0);g=o;o=0;if(!(g&1)){o=0;Xa(282,F|0,i|0);g=o;o=0;if(g&1)g=0;else{ij(h);o=0;f=fa(107,20)|0;i=o;o=0;do if(!(i&1)){o=0;Xa(141,f|0,d|0);i=o;o=0;if(i&1){E=Fb()|0;cU(f);f=E;break}o=0;Xa(177,E|0,f|0);A=o;o=0;if(!(A&1)){h=d;i=0;while(1){if((h|0)<=0){A=8;break}f=Gx(F)|0;o=0;g=ja(90,c[v>>2]|0,h|0)|0;A=o;o=0;if(A&1){A=18;break}o=0;f=ja(91,f|0,g|0)|0;A=o;o=0;if(A&1){A=18;break}o=0;g=ja(60,E|0,d-h|0)|0;A=o;o=0;if(A&1){A=18;break}c[g>>2]=f;h=h+-1|0;i=i|(f|0)!=0}a:do if((A|0)==8){b:do if(i){o=0;Xa(283,D|0,c[v>>2]|0);i=o;o=0;if(i&1){f=Fb()|0;break a}i=0;while(1){if((i|0)>=(Gk(Fk(e)|0)|0)){A=22;break}f=c[v>>2]|0;g=Gk(Fk(b)|0)|0;o=0;h=ja(60,e|0,i|0)|0;A=o;o=0;if(A&1){A=24;break}o=0;f=ja(90,f|0,g+-1-(c[h>>2]|0)|0)|0;A=o;o=0;if(A&1){A=24;break}o=0;g=fa(107,20)|0;A=o;o=0;if(A&1){A=39;break}o=0;Xa(141,g|0,2);A=o;o=0;if(A&1){A=40;break}o=0;Xa(177,C|0,g|0);A=o;o=0;if(A&1){A=39;break}o=0;f=la(90,c[v>>2]|0,0,f|0)|0;A=o;o=0;if(A&1){A=41;break}o=0;g=ja(60,C|0,1)|0;A=o;o=0;if(A&1){A=41;break}c[g>>2]=f;o=0;f=ja(60,C|0,0)|0;A=o;o=0;if(A&1){A=41;break}c[f>>2]=1;o=0;h=fa(107,24)|0;A=o;o=0;if(A&1){A=41;break}f=c[v>>2]|0;o=0;Xa(138,k|0,C|0);A=o;o=0;if(A&1){A=42;break}o=0;bb(118,h|0,f|0,k|0);A=o;o=0;if(A&1){g=1;A=43;break}o=0;Xa(282,z|0,h|0);A=o;o=0;if(A&1){g=0;A=43;break}ij(k);A=Gx(D)|0;Hx(j,z);o=0;bb(119,B|0,A|0,j|0);A=o;o=0;if(A&1){A=45;break}Ix(D,B)|0;Jx(B);Jx(j);Jx(z);ij(C);i=i+1|0}do if((A|0)==22){o=0;h=fa(107,24)|0;k=o;o=0;if(k&1){f=Fb()|0;break}f=c[v>>2]|0;o=0;Xa(138,t|0,E|0);k=o;o=0;if(!(k&1)){o=0;bb(118,h|0,f|0,t|0);k=o;o=0;if(!(k&1)){o=0;Xa(282,B|0,h|0);k=o;o=0;if(k&1)g=0;else{ij(t);o=0;db(97,m|0,c[v>>2]|0,d|0,1);t=o;o=0;do if(t&1)f=Fb()|0;else{Hx(n,B);o=0;hb(54,y|0,a|0,m|0,n|0,d|0);t=o;o=0;if(t&1){f=Fb()|0;Jx(n);Jx(m);break}Jx(n);Jx(m);Hx(C,c[y>>2]|0);Hx(z,(c[y>>2]|0)+4|0);Hx(p,C);o=0;bb(120,x|0,a|0,p|0);t=o;o=0;if(t&1){f=Fb()|0;Jx(p)}else{Jx(p);Hx(r,z);Hx(s,C);o=0;Xa(138,q|0,x|0);t=o;o=0;do if(t&1){f=Fb()|0;A=67}else{o=0;hb(55,u|0,a|0,r|0,s|0,q|0);t=o;o=0;if(t&1){f=Fb()|0;ij(q);A=67;break}ij(q);Jx(s);Jx(r);j=0;while(1){if((j|0)>=(Gk(Fk(x)|0)|0)){A=57;break}h=(Gk(Fk(b)|0)|0)+-1|0;f=c[v>>2]|0;o=0;g=ja(60,x|0,j|0)|0;t=o;o=0;if(t&1)break;o=0;f=ja(92,f|0,c[g>>2]|0)|0;t=o;o=0;if(t&1)break;i=h-f|0;if((i|0)<0){A=71;break}h=c[v>>2]|0;o=0;f=ja(60,b|0,i|0)|0;t=o;o=0;if(t&1)break;f=c[f>>2]|0;o=0;g=ja(60,u|0,j|0)|0;t=o;o=0;if(t&1)break;o=0;g=la(90,h|0,f|0,c[g>>2]|0)|0;t=o;o=0;if(t&1)break;o=0;f=ja(60,b|0,i|0)|0;t=o;o=0;if(t&1)break;c[f>>2]=g;j=j+1|0}if((A|0)==57){ij(u);ij(x);Jx(z);Jx(C);Nx(y);Jx(B);Jx(D);break b}else if((A|0)==71){w=Ab(8)|0;Eo(w,47540);o=0;bb(68,w|0,728,127);o=0}f=Fb()|0;ij(u)}while(0);if((A|0)==67){Jx(s);Jx(r)}ij(x)}Jx(z);Jx(C);Nx(y)}while(0);Jx(B);break}}else g=1;f=Fb()|0;ij(t);if(!g)break}else f=Fb()|0;cU(h)}else if((A|0)==24)f=Fb()|0;else if((A|0)==39)f=Fb()|0;else if((A|0)==40){f=Fb()|0;cU(g)}else if((A|0)==41){f=Fb()|0;A=46}else if((A|0)==42){f=Fb()|0;A=44}else if((A|0)==43){f=Fb()|0;ij(k);if(g)A=44;else A=46}else if((A|0)==45){f=Fb()|0;Jx(j);Jx(z);A=46}while(0);if((A|0)==44){cU(h);A=46}if((A|0)==46)ij(C);Jx(D);break a}while(0);ij(E);Jx(F);l=w;return}else if((A|0)==18)f=Fb()|0;while(0);ij(E)}else A=12}else A=12;while(0);if((A|0)==12)f=Fb()|0;Jx(F);break}}else g=1;f=Fb()|0;ij(h);if(g)A=11}else{f=Fb()|0;A=11}while(0);if((A|0)==11)cU(i);Qb(f|0)}function Fx(a,b){a=a|0;b=b|0;c[a>>2]=0;Sx(a,b);return}function Gx(a){a=a|0;return c[a>>2]|0}function Hx(a,b){a=a|0;b=b|0;c[a>>2]=0;Sx(a,c[b>>2]|0);return}function Ix(a,b){a=a|0;b=b|0;Sx(a,c[b>>2]|0);return a|0}function Jx(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Kx(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;s=l;l=l+64|0;y=s+52|0;z=s+48|0;x=s+44|0;w=s+40|0;v=s+36|0;u=s+32|0;t=s+28|0;j=s+24|0;k=s+20|0;m=s+16|0;n=s+12|0;p=s+8|0;r=s+4|0;q=s;i=oy(Gx(d)|0)|0;if((i|0)<(oy(Gx(e)|0)|0)){Hx(y,d);Ix(d,e)|0;Ix(e,y)|0;Jx(y)}Hx(y,d);Hx(z,e);i=b+8|0;o=0;Xa(284,x|0,c[i>>2]|0);h=o;o=0;if(h&1)b=Fb()|0;else{o=0;Xa(283,w|0,c[i>>2]|0);h=o;o=0;if(h&1)b=Fb()|0;else{h=(f|0)/2|0;a:while(1){b=Gx(z)|0;o=0;b=fa(139,b|0)|0;g=o;o=0;if(g&1){d=13;break}if((b|0)<(h|0)){d=55;break}Hx(v,y);Hx(u,x);Ix(y,z)|0;Ix(x,w)|0;b=Gx(y)|0;o=0;b=fa(140,b|0)|0;g=o;o=0;if(g&1){d=14;break}if(b){d=10;break}Ix(z,v)|0;o=0;Xa(284,t|0,c[i>>2]|0);g=o;o=0;if(g&1){d=14;break}b=Gx(y)|0;d=Gx(y)|0;o=0;d=fa(139,d|0)|0;g=o;o=0;if(g&1){d=34;break}o=0;b=ja(93,b|0,d|0)|0;g=o;o=0;if(g&1){d=34;break}o=0;g=ja(94,c[i>>2]|0,b|0)|0;f=o;o=0;if(f&1){d=35;break}while(1){b=Gx(z)|0;o=0;b=fa(139,b|0)|0;f=o;o=0;if(f&1){d=36;break a}d=Gx(y)|0;o=0;d=fa(139,d|0)|0;f=o;o=0;if(f&1){d=36;break a}if((b|0)<(d|0))break;b=Gx(z)|0;o=0;b=fa(140,b|0)|0;f=o;o=0;if(f&1){d=36;break a}if(b)break;b=Gx(z)|0;o=0;b=fa(139,b|0)|0;f=o;o=0;if(f&1){d=36;break a}d=Gx(y)|0;o=0;d=fa(139,d|0)|0;f=o;o=0;if(f&1){d=36;break a}f=b-d|0;e=c[i>>2]|0;b=Gx(z)|0;d=Gx(z)|0;o=0;d=fa(139,d|0)|0;A=o;o=0;if(A&1){d=37;break a}o=0;b=ja(93,b|0,d|0)|0;A=o;o=0;if(A&1){d=37;break a}o=0;d=la(91,e|0,b|0,g|0)|0;A=o;o=0;if(A&1){d=37;break a}b=Gx(t)|0;o=0;db(97,k|0,c[i>>2]|0,f|0,d|0);A=o;o=0;if(A&1){d=38;break a}o=0;bb(121,j|0,b|0,k|0);A=o;o=0;if(A&1){d=39;break a}Ix(t,j)|0;Jx(j);Jx(k);b=Gx(z)|0;A=Gx(y)|0;o=0;db(98,m|0,A|0,f|0,d|0);A=o;o=0;if(A&1){d=41;break a}o=0;bb(122,j|0,b|0,m|0);A=o;o=0;if(A&1){d=42;break a}Ix(z,j)|0;Jx(j);Jx(m)}A=Gx(t)|0;Hx(r,x);o=0;bb(119,p|0,A|0,r|0);A=o;o=0;if(A&1){d=48;break}A=Gx(p)|0;Hx(q,u);o=0;bb(122,n|0,A|0,q|0);A=o;o=0;if(A&1){d=49;break}A=Gx(n)|0;o=0;Xa(285,j|0,A|0);A=o;o=0;if(A&1){d=50;break}Ix(w,j)|0;Jx(j);Jx(n);Jx(q);Jx(p);Jx(r);Jx(t);Jx(u);Jx(v)}switch(d|0){case 10:{A=Ab(8)|0;Eo(A,47588);o=0;bb(68,A|0,728,127);o=0;d=14;break}case 34:{b=Fb()|0;d=53;break}case 35:{b=Fb()|0;d=53;break}case 36:{b=Fb()|0;d=53;break}case 37:{b=Fb()|0;d=53;break}case 38:{b=Fb()|0;d=40;break}case 39:{b=Fb()|0;Jx(k);d=40;break}case 41:{b=Fb()|0;d=43;break}case 42:{b=Fb()|0;Jx(m);d=43;break}case 48:{b=Fb()|0;d=52;break}case 49:{b=Fb()|0;d=51;break}case 50:{b=Fb()|0;Jx(n);d=51;break}case 55:{b=Gx(w)|0;o=0;b=ja(93,b|0,0)|0;A=o;o=0;if(A&1)d=13;else{if(b){o=0;b=ja(94,c[i>>2]|0,b|0)|0;A=o;o=0;if(!(A&1)){A=Gx(w)|0;o=0;bb(123,v|0,A|0,b|0);A=o;o=0;if(A&1){b=Fb()|0;break}A=Gx(z)|0;o=0;bb(123,u|0,A|0,b|0);A=o;o=0;do if(!(A&1)){o=0;Xa(286,a|0,2);A=o;o=0;if(A&1){b=Fb()|0;Jx(u);break}else{Ix(c[a>>2]|0,v)|0;Ix((c[a>>2]|0)+4|0,u)|0;Jx(u);Jx(v);Jx(w);Jx(x);Jx(z);Jx(y);l=s;return}}else b=Fb()|0;while(0);Jx(v);break}}else{A=Ab(8)|0;Eo(A,47628);o=0;bb(68,A|0,728,127);o=0}b=Fb()|0}break}}if((d|0)==13)b=Fb()|0;else if((d|0)==14){b=Fb()|0;d=54}else if((d|0)==40)d=53;else if((d|0)==43)d=53;else if((d|0)==51){Jx(q);Jx(p);d=52}if((d|0)==52){Jx(r);d=53}if((d|0)==53){Jx(t);d=54}if((d|0)==54){Jx(u);Jx(v)}Jx(w)}Jx(x)}Jx(z);Jx(y);Qb(b|0)}function Lx(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;i=oy(Gx(d)|0)|0;e=aU(20)|0;o=0;Xa(141,e|0,i|0);h=o;o=0;if(h&1){b=Fb()|0;cU(e)}else{ek(a,e);h=b+8|0;g=1;b=0;while(1){o=0;e=fa(141,c[h>>2]|0)|0;f=o;o=0;if(f&1)break;if(!((b|0)<(i|0)&(g|0)<(e|0))){j=5;break}e=Gx(d)|0;o=0;e=ja(91,e|0,g|0)|0;f=o;o=0;if(f&1)break;if(!e){o=0;e=ja(94,c[h>>2]|0,g|0)|0;f=o;o=0;if(f&1)break;o=0;f=ja(60,a|0,b|0)|0;k=o;o=0;if(k&1)break;c[f>>2]=e;b=b+1|0}g=g+1|0}do if((j|0)==5)if((b|0)==(i|0))return;else{k=Ab(8)|0;Eo(k,47560);o=0;bb(68,k|0,728,127);o=0;break}while(0);b=Fb()|0;ij(a)}Qb(b|0)}function Mx(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,m=0,n=0,p=0,q=0;m=l;l=l+32|0;p=m+16|0;n=m+12|0;j=m;i=oy(Gx(e)|0)|0;g=aU(20)|0;o=0;Xa(141,g|0,i|0);k=o;o=0;if(k&1){b=Fb()|0;cU(g)}else{ek(p,g);k=b+8|0;h=1;while(1){if((i|0)<(h|0)){e=10;break}b=c[k>>2]|0;g=Gx(e)|0;o=0;g=ja(93,g|0,h|0)|0;q=o;o=0;if(q&1){e=9;break}o=0;b=la(91,b|0,h|0,g|0)|0;q=o;o=0;if(q&1){e=9;break}o=0;g=ja(60,p|0,i-h|0)|0;q=o;o=0;if(q&1){e=9;break}c[g>>2]=b;h=h+1|0}do if((e|0)==10){o=0;h=fa(107,24)|0;q=o;o=0;if(q&1)e=9;else{b=c[k>>2]|0;o=0;Xa(138,j|0,p|0);q=o;o=0;if(!(q&1)){o=0;bb(118,h|0,b|0,j|0);q=o;o=0;if(!(q&1)){o=0;Xa(282,n|0,h|0);q=o;o=0;if(q&1)g=0;else{ij(j);j=Gk(Fk(f)|0)|0;o=0;b=fa(107,20)|0;q=o;o=0;do if(!(q&1)){o=0;Xa(141,b|0,j|0);q=o;o=0;if(q&1){q=Fb()|0;cU(b);b=q;break}o=0;Xa(177,a|0,b|0);q=o;o=0;if(!(q&1)){i=0;while(1){if((i|0)>=(j|0)){e=32;break}b=c[k>>2]|0;o=0;g=ja(60,f|0,i|0)|0;q=o;o=0;if(q&1){e=33;break}o=0;h=ja(94,b|0,c[g>>2]|0)|0;q=o;o=0;if(q&1){e=33;break}b=c[k>>2]|0;g=Gx(d)|0;o=0;g=ja(91,g|0,h|0)|0;q=o;o=0;if(q&1){e=33;break}o=0;e=la(90,b|0,0,g|0)|0;q=o;o=0;if(q&1){e=33;break}g=c[k>>2]|0;b=Gx(n)|0;o=0;b=ja(91,b|0,h|0)|0;q=o;o=0;if(q&1){e=33;break}o=0;b=ja(94,g|0,b|0)|0;q=o;o=0;if(q&1){e=33;break}o=0;b=la(91,c[k>>2]|0,e|0,b|0)|0;q=o;o=0;if(q&1){e=33;break}o=0;g=ja(60,a|0,i|0)|0;q=o;o=0;if(q&1){e=33;break}c[g>>2]=b;i=i+1|0}if((e|0)==32){Jx(n);ij(p);l=m;return}else if((e|0)==33){b=Fb()|0;ij(a);break}}else e=30}else e=30;while(0);if((e|0)==30)b=Fb()|0;Jx(n);break}}else g=1;b=Fb()|0;ij(j);if(!g)break}else b=Fb()|0;cU(h)}}while(0);if((e|0)==9)b=Fb()|0;ij(p)}Qb(b|0)}function Nx(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Jx(e)}cU(c[a>>2]|0)}return}function Ox(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(287,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(288,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;Nx(a);Qb(d|0)}while(0);return}function Px(a,b){a=a|0;b=b|0;var d=0;if((Rx(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function Qx(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{Fx(b,0);b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function Rx(a){a=a|0;return 1073741823}function Sx(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Tx(){Ux();return}function Ux(){Vx(58864,929,3);return}function Vx(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,m=0,n=0,p=0,q=0,r=0,s=0;h=l;l=l+48|0;m=h+36|0;k=h+24|0;i=h+12|0;j=h;Uk(a);r=a+12|0;o=0;Na(341,r|0);q=o;o=0;if(q&1)b=Fb()|0;else{q=a+24|0;o=0;Xa(282,q|0,0);n=o;o=0;if(n&1)b=Fb()|0;else{n=a+28|0;o=0;Xa(282,n|0,0);g=o;o=0;if(g&1)b=Fb()|0;else{g=a+32|0;c[g>>2]=b;o=0;e=fa(107,20)|0;s=o;o=0;a:do if(!(s&1)){o=0;Xa(141,e|0,b|0);s=o;o=0;if(s&1){b=Fb()|0;cU(e);break}o=0;ja(95,a|0,e|0)|0;s=o;o=0;if(!(s&1)?(o=0,f=fa(107,20)|0,s=o,o=0,!(s&1)):0){o=0;Xa(141,f|0,c[g>>2]|0);s=o;o=0;if(s&1){b=Fb()|0;cU(f);break}o=0;ja(95,r|0,f|0)|0;s=o;o=0;if(!(s&1)){e=0;f=1;b=c[g>>2]|0;while(1){if((e|0)>=(b|0)){e=0;p=21;break}o=0;b=ja(60,a|0,e|0)|0;s=o;o=0;if(s&1)break;c[b>>2]=f;s=O(f,d)|0;b=c[g>>2]|0;e=e+1|0;f=(s|0)%(b|0)|0}b:do if((p|0)==21){while(1){p=0;if((e|0)>=(b+-1|0))break;o=0;b=ja(60,a|0,e|0)|0;s=o;o=0;if(s&1)break b;o=0;b=ja(60,r|0,c[b>>2]|0)|0;s=o;o=0;if(s&1)break b;c[b>>2]=e;e=e+1|0;b=c[g>>2]|0;p=21}o=0;b=fa(107,20)|0;s=o;o=0;if(!(s&1)){o=0;Xa(141,b|0,1);s=o;o=0;if(s&1){s=Fb()|0;cU(b);b=s;break a}o=0;Xa(177,m|0,b|0);s=o;o=0;if(!(s&1)){o=0;b=fa(107,20)|0;s=o;o=0;do if(s&1)p=43;else{o=0;Xa(141,b|0,1);s=o;o=0;if(s&1){s=Fb()|0;cU(b);b=s;break}o=0;Xa(177,k|0,b|0);s=o;o=0;if(s&1){p=43;break}o=0;b=ja(60,m|0,0)|0;s=o;o=0;c:do if(s&1)p=45;else{c[b>>2]=0;o=0;b=ja(60,k|0,0)|0;s=o;o=0;if(s&1){p=45;break}c[b>>2]=1;o=0;f=fa(107,24)|0;s=o;o=0;if(s&1){p=45;break}o=0;Xa(138,i|0,m|0);s=o;o=0;if(!(s&1)){o=0;bb(118,f|0,a|0,i|0);s=o;o=0;do if(s&1)e=1;else{o=0;ja(96,q|0,f|0)|0;s=o;o=0;if(s&1){e=0;break}ij(i);o=0;f=fa(107,24)|0;s=o;o=0;if(s&1){p=45;break c}o=0;Xa(138,j|0,k|0);s=o;o=0;if(!(s&1)){o=0;bb(118,f|0,a|0,j|0);s=o;o=0;do if(s&1)e=1;else{o=0;ja(96,n|0,f|0)|0;s=o;o=0;if(s&1){e=0;break}ij(j);ij(k);ij(m);l=h;return}while(0);b=Fb()|0;ij(j);if(!e)break c}else b=Fb()|0;cU(f);break c}while(0);b=Fb()|0;ij(i);if(!e)break}else b=Fb()|0;cU(f)}while(0);if((p|0)==45)b=Fb()|0;ij(k)}while(0);if((p|0)==43)b=Fb()|0;ij(m);break a}}}while(0);b=Fb()|0}else p=17}else p=17}else p=17;while(0);if((p|0)==17)b=Fb()|0;Jx(n)}Jx(q)}ij(r)}ij(a);Qb(b|0)}function Wx(a,b){a=a|0;b=b|0;Sx(a,b);return a|0}function Xx(a,b){a=a|0;b=b|0;Hx(a,b+24|0);return}function Yx(a,b){a=a|0;b=b|0;Hx(a,b+28|0);return}function Zx(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,m=0;h=l;l=l+32|0;k=h+16|0;g=h+12|0;i=h;a:do if((d|0)<0){f=Ab(8)|0;o=0;Xa(102,f|0,47644);m=o;o=0;if(m&1){m=Fb()|0;Jb(f|0);f=m;break}else Mb(f|0,632,117)}else{b:do if(!e)Hx(a,b+24|0);else{f=aU(20)|0;o=0;Xa(141,f|0,d+1|0);d=o;o=0;if(d&1){m=Fb()|0;cU(f);f=m;break a}ek(k,f);o=0;f=ja(60,k|0,0)|0;d=o;o=0;do if(!(d&1)?(c[f>>2]=e,o=0,j=fa(107,24)|0,e=o,o=0,!(e&1)):0){o=0;Xa(138,i|0,k|0);e=o;o=0;if(!(e&1)){o=0;bb(118,j|0,b|0,i|0);e=o;o=0;if(!(e&1)){o=0;Xa(282,g|0,j|0);e=o;o=0;if(!(e&1)){ij(i);o=0;Xa(289,a|0,g|0);j=o;o=0;if(j&1){f=Fb()|0;Jx(g);break}else{Jx(g);ij(k);break b}}else d=0}else d=1;f=Fb()|0;ij(i);if(!d)break}else f=Fb()|0;cU(j)}else m=16;while(0);if((m|0)==16)f=Fb()|0;ij(k);break a}while(0);l=h;return}while(0);Qb(f|0)}function _x(a,b,d){a=a|0;b=b|0;d=d|0;return (d+b|0)%(c[a+32>>2]|0)|0|0}function $x(a,b,d){a=a|0;b=b|0;d=d|0;a=c[a+32>>2]|0;return (b-d+a|0)%(a|0)|0|0}function ay(a,b){a=a|0;b=b|0;return c[(Xe(a,b)|0)>>2]|0}function by(a,b){a=a|0;b=b|0;if(b|0)return c[(Xe(a+12|0,b)|0)>>2]|0;a=Ab(8)|0;o=0;Xa(102,a|0,47666);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else Mb(a|0,632,117);return 0}function cy(a,b){a=a|0;b=b|0;var d=0;if(b|0){d=c[a+32>>2]|0;return c[(Xe(a,d+-1-(c[(Xe(a+12|0,b)|0)>>2]|0)|0)|0)>>2]|0}a=Ab(8)|0;o=0;Xa(102,a|0,47679);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else Mb(a|0,632,117);return 0}function dy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if((b|0)==0|(d|0)==0)a=0;else{e=a+12|0;b=c[(Xe(e,b)|0)>>2]|0;d=(c[(Xe(e,d)|0)>>2]|0)+b|0;a=c[(Xe(a,(d|0)%((c[a+32>>2]|0)+-1|0)|0)|0)>>2]|0}return a|0}function ey(a){a=a|0;return c[a+32>>2]|0}function fy(a){a=a|0;c[a>>2]=32940;ij(a+12|0);ff(a);return}function gy(a){a=a|0;fy(a);cU(a);return}function hy(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,m=0,n=0,p=0,q=0,r=0;p=l;l=l+48|0;f=p+32|0;g=p+16|0;h=p+4|0;j=p;n=p+20|0;cf(a);c[a>>2]=32940;i=a+8|0;c[i>>2]=b;q=a+12|0;Uk(q);a:do if(!(Gk(Fk(d)|0)|0)){b=Ab(8)|0;o=0;Xa(102,b|0,47736);p=o;o=0;if(p&1){p=Fb()|0;Jb(b|0);b=p;break}else{o=0;bb(68,b|0,632,117);o=0;b=Fb()|0;break}}else{e=Gk(Fk(d)|0)|0;b:do if((e|0)>1){o=0;b=ja(60,d|0,0)|0;k=o;o=0;if(!(k&1))if(!(c[b>>2]|0)){k=1;while(1){if((e|0)<=(k|0)){m=14;break}o=0;b=ja(60,d|0,k|0)|0;r=o;o=0;if(r&1)break;if(c[b>>2]|0){m=14;break}k=k+1|0}do if((m|0)==14){if((e|0)!=(k|0)){o=0;Xa(138,n|0,d|0);r=o;o=0;if(r&1)break;f=e-k|0;o=0;b=fa(107,20)|0;r=o;o=0;do if(!(r&1)){o=0;Xa(141,b|0,f|0);r=o;o=0;if(r&1){r=Fb()|0;cU(b);b=r;break}o=0;Xa(291,q|0,b|0);r=o;o=0;if(!(r&1)){d=0;while(1){if((d|0)>=(f|0)){m=34;break}o=0;b=ja(60,n|0,d+k|0)|0;r=o;o=0;if(r&1){m=40;break}b=c[b>>2]|0;o=0;e=ja(60,q|0,d|0)|0;r=o;o=0;if(r&1){m=40;break}c[e>>2]=b;d=d+1|0}if((m|0)==34){ij(n);m=43;break b}else if((m|0)==40){b=Fb()|0;break}}else m=35}else m=35;while(0);if((m|0)==35)b=Fb()|0;ij(n);break a}o=0;Xa(284,g|0,c[i>>2]|0);r=o;o=0;if(!(r&1)){r=Gx(g)|0;o=0;Xa(290,f|0,r|0);r=o;o=0;if(r&1){b=Fb()|0;Jx(g);break a}e=Gk(Fk(f)|0)|0;ij(f);Jx(g);o=0;b=fa(107,20)|0;r=o;o=0;if(!(r&1)){o=0;Xa(141,b|0,e|0);r=o;o=0;if(r&1){r=Fb()|0;cU(b);b=r;break a}o=0;Xa(291,q|0,b|0);r=o;o=0;if(!(r&1)?(o=0,Xa(284,j|0,c[i>>2]|0),r=o,o=0,!(r&1)):0){r=Gx(j)|0;o=0;Xa(290,h|0,r|0);r=o;o=0;do if(!(r&1)){r=jy(h)|0;n=jy(q)|0;o=0;ja(97,n|0,r|0)|0;r=o;o=0;if(r&1){b=Fb()|0;ij(h);break}else{ij(h);Jx(j);m=43;break b}}else b=Fb()|0;while(0);Jx(j);break a}}}}while(0);b=Fb()|0;break a}else m=42;else m=12}else m=42;while(0);if((m|0)==42){o=0;ja(61,q|0,d|0)|0;r=o;o=0;if(r&1)m=12;else m=43}if((m|0)==12){b=Fb()|0;break}else if((m|0)==43){l=p;return}}while(0);ij(q);ff(a);Qb(b|0)}function iy(a,b){a=a|0;b=b|0;hj(a,b+12|0);return}function jy(a){a=a|0;return c[a+8>>2]|0}function ky(a,b){a=a|0;b=b|0;if((a|0)!=(b|0))ly(a+8|0,c[b+8>>2]|0,c[b+12>>2]|0);return a|0}function ly(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;e=b;l=d-e>>2;f=a+8|0;j=c[a>>2]|0;h=j;a:do if(l>>>0>(c[f>>2]|0)-j>>2>>>0){ny(a);e=qj(a)|0;if(e>>>0>>0)wS(a);else{j=(c[f>>2]|0)-(c[a>>2]|0)|0;k=j>>1;oj(a,j>>2>>>0>>1>>>0?(k>>>0>>0?l:k):e);my(a,b,d,l);break}}else{k=a+4|0;g=(c[k>>2]|0)-j>>2;i=l>>>0>g>>>0;g=i?b+(g<<2)|0:d;e=g-e|0;f=e>>2;if(f|0)xW(j|0,b|0,e|0)|0;f=h+(f<<2)|0;if(i){my(a,g,d,l-((c[k>>2]|0)-(c[a>>2]|0)>>2)|0);break}e=c[k>>2]|0;while(1){if((e|0)==(f|0))break a;l=e+-4|0;c[k>>2]=l;e=l}}while(0);return}function my(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;e=a+4|0;a=d-b|0;if((a|0)>0){wW(c[e>>2]|0,b|0,a|0)|0;c[e>>2]=(c[e>>2]|0)+(a>>>2<<2)}return}function ny(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a>>2]|0;if(b|0){d=a+4|0;e=c[d>>2]|0;while(1){if((e|0)==(b|0))break;f=e+-4|0;c[d>>2]=f;e=f}cU(b);c[a+8>>2]=0;c[d>>2]=0;c[a>>2]=0}return}function oy(a){a=a|0;return (Gk(Fk(a+12|0)|0)|0)+-1|0}function py(a){a=a|0;return (c[(Xe(a+12|0,0)|0)>>2]|0)==0|0}function qy(a,b){a=a|0;b=b|0;a=a+12|0;return c[(Xe(a,(Gk(Fk(a)|0)|0)+~b|0)|0)>>2]|0}function ry(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;a:do if(!b)a=qy(a,0)|0;else{f=a+12|0;g=Gk(Fk(f)|0)|0;e=a+8|0;if((b|0)==1){a=0;d=0;while(1){if((d|0)>=(g|0))break a;b=c[e>>2]|0;a=_x(b,a,c[(Xe(f,d)|0)>>2]|0)|0;d=d+1|0}}a=c[(Xe(f,0)|0)>>2]|0;d=1;while(1){if((d|0)>=(g|0))break a;i=c[e>>2]|0;h=dy(i,b,a)|0;a=_x(i,h,c[(Xe(f,d)|0)>>2]|0)|0;d=d+1|0}}while(0);return a|0}function sy(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,m=0,n=0,p=0;k=l;l=l+64|0;p=k+48|0;n=k+36|0;e=k+24|0;m=k+12|0;j=k;i=b+8|0;h=c[i>>2]|0;a:do if((h|0)!=(c[(Gx(d)|0)+8>>2]|0)){b=Ab(8)|0;o=0;Xa(102,b|0,47753);p=o;o=0;if(p&1){p=Fb()|0;Jb(b|0);b=p;break}else Mb(b|0,632,117)}else{b:do if(py(b)|0)Hx(a,d);else{if(py(Gx(d)|0)|0){Fx(a,b);break}hj(p,b+12|0);h=(Gx(d)|0)+12|0;o=0;Xa(138,n|0,h|0);h=o;o=0;if(h&1)b=Fb()|0;else{h=Gk(Fk(p)|0)|0;do if((h|0)>(Gk(Fk(n)|0)|0)){o=0;Xa(138,e|0,p|0);h=o;o=0;if(h&1)g=16;else{o=0;ja(61,p|0,n|0)|0;h=o;o=0;if(!(h&1)?(o=0,ja(61,n|0,e|0)|0,h=o,o=0,!(h&1)):0){ij(e);g=18;break}b=Fb()|0;ij(e)}}else g=18;while(0);do if((g|0)==18){o=0;b=fa(107,20)|0;h=o;o=0;if(!(h&1)){h=Gk(Fk(n)|0)|0;o=0;Xa(141,b|0,h|0);h=o;o=0;if(h&1){m=Fb()|0;cU(b);b=m;break}o=0;Xa(177,m|0,b|0);h=o;o=0;if(!(h&1)){h=Gk(Fk(n)|0)|0;h=h-(Gk(Fk(p)|0)|0)|0;e=0;while(1){if((e|0)>=(h|0)){f=h;g=28;break}o=0;b=ja(60,n|0,e|0)|0;g=o;o=0;if(g&1){g=27;break}b=c[b>>2]|0;o=0;d=ja(60,m|0,e|0)|0;g=o;o=0;if(g&1){g=27;break}c[d>>2]=b;e=e+1|0}do if((g|0)==27)b=Fb()|0;else if((g|0)==28){while(1){g=0;if((f|0)>=(Gk(Fk(n)|0)|0))break;e=c[i>>2]|0;o=0;b=ja(60,p|0,f-h|0)|0;g=o;o=0;if(g&1){g=30;break}b=c[b>>2]|0;o=0;d=ja(60,n|0,f|0)|0;g=o;o=0;if(g&1){g=30;break}o=0;b=la(92,e|0,b|0,c[d>>2]|0)|0;g=o;o=0;if(g&1){g=30;break}o=0;d=ja(60,m|0,f|0)|0;g=o;o=0;if(g&1){g=30;break}c[d>>2]=b;f=f+1|0;g=28}if((g|0)==30){b=Fb()|0;break}o=0;d=fa(107,24)|0;h=o;o=0;if(h&1){b=Fb()|0;break}b=c[i>>2]|0;o=0;Xa(138,j|0,m|0);i=o;o=0;do if(!(i&1)){o=0;bb(118,d|0,b|0,j|0);i=o;o=0;if(i&1){b=Fb()|0;ij(j);break}else{Fx(a,d);ij(j);ij(m);ij(n);ij(p);break b}}else b=Fb()|0;while(0);cU(d)}while(0);ij(m)}else g=16}else g=16}while(0);if((g|0)==16)b=Fb()|0;ij(n)}ij(p);break a}while(0);l=k;return}while(0);Qb(b|0)}function ty(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+16|0;e=f;g=c[b+8>>2]|0;a:do if((g|0)==(c[(Gx(d)|0)+8>>2]|0)){do if(!(py(Gx(d)|0)|0)){uy(e,Gx(d)|0);o=0;bb(121,a|0,b|0,e|0);g=o;o=0;if(g&1){a=Fb()|0;Jx(e);break a}else{Jx(e);break}}else Fx(a,b);while(0);l=f;return}else{b=Ab(4)|0;o=0;a=fa(107,8)|0;g=o;o=0;do if(!(g&1)){o=0;Xa(102,a|0,47753);g=o;o=0;if(g&1){g=Fb()|0;cU(a);a=g;break}else{c[b>>2]=a;Mb(b|0,1288,0)}}else a=Fb()|0;while(0);Jb(b|0)}while(0);Qb(a|0)}function uy(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,m=0;j=l;l=l+32|0;k=j+12|0;i=j;g=b+12|0;h=Gk(Fk(g)|0)|0;d=aU(20)|0;o=0;Xa(141,d|0,h|0);f=o;o=0;if(f&1){b=Fb()|0;cU(d)}else{ek(k,d);f=b+8|0;e=0;while(1){if((e|0)>=(h|0)){d=4;break}b=c[f>>2]|0;o=0;d=ja(60,g|0,e|0)|0;m=o;o=0;if(m&1){d=10;break}o=0;b=la(90,b|0,0,c[d>>2]|0)|0;m=o;o=0;if(m&1){d=10;break}o=0;d=ja(60,k|0,e|0)|0;m=o;o=0;if(m&1){d=10;break}c[d>>2]=b;e=e+1|0}do if((d|0)==4){o=0;d=fa(107,24)|0;m=o;o=0;if(m&1){b=Fb()|0;break}b=c[f>>2]|0;o=0;Xa(138,i|0,k|0);m=o;o=0;do if(!(m&1)){o=0;bb(118,d|0,b|0,i|0);m=o;o=0;if(m&1){b=Fb()|0;ij(i);break}else{Fx(a,d);ij(i);ij(k);l=j;return}}else b=Fb()|0;while(0);cU(d)}else if((d|0)==10)b=Fb()|0;while(0);ij(k)}Qb(b|0)}function vy(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;q=l;l=l+48|0;t=q+36|0;s=q+24|0;r=q+12|0;p=q;n=b+8|0;m=c[n>>2]|0;a:do if((m|0)==(c[(Gx(d)|0)+8>>2]|0)){b:do if(!(py(b)|0)?!(py(Gx(d)|0)|0):0){hj(t,b+12|0);m=Gk(Fk(t)|0)|0;k=(Gx(d)|0)+12|0;o=0;Xa(138,s|0,k|0);k=o;o=0;if(k&1)b=Fb()|0;else{k=Gk(Fk(s)|0)|0;o=0;b=fa(107,20)|0;j=o;o=0;do if(!(j&1)){o=0;Xa(141,b|0,m+-1+k|0);j=o;o=0;if(j&1){r=Fb()|0;cU(b);b=r;break}o=0;Xa(177,r|0,b|0);j=o;o=0;if(!(j&1)){j=0;c:while(1){if((j|0)>=(m|0)){e=31;break}o=0;b=ja(60,t|0,j|0)|0;i=o;o=0;if(i&1){e=28;break}i=c[b>>2]|0;h=0;while(1){if((h|0)>=(k|0))break;f=c[n>>2]|0;g=h+j|0;o=0;b=ja(60,r|0,g|0)|0;e=o;o=0;if(e&1){e=29;break c}e=c[b>>2]|0;b=c[n>>2]|0;o=0;d=ja(60,s|0,h|0)|0;u=o;o=0;if(u&1){e=29;break c}o=0;b=la(91,b|0,i|0,c[d>>2]|0)|0;u=o;o=0;if(u&1){e=29;break c}o=0;d=la(92,f|0,e|0,b|0)|0;u=o;o=0;if(u&1){e=29;break c}o=0;b=ja(60,r|0,g|0)|0;u=o;o=0;if(u&1){e=29;break c}c[b>>2]=d;h=h+1|0}j=j+1|0}if((e|0)==29)b=Fb()|0;else if((e|0)==31){o=0;d=fa(107,24)|0;u=o;o=0;if(u&1)e=28;else{b=c[n>>2]|0;o=0;Xa(138,p|0,r|0);u=o;o=0;do if(!(u&1)){o=0;bb(118,d|0,b|0,p|0);u=o;o=0;if(u&1){b=Fb()|0;ij(p);break}else{Fx(a,d);ij(p);ij(r);ij(s);ij(t);break b}}else b=Fb()|0;while(0);cU(d)}}if((e|0)==28)b=Fb()|0;ij(r)}else e=26}else e=26;while(0);if((e|0)==26)b=Fb()|0;ij(s)}ij(t);break a}else e=10;while(0);if((e|0)==10)Xx(a,c[n>>2]|0);l=q;return}else{d=Ab(4)|0;o=0;b=fa(107,8)|0;u=o;o=0;do if(!(u&1)){o=0;Xa(102,b|0,47753);u=o;o=0;if(u&1){u=Fb()|0;cU(b);b=u;break}else{c[d>>2]=b;Mb(d|0,1288,0)}}else b=Fb()|0;while(0);Jb(d|0)}while(0);Qb(b|0)}function wy(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,m=0,n=0;k=l;l=l+32|0;m=k+12|0;j=k;i=b+8|0;a:do switch(d|0){case 0:{Xx(a,c[i>>2]|0);break}case 1:{Fx(a,b);break}default:{g=b+12|0;h=Gk(Fk(g)|0)|0;b=aU(20)|0;o=0;Xa(141,b|0,h|0);f=o;o=0;if(f&1){m=Fb()|0;cU(b);b=m}else{ek(m,b);f=0;while(1){if((f|0)>=(h|0)){e=7;break}b=c[i>>2]|0;o=0;e=ja(60,g|0,f|0)|0;n=o;o=0;if(n&1){e=13;break}o=0;b=la(91,b|0,c[e>>2]|0,d|0)|0;n=o;o=0;if(n&1){e=13;break}o=0;e=ja(60,m|0,f|0)|0;n=o;o=0;if(n&1){e=13;break}c[e>>2]=b;f=f+1|0}do if((e|0)==7){o=0;e=fa(107,24)|0;n=o;o=0;if(n&1){b=Fb()|0;break}b=c[i>>2]|0;o=0;Xa(138,j|0,m|0);n=o;o=0;do if(!(n&1)){o=0;bb(118,e|0,b|0,j|0);n=o;o=0;if(n&1){b=Fb()|0;ij(j);break}else{Fx(a,e);ij(j);ij(m);break a}}else b=Fb()|0;while(0);cU(e)}else if((e|0)==13)b=Fb()|0;while(0);ij(m)}Qb(b|0)}}while(0);l=k;return}function xy(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,m=0,n=0;k=l;l=l+32|0;m=k+12|0;j=k;a:do if((d|0)<0){d=Ab(4)|0;o=0;b=fa(107,8)|0;m=o;o=0;do if(!(m&1)){o=0;Xa(102,b|0,47835);m=o;o=0;if(m&1){m=Fb()|0;cU(b);b=m;break}else{c[d>>2]=b;Mb(d|0,1288,0)}}else b=Fb()|0;while(0);Jb(d|0)}else{i=b+8|0;b:do if(!e)Xx(a,c[i>>2]|0);else{g=b+12|0;h=Gk(Fk(g)|0)|0;b=aU(20)|0;o=0;Xa(141,b|0,h+d|0);f=o;o=0;if(f&1){m=Fb()|0;cU(b);b=m;break a}ek(m,b);f=0;while(1){if((f|0)>=(h|0)){d=13;break}b=c[i>>2]|0;o=0;d=ja(60,g|0,f|0)|0;n=o;o=0;if(n&1){d=19;break}o=0;b=la(91,b|0,c[d>>2]|0,e|0)|0;n=o;o=0;if(n&1){d=19;break}o=0;d=ja(60,m|0,f|0)|0;n=o;o=0;if(n&1){d=19;break}c[d>>2]=b;f=f+1|0}do if((d|0)==13){o=0;d=fa(107,24)|0;n=o;o=0;if(n&1){b=Fb()|0;break}b=c[i>>2]|0;o=0;Xa(138,j|0,m|0);n=o;o=0;do if(!(n&1)){o=0;bb(118,d|0,b|0,j|0);n=o;o=0;if(n&1){b=Fb()|0;ij(j);break}else{Fx(a,d);ij(j);ij(m);break b}}else b=Fb()|0;while(0);cU(d)}else if((d|0)==19)b=Fb()|0;while(0);ij(m);break a}while(0);l=k;return}while(0);Qb(b|0)}function yy(a,b){a=a|0;b=b|0;ie(a,b);return}function zy(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0.0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;r=l;l=l+80|0;z=r+76|0;x=r+64|0;c=r+48|0;w=r+52|0;g=r+44|0;d=r+24|0;e=r+20|0;v=r+40|0;u=r+28|0;p=r+16|0;s=r+12|0;t=r;Tf(z,vi(b)|0);o=0;Xa(128,c|0,z|0);A=o;o=0;do if(A&1)c=Fb()|0;else{o=0;bb(124,x|0,c|0,8);A=o;o=0;if(A&1){A=Fb()|0;de(c);c=A;break}de(c);a:do if(!(By(x)|0)){o=0;Xa(128,e|0,z|0);A=o;o=0;if(!(A&1)){o=0;bb(126,e|0,x|0,0);A=o;o=0;if(A&1){c=Fb()|0;de(e);break}else{de(e);y=24;break}}else y=13}else{o=0;Xa(128,g|0,z|0);A=o;o=0;if(A&1)c=Fb()|0;else{o=0;bb(125,w|0,g|0,8);A=o;o=0;do if(!(A&1)){o=0;ja(98,x|0,w|0)|0;A=o;o=0;if(A&1){c=Fb()|0;Qe(w);break}Qe(w);de(g);if(!(tv(x)|0)){y=24;break a}o=0;Xa(128,d|0,z|0);A=o;o=0;if(A&1){y=13;break a}o=0;bb(126,d|0,x|0,1);A=o;o=0;if(A&1){c=Fb()|0;de(d);break a}else{de(d);y=24;break a}}else c=Fb()|0;while(0);de(g)}}while(0);b:do if((y|0)==24){if(By(x)|0){y=Ab(8)|0;gn(y,47852);o=0;bb(68,y|0,488,58);o=0;y=13;break}o=0;f=+X(45,x|0);A=o;o=0;if(A&1)y=13;else{if(!(f<1.0)){o=0;c=ja(55,x|0,12)|0;A=o;o=0;if((((!(A&1)?(o=0,h=ja(55,x|0,14)|0,A=o,o=0,!(A&1)):0)?(o=0,i=ja(55,x|0,13)|0,A=o,o=0,!(A&1)):0)?(o=0,j=ja(55,x|0,15)|0,A=o,o=0,!(A&1)):0)?(o=0,q=ra(46,c|0,h|0,i|0,j|0,+f)|0,A=o,o=0,!(A&1)):0){if((q|0)<1){c=Ab(8)|0;gn(c,47889);o=0;bb(68,c|0,488,58);o=0;c=Fb()|0;break}o=0;c=ja(55,x|0,12)|0;A=o;o=0;do if(((!(A&1)?(o=0,k=ja(55,x|0,14)|0,A=o,o=0,!(A&1)):0)?(o=0,m=ja(55,x|0,13)|0,A=o,o=0,!(A&1)):0)?(o=0,n=ja(55,x|0,15)|0,A=o,o=0,!(A&1)):0){o=0;c=xa(44,0,c|0,k|0,m|0,n|0,+f)|0;A=o;o=0;if(A&1)break;o=0;hb(56,w|0,b|0,x|0,q|0,((c|0)<(q|0)?q:c)|0);A=o;o=0;if(A&1){c=Fb()|0;break b}o=0;Xa(128,p|0,w|0);A=o;o=0;c:do if(A&1){c=Fb()|0;y=71}else{o=0;bb(127,u|0,p|0,q|0);A=o;o=0;do if(A&1)c=Fb()|0;else{o=0;Xa(292,v|0,u|0);A=o;o=0;if(A&1){c=Fb()|0;Jy(u);break}Jy(u);de(p);o=0;Xa(249,u|0,4);A=o;o=0;if(A&1)c=Fb()|0;else{o=0;c=ja(55,x|0,5)|0;A=o;o=0;d:do if(A&1)y=73;else{o=0;d=ja(55,u|0,0)|0;A=o;o=0;if(A&1){y=73;break}o=0;ja(58,d|0,c|0)|0;A=o;o=0;if(A&1){y=73;break}o=0;c=ja(55,x|0,4)|0;A=o;o=0;if(A&1){y=73;break}o=0;d=ja(55,u|0,1)|0;A=o;o=0;if(A&1){y=73;break}o=0;ja(58,d|0,c|0)|0;A=o;o=0;if(A&1){y=73;break}o=0;c=ja(55,x|0,6)|0;A=o;o=0;if(A&1){y=73;break}o=0;d=ja(55,u|0,2)|0;A=o;o=0;if(A&1){y=73;break}o=0;ja(58,d|0,c|0)|0;A=o;o=0;if(A&1){y=73;break}o=0;c=ja(55,x|0,7)|0;A=o;o=0;if(A&1){y=73;break}o=0;d=ja(55,u|0,3)|0;A=o;o=0;if(A&1){y=73;break}o=0;ja(58,d|0,c|0)|0;A=o;o=0;if(A&1){y=73;break}o=0;e=fa(107,24)|0;A=o;o=0;if(A&1){y=73;break}o=0;Xa(128,s|0,v|0);A=o;o=0;do if(!(A&1)){o=0;Xa(96,t|0,u|0);A=o;o=0;if(A&1){c=Fb()|0;de(s);break}o=0;bb(60,e|0,s|0,t|0);A=o;o=0;do if(A&1)d=1;else{o=0;Xa(215,a|0,e|0);A=o;o=0;if(A&1){d=0;break}Qe(t);de(s);Qe(u);de(v);de(w);Qe(x);de(z);l=r;return}while(0);c=Fb()|0;Qe(t);de(s);if(!d)break d}else c=Fb()|0;while(0);cU(e)}while(0);if((y|0)==73)c=Fb()|0;Qe(u)}de(v);break c}while(0);de(p);y=71}while(0);de(w);break b}while(0);c=Fb()|0;break}}else{A=Ab(8)|0;gn(A,47871);o=0;bb(68,A|0,488,58);o=0}c=Fb()|0}}while(0);if((y|0)==13)c=Fb()|0;Qe(x)}while(0);de(z);Qb(c|0)}function Ay(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,h=0,i=0,j=0,k=0,m=0,n=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;t=l;l=l+96|0;x=t+76|0;w=t+64|0;i=t+52|0;f=t+36|0;k=t+40|0;j=t+20|0;s=t+24|0;m=t+4|0;u=t+8|0;q=t;n=_k(be(b)|0)|0;r=Zk(be(b)|0)|0;rt(x,16);o=0;e=fa(107,20)|0;h=o;o=0;do if(!(h&1)){o=0;Xa(141,e|0,8);h=o;o=0;if(h&1){w=Fb()|0;cU(e);e=w;break}o=0;Xa(177,w|0,e|0);v=o;o=0;if(!(v&1)){h=0;while(1){if((h|0)>=(n|0)){v=27;break}o=0;Xa(128,f|0,b|0);v=o;o=0;if(v&1){v=19;break}o=0;rb(42,i|0,f|0,0,h|0,r|0,0,32948,8,w|0);v=o;o=0;if(v&1){v=20;break}de(f);if(Uy(i)|0){v=11;break}ij(i);h=h+d|0}a:do if((v|0)==11){o=0;f=fa(107,16)|0;e=o;o=0;do if(e&1)v=21;else{o=0;e=ja(60,i|0,0)|0;y=o;o=0;if(!(y&1)?(g=+(h|0),o=0,Pa(42,f|0,+(+(c[e>>2]|0)),+g),y=o,o=0,!(y&1)):0){o=0;e=ja(55,x|0,0)|0;y=o;o=0;if(y&1){v=21;break}Ry(e,f)|0;o=0;f=fa(107,16)|0;y=o;o=0;if(y&1){v=21;break}o=0;e=ja(60,i|0,1)|0;y=o;o=0;if(!(y&1)?(o=0,Pa(42,f|0,+(+(c[e>>2]|0)),+g),y=o,o=0,!(y&1)):0){o=0;e=ja(55,x|0,4)|0;y=o;o=0;if(y&1){v=21;break}Ry(e,f)|0;ij(i);h=n+-1|0;e=h;while(1){if((e|0)<=0){f=0;v=48;break a}o=0;Xa(128,j|0,b|0);y=o;o=0;if(y&1){v=40;break}o=0;rb(42,k|0,j|0,0,e|0,r|0,0,32948,8,w|0);y=o;o=0;if(y&1){v=41;break}de(j);if(Uy(k)|0){v=32;break}ij(k);e=e-d|0}if((v|0)==32){o=0;i=fa(107,16)|0;y=o;o=0;b:do if(y&1)v=42;else{o=0;f=ja(60,k|0,0)|0;y=o;o=0;do if(!(y&1)){g=+(e|0);o=0;Pa(42,i|0,+(+(c[f>>2]|0)),+g);y=o;o=0;if(y&1)break;o=0;e=ja(55,x|0,1)|0;y=o;o=0;if(y&1){v=42;break b}Ry(e,i)|0;o=0;f=fa(107,16)|0;y=o;o=0;if(y&1){v=42;break b}o=0;e=ja(60,k|0,1)|0;y=o;o=0;do if(!(y&1)){o=0;Pa(42,f|0,+(+(c[e>>2]|0)),+g);y=o;o=0;if(y&1)break;o=0;e=ja(55,x|0,5)|0;y=o;o=0;if(y&1){v=42;break b}Ry(e,f)|0;ij(k);f=1;v=48;break a}while(0);e=Fb()|0;cU(f);break b}while(0);e=Fb()|0;cU(i)}while(0);if((v|0)==42)e=Fb()|0;ij(k);break a}else if((v|0)==40){e=Fb()|0;break a}else if((v|0)==41){e=Fb()|0;de(j);break a}}e=Fb()|0;cU(f);break}e=Fb()|0;cU(f)}while(0);if((v|0)==21)e=Fb()|0;ij(i)}else if((v|0)==19)e=Fb()|0;else if((v|0)==20){e=Fb()|0;de(f)}else if((v|0)==27){f=0;h=n+-1|0;v=48}while(0);c:do if((v|0)==48){o=0;e=fa(107,20)|0;y=o;o=0;d:do if(!(y&1)){o=0;Xa(141,e|0,9);y=o;o=0;if(y&1){y=Fb()|0;cU(e);e=y;break c}Ew(w,e)|0;e:do if(f){i=0;while(1){if((i|0)>=(n|0)){v=94;break e}o=0;Xa(128,m|0,b|0);y=o;o=0;if(y&1){v=66;break}o=0;rb(42,s|0,m|0,0,i|0,r|0,0,33012,9,w|0);y=o;o=0;if(y&1){v=67;break}de(m);if(Uy(s)|0){v=58;break}ij(s);i=i+d|0}if((v|0)==58){o=0;f=fa(107,16)|0;y=o;o=0;f:do if(y&1)v=68;else{o=0;e=ja(60,s|0,1)|0;y=o;o=0;if(!(y&1)?(p=+(i|0),o=0,Pa(42,f|0,+(+(c[e>>2]|0)),+p),y=o,o=0,!(y&1)):0){o=0;e=ja(55,x|0,2)|0;y=o;o=0;if(y&1){v=68;break}Ry(e,f)|0;o=0;f=fa(107,16)|0;y=o;o=0;if(y&1){v=68;break}o=0;e=ja(60,s|0,0)|0;y=o;o=0;do if(!(y&1)){o=0;Pa(42,f|0,+(+(c[e>>2]|0)),+p);y=o;o=0;if(y&1)break;o=0;e=ja(55,x|0,6)|0;y=o;o=0;if(y&1){v=68;break f}Ry(e,f)|0;ij(s);while(1){if((h|0)<=0){v=94;break e}o=0;Xa(128,q|0,b|0);y=o;o=0;if(y&1){v=86;break}o=0;rb(42,u|0,q|0,0,h|0,r|0,0,33012,9,w|0);y=o;o=0;if(y&1){v=87;break}de(q);if(Uy(u)|0){v=78;break}ij(u);h=h-d|0}if((v|0)==78){o=0;f=fa(107,16)|0;y=o;o=0;g:do if(y&1)v=88;else{o=0;e=ja(60,u|0,1)|0;y=o;o=0;do if(!(y&1)){g=+(h|0);o=0;Pa(42,f|0,+(+(c[e>>2]|0)),+g);y=o;o=0;if(y&1)break;o=0;e=ja(55,x|0,3)|0;y=o;o=0;if(y&1){v=88;break g}Ry(e,f)|0;o=0;f=fa(107,16)|0;y=o;o=0;if(y&1){v=88;break g}o=0;e=ja(60,u|0,0)|0;y=o;o=0;do if(!(y&1)){o=0;Pa(42,f|0,+(+(c[e>>2]|0)),+g);y=o;o=0;if(y&1)break;o=0;e=ja(55,x|0,7)|0;y=o;o=0;if(y&1){v=88;break g}Ry(e,f)|0;ij(u);o=0;Xa(96,a|0,x|0);y=o;o=0;if(y&1)break d;else break e}while(0);e=Fb()|0;cU(f);break g}while(0);e=Fb()|0;cU(f)}while(0);if((v|0)==88)e=Fb()|0;ij(u);break c}else if((v|0)==86){e=Fb()|0;break c}else if((v|0)==87){e=Fb()|0;de(q);break c}}while(0);e=Fb()|0;cU(f);break}e=Fb()|0;cU(f)}while(0);if((v|0)==68)e=Fb()|0;ij(s);break c}else if((v|0)==66){e=Fb()|0;break c}else if((v|0)==67){e=Fb()|0;de(m);break c}}else v=94;while(0);if((v|0)==94)Vy(a);ij(w);Qe(x);l=t;return}while(0);e=Fb()|0}while(0);ij(w)}else v=6}else v=6;while(0);if((v|0)==6)e=Fb()|0;Qe(x);Qb(e|0)}function By(a){a=a|0;return (c[a+8>>2]|0)==0|0}function Cy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,h=0,i=0,j=0,k=0,m=0,n=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;u=l;l=l+96|0;y=u+76|0;x=u+64|0;j=u+52|0;h=u+36|0;m=u+40|0;k=u+20|0;t=u+24|0;n=u+4|0;v=u+8|0;q=u;r=_k(be(b)|0)|0;s=(Zk(be(b)|0)|0)>>1;rt(y,16);o=0;e=fa(107,20)|0;i=o;o=0;do if(!(i&1)){o=0;Xa(141,e|0,8);i=o;o=0;if(i&1){x=Fb()|0;cU(e);e=x;break}o=0;Xa(177,x|0,e|0);w=o;o=0;if(!(w&1)){f=r+-1|0;i=f;while(1){if((i|0)<=0){e=0;w=47;break}o=0;Xa(128,h|0,b|0);w=o;o=0;if(w&1){w=19;break}o=0;rb(42,j|0,h|0,s|0,i|0,s|0,1,32980,8,x|0);w=o;o=0;if(w&1){w=20;break}de(h);if(Uy(j)|0){w=11;break}ij(j);i=i-d|0}a:do if((w|0)==11){o=0;h=fa(107,16)|0;e=o;o=0;do if(e&1)w=21;else{o=0;e=ja(60,j|0,1)|0;z=o;o=0;if(!(z&1)?(g=+(i|0),o=0,Pa(42,h|0,+(+(c[e>>2]|0)),+g),z=o,o=0,!(z&1)):0){o=0;e=ja(55,y|0,0)|0;z=o;o=0;if(z&1){w=21;break}Ry(e,h)|0;o=0;h=fa(107,16)|0;z=o;o=0;if(z&1){w=21;break}o=0;e=ja(60,j|0,0)|0;z=o;o=0;if(!(z&1)?(o=0,Pa(42,h|0,+(+(c[e>>2]|0)),+g),z=o,o=0,!(z&1)):0){o=0;e=ja(55,y|0,4)|0;z=o;o=0;if(z&1){w=21;break}Ry(e,h)|0;ij(j);e=0;while(1){if((e|0)>=(r|0)){e=0;w=47;break a}o=0;Xa(128,k|0,b|0);z=o;o=0;if(z&1){w=39;break}o=0;rb(42,m|0,k|0,s|0,e|0,s|0,1,32980,8,x|0);z=o;o=0;if(z&1){w=40;break}de(k);if(Uy(m)|0){w=31;break}ij(m);e=e+d|0}if((w|0)==31){o=0;i=fa(107,16)|0;z=o;o=0;b:do if(z&1)w=41;else{o=0;h=ja(60,m|0,1)|0;z=o;o=0;do if(!(z&1)){g=+(e|0);o=0;Pa(42,i|0,+(+(c[h>>2]|0)),+g);z=o;o=0;if(z&1)break;o=0;e=ja(55,y|0,1)|0;z=o;o=0;if(z&1){w=41;break b}Ry(e,i)|0;o=0;h=fa(107,16)|0;z=o;o=0;if(z&1){w=41;break b}o=0;e=ja(60,m|0,0)|0;z=o;o=0;do if(!(z&1)){o=0;Pa(42,h|0,+(+(c[e>>2]|0)),+g);z=o;o=0;if(z&1)break;o=0;e=ja(55,y|0,5)|0;z=o;o=0;if(z&1){w=41;break b}Ry(e,h)|0;ij(m);e=1;w=47;break a}while(0);e=Fb()|0;cU(h);break b}while(0);e=Fb()|0;cU(i)}while(0);if((w|0)==41)e=Fb()|0;ij(m);break a}else if((w|0)==39){e=Fb()|0;break a}else if((w|0)==40){e=Fb()|0;de(k);break a}}e=Fb()|0;cU(h);break}e=Fb()|0;cU(h)}while(0);if((w|0)==21)e=Fb()|0;ij(j)}else if((w|0)==19)e=Fb()|0;else if((w|0)==20){e=Fb()|0;de(h)}while(0);c:do if((w|0)==47){o=0;h=fa(107,20)|0;z=o;o=0;d:do if(!(z&1)){o=0;Xa(141,h|0,9);z=o;o=0;if(z&1){e=Fb()|0;cU(h);break c}Ew(x,h)|0;e:do if(e){while(1){if((f|0)<=0){w=93;break e}o=0;Xa(128,n|0,b|0);z=o;o=0;if(z&1){w=65;break}o=0;rb(42,t|0,n|0,0,f|0,s|0,0,33048,9,x|0);z=o;o=0;if(z&1){w=66;break}de(n);if(Uy(t)|0){w=57;break}ij(t);f=f-d|0}if((w|0)==57){o=0;h=fa(107,16)|0;z=o;o=0;f:do if(z&1)w=67;else{o=0;e=ja(60,t|0,0)|0;z=o;o=0;if(!(z&1)?(p=+(f|0),o=0,Pa(42,h|0,+(+(c[e>>2]|0)),+p),z=o,o=0,!(z&1)):0){o=0;e=ja(55,y|0,2)|0;z=o;o=0;if(z&1){w=67;break}Ry(e,h)|0;o=0;f=fa(107,16)|0;z=o;o=0;if(z&1){w=67;break}o=0;e=ja(60,t|0,1)|0;z=o;o=0;do if(!(z&1)){o=0;Pa(42,f|0,+(+(c[e>>2]|0)),+p);z=o;o=0;if(z&1)break;o=0;e=ja(55,y|0,6)|0;z=o;o=0;if(z&1){w=67;break f}Ry(e,f)|0;ij(t);h=0;while(1){if((h|0)>=(r|0)){w=93;break e}o=0;Xa(128,q|0,b|0);z=o;o=0;if(z&1){w=85;break}o=0;rb(42,v|0,q|0,0,h|0,s|0,0,33048,9,x|0);z=o;o=0;if(z&1){w=86;break}de(q);if(Uy(v)|0){w=77;break}ij(v);h=h+d|0}if((w|0)==77){o=0;f=fa(107,16)|0;z=o;o=0;g:do if(z&1)w=87;else{o=0;e=ja(60,v|0,0)|0;z=o;o=0;do if(!(z&1)){g=+(h|0);o=0;Pa(42,f|0,+(+(c[e>>2]|0)),+g);z=o;o=0;if(z&1)break;o=0;e=ja(55,y|0,3)|0;z=o;o=0;if(z&1){w=87;break g}Ry(e,f)|0;o=0;f=fa(107,16)|0;z=o;o=0;if(z&1){w=87;break g}o=0;e=ja(60,v|0,1)|0;z=o;o=0;do if(!(z&1)){o=0;Pa(42,f|0,+(+(c[e>>2]|0)),+g);z=o;o=0;if(z&1)break;o=0;e=ja(55,y|0,7)|0;z=o;o=0;if(z&1){w=87;break g}Ry(e,f)|0;ij(v);o=0;Xa(96,a|0,y|0);z=o;o=0;if(z&1)break d;else break e}while(0);e=Fb()|0;cU(f);break g}while(0);e=Fb()|0;cU(f)}while(0);if((w|0)==87)e=Fb()|0;ij(v);break c}else if((w|0)==85){e=Fb()|0;break c}else if((w|0)==86){e=Fb()|0;de(q);break c}}while(0);e=Fb()|0;cU(f);break}e=Fb()|0;cU(h)}while(0);if((w|0)==67)e=Fb()|0;ij(t);break c}else if((w|0)==65){e=Fb()|0;break c}else if((w|0)==66){e=Fb()|0;de(n);break c}}else w=93;while(0);if((w|0)==93)Vy(a);ij(x);Qe(y);l=u;return}while(0);e=Fb()|0}while(0);ij(x)}else w=6}else w=6;while(0);if((w|0)==6)e=Fb()|0;Qe(y);Qb(e|0)}function Dy(a,b){a=a|0;b=b|0;Sy(a,b);return a|0}function Ey(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.0,m=0;j=l;l=l+16|0;e=j+12|0;g=j+8|0;h=j+4|0;i=j;m=Pe(Oe(b,4)|0)|0;k=+Lc[c[(c[m>>2]|0)+12>>2]&63](m);m=Pe(Oe(b,5)|0)|0;m=+B(+(k-+Lc[c[(c[m>>2]|0)+12>>2]&63](m)))<20.0;f=Pe(Oe(b,6)|0)|0;k=+Lc[c[(c[f>>2]|0)+12>>2]&63](f);f=Pe(Oe(b,7)|0)|0;if(m|+B(+(k-+Lc[c[(c[f>>2]|0)+12>>2]&63](f)))<20.0){m=Ab(8)|0;gn(m,47904);Mb(m|0,488,58)}ki(e,a);f=d?1:-1;o=0;nb(48,e|0,b|0,0,0,8,17,f|0);m=o;o=0;do if(!(m&1)){de(e);ki(g,a);d=d?-1:1;o=0;nb(48,g|0,b|0,1,0,8,17,d|0);m=o;o=0;if(m&1){d=Fb()|0;de(g);break}de(g);ki(h,a);o=0;nb(48,h|0,b|0,2,11,7,18,f|0);m=o;o=0;if(m&1){d=Fb()|0;de(h);break}de(h);ki(i,a);o=0;nb(48,i|0,b|0,3,11,7,18,d|0);m=o;o=0;if(m&1){d=Fb()|0;de(i);break}else{de(i);My(b,12,4,5,8,10,a);My(b,13,4,5,9,11,a);My(b,14,6,7,8,10,a);My(b,15,6,7,9,11,a);l=j;return}}else{d=Fb()|0;de(e)}while(0);Qb(d|0)}function Fy(a){a=a|0;var b=0,c=0.0,d=0.0,e=0.0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0;n=l;l=l+32|0;g=n+28|0;f=n+24|0;i=n+20|0;h=n+16|0;k=n+12|0;j=n+8|0;p=n+4|0;m=n;di(g,Oe(a,0)|0);o=0;b=ja(55,a|0,4)|0;r=o;o=0;a:do if(r&1){b=Fb()|0;q=12}else{di(f,b);o=0;d=+Z(42,g|0,f|0);r=o;o=0;if(r&1){b=Fb()|0;fi(f);q=12;break}fi(f);fi(g);di(i,Oe(a,1)|0);o=0;b=ja(55,a|0,5)|0;r=o;o=0;do if(r&1)b=Fb()|0;else{di(h,b);o=0;c=+Z(42,i|0,h|0);r=o;o=0;if(r&1){b=Fb()|0;fi(h);break}fi(h);fi(i);e=(d+c)/34.0;di(k,Oe(a,6)|0);o=0;b=ja(55,a|0,2)|0;r=o;o=0;do if(r&1)b=Fb()|0;else{di(j,b);o=0;d=+Z(42,k|0,j|0);r=o;o=0;if(r&1){b=Fb()|0;fi(j);break}fi(j);fi(k);di(p,Oe(a,7)|0);o=0;b=ja(55,a|0,3)|0;r=o;o=0;do if(!(r&1)){di(m,b);o=0;c=+Z(42,p|0,m|0);r=o;o=0;if(r&1){b=Fb()|0;fi(m);break}else{fi(m);fi(p);l=n;return +((e+(d+c)/36.0)*.5)}}else b=Fb()|0;while(0);fi(p);break a}while(0);fi(k);break a}while(0);fi(i)}while(0);if((q|0)==12)fi(g);Qb(b|0);return 0.0}function Gy(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0.0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;di(g,a);di(h,b);o=0;f=+Z(42,g|0,h|0);b=o;o=0;do if(!(b&1)){a=Qj(f/e)|0;fi(h);fi(g);di(i,c);di(j,d);o=0;f=+Z(42,i|0,j|0);h=o;o=0;if(h&1){a=Fb()|0;fi(j);fi(i);break}else{h=Qj(f/e)|0;fi(j);fi(i);j=(h+a>>1)+8|0;l=k;return j-((j|0)%17|0)|0}}else{a=Fb()|0;fi(h);fi(g)}while(0);Qb(a|0);return 0}function Hy(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;var g=0.0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;di(h,b);di(i,d);o=0;g=+Z(42,h|0,i|0);d=o;o=0;do if(!(d&1)){a=Qj(g/f)|0;fi(i);fi(h);di(j,c);di(k,e);o=0;g=+Z(42,j|0,k|0);e=o;o=0;if(e&1){a=Fb()|0;fi(k);fi(j);break}else{e=Qj(g/f)|0;fi(k);fi(j);l=m;return e+a>>1|0}}else{a=Fb()|0;fi(i);fi(h)}while(0);Qb(a|0);return 0}function Iy(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,m=0.0,n=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0;i=l;l=l+16|0;k=i+8|0;j=i+4|0;h=i;g=f<<3;e=e<<2;v=+(g|0);u=+(e|0);f=Pe(Ky(d,12)|0)|0;t=+Lc[c[(c[f>>2]|0)+8>>2]&63](f);f=Pe(Ky(d,12)|0)|0;s=+Lc[c[(c[f>>2]|0)+12>>2]&63](f);f=Pe(Ky(d,14)|0)|0;r=+Lc[c[(c[f>>2]|0)+8>>2]&63](f);f=Pe(Ky(d,14)|0)|0;q=+Lc[c[(c[f>>2]|0)+12>>2]&63](f);f=Pe(Ky(d,13)|0)|0;p=+Lc[c[(c[f>>2]|0)+8>>2]&63](f);f=Pe(Ky(d,13)|0)|0;n=+Lc[c[(c[f>>2]|0)+12>>2]&63](f);f=Pe(Ky(d,15)|0)|0;m=+Lc[c[(c[f>>2]|0)+8>>2]&63](f);f=Pe(Ky(d,15)|0)|0;Km(k,0.0,0.0,v,0.0,0.0,u,v,u,t,s,r,q,p,n,m,+Lc[c[(c[f>>2]|0)+12>>2]&63](f));o=0;f=da(43)|0;d=o;o=0;if(!(d&1)?(b=vi(b)|0,o=0,Xa(221,j|0,b|0),b=o,o=0,!(b&1)):0){o=0;Xa(168,h|0,k|0);b=o;o=0;do if(!(b&1)){o=0;jb(56,a|0,f|0,j|0,g|0,e|0,h|0);b=o;o=0;if(b&1){f=Fb()|0;qm(h);break}else{qm(h);de(j);qm(k);l=i;return}}else f=Fb()|0;while(0);de(j)}else f=Fb()|0;qm(k);Qb(f|0)}function Jy(a){a=a|0;de(a);return}function Ky(a,b){a=a|0;b=b|0;return Gf(c[a+8>>2]|0,b)|0} function Gq(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;n=l;l=l+128|0;u=n+100|0;f=n+84|0;g=n+80|0;h=n+52|0;t=n+88|0;s=n+68|0;i=n+24|0;r=n+56|0;q=n+48|0;p=n+36|0;k=n+12|0;m=n;ki(f,e);o=0;Xa(202,u|0,f|0);j=o;o=0;if(j&1){e=Fb()|0;de(f)}else{de(f);o=0;Xa(128,h|0,e|0);j=o;o=0;do if(j&1)e=Fb()|0;else{o=0;bb(84,g|0,u|0,h|0);j=o;o=0;if(j&1){e=Fb()|0;de(h);break}e=Hq(g)|0;$o(g);de(h);o=0;Xa(203,t|0,u|0);j=o;o=0;if(j&1){e=Fb()|0;break}o=0;Xa(83,i|0,t|0);j=o;o=0;do if(j&1)e=Fb()|0;else{o=0;bb(91,s|0,i|0,e|0);j=o;o=0;if(j&1){e=Fb()|0;Nd(i);break}Nd(i);j=(c[s+4>>2]|0)-(c[s>>2]|0)>>2;e=0;g=0;while(1){if((e|0)>=(j|0)){f=9;break}f=Xp((c[s>>2]|0)+(e<<2)|0)|0;o=0;f=fa(127,f|0)|0;i=o;o=0;if(i&1){f=19;break}e=e+1|0;g=f+g|0}do if((f|0)==9){o=0;Xa(103,r|0,g|0);i=o;o=0;if(i&1){e=Fb()|0;break}h=0;a:while(1){if((h|0)>=(j|0)){f=21;break}o=0;Xa(204,q|0,(c[s>>2]|0)+(h<<2)|0);i=o;o=0;if(i&1){f=31;break}i=Xp(q)|0;o=0;Xa(205,p|0,i|0);i=o;o=0;if(i&1){f=32;break}i=Xp(q)|0;o=0;i=fa(127,i|0)|0;g=o;o=0;if(g&1){f=33;break}o=0;Xa(83,k|0,p|0);g=o;o=0;if(g&1){f=34;break}o=0;bb(92,d|0,k|0,i|0);g=o;o=0;if(g&1){f=35;break}Nd(k);g=0;while(1){if((g|0)>=(i|0))break;o=0;e=ja(56,p|0,g|0)|0;f=o;o=0;if(f&1){f=39;break a}e=a[e>>0]|0;f=(O(g,j)|0)+h|0;o=0;f=ja(56,r|0,f|0)|0;v=o;o=0;if(v&1){f=39;break a}a[f>>0]=e;g=g+1|0}Nd(p);_p(q);h=h+1|0}if((f|0)==21){Iq(q);o=0;Xa(83,m|0,r|0);v=o;o=0;do if(!(v&1)){o=0;bb(93,b|0,q|0,m|0);v=o;o=0;if(v&1){e=Fb()|0;Nd(m);break}else{Nd(m);Nd(r);$p(s);Nd(t);Gp(u);l=n;return}}else e=Fb()|0;while(0)}else if((f|0)==31)e=Fb()|0;else if((f|0)==32){e=Fb()|0;f=41}else if((f|0)==33){e=Fb()|0;f=40}else if((f|0)==34){e=Fb()|0;f=40}else if((f|0)==35){e=Fb()|0;Nd(k);f=40}else if((f|0)==39){e=Fb()|0;f=40}if((f|0)==40){Nd(p);f=41}if((f|0)==41)_p(q);Nd(r)}else if((f|0)==19)e=Fb()|0;while(0);$p(s)}while(0);Nd(t)}while(0);Gp(u)}Qb(e|0)}function Hq(a){a=a|0;return c[a>>2]|0}function Iq(a){a=a|0;return}function Jq(a,b){a=a|0;b=b|0;c[a>>2]=0;aq(a,c[b>>2]|0);return}function Kq(a){a=a|0;Ko(a);cU(a);return}function Lq(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;r=+(h|0)+-.5;q=+(i|0)+-.5;i=Pe(d)|0;p=+Lc[c[(c[i>>2]|0)+8>>2]&63](i);i=Pe(d)|0;o=+Lc[c[(c[i>>2]|0)+12>>2]&63](i);i=Pe(e)|0;n=+Lc[c[(c[i>>2]|0)+8>>2]&63](i);i=Pe(e)|0;m=+Lc[c[(c[i>>2]|0)+12>>2]&63](i);i=Pe(g)|0;l=+Lc[c[(c[i>>2]|0)+8>>2]&63](i);i=Pe(g)|0;k=+Lc[c[(c[i>>2]|0)+12>>2]&63](i);i=Pe(f)|0;j=+Lc[c[(c[i>>2]|0)+8>>2]&63](i);i=Pe(f)|0;Km(a,.5,.5,r,.5,r,q,.5,q,p,o,n,m,l,k,j,+Lc[c[(c[i>>2]|0)+12>>2]&63](i));return}function Mq(a){a=a|0;c[a>>2]=5960;fi(a+12|0);fi(a+8|0);ff(a);return}function Nq(a){a=a|0;Mq(a);cU(a);return}function Oq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;cf(a);c[a>>2]=5960;f=a+8|0;o=0;Xa(117,f|0,d|0);d=o;o=0;do if(!(d&1)){o=0;Xa(117,a+12|0,b|0);d=o;o=0;if(d&1){b=Fb()|0;fi(f);break}else{c[a+16>>2]=e;return}}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function Pq(a,b){a=a|0;b=b|0;di(a,b+12|0);return}function Qq(a,b){a=a|0;b=b|0;di(a,b+8|0);return}function Rq(a){a=a|0;return c[a+16>>2]|0}function Sq(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=5940;o=0;Xa(128,a+8|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else return}function Tq(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,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,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Oa=0,Pa=0;qa=l;l=l+384|0;Da=qa+376|0;Pa=qa+372|0;j=qa+356|0;Oa=qa+360|0;Ma=qa+352|0;La=qa+348|0;Ka=qa+344|0;Ja=qa+340|0;Ha=qa+328|0;e=qa+316|0;g=qa+300|0;f=qa+296|0;h=qa+292|0;k=qa+288|0;i=qa+284|0;m=qa+280|0;q=qa+276|0;n=qa+268|0;r=qa+260|0;t=qa+240|0;s=qa+232|0;Ea=qa+324|0;Fa=qa+320|0;Ga=qa+304|0;Ca=qa+272|0;Ba=qa+264|0;Aa=qa+248|0;za=qa+244|0;ya=qa+236|0;xa=qa+228|0;w=qa+200|0;v=qa+196|0;u=qa+192|0;z=qa+188|0;y=qa+184|0;x=qa+180|0;G=qa+176|0;B=qa+172|0;A=qa+168|0;C=qa+164|0;H=qa+160|0;D=qa+156|0;E=qa+152|0;I=qa+148|0;F=qa+144|0;wa=qa+224|0;va=qa+220|0;ua=qa+216|0;ta=qa+204|0;X=qa+140|0;U=qa+136|0;O=qa+132|0;J=qa+128|0;K=qa+124|0;P=qa+120|0;L=qa+116|0;M=qa+112|0;Q=qa+108|0;N=qa+104|0;na=qa+100|0;ka=qa+96|0;aa=qa+92|0;Y=qa+88|0;ba=qa+84|0;ca=qa+80|0;da=qa+76|0;Z=qa+72|0;V=qa+68|0;R=qa+64|0;_=qa+60|0;la=qa+56|0;ea=qa+52|0;S=qa+48|0;W=qa+44|0;T=qa+40|0;oa=qa+36|0;ma=qa+32|0;ga=qa+28|0;$=qa+24|0;ha=qa+20|0;ia=qa+16|0;ra=qa+12|0;sa=qa;p=aU(36)|0;pa=b+8|0;o=0;Xa(128,j|0,pa|0);d=o;o=0;do if(!(d&1)){o=0;Xa(146,p|0,j|0);d=o;o=0;if(!(d&1)){o=0;Xa(206,Pa|0,p|0);d=o;o=0;if(d&1)e=0;else{de(j);p=Vq(Pa)|0;o=0;Xa(147,Oa|0,p|0);p=o;o=0;if(p&1)d=Fb()|0;else{o=0;Xa(117,Ma|0,c[Oa>>2]|0);p=o;o=0;if(p&1)d=Fb()|0;else{o=0;Xa(117,La|0,(c[Oa>>2]|0)+4|0);p=o;o=0;if(p&1)d=Fb()|0;else{o=0;Xa(117,Ka|0,(c[Oa>>2]|0)+8|0);p=o;o=0;if(p&1)d=Fb()|0;else{o=0;Xa(117,Ja|0,(c[Oa>>2]|0)+12|0);p=o;o=0;if(p&1)d=Fb()|0;else{o=0;Xa(207,Ha|0,4);p=o;o=0;if(p&1)d=Fb()|0;else{d=c[Ha>>2]|0;o=0;Xa(117,g|0,Ma|0);p=o;o=0;a:do if(p&1)Ia=45;else{o=0;Xa(117,f|0,La|0);p=o;o=0;do if(p&1)d=Fb()|0;else{o=0;db(83,e|0,b|0,g|0,f|0);p=o;o=0;if(p&1){d=Fb()|0;fi(f);break}Zq(d,Yq(e)|0);_q(e);fi(f);fi(g);d=(c[Ha>>2]|0)+4|0;o=0;Xa(117,k|0,Ma|0);p=o;o=0;if(p&1){Ia=45;break a}o=0;Xa(117,i|0,Ka|0);p=o;o=0;do if(p&1)d=Fb()|0;else{o=0;db(83,h|0,b|0,k|0,i|0);p=o;o=0;if(p&1){d=Fb()|0;fi(i);break}Zq(d,Yq(h)|0);_q(h);fi(i);fi(k);d=(c[Ha>>2]|0)+8|0;o=0;Xa(117,q|0,La|0);p=o;o=0;if(p&1){Ia=45;break a}o=0;Xa(117,n|0,Ja|0);p=o;o=0;do if(p&1)d=Fb()|0;else{o=0;db(83,m|0,b|0,q|0,n|0);p=o;o=0;if(p&1){d=Fb()|0;fi(n);break}Zq(d,Yq(m)|0);_q(m);fi(n);fi(q);d=(c[Ha>>2]|0)+12|0;o=0;Xa(117,t|0,Ka|0);q=o;o=0;if(q&1){Ia=45;break a}o=0;Xa(117,s|0,Ja|0);q=o;o=0;do if(q&1)d=Fb()|0;else{o=0;db(83,r|0,b|0,t|0,s|0);q=o;o=0;if(q&1){d=Fb()|0;fi(s);break}Zq(d,Yq(r)|0);_q(r);fi(s);fi(t);$q(b,Ha);ar(Ea,c[Ha>>2]|0);ar(Fa,(c[Ha>>2]|0)+4|0);br(Ga,Da);t=cr(Ea)|0;o=0;Xa(208,Da|0,t|0);t=o;o=0;b:do if(t&1){d=Fb()|0;Ia=60}else{o=0;Xa(209,Ga|0,Da|0);t=o;o=0;if(t&1){d=Fb()|0;fi(Da);Ia=60;break}fi(Da);t=cr(Ea)|0;o=0;Xa(210,Da|0,t|0);t=o;o=0;do if(t&1)d=Fb()|0;else{o=0;Xa(209,Ga|0,Da|0);t=o;o=0;if(t&1){d=Fb()|0;fi(Da);break}fi(Da);t=cr(Fa)|0;o=0;Xa(208,Da|0,t|0);t=o;o=0;do if(t&1)d=Fb()|0;else{o=0;Xa(209,Ga|0,Da|0);t=o;o=0;if(t&1){d=Fb()|0;fi(Da);break}fi(Da);t=cr(Fa)|0;o=0;Xa(210,Da|0,t|0);t=o;o=0;do if(t&1)d=Fb()|0;else{o=0;Xa(209,Ga|0,Da|0);t=o;o=0;if(t&1){d=Fb()|0;fi(Da);break}fi(Da);o=0;Xa(116,Da|0,0);t=o;o=0;if(t&1){d=Fb()|0;break b}o=0;Xa(116,Ca|0,0);t=o;o=0;if(t&1)d=Fb()|0;else{o=0;Xa(116,Ba|0,0);t=o;o=0;if(t&1)d=Fb()|0;else{f=Ga+4|0;d=c[Ga>>2]|0;c:while(1){if((d|0)==(f|0)){Ia=35;break}Ia=d;e=Ia+16|0;do if((c[Ia+20>>2]|0)==2){o=0;ja(58,Ca|0,e|0)|0;Ia=o;o=0;if(Ia&1){Ia=84;break c}}else if(on(Da,0)|0){o=0;ja(58,Da|0,e|0)|0;Ia=o;o=0;if(Ia&1){Ia=84;break c}else break}else{o=0;ja(58,Ba|0,e|0)|0;Ia=o;o=0;if(Ia&1){Ia=84;break c}else break}while(0);e=d;d=c[e+4>>2]|0;d:do if(!d)while(1){d=c[e+8>>2]|0;if((c[d>>2]|0)==(e|0))break d;e=d}else while(1){e=c[d>>2]|0;if(!e)break;else d=e}while(0)}e:do if((Ia|0)==35){do if(on(Da,0)|0)Ia=87;else{if(on(Ca,0)|0){Ia=87;break}if(on(Ba,0)|0){Ia=87;break}o=0;Xa(211,Aa|0,3);t=o;o=0;if(t&1)break;t=c[Aa>>2]|0;gi(t,cn(Da)|0);t=(c[Aa>>2]|0)+4|0;gi(t,cn(Ca)|0);t=(c[Aa>>2]|0)+8|0;gi(t,cn(Ba)|0);o=0;Na(328,Aa|0);t=o;o=0;do if(t&1)Ia=106;else{o=0;Xa(117,za|0,c[Aa>>2]|0);t=o;o=0;if(t&1){Ia=106;break}o=0;ja(58,Ca|0,(c[Aa>>2]|0)+4|0)|0;t=o;o=0;do if(t&1)Ia=107;else{o=0;Xa(117,ya|0,(c[Aa>>2]|0)+8|0);t=o;o=0;if(t&1){Ia=107;break}o=0;Xa(116,xa|0,0);t=o;o=0;if(t&1)d=Fb()|0;else{d=Pe(Ma)|0;o=0;Xa(117,w|0,za|0);t=o;o=0;f:do if(t&1)Ia=109;else{o=0;d=ja(78,d|0,w|0)|0;t=o;o=0;g:do if(t&1)Ia=110;else{h:do if(d){fi(w);Ia=116}else{d=Pe(Ma)|0;o=0;Xa(117,v|0,Ca|0);t=o;o=0;if(t&1){Ia=110;break g}o=0;d=ja(78,d|0,v|0)|0;t=o;o=0;do if(!(t&1)){if(d){fi(v);fi(w);Ia=116;break h}d=Pe(Ma)|0;o=0;Xa(117,u|0,ya|0);t=o;o=0;if(t&1){Ia=111;break}o=0;d=ja(78,d|0,u|0)|0;t=o;o=0;if(t&1){d=Fb()|0;fi(u);break}fi(u);fi(v);fi(w);if(d){Ia=116;break h}o=0;ja(58,xa|0,Ma|0)|0;G=o;o=0;if(G&1){Ia=109;break f}else break h}else Ia=111;while(0);if((Ia|0)==111)d=Fb()|0;fi(v);break g}while(0);i:do if((Ia|0)==116){d=Pe(La)|0;o=0;Xa(117,z|0,za|0);w=o;o=0;if(w&1){Ia=109;break f}o=0;d=ja(78,d|0,z|0)|0;w=o;o=0;j:do if(w&1)Ia=127;else{k:do if(d)fi(z);else{d=Pe(La)|0;o=0;Xa(117,y|0,Ca|0);w=o;o=0;if(w&1){Ia=127;break j}o=0;d=ja(78,d|0,y|0)|0;w=o;o=0;do if(!(w&1)){if(d){fi(y);fi(z);break k}d=Pe(La)|0;o=0;Xa(117,x|0,ya|0);w=o;o=0;if(w&1){Ia=128;break}o=0;d=ja(78,d|0,x|0)|0;w=o;o=0;if(w&1){d=Fb()|0;fi(x);break}fi(x);fi(y);fi(z);if(d)break k;o=0;ja(58,xa|0,La|0)|0;G=o;o=0;if(G&1){Ia=109;break f}else break i}else Ia=128;while(0);if((Ia|0)==128)d=Fb()|0;fi(y);break j}while(0);d=Pe(Ka)|0;o=0;Xa(117,G|0,za|0);z=o;o=0;if(z&1){Ia=109;break f}o=0;d=ja(78,d|0,G|0)|0;z=o;o=0;l:do if(!(z&1)){m:do if(d)fi(G);else{d=Pe(Ka)|0;o=0;Xa(117,B|0,Ca|0);z=o;o=0;if(z&1){Ia=144;break l}o=0;d=ja(78,d|0,B|0)|0;z=o;o=0;do if(!(z&1)){if(d){fi(B);fi(G);break m}d=Pe(Ka)|0;o=0;Xa(117,A|0,ya|0);z=o;o=0;if(z&1){Ia=145;break}o=0;d=ja(78,d|0,A|0)|0;z=o;o=0;if(z&1){d=Fb()|0;fi(A);break}fi(A);fi(B);fi(G);if(d)break m;o=0;ja(58,xa|0,Ka|0)|0;G=o;o=0;if(G&1){Ia=109;break f}else break i}else Ia=145;while(0);if((Ia|0)==145)d=Fb()|0;fi(B);break l}while(0);o=0;ja(58,xa|0,Ja|0)|0;G=o;o=0;if(G&1){Ia=109;break f}else break i}else Ia=144;while(0);if((Ia|0)==144)d=Fb()|0;fi(G);break f}while(0);if((Ia|0)==127)d=Fb()|0;fi(z);break f}while(0);o=0;Xa(117,H|0,ya|0);G=o;o=0;if(G&1){Ia=109;break f}o=0;Xa(117,D|0,xa|0);G=o;o=0;do if(G&1)d=Fb()|0;else{o=0;db(83,C|0,b|0,H|0,D|0);G=o;o=0;if(G&1){d=Fb()|0;fi(D);break}d=Rq(cr(C)|0)|0;_q(C);fi(D);fi(H);o=0;Xa(117,I|0,za|0);H=o;o=0;if(H&1){d=Fb()|0;break f}o=0;Xa(117,F|0,xa|0);H=o;o=0;do if(H&1)d=Fb()|0;else{o=0;db(83,E|0,b|0,I|0,F|0);H=o;o=0;if(H&1){d=Fb()|0;fi(F);break}e=Rq(cr(E)|0)|0;_q(E);fi(F);fi(I);d=d+2+(d&1)|0;e=e+2+(e&1)|0;o=0;Xa(169,wa|0,0);I=o;o=0;if(I&1){d=Fb()|0;break f}o=0;Xa(212,va|0,0);I=o;o=0;if(I&1)d=Fb()|0;else{o=0;Xa(116,ua|0,0);I=o;o=0;if(I&1)d=Fb()|0;else{n:do if((d<<2|0)<(e*7|0)){if((e<<2|0)>=(d*7|0)){Ia=169;break}d=hr(b,e,d)|0;o=0;Xa(117,da|0,Ca|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;Xa(117,Z|0,za|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;Xa(117,V|0,ya|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;Xa(117,R|0,xa|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;nb(46,ta|0,b|0,da|0,Z|0,V|0,R|0,d|0);na=o;o=0;do if(na&1)d=Fb()|0;else{o=0;ja(58,ua|0,ta|0)|0;na=o;o=0;if(na&1){d=Fb()|0;fi(ta);break}fi(ta);fi(R);fi(V);fi(Z);fi(da);do if(on(ua,0)|0){o=0;ja(58,ua|0,xa|0)|0;na=o;o=0;if(!(na&1))break;d=Fb()|0;break n}while(0);o=0;Xa(117,la|0,ya|0);na=o;o=0;if(na&1){d=Fb()|0;break n}o=0;Xa(117,ea|0,ua|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;db(83,_|0,b|0,la|0,ea|0);na=o;o=0;if(na&1)d=Fb()|0;else{d=Rq(cr(_)|0)|0;o=0;Xa(117,W|0,za|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;Xa(117,T|0,ua|0);na=o;o=0;do if(na&1)d=Fb()|0;else{o=0;db(83,S|0,b|0,W|0,T|0);na=o;o=0;if(na&1){d=Fb()|0;fi(T);break}e=Rq(cr(S)|0)|0;d=(d|0)<(e|0)?e:d;_q(S);fi(T);fi(W);_q(_);fi(ea);fi(la);e=d+1|0;d=(e&1|0)==0?e:d+2|0;e=c[(c[b>>2]|0)+8>>2]|0;o=0;Xa(117,oa|0,ya|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;Xa(117,ma|0,ua|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;Xa(117,ga|0,Ca|0);na=o;o=0;if(na&1)d=Fb()|0;else{o=0;Xa(117,$|0,za|0);na=o;o=0;do if(na&1)d=Fb()|0;else{o=0;pb(e|0,ta|0,b|0,oa|0,ma|0,ga|0,$|0,d|0,d|0);b=o;o=0;if(b&1){d=Fb()|0;fi($);break}fr(va,ta)|0;qm(ta);fi($);fi(ga);fi(ma);fi(oa);o=0;Xa(128,ha|0,pa|0);pa=o;o=0;if(pa&1)d=Fb()|0;else{pm(ia,va);o=0;jb(55,ta|0,0,ha|0,d|0,d|0,ia|0);pa=o;o=0;do if(!(pa&1)){o=0;ja(74,wa|0,ta|0)|0;pa=o;o=0;if(pa&1){d=Fb()|0;de(ta);break}else{de(ta);qm(ia);de(ha);Ia=286;break n}}else d=Fb()|0;while(0);qm(ia);de(ha)}break n}while(0);fi(ga)}fi(ma)}fi(oa)}break n}while(0);fi(W)}_q(_)}fi(ea)}fi(la);break n}while(0);fi(R)}fi(V)}fi(Z)}fi(da)}}else Ia=169;while(0);o:do if((Ia|0)==169){o=0;Xa(117,X|0,Ca|0);oa=o;o=0;if(oa&1)d=Fb()|0;else{o=0;Xa(117,U|0,za|0);oa=o;o=0;if(oa&1)d=Fb()|0;else{o=0;Xa(117,O|0,ya|0);oa=o;o=0;if(oa&1)d=Fb()|0;else{o=0;Xa(117,J|0,xa|0);oa=o;o=0;if(oa&1)d=Fb()|0;else{o=0;pb(44,ta|0,b|0,X|0,U|0,O|0,J|0,d|0,e|0);oa=o;o=0;do if(oa&1)d=Fb()|0;else{o=0;ja(58,ua|0,ta|0)|0;oa=o;o=0;if(oa&1){d=Fb()|0;fi(ta);break}fi(ta);fi(J);fi(O);fi(U);fi(X);if(on(ua,0)|0?(o=0,ja(58,ua|0,xa|0)|0,oa=o,o=0,oa&1):0){Ia=191;break o}o=0;Xa(117,P|0,ya|0);oa=o;o=0;if(oa&1){Ia=191;break o}o=0;Xa(117,L|0,ua|0);oa=o;o=0;do if(oa&1)d=Fb()|0;else{o=0;db(83,K|0,b|0,P|0,L|0);oa=o;o=0;if(oa&1){d=Fb()|0;fi(L);break}d=Rq(cr(K)|0)|0;_q(K);fi(L);fi(P);o=0;Xa(117,Q|0,za|0);oa=o;o=0;if(oa&1){Ia=191;break o}o=0;Xa(117,N|0,ua|0);oa=o;o=0;do if(oa&1)d=Fb()|0;else{o=0;db(83,M|0,b|0,Q|0,N|0);oa=o;o=0;if(oa&1){d=Fb()|0;fi(N);break}e=Rq(cr(M)|0)|0;_q(M);fi(N);fi(Q);d=(d&1)+d|0;e=(e&1)+e|0;f=c[(c[b>>2]|0)+8>>2]|0;o=0;Xa(117,na|0,ya|0);oa=o;o=0;if(oa&1)d=Fb()|0;else{o=0;Xa(117,ka|0,ua|0);oa=o;o=0;if(oa&1)d=Fb()|0;else{o=0;Xa(117,aa|0,Ca|0);oa=o;o=0;if(oa&1)d=Fb()|0;else{o=0;Xa(117,Y|0,za|0);oa=o;o=0;do if(oa&1)d=Fb()|0;else{o=0;pb(f|0,ta|0,b|0,na|0,ka|0,aa|0,Y|0,d|0,e|0);b=o;o=0;if(b&1){d=Fb()|0;fi(Y);break}fr(va,ta)|0;qm(ta);fi(Y);fi(aa);fi(ka);fi(na);o=0;Xa(128,ba|0,pa|0);pa=o;o=0;if(pa&1)d=Fb()|0;else{pm(ca,va);o=0;jb(55,ta|0,0,ba|0,d|0,e|0,ca|0);pa=o;o=0;do if(!(pa&1)){o=0;ja(74,wa|0,ta|0)|0;pa=o;o=0;if(pa&1){d=Fb()|0;de(ta);break}else{de(ta);qm(ca);de(ba);Ia=286;break o}}else d=Fb()|0;while(0);qm(ca);de(ba)}break o}while(0);fi(aa)}fi(ka)}fi(na)}break o}while(0);fi(Q);break o}while(0);fi(P);break o}while(0);fi(J)}fi(O)}fi(U)}fi(X)}}while(0);do if((Ia|0)==286){o=0;d=fa(107,20)|0;pa=o;o=0;if(pa&1){Ia=191;break}o=0;Xa(213,d|0,4);pa=o;o=0;if(pa&1){ta=Fb()|0;cU(d);d=ta;break}o=0;Xa(214,ta|0,d|0);pa=o;o=0;if(pa&1){Ia=191;break}o=0;d=ja(55,ta|0,0)|0;pa=o;o=0;p:do if(pa&1)Ia=300;else{gi(d,cn(ya)|0);o=0;d=ja(55,ta|0,1)|0;pa=o;o=0;if(pa&1){Ia=300;break}gi(d,cn(Ca)|0);o=0;d=ja(55,ta|0,2)|0;pa=o;o=0;if(pa&1){Ia=300;break}gi(d,cn(ua)|0);o=0;d=ja(55,ta|0,3)|0;pa=o;o=0;if(pa&1){Ia=300;break}gi(d,cn(za)|0);o=0;f=fa(107,24)|0;pa=o;o=0;if(pa&1){Ia=300;break}o=0;Xa(128,ra|0,wa|0);pa=o;o=0;do if(!(pa&1)){o=0;Xa(96,sa|0,ta|0);pa=o;o=0;if(pa&1){d=Fb()|0;de(ra);break}o=0;bb(60,f|0,ra|0,sa|0);pa=o;o=0;do if(pa&1)e=1;else{o=0;Xa(215,a|0,f|0);a=o;o=0;if(a&1){e=0;break}Qe(sa);de(ra);Qe(ta);fi(ua);qm(va);de(wa);fi(xa);fi(ya);fi(za);ak(Aa);fi(Ba);fi(Ca);fi(Da);lr(Ga);_q(Fa);_q(Ea);mr(Ha);fi(Ja);fi(Ka);fi(La);fi(Ma);ak(Oa);nr(Pa);l=qa;return}while(0);d=Fb()|0;Qe(sa);de(ra);if(!e)break p}else d=Fb()|0;while(0);cU(f)}while(0);if((Ia|0)==300)d=Fb()|0;Qe(ta)}while(0);if((Ia|0)==191)d=Fb()|0;fi(ua)}qm(va)}de(wa);break f}while(0);fi(I);break f}while(0);fi(H);break f}while(0);if((Ia|0)==110)d=Fb()|0;fi(w)}while(0);if((Ia|0)==109)d=Fb()|0;fi(xa)}fi(ya)}while(0);if((Ia|0)==107)d=Fb()|0;fi(za)}while(0);if((Ia|0)==106)d=Fb()|0;ak(Aa);break e}while(0);if((Ia|0)==87){Aa=Ab(8)|0;cm(Aa);o=0;bb(68,Aa|0,488,58);o=0}d=Fb()|0}else if((Ia|0)==84)d=Fb()|0;while(0);fi(Ba)}fi(Ca)}fi(Da);break b}while(0);break b}while(0);break b}while(0)}while(0);lr(Ga);_q(Fa);_q(Ea);break a}while(0);fi(t);break a}while(0);fi(q);break a}while(0);fi(k);break a}while(0);fi(g)}while(0);if((Ia|0)==45)d=Fb()|0;mr(Ha)}fi(Ja)}fi(Ka)}fi(La)}fi(Ma)}ak(Oa)}nr(Pa);break}}else e=1;d=Fb()|0;de(j);if(e)Ia=38}else{d=Fb()|0;Ia=38}while(0);if((Ia|0)==38)cU(p);Qb(d|0)}function Uq(a,b){a=a|0;b=b|0;c[a>>2]=0;Hr(a,b);return}function Vq(a){a=a|0;return c[a>>2]|0}function Wq(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(216,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(217,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;mr(a);Qb(d|0)}while(0);return}function Xq(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;u=l;l=l+16|0;v=u+4|0;t=u;w=Pe(d)|0;w=~~+Lc[c[(c[w>>2]|0)+8>>2]&63](w);f=Pe(d)|0;f=~~+Lc[c[(c[f>>2]|0)+12>>2]&63](f);m=Pe(e)|0;m=~~+Lc[c[(c[m>>2]|0)+8>>2]&63](m);h=Pe(e)|0;h=~~+Lc[c[(c[h>>2]|0)+12>>2]&63](h);k=h-f|0;n=m-w|0;n=(((k|0)>-1?k:0-k|0)|0)>(((n|0)>-1?n:0-n|0)|0);k=n?m:h;m=n?h:m;h=n?w:f;i=n?f:w;p=m-i|0;p=(p|0)>-1?p:0-p|0;q=k-h|0;q=(q|0)>-1?q:0-q|0;r=(k|0)>(h|0)?1:-1;s=(m|0)>(i|0)?1:-1;j=b+8|0;b=0;g=0-p>>1;f=xj(be(j)|0,w,f)|0;while(1){if((i|0)==(m|0))break;w=be(j)|0;w=xj(w,n?h:i,n?i:h)|0;x=f^w;b=(x&1)+b|0;f=x?w:f;g=g+q|0;if((g|0)>0)if((h|0)==(k|0))break;else{h=h+r|0;g=g-p|0}i=i+s|0}f=aU(20)|0;o=0;Xa(117,v|0,d|0);x=o;o=0;if(x&1)b=Fb()|0;else{o=0;Xa(117,t|0,e|0);x=o;o=0;do if(!(x&1)){o=0;db(84,f|0,v|0,t|0,b|0);x=o;o=0;if(x&1){b=Fb()|0;fi(t);break}else{Br(a,f);fi(t);fi(v);l=u;return}}else b=Fb()|0;while(0);fi(v)}cU(f);Qb(b|0)}function Yq(a){a=a|0;return c[a>>2]|0}function Zq(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function _q(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function $q(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,m=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;f=(c[b+4>>2]|0)-(c[b>>2]|0)>>2;Br(g,0);Br(h,0);do{e=1;a=0;while(1){if((e|0)>=(f|0))break;d=e+-1|0;Cr(g,(c[b>>2]|0)+(d<<2)|0)|0;ar(i,g);ar(j,Cr(h,(c[b>>2]|0)+(e<<2)|0)|0);m=(Dr(0,i,j)|0)>0;_q(j);_q(i);if(m){a=(c[b>>2]|0)+(d<<2)|0;Zq(a,Yq(h)|0);a=(c[b>>2]|0)+(e<<2)|0;Zq(a,Yq(g)|0);a=1}e=e+1|0}}while(a);_q(h);_q(g);l=k;return}function ar(a,b){a=a|0;b=b|0;c[a>>2]=0;Zq(a,c[b>>2]|0);return}function br(a,b){a=a|0;b=b|0;c[a+4>>2]=0;c[a+8>>2]=0;c[a>>2]=a+4;return}function cr(a){a=a|0;return c[a>>2]|0}function dr(a,b){a=a|0;b=b|0;b=vr(a,b)|0;c[b>>2]=(c[b>>2]|0)+1;return}function er(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0.0,n=0.0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.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;L=l;l=l+112|0;s=L+92|0;k=L+84|0;t=L+80|0;r=L+76|0;S=L+96|0;y=L+72|0;x=L+68|0;A=L+64|0;z=L+60|0;R=L+88|0;B=L+56|0;C=L+52|0;D=L+48|0;J=L+44|0;O=L+40|0;M=L+36|0;E=L+32|0;G=L+28|0;F=L+24|0;N=L+20|0;Q=L+16|0;P=L+12|0;H=L+8|0;K=L+4|0;I=L;di(s,d);o=0;Xa(117,k|0,e|0);j=o;o=0;a:do if(j&1){j=Fb()|0;T=32}else{o=0;j=la(82,0,s|0,k|0)|0;U=o;o=0;if(U&1){j=Fb()|0;fi(k);T=32;break}v=+(j|0)/+(h|0);fi(k);fi(s);di(t,f);o=0;Xa(117,r|0,g|0);U=o;o=0;do if(U&1)j=Fb()|0;else{o=0;j=la(82,0,t|0,r|0)|0;U=o;o=0;if(U&1){j=Fb()|0;fi(r);break}fi(r);fi(t);U=Pe(g)|0;q=+Lc[c[(c[U>>2]|0)+8>>2]&63](U);U=Pe(f)|0;u=+Lc[c[(c[U>>2]|0)+8>>2]&63](U);m=+(j|0);j=Pe(g)|0;n=+Lc[c[(c[j>>2]|0)+12>>2]&63](j);j=Pe(f)|0;n=(n-+Lc[c[(c[j>>2]|0)+12>>2]&63](j))/m;j=aU(16)|0;U=Pe(g)|0;o=0;p=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;if((!(U&1)?(U=Pe(g)|0,o=0,w=+X(c[(c[U>>2]|0)+12>>2]|0,U|0),U=o,o=0,!(U&1)):0)?(o=0,Pa(42,j|0,+(v*((q-u)/m)+p),+(v*n+w)),U=o,o=0,!(U&1)):0){bi(S,j);o=0;Xa(117,y|0,d|0);U=o;o=0;b:do if(U&1)T=37;else{o=0;Xa(117,x|0,f|0);U=o;o=0;do if(U&1)j=Fb()|0;else{o=0;j=la(82,0,y|0,x|0)|0;U=o;o=0;if(U&1){j=Fb()|0;fi(x);break}u=+(j|0)/+(i|0);fi(x);fi(y);o=0;Xa(117,A|0,e|0);U=o;o=0;if(U&1){T=37;break b}o=0;Xa(117,z|0,g|0);U=o;o=0;do if(U&1)j=Fb()|0;else{o=0;j=la(82,0,A|0,z|0)|0;U=o;o=0;if(U&1){j=Fb()|0;fi(z);break}fi(z);fi(A);U=Pe(g)|0;o=0;m=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}U=Pe(e)|0;o=0;n=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}p=+(j|0);q=(m-n)/p;U=Pe(g)|0;o=0;m=+X(c[(c[U>>2]|0)+12>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}U=Pe(e)|0;o=0;n=+X(c[(c[U>>2]|0)+12>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}n=(m-n)/p;o=0;j=fa(107,16)|0;U=o;o=0;if(U&1){T=37;break b}U=Pe(g)|0;o=0;p=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;do if(!(U&1)){U=Pe(g)|0;o=0;m=+X(c[(c[U>>2]|0)+12>>2]|0,U|0);U=o;o=0;if(U&1)break;o=0;Pa(42,j|0,+(u*q+p),+(u*n+m));U=o;o=0;if(U&1)break;o=0;Xa(116,R|0,j|0);U=o;o=0;if(U&1){T=37;break b}o=0;Xa(117,B|0,S|0);U=o;o=0;c:do if(U&1)T=45;else{o=0;j=ja(79,b|0,B|0)|0;U=o;o=0;if(U&1){j=Fb()|0;fi(B);break}fi(B);d:do if(!j){o=0;Xa(117,C|0,R|0);U=o;o=0;if(U&1){T=45;break c}o=0;j=ja(79,b|0,C|0)|0;U=o;o=0;if(U&1){j=Fb()|0;fi(C);break c}fi(C);if(j){o=0;Xa(117,a|0,R|0);U=o;o=0;if(U&1){T=45;break c}else break}else{o=0;Xa(116,a|0,0);U=o;o=0;if(U&1){T=45;break c}else break}}else{o=0;Xa(117,D|0,R|0);U=o;o=0;if(U&1){T=45;break c}o=0;j=ja(79,b|0,D|0)|0;U=o;o=0;if(U&1){j=Fb()|0;fi(D);break c}fi(D);if(!j){o=0;Xa(117,a|0,S|0);U=o;o=0;if(U&1){T=45;break c}else break}o=0;Xa(117,O|0,f|0);U=o;o=0;if(U&1){T=45;break c}o=0;Xa(117,M|0,S|0);U=o;o=0;if(U&1)j=Fb()|0;else{o=0;db(83,J|0,b|0,O|0,M|0);U=o;o=0;if(U&1)j=Fb()|0;else{j=h-(Rq(cr(J)|0)|0)|0;j=(j|0)>-1?j:0-j|0;o=0;Xa(117,G|0,e|0);U=o;o=0;if(U&1)j=Fb()|0;else{o=0;Xa(117,F|0,S|0);U=o;o=0;do if(U&1)j=Fb()|0;else{o=0;db(83,E|0,b|0,G|0,F|0);U=o;o=0;if(U&1){j=Fb()|0;fi(F);break}k=i-(Rq(cr(E)|0)|0)|0;k=((k|0)>-1?k:0-k|0)+j|0;_q(E);fi(F);fi(G);_q(J);fi(M);fi(O);o=0;Xa(117,Q|0,f|0);U=o;o=0;if(U&1){j=Fb()|0;break c}o=0;Xa(117,P|0,R|0);U=o;o=0;if(U&1)j=Fb()|0;else{o=0;db(83,N|0,b|0,Q|0,P|0);U=o;o=0;if(U&1)j=Fb()|0;else{j=h-(Rq(cr(N)|0)|0)|0;j=(j|0)>-1?j:0-j|0;o=0;Xa(117,K|0,e|0);U=o;o=0;if(U&1)j=Fb()|0;else{o=0;Xa(117,I|0,R|0);U=o;o=0;do if(U&1)j=Fb()|0;else{o=0;db(83,H|0,b|0,K|0,I|0);U=o;o=0;if(U&1){j=Fb()|0;fi(I);break}U=i-(Rq(cr(H)|0)|0)|0;_q(H);fi(I);fi(K);_q(N);fi(P);fi(Q);o=0;Xa(117,a|0,((k|0)<=(((U|0)>-1?U:0-U|0)+j|0)?S:R)|0);U=o;o=0;if(!(U&1))break d;j=Fb()|0;break c}while(0);fi(K)}_q(N)}fi(P)}fi(Q);break c}while(0);fi(G)}_q(J)}fi(M)}fi(O);break c}while(0);fi(R);fi(S);l=L;return}while(0);if((T|0)==45)j=Fb()|0;fi(R);break b}while(0);U=Fb()|0;cU(j);j=U;break b}while(0);fi(A);break b}while(0);fi(y)}while(0);if((T|0)==37)j=Fb()|0;fi(S);break a}U=Fb()|0;cU(j);j=U;break a}while(0);fi(t)}while(0);if((T|0)==32)fi(s);Qb(j|0)}function fr(a,b){a=a|0;b=b|0;rm(a,c[b>>2]|0);return a|0}function gr(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;h=l;l=l+16|0;b=h+4|0;g=h;i=sm()|0;ki(b,c);pm(g,f);o=0;jb(56,a|0,i|0,b|0,d|0,e|0,g|0);f=o;o=0;if(f&1){i=Fb()|0;qm(g);de(b);Qb(i|0)}else{qm(g);de(b);l=h;return}}function hr(a,b,c){a=a|0;b=b|0;c=c|0;return ((b|0)>(c|0)?c:b)|0}function ir(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0.0,k=0.0,m=0.0,n=0.0,p=0,q=0,r=0.0,s=0,t=0,u=0.0,v=0.0,w=0.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;L=l;l=l+112|0;s=L+92|0;p=L+84|0;t=L+80|0;q=L+76|0;S=L+96|0;y=L+72|0;x=L+68|0;A=L+64|0;z=L+60|0;R=L+88|0;B=L+56|0;C=L+52|0;D=L+48|0;J=L+44|0;O=L+40|0;M=L+36|0;E=L+32|0;G=L+28|0;F=L+24|0;N=L+20|0;Q=L+16|0;P=L+12|0;H=L+8|0;K=L+4|0;I=L;di(s,d);o=0;Xa(117,p|0,e|0);i=o;o=0;a:do if(i&1){h=Fb()|0;T=32}else{o=0;i=la(82,0,s|0,p|0)|0;U=o;o=0;if(U&1){h=Fb()|0;fi(p);T=32;break}v=+(h|0);u=+(i|0)/v;fi(p);fi(s);di(t,f);o=0;Xa(117,q|0,g|0);U=o;o=0;do if(U&1)h=Fb()|0;else{o=0;h=la(82,0,t|0,q|0)|0;U=o;o=0;if(U&1){h=Fb()|0;fi(q);break}fi(q);fi(t);U=Pe(g)|0;n=+Lc[c[(c[U>>2]|0)+8>>2]&63](U);U=Pe(f)|0;r=+Lc[c[(c[U>>2]|0)+8>>2]&63](U);j=+(h|0);h=Pe(g)|0;k=+Lc[c[(c[h>>2]|0)+12>>2]&63](h);h=Pe(f)|0;k=(k-+Lc[c[(c[h>>2]|0)+12>>2]&63](h))/j;h=aU(16)|0;U=Pe(g)|0;o=0;m=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;if((!(U&1)?(U=Pe(g)|0,o=0,w=+X(c[(c[U>>2]|0)+12>>2]|0,U|0),U=o,o=0,!(U&1)):0)?(o=0,Pa(42,h|0,+(u*((n-r)/j)+m),+(u*k+w)),U=o,o=0,!(U&1)):0){bi(S,h);o=0;Xa(117,y|0,d|0);U=o;o=0;b:do if(U&1)T=37;else{o=0;Xa(117,x|0,f|0);U=o;o=0;do if(U&1)h=Fb()|0;else{o=0;h=la(82,0,y|0,x|0)|0;U=o;o=0;if(U&1){h=Fb()|0;fi(x);break}r=+(h|0)/v;fi(x);fi(y);o=0;Xa(117,A|0,e|0);U=o;o=0;if(U&1){T=37;break b}o=0;Xa(117,z|0,g|0);U=o;o=0;do if(U&1)h=Fb()|0;else{o=0;h=la(82,0,A|0,z|0)|0;U=o;o=0;if(U&1){h=Fb()|0;fi(z);break}fi(z);fi(A);U=Pe(g)|0;o=0;j=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}U=Pe(e)|0;o=0;k=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}m=+(h|0);n=(j-k)/m;U=Pe(g)|0;o=0;j=+X(c[(c[U>>2]|0)+12>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}U=Pe(e)|0;o=0;k=+X(c[(c[U>>2]|0)+12>>2]|0,U|0);U=o;o=0;if(U&1){T=37;break b}k=(j-k)/m;o=0;h=fa(107,16)|0;U=o;o=0;if(U&1){T=37;break b}U=Pe(g)|0;o=0;m=+X(c[(c[U>>2]|0)+8>>2]|0,U|0);U=o;o=0;do if(!(U&1)){U=Pe(g)|0;o=0;j=+X(c[(c[U>>2]|0)+12>>2]|0,U|0);U=o;o=0;if(U&1)break;o=0;Pa(42,h|0,+(r*n+m),+(r*k+j));U=o;o=0;if(U&1)break;o=0;Xa(116,R|0,h|0);U=o;o=0;if(U&1){T=37;break b}o=0;Xa(117,B|0,S|0);U=o;o=0;c:do if(U&1)T=45;else{o=0;h=ja(79,b|0,B|0)|0;U=o;o=0;if(U&1){h=Fb()|0;fi(B);break}fi(B);d:do if(!h){o=0;Xa(117,C|0,R|0);U=o;o=0;if(U&1){T=45;break c}o=0;h=ja(79,b|0,C|0)|0;U=o;o=0;if(U&1){h=Fb()|0;fi(C);break c}fi(C);if(h){o=0;Xa(117,a|0,R|0);U=o;o=0;if(U&1){T=45;break c}else break}else{o=0;Xa(116,a|0,0);U=o;o=0;if(U&1){T=45;break c}else break}}else{o=0;Xa(117,D|0,R|0);U=o;o=0;if(U&1){T=45;break c}o=0;h=ja(79,b|0,D|0)|0;U=o;o=0;if(U&1){h=Fb()|0;fi(D);break c}fi(D);if(!h){o=0;Xa(117,a|0,S|0);U=o;o=0;if(U&1){T=45;break c}else break}o=0;Xa(117,O|0,f|0);U=o;o=0;if(U&1){T=45;break c}o=0;Xa(117,M|0,S|0);U=o;o=0;if(U&1)h=Fb()|0;else{o=0;db(83,J|0,b|0,O|0,M|0);U=o;o=0;if(U&1)h=Fb()|0;else{h=Rq(cr(J)|0)|0;o=0;Xa(117,G|0,e|0);U=o;o=0;if(U&1)h=Fb()|0;else{o=0;Xa(117,F|0,S|0);U=o;o=0;do if(U&1)h=Fb()|0;else{o=0;db(83,E|0,b|0,G|0,F|0);U=o;o=0;if(U&1){h=Fb()|0;fi(F);break}i=h-(Rq(cr(E)|0)|0)|0;i=(i|0)>-1?i:0-i|0;_q(E);fi(F);fi(G);_q(J);fi(M);fi(O);o=0;Xa(117,Q|0,f|0);U=o;o=0;if(U&1){h=Fb()|0;break c}o=0;Xa(117,P|0,R|0);U=o;o=0;if(U&1)h=Fb()|0;else{o=0;db(83,N|0,b|0,Q|0,P|0);U=o;o=0;if(U&1)h=Fb()|0;else{h=Rq(cr(N)|0)|0;o=0;Xa(117,K|0,e|0);U=o;o=0;if(U&1)h=Fb()|0;else{o=0;Xa(117,I|0,R|0);U=o;o=0;do if(U&1)h=Fb()|0;else{o=0;db(83,H|0,b|0,K|0,I|0);U=o;o=0;if(U&1){h=Fb()|0;fi(I);break}U=h-(Rq(cr(H)|0)|0)|0;_q(H);fi(I);fi(K);_q(N);fi(P);fi(Q);o=0;Xa(117,a|0,((i|0)<=(((U|0)>-1?U:0-U|0)|0)?S:R)|0);U=o;o=0;if(!(U&1))break d;h=Fb()|0;break c}while(0);fi(K)}_q(N)}fi(P)}fi(Q);break c}while(0);fi(G)}_q(J)}fi(M)}fi(O);break c}while(0);fi(R);fi(S);l=L;return}while(0);if((T|0)==45)h=Fb()|0;fi(R);break b}while(0);U=Fb()|0;cU(h);h=U;break b}while(0);fi(A);break b}while(0);fi(y)}while(0);if((T|0)==37)h=Fb()|0;fi(S);break a}U=Fb()|0;cU(h);h=U;break a}while(0);fi(t)}while(0);if((T|0)==32)fi(s);Qb(h|0)}function jr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;d=e;cf(a);c[a>>2]=4964;o=0;Xa(116,d|0,0);f=o;o=0;do if(!(f&1)){o=0;bb(94,a+8|0,b|0,d|0);f=o;o=0;if(f&1){b=Fb()|0;fi(d);break}else{fi(d);l=e;return}}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function kr(a,b){a=a|0;b=b|0;c[a>>2]=0;rr(a,b);return}function lr(a){a=a|0;or(a);return}function mr(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;_q(e)}cU(c[a>>2]|0)}return}function nr(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function or(a){a=a|0;pr(a,c[a+4>>2]|0);return}function pr(a,b){a=a|0;b=b|0;if(!b)return;else{pr(a,c[b>>2]|0);pr(a,c[b+4>>2]|0);qr(b+16|0);cU(b);return}}function qr(a){a=a|0;fi(a);return}function rr(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function sr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;f=a+4|0;c[f>>2]=0;c[a+8>>2]=0;a:do if(b|0){o=0;Xa(174,a|0,b|0);e=o;o=0;b:do if(!(e&1)){e=c[f>>2]|0;while(1){o=0;Xa(117,e|0,d|0);e=o;o=0;if(e&1)break b;e=(c[f>>2]|0)+4|0;c[f>>2]=e;b=b+-1|0;if(!b)break a}}while(0);f=Fb()|0;ak(a);Qb(f|0)}while(0);return}function tr(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;a=e;di(f,b);o=0;Xa(117,a|0,c|0);c=o;o=0;do if(!(c&1)){o=0;d=+Z(42,f|0,a|0);c=o;o=0;if(c&1){e=Fb()|0;fi(a);a=e;break}else{c=Qj(d)|0;fi(a);fi(f);l=e;return c|0}}else a=Fb()|0;while(0);fi(f);Qb(a|0);return 0}function ur(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0;e=Pe(b)|0;if((+Lc[c[(c[e>>2]|0)+8>>2]&63](e)>=0.0?(d=Pe(b)|0,f=+Lc[c[(c[d>>2]|0)+8>>2]&63](d),d=a+8|0,f<+(Zk(be(d)|0)|0)):0)?(e=Pe(b)|0,+Lc[c[(c[e>>2]|0)+12>>2]&63](e)>0.0):0){a=Pe(b)|0;f=+Lc[c[(c[a>>2]|0)+12>>2]&63](a);a=f<+(_k(be(d)|0)|0)}else a=0;return a|0}function vr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+32|0;d=e+8|0;f=e;c[f>>2]=b;wr(d,a,b,61811,f,e+16|0);l=e;return (c[d>>2]|0)+20|0}function wr(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;m=l;l=l+16|0;j=m+12|0;k=m;i=xr(d,j,e)|0;e=c[i>>2]|0;if(!e){yr(k,d,f,g,h);zr(d,c[j>>2]|0,i,c[k>>2]|0);e=c[k>>2]|0;i=1}else i=0;c[b>>2]=e;a[b+4>>0]=i;l=m;return}function xr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=a+4|0;e=c[f>>2]|0;a=Ar(a)|0;do if(e){while(1){f=e+16|0;g=cn(d)|0;if(g>>>0<(cn(f)|0)>>>0){f=c[e>>2]|0;if(!f){f=5;break}else{a=e;e=f}}else{g=cn(f)|0;if(g>>>0>=(cn(d)|0)>>>0){f=9;break}a=e+4|0;f=c[a>>2]|0;if(!f){f=8;break}else e=f}}if((f|0)==5){c[b>>2]=e;a=e;break}else if((f|0)==8){c[b>>2]=e;break}else if((f|0)==9){c[b>>2]=e;break}}else{c[b>>2]=f;a=f}while(0);return a|0}function yr(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;g=aU(24)|0;c[b>>2]=g;c[b+4>>2]=d+4;e=b+8|0;a[e>>0]=0;o=0;Xa(117,g+16|0,c[f>>2]|0);f=o;o=0;if(f&1){f=Fb()|0;c[b>>2]=0;cU(g);Qb(f|0)}else{c[g+20>>2]=0;a[e>>0]=1;return}}function zr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=b;c[d>>2]=e;b=c[a>>2]|0;if(c[b>>2]|0){c[a>>2]=c[b>>2];e=c[d>>2]|0}rl(c[a+4>>2]|0,e);a=a+8|0;c[a>>2]=(c[a>>2]|0)+1;return}function Ar(a){a=a|0;return a+4|0}function Br(a,b){a=a|0;b=b|0;c[a>>2]=0;Zq(a,b);return}function Cr(a,b){a=a|0;b=b|0;Zq(a,c[b>>2]|0);return a|0}function Dr(a,b,c){a=a|0;b=b|0;c=c|0;b=Rq(cr(b)|0)|0;return b-(Rq(cr(c)|0)|0)|0}function Er(a,b){a=a|0;b=b|0;var d=0;if((Gr(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function Fr(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{Br(b,0);b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function Gr(a){a=a|0;return 1073741823}function Hr(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Ir(a){a=a|0;Vr(a);return}function Jr(a){a=a|0;Ir(a);cU(a);return}function Kr(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;h=l;l=l+16|0;i=h+8|0;f=h;c[a>>2]=0;g=a+4|0;c[g>>2]=0;c[a+8>>2]=0;o=0;Xa(85,i|0,d|0);d=o;o=0;a:do if(d&1)j=6;else{o=0;Xa(86,f|0,e|0);e=o;o=0;do if(!(e&1)){o=0;nb(47,b|0,i|0,f|0,a|0,0,0,0);e=o;o=0;if(e&1){b=Fb()|0;me(f);break}me(f);ne(i);if((c[a>>2]|0)==(c[g>>2]|0)){j=Ab(8)|0;hg(j,46024);o=0;bb(68,j|0,24,58);o=0;j=6;break a}else{l=h;return}}else b=Fb()|0;while(0);ne(i)}while(0);if((j|0)==6)b=Fb()|0;He(a);Qb(b|0)}function Lr(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0,v=0.0,w=0,x=0,y=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;N=l;l=l+112|0;P=N+104|0;O=N+92|0;q=N+88|0;j=N+80|0;C=N+72|0;B=N+64|0;D=N+60|0;E=N+68|0;H=N+56|0;F=N+48|0;I=N+40|0;G=N+32|0;K=N+24|0;J=N+16|0;M=N+8|0;L=N;do if((i|0)<=4){Ai(P,0);k=c[b+8>>2]|0;m=c[(c[k>>2]|0)+12>>2]|0;o=0;Xa(85,q|0,d|0);A=o;o=0;a:do if(A&1){j=Gb(24)|0;k=z;u=10}else{o=0;Xa(86,j|0,e|0);A=o;o=0;do if(A&1){j=Gb(24)|0;k=z}else{o=0;db(m|0,O|0,k|0,q|0,j|0);A=o;o=0;if(A&1){O=Gb(24)|0;k=z;me(j);j=O;break}Mr(P,O)|0;le(O);me(j);ne(q);A=f+4|0;j=0;y=0;while(1){k=c[f>>2]|0;if(y>>>0>=(c[A>>2]|0)-k>>2>>>0){u=31;break}zf(O,k+(y<<2)|0);x=Ie(O)|0;o=0;Xa(94,C|0,x|0);x=o;o=0;if(x&1){u=26;break}m=Je(C)|0;o=0;m=fa(108,m|0)|0;x=o;o=0;if(x&1){u=27;break}x=Ie(P)|0;o=0;Xa(94,B|0,x|0);x=o;o=0;if(x&1){u=27;break}q=Je(B)|0;o=0;q=fa(108,q|0)|0;x=o;o=0;if(x&1){u=28;break}k=a[m+11>>0]|0;w=k<<24>>24<0;k=k&255;x=w?c[m+4>>2]|0:k;Q=a[q+11>>0]|0;u=Q<<24>>24<0;b:do if((x|0)==((u?c[q+4>>2]|0:Q&255)|0)){q=u?c[q>>2]|0:q;if(w){k=(cj(c[m>>2]|0,q,x)|0)==0;break}while(1){if(!k){k=1;break b}if((a[m>>0]|0)!=(a[q>>0]|0)){k=0;break b}q=q+1|0;m=m+1|0;k=k+-1|0}}else k=0;while(0);Ke(B);Ke(C);j=j|k;le(O);if(k){u=31;break}else y=y+1|0}if((u|0)==26)j=Fb()|0;else if((u|0)==27){j=Fb()|0;u=29}else if((u|0)==28){j=Fb()|0;Ke(B);u=29}else if((u|0)==31){c:do if(!j){zf(D,P);o=0;db(85,O|0,D|0,g|0,h|0);Q=o;o=0;do if(Q&1)j=Fb()|0;else{j=c[A>>2]|0;if(j>>>0>=(c[f+8>>2]|0)>>>0){o=0;Xa(218,f|0,O|0);Q=o;o=0;if(Q&1){j=Fb()|0;le(O);break}}else{zf(j,O);c[A>>2]=(c[A>>2]|0)+4}le(O);le(D);break c}while(0);le(D);u=94;break a}while(0);j=Ie(P)|0;o=0;j=fa(109,j|0)|0;Q=o;o=0;if(!(Q&1)?(o=0,Xa(96,O|0,j|0),Q=o,o=0,!(Q&1)):0){d:do if(!(Pr(Me(O)|0)|0)){m=vi(d)|0;o=0;m=fa(128,m|0)|0;Q=o;o=0;e:do if(!(Q&1)){q=vi(d)|0;o=0;q=fa(129,q|0)|0;Q=o;o=0;if(Q&1){j=Fb()|0;break}k=0;v=0.0;r=0.0;s=+(q|0);t=+(m|0);while(1){if((k|0)>=(Ne(Me(O)|0)|0)){u=49;break}o=0;j=ja(55,O|0,k|0)|0;Q=o;o=0;if(Q&1){u=51;break}o=0;Xa(117,E|0,j|0);Q=o;o=0;if(Q&1){u=51;break}Q=Pe(E)|0;o=0;n=+X(c[(c[Q>>2]|0)+8>>2]|0,Q|0);Q=o;o=0;if(Q&1){u=57;break}Q=Pe(E)|0;o=0;p=+X(c[(c[Q>>2]|0)+12>>2]|0,Q|0);Q=o;o=0;if(Q&1){u=57;break}fi(E);k=k+1|0;v=p>v?p:v;r=n>r?n:r;s=p100.0){Q=vi(d)|0;o=0;jb(57,H|0,Q|0,0,0,~~t|0,q|0);Q=o;o=0;if(Q&1)break;o=0;Xa(86,F|0,e|0);Q=o;o=0;do if(!(Q&1)){o=0;nb(47,b|0,H|0,F|0,f|0,g|0,h|0,k|0);Q=o;o=0;if(Q&1){j=Fb()|0;me(F);break}else{me(F);ne(H);u=66;break f}}else j=Fb()|0;while(0);ne(H);break e}else u=66;while(0);g:do if((u|0)==66){h:do if(s>100.0){Q=vi(d)|0;o=0;jb(57,I|0,Q|0,0,0,m|0,~~s|0);Q=o;o=0;if(Q&1)break g;o=0;Xa(86,G|0,e|0);Q=o;o=0;do if(!(Q&1)){o=0;nb(47,b|0,I|0,G|0,f|0,g|0,h|0,k|0);Q=o;o=0;if(Q&1){j=Fb()|0;me(G);break}else{me(G);ne(I);break h}}else j=Fb()|0;while(0);ne(I);break e}while(0);i:do if(r<+(m+-100|0)){Q=vi(d)|0;j=~~r;o=0;jb(57,K|0,Q|0,j|0,0,m-j|0,q|0);Q=o;o=0;if(Q&1)break g;o=0;Xa(86,J|0,e|0);Q=o;o=0;do if(!(Q&1)){o=0;nb(47,b|0,K|0,J|0,f|0,j+g|0,h|0,k|0);Q=o;o=0;if(Q&1){j=Fb()|0;me(J);break}else{me(J);ne(K);break i}}else j=Fb()|0;while(0);ne(K);break e}while(0);if(!(v<+(q+-100|0)))break d;Q=vi(d)|0;j=~~v;o=0;jb(57,M|0,Q|0,0,j|0,m|0,q-j|0);Q=o;o=0;if(Q&1)break;o=0;Xa(86,L|0,e|0);Q=o;o=0;do if(!(Q&1)){o=0;nb(47,b|0,M|0,L|0,f|0,g|0,j+h|0,k|0);Q=o;o=0;if(Q&1){j=Fb()|0;me(L);break}else{me(L);ne(M);break d}}else j=Fb()|0;while(0);ne(M);break e}while(0);j=Fb()|0;break}else if((u|0)==51){j=Fb()|0;break}else if((u|0)==57){j=Fb()|0;fi(E);break}}else j=Fb()|0;while(0);Qe(O);u=94;break a}while(0);Qe(O);u=91;break a}j=Fb()|0;u=94;break a}if((u|0)==29)Ke(C);le(O);u=94;break a}while(0);ne(q);u=10}while(0);if((u|0)==10)if((k|0)==(mc(24)|0)){Bb(j|0)|0;o=0;La(44);Q=o;o=0;if(Q&1){j=Fb()|0;u=94}else u=91}else u=94;if((u|0)==91){le(P);break}else if((u|0)==94){le(P);Qb(j|0)}}while(0);l=N;return}function Mr(a,b){a=a|0;b=b|0;Af(a,c[b>>2]|0);return a|0}function Nr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,h=0.0,i=0,j=0.0,k=0.0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;p=l;l=l+64|0;q=p+60|0;v=p+48|0;u=p+36|0;m=p+32|0;s=p+28|0;t=p+16|0;r=p+4|0;n=p;Le(v,Qh(Ie(b)|0)|0);a:do if(Pr(Me(v)|0)|0)zf(a,b);else{o=0;f=fa(107,20)|0;i=o;o=0;if(!(i&1)?(Sj(f),o=0,Xa(214,u|0,f|0),i=o,o=0,!(i&1)):0){k=+(d|0);j=+(e|0);i=0;while(1){if((i|0)>=(Ne(Me(v)|0)|0)){i=8;break}o=0;f=ja(55,v|0,i|0)|0;e=o;o=0;if(e&1){i=9;break}o=0;Xa(117,q|0,f|0);e=o;o=0;if(e&1){i=9;break}e=Tj(Me(u)|0)|0;o=0;f=fa(107,16)|0;d=o;o=0;if(d&1){i=21;break}d=Pe(q)|0;o=0;g=+X(c[(c[d>>2]|0)+8>>2]|0,d|0);d=o;o=0;if(d&1){i=22;break}d=Pe(q)|0;o=0;h=+X(c[(c[d>>2]|0)+12>>2]|0,d|0);d=o;o=0;if(d&1){i=22;break}o=0;Pa(42,f|0,+(k+g),+(j+h));d=o;o=0;if(d&1){i=22;break}bi(m,f);f=e+4|0;d=c[f>>2]|0;if(d>>>0>=(c[e+8>>2]|0)>>>0){o=0;Xa(153,e|0,m|0);e=o;o=0;if(e&1){i=23;break}}else{o=0;Xa(117,d|0,m|0);e=o;o=0;if(e&1){i=23;break}c[f>>2]=(c[f>>2]|0)+4}fi(m);fi(q);i=i+1|0}b:do if((i|0)==8){o=0;e=fa(107,40)|0;m=o;o=0;if(m&1){f=Fb()|0;break}m=Ie(b)|0;o=0;Xa(94,s|0,m|0);m=o;o=0;do if(!(m&1)){m=Ie(b)|0;o=0;Xa(219,t|0,m|0);m=o;o=0;if(m&1){f=Fb()|0;Ke(s);break}o=0;Xa(96,r|0,u|0);m=o;o=0;if(m&1){f=Fb()|0;d=1}else{f=Ie(b)|0;o=0;f=fa(130,f|0)|0;b=o;o=0;if(!(b&1)?(c[n>>2]=f,o=0,c[q>>2]=c[n>>2],hb(47,e|0,s|0,t|0,r|0,q|0),q=o,o=0,!(q&1)):0){o=0;Xa(124,a|0,e|0);q=o;o=0;if(q&1)f=0;else{Qe(r);Nd(t);Ke(s);Qe(u);break a}}else f=1;q=Fb()|0;Qe(r);d=f;f=q}Nd(t);Ke(s);if(!d)break b}else f=Fb()|0;while(0);cU(e)}else if((i|0)==9)f=Fb()|0;else if((i|0)==21){f=Fb()|0;i=24}else if((i|0)==22){t=Fb()|0;cU(f);f=t;i=24}else if((i|0)==23){f=Fb()|0;fi(m);i=24}while(0);if((i|0)==24)fi(q);Qe(u)}else f=Fb()|0;Qe(v);Qb(f|0)}while(0);Qe(v);l=p;return}function Or(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=yf(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Qr(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;zf(c[g>>2]|0,b);c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(220,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;Sr(d);Qb(k|0)}else{Sr(d);l=h;return}}function Pr(a){a=a|0;return (c[a+12>>2]|0)==(c[a+8>>2]|0)|0}function Qr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Rr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;zf((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function Sr(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;le(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function Tr(a,b){a=a|0;b=b|0;Ur(a);c[a>>2]=5976;c[a+8>>2]=b;return}function Ur(a){a=a|0;cf(a);c[a>>2]=6e3;return}function Vr(a){a=a|0;ff(a);return}function Wr(a){a=a|0;Vr(a);cU(a);return}function Xr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;h=g+8|0;e=g;f=c[(c[b>>2]|0)+12>>2]|0;ie(h,d);o=0;Xa(86,e|0,3632);d=o;o=0;do if(!(d&1)){o=0;db(f|0,a|0,b|0,h|0,e|0);f=o;o=0;if(f&1){a=Fb()|0;me(e);break}else{me(e);ne(h);l=g;return}}else a=Fb()|0;while(0);ne(h);Qb(a|0)}function Yr(a){a=a|0;Vr(a+12|0);_A(a);return}function Zr(a){a=a|0;Yr(a);cU(a);return}function _r(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;x=l;l=l+112|0;m=x+104|0;A=x+88|0;f=x+68|0;y=x+72|0;g=x+56|0;v=x+64|0;w=x+32|0;n=x+40|0;p=x+36|0;q=x+28|0;r=x+16|0;s=x+4|0;t=x;c[a>>2]=0;u=a+4|0;c[u>>2]=0;c[a+8>>2]=0;k=vi(d)|0;o=0;Xa(221,f|0,k|0);k=o;o=0;do if(k&1)d=Fb()|0;else{o=0;Xa(222,A|0,f|0);k=o;o=0;if(k&1){d=Fb()|0;de(f);break}de(f);o=0;Xa(86,g|0,e|0);k=o;o=0;do if(k&1)d=Fb()|0;else{o=0;bb(48,y|0,A|0,g|0);k=o;o=0;if(k&1){d=Fb()|0;me(g);break}me(g);j=y+4|0;k=a+8|0;i=0;while(1){if(i>>>0>=(c[j>>2]|0)-(c[y>>2]|0)>>2>>>0){h=7;break}o=0;d=fa(131,b|0)|0;g=o;o=0;a:do if(!(g&1)?(g=Io((c[y>>2]|0)+(i<<2)|0)|0,o=0,Xa(126,w|0,g|0),g=o,o=0,!(g&1)):0){o=0;bb(95,v|0,d|0,w|0);g=o;o=0;if(g&1){d=Gb(24)|0;e=z;de(w);h=39;break}de(w);g=Io((c[y>>2]|0)+(i<<2)|0)|0;o=0;Xa(120,n|0,g|0);g=o;o=0;if(g&1){d=Gb(24)|0;e=z}else{o=0;g=fa(107,40)|0;f=o;o=0;b:do if(f&1){d=Gb(24)|0;e=z}else{f=zi(v)|0;o=0;Xa(122,q|0,f|0);f=o;o=0;do if(!(f&1)){f=zi(v)|0;o=0;Xa(123,r|0,f|0);f=o;o=0;if(f&1){d=Gb(24)|0;e=z;Ke(q);break}o=0;Xa(96,s|0,n|0);f=o;o=0;if(f&1){d=Gb(24)|0;e=z;f=1}else{vh(t,12);o=0;c[m>>2]=c[t>>2];hb(47,g|0,q|0,r|0,s|0,m|0);f=o;o=0;do if(f&1)f=1;else{o=0;Xa(124,p|0,g|0);f=o;o=0;if(f&1){f=0;break}Qe(s);Nd(r);Ke(q);d=c[u>>2]|0;do if((d|0)==(c[k>>2]|0)){o=0;Xa(223,a|0,p|0);g=o;o=0;if(!(g&1))break;d=Gb(24)|0;e=z;le(p);break b}else{zf(d,p);c[u>>2]=(c[u>>2]|0)+4}while(0);le(p);Qe(n);Bi(v);break a}while(0);d=Gb(24)|0;e=z;Qe(s)}Nd(r);Ke(q);if(!f)break b}else{d=Gb(24)|0;e=z}while(0);cU(g)}while(0);Qe(n)}Bi(v);h=39}else h=26;while(0);if((h|0)==26){d=Gb(24)|0;e=z;h=39}if((h|0)==39){h=0;if((e|0)!=(mc(24)|0))break;Bb(d|0)|0;o=0;La(44);g=o;o=0;if(g&1){h=42;break}}i=i+1|0}do if((h|0)==7)if((c[a>>2]|0)==(c[u>>2]|0)){d=Ab(8)|0;hg(d,46024);o=0;bb(68,d|0,24,58);o=0;d=Fb()|0;break}else{ds(y);fs(A);l=x;return}else if((h|0)==42)d=Fb()|0;while(0);ds(y)}while(0);fs(A)}while(0);He(a);Qb(d|0)}function $r(a){a=a|0;Yr(a+-12|0);return}function as(a){a=a|0;Zr(a+-12|0);return}function bs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;_r(a,b+-12|0,c,d);return}function cs(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=yf(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Qr(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;zf(c[g>>2]|0,b);c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(220,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;Sr(d);Qb(k|0)}else{Sr(d);l=h;return}}function ds(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Jo(e)}cU(c[a>>2]|0)}return}function es(a){a=a|0;var b=0,d=0;cB(a);b=a+12|0;o=0;Na(329,b|0);d=o;o=0;if(d&1){d=Fb()|0;_A(a);Qb(d|0)}else{c[a>>2]=6024;c[b>>2]=6052;return}}function fs(a){a=a|0;ss(a);return}function gs(a){a=a|0;fs(a);cU(a);return}function hs(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,m=0,n=0,p=0,q=0,r=0;n=l;l=l+64|0;r=n+56|0;q=n+28|0;f=n+24|0;e=n+4|0;p=n+12|0;k=n+8|0;m=n;QE(r,b);o=0;Xa(128,f|0,r|0);j=o;o=0;a:do if(j&1)d=Fb()|0;else{o=0;Xa(224,e|0,d|0);j=o;o=0;do if(j&1)d=Fb()|0;else{o=0;bb(96,q|0,f|0,e|0);j=o;o=0;if(j&1){d=Fb()|0;bf(e);break}bf(e);de(f);o=0;bb(49,p|0,q|0,d|0);j=o;o=0;if(j&1)d=Fb()|0;else{c[a>>2]=0;h=a+4|0;c[h>>2]=0;c[a+8>>2]=0;i=p+4|0;j=a+8|0;g=0;while(1){d=c[p>>2]|0;if(g>>>0>=(c[i>>2]|0)-d>>2>>>0){f=28;break}o=0;Xa(225,m|0,d+(g<<2)|0);f=o;o=0;b:do if(f&1){d=Gb(24)|0;e=z;f=23}else{o=0;bb(97,k|0,b|0,m|0);f=o;o=0;do if(!(f&1)){d=c[h>>2]|0;if(d>>>0<(c[j>>2]|0)>>>0){o=0;Xa(226,d|0,k|0);f=o;o=0;if(f&1)f=21;else{c[h>>2]=(c[h>>2]|0)+4;f=18}}else{o=0;Xa(227,a|0,k|0);f=o;o=0;if(f&1)f=21;else f=18}if((f|0)==18){f=0;Jo(k);ls(m);break b}else if((f|0)==21){d=Gb(24)|0;e=z;Jo(k);break}}else{d=Gb(24)|0;e=z}while(0);ls(m);f=23}while(0);if((f|0)==23){f=0;if((e|0)!=(mc(24)|0))break;Bb(d|0)|0;o=0;La(44);f=o;o=0;if(f&1){f=26;break}}g=g+1|0}if((f|0)==26)d=Fb()|0;else if((f|0)==28){ms(p);us(q);de(r);l=n;return}ds(a);ms(p)}us(q);break a}while(0);de(f)}while(0);de(r);Qb(d|0)}function is(a,b){a=a|0;b=b|0;c[a>>2]=0;rs(a,c[b>>2]|0);return}function js(a,b){a=a|0;b=b|0;c[a>>2]=0;rr(a,c[b>>2]|0);return}function ks(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;h=l;l=l+32|0;g=h;d=a+4|0;e=((c[d>>2]|0)-(c[a>>2]|0)>>2)+1|0;f=ns(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;os(g,k>>2>>>0>>1>>>0?(j>>>0>>0?e:j):f,(c[d>>2]|0)-i>>2,a+8|0);d=g+8|0;o=0;Xa(226,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+4,o=0,Xa(228,a|0,g|0),k=o,o=0,!(k&1)):0){qs(g);l=h;return}k=Fb()|0;qs(g);Qb(k|0)}function ls(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function ms(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;ls(e)}cU(c[a>>2]|0)}return}function ns(a){a=a|0;return 1073741823}function os(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function ps(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;js((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function qs(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Jo(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function rs(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function ss(a){a=a|0;c[a>>2]=33888;bf(a+12|0);de(a+8|0);ff(a);return}function ts(a,b){a=a|0;b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;ki(d,b);o=0;Xa(229,a|0,d|0);b=o;o=0;if(b&1){e=Fb()|0;de(d);Qb(e|0)}else{de(d);c[a>>2]=6076;l=e;return}}function us(a){a=a|0;ht(a+4|0);return}function vs(a){a=a|0;us(a);cU(a);return}function ws(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;z=l;l=l+96|0;v=z+84|0;w=z+88|0;D=z+80|0;u=z+60|0;C=z+48|0;B=z+36|0;x=z+24|0;y=z+12|0;A=z;e=og(e)|0;r=d+4|0;ki(D,r);s=be(D)|0;o=0;s=fa(114,s|0)|0;t=o;o=0;do if(t&1)e=Fb()|0;else{t=be(D)|0;o=0;t=fa(113,t|0)|0;q=o;o=0;if(q&1){e=Fb()|0;break}k=~~(+(s|0)/(57.0*4.0)*3.0);k=e|(k|0)<3?3:k;m=u+4|0;n=u+8|0;p=u+12|0;q=u+16|0;j=k+-1|0;a:while(1){if((j|0)>=(s|0)){g=7;break};c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;i=0;e=0;while(1){if((i|0)>=(t|0))break;f=be(D)|0;o=0;f=la(72,f|0,i|0,j|0)|0;h=o;o=0;if(h&1){g=28;break a}g=e+1|0;h=(e&1|0)==0;do if(f){e=h?e:g;h=u+(e<<2)|0;c[h>>2]=(c[h>>2]|0)+1}else{if(!h){h=u+(e<<2)|0;c[h>>2]=(c[h>>2]|0)+1;break}if((e|0)!=4){e=u+(g<<2)|0;c[e>>2]=(c[e>>2]|0)+1;e=g;break}o=0;e=fa(132,u|0)|0;h=o;o=0;if(h&1){g=28;break a}if(e){o=0;e=pa(53,r|0,u|0,j|0,i|0)|0;h=o;o=0;if(h&1){g=28;break a}if(e){c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;e=0;break}}c[u>>2]=c[n>>2];c[m>>2]=c[p>>2];c[n>>2]=c[q>>2];c[p>>2]=1;c[q>>2]=0;e=3}while(0);i=i+1|0}o=0;e=fa(132,u|0)|0;i=o;o=0;if(i&1){g=28;break}if(e?(o=0,pa(53,r|0,u|0,j|0,t|0)|0,i=o,o=0,i&1):0){g=28;break}j=j+k|0}do if((g|0)==7){o=0;Xa(230,C|0,d|0);d=o;o=0;if(d&1){e=Fb()|0;break}c[b>>2]=0;g=b+4|0;c[g>>2]=0;c[b+8>>2]=0;h=C+4|0;i=b+8|0;f=0;while(1){e=c[C>>2]|0;if(f>>>0>=(((c[h>>2]|0)-e|0)/12|0)>>>0){g=55;break}o=0;Xa(231,B|0,e+(f*12|0)|0);d=o;o=0;if(d&1){g=43;break}o=0;Xa(231,y|0,B|0);d=o;o=0;if(d&1){g=44;break}o=0;Xa(232,x|0,y|0);d=o;o=0;if(d&1){g=45;break};a[v>>0]=a[w>>0]|0;zs(B,x,v);As(x);As(y);o=0;j=fa(107,20)|0;d=o;o=0;if(d&1){g=47;break}o=0;Xa(231,A|0,B|0);d=o;o=0;if(d&1){g=48;break}o=0;Xa(233,j|0,A|0);d=o;o=0;if(d&1){f=1;g=50;break}o=0;Xa(234,v|0,j|0);d=o;o=0;if(d&1){f=0;g=50;break}e=c[g>>2]|0;if(e>>>0>=(c[i>>2]|0)>>>0){o=0;Xa(235,b|0,v|0);d=o;o=0;if(d&1){g=49;break}}else{is(e,v);c[g>>2]=(c[g>>2]|0)+4}ls(v);As(A);As(B);f=f+1|0}if((g|0)==43)e=Fb()|0;else if((g|0)==44){e=Fb()|0;g=46}else if((g|0)==45){e=Fb()|0;As(y);g=46}else if((g|0)==47){e=Fb()|0;g=52}else if((g|0)==48){e=Fb()|0;g=51}else if((g|0)==49){e=Fb()|0;ls(v);As(A);g=52}else if((g|0)==50){e=Fb()|0;As(A);if(f)g=51;else g=52}else if((g|0)==55){Ds(C);de(D);l=z;return}if((g|0)==46)g=53;else if((g|0)==51){cU(j);g=52}if((g|0)==52)g=53;if((g|0)==53)As(B);ms(b);Ds(C)}else if((g|0)==28)e=Fb()|0;while(0)}while(0);de(D);Qb(e|0)}function xs(b,d){b=b|0;d=d|0;var e=0,f=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,m=0.0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=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;E=l;l=l+112|0;K=E+100|0;L=E+96|0;R=E+84|0;O=E+80|0;P=E+76|0;N=E+72|0;M=E+60|0;J=E+36|0;D=E+48|0;F=E+24|0;G=E+20|0;y=E+16|0;H=E+12|0;z=E+8|0;I=E+4|0;A=E;d=d+8|0;ys(R,d);f=c[R+4>>2]|0;e=c[R>>2]|0;x=f-e|0;w=x>>2;if((x|0)<12){d=Ab(8)|0;hg(d,46024);o=0;bb(68,d|0,24,58);o=0;d=Fb()|0}else{c[b>>2]=0;x=b+4|0;c[x>>2]=0;c[b+8>>2]=0;a:do if((w|0)==3){o=0;Xa(236,b|0,d|0);Q=o;o=0;if(Q&1)Q=5;else Q=119}else{c[K>>2]=80;o=0;bb(98,e|0,f|0,K|0);v=o;o=0;if(v&1)Q=5;else{q=w+-2|0;r=w+-1|0;s=M+4|0;t=M+8|0;u=M+8|0;v=b+8|0;d=0;b:while(1){if((d|0)>=(q|0)){Q=9;break}Ms(O,(c[R>>2]|0)+(d<<2)|0);d=d+1|0;e=d;while(1){if((e|0)>=(r|0))break;Ms(P,(c[R>>2]|0)+(e<<2)|0);p=Ss(O)|0;o=0;g=+X(44,p|0);p=o;o=0;if(p&1){Q=19;break b}p=Ss(P)|0;o=0;h=+X(44,p|0);p=o;o=0;if(p&1){Q=19;break b}p=Ss(O)|0;o=0;i=+X(44,p|0);p=o;o=0;if(p&1){Q=20;break b}p=Ss(P)|0;o=0;j=+X(44,p|0);p=o;o=0;if(p&1){Q=21;break b}p=Ss(O)|0;o=0;k=+X(44,p|0);p=o;o=0;if(p&1){Q=22;break b}p=Ss(P)|0;o=0;m=+X(44,p|0);p=o;o=0;if(p&1){Q=22;break b}p=e+1|0;if(+B(+(k-m))>.5?(g-h)/(j=.05000000074505806:0){Q=116;break}else n=p;c:while(1){if((n|0)>=(w|0))break;Ms(N,(c[R>>2]|0)+(n<<2)|0);f=Ss(P)|0;o=0;m=+X(44,f|0);f=o;o=0;if(f&1){Q=32;break b}f=Ss(N)|0;o=0;g=+X(44,f|0);f=o;o=0;if(f&1){Q=32;break b}f=Ss(P)|0;o=0;h=+X(44,f|0);f=o;o=0;if(f&1){Q=33;break b}f=Ss(N)|0;o=0;i=+X(44,f|0);f=o;o=0;if(f&1){Q=34;break b}f=Ss(P)|0;o=0;j=+X(44,f|0);f=o;o=0;if(f&1){Q=35;break b}f=Ss(N)|0;o=0;k=+X(44,f|0);f=o;o=0;if(f&1){Q=35;break b}if(+B(+(j-k))>.5?(m-g)/(i=.05000000074505806:0){Q=31;break}c[M>>2]=0;c[s>>2]=0;c[t>>2]=0;o=0;Xa(237,M|0,O|0);f=o;o=0;if(f&1){Q=67;break b}e=c[s>>2]|0;if((e|0)==(c[u>>2]|0)){o=0;Xa(237,M|0,P|0);f=o;o=0;if(f&1){Q=67;break b}e=c[s>>2]|0}else{Ms(e,P);e=(c[s>>2]|0)+4|0;c[s>>2]=e}if((e|0)==(c[u>>2]|0)){o=0;Xa(237,M|0,N|0);f=o;o=0;if(f&1){Q=67;break b}}else{Ms(e,N);c[s>>2]=(c[s>>2]|0)+4}o=0;Xa(231,D|0,M|0);f=o;o=0;if(f&1){Q=68;break b}o=0;Xa(232,J|0,D|0);f=o;o=0;if(f&1){Q=69;break b};a[K>>0]=a[L>>0]|0;zs(M,J,K);As(J);As(D);o=0;f=fa(107,20)|0;e=o;o=0;if(e&1){Q=67;break b}o=0;Xa(231,F|0,M|0);e=o;o=0;if(e&1){Q=71;break b}o=0;Xa(233,f|0,F|0);e=o;o=0;if(e&1){e=1;Q=72;break b}o=0;Xa(234,L|0,f|0);e=o;o=0;if(e&1){e=0;Q=72;break b}As(F);f=Us(L)|0;o=0;Xa(238,K|0,f|0);f=o;o=0;if(f&1){Q=74;break b}o=0;Xa(239,G|0,K|0);f=o;o=0;if(f&1){Q=75;break b}f=Us(L)|0;o=0;Xa(240,J|0,f|0);f=o;o=0;if(f&1){Q=76;break b}o=0;Xa(239,y|0,J|0);f=o;o=0;if(f&1){Q=77;break b}o=0;g=+Z(43,G|0,y|0);f=o;o=0;if(f&1){Q=78;break b}fi(y);Is(J);fi(G);Is(K);f=Us(L)|0;o=0;Xa(241,K|0,f|0);f=o;o=0;if(f&1){Q=83;break b}o=0;Xa(239,H|0,K|0);f=o;o=0;if(f&1){Q=84;break b}f=Us(L)|0;o=0;Xa(240,J|0,f|0);f=o;o=0;if(f&1){Q=85;break b}o=0;Xa(239,z|0,J|0);f=o;o=0;if(f&1){Q=86;break b}o=0;h=+Z(43,H|0,z|0);f=o;o=0;if(f&1){Q=87;break b}fi(z);Is(J);fi(H);Is(K);f=Us(L)|0;o=0;Xa(238,K|0,f|0);f=o;o=0;if(f&1){Q=92;break b}o=0;Xa(239,I|0,K|0);f=o;o=0;if(f&1){Q=93;break b}f=Us(L)|0;o=0;Xa(241,J|0,f|0);f=o;o=0;if(f&1){Q=94;break b}o=0;Xa(239,A|0,J|0);f=o;o=0;if(f&1){Q=95;break b}o=0;i=+Z(43,I|0,A|0);f=o;o=0;if(f&1){Q=96;break b}fi(A);Is(J);fi(I);Is(K);f=Ss(O)|0;o=0;j=+X(44,f|0);f=o;o=0;if(f&1){Q=101;break b}m=(g+i)/(j*2.0);do if(m>180.0|m<9.0)e=10;else{if(+B(+((g-i)/(i=.10000000149011612){e=10;break}m=+C(+(g*g+i*i));if(+B(+((h-m)/(m=.10000000149011612){e=10;break}e=c[x>>2]|0;if((e|0)==(c[v>>2]|0)){o=0;Xa(236,b|0,M|0);f=o;o=0;if(f&1){Q=110;break b}else{e=0;break}}o=0;Xa(231,e|0,M|0);f=o;o=0;if(f&1){Q=110;break b}c[x>>2]=(c[x>>2]|0)+12;e=0}while(0);ls(L);As(M);Is(N);switch(e&15){case 10:case 0:break;default:break c}n=n+1|0}if((Q|0)==31){Q=0;Is(N)}Is(P);e=p}if((Q|0)==116){Q=0;Is(P)}Is(O)}switch(Q|0){case 9:{if((c[b>>2]|0)!=(c[x>>2]|0)){Q=119;break a}Q=Ab(8)|0;hg(Q,46024);o=0;bb(68,Q|0,24,58);o=0;Q=5;break a}case 19:{d=Fb()|0;break}case 20:{d=Fb()|0;break}case 21:{d=Fb()|0;break}case 22:{d=Fb()|0;break}case 32:{d=Fb()|0;Q=113;break}case 33:{d=Fb()|0;Q=113;break}case 34:{d=Fb()|0;Q=113;break}case 35:{d=Fb()|0;Q=113;break}case 67:{d=Fb()|0;Q=112;break}case 68:{d=Fb()|0;Q=70;break}case 69:{d=Fb()|0;As(D);Q=70;break}case 71:{d=Fb()|0;Q=73;break}case 72:{d=Fb()|0;As(F);if(e)Q=73;else Q=112;break}case 74:{d=Fb()|0;Q=82;break}case 75:{d=Fb()|0;Q=81;break}case 76:{d=Fb()|0;Q=80;break}case 77:{d=Fb()|0;Q=79;break}case 78:{d=Fb()|0;fi(y);Q=79;break}case 83:{d=Fb()|0;Q=91;break}case 84:{d=Fb()|0;Q=90;break}case 85:{d=Fb()|0;Q=89;break}case 86:{d=Fb()|0;Q=88;break}case 87:{d=Fb()|0;fi(z);Q=88;break}case 92:{d=Fb()|0;Q=100;break}case 93:{d=Fb()|0;Q=99;break}case 94:{d=Fb()|0;Q=98;break}case 95:{d=Fb()|0;Q=97;break}case 96:{d=Fb()|0;fi(A);Q=97;break}case 101:{d=Fb()|0;Q=111;break}case 110:{d=Fb()|0;Q=111;break}}if((Q|0)==70)Q=112;else if((Q|0)==73){cU(f);Q=112}else if((Q|0)==79){Is(J);Q=80}else if((Q|0)==88){Is(J);Q=89}else if((Q|0)==97){Is(J);Q=98}if((Q|0)==80){fi(G);Q=81}else if((Q|0)==89){fi(H);Q=90}else if((Q|0)==98){fi(I);Q=99}if((Q|0)==81){Is(K);Q=82}else if((Q|0)==90){Is(K);Q=91}else if((Q|0)==99){Is(K);Q=100}if((Q|0)==82)Q=111;else if((Q|0)==91)Q=111;else if((Q|0)==100)Q=111;if((Q|0)==111){ls(L);Q=112}if((Q|0)==112){As(M);Q=113}if((Q|0)==113)Is(N);Is(P);Is(O)}}while(0);if((Q|0)==5)d=Fb()|0;else if((Q|0)==119){As(R);l=E;return}Ds(b)}As(R);Qb(d|0)}function ys(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;d=b+4|0;e=(c[d>>2]|0)-(c[b>>2]|0)>>2;do if(e|0){o=0;Xa(242,a|0,e|0);f=o;o=0;if(!(f&1)?(o=0,db(86,a|0,c[b>>2]|0,c[d>>2]|0,e|0),f=o,o=0,!(f&1)):0)break;f=Fb()|0;As(a);Qb(f|0)}while(0);return}function zs(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;Js(a);c[a>>2]=c[b>>2];d=b+4|0;c[a+4>>2]=c[d>>2];e=b+8|0;c[a+8>>2]=c[e>>2];c[e>>2]=0;c[d>>2]=0;c[b>>2]=0;return}function As(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Is(e)}cU(c[a>>2]|0)}return}function Bs(a,b){a=a|0;b=b|0;c[a>>2]=0;rs(a,b);return}function Cs(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=Es(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Fs(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;is(c[g>>2]|0,b);c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(243,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;Hs(d);Qb(k|0)}else{Hs(d);l=h;return}}function Ds(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;As(e)}cU(c[a>>2]|0)}return}function Es(a){a=a|0;return 1073741823}function Fs(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Gs(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;is((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function Hs(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;ls(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function Is(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Js(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Is(e)}cU(c[a>>2]|0);c[a+8>>2]=0;c[d>>2]=0;c[a>>2]=0}return}function Ks(a,b){a=a|0;b=b|0;var d=0;if((Os(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function Ls(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;a=a+4|0;while(1){if((b|0)==(d|0))break;Ms(c[a>>2]|0,b);c[a>>2]=(c[a>>2]|0)+4;b=b+4|0}return}function Ms(a,b){a=a|0;b=b|0;c[a>>2]=0;Ns(a,c[b>>2]|0);return}function Ns(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Os(a){a=a|0;return 1073741823}function Ps(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;h=l;l=l+32|0;g=h;d=a+4|0;e=(((c[d>>2]|0)-(c[a>>2]|0)|0)/12|0)+1|0;f=dt(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=((c[a+8>>2]|0)-i|0)/12|0;j=k<<1;et(g,k>>>0>>1>>>0?(j>>>0>>0?e:j):f,((c[d>>2]|0)-i|0)/12|0,a+8|0);d=g+8|0;o=0;Xa(231,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+12,o=0,Xa(244,a|0,g|0),k=o,o=0,!(k&1)):0){gt(g);l=h;return}k=Fb()|0;gt(g);Qb(k|0)}function Qs(a,b){a=a|0;b=b|0;var c=0.0;c=+hF(Ss(a)|0);return c-+hF(Ss(b)|0)<0.0|0}function Rs(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,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;L=l;l=l+96|0;H=L+80|0;I=L+76|0;J=L+72|0;D=L+68|0;E=L+64|0;F=L+60|0;G=L+56|0;p=L+52|0;q=L+48|0;r=L+44|0;s=L+40|0;t=L+36|0;u=L+32|0;v=L+28|0;w=L+24|0;x=L+20|0;y=L+16|0;z=L+12|0;A=L+8|0;B=L+4|0;C=L;a:while(1){m=b;n=b+-4|0;while(1){k=a;b:while(1){j=k;e=m-j|0;f=e>>2;a=k+4|0;switch(f|0){case 1:case 0:{K=86;break a}case 2:{K=5;break a}case 3:{K=12;break a}case 4:{K=13;break a}case 5:{K=14;break a}default:{}}if((e|0)<28){K=16;break a}h=k+(((f|0)/2|0)<<2)|0;if((e|0)>3996){g=(f|0)/4|0;g=at(k,k+(g<<2)|0,h,h+(g<<2)|0,n,d)|0}else g=_s(k,h,n,d)|0;e=c[d>>2]|0;Ms(D,k);Ms(E,h);o=0;e=ja(e|0,D|0,E|0)|0;i=o;o=0;if(i&1){K=26;break a}Is(E);Is(D);if(e){f=n;e=g;break}else f=n;while(1){f=f+-4|0;e=c[d>>2]|0;if((k|0)==(f|0))break;Ms(v,f);Ms(w,h);o=0;e=ja(e|0,v|0,w|0)|0;i=o;o=0;if(i&1){K=56;break a}Is(w);Is(v);if(e){K=52;break b}}Ms(F,k);Ms(G,n);o=0;e=ja(e|0,F|0,G|0)|0;j=o;o=0;if(j&1){K=27;break a}Is(G);Is(F);if(!e){while(1){if((a|0)==(n|0)){K=86;break a}e=c[d>>2]|0;Ms(p,k);Ms(q,a);o=0;e=ja(e|0,p|0,q|0)|0;j=o;o=0;if(j&1){K=34;break a}Is(q);Is(p);if(e)break;a=a+4|0}Ms(H,a);o=0;ja(81,a|0,n|0)|0;j=o;o=0;if(j&1){K=32;break a}o=0;ja(81,n|0,H|0)|0;j=o;o=0;if(j&1){K=32;break a}Is(H);a=a+4|0}if((a|0)==(n|0)){K=86;break a}else e=n;while(1){while(1){f=c[d>>2]|0;Ms(r,k);Ms(s,a);o=0;f=ja(f|0,r|0,s|0)|0;j=o;o=0;if(j&1){K=41;break a}Is(s);Is(r);if(f)break;a=a+4|0}do{f=c[d>>2]|0;Ms(t,k);e=e+-4|0;Ms(u,e);o=0;f=ja(f|0,t|0,u|0)|0;j=o;o=0;if(j&1){K=44;break a}Is(u);Is(t)}while(f);if(a>>>0>=e>>>0){k=a;continue b}Ms(H,a);o=0;ja(81,a|0,e|0)|0;j=o;o=0;if(j&1){K=48;break a}o=0;ja(81,e|0,H|0)|0;j=o;o=0;if(j&1){K=48;break a}Is(H);a=a+4|0}}if((K|0)==52){K=0;Ms(H,k);o=0;ja(81,k|0,f|0)|0;i=o;o=0;if(i&1){K=54;break a}o=0;ja(81,f|0,H|0)|0;i=o;o=0;if(i&1){K=54;break a}Is(H);e=g+1|0}c:do if(a>>>0>>0){i=h;while(1){while(1){g=c[d>>2]|0;Ms(x,a);Ms(y,i);o=0;g=ja(g|0,x|0,y|0)|0;h=o;o=0;if(h&1){K=61;break a}Is(y);Is(x);h=a+4|0;if(g)a=h;else break}do{g=c[d>>2]|0;f=f+-4|0;Ms(z,f);Ms(A,i);o=0;g=ja(g|0,z|0,A|0)|0;M=o;o=0;if(M&1){K=64;break a}Is(A);Is(z)}while(!g);if(a>>>0>f>>>0){f=i;g=a;break c}Ms(H,a);o=0;ja(81,a|0,f|0)|0;M=o;o=0;if(M&1){K=68;break a}o=0;ja(81,f|0,H|0)|0;M=o;o=0;if(M&1){K=68;break a}Is(H);i=(i|0)==(a|0)?f:i;a=h;e=e+1|0}}else{f=h;g=a}while(0);if((g|0)!=(f|0)){a=c[d>>2]|0;Ms(B,f);Ms(C,g);o=0;a=ja(a|0,B|0,C|0)|0;M=o;o=0;if(M&1){K=77;break a}Is(C);Is(B);if(a){Ms(H,g);o=0;ja(81,g|0,f|0)|0;M=o;o=0;if(M&1){K=75;break a}o=0;ja(81,f|0,H|0)|0;M=o;o=0;if(M&1){K=75;break a}Is(H);a=e+1|0}else a=e}else a=e;if(!a){e=ct(k,g,d)|0;a=g+4|0;if(ct(a,b,d)|0){K=84;break}if(e)continue}M=g;if((M-j|0)>=(m-M|0)){K=83;break}Rs(k,g,d);a=g+4|0}if((K|0)==83){K=0;Rs(g+4|0,b,d);a=k;b=g;continue}else if((K|0)==84){K=0;if(e){K=86;break}else{a=k;b=g;continue}}}switch(K|0){case 5:{a=c[d>>2]|0;Ms(I,n);Ms(J,k);o=0;a=ja(a|0,I|0,J|0)|0;M=o;o=0;if(M&1){a=Fb()|0;Is(J);Is(I);K=85;break}Is(J);Is(I);if(a){Ms(H,k);o=0;ja(81,k|0,n|0)|0;M=o;o=0;if(!(M&1)?(o=0,ja(81,n|0,H|0)|0,M=o,o=0,!(M&1)):0){Is(H);K=86;break}M=Fb()|0;Is(H);Qb(M|0)}else K=86;break}case 12:{_s(k,a,n,d)|0;K=86;break}case 13:{$s(k,a,k+8|0,n,d)|0;K=86;break}case 14:{at(k,a,k+8|0,k+12|0,n,d)|0;K=86;break}case 16:{bt(k,b,d);K=86;break}case 26:{a=Fb()|0;Is(E);Is(D);K=85;break}case 27:{a=Fb()|0;Is(G);Is(F);K=85;break}case 32:{M=Fb()|0;Is(H);Qb(M|0)}case 34:{a=Fb()|0;Is(q);Is(p);K=85;break}case 41:{a=Fb()|0;Is(s);Is(r);K=85;break}case 44:{a=Fb()|0;Is(u);Is(t);K=85;break}case 48:{M=Fb()|0;Is(H);Qb(M|0)}case 54:{M=Fb()|0;Is(H);Qb(M|0)}case 56:{a=Fb()|0;Is(w);Is(v);K=85;break}case 61:{a=Fb()|0;Is(y);Is(x);K=85;break}case 64:{a=Fb()|0;Is(A);Is(z);K=85;break}case 68:{M=Fb()|0;Is(H);Qb(M|0)}case 75:{M=Fb()|0;Is(H);Qb(M|0)}case 77:{a=Fb()|0;Is(C);Is(B);K=85;break}}if((K|0)==85)Qb(a|0);else if((K|0)==86){l=L;return}}function Ss(a){a=a|0;return c[a>>2]|0}function Ts(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=Os(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Ws(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;Ms(c[g>>2]|0,b);c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(245,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;Ys(d);Qb(k|0)}else{Ys(d);l=h;return}}function Us(a){a=a|0;return c[a>>2]|0}function Vs(a,b){a=a|0;b=b|0;c[a>>2]=0;gi(a,c[b>>2]|0);return}function Ws(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Xs(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;Ms((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function Ys(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Is(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function Zs(a,b){a=a|0;b=b|0;Ns(a,c[b>>2]|0);return a|0}function _s(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+48|0;s=t+40|0;f=t+36|0;g=t+32|0;k=t+28|0;m=t+24|0;r=t+20|0;n=t+16|0;i=t+12|0;j=t+8|0;p=t+4|0;q=t;h=c[e>>2]|0;Ms(f,b);Ms(g,a);o=0;h=ja(h|0,f|0,g|0)|0;u=o;o=0;a:do if(u&1){u=Fb()|0;Is(g);Is(f);f=u}else{Is(g);Is(f);f=c[e>>2]|0;do if(!h){Ms(k,d);Ms(m,b);o=0;f=ja(f|0,k|0,m|0)|0;u=o;o=0;if(u&1){f=Fb()|0;Is(m);Is(k);break a}Is(m);Is(k);if(f){Ms(s,b);o=0;ja(81,b|0,d|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,d|0,s|0)|0,u=o,o=0,!(u&1)):0){Is(s);f=c[e>>2]|0;Ms(r,b);Ms(n,a);o=0;f=ja(f|0,r|0,n|0)|0;u=o;o=0;if(u&1){f=Fb()|0;Is(n);Is(r);break a}Is(n);Is(r);if(!f){f=1;break}Ms(s,a);o=0;ja(81,a|0,b|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,b|0,s|0)|0,u=o,o=0,!(u&1)):0){Is(s);f=2;break}u=Fb()|0;Is(s);Qb(u|0)}u=Fb()|0;Is(s);Qb(u|0)}else f=0}else{Ms(i,d);Ms(j,b);o=0;f=ja(f|0,i|0,j|0)|0;u=o;o=0;if(u&1){f=Fb()|0;Is(j);Is(i);break a}Is(j);Is(i);if(f){Ms(s,a);o=0;ja(81,a|0,d|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,d|0,s|0)|0,u=o,o=0,!(u&1)):0){Is(s);f=1;break}u=Fb()|0;Is(s);Qb(u|0)}Ms(s,a);o=0;ja(81,a|0,b|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,b|0,s|0)|0,u=o,o=0,!(u&1)):0){Is(s);f=c[e>>2]|0;Ms(p,d);Ms(q,b);o=0;f=ja(f|0,p|0,q|0)|0;u=o;o=0;if(u&1){f=Fb()|0;Is(q);Is(p);break a}Is(q);Is(p);if(!f){f=1;break}Ms(s,b);o=0;ja(81,b|0,d|0)|0;u=o;o=0;if(!(u&1)?(o=0,ja(81,d|0,s|0)|0,u=o,o=0,!(u&1)):0){Is(s);f=2;break}u=Fb()|0;Is(s);Qb(u|0)}u=Fb()|0;Is(s);Qb(u|0)}while(0);l=t;return f|0}while(0);Qb(f|0);return 0}function $s(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,m=0,n=0,p=0,q=0,r=0,s=0;r=l;l=l+32|0;q=r+24|0;i=r+20|0;j=r+16|0;k=r+12|0;m=r+8|0;n=r+4|0;p=r;g=_s(a,b,d,f)|0;h=c[f>>2]|0;Ms(i,e);Ms(j,d);o=0;h=ja(h|0,i|0,j|0)|0;s=o;o=0;a:do if(s&1){g=Fb()|0;Is(j);Is(i)}else{Is(j);Is(i);do if(h){Ms(q,d);o=0;ja(81,d|0,e|0)|0;s=o;o=0;if(!(s&1)?(o=0,ja(81,e|0,q|0)|0,s=o,o=0,!(s&1)):0){Is(q);h=c[f>>2]|0;Ms(k,d);Ms(m,b);o=0;h=ja(h|0,k|0,m|0)|0;s=o;o=0;if(s&1){g=Fb()|0;Is(m);Is(k);break a}Is(m);Is(k);if(!h){g=g+1|0;break}Ms(q,b);o=0;ja(81,b|0,d|0)|0;s=o;o=0;if(!(s&1)?(o=0,ja(81,d|0,q|0)|0,s=o,o=0,!(s&1)):0){Is(q);h=c[f>>2]|0;Ms(n,b);Ms(p,a);o=0;h=ja(h|0,n|0,p|0)|0;s=o;o=0;if(s&1){g=Fb()|0;Is(p);Is(n);break a}Is(p);Is(n);if(!h){g=g+2|0;break}Ms(q,a);o=0;ja(81,a|0,b|0)|0;s=o;o=0;if(!(s&1)?(o=0,ja(81,b|0,q|0)|0,s=o,o=0,!(s&1)):0){Is(q);g=g+3|0;break}s=Fb()|0;Is(q);Qb(s|0)}s=Fb()|0;Is(q);Qb(s|0)}s=Fb()|0;Is(q);Qb(s|0)}while(0);l=r;return g|0}while(0);Qb(g|0);return 0}function at(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;t=u+32|0;j=u+28|0;k=u+24|0;n=u+20|0;m=u+16|0;p=u+12|0;q=u+8|0;r=u+4|0;s=u;h=$s(a,b,d,e,g)|0;i=c[g>>2]|0;Ms(j,f);Ms(k,e);o=0;i=ja(i|0,j|0,k|0)|0;v=o;o=0;a:do if(v&1){h=Fb()|0;Is(k);Is(j)}else{Is(k);Is(j);b:do if(i){Ms(t,e);o=0;ja(81,e|0,f|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(81,f|0,t|0)|0,v=o,o=0,!(v&1)):0){Is(t);i=c[g>>2]|0;Ms(n,e);Ms(m,d);o=0;i=ja(i|0,n|0,m|0)|0;v=o;o=0;if(v&1){h=Fb()|0;Is(m);Is(n);break a}Is(m);Is(n);if(!i){h=h+1|0;break}Ms(t,d);o=0;ja(81,d|0,e|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(81,e|0,t|0)|0,v=o,o=0,!(v&1)):0){Is(t);i=c[g>>2]|0;Ms(p,d);Ms(q,b);o=0;i=ja(i|0,p|0,q|0)|0;v=o;o=0;if(v&1){h=Fb()|0;Is(q);Is(p);break a}Is(q);Is(p);if(!i){h=h+2|0;break}Ms(t,b);o=0;ja(81,b|0,d|0)|0;v=o;o=0;if(!(v&1)?(o=0,ja(81,d|0,t|0)|0,v=o,o=0,!(v&1)):0){Is(t);i=c[g>>2]|0;Ms(r,b);Ms(s,a);o=0;i=ja(i|0,r|0,s|0)|0;v=o;o=0;if(v&1){h=Fb()|0;Is(s);Is(r);break a}Is(s);Is(r);if(!i){h=h+3|0;break}Ms(t,a);o=0;ja(81,a|0,b|0)|0;v=o;o=0;do if(!(v&1)){o=0;ja(81,b|0,t|0)|0;v=o;o=0;if(v&1)break;Is(t);h=h+4|0;break b}while(0);v=Fb()|0;Is(t);Qb(v|0)}v=Fb()|0;Is(t);Qb(v|0)}v=Fb()|0;Is(t);Qb(v|0)}v=Fb()|0;Is(t);Qb(v|0)}while(0);l=u;return h|0}while(0);Qb(h|0);return 0}function bt(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,m=0,n=0,p=0,q=0;n=l;l=l+32|0;i=n+16|0;j=n+8|0;p=n+12|0;k=n+4|0;m=n;e=a+8|0;_s(a,a+4|0,e,d)|0;h=a+12|0;a:while(1){if((h|0)==(b|0)){f=3;break}f=c[d>>2]|0;Ms(i,h);Ms(j,e);o=0;f=ja(f|0,i|0,j|0)|0;g=o;o=0;if(g&1){f=13;break}Is(j);Is(i);if(f){Ms(p,h);f=h;while(1){o=0;ja(81,f|0,e|0)|0;g=o;o=0;if(g&1){f=14;break a}if((e|0)==(a|0)){e=a;break}g=c[d>>2]|0;Ms(k,p);f=e+-4|0;Ms(m,f);o=0;g=ja(g|0,k|0,m|0)|0;q=o;o=0;if(q&1){f=15;break a}Is(m);Is(k);if(g){q=e;e=f;f=q}else break}o=0;ja(81,e|0,p|0)|0;q=o;o=0;if(q&1){f=14;break}Is(p)}e=h;h=h+4|0}if((f|0)==3){l=n;return}else if((f|0)==13){e=Fb()|0;Is(j);Is(i)}else if((f|0)==14){e=Fb()|0;f=16}else if((f|0)==15){e=Fb()|0;Is(m);Is(k);f=16}if((f|0)==16)Is(p);Qb(e|0)}function ct(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,m=0,n=0,p=0,q=0,r=0;q=l;l=l+32|0;p=q+24|0;h=q+20|0;i=q+16|0;j=q+12|0;k=q+8|0;m=q+4|0;n=q;f=a+8|0;e=a+4|0;g=b+-4|0;a:do switch(b-a>>2|0){case 1:case 0:{e=1;g=29;break}case 2:{e=c[d>>2]|0;Ms(h,g);Ms(i,a);o=0;e=ja(e|0,h|0,i|0)|0;n=o;o=0;if(n&1){e=Fb()|0;Is(i);Is(h);g=30;break a}Is(i);Is(h);if(e){Ms(p,a);o=0;ja(81,a|0,g|0)|0;n=o;o=0;if(!(n&1)?(o=0,ja(81,g|0,p|0)|0,n=o,o=0,!(n&1)):0){Is(p);e=1;g=29;break a}q=Fb()|0;Is(p);Qb(q|0)}else{e=1;g=29}break}case 3:{_s(a,e,g,d)|0;e=1;g=29;break}case 4:{$s(a,e,f,g,d)|0;e=1;g=29;break}case 5:{at(a,e,f,a+12|0,g,d)|0;e=1;g=29;break}default:{_s(a,e,f,d)|0;i=a+12|0;e=0;b:while(1){if((i|0)==(b|0)){f=1;e=0;g=28;break}g=c[d>>2]|0;Ms(j,i);Ms(k,f);o=0;g=ja(g|0,j|0,k|0)|0;h=o;o=0;if(h&1){g=23;break}Is(k);Is(j);if(g){Ms(p,i);g=i;while(1){o=0;ja(81,g|0,f|0)|0;h=o;o=0;if(h&1){g=24;break b}if((f|0)==(a|0)){f=a;break}h=c[d>>2]|0;Ms(m,p);g=f+-4|0;Ms(n,g);o=0;h=ja(h|0,m|0,n|0)|0;r=o;o=0;if(r&1){g=25;break b}Is(n);Is(m);if(h){r=f;f=g;g=r}else break}o=0;ja(81,f|0,p|0)|0;r=o;o=0;if(r&1){g=24;break}e=e+1|0;Is(p);if((e|0)==8){f=0;e=(i+4|0)==(b|0);g=28;break}}f=i;i=i+4|0}if((g|0)==23){e=Fb()|0;Is(k);Is(j);g=30;break a}else if((g|0)==24)e=Fb()|0;else if((g|0)==25){e=Fb()|0;Is(n);Is(m)}else if((g|0)==28){e=e|f;g=29;break a}Is(p);g=30}}while(0);if((g|0)==29){l=q;return e|0}else if((g|0)==30)Qb(e|0);return 0}function dt(a){a=a|0;return 357913941}function et(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=357913941){e=aU(b*12|0)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d*12|0)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b*12|0);return}function ft(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;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;k=c[g>>2]|0;i=k+-12|0;h=d+-12|0;c[i>>2]=0;j=k+-8|0;c[j>>2]=0;c[k+-4>>2]=0;c[i>>2]=c[h>>2];i=d+-8|0;c[j>>2]=c[i>>2];j=d+-4|0;c[k+-4>>2]=c[j>>2];c[j>>2]=0;c[i>>2]=0;c[h>>2]=0;c[g>>2]=(c[g>>2]|0)+-12;d=h}i=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=i;i=b+8|0;k=c[f>>2]|0;c[f>>2]=c[i>>2];c[i>>2]=k;i=a+8|0;k=b+12|0;j=c[i>>2]|0;c[i>>2]=c[k>>2];c[k>>2]=j;c[b>>2]=c[g>>2];return}function gt(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;As(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function ht(a){a=a|0;bf(a+20|0);As(a+4|0);de(a);return}function it(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=l;l=l+16|0;e=f;ki(e,b);o=0;bb(99,a+4|0,e|0,d|0);d=o;o=0;if(d&1){f=Fb()|0;de(e);Qb(f|0)}else{de(e);c[a>>2]=6100;l=f;return}}function jt(a){a=a|0;c[a>>2]=6120;pj(a+20|0);pU(a+8|0);pv(a);return}function kt(a){a=a|0;jt(a);cU(a);return}function lt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0.0,i=0,j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;x=l;l=l+64|0;v=x+48|0;g=x+44|0;B=x+32|0;z=x+28|0;A=x+16|0;y=x+4|0;w=x;t=d+20|0;u=(c[d+24>>2]|0)-(c[t>>2]|0)>>2;En(t,0);En(t,u);_d(g,f);o=0;Xa(246,d|0,g|0);u=o;o=0;if(u&1){f=Fb()|0;Sf(g)}else{Sf(g);s=nt(d)|0;u=d+8|0;p=u+11|0;if((a[p>>0]|0)<0){q=c[u>>2]|0;a[v>>0]=0;ah(q,v);q=d+12|0;c[q>>2]=0}else{a[v>>0]=0;ah(u,v);a[p>>0]=0;q=d+12|0}m=d+32|0;g=s;while(1){i=ot(d,g)|0;if((i|0)==-1){C=7;break}xU(u,1,i&255)|0;n=g+8|0;f=a[p>>0]|0;if(f<<24>>24<0)f=c[q>>2]|0;else f=f&255;if(f>>>0>1?pt(46140,a[46119+i>>0]|0)|0:0)break;if((n|0)<(c[m>>2]|0))g=n;else break}if((C|0)==7){C=Ab(8)|0;cm(C);Mb(C|0,488,58)}r=g+7|0;i=c[t>>2]|0;k=c[i+(r<<2)>>2]|0;f=-8;g=0;while(1){if((f|0)==-1)break;D=(c[i+(f+n<<2)>>2]|0)+g|0;f=f+1|0;g=D}if((k|0)<((g|0)/2|0|0)?(n|0)<(c[m>>2]|0):0){D=Ab(8)|0;cm(D);Mb(D|0,488,58)}qt(d,s);g=0;while(1){i=a[p>>0]|0;k=i<<24>>24<0;if(k)f=c[q>>2]|0;else f=i&255;if((g|0)>=(f|0))break;if(k)f=c[u>>2]|0;else f=u;a[f+g>>0]=a[46119+(a[f+g>>0]|0)>>0]|0;g=g+1|0}if(k)f=c[u>>2]|0;else f=u;if(!(pt(46140,a[f>>0]|0)|0)){D=Ab(8)|0;cm(D);Mb(D|0,488,58)}if(k){f=c[q>>2]|0;g=c[u>>2]|0}else{f=i&255;g=u}if(!(pt(46140,a[g+(f+-1)>>0]|0)|0)){D=Ab(8)|0;cm(D);Mb(D|0,488,58)}if(k)f=c[q>>2]|0;else f=i&255;if((f|0)<4){D=Ab(8)|0;cm(D);Mb(D|0,488,58)}if(k)f=c[q>>2]|0;else f=i&255;DU(u,f+-1|0,1)|0;DU(u,0,1)|0;f=0;i=0;while(1){if((f|0)>=(s|0)){f=s;g=i;break}D=(c[(c[t>>2]|0)+(f<<2)>>2]|0)+i|0;f=f+1|0;i=D}while(1){if((f|0)>=(r|0))break;D=(c[(c[t>>2]|0)+(f<<2)>>2]|0)+g|0;f=f+1|0;g=D}j=+(g|0);rt(B,2);o=0;f=fa(107,16)|0;D=o;o=0;a:do if(!(D&1)){h=+(e|0);o=0;Pa(43,f|0,+(+(i|0)),+h);D=o;o=0;if(D&1){C=Fb()|0;cU(f);f=C;C=69;break}o=0;Xa(247,v|0,f|0);D=o;o=0;if(!(D&1)){o=0;f=ja(55,B|0,0)|0;D=o;o=0;if(D&1){f=Fb()|0;ut(v);C=69;break}tt(f,v)|0;ut(v);o=0;f=fa(107,16)|0;D=o;o=0;do if(!(D&1)){o=0;Pa(43,f|0,+j,+h);D=o;o=0;if(D&1){D=Fb()|0;cU(f);f=D;break}o=0;Xa(247,v|0,f|0);D=o;o=0;if(!(D&1)){o=0;f=ja(55,B|0,1)|0;D=o;o=0;if(D&1){f=Fb()|0;ut(v);break}tt(f,v)|0;ut(v);o=0;i=fa(107,40)|0;D=o;o=0;if(D&1){f=Fb()|0;break a}o=0;f=fa(107,20)|0;D=o;o=0;do if(!(D&1)){o=0;Xa(140,f|0,u|0);D=o;o=0;if(D&1){D=Fb()|0;cU(f);f=D;break}o=0;Xa(173,z|0,f|0);D=o;o=0;if(D&1){C=75;break}Pg(A);o=0;Xa(96,y|0,B|0);D=o;o=0;if(D&1){f=Fb()|0;g=1}else{vh(w,2);o=0;c[v>>2]=c[w>>2];hb(47,i|0,z|0,A|0,y|0,v|0);D=o;o=0;do if(D&1)f=1;else{o=0;Xa(124,b|0,i|0);D=o;o=0;if(D&1){f=0;break}Qe(y);Nd(A);Ke(z);Qe(B);l=x;return}while(0);D=Fb()|0;Qe(y);g=f;f=D}Nd(A);Ke(z);if(!g)break a}else C=75;while(0);if((C|0)==75)f=Fb()|0;cU(i);break a}else C=70}else C=70;while(0);if((C|0)==70)f=Fb()|0}else C=66}else C=66;while(0);if((C|0)==66){f=Fb()|0;C=69}Qe(B)}Qb(f|0)}function mt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;c[a+32>>2]=0;d=Qk(Xd(b)|0,0)|0;g=Dk(Xd(b)|0)|0;if((d|0)<(g|0)){e=0;f=1}else{g=Ab(8)|0;cm(g);Mb(g|0,488,58)}while(1){if((d|0)>=(g|0))break;if(f^(Ui(Xd(b)|0,d)|0))e=e+1|0;else{wt(a,e);e=1;f=f^1}d=d+1|0}wt(a,e);return}function nt(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;h=c[b+32>>2]|0;i=b+20|0;d=1;while(1){if((d|0)>=(h|0)){e=11;break}e=ot(b,d)|0;if((e|0)!=-1?pt(46140,a[46119+e>>0]|0)|0:0){g=d+7|0;e=d;f=0;while(1){if((e|0)>=(g|0))break;j=(c[(c[i>>2]|0)+(e<<2)>>2]|0)+f|0;e=e+1|0;f=j}if((d|0)==1){d=1;e=12;break}if((c[(c[i>>2]|0)+(d+-1<<2)>>2]|0)>=((f|0)/2|0|0)){e=12;break}}d=d+2|0}if((e|0)==11){j=Ab(8)|0;cm(j);Mb(j|0,488,58)}else if((e|0)==12)return d|0;return 0}function ot(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;h=b+7|0;a:do if((h|0)<(c[a+32>>2]|0)){i=a+20|0;d=0;g=2147483647;a=b;while(1){if((a|0)>=(h|0))break;f=c[(c[i>>2]|0)+(a<<2)>>2]|0;d=(f|0)>(d|0)?f:d;g=(f|0)<(g|0)?f:g;a=a+2|0}a=b+1|0;e=2147483647;f=0;while(1){if((a|0)>=(h|0))break;j=c[(c[i>>2]|0)+(a<<2)>>2]|0;a=a+2|0;e=(j|0)<(e|0)?j:e;f=(j|0)>(f|0)?j:f}g=d+g|0;e=e+f|0;a=0;f=0;d=128;while(1){if((a|0)==7){a=0;break}j=d>>1;h=((c[(c[i>>2]|0)+(a+b<<2)>>2]|0)>((((a&1|0)==0?g:e)|0)/2|0|0)?j:0)|f;a=a+1|0;f=h;d=j}while(1){if((a|0)>=20){a=-1;break a}if((c[6140+(a<<2)>>2]|0)==(f|0))break a;a=a+1|0}}else a=-1;while(0);return a|0}function pt(a,b){a=a|0;b=b|0;return (NJ(a,b<<24>>24)|0)!=0|0}function qt(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;s=l;l=l+64|0;v=s+40|0;u=s+28|0;t=s+16|0;r=s+4|0;k=s;c[u>>2]=0;nj(v,4,u);c[t>>2]=0;o=0;bb(70,u|0,4,t|0);q=o;o=0;if(q&1)e=Fb()|0;else{q=b+8|0;m=q+11|0;e=a[m>>0]|0;j=e<<24>>24<0;if(j)e=c[b+12>>2]|0;else e=e&255;p=e+-1|0;n=b+20|0;b=d;g=0;while(1){if(j)e=c[q>>2]|0;else e=q;h=c[v>>2]|0;i=c[u>>2]|0;f=6;e=c[6140+(a[e+g>>0]<<2)>>2]|0;while(1){if((f|0)<=-1)break;w=f&1|e<<1&2;x=h+(w<<2)|0;c[x>>2]=(c[x>>2]|0)+(c[(c[n>>2]|0)+(f+b<<2)>>2]|0);w=i+(w<<2)|0;c[w>>2]=(c[w>>2]|0)+1;f=f+-1|0;e=e>>1}if((g|0)>=(p|0))break;b=b+8|0;g=g+1|0}c[r>>2]=0;o=0;bb(70,t|0,4,r|0);x=o;o=0;if(x&1)e=Fb()|0;else{c[k>>2]=0;o=0;bb(70,r|0,4,k|0);x=o;o=0;do if(!(x&1)){b=c[r>>2]|0;f=c[v>>2]|0;g=c[u>>2]|0;h=c[t>>2]|0;e=0;while(1){if((e|0)==2)break;c[b+(e<<2)>>2]=0;x=e+2|0;k=f+(x<<2)|0;w=g+(x<<2)|0;j=((c[k>>2]<<8|0)/(c[w>>2]|0)|0)+((c[f+(e<<2)>>2]<<8|0)/(c[g+(e<<2)>>2]|0)|0)>>1;c[b+(x<<2)>>2]=j;c[h+(e<<2)>>2]=j;c[h+(x<<2)>>2]=(c[k>>2]<<9|384|0)/(c[w>>2]|0)|0;e=e+1|0}j=(a[m>>0]|0)<0;k=c[r>>2]|0;m=c[t>>2]|0;i=0;h=d;a:while(1){if(j)e=c[q>>2]|0;else e=q;g=6;e=c[6140+(a[e+i>>0]<<2)>>2]|0;while(1){if((g|0)<=-1)break;b=g&1|e<<1&2;f=c[(c[n>>2]|0)+(g+h<<2)>>2]<<8;if((f|0)<(c[k+(b<<2)>>2]|0)){b=29;break a}if((f|0)>(c[m+(b<<2)>>2]|0)){b=29;break a}g=g+-1|0;e=e>>1}if((i|0)>=(p|0)){b=32;break}i=i+1|0;h=h+8|0}if((b|0)==29){e=Ab(8)|0;cm(e);o=0;bb(68,e|0,488,58);o=0;e=Fb()|0;pj(r);break}else if((b|0)==32){pj(r);pj(t);pj(u);pj(v);l=s;return}}else e=Fb()|0;while(0);pj(t)}pj(u)}pj(v);Qb(e|0)}function rt(a,b){a=a|0;b=b|0;var d=0,e=0;cf(a);c[a>>2]=3516;c[a+8>>2]=0;o=0;d=fa(107,20)|0;e=o;o=0;do if(!(e&1)){o=0;Xa(213,d|0,b|0);e=o;o=0;if(e&1){b=Fb()|0;cU(d);break}else{Ef(a,d);return}}else b=Fb()|0;while(0);ff(a);Qb(b|0)}function st(a,b){a=a|0;b=b|0;c[a>>2]=0;vt(a,b);return}function tt(a,b){a=a|0;b=b|0;gi(a,c[b>>2]|0);return a|0}function ut(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function vt(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function wt(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,m=0;k=l;l=l+16|0;e=k;c[e>>2]=b;f=a+32|0;g=c[f>>2]|0;h=a+20|0;i=a+24|0;m=c[i>>2]|0;j=c[h>>2]|0;d=m;do if((g|0)>=(m-j>>2|0))if((d|0)==(c[a+28>>2]|0)){xt(h,e);break}else{c[d>>2]=b;c[i>>2]=d+4;break}else c[j+(g<<2)>>2]=b;while(0);c[f>>2]=(c[f>>2]|0)+1;l=k;return}function xt(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=qj(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Kn(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;f=c[g>>2]|0;c[f>>2]=c[b>>2];c[g>>2]=f+4;o=0;Xa(179,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;Nn(d);Qb(k|0)}else{Nn(d);l=h;return}}function yt(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f;wv(a);c[a>>2]=6120;e=a+8|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[e+(b<<2)>>2]=0;b=b+1|0}c[d>>2]=0;o=0;bb(70,a+20|0,80,d|0);d=o;o=0;if(d&1){f=Fb()|0;pU(e);pv(a);Qb(f|0)}else{c[a+32>>2]=0;l=f;return}}function zt(a){a=a|0;pv(a);return}function At(a){a=a|0;zt(a);cU(a);return}function Bt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0.0,j=0,k=0.0,m=0.0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,R=0,S=0,T=0,U=0;J=l;l=l+272|0;H=J+248|0;U=J+232|0;d=J+244|0;T=J+220|0;S=J+208|0;R=J+196|0;Q=J+56|0;G=J+192|0;P=J+40|0;N=J+4|0;L=J+52|0;M=J+28|0;K=J+16|0;I=J;_d(d,f);o=0;Xa(248,U|0,d|0);F=o;o=0;if(F&1){U=Fb()|0;Sf(d);d=U}else{Sf(d);p=c[(c[U>>2]|0)+8>>2]|0;a:do switch(p|0){case 103:{r=101;v=9;break}case 104:{r=100;v=9;break}case 105:{r=99;v=9;break}default:{d=Ab(8)|0;o=0;Na(325,d|0);T=o;o=0;if(T&1){T=Fb()|0;Jb(d|0);d=T;break a}else{o=0;bb(68,d|0,160,61);o=0;d=Fb()|0;break a}}}while(0);if((v|0)==9){c[T>>2]=0;c[T+4>>2]=0;c[T+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[T+(d<<2)>>2]=0;d=d+1|0}a[H>>0]=0;o=0;bb(57,S|0,20,H|0);F=o;o=0;if(F&1)d=Fb()|0;else{n=c[U>>2]|0;j=c[n>>2]|0;n=c[n+4>>2]|0;c[H>>2]=0;o=0;bb(70,R|0,6,H|0);F=o;o=0;if(F&1)d=Fb()|0;else{h=Q+56|0;F=Q+4|0;c[Q>>2]=220;c[h>>2]=240;o=0;Xa(156,Q+56|0,F|0);E=o;o=0;b:do if(E&1){d=Fb()|0;v=34}else{c[Q+128>>2]=0;c[Q+132>>2]=Qg()|0;c[Q>>2]=3760;c[h>>2]=3780;o=0;Na(324,F|0);E=o;o=0;do if(E&1)d=Fb()|0;else{c[F>>2]=3796;g=Q+36|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[g+(d<<2)>>2]=0;d=d+1|0}c[Q+48>>2]=0;c[Q+52>>2]=16;c[H>>2]=0;c[H+4>>2]=0;c[H+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[H+(d<<2)>>2]=0;d=d+1|0}o=0;Xa(157,F|0,H|0);E=o;o=0;if(E&1){d=Fb()|0;pU(H);pU(g);KK(F);break}pU(H);z=R+4|0;A=P+11|0;B=H+11|0;C=H+4|0;D=P+8|0;E=P+4|0;h=0;y=0;s=j;u=1;t=0;x=0;q=0;c:while(1){if(h){v=86;break}o=0;Xa(129,G|0,f|0);w=o;o=0;if(w&1){v=35;break}o=0;w=la(83,G|0,R|0,n|0)|0;v=o;o=0;if(v&1){v=36;break}Sf(G);q=(w|0)!=106;j=t+1|0;g=O(w,j)|0;p=(q?g:0)+p|0;g=c[R>>2]|0;h=(c[z>>2]|0)-g>>2;d=0;v=n;while(1){if((d|0)>=(h|0))break;s=(c[g+(d<<2)>>2]|0)+v|0;d=d+1|0;v=s}s=u|q;t=q?j:t;if((w+-103|0)>>>0<3){v=40;break}d=(w|0)<96;g=w+32&255;d:do switch(r|0){case 101:{if((w|0)<64){o=0;la(84,T|0,1,g|0)|0;u=o;o=0;if(u&1){v=35;break c}else{h=0;j=0;g=101;d=s;break d}}if(d){o=0;la(84,T|0,1,w+192&255|0)|0;u=o;o=0;if(u&1){v=35;break c}else{h=0;j=0;g=101;d=s;break d}}d=s^q;switch(w|0){case 98:{h=0;j=1;g=100;break d}case 106:{h=1;j=0;g=101;break d}case 99:{h=0;j=0;g=w;break d}case 100:{h=0;j=0;g=w;break d}default:{h=0;j=0;g=101;break d}}}case 100:{if(d){o=0;la(84,T|0,1,g|0)|0;u=o;o=0;if(u&1){v=35;break c}else{h=0;j=0;g=100;d=s;break d}}d=s^q;switch(w|0){case 106:{h=1;j=0;g=100;break d}case 99:{h=0;j=0;g=w;break d}case 101:{h=0;j=0;g=w;break d}case 98:{h=0;j=1;g=101;break d}default:{h=0;j=0;g=100;break d}}}case 99:{if((w|0)>=100){d=s^q;switch(w|0){case 106:{h=1;j=0;g=99;break d}case 101:{h=0;j=0;g=w;break d}case 100:{h=0;j=0;g=w;break d}default:{h=0;j=0;g=99;break d}}}if((w|0)<10?(o=0,la(84,T|0,1,48)|0,u=o,o=0,u&1):0){v=35;break c}o=0;Xa(108,Q+(c[(c[Q>>2]|0)+-12>>2]|0)|0,0);u=o;o=0;if(u&1){v=35;break c};c[P>>2]=0;c[P+4>>2]=0;c[P+8>>2]=0;h=Uh(61821)|0;if(h>>>0>4294967279){v=65;break c}if(h>>>0<11){a[A>>0]=h;d=P}else{g=h+16&-16;o=0;d=fa(107,g|0)|0;u=o;o=0;if(u&1){v=75;break c}c[P>>2]=d;c[D>>2]=g|-2147483648;c[E>>2]=h}_i(d,61821,h)|0;a[H>>0]=0;ah(d+h|0,H);o=0;Xa(157,F|0,P|0);u=o;o=0;if(u&1){v=76;break c}pU(P);o=0;ja(62,Q|0,w|0)|0;u=o;o=0;if(u&1){v=35;break c}o=0;Xa(158,H|0,F|0);u=o;o=0;if(u&1){v=78;break c}u=a[B>>0]|0;r=u<<24>>24<0;o=0;la(74,T|0,(r?c[H>>2]|0:H)|0,(r?c[C>>2]|0:u&255)|0)|0;u=o;o=0;if(u&1){v=79;break c}pU(H);h=0;j=0;g=99;d=s;break}default:{h=0;j=0;g=r;d=s}}while(0);r=y?((g|0)==101?100:101):g;q=x;s=n;y=j;n=v;u=d;x=w}e:do if((v|0)==36){d=Fb()|0;Sf(G)}else if((v|0)==40){d=Ab(8)|0;o=0;Na(325,d|0);P=o;o=0;if(P&1){P=Fb()|0;Jb(d|0);d=P;break}else{o=0;bb(68,d|0,160,61);o=0;v=35;break}}else if((v|0)==65){o=0;Na(320,P|0);o=0;v=75}else if((v|0)==76){d=Fb()|0;pU(P);v=77}else if((v|0)==78){d=Fb()|0;v=80}else if((v|0)==79){d=Fb()|0;pU(H);v=80}else if((v|0)==86){j=n-s|0;g=Xd(f)|0;o=0;g=ja(82,g|0,n|0)|0;G=o;o=0;do if(!(G&1)){h=Xd(f)|0;d=Xd(f)|0;o=0;d=fa(112,d|0)|0;f=o;o=0;if(f&1){d=Fb()|0;break e}f=((g-s|0)/2|0)+g|0;o=0;d=pa(54,h|0,g|0,((f|0)<(d|0)?f:d)|0,0)|0;f=o;o=0;if(f&1){d=Fb()|0;break e}if(!d){P=Ab(8)|0;cm(P);o=0;bb(68,P|0,488,58);o=0;break}if(((p-(O(t,q)|0)|0)%103|0|0)!=(q|0)){P=Ab(8)|0;dg(P);o=0;bb(68,P|0,144,56);o=0;break}d=a[T+11>>0]|0;d=d<<24>>24<0?c[T+4>>2]|0:d&255;f:do if(!d){P=Ab(8)|0;cm(P);o=0;bb(68,P|0,488,58);o=0}else{do if(!((d|0)<1|u^1))if((r|0)==99){o=0;la(85,T|0,d+-2|0,d|0)|0;f=o;o=0;if(f&1)break f;else break}else{o=0;la(85,T|0,d+-1|0,d|0)|0;f=o;o=0;if(f&1)break f;else break}while(0);f=c[U>>2]|0;k=+((c[f>>2]|0)+(c[f+4>>2]|0)|0)*.5;m=+(s|0)+ +(j|0)*.5;j=(c[S+4>>2]|0)-(c[S>>2]|0)|0;o=0;Xa(103,P|0,j|0);f=o;o=0;if(f&1){d=Fb()|0;break e}d=0;while(1){if((d|0)>=(j|0)){v=106;break}g=a[(c[S>>2]|0)+d>>0]|0;o=0;h=ja(56,P|0,d|0)|0;f=o;o=0;if(f&1){v=110;break}a[h>>0]=g;d=d+1|0}do if((v|0)==106){o=0;Xa(249,N|0,2);f=o;o=0;if(f&1){d=Fb()|0;break}o=0;d=fa(107,16)|0;f=o;o=0;g:do if(f&1)v=129;else{i=+(e|0);o=0;Pa(43,d|0,+k,+i);e=o;o=0;if(e&1){v=Fb()|0;cU(d);d=v;v=132;break}o=0;Xa(247,H|0,d|0);e=o;o=0;if(e&1){v=129;break}o=0;d=ja(55,N|0,0)|0;e=o;o=0;if(e&1){d=Fb()|0;ut(H);v=132;break}tt(d,H)|0;ut(H);o=0;d=fa(107,16)|0;e=o;o=0;do if(e&1)v=133;else{o=0;Pa(43,d|0,+m,+i);e=o;o=0;if(e&1){M=Fb()|0;cU(d);d=M;break}o=0;Xa(247,H|0,d|0);e=o;o=0;if(e&1){v=133;break}o=0;d=ja(55,N|0,1)|0;e=o;o=0;if(e&1){d=Fb()|0;ut(H);break}tt(d,H)|0;ut(H);o=0;h=fa(107,40)|0;e=o;o=0;if(e&1){d=Fb()|0;break g}o=0;d=fa(107,20)|0;e=o;o=0;do if(!(e&1)){o=0;Xa(140,d|0,T|0);e=o;o=0;if(e&1){M=Fb()|0;cU(d);d=M;break}o=0;Xa(173,L|0,d|0);e=o;o=0;if(e&1){v=138;break}o=0;Xa(83,M|0,P|0);e=o;o=0;if(e&1){d=Fb()|0;Ke(L);break}o=0;Xa(96,K|0,N|0);e=o;o=0;if(e&1){d=Fb()|0;g=1}else{vh(I,5);o=0;c[H>>2]=c[I>>2];hb(47,h|0,L|0,M|0,K|0,H|0);I=o;o=0;do if(I&1)d=1;else{o=0;Xa(124,b|0,h|0);b=o;o=0;if(b&1){d=0;break}Qe(K);Nd(M);Ke(L);Qe(N);Nd(P);Ug(Q);pj(R);pf(S);pU(T);pj(U);l=J;return}while(0);b=Fb()|0;Qe(K);g=d;d=b}Nd(M);Ke(L);if(!g)break g}else v=138;while(0);if((v|0)==138)d=Fb()|0;cU(h);break g}while(0);if((v|0)==133)d=Fb()|0}while(0);if((v|0)==129){d=Fb()|0;v=132}Qe(N)}else if((v|0)==110)d=Fb()|0;while(0);Nd(P);break e}while(0);d=Fb()|0;break e}while(0);d=Fb()|0}while(0);if((v|0)==35)d=Fb()|0;else if((v|0)==75){d=Fb()|0;v=77}Ug(Q);break b}while(0);dL(Q,3856);v=34}while(0);if((v|0)==34)GK(h);pj(R)}pf(S)}pU(T)}pj(U)}Qb(d|0)}function Ct(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;s=l;l=l+16|0;t=s+4|0;r=s;p=Dk(Xd(b)|0)|0;d=Ok(Xd(b)|0,0)|0;c[r>>2]=0;nj(t,6,r);k=(c[t+4>>2]|0)-(c[t>>2]|0)>>2;m=k+-1|0;n=k+-2|0;j=0;q=d;f=0;a:while(1){if((q|0)>=(p|0)){e=24;break}e=Xd(b)|0;o=0;e=ja(59,e|0,q|0)|0;i=o;o=0;if(i&1){e=6;break}if(f^e){e=(c[t>>2]|0)+(j<<2)|0;c[e>>2]=(c[e>>2]|0)+1;e=j}else{if((j|0)==(m|0)){e=103;i=-1;g=64;while(1){if((e|0)>=106)break;o=0;h=la(86,t|0,6248+(e*24|0)|0,179)|0;u=o;o=0;if(u&1){e=12;break a}u=(h|0)<(g|0);v=u?e:i;e=e+1|0;i=v;g=u?h:g}if((i|0)>-1){v=Xd(b)|0;e=d-((q-d|0)/2|0)|0;o=0;e=pa(54,v|0,((e|0)>0?e:0)|0,d|0,0)|0;v=o;o=0;if(v&1){e=16;break}if(e){e=15;break}}g=c[t>>2]|0;h=c[g+4>>2]|0;e=(c[g>>2]|0)+d|0;d=2;while(1){if((d|0)>=(k|0))break;c[g+(d+-2<<2)>>2]=c[g+(d<<2)>>2];d=d+1|0}d=c[t>>2]|0;c[d+(n<<2)>>2]=0;c[d+(m<<2)>>2]=0;d=e+h|0;e=-1}else e=1;e=e+j|0;c[(c[t>>2]|0)+(e<<2)>>2]=1;f=f^1}j=e;q=q+1|0}do if((e|0)==6)d=Fb()|0;else if((e|0)==12)d=Fb()|0;else if((e|0)==15){c[r>>2]=0;o=0;bb(70,a|0,3,r|0);v=o;o=0;if(v&1){d=Fb()|0;break}else{v=c[a>>2]|0;c[v>>2]=d;c[v+4>>2]=q;c[v+8>>2]=i;pj(t);l=s;return}}else if((e|0)==16)d=Fb()|0;else if((e|0)==24){d=Ab(8)|0;cm(d);o=0;bb(68,d|0,488,58);o=0;d=Fb()|0}while(0);pj(t);Qb(d|0)}function Dt(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;d=e;_d(d,a);o=0;bb(100,d|0,c|0,b|0);c=o;o=0;if(c&1){e=Fb()|0;Sf(d);Qb(e|0)}Sf(d);a=64;c=-1;d=0;while(1){if((d|0)==107)break;g=yv(b,6248+(d*24|0)|0,179)|0;f=(g|0)<(a|0);a=f?g:a;c=f?d:c;d=d+1|0}if((c|0)>-1){l=e;return c|0}else{g=Ab(8)|0;cm(g);Mb(g|0,488,58)}return 0}function Et(a){a=a|0;wv(a);c[a>>2]=6228;return}function Ft(a){a=a|0;c[a>>2]=8824;pj(a+24|0);pU(a+12|0);pv(a);return}function Gt(a){a=a|0;Ft(a);cU(a);return}function Ht(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.0,k=0.0,m=0.0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;A=l;l=l+96|0;y=A+80|0;H=A+60|0;g=A+76|0;q=A+72|0;G=A+56|0;w=A+44|0;F=A+28|0;D=A+40|0;E=A+16|0;B=A+4|0;z=A;r=d+24|0;s=d+28|0;x=(c[s>>2]|0)-(c[r>>2]|0)>>2;En(r,0);En(r,x);x=d+12|0;u=x+11|0;if((a[u>>0]|0)<0){C=c[x>>2]|0;a[y>>0]=0;ah(C,y);c[d+16>>2]=0}else{a[y>>0]=0;ah(x,y);a[u>>0]=0}_d(g,f);o=0;bb(101,H|0,g|0,r|0);C=o;o=0;if(C&1){H=Fb()|0;Sf(g);g=H}else{Sf(g);g=Xd(f)|0;o=0;g=ja(83,g|0,c[(c[H>>2]|0)+4>>2]|0)|0;C=o;o=0;a:do if(!(C&1)){t=Xd(f)|0;o=0;t=fa(112,t|0)|0;C=o;o=0;if(C&1){g=Fb()|0;break}else v=g;while(1){o=0;Xa(129,q|0,f|0);C=o;o=0;if(C&1){C=14;break}o=0;bb(100,q|0,v|0,r|0);C=o;o=0;if(C&1){C=15;break}Sf(q);g=Jt(r)|0;if((g|0)<0){C=10;break}o=0;p=fa(133,g|0)|0;C=o;o=0;if(C&1){C=16;break}o=0;la(84,x|0,1,p|0)|0;C=o;o=0;if(C&1){C=16;break}n=c[r>>2]|0;i=(c[s>>2]|0)-n>>2;g=0;h=v;while(1){if((g|0)>=(i|0))break;C=(c[n+(g<<2)>>2]|0)+h|0;g=g+1|0;h=C}n=Xd(f)|0;o=0;n=ja(83,n|0,h|0)|0;C=o;o=0;if(C&1){C=16;break}if(p<<24>>24==42){C=24;break}else v=n}if((C|0)==10){G=Ab(8)|0;cm(G);o=0;bb(68,G|0,488,58);o=0;C=16}else if((C|0)==15){g=Fb()|0;Sf(q);break}else if((C|0)==24){g=a[u>>0]|0;if(g<<24>>24<0)g=c[d+16>>2]|0;else g=g&255;o=0;bb(58,x|0,g+-1|0,0);q=o;o=0;if(q&1)C=14;else{i=c[r>>2]|0;h=(c[s>>2]|0)-i>>2;f=0;g=0;while(1){if((g|0)>=(h|0))break;f=(c[i+(g<<2)>>2]|0)+f|0;g=g+1|0}if((n|0)!=(t|0)?(n-v-f>>1|0)<(f|0):0){G=Ab(8)|0;cm(G);o=0;bb(68,G|0,488,58);o=0}else C=35;do if((C|0)==35){do if(a[d+8>>0]|0){h=a[u>>0]|0;if(h<<24>>24<0)g=c[d+16>>2]|0;else g=h&255;p=g+-1|0;i=0;n=0;g=h;while(1){g=g<<24>>24<0;if((i|0)>=(p|0))break;if(g)g=c[x>>2]|0;else g=x;g=(EU(58732,a[g+i>>0]|0,0)|0)+n|0;i=i+1|0;n=g;g=a[u>>0]|0}if(g)g=c[x>>2]|0;else g=x;if((a[g+p>>0]|0)==(a[46203+((n|0)%43|0)>>0]|0)){o=0;bb(58,x|0,p|0,0);t=o;o=0;if(!(t&1))break}else{G=Ab(8)|0;dg(G);o=0;bb(68,G|0,144,56);o=0}g=Fb()|0;break a}while(0);g=a[u>>0]|0;if(g<<24>>24<0)g=c[d+16>>2]|0;else g=g&255;if(!g){G=Ab(8)|0;cm(G);o=0;bb(68,G|0,488,58);o=0;break}o=0;Xa(173,G|0,0);u=o;o=0;if(!(u&1)){b:do if(!(a[d+9>>0]|0)){o=0;g=fa(107,20)|0;w=o;o=0;do if(w&1)C=67;else{o=0;Xa(140,g|0,x|0);x=o;o=0;if(x&1){F=Fb()|0;cU(g);g=F;break}o=0;Xa(173,y|0,g|0);C=o;o=0;if(C&1){C=67;break}Mt(G,y)|0;Ke(y);C=70;break b}while(0);if((C|0)==67)g=Fb()|0}else{o=0;Xa(95,w|0,x|0);x=o;o=0;do if(!(x&1)){o=0;Xa(250,y|0,w|0);x=o;o=0;if(x&1){g=Fb()|0;pU(w);break}else{Mt(G,y)|0;Ke(y);pU(w);C=70;break b}}else g=Fb()|0;while(0)}while(0);do if((C|0)==70){x=c[H>>2]|0;k=+((c[x>>2]|0)+(c[x+4>>2]|0)|0)*.5;m=+(v|0)+ +(f|0)*.5;o=0;Xa(249,F|0,2);x=o;o=0;if(x&1){g=Fb()|0;break}o=0;g=fa(107,16)|0;x=o;o=0;c:do if(x&1)C=85;else{j=+(e|0);o=0;Pa(43,g|0,+k,+j);e=o;o=0;if(e&1){C=Fb()|0;cU(g);g=C;C=88;break}o=0;Xa(247,y|0,g|0);e=o;o=0;if(e&1){C=85;break}o=0;g=ja(55,F|0,0)|0;e=o;o=0;if(e&1){g=Fb()|0;ut(y);C=88;break}tt(g,y)|0;ut(y);o=0;g=fa(107,16)|0;e=o;o=0;do if(e&1)C=89;else{o=0;Pa(43,g|0,+m,+j);e=o;o=0;if(e&1){E=Fb()|0;cU(g);g=E;break}o=0;Xa(247,y|0,g|0);e=o;o=0;if(e&1){C=89;break}o=0;g=ja(55,F|0,1)|0;e=o;o=0;if(e&1){g=Fb()|0;ut(y);break}tt(g,y)|0;ut(y);o=0;i=fa(107,40)|0;e=o;o=0;if(e&1){g=Fb()|0;break c}Mh(D,G);Pg(E);o=0;Xa(96,B|0,F|0);e=o;o=0;if(e&1){g=Fb()|0;h=1}else{vh(z,3);o=0;c[y>>2]=c[z>>2];hb(47,i|0,D|0,E|0,B|0,y|0);z=o;o=0;do if(z&1)g=1;else{o=0;Xa(124,b|0,i|0);z=o;o=0;if(z&1){g=0;break}Qe(B);Nd(E);Ke(D);Qe(F);Ke(G);pj(H);l=A;return}while(0);A=Fb()|0;Qe(B);h=g;g=A}Nd(E);Ke(D);if(!h)break c;cU(i);break c}while(0);if((C|0)==89)g=Fb()|0}while(0);if((C|0)==85){g=Fb()|0;C=88}Qe(F)}while(0);Ke(G);break a}}while(0);g=Fb()|0;break}}if((C|0)==14){g=Fb()|0;break}else if((C|0)==16){g=Fb()|0;break}}else g=Fb()|0;while(0);pj(H)}Qb(g|0)}function It(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,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+16|0;r=s;p=Dk(Xd(b)|0)|0;j=Ok(Xd(b)|0,0)|0;m=(c[d+4>>2]|0)-(c[d>>2]|0)>>2;n=m+-1|0;o=m+-2|0;k=0;q=j;g=0;while(1){if((q|0)>=(p|0)){e=15;break}if(g^(Ui(Xd(b)|0,q)|0)){f=(c[d>>2]|0)+(k<<2)|0;c[f>>2]=(c[f>>2]|0)+1;f=k;e=j}else{if((k|0)==(n|0)){e=j-(q-j>>1)|0;if((Jt(d)|0)==148?Hk(Xd(b)|0,(e|0)>0?e:0,j,0)|0:0){e=8;break}h=c[d>>2]|0;i=c[h+4>>2]|0;f=(c[h>>2]|0)+j|0;e=2;while(1){if((e|0)>=(m|0))break;c[h+(e+-2<<2)>>2]=c[h+(e<<2)>>2];e=e+1|0}e=c[d>>2]|0;c[e+(o<<2)>>2]=0;c[e+(n<<2)>>2]=0;e=f+i|0;f=-1}else{e=j;f=1}f=f+k|0;c[(c[d>>2]|0)+(f<<2)>>2]=1;g=g^1}k=f;q=q+1|0;j=e}if((e|0)==8){c[r>>2]=0;nj(a,2,r);r=c[a>>2]|0;c[r>>2]=j;c[r+4>>2]=q;l=s;return}else if((e|0)==15){s=Ab(8)|0;cm(s);Mb(s|0,488,58)}}function Jt(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;h=c[a>>2]|0;i=(c[a+4>>2]|0)-h>>2;e=i+-1|0;a=0;while(1){b=0;g=2147483647;while(1){if((b|0)>=(i|0)){b=0;a=0;f=0;d=0;break}f=c[h+(b<<2)>>2]|0;b=b+1|0;g=(f|0)<(g|0)&(f|0)>(a|0)?f:g}while(1){if((b|0)>=(i|0))break;l=c[h+(b<<2)>>2]|0;k=(l|0)>(g|0);m=(k?1<3)a=g;else{a=-1;break}}a:do if((j|0)==8)while(1){if(!((b|0)>0&(e|0)<(i|0)))break a;d=c[h+(e<<2)>>2]|0;if((d|0)>(g|0))if((d<<1|0)<(f|0))b=b+-1|0;else{a=-1;break a}e=e+1|0;j=8}while(0);return a|0}function Kt(b){b=b|0;var d=0;d=0;while(1){if((d|0)>=44){b=5;break}if((c[8844+(d<<2)>>2]|0)==(b|0)){b=6;break}d=d+1|0}if((b|0)==5){d=Ab(8)|0;hg(d,61821);Mb(d|0,24,58)}else if((b|0)==6)return a[46203+d>>0]|0;return 0}function Lt(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+16|0;m=k;j=d+11|0;e=a[j>>0]|0;if(e<<24>>24<0)i=c[d+4>>2]|0;else i=e&255;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;e=0;while(1){if((e|0)==3)break;c[m+(e<<2)>>2]=0;e=e+1|0}e=0;a:while(1){if((e|0)>=(i|0)){f=9;break}g=(a[j>>0]|0)<0;if(g)f=c[d>>2]|0;else f=d;h=a[f+e>>0]|0;switch(h<<24>>24){case 47:case 37:case 36:case 43:{e=e+1|0;if(g)f=c[d>>2]|0;else f=d;f=a[f+e>>0]|0;g=f<<24>>24;b:do switch(h<<24>>24|0){case 43:{if((f+-65&255)>25){f=18;break a}f=g+32&255;break}case 36:{if((f+-65&255)>25){f=21;break a}f=g+192&255;break}case 37:{if((f+-65&255)<5){f=g+218&255;break b}if((f+-70&255)>=18){f=26;break a}f=g+245&255;break}case 47:if((f+-65&255)>=15)if(f<<24>>24==90){f=58;break b}else{f=30;break a}else{f=g+224&255;break b}default:f=0}while(0);o=0;la(84,m|0,1,f|0)|0;h=o;o=0;if(h&1){f=34;break a}break}default:{o=0;la(84,m|0,1,h|0)|0;h=o;o=0;if(h&1){f=34;break a}}}e=e+1|0}do if((f|0)==9){o=0;e=fa(107,20)|0;j=o;o=0;if(!(j&1)){o=0;Xa(140,e|0,m|0);j=o;o=0;if(j&1){k=Fb()|0;cU(e);e=k;break}o=0;Xa(173,b|0,e|0);b=o;o=0;if(!(b&1)){pU(m);l=k;return}}e=Fb()|0}else if((f|0)==18){k=Ab(8)|0;hg(k,61821);o=0;bb(68,k|0,24,58);o=0;f=34}else if((f|0)==21){k=Ab(8)|0;hg(k,61821);o=0;bb(68,k|0,24,58);o=0;f=34}else if((f|0)==26){k=Ab(8)|0;hg(k,61821);o=0;bb(68,k|0,24,58);o=0;f=34}else if((f|0)==30){k=Ab(8)|0;hg(k,61821);o=0;bb(68,k|0,24,58);o=0;f=34}while(0);if((f|0)==34)e=Fb()|0;pU(m);Qb(e|0)}function Mt(a,b){a=a|0;b=b|0;Nh(a,c[b>>2]|0);return a|0}function Nt(){Ot();return}function Ot(){var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;c[14683]=0;c[14684]=0;c[14685]=0;e=Uh(46203)|0;if(e>>>0>4294967279)lU(58732);if(e>>>0<11){a[58743]=e;b=58732}else{g=e+16&-16;b=aU(g)|0;c[14683]=b;c[14685]=g|-2147483648;c[14684]=e}_i(b,46203,e)|0;a[d>>0]=0;ah(b+e|0,d);l=f;return}function Pt(b,c,d){b=b|0;c=c|0;d=d|0;a[b+8>>0]=c&1;a[b+9>>0]=d&1;uU(b+12|0,20);En(b+24|0,9);return}function Qt(a){a=a|0;var b=0,d=0,e=0;wv(a);c[a>>2]=8824;d=a+12|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;b=0;while(1){if((b|0)==3)break;c[d+(b<<2)>>2]=0;b=b+1|0}b=a+24|0;c[b>>2]=0;c[a+28>>2]=0;c[a+32>>2]=0;o=0;bb(102,a|0,0,0);e=o;o=0;if(e&1){e=Fb()|0;pj(b);pU(d);pv(a);Qb(e|0)}else return}function Rt(a){a=a|0;c[a>>2]=9028;pj(a+20|0);pU(a+8|0);pv(a);return}function St(a){a=a|0;Rt(a);cU(a);return}function Tt(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.0,k=0.0,m=0.0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;B=l;l=l+80|0;z=B+64|0;y=B+48|0;g=B+60|0;r=B+56|0;G=B+44|0;F=B+32|0;E=B+28|0;D=B+16|0;C=B+4|0;A=B;_d(g,f);o=0;bb(103,y|0,d|0,g|0);x=o;o=0;if(x&1){G=Fb()|0;Sf(g);g=G}else{Sf(g);g=Xd(f)|0;g=Ok(g,c[(Vt(y,1)|0)>>2]|0)|0;u=Dk(Xd(f)|0)|0;s=d+20|0;t=d+24|0;x=(c[t>>2]|0)-(c[s>>2]|0)>>2;En(s,0);En(s,x);x=d+8|0;v=x+11|0;if((a[v>>0]|0)<0){w=c[x>>2]|0;a[z>>0]=0;ah(w,z);c[d+12>>2]=0;w=g}else{a[z>>0]=0;ah(x,z);a[v>>0]=0;w=g}while(1){_d(r,f);o=0;bb(100,r|0,w|0,s|0);q=o;o=0;if(q&1){p=9;break}Sf(r);g=Wt(s)|0;if((g|0)<0){p=7;break}p=Xt(g)|0;xU(x,1,p)|0;n=c[s>>2]|0;i=(c[t>>2]|0)-n>>2;g=0;h=w;while(1){if((g|0)>=(i|0))break;q=(c[n+(g<<2)>>2]|0)+h|0;g=g+1|0;h=q}q=Ok(Xd(f)|0,h)|0;if(p<<24>>24==42){p=14;break}else w=q}do if((p|0)==7){G=Ab(8)|0;cm(G);Mb(G|0,488,58)}else if((p|0)==9){g=Fb()|0;Sf(r)}else if((p|0)==14){g=a[v>>0]|0;if(g<<24>>24<0)g=c[d+12>>2]|0;else g=g&255;wU(x,g+-1|0,0);i=c[s>>2]|0;h=(c[t>>2]|0)-i>>2;g=0;n=0;while(1){if((g|0)>=(h|0))break;t=(c[i+(g<<2)>>2]|0)+n|0;g=g+1|0;n=t}if((q|0)!=(u|0)?Ui(Xd(f)|0,q)|0:0){g=a[v>>0]|0;if(g<<24>>24<0)g=c[d+12>>2]|0;else g=g&255;if(g>>>0<2){G=Ab(8)|0;cm(G);Mb(G|0,488,58)}Yt(x);g=a[v>>0]|0;if(g<<24>>24<0)g=c[d+12>>2]|0;else g=g&255;wU(x,g+-2|0,0);Zt(G,x);x=c[(Vt(y,1)|0)>>2]|0;m=+((c[(Vt(y,0)|0)>>2]|0)+x|0)*.5;k=+(w|0)+ +(n|0)*.5;o=0;Xa(249,F|0,2);y=o;o=0;if(y&1)g=Fb()|0;else{o=0;g=fa(107,16)|0;y=o;o=0;a:do if(!(y&1)){j=+(e|0);o=0;Pa(43,g|0,+m,+j);e=o;o=0;if(e&1){p=Fb()|0;cU(g);g=p;p=50;break}o=0;Xa(247,z|0,g|0);e=o;o=0;if(!(e&1)){o=0;g=ja(55,F|0,0)|0;e=o;o=0;if(e&1){g=Fb()|0;ut(z);p=50;break}tt(g,z)|0;ut(z);o=0;g=fa(107,16)|0;e=o;o=0;do if(e&1)p=51;else{o=0;Pa(43,g|0,+k,+j);e=o;o=0;if(e&1){E=Fb()|0;cU(g);g=E;break}o=0;Xa(247,z|0,g|0);e=o;o=0;if(e&1){p=51;break}o=0;g=ja(55,F|0,1)|0;e=o;o=0;if(e&1){g=Fb()|0;ut(z);break}tt(g,z)|0;ut(z);o=0;i=fa(107,40)|0;e=o;o=0;if(e&1){g=Fb()|0;break a}o=0;Xa(115,E|0,G|0);e=o;o=0;if(!(e&1)){Pg(D);o=0;Xa(96,C|0,F|0);e=o;o=0;if(e&1){g=Fb()|0;h=1}else{vh(A,4);o=0;c[z>>2]=c[A>>2];hb(47,i|0,E|0,D|0,C|0,z|0);A=o;o=0;do if(A&1)g=1;else{o=0;Xa(124,b|0,i|0);A=o;o=0;if(A&1){g=0;break}Qe(C);Nd(D);Ke(E);Qe(F);Ke(G);l=B;return}while(0);B=Fb()|0;Qe(C);h=g;g=B}Nd(D);Ke(E);if(!h)break a}else g=Fb()|0;cU(i);break a}while(0);if((p|0)==51)g=Fb()|0}else p=47}else p=47;while(0);if((p|0)==47){g=Fb()|0;p=50}Qe(F)}Ke(G);break}G=Ab(8)|0;cm(G);Mb(G|0,488,58)}while(0)}Qb(g|0)}function Ut(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;n=Dk(Xd(d)|0)|0;g=Ok(Xd(d)|0,0)|0;o=b+20|0;j=b+24|0;k=(c[j>>2]|0)-(c[o>>2]|0)>>2;En(o,0);En(o,k);j=(c[j>>2]|0)-(c[o>>2]|0)>>2;k=j+-1|0;l=j+-2|0;m=g;e=0;i=0;while(1){if((m|0)>=(n|0)){b=15;break}if(i^(Ui(Xd(d)|0,m)|0)){f=(c[o>>2]|0)+(e<<2)|0;c[f>>2]=(c[f>>2]|0)+1;f=i;b=g}else{if((e|0)==(k|0)){if((Wt(o)|0)==350){b=8;break}f=c[o>>2]|0;h=c[f+4>>2]|0;g=(c[f>>2]|0)+g|0;b=2;while(1){if((b|0)>=(j|0))break;c[f+(b+-2<<2)>>2]=c[f+(b<<2)>>2];b=b+1|0}c[f+(l<<2)>>2]=0;c[f+(k<<2)>>2]=0;b=g+h|0;g=-1}else{b=g;g=1;f=c[o>>2]|0}e=g+e|0;c[f+(e<<2)>>2]=1;f=i^1}m=m+1|0;g=b;i=f}if((b|0)==8){du(a,g,m);return}else if((b|0)==15){a=Ab(8)|0;cm(a);Mb(a|0,488,58)}} function nm(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;var i=0,j=0.0,k=0,m=0,n=0,p=0,q=0,r=0;p=l;l=l+32|0;q=p+8|0;b=p+4|0;n=p;i=aU(32)|0;o=0;bb(66,i|0,e|0,f|0);m=o;o=0;if(m&1){b=Fb()|0;cU(i)}else{ae(a,i);g[b>>2]=0.0;o=0;bb(75,q|0,e<<1|0,b|0);m=o;o=0;if(m&1)b=Fb()|0;else{k=q+4|0;e=0;a:while(1){if((e|0)>=(f|0)){i=5;break}i=c[q>>2]|0;m=(c[k>>2]|0)-i>>2;j=+(e|0)+.5;b=0;while(1){if((b|0)>=(m|0))break;g[i+(b<<2)>>2]=+(b>>1|0)+.5;g[i+((b|1)<<2)>>2]=j;b=b+2|0}i=jm(h)|0;o=0;Xa(165,i|0,q|0);i=o;o=0;if(i&1){i=17;break}o=0;Xa(128,n|0,d|0);i=o;o=0;if(i&1){i=17;break}o=0;Xa(166,n|0,q|0);i=o;o=0;if(i&1){i=18;break}de(n);b=0;while(1){if((b|0)>=(m|0))break;r=be(d)|0;i=c[q>>2]|0;o=0;i=la(72,r|0,~~+g[i+(b<<2)>>2]|0,~~+g[i+((b|1)<<2)>>2]|0)|0;r=o;o=0;if(r&1){i=22;break a}if(i?(r=be(a)|0,o=0,bb(67,r|0,b>>1|0,e|0),r=o,o=0,r&1):0){i=22;break a}b=b+2|0}e=e+1|0}if((i|0)==5){im(q);l=p;return}else if((i|0)==17)b=Fb()|0;else if((i|0)==18){b=Fb()|0;de(n)}else if((i|0)==22)b=Fb()|0;im(q)}de(a)}Qb(b|0)}function om(a,b,c,d,e,f,g,h,i,j,k,m,n,p,q,r,s,t,u,v){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;m=+m;n=+n;p=+p;q=+q;r=+r;s=+s;t=+t;u=+u;v=+v;var w=0,x=0,y=0;w=l;l=l+16|0;y=w+8|0;x=w+4|0;b=w;Km(y,e,f,g,h,i,j,k,m,n,p,q,r,s,t,u,v);o=0;Xa(128,x|0,c|0);c=o;o=0;if(c&1)b=Fb()|0;else{o=0;Xa(168,b|0,y|0);c=o;o=0;do if(!(c&1)){o=0;hb(50,a|0,0,x|0,d|0,b|0);d=o;o=0;if(d&1){d=Fb()|0;qm(b);b=d;break}else{qm(b);de(x);qm(y);l=w;return}}else b=Fb()|0;while(0);de(x)}qm(y);Qb(b|0)}function pm(a,b){a=a|0;b=b|0;c[a>>2]=0;rm(a,c[b>>2]|0);return}function qm(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function rm(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function sm(){return 61810}function tm(a){a=a|0;c[a>>2]=5696;Sf(a+40|0);de(a+36|0);Wl(a);return}function um(a){a=a|0;tm(a);cU(a);return}function vm(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,m=0,n=0,p=0,q=0,r=0,s=0;m=l;l=l+80|0;d=m+64|0;s=m+52|0;q=m+40|0;i=m+24|0;p=m+36|0;n=m+12|0;j=m;k=b+36|0;if(!(ym(k)|0)){Lf(d,b);e=Vd(d)|0;Sd(d);g=Jd(e)|0;h=$d(e)|0;a:do if((g|0)>39&(h|0)>39){kd[c[(c[e>>2]|0)+12>>2]&511](s,e);e=((g&7|0)!=0&1)+(g>>>3)|0;f=((h&7|0)!=0&1)+(h>>>3)|0;o=0;Xa(83,i|0,s|0);d=o;o=0;do if(d&1)d=Fb()|0;else{o=0;nb(44,q|0,0,i|0,e|0,f|0,g|0,h|0);d=o;o=0;if(d&1){d=Fb()|0;Nd(i);break}Nd(i);o=0;d=fa(107,32)|0;i=o;o=0;do if(!(i&1)){o=0;bb(66,d|0,g|0,h|0);i=o;o=0;if(i&1){p=Fb()|0;cU(d);d=p;break}o=0;Xa(169,p|0,d|0);i=o;o=0;if(!(i&1)){o=0;Xa(83,n|0,s|0);i=o;o=0;if(i&1)d=Fb()|0;else{o=0;Xa(138,j|0,q|0);i=o;o=0;do if(!(i&1)){o=0;pb(43,b|0,n|0,e|0,f|0,g|0,h|0,j|0,p|0);b=o;o=0;if(b&1){d=Fb()|0;ij(j);break}else{ij(j);Nd(n);Pi(k,p)|0;de(p);ij(q);Nd(s);break a}}else d=Fb()|0;while(0);Nd(n)}de(p)}else r=15}else r=15;while(0);if((r|0)==15)d=Fb()|0;ij(q)}while(0);Nd(s);Qb(d|0)}else{Zl(s,b);Pi(k,s)|0;de(s)}while(0);ki(a,k)}else ki(a,k);l=m;return}function wm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;b=l;l=l+16|0;d=b;e=aU(44)|0;o=0;Xa(91,d|0,c|0);c=o;o=0;if(!(c&1)){o=0;Xa(92,e|0,d|0);c=o;o=0;if(!(c&1)){o=0;Xa(90,a|0,e|0);c=o;o=0;if(c&1)a=0;else{Sd(d);l=b;return}}else a=1;b=Fb()|0;Sd(d);if(a)f=7}else{b=Fb()|0;f=7}if((f|0)==7)cU(e);Qb(b|0)}function xm(a,b){a=a|0;b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;Rd(d,b);o=0;Xa(162,a|0,d|0);b=o;o=0;if(b&1){b=Fb()|0;Sd(d)}else{Sd(d);c[a>>2]=5696;b=a+36|0;o=0;Xa(169,b|0,0);d=o;o=0;do if(!(d&1)){o=0;Xa(170,a+40|0,0);d=o;o=0;if(d&1){e=Fb()|0;de(b);b=e;break}else{l=e;return}}else b=Fb()|0;while(0);Wl(a)}Qb(b|0)}function ym(a){a=a|0;return c[a>>2]|0}function zm(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;B=l;l=l+16|0;A=B;fj(b,O(h,g)|0);z=j+-8|0;v=i+-8|0;t=0;a:while(1){if((t|0)>=(h|0)){j=29;break}w=t<<3;w=O((w|0)>(z|0)?z:w,i)|0;x=(t|0)>0;y=O(t,g)|0;u=0;while(1){if((u|0)>=(g|0))break;k=u<<3;k=((k|0)>(v|0)?v:k)+w|0;j=0;m=0;p=255;e=0;while(1){if((j|0)<8){n=0;s=p;p=e}else break;while(1){if((n|0)>=8)break;o=0;e=ja(56,f|0,n+k|0)|0;r=o;o=0;if(r&1){j=19;break a}r=d[e>>0]|0;n=n+1|0;m=(r|0)>(m|0)?r:m;s=(r|0)<(s|0)?r:s;p=r+p|0}b:do if((m-s|0)>24){e=p;c:while(1){r=k+i|0;j=j+1|0;if((j|0)<8)q=0;else{k=r;break b}while(1){if((q|0)>=8){k=r;continue c}n=q+r|0;o=0;k=ja(56,f|0,n|0)|0;p=o;o=0;if(p&1){j=19;break a}p=a[k>>0]|0;o=0;k=ja(56,f|0,n+1|0)|0;n=o;o=0;if(n&1){j=19;break a}q=q+2|0;e=(p&255)+e+(d[k>>0]|0)|0}}}else e=p;while(0);k=k+i|0;j=j+1|0;p=s}e=e>>6;if((m-p|0)<25){e=p>>1;if(x&(u|0)>0){o=0;Xa(138,A|0,b|0);s=o;o=0;if(s&1){j=24;break a}o=0;j=pa(51,A|0,g|0,u|0,t|0)|0;s=o;o=0;if(s&1){j=25;break a}ij(A);e=(p|0)<(j|0)?j:e}}o=0;j=ja(60,b|0,u+y|0)|0;s=o;o=0;if(s&1){j=24;break a}c[j>>2]=e;u=u+1|0}t=t+1|0}if((j|0)==19)e=Fb()|0;else if((j|0)==24)e=Fb()|0;else if((j|0)==25){e=Fb()|0;ij(A)}else if((j|0)==29){l=B;return}ij(b);Qb(e|0)}function Am(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;B=l;l=l+16|0;A=B;z=g+-8|0;n=f+-8|0;p=d+-3|0;q=e+-3|0;g=0;a:while(1){if((g|0)>=(e|0)){a=3;break}a=g<<3;a=(a|0)>(z|0)?z:a;j=0;while(1){if((j|0)>=(d|0))break;r=j<<3;s=(r|0)>(n|0);t=Bm(j,p)|0;u=Bm(g,q)|0;v=t+-2|0;w=t+-1|0;x=t+1|0;y=t+2|0;k=-2;m=0;while(1){if((k|0)==3)break;C=Xe(h,O(k+u|0,d)|0)|0;k=k+1|0;m=(c[C+(v<<2)>>2]|0)+m+(c[C+(w<<2)>>2]|0)+(c[C+(t<<2)>>2]|0)+(c[C+(x<<2)>>2]|0)+(c[C+(y<<2)>>2]|0)|0}Gd(A,b);o=0;nb(45,0,A|0,(s?n:r)|0,a|0,(m|0)/25|0|0,f|0,i|0);C=o;o=0;if(C&1){a=12;break a}Nd(A);j=j+1|0}g=g+1|0}if((a|0)==3){l=B;return}else if((a|0)==12){C=Fb()|0;Nd(A);Qb(C|0)}}function Bm(a,b){a=a|0;b=b|0;return ((a|0)<2?2:(a|0)>(b|0)?b:a)|0}function Cm(a,b,c,e,f,g,h){a=a|0;b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0;a=0;j=(O(g,e)|0)+c|0;while(1){if((a|0)==8)break;k=a+e|0;i=0;while(1){if((i|0)==8)break;if((d[(Od(b,i+j|0)|0)>>0]|0|0)<=(f|0))ce(be(h)|0,i+c|0,k);i=i+1|0}a=a+1|0;j=j+g|0}return}function Dm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=(O(e+-1|0,b)|0)+d|0;g=c[(Xe(a,f)|0)>>2]|0;e=(c[(Xe(a,d+-1+(O(e,b)|0)|0)|0)>>2]<<1)+g|0;return e+(c[(Xe(a,f+-1|0)|0)>>2]|0)>>2|0}function Em(a){a=a|0;bg(a);return}function Fm(a){a=a|0;Em(a);cU(a);return}function Gm(a){a=a|0;fg(a);c[a>>2]=5724;return}function Hm(a,b){a=a|0;b=b|0;ig(a,b);c[a>>2]=5724;return}function Im(a,b,d,e,f,h,i,j,k,l){a=a|0;b=+b;d=+d;e=+e;f=+f;h=+h;i=+i;j=+j;k=+k;l=+l;cf(a);c[a>>2]=5744;g[a+8>>2]=b;g[a+12>>2]=f;g[a+16>>2]=j;g[a+20>>2]=d;g[a+24>>2]=h;g[a+28>>2]=k;g[a+32>>2]=e;g[a+36>>2]=i;g[a+40>>2]=l;return}function Jm(a){a=a|0;ff(a);cU(a);return}function Km(a,b,c,d,e,f,g,h,i,j,k,m,n,p,q,r,s){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;m=+m;n=+n;p=+p;q=+q;r=+r;s=+s;var t=0,u=0,v=0,w=0,x=0,y=0;v=l;l=l+16|0;x=v+8|0;w=v+4|0;u=v;Lm(x,b,c,d,e,f,g,h,i);o=0;Ta(42,w|0,+j,+k,+m,+n,+p,+q,+r,+s);t=o;o=0;if(t&1)t=Fb()|0;else{t=jm(w)|0;o=0;Xa(168,u|0,x|0);y=o;o=0;do if(!(y&1)){o=0;bb(76,a|0,t|0,u|0);y=o;o=0;if(y&1){t=Fb()|0;qm(u);break}else{qm(u);qm(w);qm(x);l=v;return}}else t=Fb()|0;while(0);qm(w)}qm(x);Qb(t|0)}function Lm(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;var j=0,k=0,m=0;k=l;l=l+16|0;j=k;Mm(j,b,c,d,e,f,g,h,i);m=jm(j)|0;o=0;Xa(171,a|0,m|0);a=o;o=0;if(a&1){m=Fb()|0;qm(j);Qb(m|0)}else{qm(j);l=k;return}}function Mm(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;var j=0.0,k=0.0,l=0,m=0.0,n=0.0,o=0.0;j=b-d+f-h;k=c-e+g-i;if(j==0.0&k==0.0){l=aU(44)|0;Im(l,d-b,f-d,b,e-c,g-e,c,0.0,0.0,1.0);Om(a,l)}else{n=d-f;f=h-f;m=e-g;o=i-g;g=n*o-m*f;f=(j*o-f*k)/g;g=(n*k-m*j)/g;l=aU(44)|0;Im(l,d-b+f*d,h-b+g*h,b,e-c+f*e,i-c+g*i,c,f,g,1.0);Om(a,l)}return}function Nm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0.0,f=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0;d=aU(44)|0;q=b+8|0;o=+g[q>>2];o=o*+g[(jm(c)|0)+8>>2];p=b+20|0;n=+g[p>>2];n=o+n*+g[(jm(c)|0)+12>>2];r=b+32|0;o=+g[r>>2];o=n+o*+g[(jm(c)|0)+16>>2];n=+g[q>>2];n=n*+g[(jm(c)|0)+20>>2];m=+g[p>>2];m=n+m*+g[(jm(c)|0)+24>>2];n=+g[r>>2];n=m+n*+g[(jm(c)|0)+28>>2];m=+g[q>>2];m=m*+g[(jm(c)|0)+32>>2];l=+g[p>>2];l=m+l*+g[(jm(c)|0)+36>>2];m=+g[r>>2];m=l+m*+g[(jm(c)|0)+40>>2];r=b+12|0;l=+g[r>>2];l=l*+g[(jm(c)|0)+8>>2];p=b+24|0;k=+g[p>>2];k=l+k*+g[(jm(c)|0)+12>>2];q=b+36|0;l=+g[q>>2];l=k+l*+g[(jm(c)|0)+16>>2];k=+g[r>>2];k=k*+g[(jm(c)|0)+20>>2];j=+g[p>>2];j=k+j*+g[(jm(c)|0)+24>>2];k=+g[q>>2];k=j+k*+g[(jm(c)|0)+28>>2];j=+g[r>>2];j=j*+g[(jm(c)|0)+32>>2];i=+g[p>>2];i=j+i*+g[(jm(c)|0)+36>>2];j=+g[q>>2];j=i+j*+g[(jm(c)|0)+40>>2];q=b+16|0;i=+g[q>>2];i=i*+g[(jm(c)|0)+8>>2];p=b+28|0;h=+g[p>>2];h=i+h*+g[(jm(c)|0)+12>>2];b=b+40|0;i=+g[b>>2];i=h+i*+g[(jm(c)|0)+16>>2];h=+g[q>>2];h=h*+g[(jm(c)|0)+20>>2];e=+g[p>>2];e=h+e*+g[(jm(c)|0)+24>>2];h=+g[b>>2];h=e+h*+g[(jm(c)|0)+28>>2];e=+g[q>>2];e=e*+g[(jm(c)|0)+32>>2];f=+g[p>>2];f=e+f*+g[(jm(c)|0)+36>>2];e=+g[b>>2];Im(d,o,n,m,l,k,j,i,h,f+e*+g[(jm(c)|0)+40>>2]);Om(a,d);return}function Om(a,b){a=a|0;b=b|0;c[a>>2]=0;rm(a,b);return}function Pm(a,b){a=a|0;b=b|0;var c=0,d=0.0,e=0.0,f=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0;c=aU(44)|0;h=+g[b+24>>2];m=+g[b+40>>2];i=+g[b+28>>2];k=+g[b+36>>2];l=+g[b+32>>2];e=+g[b+20>>2];j=+g[b+16>>2];d=+g[b+12>>2];f=+g[b+8>>2];Im(c,h*m-i*k,i*l-m*e,k*e-h*l,k*j-m*d,m*f-l*j,l*d-k*f,i*d-h*j,e*j-i*f,h*f-e*d);Om(a,c);return}function Qm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0;d=c[b>>2]|0;k=(c[b+4>>2]|0)-d>>2;l=a+16|0;m=a+28|0;n=a+40|0;e=a+8|0;f=a+20|0;h=a+32|0;i=a+12|0;j=a+24|0;a=a+36|0;b=0;while(1){if((b|0)>=(k|0))break;s=d+(b<<2)|0;r=+g[s>>2];o=d+((b|1)<<2)|0;q=+g[o>>2];p=+g[n>>2]+(r*+g[l>>2]+q*+g[m>>2]);g[s>>2]=(+g[h>>2]+(r*+g[e>>2]+q*+g[f>>2]))/p;g[o>>2]=(+g[a>>2]+(r*+g[i>>2]+q*+g[j>>2]))/p;b=b+2|0}return}function Rm(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=5760;o=0;Xa(95,a+8|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else return}function Sm(a){a=a|0;c[a>>2]=5760;pU(a+8|0);ff(a);return}function Tm(a){a=a|0;Sm(a);cU(a);return}function Um(a,b){a=a|0;b=b|0;var d=0,e=0;cf(a);c[a>>2]=5760;e=a+8|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;d=0;while(1){if((d|0)==3)break;c[e+(d<<2)>>2]=0;d=d+1|0}o=0;Xa(172,e|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;pU(e);ff(a);Qb(b|0)}else return}function Vm(a){a=a|0;return a+8|0}function Wm(b,d){b=b|0;d=d|0;b=b+8|0;if((a[b+11>>0]|0)<0)b=c[b>>2]|0;return a[b+d>>0]|0}function Xm(b){b=b|0;var d=0;d=a[b+8+11>>0]|0;if(d<<24>>24<0)b=c[b+12>>2]|0;else b=d&255;return b|0}function Ym(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;e=d;f=aU(20)|0;b=b+8|0;o=0;hb(51,e|0,b|0,c|0,-1,b|0);c=o;o=0;if(!(c&1)){o=0;Xa(140,f|0,e|0);c=o;o=0;if(!(c&1)){o=0;Xa(173,a|0,f|0);c=o;o=0;if(c&1)b=0;else{pU(e);l=d;return}}else b=1;a=Fb()|0;pU(e);if(b)g=7}else{a=Fb()|0;g=7}if((g|0)==7)cU(f);Qb(a|0)}function Zm(b,d){b=b|0;d=d|0;var e=0,f=0;e=a[d+11>>0]|0;f=e<<24>>24<0;zU(b+8|0,f?c[d>>2]|0:d,f?c[d+4>>2]|0:e&255)|0;return}function _m(a,b){a=a|0;b=b|0;xU(a+8|0,1,b)|0;return}function $m(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,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;C=l;l=l+16|0;B=C;g=an(f,3628)|0;a:do if((g|0)==(f+4|0)){if(((e|0)>3?(a[d>>0]|0)==-17:0)?(a[d+1>>0]|0)==-69:0)A=(a[d+2>>0]|0)==-65;else A=0;z=0;r=1;s=0;k=0;m=0;w=0;x=0;j=0;y=0;o=0;p=0;q=0;n=0;h=1;t=1;while(1){i=(n|0)>0;u=(y|0)>0;if(!((z|0)<(e|0)&(h|(t|r))))break;v=a[d+z>>0]|0;g=v&255;do if(h){f=(g&128|0)==0;if(i){h=f^1;n=(h<<31>>31)+n|0;break}if(!f)if(g&64){if(!(g&32)){q=q+1|0;n=n+1|0;h=1;break}if(!(g&16)){p=p+1|0;n=n+2|0;h=1;break}else{h=g&8;o=(h>>>3^1)+o|0;n=n+3|0;h=(h|0)==0;break}}else h=0;else h=1}else h=0;while(0);f=v<<24>>24<0;if(f&(v&255)<160|r^1)r=0;else{r=1;s=((v&255)>159&((v&255)<192|(v|32)<<24>>24==-9)&1)+s|0}do if(t){if(u){t=(v+-64&255)<189&v<<24>>24!=127;g=w;i=x;f=(t<<31>>31)+y|0;break}if(!((v&255)>239|(v|32)<<24>>24==-96))if((v+95&255)<63){i=x+1|0;m=(x|0)<(m|0)?m:i;g=0;j=j+1|0;f=y;t=1;break}else{g=w+1|0;k=f?((w|0)<(k|0)?k:g):k;g=f?g:0;i=0;f=((v&255)>>>7&255)+y|0;t=1;break}else{g=w;i=x;f=y;t=0}}else{g=w;i=x;f=y;t=0}while(0);z=z+1|0;w=g;x=i;y=f}f=t&(u^1);do if(h&(i^1)){if(!A?(p+q+o|0)<=0:0)break;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=Uh(44444)|0;if(f>>>0>4294967279)lU(b);if(f>>>0<11)a[b+11>>0]=f;else{d=f+16&-16;e=aU(d)|0;c[b>>2]=e;c[b+8>>2]=d|-2147483648;c[b+4>>2]=f;b=e}_i(b,44444,f)|0;a[B>>0]=0;ah(b+f|0,B);break a}while(0);if(!f){c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;if(r){f=Uh(44466)|0;if(f>>>0>4294967279)lU(b);if(f>>>0<11)a[b+11>>0]=f;else{d=f+16&-16;e=aU(d)|0;c[b>>2]=e;c[b+8>>2]=d|-2147483648;c[b+4>>2]=f;b=e}_i(b,44466,f)|0;a[B>>0]=0;ah(b+f|0,B);break}else{f=Uh(44444)|0;if(f>>>0>4294967279)lU(b);if(f>>>0<11)a[b+11>>0]=f;else{d=f+16&-16;e=aU(d)|0;c[b>>2]=e;c[b+8>>2]=d|-2147483648;c[b+4>>2]=f;b=e}_i(b,44444,f)|0;a[B>>0]=0;ah(b+f|0,B);break}}if((m|0)>2|(k|0)>2){c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=Uh(44456)|0;if(f>>>0>4294967279)lU(b);if(f>>>0<11)a[b+11>>0]=f;else{d=f+16&-16;e=aU(d)|0;c[b>>2]=e;c[b+8>>2]=d|-2147483648;c[b+4>>2]=f;b=e}_i(b,44456,f)|0;a[B>>0]=0;ah(b+f|0,B);break}if(r){f=(j|0)==2&(m|0)==2|(s*10|0)>=(e|0)?44456:44466;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;g=Uh(f)|0;if(g>>>0>4294967279)lU(b);if(g>>>0<11)a[b+11>>0]=g;else{d=g+16&-16;e=aU(d)|0;c[b>>2]=e;c[b+8>>2]=d|-2147483648;c[b+4>>2]=g;b=e}_i(b,f,g)|0;a[B>>0]=0;ah(b+g|0,B);break}else{c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f=Uh(44456)|0;if(f>>>0>4294967279)lU(b);if(f>>>0<11)a[b+11>>0]=f;else{d=f+16&-16;e=aU(d)|0;c[b>>2]=e;c[b+8>>2]=d|-2147483648;c[b+4>>2]=f;b=e}_i(b,44456,f)|0;a[B>>0]=0;ah(b+f|0,B);break}}else nU(b,g+20|0);while(0);l=C;return}function an(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=bn(a,b,c[d>>2]|0,d)|0;if((a|0)!=(d|0)?(c[b>>2]|0)>>>0>=(c[a+16>>2]|0)>>>0:0)d=a;return d|0}function bn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;b=c[b>>2]|0;a=e;a:while(1){while(1){if(!d)break a;if((c[d+16>>2]|0)>>>0>=b>>>0)break;d=c[d+4>>2]|0}a=d;d=c[d>>2]|0}return a|0}function cn(a){a=a|0;return c[a>>2]|0}function dn(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(174,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(175,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;ak(a);Qb(d|0)}while(0);return}function en(a,b){a=a|0;b=b|0;var d=0;if((Wj(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function fn(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{bi(b,0);b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function gn(a,b){a=a|0;b=b|0;hg(a,b);c[a>>2]=5676;return}function hn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;cf(a);c[a>>2]=4996;e=a+8|0;o=0;Xa(128,e|0,b|0);f=o;o=0;if(f&1)b=Fb()|0;else{f=be(b)|0;o=0;f=fa(113,f|0)|0;h=o;o=0;if(!(h&1)?(g=a+12|0,c[g>>2]=f,d=be(b)|0,o=0,d=fa(114,d|0)|0,h=o,o=0,!(h&1)):0){c[a+16>>2]=d;h=c[g>>2]|0;f=h-30>>1;c[a+20>>2]=f;g=30+h>>1;c[a+24>>2]=g;i=d-30>>1;c[a+32>>2]=i;b=d+30>>1;c[a+28>>2]=b;if((i|0)>=0?(b|0)<(d|0)&(f|0)>-1&(g|0)<(h|0):0)return;i=Ab(8)|0;gn(i,44476);o=0;bb(68,i|0,488,58);o=0}b=Fb()|0;de(e)}ff(a);Qb(b|0)}function jn(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;cf(a);c[a>>2]=4996;i=a+8|0;o=0;Xa(128,i|0,b|0);j=o;o=0;if(j&1)b=Fb()|0;else{j=be(b)|0;o=0;j=fa(113,j|0)|0;k=o;o=0;if(!(k&1)?(g=a+12|0,c[g>>2]=j,h=be(b)|0,o=0,h=fa(114,h|0)|0,k=o,o=0,!(k&1)):0){c[a+16>>2]=h;j=d>>1;d=e-j|0;c[a+20>>2]=d;k=j+e|0;c[a+24>>2]=k;e=f-j|0;c[a+32>>2]=e;j=j+f|0;c[a+28>>2]=j;if((e|d|0)>-1&(j|0)<(h|0)?(k|0)<(c[g>>2]|0):0)return;k=Ab(8)|0;gn(k,44476);o=0;bb(68,k|0,488,58);o=0}b=Fb()|0;de(i)}ff(a);Qb(b|0)}function kn(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;u=l;l=l+48|0;C=u+32|0;B=u+28|0;A=u+24|0;z=u+20|0;t=u+8|0;x=u+16|0;w=u+12|0;v=u+4|0;s=u;k=b+12|0;m=b+16|0;n=c[b+20>>2]|0;i=0;d=1;q=c[b+28>>2]|0;p=c[b+32>>2]|0;r=c[b+24>>2]|0;while(1){if(d){d=1;f=0;j=r}else{y=16;break}while(1){e=(j|0)<(c[k>>2]|0);if(!(d&e))break;h=ln(b,p,q,j,0)|0;d=h;f=h?1:f;j=(h&1)+j|0}if(e){e=1;h=q}else break;while(1){d=(h|0)<(c[m>>2]|0);if(!(e&d))break;g=ln(b,n,j,h,1)|0;e=g;h=(g&1)+h|0;f=g?1:f}if(d){d=1;g=n}else break;while(1){if(!(d&(g|0)>-1))break;e=ln(b,p,h,g,0)|0;d=e;g=(e<<31>>31)+g|0;f=e?1:f}if((g|0)<0)break;else{d=1;e=p}while(1){if(!((e|0)>-1&d))break;D=ln(b,g,j,e,1)|0;d=D;e=(D<<31>>31)+e|0;f=D?1:f}if((e|0)<0)break;d=(f&1)!=0;n=g;i=i|d;q=h;p=e;r=j}if((y|0)==16?i:0){f=r-n|0;bi(C,0);d=1;while(1){if((d|0)>=(f|0)){y=27;break}o=0;jb(53,B|0,b|0,n|0,q-d|0,d+n|0,q|0);D=o;o=0;if(D&1){y=23;break}o=0;ja(58,C|0,B|0)|0;D=o;o=0;if(D&1){y=24;break}fi(B);o=0;e=ja(67,C|0,0)|0;D=o;o=0;if(D&1){y=26;break}if(e){y=27;break}else d=d+1|0}do if((y|0)==23){d=Fb()|0;y=25}else if((y|0)==24){d=Fb()|0;fi(B);y=25}else if((y|0)==26)d=Fb()|0;else if((y|0)==27){if(!(on(C,0)|0)){o=0;Xa(116,B|0,0);D=o;o=0;if(!(D&1)){d=1;while(1){if((d|0)>=(f|0)){y=41;break}o=0;jb(53,A|0,b|0,n|0,d+p|0,d+n|0,p|0);D=o;o=0;if(D&1){y=37;break}o=0;ja(58,B|0,A|0)|0;D=o;o=0;if(D&1){y=38;break}fi(A);o=0;e=ja(67,B|0,0)|0;D=o;o=0;if(D&1){y=40;break}if(e){y=41;break}else d=d+1|0}do if((y|0)==37){d=Fb()|0;y=39}else if((y|0)==38){d=Fb()|0;fi(A);y=39}else if((y|0)==40)d=Fb()|0;else if((y|0)==41){if(!(on(B,0)|0)){o=0;Xa(116,A|0,0);D=o;o=0;if(!(D&1)){d=1;while(1){if((d|0)>=(f|0)){y=55;break}o=0;jb(53,z|0,b|0,r|0,d+p|0,r-d|0,p|0);D=o;o=0;if(D&1){y=51;break}o=0;ja(58,A|0,z|0)|0;D=o;o=0;if(D&1){y=52;break}fi(z);o=0;e=ja(67,A|0,0)|0;D=o;o=0;if(D&1){y=54;break}if(e){y=55;break}else d=d+1|0}do if((y|0)==51){d=Fb()|0;y=53}else if((y|0)==52){d=Fb()|0;fi(z);y=53}else if((y|0)==54)d=Fb()|0;else if((y|0)==55){if(!(on(A,0)|0)){o=0;Xa(116,z|0,0);D=o;o=0;if(!(D&1)){d=1;while(1){if((d|0)>=(f|0)){y=69;break}o=0;jb(53,t|0,b|0,r|0,q-d|0,r-d|0,q|0);D=o;o=0;if(D&1){y=65;break}o=0;ja(58,z|0,t|0)|0;D=o;o=0;if(D&1){y=66;break}fi(t);o=0;e=ja(67,z|0,0)|0;D=o;o=0;if(D&1){y=68;break}if(e){y=69;break}else d=d+1|0}do if((y|0)==65){d=Fb()|0;y=67}else if((y|0)==66){d=Fb()|0;fi(t);y=67}else if((y|0)==68)d=Fb()|0;else if((y|0)==69){if(!(on(z,0)|0)){o=0;Xa(117,x|0,z|0);D=o;o=0;if(!(D&1)){o=0;Xa(117,w|0,C|0);D=o;o=0;if(D&1)d=Fb()|0;else{o=0;Xa(117,v|0,A|0);D=o;o=0;if(D&1)d=Fb()|0;else{o=0;Xa(117,s|0,B|0);D=o;o=0;do if(!(D&1)){o=0;jb(54,a|0,b|0,x|0,w|0,v|0,s|0);D=o;o=0;if(D&1){d=Fb()|0;fi(s);break}else{fi(s);fi(v);fi(w);fi(x);fi(z);fi(A);fi(B);fi(C);l=u;return}}else d=Fb()|0;while(0);fi(v)}fi(w)}fi(x);break}}else{D=Ab(8)|0;gn(D,44548);o=0;bb(68,D|0,488,58);o=0}d=Fb()|0}while(0);fi(z);break}}else{D=Ab(8)|0;gn(D,44538);o=0;bb(68,D|0,488,58);o=0}d=Fb()|0}while(0);fi(A);break}}else{D=Ab(8)|0;gn(D,44528);o=0;bb(68,D|0,488,58);o=0}d=Fb()|0}while(0);fi(B);break}}else{D=Ab(8)|0;gn(D,44518);o=0;bb(68,D|0,488,58);o=0}d=Fb()|0}while(0);fi(C);Qb(d|0)}D=Ab(8)|0;gn(D,44558);Mb(D|0,488,58)}function ln(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;a=a+8|0;a:do if(e)while(1){if((b|0)>(c|0)){b=0;break a}if(xj(be(a)|0,b,d)|0){b=1;break}else b=b+1|0}else while(1){if((b|0)>(c|0)){b=0;break a}if(xj(be(a)|0,d,b)|0){b=1;break}else b=b+1|0}while(0);return b|0}function mn(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.0,h=0.0,i=0.0,j=0.0,k=0,m=0,n=0.0;m=l;l=l+16|0;k=m;j=+(c|0);i=+(d|0);g=+(e|0);n=+(f|0);e=Qj(+ii(j,i,g,n))|0;h=+(e|0);g=(g-j)/h;h=(n-i)/h;d=b+8|0;c=0;while(1){if((c|0)>=(e|0)){d=7;break}n=+(c|0);f=Qj(j+g*n)|0;b=Qj(i+h*n)|0;if(xj(be(d)|0,f,b)|0){d=4;break}else c=c+1|0}do if((d|0)==4){c=aU(16)|0;o=0;Pa(42,c|0,+(+(f|0)),+(+(b|0)));k=o;o=0;if(k&1){d=Fb()|0;cU(c);c=d;d=11;break}else{bi(a,c);d=10;break}}else if((d|0)==7){bi(k,0);o=0;Xa(117,a|0,k|0);a=o;o=0;if(a&1){c=Fb()|0;fi(k);d=11;break}else{fi(k);d=10;break}}while(0);if((d|0)==10){l=m;return}else if((d|0)==11)Qb(c|0)}function nn(a,b){a=a|0;b=b|0;return (on(a,b)|0)^1|0}function on(a,b){a=a|0;b=b|0;return (c[a>>2]|0)==(b|0)|0}function pn(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.0,i=0.0,j=0.0,k=0.0,m=0.0,n=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0,y=0.0,z=0,A=0,B=0,C=0.0;z=l;l=l+32|0;x=z+28|0;u=z+24|0;s=z+20|0;q=z+16|0;v=z+12|0;t=z+8|0;r=z+4|0;n=z;B=Pe(d)|0;y=+Lc[c[(c[B>>2]|0)+8>>2]&63](B);d=Pe(d)|0;w=+Lc[c[(c[d>>2]|0)+12>>2]&63](d);d=Pe(e)|0;k=+Lc[c[(c[d>>2]|0)+8>>2]&63](d);e=Pe(e)|0;j=+Lc[c[(c[e>>2]|0)+12>>2]&63](e);e=Pe(f)|0;p=+Lc[c[(c[e>>2]|0)+8>>2]&63](e);f=Pe(f)|0;m=+Lc[c[(c[f>>2]|0)+12>>2]&63](f);f=Pe(g)|0;i=+Lc[c[(c[f>>2]|0)+8>>2]&63](f);g=Pe(g)|0;h=+Lc[c[(c[g>>2]|0)+12>>2]&63](g);dn(a,4);a:do if(y<+(c[b+12>>2]|0)*.5){o=0;d=fa(107,16)|0;B=o;o=0;if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(i-C),+(h+C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,x|0,d|0);B=o;o=0;if(!(B&1)){o=0;d=fa(107,16)|0;B=o;o=0;do if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(k+C),+(j+C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,u|0,d|0);B=o;o=0;if(!(B&1)){o=0;d=fa(107,16)|0;B=o;o=0;do if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(p-C),+(m-C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,s|0,d|0);B=o;o=0;if(!(B&1)){o=0;d=fa(107,16)|0;B=o;o=0;do if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(y+C),+(w-C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,q|0,d|0);B=o;o=0;if(!(B&1)){A=c[a>>2]|0;gi(A,cn(x)|0);A=(c[a>>2]|0)+4|0;gi(A,cn(u)|0);A=(c[a>>2]|0)+8|0;gi(A,cn(s)|0);A=(c[a>>2]|0)+12|0;gi(A,cn(q)|0);fi(q);fi(s);fi(u);fi(x);A=49;break a}else A=21}else A=21;while(0);if((A|0)==21)d=Fb()|0;fi(s)}else A=19}else A=19;while(0);if((A|0)==19)d=Fb()|0;fi(u)}else A=17}else A=17;while(0);if((A|0)==17)d=Fb()|0;fi(x)}else A=15}else A=15}else{o=0;d=fa(107,16)|0;B=o;o=0;if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(i+C),+(h+C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,v|0,d|0);B=o;o=0;if(!(B&1)){o=0;d=fa(107,16)|0;B=o;o=0;do if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(k+C),+(j-C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,t|0,d|0);B=o;o=0;if(!(B&1)){o=0;d=fa(107,16)|0;B=o;o=0;do if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(p-C),+(m+C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,r|0,d|0);B=o;o=0;if(!(B&1)){o=0;d=fa(107,16)|0;B=o;o=0;do if(!(B&1)){C=1.0;o=0;Pa(42,d|0,+(y-C),+(w-C));B=o;o=0;if(B&1){B=Fb()|0;cU(d);d=B;break}o=0;Xa(116,n|0,d|0);B=o;o=0;if(!(B&1)){A=c[a>>2]|0;gi(A,cn(v)|0);A=(c[a>>2]|0)+4|0;gi(A,cn(t)|0);A=(c[a>>2]|0)+8|0;gi(A,cn(r)|0);A=(c[a>>2]|0)+12|0;gi(A,cn(n)|0);fi(n);fi(r);fi(t);fi(v);A=49;break a}else A=44}else A=44;while(0);if((A|0)==44)d=Fb()|0;fi(r)}else A=42}else A=42;while(0);if((A|0)==42)d=Fb()|0;fi(t)}else A=40}else A=40;while(0);if((A|0)==40)d=Fb()|0;fi(v)}else A=15}else A=15}while(0);if((A|0)==15)d=Fb()|0;else if((A|0)==49){l=z;return}ak(a);Qb(d|0)}function qn(){rn();sn();tn();un();vn();wn();xn();yn();return}function rn(){var a=0,b=0;a=aU(56)|0;o=0;db(75,a|0,4201,4096,1);b=o;o=0;if(b&1){b=Fb()|0;cU(a);Qb(b|0)}else{An(58684,a);return}}function sn(){var a=0,b=0;a=aU(56)|0;o=0;db(75,a|0,1033,1024,1);b=o;o=0;if(b&1){b=Fb()|0;cU(a);Qb(b|0)}else{An(58688,a);return}}function tn(){var a=0,b=0;a=aU(56)|0;o=0;db(75,a|0,67,64,1);b=o;o=0;if(b&1){b=Fb()|0;cU(a);Qb(b|0)}else{An(58692,a);return}}function un(){var a=0,b=0;a=aU(56)|0;o=0;db(75,a|0,19,16,1);b=o;o=0;if(b&1){b=Fb()|0;cU(a);Qb(b|0)}else{An(58696,a);return}}function vn(){var a=0,b=0;a=aU(56)|0;o=0;db(75,a|0,285,256,0);b=o;o=0;if(b&1){b=Fb()|0;cU(a);Qb(b|0)}else{An(58700,a);return}}function wn(){var a=0,b=0;a=aU(56)|0;o=0;db(75,a|0,301,256,1);b=o;o=0;if(b&1){b=Fb()|0;cU(a);Qb(b|0)}else{An(58704,a);return}}function xn(){dj(58708,58704);return}function yn(){dj(58712,58692);return}function zn(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;cf(b);c[b>>2]=5780;i=b+8|0;h=b+32|0;c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;c[i+12>>2]=0;c[i+16>>2]=0;c[i+20>>2]=0;o=0;Xa(176,h|0,0);g=o;o=0;if(g&1)d=Fb()|0;else{g=b+36|0;o=0;Xa(176,g|0,0);j=o;o=0;do if(j&1)d=Fb()|0;else{c[b+40>>2]=e;c[b+44>>2]=d;c[b+48>>2]=f;a[b+52>>0]=0;if((e|0)<1?(o=0,Na(326,b|0),j=o,o=0,j&1):0){d=Fb()|0;Dn(g);break}return}while(0);Dn(h)}pj(b+20|0);pj(i);ff(b);Qb(d|0)}function An(a,b){a=a|0;b=b|0;c[a>>2]=0;tj(a,b);return}function Bn(a,b){a=a|0;b=b|0;c[a>>2]=0;Hn(a,b);return}function Cn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0;q=l;l=l+64|0;n=q+48|0;m=q+36|0;k=q+24|0;r=q+12|0;p=q;h=b+8|0;i=b+40|0;En(h,c[i>>2]|0);j=b+20|0;En(j,c[i>>2]|0);g=b+44|0;f=0;e=1;d=c[i>>2]|0;while(1){if((f|0)>=(d|0))break;c[(c[h>>2]|0)+(f<<2)>>2]=e;e=e<<1;d=c[i>>2]|0;if((e|0)>=(d|0))e=(c[g>>2]^e)&d+-1;f=f+1|0}e=0;while(1){if((e|0)>=(d+-1|0))break;c[(c[j>>2]|0)+(c[(c[h>>2]|0)+(e<<2)>>2]<<2)>>2]=e;e=e+1|0;d=c[i>>2]|0}f=aU(24)|0;o=0;d=fa(107,20)|0;j=o;o=0;a:do if(!(j&1)){o=0;Xa(141,d|0,1);j=o;o=0;if(j&1){s=Fb()|0;cU(d);d=s;s=25;break}o=0;Xa(177,m|0,d|0);j=o;o=0;if(!(j&1)){o=0;bb(77,f|0,b|0,m|0);j=o;o=0;if(!(j&1)){o=0;Xa(176,n|0,f|0);j=o;o=0;if(j&1)e=0;else{d=b+32|0;Fn(d,n)|0;Dn(n);ij(m);bo(k,Gn(d)|0);o=0;d=ja(60,k|0,0)|0;m=o;o=0;if(m&1){d=Fb()|0;ij(k);break}c[d>>2]=0;ij(k);f=aU(24)|0;o=0;d=fa(107,20)|0;m=o;o=0;do if(!(m&1)){o=0;Xa(141,d|0,1);m=o;o=0;if(m&1){s=Fb()|0;cU(d);d=s;s=31;break}o=0;Xa(177,r|0,d|0);m=o;o=0;if(!(m&1)){o=0;bb(77,f|0,b|0,r|0);m=o;o=0;if(!(m&1)){o=0;Xa(176,n|0,f|0);m=o;o=0;if(!(m&1)){d=b+36|0;Fn(d,n)|0;Dn(n);ij(r);bo(p,Gn(d)|0);o=0;d=ja(60,p|0,0)|0;r=o;o=0;if(r&1){d=Fb()|0;ij(p);break a}else{c[d>>2]=1;ij(p);a[b+52>>0]=1;l=q;return}}else e=0}else e=1;d=Fb()|0;ij(r);if(e)s=31}else s=28}else s=28;while(0);if((s|0)==28){d=Fb()|0;s=31}if((s|0)==31)cU(f);break}}else e=1;d=Fb()|0;ij(m);if(e)s=25;else s=26}else s=22}else s=22;while(0);if((s|0)==22){d=Fb()|0;s=25}if((s|0)==25){cU(f);s=26}Qb(d|0)}function Dn(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function En(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=a+4|0;d=c[g>>2]|0;f=c[a>>2]|0;e=d-f>>2;a:do if(e>>>0>=b>>>0){if(e>>>0>b>>>0){a=f+(b<<2)|0;while(1){if((d|0)==(a|0))break a;f=d+-4|0;c[g>>2]=f;d=f}}}else In(a,b-e|0);while(0);return}function Fn(a,b){a=a|0;b=b|0;Hn(a,c[b>>2]|0);return a|0}function Gn(a){a=a|0;return c[a>>2]|0}function Hn(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function In(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;i=l;l=l+32|0;f=i;g=a+8|0;h=a+4|0;d=c[h>>2]|0;do if((c[g>>2]|0)-d>>2>>>0>>0){d=(d-(c[a>>2]|0)>>2)+b|0;e=qj(a)|0;if(e>>>0>>0)wS(a);j=c[a>>2]|0;k=(c[g>>2]|0)-j|0;g=k>>1;Kn(f,k>>2>>>0>>1>>>0?(g>>>0>>0?d:g):e,(c[h>>2]|0)-j>>2,a+8|0);o=0;Xa(178,f|0,b|0);h=o;o=0;if(!(h&1)?(o=0,Xa(179,a|0,f|0),k=o,o=0,!(k&1)):0){Nn(f);break}k=Fb()|0;Nn(f);Qb(k|0)}else Jn(a,b);while(0);l=i;return}function Jn(a,b){a=a|0;b=b|0;var d=0;a=a+4|0;d=c[a>>2]|0;yW(d|0,0,b<<2|0)|0;c[a>>2]=d+(b<<2);return}function Kn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function Ln(a,b){a=a|0;b=b|0;var d=0;a=a+8|0;d=c[a>>2]|0;yW(d|0,0,b<<2|0)|0;c[a>>2]=d+(b<<2);return}function Mn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;h=a+4|0;g=b+4|0;f=(c[h>>2]|0)-e|0;d=(c[g>>2]|0)+(0-(f>>2)<<2)|0;c[g>>2]=d;if((f|0)>0){wW(d|0,e|0,f|0)|0;e=g;d=c[g>>2]|0}else e=g;g=c[a>>2]|0;c[a>>2]=d;c[e>>2]=g;g=b+8|0;f=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=f;g=a+8|0;h=b+12|0;a=c[g>>2]|0;c[g>>2]=c[h>>2];c[h>>2]=a;c[b>>2]=c[e>>2];return}function Nn(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+4>>2]|0;d=a+8|0;e=c[d>>2]|0;while(1){if((e|0)==(b|0))break;f=e+-4|0;c[d>>2]=f;e=f}a=c[a>>2]|0;if(a|0)cU(a);return}function On(a){a=a|0;c[a>>2]=5780;Dn(a+36|0);Dn(a+32|0);pj(a+20|0);pj(a+8|0);ff(a);return}function Pn(a){a=a|0;On(a);cU(a);return}function Qn(b){b=b|0;if(!(a[b+52>>0]|0))Cn(b);return}function Rn(a,b){a=a|0;b=b|0;Qn(b);Sn(a,b+32|0);return}function Sn(a,b){a=a|0;b=b|0;c[a>>2]=0;Hn(a,c[b>>2]|0);return}function Tn(a,b){a=a|0;b=b|0;Qn(b);Sn(a,b+36|0);return}function Un(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;g=l;l=l+32|0;j=g+12|0;h=g;Qn(b);a:do if((d|0)<0){f=Ab(8)|0;o=0;Xa(102,f|0,44608);k=o;o=0;if(k&1){k=Fb()|0;Jb(f|0);f=k;break}else Mb(f|0,632,117)}else{b:do if(!e)Sn(a,b+32|0);else{f=aU(20)|0;o=0;Xa(141,f|0,d+1|0);d=o;o=0;if(d&1){k=Fb()|0;cU(f);f=k;break a}ek(j,f);o=0;f=ja(60,j|0,0)|0;d=o;o=0;do if(!(d&1)?(c[f>>2]=e,o=0,i=fa(107,24)|0,e=o,o=0,!(e&1)):0){o=0;Xa(138,h|0,j|0);e=o;o=0;if(!(e&1)){o=0;bb(77,i|0,b|0,h|0);e=o;o=0;if(!(e&1)){o=0;Xa(176,a|0,i|0);e=o;o=0;if(e&1)d=0;else{ij(h);ij(j);break b}}else d=1;f=Fb()|0;ij(h);if(!d)break}else f=Fb()|0;cU(i)}else k=15;while(0);if((k|0)==15)f=Fb()|0;ij(j);break a}while(0);l=g;return}while(0);Qb(f|0)}function Vn(a,b){a=a|0;b=b|0;return b^a|0}function Wn(a,b){a=a|0;b=b|0;Qn(a);return c[(c[a+8>>2]|0)+(b<<2)>>2]|0}function Xn(a,b){a=a|0;b=b|0;Qn(a);if(b|0)return c[(c[a+20>>2]|0)+(b<<2)>>2]|0;a=Ab(8)|0;o=0;Xa(102,a|0,44636);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else Mb(a|0,632,117);return 0}function Yn(a,b){a=a|0;b=b|0;Qn(a);if(b|0)return c[(c[a+8>>2]|0)+((c[a+40>>2]|0)+-1-(c[(c[a+20>>2]|0)+(b<<2)>>2]|0)<<2)>>2]|0;a=Ab(8)|0;o=0;Xa(102,a|0,44655);b=o;o=0;if(b&1){b=Fb()|0;Jb(a|0);Qb(b|0)}else Mb(a|0,632,117);return 0}function Zn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;Qn(a);if((b|0)==0|(d|0)==0)a=0;else{e=c[a+20>>2]|0;a=c[(c[a+8>>2]|0)+((((c[e+(d<<2)>>2]|0)+(c[e+(b<<2)>>2]|0)|0)%((c[a+40>>2]|0)+-1|0)|0)<<2)>>2]|0}return a|0}function _n(a){a=a|0;return c[a+40>>2]|0}function $n(a){a=a|0;return c[a+48>>2]|0}function ao(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,m=0,n=0;k=l;l=l+16|0;g=k+4|0;h=k;cf(a);c[a>>2]=5796;c[a+8>>2]=b;m=a+12|0;Uk(m);a:do if(!(Gk(Fk(d)|0)|0)){e=Ab(8)|0;o=0;Xa(102,e|0,44689);k=o;o=0;if(k&1){k=Fb()|0;Jb(e|0);e=k;break}else{o=0;bb(68,e|0,632,117);o=0;e=Fb()|0;break}}else{f=Gk(Fk(d)|0)|0;b:do if((f|0)>1){o=0;e=ja(60,d|0,0)|0;j=o;o=0;if(!(j&1))if(!(c[e>>2]|0)){j=1;while(1){if((f|0)<=(j|0))break;o=0;e=ja(60,d|0,j|0)|0;n=o;o=0;if(n&1){i=13;break}if(c[e>>2]|0)break;j=j+1|0}if((i|0)==13){e=Fb()|0;break a}if((f|0)==(j|0)){o=0;Xa(180,h|0,b|0);n=o;o=0;if(n&1)e=Fb()|0;else{n=Gn(h)|0;o=0;Xa(181,g|0,n|0);n=o;o=0;do if(!(n&1)){o=0;ja(61,m|0,g|0)|0;n=o;o=0;if(n&1){e=Fb()|0;ij(g);break}else{ij(g);Dn(h);i=39;break b}}else e=Fb()|0;while(0);Dn(h)}break a}o=0;e=fa(107,20)|0;n=o;o=0;do if(!(n&1)){o=0;Xa(141,e|0,f-j|0);n=o;o=0;if(n&1){n=Fb()|0;cU(e);e=n;break}o=0;Xa(177,g|0,e|0);n=o;o=0;if(!(n&1)){o=0;ja(61,m|0,g|0)|0;n=o;o=0;if(n&1){e=Fb()|0;ij(g);break}ij(g);f=0;while(1){if((f|0)>=(Gk(Fk(m)|0)|0)){i=39;break b}o=0;e=ja(60,d|0,f+j|0)|0;n=o;o=0;if(n&1)break;e=c[e>>2]|0;o=0;b=ja(60,m|0,f|0)|0;n=o;o=0;if(n&1)break;c[b>>2]=e;f=f+1|0}e=Fb()|0;break a}else i=30}else i=30;while(0);if((i|0)==30)e=Fb()|0;break a}else i=38;else i=12}else i=38;while(0);if((i|0)==38){o=0;ja(61,m|0,d|0)|0;n=o;o=0;if(n&1)i=12;else i=39}if((i|0)==12){e=Fb()|0;break}else if((i|0)==39){l=k;return}}while(0);ij(m);ff(a);Qb(e|0)}function bo(a,b){a=a|0;b=b|0;hj(a,b+12|0);return}function co(a){a=a|0;c[a>>2]=5796;ij(a+12|0);ff(a);return}function eo(a){a=a|0;co(a);cU(a);return}function fo(a){a=a|0;return (Gk(Fk(a+12|0)|0)|0)+-1|0}function go(a){a=a|0;return (c[(Xe(a+12|0,0)|0)>>2]|0)==0|0}function ho(a,b){a=a|0;b=b|0;a=a+12|0;return c[(Xe(a,(Gk(Fk(a)|0)|0)+~b|0)|0)>>2]|0}function io(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;a:do if(!b)a=ho(a,0)|0;else{f=a+12|0;g=Gk(Fk(f)|0)|0;if((b|0)==1){d=0;a=0;while(1){if((d|0)>=(g|0))break a;b=Vn(a,c[(Xe(f,d)|0)>>2]|0)|0;d=d+1|0;a=b}}e=a+8|0;d=1;a=c[(Xe(f,0)|0)>>2]|0;while(1){if((d|0)>=(g|0))break a;h=Zn(c[e>>2]|0,b,a)|0;h=Vn(h,c[(Xe(f,d)|0)>>2]|0)|0;d=d+1|0;a=h}}while(0);return a|0}function jo(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,m=0,n=0;j=l;l=l+64|0;n=j+48|0;m=j+36|0;e=j+24|0;k=j+12|0;i=j;h=b+8|0;f=c[h>>2]|0;a:do if((f|0)!=(c[(Gn(d)|0)+8>>2]|0)){b=Ab(8)|0;o=0;Xa(102,b|0,44731);n=o;o=0;if(n&1){n=Fb()|0;Jb(b|0);b=n;break}else Mb(b|0,632,117)}else{b:do if(go(b)|0)Sn(a,d);else{if(go(Gn(d)|0)|0){Bn(a,b);break}hj(n,b+12|0);f=Gn(d)|0;o=0;Xa(181,m|0,f|0);f=o;o=0;if(f&1)b=Fb()|0;else{f=Gk(Fk(n)|0)|0;do if((f|0)>(Gk(Fk(m)|0)|0)){o=0;Xa(138,e|0,n|0);f=o;o=0;if(f&1)g=16;else{o=0;ja(61,n|0,m|0)|0;f=o;o=0;if(!(f&1)?(o=0,ja(61,m|0,e|0)|0,f=o,o=0,!(f&1)):0){ij(e);g=18;break}b=Fb()|0;ij(e)}}else g=18;while(0);do if((g|0)==18){o=0;b=fa(107,20)|0;f=o;o=0;if(!(f&1)){f=Gk(Fk(m)|0)|0;o=0;Xa(141,b|0,f|0);f=o;o=0;if(f&1){k=Fb()|0;cU(b);b=k;break}o=0;Xa(177,k|0,b|0);g=o;o=0;if(!(g&1)){f=Gk(Fk(m)|0)|0;f=f-(Gk(Fk(n)|0)|0)|0;e=0;while(1){if((e|0)>=(f|0)){e=f;g=28;break}o=0;b=ja(60,m|0,e|0)|0;g=o;o=0;if(g&1){g=27;break}b=c[b>>2]|0;o=0;d=ja(60,k|0,e|0)|0;g=o;o=0;if(g&1){g=27;break}c[d>>2]=b;e=e+1|0}do if((g|0)==27)b=Fb()|0;else if((g|0)==28){while(1){g=0;if((e|0)>=(Gk(Fk(m)|0)|0))break;o=0;b=ja(60,n|0,e-f|0)|0;g=o;o=0;if(g&1){g=30;break}b=c[b>>2]|0;o=0;d=ja(60,m|0,e|0)|0;g=o;o=0;if(g&1){g=30;break}o=0;b=ja(68,b|0,c[d>>2]|0)|0;g=o;o=0;if(g&1){g=30;break}o=0;d=ja(60,k|0,e|0)|0;g=o;o=0;if(g&1){g=30;break}c[d>>2]=b;e=e+1|0;g=28}if((g|0)==30){b=Fb()|0;break}o=0;d=fa(107,24)|0;f=o;o=0;if(f&1){b=Fb()|0;break}b=c[h>>2]|0;o=0;Xa(138,i|0,k|0);h=o;o=0;do if(!(h&1)){o=0;bb(77,d|0,b|0,i|0);h=o;o=0;if(h&1){b=Fb()|0;ij(i);break}else{Bn(a,d);ij(i);ij(k);ij(m);ij(n);break b}}else b=Fb()|0;while(0);cU(d)}while(0);ij(k)}else g=16}else g=16}while(0);if((g|0)==16)b=Fb()|0;ij(m)}ij(n);break a}while(0);l=j;return}while(0);Qb(b|0)}function ko(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0;p=l;l=l+48|0;s=p+36|0;r=p+24|0;q=p+12|0;n=p;m=b+8|0;k=c[m>>2]|0;a:do if((k|0)!=(c[(Gn(d)|0)+8>>2]|0)){b=Ab(8)|0;o=0;Xa(102,b|0,44731);s=o;o=0;if(s&1){s=Fb()|0;Jb(b|0);b=s;break}else Mb(b|0,632,117)}else{b:do if(!(go(b)|0)?!(go(Gn(d)|0)|0):0){hj(s,b+12|0);k=Gk(Fk(s)|0)|0;j=Gn(d)|0;o=0;Xa(181,r|0,j|0);j=o;o=0;if(j&1)b=Fb()|0;else{j=Gk(Fk(r)|0)|0;o=0;b=fa(107,20)|0;i=o;o=0;do if(!(i&1)){o=0;Xa(141,b|0,k+-1+j|0);i=o;o=0;if(i&1){q=Fb()|0;cU(b);b=q;break}o=0;Xa(177,q|0,b|0);i=o;o=0;if(!(i&1)){i=0;c:while(1){if((i|0)>=(k|0)){e=13;break}o=0;b=ja(60,s|0,i|0)|0;h=o;o=0;if(h&1){e=27;break}h=c[b>>2]|0;g=0;while(1){if((g|0)>=(j|0))break;f=g+i|0;o=0;b=ja(60,q|0,f|0)|0;e=o;o=0;if(e&1){e=27;break c}e=c[b>>2]|0;b=c[m>>2]|0;o=0;d=ja(60,r|0,g|0)|0;t=o;o=0;if(t&1){e=27;break c}o=0;b=la(77,b|0,h|0,c[d>>2]|0)|0;t=o;o=0;if(t&1){e=27;break c}o=0;d=ja(68,e|0,b|0)|0;t=o;o=0;if(t&1){e=27;break c}o=0;b=ja(60,q|0,f|0)|0;t=o;o=0;if(t&1){e=27;break c}c[b>>2]=d;g=g+1|0}i=i+1|0}do if((e|0)==13){o=0;d=fa(107,24)|0;t=o;o=0;if(t&1){b=Fb()|0;break}b=c[m>>2]|0;o=0;Xa(138,n|0,q|0);t=o;o=0;do if(!(t&1)){o=0;bb(77,d|0,b|0,n|0);t=o;o=0;if(t&1){b=Fb()|0;ij(n);break}else{Bn(a,d);ij(n);ij(q);ij(r);ij(s);break b}}else b=Fb()|0;while(0);cU(d)}else if((e|0)==27)b=Fb()|0;while(0);ij(q)}else e=15}else e=15;while(0);if((e|0)==15)b=Fb()|0;ij(r)}ij(s);break a}else e=7;while(0);if((e|0)==7)Rn(a,c[m>>2]|0);l=p;return}while(0);Qb(b|0)}function lo(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,m=0,n=0;k=l;l=l+32|0;m=k+12|0;j=k;i=b+8|0;a:do switch(d|0){case 0:{Rn(a,c[i>>2]|0);break}case 1:{Bn(a,b);break}default:{g=b+12|0;h=Gk(Fk(g)|0)|0;b=aU(20)|0;o=0;Xa(141,b|0,h|0);f=o;o=0;if(f&1){m=Fb()|0;cU(b);b=m}else{ek(m,b);f=0;while(1){if((f|0)>=(h|0)){e=7;break}b=c[i>>2]|0;o=0;e=ja(60,g|0,f|0)|0;n=o;o=0;if(n&1){e=13;break}o=0;b=la(77,b|0,c[e>>2]|0,d|0)|0;n=o;o=0;if(n&1){e=13;break}o=0;e=ja(60,m|0,f|0)|0;n=o;o=0;if(n&1){e=13;break}c[e>>2]=b;f=f+1|0}do if((e|0)==7){o=0;e=fa(107,24)|0;n=o;o=0;if(n&1){b=Fb()|0;break}b=c[i>>2]|0;o=0;Xa(138,j|0,m|0);n=o;o=0;do if(!(n&1)){o=0;bb(77,e|0,b|0,j|0);n=o;o=0;if(n&1){b=Fb()|0;ij(j);break}else{Bn(a,e);ij(j);ij(m);break a}}else b=Fb()|0;while(0);cU(e)}else if((e|0)==13)b=Fb()|0;while(0);ij(m)}Qb(b|0)}}while(0);l=k;return}function mo(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,m=0,n=0;k=l;l=l+32|0;m=k+12|0;j=k;a:do if((d|0)<0){b=Ab(8)|0;o=0;Xa(102,b|0,44779);m=o;o=0;if(m&1){m=Fb()|0;Jb(b|0);b=m;break}else Mb(b|0,632,117)}else{i=b+8|0;b:do if(!e)Rn(a,c[i>>2]|0);else{g=b+12|0;h=Gk(Fk(g)|0)|0;b=aU(20)|0;o=0;Xa(141,b|0,h+d|0);f=o;o=0;if(f&1){m=Fb()|0;cU(b);b=m;break a}ek(m,b);f=0;while(1){if((f|0)>=(h|0)){d=10;break}b=c[i>>2]|0;o=0;d=ja(60,g|0,f|0)|0;n=o;o=0;if(n&1){d=16;break}o=0;b=la(77,b|0,c[d>>2]|0,e|0)|0;n=o;o=0;if(n&1){d=16;break}o=0;d=ja(60,m|0,f|0)|0;n=o;o=0;if(n&1){d=16;break}c[d>>2]=b;f=f+1|0}do if((d|0)==10){o=0;d=fa(107,24)|0;n=o;o=0;if(n&1){b=Fb()|0;break}b=c[i>>2]|0;o=0;Xa(138,j|0,m|0);n=o;o=0;do if(!(n&1)){o=0;bb(77,d|0,b|0,j|0);n=o;o=0;if(n&1){b=Fb()|0;ij(j);break}else{Bn(a,d);ij(j);ij(m);break b}}else b=Fb()|0;while(0);cU(d)}else if((d|0)==16)b=Fb()|0;while(0);ij(m);break a}while(0);l=k;return}while(0);Qb(b|0)}function no(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(182,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(183,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;qo(a);Qb(d|0)}while(0);return}function oo(a,b){a=a|0;b=b|0;var d=0;if((ro(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function po(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{Bn(b,0);b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function qo(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;Dn(e)}cU(c[a>>2]|0)}return}function ro(a){a=a|0;return 1073741823}function so(a,b){a=a|0;b=b|0;dj(a,b);return}function to(a){a=a|0;gj(a);return}function uo(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;s=l;l=l+128|0;A=s+112|0;g=s+88|0;z=s+100|0;x=s+84|0;q=s+60|0;w=s+72|0;n=s+36|0;j=s+32|0;u=s+56|0;v=s+52|0;t=s+40|0;k=s+16|0;r=s+20|0;p=s+12|0;m=s;h=aU(24)|0;e=vo(a)|0;o=0;Xa(138,g|0,b|0);i=o;o=0;do if(!(i&1)){o=0;bb(77,h|0,e|0,g|0);i=o;o=0;if(!(i&1)){o=0;Xa(176,A|0,h|0);i=o;o=0;if(i&1)f=0;else{ij(g);o=0;Xa(135,z|0,d|0);i=o;o=0;if(i&1)e=Fb()|0;else{h=0;i=1;while(1){if((h|0)>=(d|0)){y=6;break}g=Gn(A)|0;e=wo(a)|0;f=wo(a)|0;o=0;f=fa(118,f|0)|0;y=o;o=0;if(y&1){y=16;break}o=0;e=ja(69,e|0,f+h|0)|0;y=o;o=0;if(y&1){y=16;break}o=0;e=ja(70,g|0,e|0)|0;y=o;o=0;if(y&1){y=16;break}f=(Gk(Fk(z)|0)|0)+~h|0;o=0;f=ja(60,z|0,f|0)|0;y=o;o=0;if(y&1){y=16;break}c[f>>2]=e;h=h+1|0;i=i&(e|0)==0}a:do if((y|0)==6){b:do if(!i){o=0;g=fa(107,24)|0;i=o;o=0;if(i&1){e=Fb()|0;break a}e=vo(a)|0;o=0;Xa(138,q|0,z|0);i=o;o=0;if(!(i&1)){o=0;bb(77,g|0,e|0,q|0);i=o;o=0;if(!(i&1)){o=0;Xa(176,x|0,g|0);i=o;o=0;if(i&1)f=0;else{ij(q);q=wo(a)|0;o=0;db(76,n|0,q|0,d|0,1);q=o;o=0;do if(q&1)e=Fb()|0;else{Sn(j,x);o=0;hb(52,w|0,a|0,n|0,j|0,d|0);q=o;o=0;if(q&1){e=Fb()|0;Dn(j);Dn(n);break}Dn(j);Dn(n);Sn(u,c[w>>2]|0);Sn(v,(c[w>>2]|0)+4|0);Sn(k,u);o=0;bb(78,t|0,a|0,k|0);q=o;o=0;if(q&1){e=Fb()|0;Dn(k)}else{Dn(k);Sn(p,v);o=0;Xa(138,m|0,t|0);q=o;o=0;do if(q&1){e=Fb()|0;y=38}else{o=0;db(77,r|0,a|0,p|0,m|0);q=o;o=0;if(q&1){e=Fb()|0;ij(m);y=38;break}ij(m);Dn(p);h=0;while(1){if((h|0)>=(Gk(Fk(t)|0)|0)){y=28;break}g=(Gk(Fk(b)|0)|0)+-1|0;e=wo(a)|0;o=0;f=ja(60,t|0,h|0)|0;q=o;o=0;if(q&1)break;o=0;e=ja(71,e|0,c[f>>2]|0)|0;q=o;o=0;if(q&1)break;g=g-e|0;if((g|0)<0){y=42;break}o=0;e=ja(60,b|0,g|0)|0;q=o;o=0;if(q&1)break;e=c[e>>2]|0;o=0;f=ja(60,r|0,h|0)|0;q=o;o=0;if(q&1)break;o=0;f=ja(68,e|0,c[f>>2]|0)|0;q=o;o=0;if(q&1)break;o=0;e=ja(60,b|0,g|0)|0;q=o;o=0;if(q&1)break;c[e>>2]=f;h=h+1|0}if((y|0)==28){ij(r);ij(t);Dn(v);Dn(u);qo(w);Dn(x);break b}else if((y|0)==42){s=Ab(8)|0;Eo(s,44810);o=0;bb(68,s|0,728,127);o=0}e=Fb()|0;ij(r)}while(0);if((y|0)==38)Dn(p);ij(t)}Dn(v);Dn(u);qo(w)}while(0);Dn(x);break a}}else f=1;e=Fb()|0;ij(q);if(!f)break a}else e=Fb()|0;cU(g);break a}while(0);ij(z);Dn(A);l=s;return}else if((y|0)==16)e=Fb()|0;while(0);ij(z)}Dn(A);break}}else f=1;e=Fb()|0;ij(g);if(f)y=9}else{e=Fb()|0;y=9}while(0);if((y|0)==9)cU(h);Qb(e|0)}function vo(a){a=a|0;return c[a>>2]|0}function wo(a){a=a|0;return c[a>>2]|0}function xo(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;r=l;l=l+64|0;x=r+48|0;y=r+44|0;w=r+40|0;v=r+36|0;u=r+32|0;t=r+28|0;s=r+24|0;j=r+16|0;k=r+20|0;m=r+12|0;n=r+8|0;q=r+4|0;p=r;i=fo(Gn(d)|0)|0;if((i|0)<(fo(Gn(e)|0)|0)){Sn(x,d);Fn(d,e)|0;Fn(e,x)|0;Dn(x)}Sn(x,d);Sn(y,e);i=wo(b)|0;o=0;Xa(180,w|0,i|0);i=o;o=0;if(i&1)d=Fb()|0;else{i=wo(b)|0;o=0;Xa(184,v|0,i|0);i=o;o=0;if(i&1)d=Fb()|0;else{i=(f|0)/2|0;a:while(1){d=Gn(y)|0;o=0;d=fa(119,d|0)|0;h=o;o=0;if(h&1){e=13;break}if((d|0)<(i|0)){e=56;break}Sn(u,x);Sn(t,w);Fn(x,y)|0;Fn(w,v)|0;d=Gn(x)|0;o=0;d=fa(120,d|0)|0;h=o;o=0;if(h&1){e=14;break}if(d){e=10;break}Fn(y,u)|0;h=wo(b)|0;o=0;Xa(180,s|0,h|0);h=o;o=0;if(h&1){e=14;break}d=Gn(x)|0;e=Gn(x)|0;o=0;e=fa(119,e|0)|0;h=o;o=0;if(h&1){e=34;break}o=0;d=ja(72,d|0,e|0)|0;h=o;o=0;if(h&1){e=34;break}h=wo(b)|0;o=0;h=ja(73,h|0,d|0)|0;g=o;o=0;if(g&1){e=35;break}while(1){d=Gn(y)|0;o=0;d=fa(119,d|0)|0;g=o;o=0;if(g&1){e=36;break a}e=Gn(x)|0;o=0;e=fa(119,e|0)|0;g=o;o=0;if(g&1){e=36;break a}if((d|0)<(e|0))break;d=Gn(y)|0;o=0;d=fa(120,d|0)|0;g=o;o=0;if(g&1){e=36;break a}if(d)break;d=Gn(y)|0;o=0;d=fa(119,d|0)|0;g=o;o=0;if(g&1){e=36;break a}e=Gn(x)|0;o=0;e=fa(119,e|0)|0;g=o;o=0;if(g&1){e=36;break a}g=d-e|0;f=wo(b)|0;d=Gn(y)|0;e=Gn(y)|0;o=0;e=fa(119,e|0)|0;z=o;o=0;if(z&1){e=37;break a}o=0;d=ja(72,d|0,e|0)|0;z=o;o=0;if(z&1){e=37;break a}o=0;e=la(77,f|0,d|0,h|0)|0;z=o;o=0;if(z&1){e=37;break a}d=Gn(s)|0;z=wo(b)|0;o=0;db(76,k|0,z|0,g|0,e|0);z=o;o=0;if(z&1){e=38;break a}o=0;bb(79,j|0,d|0,k|0);z=o;o=0;if(z&1){e=39;break a}Fn(s,j)|0;Dn(j);Dn(k);d=Gn(y)|0;z=Gn(x)|0;o=0;db(78,m|0,z|0,g|0,e|0);z=o;o=0;if(z&1){e=41;break a}o=0;bb(79,j|0,d|0,m|0);z=o;o=0;if(z&1){e=42;break a}Fn(y,j)|0;Dn(j);Dn(m)}z=Gn(s)|0;Sn(q,w);o=0;bb(80,n|0,z|0,q|0);z=o;o=0;if(z&1){e=50;break}z=Gn(n)|0;Sn(p,t);o=0;bb(79,j|0,z|0,p|0);z=o;o=0;if(z&1){e=51;break}Fn(v,j)|0;Dn(j);Dn(p);Dn(n);Dn(q);d=Gn(y)|0;o=0;d=fa(119,d|0)|0;z=o;o=0;if(z&1){e=36;break}e=Gn(x)|0;o=0;e=fa(119,e|0)|0;z=o;o=0;if(z&1){e=36;break}if((d|0)>=(e|0)){e=49;break}Dn(s);Dn(t);Dn(u)}switch(e|0){case 10:{z=Ab(8)|0;Eo(z,44881);o=0;bb(68,z|0,728,127);o=0;e=14;break}case 34:{d=Fb()|0;e=54;break}case 35:{d=Fb()|0;e=54;break}case 37:{d=Fb()|0;e=54;break}case 38:{d=Fb()|0;e=40;break}case 39:{d=Fb()|0;Dn(k);e=40;break}case 41:{d=Fb()|0;e=43;break}case 42:{d=Fb()|0;Dn(m);e=43;break}case 49:{z=Ab(8)|0;Ao(z,44898);o=0;bb(68,z|0,712,58);o=0;e=36;break}case 50:{d=Fb()|0;e=52;break}case 51:{d=Fb()|0;Dn(p);Dn(n);e=52;break}case 56:{d=Gn(v)|0;o=0;d=ja(72,d|0,0)|0;z=o;o=0;if(z&1)e=13;else{if(d){z=wo(b)|0;o=0;d=ja(73,z|0,d|0)|0;z=o;o=0;if(!(z&1)){z=Gn(v)|0;o=0;bb(81,u|0,z|0,d|0);z=o;o=0;if(z&1){d=Fb()|0;break}z=Gn(y)|0;o=0;bb(81,t|0,z|0,d|0);z=o;o=0;do if(!(z&1)){o=0;Xa(185,a|0,2);z=o;o=0;if(z&1){d=Fb()|0;Dn(t);break}else{Fn(c[a>>2]|0,u)|0;Fn((c[a>>2]|0)+4|0,t)|0;Dn(t);Dn(u);Dn(v);Dn(w);Dn(y);Dn(x);l=r;return}}else d=Fb()|0;while(0);Dn(u);break}}else{z=Ab(8)|0;Eo(z,44946);o=0;bb(68,z|0,728,127);o=0}d=Fb()|0}break}}if((e|0)==13)d=Fb()|0;else if((e|0)==14){d=Fb()|0;e=55}else if((e|0)==36){d=Fb()|0;e=54}else if((e|0)==40)e=54;else if((e|0)==43)e=54;else if((e|0)==52){Dn(q);e=54}if((e|0)==54){Dn(s);e=55}if((e|0)==55){Dn(t);Dn(u)}Dn(v)}Dn(w)}Dn(y);Dn(x);Qb(d|0)}function yo(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,m=0,n=0;m=l;l=l+16|0;i=m;j=fo(Gn(d)|0)|0;a:do if((j|0)==1){e=aU(20)|0;o=0;Xa(141,e|0,1);k=o;o=0;if(k&1){k=Fb()|0;cU(e);e=k;k=25;break}ek(a,e);e=Gn(d)|0;o=0;e=ja(72,e|0,1)|0;k=o;o=0;if(!(k&1)?(o=0,f=ja(60,a|0,0)|0,k=o,o=0,!(k&1)):0){c[f>>2]=e;k=24;break}e=Fb()|0;ij(a);k=25}else{e=aU(20)|0;o=0;Xa(141,e|0,j|0);h=o;o=0;if(h&1){k=Fb()|0;cU(e);e=k;k=25;break}ek(i,e);h=1;e=0;while(1){f=wo(b)|0;o=0;f=fa(121,f|0)|0;g=o;o=0;if(g&1)break;if(!((e|0)<(j|0)&(h|0)<(f|0))){k=12;break}f=Gn(d)|0;o=0;f=ja(70,f|0,h|0)|0;g=o;o=0;if(g&1)break;if(!f){f=wo(b)|0;o=0;f=ja(73,f|0,h|0)|0;g=o;o=0;if(g&1)break;o=0;g=ja(60,i|0,e|0)|0;n=o;o=0;if(n&1)break;c[g>>2]=f;e=e+1|0}h=h+1|0}do if((k|0)==12){if((e|0)!=(j|0)){n=Ab(8)|0;Eo(n,44829);o=0;bb(68,n|0,728,127);o=0;break}o=0;Xa(138,a|0,i|0);n=o;o=0;if(!(n&1)){ij(i);k=24;break a}}while(0);e=Fb()|0;ij(i);k=25}while(0);if((k|0)==24){l=m;return}else if((k|0)==25)Qb(e|0)}function zo(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;l=Gk(Fk(e)|0)|0;f=aU(20)|0;o=0;Xa(141,f|0,l|0);k=o;o=0;do if(!(k&1)){ek(a,f);k=0;a:while(1){if((k|0)>=(l|0)){g=25;break}f=wo(b)|0;o=0;g=ja(60,e|0,k|0)|0;j=o;o=0;if(j&1){g=24;break}o=0;j=ja(73,f|0,c[g>>2]|0)|0;i=o;o=0;if(i&1){g=24;break}else{i=0;f=1}while(1){if((i|0)>=(l|0))break;if((k|0)!=(i|0)){g=wo(b)|0;o=0;h=ja(60,e|0,i|0)|0;m=o;o=0;if(m&1){g=24;break a}o=0;g=la(77,g|0,c[h>>2]|0,j|0)|0;m=o;o=0;if(m&1){g=24;break a}m=wo(b)|0;o=0;f=la(77,m|0,f|0,((g&1|0)==0?g|1:g&-2)|0)|0;m=o;o=0;if(m&1){g=24;break a}}i=i+1|0}g=wo(b)|0;h=Gn(d)|0;o=0;h=ja(70,h|0,j|0)|0;m=o;o=0;if(m&1){g=24;break}m=wo(b)|0;o=0;f=ja(73,m|0,f|0)|0;m=o;o=0;if(m&1){g=24;break}o=0;f=la(77,g|0,h|0,f|0)|0;m=o;o=0;if(m&1){g=24;break}o=0;g=ja(60,a|0,k|0)|0;m=o;o=0;if(m&1){g=24;break}c[g>>2]=f;f=wo(b)|0;o=0;f=fa(118,f|0)|0;m=o;o=0;if(m&1){g=24;break}if(f|0){f=wo(b)|0;o=0;g=ja(60,a|0,k|0)|0;m=o;o=0;if(m&1){g=24;break}o=0;f=la(77,f|0,c[g>>2]|0,j|0)|0;m=o;o=0;if(m&1){g=24;break}o=0;g=ja(60,a|0,k|0)|0;m=o;o=0;if(m&1){g=24;break}c[g>>2]=f}k=k+1|0}if((g|0)==24){f=Fb()|0;ij(a);break}else if((g|0)==25)return}else{m=Fb()|0;cU(f);f=m}while(0);Qb(f|0)}function Ao(a,b){a=a|0;b=b|0;hg(a,b);c[a>>2]=5812;return}function Bo(a){a=a|0;bg(a);cU(a);return}function Co(a){a=a|0;bg(a);return}function Do(a){a=a|0;Co(a);cU(a);return}function Eo(a,b){a=a|0;b=b|0;ig(a,b);c[a>>2]=5832;return}function Fo(a){a=a|0;c[a>>2]=5852;Lo(a+8|0);Gh(a);return}function Go(a){a=a|0;Fo(a);cU(a);return}function Ho(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,m=0,n=0,p=0,q=0,r=0;i=l;l=l+80|0;g=i+72|0;r=i+60|0;e=i+52|0;q=i+56|0;p=i+40|0;n=i+36|0;f=i+32|0;k=i+28|0;m=i+16|0;j=i+4|0;h=i;Tf(e,vi(d)|0);o=0;Xa(186,r|0,e|0);d=o;o=0;if(d&1){r=Fb()|0;de(e);e=r}else{de(e);o=0;Xa(187,q|0,r|0);d=o;o=0;if(d&1)e=Fb()|0;else{d=Io(q)|0;o=0;Xa(120,p|0,d|0);d=o;o=0;if(d&1)e=Fb()|0;else{d=Io(q)|0;o=0;Xa(126,f|0,d|0);d=o;o=0;do if(d&1)e=Fb()|0;else{o=0;bb(82,n|0,b+8|0,f|0);d=o;o=0;if(d&1){e=Fb()|0;de(f);break}de(f);o=0;b=fa(107,40)|0;d=o;o=0;a:do if(d&1)e=Fb()|0;else{d=zi(n)|0;o=0;Xa(122,k|0,d|0);d=o;o=0;do if(!(d&1)){d=zi(n)|0;o=0;Xa(123,m|0,d|0);d=o;o=0;if(d&1){e=Fb()|0;Ke(k);break}o=0;Xa(96,j|0,p|0);d=o;o=0;if(d&1){e=Fb()|0;f=1}else{vh(h,6);o=0;c[g>>2]=c[h>>2];hb(47,b|0,k|0,m|0,j|0,g|0);d=o;o=0;if(!(d&1)){o=0;Xa(124,a|0,b|0);a=o;o=0;if(a&1)f=0;else{Qe(j);Nd(m);Ke(k);Bi(n);Qe(p);Jo(q);Ko(r);l=i;return}}else f=1;e=Fb()|0;Qe(j)}Nd(m);Ke(k);if(!f)break a}else e=Fb()|0;while(0);cU(b)}while(0);Bi(n)}while(0);Qe(p)}Jo(q)}Ko(r)}Qb(e|0)}function Io(a){a=a|0;return c[a>>2]|0}function Jo(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function Ko(a){a=a|0;c[a>>2]=5940;de(a+8|0);ff(a);return}function Lo(a){a=a|0;to(a);return}function Mo(a){a=a|0;var b=0;zh(a);c[a>>2]=5852;o=0;Na(327,a+8|0);b=o;o=0;if(b&1){b=Fb()|0;Gh(a);Qb(b|0)}else return}function No(a){a=a|0;var b=0;c[a>>2]=5876;b=c[a+28>>2]|0;if(b|0){Po(b);cU(b)}ff(a);return}function Oo(a){a=a|0;No(a);cU(a);return}function Po(a){a=a|0;var b=0,d=0,e=0;e=a+4|0;d=a+8|0;b=0;while(1){a=c[e>>2]|0;if(b>>>0>=(c[d>>2]|0)-a>>2>>>0)break;a=c[a+(b<<2)>>2]|0;if(a|0)cU(a);b=b+1|0}Qo(e);return}function Qo(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-4|0;c[a>>2]=e;b=e}cU(d)}return}function Ro(){So();To();return}function So(){c[14679]=0;c[14680]=0;c[14681]=0;return}function To(){c[14682]=Uo()|0;return}function Uo(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;f=g;d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;a:do if(e&1){a=Fb()|0;h=215}else{o=0;b=fa(107,8)|0;e=o;o=0;if(!(e&1)?(Vo(b,1,3),o=0,bb(83,a|0,5,b|0),e=o,o=0,!(e&1)):0){Xo(d,1,10,10,8,8,a);Yo(f,d);a=c[14680]|0;if(a>>>0<(c[14681]|0)>>>0){o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1)h=216;else c[14680]=(c[14680]|0)+4}else{o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=216}if((h|0)==216){a=Fb()|0;$o(f);h=217;break}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;do if(e&1){a=Fb()|0;h=220}else{o=0;b=fa(107,8)|0;e=o;o=0;if(!(e&1)?(Vo(b,1,5),o=0,bb(83,a|0,7,b|0),e=o,o=0,!(e&1)):0){Xo(d,2,12,12,10,10,a);Yo(f,d);a=c[14680]|0;if(a>>>0<(c[14681]|0)>>>0){o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1)h=221;else c[14680]=(c[14680]|0)+4}else{o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=221}if((h|0)==221){a=Fb()|0;$o(f);break}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;do if(e&1){a=Fb()|0;h=225}else{o=0;b=fa(107,8)|0;e=o;o=0;if(!(e&1)?(Vo(b,1,8),o=0,bb(83,a|0,10,b|0),e=o,o=0,!(e&1)):0){Xo(d,3,14,14,12,12,a);Yo(f,d);a=c[14680]|0;if(a>>>0<(c[14681]|0)>>>0){o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1)h=226;else c[14680]=(c[14680]|0)+4}else{o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=226}if((h|0)==226){a=Fb()|0;$o(f);break}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;b:do if(e&1){a=Fb()|0;h=230}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,12);o=0;bb(83,a|0,12,b|0);e=o;o=0;if(e&1)break;Xo(d,4,16,16,14,14,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=231}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=231;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==231){a=Fb()|0;$o(f);break b}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;c:do if(e&1){a=Fb()|0;h=235}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,18);o=0;bb(83,a|0,14,b|0);e=o;o=0;if(e&1)break;Xo(d,5,18,18,16,16,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=236}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=236;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==236){a=Fb()|0;$o(f);break c}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;d:do if(e&1){a=Fb()|0;h=240}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,22);o=0;bb(83,a|0,18,b|0);e=o;o=0;if(e&1)break;Xo(d,6,20,20,18,18,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=241}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=241;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==241){a=Fb()|0;$o(f);break d}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;e:do if(e&1){a=Fb()|0;h=245}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,30);o=0;bb(83,a|0,20,b|0);e=o;o=0;if(e&1)break;Xo(d,7,22,22,20,20,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=246}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=246;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==246){a=Fb()|0;$o(f);break e}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;f:do if(e&1){a=Fb()|0;h=250}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,36);o=0;bb(83,a|0,24,b|0);e=o;o=0;if(e&1)break;Xo(d,8,24,24,22,22,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=251}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=251;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==251){a=Fb()|0;$o(f);break f}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;g:do if(e&1){a=Fb()|0;h=255}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,44);o=0;bb(83,a|0,28,b|0);e=o;o=0;if(e&1)break;Xo(d,9,26,26,24,24,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=256}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=256;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==256){a=Fb()|0;$o(f);break g}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;h:do if(e&1){a=Fb()|0;h=260}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,62);o=0;bb(83,a|0,36,b|0);e=o;o=0;if(e&1)break;Xo(d,10,32,32,14,14,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=261}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=261;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==261){a=Fb()|0;$o(f);break h}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;i:do if(e&1){a=Fb()|0;h=265}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,86);o=0;bb(83,a|0,42,b|0);e=o;o=0;if(e&1)break;Xo(d,11,36,36,16,16,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=266}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=266;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==266){a=Fb()|0;$o(f);break i}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;j:do if(e&1){a=Fb()|0;h=270}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,114);o=0;bb(83,a|0,48,b|0);e=o;o=0;if(e&1)break;Xo(d,12,40,40,18,18,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=271}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=271;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==271){a=Fb()|0;$o(f);break j}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;k:do if(e&1){a=Fb()|0;h=275}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,144);o=0;bb(83,a|0,56,b|0);e=o;o=0;if(e&1)break;Xo(d,13,44,44,20,20,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=276}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=276;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==276){a=Fb()|0;$o(f);break k}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;l:do if(e&1){a=Fb()|0;h=280}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,1,174);o=0;bb(83,a|0,68,b|0);e=o;o=0;if(e&1)break;Xo(d,14,48,48,22,22,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=281}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=281;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==281){a=Fb()|0;$o(f);break l}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;m:do if(e&1){a=Fb()|0;h=285}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,2,102);o=0;bb(83,a|0,42,b|0);e=o;o=0;if(e&1)break;Xo(d,15,52,52,24,24,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=286}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=286;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==286){a=Fb()|0;$o(f);break m}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;n:do if(e&1){a=Fb()|0;h=290}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,2,140);o=0;bb(83,a|0,56,b|0);e=o;o=0;if(e&1)break;Xo(d,16,64,64,14,14,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=291}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=291;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==291){a=Fb()|0;$o(f);break n}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;o:do if(e&1){a=Fb()|0;h=295}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,4,92);o=0;bb(83,a|0,36,b|0);e=o;o=0;if(e&1)break;Xo(d,17,72,72,16,16,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=296}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=296;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==296){a=Fb()|0;$o(f);break o}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;p:do if(e&1){a=Fb()|0;h=300}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,4,114);o=0;bb(83,a|0,48,b|0);e=o;o=0;if(e&1)break;Xo(d,18,80,80,18,18,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=301}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=301;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==301){a=Fb()|0;$o(f);break p}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;q:do if(e&1){a=Fb()|0;h=305}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,4,144);o=0;bb(83,a|0,56,b|0);e=o;o=0;if(e&1)break;Xo(d,19,88,88,20,20,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=306}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=306;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==306){a=Fb()|0;$o(f);break q}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;r:do if(e&1){a=Fb()|0;h=310}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,4,174);o=0;bb(83,a|0,68,b|0);e=o;o=0;if(e&1)break;Xo(d,20,96,96,22,22,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=311}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=311;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==311){a=Fb()|0;$o(f);break r}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;s:do if(e&1){a=Fb()|0;h=315}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,6,136);o=0;bb(83,a|0,56,b|0);e=o;o=0;if(e&1)break;Xo(d,21,104,104,24,24,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=316}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=316;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==316){a=Fb()|0;$o(f);break s}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;t:do if(e&1){a=Fb()|0;h=320}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,6,175);o=0;bb(83,a|0,68,b|0);e=o;o=0;if(e&1)break;Xo(d,22,120,120,18,18,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=321}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=321;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==321){a=Fb()|0;$o(f);break t}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;e=o;o=0;u:do if(e&1){a=Fb()|0;h=325}else{o=0;b=fa(107,8)|0;e=o;o=0;do if(!(e&1)){Vo(b,8,163);o=0;bb(83,a|0,62,b|0);e=o;o=0;if(e&1)break;Xo(d,23,132,132,20,20,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);e=o;o=0;if(e&1)h=326}else{o=0;Xa(188,a|0,f|0);e=o;o=0;if(e&1){h=326;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==326){a=Fb()|0;$o(f);break u}$o(f);e=aU(36)|0;o=0;a=fa(107,16)|0;d=o;o=0;v:do if(d&1){a=Fb()|0;h=330}else{o=0;b=fa(107,8)|0;d=o;o=0;do if(!(d&1)){Vo(b,8,156);o=0;d=fa(107,8)|0;i=o;o=0;if(i&1)break;Vo(d,2,155);o=0;db(79,a|0,62,b|0,d|0);i=o;o=0;if(i&1)break;Xo(e,24,144,144,22,22,a);Yo(f,e);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);i=o;o=0;if(i&1)h=331}else{o=0;Xa(188,a|0,f|0);i=o;o=0;if(i&1){h=331;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==331){a=Fb()|0;$o(f);break v}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;i=o;o=0;w:do if(i&1){a=Fb()|0;h=335}else{o=0;b=fa(107,8)|0;i=o;o=0;do if(!(i&1)){Vo(b,1,5);o=0;bb(83,a|0,7,b|0);i=o;o=0;if(i&1)break;Xo(d,25,8,18,6,16,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);i=o;o=0;if(i&1)h=336}else{o=0;Xa(188,a|0,f|0);i=o;o=0;if(i&1){h=336;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==336){a=Fb()|0;$o(f);break w}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;i=o;o=0;x:do if(i&1){a=Fb()|0;h=340}else{o=0;b=fa(107,8)|0;i=o;o=0;do if(!(i&1)){Vo(b,1,10);o=0;bb(83,a|0,11,b|0);i=o;o=0;if(i&1)break;Xo(d,26,8,32,6,14,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);i=o;o=0;if(i&1)h=341}else{o=0;Xa(188,a|0,f|0);i=o;o=0;if(i&1){h=341;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==341){a=Fb()|0;$o(f);break x}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;i=o;o=0;y:do if(i&1){a=Fb()|0;h=345}else{o=0;b=fa(107,8)|0;i=o;o=0;do if(!(i&1)){Vo(b,1,16);o=0;bb(83,a|0,14,b|0);i=o;o=0;if(i&1)break;Xo(d,27,12,26,10,24,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);i=o;o=0;if(i&1)h=346}else{o=0;Xa(188,a|0,f|0);i=o;o=0;if(i&1){h=346;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==346){a=Fb()|0;$o(f);break y}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;i=o;o=0;z:do if(i&1){a=Fb()|0;h=350}else{o=0;b=fa(107,8)|0;i=o;o=0;do if(!(i&1)){Vo(b,1,22);o=0;bb(83,a|0,18,b|0);i=o;o=0;if(i&1)break;Xo(d,28,12,36,10,16,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);i=o;o=0;if(i&1)h=351}else{o=0;Xa(188,a|0,f|0);i=o;o=0;if(i&1){h=351;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==351){a=Fb()|0;$o(f);break z}$o(f);d=aU(36)|0;o=0;a=fa(107,16)|0;i=o;o=0;A:do if(i&1){a=Fb()|0;h=355}else{o=0;b=fa(107,8)|0;i=o;o=0;do if(!(i&1)){Vo(b,1,32);o=0;bb(83,a|0,24,b|0);i=o;o=0;if(i&1)break;Xo(d,29,16,36,14,16,a);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);i=o;o=0;if(i&1)h=356}else{o=0;Xa(188,a|0,f|0);i=o;o=0;if(i&1){h=356;break}c[14680]=(c[14680]|0)+4}while(0);if((h|0)==356){a=Fb()|0;$o(f);break A}$o(f);d=aU(36)|0;o=0;b=fa(107,16)|0;i=o;o=0;B:do if(i&1){a=Fb()|0;h=360}else{o=0;a=fa(107,8)|0;i=o;o=0;do if(!(i&1)){Vo(a,1,49);o=0;bb(83,b|0,28,a|0);i=o;o=0;if(i&1)break;Xo(d,30,16,48,14,22,b);Yo(f,d);a=c[14680]|0;do if(a>>>0>=(c[14681]|0)>>>0){o=0;Xa(189,58716,f|0);i=o;o=0;if(i&1)h=361;else h=212}else{o=0;Xa(188,a|0,f|0);i=o;o=0;if(i&1){h=361;break}c[14680]=(c[14680]|0)+4;h=212}while(0);if((h|0)==212){$o(f);l=g;return (c[14680]|0)-(c[14679]|0)>>2|0}else if((h|0)==361){a=Fb()|0;$o(f);break B}}while(0);a=Fb()|0;cU(b);h=360}while(0);if((h|0)==360)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=355}while(0);if((h|0)==355)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=350}while(0);if((h|0)==350)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=345}while(0);if((h|0)==345)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=340}while(0);if((h|0)==340)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=335}while(0);if((h|0)==335)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=330}while(0);if((h|0)==330)cU(e);break a}while(0);h=Fb()|0;cU(a);a=h;h=325}while(0);if((h|0)==325)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=320}while(0);if((h|0)==320)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=315}while(0);if((h|0)==315)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=310}while(0);if((h|0)==310)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=305}while(0);if((h|0)==305)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=300}while(0);if((h|0)==300)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=295}while(0);if((h|0)==295)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=290}while(0);if((h|0)==290)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=285}while(0);if((h|0)==285)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=280}while(0);if((h|0)==280)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=275}while(0);if((h|0)==275)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=270}while(0);if((h|0)==270)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=265}while(0);if((h|0)==265)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=260}while(0);if((h|0)==260)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=255}while(0);if((h|0)==255)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=250}while(0);if((h|0)==250)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=245}while(0);if((h|0)==245)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=240}while(0);if((h|0)==240)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=235}while(0);if((h|0)==235)cU(d);break a}while(0);h=Fb()|0;cU(a);a=h;h=230}while(0);if((h|0)==230)cU(d);break a}h=Fb()|0;cU(a);a=h;h=225}while(0);if((h|0)==225)cU(d);break a}h=Fb()|0;cU(a);a=h;h=220}while(0);if((h|0)==220)cU(d);break}h=Fb()|0;cU(a);a=h;h=215}while(0);if((h|0)==215){cU(d);h=217}Qb(a|0);return 0}function Vo(a,b,d){a=a|0;b=b|0;d=d|0;c[a>>2]=b;c[a+4>>2]=d;return}function Wo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e;c[f>>2]=d;c[a>>2]=b;bp(a+4|0,1,f);l=e;return}function Xo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;cf(a);c[a>>2]=5876;c[a+8>>2]=b;c[a+12>>2]=d;c[a+16>>2]=e;c[a+20>>2]=f;c[a+24>>2]=g;c[a+28>>2]=h;f=a+32|0;c[f>>2]=0;g=np(h)|0;e=op(h)|0;d=c[e>>2]|0;e=(c[e+4>>2]|0)-d>>2;a=0;b=0;while(1){if((b|0)==(e|0))break;i=c[d+(b<<2)>>2]|0;h=pp(i)|0;a=(O((qp(i)|0)+g|0,h)|0)+a|0;b=b+1|0}c[f>>2]=a;return}function Yo(a,b){a=a|0;b=b|0;c[a>>2]=0;mp(a,b);return}function Zo(a,b){a=a|0;b=b|0;c[a>>2]=0;mp(a,c[b>>2]|0);return}function _o(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;h=l;l=l+32|0;g=h;d=a+4|0;e=((c[d>>2]|0)-(c[a>>2]|0)>>2)+1|0;f=ip(a)|0;if(f>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;jp(g,k>>2>>>0>>1>>>0?(j>>>0>>0?e:j):f,(c[d>>2]|0)-i>>2,a+8|0);d=g+8|0;o=0;Xa(188,c[d>>2]|0,b|0);b=o;o=0;if(!(b&1)?(c[d>>2]=(c[d>>2]|0)+4,o=0,Xa(190,a|0,g|0),k=o,o=0,!(k&1)):0){lp(g);l=h;return}k=Fb()|0;lp(g);Qb(k|0)}function $o(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function ap(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=d;c[g>>2]=e;c[a>>2]=b;b=a+4|0;bp(b,1,f);d=a+8|0;f=c[d>>2]|0;if((f|0)==(c[a+12>>2]|0)){o=0;Xa(191,b|0,g|0);g=o;o=0;if(g&1){h=Fb()|0;Qo(b);Qb(h|0)}}else{c[f>>2]=e;c[d>>2]=(c[d>>2]|0)+4}l=h;return}function bp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[a>>2]=0;e=a+4|0;c[e>>2]=0;c[a+8>>2]=0;if(b|0){o=0;Xa(192,a|0,b|0);f=o;o=0;if(f&1){f=Fb()|0;Qo(a);Qb(f|0)}a=c[e>>2]|0;do{c[a>>2]=c[d>>2];a=(c[e>>2]|0)+4|0;c[e>>2]=a;b=b+-1|0}while((b|0)!=0)}return}function cp(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=dp(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;ep(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;c[c[g>>2]>>2]=c[b>>2];c[g>>2]=(c[g>>2]|0)+4;o=0;Xa(193,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;gp(d);Qb(k|0)}else{gp(d);l=h;return}}function dp(a){a=a|0;return 1073741823}function ep(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function fp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;h=a+4|0;g=b+4|0;f=(c[h>>2]|0)-e|0;d=(c[g>>2]|0)+(0-(f>>2)<<2)|0;c[g>>2]=d;if((f|0)>0){wW(d|0,e|0,f|0)|0;e=g;d=c[g>>2]|0}else e=g;g=c[a>>2]|0;c[a>>2]=d;c[e>>2]=g;g=b+8|0;f=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=f;g=a+8|0;h=b+12|0;a=c[g>>2]|0;c[g>>2]=c[h>>2];c[h>>2]=a;c[b>>2]=c[e>>2];return}function gp(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+4>>2]|0;d=a+8|0;e=c[d>>2]|0;while(1){if((e|0)==(b|0))break;f=e+-4|0;c[d>>2]=f;e=f}a=c[a>>2]|0;if(a|0)cU(a);return}function hp(a,b){a=a|0;b=b|0;var d=0;if((dp(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function ip(a){a=a|0;return 1073741823}function jp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function kp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-4|0;Zo((c[g>>2]|0)+-4|0,h);c[g>>2]=(c[g>>2]|0)+-4;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function lp(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;$o(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function mp(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function np(a){a=a|0;return c[a>>2]|0}function op(a){a=a|0;return a+4|0}function pp(a){a=a|0;return c[a>>2]|0}function qp(a){a=a|0;return c[a+4>>2]|0}function rp(a){a=a|0;return c[a+12>>2]|0}function sp(a){a=a|0;return c[a+16>>2]|0}function tp(a){a=a|0;return c[a+20>>2]|0}function up(a){a=a|0;return c[a+24>>2]|0}function vp(a){a=a|0;return c[a+32>>2]|0}function wp(a){a=a|0;return c[a+28>>2]|0}function xp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if(!((e|d)&1))b=0;else{e=Ab(8)|0;hg(e,45100);Mb(e|0,24,58)}while(1){if((b|0)>=(c[14682]|0)){b=7;break}Zo(a,(c[14679]|0)+(b<<2)|0);if((rp(yp(a)|0)|0)==(d|0)?(sp(yp(a)|0)|0)==(e|0):0){b=8;break}$o(a);b=b+1|0}if((b|0)==7){e=Ab(8)|0;hg(e,45140);Mb(e|0,24,58)}else if((b|0)==8)return}function yp(a){a=a|0;return c[a>>2]|0}function zp(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,m=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;cf(a);c[a>>2]=5892;k=a+8|0;o=0;Xa(169,k|0,0);j=o;o=0;if(j&1)b=Fb()|0;else{j=a+12|0;o=0;Xa(194,j|0,0);i=o;o=0;if(i&1)b=Fb()|0;else{i=a+16|0;o=0;Xa(169,i|0,0);d=o;o=0;if(d&1)b=Fb()|0;else{d=be(b)|0;o=0;d=fa(114,d|0)|0;m=o;o=0;a:do if(m&1)b=Fb()|0;else{b:do if((d+-8|0)>>>0<137&(d&1|0)==0){o=0;Xa(128,f|0,b|0);m=o;o=0;do if(m&1)b=Fb()|0;else{o=0;bb(84,e|0,a|0,f|0);m=o;o=0;if(m&1){b=Fb()|0;de(f);break}Bp(j,e)|0;$o(e);de(f);o=0;Xa(128,g|0,b|0);m=o;o=0;if(m&1)b=Fb()|0;else{o=0;bb(85,e|0,a|0,g|0);m=o;o=0;do if(m&1)b=Fb()|0;else{o=0;ja(74,k|0,e|0)|0;m=o;o=0;if(m&1){b=Fb()|0;de(e);break}de(e);de(g);o=0;b=fa(107,32)|0;m=o;o=0;if(m&1)break b;d=be(k)|0;o=0;d=fa(113,d|0)|0;m=o;o=0;do if(!(m&1)){e=be(k)|0;o=0;e=fa(114,e|0)|0;m=o;o=0;if(m&1)break;o=0;bb(66,b|0,d|0,e|0);m=o;o=0;if(m&1)break;o=0;ja(75,i|0,b|0)|0;m=o;o=0;if(m&1)break b;l=h;return}while(0);m=Fb()|0;cU(b);b=m;break a}while(0);de(g)}break a}while(0);break a}else{m=Ab(8)|0;hg(m,45164);o=0;bb(68,m|0,24,58);o=0}while(0);b=Fb()|0}while(0);de(i)}$o(j)}de(k)}ff(a);Qb(b|0)}function Ap(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=l;l=l+16|0;d=e;b=b+12|0;a:do if(Ep(b,0)|0)Zo(a,b);else{f=_k(be(c)|0)|0;c=Zk(be(c)|0)|0;xp(d,yp(b)|0,f,c);o=0;b=ja(76,d|0,0)|0;c=o;o=0;do if(!(c&1))if(b){Zo(a,d);$o(d);break a}else{f=Ab(8)|0;hg(f,45249);o=0;bb(68,f|0,24,58);o=0;break}while(0);f=Fb()|0;$o(d);Qb(f|0)}while(0);l=e;return}function Bp(a,b){a=a|0;b=b|0;mp(a,c[b>>2]|0);return a|0}function Cp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;b=b+12|0;d=rp(yp(b)|0)|0;e=sp(yp(b)|0)|0;do if((_k(be(c)|0)|0)==(d|0)){t=tp(yp(b)|0)|0;s=up(yp(b)|0)|0;r=(d|0)/(t|0)|0;q=(e|0)/(s|0)|0;p=O(r,t)|0;n=O(q,s)|0;b=aU(32)|0;o=0;bb(66,b|0,n|0,p|0);p=o;o=0;if(p&1){a=Fb()|0;cU(b);b=a;break}ae(a,b);g=t+2|0;h=s+2|0;d=0;a:while(1){if((d|0)>=(r|0)){d=23;break}i=O(d,t)|0;j=(O(d,g)|0)+1|0;f=0;while(1){if((f|0)>=(q|0))break;k=O(f,s)|0;l=(O(f,h)|0)+1|0;e=0;while(1){if((e|0)>=(t|0))break;m=j+e|0;n=e+i|0;b=0;while(1){if((b|0)>=(s|0))break;p=be(c)|0;o=0;p=la(72,p|0,l+b|0,m|0)|0;u=o;o=0;if(u&1){d=22;break a}if(p?(u=be(a)|0,o=0,bb(67,u|0,b+k|0,n|0),u=o,o=0,u&1):0){d=22;break a}b=b+1|0}e=e+1|0}f=f+1|0}d=d+1|0}if((d|0)==22){b=Fb()|0;de(a);break}else if((d|0)==23)return}else{b=Ab(8)|0;o=0;Xa(102,b|0,45198);u=o;o=0;if(u&1){u=Fb()|0;Jb(b|0);b=u;break}else Mb(b|0,632,117)}while(0);Qb(b|0)}function Dp(a,b){a=a|0;b=b|0;tf(a,b);return a|0}function Ep(a,b){a=a|0;b=b|0;return (Fp(a,b)|0)^1|0}function Fp(a,b){a=a|0;b=b|0;return (c[a>>2]|0)==(b|0)|0}function Gp(a){a=a|0;c[a>>2]=5892;de(a+16|0);$o(a+12|0);de(a+8|0);ff(a);return}function Hp(a){a=a|0;Gp(a);cU(a);return}function Ip(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;x=c+12|0;Ld(b,vp(yp(x)|0)|0);d=c+8|0;y=be(d)|0;o=0;y=fa(114,y|0)|0;v=o;o=0;a:do if(!(v&1)?(w=be(d)|0,o=0,w=fa(113,w|0)|0,v=o,o=0,!(v&1)):0){q=y+-2|0;r=(w&3|0)==0;s=y+4|0;u=w&7;t=(u|0)==0;u=(u|0)==4;v=c+16|0;n=0;p=0;i=0;j=0;f=0;e=0;g=4;while(1){d=(e|0)==0;m=f+1|0;l=g+-2|0;k=e+2|0;do if(j|(g|0)==(y|0)&d^1){d=(g|0)==(q|0)&d;if(!(r|d^1|i)){o=0;e=la(79,c|0,y|0,w|0)|0;i=o;o=0;if(i&1)break a;o=0;d=ja(56,b|0,f|0)|0;i=o;o=0;if(i&1)break a;a[d>>0]=e;d=n;h=p;i=1;e=k;g=l;f=m;break}if(!(p|t&((g|0)==(s|0)&(e|0)==2)^1)){o=0;e=la(80,c|0,y|0,w|0)|0;p=o;o=0;if(p&1)break a;o=0;d=ja(56,b|0,f|0)|0;p=o;o=0;if(p&1)break a;a[d>>0]=e;d=n;h=1;e=k;g=l;f=m;break}if(n|u&d^1)h=e;else{o=0;e=la(81,c|0,y|0,w|0)|0;n=o;o=0;if(n&1)break a;o=0;d=ja(56,b|0,f|0)|0;n=o;o=0;if(n&1)break a;a[d>>0]=e;d=1;h=p;e=k;g=l;f=m;break}while(1){if((g|0)<(y|0)&(h|0)>-1){d=be(v)|0;o=0;d=la(72,d|0,h|0,g|0)|0;m=o;o=0;if(m&1)break a;if(!d){o=0;d=va(63,c|0,g|0,h|0,y|0,w|0)|0;m=o;o=0;if(m&1)break a;o=0;e=ja(56,b|0,f|0)|0;m=o;o=0;if(m&1)break a;a[e>>0]=d;f=f+1|0}}d=g+-2|0;e=h+2|0;if((d|0)>-1&(e|0)<(w|0)){h=e;g=d}else break}k=h+5|0;g=g+-1|0;while(1){if((g|0)>-1&(k|0)<(w|0)){d=be(v)|0;o=0;d=la(72,d|0,k|0,g|0)|0;m=o;o=0;if(m&1)break a;if(!d){o=0;d=va(63,c|0,g|0,k|0,y|0,w|0)|0;m=o;o=0;if(m&1)break a;o=0;e=ja(56,b|0,f|0)|0;m=o;o=0;if(m&1)break a;a[e>>0]=d;f=f+1|0}}d=g+2|0;e=k+-2|0;if((d|0)<(y|0)&(e|0)>-1){k=e;g=d}else break}d=n;h=p;e=k+-1|0;g=g+5|0}else{o=0;e=la(78,c|0,y|0,w|0)|0;j=o;o=0;if(j&1)break a;o=0;d=ja(56,b|0,f|0)|0;j=o;o=0;if(j&1)break a;a[d>>0]=e;d=n;h=p;j=1;e=k;g=l;f=m}while(0);if((g|0)<(y|0)|(e|0)<(w|0)){n=d;p=h}else break}d=yp(x)|0;o=0;d=fa(122,d|0)|0;y=o;o=0;if(!(y&1))if((f|0)==(d|0))return;else{y=Ab(8)|0;hg(y,48394);o=0;bb(68,y|0,24,58);o=0;break}}while(0);y=Fb()|0;Nd(b);Qb(y|0)}function Jp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=b+-1|0;d=Op(a,e,0,b,c)|0;d=((Op(a,e,1,b,c)|0)&1|(d?2:0))<<1;e=(d|(Op(a,e,2,b,c)|0)&1)<<1;e=(e|(Op(a,0,c+-2|0,b,c)|0)&1)<<1;d=c+-1|0;e=(e|(Op(a,0,d,b,c)|0)&1)<<1;e=(e|(Op(a,1,d,b,c)|0)&1)<<1;e=(e|(Op(a,2,d,b,c)|0)&1)<<1;return e|(Op(a,3,d,b,c)|0)&1|0}function Kp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=Op(a,b+-3|0,0,b,c)|0;e=((Op(a,b+-2|0,0,b,c)|0)&1|(e?2:0))<<1;e=(e|(Op(a,b+-1|0,0,b,c)|0)&1)<<1;e=(e|(Op(a,0,c+-4|0,b,c)|0)&1)<<1;e=(e|(Op(a,0,c+-3|0,b,c)|0)&1)<<1;e=(e|(Op(a,0,c+-2|0,b,c)|0)&1)<<1;d=c+-1|0;e=(e|(Op(a,0,d,b,c)|0)&1)<<1;return e|(Op(a,1,d,b,c)|0)&1|0}function Lp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b+-1|0;g=Op(a,f,0,b,c)|0;d=c+-1|0;g=((Op(a,f,d,b,c)|0)&1|(g?2:0))<<1;f=c+-3|0;g=(g|(Op(a,0,f,b,c)|0)&1)<<1;e=c+-2|0;g=(g|(Op(a,0,e,b,c)|0)&1)<<1;g=(g|(Op(a,0,d,b,c)|0)&1)<<1;f=(g|(Op(a,1,f,b,c)|0)&1)<<1;e=(f|(Op(a,1,e,b,c)|0)&1)<<1;return e|(Op(a,1,d,b,c)|0)&1|0}function Mp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=Op(a,b+-3|0,0,b,c)|0;e=((Op(a,b+-2|0,0,b,c)|0)&1|(e?2:0))<<1;e=(e|(Op(a,b+-1|0,0,b,c)|0)&1)<<1;e=(e|(Op(a,0,c+-2|0,b,c)|0)&1)<<1;d=c+-1|0;e=(e|(Op(a,0,d,b,c)|0)&1)<<1;e=(e|(Op(a,1,d,b,c)|0)&1)<<1;e=(e|(Op(a,2,d,b,c)|0)&1)<<1;return e|(Op(a,3,d,b,c)|0)&1|0}function Np(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+-2|0;g=c+-2|0;i=Op(a,h,g,d,e)|0;f=c+-1|0;i=((Op(a,h,f,d,e)|0)&1|(i?2:0))<<1;h=b+-1|0;i=(i|(Op(a,h,g,d,e)|0)&1)<<1;i=(i|(Op(a,h,f,d,e)|0)&1)<<1;h=(i|(Op(a,h,c,d,e)|0)&1)<<1;g=(h|(Op(a,b,g,d,e)|0)&1)<<1;f=(g|(Op(a,b,f,d,e)|0)&1)<<1;return f|(Op(a,b,c,d,e)|0)&1|0}function Op(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;g=(b|0)<0;c=(g?4-(d+4&7)|0:0)+c|0;f=(c|0)<0;c=(f?e:0)+c|0;e=(g?d:0)+b+(f?4-(e+4&7)|0:0)|0;ce(be(a+16|0)|0,c,e);return xj(be(a+8|0)|0,c,e)|0}function Pp(a,b,d){a=a|0;b=b|0;d=d|0;cf(a);c[a>>2]=5908;c[a+8>>2]=b;o=0;Xa(83,a+12|0,d|0);d=o;o=0;if(d&1){d=Fb()|0;ff(a);Qb(d|0)}else return}function Qp(a){a=a|0;c[a>>2]=5908;Nd(a+12|0);ff(a);return}function Rp(a){a=a|0;Qp(a);cU(a);return}function Sp(a){a=a|0;return c[a+8>>2]|0}function Tp(a,b){a=a|0;b=b|0;Gd(a,b+12|0);return}function Up(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;v=u+28|0;q=u+16|0;n=u+12|0;p=u;r=wp(e)|0;Vp(v,op(r)|0);m=v+4|0;g=0;f=0;while(1){e=c[v>>2]|0;if(f>>>0>=(c[m>>2]|0)-e>>2>>>0){t=3;break}o=0;e=fa(123,c[e+(f<<2)>>2]|0)|0;t=o;o=0;if(t&1){t=7;break}g=e+g|0;f=f+1|0}do if((t|0)==3){o=0;Xa(195,b|0,g|0);t=o;o=0;if(t&1){e=Fb()|0;break}s=0;j=0;a:while(1){e=c[v>>2]|0;if(j>>>0>=(c[m>>2]|0)-e>>2>>>0){t=9;break}i=c[e+(j<<2)>>2]|0;h=0;g=s;while(1){o=0;e=fa(123,i|0)|0;t=o;o=0;if(t&1){t=16;break a}if((h|0)>=(e|0))break;o=0;f=fa(124,i|0)|0;t=o;o=0;if(t&1){t=16;break a}o=0;e=fa(125,r|0)|0;t=o;o=0;if(t&1){t=25;break a}o=0;Xa(103,q|0,e+f|0);t=o;o=0;if(t&1){t=26;break a}o=0;k=fa(107,24)|0;t=o;o=0;if(t&1){t=27;break a}o=0;Xa(83,p|0,q|0);t=o;o=0;if(t&1){t=28;break a}o=0;bb(86,k|0,f|0,p|0);t=o;o=0;if(t&1){f=1;t=29;break a}o=0;Xa(196,n|0,k|0);t=o;o=0;if(t&1){f=0;t=29;break a}Nd(p);Zp((c[b>>2]|0)+(g<<2)|0,n)|0;_p(n);Nd(q);h=h+1|0;g=g+1|0}s=g;j=j+1|0}b:do if((t|0)==9){i=Ud(Td((Xp(c[b>>2]|0)|0)+12|0)|0)|0;f=c[b>>2]|0;q=(c[b+4>>2]|0)-f|0;e=(q>>2)+-1|0;c:do if((q|0)>0){h=i+1|0;g=e;e=f;while(1){e=Ud(Td((Xp(e+(g<<2)|0)|0)+12|0)|0)|0;if((e|0)==(i|0)){m=g;break c}if((e|0)!=(h|0))break;e=g+-1|0;if((g|0)<=0){m=e;break c}g=e;e=c[b>>2]|0}e=Ab(8)|0;o=0;Xa(102,e|0,48447);u=o;o=0;if(u&1){u=Fb()|0;Jb(e|0);e=u;break b}else{o=0;bb(68,e|0,632,117);o=0;e=Fb()|0;break b}}else m=e;while(0);o=0;e=fa(125,r|0)|0;r=o;o=0;if(r&1){e=Fb()|0;break}j=i-e|0;i=0;f=0;d:while(1){if((i|0)<(j|0))h=0;else{e=m;h=f;break}while(1){if((h|0)>=(s|0))break;o=0;e=ja(56,d|0,f|0)|0;r=o;o=0;if(r&1){t=48;break d}e=a[e>>0]|0;g=(Xp((c[b>>2]|0)+(h<<2)|0)|0)+12|0;o=0;g=ja(56,g|0,i|0)|0;r=o;o=0;if(r&1){t=48;break d}a[g>>0]=e;h=h+1|0;f=f+1|0}i=i+1|0}if((t|0)==48){e=Fb()|0;break}while(1){e=e+1|0;if((e|0)>=(s|0))break;o=0;f=ja(56,d|0,h|0)|0;r=o;o=0;if(r&1){t=54;break}f=a[f>>0]|0;g=(Xp((c[b>>2]|0)+(e<<2)|0)|0)+12|0;o=0;g=ja(56,g|0,j|0)|0;r=o;o=0;if(r&1){t=54;break}a[g>>0]=f;h=h+1|0}if((t|0)==54){e=Fb()|0;break}k=Ud(Td((Xp(c[b>>2]|0)|0)+12|0)|0)|0;e=h;e:while(1){if((j|0)>=(k|0))break;i=j+1|0;h=0;while(1){if((h|0)>=(s|0)){j=i;continue e}o=0;f=ja(56,d|0,e|0)|0;r=o;o=0;if(r&1){t=62;break e}f=a[f>>0]|0;g=(Xp((c[b>>2]|0)+(h<<2)|0)|0)+12|0;o=0;g=ja(56,g|0,((h|0)<=(m|0)?j:i)|0)|0;r=o;o=0;if(r&1){t=62;break e}a[g>>0]=f;h=h+1|0;e=e+1|0}}if((t|0)==62){e=Fb()|0;break}if((e|0)==(Ud(Td(d)|0)|0)){Qo(v);l=u;return}e=Ab(8)|0;o=0;Xa(102,e|0,48486);u=o;o=0;if(u&1){u=Fb()|0;Jb(e|0);e=u;break}else{o=0;bb(68,e|0,632,117);o=0;e=Fb()|0;break}}else if((t|0)==16)e=Fb()|0;else if((t|0)==25)e=Fb()|0;else if((t|0)==26)e=Fb()|0;else if((t|0)==27){e=Fb()|0;t=31}else if((t|0)==28){e=Fb()|0;t=30}else if((t|0)==29){e=Fb()|0;Nd(p);if(f)t=30;else t=31}while(0);if((t|0)==30){cU(k);t=31}if((t|0)==31)Nd(q);$p(b)}else if((t|0)==7)e=Fb()|0;while(0);Qo(v);Qb(e|0)}function Vp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;d=b+4|0;e=(c[d>>2]|0)-(c[b>>2]|0)>>2;do if(e|0){o=0;Xa(192,a|0,e|0);f=o;o=0;if(!(f&1)?(o=0,db(80,a|0,c[b>>2]|0,c[d>>2]|0,e|0),f=o,o=0,!(f&1)):0)break;f=Fb()|0;Qo(a);Qb(f|0)}while(0);return}function Wp(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(197,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(198,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;$p(a);Qb(d|0)}while(0);return}function Xp(a){a=a|0;return c[a>>2]|0}function Yp(a,b){a=a|0;b=b|0;c[a>>2]=0;aq(a,b);return}function Zp(a,b){a=a|0;b=b|0;aq(a,c[b>>2]|0);return a|0}function _p(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function $p(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-4|0;c[d>>2]=e;_p(e)}cU(c[a>>2]|0)}return}function aq(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function bq(a,b){a=a|0;b=b|0;var d=0;if((dq(a)|0)>>>0>>0)wS(a);if(b>>>0<=1073741823){d=aU(b<<2)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b<<2);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function cq(a,b){a=a|0;b=b|0;var d=0;d=a+4|0;a=b;b=c[d>>2]|0;do{Yp(b,0);b=(c[d>>2]|0)+4|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function dq(a){a=a|0;return 1073741823}function eq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;e=a+4|0;a=d-b|0;if((a|0)>0){wW(c[e>>2]|0,b|0,a|0)|0;c[e>>2]=(c[e>>2]|0)+(a>>>2<<2)}return}function fq(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;t=l;l=l+384|0;z=t+364|0;C=t+360|0;B=t+224|0;A=t+80|0;p=t+216|0;q=t+72|0;r=t+56|0;j=t+52|0;k=t+48|0;s=t+40|0;m=t+16|0;y=t+60|0;x=t+44|0;u=t+28|0;v=t+4|0;w=t;f=aU(28)|0;o=0;Xa(199,f|0,e|0);n=o;o=0;if(n&1){C=Fb()|0;cU(f);f=C}else{hq(C,f);h=B+56|0;n=B+4|0;c[B>>2]=220;c[h>>2]=240;o=0;Xa(156,B+56|0,n|0);i=o;o=0;a:do if(i&1){f=Fb()|0;d=32}else{c[B+128>>2]=0;c[B+132>>2]=Qg()|0;c[B>>2]=3760;c[h>>2]=3780;o=0;Na(324,n|0);i=o;o=0;do if(i&1)f=Fb()|0;else{c[n>>2]=3796;g=B+36|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[g+(f<<2)>>2]=0;f=f+1|0}c[B+48>>2]=0;c[B+52>>2]=16;c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[z+(f<<2)>>2]=0;f=f+1|0}o=0;Xa(157,n|0,z|0);i=o;o=0;if(i&1){f=Fb()|0;pU(z);pU(g);KK(n);break}pU(z);h=A+56|0;i=A+4|0;c[A>>2]=220;c[h>>2]=240;o=0;Xa(156,A+56|0,i|0);g=o;o=0;b:do if(g&1){f=Fb()|0;d=33}else{c[A+128>>2]=0;c[A+132>>2]=Qg()|0;c[A>>2]=3760;c[h>>2]=3780;o=0;Na(324,i|0);g=o;o=0;do if(g&1)f=Fb()|0;else{c[i>>2]=3796;g=A+36|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[g+(f<<2)>>2]=0;f=f+1|0}c[A+48>>2]=0;c[A+52>>2]=16;c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;f=0;while(1){if((f|0)==3)break;c[z+(f<<2)>>2]=0;f=f+1|0}o=0;Xa(157,i|0,z|0);f=o;o=0;if(f&1){f=Fb()|0;pU(z);pU(g);KK(i);break}pU(z);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;f=1;c:while(1){switch(f|0){case 1:{iq(p,C);o=0;f=pa(52,0,p|0,B|0,A|0)|0;h=o;o=0;if(h&1){d=35;break c}kq(p);if(!f){d=60;break c}break}case 2:{iq(q,C);o=0;bb(87,d|0,q|0,B|0);h=o;o=0;if(h&1){d=38;break c}kq(q);f=1;break}case 3:{iq(r,C);o=0;bb(88,d|0,r|0,B|0);h=o;o=0;if(h&1){d=41;break c}kq(r);f=1;break}case 4:{iq(j,C);o=0;bb(89,d|0,j|0,B|0);h=o;o=0;if(h&1){d=44;break c}kq(j);f=1;break}case 5:{iq(k,C);o=0;bb(90,0,k|0,B|0);h=o;o=0;if(h&1){d=47;break c}kq(k);f=1;break}case 6:{iq(s,C);o=0;Xa(200,m|0,z|0);h=o;o=0;if(h&1){d=51;break c}o=0;db(81,d|0,s|0,B|0,m|0);h=o;o=0;if(h&1){d=52;break c}pf(m);kq(s);f=1;break}default:{d=54;break c}}g=rq(C)|0;o=0;g=fa(126,g|0)|0;h=o;o=0;if(h&1){d=34;break}if((g|0)<=0){d=60;break}}d:do if((d|0)==35){f=Fb()|0;kq(p)}else if((d|0)==38){f=Fb()|0;kq(q)}else if((d|0)==41){f=Fb()|0;kq(r)}else if((d|0)==44){f=Fb()|0;kq(j)}else if((d|0)==47){f=Fb()|0;kq(k)}else if((d|0)==51){f=Fb()|0;d=53}else if((d|0)==52){f=Fb()|0;pf(m);d=53}else if((d|0)==54){f=Ab(8)|0;o=0;Xa(131,f|0,45481);y=o;o=0;if(y&1){y=Fb()|0;Jb(f|0);f=y;break}else{o=0;bb(68,f|0,160,61);o=0;d=34;break}}else if((d|0)==60){o=0;Xa(158,y|0,i|0);s=o;o=0;if(s&1){f=Fb()|0;break}s=a[y+11>>0]|0;s=((s<<24>>24<0?c[y+4>>2]|0:s&255)|0)==0;pU(y);e:do if(!s){o=0;Xa(158,y|0,i|0);s=o;o=0;do if(!(s&1)){o=0;ja(77,B|0,y|0)|0;s=o;o=0;if(s&1){f=Fb()|0;pU(y);break}else{pU(y);break e}}else f=Fb()|0;while(0);break d}while(0);o=0;Xa(83,y|0,e|0);s=o;o=0;if(s&1)d=34;else{o=0;h=fa(107,20)|0;s=o;o=0;f:do if(s&1)f=Fb()|0;else{o=0;Xa(158,u|0,n|0);s=o;o=0;if(!(s&1)){o=0;Xa(140,h|0,u|0);s=o;o=0;do if(s&1)g=1;else{o=0;Xa(173,x|0,h|0);s=o;o=0;if(s&1){g=0;break}pU(u);o=0;h=fa(107,48)|0;u=o;o=0;do if(u&1)f=Fb()|0;else{o=0;Xa(83,v|0,y|0);u=o;o=0;if(!(u&1)){Mh(w,x);o=0;bb(65,h|0,v|0,w|0);u=o;o=0;do if(u&1)g=1;else{o=0;Xa(130,b|0,h|0);u=o;o=0;if(u&1){g=0;break}Ke(w);Nd(v);Ke(x);Nd(y);pf(z);Ug(A);Ug(B);kq(C);l=t;return}while(0);f=Fb()|0;Ke(w);Nd(v);if(!g)break}else f=Fb()|0;cU(h)}while(0);Ke(x);break f}while(0);f=Fb()|0;pU(u);if(!g)break}else f=Fb()|0;cU(h)}while(0);Nd(y)}}while(0);if((d|0)==34)f=Fb()|0;else if((d|0)==53)kq(s);pf(z);Ug(A);break b}while(0);dL(A,3856);d=33}while(0);if((d|0)==33)GK(h);Ug(B);break a}while(0);dL(B,3856);d=32}while(0);if((d|0)==32)GK(h);kq(C)}Qb(f|0)}function gq(a,b){a=a|0;b=b|0;cf(a);c[a>>2]=5924;o=0;Xa(83,a+8|0,b|0);b=o;o=0;if(b&1){b=Fb()|0;ff(a);Qb(b|0)}else{c[a+20>>2]=0;c[a+24>>2]=0;return}}function hq(a,b){a=a|0;b=b|0;c[a>>2]=0;Bq(a,b);return}function iq(a,b){a=a|0;b=b|0;c[a>>2]=0;Bq(a,c[b>>2]|0);return}function jq(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;a=0;a:while(1){e=$k(rq(b)|0,8)|0;if(!e){b=3;break}if((e|0)<129){b=7;break}if((e|0)==129){a=0;b=27;break}b:do if((e|0)>=230){switch(e|0){case 230:{a=2;b=27;break a}case 231:{a=6;b=28;break a}case 232:{Tg(c,29)|0;break b}default:{}}if((e+-233|0)>>>0>=2)switch(e|0){case 238:{a=4;b=27;break a}case 239:{a=3;b=28;break a}case 240:{a=5;b=29;break a}case 235:{a=1;break b}case 236:{Th(c,45718)|0;Th(d,45728)|0;break b}case 237:{Th(c,45734)|0;Th(d,45728)|0;break b}default:{if((e|0)<=241)break b;if((e|0)!=254){b=22;break a}if(!(al(rq(b)|0)|0))break b;else{b=22;break a}}}}else{e=e+-130|0;if((e|0)<10)Tg(c,48)|0;uL(c,e)|0}while(0);if((al(rq(b)|0)|0)<=0){a=1;b=27;break}}do if((b|0)==3){a=Ab(8)|0;o=0;Xa(131,a|0,45692);c=o;o=0;if(c&1){b=Fb()|0;Jb(a|0);a=b;b=26;break}else Mb(a|0,160,61)}else if((b|0)==7){Tg(c,(a?e+128|0:e)+255&255)|0;a=1;b=29}else if((b|0)==22){a=Ab(8)|0;o=0;Xa(131,a|0,45744);c=o;o=0;if(c&1){b=Fb()|0;Jb(a|0);a=b;b=26;break}else Mb(a|0,160,61)}else if((b|0)==27)b=29;else if((b|0)==28)b=29;while(0);if((b|0)==26)Qb(a|0);else if((b|0)==29)return a|0;return 0}function kq(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function lq(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j;b=0;g=0;a:while(1){if((al(rq(d)|0)|0)==8){f=33;break}f=$k(rq(d)|0,8)|0;if((f|0)==254){f=33;break}Aq(0,f,$k(rq(d)|0,8)|0,i);h=0;f=g;while(1){if((h|0)>=3)break;g=c[i+(h<<2)>>2]|0;b:do switch(f|0){case 0:{if((g|0)<3){f=g+1|0;break b}f=a[45342+g>>0]|0;if(b){Tg(e,(f&255)+128&255)|0;f=0;b=0;break b}else{Tg(e,f)|0;f=0;b=0;break b}}case 1:if(b){Tg(e,g+128&255)|0;f=0;b=0;break b}else{Tg(e,g&255)|0;f=0;b=0;break b}case 2:{if((g|0)>=27){switch(g|0){case 30:{f=0;b=1;break b}case 27:break;default:{f=21;break a}}Tg(e,29)|0;f=0;break b}f=a[45382+g>>0]|0;if(b){Tg(e,(f&255)+128&255)|0;f=0;b=0;break b}else{Tg(e,f)|0;f=0;b=0;break b}}case 3:if(b){Tg(e,g+224&255)|0;f=0;b=0;break b}else{Tg(e,g+96&255)|0;f=0;b=0;break b}default:{f=27;break a}}while(0);h=h+1|0}if((al(rq(d)|0)|0)>0)g=f;else{f=33;break}}do if((f|0)==21){b=Ab(8)|0;o=0;Xa(131,b|0,45636);j=o;o=0;if(j&1){j=Fb()|0;Jb(b|0);b=j;break}else Mb(b|0,160,61)}else if((f|0)==27){b=Ab(8)|0;o=0;Xa(131,b|0,45666);j=o;o=0;if(j&1){j=Fb()|0;Jb(b|0);b=j;break}else Mb(b|0,160,61)}else if((f|0)==33){l=j;return}while(0);Qb(b|0)}function mq(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j;b=0;g=0;a:while(1){if((al(rq(d)|0)|0)==8){f=33;break}f=$k(rq(d)|0,8)|0;if((f|0)==254){f=33;break}Aq(0,f,$k(rq(d)|0,8)|0,i);h=0;f=g;while(1){if((h|0)>=3)break;g=c[i+(h<<2)>>2]|0;b:do switch(f|0){case 0:{if((g|0)<3){f=g+1|0;break b}f=a[45409+g>>0]|0;if(b){Tg(e,(f&255)+128&255)|0;f=0;b=0;break b}else{Tg(e,f)|0;f=0;b=0;break b}}case 1:if(b){Tg(e,g+128&255)|0;f=0;b=0;break b}else{Tg(e,g&255)|0;f=0;b=0;break b}case 2:{if((g|0)>=27){switch(g|0){case 30:{f=0;b=1;break b}case 27:break;default:{f=21;break a}}Tg(e,29)|0;f=0;break b}f=a[45382+g>>0]|0;if(b){Tg(e,(f&255)+128&255)|0;f=0;b=0;break b}else{Tg(e,f)|0;f=0;b=0;break b}}case 3:{f=a[45449+g>>0]|0;if(b){Tg(e,(f&255)+128&255)|0;f=0;b=0;break b}else{Tg(e,f)|0;f=0;b=0;break b}}default:{f=27;break a}}while(0);h=h+1|0}if((al(rq(d)|0)|0)>0)g=f;else{f=33;break}}do if((f|0)==21){b=Ab(8)|0;o=0;Xa(131,b|0,45578);j=o;o=0;if(j&1){j=Fb()|0;Jb(b|0);b=j;break}else Mb(b|0,160,61)}else if((f|0)==27){b=Ab(8)|0;o=0;Xa(131,b|0,45609);j=o;o=0;if(j&1){j=Fb()|0;Jb(b|0);b=j;break}else Mb(b|0,160,61)}else if((f|0)==33){l=j;return}while(0);Qb(b|0)}function nq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;f=g;a:while(1){if((al(rq(b)|0)|0)==8){h=20;break}a=$k(rq(b)|0,8)|0;if((a|0)==254){h=20;break}Aq(0,a,$k(rq(b)|0,8)|0,f);a=0;while(1){if((a|0)>=3)break;e=c[f+(a<<2)>>2]|0;b:do switch(e|0){case 0:{Tg(d,13)|0;break}case 1:{Tg(d,42)|0;break}case 2:{Tg(d,62)|0;break}case 3:{Tg(d,32)|0;break}default:{if((e|0)<14){Tg(d,e+44&255)|0;break b}if((e|0)>=40)break a;Tg(d,e+51&255)|0}}while(0);a=a+1|0}if((al(rq(b)|0)|0)<=0){h=20;break}}if((h|0)==20){l=g;return}a=Ab(8)|0;o=0;Xa(131,a|0,45548);h=o;o=0;if(h&1){h=Fb()|0;Jb(a|0);Qb(h|0)}else Mb(a|0,160,61)}function oq(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;a:do{if((al(rq(b)|0)|0)<17)break;else d=0;while(1){a=rq(b)|0;if((d|0)>=4)break;a=$k(a,6)|0;if((a|0)==31){f=5;break a}Tg(c,(a<<1&64^64|a)&255)|0;d=d+1|0}}while((al(a)|0)>0);if((f|0)==5?(e=zq(rq(b)|0)|0,e|0):0)$k(rq(b)|0,8-e|0)|0;return}function pq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;d=b+4|0;e=(c[d>>2]|0)-(c[b>>2]|0)|0;do if(e|0){o=0;Xa(97,a|0,e|0);f=o;o=0;if(!(f&1)?(o=0,db(82,a|0,c[b>>2]|0,c[d>>2]|0,e|0),f=o,o=0,!(f&1)):0)break;f=Fb()|0;pf(a);Qb(f|0)}while(0);return}function qq(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,m=0,n=0,p=0,q=0,r=0;r=l;l=l+16|0;p=r;g=sq(rq(d)|0)|0;h=g+2|0;g=tq(b,$k(rq(d)|0,8)|0,g+1|0)|0;if(!(g<<24>>24))k=(al(rq(d)|0)|0)/8|0;else k=g<<24>>24;do if((k|0)<0){g=Ab(8)|0;o=0;Xa(131,g|0,45508);r=o;o=0;if(r&1){r=Fb()|0;Jb(g|0);g=r;break}else Mb(g|0,160,61)}else{m=f+4|0;n=f+8|0;j=0;while(1){if((j|0)>=(k|0)){q=9;break}if((al(rq(d)|0)|0)<8)break;g=tq(b,$k(rq(d)|0,8)|0,h)|0;a[p>>0]=g;i=c[m>>2]|0;if((i|0)==(c[n>>2]|0))uq(f,p);else{a[i>>0]=g;c[m>>2]=(c[m>>2]|0)+1}Tg(e,a[p>>0]|0)|0;j=j+1|0;h=h+1|0}if((q|0)==9){l=r;return}g=Ab(8)|0;o=0;Xa(131,g|0,45535);r=o;o=0;if(r&1){r=Fb()|0;Jb(g|0);g=r;break}else Mb(g|0,160,61)}while(0);Qb(g|0)}function rq(a){a=a|0;return c[a>>2]|0}function sq(a){a=a|0;return c[a+20>>2]|0}function tq(a,b,c){a=a|0;b=b|0;c=c|0;return b+255-((c*149|0)%255|0)&255|0}function uq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;i=l;l=l+32|0;e=i;f=b+4|0;g=(c[f>>2]|0)-(c[b>>2]|0)+1|0;h=of(b)|0;if(h>>>0>>0)wS(b);j=c[b>>2]|0;m=(c[b+8>>2]|0)-j|0;k=m<<1;vq(e,m>>>0>>1>>>0?(k>>>0>>0?g:k):h,(c[f>>2]|0)-j|0,b+8|0);h=e+8|0;a[c[h>>2]>>0]=a[d>>0]|0;c[h>>2]=(c[h>>2]|0)+1;o=0;Xa(201,b|0,e|0);h=o;o=0;if(h&1){m=Fb()|0;xq(e);Qb(m|0)}else{xq(e);l=i;return}}function vq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;if(!b)e=0;else e=aU(b)|0;c[a>>2]=e;d=e+d|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+b;return}function wq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;h=a+4|0;g=b+4|0;f=(c[h>>2]|0)-e|0;d=(c[g>>2]|0)+(0-f)|0;c[g>>2]=d;if((f|0)>0){wW(d|0,e|0,f|0)|0;e=g;d=c[g>>2]|0}else e=g;g=c[a>>2]|0;c[a>>2]=d;c[e>>2]=g;g=b+8|0;f=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=f;g=a+8|0;h=b+12|0;a=c[g>>2]|0;c[g>>2]=c[h>>2];c[h>>2]=a;c[b>>2]=c[e>>2];return}function xq(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+4>>2]|0;d=a+8|0;e=c[d>>2]|0;while(1){if((e|0)==(b|0))break;f=e+-1|0;c[d>>2]=f;e=f}cU(c[a>>2]|0);return}function yq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;e=a+4|0;a=d-b|0;if((a|0)>0){wW(c[e>>2]|0,b|0,a|0)|0;c[e>>2]=(c[e>>2]|0)+a}return}function zq(a){a=a|0;return c[a+24>>2]|0}function Aq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;d=d+-1+(b<<8)|0;b=(d|0)/1600|0;c[e>>2]=b;d=(O(b,-1600)|0)+d|0;b=(d|0)/40|0;c[e+4>>2]=b;c[e+8>>2]=(O(b,-40)|0)+d;return}function Bq(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function Cq(a){a=a|0;c[a>>2]=5924;Nd(a+8|0);ff(a);return}function Dq(a){a=a|0;Cq(a);cU(a);return}function Eq(a){a=a|0;var b=0,c=0;c=l;l=l+16|0;b=c;dj(b,58704);o=0;Xa(137,a|0,b|0);a=o;o=0;if(a&1){c=Fb()|0;gj(b);Qb(c|0)}else{gj(b);l=c;return}}function Fq(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,m=0,n=0,p=0;m=l;l=l+32|0;n=m+12|0;i=m;j=Ud(Td(d)|0)|0;fj(n,j);h=0;while(1){if((h|0)>=(j|0)){h=3;break}o=0;f=ja(56,d|0,h|0)|0;g=o;o=0;if(g&1){h=7;break}f=a[f>>0]|0;o=0;g=ja(60,n|0,h|0)|0;p=o;o=0;if(p&1){h=7;break}c[g>>2]=f&255;h=h+1|0}a:do if((h|0)==3){o=0;Xa(138,i|0,n|0);p=o;o=0;do if(!(p&1)){o=0;bb(69,b|0,i|0,j-e|0);p=o;o=0;if(p&1){f=Gb(728)|0;g=z;ij(i);break}ij(i);h=0;while(1){if((h|0)>=(e|0)){h=15;break}o=0;f=ja(60,n|0,h|0)|0;p=o;o=0;if(p&1){h=19;break}f=c[f>>2]|0;o=0;g=ja(56,d|0,h|0)|0;p=o;o=0;if(p&1){h=19;break}a[g>>0]=f;h=h+1|0}if((h|0)==15){ij(n);l=m;return}else if((h|0)==19){k=Fb()|0;break a}}else{f=Gb(728)|0;g=z}while(0);if((g|0)==(mc(728)|0)){Bb(f|0)|0;f=Ab(8)|0;dg(f);o=0;bb(68,f|0,144,56);o=0;f=Fb()|0;o=0;La(44);p=o;o=0;if(p&1){p=Gb(0)|0;_g(p)}else k=f}else k=f}else if((h|0)==7)k=Fb()|0;while(0);ij(n);Qb(k|0)} function mZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(18,a|0,+b,+c,+d)|0}function nZ(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return ia(19,a|0,+b,+c,+d)|0}function oZ(a,b,c){a=a|0;b=b|0;c=c|0;return Sc[a&127](b|0,c|0)|0}function pZ(a,b){a=a|0;b=b|0;return ka(0,a|0,b|0)|0}function qZ(a,b){a=a|0;b=b|0;return ka(1,a|0,b|0)|0}function rZ(a,b){a=a|0;b=b|0;return ka(2,a|0,b|0)|0}function sZ(a,b){a=a|0;b=b|0;return ka(3,a|0,b|0)|0}function tZ(a,b){a=a|0;b=b|0;return ka(4,a|0,b|0)|0}function uZ(a,b){a=a|0;b=b|0;return ka(5,a|0,b|0)|0}function vZ(a,b){a=a|0;b=b|0;return ka(6,a|0,b|0)|0}function wZ(a,b){a=a|0;b=b|0;return ka(7,a|0,b|0)|0}function xZ(a,b){a=a|0;b=b|0;return ka(8,a|0,b|0)|0}function yZ(a,b){a=a|0;b=b|0;return ka(9,a|0,b|0)|0}function zZ(a,b){a=a|0;b=b|0;return ka(10,a|0,b|0)|0}function AZ(a,b){a=a|0;b=b|0;return ka(11,a|0,b|0)|0}function BZ(a,b){a=a|0;b=b|0;return ka(12,a|0,b|0)|0}function CZ(a,b){a=a|0;b=b|0;return ka(13,a|0,b|0)|0}function DZ(a,b){a=a|0;b=b|0;return ka(14,a|0,b|0)|0}function EZ(a,b){a=a|0;b=b|0;return ka(15,a|0,b|0)|0}function FZ(a,b){a=a|0;b=b|0;return ka(16,a|0,b|0)|0}function GZ(a,b){a=a|0;b=b|0;return ka(17,a|0,b|0)|0}function HZ(a,b){a=a|0;b=b|0;return ka(18,a|0,b|0)|0}function IZ(a,b){a=a|0;b=b|0;return ka(19,a|0,b|0)|0}function JZ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Tc[a&127](b|0,c|0,d|0)|0}function KZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(0,a|0,b|0,c|0)|0}function LZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(1,a|0,b|0,c|0)|0}function MZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(2,a|0,b|0,c|0)|0}function NZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(3,a|0,b|0,c|0)|0}function OZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(4,a|0,b|0,c|0)|0}function PZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(5,a|0,b|0,c|0)|0}function QZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(6,a|0,b|0,c|0)|0}function RZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(7,a|0,b|0,c|0)|0}function SZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(8,a|0,b|0,c|0)|0}function TZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(9,a|0,b|0,c|0)|0}function UZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(10,a|0,b|0,c|0)|0}function VZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(11,a|0,b|0,c|0)|0}function WZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(12,a|0,b|0,c|0)|0}function XZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(13,a|0,b|0,c|0)|0}function YZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(14,a|0,b|0,c|0)|0}function ZZ(a,b,c){a=a|0;b=b|0;c=c|0;return ma(15,a|0,b|0,c|0)|0}function _Z(a,b,c){a=a|0;b=b|0;c=c|0;return ma(16,a|0,b|0,c|0)|0}function $Z(a,b,c){a=a|0;b=b|0;c=c|0;return ma(17,a|0,b|0,c|0)|0}function a_(a,b,c){a=a|0;b=b|0;c=c|0;return ma(18,a|0,b|0,c|0)|0}function b_(a,b,c){a=a|0;b=b|0;c=c|0;return ma(19,a|0,b|0,c|0)|0}function c_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return Uc[a&63](b|0,c|0,d|0,+e)|0}function d_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(0,a|0,b|0,c|0,+d)|0}function e_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(1,a|0,b|0,c|0,+d)|0}function f_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(2,a|0,b|0,c|0,+d)|0}function g_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(3,a|0,b|0,c|0,+d)|0}function h_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(4,a|0,b|0,c|0,+d)|0}function i_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(5,a|0,b|0,c|0,+d)|0}function j_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(6,a|0,b|0,c|0,+d)|0}function k_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(7,a|0,b|0,c|0,+d)|0}function l_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(8,a|0,b|0,c|0,+d)|0}function m_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(9,a|0,b|0,c|0,+d)|0}function n_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(10,a|0,b|0,c|0,+d)|0}function o_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(11,a|0,b|0,c|0,+d)|0}function p_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(12,a|0,b|0,c|0,+d)|0}function q_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(13,a|0,b|0,c|0,+d)|0}function r_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(14,a|0,b|0,c|0,+d)|0}function s_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(15,a|0,b|0,c|0,+d)|0}function t_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(16,a|0,b|0,c|0,+d)|0}function u_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(17,a|0,b|0,c|0,+d)|0}function v_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(18,a|0,b|0,c|0,+d)|0}function w_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return oa(19,a|0,b|0,c|0,+d)|0}function x_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Vc[a&127](b|0,c|0,d|0,e|0)|0}function y_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(0,a|0,b|0,c|0,d|0)|0}function z_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(1,a|0,b|0,c|0,d|0)|0}function A_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(2,a|0,b|0,c|0,d|0)|0}function B_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(3,a|0,b|0,c|0,d|0)|0}function C_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(4,a|0,b|0,c|0,d|0)|0}function D_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(5,a|0,b|0,c|0,d|0)|0}function E_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(6,a|0,b|0,c|0,d|0)|0}function F_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(7,a|0,b|0,c|0,d|0)|0}function G_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(8,a|0,b|0,c|0,d|0)|0}function H_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(9,a|0,b|0,c|0,d|0)|0}function I_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(10,a|0,b|0,c|0,d|0)|0}function J_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(11,a|0,b|0,c|0,d|0)|0}function K_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(12,a|0,b|0,c|0,d|0)|0}function L_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(13,a|0,b|0,c|0,d|0)|0}function M_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(14,a|0,b|0,c|0,d|0)|0}function N_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(15,a|0,b|0,c|0,d|0)|0}function O_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(16,a|0,b|0,c|0,d|0)|0}function P_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(17,a|0,b|0,c|0,d|0)|0}function Q_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(18,a|0,b|0,c|0,d|0)|0}function R_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa(19,a|0,b|0,c|0,d|0)|0}function S_(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return Wc[a&63](b|0,c|0,d|0,e|0,+f)|0}function T_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(0,a|0,b|0,c|0,d|0,+e)|0}function U_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(1,a|0,b|0,c|0,d|0,+e)|0}function V_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(2,a|0,b|0,c|0,d|0,+e)|0}function W_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(3,a|0,b|0,c|0,d|0,+e)|0}function X_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(4,a|0,b|0,c|0,d|0,+e)|0}function Y_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(5,a|0,b|0,c|0,d|0,+e)|0}function Z_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(6,a|0,b|0,c|0,d|0,+e)|0}function __(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(7,a|0,b|0,c|0,d|0,+e)|0}function $_(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(8,a|0,b|0,c|0,d|0,+e)|0}function a$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(9,a|0,b|0,c|0,d|0,+e)|0}function b$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(10,a|0,b|0,c|0,d|0,+e)|0}function c$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(11,a|0,b|0,c|0,d|0,+e)|0}function d$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(12,a|0,b|0,c|0,d|0,+e)|0}function e$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(13,a|0,b|0,c|0,d|0,+e)|0}function f$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(14,a|0,b|0,c|0,d|0,+e)|0}function g$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(15,a|0,b|0,c|0,d|0,+e)|0}function h$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(16,a|0,b|0,c|0,d|0,+e)|0}function i$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(17,a|0,b|0,c|0,d|0,+e)|0}function j$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(18,a|0,b|0,c|0,d|0,+e)|0}function k$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return sa(19,a|0,b|0,c|0,d|0,+e)|0}function l$(a,b,c,d,e,f,g,h,i,j,k,l,m){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;return Xc[a&63](b|0,c|0,d|0,e|0,+f,+g,+h,+i,+j,+k,+l,+m)|0}function m$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(0,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function n$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(1,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function o$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(2,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function p$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(3,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function q$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(4,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function r$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(5,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function s$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(6,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function t$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(7,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function u$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(8,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function v$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(9,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function w$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(10,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function x$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(11,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function y$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(12,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function z$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(13,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function A$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(14,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function B$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(15,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function C$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(16,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function D$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(17,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function E$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(18,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function F$(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;return ua(19,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l)|0}function G$(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Yc[a&127](b|0,c|0,d|0,e|0,f|0)|0}function H$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(0,a|0,b|0,c|0,d|0,e|0)|0}function I$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(1,a|0,b|0,c|0,d|0,e|0)|0}function J$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(2,a|0,b|0,c|0,d|0,e|0)|0}function K$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(3,a|0,b|0,c|0,d|0,e|0)|0}function L$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(4,a|0,b|0,c|0,d|0,e|0)|0}function M$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(5,a|0,b|0,c|0,d|0,e|0)|0}function N$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(6,a|0,b|0,c|0,d|0,e|0)|0}function O$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(7,a|0,b|0,c|0,d|0,e|0)|0}function P$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(8,a|0,b|0,c|0,d|0,e|0)|0}function Q$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(9,a|0,b|0,c|0,d|0,e|0)|0}function R$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(10,a|0,b|0,c|0,d|0,e|0)|0}function S$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(11,a|0,b|0,c|0,d|0,e|0)|0}function T$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(12,a|0,b|0,c|0,d|0,e|0)|0}function U$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(13,a|0,b|0,c|0,d|0,e|0)|0}function V$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(14,a|0,b|0,c|0,d|0,e|0)|0}function W$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(15,a|0,b|0,c|0,d|0,e|0)|0}function X$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(16,a|0,b|0,c|0,d|0,e|0)|0}function Y$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(17,a|0,b|0,c|0,d|0,e|0)|0}function Z$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(18,a|0,b|0,c|0,d|0,e|0)|0}function _$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa(19,a|0,b|0,c|0,d|0,e|0)|0}function $$(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;return Zc[a&63](b|0,c|0,d|0,e|0,f|0,+g)|0}function a0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(0,a|0,b|0,c|0,d|0,e|0,+f)|0}function b0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(1,a|0,b|0,c|0,d|0,e|0,+f)|0}function c0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(2,a|0,b|0,c|0,d|0,e|0,+f)|0}function d0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(3,a|0,b|0,c|0,d|0,e|0,+f)|0}function e0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(4,a|0,b|0,c|0,d|0,e|0,+f)|0}function f0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(5,a|0,b|0,c|0,d|0,e|0,+f)|0}function g0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(6,a|0,b|0,c|0,d|0,e|0,+f)|0}function h0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(7,a|0,b|0,c|0,d|0,e|0,+f)|0}function i0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(8,a|0,b|0,c|0,d|0,e|0,+f)|0}function j0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(9,a|0,b|0,c|0,d|0,e|0,+f)|0}function k0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(10,a|0,b|0,c|0,d|0,e|0,+f)|0}function l0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(11,a|0,b|0,c|0,d|0,e|0,+f)|0}function m0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(12,a|0,b|0,c|0,d|0,e|0,+f)|0}function n0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(13,a|0,b|0,c|0,d|0,e|0,+f)|0}function o0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(14,a|0,b|0,c|0,d|0,e|0,+f)|0}function p0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(15,a|0,b|0,c|0,d|0,e|0,+f)|0}function q0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(16,a|0,b|0,c|0,d|0,e|0,+f)|0}function r0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(17,a|0,b|0,c|0,d|0,e|0,+f)|0}function s0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(18,a|0,b|0,c|0,d|0,e|0,+f)|0}function t0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return ya(19,a|0,b|0,c|0,d|0,e|0,+f)|0}function u0(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 _c[a&127](b|0,c|0,d|0,e|0,f|0,g|0)|0}function v0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(0,a|0,b|0,c|0,d|0,e|0,f|0)|0}function w0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(1,a|0,b|0,c|0,d|0,e|0,f|0)|0}function x0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(2,a|0,b|0,c|0,d|0,e|0,f|0)|0}function y0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(3,a|0,b|0,c|0,d|0,e|0,f|0)|0}function z0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(4,a|0,b|0,c|0,d|0,e|0,f|0)|0}function A0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(5,a|0,b|0,c|0,d|0,e|0,f|0)|0}function B0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(6,a|0,b|0,c|0,d|0,e|0,f|0)|0}function C0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(7,a|0,b|0,c|0,d|0,e|0,f|0)|0}function D0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(8,a|0,b|0,c|0,d|0,e|0,f|0)|0}function E0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(9,a|0,b|0,c|0,d|0,e|0,f|0)|0}function F0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(10,a|0,b|0,c|0,d|0,e|0,f|0)|0}function G0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(11,a|0,b|0,c|0,d|0,e|0,f|0)|0}function H0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(12,a|0,b|0,c|0,d|0,e|0,f|0)|0}function I0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(13,a|0,b|0,c|0,d|0,e|0,f|0)|0}function J0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(14,a|0,b|0,c|0,d|0,e|0,f|0)|0}function K0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(15,a|0,b|0,c|0,d|0,e|0,f|0)|0}function L0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(16,a|0,b|0,c|0,d|0,e|0,f|0)|0}function M0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(17,a|0,b|0,c|0,d|0,e|0,f|0)|0}function N0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(18,a|0,b|0,c|0,d|0,e|0,f|0)|0}function O0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Aa(19,a|0,b|0,c|0,d|0,e|0,f|0)|0}function P0(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return $c[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Q0(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 Ca(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function R0(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 Ca(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function S0(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 Ca(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function T0(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 Ca(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function U0(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 Ca(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function V0(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 Ca(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function W0(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 Ca(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function X0(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 Ca(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function Y0(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 Ca(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function Z0(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 Ca(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function _0(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 Ca(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function $0(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 Ca(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function a1(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 Ca(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function b1(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 Ca(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function c1(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 Ca(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function d1(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 Ca(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function e1(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 Ca(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function f1(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 Ca(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function g1(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 Ca(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function h1(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 Ca(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0)|0}function i1(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;return ad[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)|0}function j1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function k1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function l1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function m1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function n1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function o1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function p1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function q1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function r1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function s1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function t1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function u1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function v1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function w1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function x1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function y1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function z1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function A1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function B1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function C1(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ea(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function D1(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return bd[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function E1(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;return Ga(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function F1(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;return Ga(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function G1(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;return Ga(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function H1(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;return Ga(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function I1(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;return Ga(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function J1(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;return Ga(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function K1(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;return Ga(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function L1(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;return Ga(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function M1(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;return Ga(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function N1(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;return Ga(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function O1(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;return Ga(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function P1(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;return Ga(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function Q1(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;return Ga(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function R1(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;return Ga(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function S1(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;return Ga(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function T1(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;return Ga(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function U1(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;return Ga(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function V1(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;return Ga(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function W1(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;return Ga(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function X1(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;return Ga(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function Y1(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return cd[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function Z1(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function _1(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function $1(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function a2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function b2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function c2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function d2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function e2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function f2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function g2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function h2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function i2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function j2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function k2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function l2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function m2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function n2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function o2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function p2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function q2(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;return Ia(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function r2(a,b,c,d,e,f,g,h,i,j,k,l,m){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;k=k|0;l=l|0;m=m|0;return dd[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0,m|0)|0}function s2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(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)|0}function t2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function u2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function v2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function w2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function x2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function y2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function z2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function A2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function B2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function C2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function D2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function E2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function F2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function G2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function H2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function I2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function J2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function K2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function L2(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Ka(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function M2(a){a=a|0;ed[a&127]()}function N2(){Ma(0)}function O2(){Ma(1)}function P2(){Ma(2)}function Q2(){Ma(3)}function R2(){Ma(4)}function S2(){Ma(5)}function T2(){Ma(6)}function U2(){Ma(7)}function V2(){Ma(8)}function W2(){Ma(9)}function X2(){Ma(10)}function Y2(){Ma(11)}function Z2(){Ma(12)}function _2(){Ma(13)}function $2(){Ma(14)}function a3(){Ma(15)}function b3(){Ma(16)}function c3(){Ma(17)}function d3(){Ma(18)}function e3(){Ma(19)}function f3(a,b){a=a|0;b=b|0;fd[a&511](b|0)}function g3(a){a=a|0;Oa(0,a|0)}function h3(a){a=a|0;Oa(1,a|0)}function i3(a){a=a|0;Oa(2,a|0)}function j3(a){a=a|0;Oa(3,a|0)}function k3(a){a=a|0;Oa(4,a|0)}function l3(a){a=a|0;Oa(5,a|0)}function m3(a){a=a|0;Oa(6,a|0)}function n3(a){a=a|0;Oa(7,a|0)}function o3(a){a=a|0;Oa(8,a|0)}function p3(a){a=a|0;Oa(9,a|0)}function q3(a){a=a|0;Oa(10,a|0)}function r3(a){a=a|0;Oa(11,a|0)}function s3(a){a=a|0;Oa(12,a|0)}function t3(a){a=a|0;Oa(13,a|0)}function u3(a){a=a|0;Oa(14,a|0)}function v3(a){a=a|0;Oa(15,a|0)}function w3(a){a=a|0;Oa(16,a|0)}function x3(a){a=a|0;Oa(17,a|0)}function y3(a){a=a|0;Oa(18,a|0)}function z3(a){a=a|0;Oa(19,a|0)}function A3(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;gd[a&63](b|0,+c,+d)}function B3(a,b,c){a=a|0;b=+b;c=+c;Qa(0,a|0,+b,+c)}function C3(a,b,c){a=a|0;b=+b;c=+c;Qa(1,a|0,+b,+c)}function D3(a,b,c){a=a|0;b=+b;c=+c;Qa(2,a|0,+b,+c)}function E3(a,b,c){a=a|0;b=+b;c=+c;Qa(3,a|0,+b,+c)}function F3(a,b,c){a=a|0;b=+b;c=+c;Qa(4,a|0,+b,+c)}function G3(a,b,c){a=a|0;b=+b;c=+c;Qa(5,a|0,+b,+c)}function H3(a,b,c){a=a|0;b=+b;c=+c;Qa(6,a|0,+b,+c)}function I3(a,b,c){a=a|0;b=+b;c=+c;Qa(7,a|0,+b,+c)}function J3(a,b,c){a=a|0;b=+b;c=+c;Qa(8,a|0,+b,+c)}function K3(a,b,c){a=a|0;b=+b;c=+c;Qa(9,a|0,+b,+c)}function L3(a,b,c){a=a|0;b=+b;c=+c;Qa(10,a|0,+b,+c)}function M3(a,b,c){a=a|0;b=+b;c=+c;Qa(11,a|0,+b,+c)}function N3(a,b,c){a=a|0;b=+b;c=+c;Qa(12,a|0,+b,+c)}function O3(a,b,c){a=a|0;b=+b;c=+c;Qa(13,a|0,+b,+c)}function P3(a,b,c){a=a|0;b=+b;c=+c;Qa(14,a|0,+b,+c)}function Q3(a,b,c){a=a|0;b=+b;c=+c;Qa(15,a|0,+b,+c)}function R3(a,b,c){a=a|0;b=+b;c=+c;Qa(16,a|0,+b,+c)}function S3(a,b,c){a=a|0;b=+b;c=+c;Qa(17,a|0,+b,+c)}function T3(a,b,c){a=a|0;b=+b;c=+c;Qa(18,a|0,+b,+c)}function U3(a,b,c){a=a|0;b=+b;c=+c;Qa(19,a|0,+b,+c)}function V3(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;hd[a&63](b|0,+c,+d,+e)}function W3(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(0,a|0,+b,+c,+d)}function X3(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(1,a|0,+b,+c,+d)}function Y3(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(2,a|0,+b,+c,+d)}function Z3(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(3,a|0,+b,+c,+d)}function _3(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(4,a|0,+b,+c,+d)}function $3(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(5,a|0,+b,+c,+d)}function a4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(6,a|0,+b,+c,+d)}function b4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(7,a|0,+b,+c,+d)}function c4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(8,a|0,+b,+c,+d)}function d4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(9,a|0,+b,+c,+d)}function e4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(10,a|0,+b,+c,+d)}function f4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(11,a|0,+b,+c,+d)}function g4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(12,a|0,+b,+c,+d)}function h4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(13,a|0,+b,+c,+d)}function i4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(14,a|0,+b,+c,+d)}function j4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(15,a|0,+b,+c,+d)}function k4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(16,a|0,+b,+c,+d)}function l4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(17,a|0,+b,+c,+d)}function m4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(18,a|0,+b,+c,+d)}function n4(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sa(19,a|0,+b,+c,+d)}function o4(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;id[a&63](b|0,+c,+d,+e,+f,+g,+h,+i,+j)}function p4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(0,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function q4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(1,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function r4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(2,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function s4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(3,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function t4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(4,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function u4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(5,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function v4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(6,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function w4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(7,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function x4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(8,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function y4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(9,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function z4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(10,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function A4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(11,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function B4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(12,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function C4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(13,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function D4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(14,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function E4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(15,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function F4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(16,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function G4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(17,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function H4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(18,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function I4(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;Ua(19,a|0,+b,+c,+d,+e,+f,+g,+h,+i)}function J4(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=+d;e=+e;f=f|0;jd[a&63](b|0,+c,+d,+e,f|0)}function K4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(0,a|0,+b,+c,+d,e|0)}function L4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(1,a|0,+b,+c,+d,e|0)}function M4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(2,a|0,+b,+c,+d,e|0)}function N4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(3,a|0,+b,+c,+d,e|0)}function O4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(4,a|0,+b,+c,+d,e|0)}function P4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(5,a|0,+b,+c,+d,e|0)}function Q4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(6,a|0,+b,+c,+d,e|0)}function R4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(7,a|0,+b,+c,+d,e|0)}function S4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(8,a|0,+b,+c,+d,e|0)}function T4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(9,a|0,+b,+c,+d,e|0)}function U4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(10,a|0,+b,+c,+d,e|0)}function V4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(11,a|0,+b,+c,+d,e|0)}function W4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(12,a|0,+b,+c,+d,e|0)}function X4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(13,a|0,+b,+c,+d,e|0)}function Y4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(14,a|0,+b,+c,+d,e|0)}function Z4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(15,a|0,+b,+c,+d,e|0)}function _4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(16,a|0,+b,+c,+d,e|0)}function $4(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(17,a|0,+b,+c,+d,e|0)}function a5(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(18,a|0,+b,+c,+d,e|0)}function b5(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;Wa(19,a|0,+b,+c,+d,e|0)}function c5(a,b,c){a=a|0;b=b|0;c=c|0;kd[a&511](b|0,c|0)}function d5(a,b){a=a|0;b=b|0;Ya(0,a|0,b|0)}function e5(a,b){a=a|0;b=b|0;Ya(1,a|0,b|0)}function f5(a,b){a=a|0;b=b|0;Ya(2,a|0,b|0)}function g5(a,b){a=a|0;b=b|0;Ya(3,a|0,b|0)}function h5(a,b){a=a|0;b=b|0;Ya(4,a|0,b|0)}function i5(a,b){a=a|0;b=b|0;Ya(5,a|0,b|0)}function j5(a,b){a=a|0;b=b|0;Ya(6,a|0,b|0)}function k5(a,b){a=a|0;b=b|0;Ya(7,a|0,b|0)}function l5(a,b){a=a|0;b=b|0;Ya(8,a|0,b|0)}function m5(a,b){a=a|0;b=b|0;Ya(9,a|0,b|0)}function n5(a,b){a=a|0;b=b|0;Ya(10,a|0,b|0)}function o5(a,b){a=a|0;b=b|0;Ya(11,a|0,b|0)}function p5(a,b){a=a|0;b=b|0;Ya(12,a|0,b|0)}function q5(a,b){a=a|0;b=b|0;Ya(13,a|0,b|0)}function r5(a,b){a=a|0;b=b|0;Ya(14,a|0,b|0)}function s5(a,b){a=a|0;b=b|0;Ya(15,a|0,b|0)}function t5(a,b){a=a|0;b=b|0;Ya(16,a|0,b|0)}function u5(a,b){a=a|0;b=b|0;Ya(17,a|0,b|0)}function v5(a,b){a=a|0;b=b|0;Ya(18,a|0,b|0)}function w5(a,b){a=a|0;b=b|0;Ya(19,a|0,b|0)}function x5(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=+d;e=+e;f=+f;ld[a&63](b|0,c|0,+d,+e,+f)}function y5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(0,a|0,b|0,+c,+d,+e)}function z5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(1,a|0,b|0,+c,+d,+e)}function A5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(2,a|0,b|0,+c,+d,+e)}function B5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(3,a|0,b|0,+c,+d,+e)}function C5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(4,a|0,b|0,+c,+d,+e)}function D5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(5,a|0,b|0,+c,+d,+e)}function E5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(6,a|0,b|0,+c,+d,+e)}function F5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(7,a|0,b|0,+c,+d,+e)}function G5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(8,a|0,b|0,+c,+d,+e)}function H5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(9,a|0,b|0,+c,+d,+e)}function I5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(10,a|0,b|0,+c,+d,+e)}function J5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(11,a|0,b|0,+c,+d,+e)}function K5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(12,a|0,b|0,+c,+d,+e)}function L5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(13,a|0,b|0,+c,+d,+e)}function M5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(14,a|0,b|0,+c,+d,+e)}function N5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(15,a|0,b|0,+c,+d,+e)}function O5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(16,a|0,b|0,+c,+d,+e)}function P5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(17,a|0,b|0,+c,+d,+e)}function Q5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(18,a|0,b|0,+c,+d,+e)}function R5(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;_a(19,a|0,b|0,+c,+d,+e)}function S5(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;f=f|0;g=+g;md[a&63](b|0,c|0,+d,e|0,f|0,+g)}function T5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(0,a|0,b|0,+c,d|0,e|0,+f)}function U5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(1,a|0,b|0,+c,d|0,e|0,+f)}function V5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(2,a|0,b|0,+c,d|0,e|0,+f)}function W5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(3,a|0,b|0,+c,d|0,e|0,+f)}function X5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(4,a|0,b|0,+c,d|0,e|0,+f)}function Y5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(5,a|0,b|0,+c,d|0,e|0,+f)}function Z5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(6,a|0,b|0,+c,d|0,e|0,+f)}function _5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(7,a|0,b|0,+c,d|0,e|0,+f)}function $5(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(8,a|0,b|0,+c,d|0,e|0,+f)}function a6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(9,a|0,b|0,+c,d|0,e|0,+f)}function b6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(10,a|0,b|0,+c,d|0,e|0,+f)}function c6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(11,a|0,b|0,+c,d|0,e|0,+f)}function d6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(12,a|0,b|0,+c,d|0,e|0,+f)}function e6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(13,a|0,b|0,+c,d|0,e|0,+f)}function f6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(14,a|0,b|0,+c,d|0,e|0,+f)}function g6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(15,a|0,b|0,+c,d|0,e|0,+f)}function h6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(16,a|0,b|0,+c,d|0,e|0,+f)}function i6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(17,a|0,b|0,+c,d|0,e|0,+f)}function j6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(18,a|0,b|0,+c,d|0,e|0,+f)}function k6(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;ab(19,a|0,b|0,+c,d|0,e|0,+f)}function l6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;nd[a&255](b|0,c|0,d|0)}function m6(a,b,c){a=a|0;b=b|0;c=c|0;cb(0,a|0,b|0,c|0)}function n6(a,b,c){a=a|0;b=b|0;c=c|0;cb(1,a|0,b|0,c|0)}function o6(a,b,c){a=a|0;b=b|0;c=c|0;cb(2,a|0,b|0,c|0)}function p6(a,b,c){a=a|0;b=b|0;c=c|0;cb(3,a|0,b|0,c|0)}function q6(a,b,c){a=a|0;b=b|0;c=c|0;cb(4,a|0,b|0,c|0)}function r6(a,b,c){a=a|0;b=b|0;c=c|0;cb(5,a|0,b|0,c|0)}function s6(a,b,c){a=a|0;b=b|0;c=c|0;cb(6,a|0,b|0,c|0)}function t6(a,b,c){a=a|0;b=b|0;c=c|0;cb(7,a|0,b|0,c|0)}function u6(a,b,c){a=a|0;b=b|0;c=c|0;cb(8,a|0,b|0,c|0)}function v6(a,b,c){a=a|0;b=b|0;c=c|0;cb(9,a|0,b|0,c|0)}function w6(a,b,c){a=a|0;b=b|0;c=c|0;cb(10,a|0,b|0,c|0)}function x6(a,b,c){a=a|0;b=b|0;c=c|0;cb(11,a|0,b|0,c|0)}function y6(a,b,c){a=a|0;b=b|0;c=c|0;cb(12,a|0,b|0,c|0)}function z6(a,b,c){a=a|0;b=b|0;c=c|0;cb(13,a|0,b|0,c|0)}function A6(a,b,c){a=a|0;b=b|0;c=c|0;cb(14,a|0,b|0,c|0)}function B6(a,b,c){a=a|0;b=b|0;c=c|0;cb(15,a|0,b|0,c|0)}function C6(a,b,c){a=a|0;b=b|0;c=c|0;cb(16,a|0,b|0,c|0)}function D6(a,b,c){a=a|0;b=b|0;c=c|0;cb(17,a|0,b|0,c|0)}function E6(a,b,c){a=a|0;b=b|0;c=c|0;cb(18,a|0,b|0,c|0)}function F6(a,b,c){a=a|0;b=b|0;c=c|0;cb(19,a|0,b|0,c|0)}function G6(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;od[a&127](b|0,c|0,d|0,e|0)}function H6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(0,a|0,b|0,c|0,d|0)}function I6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(1,a|0,b|0,c|0,d|0)}function J6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(2,a|0,b|0,c|0,d|0)}function K6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(3,a|0,b|0,c|0,d|0)}function L6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(4,a|0,b|0,c|0,d|0)}function M6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(5,a|0,b|0,c|0,d|0)}function N6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(6,a|0,b|0,c|0,d|0)}function O6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(7,a|0,b|0,c|0,d|0)}function P6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(8,a|0,b|0,c|0,d|0)}function Q6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(9,a|0,b|0,c|0,d|0)}function R6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(10,a|0,b|0,c|0,d|0)}function S6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(11,a|0,b|0,c|0,d|0)}function T6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(12,a|0,b|0,c|0,d|0)}function U6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(13,a|0,b|0,c|0,d|0)}function V6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(14,a|0,b|0,c|0,d|0)}function W6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(15,a|0,b|0,c|0,d|0)}function X6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(16,a|0,b|0,c|0,d|0)}function Y6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(17,a|0,b|0,c|0,d|0)}function Z6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(18,a|0,b|0,c|0,d|0)}function _6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;eb(19,a|0,b|0,c|0,d|0)}function $6(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;u=+u;pd[a&63](b|0,c|0,d|0,e|0,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t,+u)}function a7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(0,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function b7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(1,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function c7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(2,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function d7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(3,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function e7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(4,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function f7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(5,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function g7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(6,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function h7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(7,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function i7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(8,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function j7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(9,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function k7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(10,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function l7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(11,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function m7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(12,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function n7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(13,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function o7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(14,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function p7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(15,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function q7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(16,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function r7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(17,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function s7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(18,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function t7(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;gb(19,a|0,b|0,c|0,d|0,+e,+f,+g,+h,+i,+j,+k,+l,+m,+n,+o,+p,+q,+r,+s,+t)}function u7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;qd[a&63](b|0,c|0,d|0,e|0,f|0)}function v7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(0,a|0,b|0,c|0,d|0,e|0)}function w7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(1,a|0,b|0,c|0,d|0,e|0)}function x7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(2,a|0,b|0,c|0,d|0,e|0)}function y7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(3,a|0,b|0,c|0,d|0,e|0)}function z7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(4,a|0,b|0,c|0,d|0,e|0)}function A7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(5,a|0,b|0,c|0,d|0,e|0)}function B7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(6,a|0,b|0,c|0,d|0,e|0)}function C7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(7,a|0,b|0,c|0,d|0,e|0)}function D7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(8,a|0,b|0,c|0,d|0,e|0)}function E7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(9,a|0,b|0,c|0,d|0,e|0)}function F7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(10,a|0,b|0,c|0,d|0,e|0)}function G7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(11,a|0,b|0,c|0,d|0,e|0)}function H7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(12,a|0,b|0,c|0,d|0,e|0)}function I7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(13,a|0,b|0,c|0,d|0,e|0)}function J7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(14,a|0,b|0,c|0,d|0,e|0)}function K7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(15,a|0,b|0,c|0,d|0,e|0)}function L7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(16,a|0,b|0,c|0,d|0,e|0)}function M7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(17,a|0,b|0,c|0,d|0,e|0)}function N7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(18,a|0,b|0,c|0,d|0,e|0)}function O7(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ib(19,a|0,b|0,c|0,d|0,e|0)}function P7(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;rd[a&63](b|0,c|0,d|0,e|0,f|0,g|0)}function Q7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(0,a|0,b|0,c|0,d|0,e|0,f|0)}function R7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(1,a|0,b|0,c|0,d|0,e|0,f|0)}function S7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(2,a|0,b|0,c|0,d|0,e|0,f|0)}function T7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(3,a|0,b|0,c|0,d|0,e|0,f|0)}function U7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(4,a|0,b|0,c|0,d|0,e|0,f|0)}function V7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(5,a|0,b|0,c|0,d|0,e|0,f|0)}function W7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(6,a|0,b|0,c|0,d|0,e|0,f|0)}function X7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(7,a|0,b|0,c|0,d|0,e|0,f|0)}function Y7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(8,a|0,b|0,c|0,d|0,e|0,f|0)}function Z7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(9,a|0,b|0,c|0,d|0,e|0,f|0)}function _7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(10,a|0,b|0,c|0,d|0,e|0,f|0)}function $7(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(11,a|0,b|0,c|0,d|0,e|0,f|0)}function a8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(12,a|0,b|0,c|0,d|0,e|0,f|0)}function b8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(13,a|0,b|0,c|0,d|0,e|0,f|0)}function c8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(14,a|0,b|0,c|0,d|0,e|0,f|0)}function d8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(15,a|0,b|0,c|0,d|0,e|0,f|0)}function e8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(16,a|0,b|0,c|0,d|0,e|0,f|0)}function f8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(17,a|0,b|0,c|0,d|0,e|0,f|0)}function g8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(18,a|0,b|0,c|0,d|0,e|0,f|0)}function h8(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;kb(19,a|0,b|0,c|0,d|0,e|0,f|0)}function i8(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;i=i|0;sd[a&63](b|0,c|0,d|0,e|0,f|0,g|0,+h,i|0)}function j8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(0,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function k8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(1,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function l8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(2,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function m8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(3,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function n8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(4,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function o8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(5,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function p8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(6,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function q8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(7,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function r8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(8,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function s8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(9,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function t8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(10,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function u8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(11,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function v8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(12,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function w8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(13,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function x8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(14,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function y8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(15,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function z8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(16,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function A8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(17,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function B8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(18,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function C8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;mb(19,a|0,b|0,c|0,d|0,e|0,f|0,+g,h|0)}function D8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;td[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function E8(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;ob(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function F8(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;ob(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function G8(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;ob(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function H8(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;ob(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function I8(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;ob(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function J8(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;ob(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function K8(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;ob(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function L8(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;ob(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function M8(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;ob(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function N8(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;ob(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function O8(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;ob(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function P8(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;ob(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function Q8(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;ob(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function R8(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;ob(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function S8(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;ob(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function T8(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;ob(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function U8(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;ob(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function V8(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;ob(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function W8(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;ob(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function X8(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;ob(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0)}function Y8(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;ud[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function Z8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function _8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function $8(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function a9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function b9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function c9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function d9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function e9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function f9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function g9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function h9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function i9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function j9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function k9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function l9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function m9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function n9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function o9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function p9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function q9(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;qb(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function r9(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;vd[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function s9(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;sb(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function t9(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;sb(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function u9(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;sb(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function v9(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;sb(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function w9(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;sb(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function x9(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;sb(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function y9(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;sb(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function z9(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;sb(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function A9(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;sb(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function B9(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;sb(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function C9(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;sb(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function D9(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;sb(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function E9(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;sb(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function F9(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;sb(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function G9(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;sb(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function H9(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;sb(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function I9(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;sb(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function J9(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;sb(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function K9(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;sb(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function L9(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;sb(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function M9(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;wd[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function N9(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;ub(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function O9(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;ub(1,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function P9(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;ub(2,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Q9(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;ub(3,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function R9(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;ub(4,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function S9(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;ub(5,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function T9(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;ub(6,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function U9(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;ub(7,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function V9(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;ub(8,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function W9(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;ub(9,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function X9(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;ub(10,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Y9(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;ub(11,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Z9(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;ub(12,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function _9(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;ub(13,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function $9(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;ub(14,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function aaa(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;ub(15,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function baa(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;ub(16,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function caa(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;ub(17,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function daa(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;ub(18,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function eaa(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;ub(19,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function faa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;xd[a&63](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)}function gaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(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)}function haa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(1,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)}function iaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(2,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)}function jaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(3,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)}function kaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(4,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)}function laa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(5,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)}function maa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(6,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)}function naa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(7,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)}function oaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(8,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)}function paa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(9,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)}function qaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(10,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)}function raa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(11,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)}function saa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(12,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)}function taa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(13,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)}function uaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(14,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)}function vaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(15,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)}function waa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(16,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)}function xaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(17,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)}function yaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(18,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)}function zaa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;wb(19,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)}function Aaa(a){a=a|0;S(0);return 0.0}function Baa(a,b){a=a|0;b=b|0;S(1);return 0.0}function Caa(a,b,c){a=a|0;b=b|0;c=c|0;S(2);return 0.0}function Daa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;S(3);return 0.0}function Eaa(){S(4);return 0}function Faa(a){a=a|0;S(5);return 0}function Gaa(a){a=a|0;return BW(a|0)|0}function Haa(a){a=a|0;return AW(a|0)|0}function Iaa(a){a=a|0;return zW(a|0)|0}function Jaa(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;S(6);return 0}function Kaa(a,b){a=a|0;b=b|0;S(7);return 0}function Laa(a,b,c){a=a|0;b=b|0;c=c|0;S(8);return 0}function Maa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;S(9);return 0}function Naa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;S(10);return 0}function Oaa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;S(11);return 0}function Paa(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;S(12);return 0}function Qaa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;S(13);return 0}function Raa(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;S(14);return 0}function Saa(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;S(15);return 0}function Taa(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;S(16);return 0}function Uaa(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;S(17);return 0}function Vaa(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;S(18);return 0}function Waa(a,b,c,d,e,f,g,h,i,j,k){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;k=k|0;S(19);return 0}function Xaa(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;S(20);return 0}function Yaa(){S(21)}function Zaa(){Kb()}function _aa(){Db()}function $aa(){Lb()}function aba(a){a=a|0;S(22)}function bba(a,b,c){a=a|0;b=+b;c=+c;S(23)}function cba(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;S(24)}function dba(a,b,c,d,e,f,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;g=+g;h=+h;i=+i;S(25)}function eba(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=e|0;S(26)}function fba(a,b){a=a|0;b=b|0;S(27)}function gba(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;S(28)}function hba(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=+f;S(29)}function iba(a,b,c){a=a|0;b=b|0;c=c|0;S(30)}function jba(a,b,c){a=a|0;b=b|0;c=c|0;Mb(a|0,b|0,c|0)}function kba(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;S(31)}function lba(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r;s=+s;t=+t;S(32)}function mba(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;S(33)}function nba(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;S(34)}function oba(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;h=h|0;S(35)}function pba(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;S(36)}function qba(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;S(37)}function rba(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;S(38)}function sba(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;S(39)}function tba(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){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;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;S(40)} function mB(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,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;Z=l;l=l+800|0;X=Z+768|0;Y=Z+736|0;W=Z+704|0;V=Z+672|0;U=Z+640|0;T=Z+608|0;S=Z+584|0;R=Z+560|0;Q=Z+536|0;P=Z+512|0;O=Z+488|0;N=Z+464|0;M=Z+440|0;L=Z+416|0;K=Z+392|0;J=Z+368|0;I=Z+344|0;H=Z+320|0;G=Z+296|0;F=Z+272|0;E=Z+256|0;D=Z+240|0;C=Z+224|0;B=Z+208|0;A=Z+192|0;z=Z+176|0;y=Z+160|0;x=Z+144|0;w=Z+128|0;v=Z+112|0;u=Z+96|0;t=Z+80|0;s=Z+64|0;r=Z+48|0;q=Z+40|0;p=Z+32|0;n=Z+24|0;m=Z+16|0;k=Z+8|0;j=Z;h=Z+796|0;i=aU(32)|0;o=0;f=ja(101,0,j|0)|0;e=o;o=0;a:do if(!(e&1)?(o=0,g=fa(107,16)|0,e=o,o=0,!(e&1)):0){o=0;a=fa(107,8)|0;e=o;o=0;if(!(e&1)?(oB(a,1,19),o=0,bb(137,g|0,7,a|0),e=o,o=0,!(e&1)):0){o=0;e=fa(107,16)|0;d=o;o=0;if(d&1){_=810;break}o=0;a=fa(107,8)|0;d=o;o=0;if(!(d&1)?(oB(a,1,16),o=0,bb(137,e|0,10,a|0),d=o,o=0,!(d&1)):0){o=0;d=fa(107,16)|0;b=o;o=0;if(b&1){_=810;break}o=0;a=fa(107,8)|0;b=o;o=0;if(!(b&1)?(oB(a,1,13),o=0,bb(137,d|0,13,a|0),b=o,o=0,!(b&1)):0){o=0;a=fa(107,16)|0;b=o;o=0;if(b&1){_=810;break}o=0;b=fa(107,8)|0;$=o;o=0;if(!($&1)?(oB(b,1,9),o=0,bb(137,a|0,17,b|0),$=o,o=0,!($&1)):0){o=0;nb(49,i|0,1,f|0,g|0,e|0,d|0,a|0);$=o;o=0;if($&1){_=810;break}rB(h,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,h);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,h|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(h);_=817;break a}while(0);uB(h);h=aU(32)|0;o=0;c[k>>2]=6;c[k+4>>2]=18;f=ja(101,2,k|0)|0;$=o;o=0;b:do if($&1)_=818;else{o=0;g=fa(107,16)|0;$=o;o=0;if($&1){_=818;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,34);o=0;bb(137,g|0,10,a|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=818;break b}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,28);o=0;bb(137,e|0,16,a|0);$=o;o=0;if($&1)break;o=0;d=fa(107,16)|0;$=o;o=0;if($&1){_=818;break b}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,22);o=0;bb(137,d|0,22,a|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=818;break b}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,1,16);o=0;bb(137,a|0,28,b|0);$=o;o=0;if($&1)break;o=0;nb(49,h|0,2,f|0,g|0,e|0,d|0,a|0);$=o;o=0;if($&1){_=818;break b}rB(j,h);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,j);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,j|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(j);break b}while(0);uB(j);h=aU(32)|0;o=0;c[m>>2]=6;c[m+4>>2]=22;f=ja(101,2,m|0)|0;$=o;o=0;c:do if($&1)_=826;else{o=0;g=fa(107,16)|0;$=o;o=0;if($&1){_=826;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,55);o=0;bb(137,g|0,15,a|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=826;break c}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,44);o=0;bb(137,e|0,26,a|0);$=o;o=0;if($&1)break;o=0;d=fa(107,16)|0;$=o;o=0;if($&1){_=826;break c}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,17);o=0;bb(137,d|0,18,a|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=826;break c}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,2,13);o=0;bb(137,a|0,22,b|0);$=o;o=0;if($&1)break;o=0;nb(49,h|0,3,f|0,g|0,e|0,d|0,a|0);$=o;o=0;if($&1){_=826;break c}rB(k,h);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,k);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,k|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(k);break c}while(0);uB(k);h=aU(32)|0;o=0;c[n>>2]=6;c[n+4>>2]=26;f=ja(101,2,n|0)|0;$=o;o=0;d:do if($&1)_=834;else{o=0;g=fa(107,16)|0;$=o;o=0;if($&1){_=834;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,80);o=0;bb(137,g|0,20,a|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=834;break d}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,32);o=0;bb(137,e|0,18,a|0);$=o;o=0;if($&1)break;o=0;d=fa(107,16)|0;$=o;o=0;if($&1){_=834;break d}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,24);o=0;bb(137,d|0,26,a|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=834;break d}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,4,9);o=0;bb(137,a|0,16,b|0);$=o;o=0;if($&1)break;o=0;nb(49,h|0,4,f|0,g|0,e|0,d|0,a|0);$=o;o=0;if($&1){_=834;break d}rB(m,h);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,m);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,m|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(m);break d}while(0);uB(m);i=aU(32)|0;o=0;c[p>>2]=6;c[p+4>>2]=30;g=ja(101,2,p|0)|0;$=o;o=0;e:do if($&1)_=842;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=842;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,108);o=0;bb(137,h|0,26,a|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=842;break e}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,43);o=0;bb(137,f|0,24,a|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=842;break e}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,15);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,16);o=0;db(100,e|0,18,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=842;break e}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,2,11);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,2,12);o=0;db(100,a|0,22,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,5,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=842;break e}rB(n,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,n);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,n|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(n);break e}while(0);uB(n);h=aU(32)|0;o=0;c[q>>2]=6;c[q+4>>2]=34;f=ja(101,2,q|0)|0;$=o;o=0;f:do if($&1)_=850;else{o=0;g=fa(107,16)|0;$=o;o=0;if($&1){_=850;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,68);o=0;bb(137,g|0,18,a|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=850;break f}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,27);o=0;bb(137,e|0,16,a|0);$=o;o=0;if($&1)break;o=0;d=fa(107,16)|0;$=o;o=0;if($&1){_=850;break f}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,19);o=0;bb(137,d|0,24,a|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=850;break f}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,4,15);o=0;bb(137,a|0,28,b|0);$=o;o=0;if($&1)break;o=0;nb(49,h|0,6,f|0,g|0,e|0,d|0,a|0);$=o;o=0;if($&1){_=850;break f}rB(p,h);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,p);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,p|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(p);break f}while(0);uB(p);i=aU(32)|0;o=0;c[r>>2]=6;c[r+4>>2]=22;c[r+8>>2]=38;g=ja(101,3,r|0)|0;$=o;o=0;g:do if($&1)_=858;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=858;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,78);o=0;bb(137,h|0,20,a|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=858;break g}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,31);o=0;bb(137,f|0,18,a|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=858;break g}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,14);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,15);o=0;db(100,e|0,18,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=858;break g}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,4,13);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,1,14);o=0;db(100,a|0,26,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,7,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=858;break g}rB(q,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,q);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,q|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(q);break g}while(0);uB(q);i=aU(32)|0;o=0;c[s>>2]=6;c[s+4>>2]=24;c[s+8>>2]=42;g=ja(101,3,s|0)|0;$=o;o=0;h:do if($&1)_=866;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=866;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,97);o=0;bb(137,h|0,24,a|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=866;break h}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,38);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,39);o=0;db(100,f|0,22,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=866;break h}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,18);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,19);o=0;db(100,e|0,22,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=866;break h}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,4,14);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,2,15);o=0;db(100,a|0,26,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,8,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=866;break h}rB(r,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,r);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,r|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(r);break h}while(0);uB(r);i=aU(32)|0;o=0;c[t>>2]=6;c[t+4>>2]=26;c[t+8>>2]=46;g=ja(101,3,t|0)|0;$=o;o=0;i:do if($&1)_=874;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=874;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,116);o=0;bb(137,h|0,30,a|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=874;break i}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,36);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,37);o=0;db(100,f|0,22,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=874;break i}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,16);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,17);o=0;db(100,e|0,20,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=874;break i}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,4,12);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,4,13);o=0;db(100,a|0,24,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,9,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=874;break i}rB(s,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,s);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,s|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(s);break i}while(0);uB(s);i=aU(32)|0;o=0;c[u>>2]=6;c[u+4>>2]=28;c[u+8>>2]=50;g=ja(101,3,u|0)|0;$=o;o=0;j:do if($&1)_=882;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=882;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,68);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,69);o=0;db(100,h|0,18,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=882;break j}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,43);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,44);o=0;db(100,f|0,26,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=882;break j}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,6,19);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,20);o=0;db(100,e|0,24,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=882;break j}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,6,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,2,16);o=0;db(100,a|0,28,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,10,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=882;break j}rB(t,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,t);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,t|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(t);break j}while(0);uB(t);i=aU(32)|0;o=0;c[v>>2]=6;c[v+4>>2]=30;c[v+8>>2]=54;g=ja(101,3,v|0)|0;$=o;o=0;k:do if($&1)_=890;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=890;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,81);o=0;bb(137,h|0,20,a|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=890;break k}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,50);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,51);o=0;db(100,f|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=890;break k}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,22);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,23);o=0;db(100,e|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=890;break k}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,3,12);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,8,13);o=0;db(100,a|0,24,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,11,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=890;break k}rB(u,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,u);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,u|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(u);break k}while(0);uB(u);i=aU(32)|0;o=0;c[w>>2]=6;c[w+4>>2]=32;c[w+8>>2]=58;g=ja(101,3,w|0)|0;$=o;o=0;l:do if($&1)_=898;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=898;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,92);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,93);o=0;db(100,h|0,24,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=898;break l}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,6,36);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,37);o=0;db(100,f|0,22,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=898;break l}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,20);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,6,21);o=0;db(100,e|0,26,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=898;break l}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,7,14);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,4,15);o=0;db(100,a|0,28,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,12,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=898;break l}rB(v,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,v);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,v|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(v);break l}while(0);uB(v);i=aU(32)|0;o=0;c[x>>2]=6;c[x+4>>2]=34;c[x+8>>2]=62;g=ja(101,3,x|0)|0;$=o;o=0;m:do if($&1)_=906;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=906;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,107);o=0;bb(137,h|0,26,a|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=906;break m}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,8,37);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,38);o=0;db(100,f|0,22,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=906;break m}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,8,20);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,21);o=0;db(100,e|0,24,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=906;break m}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,12,11);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,4,12);o=0;db(100,a|0,22,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,13,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=906;break m}rB(w,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,w);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,w|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(w);break m}while(0);uB(w);i=aU(32)|0;o=0;c[y>>2]=6;c[y+4>>2]=26;c[y+8>>2]=46;c[y+12>>2]=66;g=ja(101,4,y|0)|0;$=o;o=0;n:do if($&1)_=914;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=914;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,115);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,116);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=914;break n}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,40);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,5,41);o=0;db(100,f|0,24,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=914;break n}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,11,16);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,5,17);o=0;db(100,e|0,20,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=914;break n}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,11,12);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,5,13);o=0;db(100,a|0,24,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,14,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=914;break n}rB(x,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,x);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,x|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(x);break n}while(0);uB(x);i=aU(32)|0;o=0;c[z>>2]=6;c[z+4>>2]=26;c[z+8>>2]=48;c[z+12>>2]=70;g=ja(101,4,z|0)|0;$=o;o=0;o:do if($&1)_=922;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=922;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,5,87);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,88);o=0;db(100,h|0,22,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=922;break o}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,5,41);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,5,42);o=0;db(100,f|0,24,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=922;break o}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,5,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,7,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=922;break o}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,11,12);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,7,13);o=0;db(100,a|0,24,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,15,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=922;break o}rB(y,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,y);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,y|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(y);break o}while(0);uB(y);i=aU(32)|0;o=0;c[A>>2]=6;c[A+4>>2]=26;c[A+8>>2]=50;c[A+12>>2]=74;g=ja(101,4,A|0)|0;$=o;o=0;p:do if($&1)_=930;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=930;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,5,98);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,99);o=0;db(100,h|0,24,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=930;break p}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,7,45);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,3,46);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=930;break p}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,15,19);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,20);o=0;db(100,e|0,24,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=930;break p}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,3,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,13,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,16,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=930;break p}rB(z,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,z);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,z|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(z);break p}while(0);uB(z);i=aU(32)|0;o=0;c[B>>2]=6;c[B+4>>2]=30;c[B+8>>2]=54;c[B+12>>2]=78;g=ja(101,4,B|0)|0;$=o;o=0;q:do if($&1)_=938;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=938;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,107);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,5,108);o=0;db(100,h|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=938;break q}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,10,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=938;break q}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,22);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,15,23);o=0;db(100,e|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=938;break q}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,2,14);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,17,15);o=0;db(100,a|0,28,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,17,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=938;break q}rB(A,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,A);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,A|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(A);break q}while(0);uB(A);i=aU(32)|0;o=0;c[C>>2]=6;c[C+4>>2]=30;c[C+8>>2]=56;c[C+12>>2]=82;g=ja(101,4,C|0)|0;$=o;o=0;r:do if($&1)_=946;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=946;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,5,120);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,121);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=946;break r}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,9,43);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,44);o=0;db(100,f|0,26,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=946;break r}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,22);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,23);o=0;db(100,e|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=946;break r}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,2,14);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,19,15);o=0;db(100,a|0,28,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,18,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=946;break r}rB(B,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,B);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,B|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(B);break r}while(0);uB(B);i=aU(32)|0;o=0;c[D>>2]=6;c[D+4>>2]=30;c[D+8>>2]=58;c[D+12>>2]=86;g=ja(101,4,D|0)|0;$=o;o=0;s:do if($&1)_=954;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=954;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,113);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,114);o=0;db(100,h|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=954;break s}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,44);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,11,45);o=0;db(100,f|0,26,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=954;break s}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,21);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,22);o=0;db(100,e|0,26,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=954;break s}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,9,13);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,16,14);o=0;db(100,a|0,26,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,19,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=954;break s}rB(C,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,C);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,C|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(C);break s}while(0);uB(C);i=aU(32)|0;o=0;c[E>>2]=6;c[E+4>>2]=34;c[E+8>>2]=62;c[E+12>>2]=90;g=ja(101,4,E|0)|0;$=o;o=0;t:do if($&1)_=962;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=962;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,107);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,5,108);o=0;db(100,h|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=962;break t}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,41);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,13,42);o=0;db(100,f|0,26,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=962;break t}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,15,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,5,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=962;break t}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,15,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,10,16);o=0;db(100,a|0,28,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,20,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=962;break t}rB(D,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,D);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,D|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(D);break t}while(0);uB(D);i=aU(32)|0;o=0;c[F>>2]=6;c[F+4>>2]=28;c[F+8>>2]=50;c[F+12>>2]=72;c[F+16>>2]=94;g=ja(101,5,F|0)|0;$=o;o=0;u:do if($&1)_=970;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=970;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,116);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,117);o=0;db(100,h|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=970;break u}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,42);o=0;bb(137,f|0,26,a|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=970;break u}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,22);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,6,23);o=0;db(100,e|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=970;break u}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,19,16);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,6,17);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,21,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=970;break u}rB(E,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,E);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,E|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(E);break u}while(0);uB(E);h=aU(32)|0;o=0;c[G>>2]=6;c[G+4>>2]=26;c[G+8>>2]=50;c[G+12>>2]=74;c[G+16>>2]=98;f=ja(101,5,G|0)|0;$=o;o=0;v:do if($&1)_=978;else{o=0;g=fa(107,16)|0;$=o;o=0;if($&1){_=978;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,111);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,7,112);o=0;db(100,g|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=978;break v}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,46);o=0;bb(137,e|0,28,a|0);$=o;o=0;if($&1)break;o=0;d=fa(107,16)|0;$=o;o=0;if($&1){_=978;break v}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,7,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,16,25);o=0;db(100,d|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=978;break v}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,34,13);o=0;bb(137,a|0,24,b|0);$=o;o=0;if($&1)break;o=0;nb(49,h|0,22,f|0,g|0,e|0,d|0,a|0);$=o;o=0;if($&1){_=978;break v}rB(F,h);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,F);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,F|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(F);break v}while(0);uB(F);i=aU(32)|0;o=0;c[H>>2]=6;c[H+4>>2]=30;c[H+8>>2]=54;c[H+12>>2]=78;c[H+16>>2]=102;g=ja(101,5,H|0)|0;$=o;o=0;w:do if($&1)_=986;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=986;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,121);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,5,122);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=986;break w}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,47);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,14,48);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=986;break w}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,11,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,14,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=986;break w}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,16,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,14,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,23,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=986;break w}rB(G,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,G);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,G|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(G);break w}while(0);uB(G);i=aU(32)|0;o=0;c[I>>2]=6;c[I+4>>2]=28;c[I+8>>2]=54;c[I+12>>2]=80;c[I+16>>2]=106;g=ja(101,5,I|0)|0;$=o;o=0;x:do if($&1)_=994;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=994;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,6,117);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,118);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=994;break x}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,6,45);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,14,46);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=994;break x}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,11,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,16,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=994;break x}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,30,16);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,2,17);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,24,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=994;break x}rB(H,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,H);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,H|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(H);break x}while(0);uB(H);i=aU(32)|0;o=0;c[J>>2]=6;c[J+4>>2]=32;c[J+8>>2]=58;c[J+12>>2]=84;c[J+16>>2]=110;g=ja(101,5,J|0)|0;$=o;o=0;y:do if($&1)_=1002;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1002;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,8,106);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,107);o=0;db(100,h|0,26,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1002;break y}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,8,47);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,13,48);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1002;break y}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,7,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,22,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1002;break y}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,22,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,13,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,25,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1002;break y}rB(I,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,I);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,I|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(I);break y}while(0);uB(I);i=aU(32)|0;o=0;c[K>>2]=6;c[K+4>>2]=30;c[K+8>>2]=58;c[K+12>>2]=86;c[K+16>>2]=114;g=ja(101,5,K|0)|0;$=o;o=0;z:do if($&1)_=1010;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1010;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,10,114);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,2,115);o=0;db(100,h|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1010;break z}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,19,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1010;break z}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,28,22);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,6,23);o=0;db(100,e|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1010;break z}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,33,16);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,4,17);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,26,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1010;break z}rB(J,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,J);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,J|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(J);break z}while(0);uB(J);i=aU(32)|0;o=0;c[L>>2]=6;c[L+4>>2]=34;c[L+8>>2]=62;c[L+12>>2]=90;c[L+16>>2]=118;g=ja(101,5,L|0)|0;$=o;o=0;A:do if($&1)_=1018;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1018;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,8,122);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,123);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1018;break A}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,22,45);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,3,46);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1018;break A}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,8,23);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,26,24);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1018;break A}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,12,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,28,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,27,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1018;break A}rB(K,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,K);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,K|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(K);break A}while(0);uB(K);i=aU(32)|0;o=0;c[M>>2]=6;c[M+4>>2]=26;c[M+8>>2]=50;c[M+12>>2]=74;c[M+16>>2]=98;c[M+20>>2]=122;g=ja(101,6,M|0)|0;$=o;o=0;B:do if($&1)_=1026;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1026;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,117);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,10,118);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1026;break B}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,3,45);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,23,46);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1026;break B}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,31,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1026;break B}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,11,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,31,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,28,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1026;break B}rB(L,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,L);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,L|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(L);break B}while(0);uB(L);i=aU(32)|0;o=0;c[N>>2]=6;c[N+4>>2]=30;c[N+8>>2]=54;c[N+12>>2]=78;c[N+16>>2]=102;c[N+20>>2]=126;g=ja(101,6,N|0)|0;$=o;o=0;C:do if($&1)_=1034;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1034;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,7,116);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,7,117);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1034;break C}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,21,45);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,7,46);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1034;break C}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,1,23);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,37,24);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1034;break C}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,19,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,26,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,29,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1034;break C}rB(M,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,M);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,M|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(M);break C}while(0);uB(M);i=aU(32)|0;o=0;c[O>>2]=6;c[O+4>>2]=26;c[O+8>>2]=52;c[O+12>>2]=78;c[O+16>>2]=104;c[O+20>>2]=130;g=ja(101,6,O|0)|0;$=o;o=0;D:do if($&1)_=1042;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1042;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,5,115);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,10,116);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1042;break D}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,19,47);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,10,48);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1042;break D}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,15,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,25,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1042;break D}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,23,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,25,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,30,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1042;break D}rB(N,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,N);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,N|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(N);break D}while(0);uB(N);i=aU(32)|0;o=0;c[P>>2]=6;c[P+4>>2]=30;c[P+8>>2]=56;c[P+12>>2]=82;c[P+16>>2]=108;c[P+20>>2]=134;g=ja(101,6,P|0)|0;$=o;o=0;E:do if($&1)_=1050;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1050;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,13,115);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,3,116);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1050;break E}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,2,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,29,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1050;break E}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,42,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1050;break E}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,23,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,28,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,31,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1050;break E}rB(O,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,O);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,O|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(O);break E}while(0);uB(O);i=aU(32)|0;o=0;c[Q>>2]=6;c[Q+4>>2]=34;c[Q+8>>2]=60;c[Q+12>>2]=86;c[Q+16>>2]=112;c[Q+20>>2]=138;g=ja(101,6,Q|0)|0;$=o;o=0;F:do if($&1)_=1058;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1058;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,115);o=0;bb(137,h|0,30,a|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1058;break F}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,10,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,23,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1058;break F}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,10,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,35,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1058;break F}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,19,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,35,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,32,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1058;break F}rB(P,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,P);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,P|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(P);break F}while(0);uB(P);i=aU(32)|0;o=0;c[R>>2]=6;c[R+4>>2]=30;c[R+8>>2]=58;c[R+12>>2]=86;c[R+16>>2]=114;c[R+20>>2]=142;g=ja(101,6,R|0)|0;$=o;o=0;G:do if($&1)_=1066;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1066;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,115);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,1,116);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1066;break G}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,14,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,21,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1066;break G}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,29,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,19,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1066;break G}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,11,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,46,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,33,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1066;break G}rB(Q,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,Q);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,Q|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(Q);break G}while(0);uB(Q);i=aU(32)|0;o=0;c[S>>2]=6;c[S+4>>2]=34;c[S+8>>2]=62;c[S+12>>2]=90;c[S+16>>2]=118;c[S+20>>2]=146;g=ja(101,6,S|0)|0;$=o;o=0;H:do if($&1)_=1074;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1074;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,13,115);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,6,116);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1074;break H}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,14,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,23,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1074;break H}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,44,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,7,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1074;break H}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,59,16);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,1,17);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,34,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1074;break H}rB(R,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,R);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,R|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(R);break H}while(0);uB(R);i=aU(32)|0;o=0;c[T>>2]=6;c[T+4>>2]=30;c[T+8>>2]=54;c[T+12>>2]=78;c[T+16>>2]=102;c[T+20>>2]=126;c[T+24>>2]=150;g=ja(101,7,T|0)|0;$=o;o=0;I:do if($&1)_=1082;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1082;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,12,121);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,7,122);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1082;break I}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,12,47);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,26,48);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1082;break I}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,39,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,14,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1082;break I}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,22,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,41,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,35,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1082;break I}rB(S,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,S);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,S|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(S);break I}while(0);uB(S);i=aU(32)|0;o=0;c[U>>2]=6;c[U+4>>2]=24;c[U+8>>2]=50;c[U+12>>2]=76;c[U+16>>2]=102;c[U+20>>2]=128;c[U+24>>2]=154;g=ja(101,7,U|0)|0;$=o;o=0;J:do if($&1)_=1090;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1090;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,6,121);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,14,122);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1090;break J}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,6,47);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,34,48);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1090;break J}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,46,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,10,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1090;break J}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,2,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,64,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,36,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1090;break J}rB(T,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,T);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,T|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(T);break J}while(0);uB(T);i=aU(32)|0;o=0;c[V>>2]=6;c[V+4>>2]=28;c[V+8>>2]=54;c[V+12>>2]=80;c[V+16>>2]=106;c[V+20>>2]=132;c[V+24>>2]=158;g=ja(101,7,V|0)|0;$=o;o=0;K:do if($&1)_=1098;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1098;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,17,122);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,123);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1098;break K}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,29,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,14,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1098;break K}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,49,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,10,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1098;break K}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,24,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,46,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,37,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1098;break K}rB(U,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,U);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,U|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(U);break K}while(0);uB(U);i=aU(32)|0;o=0;c[W>>2]=6;c[W+4>>2]=32;c[W+8>>2]=58;c[W+12>>2]=84;c[W+16>>2]=110;c[W+20>>2]=136;c[W+24>>2]=162;g=ja(101,7,W|0)|0;$=o;o=0;L:do if($&1)_=1106;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1106;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,4,122);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,18,123);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1106;break L}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,13,46);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,32,47);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1106;break L}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,48,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,14,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1106;break L}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,42,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,32,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,38,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1106;break L}rB(V,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,V);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,V|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(V);break L}while(0);uB(V);i=aU(32)|0;o=0;c[Y>>2]=6;c[Y+4>>2]=26;c[Y+8>>2]=54;c[Y+12>>2]=82;c[Y+16>>2]=110;c[Y+20>>2]=138;c[Y+24>>2]=166;g=ja(101,7,Y|0)|0;$=o;o=0;M:do if($&1)_=1114;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1114;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,20,117);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,4,118);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1114;break M}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,40,47);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,7,48);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1114;break M}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,43,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,22,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1114;break M}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,10,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,67,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,39,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1114;break M}rB(W,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,W);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,W|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(W);break M}while(0);uB(W);i=aU(32)|0;o=0;c[X>>2]=6;c[X+4>>2]=30;c[X+8>>2]=58;c[X+12>>2]=86;c[X+16>>2]=114;c[X+20>>2]=142;c[X+24>>2]=170;g=ja(101,7,X|0)|0;$=o;o=0;N:do if($&1)_=1122;else{o=0;h=fa(107,16)|0;$=o;o=0;if($&1){_=1122;break}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,19,118);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,6,119);o=0;db(100,h|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;f=fa(107,16)|0;$=o;o=0;if($&1){_=1122;break N}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,18,47);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,31,48);o=0;db(100,f|0,28,a|0,b|0);$=o;o=0;if($&1)break;o=0;e=fa(107,16)|0;$=o;o=0;if($&1){_=1122;break N}o=0;a=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(a,34,24);o=0;b=fa(107,8)|0;$=o;o=0;if($&1)break;oB(b,34,25);o=0;db(100,e|0,30,a|0,b|0);$=o;o=0;if($&1)break;o=0;a=fa(107,16)|0;$=o;o=0;if($&1){_=1122;break N}o=0;b=fa(107,8)|0;$=o;o=0;do if(!($&1)){oB(b,20,15);o=0;d=fa(107,8)|0;$=o;o=0;if($&1)break;oB(d,61,16);o=0;db(100,a|0,30,b|0,d|0);$=o;o=0;if($&1)break;o=0;nb(49,i|0,40,g|0,h|0,f|0,e|0,a|0);$=o;o=0;if($&1){_=1122;break N}rB(Y,i);a=c[14749]|0;do if(a>>>0<(c[14750]|0)>>>0){sB(a,Y);c[14749]=(c[14749]|0)+4}else{o=0;Xa(323,58992,Y|0);$=o;o=0;if(!($&1))break;a=Fb()|0;uB(Y);break N}while(0);uB(Y);l=Z;return (c[14749]|0)-(c[14748]|0)>>2|0}while(0);_=Fb()|0;cU(a);a=_;_=1127;break N}while(0);a=Fb()|0;cU(e);_=1127;break N}while(0);a=Fb()|0;cU(f);_=1127;break N}while(0);a=Fb()|0;cU(h);_=1127}while(0);if((_|0)==1122){a=Fb()|0;_=1127}if((_|0)==1127)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1119;break M}while(0);a=Fb()|0;cU(e);_=1119;break M}while(0);a=Fb()|0;cU(f);_=1119;break M}while(0);a=Fb()|0;cU(h);_=1119}while(0);if((_|0)==1114){a=Fb()|0;_=1119}if((_|0)==1119)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1111;break L}while(0);a=Fb()|0;cU(e);_=1111;break L}while(0);a=Fb()|0;cU(f);_=1111;break L}while(0);a=Fb()|0;cU(h);_=1111}while(0);if((_|0)==1106){a=Fb()|0;_=1111}if((_|0)==1111)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1103;break K}while(0);a=Fb()|0;cU(e);_=1103;break K}while(0);a=Fb()|0;cU(f);_=1103;break K}while(0);a=Fb()|0;cU(h);_=1103}while(0);if((_|0)==1098){a=Fb()|0;_=1103}if((_|0)==1103)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1095;break J}while(0);a=Fb()|0;cU(e);_=1095;break J}while(0);a=Fb()|0;cU(f);_=1095;break J}while(0);a=Fb()|0;cU(h);_=1095}while(0);if((_|0)==1090){a=Fb()|0;_=1095}if((_|0)==1095)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1087;break I}while(0);a=Fb()|0;cU(e);_=1087;break I}while(0);a=Fb()|0;cU(f);_=1087;break I}while(0);a=Fb()|0;cU(h);_=1087}while(0);if((_|0)==1082){a=Fb()|0;_=1087}if((_|0)==1087)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1079;break H}while(0);a=Fb()|0;cU(e);_=1079;break H}while(0);a=Fb()|0;cU(f);_=1079;break H}while(0);a=Fb()|0;cU(h);_=1079}while(0);if((_|0)==1074){a=Fb()|0;_=1079}if((_|0)==1079)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1071;break G}while(0);a=Fb()|0;cU(e);_=1071;break G}while(0);a=Fb()|0;cU(f);_=1071;break G}while(0);a=Fb()|0;cU(h);_=1071}while(0);if((_|0)==1066){a=Fb()|0;_=1071}if((_|0)==1071)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1063;break F}while(0);a=Fb()|0;cU(e);_=1063;break F}while(0);a=Fb()|0;cU(f);_=1063;break F}while(0);a=Fb()|0;cU(h);_=1063}while(0);if((_|0)==1058){a=Fb()|0;_=1063}if((_|0)==1063)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1055;break E}while(0);a=Fb()|0;cU(e);_=1055;break E}while(0);a=Fb()|0;cU(f);_=1055;break E}while(0);a=Fb()|0;cU(h);_=1055}while(0);if((_|0)==1050){a=Fb()|0;_=1055}if((_|0)==1055)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1047;break D}while(0);a=Fb()|0;cU(e);_=1047;break D}while(0);a=Fb()|0;cU(f);_=1047;break D}while(0);a=Fb()|0;cU(h);_=1047}while(0);if((_|0)==1042){a=Fb()|0;_=1047}if((_|0)==1047)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1039;break C}while(0);a=Fb()|0;cU(e);_=1039;break C}while(0);a=Fb()|0;cU(f);_=1039;break C}while(0);a=Fb()|0;cU(h);_=1039}while(0);if((_|0)==1034){a=Fb()|0;_=1039}if((_|0)==1039)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1031;break B}while(0);a=Fb()|0;cU(e);_=1031;break B}while(0);a=Fb()|0;cU(f);_=1031;break B}while(0);a=Fb()|0;cU(h);_=1031}while(0);if((_|0)==1026){a=Fb()|0;_=1031}if((_|0)==1031)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1023;break A}while(0);a=Fb()|0;cU(e);_=1023;break A}while(0);a=Fb()|0;cU(f);_=1023;break A}while(0);a=Fb()|0;cU(h);_=1023}while(0);if((_|0)==1018){a=Fb()|0;_=1023}if((_|0)==1023)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1015;break z}while(0);a=Fb()|0;cU(e);_=1015;break z}while(0);a=Fb()|0;cU(f);_=1015;break z}while(0);a=Fb()|0;cU(h);_=1015}while(0);if((_|0)==1010){a=Fb()|0;_=1015}if((_|0)==1015)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=1007;break y}while(0);a=Fb()|0;cU(e);_=1007;break y}while(0);a=Fb()|0;cU(f);_=1007;break y}while(0);a=Fb()|0;cU(h);_=1007}while(0);if((_|0)==1002){a=Fb()|0;_=1007}if((_|0)==1007)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=999;break x}while(0);a=Fb()|0;cU(e);_=999;break x}while(0);a=Fb()|0;cU(f);_=999;break x}while(0);a=Fb()|0;cU(h);_=999}while(0);if((_|0)==994){a=Fb()|0;_=999}if((_|0)==999)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=991;break w}while(0);a=Fb()|0;cU(e);_=991;break w}while(0);a=Fb()|0;cU(f);_=991;break w}while(0);a=Fb()|0;cU(h);_=991}while(0);if((_|0)==986){a=Fb()|0;_=991}if((_|0)==991)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=983;break v}while(0);a=Fb()|0;cU(d);_=983;break v}while(0);a=Fb()|0;cU(e);_=983;break v}while(0);a=Fb()|0;cU(g);_=983}while(0);if((_|0)==978){a=Fb()|0;_=983}if((_|0)==983)cU(h);break a}while(0);_=Fb()|0;cU(a);a=_;_=975;break u}while(0);a=Fb()|0;cU(e);_=975;break u}while(0);a=Fb()|0;cU(f);_=975;break u}while(0);a=Fb()|0;cU(h);_=975}while(0);if((_|0)==970){a=Fb()|0;_=975}if((_|0)==975)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=967;break t}while(0);a=Fb()|0;cU(e);_=967;break t}while(0);a=Fb()|0;cU(f);_=967;break t}while(0);a=Fb()|0;cU(h);_=967}while(0);if((_|0)==962){a=Fb()|0;_=967}if((_|0)==967)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=959;break s}while(0);a=Fb()|0;cU(e);_=959;break s}while(0);a=Fb()|0;cU(f);_=959;break s}while(0);a=Fb()|0;cU(h);_=959}while(0);if((_|0)==954){a=Fb()|0;_=959}if((_|0)==959)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=951;break r}while(0);a=Fb()|0;cU(e);_=951;break r}while(0);a=Fb()|0;cU(f);_=951;break r}while(0);a=Fb()|0;cU(h);_=951}while(0);if((_|0)==946){a=Fb()|0;_=951}if((_|0)==951)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=943;break q}while(0);a=Fb()|0;cU(e);_=943;break q}while(0);a=Fb()|0;cU(f);_=943;break q}while(0);a=Fb()|0;cU(h);_=943}while(0);if((_|0)==938){a=Fb()|0;_=943}if((_|0)==943)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=935;break p}while(0);a=Fb()|0;cU(e);_=935;break p}while(0);a=Fb()|0;cU(f);_=935;break p}while(0);a=Fb()|0;cU(h);_=935}while(0);if((_|0)==930){a=Fb()|0;_=935}if((_|0)==935)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=927;break o}while(0);a=Fb()|0;cU(e);_=927;break o}while(0);a=Fb()|0;cU(f);_=927;break o}while(0);a=Fb()|0;cU(h);_=927}while(0);if((_|0)==922){a=Fb()|0;_=927}if((_|0)==927)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=919;break n}while(0);a=Fb()|0;cU(e);_=919;break n}while(0);a=Fb()|0;cU(f);_=919;break n}while(0);a=Fb()|0;cU(h);_=919}while(0);if((_|0)==914){a=Fb()|0;_=919}if((_|0)==919)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=911;break m}while(0);a=Fb()|0;cU(e);_=911;break m}while(0);a=Fb()|0;cU(f);_=911;break m}while(0);a=Fb()|0;cU(h);_=911}while(0);if((_|0)==906){a=Fb()|0;_=911}if((_|0)==911)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=903;break l}while(0);a=Fb()|0;cU(e);_=903;break l}while(0);a=Fb()|0;cU(f);_=903;break l}while(0);a=Fb()|0;cU(h);_=903}while(0);if((_|0)==898){a=Fb()|0;_=903}if((_|0)==903)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=895;break k}while(0);a=Fb()|0;cU(e);_=895;break k}while(0);a=Fb()|0;cU(f);_=895;break k}while(0);a=Fb()|0;cU(h);_=895}while(0);if((_|0)==890){a=Fb()|0;_=895}if((_|0)==895)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=887;break j}while(0);a=Fb()|0;cU(e);_=887;break j}while(0);a=Fb()|0;cU(f);_=887;break j}while(0);a=Fb()|0;cU(h);_=887}while(0);if((_|0)==882){a=Fb()|0;_=887}if((_|0)==887)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=879;break i}while(0);a=Fb()|0;cU(e);_=879;break i}while(0);a=Fb()|0;cU(f);_=879;break i}while(0);a=Fb()|0;cU(h);_=879}while(0);if((_|0)==874){a=Fb()|0;_=879}if((_|0)==879)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=871;break h}while(0);a=Fb()|0;cU(e);_=871;break h}while(0);a=Fb()|0;cU(f);_=871;break h}while(0);a=Fb()|0;cU(h);_=871}while(0);if((_|0)==866){a=Fb()|0;_=871}if((_|0)==871)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=863;break g}while(0);a=Fb()|0;cU(e);_=863;break g}while(0);a=Fb()|0;cU(f);_=863;break g}while(0);a=Fb()|0;cU(h);_=863}while(0);if((_|0)==858){a=Fb()|0;_=863}if((_|0)==863)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=855;break f}while(0);a=Fb()|0;cU(d);_=855;break f}while(0);a=Fb()|0;cU(e);_=855;break f}while(0);a=Fb()|0;cU(g);_=855}while(0);if((_|0)==850){a=Fb()|0;_=855}if((_|0)==855)cU(h);break a}while(0);_=Fb()|0;cU(a);a=_;_=847;break e}while(0);a=Fb()|0;cU(e);_=847;break e}while(0);a=Fb()|0;cU(f);_=847;break e}while(0);a=Fb()|0;cU(h);_=847}while(0);if((_|0)==842){a=Fb()|0;_=847}if((_|0)==847)cU(i);break a}while(0);_=Fb()|0;cU(a);a=_;_=839;break d}while(0);a=Fb()|0;cU(d);_=839;break d}while(0);a=Fb()|0;cU(e);_=839;break d}while(0);a=Fb()|0;cU(g);_=839}while(0);if((_|0)==834){a=Fb()|0;_=839}if((_|0)==839)cU(h);break a}while(0);_=Fb()|0;cU(a);a=_;_=831;break c}while(0);a=Fb()|0;cU(d);_=831;break c}while(0);a=Fb()|0;cU(e);_=831;break c}while(0);a=Fb()|0;cU(g);_=831}while(0);if((_|0)==826){a=Fb()|0;_=831}if((_|0)==831)cU(h);break a}while(0);_=Fb()|0;cU(a);a=_;_=823;break b}while(0);a=Fb()|0;cU(d);_=823;break b}while(0);a=Fb()|0;cU(e);_=823;break b}while(0);a=Fb()|0;cU(g);_=823}while(0);if((_|0)==818){a=Fb()|0;_=823}if((_|0)==823)cU(h);break}_=Fb()|0;cU(a);a=_;_=815;break}a=Fb()|0;cU(d);_=815;break}a=Fb()|0;cU(e);_=815;break}a=Fb()|0;cU(g);_=815}else _=810;while(0);if((_|0)==810){a=Fb()|0;_=815}if((_|0)==815){cU(i);_=817}Qb(a|0);return 0} function Ly(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0.0,k=0.0,m=0.0,n=0.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;y=l;l=l+16|0;B=y+4|0;z=y;di(B,Oe(b,d)|0);o=0;i=ja(55,b|0,d+4|0)|0;w=o;o=0;if(w&1)i=Fb()|0;else{di(z,i);i=f+e|0;w=Pe(z)|0;o=0;j=+X(c[(c[w>>2]|0)+8>>2]|0,w|0);w=o;o=0;do if(!(w&1)?(w=Pe(B)|0,o=0,k=+X(c[(c[w>>2]|0)+8>>2]|0,w|0),w=o,o=0,!(w&1)):0){m=j-k;w=Pe(B)|0;o=0;j=+X(c[(c[w>>2]|0)+8>>2]|0,w|0);w=o;o=0;if(w&1){i=Fb()|0;break}k=+(g|0);n=+(e|0)*m/k+j;w=Pe(B)|0;o=0;j=+X(c[(c[w>>2]|0)+8>>2]|0,w|0);w=o;o=0;if(w&1){i=Fb()|0;break}k=+(i|0)*m/k+j;g=Qy((n+k)*.5)|0;w=Pe(B)|0;o=0;j=+X(c[(c[w>>2]|0)+12>>2]|0,w|0);w=o;o=0;if(w&1){i=Fb()|0;break}w=Qy(j)|0;f=~~((n=(i|0))break;i=be(a)|0;o=0;i=la(72,i|0,f+-1|0,w|0)|0;v=o;o=0;if(v&1){A=19;break}if(!i){i=be(a)|0;o=0;i=la(72,i|0,f|0,w|0)|0;v=o;o=0;if(v&1){A=19;break}if(i)break}f=f+1|0}if((A|0)==19){i=Fb()|0;break}v=f-g|0;i=w;a:while(1){q=g+v|0;r=q+1|0;s=(g|0)>0;t=g+-1|0;u=g+1|0;f=0;p=i;while(1){if(f){A=43;break a}i=be(a)|0;o=0;i=la(72,i|0,g|0,p|0)|0;e=o;o=0;if(e&1)break a;if(i){i=be(a)|0;o=0;i=la(72,i|0,q|0,p|0)|0;e=o;o=0;if(e&1)break a;if(i)f=0;else{i=be(a)|0;o=0;i=la(72,i|0,r|0,p|0)|0;e=o;o=0;if(e&1)break a;f=i^1}e=p+h|0;if((e|0)>=1){i=be(a)|0;o=0;i=fa(114,i|0)|0;C=o;o=0;if(C&1)break a;if((e|0)<(i+-1|0)){p=e;continue}}f=1;p=e;continue}else{if(s){i=be(a)|0;o=0;i=la(72,i|0,t|0,p|0)|0;C=o;o=0;if(C&1)break a;if(i){i=p;g=t;continue a}}i=be(a)|0;o=0;i=fa(113,i|0)|0;C=o;o=0;if(C&1)break a;if((g|0)<(i+-1|0)){i=be(a)|0;o=0;i=la(72,i|0,u|0,p|0)|0;C=o;o=0;if(C&1)break a;if(i){i=p;g=u;continue a}}f=1;p=p-((p|0)==(w|0)?0:h)|0;continue}}}if((A|0)==43?(o=0,x=fa(107,16)|0,C=o,o=0,!(C&1)):0){o=0;Pa(42,x|0,+(+(g|0)),+(+(p|0)));C=o;o=0;if(C&1){i=Fb()|0;cU(x);break}o=0;i=ja(55,b|0,d+8|0)|0;C=o;o=0;if(!(C&1)){Ry(i,x)|0;fi(z);fi(B);l=y;return}}i=Fb()|0}else A=15;while(0);if((A|0)==15)i=Fb()|0;fi(z)}fi(B);Qb(i|0)}function My(a,b,d,e,f,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var j=0.0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;p=l;l=l+144|0;n=p+120|0;q=p+104|0;B=p+56|0;A=p+48|0;x=p+40|0;w=p+16|0;m=p+80|0;s=p+88|0;z=p+32|0;y=p+24|0;r=p+64|0;v=p+8|0;u=p;C=Pe(Oe(a,d)|0)|0;j=+Lc[c[(c[C>>2]|0)+8>>2]&63](C);d=Pe(Oe(a,d)|0)|0;Ny(B,j,+Lc[c[(c[d>>2]|0)+12>>2]&63](d));d=Pe(Oe(a,e)|0)|0;j=+Lc[c[(c[d>>2]|0)+8>>2]&63](d);e=Pe(Oe(a,e)|0)|0;Ny(A,j,+Lc[c[(c[e>>2]|0)+12>>2]&63](e));e=Pe(Oe(a,f)|0)|0;j=+Lc[c[(c[e>>2]|0)+8>>2]&63](e);f=Pe(Oe(a,f)|0)|0;Ny(x,j,+Lc[c[(c[f>>2]|0)+12>>2]&63](f));f=Pe(Oe(a,h)|0)|0;j=+Lc[c[(c[f>>2]|0)+8>>2]&63](f);h=Pe(Oe(a,h)|0)|0;Ny(w,j,+Lc[c[(c[h>>2]|0)+12>>2]&63](h));h=B;f=c[h+4>>2]|0;e=z;c[e>>2]=c[h>>2];c[e+4>>2]=f;e=A;f=c[e+4>>2]|0;h=y;c[h>>2]=c[e>>2];c[h+4>>2]=f;c[q>>2]=c[z>>2];c[q+4>>2]=c[z+4>>2];c[n>>2]=c[y>>2];c[n+4>>2]=c[y+4>>2];Oy(s,q,n);h=x;f=c[h+4>>2]|0;e=v;c[e>>2]=c[h>>2];c[e+4>>2]=f;e=w;f=c[e+4>>2]|0;h=u;c[h>>2]=c[e>>2];c[h+4>>2]=f;c[q>>2]=c[v>>2];c[q+4>>2]=c[v+4>>2];c[n>>2]=c[u>>2];c[n+4>>2]=c[u+4>>2];Oy(r,q,n);c[q>>2]=c[s>>2];c[q+4>>2]=c[s+4>>2];c[q+8>>2]=c[s+8>>2];c[q+12>>2]=c[s+12>>2];c[n>>2]=c[r>>2];c[n+4>>2]=c[r+4>>2];c[n+8>>2]=c[r+8>>2];c[n+12>>2]=c[r+12>>2];Py(m,q,n);j=+g[m>>2];if(!(j==t)?(k=m+4|0,!(+g[k>>2]==t)):0){d=Qy(j)|0;e=Qy(+g[k>>2])|0;if(((d|0)>=0?!((e|0)<0|(d|0)>=(Zk(be(i)|0)|0)):0)?(e|0)<(_k(be(i)|0)|0):0){d=aU(16)|0;o=0;Pa(42,d|0,+(+g[m>>2]),+(+g[k>>2]));C=o;o=0;if(C&1){C=Fb()|0;cU(d);d=C}else{bi(n,d);o=0;d=ja(55,a|0,b|0)|0;C=o;o=0;if(!(C&1)?(o=0,ja(58,d|0,n|0)|0,C=o,o=0,!(C&1)):0){fi(n);l=p;return}d=Fb()|0;fi(n)}Qb(d|0)}C=Ab(8)|0;gn(C,48004);Mb(C|0,488,58)}C=Ab(8)|0;gn(C,47946);Mb(C|0,488,58)}function Ny(a,b,c){a=a|0;b=+b;c=+c;g[a>>2]=b;g[a+4>>2]=c;return}function Oy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=b;b=c[f+4>>2]|0;e=a;c[e>>2]=c[f>>2];c[e+4>>2]=b;e=d;b=c[e+4>>2]|0;d=a+8|0;c[d>>2]=c[e>>2];c[d+4>>2]=b;return}function Py(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,f=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;p=+g[b>>2];n=+g[b+8>>2];k=p-n;m=+g[c>>2];h=+g[c+8>>2];j=m-h;e=+g[b+4>>2];o=+g[b+12>>2];i=e-o;f=+g[c+4>>2];l=+g[c+12>>2];d=f-l;e=p*o-n*e;f=m*l-h*f;h=k*d-j*i;if(+B(+h)<1.0e-12)Ny(a,t,t);else Ny(a,(j*e-k*f)/h,(e*d-i*f)/h);return}function Qy(a){a=+a;return ~~+A(+(a+.5))|0}function Ry(a,b){a=a|0;b=b|0;gi(a,b);return a|0}function Sy(a,b){a=a|0;b=b|0;Ef(a,c[b+8>>2]|0);return}function Ty(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+16|0;n=s;m=Ik(Fk(j)|0)|0;p=Gk(Fk(j)|0)|0;c[n>>2]=0;Wy(m,p,n);n=f+d|0;p=i+-1|0;m=i+-2|0;q=d;i=d;k=0;while(1){if((q|0)>=(n|0)){f=20;break}if(g^(xj(be(b)|0,q,e)|0)){f=Xe(j,k)|0;c[f>>2]=(c[f>>2]|0)+1;f=k}else{if((k|0)==(p|0)){if((Xy(j,h,204)|0)<107){f=7;break}f=c[(Xe(j,0)|0)>>2]|0;d=c[(Xe(j,1)|0)>>2]|0;i=f+i|0;f=0;while(1){if((f|0)>=(m|0))break;t=c[(Xe(j,f+2|0)|0)>>2]|0;c[(Xe(j,f)|0)>>2]=t;f=f+1|0}c[(Xe(j,m)|0)>>2]=0;c[(Xe(j,p)|0)>>2]=0;i=i+d|0;f=-1}else f=1;f=f+k|0;c[(Xe(j,f)|0)>>2]=1;g=g^1}q=q+1|0;k=f}do if((f|0)==7){f=aU(20)|0;o=0;Xa(141,f|0,2);t=o;o=0;if(t&1){t=Fb()|0;cU(f);f=t}else{ek(a,f);o=0;f=ja(60,a|0,0)|0;t=o;o=0;if(!(t&1)?(c[f>>2]=i,o=0,r=ja(60,a|0,1)|0,t=o,o=0,!(t&1)):0){c[r>>2]=q;break}f=Fb()|0;ij(a)}Qb(f|0)}else if((f|0)==20)Uk(a);while(0);l=s;return}function Uy(a){a=a|0;return (c[a+8>>2]|0)!=0|0}function Vy(a){a=a|0;cf(a);c[a>>2]=3516;c[a+8>>2]=0;return}function Wy(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;f=a+8|0;e=c[a>>2]|0;i=e;a:do if((c[f>>2]|0)-e>>2>>>0>=b>>>0){j=a+4|0;a=c[j>>2]|0;g=a-e>>2;h=g>>>0>>0;e=a;a=i;f=h?g:b;while(1){if(!f)break;c[a>>2]=c[d>>2];a=a+4|0;f=f+-1|0}if(h){g=b-g|0;a=g;f=e;while(1){c[f>>2]=c[d>>2];a=a+-1|0;if(!a)break;else f=f+4|0}a=j;e=e+(g<<2)|0;k=17;break}else{a=i+(b<<2)|0;while(1){if((e|0)==(a|0))break a;d=e+-4|0;c[j>>2]=d;e=d}}}else{ny(a);e=qj(a)|0;if(e>>>0>>0)wS(a);f=(c[f>>2]|0)-(c[a>>2]|0)|0;g=f>>1;oj(a,f>>2>>>0>>1>>>0?(g>>>0>>0?b:g):e);a=a+4|0;g=c[a>>2]|0;e=b;f=g;while(1){c[f>>2]=c[d>>2];e=e+-1|0;if(!e)break;else f=f+4|0}e=g+(b<<2)|0;k=17}while(0);if((k|0)==17)c[a>>2]=e;return}function Xy(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;j=Gk(Fk(a)|0)|0;i=0;e=0;f=0;while(1){if((f|0)>=(j|0))break;h=(c[(Xe(a,f)|0)>>2]|0)+i|0;i=h;e=(c[b+(f<<2)>>2]|0)+e|0;f=f+1|0}a:do if((i|0)<(e|0))e=2147483647;else{h=(i<<8|0)/(e|0)|0;d=(O(h,d)|0)>>8;e=0;f=0;while(1){if((e|0)>=(j|0))break;g=c[(Xe(a,e)|0)>>2]<<8;k=O(c[b+(e<<2)>>2]|0,h)|0;g=(g|0)>(k|0)?g-k|0:k-g|0;if((g|0)>(d|0)){e=2147483647;break a}e=e+1|0;f=g+f|0}e=(f|0)/(i|0)|0}while(0);return e|0}function Yy(){Zy();return}function Zy(){_y(58900);return}function _y(a){a=a|0;var b=0,d=0,e=0,f=0,h=0.0,i=0,j=0,k=0,m=0,n=0,p=0,q=0;q=l;l=l+16|0;n=q;p=c[2642]|0;$y(n,p);d=n+4|0;b=0;while(1){e=c[n>>2]|0;if((b|0)>=(((c[d>>2]|0)-e|0)/12|0|0)){f=3;break}o=0;Xa(294,e+(b*12|0)|0,8);m=o;o=0;if(m&1)break;b=b+1|0}if((f|0)==3?(o=0,Xa(293,a|0,p<<3|0),m=o,o=0,!(m&1)):0){k=c[n>>2]|0;i=0;j=0;while(1){if((i|0)>=(p|0))break;b=c[10572+(i<<2)>>2]|0;m=k+(i*12|0)|0;e=0;f=b&1;while(1){if((e|0)==8){b=0;d=j;break}else h=0.0;while(1){d=b&1;if((d|0)!=(f|0))break;h=h+1.0;b=b>>1}g[(c[m>>2]|0)+(7-e<<2)>>2]=h/17.0;e=e+1|0;f=d}while(1){if((b|0)==8)break;c[(c[a>>2]|0)+(d<<2)>>2]=c[(c[m>>2]|0)+(b<<2)>>2];b=b+1|0;d=d+1|0}i=i+1|0;j=j+8|0}cz(n);l=q;return}q=Fb()|0;cz(n);Qb(q|0)}function $y(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(295,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(296,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;cz(a);Qb(d|0)}while(0);return}function az(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(167,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(297,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;im(a);Qb(d|0)}while(0);return}function bz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=a+4|0;d=c[g>>2]|0;f=c[a>>2]|0;e=d-f>>2;a:do if(e>>>0>=b>>>0){if(e>>>0>b>>>0){a=f+(b<<2)|0;while(1){if((d|0)==(a|0))break a;f=d+-4|0;c[g>>2]=f;d=f}}}else dz(a,b-e|0);while(0);return}function cz(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;im(e)}cU(c[a>>2]|0)}return}function dz(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;i=l;l=l+32|0;f=i;g=a+8|0;h=a+4|0;d=c[h>>2]|0;do if((c[g>>2]|0)-d>>2>>>0>>0){d=(d-(c[a>>2]|0)>>2)+b|0;e=mm(a)|0;if(e>>>0>>0)wS(a);j=c[a>>2]|0;k=(c[g>>2]|0)-j|0;g=k>>1;fz(f,k>>2>>>0>>1>>>0?(g>>>0>>0?d:g):e,(c[h>>2]|0)-j>>2,a+8|0);o=0;Xa(298,f|0,b|0);h=o;o=0;if(!(h&1)?(o=0,Xa(299,a|0,f|0),k=o,o=0,!(k&1)):0){iz(f);break}k=Fb()|0;iz(f);Qb(k|0)}else ez(a,b);while(0);l=i;return}function ez(a,b){a=a|0;b=b|0;var d=0;a=a+4|0;d=c[a>>2]|0;yW(d|0,0,b<<2|0)|0;c[a>>2]=d+(b<<2);return}function fz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=1073741823){e=aU(b<<2)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d<<2)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b<<2);return}function gz(a,b){a=a|0;b=b|0;var d=0;a=a+8|0;d=c[a>>2]|0;yW(d|0,0,b<<2|0)|0;c[a>>2]=d+(b<<2);return}function hz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;h=a+4|0;g=b+4|0;f=(c[h>>2]|0)-e|0;d=(c[g>>2]|0)+(0-(f>>2)<<2)|0;c[g>>2]=d;if((f|0)>0){wW(d|0,e|0,f|0)|0;e=g;d=c[g>>2]|0}else e=g;g=c[a>>2]|0;c[a>>2]=d;c[e>>2]=g;g=b+8|0;f=c[h>>2]|0;c[h>>2]=c[g>>2];c[g>>2]=f;g=a+8|0;h=b+12|0;a=c[g>>2]|0;c[g>>2]=c[h>>2];c[h>>2]=a;c[b>>2]=c[e>>2];return}function iz(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[a+4>>2]|0;d=a+8|0;e=c[d>>2]|0;while(1){if((e|0)==(b|0))break;f=e+-4|0;c[d>>2]=f;e=f}a=c[a>>2]|0;if(a|0)cU(a);return}function jz(a,b){a=a|0;b=b|0;var d=0;if((lz(a)|0)>>>0>>0)wS(a);if(b>>>0<=357913941){d=aU(b*12|0)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b*12|0);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function kz(a,b){a=a|0;b=b|0;var d=0;a=a+4|0;d=c[a>>2]|0;yW(d|0,0,b*12|0)|0;c[a>>2]=d+(b*12|0);return}function lz(a){a=a|0;return 357913941}function mz(a,b,d){a=a|0;b=b|0;d=d|0;ki(a,b);c[a+8>>2]=d;return}function nz(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,m=0,n=0,p=0,q=0,r=0,s=0;j=l;l=l+80|0;r=j+68|0;d=j+64|0;q=j+52|0;p=j+40|0;e=j+12|0;n=j+28|0;m=j+16|0;k=j;i=b+8|0;h=(c[i>>2]|0)/17|0;c[r>>2]=0;c[r+4>>2]=0;c[r+8>>2]=0;o=0;Xa(128,d|0,b|0);g=o;o=0;do if(!(g&1)){o=0;bb(128,r|0,h|0,d|0);g=o;o=0;if(g&1){q=Fb()|0;de(d);d=q;break}de(d);d=be(b)|0;o=0;d=fa(114,d|0)|0;g=o;o=0;if(!(g&1)?(o=0,Xa(300,q|0,d|0),g=o,o=0,!(g&1)):0){d=be(b)|0;o=0;d=fa(114,d|0)|0;g=o;o=0;if(!(g&1)?(o=0,Xa(300,p|0,d|0),g=o,o=0,!(g&1)):0){o=0;Xa(128,e|0,b|0);g=o;o=0;do if(!(g&1)){o=0;hb(57,p|0,h|0,r|0,e|0,q|0);g=o;o=0;if(g&1){d=Fb()|0;de(e);break}de(e);o=0;db(99,n|0,h|0,q|0,p|0);g=o;o=0;if(!(g&1)){g=n+4|0;o=0;Xa(300,m|0,((c[g>>2]|0)-(c[n>>2]|0)|0)/12|0|0);e=o;o=0;if(e&1)d=Fb()|0;else{d=c[n>>2]|0;f=0;b=d;a:while(1){if((f|0)>=(((c[g>>2]|0)-b|0)/12|0|0)){f=13;break}b=(c[m>>2]|0)+(f*12|0)|0;e=((c[d+(f*12|0)+4>>2]|0)-(c[d+(f*12|0)>>2]|0)|0)/12|0;c[k>>2]=0;o=0;bb(130,b|0,e|0,k|0);e=o;o=0;if(e&1){f=24;break}d=0;while(1){e=c[n>>2]|0;s=c[e+(f*12|0)>>2]|0;b=s;if((d|0)>=(((c[e+(f*12|0)+4>>2]|0)-s|0)/12|0|0))break;if(c[b+(d*12|0)+8>>2]|0){o=0;Xa(301,k|0,b+(d*12|0)|0);s=o;o=0;if(s&1){f=28;break a}s=vz(k)|0;c[(c[(c[m>>2]|0)+(f*12|0)>>2]|0)+(d<<2)>>2]=s}d=d+1|0}f=f+1|0;b=e;d=e}do if((f|0)==13){o=0;bb(129,k|0,h|0,m|0);s=o;o=0;if(s&1){d=Fb()|0;break}o=0;d=la(93,h|0,m|0,k|0)|0;s=o;o=0;b:do if(s&1)d=Fb()|0;else{o=0;Xa(302,m|0,d|0);s=o;o=0;do if(!(s&1)){o=0;d=fa(107,32)|0;s=o;o=0;if(s&1)break;o=0;bb(66,d|0,c[i>>2]|0,((c[m+4>>2]|0)-(c[m>>2]|0)|0)/12|0|0);s=o;o=0;if(s&1){s=Fb()|0;cU(d);d=s;break b}o=0;Xa(169,a|0,d|0);s=o;o=0;if(s&1)break;o=0;Xa(303,m|0,a|0);s=o;o=0;if(s&1){d=Fb()|0;de(a);break b}else{pj(k);zz(m);Az(n);zz(p);zz(q);im(r);l=j;return}}while(0);d=Fb()|0}while(0);pj(k)}else if((f|0)==24)d=Fb()|0;else if((f|0)==28)d=Fb()|0;while(0);zz(m)}Az(n)}else f=17}else f=17;while(0);if((f|0)==17)d=Fb()|0;zz(p)}else d=Fb()|0;zz(q)}else f=14}else f=14;while(0);if((f|0)==14)d=Fb()|0;im(r);Qb(d|0)}function oz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0.0,i=0.0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0;r=l;l=l+32|0;p=r+16|0;s=r+4|0;q=r;i=+(Zk(be(d)|0)|0);g[p>>2]=(b|0)>0?i/+(b|0):i;m=Zk(be(d)|0)|0;c[q>>2]=0;nj(s,m,q);m=a+4|0;n=a+8|0;k=2;b=1;e=0;a:while(1){f=be(d)|0;o=0;f=fa(113,f|0)|0;j=o;o=0;if(j&1){f=5;break}if((k|0)<(f|0))j=0;else{f=4;break}while(1){f=be(d)|0;o=0;f=fa(114,f|0)|0;t=o;o=0;if(t&1){f=9;break a}if((j|0)>=(f|0))break;f=be(d)|0;o=0;f=la(72,f|0,k|0,j|0)|0;t=o;o=0;if(t&1){f=9;break a}if(f){t=(c[s>>2]|0)+(k<<2)|0;c[t>>2]=(c[t>>2]|0)+1}j=j+1|0}f=c[(c[s>>2]|0)+(k<<2)>>2]|0;j=be(d)|0;o=0;j=fa(114,j|0)|0;t=o;o=0;if(t&1){f=5;break}f=(f|0)!=(j|0);if(b|f)b=f^1;else{i=+(k-e|0);g[q>>2]=i;h=+g[p>>2];do if(i>h*.75){while(1){b=c[m>>2]|0;e=(b|0)==(c[n>>2]|0);if(!(i>h*1.5))break;if(e){o=0;Xa(304,a|0,p|0);t=o;o=0;if(t&1){f=21;break a}}else{g[b>>2]=h;c[m>>2]=b+4}h=+g[p>>2];i=+g[q>>2]-h;g[q>>2]=i}if(e){o=0;Xa(304,a|0,q|0);t=o;o=0;if(t&1){f=21;break a}else{b=1;e=k;break}}else{g[b>>2]=i;c[m>>2]=b+4;b=1;e=k;break}}else b=0;while(0)}k=k+1|0}do if((f|0)==4){b=be(d)|0;o=0;b=fa(113,b|0)|0;t=o;o=0;if(t&1){b=Fb()|0;break}i=+g[p>>2];h=+(b-e|0);while(1){g[q>>2]=h;b=c[m>>2]|0;e=(b|0)==(c[n>>2]|0);if(!(h>i*1.5)){f=35;break}if(e){o=0;Xa(304,a|0,p|0);t=o;o=0;if(t&1)break}else{g[b>>2]=i;c[m>>2]=b+4}h=+g[p>>2];i=h;h=+g[q>>2]-h}do if((f|0)==35){if(e){o=0;Xa(304,a|0,q|0);t=o;o=0;if(t&1)break}else{g[b>>2]=h;c[m>>2]=b+4}pj(s);l=r;return}while(0);b=Fb()|0}else if((f|0)==5)b=Fb()|0;else if((f|0)==9)b=Fb()|0;else if((f|0)==21)b=Fb()|0;while(0);pj(s);Qb(b|0)}function pz(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(305,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(306,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;zz(a);Qb(d|0)}while(0);return}function qz(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,m=0.0,n=0.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.0;A=l;l=l+48|0;C=A+28|0;B=A+16|0;z=A+4|0;x=A;y=d+4|0;v=C+4|0;w=b+-1|0;u=0;a:while(1){if((u|0)>=(_k(be(e)|0)|0)){i=3;break}if(((c[y>>2]|0)-(c[d>>2]|0)>>2|0)<(b|0)){i=5;break}h=(c[f>>2]|0)+(u*12|0)|0;c[C>>2]=0;tz(h,b,C);h=(c[a>>2]|0)+(u*12|0)|0;c[C>>2]=-1;tz(h,b,C);c[B>>2]=0;nj(C,1,B);h=c[C>>2]|0;c[h>>2]=(c[h>>2]|0)+2;h=0;k=2;i=1;while(1){j=be(e)|0;o=0;j=fa(113,j|0)|0;t=o;o=0;if(t&1){i=11;break a}t=h+1|0;if((k|0)>=(j|0))break;j=be(e)|0;o=0;j=la(72,j|0,k|0,u|0)|0;s=o;o=0;if(s&1){i=11;break a}if(j)if(!i){o=0;Xa(251,C|0,((c[v>>2]|0)-(c[C>>2]|0)>>2)+1|0);s=o;o=0;if(s&1){i=11;break a}else{h=t;i=1}}else i=1;else if(i){o=0;Xa(251,C|0,((c[v>>2]|0)-(c[C>>2]|0)>>2)+1|0);s=o;o=0;if(s&1){i=11;break a}else{h=t;i=0}}else i=0;t=(c[C>>2]|0)+(h<<2)|0;c[t>>2]=(c[t>>2]|0)+1;k=k+1|0}o=0;Xa(251,C|0,((c[v>>2]|0)-(c[C>>2]|0)>>2)+1|0);s=o;o=0;if(s&1){i=10;break}c[z>>2]=0;o=0;bb(70,B|0,b|0,z|0);s=o;o=0;if(s&1){i=23;break}c[c[B>>2]>>2]=0;p=c[C>>2]|0;q=c[d>>2]|0;r=c[B>>2]|0;j=0;k=1;i=0;while(1){if(!((k|0)<(b|0)&(j|0)<=(h|0)))break;i=(c[p+(j<<2)>>2]|0)+i|0;if(+(i|0)>+g[q+(k+-1<<2)>>2]){j=(((j|0)%2|0|0)==1&1)+j|0;i=c[p+(j<<2)>>2]|0;c[r+(k<<2)>>2]=j;k=k+1|0}j=j+1|0}o=0;Xa(307,z|0,b|0);s=o;o=0;if(s&1){i=24;break}else r=0;while(1){if((r|0)>=(b|0))break;s=(c[z>>2]|0)+(r*12|0)|0;g[x>>2]=0.0;o=0;bb(131,s|0,8,x|0);s=o;o=0;if(s&1){i=55;break a}h=c[B>>2]|0;p=c[h+(r<<2)>>2]|0;s=r+1|0;if((r|0)==(w|0))h=t;else h=c[h+(s<<2)>>2]|0;j=h-p|0;if((j+-7|0)>>>0>2){r=s;continue}i=(j|0)<8?j:8;k=c[C>>2]|0;h=0;m=0.0;while(1){if((h|0)>=(i|0))break;n=m+ +(c[k+(h+p<<2)>>2]|0);h=h+1|0;m=n}if((j|0)==7){i=(c[d>>2]|0)+(r<<2)|0;j=(c[z>>2]|0)+(r*12|0)|0;h=0;while(1){if((h|0)>=7)break;g[(c[j>>2]|0)+(h<<2)>>2]=+(c[k+(h+p<<2)>>2]|0)/+g[i>>2];h=h+1|0}n=+g[(c[d>>2]|0)+(r<<2)>>2];h=c[z>>2]|0;g[(c[h+(r*12|0)>>2]|0)+28>>2]=(n-m)/n}else{i=c[z>>2]|0;j=c[i+(r*12|0)>>2]|0;i=(c[i+(r*12|0)+4>>2]|0)-j>>2;h=0;while(1){if((h|0)>=(i|0))break;g[j+(h<<2)>>2]=+(c[k+(h+p<<2)>>2]|0)/m;h=h+1|0}h=c[z>>2]|0}q=c[14725]|0;p=h+(r*12|0)|0;k=0;h=0;m=3402823466385288598117041.0e14;while(1){if((k|0)==2787)break;j=k<<3;i=0;n=0.0;while(1){if((i|0)>=8)break;D=+g[q+(i+j<<2)>>2]-+g[(c[p>>2]|0)+(i<<2)>>2];n=n+D*D;if(!(n>=m))i=i+1|0;else break}if(n>2]|0;m=n}k=k+1|0}c[(c[(c[f>>2]|0)+(u*12|0)>>2]|0)+(r<<2)>>2]=h;q=dA(h)|0;c[(c[(c[a>>2]|0)+(u*12|0)>>2]|0)+(r<<2)>>2]=q;r=s}cz(z);pj(B);pj(C);u=u+1|0}if((i|0)==3){l=A;return}else if((i|0)==5){C=Ab(8)|0;gn(C,48049);Mb(C|0,488,58)}else if((i|0)==10)h=Fb()|0;else if((i|0)==11)h=Fb()|0;else if((i|0)==23)h=Fb()|0;else if((i|0)==24){h=Fb()|0;i=56}else if((i|0)==55){h=Fb()|0;cz(z);i=56}if((i|0)==56)pj(B);pj(C);Qb(h|0)}function rz(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+32|0;w=y+16|0;z=y;fA(a,1);o=0;Xa(308,c[a>>2]|0,b|0);x=o;o=0;if(x&1)f=Fb()|0;else{Mz(z,w);x=d+4|0;u=z+8|0;v=a+4|0;t=0;j=-1;f=0;a:while(1){if((t|0)>=(((c[x>>2]|0)-(c[d>>2]|0)|0)/12|0|0)){g=4;break}Nz(z);i=0;while(1){s=c[d>>2]|0;if((i|0)>=((c[s+(t*12|0)+4>>2]|0)-(c[s+(t*12|0)>>2]|0)>>2|0))break;g=(c[(c[e>>2]|0)+(t*12|0)>>2]|0)+(i<<2)|0;if((c[g>>2]|0)!=-1){o=0;g=ja(99,z|0,g|0)|0;s=o;o=0;if(s&1){g=9;break a}g=c[g>>2]|0;o=0;h=ja(99,z|0,(c[(c[e>>2]|0)+(t*12|0)>>2]|0)+(i<<2)|0)|0;s=o;o=0;if(s&1){g=9;break a}c[h>>2]=g+1}i=i+1|0}if(!(c[u>>2]|0))g=j;else{o=0;Xa(301,w|0,z|0);s=o;o=0;if(s&1){g=17;break}h=hA(w)|0;g=vz(w)|0;g=h?j:g;h=(j+3|0)%9|0;i=(j|0)!=-1;g=i&(g|0)!=(h|0)?j:g;b:do if(i|(j|0)==-1&(g|0)==0){if(i&(g|0)==(h|0)){h=f+1|0;f=f+2|0;if((((c[v>>2]|0)-(c[a>>2]|0)|0)/12|0|0)<(f|0)){o=0;Xa(309,a|0,f|0);s=o;o=0;if(s&1){g=47;break a}o=0;Xa(308,(c[a>>2]|0)+(h*12|0)|0,b|0);s=o;o=0;if(s&1){g=47;break a}else f=h}else f=h}if(i&(g|0)==((j+6|0)%9|0|0)){h=f+2|0;f=f+3|0;if((((c[v>>2]|0)-(c[a>>2]|0)|0)/12|0|0)<(f|0)){o=0;Xa(309,a|0,f|0);s=o;o=0;if(s&1){g=47;break a}o=0;Xa(308,(c[a>>2]|0)+(h*12|0)|0,b|0);s=o;o=0;if(s&1){g=47;break a}else f=h}else f=h}m=(g+3|0)%9|0;n=f+2|0;p=f+1|0;q=(g+6|0)%9|0;r=(f|0)>0;s=f+-1|0;k=0;while(1){i=c[d>>2]|0;j=c[i+(t*12|0)>>2]|0;h=j;if((k|0)>=((c[i+(t*12|0)+4>>2]|0)-j>>2|0))break b;j=c[(c[(c[e>>2]|0)+(t*12|0)>>2]|0)+(k<<2)>>2]|0;do if((j|0)!=-1){if((j|0)==(g|0)){o=0;h=ja(99,(c[(c[a>>2]|0)+(f*12|0)>>2]|0)+(k*12|0)|0,h+(k<<2)|0)|0;j=o;o=0;if(j&1){g=47;break a}h=c[h>>2]|0;o=0;i=ja(99,(c[(c[a>>2]|0)+(f*12|0)>>2]|0)+(k*12|0)|0,(c[(c[d>>2]|0)+(t*12|0)>>2]|0)+(k<<2)|0)|0;j=o;o=0;if(j&1){g=47;break a}c[i>>2]=h+1;break}if((j|0)!=(m|0)){if(!(r&(j|0)==(q|0)))break;o=0;h=ja(99,(c[(c[a>>2]|0)+(s*12|0)>>2]|0)+(k*12|0)|0,h+(k<<2)|0)|0;j=o;o=0;if(j&1){g=47;break a}h=c[h>>2]|0;o=0;i=ja(99,(c[(c[a>>2]|0)+(s*12|0)>>2]|0)+(k*12|0)|0,(c[(c[d>>2]|0)+(t*12|0)>>2]|0)+(k<<2)|0)|0;j=o;o=0;if(j&1){g=47;break a}c[i>>2]=h+1;break}j=c[a>>2]|0;h=j;if((((c[v>>2]|0)-j|0)/12|0|0)<(n|0)){o=0;Xa(309,a|0,n|0);j=o;o=0;if(j&1){g=47;break a}o=0;Xa(308,(c[a>>2]|0)+(p*12|0)|0,b|0);j=o;o=0;if(j&1){g=47;break a}h=c[a>>2]|0;i=c[d>>2]|0}o=0;h=ja(99,(c[h+(p*12|0)>>2]|0)+(k*12|0)|0,(c[i+(t*12|0)>>2]|0)+(k<<2)|0)|0;j=o;o=0;if(j&1){g=47;break a}h=c[h>>2]|0;o=0;i=ja(99,(c[(c[a>>2]|0)+(p*12|0)>>2]|0)+(k*12|0)|0,(c[(c[d>>2]|0)+(t*12|0)>>2]|0)+(k<<2)|0)|0;j=o;o=0;if(j&1){g=47;break a}c[i>>2]=h+1}while(0);k=k+1|0}}else g=-1;while(0)}t=t+1|0;j=g}if((g|0)==4){Cz(z);l=y;return}else if((g|0)==9)f=Fb()|0;else if((g|0)==17)f=Fb()|0;else if((g|0)==47)f=Fb()|0;Cz(z)}Az(a);Qb(f|0)}function sz(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+32|0;n=t+20|0;p=t+16|0;q=t+4|0;r=t;c[a>>2]=0;s=a+4|0;c[s>>2]=0;c[a+8>>2]=0;m=d+4|0;g=c[m>>2]|0;e=c[d>>2]|0;a:do if(((g-e|0)/12|0)>>>0>1){k=a+8|0;i=0;while(1){f=e;if((i|0)>=(((g-e|0)/12|0)+-1|0)){f=3;break a}g=c[f+(i*12|0)>>2]|0;f=(c[f+(i*12|0)+4>>2]|0)-g>>2;e=0;j=-1;while(1){if(!((j|0)==-1&(e|0)<(f|0)))break;j=dA(c[g+(e<<2)>>2]|0)|0;e=e+1|0}if((i|0)==0&(j|0)>0){c[n>>2]=0;e=c[s>>2]|0;if(e>>>0>=(c[k>>2]|0)>>>0){o=0;Xa(310,a|0,n|0);h=o;o=0;if(h&1){f=18;break}}else{c[e>>2]=0;c[s>>2]=e+4}if((j|0)>3){c[n>>2]=0;e=c[s>>2]|0;if(e>>>0>=(c[k>>2]|0)>>>0){o=0;Xa(310,a|0,n|0);h=o;o=0;if(h&1){f=19;break}}else{c[e>>2]=0;c[s>>2]=e+4}}}i=i+1|0;f=c[d>>2]|0;g=c[f+(i*12|0)>>2]|0;f=(c[f+(i*12|0)+4>>2]|0)-g>>2;e=0;h=-1;while(1){if(!((h|0)==-1&(e|0)<(f|0)))break;h=dA(c[g+(e<<2)>>2]|0)|0;e=e+1|0}if((h|0)!=-1&((j|0)!=-1?((j+3|0)%9|0|0)!=(h|0):0)){c[n>>2]=i;e=c[s>>2]|0;if(e>>>0>=(c[k>>2]|0)>>>0){o=0;Xa(310,a|0,n|0);g=o;o=0;if(g&1){f=32;break}}else{c[e>>2]=i;c[s>>2]=e+4}if((j|0)==(h|0)){c[n>>2]=i;e=c[s>>2]|0;if(e>>>0>=(c[k>>2]|0)>>>0){o=0;Xa(310,a|0,n|0);j=o;o=0;if(j&1){f=33;break}}else{c[e>>2]=i;c[s>>2]=e+4}}}e=c[d>>2]|0;g=c[m>>2]|0}if((f|0)==18){e=Fb()|0;break}else if((f|0)==19){e=Fb()|0;break}else if((f|0)==32){e=Fb()|0;break}else if((f|0)==33){e=Fb()|0;break}}else f=3;while(0);if((f|0)==3){e=0;while(1){f=c[a>>2]|0;if((e|0)>=((c[s>>2]|0)-f>>2|0)){f=41;break}c[p>>2]=(c[d>>2]|0)+((c[f+(e<<2)>>2]|0)*12|0)+(e*12|0);c[r>>2]=0;o=0;bb(70,q|0,b|0,r|0);m=o;o=0;if(m&1){f=38;break}o=0;c[n>>2]=c[p>>2];la(94,d|0,n|0,q|0)|0;m=o;o=0;if(m&1){f=39;break}pj(q);e=e+1|0}if((f|0)==38)e=Fb()|0;else if((f|0)==39){e=Fb()|0;pj(q)}else if((f|0)==41){l=t;return}}pj(a);Qb(e|0)}function tz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=a+4|0;e=c[h>>2]|0;g=c[a>>2]|0;f=e-g>>2;a:do if(f>>>0>=b>>>0){if(f>>>0>b>>>0){a=g+(b<<2)|0;while(1){if((e|0)==(a|0))break a;g=e+-4|0;c[h>>2]=g;e=g}}}else bA(a,b-f|0,d);while(0);return}function uz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;h=j+4|0;g=j;_z(a);i=b+4|0;e=0;b=c[b>>2]|0;d=h;while(1){c[d>>2]=b;f=c[h>>2]|0;if((f|0)==(i|0))break;b=c[f+20>>2]|0;if((b|0)<=(e|0)){if((b|0)==(e|0))aA(a,1)}else{$z(a,c[f+16>>2]|0);aA(a,0);e=b}b=c[f+4>>2]|0;if(!b){d=f;while(1){b=c[d+8>>2]|0;if((c[b>>2]|0)==(d|0))break;else d=b}}else while(1){d=c[b>>2]|0;if(!d)break;else b=d}c[h>>2]=b;b=f;d=g}l=j;return}function vz(a){a=a|0;return c[a+4>>2]|0}function wz(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,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=l;l=l+64|0;v=A+56|0;B=A+44|0;C=A+32|0;D=A+16|0;x=A+4|0;y=A;z=A+28|0;Mz(B,v);Mz(C,v);Mz(D,v);f=c[d>>2]|0;w=d+4|0;e=c[w>>2]|0;while(1){if((e|0)==(f|0))break;u=e+-4|0;c[w>>2]=u;e=u}t=b+4|0;u=d+8|0;s=-1;e=0;a:while(1){c[v>>2]=e;if((e+2|0)>=(((c[t>>2]|0)-(c[b>>2]|0)|0)/12|0|0)){f=6;break}Nz(D);f=c[v>>2]|0;g=c[b>>2]|0;e=c[c[g+(f*12|0)>>2]>>2]|0;if(!e){e=-1;h=f}else{o=0;e=la(95,e|0,((e|0)<0)<<31>>31|0,0)|0;r=o;o=0;if(r&1){f=10;break}h=c[v>>2]|0;g=c[b>>2]|0}f=c[c[g+((h+1|0)*12|0)>>2]>>2]|0;if(!f){f=-1;i=g}else{o=0;f=la(95,f|0,((f|0)<0)<<31>>31|0,0)|0;r=o;o=0;if(r&1){f=10;break}h=c[v>>2]|0;i=c[b>>2]|0}g=c[c[i+((h+2|0)*12|0)>>2]>>2]|0;if(!g){g=-1;j=h}else{o=0;g=la(95,g|0,((g|0)<0)<<31>>31|0,0)|0;r=o;o=0;if(r&1){f=10;break}i=c[b>>2]|0;j=c[v>>2]|0}h=c[i+(j*12|0)>>2]|0;h=c[h+(((c[i+(j*12|0)+4>>2]|0)-h>>2)+-1<<2)>>2]|0;if(!h){h=-1;k=i}else{o=0;h=la(95,h|0,((h|0)<0)<<31>>31|0,0)|0;r=o;o=0;if(r&1){f=10;break}j=c[v>>2]|0;k=c[b>>2]|0}r=j+1|0;i=c[k+(r*12|0)>>2]|0;i=c[i+(((c[k+(r*12|0)+4>>2]|0)-i>>2)+-1<<2)>>2]|0;if(!i)i=-1;else{o=0;i=la(95,i|0,((i|0)<0)<<31>>31|0,0)|0;r=o;o=0;if(r&1){f=10;break}j=c[v>>2]|0;k=c[b>>2]|0}r=j+2|0;j=c[k+(r*12|0)>>2]|0;j=c[j+(((c[k+(r*12|0)+4>>2]|0)-j>>2)+-1<<2)>>2]|0;if(j){o=0;j=la(95,j|0,((j|0)<0)<<31>>31|0,0)|0;r=o;o=0;if(r&1){f=10;break}}else j=-1;n=(e|0)!=-1;p=(f|0)!=-1;if(n&p){k=(f|0)%30|0;c[x>>2]=((k|0)%3|0)+(((e|0)%30|0)*3|0);c[y>>2]=(k|0)/3|0;o=0;k=ja(99,B|0,x|0)|0;r=o;o=0;if(r&1){f=31;break}k=c[k>>2]|0;o=0;m=ja(99,B|0,x|0)|0;r=o;o=0;if(r&1){f=31;break}c[m>>2]=k+1;o=0;k=ja(99,C|0,y|0)|0;r=o;o=0;if(r&1){f=31;break}k=c[k>>2]|0;o=0;m=ja(99,C|0,y|0)|0;r=o;o=0;if(r&1){f=31;break}c[m>>2]=k+1}q=(i|0)!=-1;r=(j|0)!=-1;if(q&r){k=(j|0)%30|0;c[x>>2]=((k|0)%3|0)+(((i|0)%30|0)*3|0);c[y>>2]=(k|0)/3|0;o=0;k=ja(99,B|0,x|0)|0;m=o;o=0;if(m&1){f=38;break}k=c[k>>2]|0;o=0;m=ja(99,B|0,x|0)|0;E=o;o=0;if(E&1){f=38;break}c[m>>2]=k+1;o=0;k=ja(99,C|0,y|0)|0;E=o;o=0;if(E&1){f=38;break}k=c[k>>2]|0;o=0;m=ja(99,C|0,y|0)|0;E=o;o=0;if(E&1){f=38;break}c[m>>2]=k+1}if(n){c[x>>2]=(e|0)/30|0;o=0;e=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=43;break}e=c[e>>2]|0;o=0;k=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=43;break}c[k>>2]=e+1}if(p){c[x>>2]=(f|0)/30|0;o=0;e=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=48;break}e=c[e>>2]|0;o=0;f=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=48;break}c[f>>2]=e+1}if((g|0)!=-1){c[x>>2]=(g|0)/30|0;o=0;e=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=53;break}e=c[e>>2]|0;o=0;f=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=53;break}c[f>>2]=e+1}if((h|0)!=-1){c[x>>2]=(h|0)/30|0;o=0;e=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=58;break}e=c[e>>2]|0;o=0;f=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=58;break}c[f>>2]=e+1}if(q){c[x>>2]=(i|0)/30|0;o=0;e=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=63;break}e=c[e>>2]|0;o=0;f=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=63;break}c[f>>2]=e+1}if(r){c[x>>2]=(j|0)/30|0;o=0;e=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=68;break}e=c[e>>2]|0;o=0;f=ja(99,D|0,x|0)|0;E=o;o=0;if(E&1){f=68;break}c[f>>2]=e+1}o=0;Xa(301,x|0,D|0);E=o;o=0;if(E&1){f=72;break}i=vz(x)|0;e=s+1|0;b:do if((e|0)<(i|0))while(1){if((e|0)>=(i|0))break b;f=c[w>>2]|0;g=c[u>>2]|0;if((f|0)==(g|0)){o=0;Xa(311,d|0,v|0);E=o;o=0;if(E&1){f=85;break a}h=c[w>>2]|0;f=c[u>>2]|0}else{c[f>>2]=c[v>>2];h=f+4|0;c[w>>2]=h;f=g}if((h|0)==(f|0)){o=0;Xa(311,d|0,v|0);E=o;o=0;if(E&1){f=85;break a}g=c[w>>2]|0;f=c[u>>2]|0}else{c[h>>2]=c[v>>2];g=h+4|0;c[w>>2]=g}if((g|0)==(f|0)){o=0;Xa(311,d|0,v|0);E=o;o=0;if(E&1){f=85;break a}}else{c[g>>2]=c[v>>2];c[w>>2]=g+4}e=e+1|0}while(0);s=i;e=(c[v>>2]|0)+3|0}switch(f|0){case 6:{e=0;while(1){f=c[d>>2]|0;if((e|0)>=((c[w>>2]|0)-f>>2|0)){f=89;break}c[z>>2]=(c[b>>2]|0)+((c[f+(e<<2)>>2]|0)*12|0)+(e*12|0);c[y>>2]=0;o=0;bb(70,x|0,a|0,y|0);E=o;o=0;if(E&1){f=93;break}o=0;c[v>>2]=c[z>>2];la(94,b|0,v|0,x|0)|0;E=o;o=0;if(E&1){f=94;break}pj(x);e=e+1|0}if((f|0)==89){o=0;Xa(301,v|0,B|0);E=o;o=0;if(E&1){e=Fb()|0;break}else{E=(vz(v)|0)+1|0;Cz(D);Cz(C);Cz(B);l=A;return E|0}}else if((f|0)==93)e=Fb()|0;else if((f|0)==94){e=Fb()|0;pj(x)}break}case 10:{e=Fb()|0;f=87;break}case 31:{e=Fb()|0;f=87;break}case 38:{e=Fb()|0;f=87;break}case 43:{e=Fb()|0;f=87;break}case 48:{e=Fb()|0;f=87;break}case 53:{e=Fb()|0;f=87;break}case 58:{e=Fb()|0;f=87;break}case 63:{e=Fb()|0;f=87;break}case 68:{e=Fb()|0;f=87;break}case 72:{e=Fb()|0;f=87;break}case 85:{e=Fb()|0;f=87;break}}Cz(D);Cz(C);Cz(B);Qb(e|0);return 0}function xz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=a+4|0;d=c[g>>2]|0;f=c[a>>2]|0;e=(d-f|0)/12|0;a:do if(e>>>0>=b>>>0){if(e>>>0>b>>>0){a=f+(b*12|0)|0;while(1){if((d|0)==(a|0))break a;f=d+-12|0;c[g>>2]=f;pj(f);d=c[g>>2]|0}}}else Fz(a,b-e|0);while(0);return}function yz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=a+4|0;d=c[a>>2]|0;g=0;e=d;while(1){if((g|0)<(((c[h>>2]|0)-d|0)/12|0|0)){f=0;d=e}else break;while(1){if((f|0)>=((c[d+(g*12|0)+4>>2]|0)-(c[d+(g*12|0)>>2]|0)>>2|0))break;e=f*17|0;d=0;while(1){if((d|0)==17)break;if((c[(c[(c[a>>2]|0)+(g*12|0)>>2]|0)+(f<<2)>>2]&1<<16-d|0)>0)ce(be(b)|0,d+e|0,g);d=d+1|0}f=f+1|0;d=c[a>>2]|0}g=g+1|0;e=d}return}function zz(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;pj(e)}cU(c[a>>2]|0)}return}function Az(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;Bz(e)}cU(c[a>>2]|0)}return}function Bz(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if(b|0){d=a+4|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;Cz(e)}cU(c[a>>2]|0)}return}function Cz(a){a=a|0;Dz(a);return}function Dz(a){a=a|0;Ez(a,c[a+4>>2]|0);return}function Ez(a,b){a=a|0;b=b|0;if(!b)return;else{Ez(a,c[b>>2]|0);Ez(a,c[b+4>>2]|0);cU(b);return}}function Fz(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;i=l;l=l+32|0;f=i;g=a+8|0;h=a+4|0;d=c[h>>2]|0;do if((((c[g>>2]|0)-d|0)/12|0)>>>0>>0){d=((d-(c[a>>2]|0)|0)/12|0)+b|0;e=Hz(a)|0;if(e>>>0>>0)wS(a);j=c[a>>2]|0;k=((c[g>>2]|0)-j|0)/12|0;g=k<<1;Iz(f,k>>>0>>1>>>0?(g>>>0>>0?d:g):e,((c[h>>2]|0)-j|0)/12|0,a+8|0);o=0;Xa(312,f|0,b|0);h=o;o=0;if(!(h&1)?(o=0,Xa(313,a|0,f|0),k=o,o=0,!(k&1)):0){Lz(f);break}k=Fb()|0;Lz(f);Qb(k|0)}else Gz(a,b);while(0);l=i;return}function Gz(a,b){a=a|0;b=b|0;var d=0;a=a+4|0;d=c[a>>2]|0;yW(d|0,0,b*12|0)|0;c[a>>2]=d+(b*12|0);return}function Hz(a){a=a|0;return 357913941}function Iz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=357913941){e=aU(b*12|0)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d*12|0)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b*12|0);return}function Jz(a,b){a=a|0;b=b|0;var d=0;a=a+8|0;d=c[a>>2]|0;yW(d|0,0,b*12|0)|0;c[a>>2]=d+(b*12|0);return}function Kz(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;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;k=c[g>>2]|0;i=k+-12|0;h=d+-12|0;c[i>>2]=0;j=k+-8|0;c[j>>2]=0;c[k+-4>>2]=0;c[i>>2]=c[h>>2];i=d+-8|0;c[j>>2]=c[i>>2];j=d+-4|0;c[k+-4>>2]=c[j>>2];c[j>>2]=0;c[i>>2]=0;c[h>>2]=0;c[g>>2]=(c[g>>2]|0)+-12;d=h}i=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=i;i=b+8|0;k=c[f>>2]|0;c[f>>2]=c[i>>2];c[i>>2]=k;i=a+8|0;k=b+12|0;j=c[i>>2]|0;c[i>>2]=c[k>>2];c[k>>2]=j;c[b>>2]=c[g>>2];return}function Lz(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;pj(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function Mz(a,b){a=a|0;b=b|0;c[a+4>>2]=0;c[a+8>>2]=0;c[a>>2]=a+4;return}function Nz(a){a=a|0;var b=0;b=a+4|0;Ez(a,c[b>>2]|0);c[a+8>>2]=0;c[a>>2]=b;c[b>>2]=0;return}function Oz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+32|0;d=e+8|0;f=e;c[f>>2]=b;Vz(d,a,b,61812,f,e+16|0);l=e;return (c[d>>2]|0)+20|0}function Pz(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,m=0,n=0,p=0,q=0;q=l;l=l+32|0;p=q;i=q+20|0;j=c[b>>2]|0;k=j;h=((c[d>>2]|0)-k|0)/12|0;n=j+(h*12|0)|0;d=b+4|0;g=c[d>>2]|0;m=b+8|0;do if(g>>>0<(c[m>>2]|0)>>>0)if((n|0)==(g|0)){c[n>>2]=0;b=j+(h*12|0)+4|0;c[b>>2]=0;c[j+(h*12|0)+8>>2]=0;c[n>>2]=c[e>>2];f=e+4|0;c[b>>2]=c[f>>2];b=e+8|0;c[j+(h*12|0)+8>>2]=c[b>>2];c[b>>2]=0;c[f>>2]=0;c[e>>2]=0;c[d>>2]=(c[d>>2]|0)+12;f=n;break}else{Qz(b,n,g,n+12|0);a[p>>0]=a[i>>0]|0;Rz(n,e,p);f=n;break}else{d=((g-k|0)/12|0)+1|0;g=Hz(b)|0;if(g>>>0>>0)wS(b);k=c[b>>2]|0;j=((c[m>>2]|0)-k|0)/12|0;m=j<<1;Iz(p,j>>>0>>1>>>0?(m>>>0>>0?d:m):g,(n-k|0)/12|0,b+8|0);o=0;Xa(314,p|0,e|0);e=o;o=0;if(!(e&1)?(o=0,f=la(96,b|0,p|0,n|0)|0,e=o,o=0,!(e&1)):0){Lz(p);break}q=Fb()|0;Lz(p);Qb(q|0)}while(0);l=q;return f|0}function Qz(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,m=0,n=0,o=0;m=l;l=l+16|0;j=m+1|0;k=m;i=b+4|0;g=c[i>>2]|0;b=d+(((g-f|0)/12|0)*12|0)|0;f=b;h=g;while(1){if(f>>>0>=e>>>0)break;c[h>>2]=0;o=h+4|0;c[o>>2]=0;c[h+8>>2]=0;c[h>>2]=c[f>>2];n=f+4|0;c[o>>2]=c[n>>2];o=f+8|0;c[h+8>>2]=c[o>>2];c[o>>2]=0;c[n>>2]=0;c[f>>2]=0;n=(c[i>>2]|0)+12|0;c[i>>2]=n;f=f+12|0;h=n}while(1){if((b|0)==(d|0))break;o=b+-12|0;n=g+-12|0;a[j>>0]=a[k>>0]|0;Rz(n,o,j);g=n;b=o}l=m;return}function Rz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;ny(a);c[a>>2]=c[b>>2];d=b+4|0;c[a+4>>2]=c[d>>2];e=b+8|0;c[a+8>>2]=c[e>>2];c[e>>2]=0;c[d>>2]=0;c[b>>2]=0;return}function Sz(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+48|0;n=s+32|0;m=s+28|0;h=s;i=s+24|0;j=s+20|0;r=b+8|0;q=c[r>>2]|0;k=b+12|0;p=c[k>>2]|0;f=p;do if((q|0)==(p|0)){p=b+4|0;e=c[p>>2]|0;t=c[b>>2]|0;g=t;if(e>>>0<=t>>>0){t=f-g|0;t=(t|0)==0?1:((t|0)/12|0)<<1;Iz(h,t,t>>>2,c[b+16>>2]|0);c[i>>2]=c[p>>2];c[j>>2]=c[r>>2];o=0;c[m>>2]=c[i>>2];c[n>>2]=c[j>>2];bb(132,h|0,m|0,n|0);t=o;o=0;if(t&1){t=Fb()|0;Lz(h);Qb(t|0)}else{t=c[b>>2]|0;c[b>>2]=c[h>>2];c[h>>2]=t;b=h+4|0;t=c[p>>2]|0;c[p>>2]=c[b>>2];c[b>>2]=t;b=h+8|0;t=c[r>>2]|0;c[r>>2]=c[b>>2];c[b>>2]=t;b=h+12|0;t=c[k>>2]|0;c[k>>2]=c[b>>2];c[b>>2]=t;Lz(h);b=c[r>>2]|0;break}}f=(((e-g|0)/12|0)+1|0)/-2|0;b=e+(f*12|0)|0;while(1){if((e|0)==(q|0))break;a[n>>0]=a[m>>0]|0;Rz(b,e,n);b=b+12|0;e=e+12|0}c[r>>2]=b;c[p>>2]=(c[p>>2]|0)+(f*12|0)}else b=q;while(0);c[b>>2]=0;q=b+4|0;c[q>>2]=0;c[b+8>>2]=0;c[b>>2]=c[d>>2];t=d+4|0;c[q>>2]=c[t>>2];q=d+8|0;c[b+8>>2]=c[q>>2];c[q>>2]=0;c[t>>2]=0;c[d>>2]=0;c[r>>2]=(c[r>>2]|0)+12;l=s;return}function Tz(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;h=b+4|0;i=c[h>>2]|0;f=c[a>>2]|0;e=d;g=i;while(1){if((e|0)==(f|0))break;j=g+-12|0;k=e+-12|0;c[j>>2]=0;l=g+-8|0;c[l>>2]=0;c[g+-4>>2]=0;c[j>>2]=c[k>>2];j=e+-8|0;c[l>>2]=c[j>>2];l=e+-4|0;c[g+-4>>2]=c[l>>2];c[l>>2]=0;c[j>>2]=0;c[k>>2]=0;j=(c[h>>2]|0)+-12|0;c[h>>2]=j;e=k;g=j}e=a+4|0;f=c[e>>2]|0;g=b+8|0;while(1){if((d|0)==(f|0))break;j=c[g>>2]|0;c[j>>2]=0;k=j+4|0;c[k>>2]=0;c[j+8>>2]=0;c[j>>2]=c[d>>2];l=d+4|0;c[k>>2]=c[l>>2];k=d+8|0;c[j+8>>2]=c[k>>2];c[k>>2]=0;c[l>>2]=0;c[d>>2]=0;c[g>>2]=(c[g>>2]|0)+12;d=d+12|0}j=c[a>>2]|0;c[a>>2]=c[h>>2];c[h>>2]=j;j=c[e>>2]|0;c[e>>2]=c[g>>2];c[g>>2]=j;j=a+8|0;l=b+12|0;k=c[j>>2]|0;c[j>>2]=c[l>>2];c[l>>2]=k;c[b>>2]=c[h>>2];return i|0}function Uz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[d>>2]|0;d=a+8|0;a=c[b>>2]|0;while(1){if((a|0)==(e|0))break;h=c[d>>2]|0;c[h>>2]=0;g=h+4|0;c[g>>2]=0;c[h+8>>2]=0;c[h>>2]=c[a>>2];f=a+4|0;c[g>>2]=c[f>>2];g=a+8|0;c[h+8>>2]=c[g>>2];c[g>>2]=0;c[f>>2]=0;c[a>>2]=0;c[d>>2]=(c[d>>2]|0)+12;f=a+12|0;c[b>>2]=f;a=f}return}function Vz(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;m=l;l=l+16|0;j=m+12|0;k=m;i=Wz(d,j,e)|0;e=c[i>>2]|0;if(!e){Xz(k,d,f,g,h);Yz(d,c[j>>2]|0,i,c[k>>2]|0);e=c[k>>2]|0;i=1}else i=0;c[b>>2]=e;a[b+4>>0]=i;l=m;return}function Wz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=a+4|0;e=c[f>>2]|0;a=Zz(a)|0;do if(e){f=c[d>>2]|0;while(1){d=c[e+16>>2]|0;if((f|0)<(d|0)){d=c[e>>2]|0;if(!d){d=6;break}else{a=e;e=d}}else{if((d|0)>=(f|0)){d=10;break}a=e+4|0;d=c[a>>2]|0;if(!d){d=9;break}else e=d}}if((d|0)==6){c[b>>2]=e;a=e;break}else if((d|0)==9){c[b>>2]=e;break}else if((d|0)==10){c[b>>2]=e;break}}else{c[b>>2]=f;a=f}while(0);return a|0}function Xz(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;g=aU(24)|0;c[b>>2]=g;c[b+4>>2]=d+4;c[g+16>>2]=c[c[f>>2]>>2];c[g+20>>2]=0;a[b+8>>0]=1;return}function Yz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=b;c[d>>2]=e;b=c[a>>2]|0;if(c[b>>2]|0){c[a>>2]=c[b>>2];e=c[d>>2]|0}rl(c[a+4>>2]|0,e);a=a+8|0;c[a>>2]=(c[a>>2]|0)+1;return}function Zz(a){a=a|0;return a+4|0}function _z(b){b=b|0;a[b>>0]=0;c[b+4>>2]=0;return}function $z(a,b){a=a|0;b=b|0;c[a+4>>2]=b;return}function aA(b,c){b=b|0;c=c|0;a[b>>0]=c&1;return}function bA(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,m=0;k=l;l=l+32|0;h=k;i=a+8|0;j=a+4|0;e=c[j>>2]|0;g=e;do if((c[i>>2]|0)-e>>2>>>0>>0){e=(e-(c[a>>2]|0)>>2)+b|0;f=qj(a)|0;if(f>>>0>>0)wS(a);g=c[a>>2]|0;m=(c[i>>2]|0)-g|0;i=m>>1;Kn(h,m>>2>>>0>>1>>>0?(i>>>0>>0?e:i):f,(c[j>>2]|0)-g>>2,a+8|0);o=0;bb(133,h|0,b|0,d|0);j=o;o=0;if(!(j&1)?(o=0,Xa(179,a|0,h|0),m=o,o=0,!(m&1)):0){Nn(h);break}m=Fb()|0;Nn(h);Qb(m|0)}else{e=b;f=g;while(1){c[f>>2]=c[d>>2];e=e+-1|0;if(!e)break;else f=f+4|0}c[j>>2]=g+(b<<2)}while(0);l=k;return}function cA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=a+8|0;e=c[f>>2]|0;a=b;g=e;while(1){c[g>>2]=c[d>>2];a=a+-1|0;if(!a)break;else g=g+4|0}c[f>>2]=e+(b<<2);return}function dA(a){a=a|0;var b=0,c=0,d=0,e=0;if(!a)b=-1;else{e=0;d=0;b=1;c=0;while(1){if((e|0)==17)break;do if((1<0){c=(b&1^1)+c|0;if(!(c&1)){d=d+1|0;b=1;break}else{d=d+-1|0;b=1;break}}else b=0;while(0);e=e+1|0}b=(d+9|0)%9|0}return b|0}function eA(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=qj(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;Kn(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;f=c[g>>2]|0;c[f>>2]=c[b>>2];c[g>>2]=f+4;o=0;Xa(179,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;Nn(d);Qb(k|0)}else{Nn(d);l=h;return}}function fA(a,b){a=a|0;b=b|0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;do if(b|0){o=0;Xa(315,a|0,b|0);d=o;o=0;if(!(d&1)?(o=0,Xa(316,a|0,b|0),d=o,o=0,!(d&1)):0)break;d=Fb()|0;Az(a);Qb(d|0)}while(0);return}function gA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=a+4|0;d=c[g>>2]|0;f=c[a>>2]|0;e=(d-f|0)/12|0;a:do if(e>>>0>=b>>>0){if(e>>>0>b>>>0){a=f+(b*12|0)|0;while(1){if((d|0)==(a|0))break a;f=d+-12|0;c[g>>2]=f;Cz(f);d=c[g>>2]|0}}}else qA(a,b-e|0);while(0);return}function hA(b){b=b|0;return (a[b>>0]|0)!=0|0}function iA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=a+4|0;d=c[g>>2]|0;f=c[a>>2]|0;e=(d-f|0)/12|0;a:do if(e>>>0>=b>>>0){if(e>>>0>b>>>0){a=f+(b*12|0)|0;while(1){if((d|0)==(a|0))break a;f=d+-12|0;c[g>>2]=f;Bz(f);d=c[g>>2]|0}}}else jA(a,b-e|0);while(0);return}function jA(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;i=l;l=l+32|0;f=i;g=a+8|0;h=a+4|0;d=c[h>>2]|0;do if((((c[g>>2]|0)-d|0)/12|0)>>>0>>0){d=((d-(c[a>>2]|0)|0)/12|0)+b|0;e=lA(a)|0;if(e>>>0>>0)wS(a);j=c[a>>2]|0;k=((c[g>>2]|0)-j|0)/12|0;g=k<<1;mA(f,k>>>0>>1>>>0?(g>>>0>>0?d:g):e,((c[h>>2]|0)-j|0)/12|0,a+8|0);o=0;Xa(317,f|0,b|0);h=o;o=0;if(!(h&1)?(o=0,Xa(318,a|0,f|0),k=o,o=0,!(k&1)):0){pA(f);break}k=Fb()|0;pA(f);Qb(k|0)}else kA(a,b);while(0);l=i;return}function kA(a,b){a=a|0;b=b|0;var d=0;a=a+4|0;d=c[a>>2]|0;yW(d|0,0,b*12|0)|0;c[a>>2]=d+(b*12|0);return}function lA(a){a=a|0;return 357913941}function mA(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=357913941){e=aU(b*12|0)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d*12|0)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b*12|0);return}function nA(a,b){a=a|0;b=b|0;var d=0;a=a+8|0;d=c[a>>2]|0;yW(d|0,0,b*12|0)|0;c[a>>2]=d+(b*12|0);return}function oA(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;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;k=c[g>>2]|0;i=k+-12|0;h=d+-12|0;c[i>>2]=0;j=k+-8|0;c[j>>2]=0;c[k+-4>>2]=0;c[i>>2]=c[h>>2];i=d+-8|0;c[j>>2]=c[i>>2];j=d+-4|0;c[k+-4>>2]=c[j>>2];c[j>>2]=0;c[i>>2]=0;c[h>>2]=0;c[g>>2]=(c[g>>2]|0)+-12;d=h}i=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=i;i=b+8|0;k=c[f>>2]|0;c[f>>2]=c[i>>2];c[i>>2]=k;i=a+8|0;k=b+12|0;j=c[i>>2]|0;c[i>>2]=c[k>>2];c[k>>2]=j;c[b>>2]=c[g>>2];return}function pA(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;Bz(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function qA(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;i=l;l=l+32|0;f=i;g=a+8|0;h=a+4|0;d=c[h>>2]|0;do if((((c[g>>2]|0)-d|0)/12|0)>>>0>>0){d=((d-(c[a>>2]|0)|0)/12|0)+b|0;e=sA(a)|0;if(e>>>0>>0)wS(a);j=c[a>>2]|0;k=((c[g>>2]|0)-j|0)/12|0;g=k<<1;tA(f,k>>>0>>1>>>0?(g>>>0>>0?d:g):e,((c[h>>2]|0)-j|0)/12|0,a+8|0);o=0;Xa(319,f|0,b|0);h=o;o=0;if(!(h&1)?(o=0,Xa(320,a|0,f|0),k=o,o=0,!(k&1)):0){wA(f);break}k=Fb()|0;wA(f);Qb(k|0)}else rA(a,b);while(0);l=i;return}function rA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f;d=a+4|0;a=b;b=c[d>>2]|0;do{Mz(b,e);b=(c[d>>2]|0)+12|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);l=f;return}function sA(a){a=a|0;return 357913941}function tA(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+12>>2]=0;c[a+16>>2]=e;do if(b){if(b>>>0<=357913941){e=aU(b*12|0)|0;break}e=Ab(8)|0;o=0;Xa(98,e|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(e|0);Qb(d|0)}else{c[e>>2]=41052;Mb(e|0,3176,299)}}else e=0;while(0);c[a>>2]=e;d=e+(d*12|0)|0;c[a+8>>2]=d;c[a+4>>2]=d;c[a+12>>2]=e+(b*12|0);return}function uA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;e=f;d=a+8|0;a=b;b=c[d>>2]|0;do{Mz(b,e);b=(c[d>>2]|0)+12|0;c[d>>2]=b;a=a+-1|0}while((a|0)!=0);l=f;return}function vA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=c[a>>2]|0;f=a+4|0;g=b+4|0;d=c[f>>2]|0;while(1){if((d|0)==(e|0))break;h=d+-12|0;xA((c[g>>2]|0)+-12|0,h);c[g>>2]=(c[g>>2]|0)+-12;d=h}e=c[a>>2]|0;c[a>>2]=c[g>>2];c[g>>2]=e;e=b+8|0;h=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=h;e=a+8|0;h=b+12|0;f=c[e>>2]|0;c[e>>2]=c[h>>2];c[h>>2]=f;c[b>>2]=c[g>>2];return}function wA(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;d=a+8|0;while(1){e=c[d>>2]|0;if((e|0)==(b|0))break;e=e+-12|0;c[d>>2]=e;Cz(e)}a=c[a>>2]|0;if(a|0)cU(a);return}function xA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;c[a>>2]=c[b>>2];e=c[b+4>>2]|0;c[a+4>>2]=e;f=b+8|0;g=c[f>>2]|0;c[a+8>>2]=g;d=a+4|0;if(!g)c[a>>2]=d;else{c[e+8>>2]=d;g=b+4|0;c[b>>2]=g;c[g>>2]=0;c[f>>2]=0}return}function yA(a,b){a=a|0;b=b|0;var d=0;if((lA(a)|0)>>>0>>0)wS(a);if(b>>>0<=357913941){d=aU(b*12|0)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b*12|0);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function zA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=a+4|0;e=c[h>>2]|0;g=c[a>>2]|0;f=e-g>>2;a:do if(f>>>0>=b>>>0){if(f>>>0>b>>>0){a=g+(b<<2)|0;while(1){if((e|0)==(a|0))break a;g=e+-4|0;c[h>>2]=g;e=g}}}else AA(a,b-f|0,d);while(0);return}function AA(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,m=0;j=l;l=l+32|0;g=j;h=a+8|0;i=a+4|0;e=c[i>>2]|0;do if((c[h>>2]|0)-e>>2>>>0>>0){e=(e-(c[a>>2]|0)>>2)+b|0;f=mm(a)|0;if(f>>>0>>0)wS(a);k=c[a>>2]|0;m=(c[h>>2]|0)-k|0;h=m>>1;fz(g,m>>2>>>0>>1>>>0?(h>>>0>>0?e:h):f,(c[i>>2]|0)-k>>2,a+8|0);o=0;bb(134,g|0,b|0,d|0);i=o;o=0;if(!(i&1)?(o=0,Xa(299,a|0,g|0),m=o,o=0,!(m&1)):0){iz(g);break}m=Fb()|0;iz(g);Qb(m|0)}else{f=e+(b<<2)|0;while(1){c[e>>2]=c[d>>2];b=b+-1|0;if(!b)break;else e=e+4|0}c[i>>2]=f}while(0);l=j;return}function BA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=a+8|0;a=c[f>>2]|0;e=a;while(1){c[e>>2]=c[d>>2];a=a+4|0;b=b+-1|0;if(!b)break;else e=a}c[f>>2]=a;return}function CA(a,b){a=a|0;b=b|0;var d=0;if((Hz(a)|0)>>>0>>0)wS(a);if(b>>>0<=357913941){d=aU(b*12|0)|0;c[a+4>>2]=d;c[a>>2]=d;c[a+8>>2]=d+(b*12|0);return}a=Ab(8)|0;o=0;Xa(98,a|0,56853);d=o;o=0;if(d&1){d=Fb()|0;Jb(a|0);Qb(d|0)}else{c[a>>2]=41052;Mb(a|0,3176,299)}}function DA(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;h=l;l=l+32|0;d=h;e=a+4|0;f=((c[e>>2]|0)-(c[a>>2]|0)>>2)+1|0;g=mm(a)|0;if(g>>>0>>0)wS(a);i=c[a>>2]|0;k=(c[a+8>>2]|0)-i|0;j=k>>1;fz(d,k>>2>>>0>>1>>>0?(j>>>0>>0?f:j):g,(c[e>>2]|0)-i>>2,a+8|0);g=d+8|0;f=c[g>>2]|0;c[f>>2]=c[b>>2];c[g>>2]=f+4;o=0;Xa(299,a|0,d|0);g=o;o=0;if(g&1){k=Fb()|0;iz(d);Qb(k|0)}else{iz(d);l=h;return}}function EA(){FA();GA();HA();IA();return}function FA(){JA(58912,0,1,54876);return}function GA(){JA(58932,1,0,48098);return}function HA(){JA(58952,2,3,48096);return}function IA(){JA(58972,3,2,48094);return}function JA(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;h=l;l=l+16|0;g=h;c[b>>2]=d;c[b+4>>2]=e;d=b+8|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;e=Uh(f)|0;if(e>>>0>4294967279)lU(d);if(e>>>0<11)a[d+11>>0]=e;else{j=e+16&-16;i=aU(j)|0;c[d>>2]=i;c[b+16>>2]=j|-2147483648;c[b+12>>2]=e;d=i}_i(d,f,e)|0;a[g>>0]=0;ah(d+e|0,g);l=h;return}function KA(a){a=a|0;return c[a>>2]|0}function LA(a){a=a|0;return a+8|0}function MA(a){a=a|0;if((a|0)>-1&4>(a|0))return c[33084+(a<<2)>>2]|0;else{a=Ab(8)|0;hg(a,48100);Mb(a|0,24,58)}return 0}function NA(b,d){b=b|0;d=d|0;var e=0,f=0;cf(b);c[b>>2]=33428;o=0;e=fa(142,d>>>3&3|0)|0;f=o;o=0;if(f&1){f=Fb()|0;ff(b);Qb(f|0)}else{c[b+8>>2]=e;a[b+12>>0]=d&7;return}}function OA(a){a=a|0;ff(a);cU(a);return}function PA(a){a=a|0;return c[a+8>>2]|0}function QA(b){b=b|0;return a[b+12>>0]|0}function RA(a,b){a=a|0;b=b|0;b=b^a;return (c[33356+((b>>>4&15)<<2)>>2]|0)+(c[33356+((b&15)<<2)>>2]|0)+(c[33356+((b>>>8&15)<<2)>>2]|0)+(c[33356+((b>>>12&15)<<2)>>2]|0)+(c[33356+((b>>>16&15)<<2)>>2]|0)+(c[33356+((b>>>20&15)<<2)>>2]|0)+(c[33356+((b>>>24&15)<<2)>>2]|0)+(c[33356+(b>>>28<<2)>>2]|0)|0}function SA(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;TA(d,b,c);o=0;e=ja(100,d|0,0)|0;g=o;o=0;do if(!(g&1)){if(e){o=0;Xa(321,a|0,d|0);g=o;o=0;if(g&1)break}else{o=0;bb(135,a|0,21522^b|0,21522^c|0);g=o;o=0;if(g&1)break}WA(d);l=f;return}while(0);g=Fb()|0;WA(d);Qb(g|0)}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,m=0,n=0,p=0,q=0;q=l;l=l+16|0;n=q;m=(b|0)==(d|0);g=2147483647;i=0;p=0;while(1){if((p|0)>=32){f=13;break}h=c[33100+(p<<3)>>2]|0;if((h|0)==(b|0)|(h|0)==(d|0)){f=4;break}f=RA(b,h)|0;j=33100+(p<<3)+4|0;if((f|0)<(g|0))e=c[j>>2]|0;else{f=g;e=i}if(!m?(k=RA(d,h)|0,(k|0)<(f|0)):0){f=k;e=c[j>>2]|0}g=f;i=e;p=p+1|0}do if((f|0)==4){e=aU(16)|0;o=0;Xa(322,e|0,c[33100+(p<<3)+4>>2]|0);p=o;o=0;if(p&1){f=Fb()|0;cU(e);e=f;f=21;break}else{ZA(a,e);f=20;break}}else if((f|0)==13)if((g|0)<4){e=aU(16)|0;o=0;Xa(322,e|0,i|0);p=o;o=0;if(p&1){f=Fb()|0;cU(e);e=f;f=21;break}else{ZA(a,e);f=20;break}}else{ZA(n,0);o=0;Xa(321,a|0,n|0);a=o;o=0;if(a&1){e=Fb()|0;WA(n);f=21;break}else{WA(n);f=20;break}}while(0);if((f|0)==20){l=q;return}else if((f|0)==21)Qb(e|0)}function UA(a,b){a=a|0;b=b|0;return (YA(a,b)|0)^1|0}function VA(a,b){a=a|0;b=b|0;c[a>>2]=0;XA(a,c[b>>2]|0);return}function WA(a){a=a|0;a=c[a>>2]|0;if(a|0)af(a);return}function XA(a,b){a=a|0;b=b|0;var d=0;if(b|0)$e(b)|0;d=c[a>>2]|0;if(d|0)af(d);c[a>>2]=b;return}function YA(a,b){a=a|0;b=b|0;return (c[a>>2]|0)==(b|0)|0}function ZA(a,b){a=a|0;b=b|0;c[a>>2]=0;XA(a,b);return}function _A(a){a=a|0;c[a>>2]=33444;bB(a+8|0);Gh(a);return}function $A(a){a=a|0;_A(a);cU(a);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,k=0,m=0,n=0,p=0,q=0,r=0,s=0;j=l;l=l+96|0;h=j+80|0;s=j+64|0;f=j+52|0;r=j+56|0;q=j+40|0;p=j+36|0;g=j+32|0;m=j+28|0;n=j+16|0;k=j+4|0;i=j;Tf(f,vi(d)|0);o=0;Xa(229,s|0,f|0);d=o;o=0;if(d&1){b=Fb()|0;de(f)}else{de(f);o=0;bb(136,r|0,s|0,e|0);f=o;o=0;if(f&1)b=Fb()|0;else{f=Io(r)|0;o=0;Xa(120,q|0,f|0);f=o;o=0;if(f&1)b=Fb()|0;else{f=Io(r)|0;o=0;Xa(126,g|0,f|0);f=o;o=0;do if(f&1)b=Fb()|0;else{o=0;bb(95,p|0,b+8|0,g|0);f=o;o=0;if(f&1){b=Fb()|0;de(g);break}de(g);o=0;e=fa(107,40)|0;g=o;o=0;a:do if(g&1)b=Fb()|0;else{g=zi(p)|0;o=0;Xa(122,m|0,g|0);g=o;o=0;do if(!(g&1)){g=zi(p)|0;o=0;Xa(123,n|0,g|0);g=o;o=0;if(g&1){b=Fb()|0;Ke(m);break}o=0;Xa(96,k|0,q|0);g=o;o=0;if(g&1){b=Fb()|0;d=1}else{vh(i,12);o=0;c[h>>2]=c[i>>2];hb(47,e|0,m|0,n|0,k|0,h|0);i=o;o=0;if(!(i&1)){o=0;Xa(124,a|0,e|0);i=o;o=0;if(i&1)d=0;else{Qe(k);Nd(n);Ke(m);Bi(p);Qe(q);Jo(r);ss(s);l=j;return}}else d=1;b=Fb()|0;Qe(k)}Nd(n);Ke(m);if(!d)break a}else b=Fb()|0;while(0);cU(e)}while(0);Bi(p)}while(0);Qe(q)}Jo(r)}ss(s)}Qb(b|0)}function bB(a){a=a|0;to(a);return}function cB(a){a=a|0;var b=0;zh(a);c[a>>2]=33444;o=0;Na(342,a+8|0);b=o;o=0;if(b&1){b=Fb()|0;Gh(a);Qb(b|0)}else return}function dB(a){a=a|0;return a+8|0}function eB(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=33604;b=c[a+12>>2]|0;if(b|0){pj(b);cU(b)}e=a+16|0;f=a+20|0;d=0;while(1){b=c[e>>2]|0;if(d>>>0>=(c[f>>2]|0)-b>>2>>>0)break;b=c[b+(d<<2)>>2]|0;if(b|0){hB(b);cU(b)}d=d+1|0}gB(e);ff(a);return}function fB(a){a=a|0;eB(a);cU(a);return}function gB(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-4|0;c[a>>2]=e;b=e}cU(d)}return}function hB(a){a=a|0;var b=0,d=0,e=0;e=a+4|0;d=a+8|0;b=0;while(1){a=c[e>>2]|0;if(b>>>0>=(c[d>>2]|0)-a>>2>>>0)break;a=c[a+(b<<2)>>2]|0;if(a|0)cU(a);b=b+1|0}iB(e);return}function iB(a){a=a|0;var b=0,d=0,e=0;d=c[a>>2]|0;if(d|0){a=a+4|0;b=c[a>>2]|0;while(1){if((b|0)==(d|0))break;e=b+-4|0;c[a>>2]=e;b=e}cU(d)}return}function jB(){kB();lB();return}function kB(){c[14748]=0;c[14749]=0;c[14750]=0;return}function lB(){c[14751]=mB()|0;return} // EMSCRIPTEN_END_FUNCS var Lc=[Aaa,Aaa,EW,Aaa,FW,Aaa,GW,Aaa,HW,Aaa,IW,Aaa,JW,Aaa,KW,Aaa,LW,Aaa,MW,Aaa,NW,Aaa,OW,Aaa,PW,Aaa,QW,Aaa,RW,Aaa,SW,Aaa,TW,Aaa,UW,Aaa,VW,Aaa,WW,Aaa,XW,Aaa,Xh,Yh,hF,Fy,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa,Aaa];var Mc=[Baa,Baa,ZW,Baa,_W,Baa,$W,Baa,aX,Baa,bX,Baa,cX,Baa,dX,Baa,eX,Baa,fX,Baa,gX,Baa,hX,Baa,iX,Baa,jX,Baa,kX,Baa,lX,Baa,mX,Baa,nX,Baa,oX,Baa,pX,Baa,qX,Baa,hi,PF,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa,Baa];var Nc=[Caa,Caa,sX,Caa,tX,Caa,uX,Caa,vX,Caa,wX,Caa,xX,Caa,yX,Caa,zX,Caa,AX,Caa,BX,Caa,CX,Caa,DX,Caa,EX,Caa,FX,Caa,GX,Caa,HX,Caa,IX,Caa,JX,Caa,KX,Caa,LX,Caa,ei,$E,iM,lM,nM,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa,Caa];var Oc=[Daa,Daa,NX,Daa,OX,Daa,PX,Daa,QX,Daa,RX,Daa,SX,Daa,TX,Daa,UX,Daa,VX,Daa,WX,Daa,XX,Daa,YX,Daa,ZX,Daa,_X,Daa,$X,Daa,aY,Daa,bY,Daa,cY,Daa,dY,Daa,eY,Daa,TE,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa,Daa];var Pc=[Eaa,Eaa,gY,Eaa,hY,Eaa,iY,Eaa,jY,Eaa,kY,Eaa,lY,Eaa,mY,Eaa,nY,Eaa,oY,Eaa,pY,Eaa,qY,Eaa,rY,Eaa,sY,Eaa,tY,Eaa,uY,Eaa,vY,Eaa,wY,Eaa,xY,Eaa,yY,Eaa,zY,Eaa,wg,sm,YL,uJ,wJ,xJ,tJ,QT,ST,UT,_U,Eaa,Eaa,Eaa,Eaa,Eaa,Eaa,Eaa,Eaa,Eaa,Eaa,Eaa];var Qc=[Faa,Faa,BY,Faa,CY,Faa,DY,Faa,EY,Faa,FY,Faa,GY,Faa,HY,Faa,IY,Faa,JY,Faa,KY,Faa,LY,Faa,MY,Faa,NY,Faa,OY,Faa,PY,Faa,QY,Faa,RY,Faa,SY,Faa,TY,Faa,UY,Faa,Jg,Lg,ag,Bg,Dg,QK,RK,fh,UK,ku,ru,Iv,lw,tI,TK,fL,LV,JN,QN,RN,SN,TN,UN,VN,WN,rO,yO,zO,AO,BO,CO,DO,EO,mP,nP,sP,xP,yP,DP,IP,JP,OP,TP,UP,ZP,UQ,VQ,XQ,kR,lR,nR,SR,TR,ZR,_R,dR,eR,gR,tR,uR,wR,zV,CV,FV,QV,aU,Vm,Qh,rg,oi,Dk,Zk,_k,qi,pi,bm,$n,fo,go,_n,vp,pp,qp,np,al,Sp,Uf,Wf,Rh,dB,mF,Kt,Xm,Bu,Au,og,Yf,oy,py,ey,MA,WB,eC,QA,mD,SB,LB,MB,JB,Fl,ED,jE,JD,Gl,LA,PA,lC,VB,TB,RB,gF,aG,wG,$J,rJ,Gaa,Haa,Iaa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa,Faa];var Rc=[Jaa,Jaa,WY,Jaa,XY,Jaa,YY,Jaa,ZY,Jaa,_Y,Jaa,$Y,Jaa,aZ,Jaa,bZ,Jaa,cZ,Jaa,dZ,Jaa,eZ,Jaa,fZ,Jaa,gZ,Jaa,hZ,Jaa,iZ,Jaa,jZ,Jaa,kZ,Jaa,lZ,Jaa,mZ,Jaa,nZ,Jaa,nE,iF,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa,Jaa];var Sc=[Kaa,Kaa,pZ,Kaa,qZ,Kaa,rZ,Kaa,sZ,Kaa,tZ,Kaa,uZ,Kaa,vZ,Kaa,wZ,Kaa,xZ,Kaa,yZ,Kaa,zZ,Kaa,AZ,Kaa,BZ,Kaa,CZ,Kaa,DZ,Kaa,EZ,Kaa,FZ,Kaa,GZ,Kaa,HZ,Kaa,IZ,Kaa,gh,hh,Qv,kw,VK,XK,FR,HR,JR,iS,kS,mS,Md,Oe,Od,VL,ci,Ui,Xe,Kk,uL,jl,kl,ml,Th,nn,Vn,Wn,io,Xn,ho,Yn,Pi,Dp,Ep,Sh,_h,ur,Qs,Zs,Qk,Ok,ng,Wm,AU,uw,xw,Rw,ay,ry,by,qy,cy,Ew,Wx,ky,Dy,Oz,UA,nB,hf,$k,vU,Tg,kE,LE,VJ,UJ,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa,Kaa];var Tc=[Laa,Laa,KZ,Laa,LZ,Laa,MZ,Laa,NZ,Laa,OZ,Laa,PZ,Laa,QZ,Laa,RZ,Laa,SZ,Laa,TZ,Laa,UZ,Laa,VZ,Laa,WZ,Laa,XZ,Laa,YZ,Laa,ZZ,Laa,_Z,Laa,$Z,Laa,a_,Laa,b_,Laa,NK,SK,WK,UC,WC,YC,_C,aD,cD,eD,lD,uI,vI,qJ,QU,RU,AL,GL,IQ,NQ,GR,IR,LR,eS,jS,lS,oS,eV,SV,UV,xj,Yi,zU,Rj,vk,Zn,Jp,Kp,Lp,Mp,tr,Dt,xU,DU,yv,lx,nx,qx,$x,dy,_x,wz,Pz,Hw,Tz,IF,CF,iK,bK,XJ,uK,EK,gQ,qQ,MU,gJ,dK,oK,FK,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa,Laa];var Uc=[Maa,Maa,d_,Maa,e_,Maa,f_,Maa,g_,Maa,h_,Maa,i_,Maa,j_,Maa,k_,Maa,l_,Maa,m_,Maa,n_,Maa,o_,Maa,p_,Maa,q_,Maa,r_,Maa,s_,Maa,t_,Maa,u_,Maa,v_,Maa,w_,Maa,UE,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa,Maa];var Vc=[Naa,Naa,y_,Naa,z_,Naa,A_,Naa,B_,Naa,C_,Naa,D_,Naa,E_,Naa,F_,Naa,G_,Naa,H_,Naa,I_,Naa,J_,Naa,K_,Naa,L_,Naa,M_,Naa,N_,Naa,O_,Naa,P_,Naa,Q_,Naa,R_,Naa,ju,qu,Gv,jw,KR,fS,gS,hS,nS,Dm,jq,pF,Hk,fw,Fw,mx,ZL,rM,tM,vM,xM,zM,BM,pN,qK,JJ,SJ,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa,Naa];var Wc=[Oaa,Oaa,T_,Oaa,U_,Oaa,V_,Oaa,W_,Oaa,X_,Oaa,Y_,Oaa,Z_,Oaa,__,Oaa,$_,Oaa,a$,Oaa,b$,Oaa,c$,Oaa,d$,Oaa,e$,Oaa,f$,Oaa,g$,Oaa,h$,Oaa,i$,Oaa,j$,Oaa,k$,Oaa,jN,kN,AN,BN,Gy,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa,Oaa];var Xc=[Paa,Paa,m$,Paa,n$,Paa,o$,Paa,p$,Paa,q$,Paa,r$,Paa,s$,Paa,t$,Paa,u$,Paa,v$,Paa,w$,Paa,x$,Paa,y$,Paa,z$,Paa,A$,Paa,B$,Paa,C$,Paa,D$,Paa,E$,Paa,F$,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa,Paa];var Yc=[Qaa,Qaa,H$,Qaa,I$,Qaa,J$,Qaa,K$,Qaa,L$,Qaa,M$,Qaa,N$,Qaa,O$,Qaa,P$,Qaa,Q$,Qaa,R$,Qaa,S$,Qaa,T$,Qaa,U$,Qaa,V$,Qaa,W$,Qaa,X$,Qaa,Y$,Qaa,Z$,Qaa,_$,Qaa,yL,EL,eN,fN,hN,lN,vN,wN,yN,CN,TQ,WQ,jR,mR,MR,pS,cR,fR,sR,vR,kk,Np,sK,pK,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa,Qaa];var Zc=[Raa,Raa,a0,Raa,b0,Raa,c0,Raa,d0,Raa,e0,Raa,f0,Raa,g0,Raa,h0,Raa,i0,Raa,j0,Raa,k0,Raa,l0,Raa,m0,Raa,n0,Raa,o0,Raa,p0,Raa,q0,Raa,r0,Raa,s0,Raa,t0,Raa,wQ,CQ,Hy,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa,Raa];var _c=[Saa,Saa,v0,Saa,w0,Saa,x0,Saa,y0,Saa,z0,Saa,A0,Saa,B0,Saa,C0,Saa,D0,Saa,E0,Saa,F0,Saa,G0,Saa,H0,Saa,I0,Saa,J0,Saa,K0,Saa,L0,Saa,M0,Saa,N0,Saa,O0,Saa,KL,LL,ML,NL,OL,PL,QL,RL,SL,TL,UL,FM,GM,HM,IM,JM,KM,LM,MM,NM,OM,PM,gN,iN,xN,zN,KN,LN,MN,NN,ON,sO,tO,uO,vO,wO,xQ,DQ,Zg,DN,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa,Saa];var $c=[Taa,Taa,Q0,Taa,R0,Taa,S0,Taa,T0,Taa,U0,Taa,V0,Taa,W0,Taa,X0,Taa,Y0,Taa,Z0,Taa,_0,Taa,$0,Taa,a1,Taa,b1,Taa,c1,Taa,d1,Taa,e1,Taa,f1,Taa,g1,Taa,h1,Taa,aP,gP,cQ,dQ,nQ,oQ,CM,bN,Taa,Taa,Taa,Taa,Taa,Taa,Taa,Taa,Taa,Taa,Taa,Taa,Taa,Taa];var ad=[Uaa,Uaa,j1,Uaa,k1,Uaa,l1,Uaa,m1,Uaa,n1,Uaa,o1,Uaa,p1,Uaa,q1,Uaa,r1,Uaa,s1,Uaa,t1,Uaa,u1,Uaa,v1,Uaa,w1,Uaa,x1,Uaa,y1,Uaa,z1,Uaa,A1,Uaa,B1,Uaa,C1,Uaa,PN,xO,RQ,SQ,hR,iR,aR,bR,qR,rR,Uaa,Uaa,Uaa,Uaa,Uaa,Uaa,Uaa,Uaa,Uaa,Uaa,Uaa,Uaa];var bd=[Vaa,Vaa,E1,Vaa,F1,Vaa,G1,Vaa,H1,Vaa,I1,Vaa,J1,Vaa,K1,Vaa,L1,Vaa,M1,Vaa,N1,Vaa,O1,Vaa,P1,Vaa,Q1,Vaa,R1,Vaa,S1,Vaa,T1,Vaa,U1,Vaa,V1,Vaa,W1,Vaa,X1,Vaa,XL,QM,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa,Vaa];var cd=[Waa,Waa,Z1,Waa,_1,Waa,$1,Waa,a2,Waa,b2,Waa,c2,Waa,d2,Waa,e2,Waa,f2,Waa,g2,Waa,h2,Waa,i2,Waa,j2,Waa,k2,Waa,l2,Waa,m2,Waa,n2,Waa,o2,Waa,p2,Waa,q2,Waa,fQ,pQ,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa,Waa];var dd=[Xaa,Xaa,s2,Xaa,t2,Xaa,u2,Xaa,v2,Xaa,w2,Xaa,x2,Xaa,y2,Xaa,z2,Xaa,A2,Xaa,B2,Xaa,C2,Xaa,D2,Xaa,E2,Xaa,F2,Xaa,G2,Xaa,H2,Xaa,I2,Xaa,J2,Xaa,K2,Xaa,L2,Xaa,hM,TM,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa,Xaa];var ed=[Yaa,Yaa,N2,Yaa,O2,Yaa,P2,Yaa,Q2,Yaa,R2,Yaa,S2,Yaa,T2,Yaa,U2,Yaa,V2,Yaa,W2,Yaa,X2,Yaa,Y2,Yaa,Z2,Yaa,_2,Yaa,$2,Yaa,a3,Yaa,b3,Yaa,c3,Yaa,d3,Yaa,e3,Yaa,Zaa,ZU,_aa,eU,ZN,YN,XN,IO,HO,GO,zS,BS,FS,HS,JS,LS,NS,TS,VS,XS,ZS,$S,bT,dT,fT,hT,jT,lT,nT,pT,rT,tT,vT,xT,zT,$aa,sV,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa,Yaa];var fd=[aba,aba,g3,aba,h3,aba,i3,aba,j3,aba,k3,aba,l3,aba,m3,aba,n3,aba,o3,aba,p3,aba,q3,aba,r3,aba,s3,aba,t3,aba,u3,aba,v3,aba,w3,aba,x3,aba,y3,aba,z3,aba,Ve,We,Nd,ef,ff,gf,lf,mf,Qe,Ff,If,Jf,Nf,Of,_f,$f,bg,cg,gg,sg,tg,xg,yg,Hg,Ig,$K,aL,bL,cL,Ug,lh,mh,nh,Wg,ch,oh,ph,Gh,Hh,Jh,Kh,Vh,Wh,li,mi,ni,ri,si,Ci,Di,Fi,Gi,ij,kj,rj,sj,_j,$j,tk,wk,yk,zk,Ak,Rk,Sk,Cl,Nl,Ol,Kl,Ll,Wl,Xl,dm,tm,um,Em,Fm,Jm,Sm,Tm,On,Pn,co,eo,Bo,Co,Do,Fo,Go,No,Oo,Gp,Hp,Qp,Rp,Cq,Dq,Ko,Kq,Mq,Nq,Ir,Jr,Vr,Wr,Yr,Zr,$r,as,fs,gs,us,vs,jt,kt,zt,At,Ft,Gt,Rt,St,hu,iu,ou,pu,tu,uu,Nu,Ou,av,bv,pv,qv,Bv,Cv,Dv,Lv,Mv,gw,hw,rw,Bw,Cw,Ow,Pw,ix,jx,Dx,fy,gy,OA,_A,$A,eB,fB,aC,bC,jC,kC,AC,BC,TC,VC,XC,ZC,$C,bD,dD,kD,OD,PD,mE,rE,sE,ss,NE,eF,TF,UF,HK,JK,KK,LK,OU,eL,hL,iL,vL,wL,xL,CL,DL,IL,JL,DM,EM,cN,dN,tN,uN,HN,IN,pO,qO,_O,$O,eP,fP,kP,lP,vP,wP,GP,HP,RP,SP,aQ,bQ,lQ,mQ,uQ,vQ,AQ,BQ,GQ,HQ,LQ,MQ,BL,$Q,QQ,oR,pR,AR,BR,DR,ER,QR,RR,XR,YR,cS,dS,qS,rS,sS,UU,VU,aV,bV,cV,dV,nV,xV,yV,AV,BV,DV,EV,JV,KV,MV,NV,OV,PV,RV,TV,WV,cB,es,Fh,qg,tL,Mo,Hi,yh,lg,Ki,lU,Ek,Gm,Jk,pL,ug,Cn,Eq,$h,Ur,Qt,gu,Et,Mu,yt,nu,Kv,su,qw,Ww,Cx,Uk,QD,GC,LC,MC,NC,OC,PC,QC,RC,bM,dM,QJ,eQ,jP,oI,tV,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba,aba];var gd=[bba,bba,B3,bba,C3,bba,D3,bba,E3,bba,F3,bba,G3,bba,H3,bba,I3,bba,J3,bba,K3,bba,L3,bba,M3,bba,N3,bba,O3,bba,P3,bba,Q3,bba,R3,bba,S3,bba,T3,bba,U3,bba,Zh,Av,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba,bba];var hd=[cba,cba,W3,cba,X3,cba,Y3,cba,Z3,cba,_3,cba,$3,cba,a4,cba,b4,cba,c4,cba,d4,cba,e4,cba,f4,cba,g4,cba,h4,cba,i4,cba,j4,cba,k4,cba,l4,cba,m4,cba,n4,cba,lE,dF,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba,cba];var id=[dba,dba,p4,dba,q4,dba,r4,dba,s4,dba,t4,dba,u4,dba,v4,dba,w4,dba,x4,dba,y4,dba,z4,dba,A4,dba,B4,dba,C4,dba,D4,dba,E4,dba,F4,dba,G4,dba,H4,dba,I4,dba,Mm,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba,dba];var jd=[eba,eba,K4,eba,L4,eba,M4,eba,N4,eba,O4,eba,P4,eba,Q4,eba,R4,eba,S4,eba,T4,eba,U4,eba,V4,eba,W4,eba,X4,eba,Y4,eba,Z4,eba,_4,eba,$4,eba,a5,eba,b5,eba,fF,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba,eba];var kd=[fba,fba,d5,fba,e5,fba,f5,fba,g5,fba,h5,fba,i5,fba,j5,fba,k5,fba,l5,fba,m5,fba,n5,fba,o5,fba,p5,fba,q5,fba,r5,fba,s5,fba,t5,fba,u5,fba,v5,fba,w5,fba,Pd,Mg,Ng,Ag,Eg,Fg,MK,Zl,vm,oP,pP,qP,rP,tP,uP,zP,AP,BP,CP,EP,FP,KP,LP,MP,NP,PP,QP,VP,WP,XP,YP,_P,$P,KQ,PQ,UR,VR,WR,$R,aS,bS,Gd,jf,ie,je,xf,zf,Tr,ee,Rd,xm,Pf,Oh,nU,Le,nf,hU,Ee,Vf,Ce,Hm,Ld,Gg,ye,rL,nL,jL,BU,sh,Tu,ge,xh,Ch,Mh,bi,di,Cj,Dj,Vl,xi,Sl,Rl,Ai,Li,Ul,Oi,ki,_d,Vi,vg,uj,Ck,Zd,fj,dj,so,hj,Zi,Rm,mj,oj,Fj,Ij,Jj,hn,kn,xk,ok,gk,ck,dk,Uj,Yj,qk,mL,Rg,Sg,il,Jl,am,$l,Kf,Tk,Qm,km,lm,pm,ae,jj,Pm,uU,aj,en,fn,Bn,ek,Ln,Mn,Rn,bo,oo,po,Tn,no,Sq,Tq,Zo,_o,kp,cp,hp,fp,Yo,Wp,Yp,bq,cq,gq,pq,wq,zp,Ip,Jq,Tp,Uq,Wq,Pq,dr,Qq,dn,Om,jr,Vj,kr,Er,Fr,Or,Ph,Rr,Tf,ts,cs,pg,is,js,ks,ps,PE,xs,ys,OF,SF,Bs,Cs,Ps,Ts,WF,Vs,VF,XF,Ks,Gs,ft,Xs,mt,st,Ct,rt,Lt,En,Mk,Jn,iv,Uu,Wu,Zu,Uv,jv,dv,kv,nv,Zf,Jv,bw,yy,dG,YF,$w,ax,cx,dx,Um,Zm,_m,nG,Aw,Dw,vx,xx,kx,Fx,Yx,Xx,uy,Ox,Px,Qx,Hx,iy,lj,nz,az,bz,jz,kz,ez,gz,hz,pz,uz,xz,yz,DA,CA,Gz,$y,gA,iA,eA,xt,Jz,Kz,Sz,yA,kA,nA,oA,uA,vA,VA,NA,tB,Eu,IB,FB,xB,CB,AB,NB,OB,ZA,ZB,pC,rC,wC,xC,IC,JC,hD,yD,BD,HD,KD,MD,$B,cC,fC,TD,mC,GE,Ze,pE,kg,XE,KE,Ms,BF,kF,AF,ZF,JG,lG,qG,sG,uG,IG,fx,rG,IK,kU,NU,JU,yS,AS,CS,ES,GS,IS,KS,MS,OS,QS,SS,US,WS,YS,_S,aT,cT,eT,gT,iT,kT,mT,oT,qT,sT,uT,wT,yT,AT,OT,FT,CT,IT,JT,fU,jU,$U,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba,fba];var ld=[gba,gba,y5,gba,z5,gba,A5,gba,B5,gba,C5,gba,D5,gba,E5,gba,F5,gba,G5,gba,H5,gba,I5,gba,J5,gba,K5,gba,L5,gba,M5,gba,N5,gba,O5,gba,P5,gba,Q5,gba,R5,gba,oE,jF,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba,gba];var md=[hba,hba,T5,hba,U5,hba,V5,hba,W5,hba,X5,hba,Y5,hba,Z5,hba,_5,hba,$5,hba,a6,hba,b6,hba,c6,hba,d6,hba,e6,hba,f6,hba,g6,hba,h6,hba,i6,hba,j6,hba,k6,hba,VE,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba,hba];var nd=[iba,iba,m6,iba,n6,iba,o6,iba,p6,iba,q6,iba,r6,iba,s6,iba,t6,iba,u6,iba,v6,iba,w6,iba,x6,iba,y6,iba,z6,iba,A6,iba,B6,iba,C6,iba,D6,iba,E6,iba,F6,iba,qh,Ih,ti,_l,wm,Xr,hs,ws,PU,gL,ke,fe,pe,te,ue,kf,wU,th,Tl,Mi,Qi,Ri,Si,Pl,Wk,ce,jba,uo,nj,Gj,Lj,Vk,hl,hm,Nm,ao,yo,jo,ko,lo,Gq,Wo,Ap,Cp,Pp,lq,mq,nq,oq,Up,Fq,fq,sr,SD,it,SE,Rs,QF,zv,It,Pt,Ut,wu,xu,Du,Lu,Ju,Ym,zy,Gw,Vw,jG,bx,ox,px,iG,hy,vy,Lx,sy,ty,wy,Ay,Cy,Ey,mz,oz,sz,tz,zA,Uz,cA,BA,TA,RE,pB,oD,iC,pD,rD,DD,tD,LD,RD,RF,zG,AG,BG,DG,lL,jQ,kQ,tQ,XU,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba,iba];var od=[kba,kba,H6,kba,I6,kba,J6,kba,K6,kba,L6,kba,M6,kba,N6,kba,O6,kba,P6,kba,Q6,kba,R6,kba,S6,kba,T6,kba,U6,kba,V6,kba,W6,kba,X6,kba,Y6,kba,Z6,kba,_6,kba,Hd,zg,eh,rh,ui,Yl,Ho,Kr,aB,_r,bs,rv,lt,Bt,Ht,Tt,Nv,Ov,vu,Pu,cv,Ev,Fv,iw,sw,PK,zL,FL,hV,qV,ZV,Fd,hk,zn,Un,zo,mo,ap,eq,qq,yq,Xq,Oq,Nr,Ls,yu,Cu,Ku,sv,Qf,cw,tx,sx,wx,Ex,Zx,xy,rz,vB,zC,qD,$m,FD,nC,YE,jM,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba,kba];var pd=[lba,lba,a7,lba,b7,lba,c7,lba,d7,lba,e7,lba,f7,lba,g7,lba,h7,lba,i7,lba,j7,lba,k7,lba,l7,lba,m7,lba,n7,lba,o7,lba,p7,lba,q7,lba,r7,lba,s7,lba,t7,lba,om,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba,lba];var qd=[mba,mba,v7,mba,w7,mba,x7,mba,y7,mba,z7,mba,A7,mba,B7,mba,C7,mba,D7,mba,E7,mba,F7,mba,G7,mba,H7,mba,I7,mba,J7,mba,K7,mba,L7,mba,M7,mba,N7,mba,O7,mba,Pv,Hv,gV,pV,YV,Lh,jn,bk,gm,oU,xo,Sv,Kx,Mx,Iy,qz,Yk,Il,GD,yE,mba,mba];var rd=[nba,nba,Q7,nba,R7,nba,S7,nba,T7,nba,U7,nba,V7,nba,W7,nba,X7,nba,Y7,nba,Z7,nba,_7,nba,$7,nba,a8,nba,b8,nba,c8,nba,d8,nba,e8,nba,f8,nba,g8,nba,h8,nba,Kg,Cg,dh,OK,JQ,OQ,fV,oV,XV,ji,jk,mn,pn,gr,nm,Xf,Tv,uD,nba,nba,nba,nba];var sd=[oba,oba,j8,oba,k8,oba,l8,oba,m8,oba,n8,oba,o8,oba,p8,oba,q8,oba,r8,oba,s8,oba,t8,oba,u8,oba,v8,oba,w8,oba,x8,oba,y8,oba,z8,oba,A8,oba,B8,oba,C8,oba,JE,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba,oba];var td=[pba,pba,E8,pba,F8,pba,G8,pba,H8,pba,I8,pba,J8,pba,K8,pba,L8,pba,M8,pba,N8,pba,O8,pba,P8,pba,Q8,pba,R8,pba,S8,pba,T8,pba,U8,pba,V8,pba,W8,pba,X8,pba,OE,Mj,zm,Cm,ir,Lr,Ly,qB,sN,qN,GN,FN,pba,pba,pba,pba,pba,pba,pba,pba,pba,pba];var ud=[qba,qba,Z8,qba,_8,qba,$8,qba,a9,qba,b9,qba,c9,qba,d9,qba,e9,qba,f9,qba,g9,qba,h9,qba,i9,qba,j9,qba,k9,qba,l9,qba,m9,qba,n9,qba,o9,qba,p9,qba,q9,qba,Lq,Am,er,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba,qba];var vd=[rba,rba,s9,rba,t9,rba,u9,rba,v9,rba,w9,rba,x9,rba,y9,rba,z9,rba,A9,rba,B9,rba,C9,rba,D9,rba,E9,rba,F9,rba,G9,rba,H9,rba,I9,rba,J9,rba,K9,rba,L9,rba,Ty,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba,rba];var wd=[sba,sba,N9,sba,O9,sba,P9,sba,Q9,sba,R9,sba,S9,sba,T9,sba,U9,sba,V9,sba,W9,sba,X9,sba,Y9,sba,Z9,sba,_9,sba,$9,sba,aaa,sba,baa,sba,caa,sba,daa,sba,eaa,sba,iQ,sQ,yQ,EQ,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba,sba];var xd=[tba,tba,gaa,tba,haa,tba,iaa,tba,jaa,tba,kaa,tba,laa,tba,maa,tba,naa,tba,oaa,tba,paa,tba,qaa,tba,raa,tba,saa,tba,taa,tba,uaa,tba,vaa,tba,waa,tba,xaa,tba,yaa,tba,zaa,tba,zQ,FQ,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba,tba];return{__GLOBAL__sub_I_CharacterSetECI_cpp:bl,__GLOBAL__sub_I_Code39Reader_cpp:Nt,__GLOBAL__sub_I_Code93Reader_cpp:eu,__GLOBAL__sub_I_DataMask_cpp:CC,__GLOBAL__sub_I_DecodedBitStreamParser_cpp:Lw,__GLOBAL__sub_I_ErrorCorrectionLevel_cpp:EA,__GLOBAL__sub_I_GenericGF_cpp:qn,__GLOBAL__sub_I_GlobalHistogramBinarizer_cpp:em,__GLOBAL__sub_I_ITFReader_cpp:Fu,__GLOBAL__sub_I_LinesSampler_cpp:Yy,__GLOBAL__sub_I_Mode_cpp:ZD,__GLOBAL__sub_I_ModulusGF_cpp:Tx,__GLOBAL__sub_I_UPCEANReader_cpp:Wv,__GLOBAL__sub_I_UPCEReader_cpp:ow,__GLOBAL__sub_I_Version_cpp:Ro,__GLOBAL__sub_I_Version_cpp_601:jB,__GLOBAL__sub_I_bind_cpp:KG,__GLOBAL__sub_I_zxing_js_cpp:Hf,___cxa_can_catch:hW,___cxa_is_pointer_type:iW,___errno_location:xI,___getTypeName:mI,___muldi3:lW,___udivdi3:qW,___uremdi3:rW,_bitshift64Ashr:sW,_bitshift64Lshr:tW,_bitshift64Shl:uW,_decode_any:Te,_decode_multi:Ue,_decode_qr:Re,_decode_qr_multi:Se,_emscripten_get_global_libc:sI,_free:oI,_i64Add:mW,_i64Subtract:nW,_llvm_bswap_i32:vW,_malloc:nI,_memcpy:wW,_memmove:xW,_memset:yW,_pthread_cond_broadcast:zW,_pthread_mutex_lock:AW,_pthread_mutex_unlock:BW,_resize:ze,_sbrk:CW,dynCall_di:DW,dynCall_dii:YW,dynCall_diii:rX,dynCall_diiii:MX,dynCall_i:fY,dynCall_ii:AY,dynCall_iiddd:VY,dynCall_iii:oZ,dynCall_iiii:JZ,dynCall_iiiid:c_,dynCall_iiiii:x_,dynCall_iiiiid:S_,dynCall_iiiiidddddddd:l$,dynCall_iiiiii:G$,dynCall_iiiiiid:$$,dynCall_iiiiiii:u0,dynCall_iiiiiiii:P0,dynCall_iiiiiiiii:i1,dynCall_iiiiiiiiiii:D1,dynCall_iiiiiiiiiiii:Y1,dynCall_iiiiiiiiiiiii:r2,dynCall_v:M2,dynCall_vi:f3,dynCall_vidd:A3,dynCall_viddd:V3,dynCall_vidddddddd:o4,dynCall_vidddi:J4,dynCall_vii:c5,dynCall_viiddd:x5,dynCall_viidiid:S5,dynCall_viii:l6,dynCall_viiii:G6,dynCall_viiiidddddddddddddddd:$6,dynCall_viiiii:u7,dynCall_viiiiii:P7,dynCall_viiiiiidi:i8,dynCall_viiiiiii:D8,dynCall_viiiiiiii:Y8,dynCall_viiiiiiiii:r9,dynCall_viiiiiiiiii:M9,dynCall_viiiiiiiiiiiiiii:faa,establishStackSpace:Bd,getTempRet0:Ed,runPostSets:jW,setTempRet0:Dd,setThrew:Cd,stackAlloc:yd,stackRestore:Ad,stackSave:zd}}) // EMSCRIPTEN_END_ASM (Module.asmGlobalArg,Module.asmLibraryArg,buffer);var __GLOBAL__sub_I_CharacterSetECI_cpp=Module["__GLOBAL__sub_I_CharacterSetECI_cpp"]=asm["__GLOBAL__sub_I_CharacterSetECI_cpp"];var __GLOBAL__sub_I_Code39Reader_cpp=Module["__GLOBAL__sub_I_Code39Reader_cpp"]=asm["__GLOBAL__sub_I_Code39Reader_cpp"];var __GLOBAL__sub_I_Code93Reader_cpp=Module["__GLOBAL__sub_I_Code93Reader_cpp"]=asm["__GLOBAL__sub_I_Code93Reader_cpp"];var __GLOBAL__sub_I_DataMask_cpp=Module["__GLOBAL__sub_I_DataMask_cpp"]=asm["__GLOBAL__sub_I_DataMask_cpp"];var __GLOBAL__sub_I_DecodedBitStreamParser_cpp=Module["__GLOBAL__sub_I_DecodedBitStreamParser_cpp"]=asm["__GLOBAL__sub_I_DecodedBitStreamParser_cpp"];var __GLOBAL__sub_I_ErrorCorrectionLevel_cpp=Module["__GLOBAL__sub_I_ErrorCorrectionLevel_cpp"]=asm["__GLOBAL__sub_I_ErrorCorrectionLevel_cpp"];var __GLOBAL__sub_I_GenericGF_cpp=Module["__GLOBAL__sub_I_GenericGF_cpp"]=asm["__GLOBAL__sub_I_GenericGF_cpp"];var __GLOBAL__sub_I_GlobalHistogramBinarizer_cpp=Module["__GLOBAL__sub_I_GlobalHistogramBinarizer_cpp"]=asm["__GLOBAL__sub_I_GlobalHistogramBinarizer_cpp"];var __GLOBAL__sub_I_ITFReader_cpp=Module["__GLOBAL__sub_I_ITFReader_cpp"]=asm["__GLOBAL__sub_I_ITFReader_cpp"];var __GLOBAL__sub_I_LinesSampler_cpp=Module["__GLOBAL__sub_I_LinesSampler_cpp"]=asm["__GLOBAL__sub_I_LinesSampler_cpp"];var __GLOBAL__sub_I_Mode_cpp=Module["__GLOBAL__sub_I_Mode_cpp"]=asm["__GLOBAL__sub_I_Mode_cpp"];var __GLOBAL__sub_I_ModulusGF_cpp=Module["__GLOBAL__sub_I_ModulusGF_cpp"]=asm["__GLOBAL__sub_I_ModulusGF_cpp"];var __GLOBAL__sub_I_UPCEANReader_cpp=Module["__GLOBAL__sub_I_UPCEANReader_cpp"]=asm["__GLOBAL__sub_I_UPCEANReader_cpp"];var __GLOBAL__sub_I_UPCEReader_cpp=Module["__GLOBAL__sub_I_UPCEReader_cpp"]=asm["__GLOBAL__sub_I_UPCEReader_cpp"];var __GLOBAL__sub_I_Version_cpp=Module["__GLOBAL__sub_I_Version_cpp"]=asm["__GLOBAL__sub_I_Version_cpp"];var __GLOBAL__sub_I_Version_cpp_601=Module["__GLOBAL__sub_I_Version_cpp_601"]=asm["__GLOBAL__sub_I_Version_cpp_601"];var __GLOBAL__sub_I_bind_cpp=Module["__GLOBAL__sub_I_bind_cpp"]=asm["__GLOBAL__sub_I_bind_cpp"];var __GLOBAL__sub_I_zxing_js_cpp=Module["__GLOBAL__sub_I_zxing_js_cpp"]=asm["__GLOBAL__sub_I_zxing_js_cpp"];var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var ___errno_location=Module["___errno_location"]=asm["___errno_location"];var ___getTypeName=Module["___getTypeName"]=asm["___getTypeName"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var _bitshift64Ashr=Module["_bitshift64Ashr"]=asm["_bitshift64Ashr"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _decode_any=Module["_decode_any"]=asm["_decode_any"];var _decode_multi=Module["_decode_multi"]=asm["_decode_multi"];var _decode_qr=Module["_decode_qr"]=asm["_decode_qr"];var _decode_qr_multi=Module["_decode_qr_multi"]=asm["_decode_qr_multi"];var _emscripten_get_global_libc=Module["_emscripten_get_global_libc"]=asm["_emscripten_get_global_libc"];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 _pthread_cond_broadcast=Module["_pthread_cond_broadcast"]=asm["_pthread_cond_broadcast"];var _pthread_mutex_lock=Module["_pthread_mutex_lock"]=asm["_pthread_mutex_lock"];var _pthread_mutex_unlock=Module["_pthread_mutex_unlock"]=asm["_pthread_mutex_unlock"];var _resize=Module["_resize"]=asm["_resize"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_di=Module["dynCall_di"]=asm["dynCall_di"];var dynCall_dii=Module["dynCall_dii"]=asm["dynCall_dii"];var dynCall_diii=Module["dynCall_diii"]=asm["dynCall_diii"];var dynCall_diiii=Module["dynCall_diiii"]=asm["dynCall_diiii"];var dynCall_i=Module["dynCall_i"]=asm["dynCall_i"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iiddd=Module["dynCall_iiddd"]=asm["dynCall_iiddd"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiid=Module["dynCall_iiiid"]=asm["dynCall_iiiid"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_iiiiid=Module["dynCall_iiiiid"]=asm["dynCall_iiiiid"];var dynCall_iiiiidddddddd=Module["dynCall_iiiiidddddddd"]=asm["dynCall_iiiiidddddddd"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];var dynCall_iiiiiid=Module["dynCall_iiiiiid"]=asm["dynCall_iiiiiid"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=asm["dynCall_iiiiiiii"];var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=asm["dynCall_iiiiiiiii"];var dynCall_iiiiiiiiiii=Module["dynCall_iiiiiiiiiii"]=asm["dynCall_iiiiiiiiiii"];var dynCall_iiiiiiiiiiii=Module["dynCall_iiiiiiiiiiii"]=asm["dynCall_iiiiiiiiiiii"];var dynCall_iiiiiiiiiiiii=Module["dynCall_iiiiiiiiiiiii"]=asm["dynCall_iiiiiiiiiiiii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vidd=Module["dynCall_vidd"]=asm["dynCall_vidd"];var dynCall_viddd=Module["dynCall_viddd"]=asm["dynCall_viddd"];var dynCall_vidddddddd=Module["dynCall_vidddddddd"]=asm["dynCall_vidddddddd"];var dynCall_vidddi=Module["dynCall_vidddi"]=asm["dynCall_vidddi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viiddd=Module["dynCall_viiddd"]=asm["dynCall_viiddd"];var dynCall_viidiid=Module["dynCall_viidiid"]=asm["dynCall_viidiid"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiidddddddddddddddd=Module["dynCall_viiiidddddddddddddddd"]=asm["dynCall_viiiidddddddddddddddd"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_viiiiiidi=Module["dynCall_viiiiiidi"]=asm["dynCall_viiiiiidi"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=asm["dynCall_viiiiiii"];var dynCall_viiiiiiii=Module["dynCall_viiiiiiii"]=asm["dynCall_viiiiiiii"];var dynCall_viiiiiiiii=Module["dynCall_viiiiiiiii"]=asm["dynCall_viiiiiiiii"];var dynCall_viiiiiiiiii=Module["dynCall_viiiiiiiiii"]=asm["dynCall_viiiiiiiiii"];var dynCall_viiiiiiiiiiiiiii=Module["dynCall_viiiiiiiiiiiiiii"]=asm["dynCall_viiiiiiiiiiiiiii"];Runtime.stackAlloc=Module["stackAlloc"];Runtime.stackSave=Module["stackSave"];Runtime.stackRestore=Module["stackRestore"];Runtime.establishStackSpace=Module["establishStackSpace"];Runtime.setTempRet0=Module["setTempRet0"];Runtime.getTempRet0=Module["getTempRet0"];Module["asm"]=asm;if(memoryInitializer){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,Runtime.GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,Runtime.GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){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"]){function useRequest(){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()}}}Module["then"]=(function(func){if(Module["calledRun"]){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=(function(){if(old)old();func(Module)})}return Module});function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(preloadStartTime===null)preloadStartTime=Date.now();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 exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=exit;var abortDecorators=[];function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach((function(decorator){output=decorator(output,what)}))}throw output}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() return ZXing; }; if (typeof module === "object" && module.exports) { module['exports'] = ZXing; }; ================================================ FILE: elements/barcode-reader/package.json ================================================ { "name": "@haxtheweb/barcode-reader", "wcfactory": { "className": "BarcodeReader", "customElementClass": "LitElement", "elementName": "barcode-reader", "generator-wcfactory-version": "0.11.0", "useHAX": false, "useSass": false, "files": { "css": "src/barcode-reader.css", "html": "src/barcode-reader.html", "js": "src/barcode-reader.js", "properties": "src/barcode-reader-properties.json", "hax": "src/barcode-reader-hax.json" }, "iconset": {}, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "Reads barcodes", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "barcode-reader.js", "module": "barcode-reader.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/es-global-bridge": "^25.0.0", "@haxtheweb/simple-icon": "^25.0.0", "@zxing/browser": "0.1.1", "@zxing/library": "0.19.1", "javascript-barcode-reader": "0.6.9", "jquery": "3.6.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "gulp-babel": "8.0.0", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "barcode" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/barcode-reader/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/barcode-reader/test/barcode-reader.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../barcode-reader.js"; // Mock the ZXing library and related globals beforeEach(() => { // Mock ZXing library globalThis.ZXing = function () { return { Runtime: { addFunction: (callback) => () => callback(0, 10, 0, 1), }, HEAPU8: { buffer: new ArrayBuffer(1000), }, _resize: (width, height) => 0, _decode_any: (ptr) => 0, }; }; // Mock navigator.mediaDevices globalThis.navigator = globalThis.navigator || {}; globalThis.navigator.mediaDevices = { enumerateDevices: () => Promise.resolve([ { deviceId: "camera1", kind: "videoinput", label: "Test Camera 1" }, { deviceId: "camera2", kind: "videoinput", label: "Test Camera 2" }, ]), getUserMedia: (constraints) => Promise.resolve({ getTracks: () => [ { stop: () => {}, }, ], }), }; // Mock user agent for device detection Object.defineProperty(globalThis.navigator, "userAgent", { get: () => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", configurable: true, }); // Mock ESGlobalBridge globalThis.ESGlobalBridge = { requestAvailability: () => ({ load: (name, url) => { setTimeout(() => { globalThis.dispatchEvent(new CustomEvent("es-bridge-zxing-loaded")); }, 10); }, }), }; // Mock stream globalThis.stream = null; }); afterEach(() => { // Clean up mocks delete globalThis.ZXing; delete globalThis.stream; }); describe("barcode-reader test", () => { let element; beforeEach(async () => { element = await fixture(html``); await element.updateComplete; }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("barcode-reader"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Component structure and properties", () => { it("should have correct tag name", () => { expect(element.constructor.tag).to.equal("barcode-reader"); }); it("should initialize with default properties", () => { expect(element.value).to.equal(""); expect(element.scale).to.be.undefined; expect(element.hideinput).to.equal(false); }); it("should have required DOM elements in shadow root", () => { const video = element.shadowRoot.querySelector("video"); const canvas = element.shadowRoot.querySelector("canvas"); const input = element.shadowRoot.querySelector('input[type="text"]'); const button = element.shadowRoot.querySelector("simple-icon-button"); const select = element.shadowRoot.querySelector("select"); expect(video).to.exist; expect(canvas).to.exist; expect(input).to.exist; expect(button).to.exist; expect(select).to.exist; }); }); describe("Property validation with accessibility", () => { describe("value property", () => { it("should handle string values and maintain accessibility", async () => { const testValues = [ "123456789", "QR_CODE_DATA", "https://example.com", "Product SKU: ABC123", "", ]; for (const testValue of testValues) { element.value = testValue; await element.updateComplete; expect(element.value).to.equal(testValue); const input = element.shadowRoot.querySelector('input[type="text"]'); expect(input.value).to.equal(testValue); await expect(element).shadowDom.to.be.accessible(); } }); it("should reflect value property to attribute", async () => { element.value = "test-barcode-123"; await element.updateComplete; expect(element.getAttribute("value")).to.equal("test-barcode-123"); }); it("should dispatch value-changed event when value changes", async () => { let eventFired = false; let eventDetail = null; element.addEventListener("value-changed", (e) => { eventFired = true; eventDetail = e.detail; }); element.value = "new-barcode-value"; await element.updateComplete; expect(eventFired).to.be.true; expect(eventDetail).to.equal(element); }); }); describe("scale property", () => { it("should handle numeric scale values", async () => { const scaleValues = [50, 75, 100, 125, 150]; for (const scale of scaleValues) { element.scale = scale; await element.updateComplete; expect(element.scale).to.equal(scale); const video = element.shadowRoot.querySelector("video"); expect(video.getAttribute("width")).to.equal(`${scale}%`); expect(video.getAttribute("height")).to.equal(`${scale}%`); await expect(element).shadowDom.to.be.accessible(); } }); it("should reflect scale property to attribute", async () => { element.scale = 80; await element.updateComplete; expect(element.getAttribute("scale")).to.equal("80"); }); }); describe("hideinput property", () => { it("should control input visibility", async () => { // Input should be visible by default expect(element.hideinput).to.be.false; let inputDiv = element.shadowRoot.querySelector(".input"); expect(inputDiv.hasAttribute("hidden")).to.be.false; // Hide input element.hideinput = true; await element.updateComplete; inputDiv = element.shadowRoot.querySelector(".input"); expect(inputDiv.hasAttribute("hidden")).to.be.true; await expect(element).shadowDom.to.be.accessible(); }); }); }); describe("Barcode scanning functionality", () => { it("should initialize ZXing library", (done) => { // The constructor should load ZXing library setTimeout(() => { expect(globalThis.ZXing).to.exist; done(); }, 100); }); it("should setup video and canvas elements", async () => { const video = element.shadowRoot.querySelector("video"); const canvas = element.shadowRoot.querySelector("canvas"); expect(video.hasAttribute("muted")).to.be.true; expect(video.hasAttribute("autoplay")).to.be.true; expect(video.hasAttribute("playsinline")).to.be.true; expect(canvas.style.display).to.equal("none"); }); it("should handle scan button click", async () => { await new Promise((resolve) => setTimeout(resolve, 100)); // Wait for ZXing to load const scanButton = element.shadowRoot.querySelector(".go"); expect(scanButton).to.exist; // Simulate button click let clicked = false; scanButton.onclick = () => { clicked = true; }; scanButton.click(); expect(clicked).to.be.true; }); it("should handle camera initialization", async () => { const renderButton = element.shadowRoot.querySelector("simple-icon-button"); expect(renderButton).to.exist; expect(renderButton.getAttribute("icon")).to.equal("image:camera-alt"); }); }); describe("Video stream and device management", () => { it("should enumerate video devices", async () => { await new Promise((resolve) => setTimeout(resolve, 100)); const select = element.shadowRoot.querySelector("select"); expect(select).to.exist; // The mock should populate options setTimeout(() => { expect(select.children.length).to.be.greaterThan(0); }, 200); }); it("should handle video stream toggle", async () => { await new Promise((resolve) => setTimeout(resolve, 100)); const hiddenDiv = element.shadowRoot.querySelector(".hidden"); const renderButton = element.shadowRoot.querySelector("simple-icon-button"); expect(hiddenDiv.style.display).to.equal(""); // Simulate button click to show video renderButton.click(); await new Promise((resolve) => setTimeout(resolve, 150)); // Video should be shown after click and delay }); it("should handle device detection for mobile vs PC", async () => { // Test PC detection (default mock) expect(globalThis.navigator.userAgent).to.include("Windows"); // Test mobile detection by changing user agent Object.defineProperty(globalThis.navigator, "userAgent", { get: () => "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X)", configurable: true, }); // Create new element to test mobile detection const mobileElement = await fixture( html``, ); await mobileElement.updateComplete; expect(mobileElement).to.exist; }); }); describe("Accessibility scenarios", () => { it("should remain accessible when input is hidden", async () => { element.hideinput = true; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should remain accessible with different scale values", async () => { element.scale = 50; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should maintain proper ARIA labeling", () => { const button = element.shadowRoot.querySelector("simple-icon-button"); const label = element.shadowRoot.querySelector("#label"); expect(button.getAttribute("aria-labelledby")).to.equal("label"); expect(label.id).to.equal("label"); expect(label.textContent).to.equal("Initialize"); }); it("should remain accessible during scanning state", async () => { element.value = "scanned-code-123"; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); }); describe("Edge cases and error handling", () => { it("should handle undefined scale gracefully", async () => { element.scale = undefined; await element.updateComplete; const video = element.shadowRoot.querySelector("video"); expect(video.getAttribute("width")).to.equal("undefined%"); await expect(element).shadowDom.to.be.accessible(); }); it("should handle null value gracefully", async () => { element.value = null; await element.updateComplete; expect(element.value).to.be.null; const input = element.shadowRoot.querySelector('input[type="text"]'); expect(input.value).to.equal(""); await expect(element).shadowDom.to.be.accessible(); }); it("should handle very long barcode values", async () => { const longValue = "A".repeat(1000); element.value = longValue; await element.updateComplete; expect(element.value).to.equal(longValue); await expect(element).shadowDom.to.be.accessible(); }); it("should handle special characters in barcode values", async () => { const specialChars = "!@#$%^&*()_+-=[]{}|;':\",./<>?"; element.value = specialChars; await element.updateComplete; expect(element.value).to.equal(specialChars); await expect(element).shadowDom.to.be.accessible(); }); it("should handle extreme scale values", async () => { const extremeScales = [0, -50, 1000, Number.MAX_SAFE_INTEGER]; for (const scale of extremeScales) { element.scale = scale; await element.updateComplete; expect(element.scale).to.equal(scale); await expect(element).shadowDom.to.be.accessible(); } }); it("should handle missing ZXing library gracefully", async () => { delete globalThis.ZXing; const testElement = await fixture( html``, ); await testElement.updateComplete; // Should not throw errors even without ZXing expect(testElement).to.exist; await expect(testElement).shadowDom.to.be.accessible(); }); it("should handle media device errors gracefully", async () => { // Mock getUserMedia to reject globalThis.navigator.mediaDevices.getUserMedia = () => { return Promise.reject(new Error("Camera not available")); }; const testElement = await fixture( html``, ); await testElement.updateComplete; expect(testElement).to.exist; await expect(testElement).shadowDom.to.be.accessible(); }); }); describe("Lifecycle methods", () => { it("should handle firstUpdated lifecycle", async () => { // firstUpdated should be called automatically const video = element.shadowRoot.querySelector("video"); const canvas = element.shadowRoot.querySelector("canvas"); expect(video).to.exist; expect(canvas).to.exist; expect(element.__context).to.exist; expect(element.__video).to.exist; }); it("should handle updated lifecycle with value changes", async () => { let eventFired = false; element.addEventListener("value-changed", () => { eventFired = true; }); element.value = "updated-value"; await element.updateComplete; expect(eventFired).to.be.true; }); it("should initialize properly in constructor", () => { const newElement = new element.constructor(); expect(newElement.value).to.equal(""); expect(newElement.hideinput).to.be.false; }); }); describe("UI behavior and interaction", () => { it("should toggle video display on button click", async () => { await new Promise((resolve) => setTimeout(resolve, 100)); const renderButton = element.shadowRoot.querySelector("simple-icon-button"); const hiddenDiv = element.shadowRoot.querySelector(".hidden"); // Initial state expect(hiddenDiv.hasAttribute("hidden")).to.be.true; // Click to initialize and show renderButton.click(); await new Promise((resolve) => setTimeout(resolve, 150)); // Should change state after processing expect(renderButton).to.exist; }); it("should update input value when value property changes", async () => { const input = element.shadowRoot.querySelector('input[type="text"]'); element.value = "test-input-sync"; await element.updateComplete; expect(input.value).to.equal("test-input-sync"); }); it("should handle multiple rapid value changes", async () => { const values = ["val1", "val2", "val3", "val4", "val5"]; for (const value of values) { element.value = value; await element.updateComplete; } expect(element.value).to.equal("val5"); const input = element.shadowRoot.querySelector('input[type="text"]'); expect(input.value).to.equal("val5"); }); }); describe("Performance considerations", () => { it("should handle multiple instances efficiently", async () => { const startTime = performance.now(); const elements = await Promise.all([ fixture(html``), fixture(html``), fixture(html``), ]); const endTime = performance.now(); const creationTime = endTime - startTime; expect(elements.length).to.equal(3); expect(creationTime).to.be.lessThan(1000); // Should create quickly elements.forEach((el) => { expect(el.tagName.toLowerCase()).to.equal("barcode-reader"); }); }); it("should cleanup resources properly", async () => { const testElement = await fixture( html``, ); // Simulate cleanup scenario if (globalThis.stream && globalThis.stream.getTracks) { const tracks = globalThis.stream.getTracks(); tracks.forEach((track) => { expect(track.stop).to.be.a("function"); }); } }); }); describe("CSS styles and theming", () => { it("should apply correct styles to elements", () => { const canvas = element.shadowRoot.querySelector("canvas"); const video = element.shadowRoot.querySelector("video"); const canvasStyles = globalThis.getComputedStyle(canvas); const videoStyles = globalThis.getComputedStyle(video); expect(canvasStyles.display).to.equal("none"); expect(videoStyles.borderStyle).to.equal("solid"); }); it("should handle hidden attribute styling", async () => { element.setAttribute("hidden", ""); await element.updateComplete; const elementStyles = globalThis.getComputedStyle(element); expect(elementStyles.display).to.equal("none"); }); }); describe("Custom events and integration", () => { it("should dispatch custom events with proper detail", async () => { let capturedEvent = null; element.addEventListener("value-changed", (e) => { capturedEvent = e; }); element.value = "event-test-value"; await element.updateComplete; expect(capturedEvent).to.not.be.null; expect(capturedEvent.type).to.equal("value-changed"); expect(capturedEvent.detail).to.equal(element); }); it("should handle ES bridge events properly", (done) => { // Test the ES bridge ZXing loaded event globalThis.addEventListener("es-bridge-zxing-loaded", () => { expect(true).to.be.true; // Event was fired done(); }); // Trigger the event (already triggered in beforeEach mock) }); }); }); ================================================ FILE: elements/baseline-build-hax/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/baseline-build-hax/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/baseline-build-hax/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/baseline-build-hax/.npmignore ================================================ node_modules ================================================ FILE: elements/baseline-build-hax/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/baseline-build-hax/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/baseline-build-hax/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/baseline-build-hax/README.md ================================================ # <baseline-build-hax> Build > create an inflexible baseline build of hax with all elements ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/baseline-build-hax/baseline-build-hax.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Build ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/baseline-build-hax/baseline-build-hax.js ================================================ /** * Copyright 2018 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import "@haxtheweb/wysiwyg-hax/wysiwyg-hax.js"; import "@haxtheweb/cms-hax/cms-hax.js"; import "@haxtheweb/hax-body/hax-body.js"; import "@haxtheweb/hax-body/lib/hax-store.js"; import "@haxtheweb/hax-body/lib/hax-autoloader.js"; import "@haxtheweb/hax-body/lib/hax-tray.js"; import "@haxtheweb/hax-body/lib/hax-app-picker.js"; import "@haxtheweb/hax-body/lib/hax-app.js"; import "@haxtheweb/hax-body/lib/hax-toolbar.js"; import "@haxtheweb/a11y-gif-player/a11y-gif-player.js"; import "@haxtheweb/citation-element/citation-element.js"; import "@haxtheweb/image-compare-slider/image-compare-slider.js"; import "@haxtheweb/license-element/license-element.js"; import "@haxtheweb/lrn-math/lrn-math.js"; import "@haxtheweb/lrn-table/lrn-table.js"; import "@haxtheweb/lrn-vocab/lrn-vocab.js"; import "@haxtheweb/oer-schema/oer-schema.js"; import "@haxtheweb/media-behaviors/media-behaviors.js"; import "@haxtheweb/media-image/media-image.js"; import "@haxtheweb/meme-maker/meme-maker.js"; import "@haxtheweb/multiple-choice/multiple-choice.js"; import "@haxtheweb/person-testimonial/person-testimonial.js"; import "@haxtheweb/place-holder/place-holder.js"; import "@haxtheweb/q-r/q-r.js"; import "@haxtheweb/self-check/self-check.js"; import "@haxtheweb/stop-note/stop-note.js"; import "@haxtheweb/video-player/video-player.js"; import "@haxtheweb/wikipedia-query/wikipedia-query.js"; import "@haxtheweb/grid-plate/grid-plate.js"; ================================================ FILE: elements/baseline-build-hax/demo/index.html ================================================ BaselineBuildHax: baseline-build-hax Demo

    ================================================ FILE: elements/baseline-build-hax/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/baseline-build-hax/index.html ================================================ baseline-build-hax documentation ================================================ FILE: elements/baseline-build-hax/package.json ================================================ { "name": "@haxtheweb/baseline-build-hax", "wcfactory": { "className": "BaselineBuildHax", "customElementClass": "HTMLElement", "elementName": "baseline-build-hax", "generator-wcfactory-version": "0.6.3", "useHAX": false, "useSass": false, "files": { "css": "src/baseline-build-hax.css", "html": "src/baseline-build-hax.html", "js": "src", "properties": "src/baseline-build-hax-properties.json", "hax": "src/baseline-build-hax-hax.json" }, "sharedStyles": [] }, "version": "25.0.0", "description": "create an inflexible baseline build of hax with all elements", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "baseline-build-hax.js", "module": "baseline-build-hax.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/a11y-gif-player": "^25.0.0", "@haxtheweb/aframe-player": "^25.0.0", "@haxtheweb/citation-element": "^25.0.0", "@haxtheweb/cms-hax": "^25.0.0", "@haxtheweb/grid-plate": "^25.0.0", "@haxtheweb/hax-body": "^25.0.0", "@haxtheweb/hax-body-behaviors": "^25.0.0", "@haxtheweb/image-compare-slider": "^25.0.0", "@haxtheweb/license-element": "^25.0.0", "@haxtheweb/lrn-icons": "9.0.1", "@haxtheweb/lrn-math": "^25.0.0", "@haxtheweb/lrn-table": "^25.0.0", "@haxtheweb/lrn-vocab": "^25.0.0", "@haxtheweb/media-behaviors": "^25.0.0", "@haxtheweb/media-image": "^25.0.0", "@haxtheweb/meme-maker": "^25.0.0", "@haxtheweb/multiple-choice": "^25.0.0", "@haxtheweb/oer-schema": "^25.0.0", "@haxtheweb/person-testimonial": "^25.0.0", "@haxtheweb/place-holder": "^25.0.0", "@haxtheweb/q-r": "^25.0.0", "@haxtheweb/self-check": "^25.0.0", "@haxtheweb/simple-colors": "^25.0.0", "@haxtheweb/stop-note": "^25.0.0", "@haxtheweb/video-player": "^25.0.0", "@haxtheweb/wikipedia-query": "^25.0.0", "@haxtheweb/wysiwyg-hax": "^25.0.0", "@webcomponents/webcomponentsjs": "^2.8.0" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/baseline-build-hax/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/baseline-build-hax/test/baseline-build-hax.test.js ================================================ import { expect } from "@open-wc/testing"; // Import the main module to test that all imports load correctly import "../baseline-build-hax.js"; describe("baseline-build-hax module test", () => { it("should import without errors", () => { // If we get here, the import was successful expect(true).to.be.true; }); describe("HAX core components availability", () => { it("should have wysiwyg-hax available", () => { const element = globalThis.document.createElement("wysiwyg-hax"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("wysiwyg-hax"); }); it("should have cms-hax available", () => { const element = globalThis.document.createElement("cms-hax"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("cms-hax"); }); it("should have hax-body available", () => { const element = globalThis.document.createElement("hax-body"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("hax-body"); }); it("should have hax-tray available", () => { const element = globalThis.document.createElement("hax-tray"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("hax-tray"); }); it("should have hax-app-picker available", () => { const element = globalThis.document.createElement("hax-app-picker"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("hax-app-picker"); }); it("should have hax-app available", () => { const element = globalThis.document.createElement("hax-app"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("hax-app"); }); it("should have hax-toolbar available", () => { const element = globalThis.document.createElement("hax-toolbar"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("hax-toolbar"); }); }); describe("Content components availability", () => { it("should have a11y-gif-player available", () => { const element = globalThis.document.createElement("a11y-gif-player"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("a11y-gif-player"); }); it("should have citation-element available", () => { const element = globalThis.document.createElement("citation-element"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("citation-element"); }); it("should have image-compare-slider available", () => { const element = globalThis.document.createElement("image-compare-slider"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("image-compare-slider"); }); it("should have license-element available", () => { const element = globalThis.document.createElement("license-element"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("license-element"); }); it("should have lrn-math available", () => { const element = globalThis.document.createElement("lrn-math"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("lrn-math"); }); it("should have lrn-table available", () => { const element = globalThis.document.createElement("lrn-table"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("lrn-table"); }); it("should have lrn-vocab available", () => { const element = globalThis.document.createElement("lrn-vocab"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("lrn-vocab"); }); it("should have oer-schema available", () => { const element = globalThis.document.createElement("oer-schema"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("oer-schema"); }); }); describe("Media components availability", () => { it("should have media-image available", () => { const element = globalThis.document.createElement("media-image"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("media-image"); }); it("should have meme-maker available", () => { const element = globalThis.document.createElement("meme-maker"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("meme-maker"); }); it("should have video-player available", () => { const element = globalThis.document.createElement("video-player"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("video-player"); }); }); describe("Interactive components availability", () => { it("should have multiple-choice available", () => { const element = globalThis.document.createElement("multiple-choice"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("multiple-choice"); }); it("should have person-testimonial available", () => { const element = globalThis.document.createElement("person-testimonial"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("person-testimonial"); }); it("should have place-holder available", () => { const element = globalThis.document.createElement("place-holder"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("place-holder"); }); it("should have q-r available", () => { const element = globalThis.document.createElement("q-r"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("q-r"); }); it("should have self-check available", () => { const element = globalThis.document.createElement("self-check"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("self-check"); }); it("should have stop-note available", () => { const element = globalThis.document.createElement("stop-note"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("stop-note"); }); it("should have wikipedia-query available", () => { const element = globalThis.document.createElement("wikipedia-query"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("wikipedia-query"); }); }); describe("Layout components availability", () => { it("should have grid-plate available", () => { const element = globalThis.document.createElement("grid-plate"); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("grid-plate"); }); }); describe("HAX Store integration", () => { it("should have HAXStore available globally", () => { // HAXStore should be available after importing hax-store expect(globalThis.HAXStore).to.exist; }); it("should have HAXStore as a singleton", () => { const store1 = globalThis.HAXStore; const store2 = globalThis.HAXStore; expect(store1).to.equal(store2); }); it("should have required HAXStore methods", () => { const store = globalThis.HAXStore; expect(store).to.have.property("requestAvailability"); expect(typeof store.requestAvailability).to.equal("function"); }); }); describe("Component registry validation", () => { it("should have all components registered in custom elements registry", () => { const expectedComponents = [ "wysiwyg-hax", "cms-hax", "hax-body", "hax-tray", "hax-app-picker", "hax-app", "hax-toolbar", "a11y-gif-player", "citation-element", "image-compare-slider", "license-element", "lrn-math", "lrn-table", "lrn-vocab", "oer-schema", "media-image", "meme-maker", "multiple-choice", "person-testimonial", "place-holder", "q-r", "self-check", "stop-note", "video-player", "wikipedia-query", "grid-plate", ]; expectedComponents.forEach((tagName) => { const constructor = globalThis.customElements.get(tagName); expect(constructor).to.exist; expect(typeof constructor).to.equal("function"); }); }); it("should create instances of all registered components", () => { const componentTagNames = [ "wysiwyg-hax", "cms-hax", "hax-body", "a11y-gif-player", "citation-element", "license-element", "media-image", "meme-maker", "place-holder", "q-r", "self-check", "stop-note", "video-player", "grid-plate", ]; componentTagNames.forEach((tagName) => { const element = globalThis.document.createElement(tagName); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal(tagName); // Verify it's a proper custom element expect(element.constructor.name).to.not.equal("HTMLUnknownElement"); }); }); }); describe("Module loading performance", () => { it("should load all components in reasonable time", () => { // This test verifies that the import completed successfully // which means all components loaded without major issues const startTime = performance.now(); // Test that we can create multiple elements quickly const elements = [ globalThis.document.createElement("hax-body"), globalThis.document.createElement("media-image"), globalThis.document.createElement("video-player"), ]; const endTime = performance.now(); const creationTime = endTime - startTime; elements.forEach((element) => { expect(element).to.exist; }); // Element creation should be fast expect(creationTime).to.be.lessThan(100); }); }); describe("HAX ecosystem integration", () => { it("should provide components that integrate with HAX", () => { // Test that components have HAX-related methods where expected const haxBodyElement = globalThis.document.createElement("hax-body"); // HAX body should have core HAX functionality expect(haxBodyElement).to.exist; expect(haxBodyElement.tagName.toLowerCase()).to.equal("hax-body"); }); it("should provide educational components", () => { // Test key educational components are available const educationalComponents = [ "multiple-choice", "self-check", "lrn-math", "lrn-vocab", "stop-note", ]; educationalComponents.forEach((tagName) => { const element = globalThis.document.createElement(tagName); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal(tagName); }); }); it("should provide media components", () => { // Test key media components are available const mediaComponents = [ "video-player", "media-image", "a11y-gif-player", "meme-maker", ]; mediaComponents.forEach((tagName) => { const element = globalThis.document.createElement(tagName); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal(tagName); }); }); }); describe("Bundle completeness", () => { it("should include core HAX editing functionality", () => { const coreComponents = [ "hax-body", "hax-tray", "hax-toolbar", "hax-app-picker", "wysiwyg-hax", "cms-hax", ]; coreComponents.forEach((tagName) => { expect(globalThis.customElements.get(tagName)).to.exist; }); }); it("should include content authoring components", () => { const contentComponents = [ "citation-element", "license-element", "oer-schema", "place-holder", ]; contentComponents.forEach((tagName) => { expect(globalThis.customElements.get(tagName)).to.exist; }); }); it("should include interactive elements", () => { const interactiveComponents = [ "multiple-choice", "self-check", "q-r", "wikipedia-query", ]; interactiveComponents.forEach((tagName) => { expect(globalThis.customElements.get(tagName)).to.exist; }); }); }); describe("Accessibility compliance", () => { it("should include accessibility-focused components", () => { const a11yComponents = [ "a11y-gif-player", // Specifically named for accessibility ]; a11yComponents.forEach((tagName) => { const element = globalThis.document.createElement(tagName); expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal(tagName); }); }); it("should create accessible elements by default", () => { // Test that key components don't have obvious accessibility issues const componentsToTest = ["hax-body", "media-image", "stop-note"]; componentsToTest.forEach((tagName) => { const element = globalThis.document.createElement(tagName); expect(element).to.exist; // Elements should not have role="none" or other problematic defaults expect(element.getAttribute("role")).to.not.equal("none"); }); }); }); describe("Educational content standards", () => { it("should include OER-compliant components", () => { const oerComponents = [ "oer-schema", "license-element", "citation-element", ]; oerComponents.forEach((tagName) => { expect(globalThis.customElements.get(tagName)).to.exist; }); }); it("should include learning resource components", () => { const learningComponents = ["lrn-math", "lrn-table", "lrn-vocab"]; learningComponents.forEach((tagName) => { expect(globalThis.customElements.get(tagName)).to.exist; }); }); }); }); ================================================ FILE: elements/beaker-broker/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/beaker-broker/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/beaker-broker/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/beaker-broker/.npmignore ================================================ node_modules ================================================ FILE: elements/beaker-broker/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/beaker-broker/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/beaker-broker/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/beaker-broker/README.md ================================================ # <beaker-broker> Broker > A broker element that can play nicely with Beaker Browser and make the API even easier to work with then it already is. ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing module / web component */ import '@haxtheweb/beaker-broker/beaker-broker.js'; ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Broker ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/beaker-broker/beaker-broker.js ================================================ /** * Copyright 2018 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; /** * `beaker-broker` * `An element to help check for and broker calls to read and write beaker browser dat sites. * This allows for data binding and figuring out if we're in an environment that we can even use this.` * * @microcopy - language worth noting: * - beaker browser - a transformative, decentralized platform * - dat - a communication protocol for serving sites up p2p * * @demo demo/index.html * @element beaker-broker */ class BeakerBroker extends LitElement { // render function render() { return html` `; } // haxProperty definition static get haxProperties() { return {}; } // properties available to the custom element for data binding static get properties() { return { ...super.properties, archive: { type: Object, }, datUrl: { type: String, attribute: "dat-url", }, }; } /** * Store the tag name to make it easier to obtain directly. * @notice function name must be here for tooling to operate correctly */ static get tag() { return "beaker-broker"; } /** * LitElement ready */ firstUpdated() { if (typeof DatArchive === typeof undefined) { console.warn( "Beaker is not available from this site loading methodology", ); } } /** * HTMLElement */ constructor() { super(); this.datUrl = globalThis.location.host; } /** * LitElement properties changed */ updated(changedProperties) { changedProperties.forEach((oldValue, propName) => { if (propName == "archive") { // notify this.dispatchEvent( new CustomEvent("archive-changed", { detail: { value: this[propName], }, }), ); } if (propName == "datUrl") { this._datUrlChanged(this[propName]); // notify this.dispatchEvent( new CustomEvent("dat-url-changed", { detail: { value: this[propName], }, }), ); } }); } /** * notice dat address has changed, build the object for it */ async _datUrlChanged(newValue) { if (typeof DatArchive !== typeof undefined && newValue) { // load current site, set to archive this.archive = new DatArchive(newValue); } } /** * Write to file * @usage - this.write('hello.txt', 'things and stuff'); */ async write(path, data) { // well that was easy await this.archive.writeFile(path, data); } /** * Read to file * @var path - location of file * @var type - utf8, base64, hex, binary or specialized ones jpeg / png * @return Promise() with reference to the data in the file if await / async is active * @usage - await this.read('index.html'); to get this file */ async read(path, type) { var ftype = "utf8"; var response; // special cases for image types switch (type) { case "jpeg": case "jpg": ftype = "binary"; var buf = await this.archive.readFile(path, ftype); var blob = new Blob([buf], { type: "image/jpeg" }); response = URL.createObjectURL(blob); break; case "png": ftype = "binary"; var buf = await this.archive.readFile(path, ftype); var blob = new Blob([buf], { type: "image/png" }); response = URL.createObjectURL(blob); break; case "base64": var str = await this.archive.readFile(path, type); response = "data:image/png;base64," + str; break; default: var str = await this.archive.readFile(path, type); response = str; break; } return await response; } } globalThis.customElements.define(BeakerBroker.tag, BeakerBroker); export { BeakerBroker }; ================================================ FILE: elements/beaker-broker/demo/index.html ================================================ BeakerBroker: beaker-broker Demo

    Basic beaker-broker demo

    ================================================ FILE: elements/beaker-broker/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/beaker-broker/index.html ================================================ beaker-broker documentation ================================================ FILE: elements/beaker-broker/package.json ================================================ { "name": "@haxtheweb/beaker-broker", "wcfactory": { "className": "BeakerBroker", "customElementClass": "PolymerElement", "elementName": "beaker-broker", "generator-wcfactory-version": "0.3.1", "useHAX": true, "useSass": false, "files": { "css": "src/beaker-broker.css", "html": "src/beaker-broker.html", "js": "src/beaker-broker.js", "properties": "src/beaker-broker-properties.json", "hax": "src/beaker-broker-hax.json" }, "sharedStyles": [] }, "version": "25.0.0", "description": "A broker element to make working with Beaker Browser's API even easier.", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "beaker-broker.js", "module": "beaker-broker.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@polymer/polymer": "3.5.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/beaker-broker/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/beaker-broker/test/beaker-broker.test.js ================================================ ================================================ FILE: elements/bootstrap-theme/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/bootstrap-theme/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/bootstrap-theme/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/bootstrap-theme/.npmignore ================================================ node_modules ================================================ FILE: elements/bootstrap-theme/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/bootstrap-theme/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/bootstrap-theme/LICENSE.md ================================================ MIT License Copyright (c) 2021 collinkleest Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: elements/bootstrap-theme/README.md ================================================ # <bootstrap-theme> Theme > Hax bootstrap themeing ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/bootstrap-theme/bootstrap-theme.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Theme ## License [MIT License](http://opensource.org/licenses/MIT) ================================================ FILE: elements/bootstrap-theme/bootstrap-theme.js ================================================ /** * Copyright 2021 collinkleest * @license MIT, see License.md for full text. */ import { LitElement, html, css } from "lit"; import { HAXCMSLitElementTheme } from "@haxtheweb/haxcms-elements/lib/core/HAXCMSLitElementTheme.js"; import { HAXCMSMobileMenuMixin } from "@haxtheweb/haxcms-elements/lib/core/utils/HAXCMSMobileMenu.js"; import { BootstrapUserStylesMenuMixin } from "@haxtheweb/bootstrap-theme/lib/BootstrapUserStylesMenuMixin.js"; import { HAXCMSUserStylesMenuMixin } from "@haxtheweb/haxcms-elements/lib/core/utils/HAXCMSUserStylesMenu.js"; import { HAXCMSThemeParts } from "@haxtheweb/haxcms-elements/lib/core/utils/HAXCMSThemeParts.js"; import "@haxtheweb/es-global-bridge/es-global-bridge.js"; import "@haxtheweb/map-menu/map-menu.js"; import "@haxtheweb/simple-icon/lib/simple-icon-lite"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; // bootstrap elements imports import "@haxtheweb/bootstrap-theme/lib/BootstrapBreadcrumb.js"; import "@haxtheweb/bootstrap-theme/lib/BootstrapFooter.js"; import "@haxtheweb/bootstrap-theme/lib/BootstrapSearch.js"; import { store } from "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; import { autorun, toJS } from "mobx"; /** * @title Bootstrap * `Hax bootstrap` * @haxcms-theme-priority 100 * @demo demo/index.html * @element bootstrap-theme */ class BootstrapTheme extends HAXCMSThemeParts( BootstrapUserStylesMenuMixin(HAXCMSMobileMenuMixin(HAXCMSLitElementTheme)), ) { /** * Convention we use */ static get tag() { return "bootstrap-theme"; } static get styles() { return [ super.styles, css` /* var declaration and default styles */ :host { --bootstrap-theme-link-color: #007bff; --map-menu-item-a-color: var(--bootstrap-theme-link-color); --bootstrap-theme-light-color: #000000; --bootstrap-theme-light-background-color: #ffffff; --bootstrap-theme-light-secondary-background-color: rgb( 242, 244, 244 ); --bootstrap-theme-light-secondary-color: rgb(233, 236, 239); --bootstrap-theme-dark-background-color: #212121; --bootstrap-theme-dark-secondary-background-color: #343a40; --bootstrap-theme-dark-color: #ffffff; --bootstrap-theme-palenight-background-color: rgb(13, 18, 41); --bootstrap-theme-palenight-secondary-background-color: rgb( 26, 31, 54 ); --bootstrap-theme-palenight-color: #ffffff; --site-menu-background-color: var( --bootstrap-theme-light-secondary-background-color ); display: block; background-color: var( --bootstrap-theme-light-secondary-background-color ); --map-menu-item-height: 24px; --map-menu-button-height: 34px; width: 100%; display: flex; padding: 0; margin: 0; min-height: 100vh; flex-direction: column; -webkit-box-orient: vertical; -webkit-box-direction: normal; } /* hidden styles */ :host([hidden]) { display: none; } [hidden] { display: none; } a { color: #007bff; } /* menu styles */ :host([menu-open]) .menu-outline { left: 0; padding: 0 8px; } .menu-outline { position: absolute; top: 50px; left: -300px; bottom: 0; z-index: 1; width: 300px; color: #364149; background-color: var( --bootstrap-theme-light-secondary-background-color ); transition: left 0.3s ease; } site-menu::part(map-menu) { height: var(--site-menu-map-menu-height, calc(100vh - 130px)); } #haxcmsmobilemenubutton { padding-left: 0; } #haxcmsmobilemenunav { margin-top: 32px; } /* site title above menu */ .site-title { border-bottom: 1px solid black; background-color: var( --bootstrap-theme-light-secondary-background-color ); display: flex; align-items: center; height: 48px; display: sticky; } #haxcmsmobilemenunav { height: calc(100vh - 130px); } .site-img { display: inline-block; width: 50px; height: 50px; border-radius: 50%; } :host([responsive-size="xs"]) .main-content, :host([responsive-size="sm"]) .main-content { overflow-x: hidden; } :host([responsive-size="xs"]) .menu-outline, :host([responsive-size="sm"]) .menu-outline { top: 0; } :host([responsive-size="xs"]) .site-header, :host([responsive-size="sm"]) .site-header { display: none; } :host([responsive-size="xs"]) .page-inner { overflow-x: auto; } :host([responsive-size="xs"]) bootstrap-breadcrumb, :host([responsive-size="sm"]) bootstrap-breadcrumb { display: none; } /* main content */ .site { background-color: var( --bootstrap-theme-light-secondary-background-color ); } replace-tag[with="site-print-button"], site-print-button { color: black; --haxcms-tooltip-color: #f5f5f5; --haxcms-tooltip-background-color: #252737; } .site-body { position: absolute; top: 0; right: 0; left: 0; bottom: 0; min-width: 400px; overflow-y: auto; transition: left 0.3s ease; } .site-body .site-inner { position: relative; top: 0; right: 0; left: 0; bottom: 0; overflow-y: auto; } :host([menu-open]) .site-body { left: 300px; } :host([responsive-size="xs"]) .site-body, :host([responsive-size="sm"]) .site-body { overflow-x: hidden; position: fixed; } :host([responsive-size="xs"]) .main-content, :host([responsive-size="sm"]) .main-content { overflow-x: hidden; } :host([responsive-size="xs"]) .site-inner { max-width: 100vw; } :host([responsive-size="xs"]) .page-inner { overflow-x: auto; } .page-wrapper { position: relative; outline: 0; } .main-content > :first-child { margin-top: 0 !important; } /* header */ .pull-right { float: right; } :host([is-logged-in]) .site-body { top: 56px; } .btn-container { z-index: 2; height: 50px; padding: 6px; } .navigation { position: fixed; top: 50px; bottom: 0px; margin: 0px 20px; max-width: 150px; min-width: 90px; display: flex; place-content: center; flex-direction: column; font-size: 40px; color: rgb(204, 204, 204); text-align: center; transition: all 0.35s ease 0s; } /* header */ .site-header { overflow: visible; height: 50px; padding: 0 8px; z-index: 2; font-size: 0.85em; color: #7e888b; background: 0 0; } .page-title { display: inline-flex; margin-left: 12px; overflow: hidden; margin-bottom: 0px; vertical-align: middle; word-break: break-all; max-width: 77%; height: 32px; line-height: 32px; overflow-wrap: break-word; text-overflow: ellipsis; } /* Light Theme */ :host([color-theme="0"]) site-search { color: #252737; --site-search-result-background-color: transparent; --site-search-result-background-color-hover: #f5f5f5; --site-search-link-color-hover: #252737; --site-search-link-text-color: #252737; --site-search-link-color: #252737; --site-search-result-color: #252737; } /* Dark Theme */ :host([color-theme="1"]) { background-color: var(--bootstrap-theme-dark-background-color); --simple-fields-background-color: transparent; --map-menu-item-a-color: var(--bootstrap-theme-dark-color); --haxcms-user-styles-color-theme-color-color: var( --bootstrap-theme-dark-color ); --haxcms-tooltip-background-color: var(--bootstrap-theme-dark-color); --haxcms-tooltip-color: var(--bootstrap-theme-dark-background-color); --site-menu-background-color: var( --bootstrap-theme-dark-background-color ); --simple-icon-color: var(--bootstrap-theme-dark-color); } :host([color-theme="1"]) site-search { color: var(--bootstrap-theme-dark-color); --site-search-result-background-color: var( --bootstrap-theme-dark-secondary-background-color ); --site-search-result-background-color-hover: var( --bootstrap-theme-dark-secondary-background-color ); --site-search-link-color-hover: var(--bootstrap-theme-dark-color); --site-search-link-text-color: var(--bootstrap-theme-dark-color); --site-search-link-color: var(--bootstrap-theme-dark-color); --site-search-result-color: var(--bootstrap-theme-dark-color); } :host([color-theme="1"]) .site-title { border-bottom: 1px solid var(--bootstrap-theme-dark-color); background-color: var(--bootstrap-theme-dark-background-color); } :host([color-theme="1"]) .site { background-color: var(--bootstrap-theme-dark-background-color); } :host([color-theme="1"]) .menu-outline { background-color: var(--bootstrap-theme-dark-background-color); } :host([color-theme="1"]) .site-title { color: #fff; } :host([color-theme="1"]) .page-title { color: #fff; } :host([color-theme="1"]) .main-section { color: var(--bootstrap-theme-dark-color); } :host([color-theme="1"]) #site-search-input { background-color: var( --bootstrap-theme-dark-secondary-background-color ); } :host([color-theme="1"]) .card { background-color: var( --bootstrap-theme-dark-secondary-background-color ); } :host([color-theme="1"]) .card h1 h2 h3 h4 h5 h6 p { color: #fff; } :host([color-theme="1"]) .site-header .btn { color: white; } :host([color-theme="1"]) .site-header .btn:hover, :host([color-theme="1"]) .site-header .btn:focus, :host([color-theme="1"]) .site-header .btn:active { color: #fffff5; background: none; } :host([color-theme="1"]) .site-header site-active-title { color: #fff; } /* Palenight Theme */ :host([color-theme="2"]) { background-color: var(--bootstrap-theme-palenight-background-color); --simple-fields-background-color: transparent; --map-menu-item-a-color: var(--bootstrap-theme-palenight-color); --haxcms-user-styles-color-theme-color-color: var( --bootstrap-theme-palenight-color ); --haxcms-tooltip-background-color: var( --bootstrap-theme-palenight-color ); --haxcms-tooltip-color: var( --bootstrap-theme-palenight-background-color ); --site-menu-background-color: var( --bootstrap-theme-palenight-background-color ); --simple-icon-color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) site-search { color: var(--bootstrap-theme-palenight-color); --site-search-result-background-color: var( --bootstrap-theme-palenight-secondary-background-color ); --site-search-result-background-color-hover: var( --bootstrap-theme-palenight-secondary-background-color ); --site-search-link-color-hover: var( --bootstrap-theme-palenight-color ); --site-search-link-text-color: var(--bootstrap-theme-palenight-color); --site-search-link-color: var(--bootstrap-theme-palenight-color); --site-search-result-color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) .site-title { border-bottom: 1px solid var(--bootstrap-theme-palenight-color); background-color: var(--bootstrap-theme-palenight-background-color); color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) .site { background-color: var(--bootstrap-theme-palenight-background-color); } :host([color-theme="2"]) .menu-outline { background-color: var(--bootstrap-theme-palenight-background-color); } :host([color-theme="2"]) .page-title { color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) .main-section { color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) #site-search-input { background-color: var( --bootstrap-theme-palenight-secondary-background-color ); } :host([color-theme="2"]) .card { background-color: var( --bootstrap-theme-palenight-secondary-background-color ); } :host([color-theme="2"]) .card h1 h2 h3 h4 h5 h6 p { color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) .site-header .btn { color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) .site-header .btn:hover, :host([color-theme="2"]) .site-header .btn:focus, :host([color-theme="2"]) .site-header .btn:active { color: var(--bootstrap-theme-palenight-color); background: none; } :host([color-theme="2"]) .site-header site-active-title { color: #fff; } `, ]; } static get properties() { return { ...super.properties, searchTerm: { type: String, }, menuOpen: { type: Boolean, attribute: "menu-open", reflect: true, }, colorTheme: { type: Number, attribute: "color-theme", reflect: true, }, }; } /** * HTMLElement */ constructor() { super(); this.HAXCMSThemeSettings.autoScroll = true; this.menuOpen = true; let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); this._bootstrapPath = basePath + "bootstrap/dist/css/bootstrap.min.css"; this._themeElements = []; if (typeof this.colorTheme === typeof undefined || this.colorTheme === null) { this.colorTheme = 0; } this.searchTerm = ""; this.__siteTitle = ""; this.___pageTitle = ""; this.__siteImage = ""; // prettier-ignore import( "@haxtheweb/haxcms-elements/lib/ui-components/site/site-print-button.js" ); this.__disposer = this.__disposer || []; autorun((reaction) => { this.activeManifestIndex = toJS(store.activeManifestIndex); this.__siteTitle = toJS(store.manifest.title); this.__siteImage = toJS(store.manifest.metadata.author.image); this.__pageTitle = toJS(store.activeTitle); this.__disposer.push(reaction); }); } render() { return html`
    ${this.HAXCMSMobileMenuButton()} ${this.BootstrapUserStylesMenu()}

    ${this.__pageTitle}

    `; } searchChanged(evt) { if (evt.detail.searchText) { import( "@haxtheweb/haxcms-elements/lib/ui-components/site/site-search.js" ).then(() => { this.searchTerm = evt.detail.searchText; }); } else { this.searchTerm = ""; } } searchItemSelected(e) { this.searchTerm = ""; } _generateBootstrapLink() { if (this._bootstrapLink) { globalThis.document.head.removeChild(this._bootstrapLink); } let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); let link = globalThis.document.createElement("link"); link.setAttribute("rel", "stylesheet"); link.setAttribute( "href", basePath + "bootstrap/dist/css/bootstrap.min.css", ); globalThis.document.head.appendChild(link); return link; } /** * life cycle, element is removed from the DOM */ disconnectedCallback() { if (this._bootstrapLink) { globalThis.document.head.removeChild(this._bootstrapLink); } for (var i in this.__disposer) { this.__disposer[i].dispose(); } // remove overflow globalThis.document.body.style.removeProperty("overflow"); super.disconnectedCallback(); } /** * LitElement ready */ firstUpdated(changedProperties) { if (super.firstUpdated) { super.firstUpdated(changedProperties); } this._loadScripts(); globalThis.document.body.style.overflow = "hidden"; this.HAXCMSThemeSettings.scrollTarget = this.shadowRoot.querySelector(".site-body"); globalThis.AbsolutePositionStateManager.requestAvailability().scrollTarget = this.HAXCMSThemeSettings.scrollTarget; this._bootstrapLink = this._generateBootstrapLink(); } /* * Loads jquery first because bootstrap requires jquery to be present first * Jquery callback function then loads bootstrap */ _loadScripts() { let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); let jqueryPath = "jquery/dist/jquery.min.js"; globalThis.ESGlobalBridge.requestAvailability().load( "jquery", basePath + jqueryPath, ); globalThis.addEventListener( `es-bridge-jquery-loaded`, this._jqueryLoaded.bind(this), ); } _bootstrapLoaded(e) { this._bootstrap = true; } _loadBootstrap() { let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); let bootstrapPath = "bootstrap/dist/js/bootstrap.bundle.min.js"; globalThis.ESGlobalBridge.requestAvailability().load( "bootstrap", basePath + bootstrapPath, ); globalThis.addEventListener( `es-bridge-bootstrap-loaded`, this._bootstrapLoaded.bind(this), ); } _jqueryLoaded(e) { this._jquery = true; this._loadBootstrap(); } getBasePath(url) { return url.substring(0, url.lastIndexOf("/@haxtheweb/") + 1); } /** * LitElement life cycle - property changed */ updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => {}); } } globalThis.customElements.define(BootstrapTheme.tag, BootstrapTheme); export { BootstrapTheme }; ================================================ FILE: elements/bootstrap-theme/demo/index.html ================================================ BootstrapTheme: bootstrap-theme Demo

    Basic bootstrap-theme demo

    ================================================ FILE: elements/bootstrap-theme/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); // discover iconset and build json structure gulp.task("iconset", (done) => { const iconset = packageJson.wcfactory.iconset || {}; if(iconset.svgsPath && iconset.svgsPath !== ''){ const path = iconset.svgsPath; const manifestFilename = iconset.manifestFilename || `${packageJson.wcfactory.elementName}-iconsets-manifest.js` const manifestPath = iconset.manifestPath || `./lib`; const exportName = iconset.exportName || `${packageJson.wcfactory.className}IconsetsManifest`; const jsonContent = JSON.stringify(dirTree(path).icons, null, 2); const iconVar = `export const ${exportName} = ${jsonContent};` fs.writeFile(`${manifestPath}/${manifestFilename}.js`, iconVar, 'utf8', function (err) { if (err) { console.log("An error occured while writing iconset manifest Object to File."); return console.log(err); } console.log("Iconset SVGs and manifest JS file has been saved."); return true; }); } else { console.log("No Iconset Manifest"); } done(); }); gulp.task( "default", gulp.series("analyze") ); ================================================ FILE: elements/bootstrap-theme/index.html ================================================ bootstrap-theme documentation ================================================ FILE: elements/bootstrap-theme/lib/BootstrapBreadcrumb.js ================================================ /** * Copyright 2021 collinkleest * @license MIT, see License.md for full text. */ import { LitElement, html, css } from "lit"; import "@haxtheweb/simple-icon/lib/simple-icon-lite"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import { store } from "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; import { autorun, toJS } from "mobx"; /** * `bootstrap-breadcrumb` * `Breadcrumb element for bootstrap theme` * @demo demo/index.html * @element bootstrap-breadcrumb */ class BootstrapBreadcrumb extends LitElement { static get styles() { return [ css` :host { --bootstrap-dark-theme-secondary-background-color: #343a40; --simple-icon-height: 18px; --simple-icon-width: 18px; --simple-icon-color: #007bff; } a { color: #007bff; } .container { background-color: #e9ecef; border-radius: 5px; } .breadcrumb { -moz-box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 10%); -webkit-box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 10%); box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 10%); list-style-type: none; display: flex; } .breadcrumb-item { padding: 0.5rem 0.75rem; color: light-dark(black, white); } simple-icon-lite { margin-bottom: 5px; } a:hover simple-icon-lite { text-decoration: underline; } /* dark mode */ :host([color-theme="1"]) { --simple-icon-color: #999; } :host([color-theme="1"]) simple-icon-lite:hover { --simple-icon-color: #fff; } :host([color-theme="1"]) .breadcrumb { background-color: var( --bootstrap-dark-theme-secondary-background-color ); -moz-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); -webkit-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); } :host([color-theme="1"]) .container { background-color: var( --bootstrap-dark-theme-secondary-background-color ); } :host([color-theme="1"]) a { color: #999; } :host([color-theme="1"]) a:hover { color: #fff; } /* palenight theme */ :host([color-theme="2"]) { --simple-icon-color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) simple-icon-lite:hover { --simple-icon-color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) .breadcrumb { background-color: var( --bootstrap-theme-palenight-secondary-background-color ); -moz-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); -webkit-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); } :host([color-theme="2"]) .container { background-color: var( --bootstrap-theme-palenight-secondary-background-color ); } :host([color-theme="2"]) a { color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) a:hover { color: var(--bootstrap-theme-palenight-color); } .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } `, ]; } static get tag() { return "bootstrap-breadcrumb"; } static get properties() { return { items: { type: Array, }, homeItem: { type: Object, }, colorTheme: { type: String, reflect: true, attribute: "color-theme", }, }; } constructor() { super(); this.items = []; this._activeItem = {}; this.homeItem = {}; let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); this._bootstrapPath = basePath + "bootstrap/dist/css/bootstrap.min.css"; this.__disposer = this.__disposer ? this.__disposer : []; autorun((reaction) => { let manifestHomeItem = toJS(store.manifest.items[0]); let storeActiveItem = toJS(store.activeItem); // check if home item has changed, if it has set new home item if (this.homeItem !== manifestHomeItem) { this.homeItem = manifestHomeItem; } // check if we have a new active item // if so we clear our items array, set a new activeItem, push it to the items array // then check for a parent, if a parent is present call recursive function that keeps adding subsequent parents if (storeActiveItem && this._activeItem !== storeActiveItem) { this.items = []; this._activeItem = storeActiveItem; this.items.push(storeActiveItem); if (storeActiveItem.parent) { this.addParentToItems(storeActiveItem); } } this.__disposer.push(reaction); }); } render() { return html`
    `; } getBasePath(url) { return url.substring(0, url.lastIndexOf("/@haxtheweb/") + 1); } // gets parents item by the items id getParentById(parentId) { let elementPos = store.manifest.items .map((item) => { return toJS(item.id); }) .indexOf(parentId); let parentFound = toJS(store.manifest.items[elementPos]); return parentFound; } // recursive function that keeps adding parents to items array addParentToItems(item) { let parentItem = this.getParentById(item.parent); this.items.unshift(parentItem); if (parentItem.parent) { this.addParentToItems(parentItem); } } firstUpdated(changedProperties) {} updated(changedProperties) { changedProperties.forEach((oldValue, propName) => {}); } } globalThis.customElements.define(BootstrapBreadcrumb.tag, BootstrapBreadcrumb); export { BootstrapBreadcrumb }; ================================================ FILE: elements/bootstrap-theme/lib/BootstrapFooter.js ================================================ import { LitElement, html, css } from "lit"; import "@haxtheweb/simple-icon/lib/simple-icon-lite.js"; import "@haxtheweb/simple-icon/lib/simple-icons.js"; import { store } from "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; import { autorun, toJS } from "mobx"; class BootstrapFooter extends LitElement { static get tag() { return "bootstrap-footer"; } static get styles() { return [ css` :host { margin-bottom: 10px; --simple-icon-height: 18px; --simple-icon-width: 18px; --simple-icon-color: #007bff; } .btn-outline-primary { color: #007bff; border-color: #007bff; } .btn-outline-primary:active, .btn-outline-primary:focus, .btn-outline-primary:hover { --simple-icon-color: white; color: #fff; background-color: #007bff; border-color: #007bff; } .container { display: flex; background-color: #e9ecef; border-radius: 5px; padding: 10px; -moz-box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 10%); -webkit-box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 10%); box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 10%); } .forward { margin-left: auto; } .backward { margin-right: auto; } simple-icon-lite { margin-bottom: 3px; } a { text-decoration: none; color: #007bff; } /* dark theme */ :host([color-theme="1"]) { --simple-icon-color: var(--bootstrap-theme-dark-color); } :host([color-theme="1"]) .btn { color: var(--bootstrap-theme-dark-color); background-color: transparent; background-image: none; border-color: #6c757d; } :host([color-theme="1"]) .btn:hover { color: var(--bootstrap-theme-dark-color); background-color: #6c757d; border-color: #6c757d; } :host([color-theme="1"]) .container { background-color: var( --bootstrap-theme-dark-secondary-background-color ); -moz-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); -webkit-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); } /* palenight theme */ :host([color-theme="2"]) { --simple-icon-color: var(--bootstrap-theme-palenight-color); } :host([color-theme="2"]) .btn { color: var(--bootstrap-theme-palenight-color); background-color: transparent; background-image: none; border-color: #6c757d; } :host([color-theme="2"]) .btn:hover { color: var(--bootstrap-theme-palenight-color); background-color: #6c757d; border-color: #6c757d; } :host([color-theme="2"]) .container { background-color: var( --bootstrap-theme-palenight-secondary-background-color ); -moz-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); -webkit-box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); box-shadow: inset 0 2px 4px 0 rgb(var(--bootstrap-theme-light-secondary-background-color), 0.7); } `, ]; } static get properties() { return { _backwardItem: { type: Object, }, _forwardItem: { type: Object, }, colorTheme: { type: String, attribute: "color-theme", }, }; } constructor() { super(); let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); this._bootstrapPath = basePath + "bootstrap/dist/css/bootstrap.min.css"; this._forwardItem = {}; this._backwardItem = {}; this._activeItemIndex = -1; this._routerManifest = {}; this.__disposer = this.__disposer ? this.__disposer : []; autorun((reaction) => { let storeActiveItemIndex = toJS(store.activeManifestIndex); let storeRouterManifest = toJS(store.routerManifest); if ( this._activeItem !== storeActiveItemIndex || this._routerManifest !== storeRouterManifest ) { this._activeItem = storeActiveItemIndex; this._routerManifest = storeRouterManifest; if (storeRouterManifest.items[storeActiveItemIndex - 1]) { this._backwardItem = storeRouterManifest.items[storeActiveItemIndex - 1]; } if (storeRouterManifest.items[storeActiveItemIndex + 1]) { this._forwardItem = storeRouterManifest.items[storeActiveItemIndex + 1]; } } this.__disposer.push(reaction); }); } render() { return html` `; } getBasePath(url) { return url.substring(0, url.lastIndexOf("/@haxtheweb/") + 1); } } globalThis.customElements.define(BootstrapFooter.tag, BootstrapFooter); export { BootstrapFooter }; ================================================ FILE: elements/bootstrap-theme/lib/BootstrapSearch.js ================================================ import { LitElement, html, css } from "lit"; import { autorun, toJS } from "mobx"; import { store } from "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; class BootstrapSearch extends LitElement { constructor() { super(); let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); this._bootstrapPath = basePath + "bootstrap/dist/css/bootstrap.min.css"; this.searchText = ""; } static get tag() { return "bootstrap-search"; } static get properties() { return { colorTheme: { type: String, reflect: true, attribute: "color-theme", }, searchText: { type: String, }, }; } static get styles() { return [ css` :host { float: right; } input { max-width: var(--bootstrap-search-max-width, 300px); width: var(--bootstrap-search-width, 300px); } .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } `, ]; } render() { return html` `; } inputChanged(evt) { this.searchText = evt.target.value; this.dispatchEvent( new CustomEvent("search-changed", { bubbles: true, composed: true, detail: { searchText: this.searchText }, }), ); } handleSubmit(evt) { evt.preventDefault(); // Form submission is handled by input change } handleKeydown(evt) { if (evt.key === "Escape") { evt.target.value = ""; this.searchText = ""; this.dispatchEvent( new CustomEvent("search-changed", { bubbles: true, composed: true, detail: { searchText: "" }, }), ); } } getBasePath(url) { return url.substring(0, url.lastIndexOf("/@haxtheweb/") + 1); } } globalThis.customElements.define(BootstrapSearch.tag, BootstrapSearch); export { BootstrapSearch }; ================================================ FILE: elements/bootstrap-theme/lib/BootstrapUserStylesMenuMixin.js ================================================ import { css, html } from "lit"; import { normalizeEventPath, localStorageGet, localStorageSet, } from "@haxtheweb/utils/utils.js"; import { autorun, toJS } from "mobx"; import { store } from "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; const BootstrapUserStylesMenuMixin = function (SuperClass) { return class extends SuperClass { constructor() { super(); this.hideUserStylesMenu = true; this.fontSize = 1; this.fontFamily = 0; this.colorTheme = localStorageGet("haxcms-bootstrap-userPref-colorTheme", 0); let basePath = this.getBasePath(decodeURIComponent(import.meta.url)); this._bootstrapPath = basePath + "bootstrap/dist/css/bootstrap.min.css"; this.addEventListener("click", this.checkUserStylesMenuOpen.bind(this)); autorun(() => { const darkMode = toJS(store.darkMode); const localColorTheme = localStorageGet( "haxcms-bootstrap-userPref-colorTheme", 0, ); if (darkMode) { this.colorTheme = 1; } else if (localColorTheme === 1) { this.colorTheme = 0; } else { this.colorTheme = localColorTheme; } }); } static get styles() { let styles = []; if (super.styles) { styles = super.styles; } return [ styles, css` :host([color-theme="0"]) { } :host([color-theme="0"]) .hcusm { border-color: #222222; } :host([color-theme="0"]) .hcusm simple-popover { --simple-popover-color: #222222; --simple-popover-background-color: #fafafa; } #slot ::slotted(*) { color: var(--haxcms-user-styles-color-theme-color-color); } simple-icon-button-lite:not(:defined), simple-popover:not(:defined) { display: none; } simple-popover { padding: 2px; } .hcusm.open { display: block; } .hcusm { min-width: 160px; padding: 0; margin: 2px 0 0; list-style: none; font-size: 14px; background-color: transparent; } .hcusm button, .hcusm select { text-transform: none; } .hcusm button, .hcusm input { line-height: normal; } .hcusm button, .hcusm input, .hcusm select, .hcusm textarea { font-family: inherit; font-size: 100%; margin: 0; } .hcusm-settings-container[hidden] { display: none; } /* * Light Theme */ .btn-size, .btn-font { background-color: var( --bootstrap-theme-light-secondary-background-color ); color: var(--bootstrap-theme-light-color); } .btn-size.size-2 { font-size: 16px; } /* * Dark Theme */ :host([color-theme="1"]) { } :host([color-theme="1"]) .hcusm { border-color: #222222; } :host([color-theme="1"]) .btn-group .btn[type="size"] .btn[type="font"] { background-color: var( --bootstrap-theme-light-secondary-background-color ); color: var(--bootstrap-theme-dark-color) !important; } :host([color-theme="1"]) simple-popover { --simple-popover-color: white; --simple-popover-background-color: var( --bootstrap-theme-dark-secondary-background-color ); } :host([color-theme="1"]) .hcusm .dropdown-caret .caret-inner { border-bottom: 9px solid var(--bootstrap-dark-theme-secondary-background-color); } :host([color-theme="1"]) .hcusm .hcusm-buttons { border-color: #7e888b; } :host([color-theme="1"]) .hcusm .hcusm-button { color: white; } :host([color-theme="1"]) .hcusm .hcusm-button:hover, :host([color-theme="1"]) .hcusm .hcusm-button:focus, :host([color-theme="1"]) .hcusm .hcusm-button:active { color: #eee8e0; } /* palenight theme */ :host([color-theme="2"]) { --haxcms-user-styles-color-theme-color-color: var( --simple-colors-default-theme-light-blue-1, #cfd4e3 ); } :host([color-theme="2"]) .hcusm { border-color: var(--bootstrap-theme-palenight-background-color); } :host([color-theme="2"]) .btn[type="size"] .btn[type="font"] { background-color: var( --bootstrap-theme-light-secondary-background-color ); color: var(--bootstrap-theme-palenight-background-color); } :host([color-theme="2"]) simple-popover { --simple-popover-color: white; --simple-popover-background-color: var( --bootstrap-theme-palenight-secondary-background-color ); } :host([color-theme="2"]) .hcusm .dropdown-caret .caret-inner { border-bottom: 9px solid var(--bootstrap-theme-palenight-secondary-background-color); } simple-icon-button-lite { color: inherit; } .open { text-align: center; } .btn-group-title { font-weight: bold; } .btn-palenight { background-color: var( --bootstrap-theme-palenight-secondary-background-color ); color: var(--bootstrap-theme-palenight-color); } /* override bootstrap default */ .btn-palenight:hover { color: var(--bootstrap-theme-palenight-color); } .btn-dark { background-color: var( --bootstrap-theme-dark-secondary-background-color ); } .btn-light { background-color: var( --bootstrap-theme-light-secondary-background-color ); } `, ]; } BootstrapUserStylesMenu() { import("@haxtheweb/simple-icon/simple-icon.js"); import("@haxtheweb/simple-icon/lib/simple-icons.js"); import("@haxtheweb/simple-icon/lib/simple-icon-button-lite.js"); import("@haxtheweb/simple-popover/simple-popover.js"); import("@haxtheweb/simple-tooltip/simple-tooltip.js"); return html` Text settings
    Font Size
    Font Family
    Theme Color
    `; } static get properties() { let props = super.properties || {}; return { ...props, hideUserStylesMenu: { type: Boolean, }, fontSize: { type: Number, reflect: true, attribute: "font-size", }, fontFamily: { type: Number, reflect: true, attribute: "font-family", }, colorTheme: { type: Number, reflect: true, attribute: "color-theme", }, }; } checkUserStylesMenuOpen(e) { var target = normalizeEventPath(e); if ( !this.hideUserStylesMenu && !target.includes(this.toggleUserStylesMenuTarget) && !target.includes( this.shadowRoot.querySelector("#haxcmsuserstylesmenu"), ) && target.tagName !== "BUTTON" ) { this.hideUserStylesMenu = true; } } updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { if (propName == "editMode" && this[propName]) { // edit mode has been activated this.hideUserStylesMenu = true; } }); } /** * life cycle, element is afixed to the DOM */ firstUpdated(changedProperties) { if (super.firstUpdated) { super.firstUpdated(changedProperties); } this.toggleUserStylesMenuTarget = this.shadowRoot.querySelector( "#haxcmsuserstylesmenupopover", ); // hook up the pop over menu this.shadowRoot.querySelector("#haxcmsuserstylesmenu").target = this.toggleUserStylesMenuTarget; } toggleUserStylesMenu(e) { this.hideUserStylesMenu = !this.hideUserStylesMenu; } UserStylesSizeDown(e) { if (this.fontSize > 0) { this.fontSize = this.fontSize - 1; } } UserStylesSizeUp(e) { if (this.fontSize < 4) { this.fontSize = this.fontSize + 1; } } UserStylesFontFamilyChange(e) { var target = normalizeEventPath(e)[0]; this.fontFamily = parseInt(target.getAttribute("data-font")); } UserStylesColorThemeChange(e) { var target = normalizeEventPath(e)[0]; this.colorTheme = parseInt(target.getAttribute("data-theme"), 10); localStorageSet( "haxcms-bootstrap-userPref-colorTheme", this.colorTheme, ); } }; }; export { BootstrapUserStylesMenuMixin }; ================================================ FILE: elements/bootstrap-theme/package.json ================================================ { "name": "@haxtheweb/bootstrap-theme", "wcfactory": { "className": "BootstrapTheme", "customElementClass": "LitElement", "elementName": "bootstrap-theme", "generator-wcfactory-version": "0.10.0", "useHAX": true, "useSass": false, "files": { "css": "src/bootstrap-theme.css", "html": "src/bootstrap-theme.html", "js": "src/bootstrap-theme.js", "properties": "src/bootstrap-theme-properties.json", "hax": "src/bootstrap-theme-hax.json" }, "iconset": {}, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "Hax bootstrap themeing", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "bootstrap-theme.js", "module": "bootstrap-theme.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/es-global-bridge": "^25.0.0", "@haxtheweb/haxcms-elements": "^25.0.0", "@haxtheweb/map-menu": "^25.0.0", "@haxtheweb/simple-icon": "^25.0.0", "@haxtheweb/utils": "^25.0.0", "bootstrap": "4.6.0", "jquery": "3.6.0", "lit": "3.3.2", "mobx": "6.13.7" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/bootstrap-theme/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/bootstrap-theme/test/bootstrap-theme.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../bootstrap-theme.js"; // Mock HAXcms dependencies beforeEach(() => { // Mock store and MobX functions globalThis.store = { activeManifestIndex: 0, manifest: { title: "Test Site", metadata: { author: { image: "https://example.com/author.jpg", }, }, }, activeTitle: "Test Page", }; globalThis.toJS = (value) => value; globalThis.autorun = (callback) => { callback(() => {}); return { dispose: () => {} }; }; // Mock ESGlobalBridge globalThis.ESGlobalBridge = { requestAvailability: () => ({ load: (name, url) => { setTimeout(() => { globalThis.dispatchEvent(new CustomEvent(`es-bridge-${name}-loaded`)); }, 10); }, }), }; // Mock AbsolutePositionStateManager globalThis.AbsolutePositionStateManager = { requestAvailability: () => ({ scrollTarget: null, }), }; // Mock jQuery and Bootstrap loading globalThis.jQuery = globalThis.$ = {}; globalThis.bootstrap = {}; }); aftereEach(() => { // Clean up document modifications const links = globalThis.document.head.querySelectorAll( 'link[href*="bootstrap"]', ); links.forEach((link) => link.remove()); // Reset body styles if (globalThis.document.body.style.overflow) { globalThis.document.body.style.removeProperty("overflow"); } }); describe("bootstrap-theme test", () => { let element; beforeEach(async () => { element = await fixture(html``); await element.updateComplete; }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("bootstrap-theme"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Component structure and properties", () => { it("should have correct tag name", () => { expect(element.constructor.tag).to.equal("bootstrap-theme"); }); it("should initialize with default properties", () => { expect(element.menuOpen).to.be.true; expect(element.colorTheme).to.equal("0"); expect(element.searchTerm).to.equal(""); expect(element.__siteTitle).to.equal("Test Site"); expect(element.__pageTitle).to.equal("Test Page"); }); it("should have required theme structure elements", () => { const site = element.shadowRoot.querySelector(".site"); const menuOutline = element.shadowRoot.querySelector(".menu-outline"); const siteBody = element.shadowRoot.querySelector(".site-body"); const siteHeader = element.shadowRoot.querySelector(".site-header"); const mainContent = element.shadowRoot.querySelector(".main-content"); const footer = element.shadowRoot.querySelector("footer"); expect(site).to.exist; expect(menuOutline).to.exist; expect(siteBody).to.exist; expect(siteHeader).to.exist; expect(mainContent).to.exist; expect(footer).to.exist; }); it("should include Bootstrap components", () => { const breadcrumb = element.shadowRoot.querySelector( "bootstrap-breadcrumb", ); const search = element.shadowRoot.querySelector("bootstrap-search"); const footer = element.shadowRoot.querySelector("bootstrap-footer"); expect(breadcrumb).to.exist; expect(search).to.exist; expect(footer).to.exist; }); }); describe("Property validation with accessibility", () => { describe("menuOpen property", () => { it("should handle menu open/close states and maintain accessibility", async () => { // Test open state element.menuOpen = true; await element.updateComplete; expect(element.menuOpen).to.be.true; expect(element.hasAttribute("menu-open")).to.be.true; await expect(element).shadowDom.to.be.accessible(); // Test closed state element.menuOpen = false; await element.updateComplete; expect(element.menuOpen).to.be.false; expect(element.hasAttribute("menu-open")).to.be.false; await expect(element).shadowDom.to.be.accessible(); }); }); describe("colorTheme property", () => { it("should handle different color themes and maintain accessibility", async () => { const themes = ["0", "1", "2"]; // Light, Dark, Palenight for (const theme of themes) { element.colorTheme = theme; await element.updateComplete; expect(element.colorTheme).to.equal(theme); expect(element.getAttribute("color-theme")).to.equal(theme); await expect(element).shadowDom.to.be.accessible(); } }); it("should apply correct theme styles", async () => { // Test dark theme element.colorTheme = "1"; await element.updateComplete; const computedStyle = globalThis.getComputedStyle(element); // Dark theme should change background color expect(element.getAttribute("color-theme")).to.equal("1"); // Test palenight theme element.colorTheme = "2"; await element.updateComplete; expect(element.getAttribute("color-theme")).to.equal("2"); }); }); describe("searchTerm property", () => { it("should handle search terms and maintain accessibility", async () => { const searchTerms = [ "test search", "complex search query", "special chars: !@#$%", "", ]; for (const term of searchTerms) { element.searchTerm = term; await element.updateComplete; expect(element.searchTerm).to.equal(term); // Search results should be visible when term is not empty const siteSearch = element.shadowRoot.querySelector("site-search"); if (term !== "") { expect(siteSearch.hasAttribute("hidden")).to.be.false; } else { expect(siteSearch.hasAttribute("hidden")).to.be.true; } await expect(element).shadowDom.to.be.accessible(); } }); }); }); describe("Bootstrap integration and styling", () => { it("should load Bootstrap CSS", () => { expect(element._bootstrapPath).to.include("bootstrap.min.css"); const linkElement = element.shadowRoot.querySelector( 'link[rel="stylesheet"]', ); expect(linkElement).to.exist; expect(linkElement.getAttribute("href")).to.include("bootstrap.min.css"); }); it("should load Bootstrap and jQuery scripts", (done) => { let jqueryLoaded = false; let bootstrapLoaded = false; globalThis.addEventListener("es-bridge-jquery-loaded", () => { jqueryLoaded = true; expect(element._jquery).to.be.true; }); globalThis.addEventListener("es-bridge-bootstrap-loaded", () => { bootstrapLoaded = true; expect(element._bootstrap).to.be.true; if (jqueryLoaded && bootstrapLoaded) { done(); } }); // Scripts should be loaded during firstUpdated }); it("should have responsive design classes", async () => { // Test different responsive sizes const responsiveSizes = ["xs", "sm", "md", "lg"]; for (const size of responsiveSizes) { element.setAttribute("responsive-size", size); await element.updateComplete; expect(element.getAttribute("responsive-size")).to.equal(size); await expect(element).shadowDom.to.be.accessible(); } }); }); describe("Search functionality", () => { it("should handle search changed events", async () => { const mockEvent = { detail: { searchText: "test search query", }, }; element.searchChanged(mockEvent); await element.updateComplete; expect(element.searchTerm).to.equal("test search query"); // Content container should be hidden when searching const contentContainer = element.shadowRoot.querySelector("#contentcontainer"); expect(contentContainer.hasAttribute("hidden")).to.be.true; }); it("should clear search when empty", async () => { // Set initial search term element.searchTerm = "initial search"; await element.updateComplete; const mockEvent = { detail: { searchText: "", }, }; element.searchChanged(mockEvent); await element.updateComplete; expect(element.searchTerm).to.equal(""); }); it("should handle search item selection", async () => { // Set search term element.searchTerm = "test search"; await element.updateComplete; element.searchItemSelected({}); await element.updateComplete; expect(element.searchTerm).to.equal(""); }); }); describe("Menu functionality", () => { it("should toggle menu visibility", async () => { // Menu should start open expect(element.menuOpen).to.be.true; expect(element.hasAttribute("menu-open")).to.be.true; // Close menu element.menuOpen = false; await element.updateComplete; expect(element.menuOpen).to.be.false; expect(element.hasAttribute("menu-open")).to.be.false; // Reopen menu element.menuOpen = true; await element.updateComplete; expect(element.menuOpen).to.be.true; expect(element.hasAttribute("menu-open")).to.be.true; }); it("should have mobile menu components", () => { // Should have mobile menu button and navigation const mobileMenuButton = element.shadowRoot.querySelector( "#haxcmsmobilemenubutton", ); const mobileMenuNav = element.shadowRoot.querySelector( "#haxcmsmobilemenunav", ); // These are created by mixins, so check they're referenced in the template const template = element.shadowRoot.innerHTML; expect(template).to.include("HAXCMSMobileMenu"); expect(template).to.include("HAXCMSMobileMenuButton"); }); }); describe("Content and layout", () => { it("should display site title and image", async () => { const siteTitle = element.shadowRoot.querySelector(".site-title h4"); const siteImage = element.shadowRoot.querySelector(".site-img"); expect(siteTitle.textContent).to.equal("Test Site"); expect(siteImage.src).to.equal("https://example.com/author.jpg"); }); it("should display page title", () => { const pageTitle = element.shadowRoot.querySelector(".page-title"); expect(pageTitle.textContent).to.equal("Test Page"); }); it("should have main content slot", () => { const slot = element.shadowRoot.querySelector("slot#main-content"); expect(slot).to.exist; }); it("should hide/show content based on search state", async () => { const contentContainer = element.shadowRoot.querySelector("#contentcontainer"); const siteSearch = element.shadowRoot.querySelector("site-search"); // No search term - content visible, search hidden element.searchTerm = ""; await element.updateComplete; expect(contentContainer.hasAttribute("hidden")).to.be.false; expect(siteSearch.hasAttribute("hidden")).to.be.true; // With search term - content hidden, search visible element.searchTerm = "test"; await element.updateComplete; expect(contentContainer.hasAttribute("hidden")).to.be.true; expect(siteSearch.hasAttribute("hidden")).to.be.false; }); }); describe("Theme parts and mixins", () => { it("should include user styles menu", () => { const template = element.shadowRoot.innerHTML; expect(template).to.include("BootstrapUserStylesMenu"); }); it("should have theme settings", () => { expect(element.HAXCMSThemeSettings).to.exist; expect(element.HAXCMSThemeSettings.autoScroll).to.be.true; }); it("should set scroll target", async () => { // firstUpdated should set the scroll target const siteBody = element.shadowRoot.querySelector(".site-body"); expect(element.HAXCMSThemeSettings.scrollTarget).to.equal(siteBody); }); }); describe("Accessibility scenarios", () => { it("should remain accessible with different color themes", async () => { const themes = ["0", "1", "2"]; for (const theme of themes) { element.colorTheme = theme; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); } }); it("should remain accessible when menu is closed", async () => { element.menuOpen = false; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should remain accessible during search", async () => { element.searchTerm = "accessibility test"; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should have proper ARIA roles and structure", () => { const main = element.shadowRoot.querySelector('main[role="main"]'); const header = element.shadowRoot.querySelector("header"); const footer = element.shadowRoot.querySelector("footer"); expect(main).to.exist; expect(header).to.exist; expect(footer).to.exist; }); it("should maintain focus management", () => { const pageWrapper = element.shadowRoot.querySelector(".page-wrapper"); expect(pageWrapper.getAttribute("tabindex")).to.equal("0"); }); }); describe("Edge cases and error handling", () => { it("should handle missing site image gracefully", async () => { // Update store to have no image globalThis.store.manifest.metadata.author.image = ""; const newElement = await fixture( html``, ); await newElement.updateComplete; const siteImage = newElement.shadowRoot.querySelector(".site-img"); expect(siteImage).to.not.exist; await expect(newElement).shadowDom.to.be.accessible(); }); it("should handle empty site title", async () => { globalThis.store.manifest.title = ""; const newElement = await fixture( html``, ); await newElement.updateComplete; const siteTitle = newElement.shadowRoot.querySelector(".site-title h4"); expect(siteTitle.textContent).to.equal(""); await expect(newElement).shadowDom.to.be.accessible(); }); it("should handle invalid color theme values", async () => { element.colorTheme = "invalid"; await element.updateComplete; expect(element.colorTheme).to.equal("invalid"); expect(element.getAttribute("color-theme")).to.equal("invalid"); await expect(element).shadowDom.to.be.accessible(); }); it("should handle long search terms", async () => { const longSearch = "a".repeat(1000); element.searchTerm = longSearch; await element.updateComplete; expect(element.searchTerm).to.equal(longSearch); await expect(element).shadowDom.to.be.accessible(); }); it("should handle special characters in search", async () => { const specialSearch = ''; element.searchTerm = specialSearch; await element.updateComplete; expect(element.searchTerm).to.equal(specialSearch); await expect(element).shadowDom.to.be.accessible(); }); }); describe("Lifecycle methods", () => { it("should handle constructor properly", () => { const newElement = new element.constructor(); expect(newElement.menuOpen).to.be.true; expect(newElement.colorTheme).to.equal("0"); expect(newElement.searchTerm).to.equal(""); expect(newElement.HAXCMSThemeSettings.autoScroll).to.be.true; }); it("should handle firstUpdated lifecycle", async () => { // firstUpdated should set up scroll target and load scripts expect(element.HAXCMSThemeSettings.scrollTarget).to.exist; expect(globalThis.document.body.style.overflow).to.equal("hidden"); }); it("should handle disconnectedCallback", () => { // Mock the Bootstrap link element._bootstrapLink = globalThis.document.createElement("link"); globalThis.document.head.appendChild(element._bootstrapLink); // Mock disposer functions element.__disposer = [{ dispose: () => {} }]; element.disconnectedCallback(); // Should clean up resources expect(globalThis.document.body.style.overflow).to.equal(""); }); it("should handle updated lifecycle", async () => { let updateCalled = false; const originalUpdated = element.updated.bind(element); element.updated = (changedProperties) => { updateCalled = true; return originalUpdated(changedProperties); }; element.colorTheme = "1"; await element.updateComplete; expect(updateCalled).to.be.true; }); }); describe("Utility methods", () => { it("should get base path correctly", () => { const testUrl = "http://example.com/@haxtheweb/bootstrap-theme/bootstrap-theme.js"; const basePath = element.getBasePath(testUrl); expect(basePath).to.equal("http://example.com/"); }); it("should generate Bootstrap link", () => { const link = element._generateBootstrapLink(); expect(link).to.exist; expect(link.getAttribute("rel")).to.equal("stylesheet"); expect(link.getAttribute("href")).to.include("bootstrap.min.css"); }); it("should remove old Bootstrap link when generating new one", () => { const firstLink = element._generateBootstrapLink(); const secondLink = element._generateBootstrapLink(); expect(firstLink).to.not.equal(secondLink); expect(globalThis.document.head.contains(firstLink)).to.be.false; expect(globalThis.document.head.contains(secondLink)).to.be.true; }); }); describe("Integration scenarios", () => { it("should handle complete theme workflow", async () => { // Start with default state expect(element.menuOpen).to.be.true; expect(element.colorTheme).to.equal("0"); expect(element.searchTerm).to.equal(""); // Change to dark theme element.colorTheme = "1"; await element.updateComplete; // Open search element.searchChanged({ detail: { searchText: "test search" } }); await element.updateComplete; expect(element.searchTerm).to.equal("test search"); // Close menu element.menuOpen = false; await element.updateComplete; // Clear search element.searchItemSelected({}); await element.updateComplete; expect(element.searchTerm).to.equal(""); expect(element.menuOpen).to.be.false; expect(element.colorTheme).to.equal("1"); await expect(element).shadowDom.to.be.accessible(); }); it("should work with different responsive sizes", async () => { const sizes = ["xs", "sm", "md", "lg", "xl"]; for (const size of sizes) { element.setAttribute("responsive-size", size); await element.updateComplete; // Menu and content should adapt to size expect(element.getAttribute("responsive-size")).to.equal(size); await expect(element).shadowDom.to.be.accessible(); } }); }); describe("Performance considerations", () => { it("should handle rapid property changes efficiently", async () => { const startTime = performance.now(); // Rapid changes for (let i = 0; i < 10; i++) { element.colorTheme = (i % 3).toString(); element.menuOpen = i % 2 === 0; element.searchTerm = i % 2 === 0 ? `search ${i}` : ""; await element.updateComplete; } const endTime = performance.now(); const totalTime = endTime - startTime; expect(totalTime).to.be.lessThan(1000); expect(element.colorTheme).to.equal("1"); // (9 % 3).toString() }); it("should cleanup resources on disconnect", () => { // Set up resources to be cleaned element._bootstrapLink = globalThis.document.createElement("link"); globalThis.document.head.appendChild(element._bootstrapLink); element.__disposer = [{ dispose: () => {} }]; const linkCount = globalThis.document.head.querySelectorAll("link").length; element.disconnectedCallback(); const newLinkCount = globalThis.document.head.querySelectorAll("link").length; expect(newLinkCount).to.be.lessThan(linkCount); }); }); }); ================================================ FILE: elements/chartist-render/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/chartist-render/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/chartist-render/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/chartist-render/.npmignore ================================================ node_modules ================================================ FILE: elements/chartist-render/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/chartist-render/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/chartist-render/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/chartist-render/README.md ================================================ # <chartist-render> Render > Chartist render wrapper ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing module / web component */ import '@haxtheweb/chartist-render/chartist-render.js'; ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Render ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/chartist-render/chartist-render.js ================================================ /** * Copyright 2019 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; import { generateResourceID } from "@haxtheweb/utils/utils.js"; import "@haxtheweb/es-global-bridge/es-global-bridge.js"; const ChartistRenderSuper = function (SuperClass) { return class extends SuperClass { //styles function static get styles() { return [ css` .ct-label { fill: rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 0.4); font-size: 0.75rem; line-height: 1; } .ct-chart-line .ct-label, .ct-chart-bar .ct-label { display: block; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; } .ct-chart-pie .ct-label, .ct-chart-donut .ct-label { dominant-baseline: central; } .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-label.ct-vertical.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-end; -webkit-justify-content: flex-end; -ms-flex-pack: flex-end; justify-content: flex-end; text-align: right; text-anchor: end; } .ct-label.ct-vertical.ct-end { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-chart-bar .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; text-anchor: start; } .ct-chart-bar .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; text-anchor: start; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: flex-end; -webkit-justify-content: flex-end; -ms-flex-pack: flex-end; justify-content: flex-end; text-align: right; text-anchor: end; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: end; } .ct-grid { stroke: rgba(0, 0, 0, 0.2); stroke-width: 1px; stroke-dasharray: 2px; } .ct-grid-background { fill: none; } .ct-point { stroke-width: 10px; stroke-linecap: round; } .ct-line { fill: none; stroke-width: 4px; } .ct-area { stroke: none; fill-opacity: 0.1; } .ct-bar { fill: none; stroke-width: 10px; } .ct-slice-donut { fill: none; stroke-width: 60px; } .ct-series-a .ct-point, .ct-series-a .ct-line, .ct-series-a .ct-bar, .ct-series-a .ct-slice-donut { stroke: #d70206; } .ct-series-a .ct-slice-pie, .ct-series-a .ct-slice-donut-solid, .ct-series-a .ct-area { fill: #d70206; } .ct-series-b .ct-point, .ct-series-b .ct-line, .ct-series-b .ct-bar, .ct-series-b .ct-slice-donut { stroke: #f05b4f; } .ct-series-b .ct-slice-pie, .ct-series-b .ct-slice-donut-solid, .ct-series-b .ct-area { fill: #f05b4f; } .ct-series-c .ct-point, .ct-series-c .ct-line, .ct-series-c .ct-bar, .ct-series-c .ct-slice-donut { stroke: #f4c63d; } .ct-series-c .ct-slice-pie, .ct-series-c .ct-slice-donut-solid, .ct-series-c .ct-area { fill: #f4c63d; } .ct-series-d .ct-point, .ct-series-d .ct-line, .ct-series-d .ct-bar, .ct-series-d .ct-slice-donut { stroke: #d17905; } .ct-series-d .ct-slice-pie, .ct-series-d .ct-slice-donut-solid, .ct-series-d .ct-area { fill: #d17905; } .ct-series-e .ct-point, .ct-series-e .ct-line, .ct-series-e .ct-bar, .ct-series-e .ct-slice-donut { stroke: #453d3f; } .ct-series-e .ct-slice-pie, .ct-series-e .ct-slice-donut-solid, .ct-series-e .ct-area { fill: #453d3f; } .ct-series-f .ct-point, .ct-series-f .ct-line, .ct-series-f .ct-bar, .ct-series-f .ct-slice-donut { stroke: #59922b; } .ct-series-f .ct-slice-pie, .ct-series-f .ct-slice-donut-solid, .ct-series-f .ct-area { fill: #59922b; } .ct-series-g .ct-point, .ct-series-g .ct-line, .ct-series-g .ct-bar, .ct-series-g .ct-slice-donut { stroke: #0544d3; } .ct-series-g .ct-slice-pie, .ct-series-g .ct-slice-donut-solid, .ct-series-g .ct-area { fill: #0544d3; } .ct-series-h .ct-point, .ct-series-h .ct-line, .ct-series-h .ct-bar, .ct-series-h .ct-slice-donut { stroke: #6b0392; } .ct-series-h .ct-slice-pie, .ct-series-h .ct-slice-donut-solid, .ct-series-h .ct-area { fill: #6b0392; } .ct-series-i .ct-point, .ct-series-i .ct-line, .ct-series-i .ct-bar, .ct-series-i .ct-slice-donut { stroke: #f05b4f; } .ct-series-i .ct-slice-pie, .ct-series-i .ct-slice-donut-solid, .ct-series-i .ct-area { fill: #f05b4f; } .ct-series-j .ct-point, .ct-series-j .ct-line, .ct-series-j .ct-bar, .ct-series-j .ct-slice-donut { stroke: #dda458; } .ct-series-j .ct-slice-pie, .ct-series-j .ct-slice-donut-solid, .ct-series-j .ct-area { fill: #dda458; } .ct-series-k .ct-point, .ct-series-k .ct-line, .ct-series-k .ct-bar, .ct-series-k .ct-slice-donut { stroke: #eacf7d; } .ct-series-k .ct-slice-pie, .ct-series-k .ct-slice-donut-solid, .ct-series-k .ct-area { fill: #eacf7d; } .ct-series-l .ct-point, .ct-series-l .ct-line, .ct-series-l .ct-bar, .ct-series-l .ct-slice-donut { stroke: #86797d; } .ct-series-l .ct-slice-pie, .ct-series-l .ct-slice-donut-solid, .ct-series-l .ct-area { fill: #86797d; } .ct-series-m .ct-point, .ct-series-m .ct-line, .ct-series-m .ct-bar, .ct-series-m .ct-slice-donut { stroke: #b2c326; } .ct-series-m .ct-slice-pie, .ct-series-m .ct-slice-donut-solid, .ct-series-m .ct-area { fill: #b2c326; } .ct-series-n .ct-point, .ct-series-n .ct-line, .ct-series-n .ct-bar, .ct-series-n .ct-slice-donut { stroke: #6188e2; } .ct-series-n .ct-slice-pie, .ct-series-n .ct-slice-donut-solid, .ct-series-n .ct-area { fill: #6188e2; } .ct-series-o .ct-point, .ct-series-o .ct-line, .ct-series-o .ct-bar, .ct-series-o .ct-slice-donut { stroke: #a748ca; } .ct-series-o .ct-slice-pie, .ct-series-o .ct-slice-donut-solid, .ct-series-o .ct-area { fill: #a748ca; } .ct-square { display: block; position: relative; width: 100%; } .ct-square:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 100%; } .ct-square:after { content: ""; display: table; clear: both; } .ct-square > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-second { display: block; position: relative; width: 100%; } .ct-minor-second:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 93.75%; } .ct-minor-second:after { content: ""; display: table; clear: both; } .ct-minor-second > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-second { display: block; position: relative; width: 100%; } .ct-major-second:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 88.88889%; } .ct-major-second:after { content: ""; display: table; clear: both; } .ct-major-second > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-third { display: block; position: relative; width: 100%; } .ct-minor-third:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 83.33333%; } .ct-minor-third:after { content: ""; display: table; clear: both; } .ct-minor-third > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-third { display: block; position: relative; width: 100%; } .ct-major-third:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 80%; } .ct-major-third:after { content: ""; display: table; clear: both; } .ct-major-third > svg { display: block; position: absolute; top: 0; left: 0; } .ct-perfect-fourth { display: block; position: relative; width: 100%; } .ct-perfect-fourth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 75%; } .ct-perfect-fourth:after { content: ""; display: table; clear: both; } .ct-perfect-fourth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-perfect-fifth { display: block; position: relative; width: 100%; } .ct-perfect-fifth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 66.66667%; } .ct-perfect-fifth:after { content: ""; display: table; clear: both; } .ct-perfect-fifth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-sixth { display: block; position: relative; width: 100%; } .ct-minor-sixth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 62.5%; } .ct-minor-sixth:after { content: ""; display: table; clear: both; } .ct-minor-sixth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-golden-section { display: block; position: relative; width: 100%; } .ct-golden-section:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 61.8047%; } .ct-golden-section:after { content: ""; display: table; clear: both; } .ct-golden-section > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-sixth { display: block; position: relative; width: 100%; } .ct-major-sixth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 60%; } .ct-major-sixth:after { content: ""; display: table; clear: both; } .ct-major-sixth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-seventh { display: block; position: relative; width: 100%; } .ct-minor-seventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 56.25%; } .ct-minor-seventh:after { content: ""; display: table; clear: both; } .ct-minor-seventh > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-seventh { display: block; position: relative; width: 100%; } .ct-major-seventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 53.33333%; } .ct-major-seventh:after { content: ""; display: table; clear: both; } .ct-major-seventh > svg { display: block; position: absolute; top: 0; left: 0; } .ct-octave { display: block; position: relative; width: 100%; } .ct-octave:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 50%; } .ct-octave:after { content: ""; display: table; clear: both; } .ct-octave > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-tenth { display: block; position: relative; width: 100%; } .ct-major-tenth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 40%; } .ct-major-tenth:after { content: ""; display: table; clear: both; } .ct-major-tenth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-eleventh { display: block; position: relative; width: 100%; } .ct-major-eleventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 37.5%; } .ct-major-eleventh:after { content: ""; display: table; clear: both; } .ct-major-eleventh > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-twelfth { display: block; position: relative; width: 100%; } .ct-major-twelfth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 33.33333%; } .ct-major-twelfth:after { content: ""; display: table; clear: both; } .ct-major-twelfth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-double-octave { display: block; position: relative; width: 100%; } .ct-double-octave:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 25%; } .ct-double-octave:after { content: ""; display: table; clear: both; } .ct-double-octave > svg { display: block; position: absolute; top: 0; left: 0; } :host { display: block; width: 100%; padding: var(--chartist-padding, 0px); margin: var(--chartist-margin, 15px 0); background-color: var(--chartist-bg-color, transparent); color: var(--chartist-text-color, #000); } .sr-only { position: absolute; left: -999999px; height: 0; overflow: hidden; } .ct-axis-title { fill: var(--chartist-text-color); } ::slotted(table) { border: 1px solid var(--chartist-text-color); border-collapse: collapse; width: 100%; max-width: 100%; overflow: auto; } .ct-label { fill: var(--chartist-text-color, #000); color: var(--chartist-text-color, #000); font-size: var(--chartist-text-size, 0.75rem); line-height: var(--chartist-line-height, 1); } .ct-grid { stroke: var(--chartist-grid-color, rgba(0, 0, 0, 0.2)); stroke-width: 1px; stroke-dasharray: 2px; } .ct-series-a .ct-point, .ct-series-a .ct-line, .ct-series-a .ct-bar, .ct-series-a .ct-slice-donut { stroke: var(--chartist-color-1, #d70206); } .ct-series-a .ct-slice-pie, .ct-series-a .ct-slice-donut-solid, .ct-series-a .ct-area { fill: var(--chartist-color-1, #d70206); } .ct-series-b .ct-point, .ct-series-b .ct-line, .ct-series-b .ct-bar, .ct-series-b .ct-slice-donut { stroke: var(--chartist-color-2, #f05b4f); } .ct-series-b .ct-slice-pie, .ct-series-b .ct-slice-donut-solid, .ct-series-b .ct-area { fill: var(--chartist-color-2, #f05b4f); } .ct-series-c .ct-point, .ct-series-c .ct-line, .ct-series-c .ct-bar, .ct-series-c .ct-slice-donut { stroke: var(--chartist-color-3, #f4c63d); } .ct-series-c .ct-slice-pie, .ct-series-c .ct-slice-donut-solid, .ct-series-c .ct-area { fill: var(--chartist-color-3, #f4c63d); } .ct-series-d .ct-point, .ct-series-d .ct-line, .ct-series-d .ct-bar, .ct-series-d .ct-slice-donut { stroke: var(--chartist-color-4, #d17905); } .ct-series-d .ct-slice-pie, .ct-series-d .ct-slice-donut-solid, .ct-series-d .ct-area { fill: var(--chartist-color-4, #d17905); } .ct-series-e .ct-point, .ct-series-e .ct-line, .ct-series-e .ct-bar, .ct-series-e .ct-slice-donut { stroke: var(--chartist-color-5, #453d3f); } .ct-series-e .ct-slice-pie, .ct-series-e .ct-slice-donut-solid, .ct-series-e .ct-area { fill: var(--chartist-color-5, #453d3f); } .ct-series-f .ct-point, .ct-series-f .ct-line, .ct-series-f .ct-bar, .ct-series-f .ct-slice-donut { stroke: var(--chartist-color-6, #59922b); } .ct-series-f .ct-slice-pie, .ct-series-f .ct-slice-donut-solid, .ct-series-f .ct-area { fill: var(--chartist-color-6, #59922b); } .ct-series-g .ct-point, .ct-series-g .ct-line, .ct-series-g .ct-bar, .ct-series-g .ct-slice-donut { stroke: var(--chartist-color-7, #0544d3); } .ct-series-g .ct-slice-pie, .ct-series-g .ct-slice-donut-solid, .ct-series-g .ct-area { fill: var(--chartist-color-7, #0544d3); } .ct-series-h .ct-point, .ct-series-h .ct-line, .ct-series-h .ct-bar, .ct-series-h .ct-slice-donut { stroke: var(--chartist-color-8, #6b0392); } .ct-series-h .ct-slice-pie, .ct-series-h .ct-slice-donut-solid, .ct-series-h .ct-area { fill: var(--chartist-color-8, #6b0392); } .ct-series-i .ct-point, .ct-series-i .ct-line, .ct-series-i .ct-bar, .ct-series-i .ct-slice-donut { stroke: var(--chartist-color-9, #f05b4f); } .ct-series-i .ct-slice-pie, .ct-series-i .ct-slice-donut-solid, .ct-series-i .ct-area { fill: var(--chartist-color-9, #f05b4f); } .ct-series-j .ct-point, .ct-series-j .ct-line, .ct-series-j .ct-bar, .ct-series-j .ct-slice-donut { stroke: var(--chartist-color-10, #dda458); } .ct-series-j .ct-slice-pie, .ct-series-j .ct-slice-donut-solid, .ct-series-j .ct-area { fill: var(--chartist-color-10, #dda458); } .ct-series-k .ct-point, .ct-series-k .ct-line, .ct-series-k .ct-bar, .ct-series-k .ct-slice-donut { stroke: var(--chartist-color-11, #eacf7d); } .ct-series-k .ct-slice-pie, .ct-series-k .ct-slice-donut-solid, .ct-series-k .ct-area { fill: var(--chartist-color-11, #eacf7d); } .ct-series-l .ct-point, .ct-series-l .ct-line, .ct-series-l .ct-bar, .ct-series-l .ct-slice-donut { stroke: var(--chartist-color-12, #86797d); } .ct-series-l .ct-slice-pie, .ct-series-l .ct-slice-donut-solid, .ct-series-l .ct-area { fill: var(--chartist-color-12, #86797d); } .ct-series-m .ct-point, .ct-series-m .ct-line, .ct-series-m .ct-bar, .ct-series-m .ct-slice-donut { stroke: var(--chartist-color-13, #b2c326); } .ct-series-m .ct-slice-pie, .ct-series-m .ct-slice-donut-solid, .ct-series-m .ct-area { fill: var(--chartist-color-13, #b2c326); } .ct-series-n .ct-point, .ct-series-n .ct-line, .ct-series-n .ct-bar, .ct-series-n .ct-slice-donut { stroke: var(--chartist-color-14, #6188e2); } .ct-series-n .ct-slice-pie, .ct-series-n .ct-slice-donut-solid, .ct-series-n .ct-area { fill: var(--chartist-color-14, #6188e2); } .ct-series-o .ct-point, .ct-series-o .ct-line, .ct-series-o .ct-bar, .ct-series-o .ct-slice-donut { stroke: var(--chartist-color-15, #a748ca); } .ct-series-o .ct-slice-pie, .ct-series-o .ct-slice-donut-solid, .ct-series-o .ct-area { fill: var(--chartist-color-15, #a748ca); } `, ]; } // render function render() { return html`
    ${this.chartTitle}
    ${this.chartDesc}
    `; } // properties available to the custom element for data binding static get properties() { return { ...super.properties, /** * DEPRECATED: Use heading slot instead for progressive enhancement. */ chartTitle: { type: String, attribute: "chart-title", }, /** * Raw data pulled in from the csv file and converted to an array. */ chartData: { type: Array, attribute: "chart-data", }, /** * DEPRECATED: Use desc slot instead for progressive enhancement. */ chartDesc: { type: String, attribute: "chart-desc", }, /** * Use an accessible table in unnamed slot for maxium accessibility and SEO. * As table: * * ... * ...... *
    label 1
    1
    * * DEPRECATED Method: * { * labels: ["label 1", "label 2", "label 3"] * series: [ * [1,2,3], * [4,5,6] * ] * } */ data: { type: Object, attribute: "data", }, /** * Location of the CSV file. */ dataSource: { type: String, attribute: "data-source", reflect: true, }, /** * The unique identifier of the chart. */ id: { type: String, }, /** * The options available at https://gionkunz.github.io/chartist-js/api-documentation.html. */ options: { type: Object, }, /** * Optional data for chartist-plugin-axistitle, * as in { axisX: { axisTitle: "Time (mins)", offset: { x: 0, y: 50 }, textAnchor: "middle" }, axisY: { axisTitle: "Goals", axisClass: "ct-axis-title", offset: { x: 0, y: -1 }, flipTitle: false } } * See https://github.com/alexstanbury/chartist-plugin-axistitle */ pluginAxisTitle: { type: Object, }, /** * Optional data for chartist-plugin-pointlabels, * as in { labelOffset: { x: 0, y: -10 }, textAnchor: 'middle', labelInterpolationFnc: Chartist.noop } * See https://github.com/gionkunz/chartist-plugin-pointlabels */ pluginPointLabels: { type: Object, }, /** * Optional array of items for chartist-plugin-filldonut, * as in items : [{ class : '', id: '', content : 'fillText', position: 'center', offsetY: 0, offsetX: 0 }] * See https://github.com/moxx/chartist-plugin-fill-donut */ pluginFillDonutItems: { type: Array, }, /** * The responsive options. From https://gionkunz.github.io/chartist-js/api-documentation.html: In addition to the regular options we specify responsive option overrides that will override the default configutation based on the matching media queries. `var responsiveOptions = [ ['screen and (min-width: 641px) and (max-width: 1024px)', { showPoint: false, axisX: { labelInterpolationFnc: function(value) { // Will return Mon, Tue, Wed etc. on medium screens return value.slice(0, 3); } } }], ['screen and (max-width: 640px)', { showLine: false, axisX: { labelInterpolationFnc: function(value) { // Will return M, T, W etc. on small screens return value[0]; } } }] ];` */ responsiveOptions: { type: Array, attribute: "responsive-options", }, /** * The scale of the chart. (See https://gionkunz.github.io/chartist-js/api-documentation.html)``` Container class Ratio .ct-square 1 .ct-minor-second 15:16 .ct-major-second 8:9 .ct-minor-third 5:6 .ct-major-third 4:5 .ct-perfect-fourth 3:4 .ct-perfect-fifth 2:3 .ct-minor-sixth 5:8 .ct-golden-section 1:1.618 .ct-major-sixth 3:5 .ct-minor-seventh 9:16 .ct-major-seventh 8:15 .ct-octave 1:2 .ct-major-tenth 2:5 .ct-major-eleventh 3:8 .ct-major-twelfth 1:3 .ct-double-octave 1:4``` */ scale: { type: String, }, /** * The show data in table form as well? Default is false. */ showTable: { type: Boolean, attribute: "show-table", }, /** * The type of chart:bar, line, or pie */ type: { type: String, }, }; } constructor() { super(); this.windowControllers = new AbortController(); this.id = "chart"; this.type = "bar"; this.scale = "ct-minor-seventh"; this.responsiveOptions = []; this.data = []; this.dataSource = ""; this.showTable = false; this.__chartId = generateResourceID("chart-"); globalThis.ESGlobalBridge.requestAvailability(); this._loadScripts( "chartistLib", "lib/chartist/dist/chartist.min.js", this._chartistLoaded, ); this._updateData(); this.observer.observe(this, { attributes: false, childList: true, subtree: true, }); /** * Fired once once chart is ready. * * @event chartist-render-ready * */ this.dispatchEvent( new CustomEvent("chartist-render-ready", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); if (typeof Chartist === "object") this._chartistLoaded.bind(this); } /** * Store the tag name to make it easier to obtain directly. * @notice function name must be here for tooling to operate correctly */ static get tag() { return "chartist-render"; } /** * an array of plugins to load as [ [classname, relativePath] ] * * @readonly */ get plugins() { return [ [ "Chartist.plugins.ctAxisTitle", "lib/chartist-plugin-axistitle/dist/chartist-plugin-axistitle.min.js", ], [ "Chartist.plugins.CtPointLabels", "lib/chartist-plugin-pointlabels/dist/chartist-plugin-pointlabels.min.js", ], [ "Chartist.plugins.fillDonut", "lib/chartist-plugin-fill-donut/dist/chartist-plugin-fill-donut.min.js", ], ]; } /** * mutation observer for table * @readonly * @returns {object} */ get observer() { let callback = (mutationsList, observer) => this._updateData(mutationsList, observer); return new MutationObserver(callback); } updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { if ( propName === "chartData" && JSON.stringify(this.chartData) !== JSON.stringify(oldValue) ) { /** * Fires when chartData changes * @event chart-data-changed */ this.dispatchEvent( new CustomEvent("chart-data-changed", { detail: this, }), ); this._getChart(); } else if (propName === "dataSource" && this.dataSource !== oldValue) { /** * Fires when data-source changes * @event data-source-changed */ this.dispatchEvent( new CustomEvent("data-source-changed", { detail: this, }), ); if (this.dataSource !== "") fetch(this.dataSource) .then((response) => response.text()) .then((data) => (this.data = this._CSVtoArray(data))); } else if ( propName === "data" && JSON.stringify(this.data) !== JSON.stringify(oldValue) ) { /** * Fires when data changes * @event data-changed */ this.dispatchEvent( new CustomEvent("data-changed", { detail: this, }), ); this._renderTable(); this._updateChartData(); } else { this._getChart(); } }); } /** * Makes chart and returns the chart object. * @memberof ChartistRender */ makeChart() { this._getChart(); return this.chart; } disconnectedCallback() { this.windowControllers.abort(); if (this.observer && this.observer.disconnect) this.observer.disconnect(); super.disconnectedCallback(); } /** * determines if Chartist is ready */ _chartistLoaded() { this.__chartistLoaded = true; this._getChart(); this.plugins.forEach((plugin) => this._loadScripts(plugin[0], plugin[1])); } /** * Mix of solutions from https://stackoverflow.com/questions/8493195/how-can-i-parse-a-csv-string-with-javascript-which-contains-comma-in-data * @param {string} text csv * @returns {array} chart raw data */ _CSVtoArray(text) { let p = "", row = [""], ret = [row], i = 0, r = 0, s = !0, l; for (l in text) { l = text[l]; if ('"' === l) { if (s && l === p) row[i] += l; s = !s; } else if ("," === l && s) { if (row[i].trim().match(/^\d+$/m) !== null) row[i] = parseInt(row[i].trim()); l = row[++i] = ""; } else if ("\n" === l && s) { if ("\r" === p) row[i] = row[i].slice(0, -1); if (row[i].trim().match(/^\d+$/m) !== null) row[i] = parseInt(row[i].trim()); row = ret[++r] = [(l = "")]; i = 0; } else row[i] += l; p = l; } if (row[i].trim().match(/^\d+$/m) !== null) row[i] = parseInt(row[i].trim()); return ret; } /** * Get unique ID from the chart * @param {string} prefix for unique ID * @returns {string} unique ID */ _getUniqueId(prefix) { let id = prefix + Date.now(); return id; } /** * gets options plus plugins * @readonly */ get fullOptions() { let options = { ...this.options }; if (Chartist.plugins) { options.plugins = []; if ( this.type !== "pie" && this.pluginAxisTitle && Chartist.plugins.ctAxisTitle ) { options.plugins.push( Chartist.plugins.ctAxisTitle(this.pluginAxisTitle), ); } if ( this.type === "line" && this.pluginPointLabels && Chartist.plugins.ctPointLabels ) { if (!this.pluginPointLabels.labelInterpolationFnc) this.pluginPointLabels.labelInterpolationFnc = Chartist.noop; options.plugins.push( Chartist.plugins.ctPointLabels(this.pluginPointLabels), ); } if ( this.type === "pie" && options.donut && this.pluginFillDonutItems && Chartist.plugins.fillDonut ) { options.plugins.push( Chartist.plugins.fillDonut({ items: this.pluginFillDonutItems }), ); } } return options; } /** * Renders chart when chartData changes */ _getChart() { let chart = null, target = this.shadowRoot ? this.shadowRoot.querySelector("#chart") : undefined; if (!!target && typeof Chartist === "object" && this.chartData) { if (this.type == "bar") { if ( this.responsiveOptions !== undefined && this.responsiveOptions.length > 0 ) { this.responsiveOptions.forEach((option) => { if (option[1] !== undefined) { if ( option[1].axisX && option[1].axisX.labelInterpolationFnc == "noop" ) option[1].axisX.labelInterpolationFnc = Chartist.noop; if ( option[1].axisY && option[1].axisY.labelInterpolationFnc == "noop" ) option[1].axisY.labelInterpolationFnc = Chartist.noop; } }); } chart = Chartist.Bar( target, this.chartData, this.fullOptions, this.responsiveOptions, ); } else if (this.type === "line") { chart = Chartist.Line( target, this.chartData, this.fullOptions, this.responsiveOptions, ); } else if (this.type === "pie") { chart = Chartist.Pie( target, { labels: this.chartData.labels || [], series: this.chartData.series || [], }, this.fullOptions, this.responsiveOptions, ); } /** * Fired when chart is rendering. * * @event chartist-render-data * */ this.dispatchEvent( new CustomEvent("chartist-render-data", { bubbles: true, cancelable: true, composed: true, detail: chart, }), ); if (chart) { chart.on("created", (e) => { /** * Fired once chart is created features are added. * * @event chartist-render-created * */ this.dispatchEvent( new CustomEvent("chartist-render-created", { bubbles: true, cancelable: true, composed: true, detail: e, }), ); }); chart.on("draw", (e) => { /** * Fired as shapes are being drawn. * * @event chartist-render-draw * */ this.dispatchEvent( new CustomEvent("chartist-render-draw", { bubbles: true, cancelable: true, composed: true, detail: e, }), ); }); this.chart = chart; } } } /** * uses ESGlobalBridge to load scripts * * @param {string} classname class to import from script * @param {string} path relative path of script * @param {function} [fnc=this._updateData] function to rerun when script is loaded */ _loadScripts(classname, path, fnc = this._getChart) { let basePath = new URL("./chartist-render.js", import.meta.url).href + "/../"; let location = `${basePath}${path}`; globalThis.addEventListener( `es-bridge-${classname}-loaded`, fnc.bind(this), { signal: this.windowControllers.signal, }, ); globalThis.ESGlobalBridge.requestAvailability().load(classname, location); } /** * updates table when data changes * @memberof ChartistRender */ _renderTable() { let html = "", table = this.querySelector("table"), data = this.data; // ? [this.data.labels, this.data.series] : false; if (data) { let rowHeads = data[1] && data[1][0] && isNaN(data[1][0]), colHeads = data[0] && data[0][rowHeads ? 1 : 0] && isNaN(data[0][rowHeads ? 1 : 0]), thead = !colHeads ? undefined : { row: rowHeads ? data[0][0] : undefined, col: rowHeads ? data[0].slice(1, data[0].length) : data[0], }, tbody = data.series ? data.series : data .slice(thead ? 1 : 0, data.length) .map((row) => rowHeads ? { th: row[0], td: row.slice(1, row.length) } : { td: row }, ); if (!thead && data.labels) { thead = data.labels; } table = table || globalThis.document.createElement("table"); if (thead) html += ` ${thead.row ? `${thead.row}` : ``} ${ thead.col ? thead.col.map((th) => `${th}`).join("") : `` } `; if (tbody.length > 0) html += ` ${tbody .map( (tr) => ` ${tr.th ? `${tr.th}` : ``} ${tr.td ? tr.td.map((td) => `${td}`).join("") : ``} `, ) .join("")} `; table.innerHTML = html; this.appendChild(table); } else if (table) { table.innerHTML = ""; } } /** * updates chartData from data * */ _updateChartData() { let data = this.data, rowHeads = data && data[1] && data[1][0] && isNaN(data[1][0]), colHeads = data && data[0] && data[0][rowHeads ? 1 : 0] && isNaN(data[0][rowHeads ? 1 : 0]), labels = colHeads ? data[0] : undefined, body = colHeads && data[1] ? data.slice(1, data.length) : data; if (rowHeads) { labels = labels.slice(1, labels.length); body = body.map((row) => row.slice(1, row.length)); } this.__dataReady = true; this.chartData = { labels: labels, series: this.type === "pie" ? body[0] : body, }; } /** * Updates data from table */ _updateData(mutationsList, observer) { let table = this.querySelector("table"), data = []; if (table) table.querySelectorAll("tr").forEach((tr) => { let temp = []; tr.querySelectorAll("th,td").forEach((td) => { let html = td.innerHTML.trim(); temp.push(isNaN(html) ? html : parseInt(html)); }); data.push(temp); }); if (JSON.stringify(this.data) !== JSON.stringify(data)) this.data = data; } }; }; /** * @element chartist-render * @extends SchemaBehaviors * @demo ./demo/index.html * @demo ./demo/csv.html CSV Loading * * `chartist-render` * uses chartist library to render a chart * ### Styling `` provides the following custom properties for styling: Custom property | Description | Default ----------------|-------------|---------- `--chartist-bg-padding` | padding inside chartist-render | 0px `--chartist-bg-margin` | margin chartist chartist-render | 15px 0 `--chartist-text-color` | default label color for charts | #000 `--chartist-bg-color` | default label color for charts | #000 `--chartist-text-color` | default label color for charts | #000 `--chartist-color-a` | background color for 1st series | #d70206 `--chartist-color-label-a` | color for 1st series label | `--chartist-label-color` `--chartist-color-b` | background color for 2nd series | #f05b4f `--chartist-color-label-b` | color for 2nd series label | `--chartist-label-color` `--chartist-color-c` | background color for 3rd series | #f4c63d `--chartist-color-label-c` | color for 3rd series label | `--chartist-label-color` `--chartist-color-d` | background color for 4th series | #d17905 `--chartist-color-label-d` | color for 4th series label | `--chartist-label-color` `--chartist-color-e` | background color for 5th series | #453d3f `--chartist-color-label-e` | color for 5th series label | `--chartist-label-color` `--chartist-color-f` | background color for 6th series | #59922b `--chartist-color-label-f` | color for 6th series label | `--chartist-label-color` `--chartist-color-g` | background color for 7th series | #0544d3 `--chartist-color-label-g` | color for 7th series label | `--chartist-label-color` `--chartist-color-h` | background color for 8th series | #6b0392 `--chartist-color-label-h` | color for 8th series label | `--chartist-label-color` `--chartist-color-i` | background color for 9th series | #f05b4f `--chartist-color-label-i` | color for 9th series label | `--chartist-label-color` `--chartist-color-j` | background color for 10th series | #dda458 `--chartist-color-label-j` | color for 10th series label | `--chartist-label-color` `--chartist-color-k` | background color for 11th series | #eacf7d `--chartist-color-label-k` | color for 11th series label | `--chartist-label-color` `--chartist-color-l` | background color for 12th series | #86797d `--chartist-color-label-l` | color for 12th series label | `--chartist-label-color` `--chartist-color-m` | background color for 13th series | #b2c326 `--chartist-color-label-m` | color for 13th series label | `--chartist-label-color` `--chartist-color-n` | background color for 14th series | #6188e2 `--chartist-color-label-n` | color for 15th series label | `--chartist-label-color` `--chartist-color-0` | background color for 15th series | #a748ca `--chartist-color-label-o` | color for 15th series label | `--chartist-label-color` */ class ChartistRender extends ChartistRenderSuper(LitElement) {} globalThis.customElements.define(ChartistRender.tag, ChartistRender); export { ChartistRender, ChartistRenderSuper }; ================================================ FILE: elements/chartist-render/demo/bar.csv ================================================ Quarter,Quarter 1,Quarter 2,Quarter 3,Quarter 4 Northeast,5,4,3,7 Midaltantic,3,2,9,5 Southeast,1,5,8,4 Midwest,2,3,4,6 West,4,1,2,1 ================================================ FILE: elements/chartist-render/demo/csv.html ================================================ ChartistRender: chartist-render from CSV Demo

    chartist-render from CSV demo

    Pie chart from CSV

    Line chart from CSV

    Bar chart from CSV

    ================================================ FILE: elements/chartist-render/demo/donut.csv ================================================ Boston Cream, Chocolate, Glazed 10, 24, 28 ================================================ FILE: elements/chartist-render/demo/index.html ================================================ LrndesignChart: lrndesign-chart Demo

    Basic chartist-render demo

    Basic charts using progressive enhancement. See chartist-render from CSV demo to load data from a CSV.absolute

    Basic pie chart

    Basic donut chart

    Line chart with options and scale set

    Bar chart with dynamically added options and data

    ================================================ FILE: elements/chartist-render/demo/line.csv ================================================ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 5, 5, 10, 8, 7, 5, 4, null, null, null, 10, 10, 7, 8, 6, 9 10, 15, null, 12, null, 10, 12, 15, null, null, 12, null, 14, null, null, null null, null, null, null, 3, 4, 1, 3, 4, 6, 7, 9, 5, null, null, null ================================================ FILE: elements/chartist-render/demo/pie.csv ================================================ Bananas,Apples,Grapes 20,15,40 ================================================ FILE: elements/chartist-render/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/chartist-render/index.html ================================================ chartist-render documentation ================================================ FILE: elements/chartist-render/lib/chartist/CHANGELOG.md ================================================ v0.11.0 - 11 Apr 2017 - Added CSP compatibility by using CSSOM instead of style attributes (Francisco Silva) - Added feature to render pie / donut chart as solid shape, allowing outlines (Sergey Kovalyov, Chris Carson) - Fixed XMLNS for foreignObjet content (Alfredo Matos) v0.10.0 - 23 Oct 2016 --------------------- - Added dominant-baseline styles for pie and donut charts (Gion Kunz) - Added public getNode on SVG api (Gion Kunz) - Added support for bar charts to have auto narrowing on AutoScaleAxis by overriding referenceValue (Jonathan Dumaine) - Added amdModuleId for better integration into webpack (Chris) - Added grid background to line and bar chart (hansmaad) - Added new LTS node version and included NPM run scripts (Gion Kunz) - Added correct meta data emission in events (Gion Kunz) - Fixed rounding issues where raw value was added instead of rounded (Gion Kunz) - Fixed step axis issue with axis stretch and series count 0 (Gion Kunz) - Fixed label position of single series pie / donut charts to be centered (Gion Kunz) - Fixed order or drawing pie and donut slices (Gion Kunz) - Fixed calculations of stepLength to only stretch ticksLength if > 1 (Alexander van Eck) - Fixed better handling of axisOptions.position and fallback to 'end' position (Alexander van Eck) - Fixed handling of holes in interpolation for multi-value series (James Watmuff) - Fixed function StepAxis() returning NaN (Joao Milton) - Fixed NaN issues in SVG when rendering Pie chart with only 0s (Alexander van Eck) - Fixed infinite loop in getBounds with a more robust increment (hansmaad) - Fixed performance of Chartist.extend (cheese83) - Fixed license reference issues in package.json (Jacob Quant) - Cleanup of data normalization changes and allows Date objects and booleans as values (Gion Kunz) - Cleanup refactoring for data management and normalization (Gion Kunz) v0.9.8 - 22 Jun 2016 -------------------- - Added monotone cubic interpolation which is now the default interpolation for line charts (James Watmuff) - Update zoom plugin to 0.2.1 (hansmaad) - Bugfix: Prevent infinite loop in getBounds if bounds.valueRange is very small, fixes #643 (hansmaad) - Bugfix: Correct update events during media changes (Rory Hunter) - Bugfix: prevent negative value for foreignObject width attribute (Jose Ignacio) - Fixed example line chart in getting started documentation (Robin Edbom) - Updated development pipeline dependencies (Gion Kunz) - Updated chartist tooltip plugin and example styles (Gion Kunz) - Fixed WTFPL License issue (Gion Kunz) v0.9.7 - 23 Feb 2016 -------------------- - Fixed bug with label and grid rendering on axis, fixes #621 v0.9.6 - 22 Feb 2016 -------------------- - Added dual licensing WTFPL and MIT, built new version (Gion Kunz) - Adding unminified CSS to dist output, fixes #506 (Gion Kunz) - Refactored namespaced attribute handling, fixes #584 (Gion Kunz) - Allow charts to be created without data and labels, fixes #598, fixes #588, fixes #537, fixes #425 (Gion Kunz> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: elements/chartist-render/lib/chartist/LICENSE-WTFPL ================================================ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. ================================================ FILE: elements/chartist-render/lib/chartist/README.md ================================================ # Big welcome by the Chartist Guy [![Join the chat at https://gitter.im/gionkunz/chartist-js](https://badges.gitter.im/gionkunz/chartist-js.svg)](https://gitter.im/gionkunz/chartist-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](http://img.shields.io/npm/v/chartist.svg)](https://npmjs.org/package/chartist) [![build status](http://img.shields.io/travis/gionkunz/chartist-js.svg)](https://travis-ci.org/gionkunz/chartist-js) [![Inline docs](http://inch-ci.org/github/gionkunz/chartist-js.svg?branch=develop)](http://inch-ci.org/github/gionkunz/chartist-js) ![The Chartist Guy](https://raw.github.com/gionkunz/chartist-js/develop/site/images/chartist-guy.gif "The Chartist Guy") *Checkout the documentation site at http://gionkunz.github.io/chartist-js/* *Checkout this lightning talk that gives you an overview of Chartist in 5 minutes https://www.youtube.com/watch?v=WdYzPhOB_c8* *Guest talk of the Chartist.js Guy at the Treehouse Show https://www.youtube.com/watch?v=h9oH0iDaZDQ&t=2m40s* Chartist.js is a simple responsive charting library built with SVG. There are hundreds of nice charting libraries already out there, but they are either: * not responsive * use the wrong technologies for illustration (canvas) * are not flexible enough while keeping the configuration simple * are not friendly to your own code * are not friendly to designers * have unnecessary dependencies to monolithic libraries * more annoying things That's why we started Chartist.js and our goal is to solve all of the above issues. ## What is it made for? Chartist's goal is to provide a simple, lightweight and unintrusive library to responsively craft charts on your website. It's important to understand that one of the main intentions of Chartist.js is to rely on standards rather than providing it's own solution to a problem which is already solved by those standards. We need to leverage the power of browsers today and say good bye to the idea of solving all problems ourselves. Chartist works with inline-SVG and therefore leverages the power of the DOM to provide parts of its functionality. This also means that Chartist does not provide it's own event handling, labels, behaviors or anything else that can just be done with plain HTML, JavaScript and CSS. The single and only responsibility of Chartist is to help you drawing "Simple responsive Charts" using inline-SVG in the DOM, CSS to style and JavaScript to provide an API for configuring your charts. ## Example site You can visit this Site http://gionkunz.github.io/chartist-js/ which is in fact a build of the current project. We are still developing and constantly add features but you can already use Chartist.js in your projects as we have reached a stable and reliable state already. ## Version notes We are currently still heavily developing in order to make Chartist.js better. Your help is needed! Please contribute to the project if you like the idea and the concept and help us to bring nice looking responsive open-source charts to the masses. ### Important missing stuff 1. Jasmine Tests! 2. Documentation: JSDoc, Getting started documentation and landing page 3. Better accessibility using ARIA and other optimizations 4. Better interfaces to the library (i.e. jQuery with data-* attributes for configuration), Angular.js directive etc. 5. Richer Sass / CSS framework 6. Other charts types (spider etc.) ## Plugins Some features aren't right for the core product but there is a great set of plugins available which add features like: * [Axis labels](http://gionkunz.github.io/chartist-js/plugins.html#axis-title-plugin) * [Tooltips at data points](https://gionkunz.github.io/chartist-js/plugins.html#tooltip-plugin) * [Coloring above/below a threshold](https://gionkunz.github.io/chartist-js/plugins.html#threshold-plugin) and more. See all the plugins [here](https://gionkunz.github.io/chartist-js/plugins.html). ## Contribution We are looking for people who share the idea of having a simple, flexible charting library that is responsive and uses modern and future-proof technologies. The goal of this project is to create a responsive charting library where developers have their joy in using it and designers love it because of the designing flexibility they have. Contribute if you like the Chartist Guy! ================================================ FILE: elements/chartist-render/lib/chartist/dist/chartist.css ================================================ .ct-label { fill: rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 0.4); font-size: 0.75rem; line-height: 1; } .ct-chart-line .ct-label, .ct-chart-bar .ct-label { display: block; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; } .ct-chart-pie .ct-label, .ct-chart-donut .ct-label { dominant-baseline: central; } .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-label.ct-vertical.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-end; -webkit-justify-content: flex-end; -ms-flex-pack: flex-end; justify-content: flex-end; text-align: right; text-anchor: end; } .ct-label.ct-vertical.ct-end { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-chart-bar .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; text-anchor: start; } .ct-chart-bar .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; text-anchor: start; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start { -webkit-box-align: flex-end; -webkit-align-items: flex-end; -ms-flex-align: flex-end; align-items: flex-end; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end { -webkit-box-align: flex-start; -webkit-align-items: flex-start; -ms-flex-align: flex-start; align-items: flex-start; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: start; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: flex-end; -webkit-justify-content: flex-end; -ms-flex-pack: flex-end; justify-content: flex-end; text-align: right; text-anchor: end; } .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: flex-start; -webkit-justify-content: flex-start; -ms-flex-pack: flex-start; justify-content: flex-start; text-align: left; text-anchor: end; } .ct-grid { stroke: rgba(0, 0, 0, 0.2); stroke-width: 1px; stroke-dasharray: 2px; } .ct-grid-background { fill: none; } .ct-point { stroke-width: 10px; stroke-linecap: round; } .ct-line { fill: none; stroke-width: 4px; } .ct-area { stroke: none; fill-opacity: 0.1; } .ct-bar { fill: none; stroke-width: 10px; } .ct-slice-donut { fill: none; stroke-width: 60px; } .ct-series-a .ct-point, .ct-series-a .ct-line, .ct-series-a .ct-bar, .ct-series-a .ct-slice-donut { stroke: #d70206; } .ct-series-a .ct-slice-pie, .ct-series-a .ct-slice-donut-solid, .ct-series-a .ct-area { fill: #d70206; } .ct-series-b .ct-point, .ct-series-b .ct-line, .ct-series-b .ct-bar, .ct-series-b .ct-slice-donut { stroke: #f05b4f; } .ct-series-b .ct-slice-pie, .ct-series-b .ct-slice-donut-solid, .ct-series-b .ct-area { fill: #f05b4f; } .ct-series-c .ct-point, .ct-series-c .ct-line, .ct-series-c .ct-bar, .ct-series-c .ct-slice-donut { stroke: #f4c63d; } .ct-series-c .ct-slice-pie, .ct-series-c .ct-slice-donut-solid, .ct-series-c .ct-area { fill: #f4c63d; } .ct-series-d .ct-point, .ct-series-d .ct-line, .ct-series-d .ct-bar, .ct-series-d .ct-slice-donut { stroke: #d17905; } .ct-series-d .ct-slice-pie, .ct-series-d .ct-slice-donut-solid, .ct-series-d .ct-area { fill: #d17905; } .ct-series-e .ct-point, .ct-series-e .ct-line, .ct-series-e .ct-bar, .ct-series-e .ct-slice-donut { stroke: #453d3f; } .ct-series-e .ct-slice-pie, .ct-series-e .ct-slice-donut-solid, .ct-series-e .ct-area { fill: #453d3f; } .ct-series-f .ct-point, .ct-series-f .ct-line, .ct-series-f .ct-bar, .ct-series-f .ct-slice-donut { stroke: #59922b; } .ct-series-f .ct-slice-pie, .ct-series-f .ct-slice-donut-solid, .ct-series-f .ct-area { fill: #59922b; } .ct-series-g .ct-point, .ct-series-g .ct-line, .ct-series-g .ct-bar, .ct-series-g .ct-slice-donut { stroke: #0544d3; } .ct-series-g .ct-slice-pie, .ct-series-g .ct-slice-donut-solid, .ct-series-g .ct-area { fill: #0544d3; } .ct-series-h .ct-point, .ct-series-h .ct-line, .ct-series-h .ct-bar, .ct-series-h .ct-slice-donut { stroke: #6b0392; } .ct-series-h .ct-slice-pie, .ct-series-h .ct-slice-donut-solid, .ct-series-h .ct-area { fill: #6b0392; } .ct-series-i .ct-point, .ct-series-i .ct-line, .ct-series-i .ct-bar, .ct-series-i .ct-slice-donut { stroke: #f05b4f; } .ct-series-i .ct-slice-pie, .ct-series-i .ct-slice-donut-solid, .ct-series-i .ct-area { fill: #f05b4f; } .ct-series-j .ct-point, .ct-series-j .ct-line, .ct-series-j .ct-bar, .ct-series-j .ct-slice-donut { stroke: #dda458; } .ct-series-j .ct-slice-pie, .ct-series-j .ct-slice-donut-solid, .ct-series-j .ct-area { fill: #dda458; } .ct-series-k .ct-point, .ct-series-k .ct-line, .ct-series-k .ct-bar, .ct-series-k .ct-slice-donut { stroke: #eacf7d; } .ct-series-k .ct-slice-pie, .ct-series-k .ct-slice-donut-solid, .ct-series-k .ct-area { fill: #eacf7d; } .ct-series-l .ct-point, .ct-series-l .ct-line, .ct-series-l .ct-bar, .ct-series-l .ct-slice-donut { stroke: #86797d; } .ct-series-l .ct-slice-pie, .ct-series-l .ct-slice-donut-solid, .ct-series-l .ct-area { fill: #86797d; } .ct-series-m .ct-point, .ct-series-m .ct-line, .ct-series-m .ct-bar, .ct-series-m .ct-slice-donut { stroke: #b2c326; } .ct-series-m .ct-slice-pie, .ct-series-m .ct-slice-donut-solid, .ct-series-m .ct-area { fill: #b2c326; } .ct-series-n .ct-point, .ct-series-n .ct-line, .ct-series-n .ct-bar, .ct-series-n .ct-slice-donut { stroke: #6188e2; } .ct-series-n .ct-slice-pie, .ct-series-n .ct-slice-donut-solid, .ct-series-n .ct-area { fill: #6188e2; } .ct-series-o .ct-point, .ct-series-o .ct-line, .ct-series-o .ct-bar, .ct-series-o .ct-slice-donut { stroke: #a748ca; } .ct-series-o .ct-slice-pie, .ct-series-o .ct-slice-donut-solid, .ct-series-o .ct-area { fill: #a748ca; } .ct-square { display: block; position: relative; width: 100%; } .ct-square:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 100%; } .ct-square:after { content: ""; display: table; clear: both; } .ct-square > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-second { display: block; position: relative; width: 100%; } .ct-minor-second:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 93.75%; } .ct-minor-second:after { content: ""; display: table; clear: both; } .ct-minor-second > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-second { display: block; position: relative; width: 100%; } .ct-major-second:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 88.8888888889%; } .ct-major-second:after { content: ""; display: table; clear: both; } .ct-major-second > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-third { display: block; position: relative; width: 100%; } .ct-minor-third:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 83.3333333333%; } .ct-minor-third:after { content: ""; display: table; clear: both; } .ct-minor-third > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-third { display: block; position: relative; width: 100%; } .ct-major-third:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 80%; } .ct-major-third:after { content: ""; display: table; clear: both; } .ct-major-third > svg { display: block; position: absolute; top: 0; left: 0; } .ct-perfect-fourth { display: block; position: relative; width: 100%; } .ct-perfect-fourth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 75%; } .ct-perfect-fourth:after { content: ""; display: table; clear: both; } .ct-perfect-fourth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-perfect-fifth { display: block; position: relative; width: 100%; } .ct-perfect-fifth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 66.6666666667%; } .ct-perfect-fifth:after { content: ""; display: table; clear: both; } .ct-perfect-fifth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-sixth { display: block; position: relative; width: 100%; } .ct-minor-sixth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 62.5%; } .ct-minor-sixth:after { content: ""; display: table; clear: both; } .ct-minor-sixth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-golden-section { display: block; position: relative; width: 100%; } .ct-golden-section:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 61.804697157%; } .ct-golden-section:after { content: ""; display: table; clear: both; } .ct-golden-section > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-sixth { display: block; position: relative; width: 100%; } .ct-major-sixth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 60%; } .ct-major-sixth:after { content: ""; display: table; clear: both; } .ct-major-sixth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-minor-seventh { display: block; position: relative; width: 100%; } .ct-minor-seventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 56.25%; } .ct-minor-seventh:after { content: ""; display: table; clear: both; } .ct-minor-seventh > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-seventh { display: block; position: relative; width: 100%; } .ct-major-seventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 53.3333333333%; } .ct-major-seventh:after { content: ""; display: table; clear: both; } .ct-major-seventh > svg { display: block; position: absolute; top: 0; left: 0; } .ct-octave { display: block; position: relative; width: 100%; } .ct-octave:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 50%; } .ct-octave:after { content: ""; display: table; clear: both; } .ct-octave > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-tenth { display: block; position: relative; width: 100%; } .ct-major-tenth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 40%; } .ct-major-tenth:after { content: ""; display: table; clear: both; } .ct-major-tenth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-eleventh { display: block; position: relative; width: 100%; } .ct-major-eleventh:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 37.5%; } .ct-major-eleventh:after { content: ""; display: table; clear: both; } .ct-major-eleventh > svg { display: block; position: absolute; top: 0; left: 0; } .ct-major-twelfth { display: block; position: relative; width: 100%; } .ct-major-twelfth:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 33.3333333333%; } .ct-major-twelfth:after { content: ""; display: table; clear: both; } .ct-major-twelfth > svg { display: block; position: absolute; top: 0; left: 0; } .ct-double-octave { display: block; position: relative; width: 100%; } .ct-double-octave:before { display: block; float: left; content: ""; width: 0; height: 0; padding-bottom: 25%; } .ct-double-octave:after { content: ""; display: table; clear: both; } .ct-double-octave > svg { display: block; position: absolute; top: 0; left: 0; } ================================================ FILE: elements/chartist-render/lib/chartist/dist/chartist.js ================================================ (function (root, factory) { if (typeof define === "function" && define.amd) { // AMD. Register as an anonymous module unless amdModuleId is set define("Chartist", [], function () { return (root["Chartist"] = factory()); }); } else if (typeof module === "object" && module.exports) { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, // like Node. module.exports = factory(); } else { root["Chartist"] = factory(); } })(this, function () { /* Chartist.js 0.11.0 * Copyright © 2017 Gion Kunz * Free to use under either the WTFPL license or the MIT license. * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT */ /** * The core module of Chartist that is mainly providing static functions and higher level functions for chart modules. * * @module Chartist.Core */ var Chartist = { version: "0.11.0", }; (function (window, document, Chartist) { "use strict"; /** * This object contains all namespaces used within Chartist. * * @memberof Chartist.Core * @type {{svg: string, xmlns: string, xhtml: string, xlink: string, ct: string}} */ Chartist.namespaces = { svg: "http://www.w3.org/2000/svg", xmlns: "http://www.w3.org/2000/xmlns/", xhtml: "http://www.w3.org/1999/xhtml", xlink: "http://www.w3.org/1999/xlink", ct: "http://gionkunz.github.com/chartist-js/ct", }; /** * Helps to simplify functional style code * * @memberof Chartist.Core * @param {*} n This exact value will be returned by the noop function * @return {*} The same value that was provided to the n parameter */ Chartist.noop = function (n) { return n; }; /** * Generates a-z from a number 0 to 26 * * @memberof Chartist.Core * @param {Number} n A number from 0 to 26 that will result in a letter a-z * @return {String} A character from a-z based on the input number n */ Chartist.alphaNumerate = function (n) { // Limit to a-z return String.fromCharCode(97 + (n % 26)); }; /** * Simple recursive object extend * * @memberof Chartist.Core * @param {Object} target Target object where the source will be merged into * @param {Object...} sources This object (objects) will be merged into target and then target is returned * @return {Object} An object that has the same reference as target but is extended and merged with the properties of source */ Chartist.extend = function (target) { var i, source, sourceProp; target = target || {}; for (i = 1; i < arguments.length; i++) { source = arguments[i]; for (var prop in source) { sourceProp = source[prop]; if ( typeof sourceProp === "object" && sourceProp !== null && !(sourceProp instanceof Array) ) { target[prop] = Chartist.extend(target[prop], sourceProp); } else { target[prop] = sourceProp; } } } return target; }; /** * Replaces all occurrences of subStr in str with newSubStr and returns a new string. * * @memberof Chartist.Core * @param {String} str * @param {String} subStr * @param {String} newSubStr * @return {String} */ Chartist.replaceAll = function (str, subStr, newSubStr) { return str.replace(new RegExp(subStr, "g"), newSubStr); }; /** * Converts a number to a string with a unit. If a string is passed then this will be returned unmodified. * * @memberof Chartist.Core * @param {Number} value * @param {String} unit * @return {String} Returns the passed number value with unit. */ Chartist.ensureUnit = function (value, unit) { if (typeof value === "number") { value = value + unit; } return value; }; /** * Converts a number or string to a quantity object. * * @memberof Chartist.Core * @param {String|Number} input * @return {Object} Returns an object containing the value as number and the unit as string. */ Chartist.quantity = function (input) { if (typeof input === "string") { var match = /^(\d+)\s*(.*)$/g.exec(input); return { value: +match[1], unit: match[2] || undefined, }; } return { value: input }; }; /** * This is a wrapper around globalThis.document.querySelector that will return the query if it's already of type Node * * @memberof Chartist.Core * @param {String|Node} query The query to use for selecting a Node or a DOM node that will be returned directly * @return {Node} */ Chartist.querySelector = function (query) { return query instanceof Node ? query : globalThis.document.querySelector(query); }; /** * Functional style helper to produce array with given length initialized with undefined values * * @memberof Chartist.Core * @param length * @return {Array} */ Chartist.times = function (length) { return Array.apply(null, new Array(length)); }; /** * Sum helper to be used in reduce functions * * @memberof Chartist.Core * @param previous * @param current * @return {*} */ Chartist.sum = function (previous, current) { return previous + (current ? current : 0); }; /** * Multiply helper to be used in `Array.map` for multiplying each value of an array with a factor. * * @memberof Chartist.Core * @param {Number} factor * @returns {Function} Function that can be used in `Array.map` to multiply each value in an array */ Chartist.mapMultiply = function (factor) { return function (num) { return num * factor; }; }; /** * Add helper to be used in `Array.map` for adding a addend to each value of an array. * * @memberof Chartist.Core * @param {Number} addend * @returns {Function} Function that can be used in `Array.map` to add a addend to each value in an array */ Chartist.mapAdd = function (addend) { return function (num) { return num + addend; }; }; /** * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values). * * @memberof Chartist.Core * @param arr * @param cb * @return {Array} */ Chartist.serialMap = function (arr, cb) { var result = [], length = Math.max.apply( null, arr.map(function (e) { return e.length; }), ); Chartist.times(length).forEach(function (e, index) { var args = arr.map(function (e) { return e[index]; }); result[index] = cb.apply(null, args); }); return result; }; /** * This helper function can be used to round values with certain precision level after decimal. This is used to prevent rounding errors near float point precision limit. * * @memberof Chartist.Core * @param {Number} value The value that should be rounded with precision * @param {Number} [digits] The number of digits after decimal used to do the rounding * @returns {number} Rounded value */ Chartist.roundWithPrecision = function (value, digits) { var precision = Math.pow(10, digits || Chartist.precision); return Math.round(value * precision) / precision; }; /** * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number. * * @memberof Chartist.Core * @type {number} */ Chartist.precision = 8; /** * A map with characters to escape for strings to be safely used as attribute values. * * @memberof Chartist.Core * @type {Object} */ Chartist.escapingMap = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", }; /** * This function serializes arbitrary data to a string. In case of data that can't be easily converted to a string, this function will create a wrapper object and serialize the data using JSON.stringify. The outcoming string will always be escaped using Chartist.escapingMap. * If called with null or undefined the function will return immediately with null or undefined. * * @memberof Chartist.Core * @param {Number|String|Object} data * @return {String} */ Chartist.serialize = function (data) { if (data === null || data === undefined) { return data; } else if (typeof data === "number") { data = "" + data; } else if (typeof data === "object") { data = JSON.stringify({ data: data }); } return Object.keys(Chartist.escapingMap).reduce(function (result, key) { return Chartist.replaceAll(result, key, Chartist.escapingMap[key]); }, data); }; /** * This function de-serializes a string previously serialized with Chartist.serialize. The string will always be unescaped using Chartist.escapingMap before it's returned. Based on the input value the return type can be Number, String or Object. JSON.parse is used with try / catch to see if the unescaped string can be parsed into an Object and this Object will be returned on success. * * @memberof Chartist.Core * @param {String} data * @return {String|Number|Object} */ Chartist.deserialize = function (data) { if (typeof data !== "string") { return data; } data = Object.keys(Chartist.escapingMap).reduce(function (result, key) { return Chartist.replaceAll(result, Chartist.escapingMap[key], key); }, data); try { data = JSON.parse(data); data = data.data !== undefined ? data.data : data; } catch (e) {} return data; }; /** * Create or reinitialize the SVG element for the chart * * @memberof Chartist.Core * @param {Node} container The containing DOM Node object that will be used to plant the SVG element * @param {String} width Set the width of the SVG element. Default is 100% * @param {String} height Set the height of the SVG element. Default is 100% * @param {String} className Specify a class to be added to the SVG element * @return {Object} The created/reinitialized SVG element */ Chartist.createSvg = function (container, width, height, className) { var svg; width = width || "100%"; height = height || "100%"; // Check if there is a previous SVG element in the container that contains the Chartist XML namespace and remove it // Since the DOM API does not support namespaces we need to manually search the returned list http://www.w3.org/TR/selectors-api/ Array.prototype.slice .call(container.querySelectorAll("svg")) .filter(function filterChartistSvgObjects(svg) { return svg.getAttributeNS(Chartist.namespaces.xmlns, "ct"); }) .forEach(function removePreviousElement(svg) { container.removeChild(svg); }); // Create svg object with width and height or use 100% as default svg = new Chartist.Svg("svg") .attr({ width: width, height: height, }) .addClass(className); svg._node.style.width = width; svg._node.style.height = height; // Add the DOM node to our container container.appendChild(svg._node); return svg; }; /** * Ensures that the data object passed as second argument to the charts is present and correctly initialized. * * @param {Object} data The data object that is passed as second argument to the charts * @return {Object} The normalized data object */ Chartist.normalizeData = function (data, reverse, multi) { var labelCount; var output = { raw: data, normalized: {}, }; // Check if we should generate some labels based on existing series data output.normalized.series = Chartist.getDataArray( { series: data.series || [], }, reverse, multi, ); // If all elements of the normalized data array are arrays we're dealing with // multi series data and we need to find the largest series if they are un-even if ( output.normalized.series.every(function (value) { return value instanceof Array; }) ) { // Getting the series with the the most elements labelCount = Math.max.apply( null, output.normalized.series.map(function (series) { return series.length; }), ); } else { // We're dealing with Pie data so we just take the normalized array length labelCount = output.normalized.series.length; } output.normalized.labels = (data.labels || []).slice(); // Padding the labels to labelCount with empty strings Array.prototype.push.apply( output.normalized.labels, Chartist.times( Math.max(0, labelCount - output.normalized.labels.length), ).map(function () { return ""; }), ); if (reverse) { Chartist.reverseData(output.normalized); } return output; }; /** * This function safely checks if an objects has an owned property. * * @param {Object} object The object where to check for a property * @param {string} property The property name * @returns {boolean} Returns true if the object owns the specified property */ Chartist.safeHasProperty = function (object, property) { return ( object !== null && typeof object === "object" && object.hasOwnProperty(property) ); }; /** * Checks if a value is considered a hole in the data series. * * @param {*} value * @returns {boolean} True if the value is considered a data hole */ Chartist.isDataHoleValue = function (value) { return ( value === null || value === undefined || (typeof value === "number" && isNaN(value)) ); }; /** * Reverses the series, labels and series data arrays. * * @memberof Chartist.Core * @param data */ Chartist.reverseData = function (data) { data.labels.reverse(); data.series.reverse(); for (var i = 0; i < data.series.length; i++) { if ( typeof data.series[i] === "object" && data.series[i].data !== undefined ) { data.series[i].data.reverse(); } else if (data.series[i] instanceof Array) { data.series[i].reverse(); } } }; /** * Convert data series into plain array * * @memberof Chartist.Core * @param {Object} data The series object that contains the data to be visualized in the chart * @param {Boolean} [reverse] If true the whole data is reversed by the getDataArray call. This will modify the data object passed as first parameter. The labels as well as the series order is reversed. The whole series data arrays are reversed too. * @param {Boolean} [multi] Create a multi dimensional array from a series data array where a value object with `x` and `y` values will be created. * @return {Array} A plain array that contains the data to be visualized in the chart */ Chartist.getDataArray = function (data, reverse, multi) { // Recursively walks through nested arrays and convert string values to numbers and objects with value properties // to values. Check the tests in data core -> data normalization for a detailed specification of expected values function recursiveConvert(value) { if (Chartist.safeHasProperty(value, "value")) { // We are dealing with value object notation so we need to recurse on value property return recursiveConvert(value.value); } else if (Chartist.safeHasProperty(value, "data")) { // We are dealing with series object notation so we need to recurse on data property return recursiveConvert(value.data); } else if (value instanceof Array) { // Data is of type array so we need to recurse on the series return value.map(recursiveConvert); } else if (Chartist.isDataHoleValue(value)) { // We're dealing with a hole in the data and therefore need to return undefined // We're also returning undefined for multi value output return undefined; } else { // We need to prepare multi value output (x and y data) if (multi) { var multiValue = {}; // Single series value arrays are assumed to specify the Y-Axis value // For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}] // If multi is a string then it's assumed that it specified which dimension should be filled as default if (typeof multi === "string") { multiValue[multi] = Chartist.getNumberOrUndefined(value); } else { multiValue.y = Chartist.getNumberOrUndefined(value); } multiValue.x = value.hasOwnProperty("x") ? Chartist.getNumberOrUndefined(value.x) : multiValue.x; multiValue.y = value.hasOwnProperty("y") ? Chartist.getNumberOrUndefined(value.y) : multiValue.y; return multiValue; } else { // We can return simple data return Chartist.getNumberOrUndefined(value); } } } return data.series.map(recursiveConvert); }; /** * Converts a number into a padding object. * * @memberof Chartist.Core * @param {Object|Number} padding * @param {Number} [fallback] This value is used to fill missing values if a incomplete padding object was passed * @returns {Object} Returns a padding object containing top, right, bottom, left properties filled with the padding number passed in as argument. If the argument is something else than a number (presumably already a correct padding object) then this argument is directly returned. */ Chartist.normalizePadding = function (padding, fallback) { fallback = fallback || 0; return typeof padding === "number" ? { top: padding, right: padding, bottom: padding, left: padding, } : { top: typeof padding.top === "number" ? padding.top : fallback, right: typeof padding.right === "number" ? padding.right : fallback, bottom: typeof padding.bottom === "number" ? padding.bottom : fallback, left: typeof padding.left === "number" ? padding.left : fallback, }; }; Chartist.getMetaData = function (series, index) { var value = series.data ? series.data[index] : series[index]; return value ? value.meta : undefined; }; /** * Calculate the order of magnitude for the chart scale * * @memberof Chartist.Core * @param {Number} value The value Range of the chart * @return {Number} The order of magnitude */ Chartist.orderOfMagnitude = function (value) { return Math.floor(Math.log(Math.abs(value)) / Math.LN10); }; /** * Project a data length into screen coordinates (pixels) * * @memberof Chartist.Core * @param {Object} axisLength The svg element for the chart * @param {Number} length Single data value from a series array * @param {Object} bounds All the values to set the bounds of the chart * @return {Number} The projected data length in pixels */ Chartist.projectLength = function (axisLength, length, bounds) { return (length / bounds.range) * axisLength; }; /** * Get the height of the area in the chart for the data series * * @memberof Chartist.Core * @param {Object} svg The svg element for the chart * @param {Object} options The Object that contains all the optional values for the chart * @return {Number} The height of the area in the chart for the data series */ Chartist.getAvailableHeight = function (svg, options) { return Math.max( (Chartist.quantity(options.height).value || svg.height()) - (options.chartPadding.top + options.chartPadding.bottom) - options.axisX.offset, 0, ); }; /** * Get highest and lowest value of data array. This Array contains the data that will be visualized in the chart. * * @memberof Chartist.Core * @param {Array} data The array that contains the data to be visualized in the chart * @param {Object} options The Object that contains the chart options * @param {String} dimension Axis dimension 'x' or 'y' used to access the correct value and high / low configuration * @return {Object} An object that contains the highest and lowest value that will be visualized on the chart. */ Chartist.getHighLow = function (data, options, dimension) { // TODO: Remove workaround for deprecated global high / low config. Axis high / low configuration is preferred options = Chartist.extend( {}, options, dimension ? options["axis" + dimension.toUpperCase()] : {}, ); var highLow = { high: options.high === undefined ? -Number.MAX_VALUE : +options.high, low: options.low === undefined ? Number.MAX_VALUE : +options.low, }; var findHigh = options.high === undefined; var findLow = options.low === undefined; // Function to recursively walk through arrays and find highest and lowest number function recursiveHighLow(data) { if (data === undefined) { return undefined; } else if (data instanceof Array) { for (var i = 0; i < data.length; i++) { recursiveHighLow(data[i]); } } else { var value = dimension ? +data[dimension] : +data; if (findHigh && value > highLow.high) { highLow.high = value; } if (findLow && value < highLow.low) { highLow.low = value; } } } // Start to find highest and lowest number recursively if (findHigh || findLow) { recursiveHighLow(data); } // Overrides of high / low based on reference value, it will make sure that the invisible reference value is // used to generate the chart. This is useful when the chart always needs to contain the position of the // invisible reference value in the view i.e. for bipolar scales. if (options.referenceValue || options.referenceValue === 0) { highLow.high = Math.max(options.referenceValue, highLow.high); highLow.low = Math.min(options.referenceValue, highLow.low); } // If high and low are the same because of misconfiguration or flat data (only the same value) we need // to set the high or low to 0 depending on the polarity if (highLow.high <= highLow.low) { // If both values are 0 we set high to 1 if (highLow.low === 0) { highLow.high = 1; } else if (highLow.low < 0) { // If we have the same negative value for the bounds we set bounds.high to 0 highLow.high = 0; } else if (highLow.high > 0) { // If we have the same positive value for the bounds we set bounds.low to 0 highLow.low = 0; } else { // If data array was empty, values are Number.MAX_VALUE and -Number.MAX_VALUE. Set bounds to prevent errors highLow.high = 1; highLow.low = 0; } } return highLow; }; /** * Checks if a value can be safely coerced to a number. This includes all values except null which result in finite numbers when coerced. This excludes NaN, since it's not finite. * * @memberof Chartist.Core * @param value * @returns {Boolean} */ Chartist.isNumeric = function (value) { return value === null ? false : isFinite(value); }; /** * Returns true on all falsey values except the numeric value 0. * * @memberof Chartist.Core * @param value * @returns {boolean} */ Chartist.isFalseyButZero = function (value) { return !value && value !== 0; }; /** * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined. * * @memberof Chartist.Core * @param value * @returns {*} */ Chartist.getNumberOrUndefined = function (value) { return Chartist.isNumeric(value) ? +value : undefined; }; /** * Checks if provided value object is multi value (contains x or y properties) * * @memberof Chartist.Core * @param value */ Chartist.isMultiValue = function (value) { return typeof value === "object" && ("x" in value || "y" in value); }; /** * Gets a value from a dimension `value.x` or `value.y` while returning value directly if it's a valid numeric value. If the value is not numeric and it's falsey this function will return `defaultValue`. * * @memberof Chartist.Core * @param value * @param dimension * @param defaultValue * @returns {*} */ Chartist.getMultiValue = function (value, dimension) { if (Chartist.isMultiValue(value)) { return Chartist.getNumberOrUndefined(value[dimension || "y"]); } else { return Chartist.getNumberOrUndefined(value); } }; /** * Pollard Rho Algorithm to find smallest factor of an integer value. There are more efficient algorithms for factorization, but this one is quite efficient and not so complex. * * @memberof Chartist.Core * @param {Number} num An integer number where the smallest factor should be searched for * @returns {Number} The smallest integer factor of the parameter num. */ Chartist.rho = function (num) { if (num === 1) { return num; } function gcd(p, q) { if (p % q === 0) { return q; } else { return gcd(q, p % q); } } function f(x) { return x * x + 1; } var x1 = 2, x2 = 2, divisor; if (num % 2 === 0) { return 2; } do { x1 = f(x1) % num; x2 = f(f(x2)) % num; divisor = gcd(Math.abs(x1 - x2), num); } while (divisor === 1); return divisor; }; /** * Calculate and retrieve all the bounds for the chart and return them in one array * * @memberof Chartist.Core * @param {Number} axisLength The length of the Axis used for * @param {Object} highLow An object containing a high and low property indicating the value range of the chart. * @param {Number} scaleMinSpace The minimum projected length a step should result in * @param {Boolean} onlyInteger * @return {Object} All the values to set the bounds of the chart */ Chartist.getBounds = function ( axisLength, highLow, scaleMinSpace, onlyInteger, ) { var i, optimizationCounter = 0, newMin, newMax, bounds = { high: highLow.high, low: highLow.low, }; bounds.valueRange = bounds.high - bounds.low; bounds.oom = Chartist.orderOfMagnitude(bounds.valueRange); bounds.step = Math.pow(10, bounds.oom); bounds.min = Math.floor(bounds.low / bounds.step) * bounds.step; bounds.max = Math.ceil(bounds.high / bounds.step) * bounds.step; bounds.range = bounds.max - bounds.min; bounds.numberOfSteps = Math.round(bounds.range / bounds.step); // Optimize scale step by checking if subdivision is possible based on horizontalGridMinSpace // If we are already below the scaleMinSpace value we will scale up var length = Chartist.projectLength(axisLength, bounds.step, bounds); var scaleUp = length < scaleMinSpace; var smallestFactor = onlyInteger ? Chartist.rho(bounds.range) : 0; // First check if we should only use integer steps and if step 1 is still larger than scaleMinSpace so we can use 1 if ( onlyInteger && Chartist.projectLength(axisLength, 1, bounds) >= scaleMinSpace ) { bounds.step = 1; } else if ( onlyInteger && smallestFactor < bounds.step && Chartist.projectLength(axisLength, smallestFactor, bounds) >= scaleMinSpace ) { // If step 1 was too small, we can try the smallest factor of range // If the smallest factor is smaller than the current bounds.step and the projected length of smallest factor // is larger than the scaleMinSpace we should go for it. bounds.step = smallestFactor; } else { // Trying to divide or multiply by 2 and find the best step value while (true) { if ( scaleUp && Chartist.projectLength(axisLength, bounds.step, bounds) <= scaleMinSpace ) { bounds.step *= 2; } else if ( !scaleUp && Chartist.projectLength(axisLength, bounds.step / 2, bounds) >= scaleMinSpace ) { bounds.step /= 2; if (onlyInteger && bounds.step % 1 !== 0) { bounds.step *= 2; break; } } else { break; } if (optimizationCounter++ > 1000) { throw new Error( "Exceeded maximum number of iterations while optimizing scale step!", ); } } } var EPSILON = 2.221e-16; bounds.step = Math.max(bounds.step, EPSILON); function safeIncrement(value, increment) { // If increment is too small use *= (1+EPSILON) as a simple nextafter if (value === (value += increment)) { value *= 1 + (increment > 0 ? EPSILON : -EPSILON); } return value; } // Narrow min and max based on new step newMin = bounds.min; newMax = bounds.max; while (newMin + bounds.step <= bounds.low) { newMin = safeIncrement(newMin, bounds.step); } while (newMax - bounds.step >= bounds.high) { newMax = safeIncrement(newMax, -bounds.step); } bounds.min = newMin; bounds.max = newMax; bounds.range = bounds.max - bounds.min; var values = []; for (i = bounds.min; i <= bounds.max; i = safeIncrement(i, bounds.step)) { var value = Chartist.roundWithPrecision(i); if (value !== values[values.length - 1]) { values.push(value); } } bounds.values = values; return bounds; }; /** * Calculate cartesian coordinates of polar coordinates * * @memberof Chartist.Core * @param {Number} centerX X-axis coordinates of center point of circle segment * @param {Number} centerY X-axis coordinates of center point of circle segment * @param {Number} radius Radius of circle segment * @param {Number} angleInDegrees Angle of circle segment in degrees * @return {{x:Number, y:Number}} Coordinates of point on circumference */ Chartist.polarToCartesian = function ( centerX, centerY, radius, angleInDegrees, ) { var angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0; return { x: centerX + radius * Math.cos(angleInRadians), y: centerY + radius * Math.sin(angleInRadians), }; }; /** * Initialize chart drawing rectangle (area where chart is drawn) x1,y1 = bottom left / x2,y2 = top right * * @memberof Chartist.Core * @param {Object} svg The svg element for the chart * @param {Object} options The Object that contains all the optional values for the chart * @param {Number} [fallbackPadding] The fallback padding if partial padding objects are used * @return {Object} The chart rectangles coordinates inside the svg element plus the rectangles measurements */ Chartist.createChartRect = function (svg, options, fallbackPadding) { var hasAxis = !!(options.axisX || options.axisY); var yAxisOffset = hasAxis ? options.axisY.offset : 0; var xAxisOffset = hasAxis ? options.axisX.offset : 0; // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0 var width = svg.width() || Chartist.quantity(options.width).value || 0; var height = svg.height() || Chartist.quantity(options.height).value || 0; var normalizedPadding = Chartist.normalizePadding( options.chartPadding, fallbackPadding, ); // If settings were to small to cope with offset (legacy) and padding, we'll adjust width = Math.max( width, yAxisOffset + normalizedPadding.left + normalizedPadding.right, ); height = Math.max( height, xAxisOffset + normalizedPadding.top + normalizedPadding.bottom, ); var chartRect = { padding: normalizedPadding, width: function () { return this.x2 - this.x1; }, height: function () { return this.y1 - this.y2; }, }; if (hasAxis) { if (options.axisX.position === "start") { chartRect.y2 = normalizedPadding.top + xAxisOffset; chartRect.y1 = Math.max( height - normalizedPadding.bottom, chartRect.y2 + 1, ); } else { chartRect.y2 = normalizedPadding.top; chartRect.y1 = Math.max( height - normalizedPadding.bottom - xAxisOffset, chartRect.y2 + 1, ); } if (options.axisY.position === "start") { chartRect.x1 = normalizedPadding.left + yAxisOffset; chartRect.x2 = Math.max( width - normalizedPadding.right, chartRect.x1 + 1, ); } else { chartRect.x1 = normalizedPadding.left; chartRect.x2 = Math.max( width - normalizedPadding.right - yAxisOffset, chartRect.x1 + 1, ); } } else { chartRect.x1 = normalizedPadding.left; chartRect.x2 = Math.max( width - normalizedPadding.right, chartRect.x1 + 1, ); chartRect.y2 = normalizedPadding.top; chartRect.y1 = Math.max( height - normalizedPadding.bottom, chartRect.y2 + 1, ); } return chartRect; }; /** * Creates a grid line based on a projected value. * * @memberof Chartist.Core * @param position * @param index * @param axis * @param offset * @param length * @param group * @param classes * @param eventEmitter */ Chartist.createGrid = function ( position, index, axis, offset, length, group, classes, eventEmitter, ) { var positionalData = {}; positionalData[axis.units.pos + "1"] = position; positionalData[axis.units.pos + "2"] = position; positionalData[axis.counterUnits.pos + "1"] = offset; positionalData[axis.counterUnits.pos + "2"] = offset + length; var gridElement = group.elem("line", positionalData, classes.join(" ")); // Event for grid draw eventEmitter.emit( "draw", Chartist.extend( { type: "grid", axis: axis, index: index, group: group, element: gridElement, }, positionalData, ), ); }; /** * Creates a grid background rect and emits the draw event. * * @memberof Chartist.Core * @param gridGroup * @param chartRect * @param className * @param eventEmitter */ Chartist.createGridBackground = function ( gridGroup, chartRect, className, eventEmitter, ) { var gridBackground = gridGroup.elem( "rect", { x: chartRect.x1, y: chartRect.y2, width: chartRect.width(), height: chartRect.height(), }, className, true, ); // Event for grid background draw eventEmitter.emit("draw", { type: "gridBackground", group: gridGroup, element: gridBackground, }); }; /** * Creates a label based on a projected value and an axis. * * @memberof Chartist.Core * @param position * @param length * @param index * @param labels * @param axis * @param axisOffset * @param labelOffset * @param group * @param classes * @param useForeignObject * @param eventEmitter */ Chartist.createLabel = function ( position, length, index, labels, axis, axisOffset, labelOffset, group, classes, useForeignObject, eventEmitter, ) { var labelElement; var positionalData = {}; positionalData[axis.units.pos] = position + labelOffset[axis.units.pos]; positionalData[axis.counterUnits.pos] = labelOffset[axis.counterUnits.pos]; positionalData[axis.units.len] = length; positionalData[axis.counterUnits.len] = Math.max(0, axisOffset - 10); if (useForeignObject) { // We need to set width and height explicitly to px as span will not expand with width and height being // 100% in all browsers var content = globalThis.document.createElement("span"); content.className = classes.join(" "); content.setAttribute("xmlns", Chartist.namespaces.xhtml); content.innerText = labels[index]; content.style[axis.units.len] = Math.round(positionalData[axis.units.len]) + "px"; content.style[axis.counterUnits.len] = Math.round(positionalData[axis.counterUnits.len]) + "px"; labelElement = group.foreignObject( content, Chartist.extend( { style: "overflow: visible;", }, positionalData, ), ); } else { labelElement = group .elem("text", positionalData, classes.join(" ")) .text(labels[index]); } eventEmitter.emit( "draw", Chartist.extend( { type: "label", axis: axis, index: index, group: group, element: labelElement, text: labels[index], }, positionalData, ), ); }; /** * Helper to read series specific options from options object. It automatically falls back to the global option if * there is no option in the series options. * * @param {Object} series Series object * @param {Object} options Chartist options object * @param {string} key The options key that should be used to obtain the options * @returns {*} */ Chartist.getSeriesOption = function (series, options, key) { if (series.name && options.series && options.series[series.name]) { var seriesOptions = options.series[series.name]; return seriesOptions.hasOwnProperty(key) ? seriesOptions[key] : options[key]; } else { return options[key]; } }; /** * Provides options handling functionality with callback for options changes triggered by responsive options and media query matches * * @memberof Chartist.Core * @param {Object} options Options set by user * @param {Array} responsiveOptions Optional functions to add responsive behavior to chart * @param {Object} eventEmitter The event emitter that will be used to emit the options changed events * @return {Object} The consolidated options object from the defaults, base and matching responsive options */ Chartist.optionsProvider = function ( options, responsiveOptions, eventEmitter, ) { var baseOptions = Chartist.extend({}, options), currentOptions, mediaQueryListeners = [], i; function updateCurrentOptions(mediaEvent) { var previousOptions = currentOptions; currentOptions = Chartist.extend({}, baseOptions); if (responsiveOptions) { for (i = 0; i < responsiveOptions.length; i++) { var mql = globalThis.matchMedia(responsiveOptions[i][0]); if (mql.matches) { currentOptions = Chartist.extend( currentOptions, responsiveOptions[i][1], ); } } } if (eventEmitter && mediaEvent) { eventEmitter.emit("optionsChanged", { previousOptions: previousOptions, currentOptions: currentOptions, }); } } function removeMediaQueryListeners() { mediaQueryListeners.forEach(function (mql) { mql.removeListener(updateCurrentOptions); }); } if (!globalThis.matchMedia) { throw "globalThis.matchMedia not found! Make sure you're using a polyfill."; } else if (responsiveOptions) { for (i = 0; i < responsiveOptions.length; i++) { var mql = globalThis.matchMedia(responsiveOptions[i][0]); mql.addListener(updateCurrentOptions); mediaQueryListeners.push(mql); } } // Execute initially without an event argument so we get the correct options updateCurrentOptions(); return { removeMediaQueryListeners: removeMediaQueryListeners, getCurrentOptions: function getCurrentOptions() { return Chartist.extend({}, currentOptions); }, }; }; /** * Splits a list of coordinates and associated values into segments. Each returned segment contains a pathCoordinates * valueData property describing the segment. * * With the default options, segments consist of contiguous sets of points that do not have an undefined value. Any * points with undefined values are discarded. * * **Options** * The following options are used to determine how segments are formed * ```javascript * var options = { * // If fillHoles is true, undefined values are simply discarded without creating a new segment. Assuming other options are default, this returns single segment. * fillHoles: false, * // If increasingX is true, the coordinates in all segments have strictly increasing x-values. * increasingX: false * }; * ``` * * @memberof Chartist.Core * @param {Array} pathCoordinates List of point coordinates to be split in the form [x1, y1, x2, y2 ... xn, yn] * @param {Array} values List of associated point values in the form [v1, v2 .. vn] * @param {Object} options Options set by user * @return {Array} List of segments, each containing a pathCoordinates and valueData property. */ Chartist.splitIntoSegments = function ( pathCoordinates, valueData, options, ) { var defaultOptions = { increasingX: false, fillHoles: false, }; options = Chartist.extend({}, defaultOptions, options); var segments = []; var hole = true; for (var i = 0; i < pathCoordinates.length; i += 2) { // If this value is a "hole" we set the hole flag if (Chartist.getMultiValue(valueData[i / 2].value) === undefined) { // if(valueData[i / 2].value === undefined) { if (!options.fillHoles) { hole = true; } } else { if ( options.increasingX && i >= 2 && pathCoordinates[i] <= pathCoordinates[i - 2] ) { // X is not increasing, so we need to make sure we start a new segment hole = true; } // If it's a valid value we need to check if we're coming out of a hole and create a new empty segment if (hole) { segments.push({ pathCoordinates: [], valueData: [], }); // As we have a valid value now, we are not in a "hole" anymore hole = false; } // Add to the segment pathCoordinates and valueData segments[segments.length - 1].pathCoordinates.push( pathCoordinates[i], pathCoordinates[i + 1], ); segments[segments.length - 1].valueData.push(valueData[i / 2]); } } return segments; }; })(window, document, Chartist); /** * Chartist path interpolation functions. * * @module Chartist.Interpolation */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; Chartist.Interpolation = {}; /** * This interpolation function does not smooth the path and the result is only containing lines and no curves. * * @example * var chart = new Chartist.Line('.ct-chart', { * labels: [1, 2, 3, 4, 5], * series: [[1, 2, 8, 1, 7]] * }, { * lineSmooth: Chartist.Interpolation.none({ * fillHoles: false * }) * }); * * * @memberof Chartist.Interpolation * @return {Function} */ Chartist.Interpolation.none = function (options) { var defaultOptions = { fillHoles: false, }; options = Chartist.extend({}, defaultOptions, options); return function none(pathCoordinates, valueData) { var path = new Chartist.Svg.Path(); var hole = true; for (var i = 0; i < pathCoordinates.length; i += 2) { var currX = pathCoordinates[i]; var currY = pathCoordinates[i + 1]; var currData = valueData[i / 2]; if (Chartist.getMultiValue(currData.value) !== undefined) { if (hole) { path.move(currX, currY, false, currData); } else { path.line(currX, currY, false, currData); } hole = false; } else if (!options.fillHoles) { hole = true; } } return path; }; }; /** * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing. * * Simple smoothing can be used instead of `Chartist.Smoothing.cardinal` if you'd like to get rid of the artifacts it produces sometimes. Simple smoothing produces less flowing lines but is accurate by hitting the points and it also doesn't swing below or above the given data point. * * All smoothing functions within Chartist are factory functions that accept an options parameter. The simple interpolation function accepts one configuration parameter `divisor`, between 1 and ∞, which controls the smoothing characteristics. * * @example * var chart = new Chartist.Line('.ct-chart', { * labels: [1, 2, 3, 4, 5], * series: [[1, 2, 8, 1, 7]] * }, { * lineSmooth: Chartist.Interpolation.simple({ * divisor: 2, * fillHoles: false * }) * }); * * * @memberof Chartist.Interpolation * @param {Object} options The options of the simple interpolation factory function. * @return {Function} */ Chartist.Interpolation.simple = function (options) { var defaultOptions = { divisor: 2, fillHoles: false, }; options = Chartist.extend({}, defaultOptions, options); var d = 1 / Math.max(1, options.divisor); return function simple(pathCoordinates, valueData) { var path = new Chartist.Svg.Path(); var prevX, prevY, prevData; for (var i = 0; i < pathCoordinates.length; i += 2) { var currX = pathCoordinates[i]; var currY = pathCoordinates[i + 1]; var length = (currX - prevX) * d; var currData = valueData[i / 2]; if (currData.value !== undefined) { if (prevData === undefined) { path.move(currX, currY, false, currData); } else { path.curve( prevX + length, prevY, currX - length, currY, currX, currY, false, currData, ); } prevX = currX; prevY = currY; prevData = currData; } else if (!options.fillHoles) { prevX = currX = prevData = undefined; } } return path; }; }; /** * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results. * * Cardinal splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`. * * All smoothing functions within Chartist are factory functions that accept an options parameter. The cardinal interpolation function accepts one configuration parameter `tension`, between 0 and 1, which controls the smoothing intensity. * * @example * var chart = new Chartist.Line('.ct-chart', { * labels: [1, 2, 3, 4, 5], * series: [[1, 2, 8, 1, 7]] * }, { * lineSmooth: Chartist.Interpolation.cardinal({ * tension: 1, * fillHoles: false * }) * }); * * @memberof Chartist.Interpolation * @param {Object} options The options of the cardinal factory function. * @return {Function} */ Chartist.Interpolation.cardinal = function (options) { var defaultOptions = { tension: 1, fillHoles: false, }; options = Chartist.extend({}, defaultOptions, options); var t = Math.min(1, Math.max(0, options.tension)), c = 1 - t; return function cardinal(pathCoordinates, valueData) { // First we try to split the coordinates into segments // This is necessary to treat "holes" in line charts var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, { fillHoles: options.fillHoles, }); if (!segments.length) { // If there were no segments return 'Chartist.Interpolation.none' return Chartist.Interpolation.none()([]); } else if (segments.length > 1) { // If the split resulted in more that one segment we need to interpolate each segment individually and join them // afterwards together into a single path. var paths = []; // For each segment we will recurse the cardinal function segments.forEach(function (segment) { paths.push(cardinal(segment.pathCoordinates, segment.valueData)); }); // Join the segment path data into a single path and return return Chartist.Svg.Path.join(paths); } else { // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first // segment pathCoordinates = segments[0].pathCoordinates; valueData = segments[0].valueData; // If less than two points we need to fallback to no smoothing if (pathCoordinates.length <= 4) { return Chartist.Interpolation.none()(pathCoordinates, valueData); } var path = new Chartist.Svg.Path().move( pathCoordinates[0], pathCoordinates[1], false, valueData[0], ), z; for ( var i = 0, iLen = pathCoordinates.length; iLen - 2 * !z > i; i += 2 ) { var p = [ { x: +pathCoordinates[i - 2], y: +pathCoordinates[i - 1] }, { x: +pathCoordinates[i], y: +pathCoordinates[i + 1] }, { x: +pathCoordinates[i + 2], y: +pathCoordinates[i + 3] }, { x: +pathCoordinates[i + 4], y: +pathCoordinates[i + 5] }, ]; if (z) { if (!i) { p[0] = { x: +pathCoordinates[iLen - 2], y: +pathCoordinates[iLen - 1], }; } else if (iLen - 4 === i) { p[3] = { x: +pathCoordinates[0], y: +pathCoordinates[1] }; } else if (iLen - 2 === i) { p[2] = { x: +pathCoordinates[0], y: +pathCoordinates[1] }; p[3] = { x: +pathCoordinates[2], y: +pathCoordinates[3] }; } } else { if (iLen - 4 === i) { p[3] = p[2]; } else if (!i) { p[0] = { x: +pathCoordinates[i], y: +pathCoordinates[i + 1] }; } } path.curve( (t * (-p[0].x + 6 * p[1].x + p[2].x)) / 6 + c * p[2].x, (t * (-p[0].y + 6 * p[1].y + p[2].y)) / 6 + c * p[2].y, (t * (p[1].x + 6 * p[2].x - p[3].x)) / 6 + c * p[2].x, (t * (p[1].y + 6 * p[2].y - p[3].y)) / 6 + c * p[2].y, p[2].x, p[2].y, false, valueData[(i + 2) / 2], ); } return path; } }; }; /** * Monotone Cubic spline interpolation produces a smooth curve which preserves monotonicity. Unlike cardinal splines, the curve will not extend beyond the range of y-values of the original data points. * * Monotone Cubic splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`. * * The x-values of subsequent points must be increasing to fit a Monotone Cubic spline. If this condition is not met for a pair of adjacent points, then there will be a break in the curve between those data points. * * All smoothing functions within Chartist are factory functions that accept an options parameter. * * @example * var chart = new Chartist.Line('.ct-chart', { * labels: [1, 2, 3, 4, 5], * series: [[1, 2, 8, 1, 7]] * }, { * lineSmooth: Chartist.Interpolation.monotoneCubic({ * fillHoles: false * }) * }); * * @memberof Chartist.Interpolation * @param {Object} options The options of the monotoneCubic factory function. * @return {Function} */ Chartist.Interpolation.monotoneCubic = function (options) { var defaultOptions = { fillHoles: false, }; options = Chartist.extend({}, defaultOptions, options); return function monotoneCubic(pathCoordinates, valueData) { // First we try to split the coordinates into segments // This is necessary to treat "holes" in line charts var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, { fillHoles: options.fillHoles, increasingX: true, }); if (!segments.length) { // If there were no segments return 'Chartist.Interpolation.none' return Chartist.Interpolation.none()([]); } else if (segments.length > 1) { // If the split resulted in more that one segment we need to interpolate each segment individually and join them // afterwards together into a single path. var paths = []; // For each segment we will recurse the monotoneCubic fn function segments.forEach(function (segment) { paths.push( monotoneCubic(segment.pathCoordinates, segment.valueData), ); }); // Join the segment path data into a single path and return return Chartist.Svg.Path.join(paths); } else { // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first // segment pathCoordinates = segments[0].pathCoordinates; valueData = segments[0].valueData; // If less than three points we need to fallback to no smoothing if (pathCoordinates.length <= 4) { return Chartist.Interpolation.none()(pathCoordinates, valueData); } var xs = [], ys = [], i, n = pathCoordinates.length / 2, ms = [], ds = [], dys = [], dxs = [], path; // Populate x and y coordinates into separate arrays, for readability for (i = 0; i < n; i++) { xs[i] = pathCoordinates[i * 2]; ys[i] = pathCoordinates[i * 2 + 1]; } // Calculate deltas and derivative for (i = 0; i < n - 1; i++) { dys[i] = ys[i + 1] - ys[i]; dxs[i] = xs[i + 1] - xs[i]; ds[i] = dys[i] / dxs[i]; } // Determine desired slope (m) at each point using Fritsch-Carlson method // See: http://math.stackexchange.com/questions/45218/implementation-of-monotone-cubic-interpolation ms[0] = ds[0]; ms[n - 1] = ds[n - 2]; for (i = 1; i < n - 1; i++) { if (ds[i] === 0 || ds[i - 1] === 0 || ds[i - 1] > 0 !== ds[i] > 0) { ms[i] = 0; } else { ms[i] = (3 * (dxs[i - 1] + dxs[i])) / ((2 * dxs[i] + dxs[i - 1]) / ds[i - 1] + (dxs[i] + 2 * dxs[i - 1]) / ds[i]); if (!isFinite(ms[i])) { ms[i] = 0; } } } // Now build a path from the slopes path = new Chartist.Svg.Path().move( xs[0], ys[0], false, valueData[0], ); for (i = 0; i < n - 1; i++) { path.curve( // First control point xs[i] + dxs[i] / 3, ys[i] + (ms[i] * dxs[i]) / 3, // Second control point xs[i + 1] - dxs[i] / 3, ys[i + 1] - (ms[i + 1] * dxs[i]) / 3, // End point xs[i + 1], ys[i + 1], false, valueData[i + 1], ); } return path; } }; }; /** * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the `showPoint` option is enabled. * * All smoothing functions within Chartist are factory functions that accept an options parameter. The step interpolation function accepts one configuration parameter `postpone`, that can be `true` or `false`. The default value is `true` and will cause the step to occur where the value actually changes. If a different behaviour is needed where the step is shifted to the left and happens before the actual value, this option can be set to `false`. * * @example * var chart = new Chartist.Line('.ct-chart', { * labels: [1, 2, 3, 4, 5], * series: [[1, 2, 8, 1, 7]] * }, { * lineSmooth: Chartist.Interpolation.step({ * postpone: true, * fillHoles: false * }) * }); * * @memberof Chartist.Interpolation * @param options * @returns {Function} */ Chartist.Interpolation.step = function (options) { var defaultOptions = { postpone: true, fillHoles: false, }; options = Chartist.extend({}, defaultOptions, options); return function step(pathCoordinates, valueData) { var path = new Chartist.Svg.Path(); var prevX, prevY, prevData; for (var i = 0; i < pathCoordinates.length; i += 2) { var currX = pathCoordinates[i]; var currY = pathCoordinates[i + 1]; var currData = valueData[i / 2]; // If the current point is also not a hole we can draw the step lines if (currData.value !== undefined) { if (prevData === undefined) { path.move(currX, currY, false, currData); } else { if (options.postpone) { // If postponed we should draw the step line with the value of the previous value path.line(currX, prevY, false, prevData); } else { // If not postponed we should draw the step line with the value of the current value path.line(prevX, currY, false, currData); } // Line to the actual point (this should only be a Y-Axis movement path.line(currX, currY, false, currData); } prevX = currX; prevY = currY; prevData = currData; } else if (!options.fillHoles) { prevX = prevY = prevData = undefined; } } return path; }; }; })(window, document, Chartist); /** * A very basic event module that helps to generate and catch events. * * @module Chartist.Event */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; Chartist.EventEmitter = function () { var handlers = []; /** * Add an event handler for a specific event * * @memberof Chartist.Event * @param {String} event The event name * @param {Function} handler A event handler function */ function addEventHandler(event, handler) { handlers[event] = handlers[event] || []; handlers[event].push(handler); } /** * Remove an event handler of a specific event name or remove all event handlers for a specific event. * * @memberof Chartist.Event * @param {String} event The event name where a specific or all handlers should be removed * @param {Function} [handler] An optional event handler function. If specified only this specific handler will be removed and otherwise all handlers are removed. */ function removeEventHandler(event, handler) { // Only do something if there are event handlers with this name existing if (handlers[event]) { // If handler is set we will look for a specific handler and only remove this if (handler) { handlers[event].splice(handlers[event].indexOf(handler), 1); if (handlers[event].length === 0) { delete handlers[event]; } } else { // If no handler is specified we remove all handlers for this event delete handlers[event]; } } } /** * Use this function to emit an event. All handlers that are listening for this event will be triggered with the data parameter. * * @memberof Chartist.Event * @param {String} event The event name that should be triggered * @param {*} data Arbitrary data that will be passed to the event handler callback functions */ function emit(event, data) { // Only do something if there are event handlers with this name existing if (handlers[event]) { handlers[event].forEach(function (handler) { handler(data); }); } // Emit event to star event handlers if (handlers["*"]) { handlers["*"].forEach(function (starHandler) { starHandler(event, data); }); } } return { addEventHandler: addEventHandler, removeEventHandler: removeEventHandler, emit: emit, }; }; })(window, document, Chartist); /** * This module provides some basic prototype inheritance utilities. * * @module Chartist.Class */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; function listToArray(list) { var arr = []; if (list.length) { for (var i = 0; i < list.length; i++) { arr.push(list[i]); } } return arr; } /** * Method to extend from current prototype. * * @memberof Chartist.Class * @param {Object} properties The object that serves as definition for the prototype that gets created for the new class. This object should always contain a constructor property that is the desired constructor for the newly created class. * @param {Object} [superProtoOverride] By default extens will use the current class prototype or Chartist.class. With this parameter you can specify any super prototype that will be used. * @return {Function} Constructor function of the new class * * @example * var Fruit = Class.extend({ * color: undefined, * sugar: undefined, * * constructor: function(color, sugar) { * this.color = color; * this.sugar = sugar; * }, * * eat: function() { * this.sugar = 0; * return this; * } * }); * * var Banana = Fruit.extend({ * length: undefined, * * constructor: function(length, sugar) { * Banana.super.constructor.call(this, 'Yellow', sugar); * this.length = length; * } * }); * * var banana = new Banana(20, 40); * console.log('banana instanceof Fruit', banana instanceof Fruit); * console.log('Fruit is prototype of banana', Fruit.prototype.isPrototypeOf(banana)); * console.log('bananas prototype is Fruit', Object.getPrototypeOf(banana) === Fruit.prototype); * console.log(banana.sugar); * console.log(banana.eat().sugar); * console.log(banana.color); */ function extend(properties, superProtoOverride) { var superProto = superProtoOverride || this.prototype || Chartist.Class; var proto = Object.create(superProto); Chartist.Class.cloneDefinitions(proto, properties); var constr = function () { var fn = proto.constructor || function () {}, instance; // If this is linked to the Chartist namespace the constructor was not called with new // To provide a fallback we will instantiate here and return the instance instance = this === Chartist ? Object.create(proto) : this; fn.apply(instance, Array.prototype.slice.call(arguments, 0)); // If this constructor was not called with new we need to return the instance // This will not harm when the constructor has been called with new as the returned value is ignored return instance; }; constr.prototype = proto; constr.super = superProto; constr.extend = this.extend; return constr; } // Variable argument list clones args > 0 into args[0] and retruns modified args[0] function cloneDefinitions() { var args = listToArray(arguments); var target = args[0]; args.splice(1, args.length - 1).forEach(function (source) { Object.getOwnPropertyNames(source).forEach(function (propName) { // If this property already exist in target we delete it first delete target[propName]; // Define the property with the descriptor from source Object.defineProperty( target, propName, Object.getOwnPropertyDescriptor(source, propName), ); }); }); return target; } Chartist.Class = { extend: extend, cloneDefinitions: cloneDefinitions, }; })(window, document, Chartist); /** * Base for all chart types. The methods in Chartist.Base are inherited to all chart types. * * @module Chartist.Base */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; // TODO: Currently we need to re-draw the chart on window resize. This is usually very bad and will affect performance. // This is done because we can't work with relative coordinates when drawing the chart because SVG Path does not // work with relative positions yet. We need to check if we can do a viewBox hack to switch to percentage. // See http://mozilla.6506.n7.nabble.com/Specyfing-paths-with-percentages-unit-td247474.html // Update: can be done using the above method tested here: http://codepen.io/gionkunz/pen/KDvLj // The problem is with the label offsets that can't be converted into percentage and affecting the chart container /** * Updates the chart which currently does a full reconstruction of the SVG DOM * * @param {Object} [data] Optional data you'd like to set for the chart before it will update. If not specified the update method will use the data that is already configured with the chart. * @param {Object} [options] Optional options you'd like to add to the previous options for the chart before it will update. If not specified the update method will use the options that have been already configured with the chart. * @param {Boolean} [override] If set to true, the passed options will be used to extend the options that have been configured already. Otherwise the chart default options will be used as the base * @memberof Chartist.Base */ function update(data, options, override) { if (data) { this.data = data || {}; this.data.labels = this.data.labels || []; this.data.series = this.data.series || []; // Event for data transformation that allows to manipulate the data before it gets rendered in the charts this.eventEmitter.emit("data", { type: "update", data: this.data, }); } if (options) { this.options = Chartist.extend( {}, override ? this.options : this.defaultOptions, options, ); // If chartist was not initialized yet, we just set the options and leave the rest to the initialization // Otherwise we re-create the optionsProvider at this point if (!this.initializeTimeoutId) { this.optionsProvider.removeMediaQueryListeners(); this.optionsProvider = Chartist.optionsProvider( this.options, this.responsiveOptions, this.eventEmitter, ); } } // Only re-created the chart if it has been initialized yet if (!this.initializeTimeoutId) { this.createChart(this.optionsProvider.getCurrentOptions()); } // Return a reference to the chart object to chain up calls return this; } /** * This method can be called on the API object of each chart and will un-register all event listeners that were added to other components. This currently includes a globalThis.resize listener as well as media query listeners if any responsive options have been provided. Use this function if you need to destroy and recreate Chartist charts dynamically. * * @memberof Chartist.Base */ function detach() { // Only detach if initialization already occurred on this chart. If this chart still hasn't initialized (therefore // the initializationTimeoutId is still a valid timeout reference, we will clear the timeout if (!this.initializeTimeoutId) { globalThis.removeEventListener("resize", this.resizeListener); this.optionsProvider.removeMediaQueryListeners(); } else { globalThis.clearTimeout(this.initializeTimeoutId); } return this; } /** * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop. * * @memberof Chartist.Base * @param {String} event Name of the event. Check the examples for supported events. * @param {Function} handler The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details. */ function on(event, handler) { this.eventEmitter.addEventHandler(event, handler); return this; } /** * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered. * * @memberof Chartist.Base * @param {String} event Name of the event for which a handler should be removed * @param {Function} [handler] The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list. */ function off(event, handler) { this.eventEmitter.removeEventHandler(event, handler); return this; } function initialize() { // Add window resize listener that re-creates the chart globalThis.addEventListener("resize", this.resizeListener); // Obtain current options based on matching media queries (if responsive options are given) // This will also register a listener that is re-creating the chart based on media changes this.optionsProvider = Chartist.optionsProvider( this.options, this.responsiveOptions, this.eventEmitter, ); // Register options change listener that will trigger a chart update this.eventEmitter.addEventHandler( "optionsChanged", function () { this.update(); }.bind(this), ); // Before the first chart creation we need to register us with all plugins that are configured // Initialize all relevant plugins with our chart object and the plugin options specified in the config if (this.options.plugins) { this.options.plugins.forEach( function (plugin) { if (plugin instanceof Array) { plugin[0](this, plugin[1]); } else { plugin(this); } }.bind(this), ); } // Event for data transformation that allows to manipulate the data before it gets rendered in the charts this.eventEmitter.emit("data", { type: "initial", data: this.data, }); // Create the first chart this.createChart(this.optionsProvider.getCurrentOptions()); // As chart is initialized from the event loop now we can reset our timeout reference // This is important if the chart gets initialized on the same element twice this.initializeTimeoutId = undefined; } /** * Constructor of chart base class. * * @param query * @param data * @param defaultOptions * @param options * @param responsiveOptions * @constructor */ function Base(query, data, defaultOptions, options, responsiveOptions) { this.container = Chartist.querySelector(query); this.data = data || {}; this.data.labels = this.data.labels || []; this.data.series = this.data.series || []; this.defaultOptions = defaultOptions; this.options = options; this.responsiveOptions = responsiveOptions; this.eventEmitter = Chartist.EventEmitter(); this.supportsForeignObject = Chartist.Svg.isSupported("Extensibility"); this.supportsAnimations = Chartist.Svg.isSupported( "AnimationEventsAttribute", ); this.resizeListener = function resizeListener() { this.update(); }.bind(this); if (this.container) { // If chartist was already initialized in this container we are detaching all event listeners first if (this.container.__chartist__) { this.container.__chartist__.detach(); } this.container.__chartist__ = this; } // Using event loop for first draw to make it possible to register event listeners in the same call stack where // the chart was created. this.initializeTimeoutId = setTimeout(initialize.bind(this), 0); } // Creating the chart base class Chartist.Base = Chartist.Class.extend({ constructor: Base, optionsProvider: undefined, container: undefined, svg: undefined, eventEmitter: undefined, createChart: function () { throw new Error("Base chart type can't be instantiated!"); }, update: update, detach: detach, on: on, off: off, version: Chartist.version, supportsForeignObject: false, }); })(window, document, Chartist); /** * Chartist SVG module for simple SVG DOM abstraction * * @module Chartist.Svg */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; /** * Chartist.Svg creates a new SVG object wrapper with a starting element. You can use the wrapper to fluently create sub-elements and modify them. * * @memberof Chartist.Svg * @constructor * @param {String|Element} name The name of the SVG element to create or an SVG dom element which should be wrapped into Chartist.Svg * @param {Object} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. * @param {String} className This class or class list will be added to the SVG element * @param {Object} parent The parent SVG wrapper object where this newly created wrapper and it's element will be attached to as child * @param {Boolean} insertFirst If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element */ function Svg(name, attributes, className, parent, insertFirst) { // If Svg is getting called with an SVG element we just return the wrapper if (name instanceof Element) { this._node = name; } else { this._node = globalThis.document.createElementNS( Chartist.namespaces.svg, name, ); // If this is an SVG element created then custom namespace if (name === "svg") { this.attr({ "xmlns:ct": Chartist.namespaces.ct, }); } } if (attributes) { this.attr(attributes); } if (className) { this.addClass(className); } if (parent) { if (insertFirst && parent._node.firstChild) { parent._node.insertBefore(this._node, parent._node.firstChild); } else { parent._node.appendChild(this._node); } } } /** * Set attributes on the current SVG element of the wrapper you're currently working on. * * @memberof Chartist.Svg * @param {Object|String} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. If this parameter is a String then the function is used as a getter and will return the attribute value. * @param {String} [ns] If specified, the attribute will be obtained using getAttributeNs. In order to write namepsaced attributes you can use the namespace:attribute notation within the attributes object. * @return {Object|String} The current wrapper object will be returned so it can be used for chaining or the attribute value if used as getter function. */ function attr(attributes, ns) { if (typeof attributes === "string") { if (ns) { return this._node.getAttributeNS(ns, attributes); } else { return this._node.getAttribute(attributes); } } Object.keys(attributes).forEach( function (key) { // If the attribute value is undefined we can skip this one if (attributes[key] === undefined) { return; } if (key.indexOf(":") !== -1) { var namespacedAttribute = key.split(":"); this._node.setAttributeNS( Chartist.namespaces[namespacedAttribute[0]], key, attributes[key], ); } else { this._node.setAttribute(key, attributes[key]); } }.bind(this), ); return this; } /** * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily. * * @memberof Chartist.Svg * @param {String} name The name of the SVG element that should be created as child element of the currently selected element wrapper * @param {Object} [attributes] An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. * @param {String} [className] This class or class list will be added to the SVG element * @param {Boolean} [insertFirst] If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element * @return {Chartist.Svg} Returns a Chartist.Svg wrapper object that can be used to modify the containing SVG data */ function elem(name, attributes, className, insertFirst) { return new Chartist.Svg(name, attributes, className, this, insertFirst); } /** * Returns the parent Chartist.SVG wrapper object * * @memberof Chartist.Svg * @return {Chartist.Svg} Returns a Chartist.Svg wrapper around the parent node of the current node. If the parent node is not existing or it's not an SVG node then this function will return null. */ function parent() { return this._node.parentNode instanceof SVGElement ? new Chartist.Svg(this._node.parentNode) : null; } /** * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree. * * @memberof Chartist.Svg * @return {Chartist.Svg} The root SVG element wrapped in a Chartist.Svg element */ function root() { var node = this._node; while (node.nodeName !== "svg") { node = node.parentNode; } return new Chartist.Svg(node); } /** * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper. * * @memberof Chartist.Svg * @param {String} selector A CSS selector that is used to query for child SVG elements * @return {Chartist.Svg} The SVG wrapper for the element found or null if no element was found */ function querySelector(selector) { var foundNode = this._node.querySelector(selector); return foundNode ? new Chartist.Svg(foundNode) : null; } /** * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper. * * @memberof Chartist.Svg * @param {String} selector A CSS selector that is used to query for child SVG elements * @return {Chartist.Svg.List} The SVG wrapper list for the element found or null if no element was found */ function querySelectorAll(selector) { var foundNodes = this._node.querySelectorAll(selector); return foundNodes.length ? new Chartist.Svg.List(foundNodes) : null; } /** * Returns the underlying SVG node for the current element. * * @memberof Chartist.Svg * @returns {Node} */ function getNode() { return this._node; } /** * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM. * * @memberof Chartist.Svg * @param {Node|String} content The DOM Node, or HTML string that will be converted to a DOM Node, that is then placed into and wrapped by the foreignObject * @param {String} [attributes] An object with properties that will be added as attributes to the foreignObject element that is created. Attributes with undefined values will not be added. * @param {String} [className] This class or class list will be added to the SVG element * @param {Boolean} [insertFirst] Specifies if the foreignObject should be inserted as first child * @return {Chartist.Svg} New wrapper object that wraps the foreignObject element */ function foreignObject(content, attributes, className, insertFirst) { // If content is string then we convert it to DOM // TODO: Handle case where content is not a string nor a DOM Node if (typeof content === "string") { var container = globalThis.document.createElement("div"); container.innerHTML = content; content = container.firstChild; } // Adding namespace to content element content.setAttribute("xmlns", Chartist.namespaces.xmlns); // Creating the foreignObject without required extension attribute (as described here // http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement) var fnObj = this.elem( "foreignObject", attributes, className, insertFirst, ); // Add content to foreignObjectElement fnObj._node.appendChild(content); return fnObj; } /** * This method adds a new text element to the current Chartist.Svg wrapper. * * @memberof Chartist.Svg * @param {String} t The text that should be added to the text element that is created * @return {Chartist.Svg} The same wrapper object that was used to add the newly created element */ function text(t) { this._node.appendChild(globalThis.document.createTextNode(t)); return this; } /** * This method will clear all child nodes of the current wrapper object. * * @memberof Chartist.Svg * @return {Chartist.Svg} The same wrapper object that got emptied */ function empty() { while (this._node.firstChild) { this._node.removeChild(this._node.firstChild); } return this; } /** * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure. * * @memberof Chartist.Svg * @return {Chartist.Svg} The parent wrapper object of the element that got removed */ function remove() { this._node.parentNode.removeChild(this._node); return this.parent(); } /** * This method will replace the element with a new element that can be created outside of the current DOM. * * @memberof Chartist.Svg * @param {Chartist.Svg} newElement The new Chartist.Svg object that will be used to replace the current wrapper object * @return {Chartist.Svg} The wrapper of the new element */ function replace(newElement) { this._node.parentNode.replaceChild(newElement._node, this._node); return newElement; } /** * This method will append an element to the current element as a child. * * @memberof Chartist.Svg * @param {Chartist.Svg} element The Chartist.Svg element that should be added as a child * @param {Boolean} [insertFirst] Specifies if the element should be inserted as first child * @return {Chartist.Svg} The wrapper of the appended object */ function append(element, insertFirst) { if (insertFirst && this._node.firstChild) { this._node.insertBefore(element._node, this._node.firstChild); } else { this._node.appendChild(element._node); } return this; } /** * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further. * * @memberof Chartist.Svg * @return {Array} A list of classes or an empty array if there are no classes on the current element */ function classes() { return this._node.getAttribute("class") ? this._node.getAttribute("class").trim().split(/\s+/) : []; } /** * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once. * * @memberof Chartist.Svg * @param {String} names A white space separated list of class names * @return {Chartist.Svg} The wrapper of the current element */ function addClass(names) { this._node.setAttribute( "class", this.classes(this._node) .concat(names.trim().split(/\s+/)) .filter(function (elem, pos, self) { return self.indexOf(elem) === pos; }) .join(" "), ); return this; } /** * Removes one or a space separated list of classes from the current element. * * @memberof Chartist.Svg * @param {String} names A white space separated list of class names * @return {Chartist.Svg} The wrapper of the current element */ function removeClass(names) { var removedClasses = names.trim().split(/\s+/); this._node.setAttribute( "class", this.classes(this._node) .filter(function (name) { return removedClasses.indexOf(name) === -1; }) .join(" "), ); return this; } /** * Removes all classes from the current element. * * @memberof Chartist.Svg * @return {Chartist.Svg} The wrapper of the current element */ function removeAllClasses() { this._node.setAttribute("class", ""); return this; } /** * Get element height using `getBoundingClientRect` * * @memberof Chartist.Svg * @return {Number} The elements height in pixels */ function height() { return this._node.getBoundingClientRect().height; } /** * Get element width using `getBoundingClientRect` * * @memberof Chartist.Core * @return {Number} The elements width in pixels */ function width() { return this._node.getBoundingClientRect().width; } /** * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. Please refer to http://www.w3.org/TR/SVG/animate.html for a detailed specification about the available animation attributes. Additionally an easing property can be passed in the animation definition object. This can be a string with a name of an easing function in `Chartist.Svg.Easing` or an array with four numbers specifying a cubic Bézier curve. * **An animations object could look like this:** * ```javascript * element.animate({ * opacity: { * dur: 1000, * from: 0, * to: 1 * }, * x1: { * dur: '1000ms', * from: 100, * to: 200, * easing: 'easeOutQuart' * }, * y1: { * dur: '2s', * from: 0, * to: 100 * } * }); * ``` * **Automatic unit conversion** * For the `dur` and the `begin` animate attribute you can also omit a unit by passing a number. The number will automatically be converted to milli seconds. * **Guided mode** * The default behavior of SMIL animations with offset using the `begin` attribute is that the attribute will keep it's original value until the animation starts. Mostly this behavior is not desired as you'd like to have your element attributes already initialized with the animation `from` value even before the animation starts. Also if you don't specify `fill="freeze"` on an animate element or if you delete the animation after it's done (which is done in guided mode) the attribute will switch back to the initial value. This behavior is also not desired when performing simple one-time animations. For one-time animations you'd want to trigger animations immediately instead of relative to the document begin time. That's why in guided mode Chartist.Svg will also use the `begin` property to schedule a timeout and manually start the animation after the timeout. If you're using multiple SMIL definition objects for an attribute (in an array), guided mode will be disabled for this attribute, even if you explicitly enabled it. * If guided mode is enabled the following behavior is added: * - Before the animation starts (even when delayed with `begin`) the animated attribute will be set already to the `from` value of the animation * - `begin` is explicitly set to `indefinite` so it can be started manually without relying on document begin time (creation) * - The animate element will be forced to use `fill="freeze"` * - The animation will be triggered with `beginElement()` in a timeout where `begin` of the definition object is interpreted in milli seconds. If no `begin` was specified the timeout is triggered immediately. * - After the animation the element attribute value will be set to the `to` value of the animation * - The animate element is deleted from the DOM * * @memberof Chartist.Svg * @param {Object} animations An animations object where the property keys are the attributes you'd like to animate. The properties should be objects again that contain the SMIL animation attributes (usually begin, dur, from, and to). The property begin and dur is auto converted (see Automatic unit conversion). You can also schedule multiple animations for the same attribute by passing an Array of SMIL definition objects. Attributes that contain an array of SMIL definition objects will not be executed in guided mode. * @param {Boolean} guided Specify if guided mode should be activated for this animation (see Guided mode). If not otherwise specified, guided mode will be activated. * @param {Object} eventEmitter If specified, this event emitter will be notified when an animation starts or ends. * @return {Chartist.Svg} The current element where the animation was added */ function animate(animations, guided, eventEmitter) { if (guided === undefined) { guided = true; } Object.keys(animations).forEach( function createAnimateForAttributes(attribute) { function createAnimate(animationDefinition, guided) { var attributeProperties = {}, animate, timeout, easing; // Check if an easing is specified in the definition object and delete it from the object as it will not // be part of the animate element attributes. if (animationDefinition.easing) { // If already an easing Bézier curve array we take it or we lookup a easing array in the Easing object easing = animationDefinition.easing instanceof Array ? animationDefinition.easing : Chartist.Svg.Easing[animationDefinition.easing]; delete animationDefinition.easing; } // If numeric dur or begin was provided we assume milli seconds animationDefinition.begin = Chartist.ensureUnit( animationDefinition.begin, "ms", ); animationDefinition.dur = Chartist.ensureUnit( animationDefinition.dur, "ms", ); if (easing) { animationDefinition.calcMode = "spline"; animationDefinition.keySplines = easing.join(" "); animationDefinition.keyTimes = "0;1"; } // Adding "fill: freeze" if we are in guided mode and set initial attribute values if (guided) { animationDefinition.fill = "freeze"; // Animated property on our element should already be set to the animation from value in guided mode attributeProperties[attribute] = animationDefinition.from; this.attr(attributeProperties); // In guided mode we also set begin to indefinite so we can trigger the start manually and put the begin // which needs to be in ms aside timeout = Chartist.quantity(animationDefinition.begin || 0).value; animationDefinition.begin = "indefinite"; } animate = this.elem( "animate", Chartist.extend( { attributeName: attribute, }, animationDefinition, ), ); if (guided) { // If guided we take the value that was put aside in timeout and trigger the animation manually with a timeout setTimeout( function () { // If beginElement fails we set the animated attribute to the end position and remove the animate element // This happens if the SMIL ElementTimeControl interface is not supported or any other problems occured in // the browser. (Currently FF 34 does not support animate elements in foreignObjects) try { animate._node.beginElement(); } catch (err) { // Set animated attribute to current animated value attributeProperties[attribute] = animationDefinition.to; this.attr(attributeProperties); // Remove the animate element as it's no longer required animate.remove(); } }.bind(this), timeout, ); } if (eventEmitter) { animate._node.addEventListener( "beginEvent", function handleBeginEvent() { eventEmitter.emit("animationBegin", { element: this, animate: animate._node, params: animationDefinition, }); }.bind(this), ); } animate._node.addEventListener( "endEvent", function handleEndEvent() { if (eventEmitter) { eventEmitter.emit("animationEnd", { element: this, animate: animate._node, params: animationDefinition, }); } if (guided) { // Set animated attribute to current animated value attributeProperties[attribute] = animationDefinition.to; this.attr(attributeProperties); // Remove the animate element as it's no longer required animate.remove(); } }.bind(this), ); } // If current attribute is an array of definition objects we create an animate for each and disable guided mode if (animations[attribute] instanceof Array) { animations[attribute].forEach( function (animationDefinition) { createAnimate.bind(this)(animationDefinition, false); }.bind(this), ); } else { createAnimate.bind(this)(animations[attribute], guided); } }.bind(this), ); return this; } Chartist.Svg = Chartist.Class.extend({ constructor: Svg, attr: attr, elem: elem, parent: parent, root: root, querySelector: querySelector, querySelectorAll: querySelectorAll, getNode: getNode, foreignObject: foreignObject, text: text, empty: empty, remove: remove, replace: replace, append: append, classes: classes, addClass: addClass, removeClass: removeClass, removeAllClasses: removeAllClasses, height: height, width: width, animate: animate, }); /** * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list. * * @memberof Chartist.Svg * @param {String} feature The SVG 1.1 feature that should be checked for support. * @return {Boolean} True of false if the feature is supported or not */ Chartist.Svg.isSupported = function (feature) { return globalThis.document.implementation.hasFeature( "http://www.w3.org/TR/SVG11/feature#" + feature, "1.1", ); }; /** * This Object contains some standard easing cubic bezier curves. Then can be used with their name in the `Chartist.Svg.animate`. You can also extend the list and use your own name in the `animate` function. Click the show code button to see the available bezier functions. * * @memberof Chartist.Svg */ var easingCubicBeziers = { easeInSine: [0.47, 0, 0.745, 0.715], easeOutSine: [0.39, 0.575, 0.565, 1], easeInOutSine: [0.445, 0.05, 0.55, 0.95], easeInQuad: [0.55, 0.085, 0.68, 0.53], easeOutQuad: [0.25, 0.46, 0.45, 0.94], easeInOutQuad: [0.455, 0.03, 0.515, 0.955], easeInCubic: [0.55, 0.055, 0.675, 0.19], easeOutCubic: [0.215, 0.61, 0.355, 1], easeInOutCubic: [0.645, 0.045, 0.355, 1], easeInQuart: [0.895, 0.03, 0.685, 0.22], easeOutQuart: [0.165, 0.84, 0.44, 1], easeInOutQuart: [0.77, 0, 0.175, 1], easeInQuint: [0.755, 0.05, 0.855, 0.06], easeOutQuint: [0.23, 1, 0.32, 1], easeInOutQuint: [0.86, 0, 0.07, 1], easeInExpo: [0.95, 0.05, 0.795, 0.035], easeOutExpo: [0.19, 1, 0.22, 1], easeInOutExpo: [1, 0, 0, 1], easeInCirc: [0.6, 0.04, 0.98, 0.335], easeOutCirc: [0.075, 0.82, 0.165, 1], easeInOutCirc: [0.785, 0.135, 0.15, 0.86], easeInBack: [0.6, -0.28, 0.735, 0.045], easeOutBack: [0.175, 0.885, 0.32, 1.275], easeInOutBack: [0.68, -0.55, 0.265, 1.55], }; Chartist.Svg.Easing = easingCubicBeziers; /** * This helper class is to wrap multiple `Chartist.Svg` elements into a list where you can call the `Chartist.Svg` functions on all elements in the list with one call. This is helpful when you'd like to perform calls with `Chartist.Svg` on multiple elements. * An instance of this class is also returned by `Chartist.Svg.querySelectorAll`. * * @memberof Chartist.Svg * @param {Array|NodeList} nodeList An Array of SVG DOM nodes or a SVG DOM NodeList (as returned by globalThis.document.querySelectorAll) * @constructor */ function SvgList(nodeList) { var list = this; this.svgElements = []; for (var i = 0; i < nodeList.length; i++) { this.svgElements.push(new Chartist.Svg(nodeList[i])); } // Add delegation methods for Chartist.Svg Object.keys(Chartist.Svg.prototype) .filter(function (prototypeProperty) { return ( [ "constructor", "parent", "querySelector", "querySelectorAll", "replace", "append", "classes", "height", "width", ].indexOf(prototypeProperty) === -1 ); }) .forEach(function (prototypeProperty) { list[prototypeProperty] = function () { var args = Array.prototype.slice.call(arguments, 0); list.svgElements.forEach(function (element) { Chartist.Svg.prototype[prototypeProperty].apply(element, args); }); return list; }; }); } Chartist.Svg.List = Chartist.Class.extend({ constructor: SvgList, }); })(window, document, Chartist); /** * Chartist SVG path module for SVG path description creation and modification. * * @module Chartist.Svg.Path */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; /** * Contains the descriptors of supported element types in a SVG path. Currently only move, line and curve are supported. * * @memberof Chartist.Svg.Path * @type {Object} */ var elementDescriptions = { m: ["x", "y"], l: ["x", "y"], c: ["x1", "y1", "x2", "y2", "x", "y"], a: ["rx", "ry", "xAr", "lAf", "sf", "x", "y"], }; /** * Default options for newly created SVG path objects. * * @memberof Chartist.Svg.Path * @type {Object} */ var defaultOptions = { // The accuracy in digit count after the decimal point. This will be used to round numbers in the SVG path. If this option is set to false then no rounding will be performed. accuracy: 3, }; function element(command, params, pathElements, pos, relative, data) { var pathElement = Chartist.extend( { command: relative ? command.toLowerCase() : command.toUpperCase(), }, params, data ? { data: data } : {}, ); pathElements.splice(pos, 0, pathElement); } function forEachParam(pathElements, cb) { pathElements.forEach(function (pathElement, pathElementIndex) { elementDescriptions[pathElement.command.toLowerCase()].forEach( function (paramName, paramIndex) { cb( pathElement, paramName, pathElementIndex, paramIndex, pathElements, ); }, ); }); } /** * Used to construct a new path object. * * @memberof Chartist.Svg.Path * @param {Boolean} close If set to true then this path will be closed when stringified (with a Z at the end) * @param {Object} options Options object that overrides the default objects. See default options for more details. * @constructor */ function SvgPath(close, options) { this.pathElements = []; this.pos = 0; this.close = close; this.options = Chartist.extend({}, defaultOptions, options); } /** * Gets or sets the current position (cursor) inside of the path. You can move around the cursor freely but limited to 0 or the count of existing elements. All modifications with element functions will insert new elements at the position of this cursor. * * @memberof Chartist.Svg.Path * @param {Number} [pos] If a number is passed then the cursor is set to this position in the path element array. * @return {Chartist.Svg.Path|Number} If the position parameter was passed then the return value will be the path object for easy call chaining. If no position parameter was passed then the current position is returned. */ function position(pos) { if (pos !== undefined) { this.pos = Math.max(0, Math.min(this.pathElements.length, pos)); return this; } else { return this.pos; } } /** * Removes elements from the path starting at the current position. * * @memberof Chartist.Svg.Path * @param {Number} count Number of path elements that should be removed from the current position. * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function remove(count) { this.pathElements.splice(this.pos, count); return this; } /** * Use this function to add a new move SVG path element. * * @memberof Chartist.Svg.Path * @param {Number} x The x coordinate for the move element. * @param {Number} y The y coordinate for the move element. * @param {Boolean} [relative] If set to true the move element will be created with relative coordinates (lowercase letter) * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function move(x, y, relative, data) { element( "M", { x: +x, y: +y, }, this.pathElements, this.pos++, relative, data, ); return this; } /** * Use this function to add a new line SVG path element. * * @memberof Chartist.Svg.Path * @param {Number} x The x coordinate for the line element. * @param {Number} y The y coordinate for the line element. * @param {Boolean} [relative] If set to true the line element will be created with relative coordinates (lowercase letter) * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function line(x, y, relative, data) { element( "L", { x: +x, y: +y, }, this.pathElements, this.pos++, relative, data, ); return this; } /** * Use this function to add a new curve SVG path element. * * @memberof Chartist.Svg.Path * @param {Number} x1 The x coordinate for the first control point of the bezier curve. * @param {Number} y1 The y coordinate for the first control point of the bezier curve. * @param {Number} x2 The x coordinate for the second control point of the bezier curve. * @param {Number} y2 The y coordinate for the second control point of the bezier curve. * @param {Number} x The x coordinate for the target point of the curve element. * @param {Number} y The y coordinate for the target point of the curve element. * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter) * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function curve(x1, y1, x2, y2, x, y, relative, data) { element( "C", { x1: +x1, y1: +y1, x2: +x2, y2: +y2, x: +x, y: +y, }, this.pathElements, this.pos++, relative, data, ); return this; } /** * Use this function to add a new non-bezier curve SVG path element. * * @memberof Chartist.Svg.Path * @param {Number} rx The radius to be used for the x-axis of the arc. * @param {Number} ry The radius to be used for the y-axis of the arc. * @param {Number} xAr Defines the orientation of the arc * @param {Number} lAf Large arc flag * @param {Number} sf Sweep flag * @param {Number} x The x coordinate for the target point of the curve element. * @param {Number} y The y coordinate for the target point of the curve element. * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter) * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function arc(rx, ry, xAr, lAf, sf, x, y, relative, data) { element( "A", { rx: +rx, ry: +ry, xAr: +xAr, lAf: +lAf, sf: +sf, x: +x, y: +y, }, this.pathElements, this.pos++, relative, data, ); return this; } /** * Parses an SVG path seen in the d attribute of path elements, and inserts the parsed elements into the existing path object at the current cursor position. Any closing path indicators (Z at the end of the path) will be ignored by the parser as this is provided by the close option in the options of the path object. * * @memberof Chartist.Svg.Path * @param {String} path Any SVG path that contains move (m), line (l) or curve (c) components. * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function parse(path) { // Parsing the SVG path string into an array of arrays [['M', '10', '10'], ['L', '100', '100']] var chunks = path .replace(/([A-Za-z])([0-9])/g, "$1 $2") .replace(/([0-9])([A-Za-z])/g, "$1 $2") .split(/[\s,]+/) .reduce(function (result, element) { if (element.match(/[A-Za-z]/)) { result.push([]); } result[result.length - 1].push(element); return result; }, []); // If this is a closed path we remove the Z at the end because this is determined by the close option if (chunks[chunks.length - 1][0].toUpperCase() === "Z") { chunks.pop(); } // Using svgPathElementDescriptions to map raw path arrays into objects that contain the command and the parameters // For example {command: 'M', x: '10', y: '10'} var elements = chunks.map(function (chunk) { var command = chunk.shift(), description = elementDescriptions[command.toLowerCase()]; return Chartist.extend( { command: command, }, description.reduce(function (result, paramName, index) { result[paramName] = +chunk[index]; return result; }, {}), ); }); // Preparing a splice call with the elements array as var arg params and insert the parsed elements at the current position var spliceArgs = [this.pos, 0]; Array.prototype.push.apply(spliceArgs, elements); Array.prototype.splice.apply(this.pathElements, spliceArgs); // Increase the internal position by the element count this.pos += elements.length; return this; } /** * This function renders to current SVG path object into a final SVG string that can be used in the d attribute of SVG path elements. It uses the accuracy option to round big decimals. If the close parameter was set in the constructor of this path object then a path closing Z will be appended to the output string. * * @memberof Chartist.Svg.Path * @return {String} */ function stringify() { var accuracyMultiplier = Math.pow(10, this.options.accuracy); return ( this.pathElements.reduce( function (path, pathElement) { var params = elementDescriptions[ pathElement.command.toLowerCase() ].map( function (paramName) { return this.options.accuracy ? Math.round(pathElement[paramName] * accuracyMultiplier) / accuracyMultiplier : pathElement[paramName]; }.bind(this), ); return path + pathElement.command + params.join(","); }.bind(this), "", ) + (this.close ? "Z" : "") ); } /** * Scales all elements in the current SVG path object. There is an individual parameter for each coordinate. Scaling will also be done for control points of curves, affecting the given coordinate. * * @memberof Chartist.Svg.Path * @param {Number} x The number which will be used to scale the x, x1 and x2 of all path elements. * @param {Number} y The number which will be used to scale the y, y1 and y2 of all path elements. * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function scale(x, y) { forEachParam(this.pathElements, function (pathElement, paramName) { pathElement[paramName] *= paramName[0] === "x" ? x : y; }); return this; } /** * Translates all elements in the current SVG path object. The translation is relative and there is an individual parameter for each coordinate. Translation will also be done for control points of curves, affecting the given coordinate. * * @memberof Chartist.Svg.Path * @param {Number} x The number which will be used to translate the x, x1 and x2 of all path elements. * @param {Number} y The number which will be used to translate the y, y1 and y2 of all path elements. * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function translate(x, y) { forEachParam(this.pathElements, function (pathElement, paramName) { pathElement[paramName] += paramName[0] === "x" ? x : y; }); return this; } /** * This function will run over all existing path elements and then loop over their attributes. The callback function will be called for every path element attribute that exists in the current path. * The method signature of the callback function looks like this: * ```javascript * function(pathElement, paramName, pathElementIndex, paramIndex, pathElements) * ``` * If something else than undefined is returned by the callback function, this value will be used to replace the old value. This allows you to build custom transformations of path objects that can't be achieved using the basic transformation functions scale and translate. * * @memberof Chartist.Svg.Path * @param {Function} transformFnc The callback function for the transformation. Check the signature in the function description. * @return {Chartist.Svg.Path} The current path object for easy call chaining. */ function transform(transformFnc) { forEachParam( this.pathElements, function ( pathElement, paramName, pathElementIndex, paramIndex, pathElements, ) { var transformed = transformFnc( pathElement, paramName, pathElementIndex, paramIndex, pathElements, ); if (transformed || transformed === 0) { pathElement[paramName] = transformed; } }, ); return this; } /** * This function clones a whole path object with all its properties. This is a deep clone and path element objects will also be cloned. * * @memberof Chartist.Svg.Path * @param {Boolean} [close] Optional option to set the new cloned path to closed. If not specified or false, the original path close option will be used. * @return {Chartist.Svg.Path} */ function clone(close) { var c = new Chartist.Svg.Path(close || this.close); c.pos = this.pos; c.pathElements = this.pathElements .slice() .map(function cloneElements(pathElement) { return Chartist.extend({}, pathElement); }); c.options = Chartist.extend({}, this.options); return c; } /** * Split a Svg.Path object by a specific command in the path chain. The path chain will be split and an array of newly created paths objects will be returned. This is useful if you'd like to split an SVG path by it's move commands, for example, in order to isolate chunks of drawings. * * @memberof Chartist.Svg.Path * @param {String} command The command you'd like to use to split the path * @return {Array} */ function splitByCommand(command) { var split = [new Chartist.Svg.Path()]; this.pathElements.forEach(function (pathElement) { if ( pathElement.command === command.toUpperCase() && split[split.length - 1].pathElements.length !== 0 ) { split.push(new Chartist.Svg.Path()); } split[split.length - 1].pathElements.push(pathElement); }); return split; } /** * This static function on `Chartist.Svg.Path` is joining multiple paths together into one paths. * * @memberof Chartist.Svg.Path * @param {Array} paths A list of paths to be joined together. The order is important. * @param {boolean} close If the newly created path should be a closed path * @param {Object} options Path options for the newly created path. * @return {Chartist.Svg.Path} */ function join(paths, close, options) { var joinedPath = new Chartist.Svg.Path(close, options); for (var i = 0; i < paths.length; i++) { var path = paths[i]; for (var j = 0; j < path.pathElements.length; j++) { joinedPath.pathElements.push(path.pathElements[j]); } } return joinedPath; } Chartist.Svg.Path = Chartist.Class.extend({ constructor: SvgPath, position: position, remove: remove, move: move, line: line, curve: curve, arc: arc, scale: scale, translate: translate, transform: transform, parse: parse, stringify: stringify, clone: clone, splitByCommand: splitByCommand, }); Chartist.Svg.Path.elementDescriptions = elementDescriptions; Chartist.Svg.Path.join = join; })(window, document, Chartist); /* global Chartist */ (function (window, document, Chartist) { "use strict"; var axisUnits = { x: { pos: "x", len: "width", dir: "horizontal", rectStart: "x1", rectEnd: "x2", rectOffset: "y2", }, y: { pos: "y", len: "height", dir: "vertical", rectStart: "y2", rectEnd: "y1", rectOffset: "x1", }, }; function Axis(units, chartRect, ticks, options) { this.units = units; this.counterUnits = units === axisUnits.x ? axisUnits.y : axisUnits.x; this.chartRect = chartRect; this.axisLength = chartRect[units.rectEnd] - chartRect[units.rectStart]; this.gridOffset = chartRect[units.rectOffset]; this.ticks = ticks; this.options = options; } function createGridAndLabels( gridGroup, labelGroup, useForeignObject, chartOptions, eventEmitter, ) { var axisOptions = chartOptions["axis" + this.units.pos.toUpperCase()]; var projectedValues = this.ticks.map(this.projectValue.bind(this)); var labelValues = this.ticks.map(axisOptions.labelInterpolationFnc); projectedValues.forEach( function (projectedValue, index) { var labelOffset = { x: 0, y: 0, }; // TODO: Find better solution for solving this problem // Calculate how much space we have available for the label var labelLength; if (projectedValues[index + 1]) { // If we still have one label ahead, we can calculate the distance to the next tick / label labelLength = projectedValues[index + 1] - projectedValue; } else { // If we don't have a label ahead and we have only two labels in total, we just take the remaining distance to // on the whole axis length. We limit that to a minimum of 30 pixel, so that labels close to the border will // still be visible inside of the chart padding. labelLength = Math.max(this.axisLength - projectedValue, 30); } // Skip grid lines and labels where interpolated label values are falsey (execpt for 0) if ( Chartist.isFalseyButZero(labelValues[index]) && labelValues[index] !== "" ) { return; } // Transform to global coordinates using the chartRect // We also need to set the label offset for the createLabel function if (this.units.pos === "x") { projectedValue = this.chartRect.x1 + projectedValue; labelOffset.x = chartOptions.axisX.labelOffset.x; // If the labels should be positioned in start position (top side for vertical axis) we need to set a // different offset as for positioned with end (bottom) if (chartOptions.axisX.position === "start") { labelOffset.y = this.chartRect.padding.top + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20); } else { labelOffset.y = this.chartRect.y1 + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20); } } else { projectedValue = this.chartRect.y1 - projectedValue; labelOffset.y = chartOptions.axisY.labelOffset.y - (useForeignObject ? labelLength : 0); // If the labels should be positioned in start position (left side for horizontal axis) we need to set a // different offset as for positioned with end (right side) if (chartOptions.axisY.position === "start") { labelOffset.x = useForeignObject ? this.chartRect.padding.left + chartOptions.axisY.labelOffset.x : this.chartRect.x1 - 10; } else { labelOffset.x = this.chartRect.x2 + chartOptions.axisY.labelOffset.x + 10; } } if (axisOptions.showGrid) { Chartist.createGrid( projectedValue, index, this, this.gridOffset, this.chartRect[this.counterUnits.len](), gridGroup, [ chartOptions.classNames.grid, chartOptions.classNames[this.units.dir], ], eventEmitter, ); } if (axisOptions.showLabel) { Chartist.createLabel( projectedValue, labelLength, index, labelValues, this, axisOptions.offset, labelOffset, labelGroup, [ chartOptions.classNames.label, chartOptions.classNames[this.units.dir], axisOptions.position === "start" ? chartOptions.classNames[axisOptions.position] : chartOptions.classNames["end"], ], useForeignObject, eventEmitter, ); } }.bind(this), ); } Chartist.Axis = Chartist.Class.extend({ constructor: Axis, createGridAndLabels: createGridAndLabels, projectValue: function (value, index, data) { throw new Error("Base axis can't be instantiated!"); }, }); Chartist.Axis.units = axisUnits; })(window, document, Chartist); /** * The auto scale axis uses standard linear scale projection of values along an axis. It uses order of magnitude to find a scale automatically and evaluates the available space in order to find the perfect amount of ticks for your chart. * **Options** * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings. * ```javascript * var options = { * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored * high: 100, * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored * low: 0, * // This option will be used when finding the right scale division settings. The amount of ticks on the scale will be determined so that as many ticks as possible will be displayed, while not violating this minimum required space (in pixel). * scaleMinSpace: 20, * // Can be set to true or false. If set to true, the scale will be generated with whole numbers only. * onlyInteger: true, * // The reference value can be used to make sure that this value will always be on the chart. This is especially useful on bipolar charts where the bipolar center always needs to be part of the chart. * referenceValue: 5 * }; * ``` * * @module Chartist.AutoScaleAxis */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; function AutoScaleAxis(axisUnit, data, chartRect, options) { // Usually we calculate highLow based on the data but this can be overriden by a highLow object in the options var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos); this.bounds = Chartist.getBounds( chartRect[axisUnit.rectEnd] - chartRect[axisUnit.rectStart], highLow, options.scaleMinSpace || 20, options.onlyInteger, ); this.range = { min: this.bounds.min, max: this.bounds.max, }; Chartist.AutoScaleAxis.super.constructor.call( this, axisUnit, chartRect, this.bounds.values, options, ); } function projectValue(value) { return ( (this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.bounds.min)) / this.bounds.range ); } Chartist.AutoScaleAxis = Chartist.Axis.extend({ constructor: AutoScaleAxis, projectValue: projectValue, }); })(window, document, Chartist); /** * The fixed scale axis uses standard linear projection of values along an axis. It makes use of a divisor option to divide the range provided from the minimum and maximum value or the options high and low that will override the computed minimum and maximum. * **Options** * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings. * ```javascript * var options = { * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored * high: 100, * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored * low: 0, * // If specified then the value range determined from minimum to maximum (or low and high) will be divided by this number and ticks will be generated at those division points. The default divisor is 1. * divisor: 4, * // If ticks is explicitly set, then the axis will not compute the ticks with the divisor, but directly use the data in ticks to determine at what points on the axis a tick need to be generated. * ticks: [1, 10, 20, 30] * }; * ``` * * @module Chartist.FixedScaleAxis */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; function FixedScaleAxis(axisUnit, data, chartRect, options) { var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos); this.divisor = options.divisor || 1; this.ticks = options.ticks || Chartist.times(this.divisor).map( function (value, index) { return ( highLow.low + ((highLow.high - highLow.low) / this.divisor) * index ); }.bind(this), ); this.ticks.sort(function (a, b) { return a - b; }); this.range = { min: highLow.low, max: highLow.high, }; Chartist.FixedScaleAxis.super.constructor.call( this, axisUnit, chartRect, this.ticks, options, ); this.stepLength = this.axisLength / this.divisor; } function projectValue(value) { return ( (this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.range.min)) / (this.range.max - this.range.min) ); } Chartist.FixedScaleAxis = Chartist.Axis.extend({ constructor: FixedScaleAxis, projectValue: projectValue, }); })(window, document, Chartist); /** * The step axis for step based charts like bar chart or step based line charts. It uses a fixed amount of ticks that will be equally distributed across the whole axis length. The projection is done using the index of the data value rather than the value itself and therefore it's only useful for distribution purpose. * **Options** * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings. * ```javascript * var options = { * // Ticks to be used to distribute across the axis length. As this axis type relies on the index of the value rather than the value, arbitrary data that can be converted to a string can be used as ticks. * ticks: ['One', 'Two', 'Three'], * // If set to true the full width will be used to distribute the values where the last value will be at the maximum of the axis length. If false the spaces between the ticks will be evenly distributed instead. * stretch: true * }; * ``` * * @module Chartist.StepAxis */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; function StepAxis(axisUnit, data, chartRect, options) { Chartist.StepAxis.super.constructor.call( this, axisUnit, chartRect, options.ticks, options, ); var calc = Math.max(1, options.ticks.length - (options.stretch ? 1 : 0)); this.stepLength = this.axisLength / calc; } function projectValue(value, index) { return this.stepLength * index; } Chartist.StepAxis = Chartist.Axis.extend({ constructor: StepAxis, projectValue: projectValue, }); })(window, document, Chartist); /** * The Chartist line chart can be used to draw Line or Scatter charts. If used in the browser you can access the global `Chartist` namespace where you find the `Line` function as a main entry point. * * For examples on how to use the line chart please check the examples of the `Chartist.Line` method. * * @module Chartist.Line */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; /** * Default options in line charts. Expand the code view to see a detailed list of options with comments. * * @memberof Chartist.Line */ var defaultOptions = { // Options for X-Axis axisX: { // The offset of the labels to the chart area offset: 30, // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis. position: "end", // Allows you to correct label positioning on this axis by positive or negative x and y offset. labelOffset: { x: 0, y: 0, }, // If labels should be shown or not showLabel: true, // If the axis grid should be drawn or not showGrid: true, // Interpolation function that allows you to intercept the value from the axis label labelInterpolationFnc: Chartist.noop, // Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here. type: undefined, }, // Options for Y-Axis axisY: { // The offset of the labels to the chart area offset: 40, // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis. position: "start", // Allows you to correct label positioning on this axis by positive or negative x and y offset. labelOffset: { x: 0, y: 0, }, // If labels should be shown or not showLabel: true, // If the axis grid should be drawn or not showGrid: true, // Interpolation function that allows you to intercept the value from the axis label labelInterpolationFnc: Chartist.noop, // Set the axis type to be used to project values on this axis. If not defined, Chartist.AutoScaleAxis will be used for the Y-Axis, where the high and low options will be set to the global high and low options. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here. type: undefined, // This value specifies the minimum height in pixel of the scale steps scaleMinSpace: 20, // Use only integer values (whole numbers) for the scale steps onlyInteger: false, }, // Specify a fixed width for the chart as a string (i.e. '100px' or '50%') width: undefined, // Specify a fixed height for the chart as a string (i.e. '100px' or '50%') height: undefined, // If the line should be drawn or not showLine: true, // If dots should be drawn or not showPoint: true, // If the line chart should draw an area showArea: false, // The base for the area chart that will be used to close the area shape (is normally 0) areaBase: 0, // Specify if the lines should be smoothed. This value can be true or false where true will result in smoothing using the default smoothing interpolation function Chartist.Interpolation.cardinal and false results in Chartist.Interpolation.none. You can also choose other smoothing / interpolation functions available in the Chartist.Interpolation module, or write your own interpolation function. Check the examples for a brief description. lineSmooth: true, // If the line chart should add a background fill to the .ct-grids group. showGridBackground: false, // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value low: undefined, // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value high: undefined, // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} chartPadding: { top: 15, right: 15, bottom: 5, left: 10, }, // When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler. fullWidth: false, // If true the whole data is reversed including labels, the series order as well as the whole series data arrays. reverseData: false, // Override the class names that get used to generate the SVG structure of the chart classNames: { chart: "ct-chart-line", label: "ct-label", labelGroup: "ct-labels", series: "ct-series", line: "ct-line", point: "ct-point", area: "ct-area", grid: "ct-grid", gridGroup: "ct-grids", gridBackground: "ct-grid-background", vertical: "ct-vertical", horizontal: "ct-horizontal", start: "ct-start", end: "ct-end", }, }; /** * Creates a new chart * */ function createChart(options) { var data = Chartist.normalizeData(this.data, options.reverseData, true); // Create new svg object this.svg = Chartist.createSvg( this.container, options.width, options.height, options.classNames.chart, ); // Create groups for labels, grid and series var gridGroup = this.svg.elem("g").addClass(options.classNames.gridGroup); var seriesGroup = this.svg.elem("g"); var labelGroup = this.svg .elem("g") .addClass(options.classNames.labelGroup); var chartRect = Chartist.createChartRect( this.svg, options, defaultOptions.padding, ); var axisX, axisY; if (options.axisX.type === undefined) { axisX = new Chartist.StepAxis( Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, { ticks: data.normalized.labels, stretch: options.fullWidth, }), ); } else { axisX = options.axisX.type.call( Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX, ); } if (options.axisY.type === undefined) { axisY = new Chartist.AutoScaleAxis( Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, { high: Chartist.isNumeric(options.high) ? options.high : options.axisY.high, low: Chartist.isNumeric(options.low) ? options.low : options.axisY.low, }), ); } else { axisY = options.axisY.type.call( Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY, ); } axisX.createGridAndLabels( gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter, ); axisY.createGridAndLabels( gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter, ); if (options.showGridBackground) { Chartist.createGridBackground( gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter, ); } // Draw the series data.raw.series.forEach( function (series, seriesIndex) { var seriesElement = seriesGroup.elem("g"); // Write attributes to series group element. If series name or meta is undefined the attributes will not be written seriesElement.attr({ "ct:series-name": series.name, "ct:meta": Chartist.serialize(series.meta), }); // Use series class from series data or if not set generate one seriesElement.addClass( [ options.classNames.series, series.className || options.classNames.series + "-" + Chartist.alphaNumerate(seriesIndex), ].join(" "), ); var pathCoordinates = [], pathData = []; data.normalized.series[seriesIndex].forEach( function (value, valueIndex) { var p = { x: chartRect.x1 + axisX.projectValue( value, valueIndex, data.normalized.series[seriesIndex], ), y: chartRect.y1 - axisY.projectValue( value, valueIndex, data.normalized.series[seriesIndex], ), }; pathCoordinates.push(p.x, p.y); pathData.push({ value: value, valueIndex: valueIndex, meta: Chartist.getMetaData(series, valueIndex), }); }.bind(this), ); var seriesOptions = { lineSmooth: Chartist.getSeriesOption(series, options, "lineSmooth"), showPoint: Chartist.getSeriesOption(series, options, "showPoint"), showLine: Chartist.getSeriesOption(series, options, "showLine"), showArea: Chartist.getSeriesOption(series, options, "showArea"), areaBase: Chartist.getSeriesOption(series, options, "areaBase"), }; var smoothing = typeof seriesOptions.lineSmooth === "function" ? seriesOptions.lineSmooth : seriesOptions.lineSmooth ? Chartist.Interpolation.monotoneCubic() : Chartist.Interpolation.none(); // Interpolating path where pathData will be used to annotate each path element so we can trace back the original // index, value and meta data var path = smoothing(pathCoordinates, pathData); // If we should show points we need to create them now to avoid secondary loop // Points are drawn from the pathElements returned by the interpolation function // Small offset for Firefox to render squares correctly if (seriesOptions.showPoint) { path.pathElements.forEach( function (pathElement) { var point = seriesElement .elem( "line", { x1: pathElement.x, y1: pathElement.y, x2: pathElement.x + 0.01, y2: pathElement.y, }, options.classNames.point, ) .attr({ "ct:value": [ pathElement.data.value.x, pathElement.data.value.y, ] .filter(Chartist.isNumeric) .join(","), "ct:meta": Chartist.serialize(pathElement.data.meta), }); this.eventEmitter.emit("draw", { type: "point", value: pathElement.data.value, index: pathElement.data.valueIndex, meta: pathElement.data.meta, series: series, seriesIndex: seriesIndex, axisX: axisX, axisY: axisY, group: seriesElement, element: point, x: pathElement.x, y: pathElement.y, }); }.bind(this), ); } if (seriesOptions.showLine) { var line = seriesElement.elem( "path", { d: path.stringify(), }, options.classNames.line, true, ); this.eventEmitter.emit("draw", { type: "line", values: data.normalized.series[seriesIndex], path: path.clone(), chartRect: chartRect, index: seriesIndex, series: series, seriesIndex: seriesIndex, seriesMeta: series.meta, axisX: axisX, axisY: axisY, group: seriesElement, element: line, }); } // Area currently only works with axes that support a range! if (seriesOptions.showArea && axisY.range) { // If areaBase is outside the chart area (< min or > max) we need to set it respectively so that // the area is not drawn outside the chart area. var areaBase = Math.max( Math.min(seriesOptions.areaBase, axisY.range.max), axisY.range.min, ); // We project the areaBase value into screen coordinates var areaBaseProjected = chartRect.y1 - axisY.projectValue(areaBase); // In order to form the area we'll first split the path by move commands so we can chunk it up into segments path .splitByCommand("M") .filter(function onlySolidSegments(pathSegment) { // We filter only "solid" segments that contain more than one point. Otherwise there's no need for an area return pathSegment.pathElements.length > 1; }) .map(function convertToArea(solidPathSegments) { // Receiving the filtered solid path segments we can now convert those segments into fill areas var firstElement = solidPathSegments.pathElements[0]; var lastElement = solidPathSegments.pathElements[ solidPathSegments.pathElements.length - 1 ]; // Cloning the solid path segment with closing option and removing the first move command from the clone // We then insert a new move that should start at the area base and draw a straight line up or down // at the end of the path we add an additional straight line to the projected area base value // As the closing option is set our path will be automatically closed return solidPathSegments .clone(true) .position(0) .remove(1) .move(firstElement.x, areaBaseProjected) .line(firstElement.x, firstElement.y) .position(solidPathSegments.pathElements.length + 1) .line(lastElement.x, areaBaseProjected); }) .forEach( function createArea(areaPath) { // For each of our newly created area paths, we'll now create path elements by stringifying our path objects // and adding the created DOM elements to the correct series group var area = seriesElement.elem( "path", { d: areaPath.stringify(), }, options.classNames.area, true, ); // Emit an event for each area that was drawn this.eventEmitter.emit("draw", { type: "area", values: data.normalized.series[seriesIndex], path: areaPath.clone(), series: series, seriesIndex: seriesIndex, axisX: axisX, axisY: axisY, chartRect: chartRect, index: seriesIndex, group: seriesElement, element: area, }); }.bind(this), ); } }.bind(this), ); this.eventEmitter.emit("created", { bounds: axisY.bounds, chartRect: chartRect, axisX: axisX, axisY: axisY, svg: this.svg, options: options, }); } /** * This method creates a new line chart. * * @memberof Chartist.Line * @param {String|Node} query A selector query string or directly a DOM element * @param {Object} data The data object that needs to consist of a labels and a series array * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]] * @return {Object} An object which exposes the API for the created chart * * @example * // Create a simple line chart * var data = { * // A labels array that can contain any sort of values * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], * // Our series array that contains series objects or in this case series data arrays * series: [ * [5, 2, 4, 2, 0] * ] * }; * * // As options we currently only set a static size of 300x200 px * var options = { * width: '300px', * height: '200px' * }; * * // In the global name space Chartist we call the Line function to initialize a line chart. As a first parameter we pass in a selector where we would like to get our chart created. Second parameter is the actual data object and as a third parameter we pass in our options * new Chartist.Line('.ct-chart', data, options); * * @example * // Use specific interpolation function with configuration from the Chartist.Interpolation module * * var chart = new Chartist.Line('.ct-chart', { * labels: [1, 2, 3, 4, 5], * series: [ * [1, 1, 8, 1, 7] * ] * }, { * lineSmooth: Chartist.Interpolation.cardinal({ * tension: 0.2 * }) * }); * * @example * // Create a line chart with responsive options * * var data = { * // A labels array that can contain any sort of values * labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'], * // Our series array that contains series objects or in this case series data arrays * series: [ * [5, 2, 4, 2, 0] * ] * }; * * // In addition to the regular options we specify responsive option overrides that will override the default configutation based on the matching media queries. * var responsiveOptions = [ * ['screen and (min-width: 641px) and (max-width: 1024px)', { * showPoint: false, * axisX: { * labelInterpolationFnc: function(value) { * // Will return Mon, Tue, Wed etc. on medium screens * return value.slice(0, 3); * } * } * }], * ['screen and (max-width: 640px)', { * showLine: false, * axisX: { * labelInterpolationFnc: function(value) { * // Will return M, T, W etc. on small screens * return value[0]; * } * } * }] * ]; * * new Chartist.Line('.ct-chart', data, null, responsiveOptions); * */ function Line(query, data, options, responsiveOptions) { Chartist.Line.super.constructor.call( this, query, data, defaultOptions, Chartist.extend({}, defaultOptions, options), responsiveOptions, ); } // Creating line chart type in Chartist namespace Chartist.Line = Chartist.Base.extend({ constructor: Line, createChart: createChart, }); })(window, document, Chartist); /** * The bar chart module of Chartist that can be used to draw unipolar or bipolar bar and grouped bar charts. * * @module Chartist.Bar */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; /** * Default options in bar charts. Expand the code view to see a detailed list of options with comments. * * @memberof Chartist.Bar */ var defaultOptions = { // Options for X-Axis axisX: { // The offset of the chart drawing area to the border of the container offset: 30, // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis. position: "end", // Allows you to correct label positioning on this axis by positive or negative x and y offset. labelOffset: { x: 0, y: 0, }, // If labels should be shown or not showLabel: true, // If the axis grid should be drawn or not showGrid: true, // Interpolation function that allows you to intercept the value from the axis label labelInterpolationFnc: Chartist.noop, // This value specifies the minimum width in pixel of the scale steps scaleMinSpace: 30, // Use only integer values (whole numbers) for the scale steps onlyInteger: false, }, // Options for Y-Axis axisY: { // The offset of the chart drawing area to the border of the container offset: 40, // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis. position: "start", // Allows you to correct label positioning on this axis by positive or negative x and y offset. labelOffset: { x: 0, y: 0, }, // If labels should be shown or not showLabel: true, // If the axis grid should be drawn or not showGrid: true, // Interpolation function that allows you to intercept the value from the axis label labelInterpolationFnc: Chartist.noop, // This value specifies the minimum height in pixel of the scale steps scaleMinSpace: 20, // Use only integer values (whole numbers) for the scale steps onlyInteger: false, }, // Specify a fixed width for the chart as a string (i.e. '100px' or '50%') width: undefined, // Specify a fixed height for the chart as a string (i.e. '100px' or '50%') height: undefined, // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value high: undefined, // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value low: undefined, // Unless low/high are explicitly set, bar chart will be centered at zero by default. Set referenceValue to null to auto scale. referenceValue: 0, // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} chartPadding: { top: 15, right: 15, bottom: 5, left: 10, }, // Specify the distance in pixel of bars in a group seriesBarDistance: 15, // If set to true this property will cause the series bars to be stacked. Check the `stackMode` option for further stacking options. stackBars: false, // If set to 'overlap' this property will force the stacked bars to draw from the zero line. // If set to 'accumulate' this property will form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect. stackMode: "accumulate", // Inverts the axes of the bar chart in order to draw a horizontal bar chart. Be aware that you also need to invert your axis settings as the Y Axis will now display the labels and the X Axis the values. horizontalBars: false, // If set to true then each bar will represent a series and the data array is expected to be a one dimensional array of data values rather than a series array of series. This is useful if the bar chart should represent a profile rather than some data over time. distributeSeries: false, // If true the whole data is reversed including labels, the series order as well as the whole series data arrays. reverseData: false, // If the bar chart should add a background fill to the .ct-grids group. showGridBackground: false, // Override the class names that get used to generate the SVG structure of the chart classNames: { chart: "ct-chart-bar", horizontalBars: "ct-horizontal-bars", label: "ct-label", labelGroup: "ct-labels", series: "ct-series", bar: "ct-bar", grid: "ct-grid", gridGroup: "ct-grids", gridBackground: "ct-grid-background", vertical: "ct-vertical", horizontal: "ct-horizontal", start: "ct-start", end: "ct-end", }, }; /** * Creates a new chart * */ function createChart(options) { var data; var highLow; if (options.distributeSeries) { data = Chartist.normalizeData( this.data, options.reverseData, options.horizontalBars ? "x" : "y", ); data.normalized.series = data.normalized.series.map(function (value) { return [value]; }); } else { data = Chartist.normalizeData( this.data, options.reverseData, options.horizontalBars ? "x" : "y", ); } // Create new svg element this.svg = Chartist.createSvg( this.container, options.width, options.height, options.classNames.chart + (options.horizontalBars ? " " + options.classNames.horizontalBars : ""), ); // Drawing groups in correct order var gridGroup = this.svg.elem("g").addClass(options.classNames.gridGroup); var seriesGroup = this.svg.elem("g"); var labelGroup = this.svg .elem("g") .addClass(options.classNames.labelGroup); if (options.stackBars && data.normalized.series.length !== 0) { // If stacked bars we need to calculate the high low from stacked values from each series var serialSums = Chartist.serialMap( data.normalized.series, function serialSums() { return Array.prototype.slice .call(arguments) .map(function (value) { return value; }) .reduce( function (prev, curr) { return { x: prev.x + (curr && curr.x) || 0, y: prev.y + (curr && curr.y) || 0, }; }, { x: 0, y: 0 }, ); }, ); highLow = Chartist.getHighLow( [serialSums], options, options.horizontalBars ? "x" : "y", ); } else { highLow = Chartist.getHighLow( data.normalized.series, options, options.horizontalBars ? "x" : "y", ); } // Overrides of high / low from settings highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high); highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low); var chartRect = Chartist.createChartRect( this.svg, options, defaultOptions.padding, ); var valueAxis, labelAxisTicks, labelAxis, axisX, axisY; // We need to set step count based on some options combinations if (options.distributeSeries && options.stackBars) { // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should // use only the first label for the step axis labelAxisTicks = data.normalized.labels.slice(0, 1); } else { // If distributed series are enabled but stacked bars aren't, we should use the series labels // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array // as the bars are normalized labelAxisTicks = data.normalized.labels; } // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary. if (options.horizontalBars) { if (options.axisX.type === undefined) { valueAxis = axisX = new Chartist.AutoScaleAxis( Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, { highLow: highLow, referenceValue: 0, }), ); } else { valueAxis = axisX = options.axisX.type.call( Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, { highLow: highLow, referenceValue: 0, }), ); } if (options.axisY.type === undefined) { labelAxis = axisY = new Chartist.StepAxis( Chartist.Axis.units.y, data.normalized.series, chartRect, { ticks: labelAxisTicks, }, ); } else { labelAxis = axisY = options.axisY.type.call( Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY, ); } } else { if (options.axisX.type === undefined) { labelAxis = axisX = new Chartist.StepAxis( Chartist.Axis.units.x, data.normalized.series, chartRect, { ticks: labelAxisTicks, }, ); } else { labelAxis = axisX = options.axisX.type.call( Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX, ); } if (options.axisY.type === undefined) { valueAxis = axisY = new Chartist.AutoScaleAxis( Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, { highLow: highLow, referenceValue: 0, }), ); } else { valueAxis = axisY = options.axisY.type.call( Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, { highLow: highLow, referenceValue: 0, }), ); } } // Projected 0 point var zeroPoint = options.horizontalBars ? chartRect.x1 + valueAxis.projectValue(0) : chartRect.y1 - valueAxis.projectValue(0); // Used to track the screen coordinates of stacked bars var stackedBarValues = []; labelAxis.createGridAndLabels( gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter, ); valueAxis.createGridAndLabels( gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter, ); if (options.showGridBackground) { Chartist.createGridBackground( gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter, ); } // Draw the series data.raw.series.forEach( function (series, seriesIndex) { // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc. var biPol = seriesIndex - (data.raw.series.length - 1) / 2; // Half of the period width between vertical grid lines used to position bars var periodHalfLength; // Current series SVG element var seriesElement; // We need to set periodHalfLength based on some options combinations if (options.distributeSeries && !options.stackBars) { // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array // which is the series count and divide by 2 periodHalfLength = labelAxis.axisLength / data.normalized.series.length / 2; } else if (options.distributeSeries && options.stackBars) { // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis // length by 2 periodHalfLength = labelAxis.axisLength / 2; } else { // On regular bar charts we should just use the series length periodHalfLength = labelAxis.axisLength / data.normalized.series[seriesIndex].length / 2; } // Adding the series group to the series element seriesElement = seriesGroup.elem("g"); // Write attributes to series group element. If series name or meta is undefined the attributes will not be written seriesElement.attr({ "ct:series-name": series.name, "ct:meta": Chartist.serialize(series.meta), }); // Use series class from series data or if not set generate one seriesElement.addClass( [ options.classNames.series, series.className || options.classNames.series + "-" + Chartist.alphaNumerate(seriesIndex), ].join(" "), ); data.normalized.series[seriesIndex].forEach( function (value, valueIndex) { var projected, bar, previousStack, labelAxisValueIndex; // We need to set labelAxisValueIndex based on some options combinations if (options.distributeSeries && !options.stackBars) { // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection // on the step axis for label positioning labelAxisValueIndex = seriesIndex; } else if (options.distributeSeries && options.stackBars) { // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use // 0 for projection on the label step axis labelAxisValueIndex = 0; } else { // On regular bar charts we just use the value index to project on the label step axis labelAxisValueIndex = valueIndex; } // We need to transform coordinates differently based on the chart layout if (options.horizontalBars) { projected = { x: chartRect.x1 + valueAxis.projectValue( value && value.x ? value.x : 0, valueIndex, data.normalized.series[seriesIndex], ), y: chartRect.y1 - labelAxis.projectValue( value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized.series[seriesIndex], ), }; } else { projected = { x: chartRect.x1 + labelAxis.projectValue( value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized.series[seriesIndex], ), y: chartRect.y1 - valueAxis.projectValue( value && value.y ? value.y : 0, valueIndex, data.normalized.series[seriesIndex], ), }; } // If the label axis is a step based axis we will offset the bar into the middle of between two steps using // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not // add any automated positioning. if (labelAxis instanceof Chartist.StepAxis) { // Offset to center bar between grid lines, but only if the step axis is not stretched if (!labelAxis.options.stretch) { projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1); } // Using bi-polar offset for multiple series if no stacked bars or series distribution is used projected[labelAxis.units.pos] += options.stackBars || options.distributeSeries ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1); } // Enter value in stacked bar values used to remember previous screen value for stacking up bars previousStack = stackedBarValues[valueIndex] || zeroPoint; stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]); // Skip if value is undefined if (value === undefined) { return; } var positions = {}; positions[labelAxis.units.pos + "1"] = projected[labelAxis.units.pos]; positions[labelAxis.units.pos + "2"] = projected[labelAxis.units.pos]; if ( options.stackBars && (options.stackMode === "accumulate" || !options.stackMode) ) { // Stack mode: accumulate (default) // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line // We want backwards compatibility, so the expected fallback without the 'stackMode' option // to be the original behaviour (accumulate) positions[labelAxis.counterUnits.pos + "1"] = previousStack; positions[labelAxis.counterUnits.pos + "2"] = stackedBarValues[valueIndex]; } else { // Draw from the zero line normally // This is also the same code for Stack mode: overlap positions[labelAxis.counterUnits.pos + "1"] = zeroPoint; positions[labelAxis.counterUnits.pos + "2"] = projected[labelAxis.counterUnits.pos]; } // Limit x and y so that they are within the chart rect positions.x1 = Math.min( Math.max(positions.x1, chartRect.x1), chartRect.x2, ); positions.x2 = Math.min( Math.max(positions.x2, chartRect.x1), chartRect.x2, ); positions.y1 = Math.min( Math.max(positions.y1, chartRect.y2), chartRect.y1, ); positions.y2 = Math.min( Math.max(positions.y2, chartRect.y2), chartRect.y1, ); var metaData = Chartist.getMetaData(series, valueIndex); // Create bar element bar = seriesElement .elem("line", positions, options.classNames.bar) .attr({ "ct:value": [value.x, value.y] .filter(Chartist.isNumeric) .join(","), "ct:meta": Chartist.serialize(metaData), }); this.eventEmitter.emit( "draw", Chartist.extend( { type: "bar", value: value, index: valueIndex, meta: metaData, series: series, seriesIndex: seriesIndex, axisX: axisX, axisY: axisY, chartRect: chartRect, group: seriesElement, element: bar, }, positions, ), ); }.bind(this), ); }.bind(this), ); this.eventEmitter.emit("created", { bounds: valueAxis.bounds, chartRect: chartRect, axisX: axisX, axisY: axisY, svg: this.svg, options: options, }); } /** * This method creates a new bar chart and returns API object that you can use for later changes. * * @memberof Chartist.Bar * @param {String|Node} query A selector query string or directly a DOM element * @param {Object} data The data object that needs to consist of a labels and a series array * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]] * @return {Object} An object which exposes the API for the created chart * * @example * // Create a simple bar chart * var data = { * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], * series: [ * [5, 2, 4, 2, 0] * ] * }; * * // In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object. * new Chartist.Bar('.ct-chart', data); * * @example * // This example creates a bipolar grouped bar chart where the boundaries are limitted to -10 and 10 * new Chartist.Bar('.ct-chart', { * labels: [1, 2, 3, 4, 5, 6, 7], * series: [ * [1, 3, 2, -5, -3, 1, -6], * [-5, -2, -4, -1, 2, -3, 1] * ] * }, { * seriesBarDistance: 12, * low: -10, * high: 10 * }); * */ function Bar(query, data, options, responsiveOptions) { Chartist.Bar.super.constructor.call( this, query, data, defaultOptions, Chartist.extend({}, defaultOptions, options), responsiveOptions, ); } // Creating bar chart type in Chartist namespace Chartist.Bar = Chartist.Base.extend({ constructor: Bar, createChart: createChart, }); })(window, document, Chartist); /** * The pie chart module of Chartist that can be used to draw pie, donut or gauge charts * * @module Chartist.Pie */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; /** * Default options in line charts. Expand the code view to see a detailed list of options with comments. * * @memberof Chartist.Pie */ var defaultOptions = { // Specify a fixed width for the chart as a string (i.e. '100px' or '50%') width: undefined, // Specify a fixed height for the chart as a string (i.e. '100px' or '50%') height: undefined, // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5} chartPadding: 5, // Override the class names that are used to generate the SVG structure of the chart classNames: { chartPie: "ct-chart-pie", chartDonut: "ct-chart-donut", series: "ct-series", slicePie: "ct-slice-pie", sliceDonut: "ct-slice-donut", sliceDonutSolid: "ct-slice-donut-solid", label: "ct-label", }, // The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise. startAngle: 0, // An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts. total: undefined, // If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices. donut: false, // If specified the donut segments will be drawn as shapes instead of strokes. donutSolid: false, // Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future. // This option can be set as number or string to specify a relative width (i.e. 100 or '30%'). donutWidth: 60, // If a label should be shown or not showLabel: true, // Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center. labelOffset: 0, // This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option. labelPosition: "inside", // An interpolation function for the label value labelInterpolationFnc: Chartist.noop, // Label direction can be 'neutral', 'explode' or 'implode'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center. labelDirection: "neutral", // If true the whole data is reversed including labels, the series order as well as the whole series data arrays. reverseData: false, // If true empty values will be ignored to avoid drawing unncessary slices and labels ignoreEmptyValues: false, }; /** * Determines SVG anchor position based on direction and center parameter * * @param center * @param label * @param direction * @return {string} */ function determineAnchorPosition(center, label, direction) { var toTheRight = label.x > center.x; if ( (toTheRight && direction === "explode") || (!toTheRight && direction === "implode") ) { return "start"; } else if ( (toTheRight && direction === "implode") || (!toTheRight && direction === "explode") ) { return "end"; } else { return "middle"; } } /** * Creates the pie chart * * @param options */ function createChart(options) { var data = Chartist.normalizeData(this.data); var seriesGroups = [], labelsGroup, chartRect, radius, labelRadius, totalDataSum, startAngle = options.startAngle; // Create SVG.js draw this.svg = Chartist.createSvg( this.container, options.width, options.height, options.donut ? options.classNames.chartDonut : options.classNames.chartPie, ); // Calculate charting rect chartRect = Chartist.createChartRect( this.svg, options, defaultOptions.padding, ); // Get biggest circle radius possible within chartRect radius = Math.min(chartRect.width() / 2, chartRect.height() / 2); // Calculate total of all series to get reference value or use total reference from optional options totalDataSum = options.total || data.normalized.series.reduce(function (previousValue, currentValue) { return previousValue + currentValue; }, 0); var donutWidth = Chartist.quantity(options.donutWidth); if (donutWidth.unit === "%") { donutWidth.value *= radius / 100; } // If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside // Unfortunately this is not possible with the current SVG Spec // See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html radius -= options.donut && !options.donutSolid ? donutWidth.value / 2 : 0; // If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius, // if regular pie chart it's half of the radius if ( options.labelPosition === "outside" || (options.donut && !options.donutSolid) ) { labelRadius = radius; } else if (options.labelPosition === "center") { // If labelPosition is center we start with 0 and will later wait for the labelOffset labelRadius = 0; } else if (options.donutSolid) { labelRadius = radius - donutWidth.value / 2; } else { // Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie // slice labelRadius = radius / 2; } // Add the offset to the labelRadius where a negative offset means closed to the center of the chart labelRadius += options.labelOffset; // Calculate end angle based on total sum and current data value and offset with padding var center = { x: chartRect.x1 + chartRect.width() / 2, y: chartRect.y2 + chartRect.height() / 2, }; // Check if there is only one non-zero value in the series array. var hasSingleValInSeries = data.raw.series.filter(function (val) { return val.hasOwnProperty("value") ? val.value !== 0 : val !== 0; }).length === 1; // Creating the series groups data.raw.series.forEach( function (series, index) { seriesGroups[index] = this.svg.elem("g", null, null); }.bind(this), ); //if we need to show labels we create the label group now if (options.showLabel) { labelsGroup = this.svg.elem("g", null, null); } // Draw the series // initialize series groups data.raw.series.forEach( function (series, index) { // If current value is zero and we are ignoring empty values then skip to next value if (data.normalized.series[index] === 0 && options.ignoreEmptyValues) return; // If the series is an object and contains a name or meta data we add a custom attribute seriesGroups[index].attr({ "ct:series-name": series.name, }); // Use series class from series data or if not set generate one seriesGroups[index].addClass( [ options.classNames.series, series.className || options.classNames.series + "-" + Chartist.alphaNumerate(index), ].join(" "), ); // If the whole dataset is 0 endAngle should be zero. Can't divide by 0. var endAngle = totalDataSum > 0 ? startAngle + (data.normalized.series[index] / totalDataSum) * 360 : 0; // Use slight offset so there are no transparent hairline issues var overlappigStartAngle = Math.max( 0, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2), ); // If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle // with Z and use 359.99 degrees if (endAngle - overlappigStartAngle >= 359.99) { endAngle = overlappigStartAngle + 359.99; } var start = Chartist.polarToCartesian( center.x, center.y, radius, overlappigStartAngle, ), end = Chartist.polarToCartesian( center.x, center.y, radius, endAngle, ); var innerStart, innerEnd, donutSolidRadius; // Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke var path = new Chartist.Svg.Path(!options.donut || options.donutSolid) .move(end.x, end.y) .arc( radius, radius, 0, endAngle - startAngle > 180, 0, start.x, start.y, ); // If regular pie chart (no donut) we add a line to the center of the circle for completing the pie if (!options.donut) { path.line(center.x, center.y); } else if (options.donutSolid) { donutSolidRadius = radius - donutWidth.value; innerStart = Chartist.polarToCartesian( center.x, center.y, donutSolidRadius, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2), ); innerEnd = Chartist.polarToCartesian( center.x, center.y, donutSolidRadius, endAngle, ); path.line(innerStart.x, innerStart.y); path.arc( donutSolidRadius, donutSolidRadius, 0, endAngle - startAngle > 180, 1, innerEnd.x, innerEnd.y, ); } // Create the SVG path // If this is a donut chart we add the donut class, otherwise just a regular slice var pathClassName = options.classNames.slicePie; if (options.donut) { pathClassName = options.classNames.sliceDonut; if (options.donutSolid) { pathClassName = options.classNames.sliceDonutSolid; } } var pathElement = seriesGroups[index].elem( "path", { d: path.stringify(), }, pathClassName, ); // Adding the pie series value to the path pathElement.attr({ "ct:value": data.normalized.series[index], "ct:meta": Chartist.serialize(series.meta), }); // If this is a donut, we add the stroke-width as style attribute if (options.donut && !options.donutSolid) { pathElement._node.style.strokeWidth = donutWidth.value + "px"; } // Fire off draw event this.eventEmitter.emit("draw", { type: "slice", value: data.normalized.series[index], totalDataSum: totalDataSum, index: index, meta: series.meta, series: series, group: seriesGroups[index], element: pathElement, path: path.clone(), center: center, radius: radius, startAngle: startAngle, endAngle: endAngle, }); // If we need to show labels we need to add the label for this slice now if (options.showLabel) { var labelPosition; if (data.raw.series.length === 1) { // If we have only 1 series, we can position the label in the center of the pie labelPosition = { x: center.x, y: center.y, }; } else { // Position at the labelRadius distance from center and between start and end angle labelPosition = Chartist.polarToCartesian( center.x, center.y, labelRadius, startAngle + (endAngle - startAngle) / 2, ); } var rawValue; if ( data.normalized.labels && !Chartist.isFalseyButZero(data.normalized.labels[index]) ) { rawValue = data.normalized.labels[index]; } else { rawValue = data.normalized.series[index]; } var interpolatedValue = options.labelInterpolationFnc( rawValue, index, ); if (interpolatedValue || interpolatedValue === 0) { var labelElement = labelsGroup .elem( "text", { dx: labelPosition.x, dy: labelPosition.y, "text-anchor": determineAnchorPosition( center, labelPosition, options.labelDirection, ), }, options.classNames.label, ) .text("" + interpolatedValue); // Fire off draw event this.eventEmitter.emit("draw", { type: "label", index: index, group: labelsGroup, element: labelElement, text: "" + interpolatedValue, x: labelPosition.x, y: labelPosition.y, }); } } // Set next startAngle to current endAngle. // (except for last slice) startAngle = endAngle; }.bind(this), ); this.eventEmitter.emit("created", { chartRect: chartRect, svg: this.svg, options: options, }); } /** * This method creates a new pie chart and returns an object that can be used to redraw the chart. * * @memberof Chartist.Pie * @param {String|Node} query A selector query string or directly a DOM element * @param {Object} data The data object in the pie chart needs to have a series property with a one dimensional data array. The values will be normalized against each other and don't necessarily need to be in percentage. The series property can also be an array of value objects that contain a value property and a className property to override the CSS class name for the series group. * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]] * @return {Object} An object with a version and an update method to manually redraw the chart * * @example * // Simple pie chart example with four series * new Chartist.Pie('.ct-chart', { * series: [10, 2, 4, 3] * }); * * @example * // Drawing a donut chart * new Chartist.Pie('.ct-chart', { * series: [10, 2, 4, 3] * }, { * donut: true * }); * * @example * // Using donut, startAngle and total to draw a gauge chart * new Chartist.Pie('.ct-chart', { * series: [20, 10, 30, 40] * }, { * donut: true, * donutWidth: 20, * startAngle: 270, * total: 200 * }); * * @example * // Drawing a pie chart with padding and labels that are outside the pie * new Chartist.Pie('.ct-chart', { * series: [20, 10, 30, 40] * }, { * chartPadding: 30, * labelOffset: 50, * labelDirection: 'explode' * }); * * @example * // Overriding the class names for individual series as well as a name and meta data. * // The name will be written as ct:series-name attribute and the meta data will be serialized and written * // to a ct:meta attribute. * new Chartist.Pie('.ct-chart', { * series: [{ * value: 20, * name: 'Series 1', * className: 'my-custom-class-one', * meta: 'Meta One' * }, { * value: 10, * name: 'Series 2', * className: 'my-custom-class-two', * meta: 'Meta Two' * }, { * value: 70, * name: 'Series 3', * className: 'my-custom-class-three', * meta: 'Meta Three' * }] * }); */ function Pie(query, data, options, responsiveOptions) { Chartist.Pie.super.constructor.call( this, query, data, defaultOptions, Chartist.extend({}, defaultOptions, options), responsiveOptions, ); } // Creating pie chart type in Chartist namespace Chartist.Pie = Chartist.Base.extend({ constructor: Pie, createChart: createChart, determineAnchorPosition: determineAnchorPosition, }); })(window, document, Chartist); return Chartist; }); ================================================ FILE: elements/chartist-render/lib/chartist-plugin-axistitle/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2019 Alex Stanbury Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: elements/chartist-render/lib/chartist-plugin-axistitle/README.md ================================================ # Axis title plugin for Chartist.js This plugin allows the creation and placement of axis titles. The plugin will throw an error if it is applied to a chart that contains no axes, such as a Pie chart. In order to use it, you will need to include the excellent charting library Chartist.js in your page. http://gionkunz.github.io/chartist-js/index.html ## Installation Install using npm: `npm install chartist-plugin-axistitle` ## Available options and their defaults ```javascript var defaultOptions = { // The title to be displayed on the axis. If at least one axis title is not supplied then an error is thrown. // This can also be passed a function to enable simple updating of the title if your chart data changes. axisTitle: "", // One or more class names to be added to the axis title. // Multiple class names should be separated by a space. // This can also be passed a function to enable simple updating of the classes if your chart data changes. axisClass: "ct-axis-title", // How much to offset the title by. // Please note, x and y offset values for axisY are flipped due to the rotation of the axisY title by 90 degrees. // Therefore changing the x value moves up/down the chart, while changing y moves left/right. offset: { x: 0, y: 0 }, // Defines the anchoring of the title text. Possible values are 'start', 'end' and 'middle'. textAnchor: "middle", // Whether to flip the direction of the text. Note - This can only be used on axis Y. flipTitle: false }; ``` ## Sample usage ```javascript var chart = new Chartist.Line( ".ct-chart", { labels: [ "0-15", "16-30", "31-45", "46-60", "61-75", "76-90", "91-105", "106-120" ], series: [[1, 3, 7, 12, 1, 2, 1, 0]] }, { chartPadding: { top: 20, right: 0, bottom: 20, left: 0 }, axisY: { onlyInteger: true }, plugins: [ Chartist.plugins.ctAxisTitle({ axisX: { axisTitle: "Time (mins)", axisClass: "ct-axis-title", offset: { x: 0, y: 50 }, textAnchor: "middle" }, axisY: { axisTitle: "Goals", axisClass: "ct-axis-title", offset: { x: 0, y: -1 }, flipTitle: false } }) ] } ); ``` ## Example Install using `npm install` then run/edit the example.html file to see the plugin in action. ## Build Use `npm run build` to build a minimised version. ================================================ FILE: elements/chartist-render/lib/chartist-plugin-axistitle/dist/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2019 Alex Stanbury Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: elements/chartist-render/lib/chartist-plugin-axistitle/dist/chartist-plugin-axistitle.js ================================================ (function (root, factory) { if (typeof define === "function" && define.amd) { // AMD. Register as an anonymous module. define(["chartist"], function (Chartist) { return (root.returnExportsGlobal = factory(Chartist)); }); } else if (typeof exports === "object") { // Node. Does not work with strict CommonJS, but // only CommonJS-like enviroments that support module.exports, // like Node. module.exports = factory(require("chartist")); } else { root["Chartist.plugins.ctAxisTitle"] = factory(Chartist); } })(this, function (Chartist) { /** * Chartist.js plugin to display a title for 1 or 2 axes. * version 0.0.7 * author: alex stanbury */ /* global Chartist */ (function (Chartist) { "use strict"; var axisDefaults = { axisTitle: "", axisClass: "ct-axis-title", offset: { x: 0, y: 0, }, textAnchor: "middle", flipTitle: false, }; var defaultOptions = { axisX: axisDefaults, axisY: axisDefaults, }; var getTitle = function (title) { if (title instanceof Function) { return title(); } return title; }; var getClasses = function (classes) { if (classes instanceof Function) { return classes(); } return classes; }; Chartist.plugins = Chartist.plugins || {}; Chartist.plugins.ctAxisTitle = function (options) { options = Chartist.extend({}, defaultOptions, options); return function ctAxisTitle(chart) { chart.on("created", function (data) { if (!options.axisX.axisTitle && !options.axisY.axisTitle) { throw new Error( "ctAxisTitle plugin - You must provide at least one axis title", ); } else if (!data.axisX && !data.axisY) { throw new Error( "ctAxisTitle plugin can only be used on charts that have at least one axis", ); } var xPos, yPos, title, chartPadding = Chartist.normalizePadding(data.options.chartPadding); // normalize the padding in case the full padding object was not passed into the options //position axis X title if (options.axisX.axisTitle && data.axisX) { xPos = data.axisX.axisLength / 2 + data.options.axisY.offset + chartPadding.left; yPos = chartPadding.top; if (data.options.axisY.position === "end") { xPos -= data.options.axisY.offset; } if (data.options.axisX.position === "end") { yPos += data.axisY.axisLength; } title = new Chartist.Svg("text"); title.addClass(getClasses(options.axisX.axisClass)); title.text(getTitle(options.axisX.axisTitle)); title.attr({ x: xPos + options.axisX.offset.x, y: yPos + options.axisX.offset.y, "text-anchor": options.axisX.textAnchor, }); data.svg.append(title, true); } //position axis Y title if (options.axisY.axisTitle && data.axisY) { xPos = 0; yPos = data.axisY.axisLength / 2 + chartPadding.top; if (data.options.axisX.position === "start") { yPos += data.options.axisX.offset; } if (data.options.axisY.position === "end") { xPos = data.axisX.axisLength; } var transform = "rotate(" + (options.axisY.flipTitle ? -90 : 90) + ", " + xPos + ", " + yPos + ")"; title = new Chartist.Svg("text"); title.addClass(getClasses(options.axisY.axisClass)); title.text(getTitle(options.axisY.axisTitle)); title.attr({ x: xPos + options.axisY.offset.x, y: yPos + options.axisY.offset.y, transform: transform, "text-anchor": options.axisY.textAnchor, }); data.svg.append(title, true); } }); }; }; })(Chartist); return Chartist.plugins.ctAxisTitle; }); ================================================ FILE: elements/chartist-render/lib/chartist-plugin-fill-donut/LICENSE-MIT ================================================ Copyright (c) 2016 mo@sbg.at Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: elements/chartist-render/lib/chartist-plugin-fill-donut/README.md ================================================ ### Status [![Build Status](https://api.travis-ci.org/moxx/chartist-plugin-fill-donut.png)](https://travis-ci.org/moxx/chartist-plugin-fill-donut) # FillDonut plugin for Chartist.js This plugin provides a hacky way to fill a donut before the animation will start. Also on board is a way to add multiple html or text elements to the Donut on different positions. Plugin will just work with Chartist Pie charts. Please visit http://gionkunz.github.io/chartist-js/plugins.html for more information. # FillDonut plugin installation `bower install chartist-plugin-fill-donut --save` `npm install chartist-plugin-fill-donut --save` manual ``` download https://github.com/moxx/chartist-plugin-fill-donut/archive/master.zip -> search the dist folder for needed js files ``` ## Available options and their defaults ```javascript var defaultOptions = { fillClass: 'ct-fill-donut', label : { html: '
    ', }, items : [{ class : '', id: '', content : 'fillText', position: 'center', //bottom, top, left, right offsetY: 0, //top, bottom in px offsetX: 0 //left, right in px }] }; ``` ## Sample usage in Chartist.js `bower install chartist-plugin-fill-donut --save` Example: ```js var chart = new Chartist.Pie('#chart-e1', { series: [160, 60 ], labels: ['', ''] }, { donut: true, donutWidth: 20, startAngle: 210, total: 260, showLabel: false, plugins: [ Chartist.plugins.fillDonut({ items: [{ //Item 1 content: '', position: 'bottom', offsetY : 10, offsetX: -2 }, { //Item 2 content: '

    160mph

    ' }] }) ], }); //Animation for the first series chart.on('draw', function(data) { if(data.type === 'slice' && data.index == 0) { array animation var pathLength = data.element._node.getTotalLength(); data.element.attr({ 'stroke-dasharray': pathLength + 'px ' + pathLength + 'px' }); var animationDefinition = { 'stroke-dashoffset': { id: 'anim' + data.index, dur: 1200, from: -pathLength + 'px', to: '0px', easing: Chartist.Svg.Easing.easeOutQuint, fill: 'freeze' } }; data.element.attr({ 'stroke-dashoffset': -pathLength + 'px' }); data.element.animate(animationDefinition, true); } }); ``` ## Needs to be styled ```css /*make a color different to fill-donut series*/ .ct-chart-donut .ct-series-a .ct-slice-donut { stroke: red; } /*make b hidden*/ .ct-chart-donut .ct-series-b .ct-slice-donut { stroke: #efefef; opacity: 0.0; } /*make all fill-donut series visible and set color*/ .ct-chart-donut .ct-fill-donut .ct-slice-donut{ stroke: #efefef; opacity: 1; } ``` ## License The FillDonut plugin for Chartist is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). ================================================ FILE: elements/chartist-render/lib/chartist-plugin-fill-donut/dist/chartist-plugin-fill-donut.js ================================================ (function (root, factory) { if (typeof define === "function" && define.amd) { define(["chartist"], factory); } else if (typeof exports === "object") { module.exports = factory(require("chartist")); } else { root["Chartist.plugins.fillDonut"] = factory(root.Chartist); } })(this, function (Chartist) { /** * Chartist.js plugin to pre fill donuts with animations * author: moxx * author-url: https://github.com/moxx/chartist-plugin-fill-donut * */ (function (document, Chartist) { "use strict"; var defaultOptions = { fillClass: "ct-fill-donut", label: { html: "div", class: "ct-fill-donut-label", }, items: [{}], }; Chartist.plugins = Chartist.plugins || {}; Chartist.plugins.fillDonut = function (options) { options = Chartist.extend({}, defaultOptions, options); return function fillDonut(chart) { if (chart instanceof Chartist.Pie) { var $chart = chart.container; $chart.style.position = "relative"; var $svg; var drawDonut = function (data) { if (data.type === "slice") { if (data.index === 0) { $svg = $chart.querySelector("svg"); } var $clone = data.group._node.cloneNode(true); options.fillClass.split(" ").forEach(function (className) { $clone.setAttribute( "class", $clone.getAttribute("class") + " " + className, ); }); [].forEach.call($clone.querySelectorAll("path"), function (el) { [].forEach.call( el.querySelectorAll("animate"), function (node) { node.parentNode.removeChild(node); }, ); el.removeAttribute("stroke-dashoffset"); }); $svg.insertBefore($clone, $svg.childNodes[0]); } }; chart.on("draw", function (data) { drawDonut(data); }); chart.on("created", function (data) { var itemIndex = 0; if (chart.options.fillDonutOptions) { options = Chartist.extend( {}, options, chart.options.fillDonutOptions, ); drawDonut(data); } [].forEach.call(options.items, function (thisItem) { var $wrapper = globalThis.document.createElement( options.label.html, ); options.label.class.split(" ").forEach(function (className) { if ($wrapper.classList) { $wrapper.classList.add(className); } else { $wrapper.className += " " + className; } }); var item = Chartist.extend( {}, { class: "", id: "", content: "fillText", position: "center", //bottom, top, left, right offsetY: 0, //top, bottom in px offsetX: 0, //left, right in px }, thisItem, ); if (item.id.length > 0) { $wrapper.setAttribute("id", item.id); } if (item.class.length > 0) { $wrapper.setAttribute("class", item.class); } [].forEach.call( $chart.querySelectorAll( '*[data-fill-index$="fdid-' + itemIndex + '"]', ), function (node) { node.parentNode.removeChild(node); }, ); $wrapper.setAttribute("data-fill-index", "fdid-" + itemIndex); itemIndex += 1; $wrapper.insertAdjacentHTML("beforeend", item.content); $wrapper.style.position = "absolute"; $chart.appendChild($wrapper); var cWidth = Math.ceil($chart.offsetWidth / 2); var cHeight = Math.ceil($chart.clientHeight / 2); var wWidth = Math.ceil($wrapper.offsetWidth / 2); var wHeight = Math.ceil($wrapper.clientHeight / 2); var style = { bottom: { bottom: 0 + item.offsetY + "px", left: cWidth - wWidth + item.offsetX + "px", }, top: { top: 0 + item.offsetY + "px", left: cWidth - wWidth + item.offsetX + "px", }, left: { top: cHeight - wHeight + item.offsetY + "px", left: 0 + item.offsetX + "px", }, right: { top: cHeight - wHeight + item.offsetY + "px", right: 0 + item.offsetX + "px", }, center: { top: cHeight - wHeight + item.offsetY + "px", left: cWidth - wWidth + item.offsetX + "px", }, }; Chartist.extend($wrapper.style, style[item.position]); }); }); } }; }; })(document, Chartist); // jshint ignore:line return Chartist.plugins.fillDonut; }); //# sourceMappingURL=chartist-plugin-fill-donut.js.map ================================================ FILE: elements/chartist-render/lib/chartist-plugin-fill-donut/src/scripts/chartist-plugin-fill-donut.js ================================================ /** * Chartist.js plugin to pre fill donuts with animations * author: moxx * author-url: https://github.com/moxx/chartist-plugin-fill-donut * */ (function (document, Chartist) { "use strict"; var defaultOptions = { fillClass: "ct-fill-donut", label: { html: "div", class: "ct-fill-donut-label", }, items: [{}], }; Chartist.plugins = Chartist.plugins || {}; Chartist.plugins.fillDonut = function (options) { options = Chartist.extend({}, defaultOptions, options); return function fillDonut(chart) { if (chart instanceof Chartist.Pie) { var $chart = chart.container; $chart.style.position = "relative"; var $svg; var drawDonut = function (data) { if (data.type === "slice") { if (data.index === 0) { $svg = $chart.querySelector("svg"); } var $clone = data.group._node.cloneNode(true); options.fillClass.split(" ").forEach(function (className) { $clone.setAttribute( "class", $clone.getAttribute("class") + " " + className, ); }); [].forEach.call($clone.querySelectorAll("path"), function (el) { [].forEach.call(el.querySelectorAll("animate"), function (node) { node.parentNode.removeChild(node); }); el.removeAttribute("stroke-dashoffset"); }); $svg.insertBefore($clone, $svg.childNodes[0]); } }; chart.on("draw", function (data) { drawDonut(data); }); chart.on("created", function (data) { var itemIndex = 0; if (chart.options.fillDonutOptions) { options = Chartist.extend( {}, options, chart.options.fillDonutOptions, ); drawDonut(data); } [].forEach.call(options.items, function (thisItem) { var $wrapper = globalThis.document.createElement( options.label.html, ); options.label.class.split(" ").forEach(function (className) { if ($wrapper.classList) { $wrapper.classList.add(className); } else { $wrapper.className += " " + className; } }); var item = Chartist.extend( {}, { class: "", id: "", content: "fillText", position: "center", //bottom, top, left, right offsetY: 0, //top, bottom in px offsetX: 0, //left, right in px }, thisItem, ); if (item.id.length > 0) { $wrapper.setAttribute("id", item.id); } if (item.class.length > 0) { $wrapper.setAttribute("class", item.class); } [].forEach.call( $chart.querySelectorAll( '*[data-fill-index$="fdid-' + itemIndex + '"]', ), function (node) { node.parentNode.removeChild(node); }, ); $wrapper.setAttribute("data-fill-index", "fdid-" + itemIndex); itemIndex += 1; $wrapper.insertAdjacentHTML("beforeend", item.content); $wrapper.style.position = "absolute"; $chart.appendChild($wrapper); var cWidth = Math.ceil($chart.offsetWidth / 2); var cHeight = Math.ceil($chart.clientHeight / 2); var wWidth = Math.ceil($wrapper.offsetWidth / 2); var wHeight = Math.ceil($wrapper.clientHeight / 2); var style = { bottom: { bottom: 0 + item.offsetY + "px", left: cWidth - wWidth + item.offsetX + "px", }, top: { top: 0 + item.offsetY + "px", left: cWidth - wWidth + item.offsetX + "px", }, left: { top: cHeight - wHeight + item.offsetY + "px", left: 0 + item.offsetX + "px", }, right: { top: cHeight - wHeight + item.offsetY + "px", right: 0 + item.offsetX + "px", }, center: { top: cHeight - wHeight + item.offsetY + "px", left: cWidth - wWidth + item.offsetX + "px", }, }; Chartist.extend($wrapper.style, style[item.position]); }); }); } }; }; })(document, Chartist); // jshint ignore:line ================================================ FILE: elements/chartist-render/lib/chartist-plugin-pointlabels/LICENSE ================================================ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. ================================================ FILE: elements/chartist-render/lib/chartist-plugin-pointlabels/README.md ================================================ # Point Labels plugin for Chartist.js This is a simple plugin for Chartist.js that will put a label on top of data points on line charts. This plugin serves as an example plugin package and can be used as starting point to create your own awesome Chartist.js plugin. Please visit http://gionkunz.github.io/chartist-js/plugins.html for more information. ## Download The easiest way to get started, using Bower ``` bower install chartist-plugin-pointlabels --save ``` ## Available options and their defaults ```javascript var defaultOptions = { labelClass: 'ct-label', labelOffset: { x: 0, y: -10 }, textAnchor: 'middle', labelInterpolationFnc: Chartist.noop }; ``` ## Sample usage in Chartist.js ```javascript var chart = new Chartist.Line('.ct-chart', { labels: [1, 2, 3, 4, 5, 6, 7], series: [ [1, 5, 3, 4, 6, 2, 3], [2, 4, 2, 5, 4, 3, 6] ] }, { plugins: [ ctPointLabels({ textAnchor: 'middle', labelInterpolationFnc: function(value) {return '$' + value.toFixed(2)} }) ] }); ``` ================================================ FILE: elements/chartist-render/lib/chartist-plugin-pointlabels/dist/LICENSE ================================================ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. ================================================ FILE: elements/chartist-render/lib/chartist-plugin-pointlabels/dist/chartist-plugin-pointlabels.js ================================================ (function (root, factory) { if (typeof define === "function" && define.amd) { // AMD. Register as an anonymous module. define(["chartist"], function (Chartist) { return (root.returnExportsGlobal = factory(Chartist)); }); } else if (typeof exports === "object") { // Node. Does not work with strict CommonJS, but // only CommonJS-like enviroments that support module.exports, // like Node. module.exports = factory(require("chartist")); } else { root["Chartist.plugins.ctPointLabels"] = factory(Chartist); } })(this, function (Chartist) { /** * Chartist.js plugin to display a data label on top of the points in a line chart. * */ /* global Chartist */ (function (window, document, Chartist) { "use strict"; var defaultOptions = { labelClass: "ct-label", labelOffset: { x: 0, y: -10, }, textAnchor: "middle", align: "center", labelInterpolationFnc: Chartist.noop, }; var labelPositionCalculation = { point: function (data) { return { x: data.x, y: data.y, }; }, bar: { left: function (data) { return { x: data.x1, y: data.y1, }; }, center: function (data) { return { x: data.x1 + (data.x2 - data.x1) / 2, y: data.y1, }; }, right: function (data) { return { x: data.x2, y: data.y1, }; }, }, }; Chartist.plugins = Chartist.plugins || {}; Chartist.plugins.ctPointLabels = function (options) { options = Chartist.extend({}, defaultOptions, options); function addLabel(position, data) { // if x and y exist concat them otherwise output only the existing value var value = data.value.x !== undefined && data.value.y ? data.value.x + ", " + data.value.y : data.value.y || data.value.x; data.group .elem( "text", { x: position.x + options.labelOffset.x, y: position.y + options.labelOffset.y, style: "text-anchor: " + options.textAnchor, }, options.labelClass, ) .text(options.labelInterpolationFnc(value)); } return function ctPointLabels(chart) { if (chart instanceof Chartist.Line || chart instanceof Chartist.Bar) { chart.on("draw", function (data) { var positonCalculator = (labelPositionCalculation[data.type] && labelPositionCalculation[data.type][options.align]) || labelPositionCalculation[data.type]; if (positonCalculator) { addLabel(positonCalculator(data), data); } }); } }; }; })(window, document, Chartist); return Chartist.plugins.ctPointLabels; }); ================================================ FILE: elements/chartist-render/package.json ================================================ { "name": "@haxtheweb/chartist-render", "wcfactory": { "className": "ChartistRender", "customElementClass": "LitElement", "elementName": "chartist-render", "generator-wcfactory-version": "0.3.1", "useHAX": false, "useSass": false, "files": { "css": "src/chartist-render.css", "html": "src/chartist-render.html", "js": "src/chartist-render.js", "properties": "src/chartist-render-properties.json", "hax": "src/chartist-render-hax.json" }, "sharedStyles": [] }, "version": "25.0.0", "description": "Rendering Chartist", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "chartist-render.js", "module": "chartist-render.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/es-global-bridge": "^25.0.0", "@haxtheweb/utils": "^25.0.0", "@polymer/iron-ajax": "3.0.1", "chartist": "^0.11.0", "chartist-plugin-accessibility": "0.0.5", "chartist-plugin-axistitle": "^0.0.7", "chartist-plugin-fill-donut": "^0.1.4", "chartist-plugin-pointlabels": "0.0.6", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/chartist-render/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/chartist-render/test/chartist-render.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../chartist-render.js"; // Mock Chartist.js library and dependencies beforeEach(() => { // Mock global Chartist library globalThis.Chartist = { Bar: (target, data, options, responsiveOptions) => ({ type: "Bar", target, data, options, responsiveOptions, on: (event, callback) => { setTimeout(() => { if (event === "created" || event === "draw") { callback({ type: event, target, data }); } }, 10); }, }), Line: (target, data, options, responsiveOptions) => ({ type: "Line", target, data, options, responsiveOptions, on: (event, callback) => { setTimeout(() => { if (event === "created" || event === "draw") { callback({ type: event, target, data }); } }, 10); }, }), Pie: (target, data, options, responsiveOptions) => ({ type: "Pie", target, data, options, responsiveOptions, on: (event, callback) => { setTimeout(() => { if (event === "created" || event === "draw") { callback({ type: event, target, data }); } }, 10); }, }), noop: () => {}, plugins: { ctAxisTitle: (options) => ({ type: "ctAxisTitle", options }), ctPointLabels: (options) => ({ type: "ctPointLabels", options }), fillDonut: (options) => ({ type: "fillDonut", options }), }, }; // Mock ESGlobalBridge globalThis.ESGlobalBridge = { requestAvailability: () => ({ load: (name, url) => { setTimeout(() => { globalThis.dispatchEvent(new CustomEvent(`es-bridge-${name}-loaded`)); }, 10); }, }), }; // Mock fetch for CSV loading globalThis.fetch = (url) => { const csvData = "Label A,Label B,Label C\n10,20,30\n40,50,60"; return Promise.resolve({ text: () => Promise.resolve(csvData), }); }; // Mock AbortController if (!globalThis.AbortController) { globalThis.AbortController = class { constructor() { this.signal = { aborted: false }; } abort() { this.signal.aborted = true; } }; } }); aftereEach(() => { // Clean up mocks delete globalThis.Chartist; delete globalThis.fetch; }); describe("chartist-render test", () => { let element; beforeEach(async () => { element = await fixture( html`

    A pie chart of favorite pies (chart)

    A pie chart of favorite pies (table)
    Key Lime Lemon Merangue Apple Pumpkin Cherry Pecan
    23 15 40 30 12 20
    `, ); await element.updateComplete; }); it("basic setup", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("chartist-render"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); describe("Component structure and properties", () => { it("should have correct tag name", () => { expect(element.constructor.tag).to.equal("chartist-render"); }); it("should initialize with default properties", () => { expect(element.id).to.equal("pie-chart"); expect(element.type).to.equal("pie"); expect(element.scale).to.equal("ct-square"); expect(element.showTable).to.be.false; expect(element.data).to.be.an("array"); expect(element.responsiveOptions).to.be.an("array"); }); it("should have required chart structure elements", () => { const chartDiv = element.shadowRoot.querySelector("#chart"); const titleDiv = element.shadowRoot.querySelector(".title"); const descDiv = element.shadowRoot.querySelector(".desc"); const tableDiv = element.shadowRoot.querySelector(".table"); const slot = element.shadowRoot.querySelector("slot"); expect(chartDiv).to.exist; expect(titleDiv).to.exist; expect(descDiv).to.exist; expect(tableDiv).to.exist; expect(slot).to.exist; }); it("should have proper ARIA attributes", () => { const chartDiv = element.shadowRoot.querySelector("#chart"); expect(chartDiv.getAttribute("role")).to.equal("presentation"); expect(chartDiv.hasAttribute("aria-label")).to.be.true; expect(chartDiv.hasAttribute("aria-describedby")).to.be.true; }); }); describe("Property validation with accessibility", () => { describe("type property", () => { it("should handle different chart types and maintain accessibility", async () => { const chartTypes = ["bar", "line", "pie"]; for (const type of chartTypes) { element.type = type; await element.updateComplete; expect(element.type).to.equal(type); await expect(element).shadowDom.to.be.accessible(); } }); }); describe("scale property", () => { it("should handle different scale values and maintain accessibility", async () => { const scales = [ "ct-square", "ct-minor-second", "ct-major-second", "ct-minor-third", "ct-perfect-fourth", "ct-golden-section", "ct-octave", ]; for (const scale of scales) { element.scale = scale; await element.updateComplete; expect(element.scale).to.equal(scale); const chartDiv = element.shadowRoot.querySelector("#chart"); expect(chartDiv.className).to.include(scale); await expect(element).shadowDom.to.be.accessible(); } }); }); describe("showTable property", () => { it("should control table visibility and maintain accessibility", async () => { // Table hidden by default expect(element.showTable).to.be.false; let tableDiv = element.shadowRoot.querySelector(".table"); expect(tableDiv.className).to.include("sr-only"); // Show table element.showTable = true; await element.updateComplete; expect(element.showTable).to.be.true; tableDiv = element.shadowRoot.querySelector(".table"); expect(tableDiv.className).to.not.include("sr-only"); await expect(element).shadowDom.to.be.accessible(); }); }); describe("chartTitle property", () => { it("should handle chart titles and maintain accessibility", async () => { const titles = [ "Test Chart", "Sales Data 2023", "Performance Metrics", "", ]; for (const title of titles) { element.chartTitle = title; await element.updateComplete; expect(element.chartTitle).to.equal(title); const chartDiv = element.shadowRoot.querySelector("#chart"); expect(chartDiv.getAttribute("aria-label")).to.equal(title); await expect(element).shadowDom.to.be.accessible(); } }); }); }); describe("Data handling and processing", () => { it("should process table data correctly", async () => { // Element already has table data from fixture await new Promise((resolve) => setTimeout(resolve, 100)); // Allow data processing expect(element.data).to.be.an("array"); expect(element.data.length).to.be.greaterThan(0); expect(element.chartData).to.exist; expect(element.chartData.labels).to.be.an("array"); expect(element.chartData.series).to.be.an("array"); }); it("should handle CSV data loading", async () => { element.dataSource = "test.csv"; await element.updateComplete; // Wait for fetch to complete await new Promise((resolve) => setTimeout(resolve, 100)); expect(element.data).to.be.an("array"); }); it("should convert CSV text to array correctly", () => { const csvText = "A,B,C\n1,2,3\n4,5,6"; const result = element._CSVtoArray(csvText); expect(result).to.be.an("array"); expect(result.length).to.equal(3); expect(result[0]).to.deep.equal(["A", "B", "C"]); expect(result[1]).to.deep.equal([1, 2, 3]); expect(result[2]).to.deep.equal([4, 5, 6]); }); it("should handle CSV with quoted values", () => { const csvText = '"Label A","Label B","Label C"\n"Value 1",10,20'; const result = element._CSVtoArray(csvText); expect(result[0]).to.deep.equal(["Label A", "Label B", "Label C"]); expect(result[1]).to.deep.equal(["Value 1", 10, 20]); }); it("should update chart data when data changes", async () => { const newData = [ ["Label 1", "Label 2", "Label 3"], [10, 20, 30], ]; element.data = newData; await element.updateComplete; expect(element.chartData.labels).to.deep.equal([ "Label 1", "Label 2", "Label 3", ]); expect(element.chartData.series).to.deep.equal([10, 20, 30]); }); }); describe("Chart rendering functionality", () => { beforeEach(async () => { // Wait for Chartist to be "loaded" await new Promise((resolve) => setTimeout(resolve, 50)); }); it("should create bar chart correctly", async () => { element.type = "bar"; await element.updateComplete; const chart = element.makeChart(); expect(chart).to.exist; expect(chart.type).to.equal("Bar"); }); it("should create line chart correctly", async () => { element.type = "line"; await element.updateComplete; const chart = element.makeChart(); expect(chart).to.exist; expect(chart.type).to.equal("Line"); }); it("should create pie chart correctly", async () => { element.type = "pie"; await element.updateComplete; const chart = element.makeChart(); expect(chart).to.exist; expect(chart.type).to.equal("Pie"); }); it("should handle chart options", async () => { const customOptions = { showArea: true, low: 0, high: 100, }; element.options = customOptions; element.type = "line"; await element.updateComplete; const chart = element.makeChart(); expect(chart.options).to.include(customOptions); }); it("should handle responsive options", async () => { const responsiveOptions = [ [ "screen and (max-width: 640px)", { showLine: false, axisX: { labelInterpolationFnc: "noop", }, }, ], ]; element.responsiveOptions = responsiveOptions; element.type = "bar"; await element.updateComplete; const chart = element.makeChart(); expect(chart.responsiveOptions).to.deep.equal(responsiveOptions); }); }); describe("Plugin integration", () => { it("should support axis title plugin", async () => { element.pluginAxisTitle = { axisX: { axisTitle: "X Axis", offset: { x: 0, y: 50 }, textAnchor: "middle", }, }; element.type = "bar"; await element.updateComplete; expect(element.fullOptions.plugins).to.be.an("array"); expect(element.fullOptions.plugins[0].type).to.equal("ctAxisTitle"); }); it("should support point labels plugin for line charts", async () => { element.pluginPointLabels = { labelOffset: { x: 0, y: -10 }, textAnchor: "middle", }; element.type = "line"; await element.updateComplete; expect(element.fullOptions.plugins).to.be.an("array"); expect(element.fullOptions.plugins[0].type).to.equal("ctPointLabels"); }); it("should support fill donut plugin for pie charts", async () => { element.pluginFillDonutItems = [ { class: "center-text", content: "Total: 100", position: "center", }, ]; element.type = "pie"; element.options = { donut: true }; await element.updateComplete; expect(element.fullOptions.plugins).to.be.an("array"); expect(element.fullOptions.plugins[0].type).to.equal("fillDonut"); }); it("should load plugins correctly", () => { const plugins = element.plugins; expect(plugins).to.be.an("array"); expect(plugins.length).to.equal(3); expect(plugins[0][0]).to.equal("Chartist.plugins.ctAxisTitle"); expect(plugins[1][0]).to.equal("Chartist.plugins.CtPointLabels"); expect(plugins[2][0]).to.equal("Chartist.plugins.fillDonut"); }); }); describe("Event handling", () => { it("should dispatch chartist-render-ready event on creation", (done) => { element.addEventListener("chartist-render-ready", (e) => { expect(e.detail).to.equal(element); expect(e.bubbles).to.be.true; expect(e.composed).to.be.true; done(); }); // Event is dispatched in constructor, so create new element fixture(html``); }); it("should dispatch data change events", async () => { let dataChangedFired = false; let chartDataChangedFired = false; element.addEventListener("data-changed", () => { dataChangedFired = true; }); element.addEventListener("chart-data-changed", () => { chartDataChangedFired = true; }); element.data = [ ["A", "B"], [1, 2], ]; await element.updateComplete; expect(dataChangedFired).to.be.true; expect(chartDataChangedFired).to.be.true; }); it("should dispatch data-source-changed event", async () => { let eventFired = false; element.addEventListener("data-source-changed", () => { eventFired = true; }); element.dataSource = "new-data.csv"; await element.updateComplete; expect(eventFired).to.be.true; }); it("should dispatch chart render events", (done) => { let renderDataFired = false; let renderCreatedFired = false; element.addEventListener("chartist-render-data", () => { renderDataFired = true; }); element.addEventListener("chartist-render-created", () => { renderCreatedFired = true; expect(renderDataFired).to.be.true; done(); }); element.type = "bar"; element._getChart(); }); }); describe("Table rendering and accessibility", () => { it("should render table from data", () => { const testData = [ ["Product", "Sales", "Profit"], ["A", 100, 20], ["B", 150, 35], ]; element.data = testData; element._renderTable(); const table = element.querySelector("table"); expect(table).to.exist; const headers = table.querySelectorAll("th"); expect(headers.length).to.equal(3); expect(headers[0].textContent).to.equal("Product"); }); it("should handle table with row headers", () => { const testData = [ ["", "Q1", "Q2", "Q3"], ["Product A", 100, 120, 140], ["Product B", 80, 90, 110], ]; element.data = testData; element._renderTable(); const table = element.querySelector("table"); const rowHeaders = table.querySelectorAll('tbody th[scope="row"]'); expect(rowHeaders.length).to.equal(2); }); it("should update data from table changes", async () => { // Add a table to test mutation observer const table = globalThis.document.createElement("table"); table.innerHTML = ` AB 1020 `; element.appendChild(table); element._updateData(); expect(element.data).to.be.an("array"); expect(element.data[0]).to.deep.equal(["A", "B"]); expect(element.data[1]).to.deep.equal([10, 20]); }); }); describe("Accessibility scenarios", () => { it("should remain accessible with different chart types", async () => { const types = ["bar", "line", "pie"]; for (const type of types) { element.type = type; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); } }); it("should remain accessible when table is shown", async () => { element.showTable = true; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("should have proper heading structure", () => { const headingSlot = element.shadowRoot.querySelector( 'slot[name="heading"]', ); expect(headingSlot).to.exist; // Check for slotted heading const heading = element.querySelector('h3[slot="heading"]'); expect(heading).to.exist; expect(heading.textContent).to.include("pie chart"); }); it("should maintain accessibility with custom titles", async () => { element.chartTitle = "Custom Accessibility Title"; element.chartDesc = "This chart shows test data for accessibility"; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); }); describe("Edge cases and error handling", () => { it("should handle empty data gracefully", async () => { element.data = []; await element.updateComplete; expect(element.chartData).to.exist; await expect(element).shadowDom.to.be.accessible(); }); it("should handle invalid chart type", async () => { element.type = "invalid-type"; await element.updateComplete; // Should not break the component expect(element.type).to.equal("invalid-type"); await expect(element).shadowDom.to.be.accessible(); }); it("should handle malformed CSV data", () => { const malformedCSV = "A,B\n1,2,3\n4"; const result = element._CSVtoArray(malformedCSV); expect(result).to.be.an("array"); // Should handle gracefully without throwing errors }); it("should handle missing Chartist library gracefully", async () => { const originalChartist = globalThis.Chartist; delete globalThis.Chartist; element.type = "bar"; element._getChart(); // Should not throw errors expect(element.chart).to.be.undefined; globalThis.Chartist = originalChartist; }); it("should handle fetch errors for data source", async () => { globalThis.fetch = () => Promise.reject(new Error("Network error")); element.dataSource = "nonexistent.csv"; await element.updateComplete; // Should handle error gracefully expect(element.dataSource).to.equal("nonexistent.csv"); }); it("should handle undefined options", async () => { element.options = undefined; element.type = "bar"; await element.updateComplete; const fullOptions = element.fullOptions; expect(fullOptions).to.be.an("object"); }); it("should handle extremely large datasets", async () => { const largeData = []; const labels = []; const series = []; for (let i = 0; i < 100; i++) { labels.push(`Label ${i}`); series.push(Math.random() * 100); } largeData.push(labels); largeData.push(series); element.data = largeData; await element.updateComplete; expect(element.chartData.labels.length).to.equal(100); expect(element.chartData.series.length).to.equal(100); }); }); describe("Lifecycle methods", () => { it("should handle constructor properly", () => { const newElement = new element.constructor(); expect(newElement.type).to.equal("bar"); expect(newElement.scale).to.equal("ct-minor-seventh"); expect(newElement.showTable).to.be.false; expect(newElement.windowControllers).to.exist; }); it("should handle disconnectedCallback", () => { element.windowControllers = new AbortController(); element.observer = { disconnect: () => {}, }; element.disconnectedCallback(); expect(element.windowControllers.signal.aborted).to.be.true; }); it("should handle updated lifecycle with property changes", async () => { let eventFired = false; element.addEventListener("data-changed", () => { eventFired = true; }); element.data = [ ["New", "Data"], [1, 2], ]; await element.updateComplete; expect(eventFired).to.be.true; }); }); describe("Utility methods", () => { it("should generate unique IDs", () => { const id1 = element._getUniqueId("test-"); const id2 = element._getUniqueId("test-"); expect(id1).to.include("test-"); expect(id2).to.include("test-"); expect(id1).to.not.equal(id2); }); it("should load scripts correctly", () => { let scriptLoaded = false; globalThis.addEventListener("es-bridge-testScript-loaded", () => { scriptLoaded = true; }); element._loadScripts("testScript", "test/path.js"); // Script loading should be initiated expect(scriptLoaded).to.be.false; // Will be true after async load }); }); describe("Styling and theming", () => { it("should apply scale classes correctly", async () => { element.scale = "ct-perfect-fifth"; await element.updateComplete; const chartDiv = element.shadowRoot.querySelector("#chart"); expect(chartDiv.className).to.include("ct-perfect-fifth"); }); it("should support CSS custom properties", () => { element.style.setProperty("--chartist-color-1", "#ff0000"); element.style.setProperty("--chartist-text-color", "#333333"); const computedStyle = globalThis.getComputedStyle(element); // Custom properties should be available for use expect(element.style.getPropertyValue("--chartist-color-1")).to.equal( "#ff0000", ); }); it("should handle sr-only class for table accessibility", async () => { // Table should be screen-reader only by default element.showTable = false; await element.updateComplete; const tableDiv = element.shadowRoot.querySelector(".table"); expect(tableDiv.className).to.include("sr-only"); // Table should be visible when showTable is true element.showTable = true; await element.updateComplete; expect(tableDiv.className).to.not.include("sr-only"); }); }); describe("Integration scenarios", () => { it("should handle complete workflow from table to chart", async () => { // Start with table data const table = element.querySelector("table"); expect(table).to.exist; // Wait for data processing await new Promise((resolve) => setTimeout(resolve, 100)); // Should have processed data expect(element.data).to.be.an("array"); expect(element.chartData).to.exist; // Should be able to create chart const chart = element.makeChart(); expect(chart).to.exist; }); it("should handle CSV to chart workflow", async () => { element.dataSource = "test-data.csv"; await element.updateComplete; // Wait for fetch and processing await new Promise((resolve) => setTimeout(resolve, 100)); expect(element.data).to.be.an("array"); expect(element.chartData).to.exist; }); it("should work with all chart types and plugins", async () => { const configs = [ { type: "bar", plugin: "pluginAxisTitle", pluginData: { axisX: { axisTitle: "X Axis" } }, }, { type: "line", plugin: "pluginPointLabels", pluginData: { labelOffset: { x: 0, y: -10 } }, }, { type: "pie", plugin: "pluginFillDonutItems", pluginData: [{ content: "Center", position: "center" }], options: { donut: true }, }, ]; for (const config of configs) { element.type = config.type; element[config.plugin] = config.pluginData; if (config.options) element.options = config.options; await element.updateComplete; const chart = element.makeChart(); expect(chart).to.exist; expect(chart.type).to.equal( config.type.charAt(0).toUpperCase() + config.type.slice(1), ); await expect(element).shadowDom.to.be.accessible(); } }); }); describe("Performance considerations", () => { it("should handle rapid property changes efficiently", async () => { const startTime = performance.now(); for (let i = 0; i < 10; i++) { element.type = i % 2 === 0 ? "bar" : "line"; element.scale = i % 2 === 0 ? "ct-square" : "ct-octave"; await element.updateComplete; } const endTime = performance.now(); const totalTime = endTime - startTime; expect(totalTime).to.be.lessThan(1000); }); it("should cleanup observers and controllers properly", () => { const mockObserver = { disconnect: () => {}, observe: () => {}, }; element.observer = mockObserver; element.windowControllers = new AbortController(); expect(element.observer).to.equal(mockObserver); expect(element.windowControllers.signal.aborted).to.be.false; element.disconnectedCallback(); expect(element.windowControllers.signal.aborted).to.be.true; }); }); }); ================================================ FILE: elements/chat-agent/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/chat-agent/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/chat-agent/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/chat-agent/.npmignore ================================================ node_modules ================================================ FILE: elements/chat-agent/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/chat-agent/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/chat-agent/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2024 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/chat-agent/README.md ================================================ # <chat-agent> Agent > chatbot agent style chat widget ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/chat-agent/chat-agent.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/chat-agent/chat-agent.js ================================================ /** * Copyright 2024 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import { enableServices } from "@haxtheweb/micro-frontend-registry/lib/microServices.js"; import { MicroFrontendRegistry } from "@haxtheweb/micro-frontend-registry/micro-frontend-registry.js"; import "@haxtheweb/rpg-character/rpg-character.js"; import "@haxtheweb/simple-icon/simple-icon.js"; import "@haxtheweb/simple-tooltip/simple-tooltip.js"; import { css, html } from "lit"; import { autorun, configure, toJS } from "mobx"; import { ChatStore } from "./lib/chat-agent-store.js"; import "./lib/chat-button.js"; import "./lib/chat-control-bar.js"; import "./lib/chat-developer-panel.js"; import "./lib/chat-input.js"; import "./lib/chat-interface.js"; import "./lib/chat-message.js"; import "./lib/chat-suggestion.js"; configure({ enforceActions: false }); // enable services for glossary enhancement enableServices(["haxcms"]); MicroFrontendRegistry.add({ endpoint: "/api/apps/haxcms/aiChat", name: "@haxcms/aiChat", title: "AI Chat", description: "AI based chat agent that can answer questions about a site", params: { site: "location of the HAXcms site OR site.json data", type: "site for site.json or link for remote loading", question: "Question to ask of the AI", engine: "which engine to use as we test multiple", context: "context to query based on. Course typical", }, }); // strict mode off /** * `chat-agent` * `chatbot agent style chat widget` * @demo demo/index.html * @element chat-agent */ class ChatAgent extends DDD { /** * Convention we use */ static get tag() { return "chat-agent"; } /** * HTMLElement */ constructor() { super(); this.isFullView = null; this.isInterfaceHidden = null; autorun(() => { this.isFullView = toJS(ChatStore.isFullView); }); autorun(() => { this.isInterfaceHidden = toJS(ChatStore.isInterfaceHidden); }); } /** * LitElement style callback */ static get styles() { return [ super.styles, css` /* https://haxtheweb.org/documentation/ddd */ :host { container-type: normal; display: block; } .chat-agent-wrapper { bottom: var(--ddd-spacing-2); display: flex; flex-direction: column; gap: var(--ddd-spacing-2); position: fixed; right: var(--ddd-spacing-2); width: 35%; } :host([is-full-view]) .chat-agent-wrapper { bottom: var(--ddd-spacing-0); gap: var(--ddd-spacing-0); right: var(--ddd-spacing-0); width: 25%; @media only screen and (min-height: 1000px) { width: 35%; } } :host([is-full-view]:host([is-interface-hidden])) .chat-agent-wrapper { bottom: var(--ddd-spacing-2); gap: var(--ddd-spacing-2); right: var(--ddd-spacing-2); } .agent-interface-wrapper { display: flex; justify-content: right; } .agent-button-wrapper { display: flex; justify-content: right; } @container (max-width: 600px) { .chat-agent-wrapper { width: 30%; } } @media only screen and (max-width: 425px) { .chat-agent-wrapper { width: 90%; } } `, ]; } /** * LitElement render callback */ render() { return html`
    ${ChatStore.buttonLabel}
    `; } /** * @descrition LitElement ready / calls to start AI */ firstUpdated() { ChatStore.startAI(); } static get properties() { return { ...super.properties, isFullView: { type: Boolean, attribute: "is-full-view", reflect: true, }, isInterfaceHidden: { type: Boolean, attribute: "is-interface-hidden", reflect: true, }, }; } } globalThis.customElements.define(ChatAgent.tag, ChatAgent); export { ChatAgent }; // register globally so we can make sure there is only one globalThis.ChatAgentStore = globalThis.ChatAgentStore || {}; // request if this exists. This helps invoke the element existing in the dom // as well as that there is only one of them. That way we can ensure everything // is rendered through the same modal globalThis.ChatAgentStore.requestAvailability = () => { if (!globalThis.ChatAgentStore.instance) { globalThis.ChatAgentStore.instance = globalThis.document.createElement("chat-agent"); globalThis.document.body.appendChild(globalThis.ChatAgentStore.instance); } return globalThis.ChatAgentStore.instance; }; // ! Chat Agent Store export const ChatAgentModalStore = globalThis.ChatAgentStore.requestAvailability(); ================================================ FILE: elements/chat-agent/demo/index.html ================================================ ChatAgent: chat-agent Demo ================================================ FILE: elements/chat-agent/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); // discover iconset and build json structure gulp.task("iconset", (done) => { const iconset = packageJson.wcfactory.iconset || {}; if(iconset.svgsPath && iconset.svgsPath !== ''){ const path = iconset.svgsPath; const manifestFilename = iconset.manifestFilename || `${packageJson.wcfactory.elementName}-iconsets-manifest.js` const manifestPath = iconset.manifestPath || `./lib`; const exportName = iconset.exportName || `${packageJson.wcfactory.className}IconsetsManifest`; const jsonContent = JSON.stringify(dirTree(path).icons, null, 2); const iconVar = `import { SimpleIconsetStore } from "@haxtheweb/simple-icon/lib/simple-iconset.js"; /** * @const ${exportName} */ export const ${exportName} = ${jsonContent}; SimpleIconsetStore.registerManifest(${exportName});` fs.writeFile(`${manifestPath}/${manifestFilename}.js`, iconVar, 'utf8', function (err) { if (err) { console.log("An error occured while writing iconset manifest Object to File."); return console.log(err); } console.log("Iconset SVGs and manifest JS file has been saved."); return true; }); } else { console.log("No Iconset Manifest"); } done(); }); gulp.task( "default", gulp.series("analyze") ); ================================================ FILE: elements/chat-agent/index.html ================================================ chat-agent documentation ================================================ FILE: elements/chat-agent/lib/chat-agent-store.js ================================================ /** * Copyright 2024 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { store } from "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; import { enableServices } from "@haxtheweb/micro-frontend-registry/lib/microServices.js"; import { MicroFrontendRegistry } from "@haxtheweb/micro-frontend-registry/micro-frontend-registry.js"; import { autorun, configure, makeObservable, observable, toJS } from "mobx"; configure({ enforceActions: false }); // enable services for glossary enhancement enableServices(["haxcms"]); MicroFrontendRegistry.add({ endpoint: "/api/apps/haxcms/aiChat", name: "@haxcms/aiChat", title: "AI Chat", description: "AI based chat agent that can answer questions about a site", params: { site: "location of the HAXcms site OR site.json data", type: "site for site.json or link for remote loading", question: "Question to ask of the AI", engine: "which engine to use as we test multiple", context: "context to query based on. Course typical", }, }); // strict mode off /** * @description store for the chat agent and it's subcomponents */ class ChatAgentStore { constructor() { this.buttonIcon = "hax:wizard-hat"; this.buttonLabel = "Merlin-AI"; this.chatLog = []; this.context = "phys211"; this.currentSuggestions = []; this.darkMode = null; store.darkMode !== undefined ? (this.darkMode = store.darkMode) : (this.darkMode = false); this.dataCollectionEnabled = true; this.developerModeEnabled = false; // ! this will enable developer mode for the entire chat system store.editMode !== undefined ? (this.editMode = store.editMode) : (this.editMode = false); this.engine = "alfred"; this.isFullView = false; this.isInterfaceHidden = true; this.isLoading = null; this.merlinIndex = 0; this.merlinTypeWriterSpeed = 2; this.messageIndex = 0; this.promptCharacterLimit; this.promptPlaceholder = "Enter your prompt here..."; this.userIndex = 0; this.userTypeWriterSpeed = 0; store.userData.userName !== undefined ? (this.userName = store.userData.userName) : (this.userName = "guest"); this.date = new Date(); this.month = this.date.getMonth() + 1; // months are zero indexed this.day = this.date.getDate(); makeObservable(this, { buttonIcon: observable, chatLog: observable, context: observable, darkMode: observable, dataCollectionEnabled: observable, developerModeEnabled: observable, editMode: observable, engine: observable, isFullView: observable, isInterfaceHidden: observable, isLoading: observable, merlinIndex: observable, messageIndex: observable, userIndex: observable, }); autorun(() => { const buttonIcon = toJS(this.buttonIcon); const chatLog = toJS(this.chatLog); const context = toJS(this.context); const darkMode = toJS(store.darkMode); const dataCollectionEnabled = toJS(this.dataCollectionEnabled); const developerModeEnabled = toJS(this.developerModeEnabled); const editMode = toJS(store.editMode); const engine = toJS(this.engine); const isFullView = toJS(this.isFullView); const isInterfaceHidden = toJS(this.isInterfaceHidden); const isLoading = toJS(this.isLoading); const merlinIndex = toJS(this.merlinIndex); const messageIndex = toJS(this.messageIndex); const userIndex = toJS(this.userIndex); // these are here because these updates weren't working without them if (isLoading) { this.buttonIcon = "hax:loading"; } else { this.buttonIcon = "hax:wizard-hat"; } if (darkMode) { this.darkMode = true; } else { this.darkMode = false; } if (editMode) { this.editMode = true; } else { this.editMode = false; } }); } /** * @description starts Merlin */ startAI() { this.handleMessage( "merlin", `Hello! My name is Merlin. I am currently in beta, and may not yet be feature complete, so you may encounter some bugs. By default I can answer questions about ${this.context}. How can I assist you today?`, ); if ( (this.month === 2 && this.day === 12) || (this.month === 6 && this.day === 6) || (this.month === 7 && this.day === 27) || (this.month === 8 && this.day === 15) || (this.month === 9 && this.day === 19) || (this.month === 10 && this.day === 1) || (this.month === 10 && this.day === 5) || (this.month === 12 && this.day === 5) || (this.month === 12 && this.day === 18) ) { this.currentSuggestions = [ { suggestion: "Who are you?", type: "hax", }, { suggestion: "What can you do for me?", type: "help", }, { suggestion: "How do I use you?", type: "help", }, { suggestion: "Why is my character wearing a hat?", type: "hax", }, ]; } else { this.currentSuggestions = [ { suggestion: "Who are you?", type: "hax", }, { suggestion: "What can you do for me?", type: "help", }, { suggestion: "How do I use you?", type: "help", }, ]; } try { document .querySelector("chat-agent") .shadowRoot.querySelector("chat-interface") .shadowRoot.querySelector("chat-message") .shadowRoot.querySelectorAll("chat-suggestion") .forEach((suggestion) => { if (suggestion.hasAttribute("disabled")) { suggestion.removeAttribute("disabled"); } if (suggestion.hasAttribute("chosen-prompt")) { suggestion.removeAttribute("chosen-prompt"); } }); } catch (error) { this.devStatement(error, "error"); } } /** * @description writes message to chatLog * @param {string} author - the author of the message (merlin or user's name / guest) * @param {string} message - the written or suggested prompt or response from Merlin */ handleMessage(author, message) { this.devStatement( `Writing message "${message}" by ${author} to chatLog.`, `info`, ); let authorIndex; this.messageIndex++; switch (author) { case "merlin": this.merlinIndex++; authorIndex = this.merlinIndex; break; case this.userName: this.userIndex++; authorIndex = this.userIndex; break; } let date = new Date(); const chatLogObject = { messageID: this.messageIndex, author: author, message: message, authorMessageIndex: authorIndex, timestamp: date.toString().replace(/\s/g, "-"), }; this.chatLog.push(chatLogObject); if (author === this.userName) { this.handleInteraction(message); } } /** * @description sends prompt to AI engine specified * @param {string} prompt - the written or suggested prompt */ handleInteraction(prompt) { this.devStatement( `Prompt sent to: ${this.engine}. Prompt sent: ${prompt}`, `info`, ); this.currentSuggestions = []; switch (prompt) { // Offline messages, do not request response from backend AI // Tutorial messages case "Who are you?": this.currentSuggestions = [ { suggestion: "What can you do for me?", type: "help", }, { suggestion: "How do I use you?", type: "help", }, ]; this.handleMessage( "merlin", "I am Merlin. I was created for use within HAX websites as an assistant to help you with your questions. How may I help you today?", ); break; case "What can you do for me?": this.currentSuggestions = [ { suggestion: "Who are you?", type: "hax", }, { suggestion: "How do I use you?", type: "help", }, ]; this.handleMessage( "merlin", "I can answer questions and chat with you about information relevant to the website you are navigating. How can I help you?", ); break; case "How do I use you?": this.currentSuggestions = [ { suggestion: "Who are you?", type: "hax", }, { suggestion: "What can you do for me?", type: "help", }, ]; this.handleMessage( "merlin", "I support numerous functions. You can ask me questions, as well as download our chat log and reset our chat. You can start asking me questions by clicking on one of the suggested prompts, or by typing a prompt in the input box below and pressing the send button or pressing the enter key on your keyboard. Here are some of the keyboard controls you can utilize: \n 1. Tab Key - Navigates you through the numerous usable buttons. \n 2. Enter Key (in text area) - Will submit the prompt you wrote. \n 3. Enter key (When focusing on a button) - Will act in the same way as clicking the button. \n 4. Up & Down Arrow Keys (in text area) - will navigate you through previously sent prompts so you can send them again.", ); break; case "Why is my character wearing a hat?": this.currentSuggestions = [ { suggestion: "Who are you?", type: "hax", }, { suggestion: "What can you do for me?", type: "help", }, { suggestion: "How do I use you?", type: "help", }, ]; this.handleMessage( "merlin", "Your character is wearing a hat because today is either a special (hat related) holiday, or another special occassion!", ); break; // Network error messages case "Why can't you connect?": this.currentSuggestions = [ { suggestion: "How do I fix this connection issue?", type: "network", }, ]; this.handleMessage( "merlin", "I am either unable to connect to the internet, or a service I connect to is not available, meaning I cannot research how to respond to your prompt.", ); break; case "How do I fix this connection issue?": this.currentSuggestions = [ { suggestion: "Why can't you connect?", type: "network", }, ]; this.handleMessage( "merlin", "Please ensure you are connected to the internet. I cannot respond to (most of) your questions if you are not connected to the internet. If you are connected, it is likely one of my connected services is having an issue, I will try to fix that and be back to help you soon.", ); break; // Online messages, do request response from backend AI default: var base = ""; if (globalThis.document.querySelector("base")) { base = globalThis.document.querySelector("base").href; } // TODO: Add support for data collection toggle (this.dataCollectionEnabled) const params = { site: { file: "https://haxtheweb.org/site.json", }, type: "site", question: prompt, engine: this.engine, context: this.context, }; this.isLoading = true; MicroFrontendRegistry.call("@haxcms/aiChat", params) .then((d) => { if (d.status == 200) { this.answers = [d.data.answers]; this.question = d.data.question; this.currentSuggestions = []; // TODO add support for AI based suggestions } this.isLoading = false; this.handleMessage("merlin", d.data.answers); }) .catch((error) => { this.isLoading = false; this.currentSuggestions = [ { suggestion: "Why can't you connect?", type: "network", }, { suggestion: "How do I fix this connection issue?", type: "network", }, ]; this.handleMessage( "merlin", "I'm sorry, I'm having trouble connecting right now. Please try again soon. If you'd like to learn more, please click on one of the suggested prompts.", ); this.devStatement(error, "error"); }); } } /** * @description downloads the chat log as the specified file type * @param {string} fileType - the file type to download */ handleDownload(fileType) { this.devStatement(`Downloading chatlog as ${fileType}.`, "info"); if (this.chatLog.length !== 0) { const LOG = JSON.stringify(this.chatLog, undefined, 2); let date = new Date(); const FILE_NAME = `${this.userName}-chat-log-${date.toString().replace(/\s/g, "-")}.${fileType}`; let download = document.createElement("a"); download.setAttribute( "href", "data:text/plain;charset=utf-8," + encodeURIComponent(LOG), ); download.setAttribute("download", FILE_NAME); download.click(); download.remove(); } } /** * @description handles the functionality of the dev mode console writing * @param {string} statement - the statement to write * @param {string} type - the type of statement (log, info, warn, error) */ devStatement(statement, type) { if (this.developerModeEnabled) { switch (type) { case "log": console.log(`CHAT-AGENT-DEV-MODE: ${statement}`); break; case "info": console.info(`CHAT-AGENT-DEV-MODE: ${statement}`); break; case "warn": console.warn(`CHAT-AGENT-DEV-MODE: ${statement}`); break; case "error": console.error(`CHAT-AGENT-DEV-MODE: ${statement}`); break; default: console.error("No devStatement type specified"); } } } } // register globally so we can make sure there is only one globalThis.ChatAgentStore = globalThis.ChatAgentStore || {}; // request if this exists. This helps invoke the element existing in the dom // as well as that there is only one of them. That way we can ensure everything // is rendered through the same modal globalThis.ChatAgentStore.requestAvailability = () => { if (!globalThis.ChatAgentStore.instance) { globalThis.ChatAgentStore.instance = document.createElement("chat-agent-store"); document.body.appendChild(globalThis.ChatAgentStore.instance); } return globalThis.ChatAgentStore.instance; }; export const ChatStore = new ChatAgentStore(); ================================================ FILE: elements/chat-agent/lib/chat-button.js ================================================ /** * Copyright 2024 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import { css, html } from "lit"; import { autorun, toJS } from "mobx"; import { ChatStore } from "./chat-agent-store.js"; class ChatButton extends DDD { static get tag() { return "chat-button"; } constructor() { super(); this.buttonIcon = null; this.darkMode = null; this.isFullView = null; this.isInterfaceHidden = null; autorun(() => { this.buttonIcon = toJS(ChatStore.buttonIcon); }); autorun(() => { this.darkMode = toJS(ChatStore.darkMode); }); autorun(() => { this.isFullView = toJS(ChatStore.isFullView); }); autorun(() => { this.isInterfaceHidden = toJS(ChatStore.isInterfaceHidden); }); } static get styles() { return [ super.styles, css` /* https://haxtheweb.org/documentation/ddd */ :host { display: block; z-index: 999998; } .chat-button-wrapper { align-items: center; background-color: var(--data-theme-primary, var(--ddd-primary-1)); border-color: light-dark( var(--ddd-theme-default-coalyGray), var(--ddd-theme-default-white) ); border-radius: var(--ddd-radius-lg); border-style: solid; border-width: 0.75px; box-shadow: 0 4px rgba(0, 3, 33, 0.4); cursor: pointer; display: flex; flex-direction: column; height: 96px; justify-content: center; width: 96px; } .chat-button-wrapper:hover, .chat-button-wrapper:focus-visible { box-shadow: 0 6px rgba(0, 3, 33, 0.4); transform: translateY(-2px); } .chat-button-wrapper:active, .chat-button-wrapper.active-mimic /* :active does not work with keypress by default */ { box-shadow: 0 1px rgba(0, 3, 33, 0.4); transform: translateY(3px); } :host([is-full-view]:not([is-interface-hidden])) .chat-button-wrapper { display: none; } .chat-button-wrapper:hover .label-wrapper, .chat-button-wrapper:focus-visible .label-wrapper { text-decoration: underline; } .icon-wrapper { align-items: center; background-color: var(--ddd-theme-default-white); border-radius: var(--ddd-radius-circle); display: flex; height: 56px; justify-content: center; margin-bottom: var(--ddd-spacing-1); width: 56px; } simple-icon-lite { --simple-icon-height: var(--ddd-icon-md); --simple-icon-width: var(--ddd-icon-md); color: var(--data-theme-primary, var(--ddd-primary-13)); } .label-wrapper { background-color: var(--ddd-theme-default-white); border-radius: var(--ddd-radius-xs); color: var(--ddd-theme-default-coalyGray); font-size: var(--ddd-font-size-4xs); font-weight: var(--ddd-font-weight-medium); max-width: var(--ddd-spacing-19); overflow: hidden; padding: var(--ddd-spacing-1); text-align: center; text-overflow: ellipsis; white-space: nowrap; /* Prevent text highlighting in button */ -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; } :host([dark-mode]) .label-wrapper { background-color: var(--ddd-theme-default-coalyGray); color: var(--ddd-theme-default-white); } `, ]; } render() { return html`
    ${ChatStore.buttonLabel}
    `; } /** * @description - handles enter key press * @param {event} e - enter key press */ keyPress(e) { if (e.key === "Enter") { e.preventDefault(); ChatStore.devStatement("Chat button pressed using Enter key.", "log"); // mimic :active since it only works on click const CHAT_BUTTON_WRAPPER = this.shadowRoot.querySelector( ".chat-button-wrapper", ); if (CHAT_BUTTON_WRAPPER.classList.contains("active-mimic")) { CHAT_BUTTON_WRAPPER.classList.remove("active-mimic"); } else { CHAT_BUTTON_WRAPPER.classList.add("active-mimic"); } setTimeout(() => { CHAT_BUTTON_WRAPPER.classList.remove("active-mimic"); }, 100); this.handleChatButton(); } } /** * @description - handles button being clicked / pressed, will toggle the interface visibility */ handleChatButton() { ChatStore.devStatement("Chat button pressed.", "log"); ChatStore.isInterfaceHidden = !this.isInterfaceHidden; } static get properties() { return { ...super.properties, buttonIcon: { type: String, attribute: "button-icon", }, darkMode: { type: Boolean, attribute: "dark-mode", reflect: true, }, isFullView: { type: Boolean, attribute: "is-full-view", reflect: true, }, isInterfaceHidden: { type: Boolean, attribute: "is-interface-hidden", reflect: true, }, }; } } globalThis.customElements.define(ChatButton.tag, ChatButton); export { ChatButton }; ================================================ FILE: elements/chat-agent/lib/chat-control-bar.js ================================================ /** * Copyright 2024 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import { css, html } from "lit"; import { autorun, toJS } from "mobx"; import { ChatStore } from "./chat-agent-store.js"; class ChatControlBar extends DDD { static get tag() { return "chat-control-bar"; } constructor() { super(); this.dataCollectionEnabled = null; this.isFullView = null; this.isInterfaceHidden = null; autorun(() => { this.dataCollectionEnabled = toJS(ChatStore.dataCollectionEnabled); }); autorun(() => { this.isFullView = toJS(ChatStore.isFullView); }); autorun(() => { this.isInterfaceHidden = toJS(ChatStore.isInterfaceHidden); }); } static get styles() { return [ super.styles, css` /* https://haxtheweb.org/documentation/ddd */ :host { container-type: inline-size; display: block; } .chat-control-bar-wrapper { align-items: center; display: flex; justify-content: space-between; padding: var(--ddd-spacing-2) var(--ddd-spacing-0); } button { background-color: #2b2a33; border-radius: var(--ddd-radius-sm); color: var(--ddd-theme-default-white); } button:hover, button:focus-visible { background-color: #52525e; } button > simple-icon-lite { --simple-icon-color: var(--ddd-theme-default-white); } simple-tooltip { --simple-tooltip-delay-in: 1000ms; } .data-collection-icon { --simple-icon-color: var(--ddd-theme-default-original87Pink); } .data-collection-label { font: var(--ddd-font-primary); font-size: 12px; } :host([data-collection-enabled]) .data-collection-icon { --simple-icon-color: var(--ddd-theme-default-futureLime); } /* Phones */ @media only screen and (max-width: 425px), only screen and (max-height: 616px) { #view-button { display: none; } } @container (max-width: 330px) { .data-collection-label { display: none; } } `, ]; } render() { return html`
    Download Chat Log Reset Chat Toggle Data Collection Toggle Developer Mode
    ${this.isFullView ? "Exit Full View" : "Enter Full View"} ${this.isFullView ? html` Hide Interface ` : ""}
    `; } /** * @description handles the functionality of the download button */ handleDownloadLogButton() { ChatStore.devStatement("Download log button pressed.", "log"); this.downloadChatLog(); } /** * @description handles the functionality of the reset button */ handleResetButton() { ChatStore.devStatement("Reset button pressed.", "log"); if (confirm("Reset the chat?")) { if (confirm("Download the chat log before you reset?")) { ChatStore.devStatement( "Download chat log before reset confirmed.", "info", ); this.downloadChatLog(); } else { ChatStore.devStatement( "Download chat log before reset denied.", "warning", ); } this.resetChat(); } } /** * @description - handles the functionality of the data collection button */ handleDataCollectionButton() { ChatStore.dataCollectionEnabled = !ChatStore.dataCollectionEnabled; this.dataCollectionEnabled ? alert("Your conversations will be used to train our AI models") : alert("Your conversations will not be used to train our AI models"); } /** * @description - handles the functionality of the dev mode button */ handleDevModeButton() { ChatStore.developerModeEnabled = !ChatStore.developerModeEnabled; } /** * @description Toggles the view of chat-interface to full or minimized */ handleViewButton() { ChatStore.devStatement("View switch button pressed.", "log"); ChatStore.isFullView = !this.isFullView; this.requestUpdate(); // changes button icon ChatStore.devStatement( "View switched to: " + (ChatStore.isFullView ? "full" : "standard"), "info", ); } /** * @description changes the interface window to be hidden and unfocusable */ handleHideButton() { ChatStore.devStatement("Hide button pressed.", "log"); if (!this.isInterfaceHidden) { ChatStore.isInterfaceHidden = true; } } /** * @description downloads the chat log as a .txt file */ downloadChatLog() { ChatStore.devStatement("Calling download function...", "info"); ChatStore.handleDownload("txt"); } /** * @description resets the chat to initial state */ resetChat() { ChatStore.devStatement("Resetting chat...", "info"); ChatStore.chatLog = []; ChatStore.merlinIndex = 0; ChatStore.messageIndex = 0; ChatStore.userIndex = 0; ChatStore.startAI(); } static get properties() { return { ...super.properties, dataCollectionEnabled: { type: Boolean, attribute: "data-collection-enabled", reflect: true, }, isFullView: { type: Boolean, attribute: "is-full-view", reflect: true, }, isInterfaceHidden: { type: Boolean, attribute: "is-interface-hidden", reflect: true, }, }; } } globalThis.customElements.define(ChatControlBar.tag, ChatControlBar); export { ChatControlBar }; ================================================ FILE: elements/chat-agent/lib/chat-developer-panel.js ================================================ /** * Copyright 2024 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import { css, html } from "lit"; import { autorun, toJS } from "mobx"; import { ChatStore } from "./chat-agent-store.js"; class ChatDeveloperPanel extends DDD { static get tag() { return "chat-developer-panel"; } constructor() { super(); this.chatLog = []; this.context = null; this.engine = null; this.isFullView = null; autorun(() => { this.chatLog = toJS(ChatStore.chatLog); }); autorun(() => { this.context = toJS(ChatStore.context); }); autorun(() => { this.engine = toJS(ChatStore.engine); }); autorun(() => { this.isFullView = toJS(ChatStore.isFullView); }); } static get styles() { return [ super.styles, css` /* https://haxtheweb.org/documentation/ddd */ :host { container-type: inline-size; display: block; } .chat-developer-panel-wrapper { background-color: var(--ddd-theme-default-keystoneYellow); border-radius: var(--ddd-radius-sm); display: flex; flex-direction: column; gap: var(--ddd-spacing-2); padding: var(--ddd-spacing-1) var(--ddd-spacing-1); } .console-table { align-items: center; display: flex; gap: var(--ddd-spacing-1); justify-content: space-between; } .switches { align-items: center; display: flex; justify-content: center; gap: var(--ddd-spacing-1); } button, select { align-items: center; background-color: #2b2a33; border-radius: var(--ddd-radius-sm); color: var(--ddd-theme-default-white); cursor: pointer; display: flex; gap: var(--ddd-spacing-1); justify-content: center; font: var(--ddd-font-primary); font-size: 12px; } label { background-color: var(--ddd-theme-default-coalyGray); color: var(--ddd-theme-default-white); font-size: 14px; padding: var(--ddd-spacing-2); } button:hover, button:focus-visible { background-color: #52525e; } button > simple-icon-lite { --simple-icon-color: var(--ddd-theme-default-white); } simple-tooltip { --simple-tooltip-delay-in: 1000ms; } @container (max-width: 500px) { .btn-txt { display: none; } } @container (max-width: 180px) { .console-table { flex-wrap: wrap; justify-content: center; } } @media only screen and (max-height: 575px) { :host { display: none; } } `, ]; } render() { return html`
    Print User Chat Log as Table to Console Print Merlin Chat Log as Table to Console Print Entire Chat Log as Table to Console Download Chat Log as .json
    `; } /** * @description LitElement firstUpdated / Sets selected properties of engine and context selection * @param {object} changedProperties - changed properties */ firstUpdated() { const ENGINE_OPTIONS = this.shadowRoot.querySelectorAll( "#engine-selection option", ); const CONTEXT_OPTIONS = this.shadowRoot.querySelectorAll( "#context-selection option", ); ENGINE_OPTIONS.forEach((option) => { if (option.value === this.engine) { option.selected = true; } }); CONTEXT_OPTIONS.forEach((option) => { if (option.value === ChatStore.context) { option.selected = true; } }); } /** * @description handles all console table buttons utilizing button id * @param {object} e - event */ handleConsoleTableButton(e) { const TARGET = e.currentTarget.id; console.info(`HAX-DEV-MODE: ${TARGET} button pressed.`); switch (TARGET) { case "console-table-user": console.table(this.compileChatLog(ChatStore.userName)); break; case "console-table-merlin": console.table(this.compileChatLog("merlin")); break; case "console-table-all": console.table(this.chatLog); break; } } /** * @description compiles a smaller chat log for the given author of messages * @param {string} author - the name of the author of the messages. Either the user's name or "merlin". */ compileChatLog(author) { ChatStore.devStatement(`Compiling "${author}" chat log...`, "info"); let compiledChatLog = []; this.chatLog.forEach((object) => { if (object.author === author) { compiledChatLog.push(object); } }); return compiledChatLog; } /** * @description downloads the chat log as a .json file */ handleDownloadAsJsonButton() { ChatStore.devStatement(`Calling download funtion...`, "info"); ChatStore.handleDownload("json"); } /** * @description handles the functionality of the switch engine dropdown */ handleSwitchEngine() { ChatStore.engine = this.shadowRoot.querySelector("#engine-selection").value; ChatStore.devStatement(`Engine switched to ${ChatStore.engine}`, "info"); } /** * @description handles the functionality of the switch context dropdown */ handleContextChange() { ChatStore.context = this.shadowRoot.querySelector("#context-selection").value; ChatStore.devStatement(`Context switched to ${ChatStore.context}`, "info"); } static get properties() { return { ...super.properties, context: { type: String, attribute: "context", }, engine: { type: String, attribute: "engine", }, isFullView: { type: Boolean, attribute: "is-full-view", reflect: true, }, }; } } globalThis.customElements.define(ChatDeveloperPanel.tag, ChatDeveloperPanel); export { ChatDeveloperPanel }; ================================================ FILE: elements/chat-agent/lib/chat-input.js ================================================ /** * Copyright 2024 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { DDD } from "@haxtheweb/d-d-d/d-d-d.js"; import { css, html } from "lit"; import { autorun, toJS } from "mobx"; import { ChatStore } from "./chat-agent-store.js"; class ChatInput extends DDD { static get tag() { return "chat-input"; } constructor() { super(); this.chatLog = []; this.darkMode = null; this.messageIndex = null; this.userIndex = null; this.previousMessagesIndex = null; this.userName = null; autorun(() => { this.chatLog = toJS(ChatStore.chatLog); }); autorun(() => { this.darkMode = toJS(ChatStore.darkMode); }); autorun(() => { // ! these two need to run together to prevent bugs this.messageIndex = toJS(ChatStore.messageIndex); this.previousMessagesIndex = toJS(this.messageIndex); }); autorun(() => { this.userIndex = toJS(ChatStore.userIndex); }); autorun(() => { this.userName = toJS(ChatStore.userName); }); } static get styles() { return [ super.styles, css` /* https://haxtheweb.org/documentation/ddd */ :host { display: block; font-family: var(--ddd-font-primary); } .chat-input-wrapper { align-items: center; display: flex; gap: var(--ddd-spacing-3); justify-content: center; padding: var(--ddd-spacing-2) var(--ddd-spacing-3); border-radius: var(--ddd-radius-lg); } :host([dark-mode]) .chat-input-wrapper { background-color: var(--ddd-theme-default-coalyGray); color: var(--ddd-theme-default-white); } #user-input { background-color: var(--ddd-theme-default-white); border-radius: var(--ddd-radius-lg); color: var(--ddd-theme-default-coalyGray); padding: var(--ddd-spacing-2) var(--ddd-spacing-3); resize: none; scrollbar-width: none; width: 85%; } :host([dark-mode]) #user-input { background-color: var(--ddd-theme-default-coalyGray); color: var(--ddd-theme-default-white); } button { align-items: center; background-color: #2b2a33; border-radius: var(--ddd-radius-sm); color: var(--ddd-theme-default-white); cursor: pointer; display: flex; gap: var(--ddd-spacing-1); justify-content: center; } button:hover, button:focus-visible { background-color: #52525e; } .send-button { align-items: center; background-color: var(--data-theme-primary, var(--ddd-primary-1)); border-radius: var(--ddd-radius-circle); box-shadow: 0 4px rgba(0, 3, 33, 0.2); cursor: pointer; display: flex; height: 52px; justify-content: center; width: 52px; } #send-button:hover, #send-button:focus-visible { box-shadow: 0 6px rgba(0, 3, 33, 0.2); transform: translateY(-2px); } #send-button:active, #send-button.active-mimic { box-shadow: 0 1px rgba(0, 3, 33, 0.2); transform: translateY(3px); } simple-icon-lite { color: var( --lowContrast-override, var(--ddd-theme-bgContrast, white) ); } simple-tooltip { --simple-tooltip-delay-in: 1000ms; } `, ]; } render() { return html`
    Send Prompt to Merlin
    `; } /** * @description - handles key presses in textarea * @param {event} e - event */ handleKeyPress(e) { switch (e.key) { case "Enter": e.preventDefault(); this.handleSendButton(); break; case "ArrowUp": // ! don't touch; it's working >:( e.preventDefault(); this.displayPreviousMessages("up"); break; case "ArrowDown": e.preventDefault(); this.displayPreviousMessages("down"); break; } } /** * @description handles key presses when focusing the send button */ handleSendButtonKeyPress(e) { // mimic :active since it only works on click if (e.key === "Enter") { e.preventDefault(); const SEND_BUTTON = this.shadowRoot.querySelector("#send-button"); if (SEND_BUTTON.classList.contains("active-mimic")) { SEND_BUTTON.classList.remove("active-mimic"); } else { SEND_BUTTON.classList.add("active-mimic"); } setTimeout(() => { SEND_BUTTON.classList.remove("active-mimic"); }, 100); this.handleSendButton(); } } /** * @description - handles direction buttons * @param {event} e - event */ handleDirectionButtons(e) { const BUTTON_ID = e.currentTarget.id; ChatStore.devStatement(`${BUTTON_ID} button pressed.`, "info"); switch (BUTTON_ID) { case "input-up-btn": this.displayPreviousMessages("up"); break; case "input-down-btn": this.displayPreviousMessages("down"); break; } } /** * @description handles "send" events, writing entered prompt to chat log */ handleSendButton() { const INPUTTED_PROMPT = this.shadowRoot.querySelector("#user-input").value; if ( ChatStore.promptCharacterLimit > 0 && INPUTTED_PROMPT.length > ChatStore.promptCharacterLimit ) { // ensures prompt is within character limit, even if user changes "maxlength" attribute in dev tools alert( `Please shorten your prompt to no more than ${ChatStore.promptCharacterLimit} characters.`, ); } if (INPUTTED_PROMPT !== "") { ChatStore.devStatement( `Send function activated. "${INPUTTED_PROMPT}" sent to Merlin.`, "info", ); ChatStore.handleMessage(ChatStore.userName, INPUTTED_PROMPT); this.shadowRoot.querySelector("#user-input").value = ""; } else { ChatStore.devStatement( `Send button activated. No prompt to send.`, "warn", ); } } /** * @description changed Here is an example of a block of code on it's own, using class 'block-code', redundant, but avoids common 'block' class name
            Here is an    example of a    block using the         'pre'    tag on it's    own

    Here is a good example of some Here's a super long version of a Highlighted Text that extends beyond the end of the border box

    Here is an example of an abbreviation: Penn State

    Here's an example of a sub: H2O

    And a sup: x3 = 9

    My favorite color is blue red!

    My car is blue.

    Text design-treatment

    There's 2 ways to get underlined styling

    HR elements


    Default horizontal line using hr element



    hr elements also accept data-primary values, and are are designed to play-nice when placed inside a heading element

    Heading with internal hr element

    <h2 style="width: fit-content">Heading with internal hr element<hr /></h2>

    When combined with width: fit-content on the header itself, can limit the underlining to exactly the text

    Or, if you want variable length, use design-treatment:

    (with p meaning %)

    Vertical Line - data-design-treament="vert"
    Vertical Line - data-design-treament="horz-10p"
    Vertical Line - data-design-treament="horz-25p"
    Vertical Line - data-design-treament="horz-50p"
    Vertical Line - data-design-treament="horz-full"
    Vertical Line - data-design-treament="horz-md"
    Vertical Line - data-design-treament="horz-lg"

    Other design treatments:

    Background color data-design-treatment="bg"

    Drop Cap - Small data-design-treatment="dropCap-sm"

    Drop Cap - Medium data-design-treatment="dropCap-md"

    Drop Cap - Large data-design-treatment="dropCap-lg"

    `; } renderCards() { return html`

    ddd-card

    Close to Philadelphia, Penn State Abington's suburban campus offers bachelor's degrees, athletics, and a diverse student community.

    In central Pennsylvania close to University Park, Penn State Altoona offers the appeal of a small college with the prestige of a major research university.

    Situated on one hundred acres, Penn State Beaver offers several bachelor's degrees, on-campus housing, and varsity sports, all within easy reach of Pittsburgh.

    Located in northwestern Pennsylvania, Penn State Behrend offers undergraduate and graduate degrees, research experiences, on-campus living, and athletics.

    Penn State Berks offers bachelor's degrees and four associate programs with small classes, internships, undergraduate research opportunities, and residential campus life.

    Penn State Brandywine is all about the highest quality in teaching, research, scholarship, and service to the campus, students, and the Delaware County community.

    Dickinson Law, located in Carlisle, offers study in various types of law and across disciplines.

    Penn State DuBois prepares leaders through cutting-edge technology, faculty expertise, and dedication to excellence in a small-town setting in north-central Pennsylvania.

    `; } renderStepsList() { return html`

    ddd-steps-list

    This is the first awesome step so that you are ready for class!

    You really need to go to class in order to learn everything

    `; } renderButtons() { let headers = []; for (let i = 0; i < 22; i++) { let random = Math.floor(Math.random() * 14); headers.push(html`
    Primary-${i} Primary-${i} Light Primary-${i} Hotline Primary-${i} large Primary-${i} hide-icon Primary-${i} saturate
    `); } headers.push(html`
    Default Default Light Default Hotline Default large Default hide-icon Default saturate

    Buttons also support data-accent!

    Accent-7 Accent-9 Accent-14 Accent-10 Accent-13
    Note: Accent color will not be applied if the primary color does not meet constrast requirements
    Accent-10 Accent-7 Accent-11
    `); return headers; } renderPageSections() { return html`

    We'll meet you where you are.


    We're ready for you, future Nittany Lions! From virtual tours, online orientation experiences to connecting with current students, staff, and faculty in real time.

    Create ANYTHING easily with HAX

    Part of Penn State?

    Log in Learn HAX

    What is HAX?


    A radically simple approach to web authoring and content ownership.

    HAX is built on the premise that any and everyone should be able to create rich, engaging content without the need for complex platforms, installations or vendor lock-in. The HAX block system allows for sustainable content creation that is easy to click and build for novices while outputting clean, semantic HTML for experts.

    This is University Text


    There's a reason University consistently ranks among the top one percent of the world's universities. Across University campuses, our University students and University faculty and staff know the real measure of success goes beyond the classroom—it's the positive impact made on communities across the world.

    This is University Text


    There’s a reason University consistently ranks among the top one percent of the world’s universities. Across University campuses, our University students and University faculty and staff know the real measure of success goes beyond the classroom—it’s the positive impact made on communities across the world.

    About

    HAX is a service provided through a collaboration between Penn State College of Arts and Architecture, Eberly College of Science, College of Information Sciences and Technology, and University libraries. The platform is powered by HAXcms, originally developed to power 100s of high scale online courses. Interested in collabora ting? Contact Bill Rose, Product Owner.

    Privacy policy

    Penn State IT does not monitor websites and does not assume responsibility for any published content. The content authors are responsible for the content of their websites. Use of this service is governed by Penn State policies and guidelines, including Penn State IT Web Services Policy. All pages must be compliant with Accessibility Standards, Policy AD69.

    Frequently Asked Questions


    Who can use HAX?

    Anyone, anywhere! Thanks to HAX being open source, all you need is a web server and a domain name to get s tarted. We also support publishing directly to GitHub pages and other static publishing tools for advanced developer use-cases. If you are part of Penn State though you can just click log in t

    `; } renderInstructionalComponents() { return html`

    figure-label

    stop-note

    You can write any error message you want here. You can write any warning message you want here. You can write any confirmation message you want here. You can write anything you want here (chapters, pages, etc.).

    learning-component

    This step includes three parts:

    In Step 2, you will be interviewing potential customers to find out if your assumptions are correct or where they fall short. This process helps you make sure that you are building something that solves a real problem for real customers.

    block-quote

    I was sitting in a chair in the patent office at Bern, when all of a sudden a thought occurred to me: 'If a person falls freely, he will not feel his own weight.
    I was sitting in a chair in the patent office at Bern, when all of a sudden a thought occurred to me: 'If a person falls freely, he will not feel his own weight.

    self-check

    How large can the average great white shark grow to be? The Great White shark can grow to be 15 ft to more than 20 ft in length and weigh 2.5 tons or more.

    media-image

    This is my citation.
    Curabitur aliquet quam id dui posuere blandit. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Cras ultricies ligula sed magna dictum porta. Proin eget tortor risus. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Donec sollicitudin molestie malesuada. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Vivamus suscipit tortor eget felis porttitor volutpat.

    accent-card

    Default Orientation

    This card has the default orientation.
    Read More...
    Default Orientation
    This card has the default orientation.
    Read More...
    `; } selectOption() { return html`

    Select an option to render

    `; } /** * LitElement render callback */ render() { if (this.options.includes(this.option)) { const renderMethod = this[`render${this.option}`]; if (typeof renderMethod === "function") { return html` ${this.selectOption()} ${renderMethod.call(this)} `; } else { console.error(`Render method for option "${this.option}" not found.`); } } else { return html` ${this.selectOption()} ${this.options.map((option) => { const renderMethod = this[`render${option}`]; if (typeof renderMethod === "function") { return html`
    ${option} ${renderMethod.call(this)}
    `; } else { console.error(`Render method for option "${option}" not found.`); return html``; // Return empty template if method not found } })} `; } } /** * Convention we use */ static get tag() { return "d-d-docs"; } /** * haxProperties integration via file reference */ static get haxProperties() { return { api: "1", type: "element", editingElement: "core", hideDefaultSettings: false, canScale: true, canEditSource: true, contentEditable: false, gizmo: { title: "Design, Develop, Destroy", description: "Design system implementation for HAX", icon: "hax:hax2022", color: "purple", tags: ["Other", "developer", "design"], handles: [], meta: { author: "HAXTheWeb core team", }, }, settings: { configure: [ { property: "option", title: "Option to render", type: "select", options: { "*": "Full styleguide", ...styleGuideTopics }, }, ], advanced: [], developer: [], }, saveOptions: { unsetAttributes: [], }, documentation: { howTo: null, purpose: null, }, demoSchema: [ { tag: "d-d-docs", content: "", properties: {}, }, ], }; } } globalThis.customElements.define(DDDocs.tag, DDDocs); export { DDDocs }; ================================================ FILE: elements/d-d-docs/index.html ================================================ d-d-docs

    d-d-docs

    ================================================ FILE: elements/d-d-docs/netlify.toml ================================================ [build] publish = "public" command = "npm run build" [[headers]] for = "/*" [headers.values] Cache-Control = "max-age=31536001" Cross-Origin-Opener-Policy = "same-origin" Cross-Origin-Embedder-Policy = "require-corp" [[headers]] for = "/" [headers.values] Cache-Control = "no-cache" [[headers]] for = "/*.html" [headers.values] Cache-Control = "no-cache" ================================================ FILE: elements/d-d-docs/package.json ================================================ { "name": "@haxtheweb/d-d-docs", "version": "25.0.0", "description": "Webcomponent d-d-docs following hax / open-wc recommendations", "license": "Apache-2.0", "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "repository": { "type": "git", "url": "" }, "type": "module", "main": "d-d-docs.js", "module": "d-d-docs.js", "scripts": { "start": "web-dev-server", "build": "rimraf public && rollup -c rollup.config.js && npm run analyze", "analyze": "cem analyze --litelement --exclude public", "release": "npm run build && commit-and-tag-version && git push --follow-tags origin main && npm publish", "test": "web-test-runner test/**/*.test.js --coverage --node-resolve", "test:watch": "web-test-runner test/**/*.test.js --node-resolve --watch" }, "dependencies": { "@haxtheweb/accent-card": "^25.0.0", "@haxtheweb/course-design": "^25.0.0", "@haxtheweb/d-d-d": "^25.0.0", "@haxtheweb/deduping-fix": "^25.0.0", "@haxtheweb/figure-label": "^25.0.0", "@haxtheweb/haxcms-elements": "^25.0.0", "@haxtheweb/media-image": "^25.0.0", "@haxtheweb/page-section": "^25.0.0", "@haxtheweb/self-check": "^25.0.0", "@haxtheweb/simple-cta": "^25.0.0", "@haxtheweb/simple-modal": "^25.0.0", "@haxtheweb/stop-note": "^25.0.0", "@haxtheweb/video-player": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@babel/preset-env": "^7.16.4", "@custom-elements-manifest/analyzer": "0.10.4", "@open-wc/building-rollup": "^3.0.2", "@open-wc/testing": "4.0.0", "@rollup/plugin-babel": "6.0.4", "@rollup/plugin-node-resolve": "16.0.1", "@rollup/plugin-terser": "^0.4.4", "@web/dev-server": "0.4.6", "@web/rollup-plugin-html": "^2.3.0", "@web/rollup-plugin-import-meta-assets": "2.3.0", "@web/test-runner": "^0.19.0", "babel-plugin-template-html-minifier": "^4.1.0", "babel-plugin-transform-dynamic-import": "^2.1.0", "commit-and-tag-version": "12.5.1", "rimraf": "^5.0.7", "rollup-plugin-esbuild": "6.2.1" }, "private": false, "publishConfig": { "access": "public" }, "hax": { "cli": true }, "customElements": "custom-elements.json", "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/d-d-docs/rollup.config.js ================================================ import nodeResolve from '@rollup/plugin-node-resolve'; import babel from '@rollup/plugin-babel'; import { rollupPluginHTML as html } from '@web/rollup-plugin-html'; import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets'; import esbuild from 'rollup-plugin-esbuild'; export default { input: 'index.html', output: { entryFileNames: '[hash].js', chunkFileNames: '[hash].js', assetFileNames: '[hash][extname]', format: 'es', dir: 'public', }, preserveEntrySignatures: false, plugins: [ /** Enable using HTML as rollup entrypoint */ html({ minify: true, }), /** Resolve bare module imports */ nodeResolve(), /** Minify JS, compile JS to a lower language target */ esbuild({ minify: true, target: ['chrome64', 'firefox67', 'safari11.1'], }), /** Bundle assets references via import.meta.url */ importMetaAssets(), /** Minify html and css tagged template literals */ babel({ plugins: [ [ 'babel-plugin-template-html-minifier', { modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] }, failOnError: false, strictCSS: true, htmlMinifier: { collapseWhitespace: true, conservativeCollapse: true, removeComments: true, caseSensitive: true, minifyCSS: true, }, }, ], ], }), ], }; ================================================ FILE: elements/d-d-docs/test/d-d-docs.test.js ================================================ import { html, fixture, expect } from '@open-wc/testing'; import "../d-d-docs.js"; describe("DDDocs test", () => { let element; beforeEach(async () => { element = await fixture(html` `); }); it("basic will it blend", async () => { expect(element).to.exist; }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); }); ================================================ FILE: elements/d-d-docs/web-dev-server.config.mjs ================================================ // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr'; /** Use Hot Module replacement by adding --hmr to the start command */ const hmr = process.argv.includes('--hmr'); export default /** @type {import('@web/dev-server').DevServerConfig} */ ({ open: '/', watch: !hmr, https: true, dedupe: true, /** Resolve bare module imports */ nodeResolve: { exportConditions: ['browser', 'development'], }, /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */ // esbuildTarget: 'auto' /** Set appIndex to enable SPA routing */ // appIndex: 'demo/index.html', plugins: [ /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */ // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }), ], // See documentation for all available options }); ================================================ FILE: elements/data-viz/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/data-viz/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/data-viz/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/data-viz/.npmignore ================================================ node_modules ================================================ FILE: elements/data-viz/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/data-viz/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/data-viz/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2019 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/data-viz/README.md ================================================ # <data-viz> Viz > display pouch-db data using graphs ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/data-viz/data-viz.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Viz ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/data-viz/data-viz.js ================================================ /** * Copyright 2020 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { LitElement, html, css } from "lit"; import "@haxtheweb/chartist-render/chartist-render.js"; // register globally so we can make sure there is only one globalThis.DataViz = globalThis.DataViz || {}; // request if this exists. This helps invoke the element existing in the dom // as well as that there is only one of them. That way we can ensure everything // is rendered through the same data-viz element, making it a singleton. globalThis.DataViz.requestAvailability = () => { // if there is no single instance, generate one and append it to end of the document if ( !globalThis.DataViz.instance && globalThis.document && globalThis.document.body ) { globalThis.DataViz.instance = globalThis.document.createElement("data-viz"); globalThis.document.body.appendChild(globalThis.DataViz.instance); } return globalThis.DataViz.instance; }; /** * `data-viz` * `display pouch-db data using graphs` * @demo demo/index.html * @element data-viz */ class DataViz extends LitElement { //styles function static get styles() { return [ css` :host { display: block; } :host([hidden]) { display: none; } `, ]; } // render function render() { return html` `; } // properties available to the custom element for data binding static get properties() { return { ...super.properties }; } /** * Store the tag name to make it easier to obtain directly. * @notice function name must be here for tooling to operate correctly */ static get tag() { return "data-viz"; } constructor() { super(); this.windowControllers = new AbortController(); } /** * life cycle, element is afixed to the DOM */ connectedCallback() { super.connectedCallback(); globalThis.addEventListener( "pouch-db-show-data", this.showDataFunction.bind(this), { signal: this.windowControllers.signal }, ); } /** * Show the data based on user selecting the view and * that they want to see how they did. */ showDataFunction(e) { var queryData = e.detail; var bardata = { labels: queryData.labels, series: queryData.series, }; this.shadowRoot.querySelector("#barchart").data = bardata; } /** * life cycle, element is removed from the DOM */ disconnectedCallback() { this.windowControllers.abort(); super.disconnectedCallback(); } /** * Hide callback */ hideDataViz(e) { // add your code to run when the singleton hides } /** * Show / available callback */ showDataViz(e) { // add your code to run when the singleton is called for } } globalThis.customElements.define(DataViz.tag, DataViz); export { DataViz }; ================================================ FILE: elements/data-viz/demo/index.html ================================================ DataViz: data-viz Demo

    Basic data-viz demo

    ================================================ FILE: elements/data-viz/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/data-viz/index.html ================================================ data-viz documentation ================================================ FILE: elements/data-viz/package.json ================================================ { "name": "@haxtheweb/data-viz", "wcfactory": { "className": "DataViz", "customElementClass": "LitElement", "elementName": "data-viz", "generator-wcfactory-version": "0.7.3", "useHAX": false, "useSass": false, "files": { "css": "src/data-viz.css", "html": "src/data-viz.html", "js": "src/data-viz.js", "properties": "src/data-viz-properties.json", "hax": "src/data-viz-hax.json" }, "sharedStyles": [] }, "version": "25.0.0", "description": "display pouch-db data using graphs", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "data-viz.js", "module": "data-viz.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/chartist-render": "^25.0.0", "@haxtheweb/es-global-bridge": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/data-viz/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/data-viz/test/data-viz.test.js ================================================ import { fixture, expect, html, oneEvent, waitUntil } from "@open-wc/testing"; import { sendKeys } from "@web/test-runner-commands"; import sinon from "sinon"; import "../data-viz.js"; // Mock chartist-render dependency class MockChartistRender extends HTMLElement { constructor() { super(); this._data = null; this._type = "bar"; this._scale = ""; this._chartTitle = ""; this._chartDesc = ""; } static get properties() { return { data: { type: Object }, type: { type: String }, scale: { type: String }, chartTitle: { type: String, attribute: "chart-title" }, chartDesc: { type: String, attribute: "chart-desc" }, }; } set data(val) { this._data = val; this.dispatchEvent(new CustomEvent("data-changed", { detail: val })); } get data() { return this._data; } set type(val) { this._type = val; this.setAttribute("type", val); } get type() { return this._type; } } // Mock data for testing const mockChartData = { simple: { labels: ["Q1", "Q2", "Q3", "Q4"], series: [[10, 20, 30, 40]], }, multiSeries: { labels: ["Jan", "Feb", "Mar"], series: [ [5, 10, 15], [8, 12, 18], ], }, empty: { labels: [], series: [], }, singlePoint: { labels: ["Single"], series: [[100]], }, largeDataset: { labels: Array.from({ length: 100 }, (_, i) => `Item ${i + 1}`), series: [ Array.from({ length: 100 }, () => Math.floor(Math.random() * 100)), ], }, }; describe("data-viz test", () => { let element, sandbox; // Clean up global state before each test beforeEach(async () => { sandbox = sinon.createSandbox(); // Reset global DataViz state if (globalThis.DataViz && globalThis.DataViz.instance) { globalThis.DataViz.instance.remove(); delete globalThis.DataViz.instance; } // Register mock chartist-render if not already registered if (!globalThis.customElements.get("chartist-render")) { globalThis.customElements.define("chartist-render", MockChartistRender); } element = await fixture(html``); }); afterEach(() => { sandbox.restore(); // Clean up global event listeners if (element && element.windowControllers) { element.windowControllers.abort(); } // Clean up global singleton if (globalThis.DataViz && globalThis.DataViz.instance) { globalThis.DataViz.instance.remove(); delete globalThis.DataViz.instance; } }); describe("Basic Setup and Accessibility", () => { it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); it("passes a11y audit with chart data", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); chartElement.data = mockChartData.simple; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("passes a11y audit when hidden", async () => { element.setAttribute("hidden", ""); await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("passes a11y audit with complex data", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); chartElement.data = mockChartData.multiSeries; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("passes a11y audit with empty data", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); chartElement.data = mockChartData.empty; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); }); describe("Component Structure", () => { it("renders with correct tag name", () => { expect(element.tagName.toLowerCase()).to.equal("data-viz"); }); it("has proper shadow DOM structure", () => { const chartElement = element.shadowRoot.querySelector("chartist-render"); expect(chartElement).to.exist; expect(chartElement.getAttribute("id")).to.equal("barchart"); }); it("configures chartist-render with default properties", () => { const chartElement = element.shadowRoot.querySelector("#barchart"); expect(chartElement.getAttribute("type")).to.equal("bar"); expect(chartElement.getAttribute("scale")).to.equal("ct-major-twelfth"); expect(chartElement.getAttribute("chart-title")).to.equal( "Quiz Distribution", ); expect(chartElement.getAttribute("chart-desc")).to.equal( "A bar graph of quizzes completed by student", ); }); it("applies base styling correctly", () => { const styles = getComputedStyle(element); expect(styles.display).to.equal("block"); }); it("hides when hidden attribute is set", async () => { element.setAttribute("hidden", ""); await element.updateComplete; const styles = getComputedStyle(element); expect(styles.display).to.equal("none"); }); }); describe("Singleton Pattern", () => { it("implements singleton requestAvailability", () => { expect(typeof globalThis.DataViz.requestAvailability).to.equal( "function", ); }); it("creates singleton instance when requested", () => { // Clear any existing instance delete globalThis.DataViz.instance; const instance = globalThis.DataViz.requestAvailability(); expect(instance).to.exist; expect(instance.tagName.toLowerCase()).to.equal("data-viz"); expect(globalThis.DataViz.instance).to.equal(instance); expect(document.body.contains(instance)).to.be.true; }); it("returns same instance on multiple requests", () => { const instance1 = globalThis.DataViz.requestAvailability(); const instance2 = globalThis.DataViz.requestAvailability(); expect(instance1).to.equal(instance2); }); it("handles missing document gracefully", () => { const originalDocument = globalThis.document; delete globalThis.document; delete globalThis.DataViz.instance; const instance = globalThis.DataViz.requestAvailability(); expect(instance).to.be.undefined; globalThis.document = originalDocument; }); it("handles missing document.body gracefully", () => { const originalBody = globalThis.document.body; delete globalThis.document.body; delete globalThis.DataViz.instance; const instance = globalThis.DataViz.requestAvailability(); expect(instance).to.be.undefined; globalThis.document.body = originalBody; }); }); describe("Property Handling", () => { it("inherits super properties correctly", () => { const props = element.constructor.properties; expect(props).to.exist; expect(typeof props).to.equal("object"); }); it("supports dynamic property additions", () => { element.customProp = "test-value"; expect(element.customProp).to.equal("test-value"); }); it("handles property updates correctly", async () => { element.testProperty = "initial"; await element.updateComplete; element.testProperty = "updated"; await element.updateComplete; expect(element.testProperty).to.equal("updated"); }); }); describe("Event Handling and Data Display", () => { it("listens for pouch-db-show-data events", async () => { const showDataSpy = sandbox.spy(element, "showDataFunction"); const customEvent = new CustomEvent("pouch-db-show-data", { detail: mockChartData.simple, }); globalThis.dispatchEvent(customEvent); expect(showDataSpy.called).to.be.true; expect(showDataSpy.getCall(0).args[0].detail).to.deep.equal( mockChartData.simple, ); }); it("updates chart data when receiving pouch-db event", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); const dataSpy = sandbox.spy(); chartElement.addEventListener("data-changed", dataSpy); const customEvent = new CustomEvent("pouch-db-show-data", { detail: mockChartData.simple, }); globalThis.dispatchEvent(customEvent); expect(chartElement.data).to.deep.equal(mockChartData.simple); expect(dataSpy.called).to.be.true; }); it("handles multiple data updates", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); // First update globalThis.dispatchEvent( new CustomEvent("pouch-db-show-data", { detail: mockChartData.simple, }), ); expect(chartElement.data).to.deep.equal(mockChartData.simple); // Second update globalThis.dispatchEvent( new CustomEvent("pouch-db-show-data", { detail: mockChartData.multiSeries, }), ); expect(chartElement.data).to.deep.equal(mockChartData.multiSeries); }); it("handles malformed event data gracefully", () => { const chartElement = element.shadowRoot.querySelector("#barchart"); // Event without detail expect(() => { globalThis.dispatchEvent(new CustomEvent("pouch-db-show-data")); }).to.not.throw; // Event with null detail expect(() => { globalThis.dispatchEvent( new CustomEvent("pouch-db-show-data", { detail: null, }), ); }).to.not.throw; // Event with invalid data structure expect(() => { globalThis.dispatchEvent( new CustomEvent("pouch-db-show-data", { detail: { invalidProperty: "test" }, }), ); }).to.not.throw; }); it("extracts labels and series from event data", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); const testData = { labels: ["A", "B", "C"], series: [[1, 2, 3]], extraProperty: "ignored", }; globalThis.dispatchEvent( new CustomEvent("pouch-db-show-data", { detail: testData, }), ); expect(chartElement.data).to.deep.equal({ labels: ["A", "B", "C"], series: [[1, 2, 3]], }); }); }); describe("Lifecycle Management", () => { it("sets up AbortController in constructor", () => { expect(element.windowControllers).to.be.instanceOf(AbortController); }); it("registers event listeners on connect", async () => { const addEventListenerSpy = sandbox.spy(globalThis, "addEventListener"); const newElement = await fixture(html``); expect(addEventListenerSpy.calledWith("pouch-db-show-data")).to.be.true; newElement.windowControllers.abort(); // Cleanup }); it("cleans up event listeners on disconnect", () => { const abortSpy = sandbox.spy(element.windowControllers, "abort"); element.disconnectedCallback(); expect(abortSpy.called).to.be.true; }); it("handles multiple connect/disconnect cycles", async () => { const el = await fixture(html``); // Disconnect const abortSpy = sandbox.spy(el.windowControllers, "abort"); el.remove(); expect(abortSpy.called).to.be.true; // Reconnect should work const el2 = await fixture(html``); expect(el2.windowControllers).to.be.instanceOf(AbortController); el2.windowControllers.abort(); // Cleanup }); it("prevents memory leaks with proper cleanup", () => { const originalController = element.windowControllers; element.remove(); // Controller should be aborted expect(originalController.signal.aborted).to.be.true; }); }); describe("Chart Integration", () => { it("integrates with chartist-render component", () => { const chartElement = element.shadowRoot.querySelector("chartist-render"); expect(chartElement).to.exist; expect(chartElement.tagName.toLowerCase()).to.equal("chartist-render"); }); it("passes data to chartist-render correctly", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); element.showDataFunction({ detail: mockChartData.simple, }); expect(chartElement.data).to.deep.equal(mockChartData.simple); }); it("handles different chart data structures", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); const datasets = [ mockChartData.simple, mockChartData.multiSeries, mockChartData.singlePoint, ]; for (const dataset of datasets) { element.showDataFunction({ detail: dataset }); expect(chartElement.data).to.deep.equal(dataset); } }); it("maintains chart configuration properties", () => { const chartElement = element.shadowRoot.querySelector("#barchart"); // Chart configuration should remain constant expect(chartElement.getAttribute("type")).to.equal("bar"); expect(chartElement.getAttribute("scale")).to.equal("ct-major-twelfth"); expect(chartElement.getAttribute("chart-title")).to.equal( "Quiz Distribution", ); }); it("handles large datasets efficiently", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); const startTime = performance.now(); element.showDataFunction({ detail: mockChartData.largeDataset }); const endTime = performance.now(); expect(chartElement.data).to.deep.equal(mockChartData.largeDataset); expect(endTime - startTime).to.be.lessThan(100); // Should process quickly }); }); describe("Callback Methods", () => { it("provides hideDataViz callback method", () => { expect(typeof element.hideDataViz).to.equal("function"); }); it("provides showDataViz callback method", () => { expect(typeof element.showDataViz).to.equal("function"); }); it("hideDataViz can be called without errors", () => { expect(() => element.hideDataViz()).to.not.throw; }); it("showDataViz can be called without errors", () => { expect(() => element.showDataViz()).to.not.throw; }); it("callback methods can be overridden", () => { const customHide = sinon.spy(); const customShow = sinon.spy(); element.hideDataViz = customHide; element.showDataViz = customShow; element.hideDataViz(); element.showDataViz(); expect(customHide.called).to.be.true; expect(customShow.called).to.be.true; }); }); describe("Edge Cases and Error Handling", () => { it("handles missing chart element gracefully", () => { // Remove the chart element const chartElement = element.shadowRoot.querySelector("#barchart"); chartElement.remove(); // Should not throw when trying to update data expect(() => { element.showDataFunction({ detail: mockChartData.simple }); }).to.not.throw; }); it("handles events without detail property", () => { expect(() => { element.showDataFunction({}); }).to.not.throw; }); it("handles null/undefined event data", () => { expect(() => { element.showDataFunction(null); }).to.not.throw; expect(() => { element.showDataFunction(undefined); }).to.not.throw; }); it("handles events with partial data", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); // Event with only labels element.showDataFunction({ detail: { labels: ["A", "B"] }, }); expect(chartElement.data.labels).to.deep.equal(["A", "B"]); expect(chartElement.data.series).to.be.undefined; // Event with only series element.showDataFunction({ detail: { series: [[1, 2]] }, }); expect(chartElement.data.series).to.deep.equal([[1, 2]]); }); it("handles rapid successive data updates", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); // Rapidly fire multiple events for (let i = 0; i < 10; i++) { element.showDataFunction({ detail: { labels: [`Item ${i}`], series: [[i]], }, }); } // Should end with the last data set expect(chartElement.data).to.deep.equal({ labels: ["Item 9"], series: [[9]], }); }); it("handles very large label arrays", () => { const largeLabels = Array.from({ length: 10000 }, (_, i) => `Label ${i}`); const largeSeries = [Array.from({ length: 10000 }, (_, i) => i)]; expect(() => { element.showDataFunction({ detail: { labels: largeLabels, series: largeSeries, }, }); }).to.not.throw; }); it("handles special characters in labels", async () => { const chartElement = element.shadowRoot.querySelector("#barchart"); const specialData = { labels: [ " ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Card ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/date-card/date-card.js ================================================ /** * Copyright 2020 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ import { html, css } from "lit"; import { SimpleColors } from "@haxtheweb/simple-colors/simple-colors.js"; /** * `date-card` * `simple presentation of a date` * @litElement * @demo demo/index.html * @element date-card */ class DateCard extends SimpleColors { static get tag() { return "date-card"; } static get properties() { return { ...super.properties, month: { type: String }, date: { type: String }, day: { type: String }, title: { type: String }, startTime: { type: String, attribute: "start-time" }, endTime: { type: String, attribute: "end-time" }, location: { type: String }, borderSpacing: { type: Number, attribute: "border-spacing" }, }; } /** * haxProperties integration via file reference */ static get haxProperties() { return new URL(`./lib/${this.tag}.haxProperties.json`, import.meta.url) .href; } constructor() { super(); this.borderSpacing = 5; this.accentColor = "light-blue"; } nth(d) { if (!d) { return ""; } if (d > 3 && d < 21) return "th"; switch (d % 10) { case 1: return "st"; case 2: return "nd"; case 3: return "rd"; default: return "th"; } } static get styles() { return [ super.styles, css` :host { display: inline-flex; } .card { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); width: var(--date-card-card-width, 100px); border-radius: 10px; } .card:hover { box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); border-radius: 10px; } .month, .dateNumber, .dayName { text-align: center; vertical-align: middle; font-family: "Roboto", sans-serif; line-height: 16px; margin-bottom: 8px; margin-top: 15px; margin-bottom: 15px; } .month { color: var(--simple-colors-default-theme-accent-12); font-weight: 400; font-size: 1em; text-transform: uppercase; } .dateNumber { font-size: 20px; } .dayName { text-transform: uppercase; } .monthSection { background-color: var(--simple-colors-default-theme-accent-5); border: 1px solid var(--simple-colors-default-theme-accent-1); border-radius: 10px 10px 0px 0px; } .details { border: 2px solid var(--simple-colors-default-theme-accent-5); padding: 4px 16px; background-color: var(--simple-colors-default-theme-accent-1); } .title, .time, .location { vertical-align: middle; font-family: "Roboto", sans-serif; line-height: 16px; margin-bottom: 8px; } .title { font-size: 20px; color: var(--simple-colors-default-theme-accent-11); } .time { font-size: 16px; color: var(--simple-colors-default-theme-accent-10); } .location { font-size: 16px; color: var(--simple-colors-default-theme-accent-10); } `, ]; } render() { return html`

    ${this.month}

    ${this.date}${this.nth(this.date)}

    ${this.day ? html`

    ${this.day}

    ` : html``}
    ${this.title ? html`

    ${this.title}

    ${this.day ? html` ${this.day}, ` : html``}${this.month} ${this.date}${this.nth(this.date)} ${this.startTime ? html` ${this.endTime ? html` from ${this.startTime} - ${this.endTime} ` : html` at ${this.startTime} `} ` : html``}

    ${this.location ? html`

    ${this.location}

    ` : html``}
    ` : html``} `; } } globalThis.customElements.define(DateCard.tag, DateCard); export { DateCard }; ================================================ FILE: elements/date-card/demo/index.html ================================================ DateCard: date-card Demo

    Basic date-card demo

    ================================================ FILE: elements/date-card/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/date-card/index.html ================================================ date-card documentation ================================================ FILE: elements/date-card/lib/date-card.haxProperties.json ================================================ { "canScale": false, "canEditSource": true, "gizmo": { "title": "Date", "description": "Displays a calendar date with details", "icon": "hax:calendar", "color": "green", "tags": ["Other", "date", "place", "location", "evenet", "calendar"], "handles": [], "meta": { "author": "HAXTheWeb core team" } }, "settings": { "configure": [ { "property": "month", "title": "Month", "description": "Month to display on card", "inputMethod": "textfield" }, { "property": "date", "title": "Day of month", "description": "Numeric date of the month", "inputMethod": "number" }, { "property": "day", "title": "Day of week", "description": "Textual day of the week", "inputMethod": "textfield" }, { "property": "title", "title": "Title", "description": "Name of the event", "inputMethod": "textfield" }, { "property": "location", "title": "Location", "description": "Where it is taking place", "inputMethod": "textfield" }, { "property": "startTime", "title": "Start", "description": "Start time", "inputMethod": "textfield" }, { "property": "endTime", "title": "End", "description": "Start time", "inputMethod": "textfield" }, { "property": "accentColor", "title": "Accent Color", "description": "An optional accent color.", "inputMethod": "colorpicker" }, { "property": "dark", "title": "Dark Theme", "description": "Enable Dark Theme", "inputMethod": "boolean" } ], "advanced": [] }, "saveOptions": { "unsetAttributes": ["colors"] }, "demoSchema": [ { "tag": "date-card", "properties": { "month": "August", "date": "4", "day": "Friday", "title": "IST Ice Cream Social", "end-time": "6PM", "location": "West Dining Commons", "border-spacing": "20", "accent-color": "blue", "dark": true }, "content": "" } ] } ================================================ FILE: elements/date-card/lib/date-chip.js ================================================ import { html, css } from "lit"; import { SimpleColors } from "@haxtheweb/simple-colors/simple-colors.js"; class DateChip extends SimpleColors { static get tag() { return "date-chip"; } /** * Lit convention */ static get properties() { return { ...super.properties, timestamp: { type: Number }, unix: { type: Boolean }, month: { type: String }, day: { type: Number }, }; } /** * Lit Convention */ static get styles() { return [ super.styles, css` :host { display: block; } .date-container { text-align: center; } .date-month { display: block; border-radius: 4px 4px 0 0; background: var(--simple-colors-default-theme-accent-12, #1e407c); color: var(--simple-colors-default-theme-grey-1, #f7f7f7); font-size: var( --date-chip-month-font-size, var(--date-chip-font-size, 18px) ); font-weight: bold; line-height: 1.8; padding: 0px 8px; text-transform: uppercase; } .date-container .date-day { background: var(--simple-colors-default-theme-accent-2, #f7f7f7); border-radius: 0 0 4px 4px; border-style: solid; border-color: var(--simple-colors-default-theme-accent-12, #f7f7f7); color: var(--simple-colors-default-theme-grey-12, #444); display: block; font-size: var(--date-chip-font-size, 18px); font-weight: 900; padding: 8px 16px; } `, ]; } constructor() { super(); this.timestamp = null; this.unix = null; this.month = null; this.day = null; } /** * LitElement life cycle - property changed callback */ updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { if ( ["timestamp", "format", "unix"].includes(propName) && this.timestamp ) { let stamp = this.timestamp; if (this.unix) { stamp = stamp * 1000; } this.month = new Date(stamp) .toLocaleString("default", { month: "long" }) .substring(0, 3); this.day = new Date(stamp).getDate(); } }); } render() { return html`
    ${this.month} ${this.day}
    `; } } globalThis.customElements.define(DateChip.tag, DateChip); ================================================ FILE: elements/date-card/package.json ================================================ { "name": "@haxtheweb/date-card", "wcfactory": { "className": "DateCard", "customElementClass": "LitElement", "elementName": "date-card", "generator-wcfactory-version": "0.8.6", "useHAX": false, "useSass": false, "files": { "css": "src/date-card.css", "html": "src/date-card.html", "js": "src/date-card.js", "properties": "src/date-card-properties.json", "hax": "src/date-card-hax.json" }, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "A simple presentation of a date", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "date-card.js", "module": "date-card.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/simple-colors": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/date-card/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/date-card/test/date-card.test.js ================================================ import { fixture, expect, html, assert } from "@open-wc/testing"; import { setViewport } from "@web/test-runner-commands"; import "../date-card.js"; describe("date-card basic functionality", () => { let element; beforeEach(async () => { element = await fixture( html``, ); }); it("should render correctly", () => { expect(element).to.exist; expect(element.tagName).to.equal("DATE-CARD"); }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); it("has correct default properties", async () => { const el = await fixture(html``); expect(el.borderSpacing).to.equal(5); expect(el.accentColor).to.equal("light-blue"); }); it("renders required DOM structure", () => { const card = element.shadowRoot.querySelector(".card"); const monthSection = element.shadowRoot.querySelector(".monthSection"); const dateSection = element.shadowRoot.querySelector(".dateSection"); expect(card).to.exist; expect(monthSection).to.exist; expect(dateSection).to.exist; }); }); describe("date-card accessibility tests", () => { it("passes accessibility with full date information", async () => { const el = await fixture(html` `); await expect(el).to.be.accessible(); }); it("maintains accessibility with minimal information", async () => { const el = await fixture( html``, ); await expect(el).to.be.accessible(); }); it("maintains accessibility with SimpleColors properties", async () => { const el = await fixture( html``, ); await expect(el).to.be.accessible(); }); }); describe("date-card property validation", () => { it("accepts valid string properties", async () => { const el = await fixture(html` `); expect(el.month).to.equal("October"); expect(el.date).to.equal("31"); expect(el.day).to.equal("Tuesday"); expect(el.title).to.equal("Halloween"); expect(el.startTime).to.equal("7:00 PM"); expect(el.endTime).to.equal("11:00 PM"); expect(el.location).to.equal("Main Hall"); }); it("accepts valid numeric properties", async () => { const el = await fixture(html``); expect(el.borderSpacing).to.equal(10); expect(typeof el.borderSpacing).to.equal("number"); }); it("inherits SimpleColors properties correctly", async () => { const el = await fixture( html``, ); expect(el.accentColor).to.equal("green"); expect(el.dark).to.be.true; }); it("updates properties reactively", async () => { const el = await fixture(html``); el.month = "June"; el.date = "15"; el.day = "Wednesday"; el.title = "Summer Event"; el.borderSpacing = 8; await el.updateComplete; expect(el.month).to.equal("June"); expect(el.date).to.equal("15"); expect(el.day).to.equal("Wednesday"); expect(el.title).to.equal("Summer Event"); expect(el.borderSpacing).to.equal(8); }); }); describe("date-card rendering and display", () => { it("renders month and date correctly", async () => { const el = await fixture( html``, ); const monthEl = el.shadowRoot.querySelector(".month"); const dateEl = el.shadowRoot.querySelector(".dateNumber"); expect(monthEl.textContent.trim()).to.equal("SEPTEMBER"); expect(dateEl.textContent).to.include("5"); expect(dateEl.textContent).to.include("th"); // 5th }); it("renders day when provided", async () => { const el = await fixture( html``, ); const dayEl = el.shadowRoot.querySelector(".dayName"); expect(dayEl).to.exist; expect(dayEl.textContent.trim()).to.equal("SATURDAY"); }); it("renders details section when title is provided", async () => { const el = await fixture( html``, ); const details = el.shadowRoot.querySelector(".details"); const titleEl = el.shadowRoot.querySelector(".title"); expect(details).to.exist; expect(titleEl).to.exist; expect(titleEl.textContent.trim()).to.equal("Labor Day"); }); it("renders time information correctly", async () => { const el = await fixture(html` `); const timeEl = el.shadowRoot.querySelector(".time"); expect(timeEl).to.exist; expect(timeEl.textContent).to.include("August"); expect(timeEl.textContent).to.include("15th"); expect(timeEl.textContent).to.include("from 2:00 PM - 4:00 PM"); }); it("renders location when provided", async () => { const el = await fixture(html` `); const locationEl = el.shadowRoot.querySelector(".location"); expect(locationEl).to.exist; expect(locationEl.textContent.trim()).to.equal("Memorial Park"); }); }); describe("date-card ordinal number functionality", () => { it("correctly generates ordinal suffixes", async () => { const el = await fixture(html``); expect(el.nth(1)).to.equal("st"); expect(el.nth(2)).to.equal("nd"); expect(el.nth(3)).to.equal("rd"); expect(el.nth(4)).to.equal("th"); expect(el.nth(11)).to.equal("th"); expect(el.nth(21)).to.equal("st"); expect(el.nth(22)).to.equal("nd"); expect(el.nth(23)).to.equal("rd"); expect(el.nth(31)).to.equal("st"); }); it("handles edge cases for ordinals", async () => { const el = await fixture(html``); expect(el.nth(null)).to.equal(""); expect(el.nth(undefined)).to.equal(""); expect(el.nth(0)).to.equal("th"); }); }); describe("date-card HAX integration", () => { it("has haxProperties configuration", async () => { const el = await fixture(html``); const haxProps = el.constructor.haxProperties; expect(haxProps).to.exist; expect(typeof haxProps).to.equal("string"); expect(haxProps).to.include(".haxProperties.json"); }); it("has correct tag name", async () => { const el = await fixture(html``); expect(el.constructor.tag).to.equal("date-card"); }); }); describe("date-card responsive design", () => { beforeEach(async () => { await setViewport({ width: 375, height: 750 }); }); afterEach(async () => { await setViewport({ width: 1024, height: 768 }); }); it("adapts to mobile viewport", async () => { const el = await fixture( html``, ); expect(el).to.exist; await el.updateComplete; const computedStyle = getComputedStyle(el); expect(computedStyle.display).to.equal("inline-flex"); }); it("maintains accessibility on mobile", async () => { const el = await fixture( html``, ); await expect(el).to.be.accessible(); }); }); describe("date-card desktop responsiveness", () => { beforeEach(async () => { await setViewport({ width: 1200, height: 800 }); }); afterEach(async () => { await setViewport({ width: 1024, height: 768 }); }); it("adapts to desktop viewport", async () => { const el = await fixture( html``, ); expect(el).to.exist; await el.updateComplete; const computedStyle = getComputedStyle(el); expect(computedStyle.display).to.equal("inline-flex"); }); }); describe("date-card error handling", () => { it("handles missing date information gracefully", async () => { const el = await fixture(html``); expect(el).to.exist; await expect(el).to.be.accessible(); const monthEl = el.shadowRoot.querySelector(".month"); const dateEl = el.shadowRoot.querySelector(".dateNumber"); expect(monthEl).to.exist; expect(dateEl).to.exist; }); it("handles invalid date values", async () => { const el = await fixture( html``, ); expect(el.date).to.equal("invalid"); expect(el.month).to.equal("NotAMonth"); expect(el).to.exist; }); it("handles rapid property changes", async () => { const el = await fixture(html``); const months = ["Jan", "Feb", "Mar", "Apr", "May"]; const dates = ["1", "15", "31", "8", "22"]; for (let i = 0; i < 10; i++) { el.month = months[i % months.length]; el.date = dates[i % dates.length]; el.borderSpacing = i + 1; } await el.updateComplete; expect(el.month).to.equal("May"); expect(el.date).to.equal("22"); expect(el.borderSpacing).to.equal(10); }); it("handles special characters in text fields", async () => { const el = await fixture(html` `); expect(el.month).to.equal("Décembre"); expect(el.title).to.equal("Noël 🎄"); expect(el.location).to.equal("Café & Restaurant"); }); it("handles extreme border spacing values", async () => { const smallEl = await fixture( html``, ); const largeEl = await fixture( html``, ); expect(smallEl.borderSpacing).to.equal(0); expect(largeEl.borderSpacing).to.equal(100); expect(smallEl).to.exist; expect(largeEl).to.exist; }); it("maintains SimpleColors functionality with invalid colors", async () => { const el = await fixture( html``, ); expect(el.accentColor).to.equal("invalid-color"); expect(el).to.exist; }); }); ================================================ FILE: elements/deduping-fix/README.md ================================================ # Deduping fix This is a utility that helps fix a core issue with "the platform" in that if two things try to call window.customElements.define('tag-name',ClassName) and reference the same tag-name, it is a hard bricking issue. This problem can pop up in local development for a number of reasons (or timing with legacy platforms and dynamically imported assets) and so this little utility helps rewrite this global function to perform it's same function, but issue a warning if already defined as opposed to outright failing. ## Usage ```js ``` ================================================ FILE: elements/deduping-fix/deduping-fix.js ================================================ const _customElementsDefine = globalThis.customElements.define; globalThis.customElements.define = (name, cl, conf) => { if (!globalThis.customElements.get(name)) { _customElementsDefine.call(globalThis.customElements, name, cl, conf); } else { console.warn(`${name} has been defined twice`); } }; ================================================ FILE: elements/deduping-fix/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/deduping-fix/package.json ================================================ { "name": "@haxtheweb/deduping-fix", "version": "25.0.0", "description": "A very simple fix for Failed to execute 'define' on 'CustomElementRegistry'", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "deduping-fix.js", "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/demo-snippet/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg ================================================ FILE: elements/demo-snippet/.editorconfig ================================================ # EditorConfig helps developers define and maintain consistent # coding styles between different editors and IDEs # editorconfig.org root = true [*] # Change these settings to your own preference indent_style = space indent_size = 2 # We recommend you to keep these unchanged end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false [*.json] indent_size = 2 [*.{html,js,md}] block_comment_start = /** block_comment = * block_comment_end = */ ================================================ FILE: elements/demo-snippet/.github/workflows/main.yml ================================================ name: Build and Deploy on: [push] jobs: build-and-deploy: permissions: contents: write runs-on: ubuntu-latest steps: - name: ACTIONS_ALLOW_UNSECURE_COMMANDS id: ACTIONS_ALLOW_UNSECURE_COMMANDS run: echo 'ACTIONS_ALLOW_UNSECURE_COMMANDS=true' >> $GITHUB_ENV - name: set env variable actor run: echo 'GITHUB_ACTOR=$GITHUB_ACTOR' >> $GITHUB_ENV - name: set env variable repo run: echo 'GITHUB_REPOSITORY=$GITHUB_REPOSITORY' >> $GITHUB_ENV - name: Checkout 🛎️ uses: actions/checkout@v4.1.7 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. with: persist-credentials: false - name: Read CNAME id: cname uses: juliangruber/read-file-action@v1 with: path: ./CNAME - name: set env variable CNAME run: echo 'CNAME=${{ steps.cname.outputs.content }}' >> $GITHUB_ENV - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. run: | npm install npm run build - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4.6.3 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages # The branch the action should deploy to. FOLDER: public # The folder the action should deploy. ================================================ FILE: elements/demo-snippet/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/demo-snippet/.nojekyll ================================================ ================================================ FILE: elements/demo-snippet/.npmignore ================================================ node_modules ================================================ FILE: elements/demo-snippet/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/demo-snippet/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install script: - xvfb-run npm run test ================================================ FILE: elements/demo-snippet/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (c) 2025 btopro Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/demo-snippet/README.md ================================================ # demo-snippet DDD + Lit web component based on OpenWC toolchain. This is intended to provide the following: - Look good via DDD, HAX design system - Simple, easy to read code via Lit - Great workflow via OpenWC tooling + Vercel for sharing demos - Simplify contribution to the HAX ecosystem - Publish and distribute via npmjs.com ## Install dependencies - `npm install` - installs dependencies so you can work ## Commands - `npm start` - runs your web component for development, reloading on file changes - `npm run build` - builds your web component and outputs it in your `dist` directory for placement on web servers in a compiled form. Vercel automatically does this on commit to github. - `npm run release` - this will build your code, update the version, and publish it to npm for others to use ## Working with your web component - edit `./demo-snippet.js` - edit your 'demo' by modifying `./index.html` - add dependencies using `npm install --save @whatever/repo` or editing `./package.json` directly - if you must reference additional non-JS files, ensure you use the `new URL('./my-file.jpg', import.meta.url).href` syntax so that it builds correctly - if you add additional `.js` files / web components then place them under `/lib/` - to improve HAX wiring edit file in `/lib/demo-snippet.haxProperties.json` - for i18n / internationalization efforts, see associated language `.json` files in `/locales/` as well as `/lib/` for haxProperties related translation examples. ## Recommended setup - Load VS code in 1 window to project root - Browser open - Right click -> Inspect and open the Console to see error output ## Recommended Integrated Development Environment (IDE) - [VSCode](https://code.visualstudio.com/Download) ### Plugins Name: lit-html Description: Syntax highlighting and IntelliSense for html inside of JavaScript and TypeScript tagged template strings Publisher: Matt Bierner VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=bierner.lit-html Name: lit-plugin Description: Syntax highlighting, type checking and code completion for lit-html Publisher: Rune Mehlsen VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin # Credits A brighter future dreamed and developed by the Penn State [HAXTheWeb](https://hax.psu.edu/) initative. Never. Stop. innovating. ================================================ FILE: elements/demo-snippet/demo-snippet.js ================================================ /** * Copyright 2025 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. * * Inspired by @polymer version, updated for lit, DDD, * dark mode and to leverage the HAX ecosystem. */ import { LitElement, html, css } from "lit"; import { DDDSuper } from "@haxtheweb/d-d-d/d-d-d.js"; import "@haxtheweb/code-sample/code-sample.js"; /** * `demo-snippet` is a helper element that displays the source of a code snippet * and its rendered demo. It can be used for both native elements and Web Components. * * This is a modernized Lit-based version of the original Polymer demo-snippet * with dark mode compatibility using the DDD design system. * * Example of a native element demo * * * * * * Example of a Web Component demo * * * * * * ### Styling * * The following custom properties and mixins are available for styling: * * Custom property | Description | Default * ----------------|-------------|---------- * `--demo-snippet` | Mixin applied to the entire element | `{}` * `--demo-snippet-demo` | Mixin applied to just the demo section | `{}` * `--demo-snippet-code` | Mixin applied to just the code section | `{}` * * @element demo-snippet * @demo demo/index.html */ class DemoSnippet extends DDDSuper(LitElement) { static get tag() { return "demo-snippet"; } static get properties() { return { _markdown: { type: String }, }; } static get styles() { return [ css` :host { display: block; border-radius: var(--ddd-radius-sm); overflow: hidden; box-shadow: var(--ddd-boxShadow-sm); margin: var(--ddd-spacing-10) auto; transition: all 0.3s ease-in-out; } :host(:hover), :host(:focus-within) { box-shadow: var(--ddd-boxShadow-lg); } .demo { display: block; border-bottom: var(--ddd-border-xs); border-color: light-dark( var(--ddd-theme-default-limestoneLight), var(--ddd-theme-default-coalyGray) ); background-color: light-dark( var(--ddd-theme-default-limestoneLight), var(--ddd-theme-default-potentialMidnight) ); margin: 0; padding: var(--ddd-spacing-5); } /* High contrast mode support */ @media (prefers-contrast: high) { :host { border: 2px solid; } .demo { border-bottom-width: 2px; } } /* Code sample styling */ code-sample { margin: 0; border-radius: 0; } `, ]; } render() { return html`
    `; } constructor() { super(); this._markdown = ""; this._observer = null; } firstUpdated() { super.firstUpdated(); // Set up slot change observer after first render this.updateComplete.then(() => { this._updateMarkdown(); }); } updated(changedProperties) { super.updated(changedProperties); // React to _markdown changes and update the code-sample if (changedProperties.has("_markdown") && this._markdown) { this._updateCodeSample(); } } disconnectedCallback() { super.disconnectedCallback(); if (this._observer) { this._observer.disconnect(); this._observer = null; } } _onSlotChange() { this._updateMarkdown(); } _updateMarkdown() { const slot = this.shadowRoot.querySelector("#content"); if (!slot) return; const assignedNodes = slot.assignedNodes({ flatten: true }); const template = assignedNodes.find( (node) => node.nodeType === Node.ELEMENT_NODE && node.tagName === "TEMPLATE", ); // If there's no template, render empty code if (!template) { this._markdown = ""; return; } let snippet = template.innerHTML; // Clean up the snippet snippet = this._unindent(snippet); // Hack: In safari + shady dom, sometime we get an empty 'class' attribute snippet = snippet.replace(/ class=""/g, ""); // Boolean properties are displayed as checked="", so remove the ="" bit snippet = snippet.replace(/=""/g, ""); this._markdown = snippet; // Stamp the template content into the demo section if (!template.hasAttribute("is")) { // Create a document fragment from the template content const fragment = document.importNode(template.content, true); // Clear any existing demo content and append new content const demoSection = this.shadowRoot.querySelector(".demo slot"); if (demoSection) { // Insert the template content after the slot const parent = demoSection.parentNode; parent.appendChild(fragment); } } // Dispatch dom-ready event this.dispatchEvent( new CustomEvent("dom-ready", { bubbles: true, cancelable: true, composed: true, detail: this, }), ); } /** * Updates the code-sample element by manually creating a template element * and inserting it with the current _markdown content */ _updateCodeSample() { const codeDisplay = this.shadowRoot.querySelector("#codeDisplay"); if (!codeDisplay) return; // Clear any existing template elements in the code-sample const existingTemplate = codeDisplay.querySelector("template"); if (existingTemplate) { codeDisplay.removeChild(existingTemplate); } // Create a new template element with the markdown content const newTemplate = document.createElement("template"); newTemplate.setAttribute("preserve-content", "preserve-content"); newTemplate.innerHTML = this._markdown; // Insert the template into the code-sample element codeDisplay.appendChild(newTemplate); } // Unindent helper method (simplified version of marked-element's unindent) _unindent(text) { if (!text) return ""; const lines = text.split("\n"); // Remove leading/trailing empty lines while (lines.length && lines[0].trim() === "") lines.shift(); while (lines.length && lines[lines.length - 1].trim() === "") lines.pop(); if (lines.length === 0) return ""; // Find minimum indentation (ignoring empty lines) let minIndent = Infinity; lines.forEach((line) => { if (line.trim()) { const match = line.match(/^(\s*)/); if (match) { minIndent = Math.min(minIndent, match[1].length); } } }); if (minIndent === Infinity) minIndent = 0; // Remove common indentation return lines.map((line) => line.substring(minIndent)).join("\n"); } } globalThis.customElements.define(DemoSnippet.tag, DemoSnippet); export { DemoSnippet }; ================================================ FILE: elements/demo-snippet/index.html ================================================ Demo Snippet Examples

    Demo Snippet Examples

    The demo-snippet element shows live code examples with syntax highlighting.

    Basic HTML Form

    Interactive Button with CSS

    HTML List with Styling

    ================================================ FILE: elements/demo-snippet/lib/demo-snippet.haxProperties.json ================================================ { "api": "1", "canScale": true, "canEditSource": true, "type": "element", "designSystem": { "accent": true, "primary": true, "card": true, "text": true, "designTreatment": false }, "gizmo": { "title": "demo-snippet", "description": "", "icon": "icons:android", "color": "purple", "tags": [ "Other" ], "handles": [], "meta": { "author": "btopro" } }, "settings": { "configure": [ { "property": "title", "title": "Title", "description": "", "inputMethod": "textfield", "icon": "editor:title", "required": true } ] }, "saveOptions": { "wipeSlot": false, "unsetAttributes": [] }, "demoSchema": [ { "tag": "demo-snippet", "properties": { "title": "Sample property title" }, "content": "" } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.ar.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "عنوان" } ] }, "demoSchema": [ { "properties": { "title": "قيمة مخصصة" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.ar.json ================================================ { "title": "عنوان" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.bn.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "শিরোনাম" } ] }, "demoSchema": [ { "properties": { "title": "কাস্টম মান" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.bn.json ================================================ { "title": "শিরোনাম" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.es.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Título" } ] }, "demoSchema": [ { "properties": { "title": "Valor personalizado" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.es.json ================================================ { "title": "título" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.fr.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Titre" } ] }, "demoSchema": [ { "properties": { "title": "Valeur personnalisée" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.fr.json ================================================ { "title": "titre" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.hi.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "शीर्षक" } ] }, "demoSchema": [ { "properties": { "title": "कस्टम मूल्य" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.hi.json ================================================ { "title": "शीर्षक" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.ja.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "タイトル" } ] }, "demoSchema": [ { "properties": { "title": "カスタム値" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.ja.json ================================================ { "title": "タイトル" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.pt.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Título" } ] }, "demoSchema": [ { "properties": { "title": "Valor personalizado" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.pt.json ================================================ { "title": "título" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.ru.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "Заголовок" } ] }, "demoSchema": [ { "properties": { "title": "Пользовательское значение" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.ru.json ================================================ { "title": "заголовок" } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.zh.haxProperties.json ================================================ { "settings": { "configure": [ { "title": "标题" } ] }, "demoSchema": [ { "properties": { "title": "定制值" } } ] } ================================================ FILE: elements/demo-snippet/locales/demo-snippet.zh.json ================================================ { "title": "标题" } ================================================ FILE: elements/demo-snippet/netlify.toml ================================================ [build] publish = "public" command = "npm run build" [[headers]] for = "/*" [headers.values] Cache-Control = "max-age=31536001" Cross-Origin-Opener-Policy = "same-origin" Cross-Origin-Embedder-Policy = "require-corp" [[headers]] for = "/" [headers.values] Cache-Control = "no-cache" [[headers]] for = "/*.html" [headers.values] Cache-Control = "no-cache" ================================================ FILE: elements/demo-snippet/package.json ================================================ { "name": "@haxtheweb/demo-snippet", "version": "25.0.0", "description": "Webcomponent demo-snippet following hax / open-wc recommendations", "license": "Apache-2.0", "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "keywords": [ "webcomponents", "lit", "haxtheweb" ], "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "demo-snippet.js", "module": "demo-snippet.js", "scripts": { "start": "web-dev-server", "build": "rimraf public && rollup -c rollup.config.js && npm run analyze", "analyze": "cem analyze --litelement --exclude public", "dddaudit": "hax audit", "release": "npm run build && commit-and-tag-version && git push --follow-tags origin main && npm publish", "test": "web-test-runner test/**/*.test.js --coverage --node-resolve", "test:watch": "web-test-runner test/**/*.test.js --node-resolve --watch" }, "dependencies": { "@haxtheweb/code-sample": "^25.0.0", "@haxtheweb/d-d-d": "^25.0.0", "@haxtheweb/i18n-manager": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@babel/preset-env": "^7.16.4", "@custom-elements-manifest/analyzer": "0.10.4", "@open-wc/building-rollup": "^3.0.2", "@open-wc/testing": "4.0.0", "@rollup/plugin-babel": "6.0.4", "@rollup/plugin-node-resolve": "16.0.1", "@rollup/plugin-terser": "^0.4.4", "@web/dev-server": "0.4.6", "@web/rollup-plugin-html": "^2.3.0", "@web/rollup-plugin-import-meta-assets": "2.3.0", "@web/test-runner": "^0.19.0", "babel-plugin-template-html-minifier": "^4.1.0", "babel-plugin-transform-dynamic-import": "^2.1.0", "commit-and-tag-version": "12.5.1", "rimraf": "^5.0.7", "rollup-plugin-esbuild": "6.2.1" }, "private": false, "publishConfig": { "access": "public" }, "hax": { "cli": true }, "customElements": "custom-elements.json", "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/demo-snippet/rollup.config.js ================================================ import nodeResolve from '@rollup/plugin-node-resolve'; import babel from '@rollup/plugin-babel'; import { rollupPluginHTML as html } from '@web/rollup-plugin-html'; import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets'; import esbuild from 'rollup-plugin-esbuild'; export default { input: 'index.html', output: { entryFileNames: '[hash].js', chunkFileNames: '[hash].js', assetFileNames: '[hash][extname]', format: 'es', dir: 'public', }, preserveEntrySignatures: false, plugins: [ /** Enable using HTML as rollup entrypoint */ html({ minify: true, }), /** Resolve bare module imports */ nodeResolve(), /** Minify JS, compile JS to a lower language target */ esbuild({ minify: true, target: ['chrome64', 'firefox67', 'safari11.1'], }), /** Bundle assets references via import.meta.url */ importMetaAssets(), /** Minify html and css tagged template literals */ babel({ plugins: [ [ 'babel-plugin-template-html-minifier', { modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] }, failOnError: false, strictCSS: true, htmlMinifier: { collapseWhitespace: true, conservativeCollapse: true, removeComments: true, caseSensitive: true, minifyCSS: true, }, }, ], ], }), ], }; ================================================ FILE: elements/demo-snippet/test/demo-snippet.test.js ================================================ import { html, fixture, expect } from '@open-wc/testing'; import "../demo-snippet.js"; describe("DemoSnippet test", () => { let element; beforeEach(async () => { element = await fixture(html` `); }); it("basic will it blend", async () => { expect(element).to.exist; }); it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); }); ================================================ FILE: elements/demo-snippet/web-dev-server.config.mjs ================================================ // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr'; /** Use Hot Module replacement by adding --hmr to the start command */ const hmr = process.argv.includes('--hmr'); export default /** @type {import('@web/dev-server').DevServerConfig} */ ({ open: '/', watch: !hmr, https: true, dedupe: true, /** Resolve bare module imports */ nodeResolve: { exportConditions: ['browser', 'development'], }, /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */ // esbuildTarget: 'auto' /** Set appIndex to enable SPA routing */ // appIndex: 'demo/index.html', plugins: [ /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */ // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }), ], // See documentation for all available options }); ================================================ FILE: elements/discord-embed/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/discord-embed/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/discord-embed/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/discord-embed/.npmignore ================================================ node_modules ================================================ FILE: elements/discord-embed/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/discord-embed/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/discord-embed/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2023 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/discord-embed/README.md ================================================ # <discord-embed> Embed > widgetbot.io based embed widget for discord threads and channels ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/discord-embed/discord-embed.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Embed ## License [ License](http://opensource.org/licenses/) ================================================ FILE: elements/discord-embed/demo/index.html ================================================ DiscordEmbed: discord-embed Demo

    Basic discord-embed demo

    ================================================ FILE: elements/discord-embed/discord-embed.js ================================================ /** * Copyright 2023 * @license , see License.md for full text. */ import { LitElement, html, css } from "lit"; import "@haxtheweb/iframe-loader/iframe-loader.js"; /** * `discord-embed` * `widgetbot.io based embed widget for discord threads and channels` * @demo demo/index.html * @element discord-embed */ class DiscordEmbed extends LitElement { /** * HTMLElement */ constructor() { super(); this.source = ""; this.height = 500; this.width = "100%"; } static get styles() { return [ css` :host { display: block; } `, ]; } static get properties() { return { height: { type: String }, width: { type: String }, source: { type: String, reflect: true, }, }; } /** * haxProperties integration via file reference */ static get haxProperties() { return new URL(`./lib/${this.tag}.haxProperties.json`, import.meta.url) .href; } /** * Convention we use */ static get tag() { return "discord-embed"; } render() { return html`${this.source && (this.source.includes("discord.com") || this.source.includes("e.widgetbot.io")) ? html` ` : html`
    Invalid Discord share link
    `}`; } /** * LitElement life cycle - property changed */ updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { if (propName === "source" && this.source) { if (this.source.includes("https://discord.com/channels")) { this.source = this.source.replace( "https://discord.com/channels/", "https://e.widgetbot.io/channels/", ); } else if (this.source.includes("https://discordapp.com/channels")) { this.source = this.source.replace( "https://discordapp.com/channels/", "https://e.widgetbot.io/channels/", ); } } }); } } globalThis.customElements.define(DiscordEmbed.tag, DiscordEmbed); export { DiscordEmbed }; ================================================ FILE: elements/discord-embed/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); // discover iconset and build json structure gulp.task("iconset", (done) => { const iconset = packageJson.wcfactory.iconset || {}; if(iconset.svgsPath && iconset.svgsPath !== ''){ const path = iconset.svgsPath; const manifestFilename = iconset.manifestFilename || `${packageJson.wcfactory.elementName}-iconsets-manifest.js` const manifestPath = iconset.manifestPath || `./lib`; const exportName = iconset.exportName || `${packageJson.wcfactory.className}IconsetsManifest`; const jsonContent = JSON.stringify(dirTree(path).icons, null, 2); const iconVar = `import { SimpleIconsetStore } from "@haxtheweb/simple-icon/lib/simple-iconset.js"; /** * @const ${exportName} */ export const ${exportName} = ${jsonContent}; SimpleIconsetStore.registerManifest(${exportName});` fs.writeFile(`${manifestPath}/${manifestFilename}.js`, iconVar, 'utf8', function (err) { if (err) { console.log("An error occured while writing iconset manifest Object to File."); return console.log(err); } console.log("Iconset SVGs and manifest JS file has been saved."); return true; }); } else { console.log("No Iconset Manifest"); } done(); }); gulp.task( "default", gulp.series("analyze") ); ================================================ FILE: elements/discord-embed/index.html ================================================ discord-embed documentation ================================================ FILE: elements/discord-embed/lib/.gitkeep ================================================ ================================================ FILE: elements/discord-embed/lib/discord-embed.haxProperties.json ================================================ { "api": "1", "type": "element", "editingElement": "core", "hideDefaultSettings": true, "canScale": true, "canEditSource": false, "contentEditable": false, "gizmo": { "title": "Discord", "description": "Embed discord communities based on share URL", "icon": "hax:discord", "color": "purple", "tags": ["Other", "discord", "embed", "link", "social"], "handles": [], "meta": { "author": "HAXTheWeb core team" } }, "settings": { "configure": [ { "property": "source", "title": "Resource url", "description": "Resource url", "inputMethod": "textfield", "icon": "link", "required": true, "validationType": "url" }, { "property": "height", "title": "Height", "description": "Content frame height", "inputMethod": "textfield" }, { "property": "width", "title": "Width", "description": "Content frame width", "inputMethod": "textfield" } ], "advanced": [] }, "demoSchema": [ { "tag": "discord-embed", "content": "", "properties": {} } ] } ================================================ FILE: elements/discord-embed/package.json ================================================ { "name": "@haxtheweb/discord-embed", "wcfactory": { "className": "DiscordEmbed", "customElementClass": "LitElement", "elementName": "discord-embed", "generator-wcfactory-version": "0.13.1", "useHAX": false, "useSass": false, "files": { "css": "src/discord-embed.css", "html": "src/discord-embed.html", "js": "src/discord-embed.js", "properties": "src/discord-embed-properties.json", "hax": "src/discord-embed-hax.json" }, "iconset": {}, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "widgetbot.io based embed widget for discord threads and channels", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "main": "discord-embed.js", "module": "discord-embed.js", "scripts": { "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --watch --config=../../web-test-runner.config.mjs --playwright --browsers chromium", "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "@haxtheweb/iframe-loader": "^25.0.0", "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "gulp-babel": "8.0.0", "polymer-build": "3.1.4", "wct-browser-legacy": "1.0.2", "web-animations-js": "2.3.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/discord-embed/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": false, "transformImportMeta": true }, "css": { "minify": false }, "html": { "minify": false }, "bundle": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/discord-embed/test/discord-embed.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../discord-embed.js"; describe("DiscordEmbed test", () => { let element; beforeEach(async () => { element = await fixture(html``); await element.updateComplete; }); // Basic functionality tests it("instantiates the element with default values", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("discord-embed"); }); it("has correct default property values", async () => { expect(element.source).to.equal(""); expect(element.height).to.equal(500); expect(element.width).to.equal("100%"); }); // Accessibility tests it("passes the a11y audit with empty source", async () => { await expect(element).shadowDom.to.be.accessible(); }); it("passes the a11y audit with valid Discord source", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("shows appropriate error message for invalid source", async () => { element.source = "https://invalid-url.com"; await element.updateComplete; const errorMessage = element.shadowRoot.querySelector("div"); expect(errorMessage).to.exist; expect(errorMessage.textContent).to.equal("Invalid Discord share link"); }); // Property validation tests it("reflects source property to attribute", async () => { const testSource = "https://e.widgetbot.io/channels/123456789/987654321"; element.source = testSource; await element.updateComplete; expect(element.getAttribute("source")).to.equal(testSource); }); it("updates height property and reflects to iframe", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; element.height = "400"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); if (iframe) { expect(iframe.getAttribute("height")).to.equal("400"); } }); it("updates width property and reflects to iframe", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; element.width = "800px"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); if (iframe) { expect(iframe.getAttribute("width")).to.equal("800px"); } }); // URL transformation tests it("transforms discord.com URLs to widgetbot.io URLs", async () => { element.source = "https://discord.com/channels/123456789/987654321"; await element.updateComplete; expect(element.source).to.equal( "https://e.widgetbot.io/channels/123456789/987654321", ); }); it("transforms discordapp.com URLs to widgetbot.io URLs", async () => { element.source = "https://discordapp.com/channels/123456789/987654321"; await element.updateComplete; expect(element.source).to.equal( "https://e.widgetbot.io/channels/123456789/987654321", ); }); it("leaves widgetbot.io URLs unchanged", async () => { const originalSource = "https://e.widgetbot.io/channels/123456789/987654321"; element.source = originalSource; await element.updateComplete; expect(element.source).to.equal(originalSource); }); // Iframe rendering tests it("renders iframe-loader with iframe when source is valid", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; await element.updateComplete; const iframeLoader = element.shadowRoot.querySelector("iframe-loader"); expect(iframeLoader).to.exist; const iframe = element.shadowRoot.querySelector("iframe"); expect(iframe).to.exist; expect(iframe.getAttribute("src")).to.equal(element.source); }); it("does not render iframe when source is invalid", async () => { element.source = "https://invalid-site.com/path"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); expect(iframe).to.not.exist; const errorDiv = element.shadowRoot.querySelector("div"); expect(errorDiv).to.exist; expect(errorDiv.textContent).to.equal("Invalid Discord share link"); }); it("does not render anything when source is empty", async () => { expect(element.source).to.equal(""); await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); expect(iframe).to.not.exist; const errorDiv = element.shadowRoot.querySelector("div"); expect(errorDiv).to.not.exist; }); // URL validation tests it("validates discord.com URLs as valid", async () => { element.source = "https://discord.com/channels/123456789/987654321"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); expect(iframe).to.exist; }); it("validates e.widgetbot.io URLs as valid", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); expect(iframe).to.exist; }); it("rejects non-Discord URLs", async () => { const invalidSources = [ "https://youtube.com/watch?v=123", "https://twitter.com/status/123", "https://example.com", "https://github.com/repo", "ftp://file-server.com", ]; for (const source of invalidSources) { element.source = source; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); expect(iframe).to.not.exist; const errorDiv = element.shadowRoot.querySelector("div"); expect(errorDiv).to.exist; expect(errorDiv.textContent).to.equal("Invalid Discord share link"); } }); // HAX integration tests it("has proper HAX properties configuration", async () => { expect(element.constructor.haxProperties).to.exist; expect(element.constructor.haxProperties).to.include("haxProperties.json"); }); // Responsive design tests it("handles percentage-based widths", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; element.width = "50%"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); if (iframe) { expect(iframe.getAttribute("width")).to.equal("50%"); } }); it("handles pixel-based dimensions", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; element.width = "800px"; element.height = "600px"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); if (iframe) { expect(iframe.getAttribute("width")).to.equal("800px"); expect(iframe.getAttribute("height")).to.equal("600px"); } }); // Error handling and edge cases it("handles malformed Discord URLs gracefully", async () => { const malformedUrls = [ "discord.com/channels/123", // missing https:// "https://discord.com/", // incomplete path "https://discord.com/channels", // no channel IDs "https://discord.com/channels/", // trailing slash only "https://discord.com/channels/not-numbers/123", ]; for (const url of malformedUrls) { element.source = url; await element.updateComplete; // Should either transform correctly or show error const iframe = element.shadowRoot.querySelector("iframe"); const errorDiv = element.shadowRoot.querySelector("div"); // At least one should exist expect(iframe || errorDiv).to.exist; } }); it("handles rapid source changes", async () => { const sources = [ "https://discord.com/channels/111/222", "https://e.widgetbot.io/channels/333/444", "https://invalid-url.com", "https://discordapp.com/channels/555/666", ]; for (const source of sources) { element.source = source; await element.updateComplete; } // Should end up with the transformed version of the last Discord URL expect(element.source).to.equal("https://e.widgetbot.io/channels/555/666"); }); it("handles special characters in URLs", async () => { element.source = "https://discord.com/channels/123456789/987654321?query=test¶m=value"; await element.updateComplete; expect(element.source).to.include("e.widgetbot.io"); expect(element.source).to.include("query=test¶m=value"); }); it("handles numeric and string property types correctly", async () => { // Height should be coerced to string when rendered element.height = 300; element.width = 600; element.source = "https://e.widgetbot.io/channels/123/456"; await element.updateComplete; const iframe = element.shadowRoot.querySelector("iframe"); if (iframe) { expect(iframe.getAttribute("height")).to.equal("300"); expect(iframe.getAttribute("width")).to.equal("600"); } }); it("maintains iframe-loader structure for accessibility", async () => { element.source = "https://e.widgetbot.io/channels/123456789/987654321"; await element.updateComplete; const iframeLoader = element.shadowRoot.querySelector("iframe-loader"); expect(iframeLoader).to.exist; const iframe = iframeLoader.querySelector("iframe"); expect(iframe).to.exist; expect(iframe.parentElement.tagName.toLowerCase()).to.equal( "iframe-loader", ); }); // Integration tests with various Discord URL formats it("handles thread URLs correctly", async () => { element.source = "https://discord.com/channels/123456789/987654321/111222333"; await element.updateComplete; expect(element.source).to.equal( "https://e.widgetbot.io/channels/123456789/987654321/111222333", ); const iframe = element.shadowRoot.querySelector("iframe"); expect(iframe).to.exist; }); it("preserves URL fragments and query parameters", async () => { element.source = "https://discord.com/channels/123/456?test=1#message-789"; await element.updateComplete; expect(element.source).to.include("e.widgetbot.io"); expect(element.source).to.include("?test=1#message-789"); }); // Performance and lifecycle tests it("only updates source when property actually changes", async () => { const originalSource = "https://discord.com/channels/123/456"; element.source = originalSource; await element.updateComplete; const transformedSource = element.source; // Set to same value - should not trigger another transformation element.source = transformedSource; await element.updateComplete; expect(element.source).to.equal(transformedSource); }); }); ================================================ FILE: elements/disqus-embed/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/disqus-embed/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/disqus-embed/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/disqus-embed/.npmignore ================================================ node_modules ================================================ FILE: elements/disqus-embed/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/disqus-embed/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/disqus-embed/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2024 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/disqus-embed/README.md ================================================ # <disqus-embed> Embed > Disqus service integration ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/disqus-embed/disqus-embed.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D Embed ## License [ License](http://opensource.org/licenses/) ================================================ FILE: elements/disqus-embed/demo/index.html ================================================ DisqusEmbed: disqus-embed Demo

    Basic disqus-embed demo

    ================================================ FILE: elements/disqus-embed/disqus-embed.js ================================================ /** * Copyright 2024 * @license , see License.md for full text. */ import { LitElement, html, css } from "lit"; /** * `disqus-embed` * `Disqus service integration` * @demo demo/index.html * @element disqus-embed */ class DisqusEmbed extends LitElement { constructor() { super(); this.loadingText = "Loading comments.."; this.pageURL = null; this.pageIdentifier = null; this.pageTitle = null; this.shortName = null; this.lang = "en"; } static get properties() { return { loadingText: { type: String, attribute: "loading-text" }, pageURL: { type: String, attribute: "page-url", }, pageIdentifier: { type: String, attribute: "page-identifier", }, pageTitle: { type: String, attribute: "page-title", }, shortName: { type: String, attribute: "short-name", }, lang: { type: String, }, }; } static get styles() { return [ css` :host { display: block; min-height: 64px; background-color: white; color: black; border-radius: 16px; border: 2px solid black; padding: 24px; } `, ]; } /** * LitElement render callback */ render() { return html`${this.loadingText}`; } updated(changedProperties) { if (super.updated) { super.updated(changedProperties); } changedProperties.forEach((oldValue, propName) => { if (propName === "shortName" && this[propName]) { DisqusInstance.createEmbedScript(this, this.shortName); } // on ANY change to the element let's rebuild the configuration except initial shortName setting if (propName !== "shortName" && globalThis.DISQUS) { clearTimeout(this._timeout); this._timeout = setTimeout(() => { DisqusInstance.rebuildConfiguration( this, this.pageIdentifier, this.pageURL, this.pageTitle, this.lang, ); }, 100); } }); } /** * Convention we use */ static get tag() { return "disqus-embed"; } connectedCallback() { if (super.connectedCallback) { super.connectedCallback(); } // ensure we're correctly built when connected clearTimeout(this._timeout); this._timeout = setTimeout(() => { DisqusInstance.rebuildConfiguration( this, this.pageIdentifier, this.pageURL, this.pageTitle, this.lang, ); }, 100); } disconnectedCallback() { // if we are about to disconnect, ensure the lightDom's children // get sent back to the Disqus instance. This could be a theme // changing / the element moving around and needing to be reconnected // later on while (this.childNodes.length > 0) { DisqusInstance.appendChild(this.childNodes[0]); } if (super.disconnectedCallback) { super.disconnectedCallback(); } } } globalThis.customElements.define(DisqusEmbed.tag, DisqusEmbed); export { DisqusEmbed }; class DisqusBroker extends LitElement { constructor() { super(); // use this to store a reference to what is rendering the disqus visually // this also gets called in teh callbacks so that when events happen we can // move Disqus to the visual target once it's safe to do so this.renderTarget = null; } firstUpdated(changedProperties) { if (super.firstUpdated) { super.firstUpdated(changedProperties); } // this ensures that the container gets populated from the jQuery-esk calls // to the global document this.setAttribute("id", "disqus_thread"); } static get styles() { return [ css` :host { display: none; } `, ]; } /** * LitElement render callback */ render() { return html``; } /** * Convention we use */ static get tag() { return "disqus-broker"; } createEmbedScript(target, name) { this.renderTarget = target; this.innerHTML = ""; if (!this._embed) { this._embed = globalThis.document.createElement("script"); this._embed.setAttribute("data-timestamp", +new Date()); this._embed.type = "text/javascript"; this._embed.async = true; this._embed.src = `https://${name}.disqus.com/embed.js`; this.insertAdjacentElement("afterend", this._embed); } } // when anything changes we need to ensure that we rebuild / reset Disqus object rebuildConfiguration(target, identifier, url, title, lang) { if (globalThis.DISQUS) { this.renderTarget = target; this.innerHTML = ""; while (this.renderTarget.childNodes.length > 0) { this.appendChild(this.renderTarget.childNodes[0]); } setTimeout(() => { globalThis.DISQUS.reset({ reload: true, config: function () { this.page.identifier = identifier; this.page.url = url; this.page.title = title; this.language = lang; }, }); setTimeout(() => { this.renderToTarget(); }, 100); }, 500); } } renderToTarget() { // debounce to ensure we don't spam render // since we don't have control over the API in disqus as to how often or when // it decides to fire clearTimeout(this._timeout); this._timeout = setTimeout(() => { while (this.childNodes.length > 0) { this.renderTarget.appendChild(this.childNodes[0]); } }, 100); } // This brokers the 'events' that take place in the undocumented aspects of the // Disqus API. Brittle potentially but these were written in 2012 and still work as of 2023 // so probably safe apiCallback(call) { switch (call) { // ready to use, render to target case "onReady": // user identified / logged in; this can fire multiple times case "onIdentify": this.renderToTarget(); break; // the user posted a new comment or replied case "onNewComment": default: console.log(call); break; } } } globalThis.customElements.define(DisqusBroker.tag, DisqusBroker); export { DisqusBroker }; globalThis.DisqusSingleton = globalThis.DisqusSingleton || {}; globalThis.DisqusSingleton.requestAvailability = () => { if ( !globalThis.DisqusSingleton.instance && globalThis.document && globalThis.document.body ) { globalThis.DisqusSingleton.instance = globalThis.document.createElement( DisqusBroker.tag, ); globalThis.document.body.insertAdjacentElement( "afterbegin", globalThis.DisqusSingleton.instance, ); } return globalThis.DisqusSingleton.instance; }; // most common way to access registry export const DisqusInstance = globalThis.DisqusSingleton.requestAvailability(); // set initially and then modify based on prop changes in tag globalThis.disqus_config = globalThis.disqus_config || function () { this.language = "en"; this.callbacks.onReady = [ function () { DisqusInstance.apiCallback("onReady"); }, ]; this.callbacks.onIdentify = [ function () { DisqusInstance.apiCallback("onIdentify"); }, ]; this.callbacks.afterRender = [ function () { DisqusInstance.apiCallback("afterRender"); }, ]; this.callbacks.beforeComment = [ function () { DisqusInstance.apiCallback("beforeComment"); }, ]; this.callbacks.onInit = [ function () { DisqusInstance.apiCallback("onInit"); }, ]; this.callbacks.onNewComment = [ function () { DisqusInstance.apiCallback("onNewComment"); }, ]; this.callbacks.onPaginate = [ function () { DisqusInstance.apiCallback("onPaginate"); }, ]; this.callbacks.preData = [ function () { DisqusInstance.apiCallback("preData"); }, ]; this.callbacks.preReset = [ function () { DisqusInstance.apiCallback("preReset"); }, ]; }; ================================================ FILE: elements/disqus-embed/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); gulp.task("dev", gulp.series("analyze", "watch")); // discover iconset and build json structure gulp.task("iconset", (done) => { const iconset = packageJson.wcfactory.iconset || {}; if(iconset.svgsPath && iconset.svgsPath !== ''){ const path = iconset.svgsPath; const manifestFilename = iconset.manifestFilename || `${packageJson.wcfactory.elementName}-iconsets-manifest.js` const manifestPath = iconset.manifestPath || `./lib`; const exportName = iconset.exportName || `${packageJson.wcfactory.className}IconsetsManifest`; const jsonContent = JSON.stringify(dirTree(path).icons, null, 2); const iconVar = `import { SimpleIconsetStore } from "@haxtheweb/simple-icon/lib/simple-iconset.js"; /** * @const ${exportName} */ export const ${exportName} = ${jsonContent}; SimpleIconsetStore.registerManifest(${exportName});` fs.writeFile(`${manifestPath}/${manifestFilename}.js`, iconVar, 'utf8', function (err) { if (err) { console.log("An error occured while writing iconset manifest Object to File."); return console.log(err); } console.log("Iconset SVGs and manifest JS file has been saved."); return true; }); } else { console.log("No Iconset Manifest"); } done(); }); gulp.task( "default", gulp.series("analyze") ); ================================================ FILE: elements/disqus-embed/index.html ================================================ disqus-embed documentation ================================================ FILE: elements/disqus-embed/lib/.gitkeep ================================================ ================================================ FILE: elements/disqus-embed/lib/haxcms-site-disqus.haxProperties.json ================================================ { "api": "1", "type": "element", "editingElement": "core", "hideDefaultSettings": true, "canScale": true, "canEditSource": false, "contentEditable": false, "gizmo": { "title": "Disqus comments", "description": "Integration with the Disqus commenting web service", "icon": "hax:disqus", "color": "purple", "tags": [ "Other", "comment", "social", "commenting", "comments", "social media", "engagement", "discussion", "feedback" ], "handles": [], "meta": { "author": "HAXTheWeb core team" } }, "settings": { "configure": [ { "property": "shortName", "title": "Short name", "description": "Property short name on disqus", "inputMethod": "textfield", "required": true } ], "advanced": [], "developer": [] }, "saveOptions": { "wipeSlot": true, "unsetAttributes": ["page-url", "page-identifier", "page-title", "lang"] }, "documentation": { "howTo": null, "purpose": null }, "demoSchema": [ { "tag": "haxcms-site-disqus", "content": "", "properties": {} } ] } ================================================ FILE: elements/disqus-embed/lib/haxcms-site-disqus.js ================================================ import { DisqusEmbed } from "../disqus-embed"; import { store } from "@haxtheweb/haxcms-elements/lib/core/haxcms-site-store.js"; import { autorun, toJS } from "mobx"; class HAXCMSSiteDisqus extends DisqusEmbed { constructor() { super(); autorun(() => { this.pageTitle = toJS(store.activeTitle); }); autorun(() => { this.pageIdentifier = toJS(store.activeId); }); autorun(() => { const location = toJS(store.location); if (location && location.route && location.route.path) { this.pageURL = location.route.path; } }); autorun(() => { const manifest = toJS(store.manifest); if ( manifest && manifest.metadata && manifest.metadata.site && manifest.metadata.site.lang ) { this.lang = manifest.metadata.site.lang; } }); } static get tag() { return "haxcms-site-disqus"; } /** * haxProperties integration via file reference */ static get haxProperties() { return new URL(`./${this.tag}.haxProperties.json`, import.meta.url).href; } } globalThis.customElements.define(HAXCMSSiteDisqus.tag, HAXCMSSiteDisqus); export { HAXCMSSiteDisqus }; ================================================ FILE: elements/disqus-embed/package.json ================================================ { "name": "@haxtheweb/disqus-embed", "wcfactory": { "className": "DisqusEmbed", "customElementClass": "LitElement", "elementName": "disqus-embed", "generator-wcfactory-version": "0.13.1", "useHAX": false, "useSass": false, "files": { "css": "src/disqus-embed.css", "html": "src/disqus-embed.html", "js": "src/disqus-embed.js", "properties": "src/disqus-embed-properties.json", "hax": "src/disqus-embed-hax.json" }, "iconset": {}, "sharedHaxProps": [], "sharedProps": [], "sharedStyles": [] }, "version": "25.0.0", "description": "Disqus service integration", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "main": "disqus-embed.js", "module": "disqus-embed.js", "scripts": { "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --watch --config=../../web-test-runner.config.mjs --playwright --browsers chromium", "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "dependencies": { "lit": "3.3.2" }, "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "gulp-babel": "8.0.0", "polymer-build": "3.1.4", "wct-browser-legacy": "1.0.2", "web-animations-js": "2.3.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/disqus-embed/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": false, "transformImportMeta": true }, "css": { "minify": false }, "html": { "minify": false }, "bundle": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/disqus-embed/test/disqus-embed.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import "../disqus-embed.js"; describe("DisqusEmbed test", () => { let element; beforeEach(async () => { element = await fixture(html``); await element.updateComplete; // Clear any global DISQUS instance if (globalThis.DISQUS) { delete globalThis.DISQUS; } }); afterEach(() => { // Clean up any timeouts if (element._timeout) { clearTimeout(element._timeout); } }); // Basic functionality tests it("instantiates the element with default values", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("disqus-embed"); }); it("has correct default property values", async () => { expect(element.loadingText).to.equal("Loading comments.."); expect(element.pageURL).to.be.null; expect(element.pageIdentifier).to.be.null; expect(element.pageTitle).to.be.null; expect(element.shortName).to.be.null; expect(element.lang).to.equal("en"); }); // Accessibility tests it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); it("passes the a11y audit with loading text", async () => { element.loadingText = "Custom loading message"; await element.updateComplete; await expect(element).shadowDom.to.be.accessible(); }); it("renders loading text in slot", async () => { expect(element.shadowRoot.textContent.trim()).to.include( "Loading comments..", ); }); it("updates loading text when property changes", async () => { element.loadingText = "Custom loading message"; await element.updateComplete; expect(element.shadowRoot.textContent.trim()).to.include( "Custom loading message", ); }); // Property validation tests it("sets loadingText with kebab-case attribute", async () => { const testElement = await fixture( html``, ); expect(testElement.loadingText).to.equal("Custom loading"); }); it("sets pageURL with kebab-case attribute", async () => { const testElement = await fixture( html``, ); expect(testElement.pageURL).to.equal("https://example.com/page"); }); it("sets pageIdentifier with kebab-case attribute", async () => { const testElement = await fixture( html``, ); expect(testElement.pageIdentifier).to.equal("unique-123"); }); it("sets pageTitle with kebab-case attribute", async () => { const testElement = await fixture( html``, ); expect(testElement.pageTitle).to.equal("My Article Title"); }); it("sets shortName with kebab-case attribute", async () => { const testElement = await fixture( html``, ); expect(testElement.shortName).to.equal("my-site"); }); it("sets lang property correctly", async () => { const testElement = await fixture( html``, ); expect(testElement.lang).to.equal("fr"); }); // Property update tests it("updates properties dynamically", async () => { element.loadingText = "New loading text"; element.pageURL = "https://example.com"; element.pageIdentifier = "test-id"; element.pageTitle = "Test Title"; element.lang = "es"; await element.updateComplete; expect(element.loadingText).to.equal("New loading text"); expect(element.pageURL).to.equal("https://example.com"); expect(element.pageIdentifier).to.equal("test-id"); expect(element.pageTitle).to.equal("Test Title"); expect(element.lang).to.equal("es"); }); // Slot content tests it("displays default loading text in slot", async () => { const slot = element.shadowRoot.querySelector("slot"); expect(slot).to.exist; expect(slot.textContent).to.equal("Loading comments.."); }); it("allows custom slotted content to override loading text", async () => { const customElement = await fixture(html`
    Custom loading content
    `); const slottedContent = customElement.querySelector(".custom-loader"); expect(slottedContent).to.exist; expect(slottedContent.textContent).to.equal("Custom loading content"); }); // Styling tests it("has default styling applied", async () => { const styles = getComputedStyle(element); expect(styles.display).to.equal("block"); // Additional style checks would need to be done with actual rendered element }); // DisqusInstance integration tests (mocked) it("calls DisqusInstance.createEmbedScript when shortName is set", async () => { // Mock DisqusInstance const originalCreateEmbedScript = globalThis.DisqusInstance && globalThis.DisqusInstance.createEmbedScript; let createEmbedScriptCalled = false; if (globalThis.DisqusInstance) { globalThis.DisqusInstance.createEmbedScript = (target, shortName) => { createEmbedScriptCalled = true; expect(target).to.equal(element); expect(shortName).to.equal("my-disqus-site"); }; } element.shortName = "my-disqus-site"; await element.updateComplete; if (globalThis.DisqusInstance) { expect(createEmbedScriptCalled).to.be.true; // Restore original function if (originalCreateEmbedScript) { globalThis.DisqusInstance.createEmbedScript = originalCreateEmbedScript; } } }); // Timeout and lifecycle tests it("sets up timeout on property changes", async () => { // Mock global DISQUS globalThis.DISQUS = { reset: () => {}, }; element.pageURL = "https://example.com"; await element.updateComplete; expect(element._timeout).to.exist; // Clean up delete globalThis.DISQUS; }); it("handles connectedCallback properly", async () => { // Test that connectedCallback sets up timeout const disconnectedElement = document.createElement("disqus-embed"); document.body.appendChild(disconnectedElement); // Should have timeout after connection expect(disconnectedElement._timeout).to.exist; // Clean up document.body.removeChild(disconnectedElement); }); // Error handling and edge cases it("handles null and undefined property values", async () => { element.pageURL = null; element.pageIdentifier = null; element.pageTitle = null; element.shortName = null; await element.updateComplete; expect(element.pageURL).to.be.null; expect(element.pageIdentifier).to.be.null; expect(element.pageTitle).to.be.null; expect(element.shortName).to.be.null; }); it("handles empty string property values", async () => { element.loadingText = ""; element.pageURL = ""; element.pageIdentifier = ""; element.pageTitle = ""; element.shortName = ""; element.lang = ""; await element.updateComplete; expect(element.loadingText).to.equal(""); expect(element.pageURL).to.equal(""); expect(element.pageIdentifier).to.equal(""); expect(element.pageTitle).to.equal(""); expect(element.shortName).to.equal(""); expect(element.lang).to.equal(""); }); it("handles special characters in properties", async () => { element.loadingText = "Loading comments... 🔄"; element.pageTitle = "Article with 'quotes' & chars"; element.pageIdentifier = "id-with-unicode-café-naïve"; element.pageURL = "https://example.com/path?query=value&test=1"; await element.updateComplete; expect(element.loadingText).to.equal("Loading comments... 🔄"); expect(element.pageTitle).to.equal( "Article with 'quotes' & chars", ); expect(element.pageIdentifier).to.equal("id-with-unicode-café-naïve"); expect(element.pageURL).to.equal( "https://example.com/path?query=value&test=1", ); }); it("handles rapid property changes", async () => { const changes = [ { loadingText: "Loading 1" }, { loadingText: "Loading 2" }, { pageURL: "https://example.com/1" }, { pageURL: "https://example.com/2" }, { lang: "fr" }, { lang: "es" }, ]; for (const change of changes) { Object.assign(element, change); await element.updateComplete; } expect(element.loadingText).to.equal("Loading 2"); expect(element.pageURL).to.equal("https://example.com/2"); expect(element.lang).to.equal("es"); }); // Language support tests it("supports various language codes", async () => { const languages = ["en", "fr", "es", "de", "it", "ja", "ko", "zh-cn"]; for (const lang of languages) { element.lang = lang; await element.updateComplete; expect(element.lang).to.equal(lang); } }); // URL validation tests it("accepts valid URL formats", async () => { const validUrls = [ "https://example.com", "https://example.com/path", "https://example.com/path?query=value", "https://example.com/path#hash", "http://localhost:3000/test", ]; for (const url of validUrls) { element.pageURL = url; await element.updateComplete; expect(element.pageURL).to.equal(url); } }); // Configuration tests it("maintains global disqus_config function", () => { expect(globalThis.disqus_config).to.be.a("function"); }); it("has DisqusInstance available globally", () => { expect(globalThis.DisqusSingleton).to.exist; expect(globalThis.DisqusSingleton.requestAvailability).to.be.a("function"); }); }); describe("DisqusBroker test", () => { let broker; beforeEach(() => { // Create broker instance for testing broker = globalThis.DisqusSingleton.requestAvailability(); }); afterEach(() => { // Clean up any timeouts if (broker._timeout) { clearTimeout(broker._timeout); } }); it("creates DisqusBroker instance", () => { expect(broker).to.exist; expect(broker.tagName.toLowerCase()).to.equal("disqus-broker"); }); it("has correct default properties", () => { expect(broker.renderTarget).to.be.null; }); it("sets disqus_thread id on firstUpdated", async () => { await broker.updateComplete; expect(broker.getAttribute("id")).to.equal("disqus_thread"); }); it("handles API callbacks", () => { // Mock console.log to verify it's called const originalLog = console.log; let logCalled = false; let logMessage = ""; console.log = (message) => { logCalled = true; logMessage = message; }; broker.apiCallback("onNewComment"); expect(logCalled).to.be.true; expect(logMessage).to.equal("onNewComment"); // Restore original console.log console.log = originalLog; }); it("creates embed script with correct attributes", () => { const mockTarget = { appendChild: () => {} }; broker.createEmbedScript(mockTarget, "test-site"); expect(broker.renderTarget).to.equal(mockTarget); expect(broker.innerHTML).to.equal(""); }); }); ================================================ FILE: elements/dl-behavior/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/dl-behavior/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/dl-behavior/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/dl-behavior/.npmignore ================================================ node_modules ================================================ FILE: elements/dl-behavior/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/dl-behavior/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/dl-behavior/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/dl-behavior/README.md ================================================ # <dl-behavior> ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash $ npm start ``` ## Contributing 1. Fork it! `git clone git@github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D File ## License [Apache-2.0 License](http://opensource.org/licenses/Apache-2.0) ================================================ FILE: elements/dl-behavior/demo/index.html ================================================ MtzFileDownloadBehavior: dl-behavior Demo

    Basic dl-behavior demo

    ================================================ FILE: elements/dl-behavior/dl-behavior.js ================================================ export const MtzFileDownloadBehaviors = function (SuperClass) { return class extends SuperClass { static get properties() { if (super.properties) { return Object.assign( { fileTypes: { type: Object, value() { return { CSV: "text/csv", JSON: "text/json", PDF: "application/pdf", TXT: "text/plain", HTML: "text/html", }; }, }, }, super.properties, ); } else { return { fileTypes: { type: Object, value() { return { CSV: "text/csv", JSON: "text/json", PDF: "application/pdf", TXT: "text/plain", HTML: "text/html", }; }, }, }; } } /** * Converts the data to a blob, then uses navigator to save blob if it’s available, otherwise * creates an with [download] attribute then simulates a click. * @param {String} data - data to encode. * @param {String} type - type of file to generate (i.e, JSON or CSV). * @param {String} [name = 'download'] - file name to save data under. * @param {Boolean} [newTab = true] - If false, downloads uri in existing tab. Otherwise, * downloads in new tab. */ downloadFromData(data, type, name = "download", newTab = true) { const mimeType = this.fileTypes[type.toUpperCase()]; const blob = new Blob([decodeURIComponent(encodeURI(data))], { type: mimeType, }); const filename = name + "." + type.toLowerCase(); if (globalThis.navigator && globalThis.navigator.msSaveOrOpenBlob) { globalThis.navigator.msSaveOrOpenBlob(blob, filename); } else { // Link elements have a download attribute which provides cross-platform // download behavior supporting all but IE 11. This creates new link and then // clicks it to initiate download. const link = globalThis.document.createElement("a"); link.href = (globalThis.URL || globalThis.webkitURL).createObjectURL( blob, ); link.download = filename; link.target = newTab ? "_blank" : "_self"; this.appendChild(link); link.click(); this.removeChild(link); } } /** * Opens a new tab at the URI so that download can be initiated from the page. * @param {String} uri - The uri to open. * @param {Boolean} [newTab = true] - If false, downloads uri in existing tab. Otherwise, * downloads in new tab. * @return {Boolean} Returns true. */ downloadFromURI(uri, newTab = true) { globalThis.open(uri, newTab ? "_blank" : "_self"); return true; // NOTE: Returning true to prevent error in some browsers during download. } }; }; ================================================ FILE: elements/dl-behavior/gulpfile.cjs ================================================ const gulp = require("gulp"); const fs = require("fs"); const path = require("path"); const packageJson = require("./package.json"); // run polymer analyze to generate documentation gulp.task("analyze", () => { var exec = require("child_process").exec; return exec( "polymer analyze --input demo/index.html > analysis.json", function(error, stdout, stderr) { if (error !== null) { console.log("exec error: " + error); } } ); }); gulp.task("watch", () => { return gulp.watch(["./*.js","./lib/*", "./demo/*"], gulp.series("analyze")); }); // simple developer flow gulp.task("dev", gulp.series("analyze", "watch")); gulp.task("default", gulp.series("analyze")); ================================================ FILE: elements/dl-behavior/index.html ================================================ dl-behavior documentation ================================================ FILE: elements/dl-behavior/package.json ================================================ { "name": "@haxtheweb/dl-behavior", "wcfactory": { "className": "FileDownloadBehaviors", "customElementClass": "PolymerElement", "elementName": "dl-behavior", "generator-wcfactory-version": "0.3.2", "useHAX": false, "useSass": false, "files": { "js": "src/dl-behavior.js" }, "sharedStyles": [] }, "version": "25.0.0", "description": "Start of download thing", "repository": { "type": "git", "url": "https://github.com/haxtheweb/webcomponents.git" }, "type": "module", "main": "dl-behavior.js", "module": "dl-behavior.js", "scripts": { "start": "yarn run dev", "build": "gulp --gulpfile=gulpfile.cjs && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && cem analyze --litelement --exclude \"(public|*.stories.js)\" --globs \"{*,lib/**}.js\"", "dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", "watch": "gulp dev --gulpfile=gulpfile.cjs", "serve": "web-dev-server -c ../../web-dev-server.config.mjs", "lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs", "test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch", "test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium" }, "author": { "name": "haxtheweb", "url": "https://hax.psu.edu/" }, "license": "Apache-2.0", "devDependencies": { "@custom-elements-manifest/analyzer": "0.10.4", "@haxtheweb/deduping-fix": "^25.0.0", "@open-wc/testing": "4.0.0", "@web/dev-server": "0.4.6", "concurrently": "9.1.2", "wct-browser-legacy": "1.0.2" }, "private": false, "publishConfig": { "access": "public" }, "customElements": "custom-elements.json", "keywords": [ "webcomponents", "html", "haxtheweb", "lit" ], "gitHead": "205ca9f1c3abd2c09938118965e60a15d90a58bb" } ================================================ FILE: elements/dl-behavior/polymer.json ================================================ { "entrypoint": "demo/index.html", "extraDependencies": [ "node_modules/@webcomponents/webcomponentsjs/*.js", "!node_modules/@webcomponents/webcomponentsjs/gulpfile.js", "node_modules/@webcomponents/webcomponentsjs/bundles/*.js" ], "sources": [], "builds": [ { "name": "es6", "browserCapabilities": ["es2018", "modules"], "js": { "minify": true }, "css": { "minify": true }, "html": { "minify": true }, "bundle": false, "addServiceWorker": false } ], "moduleResolution": "node", "npm": true, "lint": { "rules": ["polymer-3"] } } ================================================ FILE: elements/dl-behavior/test/dl-behavior.test.js ================================================ import { fixture, expect, html } from "@open-wc/testing"; import { LitElement } from "lit"; import { MtzFileDownloadBehaviors } from "../dl-behavior.js"; // Create a test element that uses the mixin class TestDownloadElement extends MtzFileDownloadBehaviors(LitElement) { static get tag() { return "test-download-element"; } render() { return html`
    Test element with download behavior
    `; } } customElements.define(TestDownloadElement.tag, TestDownloadElement); describe("MtzFileDownloadBehaviors mixin test", () => { let element; beforeEach(async () => { element = await fixture( html``, ); await element.updateComplete; }); // Basic functionality tests it("instantiates element with download behavior mixin", async () => { expect(element).to.exist; expect(element.tagName.toLowerCase()).to.equal("test-download-element"); }); it("has fileTypes property with correct MIME types", async () => { expect(element.fileTypes).to.exist; expect(element.fileTypes.CSV).to.equal("text/csv"); expect(element.fileTypes.JSON).to.equal("text/json"); expect(element.fileTypes.PDF).to.equal("application/pdf"); expect(element.fileTypes.TXT).to.equal("text/plain"); expect(element.fileTypes.HTML).to.equal("text/html"); }); // Download behavior tests it("has downloadFromData method", async () => { expect(element.downloadFromData).to.be.a("function"); }); it("has downloadFromURI method", async () => { expect(element.downloadFromURI).to.be.a("function"); }); // File type validation tests it("supports all expected file types", async () => { const expectedTypes = ["CSV", "JSON", "PDF", "TXT", "HTML"]; expectedTypes.forEach((type) => { expect(element.fileTypes).to.have.property(type); expect(element.fileTypes[type]).to.be.a("string"); expect(element.fileTypes[type]).to.include("/"); }); }); // Mock download functionality tests it("downloadFromURI opens window with correct parameters", async () => { // Mock globalThis.open const originalOpen = globalThis.open; let openCalled = false; let openUrl = ""; let openTarget = ""; globalThis.open = (url, target) => { openCalled = true; openUrl = url; openTarget = target; return { focus: () => {} }; // Mock window object }; const result = element.downloadFromURI( "https://example.com/file.pdf", true, ); expect(result).to.be.true; expect(openCalled).to.be.true; expect(openUrl).to.equal("https://example.com/file.pdf"); expect(openTarget).to.equal("_blank"); // Test with newTab = false element.downloadFromURI("https://example.com/file.pdf", false); expect(openTarget).to.equal("_self"); // Restore original function globalThis.open = originalOpen; }); it("downloadFromData creates blob with correct MIME type", async () => { // Mock Blob constructor const originalBlob = globalThis.Blob; let blobData = null; let blobOptions = null; globalThis.Blob = function (data, options) { blobData = data; blobOptions = options; return { size: data[0].length, type: options.type, }; }; // Mock URL.createObjectURL const originalCreateObjectURL = globalThis.URL && globalThis.URL.createObjectURL; globalThis.URL = globalThis.URL || {}; globalThis.URL.createObjectURL = () => "blob:mock-url"; // Mock document.createElement and related methods const originalCreateElement = globalThis.document.createElement; const mockLink = { href: "", download: "", target: "", click: () => {}, parentNode: null, }; globalThis.document.createElement = (tagName) => { if (tagName === "a") { return mockLink; } return originalCreateElement.call(globalThis.document, tagName); }; // Mock appendChild and removeChild element.appendChild = () => {}; element.removeChild = () => {}; element.downloadFromData("test,data,csv", "CSV", "testfile"); expect(blobOptions.type).to.equal("text/csv"); expect(blobData[0]).to.include("test,data,csv"); expect(mockLink.download).to.equal("testfile.csv"); // Restore original functions globalThis.Blob = originalBlob; if (originalCreateObjectURL) { globalThis.URL.createObjectURL = originalCreateObjectURL; } globalThis.document.createElement = originalCreateElement; }); // Edge cases and error handling it("handles different file types correctly", async () => { const testCases = [ { type: "json", expected: "text/json" }, { type: "PDF", expected: "application/pdf" }, { type: "txt", expected: "text/plain" }, { type: "Html", expected: "text/html" }, ]; testCases.forEach((testCase) => { const mimeType = element.fileTypes[testCase.type.toUpperCase()]; expect(mimeType).to.equal(testCase.expected); }); }); it("handles empty data gracefully", async () => { // Setup mocks const originalBlob = globalThis.Blob; let blobCreated = false; globalThis.Blob = function (data, options) { blobCreated = true; return { size: 0, type: options.type }; }; globalThis.URL = globalThis.URL || {}; globalThis.URL.createObjectURL = () => "blob:mock-url"; const originalCreateElement = globalThis.document.createElement; globalThis.document.createElement = () => ({ href: "", download: "", target: "", click: () => {}, parentNode: null, }); element.appendChild = () => {}; element.removeChild = () => {}; element.downloadFromData("", "TXT", "empty"); expect(blobCreated).to.be.true; // Restore globalThis.Blob = originalBlob; globalThis.document.createElement = originalCreateElement; }); it("handles special characters in filenames", async () => { // Setup mocks globalThis.Blob = function () { return { size: 0, type: "text/plain" }; }; globalThis.URL = globalThis.URL || {}; globalThis.URL.createObjectURL = () => "blob:mock-url"; const mockLink = { href: "", download: "", target: "", click: () => {}, }; globalThis.document.createElement = () => mockLink; element.appendChild = () => {}; element.removeChild = () => {}; element.downloadFromData("test data", "TXT", "file with spaces & symbols"); expect(mockLink.download).to.equal("file with spaces & symbols.txt"); }); it("uses default filename when name not provided", async () => { // Setup mocks globalThis.Blob = function () { return { size: 0, type: "text/plain" }; }; globalThis.URL = globalThis.URL || {}; globalThis.URL.createObjectURL = () => "blob:mock-url"; const mockLink = { href: "", download: "", target: "", click: () => {}, }; globalThis.document.createElement = () => mockLink; element.appendChild = () => {}; element.removeChild = () => {}; element.downloadFromData("test data", "TXT"); expect(mockLink.download).to.equal("download.txt"); }); // IE/Legacy browser support tests it("handles IE msSaveOrOpenBlob when available", async () => { // Mock navigator.msSaveOrOpenBlob const originalNavigator = globalThis.navigator; let msSaveOrOpenBlobCalled = false; let savedBlob = null; let savedFilename = ""; globalThis.navigator = { msSaveOrOpenBlob: (blob, filename) => { msSaveOrOpenBlobCalled = true; savedBlob = blob; savedFilename = filename; }, }; globalThis.Blob = function (data, options) { return { data, options, size: data[0].length }; }; element.downloadFromData("test data", "TXT", "test"); expect(msSaveOrOpenBlobCalled).to.be.true; expect(savedFilename).to.equal("test.txt"); expect(savedBlob).to.exist; // Restore globalThis.navigator = originalNavigator; }); // Accessibility tests it("passes the a11y audit", async () => { await expect(element).shadowDom.to.be.accessible(); }); it("maintains accessibility with download functionality", async () => { // Even with download capabilities, the element should remain accessible expect(element.downloadFromData).to.be.a("function"); expect(element.downloadFromURI).to.be.a("function"); await expect(element).shadowDom.to.be.accessible(); }); }); /* describe("A11y/chai axe tests", () => { it("dl-behavior passes accessibility test", async () => { const el = await fixture(html` `); await expect(el).to.be.accessible(); }); it("dl-behavior passes accessibility negation", async () => { const el = await fixture( html`` ); await assert.isNotAccessible(el); }); }); /* // Custom properties test describe("Custom Property Test", () => { it("dl-behavior can instantiate a element with custom properties", async () => { const el = await fixture(html``); expect(el.foo).to.equal('bar'); }) }) */ /* // Test if element is mobile responsive describe('Test Mobile Responsiveness', () => { before(async () => {z await setViewport({width: 375, height: 750}); }) it('sizes down to 360px', async () => { const el = await fixture(html``); const width = getComputedStyle(el).width; expect(width).to.equal('360px'); }) }) */ /* // Test if element sizes up for desktop behavior describe('Test Desktop Responsiveness', () => { before(async () => { await setViewport({width: 1000, height: 1000}); }) it('sizes up to 410px', async () => { const el = await fixture(html``); const width = getComputedStyle(el).width; expect(width).to.equal('410px'); }) it('hides mobile menu', async () => { const el await fixture(html``); const hidden = el.getAttribute('hidden'); expect(hidden).to.equal(true); }) }) */ ================================================ FILE: elements/documentation-player/.dddignore ================================================ # Directories # (Must start with with / or \, as seen below) /.github # Inline comments are supported /.vscode /.idea /locales \test /dist /build /public # ignored by program regardless of presence in .dddignore /node_modules # ignored by program regardless of presence in .dddignore # Files # (Must include filename and extension, as seen below) LICENSE .dddignore .editorconfig .gitignore .gitkeep .nojekyll .npmignore .surgeignore rollup.config.js # File extension # (Must start with *, as seen below) *.html *.md *.yml *.json *.toml *.mjs *.cjs *.png *.ico *.svg *.jpg *.jpeg *.stories.js ================================================ FILE: elements/documentation-player/.editorconfig ================================================ # EditorConfig: http://EditorConfig.org # Top-most EditorConfig file root = true # Rules for JavaScript files: [*.{js,py,json,sh,html}] # 4 space indentation indent_style = space indent_size = 2 # No trailing spaces trim_trailing_whitespace = true # Unix-style newlines end_of_line = lf # Newline ending every file insert_final_newline = true ================================================ FILE: elements/documentation-player/.gitignore ================================================ ## editors /.idea /.vscode ## system files .DS_Store ## npm /node_modules/ /npm-debug.log ## testing /coverage/ ## temp folders /.tmp/ # build /_site/ /dist/ /out-tsc/ /public/ storybook-static custom-elements.json .vercel ================================================ FILE: elements/documentation-player/.npmignore ================================================ node_modules ================================================ FILE: elements/documentation-player/.surgeignore ================================================ !node_modules/ ================================================ FILE: elements/documentation-player/.travis.yml ================================================ language: node_js dist: trusty sudo: required addons: firefox: "latest" apt: sources: - google-chrome packages: - google-chrome-stable node_js: stable before_install: - npm install -g web-component-tester install: - npm install before_script: script: - xvfb-run npm run test ================================================ FILE: elements/documentation-player/LICENSE.md ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2023 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: elements/documentation-player/README.md ================================================ # <documentation-player> Player > playlist like element but for documenting web components in the context of hax ## Usage To use this web component in your project you can utilize one of the following styles of syntax. ```js /* In an existing JS module / web component */ import '@haxtheweb/documentation-player/documentation-player.js'; /* CDN */ ``` ## Develop / Demo Running `npm start` will start a local development server and open your default browser to display it. It will start watching *.js and lib/*.js files for changes automatically for your demo. ```bash npm start ``` ## Contributing 1. Fork it! `git clone https://github.com/haxtheweb/webcomponents.git` 2. Create your feature branch: `git checkout -b my-new-feature` 3. Commit your changes: `git commit -m 'Add some feature'` 4. Push to the branch: `git push origin my-new-feature` 5. Submit a pull request :D ## License [ License](http://opensource.org/licenses/) ================================================ FILE: elements/documentation-player/demo/index.html ================================================ DocumentationPlayer: documentation-player Demo

    Basic documentation-player demo

    ================================================ FILE: elements/documentation-player/documentation-player.js ================================================ /** * Copyright 2023 * @license , see License.md for full text. */ import { LitElement, html, css, render, nothing } from "lit"; import "@haxtheweb/simple-img/simple-img.js"; import "@haxtheweb/simple-icon/lib/simple-icon-button-lite.js"; import "@haxtheweb/play-list/play-list.js"; import "@haxtheweb/code-sample/code-sample.js"; import "@haxtheweb/code-editor/lib/code-pen-button.js"; import { nodeToHaxElement } from "@haxtheweb/utils/utils.js"; /** * `documentation-player` * `playlist like element but for documenting web components in the context of hax` * @demo demo/index.html * @element documentation-player */ class DocumentationPlayer extends LitElement { /** * HTMLElement */ constructor() { super(); this.label = ""; this.haxSchema = []; this.imageUrl = ""; this.url = ""; setTimeout(async () => { for (let i = 0; i < this.children.length; i++) { this.haxSchema.push(await nodeToHaxElement(this.children[i])); } }, 0); } static get properties() { return { label: { type: String }, haxSchema: { type: Array, attribute: false }, imageUrl: { type: String, attribute: "image-url" }, url: { type: String, attribute: "url" }, }; } /** * LitElement style callback */ static get styles() { // support for using in other classes let styles = []; if (super.styles) { styles = super.styles; } return [ styles, css` :host { display: block; } `, ]; } _getDataString(data) { return JSON.stringify(data).replace(/"/g, """).replace(/'/g, "'"); } codePenData(label) { return this._getDataString({ title: label, html: this.innerHTML.trim(), head: ``, }); } // because of how processed