diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 86f6dbc..60b3294 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -33,13 +33,13 @@ jobs: uses: actions/checkout@v3 - name: Setup Pages uses: actions/configure-pages@v3 - - name: build - run: cp -r dist test/test.html doc/. - working-directory: ./ + #- name: build + # run: cp -r dist doc/. + # working-directory: ./ - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: - path: 'doc' + path: '.' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 diff --git a/doc/index.html b/index.html similarity index 99% rename from doc/index.html rename to index.html index f220e74..6f472a6 100644 --- a/doc/index.html +++ b/index.html @@ -703,7 +703,7 @@ Error message and password prompt {"created":"20230425164931250","title":"$:/state/folded/GLSL shader template","text":"show","modified":"20230425164939576"}, {"created":"20230424142403302","text":"checked","title":"$:/state/import/select-all","modified":"20230424142404392"}, {"created":"20230423163640468","title":"$:/state/notebook-sidebar","text":"yes","modified":"20230427123815358"}, -{"created":"20230423163641722","title":"$:/state/notebook-sidebar-section","text":"","modified":"20230427153459919"}, +{"created":"20230423163641722","title":"$:/state/notebook-sidebar-section","text":"$:/core/ui/SideBar/Tools","modified":"20230427153548430"}, {"created":"20230427102758222","title":"$:/state/plugin-info--1887569658-$:/plugins/ihm/tidgraph--50210113","text":"documentation","modified":"20230427102759911"}, {"created":"20230427092525294","title":"$:/state/plugin-info--391242618-$:/plugins/tiddlywiki/browser-storage","text":"yes","modified":"20230427092525375"}, {"created":"20230427093219686","title":"$:/state/plugin-info--391242618-$:/plugins/tiddlywiki/browser-storage--605768392","text":"settings","modified":"20230427094141558"}, @@ -720,7 +720,7 @@ Error message and password prompt {"created":"20230427151522031","title":"$:/state/tab/moresidebar-1850697562","text":"$:/core/ui/MoreSideBar/All","modified":"20230427151523774"}, {"created":"20230423164446212","title":"$:/state/tabs/controlpanel/toolbars-1345989671","text":"$:/core/ui/ControlPanel/Toolbars/ViewToolbar","modified":"20230427093441872"}, {"title":"$:/status/RequireReloadDueToPluginChange","text":"no"}, -{"title":"$:/StoryList","created":"20230427153405724","text":"","list":"[[XR Fragments]]","modified":"20230427153405724"}, +{"title":"$:/StoryList","created":"20230427153405724","text":"","list":"$:/webxr-notebook/boot.css $:/Manager [[XR Fragments]]","modified":"20230427153550685"}, {"created":"20230423163445948","title":"$:/theme","text":"$:/themes/nico/notebook","modified":"20230423163445948"}, {"text":"{\n \"tiddlers\": {\n \"$:/themes/nico/notebook/LICENSE\": {\n \"title\": \"$:/themes/nico/notebook/LICENSE\",\n \"created\": \"20200419141443144\",\n \"modified\": \"20210118213330307\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\nMIT License Copyright (c) 2020 [[Nicolas Petton|https://nicolas.petton.fr]] nicolas@petton.fr\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\\"Software\\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is furnished\\nto do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice (including the next\\nparagraph) shall be included in all copies or substantial portions of the\\nSoftware.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF\\nOR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\"\n },\n \"$:/themes/nico/notebook/themetweaks\": {\n \"title\": \"$:/themes/nico/notebook/themetweaks\",\n \"created\": \"20201217172915960\",\n \"modified\": \"20210123211851680\",\n \"tags\": \"$:/tags/ControlPanel/Appearance\",\n \"caption\": \"{{$:/language/ThemeTweaks/ThemeTweaks}}\",\n \"text\": \"\\\\define lingo-base() $:/language/ThemeTweaks/\\n\\nYou can tweak certain aspects of the ''Notebook'' theme.\\n\\n! \u003C\u003Clingo Options>>\\n\\n|\u003C$link to=\\\"$:/themes/nico/notebook/options/stickytitles\\\">\u003C\u003Clingo Options/StickyTitles>>\u003C/$link>\u003Cbr>//\u003C\u003Clingo Options/StickyTitles/Hint>>// |\u003C$select tiddler=\\\"$:/themes/nico/notebook/options/stickytitles\\\">\u003Coption value=\\\"no\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"yes\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/options/codewrapping\\\">\u003C\u003Clingo Options/CodeWrapping>>\u003C/$link> |\u003C$select tiddler=\\\"$:/themes/tiddlywiki/vanilla/options/codewrapping\\\">\u003Coption value=\\\"pre\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"pre-wrap\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/options/reveal-tiddler-controls-on-hover\\\">Reveal tiddler controls on mouseover\u003C/$link> |\u003C$select tiddler=\\\"$:/themes/nico/notebook/options/reveal-tiddler-controls-on-hover\\\">\u003Coption value=\\\"no\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"yes\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n\\n! \u003C\u003Clingo Settings>>\\n\\n|\u003C$link to=\\\"$:/themes/nico/notebook/settings/fontfamily\\\">\u003C\u003Clingo Settings/FontFamily>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/settings/fontfamily\\\" default=\\\"\\\" tag=\\\"input\\\"/> | |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/settings/codefontfamily\\\">\u003C\u003Clingo Settings/CodeFontFamily>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/settings/codefontfamily\\\" default=\\\"\\\" tag=\\\"input\\\"/> | |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/settings/editorfontfamily\\\">\u003C\u003Clingo Settings/EditorFontFamily>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/settings/editorfontfamily\\\" default=\\\"\\\" tag=\\\"input\\\"/> | |\\n\\n! \u003C\u003Clingo Metrics>>\\n\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/metrics/fontsize\\\">\u003C\u003Clingo Metrics/FontSize>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/tiddlywiki/vanilla/metrics/fontsize\\\" default=\\\"\\\" tag=\\\"input\\\"/> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/metrics/lineheight\\\">\u003C\u003Clingo Metrics/LineHeight>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/tiddlywiki/vanilla/metrics/lineheight\\\" default=\\\"\\\" tag=\\\"input\\\"/> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize\\\">\u003C\u003Clingo Metrics/BodyFontSize>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/metrics/bodyfontsize\\\" default=\\\"\\\" tag=\\\"input\\\"/> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/metrics/bodylineheight\\\">\u003C\u003Clingo Metrics/BodyLineHeight>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/metrics/bodylineheight\\\" default=\\\"\\\" tag=\\\"input\\\"/> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint\\\">\u003C\u003Clingo Metrics/SidebarBreakpoint>>\u003C/$link>\u003Cbr>//\u003C\u003Clingo Metrics/SidebarBreakpoint/Hint>>// |^\u003C$edit-text tiddler=\\\"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint\\\" default=\\\"\\\" tag=\\\"input\\\"/> |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/metrics/sidebar-width\\\">\u003C\u003Clingo Metrics/SidebarWidth>>\u003C/$link>\u003Cbr>//\u003C\u003Clingo Metrics/SidebarWidth/Hint>>// |^\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/metrics/sidebar-width\\\" default=\\\"\\\" tag=\\\"input\\\"/> |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/metrics/story-width\\\">\u003C\u003Clingo Metrics/StoryWidth>>\u003C/$link>\u003Cbr>//\u003C\u003Clingo Metrics/StoryWidth/Hint>>// |^\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/metrics/story-width\\\" default=\\\"\\\" tag=\\\"input\\\"/> |\\n\\n\"\n },\n \"$:/themes/nico/notebook/base\": {\n \"title\": \"$:/themes/nico/notebook/base\",\n \"created\": \"20200419141443144\",\n \"modified\": \"20210120224227503\",\n \"tags\": \"$:/tags/Stylesheet\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline\\n\\n\\\\define if-sidebar(text)\\n \u003C$reveal state=\\\"$:/state/notebook-sidebar\\\" type=\\\"match\\\" text=\\\"yes\\\">\\n $text$\\n \u003C/$reveal>\\n\\\\end\\n\\n\\\\define if-reveal-tiddler-controls-on-hover(text)\\n \u003C$reveal state=\\\"$:/themes/nico/notebook/options/reveal-tiddler-controls-on-hover\\\" type=\\\"match\\\" text=\\\"yes\\\">\\n $text$\\n \u003C/$reveal>\\n\\\\end\\n \\n/* Top and bottom bars */\\n\\n/* Hide the top-right bar */\\n.tc-topbar.tc-topbar-right {\\n display: none;\\n}\\n\\ndiv.tc-sidebar-header {\\n padding: 0;\\n min-height: 0;\\n}\\n\\n.tc-story-river {\\n padding: 6px 0 !important;\\n width: 100% !important;\\n max-width: {{$:/themes/nico/notebook/metrics/story-width}} !important;\\n margin: 0 auto !important;\\n margin-top: 34px !important;\\n}\\n\\ndiv.tc-tiddler-frame {\\n width: 100%;\\n margin: 20px 0;\\n background: \u003C\u003Ccolour tiddler-background>>;\\n box-shadow: 0 5px 20px rgba(0,0,0, 0.12);\\n border-radius: 6px;\\n padding: 42px 60px 60px 60px;\\n}\\n\\nh1.tc-site-title {\\n margin-top: 14px;\\n font-size: 1.5em !important;\\n}\\n\\n.nc-bar {\\n padding: 10px;\\n height: {{$:/themes/nico/notebook/metrics/topbar-height}};\\n background: \u003C\u003Ccolour page-background>>;\\n display: flex;\\n justify-content: space-between;\\n}\\n\\n.nc-topbar-wrapper {\\n position: fixed;\\n top: 0;\\n left: 0;\\n right: 0;\\n /* The z-index needs to be above the z-index used in tiddlers in zoomin view */\\n z-index: 501;\\n}\\n\\n.nc-bar.nc-topbar {\\n top: 0;\\n background: \u003C\u003Ccolour page-background>>ee;\\n max-width: calc({{$:/themes/nico/notebook/metrics/story-width}} + 40px);\\n padding: 10px 20px;\\n margin: 0 auto;\\n}\\n\\n.nc-bar.nc-bottombar {\\n position: fixed;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n /* The z-index needs to be above the z-index used in tiddlers in zoomin view */\\n z-index: 501;\\n}\\n\\n.nc-bar .left svg {\\n fill: \u003C\u003Ccolour sidebar-controls-foreground>>;\\n}\\n\\n.nc-bar input[type=\\\"search\\\"] {\\n width: 200px;\\n padding: .6em 1em;\\n margin-top: -.2em;\\n background: \u003C\u003Ccolour sidebar-button-foreground>>44;\\n color: \u003C\u003Ccolour foreground>>cc;\\n transition: all ease-in .2s;\\n border: 1px solid transparent;\\n outline: 0;\\n}\\n\\n.nc-bar input[type=\\\"search\\\"]:focus {\\n width: 300px;\\n background: \u003C\u003Ccolour tiddler-background>>;\\n color: \u003C\u003Ccolour foreground>>;\\n border: 1px solid \u003C\u003Ccolour primary>>;\\n box-shadow: 0 0 .2rem 0 \u003C\u003Ccolour primary>>;\\n}\\n\\ninput[type=\\\"search\\\"]::-webkit-search-cancel-button {\\n -webkit-appearance: auto;\\n}\\n\\n.nc-bar .tc-block-dropdown.tc-search-drop-down {\\n margin-left: 0;\\n width: 400px;\\n border: 0;\\n box-shadow: 0 0 6px 0 rgba(0,0,0,.2);\\n border-radius: 6px;\\n padding: 20px 0;\\n}\\n\\n.nc-bar p {\\n margin: 0;\\n}\\n\\n.nc-bar .tc-page-controls {\\n margin-top: 0;\\n}\\n\\n.nc-bar .tc-page-controls button {\\n margin-right: .8em;\\n}\\n\\n.nc-bar .tc-page-controls button .tc-btn-text {\\n font-size: 14px;\\n}\\n\\n.nc-bar .tc-block-dropdown {\\n max-height: 70vh;\\n overflow: auto;\\n}\\n\\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .nc-topbar {\\n display: none;\\n }\\n\\n .tc-story-river {\\n padding: 0 !important;\\n margin-top: 0 !important;\\n margin-bottom: 60px !important;\\n }\\n\\n div.tc-tiddler-frame {\\n margin: 0;\\n box-shadow: none;\\n border-radius: 0;\\n border-top: 0;\\n }\\n}\\n\\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .nc-bottombar {\\n display: none;\\n }\\n}\\n\\n@media(max-width: 1100px) {\\n .nc-bar input[type=\\\"search\\\"] {\\n width: 200px;\\n }\\n}\\n\\n/* Sidebar */\\n\\n@keyframes sidebar-appear {\\n 0% {\\n left: -{{$:/themes/nico/notebook/metrics/sidebar-width}};\\n }\\n 100% {\\n left: 0;\\n }\\n}\\n\\n\u003C\u003Cif-sidebar \\\"\\\"\\\"\\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .nc-sidebar {\\n animation: sidebar-appear .14s;\\n padding-top: 10px;\\n }\\n}\\n\\\"\\\"\\\">>\\n\\n.nc-sidebar {\\n background: \u003C\u003Ccolour tiddler-background>>;\\n border-right: 1px solid \u003C\u003Ccolour tiddler-border>>;\\n width: {{$:/themes/nico/notebook/metrics/sidebar-width}};\\n overflow-y: auto;\\n overflow-x: hidden;\\n z-index: 500;\\n}\\n\\n.nc-sidebar .segment {\\n border-bottom: 1px solid rgba(0,0,0,.1);\\n}\\n\\n.nc-sidebar ol {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n line-height: 1.8em;\\n}\\n\\n.nc-sidebar ol ol {\\n padding-left: 18px;\\n}\\n\\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .mobile-only {\\n display: none;\\n }\\n}\\n\\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .desktop-only {\\n display: none;\\n }\\n}\\n\\n.nc-sidebar h1.tc-site-title {\\n margin: 0;\\n}\\n\\n.nc-sidebar p {\\n margin: 6px 0;\\n}\\n\\n.nc-sidebar .tc-site-subtitle {\\n color: \u003C\u003Ccolour site-title-foreground>>;\\n}\\n\\n.nc-sidebar .section .label {\\n padding: 2px 0;\\n color: \u003C\u003Ccolour site-title-foreground>>;\\n fill: \u003C\u003Ccolour site-title-foreground>>;\\n font-weight: bold;\\n line-height: 1.6em;\\n display: block;\\n width: 100%;\\n text-align: left;\\n padding: 8px 15px;\\n border-radius: 0;\\n}\\n\\n.nc-sidebar .section:not(.open) .label:hover {\\n background: rgba(0,0,0,.06);\\n}\\n\\n.nc-sidebar .section.open .label {\\n color: \u003C\u003Ccolour tiddler-background>>;\\n fill: \u003C\u003Ccolour tiddler-background>>;\\n background: \u003C\u003Ccolour primary>>;\\n border-bottom: 1px solid rgba(0,0,0,.1);\\n}\\n\\n.nc-sidebar .section .label .caret {\\n display: inline-block;\\n width: 15px;\\n float: right;\\n}\\n\\n.nc-sidebar .content {\\n padding: 6px 15px;\\n font-size: 1em;\\n}\\n\\n.nc-sidebar .tc-tiddlylink {\\n color: \u003C\u003Ccolour primary>>;\\n}\\n\\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .nc-sidebar {\\n position: fixed;\\n left: 0;\\n top: 0;\\n bottom: 0;\\n }\\n}\\n\\n\u003C\u003Cif-sidebar \\\"\\\"\\\"\\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n @keyframes sidebar-slide {\\n 0% {\\n left: -100vw;\\n }\\n 100% {\\n left: 0;\\n }\\n }\\n .nc-sidebar {\\n overflow: auto;\\n position: fixed;\\n width: 100%;\\n left: 0;\\n top: 0;\\n bottom: 48px;\\n z-index: 3000;\\n animation: sidebar-slide ease-in .2s;\\n animation-fill-mode: forwards;\\n }\\n}\\n\\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .tc-page-container {\\n margin-left: {{$:/themes/nico/notebook/metrics/sidebar-width}} !important;\\n }\\n\\n .nc-topbar-wrapper {\\n left: {{$:/themes/nico/notebook/metrics/sidebar-width}};\\n }\\n}\\n\\\"\\\"\\\">>\\n\\n/* Animate the hamburger button */\\n\\n@keyframes menu-bars-1 {\\n 0% {}\\n 100% {\\n transform: rotate(-45deg) translateY(-10px) translateX(-6px);\\n fill: \u003C\u003Ccolour foreground>>;\\n }\\n}\\n\\n@keyframes menu-bars-2 {\\n 0% {}\\n 100% { opacity: 0; }\\n}\\n\\n@keyframes menu-bars-3 {\\n 0% {}\\n 100% {\\n transform: rotate(45deg) translateY(6px) translateX(2px);\\n fill: \u003C\u003Ccolour foreground>>;\\n }\\n}\\n\\n.sidebar-toggle {\\n /* position: fixed; */\\n /* top: 6px; */\\n /* left: 6px; */\\n /* z-index: 600; */\\n /* padding: 4px; */\\n /* border-radius: 8px; */\\n margin-right: 10px;\\n transition: all ease-in-out .2s;\\n fill: \u003C\u003Ccolour sidebar-controls-foreground>>;\\n}\\n\\n.sidebar-toggle:hover,\\n.sidebar-toggle.open {\\n fill: \u003C\u003Ccolour sidebar-controls-foreground-hover>>;\\n}\\n\\n/* @media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) { */\\n/* .sidebar-toggle { */\\n/* top: auto; */\\n/* bottom: 10px; */\\n/* left: 10px; */\\n/* } */\\n/* } */\\n\\n.sidebar-toggle .bars .bar {\\n transform: rotate(0) translateY(0) translateX(0);\\n opacity: 1;\\n transform-origin: 20px 10px;\\n transition: transform 0.4s ease-in-out, opacity 0.2s ease-in-out, fill .4s ease-in-out;\\n}\\n\\n.sidebar-toggle .bars .bar:nth-of-type(3) {\\n transform-origin: 20px 20px;\\n}\\n\\n.sidebar-toggle.open .bars .bar:nth-of-type(1) {\\n animation: menu-bars-1 .6s;\\n animation-fill-mode: forwards;\\n}\\n.sidebar-toggle.open .bars .bar:nth-of-type(2) {\\n animation: menu-bars-2 .6s;\\n animation-fill-mode: forwards;\\n}\\n.sidebar-toggle.open .bars .bar:nth-of-type(3) {\\n animation: menu-bars-3 .6s;\\n animation-fill-mode: forwards;\\n}\\n\\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n div.tc-tiddler-frame {\\n padding: 14px;\\n }\\n}\\n\\n/* Inputs */\\n\\ninput, textarea {\\n transition: border .14s ease-in-out;\\n background: \u003C\u003Ccolour tiddler-editor-background>>;\\n border: 1px solid \u003C\u003Ccolour tiddler-editor-border>>;\\n padding: .5em;\\n border-radius: 4px;\\n}\\n\\ninput:focus, textarea:focus {\\n box-shadow: 0 0 0.2rem 0 \u003C\u003Ccolour primary>>;\\n outline: 0;\\n border-color: \u003C\u003Ccolour primary>>;\\n}\\n\\nbutton {\\n border-radius: 1.5em;\\n border: 1px solid #ccc;\\n background: \u003C\u003Ccolour tiddler-background>>;\\n padding: .3em 1em;\\n cursor: pointer;\\n transition: box-shadow ease-in .1s;\\n color: \u003C\u003Ccolor foreground>>;\\n}\\n\\nbutton:focus, button:active {\\n outline: 0 none;\\n}\\n\\nbutton.tc-btn-invisible {\\n border-radius: 0;\\n}\\n\\n.tc-editor-toolbar button,\\n.tc-editor-toolbar button.tc-btn-invisible {\\n border-radius: 3px;\\n background: \u003C\u003Ccolour tiddler-editor-background>>;\\n color: \u003C\u003Ccolour foreground>>;\\n fill: \u003C\u003Ccolour foreground>>;\\n border: 1px solid \u003C\u003Ccolour tiddler-editor-border>>;\\n}\\n\\n.tc-editor-toolbar button:hover,\\n.tc-editor-toolbar button:active {\\n border-color: \u003C\u003Ccolour primary>>;\\n background: \u003C\u003Ccolour primary>>;\\n color: \u003C\u003Ccolour background>>;\\n fill: \u003C\u003Ccolour background>>;\\n}\\n\\n.tc-tiddler-frame input.tc-edit-texteditor,\\n.tc-tiddler-frame textarea.tc-edit-texteditor,\\n.tc-tiddler-frame iframe.tc-edit-texteditor {\\n transition: border .14s ease-in-out;\\n border: 1px solid \u003C\u003Ccolour tiddler-editor-border>>;\\n background: \u003C\u003Ccolour tiddler-editor-background>>;\\n padding: 4px;\\n border-radius: 4px;\\n}\\n\\n.tc-tiddler-frame input.tc-edit-texteditor:focus,\\n.tc-tiddler-frame textarea.tc-edit-texteditor:focus,\\n.tc-tiddler-frame iframe.tc-edit-texteditor:focus {\\n box-shadow: 0 0 0.2rem 0 \u003C\u003Ccolour primary>>;\\n outline: 0;\\n border-color: \u003C\u003Ccolour primary>>;\\n}\\n\\n.tc-tiddler-controls .tc-btn-text {\\n font-size: 16px;\\n}\\n\\n\u003C\u003Cif-reveal-tiddler-controls-on-hover \\\"\\\"\\\"\\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .tc-tiddler-frame .tc-tiddler-controls svg {\\n opacity: 0;\\n transition: all .2s ease-in;\\n }\\n\\n .tc-tiddler-controls svg.tc-image-close-button,\\n .tc-tiddler-controls .py-toggle-todo-button svg,\\n .tc-tiddler-controls svg.tc-image-done-button,\\n .tc-tiddler-frame .tc-tiddler-controls:hover svg {\\n opacity: 1;\\n }\\n\\n .tc-tiddler-controls .py-toggle-todo-button .done svg {\\n fill: #2da562;\\n }\\n}\\n\\\"\\\"\\\">>\\n\\nbutton.tc-tag-label, span.tc-tag-label {\\n padding: 0.3em 1em !important;\\n}\\n\\n/* Fonts */\\n\\nhtml, body {\\n font-family: {{$:/themes/nico/notebook/settings/fontfamily}};\\n}\\n\\n.tc-tiddler-frame input.tc-edit-texteditor,\\n.tc-tiddler-frame textarea.tc-edit-texteditor,\\n.tc-tiddler-frame iframe.tc-edit-texteditor {\\n font-family: {{$:/themes/nico/notebook/settings/editorfontfamily}};\\n}\\n\\npre, code {\\n font-family: {{$:/themes/nico/notebook/settings/codefontfamily}};\\n}\\n\\n.tc-titlebar, .tc-site-title {\\n font-size: 28px !important;\\n line-height: 34px !important;\\n font-weight: 600 !important;\\n letter-spacing: -0.5px !important;\\n}\\n\\nh1, h2, h3, h4, h5, h6 {\\n font-weight: 600;\\n}\\n\\n.tc-tiddler-body h1,\\n.tc-tiddler-body h2,\\n.tc-tiddler-preview-preview h1,\\n.tc-tiddler-preview-preview h2 {\\n font-weight: bold;\\n}\\n\\ndiv.tc-tiddler-frame .tc-tiddler-body {\\n font-size: {{$:/themes/nico/notebook/metrics/bodyfontsize}};\\n line-height: {{$:/themes/nico/notebook/metrics/bodylineheight}};\\n}\\n\\n/* Tabs */\\n\\ndiv.tc-tab-buttons {\\n margin-bottom: -4px;\\n}\\n\\ndiv.tc-tab-buttons button {\\n font-weight: bold;\\n font-size: 1.2em;\\n line-height: 1em;\\n padding: .6em .8em .4em .8em;\\n border: 0;\\n border-radius: 0;\\n background: transparent;\\n cursor: pointer;\\n transition: background ease-in .2s;\\n}\\n\\ndiv.tc-tab-buttons button:hover {\\n background: rgba(0,0,0,.03);\\n}\\n\\ndiv.tc-tab-buttons button.tc-tab-selected {\\n border: 0;\\n background: transparent;\\n border-bottom: 4px solid \u003C\u003Ccolour primary>>;\\n}\\n\\n/* Dropdowns */\\n\\n@keyframes pop {\\n 0% {\\n transform: scale(0.8);\\n opacity: 0;\\n }\\n\\n 80% {\\n transform: scale(1.03);\\n opacity: 1;\\n }\\n\\n 100% {\\n transform: scale(1);\\n opacity: 1;\\n }\\n}\\n\\n.tc-drop-down {\\n box-shadow: 0 0 10px rgba(0,0,0,.2);\\n border-radius: 6px;\\n padding: 10px 0 !important;\\n animation: pop .15s ease-in forwards;\\n}\\n\\n.tc-drop-down a, .tc-drop-down button {\\n padding: 3px 15px !important;\\n}\\n\\n.tc-search-results {\\n line-height: 2em;\\n}\\n\\n.tc-search-results em {\\n font-weight: bold;\\n font-style: normal;\\n}\\n\\n/* Draft list */\\n\\n.tc-drafts-list {\\n font-size: .9em;\\n left: auto;\\n right: 0;\\n}\\n\\n.tc-drafts-list a {\\n padding: 6px 12px;\\n font-weight: bold;\\n border-top-left-radius: 6px;\\n border-top-right-radius: 6px;\\n display: inline-block;\\n}\\n\\n.nc-refs {\\n color: #888;\\n font-size: .9em;\\n}\\n\\n.nc-refs h4 {\\n margin-bottom: 4px;\\n}\\n\\n.nc-post-created {\\n color: #acacac;\\n font-size: .8em;\\n}\\n\"\n },\n \"$:/themes/nico/notebook/changelog\": {\n \"title\": \"$:/themes/nico/notebook/changelog\",\n \"caption\": \"ChangeLog\",\n \"created\": \"20201217180707912\",\n \"modified\": \"20210202214001915\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"! 1.4.1\\n\\n!! Fixes\\n\\n* Fix the transclusion mode of sidebar sections\\n* Fix section title rendering for tiddlers without a caption field\\n* Fix the colour of links in the sidebar when using Notebook palettes with Vanilla\\n\\n! 1.4.0\\n\\n!! Features\\n\\n* New redesigned topbar layout\\n* Add a configuration setting for the story width\\n* Add support for keyboard navigation in the search dropdown\\n\\n! 1.3.6\\n\\n!! Improvements\\n\\n* Improve the style of tabs\\n* New animation for drop-downs\\n* Use a lighter page background colour in the beige palette\\n\\n!! Fixes\\n\\n* Fix the default ctrl+shift+F shortcut for focusing the search input\\n\\n! 1.3.5\\n\\n!! Features\\n\\n* Add an option to reveal tiddler controls on mouseover\\n\\n! 1.3.4\\n\\n!! Improvements\\n\\n* Add a keyboard shortcut (alt+shift+s) to toggle Notebook sidebar\\n* Add missing colours to tiddler editor fields in the dark palette\\n\\n!! Fixes\\n\\n* Fix the size of toolbar button labels when the $:/config/Toolbar/Text is set to yes\\n\\n! 1.3.3\\n\\n!! Improvements\\n\\n* Make the sidebar more generic by using the default sidebar sections\\n\\n! 1.3.2\\n\\n!! Improvements\\n\\n* Add colours for messages in the dark palette\\n* Add colours for notification in the dark palette\\n* Set colours for messages in the beige palette\\n\\n! 1.3.1\\n\\n!! Features\\n\\n* New font family settings distinct from the Vanilla theme\\n\\n!! Improvements\\n\\n* Use a slightly lighter colour as the search input background\\n* Improve contrast of sidebar buttons in the dark palette\\n\\n!! Fixes\\n\\n* Fix tiddler control button colours in all three palettes\\n* Fix tab colours in palette-dark\\n\\n! 1.3.0\\n\\n!! Improvements\\n\\n* New dark colour palette\\n* Use a darker color for tiddler subtitles\\n* Add back the WebKit search cancel button in search inputs\\n\\n!! Fixes\\n\\n* Fix the z-index of the topbar for the zoomin story view\\n* Fix the font weight of tiddler titles in edit mode\\n\\n! 1.2.0\\n\\n!! Improvements\\n\\n* Better support for dark colour palettes\\n\\n!! Fixes\\n\\n* Fix rendering of overflowing/wrapping text in the sidebar\\n\\n! 1.1.0\\n\\n!! Features\\n\\n* New theme tweaks tab dedicated to Notebook in the control panel\\n* Inputs in the edit template are now styled consistently with other inputs\\n\\n!! Fixes\\n\\n* Fixes the position of sticky tiddler titles when the option is turned on\\n\"\n },\n \"$:/config/ShortcutInfo/notebook-focus-search\": {\n \"title\": \"$:/config/ShortcutInfo/notebook-focus-search\",\n \"text\": \"Focus on the topbar search field\"\n },\n \"$:/config/shortcuts/notebook-focus-search\": {\n \"title\": \"$:/config/shortcuts/notebook-focus-search\",\n \"text\": \"ctrl+shift+F\"\n },\n \"$:/config/Search/AutoFocus\": {\n \"title\": \"$:/config/Search/AutoFocus\",\n \"text\": \"false\"\n },\n \"$:/config/shortcuts/sidebar-search\": {\n \"title\": \"$:/config/shortcuts/sidebar-search\",\n \"text\": \"\"\n },\n \"$:/themes/nico/notebook/images/bars\": {\n \"title\": \"$:/themes/nico/notebook/images/bars\",\n \"created\": \"20200428212322206\",\n \"modified\": \"20201210210231235\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003Csvg class=\\\"bars\\\" height=\\\"21pt\\\" viewBox=\\\"0 0 42 42\\\" enable-background=\\\"new 0 0 32 22.5\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n \u003Cg class=\\\"svg-menu-toggle\\\" sketch:type=\\\"MSLayerGroup\\\">\\n \u003Crect class=\\\"bar\\\" x=\\\"8\\\" y=\\\"28\\\" width=\\\"26\\\" height=\\\"4\\\">\u003C/rect>\\n \u003Crect class=\\\"bar\\\" x=\\\"8\\\" y=\\\"19\\\" width=\\\"26\\\" height=\\\"4\\\">\u003C/rect>\\n \u003Crect class=\\\"bar\\\" x=\\\"8\\\" y=\\\"10\\\" width=\\\"26\\\" height=\\\"4\\\">\u003C/rect>\\n \u003C/g>\\n\u003C/svg>\\n\"\n },\n \"$:/themes/nico/notebook/images/caret-down\": {\n \"title\": \"$:/themes/nico/notebook/images/caret-down\",\n \"created\": \"20200429194348688\",\n \"modified\": \"20201210210230919\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003Csvg width=\\\"6pt\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 320 512\\\">\u003Cpath d=\\\"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z\\\"/>\u003C/svg>\\n\"\n },\n \"$:/themes/nico/notebook/images/caret-right\": {\n \"title\": \"$:/themes/nico/notebook/images/caret-right\",\n \"created\": \"20200429194305719\",\n \"modified\": \"20201210210230909\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003Csvg width=\\\"4pt\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 192 512\\\">\u003Cpath d=\\\"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z\\\"/>\u003C/svg>\\n\"\n },\n \"$:/themes/nico/notebook/images/color-switch\": {\n \"title\": \"$:/themes/nico/notebook/images/color-switch\",\n \"created\": \"20201210170859810\",\n \"creator\": \"nico\",\n \"modified\": \"20201210205606403\",\n \"modifier\": \"nico\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003Csvg width=\\\"20px\\\" height=\\\"20px\\\" viewBox=\\\"0 0 16 16\\\" class=\\\"bi bi-circle-half\\\" fill=\\\"currentColor\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n \u003Cpath fill-rule=\\\"evenodd\\\" d=\\\"M8 15V1a7 7 0 1 1 0 14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z\\\"/>\\n\u003C/svg\\n\"\n },\n \"$:/themes/nico/notebook/metrics/bodyfontsize\": {\n \"title\": \"$:/themes/nico/notebook/metrics/bodyfontsize\",\n \"created\": \"20200428203454207\",\n \"modified\": \"20201210205606363\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"15px\\n\"\n },\n \"$:/themes/nico/notebook/metrics/bodylineheight\": {\n \"title\": \"$:/themes/nico/notebook/metrics/bodylineheight\",\n \"created\": \"20200428203454207\",\n \"modified\": \"20201210205606363\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"22px\"\n },\n \"$:/themes/nico/notebook/metrics/sidebar-width\": {\n \"title\": \"$:/themes/nico/notebook/metrics/sidebar-width\",\n \"created\": \"20200429144554294\",\n \"modified\": \"20201210210231246\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"350px\\n\"\n },\n \"$:/themes/nico/notebook/metrics/story-width\": {\n \"title\": \"$:/themes/nico/notebook/metrics/story-width\",\n \"created\": \"20210123210054185\",\n \"modified\": \"20210123211911688\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"800px\\n\"\n },\n \"$:/themes/nico/notebook/metrics/topbar-height\": {\n \"title\": \"$:/themes/nico/notebook/metrics/topbar-height\",\n \"created\": \"20200428203454207\",\n \"modified\": \"20201210205606363\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"52px\\n\"\n },\n \"$:/themes/nico/notebook/options/stickytitles\": {\n \"title\": \"$:/themes/nico/notebook/options/stickytitles\",\n \"text\": \"no\"\n },\n \"$:/themes/nico/notebook/options/codewrapping\": {\n \"title\": \"$:/themes/nico/notebook/options/codewrapping\",\n \"text\": \"pre-wrap\"\n },\n \"$:/themes/nico/notebook/options/reveal-tiddler-controls-on-hover\": {\n \"title\": \"$:/themes/nico/notebook/options/reveal-tiddler-controls-on-hover\",\n \"text\": \"no\"\n },\n \"$:/core/ui/PageTemplate/sidebar\": {\n \"title\": \"$:/core/ui/PageTemplate/sidebar\",\n \"created\": \"20200430072116835\",\n \"modified\": \"20201217174129501\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\\whitespace trim\\n\\\\define config-title()\\n$:/config/SideBarSegments/Visibility/$(listItem)$\\n\\\\end\\n\\nOverwritten by $:/themes/nico/notebook so that the default sidebar does not get rendered.\\n\"\n },\n \"$:/themes/tiddlywiki/vanilla/themetweaks\": {\n \"title\": \"$:/themes/tiddlywiki/vanilla/themetweaks\",\n \"caption\": \"{{$:/language/ThemeTweaks/ThemeTweaks}}\",\n \"created\": \"20201217163834291\",\n \"modified\": \"20201217163914434\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"Overwritten by $:/themes/nico/notebook so that the Vanilla theme tweaks do not appear in the control panel. \"\n },\n \"$:/themes/nico/notebook/palettes/palette-beige\": {\n \"title\": \"$:/themes/nico/notebook/palettes/palette-beige\",\n \"text\": \"alert-background: #ffe476\\nalert-border: #b99e2f\\nalert-highlight: #881122\\nalert-muted-foreground: #b99e2f\\nbackground: #ffffff\\nblockquote-bar: \u003C\u003Ccolour muted-foreground>>\\nbutton-background:\\nbutton-foreground:\\nbutton-border:\\ncode-background: #f7f7f9\\ncode-border: #e1e1e8\\ncode-foreground: #dd1144\\ndirty-indicator: #c63636\\ndownload-background: #66cccc\\ndownload-foreground: \u003C\u003Ccolour background>>\\ndragger-background: \u003C\u003Ccolour foreground>>\\ndragger-foreground: \u003C\u003Ccolour background>>\\ndropdown-background: \u003C\u003Ccolour background>>\\ndropdown-border: #ddd\\ndropdown-tab-background-selected: #fff\\ndropdown-tab-background: #ececec\\ndropzone-background: #da8548\\nexternal-link-background-hover: inherit\\nexternal-link-background-visited: inherit\\nexternal-link-background: inherit\\nexternal-link-foreground-hover: inherit\\nexternal-link-foreground-visited: #0000aa\\nexternal-link-foreground: #0000ee\\nforeground: #3F3B3B\\nmessage-background: #e6f5e8\\nmessage-border: #2b5532\\nmessage-foreground: #2b5532\\nmodal-backdrop: \u003C\u003Ccolour foreground>>\\nmodal-background: \u003C\u003Ccolour background>>\\nmodal-border: #999999\\nmodal-footer-background: #f5f5f5\\nmodal-footer-border: #dddddd\\nmodal-header-border: #eeeeee\\nmuted-foreground: #999999\\nnotification-background: #ffffdd\\nnotification-border: #999999\\npage-background: #f5f5ee\\npre-background: #f6f6f6\\npre-border: #cccccc\\nprimary: #7f4bca\\nselect-tag-background:\\nselect-tag-foreground:\\nsidebar-button-foreground: #a6a69c\\nsidebar-controls-foreground-hover: #000000\\nsidebar-controls-foreground: \u003C\u003Ccolour sidebar-button-foreground>>\\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\\nsidebar-foreground: #acacac\\nsidebar-muted-foreground-hover: #444444\\nsidebar-muted-foreground: #c0c0c0\\nsidebar-tab-background-selected: #ffffff\\nsidebar-tab-background: \u003C\u003Ccolour tab-background>>\\nsidebar-tab-border-selected: \u003C\u003Ccolour tab-border-selected>>\\nsidebar-tab-border: \u003C\u003Ccolour tab-border>>\\nsidebar-tab-divider: \u003C\u003Ccolour tab-divider>>\\nsidebar-tab-foreground-selected: \u003C\u003Ccolour tab-foreground-selected>>\\nsidebar-tab-foreground: \u003C\u003Ccolour tab-foreground>>\\nsidebar-tiddler-link-foreground-hover: \u003C\u003Ccolour primary>>\\nsidebar-tiddler-link-foreground: \u003C\u003Ccolour tab-foreground>>\\nsite-title-foreground: #353748\\nstatic-alert-foreground: #aaaaaa\\ntab-background-selected: #ffffff\\ntab-background: #eeeeee\\ntab-border-selected: #cccccc\\ntab-border: #cccccc\\ntab-divider: #d8d8d8\\ntab-foreground-selected: \u003C\u003Ccolour foreground>>\\ntab-foreground: #888888\\ntable-border: #dddddd\\ntable-footer-background: #a8a8a8\\ntable-header-background: #f0f0f0\\ntag-background: #ffeedd\\ntag-foreground: #000\\ntiddler-background: \u003C\u003Ccolour background>>\\ntiddler-border: #dbdbc7;\\ntiddler-controls-foreground-hover: #888888;\\ntiddler-controls-foreground-selected: #888888;\\ntiddler-controls-foreground: #cccccc\\ntiddler-editor-background: \u003C\u003Ccolour background>>\\ntiddler-editor-border-image: #ffffff\\ntiddler-editor-border: rgba(0,0,0,.2)\\ntiddler-editor-fields-even: #e0e8e0\\ntiddler-editor-fields-odd: #f0f4f0\\ntiddler-info-background: #f8f8f8\\ntiddler-info-border: #dddddd\\ntiddler-info-tab-background: #f8f8f8\\ntiddler-link-background: \u003C\u003Ccolour background>>\\ntiddler-link-foreground: \u003C\u003Ccolour primary>>\\ntiddler-subtitle-foreground: #aaaaaa\\ntiddler-title-foreground: #333\\ntoolbar-new-button:\\ntoolbar-options-button:\\ntoolbar-save-button:\\ntoolbar-info-button:\\ntoolbar-edit-button:\\ntoolbar-close-button:\\ntoolbar-delete-button:\\ntoolbar-cancel-button:\\ntoolbar-done-button:\\nuntagged-background: #999999\\nvery-muted-foreground: #888888\\n\",\n \"type\": \"application/x-tiddler-dictionary\",\n \"description\": \"A beige colour palette for Notebook\",\n \"name\": \"Notebook Beige\",\n \"tags\": \"$:/tags/Palette $:/tags/notebook/Palette\"\n },\n \"$:/themes/nico/notebook/palettes/palette-dark\": {\n \"title\": \"$:/themes/nico/notebook/palettes/palette-dark\",\n \"text\": \"alert-background: #643b43\\nalert-border: #3f181f\\nalert-highlight: #881122\\nalert-muted-foreground: #bc8b94\\nbackground: #383e49\\nblockquote-bar: \u003C\u003Ccolour muted-foreground>>\\nbutton-background:\\nbutton-border:\\nbutton-foreground:\\ncode-background: #2c323b\\ncode-border: #111\\ncode-foreground: #dd1144\\ndirty-indicator: #c63636\\ndownload-background: #98be65\\ndownload-foreground: \u003C\u003Ccolour background>>\\ndragger-background: \u003C\u003Ccolour foreground>>\\ndragger-foreground: \u003C\u003Ccolour background>>\\ndropdown-background: \u003C\u003Ccolour background>>\\ndropdown-border: #111\\ndropdown-tab-background-selected: #fff\\ndropdown-tab-background: #ececec\\ndropzone-background: #da8548\\nexternal-link-background-hover: inherit\\nexternal-link-background-visited: inherit\\nexternal-link-background: inherit\\nexternal-link-foreground-hover: inherit\\nexternal-link-foreground-visited: #61afef\\nexternal-link-foreground: #c678dd\\nforeground: #c8ced8\\nmessage-background: #2c323e\\nmessage-border: #111\\nmessage-foreground: #d5e2f1\\nmodal-backdrop: \u003C\u003Ccolour foreground>>\\nmodal-background: \u003C\u003Ccolour background>>\\nmodal-border: #999999\\nmodal-footer-background: #f5f5f5\\nmodal-footer-border: #dddddd\\nmodal-header-border: #eeeeee\\nmuted-foreground: #999999\\nnotification-background: #3a5e39\\nnotification-border: #192c19\\npage-background: #262b33\\npre-background: \u003C\u003Ccolour page-background>>\\npre-border: \u003C\u003Ccolour tiddler-border>>\\nprimary: #bf93ff\\nselect-tag-background:\\nselect-tag-foreground:\\nsidebar-button-foreground: #5e646f\\nsidebar-controls-foreground-hover: #cad2e5\\nsidebar-controls-foreground: \u003C\u003Ccolour sidebar-button-foreground>>\\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\\nsidebar-foreground: #cad2e5\\nsidebar-muted-foreground-hover: #444444\\nsidebar-muted-foreground: #c0c0c0\\nsidebar-tab-background-selected: \u003C\u003Ccolour tab-background-selected>>\\nsidebar-tab-background: \u003C\u003Ccolour tab-background>>\\nsidebar-tab-border-selected: \u003C\u003Ccolour tab-border-selected>>\\nsidebar-tab-border: \u003C\u003Ccolour tab-border>>\\nsidebar-tab-divider: \u003C\u003Ccolour tab-divider>>\\nsidebar-tab-foreground-selected: \u003C\u003Ccolour tab-foreground-selected>>\\nsidebar-tab-foreground: \u003C\u003Ccolour tab-foreground>>\\nsidebar-tiddler-link-foreground-hover: \u003C\u003Ccolour primary>>\\nsidebar-tiddler-link-foreground: \u003C\u003Ccolour tab-foreground>>\\nsite-title-foreground: \u003C\u003Ccolour foreground>>\\nstatic-alert-foreground: #aaaaaa\\ntab-background-selected: \u003C\u003Ccolour background>>\\ntab-background: \u003C\u003Ccolour page-background>>\\ntab-border-selected: \u003C\u003Ccolour foreground>>\\ntab-border: #cad2e5\\ntab-divider: #cad2e5\\ntab-foreground-selected: #ecf2ff\\ntab-foreground: #cad2e5\\ntable-border: #aaaaaa\\ntable-footer-background: #a8a8a8\\ntable-header-background: #262b33\\ntag-background: #fcb671\\ntag-foreground: #000\\ntiddler-background: \u003C\u003Ccolour background>>\\ntiddler-border: #111\\ntiddler-controls-foreground-hover: #cad2e5\\ntiddler-controls-foreground-selected: #cad2e5\\ntiddler-controls-foreground: #5e646f\\ntiddler-editor-background: \u003C\u003Ccolour background>>\\ntiddler-editor-border-image: #ffffff\\ntiddler-editor-border: rgba(255, 255, 255, 0.3)\\ntiddler-editor-fields-even: \u003C\u003Ccolour background>>\\ntiddler-editor-fields-odd: #2c323b\\ntiddler-info-background: #f8f8f8\\ntiddler-info-border: #dddddd\\ntiddler-info-tab-background: #f8f8f8\\ntiddler-link-background: \u003C\u003Ccolour background>>\\ntiddler-link-foreground: \u003C\u003Ccolour primary>>\\ntiddler-subtitle-foreground: #aaaaaa\\ntiddler-title-foreground: \u003C\u003Ccolour foreground>>\\ntoolbar-cancel-button:\\ntoolbar-close-button:\\ntoolbar-delete-button:\\ntoolbar-done-button:\\ntoolbar-edit-button:\\ntoolbar-info-button:\\ntoolbar-new-button:\\ntoolbar-options-button:\\ntoolbar-save-button:\\nuntagged-background: #999999\\nvery-muted-foreground: #888888\\n\",\n \"type\": \"application/x-tiddler-dictionary\",\n \"description\": \"A dark colour palette for Notebook\",\n \"name\": \"Notebook Dark\",\n \"tags\": \"$:/tags/Palette $:/tags/notebook/Palette\"\n },\n \"$:/themes/nico/notebook/palettes/palette-grey\": {\n \"title\": \"$:/themes/nico/notebook/palettes/palette-grey\",\n \"text\": \"alert-background: #ffe476\\nalert-border: #b99e2f\\nalert-highlight: #881122\\nalert-muted-foreground: #b99e2f\\nbackground: #ffffff\\nblockquote-bar: \u003C\u003Ccolour muted-foreground>>\\nbutton-background:\\nbutton-foreground:\\nbutton-border:\\ncode-background: #f7f7f9\\ncode-border: #e1e1e8\\ncode-foreground: #dd1144\\ndirty-indicator: #c63636\\ndownload-background: #66cccc\\ndownload-foreground: \u003C\u003Ccolour background>>\\ndragger-background: \u003C\u003Ccolour foreground>>\\ndragger-foreground: \u003C\u003Ccolour background>>\\ndropdown-background: \u003C\u003Ccolour background>>\\ndropdown-border: #ddd\\ndropdown-tab-background-selected: #fff\\ndropdown-tab-background: #ececec\\ndropzone-background: #da8548\\nexternal-link-background-hover: inherit\\nexternal-link-background-visited: inherit\\nexternal-link-background: inherit\\nexternal-link-foreground-hover: inherit\\nexternal-link-foreground-visited: #0000aa\\nexternal-link-foreground: #0000ee\\nforeground: #283c46\\nmessage-background: #ecf2ff\\nmessage-border: #cfd6e6\\nmessage-foreground: #547599\\nmodal-backdrop: \u003C\u003Ccolour foreground>>\\nmodal-background: \u003C\u003Ccolour background>>\\nmodal-border: #999999\\nmodal-footer-background: #f5f5f5\\nmodal-footer-border: #dddddd\\nmodal-header-border: #eeeeee\\nmuted-foreground: #999999\\nnotification-background: #ffffdd\\nnotification-border: #999999\\npage-background: #f4f4f4\\npre-background: #f6f6f6\\npre-border: #cccccc\\nprimary: #127edd\\nselect-tag-background:\\nselect-tag-foreground:\\nsidebar-button-foreground: #a6a69c\\nsidebar-controls-foreground-hover: #000000\\nsidebar-controls-foreground: \u003C\u003Ccolour sidebar-button-foreground>>\\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\\nsidebar-foreground: #acacac\\nsidebar-muted-foreground-hover: #444444\\nsidebar-muted-foreground: #c0c0c0\\nsidebar-tab-background-selected: #ffffff\\nsidebar-tab-background: \u003C\u003Ccolour tab-background>>\\nsidebar-tab-border-selected: \u003C\u003Ccolour tab-border-selected>>\\nsidebar-tab-border: \u003C\u003Ccolour tab-border>>\\nsidebar-tab-divider: \u003C\u003Ccolour tab-divider>>\\nsidebar-tab-foreground-selected: \u003C\u003Ccolour tab-foreground-selected>>\\nsidebar-tab-foreground: \u003C\u003Ccolour tab-foreground>>\\nsidebar-tiddler-link-foreground-hover: \u003C\u003Ccolour primary>>\\nsidebar-tiddler-link-foreground: \u003C\u003Ccolour tab-foreground>>\\nsite-title-foreground: #353748\\nstatic-alert-foreground: #aaaaaa\\ntab-background-selected: #ffffff\\ntab-background: #eeeeee\\ntab-border-selected: #cccccc\\ntab-border: #cccccc\\ntab-divider: #d8d8d8\\ntab-foreground-selected: \u003C\u003Ccolour foreground>>\\ntab-foreground: #888888\\ntable-border: #dddddd\\ntable-footer-background: #a8a8a8\\ntable-header-background: #f0f0f0\\ntag-background: #ffeedd\\ntag-foreground: #000\\ntiddler-background: \u003C\u003Ccolour background>>\\ntiddler-border: #ddd\\ntiddler-controls-foreground-hover: #888888;\\ntiddler-controls-foreground-selected: #888888;\\ntiddler-controls-foreground: #cccccc\\ntiddler-editor-background: \u003C\u003Ccolour background>>\\ntiddler-editor-border-image: #ffffff\\ntiddler-editor-border: rgba(0,0,0,.2)\\ntiddler-editor-fields-even: #e0e8e0\\ntiddler-editor-fields-odd: #f0f4f0\\ntiddler-info-background: #f8f8f8\\ntiddler-info-border: #dddddd\\ntiddler-info-tab-background: #f8f8f8\\ntiddler-link-background: \u003C\u003Ccolour background>>\\ntiddler-link-foreground: \u003C\u003Ccolour primary>>\\ntiddler-subtitle-foreground: #aaaaaa\\ntiddler-title-foreground: #333\\ntoolbar-new-button:\\ntoolbar-options-button:\\ntoolbar-save-button:\\ntoolbar-info-button:\\ntoolbar-edit-button:\\ntoolbar-close-button:\\ntoolbar-delete-button:\\ntoolbar-cancel-button:\\ntoolbar-done-button:\\nuntagged-background: #999999\\nvery-muted-foreground: #888888\\n\",\n \"type\": \"application/x-tiddler-dictionary\",\n \"description\": \"A grey color palette for Notebook\",\n \"name\": \"Notebook Grey\",\n \"tags\": \"$:/tags/Palette $:/tags/notebook/Palette\"\n },\n \"$:/themes/nico/notebook/settings/codefontfamily\": {\n \"title\": \"$:/themes/nico/notebook/settings/codefontfamily\",\n \"created\": \"20210101213404232\",\n \"modified\": \"20210101214210227\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\"Fira Mono\\\",\\\"Liberation Mono\\\",Menlo,Courier,monospace\\n\"\n },\n \"$:/themes/nico/notebook/settings/fontfamily\": {\n \"title\": \"$:/themes/nico/notebook/settings/fontfamily\",\n \"created\": \"20210101213404232\",\n \"modified\": \"20210101213411800\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\"Segoe UI\\\",Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\"\\n\"\n },\n \"$:/themes/nico/notebook/shortcuts/notebook-focus-search\": {\n \"title\": \"$:/themes/nico/notebook/shortcuts/notebook-focus-search\",\n \"created\": \"20201210122048919\",\n \"key\": \"((notebook-focus-search))\",\n \"modified\": \"20210115130024907\",\n \"tags\": \"$:/tags/KeyboardShortcut\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003C$action-sendmessage $message=\\\"tm-focus-selector\\\" $param=\\\".nc-topbar input\\\"/>\\n\"\n },\n \"$:/themes/nico/notebook/shortcuts/toggle-sidebar\": {\n \"title\": \"$:/themes/nico/notebook/shortcuts/toggle-sidebar\",\n \"created\": \"20210115130000707\",\n \"key\": \"((toggle-sidebar))\",\n \"modified\": \"20210115130021883\",\n \"tags\": \"$:/tags/KeyboardShortcut\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003C$list\\n filter=\\\"[[$:/state/notebook-sidebar]is[missing]] [{$:/state/notebook-sidebar}removeprefix[yes]]\\\"\\n emptyMessage=\\\"\\\"\\\"\u003C$action-setfield $tiddler=\\\"$:/state/notebook-sidebar\\\" text=\\\"yes\\\"/>\\\"\\\"\\\"\\n>\\n \u003C$action-setfield $tiddler=\\\"$:/state/notebook-sidebar\\\" text=\\\"no\\\"/>\\n\u003C/$list>\\n\"\n },\n \"$:/themes/nico/notebook/stickytitles\": {\n \"title\": \"$:/themes/nico/notebook/stickytitles\",\n \"created\": \"20201217172915960\",\n \"modified\": \"20201217180034682\",\n \"tags\": \"$:/tags/Stylesheet\",\n \"text\": \"\u003C$reveal state=\\\"$:/themes/nico/notebook/options/stickytitles\\\" type=\\\"match\\\" text=\\\"yes\\\">\\n\\n.tc-tiddler-title {\\n position: -webkit-sticky;\\n position: -moz-sticky;\\n position: -o-sticky;\\n position: -ms-sticky;\\n position: sticky;\\n top: {{$:/themes/nico/notebook/metrics/topbar-height}};\\n background: \u003C\u003Ccolour tiddler-background>>;\\n z-index: 500;\\n}\\n\\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\\n .tc-tiddler-title {\\n top: 0;\\n }\\n}\\n\\n\u003C$list filter=\\\"[range[100]]\\\">\\n`.tc-story-river .tc-tiddler-frame:nth-child(100n+`\u003C$text text=\u003C\u003CcurrentTiddler>>/>`) {\\nz-index: `\u003C$text text={{{ [[200]subtract\u003CcurrentTiddler>] }}}/>`;\\n}\\n`\\n\u003C/$list>\\n\u003C/$reveal>\\n\"\n },\n \"$:/themes/nico/notebook/tags/Sidebar\": {\n \"title\": \"$:/themes/nico/notebook/tags/Sidebar\",\n \"created\": \"20200429164516951\",\n \"list\": \"$:/themes/nico/notebook/ui/Buttons/menu $:/themes/nico/notebook/ui/Sidebar/Headings $:/themes/nico/notebook/ui/Sidebar/Search $:/themes/nico/notebook/Sidebar/Sections\",\n \"modified\": \"20201210205606504\",\n \"type\": \"text/vnd.tiddlywiki\"\n },\n \"$:/themes/nico/notebook/tags/SidebarSection\": {\n \"title\": \"$:/themes/nico/notebook/tags/SidebarSection\",\n \"created\": \"20200429201017275\",\n \"list\": \"$:/themes/nico/notebook/ui/Sidebar/Open $:/themes/nico/notebook/ui/Sidebar/Recent $:/themes/nico/notebook/ui/Sidebar/Tools $:/themes/nico/notebook/ui/Sidebar/More\",\n \"modified\": \"20201210215658901\",\n \"type\": \"text/vnd.tiddlywiki\"\n },\n \"$:/themes/nico/notebook/ui/Bottombar\": {\n \"title\": \"$:/themes/nico/notebook/ui/Bottombar\",\n \"created\": \"20200429113453340\",\n \"modified\": \"20201210210230886\",\n \"tags\": \"$:/tags/PageTemplate\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003C$reveal state=\\\"$:/state/notebook-bottombar\\\" type=\\\"match\\\" text=\\\"yes\\\" default=\\\"yes\\\" retain=\\\"yes\\\" animate=\\\"yes\\\">\\n \u003Cdiv class=\\\"nc-bar nc-bottombar\\\">\\n \u003C$list filter=\\\"[all[shadows+tiddlers]tag[$:/tags/NotebookTopbar]!has[draft.of]]\\\" variable=\\\"listItem\\\">\\n \u003C$reveal type=\\\"nomatch\\\" state=\u003C\u003Cconfig-title>> text=\\\"hide\\\" tag=\\\"div\\\">\\n \u003C$transclude tiddler=\u003C\u003ClistItem>> mode=\\\"block\\\"/>\\n \u003C/$reveal>\\n \u003C/$list>\\n \u003Cdiv class=\\\"left\\\">\\n {{$:/themes/nico/notebook/ui/Buttons/menu}}\\n \u003C/div>\\n \u003Cdiv class=\\\"right\\\">\\n {{$:/core/ui/SideBarSegments/page-controls}}\\n \u003C/div>\\n \u003C/div>\\n\u003C/$reveal>\\n\\n\"\n },\n \"$:/themes/nico/notebook/ui/Buttons/SwitchPalette\": {\n \"title\": \"$:/themes/nico/notebook/ui/Buttons/SwitchPalette\",\n \"created\": \"20201210171047824\",\n \"description\": \"Toggle between grey/beige colour palette\",\n \"modified\": \"20210118213335643\",\n \"tags\": \"$:/tags/PageControls\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003Cspan class=\\\"desktop-only\\\">\\n \u003C$vars\\n palettes=\\\"[all[tiddlers+shadows]tag[$:/tags/notebook/Palette]]\\\"\\n popupTiddler=\u003C\u003Cqualify \\\"$:/state/notebook/palette-dropdown\\\">>\\n >\\n \u003C$button\\n popup=\u003C\u003CpopupTiddler>>\\n tooltip=\\\"Switch colours\\\"\\n aria-label=\\\"Switch colours\\\"\\n class=\u003C\u003Ctv-config-toolbar-class>>\\n >\\n \u003C$list filter=\\\"[\u003Ctv-config-toolbar-icons>match[yes]]\\\">\\n\\t{{$:/themes/nico/notebook/images/color-switch}}\\n \u003C/$list>\\n\\n \u003C$list filter=\\\"[\u003Ctv-config-toolbar-text>match[yes]]\\\">\\n\\t\u003Cspan class=\\\"tc-btn-text\\\">Switch colours\u003C/span>\\n \u003C/$list>\\n\\n \u003C$reveal state=\u003C\u003CpopupTiddler>> type=\\\"popup\\\" position=\\\"belowleft\\\" class=\\\"tc-drop-down\\\">\\n\\t\u003C$list filter=\u003C\u003Cpalettes>>>\\n\\t \u003C$button class=\\\"tc-btn-invisible\\\">\\n\\t {{!!name}}\\n\\t \u003C$action-setfield $tiddler=\\\"$:/palette\\\" text={{!!title}}/>\\n\\t \u003C/$button>\\n\\t\u003C/$list>\\n \u003C/$reveal>\\n\\n \u003C/$button>\\n \u003C/$vars>\\n\u003C/span>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Buttons/menu\": {\n \"title\": \"$:/themes/nico/notebook/ui/Buttons/menu\",\n \"created\": \"20200429115248943\",\n \"modified\": \"20210124211756417\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003C$reveal state=\\\"$:/state/notebook-sidebar\\\" type=\\\"match\\\" text=\\\"yes\\\" default=\\\"no\\\" retain=\\\"yes\\\" animate=\\\"no\\\">\\n \u003C$button set=\\\"$:/state/notebook-sidebar\\\" setTo=\\\"no\\\" tooltip=\\\"Toggle menu\\\" class=\\\"tc-btn-invisible sidebar-toggle open\\\">\\n {{$:/themes/nico/notebook/images/bars}}\\n \u003C/$button>\\n\u003C/$reveal>\\n\\n\u003C$reveal type=\\\"nomatch\\\" state=\\\"$:/state/notebook-sidebar\\\" text=\\\"yes\\\">\\n \u003C$button set=\\\"$:/state/notebook-sidebar\\\" setTo=\\\"yes\\\" tooltip=\\\"Toggle menu\\\" class=\\\"tc-btn-invisible sidebar-toggle\\\">\\n {{$:/themes/nico/notebook/images/bars}}\\n \u003C/$button>\\n\u003C/$reveal>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Search\": {\n \"title\": \"$:/themes/nico/notebook/ui/Search\",\n \"created\": \"20200429191943257\",\n \"modified\": \"20210126170723413\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\\define advanced-search-actions()\\n\u003C$action-setfield $tiddler=\\\"$:/temp/advancedsearch/input\\\" text={{$:/temp/notebook-search}}/>\\n\u003C$action-setfield $tiddler=\\\"$:/temp/advancedsearch/refresh\\\" text=\\\"yes\\\"/>\\n\u003C$action-navigate $to=\\\"$:/AdvancedSearch\\\"/>\\n\\\\end\\n\\n\\\\define input-accept-actions()\\n\u003C$list filter=\\\"[\u003C__tiddler__>get[text]!is[missing]] ~[\u003C__tiddler__>get[text]is[shadow]]\\\">\\n \u003C$action-navigate $to={{{ [\u003C__tiddler__>get[text]] }}}/>\\n \u003C$action-deletetiddler $filter=\\\"[[$:/temp/search]] [\u003CsearchTiddler>] [\u003CsearchListState>]\\\"/>\\n\u003C/$list>\\n\\\\end\\n\\n\\\\define cancel-search-actions()\\n\u003C$list filter=\\\"[\u003CsearchTiddler>get[text]!match{$:/temp/search}]\\\" emptyMessage=\\\"\\\"\\\"\u003C$action-deletetiddler $filter=\\\"[[$:/temp/search]] [\u003CsearchTiddler>] [\u003CsearchListState>]\\\"/>\\\"\\\"\\\">\\n \u003C$action-setfield $tiddler=\\\"$:/temp/search\\\" text={{{ [\u003CsearchTiddler>get[text]] }}}/>\\n \u003C$action-setfield $tiddler=\\\"$:/temp/search/refresh\\\" text=\\\"yes\\\"/>\u003C/$list>\\n\\\\end\\n\\n\u003C$vars editTiddler=\\\"$:/temp/search\\\"\\n searchTiddler=\\\"$:/temp/search/input\\\"\\n searchListState=\u003C\u003Cqualify \\\"$:/state/search-list/selected-item\\\">>>\\n \u003C$macrocall $name=\\\"keyboard-driven-input\\\"\\n\\t tiddler=\u003C\u003CeditTiddler>>\\n\\t storeTitle=\u003C\u003CsearchTiddler>>\\n\\t selectionStateTitle=\u003C\u003CsearchListState>>\\n\\t refreshTitle=\\\"$:/temp/search/refresh\\\"\\n\\t type=\\\"search\\\"\\n\\t tag=\\\"input\\\"\\n\\t focus={{$:/config/Search/AutoFocus}}\\n\\t focusPopup=\\\"$:/state/popup/notebook-search\\\"\\n\\t class=\\\"tc-popup-handle\\\"\\n\\t filterMinLength={{$:/config/Search/MinLength}}\\n\\t placeholder=\\\"Search...\\\"\\n\\t inputAcceptActions=\u003C\u003Cinput-accept-actions>>\\n\\t inputCancelActions=\u003C\u003Ccancel-search-actions>>\\n\\t cancelPopups=\\\"yes\\\"\\n\\t configTiddlerFilter=\\\"[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]\\\"\\n\\t />\\n \u003C$button\\n tooltip={{$:/language/Buttons/AdvancedSearch/Hint}}\\n aria-label={{$:/language/Buttons/AdvancedSearch/Caption}}\\n class=\\\"tc-btn-invisible tc-page-controls\\\"\\n >\\n {{$:/core/images/advanced-search-button}}\\n \u003C\u003Cadvanced-search-actions>>\\n \u003C/$button>\\n \u003C$reveal tag=\\\"div\\\" class=\\\"tc-block-dropdown-wrapper\\\" state=\\\"$:/state/popup/notebook-search\\\" type=\\\"nomatch\\\" text=\\\"\\\" default=\\\"\\\">\\n \u003C$list filter=\\\"[\u003CsearchTiddler>get[text]minlength{$:/config/Search/MinLength}limit[1]]\\\" emptyMessage=\\\"\\\" variable=\\\"listItem\\\">\\n \u003Cdiv class=\\\"tc-block-dropdown tc-search-drop-down\\\">\\n \u003C$tiddler tiddler=\u003C\u003CconfigTiddler>>>\\n {{$:/themes/nico/notebook/ui/Sidebar/SearchResults}}\\n \u003C/$tiddler>\\n \u003C/div>\\n \u003C/$list>\\n \u003C/$reveal>\\n\u003C/$vars>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Sidebar/Headings\": {\n \"title\": \"$:/themes/nico/notebook/ui/Sidebar/Headings\",\n \"created\": \"20200429160014174\",\n \"modified\": \"20201210210231267\",\n \"tags\": \"$:/themes/nico/notebook/tags/Sidebar\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003Cdiv class=\\\"segment\\\">\\n \u003Cdiv class=\\\"content\\\">\\n \u003Ch1 class=\\\"tc-site-title\\\">\\n {{$:/SiteTitle}}\\n \u003C/h1>\\n \u003Cdiv class=\\\"tc-site-subtitle\\\">\\n {{$:/SiteSubtitle}}\\n \u003C/div>\\n \u003C/div>\\n\u003C/div>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Sidebar/Search\": {\n \"title\": \"$:/themes/nico/notebook/ui/Sidebar/Search\",\n \"created\": \"20200429191943257\",\n \"modified\": \"20210124220152702\",\n \"tags\": \"$:/themes/nico/notebook/tags/Sidebar\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003Cdiv class=\\\"mobile-only\\\">\\n \u003Cdiv class=\\\"segment\\\">\\n \u003Cdiv class=\\\"content search\\\">\\n {{$:/themes/nico/notebook/ui/Search}}\\n \u003C/div>\\n \u003C/div>\\n\u003C/div>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Sidebar/SearchResults\": {\n \"title\": \"$:/themes/nico/notebook/ui/Sidebar/SearchResults\",\n \"created\": \"20200429191943257\",\n \"modified\": \"20210126164631418\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\\define searchResultList()\\n \u003Csmall>{{$:/language/Search/Matches/Title}}\u003C/small>\\n\\n \u003C$list filter=\\\"[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]\\\">\\n \u003Cspan class={{{[\u003CcurrentTiddler>addsuffix[-primaryList]] -[\u003CsearchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>\\n \u003C$transclude tiddler=\\\"$:/core/ui/ListItemTemplate\\\"/>\\n \u003C/span>\\n \u003C/$list>\\n\\n \u003Csmall>{{$:/language/Search/Matches/All}}\u003C/small>\\n\\n \u003C$list filter=\\\"[!is[system]search{$(searchTiddler)$}sort[title]limit[250]]\\\">\\n \u003Cspan class={{{[\u003CcurrentTiddler>addsuffix[-secondaryList]] -[\u003CsearchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>\\n \u003C$transclude tiddler=\\\"$:/core/ui/ListItemTemplate\\\"/>\\n \u003C/span>\\n \u003C/$list>\\n\\\\end\\n\\n\u003Cdiv class=\\\"tc-search-results\\\">\\n \u003C\u003CsearchResultList>>\\n\u003C/div>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Sidebar/SectionTemplate\": {\n \"title\": \"$:/themes/nico/notebook/ui/Sidebar/SectionTemplate\",\n \"created\": \"20200429161226897\",\n \"modified\": \"20210202213859460\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\\define sidebarHeading()\\n\u003C$vars tv-wikilinks=\\\"no\\\">\\n \u003C$transclude field=\\\"caption\\\">\\n \u003C$view field=\\\"title\\\"/>\\n \u003C/$transclude>\\n\u003C/$vars>\\n\\\\end\\n\\n\u003C$reveal state=\\\"$:/state/notebook-sidebar-section\\\" type=\\\"match\\\" text=\u003C\u003CcurrentTiddler>> default=\\\"no\\\" animate=\\\"no\\\">\\n \u003Cdiv class=\\\"segment section open\\\">\\n \u003C$button set=\\\"$:/state/notebook-sidebar-section\\\" setTo=\\\"\\\" class=\\\"tc-btn-invisible label\\\">\\n \u003C\u003CsidebarHeading>>\\n \u003Cspan class=\\\"caret\\\">{{$:/themes/nico/notebook/images/caret-down}}\u003C/span>\\n \u003C/$button>\\n \u003Cdiv class=\\\"content\\\">\\n \u003C$transclude $tiddler=\u003C\u003CcurrentTiddler>> mode=\\\"block\\\"/>\\n \u003C/div>\\n \u003C/div>\\n\u003C/$reveal>\\n\u003C$reveal state=\\\"$:/state/notebook-sidebar-section\\\" type=\\\"nomatch\\\" text=\u003C\u003CcurrentTiddler>> default=\\\"yes\\\" animate=\\\"no\\\">\\n \u003Cdiv class=\\\"segment section\\\">\\n \u003C$button set=\\\"$:/state/notebook-sidebar-section\\\" setTo=\u003C\u003CcurrentTiddler>> class=\\\"tc-btn-invisible label\\\">\\n \u003C\u003CsidebarHeading>>\\n \u003Cspan class=\\\"caret\\\">{{$:/themes/nico/notebook/images/caret-right}}\u003C/span>\\n \u003C/$button>\\n \u003C/div>\\n\u003C/$reveal>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Sidebar/Sections\": {\n \"title\": \"$:/themes/nico/notebook/ui/Sidebar/Sections\",\n \"created\": \"20200429163239707\",\n \"modified\": \"20210112213620486\",\n \"tags\": \"$:/themes/nico/notebook/tags/Sidebar\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003C$list filter=\\\"[all[shadows+tiddlers]!has[draft.of]tag[$:/tags/SideBar]]\\\">\\n {{||$:/themes/nico/notebook/ui/Sidebar/SectionTemplate}}\\n\u003C/$list>\\n\"\n },\n \"$:/themes/nico/notebook/ui/Sidebar\": {\n \"title\": \"$:/themes/nico/notebook/ui/Sidebar\",\n \"created\": \"20200428201218885\",\n \"modified\": \"20210112213605486\",\n \"tags\": \"$:/tags/PageTemplate\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\\\whitespace trim\\n\\\\define config-title()\\n$:/config/SideBarSegments/Visibility/$(listItem)$\\n\\\\end\\n\\n\u003C$reveal state=\\\"$:/state/notebook-sidebar\\\" type=\\\"match\\\" text=\\\"yes\\\" default=\\\"no\\\" retain=\\\"yes\\\" animate=\\\"no\\\">\\n \u003C$scrollable fallthrough=\\\"no\\\">\\n \u003Cdiv class=\\\"nc-sidebar\\\">\\n \u003C$list filter=\\\"[all[shadows+tiddlers]tag[$:/themes/nico/notebook/tags/Sidebar]!has[draft.of]]\\\" variable=\\\"listItem\\\">\\n \u003C$reveal type=\\\"nomatch\\\" state=\u003C\u003Cconfig-title>> text=\\\"hide\\\" tag=\\\"div\\\">\\n \u003C$transclude tiddler=\u003C\u003ClistItem>> mode=\\\"inline\\\"/>\\n \u003C/$reveal>\\n \u003C/$list>\\n \u003C/div>\\n \u003C/$scrollable>\\n\u003C/$reveal>\\n\\n\"\n },\n \"$:/themes/nico/notebook/ui/Topbar\": {\n \"title\": \"$:/themes/nico/notebook/ui/Topbar\",\n \"created\": \"20200428203101797\",\n \"modified\": \"20210124213834458\",\n \"tags\": \"$:/tags/PageTemplate\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\u003C$reveal state=\\\"$:/state/notebook-topbar\\\" type=\\\"match\\\" text=\\\"yes\\\" default=\\\"yes\\\" retain=\\\"yes\\\" animate=\\\"yes\\\">\\n \u003Cdiv class=\\\"nc-topbar-wrapper\\\">\\n \u003Cdiv class=\\\"nc-bar nc-topbar tc-adjust-top-of-scroll\\\">\\n \u003C$list filter=\\\"[all[shadows+tiddlers]tag[$:/tags/NotebookTopbar]!has[draft.of]]\\\" variable=\\\"listItem\\\">\\n \u003C$reveal type=\\\"nomatch\\\" state=\u003C\u003Cconfig-title>> text=\\\"hide\\\" tag=\\\"div\\\">\\n \u003C$transclude tiddler=\u003C\u003ClistItem>> mode=\\\"block\\\"/>\\n \u003C/$reveal>\\n \u003C/$list>\\n \u003Cdiv class=\\\"left\\\">\\n\\t{{$:/themes/nico/notebook/ui/Buttons/menu}}\\n {{$:/themes/nico/notebook/ui/Search}}\\n \u003C/div>\\n \u003Cdiv class=\\\"right\\\">\\n {{$:/core/ui/SideBarSegments/page-controls}}\\n \u003C/div>\\n \u003C/div>\\n \u003C/div>\\n\u003C/$reveal>\\n\\n\"\n }\n }\n}","bag":"default","revision":"0","version":"1.4.1","type":"application/json","title":"$:/themes/nico/notebook","source":"https://github.com/NicolasPetton/Notebook","plugin-type":"theme","name":"Notebook theme","list":"LICENSE changelog","description":"A clean, uncluttered TiddlyWiki theme","dependents":"$:/themes/tiddlywiki/vanilla $:/plugins/nico/notebook-mobile","core-version":">=5.1.22","author":"NicolasPetton"}, {"created":"20200429144554294","title":"$:/themes/nico/notebook/metrics/sidebar-width","modified":"20230423163514560","tags":"","type":"text/vnd.tiddlywiki","text":"300px"}, @@ -731,7 +731,7 @@ Error message and password prompt {"created":"20230423163505037","title":"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint","text":"600px","modified":"20230423164234376"}, {"created":"20230423164459179","title":"$:/view","text":"zoomin","modified":"20230427151401818"}, {"created":"20230426064525527","text":"\n\u003C!-- aframe v1.4.0 -->\n\u003Cscript>\n/*! For license information please see aframe.min.js.LICENSE.txt */\n!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.AFRAME=t():e.AFRAME=t()}(self,(()=>(()=>{var e={651:()=>{!function(){\"use strict\";var e=function(e,t){var n=function(e){for(var t=0,n=e.length;t\u003Cn;t++)i(e[t])},i=function(e){var t=e.target,n=e.attributeName,i=e.oldValue;t.attributeChangedCallback(n,i,t.getAttribute(n))};return function(r,s){var o=r.constructor.observedAttributes;return o&&e(s).then((function(){new t(n).observe(r,{attributes:!0,attributeOldValue:!0,attributeFilter:o});for(var e=0,s=o.length;e\u003Cs;e++)r.hasAttribute(o[e])&&i({target:r,attributeName:o[e],oldValue:null})})),r}};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n\u003Ct;n++)i[n]=e[n];return i}function n(e,n){var i=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!i){if(Array.isArray(e)||(i=function(e,n){if(e){if(\"string\"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===i&&e.constructor&&(i=e.constructor.name),\"Map\"===i||\"Set\"===i?Array.from(e):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(e))||n&&e&&\"number\"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var o,a=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}var i=!0,r=!1,s=\"querySelectorAll\",o=\"querySelectorAll\",a=self,l=a.document,c=a.Element,h=a.MutationObserver,u=a.Set,d=a.WeakMap,p=function(e){return o in e},A=[].filter,f=function(e){var t=new d,a=function(n,i){var r;if(i)for(var s,o=function(e){return e.matches||e.webkitMatchesSelector||e.msMatchesSelector}(n),a=0,l=m.length;a\u003Cl;a++)o.call(n,s=m[a])&&(t.has(n)||t.set(n,new u),(r=t.get(n)).has(s)||(r.add(s),e.handle(n,i,s)));else t.has(n)&&(r=t.get(n),t.delete(n),r.forEach((function(t){e.handle(n,i,t)})))},f=function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=0,i=e.length;n\u003Ci;n++)a(e[n],t)},m=e.query,g=e.root||l,v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:MutationObserver,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[\"*\"],l=function t(r,o,a,l,c,h){var u,d=n(r);try{for(d.s();!(u=d.n()).done;){var p=u.value;(h||s in p)&&(c?a.has(p)||(a.add(p),l.delete(p),e(p,c)):l.has(p)||(l.add(p),a.delete(p),e(p,c)),h||t(p[s](o),o,a,l,c,i))}}catch(e){d.e(e)}finally{d.f()}},c=new o((function(e){if(a.length){var t,s=a.join(\",\"),o=new Set,c=new Set,h=n(e);try{for(h.s();!(t=h.n()).done;){var u=t.value,d=u.addedNodes,p=u.removedNodes;l(p,s,o,c,r,r),l(d,s,o,c,i,r)}}catch(e){h.e(e)}finally{h.f()}}})),h=c.observe;return(c.observe=function(e){return h.call(c,e,{subtree:i,childList:i})})(t),c}(a,g,h,m),y=c.prototype.attachShadow;return y&&(c.prototype.attachShadow=function(e){var t=y.call(this,e);return v.observe(t),t}),m.length&&f(g[o](m)),{drop:function(e){for(var n=0,i=e.length;n\u003Ci;n++)t.delete(e[n])},flush:function(){for(var e=v.takeRecords(),t=0,n=e.length;t\u003Cn;t++)f(A.call(e[t].removedNodes,p),!1),f(A.call(e[t].addedNodes,p),!0)},observer:v,parse:f}},m=self,g=m.document,v=m.Map,y=m.MutationObserver,E=m.Object,b=m.Set,x=m.WeakMap,w=m.Element,C=m.HTMLElement,M=m.Node,_=m.Error,I=m.TypeError,B=m.Reflect,S=E.defineProperty,T=E.keys,L=E.getOwnPropertyNames,D=E.setPrototypeOf,R=!self.customElements,P=function(e){for(var t=T(e),n=[],i=t.length,r=0;r\u003Ci;r++)n[r]=e[t[r]],delete e[t[r]];return function(){for(var r=0;r\u003Ci;r++)e[t[r]]=n[r]}};if(R){var k=function(){var e=this.constructor;if(!O.has(e))throw new I(\"Illegal constructor\");var t=O.get(e);if(H)return W(H,t);var n=F.call(g,t);return W(D(n,e.prototype),t)},F=g.createElement,O=new v,Q=new v,U=new v,N=new v,G=[],z=f({query:G,handle:function(e,t,n){var i=U.get(n);if(t&&!i.isPrototypeOf(e)){var r=P(e);H=D(e,i);try{new i.constructor}finally{H=null,r()}}var s=\"\".concat(t?\"\":\"dis\",\"connectedCallback\");s in i&&e[s]()}}).parse,H=null,V=function(e){if(!Q.has(e)){var t,n=new Promise((function(e){t=e}));Q.set(e,{$:n,_:t})}return Q.get(e).$},W=e(V,y);S(self,\"customElements\",{configurable:!0,value:{define:function(e,t){if(N.has(e))throw new _('the name \"'.concat(e,'\" has already been used with this registry'));O.set(t,e),U.set(e,t.prototype),N.set(e,t),G.push(e),V(e).then((function(){z(g.querySelectorAll(e))})),Q.get(e)._(t)},get:function(e){return N.get(e)},whenDefined:V}}),S(k.prototype=C.prototype,\"constructor\",{value:k}),S(self,\"HTMLElement\",{configurable:!0,value:k}),S(g,\"createElement\",{configurable:!0,value:function(e,t){var n=t&&t.is,i=n?N.get(n):N.get(e);return i?new i:F.call(g,e)}}),\"isConnected\"in M.prototype||S(M.prototype,\"isConnected\",{configurable:!0,get:function(){return!(this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}else if(R=!self.customElements.get(\"extends-li\"))try{var j=function e(){return self.Reflect.construct(HTMLLIElement,[],e)};j.prototype=HTMLLIElement.prototype;var q=\"extends-li\";self.customElements.define(\"extends-li\",j,{extends:\"li\"}),R=g.createElement(\"li\",{is:q}).outerHTML.indexOf(q)\u003C0;var Y=self.customElements,X=Y.get,J=Y.whenDefined;S(self.customElements,\"whenDefined\",{configurable:!0,value:function(e){var t=this;return J.call(this,e).then((function(n){return n||X.call(t,e)}))}})}catch(e){}if(R){var K=function(e){var t=se.get(e);Ae(t.querySelectorAll(this),e.isConnected)},Z=self.customElements,$=g.createElement,ee=Z.define,te=Z.get,ne=Z.upgrade,ie=B||{construct:function(e){return e.call(this)}},re=ie.construct,se=new x,oe=new b,ae=new v,le=new v,ce=new v,he=new v,ue=[],de=[],pe=function(e){return he.get(e)||te.call(Z,e)},Ae=f({query:de,handle:function(e,t,n){var i=ce.get(n);if(t&&!i.isPrototypeOf(e)){var r=P(e);ye=D(e,i);try{new i.constructor}finally{ye=null,r()}}var s=\"\".concat(t?\"\":\"dis\",\"connectedCallback\");s in i&&e[s]()}}).parse,fe=f({query:ue,handle:function(e,t){se.has(e)&&(t?oe.add(e):oe.delete(e),de.length&&K.call(de,e))}}).parse,me=w.prototype.attachShadow;me&&(w.prototype.attachShadow=function(e){var t=me.call(this,e);return se.set(this,t),t});var ge=function(e){if(!le.has(e)){var t,n=new Promise((function(e){t=e}));le.set(e,{$:n,_:t})}return le.get(e).$},ve=e(ge,y),ye=null;L(self).filter((function(e){return/^HTML.*Element$/.test(e)})).forEach((function(e){var t=self[e];function n(){var e=this.constructor;if(!ae.has(e))throw new I(\"Illegal constructor\");var n=ae.get(e),i=n.is,r=n.tag;if(i){if(ye)return ve(ye,i);var s=$.call(g,r);return s.setAttribute(\"is\",i),ve(D(s,e.prototype),i)}return re.call(this,t,[],e)}S(n.prototype=t.prototype,\"constructor\",{value:n}),S(self,e,{value:n})})),S(g,\"createElement\",{configurable:!0,value:function(e,t){var n=t&&t.is;if(n){var i=he.get(n);if(i&&ae.get(i).tag===e)return new i}var r=$.call(g,e);return n&&r.setAttribute(\"is\",n),r}}),S(Z,\"get\",{configurable:!0,value:pe}),S(Z,\"whenDefined\",{configurable:!0,value:ge}),S(Z,\"upgrade\",{configurable:!0,value:function(e){var t=e.getAttribute(\"is\");if(t){var n=he.get(t);if(n)return void ve(D(e,n.prototype),t)}ne.call(Z,e)}}),S(Z,\"define\",{configurable:!0,value:function(e,t,n){if(pe(e))throw new _(\"'\".concat(e,\"' has already been defined as a custom element\"));var i,r=n&&n.extends;ae.set(t,r?{is:e,tag:r}:{is:\"\",tag:e}),r?(i=\"\".concat(r,'[is=\"').concat(e,'\"]'),ce.set(i,t.prototype),he.set(e,t),de.push(i)):(ee.apply(Z,arguments),ue.push(i=e)),ge(e).then((function(){r?(Ae(g.querySelectorAll(i)),oe.forEach(K,[i])):fe(g.querySelectorAll(i))})),le.get(e)._(t)}})}}()},6793:e=>{var t=Object.prototype.toString;e.exports=function(e){return e.BYTES_PER_ELEMENT&&\"[object ArrayBuffer]\"===t.call(e.buffer)||Array.isArray(e)}},3205:e=>{e.exports=function(e,t){return\"number\"==typeof e?e:\"number\"==typeof t?t:0}},6717:(e,t)=>{\"use strict\";t.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,s=l(e),o=s[0],a=s[1],c=new r(function(e,t,n){return 3*(t+n)/4-n}(0,o,a)),h=0,u=a>0?o-4:o;for(n=0;n\u003Cu;n+=4)t=i[e.charCodeAt(n)]\u003C\u003C18|i[e.charCodeAt(n+1)]\u003C\u003C12|i[e.charCodeAt(n+2)]\u003C\u003C6|i[e.charCodeAt(n+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]\u003C\u003C2|i[e.charCodeAt(n+1)]>>4,c[h++]=255&t),1===a&&(t=i[e.charCodeAt(n)]\u003C\u003C10|i[e.charCodeAt(n+1)]\u003C\u003C4|i[e.charCodeAt(n+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},t.fromByteArray=function(e){for(var t,i=e.length,r=i%3,s=[],o=16383,a=0,l=i-r;a\u003Cl;a+=o)s.push(c(e,a,a+o>l?l:a+o));return 1===r?(t=e[i-1],s.push(n[t>>2]+n[t\u003C\u003C4&63]+\"==\")):2===r&&(t=(e[i-2]\u003C\u003C8)+e[i-1],s.push(n[t>>10]+n[t>>4&63]+n[t\u003C\u003C2&63]+\"=\")),s.join(\"\")};for(var n=[],i=[],r=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",o=0,a=s.length;o\u003Ca;++o)n[o]=s[o],i[s.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var n=e.indexOf(\"=\");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,i){for(var r,s,o=[],a=t;a\u003Ci;a+=3)r=(e[a]\u003C\u003C16&16711680)+(e[a+1]\u003C\u003C8&65280)+(255&e[a+2]),o.push(n[(s=r)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},5286:(e,t,n)=>{var i=n(5851).lW;e.exports=function(e,t){if(i.isBuffer(e)&&i.isBuffer(t)){if(\"function\"==typeof e.equals)return e.equals(t);if(e.length!==t.length)return!1;for(var n=0;n\u003Ce.length;n++)if(e[n]!==t[n])return!1;return!0}}},5851:(e,t,n)=>{\"use strict\";const i=n(6717),r=n(9350),s=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.lW=l,t.h2=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return u(e)}return c(e,t,n)}function c(e,t,n){if(\"string\"==typeof e)return function(e,t){if(\"string\"==typeof t&&\"\"!==t||(t=\"utf8\"),!l.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const n=0|f(e,t);let i=a(n);const r=i.write(e,t);return r!==n&&(i=i.slice(0,r)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,n);if(\"undefined\"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,n);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return l.from(i,t,n);const r=function(e){if(l.isBuffer(e)){const t=0|A(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?\"number\"!=typeof e.length||J(e.length)?a(0):d(e):\"Buffer\"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(r)return r;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive](\"string\"),t,n);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function h(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e\u003C0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function u(e){return h(e),a(e\u003C0?0:0|A(e))}function d(e){const t=e.length\u003C0?0:0|A(e.length),n=a(t);for(let i=0;i\u003Ct;i+=1)n[i]=255&e[i];return n}function p(e,t,n){if(t\u003C0||e.byteLength\u003Ct)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength\u003Ct+(n||0))throw new RangeError('\"length\" is outside of buffer bounds');let i;return i=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(i,l.prototype),i}function A(e){if(e>=o)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+o.toString(16)+\" bytes\");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let r=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return n;case\"utf8\":case\"utf-8\":return j(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return q(e).length;default:if(r)return i?-1:j(e).length;t=(\"\"+t).toLowerCase(),r=!0}}function m(e,t,n){let i=!1;if((void 0===t||t\u003C0)&&(t=0),t>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),n\u003C=0)return\"\";if((n>>>=0)\u003C=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return T(this,t,n);case\"utf8\":case\"utf-8\":return _(this,t,n);case\"ascii\":return B(this,t,n);case\"latin1\":case\"binary\":return S(this,t,n);case\"base64\":return M(this,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return L(this,t,n);default:if(i)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),i=!0}}function g(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function v(e,t,n,i,r){if(0===e.length)return-1;if(\"string\"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n\u003C-2147483648&&(n=-2147483648),J(n=+n)&&(n=r?0:e.length-1),n\u003C0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n\u003C0){if(!r)return-1;n=0}if(\"string\"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError(\"val must be string, number or Buffer\")}function y(e,t,n,i,r){let s,o=1,a=e.length,l=t.length;if(void 0!==i&&(\"ucs2\"===(i=String(i).toLowerCase())||\"ucs-2\"===i||\"utf16le\"===i||\"utf-16le\"===i)){if(e.length\u003C2||t.length\u003C2)return-1;o=2,a/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){let i=-1;for(s=n;s\u003Ca;s++)if(c(e,s)===c(t,-1===i?0:s-i)){if(-1===i&&(i=s),s-i+1===l)return i*o}else-1!==i&&(s-=s-i),i=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){let n=!0;for(let i=0;i\u003Cl;i++)if(c(e,s+i)!==c(t,i)){n=!1;break}if(n)return s}return-1}function E(e,t,n,i){n=Number(n)||0;const r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;const s=t.length;let o;for(i>s/2&&(i=s/2),o=0;o\u003Ci;++o){const i=parseInt(t.substr(2*o,2),16);if(J(i))return o;e[n+o]=i}return o}function b(e,t,n,i){return Y(j(t,e.length-n),e,n,i)}function x(e,t,n,i){return Y(function(e){const t=[];for(let n=0;n\u003Ce.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function w(e,t,n,i){return Y(q(t),e,n,i)}function C(e,t,n,i){return Y(function(e,t){let n,i,r;const s=[];for(let o=0;o\u003Ce.length&&!((t-=2)\u003C0);++o)n=e.charCodeAt(o),i=n>>8,r=n%256,s.push(r),s.push(i);return s}(t,e.length-n),e,n,i)}function M(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);const i=[];let r=t;for(;r\u003Cn;){const t=e[r];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(r+o\u003C=n){let n,i,a,l;switch(o){case 1:t\u003C128&&(s=t);break;case 2:n=e[r+1],128==(192&n)&&(l=(31&t)\u003C\u003C6|63&n,l>127&&(s=l));break;case 3:n=e[r+1],i=e[r+2],128==(192&n)&&128==(192&i)&&(l=(15&t)\u003C\u003C12|(63&n)\u003C\u003C6|63&i,l>2047&&(l\u003C55296||l>57343)&&(s=l));break;case 4:n=e[r+1],i=e[r+2],a=e[r+3],128==(192&n)&&128==(192&i)&&128==(192&a)&&(l=(15&t)\u003C\u003C18|(63&n)\u003C\u003C12|(63&i)\u003C\u003C6|63&a,l>65535&&l\u003C1114112&&(s=l))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),r+=o}return function(e){const t=e.length;if(t\u003C=I)return String.fromCharCode.apply(String,e);let n=\"\",i=0;for(;i\u003Ct;)n+=String.fromCharCode.apply(String,e.slice(i,i+=I));return n}(i)}l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(l.prototype,\"parent\",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,\"offset\",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n){return h(e),e\u003C=0?a(e):void 0!==t?\"string\"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let r=0,s=Math.min(n,i);r\u003Cs;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n\u003Ci?-1:i\u003Cn?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let n;if(void 0===t)for(t=0,n=0;n\u003Ce.length;++n)t+=e[n].length;const i=l.allocUnsafe(t);let r=0;for(n=0;n\u003Ce.length;++n){let t=e[n];if(X(t,Uint8Array))r+t.length>i.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(i,r)):Uint8Array.prototype.set.call(i,t,r);else{if(!l.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(i,r)}r+=t.length}return i},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t\u003Ce;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t\u003Ce;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t\u003Ce;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?\"\":0===arguments.length?_(this,0,e):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e=\"\";const n=t.h2;return e=this.toString(\"hex\",0,n).replace(/(.{2})/g,\"$1 \").trim(),this.length>n&&(e+=\" ... \"),\"\u003CBuffer \"+e+\">\"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,n,i,r){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t\u003C0||n>e.length||i\u003C0||r>this.length)throw new RangeError(\"out of range index\");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(t>>>=0);const a=Math.min(s,o),c=this.slice(i,r),h=e.slice(t,n);for(let e=0;e\u003Ca;++e)if(c[e]!==h[e]){s=c[e],o=h[e];break}return s\u003Co?-1:o\u003Cs?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},l.prototype.write=function(e,t,n,i){if(void 0===t)i=\"utf8\",n=this.length,t=0;else if(void 0===n&&\"string\"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i=\"utf8\")):(i=n,n=void 0)}const r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n\u003C0||t\u003C0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");let s=!1;for(;;)switch(i){case\"hex\":return E(this,e,t,n);case\"utf8\":case\"utf-8\":return b(this,e,t,n);case\"ascii\":case\"latin1\":case\"binary\":return x(this,e,t,n);case\"base64\":return w(this,e,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return C(this,e,t,n);default:if(s)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function B(e,t,n){let i=\"\";n=Math.min(e.length,n);for(let r=t;r\u003Cn;++r)i+=String.fromCharCode(127&e[r]);return i}function S(e,t,n){let i=\"\";n=Math.min(e.length,n);for(let r=t;r\u003Cn;++r)i+=String.fromCharCode(e[r]);return i}function T(e,t,n){const i=e.length;(!t||t\u003C0)&&(t=0),(!n||n\u003C0||n>i)&&(n=i);let r=\"\";for(let i=t;i\u003Cn;++i)r+=K[e[i]];return r}function L(e,t,n){const i=e.slice(t,n);let r=\"\";for(let e=0;e\u003Ci.length-1;e+=2)r+=String.fromCharCode(i[e]+256*i[e+1]);return r}function D(e,t,n){if(e%1!=0||e\u003C0)throw new RangeError(\"offset is not uint\");if(e+t>n)throw new RangeError(\"Trying to access beyond buffer length\")}function R(e,t,n,i,r,s){if(!l.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>r||t\u003Cs)throw new RangeError('\"value\" argument is out of bounds');if(n+i>e.length)throw new RangeError(\"Index out of range\")}function P(e,t,n,i,r){z(t,i,r,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function k(e,t,n,i,r){z(t,i,r,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function F(e,t,n,i,r,s){if(n+i>e.length)throw new RangeError(\"Index out of range\");if(n\u003C0)throw new RangeError(\"Index out of range\")}function O(e,t,n,i,s){return t=+t,n>>>=0,s||F(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function Q(e,t,n,i,s){return t=+t,n>>>=0,s||F(e,0,n,8),r.write(e,t,n,i,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)\u003C0?(e+=n)\u003C0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)\u003C0?(t+=n)\u003C0&&(t=0):t>n&&(t=n),t\u003Ce&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,l.prototype),i},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let i=this[e],r=1,s=0;for(;++s\u003Ct&&(r*=256);)i+=this[e+s]*r;return i},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let i=this[e+--t],r=1;for(;t>0&&(r*=256);)i+=this[e+--t]*r;return i},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]\u003C\u003C8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]\u003C\u003C8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]\u003C\u003C8|this[e+2]\u003C\u003C16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]\u003C\u003C16|this[e+2]\u003C\u003C8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){H(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(i)+(BigInt(r)\u003C\u003CBigInt(32))})),l.prototype.readBigUInt64BE=Z((function(e){H(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(i)\u003C\u003CBigInt(32))+BigInt(r)})),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let i=this[e],r=1,s=0;for(;++s\u003Ct&&(r*=256);)i+=this[e+s]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let i=t,r=1,s=this[e+--i];for(;i>0&&(r*=256);)s+=this[e+--i]*r;return r*=128,s>=r&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const n=this[e]|this[e+1]\u003C\u003C8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const n=this[e+1]|this[e]\u003C\u003C8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]\u003C\u003C8|this[e+2]\u003C\u003C16|this[e+3]\u003C\u003C24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]\u003C\u003C24|this[e+1]\u003C\u003C16|this[e+2]\u003C\u003C8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){H(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(n\u003C\u003C24);return(BigInt(i)\u003C\u003CBigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Z((function(e){H(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const i=(t\u003C\u003C24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)\u003C\u003CBigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||R(this,e,t,n,Math.pow(2,8*n)-1,0);let r=1,s=0;for(this[t]=255&e;++s\u003Cn&&(r*=256);)this[t+s]=e/r&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||R(this,e,t,n,Math.pow(2,8*n)-1,0);let r=n-1,s=1;for(this[t+r]=255&e;--r>=0&&(s*=256);)this[t+r]=e/s&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return P(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return k(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),l.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}let r=0,s=1,o=0;for(this[t]=255&e;++r\u003Cn&&(s*=256);)e\u003C0&&0===o&&0!==this[t+r-1]&&(o=1),this[t+r]=(e/s>>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}let r=n-1,s=1,o=0;for(this[t+r]=255&e;--r>=0&&(s*=256);)e\u003C0&&0===o&&0!==this[t+r+1]&&(o=1),this[t+r]=(e/s>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e\u003C0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e\u003C0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return P(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return k(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),l.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return Q(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return Q(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,i){if(!l.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i\u003Cn&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t\u003C0)throw new RangeError(\"targetStart out of bounds\");if(n\u003C0||n>=this.length)throw new RangeError(\"Index out of range\");if(i\u003C0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),e.length-t\u003Ci-n&&(i=e.length-t+n);const r=i-n;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),r},l.prototype.fill=function(e,t,n,i){if(\"string\"==typeof e){if(\"string\"==typeof t?(i=t,t=0,n=this.length):\"string\"==typeof n&&(i=n,n=this.length),void 0!==i&&\"string\"!=typeof i)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof i&&!l.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===i&&t\u003C128||\"latin1\"===i)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t\u003C0||this.length\u003Ct||this.length\u003Cn)throw new RangeError(\"Out of range index\");if(n\u003C=t)return this;let r;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),\"number\"==typeof e)for(r=t;r\u003Cn;++r)this[r]=e;else{const s=l.isBuffer(e)?e:l.from(e,i),o=s.length;if(0===o)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(r=0;r\u003Cn-t;++r)this[r+t]=s[r%o]}return this};const U={};function N(e,t,n){U[e]=class extends n{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t=\"\",n=e.length;const i=\"-\"===e[0]?1:0;for(;n>=i+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function z(e,t,n,i,r,s){if(e>n||e\u003Ct){const i=\"bigint\"==typeof t?\"n\":\"\";let r;throw r=s>3?0===t||t===BigInt(0)?`>= 0${i} and \u003C 2${i} ** ${8*(s+1)}${i}`:`>= -(2${i} ** ${8*(s+1)-1}${i}) and \u003C 2 ** ${8*(s+1)-1}${i}`:`>= ${t}${i} and \u003C= ${n}${i}`,new U.ERR_OUT_OF_RANGE(\"value\",r,e)}!function(e,t,n){H(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+n]||V(t,e.length-(n+1))}(i,r,s)}function H(e,t){if(\"number\"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function V(e,t,n){if(Math.floor(e)!==e)throw H(e,n),new U.ERR_OUT_OF_RANGE(n||\"offset\",\"an integer\",e);if(t\u003C0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||\"offset\",`>= ${n?1:0} and \u003C= ${t}`,e)}N(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),N(\"ERR_INVALID_ARG_TYPE\",(function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`}),TypeError),N(\"ERR_OUT_OF_RANGE\",(function(e,t,n){let i=`The value of \"${e}\" is out of range.`,r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=G(String(n)):\"bigint\"==typeof n&&(r=String(n),(n>BigInt(2)**BigInt(32)||n\u003C-(BigInt(2)**BigInt(32)))&&(r=G(r)),r+=\"n\"),i+=` It must be ${t}. Received ${r}`,i}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function j(e,t){let n;t=t||1/0;const i=e.length;let r=null;const s=[];for(let o=0;o\u003Ci;++o){if(n=e.charCodeAt(o),n>55295&&n\u003C57344){if(!r){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&s.push(239,191,189);continue}r=n;continue}if(n\u003C56320){(t-=3)>-1&&s.push(239,191,189),r=n;continue}n=65536+(r-55296\u003C\u003C10|n-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,n\u003C128){if((t-=1)\u003C0)break;s.push(n)}else if(n\u003C2048){if((t-=2)\u003C0)break;s.push(n>>6|192,63&n|128)}else if(n\u003C65536){if((t-=3)\u003C0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n\u003C1114112))throw new Error(\"Invalid code point\");if((t-=4)\u003C0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(e){return i.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(W,\"\")).length\u003C2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function Y(e,t,n,i){let r;for(r=0;r\u003Ci&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const K=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let n=0;n\u003C16;++n){const i=16*n;for(let r=0;r\u003C16;++r)t[i+r]=e[n]+e[r]}return t}();function Z(e){return\"undefined\"==typeof BigInt?$:e}function $(){throw new Error(\"BigInt not supported\")}},7705:e=>{\"use strict\";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=\"\",i=void 0!==t[5];return t[4]&&(n+=\"@supports (\".concat(t[4],\") {\")),t[2]&&(n+=\"@media \".concat(t[2],\" {\")),i&&(n+=\"@layer\".concat(t[5].length>0?\" \".concat(t[5]):\"\",\" {\")),n+=e(t),i&&(n+=\"}\"),t[2]&&(n+=\"}\"),t[4]&&(n+=\"}\"),n})).join(\"\")},t.i=function(e,n,i,r,s){\"string\"==typeof e&&(e=[[null,e,void 0]]);var o={};if(i)for(var a=0;a\u003Cthis.length;a++){var l=this[a][0];null!=l&&(o[l]=!0)}for(var c=0;c\u003Ce.length;c++){var h=[].concat(e[c]);i&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]=\"@layer\".concat(h[5].length>0?\" \".concat(h[5]):\"\",\" {\").concat(h[1],\"}\")),h[5]=s),n&&(h[2]?(h[1]=\"@media \".concat(h[2],\" {\").concat(h[1],\"}\"),h[2]=n):h[2]=n),r&&(h[4]?(h[1]=\"@supports (\".concat(h[4],\") {\").concat(h[1],\"}\"),h[4]=r):h[4]=\"\".concat(r)),t.push(h))}},t}},6742:e=>{\"use strict\";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['\"].*['\"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/[\"'() \\t\\n]|(%20)/.test(e)||t.needQuotes?'\"'.concat(e.replace(/\"/g,'\\\\\"').replace(/\\n/g,\"\\\\n\"),'\"'):e):e}},4216:e=>{\"use strict\";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if(\"function\"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r=\"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(i),s=\"/*# \".concat(r,\" */\");return[t].concat([s]).join(\"\\n\")}return[t].join(\"\\n\")}},7464:()=>{!function(){if(\"undefined\"!=typeof window)try{var e=new window.CustomEvent(\"test\",{cancelable:!0});if(e.preventDefault(),!0!==e.defaultPrevented)throw new Error(\"Could not prevent default\")}catch(e){var t=function(e,t){var n,i;return(t=t||{}).bubbles=!!t.bubbles,t.cancelable=!!t.cancelable,(n=document.createEvent(\"CustomEvent\")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i=n.preventDefault,n.preventDefault=function(){i.call(this);try{Object.defineProperty(this,\"defaultPrevented\",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};t.prototype=window.Event.prototype,window.CustomEvent=t}}()},695:(e,t,n)=>{function i(){var e;try{e=t.storage.debug}catch(e){}return e}(t=e.exports=n(4569)).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(){var e=arguments,t=this.useColors;if(e[0]=(t?\"%c\":\"\")+this.namespace+(t?\" %c\":\" \")+e[0]+(t?\"%c \":\" \"),!t)return e;var n=\"color: \"+this.color;e=[e[0],n,\"color: inherit\"].concat(Array.prototype.slice.call(e,1));var i=0,r=0;return e[0].replace(/%[a-z%]/g,(function(e){\"%%\"!==e&&(i++,\"%c\"===e&&(r=i))})),e.splice(r,0,n),e},t.save=function(e){try{null==e?t.storage.removeItem(\"debug\"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){return\"WebkitAppearance\"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31},t.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(i())},4569:(e,t)=>{(t=e.exports=function(e){function n(){}function r(){var e=r;null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=i());var n=Array.prototype.slice.call(arguments);n[0]=t.coerce(n[0]),\"string\"!=typeof n[0]&&(n=[\"%o\"].concat(n));var s=0;n[0]=n[0].replace(/%([a-z%])/g,(function(i,r){if(\"%%\"===i)return i;s++;var o=t.formatters[r];if(\"function\"==typeof o){var a=n[s];i=o.call(e,a),n.splice(s,1),s--}return i})),\"function\"==typeof t.formatArgs&&(n=t.formatArgs.apply(e,n));var o=r.log||t.log||console.log.bind(console);o.apply(e,n)}n.enabled=!1,r.enabled=!0;var s=t.enabled(e)?r:n;return s.namespace=e,s}).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable(\"\")},t.enable=function(e){t.save(e);for(var n=(e||\"\").split(/[\\s,]+/),i=n.length,r=0;r\u003Ci;r++)n[r]&&(\"-\"===(e=n[r].replace(/\\*/g,\".*?\"))[0]?t.skips.push(new RegExp(\"^\"+e.substr(1)+\"$\")):t.names.push(new RegExp(\"^\"+e+\"$\")))},t.enabled=function(e){var n,i;for(n=0,i=t.skips.length;n\u003Ci;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n\u003Ci;n++)if(t.names[n].test(e))return!0;return!1},t.names=[],t.skips=[],t.formatters={};var n=0;function i(){return t.colors[n++%t.colors.length]}},1900:(e,t,n)=>{\"use strict\";var i=n(445),r=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError(\"Sources cannot be null or undefined\");return Object(e)}function a(e,t,n){var s=t[n];if(null!=s){if(r.call(e,n)&&(void 0===e[n]||null===e[n]))throw new TypeError(\"Cannot convert undefined or null to object (\"+n+\")\");r.call(e,n)&&i(s)?e[n]=l(Object(e[n]),t[n]):e[n]=s}}function l(e,t){if(e===t)return e;for(var n in t=Object(t))r.call(t,n)&&a(e,t,n);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),o=0;o\u003Ci.length;o++)s.call(t,i[o])&&a(e,t,i[o]);return e}e.exports=function(e){e=o(e);for(var t=1;t\u003Carguments.length;t++)l(e,arguments[t]);return e}},4666:e=>{e.exports=function(e){switch(e){case\"int8\":return Int8Array;case\"int16\":return Int16Array;case\"int32\":return Int32Array;case\"uint8\":return Uint8Array;case\"uint16\":return Uint16Array;case\"uint32\":return Uint32Array;case\"float32\":return Float32Array;case\"float64\":return Float64Array;case\"array\":return Array;case\"uint8_clamped\":return Uint8ClampedArray}}},9651:(e,t,n)=>{var i=n(4666);e.exports=function(e,t,n){if(!e)throw new TypeError(\"must specify data as first parameter\");if(n=0|+(n||0),Array.isArray(e)&&e[0]&&\"number\"==typeof e[0][0]){var r,s,o,a,l=e[0].length,c=e.length*l;t&&\"string\"!=typeof t||(t=new(i(t||\"float32\"))(c+n));var h=t.length-n;if(c!==h)throw new Error(\"source length \"+c+\" (\"+l+\"x\"+e.length+\") does not match destination length \"+h);for(r=0,o=n;r\u003Ce.length;r++)for(s=0;s\u003Cl;s++)t[o++]=null===e[r][s]?NaN:e[r][s]}else if(t&&\"string\"!=typeof t)t.set(e,n);else{var u=i(t||\"float32\");if(Array.isArray(e)||\"array\"===t)for(r=0,o=n,a=(t=new u(e.length+n)).length;o\u003Ca;o++,r++)t[o]=null===e[r]?NaN:e[r];else 0===n?t=new u(e):(t=new u(e.length+n)).set(e,n)}return t}},1192:(e,t,n)=>{var i;i=\"undefined\"!=typeof window?window:void 0!==n.g?n.g:\"undefined\"!=typeof self?self:{},e.exports=i},9350:(e,t)=>{t.read=function(e,t,n,i,r){var s,o,a=8*r-i-1,l=(1\u003C\u003Ca)-1,c=l>>1,h=-7,u=n?r-1:0,d=n?-1:1,p=e[t+u];for(u+=d,s=p&(1\u003C\u003C-h)-1,p>>=-h,h+=a;h>0;s=256*s+e[t+u],u+=d,h-=8);for(o=s&(1\u003C\u003C-h)-1,s>>=-h,h+=i;h>0;o=256*o+e[t+u],u+=d,h-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),s-=c}return(p?-1:1)*o*Math.pow(2,s-i)},t.write=function(e,t,n,i,r,s){var o,a,l,c=8*s-r-1,h=(1\u003C\u003Cc)-1,u=h>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,A=i?1:-1,f=t\u003C0||0===t&&1/t\u003C0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))\u003C1&&(o--,l*=2),(t+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=h?(a=0,o=h):o+u>=1?(a=(t*l-1)*Math.pow(2,r),o+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,r),o=0));r>=8;e[n+p]=255&a,p+=A,a/=256,r-=8);for(o=o\u003C\u003Cr|a,c+=r;c>0;e[n+p]=255&o,p+=A,o/=256,c-=8);e[n+p-A]|=128*f}},5153:e=>{\"function\"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1826:e=>{function t(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return\"function\"==typeof e.readFloatLE&&\"function\"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},6534:e=>{e.exports=function(e){if(!e)return!1;var n=t.call(e);return\"[object Function]\"===n||\"function\"==typeof e&&\"[object RegExp]\"!==n||\"undefined\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},445:e=>{\"use strict\";e.exports=function(e){var t=typeof e;return null!==e&&(\"object\"===t||\"function\"===t)}},7510:(e,t,n)=>{var i=n(9443),r=n(2786),s=n(3205),o=[\"x\",\"e\",\"a\",\"o\",\"n\",\"s\",\"r\",\"c\",\"u\",\"m\",\"v\",\"w\",\"z\"],a=[\"m\",\"w\"],l=[\"H\",\"I\",\"N\",\"E\",\"F\",\"K\",\"L\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\"],c=\"\\t\".charCodeAt(0),h=\" \".charCodeAt(0);function u(e){this.glyphs=[],this._measure=this.computeMetrics.bind(this),this.update(e)}function d(e){return new Function([\"return function \"+e+\"() {\",\" return this._\"+e,\"}\"].join(\"\\n\"))()}function p(e,t){if(!e.chars||0===e.chars.length)return null;var n=f(e.chars,t);return n>=0?e.chars[n]:null}function A(e,t,n){if(!e.kernings||0===e.kernings.length)return 0;for(var i=e.kernings,r=0;r\u003Ci.length;r++){var s=i[r];if(s.first===t&&s.second===n)return s.amount}return 0}function f(e,t,n){for(var i=n=n||0;i\u003Ce.length;i++)if(e[i].id===t)return i;return-1}e.exports=function(e){return new u(e)},u.prototype.update=function(e){if(e=r({measure:this._measure},e),this._opt=e,this._opt.tabSize=s(this._opt.tabSize,4),!e.font)throw new Error(\"must provide a valid bitmap font\");var t=this.glyphs,n=e.text||\"\",a=e.font;this._setupSpaceGlyphs(a);var c=i.lines(n,e),h=e.width||0;t.length=0;var u=c.reduce((function(e,t){return Math.max(e,t.width,h)}),0),d=0,p=0,m=s(e.lineHeight,a.common.lineHeight),g=a.common.base,v=m-g,y=e.letterSpacing||0,E=m*c.length-v,b=function(e){return\"center\"===e?1:\"right\"===e?2:0}(this._opt.align);p-=E,this._width=u,this._height=E,this._descender=m-g,this._baseline=g,this._xHeight=function(e){for(var t=0;t\u003Co.length;t++){var n=o[t].charCodeAt(0),i=f(e.chars,n);if(i>=0)return e.chars[i].height}return 0}(a),this._capHeight=function(e){for(var t=0;t\u003Cl.length;t++){var n=l[t].charCodeAt(0),i=f(e.chars,n);if(i>=0)return e.chars[i].height}return 0}(a),this._lineHeight=m,this._ascender=m-v-this._xHeight;var x=this;c.forEach((function(e,i){for(var r,s=e.start,o=e.end,l=e.width,c=s;c\u003Co;c++){var h=n.charCodeAt(c),f=x.getGlyph(a,h);if(f){r&&(d+=A(a,r.id,f.id));var g=d;1===b?g+=(u-l)/2:2===b&&(g+=u-l),t.push({position:[g,p],data:f,index:c,line:i}),d+=f.xadvance+y,r=f}}p+=m,d=0})),this._linesTotal=c.length},u.prototype._setupSpaceGlyphs=function(e){if(this._fallbackSpaceGlyph=null,this._fallbackTabGlyph=null,e.chars&&0!==e.chars.length){var t=p(e,h)||function(e){for(var t=0;t\u003Ca.length;t++){var n=a[t].charCodeAt(0),i=f(e.chars,n);if(i>=0)return e.chars[i]}return 0}(e)||e.chars[0],n=this._opt.tabSize*t.xadvance;this._fallbackSpaceGlyph=t,this._fallbackTabGlyph=r(t,{x:0,y:0,xadvance:n,id:c,xoffset:0,yoffset:0,width:0,height:0})}},u.prototype.getGlyph=function(e,t){return p(e,t)||(t===c?this._fallbackTabGlyph:t===h?this._fallbackSpaceGlyph:null)},u.prototype.computeMetrics=function(e,t,n,i){var r,s=this._opt.letterSpacing||0,o=this._opt.font,a=0,l=0,c=0;if(!o.chars||0===o.chars.length)return{start:t,end:t,width:0};n=Math.min(e.length,n);for(var h=t;h\u003Cn;h++){var u,d=e.charCodeAt(h);if(u=this.getGlyph(o,d)){u.xoffset;var p=(a+=r?A(o,r.id,u.id):0)+u.xadvance+s,f=a+u.width;if(f>=i||p>=i)break;a=p,l=f,r=u}c++}return r&&(l+=r.xoffset),{start:t,end:t+c,width:l}},[\"width\",\"height\",\"descender\",\"ascender\",\"xHeight\",\"baseline\",\"capHeight\",\"lineHeight\"].forEach((function(e){Object.defineProperty(u.prototype,e,{get:d(e),configurable:!0})}))},1880:(e,t,n)=>{var i=n(5851).lW,r=n(7377),s=function(){},o=n(5551),a=n(7096),l=n(1683),c=n(7804),h=n(2786),u=self.XMLHttpRequest&&\"withCredentials\"in new XMLHttpRequest;e.exports=function(e,t){t=\"function\"==typeof t?t:s,\"string\"==typeof e?e={uri:e}:e||(e={}),e.binary&&(e=function(e){if(u)return h(e,{responseType:\"arraybuffer\"});if(void 0===self.XMLHttpRequest)throw new Error(\"your browser does not support XHR loading\");var t=new self.XMLHttpRequest;return t.overrideMimeType(\"text/plain; charset=x-user-defined\"),h({xhr:t},e)}(e)),r(e,(function(n,r,h){if(n)return t(n);if(!/^2/.test(r.statusCode))return t(new Error(\"http status code: \"+r.statusCode));if(!h)return t(new Error(\"no body result\"));var u,d,p=!1;if(u=h,\"[object ArrayBuffer]\"===Object.prototype.toString.call(u)){var A=new Uint8Array(h);h=i.from(A,\"binary\")}c(h)&&(p=!0,\"string\"==typeof h&&(h=i.from(h,\"binary\"))),p||(i.isBuffer(h)&&(h=h.toString(e.encoding)),h=h.trim());try{var f=r.headers[\"content-type\"];d=p?l(h):/json/.test(f)||\"{\"===h.charAt(0)?JSON.parse(h):/xml/.test(f)||\"\u003C\"===h.charAt(0)?a(h):o(h)}catch(e){t(new Error(\"error parsing font \"+e.message)),t=s}t(null,d)}))}},7804:(e,t,n)=>{var i=n(5851).lW,r=n(5286),s=i.from([66,77,70,3]);e.exports=function(e){return\"string\"==typeof e?\"BMF\"===e.substring(0,3):e.length>4&&r(e.slice(0,4),s)}},7347:e=>{\"use strict\";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",\"5\"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n\u003C10;n++)t[\"_\"+String.fromCharCode(n)]=n;if(\"0123456789\"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(\"\"))return!1;var i={};return\"abcdefghijklmnopqrst\".split(\"\").forEach((function(e){i[e]=e})),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},i)).join(\"\")}catch(e){return!1}}()?Object.assign:function(e,s){for(var o,a,l=r(e),c=1;c\u003Carguments.length;c++){for(var h in o=Object(arguments[c]))n.call(o,h)&&(l[h]=o[h]);if(t){a=t(o);for(var u=0;u\u003Ca.length;u++)i.call(o,a[u])&&(l[a[u]]=o[a[u]])}}return l}},5551:e=>{function t(e,t){if(!(e=e.replace(/\\t+/g,\" \").trim()))return null;var i=e.indexOf(\" \");if(-1===i)throw new Error(\"no named row at line \"+t);var r=e.substring(0,i);e=(e=(e=(e=e.substring(i+1)).replace(/letter=[\\'\\\"]\\S+[\\'\\\"]/gi,\"\")).split(\"=\")).map((function(e){return e.trim().match(/(\".*?\"|[^\"\\s]+)+(?=\\s*|\\s*$)/g)}));for(var s=[],o=0;o\u003Ce.length;o++){var a=e[o];0===o?s.push({key:a[0],data:\"\"}):o===e.length-1?s[s.length-1].data=n(a[0]):(s[s.length-1].data=n(a[0]),s.push({key:a[1],data:\"\"}))}var l={key:r,data:{}};return s.forEach((function(e){l.data[e.key]=e.data})),l}function n(e){return e&&0!==e.length?0===e.indexOf('\"')||0===e.indexOf(\"'\")?e.substring(1,e.length-1):-1!==e.indexOf(\",\")?function(e){return e.split(\",\").map((function(e){return parseInt(e,10)}))}(e):parseInt(e,10):\"\"}e.exports=function(e){if(!e)throw new Error(\"no data provided\");var n={pages:[],chars:[],kernings:[]},i=(e=e.toString().trim()).split(/\\r\\n?|\\n/g);if(0===i.length)throw new Error(\"no data in BMFont file\");for(var r=0;r\u003Ci.length;r++){var s=t(i[r],r);if(s)if(\"page\"===s.key){if(\"number\"!=typeof s.data.id)throw new Error(\"malformed file at line \"+r+\" -- needs page id=N\");if(\"string\"!=typeof s.data.file)throw new Error(\"malformed file at line \"+r+' -- needs page file=\"path\"');n.pages[s.data.id]=s.data.file}else\"chars\"===s.key||\"kernings\"===s.key||(\"char\"===s.key?n.chars.push(s.data):\"kerning\"===s.key?n.kernings.push(s.data):n[s.key]=s.data)}return n}},1683:e=>{var t=[66,77,70];function n(e,t,n){if(n>t.length-1)return 0;var r=t.readUInt8(n++),s=t.readInt32LE(n);switch(n+=4,r){case 1:e.info=function(e,t){var n={};n.size=e.readInt16LE(t);var r=e.readUInt8(t+2);return n.smooth=r>>7&1,n.unicode=r>>6&1,n.italic=r>>5&1,n.bold=r>>4&1,r>>3&1&&(n.fixedHeight=1),n.charset=e.readUInt8(t+3)||\"\",n.stretchH=e.readUInt16LE(t+4),n.aa=e.readUInt8(t+6),n.padding=[e.readInt8(t+7),e.readInt8(t+8),e.readInt8(t+9),e.readInt8(t+10)],n.spacing=[e.readInt8(t+11),e.readInt8(t+12)],n.outline=e.readUInt8(t+13),n.face=function(e,t){return i(e,t).toString(\"utf8\")}(e,t+14),n}(t,n);break;case 2:e.common=function(e,t){var n={};return n.lineHeight=e.readUInt16LE(t),n.base=e.readUInt16LE(t+2),n.scaleW=e.readUInt16LE(t+4),n.scaleH=e.readUInt16LE(t+6),n.pages=e.readUInt16LE(t+8),e.readUInt8(t+10),n.packed=0,n.alphaChnl=e.readUInt8(t+11),n.redChnl=e.readUInt8(t+12),n.greenChnl=e.readUInt8(t+13),n.blueChnl=e.readUInt8(t+14),n}(t,n);break;case 3:e.pages=function(e,t,n){for(var r=[],s=i(e,t),o=s.length+1,a=n/o,l=0;l\u003Ca;l++)r[l]=e.slice(t,t+s.length).toString(\"utf8\"),t+=o;return r}(t,n,s);break;case 4:e.chars=function(e,t,n){for(var i=[],r=n/20,s=0;s\u003Cr;s++){var o={},a=20*s;o.id=e.readUInt32LE(t+0+a),o.x=e.readUInt16LE(t+4+a),o.y=e.readUInt16LE(t+6+a),o.width=e.readUInt16LE(t+8+a),o.height=e.readUInt16LE(t+10+a),o.xoffset=e.readInt16LE(t+12+a),o.yoffset=e.readInt16LE(t+14+a),o.xadvance=e.readInt16LE(t+16+a),o.page=e.readUInt8(t+18+a),o.chnl=e.readUInt8(t+19+a),i[s]=o}return i}(t,n,s);break;case 5:e.kernings=function(e,t,n){for(var i=[],r=n/10,s=0;s\u003Cr;s++){var o={},a=10*s;o.first=e.readUInt32LE(t+0+a),o.second=e.readUInt32LE(t+4+a),o.amount=e.readInt16LE(t+8+a),i[s]=o}return i}(t,n,s)}return 5+s}function i(e,t){for(var n=t;n\u003Ce.length&&0!==e[n];n++);return e.slice(t,n)}e.exports=function(e){if(e.length\u003C6)throw new Error(\"invalid buffer length for BMFont\");var i=t.every((function(t,n){return e.readUInt8(n)===t}));if(!i)throw new Error(\"BMFont missing BMF byte header\");var r=3;if(e.readUInt8(r++)>3)throw new Error(\"Only supports BMFont Binary v3 (BMFont App v1.10)\");for(var s={kernings:[],chars:[]},o=0;o\u003C5;o++)r+=n(s,e,r);return s}},7096:(e,t,n)=>{var i=n(3102),r=n(6774),s={scaleh:\"scaleH\",scalew:\"scaleW\",stretchh:\"stretchH\",lineheight:\"lineHeight\",alphachnl:\"alphaChnl\",redchnl:\"redChnl\",greenchnl:\"greenChnl\",bluechnl:\"blueChnl\"};function o(e){var t=function(e){for(var t=[],n=0;n\u003Ce.attributes.length;n++)t.push(e.attributes[n]);return t}(e);return t.reduce((function(e,t){var n;return e[(n=t.nodeName,s[n.toLowerCase()]||n)]=t.nodeValue,e}),{})}e.exports=function(e){e=e.toString();var t=r(e),n={pages:[],chars:[],kernings:[]};[\"info\",\"common\"].forEach((function(e){var r=t.getElementsByTagName(e)[0];r&&(n[e]=i(o(r)))}));var s=t.getElementsByTagName(\"pages\")[0];if(!s)throw new Error(\"malformed file -- no \u003Cpages> element\");for(var a=s.getElementsByTagName(\"page\"),l=0;l\u003Ca.length;l++){var c=a[l],h=parseInt(c.getAttribute(\"id\"),10),u=c.getAttribute(\"file\");if(isNaN(h))throw new Error('malformed file -- page \"id\" attribute is NaN');if(!u)throw new Error('malformed file -- needs page \"file\" attribute');n.pages[parseInt(h,10)]=u}return[\"chars\",\"kernings\"].forEach((function(e){var r=t.getElementsByTagName(e)[0];if(r)for(var s=e.substring(0,e.length-1),a=r.getElementsByTagName(s),l=0;l\u003Ca.length;l++){var c=a[l];n[e].push(i(o(c)))}})),n}},3102:e=>{var t=\"chasrset\";e.exports=function(e){for(var n in t in e&&(e.charset=e[t],delete e[t]),e)\"face\"!==n&&\"charset\"!==n&&(e[n]=\"padding\"===n||\"spacing\"===n?e[n].split(\",\").map((function(e){return parseInt(e,10)})):parseInt(e[n],10));return e}},9069:e=>{var t=function(e){return e.replace(/^\\s+|\\s+$/g,\"\")};e.exports=function(e){if(!e)return{};for(var n,i={},r=t(e).split(\"\\n\"),s=0;s\u003Cr.length;s++){var o=r[s],a=o.indexOf(\":\"),l=t(o.slice(0,a)).toLowerCase(),c=t(o.slice(a+1));void 0===i[l]?i[l]=c:(n=i[l],\"[object Array]\"===Object.prototype.toString.call(n)?i[l].push(c):i[l]=[i[l],c])}return i}},9414:(e,t,n)=>{var i=n.g.performance||{},r=function(){for(var e=[\"now\",\"webkitNow\",\"msNow\",\"mozNow\",\"oNow\"];e.length;){var t=e.shift();if(t in i)return i[t].bind(i)}var n=Date.now||function(){return(new Date).getTime()},r=(i.timing||{}).navigationStart||n();return function(){return n()-r}}();r.performanceNow=i.now,r.noConflict=function(){i.now=r.performanceNow},r.conflict=function(){i.now=r},r.conflict(),e.exports=r},2790:e=>{var t,n,i=e.exports={};function r(){throw new Error(\"setTimeout has not been defined\")}function s(){throw new Error(\"clearTimeout has not been defined\")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t=\"function\"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{n=\"function\"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var a,l=[],c=!1,h=-1;function u(){c&&a&&(c=!1,a.length?l=a.concat(l):h=-1,l.length&&d())}function d(){if(!c){var e=o(u);c=!0;for(var t=l.length;t;){for(a=l,l=[];++h\u003Ct;)a&&a[h].run();h=-1,t=l.length}a=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function A(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n\u003Carguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||o(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title=\"browser\",i.browser=!0,i.env={},i.argv=[],i.version=\"\",i.versions={},i.on=A,i.addListener=A,i.once=A,i.off=A,i.removeListener=A,i.removeAllListeners=A,i.emit=A,i.prependListener=A,i.prependOnceListener=A,i.listeners=function(e){return[]},i.binding=function(e){throw new Error(\"process.binding is not supported\")},i.cwd=function(){return\"/\"},i.chdir=function(e){throw new Error(\"process.chdir is not supported\")},i.umask=function(){return 0}},4177:function(e){!function(t){var n=setTimeout,i=\"function\"==typeof setImmediate&&setImmediate||function(e){n(e,1)};function r(e,t){return function(){e.apply(t,arguments)}}var s=Array.isArray||function(e){return\"[object Array]\"===Object.prototype.toString.call(e)};function o(e){if(\"object\"!=typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=null,this._value=null,this._deferreds=[],d(e,r(l,this),r(c,this))}function a(e){var t=this;null!==this._state?i((function(){var n=t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void e.reject(t)}e.resolve(i)}else(t._state?e.resolve:e.reject)(t._value)})):this._deferreds.push(e)}function l(e){try{if(e===this)throw new TypeError(\"A promise cannot be resolved with itself.\");if(e&&(\"object\"==typeof e||\"function\"==typeof e)){var t=e.then;if(\"function\"==typeof t)return void d(r(t,e),r(l,this),r(c,this))}this._state=!0,this._value=e,h.call(this)}catch(e){c.call(this,e)}}function c(e){this._state=!1,this._value=e,h.call(this)}function h(){for(var e=0,t=this._deferreds.length;e\u003Ct;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function u(e,t,n,i){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof t?t:null,this.resolve=n,this.reject=i}function d(e,t,n){var i=!1;try{e((function(e){i||(i=!0,t(e))}),(function(e){i||(i=!0,n(e))}))}catch(e){if(i)return;i=!0,n(e)}}o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=this;return new o((function(i,r){a.call(n,new u(e,t,i,r))}))},o.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&s(arguments[0])?arguments[0]:arguments);return new o((function(t,n){if(0===e.length)return t([]);var i=e.length;function r(s,o){try{if(o&&(\"object\"==typeof o||\"function\"==typeof o)){var a=o.then;if(\"function\"==typeof a)return void a.call(o,(function(e){r(s,e)}),n)}e[s]=o,0==--i&&t(e)}catch(e){n(e)}}for(var s=0;s\u003Ce.length;s++)r(s,e[s])}))},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o((function(t){t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.race=function(e){return new o((function(t,n){for(var i=0,r=e.length;i\u003Cr;i++)e[i].then(t,n)}))},o._setImmediateFn=function(e){i=e},e.exports?e.exports=o:t.Promise||(t.Promise=o)}(this)},4502:(e,t,n)=>{var i=n(4666),r=n(6793),s=n(1826),o=[0,2,3],a=[2,1,3];e.exports=function(e,t){e&&(r(e)||s(e))||(t=e||{},e=null);for(var n=\"string\"==typeof(t=\"number\"==typeof t?{count:t}:t||{}).type?t.type:\"uint16\",l=\"number\"==typeof t.count?t.count:1,c=t.start||0,h=!1!==t.clockwise?o:a,u=h[0],d=h[1],p=h[2],A=6*l,f=e||new(i(n))(A),m=0,g=0;m\u003CA;m+=6,g+=4){var v=m+c;f[v+0]=g+0,f[v+1]=g+1,f[v+2]=g+2,f[v+3]=g+u,f[v+4]=g+d,f[v+5]=g+p}return f}},2446:(e,t,n)=>{\"use strict\";n.d(t,{Z:()=>ve});var i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:\"normal\",autoplay:!0,timelineOffset:0},r={duration:1e3,delay:0,endDelay:0,easing:\"easeOutElastic(1, .5)\",round:0},s=[\"translateX\",\"translateY\",\"translateZ\",\"rotate\",\"rotateX\",\"rotateY\",\"rotateZ\",\"scale\",\"scaleX\",\"scaleY\",\"scaleZ\",\"skew\",\"skewX\",\"skewY\",\"perspective\"],o={CSS:{},springs:{}};function a(e,t,n){return Math.min(Math.max(e,t),n)}function l(e,t){return e.indexOf(t)>-1}function c(e,t){return e.apply(null,t)}var h=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,u=/^rgb/,d=/^hsl/,p={arr:function(e){return Array.isArray(e)},obj:function(e){return l(Object.prototype.toString.call(e),\"Object\")},pth:function(e){return p.obj(e)&&e.hasOwnProperty(\"totalLength\")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||p.svg(e)},str:function(e){return\"string\"==typeof e},fnc:function(e){return\"function\"==typeof e},und:function(e){return void 0===e},hex:function(e){return h.test(e)},rgb:function(e){return u.test(e)},hsl:function(e){return d.test(e)},col:function(e){return p.hex(e)||p.rgb(e)||p.hsl(e)},key:function(e){return!i.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&\"targets\"!==e&&\"keyframes\"!==e}},A=/\\(([^)]+)\\)/;function f(e){var t=A.exec(e);return t?t[1].split(\",\").map((function(e){return parseFloat(e)})):[]}function m(e,t){var n=f(e),i=a(p.und(n[0])?1:n[0],.1,100),r=a(p.und(n[1])?100:n[1],.1,100),s=a(p.und(n[2])?10:n[2],.1,100),l=a(p.und(n[3])?0:n[3],.1,100),c=Math.sqrt(r/i),h=s/(2*Math.sqrt(r*i)),u=h\u003C1?c*Math.sqrt(1-h*h):0,d=h\u003C1?(h*c-l)/u:-l+c;function A(e){var n=t?t*e/1e3:e;return n=h\u003C1?Math.exp(-n*h*c)*(1*Math.cos(u*n)+d*Math.sin(u*n)):(1+d*n)*Math.exp(-n*c),0===e||1===e?e:1-n}return t?A:function(){var t=o.springs[e];if(t)return t;for(var n=1/6,i=0,r=0;;)if(1===A(i+=n)){if(++r>=16)break}else r=0;var s=i*n*1e3;return o.springs[e]=s,s}}function g(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var n=a(e,1,10),i=a(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-i/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/i)}}function v(e){return void 0===e&&(e=10),function(t){return Math.round(t*e)*(1/e)}}var y=function(){var e=.1;function t(e,t){return 1-3*t+3*e}function n(e,t){return 3*t-6*e}function i(e){return 3*e}function r(e,r,s){return((t(r,s)*e+n(r,s))*e+i(r))*e}function s(e,r,s){return 3*t(r,s)*e*e+2*n(r,s)*e+i(r)}return function(t,n,i,o){if(0\u003C=t&&t\u003C=1&&0\u003C=i&&i\u003C=1){var a=new Float32Array(11);if(t!==n||i!==o)for(var l=0;l\u003C11;++l)a[l]=r(l*e,t,i);return function(l){return t===n&&i===o||0===l||1===l?l:r(function(n){for(var o=0,l=1;10!==l&&a[l]\u003C=n;++l)o+=e;--l;var c=o+(n-a[l])/(a[l+1]-a[l])*e,h=s(c,t,i);return h>=.001?function(e,t,n,i){for(var o=0;o\u003C4;++o){var a=s(t,n,i);if(0===a)return t;t-=(r(t,n,i)-e)/a}return t}(n,c,t,i):0===h?c:function(e,t,n,i,s){var o,a,l=0;do{(o=r(a=t+(n-t)/2,i,s)-e)>0?n=a:t=a}while(Math.abs(o)>1e-7&&++l\u003C10);return a}(n,o,o+e,t,i)}(l),n,o)}}}}(),E=function(){var e=[\"Quad\",\"Cubic\",\"Quart\",\"Quint\",\"Sine\",\"Expo\",\"Circ\",\"Back\",\"Elastic\"],t={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],g],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,t){return function(n){return 1-g(e,t)(1-n)}}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,t){return function(n){return n\u003C.5?g(e,t)(2*n)/2:1-g(e,t)(-2*n+2)/2}}]},n={linear:[.25,.25,.75,.75]};for(var i in t)for(var r=0,s=t[i].length;r\u003Cs;r++)n[\"ease\"+i+e[r]]=t[i][r];return n}();function b(e,t){if(p.fnc(e))return e;var n=e.split(\"(\")[0],i=E[n],r=f(e);switch(n){case\"spring\":return m(e,t);case\"cubicBezier\":return c(y,r);case\"steps\":return c(v,r);default:return p.fnc(i)?c(i,r):c(y,i)}}function x(e){try{return document.querySelectorAll(e)}catch(e){return}}var w=[];function C(e,t){for(var n=w,i=e.length,r=arguments.length>=2?arguments[1]:void 0,s=0;s\u003Ci;s++)if(s in e){var o=e[s];t.call(r,o,s,e)&&n.push(o)}return(w=e).length=0,n}function M(e,t){t||(t=[]);for(var n=0,i=e.length;n\u003Ci;n++){var r=e[n];Array.isArray(r)?M(r,t):t.push(r)}return t}function _(e){return p.arr(e)?e:(p.str(e)&&(e=x(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function I(e,t){return e.some((function(e){return e===t}))}function B(e){var t={};for(var n in e)t[n]=e[n];return t}function S(e,t){var n=B(e);for(var i in e)n[i]=t.hasOwnProperty(i)?t[i]:e[i];return n}function T(e,t){var n=B(e);for(var i in t)n[i]=p.und(e[i])?t[i]:e[i];return n}var L=/rgb\\((\\d+,\\s*[\\d]+,\\s*[\\d]+)\\)/g,D=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,R=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i,P=/hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g,k=/hsla\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%,\\s*([\\d.]+)\\)/g;var F=/([\\+\\-]?[0-9#\\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/;function O(e){var t=F.exec(e);if(t)return t[2]}function Q(e,t){return p.fnc(e)?e(t.target,t.id,t.total):e}function U(e,t){return e.getAttribute(t)}function N(e,t,n){if(I([n,\"deg\",\"rad\",\"turn\"],O(t)))return t;var i=o.CSS[t+n];if(!p.und(i))return i;var r=document.createElement(e.tagName),s=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;s.appendChild(r),r.style.position=\"absolute\",r.style.width=100+n;var a=100/r.offsetWidth;s.removeChild(r);var l=a*parseFloat(t);return o.CSS[t+n]=l,l}function G(e,t,n){if(t in e.style){var i=t.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase(),r=e.style[t]||getComputedStyle(e).getPropertyValue(i)||\"0\";return n?N(e,r,n):r}}function z(e,t){return p.dom(e)&&!p.inp(e)&&(U(e,t)||p.svg(e)&&e[t])?\"attribute\":p.dom(e)&&I(s,t)?\"transform\":p.dom(e)&&\"transform\"!==t&&G(e,t)?\"css\":null!=e[t]?\"object\":void 0}var H=/(\\w+)\\(([^)]*)\\)/g;function V(e){if(p.dom(e)){for(var t,n=e.style.transform||\"\",i=new Map;t=H.exec(n);)i.set(t[1],t[2]);return i}}function W(e,t,n,i){switch(z(e,t)){case\"transform\":return function(e,t,n,i){var r=l(t,\"scale\")?1:0+function(e){return l(e,\"translate\")||\"perspective\"===e?\"px\":l(e,\"rotate\")||l(e,\"skew\")?\"deg\":void 0}(t),s=V(e).get(t)||r;return n&&(n.transforms.list.set(t,s),n.transforms.last=t),i?N(e,s,i):s}(e,t,i,n);case\"css\":return G(e,t,n);case\"attribute\":return U(e,t);default:return e[t]||0}}var j=/^(\\*=|\\+=|-=)/;function q(e,t){var n=j.exec(e);if(!n)return e;var i=O(e)||0,r=parseFloat(t),s=parseFloat(e.replace(n[0],\"\"));switch(n[0][0]){case\"+\":return r+s+i;case\"-\":return r-s+i;case\"*\":return r*s+i}}var Y=/\\s/g;function X(e,t){if(p.col(e))return function(e){return p.rgb(e)?(t=e,(n=L.exec(t))?\"rgba(\"+n[1]+\",1)\":t):p.hex(e)?function(e){var t=e.replace(D,(function(e,t,n,i){return t+t+n+n+i+i})),n=R.exec(t);return\"rgba(\"+parseInt(n[1],16)+\",\"+parseInt(n[2],16)+\",\"+parseInt(n[3],16)+\",1)\"}(e):p.hsl(e)?function(e){var t,n,i,r=P.exec(e)||k.exec(e),s=parseInt(r[1],10)/360,o=parseInt(r[2],10)/100,a=parseInt(r[3],10)/100,l=r[4]||1;function c(e,t,n){return n\u003C0&&(n+=1),n>1&&(n-=1),n\u003C1/6?e+6*(t-e)*n:n\u003C.5?t:n\u003C2/3?e+(t-e)*(2/3-n)*6:e}if(0==o)t=n=i=a;else{var h=a\u003C.5?a*(1+o):a+o-a*o,u=2*a-h;t=c(u,h,s+1/3),n=c(u,h,s),i=c(u,h,s-1/3)}return\"rgba(\"+255*t+\",\"+255*n+\",\"+255*i+\",\"+l+\")\"}(e):void 0;var t,n}(e);var n=O(e),i=n?e.substr(0,e.length-n.length):e;return t&&!Y.test(e)?i+t:i}function J(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function K(e){for(var t,n=e.points,i=0,r=0;r\u003Cn.numberOfItems;r++){var s=n.getItem(r);r>0&&(i+=J(t,s)),t=s}return i}function Z(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case\"circle\":return function(e){return 2*Math.PI*U(e,\"r\")}(e);case\"rect\":return function(e){return 2*U(e,\"width\")+2*U(e,\"height\")}(e);case\"line\":return function(e){return J({x:U(e,\"x1\"),y:U(e,\"y1\")},{x:U(e,\"x2\"),y:U(e,\"y2\")})}(e);case\"polyline\":return K(e);case\"polygon\":return function(e){var t=e.points;return K(e)+J(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function $(e,t){var n=t||{},i=n.el||function(e){for(var t=e.parentNode;p.svg(t)&&(t=t.parentNode,p.svg(t.parentNode)););return t}(e),r=i.getBoundingClientRect(),s=U(i,\"viewBox\"),o=r.width,a=r.height,l=n.viewBox||(s?s.split(\" \"):[0,0,o,a]);return{el:i,viewBox:l,x:l[0]/1,y:l[1]/1,w:o/l[2],h:a/l[3]}}function ee(e,t){function n(n){void 0===n&&(n=0);var i=t+n>=1?t+n:0;return e.el.getPointAtLength(i)}var i=$(e.el,e.svg),r=n(),s=n(-1),o=n(1);switch(e.property){case\"x\":return(r.x-i.x)*i.w;case\"y\":return(r.y-i.y)*i.h;case\"angle\":return 180*Math.atan2(o.y-s.y,o.x-s.x)/Math.PI}}var te=/-?\\d*\\.?\\d+/g;function ne(e,t){var n=X(p.pth(e)?e.totalLength:e,t)+\"\";return{original:n,numbers:n.match(te)?n.match(te).map(Number):[0],strings:p.str(e)||t?n.split(te):[]}}function ie(e){return C(e?M(p.arr(e)?e.map(_):_(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function re(e){var t=ie(e);return t.map((function(e,n){return{target:e,id:n,total:t.length,transforms:{list:V(e)}}}))}var se=/^spring/;function oe(e,t){var n=B(t);if(se.test(n.easing)&&(n.duration=m(n.easing)),p.arr(e)){var i=e.length;2!==i||p.obj(e[0])?p.fnc(t.duration)||(n.duration=t.duration/i):e={value:e}}var r=p.arr(e)?e:[e];return r.map((function(e,n){var i=p.obj(e)&&!p.pth(e)?e:{value:e};return p.und(i.delay)&&(i.delay=n?0:t.delay),p.und(i.endDelay)&&(i.endDelay=n===r.length-1?t.endDelay:0),i})).map((function(e){return T(e,n)}))}var ae={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,i,r){if(i.list.set(t,n),t===i.last||r){var s=\"\";i.list.forEach((function(e,t){s+=t+\"(\"+e+\") \"})),e.style.transform=s}}};function le(e,t){for(var n=re(e),i=0,r=n.length;i\u003Cr;i++){var s=n[i];for(var o in t){var a=Q(t[o],s),l=s.target,c=O(a),h=W(l,o,c,s),u=q(X(a,c||O(h)),h),d=z(l,o);ae[d](l,o,u,s.transforms,!0)}}}function ce(e,t){return C(M(e.map((function(e){return t.map((function(t){return function(e,t){var n=z(e.target,t.name);if(n){var i=function(e,t){var n;return e.tweens.map((function(i){var r=function(e,t){var n={};for(var i in e){var r=Q(e[i],t);p.arr(r)&&1===(r=r.map((function(e){return Q(e,t)}))).length&&(r=r[0]),n[i]=r}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(i,t),s=r.value,o=p.arr(s)?s[1]:s,a=O(o),l=W(t.target,e.name,a,t),c=n?n.to.original:l,h=p.arr(s)?s[0]:c,u=O(h)||O(l),d=a||u;return p.und(o)&&(o=c),r.from=ne(h,d),r.to=ne(q(o,h),d),r.start=n?n.end:0,r.end=r.start+r.delay+r.duration+r.endDelay,r.easing=b(r.easing,r.duration),r.isPath=p.pth(s),r.isColor=p.col(r.from.original),r.isColor&&(r.round=1),n=r,r}))}(t,e),r=i[i.length-1];return{type:n,property:t.name,animatable:e,tweens:i,duration:r.end,delay:i[0].delay,endDelay:r.endDelay}}}(e,t)}))}))),(function(e){return!p.und(e)}))}function he(e,t){var n=e.length,i=function(e){return e.timelineOffset?e.timelineOffset:0},r={};return r.duration=n?Math.max.apply(Math,e.map((function(e){return i(e)+e.duration}))):t.duration,r.delay=n?Math.min.apply(Math,e.map((function(e){return i(e)+e.delay}))):t.delay,r.endDelay=n?r.duration-Math.max.apply(Math,e.map((function(e){return i(e)+e.duration-e.endDelay}))):t.endDelay,r}var ue,de=0,pe=[],Ae=[],fe=function(){function e(){ue=requestAnimationFrame(t)}function t(t){var n=pe.length;if(n){for(var i=0;i\u003Cn;){var r=pe[i];if(r.paused){var s=pe.indexOf(r);s>-1&&(pe.splice(s,1),n=pe.length)}else r.tick(t);i++}e()}else ue=cancelAnimationFrame(ue)}return e}();function me(e){void 0===e&&(e={});var t,n=0,s=0,o=0,l=0,c=null;function h(){return window.Promise&&new Promise((function(e){return c=e}))}var u=h(),d=function(e){var t=S(i,e),n=S(r,e),s=function(e,t){var n=[],i=t.keyframes;for(var r in i&&(t=T(function(e){for(var t=C(M(e.map((function(e){return Object.keys(e)}))),(function(e){return p.key(e)})).reduce((function(e,t){return e.indexOf(t)\u003C0&&e.push(t),e}),[]),n={},i=function(i){var r=t[i];n[r]=e.map((function(e){var t={};for(var n in e)p.key(n)?n==r&&(t.value=e[n]):t[n]=e[n];return t}))},r=0;r\u003Ct.length;r++)i(r);return n}(i),t)),t)p.key(r)&&n.push({name:r,tweens:oe(t[r],e)});return n}(n,e),o=re(e.targets),a=ce(o,s),l=he(a,n),c=de;return de++,T(t,{id:c,children:[],animatables:o,animations:a,duration:l.duration,delay:l.delay,endDelay:l.endDelay})}(e);function A(){d.reversed=!d.reversed;for(var e=0,n=t.length;e\u003Cn;e++)t[e].reversed=d.reversed}function f(e){return d.reversed?d.duration-e:e}function m(){n=0,s=f(d.currentTime)*(1/me.speed)}function g(e,t){t&&t.seek(e-t.timelineOffset)}function v(e){for(var t=0,n=d.animations,i=n.length;t\u003Ci;){var r=n[t],s=r.animatable,o=r.tweens,l=o.length-1,c=o[l];l&&(c=C(o,(function(t){return e\u003Ct.end}))[0]||c);for(var h=a(e-c.start-c.delay,0,c.duration)/c.duration,u=isNaN(h)?1:c.easing(h),p=c.to.strings,A=c.round,f=[],m=c.to.numbers.length,g=void 0,v=0;v\u003Cm;v++){var y=void 0,E=c.to.numbers[v],b=c.from.numbers[v]||0;y=c.isPath?ee(c.value,u*E):b+u*(E-b),A&&(c.isColor&&v>2||(y=Math.round(y*A)/A)),f.push(y)}var x=p.length;if(x){g=p[0];for(var w=0;w\u003Cx;w++){p[w];var M=p[w+1],_=f[w];isNaN(_)||(g+=M?_+M:_+\" \")}}else g=f[0];ae[r.type](s.target,r.property,g,s.transforms),r.currentValue=g,t++}}function y(e){d[e]&&!d.passThrough&&d[e](d)}function E(e){var i=d.duration,r=d.delay,p=i-d.endDelay,m=f(e);d.progress=a(m/i*100,0,100),d.reversePlayback=m\u003Cd.currentTime,t&&function(e){if(d.reversePlayback)for(var n=l;n--;)g(e,t[n]);else for(var i=0;i\u003Cl;i++)g(e,t[i])}(m),!d.began&&d.currentTime>0&&(d.began=!0,y(\"begin\"),y(\"loopBegin\")),m\u003C=r&&0!==d.currentTime&&v(0),(m>=p&&d.currentTime!==i||!i)&&v(i),m>r&&m\u003Cp?(d.changeBegan||(d.changeBegan=!0,d.changeCompleted=!1,y(\"changeBegin\")),y(\"change\"),v(m)):d.changeBegan&&(d.changeCompleted=!0,d.changeBegan=!1,y(\"changeComplete\")),d.currentTime=a(m,0,i),d.began&&y(\"update\"),e>=i&&(s=0,d.remaining&&!0!==d.remaining&&d.remaining--,d.remaining?(n=o,y(\"loopComplete\"),y(\"loopBegin\"),\"alternate\"===d.direction&&A()):(d.paused=!0,d.completed||(d.completed=!0,y(\"loopComplete\"),y(\"complete\"),\"Promise\"in window&&(c(),u=h()))))}return d.reset=function(){var e=d.direction;d.passThrough=!1,d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.changeBegan=!1,d.completed=!1,d.changeCompleted=!1,d.reversePlayback=!1,d.reversed=\"reverse\"===e,d.remaining=d.loop,t=d.children;for(var n=l=t.length;n--;)d.children[n].reset();(d.reversed&&!0!==d.loop||\"alternate\"===e&&1===d.loop)&&d.remaining++,v(0)},d.set=function(e,t){return le(e,t),d},d.tick=function(e){o=e,n||(n=o),E((o+(s-n))*me.speed)},d.seek=function(e){E(f(e))},d.pause=function(){d.paused=!0,m()},d.play=function(){d.paused&&(d.paused=!1,pe.push(d),m(),ue||fe())},d.reverse=function(){A(),m()},d.restart=function(){d.reset(),d.play()},d.finished=u,d.reset(),d.autoplay&&d.play(),d}function ge(e,t){for(var n=t.length;n--;)I(e,t[n].animatable.target)&&t.splice(n,1)}document.addEventListener(\"visibilitychange\",(function(){if(document.hidden){for(var e=0,t=pe.length;e\u003Ct;e++)activeInstance[e].pause();Ae=pe.slice(0),pe=[]}else for(var n=0,i=Ae.length;n\u003Ci;n++)Ae[n].play()})),me.version=\"3.0.0\",me.speed=1,me.running=pe,me.remove=function(e){for(var t=ie(e),n=pe.length;n--;){var i=pe[n],r=i.animations,s=i.children;ge(t,r);for(var o=s.length;o--;){var a=s[o],l=a.animations;ge(t,l),l.length||a.children.length||s.splice(o,1)}r.length||s.length||i.pause()}},me.get=W,me.set=le,me.convertPx=N,me.path=function(e,t){var n=p.str(e)?x(e)[0]:e,i=t||100;return function(e){return{property:e,el:n,svg:$(n),totalLength:Z(n)*(i/100)}}},me.setDashoffset=function(e){var t=Z(e);return e.setAttribute(\"stroke-dasharray\",t),t},me.stagger=function(e,t){void 0===t&&(t={});var n=t.direction||\"normal\",i=t.easing?b(t.easing):null,r=t.grid,s=t.axis,o=t.from||0,a=\"first\"===o,l=\"center\"===o,c=\"last\"===o,h=p.arr(e),u=h?parseFloat(e[0]):parseFloat(e),d=h?parseFloat(e[1]):0,A=O(h?e[1]:e)||0,f=t.start||0+(h?u:0),m=[],g=0;return function(e,t,p){if(a&&(o=0),l&&(o=(p-1)/2),c&&(o=p-1),!m.length){for(var v=0;v\u003Cp;v++){if(r){var y=l?(r[0]-1)/2:o%r[0],E=l?(r[1]-1)/2:Math.floor(o/r[0]),b=y-v%r[0],x=E-Math.floor(v/r[0]),w=Math.sqrt(b*b+x*x);\"x\"===s&&(w=-b),\"y\"===s&&(w=-x),m.push(w)}else m.push(Math.abs(o-v));g=Math.max.apply(Math,m)}i&&(m=m.map((function(e){return i(e/g)*g}))),\"reverse\"===n&&(m=m.map((function(e){return s?e\u003C0?-1*e:-e:Math.abs(g-e)})))}return f+(h?(d-u)/g:u)*(Math.round(100*m[t])/100)+A}},me.timeline=function(e){void 0===e&&(e={});var t=me(e);return t.duration=0,t.add=function(n,i){var s=pe.indexOf(t),o=t.children;function a(e){e.passThrough=!0}s>-1&&pe.splice(s,1);for(var l=0;l\u003Co.length;l++)a(o[l]);var c=T(n,S(r,e));c.targets=c.targets||e.targets;var h=t.duration;c.autoplay=!1,c.direction=t.direction,c.timelineOffset=p.und(i)?h:q(i,h),a(t),t.seek(c.timelineOffset);var u=me(c);a(u),o.push(u);var d=he(o,e);return t.delay=d.delay,t.endDelay=d.endDelay,t.duration=d.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},me.easing=b,me.penner=E,me.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};const ve=me},6559:(e,t,n)=>{var i=n(7510),r=(n(5153),n(4502)),s=n(9154),o=n(7347),a=n(83),l=n(2259);e.exports=function(e){return new c(e)};class c extends THREE.BufferGeometry{constructor(e){super(),\"string\"==typeof e&&(e={text:e}),this._opt=o({},e),e&&this.update(e)}update(e){if(\"string\"==typeof e&&(e={text:e}),!(e=o({},this._opt,e)).font)throw new TypeError(\"must specify a { font } in options\");this.layout=i(e);var t=!1!==e.flipY,n=e.font,l=n.common.scaleW,c=n.common.scaleH,h=this.layout.glyphs.filter((function(e){var t=e.data;return t.width*t.height>0}));this.visibleGlyphs=h;var u=a.positions(h),d=a.uvs(h,l,c,t),p=r({clockwise:!0,type:\"uint16\",count:h.length});if(s.index(this,p,1,\"uint16\"),s.attr(this,\"position\",u,2),s.attr(this,\"uv\",d,2),!e.multipage&&\"page\"in this.attributes)this.removeAttribute(\"page\");else if(e.multipage){var A=a.pages(h);s.attr(this,\"page\",A,1)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var e=this.attributes.position.array,t=this.attributes.position.itemSize;if(!e||!t||e.length\u003C2)return this.boundingSphere.radius=0,void this.boundingSphere.center.set(0,0,0);l.computeSphere(e,this.boundingSphere),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.')}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var e=this.boundingBox,t=this.attributes.position.array,n=this.attributes.position.itemSize;!t||!n||t.length\u003C2?e.makeEmpty():l.computeBox(t,e)}}},2259:e=>{var t={min:[0,0],max:[0,0]};function n(e){var n=e.length/2;t.min[0]=e[0],t.min[1]=e[1],t.max[0]=e[0],t.max[1]=e[1];for(var i=0;i\u003Cn;i++){var r=e[2*i+0],s=e[2*i+1];t.min[0]=Math.min(r,t.min[0]),t.min[1]=Math.min(s,t.min[1]),t.max[0]=Math.max(r,t.max[0]),t.max[1]=Math.max(s,t.max[1])}}e.exports.computeBox=function(e,i){n(e),i.min.set(t.min[0],t.min[1],0),i.max.set(t.max[0],t.max[1],0)},e.exports.computeSphere=function(e,i){n(e);var r=t.min[0],s=t.min[1],o=t.max[0]-r,a=t.max[1]-s,l=Math.sqrt(o*o+a*a);i.center.set(r+o/2,s+a/2,0),i.radius=l/2}},83:e=>{e.exports.pages=function(e){var t=new Float32Array(4*e.length*1),n=0;return e.forEach((function(e){var i=e.data.page||0;t[n++]=i,t[n++]=i,t[n++]=i,t[n++]=i})),t},e.exports.uvs=function(e,t,n,i){var r=new Float32Array(4*e.length*2),s=0;return e.forEach((function(e){var o=e.data,a=o.x+o.width,l=o.y+o.height,c=o.x/t,h=o.y/n,u=a/t,d=l/n;i&&(h=(n-o.y)/n,d=(n-l)/n),r[s++]=c,r[s++]=h,r[s++]=c,r[s++]=d,r[s++]=u,r[s++]=d,r[s++]=u,r[s++]=h})),r},e.exports.positions=function(e){var t=new Float32Array(4*e.length*2),n=0;return e.forEach((function(e){var i=e.data,r=e.position[0]+i.xoffset,s=e.position[1]+i.yoffset,o=i.width,a=i.height;t[n++]=r,t[n++]=s,t[n++]=r,t[n++]=s+a,t[n++]=r+o,t[n++]=s+a,t[n++]=r+o,t[n++]=s})),t}},9154:(e,t,n)=>{var i=n(9651);function r(e,t,n,r){return t=i(t=t||[],r),(e=new THREE.BufferAttribute(t,n)).itemSize=n,e.needsUpdate=!0,e}e.exports.attr=function(e,t,n,i,s){if(\"number\"!=typeof i&&(i=3),\"string\"!=typeof s&&(s=\"float32\"),Array.isArray(n)&&Array.isArray(n[0])&&n[0].length!==i)throw new Error(\"Nested vertex array has unexpected size; expected \"+i+\" but found \"+n[0].length);var o=r(e.getAttribute(t),n,i,s);e.setAttribute(t,o)},e.exports.index=function(e,t,n,i){\"number\"!=typeof n&&(n=1),\"string\"!=typeof i&&(i=\"uint16\");var s=!e.index&&\"function\"!=typeof e.setIndex,o=r(s?e.getAttribute(\"index\"):e.index,t,n,i);o&&(s?e.addAttribute(\"index\",o):e.index=o)}},5542:function(e,t,n){e.exports=function(){\"use strict\";var e=\"undefined\"!=typeof window?window:void 0!==n.g?n.g:\"undefined\"!=typeof self?self:{};var t,i=function(){return/Android/i.test(navigator.userAgent)||/iPhone|iPad|iPod/i.test(navigator.userAgent)},r=function(e,t){for(var n=0,i=e.length;n\u003Ci;n++)t[n]=e[n]},s=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},o=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(t,n){t.exports=function(){var t,n,i,r=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")},s=function(){function e(e,t){for(var n=0;n\u003Ct.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(e,t){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),a=.001,l=1,c=function(e,t){return\"data:\"+e+\",\"+encodeURIComponent(t)},h=function(e,t,n){return e+(t-e)*n},u=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}(),d=function(){var e=-1!==navigator.userAgent.indexOf(\"Version\")&&-1!==navigator.userAgent.indexOf(\"Android\")&&-1!==navigator.userAgent.indexOf(\"Chrome\");return function(){return e}}(),p=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}(),A=function(){var e=-1!==navigator.userAgent.indexOf(\"Firefox\")&&-1!==navigator.userAgent.indexOf(\"Android\");return function(){return e}}(),f=(t=navigator.userAgent.match(/.*Chrome\\/([0-9]+)/),n=t?parseInt(t[1],10):null,function(){return n}),m=function(){var e=!1;return e=u()&&p()&&-1!==navigator.userAgent.indexOf(\"13_4\"),function(){return e}}(),g=function(){var e=!1;if(65===f()){var t=navigator.userAgent.match(/.*Chrome\\/([0-9\\.]*)/);if(t){var n=t[1].split(\".\"),i=o(n,4),r=(i[0],i[1],i[2]),s=i[3];e=3325===parseInt(r,10)&&parseInt(s,10)\u003C148}}return function(){return e}}(),v=function(){var e=-1!==navigator.userAgent.indexOf(\"R7 Build\");return function(){return e}}(),y=function(){var e=90==window.orientation||-90==window.orientation;return v()?!e:e},E=function(e){return!(isNaN(e)||e\u003C=a||e>l)},b=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},x=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},w=function(e){if(d())return!1;if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0},C=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},M=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},_=function(e,t,n,i){var r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t),e.compileShader(r);var s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,n),e.compileShader(s);var o=e.createProgram();for(var a in e.attachShader(o,r),e.attachShader(o,s),i)e.bindAttribLocation(o,i[a],a);return e.linkProgram(o),e.deleteShader(r),e.deleteShader(s),o},I=function(e,t){for(var n={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),r=\"\",s=0;s\u003Ci;s++)n[r=e.getActiveUniform(t,s).name.replace(\"[0]\",\"\")]=e.getUniformLocation(t,r);return n},B=function(e,t,n,i,r,s,o){var a=1/(t-n),l=1/(i-r),c=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*a,e[13]=(r+i)*l,e[14]=(o+s)*c,e[15]=1,e},S=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))&&(t=!0),t},T=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},L=function(e){if(u()){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t)+1+\"px\",e.style.height=parseInt(n)+\"px\",setTimeout((function(){e.style.width=t,e.style.height=n}),100)}window.canvas=e},D=function(){var e=Math.PI/180,t=.25*Math.PI;function n(n,i,r,s){var o=Math.tan(i?i.upDegrees*e:t),a=Math.tan(i?i.downDegrees*e:t),l=Math.tan(i?i.leftDegrees*e:t),c=Math.tan(i?i.rightDegrees*e:t),h=2/(l+c),u=2/(o+a);return n[0]=h,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=u,n[6]=0,n[7]=0,n[8]=-(l-c)*h*.5,n[9]=(o-a)*u*.5,n[10]=s/(r-s),n[11]=-1,n[12]=0,n[13]=0,n[14]=s*r/(r-s),n[15]=0,n}function i(e,t,n){var i=t[0],r=t[1],s=t[2],o=t[3],a=i+i,l=r+r,c=s+s,h=i*a,u=i*l,d=i*c,p=r*l,A=r*c,f=s*c,m=o*a,g=o*l,v=o*c;return e[0]=1-(p+f),e[1]=u+v,e[2]=d-g,e[3]=0,e[4]=u-v,e[5]=1-(h+f),e[6]=A+m,e[7]=0,e[8]=d+g,e[9]=A-m,e[10]=1-(h+p),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function r(e,t,n){var i,r,s,o,a,l,c,h,u,d,p,A,f=n[0],m=n[1],g=n[2];return t===e?(e[12]=t[0]*f+t[4]*m+t[8]*g+t[12],e[13]=t[1]*f+t[5]*m+t[9]*g+t[13],e[14]=t[2]*f+t[6]*m+t[10]*g+t[14],e[15]=t[3]*f+t[7]*m+t[11]*g+t[15]):(i=t[0],r=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],u=t[8],d=t[9],p=t[10],A=t[11],e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=a,e[5]=l,e[6]=c,e[7]=h,e[8]=u,e[9]=d,e[10]=p,e[11]=A,e[12]=i*f+a*m+u*g+t[12],e[13]=r*f+l*m+d*g+t[13],e[14]=s*f+c*m+p*g+t[14],e[15]=o*f+h*m+A*g+t[15]),e}function s(e,t){var n=t[0],i=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],u=t[9],d=t[10],p=t[11],A=t[12],f=t[13],m=t[14],g=t[15],v=n*a-i*o,y=n*l-r*o,E=n*c-s*o,b=i*l-r*a,x=i*c-s*a,w=r*c-s*l,C=h*f-u*A,M=h*m-d*A,_=h*g-p*A,I=u*m-d*f,B=u*g-p*f,S=d*g-p*m,T=v*S-y*B+E*I+b*_-x*M+w*C;return T?(T=1/T,e[0]=(a*S-l*B+c*I)*T,e[1]=(r*B-i*S-s*I)*T,e[2]=(f*w-m*x+g*b)*T,e[3]=(d*x-u*w-p*b)*T,e[4]=(l*_-o*S-c*M)*T,e[5]=(n*S-r*_+s*M)*T,e[6]=(m*E-A*w-g*y)*T,e[7]=(h*w-d*E+p*y)*T,e[8]=(o*B-a*_+c*C)*T,e[9]=(i*_-n*B-s*C)*T,e[10]=(A*x-f*E+g*v)*T,e[11]=(u*E-h*x-p*v)*T,e[12]=(a*M-o*I-l*C)*T,e[13]=(n*I-i*M+r*C)*T,e[14]=(f*y-A*b-m*v)*T,e[15]=(h*b-u*y+d*v)*T,e):null}var o=new Float32Array([0,0,0,1]),a=new Float32Array([0,0,0]);function l(e,t,l,c,h,u){n(e,c||null,u.depthNear,u.depthFar),i(t,l.orientation||o,l.position||a),h&&r(t,t,h),s(t,t)}return function(e,t,n){return!(!e||!t||(e.pose=t,e.timestamp=t.timestamp,l(e.leftProjectionMatrix,e.leftViewMatrix,t,n._getFieldOfView(\"left\"),n._getEyeOffset(\"left\"),n),l(e.rightProjectionMatrix,e.rightViewMatrix,t,n._getFieldOfView(\"right\"),n._getEyeOffset(\"right\"),n),0))}}(),R=function(){var e=window.self!==window.top,t=P(document.referrer),n=P(window.location.href);return e&&t!==n},P=function(e){var t,n=e.indexOf(\"://\");t=-1!==n?n+3:0;var i=e.indexOf(\"/\",t);return-1===i&&(i=e.length),e.substring(0,i)},k=function(e){return e.w>1?(console.warn(\"getQuaternionAngle: w > 1\"),0):2*Math.acos(e.w)},F=(i={},function(e,t){void 0===i[e]&&(console.warn(\"webvr-polyfill: \"+t),i[e]=!0)}),O=function(e,t){F(e,e+\" has been deprecated. This may not work on native WebVR displays. \"+(t?\"Please use \"+t+\" instead.\":\"\"))};function Q(e,t,n){if(t){for(var i=[],r=null,s=0;s\u003Ct.length;++s)switch(o=t[s]){case e.TEXTURE_BINDING_2D:case e.TEXTURE_BINDING_CUBE_MAP:if((l=t[++s])\u003Ce.TEXTURE0||l>e.TEXTURE31){console.error(\"TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit\"),i.push(null,null);break}r||(r=e.getParameter(e.ACTIVE_TEXTURE)),e.activeTexture(l),i.push(e.getParameter(o),null);break;case e.ACTIVE_TEXTURE:r=e.getParameter(e.ACTIVE_TEXTURE),i.push(null);break;default:i.push(e.getParameter(o))}for(n(e),s=0;s\u003Ct.length;++s){var o=t[s],a=i[s];switch(o){case e.ACTIVE_TEXTURE:break;case e.ARRAY_BUFFER_BINDING:e.bindBuffer(e.ARRAY_BUFFER,a);break;case e.COLOR_CLEAR_VALUE:e.clearColor(a[0],a[1],a[2],a[3]);break;case e.COLOR_WRITEMASK:e.colorMask(a[0],a[1],a[2],a[3]);break;case e.CURRENT_PROGRAM:e.useProgram(a);break;case e.ELEMENT_ARRAY_BUFFER_BINDING:e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a);break;case e.FRAMEBUFFER_BINDING:e.bindFramebuffer(e.FRAMEBUFFER,a);break;case e.RENDERBUFFER_BINDING:e.bindRenderbuffer(e.RENDERBUFFER,a);break;case e.TEXTURE_BINDING_2D:if((l=t[++s])\u003Ce.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_2D,a);break;case e.TEXTURE_BINDING_CUBE_MAP:var l;if((l=t[++s])\u003Ce.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_CUBE_MAP,a);break;case e.VIEWPORT:e.viewport(a[0],a[1],a[2],a[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:a?e.enable(o):e.disable(o);break;default:console.log(\"No GL restore behavior for 0x\"+o.toString(16))}r&&e.activeTexture(r)}}else n(e)}var U=Q,N=[\"attribute vec2 position;\",\"attribute vec3 texCoord;\",\"varying vec2 vTexCoord;\",\"uniform vec4 viewportOffsetScale[2];\",\"void main() {\",\" vec4 viewport = viewportOffsetScale[int(texCoord.z)];\",\" vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;\",\" gl_Position = vec4( position, 1.0, 1.0 );\",\"}\"].join(\"\\n\"),G=[\"precision mediump float;\",\"uniform sampler2D diffuse;\",\"varying vec2 vTexCoord;\",\"void main() {\",\" gl_FragColor = texture2D(diffuse, vTexCoord);\",\"}\"].join(\"\\n\");function z(e,t,n,i){this.gl=e,this.cardboardUI=t,this.bufferScale=n,this.dirtySubmitFrameBindings=i,this.ctxAttribs=e.getContextAttributes(),this.instanceExt=e.getExtension(\"ANGLE_instanced_arrays\"),this.meshWidth=20,this.meshHeight=20,this.bufferWidth=e.drawingBufferWidth,this.bufferHeight=e.drawingBufferHeight,this.realBindFramebuffer=e.bindFramebuffer,this.realEnable=e.enable,this.realDisable=e.disable,this.realColorMask=e.colorMask,this.realClearColor=e.clearColor,this.realViewport=e.viewport,u()||(this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,\"width\"),this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,\"height\")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=_(e,N,G,this.attribs),this.uniforms=I(e,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.indexCount=0,this.renderTarget=e.createTexture(),this.framebuffer=e.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=e.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=e.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=e.createRenderbuffer()),this.patch(),this.onResize()}z.prototype.destroy=function(){var e=this.gl;this.unpatch(),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer),e.deleteTexture(this.renderTarget),e.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&e.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&e.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&e.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},z.prototype.onResize=function(){var e=this.gl,t=this,n=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];U(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0),t.ctxAttribs.depth&&t.ctxAttribs.stencil?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)):t.ctxAttribs.depth?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)):t.ctxAttribs.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)),!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE&&console.error(\"Framebuffer incomplete!\"),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),t.realClearColor.apply(e,t.clearColor)})),this.cardboardUI&&this.cardboardUI.onResize()},z.prototype.patch=function(){if(!this.isPatched){var e=this,t=this.gl.canvas,n=this.gl;u()||(t.width=b()*this.bufferScale,t.height=x()*this.bufferScale,Object.defineProperty(t,\"width\",{configurable:!0,enumerable:!0,get:function(){return e.bufferWidth},set:function(n){e.bufferWidth=n,e.realCanvasWidth.set.call(t,n),e.onResize()}}),Object.defineProperty(t,\"height\",{configurable:!0,enumerable:!0,get:function(){return e.bufferHeight},set:function(n){e.bufferHeight=n,e.realCanvasHeight.set.call(t,n),e.onResize()}})),this.lastBoundFramebuffer=n.getParameter(n.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(n.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(t,i){e.lastBoundFramebuffer=i||e.framebuffer,e.realBindFramebuffer.call(n,t,e.lastBoundFramebuffer)},this.cullFace=n.getParameter(n.CULL_FACE),this.depthTest=n.getParameter(n.DEPTH_TEST),this.blend=n.getParameter(n.BLEND),this.scissorTest=n.getParameter(n.SCISSOR_TEST),this.stencilTest=n.getParameter(n.STENCIL_TEST),n.enable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!0;break;case n.DEPTH_TEST:e.depthTest=!0;break;case n.BLEND:e.blend=!0;break;case n.SCISSOR_TEST:e.scissorTest=!0;break;case n.STENCIL_TEST:e.stencilTest=!0}e.realEnable.call(n,t)},n.disable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!1;break;case n.DEPTH_TEST:e.depthTest=!1;break;case n.BLEND:e.blend=!1;break;case n.SCISSOR_TEST:e.scissorTest=!1;break;case n.STENCIL_TEST:e.stencilTest=!1}e.realDisable.call(n,t)},this.colorMask=n.getParameter(n.COLOR_WRITEMASK),n.colorMask=function(t,i,r,s){e.colorMask[0]=t,e.colorMask[1]=i,e.colorMask[2]=r,e.colorMask[3]=s,e.realColorMask.call(n,t,i,r,s)},this.clearColor=n.getParameter(n.COLOR_CLEAR_VALUE),n.clearColor=function(t,i,r,s){e.clearColor[0]=t,e.clearColor[1]=i,e.clearColor[2]=r,e.clearColor[3]=s,e.realClearColor.call(n,t,i,r,s)},this.viewport=n.getParameter(n.VIEWPORT),n.viewport=function(t,i,r,s){e.viewport[0]=t,e.viewport[1]=i,e.viewport[2]=r,e.viewport[3]=s,e.realViewport.call(n,t,i,r,s)},this.isPatched=!0,L(t)}},z.prototype.unpatch=function(){if(this.isPatched){var e=this.gl,t=this.gl.canvas;u()||(Object.defineProperty(t,\"width\",this.realCanvasWidth),Object.defineProperty(t,\"height\",this.realCanvasHeight)),t.width=this.bufferWidth,t.height=this.bufferHeight,e.bindFramebuffer=this.realBindFramebuffer,e.enable=this.realEnable,e.disable=this.realDisable,e.colorMask=this.realColorMask,e.clearColor=this.realClearColor,e.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),this.isPatched=!1,setTimeout((function(){L(t)}),1)}},z.prototype.setTextureBounds=function(e,t){e||(e=[0,0,.5,1]),t||(t=[.5,0,.5,1]),this.viewportOffsetScale[0]=e[0],this.viewportOffsetScale[1]=e[1],this.viewportOffsetScale[2]=e[2],this.viewportOffsetScale[3]=e[3],this.viewportOffsetScale[4]=t[0],this.viewportOffsetScale[5]=t[1],this.viewportOffsetScale[6]=t[2],this.viewportOffsetScale[7]=t[3]},z.prototype.submitFrame=function(){var e=this.gl,t=this,n=[];if(this.dirtySubmitFrameBindings||n.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0),U(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null);var n=0,i=0;t.instanceExt&&(n=e.getVertexAttrib(t.attribs.position,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),i=e.getVertexAttrib(t.attribs.texCoord,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE)),t.cullFace&&t.realDisable.call(e,e.CULL_FACE),t.depthTest&&t.realDisable.call(e,e.DEPTH_TEST),t.blend&&t.realDisable.call(e,e.BLEND),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realDisable.call(e,e.STENCIL_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),(t.ctxAttribs.alpha||u())&&(t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)),e.useProgram(t.program),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer),e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.enableVertexAttribArray(t.attribs.position),e.enableVertexAttribArray(t.attribs.texCoord),e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,!1,20,0),e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,!1,20,8),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,0),0!=i&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,0)),e.activeTexture(e.TEXTURE0),e.uniform1i(t.uniforms.diffuse,0),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale),e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0),t.cardboardUI&&t.cardboardUI.renderNoState(),t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer),t.ctxAttribs.preserveDrawingBuffer||(t.realClearColor.call(e,0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),t.dirtySubmitFrameBindings||t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.cullFace&&t.realEnable.call(e,e.CULL_FACE),t.depthTest&&t.realEnable.call(e,e.DEPTH_TEST),t.blend&&t.realEnable.call(e,e.BLEND),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realEnable.call(e,e.STENCIL_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),!t.ctxAttribs.alpha&&t.ctxAttribs.preserveDrawingBuffer||t.realClearColor.apply(e,t.clearColor),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,n),0!=i&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,i))})),u()){var i=e.canvas;i.width==t.bufferWidth&&i.height==t.bufferHeight||(t.bufferWidth=i.width,t.bufferHeight=i.height,t.onResize())}},z.prototype.updateDeviceInfo=function(e){var t=this.gl,n=this,i=[t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING];U(t,i,(function(t){var i=n.computeMeshVertices_(n.meshWidth,n.meshHeight,e);if(t.bindBuffer(t.ARRAY_BUFFER,n.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW),!n.indexCount){var r=n.computeMeshIndices_(n.meshWidth,n.meshHeight);t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,r,t.STATIC_DRAW),n.indexCount=r.length}}))},z.prototype.computeMeshVertices_=function(e,t,n){for(var i=new Float32Array(2*e*t*5),r=n.getLeftEyeVisibleTanAngles(),s=n.getLeftEyeNoLensTanAngles(),o=n.getLeftEyeVisibleScreenRect(s),a=0,l=0;l\u003C2;l++){for(var c=0;c\u003Ct;c++)for(var u=0;u\u003Ce;u++,a++){var d=u/(e-1),p=c/(t-1),A=d,f=p,m=h(r[0],r[2],d),g=h(r[3],r[1],p),v=Math.sqrt(m*m+g*g),y=n.distortion.distortInverse(v),E=g*y/v;d=(m*y/v-s[0])/(s[2]-s[0]),p=(E-s[3])/(s[1]-s[3]),d=2*(o.x+d*o.width-.5),p=2*(o.y+p*o.height-.5),i[5*a+0]=d,i[5*a+1]=p,i[5*a+2]=A,i[5*a+3]=f,i[5*a+4]=l}var b=r[2]-r[0];r[0]=-(b+r[0]),r[2]=b-r[2],b=s[2]-s[0],s[0]=-(b+s[0]),s[2]=b-s[2],o.x=1-(o.x+o.width)}return i},z.prototype.computeMeshIndices_=function(e,t){for(var n=new Uint16Array(2*(e-1)*(t-1)*6),i=e/2,r=t/2,s=0,o=0,a=0;a\u003C2;a++)for(var l=0;l\u003Ct;l++)for(var c=0;c\u003Ce;c++,s++)0!=c&&0!=l&&(c\u003C=i==l\u003C=r?(n[o++]=s,n[o++]=s-e-1,n[o++]=s-e,n[o++]=s-e-1,n[o++]=s,n[o++]=s-1):(n[o++]=s-1,n[o++]=s-e,n[o++]=s,n[o++]=s-e,n[o++]=s-1,n[o++]=s-e-1));return n},z.prototype.getOwnPropertyDescriptor_=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return void 0!==n.get&&void 0!==n.set||(n.configurable=!0,n.enumerable=!0,n.get=function(){return this.getAttribute(t)},n.set=function(e){this.setAttribute(t,e)}),n};var H=[\"attribute vec2 position;\",\"uniform mat4 projectionMat;\",\"void main() {\",\" gl_Position = projectionMat * vec4( position, -1.0, 1.0 );\",\"}\"].join(\"\\n\"),V=[\"precision mediump float;\",\"uniform vec4 color;\",\"void main() {\",\" gl_FragColor = color;\",\"}\"].join(\"\\n\"),W=Math.PI/180,j=60,q=12,Y=20,X=1,J=.75,K=.3125,Z=4,$=28,ee=1.5;function te(e){this.gl=e,this.attribs={position:0},this.program=_(e,H,V,this.attribs),this.uniforms=I(e,this.program),this.vertexBuffer=e.createBuffer(),this.gearOffset=0,this.gearVertexCount=0,this.arrowOffset=0,this.arrowVertexCount=0,this.projMat=new Float32Array(16),this.listener=null,this.onResize()}function ne(e){this.coefficients=e}te.prototype.destroy=function(){var e=this.gl;this.listener&&e.canvas.removeEventListener(\"click\",this.listener,!1),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer)},te.prototype.listen=function(e,t){var n=this.gl.canvas;this.listener=function(i){var r=n.clientWidth/2,s=$*ee;i.clientX>r-s&&i.clientX\u003Cr+s&&i.clientY>n.clientHeight-s?e(i):i.clientX\u003Cs&&i.clientY\u003Cs&&t(i)},n.addEventListener(\"click\",this.listener,!1)},te.prototype.onResize=function(){var e=this.gl,t=this,n=[e.ARRAY_BUFFER_BINDING];U(e,n,(function(e){var n=[],i=e.drawingBufferWidth/2,r=Math.max(screen.width,screen.height)*window.devicePixelRatio,s=e.drawingBufferWidth/r*window.devicePixelRatio,o=Z*s/2,a=$*ee*s,l=$*s/2,c=($*ee-$)*s;function h(e,t){var r=(90-e)*W,s=Math.cos(r),o=Math.sin(r);n.push(K*s*l+i,K*o*l+l),n.push(t*s*l+i,t*o*l+l)}n.push(i-o,a),n.push(i-o,e.drawingBufferHeight),n.push(i+o,a),n.push(i+o,e.drawingBufferHeight),t.gearOffset=n.length/2;for(var u=0;u\u003C=6;u++){var d=u*j;h(d,X),h(d+q,X),h(d+Y,J),h(d+(j-Y),J),h(d+(j-q),X)}function p(t,i){n.push(c+t,e.drawingBufferHeight-c-i)}t.gearVertexCount=n.length/2-t.gearOffset,t.arrowOffset=n.length/2;var A=o/Math.sin(45*W);p(0,l),p(l,0),p(l+A,A),p(A,l+A),p(A,l-A),p(0,l),p(l,2*l),p(l+A,2*l-A),p(A,l-A),p(0,l),p(A,l-o),p($*s,l-o),p(A,l+o),p($*s,l+o),t.arrowVertexCount=n.length/2-t.arrowOffset,e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(n),e.STATIC_DRAW)}))},te.prototype.render=function(){var e=this.gl,t=this,n=[e.CULL_FACE,e.DEPTH_TEST,e.BLEND,e.SCISSOR_TEST,e.STENCIL_TEST,e.COLOR_WRITEMASK,e.VIEWPORT,e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING];U(e,n,(function(e){e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.BLEND),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.colorMask(!0,!0,!0,!0),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.renderNoState()}))},te.prototype.renderNoState=function(){var e=this.gl;e.useProgram(this.program),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.enableVertexAttribArray(this.attribs.position),e.vertexAttribPointer(this.attribs.position,2,e.FLOAT,!1,8,0),e.uniform4f(this.uniforms.color,1,1,1,1),B(this.projMat,0,e.drawingBufferWidth,0,e.drawingBufferHeight,.1,1024),e.uniformMatrix4fv(this.uniforms.projectionMat,!1,this.projMat),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.drawArrays(e.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount),e.drawArrays(e.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)},ne.prototype.distortInverse=function(e){for(var t=0,n=1,i=e-this.distort(t);Math.abs(n-t)>1e-4;){var r=e-this.distort(n),s=n-r*((n-t)/(r-i));t=n,n=s,i=r}return n},ne.prototype.distort=function(e){for(var t=e*e,n=0,i=0;i\u003Cthis.coefficients.length;i++)n=t*(n+this.coefficients[i]);return(n+1)*e};var ie=Math.PI/180,re=180/Math.PI,se=function(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0};se.prototype={constructor:se,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();if(0!==e){var t=1/e;this.multiplyScalar(t)}else this.x=0,this.y=0,this.z=0;return this},multiplyScalar:function(e){this.x*=e,this.y*=e,this.z*=e},applyQuaternion:function(e){var t=this.x,n=this.y,i=this.z,r=e.x,s=e.y,o=e.z,a=e.w,l=a*t+s*i-o*n,c=a*n+o*t-r*i,h=a*i+r*n-s*t,u=-r*t-s*n-o*i;return this.x=l*a+u*-r+c*-o-h*-s,this.y=c*a+u*-s+h*-r-l*-o,this.z=h*a+u*-o+l*-s-c*-r,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},crossVectors:function(e,t){var n=e.x,i=e.y,r=e.z,s=t.x,o=t.y,a=t.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,this}};var oe,ae,le,ce=function(e,t,n,i){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==i?i:1};function he(e){this.width=e.width||b(),this.height=e.height||x(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}ce.prototype={constructor:ce,set:function(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},setFromEulerXYZ:function(e,t,n){var i=Math.cos(e/2),r=Math.cos(t/2),s=Math.cos(n/2),o=Math.sin(e/2),a=Math.sin(t/2),l=Math.sin(n/2);return this.x=o*r*s+i*a*l,this.y=i*a*s-o*r*l,this.z=i*r*l+o*a*s,this.w=i*r*s-o*a*l,this},setFromEulerYXZ:function(e,t,n){var i=Math.cos(e/2),r=Math.cos(t/2),s=Math.cos(n/2),o=Math.sin(e/2),a=Math.sin(t/2),l=Math.sin(n/2);return this.x=o*r*s+i*a*l,this.y=i*a*s-o*r*l,this.z=i*r*l-o*a*s,this.w=i*r*s+o*a*l,this},setFromAxisAngle:function(e,t){var n=t/2,i=Math.sin(n);return this.x=e.x*i,this.y=e.y*i,this.z=e.z*i,this.w=Math.cos(n),this},multiply:function(e){return this.multiplyQuaternions(this,e)},multiplyQuaternions:function(e,t){var n=e.x,i=e.y,r=e.z,s=e.w,o=t.x,a=t.y,l=t.z,c=t.w;return this.x=n*c+s*o+i*l-r*a,this.y=i*c+s*a+r*o-n*l,this.z=r*c+s*l+n*a-i*o,this.w=s*c-n*o-i*a-r*l,this},inverse:function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.normalize(),this},normalize:function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x=this.x*e,this.y=this.y*e,this.z=this.z*e,this.w=this.w*e),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this.x,i=this.y,r=this.z,s=this.w,o=s*e.w+n*e.x+i*e.y+r*e.z;if(o\u003C0?(this.w=-e.w,this.x=-e.x,this.y=-e.y,this.z=-e.z,o=-o):this.copy(e),o>=1)return this.w=s,this.x=n,this.y=i,this.z=r,this;var a=Math.acos(o),l=Math.sqrt(1-o*o);if(Math.abs(l)\u003C.001)return this.w=.5*(s+this.w),this.x=.5*(n+this.x),this.y=.5*(i+this.y),this.z=.5*(r+this.z),this;var c=Math.sin((1-t)*a)/l,h=Math.sin(t*a)/l;return this.w=s*c+this.w*h,this.x=n*c+this.x*h,this.y=i*c+this.y*h,this.z=r*c+this.z*h,this},setFromUnitVectors:(le=1e-6,function(e,t){return void 0===oe&&(oe=new se),(ae=e.dot(t)+1)\u003Cle?(ae=0,Math.abs(e.x)>Math.abs(e.z)?oe.set(-e.y,e.x,0):oe.set(0,-e.z,e.y)):oe.crossVectors(e,t),this.x=oe.x,this.y=oe.y,this.z=oe.z,this.w=ae,this.normalize(),this})};var ue=new he({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),de=new he({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),pe={CardboardV1:new fe({id:\"CardboardV1\",label:\"Cardboard I/O 2014\",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new fe({id:\"CardboardV2\",label:\"Cardboard I/O 2015\",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};function Ae(e,t){this.viewer=pe.CardboardV2,this.updateDeviceParams(e),this.distortion=new ne(this.viewer.distortionCoefficients);for(var n=0;n\u003Ct.length;n++){var i=t[n];pe[i.id]=new fe(i)}}function fe(e){this.id=e.id,this.label=e.label,this.fov=e.fov,this.interLensDistance=e.interLensDistance,this.baselineLensDistance=e.baselineLensDistance,this.screenLensDistance=e.screenLensDistance,this.distortionCoefficients=e.distortionCoefficients,this.inverseCoefficients=e.inverseCoefficients}Ae.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device},Ae.prototype.getDevice=function(){return this.device},Ae.prototype.setViewer=function(e){this.viewer=e,this.distortion=new ne(this.viewer.distortionCoefficients)},Ae.prototype.determineDevice_=function(e){if(!e)return u()?(console.warn(\"Using fallback iOS device measurements.\"),de):(console.warn(\"Using fallback Android device measurements.\"),ue);var t=.0254,n=t/e.xdpi,i=t/e.ydpi;return new he({widthMeters:n*b(),heightMeters:i*x(),bevelMeters:.001*e.bevelMm})},Ae.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer,t=this.device,n=this.distortion,i=e.screenLensDistance,r=(t.widthMeters-e.interLensDistance)/2,s=e.interLensDistance/2,o=e.baselineLensDistance-t.bevelMeters,a=t.heightMeters-o,l=re*Math.atan(n.distort(r/i)),c=re*Math.atan(n.distort(s/i)),h=re*Math.atan(n.distort(o/i)),u=re*Math.atan(n.distort(a/i));return{leftDegrees:Math.min(l,e.fov),rightDegrees:Math.min(c,e.fov),downDegrees:Math.min(h,e.fov),upDegrees:Math.min(u,e.fov)}},Ae.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,i=Math.tan(-ie*e.fov),r=Math.tan(ie*e.fov),s=Math.tan(ie*e.fov),o=Math.tan(-ie*e.fov),a=t.widthMeters/4,l=t.heightMeters/2,c=e.baselineLensDistance-t.bevelMeters-l,h=e.interLensDistance/2-a,u=-c,d=e.screenLensDistance,p=n.distort((h-a)/d),A=n.distort((u+l)/d),f=n.distort((h+a)/d),m=n.distort((u-l)/d),g=new Float32Array(4);return g[0]=Math.max(i,p),g[1]=Math.min(r,A),g[2]=Math.min(s,f),g[3]=Math.max(o,m),g},Ae.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,i=new Float32Array(4),r=n.distortInverse(Math.tan(-ie*e.fov)),s=n.distortInverse(Math.tan(ie*e.fov)),o=n.distortInverse(Math.tan(ie*e.fov)),a=n.distortInverse(Math.tan(-ie*e.fov)),l=t.widthMeters/4,c=t.heightMeters/2,h=e.baselineLensDistance-t.bevelMeters-c,u=e.interLensDistance/2-l,d=-h,p=e.screenLensDistance,A=(u-l)/p,f=(d+c)/p,m=(u+l)/p,g=(d-c)/p;return i[0]=Math.max(r,A),i[1]=Math.min(s,f),i[2]=Math.min(o,m),i[3]=Math.max(a,g),i},Ae.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer,n=this.device,i=t.screenLensDistance,r=(n.widthMeters-t.interLensDistance)/2,s=t.baselineLensDistance-n.bevelMeters,o=(e[0]*i+r)/n.widthMeters,a=(e[1]*i+s)/n.heightMeters,l=(e[2]*i+r)/n.widthMeters,c=(e[3]*i+s)/n.heightMeters;return{x:o,y:c,width:l-o,height:a-c}},Ae.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},Ae.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}},Ae.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:re*Math.atan(e.outerDist),rightDegrees:re*Math.atan(e.innerDist),downDegrees:re*Math.atan(e.bottomDist),upDegrees:re*Math.atan(e.topDist)}},Ae.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.viewer,n=this.device,i=t.screenLensDistance,r=n.widthMeters/i,s=n.heightMeters/i,o=n.width/r,a=n.height/s,l=Math.round((e.eyePosX-e.outerDist)*o),c=Math.round((e.eyePosY-e.bottomDist)*a);return{x:l,y:c,width:Math.round((e.eyePosX+e.innerDist)*o)-l,height:Math.round((e.eyePosY+e.topDist)*a)-c}},Ae.prototype.getUndistortedParams_=function(){var e=this.viewer,t=this.device,n=this.distortion,i=e.screenLensDistance,r=e.interLensDistance/2/i,s=t.widthMeters/i,o=t.heightMeters/i,a=s/2-r,l=(e.baselineLensDistance-t.bevelMeters)/i,c=e.fov,h=n.distortInverse(Math.tan(ie*c)),u=Math.min(a,h),d=Math.min(r,h),p=Math.min(l,h);return{outerDist:u,innerDist:d,topDist:Math.min(o-l,h),bottomDist:p,eyePosX:a,eyePosY:l}},Ae.Viewers=pe;var me={format:1,last_updated:\"2019-11-09T17:36:14Z\",devices:[{type:\"android\",rules:[{mdmh:\"asus/*/Nexus 7/*\"},{ua:\"Nexus 7\"}],dpi:[320.8,323],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"asus/*/ASUS_X00PD/*\"},{ua:\"ASUS_X00PD\"}],dpi:245,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"asus/*/ASUS_X008D/*\"},{ua:\"ASUS_X008D\"}],dpi:282,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"asus/*/ASUS_Z00AD/*\"},{ua:\"ASUS_Z00AD\"}],dpi:[403,404.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Google/*/Pixel 2 XL/*\"},{ua:\"Pixel 2 XL\"}],dpi:537.9,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Google/*/Pixel 3 XL/*\"},{ua:\"Pixel 3 XL\"}],dpi:[558.5,553.8],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Google/*/Pixel XL/*\"},{ua:\"Pixel XL\"}],dpi:[537.9,533],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Google/*/Pixel 3/*\"},{ua:\"Pixel 3\"}],dpi:442.4,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Google/*/Pixel 2/*\"},{ua:\"Pixel 2\"}],dpi:441,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"Google/*/Pixel/*\"},{ua:\"Pixel\"}],dpi:[432.6,436.7],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"HTC/*/HTC6435LVW/*\"},{ua:\"HTC6435LVW\"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"HTC/*/HTC One XL/*\"},{ua:\"HTC One XL\"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"htc/*/Nexus 9/*\"},{ua:\"Nexus 9\"}],dpi:289,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"HTC/*/HTC One M9/*\"},{ua:\"HTC One M9\"}],dpi:[442.5,443.3],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"HTC/*/HTC One_M8/*\"},{ua:\"HTC One_M8\"}],dpi:[449.7,447.4],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"HTC/*/HTC One/*\"},{ua:\"HTC One\"}],dpi:472.8,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Huawei/*/Nexus 6P/*\"},{ua:\"Nexus 6P\"}],dpi:[515.1,518],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Huawei/*/BLN-L24/*\"},{ua:\"HONORBLN-L24\"}],dpi:480,bw:4,ac:500},{type:\"android\",rules:[{mdmh:\"Huawei/*/BKL-L09/*\"},{ua:\"BKL-L09\"}],dpi:403,bw:3.47,ac:500},{type:\"android\",rules:[{mdmh:\"LENOVO/*/Lenovo PB2-690Y/*\"},{ua:\"Lenovo PB2-690Y\"}],dpi:[457.2,454.713],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"LGE/*/Nexus 5X/*\"},{ua:\"Nexus 5X\"}],dpi:[422,419.9],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"LGE/*/LGMS345/*\"},{ua:\"LGMS345\"}],dpi:[221.7,219.1],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"LGE/*/LG-D800/*\"},{ua:\"LG-D800\"}],dpi:[422,424.1],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"LGE/*/LG-D850/*\"},{ua:\"LG-D850\"}],dpi:[537.9,541.9],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"LGE/*/VS985 4G/*\"},{ua:\"VS985 4G\"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"LGE/*/Nexus 5/*\"},{ua:\"Nexus 5 B\"}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"LGE/*/Nexus 4/*\"},{ua:\"Nexus 4\"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"LGE/*/LG-P769/*\"},{ua:\"LG-P769\"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"LGE/*/LGMS323/*\"},{ua:\"LGMS323\"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"LGE/*/LGLS996/*\"},{ua:\"LGLS996\"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Micromax/*/4560MMX/*\"},{ua:\"4560MMX\"}],dpi:[240,219.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Micromax/*/A250/*\"},{ua:\"Micromax A250\"}],dpi:[480,446.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Micromax/*/Micromax AQ4501/*\"},{ua:\"Micromax AQ4501\"}],dpi:240,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"motorola/*/G5/*\"},{ua:\"Moto G (5) Plus\"}],dpi:[403.4,403],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/DROID RAZR/*\"},{ua:\"DROID RAZR\"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/XT830C/*\"},{ua:\"XT830C\"}],dpi:[254,255.9],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1021/*\"},{ua:\"XT1021\"}],dpi:[254,256.7],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1023/*\"},{ua:\"XT1023\"}],dpi:[254,256.7],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1028/*\"},{ua:\"XT1028\"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1034/*\"},{ua:\"XT1034\"}],dpi:[326.6,328.4],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1053/*\"},{ua:\"XT1053\"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1562/*\"},{ua:\"XT1562\"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/Nexus 6/*\"},{ua:\"Nexus 6 B\"}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1063/*\"},{ua:\"XT1063\"}],dpi:[295,296.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1064/*\"},{ua:\"XT1064\"}],dpi:[295,295.6],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1092/*\"},{ua:\"XT1092\"}],dpi:[422,424.1],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"motorola/*/XT1095/*\"},{ua:\"XT1095\"}],dpi:[422,423.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"motorola/*/G4/*\"},{ua:\"Moto G (4)\"}],dpi:401,bw:4,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/A0001/*\"},{ua:\"A0001\"}],dpi:[403.4,401],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONE E1001/*\"},{ua:\"ONE E1001\"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONE E1003/*\"},{ua:\"ONE E1003\"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONE E1005/*\"},{ua:\"ONE E1005\"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONE A2001/*\"},{ua:\"ONE A2001\"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONE A2003/*\"},{ua:\"ONE A2003\"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONE A2005/*\"},{ua:\"ONE A2005\"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A3000/*\"},{ua:\"ONEPLUS A3000\"}],dpi:401,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A3003/*\"},{ua:\"ONEPLUS A3003\"}],dpi:401,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A3010/*\"},{ua:\"ONEPLUS A3010\"}],dpi:401,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A5000/*\"},{ua:\"ONEPLUS A5000 \"}],dpi:[403.411,399.737],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONE A5010/*\"},{ua:\"ONEPLUS A5010\"}],dpi:[403,400],bw:2,ac:1e3},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A6000/*\"},{ua:\"ONEPLUS A6000\"}],dpi:401,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A6003/*\"},{ua:\"ONEPLUS A6003\"}],dpi:401,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A6010/*\"},{ua:\"ONEPLUS A6010\"}],dpi:401,bw:2,ac:500},{type:\"android\",rules:[{mdmh:\"OnePlus/*/ONEPLUS A6013/*\"},{ua:\"ONEPLUS A6013\"}],dpi:401,bw:2,ac:500},{type:\"android\",rules:[{mdmh:\"OPPO/*/X909/*\"},{ua:\"X909\"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-I9082/*\"},{ua:\"GT-I9082\"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G360P/*\"},{ua:\"SM-G360P\"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/Nexus S/*\"},{ua:\"Nexus S\"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-I9300/*\"},{ua:\"GT-I9300\"}],dpi:[304.8,303.9],bw:5,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-T230NU/*\"},{ua:\"SM-T230NU\"}],dpi:216,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SGH-T399/*\"},{ua:\"SGH-T399\"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SGH-M919/*\"},{ua:\"SGH-M919\"}],dpi:[440.8,437.7],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-N9005/*\"},{ua:\"SM-N9005\"}],dpi:[386.4,387],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SAMSUNG-SM-N900A/*\"},{ua:\"SAMSUNG-SM-N900A\"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-I9500/*\"},{ua:\"GT-I9500\"}],dpi:[442.5,443.3],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-I9505/*\"},{ua:\"GT-I9505\"}],dpi:439.4,bw:4,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G900F/*\"},{ua:\"SM-G900F\"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G900M/*\"},{ua:\"SM-G900M\"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G800F/*\"},{ua:\"SM-G800F\"}],dpi:326.8,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G906S/*\"},{ua:\"SM-G906S\"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-I9300/*\"},{ua:\"GT-I9300\"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-T535/*\"},{ua:\"SM-T535\"}],dpi:[142.6,136.4],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-N920C/*\"},{ua:\"SM-N920C\"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-N920P/*\"},{ua:\"SM-N920P\"}],dpi:[386.3655,390.144],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-N920W8/*\"},{ua:\"SM-N920W8\"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-I9300I/*\"},{ua:\"GT-I9300I\"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-I9195/*\"},{ua:\"GT-I9195\"}],dpi:[249.4,256.7],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SPH-L520/*\"},{ua:\"SPH-L520\"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SAMSUNG-SGH-I717/*\"},{ua:\"SAMSUNG-SGH-I717\"}],dpi:285.8,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SPH-D710/*\"},{ua:\"SPH-D710\"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/GT-N7100/*\"},{ua:\"GT-N7100\"}],dpi:265.1,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SCH-I605/*\"},{ua:\"SCH-I605\"}],dpi:265.1,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/Galaxy Nexus/*\"},{ua:\"Galaxy Nexus\"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-N910H/*\"},{ua:\"SM-N910H\"}],dpi:[515.1,518],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-N910C/*\"},{ua:\"SM-N910C\"}],dpi:[515.2,520.2],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G130M/*\"},{ua:\"SM-G130M\"}],dpi:[165.9,164.8],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G928I/*\"},{ua:\"SM-G928I\"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G920F/*\"},{ua:\"SM-G920F\"}],dpi:580.6,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G920P/*\"},{ua:\"SM-G920P\"}],dpi:[522.5,577],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G925F/*\"},{ua:\"SM-G925F\"}],dpi:580.6,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G925V/*\"},{ua:\"SM-G925V\"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G930F/*\"},{ua:\"SM-G930F\"}],dpi:576.6,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G935F/*\"},{ua:\"SM-G935F\"}],dpi:533,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G950F/*\"},{ua:\"SM-G950F\"}],dpi:[562.707,565.293],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G955U/*\"},{ua:\"SM-G955U\"}],dpi:[522.514,525.762],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G955F/*\"},{ua:\"SM-G955F\"}],dpi:[522.514,525.762],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G960F/*\"},{ua:\"SM-G960F\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G9600/*\"},{ua:\"SM-G9600\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G960T/*\"},{ua:\"SM-G960T\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G960N/*\"},{ua:\"SM-G960N\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G960U/*\"},{ua:\"SM-G960U\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G9608/*\"},{ua:\"SM-G9608\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G960FD/*\"},{ua:\"SM-G960FD\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G960W/*\"},{ua:\"SM-G960W\"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G965F/*\"},{ua:\"SM-G965F\"}],dpi:529,bw:2,ac:1e3},{type:\"android\",rules:[{mdmh:\"Sony/*/C6903/*\"},{ua:\"C6903\"}],dpi:[442.5,443.3],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"Sony/*/D6653/*\"},{ua:\"D6653\"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Sony/*/E6653/*\"},{ua:\"E6653\"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Sony/*/E6853/*\"},{ua:\"E6853\"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Sony/*/SGP321/*\"},{ua:\"SGP321\"}],dpi:[224.7,224.1],bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"TCT/*/ALCATEL ONE TOUCH Fierce/*\"},{ua:\"ALCATEL ONE TOUCH Fierce\"}],dpi:[240,247.5],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"THL/*/thl 5000/*\"},{ua:\"thl 5000\"}],dpi:[480,443.3],bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"Fly/*/IQ4412/*\"},{ua:\"IQ4412\"}],dpi:307.9,bw:3,ac:1e3},{type:\"android\",rules:[{mdmh:\"ZTE/*/ZTE Blade L2/*\"},{ua:\"ZTE Blade L2\"}],dpi:240,bw:3,ac:500},{type:\"android\",rules:[{mdmh:\"BENEVE/*/VR518/*\"},{ua:\"VR518\"}],dpi:480,bw:3,ac:500},{type:\"ios\",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:\"ios\",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:\"ios\",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:\"ios\",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:\"ios\",rules:[{res:[1125,2001]}],dpi:[410.9,415.4],bw:4,ac:1e3},{type:\"ios\",rules:[{res:[1125,2436]}],dpi:458,bw:4,ac:1e3},{type:\"android\",rules:[{mdmh:\"Huawei/*/EML-L29/*\"},{ua:\"EML-L29\"}],dpi:428,bw:3.45,ac:500},{type:\"android\",rules:[{mdmh:\"Nokia/*/Nokia 7.1/*\"},{ua:\"Nokia 7.1\"}],dpi:[432,431.9],bw:3,ac:500},{type:\"ios\",rules:[{res:[1242,2688]}],dpi:458,bw:4,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G570M/*\"},{ua:\"SM-G570M\"}],dpi:320,bw:3.684,ac:1e3},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G970F/*\"},{ua:\"SM-G970F\"}],dpi:438,bw:2.281,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G973F/*\"},{ua:\"SM-G973F\"}],dpi:550,bw:2.002,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G975F/*\"},{ua:\"SM-G975F\"}],dpi:522,bw:2.054,ac:500},{type:\"android\",rules:[{mdmh:\"samsung/*/SM-G977F/*\"},{ua:\"SM-G977F\"}],dpi:505,bw:2.334,ac:500},{type:\"ios\",rules:[{res:[828,1792]}],dpi:326,bw:5,ac:500}]};function ge(e,t){if(this.dpdb=me,this.recalculateDeviceParams_(),e){this.onDeviceParamsUpdated=t;var n=new XMLHttpRequest,i=this;n.open(\"GET\",e,!0),n.addEventListener(\"load\",(function(){i.loading=!1,n.status>=200&&n.status\u003C=299?(i.dpdb=JSON.parse(n.response),i.recalculateDeviceParams_()):console.error(\"Error loading online DPDB!\")})),n.send()}}function ve(e){this.xdpi=e.xdpi,this.ydpi=e.ydpi,this.bevelMm=e.bevelMm}function ye(e,t){this.set(e,t)}function Ee(e,t){this.kFilter=e,this.isDebug=t,this.currentAccelMeasurement=new ye,this.currentGyroMeasurement=new ye,this.previousGyroMeasurement=new ye,u()?this.filterQ=new ce(-1,0,0,1):this.filterQ=new ce(1,0,0,1),this.previousFilterQ=new ce,this.previousFilterQ.copy(this.filterQ),this.accelQ=new ce,this.isOrientationInitialized=!1,this.estimatedGravity=new se,this.measuredGravity=new se,this.gyroIntegralQ=new ce}function be(e,t){this.predictionTimeS=e,this.isDebug=t,this.previousQ=new ce,this.previousTimestampS=null,this.deltaQ=new ce,this.outQ=new ce}function xe(e,t,n,i){this.yawOnly=n,this.accelerometer=new se,this.gyroscope=new se,this.filter=new Ee(e,i),this.posePredictor=new be(t,i),this.isFirefoxAndroid=A(),this.isIOS=u();var r=f();this.isDeviceMotionInRadians=!this.isIOS&&r&&r\u003C66,this.isWithoutDeviceMotion=g()||m(),this.filterToWorldQ=new ce,u()?this.filterToWorldQ.setFromAxisAngle(new se(1,0,0),Math.PI/2):this.filterToWorldQ.setFromAxisAngle(new se(1,0,0),-Math.PI/2),this.inverseWorldToScreenQ=new ce,this.worldToScreenQ=new ce,this.originalPoseAdjustQ=new ce,this.originalPoseAdjustQ.setFromAxisAngle(new se(0,0,1),-window.orientation*Math.PI/180),this.setScreenTransform_(),y()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new ce,this.orientationOut_=new Float32Array(4),this.start()}ge.prototype.getDeviceParams=function(){return this.deviceParams},ge.prototype.recalculateDeviceParams_=function(){var e=this.calcDeviceParams_();e?(this.deviceParams=e,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error(\"Failed to recalculate device parameters.\")},ge.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e)return console.error(\"DPDB not available.\"),null;if(1!=e.format)return console.error(\"DPDB has unexpected format version.\"),null;if(!e.devices||!e.devices.length)return console.error(\"DPDB does not have a devices section.\"),null;var t=navigator.userAgent||navigator.vendor||window.opera,n=b(),i=x();if(!e.devices)return console.error(\"DPDB has no devices section.\"),null;for(var r=0;r\u003Ce.devices.length;r++){var s=e.devices[r];if(s.rules)if(\"ios\"==s.type||\"android\"==s.type){if(u()==(\"ios\"==s.type)){for(var o=!1,a=0;a\u003Cs.rules.length;a++){var l=s.rules[a];if(this.ruleMatches_(l,t,n,i)){o=!0;break}}if(o)return new ve({xdpi:s.dpi[0]||s.dpi,ydpi:s.dpi[1]||s.dpi,bevelMm:s.bw})}}else console.warn(\"Device[\"+r+\"] has invalid type.\");else console.warn(\"Device[\"+r+\"] has no rules section.\")}return console.warn(\"No DPDB device match.\"),null},ge.prototype.ruleMatches_=function(e,t,n,i){if(!e.ua&&!e.res)return!1;if(e.ua&&\"SM\"===e.ua.substring(0,2)&&(e.ua=e.ua.substring(0,7)),e.ua&&t.indexOf(e.ua)\u003C0)return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var r=e.res[0],s=e.res[1];if(Math.min(n,i)!=Math.min(r,s)||Math.max(n,i)!=Math.max(r,s))return!1}return!0},ye.prototype.set=function(e,t){this.sample=e,this.timestampS=t},ye.prototype.copy=function(e){this.set(e.sample,e.timestampS)},Ee.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)},Ee.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var n=t-this.previousGyroMeasurement.timestampS;E(n)&&this.run_(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},Ee.prototype.run_=function(){if(!this.isOrientationInitialized)return this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(t);var n=new ce;n.copy(this.filterQ),n.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(n),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var i=new ce;i.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),i.inverse(),this.isDebug&&console.log(\"Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)\",re*k(i),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var r=new ce;r.copy(this.filterQ),r.multiply(i),this.filterQ.slerp(r,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},Ee.prototype.getOrientation=function(){return this.filterQ},Ee.prototype.accelToQuaternion_=function(e){var t=new se;t.copy(e),t.normalize();var n=new ce;return n.setFromUnitVectors(new se(0,0,-1),t),n.inverse(),n},Ee.prototype.gyroToQuaternionDelta_=function(e,t){var n=new ce,i=new se;return i.copy(e),i.normalize(),n.setFromAxisAngle(i,e.length()*t),n},be.prototype.getPrediction=function(e,t,n){if(!this.previousTimestampS)return this.previousQ.copy(e),this.previousTimestampS=n,e;var i=new se;i.copy(t),i.normalize();var r=t.length();if(r\u003C20*ie)return this.isDebug&&console.log(\"Moving slowly, at %s deg/s: no prediction\",(re*r).toFixed(1)),this.outQ.copy(e),this.previousQ.copy(e),this.outQ;var s=r*this.predictionTimeS;return this.deltaQ.setFromAxisAngle(i,s),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(e),this.previousTimestampS=n,this.outQ},xe.prototype.getPosition=function(){return null},xe.prototype.getOrientation=function(){var e=void 0;if(this.isWithoutDeviceMotion&&this._deviceOrientationQ)return this.deviceOrientationFixQ=this.deviceOrientationFixQ||(n=(new ce).setFromAxisAngle(new se(0,0,-1),0),i=new ce,-90===window.orientation?i.setFromAxisAngle(new se(0,1,0),Math.PI/-2):i.setFromAxisAngle(new se(0,1,0),Math.PI/2),n.multiply(i)),this.deviceOrientationFilterToWorldQ=this.deviceOrientationFilterToWorldQ||((t=new ce).setFromAxisAngle(new se(1,0,0),-Math.PI/2),t),e=this._deviceOrientationQ,(r=new ce).copy(e),r.multiply(this.deviceOrientationFilterToWorldQ),r.multiply(this.resetQ),r.multiply(this.worldToScreenQ),r.multiplyQuaternions(this.deviceOrientationFixQ,r),this.yawOnly&&(r.x=0,r.z=0,r.normalize()),this.orientationOut_[0]=r.x,this.orientationOut_[1]=r.y,this.orientationOut_[2]=r.z,this.orientationOut_[3]=r.w,this.orientationOut_;var t,n,i,r,s=this.filter.getOrientation();return e=this.posePredictor.getPrediction(s,this.gyroscope,this.previousTimestampS),(r=new ce).copy(this.filterToWorldQ),r.multiply(this.resetQ),r.multiply(e),r.multiply(this.worldToScreenQ),this.yawOnly&&(r.x=0,r.z=0,r.normalize()),this.orientationOut_[0]=r.x,this.orientationOut_[1]=r.y,this.orientationOut_[2]=r.z,this.orientationOut_[3]=r.w,this.orientationOut_},xe.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),y()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ)},xe.prototype.onDeviceOrientation_=function(e){this._deviceOrientationQ=this._deviceOrientationQ||new ce;var t=e.alpha,n=e.beta,i=e.gamma;t=(t||0)*Math.PI/180,n=(n||0)*Math.PI/180,i=(i||0)*Math.PI/180,this._deviceOrientationQ.setFromEulerYXZ(n,t,-i)},xe.prototype.onDeviceMotion_=function(e){this.updateDeviceMotion_(e)},xe.prototype.updateDeviceMotion_=function(e){var t=e.accelerationIncludingGravity,n=e.rotationRate,i=e.timeStamp/1e3,r=i-this.previousTimestampS;return r\u003C0?(F(\"fusion-pose-sensor:invalid:non-monotonic\",\"Invalid timestamps detected: non-monotonic timestamp from devicemotion\"),void(this.previousTimestampS=i)):r\u003C=a||r>l?(F(\"fusion-pose-sensor:invalid:outside-threshold\",\"Invalid timestamps detected: Timestamp from devicemotion outside expected range.\"),void(this.previousTimestampS=i)):(this.accelerometer.set(-t.x,-t.y,-t.z),n&&(v()?this.gyroscope.set(-n.beta,n.alpha,n.gamma):this.gyroscope.set(n.alpha,n.beta,n.gamma),this.isDeviceMotionInRadians||this.gyroscope.multiplyScalar(Math.PI/180),this.filter.addGyroMeasurement(this.gyroscope,i)),this.filter.addAccelMeasurement(this.accelerometer,i),void(this.previousTimestampS=i))},xe.prototype.onOrientationChange_=function(e){this.setScreenTransform_()},xe.prototype.onMessage_=function(e){var t=e.data;t&&t.type&&\"devicemotion\"===t.type.toLowerCase()&&this.updateDeviceMotion_(t.deviceMotionEvent)},xe.prototype.setScreenTransform_=function(){switch(this.worldToScreenQ.set(0,0,0,1),window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new se(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new se(0,0,1),Math.PI/2)}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},xe.prototype.start=function(){this.onDeviceMotionCallback_=this.onDeviceMotion_.bind(this),this.onOrientationChangeCallback_=this.onOrientationChange_.bind(this),this.onMessageCallback_=this.onMessage_.bind(this),this.onDeviceOrientationCallback_=this.onDeviceOrientation_.bind(this),u()&&R()&&window.addEventListener(\"message\",this.onMessageCallback_),window.addEventListener(\"orientationchange\",this.onOrientationChangeCallback_),this.isWithoutDeviceMotion?window.addEventListener(\"deviceorientation\",this.onDeviceOrientationCallback_):window.addEventListener(\"devicemotion\",this.onDeviceMotionCallback_)},xe.prototype.stop=function(){window.removeEventListener(\"devicemotion\",this.onDeviceMotionCallback_),window.removeEventListener(\"deviceorientation\",this.onDeviceOrientationCallback_),window.removeEventListener(\"orientationchange\",this.onOrientationChangeCallback_),window.removeEventListener(\"message\",this.onMessageCallback_)};var we=60,Ce=new se(1,0,0),Me=new se(0,0,1),_e=new ce;_e.setFromAxisAngle(Ce,-Math.PI/2),_e.multiply((new ce).setFromAxisAngle(Me,Math.PI/2));var Ie=function(){function e(t){r(this,e),this.config=t,this.sensor=null,this.fusionSensor=null,this._out=new Float32Array(4),this.api=null,this.errors=[],this._sensorQ=new ce,this._outQ=new ce,this._onSensorRead=this._onSensorRead.bind(this),this._onSensorError=this._onSensorError.bind(this),this.init()}return s(e,[{key:\"init\",value:function(){var e=null;try{(e=new RelativeOrientationSensor({frequency:we,referenceFrame:\"screen\"})).addEventListener(\"error\",this._onSensorError)}catch(e){this.errors.push(e),\"SecurityError\"===e.name?(console.error(\"Cannot construct sensors due to the Feature Policy\"),console.warn('Attempting to fall back using \"devicemotion\"; however this will fail in the future without correct permissions.'),this.useDeviceMotion()):\"ReferenceError\"===e.name?this.useDeviceMotion():console.error(e)}e&&(this.api=\"sensor\",this.sensor=e,this.sensor.addEventListener(\"reading\",this._onSensorRead),this.sensor.start())}},{key:\"useDeviceMotion\",value:function(){this.api=\"devicemotion\",this.fusionSensor=new xe(this.config.K_FILTER,this.config.PREDICTION_TIME_S,this.config.YAW_ONLY,this.config.DEBUG),this.sensor&&(this.sensor.removeEventListener(\"reading\",this._onSensorRead),this.sensor.removeEventListener(\"error\",this._onSensorError),this.sensor=null)}},{key:\"getOrientation\",value:function(){if(this.fusionSensor)return this.fusionSensor.getOrientation();if(!this.sensor||!this.sensor.quaternion)return this._out[0]=this._out[1]=this._out[2]=0,this._out[3]=1,this._out;var e=this.sensor.quaternion;this._sensorQ.set(e[0],e[1],e[2],e[3]);var t=this._outQ;return t.copy(_e),t.multiply(this._sensorQ),this.config.YAW_ONLY&&(t.x=t.z=0,t.normalize()),this._out[0]=t.x,this._out[1]=t.y,this._out[2]=t.z,this._out[3]=t.w,this._out}},{key:\"_onSensorError\",value:function(e){this.errors.push(e.error),\"NotAllowedError\"===e.error.name?console.error(\"Permission to access sensor was denied\"):\"NotReadableError\"===e.error.name?console.error(\"Sensor could not be read\"):console.error(e.error),this.useDeviceMotion()}},{key:\"_onSensorRead\",value:function(){}}]),e}(),Be=\"\u003Csvg width='198' height='240' viewBox='0 0 198 240' xmlns='http://www.w3.org/2000/svg'>\u003Cg fill='none' fill-rule='evenodd'>\u003Cpath d='M149.625 109.527l6.737 3.891v.886c0 .177.013.36.038.549.01.081.02.162.027.242.14 1.415.974 2.998 2.105 3.999l5.72 5.062.081-.09s4.382-2.53 5.235-3.024l25.97 14.993v54.001c0 .771-.386 1.217-.948 1.217-.233 0-.495-.076-.772-.236l-23.967-13.838-.014.024-27.322 15.775-.85-1.323c-4.731-1.529-9.748-2.74-14.951-3.61a.27.27 0 0 0-.007.024l-5.067 16.961-7.891 4.556-.037-.063v27.59c0 .772-.386 1.217-.948 1.217-.232 0-.495-.076-.772-.236l-42.473-24.522c-.95-.549-1.72-1.877-1.72-2.967v-1.035l-.021.047a5.111 5.111 0 0 0-1.816-.399 5.682 5.682 0 0 0-.546.001 13.724 13.724 0 0 1-1.918-.041c-1.655-.153-3.2-.6-4.404-1.296l-46.576-26.89.005.012-10.278-18.75c-1.001-1.827-.241-4.216 1.698-5.336l56.011-32.345a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.659 3.227 1.853l.005-.003.227.413-.006.004a9.63 9.63 0 0 0 1.477 2.018l.277.27c1.914 1.85 4.468 2.801 7.113 2.801 1.949 0 3.948-.517 5.775-1.572.013 0 7.319-4.219 7.319-4.219a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.658 3.226 1.853l3.25 5.928.022-.018 6.785 3.917-.105-.182 46.881-26.965m0-1.635c-.282 0-.563.073-.815.218l-46.169 26.556-5.41-3.124-3.005-5.481c-.913-1.667-2.699-2.702-4.66-2.703-1.011 0-2.02.274-2.917.792a3825 3825 0 0 1-7.275 4.195l-.044.024a9.937 9.937 0 0 1-4.957 1.353c-2.292 0-4.414-.832-5.976-2.342l-.252-.245a7.992 7.992 0 0 1-1.139-1.534 1.379 1.379 0 0 0-.06-.122l-.227-.414a1.718 1.718 0 0 0-.095-.154c-.938-1.574-2.673-2.545-4.571-2.545-1.011 0-2.02.274-2.917.792L3.125 155.502c-2.699 1.559-3.738 4.94-2.314 7.538l10.278 18.75c.177.323.448.563.761.704l46.426 26.804c1.403.81 3.157 1.332 5.072 1.508a15.661 15.661 0 0 0 2.146.046 4.766 4.766 0 0 1 .396 0c.096.004.19.011.283.022.109 1.593 1.159 3.323 2.529 4.114l42.472 24.522c.524.302 1.058.455 1.59.455 1.497 0 2.583-1.2 2.583-2.852v-26.562l7.111-4.105a1.64 1.64 0 0 0 .749-.948l4.658-15.593c4.414.797 8.692 1.848 12.742 3.128l.533.829a1.634 1.634 0 0 0 2.193.531l26.532-15.317L193 192.433c.523.302 1.058.455 1.59.455 1.497 0 2.583-1.199 2.583-2.852v-54.001c0-.584-.312-1.124-.818-1.416l-25.97-14.993a1.633 1.633 0 0 0-1.636.001c-.606.351-2.993 1.73-4.325 2.498l-4.809-4.255c-.819-.725-1.461-1.933-1.561-2.936a7.776 7.776 0 0 0-.033-.294 2.487 2.487 0 0 1-.023-.336v-.886c0-.584-.312-1.123-.817-1.416l-6.739-3.891a1.633 1.633 0 0 0-.817-.219' fill='#455A64'/>\u003Cpath d='M96.027 132.636l46.576 26.891c1.204.695 1.979 1.587 2.242 2.541l-.01.007-81.374 46.982h-.001c-1.654-.152-3.199-.6-4.403-1.295l-46.576-26.891 83.546-48.235' fill='#FAFAFA'/>\u003Cpath d='M63.461 209.174c-.008 0-.015 0-.022-.002-1.693-.156-3.228-.609-4.441-1.309l-46.576-26.89a.118.118 0 0 1 0-.203l83.546-48.235a.117.117 0 0 1 .117 0l46.576 26.891c1.227.708 2.021 1.612 2.296 2.611a.116.116 0 0 1-.042.124l-.021.016-81.375 46.981a.11.11 0 0 1-.058.016zm-50.747-28.303l46.401 26.79c1.178.68 2.671 1.121 4.32 1.276l81.272-46.922c-.279-.907-1.025-1.73-2.163-2.387l-46.517-26.857-83.313 48.1z' fill='#607D8B'/>\u003Cpath d='M148.327 165.471a5.85 5.85 0 0 1-.546.001c-1.894-.083-3.302-1.038-3.145-2.132a2.693 2.693 0 0 0-.072-1.105l-81.103 46.822c.628.058 1.272.073 1.918.042.182-.009.364-.009.546-.001 1.894.083 3.302 1.038 3.145 2.132l79.257-45.759' fill='#FFF'/>\u003Cpath d='M69.07 211.347a.118.118 0 0 1-.115-.134c.045-.317-.057-.637-.297-.925-.505-.61-1.555-1.022-2.738-1.074a5.966 5.966 0 0 0-.535.001 14.03 14.03 0 0 1-1.935-.041.117.117 0 0 1-.103-.092.116.116 0 0 1 .055-.126l81.104-46.822a.117.117 0 0 1 .171.07c.104.381.129.768.074 1.153-.045.316.057.637.296.925.506.61 1.555 1.021 2.739 1.073.178.008.357.008.535-.001a.117.117 0 0 1 .064.218l-79.256 45.759a.114.114 0 0 1-.059.016zm-3.405-2.372c.089 0 .177.002.265.006 1.266.056 2.353.488 2.908 1.158.227.274.35.575.36.882l78.685-45.429c-.036 0-.072-.001-.107-.003-1.267-.056-2.354-.489-2.909-1.158-.282-.34-.402-.724-.347-1.107a2.604 2.604 0 0 0-.032-.91L63.846 208.97a13.91 13.91 0 0 0 1.528.012c.097-.005.194-.007.291-.007z' fill='#607D8B'/>\u003Cpath d='M2.208 162.134c-1.001-1.827-.241-4.217 1.698-5.337l56.011-32.344c1.939-1.12 4.324-.546 5.326 1.281l.232.41a9.344 9.344 0 0 0 1.47 2.021l.278.27c3.325 3.214 8.583 3.716 12.888 1.23l7.319-4.22c1.94-1.119 4.324-.546 5.325 1.282l3.25 5.928-83.519 48.229-10.278-18.75z' fill='#FAFAFA'/>\u003Cpath d='M12.486 181.001a.112.112 0 0 1-.031-.005.114.114 0 0 1-.071-.056L2.106 162.19c-1.031-1.88-.249-4.345 1.742-5.494l56.01-32.344a4.328 4.328 0 0 1 2.158-.588c1.415 0 2.65.702 3.311 1.882.01.008.018.017.024.028l.227.414a.122.122 0 0 1 .013.038 9.508 9.508 0 0 0 1.439 1.959l.275.266c1.846 1.786 4.344 2.769 7.031 2.769 1.977 0 3.954-.538 5.717-1.557a.148.148 0 0 1 .035-.013l7.284-4.206a4.321 4.321 0 0 1 2.157-.588c1.427 0 2.672.716 3.329 1.914l3.249 5.929a.116.116 0 0 1-.044.157l-83.518 48.229a.116.116 0 0 1-.059.016zm49.53-57.004c-.704 0-1.41.193-2.041.557l-56.01 32.345c-1.882 1.086-2.624 3.409-1.655 5.179l10.221 18.645 83.317-48.112-3.195-5.829c-.615-1.122-1.783-1.792-3.124-1.792a4.08 4.08 0 0 0-2.04.557l-7.317 4.225a.148.148 0 0 1-.035.013 11.7 11.7 0 0 1-5.801 1.569c-2.748 0-5.303-1.007-7.194-2.835l-.278-.27a9.716 9.716 0 0 1-1.497-2.046.096.096 0 0 1-.013-.037l-.191-.347a.11.11 0 0 1-.023-.029c-.615-1.123-1.783-1.793-3.124-1.793z' fill='#607D8B'/>\u003Cpath d='M42.434 155.808c-2.51-.001-4.697-1.258-5.852-3.365-1.811-3.304-.438-7.634 3.059-9.654l12.291-7.098a7.599 7.599 0 0 1 3.789-1.033c2.51 0 4.697 1.258 5.852 3.365 1.811 3.304.439 7.634-3.059 9.654l-12.291 7.098a7.606 7.606 0 0 1-3.789 1.033zm13.287-20.683a7.128 7.128 0 0 0-3.555.971l-12.291 7.098c-3.279 1.893-4.573 5.942-2.883 9.024 1.071 1.955 3.106 3.122 5.442 3.122a7.13 7.13 0 0 0 3.556-.97l12.291-7.098c3.279-1.893 4.572-5.942 2.883-9.024-1.072-1.955-3.106-3.123-5.443-3.123z' fill='#607D8B'/>\u003Cpath d='M149.588 109.407l6.737 3.89v.887c0 .176.013.36.037.549.011.081.02.161.028.242.14 1.415.973 2.998 2.105 3.999l7.396 6.545c.177.156.358.295.541.415 1.579 1.04 2.95.466 3.062-1.282.049-.784.057-1.595.023-2.429l-.003-.16v-1.151l25.987 15.003v54c0 1.09-.77 1.53-1.72.982l-42.473-24.523c-.95-.548-1.72-1.877-1.72-2.966v-34.033' fill='#FAFAFA'/>\u003Cpath d='M194.553 191.25c-.257 0-.54-.085-.831-.253l-42.472-24.521c-.981-.567-1.779-1.943-1.779-3.068v-34.033h.234v34.033c0 1.051.745 2.336 1.661 2.866l42.473 24.521c.424.245.816.288 1.103.122.285-.164.442-.52.442-1.002v-53.933l-25.753-14.868.003 1.106c.034.832.026 1.654-.024 2.439-.054.844-.396 1.464-.963 1.746-.619.309-1.45.173-2.28-.373a5.023 5.023 0 0 1-.553-.426l-7.397-6.544c-1.158-1.026-1.999-2.625-2.143-4.076a9.624 9.624 0 0 0-.027-.238 4.241 4.241 0 0 1-.038-.564v-.82l-6.68-3.856.117-.202 6.738 3.89.058.034v.954c0 .171.012.351.036.533.011.083.021.165.029.246.138 1.395.948 2.935 2.065 3.923l7.397 6.545c.173.153.35.289.527.406.758.499 1.504.63 2.047.359.49-.243.786-.795.834-1.551.05-.778.057-1.591.024-2.417l-.004-.163v-1.355l.175.1 25.987 15.004.059.033v54.068c0 .569-.198.996-.559 1.204a1.002 1.002 0 0 1-.506.131' fill='#607D8B'/>\u003Cpath d='M145.685 163.161l24.115 13.922-25.978 14.998-1.462-.307c-6.534-2.17-13.628-3.728-21.019-4.616-4.365-.524-8.663 1.096-9.598 3.62a2.746 2.746 0 0 0-.011 1.928c1.538 4.267 4.236 8.363 7.995 12.135l.532.845-25.977 14.997-24.115-13.922 75.518-43.6' fill='#FFF'/>\u003Cpath d='M94.282 220.818l-.059-.033-24.29-14.024.175-.101 75.577-43.634.058.033 24.29 14.024-26.191 15.122-.045-.01-1.461-.307c-6.549-2.174-13.613-3.725-21.009-4.614a13.744 13.744 0 0 0-1.638-.097c-3.758 0-7.054 1.531-7.837 3.642a2.62 2.62 0 0 0-.01 1.848c1.535 4.258 4.216 8.326 7.968 12.091l.016.021.526.835.006.01.064.102-.105.061-25.977 14.998-.058.033zm-23.881-14.057l23.881 13.788 24.802-14.32c.546-.315.846-.489 1.017-.575l-.466-.74c-3.771-3.787-6.467-7.881-8.013-12.168a2.851 2.851 0 0 1 .011-2.008c.815-2.199 4.203-3.795 8.056-3.795.557 0 1.117.033 1.666.099 7.412.891 14.491 2.445 21.041 4.621.836.175 1.215.254 1.39.304l25.78-14.884-23.881-13.788-75.284 43.466z' fill='#607D8B'/>\u003Cpath d='M167.23 125.979v50.871l-27.321 15.773-6.461-14.167c-.91-1.996-3.428-1.738-5.624.574a10.238 10.238 0 0 0-2.33 4.018l-6.46 21.628-27.322 15.774v-50.871l75.518-43.6' fill='#FFF'/>\u003Cpath d='M91.712 220.567a.127.127 0 0 1-.059-.016.118.118 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.519-43.6a.117.117 0 0 1 .175.101v50.871c0 .041-.023.08-.059.1l-27.321 15.775a.118.118 0 0 1-.094.01.12.12 0 0 1-.071-.063l-6.46-14.168c-.375-.822-1.062-1.275-1.934-1.275-1.089 0-2.364.686-3.5 1.881a10.206 10.206 0 0 0-2.302 3.972l-6.46 21.627a.118.118 0 0 1-.054.068L91.77 220.551a.12.12 0 0 1-.058.016zm.117-50.92v50.601l27.106-15.65 6.447-21.583a10.286 10.286 0 0 1 2.357-4.065c1.18-1.242 2.517-1.954 3.669-1.954.969 0 1.731.501 2.146 1.411l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/>\u003Cpath d='M168.543 126.213v50.87l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.624.574a10.248 10.248 0 0 0-2.33 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6' fill='#FFF'/>\u003Cpath d='M93.025 220.8a.123.123 0 0 1-.059-.015.12.12 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.518-43.6a.112.112 0 0 1 .117 0c.036.02.059.059.059.1v50.871a.116.116 0 0 1-.059.101l-27.321 15.774a.111.111 0 0 1-.094.01.115.115 0 0 1-.071-.062l-6.46-14.168c-.375-.823-1.062-1.275-1.935-1.275-1.088 0-2.363.685-3.499 1.881a10.19 10.19 0 0 0-2.302 3.971l-6.461 21.628a.108.108 0 0 1-.053.067l-27.322 15.775a.12.12 0 0 1-.058.015zm.117-50.919v50.6l27.106-15.649 6.447-21.584a10.293 10.293 0 0 1 2.357-4.065c1.179-1.241 2.516-1.954 3.668-1.954.969 0 1.732.502 2.147 1.412l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/>\u003Cpath d='M169.8 177.083l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.625.574a10.246 10.246 0 0 0-2.329 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6v50.87z' fill='#FAFAFA'/>\u003Cpath d='M94.282 220.917a.234.234 0 0 1-.234-.233v-50.871c0-.083.045-.161.117-.202l75.518-43.601a.234.234 0 1 1 .35.202v50.871a.233.233 0 0 1-.116.202l-27.322 15.775a.232.232 0 0 1-.329-.106l-6.461-14.168c-.36-.789-.992-1.206-1.828-1.206-1.056 0-2.301.672-3.415 1.844a10.099 10.099 0 0 0-2.275 3.924l-6.46 21.628a.235.235 0 0 1-.107.136l-27.322 15.774a.23.23 0 0 1-.116.031zm.233-50.969v50.331l26.891-15.525 6.434-21.539a10.41 10.41 0 0 1 2.384-4.112c1.201-1.265 2.569-1.991 3.753-1.991 1.018 0 1.818.526 2.253 1.48l6.354 13.934 26.982-15.578v-50.331l-75.051 43.331z' fill='#607D8B'/>\u003Cpath d='M109.894 199.943c-1.774 0-3.241-.725-4.244-2.12a.224.224 0 0 1 .023-.294.233.233 0 0 1 .301-.023c.78.547 1.705.827 2.75.827 1.323 0 2.754-.439 4.256-1.306 5.311-3.067 9.631-10.518 9.631-16.611 0-1.927-.442-3.56-1.278-4.724a.232.232 0 0 1 .323-.327c1.671 1.172 2.591 3.381 2.591 6.219 0 6.242-4.426 13.863-9.865 17.003-1.574.908-3.084 1.356-4.488 1.356zm-2.969-1.542c.813.651 1.82.877 2.968.877h.001c1.321 0 2.753-.327 4.254-1.194 5.311-3.067 9.632-10.463 9.632-16.556 0-1.979-.463-3.599-1.326-4.761.411 1.035.625 2.275.625 3.635 0 6.243-4.426 13.883-9.865 17.023-1.574.909-3.084 1.317-4.49 1.317-.641 0-1.243-.149-1.799-.341z' fill='#607D8B'/>\u003Cpath d='M113.097 197.23c5.384-3.108 9.748-10.636 9.748-16.814 0-2.051-.483-3.692-1.323-4.86-1.784-1.252-4.374-1.194-7.257.47-5.384 3.108-9.748 10.636-9.748 16.814 0 2.051.483 3.692 1.323 4.86 1.784 1.252 4.374 1.194 7.257-.47' fill='#FAFAFA'/>\u003Cpath d='M108.724 198.614c-1.142 0-2.158-.213-3.019-.817-.021-.014-.04.014-.055-.007-.894-1.244-1.367-2.948-1.367-4.973 0-6.242 4.426-13.864 9.865-17.005 1.574-.908 3.084-1.363 4.49-1.363 1.142 0 2.158.309 3.018.913a.23.23 0 0 1 .056.056c.894 1.244 1.367 2.972 1.367 4.997 0 6.243-4.426 13.783-9.865 16.923-1.574.909-3.084 1.276-4.49 1.276zm-2.718-1.109c.774.532 1.688.776 2.718.776 1.323 0 2.754-.413 4.256-1.28 5.311-3.066 9.631-10.505 9.631-16.598 0-1.909-.434-3.523-1.255-4.685-.774-.533-1.688-.799-2.718-.799-1.323 0-2.755.441-4.256 1.308-5.311 3.066-9.631 10.506-9.631 16.599 0 1.909.434 3.517 1.255 4.679z' fill='#607D8B'/>\u003Cpath d='M149.318 114.262l-9.984 8.878 15.893 11.031 5.589-6.112-11.498-13.797' fill='#FAFAFA'/>\u003Cpath d='M169.676 120.84l-9.748 5.627c-3.642 2.103-9.528 2.113-13.147.024-3.62-2.089-3.601-5.488.041-7.591l9.495-5.608-6.729-3.885-81.836 47.071 45.923 26.514 3.081-1.779c.631-.365.869-.898.618-1.39-2.357-4.632-2.593-9.546-.683-14.262 5.638-13.92 24.509-24.815 48.618-28.07 8.169-1.103 16.68-.967 24.704.394.852.145 1.776.008 2.407-.357l3.081-1.778-25.825-14.91' fill='#FAFAFA'/>\u003Cpath d='M113.675 183.459a.47.47 0 0 1-.233-.062l-45.924-26.515a.468.468 0 0 1 .001-.809l81.836-47.071a.467.467 0 0 1 .466 0l6.729 3.885a.467.467 0 0 1-.467.809l-6.496-3.75-80.9 46.533 44.988 25.973 2.848-1.644c.192-.111.62-.409.435-.773-2.416-4.748-2.658-9.814-.7-14.65 2.806-6.927 8.885-13.242 17.582-18.263 8.657-4.998 19.518-8.489 31.407-10.094 8.198-1.107 16.79-.97 24.844.397.739.125 1.561.007 2.095-.301l2.381-1.374-25.125-14.506a.467.467 0 0 1 .467-.809l25.825 14.91a.467.467 0 0 1 0 .809l-3.081 1.779c-.721.417-1.763.575-2.718.413-7.963-1.351-16.457-1.486-24.563-.392-11.77 1.589-22.512 5.039-31.065 9.977-8.514 4.916-14.456 11.073-17.183 17.805-1.854 4.578-1.623 9.376.666 13.875.37.725.055 1.513-.8 2.006l-3.081 1.78a.476.476 0 0 1-.234.062' fill='#455A64'/>\u003Cpath d='M153.316 128.279c-2.413 0-4.821-.528-6.652-1.586-1.818-1.049-2.82-2.461-2.82-3.975 0-1.527 1.016-2.955 2.861-4.02l9.493-5.607a.233.233 0 1 1 .238.402l-9.496 5.609c-1.696.979-2.628 2.263-2.628 3.616 0 1.34.918 2.608 2.585 3.571 3.549 2.049 9.343 2.038 12.914-.024l9.748-5.628a.234.234 0 0 1 .234.405l-9.748 5.628c-1.858 1.072-4.296 1.609-6.729 1.609' fill='#607D8B'/>\u003Cpath d='M113.675 182.992l-45.913-26.508M113.675 183.342a.346.346 0 0 1-.175-.047l-45.913-26.508a.35.35 0 1 1 .35-.607l45.913 26.508a.35.35 0 0 1-.175.654' fill='#455A64'/>\u003Cpath d='M67.762 156.484v54.001c0 1.09.77 2.418 1.72 2.967l42.473 24.521c.95.549 1.72.11 1.72-.98v-54.001' fill='#FAFAFA'/>\u003Cpath d='M112.727 238.561c-.297 0-.62-.095-.947-.285l-42.473-24.521c-1.063-.613-1.895-2.05-1.895-3.27v-54.001a.35.35 0 1 1 .701 0v54.001c0 .96.707 2.18 1.544 2.663l42.473 24.522c.344.198.661.243.87.122.206-.119.325-.411.325-.799v-54.001a.35.35 0 1 1 .7 0v54.001c0 .655-.239 1.154-.675 1.406a1.235 1.235 0 0 1-.623.162' fill='#455A64'/>\u003Cpath d='M112.86 147.512h-.001c-2.318 0-4.499-.522-6.142-1.471-1.705-.984-2.643-2.315-2.643-3.749 0-1.445.952-2.791 2.68-3.788l12.041-6.953c1.668-.962 3.874-1.493 6.212-1.493 2.318 0 4.499.523 6.143 1.472 1.704.984 2.643 2.315 2.643 3.748 0 1.446-.952 2.791-2.68 3.789l-12.042 6.952c-1.668.963-3.874 1.493-6.211 1.493zm12.147-16.753c-2.217 0-4.298.497-5.861 1.399l-12.042 6.952c-1.502.868-2.33 1.998-2.33 3.182 0 1.173.815 2.289 2.293 3.142 1.538.889 3.596 1.378 5.792 1.378h.001c2.216 0 4.298-.497 5.861-1.399l12.041-6.953c1.502-.867 2.33-1.997 2.33-3.182 0-1.172-.814-2.288-2.292-3.142-1.539-.888-3.596-1.377-5.793-1.377z' fill='#607D8B'/>\u003Cpath d='M165.63 123.219l-5.734 3.311c-3.167 1.828-8.286 1.837-11.433.02-3.147-1.817-3.131-4.772.036-6.601l5.734-3.31 11.397 6.58' fill='#FAFAFA'/>\u003Cpath d='M154.233 117.448l9.995 5.771-4.682 2.704c-1.434.827-3.352 1.283-5.399 1.283-2.029 0-3.923-.449-5.333-1.263-1.29-.744-2-1.694-2-2.674 0-.991.723-1.955 2.036-2.713l5.383-3.108m0-.809l-5.734 3.31c-3.167 1.829-3.183 4.784-.036 6.601 1.568.905 3.623 1.357 5.684 1.357 2.077 0 4.159-.46 5.749-1.377l5.734-3.311-11.397-6.58M145.445 179.667c-1.773 0-3.241-.85-4.243-2.245-.067-.092-.057-.275.023-.356.08-.081.207-.12.3-.055.781.548 1.706.812 2.751.811 1.322 0 2.754-.446 4.256-1.313 5.31-3.066 9.631-10.522 9.631-16.615 0-1.927-.442-3.562-1.279-4.726a.235.235 0 0 1 .024-.301.232.232 0 0 1 .3-.027c1.67 1.172 2.59 3.38 2.59 6.219 0 6.242-4.425 13.987-9.865 17.127-1.573.908-3.083 1.481-4.488 1.481zM142.476 178c.814.651 1.82 1.002 2.969 1.002 1.322 0 2.753-.452 4.255-1.32 5.31-3.065 9.631-10.523 9.631-16.617 0-1.98-.463-3.63-1.325-4.793.411 1.035.624 2.26.624 3.62 0 6.242-4.425 13.875-9.865 17.015-1.573.909-3.084 1.376-4.489 1.376a5.49 5.49 0 0 1-1.8-.283z' fill='#607D8B'/>\u003Cpath d='M148.648 176.704c5.384-3.108 9.748-10.636 9.748-16.813 0-2.052-.483-3.693-1.322-4.861-1.785-1.252-4.375-1.194-7.258.471-5.383 3.108-9.748 10.636-9.748 16.813 0 2.051.484 3.692 1.323 4.86 1.785 1.253 4.374 1.195 7.257-.47' fill='#FAFAFA'/>\u003Cpath d='M144.276 178.276c-1.143 0-2.158-.307-3.019-.911a.217.217 0 0 1-.055-.054c-.895-1.244-1.367-2.972-1.367-4.997 0-6.241 4.425-13.875 9.865-17.016 1.573-.908 3.084-1.369 4.489-1.369 1.143 0 2.158.307 3.019.91a.24.24 0 0 1 .055.055c.894 1.244 1.367 2.971 1.367 4.997 0 6.241-4.425 13.875-9.865 17.016-1.573.908-3.084 1.369-4.489 1.369zm-2.718-1.172c.773.533 1.687.901 2.718.901 1.322 0 2.754-.538 4.256-1.405 5.31-3.066 9.631-10.567 9.631-16.661 0-1.908-.434-3.554-1.256-4.716-.774-.532-1.688-.814-2.718-.814-1.322 0-2.754.433-4.256 1.3-5.31 3.066-9.631 10.564-9.631 16.657 0 1.91.434 3.576 1.256 4.738z' fill='#607D8B'/>\u003Cpath d='M150.72 172.361l-.363-.295a24.105 24.105 0 0 0 2.148-3.128 24.05 24.05 0 0 0 1.977-4.375l.443.149a24.54 24.54 0 0 1-2.015 4.46 24.61 24.61 0 0 1-2.19 3.189M115.917 191.514l-.363-.294a24.174 24.174 0 0 0 2.148-3.128 24.038 24.038 0 0 0 1.976-4.375l.443.148a24.48 24.48 0 0 1-2.015 4.461 24.662 24.662 0 0 1-2.189 3.188M114 237.476V182.584 237.476' fill='#607D8B'/>\u003Cg>\u003Cpath d='M81.822 37.474c.017-.135-.075-.28-.267-.392-.327-.188-.826-.21-1.109-.045l-6.012 3.471c-.131.076-.194.178-.191.285.002.132.002.461.002.578v.043l-.007.128-6.591 3.779c-.001 0-2.077 1.046-2.787 5.192 0 0-.912 6.961-.898 19.745.015 12.57.606 17.07 1.167 21.351.22 1.684 3.001 2.125 3.001 2.125.331.04.698-.027 1.08-.248l75.273-43.551c1.808-1.069 2.667-3.719 3.056-6.284 1.213-7.99 1.675-32.978-.275-39.878-.196-.693-.51-1.083-.868-1.282l-2.086-.79c-.727.028-1.416.467-1.534.535L82.032 37.072l-.21.402' fill='#FFF'/>\u003Cpath d='M144.311 1.701l2.085.79c.358.199.672.589.868 1.282 1.949 6.9 1.487 31.887.275 39.878-.39 2.565-1.249 5.215-3.056 6.284L69.21 93.486a1.78 1.78 0 0 1-.896.258l-.183-.011c0 .001-2.782-.44-3.003-2.124-.56-4.282-1.151-8.781-1.165-21.351-.015-12.784.897-19.745.897-19.745.71-4.146 2.787-5.192 2.787-5.192l6.591-3.779.007-.128v-.043c0-.117 0-.446-.002-.578-.003-.107.059-.21.191-.285l6.012-3.472a.98.98 0 0 1 .481-.11c.218 0 .449.053.627.156.193.112.285.258.268.392l.211-.402 60.744-34.836c.117-.068.806-.507 1.534-.535m0-.997l-.039.001c-.618.023-1.283.244-1.974.656l-.021.012-60.519 34.706a2.358 2.358 0 0 0-.831-.15c-.365 0-.704.084-.98.244l-6.012 3.471c-.442.255-.699.69-.689 1.166l.001.15-6.08 3.487c-.373.199-2.542 1.531-3.29 5.898l-.006.039c-.009.07-.92 7.173-.906 19.875.014 12.62.603 17.116 1.172 21.465l.002.015c.308 2.355 3.475 2.923 3.836 2.98l.034.004c.101.013.204.019.305.019a2.77 2.77 0 0 0 1.396-.392l75.273-43.552c1.811-1.071 2.999-3.423 3.542-6.997 1.186-7.814 1.734-33.096-.301-40.299-.253-.893-.704-1.527-1.343-1.882l-.132-.062-2.085-.789a.973.973 0 0 0-.353-.065' fill='#455A64'/>\u003Cpath d='M128.267 11.565l1.495.434-56.339 32.326' fill='#FFF'/>\u003Cpath d='M74.202 90.545a.5.5 0 0 1-.25-.931l18.437-10.645a.499.499 0 1 1 .499.864L74.451 90.478l-.249.067M75.764 42.654l-.108-.062.046-.171 5.135-2.964.17.045-.045.171-5.135 2.964-.063.017M70.52 90.375V46.421l.063-.036L137.84 7.554v43.954l-.062.036L70.52 90.375zm.25-43.811v43.38l66.821-38.579V7.985L70.77 46.564z' fill='#607D8B'/>\u003Cpath d='M86.986 83.182c-.23.149-.612.384-.849.523l-11.505 6.701c-.237.139-.206.252.068.252h.565c.275 0 .693-.113.93-.252L87.7 83.705c.237-.139.428-.253.425-.256a11.29 11.29 0 0 1-.006-.503c0-.274-.188-.377-.418-.227l-.715.463' fill='#607D8B'/>\u003Cpath d='M75.266 90.782H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.236-.138.615-.371.844-.519l.715-.464a.488.488 0 0 1 .266-.089c.172 0 .345.13.345.421 0 .214.001.363.003.437l.006.004-.004.069c-.003.075-.003.075-.486.356l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.108.866-.234l11.505-6.702c.168-.098.294-.173.361-.214-.004-.084-.004-.218-.004-.437l-.095-.171-.131.049-.714.463c-.232.15-.616.386-.854.525l-11.505 6.702-.029.018z' fill='#607D8B'/>\u003Cpath d='M75.266 89.871H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.258-.151.694-.268.993-.268h.565c.2 0 .316.056.346.166.03.11-.043.217-.215.317l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.107.866-.234l11.505-6.702.03-.018-.035-.001h-.565c-.252 0-.649.108-.867.234l-11.505 6.702-.029.018zM74.37 90.801v-1.247 1.247' fill='#607D8B'/>\u003Cpath d='M68.13 93.901c-.751-.093-1.314-.737-1.439-1.376-.831-4.238-1.151-8.782-1.165-21.352-.015-12.784.897-19.745.897-19.745.711-4.146 2.787-5.192 2.787-5.192l74.859-43.219c.223-.129 2.487-1.584 3.195.923 1.95 6.9 1.488 31.887.275 39.878-.389 2.565-1.248 5.215-3.056 6.283L69.21 93.653c-.382.221-.749.288-1.08.248 0 0-2.781-.441-3.001-2.125-.561-4.281-1.152-8.781-1.167-21.351-.014-12.784.898-19.745.898-19.745.71-4.146 2.787-5.191 2.787-5.191l6.598-3.81.871-.119 6.599-3.83.046-.461L68.13 93.901' fill='#FAFAFA'/>\u003Cpath d='M68.317 94.161l-.215-.013h-.001l-.244-.047c-.719-.156-2.772-.736-2.976-2.292-.568-4.34-1.154-8.813-1.168-21.384-.014-12.654.891-19.707.9-19.777.725-4.231 2.832-5.338 2.922-5.382l6.628-3.827.87-.119 6.446-3.742.034-.334a.248.248 0 0 1 .273-.223.248.248 0 0 1 .223.272l-.059.589-6.752 3.919-.87.118-6.556 3.785c-.031.016-1.99 1.068-2.666 5.018-.007.06-.908 7.086-.894 19.702.014 12.539.597 16.996 1.161 21.305.091.691.689 1.154 1.309 1.452a1.95 1.95 0 0 1-.236-.609c-.781-3.984-1.155-8.202-1.17-21.399-.014-12.653.891-19.707.9-19.777.725-4.231 2.832-5.337 2.922-5.382-.004.001 74.444-42.98 74.846-43.212l.028-.017c.904-.538 1.72-.688 2.36-.433.555.221.949.733 1.172 1.52 2.014 7.128 1.46 32.219.281 39.983-.507 3.341-1.575 5.515-3.175 6.462L69.335 93.869a2.023 2.023 0 0 1-1.018.292zm-.147-.507c.293.036.604-.037.915-.217l75.273-43.551c1.823-1.078 2.602-3.915 2.934-6.106 1.174-7.731 1.731-32.695-.268-39.772-.178-.631-.473-1.032-.876-1.192-.484-.193-1.166-.052-1.921.397l-.034.021-74.858 43.218c-.031.017-1.989 1.069-2.666 5.019-.007.059-.908 7.085-.894 19.702.015 13.155.386 17.351 1.161 21.303.09.461.476.983 1.037 1.139.114.025.185.037.196.039h.001z' fill='#455A64'/>\u003Cpath d='M69.317 68.982c.489-.281.885-.056.885.505 0 .56-.396 1.243-.885 1.525-.488.282-.884.057-.884-.504 0-.56.396-1.243.884-1.526' fill='#FFF'/>\u003Cpath d='M68.92 71.133c-.289 0-.487-.228-.487-.625 0-.56.396-1.243.884-1.526a.812.812 0 0 1 .397-.121c.289 0 .488.229.488.626 0 .56-.396 1.243-.885 1.525a.812.812 0 0 1-.397.121m.794-2.459a.976.976 0 0 0-.49.147c-.548.317-.978 1.058-.978 1.687 0 .486.271.812.674.812a.985.985 0 0 0 .491-.146c.548-.317.978-1.057.978-1.687 0-.486-.272-.813-.675-.813' fill='#8097A2'/>\u003Cpath d='M68.92 70.947c-.271 0-.299-.307-.299-.439 0-.491.361-1.116.79-1.363a.632.632 0 0 1 .303-.096c.272 0 .301.306.301.438 0 .491-.363 1.116-.791 1.364a.629.629 0 0 1-.304.096m.794-2.086a.812.812 0 0 0-.397.121c-.488.283-.884.966-.884 1.526 0 .397.198.625.487.625a.812.812 0 0 0 .397-.121c.489-.282.885-.965.885-1.525 0-.397-.199-.626-.488-.626' fill='#8097A2'/>\u003Cpath d='M69.444 85.35c.264-.152.477-.031.477.272 0 .303-.213.67-.477.822-.263.153-.477.031-.477-.271 0-.302.214-.671.477-.823' fill='#FFF'/>\u003Cpath d='M69.23 86.51c-.156 0-.263-.123-.263-.337 0-.302.214-.671.477-.823a.431.431 0 0 1 .214-.066c.156 0 .263.124.263.338 0 .303-.213.67-.477.822a.431.431 0 0 1-.214.066m.428-1.412c-.1 0-.203.029-.307.09-.32.185-.57.618-.57.985 0 .309.185.524.449.524a.63.63 0 0 0 .308-.09c.32-.185.57-.618.57-.985 0-.309-.185-.524-.45-.524' fill='#8097A2'/>\u003Cpath d='M69.23 86.322l-.076-.149c0-.235.179-.544.384-.661l.12-.041.076.151c0 .234-.179.542-.383.66l-.121.04m.428-1.038a.431.431 0 0 0-.214.066c-.263.152-.477.521-.477.823 0 .214.107.337.263.337a.431.431 0 0 0 .214-.066c.264-.152.477-.519.477-.822 0-.214-.107-.338-.263-.338' fill='#8097A2'/>\u003Cpath d='M139.278 7.769v43.667L72.208 90.16V46.493l67.07-38.724' fill='#455A64'/>\u003Cpath d='M72.083 90.375V46.421l.063-.036 67.257-38.831v43.954l-.062.036-67.258 38.831zm.25-43.811v43.38l66.821-38.579V7.985L72.333 46.564z' fill='#607D8B'/>\u003C/g>\u003Cpath d='M125.737 88.647l-7.639 3.334V84l-11.459 4.713v8.269L99 100.315l13.369 3.646 13.368-15.314' fill='#455A64'/>\u003C/g>\u003C/svg>\";function Se(){this.loadIcon_();var e=document.createElement(\"div\");(s=e.style).position=\"fixed\",s.top=0,s.right=0,s.bottom=0,s.left=0,s.backgroundColor=\"gray\",s.fontFamily=\"sans-serif\",s.zIndex=1e6;var t=document.createElement(\"img\");t.src=this.icon,(s=t.style).marginLeft=\"25%\",s.marginTop=\"25%\",s.width=\"50%\",e.appendChild(t);var n=document.createElement(\"div\");(s=n.style).textAlign=\"center\",s.fontSize=\"16px\",s.lineHeight=\"24px\",s.margin=\"24px 25%\",s.width=\"50%\",n.innerHTML=\"Place your phone into your Cardboard viewer.\",e.appendChild(n);var i=document.createElement(\"div\");(s=i.style).backgroundColor=\"#CFD8DC\",s.position=\"fixed\",s.bottom=0,s.width=\"100%\",s.height=\"48px\",s.padding=\"14px 24px\",s.boxSizing=\"border-box\",s.color=\"#656A6B\",e.appendChild(i);var r=document.createElement(\"div\");r.style.float=\"left\",r.innerHTML=\"No Cardboard viewer?\";var s,o=document.createElement(\"a\");o.href=\"https://www.google.com/get/cardboard/get-cardboard/\",o.innerHTML=\"get one\",o.target=\"_blank\",(s=o.style).float=\"right\",s.fontWeight=600,s.textTransform=\"uppercase\",s.borderLeft=\"1px solid gray\",s.paddingLeft=\"24px\",s.textDecoration=\"none\",s.color=\"#656A6B\",i.appendChild(r),i.appendChild(o),this.overlay=e,this.text=n,this.hide()}Se.prototype.show=function(e){e||this.overlay.parentElement?e&&(this.overlay.parentElement&&this.overlay.parentElement!=e&&this.overlay.parentElement.removeChild(this.overlay),e.appendChild(this.overlay)):document.body.appendChild(this.overlay),this.overlay.style.display=\"block\";var t=this.overlay.querySelector(\"img\").style;y()?(t.width=\"20%\",t.marginLeft=\"40%\",t.marginTop=\"3%\"):(t.width=\"50%\",t.marginLeft=\"25%\",t.marginTop=\"25%\")},Se.prototype.hide=function(){this.overlay.style.display=\"none\"},Se.prototype.showTemporarily=function(e,t){this.show(t),this.timer=setTimeout(this.hide.bind(this),e)},Se.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)},Se.prototype.update=function(){this.disableShowTemporarily(),!y()&&S()?this.show():this.hide()},Se.prototype.loadIcon_=function(){this.icon=c(\"image/svg+xml\",Be)};var Te=\"CardboardV1\",Le=\"WEBVR_CARDBOARD_VIEWER\",De=\"webvr-polyfill-viewer-selector\";function Re(e){try{this.selectedKey=localStorage.getItem(Le)}catch(e){console.error(\"Failed to load viewer profile: %s\",e)}this.selectedKey||(this.selectedKey=e||Te),this.dialog=this.createDialog_(Ae.Viewers),this.root=null,this.onChangeCallbacks_=[]}function Pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}function ke(e,t){return e(t={exports:{}},t.exports),t.exports}Re.prototype.show=function(e){this.root=e,e.appendChild(this.dialog),this.dialog.querySelector(\"#\"+this.selectedKey).checked=!0,this.dialog.style.display=\"block\"},Re.prototype.hide=function(){this.root&&this.root.contains(this.dialog)&&this.root.removeChild(this.dialog),this.dialog.style.display=\"none\"},Re.prototype.getCurrentViewer=function(){return Ae.Viewers[this.selectedKey]},Re.prototype.getSelectedKey_=function(){var e=this.dialog.querySelector(\"input[name=field]:checked\");return e?e.id:null},Re.prototype.onChange=function(e){this.onChangeCallbacks_.push(e)},Re.prototype.fireOnChange_=function(e){for(var t=0;t\u003Cthis.onChangeCallbacks_.length;t++)this.onChangeCallbacks_[t](e)},Re.prototype.onSave_=function(){if(this.selectedKey=this.getSelectedKey_(),this.selectedKey&&Ae.Viewers[this.selectedKey]){this.fireOnChange_(Ae.Viewers[this.selectedKey]);try{localStorage.setItem(Le,this.selectedKey)}catch(e){console.error(\"Failed to save viewer profile: %s\",e)}this.hide()}else console.error(\"ViewerSelector.onSave_: this should never happen!\")},Re.prototype.createDialog_=function(e){var t=document.createElement(\"div\");t.classList.add(De),t.style.display=\"none\";var n=document.createElement(\"div\");(s=n.style).position=\"fixed\",s.left=0,s.top=0,s.width=\"100%\",s.height=\"100%\",s.background=\"rgba(0, 0, 0, 0.3)\",n.addEventListener(\"click\",this.hide.bind(this));var i=280,r=document.createElement(\"div\"),s=r.style;for(var o in s.boxSizing=\"border-box\",s.position=\"fixed\",s.top=\"24px\",s.left=\"50%\",s.marginLeft=-i/2+\"px\",s.width=i+\"px\",s.padding=\"24px\",s.overflow=\"hidden\",s.background=\"#fafafa\",s.fontFamily=\"'Roboto', sans-serif\",s.boxShadow=\"0px 5px 20px #666\",r.appendChild(this.createH1_(\"Select your viewer\")),e)r.appendChild(this.createChoice_(o,e[o].label));return r.appendChild(this.createButton_(\"Save\",this.onSave_.bind(this))),t.appendChild(n),t.appendChild(r),t},Re.prototype.createH1_=function(e){var t=document.createElement(\"h1\"),n=t.style;return n.color=\"black\",n.fontSize=\"20px\",n.fontWeight=\"bold\",n.marginTop=0,n.marginBottom=\"24px\",t.innerHTML=e,t},Re.prototype.createChoice_=function(e,t){var n=document.createElement(\"div\");n.style.marginTop=\"8px\",n.style.color=\"black\";var i=document.createElement(\"input\");i.style.fontSize=\"30px\",i.setAttribute(\"id\",e),i.setAttribute(\"type\",\"radio\"),i.setAttribute(\"value\",e),i.setAttribute(\"name\",\"field\");var r=document.createElement(\"label\");return r.style.marginLeft=\"4px\",r.setAttribute(\"for\",e),r.innerHTML=t,n.appendChild(i),n.appendChild(r),n},Re.prototype.createButton_=function(e,t){var n=document.createElement(\"button\");n.innerHTML=e;var i=n.style;return i.float=\"right\",i.textTransform=\"uppercase\",i.color=\"#1094f7\",i.fontSize=\"14px\",i.letterSpacing=0,i.border=0,i.background=\"none\",i.marginTop=\"16px\",n.addEventListener(\"click\",t),n},\"undefined\"!=typeof window?window:void 0!==e||\"undefined\"!=typeof self&&self;var Fe=ke((function(e,t){!function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=0)}([function(e,t,n){var i=function(){function e(e,t){for(var n=0;n\u003Ct.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var s=n(1),o=\"undefined\"!=typeof navigator&&parseFloat((\"\"+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,\"\"])[1]).replace(\"undefined\",\"3_2\").replace(\"_\",\".\").replace(\"_\",\"\"))\u003C10&&!window.MSStream,a=function(){function e(){r(this,e),o?this.noSleepTimer=null:(this.noSleepVideo=document.createElement(\"video\"),this.noSleepVideo.setAttribute(\"playsinline\",\"\"),this.noSleepVideo.setAttribute(\"src\",s),this.noSleepVideo.addEventListener(\"timeupdate\",function(e){this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}.bind(this)))}return i(e,[{key:\"enable\",value:function(){o?(this.disable(),this.noSleepTimer=window.setInterval((function(){window.location.href=\"/\",window.setTimeout(window.stop,0)}),15e3)):this.noSleepVideo.play()}},{key:\"disable\",value:function(){o?this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=a},function(e,t,n){e.exports=\"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA=\"}])}))})),Oe=Pe(Fe),Qe=1e3,Ue=[0,0,.5,1],Ne=[.5,0,.5,1],Ge=window.requestAnimationFrame,ze=window.cancelAnimationFrame;function He(){this.leftProjectionMatrix=new Float32Array(16),this.leftViewMatrix=new Float32Array(16),this.rightProjectionMatrix=new Float32Array(16),this.rightViewMatrix=new Float32Array(16),this.pose=null}function Ve(e){Object.defineProperties(this,{hasPosition:{writable:!1,enumerable:!0,value:e.hasPosition},hasExternalDisplay:{writable:!1,enumerable:!0,value:e.hasExternalDisplay},canPresent:{writable:!1,enumerable:!0,value:e.canPresent},maxLayers:{writable:!1,enumerable:!0,value:e.maxLayers},hasOrientation:{enumerable:!0,get:function(){return O(\"VRDisplayCapabilities.prototype.hasOrientation\",\"VRDisplay.prototype.getFrameData\"),e.hasOrientation}}})}function We(e){var t=!(\"wakelock\"in(e=e||{}))||e.wakelock;this.isPolyfilled=!0,this.displayId=Qe++,this.displayName=\"\",this.depthNear=.01,this.depthFar=1e4,this.isPresenting=!1,Object.defineProperty(this,\"isConnected\",{get:function(){return O(\"VRDisplay.prototype.isConnected\",\"VRDisplayCapabilities.prototype.hasExternalDisplay\"),!1}}),this.capabilities=new Ve({hasPosition:!1,hasOrientation:!1,hasExternalDisplay:!1,canPresent:!1,maxLayers:1}),this.stageParameters=null,this.waitingForPresent_=!1,this.layer_=null,this.originalParent_=null,this.fullscreenElement_=null,this.fullscreenWrapper_=null,this.fullscreenElementCachedStyle_=null,this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null,t&&S()&&(this.wakelock_=new Oe)}We.prototype.getFrameData=function(e){return D(e,this._getPose(),this)},We.prototype.getPose=function(){return O(\"VRDisplay.prototype.getPose\",\"VRDisplay.prototype.getFrameData\"),this._getPose()},We.prototype.resetPose=function(){return O(\"VRDisplay.prototype.resetPose\"),this._resetPose()},We.prototype.getImmediatePose=function(){return O(\"VRDisplay.prototype.getImmediatePose\",\"VRDisplay.prototype.getFrameData\"),this._getPose()},We.prototype.requestAnimationFrame=function(e){return Ge(e)},We.prototype.cancelAnimationFrame=function(e){return ze(e)},We.prototype.wrapForFullscreen=function(e){if(u())return e;if(!this.fullscreenWrapper_){this.fullscreenWrapper_=document.createElement(\"div\");var t=[\"height: \"+Math.min(screen.height,screen.width)+\"px !important\",\"top: 0 !important\",\"left: 0 !important\",\"right: 0 !important\",\"border: 0\",\"margin: 0\",\"padding: 0\",\"z-index: 999999 !important\",\"position: fixed\"];this.fullscreenWrapper_.setAttribute(\"style\",t.join(\"; \")+\";\"),this.fullscreenWrapper_.classList.add(\"webvr-polyfill-fullscreen-wrapper\")}if(this.fullscreenElement_==e)return this.fullscreenWrapper_;if(this.fullscreenElement_&&(this.originalParent_?this.originalParent_.appendChild(this.fullscreenElement_):this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_)),this.fullscreenElement_=e,this.originalParent_=e.parentElement,this.originalParent_||document.body.appendChild(e),!this.fullscreenWrapper_.parentElement){var n=this.fullscreenElement_.parentElement;n.insertBefore(this.fullscreenWrapper_,this.fullscreenElement_),n.removeChild(this.fullscreenElement_)}this.fullscreenWrapper_.insertBefore(this.fullscreenElement_,this.fullscreenWrapper_.firstChild),this.fullscreenElementCachedStyle_=this.fullscreenElement_.getAttribute(\"style\");var i=this;function r(){if(i.fullscreenElement_){var e=[\"position: absolute\",\"top: 0\",\"left: 0\",\"width: \"+Math.max(screen.width,screen.height)+\"px\",\"height: \"+Math.min(screen.height,screen.width)+\"px\",\"border: 0\",\"margin: 0\",\"padding: 0\"];i.fullscreenElement_.setAttribute(\"style\",e.join(\"; \")+\";\")}}return r(),this.fullscreenWrapper_},We.prototype.removeFullscreenWrapper=function(){if(this.fullscreenElement_){var e=this.fullscreenElement_;this.fullscreenElementCachedStyle_?e.setAttribute(\"style\",this.fullscreenElementCachedStyle_):e.removeAttribute(\"style\"),this.fullscreenElement_=null,this.fullscreenElementCachedStyle_=null;var t=this.fullscreenWrapper_.parentElement;return this.fullscreenWrapper_.removeChild(e),this.originalParent_===t?t.insertBefore(e,this.fullscreenWrapper_):this.originalParent_&&this.originalParent_.appendChild(e),t.removeChild(this.fullscreenWrapper_),e}},We.prototype.requestPresent=function(e){var t=this.isPresenting,n=this;return e instanceof Array||(O(\"VRDisplay.prototype.requestPresent with non-array argument\",\"an array of VRLayers as the first argument\"),e=[e]),new Promise((function(i,r){if(n.capabilities.canPresent)if(0==e.length||e.length>n.capabilities.maxLayers)r(new Error(\"Invalid number of layers.\"));else{var s=e[0];if(s.source){var o=s.leftBounds||Ue,a=s.rightBounds||Ne;if(t){var l=n.layer_;l.source!==s.source&&(l.source=s.source);for(var c=0;c\u003C4;c++)l.leftBounds[c]=o[c],l.rightBounds[c]=a[c];return n.wrapForFullscreen(n.layer_.source),n.updatePresent_(),void i()}if(n.layer_={predistorted:s.predistorted,source:s.source,leftBounds:o.slice(0),rightBounds:a.slice(0)},n.waitingForPresent_=!1,n.layer_&&n.layer_.source){var h=n.wrapForFullscreen(n.layer_.source),p=function(){var e=M();n.isPresenting=h===e,n.isPresenting?(screen.orientation&&screen.orientation.lock&&screen.orientation.lock(\"landscape-primary\").catch((function(e){console.error(\"screen.orientation.lock() failed due to\",e.message)})),n.waitingForPresent_=!1,n.beginPresent_(),i()):(screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),n.removeFullscreenWrapper(),n.disableWakeLock(),n.endPresent_(),n.removeFullscreenListeners_()),n.fireVRDisplayPresentChange_()},A=function(){n.waitingForPresent_&&(n.removeFullscreenWrapper(),n.removeFullscreenListeners_(),n.disableWakeLock(),n.waitingForPresent_=!1,n.isPresenting=!1,r(new Error(\"Unable to present.\")))};n.addFullscreenListeners_(h,p,A),w(h)?(n.enableWakeLock(),n.waitingForPresent_=!0):(u()||d())&&(n.enableWakeLock(),n.isPresenting=!0,n.beginPresent_(),n.fireVRDisplayPresentChange_(),i())}n.waitingForPresent_||u()||(C(),r(new Error(\"Unable to present.\")))}else i()}else r(new Error(\"VRDisplay is not capable of presenting.\"))}))},We.prototype.exitPresent=function(){var e=this.isPresenting,t=this;return this.isPresenting=!1,this.layer_=null,this.disableWakeLock(),new Promise((function(n,i){e?(!C()&&u()&&(t.endPresent_(),t.fireVRDisplayPresentChange_()),d()&&(t.removeFullscreenWrapper(),t.removeFullscreenListeners_(),t.endPresent_(),t.fireVRDisplayPresentChange_()),n()):i(new Error(\"Was not presenting to VRDisplay.\"))}))},We.prototype.getLayers=function(){return this.layer_?[this.layer_]:[]},We.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent(\"vrdisplaypresentchange\",{detail:{display:this}});window.dispatchEvent(e)},We.prototype.fireVRDisplayConnect_=function(){var e=new CustomEvent(\"vrdisplayconnect\",{detail:{display:this}});window.dispatchEvent(e)},We.prototype.addFullscreenListeners_=function(e,t,n){this.removeFullscreenListeners_(),this.fullscreenEventTarget_=e,this.fullscreenChangeHandler_=t,this.fullscreenErrorHandler_=n,t&&(document.fullscreenEnabled?e.addEventListener(\"fullscreenchange\",t,!1):document.webkitFullscreenEnabled?e.addEventListener(\"webkitfullscreenchange\",t,!1):document.mozFullScreenEnabled?document.addEventListener(\"mozfullscreenchange\",t,!1):document.msFullscreenEnabled&&e.addEventListener(\"msfullscreenchange\",t,!1)),n&&(document.fullscreenEnabled?e.addEventListener(\"fullscreenerror\",n,!1):document.webkitFullscreenEnabled?e.addEventListener(\"webkitfullscreenerror\",n,!1):document.mozFullScreenEnabled?document.addEventListener(\"mozfullscreenerror\",n,!1):document.msFullscreenEnabled&&e.addEventListener(\"msfullscreenerror\",n,!1))},We.prototype.removeFullscreenListeners_=function(){if(this.fullscreenEventTarget_){var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener(\"fullscreenchange\",t,!1),e.removeEventListener(\"webkitfullscreenchange\",t,!1),document.removeEventListener(\"mozfullscreenchange\",t,!1),e.removeEventListener(\"msfullscreenchange\",t,!1)}if(this.fullscreenErrorHandler_){var n=this.fullscreenErrorHandler_;e.removeEventListener(\"fullscreenerror\",n,!1),e.removeEventListener(\"webkitfullscreenerror\",n,!1),document.removeEventListener(\"mozfullscreenerror\",n,!1),e.removeEventListener(\"msfullscreenerror\",n,!1)}this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null}},We.prototype.enableWakeLock=function(){this.wakelock_&&this.wakelock_.enable()},We.prototype.disableWakeLock=function(){this.wakelock_&&this.wakelock_.disable()},We.prototype.beginPresent_=function(){},We.prototype.endPresent_=function(){},We.prototype.submitFrame=function(e){},We.prototype.getEyeParameters=function(e){return null};var je={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:\"\",MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:\"https://dpdb.webvr.rocks/dpdb.json\",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1},qe={LEFT:\"left\",RIGHT:\"right\"};function Ye(e){var t=T({},je);e=T(t,e||{}),We.call(this,{wakelock:e.MOBILE_WAKE_LOCK}),this.config=e,this.displayName=\"Cardboard VRDisplay\",this.capabilities=new Ve({hasPosition:!1,hasOrientation:!0,hasExternalDisplay:!1,canPresent:!0,maxLayers:1}),this.stageParameters=null,this.bufferScale_=this.config.BUFFER_SCALE,this.poseSensor_=new Ie(this.config),this.distorter_=null,this.cardboardUI_=null,this.dpdb_=new ge(this.config.DPDB_URL,this.onDeviceParamsUpdated_.bind(this)),this.deviceInfo_=new Ae(this.dpdb_.getDeviceParams(),e.ADDITIONAL_VIEWERS),this.viewerSelector_=new Re(e.DEFAULT_VIEWER),this.viewerSelector_.onChange(this.onViewerChanged_.bind(this)),this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer()),this.config.ROTATE_INSTRUCTIONS_DISABLED||(this.rotateInstructions_=new Se),u()&&window.addEventListener(\"resize\",this.onResize_.bind(this))}return Ye.prototype=Object.create(We.prototype),Ye.prototype._getPose=function(){return{position:null,orientation:this.poseSensor_.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},Ye.prototype._resetPose=function(){this.poseSensor_.resetPose&&this.poseSensor_.resetPose()},Ye.prototype._getFieldOfView=function(e){var t;if(e==qe.LEFT)t=this.deviceInfo_.getFieldOfViewLeftEye();else{if(e!=qe.RIGHT)return console.error(\"Invalid eye provided: %s\",e),null;t=this.deviceInfo_.getFieldOfViewRightEye()}return t},Ye.prototype._getEyeOffset=function(e){var t;if(e==qe.LEFT)t=[.5*-this.deviceInfo_.viewer.interLensDistance,0,0];else{if(e!=qe.RIGHT)return console.error(\"Invalid eye provided: %s\",e),null;t=[.5*this.deviceInfo_.viewer.interLensDistance,0,0]}return t},Ye.prototype.getEyeParameters=function(e){var t=this._getEyeOffset(e),n=this._getFieldOfView(e),i={offset:t,renderWidth:.5*this.deviceInfo_.device.width*this.bufferScale_,renderHeight:this.deviceInfo_.device.height*this.bufferScale_};return Object.defineProperty(i,\"fieldOfView\",{enumerable:!0,get:function(){return O(\"VRFieldOfView\",\"VRFrameData's projection matrices\"),n}}),i},Ye.prototype.onDeviceParamsUpdated_=function(e){this.config.DEBUG&&console.log(\"DPDB reported that device params were updated.\"),this.deviceInfo_.updateDeviceParams(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_)},Ye.prototype.updateBounds_=function(){this.layer_&&this.distorter_&&(this.layer_.leftBounds||this.layer_.rightBounds)&&this.distorter_.setTextureBounds(this.layer_.leftBounds,this.layer_.rightBounds)},Ye.prototype.beginPresent_=function(){var e=this.layer_.source.getContext(\"webgl\");e||(e=this.layer_.source.getContext(\"experimental-webgl\")),e||(e=this.layer_.source.getContext(\"webgl2\")),e&&(this.layer_.predistorted?this.config.CARDBOARD_UI_DISABLED||(e.canvas.width=b()*this.bufferScale_,e.canvas.height=x()*this.bufferScale_,this.cardboardUI_=new te(e)):(this.config.CARDBOARD_UI_DISABLED||(this.cardboardUI_=new te(e)),this.distorter_=new z(e,this.cardboardUI_,this.config.BUFFER_SCALE,this.config.DIRTY_SUBMIT_FRAME_BINDINGS),this.distorter_.updateDeviceInfo(this.deviceInfo_)),this.cardboardUI_&&this.cardboardUI_.listen(function(e){this.viewerSelector_.show(this.layer_.source.parentElement),e.stopPropagation(),e.preventDefault()}.bind(this),function(e){this.exitPresent(),e.stopPropagation(),e.preventDefault()}.bind(this)),this.rotateInstructions_&&(y()&&S()?this.rotateInstructions_.showTemporarily(3e3,this.layer_.source.parentElement):this.rotateInstructions_.update()),this.orientationHandler=this.onOrientationChange_.bind(this),window.addEventListener(\"orientationchange\",this.orientationHandler),this.vrdisplaypresentchangeHandler=this.updateBounds_.bind(this),window.addEventListener(\"vrdisplaypresentchange\",this.vrdisplaypresentchangeHandler),this.fireVRDisplayDeviceParamsChange_())},Ye.prototype.endPresent_=function(){this.distorter_&&(this.distorter_.destroy(),this.distorter_=null),this.cardboardUI_&&(this.cardboardUI_.destroy(),this.cardboardUI_=null),this.rotateInstructions_&&this.rotateInstructions_.hide(),this.viewerSelector_.hide(),window.removeEventListener(\"orientationchange\",this.orientationHandler),window.removeEventListener(\"vrdisplaypresentchange\",this.vrdisplaypresentchangeHandler)},Ye.prototype.updatePresent_=function(){this.endPresent_(),this.beginPresent_()},Ye.prototype.submitFrame=function(e){if(this.distorter_)this.updateBounds_(),this.distorter_.submitFrame();else if(this.cardboardUI_&&this.layer_){var t=this.layer_.source.getContext(\"webgl\");t||(t=this.layer_.source.getContext(\"experimental-webgl\")),t||(t=this.layer_.source.getContext(\"webgl2\"));var n=t.canvas;n.width==this.lastWidth&&n.height==this.lastHeight||this.cardboardUI_.onResize(),this.lastWidth=n.width,this.lastHeight=n.height,this.cardboardUI_.render()}},Ye.prototype.onOrientationChange_=function(e){this.viewerSelector_.hide(),this.rotateInstructions_&&this.rotateInstructions_.update(),this.onResize_()},Ye.prototype.onResize_=function(e){if(this.layer_){var t=this.layer_.source.getContext(\"webgl\");t||(t=this.layer_.source.getContext(\"experimental-webgl\")),t||(t=this.layer_.source.getContext(\"webgl2\"));var n=[\"position: absolute\",\"top: 0\",\"left: 0\",\"width: 100vw\",\"height: 100vh\",\"border: 0\",\"margin: 0\",\"padding: 0px\",\"box-sizing: content-box\"];t.canvas.setAttribute(\"style\",n.join(\"; \")+\";\"),L(t.canvas)}},Ye.prototype.onViewerChanged_=function(e){this.deviceInfo_.setViewer(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_),this.fireVRDisplayDeviceParamsChange_()},Ye.prototype.fireVRDisplayDeviceParamsChange_=function(){var e=new CustomEvent(\"vrdisplaydeviceparamschange\",{detail:{vrdisplay:this,deviceInfo:this.deviceInfo_}});window.dispatchEvent(e)},Ye.VRFrameData=He,Ye.VRDisplay=We,Ye}()})),a=(t=o)&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\"default\")?t.default:t,l={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:\"\",PROVIDE_MOBILE_VRDISPLAY:!0,MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:\"https://dpdb.webvr.rocks/dpdb.json\",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1};function c(e){this.config=s(s({},l),e),this.polyfillDisplays=[],this.enabled=!1,this.hasNative=\"getVRDisplays\"in navigator,this.native={},this.native.getVRDisplays=navigator.getVRDisplays,this.native.VRFrameData=window.VRFrameData,this.native.VRDisplay=window.VRDisplay,(!this.hasNative||this.config.PROVIDE_MOBILE_VRDISPLAY&&i())&&(this.enable(),this.getVRDisplays().then((function(e){e&&e[0]&&e[0].fireVRDisplayConnect_&&e[0].fireVRDisplayConnect_()})))}c.prototype.getPolyfillDisplays=function(){if(this._polyfillDisplaysPopulated)return this.polyfillDisplays;if(i()){var e=new a({ADDITIONAL_VIEWERS:this.config.ADDITIONAL_VIEWERS,DEFAULT_VIEWER:this.config.DEFAULT_VIEWER,MOBILE_WAKE_LOCK:this.config.MOBILE_WAKE_LOCK,DEBUG:this.config.DEBUG,DPDB_URL:this.config.DPDB_URL,CARDBOARD_UI_DISABLED:this.config.CARDBOARD_UI_DISABLED,K_FILTER:this.config.K_FILTER,PREDICTION_TIME_S:this.config.PREDICTION_TIME_S,ROTATE_INSTRUCTIONS_DISABLED:this.config.ROTATE_INSTRUCTIONS_DISABLED,YAW_ONLY:this.config.YAW_ONLY,BUFFER_SCALE:this.config.BUFFER_SCALE,DIRTY_SUBMIT_FRAME_BINDINGS:this.config.DIRTY_SUBMIT_FRAME_BINDINGS});this.polyfillDisplays.push(e)}return this._polyfillDisplaysPopulated=!0,this.polyfillDisplays},c.prototype.enable=function(){if(this.enabled=!0,this.hasNative&&this.native.VRFrameData){var e=this.native.VRFrameData,t=new this.native.VRFrameData,n=this.native.VRDisplay.prototype.getFrameData;window.VRDisplay.prototype.getFrameData=function(i){i instanceof e?n.call(this,i):(n.call(this,t),i.pose=t.pose,r(t.leftProjectionMatrix,i.leftProjectionMatrix),r(t.rightProjectionMatrix,i.rightProjectionMatrix),r(t.leftViewMatrix,i.leftViewMatrix),r(t.rightViewMatrix,i.rightViewMatrix))}}navigator.getVRDisplays=this.getVRDisplays.bind(this),window.VRDisplay=a.VRDisplay,window.VRFrameData=a.VRFrameData},c.prototype.getVRDisplays=function(){var e=this;return this.config,this.hasNative?this.native.getVRDisplays.call(navigator).then((function(t){return t.length>0?t:e.getPolyfillDisplays()})):Promise.resolve(this.getPolyfillDisplays())},c.version=\"0.10.12\",c.VRFrameData=a.VRFrameData,c.VRDisplay=a.VRDisplay;var h=Object.freeze({default:c}),u=h&&c||h;return void 0!==e&&e.window&&(e.document||(e.document=e.window.document),e.navigator||(e.navigator=e.window.navigator)),u}()},9443:e=>{var t=/\\n/,n=\"\\n\",i=/\\s/;function r(e,t,n,i){var r=e.indexOf(t,n);return-1===r||r>i?i:r}function s(e){return i.test(e)}function o(e,t,n,i){return{start:t,end:t+Math.min(i,n-t)}}e.exports=function(t,n){return e.exports.lines(t,n).map((function(e){return t.substring(e.start,e.end)})).join(\"\\n\")},e.exports.lines=function(e,i){if(0===(i=i||{}).width&&\"nowrap\"!==i.mode)return[];e=e||\"\";var a=\"number\"==typeof i.width?i.width:Number.MAX_VALUE,l=Math.max(0,i.start||0),c=\"number\"==typeof i.end?i.end:e.length,h=i.mode,u=i.measure||o;return\"pre\"===h?function(e,n,i,r,s){for(var o=[],a=i,l=i;l\u003Cr&&l\u003Cn.length;l++){var c=n.charAt(l),h=t.test(c);if(h||l===r-1){var u=e(n,a,h?l:l+1,s);o.push(u),a=l+1}}return o}(u,e,l,c,a):function(e,t,i,o,a,l){var c=[],h=a;for(\"nowrap\"===l&&(h=Number.MAX_VALUE);i\u003Co&&i\u003Ct.length;){for(var u=r(t,n,i,o);i\u003Cu&&s(t.charAt(i));)i++;var d=e(t,i,u,h),p=i+(d.end-d.start),A=p+n.length;if(p\u003Cu){for(;p>i&&!s(t.charAt(p));)p--;if(p===i)A>i+n.length&&A--,p=A;else for(A=p;p>i&&s(t.charAt(p-n.length));)p--}if(p>=i){var f=e(t,i,p,h);c.push(f)}i=A}return c}(u,e,l,c,a,h)}},7377:(e,t,n)=>{\"use strict\";var i=n(1192),r=n(6534),s=n(9069),o=n(2786);function a(e,t,n){var i=e;return r(t)?(n=t,\"string\"==typeof e&&(i={uri:e})):i=o(t,{uri:e}),i.callback=n,i}function l(e,t,n){return c(t=a(e,t,n))}function c(e){if(void 0===e.callback)throw new Error(\"callback argument missing\");var t=!1,n=function(n,i,r){t||(t=!0,e.callback(n,i,r))};function i(){var e=void 0;if(e=h.response?h.response:h.responseText||function(e){try{if(\"document\"===e.responseType)return e.responseXML;var t=e.responseXML&&\"parsererror\"===e.responseXML.documentElement.nodeName;if(\"\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(h),g)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(u),e instanceof Error||(e=new Error(\"\"+(e||\"Unknown XMLHttpRequest Error\"))),e.statusCode=0,n(e,v)}function o(){if(!c){var t;clearTimeout(u),t=e.useXDR&&void 0===h.status?200:1223===h.status?204:h.status;var r=v,o=null;return 0!==t?(r={body:i(),statusCode:t,method:p,headers:{},url:d,rawRequest:h},h.getAllResponseHeaders&&(r.headers=s(h.getAllResponseHeaders()))):o=new Error(\"Internal XMLHttpRequest Error\"),n(o,r,r.body)}}var a,c,h=e.xhr||null;h||(h=e.cors||e.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var u,d=h.url=e.uri||e.url,p=h.method=e.method||\"GET\",A=e.body||e.data,f=h.headers=e.headers||{},m=!!e.sync,g=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:d,rawRequest:h};if(\"json\"in e&&!1!==e.json&&(g=!0,f.accept||f.Accept||(f.Accept=\"application/json\"),\"GET\"!==p&&\"HEAD\"!==p&&(f[\"content-type\"]||f[\"Content-Type\"]||(f[\"Content-Type\"]=\"application/json\"),A=JSON.stringify(!0===e.json?A:e.json))),h.onreadystatechange=function(){4===h.readyState&&setTimeout(o,0)},h.onload=o,h.onerror=r,h.onprogress=function(){},h.onabort=function(){c=!0},h.ontimeout=r,h.open(p,d,!m,e.username,e.password),m||(h.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(u=setTimeout((function(){if(!c){c=!0,h.abort(\"timeout\");var e=new Error(\"XMLHttpRequest timeout\");e.code=\"ETIMEDOUT\",r(e)}}),e.timeout)),h.setRequestHeader)for(a in f)f.hasOwnProperty(a)&&h.setRequestHeader(a,f[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\"Headers cannot be set on an XDomainRequest object\");return\"responseType\"in e&&(h.responseType=e.responseType),\"beforeSend\"in e&&\"function\"==typeof e.beforeSend&&e.beforeSend(h),h.send(A||null),h}e.exports=l,e.exports.default=l,l.XMLHttpRequest=i.XMLHttpRequest||function(){},l.XDomainRequest=\"withCredentials\"in new l.XMLHttpRequest?l.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n\u003Ce.length;n++)t(e[n])}([\"get\",\"put\",\"post\",\"patch\",\"head\",\"delete\"],(function(e){l[\"delete\"===e?\"del\":e]=function(t,n,i){return(n=a(t,n,i)).method=e.toUpperCase(),c(n)}}))},6774:e=>{e.exports=void 0!==self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,\"application/xml\")}:void 0!==self.ActiveXObject&&new self.ActiveXObject(\"Microsoft.XMLDOM\")?function(e){var t=new self.ActiveXObject(\"Microsoft.XMLDOM\");return t.async=\"false\",t.loadXML(e),t}:function(e){var t=document.createElement(\"div\");return t.innerHTML=e,t}},2786:e=>{e.exports=function(){for(var e={},n=0;n\u003Carguments.length;n++){var i=arguments[n];for(var r in i)t.call(i,r)&&(e[r]=i[r])}return e};var t=Object.prototype.hasOwnProperty},4649:(e,t,n)=>{var i=n(2446).Z,r=n(3515).components,s=n(3515).registerComponent,o=n(2666),a=n(8903),l=new o.Color,c=new o.Color,h=a.entity.getComponentProperty,u=a.entity.setComponentProperty,d={},p=\"color\",A=\"rotation\",f=\"scale\",m=\"components\";function g(e){e.x=o.MathUtils.degToRad(e.x),e.y=o.MathUtils.degToRad(e.y),e.z=o.MathUtils.degToRad(e.z)}function v(e,t,n){var i;for(i=0;i\u003Ct.length;i++)e.addEventListener(t[i],n)}function y(e,t,n){var i;for(i=0;i\u003Ct.length;i++)e.removeEventListener(t[i],n)}function E(e,t){var n,i,r;for(i=x(t),r=e,n=0;n\u003Ci.length;n++)r=r[i[n]];if(void 0===r)throw console.log(e),new Error(\"[animation] property (\"+t+\") could not be found\");return r}function b(e,t,n,i){var r,s,a,l;for(t.startsWith(\"object3D.rotation\")&&(n=o.MathUtils.degToRad(n)),s=x(t),l=e,r=0;r\u003Cs.length-1;r++)l=l[s[r]];a=s[s.length-1],i!==p?l[a]=n:\"r\"in l[a]?(l[a].r=n.r,l[a].g=n.g,l[a].b=n.b):(l[a].x=n.r,l[a].y=n.g,l[a].z=n.b)}function x(e){return e in d||(d[e]=e.split(\".\")),d[e]}function w(e){return e.isRawProperty||e.property.startsWith(m)||e.property.startsWith(\"object3D\")}e.exports.Component=s(\"animation\",{schema:{autoplay:{default:!0},delay:{default:0},dir:{default:\"\"},dur:{default:1e3},easing:{default:\"easeInQuad\"},elasticity:{default:400},enabled:{default:!0},from:{default:\"\"},loop:{default:0,parse:function(e){return!0===e||\"true\"===e||!1!==e&&\"false\"!==e&&parseInt(e,10)}},property:{default:\"\"},startEvents:{type:\"array\"},pauseEvents:{type:\"array\"},resumeEvents:{type:\"array\"},round:{default:!1},to:{default:\"\"},type:{default:\"\"},isRawProperty:{default:!1}},multiple:!0,init:function(){var e=this;this.eventDetail={name:this.attrName},this.time=0,this.animation=null,this.animationIsPlaying=!1,this.onStartEvent=this.onStartEvent.bind(this),this.beginAnimation=this.beginAnimation.bind(this),this.pauseAnimation=this.pauseAnimation.bind(this),this.resumeAnimation=this.resumeAnimation.bind(this),this.fromColor={},this.toColor={},this.targets={},this.targetsArray=[],this.updateConfigForDefault=this.updateConfigForDefault.bind(this),this.updateConfigForRawColor=this.updateConfigForRawColor.bind(this),this.config={complete:function(){e.animationIsPlaying=!1,e.el.emit(\"animationcomplete\",e.eventDetail,!1),e.id&&e.el.emit(\"animationcomplete__\"+e.id,e.eventDetail,!1)}}},update:function(e){var t=this.config,n=this.data;this.animationIsPlaying=!1,this.data.enabled&&n.property&&(t.autoplay=!1,t.direction=n.dir,t.duration=n.dur,t.easing=n.easing,t.elasticity=n.elasticity,t.loop=n.loop,t.round=n.round,this.createAndStartAnimation())},tick:function(e,t){this.animationIsPlaying&&(this.time+=t,this.animation.tick(this.time))},remove:function(){this.pauseAnimation(),this.removeEventListeners()},pause:function(){this.paused=!0,this.pausedWasPlaying=this.animationIsPlaying,this.pauseAnimation(),this.removeEventListeners()},play:function(){this.paused&&(this.paused=!1,this.addEventListeners(),this.pausedWasPlaying&&(this.resumeAnimation(),this.pausedWasPlaying=!1))},createAndStartAnimation:function(){var e=this.data;this.updateConfig(),this.animationIsPlaying=!1,this.animation=i(this.config),this.animation.began=!0,this.removeEventListeners(),this.addEventListeners(),!e.autoplay||e.startEvents&&e.startEvents.length||(e.delay?setTimeout(this.beginAnimation,e.delay):this.beginAnimation())},beginAnimation:function(){this.updateConfig(),this.animation.began=!0,this.time=0,this.animationIsPlaying=!0,this.stopRelatedAnimations(),this.el.emit(\"animationbegin\",this.eventDetail,!1)},pauseAnimation:function(){this.animationIsPlaying=!1},resumeAnimation:function(){this.animationIsPlaying=!0},onStartEvent:function(){this.data.enabled&&(this.updateConfig(),this.animation&&this.animation.pause(),this.animation=i(this.config),this.data.delay?setTimeout(this.beginAnimation,this.data.delay):this.beginAnimation())},updateConfigForRawColor:function(){var e,t,n,i=this.config,r=this.data,s=this.el;if(!this.waitComponentInitRawProperty(this.updateConfigForRawColor)){for(t in e=\"\"===r.from?E(s,r.property):r.from,n=r.to,this.setColorConfig(e,n),e=this.fromColor,n=this.toColor,this.targetsArray.length=0,this.targetsArray.push(e),i.targets=this.targetsArray,n)i[t]=n[t];var o;i.update=(o={},function(e){var t;(t=e.animatables[0].target).r===o.r&&t.g===o.g&&t.b===o.b||b(s,r.property,t,r.type)})}},updateConfigForDefault:function(){var e,t,n,i,r=this.config,s=this.data,o=this.el;this.waitComponentInitRawProperty(this.updateConfigForDefault)||(e=\"\"===s.from?w(s)?E(o,s.property):h(o,s.property):s.from,n=s.to,isNaN(e||n)?(e=e?e.toString():e,n=n?n.toString():n):(e=parseFloat(e),n=parseFloat(n)),(t=\"true\"===s.to||\"false\"===s.to||!0===s.to||!1===s.to)&&(e=\"true\"===s.from||!0===s.from?1:0,n=\"true\"===s.to||!0===s.to?1:0),this.targets.aframeProperty=e,r.targets=this.targets,r.aframeProperty=n,r.update=function(e){var n;(n=e.animatables[0].target.aframeProperty)!==i&&(i=n,t&&(n=n>=1),w(s)?b(o,s.property,n,s.type):u(o,s.property,n))})},updateConfigForVector:function(){var e,t,n,i,r=this.config,s=this.data,o=this.el;for(e in t=\"\"!==s.from?a.coordinates.parse(s.from):h(o,s.property),n=a.coordinates.parse(s.to),s.property===A&&(g(t),g(n)),this.targetsArray.length=0,this.targetsArray.push(t),r.targets=this.targetsArray,n)r[e]=n[e];\"position\"!==s.property&&s.property!==A&&s.property!==f?r.update=function(){var e={};return function(t){var n=t.animatables[0].target;n.x===e.x&&n.y===e.y&&n.z===e.z||(e.x=n.x,e.y=n.y,e.z=n.z,u(o,s.property,n))}}():r.update=(i={},function(e){var t=e.animatables[0].target;s.property===f&&(t.x=Math.max(1e-4,t.x),t.y=Math.max(1e-4,t.y),t.z=Math.max(1e-4,t.z)),t.x===i.x&&t.y===i.y&&t.z===i.z||(i.x=t.x,i.y=t.y,i.z=t.z,o.object3D[s.property].set(t.x,t.y,t.z))})},updateConfig:function(){var e,t,n,i,s,o,a;t=this.el,n=this.data.property,s=(o=n.split(\".\"))[0],a=o[1],e=(i=t.components[s]||r[s])?a&&!i.schema[a]?null:a?i.schema[a].type:i.schema.type:null,w(this.data)&&this.data.type===p?this.updateConfigForRawColor():\"vec2\"===e||\"vec3\"===e||\"vec4\"===e?this.updateConfigForVector():this.updateConfigForDefault()},waitComponentInitRawProperty:function(e){var t,n=this.data,r=this.el,s=this;return\"\"===n.from&&!!n.property.startsWith(m)&&(t=x(n.property)[1],!r.components[t]&&(r.addEventListener(\"componentinitialized\",(function n(o){o.detail.name===t&&(e(),s.animation=i(s.config),r.removeEventListener(\"componentinitialized\",n))})),!0))},stopRelatedAnimations:function(){var e,t;for(t in this.el.components)e=this.el.components[t],t!==this.attrName&&\"animation\"===e.name&&e.animationIsPlaying&&e.data.property===this.data.property&&(e.animationIsPlaying=!1)},addEventListeners:function(){var e=this.data,t=this.el;v(t,e.startEvents,this.onStartEvent),v(t,e.pauseEvents,this.pauseAnimation),v(t,e.resumeEvents,this.resumeAnimation)},removeEventListeners:function(){var e=this.data,t=this.el;y(t,e.startEvents,this.onStartEvent),y(t,e.pauseEvents,this.pauseAnimation),y(t,e.resumeEvents,this.resumeAnimation)},setColorConfig:function(e,t){l.set(e),c.set(t),e=this.fromColor,t=this.toColor,e.r=l.r,e.g=l.g,e.b=l.b,t.r=c.r,t.g=c.g,t.b=c.b}})},9541:(e,t,n)=>{var i=n(3515).registerComponent,r=n(2666);e.exports.Component=i(\"camera\",{schema:{active:{default:!0},far:{default:1e4},fov:{default:80,min:0},near:{default:.005,min:0},spectator:{default:!1},zoom:{default:1,min:0}},init:function(){var e,t=this.el;e=this.camera=new r.PerspectiveCamera,t.setObject3D(\"camera\",e)},update:function(e){var t=this.data,n=this.camera;n.aspect=t.aspect||window.innerWidth/window.innerHeight,n.far=t.far,n.fov=t.fov,n.near=t.near,n.zoom=t.zoom,n.updateProjectionMatrix(),this.updateActiveCamera(e),this.updateSpectatorCamera(e)},updateActiveCamera:function(e){var t=this.data,n=this.el,i=this.system;e&&e.active===t.active||t.spectator||(t.active&&i.activeCameraEl!==n?i.setActiveCamera(n):t.active||i.activeCameraEl!==n||i.disableActiveCamera())},updateSpectatorCamera:function(e){var t=this.data,n=this.el,i=this.system;e&&e.spectator===t.spectator||(t.spectator&&i.spectatorCameraEl!==n?i.setSpectatorCamera(n):t.spectator||i.spectatorCameraEl!==n||i.disableSpectatorCamera())},remove:function(){this.el.removeObject3D(\"camera\")}})},57:(e,t,n)=>{var i,r,s,o,a=n(3515).registerComponent,l=n(8903),c=l.bind,h=\"click\",u=\"mouseup\",d=\"cursor-fusing\",p=\"cursor-hovering\",A=\"cursor-hovered\",f={DOWN:[\"mousedown\",\"touchstart\"],UP:[\"mouseup\",\"touchend\"]},m={DOWN:[\"selectstart\"],UP:[\"selectend\"]},g=\"a-mouse-cursor-hover\";e.exports.Component=a(\"cursor\",{dependencies:[\"raycaster\"],schema:{downEvents:{default:[]},fuse:{default:l.device.isMobile()},fuseTimeout:{default:1500,min:0},mouseCursorStylesEnabled:{default:!0},upEvents:{default:[]},rayOrigin:{default:\"entity\",oneOf:[\"mouse\",\"entity\",\"xrselect\"]}},multiple:!0,init:function(){var e=this;this.fuseTimeout=void 0,this.cursorDownEl=null,this.intersectedEl=null,this.canvasBounds=document.body.getBoundingClientRect(),this.isCursorDown=!1,this.activeXRInput=null,this.updateCanvasBounds=l.debounce((function(){e.canvasBounds=e.el.sceneEl.canvas.getBoundingClientRect()}),500),this.eventDetail={},this.intersectedEventDetail={cursorEl:this.el},this.onCursorDown=c(this.onCursorDown,this),this.onCursorUp=c(this.onCursorUp,this),this.onIntersection=c(this.onIntersection,this),this.onIntersectionCleared=c(this.onIntersectionCleared,this),this.onMouseMove=c(this.onMouseMove,this),this.onEnterVR=c(this.onEnterVR,this)},update:function(e){this.data.rayOrigin!==e.rayOrigin&&this.updateMouseEventListeners()},tick:function(){var e=this.el.sceneEl.frame,t=this.activeXRInput;\"xrselect\"===this.data.rayOrigin&&e&&t&&this.onMouseMove({frame:e,inputSource:t,type:\"fakeselectevent\"})},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){var e=this.el;e.removeState(p),e.removeState(d),clearTimeout(this.fuseTimeout),this.intersectedEl&&this.intersectedEl.removeState(A),this.removeEventListeners()},addEventListeners:function(){var e,t=this.data,n=this.el,i=this;function r(){e=n.sceneEl.canvas,t.downEvents.length||t.upEvents.length||(f.DOWN.forEach((function(t){e.addEventListener(t,i.onCursorDown)})),f.UP.forEach((function(t){e.addEventListener(t,i.onCursorUp)})))}(e=n.sceneEl.canvas)?r():n.sceneEl.addEventListener(\"render-target-loaded\",r),t.downEvents.forEach((function(e){n.addEventListener(e,i.onCursorDown)})),t.upEvents.forEach((function(e){n.addEventListener(e,i.onCursorUp)})),n.addEventListener(\"raycaster-intersection\",this.onIntersection),n.addEventListener(\"raycaster-closest-entity-changed\",this.onIntersection),n.addEventListener(\"raycaster-intersection-cleared\",this.onIntersectionCleared),n.sceneEl.addEventListener(\"rendererresize\",this.updateCanvasBounds),n.sceneEl.addEventListener(\"enter-vr\",this.onEnterVR),window.addEventListener(\"resize\",this.updateCanvasBounds),window.addEventListener(\"scroll\",this.updateCanvasBounds),this.updateMouseEventListeners()},removeEventListeners:function(){var e,t=this.data,n=this.el,i=this;!(e=n.sceneEl.canvas)||t.downEvents.length||t.upEvents.length||(f.DOWN.forEach((function(t){e.removeEventListener(t,i.onCursorDown)})),f.UP.forEach((function(t){e.removeEventListener(t,i.onCursorUp)}))),t.downEvents.forEach((function(e){n.removeEventListener(e,i.onCursorDown)})),t.upEvents.forEach((function(e){n.removeEventListener(e,i.onCursorUp)})),n.removeEventListener(\"raycaster-intersection\",this.onIntersection),n.removeEventListener(\"raycaster-intersection-cleared\",this.onIntersectionCleared),e.removeEventListener(\"mousemove\",this.onMouseMove),e.removeEventListener(\"touchstart\",this.onMouseMove),e.removeEventListener(\"touchmove\",this.onMouseMove),n.sceneEl.removeEventListener(\"rendererresize\",this.updateCanvasBounds),n.sceneEl.removeEventListener(\"enter-vr\",this.onEnterVR),window.removeEventListener(\"resize\",this.updateCanvasBounds),window.removeEventListener(\"scroll\",this.updateCanvasBounds)},updateMouseEventListeners:function(){var e,t=this.el;(e=t.sceneEl.canvas).removeEventListener(\"mousemove\",this.onMouseMove),e.removeEventListener(\"touchmove\",this.onMouseMove),t.setAttribute(\"raycaster\",\"useWorldCoordinates\",!1),\"mouse\"===this.data.rayOrigin&&(e.addEventListener(\"mousemove\",this.onMouseMove,!1),e.addEventListener(\"touchmove\",this.onMouseMove,!1),t.setAttribute(\"raycaster\",\"useWorldCoordinates\",!0),this.updateCanvasBounds())},onMouseMove:(i=new THREE.Vector3,r=new THREE.Vector2,s=new THREE.Vector3,o={origin:s,direction:i},function(e){var t,n,a,l,c,h,u,d=this.canvasBounds,p=this.el.sceneEl.camera;p.parent.updateMatrixWorld(),t=(n=\"touchmove\"===e.type||\"touchstart\"===e.type?e.touches.item(0):e).clientX-d.left,a=n.clientY-d.top,r.x=t/d.width*2-1,r.y=-a/d.height*2+1,\"xrselect\"!==this.data.rayOrigin||\"selectstart\"!==e.type&&\"fakeselectevent\"!==e.type?\"fakeselectout\"===e.type?(i.set(0,1,0),s.set(0,9999,0)):p&&p.isPerspectiveCamera?(s.setFromMatrixPosition(p.matrixWorld),i.set(r.x,r.y,.5).unproject(p).sub(s).normalize()):p&&p.isOrthographicCamera?(s.set(r.x,r.y,(p.near+p.far)/(p.near-p.far)).unproject(p),i.set(0,0,-1).transformDirection(p.matrixWorld)):console.error(\"AFRAME.Raycaster: Unsupported camera type: \"+p.type):(l=e.frame,c=e.inputSource,h=this.el.renderer.xr.getReferenceSpace(),u=l.getPose(c.targetRaySpace,h).transform,i.set(0,0,-1),i.applyQuaternion(u.orientation),s.copy(u.position)),this.el.setAttribute(\"raycaster\",o),\"touchmove\"===e.type&&e.preventDefault()}),onCursorDown:function(e){this.isCursorDown=!0,\"mouse\"===this.data.rayOrigin&&\"touchstart\"===e.type&&(this.onMouseMove(e),this.el.components.raycaster.checkIntersections(),e.preventDefault()),\"xrselect\"===this.data.rayOrigin&&\"selectstart\"===e.type&&(this.activeXRInput=e.inputSource,this.onMouseMove(e),this.el.components.raycaster.checkIntersections(),this.el.components.raycaster.intersectedEls.length&&void 0!==this.el.sceneEl.components[\"ar-hit-test\"]&&this.el.sceneEl.getAttribute(\"ar-hit-test\").enabled&&(this.el.sceneEl.setAttribute(\"ar-hit-test\",\"enabled\",!1),this.reenableARHitTest=!0)),this.twoWayEmit(\"mousedown\",e),this.cursorDownEl=this.intersectedEl},onCursorUp:function(e){if(this.isCursorDown){this.isCursorDown=!1;var t=this.data;this.twoWayEmit(u,e),!0===this.reenableARHitTest&&(this.el.sceneEl.setAttribute(\"ar-hit-test\",\"enabled\",!0),this.reenableARHitTest=void 0),this.cursorDownEl&&this.cursorDownEl!==this.intersectedEl&&(this.intersectedEventDetail.intersection=null,this.cursorDownEl.emit(u,this.intersectedEventDetail)),t.fuse&&\"mouse\"!==t.rayOrigin&&\"xrselect\"!==t.rayOrigin||!this.intersectedEl||this.cursorDownEl!==this.intersectedEl||this.twoWayEmit(h,e),\"xrselect\"===t.rayOrigin&&this.activeXRInput===e.inputSource&&this.onMouseMove({type:\"fakeselectout\"}),this.activeXRInput=null,this.cursorDownEl=null,\"touchend\"===e.type&&e.preventDefault()}},onIntersection:function(e){var t,n,i,r,s=this.el;n=e.detail.els[0]===s?1:0,r=e.detail.intersections[n],(i=e.detail.els[n])&&this.intersectedEl!==i&&(this.intersectedEl&&(t=this.el.components.raycaster.getIntersection(this.intersectedEl))&&t.distance\u003C=r.distance||(this.clearCurrentIntersection(!0),this.setIntersection(i,r)))},onIntersectionCleared:function(e){-1!==e.detail.clearedEls.indexOf(this.intersectedEl)&&this.clearCurrentIntersection()},onEnterVR:function(){this.clearCurrentIntersection(!0);var e=this.el.sceneEl.xrSession,t=this;e&&\"mouse\"!==this.data.rayOrigin&&(m.DOWN.forEach((function(n){e.addEventListener(n,t.onCursorDown)})),m.UP.forEach((function(n){e.addEventListener(n,t.onCursorUp)})))},setIntersection:function(e,t){var n=this.el,i=this.data,r=this;this.intersectedEl!==e&&(this.intersectedEl=e,n.addState(p),e.addState(A),this.twoWayEmit(\"mouseenter\"),this.data.mouseCursorStylesEnabled&&\"mouse\"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.add(g),0!==i.fuseTimeout&&i.fuse&&\"xrselect\"!==i.rayOrigin&&\"mouse\"!==i.rayOrigin&&(n.addState(d),this.twoWayEmit(\"fusing\"),this.fuseTimeout=setTimeout((function(){n.removeState(d),r.twoWayEmit(h)}),i.fuseTimeout)))},clearCurrentIntersection:function(e){var t,n,i=this.el;this.intersectedEl&&(this.intersectedEl.removeState(A),i.removeState(p),i.removeState(d),this.twoWayEmit(\"mouseleave\"),this.data.mouseCursorStylesEnabled&&\"mouse\"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.remove(g),this.intersectedEl=null,clearTimeout(this.fuseTimeout),!0!==e&&0!==(n=this.el.components.raycaster.intersections).length&&(t=n[n[0].object.el===i?1:0])&&this.setIntersection(t.object.el,t))},twoWayEmit:function(e,t){var n,i=this.el,r=this.intersectedEl;function s(e,n){t instanceof MouseEvent?e.mouseEvent=t:\"undefined\"!=typeof TouchEvent&&t instanceof TouchEvent&&(e.touchEvent=t)}n=this.el.components.raycaster.getIntersection(r),this.eventDetail.intersectedEl=r,this.eventDetail.intersection=n,s(this.eventDetail),i.emit(e,this.eventDetail),r&&(this.intersectedEventDetail.intersection=n,s(this.intersectedEventDetail),r.emit(e,this.intersectedEventDetail))}})},9830:(e,t,n)=>{var i=n(3515).registerComponent,r=n(7629),s=n(6600),o=s.checkControllerPresentAndSetup,a=s.emitIfAxesChanged,l=s.onButtonEvent,c=\"https://cdn.aframe.io/controllers/google/\",h=c+\"vr_controller_daydream.obj\",u=c+\"vr_controller_daydream.mtl\",d=n(8903).device.isWebXRAvailable,p=d?\"google-daydream\":\"Daydream Controller\",A=d?{axes:{touchpad:[0,1]},buttons:[\"none\",\"none\",\"touchpad\",\"menu\",\"system\"]}:{axes:{trackpad:[0,1]},buttons:[\"trackpad\",\"menu\",\"system\"]};e.exports.Component=i(\"daydream-controls\",{schema:{hand:{default:\"\"},buttonColor:{type:\"color\",default:\"#000000\"},buttonTouchedColor:{type:\"color\",default:\"#777777\"},buttonHighlightColor:{type:\"color\",default:\"#FFFFFF\"},model:{default:!0},orientationOffset:{type:\"vec3\"},armModel:{default:!0}},mapping:A,bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,\"down\",e)},this.onButtonUp=function(t){l(t.detail.id,\"up\",e)},this.onButtonTouchStart=function(t){l(t.detail.id,\"touchstart\",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,\"touchend\",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"model-loaded\",this.onModelLoaded),e.addEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"model-loaded\",this.onModelLoaded),e.removeEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){o(this,p,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{armModel:t.armModel,hand:t.hand,idPrefix:p,id:p,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute(\"obj-model\",{obj:h,mtl:u})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).menu=n.getObjectByName(\"AppButton_AppButton_Cylinder.004\"),t.system=n.getObjectByName(\"HomeButton_HomeButton_Cylinder.005\"),t.trackpad=n.getObjectByName(\"TouchPad_TouchPad_Cylinder.003\"),t.touchpad=n.getObjectByName(\"TouchPad_TouchPad_Cylinder.003\"),n.position.set(0,0,-.04))},onAxisMoved:function(e){a(this,this.mapping.axes,e)},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+\"changed\",e.detail.state)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var i;switch(t){case\"down\":i=this.data.buttonHighlightColor;break;case\"touchstart\":i=this.data.buttonTouchedColor;break;default:i=this.data.buttonColor}n[e].material.color.set(i)}}})},9531:(e,t,n)=>{var i=n(3515).registerComponent,r=n(7629),s=n(6600),o=s.checkControllerPresentAndSetup,a=s.emitIfAxesChanged,l=s.onButtonEvent,c=n(8903).device.isWebXRAvailable,h=\"https://cdn.aframe.io/controllers/samsung/\",u=h+\"gear_vr_controller.obj\",d=h+\"gear_vr_controller.mtl\",p=c?\"samsung-gearvr\":\"Gear VR\",A=c?{axes:{touchpad:[0,1]},buttons:[\"trigger\",\"none\",\"touchpad\",\"none\",\"menu\"]}:{axes:{trackpad:[0,1]},buttons:[\"trackpad\",\"trigger\"]};e.exports.Component=i(\"gearvr-controls\",{schema:{hand:{default:\"\"},buttonColor:{type:\"color\",default:\"#000000\"},buttonTouchedColor:{type:\"color\",default:\"#777777\"},buttonHighlightColor:{type:\"color\",default:\"#FFFFFF\"},model:{default:!0},orientationOffset:{type:\"vec3\"},armModel:{default:!0}},mapping:A,bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,\"down\",e)},this.onButtonUp=function(t){l(t.detail.id,\"up\",e)},this.onButtonTouchStart=function(t){l(t.detail.id,\"touchstart\",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,\"touchend\",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"model-loaded\",this.onModelLoaded),e.addEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"model-loaded\",this.onModelLoaded),e.removeEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){o(this,p,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{armModel:t.armModel,hand:t.hand,idPrefix:p,id:p,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute(\"obj-model\",{obj:u,mtl:d})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.children[2],t.trackpad=n.children[1],t.touchpad=n.children[1])},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+\"changed\",e.detail.state)},onAxisMoved:function(e){a(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var i;switch(t){case\"down\":i=this.data.buttonHighlightColor;break;case\"touchstart\":i=this.data.buttonTouchedColor;break;default:i=this.data.buttonColor}n[e].material.color.set(i)}}})},9577:(e,t,n)=>{var i=n(3515).registerComponent,r=n(7629),s=n(6600),o=s.checkControllerPresentAndSetup,a=s.emitIfAxesChanged,l=s.onButtonEvent,c=\"generic\";e.exports.Component=i(\"generic-tracked-controller-controls\",{schema:{hand:{default:\"\"},defaultModel:{default:!0},defaultModelColor:{default:\"gray\"},orientationOffset:{type:\"vec3\"},disabled:{default:!1}},mapping:{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:[\"trigger\",\"squeeze\",\"touchpad\",\"thumbstick\"]},bindMethods:function(){this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,\"down\",e)},this.onButtonUp=function(t){l(t.detail.id,\"up\",e)},this.onButtonTouchStart=function(t){l(t.detail.id,\"touchstart\",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,\"touchend\",e)},this.controllerPresent=!1,this.wasControllerConnected=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods(),this.el.addEventListener(\"controllerconnected\",(function(t){t.detail.name!==e.name&&(e.wasControllerConnected=!0,e.removeEventListeners(),e.removeControllersUpdateListener())}))},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;o(this,c,{hand:t,iterateControllerProfiles:!0})},play:function(){this.wasControllerConnected||(this.checkIfControllerPresent(),this.addControllersUpdateListener())},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;this.el.components[\"tracked-controls\"]?this.removeEventListeners():(e.setAttribute(\"tracked-controls\",{hand:t.hand,idPrefix:c,orientationOffset:t.orientationOffset,iterateControllerProfiles:!0}),this.data.defaultModel&&this.initDefaultModel())},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+\"changed\",e.detail.state)},onAxisMoved:function(e){a(this,this.mapping.axes,e)},initDefaultModel:function(){var e=this.modelEl=document.createElement(\"a-entity\");e.setAttribute(\"geometry\",{primitive:\"sphere\",radius:.03}),e.setAttribute(\"material\",{color:this.data.color}),this.el.appendChild(e)}})},2503:(e,t,n)=>{var i=n(4863).xZ,r=n(4863).ib,s=n(3515).registerComponent,o=n(2666),a=new o.BufferGeometry;e.exports.Component=s(\"geometry\",{schema:{buffer:{default:!0},primitive:{default:\"box\",oneOf:r,schemaChange:!0},skipCache:{default:!1}},init:function(){this.geometry=null},update:function(e){var t,n=this.data,i=this.el,r=this.system;this.geometry&&(r.unuseGeometry(e),this.geometry=null),this.geometry=r.getOrCreateGeometry(n),(t=i.getObject3D(\"mesh\"))?t.geometry=this.geometry:((t=new o.Mesh).geometry=this.geometry,this.el.getAttribute(\"material\")||(t.material=new o.MeshStandardMaterial({color:16777215*Math.random(),metalness:0,roughness:.5})),i.setObject3D(\"mesh\",t))},remove:function(){this.system.unuseGeometry(this.data),this.el.getObject3D(\"mesh\").geometry=a,this.geometry=null},updateSchema:function(e){var t=this.oldData&&this.oldData.primitive,n=e.primitive,r=i[n]&&i[n].schema;if(!r)throw new Error(\"Unknown geometry schema `\"+n+\"`\");t&&t===n||this.extendSchema(r)}})},3647:(e,t,n)=>{var i=n(3515).registerComponent,r=n(2666),s=n(8903).debug(\"components:gltf-model:warn\");e.exports.Component=i(\"gltf-model\",{schema:{type:\"model\"},init:function(){var e=this,t=this.system.getDRACOLoader(),n=this.system.getMeshoptDecoder(),i=this.system.getKTX2Loader();this.model=null,this.loader=new r.GLTFLoader,t&&this.loader.setDRACOLoader(t),this.ready=n?n.then((function(t){e.loader.setMeshoptDecoder(t)})):Promise.resolve(),i&&this.loader.setKTX2Loader(i)},update:function(){var e=this,t=this.el,n=this.data;n&&(this.remove(),this.ready.then((function(){e.loader.load(n,(function(n){e.model=n.scene||n.scenes[0],e.model.animations=n.animations,t.setObject3D(\"mesh\",e.model),t.emit(\"model-loaded\",{format:\"gltf\",model:e.model})}),void 0,(function(e){var i=e&&e.message?e.message:\"Failed to load glTF model\";s(i),t.emit(\"model-error\",{format:\"gltf\",src:n})}))})))},remove:function(){this.model&&this.el.removeObject3D(\"mesh\")}})},2346:(e,t,n)=>{var i=n(3515).registerComponent,r={toonLeft:\"https://cdn.aframe.io/controllers/hands/leftHand.glb\",toonRight:\"https://cdn.aframe.io/controllers/hands/rightHand.glb\",lowPolyLeft:\"https://cdn.aframe.io/controllers/hands/leftHandLow.glb\",lowPolyRight:\"https://cdn.aframe.io/controllers/hands/rightHandLow.glb\",highPolyLeft:\"https://cdn.aframe.io/controllers/hands/leftHandHigh.glb\",highPolyRight:\"https://cdn.aframe.io/controllers/hands/rightHandHigh.glb\"},s=\"Open\",o=\"Point\",a=\"Fist\",l=\"Thumb Up\",c={};function h(e,t){var n;if(e)return\"grip\"===(n=c[e])?n+(t?\"close\":\"open\"):\"point\"===n?n+(t?\"up\":\"down\"):\"pointing\"===n||\"pistol\"===n?n+(t?\"start\":\"end\"):void 0}c[a]=\"grip\",c[l]=\"pistol\",c[o]=\"pointing\",e.exports.Component=i(\"hand-controls\",{schema:{color:{default:\"white\",type:\"color\"},hand:{default:\"left\"},handModelStyle:{default:\"lowPoly\",oneOf:[\"lowPoly\",\"highPoly\",\"toon\"]}},init:function(){var e=this,t=this.el;this.gesture=s,this.pressedButtons={},this.touchedButtons={},this.loader=new THREE.GLTFLoader,this.loader.setCrossOrigin(\"anonymous\"),this.onGripDown=function(){e.handleButton(\"grip\",\"down\")},this.onGripUp=function(){e.handleButton(\"grip\",\"up\")},this.onTrackpadDown=function(){e.handleButton(\"trackpad\",\"down\")},this.onTrackpadUp=function(){e.handleButton(\"trackpad\",\"up\")},this.onTrackpadTouchStart=function(){e.handleButton(\"trackpad\",\"touchstart\")},this.onTrackpadTouchEnd=function(){e.handleButton(\"trackpad\",\"touchend\")},this.onTriggerDown=function(){e.handleButton(\"trigger\",\"down\")},this.onTriggerUp=function(){e.handleButton(\"trigger\",\"up\")},this.onTriggerTouchStart=function(){e.handleButton(\"trigger\",\"touchstart\")},this.onTriggerTouchEnd=function(){e.handleButton(\"trigger\",\"touchend\")},this.onGripTouchStart=function(){e.handleButton(\"grip\",\"touchstart\")},this.onGripTouchEnd=function(){e.handleButton(\"grip\",\"touchend\")},this.onThumbstickDown=function(){e.handleButton(\"thumbstick\",\"down\")},this.onThumbstickUp=function(){e.handleButton(\"thumbstick\",\"up\")},this.onAorXTouchStart=function(){e.handleButton(\"AorX\",\"touchstart\")},this.onAorXTouchEnd=function(){e.handleButton(\"AorX\",\"touchend\")},this.onBorYTouchStart=function(){e.handleButton(\"BorY\",\"touchstart\")},this.onBorYTouchEnd=function(){e.handleButton(\"BorY\",\"touchend\")},this.onSurfaceTouchStart=function(){e.handleButton(\"surface\",\"touchstart\")},this.onSurfaceTouchEnd=function(){e.handleButton(\"surface\",\"touchend\")},this.onControllerConnected=this.onControllerConnected.bind(this),this.onControllerDisconnected=this.onControllerDisconnected.bind(this),t.addEventListener(\"controllerconnected\",this.onControllerConnected),t.addEventListener(\"controllerdisconnected\",this.onControllerDisconnected),t.object3D.visible=!1},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},tick:function(e,t){var n=this.el.getObject3D(\"mesh\");n&&n.mixer&&n.mixer.update(t/1e3)},onControllerConnected:function(){this.el.object3D.visible=!0},onControllerDisconnected:function(){this.el.object3D.visible=!1},addEventListeners:function(){var e=this.el;e.addEventListener(\"gripdown\",this.onGripDown),e.addEventListener(\"gripup\",this.onGripUp),e.addEventListener(\"trackpaddown\",this.onTrackpadDown),e.addEventListener(\"trackpadup\",this.onTrackpadUp),e.addEventListener(\"trackpadtouchstart\",this.onTrackpadTouchStart),e.addEventListener(\"trackpadtouchend\",this.onTrackpadTouchEnd),e.addEventListener(\"triggerdown\",this.onTriggerDown),e.addEventListener(\"triggerup\",this.onTriggerUp),e.addEventListener(\"triggertouchstart\",this.onTriggerTouchStart),e.addEventListener(\"triggertouchend\",this.onTriggerTouchEnd),e.addEventListener(\"griptouchstart\",this.onGripTouchStart),e.addEventListener(\"griptouchend\",this.onGripTouchEnd),e.addEventListener(\"thumbstickdown\",this.onThumbstickDown),e.addEventListener(\"thumbstickup\",this.onThumbstickUp),e.addEventListener(\"abuttontouchstart\",this.onAorXTouchStart),e.addEventListener(\"abuttontouchend\",this.onAorXTouchEnd),e.addEventListener(\"bbuttontouchstart\",this.onBorYTouchStart),e.addEventListener(\"bbuttontouchend\",this.onBorYTouchEnd),e.addEventListener(\"xbuttontouchstart\",this.onAorXTouchStart),e.addEventListener(\"xbuttontouchend\",this.onAorXTouchEnd),e.addEventListener(\"ybuttontouchstart\",this.onBorYTouchStart),e.addEventListener(\"ybuttontouchend\",this.onBorYTouchEnd),e.addEventListener(\"surfacetouchstart\",this.onSurfaceTouchStart),e.addEventListener(\"surfacetouchend\",this.onSurfaceTouchEnd)},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"gripdown\",this.onGripDown),e.removeEventListener(\"gripup\",this.onGripUp),e.removeEventListener(\"trackpaddown\",this.onTrackpadDown),e.removeEventListener(\"trackpadup\",this.onTrackpadUp),e.removeEventListener(\"trackpadtouchstart\",this.onTrackpadTouchStart),e.removeEventListener(\"trackpadtouchend\",this.onTrackpadTouchEnd),e.removeEventListener(\"triggerdown\",this.onTriggerDown),e.removeEventListener(\"triggerup\",this.onTriggerUp),e.removeEventListener(\"triggertouchstart\",this.onTriggerTouchStart),e.removeEventListener(\"triggertouchend\",this.onTriggerTouchEnd),e.removeEventListener(\"griptouchstart\",this.onGripTouchStart),e.removeEventListener(\"griptouchend\",this.onGripTouchEnd),e.removeEventListener(\"thumbstickdown\",this.onThumbstickDown),e.removeEventListener(\"thumbstickup\",this.onThumbstickUp),e.removeEventListener(\"abuttontouchstart\",this.onAorXTouchStart),e.removeEventListener(\"abuttontouchend\",this.onAorXTouchEnd),e.removeEventListener(\"bbuttontouchstart\",this.onBorYTouchStart),e.removeEventListener(\"bbuttontouchend\",this.onBorYTouchEnd),e.removeEventListener(\"xbuttontouchstart\",this.onAorXTouchStart),e.removeEventListener(\"xbuttontouchend\",this.onAorXTouchEnd),e.removeEventListener(\"ybuttontouchstart\",this.onBorYTouchStart),e.removeEventListener(\"ybuttontouchend\",this.onBorYTouchEnd),e.removeEventListener(\"surfacetouchstart\",this.onSurfaceTouchStart),e.removeEventListener(\"surfacetouchend\",this.onSurfaceTouchEnd)},update:function(e){var t,n=this.el,i=this.data.hand,s=this.data.handModelStyle,o=this.data.color,a=this;if(t={hand:i,model:!1},i!==e){var l=r[s+i.charAt(0).toUpperCase()+i.slice(1)];this.loader.load(l,(function(e){var r=e.scene.children[0],s=\"left\"===i?Math.PI/2:-Math.PI/2;r.mixer=new THREE.AnimationMixer(r),a.clips=e.animations,n.setObject3D(\"mesh\",r),r.children[1].material.color=new THREE.Color(o),r.position.set(0,0,0),r.rotation.set(0,0,s),n.setAttribute(\"magicleap-controls\",t),n.setAttribute(\"vive-controls\",t),n.setAttribute(\"oculus-touch-controls\",t),n.setAttribute(\"windows-motion-controls\",t),n.setAttribute(\"hp-mixed-reality-controls\",t)}))}},remove:function(){this.el.removeObject3D(\"mesh\")},handleButton:function(e,t){var n,i=\"down\"===t,r=\"touchstart\"===t;if(0===t.indexOf(\"touch\")){if(r===this.touchedButtons[e])return;this.touchedButtons[e]=r}else{if(i===this.pressedButtons[e])return;this.pressedButtons[e]=i}n=this.gesture,this.gesture=this.determineGesture(),this.gesture!==n&&(this.animateGesture(this.gesture,n),this.emitGestureEvents(this.gesture,n))},determineGesture:function(){var e,t,n,i=this.pressedButtons.grip,r=this.pressedButtons.surface||this.touchedButtons.surface,s=this.pressedButtons.trackpad||this.touchedButtons.trackpad,c=this.pressedButtons.trigger||this.touchedButtons.trigger,h=this.touchedButtons.AorX||this.touchedButtons.BorY;return t=this.el.components[\"tracked-controls\"],(n=t&&t.controller)&&(n.id&&0===n.id.indexOf(\"OpenVR \")||n.profiles&&n.profiles[0]&&\"htc-vive\"===n.profiles[0])?i||c?e=a:s&&(e=o):i?e=r||h||s?c?a:o:c?l:\"Point + Thumb\":c&&(e=\"Hold\"),e},getClip:function(e){var t,n;for(n=0;n\u003Cthis.clips.length;n++)if((t=this.clips[n]).name===e)return t},animateGesture:function(e,t){e?this.playAnimation(e||s,t,!1):this.playAnimation(t,t,!0)},emitGestureEvents:function(e,t){var n,i=this.el;t!==e&&((n=h(t,!1))&&i.emit(n),(n=h(e,!0))&&i.emit(n))},playAnimation:function(e,t,n){var i,r,s,o=this.el.getObject3D(\"mesh\");if(o){if(o.mixer.stopAllAction(),i=this.getClip(e),(s=o.mixer.clipAction(i)).clampWhenFinished=!0,s.loop=THREE.LoopRepeat,s.repetitions=0,s.timeScale=n?-1:1,s.time=n?i.duration:0,s.weight=1,!t||e===t)return o.mixer.stopAllAction(),void s.play();i=this.getClip(t),(r=o.mixer.clipAction(i)).weight=.15,r.play(),s.play(),r.crossFadeTo(s,.15,!0)}}})},6655:(e,t,n)=>{var i,r=n(3515).registerComponent,s=n(7629),o=n(6600).checkControllerPresentAndSetup,a=[\"wrist\",\"thumb-metacarpal\",\"thumb-phalanx-proximal\",\"thumb-phalanx-distal\",\"thumb-tip\",\"index-finger-metacarpal\",\"index-finger-phalanx-proximal\",\"index-finger-phalanx-intermediate\",\"index-finger-phalanx-distal\",\"index-finger-tip\",\"middle-finger-metacarpal\",\"middle-finger-phalanx-proximal\",\"middle-finger-phalanx-intermediate\",\"middle-finger-phalanx-distal\",\"middle-finger-tip\",\"ring-finger-metacarpal\",\"ring-finger-phalanx-proximal\",\"ring-finger-phalanx-intermediate\",\"ring-finger-phalanx-distal\",\"ring-finger-tip\",\"pinky-finger-metacarpal\",\"pinky-finger-phalanx-proximal\",\"pinky-finger-phalanx-intermediate\",\"pinky-finger-phalanx-distal\",\"pinky-finger-tip\"];e.exports.Component=r(\"hand-tracking-controls\",{schema:{hand:{default:\"right\",oneOf:[\"left\",\"right\"]},modelStyle:{default:\"mesh\",oneOf:[\"dots\",\"mesh\"]},modelColor:{default:\"white\"}},bindMethods:function(){this.onControllersUpdate=s(this.onControllersUpdate,this),this.checkIfControllerPresent=s(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=s(this.removeControllersUpdateListener,this)},addEventListeners:function(){this.el.addEventListener(\"model-loaded\",this.onModelLoaded);for(var e=0;e\u003Cthis.jointEls.length;++e)this.jointEls[e].object3D.visible=!0},removeEventListeners:function(){this.el.removeEventListener(\"model-loaded\",this.onModelLoaded);for(var e=0;e\u003Cthis.jointEls.length;++e)this.jointEls[e].object3D.visible=!1},init:function(){var e=this.el.sceneEl,t=e.getAttribute(\"webxr\").optionalFeatures;t.push(\"hand-tracking\"),e.setAttribute(\"webxr\",{optionalFeatures:t}),this.onModelLoaded=this.onModelLoaded.bind(this),this.jointEls=[],this.controllerPresent=!1,this.isPinched=!1,this.pinchEventDetail={position:new THREE.Vector3},this.indexTipPosition=new THREE.Vector3,this.bindMethods(),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.sceneEl.addEventListener(\"enter-vr\",this.updateReferenceSpace),this.el.sceneEl.addEventListener(\"exit-vr\",this.updateReferenceSpace)},updateReferenceSpace:function(){var e=this,t=this.el.sceneEl.xrSession;if(this.referenceSpace=void 0,t){var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t.getOffsetReferenceSpace(new XRRigidTransform({x:0,y:1.5,z:0}))})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,\"tracked-controls-webxr uses reference space \"+n),t}))}},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;o(this,\"\",{hand:t,iterateControllerProfiles:!0,handTracking:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},tick:function(){var e=this.el.sceneEl,t=this.el.components[\"tracked-controls\"]&&this.el.components[\"tracked-controls\"].controller,n=e.frame,i=this.el.components[\"tracked-controls-webxr\"];t&&n&&i&&t.hand&&(this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),n.getJointPose&&this.updateHandModel(),this.detectGesture())},updateHandModel:function(){\"dots\"===this.data.modelStyle&&this.updateHandDotsModel(),\"mesh\"===this.data.modelStyle&&this.updateHandMeshModel()},getBone:function(e){for(var t=this.bones,n=0;n\u003Ct.length;n++)if(t[n].name===e)return t[n];return null},updateHandMeshModel:function(){var e=this.el.sceneEl.frame,t=this.el.components[\"tracked-controls\"]&&this.el.components[\"tracked-controls\"].controller,n=this.referenceSpace;if(t&&this.mesh&&n)for(var i of(this.mesh.visible=!1,t.hand.values())){var r,s,o;s=e.getJointPose(i,n),null!=(r=this.getBone(i.jointName))&&s&&(o=s.transform,this.mesh.visible=!0,r.position.copy(o.position),r.quaternion.copy(o.orientation))}},updateHandDotsModel:function(){var e,t,n,i=this.el.sceneEl.frame,r=this.el.components[\"tracked-controls\"]&&this.el.components[\"tracked-controls\"].controller,s=this.el.components[\"tracked-controls-webxr\"].system.referenceSpace,o=0;for(var a of r.hand.values())t=(e=this.jointEls[o++]).object3D,n=i.getJointPose(a,s),e.object3D.visible=!!n,n&&(t.matrix.elements=n.transform.matrix,t.matrix.decompose(t.position,t.rotation,t.scale),e.setAttribute(\"scale\",{x:n.radius,y:n.radius,z:n.radius}))},detectGesture:function(){this.detectPinch()},detectPinch:(i=new THREE.Vector3,function(){var e=this.el.sceneEl.frame,t=this.indexTipPosition,n=this.el.components[\"tracked-controls\"]&&this.el.components[\"tracked-controls\"].controller,r=this.el.components[\"tracked-controls-webxr\"],s=this.referenceSpace||r.system.referenceSpace,o=n.hand.get(\"index-finger-tip\"),a=n.hand.get(\"thumb-tip\");if(o&&a){var l=e.getJointPose(o,s),c=e.getJointPose(a,s);if(l&&c){i.copy(c.transform.position),t.copy(l.transform.position);var h=t.distanceTo(i);h\u003C.015&&!1===this.isPinched&&(this.isPinched=!0,this.pinchEventDetail.position.copy(t).lerp(i,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit(\"pinchstarted\",this.pinchEventDetail)),h>.03&&!0===this.isPinched&&(this.isPinched=!1,this.pinchEventDetail.position.copy(t).lerp(i,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit(\"pinchended\",this.pinchEventDetail)),this.isPinched&&(this.pinchEventDetail.position.copy(t).lerp(i,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit(\"pinchmoved\",this.pinchEventDetail)),t.y+=1.5}}}),pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{hand:t.hand,iterateControllerProfiles:!0,handTrackingEnabled:!0}),this.initDefaultModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){var e;this.checkIfControllerPresent(),e=this.el.components[\"tracked-controls\"]&&this.el.components[\"tracked-controls\"].controller,this.el.getObject3D(\"mesh\")&&(e&&e.hand&&e.hand[0]||(this.el.getObject3D(\"mesh\").visible=!1))},initDefaultModel:function(){this.el.getObject3D(\"mesh\")||(\"dots\"===this.data.modelStyle&&this.initDotsModel(),\"mesh\"===this.data.modelStyle&&this.initMeshHandModel())},initDotsModel:function(){if(0===this.jointEls.length)for(var e=0;e\u003Ca.length;++e){var t=this.jointEl=document.createElement(\"a-entity\");t.setAttribute(\"geometry\",{primitive:\"sphere\",radius:1}),t.setAttribute(\"material\",{color:this.data.modelColor}),t.object3D.visible=!1,this.el.appendChild(t),this.jointEls.push(t)}},initMeshHandModel:function(){var e=\"left\"===this.data.hand?\"https://cdn.aframe.io/controllers/oculus-hands/v4/left.glb\":\"https://cdn.aframe.io/controllers/oculus-hands/v4/right.glb\";this.el.setAttribute(\"gltf-model\",e)},onModelLoaded:function(){var e=this.mesh=this.el.getObject3D(\"mesh\").children[0],t=this.skinnedMesh=e.getObjectByProperty(\"type\",\"SkinnedMesh\");this.skinnedMesh&&(this.bones=t.skeleton.bones,this.el.removeObject3D(\"mesh\"),e.position.set(0,1.5,0),e.rotation.set(0,0,0),t.frustumCulled=!1,t.material=new THREE.MeshStandardMaterial({skinning:!0,color:this.data.modelColor}),this.el.setObject3D(\"mesh\",e))}})},4228:(e,t,n)=>{var i=n(3515).registerComponent;e.exports.Component=i(\"hide-on-enter-ar\",{init:function(){var e=this;this.el.sceneEl.addEventListener(\"enter-vr\",(function(){e.el.sceneEl.is(\"ar-mode\")&&(e.el.object3D.visible=!1)})),this.el.sceneEl.addEventListener(\"exit-vr\",(function(){e.el.object3D.visible=!0}))}})},9359:(e,t,n)=>{var i=n(7629),r=n(3515).registerComponent,s=n(2666),o=n(6600),a=o.checkControllerPresentAndSetup,l=o.emitIfAxesChanged,c=o.onButtonEvent,h=\"hp-mixed-reality\",u={x:0,y:0,z:.06},d={_x:Math.PI/4,_y:0,_z:0,_order:\"XYZ\"};e.exports.Component=r(\"hp-mixed-reality-controls\",{schema:{hand:{default:\"none\"},model:{default:!0},orientationOffset:{type:\"vec3\"}},mapping:{left:{axes:{touchpad:[2,3]},buttons:[\"trigger\",\"grip\",\"none\",\"thumbstick\",\"xbutton\",\"ybutton\"]},right:{axes:{touchpad:[2,3]},buttons:[\"trigger\",\"grip\",\"none\",\"thumbstick\",\"abutton\",\"bbutton\"]}},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,\"down\",e,e.data.hand)},this.onButtonUp=function(t){c(t.detail.id,\"up\",e,e.data.hand)},this.onButtonTouchEnd=function(t){c(t.detail.id,\"touchend\",e,e.data.hand)},this.onButtonTouchStart=function(t){c(t.detail.id,\"touchstart\",e,e.data.hand)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex=\"right\"===e.hand?0:\"left\"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"axismove\",this.onAxisMoved),e.addEventListener(\"model-loaded\",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"axismove\",this.onAxisMoved),e.removeEventListener(\"model-loaded\",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;a(this,h,{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{idPrefix:h,hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute(\"gltf-model\",\"https://cdn.aframe.io/controllers/hp/mixed-reality/\"+this.data.hand+\".glb\")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping[this.data.hand].buttons[e.detail.id];n&&(\"trigger\"===n&&(t=e.detail.state.value,console.log(\"analog value of trigger press: \"+t)),this.el.emit(n+\"changed\",e.detail.state))},onModelLoaded:function(e){var t=e.detail.model;this.data.model&&(t.position.copy(u),t.rotation.copy(d),this.el.emit(\"controllermodelready\",{name:\"hp-mixed-reality-controls\",model:this.data.model,rayOrigin:new s.Vector3(0,0,0)}))},onAxisMoved:function(e){l(this,this.mapping.axes,e)}})},8686:(e,t,n)=>{n(4649),n(9541),n(57),n(9830),n(9531),n(2503),n(9577),n(3647),n(6655),n(2346),n(4228),n(9359),n(1714),n(7152),n(4893),n(9234),n(109),n(7479),n(240),n(9115),n(4269),n(9536),n(5569),n(4854),n(7454),n(4914),n(3689),n(1684),n(5538),n(6957),n(2761),n(1125),n(8666),n(8057),n(3798),n(8367),n(9507),n(6296),n(7872),n(3431),n(2819),n(1135),n(4046),n(1277),n(3969),n(3638),n(7445),n(4310),n(5670),n(467),n(5834),n(2772)},7152:(e,t,n)=>{var i=n(3515).registerComponent,r=n(8903);i(\"laser-controls\",{schema:{hand:{default:\"right\"},model:{default:!0},defaultModelColor:{type:\"color\",default:\"grey\"}},init:function(){var e=this.config,t=this.data,n=this.el,i=this,s={hand:t.hand,model:t.model};function o(t){var s=e[t.detail.name];if(s){var o=r.extend({showLine:!0},s.raycaster||{});t.detail.rayOrigin&&(o.origin=t.detail.rayOrigin.origin,o.direction=t.detail.rayOrigin.direction,o.showLine=!0),t.detail.rayOrigin||!i.modelReady?n.setAttribute(\"raycaster\",o):n.setAttribute(\"raycaster\",\"showLine\",!0),n.setAttribute(\"cursor\",r.extend({fuse:!1},s.cursor))}}n.setAttribute(\"daydream-controls\",s),n.setAttribute(\"gearvr-controls\",s),n.setAttribute(\"hp-mixed-reality-controls\",s),n.setAttribute(\"magicleap-controls\",s),n.setAttribute(\"oculus-go-controls\",s),n.setAttribute(\"oculus-touch-controls\",s),n.setAttribute(\"valve-index-controls\",s),n.setAttribute(\"vive-controls\",s),n.setAttribute(\"vive-focus-controls\",s),n.setAttribute(\"windows-motion-controls\",s),n.setAttribute(\"generic-tracked-controller-controls\",{hand:s.hand}),n.addEventListener(\"controllerconnected\",o),n.addEventListener(\"controllerdisconnected\",(function(){n.setAttribute(\"raycaster\",\"showLine\",!1)})),n.addEventListener(\"controllermodelready\",(function(e){o(e),i.modelReady=!0}))},config:{\"daydream-controls\":{cursor:{downEvents:[\"trackpaddown\",\"triggerdown\"],upEvents:[\"trackpadup\",\"triggerup\"]}},\"gearvr-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]},raycaster:{origin:{x:0,y:.001,z:0}}},\"generic-tracked-controller-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]}},\"hp-mixed-reality-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]},raycaster:{origin:{x:0,y:0,z:0}}},\"magicleap-controls\":{cursor:{downEvents:[\"trackpaddown\",\"triggerdown\"],upEvents:[\"trackpadup\",\"triggerup\"]}},\"oculus-go-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]},raycaster:{origin:{x:0,y:5e-4,z:0}}},\"oculus-touch-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]},raycaster:{origin:{x:0,y:0,z:0}}},\"valve-index-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]}},\"vive-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]}},\"vive-focus-controls\":{cursor:{downEvents:[\"trackpaddown\",\"triggerdown\"],upEvents:[\"trackpadup\",\"triggerup\"]}},\"windows-motion-controls\":{cursor:{downEvents:[\"triggerdown\"],upEvents:[\"triggerup\"]},raycaster:{showLine:!1}}}})},1714:(e,t,n)=>{var i=n(3515).registerComponent,r=n(8903).debug(\"components:layer:warn\");e.exports.Component=i(\"layer\",{schema:{type:{default:\"quad\",oneOf:[\"quad\",\"monocubemap\",\"stereocubemap\"]},src:{type:\"map\"},rotateCubemap:{default:!1},width:{default:0},height:{default:0}},init:function(){var e=this.el.sceneEl.renderer.getContext();this.quaternion=new THREE.Quaternion,this.position=new THREE.Vector3,this.bindMethods(),this.needsRedraw=!1,this.frameBuffer=e.createFramebuffer();var t=this.el.sceneEl.getAttribute(\"webxr\").requiredFeatures;t.push(\"layers\"),this.el.sceneEl.getAttribute(\"webxr\",\"requiredFeatures\",t),this.el.sceneEl.addEventListener(\"enter-vr\",this.onEnterVR),this.el.sceneEl.addEventListener(\"exit-vr\",this.onExitVR)},bindMethods:function(){this.onRequestedReferenceSpace=this.onRequestedReferenceSpace.bind(this),this.onEnterVR=this.onEnterVR.bind(this),this.onExitVR=this.onExitVR.bind(this)},update:function(e){this.data.src!==e.src&&this.updateSrc()},updateSrc:function(){var e=this.data.type;this.texture=void 0,\"quad\"!==e?\"monocubemap\"!==e&&\"stereocubemap\"!==e||this.loadCubeMapImages():this.loadQuadImage()},loadCubeMapImages:function(){var e,t=this.xrGLFactory,n=this.el.sceneEl.frame,i=this.data.src,r=this.data.type;this.visibilityChanged=!1,this.layer&&(\"monocubemap\"!==r&&\"stereocubemap\"!==r||(i.complete?this.pendingCubeMapUpdate=!1:this.pendingCubeMapUpdate=!0,this.loadingScreen?this.loadingScreen=!1:this.loadingScreen=!0,\"monocubemap\"===r?(e=t.getSubImage(this.layer,n),this.loadCubeMapImage(e.colorTexture,i,0)):(e=t.getSubImage(this.layer,n,\"left\"),this.loadCubeMapImage(e.colorTexture,i,0),e=t.getSubImage(this.layer,n,\"right\"),this.loadCubeMapImage(e.colorTexture,i,6))))},loadQuadImage:function(){var e=this.data.src,t=this;this.el.sceneEl.systems.material.loadTexture(e,{src:e},(function(n){t.el.sceneEl.renderer.initTexture(n),t.texture=n,\"VIDEO\"===e.tagName&&setTimeout((function(){t.textureIsVideo=!0}),1e3),t.layer&&(t.layer.height=t.data.height/2||t.texture.image.height/1e3,t.layer.width=t.data.width/2||t.texture.image.width/1e3,t.needsRedraw=!0),t.updateQuadPanel()}))},preGenerateCubeMapTextures:function(e,t){\"monocubemap\"===this.data.type?this.generateCubeMapTextures(e,0,t):(this.generateCubeMapTextures(e,0,t),this.generateCubeMapTextures(e,6,t))},generateCubeMapTextures:function(e,t,n){for(var i,r,s=this.data,o=this.cubeFaceSize,a=Math.min(e.width,e.height),l=[],c=0;c\u003C6;c++){var h=document.createElement(\"CANVAS\");h.width=h.height=o;var u=h.getContext(\"2d\");s.rotateCubemap&&(2!==c&&3!==c||(u.save(),u.translate(o,o),u.rotate(Math.PI))),u.drawImage(e,(c+t)*a,0,a,a,0,0,o,o),u.restore(),n&&n(),l.push(h)}return s.rotateCubemap&&(i=l[0],r=l[1],l[0]=r,l[1]=i,i=l[4],r=l[5],l[4]=r,l[5]=i),n&&n(),l},loadCubeMapImage:function(e,t,n){var i,r=this.el.sceneEl.renderer.getContext();r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.bindTexture(r.TEXTURE_CUBE_MAP,e),i=!t.complete||this.loadingScreen?this.loadingScreenImages:this.generateCubeMapTextures(t,n);var s=0;i.forEach((function(e,t){r.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,r.RGBA,r.UNSIGNED_BYTE,e),s=r.getError()})),0!==s&&console.log(\"renderingError, WebGL Error Code: \"+s),r.bindTexture(r.TEXTURE_CUBE_MAP,null)},tick:function(){this.el.sceneEl.xrSession&&(!this.layer&&this.el.sceneEl.is(\"vr-mode\")&&this.initLayer(),this.updateTransform(),this.data.src.complete&&(this.pendingCubeMapUpdate||this.loadingScreen||this.visibilityChanged)&&this.loadCubeMapImages(),(this.needsRedraw||this.layer.needsRedraw||this.textureIsVideo)&&(\"quad\"===this.data.type&&this.draw(),this.needsRedraw=!1))},initLayer:function(){var e=this,t=this.data.type;this.el.sceneEl.xrSession.onvisibilitychange=function(t){e.visibilityChanged=\"hidden\"!==t.session.visibilityState},\"quad\"!==t?\"monocubemap\"!==t&&\"stereocubemap\"!==t||this.initCubeMapLayer():this.initQuadLayer()},initQuadLayer:function(){var e=this.el.sceneEl,t=e.renderer.getContext(),n=this.xrGLFactory=new XRWebGLBinding(e.xrSession,t);this.texture&&(this.layer=n.createQuadLayer({space:this.referenceSpace,viewPixelHeight:2048,viewPixelWidth:2048,height:this.data.height/2||this.texture.image.height/1e3,width:this.data.width/2||this.texture.image.width/1e3}),this.initLoadingScreenImages(),e.renderer.xr.addLayer(this.layer))},initCubeMapLayer:function(){var e=this.data.src,t=this.el.sceneEl,n=t.renderer.getContext(),i=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),r=this.cubeFaceSize=Math.min(i,Math.min(e.width,e.height)),s=this.xrGLFactory=new XRWebGLBinding(t.xrSession,n);this.layer=s.createCubeLayer({space:this.referenceSpace,viewPixelWidth:r,viewPixelHeight:r,layout:\"monocubemap\"===this.data.type?\"mono\":\"stereo\",isStatic:!1}),this.initLoadingScreenImages(),this.loadCubeMapImages(),t.renderer.xr.addLayer(this.layer)},initLoadingScreenImages:function(){for(var e=this.cubeFaceSize,t=this.loadingScreenImages=[],n=0;n\u003C6;n++){var i=document.createElement(\"CANVAS\");i.width=i.height=e;var r=i.getContext(\"2d\");i.width=i.height=e,r.fillStyle=\"black\",r.fillRect(0,0,e,e),2!==n&&3!==n&&(r.translate(e,0),r.scale(-1,1),r.fillStyle=\"white\",r.font=\"30px Arial\",r.fillText(\"Loading\",e/2,e/2)),t.push(i)}},destroyLayer:function(){this.layer&&(this.el.sceneEl.renderer.xr.removeLayer(this.layer),this.layer.destroy(),this.layer=void 0)},toggleCompositorLayer:function(){this.enableCompositorLayer(!this.layerEnabled)},enableCompositorLayer:function(e){this.layerEnabled=e,this.quadPanelEl.object3D.visible=!this.layerEnabled},updateQuadPanel:function(){var e=this.quadPanelEl;this.quadPanelEl||(e=this.quadPanelEl=document.createElement(\"a-entity\"),this.el.appendChild(e)),e.setAttribute(\"material\",{shader:\"flat\",src:this.data.src,transparent:!0}),e.setAttribute(\"geometry\",{primitive:\"plane\",height:this.data.height||this.texture.image.height/1e3,width:this.data.width||this.texture.image.height/1e3})},draw:function(){var e=this.el.sceneEl,t=this.el.sceneEl.renderer.getContext(),n=this.xrGLFactory.getSubImage(this.layer,e.frame),i=e.renderer.properties.get(this.texture).__webglTexture,r=t.getParameter(t.FRAMEBUFFER_BINDING);t.viewport(n.viewport.x,n.viewport.y,n.viewport.width,n.viewport.height),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n.colorTexture,0),function(e,t,n,i){var r=e.createFramebuffer();let s=n.viewport.x,o=n.viewport.y,a=n.viewport.x+n.viewport.width,l=n.viewport.y+n.viewport.height;\"VIDEO\"===i.tagName&&(e.bindTexture(e.TEXTURE_2D,t),e.texSubImage2D(e.TEXTURE_2D,0,0,0,i.width,i.height,e.RGB,e.UNSIGNED_BYTE,i)),e.bindFramebuffer(e.READ_FRAMEBUFFER,r),e.framebufferTexture2D(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),e.readBuffer(e.COLOR_ATTACHMENT0),e.blitFramebuffer(0,0,i.width,i.height,s,o,a,l,e.COLOR_BUFFER_BIT,e.NEAREST),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.deleteFramebuffer(r)}(t,i,n,this.data.src),t.bindFramebuffer(t.FRAMEBUFFER,r)},updateTransform:function(){var e=this.el,t=this.position,n=this.quaternion;e.object3D.updateMatrixWorld(),t.setFromMatrixPosition(e.object3D.matrixWorld),n.setFromRotationMatrix(e.object3D.matrixWorld),this.layerEnabled||t.set(0,0,1e8),this.layer.transform=new XRRigidTransform(t,n)},onEnterVR:function(){var e=this.el.sceneEl,t=e.xrSession;e.hasWebXR&&XRWebGLBinding&&t?(t.requestReferenceSpace(\"local-floor\").then(this.onRequestedReferenceSpace),this.needsRedraw=!0,this.layerEnabled=!0,this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!1),this.data.src.play&&this.data.src.play()):r(\"The layer component requires WebXR and the layers API enabled\")},onExitVR:function(){this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!0),this.destroyLayer()},onRequestedReferenceSpace:function(e){this.referenceSpace=e}})},4893:(e,t,n)=>{var i,r,s,o,a,l,c=n(7629),h=n(8903),u=h.diff,d=n(4219),p=n(3515).registerComponent,A=n(2666),f=n(3437),m=A.MathUtils.degToRad,g=d(\"components:light:warn\"),v=new A.CubeTextureLoader,y={};e.exports.Component=p(\"light\",{schema:{angle:{default:60,if:{type:[\"spot\"]}},color:{type:\"color\",if:{type:[\"ambient\",\"directional\",\"hemisphere\",\"point\",\"spot\"]}},envMap:{default:\"\",if:{type:[\"probe\"]}},groundColor:{type:\"color\",if:{type:[\"hemisphere\"]}},decay:{default:1,if:{type:[\"point\",\"spot\"]}},distance:{default:0,min:0,if:{type:[\"point\",\"spot\"]}},intensity:{default:1,min:0,if:{type:[\"ambient\",\"directional\",\"hemisphere\",\"point\",\"spot\",\"probe\"]}},penumbra:{default:0,min:0,max:1,if:{type:[\"spot\"]}},type:{default:\"directional\",oneOf:[\"ambient\",\"directional\",\"hemisphere\",\"point\",\"spot\",\"probe\"],schemaChange:!0},target:{type:\"selector\",if:{type:[\"spot\",\"directional\"]}},castShadow:{default:!1,if:{type:[\"point\",\"spot\",\"directional\"]}},shadowBias:{default:0,if:{castShadow:!0}},shadowCameraFar:{default:500,if:{castShadow:!0}},shadowCameraFov:{default:90,if:{castShadow:!0}},shadowCameraNear:{default:.5,if:{castShadow:!0}},shadowCameraTop:{default:5,if:{castShadow:!0}},shadowCameraRight:{default:5,if:{castShadow:!0}},shadowCameraBottom:{default:-5,if:{castShadow:!0}},shadowCameraLeft:{default:-5,if:{castShadow:!0}},shadowCameraVisible:{default:!1,if:{castShadow:!0}},shadowCameraAutomatic:{default:\"\",if:{type:[\"directional\"]}},shadowMapHeight:{default:512,if:{castShadow:!0}},shadowMapWidth:{default:512,if:{castShadow:!0}},shadowRadius:{default:1,if:{castShadow:!0}}},init:function(){var e=this.el;this.light=null,this.defaultTarget=null,this.rendererSystem=this.el.sceneEl.systems.renderer,this.system.registerLight(e)},update:function(e){var t=this.data,n=u(t,e),i=this.light,r=this.rendererSystem,s=this;if(!i||\"type\"in n)this.setLight(this.data),this.updateShadow();else{var o=!1;Object.keys(n).forEach((function(e){var n=t[e];switch(e){case\"color\":i.color.set(n),r.applyColorCorrection(i.color);break;case\"groundColor\":i.groundColor.set(n),r.applyColorCorrection(i.groundColor);break;case\"angle\":i.angle=m(n);break;case\"target\":null===n?\"spot\"!==t.type&&\"directional\"!==t.type||(i.target=s.defaultTarget):n.hasLoaded?s.onSetTarget(n,i):n.addEventListener(\"loaded\",c(s.onSetTarget,s,n,i));break;case\"envMap\":s.updateProbeMap(t,i);break;case\"castShadow\":case\"shadowBias\":case\"shadowCameraFar\":case\"shadowCameraFov\":case\"shadowCameraNear\":case\"shadowCameraTop\":case\"shadowCameraRight\":case\"shadowCameraBottom\":case\"shadowCameraLeft\":case\"shadowCameraVisible\":case\"shadowMapHeight\":case\"shadowMapWidth\":case\"shadowRadius\":o||(s.updateShadow(),o=!0);break;case\"shadowCameraAutomatic\":t.shadowCameraAutomatic?s.shadowCameraAutomaticEls=Array.from(document.querySelectorAll(t.shadowCameraAutomatic)):s.shadowCameraAutomaticEls=[];break;default:i[e]=n}}))}},tick:(i=new A.Box3,r=new A.Vector3,s=new A.Vector3,o=new A.Matrix4,a=new A.Sphere,l=new A.Vector3,function(){if(\"directional\"===this.data.type&&this.light.shadow&&this.light.shadow.camera instanceof A.OrthographicCamera&&this.shadowCameraAutomaticEls.length){var e=this.light.shadow.camera;e.getWorldDirection(r),e.getWorldPosition(s),o.copy(e.matrixWorld),o.invert(),e.near=1,e.left=1e5,e.right=-1e5,e.top=-1e5,e.bottom=1e5,this.shadowCameraAutomaticEls.forEach((function(t){i.setFromObject(t.object3D),i.getBoundingSphere(a);var n=f.distanceOfPointFromPlane(s,r,a.center),c=f.nearestPointInPlane(s,r,a.center,l).applyMatrix4(o);e.near=Math.min(-n-a.radius-1,e.near),e.left=Math.min(-a.radius+c.x,e.left),e.right=Math.max(a.radius+c.x,e.right),e.top=Math.max(a.radius+c.y,e.top),e.bottom=Math.min(-a.radius+c.y,e.bottom)})),e.updateProjectionMatrix()}}),setLight:function(e){var t=this.el,n=this.getLight(e);n&&(this.light&&t.removeObject3D(\"light\"),this.light=n,this.light.el=t,t.setObject3D(\"light\",this.light),\"spot\"!==e.type&&\"directional\"!==e.type&&\"hemisphere\"!==e.type||t.getObject3D(\"light\").translateY(-1),\"spot\"===e.type&&(t.setObject3D(\"light-target\",this.defaultTarget),t.getObject3D(\"light-target\").position.set(0,0,-1)),e.shadowCameraAutomatic?this.shadowCameraAutomaticEls=Array.from(document.querySelectorAll(e.shadowCameraAutomatic)):this.shadowCameraAutomaticEls=[])},updateShadow:function(){var e=this.el,t=this.data,n=this.light;n.castShadow=t.castShadow;var i=e.getObject3D(\"cameraHelper\");if(t.shadowCameraVisible&&!i?e.setObject3D(\"cameraHelper\",new A.CameraHelper(n.shadow.camera)):!t.shadowCameraVisible&&i&&e.removeObject3D(\"cameraHelper\"),!t.castShadow)return n;n.shadow.bias=t.shadowBias,n.shadow.radius=t.shadowRadius,n.shadow.mapSize.height=t.shadowMapHeight,n.shadow.mapSize.width=t.shadowMapWidth,n.shadow.camera.near=t.shadowCameraNear,n.shadow.camera.far=t.shadowCameraFar,n.shadow.camera instanceof A.OrthographicCamera?(n.shadow.camera.top=t.shadowCameraTop,n.shadow.camera.right=t.shadowCameraRight,n.shadow.camera.bottom=t.shadowCameraBottom,n.shadow.camera.left=t.shadowCameraLeft):n.shadow.camera.fov=t.shadowCameraFov,n.shadow.camera.updateProjectionMatrix(),i&&i.update()},getLight:function(e){var t=e.angle,n=new A.Color(e.color);this.rendererSystem.applyColorCorrection(n),n=n.getHex();var i=e.decay,r=e.distance,s=new A.Color(e.groundColor);this.rendererSystem.applyColorCorrection(s),s=s.getHex();var o=e.intensity,a=e.type,l=e.target,h=null;switch(a.toLowerCase()){case\"ambient\":return new A.AmbientLight(n,o);case\"directional\":return h=new A.DirectionalLight(n,o),this.defaultTarget=h.target,l&&(l.hasLoaded?this.onSetTarget(l,h):l.addEventListener(\"loaded\",c(this.onSetTarget,this,l,h))),h;case\"hemisphere\":return new A.HemisphereLight(n,s,o);case\"point\":return new A.PointLight(n,o,r,i);case\"spot\":return h=new A.SpotLight(n,o,r,m(t),e.penumbra,i),this.defaultTarget=h.target,l&&(l.hasLoaded?this.onSetTarget(l,h):l.addEventListener(\"loaded\",c(this.onSetTarget,this,l,h))),h;case\"probe\":return h=new A.LightProbe,this.updateProbeMap(e,h),h;default:g(\"%s is not a valid light type. Choose from ambient, directional, hemisphere, point, spot.\",a)}},updateProbeMap:function(e,t){e.envMap||t.copy(new A.LightProbe),y[e.envMap]instanceof window.Promise&&y[e.envMap].then((function(e){t.copy(e)})),y[e.envMap]instanceof A.LightProbe&&t.copy(y[e.envMap]),y[e.envMap]=new window.Promise((function(n){h.srcLoader.validateCubemapSrc(e.envMap,(function(n){v.load(n,(function(n){var i=A.LightProbeGenerator.fromCubeTexture(n);y[e.envMap]=i,t.copy(i)}))}))}))},onSetTarget:function(e,t){t.target=e.object3D},remove:function(){var e=this.el;e.removeObject3D(\"light\"),e.getObject3D(\"cameraHelper\")&&e.removeObject3D(\"cameraHelper\")}})},9234:(e,t,n)=>{var i=n(3515).registerComponent;function r(e,t){return!(!e||!t)&&e.x===t.x&&e.y===t.y&&e.z===t.z}e.exports.Component=i(\"line\",{schema:{start:{type:\"vec3\",default:{x:0,y:0,z:0}},end:{type:\"vec3\",default:{x:0,y:0,z:0}},color:{type:\"color\",default:\"#74BEC1\"},opacity:{type:\"number\",default:1},visible:{default:!0}},multiple:!0,init:function(){var e,t,n=this.data;this.rendererSystem=this.el.sceneEl.systems.renderer,t=this.material=new THREE.LineBasicMaterial({color:n.color,opacity:n.opacity,transparent:n.opacity\u003C1,visible:n.visible}),(e=this.geometry=new THREE.BufferGeometry).setAttribute(\"position\",new THREE.BufferAttribute(new Float32Array(6),3)),this.rendererSystem.applyColorCorrection(t.color),this.line=new THREE.Line(e,t),this.el.setObject3D(this.attrName,this.line)},update:function(e){var t=this.data,n=this.geometry,i=!1,s=this.material,o=n.attributes.position.array;r(t.start,e.start)||(o[0]=t.start.x,o[1]=t.start.y,o[2]=t.start.z,i=!0),r(t.end,e.end)||(o[3]=t.end.x,o[4]=t.end.y,o[5]=t.end.z,i=!0),i&&(n.attributes.position.needsUpdate=!0,n.computeBoundingSphere()),s.color.setStyle(t.color),this.rendererSystem.applyColorCorrection(s.color),s.opacity=t.opacity,s.transparent=t.opacity\u003C1,s.visible=t.visible},remove:function(){this.el.removeObject3D(this.attrName,this.line)}})},109:(e,t,n)=>{var i,r,s,o,a,l,c,h,u=n(3515).registerComponent,d=n(9644).registerShader,p=n(2666);e.exports.Component=u(\"link\",{schema:{backgroundColor:{default:\"red\",type:\"color\"},borderColor:{default:\"white\",type:\"color\"},highlighted:{default:!1},highlightedColor:{default:\"#24CAFF\",type:\"color\"},href:{default:\"\"},image:{type:\"asset\"},on:{default:\"click\"},peekMode:{default:!1},title:{default:\"\"},titleColor:{default:\"white\",type:\"color\"},visualAspectEnabled:{default:!1}},init:function(){this.navigate=this.navigate.bind(this),this.previousQuaternion=void 0,this.quaternionClone=new p.Quaternion,this.hiddenEls=[]},update:function(e){var t,n,i=this.data,r=this.el;i.visualAspectEnabled&&(this.initVisualAspect(),t=i.highlighted?i.highlightedColor:i.backgroundColor,n=i.highlighted?i.highlightedColor:i.borderColor,r.setAttribute(\"material\",\"backgroundColor\",t),r.setAttribute(\"material\",\"strokeColor\",n),i.on!==e.on&&this.updateEventListener(),void 0!==e.peekMode&&i.peekMode!==e.peekMode&&this.updatePeekMode(),i.image&&e.image!==i.image&&r.setAttribute(\"material\",\"pano\",\"string\"==typeof i.image?i.image:i.image.src))},updatePeekMode:function(){var e=this.el,t=this.sphereEl;this.data.peekMode?(this.hideAll(),e.getObject3D(\"mesh\").visible=!1,t.setAttribute(\"visible\",!0)):(this.showAll(),e.getObject3D(\"mesh\").visible=!0,t.setAttribute(\"visible\",!1))},play:function(){this.updateEventListener()},pause:function(){this.removeEventListener()},updateEventListener:function(){var e=this.el;e.isPlaying&&(this.removeEventListener(),e.addEventListener(this.data.on,this.navigate))},removeEventListener:function(){var e=this.data.on;e&&this.el.removeEventListener(e,this.navigate)},initVisualAspect:function(){var e,t,n,i=this.el;this.data.visualAspectEnabled&&!this.visualAspectInitialized&&(n=this.textEl=this.textEl||document.createElement(\"a-entity\"),t=this.sphereEl=this.sphereEl||document.createElement(\"a-entity\"),e=this.semiSphereEl=this.semiSphereEl||document.createElement(\"a-entity\"),i.setAttribute(\"geometry\",{primitive:\"circle\",radius:1,segments:64}),i.setAttribute(\"material\",{shader:\"portal\",pano:this.data.image,side:\"double\"}),n.setAttribute(\"text\",{color:this.data.titleColor,align:\"center\",font:\"kelsonsans\",value:this.data.title||this.data.href,width:4}),n.setAttribute(\"position\",\"0 1.5 0\"),i.appendChild(n),e.setAttribute(\"geometry\",{primitive:\"sphere\",radius:1,phiStart:0,segmentsWidth:64,segmentsHeight:64,phiLength:180,thetaStart:0,thetaLength:360}),e.setAttribute(\"material\",{shader:\"portal\",borderEnabled:0,pano:this.data.image,side:\"back\"}),e.setAttribute(\"rotation\",\"0 180 0\"),e.setAttribute(\"position\",\"0 0 0\"),e.setAttribute(\"visible\",!1),i.appendChild(e),t.setAttribute(\"geometry\",{primitive:\"sphere\",radius:10,segmentsWidth:64,segmentsHeight:64}),t.setAttribute(\"material\",{shader:\"portal\",borderEnabled:0,pano:this.data.image,side:\"back\"}),t.setAttribute(\"visible\",!1),i.appendChild(t),this.visualAspectInitialized=!0)},navigate:function(){window.location=this.data.href},tick:(a=new p.Vector3,l=new p.Vector3,c=new p.Quaternion,h=new p.Vector3,function(){var e,t,n=this.el,i=n.object3D,r=n.sceneEl.camera,s=this.textEl;if(this.data.visualAspectEnabled)if(i.updateMatrixWorld(),r.parent.updateMatrixWorld(),r.updateMatrixWorld(),i.matrix.decompose(l,c,h),l.setFromMatrixPosition(i.matrixWorld),a.setFromMatrixPosition(r.matrixWorld),(t=l.distanceTo(a))>20)this.previousQuaternion||(this.quaternionClone.copy(c),this.previousQuaternion=this.quaternionClone),i.lookAt(a);else{if(e=this.calculateCameraPortalOrientation(),t\u003C.5){if(!0===this.semiSphereEl.getAttribute(\"visible\"))return;s.setAttribute(\"text\",\"width\",1.5),e\u003C=0?(s.setAttribute(\"position\",\"0 0 0.75\"),s.setAttribute(\"rotation\",\"0 180 0\"),this.semiSphereEl.setAttribute(\"rotation\",\"0 0 0\")):(s.setAttribute(\"position\",\"0 0 -0.75\"),s.setAttribute(\"rotation\",\"0 0 0\"),this.semiSphereEl.setAttribute(\"rotation\",\"0 180 0\")),n.getObject3D(\"mesh\").visible=!1,this.semiSphereEl.setAttribute(\"visible\",!0),this.peekCameraPortalOrientation=e}else e\u003C=0?s.setAttribute(\"rotation\",\"0 180 0\"):s.setAttribute(\"rotation\",\"0 0 0\"),s.setAttribute(\"text\",\"width\",5),s.setAttribute(\"position\",\"0 1.5 0\"),n.getObject3D(\"mesh\").visible=!0,this.semiSphereEl.setAttribute(\"visible\",!1),this.peekCameraPortalOrientation=void 0;this.previousQuaternion&&(i.quaternion.copy(this.previousQuaternion),this.previousQuaternion=void 0)}}),hideAll:function(){var e=this.el,t=this.hiddenEls,n=this;t.length>0||e.sceneEl.object3D.traverse((function(i){i&&i.el&&i.el.hasAttribute(\"link-controls\")||i.el&&i!==e.sceneEl.object3D&&i.el!==e&&i.el!==n.sphereEl&&i.el!==e.sceneEl.cameraEl&&!1!==i.el.getAttribute(\"visible\")&&i.el!==n.textEl&&i.el!==n.semiSphereEl&&(i.el.setAttribute(\"visible\",!1),t.push(i.el))}))},showAll:function(){this.hiddenEls.forEach((function(e){e.setAttribute(\"visible\",!0)})),this.hiddenEls=[]},calculateCameraPortalOrientation:(i=new p.Matrix4,r=new p.Vector3,s=new p.Vector3(0,0,1),o=new p.Vector3(0,0,0),function(){var e=this.el,t=e.sceneEl.camera;return r.set(0,0,0),s.set(0,0,1),o.set(0,0,0),e.object3D.matrixWorld.extractRotation(i),s.applyMatrix4(i),e.object3D.updateMatrixWorld(),e.object3D.localToWorld(o),t.parent.parent.updateMatrixWorld(),t.parent.updateMatrixWorld(),t.updateMatrixWorld(),t.localToWorld(r),r.sub(o).normalize(),s.normalize(),Math.sign(s.dot(r))}),remove:function(){this.removeEventListener()}}),d(\"portal\",{schema:{borderEnabled:{default:1,type:\"int\",is:\"uniform\"},backgroundColor:{default:\"red\",type:\"color\",is:\"uniform\"},pano:{type:\"map\",is:\"uniform\"},strokeColor:{default:\"white\",type:\"color\",is:\"uniform\"}},vertexShader:[\"vec3 portalPosition;\",\"varying vec3 vWorldPosition;\",\"varying float vDistanceToCenter;\",\"varying float vDistance;\",\"void main() {\",\"vDistanceToCenter = clamp(length(position - vec3(0.0, 0.0, 0.0)), 0.0, 1.0);\",\"portalPosition = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;\",\"vDistance = length(portalPosition - cameraPosition);\",\"vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\",\"gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\",\"}\"].join(\"\\n\"),fragmentShader:[\"#define RECIPROCAL_PI2 0.15915494\",\"uniform sampler2D pano;\",\"uniform vec3 strokeColor;\",\"uniform vec3 backgroundColor;\",\"uniform float borderEnabled;\",\"varying float vDistanceToCenter;\",\"varying float vDistance;\",\"varying vec3 vWorldPosition;\",\"void main() {\",\"vec3 direction = normalize(vWorldPosition - cameraPosition);\",\"vec2 sampleUV;\",\"float borderThickness = clamp(exp(-vDistance / 50.0), 0.6, 0.95);\",\"sampleUV.y = clamp(direction.y * 0.5 + 0.5, 0.0, 1.0);\",\"sampleUV.x = atan(direction.z, -direction.x) * -RECIPROCAL_PI2 + 0.5;\",\"if (vDistanceToCenter > borderThickness && borderEnabled == 1.0) {\",\"gl_FragColor = vec4(strokeColor, 1.0);\",\"} else {\",\"gl_FragColor = mix(texture2D(pano, sampleUV), vec4(backgroundColor, 1.0), clamp(pow((vDistance / 15.0), 2.0), 0.0, 1.0));\",\"}\",\"}\"].join(\"\\n\")})},7479:(e,t,n)=>{var i=n(3515).registerComponent,r=n(2666),s=n(8903),o=s.bind,a=Math.PI/2;e.exports.Component=i(\"look-controls\",{dependencies:[\"position\",\"rotation\"],schema:{enabled:{default:!0},magicWindowTrackingEnabled:{default:!0},pointerLockEnabled:{default:!1},reverseMouseDrag:{default:!1},reverseTouchDrag:{default:!1},touchEnabled:{default:!0},mouseEnabled:{default:!0}},init:function(){this.deltaYaw=0,this.previousHMDPosition=new r.Vector3,this.hmdQuaternion=new r.Quaternion,this.magicWindowAbsoluteEuler=new r.Euler,this.magicWindowDeltaEuler=new r.Euler,this.position=new r.Vector3,this.magicWindowObject=new r.Object3D,this.rotation={},this.deltaRotation={},this.savedPose=null,this.pointerLocked=!1,this.setupMouseControls(),this.bindMethods(),this.previousMouseEvent={},this.setupMagicWindowControls(),this.savedPose={position:new r.Vector3,rotation:new r.Euler},(this.el.sceneEl.is(\"vr-mode\")||this.el.sceneEl.is(\"ar-mode\"))&&this.onEnterVR()},setupMagicWindowControls:function(){var e,t=this.data;(s.device.isMobile()||s.device.isMobileDeviceRequestingDesktopSite())&&(e=this.magicWindowControls=new r.DeviceOrientationControls(this.magicWindowObject),\"undefined\"!=typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission&&(e.enabled=!1,this.el.sceneEl.components[\"device-orientation-permission-ui\"].permissionGranted?e.enabled=t.magicWindowTrackingEnabled:this.el.sceneEl.addEventListener(\"deviceorientationpermissiongranted\",(function(){e.enabled=t.magicWindowTrackingEnabled}))))},update:function(e){var t=this.data;t.enabled!==e.enabled&&this.updateGrabCursor(t.enabled),e&&!t.magicWindowTrackingEnabled&&e.magicWindowTrackingEnabled&&(this.magicWindowAbsoluteEuler.set(0,0,0),this.magicWindowDeltaEuler.set(0,0,0)),this.magicWindowControls&&(this.magicWindowControls.enabled=t.magicWindowTrackingEnabled),e&&!t.pointerLockEnabled!==e.pointerLockEnabled&&(this.removeEventListeners(),this.addEventListeners(),this.pointerLocked&&this.exitPointerLock())},tick:function(e){this.data.enabled&&this.updateOrientation()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},remove:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},bindMethods:function(){this.onMouseDown=o(this.onMouseDown,this),this.onMouseMove=o(this.onMouseMove,this),this.onMouseUp=o(this.onMouseUp,this),this.onTouchStart=o(this.onTouchStart,this),this.onTouchMove=o(this.onTouchMove,this),this.onTouchEnd=o(this.onTouchEnd,this),this.onEnterVR=o(this.onEnterVR,this),this.onExitVR=o(this.onExitVR,this),this.onPointerLockChange=o(this.onPointerLockChange,this),this.onPointerLockError=o(this.onPointerLockError,this)},setupMouseControls:function(){this.mouseDown=!1,this.pitchObject=new r.Object3D,this.yawObject=new r.Object3D,this.yawObject.position.y=10,this.yawObject.add(this.pitchObject)},addEventListeners:function(){var e=this.el.sceneEl,t=e.canvas;t?(t.addEventListener(\"mousedown\",this.onMouseDown,!1),window.addEventListener(\"mousemove\",this.onMouseMove,!1),window.addEventListener(\"mouseup\",this.onMouseUp,!1),t.addEventListener(\"touchstart\",this.onTouchStart),window.addEventListener(\"touchmove\",this.onTouchMove),window.addEventListener(\"touchend\",this.onTouchEnd),e.addEventListener(\"enter-vr\",this.onEnterVR),e.addEventListener(\"exit-vr\",this.onExitVR),this.data.pointerLockEnabled&&(document.addEventListener(\"pointerlockchange\",this.onPointerLockChange,!1),document.addEventListener(\"mozpointerlockchange\",this.onPointerLockChange,!1),document.addEventListener(\"pointerlockerror\",this.onPointerLockError,!1))):e.addEventListener(\"render-target-loaded\",o(this.addEventListeners,this))},removeEventListeners:function(){var e=this.el.sceneEl,t=e&&e.canvas;t&&(t.removeEventListener(\"mousedown\",this.onMouseDown),window.removeEventListener(\"mousemove\",this.onMouseMove),window.removeEventListener(\"mouseup\",this.onMouseUp),t.removeEventListener(\"touchstart\",this.onTouchStart),window.removeEventListener(\"touchmove\",this.onTouchMove),window.removeEventListener(\"touchend\",this.onTouchEnd),e.removeEventListener(\"enter-vr\",this.onEnterVR),e.removeEventListener(\"exit-vr\",this.onExitVR),document.removeEventListener(\"pointerlockchange\",this.onPointerLockChange,!1),document.removeEventListener(\"mozpointerlockchange\",this.onPointerLockChange,!1),document.removeEventListener(\"pointerlockerror\",this.onPointerLockError,!1))},updateOrientation:function(){var e=this.el.object3D,t=this.pitchObject,n=this.yawObject,i=this.el.sceneEl;(i.is(\"vr-mode\")||i.is(\"ar-mode\"))&&i.checkHeadsetConnected()||(this.updateMagicWindowOrientation(),e.rotation.x=this.magicWindowDeltaEuler.x+t.rotation.x,e.rotation.y=this.magicWindowDeltaEuler.y+n.rotation.y,e.rotation.z=this.magicWindowDeltaEuler.z)},updateMagicWindowOrientation:function(){var e=this.magicWindowAbsoluteEuler,t=this.magicWindowDeltaEuler;this.magicWindowControls&&this.magicWindowControls.enabled&&(this.magicWindowControls.update(),e.setFromQuaternion(this.magicWindowObject.quaternion,\"YXZ\"),this.previousMagicWindowYaw||0===e.y||(this.previousMagicWindowYaw=e.y),this.previousMagicWindowYaw&&(t.x=e.x,t.y+=e.y-this.previousMagicWindowYaw,t.z=e.z,this.previousMagicWindowYaw=e.y))},onMouseMove:function(e){var t,n,i,r=this.pitchObject,s=this.previousMouseEvent,o=this.yawObject;this.data.enabled&&(this.mouseDown||this.pointerLocked)&&(this.pointerLocked?(n=e.movementX||e.mozMovementX||0,i=e.movementY||e.mozMovementY||0):(n=e.screenX-s.screenX,i=e.screenY-s.screenY),this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,t=this.data.reverseMouseDrag?1:-1,o.rotation.y+=.002*n*t,r.rotation.x+=.002*i*t,r.rotation.x=Math.max(-a,Math.min(a,r.rotation.x)))},onMouseDown:function(e){var t=this.el.sceneEl;if(this.data.enabled&&this.data.mouseEnabled&&(!t.is(\"vr-mode\")&&!t.is(\"ar-mode\")||!t.checkHeadsetConnected())&&0===e.button){var n=t&&t.canvas;this.mouseDown=!0,this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,this.showGrabbingCursor(),this.data.pointerLockEnabled&&!this.pointerLocked&&(n.requestPointerLock?n.requestPointerLock():n.mozRequestPointerLock&&n.mozRequestPointerLock())}},showGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor=\"grabbing\"},hideGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor=\"\"},onMouseUp:function(){this.mouseDown=!1,this.hideGrabbingCursor()},onTouchStart:function(e){1!==e.touches.length||!this.data.touchEnabled||this.el.sceneEl.is(\"vr-mode\")||this.el.sceneEl.is(\"ar-mode\")||(this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY},this.touchStarted=!0)},onTouchMove:function(e){var t,n,i=this.el.sceneEl.canvas,r=this.yawObject;this.touchStarted&&this.data.touchEnabled&&(n=2*Math.PI*(e.touches[0].pageX-this.touchStart.x)/i.clientWidth,t=this.data.reverseTouchDrag?1:-1,r.rotation.y-=.5*n*t,this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY})},onTouchEnd:function(){this.touchStarted=!1},onEnterVR:function(){var e=this.el.sceneEl;e.checkHeadsetConnected()&&(this.saveCameraPose(),this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),e.hasWebXR&&(this.el.object3D.matrixAutoUpdate=!1,this.el.object3D.updateMatrix()))},onExitVR:function(){this.el.sceneEl.checkHeadsetConnected()&&(this.restoreCameraPose(),this.previousHMDPosition.set(0,0,0),this.el.object3D.matrixAutoUpdate=!0)},onPointerLockChange:function(){this.pointerLocked=!(!document.pointerLockElement&&!document.mozPointerLockElement)},onPointerLockError:function(){this.pointerLocked=!1},exitPointerLock:function(){document.exitPointerLock(),this.pointerLocked=!1},updateGrabCursor:function(e){var t=this.el.sceneEl;function n(){t.canvas.classList.add(\"a-grab-cursor\")}function i(){t.canvas.classList.remove(\"a-grab-cursor\")}t.canvas?e?n():i():e?t.addEventListener(\"render-target-loaded\",n):t.addEventListener(\"render-target-loaded\",i)},saveCameraPose:function(){var e=this.el;this.savedPose.position.copy(e.object3D.position),this.savedPose.rotation.copy(e.object3D.rotation),this.hasSavedPose=!0},restoreCameraPose:function(){var e=this.el,t=this.savedPose;this.hasSavedPose&&(e.object3D.position.copy(t.position),e.object3D.rotation.copy(t.rotation),this.hasSavedPose=!1)}})},240:(e,t,n)=>{var i=n(7629),r=n(3515).registerComponent,s=n(6600),o=s.checkControllerPresentAndSetup,a=s.emitIfAxesChanged,l=s.onButtonEvent,c=\"magicleap-one\";e.exports.Component=r(\"magicleap-controls\",{schema:{hand:{default:\"none\"},model:{default:!0},orientationOffset:{type:\"vec3\"}},mapping:{axes:{touchpad:[0,1]},buttons:[\"trigger\",\"grip\",\"touchpad\",\"menu\"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,\"down\",e)},this.onButtonUp=function(t){l(t.detail.id,\"up\",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,\"touchend\",e)},this.onButtonTouchStart=function(t){l(t.detail.id,\"touchstart\",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex=\"right\"===e.hand?0:\"left\"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"axismove\",this.onAxisMoved),e.addEventListener(\"model-loaded\",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"axismove\",this.onAxisMoved),e.removeEventListener(\"model-loaded\",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;o(this,c,{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{idPrefix:c,hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute(\"gltf-model\",\"https://cdn.aframe.io/controllers/magicleap/magicleap-one-controller.glb\")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id];n&&(\"trigger\"===n&&(t=e.detail.state.value,console.log(\"analog value of trigger press: \"+t)),this.el.emit(n+\"changed\",e.detail.state))},onModelLoaded:function(e){e.detail.model.scale.set(.01,.01,.01)},onAxisMoved:function(e){a(this,this.mapping.axes,e)},updateModel:function(e,t){},setButtonColor:function(e,t){}})},9115:(e,t,n)=>{var i=n(8903),r=n(3515),s=n(2666),o=n(9644),a=i.debug(\"components:material:error\"),l=r.registerComponent,c=o.shaders,h=o.shaderNames;function u(e,t){e.dispose(),t.unregisterMaterial(e)}e.exports.Component=l(\"material\",{schema:{alphaTest:{default:0,min:0,max:1},depthTest:{default:!0},depthWrite:{default:!0},flatShading:{default:!1},npot:{default:!1},offset:{type:\"vec2\",default:{x:0,y:0}},opacity:{default:1,min:0,max:1},repeat:{type:\"vec2\",default:{x:1,y:1}},shader:{default:\"standard\",oneOf:h,schemaChange:!0},side:{default:\"front\",oneOf:[\"front\",\"back\",\"double\"]},transparent:{default:!1},vertexColors:{type:\"string\",default:\"none\",oneOf:[\"face\",\"vertex\"]},visible:{default:!0},blending:{default:\"normal\",oneOf:[\"none\",\"normal\",\"additive\",\"subtractive\",\"multiply\"]},dithering:{default:!0}},init:function(){this.material=null},update:function(e){var t=this.data;this.shader&&t.shader===e.shader||this.updateShader(t.shader),this.shader.update(this.data),this.updateMaterial(e)},updateSchema:function(e){var t,n,i,r;n=e&&e.shader,t=this.oldData&&this.oldData.shader,(i=c[r=n||t]&&c[r].schema)||a(\"Unknown shader schema \"+r),t&&n===t||(this.extendSchema(i),this.updateBehavior())},updateBehavior:function(){var e,t,n=this.el.sceneEl,i=this.schema,r=this;function s(e,n){var i;for(i in t)t[i]=e;r.shader.update(t)}for(e in this.tick=void 0,t={},i)\"time\"===i[e].type&&(this.tick=s,t[e]=!0);n&&(this.tick?n.addBehavior(this):n.removeBehavior(this))},updateShader:function(e){var t,n=this.data,i=c[e]&&c[e].Shader;if(!i)throw new Error(\"Unknown shader \"+e);(t=this.shader=new i).el=this.el,t.init(n),this.setMaterial(t.material),this.updateSchema(n)},updateMaterial:function(e){var t,n=this.data,i=this.material;for(t in i.alphaTest=n.alphaTest,i.depthTest=!1!==n.depthTest,i.depthWrite=!1!==n.depthWrite,i.opacity=n.opacity,i.flatShading=n.flatShading,i.side=function(e){switch(e){case\"back\":return s.BackSide;case\"double\":return s.DoubleSide;default:return s.FrontSide}}(n.side),i.transparent=!1!==n.transparent||n.opacity\u003C1,i.vertexColors=function(e){switch(e){case\"face\":return s.FaceColors;case\"vertex\":return s.VertexColors;default:return s.NoColors}}(n.vertexColors),i.visible=n.visible,i.blending=function(e){switch(e){case\"none\":return s.NoBlending;case\"additive\":return s.AdditiveBlending;case\"subtractive\":return s.SubtractiveBlending;case\"multiply\":return s.MultiplyBlending;default:return s.NormalBlending}}(n.blending),i.dithering=n.dithering,e)break;!t||e.alphaTest===n.alphaTest&&e.side===n.side&&e.vertexColors===n.vertexColors||(i.needsUpdate=!0)},remove:function(){var e=new s.MeshBasicMaterial,t=this.material,n=this.el.getObject3D(\"mesh\");n&&(n.material=e),u(t,this.system)},setMaterial:function(e){var t,n=this.el,i=this.system;this.material&&u(this.material,i),this.material=e,i.registerMaterial(e),(t=n.getObject3D(\"mesh\"))?t.material=e:n.addEventListener(\"object3dset\",(function t(i){\"mesh\"===i.detail.type&&i.target===n&&(n.getObject3D(\"mesh\").material=e,n.removeEventListener(\"object3dset\",t))}))}})},4269:(e,t,n)=>{var i=n(4219),r=n(3515).registerComponent,s=n(2666),o=i(\"components:obj-model:warn\");e.exports.Component=r(\"obj-model\",{schema:{mtl:{type:\"model\"},obj:{type:\"model\"}},init:function(){var e=this;this.model=null,this.objLoader=new s.OBJLoader,this.mtlLoader=new s.MTLLoader(this.objLoader.manager),this.mtlLoader.crossOrigin=\"\",this.el.addEventListener(\"componentinitialized\",(function(t){e.model&&\"material\"===t.detail.name&&e.applyMaterial()}))},update:function(){var e=this.data;e.obj&&(this.resetMesh(),this.loadObj(e.obj,e.mtl))},remove:function(){this.model&&this.resetMesh()},resetMesh:function(){this.el.removeObject3D(\"mesh\")},loadObj:function(e,t){var n=this,i=this.el,r=this.mtlLoader,s=this.objLoader,a=this.el.sceneEl.systems.renderer,l=t.substr(0,t.lastIndexOf(\"/\")+1);if(t)return i.hasAttribute(\"material\")&&o(\"Material component properties are ignored when a .MTL is provided\"),r.setResourcePath(l),void r.load(t,(function(t){t.preload(),s.setMaterials(t),s.load(e,(function(e){n.model=e,n.model.traverse((function(e){if(e.isMesh){var t=e.material;t.color&&a.applyColorCorrection(t.color),t.map&&a.applyColorCorrection(t.map),t.emissive&&a.applyColorCorrection(t.emissive),t.emissiveMap&&a.applyColorCorrection(t.emissiveMap)}})),i.setObject3D(\"mesh\",e),i.emit(\"model-loaded\",{format:\"obj\",model:e})}))}));s.load(e,(function(e){n.model=e,n.applyMaterial(),i.setObject3D(\"mesh\",e),i.emit(\"model-loaded\",{format:\"obj\",model:e})}))},applyMaterial:function(){var e=this.el.components.material;e&&this.model.traverse((function(t){t instanceof s.Mesh&&(t.material=e.material)}))}})},9536:(e,t,n)=>{var i=n(3515).registerComponent,r=n(7629),s=n(6600),o=s.checkControllerPresentAndSetup,a=s.emitIfAxesChanged,l=s.onButtonEvent,c=n(8903).device.isWebXRAvailable,h=c?\"oculus-go\":\"Oculus Go\",u=c?{axes:{touchpad:[0,1]},buttons:[\"trigger\",\"none\",\"touchpad\"]}:{axes:{trackpad:[0,1]},buttons:[\"trackpad\",\"trigger\"]};e.exports.Component=i(\"oculus-go-controls\",{schema:{hand:{default:\"\"},buttonColor:{type:\"color\",default:\"#FFFFFF\"},buttonTouchedColor:{type:\"color\",default:\"#BBBBBB\"},buttonHighlightColor:{type:\"color\",default:\"#7A7A7A\"},model:{default:!0},orientationOffset:{type:\"vec3\"},armModel:{default:!0}},mapping:u,bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,\"down\",e)},this.onButtonUp=function(t){l(t.detail.id,\"up\",e)},this.onButtonTouchStart=function(t){l(t.detail.id,\"touchstart\",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,\"touchend\",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"model-loaded\",this.onModelLoaded),e.addEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"model-loaded\",this.onModelLoaded),e.removeEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){o(this,h,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{armModel:t.armModel,hand:t.hand,idPrefix:h,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute(\"gltf-model\",\"https://cdn.aframe.io/controllers/oculus/go/oculus-go-controller.gltf\")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName(\"oculus_go_button_trigger\"),t.trackpad=n.getObjectByName(\"oculus_go_touchpad\"),t.touchpad=n.getObjectByName(\"oculus_go_touchpad\"))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+\"changed\",e.detail.state)},onAxisMoved:function(e){a(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var i,r;switch(t){case\"down\":i=this.data.buttonHighlightColor;break;case\"touchstart\":i=this.data.buttonTouchedColor;break;default:i=this.data.buttonColor}(r=n[e]).material.color.set(i),this.rendererSystem.applyColorCorrection(r.material.color)}}})},5569:(e,t,n)=>{var i=n(7629),r=n(3515).registerComponent,s=n(2666),o=n(6600),a=o.checkControllerPresentAndSetup,l=o.emitIfAxesChanged,c=o.onButtonEvent,h=n(8903).device.isWebXRAvailable,u=\"oculus-touch\",d=h?u:\"Oculus Touch\",p=\"https://cdn.aframe.io/controllers/oculus/oculus-touch-controller-\",A=\"https://cdn.aframe.io/controllers/meta/\",f={left:{modelUrl:p+\"left.gltf\",rayOrigin:{origin:{x:.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new s.Vector3(-.005,.003,-.055),modelPivotRotation:new s.Euler(0,0,0)},right:{modelUrl:p+\"right.gltf\",rayOrigin:{origin:{x:-.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new s.Vector3(.005,.003,-.055),modelPivotRotation:new s.Euler(0,0,0)}},m={left:{modelUrl:p+\"left.gltf\",rayOrigin:{origin:{x:.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new s.Vector3(-.005,.036,-.037),modelPivotRotation:new s.Euler(Math.PI/4.5,0,0)},right:{modelUrl:p+\"right.gltf\",rayOrigin:{origin:{x:-.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new s.Vector3(.005,.036,-.037),modelPivotRotation:new s.Euler(Math.PI/4.5,0,0)}},g=\"oculus-touch\",v={\"oculus-touch\":h?m:f,\"oculus-touch-v2\":{left:{modelUrl:p+\"gen2-left.gltf\",rayOrigin:{origin:{x:-.006,y:-.03,z:-.04},direction:{x:0,y:-.9,z:-1}},modelPivotOffset:new s.Vector3(0,-.007,-.021),modelPivotRotation:new s.Euler(-Math.PI/4,0,0)},right:{modelUrl:p+\"gen2-right.gltf\",rayOrigin:{origin:{x:.006,y:-.03,z:-.04},direction:{x:0,y:-.9,z:-1}},modelPivotOffset:new s.Vector3(0,-.007,-.021),modelPivotRotation:new s.Euler(-Math.PI/4,0,0)}},\"oculus-touch-v3\":{left:{modelUrl:p+\"v3-left.glb\",rayOrigin:{origin:{x:.0065,y:-.0186,z:-.05},direction:{x:.12394785839500175,y:-.5944043672340157,z:-.7945567170519814}},modelPivotOffset:new s.Vector3(0,0,0),modelPivotRotation:new s.Euler(0,0,0)},right:{modelUrl:p+\"v3-right.glb\",rayOrigin:{origin:{x:-.0065,y:-.0186,z:-.05},direction:{x:-.12394785839500175,y:-.5944043672340157,z:-.7945567170519814}},modelPivotOffset:new s.Vector3(0,0,0),modelPivotRotation:new s.Euler(0,0,0)}},\"meta-quest-touch-pro\":{left:{modelUrl:A+\"quest-touch-pro-left.glb\",rayOrigin:{origin:{x:.0065,y:-.0186,z:-.05},direction:{x:.12394785839500175,y:-.5944043672340157,z:-.7945567170519814}},modelPivotOffset:new s.Vector3(0,0,0),modelPivotRotation:new s.Euler(0,0,0)},right:{modelUrl:A+\"quest-touch-pro-right.glb\",rayOrigin:{origin:{x:-.0065,y:-.0186,z:-.05},direction:{x:-.12394785839500175,y:-.5944043672340157,z:-.7945567170519814}},modelPivotOffset:new s.Vector3(0,0,0),modelPivotRotation:new s.Euler(0,0,0)}}},y=h?{left:{axes:{thumbstick:[2,3]},buttons:[\"trigger\",\"grip\",\"none\",\"thumbstick\",\"xbutton\",\"ybutton\",\"surface\"]},right:{axes:{thumbstick:[2,3]},buttons:[\"trigger\",\"grip\",\"none\",\"thumbstick\",\"abutton\",\"bbutton\",\"surface\"]}}:{left:{axes:{thumbstick:[0,1]},buttons:[\"thumbstick\",\"trigger\",\"grip\",\"xbutton\",\"ybutton\",\"surface\"]},right:{axes:{thumbstick:[0,1]},buttons:[\"thumbstick\",\"trigger\",\"grip\",\"abutton\",\"bbutton\",\"surface\"]}};function E(e){e.traverse((function(t){if(\"Mesh\"!==t.type)return;let n=t.material.clone();e.originalColor=t.material.color,t.material.dispose(),t.material=n}))}e.exports.Component=r(\"oculus-touch-controls\",{schema:{hand:{default:\"left\"},buttonColor:{type:\"color\",default:\"#999\"},buttonTouchColor:{type:\"color\",default:\"#8AB\"},buttonHighlightColor:{type:\"color\",default:\"#2DF\"},model:{default:!0},controllerType:{default:\"auto\",oneOf:[\"auto\",\"oculus-touch\",\"oculus-touch-v2\",\"oculus-touch-v3\"]},orientationOffset:{type:\"vec3\",default:{x:43,y:0,z:0}}},mapping:y,bindMethods:function(){this.onButtonChanged=i(this.onButtonChanged,this),this.onThumbstickMoved=i(this.onThumbstickMoved,this),this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonDown=function(t){c(t.detail.id,\"down\",e,e.data.hand)},this.onButtonUp=function(t){c(t.detail.id,\"up\",e,e.data.hand)},this.onButtonTouchStart=function(t){c(t.detail.id,\"touchstart\",e,e.data.hand)},this.onButtonTouchEnd=function(t){c(t.detail.id,\"touchend\",e,e.data.hand)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods(),this.triggerEuler=new s.Euler},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"axismove\",this.onAxisMoved),e.addEventListener(\"model-loaded\",this.onModelLoaded),e.addEventListener(\"thumbstickmoved\",this.onThumbstickMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"axismove\",this.onAxisMoved),e.removeEventListener(\"model-loaded\",this.onModelLoaded),e.removeEventListener(\"thumbstickmoved\",this.onThumbstickMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,d,{hand:this.data.hand,iterateControllerProfiles:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},loadModel:function(e){var t,n=this.data;if(n.model){if(this.displayModel=v[n.controllerType]||v[g],\"auto\"===n.controllerType){var i=this.el.sceneEl.systems[\"tracked-controls-webvr\"];if(i&&i.vrDisplay){var r=i.vrDisplay.displayName;/^Oculus Quest$/.test(r)&&(this.displayModel=v[\"oculus-touch-v2\"])}else{t=g;for(var s=Object.keys(v),o=0;o\u003Ce.profiles.length;o++)if(-1!==s.indexOf(e.profiles[o])){t=e.profiles[o];break}this.displayModel=v[t]}}var a=this.displayModel[n.hand].modelUrl;this.isOculusTouchV3=this.displayModel===v[\"oculus-touch-v3\"],this.el.setAttribute(\"gltf-model\",a)}},injectTrackedControls:function(e){var t=this.data,n=u,i=\"right\"===t.hand?\"Oculus Touch (Right)\":\"Oculus Touch (Left)\",r=h?n:i;this.el.setAttribute(\"tracked-controls\",{id:r,hand:t.hand,orientationOffset:t.orientationOffset,handTrackingEnabled:!1,iterateControllerProfiles:!0,space:\"gripSpace\"}),this.loadModel(e)},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t=this.mapping[this.data.hand].buttons[e.detail.id];if(t){if(this.isOculusTouchV3)this.onButtonChangedV3(e);else{var n,i=this.buttonMeshes;\"trigger\"!==t&&\"grip\"!==t||(n=e.detail.state.value),i&&(\"trigger\"===t&&i.trigger&&(i.trigger.rotation.x=this.originalXRotationTrigger-n*(Math.PI/26)),\"grip\"===t&&i.grip&&(n*=\"left\"===this.data.hand?-1:1,i.grip.position.x=this.originalXPositionGrip+.004*n))}this.el.emit(t+\"changed\",e.detail.state)}},clickButtons:[\"xbutton\",\"ybutton\",\"abutton\",\"bbutton\",\"thumbstick\"],onButtonChangedV3:function(e){var t,n=this.mapping[this.data.hand].buttons[e.detail.id],i=this.buttonObjects;t=e.detail.state.value,t*=\"left\"===this.data.hand?-1:1,\"trigger\"===n?(this.triggerEuler.copy(this.buttonRanges.trigger.min.rotation),this.triggerEuler.x+=t*this.buttonRanges.trigger.diff.x,this.triggerEuler.y+=t*this.buttonRanges.trigger.diff.y,this.triggerEuler.z+=t*this.buttonRanges.trigger.diff.z,i.trigger.setRotationFromEuler(this.triggerEuler)):\"grip\"===n?i.grip.position.x=i.grip.minX+.004*t:this.clickButtons.includes(n)&&(i[n].position.y=0===t?this.buttonRanges[n].unpressedY:this.buttonRanges[n].pressedY)},onModelLoaded:function(e){if(this.data.model){if(this.isOculusTouchV3)this.onOculusTouchV3ModelLoaded(e);else{var t,n=this.controllerObject3D=e.detail.model;(t=this.buttonMeshes={}).grip=n.getObjectByName(\"buttonHand\"),this.originalXPositionGrip=t.grip&&t.grip.position.x,t.trigger=n.getObjectByName(\"buttonTrigger\"),this.originalXRotationTrigger=t.trigger&&t.trigger.rotation.x,t.thumbstick=n.getObjectByName(\"stick\"),t.xbutton=n.getObjectByName(\"buttonX\"),t.abutton=n.getObjectByName(\"buttonA\"),t.ybutton=n.getObjectByName(\"buttonY\"),t.bbutton=n.getObjectByName(\"buttonB\")}for(var i in this.buttonMeshes)this.buttonMeshes[i]&&E(this.buttonMeshes[i]);this.applyOffset(e.detail.model),this.el.emit(\"controllermodelready\",{name:\"oculus-touch-controls\",model:this.data.model,rayOrigin:this.displayModel[this.data.hand].rayOrigin})}},applyOffset:function(e){e.position.copy(this.displayModel[this.data.hand].modelPivotOffset),e.rotation.copy(this.displayModel[this.data.hand].modelPivotRotation)},onOculusTouchV3ModelLoaded:function(e){var t=this.controllerObject3D=e.detail.model,n=this.buttonObjects={},i=this.buttonMeshes={},r=this.buttonRanges={};i.grip=t.getObjectByName(\"squeeze\"),n.grip=t.getObjectByName(\"xr_standard_squeeze_pressed_value\"),r.grip={min:t.getObjectByName(\"xr_standard_squeeze_pressed_min\"),max:t.getObjectByName(\"xr_standard_squeeze_pressed_max\")},n.grip.minX=n.grip.position.x,i.thumbstick=t.getObjectByName(\"thumbstick\"),n.thumbstick=t.getObjectByName(\"xr_standard_thumbstick_pressed_value\"),r.thumbstick={min:t.getObjectByName(\"xr_standard_thumbstick_pressed_min\"),max:t.getObjectByName(\"xr_standard_thumbstick_pressed_max\"),originalRotation:this.buttonObjects.thumbstick.rotation.clone()},r.thumbstick.pressedY=n.thumbstick.position.y,r.thumbstick.unpressedY=r.thumbstick.pressedY+Math.abs(r.thumbstick.max.position.y)-Math.abs(r.thumbstick.min.position.y),i.trigger=t.getObjectByName(\"trigger\"),n.trigger=t.getObjectByName(\"xr_standard_trigger_pressed_value\"),r.trigger={min:t.getObjectByName(\"xr_standard_trigger_pressed_min\"),max:t.getObjectByName(\"xr_standard_trigger_pressed_max\")},r.trigger.diff={x:Math.abs(r.trigger.max.rotation.x)-Math.abs(r.trigger.min.rotation.x),y:Math.abs(r.trigger.max.rotation.y)-Math.abs(r.trigger.min.rotation.y),z:Math.abs(r.trigger.max.rotation.z)-Math.abs(r.trigger.min.rotation.z)};var s=\"left\"===this.data.hand?\"x\":\"a\",o=\"left\"===this.data.hand?\"y\":\"b\",a=s+\"button\",l=o+\"button\";i[a]=t.getObjectByName(s+\"_button\"),n[a]=t.getObjectByName(s+\"_button_pressed_value\"),r[a]={min:t.getObjectByName(s+\"_button_pressed_min\"),max:t.getObjectByName(s+\"_button_pressed_max\")},i[l]=t.getObjectByName(o+\"_button\"),n[l]=t.getObjectByName(o+\"_button_pressed_value\"),r[l]={min:t.getObjectByName(o+\"_button_pressed_min\"),max:t.getObjectByName(o+\"_button_pressed_max\")},r[a].unpressedY=n[a].position.y,r[a].pressedY=r[a].unpressedY+Math.abs(r[a].max.position.y)-Math.abs(r[a].min.position.y),r[l].unpressedY=n[l].position.y,r[l].pressedY=r[l].unpressedY-Math.abs(r[l].max.position.y)+Math.abs(r[l].min.position.y)},onAxisMoved:function(e){l(this,this.mapping[this.data.hand].axes,e)},onThumbstickMoved:function(e){if(this.isOculusTouchV3&&this.buttonMeshes&&this.buttonMeshes.thumbstick)for(var t in e.detail)this.buttonObjects.thumbstick.rotation[this.axisMap[t]]=this.buttonRanges.thumbstick.originalRotation[this.axisMap[t]]-Math.PI/8*e.detail[t]*(\"y\"===t||\"right\"===this.data.hand?-1:1)},axisMap:{y:\"x\",x:\"z\"},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n,i=\"up\"===t||\"touchend\"===t?this.buttonMeshes[e].originalColor||this.data.buttonColor:\"touchstart\"===t?this.data.buttonTouchColor:this.data.buttonHighlightColor,r=this.buttonMeshes;r&&r[e]&&((n=r[e]).material.color.set(i),this.rendererSystem.applyColorCorrection(n.material.color))}})},4854:(e,t,n)=>{var i=n(3515).registerComponent;e.exports.Component=i(\"position\",{schema:{type:\"vec3\"},update:function(){var e=this.el.object3D,t=this.data;e.position.set(t.x,t.y,t.z)},remove:function(){this.el.object3D.position.set(0,0,0)}})},7454:(e,t,n)=>{var i,r,s=n(3515).registerComponent,o=n(2666),a=n(8903).debug(\"components:raycaster:warn\"),l=/^[\\w\\s-.,[\\]#]*$/,c={childList:!0,attributes:!0,subtree:!0},h=\"raycaster-intersected-cleared\",u=\"raycaster-intersection-cleared\";function d(e,t){var n;for(e.length=t.length,n=0;n\u003Ct.length;n++)e[n]=t[n]}e.exports.Component=s(\"raycaster\",{schema:{autoRefresh:{default:!0},direction:{type:\"vec3\",default:{x:0,y:0,z:-1}},enabled:{default:!0},far:{default:1e3},interval:{default:0},near:{default:0},objects:{default:\"\"},origin:{type:\"vec3\"},showLine:{default:!1},lineColor:{default:\"white\"},lineOpacity:{default:1},useWorldCoordinates:{default:!1}},multiple:!0,init:function(){this.clearedIntersectedEls=[],this.unitLineEndVec3=new o.Vector3,this.intersectedEls=[],this.intersections=[],this.newIntersectedEls=[],this.newIntersections=[],this.objects=[],this.prevCheckTime=void 0,this.prevIntersectedEls=[],this.rawIntersections=[],this.raycaster=new o.Raycaster,this.updateOriginDirection(),this.setDirty=this.setDirty.bind(this),this.updateLine=this.updateLine.bind(this),this.observer=new MutationObserver(this.setDirty),this.dirty=!0,this.lineEndVec3=new o.Vector3,this.otherLineEndVec3=new o.Vector3,this.lineData={end:this.lineEndVec3},this.getIntersection=this.getIntersection.bind(this),this.intersectedDetail={el:this.el,getIntersection:this.getIntersection},this.intersectedClearedDetail={el:this.el},this.intersectionClearedDetail={clearedEls:this.clearedIntersectedEls},this.intersectionDetail={}},update:function(e){var t=this.data,n=this.el,i=this.raycaster;i.far=t.far,i.near=t.near,!t.showLine||t.far===e.far&&t.origin===e.origin&&t.direction===e.direction&&e.showLine||(this.unitLineEndVec3.copy(t.origin).add(t.direction).normalize(),this.drawLine()),!t.showLine&&e.showLine&&n.removeAttribute(\"line\"),t.objects===e.objects||l.test(t.objects)||a('[raycaster] Selector \"'+t.objects+'\" may not update automatically with DOM changes.'),t.objects||a('[raycaster] For performance, please define raycaster.objects when using raycaster or cursor components to whitelist which entities to intersect with. e.g., raycaster=\"objects: [data-raycastable]\".'),t.autoRefresh!==e.autoRefresh&&n.isPlaying&&(t.autoRefresh?this.addEventListeners():this.removeEventListeners()),e.enabled&&!t.enabled&&this.clearAllIntersections(),this.setDirty()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){this.data.showLine&&this.el.removeAttribute(\"line\"),this.clearAllIntersections()},addEventListeners:function(){this.data.autoRefresh&&(this.observer.observe(this.el.sceneEl,c),this.el.sceneEl.addEventListener(\"object3dset\",this.setDirty),this.el.sceneEl.addEventListener(\"object3dremove\",this.setDirty))},removeEventListeners:function(){this.observer.disconnect(),this.el.sceneEl.removeEventListener(\"object3dset\",this.setDirty),this.el.sceneEl.removeEventListener(\"object3dremove\",this.setDirty)},setDirty:function(){this.dirty=!0},refreshObjects:function(){var e,t=this.data;e=t.objects?this.el.sceneEl.querySelectorAll(t.objects):this.el.sceneEl.querySelectorAll(\"*\"),this.objects=this.flattenObject3DMaps(e),this.dirty=!1},tock:function(e){var t=this.data,n=this.prevCheckTime;t.enabled&&(n&&e-n\u003Ct.interval||(this.prevCheckTime=e,this.checkIntersections()))},checkIntersections:function(){var e,t,n=this.clearedIntersectedEls,i=this.el,r=this.data,s=this.intersectedEls,o=this.intersections,a=this.newIntersectedEls,l=this.newIntersections,c=this.prevIntersectedEls,p=this.rawIntersections;for(this.dirty&&this.refreshObjects(),d(this.prevIntersectedEls,this.intersectedEls),this.updateOriginDirection(),p.length=0,this.raycaster.intersectObjects(this.objects,!0,p),o.length=0,s.length=0,e=0;e\u003Cp.length;e++)t=p[e],r.showLine&&t.object===i.getObject3D(\"line\")||t.object.el&&(o.push(t),s.push(t.object.el));for(l.length=0,a.length=0,e=0;e\u003Co.length;e++)-1===c.indexOf(o[e].object.el)&&(l.push(o[e]),a.push(o[e].object.el));for(n.length=0,e=0;e\u003Cc.length;e++)-1===s.indexOf(c[e])&&(c[e].emit(h,this.intersectedClearedDetail),n.push(c[e]));for(n.length&&i.emit(u,this.intersectionClearedDetail),e=0;e\u003Ca.length;e++)a[e].emit(\"raycaster-intersected\",this.intersectedDetail);l.length&&(this.intersectionDetail.els=a,this.intersectionDetail.intersections=l,i.emit(\"raycaster-intersection\",this.intersectionDetail)),(0===c.length&&o.length>0||c.length>0&&0===o.length||c.length&&o.length&&c[0]!==o[0].object.el)&&(this.intersectionDetail.els=this.intersectedEls,this.intersectionDetail.intersections=o,i.emit(\"raycaster-closest-entity-changed\",this.intersectionDetail)),r.showLine&&setTimeout(this.updateLine)},updateLine:function(){var e,t=this.el,n=this.intersections;n.length&&(e=n[0].object.el===t&&n[1]?n[1].distance:n[0].distance),this.drawLine(e)},getIntersection:function(e){var t,n;for(t=0;t\u003Cthis.intersections.length;t++)if((n=this.intersections[t]).object.el===e)return n;return null},updateOriginDirection:(i=new o.Vector3,r=new o.Vector3,function(){var e=this.el,t=this.data;t.useWorldCoordinates?this.raycaster.set(t.origin,t.direction):(e.object3D.updateMatrixWorld(),r.setFromMatrixPosition(e.object3D.matrixWorld),0===t.origin.x&&0===t.origin.y&&0===t.origin.z||(r=e.object3D.localToWorld(r.copy(t.origin))),i.copy(t.direction).transformDirection(e.object3D.matrixWorld).normalize(),this.raycaster.set(r,i))}),drawLine:function(e){var t,n=this.data,i=this.el;t=this.lineData.end===this.lineEndVec3?this.otherLineEndVec3:this.lineEndVec3,void 0===e&&(e=n.far===1/0?1e3:n.far),this.lineData.start=n.origin,this.lineData.end=t.copy(this.unitLineEndVec3).multiplyScalar(e),this.lineData.color=n.lineColor,this.lineData.opacity=n.lineOpacity,i.setAttribute(\"line\",this.lineData)},flattenObject3DMaps:function(e){var t,n,i=this.objects,r=this.el.sceneEl.object3D;function s(e){return e.parent?s(e.parent):e===r}for(i.length=0,n=0;n\u003Ce.length;n++){var o=e[n];if(o.isEntity&&o.object3D&&s(o.object3D))for(t in o.object3DMap)i.push(o.getObject3D(t))}return i},clearAllIntersections:function(){var e;for(e=0;e\u003Cthis.intersectedEls.length;e++)this.intersectedEls[e].emit(h,this.intersectedClearedDetail);d(this.clearedIntersectedEls,this.intersectedEls),this.intersectedEls.length=0,this.intersections.length=0,this.el.emit(u,this.intersectionClearedDetail)}})},4914:(e,t,n)=>{var i=n(2666).MathUtils.degToRad,r=n(3515).registerComponent;e.exports.Component=r(\"rotation\",{schema:{type:\"vec3\"},update:function(){var e=this.data,t=this.el.object3D;t.rotation.set(i(e.x),i(e.y),i(e.z)),t.rotation.order=\"YXZ\"},remove:function(){this.el.object3D.rotation.set(0,0,0)}})},3689:(e,t,n)=>{var i=n(3515).registerComponent,r=1e-5;e.exports.Component=i(\"scale\",{schema:{type:\"vec3\",default:{x:1,y:1,z:1}},update:function(){var e=this.data,t=this.el.object3D,n=0===e.x?r:e.x,i=0===e.y?r:e.y,s=0===e.z?r:e.z;t.scale.set(n,i,s)},remove:function(){this.el.object3D.scale.set(1,1,1)}})},3431:(e,t,n)=>{var i,r,s,o=n(3515).registerComponent,a=n(2666),l=(i=new a.Quaternion,r=new a.Vector3,function(e,t,n){t.position.copy(e.transform.position),t.quaternion.copy(e.transform.orientation),r.copy(n),i.copy(e.transform.orientation),r.applyQuaternion(i),t.position.sub(r)});function c(e,t){this.renderer=e,this.xrHitTestSource=null,e.xr.addEventListener(\"sessionend\",function(){this.xrHitTestSource=null}.bind(this)),e.xr.addEventListener(\"sessionstart\",function(){this.sessionStart(t)}.bind(this)),this.renderer.xr.isPresenting&&this.sessionStart(t)}function h(e){console.warn(e.message),console.warn('Cannot requestHitTestSource Are you missing: webxr=\"optionalFeatures: hit-test;\" from \u003Ca-scene>?')}l.tempFakePose={transform:{orientation:new a.Quaternion,position:new a.Vector3}},c.prototype.previousFrameAnchors=new Set,c.prototype.anchorToObject3D=new Map,c.prototype.sessionStart=function(e){this.session=this.renderer.xr.getSession(),\"requestHitTestSource\"in this.session?e.space?this.session.requestHitTestSource(e).then(function(e){this.xrHitTestSource=e}.bind(this)).catch(h):e.profile&&this.session.requestHitTestSourceForTransientInput(e).then(function(e){this.xrHitTestSource=e,this.transient=!0}.bind(this)).catch(h):h({message:\"No requestHitTestSource on the session.\"})},c.prototype.anchorFromLastHitTestResult=function(e,t){var n=this.lastHitTest;if(n){var i={object3D:e,offset:t};Array.from(this.anchorToObject3D.entries()).forEach(function(t){var n=t[1].object3D,i=t[0];n===e&&(this.anchorToObject3D.delete(i),i.delete())}.bind(this)),n.createAnchor&&n.createAnchor().then(function(e){this.anchorToObject3D.set(e,i)}.bind(this)).catch((function(e){console.warn(e.message),console.warn('Cannot create anchor, are you missing: webxr=\"optionalFeatures: anchors;\" from \u003Ca-scene>?')}))}},c.prototype.doHit=function(e){if(this.renderer.xr.isPresenting){var t,n,i=this.renderer.xr.getReferenceSpace(),r=e.getViewerPose(i);return this.xrHitTestSource&&r?this.transient?(t=e.getHitTestResultsForTransientInput(this.xrHitTestSource)).length>0&&(n=t[0].results).length>0&&(this.lastHitTest=n[0],n[0].getPose(i)):(t=e.getHitTestResults(this.xrHitTestSource)).length>0&&(this.lastHitTest=t[0],t[0].getPose(i)):void 0}},c.updateAnchorPoses=function(e,t){var n=e.trackedAnchors||c.prototype.previousFrameAnchors;c.prototype.previousFrameAnchors.forEach((function(e){n.has(e)||c.prototype.anchorToObject3D.delete(e)})),n.forEach((function(n){var i,r,s,o;try{i=e.getPose(n.anchorSpace,t)}catch(e){}i&&(s=(r=c.prototype.anchorToObject3D.get(n)).offset,o=r.object3D,l(i,o,s))}))},e.exports.Component=o(\"ar-hit-test\",{schema:{target:{type:\"selector\"},enabled:{default:!0},src:{default:\"data:image/webp;base64,UklGRkQHAABXRUJQVlA4WAoAAAAQAAAA/wEA/wEAQUxQSL0DAAARDzD/ERGCjrY9sYYFfgo6aa1kJ7K0w9Lo3AadLSVeFxevQwj5kuM8RfR/Atw/C0+ozB/oUBrloFZs6ElSW88j1KA4yExNWQaqRZquIDF0JYmlq0hAuUDTFu66tng3teW7pa3cQf1V1edvur54M/Slm6Wv3Gx9zw0MXlQLntcsBN6wkHjTQuYtC4W3LTw8mGRVG57TbAROtxHfZNhInGkjc5aNwtk2Hg6Mvki14k+NkZzCwQgCxalcAv3kddRTPI1DcUrXId1FLf1uHpzaQz4tquhZVLlKesbVpqKeTj0n0F5PpXDlFN9UqmhalL/ImuZFo6KmToWLoKlddMprqlS8cKovBvHo2kTiFV2LN4msaxKZl3QNiair8xYRdDWivIvXVXmbcMqJ51UebZuFXxZt6xd4laxtciqRtA3Cv0nU1t+kEUFbI8JvCa+tvkm3FDlO/W+OR99+kWEp/YYo+tYfTVnf/K8cE/F///3vv//993eeL+a+uvjawLcX3xjYvJotBFY3kVjTRGFtE+BU2AiMbiQyhpHMWEYeBozAH5qNBYRDB5KBCaTDBKKBAZTDBoKBDjwHAN5ABeCJBsAZcAAC0YHHxAYSMYBiYgGZWEA2MYFCbCCZGAAIANFEB+AnYgMQTDQAYSJ2AN5EBZAm4gDgTDgAeSIu4DGygTIRN1CMLOCZiACykQlg4jsAycgA8AO+BxCNdJyDkcbwRirDGXGnx8w+FDPrkM3MQ9JQZMYhiiwV/RDMtIM3U1/DmXHUo+IR2kSR2ToWkQ1NIn2qf2J8LCqJKiDUiSADHY3whirhdHgZ94HKaR97PhE+twEUJUFoAcgyTct8hfSxSkShASDKdMJ/ritKHwgyQ0sD4D/miCxU5SbhOOUDTnZpccCjYP/i0bZ/8bAgtVGEoGapWIQXyzKVKLwgNJFk2rtMIgoNRJlOZF7SNSSyUEeQmbxBFKEmtYjEe8S8zOZ1AkJVCmS88FJOtF40Ksg4oUaFiygk3C8qlTVNyl8UTevCUdAE2t14PfVqU1FPp57TopKeQZWromddTQp6QOfTOEQt/ZDuipZ11w/wOiqO8dRORcc6BQEkDQMClaHcn5wV9yLbxsNZNgpn2sicYSNxuo34Js1G4FQbnuNsOPa28PCWhcKbFjJvWEi8ZiHwqgXPcxbc5db33Cx95WboSzddX7yp+vyN0+eul7ZyN7Xlu64t3jVt4c5pc4JLV5EYupJE0xUknC4nOjVlmaYpyLit53HCQ0+ScnqceNcS5dzUkd0/CwMAVlA4IGADAAAQXwCdASoAAgACP8ne6Wy/tjCpqJ/IA/A5CWlu4XYBG/Pz8AfwD8APz//f3v8E1fuHZnxKYACtfuHZnxKYACrYTb5mOslhxu843ecbvON3nG7zjd3a0VCn7G1MABVxwH/Xd25gAK1+4dmfEpe2+PHhQaj75++riG6FuYACtfuHZnxKYACRrK3q9xO8Ss3uWKnMhs/rDF1hi6wxdYYusMXWGI5QRcCFDZog5OgqNlse1NDuz/UoFa/cOzPiUwAEsAOK4/nu5eZHK2tlXxJfNYlMABWv3Dsz4bvNJ5YA/LtxJ38SmAArX7h2Z8Sk5vdZUYv7mZPiUwAFa/cOzPh21s5OgZxf1mfEpemRyFr/rM+JS9noA/LtxJ38SmAAlUJIotzAASn6TjdhK+D3Dsz4dyvB7h2Z8O2tnJ0DOL+sz4lL2nKLT4lL/+iSLOocxq639w7M34MNZdm55uJ8v8ra2cpVZnxKTq2F3PN/cNksAfl24k7+JTAASqrD37h2Z7b1W+VtbOUqsz4lJ1bC7nm/uGyWAPy7cSd/EpgAJVVh79w7M9t6rfK2tnKVWZ8Sk6thdzzf3DZLAH5duJO/iUwAEqqw9+4dme29VvlbWzlKrM+JSdWwu55v7hslgD8u3EnfxKYACVVYe/cOzPbeq3ytrZylVme0kYJ8557FLerqFrzIbPrrf3DZLAH5duJO/iUvaVMS9BoaF4p7pSDFTP1XMyfElelrM0DOL+sz4eBJ13nV1OppBGPuKb4YzXQgq9uH19uS/0+JS9t9fr6ZUlQBelDG6GMgq97otb5QMPJwtKyBTbFp8Sl7b6/X0ykkawEOsgdiE6Fi0vb/Eve6xkwsmug0Z4nGNHQO8839bpTsjpz7SWIJxKagvd1QWMa6FYT1KEw3j4XDT6vJ9Xk+nyfT5Pq8n1eEmk5dinMM/9Fcfz4Z3Dsz3KD2dw7LxBRxKrqUUGQPH/7zxr1KIfNpLEJ0MZB2ITM/0Z2EFoh12NlXnEcpYcbvON3nG7zjd5xu84vfcNIAAP7+y8ceyzbVxkakPYY4lcr72fqOnDwipv+yxC71wAADBrjKnAAAAAAAAAAAAAAw7oNGHttqWONcoFN/2WIDc2pa6WVFtFYROlsaMaTXdcOjXHz93+YxAglKa4AAAAA=\",type:\"map\"},type:{default:\"footprint\",oneOf:[\"footprint\",\"map\"]},footprintDepth:{default:.1},mapSize:{type:\"vec2\",default:{x:.5,y:.5}}},init:function(){this.hitTest=null,this.imageDataArray=new Uint8ClampedArray(1048576),this.imageData=new ImageData(this.imageDataArray,512,512),this.textureCache=new Map,this.orthoCam=new a.OrthographicCamera,this.orthoCam.layers.set(21),this.textureTarget=new a.WebGLRenderTarget(512,512,{}),this.basicMaterial=new a.MeshBasicMaterial({color:0,side:a.DoubleSide}),this.canvas=document.createElement(\"canvas\"),this.context=this.canvas.getContext(\"2d\"),this.context.imageSmoothingEnabled=!1,this.canvas.width=512,this.canvas.height=512,this.canvasTexture=new a.CanvasTexture(this.canvas,{alpha:!0}),this.canvasTexture.flipY=!1;var e=this.el.getAttribute(\"webxr\"),t=e.optionalFeatures;t.includes(\"hit-test\")&&t.includes(\"anchors\")||(t.push(\"hit-test\"),t.push(\"anchors\"),this.el.setAttribute(\"webxr\",e)),this.el.sceneEl.renderer.xr.addEventListener(\"sessionend\",function(){this.hitTest=null}.bind(this)),this.el.sceneEl.renderer.xr.addEventListener(\"sessionstart\",function(){if(this.el.is(\"ar-mode\")){var e=this.el.sceneEl.renderer,t=this.session=e.xr.getSession();this.hasPosedOnce=!1,this.bboxMesh.visible=!1,s||(s=new Map),t.requestReferenceSpace(\"viewer\").then(function(t){this.hitTest=new c(e,{space:t}),s.set(t,this.hitTest),this.el.emit(\"ar-hit-test-start\")}.bind(this));var n=\"generic-touchscreen\",i=new c(e,{profile:n});t.addEventListener(\"selectstart\",function(t){if(!0===this.data.enabled){var r=t.inputSource;this.bboxMesh.visible=!0,!0===this.hasPosedOnce&&(this.el.emit(\"ar-hit-test-select-start\",{inputSource:r,position:this.bboxMesh.position,orientation:this.bboxMesh.quaternion}),r.profiles[0]===n?this.hitTest=i:(this.hitTest=s.get(r)||new c(e,{space:r.targetRaySpace}),s.set(r,this.hitTest)))}}.bind(this)),t.addEventListener(\"selectend\",function(e){if(this.hitTest&&!0===this.data.enabled){var t,n=e.inputSource;!0===this.hasPosedOnce&&(this.bboxMesh.visible=!1,this.data.target&&(t=this.data.target.object3D)&&(l.tempFakePose.transform.position.copy(this.bboxMesh.position),l.tempFakePose.transform.orientation.copy(this.bboxMesh.quaternion),l(l.tempFakePose,t,this.bboxOffset),t.visible=!0,this.hitTest.anchorFromLastHitTestResult(t,this.bboxOffset)),this.el.emit(\"ar-hit-test-select\",{inputSource:n,position:this.bboxMesh.position,orientation:this.bboxMesh.quaternion})),this.hitTest=null}else this.hitTest=null}.bind(this))}}.bind(this)),this.bboxOffset=new a.Vector3,this.update=this.update.bind(this),this.makeBBox()},update:function(){!1===this.data.enabled&&(this.hitTest=null,this.bboxMesh.visible=!1),this.data.target&&(this.data.target.object3D?(this.data.target.addEventListener(\"model-loaded\",this.update),this.data.target.object3D.layers.enable(21),this.data.target.object3D.traverse((function(e){e.layers.enable(21)}))):this.data.target.addEventListener(\"loaded\",this.update,{once:!0})),this.bboxNeedsUpdate=!0},makeBBox:function(){var e=new a.PlaneGeometry(1,1),t=new a.MeshBasicMaterial({transparent:!0,color:16777215});e.rotateX(-Math.PI/2),e.rotateY(-Math.PI/2),this.bbox=new a.Box3,this.bboxMesh=new a.Mesh(e,t),this.el.setObject3D(\"ar-hit-test\",this.bboxMesh),this.bboxMesh.visible=!1},updateFootprint:function(){var e,t,n,i=this.el.sceneEl.renderer,r=i.xr.enabled;this.bboxMesh.material.map=this.canvasTexture,this.bboxMesh.material.needsUpdate=!0,this.orthoCam.rotation.set(-Math.PI/2,0,-Math.PI/2),this.orthoCam.position.copy(this.bboxMesh.position),this.orthoCam.position.y-=this.bboxMesh.scale.y/2,this.orthoCam.near=.1,this.orthoCam.far=this.orthoCam.near+this.data.footprintDepth*this.bboxMesh.scale.y,this.orthoCam.position.y+=this.orthoCam.far,this.orthoCam.right=this.bboxMesh.scale.z/2,this.orthoCam.left=-this.bboxMesh.scale.z/2,this.orthoCam.top=this.bboxMesh.scale.x/2,this.orthoCam.bottom=-this.bboxMesh.scale.x/2,this.orthoCam.updateProjectionMatrix(),t=i.getRenderTarget(),i.setRenderTarget(this.textureTarget),i.xr.enabled=!1,n=this.el.object3D.background,this.el.object3D.overrideMaterial=this.basicMaterial,this.el.object3D.background=null,i.render(this.el.object3D,this.orthoCam),this.el.object3D.background=n,this.el.object3D.overrideMaterial=null,i.xr.enabled=r,i.setRenderTarget(t),i.readRenderTargetPixels(this.textureTarget,0,0,512,512,this.imageDataArray),this.context.putImageData(this.imageData,0,0),this.context.shadowColor=\"white\",this.context.shadowBlur=10,this.context.drawImage(this.canvas,0,0),e=this.context.getImageData(0,0,512,512);for(var s=0;s\u003C262144;s++)0!==e.data[4*s+3]&&255!==e.data[4*s+3]&&(e.data[4*s+3]=128);this.context.putImageData(e,0,0),this.canvasTexture.needsUpdate=!0},tick:function(){var e,t,n=this.el.sceneEl.frame,i=this.el.sceneEl.renderer;(n&&c.updateAnchorPoses(n,i.xr.getReferenceSpace()),this.bboxNeedsUpdate)&&(this.bboxNeedsUpdate=!1,this.data.target&&\"map\"!==this.data.type||(this.textureCache.has(this.data.src)?t=this.textureCache.get(this.data.src):(t=(new a.TextureLoader).load(this.data.src),this.textureCache.set(this.data.src,t)),this.bboxMesh.material.map=t,this.bboxMesh.material.needsUpdate=!0),this.data.target&&this.data.target.object3D?(this.bbox.setFromObject(this.data.target.object3D),this.bbox.getCenter(this.bboxMesh.position),this.bbox.getSize(this.bboxMesh.scale),\"footprint\"===this.data.type&&(this.bboxMesh.scale.x*=1.04,this.bboxMesh.scale.z*=1.04,this.updateFootprint()),this.bboxMesh.position.y-=this.bboxMesh.scale.y/2,this.bboxOffset.copy(this.bboxMesh.position),this.bboxOffset.sub(this.data.target.object3D.position)):this.bboxMesh.scale.set(this.data.mapSize.x,1,this.data.mapSize.y));this.hitTest&&(e=this.hitTest.doHit(n))&&(!0!==this.hasPosedOnce&&(this.hasPosedOnce=!0,this.el.emit(\"ar-hit-test-achieved\")),this.bboxMesh.visible=!0,this.bboxMesh.position.copy(e.transform.position),this.bboxMesh.quaternion.copy(e.transform.orientation))}})},2819:(e,t,n)=>{var i=n(3515).registerComponent,r=n(3515).components;e.exports.Component=i(\"background\",{schema:{color:{type:\"color\",default:\"black\"},transparent:{default:!1}},update:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=new THREE.Color(e.color)},remove:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=r[this.name].schema.color.default}})},1135:(e,t,n)=>{var i=n(3515).registerComponent;e.exports.Component=i(\"debug\",{schema:{default:!0}})},4046:(e,t,n)=>{var i=n(3515).registerComponent,r=n(8903).bind,s=n(8309),o=\"a-dialog-buttons-container\",a=\"a-dialog-button\";function l(e,t){var n,i,r,o;return(n=document.createElement(\"div\")).classList.add(\"a-modal\"),n.setAttribute(s.AFRAME_INJECTED,\"\"),(i=document.createElement(\"div\")).className=\"a-dialog\",i.setAttribute(s.AFRAME_INJECTED,\"\"),n.appendChild(i),(r=document.createElement(\"div\")).classList.add(\"a-dialog-text-container\"),i.appendChild(r),(o=document.createElement(\"div\")).classList.add(\"a-dialog-text\"),o.innerHTML=e,r.appendChild(o),i.appendChild(t),n}e.exports.Component=i(\"device-orientation-permission-ui\",{schema:{enabled:{default:!0},deviceMotionMessage:{default:\"This immersive website requires access to your device motion sensors.\"},httpsMessage:{default:\"Access this site over HTTPS to enter VR mode and grant access to the device sensors.\"},denyButtonText:{default:\"Deny\"},allowButtonText:{default:\"Allow\"},cancelButtonText:{default:\"Cancel\"}},init:function(){var e=this;this.data.enabled&&(\"localhost\"!==location.hostname&&\"127.0.0.1\"!==location.hostname&&\"http:\"===location.protocol&&this.showHTTPAlert(),\"undefined\"!=typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?(this.onDeviceMotionDialogAllowClicked=r(this.onDeviceMotionDialogAllowClicked,this),this.onDeviceMotionDialogDenyClicked=r(this.onDeviceMotionDialogDenyClicked,this),DeviceOrientationEvent.requestPermission().then((function(){e.el.emit(\"deviceorientationpermissiongranted\"),e.permissionGranted=!0})).catch((function(){var t,n,i,r,c,h,u,d;e.devicePermissionDialogEl=(t=e.data.denyButtonText,n=e.data.allowButtonText,i=e.data.deviceMotionMessage,r=e.onDeviceMotionDialogAllowClicked,c=e.onDeviceMotionDialogDenyClicked,(h=document.createElement(\"div\")).classList.add(o),(u=document.createElement(\"button\")).classList.add(a,\"a-dialog-deny-button\"),u.setAttribute(s.AFRAME_INJECTED,\"\"),u.innerHTML=t,h.appendChild(u),(d=document.createElement(\"button\")).classList.add(a,\"a-dialog-allow-button\"),d.setAttribute(s.AFRAME_INJECTED,\"\"),d.innerHTML=n,h.appendChild(d),d.addEventListener(\"click\",(function(e){e.stopPropagation(),r()})),u.addEventListener(\"click\",(function(e){e.stopPropagation(),c()})),l(i,h)),e.el.appendChild(e.devicePermissionDialogEl)}))):this.permissionGranted=!0)},remove:function(){this.devicePermissionDialogEl&&this.el.removeChild(this.devicePermissionDialogEl)},onDeviceMotionDialogDenyClicked:function(){this.remove()},showHTTPAlert:function(){var e,t,n,i,r,c=this,h=(e=c.data.cancelButtonText,t=c.data.httpsMessage,n=function(){c.el.removeChild(h)},(i=document.createElement(\"div\")).classList.add(o),(r=document.createElement(\"button\")).classList.add(a,\"a-dialog-ok-button\"),r.setAttribute(s.AFRAME_INJECTED,\"\"),r.innerHTML=e,i.appendChild(r),r.addEventListener(\"click\",(function(e){e.stopPropagation(),n()})),l(t,i));this.el.appendChild(h)},onDeviceMotionDialogAllowClicked:function(){var e=this;this.el.emit(\"deviceorientationpermissionrequested\"),DeviceOrientationEvent.requestPermission().then((function(t){\"granted\"===t?(e.el.emit(\"deviceorientationpermissiongranted\"),e.permissionGranted=!0):e.el.emit(\"deviceorientationpermissionrejected\"),e.remove()})).catch(console.error)}})},1277:(e,t,n)=>{var i=n(3515).registerComponent;e.exports.Component=i(\"embedded\",{dependencies:[\"vr-mode-ui\"],schema:{default:!0},update:function(){var e=this.el,t=e.querySelector(\".a-enter-vr\");!0===this.data?(t&&t.classList.add(\"embedded\"),e.removeFullScreenStyles()):(t&&t.classList.remove(\"embedded\"),e.addFullScreenStyles())}})},3638:(e,t,n)=>{var i=n(3515).registerComponent,r=n(2666),s=n(4219)(\"components:fog:warn\");e.exports.Component=i(\"fog\",{schema:{color:{type:\"color\",default:\"#000\"},density:{default:25e-5},far:{default:1e3,min:0},near:{default:1,min:0},type:{default:\"linear\",oneOf:[\"linear\",\"exponential\"]}},update:function(){var e=this.data,t=this.el,n=this.el.object3D.fog;if(t.isScene)return n&&e.type===n.name?void Object.keys(this.schema).forEach((function(t){var i=e[t];\"color\"===t&&(i=new r.Color(i)),n[t]=i})):(t.object3D.fog=function(e){var t;return(t=\"exponential\"===e.type?new r.FogExp2(e.color,e.density):new r.Fog(e.color,e.near,e.far)).name=e.type,t}(e),void t.systems.material.updateMaterials());s(\"Fog component can only be applied to \u003Ca-scene>\")},remove:function(){var e=this.el.object3D.fog;e&&(e.far=0,e.near=.1)}})},3969:(e,t,n)=>{var i,r=n(8309).AFRAME_INJECTED,s=n(4147),o=n(3515).registerComponent,a=n(8903),l=\"https://unpkg.com/aframe-inspector@\"+((i=s.version.split(\".\"))[2]=\"x\",i.join(\".\")+\"/dist/aframe-inspector.min.js\");e.exports.Component=o(\"inspector\",{schema:{url:{default:l}},init:function(){this.firstPlay=!0,this.onKeydown=this.onKeydown.bind(this),this.onMessage=this.onMessage.bind(this),this.initOverlay(),window.addEventListener(\"keydown\",this.onKeydown),window.addEventListener(\"message\",this.onMessage)},play:function(){var e;this.firstPlay&&\"false\"!==(e=a.getUrlParameter(\"inspector\"))&&e&&(this.openInspector(),this.firstPlay=!1)},initOverlay:function(){this.loadingMessageEl=document.createElement(\"div\"),this.loadingMessageEl.classList.add(\"a-inspector-loader\"),this.loadingMessageEl.innerHTML='Loading Inspector\u003Cspan class=\"dots\">\u003Cspan>.\u003C/span>\u003Cspan>.\u003C/span>\u003Cspan>.\u003C/span>\u003C/span>'},remove:function(){this.removeEventListeners()},onKeydown:function(e){73===e.keyCode&&(e.ctrlKey&&e.altKey||e.getModifierState(\"AltGraph\"))&&this.openInspector()},showLoader:function(){document.body.appendChild(this.loadingMessageEl)},hideLoader:function(){document.body.removeChild(this.loadingMessageEl)},onMessage:function(e){\"INJECT_AFRAME_INSPECTOR\"===e.data&&this.openInspector()},openInspector:function(e){var t,n=this;AFRAME.INSPECTOR||AFRAME.inspectorInjected?AFRAME.INSPECTOR.open(e):(this.showLoader(),(t=document.createElement(\"script\")).src=this.data.url,t.setAttribute(\"data-name\",\"aframe-inspector\"),t.setAttribute(r,\"\"),t.onload=function(){AFRAME.INSPECTOR.open(e),n.hideLoader(),n.removeEventListeners()},t.onerror=function(){n.loadingMessageEl.innerHTML=\"Error loading Inspector\"},document.head.appendChild(t),AFRAME.inspectorInjected=!0)},removeEventListeners:function(){window.removeEventListener(\"keydown\",this.onKeydown),window.removeEventListener(\"message\",this.onMessage)}})},7445:(e,t,n)=>{var i=n(3515).registerComponent,r=n(8903).shouldCaptureKeyEvent;e.exports.Component=i(\"keyboard-shortcuts\",{schema:{enterVR:{default:!0},exitVR:{default:!0}},init:function(){this.onKeyup=this.onKeyup.bind(this)},update:function(e){var t=this.data;this.enterVREnabled=t.enterVR},play:function(){window.addEventListener(\"keyup\",this.onKeyup,!1)},pause:function(){window.removeEventListener(\"keyup\",this.onKeyup)},onKeyup:function(e){var t=this.el;r(e)&&(this.enterVREnabled&&70===e.keyCode&&t.enterVR(),this.enterVREnabled&&27===e.keyCode&&t.exitVR())}})},4310:(e,t,n)=>{var i=n(4219),r=n(3515).registerComponent,s=i(\"components:pool:warn\");e.exports.Component=r(\"pool\",{schema:{container:{default:\"\"},mixin:{default:\"\"},size:{default:0},dynamic:{default:!1}},multiple:!0,initPool:function(){var e;for(this.availableEls=[],this.usedEls=[],this.data.mixin||s(\"No mixin provided for pool component.\"),this.data.container&&(this.container=document.querySelector(this.data.container),this.container||s(\"Container \"+this.data.container+\" not found.\")),this.container=this.container||this.el,e=0;e\u003Cthis.data.size;++e)this.createEntity()},update:function(e){var t=this.data;e.mixin===t.mixin&&e.size===t.size||this.initPool()},createEntity:function(){var e;(e=document.createElement(\"a-entity\")).play=this.wrapPlay(e.play),e.setAttribute(\"mixin\",this.data.mixin),e.object3D.visible=!1,e.pause(),this.container.appendChild(e),this.availableEls.push(e);var t=this.usedEls;e.addEventListener(\"loaded\",(function(){-1===t.indexOf(e)&&(e.object3DParent=e.object3D.parent,e.object3D.parent.remove(e.object3D))}))},wrapPlay:function(e){var t=this.usedEls;return function(){-1!==t.indexOf(this)&&e.call(this)}},requestEntity:function(){var e;if(0===this.availableEls.length){if(!1===this.data.dynamic)return void s(\"Requested entity from empty pool: \"+this.attrName);s(\"Requested entity from empty pool. This pool is dynamic and will resize automatically. You might want to increase its initial size: \"+this.attrName),this.createEntity()}return e=this.availableEls.shift(),this.usedEls.push(e),e.object3DParent&&(e.object3DParent.add(e.object3D),this.updateRaycasters()),e.object3D.visible=!0,e},returnEntity:function(e){var t=this.usedEls.indexOf(e);if(-1!==t)return this.usedEls.splice(t,1),this.availableEls.push(e),e.object3DParent=e.object3D.parent,e.object3D.parent.remove(e.object3D),this.updateRaycasters(),e.object3D.visible=!1,e.pause(),e;s(\"The returned entity was not previously pooled from \"+this.attrName)},updateRaycasters(){document.querySelectorAll(\"[raycaster]\").forEach((function(e){e.components.raycaster.setDirty()}))}})},5670:(e,t,n)=>{var i=n(3515).registerComponent;e.exports.Component=i(\"reflection\",{schema:{directionalLight:{type:\"selector\"}},init:function(){var e=this;this.cubeRenderTarget=new THREE.WebGLCubeRenderTarget(16),this.cubeCamera=new THREE.CubeCamera(.1,1e3,this.cubeRenderTarget),this.lightingEstimationTexture=new THREE.WebGLCubeRenderTarget(16).texture,this.needsVREnvironmentUpdate=!0;var t=this.el.getAttribute(\"webxr\"),n=t.optionalFeatures;n.includes(\"light-estimation\")||(n.push(\"light-estimation\"),this.el.setAttribute(\"webxr\",t)),this.el.addEventListener(\"enter-vr\",(function(){e.el.renderer.xr.getSession().requestLightProbe&&e.el.is(\"ar-mode\")&&e.startLightProbe()})),this.el.addEventListener(\"exit-vr\",(function(){e.stopLightProbe()})),this.el.object3D.environment=this.cubeRenderTarget.texture},stopLightProbe:function(){this.xrLightProbe=null,this.probeLight&&(this.probeLight.components.light.light.intensity=0),this.needsVREnvironmentUpdate=!0,this.el.object3D.environment=this.cubeRenderTarget.texture},startLightProbe:function(){this.needsLightProbeUpdate=!0},setupLightProbe:function(){var e=this.el.renderer,t=e.xr.getSession(),n=this,i=e.getContext();if(!this.probeLight){var r=document.createElement(\"a-light\");r.setAttribute(\"type\",\"probe\"),r.setAttribute(\"intensity\",0),this.el.appendChild(r),this.probeLight=r}switch(t.preferredReflectionFormat){case\"srgba8\":i.getExtension(\"EXT_sRGB\");break;case\"rgba16f\":i.getExtension(\"OES_texture_half_float\")}this.glBinding=new XRWebGLBinding(t,i),i.getExtension(\"EXT_sRGB\"),i.getExtension(\"OES_texture_half_float\"),t.requestLightProbe().then((function(e){n.xrLightProbe=e,e.addEventListener(\"reflectionchange\",n.updateXRCubeMap.bind(n))})).catch((function(e){console.warn(\"Lighting estimation not supported: \"+e.message),console.warn('Are you missing: webxr=\"optionalFeatures: light-estimation;\" from \u003Ca-scene>?')}))},updateXRCubeMap:function(){var e=this.el.renderer,t=this.glBinding.getReflectionCubeMap(this.xrLightProbe);t&&(e.properties.get(this.lightingEstimationTexture).__webglTexture=t,this.lightingEstimationTexture.needsPMREMUpdate=!0,this.el.object3D.environment=this.lightingEstimationTexture)},tick:function(){var e=this.el.object3D,t=this.el.renderer,n=this.el.frame;if(n&&this.xrLightProbe){var i=n.getLightEstimate(this.xrLightProbe);i&&function(e,t,n,i){var r=Math.max(e.primaryLightIntensity.x,Math.max(e.primaryLightIntensity.y,e.primaryLightIntensity.z));t.sh.fromArray(e.sphericalHarmonicsCoefficients),t.intensity=1,n&&(n.color.setRGB(e.primaryLightIntensity.x/r,e.primaryLightIntensity.y/r,e.primaryLightIntensity.z/r),n.intensity=r,i.copy(e.primaryLightDirection))}(i,this.probeLight.components.light.light,this.data.directionalLight&&this.data.directionalLight.components.light.light,this.data.directionalLight&&this.data.directionalLight.object3D.position)}this.needsVREnvironmentUpdate&&(e.environment=null,this.needsVREnvironmentUpdate=!1,this.cubeCamera.position.set(0,1.6,0),this.cubeCamera.update(t,e),e.environment=this.cubeRenderTarget.texture),this.needsLightProbeUpdate&&n&&(this.setupLightProbe(),this.needsLightProbeUpdate=!1)},remove:function(){this.el.object3D.environment=null,this.probeLight&&this.el.removeChild(this.probeLight)}})},467:(e,t,n)=>{var i=n(3515).registerComponent,r=n(2666),s=[\"attribute vec3 position;\",\"attribute vec2 uv;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 modelViewMatrix;\",\"varying vec2 vUv;\",\"void main() {\",\" vUv = vec2( 1.- uv.x, uv.y );\",\" gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\",\"}\"].join(\"\\n\"),o=[\"precision mediump float;\",\"uniform samplerCube map;\",\"varying vec2 vUv;\",\"#define M_PI 3.141592653589793238462643383279\",\"void main() {\",\" vec2 uv = vUv;\",\" float longitude = uv.x * 2. * M_PI - M_PI + M_PI / 2.;\",\" float latitude = uv.y * M_PI;\",\" vec3 dir = vec3(\",\" - sin( longitude ) * sin( latitude ),\",\" cos( latitude ),\",\" - cos( longitude ) * sin( latitude )\",\" );\",\" normalize( dir );\",\" gl_FragColor = vec4( textureCube( map, dir ).rgb, 1.0 );\",\"}\"].join(\"\\n\");e.exports.Component=i(\"screenshot\",{schema:{width:{default:4096},height:{default:2048},camera:{type:\"selector\"}},init:function(){var e=this.el,t=this;function n(){var n=e.renderer.getContext();n&&(t.cubeMapSize=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),t.material=new r.RawShaderMaterial({uniforms:{map:{type:\"t\",value:null}},vertexShader:s,fragmentShader:o,side:r.DoubleSide}),t.quad=new r.Mesh(new r.PlaneGeometry(1,1),t.material),t.quad.visible=!1,t.camera=new r.OrthographicCamera(-.5,.5,.5,-.5,-1e4,1e4),t.canvas=document.createElement(\"canvas\"),t.ctx=t.canvas.getContext(\"2d\"),e.object3D.add(t.quad),t.onKeyDown=t.onKeyDown.bind(t))}e.renderer?n():e.addEventListener(\"render-target-loaded\",n)},getRenderTarget:function(e,t){return new r.WebGLRenderTarget(e,t,{encoding:this.el.sceneEl.renderer.outputEncoding,minFilter:r.LinearFilter,magFilter:r.LinearFilter,wrapS:r.ClampToEdgeWrapping,wrapT:r.ClampToEdgeWrapping,format:r.RGBAFormat,type:r.UnsignedByteType})},resize:function(e,t){this.quad.scale.set(e,t,1),this.camera.left=-1*e/2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=-1*t/2,this.camera.updateProjectionMatrix(),this.canvas.width=e,this.canvas.height=t},play:function(){window.addEventListener(\"keydown\",this.onKeyDown)},onKeyDown:function(e){var t=83===e.keyCode&&e.ctrlKey&&e.altKey;if(this.data&&t){var n=e.shiftKey?\"equirectangular\":\"perspective\";this.capture(n)}},setCapture:function(e){var t,n,i,s,o=this.el;return\"perspective\"===e?(this.quad.visible=!1,n=this.data.camera&&this.data.camera.components.camera.camera||o.camera,t={width:this.data.width,height:this.data.height}):(n=this.camera,s=new r.WebGLCubeRenderTarget(Math.min(this.cubeMapSize,2048),{format:r.RGBFormat,generateMipmaps:!0,minFilter:r.LinearMipmapLinearFilter,encoding:r.sRGBEncoding}),i=new r.CubeCamera(o.camera.near,o.camera.far,s),o.camera.getWorldPosition(i.position),o.camera.getWorldQuaternion(i.quaternion),i.update(o.renderer,o.object3D),this.quad.material.uniforms.map.value=i.renderTarget.texture,t={width:this.data.width,height:this.data.height},this.quad.visible=!0),{camera:n,size:t,projection:e}},capture:function(e){var t,n=this.el.renderer.xr.enabled,i=this.el.renderer;i.xr.enabled=!1,t=this.setCapture(e),this.renderCapture(t.camera,t.size,t.projection),this.saveCapture(),i.xr.enabled=n},getCanvas:function(e){var t=this.el.renderer.xr.enabled,n=this.el.renderer,i=this.setCapture(e);return n.xr.enabled=!1,this.renderCapture(i.camera,i.size,i.projection),n.xr.enabled=t,this.canvas},renderCapture:function(e,t,n){var i,r,s,o=this.el.renderer.autoClear,a=this.el,l=a.renderer;r=this.getRenderTarget(t.width,t.height),s=new Uint8Array(4*t.width*t.height),this.resize(t.width,t.height),l.autoClear=!0,l.clear(),l.setRenderTarget(r),l.render(a.object3D,e),l.autoClear=o,l.readRenderTargetPixels(r,0,0,t.width,t.height,s),l.setRenderTarget(null),\"perspective\"===n&&(s=this.flipPixelsVertically(s,t.width,t.height)),i=new ImageData(new Uint8ClampedArray(s),t.width,t.height),this.quad.visible=!1,this.ctx.putImageData(i,0,0)},flipPixelsVertically:function(e,t,n){for(var i=e.slice(0),r=0;r\u003Ct;++r)for(var s=0;s\u003Cn;++s)i[4*r+s*t*4]=e[4*r+(n-s)*t*4],i[4*r+1+s*t*4]=e[4*r+1+(n-s)*t*4],i[4*r+2+s*t*4]=e[4*r+2+(n-s)*t*4],i[4*r+3+s*t*4]=e[4*r+3+(n-s)*t*4];return i},saveCapture:function(){this.canvas.toBlob((function(e){var t=\"screenshot-\"+document.title.toLowerCase()+\"-\"+Date.now()+\".png\",n=document.createElement(\"a\"),i=URL.createObjectURL(e);n.href=i,n.setAttribute(\"download\",t),n.innerHTML=\"downloading...\",n.style.display=\"none\",document.body.appendChild(n),setTimeout((function(){n.click(),document.body.removeChild(n)}),1)}),\"image/png\")}})},5834:(e,t,n)=>{var i=n(3515).registerComponent,r=n(1326),s=n(8903);n(9625),n(1543);var o=window.aframeStats,a=s.bind,l=\"a-hidden\",c=window.threeStats;e.exports.Component=i(\"stats\",{schema:{default:!0},init:function(){var e=this.el;\"false\"!==s.getUrlParameter(\"stats\")&&(this.stats=function(e){var t=new c(e.renderer),n=new o(e),i=e.isMobile?[]:[t,n];return new r({css:[],values:{fps:{caption:\"fps\",below:30}},groups:[{caption:\"Framerate\",values:[\"fps\",\"raf\"]}],plugins:i})}(e),this.statsEl=document.querySelector(\".rs-base\"),this.hideBound=a(this.hide,this),this.showBound=a(this.show,this),e.addEventListener(\"enter-vr\",this.hideBound),e.addEventListener(\"exit-vr\",this.showBound))},update:function(){if(this.stats)return this.data?this.show():this.hide()},remove:function(){this.el.removeEventListener(\"enter-vr\",this.hideBound),this.el.removeEventListener(\"exit-vr\",this.showBound),this.statsEl&&this.statsEl.parentNode.removeChild(this.statsEl)},tick:function(){var e=this.stats;e&&(e(\"rAF\").tick(),e(\"FPS\").frame(),e().update())},hide:function(){this.statsEl.classList.add(l)},show:function(){this.statsEl.classList.remove(l)}})},2772:(e,t,n)=>{var i=n(3515).registerComponent,r=n(8309),s=n(8903),o=s.bind,a=\"a-hidden\";function l(e){e.addEventListener(\"touchstart\",(function(){e.classList.remove(\"resethover\")})),e.addEventListener(\"touchend\",(function(){e.classList.add(\"resethover\")}))}e.exports.Component=i(\"vr-mode-ui\",{dependencies:[\"canvas\"],schema:{enabled:{default:!0},cardboardModeEnabled:{default:!1},enterVRButton:{default:\"\"},enterARButton:{default:\"\"}},init:function(){var e=this,t=this.el;\"false\"!==s.getUrlParameter(\"ui\")&&(this.insideLoader=!1,this.enterVREl=null,this.enterAREl=null,this.orientationModalEl=null,this.bindMethods(),t.addEventListener(\"enter-vr\",this.updateEnterInterfaces),t.addEventListener(\"exit-vr\",this.updateEnterInterfaces),t.addEventListener(\"update-vr-devices\",this.updateEnterInterfaces),window.addEventListener(\"message\",(function(t){\"loaderReady\"===t.data.type&&(e.insideLoader=!0,e.remove())})),window.addEventListener(\"orientationchange\",this.toggleOrientationModalIfNeeded))},bindMethods:function(){this.onEnterVRButtonClick=o(this.onEnterVRButtonClick,this),this.onEnterARButtonClick=o(this.onEnterARButtonClick,this),this.onModalClick=o(this.onModalClick,this),this.toggleOrientationModalIfNeeded=o(this.toggleOrientationModalIfNeeded,this),this.updateEnterInterfaces=o(this.updateEnterInterfaces,this)},onModalClick:function(){this.el.exitVR()},onEnterVRButtonClick:function(){this.el.enterVR()},onEnterARButtonClick:function(){this.el.enterAR()},update:function(){var e,t,n,i=this.data,o=this.el;if(!i.enabled||this.insideLoader||\"false\"===s.getUrlParameter(\"ui\"))return this.remove();this.enterVREl||this.enterAREl||this.orientationModalEl||(i.enterVRButton?(this.enterVREl=document.querySelector(i.enterVRButton),this.enterVREl.addEventListener(\"click\",this.onEnterVRButtonClick)):(this.enterVREl=(e=this.onEnterVRButtonClick,(n=document.createElement(\"div\")).classList.add(\"a-enter-vr\"),n.setAttribute(r.AFRAME_INJECTED,\"\"),(t=document.createElement(\"button\")).className=\"a-enter-vr-button\",t.setAttribute(\"title\",\"Enter VR mode with a headset or fullscreen without\"),t.setAttribute(r.AFRAME_INJECTED,\"\"),s.device.isMobile()&&l(t),n.appendChild(t),t.addEventListener(\"click\",(function(t){e(),t.stopPropagation()})),n),o.appendChild(this.enterVREl)),i.enterARButton?(this.enterAREl=document.querySelector(i.enterARButton),this.enterAREl.addEventListener(\"click\",this.onEnterARButtonClick)):(this.enterAREl=function(e){var t,n;return(n=document.createElement(\"div\")).classList.add(\"a-enter-ar\"),n.setAttribute(r.AFRAME_INJECTED,\"\"),(t=document.createElement(\"button\")).className=\"a-enter-ar-button\",t.setAttribute(\"title\",\"Enter AR mode with a headset or handheld device.\"),t.setAttribute(r.AFRAME_INJECTED,\"\"),s.device.isMobile()&&l(t),n.appendChild(t),t.addEventListener(\"click\",(function(t){e(),t.stopPropagation()})),n}(this.onEnterARButtonClick),o.appendChild(this.enterAREl)),this.orientationModalEl=function(e){var t=document.createElement(\"div\");t.className=\"a-orientation-modal\",t.classList.add(a),t.setAttribute(r.AFRAME_INJECTED,\"\");var n=document.createElement(\"button\");return n.setAttribute(r.AFRAME_INJECTED,\"\"),n.innerHTML=\"Exit VR\",n.addEventListener(\"click\",e),t.appendChild(n),t}(this.onModalClick),o.appendChild(this.orientationModalEl),this.updateEnterInterfaces())},remove:function(){[this.enterVREl,this.enterAREl,this.orientationModalEl].forEach((function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})),this.enterVREl=void 0,this.enterAREl=void 0,this.orientationModalEl=void 0},updateEnterInterfaces:function(){this.toggleEnterVRButtonIfNeeded(),this.toggleEnterARButtonIfNeeded(),this.toggleOrientationModalIfNeeded()},toggleEnterVRButtonIfNeeded:function(){var e=this.el;this.enterVREl&&(e.is(\"vr-mode\")||(e.isMobile||s.device.isMobileDeviceRequestingDesktopSite())&&!this.data.cardboardModeEnabled&&!s.device.checkVRSupport()?this.enterVREl.classList.add(a):(s.device.checkVRSupport()||this.enterVREl.classList.add(\"fullscreen\"),this.enterVREl.classList.remove(a)))},toggleEnterARButtonIfNeeded:function(){var e=this.el;this.enterAREl&&(e.is(\"vr-mode\")||!s.device.checkARSupport()?this.enterAREl.classList.add(a):this.enterAREl.classList.remove(a))},toggleOrientationModalIfNeeded:function(){var e=this.el,t=this.orientationModalEl;t&&e.isMobile&&(!s.device.isLandscape()&&e.is(\"vr-mode\")?t.classList.remove(a):t.classList.add(a))}})},1684:(e,t,n)=>{var i=n(3515),r=n(2666),s=n(7629),o=i.registerComponent;e.exports.Component=o(\"shadow\",{schema:{cast:{default:!0},receive:{default:!0}},init:function(){this.onMeshChanged=s(this.update,this),this.el.addEventListener(\"object3dset\",this.onMeshChanged),this.system.setShadowMapEnabled(!0)},update:function(){var e=this.data;this.updateDescendants(e.cast,e.receive)},remove:function(){this.el.removeEventListener(\"object3dset\",this.onMeshChanged),this.updateDescendants(!1,!1)},updateDescendants:function(e,t){var n=this.el.sceneEl;this.el.object3D.traverse((function(i){if(i instanceof r.Mesh&&(i.castShadow=e,i.receiveShadow=t,n.hasLoaded&&i.material))for(var s=Array.isArray(i.material)?i.material:[i.material],o=0;o\u003Cs.length;o++)s[o].needsUpdate=!0}))}})},5538:(e,t,n)=>{var i=n(3515).registerComponent,r=n(4219),s=n(2666),o=r(\"components:sound:warn\");e.exports.Component=i(\"sound\",{schema:{autoplay:{default:!1},distanceModel:{default:\"inverse\",oneOf:[\"linear\",\"inverse\",\"exponential\"]},loop:{default:!1},maxDistance:{default:1e4},on:{default:\"\"},poolSize:{default:1},positional:{default:!0},refDistance:{default:1},rolloffFactor:{default:1},src:{type:\"audio\"},volume:{default:1}},multiple:!0,init:function(){var e=this;this.listener=null,this.audioLoader=new s.AudioLoader,this.pool=new s.Group,this.loaded=!1,this.mustPlay=!1,this.playSoundBound=function(){e.playSound()}},update:function(e){var t,n,i=this.data,r=i.src!==e.src;if(r){if(!i.src)return;this.setupSound()}for(t=0;t\u003Cthis.pool.children.length;t++)n=this.pool.children[t],i.positional&&(n.setDistanceModel(i.distanceModel),n.setMaxDistance(i.maxDistance),n.setRefDistance(i.refDistance),n.setRolloffFactor(i.rolloffFactor)),n.setLoop(i.loop),n.setVolume(i.volume),n.isPaused=!1;if(i.on!==e.on&&this.updateEventListener(e.on),r){var o=this;this.loaded=!1,this.audioLoader.load(i.src,(function(e){for(t=0;t\u003Co.pool.children.length;t++)(n=o.pool.children[t]).setBuffer(e);o.loaded=!0,s.Cache.remove(i.src),(o.data.autoplay||o.mustPlay)&&o.playSound(),o.el.emit(\"sound-loaded\",o.evtDetail,!1)}))}},pause:function(){this.stopSound(),this.removeEventListener()},play:function(){this.data.autoplay&&this.playSound(),this.updateEventListener()},remove:function(){var e;this.removeEventListener(),this.el.getObject3D(this.attrName)&&this.el.removeObject3D(this.attrName);try{for(e=0;e\u003Cthis.pool.children.length;e++)this.pool.children[e].disconnect()}catch(e){o(\"Audio source not properly disconnected\")}},updateEventListener:function(e){var t=this.el;e&&t.removeEventListener(e,this.playSoundBound),t.addEventListener(this.data.on,this.playSoundBound)},removeEventListener:function(){this.el.removeEventListener(this.data.on,this.playSoundBound)},setupSound:function(){var e,t,n=this.el,i=n.sceneEl,r=this;this.pool.children.length>0&&(this.stopSound(),n.removeObject3D(\"sound\"));var o=this.listener=i.audioListener||new s.AudioListener;for(i.audioListener=o,i.camera&&i.camera.add(o),i.addEventListener(\"camera-set-active\",(function(e){e.detail.cameraEl.getObject3D(\"camera\").add(o)})),this.pool=new s.Group,e=0;e\u003Cthis.data.poolSize;e++)t=this.data.positional?new s.PositionalAudio(o):new s.Audio(o),this.pool.add(t);for(n.setObject3D(this.attrName,this.pool),e=0;e\u003Cthis.pool.children.length;e++)(t=this.pool.children[e]).onEnded=function(){this.isPlaying=!1,r.el.emit(\"sound-ended\",r.evtDetail,!1)}},pauseSound:function(){var e,t;for(this.isPlaying=!1,e=0;e\u003Cthis.pool.children.length;e++)(t=this.pool.children[e]).source&&t.source.buffer&&t.isPlaying&&!t.isPaused&&(t.isPaused=!0,t.pause())},playSound:function(e){var t,n,i;if(!this.loaded)return o(\"Sound not loaded yet. It will be played once it finished loading\"),void(this.mustPlay=!0);for(t=!1,this.isPlaying=!0,n=0;n\u003Cthis.pool.children.length;n++)(i=this.pool.children[n]).isPlaying||!i.buffer||t||(e&&e(i),i.play(),i.isPaused=!1,t=!0);t?this.mustPlay=!1:o(\"All the sounds are playing. If you need to play more sounds simultaneously consider increasing the size of pool with the `poolSize` attribute.\",this.el)},stopSound:function(){var e,t;for(this.isPlaying=!1,e=0;e\u003Cthis.pool.children.length;e++){if(!(t=this.pool.children[e]).source||!t.source.buffer)return;t.stop()}}})},6957:(e,t,n)=>{var i=n(6559),r=n(1880),s=n(3515).registerComponent,o=n(9644),a=n(2666),l=n(8903),c=l.debug(\"components:text:error\"),h=o.shaders,u=l.debug(\"components:text:warn\"),d=\"https://cdn.aframe.io/fonts/\",p={aileronsemibold:d+\"Aileron-Semibold.fnt\",dejavu:d+\"DejaVu-sdf.fnt\",exo2bold:d+\"Exo2Bold.fnt\",exo2semibold:d+\"Exo2SemiBold.fnt\",kelsonsans:d+\"KelsonSans.fnt\",monoid:d+\"Monoid.fnt\",mozillavr:d+\"mozillavr.fnt\",roboto:d+\"Roboto-msdf.json\",sourcecodepro:d+\"SourceCodePro.fnt\"},A=[\"roboto\"],f=\"roboto\";e.exports.FONTS=p;var m,g,v,y,E=new function(){var e=this.cache={};this.get=function(t,n){return t in e||(e[t]=n()),e[t]}},b={},x={},w=/^\\w+:/;function C(e,t,n){return e||(.5+t)*n}e.exports.Component=s(\"text\",{multiple:!0,schema:{align:{type:\"string\",default:\"left\",oneOf:[\"left\",\"right\",\"center\"]},alphaTest:{default:.5},anchor:{default:\"center\",oneOf:[\"left\",\"right\",\"center\",\"align\"]},baseline:{default:\"center\",oneOf:[\"top\",\"center\",\"bottom\"]},color:{type:\"color\",default:\"#FFF\"},font:{type:\"string\",default:f},fontImage:{type:\"string\"},height:{type:\"number\"},letterSpacing:{type:\"number\",default:0},lineHeight:{type:\"number\"},negate:{type:\"boolean\",default:!0},opacity:{type:\"number\",default:1},shader:{default:\"sdf\",oneOf:h},side:{default:\"front\",oneOf:[\"front\",\"back\",\"double\"]},tabSize:{default:4},transparent:{default:!0},value:{type:\"string\"},whiteSpace:{default:\"normal\",oneOf:[\"normal\",\"pre\",\"nowrap\"]},width:{type:\"number\"},wrapCount:{type:\"number\",default:40},wrapPixels:{type:\"number\"},xOffset:{type:\"number\",default:0},yOffset:{type:\"number\",default:0},zOffset:{type:\"number\",default:.001}},init:function(){this.shaderData={},this.geometry=i(),this.createOrUpdateMaterial()},update:function(e){var t=this.data,n=this.currentFont;x[t.font]?this.texture=x[t.font]:(this.texture=x[t.font]=new a.Texture,this.texture.anisotropy=16),this.createOrUpdateMaterial(),e.font===t.font?n&&(this.updateGeometry(this.geometry,n),this.updateLayout()):this.updateFont()},remove:function(){this.geometry.dispose(),this.geometry=null,this.el.removeObject3D(this.attrName),this.material.dispose(),this.material=null,this.texture.dispose(),this.texture=null,this.shaderObject&&delete this.shaderObject},createOrUpdateMaterial:function(){var e,t,n,i=this.data,r=this.material,s=this.shaderData;if(n=i.shader,-1!==A.indexOf(i.font)||i.font.indexOf(\"-msdf.\")>=0?n=\"msdf\":i.font in p&&-1===A.indexOf(i.font)&&(n=\"sdf\"),e=(this.shaderObject&&this.shaderObject.name)!==n,s.alphaTest=i.alphaTest,s.color=i.color,s.map=this.texture,s.opacity=i.opacity,s.side=function(e){switch(e){case\"back\":return a.FrontSide;case\"double\":return a.DoubleSide;default:return a.BackSide}}(i.side),s.transparent=i.transparent,s.negate=i.negate,!e)return this.shaderObject.update(s),r.transparent=s.transparent,void(r.side=s.side);t=function(e,t,n){var i,r;return(r=new h[t].Shader).el=e,r.init(n),r.update(n),(i=r.material).transparent=n.transparent,{material:i,shader:r}}(this.el,n,s),this.material=t.material,this.shaderObject=t.shader,this.material.side=s.side,this.mesh&&(this.mesh.material=this.material)},updateFont:function(){var e,t=this.data,n=this.el,i=this.geometry,s=this;t.font||u(\"No font specified. Using the default font.\"),this.mesh&&(this.mesh.visible=!1),e=this.lookupFont(t.font||f)||t.font,E.get(e,(function(){return n=e,i=t.yOffset,new Promise((function(e,t){r(n,(function(r,s){if(r)return c(\"Error loading font\",n),void t(r);n.indexOf(\"/Roboto-msdf.json\")>=0&&(i=30),i&&s.chars.map((function(e){e.yoffset+=i})),e(s)}))}));var n,i})).then((function(r){var o;if(1!==r.pages.length)throw new Error(\"Currently only single-page bitmap fonts are supported.\");b[e]||(r.widthFactor=b[r]=function(e){var t=0,n=0,i=0;return e.chars.map((function(e){t+=e.xadvance,e.id>=48&&e.id\u003C=57&&(i++,n+=e.xadvance)})),i?n/i:t/e.chars.length}(r)),s.currentFont=r,o=s.getFontImageSrc(),E.get(o,(function(){return e=o,new Promise((function(t,n){(new a.ImageLoader).load(e,(function(e){t(e)}),void 0,(function(){c(\"Error loading font image\",e),n(null)}))}));var e})).then((function(e){var o=s.texture;o&&(o.image=e,o.needsUpdate=!0,x[t.font]=o,s.texture=o,s.initMesh(),s.currentFont=r,s.updateGeometry(i,r),s.updateLayout(),s.mesh.visible=!0,n.emit(\"textfontset\",{font:t.font,fontObj:r}))})).catch((function(e){c(e.message),c(e.stack)}))})).catch((function(e){c(e.message),c(e.stack)}))},initMesh:function(){this.mesh||(this.mesh=new a.Mesh(this.geometry,this.material),this.el.setObject3D(this.attrName,this.mesh))},getFontImageSrc:function(){if(this.data.fontImage)return this.data.fontImage;var e=this.lookupFont(this.data.font||f)||this.data.font,t=this.currentFont.pages[0];return t.match(w)&&0!==t.indexOf(\"http\")?e.replace(/(\\.fnt)|(\\.json)/,\".png\"):a.LoaderUtils.extractUrlBase(e)+t},updateLayout:function(){var e,t,n,i,r,s,o,a,l,c=this.el,h=this.data,u=this.geometry,d=this.mesh;if(d&&u.layout){if(n=c.getAttribute(\"geometry\"),i=(s=(o=h.width||n&&n.width||1)/C(h.wrapPixels,h.wrapCount,this.currentFont.widthFactor))*((r=u.layout).height+r.descender),n&&\"plane\"===n.primitive&&(n.width||c.setAttribute(\"geometry\",\"width\",o),n.height||c.setAttribute(\"geometry\",\"height\",i)),\"left\"===(e=\"align\"===h.anchor?h.align:h.anchor))a=0;else if(\"right\"===e)a=-1*r.width;else{if(\"center\"!==e)throw new TypeError(\"Invalid text.anchor property value\",e);a=-1*r.width/2}if(\"bottom\"===(t=h.baseline))l=0;else if(\"top\"===t)l=-1*r.height+r.ascender;else{if(\"center\"!==t)throw new TypeError(\"Invalid text.baseline property value\",t);l=-1*r.height/2}d.position.x=a*s+h.xOffset,d.position.y=l*s,d.position.z=h.zOffset,d.scale.set(s,-1*s,s)}},lookupFont:function(e){return p[e]},updateGeometry:(m={},g={},v=/\\\\n/g,y=/\\\\t/g,function(e,t){var n=this.data;g.font=t,g.lineHeight=n.lineHeight&&isFinite(n.lineHeight)?n.lineHeight:t.common.lineHeight,g.text=n.value.toString().replace(v,\"\\n\").replace(y,\"\\t\"),g.width=C(n.wrapPixels,n.wrapCount,t.widthFactor),e.update(l.extend(m,n,g))})})},1125:(e,t,n)=>{var i=n(3515).registerComponent,r=n(6600),s=n(8309).DEFAULT_CAMERA_HEIGHT,o=n(2666),a=n(8309).DEFAULT_HANDEDNESS,l={touches:[]};e.exports.Component=i(\"tracked-controls-webvr\",{schema:{autoHide:{default:!0},controller:{default:0},id:{type:\"string\",default:\"\"},hand:{type:\"string\",default:\"\"},idPrefix:{type:\"string\",default:\"\"},orientationOffset:{type:\"vec3\"},armModel:{default:!1},headElement:{type:\"selector\"}},init:function(){this.axis=this.el.components[\"tracked-controls\"].axis=[0,0,0],this.buttonStates=this.el.components[\"tracked-controls\"].buttonStates={},this.changedAxes=[],this.targetControllerNumber=this.data.controller,this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes},this.deltaControllerPosition=new o.Vector3,this.controllerQuaternion=new o.Quaternion,this.controllerEuler=new o.Euler,this.updateGamepad(),this.buttonEventDetails={}},tick:function(e,t){var n=this.el.getObject3D(\"mesh\");n&&n.update&&n.update(t/1e3),this.updateGamepad(),this.updatePose(),this.updateButtons()},defaultUserHeight:function(){return s},getHeadElement:function(){return this.data.headElement||this.el.sceneEl.camera.el},updateGamepad:function(){var e=this.data,t=r.findMatchingControllerWebVR(this.system.controllers,e.id,e.idPrefix,e.hand,e.controller);this.controller=t,this.el.components[\"tracked-controls\"].controller=t,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},applyArmModel:function(e){var t,n,i,r,s=this.controller,o=this.controllerEuler,l=this.controllerQuaternion,c=this.deltaControllerPosition;n=this.getHeadElement().object3D,r=this.defaultUserHeight(),i=s.pose,t=(s?s.hand:void 0)||a,e.copy(n.position),c.set(.175*(\"left\"===t?-1:\"right\"===t?1:0),-.3,-.03),c.multiplyScalar(r),c.applyAxisAngle(n.up,n.rotation.y),e.add(c),c.set(0,0,-.175),c.multiplyScalar(r),i.orientation?l.fromArray(i.orientation):l.copy(n.quaternion),o.setFromQuaternion(l),o.set(o.x,o.y,0),c.applyEuler(o),e.add(c)},updatePose:function(){var e,t,n=this.controller,i=this.data,r=this.el.object3D,s=this.system.vrDisplay;n&&((e=n.pose).position?r.position.fromArray(e.position):i.armModel&&this.applyArmModel(r.position),e.orientation&&r.quaternion.fromArray(e.orientation),s&&e.position&&(t=this.el.sceneEl.renderer.xr.getStandingMatrix(),r.matrix.compose(r.position,r.quaternion,r.scale),r.matrix.multiplyMatrices(t,r.matrix),r.matrix.decompose(r.position,r.quaternion,r.scale)),r.rotateX(this.data.orientationOffset.x*o.MathUtils.DEG2RAD),r.rotateY(this.data.orientationOffset.y*o.MathUtils.DEG2RAD),r.rotateZ(this.data.orientationOffset.z*o.MathUtils.DEG2RAD))},updateButtons:function(){var e,t,n=this.controller;if(n){for(t=0;t\u003Cn.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(\"buttonchanged\",this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.axes,i=this.axis,r=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e\u003Cn.length;++e)r.push(i[e]!==n[e]),r[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e\u003Cn.length;e++)this.axis.push(n[e]);return this.el.emit(\"axismove\",this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,i=this.buttonStates[e];return t.pressed!==i.pressed&&(n=t.pressed?\"buttondown\":\"buttonup\",this.el.emit(n,this.buttonEventDetails[e],!1),i.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,i=this.buttonStates[e];return t.touched!==i.touched&&(n=t.touched?\"touchstart\":\"touchend\",this.el.emit(n,this.buttonEventDetails[e],!1,l),i.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},8666:(e,t,n)=>{var i=n(6600),r=n(3515).registerComponent;e.exports.Component=r(\"tracked-controls-webxr\",{schema:{id:{type:\"string\",default:\"\"},hand:{type:\"string\",default:\"\"},handTrackingEnabled:{default:!1},index:{type:\"int\",default:-1},iterateControllerProfiles:{default:!1},space:{type:\"string\",oneOf:[\"targetRaySpace\",\"gripSpace\"],default:\"gripSpace\"}},init:function(){this.updateController=this.updateController.bind(this),this.buttonEventDetails={},this.buttonStates=this.el.components[\"tracked-controls\"].buttonStates={},this.axis=this.el.components[\"tracked-controls\"].axis=[0,0,0],this.changedAxes=[],this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes}},update:function(){this.updateController()},play:function(){var e=this.el.sceneEl;this.updateController(),e.addEventListener(\"controllersupdated\",this.updateController)},pause:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.updateController)},isControllerPresent:function(e){return!(!this.controller||this.controller.gamepad||\"none\"!==e.inputSource.handedness&&e.inputSource.handedness!==this.data.hand)},updateController:function(){this.controller=i.findMatchingControllerWebXR(this.system.controllers,this.data.id,this.data.hand,this.data.index,this.data.iterateControllerProfiles,this.data.handTrackingEnabled),this.el.components[\"tracked-controls\"].controller=this.controller,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},tick:function(){var e=this.el.sceneEl,t=this.controller,n=e.frame;t&&e.frame&&this.system.referenceSpace&&(t.hand||(this.pose=n.getPose(t[this.data.space],this.system.referenceSpace),this.updatePose(),this.updateButtons()))},updatePose:function(){var e=this.el.object3D,t=this.pose;t&&(e.matrix.elements=t.transform.matrix,e.matrix.decompose(e.position,e.rotation,e.scale))},updateButtons:function(){var e,t,n,i=this.controller;if(i&&i.gamepad){for(n=i.gamepad,t=0;t\u003Cn.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(\"buttonchanged\",this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.gamepad.axes,i=this.axis,r=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e\u003Cn.length;++e)r.push(i[e]!==n[e]),r[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e\u003Cn.length;e++)this.axis.push(n[e]);return this.el.emit(\"axismove\",this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,i=this.buttonStates[e];return t.pressed!==i.pressed&&(n=t.pressed?\"buttondown\":\"buttonup\",this.el.emit(n,this.buttonEventDetails[e],!1),i.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,i=this.buttonStates[e];return t.touched!==i.touched&&(n=t.touched?\"touchstart\":\"touchend\",this.el.emit(n,this.buttonEventDetails[e],!1),i.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},2761:(e,t,n)=>{var i=n(3515).registerComponent;e.exports.Component=i(\"tracked-controls\",{schema:{autoHide:{default:!0},controller:{default:-1},id:{type:\"string\",default:\"\"},hand:{type:\"string\",default:\"\"},idPrefix:{type:\"string\",default:\"\"},handTrackingEnabled:{default:!1},orientationOffset:{type:\"vec3\"},armModel:{default:!1},headElement:{type:\"selector\"},iterateControllerProfiles:{default:!1},space:{type:\"string\",oneOf:[\"targetRaySpace\",\"gripSpace\"],default:\"targetRaySpace\"}},update:function(){var e=this.data,t=this.el;t.sceneEl.hasWebXR?t.setAttribute(\"tracked-controls-webxr\",{id:e.id,hand:e.hand,index:e.controller,iterateControllerProfiles:e.iterateControllerProfiles,handTrackingEnabled:e.handTrackingEnabled,space:e.space}):t.setAttribute(\"tracked-controls-webvr\",e)}})},3798:(e,t,n)=>{var i=n(3515).registerComponent,r=n(7629),s=n(2666),o=n(6600),a=o.checkControllerPresentAndSetup,l=o.emitIfAxesChanged,c=o.onButtonEvent,h=\"https://cdn.aframe.io/controllers/valve/index/valve-index-\",u={left:h+\"left.glb\",right:h+\"right.glb\"},d=\"valve\",p=n(8903).device.isWebXRAvailable,A={left:{_x:Math.PI/3,_y:0,_z:0,_order:\"XYZ\"},right:{_x:Math.PI/3,_y:0,_z:0,_order:\"XYZ\"}},f=p?A:{left:{_x:.692295102620542,_y:-.0627618864318427,_z:-.06265893149611756,_order:\"XYZ\"},right:{_x:.6484021229942998,_y:-.032563619881892894,_z:-.1327973171917482,_order:\"XYZ\"}},m=p?{left:{x:0,y:-.05,z:.06},right:{x:0,y:-.05,z:.06}}:{left:{x:-.00023692678902063457,y:.04724540367838371,z:-.061959880395271096},right:{x:.002471558599671131,y:.055765208987076195,z:-.061068168708348844}};e.exports.Component=i(\"valve-index-controls\",{schema:{hand:{default:\"left\"},buttonColor:{type:\"color\",default:\"#FAFAFA\"},buttonHighlightColor:{type:\"color\",default:\"#22D1EE\"},model:{default:!0},orientationOffset:{type:\"vec3\"}},mapping:{axes:{trackpad:[0,1],thumbstick:[2,3]},buttons:[\"trigger\",\"grip\",\"trackpad\",\"thumbstick\",\"abutton\"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,\"down\",e)},this.onButtonUp=function(t){c(t.detail.id,\"up\",e)},this.onButtonTouchEnd=function(t){c(t.detail.id,\"touchend\",e)},this.onButtonTouchStart=function(t){c(t.detail.id,\"touchstart\",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"model-loaded\",this.onModelLoaded),e.addEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"model-loaded\",this.onModelLoaded),e.removeEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t=\"right\"===e.hand?0:\"left\"===e.hand?1:2;a(this,d,{index:t,iterateControllerProfiles:!0,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{idPrefix:d,controller:\"right\"===t.hand?1:\"left\"===t.hand?0:2,hand:t.hand,orientationOffset:t.orientationOffset}),this.loadModel()},loadModel:function(){var e=this.data;e.model&&this.el.setAttribute(\"gltf-model\",\"\"+u[e.hand])},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],i=this.buttonMeshes;n&&(\"trigger\"===n&&(t=e.detail.state.value,i&&i.trigger&&(i.trigger.rotation.x=this.triggerOriginalRotationX-t*(Math.PI/40))),this.el.emit(n+\"changed\",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,i=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName(\"leftgrip\"),right:n.getObjectByName(\"rightgrip\")},t.menu=n.getObjectByName(\"menubutton\"),t.system=n.getObjectByName(\"systembutton\"),t.trackpad=n.getObjectByName(\"touchpad\"),t.trigger=n.getObjectByName(\"trigger\"),this.triggerOriginalRotationX=t.trigger.rotation.x,Object.keys(t).forEach((function(e){i.setButtonColor(e,i.data.buttonColor)})),n.position.copy(m[this.data.hand]),n.rotation.copy(f[this.data.hand]),this.el.emit(\"controllermodelready\",{name:\"valve-index-controlls\",model:this.data.model,rayOrigin:new s.Vector3(0,0,0)}))},onAxisMoved:function(e){l(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf(\"touch\")||(n=\"up\"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){}})},8057:(e,t,n)=>{var i=n(3515).registerComponent;e.exports.Component=i(\"visible\",{schema:{default:!0},update:function(){this.el.object3D.visible=this.data}})},8367:(e,t,n)=>{var i=n(3515).registerComponent,r=n(7629),s=n(6600),o=s.checkControllerPresentAndSetup,a=s.emitIfAxesChanged,l=s.onButtonEvent,c=n(8903).device.isWebXRAvailable,h=c?\"htc-vive\":\"OpenVR \",u=c?{axes:{thumbstick:[0,1]},buttons:[\"trigger\",\"grip\",\"trackpad\",\"none\",\"menu\"]}:{axes:{trackpad:[0,1]},buttons:[\"trackpad\",\"trigger\",\"grip\",\"menu\",\"system\"]};e.exports.Component=i(\"vive-controls\",{schema:{hand:{default:\"left\"},buttonColor:{type:\"color\",default:\"#FAFAFA\"},buttonHighlightColor:{type:\"color\",default:\"#22D1EE\"},model:{default:!0},orientationOffset:{type:\"vec3\"}},mapping:u,init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,\"down\",e)},this.onButtonUp=function(t){l(t.detail.id,\"up\",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,\"touchend\",e)},this.onButtonTouchStart=function(t){l(t.detail.id,\"touchstart\",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex=\"right\"===e.hand?0:\"left\"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"model-loaded\",this.onModelLoaded),e.addEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"model-loaded\",this.onModelLoaded),e.removeEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;o(this,h,{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{idPrefix:h,hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute(\"obj-model\",{obj:\"https://cdn.aframe.io/controllers/vive/vr_controller_vive.obj\",mtl:\"https://cdn.aframe.io/controllers/vive/vr_controller_vive.mtl\"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],i=this.buttonMeshes;n&&(\"trigger\"===n&&(t=e.detail.state.value,i&&i.trigger&&(i.trigger.rotation.x=-t*(Math.PI/12))),this.el.emit(n+\"changed\",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,i=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName(\"leftgrip\"),right:n.getObjectByName(\"rightgrip\")},t.menu=n.getObjectByName(\"menubutton\"),t.system=n.getObjectByName(\"systembutton\"),t.trackpad=n.getObjectByName(\"touchpad\"),t.trigger=n.getObjectByName(\"trigger\"),Object.keys(t).forEach((function(e){i.setButtonColor(e,i.data.buttonColor)})),n.position.set(0,-.015,.04))},onAxisMoved:function(e){a(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf(\"touch\")||(n=\"up\"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){var n=this.buttonMeshes,i=this.rendererSystem;if(n){if(\"grip\"===e)return n.grip.left.material.color.set(t),n.grip.right.material.color.set(t),i.applyColorCorrection(n.grip.left.material.color),void i.applyColorCorrection(n.grip.right.material.color);n[e].material.color.set(t),i.applyColorCorrection(n[e].material.color)}}})},9507:(e,t,n)=>{var i=n(3515).registerComponent,r=n(7629),s=n(6600),o=s.checkControllerPresentAndSetup,a=s.emitIfAxesChanged,l=s.onButtonEvent,c=\"HTC Vive Focus\";e.exports.Component=i(\"vive-focus-controls\",{schema:{hand:{default:\"\"},buttonTouchedColor:{type:\"color\",default:\"#BBBBBB\"},buttonHighlightColor:{type:\"color\",default:\"#7A7A7A\"},model:{default:!0},orientationOffset:{type:\"vec3\"},armModel:{default:!0}},mapping:{axes:{trackpad:[0,1]},buttons:[\"trackpad\",\"trigger\"]},bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,\"down\",e)},this.onButtonUp=function(t){l(t.detail.id,\"up\",e)},this.onButtonTouchStart=function(t){l(t.detail.id,\"touchstart\",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,\"touchend\",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"model-loaded\",this.onModelLoaded),e.addEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!0,this.addControllersUpdateListener()},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"model-loaded\",this.onModelLoaded),e.removeEventListener(\"axismove\",this.onAxisMoved),this.controllerEventsActive=!1,this.removeControllersUpdateListener()},checkIfControllerPresent:function(){o(this,c,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute(\"tracked-controls\",{armModel:t.armModel,idPrefix:c,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute(\"gltf-model\",\"https://cdn.aframe.io/controllers/vive/focus-controller/focus-controller.gltf\")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName(\"BumperKey\"),t.triggerPressed=n.getObjectByName(\"BumperKey_Press\"),t.triggerPressed&&(t.triggerPressed.visible=!1),t.trackpad=n.getObjectByName(\"TouchPad\"),t.trackpadPressed=n.getObjectByName(\"TouchPad_Press\"),t.trackpadPressed&&(t.trackpadPressed.visible=!1))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+\"changed\",e.detail.state)},onAxisMoved:function(e){a(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes,i=e+\"Pressed\";if(n&&n[e]&&n[i]){var r;switch(t){case\"down\":r=this.data.buttonHighlightColor;break;case\"touchstart\":r=this.data.buttonTouchedColor}r&&n[i].material.color.set(r),n[i].visible=!!r,n[e].visible=!r}}})},6296:(e,t,n)=>{var i,r,s=n(8309).keyboardevent.KEYCODE_TO_CODE,o=n(3515).registerComponent,a=n(2666),l=n(8903),c=l.bind,h=l.shouldCaptureKeyEvent,u=1e-5,d=[\"KeyW\",\"KeyA\",\"KeyS\",\"KeyD\",\"ArrowUp\",\"ArrowLeft\",\"ArrowRight\",\"ArrowDown\"];e.exports.Component=o(\"wasd-controls\",{schema:{acceleration:{default:65},adAxis:{default:\"x\",oneOf:[\"x\",\"y\",\"z\"]},adEnabled:{default:!0},adInverted:{default:!1},enabled:{default:!0},fly:{default:!1},wsAxis:{default:\"z\",oneOf:[\"x\",\"y\",\"z\"]},wsEnabled:{default:!0},wsInverted:{default:!1}},init:function(){this.keys={},this.easing=1.1,this.velocity=new a.Vector3,this.onBlur=c(this.onBlur,this),this.onContextMenu=c(this.onContextMenu,this),this.onFocus=c(this.onFocus,this),this.onKeyDown=c(this.onKeyDown,this),this.onKeyUp=c(this.onKeyUp,this),this.onVisibilityChange=c(this.onVisibilityChange,this),this.attachVisibilityEventListeners()},tick:function(e,t){var n=this.data,i=this.el,r=this.velocity;(r[n.adAxis]||r[n.wsAxis]||!function(e){var t;for(t in e)return!1;return!0}(this.keys))&&(t/=1e3,this.updateVelocity(t),(r[n.adAxis]||r[n.wsAxis])&&i.object3D.position.add(this.getMovementVector(t)))},update:function(e){e.adAxis!==this.data.adAxis&&(this.velocity[e.adAxis]=0),e.wsAxis!==this.data.wsAxis&&(this.velocity[e.wsAxis]=0)},remove:function(){this.removeKeyEventListeners(),this.removeVisibilityEventListeners()},play:function(){this.attachKeyEventListeners()},pause:function(){this.keys={},this.removeKeyEventListeners()},updateVelocity:function(e){var t,n,i,r,s,o=this.data,a=this.keys,l=this.velocity;if(n=o.adAxis,r=o.wsAxis,e>.2)return l[n]=0,void(l[r]=0);var c=Math.pow(1/this.easing,60*e);0!==l[n]&&(l[n]=l[n]*c),0!==l[r]&&(l[r]=l[r]*c),Math.abs(l[n])\u003Cu&&(l[n]=0),Math.abs(l[r])\u003Cu&&(l[r]=0),o.enabled&&(t=o.acceleration,o.adEnabled&&(i=o.adInverted?-1:1,(a.KeyA||a.ArrowLeft)&&(l[n]-=i*t*e),(a.KeyD||a.ArrowRight)&&(l[n]+=i*t*e)),o.wsEnabled&&(s=o.wsInverted?-1:1,(a.KeyW||a.ArrowUp)&&(l[r]-=s*t*e),(a.KeyS||a.ArrowDown)&&(l[r]+=s*t*e)))},getMovementVector:(i=new a.Vector3(0,0,0),r=new a.Euler(0,0,0,\"YXZ\"),function(e){var t,n=this.el.getAttribute(\"rotation\"),s=this.velocity;return i.copy(s),i.multiplyScalar(e),n?(t=this.data.fly?n.x:0,r.set(a.MathUtils.degToRad(t),a.MathUtils.degToRad(n.y),0),i.applyEuler(r),i):i}),attachVisibilityEventListeners:function(){window.oncontextmenu=this.onContextMenu,window.addEventListener(\"blur\",this.onBlur),window.addEventListener(\"focus\",this.onFocus),document.addEventListener(\"visibilitychange\",this.onVisibilityChange)},removeVisibilityEventListeners:function(){window.removeEventListener(\"blur\",this.onBlur),window.removeEventListener(\"focus\",this.onFocus),document.removeEventListener(\"visibilitychange\",this.onVisibilityChange)},attachKeyEventListeners:function(){window.addEventListener(\"keydown\",this.onKeyDown),window.addEventListener(\"keyup\",this.onKeyUp)},removeKeyEventListeners:function(){window.removeEventListener(\"keydown\",this.onKeyDown),window.removeEventListener(\"keyup\",this.onKeyUp)},onContextMenu:function(){for(var e=Object.keys(this.keys),t=0;t\u003Ce.length;t++)delete this.keys[e[t]]},onBlur:function(){this.pause()},onFocus:function(){this.play()},onVisibilityChange:function(){document.hidden?this.onBlur():this.onFocus()},onKeyDown:function(e){var t;h(e)&&(t=e.code||s[e.keyCode],-1!==d.indexOf(t)&&(this.keys[t]=!0))},onKeyUp:function(e){var t;t=e.code||s[e.keyCode],delete this.keys[t]}})},7872:(e,t,n)=>{var i,r=n(3515).registerComponent,s=n(7629),o=n(6600),a=o.checkControllerPresentAndSetup,l=o.emitIfAxesChanged,c=o.onButtonEvent,h=n(8903),u=h.debug(\"components:windows-motion-controls:debug\"),d=h.debug(\"components:windows-motion-controls:warn\"),p=n(8309).DEFAULT_HANDEDNESS,A={left:\"left.glb\",right:\"right.glb\",default:\"universal.glb\"},f=n(8903).device.isWebXRAvailable,m=/([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/,g=f?\"windows-mixed-reality\":\"Spatial Controller (Spatial Interaction Source) \",v=f?{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:[\"trigger\",\"squeeze\",\"touchpad\",\"thumbstick\",\"menu\"],axisMeshNames:[\"TOUCHPAD_TOUCH_X\",\"TOUCHPAD_TOUCH_X\",\"THUMBSTICK_X\",\"THUMBSTICK_Y\"],buttonMeshNames:{trigger:\"SELECT\",menu:\"MENU\",squeeze:\"GRASP\",thumbstick:\"THUMBSTICK_PRESS\",touchpad:\"TOUCHPAD_PRESS\"},pointingPoseMeshName:\"POINTING_POSE\"}:{axes:{thumbstick:[0,1],trackpad:[2,3]},buttons:[\"thumbstick\",\"trigger\",\"grip\",\"menu\",\"trackpad\"],axisMeshNames:[\"THUMBSTICK_X\",\"THUMBSTICK_Y\",\"TOUCHPAD_TOUCH_X\",\"TOUCHPAD_TOUCH_Y\"],buttonMeshNames:{trigger:\"SELECT\",menu:\"MENU\",grip:\"GRASP\",thumbstick:\"THUMBSTICK_PRESS\",trackpad:\"TOUCHPAD_PRESS\"},pointingPoseMeshName:\"POINTING_POSE\"};e.exports.Component=r(\"windows-motion-controls\",{schema:{hand:{default:p},pair:{default:0},model:{default:!0},hideDisconnected:{default:!0}},mapping:v,bindMethods:function(){this.onModelError=s(this.onModelError,this),this.onModelLoaded=s(this.onModelLoaded,this),this.onControllersUpdate=s(this.onControllersUpdate,this),this.checkIfControllerPresent=s(this.checkIfControllerPresent,this),this.onAxisMoved=s(this.onAxisMoved,this)},init:function(){var e=this,t=this.el;this.onButtonChanged=s(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,\"down\",e)},this.onButtonUp=function(t){c(t.detail.id,\"up\",e)},this.onButtonTouchStart=function(t){c(t.detail.id,\"touchstart\",e)},this.onButtonTouchEnd=function(t){c(t.detail.id,\"touchend\",e)},this.onControllerConnected=function(){e.setModelVisibility(!0)},this.onControllerDisconnected=function(){e.setModelVisibility(!1)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.bindMethods(),this.loadedMeshInfo={buttonMeshes:null,axisMeshes:null},this.rayOrigin={origin:new THREE.Vector3,direction:new THREE.Vector3(0,0,-1),createdFromMesh:!1},t.addEventListener(\"controllerconnected\",this.onControllerConnected),t.addEventListener(\"controllerdisconnected\",this.onControllerDisconnected)},addEventListeners:function(){var e=this.el;e.addEventListener(\"buttonchanged\",this.onButtonChanged),e.addEventListener(\"buttondown\",this.onButtonDown),e.addEventListener(\"buttonup\",this.onButtonUp),e.addEventListener(\"touchstart\",this.onButtonTouchStart),e.addEventListener(\"touchend\",this.onButtonTouchEnd),e.addEventListener(\"axismove\",this.onAxisMoved),e.addEventListener(\"model-error\",this.onModelError),e.addEventListener(\"model-loaded\",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener(\"buttonchanged\",this.onButtonChanged),e.removeEventListener(\"buttondown\",this.onButtonDown),e.removeEventListener(\"buttonup\",this.onButtonUp),e.removeEventListener(\"touchstart\",this.onButtonTouchStart),e.removeEventListener(\"touchend\",this.onButtonTouchEnd),e.removeEventListener(\"axismove\",this.onAxisMoved),e.removeEventListener(\"model-error\",this.onModelError),e.removeEventListener(\"model-loaded\",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,g,{hand:this.data.hand,index:this.data.pair,iterateControllerProfiles:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},updateControllerModel:function(){if(this.data.model&&!this.rayOrigin.createdFromMesh){var e=this.createControllerModelUrl();this.loadModel(e)}else this.modelReady()},createControllerModelUrl:function(e){var t=this.el.components[\"tracked-controls\"],n=t?t.controller:null,i=\"default\",r=this.data.hand;if(n&&!window.hasNativeWebXRImplementation&&(r=n.hand,!e)){var s=n.id.match(m);i=s&&s[0]||i}return\"https://cdn.aframe.io/controllers/microsoft/\"+i+\"/\"+(A[r]||A.default)},injectTrackedControls:function(){var e=this.data;this.el.setAttribute(\"tracked-controls\",{idPrefix:g,controller:e.pair,hand:e.hand,armModel:!1}),this.updateControllerModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener(\"controllersupdated\",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelError:function(e){var t=this.createControllerModelUrl(!0);e.detail.src!==t?(d(\"Failed to load controller model for device, attempting to load default.\"),this.loadModel(t)):d(\"Failed to load default controller model.\")},loadModel:function(e){this.el.setAttribute(\"gltf-model\",\"url(\"+e+\")\")},onModelLoaded:function(e){var t,n,i,r,s=this.controllerModel=e.detail.model,o=this.loadedMeshInfo;if(u(\"Processing model\"),o.buttonMeshes={},o.axisMeshes={},s){for(t=0;t\u003Cthis.mapping.buttons.length;t++)(n=this.mapping.buttonMeshNames[this.mapping.buttons[t]])?(i=s.getObjectByName(n))?(r={index:t,value:a(i,\"VALUE\"),pressed:a(i,\"PRESSED\"),unpressed:a(i,\"UNPRESSED\")}).value&&r.pressed&&r.unpressed?o.buttonMeshes[this.mapping.buttons[t]]=r:d(\"Missing button submesh under mesh with name: \"+n+\"(VALUE: \"+!!r.value+\", PRESSED: \"+!!r.pressed+\", UNPRESSED:\"+!!r.unpressed+\")\"):d(\"Missing button mesh with name: \"+n):u(\"Skipping unknown button at index: \"+t+\" with mapped name: \"+this.mapping.buttons[t]);for(t=0;t\u003Cthis.mapping.axisMeshNames.length;t++)(n=this.mapping.axisMeshNames[t])?(i=s.getObjectByName(n))?(r={index:t,value:a(i,\"VALUE\"),min:a(i,\"MIN\"),max:a(i,\"MAX\")}).value&&r.min&&r.max?o.axisMeshes[t]=r:d(\"Missing axis submesh under mesh with name: \"+n+\"(VALUE: \"+!!r.value+\", MIN: \"+!!r.min+\", MAX:\"+!!r.max+\")\"):d(\"Missing axis mesh with name: \"+n):u(\"Skipping unknown axis at index: \"+t);this.calculateRayOriginFromMesh(s),this.setModelVisibility()}function a(e,t){for(var n=0,i=e.children.length;n\u003Ci;n++){var r=e.children[n];if(r&&r.name===t)return r}}u(\"Model load complete.\")},calculateRayOriginFromMesh:(i=new THREE.Quaternion,function(e){var t;if(this.rayOrigin.origin.set(0,0,0),this.rayOrigin.direction.set(0,0,-1),this.rayOrigin.createdFromMesh=!0,t=e.getObjectByName(this.mapping.pointingPoseMeshName)){var n=e.parent;n&&(e.parent=null,e.updateMatrixWorld(!0),e.parent=n),t.getWorldPosition(this.rayOrigin.origin),t.getWorldQuaternion(i),this.rayOrigin.direction.applyQuaternion(i),n&&e.updateMatrixWorld(!0)}else u(\"Mesh does not contain pointing origin data, defaulting to none.\");this.modelReady()}),lerpAxisTransform:function(){var e=new THREE.Quaternion;return function(t,n){var i=this.loadedMeshInfo.axisMeshes[t];if(i){var r=i.min,s=i.max,o=i.value,a=.5*n+.5;o.setRotationFromQuaternion(e.copy(r.quaternion).slerp(s.quaternion,a)),o.position.lerpVectors(r.position,s.position,a)}}}(),lerpButtonTransform:function(){var e=new THREE.Quaternion;return function(t,n){var i=this.loadedMeshInfo.buttonMeshes[t];if(i){var r=i.unpressed,s=i.pressed,o=i.value;o.setRotationFromQuaternion(e.copy(r.quaternion).slerp(s.quaternion,n)),o.position.lerpVectors(r.position,s.position,n)}}}(),modelReady:function(){this.el.emit(\"controllermodelready\",{name:\"windows-motion-controls\",model:this.data.model,rayOrigin:this.rayOrigin})},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&(this.loadedMeshInfo&&this.loadedMeshInfo.buttonMeshes&&this.lerpButtonTransform(t,e.detail.state.value),this.el.emit(t+\"changed\",e.detail.state))},onAxisMoved:function(e){var t=this.mapping.axisMeshNames.length;if(this.loadedMeshInfo&&this.loadedMeshInfo.axisMeshes)for(var n=0;n\u003Ct;n++)this.lerpAxisTransform(n,e.detail.axis[n]||0);l(this,this.mapping.axes,e)},setModelVisibility:function(e){var t=this.el.getObject3D(\"mesh\");e=void 0!==e?e:this.modelVisible,this.modelVisible=e,t&&(t.visible=e)}})},8309:(e,t,n)=>{e.exports={AFRAME_INJECTED:\"aframe-injected\",DEFAULT_CAMERA_HEIGHT:1.6,DEFAULT_HANDEDNESS:\"right\",keyboardevent:n(5065)}},5065:e=>{e.exports={KEYCODE_TO_CODE:{38:\"ArrowUp\",37:\"ArrowLeft\",40:\"ArrowDown\",39:\"ArrowRight\",87:\"KeyW\",65:\"KeyA\",83:\"KeyS\",68:\"KeyD\"}}},2385:(e,t,n)=>{var i=n(9721).X,r=n(7629),s=n(4219),o=n(2666),a=new o.FileLoader,l=s(\"core:a-assets:warn\");function c(e){if(e.hasAttribute(\"autoplay\")||\"auto\"===e.getAttribute(\"preload\"))return new Promise((function(t,n){if(4===e.readyState)return t();if(e.error)return n();function i(){for(var n=0,i=0;i\u003Ce.buffered.length;i++)n+=e.buffered.end(i)-e.buffered.start(i);n>=e.duration&&(\"VIDEO\"===e.tagName&&o.Cache.add(e.getAttribute(\"src\"),e),t())}e.addEventListener(\"loadeddata\",i,!1),e.addEventListener(\"progress\",i,!1),e.addEventListener(\"error\",n,!1)}))}function h(e){var t=function(e){var t,n,i;if(e.hasAttribute(\"crossorigin\"))return e;if(null!==(t=e.getAttribute(\"src\"))){if(-1===t.indexOf(\"://\"))return e;if((i=(n=t).indexOf(\"://\")>-1?n.split(\"/\")[2]:n.split(\"/\")[0]).substring(0,i.indexOf(\":\"))===window.location.host)return e}return l('Cross-origin element (e.g., \u003Cimg>) was requested without `crossorigin` set. A-Frame will re-request the asset with `crossorigin` attribute set. Please set `crossorigin` on the element (e.g., \u003Cimg crossorigin=\"anonymous\">)',t),e.crossOrigin=\"anonymous\",e.cloneNode(!0)}(e);return t.tagName&&\"video\"===t.tagName.toLowerCase()&&(t.setAttribute(\"playsinline\",\"\"),t.setAttribute(\"webkit-playsinline\",\"\")),t!==e&&(e.parentNode.appendChild(t),e.parentNode.removeChild(e)),t}function u(e){var t=d(e),n=t.lastIndexOf(\".\");return n>=0&&\".glb\"===t.slice(n,e.search(/\\?|#|$/))?\"arraybuffer\":\"text\"}function d(e){var t=document.createElement(\"a\");t.href=e;var n=t.search.replace(/^\\?/,\"\"),i=e.replace(n,\"\").replace(\"?\",\"\");return i.substring(i.lastIndexOf(\"/\")+1)}customElements.define(\"a-assets\",class extends i{constructor(){super(),this.isAssets=!0,this.fileLoader=a,this.timeout=null}connectedCallback(){\"loading\"!==document.readyState?this.doConnectedCallback():document.addEventListener(\"DOMContentLoaded\",this.connectedCallback.bind(this))}doConnectedCallback(){var e,t,n,i,s,a,u=this,d=[];if(super.connectedCallback(),!this.parentNode.isScene)throw new Error(\"\u003Ca-assets> must be a child of a \u003Ca-scene>.\");for(s=this.querySelectorAll(\"img\"),e=0;e\u003Cs.length;e++)i=h(s[e]),d.push(new Promise((function(t,n){o.Cache.add(s[e].getAttribute(\"src\"),i),i.onload=t,i.onerror=n})));for(n=this.querySelectorAll(\"audio, video\"),e=0;e\u003Cn.length;e++)(t=h(n[e])).src||t.srcObject||l(\"Audio/video asset has neither `src` nor `srcObject` attributes.\"),d.push(c(t));Promise.allSettled(d).then(r(this.load,this)),a=parseInt(this.getAttribute(\"timeout\"),10)||3e3,this.timeout=setTimeout((function(){u.hasLoaded||(l(\"Asset loading timed out in \",a,\"ms\"),u.emit(\"timeout\"),u.load())}),a)}disconnectedCallback(){super.disconnectedCallback(),this.timeout&&clearTimeout(this.timeout)}load(){super.load.call(this,null,(function(e){return e.isAssetItem&&e.hasAttribute(\"src\")}))}}),customElements.define(\"a-asset-item\",class extends i{constructor(){super(),this.data=null,this.isAssetItem=!0}connectedCallback(){var e=this,t=this.getAttribute(\"src\");a.setResponseType(this.getAttribute(\"response-type\")||u(t)),a.load(t,(function(t){e.data=t,setTimeout((function(){i.prototype.load.call(e)}))}),(function(t){e.emit(\"progress\",{loadedBytes:t.loaded,totalBytes:t.total,xhr:t})}),(function(t){e.emit(\"error\",{xhr:t})}))}}),e.exports.inferResponseType=u,e.exports.getFileNameFromURL=d},1397:(e,t,n)=>{var i=n(4219)(\"core:cubemap:warn\");class r extends HTMLElement{constructor(e){return(e=super(e)).srcs=e.validate(),e}validate(){var e,t=this.querySelectorAll(\"[src]\"),n=[];if(6===t.length){for(e=0;e\u003Ct.length;e++)n.push(t[e].getAttribute(\"src\"));return n}i(\"\u003Ca-cubemap> did not contain exactly six elements each with a `src` attribute.\")}}customElements.define(\"a-cubemap\",r)},1956:(e,t,n)=>{var i=n(9721).X,r=n(3515).components,s=n(2666),o=n(8903),a=o.debug(\"core:a-entity:debug\"),l=o.debug(\"core:a-entity:warn\"),c=\"__\",h=[\"position\",\"rotation\",\"scale\",\"visible\"],u={once:!0};class d extends i{constructor(){super(),this.components={},this.initializingComponents={},this.componentsToUpdate={},this.isEntity=!0,this.isPlaying=!1,this.object3D=new s.Group,this.object3D.el=this,this.object3DMap={},this.parentEl=null,this.rotationObj={},this.states=[]}attributeChangedCallback(e,t,n){var i=this.components[e];super.attributeChangedCallback(),i&&i.justInitialized&&\"\"===n?delete i.justInitialized:(i||null!==n)&&this.setEntityAttribute(e,t,n)}connectedCallback(){\"loading\"!==document.readyState?d.prototype.doConnectedCallback.call(this):document.addEventListener(\"DOMContentLoaded\",this.connectedCallback.bind(this))}doConnectedCallback(){var e,t,n=this;super.connectedCallback(),t=this.sceneEl,this.addToParent(),this.isScene||(t?!(e=t.querySelector(\"a-assets\"))||e.hasLoaded?this.load():e.addEventListener(\"loaded\",(function(){n.load()})):this.load())}disconnectedCallback(){var e;if(this.parentEl){for(e in this.components)this.removeComponent(e,!1);this.isScene||(this.removeFromParent(),super.disconnectedCallback(),this.object3D.el=null)}}getObject3D(e){return this.object3DMap[e]}setObject3D(e,t){var n,i=this;if(!(t instanceof s.Object3D))throw new Error(\"`Entity.setObject3D` was called with an object that was not an instance of THREE.Object3D.\");(n=this.getObject3D(e))&&this.object3D.remove(n),t.el=this,t.children.length&&t.traverse((function(e){e.el=i})),this.object3D.add(t),this.object3DMap[e]=t,this.emit(\"object3dset\",{object:t,type:e})}removeObject3D(e){var t=this.getObject3D(e);t?(this.object3D.remove(t),delete this.object3DMap[e],this.emit(\"object3dremove\",{type:e})):l(\"Tried to remove `Object3D` of type:\",e,\"which was not defined.\")}getOrCreateObject3D(e,t){var n=this.getObject3D(e);return!n&&t&&(n=new t,this.setObject3D(e,n)),l(\"`getOrCreateObject3D` has been deprecated. Use `setObject3D()` and `object3dset` event instead.\"),n}add(e){if(!e.object3D)throw new Error(\"Trying to add an element that doesn't have an `object3D`\");this.object3D.add(e.object3D),this.emit(\"child-attached\",{el:e})}addToParent(){var e=this.parentEl=this.parentNode;e&&e.add&&!this.attachedToParent&&(e.add(this),this.attachedToParent=!0)}removeFromParent(){var e=this.parentEl;this.parentEl.remove(this),this.attachedToParent=!1,this.parentEl=null,e.emit(\"child-detached\",{el:this})}load(){var e=this;!this.hasLoaded&&this.parentEl&&super.load.call(this,(function(){e.parentEl&&(e.updateComponents(),(e.isScene||e.parentEl.isPlaying)&&e.play())}))}remove(e){e?this.object3D.remove(e.object3D):this.parentNode.removeChild(this)}getChildEntities(){for(var e=this.children,t=[],n=0;n\u003Ce.length;n++){var i=e[n];i instanceof d&&t.push(i)}return t}initComponent(e,t,n){var i,s,l,h;if(h=(l=o.split(e,c))[0],s=l.length>2?l.slice(1).join(\"__\"):l[1],r[h]&&(p(this,e)||void 0!==t||n)&&!(e in this.components)){if(this.initComponentDependencies(h),s&&!r[h].multiple)throw new Error(\"Trying to initialize multiple components of type `\"+h+\"`. There can only be one component of this type per entity.\");i=new r[h].Component(this,t,s),this.isPlaying&&i.play(),this.hasAttribute(e)||(i.justInitialized=!0,window.HTMLElement.prototype.setAttribute.call(this,e,\"\")),a(\"Component initialized: %s\",e)}}initComponentDependencies(e){var t,n;if(r[e]&&(t=r[e].dependencies))for(n=0;n\u003Ct.length;n++)this.initComponent(t[n],window.HTMLElement.prototype.getAttribute.call(this,t[n])||void 0,!0)}removeComponent(e,t){var n;(n=this.components[e])&&(n.initialized?(n.pause(),n.remove(),t&&(n.destroy(),delete this.components[e]),this.emit(\"componentremoved\",n.evtDetail,!1)):this.addEventListener(\"componentinitialized\",(function n(i){i.detail.name===e&&(this.removeComponent(e,t),this.removeEventListener(\"componentinitialized\",n))})))}updateComponents(){var e,t,n,i,r,s,a=this.componentsToUpdate;if(this.hasLoaded){for(n=0;n\u003Cthis.mixinEls.length;n++)for(i in this.mixinEls[n].componentCache)A(i)&&(a[i]=!0);if(this.getExtraComponents)for(i in t=this.getExtraComponents())A(i)&&(a[i]=!0);for(n=0;n\u003Cthis.attributes.length;++n)i=this.attributes[n].name,-1===h.indexOf(i)&&A(i)&&(a[i]=!0);for(n=0;n\u003Ch.length;n++)i=h[n],this.hasAttribute(i)&&this.updateComponent(i,this.getDOMAttribute(i));for(i in a)r=this.getDOMAttribute(i),e=(s=t&&t[i])?s.constructor===Object?o.extend(s,o.styleParser.parse(r||{})):r||s:r,this.updateComponent(i,e),delete a[i]}}updateComponent(e,t,n){var i=this.components[e];if(i)return null!==t||p(this,e)?void i.updateProperties(t,n):void this.removeComponent(e,!0);this.initComponent(e,t,!1)}removeAttribute(e,t){var n=this.components[e];n&&void 0===t&&this.removeComponent(e,!0),n&&void 0!==t?n.resetProperty(t):(\"mixin\"===e&&this.mixinUpdate(\"\"),window.HTMLElement.prototype.removeAttribute.call(this,e))}play(){var e,t,n;if(!this.isPlaying&&this.hasLoaded){for(n in this.isPlaying=!0,this.components)this.components[n].play();for(e=this.getChildEntities(),t=0;t\u003Ce.length;t++)e[t].play();this.emit(\"play\")}}pause(){var e,t,n;if(this.isPlaying){for(n in this.isPlaying=!1,this.components)this.components[n].pause();for(e=this.getChildEntities(),t=0;t\u003Ce.length;t++)e[t].pause();this.emit(\"pause\")}}setEntityAttribute(e,t,n){if(r[e]||this.components[e])this.updateComponent(e,n);else if(\"mixin\"===e){if(n===this.computedMixinStr)return;this.mixinUpdate(n,t)}}mixinUpdate(e,t){var n,i,r,s,o=d.componentsUpdated,a=this;if(this.hasLoaded){for(t=t||this.getAttribute(\"mixin\"),r=this.updateMixins(e,t),o.length=0,s=0;s\u003Cthis.mixinEls.length;s++)for(n in this.mixinEls[s].componentCache)-1===o.indexOf(n)&&(this.components[n]?this.components[n].handleMixinUpdate():this.initComponent(n,null),o.push(n));for(s=0;s\u003Cr.oldMixinIds.length;s++)if(i=document.getElementById(r.oldMixinIds[s]))for(n in i.componentCache)-1===o.indexOf(n)&&this.components[n]&&(this.getDOMAttribute(n)?this.components[n].handleMixinUpdate():this.removeComponent(n,!0))}else this.addEventListener(\"loaded\",(function(){a.mixinUpdate(e,t)}),u)}setAttribute(e,t,n){var i,s,a,l,h,u=d.singlePropUpdate;if(a=(l=e.indexOf(c))>0?e.substring(0,l):e,!r[a])return\"mixin\"===e&&this.mixinUpdate(t),void super.setAttribute.call(this,e,t);if(!this.components[e]&&this.hasAttribute(e)&&this.updateComponent(e,window.HTMLElement.prototype.getAttribute.call(this,e)),void 0!==n&&\"string\"==typeof t&&t.length>0&&\"string\"==typeof o.styleParser.parse(t)){for(h in u)delete u[h];(i=u)[t]=n,s=!1}else i=t,s=!0===n;this.updateComponent(e,i,s),this.sceneEl&&this.sceneEl.getAttribute(\"debug\")&&this.components[e].flushToDOM()}flushToDOM(e){var t,n,i,r=this.components,s=this.children;for(i in r)r[i].flushToDOM();if(e)for(n=0;n\u003Cs.length;++n)(t=s[n]).flushToDOM&&t.flushToDOM(e)}getAttribute(e){var t,n,i,r;return\"position\"===e?this.object3D.position:\"rotation\"===e?(this,n=s.MathUtils.radToDeg,i=this.object3D.rotation,(r=this.rotationObj).x=n(i.x),r.y=n(i.y),r.z=n(i.z),r):\"scale\"===e?this.object3D.scale:\"visible\"===e?this.object3D.visible:(t=this.components[e])?t.data:window.HTMLElement.prototype.getAttribute.call(this,e)}getDOMAttribute(e){var t=this.components[e];return t?t.attrValue:window.HTMLElement.prototype.getAttribute.call(this,e)}addState(e){this.is(e)||(this.states.push(e),this.emit(\"stateadded\",e))}removeState(e){var t=this.states.indexOf(e);-1!==t&&(this.states.splice(t,1),this.emit(\"stateremoved\",e))}is(e){return-1!==this.states.indexOf(e)}inspect(){this.sceneEl.components.inspector.openInspector(this)}destroy(){var e;if(this.parentNode)l(\"Entity can only be destroyed if detached from scenegraph.\");else for(e in this.components)this.components[e].destroy()}}function p(e,t){return!(!e.components[t]||!e.components[t].attrValue)||function(e,t){var n,i=!1;for(n=0;n\u003Ct.length&&!(i=t[n].hasAttribute(e));++n);return i}(t,e.mixinEls)}function A(e){return-1!==e.indexOf(c)&&(e=o.split(e,c)[0]),!!r[e]}d.componentsUpdated=[],d.singlePropUpdate={},customElements.define(\"a-entity\",d),e.exports.F=d},8022:(e,t,n)=>{var i=n(9721).X,r=n(3515).components,s=n(8903);customElements.define(\"a-mixin\",class extends i{constructor(){super(),this.componentCache={},this.isMixin=!0}connectedCallback(){\"loading\"!==document.readyState?this.doConnectedCallback():document.addEventListener(\"DOMContentLoaded\",this.connectedCallback.bind(this))}doConnectedCallback(){super.connectedCallback(),this.sceneEl=this.closestScene(),this.id=this.getAttribute(\"id\"),this.cacheAttributes(),this.updateEntities(),this.load()}attributeChangedCallback(e,t,n){super.attributeChangedCallback(),this.cacheAttribute(e,n),this.updateEntities()}setAttribute(e,t){window.HTMLElement.prototype.setAttribute.call(this,e,t),this.cacheAttribute(e,t)}cacheAttribute(e,t){var n,i;i=s.split(e,\"__\")[0],(n=r[i])&&(void 0===t&&(t=window.HTMLElement.prototype.getAttribute.call(this,e)),this.componentCache[e]=n.parseAttrValueForCache(t))}getAttribute(e){return this.componentCache[e]||window.HTMLElement.prototype.getAttribute.call(this,e)}cacheAttributes(){var e,t,n=this.attributes;for(t=0;t\u003Cn.length;t++)e=n[t].name,this.cacheAttribute(e)}updateEntities(){var e,t,n;if(this.sceneEl)for(t=this.sceneEl.querySelectorAll(\"[mixin~=\"+this.id+\"]\"),n=0;n\u003Ct.length;n++)(e=t[n]).hasLoaded&&!e.isMixin&&e.mixinUpdate(this.id)}})},9721:(e,t,n)=>{var i=n(8903),r=i.debug(\"core:a-node:warn\"),s={\"a-scene\":!0,\"a-assets\":!0,\"a-assets-items\":!0,\"a-cubemap\":!0,\"a-mixin\":!0,\"a-node\":!0,\"a-entity\":!0};function o(e){return e.tagName.toLowerCase()in s||e.isNode}class a extends HTMLElement{constructor(){super(),this.computedMixinStr=\"\",this.hasLoaded=!1,this.isNode=!0,this.mixinEls=[]}connectedCallback(){\"loading\"!==document.readyState?a.prototype.doConnectedCallback.call(this):document.addEventListener(\"DOMContentLoaded\",this.connectedCallback.bind(this))}doConnectedCallback(){var e;this.sceneEl=this.closestScene(),this.sceneEl||r(\"You are attempting to attach \u003C\"+this.tagName+\"> outside of an A-Frame scene. Append this element to `\u003Ca-scene>` instead.\"),this.hasLoaded=!1,this.emit(\"nodeready\",void 0,!1),this.isMixin||(e=this.getAttribute(\"mixin\"))&&this.updateMixins(e)}attributeChangedCallback(e,t,n){n!==this.computedMixinStr&&(\"mixin\"!==e||this.isMixin||this.updateMixins(n,t))}closestScene(){for(var e=this;e&&!e.isScene;)e=e.parentElement;return e}closest(e){for(var t=this.matches||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector,n=this;n&&!t.call(n,e);)n=n.parentElement;return n}disconnectedCallback(){this.hasLoaded=!1}load(e,t){var n,i=this;this.hasLoaded||(t=t||o,n=this.getChildren().filter(t).map((function(e){return new Promise((function(t,n){if(e.hasLoaded)return t();e.addEventListener(\"loaded\",t),e.addEventListener(\"error\",n)}))})),Promise.allSettled(n).then((function(t){t.forEach((function(e){\"rejected\"===e.status&&r(\"Rendering scene with errors on node: \",e.reason.target)})),i.hasLoaded=!0,e&&e(),i.setupMutationObserver(),i.emit(\"loaded\",void 0,!1)})))}setupMutationObserver(){var e=this;new MutationObserver((function(t){var n;for(n=0;n\u003Ct.length;n++)if(\"attributes\"===t[n].type){var i=t[n].attributeName,r=window.HTMLElement.prototype.getAttribute.call(e,i),s=t[n].oldValue;e.attributeChangedCallback(i,s,r)}})).observe(this,{attributes:!0,attributeOldValue:!0})}getChildren(){return Array.prototype.slice.call(this.children,0)}updateMixins(e,t){var n,r,s,o=a.newMixinIdArray,l=a.oldMixinIdArray,c=a.mixinIds;for(o.length=0,l.length=0,r=e?i.split(e.trim(),/\\s+/):o,s=t?i.split(t.trim(),/\\s+/):l,c.newMixinIds=r,c.oldMixinIds=s,n=0;n\u003Cs.length;n++)-1===r.indexOf(s[n])&&this.unregisterMixin(s[n]);for(this.computedMixinStr=\"\",this.mixinEls.length=0,n=0;n\u003Cr.length;n++)this.registerMixin(document.getElementById(r[n]));return this.computedMixinStr&&(this.computedMixinStr=this.computedMixinStr.trim(),window.HTMLElement.prototype.setAttribute.call(this,\"mixin\",this.computedMixinStr)),c}registerMixin(e){var t,n,r;if(e){if(r=e.getAttribute(\"mixin\"))for(t=i.split(r.trim(),/\\s+/),n=0;n\u003Ct.length;n++)this.registerMixin(document.getElementById(t[n]));this.computedMixinStr=this.computedMixinStr+\" \"+e.id,this.mixinEls.push(e)}}setAttribute(e,t){\"mixin\"===e&&this.updateMixins(t),window.HTMLElement.prototype.setAttribute.call(this,e,t)}unregisterMixin(e){var t,n=this.mixinEls;for(t=0;t\u003Cn.length;++t)if(e===n[t].id){n.splice(t,1);break}}emit(e,t,n,r){var s=a.evtData;void 0===n&&(n=!0),s.bubbles=!!n,s.detail=t,r&&(s=i.extend({},r,s)),this.dispatchEvent(new CustomEvent(e,s))}}a.evtData={},a.newMixinIdArray=[],a.oldMixinIdArray=[],a.mixinIds={},customElements.define(\"a-node\",a),e.exports.X=a,e.exports.U=s},3515:(e,t,n)=>{var i=n(5941),r=n(1435),s=n(365),o=n(8903),a=e.exports.components={},l=i.parseProperties,c=i.parseProperty,h=i.process,u=i.isSingleProperty,d=i.stringifyProperties,p=i.stringifyProperty,A=o.styleParser,f=o.debug(\"core:component:warn\"),m=document.currentScript,g=new RegExp(\"[A-Z]+\"),v={},y=e.exports.Component=function(e,t,n){var i=this;this.el=e,this.id=n,this.attrName=this.name+(n?\"__\"+n:\"\"),this.evtDetail={id:this.id,name:this.name},this.initialized=!1,this.isSingleProperty=u(this.schema),this.isSinglePropertyObject=this.isSingleProperty&&C(c(void 0,this.schema))&&!(this.schema.default instanceof window.HTMLElement),this.isObjectBased=!this.isSingleProperty||this.isSinglePropertyObject,this.el.components[this.attrName]=this,this.objectPool=v[this.name];var r=this.events;this.events={},function(e,t){var n;for(n in t)e.events[n]=t[n].bind(e)}(this,r),this.attrValue=void 0,this.isObjectBased?(this.nextData=this.objectPool.use(),o.objectPool.removeUnusedKeys(this.nextData,this.schema),this.oldData=this.objectPool.use(),o.objectPool.removeUnusedKeys(this.oldData,this.schema),this.previousOldData=this.objectPool.use(),o.objectPool.removeUnusedKeys(this.previousOldData,this.schema),this.parsingAttrValue=this.objectPool.use(),o.objectPool.removeUnusedKeys(this.parsingAttrValue,this.schema)):(this.nextData=void 0,this.oldData=void 0,this.previousOldData=void 0,this.parsingAttrValue=void 0),this.throttledEmitComponentChanged=o.throttleLeadingAndTrailing((function(){e.emit(\"componentchanged\",i.evtDetail,!1)}),200),this.updateProperties(t)};if(y.prototype={schema:{},init:function(){},events:{},update:function(e){},updateSchema:void 0,tick:void 0,tock:void 0,play:function(){},pause:function(){},remove:function(){},parse:function(e,t){var n=this.schema;return this.isSingleProperty?c(e,n):l(A.parse(e),n,!0,this.name,t)},stringify:function(e){var t=this.schema;return\"string\"==typeof e?e:this.isSingleProperty?p(e,t):(e=d(e,t),A.stringify(e))},updateCachedAttrValue:function(e,t){var n,i,r;if(void 0!==e){if(null===e)return this.isObjectBased&&this.attrValue&&this.objectPool.recycle(this.attrValue),void(this.attrValue=void 0);if(e instanceof Object&&!(e instanceof window.HTMLElement)?(i=this.objectPool.use(),n=o.extend(i,e)):n=this.parseAttrValueForCache(e),this.isObjectBased&&!t&&this.attrValue)for(r in this.attrValue)void 0===n[r]&&(n[r]=this.attrValue[r]);this.isObjectBased&&!this.attrValue&&(this.attrValue=this.objectPool.use()),o.objectPool.clearObject(this.attrValue),this.attrValue=x(this.attrValue,n,this.isObjectBased),o.objectPool.clearObject(i)}},parseAttrValueForCache:function(e){var t;return\"string\"!=typeof e?e:(this.isSingleProperty?\"string\"==typeof(t=this.schema.parse(e))&&(t=e):(o.objectPool.clearObject(this.parsingAttrValue),t=A.parse(e,this.parsingAttrValue)),t)},flushToDOM:function(e){var t=e?this.data:this.attrValue;null!=t&&window.HTMLElement.prototype.setAttribute.call(this.el,this.attrName,this.stringify(t))},updateProperties:function(e,t){this.el.hasLoaded?(null!==e&&(e=this.parseAttrValueForCache(e)),this.updateCachedAttrValue(e,t),this.initialized?(this.updateComponent(e,t),this.callUpdateHandler()):this.initComponent()):this.updateCachedAttrValue(e)},initComponent:function(){var e,t=this.el;this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!1,!0)),this.data=this.buildData(this.attrValue),t.initializingComponents[this.name]||(t.initializingComponents[this.name]=!0,this.init(),this.initialized=!0,delete t.initializingComponents[this.name],this.oldData=x(this.oldData,this.data,this.isObjectBased),e=this.isObjectBased?this.objectPool.use():void 0,this.update(e),this.isObjectBased&&this.objectPool.recycle(e),t.isPlaying&&this.play(),t.emit(\"componentinitialized\",this.evtDetail,!1))},updateComponent:function(e,t){var n,i;if(t)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));if(this.isSingleProperty)return this.isObjectBased&&c(e,this.schema),void(this.data=e);if(l(e,this.schema,!0,this.name),this.schemaChangeKeys.length)for(n in e)if(this.schema[n].schemaChange){i=!0;break}if(i)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));for(n in e)void 0!==e[n]&&(this.data[n]=e[n])},callUpdateHandler:function(){var e;this.previousOldData instanceof Object&&o.objectPool.clearObject(this.previousOldData),this.isObjectBased?b(this.previousOldData,this.oldData):this.previousOldData=this.oldData,e=!o.deepEqual(this.oldData,this.data),(this.isPositionRotationScale||e)&&(this.oldData instanceof Object&&o.objectPool.clearObject(this.oldData),this.oldData=x(this.oldData,this.data,this.isObjectBased),this.update(this.previousOldData),this.throttledEmitComponentChanged())},handleMixinUpdate:function(){this.data=this.buildData(this.attrValue),this.callUpdateHandler()},resetProperty:function(e){if(this.isObjectBased){if(!(e in this.attrValue))return;delete this.attrValue[e],this.data[e]=this.schema[e].default}else this.attrValue=this.schema.default,this.data=this.schema.default;this.updateProperties(this.attrValue)},extendSchema:function(e){var t;t=o.extend({},a[this.name].schema),o.extend(t,e),this.schema=h(t),this.el.emit(\"schemachanged\",this.evtDetail)},buildData:function(e,t,n){var i,r,s,a,h,u,d,p=this.nextData,A=this.schema,f=this.el.mixinEls;if(i=e&&e.constructor===Array?e.length:null!=e,this.isObjectBased&&o.objectPool.clearObject(p),this.isSingleProperty)r=this.isObjectBased?b(p,A.default):M(A.default)?o.clone(A.default):A.default;else for(a in r=(d=!t&&this.attrValue)instanceof Object?b(p,d):p,A)s=A[a].default,void 0===r[a]&&(r[a]=M(s)?o.clone(s):s);for(u=0;u\u003Cf.length;u++)(h=f[u].getAttribute(this.attrName))&&(r=x(r,h,this.isObjectBased));if(i){if(this.isSingleProperty)return C(e)?(b(this.parsingAttrValue,e),c(this.parsingAttrValue,A)):c(e,A);r=x(r,e,this.isObjectBased)}else if(this.isSingleProperty)return c(r,A);return l(r,A,void 0,this.name,n)},eventsAttach:function(){var e;for(e in this.eventsDetach(),this.events)this.el.addEventListener(e,this.events[e])},eventsDetach:function(){var e;for(e in this.events)this.el.removeEventListener(e,this.events[e])},destroy:function(){this.objectPool.recycle(this.attrValue),this.objectPool.recycle(this.oldData),this.objectPool.recycle(this.parsingAttrValue),this.attrValue=this.oldData=this.parsingAttrValue=void 0}},window.debug)var E=e.exports.registrationOrderWarnings={};function b(e,t){var n,i;for(i in t)void 0!==t[i]&&(n=t[i],e[i]=M(n)?o.clone(n):n);return e}function x(e,t,n){var i;if(n&&t.constructor===Object){for(i in t)void 0!==t[i]&&(t[i]&&t[i].constructor===Object?e[i]=o.clone(t[i]):e[i]=t[i]);return e}return t}function w(e){return e.tick||e.tock}function C(e){return e&&e.constructor===Object&&!(e instanceof window.HTMLElement)}function M(e){return e&&(e.constructor===Object||e.constructor===Array)&&!(e instanceof window.HTMLElement)}e.exports.registerComponent=function(e,t){var n,i,l,c,d,p,A={};if(document.currentScript&&document.currentScript!==m&&r.forEach((function(t){t.hasLoaded||document.currentScript.compareDocumentPosition(t)!==Node.DOCUMENT_POSITION_FOLLOWING&&(f(\"The component `\"+e+\"` was registered in a \u003Cscript> tag after the scene. Component \u003Cscript> tags in an HTML file should be declared *before* the scene such that the component is available to entities during scene initialization.\"),window.debug&&(E[e]=!0))})),!0===g.test(e)&&f(\"The component name `\"+e+\"` contains uppercase characters, but HTML will ignore the capitalization of attribute names. Change the name to be lowercase: `\"+e.toLowerCase()+\"`\"),-1!==e.indexOf(\"__\"))throw new Error(\"The component name `\"+e+\"` is not allowed. The sequence __ (double underscore) is reserved to specify an id for multiple components of the same type\");if(Object.keys(t).forEach((function(e){A[e]={value:t[e],writable:!0}})),a[e])throw new Error(\"The component `\"+e+\"` has been already registered. Check that you are not loading two versions of the same component or two different components of the same name.\");if(((n=function(e,t,n){y.call(this,e,t,n)}).prototype=Object.create(y.prototype,A)).name=e,n.prototype.isPositionRotationScale=\"position\"===e||\"rotation\"===e||\"scale\"===e,n.prototype.constructor=n,n.prototype.system=s&&s.systems[e],n.prototype.play=(d=n.prototype.play,function(){var e=this.el.sceneEl,t=this.el.isPlaying&&!this.isPlaying;this.initialized&&t&&(d.call(this),this.isPlaying=!0,this.eventsAttach(),w(this)&&e.addBehavior(this))}),n.prototype.pause=(p=n.prototype.pause,function(){var e=this.el.sceneEl;this.isPlaying&&(p.call(this),this.isPlaying=!1,this.eventsDetach(),w(this)&&e.removeBehavior(this))}),l=o.extend(h(n.prototype.schema,n.prototype.name)),!(c=u(n.prototype.schema)))for(i in n.prototype.schemaChangeKeys=[],l)l[i].schemaChange&&n.prototype.schemaChangeKeys.push(i);return v[e]=o.objectPool.createPool(),a[e]={Component:n,dependencies:n.prototype.dependencies,isSingleProp:c,multiple:n.prototype.multiple,name:e,parse:n.prototype.parse,parseAttrValueForCache:n.prototype.parseAttrValueForCache,schema:l,stringify:n.prototype.stringify,type:n.prototype.type},n}},4863:(e,t,n)=>{var i=n(5941).process,r=e.exports.xZ={},s=e.exports.ib=[],o=n(2666),a=function(){};a.prototype={schema:{},init:function(e){return this.geometry=new o.BufferGeometry,this.geometry},update:function(e){}},e.exports.dZ=function(e,t){var n,o={};if(Object.keys(t).forEach((function(e){o[e]={value:t[e],writable:!0}})),r[e])throw new Error(\"The geometry `\"+e+\"` has been already registered\");return((n=function(){a.call(this)}).prototype=Object.create(a.prototype,o)).name=e,n.prototype.constructor=n,r[e]={Geometry:n,schema:i(n.prototype.schema)},s.push(e),n}},8813:(e,t,n)=>{var i=n(395),r=n(695),s=r(\"core:propertyTypes:warn\"),o=r(\"core:propertyTypes:warn\"),a=e.exports.propertyTypes={},l=/[,> .[\\]:]/,c=/\\url\\((.+)\\)/;function h(e,t,n,i){\"type\"in a?s(\"Property type \"+e+\" is already registered.\"):a[e]={default:t,parse:n||d,stringify:i||p}}function u(e){var t,n;return\"string\"!=typeof e?e:(n=e.match(c))?n[1]:\"#\"===e.charAt(0)?(t=document.getElementById(e.substring(1)))?\"CANVAS\"===t.tagName||\"VIDEO\"===t.tagName||\"IMG\"===t.tagName?t:t.getAttribute(\"src\"):void o('\"'+e+'\" asset not found.'):e}function d(e){return e}function p(e){return null===e?\"null\":e.toString()}function A(e){return parseInt(e,10)}function f(e){return i.parse(e,this.default)}function m(e,t){if(null===e)return!0;if(\"object\"!=typeof e)return!1;if(Object.keys(e).length!==t)return!1;var n=e.x,i=e.y,r=e.z,s=e.w;return!(\"number\"!=typeof n||\"number\"!=typeof i||t>2&&\"number\"!=typeof r||t>3&&\"number\"!=typeof s)}h(\"audio\",\"\",u),h(\"array\",[],(function(e){return Array.isArray(e)?e:e&&\"string\"==typeof e?e.split(\",\").map((function(e){return e.trim()})):[]}),(function(e){return e.join(\", \")})),h(\"asset\",\"\",u),h(\"boolean\",!1,(function(e){return\"false\"!==e&&!1!==e})),h(\"color\",\"#FFF\",d,p),h(\"int\",0,A),h(\"number\",0,(function(e){return parseFloat(e,10)})),h(\"map\",\"\",u),h(\"model\",\"\",u),h(\"selector\",null,(function(e){return e?\"string\"!=typeof e?e:\"#\"!==e[0]||l.test(e)?document.querySelector(e):document.getElementById(e.substring(1)):null}),(function(e){return e.getAttribute?\"#\"+e.getAttribute(\"id\"):p(e)})),h(\"selectorAll\",null,(function(e){return e?\"string\"!=typeof e?e:Array.prototype.slice.call(document.querySelectorAll(e),0):null}),(function(e){return e instanceof Array?e.map((function(e){return\"#\"+e.getAttribute(\"id\")})).join(\", \"):p(e)})),h(\"src\",\"\",(function(e){return o(\"`src` property type is deprecated. Use `asset` instead.\"),u(e)})),h(\"string\",\"\",d,p),h(\"time\",0,A),h(\"vec2\",{x:0,y:0},f,i.stringify),h(\"vec3\",{x:0,y:0,z:0},f,i.stringify),h(\"vec4\",{x:0,y:0,z:0,w:1},f,i.stringify),e.exports.registerPropertyType=h,e.exports.isValidDefaultValue=function(e,t){return(\"audio\"!==e||\"string\"==typeof t)&&!(\"array\"===e&&!Array.isArray(t))&&(\"asset\"!==e||\"string\"==typeof t)&&(\"boolean\"!==e||\"boolean\"==typeof t)&&(\"color\"!==e||\"string\"==typeof t)&&(\"int\"!==e||\"number\"==typeof t)&&(\"number\"!==e||\"number\"==typeof t)&&(\"map\"!==e||\"string\"==typeof t)&&(\"model\"!==e||\"string\"==typeof t)&&(\"selector\"!==e||\"string\"==typeof t||null===t)&&(\"selectorAll\"!==e||\"string\"==typeof t||null===t)&&(\"src\"!==e||\"string\"==typeof t)&&(\"string\"!==e||\"string\"==typeof t)&&(\"time\"!==e||\"number\"==typeof t)&&(\"vec2\"===e?m(t,2):\"vec3\"===e?m(t,3):\"vec4\"!==e||m(t,4))},e.exports.isValidDefaultCoordinate=m},6450:(e,t,n)=>{var i=n(770).f,r=n(9035),s=n(4713),o=n(1435),a=n(365).systems,l=n(2666),c=n(8903),h=n(1956).F,u=n(9721).X,d=n(8225),p=c.bind,A=c.device.isIOS(),f=c.device.isMobile(),m=c.device.isWebXRAvailable,g=c.debug(\"core:a-scene:warn\");A&&n(9609);class v extends h{constructor(){var e;super(),(e=this).clock=new l.Clock,e.isIOS=A,e.isMobile=f,e.hasWebXR=m,e.isAR=!1,e.isScene=!0,e.object3D=new l.Scene,e.object3D.onAfterRender=function(t,n,i){e.isPlaying&&e.tock(e.time,e.delta,i)},e.resize=p(e.resize,e),e.render=p(e.render,e),e.systems={},e.systemNames=[],e.time=e.delta=0,e.behaviors={tick:[],tock:[]},e.hasLoaded=!1,e.isPlaying=!1,e.originalHTML=e.innerHTML}addFullScreenStyles(){document.documentElement.classList.add(\"a-fullscreen\")}removeFullScreenStyles(){document.documentElement.classList.remove(\"a-fullscreen\")}connectedCallback(){\"loading\"!==document.readyState?this.doConnectedCallback():document.addEventListener(\"DOMContentLoaded\",this.connectedCallback.bind(this))}doConnectedCallback(){var e=this,t=this.hasAttribute(\"embedded\");this.setAttribute(\"inspector\",\"\"),this.setAttribute(\"keyboard-shortcuts\",\"\"),this.setAttribute(\"screenshot\",\"\"),this.setAttribute(\"vr-mode-ui\",\"\"),this.setAttribute(\"device-orientation-permission-ui\",\"\"),super.connectedCallback(),function(e){var t;function n(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||e.exitVR(),document.activeElement.blur(),document.body.focus()}(t=document.createElement(\"canvas\")).classList.add(\"a-canvas\"),t.dataset.aframeCanvas=!0,e.appendChild(t),document.addEventListener(\"fullscreenchange\",n),document.addEventListener(\"mozfullscreenchange\",n),document.addEventListener(\"webkitfullscreenchange\",n),document.addEventListener(\"MSFullscreenChange\",n),t.addEventListener(\"touchmove\",(function(e){e.preventDefault()})),e.canvas=t,e.emit(\"render-target-loaded\",{target:t}),setTimeout(p(e.resize,e),0)}(this),this.setupRenderer(),s.setup(this,E),this.resize(),t||this.addFullScreenStyles(),d(this),i(this),r(this),this.onVRPresentChangeBound=p(this.onVRPresentChange,this),window.addEventListener(\"vrdisplaypresentchange\",this.onVRPresentChangeBound),this.enterVRBound=function(){e.enterVR()},this.exitVRBound=function(){e.exitVR()},this.exitVRTrueBound=function(){e.exitVR(!0)},this.pointerRestrictedBound=function(){e.pointerRestricted()},this.pointerUnrestrictedBound=function(){e.pointerUnrestricted()},m||(window.addEventListener(\"vrdisplaydeactivate\",this.exitVRBound),window.addEventListener(\"vrdisplaydisconnect\",this.exitVRTrueBound),window.addEventListener(\"vrdisplaypointerrestricted\",this.pointerRestrictedBound),window.addEventListener(\"vrdisplaypointerunrestricted\",this.pointerUnrestrictedBound)),window.addEventListener(\"sessionend\",this.resize),this.addEventListener(\"cameraready\",(function(){e.attachedCallbackPostCamera()})),this.initSystems(),this.hasWebXR&&navigator.xr&&navigator.xr.addEventListener&&navigator.xr.addEventListener(\"sessiongranted\",(function(){e.enterVR()}))}attachedCallbackPostCamera(){var e=this;window.addEventListener(\"load\",void 0),window.addEventListener(\"resize\",(function(){e.isIOS?setTimeout(e.resize,100):e.resize()})),this.play(),o.push(this)}initSystems(){var e;for(e in this.initSystem(\"camera\"),a)\"camera\"!==e&&this.initSystem(e)}initSystem(e){this.systems[e]||(this.systems[e]=new a[e](this),this.systemNames.push(e))}disconnectedCallback(){var e=o.indexOf(this);super.disconnectedCallback(),o.splice(e,1),window.removeEventListener(\"vrdisplaypresentchange\",this.onVRPresentChangeBound),window.removeEventListener(\"vrdisplayactivate\",this.enterVRBound),window.removeEventListener(\"vrdisplaydeactivate\",this.exitVRBound),window.removeEventListener(\"vrdisplayconnect\",this.enterVRBound),window.removeEventListener(\"vrdisplaydisconnect\",this.exitVRTrueBound),window.removeEventListener(\"vrdisplaypointerrestricted\",this.pointerRestrictedBound),window.removeEventListener(\"vrdisplaypointerunrestricted\",this.pointerUnrestrictedBound),window.removeEventListener(\"sessionend\",this.resize),this.renderer.dispose()}addBehavior(e){var t,n,i=this.behaviors;for(n in i)e[n]&&-1===(t=this.behaviors[n]).indexOf(e)&&t.push(e)}getPointerLockElement(){return document.pointerLockElement}checkHeadsetConnected(){return c.device.checkHeadsetConnected()}enterAR(){var e;if(!this.hasWebXR)throw e=\"Failed to enter AR mode, WebXR not supported.\",new Error(e);if(!c.device.checkARSupport())throw e=\"Failed to enter AR, WebXR immersive-ar mode not supported in your browser or device.\",new Error(e);return this.enterVR(!0)}enterVR(e){var t,n,i=this,r=i.renderer.xr;if(this.is(\"vr-mode\"))return Promise.resolve(\"Already in VR.\");if(this.checkHeadsetConnected()||this.isMobile){var s=i.getAttribute(\"renderer\");if(r.enabled=!0,this.hasWebXR){this.xrSession&&this.xrSession.removeEventListener(\"end\",this.exitVRBound);var o=this.sceneEl.systems.webxr.sessionReferenceSpaceType;r.setReferenceSpaceType(o);var a=e?\"immersive-ar\":\"immersive-vr\";return n=this.sceneEl.systems.webxr.sessionConfiguration,new Promise((function(e,t){navigator.xr.requestSession(a,n).then((function(t){i.xrSession=t,r.layersEnabled=-1!==n.requiredFeatures.indexOf(\"layers\"),r.setSession(t).then((function(){r.setFoveation(s.foveationLevel)})),t.addEventListener(\"end\",i.exitVRBound),h(e)}),(function(e){throw new Error(\"Failed to enter \"+(\"immersive-ar\"===a?\"AR\":\"VR\")+\" mode (`requestSession`) \"+e)}))}))}if(t=c.device.getVRDisplay(),r.setDevice(t),t.isPresenting&&!window.hasNativeWebVRImplementation)return h(),Promise.resolve();var l={highRefreshRate:s.highRefreshRate};return t.requestPresent([{source:this.canvas,attributes:l}]).then(h,(function(e){throw i.removeState(\"vr-mode\"),e&&e.message?new Error(\"Failed to enter VR mode (`requestPresent`): \"+e.message):new Error(\"Failed to enter VR mode (`requestPresent`).\")}))}return h(),Promise.resolve();function h(t){var n,r;window.hasNativeWebVRImplementation&&!window.hasNativeWebXRImplementation&&(n=new CustomEvent(\"vrdisplaypresentchange\",{detail:{display:c.device.getVRDisplay()}}),window.dispatchEvent(n)),e?i.addState(\"ar-mode\"):i.addState(\"vr-mode\"),i.emit(\"enter-vr\",{target:i}),!m&&i.isMobile&&screen.orientation&&screen.orientation.lock&&screen.orientation.lock(\"landscape\"),i.addFullScreenStyles(),i.isMobile||i.checkHeadsetConnected()||((r=i.canvas).requestFullscreen||r.webkitRequestFullscreen||r.mozRequestFullScreen||r.msRequestFullscreen).apply(r,[{navigationUI:\"hide\"}]),i.resize(),t&&t()}}exitVR(){var e,t=this,n=this.renderer.xr;if(!this.is(\"vr-mode\")&&!this.is(\"ar-mode\"))return Promise.resolve(\"Not in immersive mode.\");if(this.checkHeadsetConnected()||this.isMobile){if(n.enabled=!1,e=c.device.getVRDisplay(),this.hasWebXR)this.xrSession.removeEventListener(\"end\",this.exitVRBound),this.xrSession.end().then((function(){}),(function(){})),this.xrSession=void 0,n.setSession(null);else if(e.isPresenting)return e.exitPresent().then(i,(function(e){throw e&&e.message?new Error(\"Failed to exit VR mode (`exitPresent`): \"+e.message):new Error(\"Failed to exit VR mode (`exitPresent`).\")}))}else(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen());return i(),Promise.resolve();function i(){t.removeState(\"vr-mode\"),t.removeState(\"ar-mode\"),t.isMobile&&screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),t.hasAttribute(\"embedded\")&&t.removeFullScreenStyles(),t.resize(),t.isIOS&&c.forceCanvasResizeSafariMobile(t.canvas),t.renderer.setPixelRatio(window.devicePixelRatio),t.emit(\"exit-vr\",{target:t})}}pointerRestricted(){if(this.canvas){var e=this.getPointerLockElement();e&&e!==this.canvas&&document.exitPointerLock&&document.exitPointerLock(),this.canvas.requestPointerLock&&this.canvas.requestPointerLock()}}pointerUnrestricted(){var e=this.getPointerLockElement();e&&e===this.canvas&&document.exitPointerLock&&document.exitPointerLock()}onVRPresentChange(e){var t=e.display||e.detail.display;t&&t.isPresenting?this.enterVR():this.exitVR()}getAttribute(e){var t=this.systems[e];return t?t.data:h.prototype.getAttribute.call(this,e)}getComputedAttribut(e){g(\"`getComputedAttribute` is deprecated. Use `getAttribute` instead.\"),this.getAttribute(e)}getDOMAttribute(e){var t=this.systems[e];return t?t.data:h.prototype.getDOMAttribute.call(this,e)}setAttribute(e,t,n){var i=this.systems[e];if(i)return u.prototype.setAttribute.call(this,e,t),void i.updateProperties(t);h.prototype.setAttribute.call(this,e,t,n)}removeBehavior(e){var t,n,i,r=this.behaviors;for(n in r)e[n]&&-1!==(i=(t=this.behaviors[n]).indexOf(e))&&t.splice(i,1)}resize(){var e,t,n=this.camera,i=this.canvas,r=this.renderer.xr.isPresenting;e=this.renderer.xr.enabled&&r,!n||!i||this.is(\"vr-mode\")&&(this.isMobile||e)||(t=E(i,this.getAttribute(\"embedded\")&&!this.is(\"vr-mode\"),this.maxCanvasSize,this.is(\"vr-mode\")),n.aspect=t.width/t.height,n.updateProjectionMatrix(),this.renderer.setSize(t.width,t.height,!1),this.emit(\"rendererresize\",null,!1))}setupRenderer(){var e,t,n,i,r=this;i={alpha:!0,antialias:!f,canvas:this.canvas,logarithmicDepthBuffer:!1,powerPreference:\"high-performance\"},this.maxCanvasSize={height:1920,width:1920},this.hasAttribute(\"renderer\")&&(n=this.getAttribute(\"renderer\"),(t=c.styleParser.parse(n)).precision&&(i.precision=t.precision+\"p\"),t.antialias&&\"auto\"!==t.antialias&&(i.antialias=\"true\"===t.antialias),t.logarithmicDepthBuffer&&\"auto\"!==t.logarithmicDepthBuffer&&(i.logarithmicDepthBuffer=\"true\"===t.logarithmicDepthBuffer),t.alpha&&(i.alpha=\"true\"===t.alpha),this.maxCanvasSize={width:t.maxCanvasWidth?parseInt(t.maxCanvasWidth):this.maxCanvasSize.width,height:t.maxCanvasHeight?parseInt(t.maxCanvasHeight):this.maxCanvasSize.height}),(e=this.renderer=new l.WebGLRenderer(i)).setPixelRatio(window.devicePixelRatio),e.sortObjects=!1,this.camera&&e.xr.setPoseTarget(this.camera.el.object3D),this.addEventListener(\"camera-set-active\",(function(){e.xr.setPoseTarget(r.camera.el.object3D)}))}play(){var e=this,t=this;this.renderStarted?h.prototype.play.call(this):(this.addEventListener(\"loaded\",(function(){var e,n=this.renderer,i=this.renderer.xr;h.prototype.play.call(this),t.renderStarted||(t.resize(),t.renderer&&(window.performance&&window.performance.mark(\"render-started\"),s.remove(),(e=c.device.getVRDisplay())&&e.isPresenting&&(i.setDevice(e),i.enabled=!0,t.enterVR()),n.setAnimationLoop(this.render),t.renderStarted=!0,t.emit(\"renderstart\")))})),setTimeout((function(){h.prototype.load.call(e)})))}updateComponent(e){e in a||h.prototype.updateComponent.apply(this,arguments)}tick(e,t){var n,i=this.systems;for(n=0;n\u003Cthis.behaviors.tick.length;n++)this.behaviors.tick[n].el.isPlaying&&this.behaviors.tick[n].tick(e,t);for(n=0;n\u003Cthis.systemNames.length;n++)i[this.systemNames[n]].tick&&i[this.systemNames[n]].tick(e,t)}tock(e,t,n){var i,r=this.systems;for(i=0;i\u003Cthis.behaviors.tock.length;i++)this.behaviors.tock[i].el.isPlaying&&this.behaviors.tock[i].tock(e,t,n);for(i=0;i\u003Cthis.systemNames.length;i++)r[this.systemNames[i]].tock&&r[this.systemNames[i]].tock(e,t,n)}render(e,t){var n=this.renderer;this.frame=t,this.delta=1e3*this.clock.getDelta(),this.time=1e3*this.clock.elapsedTime,this.isPlaying&&this.tick(this.time,this.delta);var i=null;this.is(\"ar-mode\")&&(i=this.object3D.background,this.object3D.background=null),n.render(this.object3D,this.camera),i&&(this.object3D.background=i)}}function y(e,t){var n,i=window.devicePixelRatio;return!t||-1===t.width&&-1===t.height||e.width*i\u003Ct.width&&e.height*i\u003Ct.height||(n=e.width/e.height,e.width*i>t.width&&-1!==t.width&&(e.width=Math.round(t.width/i),e.height=Math.round(t.width/n/i)),e.height*i>t.height&&-1!==t.height&&(e.height=Math.round(t.height/i),e.width=Math.round(t.height*n/i))),e}function E(e,t,n,i){return e.parentElement?t?y({height:e.parentElement.offsetHeight,width:e.parentElement.offsetWidth},n):function(e,t){var n;return n={height:document.body.offsetHeight,width:document.body.offsetWidth},t?n:y(n,e)}(n,i):{height:0,width:0}}window.customElements.define(\"a-scene\",v),e.exports.Q=v},4713:(e,t,n)=>{var i,r,s,o=n(8903).styleParser,a=\"loading-screen\";function l(e){var t=i.hasAttribute(\"embedded\"),n=s(i.canvas,t,i.maxCanvasSize,i.is(\"vr-mode\"));e.aspect=n.width/n.height,e.updateProjectionMatrix(),i.renderer.setSize(n.width,n.height,!1)}e.exports.setup=function(e,t){s=t;var n,c,h,u,d,p,A,f,m,g,v=(i=e).hasAttribute(a)?o.parse(i.getAttribute(a)):void 0,y=v&&v.dotsColor||\"white\",E=v&&v.backgroundColor||\"#24CAFF\";(void 0===v||\"true\"===v.enabled||void 0===v.enabled)&&(n=new THREE.Scene,c=new THREE.SphereGeometry(.2,36,18,0,2*Math.PI,0,Math.PI),h=new THREE.MeshBasicMaterial({color:y}),u=new THREE.Mesh(c,h),d=u.clone(),p=u.clone(),A=new THREE.PerspectiveCamera(80,window.innerWidth/window.innerHeight,5e-4,1e4),f=new THREE.Clock,m=0,g=function(){i.renderer.render(n,A),m=f.getElapsedTime()%4,u.visible=m>=1,d.visible=m>=2,p.visible=m>=3},n.background=new THREE.Color(E),n.add(A),u.position.set(-1,0,-15),d.position.set(0,0,-15),p.position.set(1,0,-15),A.add(u),A.add(d),A.add(p),(r=document.createElement(\"div\")).className=\"a-loader-title\",r.innerHTML=document.title,r.style.display=\"none\",i.appendChild(r),setTimeout((function(){i.hasLoaded||(l(A),r.style.display=\"block\",window.addEventListener(\"resize\",(function(){l(A)})),i.renderer.setAnimationLoop(g))}),200))},e.exports.remove=function(){window.removeEventListener(\"resize\",l),r&&(r.style.display=\"none\")}},770:(e,t,n)=>{var i,r=n(8309),s=n(8903).extend,o=[l({name:\"viewport\",content:\"width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui,viewport-fit=cover\"}),l({name:\"mobile-web-app-capable\",content:\"yes\"}),l({name:\"theme-color\",content:\"black\"})],a=[l({name:\"apple-mobile-web-app-capable\",content:\"yes\"}),l({name:\"apple-mobile-web-app-status-bar-style\",content:\"black\"}),(i={rel:\"apple-touch-icon\",href:\"https://aframe.io/images/aframe-logo-152.png\"},{tagName:\"link\",attributes:i,exists:function(){return document.querySelector('link[rel=\"'+i.rel+'\"]')}})];function l(e){return{tagName:\"meta\",attributes:e,exists:function(){return document.querySelector('meta[name=\"'+e.name+'\"]')}}}e.exports.f=function(e){var t,n=document.head,i=n.querySelector(\"script\"),l=[];return o.forEach(c),e.isIOS&&a.forEach(c),l;function c(e){e&&!e.exists()&&(t=function(e){if(e&&e.tagName){var t=document.createElement(e.tagName);return t.setAttribute(r.AFRAME_INJECTED,\"\"),s(t,e.attributes)}}(e),t&&(i?i.parentNode.insertBefore(t,i):n.appendChild(t),l.push(t)))}}},8225:(e,t,n)=>{var i=n(7629),r=n(8903).isIframed;function s(e){if(e.data&&\"vr\"===e.data.type)switch(e.data.data){case\"enter\":this.enterVR();break;case\"exit\":this.exitVR()}}e.exports=function(e){r()&&window.addEventListener(\"message\",i(s,e))}},1435:e=>{e.exports=[]},9035:(e,t,n)=>{var i=n(4630);e.exports=function(e){if(e.isMobile){var t=e.wakelock=new i;e.addEventListener(\"enter-vr\",(function(){t.request()})),e.addEventListener(\"exit-vr\",(function(){t.release()}))}}},5941:(e,t,n)=>{var i,r=n(8903),s=n(8813),o=r.debug,a=s.isValidDefaultValue,l=s.propertyTypes,c=o(\"core:schema:warn\");function h(e){return\"type\"in e?\"string\"==typeof e.type:\"default\"in e}function u(e,t){var n,i,r=e.default,s=e.type;return e.type?\"bool\"===e.type?s=\"boolean\":\"float\"===e.type&&(s=\"number\"):s=void 0===r||\"boolean\"!=typeof r&&\"number\"!=typeof r?Array.isArray(r)?\"array\":\"string\":typeof r,(i=l[s])||c(\"Unknown property type for component `\"+t+\"`: \"+s),n=!!e.parse,e.parse=e.parse||i.parse,e.stringify=e.stringify||i.stringify,e.type=s,\"default\"in e?n||a(s,r)||c(\"Default value `\"+r+\"` does not match type `\"+s+\"` in component `\"+t+\"`\"):e.default=i.default,e}function d(e,t){return null!=e&&\"\"!==e||(e=t.default,Array.isArray(e)&&(e=e.slice())),t.parse(e,t.default)}function p(e,t){return\"object\"!=typeof e?e:t&&null!==e?t.stringify(e):JSON.stringify(e)}e.exports.isSingleProperty=h,e.exports.process=function(e,t){var n;if(h(e))return u(e,t);for(n in e)e[n]=u(e[n],t);return e},e.exports.processPropertyDefinition=u,e.exports.parseProperties=(i=[],function(e,t,n,r,s){var o,a,l,h;for(a in i.length=0,n?e:t)n&&void 0===e[a]||i.push(a);if(null===e||\"object\"!=typeof e)return e;for(a in e)void 0===e[a]||t[a]||s||c(\"Unknown property `\"+a+\"` for component/system `\"+r+\"`.\");for(o=0;o\u003Ci.length;o++){if(l=t[a=i[o]],h=e[a],!t[a])return;e[a]=d(h,l)}return e}),e.exports.parseProperty=d,e.exports.stringifyProperties=function(e,t){var n,i,r,s,o={};for(n in e)i=t[n],\"object\"==typeof(s=r=e[n])&&(s=p(r,i),i||c(\"Unknown component property: \"+n)),o[n]=s;return o},e.exports.stringifyProperty=p},9644:(e,t,n)=>{var i=n(5941).process,r=e.exports.shaders={},s=e.exports.shaderNames=[],o=n(2666),a=n(8903),l={array:\"v3\",color:\"v3\",int:\"i\",number:\"f\",map:\"t\",time:\"f\",vec2:\"v2\",vec3:\"v3\",vec4:\"v4\"},c=e.exports.Shader=function(){};c.prototype={schema:{},vertexShader:\"void main() {gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);}\",fragmentShader:\"void main() {gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);}\",init:function(e){return this.attributes=this.initVariables(e,\"attribute\"),this.uniforms=this.initVariables(e,\"uniform\"),this.material=new(this.raw?o.RawShaderMaterial:o.ShaderMaterial)({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader}),this.material},initVariables:function(e,t){var n,i,r=this.schema,s={};for(n in r)r[n].is===t&&(i=l[r[n].type],s[n]={type:i,value:void 0});return s},update:function(e){this.updateVariables(e,\"attribute\"),this.updateVariables(e,\"uniform\")},updateVariables:function(e,t){var n,i,r,s=this.schema;for(n in r=\"uniform\"===t?this.uniforms:this.attributes,e)if(s[n]&&s[n].is===t)if(\"map\"!==s[n].type)r[n].value=this.parseValue(s[n].type,e[n]),r[n].needsUpdate=!0;else{if(!r[n]||r[n].value===e[n])continue;i=\"_texture_\"+n,this.setMapOnTextureLoad(r,n,i),a.material.updateMapMaterialFromData(i,n,this,e)}},parseValue:function(e,t){var n;switch(e){case\"vec2\":return new o.Vector2(t.x,t.y);case\"vec3\":return new o.Vector3(t.x,t.y,t.z);case\"vec4\":return new o.Vector4(t.x,t.y,t.z,t.w);case\"color\":return n=new o.Color(t),new o.Vector3(n.r,n.g,n.b);case\"map\":return o.ImageUtils.loadTexture(t);default:return t}},setMapOnTextureLoad:function(e,t,n){var i=this;this.el.addEventListener(\"materialtextureloaded\",(function(){e[t].value=i.material[n],e[t].needsUpdate=!0}))}},e.exports.registerShader=function(e,t){var n,o={};if(Object.keys(t).forEach((function(e){o[e]={value:t[e],writable:!0}})),r[e])throw new Error(\"The shader \"+e+\" has been already registered\");return((n=function(){c.call(this)}).prototype=Object.create(c.prototype,o)).name=e,n.prototype.constructor=n,r[e]={Shader:n,schema:i(n.prototype.schema)},s.push(e),n}},365:(e,t,n)=>{var i=n(3515),r=n(5941),s=n(8903),o=r.parseProperties,a=r.parseProperty,l=r.process,c=r.isSingleProperty,h=s.styleParser,u=e.exports.systems={},d=e.exports.System=function(e){var t=i&&i.components[this.name];this.el=e,this.sceneEl=e,t&&(t.Component.prototype.system=this),this.buildData(),this.init(),this.update({})};d.prototype={schema:{},init:function(){},update:function(e){},updateProperties:function(e){var t=this.data;Object.keys(r).length&&(this.buildData(e),this.update(t))},buildData:function(e){var t=this.schema;Object.keys(t).length&&(e=e||window.HTMLElement.prototype.getAttribute.call(this.sceneEl,this.name),c(t)?this.data=a(e,t):this.data=o(h.parse(e)||{},t))},tick:void 0,tock:void 0,play:function(){},pause:function(){}},e.exports.registerSystem=function(e,t){var n,i,r={},o=s.findAllScenes(document);if(Object.keys(t).forEach((function(e){r[e]={value:t[e],writable:!0}})),u[e])throw new Error(\"The system `\"+e+\"` has been already registered. Check that you are not loading two versions of the same system or two different systems of the same name.\");for(((i=function(e){d.call(this,e)}).prototype=Object.create(d.prototype,r)).name=e,i.prototype.constructor=i,i.prototype.schema=s.extend(l(i.prototype.schema)),u[e]=i,n=0;n\u003Co.length;n++)o[n].initSystem(e)}},8168:(e,t,n)=>{n(5927)},5927:(e,t,n)=>{var i=n(3515).registerComponent,r=n(2666),s=new r.Vector3,o=new r.Vector3;i(\"pivot\",{dependencies:[\"position\"],schema:{type:\"vec3\"},init:function(){var e=this.data,t=this.el,n=t.object3D.parent,i=t.object3D,a=new r.Group;s.copy(i.position),o.copy(i.rotation),n.remove(i),a.add(i),n.add(a),t.object3D=a,i.position.set(-1*e.x,-1*e.y,-1*e.z),a.position.set(e.x+s.x,e.y+s.y,e.z+s.z),a.rotation.copy(i.rotation),i.rotation.set(0,0,0)}})},2362:(e,t,n)=>{var i=n(3515).components,r=n(9644).shaders,s=n(8903),o={};function a(e){var t=e.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase();\"fog\"===e&&(t=\"material-fog\"),\"visible\"===e&&(t=\"material-visible\"),o[t]=\"material.\"+e}Object.keys(i.material.schema).forEach(a),Object.keys(r.standard.schema).forEach(a),e.exports=function(){return{defaultComponents:{material:{}},mappings:s.extend({},o)}}},9298:(e,t,n)=>{n(2557),n(8341),n(4256),n(1791),n(4106),n(5254),n(2359),n(1829),n(5144),n(1007),n(5390),n(3097),n(9293),n(3280)},5775:(e,t,n)=>{var i=n(9721).U,r=n(1956).F,s=n(3515).components,o=n(8903),a=o.debug,l=o.entity.setComponentProperty,c=a(\"extras:primitives:debug\"),h=a(\"extras:primitives:warn\"),u=a(\"extras:primitives:error\"),d=e.exports.primitives={};e.exports.registerPrimitive=function(e,t){if(e=e.toLowerCase(),!i[e]){i[e]=!0,c(\"Registering \u003C%s>\",e),t.defaultAttributes&&h(\"The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.\");var n=t.mappings||{},a=class extends r{constructor(){super(),this.defaultComponentsFromPrimitive=t.defaultComponents||t.defaultAttributes||{},this.deprecated=t.deprecated||null,this.deprecatedMappings=t.deprecatedMappings||{},this.mappings=n,t.deprecated&&console.warn(t.deprecated),this.resolveMappingCollisions()}resolveMappingCollisions(){var e=this.mappings,t=this;Object.keys(e).forEach((function(n){var i;n!==n.toLowerCase()&&h(\"Mapping keys should be specified in lower case. The mapping key \"+n+\" may not be recognized\"),s[n]&&(i=e[n].replace(\".\",\"-\"),e[i]=e[n],delete e[n],console.warn(\"The primitive \"+t.tagName.toLowerCase()+\" has a mapping collision. The attribute \"+n+\" has the same name as a registered component and has been renamed to \"+i))}))}getExtraComponents(){var e,t,n,i,r,s,a=this;for(t=o.clone(this.defaultComponentsFromPrimitive),(r=this.getAttribute(\"mixin\"))&&(r=r.trim().split(\" \")).forEach((function(e){var n=a.sceneEl.querySelector(\"#\"+e).componentCache;Object.keys(n).forEach((function(e){var i,r;t[e]=(i=t[e],r=n[e],l(i)?c(r):l(r)?c(i):h(i)&&h(r)?o.extendDeep(i,r):c(r))}))})),n=0;n\u003Cthis.attributes.length;n++)e=this.attributes[n],(i=this.mappings[e.name])&&((s=o.entity.getComponentPropertyPath(i)).constructor===Array?(t[s[0]]=t[s[0]]||{},t[s[0]][s[1]]=e.value.trim()):t[s]=e.value.trim());return t;function l(e){return void 0===e}function c(e){return h(e)?o.extendDeep({},e):e}function h(e){return null!==e&&e.constructor===Object}}attributeChangedCallback(e,t,n){var i=this.mappings[e];e in this.deprecatedMappings&&console.warn(this.deprecatedMappings[e]),e&&i?l(this,i,n):super.attributeChangedCallback(e,t,n)}};return customElements.define(e,a),a.mappings=n,d[e]=a,a}u(\"Trying to register primitive \"+e+\" that has been already previously registered\")},e.exports.definePrimitive=function(t,n,i){i=i||{},Object.keys(n).map((function(e){!function(e,t){var n=s[e].schema;Object.keys(n).map((function(n){var i=n.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase();void 0!==t[i]&&(i=e+\"-\"+n),t[i]=e+\".\"+n}))}(e,i)})),e.exports.registerPrimitive(t,o.extendDeep({},null,{defaultComponents:n,mappings:i}))}},2557:(e,t,n)=>{(0,n(5775).registerPrimitive)(\"a-camera\",{defaultComponents:{camera:{},\"look-controls\":{},\"wasd-controls\":{},position:{x:0,y:1.6,z:0}},mappings:{active:\"camera.active\",far:\"camera.far\",fov:\"camera.fov\",\"look-controls-enabled\":\"look-controls.enabled\",near:\"camera.near\",\"pointer-lock-enabled\":\"look-controls.pointerLockEnabled\",\"wasd-controls-enabled\":\"wasd-controls.enabled\",\"reverse-mouse-drag\":\"look-controls.reverseMouseDrag\",zoom:\"camera.zoom\"}})},8341:(e,t,n)=>{var i=n(2362);(0,n(5775).registerPrimitive)(\"a-cursor\",n(8903).extendDeep({},i(),{defaultComponents:{cursor:{},geometry:{primitive:\"ring\",radiusOuter:.016,radiusInner:.01,segmentsTheta:32},material:{color:\"#000\",shader:\"flat\",opacity:.8},position:{x:0,y:0,z:-1}},mappings:{far:\"raycaster.far\",fuse:\"cursor.fuse\",\"fuse-timeout\":\"cursor.fuseTimeout\",interval:\"raycaster.interval\",objects:\"raycaster.objects\"}}))},4256:(e,t,n)=>{var i=n(2362);(0,n(5775).registerPrimitive)(\"a-curvedimage\",n(8903).extendDeep({},i(),{defaultComponents:{geometry:{height:1,primitive:\"cylinder\",radius:2,segmentsRadial:48,thetaLength:270,openEnded:!0,thetaStart:0},material:{color:\"#FFF\",shader:\"flat\",side:\"double\",transparent:!0,repeat:\"-1 1\"}},mappings:{height:\"geometry.height\",\"open-ended\":\"geometry.openEnded\",radius:\"geometry.radius\",segments:\"geometry.segmentsRadial\",start:\"geometry.thetaStart\",\"theta-length\":\"geometry.thetaLength\",\"theta-start\":\"geometry.thetaStart\",width:\"geometry.thetaLength\"}}))},1791:(e,t,n)=>{(0,n(5775).registerPrimitive)(\"a-gltf-model\",{mappings:{src:\"gltf-model\"}})},4106:(e,t,n)=>{var i=n(2362);(0,n(5775).registerPrimitive)(\"a-image\",n(8903).extendDeep({},i(),{defaultComponents:{geometry:{primitive:\"plane\"},material:{color:\"#FFF\",shader:\"flat\",side:\"double\",transparent:!0}},mappings:{height:\"geometry.height\",width:\"geometry.width\"}}))},5254:(e,t,n)=>{(0,n(5775).registerPrimitive)(\"a-light\",{defaultComponents:{light:{}},mappings:{angle:\"light.angle\",color:\"light.color\",\"ground-color\":\"light.groundColor\",decay:\"light.decay\",distance:\"light.distance\",intensity:\"light.intensity\",penumbra:\"light.penumbra\",type:\"light.type\",target:\"light.target\",envmap:\"light.envMap\",\"shadow-camera-automatic\":\"light.shadowCameraAutomatic\"}})},2359:(e,t,n)=>{(0,n(5775).registerPrimitive)(\"a-link\",{defaultComponents:{link:{visualAspectEnabled:!0}},mappings:{href:\"link.href\",image:\"link.image\",title:\"link.title\"}})},1829:(e,t,n)=>{var i=n(2362)();(0,n(5775).registerPrimitive)(\"a-obj-model\",n(8903).extendDeep({},i,{defaultComponents:{\"obj-model\":{}},mappings:{src:\"obj-model.obj\",mtl:\"obj-model.mtl\"}}))},5144:(e,t,n)=>{var i=n(2362),r=n(5775).registerPrimitive,s=n(8903),o=n(3280);r(\"a-sky\",s.extendDeep({},i(),{defaultComponents:{geometry:{primitive:\"sphere\",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:\"#FFF\",side:\"back\",shader:\"flat\",npot:!0},scale:\"-1 1 1\"},mappings:s.extendDeep({},o[\"a-sphere\"].mappings)}))},1007:(e,t,n)=>{(0,n(5775).registerPrimitive)(\"a-sound\",{defaultComponents:{sound:{}},mappings:{src:\"sound.src\",on:\"sound.on\",autoplay:\"sound.autoplay\",loop:\"sound.loop\",volume:\"sound.volume\"}})},5390:(e,t,n)=>{(0,n(5775).definePrimitive)(\"a-text\",{text:{anchor:\"align\",width:5}})},3097:(e,t,n)=>{var i=n(2362);(0,n(5775).registerPrimitive)(\"a-video\",n(8903).extendDeep({},i(),{defaultComponents:{geometry:{primitive:\"plane\"},material:{color:\"#FFF\",shader:\"flat\",side:\"double\",transparent:!0}},mappings:{height:\"geometry.height\",width:\"geometry.width\"}}))},9293:(e,t,n)=>{var i=n(2362);(0,n(5775).registerPrimitive)(\"a-videosphere\",n(8903).extendDeep({},i(),{defaultComponents:{geometry:{primitive:\"sphere\",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:\"#FFF\",shader:\"flat\",side:\"back\",npot:!0},scale:\"-1 1 1\"},mappings:{radius:\"geometry.radius\",\"segments-height\":\"geometry.segmentsHeight\",\"segments-width\":\"geometry.segmentsWidth\"}}))},3280:(e,t,n)=>{var i=n(2362),r=n(4863).xZ,s=n(4863).ib,o=n(5775).registerPrimitive,a=n(8903),l=e.exports={};function c(e){return e.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase()}s.forEach((function(e){var t=r[e],n=c(e),s={};Object.keys(t.schema).forEach((function(e){s[c(e)]=\"geometry.\"+e}));var h=\"a-\"+n,u=o(h,a.extendDeep({},i(),{defaultComponents:{geometry:{primitive:e}},mappings:s}));l[h]=u}))},8328:(e,t,n)=>{var i=n(4863).dZ,r=n(2666);i(\"box\",{schema:{depth:{default:1,min:0},height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:\"int\"},segmentsWidth:{default:1,min:1,max:20,type:\"int\"},segmentsDepth:{default:1,min:1,max:20,type:\"int\"}},init:function(e){this.geometry=new r.BoxGeometry(e.width,e.height,e.depth,e.segmentsWidth,e.segmentsHeight,e.segmentsDepth)}})},6937:(e,t,n)=>{var i=n(4863).dZ,r=n(2666),s=r.MathUtils.degToRad;i(\"circle\",{schema:{radius:{default:1,min:0},segments:{default:32,min:3,type:\"int\"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new r.CircleGeometry(e.radius,e.segments,s(e.thetaStart),s(e.thetaLength))}})},3695:(e,t,n)=>{var i=n(4863).dZ,r=n(2666),s=r.MathUtils.degToRad;i(\"cone\",{schema:{height:{default:1,min:0},openEnded:{default:!1},radiusBottom:{default:1,min:0},radiusTop:{default:.01,min:0},segmentsHeight:{default:18,min:1,type:\"int\"},segmentsRadial:{default:36,min:3,type:\"int\"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new r.CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,s(e.thetaStart),s(e.thetaLength))}})},1472:(e,t,n)=>{var i=n(4863).dZ,r=n(2666),s=r.MathUtils.degToRad;i(\"cylinder\",{schema:{height:{default:1,min:0},openEnded:{default:!1},radius:{default:1,min:0},segmentsHeight:{default:18,min:1,type:\"int\"},segmentsRadial:{default:36,min:3,type:\"int\"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new r.CylinderGeometry(e.radius,e.radius,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,s(e.thetaStart),s(e.thetaLength))}})},9473:(e,t,n)=>{var i=n(4863).dZ,r=n(2666);i(\"dodecahedron\",{schema:{detail:{default:0,min:0,max:5,type:\"int\"},radius:{default:1,min:0}},init:function(e){this.geometry=new r.DodecahedronGeometry(e.radius,e.detail)}})},8581:(e,t,n)=>{var i=n(4863).dZ,r=n(2666);i(\"icosahedron\",{schema:{detail:{default:0,min:0,max:5,type:\"int\"},radius:{default:1,min:0}},init:function(e){this.geometry=new r.IcosahedronGeometry(e.radius,e.detail)}})},763:(e,t,n)=>{n(8328),n(6937),n(3695),n(1472),n(9473),n(8581),n(3210),n(1752),n(377),n(1092),n(9485),n(697),n(7536),n(8018)},3210:(e,t,n)=>{var i=n(4863).dZ,r=n(2666);i(\"octahedron\",{schema:{detail:{default:0,min:0,max:5,type:\"int\"},radius:{default:1,min:0}},init:function(e){this.geometry=new r.OctahedronGeometry(e.radius,e.detail)}})},1752:(e,t,n)=>{var i=n(4863).dZ,r=n(2666);i(\"plane\",{schema:{height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:\"int\"},segmentsWidth:{default:1,min:1,max:20,type:\"int\"}},init:function(e){this.geometry=new r.PlaneGeometry(e.width,e.height,e.segmentsWidth,e.segmentsHeight)}})},377:(e,t,n)=>{var i=n(4863).dZ,r=n(2666),s=r.MathUtils.degToRad;i(\"ring\",{schema:{radiusInner:{default:.8,min:0},radiusOuter:{default:1.2,min:0},segmentsPhi:{default:10,min:1,type:\"int\"},segmentsTheta:{default:32,min:3,type:\"int\"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new r.RingGeometry(e.radiusInner,e.radiusOuter,e.segmentsTheta,e.segmentsPhi,s(e.thetaStart),s(e.thetaLength))}})},1092:(e,t,n)=>{var i=n(4863).dZ,r=n(2666),s=r.MathUtils.degToRad;i(\"sphere\",{schema:{radius:{default:1,min:0},phiLength:{default:360},phiStart:{default:0,min:0},thetaLength:{default:180,min:0},thetaStart:{default:0},segmentsHeight:{default:18,min:2,type:\"int\"},segmentsWidth:{default:36,min:3,type:\"int\"}},init:function(e){this.geometry=new r.SphereGeometry(e.radius,e.segmentsWidth,e.segmentsHeight,s(e.phiStart),s(e.phiLength),s(e.thetaStart),s(e.thetaLength))}})},9485:(e,t,n)=>{var i=n(4863).dZ,r=n(2666);i(\"tetrahedron\",{schema:{detail:{default:0,min:0,max:5,type:\"int\"},radius:{default:1,min:0}},init:function(e){this.geometry=new r.TetrahedronGeometry(e.radius,e.detail)}})},697:(e,t,n)=>{var i=n(4863).dZ,r=n(2666),s=r.MathUtils.degToRad;i(\"torus\",{schema:{arc:{default:360},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:36,min:2,type:\"int\"},segmentsTubular:{default:32,min:3,type:\"int\"}},init:function(e){this.geometry=new r.TorusGeometry(e.radius,2*e.radiusTubular,e.segmentsRadial,e.segmentsTubular,s(e.arc))}})},7536:(e,t,n)=>{var i=n(4863).dZ,r=n(2666);i(\"torusKnot\",{schema:{p:{default:2,min:1},q:{default:3,min:1},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:8,min:3,type:\"int\"},segmentsTubular:{default:100,min:3,type:\"int\"}},init:function(e){this.geometry=new r.TorusKnotGeometry(e.radius,2*e.radiusTubular,e.segmentsTubular,e.segmentsRadial,e.p,e.q)}})},8018:(e,t,n)=>{var i=n(4863).dZ,r=n(2666),s=new r.Quaternion,o=new r.Vector3(0,0,1),a=new r.Vector2,l=new r.Vector2,c=new r.Vector2;i(\"triangle\",{schema:{vertexA:{type:\"vec3\",default:{x:0,y:.5,z:0}},vertexB:{type:\"vec3\",default:{x:-.5,y:-.5,z:0}},vertexC:{type:\"vec3\",default:{x:.5,y:-.5,z:0}}},init:function(e){var t,n,i,h,u,d,p,A,f;(i=new r.Triangle).a.set(e.vertexA.x,e.vertexA.y,e.vertexA.z),i.b.set(e.vertexB.x,e.vertexB.y,e.vertexB.z),i.c.set(e.vertexC.x,e.vertexC.y,e.vertexC.z),n=i.getNormal(new r.Vector3),s.setFromUnitVectors(n,o),h=i.a.clone().applyQuaternion(s),u=i.b.clone().applyQuaternion(s),d=i.c.clone().applyQuaternion(s),a.set(Math.min(h.x,u.x,d.x),Math.min(h.y,u.y,d.y)),l.set(Math.max(h.x,u.x,d.x),Math.max(h.y,u.y,d.y)),c.set(0,0).subVectors(l,a),h=(new r.Vector2).subVectors(h,a).divide(c),u=(new r.Vector2).subVectors(u,a).divide(c),d=(new r.Vector2).subVectors(d,a).divide(c),t=this.geometry=new r.BufferGeometry,p=[i.a.x,i.a.y,i.a.z,i.b.x,i.b.y,i.b.z,i.c.x,i.c.y,i.c.z],A=[n.x,n.y,n.z,n.x,n.y,n.z,n.x,n.y,n.z],f=[h.x,h.y,u.x,u.y,d.x,d.y],t.setAttribute(\"position\",new r.Float32BufferAttribute(p,3)),t.setAttribute(\"normal\",new r.Float32BufferAttribute(A,3)),t.setAttribute(\"uv\",new r.Float32BufferAttribute(f,2))}})},5579:(e,t,n)=>{if(window.Promise=window.Promise||n(4177),n(651),window.hasNativeWebVRImplementation=!!window.navigator.getVRDisplays||!!window.navigator.getVRDevices,window.hasNativeWebXRImplementation=void 0!==navigator.xr,!window.hasNativeWebXRImplementation&&!window.hasNativeWebVRImplementation){var i=n(6818)(window.navigator.userAgent)?1/window.devicePixelRatio:1,r=n(5542),s={BUFFER_SCALE:i,CARDBOARD_UI_DISABLED:!0,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!!window.cordova};window.webvrpolyfill=new r(s)}var o=n(8903),a=o.debug;o.isIE11&&(n(7464),n(8332));var l=a(\"A-Frame:error\"),c=a(\"A-Frame:warn\");window.document.currentScript&&window.document.currentScript.parentNode!==window.document.head&&!window.debug&&c(\"Put the A-Frame \u003Cscript> tag in the \u003Chead> of the HTML *before* the scene to ensure everything for A-Frame is properly registered before they are used from HTML.\"),window.cordova||\"file:\"!==window.location.protocol||l(\"This HTML file is currently being served via the file:// protocol. Assets, textures, and models WILL NOT WORK due to cross-origin policy! Please use a local or hosted server: https://aframe.io/docs/0.5.0/introduction/getting-started.html#using-a-local-server.\"),n(9414),o.device.isBrowserEnvironment&&(n(6924),n(1353));var h=n(6450).Q,u=n(3515).components,d=n(3515).registerComponent,p=n(4863).dZ,A=n(5775).registerPrimitive,f=n(9644).registerShader,m=n(365).registerSystem,g=n(9644).shaders,v=n(365).systems,y=window.THREE=n(2666),E=n(4147);n(8686),n(763),n(8657),n(7758);var b=n(9721).X,x=n(1956).F;n(2385),n(1397),n(8022),n(8168),n(9298),console.log(\"A-Frame Version: 1.4.0 (Date 2022-12-26, Commit #60a324a2)\"),console.log(\"THREE Version (https://github.com/supermedium/three.js):\",E.dependencies[\"super-three\"]),console.log(\"WebVR Polyfill Version:\",E.dependencies[\"webvr-polyfill\"]),e.exports=window.AFRAME={AComponent:n(3515).Component,AEntity:x,ANode:b,ANIME:n(2446).Z,AScene:h,components:u,coreComponents:Object.keys(u),geometries:n(4863).xZ,registerComponent:d,registerGeometry:p,registerPrimitive:A,registerShader:f,registerSystem:m,primitives:{getMeshMixin:n(2362),primitives:n(5775).primitives},scenes:n(1435),schema:n(5941),shaders:g,systems:v,THREE:y,utils:o,version:E.version}},1543:e=>{window.aframeStats=function(e){var t=null,n=e;return{update:function(){var e;t(\"te\").set((e=n.querySelectorAll(\"*\"),Array.prototype.slice.call(e).filter((function(e){return e.isEntity})),e.length)),window.performance.getEntriesByName&&t(\"lt\").set(window.performance.getEntriesByName(\"render-started\")[0].startTime.toFixed(0))},start:function(){},end:function(){},attach:function(e){t=e},values:{te:{caption:\"Entities\"},lt:{caption:\"Load Time\"}},groups:[{caption:\"A-Frame\",values:[\"te\",\"lt\"]}],fractions:[]}},e.exports={aframeStats:window.aframeStats}},2666:(e,t,n)=>{var i=n(251).Z;i.TextureLoader&&(i.TextureLoader.prototype.crossOrigin=\"anonymous\"),i.ImageLoader&&(i.ImageLoader.prototype.crossOrigin=\"anonymous\"),i.Cache&&(i.Cache.enabled=!0),i.DRACOLoader.prototype.crossOrigin=\"anonymous\",i.GLTFLoader.prototype.crossOrigin=\"anonymous\",i.KTX2Loader.prototype.crossOrigin=\"anonymous\",i.MTLLoader.prototype.crossOrigin=\"anonymous\",i.OBJLoader.prototype.crossOrigin=\"anonymous\",e.exports=i},251:(e,t,n)=>{\"use strict\";n.d(t,{Z:()=>Am});var i={};n.r(i),n.d(i,{ACESFilmicToneMapping:()=>ne,AddEquation:()=>M,AddOperation:()=>K,AdditiveAnimationBlendMode:()=>Bt,AdditiveBlending:()=>b,AlphaFormat:()=>Pe,AlwaysDepth:()=>z,AlwaysStencilFunc:()=>nn,AmbientLight:()=>Ku,AmbientLightProbe:()=>Ad,AnimationClip:()=>bu,AnimationLoader:()=>Tu,AnimationMixer:()=>Vd,AnimationObjectGroup:()=>Gd,AnimationUtils:()=>lu,ArcCurve:()=>_c,ArrayCamera:()=>el,ArrowHelper:()=>kp,Audio:()=>_d,AudioAnalyser:()=>Dd,AudioContext:()=>ud,AudioListener:()=>Md,AudioLoader:()=>dd,AxesHelper:()=>Fp,BackSide:()=>g,BasicDepthPacking:()=>Pt,BasicShadowMap:()=>d,Bone:()=>Hl,BooleanKeyframeTrack:()=>Au,Box2:()=>np,Box3:()=>di,Box3Helper:()=>Tp,BoxBufferGeometry:()=>Wp,BoxGeometry:()=>us,BoxHelper:()=>Sp,BufferAttribute:()=>Ir,BufferGeometry:()=>Wr,BufferGeometryLoader:()=>rd,ByteType:()=>Ce,Cache:()=>wu,Camera:()=>gs,CameraHelper:()=>_p,CanvasTexture:()=>wc,CapsuleBufferGeometry:()=>jp,CapsuleGeometry:()=>qc,CatmullRomCurve3:()=>Dc,CineonToneMapping:()=>te,CircleBufferGeometry:()=>qp,CircleGeometry:()=>Yc,ClampToEdgeWrapping:()=>ue,Clock:()=>yd,Color:()=>Yn,ColorKeyframeTrack:()=>fu,ColorManagement:()=>Gn,CompressedArrayTexture:()=>xc,CompressedTexture:()=>bc,CompressedTextureLoader:()=>Lu,ConeBufferGeometry:()=>Yp,ConeGeometry:()=>Jc,CubeCamera:()=>Es,CubeReflectionMapping:()=>se,CubeRefractionMapping:()=>oe,CubeTexture:()=>bs,CubeTextureLoader:()=>Ru,CubeUVReflectionMapping:()=>ce,CubicBezierCurve:()=>Fc,CubicBezierCurve3:()=>Oc,CubicInterpolant:()=>hu,CullFaceBack:()=>c,CullFaceFront:()=>h,CullFaceFrontBack:()=>u,CullFaceNone:()=>l,Curve:()=>Cc,CurvePath:()=>Vc,CustomBlending:()=>C,CustomToneMapping:()=>ie,CylinderBufferGeometry:()=>Xp,CylinderGeometry:()=>Xc,Cylindrical:()=>ep,Data3DTexture:()=>si,DataArrayTexture:()=>ii,DataTexture:()=>Vl,DataTexture2DArray:()=>Hp,DataTexture3D:()=>Vp,DataTextureLoader:()=>Pu,DataUtils:()=>Np,DecrementStencilOp:()=>Wt,DecrementWrapStencilOp:()=>qt,DefaultLoadingManager:()=>Mu,DepthFormat:()=>Ue,DepthStencilFormat:()=>Ne,DepthTexture:()=>ol,DirectionalLight:()=>Ju,DirectionalLightHelper:()=>wp,DiscreteInterpolant:()=>du,DodecahedronBufferGeometry:()=>Jp,DodecahedronGeometry:()=>Zc,DoubleSide:()=>v,DstAlphaFactor:()=>F,DstColorFactor:()=>Q,DynamicCopyUsage:()=>un,DynamicDrawUsage:()=>sn,DynamicReadUsage:()=>ln,EdgesGeometry:()=>ih,EllipseCurve:()=>Mc,EqualDepth:()=>W,EqualStencilFunc:()=>Kt,EquirectangularReflectionMapping:()=>ae,EquirectangularRefractionMapping:()=>le,Euler:()=>Xi,EventDispatcher:()=>mn,ExtrudeBufferGeometry:()=>Kp,ExtrudeGeometry:()=>Dh,FileLoader:()=>Su,Float16BufferAttribute:()=>kr,Float32BufferAttribute:()=>Fr,Float64BufferAttribute:()=>Or,FloatType:()=>Se,Fog:()=>pl,FogExp2:()=>dl,FramebufferTexture:()=>Ec,FrontSide:()=>m,Frustum:()=>Ss,GLBufferAttribute:()=>Xd,GLSL1:()=>pn,GLSL3:()=>An,GreaterDepth:()=>q,GreaterEqualDepth:()=>j,GreaterEqualStencilFunc:()=>tn,GreaterStencilFunc:()=>$t,GridHelper:()=>vp,Group:()=>$a,HalfFloatType:()=>Te,HemisphereLight:()=>Ou,HemisphereLightHelper:()=>gp,HemisphereLightProbe:()=>pd,IcosahedronBufferGeometry:()=>Zp,IcosahedronGeometry:()=>Ph,ImageBitmapLoader:()=>cd,ImageLoader:()=>Du,ImageUtils:()=>Jn,ImmediateRenderObject:()=>Gp,IncrementStencilOp:()=>Vt,IncrementWrapStencilOp:()=>jt,InstancedBufferAttribute:()=>Yl,InstancedBufferGeometry:()=>id,InstancedInterleavedBuffer:()=>Yd,InstancedMesh:()=>ec,Int16BufferAttribute:()=>Lr,Int32BufferAttribute:()=>Rr,Int8BufferAttribute:()=>Br,IntType:()=>Ie,InterleavedBuffer:()=>fl,InterleavedBufferAttribute:()=>gl,Interpolant:()=>cu,InterpolateDiscrete:()=>bt,InterpolateLinear:()=>xt,InterpolateSmooth:()=>wt,InvertStencilOp:()=>Yt,KeepStencilOp:()=>zt,KeyframeTrack:()=>pu,LOD:()=>Fl,LatheBufferGeometry:()=>$p,LatheGeometry:()=>jc,Layers:()=>Ji,LessDepth:()=>H,LessEqualDepth:()=>V,LessEqualStencilFunc:()=>Zt,LessStencilFunc:()=>Jt,Light:()=>Fu,LightProbe:()=>ed,Line:()=>ac,Line3:()=>sp,LineBasicMaterial:()=>tc,LineCurve:()=>Qc,LineCurve3:()=>Uc,LineDashedMaterial:()=>tu,LineLoop:()=>uc,LineSegments:()=>hc,LinearEncoding:()=>Dt,LinearFilter:()=>ve,LinearInterpolant:()=>uu,LinearMipMapLinearFilter:()=>xe,LinearMipMapNearestFilter:()=>Ee,LinearMipmapLinearFilter:()=>be,LinearMipmapNearestFilter:()=>ye,LinearSRGBColorSpace:()=>Nt,LinearToneMapping:()=>$,Loader:()=>_u,LoaderUtils:()=>nd,LoadingManager:()=>Cu,LoopOnce:()=>vt,LoopPingPong:()=>Et,LoopRepeat:()=>yt,LuminanceAlphaFormat:()=>Qe,LuminanceFormat:()=>Oe,MOUSE:()=>o,Material:()=>wr,MaterialLoader:()=>td,MathUtils:()=>Tn,Matrix3:()=>Dn,Matrix4:()=>Ui,MaxEquation:()=>S,Mesh:()=>cs,MeshBasicMaterial:()=>Cr,MeshDepthMaterial:()=>qa,MeshDistanceMaterial:()=>Ya,MeshLambertMaterial:()=>$h,MeshMatcapMaterial:()=>eu,MeshNormalMaterial:()=>Zh,MeshPhongMaterial:()=>Jh,MeshPhysicalMaterial:()=>Xh,MeshStandardMaterial:()=>Yh,MeshToonMaterial:()=>Kh,MinEquation:()=>B,MirroredRepeatWrapping:()=>de,MixOperation:()=>J,MultiplyBlending:()=>w,MultiplyOperation:()=>X,NearestFilter:()=>pe,NearestMipMapLinearFilter:()=>ge,NearestMipMapNearestFilter:()=>fe,NearestMipmapLinearFilter:()=>me,NearestMipmapNearestFilter:()=>Ae,NeverDepth:()=>G,NeverStencilFunc:()=>Xt,NoBlending:()=>y,NoColorSpace:()=>Qt,NoToneMapping:()=>Z,NormalAnimationBlendMode:()=>It,NormalBlending:()=>E,NotEqualDepth:()=>Y,NotEqualStencilFunc:()=>en,NumberKeyframeTrack:()=>mu,Object3D:()=>hr,ObjectLoader:()=>sd,ObjectSpaceNormalMap:()=>Ot,OctahedronBufferGeometry:()=>eA,OctahedronGeometry:()=>kh,OneFactor:()=>L,OneMinusDstAlphaFactor:()=>O,OneMinusDstColorFactor:()=>U,OneMinusSrcAlphaFactor:()=>k,OneMinusSrcColorFactor:()=>R,OrthographicCamera:()=>Hs,PCFShadowMap:()=>p,PCFSoftShadowMap:()=>A,PMREMGenerator:()=>Ks,Path:()=>Wc,PerspectiveCamera:()=>vs,Plane:()=>_s,PlaneBufferGeometry:()=>tA,PlaneGeometry:()=>Ds,PlaneHelper:()=>Lp,PointLight:()=>Yu,PointLightHelper:()=>pp,Points:()=>gc,PointsMaterial:()=>dc,PolarGridHelper:()=>yp,PolyhedronBufferGeometry:()=>nA,PolyhedronGeometry:()=>Kc,PositionalAudio:()=>Ld,PropertyBinding:()=>Nd,PropertyMixer:()=>Rd,QuadraticBezierCurve:()=>Nc,QuadraticBezierCurve3:()=>Gc,Quaternion:()=>li,QuaternionKeyframeTrack:()=>vu,QuaternionLinearInterpolant:()=>gu,REVISION:()=>s,RGBADepthPacking:()=>kt,RGBAFormat:()=>Fe,RGBAIntegerFormat:()=>We,RGBA_ASTC_10x10_Format:()=>At,RGBA_ASTC_10x5_Format:()=>ut,RGBA_ASTC_10x6_Format:()=>dt,RGBA_ASTC_10x8_Format:()=>pt,RGBA_ASTC_12x10_Format:()=>ft,RGBA_ASTC_12x12_Format:()=>mt,RGBA_ASTC_4x4_Format:()=>it,RGBA_ASTC_5x4_Format:()=>rt,RGBA_ASTC_5x5_Format:()=>st,RGBA_ASTC_6x5_Format:()=>ot,RGBA_ASTC_6x6_Format:()=>at,RGBA_ASTC_8x5_Format:()=>lt,RGBA_ASTC_8x6_Format:()=>ct,RGBA_ASTC_8x8_Format:()=>ht,RGBA_BPTC_Format:()=>gt,RGBA_ETC2_EAC_Format:()=>nt,RGBA_PVRTC_2BPPV1_Format:()=>$e,RGBA_PVRTC_4BPPV1_Format:()=>Ze,RGBA_S3TC_DXT1_Format:()=>qe,RGBA_S3TC_DXT3_Format:()=>Ye,RGBA_S3TC_DXT5_Format:()=>Xe,RGBFormat:()=>ke,RGB_ETC1_Format:()=>et,RGB_ETC2_Format:()=>tt,RGB_PVRTC_2BPPV1_Format:()=>Ke,RGB_PVRTC_4BPPV1_Format:()=>Je,RGB_S3TC_DXT1_Format:()=>je,RGFormat:()=>He,RGIntegerFormat:()=>Ve,RawShaderMaterial:()=>qh,Ray:()=>Qi,Raycaster:()=>Jd,RectAreaLight:()=>Zu,RedFormat:()=>Ge,RedIntegerFormat:()=>ze,ReinhardToneMapping:()=>ee,RepeatWrapping:()=>he,ReplaceStencilOp:()=>Ht,ReverseSubtractEquation:()=>I,RingBufferGeometry:()=>iA,RingGeometry:()=>Fh,SRGBColorSpace:()=>Ut,Scene:()=>Al,ShaderChunk:()=>Rs,ShaderLib:()=>ks,ShaderMaterial:()=>ms,ShadowMaterial:()=>jh,Shape:()=>rh,ShapeBufferGeometry:()=>rA,ShapeGeometry:()=>Oh,ShapePath:()=>Op,ShapeUtils:()=>Sh,ShortType:()=>Me,Skeleton:()=>ql,SkeletonHelper:()=>up,SkinnedMesh:()=>zl,Source:()=>Kn,Sphere:()=>Ti,SphereBufferGeometry:()=>sA,SphereGeometry:()=>Qh,Spherical:()=>$d,SphericalHarmonics3:()=>$u,SplineCurve:()=>zc,SpotLight:()=>Hu,SpotLightHelper:()=>ap,Sprite:()=>Dl,SpriteMaterial:()=>vl,SrcAlphaFactor:()=>P,SrcAlphaSaturateFactor:()=>N,SrcColorFactor:()=>D,StaticCopyUsage:()=>hn,StaticDrawUsage:()=>rn,StaticReadUsage:()=>an,StereoCamera:()=>vd,StreamCopyUsage:()=>dn,StreamDrawUsage:()=>on,StreamReadUsage:()=>cn,StringKeyframeTrack:()=>yu,SubtractEquation:()=>_,SubtractiveBlending:()=>x,TOUCH:()=>a,TangentSpaceNormalMap:()=>Ft,TetrahedronBufferGeometry:()=>oA,TetrahedronGeometry:()=>Uh,Texture:()=>ei,TextureLoader:()=>ku,TorusBufferGeometry:()=>aA,TorusGeometry:()=>Nh,TorusKnotBufferGeometry:()=>lA,TorusKnotGeometry:()=>Gh,Triangle:()=>br,TriangleFanDrawMode:()=>Lt,TriangleStripDrawMode:()=>Tt,TrianglesDrawMode:()=>St,TubeBufferGeometry:()=>cA,TubeGeometry:()=>zh,UVMapping:()=>re,Uint16BufferAttribute:()=>Dr,Uint32BufferAttribute:()=>Pr,Uint8BufferAttribute:()=>Sr,Uint8ClampedBufferAttribute:()=>Tr,Uniform:()=>Wd,UniformsGroup:()=>qd,UniformsLib:()=>Ps,UniformsUtils:()=>fs,UnsignedByteType:()=>we,UnsignedInt248Type:()=>Re,UnsignedIntType:()=>Be,UnsignedShort4444Type:()=>Le,UnsignedShort5551Type:()=>De,UnsignedShortType:()=>_e,VSMShadowMap:()=>f,Vector2:()=>Ln,Vector3:()=>ci,Vector4:()=>ti,VectorKeyframeTrack:()=>Eu,VideoTexture:()=>yc,WebGL1Renderer:()=>ul,WebGL3DRenderTarget:()=>oi,WebGLArrayRenderTarget:()=>ri,WebGLCubeRenderTarget:()=>xs,WebGLMultipleRenderTargets:()=>ai,WebGLMultisampleRenderTarget:()=>zp,WebGLRenderTarget:()=>ni,WebGLRenderer:()=>hl,WebGLUtils:()=>Za,WireframeGeometry:()=>Hh,WrapAroundEnding:()=>_t,ZeroCurvatureEnding:()=>Ct,ZeroFactor:()=>T,ZeroSlopeEnding:()=>Mt,ZeroStencilOp:()=>Gt,_SRGBAFormat:()=>fn,sRGBEncoding:()=>Rt});var r={};n.r(r),n.d(r,{computeMikkTSpaceTangents:()=>Zf,computeMorphedAttributes:()=>lm,computeTangents:()=>Kf,deepCloneAttribute:()=>tm,deinterleaveAttribute:()=>im,deinterleaveGeometry:()=>rm,estimateBytesUsed:()=>sm,interleaveAttributes:()=>nm,mergeBufferAttributes:()=>em,mergeBufferGeometries:()=>$f,mergeGroups:()=>cm,mergeVertices:()=>om,toCreasedNormals:()=>hm,toTrianglesDrawMode:()=>am});const s=\"147\",o={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},a={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},l=0,c=1,h=2,u=3,d=0,p=1,A=2,f=3,m=0,g=1,v=2,y=0,E=1,b=2,x=3,w=4,C=5,M=100,_=101,I=102,B=103,S=104,T=200,L=201,D=202,R=203,P=204,k=205,F=206,O=207,Q=208,U=209,N=210,G=0,z=1,H=2,V=3,W=4,j=5,q=6,Y=7,X=0,J=1,K=2,Z=0,$=1,ee=2,te=3,ne=4,ie=5,re=300,se=301,oe=302,ae=303,le=304,ce=306,he=1e3,ue=1001,de=1002,pe=1003,Ae=1004,fe=1004,me=1005,ge=1005,ve=1006,ye=1007,Ee=1007,be=1008,xe=1008,we=1009,Ce=1010,Me=1011,_e=1012,Ie=1013,Be=1014,Se=1015,Te=1016,Le=1017,De=1018,Re=1020,Pe=1021,ke=1022,Fe=1023,Oe=1024,Qe=1025,Ue=1026,Ne=1027,Ge=1028,ze=1029,He=1030,Ve=1031,We=1033,je=33776,qe=33777,Ye=33778,Xe=33779,Je=35840,Ke=35841,Ze=35842,$e=35843,et=36196,tt=37492,nt=37496,it=37808,rt=37809,st=37810,ot=37811,at=37812,lt=37813,ct=37814,ht=37815,ut=37816,dt=37817,pt=37818,At=37819,ft=37820,mt=37821,gt=36492,vt=2200,yt=2201,Et=2202,bt=2300,xt=2301,wt=2302,Ct=2400,Mt=2401,_t=2402,It=2500,Bt=2501,St=0,Tt=1,Lt=2,Dt=3e3,Rt=3001,Pt=3200,kt=3201,Ft=0,Ot=1,Qt=\"\",Ut=\"srgb\",Nt=\"srgb-linear\",Gt=0,zt=7680,Ht=7681,Vt=7682,Wt=7683,jt=34055,qt=34056,Yt=5386,Xt=512,Jt=513,Kt=514,Zt=515,$t=516,en=517,tn=518,nn=519,rn=35044,sn=35048,on=35040,an=35045,ln=35049,cn=35041,hn=35046,un=35050,dn=35042,pn=\"100\",An=\"300 es\",fn=1035;class mn{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,i=n.length;t\u003Ci;t++)n[t].call(this,e);e.target=null}}}const gn=[\"00\",\"01\",\"02\",\"03\",\"04\",\"05\",\"06\",\"07\",\"08\",\"09\",\"0a\",\"0b\",\"0c\",\"0d\",\"0e\",\"0f\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"1a\",\"1b\",\"1c\",\"1d\",\"1e\",\"1f\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"2a\",\"2b\",\"2c\",\"2d\",\"2e\",\"2f\",\"30\",\"31\",\"32\",\"33\",\"34\",\"35\",\"36\",\"37\",\"38\",\"39\",\"3a\",\"3b\",\"3c\",\"3d\",\"3e\",\"3f\",\"40\",\"41\",\"42\",\"43\",\"44\",\"45\",\"46\",\"47\",\"48\",\"49\",\"4a\",\"4b\",\"4c\",\"4d\",\"4e\",\"4f\",\"50\",\"51\",\"52\",\"53\",\"54\",\"55\",\"56\",\"57\",\"58\",\"59\",\"5a\",\"5b\",\"5c\",\"5d\",\"5e\",\"5f\",\"60\",\"61\",\"62\",\"63\",\"64\",\"65\",\"66\",\"67\",\"68\",\"69\",\"6a\",\"6b\",\"6c\",\"6d\",\"6e\",\"6f\",\"70\",\"71\",\"72\",\"73\",\"74\",\"75\",\"76\",\"77\",\"78\",\"79\",\"7a\",\"7b\",\"7c\",\"7d\",\"7e\",\"7f\",\"80\",\"81\",\"82\",\"83\",\"84\",\"85\",\"86\",\"87\",\"88\",\"89\",\"8a\",\"8b\",\"8c\",\"8d\",\"8e\",\"8f\",\"90\",\"91\",\"92\",\"93\",\"94\",\"95\",\"96\",\"97\",\"98\",\"99\",\"9a\",\"9b\",\"9c\",\"9d\",\"9e\",\"9f\",\"a0\",\"a1\",\"a2\",\"a3\",\"a4\",\"a5\",\"a6\",\"a7\",\"a8\",\"a9\",\"aa\",\"ab\",\"ac\",\"ad\",\"ae\",\"af\",\"b0\",\"b1\",\"b2\",\"b3\",\"b4\",\"b5\",\"b6\",\"b7\",\"b8\",\"b9\",\"ba\",\"bb\",\"bc\",\"bd\",\"be\",\"bf\",\"c0\",\"c1\",\"c2\",\"c3\",\"c4\",\"c5\",\"c6\",\"c7\",\"c8\",\"c9\",\"ca\",\"cb\",\"cc\",\"cd\",\"ce\",\"cf\",\"d0\",\"d1\",\"d2\",\"d3\",\"d4\",\"d5\",\"d6\",\"d7\",\"d8\",\"d9\",\"da\",\"db\",\"dc\",\"dd\",\"de\",\"df\",\"e0\",\"e1\",\"e2\",\"e3\",\"e4\",\"e5\",\"e6\",\"e7\",\"e8\",\"e9\",\"ea\",\"eb\",\"ec\",\"ed\",\"ee\",\"ef\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"fa\",\"fb\",\"fc\",\"fd\",\"fe\",\"ff\"];let vn=1234567;const yn=Math.PI/180,En=180/Math.PI;function bn(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(gn[255&e]+gn[e>>8&255]+gn[e>>16&255]+gn[e>>24&255]+\"-\"+gn[255&t]+gn[t>>8&255]+\"-\"+gn[t>>16&15|64]+gn[t>>24&255]+\"-\"+gn[63&n|128]+gn[n>>8&255]+\"-\"+gn[n>>16&255]+gn[n>>24&255]+gn[255&i]+gn[i>>8&255]+gn[i>>16&255]+gn[i>>24&255]).toLowerCase()}function xn(e,t,n){return Math.max(t,Math.min(n,e))}function wn(e,t){return(e%t+t)%t}function Cn(e,t,n){return(1-n)*e+n*t}function Mn(e){return 0==(e&e-1)&&0!==e}function _n(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function In(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Bn(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error(\"Invalid component type.\")}}function Sn(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error(\"Invalid component type.\")}}var Tn=Object.freeze({__proto__:null,DEG2RAD:yn,RAD2DEG:En,generateUUID:bn,clamp:xn,euclideanModulo:wn,mapLinear:function(e,t,n,i,r){return i+(e-t)*(r-i)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:Cn,damp:function(e,t,n,i){return Cn(e,t,1-Math.exp(-n*i))},pingpong:function(e,t=1){return t-Math.abs(wn(e,2*t)-t)},smoothstep:function(e,t,n){return e\u003C=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e\u003C=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(vn=e);let t=vn+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*yn},radToDeg:function(e){return e*En},isPowerOfTwo:Mn,ceilPowerOfTwo:_n,floorPowerOfTwo:In,setQuaternionFromProperEuler:function(e,t,n,i,r){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((t+i)/2),h=o((t+i)/2),u=s((t-i)/2),d=o((t-i)/2),p=s((i-t)/2),A=o((i-t)/2);switch(r){case\"XYX\":e.set(a*h,l*u,l*d,a*c);break;case\"YZY\":e.set(l*d,a*h,l*u,a*c);break;case\"ZXZ\":e.set(l*u,l*d,a*h,a*c);break;case\"XZX\":e.set(a*h,l*A,l*p,a*c);break;case\"YXY\":e.set(l*p,a*h,l*A,a*c);break;case\"ZYZ\":e.set(l*A,l*p,a*h,a*c);break;default:console.warn(\"THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: \"+r)}},normalize:Sn,denormalize:Bn});class Ln{constructor(e=0,t=0){Ln.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error(\"index is out of range: \"+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error(\"index is out of range: \"+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x\u003C0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y\u003C0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,s=this.y-e.y;return this.x=r*n-s*i+e.x,this.y=r*i+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Dn{constructor(){Dn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,n,i,r,s,o,a,l){const c=this.elements;return c[0]=e,c[1]=i,c[2]=o,c[3]=t,c[4]=r,c[5]=a,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,s=n[0],o=n[3],a=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],A=i[0],f=i[3],m=i[6],g=i[1],v=i[4],y=i[7],E=i[2],b=i[5],x=i[8];return r[0]=s*A+o*g+a*E,r[3]=s*f+o*v+a*b,r[6]=s*m+o*y+a*x,r[1]=l*A+c*g+h*E,r[4]=l*f+c*v+h*b,r[7]=l*m+c*y+h*x,r[2]=u*A+d*g+p*E,r[5]=u*f+d*v+p*b,r[8]=u*m+d*y+p*x,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8];return t*s*c-t*o*l-n*r*c+n*o*a+i*r*l-i*s*a}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],h=c*s-o*l,u=o*a-c*r,d=l*r-s*a,p=t*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const A=1/p;return e[0]=h*A,e[1]=(i*l-c*n)*A,e[2]=(o*n-i*s)*A,e[3]=u*A,e[4]=(c*t-i*a)*A,e[5]=(i*r-o*t)*A,e[6]=d*A,e[7]=(n*a-l*t)*A,e[8]=(s*t-n*r)*A,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,s,o){const a=Math.cos(r),l=Math.sin(r);return this.set(n*a,n*l,-n*(a*s+l*o)+s+e,-i*l,i*a,-i*(-l*s+a*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Rn.makeScale(e,t)),this}rotate(e){return this.premultiply(Rn.makeRotation(-e)),this}translate(e,t){return this.premultiply(Rn.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e\u003C9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n\u003C9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Rn=new Dn;function Pn(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const kn={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Fn(e,t){return new kn[e](t)}function On(e){return document.createElementNS(\"http://www.w3.org/1999/xhtml\",e)}function Qn(e){return e\u003C.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Un(e){return e\u003C.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const Nn={[Ut]:{[Nt]:Qn},[Nt]:{[Ut]:Un}},Gn={legacyMode:!0,get workingColorSpace(){return Nt},set workingColorSpace(e){console.warn(\"THREE.ColorManagement: .workingColorSpace is readonly.\")},convert:function(e,t,n){if(this.legacyMode||t===n||!t||!n)return e;if(Nn[t]&&void 0!==Nn[t][n]){const i=Nn[t][n];return e.r=i(e.r),e.g=i(e.g),e.b=i(e.b),e}throw new Error(\"Unsupported color space conversion.\")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},zn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Hn={r:0,g:0,b:0},Vn={h:0,s:0,l:0},Wn={h:0,s:0,l:0};function jn(e,t,n){return n\u003C0&&(n+=1),n>1&&(n-=1),n\u003C1/6?e+6*(t-e)*n:n\u003C.5?t:n\u003C2/3?e+6*(t-e)*(2/3-n):e}function qn(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}class Yn{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):\"number\"==typeof e?this.setHex(e):\"string\"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ut){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Gn.toWorkingColorSpace(this,t),this}setRGB(e,t,n,i=Gn.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gn.toWorkingColorSpace(this,i),this}setHSL(e,t,n,i=Gn.workingColorSpace){if(e=wn(e,1),t=xn(t,0,1),n=xn(n,0,1),0===t)this.r=this.g=this.b=n;else{const i=n\u003C=.5?n*(1+t):n+t-n*t,r=2*n-i;this.r=jn(r,i,e+1/3),this.g=jn(r,i,e),this.b=jn(r,i,e-1/3)}return Gn.toWorkingColorSpace(this,i),this}setStyle(e,t=Ut){function n(t){void 0!==t&&parseFloat(t)\u003C1&&console.warn(\"THREE.Color: Alpha component of \"+e+\" will be ignored.\")}let i;if(i=/^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec(e)){let e;const r=i[1],s=i[2];switch(r){case\"rgb\":case\"rgba\":if(e=/^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,Gn.toWorkingColorSpace(this,t),n(e[4]),this;if(e=/^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,Gn.toWorkingColorSpace(this,t),n(e[4]),this;break;case\"hsl\":case\"hsla\":if(e=/^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(s)){const i=parseFloat(e[1])/360,r=parseFloat(e[2])/100,s=parseFloat(e[3])/100;return n(e[4]),this.setHSL(i,r,s,t)}}}else if(i=/^\\#([A-Fa-f\\d]+)$/.exec(e)){const e=i[1],n=e.length;if(3===n)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,Gn.toWorkingColorSpace(this,t),this;if(6===n)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,Gn.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t=Ut){const n=zn[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn(\"THREE.Color: Unknown color \"+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Qn(e.r),this.g=Qn(e.g),this.b=Qn(e.b),this}copyLinearToSRGB(e){return this.r=Un(e.r),this.g=Un(e.g),this.b=Un(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ut){return Gn.fromWorkingColorSpace(qn(this,Hn),e),xn(255*Hn.r,0,255)\u003C\u003C16^xn(255*Hn.g,0,255)\u003C\u003C8^xn(255*Hn.b,0,255)\u003C\u003C0}getHexString(e=Ut){return(\"000000\"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gn.workingColorSpace){Gn.fromWorkingColorSpace(qn(this,Hn),t);const n=Hn.r,i=Hn.g,r=Hn.b,s=Math.max(n,i,r),o=Math.min(n,i,r);let a,l;const c=(o+s)/2;if(o===s)a=0,l=0;else{const e=s-o;switch(l=c\u003C=.5?e/(s+o):e/(2-s-o),s){case n:a=(i-r)/e+(i\u003Cr?6:0);break;case i:a=(r-n)/e+2;break;case r:a=(n-i)/e+4}a/=6}return e.h=a,e.s=l,e.l=c,e}getRGB(e,t=Gn.workingColorSpace){return Gn.fromWorkingColorSpace(qn(this,Hn),t),e.r=Hn.r,e.g=Hn.g,e.b=Hn.b,e}getStyle(e=Ut){return Gn.fromWorkingColorSpace(qn(this,Hn),e),e!==Ut?`color(${e} ${Hn.r} ${Hn.g} ${Hn.b})`:`rgb(${255*Hn.r|0},${255*Hn.g|0},${255*Hn.b|0})`}offsetHSL(e,t,n){return this.getHSL(Vn),Vn.h+=e,Vn.s+=t,Vn.l+=n,this.setHSL(Vn.h,Vn.s,Vn.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Vn),e.getHSL(Wn);const n=Cn(Vn.h,Wn.h,t),i=Cn(Vn.s,Wn.s,t),r=Cn(Vn.l,Wn.l,t);return this.setHSL(n,i,r),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}let Xn;Yn.NAMES=zn;class Jn{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if(\"undefined\"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Xn&&(Xn=On(\"canvas\")),Xn.width=e.width,Xn.height=e.height;const n=Xn.getContext(\"2d\");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Xn}return t.width>2048||t.height>2048?(console.warn(\"THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons\",e),t.toDataURL(\"image/jpeg\",.6)):t.toDataURL(\"image/png\")}static sRGBToLinear(e){if(\"undefined\"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||\"undefined\"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||\"undefined\"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=On(\"canvas\");t.width=e.width,t.height=e.height;const n=t.getContext(\"2d\");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let e=0;e\u003Cr.length;e++)r[e]=255*Qn(r[e]/255);return n.putImageData(i,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e\u003Ct.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Qn(t[e]/255)):t[e]=Qn(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn(\"THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.\"),e}}class Kn{constructor(e=null){this.isSource=!0,this.uuid=bn(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||\"string\"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:\"\"},i=this.data;if(null!==i){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t\u003Cn;t++)i[t].isDataTexture?e.push(Zn(i[t].image)):e.push(Zn(i[t]))}else e=Zn(i);n.url=e}return t||(e.images[this.uuid]=n),n}}function Zn(e){return\"undefined\"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||\"undefined\"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||\"undefined\"!=typeof ImageBitmap&&e instanceof ImageBitmap?Jn.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn(\"THREE.Texture: Unable to serialize Texture.\"),{})}let $n=0;class ei extends mn{constructor(e=ei.DEFAULT_IMAGE,t=ei.DEFAULT_MAPPING,n=ue,i=ue,r=ve,s=be,o=Fe,a=we,l=ei.DEFAULT_ANISOTROPY,c=Dt){super(),this.isTexture=!0,Object.defineProperty(this,\"id\",{value:$n++}),this.uuid=bn(),this.name=\"\",this.source=new Kn(e),this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=a,this.offset=new Ln(0,0),this.repeat=new Ln(1,1),this.center=new Ln(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Dn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||\"string\"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:\"Texture\",generator:\"Texture.toJSON\"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return\"{}\"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:\"dispose\"})}transformUv(e){if(this.mapping!==re)return e;if(e.applyMatrix3(this.matrix),e.x\u003C0||e.x>1)switch(this.wrapS){case he:e.x=e.x-Math.floor(e.x);break;case ue:e.x=e.x\u003C0?0:1;break;case de:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y\u003C0||e.y>1)switch(this.wrapT){case he:e.y=e.y-Math.floor(e.y);break;case ue:e.y=e.y\u003C0?0:1;break;case de:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}ei.DEFAULT_IMAGE=null,ei.DEFAULT_MAPPING=re,ei.DEFAULT_ANISOTROPY=1;class ti{constructor(e=0,t=0,n=0,i=1){ti.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error(\"index is out of range: \"+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error(\"index is out of range: \"+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*t+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*t+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*t+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t\u003C1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r;const s=.01,o=.1,a=e.elements,l=a[0],c=a[4],h=a[8],u=a[1],d=a[5],p=a[9],A=a[2],f=a[6],m=a[10];if(Math.abs(c-u)\u003Cs&&Math.abs(h-A)\u003Cs&&Math.abs(p-f)\u003Cs){if(Math.abs(c+u)\u003Co&&Math.abs(h+A)\u003Co&&Math.abs(p+f)\u003Co&&Math.abs(l+d+m-3)\u003Co)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,a=(d+1)/2,g=(m+1)/2,v=(c+u)/4,y=(h+A)/4,E=(p+f)/4;return e>a&&e>g?e\u003Cs?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(e),i=v/n,r=y/n):a>g?a\u003Cs?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(a),n=v/i,r=E/i):g\u003Cs?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(g),n=y/r,i=E/r),this.set(n,i,r,t),this}let g=Math.sqrt((f-p)*(f-p)+(h-A)*(h-A)+(u-c)*(u-c));return Math.abs(g)\u003C.001&&(g=1),this.x=(f-p)/g,this.y=(h-A)/g,this.z=(u-c)/g,this.w=Math.acos((l+d+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x\u003C0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y\u003C0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z\u003C0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w\u003C0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class ni extends mn{constructor(e=1,t=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new ti(0,0,e,t),this.scissorTest=!1,this.viewport=new ti(0,0,e,t);const i={width:e,height:t,depth:1};this.texture=new ei(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ve,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Kn(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:\"dispose\"})}}class ii extends ei{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=pe,this.minFilter=pe,this.wrapR=ue,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ri extends ni{constructor(e=1,t=1,n=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new ii(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class si extends ei{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=pe,this.minFilter=pe,this.wrapR=ue,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class oi extends ni{constructor(e=1,t=1,n=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new si(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class ai extends ni{constructor(e=1,t=1,n=1,i={}){super(e,t,i),this.isWebGLMultipleRenderTargets=!0;const r=this.texture;this.texture=[];for(let e=0;e\u003Cn;e++)this.texture[e]=r.clone(),this.texture[e].isRenderTargetTexture=!0}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.texture.length;i\u003Cr;i++)this.texture[i].image.width=e,this.texture[i].image.height=t,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let t=0,n=e.texture.length;t\u003Cn;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}}class li{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,s,o){let a=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3];const u=r[s+0],d=r[s+1],p=r[s+2],A=r[s+3];if(0===o)return e[t+0]=a,e[t+1]=l,e[t+2]=c,void(e[t+3]=h);if(1===o)return e[t+0]=u,e[t+1]=d,e[t+2]=p,void(e[t+3]=A);if(h!==A||a!==u||l!==d||c!==p){let e=1-o;const t=a*u+l*d+c*p+h*A,n=t>=0?1:-1,i=1-t*t;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,t*n);e=Math.sin(e*s)/r,o=Math.sin(o*s)/r}const r=o*n;if(a=a*e+u*r,l=l*e+d*r,c=c*e+p*r,h=h*e+A*r,e===1-o){const e=1/Math.sqrt(a*a+l*l+c*c+h*h);a*=e,l*=e,c*=e,h*=e}}e[t]=a,e[t+1]=l,e[t+2]=c,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,i,r,s){const o=n[i],a=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return e[t]=o*p+c*h+a*d-l*u,e[t+1]=a*p+c*u+l*h-o*d,e[t+2]=l*p+c*d+o*u-a*h,e[t+3]=c*p-o*h-a*u-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,i=e._y,r=e._z,s=e._order,o=Math.cos,a=Math.sin,l=o(n/2),c=o(i/2),h=o(r/2),u=a(n/2),d=a(i/2),p=a(r/2);switch(s){case\"XYZ\":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case\"YXZ\":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case\"ZXY\":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case\"ZYX\":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case\"YZX\":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case\"XZY\":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn(\"THREE.Quaternion: .setFromEuler() encountered an unknown order: \"+s)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],s=t[1],o=t[5],a=t[9],l=t[2],c=t[6],h=t[10],u=n+o+h;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(c-a)*e,this._y=(r-l)*e,this._z=(s-i)*e}else if(n>o&&n>h){const e=2*Math.sqrt(1+n-o-h);this._w=(c-a)/e,this._x=.25*e,this._y=(i+s)/e,this._z=(r+l)/e}else if(o>h){const e=2*Math.sqrt(1+o-n-h);this._w=(r-l)/e,this._x=(i+s)/e,this._y=.25*e,this._z=(a+c)/e}else{const e=2*Math.sqrt(1+h-n-o);this._w=(s-i)/e,this._x=(r+l)/e,this._y=(a+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n\u003CNumber.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(xn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,s=e._w,o=t._x,a=t._y,l=t._z,c=t._w;return this._x=n*c+s*o+i*l-r*a,this._y=i*c+s*a+r*o-n*l,this._z=r*c+s*l+n*a-i*o,this._w=s*c-n*o-i*a-r*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,i=this._y,r=this._z,s=this._w;let o=s*e._w+n*e._x+i*e._y+r*e._z;if(o\u003C0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const a=1-o*o;if(a\u003C=Number.EPSILON){const e=1-t;return this._w=e*s+t*this._w,this._x=e*n+t*this._x,this._y=e*i+t*this._y,this._z=e*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(a),c=Math.atan2(l,o),h=Math.sin((1-t)*c)/l,u=Math.sin(t*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(i),n*Math.sin(r),n*Math.cos(r),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ci{constructor(e=0,t=0,n=0){ci.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error(\"index is out of range: \"+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error(\"index is out of range: \"+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(ui.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(ui.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,s=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,s=e.y,o=e.z,a=e.w,l=a*t+s*i-o*n,c=a*n+o*t-r*i,h=a*i+r*n-s*t,u=-r*t-s*n-o*i;return this.x=l*a+u*-r+c*-o-h*-s,this.y=c*a+u*-s+h*-r-l*-o,this.z=h*a+u*-o+l*-s-c*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x\u003C0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y\u003C0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z\u003C0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,s=t.x,o=t.y,a=t.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return hi.copy(this).projectOnVector(e),this.sub(hi)}reflect(e){return this.sub(hi.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(xn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const hi=new ci,ui=new li;class di{constructor(e=new ci(1/0,1/0,1/0),t=new ci(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,o=-1/0;for(let a=0,l=e.length;a\u003Cl;a+=3){const l=e[a],c=e[a+1],h=e[a+2];l\u003Ct&&(t=l),c\u003Cn&&(n=c),h\u003Ci&&(i=h),l>r&&(r=l),c>s&&(s=c),h>o&&(o=h)}return this.min.set(t,n,i),this.max.set(r,s,o),this}setFromBufferAttribute(e){let t=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,o=-1/0;for(let a=0,l=e.count;a\u003Cl;a++){const l=e.getX(a),c=e.getY(a),h=e.getZ(a);l\u003Ct&&(t=l),c\u003Cn&&(n=c),h\u003Ci&&(i=h),l>r&&(r=l),c>s&&(s=c),h>o&&(o=h)}return this.min.set(t,n,i),this.max.set(r,s,o),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t\u003Cn;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ai.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x\u003Cthis.min.x||this.max.y\u003Cthis.min.y||this.max.z\u003Cthis.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n)if(t&&null!=n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,i=t.count;n\u003Ci;n++)Ai.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(Ai)}else null===n.boundingBox&&n.computeBoundingBox(),fi.copy(n.boundingBox),fi.applyMatrix4(e.matrixWorld),this.union(fi);const i=e.children;for(let e=0,n=i.length;e\u003Cn;e++)this.expandByObject(i[e],t);return this}containsPoint(e){return!(e.x\u003Cthis.min.x||e.x>this.max.x||e.y\u003Cthis.min.y||e.y>this.max.y||e.z\u003Cthis.min.z||e.z>this.max.z)}containsBox(e){return this.min.x\u003C=e.min.x&&e.max.x\u003C=this.max.x&&this.min.y\u003C=e.min.y&&e.max.y\u003C=this.max.y&&this.min.z\u003C=e.min.z&&e.max.z\u003C=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x\u003Cthis.min.x||e.min.x>this.max.x||e.max.y\u003Cthis.min.y||e.min.y>this.max.y||e.max.z\u003Cthis.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ai),Ai.distanceToSquared(e.center)\u003C=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t\u003C=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(xi),wi.subVectors(this.max,xi),mi.subVectors(e.a,xi),gi.subVectors(e.b,xi),vi.subVectors(e.c,xi),yi.subVectors(gi,mi),Ei.subVectors(vi,gi),bi.subVectors(mi,vi);let t=[0,-yi.z,yi.y,0,-Ei.z,Ei.y,0,-bi.z,bi.y,yi.z,0,-yi.x,Ei.z,0,-Ei.x,bi.z,0,-bi.x,-yi.y,yi.x,0,-Ei.y,Ei.x,0,-bi.y,bi.x,0];return!!_i(t,mi,gi,vi,wi)&&(t=[1,0,0,0,1,0,0,0,1],!!_i(t,mi,gi,vi,wi)&&(Ci.crossVectors(yi,Ei),t=[Ci.x,Ci.y,Ci.z],_i(t,mi,gi,vi,wi)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Ai.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(Ai).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(pi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),pi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),pi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),pi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),pi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),pi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),pi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),pi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(pi)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const pi=[new ci,new ci,new ci,new ci,new ci,new ci,new ci,new ci],Ai=new ci,fi=new di,mi=new ci,gi=new ci,vi=new ci,yi=new ci,Ei=new ci,bi=new ci,xi=new ci,wi=new ci,Ci=new ci,Mi=new ci;function _i(e,t,n,i,r){for(let s=0,o=e.length-3;s\u003C=o;s+=3){Mi.fromArray(e,s);const o=r.x*Math.abs(Mi.x)+r.y*Math.abs(Mi.y)+r.z*Math.abs(Mi.z),a=t.dot(Mi),l=n.dot(Mi),c=i.dot(Mi);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>o)return!1}return!0}const Ii=new di,Bi=new ci,Si=new ci;class Ti{constructor(e=new ci,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Ii.setFromPoints(e).getCenter(n);let i=0;for(let t=0,r=e.length;t\u003Cr;t++)i=Math.max(i,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius\u003C0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)\u003C=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)\u003C=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))\u003C=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Bi.subVectors(e,this.center);const t=Bi.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(Bi,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(Si.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Bi.copy(e.center).add(Si)),this.expandByPoint(Bi.copy(e.center).sub(Si))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Li=new ci,Di=new ci,Ri=new ci,Pi=new ci,ki=new ci,Fi=new ci,Oi=new ci;class Qi{constructor(e=new ci,t=new ci(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Li)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n\u003C0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Li.subVectors(e,this.origin).dot(this.direction);return t\u003C0?this.origin.distanceToSquared(e):(Li.copy(this.direction).multiplyScalar(t).add(this.origin),Li.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Di.copy(e).add(t).multiplyScalar(.5),Ri.copy(t).sub(e).normalize(),Pi.copy(this.origin).sub(Di);const r=.5*e.distanceTo(t),s=-this.direction.dot(Ri),o=Pi.dot(this.direction),a=-Pi.dot(Ri),l=Pi.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*a-o,u=s*o-a,p=r*c,h>=0)if(u>=-p)if(u\u003C=p){const e=1/c;h*=e,u*=e,d=h*(h+s*u+2*o)+u*(s*h+u+2*a)+l}else u=r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;else u=-r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;else u\u003C=-p?(h=Math.max(0,-(-s*r+o)),u=h>0?-r:Math.min(Math.max(-r,-a),r),d=-h*h+u*(u+2*a)+l):u\u003C=p?(h=0,u=Math.min(Math.max(-r,-a),r),d=u*(u+2*a)+l):(h=Math.max(0,-(s*r+o)),u=h>0?r:Math.min(Math.max(-r,-a),r),d=-h*h+u*(u+2*a)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;return n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),i&&i.copy(Ri).multiplyScalar(u).add(Di),d}intersectSphere(e,t){Li.subVectors(e.center,this.origin);const n=Li.dot(this.direction),i=Li.dot(Li)-n*n,r=e.radius*e.radius;if(i>r)return null;const s=Math.sqrt(r-i),o=n-s,a=n+s;return o\u003C0&&a\u003C0?null:o\u003C0?this.at(a,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)\u003C=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t\u003C0}intersectBox(e,t){let n,i,r,s,o,a;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(e.min.x-u.x)*l,i=(e.max.x-u.x)*l):(n=(e.max.x-u.x)*l,i=(e.min.x-u.x)*l),c>=0?(r=(e.min.y-u.y)*c,s=(e.max.y-u.y)*c):(r=(e.max.y-u.y)*c,s=(e.min.y-u.y)*c),n>s||r>i?null:((r>n||isNaN(n))&&(n=r),(s\u003Ci||isNaN(i))&&(i=s),h>=0?(o=(e.min.z-u.z)*h,a=(e.max.z-u.z)*h):(o=(e.max.z-u.z)*h,a=(e.min.z-u.z)*h),n>a||o>i?null:((o>n||n!=n)&&(n=o),(a\u003Ci||i!=i)&&(i=a),i\u003C0?null:this.at(n>=0?n:i,t)))}intersectsBox(e){return null!==this.intersectBox(e,Li)}intersectTriangle(e,t,n,i,r){ki.subVectors(t,e),Fi.subVectors(n,e),Oi.crossVectors(ki,Fi);let s,o=this.direction.dot(Oi);if(o>0){if(i)return null;s=1}else{if(!(o\u003C0))return null;s=-1,o=-o}Pi.subVectors(this.origin,e);const a=s*this.direction.dot(Fi.crossVectors(Pi,Fi));if(a\u003C0)return null;const l=s*this.direction.dot(ki.cross(Pi));if(l\u003C0)return null;if(a+l>o)return null;const c=-s*Pi.dot(Oi);return c\u003C0?null:this.at(c/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Ui{constructor(){Ui.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,n,i,r,s,o,a,l,c,h,u,d,p,A,f){const m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=i,m[1]=r,m[5]=s,m[9]=o,m[13]=a,m[2]=l,m[6]=c,m[10]=h,m[14]=u,m[3]=d,m[7]=p,m[11]=A,m[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Ui).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/Ni.setFromMatrixColumn(e,0).length(),r=1/Ni.setFromMatrixColumn(e,1).length(),s=1/Ni.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,r=e.z,s=Math.cos(n),o=Math.sin(n),a=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if(\"XYZ\"===e.order){const e=s*c,n=s*h,i=o*c,r=o*h;t[0]=a*c,t[4]=-a*h,t[8]=l,t[1]=n+i*l,t[5]=e-r*l,t[9]=-o*a,t[2]=r-e*l,t[6]=i+n*l,t[10]=s*a}else if(\"YXZ\"===e.order){const e=a*c,n=a*h,i=l*c,r=l*h;t[0]=e+r*o,t[4]=i*o-n,t[8]=s*l,t[1]=s*h,t[5]=s*c,t[9]=-o,t[2]=n*o-i,t[6]=r+e*o,t[10]=s*a}else if(\"ZXY\"===e.order){const e=a*c,n=a*h,i=l*c,r=l*h;t[0]=e-r*o,t[4]=-s*h,t[8]=i+n*o,t[1]=n+i*o,t[5]=s*c,t[9]=r-e*o,t[2]=-s*l,t[6]=o,t[10]=s*a}else if(\"ZYX\"===e.order){const e=s*c,n=s*h,i=o*c,r=o*h;t[0]=a*c,t[4]=i*l-n,t[8]=e*l+r,t[1]=a*h,t[5]=r*l+e,t[9]=n*l-i,t[2]=-l,t[6]=o*a,t[10]=s*a}else if(\"YZX\"===e.order){const e=s*a,n=s*l,i=o*a,r=o*l;t[0]=a*c,t[4]=r-e*h,t[8]=i*h+n,t[1]=h,t[5]=s*c,t[9]=-o*c,t[2]=-l*c,t[6]=n*h+i,t[10]=e-r*h}else if(\"XZY\"===e.order){const e=s*a,n=s*l,i=o*a,r=o*l;t[0]=a*c,t[4]=-h,t[8]=l*c,t[1]=e*h+r,t[5]=s*c,t[9]=n*h-i,t[2]=i*h-n,t[6]=o*c,t[10]=r*h+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(zi,e,Hi)}lookAt(e,t,n){const i=this.elements;return ji.subVectors(e,t),0===ji.lengthSq()&&(ji.z=1),ji.normalize(),Vi.crossVectors(n,ji),0===Vi.lengthSq()&&(1===Math.abs(n.z)?ji.x+=1e-4:ji.z+=1e-4,ji.normalize(),Vi.crossVectors(n,ji)),Vi.normalize(),Wi.crossVectors(ji,Vi),i[0]=Vi.x,i[4]=Wi.x,i[8]=ji.x,i[1]=Vi.y,i[5]=Wi.y,i[9]=ji.y,i[2]=Vi.z,i[6]=Wi.z,i[10]=ji.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,s=n[0],o=n[4],a=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],A=n[6],f=n[10],m=n[14],g=n[3],v=n[7],y=n[11],E=n[15],b=i[0],x=i[4],w=i[8],C=i[12],M=i[1],_=i[5],I=i[9],B=i[13],S=i[2],T=i[6],L=i[10],D=i[14],R=i[3],P=i[7],k=i[11],F=i[15];return r[0]=s*b+o*M+a*S+l*R,r[4]=s*x+o*_+a*T+l*P,r[8]=s*w+o*I+a*L+l*k,r[12]=s*C+o*B+a*D+l*F,r[1]=c*b+h*M+u*S+d*R,r[5]=c*x+h*_+u*T+d*P,r[9]=c*w+h*I+u*L+d*k,r[13]=c*C+h*B+u*D+d*F,r[2]=p*b+A*M+f*S+m*R,r[6]=p*x+A*_+f*T+m*P,r[10]=p*w+A*I+f*L+m*k,r[14]=p*C+A*B+f*D+m*F,r[3]=g*b+v*M+y*S+E*R,r[7]=g*x+v*_+y*T+E*P,r[11]=g*w+v*I+y*L+E*k,r[15]=g*C+v*B+y*D+E*F,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],s=e[1],o=e[5],a=e[9],l=e[13],c=e[2],h=e[6],u=e[10],d=e[14];return e[3]*(+r*a*h-i*l*h-r*o*u+n*l*u+i*o*d-n*a*d)+e[7]*(+t*a*d-t*l*u+r*s*u-i*s*d+i*l*c-r*a*c)+e[11]*(+t*l*h-t*o*d-r*s*h+n*s*d+r*o*c-n*l*c)+e[15]*(-i*o*c-t*a*h+t*o*u+i*s*h-n*s*u+n*a*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11],p=e[12],A=e[13],f=e[14],m=e[15],g=h*f*l-A*u*l+A*a*d-o*f*d-h*a*m+o*u*m,v=p*u*l-c*f*l-p*a*d+s*f*d+c*a*m-s*u*m,y=c*A*l-p*h*l+p*o*d-s*A*d-c*o*m+s*h*m,E=p*h*a-c*A*a-p*o*u+s*A*u+c*o*f-s*h*f,b=t*g+n*v+i*y+r*E;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/b;return e[0]=g*x,e[1]=(A*u*r-h*f*r-A*i*d+n*f*d+h*i*m-n*u*m)*x,e[2]=(o*f*r-A*a*r+A*i*l-n*f*l-o*i*m+n*a*m)*x,e[3]=(h*a*r-o*u*r-h*i*l+n*u*l+o*i*d-n*a*d)*x,e[4]=v*x,e[5]=(c*f*r-p*u*r+p*i*d-t*f*d-c*i*m+t*u*m)*x,e[6]=(p*a*r-s*f*r-p*i*l+t*f*l+s*i*m-t*a*m)*x,e[7]=(s*u*r-c*a*r+c*i*l-t*u*l-s*i*d+t*a*d)*x,e[8]=y*x,e[9]=(p*h*r-c*A*r-p*n*d+t*A*d+c*n*m-t*h*m)*x,e[10]=(s*A*r-p*o*r+p*n*l-t*A*l-s*n*m+t*o*m)*x,e[11]=(c*o*r-s*h*r-c*n*l+t*h*l+s*n*d-t*o*d)*x,e[12]=E*x,e[13]=(c*A*i-p*h*i+p*n*u-t*A*u-c*n*f+t*h*f)*x,e[14]=(p*o*i-s*A*i-p*n*a+t*A*a+s*n*f-t*o*f)*x,e[15]=(s*h*i-c*o*i+c*n*a-t*h*a-s*n*u+t*o*u)*x,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,s=e.x,o=e.y,a=e.z,l=r*s,c=r*o;return this.set(l*s+n,l*o-i*a,l*a+i*o,0,l*o+i*a,c*o+n,c*a-i*s,0,l*a-i*o,c*a+i*s,r*a*a+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,s){return this.set(1,n,r,0,e,1,s,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,s=t._y,o=t._z,a=t._w,l=r+r,c=s+s,h=o+o,u=r*l,d=r*c,p=r*h,A=s*c,f=s*h,m=o*h,g=a*l,v=a*c,y=a*h,E=n.x,b=n.y,x=n.z;return i[0]=(1-(A+m))*E,i[1]=(d+y)*E,i[2]=(p-v)*E,i[3]=0,i[4]=(d-y)*b,i[5]=(1-(u+m))*b,i[6]=(f+g)*b,i[7]=0,i[8]=(p+v)*x,i[9]=(f-g)*x,i[10]=(1-(u+A))*x,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=Ni.set(i[0],i[1],i[2]).length();const s=Ni.set(i[4],i[5],i[6]).length(),o=Ni.set(i[8],i[9],i[10]).length();this.determinant()\u003C0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],Gi.copy(this);const a=1/r,l=1/s,c=1/o;return Gi.elements[0]*=a,Gi.elements[1]*=a,Gi.elements[2]*=a,Gi.elements[4]*=l,Gi.elements[5]*=l,Gi.elements[6]*=l,Gi.elements[8]*=c,Gi.elements[9]*=c,Gi.elements[10]*=c,t.setFromRotationMatrix(Gi),n.x=r,n.y=s,n.z=o,this}makePerspective(e,t,n,i,r,s){const o=this.elements,a=2*r/(t-e),l=2*r/(n-i),c=(t+e)/(t-e),h=(n+i)/(n-i),u=-(s+r)/(s-r),d=-2*s*r/(s-r);return o[0]=a,o[4]=0,o[8]=c,o[12]=0,o[1]=0,o[5]=l,o[9]=h,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=d,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,n,i,r,s){const o=this.elements,a=1/(t-e),l=1/(n-i),c=1/(s-r),h=(t+e)*a,u=(n+i)*l,d=(s+r)*c;return o[0]=2*a,o[4]=0,o[8]=0,o[12]=-h,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*c,o[14]=-d,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e\u003C16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n\u003C16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const Ni=new ci,Gi=new Ui,zi=new ci(0,0,0),Hi=new ci(1,1,1),Vi=new ci,Wi=new ci,ji=new ci,qi=new Ui,Yi=new li;class Xi{constructor(e=0,t=0,n=0,i=Xi.DefaultOrder){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,r=i[0],s=i[4],o=i[8],a=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(t){case\"XYZ\":this._y=Math.asin(xn(o,-1,1)),Math.abs(o)\u003C.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case\"YXZ\":this._x=Math.asin(-xn(c,-1,1)),Math.abs(c)\u003C.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case\"ZXY\":this._x=Math.asin(xn(u,-1,1)),Math.abs(u)\u003C.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(a,r));break;case\"ZYX\":this._y=Math.asin(-xn(h,-1,1)),Math.abs(h)\u003C.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case\"YZX\":this._z=Math.asin(xn(a,-1,1)),Math.abs(a)\u003C.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(o,d));break;case\"XZY\":this._z=Math.asin(-xn(s,-1,1)),Math.abs(s)\u003C.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn(\"THREE.Euler: .setFromRotationMatrix() encountered an unknown order: \"+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return qi.makeRotationFromQuaternion(e),this.setFromRotationMatrix(qi,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Yi.setFromEuler(this),this.setFromQuaternion(Yi,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}toVector3(){console.error(\"THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead\")}}Xi.DefaultOrder=\"XYZ\",Xi.RotationOrders=[\"XYZ\",\"YZX\",\"ZXY\",\"XZY\",\"YXZ\",\"ZYX\"];class Ji{constructor(){this.mask=1}set(e){this.mask=(1\u003C\u003Ce|0)>>>0}enable(e){this.mask|=1\u003C\u003Ce|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1\u003C\u003Ce|0}disable(e){this.mask&=~(1\u003C\u003Ce|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1\u003C\u003Ce|0))}}let Ki=0;const Zi=new ci,$i=new li,er=new Ui,tr=new ci,nr=new ci,ir=new ci,rr=new li,sr=new ci(1,0,0),or=new ci(0,1,0),ar=new ci(0,0,1),lr={type:\"added\"},cr={type:\"removed\"};class hr extends mn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,\"id\",{value:Ki++}),this.uuid=bn(),this.name=\"\",this.type=\"Object3D\",this.parent=null,this.children=[],this.up=hr.DefaultUp.clone();const e=new ci,t=new Xi,n=new li,i=new ci(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Ui},normalMatrix:{value:new Dn}}),this.matrix=new Ui,this.matrixWorld=new Ui,this.matrixAutoUpdate=hr.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=hr.DefaultMatrixWorldAutoUpdate,this.layers=new Ji,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return $i.setFromAxisAngle(e,t),this.quaternion.multiply($i),this}rotateOnWorldAxis(e,t){return $i.setFromAxisAngle(e,t),this.quaternion.premultiply($i),this}rotateX(e){return this.rotateOnAxis(sr,e)}rotateY(e){return this.rotateOnAxis(or,e)}rotateZ(e){return this.rotateOnAxis(ar,e)}translateOnAxis(e,t){return Zi.copy(e).applyQuaternion(this.quaternion),this.position.add(Zi.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(sr,e)}translateY(e){return this.translateOnAxis(or,e)}translateZ(e){return this.translateOnAxis(ar,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(er.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?tr.copy(e):tr.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),nr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?er.lookAt(nr,tr,this.up):er.lookAt(tr,nr,this.up),this.quaternion.setFromRotationMatrix(er),i&&(er.extractRotation(i.matrixWorld),$i.setFromRotationMatrix(er),this.quaternion.premultiply($i.invert()))}add(e){if(arguments.length>1){for(let e=0;e\u003Carguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error(\"THREE.Object3D.add: object can't be added as a child of itself.\",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(lr)):console.error(\"THREE.Object3D.add: object not an instance of THREE.Object3D.\",e),this)}remove(e){if(arguments.length>1){for(let e=0;e\u003Carguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(cr)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e\u003Cthis.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(cr)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),er.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),er.multiply(e.parent.matrixWorld)),e.applyMatrix4(er),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty(\"id\",e)}getObjectByName(e){return this.getObjectByProperty(\"name\",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n\u003Ci;n++){const i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,e,ir),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,rr,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n\u003Ci;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,i=t.length;n\u003Ci;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n\u003Ci;n++){const i=t[n];!0!==i.matrixWorldAutoUpdate&&!0!==e||i.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t\u003Cn;t++){const n=e[t];!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||\"string\"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:\"Object\",generator:\"Object3D.toJSON\"});const i={};function r(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,\"\"!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),\"{}\"!==JSON.stringify(this.userData)&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type=\"InstancedMesh\",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,i=n.length;t\u003Ci;t++){const i=n[t];r(e.shapes,i)}else r(e.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,i=this.material.length;n\u003Ci;n++)t.push(r(e.materials,this.material[n]));i.material=t}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let t=0;t\u003Cthis.children.length;t++)i.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let t=0;t\u003Cthis.animations.length;t++){const n=this.animations[t];i.animations.push(r(e.animations,n))}}if(t){const t=s(e.geometries),i=s(e.materials),r=s(e.textures),o=s(e.images),a=s(e.shapes),l=s(e.skeletons),c=s(e.animations),h=s(e.nodes);t.length>0&&(n.geometries=t),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),o.length>0&&(n.images=o),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),h.length>0&&(n.nodes=h)}return n.object=i,n;function s(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t\u003Ce.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}hr.DefaultUp=new ci(0,1,0),hr.DefaultMatrixAutoUpdate=!0,hr.DefaultMatrixWorldAutoUpdate=!0;const ur=new ci,dr=new ci,pr=new ci,Ar=new ci,fr=new ci,mr=new ci,gr=new ci,vr=new ci,yr=new ci,Er=new ci;class br{constructor(e=new ci,t=new ci,n=new ci){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),ur.subVectors(e,t),i.cross(ur);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){ur.subVectors(i,t),dr.subVectors(n,t),pr.subVectors(e,t);const s=ur.dot(ur),o=ur.dot(dr),a=ur.dot(pr),l=dr.dot(dr),c=dr.dot(pr),h=s*l-o*o;if(0===h)return r.set(-2,-1,-1);const u=1/h,d=(l*a-o*c)*u,p=(s*c-o*a)*u;return r.set(1-d-p,p,d)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Ar),Ar.x>=0&&Ar.y>=0&&Ar.x+Ar.y\u003C=1}static getUV(e,t,n,i,r,s,o,a){return this.getBarycoord(e,t,n,i,Ar),a.set(0,0),a.addScaledVector(r,Ar.x),a.addScaledVector(s,Ar.y),a.addScaledVector(o,Ar.z),a}static isFrontFacing(e,t,n,i){return ur.subVectors(n,t),dr.subVectors(e,t),ur.cross(dr).dot(i)\u003C0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ur.subVectors(this.c,this.b),dr.subVectors(this.a,this.b),.5*ur.cross(dr).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return br.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return br.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,i,r){return br.getUV(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return br.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return br.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let s,o;fr.subVectors(i,n),mr.subVectors(r,n),vr.subVectors(e,n);const a=fr.dot(vr),l=mr.dot(vr);if(a\u003C=0&&l\u003C=0)return t.copy(n);yr.subVectors(e,i);const c=fr.dot(yr),h=mr.dot(yr);if(c>=0&&h\u003C=c)return t.copy(i);const u=a*h-c*l;if(u\u003C=0&&a>=0&&c\u003C=0)return s=a/(a-c),t.copy(n).addScaledVector(fr,s);Er.subVectors(e,r);const d=fr.dot(Er),p=mr.dot(Er);if(p>=0&&d\u003C=p)return t.copy(r);const A=d*l-a*p;if(A\u003C=0&&l>=0&&p\u003C=0)return o=l/(l-p),t.copy(n).addScaledVector(mr,o);const f=c*p-d*h;if(f\u003C=0&&h-c>=0&&d-p>=0)return gr.subVectors(r,i),o=(h-c)/(h-c+(d-p)),t.copy(i).addScaledVector(gr,o);const m=1/(f+A+u);return s=A*m,o=u*m,t.copy(n).addScaledVector(fr,s).addScaledVector(mr,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let xr=0;class wr extends mn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,\"id\",{value:xr++}),this.uuid=bn(),this.name=\"\",this.type=\"Material\",this.blending=E,this.side=m,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=P,this.blendDst=k,this.blendEquation=M,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=nn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=zt,this.stencilZFail=zt,this.stencilZPass=zt,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(\"THREE.Material: '\"+t+\"' parameter is undefined.\");continue}const i=this[t];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n:console.warn(\"THREE.\"+this.type+\": '\"+t+\"' is not a property of this material.\")}}toJSON(e){const t=void 0===e||\"string\"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:\"Material\",generator:\"Material.toJSON\"}};function i(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}if(n.uuid=this.uuid,n.type=this.type,\"\"!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==E&&(n.blending=this.blending),this.side!==m&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity\u003C1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),\"round\"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),\"round\"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),\"{}\"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=i(e.textures),r=i(e.images);t.length>0&&(n.textures=t),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let i=0;i!==e;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:\"dispose\"})}set needsUpdate(e){!0===e&&this.version++}}class Cr extends wr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=\"MeshBasicMaterial\",this.color=new Yn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Mr=new ci,_r=new Ln;class Ir{constructor(e,t,n){if(Array.isArray(e))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");this.isBufferAttribute=!0,this.name=\"\",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=rn,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i\u003Cr;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t\u003Cn;t++)_r.fromBufferAttribute(this,t),_r.applyMatrix3(e),this.setXY(t,_r.x,_r.y);else if(3===this.itemSize)for(let t=0,n=this.count;t\u003Cn;t++)Mr.fromBufferAttribute(this,t),Mr.applyMatrix3(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t\u003Cn;t++)Mr.fromBufferAttribute(this,t),Mr.applyMatrix4(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t\u003Cn;t++)Mr.fromBufferAttribute(this,t),Mr.applyNormalMatrix(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}transformDirection(e){for(let t=0,n=this.count;t\u003Cn;t++)Mr.fromBufferAttribute(this,t),Mr.transformDirection(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Bn(t,this.array)),t}setX(e,t){return this.normalized&&(t=Sn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Bn(t,this.array)),t}setY(e,t){return this.normalized&&(t=Sn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Bn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Sn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Bn(t,this.array)),t}setW(e,t){return this.normalized&&(t=Sn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Sn(t,this.array),n=Sn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=Sn(t,this.array),n=Sn(n,this.array),i=Sn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=Sn(t,this.array),n=Sn(n,this.array),i=Sn(i,this.array),r=Sn(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return\"\"!==this.name&&(e.name=this.name),this.usage!==rn&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}copyColorsArray(){console.error(\"THREE.BufferAttribute: copyColorsArray() was removed in r144.\")}copyVector2sArray(){console.error(\"THREE.BufferAttribute: copyVector2sArray() was removed in r144.\")}copyVector3sArray(){console.error(\"THREE.BufferAttribute: copyVector3sArray() was removed in r144.\")}copyVector4sArray(){console.error(\"THREE.BufferAttribute: copyVector4sArray() was removed in r144.\")}}class Br extends Ir{constructor(e,t,n){super(new Int8Array(e),t,n)}}class Sr extends Ir{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class Tr extends Ir{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Lr extends Ir{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Dr extends Ir{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Rr extends Ir{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Pr extends Ir{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class kr extends Ir{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}}class Fr extends Ir{constructor(e,t,n){super(new Float32Array(e),t,n)}}class Or extends Ir{constructor(e,t,n){super(new Float64Array(e),t,n)}}let Qr=0;const Ur=new Ui,Nr=new hr,Gr=new ci,zr=new di,Hr=new di,Vr=new ci;class Wr extends mn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,\"id\",{value:Qr++}),this.uuid=bn(),this.name=\"\",this.type=\"BufferGeometry\",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(Pn(e)?Pr:Dr)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Dn).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Ur.makeRotationFromQuaternion(e),this.applyMatrix4(Ur),this}rotateX(e){return Ur.makeRotationX(e),this.applyMatrix4(Ur),this}rotateY(e){return Ur.makeRotationY(e),this.applyMatrix4(Ur),this}rotateZ(e){return Ur.makeRotationZ(e),this.applyMatrix4(Ur),this}translate(e,t,n){return Ur.makeTranslation(e,t,n),this.applyMatrix4(Ur),this}scale(e,t,n){return Ur.makeScale(e,t,n),this.applyMatrix4(Ur),this}lookAt(e){return Nr.lookAt(e),Nr.updateMatrix(),this.applyMatrix4(Nr.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Gr).negate(),this.translate(Gr.x,Gr.y,Gr.z),this}setFromPoints(e){const t=[];for(let n=0,i=e.length;n\u003Ci;n++){const i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute(\"position\",new Fr(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new di);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".',this),void this.boundingBox.set(new ci(-1/0,-1/0,-1/0),new ci(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e\u003Cn;e++){const n=t[e];zr.setFromBufferAttribute(n),this.morphTargetsRelative?(Vr.addVectors(this.boundingBox.min,zr.min),this.boundingBox.expandByPoint(Vr),Vr.addVectors(this.boundingBox.max,zr.max),this.boundingBox.expandByPoint(Vr)):(this.boundingBox.expandByPoint(zr.min),this.boundingBox.expandByPoint(zr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Ti);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".',this),void this.boundingSphere.set(new ci,1/0);if(e){const n=this.boundingSphere.center;if(zr.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e\u003Cn;e++){const n=t[e];Hr.setFromBufferAttribute(n),this.morphTargetsRelative?(Vr.addVectors(zr.min,Hr.min),zr.expandByPoint(Vr),Vr.addVectors(zr.max,Hr.max),zr.expandByPoint(Vr)):(zr.expandByPoint(Hr.min),zr.expandByPoint(Hr.max))}zr.getCenter(n);let i=0;for(let t=0,r=e.count;t\u003Cr;t++)Vr.fromBufferAttribute(e,t),i=Math.max(i,n.distanceToSquared(Vr));if(t)for(let r=0,s=t.length;r\u003Cs;r++){const s=t[r],o=this.morphTargetsRelative;for(let t=0,r=s.count;t\u003Cr;t++)Vr.fromBufferAttribute(s,t),o&&(Gr.fromBufferAttribute(e,t),Vr.add(Gr)),i=Math.max(i,n.distanceToSquared(Vr))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error(\"THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)\");const n=e.array,i=t.position.array,r=t.normal.array,s=t.uv.array,o=i.length/3;!1===this.hasAttribute(\"tangent\")&&this.setAttribute(\"tangent\",new Ir(new Float32Array(4*o),4));const a=this.getAttribute(\"tangent\").array,l=[],c=[];for(let e=0;e\u003Co;e++)l[e]=new ci,c[e]=new ci;const h=new ci,u=new ci,d=new ci,p=new Ln,A=new Ln,f=new Ln,m=new ci,g=new ci;function v(e,t,n){h.fromArray(i,3*e),u.fromArray(i,3*t),d.fromArray(i,3*n),p.fromArray(s,2*e),A.fromArray(s,2*t),f.fromArray(s,2*n),u.sub(h),d.sub(h),A.sub(p),f.sub(p);const r=1/(A.x*f.y-f.x*A.y);isFinite(r)&&(m.copy(u).multiplyScalar(f.y).addScaledVector(d,-A.y).multiplyScalar(r),g.copy(d).multiplyScalar(A.x).addScaledVector(u,-f.x).multiplyScalar(r),l[e].add(m),l[t].add(m),l[n].add(m),c[e].add(g),c[t].add(g),c[n].add(g))}let y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(let e=0,t=y.length;e\u003Ct;++e){const t=y[e],i=t.start;for(let e=i,r=i+t.count;e\u003Cr;e+=3)v(n[e+0],n[e+1],n[e+2])}const E=new ci,b=new ci,x=new ci,w=new ci;function C(e){x.fromArray(r,3*e),w.copy(x);const t=l[e];E.copy(t),E.sub(x.multiplyScalar(x.dot(t))).normalize(),b.crossVectors(w,t);const n=b.dot(c[e])\u003C0?-1:1;a[4*e]=E.x,a[4*e+1]=E.y,a[4*e+2]=E.z,a[4*e+3]=n}for(let e=0,t=y.length;e\u003Ct;++e){const t=y[e],i=t.start;for(let e=i,r=i+t.count;e\u003Cr;e+=3)C(n[e+0]),C(n[e+1]),C(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute(\"position\");if(void 0!==t){let n=this.getAttribute(\"normal\");if(void 0===n)n=new Ir(new Float32Array(3*t.count),3),this.setAttribute(\"normal\",n);else for(let e=0,t=n.count;e\u003Ct;e++)n.setXYZ(e,0,0,0);const i=new ci,r=new ci,s=new ci,o=new ci,a=new ci,l=new ci,c=new ci,h=new ci;if(e)for(let u=0,d=e.count;u\u003Cd;u+=3){const d=e.getX(u+0),p=e.getX(u+1),A=e.getX(u+2);i.fromBufferAttribute(t,d),r.fromBufferAttribute(t,p),s.fromBufferAttribute(t,A),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),o.fromBufferAttribute(n,d),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,A),o.add(c),a.add(c),l.add(c),n.setXYZ(d,o.x,o.y,o.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(A,l.x,l.y,l.z)}else for(let e=0,o=t.count;e\u003Co;e+=3)i.fromBufferAttribute(t,e+0),r.fromBufferAttribute(t,e+1),s.fromBufferAttribute(t,e+2),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(){return console.error(\"THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeBufferGeometries() instead.\"),this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t\u003Cn;t++)Vr.fromBufferAttribute(e,t),Vr.normalize(),e.setXYZ(t,Vr.x,Vr.y,Vr.z)}toNonIndexed(){function e(e,t){const n=e.array,i=e.itemSize,r=e.normalized,s=new n.constructor(t.length*i);let o=0,a=0;for(let r=0,l=t.length;r\u003Cl;r++){o=e.isInterleavedBufferAttribute?t[r]*e.data.stride+e.offset:t[r]*i;for(let e=0;e\u003Ci;e++)s[a++]=n[o++]}return new Ir(s,i,r)}if(null===this.index)return console.warn(\"THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.\"),this;const t=new Wr,n=this.index.array,i=this.attributes;for(const r in i){const s=e(i[r],n);t.setAttribute(r,s)}const r=this.morphAttributes;for(const i in r){const s=[],o=r[i];for(let t=0,i=o.length;t\u003Ci;t++){const i=e(o[t],n);s.push(i)}t.morphAttributes[i]=s}t.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let e=0,n=s.length;e\u003Cn;e++){const n=s[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:\"BufferGeometry\",generator:\"BufferGeometry.toJSON\"}};if(e.uuid=this.uuid,e.type=this.type,\"\"!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const i=n[t];e.data.attributes[t]=i.toJSON(e.data)}const i={};let r=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],s=[];for(let t=0,i=n.length;t\u003Ci;t++){const i=n[t];s.push(i.toJSON(e.data))}s.length>0&&(i[t]=s,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const i=e.attributes;for(const e in i){const n=i[e];this.setAttribute(e,n.clone(t))}const r=e.morphAttributes;for(const e in r){const n=[],i=r[e];for(let e=0,r=i.length;e\u003Cr;e++)n.push(i[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const s=e.groups;for(let e=0,t=s.length;e\u003Ct;e++){const t=s[e];this.addGroup(t.start,t.count,t.materialIndex)}const o=e.boundingBox;null!==o&&(this.boundingBox=o.clone());const a=e.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}dispose(){this.dispatchEvent({type:\"dispose\"})}}const jr=new Ui,qr=new Qi,Yr=new Ti,Xr=new ci,Jr=new ci,Kr=new ci,Zr=new ci,$r=new ci,es=new ci,ts=new ci,ns=new ci,is=new ci,rs=new Ln,ss=new Ln,os=new Ln,as=new ci,ls=new ci;class cs extends hr{constructor(e=new Wr,t=new Cr){super(),this.isMesh=!0,this.type=\"Mesh\",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e\u003Ct;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0===i)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Yr.copy(n.boundingSphere),Yr.applyMatrix4(r),!1===e.ray.intersectsSphere(Yr))return;if(jr.copy(r).invert(),qr.copy(e.ray).applyMatrix4(jr),null!==n.boundingBox&&!1===qr.intersectsBox(n.boundingBox))return;let s;const o=n.index,a=n.attributes.position,l=n.morphAttributes.position,c=n.morphTargetsRelative,h=n.attributes.uv,u=n.attributes.uv2,d=n.groups,p=n.drawRange;if(null!==o)if(Array.isArray(i))for(let n=0,r=d.length;n\u003Cr;n++){const r=d[n],A=i[r.materialIndex];for(let n=Math.max(r.start,p.start),i=Math.min(o.count,Math.min(r.start+r.count,p.start+p.count));n\u003Ci;n+=3){const i=o.getX(n),d=o.getX(n+1),p=o.getX(n+2);s=hs(this,A,e,qr,a,l,c,h,u,i,d,p),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=r.materialIndex,t.push(s))}}else for(let n=Math.max(0,p.start),r=Math.min(o.count,p.start+p.count);n\u003Cr;n+=3){const r=o.getX(n),d=o.getX(n+1),p=o.getX(n+2);s=hs(this,i,e,qr,a,l,c,h,u,r,d,p),s&&(s.faceIndex=Math.floor(n/3),t.push(s))}else if(void 0!==a)if(Array.isArray(i))for(let n=0,r=d.length;n\u003Cr;n++){const r=d[n],o=i[r.materialIndex];for(let n=Math.max(r.start,p.start),i=Math.min(a.count,Math.min(r.start+r.count,p.start+p.count));n\u003Ci;n+=3)s=hs(this,o,e,qr,a,l,c,h,u,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=r.materialIndex,t.push(s))}else for(let n=Math.max(0,p.start),r=Math.min(a.count,p.start+p.count);n\u003Cr;n+=3)s=hs(this,i,e,qr,a,l,c,h,u,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),t.push(s))}}function hs(e,t,n,i,r,s,o,a,l,c,h,u){Xr.fromBufferAttribute(r,c),Jr.fromBufferAttribute(r,h),Kr.fromBufferAttribute(r,u);const d=e.morphTargetInfluences;if(s&&d){ts.set(0,0,0),ns.set(0,0,0),is.set(0,0,0);for(let e=0,t=s.length;e\u003Ct;e++){const t=d[e],n=s[e];0!==t&&(Zr.fromBufferAttribute(n,c),$r.fromBufferAttribute(n,h),es.fromBufferAttribute(n,u),o?(ts.addScaledVector(Zr,t),ns.addScaledVector($r,t),is.addScaledVector(es,t)):(ts.addScaledVector(Zr.sub(Xr),t),ns.addScaledVector($r.sub(Jr),t),is.addScaledVector(es.sub(Kr),t)))}Xr.add(ts),Jr.add(ns),Kr.add(is)}e.isSkinnedMesh&&(e.boneTransform(c,Xr),e.boneTransform(h,Jr),e.boneTransform(u,Kr));const p=function(e,t,n,i,r,s,o,a){let l;if(l=t.side===g?i.intersectTriangle(o,s,r,!0,a):i.intersectTriangle(r,s,o,t.side!==v,a),null===l)return null;ls.copy(a),ls.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(ls);return c\u003Cn.near||c>n.far?null:{distance:c,point:ls.clone(),object:e}}(e,t,n,i,Xr,Jr,Kr,as);if(p){a&&(rs.fromBufferAttribute(a,c),ss.fromBufferAttribute(a,h),os.fromBufferAttribute(a,u),p.uv=br.getUV(as,Xr,Jr,Kr,rs,ss,os,new Ln)),l&&(rs.fromBufferAttribute(l,c),ss.fromBufferAttribute(l,h),os.fromBufferAttribute(l,u),p.uv2=br.getUV(as,Xr,Jr,Kr,rs,ss,os,new Ln));const e={a:c,b:h,c:u,normal:new ci,materialIndex:0};br.getNormal(Xr,Jr,Kr,e.normal),p.face=e}return p}class us extends Wr{constructor(e=1,t=1,n=1,i=1,r=1,s=1){super(),this.type=\"BoxGeometry\",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const o=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const a=[],l=[],c=[],h=[];let u=0,d=0;function p(e,t,n,i,r,s,p,A,f,m,g){const v=s/f,y=p/m,E=s/2,b=p/2,x=A/2,w=f+1,C=m+1;let M=0,_=0;const I=new ci;for(let s=0;s\u003CC;s++){const o=s*y-b;for(let a=0;a\u003Cw;a++){const u=a*v-E;I[e]=u*i,I[t]=o*r,I[n]=x,l.push(I.x,I.y,I.z),I[e]=0,I[t]=0,I[n]=A>0?1:-1,c.push(I.x,I.y,I.z),h.push(a/f),h.push(1-s/m),M+=1}}for(let e=0;e\u003Cm;e++)for(let t=0;t\u003Cf;t++){const n=u+t+w*e,i=u+t+w*(e+1),r=u+(t+1)+w*(e+1),s=u+(t+1)+w*e;a.push(n,i,s),a.push(i,r,s),_+=6}o.addGroup(d,_,g),d+=_,u+=M}p(\"z\",\"y\",\"x\",-1,-1,n,t,e,s,r,0),p(\"z\",\"y\",\"x\",1,-1,n,t,-e,s,r,1),p(\"x\",\"z\",\"y\",1,1,e,n,t,i,s,2),p(\"x\",\"z\",\"y\",1,-1,e,n,-t,i,s,3),p(\"x\",\"y\",\"z\",1,-1,e,t,n,i,r,4),p(\"x\",\"y\",\"z\",-1,-1,e,t,-n,i,r,5),this.setIndex(a),this.setAttribute(\"position\",new Fr(l,3)),this.setAttribute(\"normal\",new Fr(c,3)),this.setAttribute(\"uv\",new Fr(h,2))}static fromJSON(e){return new us(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function ds(e){const t={};for(const n in e){t[n]={};for(const i in e[n]){const r=e[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?t[n][i]=r.clone():Array.isArray(r)?t[n][i]=r.slice():t[n][i]=r}}return t}function ps(e){const t={};for(let n=0;n\u003Ce.length;n++){const i=ds(e[n]);for(const e in i)t[e]=i[e]}return t}function As(e){return null===e.getRenderTarget()&&e.outputEncoding===Rt?Ut:Nt}const fs={clone:ds,merge:ps};class ms extends wr{constructor(e){super(),this.isShaderMaterial=!0,this.type=\"ShaderMaterial\",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=\"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\",this.fragmentShader=\"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ds(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n\u003Ce.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?t.uniforms[n]={type:\"t\",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[n]={type:\"c\",value:i.getHex()}:i&&i.isVector2?t.uniforms[n]={type:\"v2\",value:i.toArray()}:i&&i.isVector3?t.uniforms[n]={type:\"v3\",value:i.toArray()}:i&&i.isVector4?t.uniforms[n]={type:\"v4\",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[n]={type:\"m3\",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[n]={type:\"m4\",value:i.toArray()}:t.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class gs extends hr{constructor(){super(),this.isCamera=!0,this.type=\"Camera\",this.matrixWorldInverse=new Ui,this.projectionMatrix=new Ui,this.projectionMatrixInverse=new Ui}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class vs extends gs{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type=\"PerspectiveCamera\",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*En*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*yn*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*En*Math.atan(Math.tan(.5*yn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,i,r,s){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*yn*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const e=s.fullWidth,o=s.fullHeight;r+=s.offsetX*i/e,t-=s.offsetY*n/o,i*=s.width/e,n*=s.height/o}const o=this.filmOffset;0!==o&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const ys=-90;class Es extends hr{constructor(e,t,n){super(),this.type=\"CubeCamera\",this.renderTarget=n;const i=new vs(ys,1,e,t);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);const r=new vs(ys,1,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(-1,0,0),this.add(r);const s=new vs(ys,1,e,t);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),this.add(s);const o=new vs(ys,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(0,-1,0),this.add(o);const a=new vs(ys,1,e,t);a.layers=this.layers,a.up.set(0,1,0),a.lookAt(0,0,1),this.add(a);const l=new vs(ys,1,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[i,r,s,o,a,l]=this.children,c=e.getRenderTarget(),h=e.toneMapping,u=e.xr.enabled;e.toneMapping=Z,e.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,i),e.setRenderTarget(n,1),e.render(t,r),e.setRenderTarget(n,2),e.render(t,s),e.setRenderTarget(n,3),e.render(t,o),e.setRenderTarget(n,4),e.render(t,a),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(c),e.toneMapping=h,e.xr.enabled=u,n.texture.needsPMREMUpdate=!0}}class bs extends ei{constructor(e,t,n,i,r,s,o,a,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:se,n,i,r,s,o,a,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class xs extends ni{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new bs(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:ve}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={tEquirect:{value:null}},i=\"\\n\\n\\t\\t\\t\\tvarying vec3 vWorldDirection;\\n\\n\\t\\t\\t\\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\n\\t\\t\\t\\t\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\t\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\n\\t\\t\\t\\t\\t#include \u003Cbegin_vertex>\\n\\t\\t\\t\\t\\t#include \u003Cproject_vertex>\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t\",r=\"\\n\\n\\t\\t\\t\\tuniform sampler2D tEquirect;\\n\\n\\t\\t\\t\\tvarying vec3 vWorldDirection;\\n\\n\\t\\t\\t\\t#include \u003Ccommon>\\n\\n\\t\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\t\\tvec3 direction = normalize( vWorldDirection );\\n\\n\\t\\t\\t\\t\\tvec2 sampleUV = equirectUv( direction );\\n\\n\\t\\t\\t\\t\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t\",s=new us(5,5,5),o=new ms({name:\"CubemapFromEquirect\",uniforms:ds(n),vertexShader:i,fragmentShader:r,side:g,blending:y});o.uniforms.tEquirect.value=t;const a=new cs(s,o),l=t.minFilter;return t.minFilter===be&&(t.minFilter=ve),new Es(1,10,this).update(e,a),t.minFilter=l,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,i){const r=e.getRenderTarget();for(let r=0;r\u003C6;r++)e.setRenderTarget(this,r),e.clear(t,n,i);e.setRenderTarget(r)}}const ws=new ci,Cs=new ci,Ms=new Dn;class _s{constructor(e=new ci(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=ws.subVectors(n,t).cross(Cs.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(ws),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r\u003C0||r>1?null:t.copy(n).multiplyScalar(r).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t\u003C0&&n>0||n\u003C0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||Ms.getNormalMatrix(e),i=this.coplanarPoint(ws).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Is=new Ti,Bs=new ci;class Ss{constructor(e=new _s,t=new _s,n=new _s,i=new _s,r=new _s,s=new _s){this.planes=[e,t,n,i,r,s]}set(e,t,n,i,r,s){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(s),this}copy(e){const t=this.planes;for(let n=0;n\u003C6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l=n[5],c=n[6],h=n[7],u=n[8],d=n[9],p=n[10],A=n[11],f=n[12],m=n[13],g=n[14],v=n[15];return t[0].setComponents(o-i,h-a,A-u,v-f).normalize(),t[1].setComponents(o+i,h+a,A+u,v+f).normalize(),t[2].setComponents(o+r,h+l,A+d,v+m).normalize(),t[3].setComponents(o-r,h-l,A-d,v-m).normalize(),t[4].setComponents(o-s,h-c,A-p,v-g).normalize(),t[5].setComponents(o+s,h+c,A+p,v+g).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Is.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Is)}intersectsSprite(e){return Is.center.set(0,0,0),Is.radius=.7071067811865476,Is.applyMatrix4(e.matrixWorld),this.intersectsSphere(Is)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let e=0;e\u003C6;e++)if(t[e].distanceToPoint(n)\u003Ci)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n\u003C6;n++){const i=t[n];if(Bs.x=i.normal.x>0?e.max.x:e.min.x,Bs.y=i.normal.y>0?e.max.y:e.min.y,Bs.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Bs)\u003C0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n\u003C6;n++)if(t[n].distanceToPoint(e)\u003C0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Ts(){let e=null,t=!1,n=null,i=null;function r(t,s){n(t,s),i=e.requestAnimationFrame(r)}return{start:function(){!0!==t&&null!==n&&(i=e.requestAnimationFrame(r),t=!0)},stop:function(){e.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Ls(e,t){const n=t.isWebGL2,i=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),i.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=i.get(t);n&&(e.deleteBuffer(n.buffer),i.delete(t))},update:function(t,r){if(t.isGLBufferAttribute){const e=i.get(t);return void((!e||e.version\u003Ct.version)&&i.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const s=i.get(t);void 0===s?i.set(t,function(t,i){const r=t.array,s=t.usage,o=e.createBuffer();let a;if(e.bindBuffer(i,o),e.bufferData(i,r,s),t.onUploadCallback(),r instanceof Float32Array)a=5126;else if(r instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error(\"THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.\");a=5131}else a=5123;else if(r instanceof Int16Array)a=5122;else if(r instanceof Uint32Array)a=5125;else if(r instanceof Int32Array)a=5124;else if(r instanceof Int8Array)a=5120;else if(r instanceof Uint8Array)a=5121;else{if(!(r instanceof Uint8ClampedArray))throw new Error(\"THREE.WebGLAttributes: Unsupported buffer data format: \"+r);a=5121}return{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}(t,r)):s.version\u003Ct.version&&(function(t,i,r){const s=i.array,o=i.updateRange;e.bindBuffer(r,t),-1===o.count?e.bufferSubData(r,0,s):(n?e.bufferSubData(r,o.offset*s.BYTES_PER_ELEMENT,s,o.offset,o.count):e.bufferSubData(r,o.offset*s.BYTES_PER_ELEMENT,s.subarray(o.offset,o.offset+o.count)),o.count=-1),i.onUploadCallback()}(s.buffer,t,r),s.version=t.version)}}}class Ds extends Wr{constructor(e=1,t=1,n=1,i=1){super(),this.type=\"PlaneGeometry\",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,s=t/2,o=Math.floor(n),a=Math.floor(i),l=o+1,c=a+1,h=e/o,u=t/a,d=[],p=[],A=[],f=[];for(let e=0;e\u003Cc;e++){const t=e*u-s;for(let n=0;n\u003Cl;n++){const i=n*h-r;p.push(i,-t,0),A.push(0,0,1),f.push(n/o),f.push(1-e/a)}}for(let e=0;e\u003Ca;e++)for(let t=0;t\u003Co;t++){const n=t+l*e,i=t+l*(e+1),r=t+1+l*(e+1),s=t+1+l*e;d.push(n,i,s),d.push(i,r,s)}this.setIndex(d),this.setAttribute(\"position\",new Fr(p,3)),this.setAttribute(\"normal\",new Fr(A,3)),this.setAttribute(\"uv\",new Fr(f,2))}static fromJSON(e){return new Ds(e.width,e.height,e.widthSegments,e.heightSegments)}}const Rs={alphamap_fragment:\"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\",alphamap_pars_fragment:\"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\",alphatest_fragment:\"#ifdef USE_ALPHATEST\\n\\tif ( diffuseColor.a \u003C alphaTest ) discard;\\n#endif\",alphatest_pars_fragment:\"#ifdef USE_ALPHATEST\\n\\tuniform float alphaTest;\\n#endif\",aomap_fragment:\"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\\n\\t#endif\\n#endif\",aomap_pars_fragment:\"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\",begin_vertex:\"vec3 transformed = vec3( position );\",beginnormal_vertex:\"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\",bsdfs:\"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n}\\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n}\\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\\n float x2 = x * x;\\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\\n}\\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( V * D );\\n}\\n#ifdef USE_IRIDESCENCE\\n\\tvec3 BRDF_GGX_Iridescence( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float iridescence, const in vec3 iridescenceFresnel, const in float roughness ) {\\n\\t\\tfloat alpha = pow2( roughness );\\n\\t\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\t\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\t\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\t\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\t\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\t\\tvec3 F = mix( F_Schlick( f0, f90, dotVH ), iridescenceFresnel, iridescence );\\n\\t\\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\t\\tfloat D = D_GGX( alpha, dotNH );\\n\\t\\treturn F * ( V * D );\\n\\t}\\n#endif\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) \u003C 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie( float roughness, float dotNH ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tfloat invAlpha = 1.0 / alpha;\\n\\tfloat cos2h = dotNH * dotNH;\\n\\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\\n\\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\\n}\\nfloat V_Neubelt( float dotNV, float dotNL ) {\\n\\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\\n}\\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat D = D_Charlie( sheenRoughness, dotNH );\\n\\tfloat V = V_Neubelt( dotNV, dotNL );\\n\\treturn sheenColor * ( D * V );\\n}\\n#endif\",iridescence_fragment:\"#ifdef USE_IRIDESCENCE\\n\\tconst mat3 XYZ_TO_REC709 = mat3(\\n\\t\\t 3.2404542, -0.9692660, 0.0556434,\\n\\t\\t-1.5371385, 1.8760108, -0.2040259,\\n\\t\\t-0.4985314, 0.0415560, 1.0572252\\n\\t);\\n\\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\\n\\t\\tvec3 sqrtF0 = sqrt( fresnel0 );\\n\\t\\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\\n\\t}\\n\\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\\n\\t\\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\\n\\t}\\n\\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\\n\\t\\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\\n\\t}\\n\\tvec3 evalSensitivity( float OPD, vec3 shift ) {\\n\\t\\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\\n\\t\\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\\n\\t\\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\\n\\t\\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\\n\\t\\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\\n\\t\\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\\n\\t\\txyz /= 1.0685e-7;\\n\\t\\tvec3 rgb = XYZ_TO_REC709 * xyz;\\n\\t\\treturn rgb;\\n\\t}\\n\\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\\n\\t\\tvec3 I;\\n\\t\\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\\n\\t\\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\\n\\t\\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\\n\\t\\tif ( cosTheta2Sq \u003C 0.0 ) {\\n\\t\\t\\t return vec3( 1.0 );\\n\\t\\t}\\n\\t\\tfloat cosTheta2 = sqrt( cosTheta2Sq );\\n\\t\\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\\n\\t\\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\\n\\t\\tfloat R21 = R12;\\n\\t\\tfloat T121 = 1.0 - R12;\\n\\t\\tfloat phi12 = 0.0;\\n\\t\\tif ( iridescenceIOR \u003C outsideIOR ) phi12 = PI;\\n\\t\\tfloat phi21 = PI - phi12;\\n\\t\\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\\t\\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\\n\\t\\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\\n\\t\\tvec3 phi23 = vec3( 0.0 );\\n\\t\\tif ( baseIOR[ 0 ] \u003C iridescenceIOR ) phi23[ 0 ] = PI;\\n\\t\\tif ( baseIOR[ 1 ] \u003C iridescenceIOR ) phi23[ 1 ] = PI;\\n\\t\\tif ( baseIOR[ 2 ] \u003C iridescenceIOR ) phi23[ 2 ] = PI;\\n\\t\\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\\n\\t\\tvec3 phi = vec3( phi21 ) + phi23;\\n\\t\\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\\n\\t\\tvec3 r123 = sqrt( R123 );\\n\\t\\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\\n\\t\\tvec3 C0 = R12 + Rs;\\n\\t\\tI = C0;\\n\\t\\tvec3 Cm = Rs - T121;\\n\\t\\tfor ( int m = 1; m \u003C= 2; ++ m ) {\\n\\t\\t\\tCm *= r123;\\n\\t\\t\\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\\n\\t\\t\\tI += Cm * Sm;\\n\\t\\t}\\n\\t\\treturn max( I, vec3( 0.0 ) );\\n\\t}\\n#endif\",bumpmap_pars_fragment:\"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\\n\\t\\tvec3 vSigmaX = dFdx( surf_pos.xyz );\\n\\t\\tvec3 vSigmaY = dFdy( surf_pos.xyz );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\",clipping_planes_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#if UNION_CLIPPING_PLANES \u003C NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i \u003C NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\",clipping_planes_pars_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\",clipping_planes_pars_vertex:\"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n#endif\",clipping_planes_vertex:\"#if NUM_CLIPPING_PLANES > 0\\n\\tvClipPosition = - mvPosition.xyz;\\n#endif\",color_fragment:\"#if defined( USE_COLOR_ALPHA )\\n\\tdiffuseColor *= vColor;\\n#elif defined( USE_COLOR )\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\",color_pars_fragment:\"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\",color_pars_vertex:\"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\",color_vertex:\"#if defined( USE_COLOR_ALPHA )\\n\\tvColor = vec4( 1.0 );\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\\tvColor *= color;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\\tvColor.xyz *= instanceColor.xyz;\\n#endif\",common:\"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nvec3 pow2( const in vec3 x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract( sin( sn ) * c );\\n}\\n#ifdef HIGH_PRECISION\\n\\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\\tfloat precisionSafeLength( vec3 v ) {\\n\\t\\tfloat maxComponent = max3( abs( v ) );\\n\\t\\treturn length( v / maxComponent ) * maxComponent;\\n\\t}\\n#endif\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n#ifdef USE_CLEARCOAT\\n\\tvec3 clearcoatNormal;\\n#endif\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat luminance( const in vec3 rgb ) {\\n\\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\\n\\treturn dot( weights, rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\treturn vec2( u, v );\\n}\",cube_uv_reflection_fragment:\"#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t#define cubeUV_minMipLevel 4.0\\n\\t#define cubeUV_minTileSize 16.0\\n\\tfloat getFace( vec3 direction ) {\\n\\t\\tvec3 absDirection = abs( direction );\\n\\t\\tfloat face = - 1.0;\\n\\t\\tif ( absDirection.x > absDirection.z ) {\\n\\t\\t\\tif ( absDirection.x > absDirection.y )\\n\\t\\t\\t\\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t} else {\\n\\t\\t\\tif ( absDirection.z > absDirection.y )\\n\\t\\t\\t\\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t}\\n\\t\\treturn face;\\n\\t}\\n\\tvec2 getUV( vec3 direction, float face ) {\\n\\t\\tvec2 uv;\\n\\t\\tif ( face == 0.0 ) {\\n\\t\\t\\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 1.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\\t\\t} else if ( face == 2.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\\t\\t} else if ( face == 3.0 ) {\\n\\t\\t\\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 4.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\\t\\t} else {\\n\\t\\t\\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\\t\\t}\\n\\t\\treturn 0.5 * ( uv + 1.0 );\\n\\t}\\n\\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\\t\\tfloat face = getFace( direction );\\n\\t\\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\\t\\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\\t\\tfloat faceSize = exp2( mipInt );\\n\\t\\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\\n\\t\\tif ( face > 2.0 ) {\\n\\t\\t\\tuv.y += faceSize;\\n\\t\\t\\tface -= 3.0;\\n\\t\\t}\\n\\t\\tuv.x += face * faceSize;\\n\\t\\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\\n\\t\\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\\n\\t\\tuv.x *= CUBEUV_TEXEL_WIDTH;\\n\\t\\tuv.y *= CUBEUV_TEXEL_HEIGHT;\\n\\t\\t#ifdef texture2DGradEXT\\n\\t\\t\\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn texture2D( envMap, uv ).rgb;\\n\\t\\t#endif\\n\\t}\\n\\t#define cubeUV_r0 1.0\\n\\t#define cubeUV_v0 0.339\\n\\t#define cubeUV_m0 - 2.0\\n\\t#define cubeUV_r1 0.8\\n\\t#define cubeUV_v1 0.276\\n\\t#define cubeUV_m1 - 1.0\\n\\t#define cubeUV_r4 0.4\\n\\t#define cubeUV_v4 0.046\\n\\t#define cubeUV_m4 2.0\\n\\t#define cubeUV_r5 0.305\\n\\t#define cubeUV_v5 0.016\\n\\t#define cubeUV_m5 3.0\\n\\t#define cubeUV_r6 0.21\\n\\t#define cubeUV_v6 0.0038\\n\\t#define cubeUV_m6 4.0\\n\\tfloat roughnessToMip( float roughness ) {\\n\\t\\tfloat mip = 0.0;\\n\\t\\tif ( roughness >= cubeUV_r1 ) {\\n\\t\\t\\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\\n\\t\\t} else if ( roughness >= cubeUV_r4 ) {\\n\\t\\t\\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\\n\\t\\t} else if ( roughness >= cubeUV_r5 ) {\\n\\t\\t\\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\\n\\t\\t} else if ( roughness >= cubeUV_r6 ) {\\n\\t\\t\\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\\n\\t\\t} else {\\n\\t\\t\\tmip = - 2.0 * log2( 1.16 * roughness );\\t\\t}\\n\\t\\treturn mip;\\n\\t}\\n\\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\\t\\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\\n\\t\\tfloat mipF = fract( mip );\\n\\t\\tfloat mipInt = floor( mip );\\n\\t\\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\\t\\tif ( mipF == 0.0 ) {\\n\\t\\t\\treturn vec4( color0, 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\\t\\t\\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\\t\\t}\\n\\t}\\n#endif\",defaultnormal_vertex:\"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\\tmat3 m = mat3( instanceMatrix );\\n\\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#ifdef FLIP_SIDED\\n\\t\\ttransformedTangent = - transformedTangent;\\n\\t#endif\\n#endif\",displacementmap_pars_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\",displacementmap_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\\n#endif\",emissivemap_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\",emissivemap_pars_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\",encodings_fragment:\"gl_FragColor = linearToOutputTexel( gl_FragColor );\",encodings_pars_fragment:\"vec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\\n}\",envmap_fragment:\"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvec3 cameraToFrag;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\",envmap_common_pars_fragment:\"#ifdef USE_ENVMAP\\n\\tuniform float envMapIntensity;\\n\\tuniform float flipEnvMap;\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\t\\n#endif\",envmap_pars_fragment:\"#ifdef USE_ENVMAP\\n\\tuniform float reflectivity;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\",envmap_pars_vertex:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\t\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\",envmap_physical_pars_fragment:\"#if defined( USE_ENVMAP )\\n\\tvec3 getIBLIrradiance( const in vec3 normal ) {\\n\\t\\t#if defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\\t\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t\\t#else\\n\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t#endif\\n\\t}\\n\\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\\n\\t\\t#if defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 reflectVec = reflect( - viewDir, normal );\\n\\t\\t\\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\\t\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\\t\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t\\t#else\\n\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\",envmap_vertex:\"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\",fog_vertex:\"#ifdef USE_FOG\\n\\tvFogDepth = - mvPosition.z;\\n#endif\",fog_pars_vertex:\"#ifdef USE_FOG\\n\\tvarying float vFogDepth;\\n#endif\",fog_fragment:\"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\",fog_pars_fragment:\"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float vFogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\",gradientmap_pars_fragment:\"#ifdef USE_GRADIENTMAP\\n\\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\tfloat dotNL = dot( normal, lightDirection );\\n\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t#ifdef USE_GRADIENTMAP\\n\\t\\treturn vec3( texture2D( gradientMap, coord ).r );\\n\\t#else\\n\\t\\tvec2 fw = fwidth( coord ) * 0.5;\\n\\t\\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\\n\\t#endif\\n}\",lightmap_fragment:\"#ifdef USE_LIGHTMAP\\n\\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\\n\\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\\treflectedLight.indirectDiffuse += lightMapIrradiance;\\n#endif\",lightmap_pars_fragment:\"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\",lights_lambert_fragment:\"LambertMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularStrength = specularStrength;\",lights_lambert_pars_fragment:\"varying vec3 vViewPosition;\\nstruct LambertMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Lambert\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Lambert\",lights_pars_begin:\"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\nuniform vec3 lightProbe[ 9 ];\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\\n\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\treturn irradiance;\\n}\\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tif ( cutoffDistance > 0.0 ) {\\n\\t\\t\\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\t}\\n\\t\\treturn distanceFalloff;\\n\\t#else\\n\\t\\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\\t\\t\\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\\t\\t}\\n\\t\\treturn 1.0;\\n\\t#endif\\n}\\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\\n\\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\\t\\tlight.color = directionalLight.color;\\n\\t\\tlight.direction = directionalLight.direction;\\n\\t\\tlight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tlight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tlight.color = pointLight.color;\\n\\t\\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tlight.direction = normalize( lVector );\\n\\t\\tfloat angleCos = dot( light.direction, spotLight.direction );\\n\\t\\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\tif ( spotAttenuation > 0.0 ) {\\n\\t\\t\\tfloat lightDistance = length( lVector );\\n\\t\\t\\tlight.color = spotLight.color * spotAttenuation;\\n\\t\\t\\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\\t\\t} else {\\n\\t\\t\\tlight.color = vec3( 0.0 );\\n\\t\\t\\tlight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\\n\\t\\tfloat dotNL = dot( normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\",lights_toon_fragment:\"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\",lights_toon_pars_fragment:\"varying vec3 vViewPosition;\\nstruct ToonMaterial {\\n\\tvec3 diffuseColor;\\n};\\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Toon\",lights_phong_fragment:\"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\",lights_phong_pars_fragment:\"varying vec3 vViewPosition;\\nstruct BlinnPhongMaterial {\\n\\tvec3 diffuseColor;\\n\\tvec3 specularColor;\\n\\tfloat specularShininess;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\",lights_physical_fragment:\"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\\nmaterial.roughness = min( material.roughness, 1.0 );\\n#ifdef IOR\\n\\tmaterial.ior = ior;\\n\\t#ifdef SPECULAR\\n\\t\\tfloat specularIntensityFactor = specularIntensity;\\n\\t\\tvec3 specularColorFactor = specularColor;\\n\\t\\t#ifdef USE_SPECULARINTENSITYMAP\\n\\t\\t\\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\\n\\t\\t#endif\\n\\t\\t#ifdef USE_SPECULARCOLORMAP\\n\\t\\t\\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\\n\\t\\t#endif\\n\\t\\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\\n\\t#else\\n\\t\\tfloat specularIntensityFactor = 1.0;\\n\\t\\tvec3 specularColorFactor = vec3( 1.0 );\\n\\t\\tmaterial.specularF90 = 1.0;\\n\\t#endif\\n\\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.specularF90 = 1.0;\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tmaterial.clearcoat = clearcoat;\\n\\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\\tmaterial.clearcoatF0 = vec3( 0.04 );\\n\\tmaterial.clearcoatF90 = 1.0;\\n\\t#ifdef USE_CLEARCOATMAP\\n\\t\\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\t\\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\\n\\t#endif\\n\\tmaterial.clearcoat = saturate( material.clearcoat );\\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\\tmaterial.clearcoatRoughness += geometryRoughness;\\n\\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tmaterial.iridescence = iridescence;\\n\\tmaterial.iridescenceIOR = iridescenceIOR;\\n\\t#ifdef USE_IRIDESCENCEMAP\\n\\t\\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\\n\\t#endif\\n\\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\t\\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\\n\\t#else\\n\\t\\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\\n\\t#endif\\n#endif\\n#ifdef USE_SHEEN\\n\\tmaterial.sheenColor = sheenColor;\\n\\t#ifdef USE_SHEENCOLORMAP\\n\\t\\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\\n\\t#endif\\n\\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\\n\\t#ifdef USE_SHEENROUGHNESSMAP\\n\\t\\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\\n\\t#endif\\n#endif\",lights_physical_pars_fragment:\"struct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat roughness;\\n\\tvec3 specularColor;\\n\\tfloat specularF90;\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat clearcoat;\\n\\t\\tfloat clearcoatRoughness;\\n\\t\\tvec3 clearcoatF0;\\n\\t\\tfloat clearcoatF90;\\n\\t#endif\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tfloat iridescence;\\n\\t\\tfloat iridescenceIOR;\\n\\t\\tfloat iridescenceThickness;\\n\\t\\tvec3 iridescenceFresnel;\\n\\t\\tvec3 iridescenceF0;\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tvec3 sheenColor;\\n\\t\\tfloat sheenRoughness;\\n\\t#endif\\n\\t#ifdef IOR\\n\\t\\tfloat ior;\\n\\t#endif\\n\\t#ifdef USE_TRANSMISSION\\n\\t\\tfloat transmission;\\n\\t\\tfloat transmissionAlpha;\\n\\t\\tfloat thickness;\\n\\t\\tfloat attenuationDistance;\\n\\t\\tvec3 attenuationColor;\\n\\t#endif\\n};\\nvec3 clearcoatSpecular = vec3( 0.0 );\\nvec3 sheenSpecular = vec3( 0.0 );\\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat r2 = roughness * roughness;\\n\\tfloat a = roughness \u003C 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\\n\\tfloat b = roughness \u003C 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\\n\\tfloat DG = exp( a * dotNV + b ) + ( roughness \u003C 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\\n\\treturn saturate( DG * RECIPROCAL_PI );\\n}\\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\\n\\treturn fab;\\n}\\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\\n\\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\\treturn specularColor * fab.x + specularF90 * fab.y;\\n}\\n#ifdef USE_IRIDESCENCE\\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n#else\\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n#endif\\n\\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\\n\\t#else\\n\\t\\tvec3 Fr = specularColor;\\n\\t#endif\\n\\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\\n\\tfloat Ess = fab.x + fab.y;\\n\\tfloat Ems = 1.0 - Ess;\\n\\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\\tsingleScatter += FssEss;\\n\\tmultiScatter += Fms * Ems;\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.roughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3( 0, 1, 0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\\n\\t\\tvec3 ccIrradiance = dotNLcc * directLight.color;\\n\\t\\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\\n\\t#endif\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\\n\\t#else\\n\\t\\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\\n\\t#endif\\n\\tvec3 singleScattering = vec3( 0.0 );\\n\\tvec3 multiScattering = vec3( 0.0 );\\n\\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\\n\\t#else\\n\\t\\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\\n\\t#endif\\n\\tvec3 totalScattering = singleScattering + multiScattering;\\n\\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\\n\\treflectedLight.indirectSpecular += radiance * singleScattering;\\n\\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\",lights_fragment_begin:\"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\n#ifdef USE_CLEARCOAT\\n\\tgeometry.clearcoatNormal = clearcoatNormal;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\\n\\tif ( material.iridescenceThickness == 0.0 ) {\\n\\t\\tmaterial.iridescence = 0.0;\\n\\t} else {\\n\\t\\tmaterial.iridescence = saturate( material.iridescence );\\n\\t}\\n\\tif ( material.iridescence > 0.0 ) {\\n\\t\\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\\n\\t\\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\\n\\t}\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointLightInfo( pointLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX \u003C NUM_POINT_LIGHT_SHADOWS )\\n\\t\\tpointLightShadow = pointLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\tvec4 spotColor;\\n\\tvec3 spotLightCoord;\\n\\tbool inSpotLightMap;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotLightInfo( spotLight, geometry, directLight );\\n\\t\\t#if ( UNROLLED_LOOP_INDEX \u003C NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\\n\\t\\t#elif ( UNROLLED_LOOP_INDEX \u003C NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\\n\\t\\t#else\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\\t\\t#endif\\n\\t\\t#if ( SPOT_LIGHT_MAP_INDEX \u003C NUM_SPOT_LIGHT_MAPS )\\n\\t\\t\\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\\n\\t\\t\\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\\n\\t\\t\\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\\n\\t\\t\\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\\n\\t\\t#endif\\n\\t\\t#undef SPOT_LIGHT_MAP_INDEX\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX \u003C NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\tspotLightShadow = spotLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX \u003C NUM_DIR_LIGHT_SHADOWS )\\n\\t\\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 iblIrradiance = vec3( 0.0 );\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i \u003C NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\",lights_fragment_maps:\"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\\n\\t\\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tiblIrradiance += getIBLIrradiance( geometry.normal );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\\n\\t#endif\\n#endif\",lights_fragment_end:\"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\\n#endif\",logdepthbuf_fragment:\"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\",logdepthbuf_pars_fragment:\"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tuniform float logDepthBufFC;\\n\\tvarying float vFragDepth;\\n\\tvarying float vIsPerspective;\\n#endif\",logdepthbuf_pars_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t\\tvarying float vIsPerspective;\\n\\t#else\\n\\t\\tuniform float logDepthBufFC;\\n\\t#endif\\n#endif\",logdepthbuf_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t\\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\\t#else\\n\\t\\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\\t\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\t\\tgl_Position.z *= gl_Position.w;\\n\\t\\t}\\n\\t#endif\\n#endif\",map_fragment:\"#ifdef USE_MAP\\n\\tvec4 sampledDiffuseColor = texture2D( map, vUv );\\n\\t#ifdef DECODE_VIDEO_TEXTURE\\n\\t\\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\\n\\t#endif\\n\\tdiffuseColor *= sampledDiffuseColor;\\n#endif\",map_pars_fragment:\"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\",map_particle_fragment:\"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n#endif\\n#ifdef USE_MAP\\n\\tdiffuseColor *= texture2D( map, uv );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\",map_particle_pars_fragment:\"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tuniform mat3 uvTransform;\\n#endif\\n#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\",metalnessmap_fragment:\"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\",metalnessmap_pars_fragment:\"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\",morphcolor_vertex:\"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\\n\\tvColor *= morphTargetBaseInfluence;\\n\\tfor ( int i = 0; i \u003C MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t#if defined( USE_COLOR_ALPHA )\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\\n\\t\\t#elif defined( USE_COLOR )\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\\n\\t\\t#endif\\n\\t}\\n#endif\",morphnormal_vertex:\"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal *= morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tfor ( int i = 0; i \u003C MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\\n\\t\\t}\\n\\t#else\\n\\t\\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\\t\\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\\t\\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\\t\\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n\\t#endif\\n#endif\",morphtarget_pars_vertex:\"#ifdef USE_MORPHTARGETS\\n\\tuniform float morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\\n\\t\\tuniform sampler2DArray morphTargetsTexture;\\n\\t\\tuniform ivec2 morphTargetsTextureSize;\\n\\t\\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\\n\\t\\t\\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\\n\\t\\t\\tint y = texelIndex / morphTargetsTextureSize.x;\\n\\t\\t\\tint x = texelIndex - y * morphTargetsTextureSize.x;\\n\\t\\t\\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\\n\\t\\t\\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\\n\\t\\t}\\n\\t#else\\n\\t\\t#ifndef USE_MORPHNORMALS\\n\\t\\t\\tuniform float morphTargetInfluences[ 8 ];\\n\\t\\t#else\\n\\t\\t\\tuniform float morphTargetInfluences[ 4 ];\\n\\t\\t#endif\\n\\t#endif\\n#endif\",morphtarget_vertex:\"#ifdef USE_MORPHTARGETS\\n\\ttransformed *= morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tfor ( int i = 0; i \u003C MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\\n\\t\\t}\\n\\t#else\\n\\t\\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\\t\\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\\t\\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\\t\\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\\t\\t#ifndef USE_MORPHNORMALS\\n\\t\\t\\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\\t\\t\\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\\t\\t\\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\\t\\t\\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\\t\\t#endif\\n\\t#endif\\n#endif\",normal_fragment_begin:\"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\\n#ifdef FLAT_SHADED\\n\\tvec3 fdx = dFdx( vViewPosition );\\n\\tvec3 fdy = dFdy( vViewPosition );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\t#ifdef USE_TANGENT\\n\\t\\tvec3 tangent = normalize( vTangent );\\n\\t\\tvec3 bitangent = normalize( vBitangent );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\ttangent = tangent * faceDirection;\\n\\t\\t\\tbitangent = bitangent * faceDirection;\\n\\t\\t#endif\\n\\t\\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\\n\\t\\t\\tmat3 vTBN = mat3( tangent, bitangent, normal );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\nvec3 geometryNormal = normal;\",normal_fragment_maps:\"#ifdef OBJECTSPACE_NORMALMAP\\n\\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t#ifdef FLIP_SIDED\\n\\t\\tnormal = - normal;\\n\\t#endif\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\tnormal = normalize( normalMatrix * normal );\\n#elif defined( TANGENTSPACE_NORMALMAP )\\n\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tmapN.xy *= normalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tnormal = normalize( vTBN * mapN );\\n\\t#else\\n\\t\\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\\n\\t#endif\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\\n#endif\",normal_pars_fragment:\"#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\",normal_pars_vertex:\"#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\",normal_vertex:\"#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\",normalmap_pars_fragment:\"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n#endif\\n#ifdef OBJECTSPACE_NORMALMAP\\n\\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\\n\\t\\tvec3 q0 = dFdx( eye_pos.xyz );\\n\\t\\tvec3 q1 = dFdy( eye_pos.xyz );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tvec3 N = surf_norm;\\n\\t\\tvec3 q1perp = cross( q1, N );\\n\\t\\tvec3 q0perp = cross( N, q0 );\\n\\t\\tvec3 T = q1perp * st0.x + q0perp * st1.x;\\n\\t\\tvec3 B = q1perp * st0.y + q0perp * st1.y;\\n\\t\\tfloat det = max( dot( T, T ), dot( B, B ) );\\n\\t\\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\\n\\t\\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\\n\\t}\\n#endif\",clearcoat_normal_fragment_begin:\"#ifdef USE_CLEARCOAT\\n\\tvec3 clearcoatNormal = geometryNormal;\\n#endif\",clearcoat_normal_fragment_maps:\"#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\\n\\t#else\\n\\t\\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\\n\\t#endif\\n#endif\",clearcoat_pars_fragment:\"#ifdef USE_CLEARCOATMAP\\n\\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform sampler2D clearcoatNormalMap;\\n\\tuniform vec2 clearcoatNormalScale;\\n#endif\",iridescence_pars_fragment:\"#ifdef USE_IRIDESCENCEMAP\\n\\tuniform sampler2D iridescenceMap;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tuniform sampler2D iridescenceThicknessMap;\\n#endif\",output_fragment:\"#ifdef OPAQUE\\ndiffuseColor.a = 1.0;\\n#endif\\n#ifdef USE_TRANSMISSION\\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\\n#endif\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\",packing:\"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nvec2 packDepthToRG( in highp float v ) {\\n\\treturn packDepthToRGBA( v ).yx;\\n}\\nfloat unpackRGToDepth( const in highp vec2 v ) {\\n\\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\\n\\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\",premultiplied_alpha_fragment:\"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\",project_vertex:\"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\",dithering_fragment:\"#ifdef DITHERING\\n\\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\",dithering_pars_fragment:\"#ifdef DITHERING\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\",roughnessmap_fragment:\"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\",roughnessmap_pars_fragment:\"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\",shadowmap_pars_fragment:\"#if NUM_SPOT_LIGHT_COORDS > 0\\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#if NUM_SPOT_LIGHT_MAPS > 0\\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\\t\\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\\t}\\n\\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\\t\\tfloat occlusion = 1.0;\\n\\t\\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\\t\\tfloat hard_shadow = step( compare , distribution.x );\\n\\t\\tif (hard_shadow != 1.0 ) {\\n\\t\\t\\tfloat distance = compare - distribution.x ;\\n\\t\\t\\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\\t\\t\\tfloat softness_probability = variance / (variance + distance * distance );\\t\\t\\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\\t\\t\\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\\t\\t}\\n\\t\\treturn occlusion;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x \u003C= 1.0, shadowCoord.y >= 0.0, shadowCoord.y \u003C= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z \u003C= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx2 = dx0 / 2.0;\\n\\t\\t\\tfloat dy2 = dy0 / 2.0;\\n\\t\\t\\tfloat dx3 = dx1 / 2.0;\\n\\t\\t\\tfloat dy3 = dy1 / 2.0;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 17.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx = texelSize.x;\\n\\t\\t\\tfloat dy = texelSize.y;\\n\\t\\t\\tvec2 uv = shadowCoord.xy;\\n\\t\\t\\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t f.y )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\",shadowmap_pars_vertex:\"#if NUM_SPOT_LIGHT_COORDS > 0\\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n#endif\",shadowmap_vertex:\"#if defined( USE_SHADOWMAP ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_COORDS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\tvec4 shadowWorldPosition;\\n\\t#endif\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_COORDS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_SPOT_LIGHT_COORDS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition;\\n\\t\\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX \u003C NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\t\\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\\n\\t\\t#endif\\n\\t\\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\",shadowmask_pars_fragment:\"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tspotLight = spotLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i \u003C NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tpointLight = pointLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\",skinbase_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\",skinning_pars_vertex:\"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\tuniform highp sampler2D boneTexture;\\n\\tuniform int boneTextureSize;\\n\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\tfloat j = i * 4.0;\\n\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\ty = dy * ( y + 0.5 );\\n\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\treturn bone;\\n\\t}\\n#endif\",skinning_vertex:\"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\",skinnormal_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\\t#ifdef USE_TANGENT\\n\\t\\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#endif\\n#endif\",specularmap_fragment:\"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\",specularmap_pars_fragment:\"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\",tonemapping_fragment:\"#if defined( TONE_MAPPING )\\n\\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\",tonemapping_pars_fragment:\"#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\\tconst mat3 ACESInputMat = mat3(\\n\\t\\tvec3( 0.59719, 0.07600, 0.02840 ),\\t\\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\\t\\tvec3( 0.04823, 0.01566, 0.83777 )\\n\\t);\\n\\tconst mat3 ACESOutputMat = mat3(\\n\\t\\tvec3( 1.60475, -0.10208, -0.00327 ),\\t\\tvec3( -0.53108, 1.10813, -0.07276 ),\\n\\t\\tvec3( -0.07367, -0.00605, 1.07602 )\\n\\t);\\n\\tcolor *= toneMappingExposure / 0.6;\\n\\tcolor = ACESInputMat * color;\\n\\tcolor = RRTAndODTFit( color );\\n\\tcolor = ACESOutputMat * color;\\n\\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\",transmission_fragment:\"#ifdef USE_TRANSMISSION\\n\\tmaterial.transmission = transmission;\\n\\tmaterial.transmissionAlpha = 1.0;\\n\\tmaterial.thickness = thickness;\\n\\tmaterial.attenuationDistance = attenuationDistance;\\n\\tmaterial.attenuationColor = attenuationColor;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\\n\\t#endif\\n\\tvec3 pos = vWorldPosition;\\n\\tvec3 v = normalize( cameraPosition - pos );\\n\\tvec3 n = inverseTransformDirection( normal, viewMatrix );\\n\\tvec4 transmission = getIBLVolumeRefraction(\\n\\t\\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\\n\\t\\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\\n\\t\\tmaterial.attenuationColor, material.attenuationDistance );\\n\\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\\n\\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\\n#endif\",transmission_pars_fragment:\"#ifdef USE_TRANSMISSION\\n\\tuniform float transmission;\\n\\tuniform float thickness;\\n\\tuniform float attenuationDistance;\\n\\tuniform vec3 attenuationColor;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tuniform sampler2D transmissionMap;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tuniform sampler2D thicknessMap;\\n\\t#endif\\n\\tuniform vec2 transmissionSamplerSize;\\n\\tuniform sampler2D transmissionSamplerMap;\\n\\tuniform mat4 modelMatrix;\\n\\tuniform mat4 projectionMatrix;\\n\\tvarying vec3 vWorldPosition;\\n\\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\\n\\t\\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\\n\\t\\tvec3 modelScale;\\n\\t\\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\\n\\t\\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\\n\\t\\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\\n\\t\\treturn normalize( refractionVector ) * thickness * modelScale;\\n\\t}\\n\\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\\n\\t\\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\\n\\t}\\n\\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\\n\\t\\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\\n\\t\\t#ifdef texture2DLodEXT\\n\\t\\t\\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\\n\\t\\t#else\\n\\t\\t\\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\\n\\t\\t#endif\\n\\t}\\n\\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\\n\\t\\tif ( isinf( attenuationDistance ) ) {\\n\\t\\t\\treturn radiance;\\n\\t\\t} else {\\n\\t\\t\\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\\n\\t\\t\\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\\t\\t\\treturn transmittance * radiance;\\n\\t\\t}\\n\\t}\\n\\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\\n\\t\\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\\n\\t\\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\\n\\t\\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\\n\\t\\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\\n\\t\\tvec3 refractedRayExit = position + transmissionRay;\\n\\t\\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\\n\\t\\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\\n\\t\\trefractionCoords += 1.0;\\n\\t\\trefractionCoords /= 2.0;\\n\\t\\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\\n\\t\\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\\n\\t\\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\\n\\t\\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\\n\\t}\\n#endif\",uv_pars_fragment:\"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\\n\\tvarying vec2 vUv;\\n#endif\",uv_pars_vertex:\"#ifdef USE_UV\\n\\t#ifdef UVS_VERTEX_ONLY\\n\\t\\tvec2 vUv;\\n\\t#else\\n\\t\\tvarying vec2 vUv;\\n\\t#endif\\n\\tuniform mat3 uvTransform;\\n#endif\",uv_vertex:\"#ifdef USE_UV\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif\",uv2_pars_fragment:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\",uv2_pars_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n\\tuniform mat3 uv2Transform;\\n#endif\",uv2_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\\n#endif\",worldpos_vertex:\"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\\n\\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\\t#ifdef USE_INSTANCING\\n\\t\\tworldPosition = instanceMatrix * worldPosition;\\n\\t#endif\\n\\tworldPosition = modelMatrix * worldPosition;\\n#endif\",background_vert:\"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\",background_frag:\"uniform sampler2D t2D;\\nuniform float backgroundIntensity;\\nvarying vec2 vUv;\\nvoid main() {\\n\\tvec4 texColor = texture2D( t2D, vUv );\\n\\t#ifdef DECODE_VIDEO_TEXTURE\\n\\t\\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\\n\\t#endif\\n\\ttexColor.rgb *= backgroundIntensity;\\n\\tgl_FragColor = texColor;\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n}\",backgroundCube_vert:\"varying vec3 vWorldDirection;\\n#include \u003Ccommon>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\",backgroundCube_frag:\"#ifdef ENVMAP_TYPE_CUBE\\n\\tuniform samplerCube envMap;\\n#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\tuniform sampler2D envMap;\\n#endif\\nuniform float flipEnvMap;\\nuniform float backgroundBlurriness;\\nuniform float backgroundIntensity;\\nvarying vec3 vWorldDirection;\\n#include \u003Ccube_uv_reflection_fragment>\\nvoid main() {\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\\n\\t#else\\n\\t\\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t#endif\\n\\ttexColor.rgb *= backgroundIntensity;\\n\\tgl_FragColor = texColor;\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n}\",cube_vert:\"varying vec3 vWorldDirection;\\n#include \u003Ccommon>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\",cube_frag:\"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\nvoid main() {\\n\\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\\n\\tgl_FragColor = texColor;\\n\\tgl_FragColor.a *= opacity;\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n}\",depth_vert:\"#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include \u003Cbeginnormal_vertex>\\n\\t\\t#include \u003Cmorphnormal_vertex>\\n\\t\\t#include \u003Cskinnormal_vertex>\\n\\t#endif\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\tvHighPrecisionZW = gl_Position.zw;\\n}\",depth_frag:\"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include \u003Ccommon>\\n#include \u003Cpacking>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\\t#endif\\n}\",distanceRGBA_vert:\"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include \u003Cbeginnormal_vertex>\\n\\t\\t#include \u003Cmorphnormal_vertex>\\n\\t\\t#include \u003Cskinnormal_vertex>\\n\\t#endif\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\",distanceRGBA_frag:\"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include \u003Ccommon>\\n#include \u003Cpacking>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\",equirect_vert:\"varying vec3 vWorldDirection;\\n#include \u003Ccommon>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cproject_vertex>\\n}\",equirect_frag:\"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include \u003Ccommon>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldDirection );\\n\\tvec2 sampleUV = equirectUv( direction );\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n}\",linedashed_vert:\"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include \u003Ccommon>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\tvLineDistance = scale * lineDistance;\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",linedashed_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include \u003Ccommon>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n}\",meshbasic_vert:\"#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cuv2_pars_vertex>\\n#include \u003Cenvmap_pars_vertex>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cuv2_vertex>\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\\n\\t\\t#include \u003Cbeginnormal_vertex>\\n\\t\\t#include \u003Cmorphnormal_vertex>\\n\\t\\t#include \u003Cskinbase_vertex>\\n\\t\\t#include \u003Cskinnormal_vertex>\\n\\t\\t#include \u003Cdefaultnormal_vertex>\\n\\t#endif\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cenvmap_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",meshbasic_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \u003Ccommon>\\n#include \u003Cdithering_pars_fragment>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cuv2_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Caomap_pars_fragment>\\n#include \u003Clightmap_pars_fragment>\\n#include \u003Cenvmap_common_pars_fragment>\\n#include \u003Cenvmap_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Cspecularmap_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\t#include \u003Cspecularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\\n\\t\\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include \u003Caomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include \u003Cenvmap_fragment>\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n\\t#include \u003Cdithering_fragment>\\n}\",meshlambert_vert:\"#define LAMBERT\\nvarying vec3 vViewPosition;\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cuv2_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Cenvmap_pars_vertex>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cnormal_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Cshadowmap_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cuv2_vertex>\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#include \u003Cbeginnormal_vertex>\\n\\t#include \u003Cmorphnormal_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#include \u003Cskinnormal_vertex>\\n\\t#include \u003Cdefaultnormal_vertex>\\n\\t#include \u003Cnormal_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cenvmap_vertex>\\n\\t#include \u003Cshadowmap_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",meshlambert_frag:\"#define LAMBERT\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \u003Ccommon>\\n#include \u003Cpacking>\\n#include \u003Cdithering_pars_fragment>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cuv2_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Caomap_pars_fragment>\\n#include \u003Clightmap_pars_fragment>\\n#include \u003Cemissivemap_pars_fragment>\\n#include \u003Cenvmap_common_pars_fragment>\\n#include \u003Cenvmap_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Cbsdfs>\\n#include \u003Clights_pars_begin>\\n#include \u003Cnormal_pars_fragment>\\n#include \u003Clights_lambert_pars_fragment>\\n#include \u003Cshadowmap_pars_fragment>\\n#include \u003Cbumpmap_pars_fragment>\\n#include \u003Cnormalmap_pars_fragment>\\n#include \u003Cspecularmap_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\t#include \u003Cspecularmap_fragment>\\n\\t#include \u003Cnormal_fragment_begin>\\n\\t#include \u003Cnormal_fragment_maps>\\n\\t#include \u003Cemissivemap_fragment>\\n\\t#include \u003Clights_lambert_fragment>\\n\\t#include \u003Clights_fragment_begin>\\n\\t#include \u003Clights_fragment_maps>\\n\\t#include \u003Clights_fragment_end>\\n\\t#include \u003Caomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include \u003Cenvmap_fragment>\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n\\t#include \u003Cdithering_fragment>\\n}\",meshmatcap_vert:\"#define MATCAP\\nvarying vec3 vViewPosition;\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cnormal_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#include \u003Cbeginnormal_vertex>\\n\\t#include \u003Cmorphnormal_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#include \u003Cskinnormal_vertex>\\n\\t#include \u003Cdefaultnormal_vertex>\\n\\t#include \u003Cnormal_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\t#include \u003Cfog_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n}\",meshmatcap_frag:\"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#include \u003Ccommon>\\n#include \u003Cdithering_pars_fragment>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Cnormal_pars_fragment>\\n#include \u003Cbumpmap_pars_fragment>\\n#include \u003Cnormalmap_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\t#include \u003Cnormal_fragment_begin>\\n\\t#include \u003Cnormal_fragment_maps>\\n\\tvec3 viewDir = normalize( vViewPosition );\\n\\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\\tvec3 y = cross( viewDir, x );\\n\\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\\t#ifdef USE_MATCAP\\n\\t\\tvec4 matcapColor = texture2D( matcap, uv );\\n\\t#else\\n\\t\\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\\n\\t#endif\\n\\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n\\t#include \u003Cdithering_fragment>\\n}\",meshnormal_vert:\"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Cnormal_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cbeginnormal_vertex>\\n\\t#include \u003Cmorphnormal_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#include \u003Cskinnormal_vertex>\\n\\t#include \u003Cdefaultnormal_vertex>\\n\\t#include \u003Cnormal_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\",meshnormal_frag:\"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#include \u003Cpacking>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cnormal_pars_fragment>\\n#include \u003Cbumpmap_pars_fragment>\\n#include \u003Cnormalmap_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cnormal_fragment_begin>\\n\\t#include \u003Cnormal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n\\t#ifdef OPAQUE\\n\\t\\tgl_FragColor.a = 1.0;\\n\\t#endif\\n}\",meshphong_vert:\"#define PHONG\\nvarying vec3 vViewPosition;\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cuv2_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Cenvmap_pars_vertex>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cnormal_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Cshadowmap_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cuv2_vertex>\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#include \u003Cbeginnormal_vertex>\\n\\t#include \u003Cmorphnormal_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#include \u003Cskinnormal_vertex>\\n\\t#include \u003Cdefaultnormal_vertex>\\n\\t#include \u003Cnormal_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cenvmap_vertex>\\n\\t#include \u003Cshadowmap_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",meshphong_frag:\"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include \u003Ccommon>\\n#include \u003Cpacking>\\n#include \u003Cdithering_pars_fragment>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cuv2_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Caomap_pars_fragment>\\n#include \u003Clightmap_pars_fragment>\\n#include \u003Cemissivemap_pars_fragment>\\n#include \u003Cenvmap_common_pars_fragment>\\n#include \u003Cenvmap_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Cbsdfs>\\n#include \u003Clights_pars_begin>\\n#include \u003Cnormal_pars_fragment>\\n#include \u003Clights_phong_pars_fragment>\\n#include \u003Cshadowmap_pars_fragment>\\n#include \u003Cbumpmap_pars_fragment>\\n#include \u003Cnormalmap_pars_fragment>\\n#include \u003Cspecularmap_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\t#include \u003Cspecularmap_fragment>\\n\\t#include \u003Cnormal_fragment_begin>\\n\\t#include \u003Cnormal_fragment_maps>\\n\\t#include \u003Cemissivemap_fragment>\\n\\t#include \u003Clights_phong_fragment>\\n\\t#include \u003Clights_fragment_begin>\\n\\t#include \u003Clights_fragment_maps>\\n\\t#include \u003Clights_fragment_end>\\n\\t#include \u003Caomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include \u003Cenvmap_fragment>\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n\\t#include \u003Cdithering_fragment>\\n}\",meshphysical_vert:\"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifdef USE_TRANSMISSION\\n\\tvarying vec3 vWorldPosition;\\n#endif\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cuv2_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cnormal_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Cshadowmap_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cuv2_vertex>\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#include \u003Cbeginnormal_vertex>\\n\\t#include \u003Cmorphnormal_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#include \u003Cskinnormal_vertex>\\n\\t#include \u003Cdefaultnormal_vertex>\\n\\t#include \u003Cnormal_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cshadowmap_vertex>\\n\\t#include \u003Cfog_vertex>\\n#ifdef USE_TRANSMISSION\\n\\tvWorldPosition = worldPosition.xyz;\\n#endif\\n}\",meshphysical_frag:\"#define STANDARD\\n#ifdef PHYSICAL\\n\\t#define IOR\\n\\t#define SPECULAR\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef IOR\\n\\tuniform float ior;\\n#endif\\n#ifdef SPECULAR\\n\\tuniform float specularIntensity;\\n\\tuniform vec3 specularColor;\\n\\t#ifdef USE_SPECULARINTENSITYMAP\\n\\t\\tuniform sampler2D specularIntensityMap;\\n\\t#endif\\n\\t#ifdef USE_SPECULARCOLORMAP\\n\\t\\tuniform sampler2D specularColorMap;\\n\\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tuniform float clearcoat;\\n\\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tuniform float iridescence;\\n\\tuniform float iridescenceIOR;\\n\\tuniform float iridescenceThicknessMinimum;\\n\\tuniform float iridescenceThicknessMaximum;\\n#endif\\n#ifdef USE_SHEEN\\n\\tuniform vec3 sheenColor;\\n\\tuniform float sheenRoughness;\\n\\t#ifdef USE_SHEENCOLORMAP\\n\\t\\tuniform sampler2D sheenColorMap;\\n\\t#endif\\n\\t#ifdef USE_SHEENROUGHNESSMAP\\n\\t\\tuniform sampler2D sheenRoughnessMap;\\n\\t#endif\\n#endif\\nvarying vec3 vViewPosition;\\n#include \u003Ccommon>\\n#include \u003Cpacking>\\n#include \u003Cdithering_pars_fragment>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cuv2_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Caomap_pars_fragment>\\n#include \u003Clightmap_pars_fragment>\\n#include \u003Cemissivemap_pars_fragment>\\n#include \u003Cbsdfs>\\n#include \u003Ciridescence_fragment>\\n#include \u003Ccube_uv_reflection_fragment>\\n#include \u003Cenvmap_common_pars_fragment>\\n#include \u003Cenvmap_physical_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Clights_pars_begin>\\n#include \u003Cnormal_pars_fragment>\\n#include \u003Clights_physical_pars_fragment>\\n#include \u003Ctransmission_pars_fragment>\\n#include \u003Cshadowmap_pars_fragment>\\n#include \u003Cbumpmap_pars_fragment>\\n#include \u003Cnormalmap_pars_fragment>\\n#include \u003Cclearcoat_pars_fragment>\\n#include \u003Ciridescence_pars_fragment>\\n#include \u003Croughnessmap_pars_fragment>\\n#include \u003Cmetalnessmap_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\t#include \u003Croughnessmap_fragment>\\n\\t#include \u003Cmetalnessmap_fragment>\\n\\t#include \u003Cnormal_fragment_begin>\\n\\t#include \u003Cnormal_fragment_maps>\\n\\t#include \u003Cclearcoat_normal_fragment_begin>\\n\\t#include \u003Cclearcoat_normal_fragment_maps>\\n\\t#include \u003Cemissivemap_fragment>\\n\\t#include \u003Clights_physical_fragment>\\n\\t#include \u003Clights_fragment_begin>\\n\\t#include \u003Clights_fragment_maps>\\n\\t#include \u003Clights_fragment_end>\\n\\t#include \u003Caomap_fragment>\\n\\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\\n\\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\\n\\t#include \u003Ctransmission_fragment>\\n\\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\\n\\t#ifdef USE_SHEEN\\n\\t\\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\\n\\t\\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\\n\\t\\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\\n\\t\\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\\n\\t#endif\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n\\t#include \u003Cdithering_fragment>\\n}\",meshtoon_vert:\"#define TOON\\nvarying vec3 vViewPosition;\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cuv2_pars_vertex>\\n#include \u003Cdisplacementmap_pars_vertex>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cnormal_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Cshadowmap_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\t#include \u003Cuv2_vertex>\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#include \u003Cbeginnormal_vertex>\\n\\t#include \u003Cmorphnormal_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#include \u003Cskinnormal_vertex>\\n\\t#include \u003Cdefaultnormal_vertex>\\n\\t#include \u003Cnormal_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cdisplacementmap_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cshadowmap_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",meshtoon_frag:\"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \u003Ccommon>\\n#include \u003Cpacking>\\n#include \u003Cdithering_pars_fragment>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cuv2_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Caomap_pars_fragment>\\n#include \u003Clightmap_pars_fragment>\\n#include \u003Cemissivemap_pars_fragment>\\n#include \u003Cgradientmap_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Cbsdfs>\\n#include \u003Clights_pars_begin>\\n#include \u003Cnormal_pars_fragment>\\n#include \u003Clights_toon_pars_fragment>\\n#include \u003Cshadowmap_pars_fragment>\\n#include \u003Cbumpmap_pars_fragment>\\n#include \u003Cnormalmap_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\t#include \u003Cnormal_fragment_begin>\\n\\t#include \u003Cnormal_fragment_maps>\\n\\t#include \u003Cemissivemap_fragment>\\n\\t#include \u003Clights_toon_fragment>\\n\\t#include \u003Clights_fragment_begin>\\n\\t#include \u003Clights_fragment_maps>\\n\\t#include \u003Clights_fragment_end>\\n\\t#include \u003Caomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n\\t#include \u003Cdithering_fragment>\\n}\",points_vert:\"uniform float size;\\nuniform float scale;\\n#include \u003Ccommon>\\n#include \u003Ccolor_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Ccolor_vertex>\\n\\t#include \u003Cmorphcolor_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\tgl_PointSize = size;\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\\t#endif\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",points_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \u003Ccommon>\\n#include \u003Ccolor_pars_fragment>\\n#include \u003Cmap_particle_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_particle_fragment>\\n\\t#include \u003Ccolor_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n\\t#include \u003Cpremultiplied_alpha_fragment>\\n}\",shadow_vert:\"#include \u003Ccommon>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Cmorphtarget_pars_vertex>\\n#include \u003Cskinning_pars_vertex>\\n#include \u003Cshadowmap_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cbeginnormal_vertex>\\n\\t#include \u003Cmorphnormal_vertex>\\n\\t#include \u003Cskinbase_vertex>\\n\\t#include \u003Cskinnormal_vertex>\\n\\t#include \u003Cdefaultnormal_vertex>\\n\\t#include \u003Cbegin_vertex>\\n\\t#include \u003Cmorphtarget_vertex>\\n\\t#include \u003Cskinning_vertex>\\n\\t#include \u003Cproject_vertex>\\n\\t#include \u003Cworldpos_vertex>\\n\\t#include \u003Cshadowmap_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",shadow_frag:\"uniform vec3 color;\\nuniform float opacity;\\n#include \u003Ccommon>\\n#include \u003Cpacking>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Cbsdfs>\\n#include \u003Clights_pars_begin>\\n#include \u003Cshadowmap_pars_fragment>\\n#include \u003Cshadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n}\",sprite_vert:\"uniform float rotation;\\nuniform vec2 center;\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_vertex>\\n#include \u003Cfog_pars_vertex>\\n#include \u003Clogdepthbuf_pars_vertex>\\n#include \u003Cclipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include \u003Cuv_vertex>\\n\\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\t#ifndef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) scale *= - mvPosition.z;\\n\\t#endif\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include \u003Clogdepthbuf_vertex>\\n\\t#include \u003Cclipping_planes_vertex>\\n\\t#include \u003Cfog_vertex>\\n}\",sprite_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \u003Ccommon>\\n#include \u003Cuv_pars_fragment>\\n#include \u003Cmap_pars_fragment>\\n#include \u003Calphamap_pars_fragment>\\n#include \u003Calphatest_pars_fragment>\\n#include \u003Cfog_pars_fragment>\\n#include \u003Clogdepthbuf_pars_fragment>\\n#include \u003Cclipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include \u003Cclipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \u003Clogdepthbuf_fragment>\\n\\t#include \u003Cmap_fragment>\\n\\t#include \u003Calphamap_fragment>\\n\\t#include \u003Calphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \u003Coutput_fragment>\\n\\t#include \u003Ctonemapping_fragment>\\n\\t#include \u003Cencodings_fragment>\\n\\t#include \u003Cfog_fragment>\\n}\"},Ps={common:{diffuse:{value:new Yn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Dn},uv2Transform:{value:new Dn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Ln(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Yn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Yn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Dn}},sprite:{diffuse:{value:new Yn(16777215)},opacity:{value:1},center:{value:new Ln(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Dn}}},ks={basic:{uniforms:ps([Ps.common,Ps.specularmap,Ps.envmap,Ps.aomap,Ps.lightmap,Ps.fog]),vertexShader:Rs.meshbasic_vert,fragmentShader:Rs.meshbasic_frag},lambert:{uniforms:ps([Ps.common,Ps.specularmap,Ps.envmap,Ps.aomap,Ps.lightmap,Ps.emissivemap,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,Ps.fog,Ps.lights,{emissive:{value:new Yn(0)}}]),vertexShader:Rs.meshlambert_vert,fragmentShader:Rs.meshlambert_frag},phong:{uniforms:ps([Ps.common,Ps.specularmap,Ps.envmap,Ps.aomap,Ps.lightmap,Ps.emissivemap,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,Ps.fog,Ps.lights,{emissive:{value:new Yn(0)},specular:{value:new Yn(1118481)},shininess:{value:30}}]),vertexShader:Rs.meshphong_vert,fragmentShader:Rs.meshphong_frag},standard:{uniforms:ps([Ps.common,Ps.envmap,Ps.aomap,Ps.lightmap,Ps.emissivemap,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,Ps.roughnessmap,Ps.metalnessmap,Ps.fog,Ps.lights,{emissive:{value:new Yn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Rs.meshphysical_vert,fragmentShader:Rs.meshphysical_frag},toon:{uniforms:ps([Ps.common,Ps.aomap,Ps.lightmap,Ps.emissivemap,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,Ps.gradientmap,Ps.fog,Ps.lights,{emissive:{value:new Yn(0)}}]),vertexShader:Rs.meshtoon_vert,fragmentShader:Rs.meshtoon_frag},matcap:{uniforms:ps([Ps.common,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,Ps.fog,{matcap:{value:null}}]),vertexShader:Rs.meshmatcap_vert,fragmentShader:Rs.meshmatcap_frag},points:{uniforms:ps([Ps.points,Ps.fog]),vertexShader:Rs.points_vert,fragmentShader:Rs.points_frag},dashed:{uniforms:ps([Ps.common,Ps.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Rs.linedashed_vert,fragmentShader:Rs.linedashed_frag},depth:{uniforms:ps([Ps.common,Ps.displacementmap]),vertexShader:Rs.depth_vert,fragmentShader:Rs.depth_frag},normal:{uniforms:ps([Ps.common,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,{opacity:{value:1}}]),vertexShader:Rs.meshnormal_vert,fragmentShader:Rs.meshnormal_frag},sprite:{uniforms:ps([Ps.sprite,Ps.fog]),vertexShader:Rs.sprite_vert,fragmentShader:Rs.sprite_frag},background:{uniforms:{uvTransform:{value:new Dn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Rs.background_vert,fragmentShader:Rs.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Rs.backgroundCube_vert,fragmentShader:Rs.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Rs.cube_vert,fragmentShader:Rs.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Rs.equirect_vert,fragmentShader:Rs.equirect_frag},distanceRGBA:{uniforms:ps([Ps.common,Ps.displacementmap,{referencePosition:{value:new ci},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Rs.distanceRGBA_vert,fragmentShader:Rs.distanceRGBA_frag},shadow:{uniforms:ps([Ps.lights,Ps.fog,{color:{value:new Yn(0)},opacity:{value:1}}]),vertexShader:Rs.shadow_vert,fragmentShader:Rs.shadow_frag}};ks.physical={uniforms:ps([ks.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Ln(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Yn(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Ln},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Yn(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Yn(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Rs.meshphysical_vert,fragmentShader:Rs.meshphysical_frag};const Fs={r:0,b:0,g:0};function Os(e,t,n,i,r,s,o){const a=new Yn(0);let l,c,h=!0===s?0:1,u=null,d=0,p=null;function A(t,n){t.getRGB(Fs,As(e)),i.buffers.color.setClear(Fs.r,Fs.g,Fs.b,n,o)}return{getClearColor:function(){return a},setClearColor:function(e,t=1){a.set(e),h=t,A(a,h)},getClearAlpha:function(){return h},setClearAlpha:function(e){h=e,A(a,h)},render:function(i,s){let o=!1,f=!0===s.isScene?s.background:null;f&&f.isTexture&&(f=(s.backgroundBlurriness>0?n:t).get(f));const v=e.xr,y=v.getSession&&v.getSession();y&&\"additive\"===y.environmentBlendMode&&(f=null),null===f?A(a,h):f&&f.isColor&&(A(f,1),o=!0),(e.autoClear||o)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),f&&(f.isCubeTexture||f.mapping===ce)?(void 0===c&&(c=new cs(new us(1,1,1),new ms({name:\"BackgroundCubeMaterial\",uniforms:ds(ks.backgroundCube.uniforms),vertexShader:ks.backgroundCube.vertexShader,fragmentShader:ks.backgroundCube.fragmentShader,side:g,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute(\"normal\"),c.geometry.deleteAttribute(\"uv\"),c.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,\"envMap\",{get:function(){return this.uniforms.envMap.value}}),r.update(c)),c.material.uniforms.envMap.value=f,c.material.uniforms.flipEnvMap.value=f.isCubeTexture&&!1===f.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=s.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,u===f&&d===f.version&&p===e.toneMapping||(c.material.needsUpdate=!0,u=f,d=f.version,p=e.toneMapping),c.layers.enableAll(),i.unshift(c,c.geometry,c.material,0,0,null)):f&&f.isTexture&&(void 0===l&&(l=new cs(new Ds(2,2),new ms({name:\"BackgroundMaterial\",uniforms:ds(ks.background.uniforms),vertexShader:ks.background.vertexShader,fragmentShader:ks.background.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute(\"normal\"),Object.defineProperty(l.material,\"map\",{get:function(){return this.uniforms.t2D.value}}),r.update(l)),l.material.uniforms.t2D.value=f,l.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,!0===f.matrixAutoUpdate&&f.updateMatrix(),l.material.uniforms.uvTransform.value.copy(f.matrix),u===f&&d===f.version&&p===e.toneMapping||(l.material.needsUpdate=!0,u=f,d=f.version,p=e.toneMapping),l.layers.enableAll(),i.unshift(l,l.geometry,l.material,0,0,null))}}}function Qs(e,t,n,i){const r=e.getParameter(34921),s=i.isWebGL2?null:t.get(\"OES_vertex_array_object\"),o=i.isWebGL2||null!==s,a={},l=p(null);let c=l,h=!1;function u(t){return i.isWebGL2?e.bindVertexArray(t):s.bindVertexArrayOES(t)}function d(t){return i.isWebGL2?e.deleteVertexArray(t):s.deleteVertexArrayOES(t)}function p(e){const t=[],n=[],i=[];for(let e=0;e\u003Cr;e++)t[e]=0,n[e]=0,i[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:i,object:e,attributes:{},index:null}}function A(){const e=c.newAttributes;for(let t=0,n=e.length;t\u003Cn;t++)e[t]=0}function f(e){m(e,0)}function m(n,r){const s=c.newAttributes,o=c.enabledAttributes,a=c.attributeDivisors;s[n]=1,0===o[n]&&(e.enableVertexAttribArray(n),o[n]=1),a[n]!==r&&((i.isWebGL2?e:t.get(\"ANGLE_instanced_arrays\"))[i.isWebGL2?\"vertexAttribDivisor\":\"vertexAttribDivisorANGLE\"](n,r),a[n]=r)}function g(){const t=c.newAttributes,n=c.enabledAttributes;for(let i=0,r=n.length;i\u003Cr;i++)n[i]!==t[i]&&(e.disableVertexAttribArray(i),n[i]=0)}function v(t,n,r,s,o,a){!0!==i.isWebGL2||5124!==r&&5125!==r?e.vertexAttribPointer(t,n,r,s,o,a):e.vertexAttribIPointer(t,n,r,o,a)}function y(){E(),h=!0,c!==l&&(c=l,u(c.object))}function E(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(r,l,d,y,E){let b=!1;if(o){const t=function(t,n,r){const o=!0===r.wireframe;let l=a[t.id];void 0===l&&(l={},a[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let h=c[o];return void 0===h&&(h=p(i.isWebGL2?e.createVertexArray():s.createVertexArrayOES()),c[o]=h),h}(y,d,l);c!==t&&(c=t,u(c.object)),b=function(e,t,n,i){const r=c.attributes,s=t.attributes;let o=0;const a=n.getAttributes();for(const t in a)if(a[t].location>=0){const n=r[t];let i=s[t];if(void 0===i&&(\"instanceMatrix\"===t&&e.instanceMatrix&&(i=e.instanceMatrix),\"instanceColor\"===t&&e.instanceColor&&(i=e.instanceColor)),void 0===n)return!0;if(n.attribute!==i)return!0;if(i&&n.data!==i.data)return!0;o++}return c.attributesNum!==o||c.index!==i}(r,y,d,E),b&&function(e,t,n,i){const r={},s=t.attributes;let o=0;const a=n.getAttributes();for(const t in a)if(a[t].location>=0){let n=s[t];void 0===n&&(\"instanceMatrix\"===t&&e.instanceMatrix&&(n=e.instanceMatrix),\"instanceColor\"===t&&e.instanceColor&&(n=e.instanceColor));const i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[t]=i,o++}c.attributes=r,c.attributesNum=o,c.index=i}(r,y,d,E)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===e||(c.geometry=y.id,c.program=d.id,c.wireframe=e,b=!0)}null!==E&&n.update(E,34963),(b||h)&&(h=!1,function(r,s,o,a){if(!1===i.isWebGL2&&(r.isInstancedMesh||a.isInstancedBufferGeometry)&&null===t.get(\"ANGLE_instanced_arrays\"))return;A();const l=a.attributes,c=o.getAttributes(),h=s.defaultAttributeValues;for(const t in c){const i=c[t];if(i.location>=0){let s=l[t];if(void 0===s&&(\"instanceMatrix\"===t&&r.instanceMatrix&&(s=r.instanceMatrix),\"instanceColor\"===t&&r.instanceColor&&(s=r.instanceColor)),void 0!==s){const t=s.normalized,o=s.itemSize,l=n.get(s);if(void 0===l)continue;const c=l.buffer,h=l.type,u=l.bytesPerElement;if(s.isInterleavedBufferAttribute){const n=s.data,l=n.stride,d=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e\u003Ci.locationSize;e++)m(i.location+e,n.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e\u003Ci.locationSize;e++)f(i.location+e);e.bindBuffer(34962,c);for(let e=0;e\u003Ci.locationSize;e++)v(i.location+e,o/i.locationSize,h,t,l*u,(d+o/i.locationSize*e)*u)}else{if(s.isInstancedBufferAttribute){for(let e=0;e\u003Ci.locationSize;e++)m(i.location+e,s.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let e=0;e\u003Ci.locationSize;e++)f(i.location+e);e.bindBuffer(34962,c);for(let e=0;e\u003Ci.locationSize;e++)v(i.location+e,o/i.locationSize,h,t,o*u,o/i.locationSize*e*u)}}else if(void 0!==h){const n=h[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(i.location,n);break;case 3:e.vertexAttrib3fv(i.location,n);break;case 4:e.vertexAttrib4fv(i.location,n);break;default:e.vertexAttrib1fv(i.location,n)}}}}g()}(r,l,d,y),null!==E&&e.bindBuffer(34963,n.get(E).buffer))},reset:y,resetDefaultState:E,dispose:function(){y();for(const e in a){const t=a[e];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete a[e]}},releaseStatesOfGeometry:function(e){if(void 0===a[e.id])return;const t=a[e.id];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete a[e.id]},releaseStatesOfProgram:function(e){for(const t in a){const n=a[t];if(void 0===n[e.id])continue;const i=n[e.id];for(const e in i)d(i[e].object),delete i[e];delete n[e.id]}},initAttributes:A,enableAttribute:f,disableUnusedAttributes:g}}function Us(e,t,n,i){const r=i.isWebGL2;let s;this.setMode=function(e){s=e},this.render=function(t,i){e.drawArrays(s,t,i),n.update(i,s,1)},this.renderInstances=function(i,o,a){if(0===a)return;let l,c;if(r)l=e,c=\"drawArraysInstanced\";else if(l=t.get(\"ANGLE_instanced_arrays\"),c=\"drawArraysInstancedANGLE\",null===l)return void console.error(\"THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");l[c](s,i,o,a),n.update(o,s,a)}}function Ns(e,t,n){let i;function r(t){if(\"highp\"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return\"highp\";t=\"mediump\"}return\"mediump\"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?\"mediump\":\"lowp\"}const s=\"undefined\"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||\"undefined\"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let o=void 0!==n.precision?n.precision:\"highp\";const a=r(o);a!==o&&(console.warn(\"THREE.WebGLRenderer:\",o,\"not supported, using\",a,\"instead.\"),o=a);const l=s||t.has(\"WEBGL_draw_buffers\"),c=!0===n.logarithmicDepthBuffer,h=e.getParameter(34930),u=e.getParameter(35660),d=e.getParameter(3379),p=e.getParameter(34076),A=e.getParameter(34921),f=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),v=u>0,y=s||t.has(\"OES_texture_float\");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has(\"EXT_texture_filter_anisotropic\")){const n=t.get(\"EXT_texture_filter_anisotropic\");i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:r,precision:o,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:A,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:s?e.getParameter(36183):0}}function Gs(e){const t=this;let n=null,i=0,r=!1,s=!1;const o=new _s,a=new Dn,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function h(e,n,i,r){const s=null!==e?e.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const t=i+4*s,r=n.matrixWorldInverse;a.getNormalMatrix(r),(null===c||c.length\u003Ct)&&(c=new Float32Array(t));for(let t=0,n=i;t!==s;++t,n+=4)o.copy(e[t]).applyMatrix4(r,a),o.normal.toArray(c,n),c[n+3]=o.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=s,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,s){const o=0!==e.length||t||0!==i||r;return r=t,n=h(e,s,0),i=e.length,o},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1,c()},this.setState=function(t,o,a){const u=t.clippingPlanes,d=t.clipIntersection,p=t.clipShadows,A=e.get(t);if(!r||null===u||0===u.length||s&&!p)s?h(null):c();else{const e=s?0:i,t=4*e;let r=A.clippingState||null;l.value=r,r=h(u,o,t,a);for(let e=0;e!==t;++e)r[e]=n[e];A.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function zs(e){let t=new WeakMap;function n(e,t){return t===ae?e.mapping=se:t===le&&(e.mapping=oe),e}function i(e){const n=e.target;n.removeEventListener(\"dispose\",i);const r=t.get(n);void 0!==r&&(t.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture&&!1===r.isRenderTargetTexture){const s=r.mapping;if(s===ae||s===le){if(t.has(r))return n(t.get(r).texture,r.mapping);{const s=r.image;if(s&&s.height>0){const o=new xs(s.height/2);return o.fromEquirectangularTexture(e,r),t.set(r,o),r.addEventListener(\"dispose\",i),n(o.texture,r.mapping)}return null}}}return r},dispose:function(){t=new WeakMap}}}class Hs extends gs{constructor(e=-1,t=1,n=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type=\"OrthographicCamera\",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,s=n+e,o=i+t,a=i-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,s=r+e*this.view.width,o-=t*this.view.offsetY,a=o-t*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,a,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const Vs=[.125,.215,.35,.446,.526,.582],Ws=new Hs,js=new Yn;let qs=null;const Ys=(1+Math.sqrt(5))/2,Xs=1/Ys,Js=[new ci(1,1,1),new ci(-1,1,1),new ci(1,1,-1),new ci(-1,1,-1),new ci(0,Ys,Xs),new ci(0,Ys,-Xs),new ci(Xs,0,Ys),new ci(-Xs,0,Ys),new ci(Ys,Xs,0),new ci(-Ys,Xs,0)];class Ks{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100){qs=this._renderer.getRenderTarget(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,n,i,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=to(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=eo(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e\u003Cthis._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(qs),e.scissorTest=!1,$s(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===se||e.mapping===oe?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),qs=this._renderer.getRenderTarget();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:ve,minFilter:ve,generateMipmaps:!1,type:Te,format:Fe,encoding:Dt,depthBuffer:!1},i=Zs(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Zs(e,t,n);const{_lodMax:i}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],i=[];let r=e;const s=e-4+1+Vs.length;for(let o=0;o\u003Cs;o++){const s=Math.pow(2,r);n.push(s);let a=1/s;o>e-4?a=Vs[o-e+4-1]:0===o&&(a=0),i.push(a);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,A=3,f=2,m=1,g=new Float32Array(A*p*d),v=new Float32Array(f*p*d),y=new Float32Array(m*p*d);for(let e=0;e\u003Cd;e++){const t=e%3*2/3-1,n=e>2?0:-1,i=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];g.set(i,A*p*e),v.set(u,f*p*e);const r=[e,e,e,e,e,e];y.set(r,m*p*e)}const E=new Wr;E.setAttribute(\"position\",new Ir(g,A)),E.setAttribute(\"uv\",new Ir(v,f)),E.setAttribute(\"faceIndex\",new Ir(y,m)),t.push(E),r>4&&r--}return{lodPlanes:t,sizeLods:n,sigmas:i}}(i)),this._blurMaterial=function(e,t,n){const i=new Float32Array(20),r=new ci(0,1,0);return new ms({name:\"SphericalGaussianBlur\",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:\"\\n\\n\\t\\tprecision mediump float;\\n\\t\\tprecision mediump int;\\n\\n\\t\\tattribute float faceIndex;\\n\\n\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t// RH coordinate system; PMREM face-indexing convention\\n\\t\\tvec3 getDirection( vec2 uv, float face ) {\\n\\n\\t\\t\\tuv = 2.0 * uv - 1.0;\\n\\n\\t\\t\\tvec3 direction = vec3( uv, 1.0 );\\n\\n\\t\\t\\tif ( face == 0.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx; // ( 1, v, u ) pos x\\n\\n\\t\\t\\t} else if ( face == 1.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\\n\\n\\t\\t\\t} else if ( face == 2.0 ) {\\n\\n\\t\\t\\t\\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\\n\\n\\t\\t\\t} else if ( face == 3.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\\n\\n\\t\\t\\t} else if ( face == 4.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\\n\\n\\t\\t\\t} else if ( face == 5.0 ) {\\n\\n\\t\\t\\t\\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn direction;\\n\\n\\t\\t}\\n\\n\\t\\tvoid main() {\\n\\n\\t\\t\\tvOutputDirection = getDirection( uv, faceIndex );\\n\\t\\t\\tgl_Position = vec4( position, 1.0 );\\n\\n\\t\\t}\\n\\t\",fragmentShader:\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform sampler2D envMap;\\n\\t\\t\\tuniform int samples;\\n\\t\\t\\tuniform float weights[ n ];\\n\\t\\t\\tuniform bool latitudinal;\\n\\t\\t\\tuniform float dTheta;\\n\\t\\t\\tuniform float mipInt;\\n\\t\\t\\tuniform vec3 poleAxis;\\n\\n\\t\\t\\t#define ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\t#include \u003Ccube_uv_reflection_fragment>\\n\\n\\t\\t\\tvec3 getSample( float theta, vec3 axis ) {\\n\\n\\t\\t\\t\\tfloat cosTheta = cos( theta );\\n\\t\\t\\t\\t// Rodrigues' axis-angle rotation\\n\\t\\t\\t\\tvec3 sampleDirection = vOutputDirection * cosTheta\\n\\t\\t\\t\\t\\t+ cross( axis, vOutputDirection ) * sin( theta )\\n\\t\\t\\t\\t\\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\\n\\n\\t\\t\\t\\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\\n\\n\\t\\t\\t\\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\\n\\n\\t\\t\\t\\t\\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\taxis = normalize( axis );\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t\\t\\t\\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\\n\\n\\t\\t\\t\\tfor ( int i = 1; i \u003C n; i++ ) {\\n\\n\\t\\t\\t\\t\\tif ( i >= samples ) {\\n\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\tfloat theta = dTheta * float( i );\\n\\t\\t\\t\\t\\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\\n\\t\\t\\t\\t\\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t}\\n\\t\\t\",blending:y,depthTest:!1,depthWrite:!1})}(i,e,t)}return i}_compileMaterial(e){const t=new cs(this._lodPlanes[0],e);this._renderer.compile(t,Ws)}_sceneToCubeUV(e,t,n,i){const r=new vs(90,1,t,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,c=a.toneMapping;a.getClearColor(js),a.toneMapping=Z,a.autoClear=!1;const h=new Cr({name:\"PMREM.Background\",side:g,depthWrite:!1,depthTest:!1}),u=new cs(new us,h);let d=!1;const p=e.background;p?p.isColor&&(h.color.copy(p),e.background=null,d=!0):(h.color.copy(js),d=!0);for(let t=0;t\u003C6;t++){const n=t%3;0===n?(r.up.set(0,s[t],0),r.lookAt(o[t],0,0)):1===n?(r.up.set(0,0,s[t]),r.lookAt(0,o[t],0)):(r.up.set(0,s[t],0),r.lookAt(0,0,o[t]));const l=this._cubeSize;$s(i,n*l,t>2?l:0,l,l),a.setRenderTarget(i),d&&a.render(u,r),a.render(e,r)}u.geometry.dispose(),u.material.dispose(),a.toneMapping=c,a.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===se||e.mapping===oe;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=to()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=eo());const r=i?this._cubemapMaterial:this._equirectMaterial,s=new cs(this._lodPlanes[0],r);r.uniforms.envMap.value=e;const o=this._cubeSize;$s(t,0,0,3*o,2*o),n.setRenderTarget(t),n.render(s,Ws)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t\u003Cthis._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),i=Js[(t-1)%Js.length];this._blur(e,t-1,t,n,i)}t.autoClear=n}_blur(e,t,n,i,r){const s=this._pingPongRenderTarget;this._halfBlur(e,s,t,n,i,\"latitudinal\",r),this._halfBlur(s,e,n,n,i,\"longitudinal\",r)}_halfBlur(e,t,n,i,r,s,o){const a=this._renderer,l=this._blurMaterial;\"latitudinal\"!==s&&\"longitudinal\"!==s&&console.error(\"blur direction must be either latitudinal or longitudinal!\");const c=new cs(this._lodPlanes[i],l),h=l.uniforms,u=this._sizeLods[n]-1,d=isFinite(r)?Math.PI/(2*u):2*Math.PI/39,p=r/d,A=isFinite(r)?1+Math.floor(3*p):20;A>20&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${A} samples when the maximum is set to 20`);const f=[];let m=0;for(let e=0;e\u003C20;++e){const t=e/p,n=Math.exp(-t*t/2);f.push(n),0===e?m+=n:e\u003CA&&(m+=2*n)}for(let e=0;e\u003Cf.length;e++)f[e]=f[e]/m;h.envMap.value=e.texture,h.samples.value=A,h.weights.value=f,h.latitudinal.value=\"latitudinal\"===s,o&&(h.poleAxis.value=o);const{_lodMax:g}=this;h.dTheta.value=d,h.mipInt.value=g-n;const v=this._sizeLods[i];$s(t,3*v*(i>g-4?i-g+4:0),4*(this._cubeSize-v),3*v,2*v),a.setRenderTarget(t),a.render(c,Ws)}}function Zs(e,t,n){const i=new ni(e,t,n);return i.texture.mapping=ce,i.texture.name=\"PMREM.cubeUv\",i.scissorTest=!0,i}function $s(e,t,n,i,r){e.viewport.set(t,n,i,r),e.scissor.set(t,n,i,r)}function eo(){return new ms({name:\"EquirectangularToCubeUV\",uniforms:{envMap:{value:null}},vertexShader:\"\\n\\n\\t\\tprecision mediump float;\\n\\t\\tprecision mediump int;\\n\\n\\t\\tattribute float faceIndex;\\n\\n\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t// RH coordinate system; PMREM face-indexing convention\\n\\t\\tvec3 getDirection( vec2 uv, float face ) {\\n\\n\\t\\t\\tuv = 2.0 * uv - 1.0;\\n\\n\\t\\t\\tvec3 direction = vec3( uv, 1.0 );\\n\\n\\t\\t\\tif ( face == 0.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx; // ( 1, v, u ) pos x\\n\\n\\t\\t\\t} else if ( face == 1.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\\n\\n\\t\\t\\t} else if ( face == 2.0 ) {\\n\\n\\t\\t\\t\\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\\n\\n\\t\\t\\t} else if ( face == 3.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\\n\\n\\t\\t\\t} else if ( face == 4.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\\n\\n\\t\\t\\t} else if ( face == 5.0 ) {\\n\\n\\t\\t\\t\\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn direction;\\n\\n\\t\\t}\\n\\n\\t\\tvoid main() {\\n\\n\\t\\t\\tvOutputDirection = getDirection( uv, faceIndex );\\n\\t\\t\\tgl_Position = vec4( position, 1.0 );\\n\\n\\t\\t}\\n\\t\",fragmentShader:\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform sampler2D envMap;\\n\\n\\t\\t\\t#include \u003Ccommon>\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tvec3 outputDirection = normalize( vOutputDirection );\\n\\t\\t\\t\\tvec2 uv = equirectUv( outputDirection );\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\\n\\n\\t\\t\\t}\\n\\t\\t\",blending:y,depthTest:!1,depthWrite:!1})}function to(){return new ms({name:\"CubemapToCubeUV\",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:\"\\n\\n\\t\\tprecision mediump float;\\n\\t\\tprecision mediump int;\\n\\n\\t\\tattribute float faceIndex;\\n\\n\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t// RH coordinate system; PMREM face-indexing convention\\n\\t\\tvec3 getDirection( vec2 uv, float face ) {\\n\\n\\t\\t\\tuv = 2.0 * uv - 1.0;\\n\\n\\t\\t\\tvec3 direction = vec3( uv, 1.0 );\\n\\n\\t\\t\\tif ( face == 0.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx; // ( 1, v, u ) pos x\\n\\n\\t\\t\\t} else if ( face == 1.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\\n\\n\\t\\t\\t} else if ( face == 2.0 ) {\\n\\n\\t\\t\\t\\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\\n\\n\\t\\t\\t} else if ( face == 3.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\\n\\n\\t\\t\\t} else if ( face == 4.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\\n\\n\\t\\t\\t} else if ( face == 5.0 ) {\\n\\n\\t\\t\\t\\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn direction;\\n\\n\\t\\t}\\n\\n\\t\\tvoid main() {\\n\\n\\t\\t\\tvOutputDirection = getDirection( uv, faceIndex );\\n\\t\\t\\tgl_Position = vec4( position, 1.0 );\\n\\n\\t\\t}\\n\\t\",fragmentShader:\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tuniform float flipEnvMap;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform samplerCube envMap;\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\\n\\n\\t\\t\\t}\\n\\t\\t\",blending:y,depthTest:!1,depthWrite:!1})}function no(e){let t=new WeakMap,n=null;function i(e){const n=e.target;n.removeEventListener(\"dispose\",i);const r=t.get(n);void 0!==r&&(t.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping,o=s===ae||s===le,a=s===se||s===oe;if(o||a){if(r.isRenderTargetTexture&&!0===r.needsPMREMUpdate){r.needsPMREMUpdate=!1;let i=t.get(r);return null===n&&(n=new Ks(e)),i=o?n.fromEquirectangular(r,i):n.fromCubemap(r,i),t.set(r,i),i.texture}if(t.has(r))return t.get(r).texture;{const s=r.image;if(o&&s&&s.height>0||a&&s&&function(e){let t=0;for(let n=0;n\u003C6;n++)void 0!==e[n]&&t++;return 6===t}(s)){null===n&&(n=new Ks(e));const s=o?n.fromEquirectangular(r):n.fromCubemap(r);return t.set(r,s),r.addEventListener(\"dispose\",i),s.texture}return null}}}return r},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function io(e){const t={};function n(n){if(void 0!==t[n])return t[n];let i;switch(n){case\"WEBGL_depth_texture\":i=e.getExtension(\"WEBGL_depth_texture\")||e.getExtension(\"MOZ_WEBGL_depth_texture\")||e.getExtension(\"WEBKIT_WEBGL_depth_texture\");break;case\"EXT_texture_filter_anisotropic\":i=e.getExtension(\"EXT_texture_filter_anisotropic\")||e.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||e.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\");break;case\"WEBGL_compressed_texture_s3tc\":i=e.getExtension(\"WEBGL_compressed_texture_s3tc\")||e.getExtension(\"MOZ_WEBGL_compressed_texture_s3tc\")||e.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\");break;case\"WEBGL_compressed_texture_pvrtc\":i=e.getExtension(\"WEBGL_compressed_texture_pvrtc\")||e.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\");break;default:i=e.getExtension(n)}return t[n]=i,i}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n(\"EXT_color_buffer_float\"):(n(\"WEBGL_depth_texture\"),n(\"OES_texture_float\"),n(\"OES_texture_half_float\"),n(\"OES_texture_half_float_linear\"),n(\"OES_standard_derivatives\"),n(\"OES_element_index_uint\"),n(\"OES_vertex_array_object\"),n(\"ANGLE_instanced_arrays\")),n(\"OES_texture_float_linear\"),n(\"EXT_color_buffer_half_float\"),n(\"WEBGL_multisampled_render_to_texture\")},get:function(e){const t=n(e);return null===t&&console.warn(\"THREE.WebGLRenderer: \"+e+\" extension not supported.\"),t}}}function ro(e,t,n,i){const r={},s=new WeakMap;function o(e){const a=e.target;null!==a.index&&t.remove(a.index);for(const e in a.attributes)t.remove(a.attributes[e]);a.removeEventListener(\"dispose\",o),delete r[a.id];const l=s.get(a);l&&(t.remove(l),s.delete(a)),i.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(e){const n=[],i=e.index,r=e.attributes.position;let o=0;if(null!==i){const e=i.array;o=i.version;for(let t=0,i=e.length;t\u003Ci;t+=3){const i=e[t+0],r=e[t+1],s=e[t+2];n.push(i,r,r,s,s,i)}}else{const e=r.array;o=r.version;for(let t=0,i=e.length/3-1;t\u003Ci;t+=3){const e=t+0,i=t+1,r=t+2;n.push(e,i,i,r,r,e)}}const a=new(Pn(n)?Pr:Dr)(n,1);a.version=o;const l=s.get(e);l&&t.remove(l),s.set(e,a)}return{get:function(e,t){return!0===r[t.id]||(t.addEventListener(\"dispose\",o),r[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const i=e.morphAttributes;for(const e in i){const n=i[e];for(let e=0,i=n.length;e\u003Ci;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=s.get(e);if(t){const n=e.index;null!==n&&t.version\u003Cn.version&&a(e)}else a(e);return s.get(e)}}}function so(e,t,n,i){const r=i.isWebGL2;let s,o,a;this.setMode=function(e){s=e},this.setIndex=function(e){o=e.type,a=e.bytesPerElement},this.render=function(t,i){e.drawElements(s,i,o,t*a),n.update(i,s,1)},this.renderInstances=function(i,l,c){if(0===c)return;let h,u;if(r)h=e,u=\"drawElementsInstanced\";else if(h=t.get(\"ANGLE_instanced_arrays\"),u=\"drawElementsInstancedANGLE\",null===h)return void console.error(\"THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");h[u](s,l,o,i*a,c),n.update(l,s,c)}}function oo(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,i){switch(t.calls++,n){case 4:t.triangles+=i*(e/3);break;case 1:t.lines+=i*(e/2);break;case 3:t.lines+=i*(e-1);break;case 2:t.lines+=i*e;break;case 0:t.points+=i*e;break;default:console.error(\"THREE.WebGLInfo: Unknown draw mode:\",n)}}}}function ao(e,t){return e[0]-t[0]}function lo(e,t){return Math.abs(t[1])-Math.abs(e[1])}function co(e,t,n){const i={},r=new Float32Array(8),s=new WeakMap,o=new ti,a=[];for(let e=0;e\u003C8;e++)a[e]=[e,0];return{update:function(l,c,h,u){const d=l.morphTargetInfluences;if(!0===t.isWebGL2){const p=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,A=void 0!==p?p.length:0;let f=s.get(c);if(void 0===f||f.count!==A){void 0!==f&&f.texture.dispose();const v=void 0!==c.morphAttributes.position,y=void 0!==c.morphAttributes.normal,E=void 0!==c.morphAttributes.color,b=c.morphAttributes.position||[],x=c.morphAttributes.normal||[],w=c.morphAttributes.color||[];let C=0;!0===v&&(C=1),!0===y&&(C=2),!0===E&&(C=3);let M=c.attributes.position.count*C,_=1;M>t.maxTextureSize&&(_=Math.ceil(M/t.maxTextureSize),M=t.maxTextureSize);const I=new Float32Array(M*_*4*A),B=new ii(I,M,_,A);B.type=Se,B.needsUpdate=!0;const S=4*C;for(let L=0;L\u003CA;L++){const D=b[L],R=x[L],P=w[L],k=M*_*4*L;for(let F=0;F\u003CD.count;F++){const O=F*S;!0===v&&(o.fromBufferAttribute(D,F),I[k+O+0]=o.x,I[k+O+1]=o.y,I[k+O+2]=o.z,I[k+O+3]=0),!0===y&&(o.fromBufferAttribute(R,F),I[k+O+4]=o.x,I[k+O+5]=o.y,I[k+O+6]=o.z,I[k+O+7]=0),!0===E&&(o.fromBufferAttribute(P,F),I[k+O+8]=o.x,I[k+O+9]=o.y,I[k+O+10]=o.z,I[k+O+11]=4===P.itemSize?o.w:1)}}function T(){B.dispose(),s.delete(c),c.removeEventListener(\"dispose\",T)}f={count:A,texture:B,size:new Ln(M,_)},s.set(c,f),c.addEventListener(\"dispose\",T)}let m=0;for(let Q=0;Q\u003Cd.length;Q++)m+=d[Q];const g=c.morphTargetsRelative?1:1-m;u.getUniforms().setValue(e,\"morphTargetBaseInfluence\",g),u.getUniforms().setValue(e,\"morphTargetInfluences\",d),u.getUniforms().setValue(e,\"morphTargetsTexture\",f.texture,n),u.getUniforms().setValue(e,\"morphTargetsTextureSize\",f.size)}else{const U=void 0===d?0:d.length;let N=i[c.id];if(void 0===N||N.length!==U){N=[];for(let W=0;W\u003CU;W++)N[W]=[W,0];i[c.id]=N}for(let j=0;j\u003CU;j++){const q=N[j];q[0]=j,q[1]=d[j]}N.sort(lo);for(let Y=0;Y\u003C8;Y++)Y\u003CU&&N[Y][1]?(a[Y][0]=N[Y][0],a[Y][1]=N[Y][1]):(a[Y][0]=Number.MAX_SAFE_INTEGER,a[Y][1]=0);a.sort(ao);const G=c.morphAttributes.position,z=c.morphAttributes.normal;let H=0;for(let X=0;X\u003C8;X++){const J=a[X],K=J[0],Z=J[1];K!==Number.MAX_SAFE_INTEGER&&Z?(G&&c.getAttribute(\"morphTarget\"+X)!==G[K]&&c.setAttribute(\"morphTarget\"+X,G[K]),z&&c.getAttribute(\"morphNormal\"+X)!==z[K]&&c.setAttribute(\"morphNormal\"+X,z[K]),r[X]=Z,H+=Z):(G&&!0===c.hasAttribute(\"morphTarget\"+X)&&c.deleteAttribute(\"morphTarget\"+X),z&&!0===c.hasAttribute(\"morphNormal\"+X)&&c.deleteAttribute(\"morphNormal\"+X),r[X]=0)}const V=c.morphTargetsRelative?1:1-H;u.getUniforms().setValue(e,\"morphTargetBaseInfluence\",V),u.getUniforms().setValue(e,\"morphTargetInfluences\",r)}}}}function ho(e,t,n,i){let r=new WeakMap;function s(e){const t=e.target;t.removeEventListener(\"dispose\",s),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const o=i.render.frame,a=e.geometry,l=t.get(e,a);return r.get(l)!==o&&(t.update(l),r.set(l,o)),e.isInstancedMesh&&(!1===e.hasEventListener(\"dispose\",s)&&e.addEventListener(\"dispose\",s),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){r=new WeakMap}}}const uo=new ei,po=new ii,Ao=new si,fo=new bs,mo=[],go=[],vo=new Float32Array(16),yo=new Float32Array(9),Eo=new Float32Array(4);function bo(e,t,n){const i=e[0];if(i\u003C=0||i>0)return e;const r=t*n;let s=mo[r];if(void 0===s&&(s=new Float32Array(r),mo[r]=s),0!==t){i.toArray(s,0);for(let i=1,r=0;i!==t;++i)r+=n,e[i].toArray(s,r)}return s}function xo(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n\u003Ci;n++)if(e[n]!==t[n])return!1;return!0}function wo(e,t){for(let n=0,i=t.length;n\u003Ci;n++)e[n]=t[n]}function Co(e,t){let n=go[t];void 0===n&&(n=new Int32Array(t),go[t]=n);for(let i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function Mo(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function _o(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(xo(n,t))return;e.uniform2fv(this.addr,t),wo(n,t)}}function Io(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(xo(n,t))return;e.uniform3fv(this.addr,t),wo(n,t)}}function Bo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(xo(n,t))return;e.uniform4fv(this.addr,t),wo(n,t)}}function So(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(xo(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),wo(n,t)}else{if(xo(n,i))return;Eo.set(i),e.uniformMatrix2fv(this.addr,!1,Eo),wo(n,i)}}function To(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(xo(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),wo(n,t)}else{if(xo(n,i))return;yo.set(i),e.uniformMatrix3fv(this.addr,!1,yo),wo(n,i)}}function Lo(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(xo(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),wo(n,t)}else{if(xo(n,i))return;vo.set(i),e.uniformMatrix4fv(this.addr,!1,vo),wo(n,i)}}function Do(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Ro(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(xo(n,t))return;e.uniform2iv(this.addr,t),wo(n,t)}}function Po(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(xo(n,t))return;e.uniform3iv(this.addr,t),wo(n,t)}}function ko(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(xo(n,t))return;e.uniform4iv(this.addr,t),wo(n,t)}}function Fo(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Oo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(xo(n,t))return;e.uniform2uiv(this.addr,t),wo(n,t)}}function Qo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(xo(n,t))return;e.uniform3uiv(this.addr,t),wo(n,t)}}function Uo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(xo(n,t))return;e.uniform4uiv(this.addr,t),wo(n,t)}}function No(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2D(t||uo,r)}function Go(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(t||Ao,r)}function zo(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(t||fo,r)}function Ho(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(t||po,r)}function Vo(e,t){e.uniform1fv(this.addr,t)}function Wo(e,t){const n=bo(t,this.size,2);e.uniform2fv(this.addr,n)}function jo(e,t){const n=bo(t,this.size,3);e.uniform3fv(this.addr,n)}function qo(e,t){const n=bo(t,this.size,4);e.uniform4fv(this.addr,n)}function Yo(e,t){const n=bo(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function Xo(e,t){const n=bo(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Jo(e,t){const n=bo(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function Ko(e,t){e.uniform1iv(this.addr,t)}function Zo(e,t){e.uniform2iv(this.addr,t)}function $o(e,t){e.uniform3iv(this.addr,t)}function ea(e,t){e.uniform4iv(this.addr,t)}function ta(e,t){e.uniform1uiv(this.addr,t)}function na(e,t){e.uniform2uiv(this.addr,t)}function ia(e,t){e.uniform3uiv(this.addr,t)}function ra(e,t){e.uniform4uiv(this.addr,t)}function sa(e,t,n){const i=this.cache,r=t.length,s=Co(n,r);xo(i,s)||(e.uniform1iv(this.addr,s),wo(i,s));for(let e=0;e!==r;++e)n.setTexture2D(t[e]||uo,s[e])}function oa(e,t,n){const i=this.cache,r=t.length,s=Co(n,r);xo(i,s)||(e.uniform1iv(this.addr,s),wo(i,s));for(let e=0;e!==r;++e)n.setTexture3D(t[e]||Ao,s[e])}function aa(e,t,n){const i=this.cache,r=t.length,s=Co(n,r);xo(i,s)||(e.uniform1iv(this.addr,s),wo(i,s));for(let e=0;e!==r;++e)n.setTextureCube(t[e]||fo,s[e])}function la(e,t,n){const i=this.cache,r=t.length,s=Co(n,r);xo(i,s)||(e.uniform1iv(this.addr,s),wo(i,s));for(let e=0;e!==r;++e)n.setTexture2DArray(t[e]||po,s[e])}class ca{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Mo;case 35664:return _o;case 35665:return Io;case 35666:return Bo;case 35674:return So;case 35675:return To;case 35676:return Lo;case 5124:case 35670:return Do;case 35667:case 35671:return Ro;case 35668:case 35672:return Po;case 35669:case 35673:return ko;case 5125:return Fo;case 36294:return Oo;case 36295:return Qo;case 36296:return Uo;case 35678:case 36198:case 36298:case 36306:case 35682:return No;case 35679:case 36299:case 36307:return Go;case 35680:case 36300:case 36308:case 36293:return zo;case 36289:case 36303:case 36311:case 36292:return Ho}}(t.type)}}class ha{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Vo;case 35664:return Wo;case 35665:return jo;case 35666:return qo;case 35674:return Yo;case 35675:return Xo;case 35676:return Jo;case 5124:case 35670:return Ko;case 35667:case 35671:return Zo;case 35668:case 35672:return $o;case 35669:case 35673:return ea;case 5125:return ta;case 36294:return na;case 36295:return ia;case 36296:return ra;case 35678:case 36198:case 36298:case 36306:case 35682:return sa;case 35679:case 36299:case 36307:return oa;case 35680:case 36300:case 36308:case 36293:return aa;case 36289:case 36303:case 36311:case 36292:return la}}(t.type)}}class ua{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,s=i.length;r!==s;++r){const s=i[r];s.setValue(e,t[s.id],n)}}}const da=/(\\w+)(\\])?(\\[|\\.)?/g;function pa(e,t){e.seq.push(t),e.map[t.id]=t}function Aa(e,t,n){const i=e.name,r=i.length;for(da.lastIndex=0;;){const s=da.exec(i),o=da.lastIndex;let a=s[1];const l=\"]\"===s[2],c=s[3];if(l&&(a|=0),void 0===c||\"[\"===c&&o+2===r){pa(n,void 0===c?new ca(a,e,t):new ha(a,e,t));break}{let e=n.map[a];void 0===e&&(e=new ua(a),pa(n,e)),n=e}}}class fa{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let i=0;i\u003Cn;++i){const n=e.getActiveUniform(t,i);Aa(n,e.getUniformLocation(t,n.name),this)}}setValue(e,t,n,i){const r=this.map[t];void 0!==r&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];void 0!==i&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,s=t.length;r!==s;++r){const s=t[r],o=n[s.id];!1!==o.needsUpdate&&s.setValue(e,o.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const r=e[i];r.id in t&&n.push(r)}return n}}function ma(e,t,n){const i=e.createShader(t);return e.shaderSource(i,n),e.compileShader(i),i}let ga=0;function va(e,t,n){const i=e.getShaderParameter(t,35713),r=e.getShaderInfoLog(t).trim();if(i&&\"\"===r)return\"\";const s=/ERROR: 0:(\\d+)/.exec(r);if(s){const i=parseInt(s[1]);return n.toUpperCase()+\"\\n\\n\"+r+\"\\n\\n\"+function(e,t){const n=e.split(\"\\n\"),i=[],r=Math.max(t-6,0),s=Math.min(t+6,n.length);for(let e=r;e\u003Cs;e++){const r=e+1;i.push(`${r===t?\">\":\" \"} ${r}: ${n[e]}`)}return i.join(\"\\n\")}(e.getShaderSource(t),i)}return r}function ya(e,t){const n=function(e){switch(e){case Dt:return[\"Linear\",\"( value )\"];case Rt:return[\"sRGB\",\"( value )\"];default:return console.warn(\"THREE.WebGLProgram: Unsupported encoding:\",e),[\"Linear\",\"( value )\"]}}(t);return\"vec4 \"+e+\"( vec4 value ) { return LinearTo\"+n[0]+n[1]+\"; }\"}function Ea(e,t){let n;switch(t){case $:n=\"Linear\";break;case ee:n=\"Reinhard\";break;case te:n=\"OptimizedCineon\";break;case ne:n=\"ACESFilmic\";break;case ie:n=\"Custom\";break;default:console.warn(\"THREE.WebGLProgram: Unsupported toneMapping:\",t),n=\"Linear\"}return\"vec3 \"+e+\"( vec3 color ) { return \"+n+\"ToneMapping( color ); }\"}function ba(e){return\"\"!==e}function xa(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function wa(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Ca=/^[ \\t]*#include +\u003C([\\w\\d./]+)>/gm;function Ma(e){return e.replace(Ca,_a)}function _a(e,t){const n=Rs[t];if(void 0===n)throw new Error(\"Can not resolve #include \u003C\"+t+\">\");return Ma(n)}const Ia=/#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*\u003C\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;function Ba(e){return e.replace(Ia,Sa)}function Sa(e,t,n,i){let r=\"\";for(let e=parseInt(t);e\u003CparseInt(n);e++)r+=i.replace(/\\[\\s*i\\s*\\]/g,\"[ \"+e+\" ]\").replace(/UNROLLED_LOOP_INDEX/g,e);return r}function Ta(e){let t=\"precision \"+e.precision+\" float;\\nprecision \"+e.precision+\" int;\";return\"highp\"===e.precision?t+=\"\\n#define HIGH_PRECISION\":\"mediump\"===e.precision?t+=\"\\n#define MEDIUM_PRECISION\":\"lowp\"===e.precision&&(t+=\"\\n#define LOW_PRECISION\"),t}function La(e,t,n,i){const r=e.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=function(e){let t=\"SHADOWMAP_TYPE_BASIC\";return e.shadowMapType===p?t=\"SHADOWMAP_TYPE_PCF\":e.shadowMapType===A?t=\"SHADOWMAP_TYPE_PCF_SOFT\":e.shadowMapType===f&&(t=\"SHADOWMAP_TYPE_VSM\"),t}(n),c=function(e){let t=\"ENVMAP_TYPE_CUBE\";if(e.envMap)switch(e.envMapMode){case se:case oe:t=\"ENVMAP_TYPE_CUBE\";break;case ce:t=\"ENVMAP_TYPE_CUBE_UV\"}return t}(n),h=function(e){let t=\"ENVMAP_MODE_REFLECTION\";return e.envMap&&e.envMapMode===oe&&(t=\"ENVMAP_MODE_REFRACTION\"),t}(n),u=function(e){let t=\"ENVMAP_BLENDING_NONE\";if(e.envMap)switch(e.combine){case X:t=\"ENVMAP_BLENDING_MULTIPLY\";break;case J:t=\"ENVMAP_BLENDING_MIX\";break;case K:t=\"ENVMAP_BLENDING_ADD\"}return t}(n),d=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}}(n),m=n.isWebGL2?\"\":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||\"physical\"===e.shaderID?\"#extension GL_OES_standard_derivatives : enable\":\"\",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?\"#extension GL_EXT_frag_depth : enable\":\"\",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?\"#extension GL_EXT_draw_buffers : require\":\"\",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?\"#extension GL_EXT_shader_texture_lod : enable\":\"\"].filter(ba).join(\"\\n\")}(n),g=function(e){const t=[];for(const n in e){const i=e[n];!1!==i&&t.push(\"#define \"+n+\" \"+i)}return t.join(\"\\n\")}(s),v=r.createProgram();let y,E,b=n.glslVersion?\"#version \"+n.glslVersion+\"\\n\":\"\";n.isRawShaderMaterial?(y=[g].filter(ba).join(\"\\n\"),y.length>0&&(y+=\"\\n\"),E=[m,g].filter(ba).join(\"\\n\"),E.length>0&&(E+=\"\\n\")):(y=[Ta(n),\"#define SHADER_NAME \"+n.shaderName,g,n.instancing?\"#define USE_INSTANCING\":\"\",n.instancingColor?\"#define USE_INSTANCING_COLOR\":\"\",n.supportsVertexTextures?\"#define VERTEX_TEXTURES\":\"\",n.useFog&&n.fog?\"#define USE_FOG\":\"\",n.useFog&&n.fogExp2?\"#define FOG_EXP2\":\"\",n.map?\"#define USE_MAP\":\"\",n.envMap?\"#define USE_ENVMAP\":\"\",n.envMap?\"#define \"+h:\"\",n.lightMap?\"#define USE_LIGHTMAP\":\"\",n.aoMap?\"#define USE_AOMAP\":\"\",n.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",n.bumpMap?\"#define USE_BUMPMAP\":\"\",n.normalMap?\"#define USE_NORMALMAP\":\"\",n.normalMap&&n.objectSpaceNormalMap?\"#define OBJECTSPACE_NORMALMAP\":\"\",n.normalMap&&n.tangentSpaceNormalMap?\"#define TANGENTSPACE_NORMALMAP\":\"\",n.clearcoatMap?\"#define USE_CLEARCOATMAP\":\"\",n.clearcoatRoughnessMap?\"#define USE_CLEARCOAT_ROUGHNESSMAP\":\"\",n.clearcoatNormalMap?\"#define USE_CLEARCOAT_NORMALMAP\":\"\",n.iridescenceMap?\"#define USE_IRIDESCENCEMAP\":\"\",n.iridescenceThicknessMap?\"#define USE_IRIDESCENCE_THICKNESSMAP\":\"\",n.displacementMap&&n.supportsVertexTextures?\"#define USE_DISPLACEMENTMAP\":\"\",n.specularMap?\"#define USE_SPECULARMAP\":\"\",n.specularIntensityMap?\"#define USE_SPECULARINTENSITYMAP\":\"\",n.specularColorMap?\"#define USE_SPECULARCOLORMAP\":\"\",n.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",n.metalnessMap?\"#define USE_METALNESSMAP\":\"\",n.alphaMap?\"#define USE_ALPHAMAP\":\"\",n.transmission?\"#define USE_TRANSMISSION\":\"\",n.transmissionMap?\"#define USE_TRANSMISSIONMAP\":\"\",n.thicknessMap?\"#define USE_THICKNESSMAP\":\"\",n.sheenColorMap?\"#define USE_SHEENCOLORMAP\":\"\",n.sheenRoughnessMap?\"#define USE_SHEENROUGHNESSMAP\":\"\",n.vertexTangents?\"#define USE_TANGENT\":\"\",n.vertexColors?\"#define USE_COLOR\":\"\",n.vertexAlphas?\"#define USE_COLOR_ALPHA\":\"\",n.vertexUvs?\"#define USE_UV\":\"\",n.uvsVertexOnly?\"#define UVS_VERTEX_ONLY\":\"\",n.flatShading?\"#define FLAT_SHADED\":\"\",n.skinning?\"#define USE_SKINNING\":\"\",n.morphTargets?\"#define USE_MORPHTARGETS\":\"\",n.morphNormals&&!1===n.flatShading?\"#define USE_MORPHNORMALS\":\"\",n.morphColors&&n.isWebGL2?\"#define USE_MORPHCOLORS\":\"\",n.morphTargetsCount>0&&n.isWebGL2?\"#define MORPHTARGETS_TEXTURE\":\"\",n.morphTargetsCount>0&&n.isWebGL2?\"#define MORPHTARGETS_TEXTURE_STRIDE \"+n.morphTextureStride:\"\",n.morphTargetsCount>0&&n.isWebGL2?\"#define MORPHTARGETS_COUNT \"+n.morphTargetsCount:\"\",n.doubleSided?\"#define DOUBLE_SIDED\":\"\",n.flipSided?\"#define FLIP_SIDED\":\"\",n.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",n.shadowMapEnabled?\"#define \"+l:\"\",n.sizeAttenuation?\"#define USE_SIZEATTENUATION\":\"\",n.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?\"#define USE_LOGDEPTHBUF_EXT\":\"\",\"uniform mat4 modelMatrix;\",\"uniform mat4 modelViewMatrix;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 viewMatrix;\",\"uniform mat3 normalMatrix;\",\"uniform vec3 cameraPosition;\",\"uniform bool isOrthographic;\",\"#ifdef USE_INSTANCING\",\"\\tattribute mat4 instanceMatrix;\",\"#endif\",\"#ifdef USE_INSTANCING_COLOR\",\"\\tattribute vec3 instanceColor;\",\"#endif\",\"attribute vec3 position;\",\"attribute vec3 normal;\",\"attribute vec2 uv;\",\"#ifdef USE_TANGENT\",\"\\tattribute vec4 tangent;\",\"#endif\",\"#if defined( USE_COLOR_ALPHA )\",\"\\tattribute vec4 color;\",\"#elif defined( USE_COLOR )\",\"\\tattribute vec3 color;\",\"#endif\",\"#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )\",\"\\tattribute vec3 morphTarget0;\",\"\\tattribute vec3 morphTarget1;\",\"\\tattribute vec3 morphTarget2;\",\"\\tattribute vec3 morphTarget3;\",\"\\t#ifdef USE_MORPHNORMALS\",\"\\t\\tattribute vec3 morphNormal0;\",\"\\t\\tattribute vec3 morphNormal1;\",\"\\t\\tattribute vec3 morphNormal2;\",\"\\t\\tattribute vec3 morphNormal3;\",\"\\t#else\",\"\\t\\tattribute vec3 morphTarget4;\",\"\\t\\tattribute vec3 morphTarget5;\",\"\\t\\tattribute vec3 morphTarget6;\",\"\\t\\tattribute vec3 morphTarget7;\",\"\\t#endif\",\"#endif\",\"#ifdef USE_SKINNING\",\"\\tattribute vec4 skinIndex;\",\"\\tattribute vec4 skinWeight;\",\"#endif\",\"\\n\"].filter(ba).join(\"\\n\"),E=[m,Ta(n),\"#define SHADER_NAME \"+n.shaderName,g,n.useFog&&n.fog?\"#define USE_FOG\":\"\",n.useFog&&n.fogExp2?\"#define FOG_EXP2\":\"\",n.map?\"#define USE_MAP\":\"\",n.matcap?\"#define USE_MATCAP\":\"\",n.envMap?\"#define USE_ENVMAP\":\"\",n.envMap?\"#define \"+c:\"\",n.envMap?\"#define \"+h:\"\",n.envMap?\"#define \"+u:\"\",d?\"#define CUBEUV_TEXEL_WIDTH \"+d.texelWidth:\"\",d?\"#define CUBEUV_TEXEL_HEIGHT \"+d.texelHeight:\"\",d?\"#define CUBEUV_MAX_MIP \"+d.maxMip+\".0\":\"\",n.lightMap?\"#define USE_LIGHTMAP\":\"\",n.aoMap?\"#define USE_AOMAP\":\"\",n.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",n.bumpMap?\"#define USE_BUMPMAP\":\"\",n.normalMap?\"#define USE_NORMALMAP\":\"\",n.normalMap&&n.objectSpaceNormalMap?\"#define OBJECTSPACE_NORMALMAP\":\"\",n.normalMap&&n.tangentSpaceNormalMap?\"#define TANGENTSPACE_NORMALMAP\":\"\",n.clearcoat?\"#define USE_CLEARCOAT\":\"\",n.clearcoatMap?\"#define USE_CLEARCOATMAP\":\"\",n.clearcoatRoughnessMap?\"#define USE_CLEARCOAT_ROUGHNESSMAP\":\"\",n.clearcoatNormalMap?\"#define USE_CLEARCOAT_NORMALMAP\":\"\",n.iridescence?\"#define USE_IRIDESCENCE\":\"\",n.iridescenceMap?\"#define USE_IRIDESCENCEMAP\":\"\",n.iridescenceThicknessMap?\"#define USE_IRIDESCENCE_THICKNESSMAP\":\"\",n.specularMap?\"#define USE_SPECULARMAP\":\"\",n.specularIntensityMap?\"#define USE_SPECULARINTENSITYMAP\":\"\",n.specularColorMap?\"#define USE_SPECULARCOLORMAP\":\"\",n.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",n.metalnessMap?\"#define USE_METALNESSMAP\":\"\",n.alphaMap?\"#define USE_ALPHAMAP\":\"\",n.alphaTest?\"#define USE_ALPHATEST\":\"\",n.sheen?\"#define USE_SHEEN\":\"\",n.sheenColorMap?\"#define USE_SHEENCOLORMAP\":\"\",n.sheenRoughnessMap?\"#define USE_SHEENROUGHNESSMAP\":\"\",n.transmission?\"#define USE_TRANSMISSION\":\"\",n.transmissionMap?\"#define USE_TRANSMISSIONMAP\":\"\",n.thicknessMap?\"#define USE_THICKNESSMAP\":\"\",n.decodeVideoTexture?\"#define DECODE_VIDEO_TEXTURE\":\"\",n.vertexTangents?\"#define USE_TANGENT\":\"\",n.vertexColors||n.instancingColor?\"#define USE_COLOR\":\"\",n.vertexAlphas?\"#define USE_COLOR_ALPHA\":\"\",n.vertexUvs?\"#define USE_UV\":\"\",n.uvsVertexOnly?\"#define UVS_VERTEX_ONLY\":\"\",n.gradientMap?\"#define USE_GRADIENTMAP\":\"\",n.flatShading?\"#define FLAT_SHADED\":\"\",n.doubleSided?\"#define DOUBLE_SIDED\":\"\",n.flipSided?\"#define FLIP_SIDED\":\"\",n.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",n.shadowMapEnabled?\"#define \"+l:\"\",n.premultipliedAlpha?\"#define PREMULTIPLIED_ALPHA\":\"\",n.physicallyCorrectLights?\"#define PHYSICALLY_CORRECT_LIGHTS\":\"\",n.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?\"#define USE_LOGDEPTHBUF_EXT\":\"\",\"uniform mat4 viewMatrix;\",\"uniform vec3 cameraPosition;\",\"uniform bool isOrthographic;\",n.toneMapping!==Z?\"#define TONE_MAPPING\":\"\",n.toneMapping!==Z?Rs.tonemapping_pars_fragment:\"\",n.toneMapping!==Z?Ea(\"toneMapping\",n.toneMapping):\"\",n.dithering?\"#define DITHERING\":\"\",n.opaque?\"#define OPAQUE\":\"\",Rs.encodings_pars_fragment,ya(\"linearToOutputTexel\",n.outputEncoding),n.useDepthPacking?\"#define DEPTH_PACKING \"+n.depthPacking:\"\",\"\\n\"].filter(ba).join(\"\\n\")),o=Ma(o),o=xa(o,n),o=wa(o,n),a=Ma(a),a=xa(a,n),a=wa(a,n),o=Ba(o),a=Ba(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(b=\"#version 300 es\\n\",y=[\"precision mediump sampler2DArray;\",\"#define attribute in\",\"#define varying out\",\"#define texture2D texture\"].join(\"\\n\")+\"\\n\"+y,E=[\"#define varying in\",n.glslVersion===An?\"\":\"layout(location = 0) out highp vec4 pc_fragColor;\",n.glslVersion===An?\"\":\"#define gl_FragColor pc_fragColor\",\"#define gl_FragDepthEXT gl_FragDepth\",\"#define texture2D texture\",\"#define textureCube texture\",\"#define texture2DProj textureProj\",\"#define texture2DLodEXT textureLod\",\"#define texture2DProjLodEXT textureProjLod\",\"#define textureCubeLodEXT textureLod\",\"#define texture2DGradEXT textureGrad\",\"#define texture2DProjGradEXT textureProjGrad\",\"#define textureCubeGradEXT textureGrad\"].join(\"\\n\")+\"\\n\"+E);const x=b+E+a,w=ma(r,35633,b+y+o),C=ma(r,35632,x);if(r.attachShader(v,w),r.attachShader(v,C),void 0!==n.index0AttributeName?r.bindAttribLocation(v,0,n.index0AttributeName):!0===n.morphTargets&&r.bindAttribLocation(v,0,\"position\"),r.linkProgram(v),e.debug.checkShaderErrors){const e=r.getProgramInfoLog(v).trim(),t=r.getShaderInfoLog(w).trim(),n=r.getShaderInfoLog(C).trim();let i=!0,s=!0;if(!1===r.getProgramParameter(v,35714)){i=!1;const t=va(r,w,\"vertex\"),n=va(r,C,\"fragment\");console.error(\"THREE.WebGLProgram: Shader Error \"+r.getError()+\" - VALIDATE_STATUS \"+r.getProgramParameter(v,35715)+\"\\n\\nProgram Info Log: \"+e+\"\\n\"+t+\"\\n\"+n)}else\"\"!==e?console.warn(\"THREE.WebGLProgram: Program Info Log:\",e):\"\"!==t&&\"\"!==n||(s=!1);s&&(this.diagnostics={runnable:i,programLog:e,vertexShader:{log:t,prefix:y},fragmentShader:{log:n,prefix:E}})}let M,_;return r.deleteShader(w),r.deleteShader(C),this.getUniforms=function(){return void 0===M&&(M=new fa(r,v)),M},this.getAttributes=function(){return void 0===_&&(_=function(e,t){const n={},i=e.getProgramParameter(t,35721);for(let r=0;r\u003Ci;r++){const i=e.getActiveAttrib(t,r),s=i.name;let o=1;35674===i.type&&(o=2),35675===i.type&&(o=3),35676===i.type&&(o=4),n[s]={type:i.type,location:e.getAttribLocation(t,s),locationSize:o}}return n}(r,v)),_},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(v),this.program=void 0},this.name=n.shaderName,this.id=ga++,this.cacheKey=t,this.usedTimes=1,this.program=v,this.vertexShader=w,this.fragmentShader=C,this}let Da=0;class Ra{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),s=this._getShaderCacheForMaterial(e);return!1===s.has(i)&&(s.add(i),i.usedTimes++),!1===s.has(r)&&(s.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return void 0===n&&(n=new Pa(e),t.set(e,n)),n}}class Pa{constructor(e){this.id=Da++,this.code=e,this.usedTimes=0}}function ka(e,t,n,i,r,s,o){const a=new Ji,l=new Ra,c=[],h=r.isWebGL2,u=r.logarithmicDepthBuffer,d=r.vertexTextures;let p=r.precision;const A={MeshDepthMaterial:\"depth\",MeshDistanceMaterial:\"distanceRGBA\",MeshNormalMaterial:\"normal\",MeshBasicMaterial:\"basic\",MeshLambertMaterial:\"lambert\",MeshPhongMaterial:\"phong\",MeshToonMaterial:\"toon\",MeshStandardMaterial:\"physical\",MeshPhysicalMaterial:\"physical\",MeshMatcapMaterial:\"matcap\",LineBasicMaterial:\"basic\",LineDashedMaterial:\"dashed\",PointsMaterial:\"points\",ShadowMaterial:\"shadow\",SpriteMaterial:\"sprite\"};return{getParameters:function(s,a,c,f,m){const y=f.fog,b=m.geometry,x=s.isMeshStandardMaterial?f.environment:null,w=(s.isMeshStandardMaterial?n:t).get(s.envMap||x),C=w&&w.mapping===ce?w.image.height:null,M=A[s.type];null!==s.precision&&(p=r.getMaxPrecision(s.precision),p!==s.precision&&console.warn(\"THREE.WebGLProgram.getParameters:\",s.precision,\"not supported, using\",p,\"instead.\"));const _=b.morphAttributes.position||b.morphAttributes.normal||b.morphAttributes.color,I=void 0!==_?_.length:0;let B,S,T,L,D=0;if(void 0!==b.morphAttributes.position&&(D=1),void 0!==b.morphAttributes.normal&&(D=2),void 0!==b.morphAttributes.color&&(D=3),M){const e=ks[M];B=e.vertexShader,S=e.fragmentShader}else B=s.vertexShader,S=s.fragmentShader,l.update(s),T=l.getVertexShaderID(s),L=l.getFragmentShaderID(s);const R=e.getRenderTarget(),P=s.alphaTest>0,k=s.clearcoat>0,F=s.iridescence>0;return{isWebGL2:h,shaderID:M,shaderName:s.type,vertexShader:B,fragmentShader:S,defines:s.defines,customVertexShaderID:T,customFragmentShaderID:L,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:p,instancing:!0===m.isInstancedMesh,instancingColor:!0===m.isInstancedMesh&&null!==m.instanceColor,supportsVertexTextures:d,outputEncoding:null===R?e.outputEncoding:!0===R.isXRRenderTarget?R.texture.encoding:Dt,map:!!s.map,matcap:!!s.matcap,envMap:!!w,envMapMode:w&&w.mapping,envMapCubeUVHeight:C,lightMap:!!s.lightMap,aoMap:!!s.aoMap,emissiveMap:!!s.emissiveMap,bumpMap:!!s.bumpMap,normalMap:!!s.normalMap,objectSpaceNormalMap:s.normalMapType===Ot,tangentSpaceNormalMap:s.normalMapType===Ft,decodeVideoTexture:!!s.map&&!0===s.map.isVideoTexture&&s.map.encoding===Rt,clearcoat:k,clearcoatMap:k&&!!s.clearcoatMap,clearcoatRoughnessMap:k&&!!s.clearcoatRoughnessMap,clearcoatNormalMap:k&&!!s.clearcoatNormalMap,iridescence:F,iridescenceMap:F&&!!s.iridescenceMap,iridescenceThicknessMap:F&&!!s.iridescenceThicknessMap,displacementMap:!!s.displacementMap,roughnessMap:!!s.roughnessMap,metalnessMap:!!s.metalnessMap,specularMap:!!s.specularMap,specularIntensityMap:!!s.specularIntensityMap,specularColorMap:!!s.specularColorMap,opaque:!1===s.transparent&&s.blending===E,alphaMap:!!s.alphaMap,alphaTest:P,gradientMap:!!s.gradientMap,sheen:s.sheen>0,sheenColorMap:!!s.sheenColorMap,sheenRoughnessMap:!!s.sheenRoughnessMap,transmission:s.transmission>0,transmissionMap:!!s.transmissionMap,thicknessMap:!!s.thicknessMap,combine:s.combine,vertexTangents:!!s.normalMap&&!!b.attributes.tangent,vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!b.attributes.color&&4===b.attributes.color.itemSize,vertexUvs:!!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatMap||s.clearcoatRoughnessMap||s.clearcoatNormalMap||s.iridescenceMap||s.iridescenceThicknessMap||s.displacementMap||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||s.sheenColorMap||s.sheenRoughnessMap),uvsVertexOnly:!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatNormalMap||s.iridescenceMap||s.iridescenceThicknessMap||s.transmission>0||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||s.sheen>0||s.sheenColorMap||s.sheenRoughnessMap||!s.displacementMap),fog:!!y,useFog:!0===s.fog,fogExp2:y&&y.isFogExp2,flatShading:!!s.flatShading,sizeAttenuation:s.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===m.isSkinnedMesh,morphTargets:void 0!==b.morphAttributes.position,morphNormals:void 0!==b.morphAttributes.normal,morphColors:void 0!==b.morphAttributes.color,morphTargetsCount:I,morphTextureStride:D,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numSpotLightMaps:a.spotLightMap.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numSpotLightShadowsWithMaps:a.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:s.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:s.toneMapped?e.toneMapping:Z,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===v,flipSided:s.side===g,useDepthPacking:!!s.depthPacking,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:s.extensions&&s.extensions.derivatives,extensionFragDepth:s.extensions&&s.extensions.fragDepth,extensionDrawBuffers:s.extensions&&s.extensions.drawBuffers,extensionShaderTextureLOD:s.extensions&&s.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||i.has(\"EXT_frag_depth\"),rendererExtensionDrawBuffers:h||i.has(\"WEBGL_draw_buffers\"),rendererExtensionShaderTextureLod:h||i.has(\"EXT_shader_texture_lod\"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){a.disableAll(),t.isWebGL2&&a.enable(0),t.supportsVertexTextures&&a.enable(1),t.instancing&&a.enable(2),t.instancingColor&&a.enable(3),t.map&&a.enable(4),t.matcap&&a.enable(5),t.envMap&&a.enable(6),t.lightMap&&a.enable(7),t.aoMap&&a.enable(8),t.emissiveMap&&a.enable(9),t.bumpMap&&a.enable(10),t.normalMap&&a.enable(11),t.objectSpaceNormalMap&&a.enable(12),t.tangentSpaceNormalMap&&a.enable(13),t.clearcoat&&a.enable(14),t.clearcoatMap&&a.enable(15),t.clearcoatRoughnessMap&&a.enable(16),t.clearcoatNormalMap&&a.enable(17),t.iridescence&&a.enable(18),t.iridescenceMap&&a.enable(19),t.iridescenceThicknessMap&&a.enable(20),t.displacementMap&&a.enable(21),t.specularMap&&a.enable(22),t.roughnessMap&&a.enable(23),t.metalnessMap&&a.enable(24),t.gradientMap&&a.enable(25),t.alphaMap&&a.enable(26),t.alphaTest&&a.enable(27),t.vertexColors&&a.enable(28),t.vertexAlphas&&a.enable(29),t.vertexUvs&&a.enable(30),t.vertexTangents&&a.enable(31),t.uvsVertexOnly&&a.enable(32),e.push(a.mask),a.disableAll(),t.fog&&a.enable(0),t.useFog&&a.enable(1),t.flatShading&&a.enable(2),t.logarithmicDepthBuffer&&a.enable(3),t.skinning&&a.enable(4),t.morphTargets&&a.enable(5),t.morphNormals&&a.enable(6),t.morphColors&&a.enable(7),t.premultipliedAlpha&&a.enable(8),t.shadowMapEnabled&&a.enable(9),t.physicallyCorrectLights&&a.enable(10),t.doubleSided&&a.enable(11),t.flipSided&&a.enable(12),t.useDepthPacking&&a.enable(13),t.dithering&&a.enable(14),t.specularIntensityMap&&a.enable(15),t.specularColorMap&&a.enable(16),t.transmission&&a.enable(17),t.transmissionMap&&a.enable(18),t.thicknessMap&&a.enable(19),t.sheen&&a.enable(20),t.sheenColorMap&&a.enable(21),t.sheenRoughnessMap&&a.enable(22),t.decodeVideoTexture&&a.enable(23),t.opaque&&a.enable(24),e.push(a.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=A[e.type];let n;if(t){const e=ks[t];n=fs.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let i;for(let e=0,t=c.length;e\u003Ct;e++){const t=c[e];if(t.cacheKey===n){i=t,++i.usedTimes;break}}return void 0===i&&(i=new La(e,n,t,s),c.push(i)),i},releaseProgram:function(e){if(0==--e.usedTimes){const t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:c,dispose:function(){l.dispose()}}}function Fa(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,i){e.get(t)[n]=i},dispose:function(){e=new WeakMap}}}function Oa(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Qa(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Ua(){const e=[];let t=0;const n=[],i=[],r=[];function s(n,i,r,s,o,a){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:i,material:r,groupOrder:s,renderOrder:n.renderOrder,z:o,group:a},e[t]=l):(l.id=n.id,l.object=n,l.geometry=i,l.material=r,l.groupOrder=s,l.renderOrder=n.renderOrder,l.z=o,l.group=a),t++,l}return{opaque:n,transmissive:i,transparent:r,init:function(){t=0,n.length=0,i.length=0,r.length=0},push:function(e,t,o,a,l,c){const h=s(e,t,o,a,l,c);o.transmission>0?i.push(h):!0===o.transparent?r.push(h):n.push(h)},unshift:function(e,t,o,a,l,c){const h=s(e,t,o,a,l,c);o.transmission>0?i.unshift(h):!0===o.transparent?r.unshift(h):n.unshift(h)},finish:function(){for(let n=t,i=e.length;n\u003Ci;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||Oa),i.length>1&&i.sort(t||Qa),r.length>1&&r.sort(t||Qa)}}}function Na(){let e=new WeakMap;return{get:function(t,n){const i=e.get(t);let r;return void 0===i?(r=new Ua,e.set(t,[r])):n>=i.length?(r=new Ua,i.push(r)):r=i[n],r},dispose:function(){e=new WeakMap}}}function Ga(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case\"DirectionalLight\":n={direction:new ci,color:new Yn};break;case\"SpotLight\":n={position:new ci,direction:new ci,color:new Yn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case\"PointLight\":n={position:new ci,color:new Yn,distance:0,decay:0};break;case\"HemisphereLight\":n={direction:new ci,skyColor:new Yn,groundColor:new Yn};break;case\"RectAreaLight\":n={color:new Yn,position:new ci,halfWidth:new ci,halfHeight:new ci}}return e[t.id]=n,n}}}let za=0;function Ha(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function Va(e,t){const n=new Ga,i=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case\"DirectionalLight\":case\"SpotLight\":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ln};break;case\"PointLight\":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ln,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let e=0;e\u003C9;e++)r.probe.push(new ci);const s=new ci,o=new Ui,a=new Ui;return{setup:function(s,o){let a=0,l=0,c=0;for(let e=0;e\u003C9;e++)r.probe[e].set(0,0,0);let h=0,u=0,d=0,p=0,A=0,f=0,m=0,g=0,v=0,y=0;s.sort(Ha);const E=!0!==o?Math.PI:1;for(let e=0,t=s.length;e\u003Ct;e++){const t=s[e],o=t.color,b=t.intensity,x=t.distance,w=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=o.r*b*E,l+=o.g*b*E,c+=o.b*b*E;else if(t.isLightProbe)for(let e=0;e\u003C9;e++)r.probe[e].addScaledVector(t.sh.coefficients[e],b);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*E),t.castShadow){const e=t.shadow,n=i.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,r.directionalShadow[h]=n,r.directionalShadowMap[h]=w,r.directionalShadowMatrix[h]=t.shadow.matrix,f++}r.directional[h]=e,h++}else if(t.isSpotLight){const e=n.get(t);e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(o).multiplyScalar(b*E),e.distance=x,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,r.spot[d]=e;const s=t.shadow;if(t.map&&(r.spotLightMap[v]=t.map,v++,s.updateMatrices(t),t.castShadow&&y++),r.spotLightMatrix[d]=s.matrix,t.castShadow){const e=i.get(t);e.shadowBias=s.bias,e.shadowNormalBias=s.normalBias,e.shadowRadius=s.radius,e.shadowMapSize=s.mapSize,r.spotShadow[d]=e,r.spotShadowMap[d]=w,g++}d++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(o).multiplyScalar(b),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),r.rectArea[p]=e,p++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*E),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=i.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,r.pointShadow[u]=n,r.pointShadowMap[u]=w,r.pointShadowMatrix[u]=t.shadow.matrix,m++}r.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(b*E),e.groundColor.copy(t.groundColor).multiplyScalar(b*E),r.hemi[A]=e,A++}}p>0&&(t.isWebGL2||!0===e.has(\"OES_texture_float_linear\")?(r.rectAreaLTC1=Ps.LTC_FLOAT_1,r.rectAreaLTC2=Ps.LTC_FLOAT_2):!0===e.has(\"OES_texture_half_float_linear\")?(r.rectAreaLTC1=Ps.LTC_HALF_1,r.rectAreaLTC2=Ps.LTC_HALF_2):console.error(\"THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.\")),r.ambient[0]=a,r.ambient[1]=l,r.ambient[2]=c;const b=r.hash;b.directionalLength===h&&b.pointLength===u&&b.spotLength===d&&b.rectAreaLength===p&&b.hemiLength===A&&b.numDirectionalShadows===f&&b.numPointShadows===m&&b.numSpotShadows===g&&b.numSpotMaps===v||(r.directional.length=h,r.spot.length=d,r.rectArea.length=p,r.point.length=u,r.hemi.length=A,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=m,r.pointShadowMap.length=m,r.spotShadow.length=g,r.spotShadowMap.length=g,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=m,r.spotLightMatrix.length=g+v-y,r.spotLightMap.length=v,r.numSpotLightShadowsWithMaps=y,b.directionalLength=h,b.pointLength=u,b.spotLength=d,b.rectAreaLength=p,b.hemiLength=A,b.numDirectionalShadows=f,b.numPointShadows=m,b.numSpotShadows=g,b.numSpotMaps=v,r.version=za++)},setupView:function(e,t){let n=0,i=0,l=0,c=0,h=0;const u=t.matrixWorldInverse;for(let t=0,d=e.length;t\u003Cd;t++){const d=e[t];if(d.isDirectionalLight){const e=r.directional[n];e.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(s),e.direction.transformDirection(u),n++}else if(d.isSpotLight){const e=r.spot[l];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),e.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(s),e.direction.transformDirection(u),l++}else if(d.isRectAreaLight){const e=r.rectArea[c];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),a.identity(),o.copy(d.matrixWorld),o.premultiply(u),a.extractRotation(o),e.halfWidth.set(.5*d.width,0,0),e.halfHeight.set(0,.5*d.height,0),e.halfWidth.applyMatrix4(a),e.halfHeight.applyMatrix4(a),c++}else if(d.isPointLight){const e=r.point[i];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(u),i++}else if(d.isHemisphereLight){const e=r.hemi[h];e.direction.setFromMatrixPosition(d.matrixWorld),e.direction.transformDirection(u),h++}}},state:r}}function Wa(e,t){const n=new Va(e,t),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:function(e){n.setup(i,e)},setupLightsView:function(e){n.setupView(i,e)},pushLight:function(e){i.push(e)},pushShadow:function(e){r.push(e)}}}function ja(e,t){let n=new WeakMap;return{get:function(i,r=0){const s=n.get(i);let o;return void 0===s?(o=new Wa(e,t),n.set(i,[o])):r>=s.length?(o=new Wa(e,t),s.push(o)):o=s[r],o},dispose:function(){n=new WeakMap}}}class qa extends wr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=\"MeshDepthMaterial\",this.depthPacking=Pt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Ya extends wr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=\"MeshDistanceMaterial\",this.referencePosition=new ci,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function Xa(e,t,n){let i=new Ss;const r=new Ln,s=new Ln,o=new ti,a=new qa({depthPacking:kt}),l=new Ya,c={},h=n.maxTextureSize,u={0:g,1:m,2:v},d=new ms({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ln},radius:{value:4}},vertexShader:\"void main() {\\n\\tgl_Position = vec4( position, 1.0 );\\n}\",fragmentShader:\"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include \u003Cpacking>\\nvoid main() {\\n\\tconst float samples = float( VSM_SAMPLES );\\n\\tfloat mean = 0.0;\\n\\tfloat squared_mean = 0.0;\\n\\tfloat uvStride = samples \u003C= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\\n\\tfloat uvStart = samples \u003C= 1.0 ? 0.0 : - 1.0;\\n\\tfor ( float i = 0.0; i \u003C samples; i ++ ) {\\n\\t\\tfloat uvOffset = uvStart + i * uvStride;\\n\\t\\t#ifdef HORIZONTAL_PASS\\n\\t\\t\\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\\n\\t\\t\\tmean += distribution.x;\\n\\t\\t\\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\\t\\t#else\\n\\t\\t\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\\n\\t\\t\\tmean += depth;\\n\\t\\t\\tsquared_mean += depth * depth;\\n\\t\\t#endif\\n\\t}\\n\\tmean = mean / samples;\\n\\tsquared_mean = squared_mean / samples;\\n\\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\"}),A=d.clone();A.defines.HORIZONTAL_PASS=1;const E=new Wr;E.setAttribute(\"position\",new Ir(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new cs(E,d),x=this;function w(n,i){const s=t.update(b);d.defines.VSM_SAMPLES!==n.blurSamples&&(d.defines.VSM_SAMPLES=n.blurSamples,A.defines.VSM_SAMPLES=n.blurSamples,d.needsUpdate=!0,A.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new ni(r.x,r.y)),d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(i,null,s,d,b,null),A.uniforms.shadow_pass.value=n.mapPass.texture,A.uniforms.resolution.value=n.mapSize,A.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(i,null,s,A,b,null)}function C(t,n,i,r,s,o){let h=null;const d=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(h=void 0!==d?d:!0===i.isPointLight?l:a,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=h.uuid,t=n.uuid;let i=c[e];void 0===i&&(i={},c[e]=i);let r=i[t];void 0===r&&(r=h.clone(),i[t]=r),h=r}return h.visible=n.visible,h.wireframe=n.wireframe,h.side=o===f?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:u[n.side],h.alphaMap=n.alphaMap,h.alphaTest=n.alphaTest,h.map=n.map,h.clipShadows=n.clipShadows,h.clippingPlanes=n.clippingPlanes,h.clipIntersection=n.clipIntersection,h.displacementMap=n.displacementMap,h.displacementScale=n.displacementScale,h.displacementBias=n.displacementBias,h.wireframeLinewidth=n.wireframeLinewidth,h.linewidth=n.linewidth,!0===i.isPointLight&&!0===h.isMeshDistanceMaterial&&(h.referencePosition.setFromMatrixPosition(i.matrixWorld),h.nearDistance=r,h.farDistance=s),h}function M(n,r,s,o,a){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&a===f)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const i=t.update(n),r=n.material;if(Array.isArray(r)){const t=i.groups;for(let l=0,c=t.length;l\u003Cc;l++){const c=t[l],h=r[c.materialIndex];if(h&&h.visible){const t=C(n,h,o,s.near,s.far,a);e.renderBufferDirect(s,null,i,t,n,c)}}}else if(r.visible){const t=C(n,r,o,s.near,s.far,a);e.renderBufferDirect(s,null,i,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e\u003Ct;e++)M(l[e],r,s,o,a)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=p,this.render=function(t,n,a){if(!1===x.enabled)return;if(!1===x.autoUpdate&&!1===x.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),d=e.state;d.setBlending(y),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(let l=0,c=t.length;l\u003Cc;l++){const c=t[l],u=c.shadow;if(void 0===u){console.warn(\"THREE.WebGLShadowMap:\",c,\"has no shadow.\");continue}if(!1===u.autoUpdate&&!1===u.needsUpdate)continue;r.copy(u.mapSize);const p=u.getFrameExtents();if(r.multiply(p),s.copy(u.mapSize),(r.x>h||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/p.x),r.x=s.x*p.x,u.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/p.y),r.y=s.y*p.y,u.mapSize.y=s.y)),null===u.map){const e=this.type!==f?{minFilter:pe,magFilter:pe}:{};u.map=new ni(r.x,r.y,e),u.map.texture.name=c.name+\".shadowMap\",u.camera.updateProjectionMatrix()}e.setRenderTarget(u.map),e.clear();const A=u.getViewportCount();for(let e=0;e\u003CA;e++){const t=u.getViewport(e);o.set(s.x*t.x,s.y*t.y,s.x*t.z,s.y*t.w),d.viewport(o),u.updateMatrices(c,e),i=u.getFrustum(),M(n,a,u.camera,c,this.type)}!0!==u.isPointLightShadow&&this.type===f&&w(u,a),u.needsUpdate=!1}x.needsUpdate=!1,e.setRenderTarget(l,c,u)}}function Ja(e,t,n){const i=n.isWebGL2,r=new function(){let t=!1;const n=new ti;let i=null;const r=new ti(0,0,0,0);return{setMask:function(n){i===n||t||(e.colorMask(n,n,n,n),i=n)},setLocked:function(e){t=e},setClear:function(t,i,s,o,a){!0===a&&(t*=o,i*=o,s*=o),n.set(t,i,s,o),!1===r.equals(n)&&(e.clearColor(t,i,s,o),r.copy(n))},reset:function(){t=!1,i=null,r.set(-1,0,0,0)}}},s=new function(){let t=!1,n=null,i=null,r=null;return{setTest:function(e){e?be(2929):xe(2929)},setMask:function(i){n===i||t||(e.depthMask(i),n=i)},setFunc:function(t){if(i!==t){switch(t){case G:e.depthFunc(512);break;case z:e.depthFunc(519);break;case H:e.depthFunc(513);break;case V:e.depthFunc(515);break;case W:e.depthFunc(514);break;case j:e.depthFunc(518);break;case q:e.depthFunc(516);break;case Y:e.depthFunc(517);break;default:e.depthFunc(515)}i=t}},setLocked:function(e){t=e},setClear:function(t){r!==t&&(e.clearDepth(t),r=t)},reset:function(){t=!1,n=null,i=null,r=null}}},o=new function(){let t=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,c=null;return{setTest:function(e){t||(e?be(2960):xe(2960))},setMask:function(i){n===i||t||(e.stencilMask(i),n=i)},setFunc:function(t,n,o){i===t&&r===n&&s===o||(e.stencilFunc(t,n,o),i=t,r=n,s=o)},setOp:function(t,n,i){o===t&&a===n&&l===i||(e.stencilOp(t,n,i),o=t,a=n,l=i)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,c=null}}},a=new WeakMap,u=new WeakMap;let d={},p={},A=new WeakMap,f=[],m=null,X=!1,J=null,K=null,Z=null,$=null,ee=null,te=null,ne=null,ie=!1,re=null,se=null,oe=null,ae=null,le=null;const ce=e.getParameter(35661);let he=!1,ue=0;const de=e.getParameter(7938);-1!==de.indexOf(\"WebGL\")?(ue=parseFloat(/^WebGL (\\d)/.exec(de)[1]),he=ue>=1):-1!==de.indexOf(\"OpenGL ES\")&&(ue=parseFloat(/^OpenGL ES (\\d)/.exec(de)[1]),he=ue>=2);let pe=null,Ae={};const fe=e.getParameter(3088),me=e.getParameter(2978),ge=(new ti).fromArray(fe),ve=(new ti).fromArray(me);function ye(t,n,i){const r=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t\u003Ci;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,r);return s}const Ee={};function be(t){!0!==d[t]&&(e.enable(t),d[t]=!0)}function xe(t){!1!==d[t]&&(e.disable(t),d[t]=!1)}Ee[3553]=ye(3553,3553,1),Ee[34067]=ye(34067,34069,6),r.setClear(0,0,0,1),s.setClear(1),o.setClear(0),be(2929),s.setFunc(V),_e(!1),Ie(c),be(2884),Me(y);const we={[M]:32774,[_]:32778,[I]:32779};if(i)we[B]=32775,we[S]=32776;else{const e=t.get(\"EXT_blend_minmax\");null!==e&&(we[B]=e.MIN_EXT,we[S]=e.MAX_EXT)}const Ce={[T]:0,[L]:1,[D]:768,[P]:770,[N]:776,[Q]:774,[F]:772,[R]:769,[k]:771,[U]:775,[O]:773};function Me(t,n,i,r,s,o,a,l){if(t!==y){if(!1===X&&(be(3042),X=!0),t===C)s=s||n,o=o||i,a=a||r,n===K&&s===ee||(e.blendEquationSeparate(we[n],we[s]),K=n,ee=s),i===Z&&r===$&&o===te&&a===ne||(e.blendFuncSeparate(Ce[i],Ce[r],Ce[o],Ce[a]),Z=i,$=r,te=o,ne=a),J=t,ie=!1;else if(t!==J||l!==ie){if(K===M&&ee===M||(e.blendEquation(32774),K=M,ee=M),l)switch(t){case E:e.blendFuncSeparate(1,771,1,771);break;case b:e.blendFunc(1,1);break;case x:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFuncSeparate(0,768,0,770);break;default:console.error(\"THREE.WebGLState: Invalid blending: \",t)}else switch(t){case E:e.blendFuncSeparate(770,771,1,771);break;case b:e.blendFunc(770,1);break;case x:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFunc(0,768);break;default:console.error(\"THREE.WebGLState: Invalid blending: \",t)}Z=null,$=null,te=null,ne=null,J=t,ie=l}}else!0===X&&(xe(3042),X=!1)}function _e(t){re!==t&&(t?e.frontFace(2304):e.frontFace(2305),re=t)}function Ie(t){t!==l?(be(2884),t!==se&&(t===c?e.cullFace(1029):t===h?e.cullFace(1028):e.cullFace(1032))):xe(2884),se=t}function Be(t,n,i){t?(be(32823),ae===n&&le===i||(e.polygonOffset(n,i),ae=n,le=i)):xe(32823)}return{buffers:{color:r,depth:s,stencil:o},enable:be,disable:xe,bindFramebuffer:function(t,n){return p[t]!==n&&(e.bindFramebuffer(t,n),p[t]=n,i&&(36009===t&&(p[36160]=n),36160===t&&(p[36009]=n)),!0)},drawBuffers:function(i,r){let s=f,o=!1;if(i)if(s=A.get(r),void 0===s&&(s=[],A.set(r,s)),i.isWebGLMultipleRenderTargets){const e=i.texture;if(s.length!==e.length||36064!==s[0]){for(let t=0,n=e.length;t\u003Cn;t++)s[t]=36064+t;s.length=e.length,o=!0}}else 36064!==s[0]&&(s[0]=36064,o=!0);else 1029!==s[0]&&(s[0]=1029,o=!0);o&&(n.isWebGL2?e.drawBuffers(s):t.get(\"WEBGL_draw_buffers\").drawBuffersWEBGL(s))},useProgram:function(t){return m!==t&&(e.useProgram(t),m=t,!0)},setBlending:Me,setMaterial:function(e,t){e.side===v?xe(2884):be(2884);let n=e.side===g;t&&(n=!n),_e(n),e.blending===E&&!1===e.transparent?Me(y):Me(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),s.setFunc(e.depthFunc),s.setTest(e.depthTest),s.setMask(e.depthWrite),r.setMask(e.colorWrite);const i=e.stencilWrite;o.setTest(i),i&&(o.setMask(e.stencilWriteMask),o.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),o.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),Be(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?be(32926):xe(32926)},setFlipSided:_e,setCullFace:Ie,setLineWidth:function(t){t!==oe&&(he&&e.lineWidth(t),oe=t)},setPolygonOffset:Be,setScissorTest:function(e){e?be(3089):xe(3089)},activeTexture:function(t){void 0===t&&(t=33984+ce-1),pe!==t&&(e.activeTexture(t),pe=t)},bindTexture:function(t,n,i){void 0===i&&(i=null===pe?33984+ce-1:pe);let r=Ae[i];void 0===r&&(r={type:void 0,texture:void 0},Ae[i]=r),r.type===t&&r.texture===n||(pe!==i&&(e.activeTexture(i),pe=i),e.bindTexture(t,n||Ee[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=Ae[pe];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},updateUBOMapping:function(t,n){let i=u.get(n);void 0===i&&(i=new WeakMap,u.set(n,i));let r=i.get(t);void 0===r&&(r=e.getUniformBlockIndex(n,t.name),i.set(t,r))},uniformBlockBinding:function(t,n){const i=u.get(n).get(t);a.get(t)!==i&&(e.uniformBlockBinding(n,i,t.__bindingPointIndex),a.set(t,i))},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(e){console.error(\"THREE.WebGLState:\",e)}},scissor:function(t){!1===ge.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),ge.copy(t))},viewport:function(t){!1===ve.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),ve.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===i&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),d={},pe=null,Ae={},p={},A=new WeakMap,f=[],m=null,X=!1,J=null,K=null,Z=null,$=null,ee=null,te=null,ne=null,ie=!1,re=null,se=null,oe=null,ae=null,le=null,ge.set(0,0,e.canvas.width,e.canvas.height),ve.set(0,0,e.canvas.width,e.canvas.height),r.reset(),s.reset(),o.reset()}}}function Ka(e,t,n,i,r,s,o){const a=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,h=r.maxTextureSize,u=r.maxSamples,d=t.has(\"WEBGL_multisampled_render_to_texture\")?t.get(\"WEBGL_multisampled_render_to_texture\"):null,p=\"undefined\"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),A=new WeakMap;let f;const m=new WeakMap;let g=!1;try{g=\"undefined\"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext(\"2d\")}catch(e){}function v(e,t){return g?new OffscreenCanvas(e,t):On(\"canvas\")}function y(e,t,n,i){let r=1;if((e.width>i||e.height>i)&&(r=i/Math.max(e.width,e.height)),r\u003C1||!0===t){if(\"undefined\"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||\"undefined\"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||\"undefined\"!=typeof ImageBitmap&&e instanceof ImageBitmap){const i=t?In:Math.floor,s=i(r*e.width),o=i(r*e.height);void 0===f&&(f=v(s,o));const a=n?v(s,o):f;return a.width=s,a.height=o,a.getContext(\"2d\").drawImage(e,0,0,s,o),console.warn(\"THREE.WebGLRenderer: Texture has been resized from (\"+e.width+\"x\"+e.height+\") to (\"+s+\"x\"+o+\").\"),a}return\"data\"in e&&console.warn(\"THREE.WebGLRenderer: Image in DataTexture is too big (\"+e.width+\"x\"+e.height+\").\"),e}return e}function E(e){return Mn(e.width)&&Mn(e.height)}function b(e,t){return e.generateMipmaps&&t&&e.minFilter!==pe&&e.minFilter!==ve}function x(t){e.generateMipmap(t)}function w(n,i,r,s,o=!1){if(!1===a)return i;if(null!==n){if(void 0!==e[n])return e[n];console.warn(\"THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '\"+n+\"'\")}let l=i;return 6403===i&&(5126===r&&(l=33326),5131===r&&(l=33325),5121===r&&(l=33321)),33319===i&&(5126===r&&(l=33328),5131===r&&(l=33327),5121===r&&(l=33323)),6408===i&&(5126===r&&(l=34836),5131===r&&(l=34842),5121===r&&(l=s===Rt&&!1===o?35907:32856),32819===r&&(l=32854),32820===r&&(l=32855)),33325!==l&&33326!==l&&33327!==l&&33328!==l&&34842!==l&&34836!==l||t.get(\"EXT_color_buffer_float\"),l}function C(e,t,n){return!0===b(e,n)||e.isFramebufferTexture&&e.minFilter!==pe&&e.minFilter!==ve?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function M(e){return e===pe||e===Ae||e===me?9728:9729}function _(e){const t=e.target;t.removeEventListener(\"dispose\",_),function(e){const t=i.get(e);if(void 0===t.__webglInit)return;const n=e.source,r=m.get(n);if(r){const i=r[t.__cacheKey];i.usedTimes--,0===i.usedTimes&&B(e),0===Object.keys(r).length&&m.delete(n)}i.remove(e)}(t),t.isVideoTexture&&A.delete(t)}function I(t){const n=t.target;n.removeEventListener(\"dispose\",I),function(t){const n=t.texture,r=i.get(t),s=i.get(n);if(void 0!==s.__webglTexture&&(e.deleteTexture(s.__webglTexture),o.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t\u003C6;t++)e.deleteFramebuffer(r.__webglFramebuffer[t]),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[t]);else{if(e.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer)for(let t=0;t\u003Cr.__webglColorRenderbuffer.length;t++)r.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(r.__webglColorRenderbuffer[t]);r.__webglDepthRenderbuffer&&e.deleteRenderbuffer(r.__webglDepthRenderbuffer)}if(t.isWebGLMultipleRenderTargets)for(let t=0,r=n.length;t\u003Cr;t++){const r=i.get(n[t]);r.__webglTexture&&(e.deleteTexture(r.__webglTexture),o.memory.textures--),i.remove(n[t])}i.remove(n),i.remove(t)}(n)}function B(t){const n=i.get(t);e.deleteTexture(n.__webglTexture);const r=t.source;delete m.get(r)[n.__cacheKey],o.memory.textures--}let S=0;function T(e,t){const r=i.get(e);if(e.isVideoTexture&&function(e){const t=o.render.frame;A.get(e)!==t&&(A.set(e,t),e.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&r.__version!==e.version){const n=e.image;if(null===n)console.warn(\"THREE.WebGLRenderer: Texture marked for update but no image data found.\");else{if(!1!==n.complete)return void k(r,e,t);console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is incomplete\")}}n.bindTexture(3553,r.__webglTexture,33984+t)}const L={[he]:10497,[ue]:33071,[de]:33648},D={[pe]:9728,[Ae]:9984,[me]:9986,[ve]:9729,[ye]:9985,[be]:9987};function R(n,s,o){if(o?(e.texParameteri(n,10242,L[s.wrapS]),e.texParameteri(n,10243,L[s.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,L[s.wrapR]),e.texParameteri(n,10240,D[s.magFilter]),e.texParameteri(n,10241,D[s.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),s.wrapS===ue&&s.wrapT===ue||console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.\"),e.texParameteri(n,10240,M(s.magFilter)),e.texParameteri(n,10241,M(s.minFilter)),s.minFilter!==pe&&s.minFilter!==ve&&console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.\")),!0===t.has(\"EXT_texture_filter_anisotropic\")){const o=t.get(\"EXT_texture_filter_anisotropic\");if(s.type===Se&&!1===t.has(\"OES_texture_float_linear\"))return;if(!1===a&&s.type===Te&&!1===t.has(\"OES_texture_half_float_linear\"))return;(s.anisotropy>1||i.get(s).__currentAnisotropy)&&(e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),i.get(s).__currentAnisotropy=s.anisotropy)}}function P(t,n){let i=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener(\"dispose\",_));const r=n.source;let s=m.get(r);void 0===s&&(s={},m.set(r,s));const a=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(a!==t.__cacheKey){void 0===s[a]&&(s[a]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,i=!0),s[a].usedTimes++;const r=s[t.__cacheKey];void 0!==r&&(s[t.__cacheKey].usedTimes--,0===r.usedTimes&&B(n)),t.__cacheKey=a,t.__webglTexture=s[a].texture}return i}function k(t,r,o){let l=3553;(r.isDataArrayTexture||r.isCompressedArrayTexture)&&(l=35866),r.isData3DTexture&&(l=32879);const c=P(t,r),u=r.source;n.bindTexture(l,t.__webglTexture,33984+o);const d=i.get(u);if(u.version!==d.__version||!0===c){n.activeTexture(33984+o),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const t=function(e){return!a&&(e.wrapS!==ue||e.wrapT!==ue||e.minFilter!==pe&&e.minFilter!==ve)}(r)&&!1===E(r.image);let i=y(r.image,t,!1,h);i=G(r,i);const p=E(i)||a,A=s.convert(r.format,r.encoding);let f,m=s.convert(r.type),g=w(r.internalFormat,A,m,r.encoding,r.isVideoTexture);R(l,r,p);const v=r.mipmaps,M=a&&!0!==r.isVideoTexture,_=void 0===d.__version||!0===c,I=C(r,i,p);if(r.isDepthTexture)g=6402,a?g=r.type===Se?36012:r.type===Be?33190:r.type===Re?35056:33189:r.type===Se&&console.error(\"WebGLRenderer: Floating point depth texture requires WebGL2.\"),r.format===Ue&&6402===g&&r.type!==_e&&r.type!==Be&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.\"),r.type=Be,m=s.convert(r.type)),r.format===Ne&&6402===g&&(g=34041,r.type!==Re&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.\"),r.type=Re,m=s.convert(r.type))),_&&(M?n.texStorage2D(3553,1,g,i.width,i.height):n.texImage2D(3553,0,g,i.width,i.height,0,A,m,null));else if(r.isDataTexture)if(v.length>0&&p){M&&_&&n.texStorage2D(3553,I,g,v[0].width,v[0].height);for(let e=0,t=v.length;e\u003Ct;e++)f=v[e],M?n.texSubImage2D(3553,e,0,0,f.width,f.height,A,m,f.data):n.texImage2D(3553,e,g,f.width,f.height,0,A,m,f.data);r.generateMipmaps=!1}else M?(_&&n.texStorage2D(3553,I,g,i.width,i.height),n.texSubImage2D(3553,0,0,0,i.width,i.height,A,m,i.data)):n.texImage2D(3553,0,g,i.width,i.height,0,A,m,i.data);else if(r.isCompressedTexture)if(r.isCompressedArrayTexture){M&&_&&n.texStorage3D(35866,I,g,v[0].width,v[0].height,i.depth);for(let e=0,t=v.length;e\u003Ct;e++)f=v[e],r.format!==Fe?null!==A?M?n.compressedTexSubImage3D(35866,e,0,0,0,f.width,f.height,i.depth,A,f.data,0,0):n.compressedTexImage3D(35866,e,g,f.width,f.height,i.depth,0,f.data,0,0):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\"):M?n.texSubImage3D(35866,e,0,0,0,f.width,f.height,i.depth,A,m,f.data):n.texImage3D(35866,e,g,f.width,f.height,i.depth,0,A,m,f.data)}else{M&&_&&n.texStorage2D(3553,I,g,v[0].width,v[0].height);for(let e=0,t=v.length;e\u003Ct;e++)f=v[e],r.format!==Fe?null!==A?M?n.compressedTexSubImage2D(3553,e,0,0,f.width,f.height,A,f.data):n.compressedTexImage2D(3553,e,g,f.width,f.height,0,f.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\"):M?n.texSubImage2D(3553,e,0,0,f.width,f.height,A,m,f.data):n.texImage2D(3553,e,g,f.width,f.height,0,A,m,f.data)}else if(r.isDataArrayTexture)M?(_&&n.texStorage3D(35866,I,g,i.width,i.height,i.depth),n.texSubImage3D(35866,0,0,0,0,i.width,i.height,i.depth,A,m,i.data)):n.texImage3D(35866,0,g,i.width,i.height,i.depth,0,A,m,i.data);else if(r.isData3DTexture)M?(_&&n.texStorage3D(32879,I,g,i.width,i.height,i.depth),n.texSubImage3D(32879,0,0,0,0,i.width,i.height,i.depth,A,m,i.data)):n.texImage3D(32879,0,g,i.width,i.height,i.depth,0,A,m,i.data);else if(r.isFramebufferTexture){if(_)if(M)n.texStorage2D(3553,I,g,i.width,i.height);else{let e=i.width,t=i.height;for(let i=0;i\u003CI;i++)n.texImage2D(3553,i,g,e,t,0,A,m,null),e>>=1,t>>=1}}else if(v.length>0&&p){M&&_&&n.texStorage2D(3553,I,g,v[0].width,v[0].height);for(let e=0,t=v.length;e\u003Ct;e++)f=v[e],M?n.texSubImage2D(3553,e,0,0,A,m,f):n.texImage2D(3553,e,g,A,m,f);r.generateMipmaps=!1}else M?(_&&n.texStorage2D(3553,I,g,i.width,i.height),n.texSubImage2D(3553,0,0,0,A,m,i)):n.texImage2D(3553,0,g,A,m,i);b(r,p)&&x(l),d.__version=u.version,r.onUpdate&&r.onUpdate(r)}t.__version=r.version}function F(t,r,o,a,l){const c=s.convert(o.format,o.encoding),h=s.convert(o.type),u=w(o.internalFormat,c,h,o.encoding);i.get(r).__hasExternalTextures||(32879===l||35866===l?n.texImage3D(l,0,u,r.width,r.height,r.depth,0,c,h,null):n.texImage2D(l,0,u,r.width,r.height,0,c,h,null)),n.bindFramebuffer(36160,t),N(r)?d.framebufferTexture2DMultisampleEXT(36160,a,l,i.get(o).__webglTexture,0,U(r)):(3553===l||l>=34069&&l\u003C=34074)&&e.framebufferTexture2D(36160,a,l,i.get(o).__webglTexture,0),n.bindFramebuffer(36160,null)}function O(t,n,i){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let r=33189;if(i||N(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Se?r=36012:t.type===Be&&(r=33190));const i=U(n);N(n)?d.renderbufferStorageMultisampleEXT(36161,i,r,n.width,n.height):e.renderbufferStorageMultisample(36161,i,r,n.width,n.height)}else e.renderbufferStorage(36161,r,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){const r=U(n);i&&!1===N(n)?e.renderbufferStorageMultisample(36161,r,35056,n.width,n.height):N(n)?d.renderbufferStorageMultisampleEXT(36161,r,35056,n.width,n.height):e.renderbufferStorage(36161,34041,n.width,n.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let r=0;r\u003Ct.length;r++){const o=t[r],a=s.convert(o.format,o.encoding),l=s.convert(o.type),c=w(o.internalFormat,a,l,o.encoding),h=U(n);i&&!1===N(n)?e.renderbufferStorageMultisample(36161,h,c,n.width,n.height):N(n)?d.renderbufferStorageMultisampleEXT(36161,h,c,n.width,n.height):e.renderbufferStorage(36161,c,n.width,n.height)}}e.bindRenderbuffer(36161,null)}function Q(t){const r=i.get(t),s=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!r.__autoAllocateDepthBuffer){if(s)throw new Error(\"target.depthTexture not supported in Cube render targets\");!function(t,r){if(r&&r.isWebGLCubeRenderTarget)throw new Error(\"Depth Texture with cube render targets is not supported\");if(n.bindFramebuffer(36160,t),!r.depthTexture||!r.depthTexture.isDepthTexture)throw new Error(\"renderTarget.depthTexture must be an instance of THREE.DepthTexture\");i.get(r.depthTexture).__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),T(r.depthTexture,0);const s=i.get(r.depthTexture).__webglTexture,o=U(r);if(r.depthTexture.format===Ue)N(r)?d.framebufferTexture2DMultisampleEXT(36160,36096,3553,s,0,o):e.framebufferTexture2D(36160,36096,3553,s,0);else{if(r.depthTexture.format!==Ne)throw new Error(\"Unknown depthTexture format\");N(r)?d.framebufferTexture2DMultisampleEXT(36160,33306,3553,s,0,o):e.framebufferTexture2D(36160,33306,3553,s,0)}}(r.__webglFramebuffer,t)}else if(s){r.__webglDepthbuffer=[];for(let i=0;i\u003C6;i++)n.bindFramebuffer(36160,r.__webglFramebuffer[i]),r.__webglDepthbuffer[i]=e.createRenderbuffer(),O(r.__webglDepthbuffer[i],t,!1)}else n.bindFramebuffer(36160,r.__webglFramebuffer),r.__webglDepthbuffer=e.createRenderbuffer(),O(r.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function U(e){return Math.min(u,e.samples)}function N(e){const n=i.get(e);return a&&e.samples>0&&!0===t.has(\"WEBGL_multisampled_render_to_texture\")&&!1!==n.__useRenderToTexture}function G(e,n){const i=e.encoding,r=e.format,s=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===fn||i!==Dt&&(i===Rt?!1===a?!0===t.has(\"EXT_sRGB\")&&r===Fe?(e.format=fn,e.minFilter=ve,e.generateMipmaps=!1):n=Jn.sRGBToLinear(n):r===Fe&&s===we||console.warn(\"THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.\"):console.error(\"THREE.WebGLTextures: Unsupported texture encoding:\",i)),n}this.allocateTextureUnit=function(){const e=S;return e>=l&&console.warn(\"THREE.WebGLTextures: Trying to use \"+e+\" texture units while this GPU supports only \"+l),S+=1,e},this.resetTextureUnits=function(){S=0},this.setTexture2D=T,this.setTexture2DArray=function(e,t){const r=i.get(e);e.version>0&&r.__version!==e.version?k(r,e,t):n.bindTexture(35866,r.__webglTexture,33984+t)},this.setTexture3D=function(e,t){const r=i.get(e);e.version>0&&r.__version!==e.version?k(r,e,t):n.bindTexture(32879,r.__webglTexture,33984+t)},this.setTextureCube=function(t,r){const o=i.get(t);t.version>0&&o.__version!==t.version?function(t,r,o){if(6!==r.image.length)return;const l=P(t,r),h=r.source;n.bindTexture(34067,t.__webglTexture,33984+o);const u=i.get(h);if(h.version!==u.__version||!0===l){n.activeTexture(33984+o),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const t=r.isCompressedTexture||r.image[0].isCompressedTexture,i=r.image[0]&&r.image[0].isDataTexture,d=[];for(let e=0;e\u003C6;e++)d[e]=t||i?i?r.image[e].image:r.image[e]:y(r.image[e],!1,!0,c),d[e]=G(r,d[e]);const p=d[0],A=E(p)||a,f=s.convert(r.format,r.encoding),m=s.convert(r.type),g=w(r.internalFormat,f,m,r.encoding),v=a&&!0!==r.isVideoTexture,M=void 0===u.__version||!0===l;let _,I=C(r,p,A);if(R(34067,r,A),t){v&&M&&n.texStorage2D(34067,I,g,p.width,p.height);for(let e=0;e\u003C6;e++){_=d[e].mipmaps;for(let t=0;t\u003C_.length;t++){const i=_[t];r.format!==Fe?null!==f?v?n.compressedTexSubImage2D(34069+e,t,0,0,i.width,i.height,f,i.data):n.compressedTexImage2D(34069+e,t,g,i.width,i.height,0,i.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()\"):v?n.texSubImage2D(34069+e,t,0,0,i.width,i.height,f,m,i.data):n.texImage2D(34069+e,t,g,i.width,i.height,0,f,m,i.data)}}}else{_=r.mipmaps,v&&M&&(_.length>0&&I++,n.texStorage2D(34067,I,g,d[0].width,d[0].height));for(let e=0;e\u003C6;e++)if(i){v?n.texSubImage2D(34069+e,0,0,0,d[e].width,d[e].height,f,m,d[e].data):n.texImage2D(34069+e,0,g,d[e].width,d[e].height,0,f,m,d[e].data);for(let t=0;t\u003C_.length;t++){const i=_[t].image[e].image;v?n.texSubImage2D(34069+e,t+1,0,0,i.width,i.height,f,m,i.data):n.texImage2D(34069+e,t+1,g,i.width,i.height,0,f,m,i.data)}}else{v?n.texSubImage2D(34069+e,0,0,0,f,m,d[e]):n.texImage2D(34069+e,0,g,f,m,d[e]);for(let t=0;t\u003C_.length;t++){const i=_[t];v?n.texSubImage2D(34069+e,t+1,0,0,f,m,i.image[e]):n.texImage2D(34069+e,t+1,g,f,m,i.image[e])}}}b(r,A)&&x(34067),u.__version=h.version,r.onUpdate&&r.onUpdate(r)}t.__version=r.version}(o,t,r):n.bindTexture(34067,o.__webglTexture,33984+r)},this.rebindTextures=function(e,t,n){const r=i.get(e);void 0!==t&&F(r.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&Q(e)},this.setupRenderTarget=function(t){const l=t.texture,c=i.get(t),h=i.get(l);t.addEventListener(\"dispose\",I),!0!==t.isWebGLMultipleRenderTargets&&(void 0===h.__webglTexture&&(h.__webglTexture=e.createTexture()),h.__version=l.version,o.memory.textures++);const u=!0===t.isWebGLCubeRenderTarget,d=!0===t.isWebGLMultipleRenderTargets,p=E(t)||a;if(u){c.__webglFramebuffer=[];for(let t=0;t\u003C6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else{if(c.__webglFramebuffer=e.createFramebuffer(),d)if(r.drawBuffers){const n=t.texture;for(let t=0,r=n.length;t\u003Cr;t++){const r=i.get(n[t]);void 0===r.__webglTexture&&(r.__webglTexture=e.createTexture(),o.memory.textures++)}}else console.warn(\"THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.\");if(a&&t.samples>0&&!1===N(t)){const i=d?l:[l];c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer);for(let n=0;n\u003Ci.length;n++){const r=i[n];c.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(36161,c.__webglColorRenderbuffer[n]);const o=s.convert(r.format,r.encoding),a=s.convert(r.type),l=w(r.internalFormat,o,a,r.encoding,!0===t.isXRRenderTarget),h=U(t);e.renderbufferStorageMultisample(36161,h,l,t.width,t.height),e.framebufferRenderbuffer(36160,36064+n,36161,c.__webglColorRenderbuffer[n])}e.bindRenderbuffer(36161,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),O(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}}if(u){n.bindTexture(34067,h.__webglTexture),R(34067,l,p);for(let e=0;e\u003C6;e++)F(c.__webglFramebuffer[e],t,l,36064,34069+e);b(l,p)&&x(34067),n.unbindTexture()}else if(d){const e=t.texture;for(let r=0,s=e.length;r\u003Cs;r++){const s=e[r],o=i.get(s);n.bindTexture(3553,o.__webglTexture),R(3553,s,p),F(c.__webglFramebuffer,t,s,36064+r,3553),b(s,p)&&x(3553)}n.unbindTexture()}else{let e=3553;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(a?e=t.isWebGL3DRenderTarget?32879:35866:console.error(\"THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.\")),n.bindTexture(e,h.__webglTexture),R(e,l,p),F(c.__webglFramebuffer,t,l,36064,e),b(l,p)&&x(e),n.unbindTexture()}t.depthBuffer&&Q(t)},this.updateRenderTargetMipmap=function(e){const t=E(e)||a,r=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let s=0,o=r.length;s\u003Co;s++){const o=r[s];if(b(o,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,r=i.get(o).__webglTexture;n.bindTexture(t,r),x(t),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(a&&t.samples>0&&!1===N(t)){const r=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],s=t.width,o=t.height;let a=16384;const l=[],c=t.stencilBuffer?33306:36096,h=i.get(t),u=!0===t.isWebGLMultipleRenderTargets;if(u)for(let t=0;t\u003Cr.length;t++)n.bindFramebuffer(36160,h.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+t,36161,null),n.bindFramebuffer(36160,h.__webglFramebuffer),e.framebufferTexture2D(36009,36064+t,3553,null,0);n.bindFramebuffer(36008,h.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,h.__webglFramebuffer);for(let n=0;n\u003Cr.length;n++){l.push(36064+n),t.depthBuffer&&l.push(c);const d=void 0!==h.__ignoreDepthValues&&h.__ignoreDepthValues;if(!1===d&&(t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024)),u&&e.framebufferRenderbuffer(36008,36064,36161,h.__webglColorRenderbuffer[n]),!0===d&&(e.invalidateFramebuffer(36008,[c]),e.invalidateFramebuffer(36009,[c])),u){const t=i.get(r[n]).__webglTexture;e.framebufferTexture2D(36009,36064,3553,t,0)}e.blitFramebuffer(0,0,s,o,0,0,s,o,a,9728),p&&e.invalidateFramebuffer(36008,l)}if(n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,null),u)for(let t=0;t\u003Cr.length;t++){n.bindFramebuffer(36160,h.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+t,36161,h.__webglColorRenderbuffer[t]);const s=i.get(r[t]).__webglTexture;n.bindFramebuffer(36160,h.__webglFramebuffer),e.framebufferTexture2D(36009,36064+t,3553,s,0)}n.bindFramebuffer(36009,h.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=Q,this.setupFrameBufferTexture=F,this.useMultisampledRTT=N}function Za(e,t,n){const i=n.isWebGL2;return{convert:function(n,r=null){let s;if(n===we)return 5121;if(n===Le)return 32819;if(n===De)return 32820;if(n===Ce)return 5120;if(n===Me)return 5122;if(n===_e)return 5123;if(n===Ie)return 5124;if(n===Be)return 5125;if(n===Se)return 5126;if(n===Te)return i?5131:(s=t.get(\"OES_texture_half_float\"),null!==s?s.HALF_FLOAT_OES:null);if(n===Pe)return 6406;if(n===Fe)return 6408;if(n===Oe)return 6409;if(n===Qe)return 6410;if(n===Ue)return 6402;if(n===Ne)return 34041;if(n===ke)return console.warn(\"THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228\"),6408;if(n===fn)return s=t.get(\"EXT_sRGB\"),null!==s?s.SRGB_ALPHA_EXT:null;if(n===Ge)return 6403;if(n===ze)return 36244;if(n===He)return 33319;if(n===Ve)return 33320;if(n===We)return 36249;if(n===je||n===qe||n===Ye||n===Xe)if(r===Rt){if(s=t.get(\"WEBGL_compressed_texture_s3tc_srgb\"),null===s)return null;if(n===je)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===qe)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Ye)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Xe)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(s=t.get(\"WEBGL_compressed_texture_s3tc\"),null===s)return null;if(n===je)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===qe)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Ye)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Xe)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===Je||n===Ke||n===Ze||n===$e){if(s=t.get(\"WEBGL_compressed_texture_pvrtc\"),null===s)return null;if(n===Je)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Ke)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Ze)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===$e)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===et)return s=t.get(\"WEBGL_compressed_texture_etc1\"),null!==s?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===tt||n===nt){if(s=t.get(\"WEBGL_compressed_texture_etc\"),null===s)return null;if(n===tt)return r===Rt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===nt)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}if(n===it||n===rt||n===st||n===ot||n===at||n===lt||n===ct||n===ht||n===ut||n===dt||n===pt||n===At||n===ft||n===mt){if(s=t.get(\"WEBGL_compressed_texture_astc\"),null===s)return null;if(n===it)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===rt)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===st)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ot)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===at)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===lt)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ct)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ht)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ut)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===dt)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===pt)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===At)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===ft)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===mt)return r===Rt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===gt){if(s=t.get(\"EXT_texture_compression_bptc\"),null===s)return null;if(n===gt)return r===Rt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT}return n===Re?i?34042:(s=t.get(\"WEBGL_depth_texture\"),null!==s?s.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class $a extends hr{constructor(){super(),this.isGroup=!0,this.type=\"Group\"}}class el extends vs{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}var tl=new ci,nl=new ci;function il(e){var t,n,i=this,r=null,s=null,o=null,a=[],l=new Ui,c=new Ui,h=1,u=\"local-floor\";\"undefined\"!=typeof window&&\"VRFrameData\"in window&&(s=new window.VRFrameData,window.addEventListener(\"vrdisplaypresentchange\",E,!1));var d=new Ui,p=new li,A=new ci,f=new vs;f.viewport=new ti,f.layers.enable(1);var m=new vs;m.viewport=new ti,m.layers.enable(2);var g=new el([f,m]);g.layers.enable(1),g.layers.enable(2);var v,y=new Ln;function E(){if(i.isPresenting=null!==r&&!0===r.isPresenting){var s=r.getEyeParameters(\"left\");t=2*s.renderWidth*h,n=s.renderHeight*h,v=e.getPixelRatio(),e.getSize(y),e.setDrawingBufferSize(t,n,1),f.viewport.set(0,0,t/2,n),m.viewport.set(t/2,0,t/2,n),M.start(),i.dispatchEvent({type:\"sessionstart\"})}else i.enabled&&e.setDrawingBufferSize(y.width,y.height,v),M.stop(),i.dispatchEvent({type:\"sessionend\"})}var b=[],x=[];function w(e){for(var t=navigator.getGamepads&&navigator.getGamepads(),n=0,i=t.length;n\u003Ci;n++){var r=t[n];if(r&&(\"Daydream Controller\"===r.id||\"Gear VR Controller\"===r.id||\"Oculus Go Controller\"===r.id||\"OpenVR Gamepad\"===r.id||r.id.startsWith(\"Oculus Touch\")||r.id.startsWith(\"HTC Vive Focus\")||r.id.startsWith(\"Spatial Controller\"))){var s=r.hand;if(0===e&&(\"\"===s||\"right\"===s))return r;if(1===e&&\"left\"===s)return r}}}function C(e,i){null!==i&&4===i.length&&e.set(i[0]*t,i[1]*n,i[2]*t,i[3]*n)}this.enabled=!1,this.getController=function(e){var t=a[e];return void 0===t&&((t=new $a).matrixAutoUpdate=!1,t.visible=!1,a[e]=t),t},this.getDevice=function(){return r},this.setDevice=function(e){void 0!==e&&(r=e),M.setContext(e)},this.setFramebufferScaleFactor=function(e){h=e},this.setReferenceSpaceType=function(e){u=e},this.setPoseTarget=function(e){void 0!==e&&(o=e)},this.cameraAutoUpdate=!0,this.updateCamera=function(e){var t=\"local-floor\"===u?1.6:0;if(r.depthNear=e.near,r.depthFar=e.far,r.getFrameData(s),\"local-floor\"===u){var n=r.stageParameters;n?l.fromArray(n.sittingToStandingTransform):l.makeTranslation(0,t,0)}var i=s.pose,h=null!==o?o:e;h.matrix.copy(l),h.matrix.decompose(h.position,h.quaternion,h.scale),null!==i.orientation&&(p.fromArray(i.orientation),h.quaternion.multiply(p)),null!==i.position&&(p.setFromRotationMatrix(l),A.fromArray(i.position),A.applyQuaternion(p),h.position.add(A)),h.updateMatrixWorld();for(var v=h.children,y=0,E=v.length;y\u003CE;y++)v[y].updateMatrixWorld(!0);f.near=e.near,m.near=e.near,f.far=e.far,m.far=e.far,f.matrixWorldInverse.fromArray(s.leftViewMatrix),m.matrixWorldInverse.fromArray(s.rightViewMatrix),c.copy(l).invert(),\"local-floor\"===u&&(f.matrixWorldInverse.multiply(c),m.matrixWorldInverse.multiply(c));var M=h.parent;null!==M&&(d.copy(M.matrixWorld).invert(),f.matrixWorldInverse.multiply(d),m.matrixWorldInverse.multiply(d)),f.matrixWorld.copy(f.matrixWorldInverse).invert(),m.matrixWorld.copy(m.matrixWorldInverse).invert(),f.projectionMatrix.fromArray(s.leftProjectionMatrix),m.projectionMatrix.fromArray(s.rightProjectionMatrix),function(e,t,n){tl.setFromMatrixPosition(t.matrixWorld),nl.setFromMatrixPosition(n.matrixWorld);var i=tl.distanceTo(nl),r=t.projectionMatrix.elements,s=n.projectionMatrix.elements,o=r[14]/(r[10]-1),a=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],h=(r[8]-1)/r[0],u=(s[8]+1)/s[0],d=o*h,p=o*u,A=i/(-h+u),f=A*-h;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(f),e.translateZ(A),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();var m=o+A,g=a+A,v=d-f,y=p+(i-f),E=l*a/g*m,b=c*a/g*m;e.projectionMatrix.makePerspective(v,y,E,b,m,g)}(g,f,m);var _=r.getLayers();if(_.length){var I=_[0];C(f.viewport,I.leftBounds),C(m.viewport,I.rightBounds)}return function(){for(var e=0;e\u003Ca.length;e++){var t=a[e],n=w(e);if(void 0!==n&&void 0!==n.pose){if(null===n.pose)return;var i=n.pose;!1===i.hasPosition&&t.position.set(.2,-.6,-.05),null!==i.position&&t.position.fromArray(i.position),null!==i.orientation&&t.quaternion.fromArray(i.orientation),t.matrix.compose(t.position,t.quaternion,t.scale),t.matrix.premultiply(l),t.matrix.decompose(t.position,t.quaternion,t.scale),t.matrixWorldNeedsUpdate=!0,t.visible=!0;var r=\"Daydream Controller\"===n.id?0:1;void 0===b[e]&&(b[e]=!1),b[e]!==n.buttons[r].pressed&&(b[e]=n.buttons[r].pressed,!0===b[e]?t.dispatchEvent({type:\"selectstart\"}):(t.dispatchEvent({type:\"selectend\"}),t.dispatchEvent({type:\"select\"}))),r=2,void 0===x[e]&&(x[e]=!1),void 0!==n.buttons[r]&&x[e]!==n.buttons[r].pressed&&(x[e]=n.buttons[r].pressed,!0===x[e]?t.dispatchEvent({type:\"squeezestart\"}):(t.dispatchEvent({type:\"squeezeend\"}),t.dispatchEvent({type:\"squeeze\"})))}else t.visible=!1}}(),g},this.getCamera=function(){return g},this.getFoveation=function(){return 1},this.setFoveation=function(e){1!==e&&console.warn(\"THREE.WebVRManager: setFoveation() not used in WebVR.\")},this.getStandingMatrix=function(){return l},this.isPresenting=!1;var M=new Ts;this.setAnimationLoop=function(e){M.setAnimationLoop(e),this.isPresenting&&M.start()},this.submitFrame=function(){this.isPresenting&&r.submitFrame()},this.dispose=function(){\"undefined\"!=typeof window&&window.removeEventListener(\"vrdisplaypresentchange\",E)},this.setFrameOfReferenceType=function(){console.warn(\"THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.\")}}Object.assign(il.prototype,{addEventListener:mn.prototype.addEventListener,hasEventListener:mn.prototype.hasEventListener,removeEventListener:mn.prototype.removeEventListener,dispatchEvent:mn.prototype.dispatchEvent});const rl={type:\"move\"};class sl{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new $a,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new $a,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ci,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ci),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new $a,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ci,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ci),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:\"connected\",data:e}),this}disconnect(e){return this.dispatchEvent({type:\"disconnected\",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,s=null;const o=this._targetRay,a=this._grip,l=this._hand;if(e&&\"visible-blurred\"!==t.session.visibilityState){if(l&&e.hand){s=!0;for(const i of e.hand.values()){const e=t.getJointPose(i,n),r=this._getHandJoint(l,i);null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=e.radius),r.visible=null!==e}const i=l.joints[\"index-finger-tip\"],r=l.joints[\"thumb-tip\"],o=i.position.distanceTo(r.position),a=.02,c=.005;l.inputState.pinching&&o>a+c?(l.inputState.pinching=!1,this.dispatchEvent({type:\"pinchend\",handedness:e.handedness,target:this})):!l.inputState.pinching&&o\u003C=a-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:\"pinchstart\",handedness:e.handedness,target:this}))}else null!==a&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1));null!==o&&(i=t.getPose(e.targetRaySpace,n),null===i&&null!==r&&(i=r),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(rl)))}return null!==o&&(o.visible=null!==i),null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new $a;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class ol extends ei{constructor(e,t,n,i,r,s,o,a,l,c){if((c=void 0!==c?c:Ue)!==Ue&&c!==Ne)throw new Error(\"DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat\");void 0===n&&c===Ue&&(n=Be),void 0===n&&c===Ne&&(n=Re),super(null,i,r,s,o,a,c,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==o?o:pe,this.minFilter=void 0!==a?a:pe,this.flipY=!1,this.generateMipmaps=!1}}class al extends mn{constructor(e,t){super();const n=this;let i=null,r=1;var s=null;let o=null,a=\"local-floor\",l=null,c=null;var h=[];let u=null,d=null,p=null,A=null;const f=t.getContextAttributes();let m=null,g=null;const v=[],y=[],E=new Set,b=new Map,x=new vs;x.layers.enable(1),x.viewport=new ti;const w=new vs;w.layers.enable(2),w.viewport=new ti;const C=[x,w],M=new el;M.layers.enable(1),M.layers.enable(2);let _=null,I=null;function B(e){const t=y.indexOf(e.inputSource);if(-1===t)return;const n=v[t];void 0!==n&&n.dispatchEvent({type:e.type,data:e.inputSource})}function S(){i.removeEventListener(\"select\",B),i.removeEventListener(\"selectstart\",B),i.removeEventListener(\"selectend\",B),i.removeEventListener(\"squeeze\",B),i.removeEventListener(\"squeezestart\",B),i.removeEventListener(\"squeezeend\",B),i.removeEventListener(\"end\",S),i.removeEventListener(\"inputsourceschange\",T);for(let e=0;e\u003Cv.length;e++){const t=y[e];null!==t&&(y[e]=null,v[e].disconnect(t))}_=null,I=null,e.setRenderTarget(m),p=null,d=null,u=null,i=null,g=null,k.stop(),n.isPresenting=!1,n.dispatchEvent({type:\"sessionend\"})}function T(e){for(let t=0;t\u003Ce.removed.length;t++){const n=e.removed[t],i=y.indexOf(n);i>=0&&(y[i]=null,v[i].disconnect(n))}for(let t=0;t\u003Ce.added.length;t++){const n=e.added[t];let i=y.indexOf(n);if(-1===i){for(let e=0;e\u003Cv.length;e++){if(e>=y.length){y.push(n),i=e;break}if(null===y[e]){y[e]=n,i=e;break}}if(-1===i)break}const r=v[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.layersEnabled=!1,this.enabled=!1,this.isPresenting=!1,this.getCameraPose=function(){return c},this.getController=function(e){let t=v[e];return void 0===t&&(t=new sl,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return void 0===t&&(t=new sl,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return void 0===t&&(t=new sl,v[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){r=e,!0===n.isPresenting&&console.warn(\"THREE.WebXRManager: Cannot change framebuffer scale while presenting.\")},this.setReferenceSpaceType=function(e){a=e,!0===n.isPresenting&&console.warn(\"THREE.WebXRManager: Cannot change reference space type while presenting.\")},this.getReferenceSpace=function(){return l||o},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==d?d:p},this.getBinding=function(){return u},this.getFrame=function(){return A},this.getSession=function(){return i},this.setSession=async function(s){if(i=s,null!==i){if(m=e.getRenderTarget(),i.addEventListener(\"select\",B),i.addEventListener(\"selectstart\",B),i.addEventListener(\"selectend\",B),i.addEventListener(\"squeeze\",B),i.addEventListener(\"squeezestart\",B),i.addEventListener(\"squeezeend\",B),i.addEventListener(\"end\",S),i.addEventListener(\"inputsourceschange\",T),!0!==f.xrCompatible&&await t.makeXRCompatible(),void 0===i.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==i.renderState.layers||f.antialias,alpha:f.alpha,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:r};p=new XRWebGLLayer(i,t,n),i.updateRenderState({baseLayer:p}),g=new ni(p.framebufferWidth,p.framebufferHeight,{format:Fe,type:we,encoding:e.outputEncoding,stencilBuffer:f.stencil})}else{let n=null,s=null,o=null;f.depth&&(o=f.stencil?35056:33190,n=f.stencil?Ne:Ue,s=f.stencil?Re:Be);const a={colorFormat:32856,depthFormat:o,scaleFactor:r};u=new XRWebGLBinding(i,t),d=u.createProjectionLayer(a),i.updateRenderState({layers:[d]}),g=new ni(d.textureWidth,d.textureHeight,{format:Fe,type:we,depthTexture:new ol(d.textureWidth,d.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,encoding:e.outputEncoding,samples:f.antialias?4:0}),e.properties.get(g).__ignoreDepthValues=d.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(1),l=null,o=await i.requestReferenceSpace(a),k.setContext(i),k.start(),n.isPresenting=!0,n.dispatchEvent({type:\"sessionstart\"})}},this.addLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&i&&(h.push(e),this.updateLayers())},this.removeLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&i&&(h.splice(h.indexOf(e),1),this.updateLayers())},this.updateLayers=function(){var e=h.map((function(e){return e}));e.unshift(i.renderState.layers[0]),i.updateRenderState({layers:e})};const L=new ci,D=new ci;function R(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.setPoseTarget=function(e){void 0!==e&&(s=e)},this.updateCamera=function(e){if(null===i)return;M.near=w.near=x.near=e.near,M.far=w.far=x.far=e.far,_===M.near&&I===M.far||(i.updateRenderState({depthNear:M.near,depthFar:M.far}),_=M.near,I=M.far);const t=M.cameras;var n=s||e;const r=n.parent;R(M,r);for(let e=0;e\u003Ct.length;e++)R(t[e],r);M.matrixWorld.decompose(M.position,M.quaternion,M.scale),n.matrixWorld.copy(M.matrixWorld),n.matrix.copy(M.matrix),n.matrix.decompose(n.position,n.quaternion,n.scale);const o=n.children;for(let e=0,t=o.length;e\u003Ct;e++)o[e].updateMatrixWorld(!0);2===t.length?function(e,t,n){L.setFromMatrixPosition(t.matrixWorld),D.setFromMatrixPosition(n.matrixWorld);const i=L.distanceTo(D),r=t.projectionMatrix.elements,s=n.projectionMatrix.elements,o=r[14]/(r[10]-1),a=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],h=(r[8]-1)/r[0],u=(s[8]+1)/s[0],d=o*h,p=o*u,A=i/(-h+u),f=A*-h;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(f),e.translateZ(A),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const m=o+A,g=a+A,v=d-f,y=p+(i-f),E=l*a/g*m,b=c*a/g*m;e.projectionMatrix.makePerspective(v,y,E,b,m,g)}(M,x,w):M.projectionMatrix.copy(x.projectionMatrix)},this.getCamera=function(){return M},this.getFoveation=function(){return null!==d?d.fixedFoveation:null!==p?p.fixedFoveation:void 0},this.setFoveation=function(e){null!==d&&(d.fixedFoveation=e),null!==p&&void 0!==p.fixedFoveation&&(p.fixedFoveation=e)},this.getPlanes=function(){return E};let P=null;const k=new Ts;k.setAnimationLoop((function(t,i){if(c=i.getViewerPose(l||o),A=i,null!==c){const t=c.views;null!==p&&(e.setRenderTargetFramebuffer(g,p.framebuffer),e.setRenderTarget(g));let n=!1;t.length!==M.cameras.length&&(M.cameras.length=0,n=!0);for(let i=0;i\u003Ct.length;i++){const r=t[i];let s=null;if(null!==p)s=p.getViewport(r);else{const t=u.getViewSubImage(d,r);s=t.viewport,0===i&&(e.setRenderTargetTextures(g,t.colorTexture,d.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(g))}let o=C[i];void 0===o&&(o=new vs,o.layers.enable(i),o.viewport=new ti,C[i]=o),o.matrix.fromArray(r.transform.matrix),o.projectionMatrix.fromArray(r.projectionMatrix),o.viewport.set(s.x,s.y,s.width,s.height),0===i&&M.matrix.copy(o.matrix),!0===n&&M.cameras.push(o)}}for(let e=0;e\u003Cv.length;e++){const t=y[e],n=v[e];null!==t&&void 0!==n&&n.update(t,i,l||o)}if(P&&P(t,i),i.detectedPlanes){n.dispatchEvent({type:\"planesdetected\",data:i.detectedPlanes});let e=null;for(const t of E)i.detectedPlanes.has(t)||(null===e&&(e=[]),e.push(t));if(null!==e)for(const t of e)E.delete(t),b.delete(t),n.dispatchEvent({type:\"planeremoved\",data:t});for(const e of i.detectedPlanes)if(E.has(e)){const t=b.get(e);e.lastChangedTime>t&&(b.set(e,e.lastChangedTime),n.dispatchEvent({type:\"planechanged\",data:e}))}else E.add(e),b.set(e,i.lastChangedTime),n.dispatchEvent({type:\"planeadded\",data:e})}A=null})),this.setAnimationLoop=function(e){P=e},this.dispose=function(){}}}function ll(e,t){function n(n,i){n.opacity.value=i.opacity,i.color&&n.diffuse.value.copy(i.color),i.emissive&&n.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(n.map.value=i.map),i.alphaMap&&(n.alphaMap.value=i.alphaMap),i.bumpMap&&(n.bumpMap.value=i.bumpMap,n.bumpScale.value=i.bumpScale,i.side===g&&(n.bumpScale.value*=-1)),i.displacementMap&&(n.displacementMap.value=i.displacementMap,n.displacementScale.value=i.displacementScale,n.displacementBias.value=i.displacementBias),i.emissiveMap&&(n.emissiveMap.value=i.emissiveMap),i.normalMap&&(n.normalMap.value=i.normalMap,n.normalScale.value.copy(i.normalScale),i.side===g&&n.normalScale.value.negate()),i.specularMap&&(n.specularMap.value=i.specularMap),i.alphaTest>0&&(n.alphaTest.value=i.alphaTest);const r=t.get(i).envMap;if(r&&(n.envMap.value=r,n.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,n.reflectivity.value=i.reflectivity,n.ior.value=i.ior,n.refractionRatio.value=i.refractionRatio),i.lightMap){n.lightMap.value=i.lightMap;const t=!0!==e.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=i.lightMapIntensity*t}let s,o;i.aoMap&&(n.aoMap.value=i.aoMap,n.aoMapIntensity.value=i.aoMapIntensity),i.map?s=i.map:i.specularMap?s=i.specularMap:i.displacementMap?s=i.displacementMap:i.normalMap?s=i.normalMap:i.bumpMap?s=i.bumpMap:i.roughnessMap?s=i.roughnessMap:i.metalnessMap?s=i.metalnessMap:i.alphaMap?s=i.alphaMap:i.emissiveMap?s=i.emissiveMap:i.clearcoatMap?s=i.clearcoatMap:i.clearcoatNormalMap?s=i.clearcoatNormalMap:i.clearcoatRoughnessMap?s=i.clearcoatRoughnessMap:i.iridescenceMap?s=i.iridescenceMap:i.iridescenceThicknessMap?s=i.iridescenceThicknessMap:i.specularIntensityMap?s=i.specularIntensityMap:i.specularColorMap?s=i.specularColorMap:i.transmissionMap?s=i.transmissionMap:i.thicknessMap?s=i.thicknessMap:i.sheenColorMap?s=i.sheenColorMap:i.sheenRoughnessMap&&(s=i.sheenRoughnessMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),n.uvTransform.value.copy(s.matrix)),i.aoMap?o=i.aoMap:i.lightMap&&(o=i.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),n.uv2Transform.value.copy(o.matrix))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,As(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,r,s,o){i.isMeshBasicMaterial||i.isMeshLambertMaterial?n(e,i):i.isMeshToonMaterial?(n(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(n(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(n(e,i),function(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap);t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap)),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===g&&e.clearcoatNormalScale.value.negate())),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap)),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,i,o)):i.isMeshMatcapMaterial?(n(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?n(e,i):i.isMeshDistanceMaterial?(n(e,i),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,i)):i.isMeshNormalMaterial?n(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,n,i){let r;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*i,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?r=t.map:t.alphaMap&&(r=t.alphaMap),void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix))}(e,i,r,s):i.isSpriteMaterial?function(e,t){let n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function cl(e,t,n,i){let r={},s={},o=[];const a=n.isWebGL2?e.getParameter(35375):0;function l(e,t,n){const i=e.value;if(void 0===n[t])return n[t]=\"number\"==typeof i?i:i.clone(),!0;if(\"number\"==typeof i){if(n[t]!==i)return n[t]=i,!0}else{const e=n[t];if(!1===e.equals(i))return e.copy(i),!0}return!1}function c(e){const t=e.value,n={boundary:0,storage:0};return\"number\"==typeof t?(n.boundary=4,n.storage=4):t.isVector2?(n.boundary=8,n.storage=8):t.isVector3||t.isColor?(n.boundary=16,n.storage=12):t.isVector4?(n.boundary=16,n.storage=16):t.isMatrix3?(n.boundary=48,n.storage=48):t.isMatrix4?(n.boundary=64,n.storage=64):t.isTexture?console.warn(\"THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.\"):console.warn(\"THREE.WebGLRenderer: Unsupported uniform value type.\",t),n}function h(t){const n=t.target;n.removeEventListener(\"dispose\",h);const i=o.indexOf(n.__bindingPointIndex);o.splice(i,1),e.deleteBuffer(r[n.id]),delete r[n.id],delete s[n.id]}return{bind:function(e,t){const n=t.program;i.uniformBlockBinding(e,n)},update:function(n,u){let d=r[n.id];void 0===d&&(function(e){const t=e.uniforms;let n=0;let i=0;for(let e=0,r=t.length;e\u003Cr;e++){const r=t[e],s=c(r);r.__data=new Float32Array(s.storage/Float32Array.BYTES_PER_ELEMENT),r.__offset=n,e>0&&(i=n%16,0!==i&&16-i-s.boundary\u003C0&&(n+=16-i,r.__offset=n)),n+=s.storage}i=n%16,i>0&&(n+=16-i),e.__size=n,e.__cache={}}(n),d=function(t){const n=function(){for(let e=0;e\u003Ca;e++)if(-1===o.indexOf(e))return o.push(e),e;return console.error(\"THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.\"),0}();t.__bindingPointIndex=n;const i=e.createBuffer(),r=t.__size,s=t.usage;return e.bindBuffer(35345,i),e.bufferData(35345,r,s),e.bindBuffer(35345,null),e.bindBufferBase(35345,n,i),i}(n),r[n.id]=d,n.addEventListener(\"dispose\",h));const p=u.program;i.updateUBOMapping(n,p);const A=t.render.frame;s[n.id]!==A&&(function(t){const n=r[t.id],i=t.uniforms,s=t.__cache;e.bindBuffer(35345,n);for(let t=0,n=i.length;t\u003Cn;t++){const n=i[t];if(!0===l(n,t,s)){const t=n.value,i=n.__offset;\"number\"==typeof t?(n.__data[0]=t,e.bufferSubData(35345,i,n.__data)):(n.value.isMatrix3?(n.__data[0]=n.value.elements[0],n.__data[1]=n.value.elements[1],n.__data[2]=n.value.elements[2],n.__data[3]=n.value.elements[0],n.__data[4]=n.value.elements[3],n.__data[5]=n.value.elements[4],n.__data[6]=n.value.elements[5],n.__data[7]=n.value.elements[0],n.__data[8]=n.value.elements[6],n.__data[9]=n.value.elements[7],n.__data[10]=n.value.elements[8],n.__data[11]=n.value.elements[0]):t.toArray(n.__data),e.bufferSubData(35345,i,n.__data))}}e.bindBuffer(35345,null)}(n),s[n.id]=A)},dispose:function(){for(const t in r)e.deleteBuffer(r[t]);o=[],r={},s={}}}}function hl(e={}){this.isWebGLRenderer=!0;const t=void 0!==e.canvas?e.canvas:function(){const e=On(\"canvas\");return e.style.display=\"block\",e}(),n=void 0!==e.context?e.context:null,i=void 0===e.depth||e.depth,r=void 0===e.stencil||e.stencil,o=void 0!==e.antialias&&e.antialias,a=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:\"default\",h=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let u;u=null!==n?n.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;let d=null,p=null;const A=[],f=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Dt,this.physicallyCorrectLights=!1,this.toneMapping=Z,this.toneMappingExposure=1;const y=this;let E=!1,b=0,x=0,w=null,C=-1,M=null;const _=new ti,I=new ti;let B=null,S=t.width,T=t.height,L=1,D=null,R=null;const P=new ti(0,0,S,T),k=new ti(0,0,S,T);let F=!1;const O=new Ss;let Q=!1,U=!1,N=null;const G=new Ui,z=new Ln,H=new ci,V={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function W(){return null===w?L:1}let j,q,Y,X,J,K,$,ee,te,ne,ie,re,se,oe,ae,le,ce,he,ue,de,pe,Ae,fe,me,ge=n;function ve(e,n){for(let i=0;i\u003Ce.length;i++){const r=e[i],s=t.getContext(r,n);if(null!==s)return s}return null}try{const e={alpha:!0,depth:i,stencil:r,antialias:o,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:h};if(\"setAttribute\"in t&&t.setAttribute(\"data-engine\",`three.js r${s}`),t.addEventListener(\"webglcontextlost\",xe,!1),t.addEventListener(\"webglcontextrestored\",Ce,!1),t.addEventListener(\"webglcontextcreationerror\",Me,!1),null===ge){const t=[\"webgl2\",\"webgl\",\"experimental-webgl\"];if(!0===y.isWebGL1Renderer&&t.shift(),ge=ve(t,e),null===ge)throw ve(t)?new Error(\"Error creating WebGL context with your selected attributes.\"):new Error(\"Error creating WebGL context.\")}void 0===ge.getShaderPrecisionFormat&&(ge.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error(\"THREE.WebGLRenderer: \"+e.message),e}function ye(){j=new io(ge),q=new Ns(ge,j,e),j.init(q),Ae=new Za(ge,j,q),Y=new Ja(ge,j,q),X=new oo(ge),J=new Fa,K=new Ka(ge,j,Y,J,q,Ae,X),$=new zs(y),ee=new no(y),te=new Ls(ge,q),fe=new Qs(ge,j,te,q),ne=new ro(ge,te,X,fe),ie=new ho(ge,ne,te,X),ue=new co(ge,q,K),le=new Gs(J),re=new ka(y,$,ee,j,q,fe,le),se=new ll(y,J),oe=new Na,ae=new ja(j,q),he=new Os(y,$,ee,Y,ie,u,a),ce=new Xa(y,ie,q),me=new cl(ge,X,q,Y),de=new Us(ge,j,X,q),pe=new so(ge,j,X,q),X.programs=re.programs,y.capabilities=q,y.extensions=j,y.properties=J,y.renderLists=oe,y.shadowMap=ce,y.state=Y,y.info=X}ye();const Ee=\"undefined\"!=typeof navigator&&\"xr\"in navigator?new al(y,ge):new il(y);function xe(e){e.preventDefault(),console.log(\"THREE.WebGLRenderer: Context Lost.\"),E=!0}function Ce(){console.log(\"THREE.WebGLRenderer: Context Restored.\"),E=!1;const e=X.autoReset,t=ce.enabled,n=ce.autoUpdate,i=ce.needsUpdate,r=ce.type;ye(),X.autoReset=e,ce.enabled=t,ce.autoUpdate=n,ce.needsUpdate=i,ce.type=r}function Me(e){console.error(\"THREE.WebGLRenderer: A WebGL context could not be created. Reason: \",e.statusMessage)}function _e(e){const t=e.target;t.removeEventListener(\"dispose\",_e),function(e){(function(e){const t=J.get(e).programs;void 0!==t&&(t.forEach((function(e){re.releaseProgram(e)})),e.isShaderMaterial&&re.releaseShaderCache(e))})(e),J.remove(e)}(t)}this.xr=Ee,this.getContext=function(){return ge},this.getContextAttributes=function(){return ge.getContextAttributes()},this.forceContextLoss=function(){const e=j.get(\"WEBGL_lose_context\");e&&e.loseContext()},this.forceContextRestore=function(){const e=j.get(\"WEBGL_lose_context\");e&&e.restoreContext()},this.getPixelRatio=function(){return L},this.setPixelRatio=function(e){void 0!==e&&(L=e,this.setSize(S,T,!1))},this.getSize=function(e){return e.set(S,T)},this.setSize=function(e,n,i){Ee.isPresenting?console.warn(\"THREE.WebGLRenderer: Can't change size while VR device is presenting.\"):(S=e,T=n,t.width=Math.floor(e*L),t.height=Math.floor(n*L),!1!==i&&(t.style.width=e+\"px\",t.style.height=n+\"px\"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(S*L,T*L).floor()},this.setDrawingBufferSize=function(e,n,i){S=e,T=n,L=i,t.width=Math.floor(e*i),t.height=Math.floor(n*i),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(_)},this.getViewport=function(e){return e.copy(P)},this.setViewport=function(e,t,n,i){e.isVector4?P.set(e.x,e.y,e.z,e.w):P.set(e,t,n,i),Y.viewport(_.copy(P).multiplyScalar(L).floor())},this.getScissor=function(e){return e.copy(k)},this.setScissor=function(e,t,n,i){e.isVector4?k.set(e.x,e.y,e.z,e.w):k.set(e,t,n,i),Y.scissor(I.copy(k).multiplyScalar(L).floor())},this.getScissorTest=function(){return F},this.setScissorTest=function(e){Y.setScissorTest(F=e)},this.setOpaqueSort=function(e){D=e},this.setTransparentSort=function(e){R=e},this.getClearColor=function(e){return e.copy(he.getClearColor())},this.setClearColor=function(){he.setClearColor.apply(he,arguments)},this.getClearAlpha=function(){return he.getClearAlpha()},this.setClearAlpha=function(){he.setClearAlpha.apply(he,arguments)},this.clear=function(e=!0,t=!0,n=!0){let i=0;e&&(i|=16384),t&&(i|=256),n&&(i|=1024),ge.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener(\"webglcontextlost\",xe,!1),t.removeEventListener(\"webglcontextrestored\",Ce,!1),t.removeEventListener(\"webglcontextcreationerror\",Me,!1),oe.dispose(),ae.dispose(),J.dispose(),$.dispose(),ee.dispose(),ie.dispose(),fe.dispose(),me.dispose(),re.dispose(),Ee.dispose(),Ee.removeEventListener(\"sessionstart\",Be),Ee.removeEventListener(\"sessionend\",Le),N&&(N.dispose(),N=null),De.stop()},this.renderBufferDirect=function(e,t,n,i,r,s){null===t&&(t=V);const o=r.isMesh&&r.matrixWorld.determinant()\u003C0,a=function(e,t,n,i,r){!0!==t.isScene&&(t=V),K.resetTextureUnits();const s=t.fog,o=i.isMeshStandardMaterial?t.environment:null,a=null===w?y.outputEncoding:!0===w.isXRRenderTarget?w.texture.encoding:Dt,l=(i.isMeshStandardMaterial?ee:$).get(i.envMap||o),c=!0===i.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,h=!!i.normalMap&&!!n.attributes.tangent,u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,A=!!n.morphAttributes.color,f=i.toneMapped?y.toneMapping:Z,m=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,g=void 0!==m?m.length:0,v=J.get(i),E=p.state.lights;if(!0===Q&&(!0===U||e!==M)){const t=e===M&&i.id===C;le.setState(i,e,t)}let b=!1;i.version===v.__version?v.needsLights&&v.lightsStateVersion!==E.state.version||v.outputEncoding!==a||r.isInstancedMesh&&!1===v.instancing?b=!0:r.isInstancedMesh||!0!==v.instancing?r.isSkinnedMesh&&!1===v.skinning?b=!0:r.isSkinnedMesh||!0!==v.skinning?v.envMap!==l||!0===i.fog&&v.fog!==s?b=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===le.numPlanes&&v.numIntersection===le.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==h||v.morphTargets!==u||v.morphNormals!==d||v.morphColors!==A||v.toneMapping!==f||!0===q.isWebGL2&&v.morphTargetsCount!==g)&&(b=!0):b=!0:b=!0:b=!0:(b=!0,v.__version=i.version);let x=v.currentProgram;!0===b&&(x=Qe(i,t,r));let _=!1,I=!1,B=!1;const S=x.getUniforms(),D=v.uniforms;if(Y.useProgram(x.program)&&(_=!0,I=!0,B=!0),i.id!==C&&(C=i.id,I=!0),_||M!==e){if(S.setValue(ge,\"projectionMatrix\",e.projectionMatrix),q.logarithmicDepthBuffer&&S.setValue(ge,\"logDepthBufFC\",2/(Math.log(e.far+1)/Math.LN2)),M!==e&&(M=e,I=!0,B=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshStandardMaterial||i.envMap){const t=S.map.cameraPosition;void 0!==t&&t.setValue(ge,H.setFromMatrixPosition(e.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&S.setValue(ge,\"isOrthographic\",!0===e.isOrthographicCamera),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.isShadowMaterial||r.isSkinnedMesh)&&S.setValue(ge,\"viewMatrix\",e.matrixWorldInverse)}if(r.isSkinnedMesh){S.setOptional(ge,r,\"bindMatrix\"),S.setOptional(ge,r,\"bindMatrixInverse\");const e=r.skeleton;e&&(q.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),S.setValue(ge,\"boneTexture\",e.boneTexture,K),S.setValue(ge,\"boneTextureSize\",e.boneTextureSize)):console.warn(\"THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.\"))}const R=n.morphAttributes;var P,k;if((void 0!==R.position||void 0!==R.normal||void 0!==R.color&&!0===q.isWebGL2)&&ue.update(r,n,i,x),(I||v.receiveShadow!==r.receiveShadow)&&(v.receiveShadow=r.receiveShadow,S.setValue(ge,\"receiveShadow\",r.receiveShadow)),i.isMeshGouraudMaterial&&null!==i.envMap&&(D.envMap.value=l,D.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1),I&&(S.setValue(ge,\"toneMappingExposure\",y.toneMappingExposure),v.needsLights&&(k=B,(P=D).ambientLightColor.needsUpdate=k,P.lightProbe.needsUpdate=k,P.directionalLights.needsUpdate=k,P.directionalLightShadows.needsUpdate=k,P.pointLights.needsUpdate=k,P.pointLightShadows.needsUpdate=k,P.spotLights.needsUpdate=k,P.spotLightShadows.needsUpdate=k,P.rectAreaLights.needsUpdate=k,P.hemisphereLights.needsUpdate=k),s&&!0===i.fog&&se.refreshFogUniforms(D,s),se.refreshMaterialUniforms(D,i,L,T,N),fa.upload(ge,v.uniformsList,D,K)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(fa.upload(ge,v.uniformsList,D,K),i.uniformsNeedUpdate=!1),i.isSpriteMaterial&&S.setValue(ge,\"center\",r.center),S.setValue(ge,\"modelViewMatrix\",r.modelViewMatrix),S.setValue(ge,\"normalMatrix\",r.normalMatrix),S.setValue(ge,\"modelMatrix\",r.matrixWorld),i.isShaderMaterial||i.isRawShaderMaterial){const e=i.uniformsGroups;for(let t=0,n=e.length;t\u003Cn;t++)if(q.isWebGL2){const n=e[t];me.update(n,x),me.bind(n,x)}else console.warn(\"THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.\")}return x}(e,t,n,i,r);Y.setMaterial(i,o);let l=n.index,c=1;!0===i.wireframe&&(l=ne.getWireframeAttribute(n),c=2);const h=n.drawRange,u=n.attributes.position;let d=h.start*c,A=(h.start+h.count)*c;null!==s&&(d=Math.max(d,s.start*c),A=Math.min(A,(s.start+s.count)*c)),null!==l?(d=Math.max(d,0),A=Math.min(A,l.count)):null!=u&&(d=Math.max(d,0),A=Math.min(A,u.count));const f=A-d;if(f\u003C0||f===1/0)return;let m;fe.setup(r,i,a,n,l);let g=de;if(null!==l&&(m=te.get(l),g=pe,g.setIndex(m)),r.isMesh)!0===i.wireframe?(Y.setLineWidth(i.wireframeLinewidth*W()),g.setMode(1)):g.setMode(4);else if(r.isLine){let e=i.linewidth;void 0===e&&(e=1),Y.setLineWidth(e*W()),r.isLineSegments?g.setMode(1):r.isLineLoop?g.setMode(2):g.setMode(3)}else r.isPoints?g.setMode(0):r.isSprite&&g.setMode(4);if(r.isInstancedMesh)g.renderInstances(d,f,r.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);g.renderInstances(d,f,t)}else g.render(d,f)},this.compile=function(e,t){function n(e,t,n){!0===e.transparent&&e.side===v?(e.side=g,e.needsUpdate=!0,Qe(e,t,n),e.side=m,e.needsUpdate=!0,Qe(e,t,n),e.side=v):Qe(e,t,n)}p=ae.get(e),p.init(),f.push(p),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))})),p.setupLights(y.physicallyCorrectLights),e.traverse((function(t){const i=t.material;if(i)if(Array.isArray(i))for(let r=0;r\u003Ci.length;r++)n(i[r],e,t);else n(i,e,t)})),f.pop(),p=null};let Ie=null;function Be(){De.stop()}function Le(){De.start()}const De=new Ts;function Re(e,t,n,i){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)p.pushLight(e),e.castShadow&&p.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||O.intersectsSprite(e)){i&&H.setFromMatrixPosition(e.matrixWorld).applyMatrix4(G);const t=ie.update(e),r=e.material;r.visible&&d.push(e,t,r,n,H.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==X.render.frame&&(e.skeleton.update(),e.skeleton.frame=X.render.frame),!e.frustumCulled||O.intersectsObject(e))){i&&H.setFromMatrixPosition(e.matrixWorld).applyMatrix4(G);const t=ie.update(e),r=e.material;if(Array.isArray(r)){const i=t.groups;for(let s=0,o=i.length;s\u003Co;s++){const o=i[s],a=r[o.materialIndex];a&&a.visible&&d.push(e,t,a,n,H.z,o)}}else r.visible&&d.push(e,t,r,n,H.z,null)}const r=e.children;for(let e=0,s=r.length;e\u003Cs;e++)Re(r[e],t,n,i)}function Pe(e,t,n,i){const r=e.opaque,s=e.transmissive,a=e.transparent;p.setupLightsView(n),s.length>0&&function(e,t,n){const i=q.isWebGL2;null===N&&(N=new ni(1,1,{generateMipmaps:!0,type:j.has(\"EXT_color_buffer_half_float\")?Te:we,minFilter:be,samples:i&&!0===o?4:0})),y.getDrawingBufferSize(z),i?N.setSize(z.x,z.y):N.setSize(In(z.x),In(z.y));const r=y.getRenderTarget();y.setRenderTarget(N),y.clear();const s=y.toneMapping;y.toneMapping=Z,ke(e,t,n),y.toneMapping=s,K.updateMultisampleRenderTarget(N),K.updateRenderTargetMipmap(N),y.setRenderTarget(r)}(r,t,n),i&&Y.viewport(_.copy(i)),r.length>0&&ke(r,t,n),s.length>0&&ke(s,t,n),a.length>0&&ke(a,t,n),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1)}function ke(e,t,n){const i=!0===t.isScene?t.overrideMaterial:null;for(let r=0,s=e.length;r\u003Cs;r++){const s=e[r],o=s.object,a=s.geometry,l=null===i?s.material:i,c=s.group;o.layers.test(n.layers)&&Oe(o,t,n,a,l,c)}}function Oe(e,t,n,i,r,s){e.onBeforeRender(y,t,n,i,r,s),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(y,t,n,i,e,s),!0===r.transparent&&r.side===v?(r.side=g,r.needsUpdate=!0,y.renderBufferDirect(n,t,i,r,e,s),r.side=m,r.needsUpdate=!0,y.renderBufferDirect(n,t,i,r,e,s),r.side=v):y.renderBufferDirect(n,t,i,r,e,s),e.onAfterRender(y,t,n,i,r,s)}function Qe(e,t,n){!0!==t.isScene&&(t=V);const i=J.get(e),r=p.state.lights,s=p.state.shadowsArray,o=r.state.version,a=re.getParameters(e,r.state,s,t,n),l=re.getProgramCacheKey(a);let c=i.programs;i.environment=e.isMeshStandardMaterial?t.environment:null,i.fog=t.fog,i.envMap=(e.isMeshStandardMaterial?ee:$).get(e.envMap||i.environment),void 0===c&&(e.addEventListener(\"dispose\",_e),c=new Map,i.programs=c);let h=c.get(l);if(void 0!==h){if(i.currentProgram===h&&i.lightsStateVersion===o)return Ue(e,a),h}else a.uniforms=re.getUniforms(e),e.onBuild(n,a,y),e.onBeforeCompile(a,y),h=re.acquireProgram(a,l),c.set(l,h),i.uniforms=a.uniforms;const u=i.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=le.uniform),Ue(e,a),i.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),i.lightsStateVersion=o,i.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotLightMatrix.value=r.state.spotLightMatrix,u.spotLightMap.value=r.state.spotLightMap,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix);const d=h.getUniforms(),A=fa.seqWithValue(d.seq,u);return i.currentProgram=h,i.uniformsList=A,h}function Ue(e,t){const n=J.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}var Ne;De.setAnimationLoop((function(e){Ie&&Ie(e)})),\"undefined\"!=typeof self&&De.setContext(self),this.setAnimationLoop=function(e){Ie=e,Ee.setAnimationLoop(e),null===e?De.stop():De.start()},Ee.addEventListener(\"sessionstart\",Be),Ee.addEventListener(\"sessionend\",Le),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error(\"THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.\");if(!0===E)return;!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===Ee.enabled&&!0===Ee.isPresenting&&(!0===Ee.cameraAutoUpdate&&Ee.updateCamera(t),t=Ee.getCamera()),!0===e.isScene&&e.onBeforeRender(y,e,t,w),p=ae.get(e,f.length),p.init(),f.push(p),G.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),O.setFromProjectionMatrix(G),U=this.localClippingEnabled,Q=le.init(this.clippingPlanes,U,t),d=oe.get(e,A.length),d.init(),A.push(d),Re(e,t,0,y.sortObjects),d.finish(),!0===y.sortObjects&&d.sort(D,R),!0===Q&&le.beginShadows();const n=p.state.shadowsArray;if(ce.render(n,e,t),!0===Q&&le.endShadows(),!0===this.info.autoReset&&this.info.reset(),he.render(d,e),p.setupLights(y.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,i=n.length;t\u003Ci;t++){const i=n[t];Pe(d,e,i,i.viewport)}}else Pe(d,e,t);null!==w&&(K.updateMultisampleRenderTarget(w),K.updateRenderTargetMipmap(w)),!0===e.isScene&&e.onAfterRender(y,e,t),Ee.enabled&&Ee.submitFrame&&Ee.submitFrame(),fe.resetDefaultState(),C=-1,M=null,f.pop(),p=f.length>0?f[f.length-1]:null,A.pop(),d=A.length>0?A[A.length-1]:null},this.setTexture2D=(Ne=!1,function(e,t){e&&e.isWebGLRenderTarget&&(Ne||(console.warn(\"THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead.\"),Ne=!0),e=e.texture),K.setTexture2D(e,t)}),this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(e,t,n){J.get(e.texture).__webglTexture=t,J.get(e.depthTexture).__webglTexture=n;const i=J.get(e);i.__hasExternalTextures=!0,i.__hasExternalTextures&&(i.__autoAllocateDepthBuffer=void 0===n,i.__autoAllocateDepthBuffer||!0===j.has(\"WEBGL_multisampled_render_to_texture\")&&(console.warn(\"THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided\"),i.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=J.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){w=e,b=t,x=n;let i=!0,r=null,s=!1,o=!1;if(e){const n=J.get(e);void 0!==n.__useDefaultFramebuffer?(Y.bindFramebuffer(36160,null),i=!1):void 0===n.__webglFramebuffer?K.setupRenderTarget(e):n.__hasExternalTextures&&K.rebindTextures(e,J.get(e.texture).__webglTexture,J.get(e.depthTexture).__webglTexture);const a=e.texture;(a.isData3DTexture||a.isDataArrayTexture||a.isCompressedArrayTexture)&&(o=!0);const l=J.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=l[t],s=!0):r=q.isWebGL2&&e.samples>0&&!1===K.useMultisampledRTT(e)?J.get(e).__webglMultisampledFramebuffer:l,_.copy(e.viewport),I.copy(e.scissor),B=e.scissorTest}else _.copy(P).multiplyScalar(L).floor(),I.copy(k).multiplyScalar(L).floor(),B=F;if(Y.bindFramebuffer(36160,r)&&q.drawBuffers&&i&&Y.drawBuffers(e,r),Y.viewport(_),Y.scissor(I),Y.setScissorTest(B),s){const i=J.get(e.texture);ge.framebufferTexture2D(36160,36064,34069+t,i.__webglTexture,n)}else if(o){const i=J.get(e.texture),r=t||0;ge.framebufferTextureLayer(36160,36064,i.__webglTexture,n||0,r)}C=-1},this.readRenderTargetPixels=function(e,t,n,i,r,s,o){if(!e||!e.isWebGLRenderTarget)return void console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.\");let a=J.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(a=a[o]),a){Y.bindFramebuffer(36160,a);try{const o=e.texture,a=o.format,l=o.type;if(a!==Fe&&Ae.convert(a)!==ge.getParameter(35739))return void console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.\");const c=l===Te&&(j.has(\"EXT_color_buffer_half_float\")||q.isWebGL2&&j.has(\"EXT_color_buffer_float\"));if(!(l===we||Ae.convert(l)===ge.getParameter(35738)||l===Se&&(q.isWebGL2||j.has(\"OES_texture_float\")||j.has(\"WEBGL_color_buffer_float\"))||c))return void console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.\");t>=0&&t\u003C=e.width-i&&n>=0&&n\u003C=e.height-r&&ge.readPixels(t,n,i,r,Ae.convert(a),Ae.convert(l),s)}finally{const e=null!==w?J.get(w).__webglFramebuffer:null;Y.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const i=Math.pow(2,-n),r=Math.floor(t.image.width*i),s=Math.floor(t.image.height*i);K.setTexture2D(t,0),ge.copyTexSubImage2D(3553,n,0,0,e.x,e.y,r,s),Y.unbindTexture()},this.copyTextureToTexture=function(e,t,n,i=0){const r=t.image.width,s=t.image.height,o=Ae.convert(n.format),a=Ae.convert(n.type);K.setTexture2D(n,0),ge.pixelStorei(37440,n.flipY),ge.pixelStorei(37441,n.premultiplyAlpha),ge.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ge.texSubImage2D(3553,i,e.x,e.y,r,s,o,a,t.image.data):t.isCompressedTexture?ge.compressedTexSubImage2D(3553,i,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):ge.texSubImage2D(3553,i,e.x,e.y,o,a,t.image),0===i&&n.generateMipmaps&&ge.generateMipmap(3553),Y.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,i,r=0){if(y.isWebGL1Renderer)return void console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.\");const s=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,a=e.max.z-e.min.z+1,l=Ae.convert(i.format),c=Ae.convert(i.type);let h;if(i.isData3DTexture)K.setTexture3D(i,0),h=32879;else{if(!i.isDataArrayTexture)return void console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.\");K.setTexture2DArray(i,0),h=35866}ge.pixelStorei(37440,i.flipY),ge.pixelStorei(37441,i.premultiplyAlpha),ge.pixelStorei(3317,i.unpackAlignment);const u=ge.getParameter(3314),d=ge.getParameter(32878),p=ge.getParameter(3316),A=ge.getParameter(3315),f=ge.getParameter(32877),m=n.isCompressedTexture?n.mipmaps[0]:n.image;ge.pixelStorei(3314,m.width),ge.pixelStorei(32878,m.height),ge.pixelStorei(3316,e.min.x),ge.pixelStorei(3315,e.min.y),ge.pixelStorei(32877,e.min.z),n.isDataTexture||n.isData3DTexture?ge.texSubImage3D(h,r,t.x,t.y,t.z,s,o,a,l,c,m.data):n.isCompressedArrayTexture?(console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.\"),ge.compressedTexSubImage3D(h,r,t.x,t.y,t.z,s,o,a,l,m.data)):ge.texSubImage3D(h,r,t.x,t.y,t.z,s,o,a,l,c,m),ge.pixelStorei(3314,u),ge.pixelStorei(32878,d),ge.pixelStorei(3316,p),ge.pixelStorei(3315,A),ge.pixelStorei(32877,f),0===r&&i.generateMipmaps&&ge.generateMipmap(h),Y.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?K.setTextureCube(e,0):e.isData3DTexture?K.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?K.setTexture2DArray(e,0):K.setTexture2D(e,0),Y.unbindTexture()},this.resetState=function(){b=0,x=0,w=null,Y.reset(),fe.reset()},\"undefined\"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\",{detail:this}))}class ul extends hl{}ul.prototype.isWebGL1Renderer=!0;class dl{constructor(e,t=25e-5){this.isFogExp2=!0,this.name=\"\",this.color=new Yn(e),this.density=t}clone(){return new dl(this.color,this.density)}toJSON(){return{type:\"FogExp2\",color:this.color.getHex(),density:this.density}}}class pl{constructor(e,t=1,n=1e3){this.isFog=!0,this.name=\"\",this.color=new Yn(e),this.near=t,this.far=n}clone(){return new pl(this.color,this.near,this.far)}toJSON(){return{type:\"Fog\",color:this.color.getHex(),near:this.near,far:this.far}}}class Al extends hr{constructor(){super(),this.isScene=!0,this.type=\"Scene\",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,\"undefined\"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn(\"THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144.\"),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn(\"THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144.\"),this.matrixWorldAutoUpdate=e}}class fl{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=rn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=bn()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i\u003Cr;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=bn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=bn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ml=new ci;class gl{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name=\"\",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t\u003Cn;t++)ml.fromBufferAttribute(this,t),ml.applyMatrix4(e),this.setXYZ(t,ml.x,ml.y,ml.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t\u003Cn;t++)ml.fromBufferAttribute(this,t),ml.applyNormalMatrix(e),this.setXYZ(t,ml.x,ml.y,ml.z);return this}transformDirection(e){for(let t=0,n=this.count;t\u003Cn;t++)ml.fromBufferAttribute(this,t),ml.transformDirection(e),this.setXYZ(t,ml.x,ml.y,ml.z);return this}setX(e,t){return this.normalized&&(t=Sn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Sn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Sn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Sn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Bn(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Bn(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Bn(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Bn(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Sn(t,this.array),n=Sn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Sn(t,this.array),n=Sn(n,this.array),i=Sn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Sn(t,this.array),n=Sn(n,this.array),i=Sn(i,this.array),r=Sn(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(void 0===e){console.log(\"THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.\");const e=[];for(let t=0;t\u003Cthis.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t\u003Cthis.itemSize;t++)e.push(this.data.array[n+t])}return new Ir(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new gl(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log(\"THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.\");const e=[];for(let t=0;t\u003Cthis.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t\u003Cthis.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class vl extends wr{constructor(e){super(),this.isSpriteMaterial=!0,this.type=\"SpriteMaterial\",this.color=new Yn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let yl;const El=new ci,bl=new ci,xl=new ci,wl=new Ln,Cl=new Ln,Ml=new Ui,_l=new ci,Il=new ci,Bl=new ci,Sl=new Ln,Tl=new Ln,Ll=new Ln;class Dl extends hr{constructor(e){if(super(),this.isSprite=!0,this.type=\"Sprite\",void 0===yl){yl=new Wr;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new fl(e,5);yl.setIndex([0,1,2,0,2,3]),yl.setAttribute(\"position\",new gl(t,3,0,!1)),yl.setAttribute(\"uv\",new gl(t,2,3,!1))}this.geometry=yl,this.material=void 0!==e?e:new vl,this.center=new Ln(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.'),bl.setFromMatrixScale(this.matrixWorld),Ml.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),xl.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&bl.multiplyScalar(-xl.z);const n=this.material.rotation;let i,r;0!==n&&(r=Math.cos(n),i=Math.sin(n));const s=this.center;Rl(_l.set(-.5,-.5,0),xl,s,bl,i,r),Rl(Il.set(.5,-.5,0),xl,s,bl,i,r),Rl(Bl.set(.5,.5,0),xl,s,bl,i,r),Sl.set(0,0),Tl.set(1,0),Ll.set(1,1);let o=e.ray.intersectTriangle(_l,Il,Bl,!1,El);if(null===o&&(Rl(Il.set(-.5,.5,0),xl,s,bl,i,r),Tl.set(0,1),o=e.ray.intersectTriangle(_l,Bl,Il,!1,El),null===o))return;const a=e.ray.origin.distanceTo(El);a\u003Ce.near||a>e.far||t.push({distance:a,point:El.clone(),uv:br.getUV(El,_l,Il,Bl,Sl,Tl,Ll,new Ln),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Rl(e,t,n,i,r,s){wl.subVectors(e,n).addScalar(.5).multiply(i),void 0!==r?(Cl.x=s*wl.x-r*wl.y,Cl.y=r*wl.x+s*wl.y):Cl.copy(wl),e.copy(t),e.x+=Cl.x,e.y+=Cl.y,e.applyMatrix4(Ml)}const Pl=new ci,kl=new ci;class Fl extends hr{constructor(){super(),this._currentLevel=0,this.type=\"LOD\",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e\u003Cn;e++){const n=t[e];this.addLevel(n.object.clone(),n.distance,n.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const i=this.levels;let r;for(r=0;r\u003Ci.length&&!(t\u003Ci[r].distance);r++);return i.splice(r,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n\u003Ci;n++){let i=t[n].distance;if(t[n].object.visible&&(i-=i*t[n].hysteresis),e\u003Ci)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){Pl.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Pl);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Pl.setFromMatrixPosition(e.matrixWorld),kl.setFromMatrixPosition(this.matrixWorld);const n=Pl.distanceTo(kl)/e.zoom;let i,r;for(t[0].object.visible=!0,i=1,r=t.length;i\u003Cr;i++){let e=t[i].distance;if(t[i].object.visible&&(e-=e*t[i].hysteresis),!(n>=e))break;t[i-1].object.visible=!1,t[i].object.visible=!0}for(this._currentLevel=i-1;i\u003Cr;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let e=0,i=n.length;e\u003Ci;e++){const i=n[e];t.object.levels.push({object:i.object.uuid,distance:i.distance,hysteresis:i.hysteresis})}return t}}const Ol=new ci,Ql=new ti,Ul=new ti,Nl=new ci,Gl=new Ui;class zl extends cs{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type=\"SkinnedMesh\",this.bindMode=\"attached\",this.bindMatrix=new Ui,this.bindMatrixInverse=new Ui}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new ti,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n\u003Ci;n++){e.fromBufferAttribute(t,n);const i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),\"attached\"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():\"detached\"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn(\"THREE.SkinnedMesh: Unrecognized bindMode: \"+this.bindMode)}boneTransform(e,t){const n=this.skeleton,i=this.geometry;Ql.fromBufferAttribute(i.attributes.skinIndex,e),Ul.fromBufferAttribute(i.attributes.skinWeight,e),Ol.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e\u003C4;e++){const i=Ul.getComponent(e);if(0!==i){const r=Ql.getComponent(e);Gl.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Nl.copy(Ol).applyMatrix4(Gl),i)}}return t.applyMatrix4(this.bindMatrixInverse)}}class Hl extends hr{constructor(){super(),this.isBone=!0,this.type=\"Bone\"}}class Vl extends ei{constructor(e=null,t=1,n=1,i,r,s,o,a,l=pe,c=pe,h,u){super(null,s,o,a,l,c,i,r,h,u),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Wl=new Ui,jl=new Ui;class ql{constructor(e=[],t=[]){this.uuid=bn(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn(\"THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.\"),this.boneInverses=[];for(let e=0,t=this.bones.length;e\u003Ct;e++)this.boneInverses.push(new Ui)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e\u003Ct;e++){const t=new Ui;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e\u003Ct;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e\u003Ct;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let i=0,r=e.length;i\u003Cr;i++){const r=e[i]?e[i].matrixWorld:jl;Wl.multiplyMatrices(r,t[i]),Wl.toArray(n,16*i)}null!==i&&(i.needsUpdate=!0)}clone(){return new ql(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=_n(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new Vl(t,e,e,Fe,Se);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t\u003Cn;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n\u003Ci;n++){const i=e.bones[n];let r=t[i];void 0===r&&(console.warn(\"THREE.Skeleton: No bone found with UUID:\",i),r=new Hl),this.bones.push(r),this.boneInverses.push((new Ui).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:\"Skeleton\",generator:\"Skeleton.toJSON\"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i\u003Cr;i++){const r=t[i];e.bones.push(r.uuid);const s=n[i];e.boneInverses.push(s.toArray())}return e}}class Yl extends Ir{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Xl=new Ui,Jl=new Ui,Kl=[],Zl=new Ui,$l=new cs;class ec extends cs{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Yl(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1;for(let e=0;e\u003Cn;e++)this.setMatrixAt(e,Zl)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,i=this.count;if($l.geometry=this.geometry,$l.material=this.material,void 0!==$l.material)for(let r=0;r\u003Ci;r++){this.getMatrixAt(r,Xl),Jl.multiplyMatrices(n,Xl),$l.matrixWorld=Jl,$l.raycast(e,Kl);for(let e=0,n=Kl.length;e\u003Cn;e++){const n=Kl[e];n.instanceId=r,n.object=this,t.push(n)}Kl.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new Yl(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:\"dispose\"})}}class tc extends wr{constructor(e){super(),this.isLineBasicMaterial=!0,this.type=\"LineBasicMaterial\",this.color=new Yn(16777215),this.linewidth=1,this.linecap=\"round\",this.linejoin=\"round\",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const nc=new ci,ic=new ci,rc=new Ui,sc=new Qi,oc=new Ti;class ac extends hr{constructor(e=new Wr,t=new tc){super(),this.isLine=!0,this.type=\"Line\",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,i=t.count;e\u003Ci;e++)nc.fromBufferAttribute(t,e-1),ic.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=nc.distanceTo(ic);e.setAttribute(\"lineDistance\",new Fr(n,1))}else console.warn(\"THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),oc.copy(n.boundingSphere),oc.applyMatrix4(i),oc.radius+=r,!1===e.ray.intersectsSphere(oc))return;rc.copy(i).invert(),sc.copy(e.ray).applyMatrix4(rc);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,l=new ci,c=new ci,h=new ci,u=new ci,d=this.isLineSegments?2:1,p=n.index,A=n.attributes.position;if(null!==p)for(let n=Math.max(0,s.start),i=Math.min(p.count,s.start+s.count)-1;n\u003Ci;n+=d){const i=p.getX(n),r=p.getX(n+1);if(l.fromBufferAttribute(A,i),c.fromBufferAttribute(A,r),sc.distanceSqToSegment(l,c,u,h)>a)continue;u.applyMatrix4(this.matrixWorld);const s=e.ray.origin.distanceTo(u);s\u003Ce.near||s>e.far||t.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,s.start),i=Math.min(A.count,s.start+s.count)-1;n\u003Ci;n+=d){if(l.fromBufferAttribute(A,n),c.fromBufferAttribute(A,n+1),sc.distanceSqToSegment(l,c,u,h)>a)continue;u.applyMatrix4(this.matrixWorld);const i=e.ray.origin.distanceTo(u);i\u003Ce.near||i>e.far||t.push({distance:i,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e\u003Ct;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}const lc=new ci,cc=new ci;class hc extends ac{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type=\"LineSegments\"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,i=t.count;e\u003Ci;e+=2)lc.fromBufferAttribute(t,e),cc.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+lc.distanceTo(cc);e.setAttribute(\"lineDistance\",new Fr(n,1))}else console.warn(\"THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}}class uc extends ac{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type=\"LineLoop\"}}class dc extends wr{constructor(e){super(),this.isPointsMaterial=!0,this.type=\"PointsMaterial\",this.color=new Yn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const pc=new Ui,Ac=new Qi,fc=new Ti,mc=new ci;class gc extends hr{constructor(e=new Wr,t=new dc){super(),this.isPoints=!0,this.type=\"Points\",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),fc.copy(n.boundingSphere),fc.applyMatrix4(i),fc.radius+=r,!1===e.ray.intersectsSphere(fc))return;pc.copy(i).invert(),Ac.copy(e.ray).applyMatrix4(pc);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,l=n.index,c=n.attributes.position;if(null!==l)for(let n=Math.max(0,s.start),r=Math.min(l.count,s.start+s.count);n\u003Cr;n++){const r=l.getX(n);mc.fromBufferAttribute(c,r),vc(mc,r,a,i,e,t,this)}else for(let n=Math.max(0,s.start),r=Math.min(c.count,s.start+s.count);n\u003Cr;n++)mc.fromBufferAttribute(c,n),vc(mc,n,a,i,e,t,this)}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e\u003Ct;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function vc(e,t,n,i,r,s,o){const a=Ac.distanceSqToPoint(e);if(a\u003Cn){const n=new ci;Ac.closestPointToPoint(e,n),n.applyMatrix4(i);const l=r.ray.origin.distanceTo(n);if(l\u003Cr.near||l>r.far)return;s.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:t,face:null,object:o})}}class yc extends ei{constructor(e,t,n,i,r,s,o,a,l){super(e,t,n,i,r,s,o,a,l),this.isVideoTexture=!0,this.minFilter=void 0!==s?s:ve,this.magFilter=void 0!==r?r:ve,this.generateMipmaps=!1;const c=this;\"requestVideoFrameCallback\"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==\"requestVideoFrameCallback\"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class Ec extends ei{constructor(e,t,n){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=n,this.magFilter=pe,this.minFilter=pe,this.generateMipmaps=!1,this.needsUpdate=!0}}class bc extends ei{constructor(e,t,n,i,r,s,o,a,l,c,h,u){super(null,s,o,a,l,c,i,r,h,u),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class xc extends bc{constructor(e,t,n,i,r,s){super(e,t,n,r,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=ue}}class wc extends ei{constructor(e,t,n,i,r,s,o,a,l){super(e,t,n,i,r,s,o,a,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Cc{constructor(){this.type=\"Curve\",this.arcLengthDivisions=200}getPoint(){return console.warn(\"THREE.Curve: .getPoint() not implemented.\"),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n\u003C=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n\u003C=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let s=1;s\u003C=e;s++)n=this.getPoint(s/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let i=0;const r=n.length;let s;s=t||e*n[r-1];let o,a=0,l=r-1;for(;a\u003C=l;)if(i=Math.floor(a+(l-a)/2),o=n[i]-s,o\u003C0)a=i+1;else{if(!(o>0)){l=i;break}l=i-1}if(i=l,n[i]===s)return i/(r-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}getTangent(e,t){const n=1e-4;let i=e-n,r=e+n;i\u003C0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),o=this.getPoint(r),a=t||(s.isVector2?new Ln:new ci);return a.copy(o).sub(s).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new ci,i=[],r=[],s=[],o=new ci,a=new Ui;for(let t=0;t\u003C=e;t++){const n=t/e;i[t]=this.getTangentAt(n,new ci)}r[0]=new ci,s[0]=new ci;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),u=Math.abs(i[0].z);c\u003C=l&&(l=c,n.set(1,0,0)),h\u003C=l&&(l=h,n.set(0,1,0)),u\u003C=l&&n.set(0,0,1),o.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],o),s[0].crossVectors(i[0],r[0]);for(let t=1;t\u003C=e;t++){if(r[t]=r[t-1].clone(),s[t]=s[t-1].clone(),o.crossVectors(i[t-1],i[t]),o.length()>Number.EPSILON){o.normalize();const e=Math.acos(xn(i[t-1].dot(i[t]),-1,1));r[t].applyMatrix4(a.makeRotationAxis(o,e))}s[t].crossVectors(i[t],r[t])}if(!0===t){let t=Math.acos(xn(r[0].dot(r[e]),-1,1));t/=e,i[0].dot(o.crossVectors(r[0],r[e]))>0&&(t=-t);for(let n=1;n\u003C=e;n++)r[n].applyMatrix4(a.makeRotationAxis(i[n],t*n)),s[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:\"Curve\",generator:\"Curve.toJSON\"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Mc extends Cc{constructor(e=0,t=0,n=1,i=1,r=0,s=2*Math.PI,o=!1,a=0){super(),this.isEllipseCurve=!0,this.type=\"EllipseCurve\",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=o,this.aRotation=a}getPoint(e,t){const n=t||new Ln,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)\u003CNumber.EPSILON;for(;r\u003C0;)r+=i;for(;r>i;)r-=i;r\u003CNumber.EPSILON&&(r=s?0:i),!0!==this.aClockwise||s||(r===i?r=-i:r-=i);const o=this.aStartAngle+e*r;let a=this.aX+this.xRadius*Math.cos(o),l=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=a-this.aX,i=l-this.aY;a=n*e-i*t+this.aX,l=n*t+i*e+this.aY}return n.set(a,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class _c extends Mc{constructor(e,t,n,i,r,s){super(e,t,n,n,i,r,s),this.isArcCurve=!0,this.type=\"ArcCurve\"}}function Ic(){let e=0,t=0,n=0,i=0;function r(r,s,o,a){e=r,t=o,n=-3*r+3*s-2*o-a,i=2*r-2*s+o+a}return{initCatmullRom:function(e,t,n,i,s){r(t,n,s*(n-e),s*(i-t))},initNonuniformCatmullRom:function(e,t,n,i,s,o,a){let l=(t-e)/s-(n-e)/(s+o)+(n-t)/o,c=(n-t)/o-(i-t)/(o+a)+(i-n)/a;l*=o,c*=o,r(t,n,l,c)},calc:function(r){const s=r*r;return e+t*r+n*s+i*(s*r)}}}const Bc=new ci,Sc=new Ic,Tc=new Ic,Lc=new Ic;class Dc extends Cc{constructor(e=[],t=!1,n=\"centripetal\",i=.5){super(),this.isCatmullRomCurve3=!0,this.type=\"CatmullRomCurve3\",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new ci){const n=t,i=this.points,r=i.length,s=(r-(this.closed?0:1))*e;let o,a,l=Math.floor(s),c=s-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?o=i[(l-1)%r]:(Bc.subVectors(i[0],i[1]).add(i[0]),o=Bc);const h=i[l%r],u=i[(l+1)%r];if(this.closed||l+2\u003Cr?a=i[(l+2)%r]:(Bc.subVectors(i[r-1],i[r-2]).add(i[r-1]),a=Bc),\"centripetal\"===this.curveType||\"chordal\"===this.curveType){const e=\"chordal\"===this.curveType?.5:.25;let t=Math.pow(o.distanceToSquared(h),e),n=Math.pow(h.distanceToSquared(u),e),i=Math.pow(u.distanceToSquared(a),e);n\u003C1e-4&&(n=1),t\u003C1e-4&&(t=n),i\u003C1e-4&&(i=n),Sc.initNonuniformCatmullRom(o.x,h.x,u.x,a.x,t,n,i),Tc.initNonuniformCatmullRom(o.y,h.y,u.y,a.y,t,n,i),Lc.initNonuniformCatmullRom(o.z,h.z,u.z,a.z,t,n,i)}else\"catmullrom\"===this.curveType&&(Sc.initCatmullRom(o.x,h.x,u.x,a.x,this.tension),Tc.initCatmullRom(o.y,h.y,u.y,a.y,this.tension),Lc.initCatmullRom(o.z,h.z,u.z,a.z,this.tension));return n.set(Sc.calc(c),Tc.calc(c),Lc.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t\u003Cn;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t\u003Cn;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t\u003Cn;t++){const n=e.points[t];this.points.push((new ci).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Rc(e,t,n,i,r){const s=.5*(i-t),o=.5*(r-n),a=e*e;return(2*n-2*i+s+o)*(e*a)+(-3*n+3*i-2*s-o)*a+s*e+n}function Pc(e,t,n,i){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,i)}function kc(e,t,n,i,r){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,i)+function(e,t){return e*e*e*t}(e,r)}class Fc extends Cc{constructor(e=new Ln,t=new Ln,n=new Ln,i=new Ln){super(),this.isCubicBezierCurve=!0,this.type=\"CubicBezierCurve\",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Ln){const n=t,i=this.v0,r=this.v1,s=this.v2,o=this.v3;return n.set(kc(e,i.x,r.x,s.x,o.x),kc(e,i.y,r.y,s.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Oc extends Cc{constructor(e=new ci,t=new ci,n=new ci,i=new ci){super(),this.isCubicBezierCurve3=!0,this.type=\"CubicBezierCurve3\",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new ci){const n=t,i=this.v0,r=this.v1,s=this.v2,o=this.v3;return n.set(kc(e,i.x,r.x,s.x,o.x),kc(e,i.y,r.y,s.y,o.y),kc(e,i.z,r.z,s.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Qc extends Cc{constructor(e=new Ln,t=new Ln){super(),this.isLineCurve=!0,this.type=\"LineCurve\",this.v1=e,this.v2=t}getPoint(e,t=new Ln){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Ln;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Uc extends Cc{constructor(e=new ci,t=new ci){super(),this.isLineCurve3=!0,this.type=\"LineCurve3\",this.v1=e,this.v2=t}getPoint(e,t=new ci){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Nc extends Cc{constructor(e=new Ln,t=new Ln,n=new Ln){super(),this.isQuadraticBezierCurve=!0,this.type=\"QuadraticBezierCurve\",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Ln){const n=t,i=this.v0,r=this.v1,s=this.v2;return n.set(Pc(e,i.x,r.x,s.x),Pc(e,i.y,r.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Gc extends Cc{constructor(e=new ci,t=new ci,n=new ci){super(),this.isQuadraticBezierCurve3=!0,this.type=\"QuadraticBezierCurve3\",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new ci){const n=t,i=this.v0,r=this.v1,s=this.v2;return n.set(Pc(e,i.x,r.x,s.x),Pc(e,i.y,r.y,s.y),Pc(e,i.z,r.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class zc extends Cc{constructor(e=[]){super(),this.isSplineCurve=!0,this.type=\"SplineCurve\",this.points=e}getPoint(e,t=new Ln){const n=t,i=this.points,r=(i.length-1)*e,s=Math.floor(r),o=r-s,a=i[0===s?s:s-1],l=i[s],c=i[s>i.length-2?i.length-1:s+1],h=i[s>i.length-3?i.length-1:s+2];return n.set(Rc(o,a.x,l.x,c.x,h.x),Rc(o,a.y,l.y,c.y,h.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t\u003Cn;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t\u003Cn;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t\u003Cn;t++){const n=e.points[t];this.points.push((new Ln).fromArray(n))}return this}}var Hc=Object.freeze({__proto__:null,ArcCurve:_c,CatmullRomCurve3:Dc,CubicBezierCurve:Fc,CubicBezierCurve3:Oc,EllipseCurve:Mc,LineCurve:Qc,LineCurve3:Uc,QuadraticBezierCurve:Nc,QuadraticBezierCurve3:Gc,SplineCurve:zc});class Vc extends Cc{constructor(){super(),this.type=\"CurvePath\",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Qc(t,e))}getPoint(e,t){const n=e*this.getLength(),i=this.getCurveLengths();let r=0;for(;r\u003Ci.length;){if(i[r]>=n){const e=i[r]-n,s=this.curves[r],o=s.getLength(),a=0===o?0:1-e/o;return s.getPointAt(a,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n\u003Ci;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n\u003C=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let i=0,r=this.curves;i\u003Cr.length;i++){const s=r[i],o=s.isEllipseCurve?2*e:s.isLineCurve||s.isLineCurve3?1:s.isSplineCurve?e*s.points.length:e,a=s.getPoints(o);for(let e=0;e\u003Ca.length;e++){const i=a[e];n&&n.equals(i)||(t.push(i),n=i)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t\u003Cn;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t\u003Cn;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t\u003Cn;t++){const n=e.curves[t];this.curves.push((new Hc[n.type]).fromJSON(n))}return this}}class Wc extends Vc{constructor(e){super(),this.type=\"Path\",this.currentPoint=new Ln,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t\u003Cn;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Qc(this.currentPoint.clone(),new Ln(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){const r=new Nc(this.currentPoint.clone(),new Ln(e,t),new Ln(n,i));return this.curves.push(r),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,r,s){const o=new Fc(this.currentPoint.clone(),new Ln(e,t),new Ln(n,i),new Ln(r,s));return this.curves.push(o),this.currentPoint.set(r,s),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new zc(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,r,s){const o=this.currentPoint.x,a=this.currentPoint.y;return this.absarc(e+o,t+a,n,i,r,s),this}absarc(e,t,n,i,r,s){return this.absellipse(e,t,n,n,i,r,s),this}ellipse(e,t,n,i,r,s,o,a){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,i,r,s,o,a),this}absellipse(e,t,n,i,r,s,o,a){const l=new Mc(e,t,n,i,r,s,o,a);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class jc extends Wr{constructor(e=[new Ln(0,-.5),new Ln(.5,0),new Ln(0,.5)],t=12,n=0,i=2*Math.PI){super(),this.type=\"LatheGeometry\",this.parameters={points:e,segments:t,phiStart:n,phiLength:i},t=Math.floor(t),i=xn(i,0,2*Math.PI);const r=[],s=[],o=[],a=[],l=[],c=1/t,h=new ci,u=new Ln,d=new ci,p=new ci,A=new ci;let f=0,m=0;for(let t=0;t\u003C=e.length-1;t++)switch(t){case 0:f=e[t+1].x-e[t].x,m=e[t+1].y-e[t].y,d.x=1*m,d.y=-f,d.z=0*m,A.copy(d),d.normalize(),a.push(d.x,d.y,d.z);break;case e.length-1:a.push(A.x,A.y,A.z);break;default:f=e[t+1].x-e[t].x,m=e[t+1].y-e[t].y,d.x=1*m,d.y=-f,d.z=0*m,p.copy(d),d.x+=A.x,d.y+=A.y,d.z+=A.z,d.normalize(),a.push(d.x,d.y,d.z),A.copy(p)}for(let r=0;r\u003C=t;r++){const d=n+r*c*i,p=Math.sin(d),A=Math.cos(d);for(let n=0;n\u003C=e.length-1;n++){h.x=e[n].x*p,h.y=e[n].y,h.z=e[n].x*A,s.push(h.x,h.y,h.z),u.x=r/t,u.y=n/(e.length-1),o.push(u.x,u.y);const i=a[3*n+0]*p,c=a[3*n+1],d=a[3*n+0]*A;l.push(i,c,d)}}for(let n=0;n\u003Ct;n++)for(let t=0;t\u003Ce.length-1;t++){const i=t+n*e.length,s=i,o=i+e.length,a=i+e.length+1,l=i+1;r.push(s,o,l),r.push(a,l,o)}this.setIndex(r),this.setAttribute(\"position\",new Fr(s,3)),this.setAttribute(\"uv\",new Fr(o,2)),this.setAttribute(\"normal\",new Fr(l,3))}static fromJSON(e){return new jc(e.points,e.segments,e.phiStart,e.phiLength)}}class qc extends jc{constructor(e=1,t=1,n=4,i=8){const r=new Wc;r.absarc(0,-t/2,e,1.5*Math.PI,0),r.absarc(0,t/2,e,0,.5*Math.PI),super(r.getPoints(n),i),this.type=\"CapsuleGeometry\",this.parameters={radius:e,height:t,capSegments:n,radialSegments:i}}static fromJSON(e){return new qc(e.radius,e.length,e.capSegments,e.radialSegments)}}class Yc extends Wr{constructor(e=1,t=8,n=0,i=2*Math.PI){super(),this.type=\"CircleGeometry\",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:i},t=Math.max(3,t);const r=[],s=[],o=[],a=[],l=new ci,c=new Ln;s.push(0,0,0),o.push(0,0,1),a.push(.5,.5);for(let r=0,h=3;r\u003C=t;r++,h+=3){const u=n+r/t*i;l.x=e*Math.cos(u),l.y=e*Math.sin(u),s.push(l.x,l.y,l.z),o.push(0,0,1),c.x=(s[h]/e+1)/2,c.y=(s[h+1]/e+1)/2,a.push(c.x,c.y)}for(let e=1;e\u003C=t;e++)r.push(e,e+1,0);this.setIndex(r),this.setAttribute(\"position\",new Fr(s,3)),this.setAttribute(\"normal\",new Fr(o,3)),this.setAttribute(\"uv\",new Fr(a,2))}static fromJSON(e){return new Yc(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Xc extends Wr{constructor(e=1,t=1,n=1,i=8,r=1,s=!1,o=0,a=2*Math.PI){super(),this.type=\"CylinderGeometry\",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a};const l=this;i=Math.floor(i),r=Math.floor(r);const c=[],h=[],u=[],d=[];let p=0;const A=[],f=n/2;let m=0;function g(n){const r=p,s=new Ln,A=new ci;let g=0;const v=!0===n?e:t,y=!0===n?1:-1;for(let e=1;e\u003C=i;e++)h.push(0,f*y,0),u.push(0,y,0),d.push(.5,.5),p++;const E=p;for(let e=0;e\u003C=i;e++){const t=e/i*a+o,n=Math.cos(t),r=Math.sin(t);A.x=v*r,A.y=f*y,A.z=v*n,h.push(A.x,A.y,A.z),u.push(0,y,0),s.x=.5*n+.5,s.y=.5*r*y+.5,d.push(s.x,s.y),p++}for(let e=0;e\u003Ci;e++){const t=r+e,i=E+e;!0===n?c.push(i,i+1,t):c.push(i+1,i,t),g+=3}l.addGroup(m,g,!0===n?1:2),m+=g}!function(){const s=new ci,g=new ci;let v=0;const y=(t-e)/n;for(let l=0;l\u003C=r;l++){const c=[],m=l/r,v=m*(t-e)+e;for(let e=0;e\u003C=i;e++){const t=e/i,r=t*a+o,l=Math.sin(r),A=Math.cos(r);g.x=v*l,g.y=-m*n+f,g.z=v*A,h.push(g.x,g.y,g.z),s.set(l,y,A).normalize(),u.push(s.x,s.y,s.z),d.push(t,1-m),c.push(p++)}A.push(c)}for(let e=0;e\u003Ci;e++)for(let t=0;t\u003Cr;t++){const n=A[t][e],i=A[t+1][e],r=A[t+1][e+1],s=A[t][e+1];c.push(n,i,s),c.push(i,r,s),v+=6}l.addGroup(m,v,0),m+=v}(),!1===s&&(e>0&&g(!0),t>0&&g(!1)),this.setIndex(c),this.setAttribute(\"position\",new Fr(h,3)),this.setAttribute(\"normal\",new Fr(u,3)),this.setAttribute(\"uv\",new Fr(d,2))}static fromJSON(e){return new Xc(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Jc extends Xc{constructor(e=1,t=1,n=8,i=1,r=!1,s=0,o=2*Math.PI){super(0,e,t,n,i,r,s,o),this.type=\"ConeGeometry\",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:o}}static fromJSON(e){return new Jc(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Kc extends Wr{constructor(e=[],t=[],n=1,i=0){super(),this.type=\"PolyhedronGeometry\",this.parameters={vertices:e,indices:t,radius:n,detail:i};const r=[],s=[];function o(e,t,n,i){const r=i+1,s=[];for(let i=0;i\u003C=r;i++){s[i]=[];const o=e.clone().lerp(n,i/r),a=t.clone().lerp(n,i/r),l=r-i;for(let e=0;e\u003C=l;e++)s[i][e]=0===e&&i===r?o:o.clone().lerp(a,e/l)}for(let e=0;e\u003Cr;e++)for(let t=0;t\u003C2*(r-e)-1;t++){const n=Math.floor(t/2);t%2==0?(a(s[e][n+1]),a(s[e+1][n]),a(s[e][n])):(a(s[e][n+1]),a(s[e+1][n+1]),a(s[e+1][n]))}}function a(e){r.push(e.x,e.y,e.z)}function l(t,n){const i=3*t;n.x=e[i+0],n.y=e[i+1],n.z=e[i+2]}function c(e,t,n,i){i\u003C0&&1===e.x&&(s[t]=e.x-1),0===n.x&&0===n.z&&(s[t]=i/2/Math.PI+.5)}function h(e){return Math.atan2(e.z,-e.x)}!function(e){const n=new ci,i=new ci,r=new ci;for(let s=0;s\u003Ct.length;s+=3)l(t[s+0],n),l(t[s+1],i),l(t[s+2],r),o(n,i,r,e)}(i),function(e){const t=new ci;for(let n=0;n\u003Cr.length;n+=3)t.x=r[n+0],t.y=r[n+1],t.z=r[n+2],t.normalize().multiplyScalar(e),r[n+0]=t.x,r[n+1]=t.y,r[n+2]=t.z}(n),function(){const e=new ci;for(let n=0;n\u003Cr.length;n+=3){e.x=r[n+0],e.y=r[n+1],e.z=r[n+2];const i=h(e)/2/Math.PI+.5,o=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);s.push(i,1-o)}var t;(function(){const e=new ci,t=new ci,n=new ci,i=new ci,o=new Ln,a=new Ln,l=new Ln;for(let u=0,d=0;u\u003Cr.length;u+=9,d+=6){e.set(r[u+0],r[u+1],r[u+2]),t.set(r[u+3],r[u+4],r[u+5]),n.set(r[u+6],r[u+7],r[u+8]),o.set(s[d+0],s[d+1]),a.set(s[d+2],s[d+3]),l.set(s[d+4],s[d+5]),i.copy(e).add(t).add(n).divideScalar(3);const p=h(i);c(o,d+0,e,p),c(a,d+2,t,p),c(l,d+4,n,p)}})(),function(){for(let e=0;e\u003Cs.length;e+=6){const t=s[e+0],n=s[e+2],i=s[e+4],r=Math.max(t,n,i),o=Math.min(t,n,i);r>.9&&o\u003C.1&&(t\u003C.2&&(s[e+0]+=1),n\u003C.2&&(s[e+2]+=1),i\u003C.2&&(s[e+4]+=1))}}()}(),this.setAttribute(\"position\",new Fr(r,3)),this.setAttribute(\"normal\",new Fr(r.slice(),3)),this.setAttribute(\"uv\",new Fr(s,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new Kc(e.vertices,e.indices,e.radius,e.details)}}class Zc extends Kc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type=\"DodecahedronGeometry\",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Zc(e.radius,e.detail)}}const $c=new ci,eh=new ci,th=new ci,nh=new br;class ih extends Wr{constructor(e=null,t=1){if(super(),this.type=\"EdgesGeometry\",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,i=Math.pow(10,n),r=Math.cos(yn*t),s=e.getIndex(),o=e.getAttribute(\"position\"),a=s?s.count:o.count,l=[0,0,0],c=[\"a\",\"b\",\"c\"],h=new Array(3),u={},d=[];for(let e=0;e\u003Ca;e+=3){s?(l[0]=s.getX(e),l[1]=s.getX(e+1),l[2]=s.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:a}=nh;if(t.fromBufferAttribute(o,l[0]),n.fromBufferAttribute(o,l[1]),a.fromBufferAttribute(o,l[2]),nh.getNormal(th),h[0]=`${Math.round(t.x*i)},${Math.round(t.y*i)},${Math.round(t.z*i)}`,h[1]=`${Math.round(n.x*i)},${Math.round(n.y*i)},${Math.round(n.z*i)}`,h[2]=`${Math.round(a.x*i)},${Math.round(a.y*i)},${Math.round(a.z*i)}`,h[0]!==h[1]&&h[1]!==h[2]&&h[2]!==h[0])for(let e=0;e\u003C3;e++){const t=(e+1)%3,n=h[e],i=h[t],s=nh[c[e]],o=nh[c[t]],a=`${n}_${i}`,p=`${i}_${n}`;p in u&&u[p]?(th.dot(u[p].normal)\u003C=r&&(d.push(s.x,s.y,s.z),d.push(o.x,o.y,o.z)),u[p]=null):a in u||(u[a]={index0:l[e],index1:l[t],normal:th.clone()})}}for(const e in u)if(u[e]){const{index0:t,index1:n}=u[e];$c.fromBufferAttribute(o,t),eh.fromBufferAttribute(o,n),d.push($c.x,$c.y,$c.z),d.push(eh.x,eh.y,eh.z)}this.setAttribute(\"position\",new Fr(d,3))}}}class rh extends Wc{constructor(e){super(e),this.uuid=bn(),this.type=\"Shape\",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n\u003Ci;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t\u003Cn;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t\u003Cn;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t\u003Cn;t++){const n=e.holes[t];this.holes.push((new Wc).fromJSON(n))}return this}}function sh(e,t,n,i,r){let s,o;if(r===function(e,t,n,i){let r=0;for(let s=t,o=n-i;s\u003Cn;s+=i)r+=(e[o]-e[s])*(e[s+1]+e[o+1]),o=s;return r}(e,t,n,i)>0)for(s=t;s\u003Cn;s+=i)o=_h(s,e[s],e[s+1],o);else for(s=n-i;s>=t;s-=i)o=_h(s,e[s],e[s+1],o);return o&&Eh(o,o.next)&&(Ih(o),o=o.next),o}function oh(e,t){if(!e)return e;t||(t=e);let n,i=e;do{if(n=!1,i.steiner||!Eh(i,i.next)&&0!==yh(i.prev,i,i.next))i=i.next;else{if(Ih(i),i=t=i.prev,i===i.next)break;n=!0}}while(n||i!==t);return t}function ah(e,t,n,i,r,s,o){if(!e)return;!o&&s&&function(e,t,n,i){let r=e;do{0===r.z&&(r.z=fh(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,function(e){let t,n,i,r,s,o,a,l,c=1;do{for(n=e,e=null,s=null,o=0;n;){for(o++,i=n,a=0,t=0;t\u003Cc&&(a++,i=i.nextZ,i);t++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||n.z\u003C=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:e=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(o>1)}(r)}(e,i,r,s);let a,l,c=e;for(;e.prev!==e.next;)if(a=e.prev,l=e.next,s?ch(e,i,r,s):lh(e))t.push(a.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),Ih(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?ah(e=hh(oh(e),t,n),t,n,i,r,s,2):2===o&&uh(e,t,n,i,r,s):ah(oh(e),t,n,i,r,s,1);break}}function lh(e){const t=e.prev,n=e,i=e.next;if(yh(t,n,i)>=0)return!1;const r=t.x,s=n.x,o=i.x,a=t.y,l=n.y,c=i.y,h=r\u003Cs?r\u003Co?r:o:s\u003Co?s:o,u=a\u003Cl?a\u003Cc?a:c:l\u003Cc?l:c,d=r>s?r>o?r:o:s>o?s:o,p=a>l?a>c?a:c:l>c?l:c;let A=i.next;for(;A!==t;){if(A.x>=h&&A.x\u003C=d&&A.y>=u&&A.y\u003C=p&&gh(r,a,s,l,o,c,A.x,A.y)&&yh(A.prev,A,A.next)>=0)return!1;A=A.next}return!0}function ch(e,t,n,i){const r=e.prev,s=e,o=e.next;if(yh(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,h=r.y,u=s.y,d=o.y,p=a\u003Cl?a\u003Cc?a:c:l\u003Cc?l:c,A=h\u003Cu?h\u003Cd?h:d:u\u003Cd?u:d,f=a>l?a>c?a:c:l>c?l:c,m=h>u?h>d?h:d:u>d?u:d,g=fh(p,A,t,n,i),v=fh(f,m,t,n,i);let y=e.prevZ,E=e.nextZ;for(;y&&y.z>=g&&E&&E.z\u003C=v;){if(y.x>=p&&y.x\u003C=f&&y.y>=A&&y.y\u003C=m&&y!==r&&y!==o&&gh(a,h,l,u,c,d,y.x,y.y)&&yh(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,E.x>=p&&E.x\u003C=f&&E.y>=A&&E.y\u003C=m&&E!==r&&E!==o&&gh(a,h,l,u,c,d,E.x,E.y)&&yh(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;y&&y.z>=g;){if(y.x>=p&&y.x\u003C=f&&y.y>=A&&y.y\u003C=m&&y!==r&&y!==o&&gh(a,h,l,u,c,d,y.x,y.y)&&yh(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;E&&E.z\u003C=v;){if(E.x>=p&&E.x\u003C=f&&E.y>=A&&E.y\u003C=m&&E!==r&&E!==o&&gh(a,h,l,u,c,d,E.x,E.y)&&yh(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function hh(e,t,n){let i=e;do{const r=i.prev,s=i.next.next;!Eh(r,s)&&bh(r,i,i.next,s)&&Ch(r,s)&&Ch(s,r)&&(t.push(r.i/n|0),t.push(i.i/n|0),t.push(s.i/n|0),Ih(i),Ih(i.next),i=e=s),i=i.next}while(i!==e);return oh(i)}function uh(e,t,n,i,r,s){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&vh(o,e)){let a=Mh(o,e);return o=oh(o,o.next),a=oh(a,a.next),ah(o,t,n,i,r,s,0),void ah(a,t,n,i,r,s,0)}e=e.next}o=o.next}while(o!==e)}function dh(e,t){return e.x-t.x}function ph(e,t){const n=function(e,t){let n,i=t,r=-1/0;const s=e.x,o=e.y;do{if(o\u003C=i.y&&o>=i.next.y&&i.next.y!==i.y){const e=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(e\u003C=s&&e>r&&(r=e,n=i.x\u003Ci.next.x?i:i.next,e===s))return n}i=i.next}while(i!==t);if(!n)return null;const a=n,l=n.x,c=n.y;let h,u=1/0;i=n;do{s>=i.x&&i.x>=l&&s!==i.x&&gh(o\u003Cc?s:r,o,l,c,o\u003Cc?r:s,o,i.x,i.y)&&(h=Math.abs(o-i.y)/(s-i.x),Ch(i,e)&&(h\u003Cu||h===u&&(i.x>n.x||i.x===n.x&&Ah(n,i)))&&(n=i,u=h)),i=i.next}while(i!==a);return n}(e,t);if(!n)return t;const i=Mh(n,e);return oh(i,i.next),oh(n,n.next)}function Ah(e,t){return yh(e.prev,e,t.prev)\u003C0&&yh(t.next,e,e.next)\u003C0}function fh(e,t,n,i,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*r|0)|e\u003C\u003C8))|e\u003C\u003C4))|e\u003C\u003C2))|e\u003C\u003C1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*r|0)|t\u003C\u003C8))|t\u003C\u003C4))|t\u003C\u003C2))|t\u003C\u003C1))\u003C\u003C1}function mh(e){let t=e,n=e;do{(t.x\u003Cn.x||t.x===n.x&&t.y\u003Cn.y)&&(n=t),t=t.next}while(t!==e);return n}function gh(e,t,n,i,r,s,o,a){return(r-o)*(t-a)>=(e-o)*(s-a)&&(e-o)*(i-a)>=(n-o)*(t-a)&&(n-o)*(s-a)>=(r-o)*(i-a)}function vh(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&bh(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Ch(e,t)&&Ch(t,e)&&function(e,t){let n=e,i=!1;const r=(e.x+t.x)/2,s=(e.y+t.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r\u003C(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==e);return i}(e,t)&&(yh(e.prev,e,t.prev)||yh(e,t.prev,t))||Eh(e,t)&&yh(e.prev,e,e.next)>0&&yh(t.prev,t,t.next)>0)}function yh(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Eh(e,t){return e.x===t.x&&e.y===t.y}function bh(e,t,n,i){const r=wh(yh(e,t,n)),s=wh(yh(e,t,i)),o=wh(yh(n,i,e)),a=wh(yh(n,i,t));return r!==s&&o!==a||!(0!==r||!xh(e,n,t))||!(0!==s||!xh(e,i,t))||!(0!==o||!xh(n,e,i))||!(0!==a||!xh(n,t,i))}function xh(e,t,n){return t.x\u003C=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y\u003C=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function wh(e){return e>0?1:e\u003C0?-1:0}function Ch(e,t){return yh(e.prev,e,e.next)\u003C0?yh(e,t,e.next)>=0&&yh(e,e.prev,t)>=0:yh(e,t,e.prev)\u003C0||yh(e,e.next,t)\u003C0}function Mh(e,t){const n=new Bh(e.i,e.x,e.y),i=new Bh(t.i,t.x,t.y),r=e.next,s=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function _h(e,t,n,i){const r=new Bh(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Ih(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Bh(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Sh{static area(e){const t=e.length;let n=0;for(let i=t-1,r=0;r\u003Ct;i=r++)n+=e[i].x*e[r].y-e[r].x*e[i].y;return.5*n}static isClockWise(e){return Sh.area(e)\u003C0}static triangulateShape(e,t){const n=[],i=[],r=[];Th(e),Lh(n,e);let s=e.length;t.forEach(Th);for(let e=0;e\u003Ct.length;e++)i.push(s),s+=t[e].length,Lh(n,t[e]);const o=function(e,t,n=2){const i=t&&t.length,r=i?t[0]*n:e.length;let s=sh(e,0,r,n,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c,h,u,d,p;if(i&&(s=function(e,t,n,i){const r=[];let s,o,a,l,c;for(s=0,o=t.length;s\u003Co;s++)a=t[s]*i,l=s\u003Co-1?t[s+1]*i:e.length,c=sh(e,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(mh(c));for(r.sort(dh),s=0;s\u003Cr.length;s++)n=ph(r[s],n);return n}(e,t,s,n)),e.length>80*n){a=c=e[0],l=h=e[1];for(let t=n;t\u003Cr;t+=n)u=e[t],d=e[t+1],u\u003Ca&&(a=u),d\u003Cl&&(l=d),u>c&&(c=u),d>h&&(h=d);p=Math.max(c-a,h-l),p=0!==p?32767/p:0}return ah(s,o,n,a,l,p,0),o}(n,i);for(let e=0;e\u003Co.length;e+=3)r.push(o.slice(e,e+3));return r}}function Th(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Lh(e,t){for(let n=0;n\u003Ct.length;n++)e.push(t[n].x),e.push(t[n].y)}class Dh extends Wr{constructor(e=new rh([new Ln(.5,.5),new Ln(-.5,.5),new Ln(-.5,-.5),new Ln(.5,-.5)]),t={}){super(),this.type=\"ExtrudeGeometry\",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,i=[],r=[];for(let t=0,n=e.length;t\u003Cn;t++)s(e[t]);function s(e){const s=[],o=void 0!==t.curveSegments?t.curveSegments:12,a=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:1;let c=void 0===t.bevelEnabled||t.bevelEnabled,h=void 0!==t.bevelThickness?t.bevelThickness:.2,u=void 0!==t.bevelSize?t.bevelSize:h-.1,d=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3;const A=t.extrudePath,f=void 0!==t.UVGenerator?t.UVGenerator:Rh;let m,g,v,y,E,b=!1;A&&(m=A.getSpacedPoints(a),b=!0,c=!1,g=A.computeFrenetFrames(a,!1),v=new ci,y=new ci,E=new ci),c||(p=0,h=0,u=0,d=0);const x=e.extractPoints(o);let w=x.shape;const C=x.holes;if(!Sh.isClockWise(w)){w=w.reverse();for(let e=0,t=C.length;e\u003Ct;e++){const t=C[e];Sh.isClockWise(t)&&(C[e]=t.reverse())}}const M=Sh.triangulateShape(w,C),_=w;for(let e=0,t=C.length;e\u003Ct;e++){const t=C[e];w=w.concat(t)}function I(e,t,n){return t||console.error(\"THREE.ExtrudeGeometry: vec does not exist\"),t.clone().multiplyScalar(n).add(e)}const B=w.length,S=M.length;function T(e,t,n){let i,r,s;const o=e.x-t.x,a=e.y-t.y,l=n.x-e.x,c=n.y-e.y,h=o*o+a*a,u=o*c-a*l;if(Math.abs(u)>Number.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=t.x-a/u,A=t.y+o/u,f=((n.x-c/d-p)*c-(n.y+l/d-A)*l)/(o*c-a*l);i=p+o*f-e.x,r=A+a*f-e.y;const m=i*i+r*r;if(m\u003C=2)return new Ln(i,r);s=Math.sqrt(m/2)}else{let e=!1;o>Number.EPSILON?l>Number.EPSILON&&(e=!0):o\u003C-Number.EPSILON?l\u003C-Number.EPSILON&&(e=!0):Math.sign(a)===Math.sign(c)&&(e=!0),e?(i=-a,r=o,s=Math.sqrt(h)):(i=o,r=a,s=Math.sqrt(h/2))}return new Ln(i/s,r/s)}const L=[];for(let e=0,t=_.length,n=t-1,i=e+1;e\u003Ct;e++,n++,i++)n===t&&(n=0),i===t&&(i=0),L[e]=T(_[e],_[n],_[i]);const D=[];let R,P=L.concat();for(let e=0,t=C.length;e\u003Ct;e++){const t=C[e];R=[];for(let e=0,n=t.length,i=n-1,r=e+1;e\u003Cn;e++,i++,r++)i===n&&(i=0),r===n&&(r=0),R[e]=T(t[e],t[i],t[r]);D.push(R),P=P.concat(R)}for(let e=0;e\u003Cp;e++){const t=e/p,n=h*Math.cos(t*Math.PI/2),i=u*Math.sin(t*Math.PI/2)+d;for(let e=0,t=_.length;e\u003Ct;e++){const t=I(_[e],L[e],i);O(t.x,t.y,-n)}for(let e=0,t=C.length;e\u003Ct;e++){const t=C[e];R=D[e];for(let e=0,r=t.length;e\u003Cr;e++){const r=I(t[e],R[e],i);O(r.x,r.y,-n)}}}const k=u+d;for(let e=0;e\u003CB;e++){const t=c?I(w[e],P[e],k):w[e];b?(y.copy(g.normals[0]).multiplyScalar(t.x),v.copy(g.binormals[0]).multiplyScalar(t.y),E.copy(m[0]).add(y).add(v),O(E.x,E.y,E.z)):O(t.x,t.y,0)}for(let e=1;e\u003C=a;e++)for(let t=0;t\u003CB;t++){const n=c?I(w[t],P[t],k):w[t];b?(y.copy(g.normals[e]).multiplyScalar(n.x),v.copy(g.binormals[e]).multiplyScalar(n.y),E.copy(m[e]).add(y).add(v),O(E.x,E.y,E.z)):O(n.x,n.y,l/a*e)}for(let e=p-1;e>=0;e--){const t=e/p,n=h*Math.cos(t*Math.PI/2),i=u*Math.sin(t*Math.PI/2)+d;for(let e=0,t=_.length;e\u003Ct;e++){const t=I(_[e],L[e],i);O(t.x,t.y,l+n)}for(let e=0,t=C.length;e\u003Ct;e++){const t=C[e];R=D[e];for(let e=0,r=t.length;e\u003Cr;e++){const r=I(t[e],R[e],i);b?O(r.x,r.y+m[a-1].y,m[a-1].x+n):O(r.x,r.y,l+n)}}}function F(e,t){let n=e.length;for(;--n>=0;){const i=n;let r=n-1;r\u003C0&&(r=e.length-1);for(let e=0,n=a+2*p;e\u003Cn;e++){const n=B*e,s=B*(e+1);U(t+i+n,t+r+n,t+r+s,t+i+s)}}}function O(e,t,n){s.push(e),s.push(t),s.push(n)}function Q(e,t,r){N(e),N(t),N(r);const s=i.length/3,o=f.generateTopUV(n,i,s-3,s-2,s-1);G(o[0]),G(o[1]),G(o[2])}function U(e,t,r,s){N(e),N(t),N(s),N(t),N(r),N(s);const o=i.length/3,a=f.generateSideWallUV(n,i,o-6,o-3,o-2,o-1);G(a[0]),G(a[1]),G(a[3]),G(a[1]),G(a[2]),G(a[3])}function N(e){i.push(s[3*e+0]),i.push(s[3*e+1]),i.push(s[3*e+2])}function G(e){r.push(e.x),r.push(e.y)}!function(){const e=i.length/3;if(c){let e=0,t=B*e;for(let e=0;e\u003CS;e++){const n=M[e];Q(n[2]+t,n[1]+t,n[0]+t)}e=a+2*p,t=B*e;for(let e=0;e\u003CS;e++){const n=M[e];Q(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e\u003CS;e++){const t=M[e];Q(t[2],t[1],t[0])}for(let e=0;e\u003CS;e++){const t=M[e];Q(t[0]+B*a,t[1]+B*a,t[2]+B*a)}}n.addGroup(e,i.length/3-e,0)}(),function(){const e=i.length/3;let t=0;F(_,t),t+=_.length;for(let e=0,n=C.length;e\u003Cn;e++){const n=C[e];F(n,t),t+=n.length}n.addGroup(e,i.length/3-e,1)}()}this.setAttribute(\"position\",new Fr(i,3)),this.setAttribute(\"uv\",new Fr(r,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,i=e.length;t\u003Ci;t++){const i=e[t];n.shapes.push(i.uuid)}else n.shapes.push(e.uuid);return n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,r=e.shapes.length;i\u003Cr;i++){const r=t[e.shapes[i]];n.push(r)}const i=e.options.extrudePath;return void 0!==i&&(e.options.extrudePath=(new Hc[i.type]).fromJSON(i)),new Dh(n,e.options)}}const Rh={generateTopUV:function(e,t,n,i,r){const s=t[3*n],o=t[3*n+1],a=t[3*i],l=t[3*i+1],c=t[3*r],h=t[3*r+1];return[new Ln(s,o),new Ln(a,l),new Ln(c,h)]},generateSideWallUV:function(e,t,n,i,r,s){const o=t[3*n],a=t[3*n+1],l=t[3*n+2],c=t[3*i],h=t[3*i+1],u=t[3*i+2],d=t[3*r],p=t[3*r+1],A=t[3*r+2],f=t[3*s],m=t[3*s+1],g=t[3*s+2];return Math.abs(a-h)\u003CMath.abs(o-c)?[new Ln(o,1-l),new Ln(c,1-u),new Ln(d,1-A),new Ln(f,1-g)]:[new Ln(a,1-l),new Ln(h,1-u),new Ln(p,1-A),new Ln(m,1-g)]}};class Ph extends Kc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type=\"IcosahedronGeometry\",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Ph(e.radius,e.detail)}}class kh extends Kc{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type=\"OctahedronGeometry\",this.parameters={radius:e,detail:t}}static fromJSON(e){return new kh(e.radius,e.detail)}}class Fh extends Wr{constructor(e=.5,t=1,n=8,i=1,r=0,s=2*Math.PI){super(),this.type=\"RingGeometry\",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:s},n=Math.max(3,n);const o=[],a=[],l=[],c=[];let h=e;const u=(t-e)/(i=Math.max(1,i)),d=new ci,p=new Ln;for(let e=0;e\u003C=i;e++){for(let e=0;e\u003C=n;e++){const i=r+e/n*s;d.x=h*Math.cos(i),d.y=h*Math.sin(i),a.push(d.x,d.y,d.z),l.push(0,0,1),p.x=(d.x/t+1)/2,p.y=(d.y/t+1)/2,c.push(p.x,p.y)}h+=u}for(let e=0;e\u003Ci;e++){const t=e*(n+1);for(let e=0;e\u003Cn;e++){const i=e+t,r=i,s=i+n+1,a=i+n+2,l=i+1;o.push(r,s,l),o.push(s,a,l)}}this.setIndex(o),this.setAttribute(\"position\",new Fr(a,3)),this.setAttribute(\"normal\",new Fr(l,3)),this.setAttribute(\"uv\",new Fr(c,2))}static fromJSON(e){return new Fh(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Oh extends Wr{constructor(e=new rh([new Ln(0,.5),new Ln(-.5,-.5),new Ln(.5,-.5)]),t=12){super(),this.type=\"ShapeGeometry\",this.parameters={shapes:e,curveSegments:t};const n=[],i=[],r=[],s=[];let o=0,a=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t\u003Ce.length;t++)l(e[t]),this.addGroup(o,a,t),o+=a,a=0;function l(e){const o=i.length/3,l=e.extractPoints(t);let c=l.shape;const h=l.holes;!1===Sh.isClockWise(c)&&(c=c.reverse());for(let e=0,t=h.length;e\u003Ct;e++){const t=h[e];!0===Sh.isClockWise(t)&&(h[e]=t.reverse())}const u=Sh.triangulateShape(c,h);for(let e=0,t=h.length;e\u003Ct;e++){const t=h[e];c=c.concat(t)}for(let e=0,t=c.length;e\u003Ct;e++){const t=c[e];i.push(t.x,t.y,0),r.push(0,0,1),s.push(t.x,t.y)}for(let e=0,t=u.length;e\u003Ct;e++){const t=u[e],i=t[0]+o,r=t[1]+o,s=t[2]+o;n.push(i,r,s),a+=3}}this.setIndex(n),this.setAttribute(\"position\",new Fr(i,3)),this.setAttribute(\"normal\",new Fr(r,3)),this.setAttribute(\"uv\",new Fr(s,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,i=e.length;n\u003Ci;n++){const i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let i=0,r=e.shapes.length;i\u003Cr;i++){const r=t[e.shapes[i]];n.push(r)}return new Oh(n,e.curveSegments)}}class Qh extends Wr{constructor(e=1,t=32,n=16,i=0,r=2*Math.PI,s=0,o=Math.PI){super(),this.type=\"SphereGeometry\",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:s,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const a=Math.min(s+o,Math.PI);let l=0;const c=[],h=new ci,u=new ci,d=[],p=[],A=[],f=[];for(let d=0;d\u003C=n;d++){const m=[],g=d/n;let v=0;0==d&&0==s?v=.5/t:d==n&&a==Math.PI&&(v=-.5/t);for(let n=0;n\u003C=t;n++){const a=n/t;h.x=-e*Math.cos(i+a*r)*Math.sin(s+g*o),h.y=e*Math.cos(s+g*o),h.z=e*Math.sin(i+a*r)*Math.sin(s+g*o),p.push(h.x,h.y,h.z),u.copy(h).normalize(),A.push(u.x,u.y,u.z),f.push(a+v,1-g),m.push(l++)}c.push(m)}for(let e=0;e\u003Cn;e++)for(let i=0;i\u003Ct;i++){const t=c[e][i+1],r=c[e][i],o=c[e+1][i],l=c[e+1][i+1];(0!==e||s>0)&&d.push(t,r,l),(e!==n-1||a\u003CMath.PI)&&d.push(r,o,l)}this.setIndex(d),this.setAttribute(\"position\",new Fr(p,3)),this.setAttribute(\"normal\",new Fr(A,3)),this.setAttribute(\"uv\",new Fr(f,2))}static fromJSON(e){return new Qh(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Uh extends Kc{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type=\"TetrahedronGeometry\",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Uh(e.radius,e.detail)}}class Nh extends Wr{constructor(e=1,t=.4,n=8,i=6,r=2*Math.PI){super(),this.type=\"TorusGeometry\",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:i,arc:r},n=Math.floor(n),i=Math.floor(i);const s=[],o=[],a=[],l=[],c=new ci,h=new ci,u=new ci;for(let s=0;s\u003C=n;s++)for(let d=0;d\u003C=i;d++){const p=d/i*r,A=s/n*Math.PI*2;h.x=(e+t*Math.cos(A))*Math.cos(p),h.y=(e+t*Math.cos(A))*Math.sin(p),h.z=t*Math.sin(A),o.push(h.x,h.y,h.z),c.x=e*Math.cos(p),c.y=e*Math.sin(p),u.subVectors(h,c).normalize(),a.push(u.x,u.y,u.z),l.push(d/i),l.push(s/n)}for(let e=1;e\u003C=n;e++)for(let t=1;t\u003C=i;t++){const n=(i+1)*e+t-1,r=(i+1)*(e-1)+t-1,o=(i+1)*(e-1)+t,a=(i+1)*e+t;s.push(n,r,a),s.push(r,o,a)}this.setIndex(s),this.setAttribute(\"position\",new Fr(o,3)),this.setAttribute(\"normal\",new Fr(a,3)),this.setAttribute(\"uv\",new Fr(l,2))}static fromJSON(e){return new Nh(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Gh extends Wr{constructor(e=1,t=.4,n=64,i=8,r=2,s=3){super(),this.type=\"TorusKnotGeometry\",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:i,p:r,q:s},n=Math.floor(n),i=Math.floor(i);const o=[],a=[],l=[],c=[],h=new ci,u=new ci,d=new ci,p=new ci,A=new ci,f=new ci,m=new ci;for(let o=0;o\u003C=n;++o){const v=o/n*r*Math.PI*2;g(v,r,s,e,d),g(v+.01,r,s,e,p),f.subVectors(p,d),m.addVectors(p,d),A.crossVectors(f,m),m.crossVectors(A,f),A.normalize(),m.normalize();for(let e=0;e\u003C=i;++e){const r=e/i*Math.PI*2,s=-t*Math.cos(r),p=t*Math.sin(r);h.x=d.x+(s*m.x+p*A.x),h.y=d.y+(s*m.y+p*A.y),h.z=d.z+(s*m.z+p*A.z),a.push(h.x,h.y,h.z),u.subVectors(h,d).normalize(),l.push(u.x,u.y,u.z),c.push(o/n),c.push(e/i)}}for(let e=1;e\u003C=n;e++)for(let t=1;t\u003C=i;t++){const n=(i+1)*(e-1)+(t-1),r=(i+1)*e+(t-1),s=(i+1)*e+t,a=(i+1)*(e-1)+t;o.push(n,r,a),o.push(r,s,a)}function g(e,t,n,i,r){const s=Math.cos(e),o=Math.sin(e),a=n/t*e,l=Math.cos(a);r.x=i*(2+l)*.5*s,r.y=i*(2+l)*o*.5,r.z=i*Math.sin(a)*.5}this.setIndex(o),this.setAttribute(\"position\",new Fr(a,3)),this.setAttribute(\"normal\",new Fr(l,3)),this.setAttribute(\"uv\",new Fr(c,2))}static fromJSON(e){return new Gh(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class zh extends Wr{constructor(e=new Gc(new ci(-1,-1,0),new ci(-1,1,0),new ci(1,1,0)),t=64,n=1,i=8,r=!1){super(),this.type=\"TubeGeometry\",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r};const s=e.computeFrenetFrames(t,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;const o=new ci,a=new ci,l=new Ln;let c=new ci;const h=[],u=[],d=[],p=[];function A(r){c=e.getPointAt(r/t,c);const l=s.normals[r],d=s.binormals[r];for(let e=0;e\u003C=i;e++){const t=e/i*Math.PI*2,r=Math.sin(t),s=-Math.cos(t);a.x=s*l.x+r*d.x,a.y=s*l.y+r*d.y,a.z=s*l.z+r*d.z,a.normalize(),u.push(a.x,a.y,a.z),o.x=c.x+n*a.x,o.y=c.y+n*a.y,o.z=c.z+n*a.z,h.push(o.x,o.y,o.z)}}!function(){for(let e=0;e\u003Ct;e++)A(e);A(!1===r?t:0),function(){for(let e=0;e\u003C=t;e++)for(let n=0;n\u003C=i;n++)l.x=e/t,l.y=n/i,d.push(l.x,l.y)}(),function(){for(let e=1;e\u003C=t;e++)for(let t=1;t\u003C=i;t++){const n=(i+1)*(e-1)+(t-1),r=(i+1)*e+(t-1),s=(i+1)*e+t,o=(i+1)*(e-1)+t;p.push(n,r,o),p.push(r,s,o)}}()}(),this.setIndex(p),this.setAttribute(\"position\",new Fr(h,3)),this.setAttribute(\"normal\",new Fr(u,3)),this.setAttribute(\"uv\",new Fr(d,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new zh((new Hc[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Hh extends Wr{constructor(e=null){if(super(),this.type=\"WireframeGeometry\",this.parameters={geometry:e},null!==e){const t=[],n=new Set,i=new ci,r=new ci;if(null!==e.index){const s=e.attributes.position,o=e.index;let a=e.groups;0===a.length&&(a=[{start:0,count:o.count,materialIndex:0}]);for(let e=0,l=a.length;e\u003Cl;++e){const l=a[e],c=l.start;for(let e=c,a=c+l.count;e\u003Ca;e+=3)for(let a=0;a\u003C3;a++){const l=o.getX(e+a),c=o.getX(e+(a+1)%3);i.fromBufferAttribute(s,l),r.fromBufferAttribute(s,c),!0===Vh(i,r,n)&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const s=e.attributes.position;for(let e=0,o=s.count/3;e\u003Co;e++)for(let o=0;o\u003C3;o++){const a=3*e+o,l=3*e+(o+1)%3;i.fromBufferAttribute(s,a),r.fromBufferAttribute(s,l),!0===Vh(i,r,n)&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute(\"position\",new Fr(t,3))}}}function Vh(e,t,n){const i=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,r=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(i)&&!0!==n.has(r)&&(n.add(i),n.add(r),!0)}var Wh=Object.freeze({__proto__:null,BoxGeometry:us,CapsuleGeometry:qc,CircleGeometry:Yc,ConeGeometry:Jc,CylinderGeometry:Xc,DodecahedronGeometry:Zc,EdgesGeometry:ih,ExtrudeGeometry:Dh,IcosahedronGeometry:Ph,LatheGeometry:jc,OctahedronGeometry:kh,PlaneGeometry:Ds,PolyhedronGeometry:Kc,RingGeometry:Fh,ShapeGeometry:Oh,SphereGeometry:Qh,TetrahedronGeometry:Uh,TorusGeometry:Nh,TorusKnotGeometry:Gh,TubeGeometry:zh,WireframeGeometry:Hh});class jh extends wr{constructor(e){super(),this.isShadowMaterial=!0,this.type=\"ShadowMaterial\",this.color=new Yn(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class qh extends ms{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type=\"RawShaderMaterial\"}}class Yh extends wr{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:\"\"},this.type=\"MeshStandardMaterial\",this.color=new Yn(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Yn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ft,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:\"\"},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Xh extends Yh{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:\"\",PHYSICAL:\"\"},this.type=\"MeshPhysicalMaterial\",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Ln(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,\"reflectivity\",{get:function(){return xn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Yn(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Yn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Yn(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._iridescence=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:\"\",PHYSICAL:\"\"},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class Jh extends wr{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type=\"MeshPhongMaterial\",this.color=new Yn(16777215),this.specular=new Yn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Yn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ft,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Kh extends wr{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:\"\"},this.type=\"MeshToonMaterial\",this.color=new Yn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Yn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ft,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class Zh extends wr{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type=\"MeshNormalMaterial\",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ft,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class $h extends wr{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type=\"MeshLambertMaterial\",this.color=new Yn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Yn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ft,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class eu extends wr{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:\"\"},this.type=\"MeshMatcapMaterial\",this.color=new Yn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ft,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:\"\"},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class tu extends tc{constructor(e){super(),this.isLineDashedMaterial=!0,this.type=\"LineDashedMaterial\",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function nu(e,t,n){return ru(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)}function iu(e,t,n){return!e||!n&&e.constructor===t?e:\"number\"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function ru(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function su(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n}function ou(e,t,n){const i=e.length,r=new e.constructor(i);for(let s=0,o=0;o!==i;++s){const i=n[s]*t;for(let n=0;n!==t;++n)r[o++]=e[i+n]}return r}function au(e,t,n,i){let r=1,s=e[0];for(;void 0!==s&&void 0===s[i];)s=e[r++];if(void 0===s)return;let o=s[i];if(void 0!==o)if(Array.isArray(o))do{o=s[i],void 0!==o&&(t.push(s.time),n.push.apply(n,o)),s=e[r++]}while(void 0!==s);else if(void 0!==o.toArray)do{o=s[i],void 0!==o&&(t.push(s.time),o.toArray(n,n.length)),s=e[r++]}while(void 0!==s);else do{o=s[i],void 0!==o&&(t.push(s.time),n.push(o)),s=e[r++]}while(void 0!==s)}var lu=Object.freeze({__proto__:null,arraySlice:nu,convertArray:iu,isTypedArray:ru,getKeyframeOrder:su,sortedArray:ou,flattenJSON:au,subclip:function(e,t,n,i,r=30){const s=e.clone();s.name=t;const o=[];for(let e=0;e\u003Cs.tracks.length;++e){const t=s.tracks[e],a=t.getValueSize(),l=[],c=[];for(let e=0;e\u003Ct.times.length;++e){const s=t.times[e]*r;if(!(s\u003Cn||s>=i)){l.push(t.times[e]);for(let n=0;n\u003Ca;++n)c.push(t.values[e*a+n])}}0!==l.length&&(t.times=iu(l,t.times.constructor),t.values=iu(c,t.values.constructor),o.push(t))}s.tracks=o;let a=1/0;for(let e=0;e\u003Cs.tracks.length;++e)a>s.tracks[e].times[0]&&(a=s.tracks[e].times[0]);for(let e=0;e\u003Cs.tracks.length;++e)s.tracks[e].shift(-1*a);return s.resetDuration(),s},makeClipAdditive:function(e,t=0,n=e,i=30){i\u003C=0&&(i=30);const r=n.tracks.length,s=t/i;for(let t=0;t\u003Cr;++t){const i=n.tracks[t],r=i.ValueTypeName;if(\"bool\"===r||\"string\"===r)continue;const o=e.tracks.find((function(e){return e.name===i.name&&e.ValueTypeName===r}));if(void 0===o)continue;let a=0;const l=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(a=l/3);let c=0;const h=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=h/3);const u=i.times.length-1;let d;if(s\u003C=i.times[0]){const e=a,t=l-a;d=nu(i.values,e,t)}else if(s>=i.times[u]){const e=u*l+a,t=e+l-a;d=nu(i.values,e,t)}else{const e=i.createInterpolant(),t=a,n=l-a;e.evaluate(s),d=nu(e.resultBuffer,t,n)}\"quaternion\"===r&&(new li).fromArray(d).normalize().conjugate().toArray(d);const p=o.times.length;for(let e=0;e\u003Cp;++e){const t=e*h+c;if(\"quaternion\"===r)li.multiplyQuaternionsFlat(o.values,t,d,0,o.values,t);else{const e=h-2*c;for(let n=0;n\u003Ce;++n)o.values[t+n]-=d[n]}}}return e.blendMode=Bt,e}});class cu{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{let s;n:{i:if(!(e\u003Ci)){for(let s=n+2;;){if(void 0===i){if(e\u003Cr)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===s)break;if(r=i,i=t[++n],e\u003Ci)break t}s=t.length;break n}if(e>=r)break e;{const o=t[1];e\u003Co&&(n=2,r=o);for(let s=n-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(n===s)break;if(i=r,r=t[--n-1],e>=r)break t}s=n,n=0}}for(;n\u003Cs;){const i=n+s>>>1;e\u003Ct[i]?s=i:n=i+1}if(i=t[n],r=t[n-1],void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===i)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let e=0;e!==i;++e)t[e]=n[r+e];return t}interpolate_(){throw new Error(\"call to abstract method\")}intervalChanged_(){}}class hu extends cu{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Ct,endingEnd:Ct}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,s=e+1,o=i[r],a=i[s];if(void 0===o)switch(this.getSettings_().endingStart){case Mt:r=e,o=2*t-n;break;case _t:r=i.length-2,o=t+i[r]-i[r+1];break;default:r=e,o=n}if(void 0===a)switch(this.getSettings_().endingEnd){case Mt:s=e,a=2*n-t;break;case _t:s=1,a=n+i[1]-i[0];break;default:s=e-1,a=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(a-n),this._offsetPrev=r*c,this._offsetNext=s*c}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=e*o,l=a-o,c=this._offsetPrev,h=this._offsetNext,u=this._weightPrev,d=this._weightNext,p=(n-t)/(i-t),A=p*p,f=A*p,m=-u*f+2*u*A-u*p,g=(1+u)*f+(-1.5-2*u)*A+(-.5+u)*p+1,v=(-1-d)*f+(1.5+d)*A+.5*p,y=d*f-d*A;for(let e=0;e!==o;++e)r[e]=m*s[c+e]+g*s[l+e]+v*s[a+e]+y*s[h+e];return r}}class uu extends cu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=e*o,l=a-o,c=(n-t)/(i-t),h=1-c;for(let e=0;e!==o;++e)r[e]=s[l+e]*h+s[a+e]*c;return r}}class du extends cu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class pu{constructor(e,t,n,i){if(void 0===e)throw new Error(\"THREE.KeyframeTrack: track name is undefined\");if(void 0===t||0===t.length)throw new Error(\"THREE.KeyframeTrack: no keyframes in track named \"+e);this.name=e,this.times=iu(t,this.TimeBufferType),this.values=iu(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:iu(e.times,Array),values:iu(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new du(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new uu(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new hu(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case bt:t=this.InterpolantFactoryMethodDiscrete;break;case xt:t=this.InterpolantFactoryMethodLinear;break;case wt:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t=\"unsupported interpolation for \"+this.ValueTypeName+\" keyframe track named \"+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn(\"THREE.KeyframeTrack:\",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return bt;case this.InterpolantFactoryMethodLinear:return xt;case this.InterpolantFactoryMethodSmooth:return wt}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,s=i-1;for(;r!==i&&n[r]\u003Ce;)++r;for(;-1!==s&&n[s]>t;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const e=this.getValueSize();this.times=nu(n,r,s),this.values=nu(this.values,r*e,s*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error(\"THREE.KeyframeTrack: Invalid value size in track.\",this),e=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error(\"THREE.KeyframeTrack: Track is empty.\",this),e=!1);let s=null;for(let t=0;t!==r;t++){const i=n[t];if(\"number\"==typeof i&&isNaN(i)){console.error(\"THREE.KeyframeTrack: Time is not a valid number.\",this,t,i),e=!1;break}if(null!==s&&s>i){console.error(\"THREE.KeyframeTrack: Out of order keys.\",this,t,i,s),e=!1;break}s=i}if(void 0!==i&&ru(i))for(let t=0,n=i.length;t!==n;++t){const n=i[t];if(isNaN(n)){console.error(\"THREE.KeyframeTrack: Value is not a valid number.\",this,t,n),e=!1;break}}return e}optimize(){const e=nu(this.times),t=nu(this.values),n=this.getValueSize(),i=this.getInterpolation()===wt,r=e.length-1;let s=1;for(let o=1;o\u003Cr;++o){let r=!1;const a=e[o];if(a!==e[o+1]&&(1!==o||a!==e[0]))if(i)r=!0;else{const e=o*n,i=e-n,s=e+n;for(let o=0;o!==n;++o){const n=t[e+o];if(n!==t[i+o]||n!==t[s+o]){r=!0;break}}}if(r){if(o!==s){e[s]=e[o];const i=o*n,r=s*n;for(let e=0;e!==n;++e)t[r+e]=t[i+e]}++s}}if(r>0){e[s]=e[r];for(let e=r*n,i=s*n,o=0;o!==n;++o)t[i+o]=t[e+o];++s}return s!==e.length?(this.times=nu(e,0,s),this.values=nu(t,0,s*n)):(this.times=e,this.values=t),this}clone(){const e=nu(this.times,0),t=nu(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}pu.prototype.TimeBufferType=Float32Array,pu.prototype.ValueBufferType=Float32Array,pu.prototype.DefaultInterpolation=xt;class Au extends pu{}Au.prototype.ValueTypeName=\"bool\",Au.prototype.ValueBufferType=Array,Au.prototype.DefaultInterpolation=bt,Au.prototype.InterpolantFactoryMethodLinear=void 0,Au.prototype.InterpolantFactoryMethodSmooth=void 0;class fu extends pu{}fu.prototype.ValueTypeName=\"color\";class mu extends pu{}mu.prototype.ValueTypeName=\"number\";class gu extends cu{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=(n-t)/(i-t);let l=e*o;for(let e=l+o;l!==e;l+=4)li.slerpFlat(r,0,s,l-o,s,l,a);return r}}class vu extends pu{InterpolantFactoryMethodLinear(e){return new gu(this.times,this.values,this.getValueSize(),e)}}vu.prototype.ValueTypeName=\"quaternion\",vu.prototype.DefaultInterpolation=xt,vu.prototype.InterpolantFactoryMethodSmooth=void 0;class yu extends pu{}yu.prototype.ValueTypeName=\"string\",yu.prototype.ValueBufferType=Array,yu.prototype.DefaultInterpolation=bt,yu.prototype.InterpolantFactoryMethodLinear=void 0,yu.prototype.InterpolantFactoryMethodSmooth=void 0;class Eu extends pu{}Eu.prototype.ValueTypeName=\"vector\";class bu{constructor(e,t=-1,n,i=It){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=bn(),this.duration\u003C0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let e=0,r=n.length;e!==r;++e)t.push(xu(n[e]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,i=n.length;e!==i;++e)t.push(pu.toJSON(n[e]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,s=[];for(let e=0;e\u003Cr;e++){let o=[],a=[];o.push((e+r-1)%r,e,(e+1)%r),a.push(0,1,0);const l=su(o);o=ou(o,1,l),a=ou(a,1,l),i||0!==o[0]||(o.push(r),a.push(a[0])),s.push(new mu(\".morphTargetInfluences[\"+t[e].name+\"]\",o,a).scale(1/n))}return new this(e,-1,s)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e\u003Cn.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\\w-]*?)([\\d]+)$/;for(let t=0,n=e.length;t\u003Cn;t++){const n=e[t],s=n.name.match(r);if(s&&s.length>1){const e=s[1];let t=i[e];t||(i[e]=t=[]),t.push(n)}}const s=[];for(const e in i)s.push(this.CreateFromMorphTargetSequence(e,i[e],t,n));return s}static parseAnimation(e,t){if(!e)return console.error(\"THREE.AnimationClip: No animation in JSONLoader data.\"),null;const n=function(e,t,n,i,r){if(0!==n.length){const s=[],o=[];au(n,s,o,i),0!==s.length&&r.push(new e(t,s,o))}},i=[],r=e.name||\"default\",s=e.fps||30,o=e.blendMode;let a=e.length||-1;const l=e.hierarchy||[];for(let e=0;e\u003Cl.length;e++){const r=l[e].keys;if(r&&0!==r.length)if(r[0].morphTargets){const e={};let t;for(t=0;t\u003Cr.length;t++)if(r[t].morphTargets)for(let n=0;n\u003Cr[t].morphTargets.length;n++)e[r[t].morphTargets[n]]=-1;for(const n in e){const e=[],s=[];for(let i=0;i!==r[t].morphTargets.length;++i){const i=r[t];e.push(i.time),s.push(i.morphTarget===n?1:0)}i.push(new mu(\".morphTargetInfluence[\"+n+\"]\",e,s))}a=e.length*s}else{const s=\".bones[\"+t[e].name+\"]\";n(Eu,s+\".position\",r,\"pos\",i),n(vu,s+\".quaternion\",r,\"rot\",i),n(Eu,s+\".scale\",r,\"scl\",i)}}return 0===i.length?null:new this(r,a,i,o)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e\u003Cthis.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t\u003Cthis.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e\u003Cthis.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t\u003Cthis.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function xu(e){if(void 0===e.type)throw new Error(\"THREE.KeyframeTrack: track type undefined, can not parse\");const t=function(e){switch(e.toLowerCase()){case\"scalar\":case\"double\":case\"float\":case\"number\":case\"integer\":return mu;case\"vector\":case\"vector2\":case\"vector3\":case\"vector4\":return Eu;case\"color\":return fu;case\"quaternion\":return vu;case\"bool\":case\"boolean\":return Au;case\"string\":return yu}throw new Error(\"THREE.KeyframeTrack: Unsupported typeName: \"+e)}(e.type);if(void 0===e.times){const t=[],n=[];au(e.keys,t,n,\"value\"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const wu={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class Cu{constructor(e,t,n){const i=this;let r,s=!1,o=0,a=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===s&&void 0!==i.onStart&&i.onStart(e,o,a),s=!0},this.itemEnd=function(e){o++,void 0!==i.onProgress&&i.onProgress(e,o,a),o===a&&(s=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return r?r(e):e},this.setURLModifier=function(e){return r=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t\u003Cn;t+=2){const n=l[t],i=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}}const Mu=new Cu;class _u{constructor(e){this.manager=void 0!==e?e:Mu,this.crossOrigin=\"anonymous\",this.withCredentials=!1,this.path=\"\",this.resourcePath=\"\",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(i,r){n.load(e,i,t,r)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Iu={};class Bu extends Error{constructor(e,t){super(e),this.response=t}}class Su extends _u{constructor(e){super(e)}load(e,t,n,i){void 0===e&&(e=\"\"),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=wu.get(e);if(void 0!==r)return this.manager.itemStart(e),setTimeout((()=>{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==Iu[e])return void Iu[e].push({onLoad:t,onProgress:n,onError:i});Iu[e]=[],Iu[e].push({onLoad:t,onProgress:n,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?\"include\":\"same-origin\"}),o=this.mimeType,a=this.responseType;fetch(s).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn(\"THREE.FileLoader: HTTP Status 0 received.\"),\"undefined\"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Iu[e],i=t.body.getReader(),r=t.headers.get(\"Content-Length\")||t.headers.get(\"X-File-Size\"),s=r?parseInt(r):0,o=0!==s;let a=0;const l=new ReadableStream({start(e){!function t(){i.read().then((({done:i,value:r})=>{if(i)e.close();else{a+=r.byteLength;const i=new ProgressEvent(\"progress\",{lengthComputable:o,loaded:a,total:s});for(let e=0,t=n.length;e\u003Ct;e++){const t=n[e];t.onProgress&&t.onProgress(i)}e.enqueue(r),t()}}))}()}});return new Response(l)}throw new Bu(`fetch for \"${t.url}\" responded with ${t.status}: ${t.statusText}`,t)})).then((e=>{switch(a){case\"arraybuffer\":return e.arrayBuffer();case\"blob\":return e.blob();case\"document\":return e.text().then((e=>(new DOMParser).parseFromString(e,o)));case\"json\":return e.json();default:if(void 0===o)return e.text();{const t=/charset=\"?([^;\"\\s]*)\"?/i.exec(o),n=t&&t[1]?t[1].toLowerCase():void 0,i=new TextDecoder(n);return e.arrayBuffer().then((e=>i.decode(e)))}}})).then((t=>{wu.add(e,t);const n=Iu[e];delete Iu[e];for(let e=0,i=n.length;e\u003Ci;e++){const i=n[e];i.onLoad&&i.onLoad(t)}})).catch((t=>{const n=Iu[e];if(void 0===n)throw this.manager.itemError(e),t;delete Iu[e];for(let e=0,i=n.length;e\u003Ci;e++){const i=n[e];i.onError&&i.onError(t)}this.manager.itemError(e)})).finally((()=>{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Tu extends _u{constructor(e){super(e)}load(e,t,n,i){const r=this,s=new Su(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}}),n,i)}parse(e){const t=[];for(let n=0;n\u003Ce.length;n++){const i=bu.parse(e[n]);t.push(i)}return t}}class Lu extends _u{constructor(e){super(e)}load(e,t,n,i){const r=this,s=[],o=new bc,a=new Su(this.manager);a.setPath(this.path),a.setResponseType(\"arraybuffer\"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(r.withCredentials);let l=0;function c(c){a.load(e[c],(function(e){const n=r.parse(e,!0);s[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(o.minFilter=ve),o.image=s,o.format=n.format,o.needsUpdate=!0,t&&t(o))}),n,i)}if(Array.isArray(e))for(let t=0,n=e.length;t\u003Cn;++t)c(t);else a.load(e,(function(e){const n=r.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t\u003Ce;t++){s[t]={mipmaps:[]};for(let e=0;e\u003Cn.mipmapCount;e++)s[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),s[t].format=n.format,s[t].width=n.width,s[t].height=n.height}o.image=s}else o.image.width=n.width,o.image.height=n.height,o.mipmaps=n.mipmaps;1===n.mipmapCount&&(o.minFilter=ve),o.format=n.format,o.needsUpdate=!0,t&&t(o)}),n,i);return o}}class Du extends _u{constructor(e){super(e)}load(e,t,n,i){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,s=wu.get(e);if(void 0!==s)return r.manager.itemStart(e),setTimeout((function(){t&&t(s),r.manager.itemEnd(e)}),0),s;const o=On(\"img\");function a(){c(),wu.add(e,this),t&&t(this),r.manager.itemEnd(e)}function l(t){c(),i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)}function c(){o.removeEventListener(\"load\",a,!1),o.removeEventListener(\"error\",l,!1)}return o.addEventListener(\"load\",a,!1),o.addEventListener(\"error\",l,!1),\"data:\"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(e),o.src=e,o}}class Ru extends _u{constructor(e){super(e)}load(e,t,n,i){const r=new bs,s=new Du(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);let o=0;function a(n){s.load(e[n],(function(e){r.images[n]=e,o++,6===o&&(r.needsUpdate=!0,t&&t(r))}),void 0,i)}for(let t=0;t\u003Ce.length;++t)a(t);return r}}class Pu extends _u{constructor(e){super(e)}load(e,t,n,i){const r=this,s=new Vl,o=new Su(this.manager);return o.setResponseType(\"arraybuffer\"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(r.withCredentials),o.load(e,(function(e){const n=r.parse(e);n&&(void 0!==n.image?s.image=n.image:void 0!==n.data&&(s.image.width=n.width,s.image.height=n.height,s.image.data=n.data),s.wrapS=void 0!==n.wrapS?n.wrapS:ue,s.wrapT=void 0!==n.wrapT?n.wrapT:ue,s.magFilter=void 0!==n.magFilter?n.magFilter:ve,s.minFilter=void 0!==n.minFilter?n.minFilter:ve,s.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(s.encoding=n.encoding),void 0!==n.flipY&&(s.flipY=n.flipY),void 0!==n.format&&(s.format=n.format),void 0!==n.type&&(s.type=n.type),void 0!==n.mipmaps&&(s.mipmaps=n.mipmaps,s.minFilter=be),1===n.mipmapCount&&(s.minFilter=ve),void 0!==n.generateMipmaps&&(s.generateMipmaps=n.generateMipmaps),s.needsUpdate=!0,t&&t(s,n))}),n,i),s}}class ku extends _u{constructor(e){super(e)}load(e,t,n,i){const r=new ei,s=new Du(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,(function(e){r.image=e,r.needsUpdate=!0,void 0!==t&&t(r)}),n,i),r}}class Fu extends hr{constructor(e,t=1){super(),this.isLight=!0,this.type=\"Light\",this.color=new Yn(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}class Ou extends Fu{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type=\"HemisphereLight\",this.position.copy(hr.DefaultUp),this.updateMatrix(),this.groundColor=new Yn(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const Qu=new Ui,Uu=new ci,Nu=new ci;class Gu{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ln(512,512),this.map=null,this.mapPass=null,this.matrix=new Ui,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ss,this._frameExtents=new Ln(1,1),this._viewportCount=1,this._viewports=[new ti(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Uu.setFromMatrixPosition(e.matrixWorld),t.position.copy(Uu),Nu.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Nu),t.updateMatrixWorld(),Qu.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Qu),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Qu)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class zu extends Gu{constructor(){super(new vs(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=2*En*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;n===t.fov&&i===t.aspect&&r===t.far||(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class Hu extends Fu{constructor(e,t,n=0,i=Math.PI/3,r=0,s=2){super(e,t),this.isSpotLight=!0,this.type=\"SpotLight\",this.position.copy(hr.DefaultUp),this.updateMatrix(),this.target=new hr,this.distance=n,this.angle=i,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new zu}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Vu=new Ui,Wu=new ci,ju=new ci;class qu extends Gu{constructor(){super(new vs(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ln(4,2),this._viewportCount=6,this._viewports=[new ti(2,1,1,1),new ti(0,1,1,1),new ti(3,1,1,1),new ti(1,1,1,1),new ti(3,0,1,1),new ti(1,0,1,1)],this._cubeDirections=[new ci(1,0,0),new ci(-1,0,0),new ci(0,0,1),new ci(0,0,-1),new ci(0,1,0),new ci(0,-1,0)],this._cubeUps=[new ci(0,1,0),new ci(0,1,0),new ci(0,1,0),new ci(0,1,0),new ci(0,0,1),new ci(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),Wu.setFromMatrixPosition(e.matrixWorld),n.position.copy(Wu),ju.copy(n.position),ju.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ju),n.updateMatrixWorld(),i.makeTranslation(-Wu.x,-Wu.y,-Wu.z),Vu.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Vu)}}class Yu extends Fu{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type=\"PointLight\",this.distance=n,this.decay=i,this.shadow=new qu}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Xu extends Gu{constructor(){super(new Hs(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Ju extends Fu{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type=\"DirectionalLight\",this.position.copy(hr.DefaultUp),this.updateMatrix(),this.target=new hr,this.shadow=new Xu}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class Ku extends Fu{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type=\"AmbientLight\"}}class Zu extends Fu{constructor(e,t,n=10,i=10){super(e,t),this.isRectAreaLight=!0,this.type=\"RectAreaLight\",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class $u{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e\u003C9;e++)this.coefficients.push(new ci)}set(e){for(let t=0;t\u003C9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e\u003C9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,i=e.y,r=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.282095),t.addScaledVector(s[1],.488603*i),t.addScaledVector(s[2],.488603*r),t.addScaledVector(s[3],.488603*n),t.addScaledVector(s[4],n*i*1.092548),t.addScaledVector(s[5],i*r*1.092548),t.addScaledVector(s[6],.315392*(3*r*r-1)),t.addScaledVector(s[7],n*r*1.092548),t.addScaledVector(s[8],.546274*(n*n-i*i)),t}getIrradianceAt(e,t){const n=e.x,i=e.y,r=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.886227),t.addScaledVector(s[1],1.023328*i),t.addScaledVector(s[2],1.023328*r),t.addScaledVector(s[3],1.023328*n),t.addScaledVector(s[4],.858086*n*i),t.addScaledVector(s[5],.858086*i*r),t.addScaledVector(s[6],.743125*r*r-.247708),t.addScaledVector(s[7],.858086*n*r),t.addScaledVector(s[8],.429043*(n*n-i*i)),t}add(e){for(let t=0;t\u003C9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n\u003C9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t\u003C9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n\u003C9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t\u003C9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let i=0;i\u003C9;i++)n[i].fromArray(e,t+3*i);return this}toArray(e=[],t=0){const n=this.coefficients;for(let i=0;i\u003C9;i++)n[i].toArray(e,t+3*i);return e}static getBasisAt(e,t){const n=e.x,i=e.y,r=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*r,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*n*r,t[8]=.546274*(n*n-i*i)}}class ed extends Fu{constructor(e=new $u,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class td extends _u{constructor(e){super(e),this.textures={}}load(e,t,n,i){const r=this,s=new Su(r.manager);s.setPath(r.path),s.setRequestHeader(r.requestHeader),s.setWithCredentials(r.withCredentials),s.load(e,(function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}}),n,i)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn(\"THREE.MaterialLoader: Undefined texture\",e),t[e]}const i=td.createMaterialFromType(e.type);if(void 0!==e.uuid&&(i.uuid=e.uuid),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&void 0!==i.color&&i.color.setHex(e.color),void 0!==e.roughness&&(i.roughness=e.roughness),void 0!==e.metalness&&(i.metalness=e.metalness),void 0!==e.sheen&&(i.sheen=e.sheen),void 0!==e.sheenColor&&(i.sheenColor=(new Yn).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(i.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==i.emissive&&i.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==i.specular&&i.specular.setHex(e.specular),void 0!==e.specularIntensity&&(i.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==i.specularColor&&i.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(i.shininess=e.shininess),void 0!==e.clearcoat&&(i.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(i.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.iridescence&&(i.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(i.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(i.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(i.transmission=e.transmission),void 0!==e.thickness&&(i.thickness=e.thickness),void 0!==e.attenuationDistance&&(i.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==i.attenuationColor&&i.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(i.fog=e.fog),void 0!==e.flatShading&&(i.flatShading=e.flatShading),void 0!==e.blending&&(i.blending=e.blending),void 0!==e.combine&&(i.combine=e.combine),void 0!==e.side&&(i.side=e.side),void 0!==e.shadowSide&&(i.shadowSide=e.shadowSide),void 0!==e.opacity&&(i.opacity=e.opacity),void 0!==e.transparent&&(i.transparent=e.transparent),void 0!==e.alphaTest&&(i.alphaTest=e.alphaTest),void 0!==e.depthTest&&(i.depthTest=e.depthTest),void 0!==e.depthWrite&&(i.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(i.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(i.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(i.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(i.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(i.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(i.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(i.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(i.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(i.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(i.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(i.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(i.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(i.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(i.rotation=e.rotation),1!==e.linewidth&&(i.linewidth=e.linewidth),void 0!==e.dashSize&&(i.dashSize=e.dashSize),void 0!==e.gapSize&&(i.gapSize=e.gapSize),void 0!==e.scale&&(i.scale=e.scale),void 0!==e.polygonOffset&&(i.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(i.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(i.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(i.dithering=e.dithering),void 0!==e.alphaToCoverage&&(i.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(i.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.toneMapped&&(i.toneMapped=e.toneMapped),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.vertexColors&&(\"number\"==typeof e.vertexColors?i.vertexColors=e.vertexColors>0:i.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const r=e.uniforms[t];switch(i.uniforms[t]={},r.type){case\"t\":i.uniforms[t].value=n(r.value);break;case\"c\":i.uniforms[t].value=(new Yn).setHex(r.value);break;case\"v2\":i.uniforms[t].value=(new Ln).fromArray(r.value);break;case\"v3\":i.uniforms[t].value=(new ci).fromArray(r.value);break;case\"v4\":i.uniforms[t].value=(new ti).fromArray(r.value);break;case\"m3\":i.uniforms[t].value=(new Dn).fromArray(r.value);break;case\"m4\":i.uniforms[t].value=(new Ui).fromArray(r.value);break;default:i.uniforms[t].value=r.value}}if(void 0!==e.defines&&(i.defines=e.defines),void 0!==e.vertexShader&&(i.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(i.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(i.glslVersion=e.glslVersion),void 0!==e.extensions)for(const t in e.extensions)i.extensions[t]=e.extensions[t];if(void 0!==e.size&&(i.size=e.size),void 0!==e.sizeAttenuation&&(i.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(i.map=n(e.map)),void 0!==e.matcap&&(i.matcap=n(e.matcap)),void 0!==e.alphaMap&&(i.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(i.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(i.bumpScale=e.bumpScale),void 0!==e.normalMap&&(i.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(i.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),i.normalScale=(new Ln).fromArray(t)}return void 0!==e.displacementMap&&(i.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(i.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(i.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(i.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(i.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(i.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(i.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(i.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(i.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(i.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(i.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(i.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(i.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(i.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(i.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(i.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(i.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(i.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(i.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(i.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(i.clearcoatNormalScale=(new Ln).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(i.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(i.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(i.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(i.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(i.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(i.sheenRoughnessMap=n(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:jh,SpriteMaterial:vl,RawShaderMaterial:qh,ShaderMaterial:ms,PointsMaterial:dc,MeshPhysicalMaterial:Xh,MeshStandardMaterial:Yh,MeshPhongMaterial:Jh,MeshToonMaterial:Kh,MeshNormalMaterial:Zh,MeshLambertMaterial:$h,MeshDepthMaterial:qa,MeshDistanceMaterial:Ya,MeshBasicMaterial:Cr,MeshMatcapMaterial:eu,LineDashedMaterial:tu,LineBasicMaterial:tc,Material:wr}[e]}}class nd{static decodeText(e){if(\"undefined\"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t=\"\";for(let n=0,i=e.length;n\u003Ci;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf(\"/\");return-1===t?\"./\":e.slice(0,t+1)}static resolveURL(e,t){return\"string\"!=typeof e||\"\"===e?\"\":(/^https?:\\/\\//i.test(t)&&/^\\//.test(e)&&(t=t.replace(/(^https?:\\/\\/[^\\/]+).*/i,\"$1\")),/^(https?:)?\\/\\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class id extends Wr{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=\"InstancedBufferGeometry\",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class rd extends _u{constructor(e){super(e)}load(e,t,n,i){const r=this,s=new Su(r.manager);s.setPath(r.path),s.setRequestHeader(r.requestHeader),s.setWithCredentials(r.withCredentials),s.load(e,(function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}}),n,i)}parse(e){const t={},n={};function i(e,i){if(void 0!==t[i])return t[i];const r=e.interleavedBuffers[i],s=function(e,t){if(void 0!==n[t])return n[t];const i=e.arrayBuffers[t],r=new Uint32Array(i).buffer;return n[t]=r,r}(e,r.buffer),o=Fn(r.type,s),a=new fl(o,r.stride);return a.uuid=r.uuid,t[i]=a,a}const r=e.isInstancedBufferGeometry?new id:new Wr,s=e.data.index;if(void 0!==s){const e=Fn(s.type,s.array);r.setIndex(new Ir(e,1))}const o=e.data.attributes;for(const t in o){const n=o[t];let s;if(n.isInterleavedBufferAttribute){const t=i(e.data,n.data);s=new gl(t,n.itemSize,n.offset,n.normalized)}else{const e=Fn(n.type,n.array);s=new(n.isInstancedBufferAttribute?Yl:Ir)(e,n.itemSize,n.normalized)}void 0!==n.name&&(s.name=n.name),void 0!==n.usage&&s.setUsage(n.usage),void 0!==n.updateRange&&(s.updateRange.offset=n.updateRange.offset,s.updateRange.count=n.updateRange.count),r.setAttribute(t,s)}const a=e.data.morphAttributes;if(a)for(const t in a){const n=a[t],s=[];for(let t=0,r=n.length;t\u003Cr;t++){const r=n[t];let o;if(r.isInterleavedBufferAttribute){const t=i(e.data,r.data);o=new gl(t,r.itemSize,r.offset,r.normalized)}else{const e=Fn(r.type,r.array);o=new Ir(e,r.itemSize,r.normalized)}void 0!==r.name&&(o.name=r.name),s.push(o)}r.morphAttributes[t]=s}e.data.morphTargetsRelative&&(r.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){const t=l[e];r.addGroup(t.start,t.count,t.materialIndex)}const c=e.data.boundingSphere;if(void 0!==c){const e=new ci;void 0!==c.center&&e.fromArray(c.center),r.boundingSphere=new Ti(e,c.radius)}return e.name&&(r.name=e.name),e.userData&&(r.userData=e.userData),r}}class sd extends _u{constructor(e){super(e)}load(e,t,n,i){const r=this,s=\"\"===this.path?nd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||s;const o=new Su(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){let s=null;try{s=JSON.parse(n)}catch(t){return void 0!==i&&i(t),void console.error(\"THREE:ObjectLoader: Can't parse \"+e+\".\",t.message)}const o=s.metadata;if(void 0===o||void 0===o.type||\"geometry\"===o.type.toLowerCase())return void 0!==i&&i(new Error(\"THREE.ObjectLoader: Can't load \"+e)),void console.error(\"THREE.ObjectLoader: Can't load \"+e);r.parse(s,t)}),n,i)}async loadAsync(e,t){const n=\"\"===this.path?nd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const i=new Su(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);const r=await i.loadAsync(e,t),s=JSON.parse(r),o=s.metadata;if(void 0===o||void 0===o.type||\"geometry\"===o.type.toLowerCase())throw new Error(\"THREE.ObjectLoader: Can't load \"+e);return await this.parseAsync(s)}parse(e,t){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),s=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),o=this.parseTextures(e.textures,s),a=this.parseMaterials(e.materials,o),l=this.parseObject(e.object,r,a,o,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){let e=!1;for(const t in s)if(s[t].data instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),r=await this.parseImagesAsync(e.images),s=this.parseTextures(e.textures,r),o=this.parseMaterials(e.materials,s),a=this.parseObject(e.object,i,o,s,t),l=this.parseSkeletons(e.skeletons,a);return this.bindSkeletons(a,l),a}parseShapes(e){const t={};if(void 0!==e)for(let n=0,i=e.length;n\u003Ci;n++){const i=(new rh).fromJSON(e[n]);t[i.uuid]=i}return t}parseSkeletons(e,t){const n={},i={};if(t.traverse((function(e){e.isBone&&(i[e.uuid]=e)})),void 0!==e)for(let t=0,r=e.length;t\u003Cr;t++){const r=(new ql).fromJSON(e[t],i);n[r.uuid]=r}return n}parseGeometries(e,t){const n={};if(void 0!==e){const i=new rd;for(let r=0,s=e.length;r\u003Cs;r++){let s;const o=e[r];switch(o.type){case\"BufferGeometry\":case\"InstancedBufferGeometry\":s=i.parse(o);break;case\"Geometry\":\"THREE\"in window&&\"LegacyJSONLoader\"in THREE?s=(new THREE.LegacyJSONLoader).parse(o,this.resourcePath).geometry:console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type \"Geometry\".');break;default:o.type in Wh?s=Wh[o.type].fromJSON(o,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type \"${o.type}\"`)}s.uuid=o.uuid,void 0!==o.name&&(s.name=o.name),!0===s.isBufferGeometry&&void 0!==o.userData&&(s.userData=o.userData),n[o.uuid]=s}}return n}parseMaterials(e,t){const n={},i={};if(void 0!==e){const r=new td;r.setTextures(t);for(let t=0,s=e.length;t\u003Cs;t++){const s=e[t];void 0===n[s.uuid]&&(n[s.uuid]=r.parse(s)),i[s.uuid]=n[s.uuid]}}return i}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n\u003Ce.length;n++){const i=e[n],r=bu.parse(i);t[r.uuid]=r}return t}parseImages(e,t){const n=this,i={};let r;function s(e){if(\"string\"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),r.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}(/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:Fn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new Cu(t);r=new Du(n),r.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t\u003Cn;t++){const n=e[t],r=n.url;if(Array.isArray(r)){const e=[];for(let t=0,n=r.length;t\u003Cn;t++){const n=s(r[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new Vl(n.data,n.width,n.height)))}i[n.uuid]=new Kn(e)}else{const e=s(n.url);i[n.uuid]=new Kn(e)}}}return i}async parseImagesAsync(e){const t=this,n={};let i;async function r(e){if(\"string\"==typeof e){const n=e,r=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(n)?n:t.resourcePath+n;return await i.loadAsync(r)}return e.data?{data:Fn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){i=new Du(this.manager),i.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t\u003Ci;t++){const i=e[t],s=i.url;if(Array.isArray(s)){const e=[];for(let t=0,n=s.length;t\u003Cn;t++){const n=s[t],i=await r(n);null!==i&&(i instanceof HTMLImageElement?e.push(i):e.push(new Vl(i.data,i.width,i.height)))}n[i.uuid]=new Kn(e)}else{const e=await r(i.url);n[i.uuid]=new Kn(e)}}}return n}parseTextures(e,t){function n(e,t){return\"number\"==typeof e?e:(console.warn(\"THREE.ObjectLoader.parseTexture: Constant should be in numeric form.\",e),t[e])}const i={};if(void 0!==e)for(let r=0,s=e.length;r\u003Cs;r++){const s=e[r];void 0===s.image&&console.warn('THREE.ObjectLoader: No \"image\" specified for',s.uuid),void 0===t[s.image]&&console.warn(\"THREE.ObjectLoader: Undefined image\",s.image);const o=t[s.image],a=o.data;let l;Array.isArray(a)?(l=new bs,6===a.length&&(l.needsUpdate=!0)):(l=a&&a.data?new Vl:new ei,a&&(l.needsUpdate=!0)),l.source=o,l.uuid=s.uuid,void 0!==s.name&&(l.name=s.name),void 0!==s.mapping&&(l.mapping=n(s.mapping,od)),void 0!==s.offset&&l.offset.fromArray(s.offset),void 0!==s.repeat&&l.repeat.fromArray(s.repeat),void 0!==s.center&&l.center.fromArray(s.center),void 0!==s.rotation&&(l.rotation=s.rotation),void 0!==s.wrap&&(l.wrapS=n(s.wrap[0],ad),l.wrapT=n(s.wrap[1],ad)),void 0!==s.format&&(l.format=s.format),void 0!==s.type&&(l.type=s.type),void 0!==s.encoding&&(l.encoding=s.encoding),void 0!==s.minFilter&&(l.minFilter=n(s.minFilter,ld)),void 0!==s.magFilter&&(l.magFilter=n(s.magFilter,ld)),void 0!==s.anisotropy&&(l.anisotropy=s.anisotropy),void 0!==s.flipY&&(l.flipY=s.flipY),void 0!==s.premultiplyAlpha&&(l.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(l.unpackAlignment=s.unpackAlignment),void 0!==s.userData&&(l.userData=s.userData),i[s.uuid]=l}return i}parseObject(e,t,n,i,r){let s,o,a;function l(e){return void 0===t[e]&&console.warn(\"THREE.ObjectLoader: Undefined geometry\",e),t[e]}function c(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let i=0,r=e.length;i\u003Cr;i++){const r=e[i];void 0===n[r]&&console.warn(\"THREE.ObjectLoader: Undefined material\",r),t.push(n[r])}return t}return void 0===n[e]&&console.warn(\"THREE.ObjectLoader: Undefined material\",e),n[e]}}function h(e){return void 0===i[e]&&console.warn(\"THREE.ObjectLoader: Undefined texture\",e),i[e]}switch(e.type){case\"Scene\":s=new Al,void 0!==e.background&&(Number.isInteger(e.background)?s.background=new Yn(e.background):s.background=h(e.background)),void 0!==e.environment&&(s.environment=h(e.environment)),void 0!==e.fog&&(\"Fog\"===e.fog.type?s.fog=new pl(e.fog.color,e.fog.near,e.fog.far):\"FogExp2\"===e.fog.type&&(s.fog=new dl(e.fog.color,e.fog.density))),void 0!==e.backgroundBlurriness&&(s.backgroundBlurriness=e.backgroundBlurriness);break;case\"PerspectiveCamera\":s=new vs(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(s.focus=e.focus),void 0!==e.zoom&&(s.zoom=e.zoom),void 0!==e.filmGauge&&(s.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(s.filmOffset=e.filmOffset),void 0!==e.view&&(s.view=Object.assign({},e.view));break;case\"OrthographicCamera\":s=new Hs(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(s.zoom=e.zoom),void 0!==e.view&&(s.view=Object.assign({},e.view));break;case\"AmbientLight\":s=new Ku(e.color,e.intensity);break;case\"DirectionalLight\":s=new Ju(e.color,e.intensity);break;case\"PointLight\":s=new Yu(e.color,e.intensity,e.distance,e.decay);break;case\"RectAreaLight\":s=new Zu(e.color,e.intensity,e.width,e.height);break;case\"SpotLight\":s=new Hu(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case\"HemisphereLight\":s=new Ou(e.color,e.groundColor,e.intensity);break;case\"LightProbe\":s=(new ed).fromJSON(e);break;case\"SkinnedMesh\":o=l(e.geometry),a=c(e.material),s=new zl(o,a),void 0!==e.bindMode&&(s.bindMode=e.bindMode),void 0!==e.bindMatrix&&s.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(s.skeleton=e.skeleton);break;case\"Mesh\":o=l(e.geometry),a=c(e.material),s=new cs(o,a);break;case\"InstancedMesh\":o=l(e.geometry),a=c(e.material);const t=e.count,n=e.instanceMatrix,i=e.instanceColor;s=new ec(o,a,t),s.instanceMatrix=new Yl(new Float32Array(n.array),16),void 0!==i&&(s.instanceColor=new Yl(new Float32Array(i.array),i.itemSize));break;case\"LOD\":s=new Fl;break;case\"Line\":s=new ac(l(e.geometry),c(e.material));break;case\"LineLoop\":s=new uc(l(e.geometry),c(e.material));break;case\"LineSegments\":s=new hc(l(e.geometry),c(e.material));break;case\"PointCloud\":case\"Points\":s=new gc(l(e.geometry),c(e.material));break;case\"Sprite\":s=new Dl(c(e.material));break;case\"Group\":s=new $a;break;case\"Bone\":s=new Hl;break;default:s=new hr}if(s.uuid=e.uuid,void 0!==e.name&&(s.name=e.name),void 0!==e.matrix?(s.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(void 0!==e.position&&s.position.fromArray(e.position),void 0!==e.rotation&&s.rotation.fromArray(e.rotation),void 0!==e.quaternion&&s.quaternion.fromArray(e.quaternion),void 0!==e.scale&&s.scale.fromArray(e.scale)),void 0!==e.castShadow&&(s.castShadow=e.castShadow),void 0!==e.receiveShadow&&(s.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(s.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(s.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(s.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&s.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(s.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(s.visible=e.visible),void 0!==e.frustumCulled&&(s.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(s.renderOrder=e.renderOrder),void 0!==e.userData&&(s.userData=e.userData),void 0!==e.layers&&(s.layers.mask=e.layers),void 0!==e.children){const o=e.children;for(let e=0;e\u003Co.length;e++)s.add(this.parseObject(o[e],t,n,i,r))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e\u003Ct.length;e++){const n=t[e];s.animations.push(r[n])}}if(\"LOD\"===e.type){void 0!==e.autoUpdate&&(s.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e\u003Ct.length;e++){const n=t[e],i=s.getObjectByProperty(\"uuid\",n.object);void 0!==i&&s.addLevel(i,n.distance,n.hysteresis)}}return s}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn(\"THREE.ObjectLoader: No skeleton found with UUID:\",e.skeleton):e.bind(n,e.bindMatrix)}}))}}const od={UVMapping:re,CubeReflectionMapping:se,CubeRefractionMapping:oe,EquirectangularReflectionMapping:ae,EquirectangularRefractionMapping:le,CubeUVReflectionMapping:ce},ad={RepeatWrapping:he,ClampToEdgeWrapping:ue,MirroredRepeatWrapping:de},ld={NearestFilter:pe,NearestMipmapNearestFilter:Ae,NearestMipmapLinearFilter:me,LinearFilter:ve,LinearMipmapNearestFilter:ye,LinearMipmapLinearFilter:be};class cd extends _u{constructor(e){super(e),this.isImageBitmapLoader=!0,\"undefined\"==typeof createImageBitmap&&console.warn(\"THREE.ImageBitmapLoader: createImageBitmap() not supported.\"),\"undefined\"==typeof fetch&&console.warn(\"THREE.ImageBitmapLoader: fetch() not supported.\"),this.options={premultiplyAlpha:\"none\"}}setOptions(e){return this.options=e,this}load(e,t,n,i){void 0===e&&(e=\"\"),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,s=wu.get(e);if(void 0!==s)return r.manager.itemStart(e),setTimeout((function(){t&&t(s),r.manager.itemEnd(e)}),0),s;const o={};o.credentials=\"anonymous\"===this.crossOrigin?\"same-origin\":\"include\",o.headers=this.requestHeader,fetch(e,o).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(r.options,{colorSpaceConversion:\"none\"}))})).then((function(n){wu.add(e,n),t&&t(n),r.manager.itemEnd(e)})).catch((function(t){i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)})),r.manager.itemStart(e)}}let hd;class ud{static getContext(){return void 0===hd&&(hd=new(window.AudioContext||window.webkitAudioContext)),hd}static setContext(e){hd=e}}class dd extends _u{constructor(e){super(e)}load(e,t,n,i){const r=this,s=new Su(this.manager);s.setResponseType(\"arraybuffer\"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){try{const e=n.slice(0);ud.getContext().decodeAudioData(e,(function(e){t(e)}))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}}),n,i)}}class pd extends ed{constructor(e,t,n=1){super(void 0,n),this.isHemisphereLightProbe=!0;const i=(new Yn).set(e),r=(new Yn).set(t),s=new ci(i.r,i.g,i.b),o=new ci(r.r,r.g,r.b),a=Math.sqrt(Math.PI),l=a*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(o).multiplyScalar(a),this.sh.coefficients[1].copy(s).sub(o).multiplyScalar(l)}}class Ad extends ed{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const n=(new Yn).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const fd=new Ui,md=new Ui,gd=new Ui;class vd{constructor(){this.type=\"StereoCamera\",this.aspect=1,this.eyeSep=.064,this.cameraL=new vs,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new vs,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,gd.copy(e.projectionMatrix);const n=t.eyeSep/2,i=n*t.near/t.focus,r=t.near*Math.tan(yn*t.fov*.5)/t.zoom;let s,o;md.elements[12]=-n,fd.elements[12]=n,s=-r*t.aspect+i,o=r*t.aspect+i,gd.elements[0]=2*t.near/(o-s),gd.elements[8]=(o+s)/(o-s),this.cameraL.projectionMatrix.copy(gd),s=-r*t.aspect-i,o=r*t.aspect-i,gd.elements[0]=2*t.near/(o-s),gd.elements[8]=(o+s)/(o-s),this.cameraR.projectionMatrix.copy(gd)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(md),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(fd)}}class yd{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Ed(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=Ed();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function Ed(){return(\"undefined\"==typeof performance?Date:performance).now()}const bd=new ci,xd=new li,wd=new ci,Cd=new ci;class Md extends hr{constructor(){super(),this.type=\"AudioListener\",this.context=ud.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new yd}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(bd,xd,wd),Cd.set(0,0,-1).applyQuaternion(xd),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(bd.x,e),t.positionY.linearRampToValueAtTime(bd.y,e),t.positionZ.linearRampToValueAtTime(bd.z,e),t.forwardX.linearRampToValueAtTime(Cd.x,e),t.forwardY.linearRampToValueAtTime(Cd.y,e),t.forwardZ.linearRampToValueAtTime(Cd.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(bd.x,bd.y,bd.z),t.setOrientation(Cd.x,Cd.y,Cd.z,n.x,n.y,n.z)}}class _d extends hr{constructor(e){super(),this.type=\"Audio\",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType=\"empty\",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType=\"audioNode\",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType=\"mediaNode\",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType=\"mediaStreamNode\",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType=\"buffer\",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn(\"THREE.Audio: Audio is already playing.\");if(!1===this.hasPlaybackControl)return void console.warn(\"THREE.Audio: this Audio has no playback control.\");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn(\"THREE.Audio: this Audio has no playback control.\")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn(\"THREE.Audio: this Audio has no playback control.\")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e\u003Ct;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e\u003Ct;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn(\"THREE.Audio: this Audio has no playback control.\")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn(\"THREE.Audio: this Audio has no playback control.\"),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn(\"THREE.Audio: this Audio has no playback control.\")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const Id=new ci,Bd=new li,Sd=new ci,Td=new ci;class Ld extends _d{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel=\"HRTF\",this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(Id,Bd,Sd),Td.set(0,0,1).applyQuaternion(Bd);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Id.x,e),t.positionY.linearRampToValueAtTime(Id.y,e),t.positionZ.linearRampToValueAtTime(Id.z,e),t.orientationX.linearRampToValueAtTime(Td.x,e),t.orientationY.linearRampToValueAtTime(Td.y,e),t.orientationZ.linearRampToValueAtTime(Td.z,e)}else t.setPosition(Id.x,Id.y,Id.z),t.setOrientation(Td.x,Td.y,Td.z)}}class Dd{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n\u003Ct.length;n++)e+=t[n];return e/t.length}}class Rd{constructor(e,t,n){let i,r,s;switch(this.binding=e,this.valueSize=n,t){case\"quaternion\":i=this._slerp,r=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case\"string\":case\"bool\":i=this._select,r=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:i=this._lerp,r=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=s,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,i=this.valueSize,r=e*i+i;let s=this.cumulativeWeight;if(0===s){for(let e=0;e!==i;++e)n[r+e]=n[e];s=t}else{s+=t;const e=t/s;this._mixBufferRegion(n,r,0,e,i)}this.cumulativeWeight=s}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,i=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,i=e*t+t,r=this.cumulativeWeight,s=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r\u003C1){const e=t*this._origIndex;this._mixBufferRegion(n,i,e,1-r,t)}s>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(n[e]!==n[e+t]){o.setValue(n,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let e=n,r=i;e!==r;++e)t[e]=t[i+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n\u003Ct;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n\u003Cthis.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)e[t+i]=e[n+i]}_slerp(e,t,n,i){li.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){const s=this._workIndex*r;li.multiplyQuaternionsFlat(e,s,e,t,e,n),li.slerpFlat(e,t,e,t,e,s,i)}_lerp(e,t,n,i,r){const s=1-i;for(let o=0;o!==r;++o){const r=t+o;e[r]=e[r]*s+e[n+o]*i}}_lerpAdditive(e,t,n,i,r){for(let s=0;s!==r;++s){const r=t+s;e[r]=e[r]+e[n+s]*i}}}const Pd=\"\\\\[\\\\]\\\\.:\\\\/\",kd=new RegExp(\"[\"+Pd+\"]\",\"g\"),Fd=\"[^\"+Pd+\"]\",Od=\"[^\"+Pd.replace(\"\\\\.\",\"\")+\"]\",Qd=new RegExp(\"^\"+/((?:WC+[\\/:])*)/.source.replace(\"WC\",Fd)+/(WCOD+)?/.source.replace(\"WCOD\",Od)+/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace(\"WC\",Fd)+/\\.(WC+)(?:\\[(.+)\\])?/.source.replace(\"WC\",Fd)+\"$\"),Ud=[\"material\",\"materials\",\"bones\",\"map\"];class Nd{constructor(e,t,n){this.path=t,this.parsedPath=n||Nd.parseTrackName(t),this.node=Nd.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Nd.Composite(e,t,n):new Nd(e,t,n)}static sanitizeNodeName(e){return e.replace(/\\s/g,\"_\").replace(kd,\"\")}static parseTrackName(e){const t=Qd.exec(e);if(null===t)throw new Error(\"PropertyBinding: Cannot parse trackName: \"+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(\".\");if(void 0!==i&&-1!==i){const e=n.nodeName.substring(i+1);-1!==Ud.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error(\"PropertyBinding: can not parse propertyName from trackName: \"+e);return n}static findNode(e,t){if(void 0===t||\"\"===t||\".\"===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let i=0;i\u003Ce.length;i++){const r=e[i];if(r.name===t||r.uuid===t)return r;const s=n(r.children);if(s)return s}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,i=t.propertyName;let r=t.propertyIndex;if(e||(e=Nd.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error(\"THREE.PropertyBinding: Trying to update node for track: \"+this.path+\" but it wasn't found.\");if(n){let i=t.objectIndex;switch(n){case\"materials\":if(!e.material)return void console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\",this);if(!e.material.materials)return void console.error(\"THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.\",this);e=e.material.materials;break;case\"bones\":if(!e.skeleton)return void console.error(\"THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.\",this);e=e.skeleton.bones;for(let t=0;t\u003Ce.length;t++)if(e[t].name===i){i=t;break}break;case\"map\":if(\"map\"in e){e=e.map;break}if(!e.material)return void console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\",this);if(!e.material.map)return void console.error(\"THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.\",this);e=e.material.map;break;default:if(void 0===e[n])return void console.error(\"THREE.PropertyBinding: Can not bind to objectName of node undefined.\",this);e=e[n]}if(void 0!==i){if(void 0===e[i])return void console.error(\"THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.\",this,e);e=e[i]}}const s=e[i];if(void 0===s){const n=t.nodeName;return void console.error(\"THREE.PropertyBinding: Trying to update property for track: \"+n+\".\"+i+\" but it wasn't found.\",e)}let o=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?o=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(o=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if(\"morphTargetInfluences\"===i){if(!e.geometry)return void console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.\",this);if(!e.geometry.morphAttributes)return void console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.\",this);void 0!==e.morphTargetDictionary[r]&&(r=e.morphTargetDictionary[r])}a=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(a=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Nd.Composite=class{constructor(e,t,n){const i=n||Nd.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Nd.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Nd.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Nd.prototype.GetterByBindingType=[Nd.prototype._getValue_direct,Nd.prototype._getValue_array,Nd.prototype._getValue_arrayElement,Nd.prototype._getValue_toArray],Nd.prototype.SetterByBindingTypeAndVersioning=[[Nd.prototype._setValue_direct,Nd.prototype._setValue_direct_setNeedsUpdate,Nd.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Nd.prototype._setValue_array,Nd.prototype._setValue_array_setNeedsUpdate,Nd.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Nd.prototype._setValue_arrayElement,Nd.prototype._setValue_arrayElement_setNeedsUpdate,Nd.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Nd.prototype._setValue_fromArray,Nd.prototype._setValue_fromArray_setNeedsUpdate,Nd.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class Gd{constructor(){this.isAnimationObjectGroup=!0,this.uuid=bn(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,i=this._parsedPaths,r=this._bindings,s=r.length;let o,a=e.length,l=this.nCachedObjects_;for(let c=0,h=arguments.length;c!==h;++c){const h=arguments[c],u=h.uuid;let d=t[u];if(void 0===d){d=a++,t[u]=d,e.push(h);for(let e=0,t=s;e!==t;++e)r[e].push(new Nd(h,n[e],i[e]))}else if(d\u003Cl){o=e[d];const a=--l,c=e[a];t[c.uuid]=d,e[d]=c,t[u]=a,e[a]=h;for(let e=0,t=s;e!==t;++e){const t=r[e],s=t[a];let o=t[d];t[d]=s,void 0===o&&(o=new Nd(h,n[e],i[e])),t[a]=o}}else e[d]!==o&&console.error(\"THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.\")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_;for(let s=0,o=arguments.length;s!==o;++s){const o=arguments[s],a=o.uuid,l=t[a];if(void 0!==l&&l>=r){const s=r++,c=e[s];t[c.uuid]=l,e[l]=c,t[a]=s,e[s]=o;for(let e=0,t=i;e!==t;++e){const t=n[e],i=t[s],r=t[l];t[l]=i,t[s]=r}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,s=e.length;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o].uuid,l=t[a];if(void 0!==l)if(delete t[a],l\u003Cr){const o=--r,a=e[o],c=--s,h=e[c];t[a.uuid]=l,e[l]=a,t[h.uuid]=o,e[o]=h,e.pop();for(let e=0,t=i;e!==t;++e){const t=n[e],i=t[o],r=t[c];t[l]=i,t[o]=r,t.pop()}}else{const r=--s,o=e[r];r>0&&(t[o.uuid]=l),e[l]=o,e.pop();for(let e=0,t=i;e!==t;++e){const t=n[e];t[l]=t[r],t.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const n=this._bindingsIndicesByPath;let i=n[e];const r=this._bindings;if(void 0!==i)return r[i];const s=this._paths,o=this._parsedPaths,a=this._objects,l=a.length,c=this.nCachedObjects_,h=new Array(l);i=r.length,n[e]=i,s.push(e),o.push(t),r.push(h);for(let n=c,i=a.length;n!==i;++n){const i=a[n];h[n]=new Nd(i,e,t)}return h}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const i=this._paths,r=this._parsedPaths,s=this._bindings,o=s.length-1,a=s[o];t[e[o]]=n,s[n]=a,s.pop(),r[n]=r[o],r.pop(),i[n]=i[o],i.pop()}}}class zd{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;const r=t.tracks,s=r.length,o=new Array(s),a={endingStart:Ct,endingEnd:Ct};for(let e=0;e!==s;++e){const t=r[e].createInterpolant(null);o[e]=t,t.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=yt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,i=e._clip.duration,r=i/n,s=n/i;e.warp(1,r,t),this.warp(s,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const i=this._mixer,r=i.time,s=this.timeScale;let o=this._timeScaleInterpolant;null===o&&(o=i._lendControlInterpolant(),this._timeScaleInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=r,a[1]=r+n,l[0]=e/s,l[1]=t/s,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled)return void this._updateWeight(e);const r=this._startTime;if(null!==r){const i=(e-r)*n;i\u003C0||0===n?t=0:(this._startTime=null,t=n*i)}t*=this._updateTimeScale(e);const s=this._updateTime(t),o=this._updateWeight(e);if(o>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===Bt)for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(s),t[n].accumulateAdditive(o);else for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(s),t[n].accumulate(i,o)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let i=this.time+e,r=this._loopCount;const s=n===Et;if(0===e)return-1===r?i:s&&1==(1&r)?t-i:i;if(n===vt){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else{if(!(i\u003C0)){this.time=i;break e}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:\"finished\",action:this,direction:e\u003C0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),i>=t||i\u003C0){const n=Math.floor(i/t);i-=t*n,r+=Math.abs(n);const o=this.repetitions-r;if(o\u003C=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:\"finished\",action:this,direction:e>0?1:-1});else{if(1===o){const t=e\u003C0;this._setEndings(t,!t,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:\"loop\",action:this,loopDelta:n})}}else this.time=i;if(s&&1==(1&r))return t-i}return i}_setEndings(e,t,n){const i=this._interpolantSettings;n?(i.endingStart=Mt,i.endingEnd=Mt):(i.endingStart=e?this.zeroSlopeAtStart?Mt:Ct:_t,i.endingEnd=t?this.zeroSlopeAtEnd?Mt:Ct:_t)}_scheduleFading(e,t,n){const i=this._mixer,r=i.time;let s=this._weightInterpolant;null===s&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const o=s.parameterPositions,a=s.sampleValues;return o[0]=r,a[0]=t,o[1]=r+e,a[1]=n,this}}const Hd=new Float32Array(1);class Vd extends mn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,s=e._propertyBindings,o=e._interpolants,a=n.uuid,l=this._bindingsByRootAndName;let c=l[a];void 0===c&&(c={},l[a]=c);for(let e=0;e!==r;++e){const r=i[e],l=r.name;let h=c[l];if(void 0!==h)++h.referenceCount,s[e]=h;else{if(h=s[e],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,a,l));continue}const i=t&&t._propertyBindings[e].binding.parsedPath;h=new Rd(Nd.create(n,l,i),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,a,l),s[e]=h}o[e].resultBuffer=h.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,i=this._actionsByClip[n];this._bindAction(e,i&&i.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t\u003Cthis._nActiveActions}_addInactiveAction(e,t,n){const i=this._actions,r=this._actionsByClip;let s=r[t];if(void 0===s)s={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=s;else{const t=s.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=i.length,i.push(e),s.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;const r=e._clip.uuid,s=this._actionsByClip,o=s[r],a=o.knownActions,l=a[a.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,a[c]=l,a.pop(),e._byClipCacheIndex=null,delete o.actionByRoot[(e._localRoot||this._root).uuid],0===a.length&&delete s[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_addInactiveBinding(e,t,n){const i=this._bindingsByRootAndName,r=this._bindings;let s=i[t];void 0===s&&(s={},i[t]=s),s[n]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,s=this._bindingsByRootAndName,o=s[i],a=t[t.length-1],l=e._cacheIndex;a._cacheIndex=l,t[l]=a,t.pop(),delete o[r],0===Object.keys(o).length&&delete s[i]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new uu(new Float32Array(2),new Float32Array(2),1,Hd),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r}clipAction(e,t,n){const i=t||this._root,r=i.uuid;let s=\"string\"==typeof e?bu.findByName(i,e):e;const o=null!==s?s.uuid:e,a=this._actionsByClip[o];let l=null;if(void 0===n&&(n=null!==s?s.blendMode:It),void 0!==a){const e=a.actionByRoot[r];if(void 0!==e&&e.blendMode===n)return e;l=a.knownActions[0],null===s&&(s=l._clip)}if(null===s)return null;const c=new zd(this,s,t,n);return this._bindAction(c,l),this._addInactiveAction(c,o,r),c}existingAction(e,t){const n=t||this._root,i=n.uuid,r=\"string\"==typeof e?bu.findByName(n,e):e,s=r?r.uuid:e,o=this._actionsByClip[s];return void 0!==o&&o.actionByRoot[i]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),s=this._accuIndex^=1;for(let o=0;o!==n;++o)t[o]._update(i,e,r,s);const o=this._bindings,a=this._nActiveBindings;for(let e=0;e!==a;++e)o[e].apply(s);return this}setTime(e){this.time=0;for(let e=0;e\u003Cthis._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){const e=r.knownActions;for(let n=0,i=e.length;n!==i;++n){const i=e[n];this._deactivateAction(i);const r=i._cacheIndex,s=t[t.length-1];i._cacheIndex=null,i._byClipCacheIndex=null,s._cacheIndex=r,t[r]=s,t.pop(),this._removeInactiveBindingsForAction(i)}delete i[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const i=n[e].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}const i=this._bindingsByRootAndName[t];if(void 0!==i)for(const e in i){const t=i[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class Wd{constructor(e){this.value=e}clone(){return new Wd(void 0===this.value.clone?this.value:this.value.clone())}}let jd=0;class qd extends mn{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,\"id\",{value:jd++}),this.name=\"\",this.usage=rn,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return-1!==t&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:\"dispose\"}),this}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let e=0,n=t.length;e\u003Cn;e++)this.uniforms.push(t[e].clone());return this}clone(){return(new this.constructor).copy(this)}}class Yd extends fl{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class Xd{constructor(e,t,n,i,r){this.isGLBufferAttribute=!0,this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=i,this.count=r,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}class Jd{constructor(e,t,n=0,i=1/0){this.ray=new Qi(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Ji,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error(\"THREE.Raycaster: Unsupported camera type: \"+t.type)}intersectObject(e,t=!0,n=[]){return Zd(e,this,n,t),n.sort(Kd),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i\u003Cr;i++)Zd(e[i],this,n,t);return n.sort(Kd),n}}function Kd(e,t){return e.distance-t.distance}function Zd(e,t,n,i){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===i){const i=e.children;for(let e=0,r=i.length;e\u003Cr;e++)Zd(i[e],t,n,!0)}}class $d{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(xn(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class ep{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}}const tp=new Ln;class np{constructor(e=new Ln(1/0,1/0),t=new Ln(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t\u003Cn;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=tp.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x\u003Cthis.min.x||this.max.y\u003Cthis.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x\u003Cthis.min.x||e.x>this.max.x||e.y\u003Cthis.min.y||e.y>this.max.y)}containsBox(e){return this.min.x\u003C=e.min.x&&e.max.x\u003C=this.max.x&&this.min.y\u003C=e.min.y&&e.max.y\u003C=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x\u003Cthis.min.x||e.min.x>this.max.x||e.max.y\u003Cthis.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return tp.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ip=new ci,rp=new ci;class sp{constructor(e=new ci,t=new ci){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){ip.subVectors(e,this.start),rp.subVectors(this.end,this.start);const n=rp.dot(rp);let i=rp.dot(ip)/n;return t&&(i=xn(i,0,1)),i}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const op=new ci;class ap extends hr{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type=\"SpotLightHelper\";const n=new Wr,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e\u003Cn;e++,t++){const r=e/n*Math.PI*2,s=t/n*Math.PI*2;i.push(Math.cos(r),Math.sin(r),1,Math.cos(s),Math.sin(s),1)}n.setAttribute(\"position\",new Fr(i,3));const r=new tc({fog:!1,toneMapped:!1});this.cone=new hc(n,r),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),op.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(op),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const lp=new ci,cp=new Ui,hp=new Ui;class up extends hc{constructor(e){const t=dp(e),n=new Wr,i=[],r=[],s=new Yn(0,0,1),o=new Yn(0,1,0);for(let e=0;e\u003Ct.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(s.r,s.g,s.b),r.push(o.r,o.g,o.b))}n.setAttribute(\"position\",new Fr(i,3)),n.setAttribute(\"color\",new Fr(r,3)),super(n,new tc({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type=\"SkeletonHelper\",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,i=n.getAttribute(\"position\");hp.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e\u003Ct.length;e++){const r=t[e];r.parent&&r.parent.isBone&&(cp.multiplyMatrices(hp,r.matrixWorld),lp.setFromMatrixPosition(cp),i.setXYZ(n,lp.x,lp.y,lp.z),cp.multiplyMatrices(hp,r.parent.matrixWorld),lp.setFromMatrixPosition(cp),i.setXYZ(n+1,lp.x,lp.y,lp.z),n+=2)}n.getAttribute(\"position\").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function dp(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n\u003Ce.children.length;n++)t.push.apply(t,dp(e.children[n]));return t}class pp extends cs{constructor(e,t,n){super(new Qh(t,4,2),new Cr({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.color=n,this.type=\"PointLightHelper\",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const Ap=new ci,fp=new Yn,mp=new Yn;class gp extends hr{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type=\"HemisphereLightHelper\";const i=new kh(t);i.rotateY(.5*Math.PI),this.material=new Cr({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const r=i.getAttribute(\"position\"),s=new Float32Array(3*r.count);i.setAttribute(\"color\",new Ir(s,3)),this.add(new cs(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute(\"color\");fp.copy(this.light.color),mp.copy(this.light.groundColor);for(let e=0,n=t.count;e\u003Cn;e++){const i=e\u003Cn/2?fp:mp;t.setXYZ(e,i.r,i.g,i.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(Ap.setFromMatrixPosition(this.light.matrixWorld).negate())}}class vp extends hc{constructor(e=10,t=10,n=4473924,i=8947848){n=new Yn(n),i=new Yn(i);const r=t/2,s=e/t,o=e/2,a=[],l=[];for(let e=0,c=0,h=-o;e\u003C=t;e++,h+=s){a.push(-o,0,h,o,0,h),a.push(h,0,-o,h,0,o);const t=e===r?n:i;t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3}const c=new Wr;c.setAttribute(\"position\",new Fr(a,3)),c.setAttribute(\"color\",new Fr(l,3)),super(c,new tc({vertexColors:!0,toneMapped:!1})),this.type=\"GridHelper\"}dispose(){this.geometry.dispose(),this.material.dispose()}}class yp extends hc{constructor(e=10,t=16,n=8,i=64,r=4473924,s=8947848){r=new Yn(r),s=new Yn(s);const o=[],a=[];if(t>1)for(let n=0;n\u003Ct;n++){const i=n/t*(2*Math.PI),l=Math.sin(i)*e,c=Math.cos(i)*e;o.push(0,0,0),o.push(l,0,c);const h=1&n?r:s;a.push(h.r,h.g,h.b),a.push(h.r,h.g,h.b)}for(let t=0;t\u003Cn;t++){const l=1&t?r:s,c=e-e/n*t;for(let e=0;e\u003Ci;e++){let t=e/i*(2*Math.PI),n=Math.sin(t)*c,r=Math.cos(t)*c;o.push(n,0,r),a.push(l.r,l.g,l.b),t=(e+1)/i*(2*Math.PI),n=Math.sin(t)*c,r=Math.cos(t)*c,o.push(n,0,r),a.push(l.r,l.g,l.b)}}const l=new Wr;l.setAttribute(\"position\",new Fr(o,3)),l.setAttribute(\"color\",new Fr(a,3)),super(l,new tc({vertexColors:!0,toneMapped:!1})),this.type=\"PolarGridHelper\"}dispose(){this.geometry.dispose(),this.material.dispose()}}const Ep=new ci,bp=new ci,xp=new ci;class wp extends hr{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type=\"DirectionalLightHelper\",void 0===t&&(t=1);let i=new Wr;i.setAttribute(\"position\",new Fr([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const r=new tc({fog:!1,toneMapped:!1});this.lightPlane=new ac(i,r),this.add(this.lightPlane),i=new Wr,i.setAttribute(\"position\",new Fr([0,0,0,0,0,1],3)),this.targetLine=new ac(i,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),Ep.setFromMatrixPosition(this.light.matrixWorld),bp.setFromMatrixPosition(this.light.target.matrixWorld),xp.subVectors(bp,Ep),this.lightPlane.lookAt(bp),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(bp),this.targetLine.scale.z=xp.length()}}const Cp=new ci,Mp=new gs;class _p extends hc{constructor(e){const t=new Wr,n=new tc({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],r=[],s={};function o(e,t){a(e),a(t)}function a(e){i.push(0,0,0),r.push(0,0,0),void 0===s[e]&&(s[e]=[]),s[e].push(i.length/3-1)}o(\"n1\",\"n2\"),o(\"n2\",\"n4\"),o(\"n4\",\"n3\"),o(\"n3\",\"n1\"),o(\"f1\",\"f2\"),o(\"f2\",\"f4\"),o(\"f4\",\"f3\"),o(\"f3\",\"f1\"),o(\"n1\",\"f1\"),o(\"n2\",\"f2\"),o(\"n3\",\"f3\"),o(\"n4\",\"f4\"),o(\"p\",\"n1\"),o(\"p\",\"n2\"),o(\"p\",\"n3\"),o(\"p\",\"n4\"),o(\"u1\",\"u2\"),o(\"u2\",\"u3\"),o(\"u3\",\"u1\"),o(\"c\",\"t\"),o(\"p\",\"c\"),o(\"cn1\",\"cn2\"),o(\"cn3\",\"cn4\"),o(\"cf1\",\"cf2\"),o(\"cf3\",\"cf4\"),t.setAttribute(\"position\",new Fr(i,3)),t.setAttribute(\"color\",new Fr(r,3)),super(t,n),this.type=\"CameraHelper\",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update();const l=new Yn(16755200),c=new Yn(16711680),h=new Yn(43775),u=new Yn(16777215),d=new Yn(3355443);this.setColors(l,c,h,u,d)}setColors(e,t,n,i,r){const s=this.geometry.getAttribute(\"color\");s.setXYZ(0,e.r,e.g,e.b),s.setXYZ(1,e.r,e.g,e.b),s.setXYZ(2,e.r,e.g,e.b),s.setXYZ(3,e.r,e.g,e.b),s.setXYZ(4,e.r,e.g,e.b),s.setXYZ(5,e.r,e.g,e.b),s.setXYZ(6,e.r,e.g,e.b),s.setXYZ(7,e.r,e.g,e.b),s.setXYZ(8,e.r,e.g,e.b),s.setXYZ(9,e.r,e.g,e.b),s.setXYZ(10,e.r,e.g,e.b),s.setXYZ(11,e.r,e.g,e.b),s.setXYZ(12,e.r,e.g,e.b),s.setXYZ(13,e.r,e.g,e.b),s.setXYZ(14,e.r,e.g,e.b),s.setXYZ(15,e.r,e.g,e.b),s.setXYZ(16,e.r,e.g,e.b),s.setXYZ(17,e.r,e.g,e.b),s.setXYZ(18,e.r,e.g,e.b),s.setXYZ(19,e.r,e.g,e.b),s.setXYZ(20,e.r,e.g,e.b),s.setXYZ(21,e.r,e.g,e.b),s.setXYZ(22,e.r,e.g,e.b),s.setXYZ(23,e.r,e.g,e.b),s.setXYZ(24,t.r,t.g,t.b),s.setXYZ(25,t.r,t.g,t.b),s.setXYZ(26,t.r,t.g,t.b),s.setXYZ(27,t.r,t.g,t.b),s.setXYZ(28,t.r,t.g,t.b),s.setXYZ(29,t.r,t.g,t.b),s.setXYZ(30,t.r,t.g,t.b),s.setXYZ(31,t.r,t.g,t.b),s.setXYZ(32,n.r,n.g,n.b),s.setXYZ(33,n.r,n.g,n.b),s.setXYZ(34,n.r,n.g,n.b),s.setXYZ(35,n.r,n.g,n.b),s.setXYZ(36,n.r,n.g,n.b),s.setXYZ(37,n.r,n.g,n.b),s.setXYZ(38,i.r,i.g,i.b),s.setXYZ(39,i.r,i.g,i.b),s.setXYZ(40,r.r,r.g,r.b),s.setXYZ(41,r.r,r.g,r.b),s.setXYZ(42,r.r,r.g,r.b),s.setXYZ(43,r.r,r.g,r.b),s.setXYZ(44,r.r,r.g,r.b),s.setXYZ(45,r.r,r.g,r.b),s.setXYZ(46,r.r,r.g,r.b),s.setXYZ(47,r.r,r.g,r.b),s.setXYZ(48,r.r,r.g,r.b),s.setXYZ(49,r.r,r.g,r.b),s.needsUpdate=!0}update(){const e=this.geometry,t=this.pointMap;Mp.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Ip(\"c\",t,e,Mp,0,0,-1),Ip(\"t\",t,e,Mp,0,0,1),Ip(\"n1\",t,e,Mp,-1,-1,-1),Ip(\"n2\",t,e,Mp,1,-1,-1),Ip(\"n3\",t,e,Mp,-1,1,-1),Ip(\"n4\",t,e,Mp,1,1,-1),Ip(\"f1\",t,e,Mp,-1,-1,1),Ip(\"f2\",t,e,Mp,1,-1,1),Ip(\"f3\",t,e,Mp,-1,1,1),Ip(\"f4\",t,e,Mp,1,1,1),Ip(\"u1\",t,e,Mp,.7,1.1,-1),Ip(\"u2\",t,e,Mp,-.7,1.1,-1),Ip(\"u3\",t,e,Mp,0,2,-1),Ip(\"cf1\",t,e,Mp,-1,0,1),Ip(\"cf2\",t,e,Mp,1,0,1),Ip(\"cf3\",t,e,Mp,0,-1,1),Ip(\"cf4\",t,e,Mp,0,1,1),Ip(\"cn1\",t,e,Mp,-1,0,-1),Ip(\"cn2\",t,e,Mp,1,0,-1),Ip(\"cn3\",t,e,Mp,0,-1,-1),Ip(\"cn4\",t,e,Mp,0,1,-1),e.getAttribute(\"position\").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Ip(e,t,n,i,r,s,o){Cp.set(r,s,o).unproject(i);const a=t[e];if(void 0!==a){const e=n.getAttribute(\"position\");for(let t=0,n=a.length;t\u003Cn;t++)e.setXYZ(a[t],Cp.x,Cp.y,Cp.z)}}const Bp=new di;class Sp extends hc{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),r=new Wr;r.setIndex(new Ir(n,1)),r.setAttribute(\"position\",new Ir(i,3)),super(r,new tc({color:t,toneMapped:!1})),this.object=e,this.type=\"BoxHelper\",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn(\"THREE.BoxHelper: .update() has no longer arguments.\"),void 0!==this.object&&Bp.setFromObject(this.object),Bp.isEmpty())return;const t=Bp.min,n=Bp.max,i=this.geometry.attributes.position,r=i.array;r[0]=n.x,r[1]=n.y,r[2]=n.z,r[3]=t.x,r[4]=n.y,r[5]=n.z,r[6]=t.x,r[7]=t.y,r[8]=n.z,r[9]=n.x,r[10]=t.y,r[11]=n.z,r[12]=n.x,r[13]=n.y,r[14]=t.z,r[15]=t.x,r[16]=n.y,r[17]=t.z,r[18]=t.x,r[19]=t.y,r[20]=t.z,r[21]=n.x,r[22]=t.y,r[23]=t.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Tp extends hc{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Wr;i.setIndex(new Ir(n,1)),i.setAttribute(\"position\",new Fr([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(i,new tc({color:t,toneMapped:!1})),this.box=e,this.type=\"Box3Helper\",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class Lp extends ac{constructor(e,t=1,n=16776960){const i=n,r=new Wr;r.setAttribute(\"position\",new Fr([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),r.computeBoundingSphere(),super(r,new tc({color:i,toneMapped:!1})),this.type=\"PlaneHelper\",this.plane=e,this.size=t;const s=new Wr;s.setAttribute(\"position\",new Fr([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),s.computeBoundingSphere(),this.add(new cs(s,new Cr({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const Dp=new ci;let Rp,Pp;class kp extends hr{constructor(e=new ci(0,0,1),t=new ci(0,0,0),n=1,i=16776960,r=.2*n,s=.2*r){super(),this.type=\"ArrowHelper\",void 0===Rp&&(Rp=new Wr,Rp.setAttribute(\"position\",new Fr([0,0,0,0,1,0],3)),Pp=new Xc(0,.5,1,5,1),Pp.translate(0,-.5,0)),this.position.copy(t),this.line=new ac(Rp,new tc({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new cs(Pp,new Cr({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,r,s)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y\u003C-.99999)this.quaternion.set(1,0,0,0);else{Dp.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Dp,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Fp extends hc{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new Wr;n.setAttribute(\"position\",new Fr(t,3)),n.setAttribute(\"color\",new Fr([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new tc({vertexColors:!0,toneMapped:!1})),this.type=\"AxesHelper\"}setColors(e,t,n){const i=new Yn,r=this.geometry.attributes.color.array;return i.set(e),i.toArray(r,0),i.toArray(r,3),i.set(t),i.toArray(r,6),i.toArray(r,9),i.set(n),i.toArray(r,12),i.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Op{constructor(){this.type=\"ShapePath\",this.color=new Yn,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Wc,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,r,s){return this.currentPath.bezierCurveTo(e,t,n,i,r,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){const n=t.length;let i=!1;for(let r=n-1,s=0;s\u003Cn;r=s++){let n=t[r],o=t[s],a=o.x-n.x,l=o.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l\u003C0&&(n=t[s],a=-a,o=t[r],l=-l),e.y\u003Cn.y||e.y>o.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-a*(e.y-n.y);if(0===t)return!0;if(t\u003C0)continue;i=!i}}else{if(e.y!==n.y)continue;if(o.x\u003C=e.x&&e.x\u003C=n.x||n.x\u003C=e.x&&e.x\u003C=o.x)return!0}}return i}const n=Sh.isClockWise,i=this.subPaths;if(0===i.length)return[];let r,s,o;const a=[];if(1===i.length)return s=i[0],o=new rh,o.curves=s.curves,a.push(o),a;let l=!n(i[0].getPoints());l=e?!l:l;const c=[],h=[];let u,d,p=[],A=0;h[A]=void 0,p[A]=[];for(let t=0,o=i.length;t\u003Co;t++)s=i[t],u=s.getPoints(),r=n(u),r=e?!r:r,r?(!l&&h[A]&&A++,h[A]={s:new rh,p:u},h[A].s.curves=s.curves,l&&A++,p[A]=[]):p[A].push({h:s,p:u[0]});if(!h[0])return function(e){const t=[];for(let n=0,i=e.length;n\u003Ci;n++){const i=e[n],r=new rh;r.curves=i.curves,t.push(r)}return t}(i);if(h.length>1){let e=!1,n=0;for(let e=0,t=h.length;e\u003Ct;e++)c[e]=[];for(let i=0,r=h.length;i\u003Cr;i++){const r=p[i];for(let s=0;s\u003Cr.length;s++){const o=r[s];let a=!0;for(let r=0;r\u003Ch.length;r++)t(o.p,h[r].p)&&(i!==r&&n++,a?(a=!1,c[r].push(o)):e=!0);a&&c[i].push(o)}}n>0&&!1===e&&(p=c)}for(let e=0,t=h.length;e\u003Ct;e++){o=h[e].s,a.push(o),d=p[e];for(let e=0,t=d.length;e\u003Ct;e++)o.holes.push(d[e].h)}return a}}const Qp=Up();function Up(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),i=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e\u003C256;++e){const t=e-127;t\u003C-27?(i[e]=0,i[256|e]=32768,r[e]=24,r[256|e]=24):t\u003C-14?(i[e]=1024>>-t-14,i[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t\u003C=15?(i[e]=t+15\u003C\u003C10,i[256|e]=t+15\u003C\u003C10|32768,r[e]=13,r[256|e]=13):t\u003C128?(i[e]=31744,i[256|e]=64512,r[e]=24,r[256|e]=24):(i[e]=31744,i[256|e]=64512,r[e]=13,r[256|e]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let e=1;e\u003C1024;++e){let t=e\u003C\u003C13,n=0;for(;0==(8388608&t);)t\u003C\u003C=1,n-=8388608;t&=-8388609,n+=947912704,s[e]=t|n}for(let e=1024;e\u003C2048;++e)s[e]=939524096+(e-1024\u003C\u003C13);for(let e=1;e\u003C31;++e)o[e]=e\u003C\u003C23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e\u003C63;++e)o[e]=2147483648+(e-32\u003C\u003C23);o[63]=3347054592;for(let e=1;e\u003C64;++e)32!==e&&(a[e]=1024);return{floatView:t,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}var Np=Object.freeze({__proto__:null,toHalfFloat:function(e){Math.abs(e)>65504&&console.warn(\"THREE.DataUtils.toHalfFloat(): Value out of range.\"),e=xn(e,-65504,65504),Qp.floatView[0]=e;const t=Qp.uint32View[0],n=t>>23&511;return Qp.baseTable[n]+((8388607&t)>>Qp.shiftTable[n])},fromHalfFloat:function(e){const t=e>>10;return Qp.uint32View[0]=Qp.mantissaTable[Qp.offsetTable[t]+(1023&e)]+Qp.exponentTable[t],Qp.floatView[0]}});function Gp(){console.error(\"THREE.ImmediateRenderObject has been removed.\")}class zp extends ni{constructor(e,t,n){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the \"samples\" property to greater 0 to enable multisampling.'),super(e,t,n),this.samples=4}}class Hp extends ii{constructor(e,t,n,i){console.warn(\"THREE.DataTexture2DArray has been renamed to DataArrayTexture.\"),super(e,t,n,i)}}class Vp extends si{constructor(e,t,n,i){console.warn(\"THREE.DataTexture3D has been renamed to Data3DTexture.\"),super(e,t,n,i)}}class Wp extends us{constructor(e,t,n,i,r,s){console.warn(\"THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry.\"),super(e,t,n,i,r,s)}}class jp extends qc{constructor(e,t,n,i){console.warn(\"THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry.\"),super(e,t,n,i)}}class qp extends Yc{constructor(e,t,n,i){console.warn(\"THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry.\"),super(e,t,n,i)}}class Yp extends Jc{constructor(e,t,n,i,r,s,o){console.warn(\"THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry.\"),super(e,t,n,i,r,s,o)}}class Xp extends Xc{constructor(e,t,n,i,r,s,o,a){console.warn(\"THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry.\"),super(e,t,n,i,r,s,o,a)}}class Jp extends Zc{constructor(e,t){console.warn(\"THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry.\"),super(e,t)}}class Kp extends Dh{constructor(e,t){console.warn(\"THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry.\"),super(e,t)}}class Zp extends Ph{constructor(e,t){console.warn(\"THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry.\"),super(e,t)}}class $p extends jc{constructor(e,t,n,i){console.warn(\"THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry.\"),super(e,t,n,i)}}class eA extends kh{constructor(e,t){console.warn(\"THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry.\"),super(e,t)}}class tA extends Ds{constructor(e,t,n,i){console.warn(\"THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry.\"),super(e,t,n,i)}}class nA extends Kc{constructor(e,t,n,i){console.warn(\"THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry.\"),super(e,t,n,i)}}class iA extends Fh{constructor(e,t,n,i,r,s){console.warn(\"THREE.RingBufferGeometry has been renamed to THREE.RingGeometry.\"),super(e,t,n,i,r,s)}}class rA extends Oh{constructor(e,t){console.warn(\"THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry.\"),super(e,t)}}class sA extends Qh{constructor(e,t,n,i,r,s,o){console.warn(\"THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry.\"),super(e,t,n,i,r,s,o)}}class oA extends Uh{constructor(e,t){console.warn(\"THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry.\"),super(e,t)}}class aA extends Nh{constructor(e,t,n,i,r){console.warn(\"THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry.\"),super(e,t,n,i,r)}}class lA extends Gh{constructor(e,t,n,i,r,s){console.warn(\"THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry.\"),super(e,t,n,i,r,s)}}class cA extends zh{constructor(e,t,n,i,r){console.warn(\"THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry.\"),super(e,t,n,i,r)}}\"undefined\"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"register\",{detail:{revision:s}})),\"undefined\"!=typeof window&&(window.__THREE__?console.warn(\"WARNING: Multiple instances of Three.js being imported.\"):window.__THREE__=s);const hA=new WeakMap;function uA(){let e,t;function n(e,t,n,i,r,s){const o=s.num_components(),a=n.num_points()*o,l=a*r.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,r),h=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,s,c,l,h);const u=new r(e.HEAPF32.buffer,h,a).slice();return e._free(h),{name:i,array:u,itemSize:o}}onmessage=function(i){const r=i.data;switch(r.type){case\"init\":e=r.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case\"decode\":const i=r.buffer,s=r.taskConfig;t.then((e=>{const t=e.draco,o=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(i),i.byteLength);try{const e=function(e,t,i,r){const s=r.attributeIDs,o=r.attributeTypes;let a,l;const c=t.GetEncodedGeometryType(i);if(c===e.TRIANGULAR_MESH)a=new e.Mesh,l=t.DecodeBufferToMesh(i,a);else{if(c!==e.POINT_CLOUD)throw new Error(\"THREE.DRACOLoader: Unexpected geometry type.\");a=new e.PointCloud,l=t.DecodeBufferToPointCloud(i,a)}if(!l.ok()||0===a.ptr)throw new Error(\"THREE.DRACOLoader: Decoding failed: \"+l.error_msg());const h={index:null,attributes:[]};for(const i in s){const l=self[o[i]];let c,u;if(r.useUniqueIDs)u=s[i],c=t.GetAttributeByUniqueId(a,u);else{if(u=t.GetAttributeId(a,e[s[i]]),-1===u)continue;c=t.GetAttribute(a,u)}h.attributes.push(n(e,t,a,i,l,c))}return c===e.TRIANGULAR_MESH&&(h.index=function(e,t,n){const i=3*n.num_faces(),r=4*i,s=e._malloc(r);t.GetTrianglesUInt32Array(n,r,s);const o=new Uint32Array(e.HEAPF32.buffer,s,i).slice();return e._free(s),{array:o,itemSize:1}}(e,t,a)),e.destroy(a),h}(t,o,a,s),i=e.attributes.map((e=>e.array.buffer));e.index&&i.push(e.index.array.buffer),self.postMessage({type:\"decode\",id:r.id,geometry:e},i)}catch(e){console.error(e),self.postMessage({type:\"error\",id:r.id,error:e.message})}finally{t.destroy(a),t.destroy(o)}}))}}}function dA(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const pA=\"KHR_binary_glTF\",AA=\"KHR_draco_mesh_compression\",fA=\"KHR_lights_punctual\",mA=\"KHR_materials_clearcoat\",gA=\"KHR_materials_ior\",vA=\"KHR_materials_sheen\",yA=\"KHR_materials_specular\",EA=\"KHR_materials_transmission\",bA=\"KHR_materials_iridescence\",xA=\"KHR_materials_unlit\",wA=\"KHR_materials_volume\",CA=\"KHR_texture_basisu\",MA=\"KHR_texture_transform\",_A=\"KHR_mesh_quantization\",IA=\"KHR_materials_emissive_strength\",BA=\"EXT_texture_webp\",SA=\"EXT_meshopt_compression\",TA=\"EXT_mesh_gpu_instancing\";class LA{constructor(e){this.parser=e,this.name=fA,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n\u003Ci;n++){const i=t[n];i.extensions&&i.extensions[this.name]&&void 0!==i.extensions[this.name].light&&e._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n=\"light:\"+e;let i=t.cache.get(n);if(i)return i;const r=t.json,s=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e];let o;const a=new Yn(16777215);void 0!==s.color&&a.fromArray(s.color);const l=void 0!==s.range?s.range:0;switch(s.type){case\"directional\":o=new Ju(a),o.target.position.set(0,0,-1),o.add(o.target);break;case\"point\":o=new Yu(a),o.distance=l;break;case\"spot\":o=new Hu(a),o.distance=l,s.spot=s.spot||{},s.spot.innerConeAngle=void 0!==s.spot.innerConeAngle?s.spot.innerConeAngle:0,s.spot.outerConeAngle=void 0!==s.spot.outerConeAngle?s.spot.outerConeAngle:Math.PI/4,o.angle=s.spot.outerConeAngle,o.penumbra=1-s.spot.innerConeAngle/s.spot.outerConeAngle,o.target.position.set(0,0,-1),o.add(o.target);break;default:throw new Error(\"THREE.GLTFLoader: Unexpected light type: \"+s.type)}return o.position.set(0,0,0),o.decay=2,cf(o,s),void 0!==s.intensity&&(o.intensity=s.intensity),o.name=t.createUniqueName(s.name||\"light_\"+e),i=Promise.resolve(o),t.cache.add(n,i),i}getDependency(e,t){if(\"light\"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,i=n.json.nodes[e],r=(i.extensions&&i.extensions[this.name]||{}).light;return void 0===r?null:this._loadLight(r).then((function(e){return n._getNodeRef(t.cache,r,e)}))}}class DA{constructor(){this.name=xA}getMaterialType(){return Cr}extendParams(e,t,n){const i=[];e.color=new Yn(1,1,1),e.opacity=1;const r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const t=r.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==r.baseColorTexture&&i.push(n.assignTexture(e,\"map\",r.baseColorTexture,Rt))}return Promise.all(i)}}class RA{constructor(e){this.parser=e,this.name=IA}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name].emissiveStrength;return void 0!==i&&(t.emissiveIntensity=i),Promise.resolve()}}class PA{constructor(e){this.parser=e,this.name=mA}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Xh:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];if(void 0!==s.clearcoatFactor&&(t.clearcoat=s.clearcoatFactor),void 0!==s.clearcoatTexture&&r.push(n.assignTexture(t,\"clearcoatMap\",s.clearcoatTexture)),void 0!==s.clearcoatRoughnessFactor&&(t.clearcoatRoughness=s.clearcoatRoughnessFactor),void 0!==s.clearcoatRoughnessTexture&&r.push(n.assignTexture(t,\"clearcoatRoughnessMap\",s.clearcoatRoughnessTexture)),void 0!==s.clearcoatNormalTexture&&(r.push(n.assignTexture(t,\"clearcoatNormalMap\",s.clearcoatNormalTexture)),void 0!==s.clearcoatNormalTexture.scale)){const e=s.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Ln(e,e)}return Promise.all(r)}}class kA{constructor(e){this.parser=e,this.name=bA}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Xh:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return void 0!==s.iridescenceFactor&&(t.iridescence=s.iridescenceFactor),void 0!==s.iridescenceTexture&&r.push(n.assignTexture(t,\"iridescenceMap\",s.iridescenceTexture)),void 0!==s.iridescenceIor&&(t.iridescenceIOR=s.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==s.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),void 0!==s.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),void 0!==s.iridescenceThicknessTexture&&r.push(n.assignTexture(t,\"iridescenceThicknessMap\",s.iridescenceThicknessTexture)),Promise.all(r)}}class FA{constructor(e){this.parser=e,this.name=vA}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Xh:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[];t.sheenColor=new Yn(0,0,0),t.sheenRoughness=0,t.sheen=1;const s=i.extensions[this.name];return void 0!==s.sheenColorFactor&&t.sheenColor.fromArray(s.sheenColorFactor),void 0!==s.sheenRoughnessFactor&&(t.sheenRoughness=s.sheenRoughnessFactor),void 0!==s.sheenColorTexture&&r.push(n.assignTexture(t,\"sheenColorMap\",s.sheenColorTexture,Rt)),void 0!==s.sheenRoughnessTexture&&r.push(n.assignTexture(t,\"sheenRoughnessMap\",s.sheenRoughnessTexture)),Promise.all(r)}}class OA{constructor(e){this.parser=e,this.name=EA}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Xh:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return void 0!==s.transmissionFactor&&(t.transmission=s.transmissionFactor),void 0!==s.transmissionTexture&&r.push(n.assignTexture(t,\"transmissionMap\",s.transmissionTexture)),Promise.all(r)}}class QA{constructor(e){this.parser=e,this.name=wA}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Xh:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];t.thickness=void 0!==s.thicknessFactor?s.thicknessFactor:0,void 0!==s.thicknessTexture&&r.push(n.assignTexture(t,\"thicknessMap\",s.thicknessTexture)),t.attenuationDistance=s.attenuationDistance||1/0;const o=s.attenuationColor||[1,1,1];return t.attenuationColor=new Yn(o[0],o[1],o[2]),Promise.all(r)}}class UA{constructor(e){this.parser=e,this.name=gA}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Xh:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name];return t.ior=void 0!==i.ior?i.ior:1.5,Promise.resolve()}}class NA{constructor(e){this.parser=e,this.name=yA}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Xh:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];t.specularIntensity=void 0!==s.specularFactor?s.specularFactor:1,void 0!==s.specularTexture&&r.push(n.assignTexture(t,\"specularIntensityMap\",s.specularTexture));const o=s.specularColorFactor||[1,1,1];return t.specularColor=new Yn(o[0],o[1],o[2]),void 0!==s.specularColorTexture&&r.push(n.assignTexture(t,\"specularColorMap\",s.specularColorTexture,Rt)),Promise.all(r)}}class GA{constructor(e){this.parser=e,this.name=CA}loadTexture(e){const t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const r=i.extensions[this.name],s=t.options.ktx2Loader;if(!s){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error(\"THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures\");return null}return t.loadTextureImage(e,r.source,s)}}class zA{constructor(e){this.parser=e,this.name=BA,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;const s=r.extensions[t],o=i.images[s.source];let a=n.textureLoader;if(o.uri){const e=n.options.manager.getHandler(o.uri);null!==e&&(a=e)}return this.detectSupport().then((function(r){if(r)return n.loadTextureImage(e,s.source,a);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error(\"THREE.GLTFLoader: WebP required by asset but unsupported.\");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src=\"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA\",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class HA{constructor(e){this.name=SA,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],i=this.parser.getDependency(\"buffer\",e.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error(\"THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files\");return null}return i.then((function(t){const n=e.byteOffset||0,i=e.byteLength||0,s=e.count,o=e.byteStride,a=new Uint8Array(t,n,i);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(s,o,a,e.mode,e.filter).then((function(e){return e.buffer})):r.ready.then((function(){const t=new ArrayBuffer(s*o);return r.decodeGltfBuffer(new Uint8Array(t),s,o,a,e.mode,e.filter),t}))}))}return null}}class VA{constructor(e){this.name=TA,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const i=t.meshes[n.mesh];for(const e of i.primitives)if(e.mode!==$A.TRIANGLES&&e.mode!==$A.TRIANGLE_STRIP&&e.mode!==$A.TRIANGLE_FAN&&void 0!==e.mode)return null;const r=n.extensions[this.name].attributes,s=[],o={};for(const e in r)s.push(this.parser.getDependency(\"accessor\",r[e]).then((t=>(o[e]=t,o[e]))));return s.length\u003C1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then((e=>{const t=e.pop(),n=t.isGroup?t.children:[t],i=e[0].count,r=[];for(const e of n){const t=new Ui,n=new ci,s=new li,a=new ci(1,1,1),l=new ec(e.geometry,e.material,i);for(let e=0;e\u003Ci;e++)o.TRANSLATION&&n.fromBufferAttribute(o.TRANSLATION,e),o.ROTATION&&s.fromBufferAttribute(o.ROTATION,e),o.SCALE&&a.fromBufferAttribute(o.SCALE,e),l.setMatrixAt(e,t.compose(n,s,a));for(const t in o)\"TRANSLATION\"!==t&&\"ROTATION\"!==t&&\"SCALE\"!==t&&e.geometry.setAttribute(t,o[t]);hr.prototype.copy.call(l,e),l.frustumCulled=!1,this.parser.assignFinalMaterial(l),r.push(l)}return t.isGroup?(t.clear(),t.add(...r),t):r[0]})))}}const WA=\"glTF\";class jA{constructor(e){this.name=pA,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:nd.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==WA)throw new Error(\"THREE.GLTFLoader: Unsupported glTF-Binary header.\");if(this.header.version\u003C2)throw new Error(\"THREE.GLTFLoader: Legacy binary file detected.\");const n=this.header.length-12,i=new DataView(e,12);let r=0;for(;r\u003Cn;){const t=i.getUint32(r,!0);r+=4;const n=i.getUint32(r,!0);if(r+=4,1313821514===n){const n=new Uint8Array(e,12+r,t);this.content=nd.decodeText(n)}else if(5130562===n){const n=12+r;this.body=e.slice(n,n+t)}r+=t}if(null===this.content)throw new Error(\"THREE.GLTFLoader: JSON content not found.\")}}class qA{constructor(e,t){if(!t)throw new Error(\"THREE.GLTFLoader: No DRACOLoader instance provided.\");this.name=AA,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,o={},a={},l={};for(const e in s){const t=sf[e]||e.toLowerCase();o[t]=s[e]}for(const t in e.attributes){const i=sf[t]||t.toLowerCase();if(void 0!==s[t]){const r=n.accessors[e.attributes[t]],s=ef[r.componentType];l[i]=s.name,a[i]=!0===r.normalized}}return t.getDependency(\"bufferView\",r).then((function(e){return new Promise((function(t){i.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],i=a[t];void 0!==i&&(n.normalized=i)}t(e)}),o,l)}))}))}}class YA{constructor(){this.name=MA}extendTexture(e,t){return void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in \"'+this.name+'\" extension not yet supported.'),void 0===t.offset&&void 0===t.rotation&&void 0===t.scale||(e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class XA{constructor(){this.name=_A}}class JA extends cu{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let e=0;e!==i;e++)t[e]=n[r+e];return t}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=2*o,l=3*o,c=i-t,h=(n-t)/c,u=h*h,d=u*h,p=e*l,A=p-l,f=-2*d+3*u,m=d-u,g=1-f,v=m-u+h;for(let e=0;e!==o;e++){const t=s[A+e+o],n=s[A+e+a]*c,i=s[p+e+o],l=s[p+e]*c;r[e]=g*t+v*n+f*i+m*l}return r}}const KA=new li;class ZA extends JA{interpolate_(e,t,n,i){const r=super.interpolate_(e,t,n,i);return KA.fromArray(r).normalize().toArray(r),r}}const $A={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},ef={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},tf={9728:pe,9729:ve,9984:Ae,9985:ye,9986:me,9987:be},nf={33071:ue,33648:de,10497:he},rf={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},sf={POSITION:\"position\",NORMAL:\"normal\",TANGENT:\"tangent\",TEXCOORD_0:\"uv\",TEXCOORD_1:\"uv2\",COLOR_0:\"color\",WEIGHTS_0:\"skinWeight\",JOINTS_0:\"skinIndex\"},of={scale:\"scale\",translation:\"position\",rotation:\"quaternion\",weights:\"morphTargetInfluences\"},af={CUBICSPLINE:void 0,LINEAR:xt,STEP:bt};function lf(e,t,n){for(const i in n.extensions)void 0===e[i]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[i]=n.extensions[i])}function cf(e,t){void 0!==t.extras&&(\"object\"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn(\"THREE.GLTFLoader: Ignoring primitive type .extras, \"+t.extras))}function hf(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,i=t.weights.length;n\u003Ci;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,i=n.length;t\u003Ci;t++)e.morphTargetDictionary[n[t]]=t}else console.warn(\"THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.\")}}function uf(e){const t=e.extensions&&e.extensions[AA];let n;return n=t?\"draco:\"+t.bufferView+\":\"+t.indices+\":\"+df(t.attributes):e.indices+\":\"+df(e.attributes)+\":\"+e.mode,n}function df(e){let t=\"\";const n=Object.keys(e).sort();for(let i=0,r=n.length;i\u003Cr;i++)t+=n[i]+\":\"+e[n[i]]+\";\";return t}function pf(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error(\"THREE.GLTFLoader: Unsupported normalized accessor component type.\")}}class Af{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new dA,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=!1,r=-1;\"undefined\"!=typeof navigator&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),i=navigator.userAgent.indexOf(\"Firefox\")>-1,r=i?navigator.userAgent.match(/Firefox\\/([0-9]+)\\./)[1]:-1),\"undefined\"==typeof createImageBitmap||n||i&&r\u003C98?this.textureLoader=new ku(this.options.manager):this.textureLoader=new cd(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Su(this.options.manager),this.fileLoader.setResponseType(\"arraybuffer\"),\"use-credentials\"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,i=this.json,r=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies(\"scene\"),n.getDependencies(\"animation\"),n.getDependencies(\"camera\")])})).then((function(t){const s={scene:t[0][i.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:i.asset,parser:n,userData:{}};lf(r,s,i),cf(s,i),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(s)}))).then((function(){e(s)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,i=t.length;n\u003Ci;n++){const i=t[n].joints;for(let t=0,n=i.length;t\u003Cn;t++)e[i[t]].isBone=!0}for(let t=0,i=e.length;t\u003Ci;t++){const i=e[t];void 0!==i.mesh&&(this._addNodeRef(this.meshCache,i.mesh),void 0!==i.skin&&(n[i.mesh].isSkinnedMesh=!0)),void 0!==i.camera&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]\u003C=1)return n;const i=n.clone(),r=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,i]of e.children.entries())r(i,t.children[n])};return r(n,i),i.name+=\"_instance_\"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n\u003Ct.length;n++){const i=e(t[n]);if(i)return i}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let i=0;i\u003Ct.length;i++){const r=e(t[i]);r&&n.push(r)}return n}getDependency(e,t){const n=e+\":\"+t;let i=this.cache.get(n);if(!i){switch(e){case\"scene\":i=this.loadScene(t);break;case\"node\":i=this.loadNode(t);break;case\"mesh\":i=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case\"accessor\":i=this.loadAccessor(t);break;case\"bufferView\":i=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case\"buffer\":i=this.loadBuffer(t);break;case\"material\":i=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case\"texture\":i=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case\"skin\":i=this.loadSkin(t);break;case\"animation\":i=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case\"camera\":i=this.loadCamera(t);break;default:if(i=this._invokeOne((function(n){return n!=this&&n.getDependency&&n.getDependency(e,t)})),!i)throw new Error(\"Unknown type: \"+e)}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,i=this.json[e+(\"mesh\"===e?\"es\":\"s\")]||[];t=Promise.all(i.map((function(t,i){return n.getDependency(e,i)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&\"arraybuffer\"!==t.type)throw new Error(\"THREE.GLTFLoader: \"+t.type+\" buffer type is not supported.\");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[pA].body);const i=this.options;return new Promise((function(e,r){n.load(nd.resolveURL(t.uri,i.path),e,void 0,(function(){r(new Error('THREE.GLTFLoader: Failed to load buffer \"'+t.uri+'\".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency(\"buffer\",t.buffer).then((function(e){const n=t.byteLength||0,i=t.byteOffset||0;return e.slice(i,i+n)}))}loadAccessor(e){const t=this,n=this.json,i=this.json.accessors[e];if(void 0===i.bufferView&&void 0===i.sparse){const e=rf[i.type],t=ef[i.componentType],n=!0===i.normalized,r=new t(i.count*e);return Promise.resolve(new Ir(r,e,n))}const r=[];return void 0!==i.bufferView?r.push(this.getDependency(\"bufferView\",i.bufferView)):r.push(null),void 0!==i.sparse&&(r.push(this.getDependency(\"bufferView\",i.sparse.indices.bufferView)),r.push(this.getDependency(\"bufferView\",i.sparse.values.bufferView))),Promise.all(r).then((function(e){const r=e[0],s=rf[i.type],o=ef[i.componentType],a=o.BYTES_PER_ELEMENT,l=a*s,c=i.byteOffset||0,h=void 0!==i.bufferView?n.bufferViews[i.bufferView].byteStride:void 0,u=!0===i.normalized;let d,p;if(h&&h!==l){const e=Math.floor(c/h),n=\"InterleavedBuffer:\"+i.bufferView+\":\"+i.componentType+\":\"+e+\":\"+i.count;let l=t.cache.get(n);l||(d=new o(r,e*h,i.count*h/a),l=new fl(d,h/a),t.cache.add(n,l)),p=new gl(l,s,c%h/a,u)}else d=null===r?new o(i.count*s):new o(r,c,i.count*s),p=new Ir(d,s,u);if(void 0!==i.sparse){const t=rf.SCALAR,n=ef[i.sparse.indices.componentType],a=i.sparse.indices.byteOffset||0,l=i.sparse.values.byteOffset||0,c=new n(e[1],a,i.sparse.count*t),h=new o(e[2],l,i.sparse.count*s);null!==r&&(p=new Ir(p.array.slice(),p.itemSize,p.normalized));for(let e=0,t=c.length;e\u003Ct;e++){const t=c[e];if(p.setX(t,h[e*s]),s>=2&&p.setY(t,h[e*s+1]),s>=3&&p.setZ(t,h[e*s+2]),s>=4&&p.setW(t,h[e*s+3]),s>=5)throw new Error(\"THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.\")}}return p}))}loadTexture(e){const t=this.json,n=this.options,i=t.textures[e].source,r=t.images[i];let s=this.textureLoader;if(r.uri){const e=n.manager.getHandler(r.uri);null!==e&&(s=e)}return this.loadTextureImage(e,i,s)}loadTextureImage(e,t,n){const i=this,r=this.json,s=r.textures[e],o=r.images[t],a=(o.uri||o.bufferView)+\":\"+s.sampler;if(this.textureCache[a])return this.textureCache[a];const l=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=s.name||o.name||\"\";const n=(r.samplers||{})[s.sampler]||{};return t.magFilter=tf[n.magFilter]||ve,t.minFilter=tf[n.minFilter]||be,t.wrapS=nf[n.wrapS]||he,t.wrapT=nf[n.wrapT]||he,i.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[a]=l,l}loadImageSource(e,t){const n=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const r=n.images[e],s=self.URL||self.webkitURL;let o=r.uri||\"\",a=!1;if(void 0!==r.bufferView)o=this.getDependency(\"bufferView\",r.bufferView).then((function(e){a=!0;const t=new Blob([e],{type:r.mimeType});return o=s.createObjectURL(t),o}));else if(void 0===r.uri)throw new Error(\"THREE.GLTFLoader: Image \"+e+\" is missing URI and bufferView\");const l=Promise.resolve(o).then((function(e){return new Promise((function(n,r){let s=n;!0===t.isImageBitmapLoader&&(s=function(e){const t=new ei(e);t.needsUpdate=!0,n(t)}),t.load(nd.resolveURL(e,i.path),s,void 0,r)}))})).then((function(e){var t;return!0===a&&s.revokeObjectURL(o),e.userData.mimeType=r.mimeType||((t=r.uri).search(/\\.jpe?g($|\\?)/i)>0||0===t.search(/^data\\:image\\/jpeg/)?\"image/jpeg\":t.search(/\\.webp($|\\?)/i)>0||0===t.search(/^data\\:image\\/webp/)?\"image/webp\":\"image/png\"),e})).catch((function(e){throw console.error(\"THREE.GLTFLoader: Couldn't load texture\",o),e}));return this.sourceCache[e]=l,l}assignTexture(e,t,n,i){const r=this;return this.getDependency(\"texture\",n.index).then((function(s){if(!s)return null;if(void 0===n.texCoord||0==n.texCoord||\"aoMap\"===t&&1==n.texCoord||console.warn(\"THREE.GLTFLoader: Custom UV set \"+n.texCoord+\" for texture \"+t+\" not yet supported.\"),r.extensions[MA]){const e=void 0!==n.extensions?n.extensions[MA]:void 0;if(e){const t=r.associations.get(s);s=r.extensions[MA].extendTexture(s,e),r.associations.set(s,t)}}return void 0!==i&&(s.encoding=i),e[t]=s,s}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=void 0===t.attributes.tangent,r=void 0!==t.attributes.color,s=void 0===t.attributes.normal;if(e.isPoints){const e=\"PointsMaterial:\"+n.uuid;let t=this.cache.get(e);t||(t=new dc,wr.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e=\"LineBasicMaterial:\"+n.uuid;let t=this.cache.get(e);t||(t=new tc,wr.prototype.copy.call(t,n),t.color.copy(n.color),this.cache.add(e,t)),n=t}if(i||r||s){let e=\"ClonedMaterial:\"+n.uuid+\":\";i&&(e+=\"derivative-tangents:\"),r&&(e+=\"vertex-colors:\"),s&&(e+=\"flat-shading:\");let t=this.cache.get(e);t||(t=n.clone(),r&&(t.vertexColors=!0),s&&(t.flatShading=!0),i&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute(\"uv2\",t.attributes.uv),e.material=n}getMaterialType(){return Yh}loadMaterial(e){const t=this,n=this.json,i=this.extensions,r=n.materials[e];let s;const o={},a=[];if((r.extensions||{})[xA]){const e=i[xA];s=e.getMaterialType(),a.push(e.extendParams(o,r,t))}else{const n=r.pbrMetallicRoughness||{};if(o.color=new Yn(1,1,1),o.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;o.color.fromArray(e),o.opacity=e[3]}void 0!==n.baseColorTexture&&a.push(t.assignTexture(o,\"map\",n.baseColorTexture,Rt)),o.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,o.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(a.push(t.assignTexture(o,\"metalnessMap\",n.metallicRoughnessTexture)),a.push(t.assignTexture(o,\"roughnessMap\",n.metallicRoughnessTexture))),s=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),a.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,o)}))))}!0===r.doubleSided&&(o.side=v);const l=r.alphaMode||\"OPAQUE\";if(\"BLEND\"===l?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,\"MASK\"===l&&(o.alphaTest=void 0!==r.alphaCutoff?r.alphaCutoff:.5)),void 0!==r.normalTexture&&s!==Cr&&(a.push(t.assignTexture(o,\"normalMap\",r.normalTexture)),o.normalScale=new Ln(1,1),void 0!==r.normalTexture.scale)){const e=r.normalTexture.scale;o.normalScale.set(e,e)}return void 0!==r.occlusionTexture&&s!==Cr&&(a.push(t.assignTexture(o,\"aoMap\",r.occlusionTexture)),void 0!==r.occlusionTexture.strength&&(o.aoMapIntensity=r.occlusionTexture.strength)),void 0!==r.emissiveFactor&&s!==Cr&&(o.emissive=(new Yn).fromArray(r.emissiveFactor)),void 0!==r.emissiveTexture&&s!==Cr&&a.push(t.assignTexture(o,\"emissiveMap\",r.emissiveTexture,Rt)),Promise.all(a).then((function(){const n=new s(o);return r.name&&(n.name=r.name),cf(n,r),t.associations.set(n,{materials:e}),r.extensions&&lf(i,n,r),n}))}createUniqueName(e){const t=Nd.sanitizeNodeName(e||\"\");let n=t;for(let e=1;this.nodeNamesUsed[n];++e)n=t+\"_\"+e;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function r(e){return n[AA].decodePrimitive(e,t).then((function(n){return mf(n,e,t)}))}const s=[];for(let n=0,o=e.length;n\u003Co;n++){const o=e[n],a=uf(o),l=i[a];if(l)s.push(l.promise);else{let e;e=o.extensions&&o.extensions[AA]?r(o):mf(new Wr,o,t),i[a]={primitive:o,promise:e},s.push(e)}}return Promise.all(s)}loadMesh(e){const t=this,n=this.json,i=this.extensions,r=n.meshes[e],s=r.primitives,o=[];for(let e=0,t=s.length;e\u003Ct;e++){const t=void 0===s[e].material?(void 0===(a=this.cache).DefaultMaterial&&(a.DefaultMaterial=new Yh({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:m})),a.DefaultMaterial):this.getDependency(\"material\",s[e].material);o.push(t)}var a;return o.push(t.loadGeometries(s)),Promise.all(o).then((function(n){const o=n.slice(0,n.length-1),a=n[n.length-1],l=[];for(let n=0,c=a.length;n\u003Cc;n++){const c=a[n],h=s[n];let u;const d=o[n];if(h.mode===$A.TRIANGLES||h.mode===$A.TRIANGLE_STRIP||h.mode===$A.TRIANGLE_FAN||void 0===h.mode)u=!0===r.isSkinnedMesh?new zl(c,d):new cs(c,d),!0!==u.isSkinnedMesh||u.geometry.attributes.skinWeight.normalized||u.normalizeSkinWeights(),h.mode===$A.TRIANGLE_STRIP?u.geometry=gf(u.geometry,Tt):h.mode===$A.TRIANGLE_FAN&&(u.geometry=gf(u.geometry,Lt));else if(h.mode===$A.LINES)u=new hc(c,d);else if(h.mode===$A.LINE_STRIP)u=new ac(c,d);else if(h.mode===$A.LINE_LOOP)u=new uc(c,d);else{if(h.mode!==$A.POINTS)throw new Error(\"THREE.GLTFLoader: Primitive mode unsupported: \"+h.mode);u=new gc(c,d)}Object.keys(u.geometry.morphAttributes).length>0&&hf(u,r),u.name=t.createUniqueName(r.name||\"mesh_\"+e),cf(u,r),h.extensions&&lf(i,u,h),t.assignFinalMaterial(u),l.push(u)}for(let n=0,i=l.length;n\u003Ci;n++)t.associations.set(l[n],{meshes:e,primitives:n});if(1===l.length)return l[0];const c=new $a;t.associations.set(c,{meshes:e});for(let e=0,t=l.length;e\u003Ct;e++)c.add(l[e]);return c}))}loadCamera(e){let t;const n=this.json.cameras[e],i=n[n.type];if(i)return\"perspective\"===n.type?t=new vs(Tn.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):\"orthographic\"===n.type&&(t=new Hs(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),cf(t,n),Promise.resolve(t);console.warn(\"THREE.GLTFLoader: Missing camera parameters.\")}loadSkin(e){const t=this.json.skins[e],n=[];for(let e=0,i=t.joints.length;e\u003Ci;e++)n.push(this.getDependency(\"node\",t.joints[e]));return void 0!==t.inverseBindMatrices?n.push(this.getDependency(\"accessor\",t.inverseBindMatrices)):n.push(null),Promise.all(n).then((function(e){const n=e.pop(),i=e,r=[],s=[];for(let e=0,o=i.length;e\u003Co;e++){const o=i[e];if(o){r.push(o);const t=new Ui;null!==n&&t.fromArray(n.array,16*e),s.push(t)}else console.warn('THREE.GLTFLoader: Joint \"%s\" could not be found.',t.joints[e])}return new ql(r,s)}))}loadAnimation(e){const t=this.json.animations[e],n=[],i=[],r=[],s=[],o=[];for(let e=0,a=t.channels.length;e\u003Ca;e++){const a=t.channels[e],l=t.samplers[a.sampler],c=a.target,h=c.node,u=void 0!==t.parameters?t.parameters[l.input]:l.input,d=void 0!==t.parameters?t.parameters[l.output]:l.output;n.push(this.getDependency(\"node\",h)),i.push(this.getDependency(\"accessor\",u)),r.push(this.getDependency(\"accessor\",d)),s.push(l),o.push(c)}return Promise.all([Promise.all(n),Promise.all(i),Promise.all(r),Promise.all(s),Promise.all(o)]).then((function(n){const i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l=[];for(let e=0,t=i.length;e\u003Ct;e++){const t=i[e],n=r[e],c=s[e],h=o[e],u=a[e];if(void 0===t)continue;let d;switch(t.updateMatrix(),of[u.path]){case of.weights:d=mu;break;case of.rotation:d=vu;break;default:d=Eu}const p=t.name?t.name:t.uuid,A=void 0!==h.interpolation?af[h.interpolation]:xt,f=[];of[u.path]===of.weights?t.traverse((function(e){e.morphTargetInfluences&&f.push(e.name?e.name:e.uuid)})):f.push(p);let m=c.array;if(c.normalized){const e=pf(m.constructor),t=new Float32Array(m.length);for(let n=0,i=m.length;n\u003Ci;n++)t[n]=m[n]*e;m=t}for(let e=0,t=f.length;e\u003Ct;e++){const t=new d(f[e]+\".\"+of[u.path],n.array,m,A);\"CUBICSPLINE\"===h.interpolation&&(t.createInterpolant=function(e){return new(this instanceof vu?ZA:JA)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(t)}}const c=t.name?t.name:\"animation_\"+e;return new bu(c,void 0,l)}))}createNodeMesh(e){const t=this.json,n=this,i=t.nodes[e];return void 0===i.mesh?null:n.getDependency(\"mesh\",i.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,i.mesh,e);return void 0!==i.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=i.weights.length;t\u003Cn;t++)e.morphTargetInfluences[t]=i.weights[t]})),t}))}loadNode(e){const t=this.json,n=this.extensions,i=this,r=t.nodes[e],s=r.name?i.createUniqueName(r.name):\"\";return function(){const t=[],n=i._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return n&&t.push(n),void 0!==r.camera&&t.push(i.getDependency(\"camera\",r.camera).then((function(e){return i._getNodeRef(i.cameraCache,r.camera,e)}))),i._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){let o;if(o=!0===r.isBone?new Hl:t.length>1?new $a:1===t.length?t[0]:new hr,o!==t[0])for(let e=0,n=t.length;e\u003Cn;e++)o.add(t[e]);if(r.name&&(o.userData.name=r.name,o.name=s),cf(o,r),r.extensions&&lf(n,o,r),void 0!==r.matrix){const e=new Ui;e.fromArray(r.matrix),o.applyMatrix4(e)}else void 0!==r.translation&&o.position.fromArray(r.translation),void 0!==r.rotation&&o.quaternion.fromArray(r.rotation),void 0!==r.scale&&o.scale.fromArray(r.scale);return i.associations.has(o)||i.associations.set(o,{}),i.associations.get(o).nodes=e,o}))}loadScene(e){const t=this.json,n=this.extensions,i=this.json.scenes[e],r=this,s=new $a;i.name&&(s.name=r.createUniqueName(i.name)),cf(s,i),i.extensions&&lf(n,s,i);const o=i.nodes||[],a=[];for(let e=0,n=o.length;e\u003Cn;e++)a.push(ff(o[e],s,t,r));return Promise.all(a).then((function(){return r.associations=(e=>{const t=new Map;for(const[e,n]of r.associations)(e instanceof wr||e instanceof ei)&&t.set(e,n);return e.traverse((e=>{const n=r.associations.get(e);null!=n&&t.set(e,n)})),t})(s),s}))}}function ff(e,t,n,i){const r=n.nodes[e];return i.getDependency(\"node\",e).then((function(e){return void 0===r.skin?e:i.getDependency(\"skin\",r.skin).then((function(t){return e.traverse((function(e){e.isSkinnedMesh&&e.bind(t,e.matrixWorld)})),e}))})).then((function(e){t.add(e);const s=[];if(r.children){const t=r.children;for(let r=0,o=t.length;r\u003Co;r++){const o=t[r];s.push(ff(o,e,n,i))}}return Promise.all(s)}))}function mf(e,t,n){const i=t.attributes,r=[];function s(t,i){return n.getDependency(\"accessor\",t).then((function(t){e.setAttribute(i,t)}))}for(const t in i){const n=sf[t]||t.toLowerCase();n in e.attributes||r.push(s(i[t],n))}if(void 0!==t.indices&&!e.index){const i=n.getDependency(\"accessor\",t.indices).then((function(t){e.setIndex(t)}));r.push(i)}return cf(e,t),function(e,t,n){const i=t.attributes,r=new di;if(void 0===i.POSITION)return;{const e=n.json.accessors[i.POSITION],t=e.min,s=e.max;if(void 0===t||void 0===s)return void console.warn(\"THREE.GLTFLoader: Missing min/max properties for accessor POSITION.\");if(r.set(new ci(t[0],t[1],t[2]),new ci(s[0],s[1],s[2])),e.normalized){const t=pf(ef[e.componentType]);r.min.multiplyScalar(t),r.max.multiplyScalar(t)}}const s=t.targets;if(void 0!==s){const e=new ci,t=new ci;for(let i=0,r=s.length;i\u003Cr;i++){const r=s[i];if(void 0!==r.POSITION){const i=n.json.accessors[r.POSITION],s=i.min,o=i.max;if(void 0!==s&&void 0!==o){if(t.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),t.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),t.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),i.normalized){const e=pf(ef[i.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn(\"THREE.GLTFLoader: Missing min/max properties for accessor POSITION.\")}}r.expandByVector(e)}e.boundingBox=r;const o=new Ti;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,e.boundingSphere=o}(e,t,n),Promise.all(r).then((function(){return void 0!==t.targets?function(e,t,n){let i=!1,r=!1,s=!1;for(let e=0,n=t.length;e\u003Cn;e++){const n=t[e];if(void 0!==n.POSITION&&(i=!0),void 0!==n.NORMAL&&(r=!0),void 0!==n.COLOR_0&&(s=!0),i&&r&&s)break}if(!i&&!r&&!s)return Promise.resolve(e);const o=[],a=[],l=[];for(let c=0,h=t.length;c\u003Ch;c++){const h=t[c];if(i){const t=void 0!==h.POSITION?n.getDependency(\"accessor\",h.POSITION):e.attributes.position;o.push(t)}if(r){const t=void 0!==h.NORMAL?n.getDependency(\"accessor\",h.NORMAL):e.attributes.normal;a.push(t)}if(s){const t=void 0!==h.COLOR_0?n.getDependency(\"accessor\",h.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then((function(t){const n=t[0],o=t[1],a=t[2];return i&&(e.morphAttributes.position=n),r&&(e.morphAttributes.normal=o),s&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}function gf(e,t){let n=e.getIndex();if(null===n){const t=[],i=e.getAttribute(\"position\");if(void 0===i)return console.error(\"THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.\"),e;for(let e=0;e\u003Ci.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const i=n.count-2,r=[];if(t===Lt)for(let e=1;e\u003C=i;e++)r.push(n.getX(0)),r.push(n.getX(e)),r.push(n.getX(e+1));else for(let e=0;e\u003Ci;e++)e%2==0?(r.push(n.getX(e)),r.push(n.getX(e+1)),r.push(n.getX(e+2))):(r.push(n.getX(e+2)),r.push(n.getX(e+1)),r.push(n.getX(e)));r.length/3!==i&&console.error(\"THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.\");const s=e.clone();return s.setIndex(r),s}class vf{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener(\"message\",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e\u003Cthis.pool;e++)if(!(this.workerStatus&1\u003C\u003Ce))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:t,msg:n,transfer:i}=this.queue.shift();this.workersResolve[e]=t,this.workers[e].postMessage(n,i)}else this.workerStatus^=1\u003C\u003Ce}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise((n=>{const i=this._getIdleWorker();-1!==i?(this._initWorker(i),this.workerStatus|=1\u003C\u003Ci,this.workersResolve[i]=n,this.workers[i].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})}))}dispose(){this.workers.forEach((e=>e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}var yf=n(5851).lW;class Ef{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class bf{constructor(e,t,n,i){this._dataView=new DataView(e.buffer,e.byteOffset+t,n),this._littleEndian=i,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_skip(e){return this._offset+=e,this}_scan(e,t=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==t&&i\u003Ce;)i++,this._offset++;return i\u003Ce&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}new Uint8Array([0]);const xf=[171,75,84,88,32,50,48,187,13,10,26,10];function wf(e){return\"undefined\"!=typeof TextDecoder?(new TextDecoder).decode(e):yf.from(e).toString(\"utf8\")}var Cf=n(5851).lW;let Mf,_f,If;const Bf={env:{emscripten_notify_memory_growth:function(e){If=new Uint8Array(_f.exports.memory.buffer)}}};class Sf{init(){return Mf||(Mf=\"undefined\"!=typeof fetch?fetch(\"data:application/wasm;base64,\"+Tf).then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,Bf))).then(this._init):WebAssembly.instantiate(Cf.from(Tf,\"base64\"),Bf).then(this._init),Mf)}_init(e){_f=e.instance,Bf.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!_f)throw new Error(\"ZSTDDecoder: Await .init() before decoding.\");const n=e.byteLength,i=_f.exports.malloc(n);If.set(e,i),t=t||Number(_f.exports.ZSTD_findDecompressedSize(i,n));const r=_f.exports.malloc(t),s=_f.exports.ZSTD_decompress(r,t,i,n),o=If.slice(r,r+s);return _f.exports.free(i),_f.exports.free(r),o}}const Tf=\"AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ\",Lf=new WeakMap;let Df,Rf=0;class Pf extends _u{constructor(e){super(e),this.transcoderPath=\"\",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new vf,this.workerSourceURL=\"\",this.workerConfig=null,\"undefined\"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest \"basis_transcoder\". \"msc_basis_transcoder\" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}detectSupport(e){return this.workerConfig={astcSupported:e.extensions.has(\"WEBGL_compressed_texture_astc\"),etc1Supported:e.extensions.has(\"WEBGL_compressed_texture_etc1\"),etc2Supported:e.extensions.has(\"WEBGL_compressed_texture_etc\"),dxtSupported:e.extensions.has(\"WEBGL_compressed_texture_s3tc\"),bptcSupported:e.extensions.has(\"EXT_texture_compression_bptc\"),pvrtcSupported:e.extensions.has(\"WEBGL_compressed_texture_pvrtc\")||e.extensions.has(\"WEBKIT_WEBGL_compressed_texture_pvrtc\")},e.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1),this}init(){if(!this.transcoderPending){const e=new Su(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync(\"basis_transcoder.js\"),n=new Su(this.manager);n.setPath(this.transcoderPath),n.setResponseType(\"arraybuffer\"),n.setWithCredentials(this.withCredentials);const i=n.loadAsync(\"basis_transcoder.wasm\");this.transcoderPending=Promise.all([t,i]).then((([e,t])=>{const n=Pf.BasisWorker.toString(),i=[\"/* constants */\",\"let _EngineFormat = \"+JSON.stringify(Pf.EngineFormat),\"let _TranscoderFormat = \"+JSON.stringify(Pf.TranscoderFormat),\"let _BasisFormat = \"+JSON.stringify(Pf.BasisFormat),\"/* basis_transcoder.js */\",e,\"/* worker */\",n.substring(n.indexOf(\"{\")+1,n.lastIndexOf(\"}\"))].join(\"\\n\");this.workerSourceURL=URL.createObjectURL(new Blob([i])),this.transcoderBinary=t,this.workerPool.setWorkerCreator((()=>{const e=new Worker(this.workerSourceURL),t=this.transcoderBinary.slice(0);return e.postMessage({type:\"init\",config:this.workerConfig,transcoderBinary:t},[t]),e}))})),Rf>0&&console.warn(\"THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances.\"),Rf++}return this.transcoderPending}load(e,t,n,i){if(null===this.workerConfig)throw new Error(\"THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.\");const r=new Su(this.manager);r.setResponseType(\"arraybuffer\"),r.setWithCredentials(this.withCredentials),r.load(e,(e=>{if(Lf.has(e))return Lf.get(e).promise.then(t).catch(i);this._createTexture(e).then((e=>t?t(e):null)).catch(i)}),n,i)}_createTextureFrom(e,t){const{mipmaps:n,width:i,height:r,format:s,type:o,error:a,dfdTransferFn:l,dfdFlags:c}=e;if(\"error\"===o)return Promise.reject(a);const h=t.layerCount>1?new xc(n,i,r,t.layerCount,s,we):new bc(n,i,r,s,we);return h.minFilter=1===n.length?ve:be,h.magFilter=ve,h.generateMipmaps=!1,h.needsUpdate=!0,h.encoding=2===l?Rt:Dt,h.premultiplyAlpha=!!(1&c),h}async _createTexture(e,t={}){const n=function(e){const t=new Uint8Array(e.buffer,e.byteOffset,xf.length);if(t[0]!==xf[0]||t[1]!==xf[1]||t[2]!==xf[2]||t[3]!==xf[3]||t[4]!==xf[4]||t[5]!==xf[5]||t[6]!==xf[6]||t[7]!==xf[7]||t[8]!==xf[8]||t[9]!==xf[9]||t[10]!==xf[10]||t[11]!==xf[11])throw new Error(\"Missing KTX 2.0 identifier.\");const n=new Ef,i=17*Uint32Array.BYTES_PER_ELEMENT,r=new bf(e,xf.length,i,!0);n.vkFormat=r._nextUint32(),n.typeSize=r._nextUint32(),n.pixelWidth=r._nextUint32(),n.pixelHeight=r._nextUint32(),n.pixelDepth=r._nextUint32(),n.layerCount=r._nextUint32(),n.faceCount=r._nextUint32();const s=r._nextUint32();n.supercompressionScheme=r._nextUint32();const o=r._nextUint32(),a=r._nextUint32(),l=r._nextUint32(),c=r._nextUint32(),h=r._nextUint64(),u=r._nextUint64(),d=new bf(e,xf.length+i,3*s*8,!0);for(let t=0;t\u003Cs;t++)n.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+d._nextUint64(),d._nextUint64()),uncompressedByteLength:d._nextUint64()});const p=new bf(e,o,a,!0),A={vendorId:p._skip(4)._nextUint16(),descriptorType:p._nextUint16(),versionNumber:p._nextUint16(),descriptorBlockSize:p._nextUint16(),colorModel:p._nextUint8(),colorPrimaries:p._nextUint8(),transferFunction:p._nextUint8(),flags:p._nextUint8(),texelBlockDimension:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],bytesPlane:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],samples:[]},f=(A.descriptorBlockSize/4-6)/4;for(let e=0;e\u003Cf;e++){const t={bitOffset:p._nextUint16(),bitLength:p._nextUint8(),channelType:p._nextUint8(),samplePosition:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&t.channelType?(t.sampleLower=p._nextInt32(),t.sampleUpper=p._nextInt32()):(t.sampleLower=p._nextUint32(),t.sampleUpper=p._nextUint32()),A.samples[e]=t}n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(A);const m=new bf(e,l,c,!0);for(;m._offset\u003Cc;){const e=m._nextUint32(),t=m._scan(e),i=wf(t),r=m._scan(e-t.byteLength);n.keyValue[i]=i.match(/^ktx/i)?wf(r):r,m._offset%4&&m._skip(4-m._offset%4)}if(u\u003C=0)return n;const g=new bf(e,h,u,!0),v=g._nextUint16(),y=g._nextUint16(),E=g._nextUint32(),b=g._nextUint32(),x=g._nextUint32(),w=g._nextUint32(),C=[];for(let e=0;e\u003Cs;e++)C.push({imageFlags:g._nextUint32(),rgbSliceByteOffset:g._nextUint32(),rgbSliceByteLength:g._nextUint32(),alphaSliceByteOffset:g._nextUint32(),alphaSliceByteLength:g._nextUint32()});const M=h+g._offset,_=M+E,I=_+b,B=I+x,S=new Uint8Array(e.buffer,e.byteOffset+M,E),T=new Uint8Array(e.buffer,e.byteOffset+_,b),L=new Uint8Array(e.buffer,e.byteOffset+I,x),D=new Uint8Array(e.buffer,e.byteOffset+B,w);return n.globalData={endpointCount:v,selectorCount:y,imageDescs:C,endpointsData:S,selectorsData:T,tablesData:L,extendedData:D},n}(new Uint8Array(e));if(0!==n.vkFormat)return async function(e){const{vkFormat:t,pixelWidth:n,pixelHeight:i,pixelDepth:r}=e;if(void 0===kf[t])throw new Error(\"THREE.KTX2Loader: Unsupported vkFormat.\");const s=e.levels[0];let o,a;if(0===e.supercompressionScheme)o=s.levelData;else{if(2!==e.supercompressionScheme)throw new Error(\"THREE.KTX2Loader: Unsupported supercompressionScheme.\");Df||(Df=new Promise((async e=>{const t=new Sf;await t.init(),e(t)}))),o=(await Df).decode(s.levelData,s.uncompressedByteLength)}a=Ff[t]===Se?new Float32Array(o.buffer,o.byteOffset,o.byteLength/Float32Array.BYTES_PER_ELEMENT):Ff[t]===Te?new Uint16Array(o.buffer,o.byteOffset,o.byteLength/Uint16Array.BYTES_PER_ELEMENT):o;const l=0===r?new Vl(a,n,i):new si(a,n,i,r);return l.type=Ff[t],l.format=kf[t],l.encoding=Of[t]||Dt,l.needsUpdate=!0,Promise.resolve(l)}(n);const i=t,r=this.init().then((()=>this.workerPool.postMessage({type:\"transcode\",buffer:e,taskConfig:i},[e]))).then((e=>this._createTextureFrom(e.data,n)));return Lf.set(e,{promise:r}),r}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Rf--,this}}Pf.BasisFormat={ETC1S:0,UASTC_4x4:1},Pf.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Pf.EngineFormat={RGBAFormat:Fe,RGBA_ASTC_4x4_Format:it,RGBA_BPTC_Format:gt,RGBA_ETC2_EAC_Format:nt,RGBA_PVRTC_4BPPV1_Format:Ze,RGBA_S3TC_DXT5_Format:Xe,RGB_ETC1_Format:et,RGB_ETC2_Format:tt,RGB_PVRTC_4BPPV1_Format:Je,RGB_S3TC_DXT1_Format:je},Pf.BasisWorker=function(){let e,t,n;const i=_EngineFormat,r=_TranscoderFormat,s=_BasisFormat;self.addEventListener(\"message\",(function(o){const u=o.data;switch(u.type){case\"init\":e=u.config,d=u.transcoderBinary,t=new Promise((e=>{n={wasmBinary:d,onRuntimeInitialized:e},BASIS(n)})).then((()=>{n.initializeBasis(),void 0===n.KTX2File&&console.warn(\"THREE.KTX2Loader: Please update Basis Universal transcoder.\")}));break;case\"transcode\":t.then((()=>{try{const{width:t,height:o,hasAlpha:d,mipmaps:p,format:A,dfdTransferFn:f,dfdFlags:m}=function(t){const o=new n.KTX2File(new Uint8Array(t));function u(){o.close(),o.delete()}if(!o.isValid())throw u(),new Error(\"THREE.KTX2Loader:\\tInvalid or unsupported .ktx2 file\");const d=o.isUASTC()?s.UASTC_4x4:s.ETC1S,p=o.getWidth(),A=o.getHeight(),f=o.getLayers()||1,m=o.getLevels(),g=o.getHasAlpha(),v=o.getDFDTransferFunc(),y=o.getDFDFlags(),{transcoderFormat:E,engineFormat:b}=function(t,n,o,h){let u,d;const p=t===s.ETC1S?a:l;for(let i=0;i\u003Cp.length;i++){const r=p[i];if(e[r.if]&&r.basisFormat.includes(t)&&!(h&&r.transcoderFormat.length\u003C2)&&(!r.needsPowerOfTwo||c(n)&&c(o)))return u=r.transcoderFormat[h?1:0],d=r.engineFormat[h?1:0],{transcoderFormat:u,engineFormat:d}}return console.warn(\"THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32.\"),u=r.RGBA32,d=i.RGBAFormat,{transcoderFormat:u,engineFormat:d}}(d,p,A,g);if(!p||!A||!m)throw u(),new Error(\"THREE.KTX2Loader:\\tInvalid texture\");if(!o.startTranscoding())throw u(),new Error(\"THREE.KTX2Loader: .startTranscoding failed\");const x=[];for(let e=0;e\u003Cm;e++){const t=[];let n,i;for(let r=0;r\u003Cf;r++){const s=o.getImageLevelInfo(e,r,0);n=s.origWidth,i=s.origHeight;const a=new Uint8Array(o.getImageTranscodedSizeInBytes(e,r,0,E));if(!o.transcodeImage(a,e,r,0,E,0,-1,-1))throw u(),new Error(\"THREE.KTX2Loader: .transcodeImage failed.\");t.push(a)}x.push({data:h(t),width:n,height:i})}return u(),{width:p,height:A,hasAlpha:g,mipmaps:x,format:b,dfdTransferFn:v,dfdFlags:y}}(u.buffer),g=[];for(let e=0;e\u003Cp.length;++e)g.push(p[e].data.buffer);self.postMessage({type:\"transcode\",id:u.id,width:t,height:o,hasAlpha:d,mipmaps:p,format:A,dfdTransferFn:f,dfdFlags:m},g)}catch(e){console.error(e),self.postMessage({type:\"error\",id:u.id,error:e.message})}}))}var d}));const o=[{if:\"astcSupported\",basisFormat:[s.UASTC_4x4],transcoderFormat:[r.ASTC_4x4,r.ASTC_4x4],engineFormat:[i.RGBA_ASTC_4x4_Format,i.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:\"bptcSupported\",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.BC7_M5,r.BC7_M5],engineFormat:[i.RGBA_BPTC_Format,i.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:\"dxtSupported\",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.BC1,r.BC3],engineFormat:[i.RGB_S3TC_DXT1_Format,i.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:\"etc2Supported\",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.ETC1,r.ETC2],engineFormat:[i.RGB_ETC2_Format,i.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:\"etc1Supported\",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.ETC1],engineFormat:[i.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:\"pvrtcSupported\",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.PVRTC1_4_RGB,r.PVRTC1_4_RGBA],engineFormat:[i.RGB_PVRTC_4BPPV1_Format,i.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],a=o.sort((function(e,t){return e.priorityETC1S-t.priorityETC1S})),l=o.sort((function(e,t){return e.priorityUASTC-t.priorityUASTC}));function c(e){return e\u003C=2||0==(e&e-1)&&0!==e}function h(e){let t=0;for(const n of e)t+=n.byteLength;const n=new Uint8Array(t);let i=0;for(const t of e)n.set(t,i),i+=t.byteLength;return n}};const kf={109:Fe,97:Fe,37:Fe,43:Fe,103:He,83:He,16:He,22:He,100:Ge,76:Ge,15:Ge,9:Ge},Ff={109:Se,97:Te,37:we,43:we,103:Se,83:Te,16:we,22:we,100:Se,76:Te,15:we,9:we},Of={43:Rt,22:Rt,15:Rt},Qf=/^[og]\\s*(.+)?/,Uf=/^mtllib /,Nf=/^usemtl /,Gf=/^usemap /,zf=/\\s+/,Hf=new ci,Vf=new ci,Wf=new ci,jf=new ci,qf=new ci,Yf=new Yn;function Xf(){const e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const n=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||\"\",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){const n=this._finalize(!1);n&&(n.inherited||n.groupCount\u003C=0)&&this.materials.splice(n.index,1);const i={index:this.materials.length,name:e||\"\",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:\"\",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:\"number\"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(i),i},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount\u003C=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),t}},n&&n.name&&\"function\"==typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const i=this.vertices,r=this.object.geometry.vertices;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[n+0],i[n+1],i[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const i=this.normals,r=this.object.geometry.normals;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[n+0],i[n+1],i[n+2])},addFaceNormal:function(e,t,n){const i=this.vertices,r=this.object.geometry.normals;Hf.fromArray(i,e),Vf.fromArray(i,t),Wf.fromArray(i,n),qf.subVectors(Wf,Vf),jf.subVectors(Hf,Vf),qf.cross(jf),qf.normalize(),r.push(qf.x,qf.y,qf.z),r.push(qf.x,qf.y,qf.z),r.push(qf.x,qf.y,qf.z)},addColor:function(e,t,n){const i=this.colors,r=this.object.geometry.colors;void 0!==i[e]&&r.push(i[e+0],i[e+1],i[e+2]),void 0!==i[t]&&r.push(i[t+0],i[t+1],i[t+2]),void 0!==i[n]&&r.push(i[n+0],i[n+1],i[n+2])},addUV:function(e,t,n){const i=this.uvs,r=this.object.geometry.uvs;r.push(i[e+0],i[e+1]),r.push(i[t+0],i[t+1]),r.push(i[n+0],i[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,i,r,s,o,a,l){const c=this.vertices.length;let h=this.parseVertexIndex(e,c),u=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(h,u,d),this.addColor(h,u,d),void 0!==o&&\"\"!==o){const e=this.normals.length;h=this.parseNormalIndex(o,e),u=this.parseNormalIndex(a,e),d=this.parseNormalIndex(l,e),this.addNormal(h,u,d)}else this.addFaceNormal(h,u,d);if(void 0!==i&&\"\"!==i){const e=this.uvs.length;h=this.parseUVIndex(i,e),u=this.parseUVIndex(r,e),d=this.parseUVIndex(s,e),this.addUV(h,u,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type=\"Points\";const t=this.vertices.length;for(let n=0,i=e.length;n\u003Ci;n++){const i=this.parseVertexIndex(e[n],t);this.addVertexPoint(i),this.addColor(i)}},addLineGeometry:function(e,t){this.object.geometry.type=\"Line\";const n=this.vertices.length,i=this.uvs.length;for(let t=0,i=e.length;t\u003Ci;t++)this.addVertexLine(this.parseVertexIndex(e[t],n));for(let e=0,n=t.length;e\u003Cn;e++)this.addUVLine(this.parseUVIndex(t[e],i))}};return e.startObject(\"\",!1),e}class Jf{constructor(e=\"\",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin=\"anonymous\",this.side=void 0!==this.options.side?this.options.side:m,this.wrap=void 0!==this.options.wrap?this.options.wrap:he}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const n in e){const i=e[n],r={};t[n]=r;for(const e in i){let t=!0,n=i[e];const s=e.toLowerCase();switch(s){case\"kd\":case\"ka\":case\"ks\":this.options&&this.options.normalizeRGB&&(n=[n[0]/255,n[1]/255,n[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===n[0]&&0===n[1]&&0===n[2]&&(t=!1)}t&&(r[s]=n)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,n=this.materialsInfo[e],i={name:e,side:this.side};function r(e,n){if(i[e])return;const r=t.getTextureParams(n,i),s=t.loadTexture((o=t.baseUrl,\"string\"!=typeof(a=r.url)||\"\"===a?\"\":/^https?:\\/\\//i.test(a)?a:o+a));var o,a;s.repeat.copy(r.scale),s.offset.copy(r.offset),s.wrapS=t.wrap,s.wrapT=t.wrap,\"map\"!==e&&\"emissiveMap\"!==e||(s.encoding=Rt),i[e]=s}for(const e in n){const t=n[e];let s;if(\"\"!==t)switch(e.toLowerCase()){case\"kd\":i.color=(new Yn).fromArray(t).convertSRGBToLinear();break;case\"ks\":i.specular=(new Yn).fromArray(t).convertSRGBToLinear();break;case\"ke\":i.emissive=(new Yn).fromArray(t).convertSRGBToLinear();break;case\"map_kd\":r(\"map\",t);break;case\"map_ks\":r(\"specularMap\",t);break;case\"map_ke\":r(\"emissiveMap\",t);break;case\"norm\":r(\"normalMap\",t);break;case\"map_bump\":case\"bump\":r(\"bumpMap\",t);break;case\"map_d\":r(\"alphaMap\",t),i.transparent=!0;break;case\"ns\":i.shininess=parseFloat(t);break;case\"d\":s=parseFloat(t),s\u003C1&&(i.opacity=s,i.transparent=!0);break;case\"tr\":s=parseFloat(t),this.options&&this.options.invertTrProperty&&(s=1-s),s>0&&(i.opacity=1-s,i.transparent=!0)}}return this.materials[e]=new Jh(i),this.materials[e]}getTextureParams(e,t){const n={scale:new Ln(1,1),offset:new Ln(0,0)},i=e.split(/\\s+/);let r;return r=i.indexOf(\"-bm\"),r>=0&&(t.bumpScale=parseFloat(i[r+1]),i.splice(r,2)),r=i.indexOf(\"-s\"),r>=0&&(n.scale.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),r=i.indexOf(\"-o\"),r>=0&&(n.offset.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),n.url=i.join(\" \").trim(),n}loadTexture(e,t,n,i,r){const s=void 0!==this.manager?this.manager:Mu;let o=s.getHandler(e);null===o&&(o=new ku(s)),o.setCrossOrigin&&o.setCrossOrigin(this.crossOrigin);const a=o.load(e,n,i,r);return void 0!==t&&(a.mapping=t),a}}function Kf(){throw new Error(\"BufferGeometryUtils: computeTangents renamed to computeMikkTSpaceTangents.\")}function Zf(e,t,n=!0){if(!t||!t.isReady)throw new Error(\"BufferGeometryUtils: Initialized MikkTSpace library required.\");if(!e.hasAttribute(\"position\")||!e.hasAttribute(\"normal\")||!e.hasAttribute(\"uv\"))throw new Error('BufferGeometryUtils: Tangents require \"position\", \"normal\", and \"uv\" attributes.');function i(e){if(e.normalized||e.isInterleavedBufferAttribute){const t=new Float32Array(e.getCount()*e.itemSize);for(let n=0,i=0;n\u003Ce.getCount();n++)t[i++]=e.getX(n),t[i++]=e.getY(n),e.itemSize>2&&(t[i++]=e.getZ(n));return t}return e.array instanceof Float32Array?e.array:new Float32Array(e.array)}const r=e.index?e.toNonIndexed():e,s=t.generateTangents(i(r.attributes.position),i(r.attributes.normal),i(r.attributes.uv));if(n)for(let e=3;e\u003Cs.length;e+=4)s[e]*=-1;return r.setAttribute(\"tangent\",new Ir(s,4)),e!==r&&e.copy(r),e}function $f(e,t=!1){const n=null!==e[0].index,i=new Set(Object.keys(e[0].attributes)),r=new Set(Object.keys(e[0].morphAttributes)),s={},o={},a=e[0].morphTargetsRelative,l=new Wr;let c=0;for(let h=0;h\u003Ce.length;++h){const u=e[h];let d=0;if(n!==(null!==u.index))return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index \"+h+\". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.\"),null;for(const e in u.attributes){if(!i.has(e))return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index \"+h+'. All geometries must have compatible attributes; make sure \"'+e+'\" attribute exists among all geometries, or in none of them.'),null;void 0===s[e]&&(s[e]=[]),s[e].push(u.attributes[e]),d++}if(d!==i.size)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index \"+h+\". Make sure all geometries have the same number of attributes.\"),null;if(a!==u.morphTargetsRelative)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index \"+h+\". .morphTargetsRelative must be consistent throughout all geometries.\"),null;for(const e in u.morphAttributes){if(!r.has(e))return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index \"+h+\". .morphAttributes must be consistent throughout all geometries.\"),null;void 0===o[e]&&(o[e]=[]),o[e].push(u.morphAttributes[e])}if(t){let e;if(n)e=u.index.count;else{if(void 0===u.attributes.position)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index \"+h+\". The geometry must have either an index or a position attribute\"),null;e=u.attributes.position.count}l.addGroup(c,e,h),c+=e}}if(n){let t=0;const n=[];for(let i=0;i\u003Ce.length;++i){const r=e[i].index;for(let e=0;e\u003Cr.count;++e)n.push(r.getX(e)+t);t+=e[i].attributes.position.count}l.setIndex(n)}for(const e in s){const t=em(s[e]);if(!t)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the \"+e+\" attribute.\"),null;l.setAttribute(e,t)}for(const e in o){const t=o[e][0].length;if(0===t)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[e]=[];for(let n=0;n\u003Ct;++n){const t=[];for(let i=0;i\u003Co[e].length;++i)t.push(o[e][i][n]);const i=em(t);if(!i)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the \"+e+\" morphAttribute.\"),null;l.morphAttributes[e].push(i)}}return l}function em(e){let t,n,i,r=0;for(let s=0;s\u003Ce.length;++s){const o=e[s];if(o.isInterleavedBufferAttribute)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported.\"),null;if(void 0===t&&(t=o.array.constructor),t!==o.array.constructor)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes.\"),null;if(void 0===n&&(n=o.itemSize),n!==o.itemSize)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes.\"),null;if(void 0===i&&(i=o.normalized),i!==o.normalized)return console.error(\"THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes.\"),null;r+=o.array.length}const s=new t(r);let o=0;for(let t=0;t\u003Ce.length;++t)s.set(e[t].array,o),o+=e[t].array.length;return new Ir(s,n,i)}function tm(e){return e.isInstancedInterleavedBufferAttribute||e.isInterleavedBufferAttribute?im(e):e.isInstancedBufferAttribute?(new Yl).copy(e):(new Ir).copy(e)}function nm(e){let t,n=0,i=0;for(let r=0,s=e.length;r\u003Cs;++r){const s=e[r];if(void 0===t&&(t=s.array.constructor),t!==s.array.constructor)return console.error(\"AttributeBuffers of different types cannot be interleaved\"),null;n+=s.array.length,i+=s.itemSize}const r=new fl(new t(n),i);let s=0;const o=[],a=[\"getX\",\"getY\",\"getZ\",\"getW\"],l=[\"setX\",\"setY\",\"setZ\",\"setW\"];for(let t=0,n=e.length;t\u003Cn;t++){const n=e[t],i=n.itemSize,c=n.count,h=new gl(r,i,s,n.normalized);o.push(h),s+=i;for(let e=0;e\u003Cc;e++)for(let t=0;t\u003Ci;t++)h[l[t]](e,n[a[t]](e))}return o}function im(e){const t=e.data.array.constructor,n=e.count,i=e.itemSize,r=e.normalized,s=new t(n*i);let o;o=e.isInstancedInterleavedBufferAttribute?new Yl(s,i,r,e.meshPerAttribute):new Ir(s,i,r);for(let t=0;t\u003Cn;t++)o.setX(t,e.getX(t)),i>=2&&o.setY(t,e.getY(t)),i>=3&&o.setZ(t,e.getZ(t)),i>=4&&o.setW(t,e.getW(t));return o}function rm(e){const t=e.attributes,n=e.morphTargets,i=new Map;for(const e in t){const n=t[e];n.isInterleavedBufferAttribute&&(i.has(n)||i.set(n,im(n)),t[e]=i.get(n))}for(const e in n){const t=n[e];t.isInterleavedBufferAttribute&&(i.has(t)||i.set(t,im(t)),n[e]=i.get(t))}}function sm(e){let t=0;for(const n in e.attributes){const i=e.getAttribute(n);t+=i.count*i.itemSize*i.array.BYTES_PER_ELEMENT}const n=e.getIndex();return t+=n?n.count*n.itemSize*n.array.BYTES_PER_ELEMENT:0,t}function om(e,t=1e-4){t=Math.max(t,Number.EPSILON);const n={},i=e.getIndex(),r=e.getAttribute(\"position\"),s=i?i.count:r.count;let o=0;const a=Object.keys(e.attributes),l={},c={},h=[],u=[\"getX\",\"getY\",\"getZ\",\"getW\"],d=[\"setX\",\"setY\",\"setZ\",\"setW\"];for(let t=0,n=a.length;t\u003Cn;t++){const n=a[t],i=e.attributes[n];l[n]=new Ir(new i.array.constructor(i.count*i.itemSize),i.itemSize,i.normalized);const r=e.morphAttributes[n];r&&(c[n]=new Ir(new r.array.constructor(r.count*r.itemSize),r.itemSize,r.normalized))}const p=Math.log10(1/t),A=Math.pow(10,p);for(let t=0;t\u003Cs;t++){const r=i?i.getX(t):t;let s=\"\";for(let t=0,n=a.length;t\u003Cn;t++){const n=a[t],i=e.getAttribute(n),o=i.itemSize;for(let e=0;e\u003Co;e++)s+=~~(i[u[e]](r)*A)+\",\"}if(s in n)h.push(n[s]);else{for(let t=0,n=a.length;t\u003Cn;t++){const n=a[t],i=e.getAttribute(n),s=e.morphAttributes[n],h=i.itemSize,p=l[n],A=c[n];for(let e=0;e\u003Ch;e++){const t=u[e],n=d[e];if(p[n](o,i[t](r)),s)for(let e=0,i=s.length;e\u003Ci;e++)A[e][n](o,s[e][t](r))}}n[s]=o,h.push(o),o++}}const f=e.clone();for(const t in e.attributes){const e=l[t];if(f.setAttribute(t,new Ir(e.array.slice(0,o*e.itemSize),e.itemSize,e.normalized)),t in c)for(let e=0;e\u003Cc[t].length;e++){const n=c[t][e];f.morphAttributes[t][e]=new Ir(n.array.slice(0,o*n.itemSize),n.itemSize,n.normalized)}}return f.setIndex(h),f}function am(e,t){if(t===St)return console.warn(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.\"),e;if(t===Lt||t===Tt){let n=e.getIndex();if(null===n){const t=[],i=e.getAttribute(\"position\");if(void 0===i)return console.error(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.\"),e;for(let e=0;e\u003Ci.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const i=n.count-2,r=[];if(t===Lt)for(let e=1;e\u003C=i;e++)r.push(n.getX(0)),r.push(n.getX(e)),r.push(n.getX(e+1));else for(let e=0;e\u003Ci;e++)e%2==0?(r.push(n.getX(e)),r.push(n.getX(e+1)),r.push(n.getX(e+2))):(r.push(n.getX(e+2)),r.push(n.getX(e+1)),r.push(n.getX(e)));r.length/3!==i&&console.error(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.\");const s=e.clone();return s.setIndex(r),s.clearGroups(),s}return console.error(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:\",t),e}function lm(e){if(!0!==e.geometry.isBufferGeometry)return console.error(\"THREE.BufferGeometryUtils: Geometry is not of type BufferGeometry.\"),null;const t=new ci,n=new ci,i=new ci,r=new ci,s=new ci,o=new ci,a=new ci,l=new ci,c=new ci;function h(e,h,u,d,p,A,f,m){t.fromBufferAttribute(h,p),n.fromBufferAttribute(h,A),i.fromBufferAttribute(h,f);const g=e.morphTargetInfluences;if(u&&g){a.set(0,0,0),l.set(0,0,0),c.set(0,0,0);for(let e=0,h=u.length;e\u003Ch;e++){const h=g[e],m=u[e];0!==h&&(r.fromBufferAttribute(m,p),s.fromBufferAttribute(m,A),o.fromBufferAttribute(m,f),d?(a.addScaledVector(r,h),l.addScaledVector(s,h),c.addScaledVector(o,h)):(a.addScaledVector(r.sub(t),h),l.addScaledVector(s.sub(n),h),c.addScaledVector(o.sub(i),h)))}t.add(a),n.add(l),i.add(c)}e.isSkinnedMesh&&(e.boneTransform(p,t),e.boneTransform(A,n),e.boneTransform(f,i)),m[3*p+0]=t.x,m[3*p+1]=t.y,m[3*p+2]=t.z,m[3*A+0]=n.x,m[3*A+1]=n.y,m[3*A+2]=n.z,m[3*f+0]=i.x,m[3*f+1]=i.y,m[3*f+2]=i.z}const u=e.geometry,d=e.material;let p,A,f;const m=u.index,g=u.attributes.position,v=u.morphAttributes.position,y=u.morphTargetsRelative,E=u.attributes.normal,b=u.morphAttributes.position,x=u.groups,w=u.drawRange;let C,M,_,I,B,S,T;const L=new Float32Array(g.count*g.itemSize),D=new Float32Array(E.count*E.itemSize);if(null!==m)if(Array.isArray(d))for(C=0,_=x.length;C\u003C_;C++)for(B=x[C],S=Math.max(B.start,w.start),T=Math.min(B.start+B.count,w.start+w.count),M=S,I=T;M\u003CI;M+=3)p=m.getX(M),A=m.getX(M+1),f=m.getX(M+2),h(e,g,v,y,p,A,f,L),h(e,E,b,y,p,A,f,D);else for(S=Math.max(0,w.start),T=Math.min(m.count,w.start+w.count),C=S,_=T;C\u003C_;C+=3)p=m.getX(C),A=m.getX(C+1),f=m.getX(C+2),h(e,g,v,y,p,A,f,L),h(e,E,b,y,p,A,f,D);else if(Array.isArray(d))for(C=0,_=x.length;C\u003C_;C++)for(B=x[C],S=Math.max(B.start,w.start),T=Math.min(B.start+B.count,w.start+w.count),M=S,I=T;M\u003CI;M+=3)p=M,A=M+1,f=M+2,h(e,g,v,y,p,A,f,L),h(e,E,b,y,p,A,f,D);else for(S=Math.max(0,w.start),T=Math.min(g.count,w.start+w.count),C=S,_=T;C\u003C_;C+=3)p=C,A=C+1,f=C+2,h(e,g,v,y,p,A,f,L),h(e,E,b,y,p,A,f,D);return{positionAttribute:g,normalAttribute:E,morphedPositionAttribute:new Fr(L,3),morphedNormalAttribute:new Fr(D,3)}}function cm(e){if(0===e.groups.length)return console.warn(\"THREE.BufferGeometryUtils.mergeGroups(): No groups are defined. Nothing to merge.\"),e;let t=e.groups;if(t=t.sort(((e,t)=>e.materialIndex!==t.materialIndex?e.materialIndex-t.materialIndex:e.start-t.start)),null===e.getIndex()){const t=e.getAttribute(\"position\"),n=[];for(let e=0;e\u003Ct.count;e+=3)n.push(e,e+1,e+2);e.setIndex(n)}const n=e.getIndex(),i=[];for(let e=0;e\u003Ct.length;e++){const r=t[e],s=r.start,o=s+r.count;for(let e=s;e\u003Co;e++)i.push(n.getX(e))}e.dispose(),e.setIndex(i);let r=0;for(let e=0;e\u003Ct.length;e++){const n=t[e];n.start=r,r+=n.count}let s=t[0];e.groups=[s];for(let n=1;n\u003Ct.length;n++){const i=t[n];s.materialIndex===i.materialIndex?s.count+=i.count:(s=i,e.groups.push(s))}return e}function hm(e,t=Math.PI/3){const n=Math.cos(t),i=100*(1+1e-10),r=[new ci,new ci,new ci],s=new ci,o=new ci,a=new ci,l=new ci;function c(e){return`${~~(e.x*i)},${~~(e.y*i)},${~~(e.z*i)}`}const h=e.toNonIndexed(),u=h.attributes.position,d={};for(let e=0,t=u.count/3;e\u003Ct;e++){const t=3*e,n=r[0].fromBufferAttribute(u,t+0),i=r[1].fromBufferAttribute(u,t+1),a=r[2].fromBufferAttribute(u,t+2);s.subVectors(a,i),o.subVectors(n,i);const l=(new ci).crossVectors(s,o).normalize();for(let e=0;e\u003C3;e++){const t=c(r[e]);t in d||(d[t]=[]),d[t].push(l)}}const p=new Float32Array(3*u.count),A=new Ir(p,3,!1);for(let e=0,t=u.count/3;e\u003Ct;e++){const t=3*e,i=r[0].fromBufferAttribute(u,t+0),h=r[1].fromBufferAttribute(u,t+1),p=r[2].fromBufferAttribute(u,t+2);s.subVectors(p,h),o.subVectors(i,h),a.crossVectors(s,o).normalize();for(let e=0;e\u003C3;e++){const i=d[c(r[e])];l.set(0,0,0);for(let e=0,t=i.length;e\u003Ct;e++){const t=i[e];a.dot(t)>n&&l.add(t)}l.normalize(),A.setXYZ(t+e,l.x,l.y,l.z)}}return h.setAttribute(\"normal\",A),h}function um(e,t){switch(t){case Rt:e.convertSRGBToLinear();break;case Dt:break;default:console.warn(\"WARNING: LightProbeGenerator convertColorToLinear() encountered an unsupported encoding.\")}return e}var dm=n(7347),pm=window.THREE=dm({},i);n(6898),pm.DRACOLoader=class extends _u{constructor(e){super(e),this.decoderPath=\"\",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL=\"\",this.defaultAttributeIDs={position:\"POSITION\",normal:\"NORMAL\",color:\"COLOR\",uv:\"TEX_COORD\"},this.defaultAttributeTypes={position:\"Float32Array\",normal:\"Float32Array\",color:\"Float32Array\",uv:\"Float32Array\"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,i){const r=new Su(this.manager);r.setPath(this.path),r.setResponseType(\"arraybuffer\"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,(e=>{this.decodeDracoFile(e,t).catch(i)}),n,i)}decodeDracoFile(e,t,n,i){const r={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:i||this.defaultAttributeTypes,useUniqueIDs:!!n};return this.decodeGeometry(e,r).then(t)}decodeGeometry(e,t){const n=JSON.stringify(t);if(hA.has(e)){const t=hA.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error(\"THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.\")}let i;const r=this.workerNextTaskID++,s=e.byteLength,o=this._getWorker(r,s).then((n=>(i=n,new Promise(((n,s)=>{i._callbacks[r]={resolve:n,reject:s},i.postMessage({type:\"decode\",id:r,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return o.catch((()=>!0)).then((()=>{i&&r&&this._releaseTask(i,r)})),hA.set(e,{key:n,promise:o}),o}_createGeometry(e){const t=new Wr;e.index&&t.setIndex(new Ir(e.index.array,1));for(let n=0;n\u003Ce.attributes.length;n++){const i=e.attributes[n],r=i.name,s=i.array,o=i.itemSize;t.setAttribute(r,new Ir(s,o))}return t}_loadLibrary(e,t){const n=new Su(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise(((t,i)=>{n.load(e,t,void 0,i)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=\"object\"!=typeof WebAssembly||\"js\"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary(\"draco_decoder.js\",\"text\")):(t.push(this._loadLibrary(\"draco_wasm_wrapper.js\",\"text\")),t.push(this._loadLibrary(\"draco_decoder.wasm\",\"arraybuffer\"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const i=uA.toString(),r=[\"/* draco decoder */\",n,\"\",\"/* worker */\",i.substring(i.indexOf(\"{\")+1,i.lastIndexOf(\"}\"))].join(\"\\n\");this.workerSourceURL=URL.createObjectURL(new Blob([r]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.length\u003Cthis.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:\"init\",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case\"decode\":e._callbacks[n.id].resolve(n);break;case\"error\":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, \"'+n.type+'\"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log(\"Task load: \",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e\u003Cthis.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}},pm.GLTFLoader=class extends _u{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new PA(e)})),this.register((function(e){return new GA(e)})),this.register((function(e){return new zA(e)})),this.register((function(e){return new FA(e)})),this.register((function(e){return new OA(e)})),this.register((function(e){return new QA(e)})),this.register((function(e){return new UA(e)})),this.register((function(e){return new RA(e)})),this.register((function(e){return new NA(e)})),this.register((function(e){return new kA(e)})),this.register((function(e){return new LA(e)})),this.register((function(e){return new HA(e)})),this.register((function(e){return new VA(e)}))}load(e,t,n,i){const r=this;let s;s=\"\"!==this.resourcePath?this.resourcePath:\"\"!==this.path?this.path:nd.extractUrlBase(e),this.manager.itemStart(e);const o=function(t){i?i(t):console.error(t),r.manager.itemError(e),r.manager.itemEnd(e)},a=new Su(this.manager);a.setPath(this.path),a.setResponseType(\"arraybuffer\"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{r.parse(n,s,(function(n){t(n),r.manager.itemEnd(e)}),o)}catch(e){o(e)}}),n,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: \"MSFT_texture_dds\" no longer supported. Please update to \"KHR_texture_basisu\".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let r;const s={},o={};if(\"string\"==typeof e)r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(nd.decodeText(new Uint8Array(e,0,4))===WA){try{s[pA]=new jA(e)}catch(e){return void(i&&i(e))}r=JSON.parse(s[pA].content)}else r=JSON.parse(nd.decodeText(new Uint8Array(e)));else r=e;if(void 0===r.asset||r.asset.version[0]\u003C2)return void(i&&i(new Error(\"THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.\")));const a=new Af(r,{path:t||this.resourcePath||\"\",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});a.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e\u003Cthis.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](a);o[t.name]=t,s[t.name]=!0}if(r.extensionsUsed)for(let e=0;e\u003Cr.extensionsUsed.length;++e){const t=r.extensionsUsed[e],n=r.extensionsRequired||[];switch(t){case xA:s[t]=new DA;break;case AA:s[t]=new qA(r,this.dracoLoader);break;case MA:s[t]=new YA;break;case _A:s[t]=new XA;break;default:n.indexOf(t)>=0&&void 0===o[t]&&console.warn('THREE.GLTFLoader: Unknown extension \"'+t+'\".')}}a.setExtensions(s),a.setPlugins(o),a.parse(n,i)}parseAsync(e,t){const n=this;return new Promise((function(i,r){n.parse(e,t,i,r)}))}},pm.KTX2Loader=Pf,pm.OBJLoader=class extends _u{constructor(e){super(e),this.materials=null}load(e,t,n,i){const r=this,s=new Su(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){try{t(r.parse(n))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}}),n,i)}setMaterials(e){return this.materials=e,this}parse(e){const t=new Xf;-1!==e.indexOf(\"\\r\\n\")&&(e=e.replace(/\\r\\n/g,\"\\n\")),-1!==e.indexOf(\"\\\\\\n\")&&(e=e.replace(/\\\\\\n/g,\"\"));const n=e.split(\"\\n\");let i=[];for(let e=0,r=n.length;e\u003Cr;e++){const r=n[e].trimStart();if(0===r.length)continue;const s=r.charAt(0);if(\"#\"!==s)if(\"v\"===s){const e=r.split(zf);switch(e[0]){case\"v\":t.vertices.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])),e.length>=7?(Yf.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])).convertSRGBToLinear(),t.colors.push(Yf.r,Yf.g,Yf.b)):t.colors.push(void 0,void 0,void 0);break;case\"vn\":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case\"vt\":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if(\"f\"===s){const e=r.slice(1).trim().split(zf),n=[];for(let t=0,i=e.length;t\u003Ci;t++){const i=e[t];if(i.length>0){const e=i.split(\"/\");n.push(e)}}const i=n[0];for(let e=1,r=n.length-1;e\u003Cr;e++){const r=n[e],s=n[e+1];t.addFace(i[0],r[0],s[0],i[1],r[1],s[1],i[2],r[2],s[2])}}else if(\"l\"===s){const e=r.substring(1).trim().split(\" \");let n=[];const i=[];if(-1===r.indexOf(\"/\"))n=e;else for(let t=0,r=e.length;t\u003Cr;t++){const r=e[t].split(\"/\");\"\"!==r[0]&&n.push(r[0]),\"\"!==r[1]&&i.push(r[1])}t.addLineGeometry(n,i)}else if(\"p\"===s){const e=r.slice(1).trim().split(\" \");t.addPointGeometry(e)}else if(null!==(i=Qf.exec(r))){const e=(\" \"+i[0].slice(1).trim()).slice(1);t.startObject(e)}else if(Nf.test(r))t.object.startMaterial(r.substring(7).trim(),t.materialLibraries);else if(Uf.test(r))t.materialLibraries.push(r.substring(7).trim());else if(Gf.test(r))console.warn('THREE.OBJLoader: Rendering identifier \"usemap\" not supported. Textures must be defined in MTL files.');else if(\"s\"===s){if(i=r.split(\" \"),i.length>1){const e=i[1].trim().toLowerCase();t.object.smooth=\"0\"!==e&&\"off\"!==e}else t.object.smooth=!0;const e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if(\"\\0\"===r)continue;console.warn('THREE.OBJLoader: Unexpected line: \"'+r+'\"')}}t.finalize();const r=new $a;if(r.materialLibraries=[].concat(t.materialLibraries),!0==!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let e=0,n=t.objects.length;e\u003Cn;e++){const n=t.objects[e],i=n.geometry,s=n.materials,o=\"Line\"===i.type,a=\"Points\"===i.type;let l=!1;if(0===i.vertices.length)continue;const c=new Wr;c.setAttribute(\"position\",new Fr(i.vertices,3)),i.normals.length>0&&c.setAttribute(\"normal\",new Fr(i.normals,3)),i.colors.length>0&&(l=!0,c.setAttribute(\"color\",new Fr(i.colors,3))),!0===i.hasUVIndices&&c.setAttribute(\"uv\",new Fr(i.uvs,2));const h=[];for(let e=0,n=s.length;e\u003Cn;e++){const n=s[e],i=n.name+\"_\"+n.smooth+\"_\"+l;let r=t.materials[i];if(null!==this.materials)if(r=this.materials.create(n.name),!o||!r||r instanceof tc){if(a&&r&&!(r instanceof dc)){const e=new dc({size:10,sizeAttenuation:!1});wr.prototype.copy.call(e,r),e.color.copy(r.color),e.map=r.map,r=e}}else{const e=new tc;wr.prototype.copy.call(e,r),e.color.copy(r.color),r=e}void 0===r&&(r=o?new tc:a?new dc({size:1,sizeAttenuation:!1}):new Jh,r.name=n.name,r.flatShading=!n.smooth,r.vertexColors=l,t.materials[i]=r),h.push(r)}let u;if(h.length>1){for(let e=0,t=s.length;e\u003Ct;e++){const t=s[e];c.addGroup(t.groupStart,t.groupCount,e)}u=o?new hc(c,h):a?new gc(c,h):new cs(c,h)}else u=o?new hc(c,h[0]):a?new gc(c,h[0]):new cs(c,h[0]);u.name=n.name,r.add(u)}else if(t.vertices.length>0){const e=new dc({size:1,sizeAttenuation:!1}),n=new Wr;n.setAttribute(\"position\",new Fr(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute(\"color\",new Fr(t.colors,3)),e.vertexColors=!0);const i=new gc(n,e);r.add(i)}return r}},pm.MTLLoader=class extends _u{constructor(e){super(e)}load(e,t,n,i){const r=this,s=\"\"===this.path?nd.extractUrlBase(e):this.path,o=new Su(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(r.parse(n,s))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}}),n,i)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const n=e.split(\"\\n\");let i={};const r=/\\s+/,s={};for(let e=0;e\u003Cn.length;e++){let t=n[e];if(t=t.trim(),0===t.length||\"#\"===t.charAt(0))continue;const o=t.indexOf(\" \");let a=o>=0?t.substring(0,o):t;a=a.toLowerCase();let l=o>=0?t.substring(o+1):\"\";if(l=l.trim(),\"newmtl\"===a)i={name:l},s[l]=i;else if(\"ka\"===a||\"kd\"===a||\"ks\"===a||\"ke\"===a){const e=l.split(r,3);i[a]=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])]}else i[a]=l}const o=new Jf(this.resourcePath||t,this.materialOptions);return o.setCrossOrigin(this.crossOrigin),o.setManager(this.manager),o.setMaterials(s),o}},pm.BufferGeometryUtils=r,pm.LightProbeGenerator=class{static fromCubeTexture(e){let t=0;const n=new ci,i=new ci,r=new Yn,s=[0,0,0,0,0,0,0,0,0],o=new $u,a=o.coefficients;for(let o=0;o\u003C6;o++){const l=e.image[o],c=l.width,h=l.height,u=document.createElement(\"canvas\");u.width=c,u.height=h;const d=u.getContext(\"2d\");d.drawImage(l,0,0,c,h);const p=d.getImageData(0,0,c,h),A=p.data,f=p.width,m=2/f;for(let l=0,c=A.length;l\u003Cc;l+=4){r.setRGB(A[l]/255,A[l+1]/255,A[l+2]/255),um(r,e.encoding);const c=l/4,h=(c%f+.5)*m-1,u=1-(Math.floor(c/f)+.5)*m;switch(o){case 0:n.set(-1,u,-h);break;case 1:n.set(1,u,h);break;case 2:n.set(-h,1,-u);break;case 3:n.set(-h,-1,u);break;case 4:n.set(-h,u,1);break;case 5:n.set(h,u,-1)}const d=n.lengthSq(),p=4/(Math.sqrt(d)*d);t+=p,i.copy(n).normalize(),$u.getBasisAt(i,s);for(let e=0;e\u003C9;e++)a[e].x+=s[e]*r.r*p,a[e].y+=s[e]*r.g*p,a[e].z+=s[e]*r.b*p}}const l=4*Math.PI/t;for(let e=0;e\u003C9;e++)a[e].x*=l,a[e].y*=l,a[e].z*=l;return new ed(o)}static fromCubeRenderTarget(e,t){let n=0;const i=new ci,r=new ci,s=new Yn,o=[0,0,0,0,0,0,0,0,0],a=new $u,l=a.coefficients;for(let a=0;a\u003C6;a++){const c=t.width,h=new Uint8Array(c*c*4);e.readRenderTargetPixels(t,0,0,c,c,h,a);const u=2/c;for(let e=0,d=h.length;e\u003Cd;e+=4){s.setRGB(h[e]/255,h[e+1]/255,h[e+2]/255),um(s,t.texture.encoding);const d=e/4,p=(d%c+.5)*u-1,A=1-(Math.floor(d/c)+.5)*u;switch(a){case 0:i.set(1,A,-p);break;case 1:i.set(-1,A,p);break;case 2:i.set(p,1,-A);break;case 3:i.set(p,-1,A);break;case 4:i.set(p,A,1);break;case 5:i.set(-p,A,-1)}const f=i.lengthSq(),m=4/(Math.sqrt(f)*f);n+=m,r.copy(i).normalize(),$u.getBasisAt(r,o);for(let e=0;e\u003C9;e++)l[e].x+=o[e]*s.r*m,l[e].y+=o[e]*s.g*m,l[e].z+=o[e]*s.b*m}}const c=4*Math.PI/n;for(let e=0;e\u003C9;e++)l[e].x*=c,l[e].y*=c,l[e].z*=c;return new ed(a)}};const Am=pm},7260:(e,t,n)=>{var i=n(9644).registerShader,r=n(2666),s=n(8903);function o(e,t){return t.color.set(e.color),t.fog=e.fog,t.wireframe=e.wireframe,t.toneMapped=e.toneMapped,t.wireframeLinewidth=e.wireframeLinewidth,t}e.exports.Shader=i(\"flat\",{schema:{color:{type:\"color\"},fog:{default:!0},height:{default:256},offset:{type:\"vec2\",default:{x:0,y:0}},repeat:{type:\"vec2\",default:{x:1,y:1}},src:{type:\"map\"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2},toneMapped:{default:!0}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new r.Color},this.textureSrc=null,o(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.material=new r.MeshBasicMaterial(this.materialData)},update:function(e){this.updateMaterial(e),s.material.updateMap(this,e)},updateMaterial:function(e){var t;for(t in o(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.materialData)this.material[t]=this.materialData[t]}})},8657:(e,t,n)=>{n(7260),n(2653),n(1359),n(2859),n(4047),n(1123),n(7759)},1123:(e,t,n)=>{var i=n(9644).registerShader;e.exports.Shader=i(\"ios10hls\",{schema:{src:{type:\"map\",is:\"uniform\"},opacity:{type:\"number\",is:\"uniform\",default:1}},vertexShader:[\"varying vec2 vUV;\",\"void main(void) {\",\" gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\",\" vUV = uv;\",\"}\"].join(\"\\n\"),fragmentShader:[\"uniform sampler2D src;\",\"uniform float opacity;\",\"varying vec2 vUV;\",\"void main() {\",\" vec2 offset = vec2(0, 0);\",\" vec2 repeat = vec2(1, 1);\",\" vec4 color = texture2D(src, vec2(vUV.x / repeat.x + offset.x, (1.0 - vUV.y) / repeat.y + offset.y)).bgra;\",\" gl_FragColor = vec4(color.rgb, opacity);\",\"}\"].join(\"\\n\")})},4047:(e,t,n)=>{var i=n(9644).registerShader,r=!!document.createElement(\"canvas\").getContext(\"webgl2\"),s=[\"attribute vec2 uv;\",\"attribute vec3 position;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 modelViewMatrix;\",\"varying vec2 vUV;\",\"void main(void) {\",\" gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\",\" vUV = uv;\",\"}\"].join(\"\\n\"),o=[\"#version 300 es\",\"in vec2 uv;\",\"in vec3 position;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 modelViewMatrix;\",\"out vec2 vUV;\",\"void main(void) {\",\" gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\",\" vUV = uv;\",\"}\"].join(\"\\n\"),a=r?o:s,l=[\"#ifdef GL_OES_standard_derivatives\",\"#extension GL_OES_standard_derivatives: enable\",\"#endif\",\"precision highp float;\",\"uniform bool negate;\",\"uniform float alphaTest;\",\"uniform float opacity;\",\"uniform sampler2D map;\",\"uniform vec3 color;\",\"varying vec2 vUV;\",\"float median(float r, float g, float b) {\",\" return max(min(r, g), min(max(r, g), b));\",\"}\",\"#define BIG_ENOUGH 0.001\",\"#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)\",\"void main() {\",\" vec3 sampleColor = texture2D(map, vUV).rgb;\",\" if (negate) { sampleColor = 1.0 - sampleColor; }\",\" float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;\",\" float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);\",\" float dscale = 0.353505;\",\" vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));\",\" float isBigEnough = max(abs(duv.x), abs(duv.y));\",\" // Do modified alpha test.\",\" if (isBigEnough > BIG_ENOUGH) {\",\" float ratio = BIG_ENOUGH / isBigEnough;\",\" alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);\",\" }\",\" // Do modified alpha test.\",\" if (alpha \u003C alphaTest * MODIFIED_ALPHATEST) { discard; return; }\",\" gl_FragColor = vec4(color.xyz, alpha * opacity);\",\"}\"].join(\"\\n\"),c=[\"#version 300 es\",\"precision highp float;\",\"uniform bool negate;\",\"uniform float alphaTest;\",\"uniform float opacity;\",\"uniform sampler2D map;\",\"uniform vec3 color;\",\"in vec2 vUV;\",\"out vec4 fragColor;\",\"float median(float r, float g, float b) {\",\" return max(min(r, g), min(max(r, g), b));\",\"}\",\"#define BIG_ENOUGH 0.001\",\"#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)\",\"void main() {\",\" vec3 sampleColor = texture(map, vUV).rgb;\",\" if (negate) { sampleColor = 1.0 - sampleColor; }\",\" float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;\",\" float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);\",\" float dscale = 0.353505;\",\" vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));\",\" float isBigEnough = max(abs(duv.x), abs(duv.y));\",\" // Do modified alpha test.\",\" if (isBigEnough > BIG_ENOUGH) {\",\" float ratio = BIG_ENOUGH / isBigEnough;\",\" alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);\",\" }\",\" // Do modified alpha test.\",\" if (alpha \u003C alphaTest * MODIFIED_ALPHATEST) { discard; return; }\",\" fragColor = vec4(color.xyz, alpha * opacity);\",\"}\"].join(\"\\n\"),h=r?c:l;e.exports.Shader=i(\"msdf\",{schema:{alphaTest:{type:\"number\",is:\"uniform\",default:.5},color:{type:\"color\",is:\"uniform\",default:\"white\"},map:{type:\"map\",is:\"uniform\"},negate:{type:\"boolean\",is:\"uniform\",default:!0},opacity:{type:\"number\",is:\"uniform\",default:1}},raw:!0,vertexShader:a,fragmentShader:h})},1359:(e,t,n)=>{var i=n(9644).registerShader,r=n(2666),s=n(8903),o=new r.CubeTextureLoader,a={};function l(e,t){switch(t.color.set(e.color),t.specular.set(e.emissive),t.emissive.set(e.emissive),t.emissiveIntensity=e.emissiveIntensity,t.fog=e.fog,t.transparent=e.transparent,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,t.shininess=e.shininess,t.flatShading=e.flatShading,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,t.reflectivity=e.reflectivity,t.refractionRatio=e.refractionRatio,e.combine){case\"mix\":t.combine=r.MixOperation;break;case\"multiply\":t.combine=r.MultiplyOperation;break;case\"add\":t.combine=r.AddOperation}return e.normalMap&&(t.normalScale=e.normalScale),e.ambientOcclusionMap&&(t.aoMapIntensity=e.ambientOcclusionMapIntensity),e.bumpMap&&(t.aoMapIntensity=e.bumpMapScale),e.displacementMap&&(t.displacementScale=e.displacementScale,t.displacementBias=e.displacementBias),t}e.exports.Shader=i(\"phong\",{schema:{color:{type:\"color\"},emissive:{type:\"color\",default:\"black\"},emissiveIntensity:{default:1},specular:{type:\"color\",default:\"#111111\"},transparent:{default:!1},fog:{default:!0},offset:{type:\"vec2\",default:{x:0,y:0}},repeat:{type:\"vec2\",default:{x:1,y:1}},src:{type:\"map\"},envMap:{default:\"\"},sphericalEnvMap:{type:\"map\"},shininess:{default:30},flatShading:{default:!1},wireframe:{default:!1},wireframeLinewidth:{default:2},combine:{oneOF:[\"multiply\",\"mix\",\"add\"],default:\"mix\"},reflectivity:{default:.9},refractionRatio:{default:.98},refract:{default:!1},normalMap:{type:\"map\"},normalScale:{type:\"vec2\",default:{x:1,y:1}},normalTextureOffset:{type:\"vec2\"},normalTextureRepeat:{type:\"vec2\",default:{x:1,y:1}},displacementMap:{type:\"map\"},displacementScale:{default:1},displacementBias:{default:.5},displacementTextureOffset:{type:\"vec2\"},displacementTextureRepeat:{type:\"vec2\",default:{x:1,y:1}},bumpMap:{type:\"map\"},bumpMapScale:{default:1},bumpTextureOffset:{type:\"vec2\"},bumpTextureRepeat:{type:\"vec2\",default:{x:1,y:1}}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new r.Color,specular:new r.Color,emissive:new r.Color},this.textureSrc=null,l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.material=new r.MeshPhongMaterial(this.materialData),s.material.updateMap(this,e)},update:function(e){this.updateMaterial(e),s.material.updateMap(this,e),e.normalMap&&s.material.updateDistortionMap(\"normal\",this,e),e.displacementMap&&s.material.updateDistortionMap(\"displacement\",this,e),e.ambientOcclusionMap&&s.material.updateDistortionMap(\"ambientOcclusion\",this,e),e.bump&&s.material.updateDistortionMap(\"bump\",this,e),this.updateEnvMap(e)},updateMaterial:function(e){var t;for(t in l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.materialData)this.material[t]=this.materialData[t]},updateEnvMap:function(e){var t=this,n=this.material,i=e.envMap,l=e.sphericalEnvMap,c=e.refract,h=this.el.sceneEl;if(!i&&!l||this.isLoadingEnvMap)return Object.defineProperty(n,\"envMap\",{get:function(){return h.object3D.environment},set:function(e){delete this.envMap,this.envMap=e}}),void(n.needsUpdate=!0);this.isLoadingEnvMap=!0,delete n.envMap,l?this.el.sceneEl.systems.material.loadTexture(l,{src:l},(function(e){t.isLoadingEnvMap=!1,e.mapping=c?r.EquirectangularRefractionMapping:r.EquirectangularReflectionMapping,n.envMap=e,s.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):a[i]?a[i].then((function(e){t.isLoadingEnvMap=!1,n.envMap=e,s.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):a[i]=new Promise((function(e){s.srcLoader.validateCubemapSrc(i,(function(i){o.load(i,(function(i){t.isLoadingEnvMap=!1,n.envMap=i,i.mapping=c?r.CubeRefractionMapping:r.CubeReflectionMapping,s.material.handleTextureEvents(t.el,i),e(i)}))}))}))}})},2859:(e,t,n)=>{var i=n(9644).registerShader,r=!!document.createElement(\"canvas\").getContext(\"webgl2\"),s=[\"attribute vec2 uv;\",\"attribute vec3 position;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 modelViewMatrix;\",\"varying vec2 vUV;\",\"void main(void) {\",\" gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\",\" vUV = uv;\",\"}\"].join(\"\\n\"),o=[\"#version 300 es\",\"in vec2 uv;\",\"in vec3 position;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 modelViewMatrix;\",\"out vec2 vUV;\",\"void main(void) {\",\" gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\",\" vUV = uv;\",\"}\"].join(\"\\n\"),a=r?o:s,l=[\"#ifdef GL_OES_standard_derivatives\",\"#extension GL_OES_standard_derivatives: enable\",\"#endif\",\"precision highp float;\",\"uniform float alphaTest;\",\"uniform float opacity;\",\"uniform sampler2D map;\",\"uniform vec3 color;\",\"varying vec2 vUV;\",\"#ifdef GL_OES_standard_derivatives\",\" float contour(float width, float value) {\",\" return smoothstep(0.5 - value, 0.5 + value, width);\",\" }\",\"#else\",\" float aastep(float value, float afwidth) {\",\" return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);\",\" }\",\"#endif\",\"#define BIG_ENOUGH 0.001\",\"#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)\",\"#define ALL_SMOOTH 0.4\",\"#define ALL_ROUGH 0.02\",\"#define DISCARD_ALPHA (alphaTest / (2.2 - 1.2 * ratio))\",\"void main() {\",\" #ifdef GL_OES_standard_derivatives\",\" vec2 uv = vUV;\",\" vec4 texColor = texture2D(map, uv);\",\" float dist = texColor.a;\",\" float width = fwidth(dist);\",\" float alpha = contour(dist, width);\",\" float dscale = 0.353505;\",\" vec2 duv = dscale * (dFdx(uv) + dFdy(uv));\",\" float isBigEnough = max(abs(duv.x), abs(duv.y));\",\" if (isBigEnough > BIG_ENOUGH) {\",\" float ratio = BIG_ENOUGH / isBigEnough;\",\" alpha = ratio * alpha + (1.0 - ratio) * dist;\",\" }\",\" if (isBigEnough \u003C= BIG_ENOUGH) {\",\" vec4 box = vec4 (uv - duv, uv + duv);\",\" alpha = (alpha + 0.5 * (\",\" contour(texture2D(map, box.xy).a, width)\",\" + contour(texture2D(map, box.zw).a, width)\",\" + contour(texture2D(map, box.xw).a, width)\",\" + contour(texture2D(map, box.zy).a, width)\",\" )) / 3.0;\",\" }\",\" if (alpha \u003C alphaTest * MODIFIED_ALPHATEST) { discard; return; }\",\" #else\",\" vec4 texColor = texture2D(map, vUV);\",\" float value = texColor.a;\",\" float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));\",\" float alpha = aastep(value, afwidth);\",\" float ratio = (gl_FragCoord.w >= ALL_SMOOTH) ? 1.0 : (gl_FragCoord.w \u003C ALL_ROUGH) ? 0.0 : (gl_FragCoord.w - ALL_ROUGH) / (ALL_SMOOTH - ALL_ROUGH);\",\" if (alpha \u003C alphaTest) { if (ratio >= 1.0) { discard; return; } alpha = 0.0; }\",\" alpha = alpha * ratio + (1.0 - ratio) * value;\",\" if (ratio \u003C 1.0 && alpha \u003C= DISCARD_ALPHA) { discard; return; }\",\" #endif\",\" gl_FragColor = vec4(color, opacity * alpha);\",\"}\"].join(\"\\n\"),c=[\"#version 300 es\",\"precision highp float;\",\"uniform float alphaTest;\",\"uniform float opacity;\",\"uniform sampler2D map;\",\"uniform vec3 color;\",\"in vec2 vUV;\",\"out vec4 fragColor;\",\"#ifdef GL_OES_standard_derivatives\",\" float contour(float width, float value) {\",\" return smoothstep(0.5 - value, 0.5 + value, width);\",\" }\",\"#else\",\" float aastep(float value, float afwidth) {\",\" return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);\",\" }\",\"#endif\",\"#define BIG_ENOUGH 0.001\",\"#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)\",\"#define ALL_SMOOTH 0.4\",\"#define ALL_ROUGH 0.02\",\"#define DISCARD_ALPHA (alphaTest / (2.2 - 1.2 * ratio))\",\"void main() {\",\" #ifdef GL_OES_standard_derivatives\",\" vec2 uv = vUV;\",\" vec4 texColor = texture(map, uv);\",\" float dist = texColor.a;\",\" float width = fwidth(dist);\",\" float alpha = contour(dist, width);\",\" float dscale = 0.353505;\",\" vec2 duv = dscale * (dFdx(uv) + dFdy(uv));\",\" float isBigEnough = max(abs(duv.x), abs(duv.y));\",\" if (isBigEnough > BIG_ENOUGH) {\",\" float ratio = BIG_ENOUGH / isBigEnough;\",\" alpha = ratio * alpha + (1.0 - ratio) * dist;\",\" }\",\" if (isBigEnough \u003C= BIG_ENOUGH) {\",\" vec4 box = vec4 (uv - duv, uv + duv);\",\" alpha = (alpha + 0.5 * (\",\" contour(texture(map, box.xy).a, width)\",\" + contour(texture(map, box.zw).a, width)\",\" + contour(texture(map, box.xw).a, width)\",\" + contour(texture(map, box.zy).a, width)\",\" )) / 3.0;\",\" }\",\" if (alpha \u003C alphaTest * MODIFIED_ALPHATEST) { discard; return; }\",\" #else\",\" vec4 texColor = texture(map, vUV);\",\" float value = texColor.a;\",\" float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));\",\" float alpha = aastep(value, afwidth);\",\" float ratio = (gl_FragCoord.w >= ALL_SMOOTH) ? 1.0 : (gl_FragCoord.w \u003C ALL_ROUGH) ? 0.0 : (gl_FragCoord.w - ALL_ROUGH) / (ALL_SMOOTH - ALL_ROUGH);\",\" if (alpha \u003C alphaTest) { if (ratio >= 1.0) { discard; return; } alpha = 0.0; }\",\" alpha = alpha * ratio + (1.0 - ratio) * value;\",\" if (ratio \u003C 1.0 && alpha \u003C= DISCARD_ALPHA) { discard; return; }\",\" #endif\",\" fragColor = vec4(color, opacity * alpha);\",\"}\"].join(\"\\n\"),h=r?c:l;e.exports.Shader=i(\"sdf\",{schema:{alphaTest:{type:\"number\",is:\"uniform\",default:.5},color:{type:\"color\",is:\"uniform\",default:\"white\"},map:{type:\"map\",is:\"uniform\"},opacity:{type:\"number\",is:\"uniform\",default:1}},raw:!0,vertexShader:a,fragmentShader:h})},7759:(e,t,n)=>{var i=n(9644).registerShader,r=n(2666);e.exports.Shader=i(\"shadow\",{schema:{opacity:{default:.5},transparent:{default:!0},alphaToCoverage:{default:!0}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.material=new r.ShadowMaterial},update:function(e){this.material.opacity=e.opacity,this.material.alphaToCoverage=e.alphaToCoverage,this.material.transparent=e.transparent}})},2653:(e,t,n)=>{var i=n(9644).registerShader,r=n(2666),s=n(8903),o=new r.CubeTextureLoader,a={};function l(e,t){return t.color.set(e.color),t.emissive.set(e.emissive),t.emissiveIntensity=e.emissiveIntensity,t.fog=e.fog,t.metalness=e.metalness,t.roughness=e.roughness,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,e.normalMap&&(t.normalScale=e.normalScale),e.ambientOcclusionMap&&(t.aoMapIntensity=e.ambientOcclusionMapIntensity),e.displacementMap&&(t.displacementScale=e.displacementScale,t.displacementBias=e.displacementBias),t}e.exports.Shader=i(\"standard\",{schema:{ambientOcclusionMap:{type:\"map\"},ambientOcclusionMapIntensity:{default:1},ambientOcclusionTextureOffset:{type:\"vec2\"},ambientOcclusionTextureRepeat:{type:\"vec2\",default:{x:1,y:1}},color:{type:\"color\"},displacementMap:{type:\"map\"},displacementScale:{default:1},displacementBias:{default:.5},displacementTextureOffset:{type:\"vec2\"},displacementTextureRepeat:{type:\"vec2\",default:{x:1,y:1}},emissive:{type:\"color\",default:\"#000\"},emissiveIntensity:{default:1},envMap:{default:\"\"},fog:{default:!0},height:{default:256},metalness:{default:0,min:0,max:1},metalnessMap:{type:\"map\"},metalnessTextureOffset:{type:\"vec2\"},metalnessTextureRepeat:{type:\"vec2\",default:{x:1,y:1}},normalMap:{type:\"map\"},normalScale:{type:\"vec2\",default:{x:1,y:1}},normalTextureOffset:{type:\"vec2\"},normalTextureRepeat:{type:\"vec2\",default:{x:1,y:1}},offset:{type:\"vec2\",default:{x:0,y:0}},repeat:{type:\"vec2\",default:{x:1,y:1}},roughness:{default:.5,min:0,max:1},roughnessMap:{type:\"map\"},roughnessTextureOffset:{type:\"vec2\"},roughnessTextureRepeat:{type:\"vec2\",default:{x:1,y:1}},sphericalEnvMap:{type:\"map\"},src:{type:\"map\"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new r.Color,emissive:new r.Color},l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.material=new r.MeshStandardMaterial(this.materialData)},update:function(e){this.updateMaterial(e),s.material.updateMap(this,e),e.normalMap&&s.material.updateDistortionMap(\"normal\",this,e),e.displacementMap&&s.material.updateDistortionMap(\"displacement\",this,e),e.ambientOcclusionMap&&s.material.updateDistortionMap(\"ambientOcclusion\",this,e),e.metalnessMap&&s.material.updateDistortionMap(\"metalness\",this,e),e.roughnessMap&&s.material.updateDistortionMap(\"roughness\",this,e),this.updateEnvMap(e)},updateMaterial:function(e){var t,n=this.material;for(t in l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.materialData)n[t]=this.materialData[t]},updateEnvMap:function(e){var t=this,n=this.material,i=e.envMap,l=e.sphericalEnvMap;if(!i&&!l||this.isLoadingEnvMap)return n.envMap=null,void(n.needsUpdate=!0);this.isLoadingEnvMap=!0,l?this.el.sceneEl.systems.material.loadTexture(l,{src:l},(function(e){t.isLoadingEnvMap=!1,e.mapping=r.EquirectangularReflectionMapping,n.envMap=e,s.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):a[i]?a[i].then((function(e){t.isLoadingEnvMap=!1,n.envMap=e,s.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):a[i]=new Promise((function(e){s.srcLoader.validateCubemapSrc(i,(function(i){o.load(i,(function(i){t.isLoadingEnvMap=!1,n.envMap=i,s.material.handleTextureEvents(t.el,i),e(i)}))}))}))}})},8878:(e,t,n)=>{var i=n(8309),r=n(365).registerSystem,s=\"data-aframe-default-camera\";e.exports.System=r(\"camera\",{init:function(){this.activeCameraEl=null,this.render=this.render.bind(this),this.unwrapRender=this.unwrapRender.bind(this),this.wrapRender=this.wrapRender.bind(this),this.initialCameraFound=!1,this.numUserCameras=0,this.numUserCamerasChecked=0,this.setupInitialCamera()},setupInitialCamera:function(){var e,t,n=this.sceneEl,i=this;if(!n.camera||n.camera.el.getAttribute(\"camera\").spectator)if((e=n.querySelectorAll(\"a-camera, :not(a-mixin)[camera]\")).length)for(this.numUserCameras=e.length,t=0;t\u003Ce.length;t++)e[t].addEventListener(\"object3dset\",(function(e){\"camera\"===e.detail.type&&i.checkUserCamera(this)})),e[t].isNode?e[t].load():e[t].addEventListener(\"nodeready\",(function(){this.load()}));else this.createDefaultCamera();else n.emit(\"cameraready\",{cameraEl:n.camera.el})},checkUserCamera:function(e){var t,n=this.el.sceneEl;this.numUserCamerasChecked++,this.initialCameraFound||((t=e.getAttribute(\"camera\")).active&&!t.spectator?(this.initialCameraFound=!0,n.camera=e.getObject3D(\"camera\"),n.emit(\"cameraready\",{cameraEl:e})):this.numUserCamerasChecked===this.numUserCameras&&this.createDefaultCamera())},createDefaultCamera:function(){var e,t=this.sceneEl;(e=document.createElement(\"a-entity\")).setAttribute(\"camera\",{active:!0}),e.setAttribute(\"position\",{x:0,y:i.DEFAULT_CAMERA_HEIGHT,z:0}),e.setAttribute(\"wasd-controls\",\"\"),e.setAttribute(\"look-controls\",\"\"),e.setAttribute(i.AFRAME_INJECTED,\"\"),e.addEventListener(\"object3dset\",(function(n){\"camera\"===n.detail.type&&(t.camera=n.detail.object,t.emit(\"cameraready\",{cameraEl:e}))})),t.appendChild(e)},disableActiveCamera:function(){var e;(e=this.sceneEl.querySelectorAll(\":not(a-mixin)[camera]\"))[e.length-1].setAttribute(\"camera\",\"active\",!0)},setActiveCamera:function(e){var t,n,i,r,o=this.activeCameraEl,a=this.sceneEl;if((r=e.getObject3D(\"camera\"))&&e!==this.activeCameraEl){var l=a.querySelector(\"[\"+s+\"]\");for(e!==(l&&l.querySelector(\":not(a-mixin)[camera]\"))&&function(e){var t;e.camera&&(t=e.querySelector(\"[\"+s+\"]\"))&&e.removeChild(t)}(a),this.activeCameraEl=e,this.activeCameraEl.play(),a.camera=r,o&&o.setAttribute(\"camera\",\"active\",!1),n=a.querySelectorAll(\":not(a-mixin)[camera]\"),i=0;i\u003Cn.length;i++)(t=n[i]).isEntity&&e!==t&&(t.setAttribute(\"camera\",\"active\",!1),t.pause());a.emit(\"camera-set-active\",{cameraEl:e})}},setSpectatorCamera:function(e){var t,n=this.spectatorCameraEl,i=this.sceneEl;e.getObject3D(\"camera\")&&e!==this.spectatorCameraEl&&(n&&n.setAttribute(\"camera\",\"spectator\",!1),t=this.spectatorCameraEl=e,i.addEventListener(\"enter-vr\",this.wrapRender),i.addEventListener(\"exit-vr\",this.unwrapRender),t.setAttribute(\"camera\",\"active\",!1),t.play(),i.emit(\"camera-set-spectator\",{cameraEl:e}))},disableSpectatorCamera:function(){this.spectatorCameraEl=void 0},wrapRender:function(){this.spectatorCameraEl&&!this.originalRender&&(this.originalRender=this.sceneEl.renderer.render,this.sceneEl.renderer.render=this.render)},unwrapRender:function(){this.originalRender&&(this.sceneEl.renderer.render=this.originalRender,this.originalRender=void 0)},render:function(e,t){var n,i,r=this.sceneEl;n=r.renderer.xr.enabled,this.originalRender.call(r.renderer,e,t),this.spectatorCameraEl&&!r.isMobile&&n&&(i=this.spectatorCameraEl.components.camera.camera,r.renderer.xr.enabled=!1,this.originalRender.call(r.renderer,e,i),r.renderer.xr.enabled=n)}})},5087:(e,t,n)=>{var i=n(4863).xZ,r=n(365).registerSystem;function s(e){var t=e.primitive,n=i[t]&&i[t].Geometry,r=new n;if(!n)throw new Error(\"Unknown geometry `\"+t+\"`\");return r.init(e),r.geometry}e.exports.System=r(\"geometry\",{init:function(){this.cache={},this.cacheCount={}},clearCache:function(){this.cache={},this.cacheCount={}},getOrCreateGeometry:function(e){var t,n,i=this.cache;return e.skipCache?s(e):(t=i[n=this.hash(e)],function(e,t){e[t]=void 0===e[t]?1:e[t]+1}(this.cacheCount,n),t||(t=s(e),i[n]=t,t))},unuseGeometry:function(e){var t,n=this.cache,i=this.cacheCount;e.skipCache||n[t=this.hash(e)]&&(function(e,t){e[t]--}(i,t),i[t]>0||(n[t].dispose(),delete n[t],delete i[t]))},hash:function(e){return JSON.stringify(e)}})},2776:(e,t,n)=>{var i=n(365).registerSystem,r=n(2666);e.exports.System=i(\"gltf-model\",{schema:{dracoDecoderPath:{default:\"https://www.gstatic.com/draco/versioned/decoders/1.5.5/\"},basisTranscoderPath:{default:\"\"},meshoptDecoderPath:{default:\"\"}},init:function(){this.update()},update:function(){var e,t=this.data.dracoDecoderPath,n=this.data.basisTranscoderPath,i=this.data.meshoptDecoderPath;!this.dracoLoader&&t&&(this.dracoLoader=new r.DRACOLoader,this.dracoLoader.setDecoderPath(t)),!this.ktx2Loader&&n&&(this.ktx2Loader=new r.KTX2Loader,this.ktx2Loader.setTranscoderPath(n).detectSupport(this.el.renderer)),!this.meshoptDecoder&&i&&(this.meshoptDecoder=(e=i,new Promise((function(t,n){var i=document.createElement(\"script\");document.body.appendChild(i),i.onload=t,i.onerror=n,i.async=!0,i.src=e}))).then((function(){return window.MeshoptDecoder.ready})).then((function(){return window.MeshoptDecoder})))},getDRACOLoader:function(){return this.dracoLoader},getKTX2Loader:function(){return this.ktx2Loader},getMeshoptDecoder:function(){return this.meshoptDecoder}})},7758:(e,t,n)=>{n(8878),n(5087),n(2776),n(7095),n(4829),n(730),n(2908),n(7644),n(9060),n(2602)},7095:(e,t,n)=>{var i=n(365).registerSystem,r=n(7629),s=n(8309),o=\"data-aframe-default-light\";e.exports.System=i(\"light\",{schema:{defaultLightsEnabled:{default:!0}},init:function(){this.defaultLights=!1,this.userDefinedLights=!1,this.sceneEl.addEventListener(\"loaded\",r(this.setupDefaultLights,this))},registerLight:function(e){e.hasAttribute(o)||(this.removeDefaultLights(),this.userDefinedLights=!0)},removeDefaultLights:function(){var e,t=this.sceneEl;if(this.defaultLights){e=document.querySelectorAll(\"[\"+o+\"]\");for(var n=0;n\u003Ce.length;n++)t.removeChild(e[n]);this.defaultLights=!1}},setupDefaultLights:function(){var e,t,n=this.sceneEl;this.userDefinedLights||this.defaultLights||!this.data.defaultLightsEnabled||((e=document.createElement(\"a-entity\")).setAttribute(\"light\",{color:\"#BBB\",type:\"ambient\"}),e.setAttribute(o,\"\"),e.setAttribute(s.AFRAME_INJECTED,\"\"),n.appendChild(e),(t=document.createElement(\"a-entity\")).setAttribute(\"light\",{color:\"#FFF\",intensity:.6,castShadow:!0}),t.setAttribute(\"position\",{x:-.5,y:1,z:1}),t.setAttribute(o,\"\"),t.setAttribute(s.AFRAME_INJECTED,\"\"),n.appendChild(t),this.defaultLights=!0)}})},4829:(e,t,n)=>{var i=n(365).registerSystem,r=n(2666),s=n(8903),o=n(819).isHLS,a=n(819).setTextureProperties,l=s.bind,c=s.debug,h=c(\"components:texture:error\"),u=new r.TextureLoader,d=c(\"components:texture:warn\");u.setCrossOrigin(\"anonymous\"),e.exports.System=i(\"material\",{init:function(){this.materials={},this.textureCounts={},this.textureCache={},this.sceneEl.addEventListener(\"materialtextureloaded\",l(this.onMaterialTextureLoaded,this))},clearTextureCache:function(){this.textureCache={}},loadTexture:function(e,t,n){var i=this;if(\"CANVAS\"!==e.tagName){if(\"VIDEO\"===e.tagName)return e.src||e.srcObject||e.childElementCount||d(\"Video element was defined with neither `source` elements nor `src` / `srcObject` attributes.\"),void this.loadVideo(e,t,n);s.srcLoader.validateSrc(e,(function(e){i.loadImage(e,t,n)}),(function(e){i.loadVideo(e,t,n)}))}else this.loadCanvas(e,t,n)},loadImage:function(e,t,n){var i=this.hash(t),s=this.textureCache;s[i]||(s[i]=function(e,t){return new Promise((function(n,i){function s(e){a(e,t),e.needsUpdate=!0,n(e)}\"string\"!=typeof e?s(new r.Texture(e)):u.load(e,s,(function(){}),(function(e){h(\"`$s` could not be fetched (Error code: %s; Response: %s)\",e.status,e.statusText)}))}))}(e,t)),s[i].then(n)},loadCanvas:function(e,t,n){var i;i=new r.CanvasTexture(e),a(i,t),n(i)},loadVideo:function(e,t,n){var i,s,l,c,h=this.textureCache;function u(e){e.texture.needsUpdate=!0,n(e.texture,e.videoEl)}if(\"string\"!=typeof e){if(l=e,h[i=this.hashVideo(t,l)])return void h[i].then(u);!function(e){e.autoplay=e.hasAttribute(\"autoplay\")&&\"false\"!==e.getAttribute(\"autoplay\"),e.controls=e.hasAttribute(\"controls\")&&\"false\"!==e.getAttribute(\"controls\"),\"false\"===e.getAttribute(\"loop\")&&e.removeAttribute(\"loop\"),\"false\"===e.getAttribute(\"preload\")&&(e.preload=\"none\"),e.crossOrigin=e.crossOrigin||\"anonymous\",e.setAttribute(\"playsinline\",\"\"),e.setAttribute(\"webkit-playsinline\",\"\")}(l)}l=l||function(e,t,n){var i=document.createElement(\"video\");return i.width=t,i.height=n,i.setAttribute(\"playsinline\",\"\"),i.setAttribute(\"webkit-playsinline\",\"\"),i.autoplay=!0,i.loop=!0,i.crossOrigin=\"anonymous\",i.addEventListener(\"error\",(function(){d(\"`$s` is not a valid video\",e)}),!0),i.src=e,i}(e,t.width,t.height),h[i=this.hashVideo(t,l)]?h[i].then(u):((s=new r.VideoTexture(l)).minFilter=r.LinearFilter,a(s,t),this.sceneEl.isIOS&&o(l.src||l.getAttribute(\"src\"),l.type||l.getAttribute(\"type\"))&&(s.format=r.RGBAFormat,s.needsCorrectionBGRA=!0,s.flipY=!1,s.needsCorrectionFlipY=!0),c={texture:s,videoEl:l},h[i]=Promise.resolve(c),u(c))},hash:function(e){return e.src.tagName&&((e=s.extendDeep({},e)).src=e.src.src),JSON.stringify(e)},hashVideo:function(e,t){return function(e,t){var n,i,r,s=t.getAttribute(\"id\");if(s)return s;for(i=\"\",r=e||{},n=0;n\u003Ct.attributes.length;n++)r[t.attributes[n].name]=t.attributes[n].value;return Object.keys(r).sort().forEach((function(e){i+=e+\":\"+r[e]+\";\"})),i}(e,t)},registerMaterial:function(e){this.materials[e.uuid]=e},unregisterMaterial:function(e){delete this.materials[e.uuid];var t=this.textureCounts;Object.keys(e).filter((function(t){return e[t]&&e[t].isTexture})).forEach((function(n){t[e[n].uuid]--,t[e[n].uuid]\u003C=0&&e[n].dispose()}))},updateMaterials:function(e){var t=this.materials;Object.keys(t).forEach((function(e){t[e].needsUpdate=!0}))},onMaterialTextureLoaded:function(e){this.textureCounts[e.detail.texture.uuid]||(this.textureCounts[e.detail.texture.uuid]=0),this.textureCounts[e.detail.texture.uuid]++}})},730:(e,t,n)=>{var i=n(365).registerSystem,r=n(8903),s=n(2666),o=(0,r.debug)(\"components:renderer:warn\");e.exports.System=i(\"renderer\",{schema:{antialias:{default:\"auto\",oneOf:[\"true\",\"false\",\"auto\"]},highRefreshRate:{default:r.device.isOculusBrowser()},logarithmicDepthBuffer:{default:\"auto\",oneOf:[\"true\",\"false\",\"auto\"]},maxCanvasWidth:{default:1920},maxCanvasHeight:{default:1920},physicallyCorrectLights:{default:!1},exposure:{default:1,if:{toneMapping:[\"ACESFilmic\",\"linear\",\"reinhard\",\"cineon\"]}},toneMapping:{default:\"no\",oneOf:[\"no\",\"ACESFilmic\",\"linear\",\"reinhard\",\"cineon\"]},precision:{default:\"high\",oneOf:[\"high\",\"medium\",\"low\"]},sortObjects:{default:!1},colorManagement:{default:!1},gammaOutput:{default:!1},alpha:{default:!0},foveationLevel:{default:1}},init:function(){var e=this.data,t=this.el,n=this.data.toneMapping.charAt(0).toUpperCase()+this.data.toneMapping.slice(1),i=t.renderer;i.sortObjects=e.sortObjects,i.physicallyCorrectLights=e.physicallyCorrectLights,i.toneMapping=s[n+\"ToneMapping\"],(e.colorManagement||e.gammaOutput)&&(i.outputEncoding=s.sRGBEncoding,e.gammaOutput&&o('Property `gammaOutput` is deprecated. Use `renderer=\"colorManagement: true;\"` instead.')),t.hasAttribute(\"antialias\")&&o('Component `antialias` is deprecated. Use `renderer=\"antialias: true\"` instead.'),t.hasAttribute(\"logarithmicDepthBuffer\")&&o('Component `logarithmicDepthBuffer` is deprecated. Use `renderer=\"logarithmicDepthBuffer: true\"` instead.')},update:function(){var e=this.data,t=this.el.renderer,n=this.data.toneMapping.charAt(0).toUpperCase()+this.data.toneMapping.slice(1);t.toneMapping=s[n+\"ToneMapping\"],t.toneMappingExposure=e.exposure,t.xr.setFoveation(e.foveationLevel)},applyColorCorrection:function(e){this.data.colorManagement&&e&&(e.isColor?e.convertSRGBToLinear():e.isTexture&&(e.encoding=s.sRGBEncoding))}})},2908:(e,t,n)=>{var i=n(365).registerSystem,r=n(2666),s={basic:r.BasicShadowMap,pcf:r.PCFShadowMap,pcfsoft:r.PCFSoftShadowMap};e.exports.System=i(\"shadow\",{schema:{enabled:{default:!0},autoUpdate:{default:!0},type:{default:\"pcf\",oneOf:[\"basic\",\"pcf\",\"pcfsoft\"]}},init:function(){var e=this.sceneEl,t=this.data;this.shadowMapEnabled=!1,e.renderer&&(e.renderer.shadowMap.type=s[t.type],e.renderer.shadowMap.autoUpdate=t.autoUpdate,this.setShadowMapEnabled(this.shadowMapEnabled))},update:function(e){e.enabled!==this.data.enabled&&this.setShadowMapEnabled(this.data.enabled)},setShadowMapEnabled:function(e){var t=this.sceneEl.renderer;this.shadowMapEnabled=this.data.enabled&&e,t&&(t.shadowMap.enabled=this.shadowMapEnabled)}})},7644:(e,t,n)=>{var i=n(365).registerSystem,r=n(8903),s=r.device.isWebXRAvailable;e.exports.System=i(\"tracked-controls-webvr\",{init:function(){var e=this;this.controllers=[],this.isChrome=-1!==navigator.userAgent.indexOf(\"Chrome\"),this.updateControllerList(),this.throttledUpdateControllerList=r.throttle(this.updateControllerList,500,this),s||navigator.getVRDisplays&&this.sceneEl.addEventListener(\"enter-vr\",(function(){navigator.getVRDisplays().then((function(t){t.length&&(e.vrDisplay=t[0])}))}))},tick:function(){this.isChrome?this.updateControllerList():this.throttledUpdateControllerList()},updateControllerList:function(){var e,t,n,i,r=this.controllers;if(t=navigator.getGamepads&&navigator.getGamepads()){for(i=r.length,r.length=0,n=0;n\u003Ct.length;++n)(e=t[n])&&e.pose&&r.push(e);r.length!==i&&this.el.emit(\"controllersupdated\",void 0,!1)}}})},9060:(e,t,n)=>{var i=n(365).registerSystem,r=n(8903);e.exports.System=i(\"tracked-controls-webxr\",{init:function(){this.controllers=[],this.oldControllers=[],this.oldControllersLength=0,this.throttledUpdateControllerList=r.throttle(this.updateControllerList,500,this),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.addEventListener(\"enter-vr\",this.updateReferenceSpace),this.el.addEventListener(\"exit-vr\",this.updateReferenceSpace)},tick:function(){this.throttledUpdateControllerList()},updateReferenceSpace:function(){var e=this,t=this.el.xrSession;if(!t)return this.referenceSpace=void 0,this.controllers=[],void(this.oldControllersLength>0&&(this.oldControllersLength=0,this.el.emit(\"controllersupdated\",void 0,!1)));var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,'tracked-controls-webxr uses reference space \"'+n+'\".'),t}))},updateControllerList:function(){var e,t=this.el.xrSession,n=this.oldControllers;if(!t){if(0===this.oldControllersLength)return;return this.oldControllersLength=0,this.controllers=[],void this.el.emit(\"controllersupdated\",void 0,!1)}if(t.inputSources){if(this.controllers=t.inputSources,this.oldControllersLength===this.controllers.length){var i=!0;for(e=0;e\u003Cthis.controllers.length;++e)if(this.controllers[e]!==n[e]||this.controllers[e].gamepad!==n[e].gamepad){i=!1;break}if(i)return}for(n.length=0,e=0;e\u003Cthis.controllers.length;e++)n.push(this.controllers[e]);this.oldControllersLength=this.controllers.length,this.el.emit(\"controllersupdated\",void 0,!1)}}})},2602:(e,t,n)=>{var i=n(365).registerSystem,r=n(8903).debug(\"systems:webxr:warn\");e.exports.System=i(\"webxr\",{schema:{referenceSpaceType:{type:\"string\",default:\"local-floor\"},requiredFeatures:{type:\"array\",default:[\"local-floor\"]},optionalFeatures:{type:\"array\",default:[\"bounded-floor\"]},overlayElement:{type:\"selector\"}},update:function(){var e=this.data;this.sessionConfiguration={requiredFeatures:e.requiredFeatures,optionalFeatures:e.optionalFeatures},this.sessionReferenceSpaceType=e.referenceSpaceType,e.overlayElement&&(e.overlayElement.classList.remove(\"a-dom-overlay\"),e.optionalFeatures.includes(\"dom-overlay\")||(e.optionalFeatures.push(\"dom-overlay\"),this.el.setAttribute(\"webxr\",e)),this.warnIfFeatureNotRequested(\"dom-overlay\"),this.sessionConfiguration.domOverlay={root:e.overlayElement},e.overlayElement.classList.add(\"a-dom-overlay\"))},wasFeatureRequested:function(e){return\"viewer\"===e||\"local\"===e||!(!this.sessionConfiguration.requiredFeatures.includes(e)&&!this.sessionConfiguration.optionalFeatures.includes(e))},warnIfFeatureNotRequested:function(e,t){this.wasFeatureRequested(e)||r((t?t+\" \":\"\")+'Please add the feature \"'+e+\"\\\" to a-scene's webxr system options in requiredFeatures/optionalFeatures.\")}})},7629:e=>{e.exports=function(e,t){return n=Array.prototype.slice.call(arguments,2),function(){var i=n.concat(Array.prototype.slice.call(arguments,0));return e.apply(t,i)};var n}},395:(e,t,n)=>{var i=n(4219),r=n(7347),s=i(\"utils:coordinates:warn\"),o=[\"x\",\"y\",\"z\",\"w\"],a=/^\\s*((-?\\d*\\.{0,1}\\d+(e-?\\d+)?)\\s+){2,3}(-?\\d*\\.{0,1}\\d+(e-?\\d+)?)\\s*$/;e.exports.regex=a;var l=\"object\",c=/\\s+/g;function h(e){return a.test(e)}function u(e){return null!=e&&e.constructor===String?parseFloat(e,10):e}e.exports.parse=function(e,t){var n,i,s,a,h,d,p,A,f;if(e&&e instanceof Object)return d=void 0===e.x?t&&t.x:e.x,p=void 0===e.y?t&&t.y:e.y,A=void 0===e.z?t&&t.z:e.z,f=void 0===e.w?t&&t.w:e.w,null!=d&&(e.x=u(d)),null!=p&&(e.y=u(p)),null!=A&&(e.z=u(A)),null!=f&&(e.w=u(f)),e;if(null==e)return typeof t===l?r({},t):t;for(n=e.trim().split(c),h={},a=0;a\u003Co.length;a++)if(s=o[a],n[a])h[s]=parseFloat(n[a],10);else{if(void 0===(i=t&&t[s]))continue;h[s]=u(i)}return h},e.exports.stringify=function(e){var t;return typeof e!==l?e:(t=e.x+\" \"+e.y,null!=e.z&&(t+=\" \"+e.z),null!=e.w&&(t+=\" \"+e.w),t)},e.exports.isCoordinates=h,e.exports.isCoordinate=function(e){return s(\"`AFRAME.utils.isCoordinate` has been renamed to `AFRAME.utils.isCoordinates`\"),h(e)},e.exports.toVector3=function(e){return new THREE.Vector3(e.x,e.y,e.z)}},4219:(e,t,n)=>{var i=n(2790),r=n(695),s=n(7347),o={colors:{debug:\"gray\",error:\"red\",info:\"gray\",warn:\"orange\"}},a=function(e){var t=r(e);return t.color=function(e){var t=function(e){var t=e.split(\":\");return t[t.length-1]}(e);return o.colors&&o.colors[t]||null}(e),t};s(a,r);var l=function(){try{return window.localStorage}catch(e){}}();l&&(parseInt(l.logs,10)||\"true\"===l.logs)?a.enable(\"*\"):a.enable(\"*:error,*:info,*:warn\"),i.browser&&(window.logs=a),e.exports=a},879:(e,t,n)=>{var i,r=n(2790),s=n(695)(\"device:error\"),o=!1,a=!1,l=e.exports.isWebXRAvailable=!window.debug&&void 0!==navigator.xr;if(window.addEventListener(\"vrdisplayactivate\",(function(e){var t;l||(t=document.createElement(\"canvas\"),i=e.display,t.getContext(\"webgl\",{}),i.requestPresent([{source:t}]).then((function(){}),(function(){})))})),l){var c=function(){var e=document.querySelector(\"a-scene\");e?e.hasLoaded?e.components[\"vr-mode-ui\"].updateEnterInterfaces():e.addEventListener(\"loaded\",c):window.addEventListener(\"DOMContentLoaded\",c)},h=function(e){s(\"WebXR session support error: \"+e.message)};navigator.xr.isSessionSupported?(navigator.xr.isSessionSupported(\"immersive-vr\").then((function(e){o=e,c()})).catch(h),navigator.xr.isSessionSupported(\"immersive-ar\").then((function(e){a=e,c()})).catch((function(){}))):navigator.xr.supportsSession?(navigator.xr.supportsSession(\"immersive-vr\").then((function(){o=!0,c()})).catch(h),navigator.xr.supportsSession(\"immersive-ar\").then((function(){a=!0,c()})).catch((function(){}))):s(\"WebXR has neither isSessionSupported or supportsSession?!\")}else navigator.getVRDisplays&&navigator.getVRDisplays().then((function(e){var t=document.querySelector(\"a-scene\");i=e.length&&e[0],t&&t.emit(\"displayconnected\",{vrDisplay:i})}));function u(){return i}e.exports.getVRDisplay=u,e.exports.checkHeadsetConnected=function(){return o||a||!!u()},e.exports.checkARSupport=function(){return a},e.exports.checkVRSupport=function(){return o};var d,p,A=(p=!1,d=window.navigator.userAgent||window.navigator.vendor||window.opera,(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(d)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(d.substr(0,4)))&&(p=!0),(m()||f()||E())&&(p=!0),y()&&(p=!1),function(){return p});function f(e){var t=e||window.navigator.userAgent;return/ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(t)}function m(){return/iPad|iPhone|iPod/.test(window.navigator.platform)}function g(){return/(OculusBrowser)/i.test(window.navigator.userAgent)}function v(){return/(Mobile VR)/i.test(window.navigator.userAgent)}function y(){return g()||v()}function E(){return/R7 Build/.test(window.navigator.userAgent)}e.exports.isMobile=A,e.exports.isTablet=f,e.exports.isIOS=m,e.exports.isMobileDeviceRequestingDesktopSite=function(){return!A()&&!y()&&void 0!==window.orientation},e.exports.isOculusBrowser=g,e.exports.isFirefoxReality=v,e.exports.isMobileVR=y,e.exports.isR7=E,e.exports.isLandscape=function(){var e=window.orientation;return E()&&(e+=90),90===e||-90===e},e.exports.isBrowserEnvironment=!(r&&!r.browser),e.exports.isNodeEnvironment=!e.exports.isBrowserEnvironment},126:e=>{var t={};function n(e,n){return t[n=n||\".\"]||(t[n]={}),-1!==e.indexOf(n)?t[n][e]=e.split(n):t[n][e]=e,t[n][e]}e.exports.getComponentPropertyPath=n,e.exports.propertyPathCache=t,e.exports.getComponentProperty=function(e,t,i){var r;return i=i||\".\",-1!==t.indexOf(i)?(r=n(t,i)).constructor===String?e.getAttribute(r):e.getAttribute(r[0])[r[1]]:e.getAttribute(t)},e.exports.setComponentProperty=function(e,t,i,r){var s;r=r||\".\",-1===t.indexOf(r)?e.setAttribute(t,i):(s=n(t,r)).constructor===String?e.setAttribute(s,i):e.setAttribute(s[0],s[1],i)}},5607:e=>{e.exports=function(e){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t,10)+1+\"px\",e.style.height=parseInt(n,10)+1+\"px\",setTimeout((function(){e.style.width=t,e.style.height=n}),200)}},8903:(e,t,n)=>{var i=n(4219),r=n(1900),s=n(879),o=n(7347),a=n(3940),l=i(\"utils:warn\");e.exports.bind=n(7629),e.exports.coordinates=n(395),e.exports.debug=i,e.exports.device=s,e.exports.entity=n(126),e.exports.forceCanvasResizeSafariMobile=n(5607),e.exports.isIE11=n(8302),e.exports.material=n(819),e.exports.objectPool=a,e.exports.split=n(3836).split,e.exports.styleParser=n(2498),e.exports.trackedControls=n(6600),e.exports.checkHeadsetConnected=function(){return l(\"`utils.checkHeadsetConnected` has moved to `utils.device.checkHeadsetConnected`\"),s.checkHeadsetConnected(arguments)},e.exports.isGearVR=e.exports.device.isGearVR=function(){l(\"`utils.isGearVR` has been deprecated, use `utils.device.isMobileVR`\")},e.exports.isIOS=function(){return l(\"`utils.isIOS` has moved to `utils.device.isIOS`\"),s.isIOS(arguments)},e.exports.isOculusGo=e.exports.device.isOculusGo=function(){l(\"`utils.isOculusGo` has been deprecated, use `utils.device.isMobileVR`\")},e.exports.isMobile=function(){return l(\"`utils.isMobile has moved to `utils.device.isMobile`\"),s.isMobile(arguments)},e.exports.throttle=function(t,n,i){var r;return i&&(t=e.exports.bind(t,i)),function(){var e=Date.now(),i=void 0===r?n:e-r;(void 0===r||i>=n)&&(r=e,t.apply(null,arguments))}},e.exports.throttleLeadingAndTrailing=function(t,n,i){var r,s;return i&&(t=e.exports.bind(t,i)),function(){var e=Date.now(),i=void 0===r?n:e-r,o=arguments;void 0===r||i>=n?(clearTimeout(s),r=e,t.apply(null,o)):(clearTimeout(s),s=setTimeout((function(){r=Date.now(),t.apply(this,o)}),n-i))}},e.exports.throttleTick=function(t,n,i){var r;return i&&(t=e.exports.bind(t,i)),function(e,i){var s=void 0===r?i:e-r;(void 0===r||s>=n)&&(r=e,t(e,s))}},e.exports.debounce=function(e,t,n){var i;return function(){var r=this,s=arguments,o=function(){i=null,n||e.apply(r,s)},a=n&&!i;clearTimeout(i),i=setTimeout(o,t),a&&e.apply(r,s)}},e.exports.extend=o,e.exports.extendDeep=r,e.exports.clone=function(e){return JSON.parse(JSON.stringify(e))};var c,h,u=(c=a.createPool((function(){return[]})),function(e,t){var n,i,r,s,o,a;if(void 0===e||void 0===t||null===e||null===t||!(e&&t&&e.constructor===Object&&t.constructor===Object||e.constructor===Array&&t.constructor===Array))return e===t;for(n in i=c.use(),r=c.use(),i.length=0,r.length=0,e)i.push(n);for(n in t)r.push(n);if(i.length!==r.length)return c.recycle(i),c.recycle(r),!1;for(s=0;s\u003Ci.length;++s)if(o=e[i[s]],a=t[i[s]],\"object\"==typeof o||\"object\"==typeof a||Array.isArray(o)&&Array.isArray(a)){if(o===a)continue;if(!u(o,a))return c.recycle(i),c.recycle(r),!1}else if(o!==a)return c.recycle(i),c.recycle(r),!1;return c.recycle(i),c.recycle(r),!0});e.exports.deepEqual=u,e.exports.diff=(h=[],function(e,t,n){var i,r,s,o,a,l,c;for(a in o=n||{},h.length=0,e)h.push(a);if(!t)return o;for(s in t)-1===h.indexOf(s)&&h.push(s);for(l=0;l\u003Ch.length;l++)i=e[a=h[l]],r=t[a],((c=i&&r&&i.constructor===Object&&r.constructor===Object)&&!u(i,r)||!c&&i!==r)&&(o[a]=r);return o}),e.exports.shouldCaptureKeyEvent=function(e){return!e.metaKey&&document.activeElement===document.body},e.exports.splitString=function(e,t){void 0===t&&(t=\" \");var n=new RegExp(t,\"g\");return(e=(e||\"\").replace(n,t)).split(t)},e.exports.getElData=function(e,t){t=t||{};var n={};return Object.keys(t).forEach((function(t){e.hasAttribute(t)&&(n[t]=e.getAttribute(t))})),n},e.exports.getUrlParameter=function(e){e=e.replace(/[\\[]/,\"\\\\[\").replace(/[\\]]/,\"\\\\]\");var t=new RegExp(\"[\\\\?&]\"+e+\"=([^&#]*)\").exec(location.search);return null===t?\"\":decodeURIComponent(t[1].replace(/\\+/g,\" \"))},e.exports.isIframed=function(){return window.top!==window.self},e.exports.findAllScenes=function(e){for(var t=[],n=e.getElementsByTagName(\"*\"),i=0,r=n.length;i\u003Cr;i++)n[i].isScene&&t.push(n[i]);return t},e.exports.srcLoader=n(6375)},9609:()=>{window.addEventListener(\"orientationchange\",(function(){document.documentElement.style.height=\"initial\",setTimeout((function(){document.documentElement.style.height=\"100%\",setTimeout((function(){window.scrollTo(0,1)}),500)}),500)}))},8302:e=>{var t,n;e.exports=11===(t=-1,n=navigator.userAgent,\"Microsoft Internet Explorer\"===navigator.appName?null!=new RegExp(\"MSIE ([0-9]{1,}[\\\\.0-9]{0,})\").exec(n)&&(t=parseFloat(RegExp.$1)):\"Netscape\"===navigator.appName&&null!=new RegExp(\"Trident/.*rv:([0-9]{1,}[\\\\.0-9]{0,})\").exec(n)&&(t=parseFloat(RegExp.$1)),t)},6818:e=>{e.exports=function(e){return/(iphone|ipod|ipad).*os.(7_|8_|9_)/i.test(e)}},819:(e,t,n)=>{var i=n(2666),r=[\"application/x-mpegurl\",\"application/vnd.apple.mpegurl\"],s=new Set([\"emissiveMap\",\"envMap\",\"map\",\"specularMap\"]);function o(e,t){var n=t.offset||{x:0,y:0},r=t.repeat||{x:1,y:1};!!t.npot&&(e.wrapS=i.ClampToEdgeWrapping,e.wrapT=i.ClampToEdgeWrapping,e.magFilter=i.LinearFilter,e.minFilter=i.LinearFilter),1===r.x&&1===r.y||(e.wrapS=i.RepeatWrapping,e.wrapT=i.RepeatWrapping,e.repeat.set(r.x,r.y)),0===n.x&&0===n.y||e.offset.set(n.x,n.y)}function a(e,t){t&&(e.emit(\"materialtextureloaded\",{src:t.image,texture:t}),t.image&&\"VIDEO\"===t.image.tagName&&(t.image.addEventListener(\"loadeddata\",(function(){e.components&&e.components.material&&(t.needsCorrectionBGRA&&t.needsCorrectionFlipY&&-1!==[\"standard\",\"flat\"].indexOf(e.components.material.data.shader)&&e.setAttribute(\"material\",\"shader\",\"ios10hls\"),e.emit(\"materialvideoloadeddata\",{src:t.image,texture:t}))})),t.image.addEventListener(\"ended\",(function(){e.emit(\"materialvideoended\",{src:t.image,texture:t})}))))}e.exports.setTextureProperties=o,e.exports.updateMapMaterialFromData=function(e,t,n,r){var l=n.el,c=n.material,h=l.sceneEl.systems.renderer,u=r[t];if(n.materialSrcs||(n.materialSrcs={}),!u)return delete n.materialSrcs[e],void d(null);function d(t){c[e]=t,t&&s.has(e)&&h.applyColorCorrection(t),c.needsUpdate=!0,a(l,t)}u===n.materialSrcs[e]&&c[e]?o(c[e],r):(n.materialSrcs[e]=u,u instanceof i.Texture?d(u):l.sceneEl.systems.material.loadTexture(u,{src:u,repeat:r.repeat,offset:r.offset,npot:r.npot},(function(t){n.materialSrcs[e]===u&&d(t)})))},e.exports.updateMap=function(t,n){return e.exports.updateMapMaterialFromData(\"map\",\"src\",t,n)},e.exports.updateDistortionMap=function(e,t,n){var i=e;\"ambientOcclusion\"===e&&(i=\"ao\");var r=t.el,l=t.material,c=r.sceneEl.systems.renderer,h=n[e+\"Map\"],u={};if(u.src=h,u.offset=n[e+\"TextureOffset\"],u.repeat=n[e+\"TextureRepeat\"],u.wrap=n[e+\"TextureWrap\"],h){if(h===t[e+\"TextureSrc\"])return;return t[e+\"TextureSrc\"]=h,void r.sceneEl.systems.material.loadTexture(h,u,d)}function d(e){var t=i+\"Map\";l[t]=e,e&&s.has(t)&&c.applyColorCorrection(e),e&&o(e,n),l.needsUpdate=!0,a(r,e)}l.map&&d(null)},e.exports.handleTextureEvents=a,e.exports.isHLS=function(e,t){return!(!t||!r.includes(t.toLowerCase()))||!!(e&&e.toLowerCase().indexOf(\".m3u8\")>0)}},3437:e=>{function t(e,t,n){return(t.dot(e)-t.dot(n))/t.length()}e.exports.distanceOfPointFromPlane=t,e.exports.nearestPointInPlane=function(e,n,i,r){var s=t(e,n,i);return r.copy(n),r.multiplyScalar(s),r.add(i),r}},3940:e=>{var t=Object.freeze(Object.create(null));function n(){return{}}function i(e){var t;if(e&&e.constructor===Object)for(t in e)e[t]=void 0}e.exports.createPool=function(e){var r=[],s=null;function o(t){var n,i;if((t=void 0===t?r.length:t)>0&&null==s&&(s=0),t>0)for(n=r.length,r.length+=Number(t),i=n;i\u003Cr.length;i++)r[i]=e();return r.length}return e=e||n,{grow:o,pool:r,recycle:function(e){e instanceof Object&&(null!==s&&-1!==s?r[--s]=e:r[r.length]=e)},size:function(){return r.length},use:function(){var e;return null!==s&&s!==r.length||o(r.length||5),e=r[s],r[s++]=t,i(e),e}}},e.exports.clearObject=i,e.exports.removeUnusedKeys=function(e,t){var n;if(e&&e.constructor===Object)for(n in e)n in t||delete e[n]}},3836:e=>{var t;e.exports.split=(t={},function(e,n){return n in t||(t[n]={}),e in t[n]||(t[n][e]=e.split(n)),t[n][e]})},6375:(e,t,n)=>{var i=n(4219)(\"utils:src-loader:warn\");function r(e,t,n){!function(e,t){var n;e.tagName?t(\"IMG\"===e.tagName):((n=new XMLHttpRequest).open(\"HEAD\",e),n.addEventListener(\"load\",(function(i){var r;n.status>=200&&n.status\u003C300?null==(r=n.getResponseHeader(\"Content-Type\"))?o(e,t):r.startsWith(\"image\")?t(!0):t(!1):o(e,t),n.abort()})),n.send())}(e,(function(i){i?t(e):n(e)}))}function s(e){var t=e.match(/\\url\\((.+)\\)/);if(t)return t[1]}function o(e,t){var n=new Image;n.addEventListener(\"load\",(function(){t(!0)})),n.addEventListener(\"error\",(function(){t(!1)})),n.src=e}e.exports={parseUrl:s,validateSrc:r,validateCubemapSrc:function(e,t){var n,o,a,l=\"\",c=[];for(o=0;o\u003C5;o++)l+=\"(url\\\\((?:[^\\\\)]+)\\\\),\\\\s*)\";function h(e){c.push(e),6===c.length&&t(c)}if(l+=\"(url\\\\((?:[^\\\\)]+)\\\\)\\\\s*)\",a=e.match(new RegExp(l)))for(o=1;o\u003C7;o++)r(s(a[o]),h);else if(n=function(e){try{var t=document.querySelector(e);return t||i('No element was found matching the selector: \"%s\"',e),t}catch(t){return void i('\"%s\" is not a valid selector',e)}}(e))return\"A-CUBEMAP\"===n.tagName&&n.srcs?t(n.srcs):void i('Selector \"%s\" does not point to \u003Ca-cubemap>',e)}}},2498:e=>{var t=/-([a-z])/g;function n(e){return e.replace(t,a)}function i(e){var t,i;for(i in e)i!==(t=n(i))&&(e[t]=e[i],delete e[i]);return e}e.exports.parse=function(e,t){var n;return\"string\"!=typeof e?e:(n=function(e,t){var n,i,r,s,a,l;for(t=t||{},n=o(e),i=0;i\u003Cn.length;i++)(r=n[i])&&(s=r.indexOf(\":\"),a=r.substr(0,s).trim(),l=r.substr(s+1).trim(),t[a]=l);return t}(e,t),n[\"\"]?e:i(n))},e.exports.stringify=function(e){return\"string\"==typeof e?e:function(e){var t,n=0,i=0,r=\"\";for(t in e)n++;for(t in e)r+=t+\": \"+e[t],i\u003Cn-1&&(r+=\"; \"),i++;return r}(e)},e.exports.toCamelCase=n,e.exports.transformKeysToCamelCase=i;var r,s,o=(r=[],s=/url\\([^)]+$/,function(e){var t,n=\"\",i=0;for(r.length=0;i\u003Ce.length;)-1===(t=e.indexOf(\";\",i))&&(t=e.length),n+=e.substring(i,t),s.test(n)?(n+=\";\",i=t+1):(r.push(n.trim()),n=\"\",i=t+1);return r});function a(e){return e[1].toUpperCase()}},6600:(e,t,n)=>{var i=n(8309).DEFAULT_HANDEDNESS,r=[\"x\",\"y\",\"z\",\"w\"];function s(e,t,n){var i,r,s=e.el.sceneEl,o=n.index||0;return!!(t&&(r=s&&s.systems[\"tracked-controls-webvr\"])&&(i=r.controllers).length&&a(i,null,t,n.hand,o))}function o(e,t,n){var i,r=e.el.sceneEl,s=r&&r.systems[\"tracked-controls-webxr\"];return!!s&&!(!(i=s.controllers)||!i.length)&&l(i,t,n.hand,n.index,n.iterateControllerProfiles,n.handTracking)}function a(e,t,n,r,s){var o,a,l=0;for(a=0;a\u003Ce.length;a++)if(o=e[a],(!n||o.id.startsWith(n))&&(n||o.id===t)&&(!r||!o.hand||r===o.hand)){if(!r||o.hand)return o;if(l===2*s+(r===i?0:1))return o;++l}}function l(e,t,n,i,r,s){var o,a,l,c,h=!1;for(o=0;o\u003Ce.length;o++){if(c=(l=e[o]).profiles,s)h=l.hand;else if(r)for(a=0;a\u003Cc.length&&!(h=c[a].startsWith(t));a++);else h=c.length>0&&c[0].startsWith(t);if(h)if(\"right\"===l.handedness||\"left\"===l.handedness){if(l.handedness===n)return e[o]}else if(o===i)return e[o]}}e.exports.checkControllerPresentAndSetup=function(e,t,n){var i,r,a=e.el,l=a.sceneEl.hasWebXR;if(r=!!(i=(l?o:s)(e,t,n)),!e.controllerPresent||e.controllerEventsActive||l||e.addEventListeners(),r===e.controllerPresent)return r;e.controllerPresent=r,r?(e.addEventListeners(),e.injectTrackedControls(i),a.emit(\"controllerconnected\",{name:e.name,component:e})):(e.removeEventListeners(),a.emit(\"controllerdisconnected\",{name:e.name,component:e}))},e.exports.isControllerPresentWebVR=s,e.exports.isControllerPresentWebXR=o,e.exports.findMatchingControllerWebVR=a,e.exports.findMatchingControllerWebXR=l,e.exports.emitIfAxesChanged=function(e,t,n){var i,s,o,a,l;for(s in t){for(i=t[s],o=!1,l=0;l\u003Ci.length;l++)n.detail.changed[i[l]]&&(o=!0);if(o){for(a={},l=0;l\u003Ci.length;l++)a[r[l]]=n.detail.axis[i[l]];e.el.emit(s+\"moved\",a)}}},e.exports.onButtonEvent=function(e,t,n,i){var r=(i?n.mapping[i]:n.mapping).buttons[e];n.el.emit(r+t),n.updateModel&&n.updateModel(r,t)}},6898:()=>{THREE.DeviceOrientationControls=function(e){var t=this;this.object=e,this.object.rotation.reorder(\"YXZ\"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alphaOffset=0;var n,i,r,s,o=function(e){t.deviceOrientation=e},a=function(){t.screenOrientation=window.orientation||0},l=(n=new THREE.Vector3(0,0,1),i=new THREE.Euler,r=new THREE.Quaternion,s=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),function(e,t,o,a,l){i.set(o,t,-a,\"YXZ\"),e.setFromEuler(i),e.multiply(s),e.multiply(r.setFromAxisAngle(n,-l))});this.connect=function(){a(),window.addEventListener(\"orientationchange\",a,!1),window.addEventListener(\"deviceorientation\",o,!1),t.enabled=!0},this.disconnect=function(){window.removeEventListener(\"orientationchange\",a,!1),window.removeEventListener(\"deviceorientation\",o,!1),t.enabled=!1},this.update=function(){if(!1!==t.enabled){var e=t.deviceOrientation;if(e){var n=e.alpha?THREE.MathUtils.degToRad(e.alpha)+t.alphaOffset:0,i=e.beta?THREE.MathUtils.degToRad(e.beta):0,r=e.gamma?THREE.MathUtils.degToRad(e.gamma):0,s=t.screenOrientation?THREE.MathUtils.degToRad(t.screenOrientation):0;l(t.object.quaternion,n,i,r,s)}}},this.dispose=function(){t.disconnect()},this.connect()}},9625:e=>{window.glStats=function(){var e=null,t=0,n=0,i=0,r=0,s=0,o=0,a=0;function l(e,t){return function(){t.apply(this,arguments),e.apply(this,arguments)}}return WebGLRenderingContext.prototype.drawArrays=l(WebGLRenderingContext.prototype.drawArrays,(function(){t++,arguments[0]==this.POINTS?o+=arguments[2]:s+=arguments[2]})),WebGLRenderingContext.prototype.drawElements=l(WebGLRenderingContext.prototype.drawElements,(function(){n++,r+=arguments[1]/3,s+=arguments[1]})),WebGLRenderingContext.prototype.useProgram=l(WebGLRenderingContext.prototype.useProgram,(function(){i++})),WebGLRenderingContext.prototype.bindTexture=l(WebGLRenderingContext.prototype.bindTexture,(function(){a++})),{update:function(){e(\"allcalls\").set(t+n),e(\"drawElements\").set(n),e(\"drawArrays\").set(t),e(\"bindTexture\").set(a),e(\"useProgram\").set(i),e(\"glfaces\").set(r),e(\"glvertices\").set(s),e(\"glpoints\").set(o)},start:function(){t=0,n=0,i=0,r=0,s=0,o=0,a=0},end:function(){},attach:function(t){e=t},values:{allcalls:{over:3e3,caption:\"Calls (hook)\"},drawelements:{caption:\"drawElements (hook)\"},drawarrays:{caption:\"drawArrays (hook)\"}},groups:[{caption:\"WebGL\",values:[\"allcalls\",\"drawelements\",\"drawarrays\",\"useprogram\",\"bindtexture\",\"glfaces\",\"glvertices\",\"glpoints\"]}],fractions:[{base:\"allcalls\",steps:[\"drawelements\",\"drawarrays\"]}]}},window.threeStats=function(e){var t=null;return{update:function(){t(\"renderer.info.memory.geometries\").set(e.info.memory.geometries),t(\"renderer.info.programs\").set(e.info.programs.length),t(\"renderer.info.memory.textures\").set(e.info.memory.textures),t(\"renderer.info.render.calls\").set(e.info.render.calls),t(\"renderer.info.render.triangles\").set(e.info.render.triangles),t(\"renderer.info.render.points\").set(e.info.render.points)},start:function(){},end:function(){},attach:function(e){t=e},values:{\"renderer.info.memory.geometries\":{caption:\"Geometries\"},\"renderer.info.memory.textures\":{caption:\"Textures\"},\"renderer.info.programs\":{caption:\"Programs\"},\"renderer.info.render.calls\":{caption:\"Calls\"},\"renderer.info.render.triangles\":{caption:\"Triangles\",over:1e3},\"renderer.info.render.points\":{caption:\"Points\"}},groups:[{caption:\"Three.js - Memory\",values:[\"renderer.info.memory.geometries\",\"renderer.info.programs\",\"renderer.info.memory.textures\"]},{caption:\"Three.js - Render\",values:[\"renderer.info.render.calls\",\"renderer.info.render.triangles\",\"renderer.info.render.points\"]}],fractions:[]}},window.BrowserStats=function(){var e=null,t=0,n=0;window.performance&&!performance.memory&&(performance.memory={usedJSHeapSize:0,totalJSHeapSize:0}),0===performance.memory.totalJSHeapSize&&console.warn(\"totalJSHeapSize === 0... performance.memory is only available in Chrome .\");var i=Math.log(1024);function r(e){var t=Math.floor(Math.log(e)/i);return Math.round(100*e/Math.pow(1024,t))/100}return{update:function(){t=r(performance.memory.usedJSHeapSize),n=r(performance.memory.totalJSHeapSize),e(\"memory\").set(t),e(\"total\").set(n)},start:function(){t=0},end:function(){},attach:function(t){e=t},values:{memory:{caption:\"Used Memory\",average:!0,avgMs:1e3,over:22},total:{caption:\"Total Memory\"}},groups:[{caption:\"Browser\",values:[\"memory\",\"total\"]}],fractions:[{base:\"total\",steps:[\"memory\"]}]}},e.exports={glStats:window.glStats,threeStats:window.threeStats,BrowserStats:window.BrowserStats}},1326:e=>{\"use strict\";!function(){\"performance\"in window==0&&(window.performance={});var e=window.performance;if(\"now\"in e==0){var t=Date.now();e.timing&&e.timing.navigationStart&&(t=e.timing.navigationStart),e.now=function(){return Date.now()-t}}e.mark||(e.mark=function(){}),e.measure||(e.measure=function(){})}(),window.rStats=function(e){function t(e,t){for(var n=Object.keys(e),i=0,r=n.length;i\u003Cr;i++)t(n[i])}var n=e||{},i=n.colours||[\"#850700\",\"#c74900\",\"#fcb300\",\"#284280\",\"#4c7c0c\"],r=(n.CSSPath?n.CSSPath:\"\")+\"rStats.css\";(n.css||[\"https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300\",r]).forEach((function(e){var t,n;t=e,(n=document.createElement(\"link\")).href=t,n.rel=\"stylesheet\",n.type=\"text/css\",document.getElementsByTagName(\"head\")[0].appendChild(n)})),n.values||(n.values={});var s,o,a=10,l={};function c(e,t,n){var i=n||{},r=document.createElement(\"canvas\"),s=r.getContext(\"2d\"),o=0,l=0,c=i.color?i.color:\"#666666\",h=document.createElement(\"canvas\"),u=h.getContext(\"2d\");h.width=1,h.height=20,u.fillStyle=\"#444444\",u.fillRect(0,0,1,20),u.fillStyle=c,u.fillRect(0,a,1,a),u.fillStyle=\"#ffffff\",u.globalAlpha=.5,u.fillRect(0,a,1,1),u.globalAlpha=1;var d=document.createElement(\"canvas\"),p=d.getContext(\"2d\");return d.width=1,d.height=20,p.fillStyle=\"#444444\",p.fillRect(0,0,1,20),p.fillStyle=\"#b70000\",p.fillRect(0,a,1,a),p.globalAlpha=.5,p.fillStyle=\"#ffffff\",p.fillRect(0,a,1,1),p.globalAlpha=1,r.width=200,r.height=a,r.style.width=r.width+\"px\",r.style.height=r.height+\"px\",r.className=\"rs-canvas\",e.appendChild(r),s.fillStyle=\"#444444\",s.fillRect(0,0,r.width,r.height),{draw:function(e,t){(l+=.1*(e-l))>(o*=.99)&&(o=l),s.drawImage(r,1,0,r.width-1,r.height,0,0,r.width-1,r.height),t?s.drawImage(d,r.width-1,r.height-l*r.height/o-a):s.drawImage(h,r.width-1,r.height-l*r.height/o-a)}}}function h(e,n){var r=document.createElement(\"canvas\"),s=r.getContext(\"2d\");return r.width=200,r.height=a*n,r.style.width=r.width+\"px\",r.style.height=r.height+\"px\",r.className=\"rs-canvas\",e.appendChild(r),s.fillStyle=\"#444444\",s.fillRect(0,0,r.width,r.height),{draw:function(e){s.drawImage(r,1,0,r.width-1,r.height,0,0,r.width-1,r.height);var n=0;t(e,(function(t){var o=e[t]*r.height;s.fillStyle=i[t],s.fillRect(r.width-1,n,1,o),n+=o}))}}}function u(e,t){var i,r=e,s=0,a=0,l=0,h=0,u=performance.now(),d=0,p=document.createElement(\"div\"),A=document.createElement(\"span\"),f=document.createElement(\"div\"),m=document.createTextNode(\"\"),g=n?n.values[r.toLowerCase()]:null,v=new c(p,r,g),y=!1;function E(e){if(g&&g.average){h+=e,d++;var t=performance.now();t-u>=(g.avgMs||1e3)&&(l=h/d,h=0,u=t,d=0)}}function b(){i=performance.now(),n.userTimingAPI&&performance.mark(r+\"-start\"),y=!0}function x(){s=performance.now()-i,n.userTimingAPI&&(performance.mark(r+\"-end\"),y&&performance.measure(r,r+\"-start\",r+\"-end\")),E(s)}return A.className=\"rs-counter-id\",A.textContent=g&&g.caption?g.caption:r,f.className=\"rs-counter-value\",f.appendChild(m),p.appendChild(A),p.appendChild(f),t?t.div.appendChild(p):o.appendChild(p),i=performance.now(),{set:function(e){E(s=e)},start:b,tick:function(){x(),b()},end:x,frame:function(){var e=performance.now(),t=e-i;a++,t>1e3&&(s=g&&!1===g.interpolate?a:1e3*a/t,a=0,i=e,E(s))},value:function(){return s},draw:function(){var e=g&&g.average?l:s;m.nodeValue=Math.round(100*e)/100;var t=g&&(g.below&&s\u003Cg.below||g.over&&s>g.over);v.draw(s,t),p.className=t?\"rs-counter-base alarm\":\"rs-counter-base\"}}}function d(e){var i=e.toLowerCase();if(void 0===i&&(i=\"default\"),l[i])return l[i];var r=null;n&&n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)];r||-1===t.values.indexOf(i.toLowerCase())||(r=t)}));var s=new u(i,r);return l[i]=s,s}function p(){t(n.plugins,(function(e){n.plugins[e].update()})),t(l,(function(e){l[e].draw()})),n&&n.fractions&&t(n.fractions,(function(e){var i=n.fractions[parseInt(e,10)],r=[],s=l[i.base.toLowerCase()];s&&(s=s.value(),t(n.fractions[e].steps,(function(t){var i=n.fractions[e].steps[parseInt(t,10)].toLowerCase(),o=l[i];o&&r.push(o.value()/s)}))),i.graph.draw(r)}))}return function(){if(n.plugins){n.values||(n.values={}),n.groups||(n.groups=[]),n.fractions||(n.fractions=[]);for(var e=0;e\u003Cn.plugins.length;e++)n.plugins[e].attach(d),t(n.plugins[e].values,(function(t){n.values[t]=n.plugins[e].values[t]})),n.groups=n.groups.concat(n.plugins[e].groups),n.fractions=n.fractions.concat(n.plugins[e].fractions)}else n.plugins={};(s=document.createElement(\"div\")).className=\"rs-base\",(o=document.createElement(\"div\")).className=\"rs-container\",o.style.height=\"auto\",s.appendChild(o),document.body.appendChild(s),n&&(n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)],i=document.createElement(\"div\");i.className=\"rs-group\",t.div=i;var r=document.createElement(\"h1\");r.textContent=t.caption,r.addEventListener(\"click\",function(e){this.classList.toggle(\"hidden\"),e.preventDefault()}.bind(i)),o.appendChild(r),o.appendChild(i)})),n.fractions&&t(n.fractions,(function(e){var r=n.fractions[parseInt(e,10)],s=document.createElement(\"div\");s.className=\"rs-fraction\";var l=document.createElement(\"div\");l.className=\"rs-legend\";var c=0;t(n.fractions[e].steps,(function(t){var r=document.createElement(\"p\");r.textContent=n.fractions[e].steps[t],r.style.color=i[c],l.appendChild(r),c++})),s.appendChild(l),s.style.height=c*a+\"px\",r.div=s;var u=new h(s,c);r.graph=u,o.appendChild(s)})))}(),function(e){return e?d(e):{element:s,update:p}}},e.exports=window.rStats},8332:()=>{String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e})},1347:e=>{var t={base64:function(e,t){return\"data:\"+e+\";base64,\"+t},isMobile:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))&&(t=!0),t},isIOS:function(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)},isIFrame:function(){try{return window.self!==window.top}catch(e){return!0}},appendQueryParameter:function(e,t,n){var i=e.indexOf(\"?\")\u003C0?\"?\":\"&\";return e+(i+t+\"=\")+n},getQueryParameter:function(e){e=e.replace(/[\\[]/,\"\\\\[\").replace(/[\\]]/,\"\\\\]\");var t=new RegExp(\"[\\\\?&]\"+e+\"=([^&#]*)\").exec(location.search);return null===t?\"\":decodeURIComponent(t[1].replace(/\\+/g,\" \"))},isLandscapeMode:function(){return 90==window.orientation||-90==window.orientation}};e.exports=t},4630:(e,t,n)=>{var i,r=n(1347);e.exports=(i=navigator.userAgent||navigator.vendor||window.opera).match(/iPhone/i)||i.match(/iPod/i)?function(){var e=null;this.request=function(){e||(e=setInterval((function(){window.location.href=\"/\",setTimeout(window.stop,0)}),15e3))},this.release=function(){e&&(clearInterval(e),e=null)}}:function(){var e=document.createElement(\"video\");e.addEventListener(\"ended\",(function(){e.play()})),this.request=function(){e.paused&&(e.src=r.base64(\"video/webm\",\"GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAAH4xFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsggfG7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU2LjQwLjEwMVdBjUxhdmY1Ni40MC4xMDFzpJAGSJTMbsLpDt/ySkipgX1fRImIQO1MAAAAAAAWVK5rAQAAAAAAADuuAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDmDgQEj44OEO5rKAOABAAAAAAAABrCBsLqBkB9DtnUBAAAAAAAAo+eBAKOmgQAAgKJJg0IAAV4BHsAHBIODCoAACmH2MAAAZxgz4dPSTFi5JACjloED6ACmAECSnABMQAADYAAAWi0quoCjloEH0ACmAECSnABNwAADYAAAWi0quoCjloELuACmAECSnABNgAADYAAAWi0quoCjloEPoACmAECSnABNYAADYAAAWi0quoCjloETiACmAECSnABNIAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTnghdwo5aBAAAApgBAkpwATOAAA2AAAFotKrqAo5aBA+gApgBAkpwATMAAA2AAAFotKrqAo5aBB9AApgBAkpwATIAAA2AAAFotKrqAo5aBC7gApgBAkpwATEAAA2AAAFotKrqAo5aBD6AApgDAkpwAQ2AAA2AAAFotKrqAo5aBE4gApgBAkpwATCAAA2AAAFotKrqAH0O2dQEAAAAAAACU54Iu4KOWgQAAAKYAQJKcAEvAAANgAABaLSq6gKOWgQPoAKYAQJKcAEtgAANgAABaLSq6gKOWgQfQAKYAQJKcAEsAAANgAABaLSq6gKOWgQu4AKYAQJKcAEqAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEogAANgAABaLSq6gKOWgROIAKYAQJKcAEnAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCRlCjloEAAACmAECSnABJgAADYAAAWi0quoCjloED6ACmAECSnABJIAADYAAAWi0quoCjloEH0ACmAMCSnABDYAADYAAAWi0quoCjloELuACmAECSnABI4AADYAAAWi0quoCjloEPoACmAECSnABIoAADYAAAWi0quoCjloETiACmAECSnABIYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngl3Ao5aBAAAApgBAkpwASCAAA2AAAFotKrqAo5aBA+gApgBAkpwASAAAA2AAAFotKrqAo5aBB9AApgBAkpwAR8AAA2AAAFotKrqAo5aBC7gApgBAkpwAR4AAA2AAAFotKrqAo5aBD6AApgBAkpwAR2AAA2AAAFotKrqAo5aBE4gApgBAkpwARyAAA2AAAFotKrqAH0O2dQEAAAAAAACU54J1MKOWgQAAAKYAwJKcAENgAANgAABaLSq6gKOWgQPoAKYAQJKcAEbgAANgAABaLSq6gKOWgQfQAKYAQJKcAEagAANgAABaLSq6gKOWgQu4AKYAQJKcAEaAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEZAAANgAABaLSq6gKOWgROIAKYAQJKcAEYAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCjKCjloEAAACmAECSnABF4AADYAAAWi0quoCjloED6ACmAECSnABFwAADYAAAWi0quoCjloEH0ACmAECSnABFoAADYAAAWi0quoCjloELuACmAECSnABFgAADYAAAWi0quoCjloEPoACmAMCSnABDYAADYAAAWi0quoCjloETiACmAECSnABFYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngqQQo5aBAAAApgBAkpwARUAAA2AAAFotKrqAo5aBA+gApgBAkpwARSAAA2AAAFotKrqAo5aBB9AApgBAkpwARQAAA2AAAFotKrqAo5aBC7gApgBAkpwARQAAA2AAAFotKrqAo5aBD6AApgBAkpwAROAAA2AAAFotKrqAo5aBE4gApgBAkpwARMAAA2AAAFotKrqAH0O2dQEAAAAAAACU54K7gKOWgQAAAKYAQJKcAESgAANgAABaLSq6gKOWgQPoAKYAQJKcAESAAANgAABaLSq6gKOWgQfQAKYAwJKcAENgAANgAABaLSq6gKOWgQu4AKYAQJKcAERgAANgAABaLSq6gKOWgQ+gAKYAQJKcAERAAANgAABaLSq6gKOWgROIAKYAQJKcAEQgAANgAABaLSq6gB9DtnUBAAAAAAAAlOeC0vCjloEAAACmAECSnABEIAADYAAAWi0quoCjloED6ACmAECSnABEAAADYAAAWi0quoCjloEH0ACmAECSnABD4AADYAAAWi0quoCjloELuACmAECSnABDwAADYAAAWi0quoCjloEPoACmAECSnABDoAADYAAAWi0quoCjloETiACmAECSnABDgAADYAAAWi0quoAcU7trAQAAAAAAABG7j7OBALeK94EB8YIBd/CBAw==\"),e.play())},this.release=function(){e.pause(),e.src=\"\"}}},1248:(e,t,n)=>{\"use strict\";n.d(t,{Z:()=>E});var i=n(4216),r=n.n(i),s=n(7705),o=n.n(s),a=n(6742),l=n.n(a),c=new URL(n(3646),n.b),h=new URL(n(7513),n.b),u=new URL(n(5059),n.b),d=new URL(n(576),n.b),p=new URL(n(5581),n.b),A=o()(r()),f=l()(c),m=l()(h),g=l()(u),v=l()(d),y=l()(p);A.push([e.id,\"/* .a-fullscreen means not embedded. */\\nhtml.a-fullscreen {\\n bottom: 0;\\n left: 0;\\n position: fixed;\\n right: 0;\\n top: 0;\\n}\\n\\nhtml.a-fullscreen body {\\n height: 100%;\\n margin: 0;\\n overflow: hidden;\\n padding: 0;\\n width: 100%;\\n}\\n\\n/* Class is removed when doing \u003Ca-scene embedded>. */\\nhtml.a-fullscreen .a-canvas {\\n width: 100% !important;\\n height: 100% !important;\\n top: 0 !important;\\n left: 0 !important;\\n right: 0 !important;\\n bottom: 0 !important;\\n position: fixed !important;\\n}\\n\\nhtml:not(.a-fullscreen) .a-enter-vr,\\nhtml:not(.a-fullscreen) .a-enter-ar {\\n right: 5px;\\n bottom: 5px;\\n}\\n\\nhtml:not(.a-fullscreen) .a-enter-ar {\\n right: 60px;\\n}\\n\\n/* In chrome mobile the user agent stylesheet set it to white */\\n:-webkit-full-screen {\\n background-color: transparent;\\n}\\n\\n.a-hidden {\\n display: none !important;\\n}\\n\\n.a-canvas {\\n height: 100%;\\n left: 0;\\n position: absolute;\\n top: 0;\\n width: 100%;\\n}\\n\\n.a-canvas.a-grab-cursor:hover {\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n}\\n\\ncanvas.a-canvas.a-mouse-cursor-hover:hover {\\n cursor: pointer;\\n}\\n\\n.a-inspector-loader {\\n background-color: #ed3160;\\n position: fixed;\\n left: 3px;\\n top: 3px;\\n padding: 6px 10px;\\n color: #fff;\\n text-decoration: none;\\n font-size: 12px;\\n font-family: Roboto,sans-serif;\\n text-align: center;\\n z-index: 99999;\\n width: 204px;\\n}\\n\\n/* Inspector loader animation */\\n@keyframes dots-1 { from { opacity: 0; } 25% { opacity: 1; } }\\n@keyframes dots-2 { from { opacity: 0; } 50% { opacity: 1; } }\\n@keyframes dots-3 { from { opacity: 0; } 75% { opacity: 1; } }\\n@-webkit-keyframes dots-1 { from { opacity: 0; } 25% { opacity: 1; } }\\n@-webkit-keyframes dots-2 { from { opacity: 0; } 50% { opacity: 1; } }\\n@-webkit-keyframes dots-3 { from { opacity: 0; } 75% { opacity: 1; } }\\n\\n.a-inspector-loader .dots span {\\n animation: dots-1 2s infinite steps(1);\\n -webkit-animation: dots-1 2s infinite steps(1);\\n}\\n\\n.a-inspector-loader .dots span:first-child + span {\\n animation-name: dots-2;\\n -webkit-animation-name: dots-2;\\n}\\n\\n.a-inspector-loader .dots span:first-child + span + span {\\n animation-name: dots-3;\\n -webkit-animation-name: dots-3;\\n}\\n\\na-scene {\\n display: block;\\n position: relative;\\n height: 100%;\\n width: 100%;\\n}\\n\\na-assets,\\na-scene video,\\na-scene img,\\na-scene audio {\\n display: none;\\n}\\n\\n.a-enter-vr-modal,\\n.a-orientation-modal {\\n font-family: Consolas, Andale Mono, Courier New, monospace;\\n}\\n\\n.a-enter-vr-modal a {\\n border-bottom: 1px solid #fff;\\n padding: 2px 0;\\n text-decoration: none;\\n transition: .1s color ease-in;\\n}\\n\\n.a-enter-vr-modal a:hover {\\n background-color: #fff;\\n color: #111;\\n padding: 2px 4px;\\n position: relative;\\n left: -4px;\\n}\\n\\n.a-enter-vr,\\n.a-enter-ar {\\n font-family: sans-serif, monospace;\\n font-size: 13px;\\n width: 100%;\\n font-weight: 200;\\n line-height: 16px;\\n position: absolute;\\n right: 20px;\\n bottom: 20px;\\n}\\n\\n.a-enter-ar {\\n right: 80px;\\n}\\n\\n.a-enter-vr-button,\\n.a-enter-vr-modal,\\n.a-enter-vr-modal a {\\n color: #fff;\\n user-select: none;\\n outline: none;\\n}\\n\\n.a-enter-vr-button {\\n background: rgba(0, 0, 0, 0.35) url(\"+f+\") 50% 50% no-repeat;\\n}\\n\\n.a-enter-ar-button {\\n background: rgba(0, 0, 0, 0.20) url(\"+m+\") 50% 50% no-repeat;\\n}\\n\\n.a-enter-vr.fullscreen .a-enter-vr-button {\\n background-image: url(\"+g+\");\\n}\\n\\n.a-enter-vr-button,\\n.a-enter-ar-button {\\n background-size: 90% 90%;\\n border: 0;\\n bottom: 0;\\n cursor: pointer;\\n min-width: 58px;\\n min-height: 34px;\\n /* 1.74418604651 */\\n /*\\n In order to keep the aspect ratio when resizing\\n padding-top percentages are relative to the containing block's width.\\n http://stackoverflow.com/questions/12121090/responsively-change-div-size-keeping-aspect-ratio\\n */\\n padding-right: 0;\\n padding-top: 0;\\n position: absolute;\\n right: 0;\\n transition: background-color .05s ease;\\n -webkit-transition: background-color .05s ease;\\n z-index: 9999;\\n border-radius: 8px;\\n touch-action: manipulation; /* Prevent iOS double tap zoom on the button */\\n}\\n\\n.a-enter-ar-button {\\n background-size: 100% 90%;\\n margin-right: 10px;\\n border-radius: 7px;\\n}\\n\\n.a-enter-ar-button:active,\\n.a-enter-ar-button:hover,\\n.a-enter-vr-button:active,\\n.a-enter-vr-button:hover {\\n background-color: #ef2d5e;\\n}\\n\\n.a-enter-vr-button.resethover {\\n background-color: rgba(0, 0, 0, 0.35);\\n}\\n\\n\\n.a-enter-vr-modal {\\n background-color: #666;\\n border-radius: 0;\\n display: none;\\n min-height: 32px;\\n margin-right: 70px;\\n padding: 9px;\\n width: 280px;\\n right: 2%;\\n position: absolute;\\n}\\n\\n.a-enter-vr-modal:after {\\n border-bottom: 10px solid transparent;\\n border-left: 10px solid #666;\\n border-top: 10px solid transparent;\\n display: inline-block;\\n content: '';\\n position: absolute;\\n right: -5px;\\n top: 5px;\\n width: 0;\\n height: 0;\\n}\\n\\n.a-enter-vr-modal p,\\n.a-enter-vr-modal a {\\n display: inline;\\n}\\n\\n.a-enter-vr-modal p {\\n margin: 0;\\n}\\n\\n.a-enter-vr-modal p:after {\\n content: ' ';\\n}\\n\\n.a-orientation-modal {\\n background: rgba(244, 244, 244, 1) url(\"+v+') center no-repeat;\\n background-size: 50% 50%;\\n bottom: 0;\\n font-size: 14px;\\n font-weight: 600;\\n left: 0;\\n line-height: 20px;\\n right: 0;\\n position: fixed;\\n top: 0;\\n z-index: 9999999;\\n}\\n\\n.a-orientation-modal:after {\\n color: #666;\\n content: \"Insert phone into Cardboard holder.\";\\n display: block;\\n position: absolute;\\n text-align: center;\\n top: 70%;\\n transform: translateY(-70%);\\n width: 100%;\\n}\\n\\n.a-orientation-modal button {\\n background: url('+y+\") no-repeat;\\n border: none;\\n height: 50px;\\n text-indent: -9999px;\\n width: 50px;\\n}\\n\\n.a-loader-title {\\n background-color: rgba(0, 0, 0, 0.6);\\n font-family: sans-serif, monospace;\\n text-align: center;\\n font-size: 20px;\\n height: 50px;\\n font-weight: 300;\\n line-height: 50px;\\n position: absolute;\\n right: 0px;\\n left: 0px;\\n top: 0px;\\n color: white;\\n}\\n\\n.a-modal {\\n position: absolute;\\n background: rgba(0, 0, 0, 0.60);\\n background-size: 50% 50%;\\n bottom: 0;\\n font-size: 14px;\\n font-weight: 600;\\n left: 0;\\n line-height: 20px;\\n right: 0;\\n position: fixed;\\n top: 0;\\n z-index: 9999999;\\n}\\n\\n.a-dialog {\\n position: relative;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, -50%);\\n z-index: 199995;\\n width: 300px;\\n height: 200px;\\n background-size: contain;\\n background-color: white;\\n font-family: sans-serif, monospace;\\n font-size: 20px;\\n border-radius: 3px;\\n padding: 6px;\\n}\\n\\n.a-dialog-text-container {\\n width: 100%;\\n height: 70%;\\n align-self: flex-start;\\n display: flex;\\n justify-content: center;\\n align-content: center;\\n flex-direction: column;\\n}\\n\\n.a-dialog-text {\\n display: inline-block;\\n font-weight: normal;\\n font-size: 14pt;\\n margin: 8px;\\n}\\n\\n.a-dialog-buttons-container {\\n display: inline-flex;\\n align-self: flex-end;\\n width: 100%;\\n height: 30%;\\n}\\n\\n.a-dialog-button {\\n cursor: pointer;\\n align-self: center;\\n opacity: 0.9;\\n height: 80%;\\n width: 50%;\\n font-size: 12pt;\\n margin: 4px;\\n border-radius: 2px;\\n text-align:center;\\n border: none;\\n display: inline-block;\\n -webkit-transition: all 0.25s ease-in-out;\\n transition: all 0.25s ease-in-out;\\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.20);\\n user-select: none;\\n}\\n\\n.a-dialog-permission-button:hover {\\n box-shadow: 0 7px 14px rgba(0,0,0,0.20), 0 2px 2px rgba(0,0,0,0.20);\\n}\\n\\n.a-dialog-allow-button {\\n background-color: #00ceff;\\n}\\n\\n.a-dialog-deny-button {\\n background-color: #ff005b;\\n}\\n\\n.a-dialog-ok-button {\\n background-color: #00ceff;\\n width: 100%;\\n}\\n\\n.a-dom-overlay:not(.a-no-style) {\\n overflow: hidden;\\n position: absolute;\\n pointer-events: none;\\n box-sizing: border-box;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n top: 0;\\n padding: 1em;\\n}\\n\\n.a-dom-overlay:not(.a-no-style)>* {\\n pointer-events: auto;\\n}\\n\",\"\",{version:3,sources:[\"webpack://./src/style/aframe.css\"],names:[],mappings:\"AAAA,sCAAsC;AACtC;EACE,SAAS;EACT,OAAO;EACP,eAAe;EACf,QAAQ;EACR,MAAM;AACR;;AAEA;EACE,YAAY;EACZ,SAAS;EACT,gBAAgB;EAChB,UAAU;EACV,WAAW;AACb;;AAEA,oDAAoD;AACpD;EACE,sBAAsB;EACtB,uBAAuB;EACvB,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,0BAA0B;AAC5B;;AAEA;;EAEE,UAAU;EACV,WAAW;AACb;;AAEA;EACE,WAAW;AACb;;AAEA,gEAAgE;AAChE;EACE,6BAA6B;AAC/B;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,YAAY;EACZ,OAAO;EACP,kBAAkB;EAClB,MAAM;EACN,WAAW;AACb;;AAEA;EACE,YAAY;EACZ,iBAAiB;EACjB,oBAAoB;AACtB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,yBAAyB;EACzB,eAAe;EACf,SAAS;EACT,QAAQ;EACR,iBAAiB;EACjB,WAAW;EACX,qBAAqB;EACrB,eAAe;EACf,8BAA8B;EAC9B,kBAAkB;EAClB,cAAc;EACd,YAAY;AACd;;AAEA,+BAA+B;AAC/B,oBAAoB,OAAO,UAAU,EAAE,EAAE,MAAM,UAAU,EAAE,EAAE;AAC7D,oBAAoB,OAAO,UAAU,EAAE,EAAE,MAAM,UAAU,EAAE,EAAE;AAC7D,oBAAoB,OAAO,UAAU,EAAE,EAAE,MAAM,UAAU,EAAE,EAAE;AAC7D,4BAA4B,OAAO,UAAU,EAAE,EAAE,MAAM,UAAU,EAAE,EAAE;AACrE,4BAA4B,OAAO,UAAU,EAAE,EAAE,MAAM,UAAU,EAAE,EAAE;AACrE,4BAA4B,OAAO,UAAU,EAAE,EAAE,MAAM,UAAU,EAAE,EAAE;;AAErE;EACE,sCAAsC;EACtC,8CAA8C;AAChD;;AAEA;EACE,sBAAsB;EACtB,8BAA8B;AAChC;;AAEA;EACE,sBAAsB;EACtB,8BAA8B;AAChC;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,YAAY;EACZ,WAAW;AACb;;AAEA;;;;EAIE,aAAa;AACf;;AAEA;;EAEE,0DAA0D;AAC5D;;AAEA;EACE,6BAA6B;EAC7B,cAAc;EACd,qBAAqB;EACrB,6BAA6B;AAC/B;;AAEA;EACE,sBAAsB;EACtB,WAAW;EACX,gBAAgB;EAChB,kBAAkB;EAClB,UAAU;AACZ;;AAEA;;EAEE,kCAAkC;EAClC,eAAe;EACf,WAAW;EACX,gBAAgB;EAChB,iBAAiB;EACjB,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,WAAW;AACb;;AAEA;;;EAGE,WAAW;EACX,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,yFAA4qB;AAC9qB;;AAEA;EACE,yFAAkzB;AACpzB;;AAEA;EACE,yDAA2qK;AAC7qK;;AAEA;;EAEE,wBAAwB;EACxB,SAAS;EACT,SAAS;EACT,eAAe;EACf,eAAe;EACf,gBAAgB;EAChB,kBAAkB;EAClB;;;;GAIC;EACD,gBAAgB;EAChB,cAAc;EACd,kBAAkB;EAClB,QAAQ;EACR,sCAAsC;EACtC,8CAA8C;EAC9C,aAAa;EACb,kBAAkB;EAClB,0BAA0B,EAAE,8CAA8C;AAC5E;;AAEA;EACE,yBAAyB;EACzB,kBAAkB;EAClB,kBAAkB;AACpB;;AAEA;;;;EAIE,yBAAyB;AAC3B;;AAEA;EACE,qCAAqC;AACvC;;;AAGA;EACE,sBAAsB;EACtB,gBAAgB;EAChB,aAAa;EACb,gBAAgB;EAChB,kBAAkB;EAClB,YAAY;EACZ,YAAY;EACZ,SAAS;EACT,kBAAkB;AACpB;;AAEA;EACE,qCAAqC;EACrC,4BAA4B;EAC5B,kCAAkC;EAClC,qBAAqB;EACrB,WAAW;EACX,kBAAkB;EAClB,WAAW;EACX,QAAQ;EACR,QAAQ;EACR,SAAS;AACX;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,SAAS;AACX;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,2FAAivF;EACjvF,wBAAwB;EACxB,SAAS;EACT,eAAe;EACf,gBAAgB;EAChB,OAAO;EACP,iBAAiB;EACjB,QAAQ;EACR,eAAe;EACf,MAAM;EACN,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,8CAA8C;EAC9C,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,QAAQ;EACR,2BAA2B;EAC3B,WAAW;AACb;;AAEA;EACE,6DAA25B;EAC35B,YAAY;EACZ,YAAY;EACZ,oBAAoB;EACpB,WAAW;AACb;;AAEA;EACE,oCAAoC;EACpC,kCAAkC;EAClC,kBAAkB;EAClB,eAAe;EACf,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,kBAAkB;EAClB,UAAU;EACV,SAAS;EACT,QAAQ;EACR,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,+BAA+B;EAC/B,wBAAwB;EACxB,SAAS;EACT,eAAe;EACf,gBAAgB;EAChB,OAAO;EACP,iBAAiB;EACjB,QAAQ;EACR,eAAe;EACf,MAAM;EACN,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,eAAe;EACf,YAAY;EACZ,aAAa;EACb,wBAAwB;EACxB,uBAAuB;EACvB,kCAAkC;EAClC,eAAe;EACf,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,WAAW;EACX,WAAW;EACX,sBAAsB;EACtB,aAAa;EACb,uBAAuB;EACvB,qBAAqB;EACrB,sBAAsB;AACxB;;AAEA;EACE,qBAAqB;EACrB,mBAAmB;EACnB,eAAe;EACf,WAAW;AACb;;AAEA;EACE,oBAAoB;EACpB,oBAAoB;EACpB,WAAW;EACX,WAAW;AACb;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,WAAW;EACX,UAAU;EACV,eAAe;EACf,WAAW;EACX,kBAAkB;EAClB,iBAAiB;EACjB,YAAY;EACZ,qBAAqB;EACrB,yCAAyC;EACzC,iCAAiC;EACjC,wEAAwE;EACxE,iBAAiB;AACnB;;AAEA;EACE,mEAAmE;AACrE;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,yBAAyB;EACzB,WAAW;AACb;;AAEA;EACE,gBAAgB;EAChB,kBAAkB;EAClB,oBAAoB;EACpB,sBAAsB;EACtB,SAAS;EACT,OAAO;EACP,QAAQ;EACR,MAAM;EACN,YAAY;AACd;;AAEA;EACE,oBAAoB;AACtB\",sourcesContent:[\"/* .a-fullscreen means not embedded. */\\nhtml.a-fullscreen {\\n bottom: 0;\\n left: 0;\\n position: fixed;\\n right: 0;\\n top: 0;\\n}\\n\\nhtml.a-fullscreen body {\\n height: 100%;\\n margin: 0;\\n overflow: hidden;\\n padding: 0;\\n width: 100%;\\n}\\n\\n/* Class is removed when doing \u003Ca-scene embedded>. */\\nhtml.a-fullscreen .a-canvas {\\n width: 100% !important;\\n height: 100% !important;\\n top: 0 !important;\\n left: 0 !important;\\n right: 0 !important;\\n bottom: 0 !important;\\n position: fixed !important;\\n}\\n\\nhtml:not(.a-fullscreen) .a-enter-vr,\\nhtml:not(.a-fullscreen) .a-enter-ar {\\n right: 5px;\\n bottom: 5px;\\n}\\n\\nhtml:not(.a-fullscreen) .a-enter-ar {\\n right: 60px;\\n}\\n\\n/* In chrome mobile the user agent stylesheet set it to white */\\n:-webkit-full-screen {\\n background-color: transparent;\\n}\\n\\n.a-hidden {\\n display: none !important;\\n}\\n\\n.a-canvas {\\n height: 100%;\\n left: 0;\\n position: absolute;\\n top: 0;\\n width: 100%;\\n}\\n\\n.a-canvas.a-grab-cursor:hover {\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n}\\n\\ncanvas.a-canvas.a-mouse-cursor-hover:hover {\\n cursor: pointer;\\n}\\n\\n.a-inspector-loader {\\n background-color: #ed3160;\\n position: fixed;\\n left: 3px;\\n top: 3px;\\n padding: 6px 10px;\\n color: #fff;\\n text-decoration: none;\\n font-size: 12px;\\n font-family: Roboto,sans-serif;\\n text-align: center;\\n z-index: 99999;\\n width: 204px;\\n}\\n\\n/* Inspector loader animation */\\n@keyframes dots-1 { from { opacity: 0; } 25% { opacity: 1; } }\\n@keyframes dots-2 { from { opacity: 0; } 50% { opacity: 1; } }\\n@keyframes dots-3 { from { opacity: 0; } 75% { opacity: 1; } }\\n@-webkit-keyframes dots-1 { from { opacity: 0; } 25% { opacity: 1; } }\\n@-webkit-keyframes dots-2 { from { opacity: 0; } 50% { opacity: 1; } }\\n@-webkit-keyframes dots-3 { from { opacity: 0; } 75% { opacity: 1; } }\\n\\n.a-inspector-loader .dots span {\\n animation: dots-1 2s infinite steps(1);\\n -webkit-animation: dots-1 2s infinite steps(1);\\n}\\n\\n.a-inspector-loader .dots span:first-child + span {\\n animation-name: dots-2;\\n -webkit-animation-name: dots-2;\\n}\\n\\n.a-inspector-loader .dots span:first-child + span + span {\\n animation-name: dots-3;\\n -webkit-animation-name: dots-3;\\n}\\n\\na-scene {\\n display: block;\\n position: relative;\\n height: 100%;\\n width: 100%;\\n}\\n\\na-assets,\\na-scene video,\\na-scene img,\\na-scene audio {\\n display: none;\\n}\\n\\n.a-enter-vr-modal,\\n.a-orientation-modal {\\n font-family: Consolas, Andale Mono, Courier New, monospace;\\n}\\n\\n.a-enter-vr-modal a {\\n border-bottom: 1px solid #fff;\\n padding: 2px 0;\\n text-decoration: none;\\n transition: .1s color ease-in;\\n}\\n\\n.a-enter-vr-modal a:hover {\\n background-color: #fff;\\n color: #111;\\n padding: 2px 4px;\\n position: relative;\\n left: -4px;\\n}\\n\\n.a-enter-vr,\\n.a-enter-ar {\\n font-family: sans-serif, monospace;\\n font-size: 13px;\\n width: 100%;\\n font-weight: 200;\\n line-height: 16px;\\n position: absolute;\\n right: 20px;\\n bottom: 20px;\\n}\\n\\n.a-enter-ar {\\n right: 80px;\\n}\\n\\n.a-enter-vr-button,\\n.a-enter-vr-modal,\\n.a-enter-vr-modal a {\\n color: #fff;\\n user-select: none;\\n outline: none;\\n}\\n\\n.a-enter-vr-button {\\n background: rgba(0, 0, 0, 0.35) url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z' fill='%23fff'/%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z' fill='%23fff'/%3E%3C/svg%3E\\\") 50% 50% no-repeat;\\n}\\n\\n.a-enter-ar-button {\\n background: rgba(0, 0, 0, 0.20) url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z' fill='%23fff'/%3E%3Cpath d='M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z' fill='%23fff'/%3E%3Cpath d='M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z' fill='%23fff'/%3E%3C/svg%3E\\\") 50% 50% no-repeat;\\n}\\n\\n.a-enter-vr.fullscreen .a-enter-vr-button {\\n background-image: url(\\\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3Csvg width='108' height='62' viewBox='0 0 108 62' version='1.1' id='svg320' sodipodi:docname='fullscreen-aframe.svg' xml:space='preserve' inkscape:version='1.2.1 (9c6d41e 2022-07-14)' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23' xmlns:cc='http://creativecommons.org/ns%23' xmlns:dc='http://purl.org/dc/elements/1.1/'%3E%3Cdefs id='defs324' /%3E%3Csodipodi:namedview id='namedview322' pagecolor='%23ffffff' bordercolor='%23000000' borderopacity='0.25' inkscape:showpageshadow='2' inkscape:pageopacity='0.0' inkscape:pagecheckerboard='0' inkscape:deskcolor='%23d1d1d1' showgrid='false' inkscape:zoom='3.8064516' inkscape:cx='91.423729' inkscape:cy='-1.4449153' inkscape:window-width='1440' inkscape:window-height='847' inkscape:window-x='32' inkscape:window-y='25' inkscape:window-maximized='0' inkscape:current-layer='svg320' /%3E%3Ctitle id='title312'%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M96 0H12A12 12 0 0 0 0 12V50A12 12 0 0 0 12 62H96a12 12 0 0 0 12-12V12A12 12 0 0 0 96 0Zm8 50a8 8 0 0 1-8 8H12a8 8 0 0 1-8-8V12a8 8 0 0 1 8-8H96a8 8 0 0 1 8 8Z' fill='%23fff' id='path314' style='fill:%23ffffff' /%3E%3Cg id='g356' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g358' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g360' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g362' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g364' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g366' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g368' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g370' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g372' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g374' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g376' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g378' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g380' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g382' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cg id='g384' transform='translate(-206.61017 -232.61864)'%3E%3C/g%3E%3Cmetadata id='metadata561'%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=''%3E%3Cdc:title%3Eaframe-armode-noborder-reduced-tracking%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cpath d='m 98.168511 40.083649 c 0 -1.303681 -0.998788 -2.358041 -2.239389 -2.358041 -1.230088 0.0031 -2.240892 1.05436 -2.240892 2.358041 v 4.881296 l -9.041661 -9.041662 c -0.874129 -0.875631 -2.288954 -0.875631 -3.16308 0 -0.874129 0.874126 -0.874129 2.293459 0 3.167585 l 8.995101 8.992101 h -4.858767 c -1.323206 0.0031 -2.389583 1.004796 -2.389583 2.239386 0 1.237598 1.066377 2.237888 2.389583 2.237888 h 10.154599 c 1.323206 0 2.388082 -0.998789 2.392587 -2.237888 -0.0044 -0.03305 -0.009 -0.05858 -0.0134 -0.09161 0.0046 -0.04207 0.0134 -0.08712 0.0134 -0.13066 V 40.085172 h -1.52e-4' id='path596' style='fill:%23ffffff%3Bstroke-width:1.50194' /%3E%3Cpath d='m 23.091002 35.921781 -9.026643 9.041662 v -4.881296 c 0 -1.303681 -1.009302 -2.355037 -2.242393 -2.358041 -1.237598 0 -2.237888 1.05436 -2.237888 2.358041 l -0.0031 10.016421 c 0 0.04356 0.01211 0.08862 0.0015 0.130659 -0.0031 0.03153 -0.009 0.05709 -0.01211 0.09161 0.0031 1.239099 1.069379 2.237888 2.391085 2.237888 h 10.156101 c 1.320202 0 2.388079 -1.000291 2.388079 -2.237888 0 -1.234591 -1.067877 -2.236383 -2.388079 -2.239387 h -4.858767 l 8.995101 -8.9921 c 0.871126 -0.874127 0.871126 -2.293459 0 -3.167586 -0.875628 -0.877132 -2.291957 -0.877132 -3.169087 -1.52e-4' id='path598' style='fill:%23ffffff%3Bstroke-width:1.50194' /%3E%3Cpath d='m 84.649572 25.978033 9.041662 -9.041664 v 4.881298 c 0 1.299176 1.010806 2.350532 2.240891 2.355037 1.240601 0 2.23939 -1.055861 2.23939 -2.355037 V 11.798242 c 0 -0.04356 -0.009 -0.08862 -0.0134 -0.127671 0.0044 -0.03153 0.009 -0.06157 0.0134 -0.09313 -0.0044 -1.240598 -1.069379 -2.2393873 -2.391085 -2.2393873 h -10.1546 c -1.323205 0 -2.38958 0.9987893 -2.38958 2.2393873 0 1.233091 1.066375 2.237887 2.38958 2.240891 h 4.858768 l -8.995102 8.9921 c -0.874129 0.872625 -0.874129 2.288954 0 3.161578 0.874127 0.880137 2.288951 0.880137 3.16308 1.5e-4' id='path600' style='fill:%23ffffff%3Bstroke-width:1.50194' /%3E%3Cpath d='m 17.264988 13.822853 h 4.857265 c 1.320202 -0.0031 2.388079 -1.0078 2.388079 -2.240889 0 -1.240601 -1.067877 -2.2393893 -2.388079 -2.2393893 H 11.967654 c -1.321707 0 -2.388082 0.9987883 -2.391085 2.2393893 0.0031 0.03153 0.009 0.06157 0.01211 0.09313 -0.0031 0.03905 -0.0015 0.08262 -0.0015 0.127671 l 0.0031 10.020926 c 0 1.299176 1.00029 2.355038 2.237887 2.355038 1.233092 -0.0044 2.242393 -1.055862 2.242393 -2.355038 v -4.881295 l 9.026644 9.041661 c 0.877132 0.878635 2.293459 0.878635 3.169087 0 0.871125 -0.872624 0.871125 -2.288953 0 -3.161577 l -8.995282 -8.993616' id='path602' style='fill:%23ffffff%3Bstroke-width:1.50194' /%3E%3C/svg%3E\\\");\\n}\\n\\n.a-enter-vr-button,\\n.a-enter-ar-button {\\n background-size: 90% 90%;\\n border: 0;\\n bottom: 0;\\n cursor: pointer;\\n min-width: 58px;\\n min-height: 34px;\\n /* 1.74418604651 */\\n /*\\n In order to keep the aspect ratio when resizing\\n padding-top percentages are relative to the containing block's width.\\n http://stackoverflow.com/questions/12121090/responsively-change-div-size-keeping-aspect-ratio\\n */\\n padding-right: 0;\\n padding-top: 0;\\n position: absolute;\\n right: 0;\\n transition: background-color .05s ease;\\n -webkit-transition: background-color .05s ease;\\n z-index: 9999;\\n border-radius: 8px;\\n touch-action: manipulation; /* Prevent iOS double tap zoom on the button */\\n}\\n\\n.a-enter-ar-button {\\n background-size: 100% 90%;\\n margin-right: 10px;\\n border-radius: 7px;\\n}\\n\\n.a-enter-ar-button:active,\\n.a-enter-ar-button:hover,\\n.a-enter-vr-button:active,\\n.a-enter-vr-button:hover {\\n background-color: #ef2d5e;\\n}\\n\\n.a-enter-vr-button.resethover {\\n background-color: rgba(0, 0, 0, 0.35);\\n}\\n\\n\\n.a-enter-vr-modal {\\n background-color: #666;\\n border-radius: 0;\\n display: none;\\n min-height: 32px;\\n margin-right: 70px;\\n padding: 9px;\\n width: 280px;\\n right: 2%;\\n position: absolute;\\n}\\n\\n.a-enter-vr-modal:after {\\n border-bottom: 10px solid transparent;\\n border-left: 10px solid #666;\\n border-top: 10px solid transparent;\\n display: inline-block;\\n content: '';\\n position: absolute;\\n right: -5px;\\n top: 5px;\\n width: 0;\\n height: 0;\\n}\\n\\n.a-enter-vr-modal p,\\n.a-enter-vr-modal a {\\n display: inline;\\n}\\n\\n.a-enter-vr-modal p {\\n margin: 0;\\n}\\n\\n.a-enter-vr-modal p:after {\\n content: ' ';\\n}\\n\\n.a-orientation-modal {\\n background: rgba(244, 244, 244, 1) url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center no-repeat;\\n background-size: 50% 50%;\\n bottom: 0;\\n font-size: 14px;\\n font-weight: 600;\\n left: 0;\\n line-height: 20px;\\n right: 0;\\n position: fixed;\\n top: 0;\\n z-index: 9999999;\\n}\\n\\n.a-orientation-modal:after {\\n color: #666;\\n content: \\\"Insert phone into Cardboard holder.\\\";\\n display: block;\\n position: absolute;\\n text-align: center;\\n top: 70%;\\n transform: translateY(-70%);\\n width: 100%;\\n}\\n\\n.a-orientation-modal button {\\n background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;\\n border: none;\\n height: 50px;\\n text-indent: -9999px;\\n width: 50px;\\n}\\n\\n.a-loader-title {\\n background-color: rgba(0, 0, 0, 0.6);\\n font-family: sans-serif, monospace;\\n text-align: center;\\n font-size: 20px;\\n height: 50px;\\n font-weight: 300;\\n line-height: 50px;\\n position: absolute;\\n right: 0px;\\n left: 0px;\\n top: 0px;\\n color: white;\\n}\\n\\n.a-modal {\\n position: absolute;\\n background: rgba(0, 0, 0, 0.60);\\n background-size: 50% 50%;\\n bottom: 0;\\n font-size: 14px;\\n font-weight: 600;\\n left: 0;\\n line-height: 20px;\\n right: 0;\\n position: fixed;\\n top: 0;\\n z-index: 9999999;\\n}\\n\\n.a-dialog {\\n position: relative;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, -50%);\\n z-index: 199995;\\n width: 300px;\\n height: 200px;\\n background-size: contain;\\n background-color: white;\\n font-family: sans-serif, monospace;\\n font-size: 20px;\\n border-radius: 3px;\\n padding: 6px;\\n}\\n\\n.a-dialog-text-container {\\n width: 100%;\\n height: 70%;\\n align-self: flex-start;\\n display: flex;\\n justify-content: center;\\n align-content: center;\\n flex-direction: column;\\n}\\n\\n.a-dialog-text {\\n display: inline-block;\\n font-weight: normal;\\n font-size: 14pt;\\n margin: 8px;\\n}\\n\\n.a-dialog-buttons-container {\\n display: inline-flex;\\n align-self: flex-end;\\n width: 100%;\\n height: 30%;\\n}\\n\\n.a-dialog-button {\\n cursor: pointer;\\n align-self: center;\\n opacity: 0.9;\\n height: 80%;\\n width: 50%;\\n font-size: 12pt;\\n margin: 4px;\\n border-radius: 2px;\\n text-align:center;\\n border: none;\\n display: inline-block;\\n -webkit-transition: all 0.25s ease-in-out;\\n transition: all 0.25s ease-in-out;\\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.20);\\n user-select: none;\\n}\\n\\n.a-dialog-permission-button:hover {\\n box-shadow: 0 7px 14px rgba(0,0,0,0.20), 0 2px 2px rgba(0,0,0,0.20);\\n}\\n\\n.a-dialog-allow-button {\\n background-color: #00ceff;\\n}\\n\\n.a-dialog-deny-button {\\n background-color: #ff005b;\\n}\\n\\n.a-dialog-ok-button {\\n background-color: #00ceff;\\n width: 100%;\\n}\\n\\n.a-dom-overlay:not(.a-no-style) {\\n overflow: hidden;\\n position: absolute;\\n pointer-events: none;\\n box-sizing: border-box;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n top: 0;\\n padding: 1em;\\n}\\n\\n.a-dom-overlay:not(.a-no-style)>* {\\n pointer-events: auto;\\n}\\n\"],sourceRoot:\"\"}]);const E=A},7098:(e,t,n)=>{\"use strict\";n.d(t,{Z:()=>a});var i=n(4216),r=n.n(i),s=n(7705),o=n.n(s)()(r());o.push([e.id,\".rs-base {\\n background-color: #333;\\n color: #fafafa;\\n border-radius: 0;\\n font: 10px monospace;\\n left: 5px;\\n line-height: 1em;\\n opacity: 0.85;\\n overflow: hidden;\\n padding: 10px;\\n position: fixed;\\n top: 5px;\\n width: 300px;\\n z-index: 10000;\\n}\\n\\n.rs-base div.hidden {\\n display: none;\\n}\\n\\n.rs-base h1 {\\n color: #fff;\\n cursor: pointer;\\n font-size: 1.4em;\\n font-weight: 300;\\n margin: 0 0 5px;\\n padding: 0;\\n}\\n\\n.rs-group {\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: flex;\\n -webkit-flex-direction: column-reverse;\\n flex-direction: column-reverse;\\n margin-bottom: 5px;\\n}\\n\\n.rs-group:last-child {\\n margin-bottom: 0;\\n}\\n\\n.rs-counter-base {\\n align-items: center;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: flex;\\n height: 10px;\\n -webkit-justify-content: space-between;\\n justify-content: space-between;\\n margin: 2px 0;\\n}\\n\\n.rs-counter-base.alarm {\\n color: #b70000;\\n text-shadow: 0 0 0 #b70000,\\n 0 0 1px #fff,\\n 0 0 1px #fff,\\n 0 0 2px #fff,\\n 0 0 2px #fff,\\n 0 0 3px #fff,\\n 0 0 3px #fff,\\n 0 0 4px #fff,\\n 0 0 4px #fff;\\n}\\n\\n.rs-counter-id {\\n font-weight: 300;\\n -webkit-box-ordinal-group: 0;\\n -webkit-order: 0;\\n order: 0;\\n width: 54px;\\n}\\n\\n.rs-counter-value {\\n font-weight: 300;\\n -webkit-box-ordinal-group: 1;\\n -webkit-order: 1;\\n order: 1;\\n text-align: right;\\n width: 35px;\\n}\\n\\n.rs-canvas {\\n -webkit-box-ordinal-group: 2;\\n -webkit-order: 2;\\n order: 2;\\n}\\n\\n@media (min-width: 480px) {\\n .rs-base {\\n left: 20px;\\n top: 20px;\\n }\\n}\\n\",\"\",{version:3,sources:[\"webpack://./src/style/rStats.css\"],names:[],mappings:\"AAAA;EACE,sBAAsB;EACtB,cAAc;EACd,gBAAgB;EAChB,oBAAoB;EACpB,SAAS;EACT,gBAAgB;EAChB,aAAa;EACb,gBAAgB;EAChB,aAAa;EACb,eAAe;EACf,QAAQ;EACR,YAAY;EACZ,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,WAAW;EACX,eAAe;EACf,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,UAAU;AACZ;;AAEA;EACE,oBAAoB;EACpB,qBAAqB;EACrB,aAAa;EACb,sCAAsC;EACtC,8BAA8B;EAC9B,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,mBAAmB;EACnB,oBAAoB;EACpB,qBAAqB;EACrB,aAAa;EACb,YAAY;EACZ,sCAAsC;EACtC,8BAA8B;EAC9B,aAAa;AACf;;AAEA;EACE,cAAc;EACd;;;;;;;;2BAQyB;AAC3B;;AAEA;EACE,gBAAgB;EAChB,4BAA4B;EAC5B,gBAAgB;EAChB,QAAQ;EACR,WAAW;AACb;;AAEA;EACE,gBAAgB;EAChB,4BAA4B;EAC5B,gBAAgB;EAChB,QAAQ;EACR,iBAAiB;EACjB,WAAW;AACb;;AAEA;EACE,4BAA4B;EAC5B,gBAAgB;EAChB,QAAQ;AACV;;AAEA;EACE;IACE,UAAU;IACV,SAAS;EACX;AACF\",sourcesContent:[\".rs-base {\\n background-color: #333;\\n color: #fafafa;\\n border-radius: 0;\\n font: 10px monospace;\\n left: 5px;\\n line-height: 1em;\\n opacity: 0.85;\\n overflow: hidden;\\n padding: 10px;\\n position: fixed;\\n top: 5px;\\n width: 300px;\\n z-index: 10000;\\n}\\n\\n.rs-base div.hidden {\\n display: none;\\n}\\n\\n.rs-base h1 {\\n color: #fff;\\n cursor: pointer;\\n font-size: 1.4em;\\n font-weight: 300;\\n margin: 0 0 5px;\\n padding: 0;\\n}\\n\\n.rs-group {\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: flex;\\n -webkit-flex-direction: column-reverse;\\n flex-direction: column-reverse;\\n margin-bottom: 5px;\\n}\\n\\n.rs-group:last-child {\\n margin-bottom: 0;\\n}\\n\\n.rs-counter-base {\\n align-items: center;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: flex;\\n height: 10px;\\n -webkit-justify-content: space-between;\\n justify-content: space-between;\\n margin: 2px 0;\\n}\\n\\n.rs-counter-base.alarm {\\n color: #b70000;\\n text-shadow: 0 0 0 #b70000,\\n 0 0 1px #fff,\\n 0 0 1px #fff,\\n 0 0 2px #fff,\\n 0 0 2px #fff,\\n 0 0 3px #fff,\\n 0 0 3px #fff,\\n 0 0 4px #fff,\\n 0 0 4px #fff;\\n}\\n\\n.rs-counter-id {\\n font-weight: 300;\\n -webkit-box-ordinal-group: 0;\\n -webkit-order: 0;\\n order: 0;\\n width: 54px;\\n}\\n\\n.rs-counter-value {\\n font-weight: 300;\\n -webkit-box-ordinal-group: 1;\\n -webkit-order: 1;\\n order: 1;\\n text-align: right;\\n width: 35px;\\n}\\n\\n.rs-canvas {\\n -webkit-box-ordinal-group: 2;\\n -webkit-order: 2;\\n order: 2;\\n}\\n\\n@media (min-width: 480px) {\\n .rs-base {\\n left: 20px;\\n top: 20px;\\n }\\n}\\n\"],sourceRoot:\"\"}]);const a=o},6924:(e,t,n)=>{\"use strict\";n.r(t),n.d(t,{default:()=>g});var i=n(3379),r=n.n(i),s=n(7795),o=n.n(s),a=n(569),l=n.n(a),c=n(3565),h=n.n(c),u=n(9216),d=n.n(u),p=n(4589),A=n.n(p),f=n(1248),m={};m.styleTagTransform=A(),m.setAttributes=h(),m.insert=l().bind(null,\"head\"),m.domAPI=o(),m.insertStyleElement=d(),r()(f.Z,m);const g=f.Z&&f.Z.locals?f.Z.locals:void 0},1353:(e,t,n)=>{\"use strict\";n.r(t),n.d(t,{default:()=>g});var i=n(3379),r=n.n(i),s=n(7795),o=n.n(s),a=n(569),l=n.n(a),c=n(3565),h=n.n(c),u=n(9216),d=n.n(u),p=n(4589),A=n.n(p),f=n(7098),m={};m.styleTagTransform=A(),m.setAttributes=h(),m.insert=l().bind(null,\"head\"),m.domAPI=o(),m.insertStyleElement=d(),r()(f.Z,m);const g=f.Z&&f.Z.locals?f.Z.locals:void 0},3379:e=>{\"use strict\";var t=[];function n(e){for(var n=-1,i=0;i\u003Ct.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var s={},o=[],a=0;a\u003Ce.length;a++){var l=e[a],c=i.base?l[0]+i.base:l[0],h=s[c]||0,u=\"\".concat(c,\" \").concat(h);s[c]=h+1;var d=n(u),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var A=r(p,i);i.byIndex=a,t.splice(a,0,{identifier:u,updater:A,references:1})}o.push(u)}return o}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=i(e=e||[],r=r||{});return function(e){e=e||[];for(var o=0;o\u003Cs.length;o++){var a=n(s[o]);t[a].references--}for(var l=i(e,r),c=0;c\u003Cs.length;c++){var h=n(s[c]);0===t[h].references&&(t[h].updater(),t.splice(h,1))}s=l}}},569:e=>{\"use strict\";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");i.appendChild(n)}},9216:e=>{\"use strict\";e.exports=function(e){var t=document.createElement(\"style\");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{\"use strict\";e.exports=function(e){var t=n.nc;t&&e.setAttribute(\"nonce\",t)}},7795:e=>{\"use strict\";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i=\"\";n.supports&&(i+=\"@supports (\".concat(n.supports,\") {\")),n.media&&(i+=\"@media \".concat(n.media,\" {\"));var r=void 0!==n.layer;r&&(i+=\"@layer\".concat(n.layer.length>0?\" \".concat(n.layer):\"\",\" {\")),i+=n.css,r&&(i+=\"}\"),n.media&&(i+=\"}\"),n.supports&&(i+=\"}\");var s=n.sourceMap;s&&\"undefined\"!=typeof btoa&&(i+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s)))),\" */\")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{\"use strict\";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5059:e=>{\"use strict\";e.exports=\"data:image/svg+xml,%3C%3Fxml version=%271.0%27 encoding=%27UTF-8%27 standalone=%27no%27%3F%3E%3Csvg width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27 version=%271.1%27 id=%27svg320%27 sodipodi:docname=%27fullscreen-aframe.svg%27 xml:space=%27preserve%27 inkscape:version=%271.2.1 %289c6d41e 2022-07-14%29%27 xmlns:inkscape=%27http://www.inkscape.org/namespaces/inkscape%27 xmlns:sodipodi=%27http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:svg=%27http://www.w3.org/2000/svg%27 xmlns:rdf=%27http://www.w3.org/1999/02/22-rdf-syntax-ns%23%27 xmlns:cc=%27http://creativecommons.org/ns%23%27 xmlns:dc=%27http://purl.org/dc/elements/1.1/%27%3E%3Cdefs id=%27defs324%27 /%3E%3Csodipodi:namedview id=%27namedview322%27 pagecolor=%27%23ffffff%27 bordercolor=%27%23000000%27 borderopacity=%270.25%27 inkscape:showpageshadow=%272%27 inkscape:pageopacity=%270.0%27 inkscape:pagecheckerboard=%270%27 inkscape:deskcolor=%27%23d1d1d1%27 showgrid=%27false%27 inkscape:zoom=%273.8064516%27 inkscape:cx=%2791.423729%27 inkscape:cy=%27-1.4449153%27 inkscape:window-width=%271440%27 inkscape:window-height=%27847%27 inkscape:window-x=%2732%27 inkscape:window-y=%2725%27 inkscape:window-maximized=%270%27 inkscape:current-layer=%27svg320%27 /%3E%3Ctitle id=%27title312%27%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96 0H12A12 12 0 0 0 0 12V50A12 12 0 0 0 12 62H96a12 12 0 0 0 12-12V12A12 12 0 0 0 96 0Zm8 50a8 8 0 0 1-8 8H12a8 8 0 0 1-8-8V12a8 8 0 0 1 8-8H96a8 8 0 0 1 8 8Z%27 fill=%27%23fff%27 id=%27path314%27 style=%27fill:%23ffffff%27 /%3E%3Cg id=%27g356%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g358%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g360%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g362%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g364%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g366%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g368%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g370%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g372%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g374%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g376%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g378%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g380%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g382%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g384%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cmetadata id=%27metadata561%27%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=%27%27%3E%3Cdc:title%3Eaframe-armode-noborder-reduced-tracking%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cpath d=%27m 98.168511 40.083649 c 0 -1.303681 -0.998788 -2.358041 -2.239389 -2.358041 -1.230088 0.0031 -2.240892 1.05436 -2.240892 2.358041 v 4.881296 l -9.041661 -9.041662 c -0.874129 -0.875631 -2.288954 -0.875631 -3.16308 0 -0.874129 0.874126 -0.874129 2.293459 0 3.167585 l 8.995101 8.992101 h -4.858767 c -1.323206 0.0031 -2.389583 1.004796 -2.389583 2.239386 0 1.237598 1.066377 2.237888 2.389583 2.237888 h 10.154599 c 1.323206 0 2.388082 -0.998789 2.392587 -2.237888 -0.0044 -0.03305 -0.009 -0.05858 -0.0134 -0.09161 0.0046 -0.04207 0.0134 -0.08712 0.0134 -0.13066 V 40.085172 h -1.52e-4%27 id=%27path596%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 23.091002 35.921781 -9.026643 9.041662 v -4.881296 c 0 -1.303681 -1.009302 -2.355037 -2.242393 -2.358041 -1.237598 0 -2.237888 1.05436 -2.237888 2.358041 l -0.0031 10.016421 c 0 0.04356 0.01211 0.08862 0.0015 0.130659 -0.0031 0.03153 -0.009 0.05709 -0.01211 0.09161 0.0031 1.239099 1.069379 2.237888 2.391085 2.237888 h 10.156101 c 1.320202 0 2.388079 -1.000291 2.388079 -2.237888 0 -1.234591 -1.067877 -2.236383 -2.388079 -2.239387 h -4.858767 l 8.995101 -8.9921 c 0.871126 -0.874127 0.871126 -2.293459 0 -3.167586 -0.875628 -0.877132 -2.291957 -0.877132 -3.169087 -1.52e-4%27 id=%27path598%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 84.649572 25.978033 9.041662 -9.041664 v 4.881298 c 0 1.299176 1.010806 2.350532 2.240891 2.355037 1.240601 0 2.23939 -1.055861 2.23939 -2.355037 V 11.798242 c 0 -0.04356 -0.009 -0.08862 -0.0134 -0.127671 0.0044 -0.03153 0.009 -0.06157 0.0134 -0.09313 -0.0044 -1.240598 -1.069379 -2.2393873 -2.391085 -2.2393873 h -10.1546 c -1.323205 0 -2.38958 0.9987893 -2.38958 2.2393873 0 1.233091 1.066375 2.237887 2.38958 2.240891 h 4.858768 l -8.995102 8.9921 c -0.874129 0.872625 -0.874129 2.288954 0 3.161578 0.874127 0.880137 2.288951 0.880137 3.16308 1.5e-4%27 id=%27path600%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 17.264988 13.822853 h 4.857265 c 1.320202 -0.0031 2.388079 -1.0078 2.388079 -2.240889 0 -1.240601 -1.067877 -2.2393893 -2.388079 -2.2393893 H 11.967654 c -1.321707 0 -2.388082 0.9987883 -2.391085 2.2393893 0.0031 0.03153 0.009 0.06157 0.01211 0.09313 -0.0031 0.03905 -0.0015 0.08262 -0.0015 0.127671 l 0.0031 10.020926 c 0 1.299176 1.00029 2.355038 2.237887 2.355038 1.233092 -0.0044 2.242393 -1.055862 2.242393 -2.355038 v -4.881295 l 9.026644 9.041661 c 0.877132 0.878635 2.293459 0.878635 3.169087 0 0.871125 -0.872624 0.871125 -2.288953 0 -3.161577 l -8.995282 -8.993616%27 id=%27path602%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3C/svg%3E\"},7513:e=>{\"use strict\";e.exports=\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z%27 fill=%27%23fff%27/%3E%3C/svg%3E\"},3646:e=>{\"use strict\";e.exports=\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z%27 fill=%27%23fff%27/%3E%3C/svg%3E\"},5581:e=>{\"use strict\";e.exports=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E\"},576:e=>{\"use strict\";e.exports=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E\"},4147:e=>{\"use strict\";e.exports=JSON.parse('{\"name\":\"aframe\",\"version\":\"1.4.0\",\"description\":\"A web framework for building virtual reality experiences.\",\"homepage\":\"https://aframe.io/\",\"main\":\"dist/aframe-master.js\",\"scripts\":{\"dev\":\"cross-env INSPECTOR_VERSION=dev webpack serve --port 8080\",\"dist\":\"node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max\",\"dist:max\":\"webpack --config webpack.config.js\",\"dist:min\":\"webpack --config webpack.prod.config.js\",\"docs\":\"markserv --dir docs --port 9001\",\"preghpages\":\"node ./scripts/preghpages.js\",\"ghpages\":\"ghpages -p gh-pages/\",\"lint\":\"semistandard -v | snazzy\",\"lint:fix\":\"semistandard --fix\",\"precommit\":\"npm run lint\",\"prepush\":\"node scripts/testOnlyCheck.js\",\"prerelease\":\"node scripts/release.js 1.3.0 1.4.0\",\"start\":\"npm run dev\",\"start:https\":\"npm run dev -- --server-type https\",\"test\":\"karma start ./tests/karma.conf.js\",\"test:docs\":\"node scripts/docsLint.js\",\"test:firefox\":\"npm test -- --browsers Firefox\",\"test:chrome\":\"npm test -- --browsers Chrome\",\"test:nobrowser\":\"NO_BROWSER=true npm test\",\"test:node\":\"mocha --ui tdd tests/node\"},\"repository\":\"aframevr/aframe\",\"license\":\"MIT\",\"files\":[\"dist/*\",\"docs/**/*\",\"src/**/*\",\"vendor/**/*\"],\"dependencies\":{\"buffer\":\"^6.0.3\",\"custom-event-polyfill\":\"^1.0.6\",\"debug\":\"ngokevin/debug#noTimestamp\",\"deep-assign\":\"^2.0.0\",\"@ungap/custom-elements\":\"^1.1.0\",\"load-bmfont\":\"^1.2.3\",\"object-assign\":\"^4.0.1\",\"present\":\"0.0.6\",\"promise-polyfill\":\"^3.1.0\",\"super-animejs\":\"^3.1.0\",\"super-three\":\"^0.147.0\",\"three-bmfont-text\":\"dmarcos/three-bmfont-text#21d017046216e318362c48abd1a48bddfb6e0733\",\"webvr-polyfill\":\"^0.10.12\"},\"devDependencies\":{\"@babel/core\":\"^7.17.10\",\"babel-loader\":\"^8.2.5\",\"babel-plugin-istanbul\":\"^6.1.1\",\"chai\":\"^4.3.6\",\"chai-shallow-deep-equal\":\"^1.4.0\",\"chalk\":\"^1.1.3\",\"cross-env\":\"^7.0.3\",\"css-loader\":\"^6.7.1\",\"ghpages\":\"0.0.8\",\"git-rev\":\"^0.2.1\",\"glob\":\"^8.0.3\",\"husky\":\"^0.11.7\",\"jsdom\":\"^20.0.0\",\"karma\":\"^6.4.0\",\"karma-chai-shallow-deep-equal\":\"0.0.4\",\"karma-chrome-launcher\":\"^3.1.1\",\"karma-coverage\":\"^2.2.0\",\"karma-env-preprocessor\":\"^0.1.1\",\"karma-firefox-launcher\":\"^2.1.2\",\"karma-mocha\":\"^2.0.1\",\"karma-mocha-reporter\":\"^2.2.5\",\"karma-sinon-chai\":\"^2.0.2\",\"karma-webpack\":\"^5.0.0\",\"markserv\":\"github:sukima/markserv#feature/fix-broken-websoketio-link\",\"mocha\":\"^10.0.0\",\"replace-in-file\":\"^2.5.3\",\"semistandard\":\"^9.0.0\",\"shelljs\":\"^0.7.7\",\"shx\":\"^0.2.2\",\"sinon\":\"\u003C12.0.0\",\"sinon-chai\":\"^3.7.0\",\"snazzy\":\"^5.0.0\",\"style-loader\":\"^3.3.1\",\"too-wordy\":\"ngokevin/too-wordy\",\"webpack\":\"^5.73.0\",\"webpack-cli\":\"^4.10.0\",\"webpack-dev-server\":\"^4.11.0\",\"webpack-merge\":\"^5.8.0\",\"write-good\":\"^1.0.8\"},\"link\":true,\"semistandard\":{\"ignore\":[\"build/**\",\"dist/**\",\"examples/**/shaders/*.js\",\"**/vendor/**\"]},\"keywords\":[\"3d\",\"aframe\",\"cardboard\",\"components\",\"oculus\",\"three\",\"three.js\",\"rift\",\"vive\",\"vr\",\"web-components\",\"webvr\"],\"engines\":{\"node\":\">= 4.6.0\",\"npm\":\">= 2.15.9\"}}')}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={id:i,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.exports}return n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.b=document.baseURI||self.location.href,n.nc=void 0,n(5579)})()));\n\u003C/script>","tags":"$:/tags/RawMarkup","title":"$:/webxr-notebook/aframe.min.js","modified":"20230426064613869"}, -{"created":"20230423163601005","text":".nc-sidebar h1.tc-site-title {\n margin: 0;\n text-indent: 113px;\n font-size: 15px !important;\n vertical-align: bottom;\n display: block;\n margin-top: 11px;\n}\n\nh1.tc-site-title::before {\n display: block;\n position: absolute;\n content: \"\";\n width: 99px;\n height: 100px;\n background: url(./../example/assets/logo.png) no-repeat;\n background-size: contain;\n transform: translate(0px,-11px);\n}\n\n.nc-sidebar .section.open .label {\n background: linear-gradient(45deg,#7f4bca, #08F, #7f4bca)\n}\n\nbody.tc-body,\n.nc-bar.nc-topbar{\n background: #f0eef5\n}\n\ndiv.tc-tiddler-frame{\n box-shadow:none;\n}\n\n.tc-site-title {\n color: #0a81FF;\n}\n\n.tc-story-river{\n width:80% !important;\n} \n\na,\na:visited,\na:focus-visible{\n color:#0a81FF\n}\na:hover{\n opacity:0.8;\n}\n\n\n.nc-sidebar{\n box-shadow: 0px 0px 15px #0006;\n}\n\n.tc-tiddler-preview-preview iframe{\n width:100%;\n height:50vh;\n max-height:380px;\n}\n\n.tc-tiddler-preview-preview {\n border:none;\n overflow-y:auto;\n}\n\n@media only screen and (max-width: 500px) {\n .tc-tiddler-body > embed, \n .tc-tiddler-body > iframe {\n max-height:300px;\n }\n}\n\n\n.tc-tiddler-body, iframe{\n border-radius:7px;\n}\n\n.nc-bar input[type=\"search\"]{\n background:#0006;\n}\n\n.CodeMirror {\n font-size:12px;\n}\n\nshader-doodle,\n.scene{\n width:100%;\n height:50vh; \n max-height:365px;\n}\n\n.scene canvas {\n border-radius:6px;\n}\n\n.scene pre {\n margin-top:0;\n}\n\ntextarea.sandboxify,\npre.result {\n width: 40%;\n max-width: 500px;\n min-width: 350px;\n display: inline-block;\n font-size: 12px;\n display: inline-block;\n box-sizing: content-box;\n}\n\ntextarea.sandboxify {\n padding-left: 5px;\n font-family: \"Fira Mono\",\"Liberation Mono\",Menlo,Courier,monospace;\n color: #ddddff;\n background: #333;\n border-radius: 6px;\n vertical-align: top;\n min-height: 50px;\n margin-right: 20px;\n margin-bottom: 35px;\n \n}\n\npre.result {\n background: #000a;\n color: #ccc;\n margin: 0;\n border: 0;\n padding: 5px;\n border-radius: 0px 6px 6px 6px;\n vertical-align: top;\n padding-left: 13px;\n}\n\npre.result::before {\n display: block;\n position: absolute;\n width: 51px;\n height: 20px;\n background: #FFF;\n content: \"output\";\n transform: translate(-13px,-25px);\n color: #FFFF;\n background: #000a;\n text-indent: 5px;\n border-radius: 4px 4px 0px 0px;\n font-weight: bold;\n font-size: 11px;\n}\n\n","tags":"$:/tags/Stylesheet","title":"$:/webxr-notebook/boot.css","modified":"20230427153453982","type":"text/css"}, +{"created":"20230423163601005","text":".nc-sidebar h1.tc-site-title {\n margin: 0;\n text-indent: 113px;\n font-size: 15px !important;\n vertical-align: bottom;\n display: block;\n margin-top: 11px;\n}\n\nh1.tc-site-title::before {\n display: block;\n position: absolute;\n content: \"\";\n width: 99px;\n height: 100px;\n background: url(./../example/assets/logo.png) no-repeat;\n background-size: contain;\n transform: translate(0px,-11px);\n}\n\n.nc-sidebar .section.open .label {\n background: linear-gradient(45deg,#7f4bca, #08F, #7f4bca)\n}\n\nbody.tc-body,\n.nc-bar.nc-topbar{\n background: #f0eef5\n}\n\n.tc-site-title {\n color: #0a81FF;\n}\n\n.tc-story-river{\n width:80% !important;\n} \n\na,\na:visited,\na:focus-visible{\n color:#0a81FF\n}\na:hover{\n opacity:0.8;\n}\n\n\n.nc-sidebar{\n box-shadow: 0px 0px 15px #0006;\n}\n\n.tc-tiddler-preview-preview iframe{\n width:100%;\n height:50vh;\n max-height:380px;\n}\n\n.tc-tiddler-preview-preview {\n border:none;\n overflow-y:auto;\n}\n\n@media only screen and (max-width: 500px) {\n .tc-tiddler-body > embed, \n .tc-tiddler-body > iframe {\n max-height:300px;\n }\n}\n\n\n.tc-tiddler-body, iframe{\n border-radius:7px;\n}\n\n.nc-bar input[type=\"search\"]{\n background:#0006;\n}\n\n.CodeMirror {\n font-size:12px;\n}\n\nshader-doodle,\n.scene{\n width:100%;\n height:50vh; \n max-height:365px;\n}\n\n.scene canvas {\n border-radius:6px;\n}\n\n.scene pre {\n margin-top:0;\n}\n\ntextarea.sandboxify,\npre.result {\n width: 40%;\n max-width: 500px;\n min-width: 350px;\n display: inline-block;\n font-size: 12px;\n display: inline-block;\n box-sizing: content-box;\n}\n\ntextarea.sandboxify {\n padding-left: 5px;\n font-family: \"Fira Mono\",\"Liberation Mono\",Menlo,Courier,monospace;\n color: #ddddff;\n background: #333;\n border-radius: 6px;\n vertical-align: top;\n min-height: 50px;\n margin-right: 20px;\n margin-bottom: 35px;\n \n}\n\npre.result {\n background: #000a;\n color: #ccc;\n margin: 0;\n border: 0;\n padding: 5px;\n border-radius: 0px 6px 6px 6px;\n vertical-align: top;\n padding-left: 13px;\n}\n\npre.result::before {\n display: block;\n position: absolute;\n width: 51px;\n height: 20px;\n background: #FFF;\n content: \"output\";\n transform: translate(-13px,-25px);\n color: #FFFF;\n background: #000a;\n text-indent: 5px;\n border-radius: 4px 4px 0px 0px;\n font-weight: bold;\n font-size: 11px;\n}\n\n","tags":"$:/tags/Stylesheet","title":"$:/webxr-notebook/boot.css","modified":"20230427153604944","type":"text/css"}, {"created":"20230425145424360","text":"\u003Cscript>\nwindow.onerror=null\nif( typeof $tw != 'undefined' ) $tw.config.htmlUnsafeElements = [];\n\u003C/script>\n\n\u003C!-- browser console -->\n\u003Cscript>\n(function(){\n\t$ = (s) => document.querySelector(s)\n\twindow.errcolor = '#000c'\n let isLocalHost = () => document.location.hostname == 'localhost'\n\n if( !isLocalHost() ){\n\t\tdocument.querySelectorAll('.nc-sidebar button').forEach( (b) => {\n\t\tif( String(b.innerText).match(/(Open|Recent|Tools|More)/) )\n\t\t\t\tb.parentElement.parentElement.style.visibility = 'hidden'\n\t\t})\n }\n\n\n\twindow.log = (str,line,bgcolor) => {\n\t\tline = line || 0\n\t\t$scene = $('.scene')\n\t\t$console = $('.console')\n\t\tif( !$scene ) return;\n\t\t$scene.style.position = 'relative'\n\t\tif( !$console ){\n\t\t\tlet el = $console = document.createElement(\"pre\")\n\t\t\tel.className = \"console\"\n\t\t\tel.style.position = 'absolute';\n\t\t\tel.style.top = el.style.left = el.style.bottom = el.style.right = '0'\n\t\t\tel.style.zIndex = 1000;\n\t\t\tel.style.fontSize = '12px'\n\t\t\tel.style.padding = '10px'\n\t\t\tel.style.color = '#0CF'\n\t\t\tel.style.pointerEvents = 'none'\n\t\t\t$scene.appendChild($console)\n\t\t}\n\t\t$console.style.background = bgcolor ? bgcolor : 'transparent'\n\t\tlet lines = String($console.innerHTML).split(\"\\n\")\n\t\t\tlines[line] = str\n\t\t$console.innerHTML = lines.join(\"\\n\")\n\t}\n\n\tvar error = (event, source, lineno, colno, error) => {\n\t\tlog(lineno+\":\"+colno+\" \"+error, errcolor)\n\t}\n\twindow.onerror = log\n\tconsole.error = (s) => log(\"error: \"+s.toString(),errcolor)\n\n})()\n\u003C/script>\n\n\u003C!-- PWA service worker -->\n\u003Cscript>\n(function(){\n let isLocalHost = () => document.location.hostname == 'localhost'\n\n\t\t\tconst registerServiceWorker = async () => {\n if( isLocalHost() ) return\n\t\t\t\tif ('serviceWorker' in navigator) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst registration = await navigator.serviceWorker.register(\n\t\t\t\t\t\t\t\"./sw.js\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscope: './',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (registration.installing) {\n\t\t\t\t\t\t\tconsole.log('Service worker installing');\n\t\t\t\t\t\t} else if (registration.waiting) {\n\t\t\t\t\t\t\tconsole.log('Service worker installed');\n\t\t\t\t\t\t} else if (registration.active) {\n\t\t\t\t\t\t\tconsole.log('Service worker active');\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error(\"Registration failed with \"+error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n if (document.readyState === 'complete') registerServiceWorker();\n else document.addEventListener(\"DOMContentLoaded\", registerServiceWorker);\n\n if ( !isLocalHost() && \"serviceWorker\" in navigator) { \n window.addEventListener(\"load\", async () => {\n try {\n const registration = await navigator.serviceWorker.register(\"./sw.js\");\n } catch (e) { console.error(e) }\n });\n window.addEventListener(\"beforeinstallprompt\", function (e) {\n e.userChoice.then(function (choiceResult) {\n if (choiceResult.outcome == \"dismissed\") {\n console.log(\"User cancelled home screen install\");\n } else console.log(\"User added to home screen\");\n });\n });\n }\n\t\t\t\n})()\n\u003C/script>","tags":"$:/tags/RawMarkup","title":"$:/webxr-notebook/boot.html","modified":"20230427152609352"}, {"created":"20230427081708927","text":"\u003C!-- sandboxify textareas with class 'sandboxify' -->\n\u003Cscript>\n\nfunction sandboxify() { \n let run = (t) => {\n let $res = t.parentElement.children[1]\n function log(res){\n $res.innerHTML = typeof res == 'string' ? res : JSON.stringify(res,null,2)\n }\n let _log = console.log\n console.log = log\n try{\n eval(t.value); \n }catch(e){ log(e) }finally{ console.log = _log }\n } \n const textareas = document.querySelectorAll(\"textarea.sandboxify\");\n textareas.forEach(t => {\n t.addEventListener(\"input\", function (event) {\n try {\n run(t)\n } catch (error) {\n console.error(error);\n }\n });\n run(t)\n }); \n}\n\n// call sandboxify once on page load\nsandboxify();\n\n// set up a MutationObserver to call sandboxify on any new textareas added to the DOM\nconst observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.addedNodes && mutation.addedNodes.length > 0) {\n const addedNodes = mutation.addedNodes;\n addedNodes.forEach(addedNode => {\n if (addedNode.tagName === \"TEXTAREA\" && addedNode.classList.contains(\"sandboxify\")) {\n sandboxify();\n }\n });\n }\n });\n});\n\nobserver.observe(document, { childList: true, subtree: true });\n\u003C/script>","tags":"$:/tags/RawMarkup","title":"$:/webxr-notebook/sandboxify.js","modified":"20230427090041916"}, {"created":"20230427072514129","text":"\u003C!-- scriptie-talkie-embed.js -->\n\u003Cscript>\n\n(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=\"function\"==typeof require&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw Error(\"Cannot find module '\"+n+\"'\")}var u=t[n]={exports:{}};e[n][0](function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}for(var r=\"function\"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i})({1:[function(require){\"use strict\";var scriptieTalkieEmbed=require(\"../../\");scriptieTalkieEmbed()},{\"../../\":2}],3:[function(require,module,exports){\"use strict\";module.exports=function(textarea){var opts={},data=textarea.getAttribute(\"data-scriptie-talkie\");if(!data)return opts;try{opts=eval(\"(\"+data+\")\")}catch(e){console.error(e)}finally{return opts}}},{}],4:[function(require,module){\"use strict\";function trimEmpty(lines){for(;lines.length&&!lines[0].trim().length;)lines.shift();for(;lines.length&&!lines[lines.length-1].trim().length;)lines.length--}function leftAlign(lines){var indent=-1;if(lines.filter(function(line){return line.trim().length}).forEach(function(line){for(var lineIndent=0,col=0;\" \"===line.charAt(col++);)lineIndent++;indent=-1===indent?lineIndent:Math.min(indent,lineIndent)}),!indent)return lines;for(var i=0;lines.length>i;i++)lines[i]=lines[i].slice(indent)}module.exports=function(textarea,addRows){addRows=addRows||0;var lines=textarea.textContent.split(\"\\n\");return trimEmpty(lines),leftAlign(lines),textarea.rows=Math.max(lines.length+addRows,1),textarea.textContent=lines.join(\"\\n\"),lines}},{}],5:[function(require,module){\"use strict\";function replaceElement(replaceEl,withEl){replaceEl.parentNode.replaceChild(withEl,replaceEl)}var format=require(\"util\").format;module.exports=function(textarea,opts){opts=opts||{};var minHeight=opts.minHeight||150,maxHeight=opts.maxHeight||600,minWidth=opts.minWidth||600,textareaWidth=textarea.clientWidth,width=Math.max(minWidth,textareaWidth),height=textarea.clientHeight+50;height=Math.max(minHeight,height),height=Math.min(maxHeight,height);var container=document.createElement(\"div\");return container.setAttribute(\"class\",\"scriptie-talkie-container\"),container.setAttribute(\"style\",format(\"width: %spx; height: %spx\",width,height)),replaceElement(textarea,container),container}},{util:6}],7:[function(require,module){\"use strict\";module.exports=function(container){var link=document.createElement(\"a\");return link.setAttribute(\"class\",\"scriptie-talkie-link\"),window.link=link,container.appendChild(link),link.textContent=\"full view\",link}},{}],8:[function(require,module){\"use script\";module.exports=function(){var head=document.getElementsByTagName(\"head\")[0],style=document.createElement(\"style\");style.type=\"text/css\",style.styleSheet?style.styleSheet.cssText=css:style.appendChild(document.createTextNode(css)),head.appendChild(style)};var css=[\"textarea.scriptie-talkie {\",\" visibility: hidden;\",\" display : block;\",\"}\",\".scriptie-talkie-container {\",\" position: relative; \",\" margin: 10px 0px;\",\"}\",\".scriptie-talkie-editor,\",\".scriptie-talkie-terminal {\",\" position: absolute;\",\" top: 0;\",\" bottom: 0;\",\" height: 100%;\",\" width: 50%;\",\"}\",\".scriptie-talkie-editor {\",\" left: 0;\",\" right: 50%;\",\"}\",\".scriptie-talkie-link {\",\" position : absolute;\",\" bottom : 1px;\",\" right : 4px;\",\" font-size : 14px;\",\" color : yellowgreen;\",\" z-index : 1;\",\"}\",\"textarea.scriptie-talkie, \",\".scriptie-talkie-terminal,\",\".scriptie-talkie-editor {\",\" /* text area needs same font to determine editor size correctly */\",\" font-size : 14px;\",\" font-family : Terminus,Consolas,Profont,Monaco,Inconsolata,Inconsolata-g,\",' Unifont,Lime,\"ClearlyU PUA\",Clean,\"DejaVu Sans Mono\",\"Lucida Console\",',' \"Bitstream Vera Sans Mono\",Freemono,\"Liberation Mono\",Dina,Anka,Droid Sans Mono,',' Anonymous Pro,Proggy fonts,Envy Code R,Gamow,Courier,\"Courier New\",Terminal,monospace;',\"}\",\".scriptie-talkie-terminal {\",\" background : black;\",\" right: 0;\",\" left: 50%;\",\" overflow: auto\",\"}\",\"/* tweak the ace editor a bit since we will never have >99 lines and need to save space */\",\".scriptie-talkie-editor .ace_gutter-cell ,\",\".scriptie-talkie-editor .ace_folding-enabled > .ace_gutter-cell { \",\" padding-left: 20px;\",\" padding-right: 5px;\",\"}\"].join(\"\\n\")},{}],9:[function(require,module){\"use strict\";var qs=require(\"querystring\"),scriptieTalkieUrl=\"http://thlorenz.github.io/scriptie-talkie\";module.exports=function(code){return scriptieTalkieUrl+\"?\"+qs.stringify({code:code})}},{querystring:10}],2:[function(require,module){\"use strict\";function harvest(scripties){for(var textarea,res=[],len=scripties.length,i=0;len>i;i++)textarea=scripties.item(i),res.push(textarea);return res}function sizeTerminalToRowsAndAdjust(container,lines){var evaluatedLines=evaluateScript(lines.join(\"\\n\")),term=createTerminal(container,{lines:evaluatedLines});return container.style.height=term.height+\"px\",term}function talkify(textareas){loadStyles(),textareas.forEach(function(textarea){function evaluate(){var code=editor.getValue();terminal.reset(),link.setAttribute(\"href\",linkTo(code)),evaluateScript(code,terminal.writeln.bind(terminal))}var term,lines=prepareTextarea(textarea,-3),config=getTextareaConfig(textarea),container=createContainer(textarea),link=createLink(container);term=config.sizeToEditor?createTerminal(container):sizeTerminalToRowsAndAdjust(container,lines);var edit=createEditor(container,textarea.textContent,config),terminal=term.terminal,editor=edit.editor;editor.on(\"change\",debounce(evaluate,400,!1)),editor.clearSelection(),evaluate()})}var debounce=require(\"debounce\"),getTextareaConfig=require(\"./lib/get-textarea-config\"),prepareTextarea=require(\"./lib/prepare-textarea\"),createContainer=require(\"./lib/create-container\"),createEditor=require(\"./lib/create-editor\"),createTerminal=require(\"./lib/create-terminal\"),createLink=require(\"./lib/create-link\"),evaluateScript=require(\"./lib/evaluate-script\"),loadStyles=require(\"./lib/load-styles\"),linkTo=require(\"./lib/link-to\");module.exports=function(){var wantScripties=document.getElementsByClassName(\"scriptie-talkie\"),textareas=harvest(wantScripties);textareas.length&&talkify(textareas)},window.scriptieTalkieEmbed=module.exports},{\"./lib/get-textarea-config\":3,\"./lib/prepare-textarea\":4,\"./lib/create-container\":5,\"./lib/create-editor\":11,\"./lib/create-terminal\":12,\"./lib/create-link\":7,\"./lib/evaluate-script\":13,\"./lib/load-styles\":8,\"./lib/link-to\":9,debounce:14}],6:[function(require,module,exports){function isArray(ar){return ar instanceof Array||Array.isArray(ar)||ar&&ar!==Object.prototype&&isArray(ar.__proto__)}function isRegExp(re){return re instanceof RegExp||\"object\"==typeof re&&\"[object RegExp]\"===Object.prototype.toString.call(re)}function isDate(d){if(d instanceof Date)return!0;if(\"object\"!=typeof d)return!1;var properties=Date.prototype&&Object_getOwnPropertyNames(Date.prototype),proto=d.__proto__&&Object_getOwnPropertyNames(d.__proto__);return JSON.stringify(proto)===JSON.stringify(properties)}require(\"events\"),exports.isArray=isArray,exports.isDate=function(obj){return\"[object Date]\"===Object.prototype.toString.call(obj)},exports.isRegExp=function(obj){return\"[object RegExp]\"===Object.prototype.toString.call(obj)},exports.print=function(){},exports.puts=function(){},exports.debug=function(){},exports.inspect=function(obj,showHidden,depth,colors){function format(value,recurseTimes){if(value&&\"function\"==typeof value.inspect&&value!==exports&&(!value.constructor||value.constructor.prototype!==value))return value.inspect(recurseTimes);switch(typeof value){case\"undefined\":return stylize(\"undefined\",\"undefined\");case\"string\":var simple=\"'\"+JSON.stringify(value).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return stylize(simple,\"string\");case\"number\":return stylize(\"\"+value,\"number\");case\"boolean\":return stylize(\"\"+value,\"boolean\")}if(null===value)return stylize(\"null\",\"null\");var visible_keys=Object_keys(value),keys=showHidden?Object_getOwnPropertyNames(value):visible_keys;if(\"function\"==typeof value&&0===keys.length){if(isRegExp(value))return stylize(\"\"+value,\"regexp\");var name=value.name?\": \"+value.name:\"\";return stylize(\"[Function\"+name+\"]\",\"special\")}if(isDate(value)&&0===keys.length)return stylize(value.toUTCString(),\"date\");var base,type,braces;if(isArray(value)?(type=\"Array\",braces=[\"[\",\"]\"]):(type=\"Object\",braces=[\"{\",\"}\"]),\"function\"==typeof value){var n=value.name?\": \"+value.name:\"\";base=isRegExp(value)?\" \"+value:\" [Function\"+n+\"]\"}else base=\"\";if(isDate(value)&&(base=\" \"+value.toUTCString()),0===keys.length)return braces[0]+base+braces[1];if(0>recurseTimes)return isRegExp(value)?stylize(\"\"+value,\"regexp\"):stylize(\"[Object]\",\"special\");seen.push(value);var output=keys.map(function(key){var name,str;if(value.__lookupGetter__&&(value.__lookupGetter__(key)?str=value.__lookupSetter__(key)?stylize(\"[Getter/Setter]\",\"special\"):stylize(\"[Getter]\",\"special\"):value.__lookupSetter__(key)&&(str=stylize(\"[Setter]\",\"special\"))),0>visible_keys.indexOf(key)&&(name=\"[\"+key+\"]\"),str||(0>seen.indexOf(value[key])?(str=null===recurseTimes?format(value[key]):format(value[key],recurseTimes-1),str.indexOf(\"\\n\")>-1&&(str=isArray(value)?str.split(\"\\n\").map(function(line){return\" \"+line}).join(\"\\n\").substr(2):\"\\n\"+str.split(\"\\n\").map(function(line){return\" \"+line}).join(\"\\n\"))):str=stylize(\"[Circular]\",\"special\")),name===void 0){if(\"Array\"===type&&key.match(/^\\d+$/))return str;name=JSON.stringify(\"\"+key),name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(name=name.substr(1,name.length-2),name=stylize(name,\"name\")):(name=name.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),name=stylize(name,\"string\"))}return name+\": \"+str});seen.pop();var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf(\"\\n\")>=0&&numLinesEst++,prev+cur.length+1},0);return output=length>50?braces[0]+(\"\"===base?\"\":base+\"\\n \")+\" \"+output.join(\",\\n \")+\" \"+braces[1]:braces[0]+base+\" \"+output.join(\", \")+\" \"+braces[1]}var seen=[],stylize=function(str,styleType){var styles={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},style={special:\"cyan\",number:\"blue\",\"boolean\":\"yellow\",undefined:\"grey\",\"null\":\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"}[styleType];return style?\"\u001b[\"+styles[style][0]+\"m\"+str+\"\u001b[\"+styles[style][1]+\"m\":str};return colors||(stylize=function(str){return str}),format(obj,depth===void 0?2:depth)},exports.log=function(){},exports.pump=null;var Object_keys=Object.keys||function(obj){var res=[];for(var key in obj)res.push(key);return res},Object_getOwnPropertyNames=Object.getOwnPropertyNames||function(obj){var res=[];for(var key in obj)Object.hasOwnProperty.call(obj,key)&&res.push(key);return res},Object_create=Object.create||function(prototype,properties){var object;if(null===prototype)object={__proto__:null};else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return properties!==void 0&&Object.defineProperties&&Object.defineProperties(object,properties),object};exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object_create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})};var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(\"string\"!=typeof f){for(var objects=[],i=0;arguments.length>i;i++)objects.push(exports.inspect(arguments[i]));return objects.join(\" \")}for(var i=1,args=arguments,len=args.length,str=(f+\"\").replace(formatRegExp,function(x){if(\"%%\"===x)return\"%\";if(i>=len)return x;switch(x){case\"%s\":return args[i++]+\"\";case\"%d\":return Number(args[i++]);case\"%j\":return JSON.stringify(args[i++]);default:return x}}),x=args[i];len>i;x=args[++i])str+=null===x||\"object\"!=typeof x?\" \"+x:\" \"+exports.inspect(x);return str}},{events:15}],10:[function(require,module,exports){function stringifyString(str,prefix){if(!prefix)throw new TypeError(\"stringify expects an object\");return prefix+\"=\"+encodeURIComponent(str)}function stringifyArray(arr,prefix){var ret=[];if(!prefix)throw new TypeError(\"stringify expects an object\");for(var i=0;arr.length>i;i++)ret.push(stringify(arr[i],prefix+\"[]\"));return ret.join(\"&\")}function stringifyObject(obj,prefix){for(var key,ret=[],keys=objectKeys(obj),i=0,len=keys.length;len>i;++i)key=keys[i],ret.push(stringify(obj[key],prefix?prefix+\"[\"+encodeURIComponent(key)+\"]\":encodeURIComponent(key)));return ret.join(\"&\")}function set(obj,key,val){var v=obj[key];void 0===v?obj[key]=val:isArray(v)?v.push(val):obj[key]=[v,val]}function lastBraceInKey(str){for(var brace,c,len=str.length,i=0;len>i;++i)if(c=str[i],\"]\"==c&&(brace=!1),\"[\"==c&&(brace=!0),\"=\"==c&&!brace)return i}var isArray=\"function\"==typeof Array.isArray?Array.isArray:function(xs){return\"[object Array]\"===Object.prototype.toString.call(xs)},objectKeys=Object.keys||function objectKeys(object){if(object!==Object(object))throw new TypeError(\"Invalid object\");var keys=[];for(var key in object)object.hasOwnProperty(key)&&(keys[keys.length]=key);return keys};exports.version=\"0.3.1\";var toString=Object.prototype.toString,notint=/[^0-9]/;exports.parse=function(str){function promote(parent,key){if(0==parent[key].length)return parent[key]={};var t={};for(var i in parent[key])t[i]=parent[key][i];return parent[key]=t,t}return null==str||\"\"==str?{}:(str+\"\").split(\"&\").reduce(function(ret,pair){function parse(parts,parent,key){var part=parts.shift();part?(obj=parent[key]=parent[key]||[],\"]\"==part?isArray(obj)?\"\"!=val&&obj.push(val):\"object\"==typeof obj?obj[objectKeys(obj).length]=val:obj=parent[key]=[parent[key],val]:~part.indexOf(\"]\")?(part=part.substr(0,part.length-1),notint.test(part)&&isArray(obj)&&(obj=promote(parent,key)),parse(parts,obj,part)):(notint.test(part)&&isArray(obj)&&(obj=promote(parent,key)),parse(parts,obj,part))):isArray(parent[key])?parent[key].push(val):parent[key]=\"object\"==typeof parent[key]?val:parent[key]===void 0?val:[parent[key],val]}try{pair=decodeURIComponent(pair.replace(/\\+/g,\" \"))}catch(e){}var eql=pair.indexOf(\"=\"),brace=lastBraceInKey(pair),key=pair.substr(0,brace||eql),val=pair.substr(brace||eql,pair.length),val=val.substr(val.indexOf(\"=\")+1,val.length),parent=ret;if(\"\"==key&&(key=pair,val=\"\"),~key.indexOf(\"]\")){var parts=key.split(\"[\");parts.length,parse(parts,parent,\"base\")}else{if(notint.test(key)&&isArray(parent.base)){var t={};for(var k in parent.base)t[k]=parent.base[k];parent.base=t}set(parent.base,key,val)}return ret},{base:{}}).base};var stringify=exports.stringify=function(obj,prefix){return isArray(obj)?stringifyArray(obj,prefix):\"[object Object]\"==toString.call(obj)?stringifyObject(obj,prefix):\"string\"==typeof obj?stringifyString(obj,prefix):prefix}},{}],14:[function(require,module){module.exports=function(func,threshold,execAsap){var timeout;return!1!==execAsap&&(execAsap=!0),function(){function delayed(){execAsap||func.apply(obj,args),timeout=null}var obj=this,args=arguments;timeout?clearTimeout(timeout):execAsap&&func.apply(obj,args),timeout=setTimeout(delayed,threshold||100)}}},{}],16:[function(require,module){var process=module.exports={};process.nextTick=function(){var canSetImmediate=\"undefined\"!=typeof window&&window.setImmediate,canPost=\"undefined\"!=typeof window&&window.postMessage&&window.addEventListener;if(canSetImmediate)return function(f){return window.setImmediate(f)};if(canPost){var queue=[];return window.addEventListener(\"message\",function(ev){if(ev.source===window&&\"process-tick\"===ev.data&&(ev.stopPropagation(),queue.length>0)){var fn=queue.shift();fn()}},!0),function(fn){queue.push(fn),window.postMessage(\"process-tick\",\"*\")}}return function(fn){setTimeout(fn,0)}}(),process.title=\"browser\",process.browser=!0,process.env={},process.argv=[],process.binding=function(){throw Error(\"process.binding is not supported\")},process.cwd=function(){return\"/\"},process.chdir=function(){throw Error(\"process.chdir is not supported\")}},{}],15:[function(require,module,exports){(function(process){function indexOf(xs,x){if(xs.indexOf)return xs.indexOf(x);for(var i=0;xs.length>i;i++)if(x===xs[i])return i;return-1}process.EventEmitter||(process.EventEmitter=function(){});var EventEmitter=exports.EventEmitter=process.EventEmitter,isArray=\"function\"==typeof Array.isArray?Array.isArray:function(xs){return\"[object Array]\"===Object.prototype.toString.call(xs)},defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){this._events||(this._events={}),this._events.maxListeners=n},EventEmitter.prototype.emit=function(type){if(\"error\"===type&&(!this._events||!this._events.error||isArray(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error(\"Uncaught, unspecified 'error' event.\");if(!this._events)return!1;var handler=this._events[type];if(!handler)return!1;if(\"function\"==typeof handler){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:var args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}return!0}if(isArray(handler)){for(var args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),i=0,l=listeners.length;l>i;i++)listeners[i].apply(this,args);return!0}return!1},EventEmitter.prototype.addListener=function(type,listener){if(\"function\"!=typeof listener)throw Error(\"addListener only takes instances of Function\");if(this._events||(this._events={}),this.emit(\"newListener\",type,listener),this._events[type])if(isArray(this._events[type])){if(!this._events[type].warned){var m;m=void 0!==this._events.maxListeners?this._events.maxListeners:defaultMaxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[type].length),console.trace())}this._events[type].push(listener)}else this._events[type]=[this._events[type],listener];else this._events[type]=listener;return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){var self=this;return self.on(type,function g(){self.removeListener(type,g),listener.apply(this,arguments)}),this},EventEmitter.prototype.removeListener=function(type,listener){if(\"function\"!=typeof listener)throw Error(\"removeListener only takes instances of Function\");if(!this._events||!this._events[type])return this;var list=this._events[type];if(isArray(list)){var i=indexOf(list,listener);if(0>i)return this;list.splice(i,1),0==list.length&&delete this._events[type]}else this._events[type]===listener&&delete this._events[type];return this},EventEmitter.prototype.removeAllListeners=function(type){return 0===arguments.length?(this._events={},this):(type&&this._events&&this._events[type]&&(this._events[type]=null),this)},EventEmitter.prototype.listeners=function(type){return this._events||(this._events={}),this._events[type]||(this._events[type]=[]),isArray(this._events[type])||(this._events[type]=[this._events[type]]),this._events[type]}})(require(\"__browserify_process\"))},{__browserify_process:16}],17:[function(){ace.define(\"ace/theme/monokai\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"],function(acequire,exports){exports.isDark=!0,exports.cssClass=\"ace-monokai\",exports.cssText=\".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai .ace_scroller {background-color: #272822}.ace-monokai .ace_text-layer {color: #F8F8F2}.ace-monokai .ace_cursor {border-left: 2px solid #F8F8F0}.ace-monokai .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;border-radius: 2px}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_markup.ace_underline {text-decoration: underline}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ11D6z7Bq1ar/ABCKBG6g04U2AAAAAElFTkSuQmCC) right repeat-y}\";var dom=acequire(\"../lib/dom\");dom.importCssString(exports.cssText,exports.cssClass)})},{}],18:[function(require){(function(){ace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/tokenizer\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/range\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"],function(acequire,exports){var oop=acequire(\"../lib/oop\"),TextMode=acequire(\"./text\").Mode,Tokenizer=acequire(\"../tokenizer\").Tokenizer,JavaScriptHighlightRules=acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules,MatchingBraceOutdent=acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;acequire(\"../range\").Range;var WorkerClient=acequire(\"../worker/worker_client\").WorkerClient,CstyleBehaviour=acequire(\"./behaviour/cstyle\").CstyleBehaviour,CStyleFoldMode=acequire(\"./folding/cstyle\").FoldMode,Mode=function(){this.$tokenizer=new Tokenizer((new JavaScriptHighlightRules).getRules()),this.$outdent=new MatchingBraceOutdent,this.$behaviour=new CstyleBehaviour,this.foldingRules=new CStyleFoldMode};oop.inherits(Mode,TextMode),function(){this.lineCommentStart=\"//\",this.blockComment={start:\"/*\",end:\"*/\"},this.getNextLineIndent=function(state,line,tab){var indent=this.$getIndent(line),tokenizedLine=this.$tokenizer.getLineTokens(line,state),tokens=tokenizedLine.tokens,endState=tokenizedLine.state;if(tokens.length&&\"comment\"==tokens[tokens.length-1].type)return indent;if(\"start\"==state||\"no_regex\"==state){var match=line.match(/^.*(?:\\bcase\\b.*\\:|[\\{\\(\\[])\\s*$/);match&&(indent+=tab)}else if(\"doc-start\"==state){if(\"start\"==endState||\"no_regex\"==endState)return\"\";var match=line.match(/^\\s*(\\/?)\\*/);match&&(match[1]&&(indent+=\" \"),indent+=\"* \")}return indent},this.checkOutdent=function(state,line,input){return this.$outdent.checkOutdent(line,input)},this.autoOutdent=function(state,doc,row){this.$outdent.autoOutdent(doc,row)},this.createWorker=function(session){var worker=new WorkerClient([\"ace\"],require(\"../worker/javascript\"),\"JavaScriptWorker\");return worker.attachToDocument(session.getDocument()),worker.on(\"jslint\",function(results){session.setAnnotations(results.data)}),worker.on(\"terminate\",function(){session.clearAnnotations()}),worker}}.call(Mode.prototype),exports.Mode=Mode}),ace.define(\"ace/mode/javascript_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"],function(acequire,exports){var oop=acequire(\"../lib/oop\"),DocCommentHighlightRules=acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules,TextHighlightRules=acequire(\"./text_highlight_rules\").TextHighlightRules,JavaScriptHighlightRules=function(){var keywordMapper=this.createKeywordMapper({\"variable.language\":\"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document\",keyword:\"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\"storage.type\":\"const|let|var|function\",\"constant.language\":\"null|Infinity|NaN|undefined\",\"support.function\":\"alert\",\"constant.language.boolean\":\"true|false\"},\"identifier\"),kwBeforeRe=\"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\",identifierRe=\"[a-zA-Z\\\\$_¡-￿][a-zA-Z\\\\d\\\\$_¡-￿]*\\\\b\",escapedRe=\"\\\\\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)\";this.$rules={no_regex:[{token:\"comment\",regex:/\\/\\/.*$/},DocCommentHighlightRules.getStartRule(\"doc-start\"),{token:\"comment\",regex:/\\/\\*/,next:\"comment\"},{token:\"string\",regex:\"'(?=.)\",next:\"qstring\"},{token:\"string\",regex:'\"(?=.)',next:\"qqstring\"},{token:\"constant.numeric\",regex:/0[xX][0-9a-fA-F]+\\b/},{token:\"constant.numeric\",regex:/[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\"],regex:\"(\"+identifierRe+\")(\\\\.)(prototype)(\\\\.)(\"+identifierRe+\")(\\\\s*)(=)\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+identifierRe+\")(\\\\.)(\"+identifierRe+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+identifierRe+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"punctuation.operator\",\"entity.name.function\",\"text\",\"keyword.operator\",\"text\",\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(\"+identifierRe+\")(\\\\.)(\"+identifierRe+\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"storage.type\",\"text\",\"entity.name.function\",\"text\",\"paren.lparen\"],regex:\"(function)(\\\\s+)(\"+identifierRe+\")(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"entity.name.function\",\"text\",\"punctuation.operator\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(\"+identifierRe+\")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:[\"text\",\"text\",\"storage.type\",\"text\",\"paren.lparen\"],regex:\"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",next:\"function_arguments\"},{token:\"keyword\",regex:\"(?:\"+kwBeforeRe+\")\\\\b\",next:\"start\"},{token:[\"punctuation.operator\",\"support.function\"],regex:/(\\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.function.dom\"],regex:/(\\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/},{token:[\"punctuation.operator\",\"support.constant\"],regex:/(\\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\\b/},{token:[\"storage.type\",\"punctuation.operator\",\"support.function.firebug\"],regex:/(console)(\\.)(warn|info|log|error|time|timeEnd|assert)\\b/},{token:keywordMapper,regex:identifierRe},{token:\"keyword.operator\",regex:/--|\\+\\+|[!$%&*+\\-~]|===|==|=|!=|!==|\u003C=|>=|\u003C\u003C=|>>=|>>>=|\u003C>|\u003C|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=/,next:\"start\"},{token:\"punctuation.operator\",regex:/\\?|\\:|\\,|\\;|\\./,next:\"start\"},{token:\"paren.lparen\",regex:/[\\[({]/,next:\"start\"},{token:\"paren.rparen\",regex:/[\\])}]/},{token:\"keyword.operator\",regex:/\\/=?/,next:\"start\"},{token:\"comment\",regex:/^#!.*$/}],start:[DocCommentHighlightRules.getStartRule(\"doc-start\"),{token:\"comment\",regex:\"\\\\/\\\\*\",next:\"comment_regex_allowed\"},{token:\"comment\",regex:\"\\\\/\\\\/.*$\",next:\"start\"},{token:\"string.regexp\",regex:\"\\\\/\",next:\"regex\"},{token:\"text\",regex:\"\\\\s+|^$\",next:\"start\"},{token:\"empty\",regex:\"\",next:\"no_regex\"}],regex:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"string.regexp\",regex:\"/\\\\w*\",next:\"no_regex\"},{token:\"invalid\",regex:/\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/},{token:\"constant.language.escape\",regex:/\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?]/},{token:\"constant.language.delimiter\",regex:/\\|/},{token:\"constant.language.escape\",regex:/\\[\\^?/,next:\"regex_character_class\"},{token:\"empty\",regex:\"$\",next:\"no_regex\"},{defaultToken:\"string.regexp\"}],regex_character_class:[{token:\"regexp.keyword.operator\",regex:\"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"},{token:\"constant.language.escape\",regex:\"]\",next:\"regex\"},{token:\"constant.language.escape\",regex:\"-\"},{token:\"empty\",regex:\"$\",next:\"no_regex\"},{defaultToken:\"string.regexp.charachterclass\"}],function_arguments:[{token:\"variable.parameter\",regex:identifierRe},{token:\"punctuation.operator\",regex:\"[, ]+\"},{token:\"punctuation.operator\",regex:\"$\"},{token:\"empty\",regex:\"\",next:\"no_regex\"}],comment_regex_allowed:[{token:\"comment\",regex:\"\\\\*\\\\/\",next:\"start\"},{defaultToken:\"comment\"}],comment:[{token:\"comment\",regex:\"\\\\*\\\\/\",next:\"no_regex\"},{defaultToken:\"comment\"}],qqstring:[{token:\"constant.language.escape\",regex:escapedRe},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qqstring\"},{token:\"string\",regex:'\"|$',next:\"no_regex\"},{defaultToken:\"string\"}],qstring:[{token:\"constant.language.escape\",regex:escapedRe},{token:\"string\",regex:\"\\\\\\\\$\",next:\"qstring\"},{token:\"string\",regex:\"'|$\",next:\"no_regex\"},{defaultToken:\"string\"}]},this.embedRules(DocCommentHighlightRules,\"doc-\",[DocCommentHighlightRules.getEndRule(\"no_regex\")])\n};oop.inherits(JavaScriptHighlightRules,TextHighlightRules),exports.JavaScriptHighlightRules=JavaScriptHighlightRules}),ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"],function(acequire,exports){var oop=acequire(\"../lib/oop\"),TextHighlightRules=acequire(\"./text_highlight_rules\").TextHighlightRules,DocCommentHighlightRules=function(){this.$rules={start:[{token:\"comment.doc.tag\",regex:\"@[\\\\w\\\\d_]+\"},{token:\"comment.doc.tag\",regex:\"\\\\bTODO\\\\b\"},{defaultToken:\"comment.doc\"}]}};oop.inherits(DocCommentHighlightRules,TextHighlightRules),DocCommentHighlightRules.getStartRule=function(start){return{token:\"comment.doc\",regex:\"\\\\/\\\\*(?=\\\\*)\",next:start}},DocCommentHighlightRules.getEndRule=function(start){return{token:\"comment.doc\",regex:\"\\\\*\\\\/\",next:start}},exports.DocCommentHighlightRules=DocCommentHighlightRules}),ace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(acequire,exports){var Range=acequire(\"../range\").Range,MatchingBraceOutdent=function(){};(function(){this.checkOutdent=function(line,input){return/^\\s+$/.test(line)?/^\\s*\\}/.test(input):!1},this.autoOutdent=function(doc,row){var line=doc.getLine(row),match=line.match(/^(\\s*\\})/);if(!match)return 0;var column=match[1].length,openBracePos=doc.findMatchingBracket({row:row,column:column});if(!openBracePos||openBracePos.row==row)return 0;var indent=this.$getIndent(doc.getLine(openBracePos.row));doc.replace(new Range(row,0,row,column-1),indent)},this.$getIndent=function(line){return line.match(/^\\s*/)[0]}}).call(MatchingBraceOutdent.prototype),exports.MatchingBraceOutdent=MatchingBraceOutdent}),ace.define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"],function(acequire,exports){var oop=acequire(\"../../lib/oop\"),Behaviour=acequire(\"../behaviour\").Behaviour,TokenIterator=acequire(\"../../token_iterator\").TokenIterator,lang=acequire(\"../../lib/lang\"),SAFE_INSERT_IN_TOKENS=[\"text\",\"paren.rparen\",\"punctuation.operator\"],SAFE_INSERT_BEFORE_TOKENS=[\"text\",\"paren.rparen\",\"punctuation.operator\",\"comment\"],autoInsertedBrackets=0,autoInsertedRow=-1,autoInsertedLineEnd=\"\",maybeInsertedBrackets=0,maybeInsertedRow=-1,maybeInsertedLineStart=\"\",maybeInsertedLineEnd=\"\",CstyleBehaviour=function(){CstyleBehaviour.isSaneInsertion=function(editor,session){var cursor=editor.getCursorPosition(),iterator=new TokenIterator(session,cursor.row,cursor.column);if(!this.$matchTokenType(iterator.getCurrentToken()||\"text\",SAFE_INSERT_IN_TOKENS)){var iterator2=new TokenIterator(session,cursor.row,cursor.column+1);if(!this.$matchTokenType(iterator2.getCurrentToken()||\"text\",SAFE_INSERT_IN_TOKENS))return!1}return iterator.stepForward(),iterator.getCurrentTokenRow()!==cursor.row||this.$matchTokenType(iterator.getCurrentToken()||\"text\",SAFE_INSERT_BEFORE_TOKENS)},CstyleBehaviour.$matchTokenType=function(token,types){return types.indexOf(token.type||token)>-1},CstyleBehaviour.recordAutoInsert=function(editor,session,bracket){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);this.isAutoInsertedClosing(cursor,line,autoInsertedLineEnd[0])||(autoInsertedBrackets=0),autoInsertedRow=cursor.row,autoInsertedLineEnd=bracket+line.substr(cursor.column),autoInsertedBrackets++},CstyleBehaviour.recordMaybeInsert=function(editor,session,bracket){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);this.isMaybeInsertedClosing(cursor,line)||(maybeInsertedBrackets=0),maybeInsertedRow=cursor.row,maybeInsertedLineStart=line.substr(0,cursor.column)+bracket,maybeInsertedLineEnd=line.substr(cursor.column),maybeInsertedBrackets++},CstyleBehaviour.isAutoInsertedClosing=function(cursor,line,bracket){return autoInsertedBrackets>0&&cursor.row===autoInsertedRow&&bracket===autoInsertedLineEnd[0]&&line.substr(cursor.column)===autoInsertedLineEnd},CstyleBehaviour.isMaybeInsertedClosing=function(cursor,line){return maybeInsertedBrackets>0&&cursor.row===maybeInsertedRow&&line.substr(cursor.column)===maybeInsertedLineEnd&&line.substr(0,cursor.column)==maybeInsertedLineStart},CstyleBehaviour.popAutoInsertedClosing=function(){autoInsertedLineEnd=autoInsertedLineEnd.substr(1),autoInsertedBrackets--},CstyleBehaviour.clearMaybeInsertedClosing=function(){maybeInsertedBrackets=0,maybeInsertedRow=-1},this.add(\"braces\",\"insertion\",function(state,action,editor,session,text){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);if(\"{\"==text){var selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(\"\"!==selected&&\"{\"!==selected&&editor.getWrapBehavioursEnabled())return{text:\"{\"+selected+\"}\",selection:!1};if(CstyleBehaviour.isSaneInsertion(editor,session))return/[\\]\\}\\)]/.test(line[cursor.column])?(CstyleBehaviour.recordAutoInsert(editor,session,\"}\"),{text:\"{}\",selection:[1,1]}):(CstyleBehaviour.recordMaybeInsert(editor,session,\"{\"),{text:\"{\",selection:[1,1]})}else if(\"}\"==text){var rightChar=line.substring(cursor.column,cursor.column+1);if(\"}\"==rightChar){var matching=session.$findOpeningBracket(\"}\",{column:cursor.column+1,row:cursor.row});if(null!==matching&&CstyleBehaviour.isAutoInsertedClosing(cursor,line,text))return CstyleBehaviour.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}else if(\"\\n\"==text||\"\\r\\n\"==text){var closing=\"\";CstyleBehaviour.isMaybeInsertedClosing(cursor,line)&&(closing=lang.stringRepeat(\"}\",maybeInsertedBrackets),CstyleBehaviour.clearMaybeInsertedClosing());var rightChar=line.substring(cursor.column,cursor.column+1);if(\"}\"==rightChar||\"\"!==closing){var openBracePos=session.findMatchingBracket({row:cursor.row,column:cursor.column},\"}\");if(!openBracePos)return null;var indent=this.getNextLineIndent(state,line.substring(0,cursor.column),session.getTabString()),next_indent=this.$getIndent(line);return{text:\"\\n\"+indent+\"\\n\"+next_indent+closing,selection:[1,indent.length,1,indent.length]}}}}),this.add(\"braces\",\"deletion\",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&\"{\"==selected){var line=session.doc.getLine(range.start.row),rightChar=line.substring(range.end.column,range.end.column+1);if(\"}\"==rightChar)return range.end.column++,range;maybeInsertedBrackets--}}),this.add(\"parens\",\"insertion\",function(state,action,editor,session,text){if(\"(\"==text){var selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(\"\"!==selected&&editor.getWrapBehavioursEnabled())return{text:\"(\"+selected+\")\",selection:!1};if(CstyleBehaviour.isSaneInsertion(editor,session))return CstyleBehaviour.recordAutoInsert(editor,session,\")\"),{text:\"()\",selection:[1,1]}}else if(\")\"==text){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row),rightChar=line.substring(cursor.column,cursor.column+1);if(\")\"==rightChar){var matching=session.$findOpeningBracket(\")\",{column:cursor.column+1,row:cursor.row});if(null!==matching&&CstyleBehaviour.isAutoInsertedClosing(cursor,line,text))return CstyleBehaviour.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"parens\",\"deletion\",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&\"(\"==selected){var line=session.doc.getLine(range.start.row),rightChar=line.substring(range.start.column+1,range.start.column+2);if(\")\"==rightChar)return range.end.column++,range}}),this.add(\"brackets\",\"insertion\",function(state,action,editor,session,text){if(\"[\"==text){var selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(\"\"!==selected&&editor.getWrapBehavioursEnabled())return{text:\"[\"+selected+\"]\",selection:!1};if(CstyleBehaviour.isSaneInsertion(editor,session))return CstyleBehaviour.recordAutoInsert(editor,session,\"]\"),{text:\"[]\",selection:[1,1]}}else if(\"]\"==text){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row),rightChar=line.substring(cursor.column,cursor.column+1);if(\"]\"==rightChar){var matching=session.$findOpeningBracket(\"]\",{column:cursor.column+1,row:cursor.row});if(null!==matching&&CstyleBehaviour.isAutoInsertedClosing(cursor,line,text))return CstyleBehaviour.popAutoInsertedClosing(),{text:\"\",selection:[1,1]}}}}),this.add(\"brackets\",\"deletion\",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&\"[\"==selected){var line=session.doc.getLine(range.start.row),rightChar=line.substring(range.start.column+1,range.start.column+2);if(\"]\"==rightChar)return range.end.column++,range}}),this.add(\"string_dquotes\",\"insertion\",function(state,action,editor,session,text){if('\"'==text||\"'\"==text){var quote=text,selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(\"\"!==selected&&\"'\"!==selected&&'\"'!=selected&&editor.getWrapBehavioursEnabled())return{text:quote+selected+quote,selection:!1};var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row),leftChar=line.substring(cursor.column-1,cursor.column);if(\"\\\\\"==leftChar)return null;for(var token,tokens=session.getTokens(selection.start.row),col=0,quotepos=-1,x=0;tokens.length>x&&(token=tokens[x],\"string\"==token.type?quotepos=-1:0>quotepos&&(quotepos=token.value.indexOf(quote)),!(token.value.length+col>selection.start.column));x++)col+=tokens[x].value.length;if(!token||0>quotepos&&\"comment\"!==token.type&&(\"string\"!==token.type||selection.start.column!==token.value.length+col-1&&token.value.lastIndexOf(quote)===token.value.length-1)){if(!CstyleBehaviour.isSaneInsertion(editor,session))return;return{text:quote+quote,selection:[1,1]}}if(token&&\"string\"===token.type){var rightChar=line.substring(cursor.column,cursor.column+1);if(rightChar==quote)return{text:\"\",selection:[1,1]}}}}),this.add(\"string_dquotes\",\"deletion\",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&('\"'==selected||\"'\"==selected)){var line=session.doc.getLine(range.start.row),rightChar=line.substring(range.start.column+1,range.start.column+2);if(rightChar==selected)return range.end.column++,range}})};oop.inherits(CstyleBehaviour,Behaviour),exports.CstyleBehaviour=CstyleBehaviour}),ace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"],function(acequire,exports){var oop=acequire(\"../../lib/oop\");acequire(\"../../range\").Range;var BaseFoldMode=acequire(\"./fold_mode\").FoldMode,FoldMode=exports.FoldMode=function(commentRegex){commentRegex&&(this.foldingStartMarker=RegExp(this.foldingStartMarker.source.replace(/\\|[^|]*?$/,\"|\"+commentRegex.start)),this.foldingStopMarker=RegExp(this.foldingStopMarker.source.replace(/\\|[^|]*?$/,\"|\"+commentRegex.end)))};oop.inherits(FoldMode,BaseFoldMode),function(){this.foldingStartMarker=/(\\{|\\[)[^\\}\\]]*$|^\\s*(\\/\\*)/,this.foldingStopMarker=/^[^\\[\\{]*(\\}|\\])|^[\\s\\*]*(\\*\\/)/,this.getFoldWidgetRange=function(session,foldStyle,row){var line=session.getLine(row),match=line.match(this.foldingStartMarker);if(match){var i=match.index;return match[1]?this.openingBracketBlock(session,match[1],row,i):session.getCommentFoldRange(row,i+match[0].length,1)}if(\"markbeginend\"===foldStyle){var match=line.match(this.foldingStopMarker);if(match){var i=match.index+match[0].length;return match[1]?this.closingBracketBlock(session,match[1],row,i):session.getCommentFoldRange(row,i,-1)}}}}.call(FoldMode.prototype)})})()},{\"../worker/javascript\":19}],11:[function(require,module){\"use strict\";var ace=require(\"brace\");require(\"brace/mode/javascript\"),require(\"brace/theme/monokai\"),module.exports=function(container,src){var editorContainer=document.createElement(\"div\");editorContainer.setAttribute(\"class\",\"scriptie-talkie-editor\"),container.appendChild(editorContainer);var editor=ace.edit(editorContainer),session=editor.getSession();return editor.setTheme(\"ace/theme/monokai\"),session.setMode(\"ace/mode/javascript\"),session.$tabSize=2,editor.$highlightActiveLine=!1,editor.setValue(src),{container:editorContainer,editor:editor}}},{\"brace/mode/javascript\":18,\"brace/theme/monokai\":17,brace:20}],12:[function(require,module){\"use strict\";function appendTerminal(terminalContainer,lines){var terminal=hypernal();return lines&&lines.forEach(function(line){terminal.writeln(line)}),terminal.appendTo(terminalContainer),terminal}function appendTerminalAndGetHeight(terminalContainer,lines){var terminal=appendTerminal(terminalContainer,lines),height=terminal.element.clientHeight;return{terminal:terminal,height:height}}var hypernal=require(\"hypernal\");module.exports=function(container,opts){opts=opts||{};var height,terminal,terminalContainer=document.createElement(\"div\");if(terminalContainer.setAttribute(\"class\",\"scriptie-talkie-terminal\"),container.appendChild(terminalContainer),opts.lines){var appended=appendTerminalAndGetHeight(terminalContainer,opts.lines);terminal=appended.terminal,height=appended.height}else terminal=appendTerminal(terminalContainer);return{container:terminalContainer,terminal:terminal,height:height}}},{hypernal:21}],13:[function(require,module){\"use strict\";var scriptieTalkie=require(\"scriptie-talkie\");module.exports=function(script,writeln){var lines=[];if(writeln=writeln||function(){},!script.trim().length)return lines;try{lines=scriptieTalkie(script),lines.forEach(function(line){writeln(line)})}catch(e){if(console.log(e.stack),console.error(\"\"+e),e instanceof ReferenceError&&/Trying to access object from destroyed plug-in/.test(e.message)){var msg=\"Looks like your iPad Safari browser doesn't like what scriptie talkie is doing.\\nPlease try another device and/or browser, i.e. chrome works everywhere, even on iPad.\";writeln(msg)}else e.inner?(writeln(\"unable to parse the current code, looks like you have an error on: \"),writeln(\"line: \"+e.inner.lineNumber+\" column: \"+e.inner.column)):(writeln(\"\"+e),writeln(e.stack))}return lines}},{\"scriptie-talkie\":22}],19:[function(require,module){(function(){module.exports.id=\"ace/mode/javascript_worker\",module.exports.src='\"no use strict\";(function(window){void 0!==window.window&&window.document||(window.console={log:function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:msgs})},error:function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:msgs})}},window.window=window,window.ace=window,window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\"!\")){var chunks=moduleName.split(\"!\");return normalizeModule(parentId,chunks[0])+\"!\"+normalizeModule(parentId,chunks[1])}if(\".\"==moduleName.charAt(0)){var base=parentId.split(\"/\").slice(0,-1).join(\"/\");for(moduleName=base+\"/\"+moduleName;-1!==moduleName.indexOf(\".\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/\\\\/\\\\.\\\\//,\"/\").replace(/[^\\\\/]+\\\\/\\\\.\\\\.\\\\//,\"\")}}return moduleName},window.acequire=function(parentId,id){if(!id.charAt)throw Error(\"worker.js acequire() accepts only (parentId, id) as arguments\");id=normalizeModule(parentId,id);var module=acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;var chunks=id.split(\"/\");chunks[0]=acequire.tlns[chunks[0]]||chunks[0];var path=chunks.join(\"/\")+\".js\";return acequire.id=id,importScripts(path),acequire(parentId,id)},acequire.modules={},acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\"string\"!=typeof id&&(deps=id,id=acequire.id)):1==arguments.length&&(factory=id,id=acequire.id),0!==id.indexOf(\"text!\")){var req=function(deps,factory){return acequire(id,deps,factory)};acequire.modules[id]={factory:function(){var module={exports:{}},returnExports=factory(req,module.exports,module);return returnExports&&(module.exports=returnExports),module}}}},window.initBaseUrls=function initBaseUrls(topLevelNamespaces){acequire.tlns=topLevelNamespaces},window.initSender=function initSender(){var EventEmitter=acequire(null,\"ace/lib/event_emitter\").EventEmitter,oop=acequire(null,\"ace/lib/oop\"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:\"call\",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:\"event\",name:name,data:data})}}.call(Sender.prototype),new Sender},window.main=null,window.sender=null,window.onmessage=function(e){var msg=e.data;if(msg.command){if(!main[msg.command])throw Error(\"Unknown command:\"+msg.command);main[msg.command].apply(main,msg.args)}else if(msg.init){initBaseUrls(msg.tlns),acequire(null,\"ace/lib/fixoldbrowsers\"),sender=initSender();var clazz=acequire(null,msg.module)[msg.classname];main=new clazz(sender)}else msg.event&&sender&&sender._emit(msg.event,msg.data)})})(this),ace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"],function(acequire){acequire(\"./regexp\"),acequire(\"./es5-shim\")}),ace.define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"],function(){function getNativeFlags(regex){return(regex.global?\"g\":\"\")+(regex.ignoreCase?\"i\":\"\")+(regex.multiline?\"m\":\"\")+(regex.extended?\"x\":\"\")+(regex.sticky?\"y\":\"\")}function indexOf(array,item,from){if(Array.prototype.indexOf)return array.indexOf(item,from);for(var i=from||0;array.length>i;i++)if(array[i]===item)return i;return-1}var real={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},compliantExecNpcg=void 0===real.exec.call(/()??/,\"\")[1],compliantLastIndexIncrement=function(){var x=/^/g;return real.test.call(x,\"\"),!x.lastIndex}();compliantLastIndexIncrement&&compliantExecNpcg||(RegExp.prototype.exec=function(str){var name,r2,match=real.exec.apply(this,arguments);if(\"string\"==typeof str&&match){if(!compliantExecNpcg&&match.length>1&&indexOf(match,\"\")>-1&&(r2=RegExp(this.source,real.replace.call(getNativeFlags(this),\"g\",\"\")),real.replace.call(str.slice(match.index),r2,function(){for(var i=1;arguments.length-2>i;i++)void 0===arguments[i]&&(match[i]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var i=1;match.length>i;i++)name=this._xregexp.captureNames[i-1],name&&(match[name]=match[i]);!compliantLastIndexIncrement&&this.global&&!match[0].length&&this.lastIndex>match.index&&this.lastIndex--}return match},compliantLastIndexIncrement||(RegExp.prototype.test=function(str){var match=real.exec.call(this,str);return match&&this.global&&!match[0].length&&this.lastIndex>match.index&&this.lastIndex--,!!match}))}),ace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\"sentinel\",{}),\"sentinel\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\"function\"!=typeof target)throw new TypeError(\"Function.prototype.bind called on incompatible \"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\"__defineGetter__\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\"XXX\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\"[object Array]\"==_toString(obj)});var boxedString=Object(\"a\"),splitString=\"a\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduce of empty array with no initial value\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\"reduce of empty array with no initial value\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduceRight of empty array with no initial value\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\"reduceRight of empty array with no initial value\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(object,property){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != \\'object\\'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\"undefined\"==typeof document||doesDefinePropertyWork(document.createElement(\"div\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\"Property description must be an object: \",ERR_NON_OBJECT_TARGET=\"Object.defineProperty called on non-object: \",ERR_ACCESSORS_NOT_SUPPORTED=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(object,property,descriptor){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\"object\"!=typeof descriptor&&\"function\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\"value\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\"get\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\"set\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\"function\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\"\";owns(object,name);)name+=\"?\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(\"Object.keys called on a non-object\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\"\t\\\\n\u000b\\\\f\\\\r  ᠎              \\\\u2028\\\\u2029\";if(!String.prototype.trim||ws.trim()){ws=\"[\"+ws+\"]\";var trimBeginRegexp=RegExp(\"^\"+ws+ws+\"*\"),trimEndRegexp=RegExp(ws+ws+\"*$\");String.prototype.trim=function(){return(this+\"\").replace(trimBeginRegexp,\"\").replace(trimEndRegexp,\"\")}}var toObject=function(o){if(null==o)throw new TypeError(\"can\\'t convert \"+o+\" to object\");return Object(o)}}),ace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\"object\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault);for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners)for(var i=0;listeners.length>i;i++)listeners[i](e,this)},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){if(this._defaultHandlers=this._defaultHandlers||{},this._defaultHandlers[eventName])throw Error(\"The default handler for \\'\"+eventName+\"\\' is already set\");this._defaultHandlers[eventName]=callback},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\"unshift\":\"push\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(acequire,exports){exports.inherits=function(){var tempCtor=function(){};return function(ctor,superCtor){tempCtor.prototype=superCtor.prototype,ctor.super_=superCtor.prototype,ctor.prototype=new tempCtor,ctor.prototype.constructor=ctor}}(),exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\"ace/mode/javascript_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/javascript/jshint\"],function(acequire,exports,module){function startRegex(arr){return RegExp(\"^(\"+arr.join(\"|\")+\")\")}var oop=acequire(\"../lib/oop\"),Mirror=acequire(\"../worker/mirror\").Mirror,lint=acequire(\"./javascript/jshint\").JSHINT,disabledWarningsRe=startRegex([\"Bad for in variable \\'(.+)\\'.\",\\'Missing \"use strict\"\\']),errorsRe=startRegex([\"Unexpected\",\"Expected \",\"Confusing (plus|minus)\",\"\\\\\\\\{a\\\\\\\\} unterminated regular expression\",\"Unclosed \",\"Unmatched \",\"Unbegun comment\",\"Bad invocation\",\"Missing space after\",\"Missing operator at\"]),infoRe=startRegex([\"Expected an assignment\",\"Bad escapement of EOL\",\"Unexpected comma\",\"Unexpected space\",\"Missing radix parameter.\",\"A leading decimal point can\",\"\\\\\\\\[\\'{a}\\'\\\\\\\\] is better written in dot notation.\",\"\\'{a}\\' used out of scope\"]),JavaScriptWorker=exports.JavaScriptWorker=function(sender){Mirror.call(this,sender),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(options){this.options=options||{es5:!0,esnext:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(newOptions){oop.mixin(this.options,newOptions),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval(\"throw 0;\"+str)}catch(e){if(0===e)return!0}return!1},this.onUpdate=function(){var value=this.doc.getValue();if(value=value.replace(/^#!.*\\\\n/,\"\\\\n\"),!value)return this.sender.emit(\"jslint\",[]),void 0;var errors=[],maxErrorLevel=this.isValidJS(value)?\"warning\":\"error\";lint(value,this.options);for(var results=lint.errors,errorAdded=!1,i=0;results.length>i;i++){var error=results[i];if(error){var raw=error.raw,type=\"warning\";if(\"Missing semicolon.\"==raw){var str=error.evidence.substr(error.character);str=str.charAt(str.search(/\\\\S/)),\"error\"==maxErrorLevel&&str&&/[\\\\w\\\\d{([\\'\"]/.test(str)?(error.reason=\\'Missing \";\" before statement\\',type=\"error\"):type=\"info\"}else{if(disabledWarningsRe.test(raw))continue;infoRe.test(raw)?type=\"info\":errorsRe.test(raw)?(errorAdded=!0,type=maxErrorLevel):\"\\'{a}\\' is not defined.\"==raw?type=\"warning\":\"\\'{a}\\' is defined but never used.\"==raw&&(type=\"info\")}errors.push({row:error.line-1,column:error.character-1,text:error.reason,type:type,raw:raw})}}this.sender.emit(\"jslint\",errors)}}.call(JavaScriptWorker.prototype)}),ace.define(\"ace/worker/mirror\",[\"require\",\"exports\",\"module\",\"ace/document\",\"ace/lib/lang\"],function(acequire,exports){var Document=acequire(\"../document\").Document,lang=acequire(\"../lib/lang\"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(\"\"),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on(\"change\",function(e){doc.applyDeltas([e.data]),deferredUpdate.schedule(_self.$timeout)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){}}).call(Mirror.prototype)}),ace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Anchor=acequire(\"./anchor\").Anchor,Document=function(text){this.$lines=[],0==text.length?this.$lines=[\"\"]:Array.isArray(text)?this.insertLines(0,text):this.insert({row:0,column:0},text)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength();this.remove(new Range(0,0,len,this.getLine(len-1).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==\"aaa\".split(/a/).length?function(text){return text.replace(/\\\\r\\\\n|\\\\r/g,\"\\\\n\").split(\"\\\\n\")}:function(text){return text.split(/\\\\r\\\\n|\\\\r|\\\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\\\r\\\\n|\\\\r|\\\\n)/m);this.$autoNewLine=match?match[1]:\"\\\\n\"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\\\r\\\\n\";case\"unix\":return\"\\\\n\";default:return this.$autoNewLine}},this.$autoNewLine=\"\\\\n\",this.$newLineMode=\"auto\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\"\\\\r\\\\n\"==text||\"\\\\r\"==text||\"\\\\n\"==text},this.getLine=function(row){return this.$lines[row]||\"\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){if(range.start.row==range.end.row)return this.$lines[range.start.row].substring(range.start.column,range.end.column);var lines=this.getLines(range.start.row+1,range.end.row-1);return lines.unshift((this.$lines[range.start.row]||\"\").substring(range.start.column)),lines.push((this.$lines[range.end.row]||\"\").substring(0,range.end.column)),lines.join(this.getNewLineCharacter())},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):0>position.row&&(position.row=0),position},this.insert=function(position,text){if(!text||0===text.length)return position;position=this.$clipPosition(position),1>=this.getLength()&&this.$detectNewLine(text);var lines=this.$split(text),firstLine=lines.splice(0,1)[0],lastLine=0==lines.length?null:lines.splice(lines.length-1,1)[0];return position=this.insertInLine(position,firstLine),null!==lastLine&&(position=this.insertNewLine(position),position=this.insertLines(position.row,lines),position=this.insertInLine(position,lastLine||\"\")),position},this.insertLines=function(row,lines){if(0==lines.length)return{row:row,column:0};if(lines.length>65535){var end=this.insertLines(row,lines.slice(65535));lines=lines.slice(0,65535)}var args=[row,0];args.push.apply(args,lines),this.$lines.splice.apply(this.$lines,args);var range=new Range(row,0,row+lines.length,0),delta={action:\"insertLines\",range:range,lines:lines};return this._emit(\"change\",{data:delta}),end||range.end},this.insertNewLine=function(position){position=this.$clipPosition(position);var line=this.$lines[position.row]||\"\";this.$lines[position.row]=line.substring(0,position.column),this.$lines.splice(position.row+1,0,line.substring(position.column,line.length));var end={row:position.row+1,column:0},delta={action:\"insertText\",range:Range.fromPoints(position,end),text:this.getNewLineCharacter()};return this._emit(\"change\",{data:delta}),end},this.insertInLine=function(position,text){if(0==text.length)return position;var line=this.$lines[position.row]||\"\";this.$lines[position.row]=line.substring(0,position.column)+text+line.substring(position.column);var end={row:position.row,column:position.column+text.length},delta={action:\"insertText\",range:Range.fromPoints(position,end),text:text};return this._emit(\"change\",{data:delta}),end},this.remove=function(range){if(range.start=this.$clipPosition(range.start),range.end=this.$clipPosition(range.end),range.isEmpty())return range.start;var firstRow=range.start.row,lastRow=range.end.row;if(range.isMultiLine()){var firstFullRow=0==range.start.column?firstRow:firstRow+1,lastFullRow=lastRow-1;range.end.column>0&&this.removeInLine(lastRow,0,range.end.column),lastFullRow>=firstFullRow&&this.removeLines(firstFullRow,lastFullRow),firstFullRow!=firstRow&&(this.removeInLine(firstRow,range.start.column,this.getLine(firstRow).length),this.removeNewLine(range.start.row))}else this.removeInLine(firstRow,range.start.column,range.end.column);return range.start},this.removeInLine=function(row,startColumn,endColumn){if(startColumn!=endColumn){var range=new Range(row,startColumn,row,endColumn),line=this.getLine(row),removed=line.substring(startColumn,endColumn),newLine=line.substring(0,startColumn)+line.substring(endColumn,line.length);this.$lines.splice(row,1,newLine);var delta={action:\"removeText\",range:range,text:removed};return this._emit(\"change\",{data:delta}),range.start}},this.removeLines=function(firstRow,lastRow){var range=new Range(firstRow,0,lastRow+1,0),removed=this.$lines.splice(firstRow,lastRow-firstRow+1),delta={action:\"removeLines\",range:range,nl:this.getNewLineCharacter(),lines:removed};return this._emit(\"change\",{data:delta}),removed},this.removeNewLine=function(row){var firstLine=this.getLine(row),secondLine=this.getLine(row+1),range=new Range(row,firstLine.length,row+1,0),line=firstLine+secondLine;this.$lines.splice(row,2,line);var delta={action:\"removeText\",range:range,text:this.getNewLineCharacter()};this._emit(\"change\",{data:delta})},this.replace=function(range,text){if(0==text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;if(this.remove(range),text)var end=this.insert(range.start,text);else end=range.start;return end},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);\"insertLines\"==delta.action?this.insertLines(range.start.row,delta.lines):\"insertText\"==delta.action?this.insert(range.start,delta.text):\"removeLines\"==delta.action?this.removeLines(range.start.row,range.end.row-1):\"removeText\"==delta.action&&this.remove(range)}},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);\"insertLines\"==delta.action?this.removeLines(range.start.row,range.end.row-1):\"insertText\"==delta.action?this.remove(range):\"removeLines\"==delta.action?this.insertLines(range.start.row,delta.lines):\"removeText\"==delta.action&&this.insert(range.start,delta.text)}},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length;return index+newlineLength*i+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\"object\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)\\n},this.setEnd=function(row,column){\"object\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.document=doc,column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column),this.$onChange=this.onChange.bind(this),doc.on(\"change\",this.$onChange)};(function(){oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var delta=e.data,range=delta.range;if(!(range.start.row==range.end.row&&range.start.row!=this.row||range.start.row>this.row||range.start.row==this.row&&range.start.column>this.column)){var row=this.row,column=this.column,start=range.start,end=range.end;\"insertText\"===delta.action?start.row===row&&column>=start.column?start.row===end.row?column+=end.column-start.column:(column-=start.column,row+=end.row-start.row):start.row!==end.row&&row>start.row&&(row+=end.row-start.row):\"insertLines\"===delta.action?row>=start.row&&(row+=end.row-start.row):\"removeText\"===delta.action?start.row===row&&column>start.column?column=end.column>=column?start.column:Math.max(0,column-(end.column-start.column)):start.row!==end.row&&row>start.row?(end.row===row&&(column=Math.max(0,column-end.column)+start.column),row-=end.row-start.row):end.row===row&&(row-=end.row-start.row,column=Math.max(0,column-end.column)+start.column):\"removeLines\"==delta.action&&row>=start.row&&(row>=end.row?row-=end.row-start.row:(row=start.row,column=0)),this.setPosition(row,column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._emit(\"change\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(acequire,exports){exports.stringReverse=function(string){return string.split(\"\").reverse().join(\"\")},exports.stringRepeat=function(string,count){for(var result=\"\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\\\s\\\\s*/,trimEndRegexp=/\\\\s\\\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\"\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\"\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\"object\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function(obj){if(\"object\"!=typeof obj)return obj;var copy=obj.constructor();for(var key in obj)copy[key]=\"object\"==typeof obj[key]?this.deepCopy(obj[key]):obj[key];return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\\\]\\\\/\\\\\\\\])/g,\"\\\\\\\\$1\")},exports.escapeHTML=function(str){return str.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/\\'/g,\"'\").replace(/\u003C/g,\"<\")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)};return _self.delay=_self,_self.schedule=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||0))},_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define(\"ace/mode/javascript/jshint\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var JSHINT=function(){function F(){}function is_own(object,name){return Object.prototype.hasOwnProperty.call(object,name)}function checkOption(name,t){void 0===valOptions[name]&&void 0===boolOptions[name]&&warning(\"Bad option: \\'\"+name+\"\\'.\",t)}function isString(obj){return\"[object String]\"===Object.prototype.toString.call(obj)}function isAlpha(str){return str>=\"a\"&&\"z￿\">=str||str>=\"A\"&&\"Z￿\">=str}function isDigit(str){return str>=\"0\"&&\"9\">=str}function isIdentifier(token,value){return token?token.identifier&&token.value===value?!0:!1:!1}function supplant(str,data){return str.replace(/\\\\{([^{}]*)\\\\}/g,function(a,b){var r=data[b];return\"string\"==typeof r||\"number\"==typeof r?r:a})}function combine(t,o){var n;for(n in o)is_own(o,n)&&!is_own(JSHINT.blacklist,n)&&(t[n]=o[n])}function updatePredefined(){Object.keys(JSHINT.blacklist).forEach(function(key){delete predefined[key]})}function assume(){option.couch&&combine(predefined,couch),option.rhino&&combine(predefined,rhino),option.prototypejs&&combine(predefined,prototypejs),option.node&&(combine(predefined,node),option.globalstrict=!0),option.devel&&combine(predefined,devel),option.dojo&&combine(predefined,dojo),option.browser&&combine(predefined,browser),option.nonstandard&&combine(predefined,nonstandard),option.jquery&&combine(predefined,jquery),option.mootools&&combine(predefined,mootools),option.worker&&combine(predefined,worker),option.wsh&&combine(predefined,wsh),option.esnext&&useESNextSyntax(),option.globalstrict&&option.strict!==!1&&(option.strict=!0),option.yui&&combine(predefined,yui)}function quit(message,line,chr){var percentage=Math.floor(100*(line/lines.length));throw{name:\"JSHintError\",line:line,character:chr,message:message+\" (\"+percentage+\"% scanned).\",raw:message}}function isundef(scope,m,t,a){return JSHINT.undefs.push([scope,m,t,a])}function warning(m,t,a,b,c,d){var ch,l,w;return t=t||nexttoken,\"(end)\"===t.id&&(t=token),l=t.line||0,ch=t.from||0,w={id:\"(error)\",raw:m,evidence:lines[l-1]||\"\",line:l,character:ch,scope:JSHINT.scope,a:a,b:b,c:c,d:d},w.reason=supplant(m,w),JSHINT.errors.push(w),option.passfail&&quit(\"Stopping. \",l,ch),warnings+=1,warnings>=option.maxerr&&quit(\"Too many errors.\",l,ch),w}function warningAt(m,l,ch,a,b,c,d){return warning(m,{line:l,from:ch},a,b,c,d)}function error(m,t,a,b,c,d){warning(m,t,a,b,c,d)}function errorAt(m,l,ch,a,b,c,d){return error(m,{line:l,from:ch},a,b,c,d)}function addInternalSrc(elem,src){var i;return i={id:\"(internal)\",elem:elem,value:src},JSHINT.internals.push(i),i}function addlabel(t,type,token){\"hasOwnProperty\"===t&&warning(\"\\'hasOwnProperty\\' is a really bad name.\"),\"exception\"===type&&is_own(funct[\"(context)\"],t)&&(funct[t]===!0||option.node||warning(\"Value of \\'{a}\\' may be overwritten in IE.\",nexttoken,t)),is_own(funct,t)&&!funct[\"(global)\"]&&(funct[t]===!0?option.latedef&&warning(\"\\'{a}\\' was used before it was defined.\",nexttoken,t):option.shadow||\"exception\"===type||warning(\"\\'{a}\\' is already defined.\",nexttoken,t)),funct[t]=type,token&&(funct[\"(tokens)\"][t]=token),funct[\"(global)\"]?(global[t]=funct,is_own(implied,t)&&(option.latedef&&warning(\"\\'{a}\\' was used before it was defined.\",nexttoken,t),delete implied[t])):scope[t]=funct}function doOption(){var b,obj,filter,t,tn,v,minus,nt=nexttoken,o=nt.value,quotmarkValue=option.quotmark,predef={};switch(o){case\"*/\":error(\"Unbegun comment.\");break;case\"/*members\":case\"/*member\":o=\"/*members\",membersOnly||(membersOnly={}),obj=membersOnly,option.quotmark=!1;break;case\"/*jshint\":case\"/*jslint\":obj=option,filter=boolOptions;break;case\"/*global\":obj=predef;break;default:error(\"What?\")}for(t=lex.token();;){minus=!1;for(var breakOuterLoop;;){if(\"special\"===t.type&&\"*/\"===t.value){breakOuterLoop=!0;break}if(\"(endline)\"!==t.id&&\",\"!==t.id)break;t=lex.token()}if(breakOuterLoop)break;if(\"/*global\"===o&&\"-\"===t.value&&(minus=!0,t=lex.token()),\"(string)\"!==t.type&&\"(identifier)\"!==t.type&&\"/*members\"!==o&&error(\"Bad option.\",t),v=lex.token(),\":\"===v.id){v=lex.token(),obj===membersOnly&&error(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",t,\"*/\",\":\"),\"/*jshint\"===o&&checkOption(t.value,t);var numericVals=[\"maxstatements\",\"maxparams\",\"maxdepth\",\"maxcomplexity\",\"maxerr\",\"maxlen\",\"indent\"];if(numericVals.indexOf(t.value)>-1&&(\"/*jshint\"===o||\"/*jslint\"===o))b=+v.value,(\"number\"!=typeof b||!isFinite(b)||0>=b||Math.floor(b)!==b)&&error(\"Expected a small integer and instead saw \\'{a}\\'.\",v,v.value),\"indent\"===t.value&&(obj.white=!0),obj[t.value]=b;else if(\"validthis\"===t.value)funct[\"(global)\"]?error(\"Option \\'validthis\\' can\\'t be used in a global scope.\"):\"true\"===v.value||\"false\"===v.value?obj[t.value]=\"true\"===v.value:error(\"Bad option value.\",v);else if(\"quotmark\"===t.value&&\"/*jshint\"===o)switch(v.value){case\"true\":obj.quotmark=!0;break;case\"false\":obj.quotmark=!1;break;case\"double\":case\"single\":obj.quotmark=v.value;break;default:error(\"Bad option value.\",v)}else\"true\"===v.value||\"false\"===v.value?(\"/*jslint\"===o?(tn=renamedOptions[t.value]||t.value,obj[tn]=\"true\"===v.value,void 0!==invertedOptions[tn]&&(obj[tn]=!obj[tn])):obj[t.value]=\"true\"===v.value,\"newcap\"===t.value&&(obj[\"(explicitNewcap)\"]=!0)):error(\"Bad option value.\",v);t=lex.token()}else(\"/*jshint\"===o||\"/*jslint\"===o)&&error(\"Missing option value.\",t),obj[t.value]=!1,\"/*global\"===o&&minus===!0&&(JSHINT.blacklist[t.value]=t.value,updatePredefined()),t=v}\"/*members\"===o&&(option.quotmark=quotmarkValue),combine(predefined,predef);for(var key in predef)is_own(predef,key)&&(declared[key]=nt);filter&&assume()}function peek(p){for(var t,i=p||0,j=0;i>=j;)t=lookahead[j],t||(t=lookahead[j]=lex.token()),j+=1;return t}function advance(id,t){switch(token.id){case\"(number)\":\".\"===nexttoken.id&&warning(\"A dot following a number can be confused with a decimal point.\",token);break;case\"-\":(\"-\"===nexttoken.id||\"--\"===nexttoken.id)&&warning(\"Confusing minusses.\");break;case\"+\":(\"+\"===nexttoken.id||\"++\"===nexttoken.id)&&warning(\"Confusing plusses.\")}for((\"(string)\"===token.type||token.identifier)&&(anonname=token.value),id&&nexttoken.id!==id&&(t?\"(end)\"===nexttoken.id?warning(\"Unmatched \\'{a}\\'.\",t,t.id):warning(\"Expected \\'{a}\\' to match \\'{b}\\' from line {c} and instead saw \\'{d}\\'.\",nexttoken,id,t.id,t.line,nexttoken.value):(\"(identifier)\"!==nexttoken.type||nexttoken.value!==id)&&warning(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",nexttoken,id,nexttoken.value)),prevtoken=token,token=nexttoken;;){if(nexttoken=lookahead.shift()||lex.token(),\"(end)\"===nexttoken.id||\"(error)\"===nexttoken.id)return;if(\"special\"===nexttoken.type)doOption();else if(\"(endline)\"!==nexttoken.id)break}}function expression(rbp,initial){var left,isArray=!1,isObject=!1;if(\"(end)\"===nexttoken.id&&error(\"Unexpected early end of program.\",token),advance(),initial&&(anonname=\"anonymous\",funct[\"(verb)\"]=token.value),initial===!0&&token.fud)left=token.fud();else{if(token.nud)left=token.nud();else{if(\"(number)\"===nexttoken.type&&\".\"===token.id)return warning(\"A leading decimal point can be confused with a dot: \\'.{a}\\'.\",token,nexttoken.value),advance(),token;error(\"Expected an identifier and instead saw \\'{a}\\'.\",token,token.id)}for(;nexttoken.lbp>rbp;)isArray=\"Array\"===token.value,isObject=\"Object\"===token.value,left&&(left.value||left.first&&left.first.value)&&(\"new\"!==left.value||left.first&&left.first.value&&\".\"===left.first.value)&&(isArray=!1,left.value!==token.value&&(isObject=!1)),advance(),isArray&&\"(\"===token.id&&\")\"===nexttoken.id&&warning(\"Use the array literal notation [].\",token),isObject&&\"(\"===token.id&&\")\"===nexttoken.id&&warning(\"Use the object literal notation {}.\",token),token.led?left=token.led(left):error(\"Expected an operator and instead saw \\'{a}\\'.\",token,token.id)}return left}function adjacent(left,right){left=left||token,right=right||nexttoken,option.white&&left.character!==right.from&&left.line===right.line&&(left.from+=left.character-left.from,warning(\"Unexpected space after \\'{a}\\'.\",left,left.value))}function nobreak(left,right){left=left||token,right=right||nexttoken,!option.white||left.character===right.from&&left.line===right.line||warning(\"Unexpected space before \\'{a}\\'.\",right,right.value)}function nospace(left,right){left=left||token,right=right||nexttoken,option.white&&!left.comment&&left.line===right.line&&adjacent(left,right)}function nonadjacent(left,right){if(option.white){if(left=left||token,right=right||nexttoken,\";\"===left.value&&\";\"===right.value)return;left.line===right.line&&left.character===right.from&&(left.from+=left.character-left.from,warning(\"Missing space after \\'{a}\\'.\",left,left.value))}}function nobreaknonadjacent(left,right){left=left||token,right=right||nexttoken,option.laxbreak||left.line===right.line?option.white&&(left=left||token,right=right||nexttoken,left.character===right.from&&(left.from+=left.character-left.from,warning(\"Missing space after \\'{a}\\'.\",left,left.value))):warning(\"Bad line breaking before \\'{a}\\'.\",right,right.id)}function indentation(bias){var i;option.white&&\"(end)\"!==nexttoken.id&&(i=indent+(bias||0),nexttoken.from!==i&&warning(\"Expected \\'{a}\\' to have an indentation at {b} instead at {c}.\",nexttoken,nexttoken.value,i,nexttoken.from))}function nolinebreak(t){t=t||token,t.line!==nexttoken.line&&warning(\"Line breaking error \\'{a}\\'.\",t,t.value)}function comma(){token.line!==nexttoken.line?option.laxcomma||(comma.first&&(warning(\"Comma warnings can be turned off with \\'laxcomma\\'\"),comma.first=!1),warning(\"Bad line breaking before \\'{a}\\'.\",token,nexttoken.id)):!token.comment&&token.character!==nexttoken.from&&option.white&&(token.from+=token.character-token.from,warning(\"Unexpected space after \\'{a}\\'.\",token,token.value)),advance(\",\"),nonadjacent(token,nexttoken)}function symbol(s,p){var x=syntax[s];return x&&\"object\"==typeof x||(syntax[s]=x={id:s,lbp:p,value:s}),x}function delim(s){return symbol(s,0)}function stmt(s,f){var x=delim(s);return x.identifier=x.reserved=!0,x.fud=f,x}function blockstmt(s,f){var x=stmt(s,f);return x.block=!0,x}function reserveName(x){var c=x.id.charAt(0);return(c>=\"a\"&&\"z\">=c||c>=\"A\"&&\"Z\">=c)&&(x.identifier=x.reserved=!0),x}function prefix(s,f){var x=symbol(s,150);return reserveName(x),x.nud=\"function\"==typeof f?f:function(){return this.right=expression(150),this.arity=\"unary\",(\"++\"===this.id||\"--\"===this.id)&&(option.plusplus?warning(\"Unexpected use of \\'{a}\\'.\",this,this.id):this.right.identifier&&!this.right.reserved||\".\"===this.right.id||\"[\"===this.right.id||warning(\"Bad operand.\",this)),this},x}function type(s,f){var x=delim(s);return x.type=s,x.nud=f,x}function reserve(s,f){var x=type(s,f);return x.identifier=x.reserved=!0,x}function reservevar(s,v){return reserve(s,function(){return\"function\"==typeof v&&v(this),this})}function infix(s,f,p,w){var x=symbol(s,p);return reserveName(x),x.led=function(left){return w||(nobreaknonadjacent(prevtoken,token),nonadjacent(token,nexttoken)),\"in\"===s&&\"!\"===left.id&&warning(\"Confusing use of \\'{a}\\'.\",left,\"!\"),\"function\"==typeof f?f(left,this):(this.left=left,this.right=expression(p),this)},x}function relation(s,f){var x=symbol(s,100);return x.led=function(left){nobreaknonadjacent(prevtoken,token),nonadjacent(token,nexttoken);var right=expression(100);return isIdentifier(left,\"NaN\")||isIdentifier(right,\"NaN\")?warning(\"Use the isNaN function to compare with NaN.\",this):f&&f.apply(this,[left,right]),\"!\"===left.id&&warning(\"Confusing use of \\'{a}\\'.\",left,\"!\"),\"!\"===right.id&&warning(\"Confusing use of \\'{a}\\'.\",right,\"!\"),this.left=left,this.right=right,this},x}function isPoorRelation(node){return node&&(\"(number)\"===node.type&&0===+node.value||\"(string)\"===node.type&&\"\"===node.value||\"null\"===node.type&&!option.eqnull||\"true\"===node.type||\"false\"===node.type||\"undefined\"===node.type)}function assignop(s){return symbol(s,20).exps=!0,infix(s,function(left,that){if(that.left=left,predefined[left.value]===!1&&scope[left.value][\"(global)\"]===!0?warning(\"Read only.\",left):left[\"function\"]&&warning(\"\\'{a}\\' is a function.\",left,left.value),left){if(option.esnext&&\"const\"===funct[left.value]&&warning(\"Attempting to override \\'{a}\\' which is a constant\",left,left.value),\".\"===left.id||\"[\"===left.id)return left.left&&\"arguments\"!==left.left.value||warning(\"Bad assignment.\",that),that.right=expression(19),that;if(left.identifier&&!left.reserved)return\"exception\"===funct[left.value]&&warning(\"Do not assign to the exception parameter.\",left),that.right=expression(19),that;left===syntax[\"function\"]&&warning(\"Expected an identifier in an assignment and instead saw a function invocation.\",token)}error(\"Bad assignment.\",that)},20)}function bitwise(s,f,p){var x=symbol(s,p);return reserveName(x),x.led=\"function\"==typeof f?f:function(left){return option.bitwise&&warning(\"Unexpected use of \\'{a}\\'.\",this,this.id),this.left=left,this.right=expression(p),this},x}function bitwiseassignop(s){return symbol(s,20).exps=!0,infix(s,function(left,that){return option.bitwise&&warning(\"Unexpected use of \\'{a}\\'.\",that,that.id),nonadjacent(prevtoken,token),nonadjacent(token,nexttoken),left?\".\"===left.id||\"[\"===left.id||left.identifier&&!left.reserved?(expression(19),that):(left===syntax[\"function\"]&&warning(\"Expected an identifier in an assignment, and instead saw a function invocation.\",token),that):(error(\"Bad assignment.\",that),void 0)},20)}function suffix(s){var x=symbol(s,150);return x.led=function(left){return option.plusplus?warning(\"Unexpected use of \\'{a}\\'.\",this,this.id):left.identifier&&!left.reserved||\".\"===left.id||\"[\"===left.id||warning(\"Bad operand.\",this),this.left=left,this},x}function optionalidentifier(fnparam){return nexttoken.identifier?(advance(),token.reserved&&!option.es5&&(fnparam&&\"undefined\"===token.value||warning(\"Expected an identifier and instead saw \\'{a}\\' (a reserved word).\",token,token.id)),token.value):void 0}function identifier(fnparam){var i=optionalidentifier(fnparam);return i?i:(\"function\"===token.id&&\"(\"===nexttoken.id?warning(\"Missing name in function declaration.\"):error(\"Expected an identifier and instead saw \\'{a}\\'.\",nexttoken,nexttoken.value),void 0)}function reachable(s){var t,i=0;if(\";\"===nexttoken.id&&!noreach)for(;;){if(t=peek(i),t.reach)return;if(\"(endline)\"!==t.id){if(\"function\"===t.id){if(!option.latedef)break;warning(\"Inner functions should be listed at the top of the outer function.\",t);break}warning(\"Unreachable \\'{a}\\' after \\'{b}\\'.\",t,t.value,s);break}i+=1}}function statement(noindent){var r,i=indent,s=scope,t=nexttoken;if(\";\"===t.id)return advance(\";\"),void 0;if(t.identifier&&!t.reserved&&\":\"===peek().id&&(advance(),advance(\":\"),scope=Object.create(s),addlabel(t.value,\"label\"),nexttoken.labelled||\"{\"===nexttoken.value||warning(\"Label \\'{a}\\' on {b} statement.\",nexttoken,t.value,nexttoken.value),jx.test(t.value+\":\")&&warning(\"Label \\'{a}\\' looks like a javascript url.\",t,t.value),nexttoken.label=t.value,t=nexttoken),\"{\"===t.id)return block(!0,!0),void 0;if(noindent||indentation(),r=expression(0,!0),!t.block){if(option.expr||r&&r.exps?option.nonew&&\"(\"===r.id&&\"new\"===r.left.id&&warning(\"Do not use \\'new\\' for side effects.\",t):warning(\"Expected an assignment or function call and instead saw an expression.\",token),\",\"===nexttoken.id)return comma();\";\"!==nexttoken.id?option.asi||option.lastsemic&&\"}\"===nexttoken.id&&nexttoken.line===token.line||warningAt(\"Missing semicolon.\",token.line,token.character):(adjacent(token,nexttoken),advance(\";\"),nonadjacent(token,nexttoken))}return indent=i,scope=s,r}function statements(startLine){for(var p,a=[];!nexttoken.reach&&\"(end)\"!==nexttoken.id;)\";\"===nexttoken.id?(p=peek(),p&&\"(\"===p.id||warning(\"Unnecessary semicolon.\"),advance(\";\")):a.push(statement(startLine===nexttoken.line));return a}function directives(){for(var i,p,pn;\"(string)\"===nexttoken.id;){if(p=peek(0),\"(endline)\"===p.id){i=1;do pn=peek(i),i+=1;while(\"(endline)\"===pn.id);if(\";\"!==pn.id){if(\"(string)\"!==pn.id&&\"(number)\"!==pn.id&&\"(regexp)\"!==pn.id&&pn.identifier!==!0&&\"}\"!==pn.id)break;warning(\"Missing semicolon.\",nexttoken)}else p=pn}else if(\"}\"===p.id)warning(\"Missing semicolon.\",p);else if(\";\"!==p.id)break;indentation(),advance(),directive[token.value]&&warning(\\'Unnecessary directive \"{a}\".\\',token,token.value),\"use strict\"===token.value&&(option[\"(explicitNewcap)\"]||(option.newcap=!0),option.undef=!0),directive[token.value]=!0,\";\"===p.id&&advance(\";\")}}function block(ordinary,stmt,isfunc){var a,m,t,line,d,b=inblock,old_indent=indent,s=scope;inblock=ordinary,ordinary&&option.funcscope||(scope=Object.create(scope)),nonadjacent(token,nexttoken),t=nexttoken;var metrics=funct[\"(metrics)\"];if(metrics.nestedBlockDepth+=1,metrics.verifyMaxNestedBlockDepthPerFunction(),\"{\"===nexttoken.id){if(advance(\"{\"),line=token.line,\"}\"!==nexttoken.id){for(indent+=option.indent;!ordinary&&nexttoken.from>indent;)indent+=option.indent;if(isfunc){m={};for(d in directive)is_own(directive,d)&&(m[d]=directive[d]);directives(),option.strict&&funct[\"(context)\"][\"(global)\"]&&(m[\"use strict\"]||directive[\"use strict\"]||warning(\\'Missing \"use strict\" statement.\\'))}a=statements(line),metrics.statementCount+=a.length,isfunc&&(directive=m),indent-=option.indent,line!==nexttoken.line&&indentation()}else line!==nexttoken.line&&indentation();advance(\"}\",t),indent=old_indent}else ordinary?((!stmt||option.curly)&&warning(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",nexttoken,\"{\",nexttoken.value),noreach=!0,indent+=option.indent,a=[statement(nexttoken.line===token.line)],indent-=option.indent,noreach=!1):error(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",nexttoken,\"{\",nexttoken.value);return funct[\"(verb)\"]=null,ordinary&&option.funcscope||(scope=s),inblock=b,!ordinary||!option.noempty||a&&0!==a.length||warning(\"Empty block.\"),metrics.nestedBlockDepth-=1,a}function countMember(m){membersOnly&&\"boolean\"!=typeof membersOnly[m]&&warning(\"Unexpected /*member \\'{a}\\'.\",token,m),\"number\"==typeof member[m]?member[m]+=1:member[m]=1}function note_implied(token){var name=token.value,line=token.line,a=implied[name];\"function\"==typeof a&&(a=!1),a?a[a.length-1]!==line&&a.push(line):(a=[line],implied[name]=a)}function property_name(){var id=optionalidentifier(!0);return id||(\"(string)\"===nexttoken.id?(id=nexttoken.value,advance()):\"(number)\"===nexttoken.id&&(id=\"\"+nexttoken.value,advance())),id}function functionparams(){var ident,next=nexttoken,params=[];if(advance(\"(\"),nospace(),\")\"===nexttoken.id)return advance(\")\"),void 0;for(;;){if(ident=identifier(!0),params.push(ident),addlabel(ident,\"unused\",token),\",\"!==nexttoken.id)return advance(\")\",next),nospace(prevtoken,token),params;comma()}}function doFunction(name,statement){var f,oldOption=option,oldScope=scope;return option=Object.create(option),scope=Object.create(scope),funct={\"(name)\":name||\\'\"\\'+anonname+\\'\"\\',\"(line)\":nexttoken.line,\"(character)\":nexttoken.character,\"(context)\":funct,\"(breakage)\":0,\"(loopage)\":0,\"(metrics)\":createMetrics(nexttoken),\"(scope)\":scope,\"(statement)\":statement,\"(tokens)\":{}},f=funct,token.funct=funct,functions.push(funct),name&&addlabel(name,\"function\"),funct[\"(params)\"]=functionparams(),funct[\"(metrics)\"].verifyMaxParametersPerFunction(funct[\"(params)\"]),block(!1,!1,!0),funct[\"(metrics)\"].verifyMaxStatementsPerFunction(),funct[\"(metrics)\"].verifyMaxComplexityPerFunction(),scope=oldScope,option=oldOption,funct[\"(last)\"]=token.line,funct[\"(lastcharacter)\"]=token.character,funct=funct[\"(context)\"],f}function createMetrics(functionStartToken){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,verifyMaxStatementsPerFunction:function(){if(option.maxstatements&&this.statementCount>option.maxstatements){var message=\"Too many statements per function (\"+this.statementCount+\").\";warning(message,functionStartToken)}},verifyMaxParametersPerFunction:function(params){if(params=params||[],option.maxparams&¶ms.length>option.maxparams){var message=\"Too many parameters per function (\"+params.length+\").\";warning(message,functionStartToken)}},verifyMaxNestedBlockDepthPerFunction:function(){if(option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===option.maxdepth+1){var message=\"Blocks are nested too deeply (\"+this.nestedBlockDepth+\").\";warning(message)}},verifyMaxComplexityPerFunction:function(){var max=option.maxcomplexity,cc=this.ComplexityCount;if(max&&cc>max){var message=\"Cyclomatic complexity is too high per function (\"+cc+\").\";warning(message,functionStartToken)}}}}function increaseComplexityCount(){funct[\"(metrics)\"].ComplexityCount+=1}function jsonValue(){function jsonObject(){var o={},t=nexttoken;if(advance(\"{\"),\"}\"!==nexttoken.id)for(;;){if(\"(end)\"===nexttoken.id)error(\"Missing \\'}\\' to match \\'{\\' from line {a}.\",nexttoken,t.line);else{if(\"}\"===nexttoken.id){warning(\"Unexpected comma.\",token);break}\",\"===nexttoken.id?error(\"Unexpected comma.\",nexttoken):\"(string)\"!==nexttoken.id&&warning(\"Expected a string and instead saw {a}.\",nexttoken,nexttoken.value)}if(o[nexttoken.value]===!0?warning(\"Duplicate key \\'{a}\\'.\",nexttoken,nexttoken.value):\"__proto__\"===nexttoken.value&&!option.proto||\"__iterator__\"===nexttoken.value&&!option.iterator?warning(\"The \\'{a}\\' key may produce unexpected results.\",nexttoken,nexttoken.value):o[nexttoken.value]=!0,advance(),advance(\":\"),jsonValue(),\",\"!==nexttoken.id)break;advance(\",\")}advance(\"}\")}function jsonArray(){var t=nexttoken;if(advance(\"[\"),\"]\"!==nexttoken.id)for(;;){if(\"(end)\"===nexttoken.id)error(\"Missing \\']\\' to match \\'[\\' from line {a}.\",nexttoken,t.line);else{if(\"]\"===nexttoken.id){warning(\"Unexpected comma.\",token);break}\",\"===nexttoken.id&&error(\"Unexpected comma.\",nexttoken)}if(jsonValue(),\",\"!==nexttoken.id)break;advance(\",\")}advance(\"]\")}switch(nexttoken.id){case\"{\":jsonObject();break;case\"[\":jsonArray();break;case\"true\":case\"false\":case\"null\":case\"(number)\":case\"(string)\":advance();break;case\"-\":advance(\"-\"),token.character!==nexttoken.from&&warning(\"Unexpected space after \\'-\\'.\",token),adjacent(token,nexttoken),advance(\"(number)\");break;default:error(\"Expected a JSON value.\",nexttoken)}}var anonname,declared,funct,functions,global,implied,inblock,indent,jsonmode,lines,lookahead,member,membersOnly,nexttoken,noreach,option,predefined,prereg,prevtoken,quotmark,scope,stack,directive,tab,token,unuseds,urls,useESNextSyntax,warnings,ax,cx,tx,nx,nxg,lx,ix,jx,ft,bang={\"\u003C\":!0,\"\u003C=\":!0,\"==\":!0,\"===\":!0,\"!==\":!0,\"!=\":!0,\">\":!0,\">=\":!0,\"+\":!0,\"-\":!0,\"*\":!0,\"/\":!0,\"%\":!0},boolOptions={asi:!0,bitwise:!0,boss:!0,browser:!0,camelcase:!0,couch:!0,curly:!0,debug:!0,devel:!0,dojo:!0,eqeqeq:!0,eqnull:!0,es5:!0,esnext:!0,evil:!0,expr:!0,forin:!0,funcscope:!0,globalstrict:!0,immed:!0,iterator:!0,jquery:!0,lastsemic:!0,latedef:!0,laxbreak:!0,laxcomma:!0,loopfunc:!0,mootools:!0,multistr:!0,newcap:!0,noarg:!0,node:!0,noempty:!0,nonew:!0,nonstandard:!0,nomen:!0,onevar:!0,onecase:!0,passfail:!0,plusplus:!0,proto:!0,prototypejs:!0,regexdash:!0,regexp:!0,rhino:!0,undef:!0,unused:!0,scripturl:!0,shadow:!0,smarttabs:!0,strict:!0,sub:!0,supernew:!0,trailing:!0,validthis:!0,withstmt:!0,white:!0,worker:!0,wsh:!0,yui:!0},valOptions={maxlen:!1,indent:!1,maxerr:!1,predef:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1},invertedOptions={bitwise:!0,forin:!0,newcap:!0,nomen:!0,plusplus:!0,regexp:!0,undef:!0,white:!0,eqeqeq:!0,onevar:!0},renamedOptions={eqeq:\"eqeqeq\",vars:\"onevar\",windows:\"wsh\"},browser={ArrayBuffer:!1,ArrayBufferView:!1,Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,DataView:!1,DOMParser:!1,defaultStatus:!1,document:!1,event:!1,FileReader:!1,Float32Array:!1,Float64Array:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Image:!1,length:!1,localStorage:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,top:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},functionicity=[\"closure\",\"exception\",\"global\",\"label\",\"outer\",\"unused\",\"var\"],jquery={$:!1,jQuery:!1},mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},node={__filename:!1,__dirname:!1,Buffer:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,acequire:!1,setTimeout:!1,clearTimeout:!1,setInterval:!1,clearInterval:!1},prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},standard={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,Set:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1,WeakMap:!1},nonstandard={escape:!1,unescape:!1},syntax={},worker={importScripts:!0,postMessage:!0,self:!0},wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},yui={YUI:!1,Y:!1,YUI_config:!1};\\n(function(){ax=/@cc|\u003C\\\\/?|script|\\\\]\\\\s*\\\\]|\u003C\\\\s*!|</i,cx=/[\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0604\\\\u070f\\\\u17b4\\\\u17b5\\\\u200c-\\\\u200f\\\\u2028-\\\\u202f\\\\u2060-\\\\u206f\\\\ufeff\\\\ufff0-\\\\uffff]/,tx=/^\\\\s*([(){}\\\\[.,:;\\'\"~\\\\?\\\\]#@]|==?=?|\\\\/=(?!(\\\\S*\\\\/[gim]?))|\\\\/(\\\\*(jshint|jslint|members?|global)?|\\\\/)?|\\\\*[\\\\/=]?|\\\\+(?:=|\\\\++)?|-(?:=|-+)?|%=?|&[&=]?|\\\\|[|=]?|>>?>?=?|\u003C([\\\\/=!]|\\\\!(\\\\[|--)?|\u003C=?)?|\\\\^=?|\\\\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\\\\.[0-9]*)?([eE][+\\\\-]?[0-9]+)?)/,nx=/[\\\\u0000-\\\\u001f&\u003C\"\\\\/\\\\\\\\\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0604\\\\u070f\\\\u17b4\\\\u17b5\\\\u200c-\\\\u200f\\\\u2028-\\\\u202f\\\\u2060-\\\\u206f\\\\ufeff\\\\ufff0-\\\\uffff]/,nxg=/[\\\\u0000-\\\\u001f&\u003C\"\\\\/\\\\\\\\\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0604\\\\u070f\\\\u17b4\\\\u17b5\\\\u200c-\\\\u200f\\\\u2028-\\\\u202f\\\\u2060-\\\\u206f\\\\ufeff\\\\ufff0-\\\\uffff]/g,lx=/\\\\*\\\\//,ix=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,jx=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\\\\s*:/i,ft=/^\\\\s*\\\\/\\\\*\\\\s*falls\\\\sthrough\\\\s*\\\\*\\\\/\\\\s*$/})(),\"function\"!=typeof Array.isArray&&(Array.isArray=function(o){return\"[object Array]\"===Object.prototype.toString.apply(o)}),Array.prototype.forEach||(Array.prototype.forEach=function(fn,scope){for(var len=this.length,i=0;len>i;i++)fn.call(scope||this,this[i],i,this)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){if(null===this||void 0===this)throw new TypeError;var t=Object(this),len=t.length>>>0;if(0===len)return-1;var n=0;if(arguments.length>0&&(n=Number(arguments[1]),n!=n?n=0:0!==n&&1/0!=n&&n!=-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len)return-1;for(var k=n>=0?n:Math.max(len-Math.abs(n),0);len>k;k++)if(k in t&&t[k]===searchElement)return k;return-1}),\"function\"!=typeof Object.create&&(Object.create=function(o){return F.prototype=o,new F}),\"function\"!=typeof Object.keys&&(Object.keys=function(o){var k,a=[];for(k in o)is_own(o,k)&&a.push(k);return a});var lex=function lex(){function nextLine(){var at,match,tw;return line>=lines.length?!1:(character=1,s=lines[line],line+=1,option.smarttabs?(match=s.match(/(\\\\/\\\\/)? \\\\t/),at=match&&!match[1]?0:-1):at=s.search(/ \\\\t|\\\\t [^\\\\*]/),at>=0&&warningAt(\"Mixed spaces and tabs.\",line,at+1),s=s.replace(/\\\\t/g,tab),at=s.search(cx),at>=0&&warningAt(\"Unsafe character.\",line,at),option.maxlen&&option.maxlen\u003Cs.length&&warningAt(\"Line too long.\",line,s.length),tw=option.trailing&&s.match(/^(.*?)\\\\s+$/),tw&&!/^\\\\s+$/.test(s)&&warningAt(\"Trailing whitespace.\",line,tw[1].length+1),!0)}function it(type,value){function checkName(name){if(!option.proto&&\"__proto__\"===name)return warningAt(\"The \\'{a}\\' property is deprecated.\",line,from,name),void 0;if(!option.iterator&&\"__iterator__\"===name)return warningAt(\"\\'{a}\\' is only available in JavaScript 1.7.\",line,from,name),void 0;var hasDangling=/^(_+.*|.*_+)$/.test(name);if(option.nomen&&hasDangling&&\"_\"!==name){if(option.node&&\".\"!==token.id&&/^(__dirname|__filename)$/.test(name))return;return warningAt(\"Unexpected {a} in \\'{b}\\'.\",line,from,\"dangling \\'_\\'\",name),void 0}option.camelcase&&name.replace(/^_+/,\"\").indexOf(\"_\")>-1&&!name.match(/^[A-Z0-9_]*$/)&&warningAt(\"Identifier \\'{a}\\' is not in camel case.\",line,from,value)}var i,t;return t=\"(color)\"===type||\"(range)\"===type?{type:type}:\"(punctuator)\"===type||\"(identifier)\"===type&&is_own(syntax,value)?syntax[value]||syntax[\"(error)\"]:syntax[type],t=Object.create(t),(\"(string)\"===type||\"(range)\"===type)&&!option.scripturl&&jx.test(value)&&warningAt(\"Script URL.\",line,from),\"(identifier)\"===type&&(t.identifier=!0,checkName(value)),t.value=value,t.line=line,t.character=character,t.from=from,i=t.id,\"(endline)\"!==i&&(prereg=i&&(\"(,=:[!&|?{};\".indexOf(i.charAt(i.length-1))>=0||\"return\"===i||\"case\"===i)),t}var character,from,line,s;return{init:function(source){lines=\"string\"==typeof source?source.replace(/\\\\r\\\\n/g,\"\\\\n\").replace(/\\\\r/g,\"\\\\n\").split(\"\\\\n\"):source,lines[0]&&\"#!\"===lines[0].substr(0,2)&&(lines[0]=\"\"),line=0,nextLine(),from=1},range:function(begin,end){var c,value=\"\";for(from=character,s.charAt(0)!==begin&&errorAt(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",line,character,begin,s.charAt(0));;){switch(s=s.slice(1),character+=1,c=s.charAt(0)){case\"\":errorAt(\"Missing \\'{a}\\'.\",line,character,c);break;case end:return s=s.slice(1),character+=1,it(\"(range)\",value);case\"\\\\\\\\\":warningAt(\"Unexpected \\'{a}\\'.\",line,character,c)}value+=c}},token:function(){function match(x){var r1,r=x.exec(s);return r?(l=r[0].length,r1=r[1],c=r1.charAt(0),s=s.substr(l),from=character+l-r1.length,character+=l,r1):void 0}function string(x){function esc(n){var i=parseInt(s.substr(j+1,n),16);j+=n,i>=32&&126>=i&&34!==i&&92!==i&&39!==i&&warningAt(\"Unnecessary escapement.\",line,character),character+=n,c=String.fromCharCode(i)}var c,j,r=\"\",allowNewLine=!1;jsonmode&&\\'\"\\'!==x&&warningAt(\"Strings must use doublequote.\",line,character),option.quotmark&&(\"single\"===option.quotmark&&\"\\'\"!==x?warningAt(\"Strings must use singlequote.\",line,character):\"double\"===option.quotmark&&\\'\"\\'!==x?warningAt(\"Strings must use doublequote.\",line,character):option.quotmark===!0&&(quotmark=quotmark||x,quotmark!==x&&warningAt(\"Mixed double and single quotes.\",line,character))),j=0;unclosedString:for(;;){for(;j>=s.length;){j=0;var cl=line,cf=from;if(!nextLine()){errorAt(\"Unclosed string.\",cl,cf);break unclosedString}allowNewLine?allowNewLine=!1:warningAt(\"Unclosed string.\",cl,cf)}if(c=s.charAt(j),c===x)return character+=1,s=s.substr(j+1),it(\"(string)\",r,x);if(\" \">c){if(\"\\\\n\"===c||\"\\\\r\"===c)break;warningAt(\"Control character in string: {a}.\",line,character+j,s.slice(0,j))}else if(\"\\\\\\\\\"===c)switch(j+=1,character+=1,c=s.charAt(j),n=s.charAt(j+1),c){case\"\\\\\\\\\":case\\'\"\\':case\"/\":break;case\"\\'\":jsonmode&&warningAt(\"Avoid \\\\\\\\\\'.\",line,character);break;case\"b\":c=\"\\\\b\";break;case\"f\":c=\"\\\\f\";break;case\"n\":c=\"\\\\n\";break;case\"r\":c=\"\\\\r\";break;case\"t\":c=\"\t\";break;case\"0\":c=\"\\\\0\",n>=0&&7>=n&&directive[\"use strict\"]&&warningAt(\"Octal literals are not allowed in strict mode.\",line,character);break;case\"u\":esc(4);break;case\"v\":jsonmode&&warningAt(\"Avoid \\\\\\\\v.\",line,character),c=\"\u000b\";break;case\"x\":jsonmode&&warningAt(\"Avoid \\\\\\\\x-.\",line,character),esc(2);break;case\"\":if(allowNewLine=!0,option.multistr){jsonmode&&warningAt(\"Avoid EOL escapement.\",line,character),c=\"\",character-=1;break}warningAt(\"Bad escapement of EOL. Use option multistr if needed.\",line,character);break;case\"!\":if(\"\u003C\"===s.charAt(j-2))break;default:warningAt(\"Bad escapement.\",line,character)}r+=c,character+=1,j+=1}}for(var b,c,captures,d,depth,high,i,l,low,q,t,isLiteral,isInRange,n;;){if(!s)return it(nextLine()?\"(endline)\":\"(end)\",\"\");if(t=match(tx)){if(isAlpha(c)||\"_\"===c||\"$\"===c)return it(\"(identifier)\",t);if(isDigit(c))return isFinite(Number(t))||warningAt(\"Bad number \\'{a}\\'.\",line,character,t),isAlpha(s.substr(0,1))&&warningAt(\"Missing space after \\'{a}\\'.\",line,character,t),\"0\"===c&&(d=t.substr(1,1),isDigit(d)?\".\"!==token.id&&warningAt(\"Don\\'t use extra leading zeros \\'{a}\\'.\",line,character,t):!jsonmode||\"x\"!==d&&\"X\"!==d||warningAt(\"Avoid 0x-. \\'{a}\\'.\",line,character,t)),\".\"===t.substr(t.length-1)&&warningAt(\"A trailing decimal point can be confused with a dot \\'{a}\\'.\",line,character,t),it(\"(number)\",t);switch(t){case\\'\"\\':case\"\\'\":return string(t);case\"//\":s=\"\",token.comment=!0;break;case\"/*\":for(;i=s.search(lx),!(i>=0);)nextLine()||errorAt(\"Unclosed comment.\",line,character);s=s.substr(i+2),token.comment=!0;break;case\"/*members\":case\"/*member\":case\"/*jshint\":case\"/*jslint\":case\"/*global\":case\"*/\":return{value:t,type:\"special\",line:line,character:character,from:from};case\"\":break;case\"/\":if(\"=\"===s.charAt(0)&&errorAt(\"A regular expression literal can be confused with \\'/=\\'.\",line,from),prereg){for(depth=0,captures=0,l=0;;){switch(b=!0,c=s.charAt(l),l+=1,c){case\"\":return errorAt(\"Unclosed regular expression.\",line,from),quit(\"Stopping.\",line,from);case\"/\":for(depth>0&&warningAt(\"{a} unterminated regular expression group(s).\",line,from+l,depth),c=s.substr(0,l-1),q={g:!0,i:!0,m:!0};q[s.charAt(l)]===!0;)q[s.charAt(l)]=!1,l+=1;return character+=l,s=s.substr(l),q=s.charAt(0),(\"/\"===q||\"*\"===q)&&errorAt(\"Confusing regular expression.\",line,from),it(\"(regexp)\",c);case\"\\\\\\\\\":c=s.charAt(l),\" \">c?warningAt(\"Unexpected control character in regular expression.\",line,from+l):\"\u003C\"===c&&warningAt(\"Unexpected escaped character \\'{a}\\' in regular expression.\",line,from+l,c),l+=1;break;case\"(\":if(depth+=1,b=!1,\"?\"===s.charAt(l))switch(l+=1,s.charAt(l)){case\":\":case\"=\":case\"!\":l+=1;break;default:warningAt(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",line,from+l,\":\",s.charAt(l))}else captures+=1;break;case\"|\":b=!1;break;case\")\":0===depth?warningAt(\"Unescaped \\'{a}\\'.\",line,from+l,\")\"):depth-=1;break;case\" \":for(q=1;\" \"===s.charAt(l);)l+=1,q+=1;q>1&&warningAt(\"Spaces are hard to count. Use {{a}}.\",line,from+l,q);break;case\"[\":c=s.charAt(l),\"^\"===c&&(l+=1,\"]\"===s.charAt(l)&&errorAt(\"Unescaped \\'{a}\\'.\",line,from+l,\"^\")),\"]\"===c&&warningAt(\"Empty class.\",line,from+l-1),isLiteral=!1,isInRange=!1;klass:do switch(c=s.charAt(l),l+=1,c){case\"[\":case\"^\":warningAt(\"Unescaped \\'{a}\\'.\",line,from+l,c),isInRange?isInRange=!1:isLiteral=!0;break;case\"-\":isLiteral&&!isInRange?(isLiteral=!1,isInRange=!0):isInRange?isInRange=!1:\"]\"===s.charAt(l)?isInRange=!0:(option.regexdash!==(2===l||3===l&&\"^\"===s.charAt(1))&&warningAt(\"Unescaped \\'{a}\\'.\",line,from+l-1,\"-\"),isLiteral=!0);break;case\"]\":isInRange&&!option.regexdash&&warningAt(\"Unescaped \\'{a}\\'.\",line,from+l-1,\"-\");break klass;case\"\\\\\\\\\":c=s.charAt(l),\" \">c?warningAt(\"Unexpected control character in regular expression.\",line,from+l):\"\u003C\"===c&&warningAt(\"Unexpected escaped character \\'{a}\\' in regular expression.\",line,from+l,c),l+=1,/[wsd]/i.test(c)?(isInRange&&(warningAt(\"Unescaped \\'{a}\\'.\",line,from+l,\"-\"),isInRange=!1),isLiteral=!1):isInRange?isInRange=!1:isLiteral=!0;break;case\"/\":warningAt(\"Unescaped \\'{a}\\'.\",line,from+l-1,\"/\"),isInRange?isInRange=!1:isLiteral=!0;break;case\"\u003C\":isInRange?isInRange=!1:isLiteral=!0;break;default:isInRange?isInRange=!1:isLiteral=!0}while(c);break;case\".\":option.regexp&&warningAt(\"Insecure \\'{a}\\'.\",line,from+l,c);break;case\"]\":case\"?\":case\"{\":case\"}\":case\"+\":case\"*\":warningAt(\"Unescaped \\'{a}\\'.\",line,from+l,c)}if(b)switch(s.charAt(l)){case\"?\":case\"+\":case\"*\":l+=1,\"?\"===s.charAt(l)&&(l+=1);break;case\"{\":if(l+=1,c=s.charAt(l),\"0\">c||c>\"9\"){warningAt(\"Expected a number and instead saw \\'{a}\\'.\",line,from+l,c);break}for(l+=1,low=+c;c=s.charAt(l),!(\"0\">c||c>\"9\");)l+=1,low=+c+10*low;if(high=low,\",\"===c&&(l+=1,high=1/0,c=s.charAt(l),c>=\"0\"&&\"9\">=c))for(l+=1,high=+c;c=s.charAt(l),!(\"0\">c||c>\"9\");)l+=1,high=+c+10*high;\"}\"!==s.charAt(l)?warningAt(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",line,from+l,\"}\",c):l+=1,\"?\"===s.charAt(l)&&(l+=1),low>high&&warningAt(\"\\'{a}\\' should not be greater than \\'{b}\\'.\",line,from+l,low,high)}}return c=s.substr(0,l-1),character+=l,s=s.substr(l),it(\"(regexp)\",c)}return it(\"(punctuator)\",t);case\"#\":return it(\"(punctuator)\",t);default:return it(\"(punctuator)\",t)}}else{for(t=\"\",c=\"\";s&&\"!\">s;)s=s.substr(1);s&&(errorAt(\"Unexpected \\'{a}\\'.\",line,character,s.substr(0,1)),s=\"\")}}}}}();type(\"(number)\",function(){return this}),type(\"(string)\",function(){return this}),syntax[\"(identifier)\"]={type:\"(identifier)\",lbp:0,identifier:!0,nud:function(){var f,v=this.value,s=scope[v];if(\"function\"==typeof s?s=void 0:\"boolean\"==typeof s&&(f=funct,funct=functions[0],addlabel(v,\"var\"),s=funct,funct=f),funct===s)switch(funct[v]){case\"unused\":funct[v]=\"var\";break;case\"unction\":funct[v]=\"function\",this[\"function\"]=!0;break;case\"function\":this[\"function\"]=!0;break;case\"label\":warning(\"\\'{a}\\' is a statement label.\",token,v)}else if(funct[\"(global)\"])option.undef&&\"boolean\"!=typeof predefined[v]&&(\"typeof\"!==anonname&&\"delete\"!==anonname||nexttoken&&(\".\"===nexttoken.value||\"[\"===nexttoken.value))&&isundef(funct,\"\\'{a}\\' is not defined.\",token,v),note_implied(token);else switch(funct[v]){case\"closure\":case\"function\":case\"var\":case\"unused\":warning(\"\\'{a}\\' used out of scope.\",token,v);break;case\"label\":warning(\"\\'{a}\\' is a statement label.\",token,v);break;case\"outer\":case\"global\":break;default:if(s===!0)funct[v]=!0;else if(null===s)warning(\"\\'{a}\\' is not allowed.\",token,v),note_implied(token);else if(\"object\"!=typeof s)option.undef&&(\"typeof\"!==anonname&&\"delete\"!==anonname||nexttoken&&(\".\"===nexttoken.value||\"[\"===nexttoken.value))&&isundef(funct,\"\\'{a}\\' is not defined.\",token,v),funct[v]=!0,note_implied(token);else switch(s[v]){case\"function\":case\"unction\":this[\"function\"]=!0,s[v]=\"closure\",funct[v]=s[\"(global)\"]?\"global\":\"outer\";break;case\"var\":case\"unused\":s[v]=\"closure\",funct[v]=s[\"(global)\"]?\"global\":\"outer\";break;case\"closure\":funct[v]=s[\"(global)\"]?\"global\":\"outer\";break;case\"label\":warning(\"\\'{a}\\' is a statement label.\",token,v)}}return this},led:function(){error(\"Expected an operator and instead saw \\'{a}\\'.\",nexttoken,nexttoken.value)}},type(\"(regexp)\",function(){return this}),delim(\"(endline)\"),delim(\"(begin)\"),delim(\"(end)\").reach=!0,delim(\"\u003C/\").reach=!0,delim(\"\u003C!\"),delim(\"\u003C!--\"),delim(\"-->\"),delim(\"(error)\").reach=!0,delim(\"}\").reach=!0,delim(\")\"),delim(\"]\"),delim(\\'\"\\').reach=!0,delim(\"\\'\").reach=!0,delim(\";\"),delim(\":\").reach=!0,delim(\",\"),delim(\"#\"),delim(\"@\"),reserve(\"else\"),reserve(\"case\").reach=!0,reserve(\"catch\"),reserve(\"default\").reach=!0,reserve(\"finally\"),reservevar(\"arguments\",function(x){directive[\"use strict\"]&&funct[\"(global)\"]&&warning(\"Strict violation.\",x)}),reservevar(\"eval\"),reservevar(\"false\"),reservevar(\"Infinity\"),reservevar(\"null\"),reservevar(\"this\",function(x){directive[\"use strict\"]&&!option.validthis&&(funct[\"(statement)\"]&&funct[\"(name)\"].charAt(0)>\"Z\"||funct[\"(global)\"])&&warning(\"Possible strict violation.\",x)}),reservevar(\"true\"),reservevar(\"undefined\"),assignop(\"=\",\"assign\",20),assignop(\"+=\",\"assignadd\",20),assignop(\"-=\",\"assignsub\",20),assignop(\"*=\",\"assignmult\",20),assignop(\"/=\",\"assigndiv\",20).nud=function(){error(\"A regular expression literal can be confused with \\'/=\\'.\")},assignop(\"%=\",\"assignmod\",20),bitwiseassignop(\"&=\",\"assignbitand\",20),bitwiseassignop(\"|=\",\"assignbitor\",20),bitwiseassignop(\"^=\",\"assignbitxor\",20),bitwiseassignop(\"\u003C\u003C=\",\"assignshiftleft\",20),bitwiseassignop(\">>=\",\"assignshiftright\",20),bitwiseassignop(\">>>=\",\"assignshiftrightunsigned\",20),infix(\"?\",function(left,that){return that.left=left,that.right=expression(10),advance(\":\"),that[\"else\"]=expression(10),that},30),infix(\"||\",\"or\",40),infix(\"&&\",\"and\",50),bitwise(\"|\",\"bitor\",70),bitwise(\"^\",\"bitxor\",80),bitwise(\"&\",\"bitand\",90),relation(\"==\",function(left,right){var eqnull=option.eqnull&&(\"null\"===left.value||\"null\"===right.value);return!eqnull&&option.eqeqeq?warning(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",this,\"===\",\"==\"):isPoorRelation(left)?warning(\"Use \\'{a}\\' to compare with \\'{b}\\'.\",this,\"===\",left.value):isPoorRelation(right)&&warning(\"Use \\'{a}\\' to compare with \\'{b}\\'.\",this,\"===\",right.value),this}),relation(\"===\"),relation(\"!=\",function(left,right){var eqnull=option.eqnull&&(\"null\"===left.value||\"null\"===right.value);return!eqnull&&option.eqeqeq?warning(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",this,\"!==\",\"!=\"):isPoorRelation(left)?warning(\"Use \\'{a}\\' to compare with \\'{b}\\'.\",this,\"!==\",left.value):isPoorRelation(right)&&warning(\"Use \\'{a}\\' to compare with \\'{b}\\'.\",this,\"!==\",right.value),this}),relation(\"!==\"),relation(\"\u003C\"),relation(\">\"),relation(\"\u003C=\"),relation(\">=\"),bitwise(\"\u003C\u003C\",\"shiftleft\",120),bitwise(\">>\",\"shiftright\",120),bitwise(\">>>\",\"shiftrightunsigned\",120),infix(\"in\",\"in\",120),infix(\"instanceof\",\"instanceof\",120),infix(\"+\",function(left,that){var right=expression(130);return left&&right&&\"(string)\"===left.id&&\"(string)\"===right.id?(left.value+=right.value,left.character=right.character,!option.scripturl&&jx.test(left.value)&&warning(\"JavaScript URL.\",left),left):(that.left=left,that.right=right,that)},130),prefix(\"+\",\"num\"),prefix(\"+++\",function(){return warning(\"Confusing pluses.\"),this.right=expression(150),this.arity=\"unary\",this}),infix(\"+++\",function(left){return warning(\"Confusing pluses.\"),this.left=left,this.right=expression(130),this},130),infix(\"-\",\"sub\",130),prefix(\"-\",\"neg\"),prefix(\"---\",function(){return warning(\"Confusing minuses.\"),this.right=expression(150),this.arity=\"unary\",this}),infix(\"---\",function(left){return warning(\"Confusing minuses.\"),this.left=left,this.right=expression(130),this},130),infix(\"*\",\"mult\",140),infix(\"/\",\"div\",140),infix(\"%\",\"mod\",140),suffix(\"++\",\"postinc\"),prefix(\"++\",\"preinc\"),syntax[\"++\"].exps=!0,suffix(\"--\",\"postdec\"),prefix(\"--\",\"predec\"),syntax[\"--\"].exps=!0,prefix(\"delete\",function(){var p=expression(0);return(!p||\".\"!==p.id&&\"[\"!==p.id)&&warning(\"Variables should not be deleted.\"),this.first=p,this}).exps=!0,prefix(\"~\",function(){return option.bitwise&&warning(\"Unexpected \\'{a}\\'.\",this,\"~\"),expression(150),this}),prefix(\"!\",function(){return this.right=expression(150),this.arity=\"unary\",bang[this.right.id]===!0&&warning(\"Confusing use of \\'{a}\\'.\",this,\"!\"),this}),prefix(\"typeof\",\"typeof\"),prefix(\"new\",function(){var i,c=expression(155);if(c&&\"function\"!==c.id)if(c.identifier)switch(c[\"new\"]=!0,c.value){case\"Number\":case\"String\":case\"Boolean\":case\"Math\":case\"JSON\":warning(\"Do not use {a} as a constructor.\",prevtoken,c.value);break;case\"Function\":option.evil||warning(\"The Function constructor is eval.\");break;case\"Date\":case\"RegExp\":break;default:\"function\"!==c.id&&(i=c.value.substr(0,1),option.newcap&&(\"A\">i||i>\"Z\")&&!is_own(global,c.value)&&warning(\"A constructor name should start with an uppercase letter.\",token))}else\".\"!==c.id&&\"[\"!==c.id&&\"(\"!==c.id&&warning(\"Bad constructor.\",token);else option.supernew||warning(\"Weird construction. Delete \\'new\\'.\",this);return adjacent(token,nexttoken),\"(\"===nexttoken.id||option.supernew||warning(\"Missing \\'()\\' invoking a constructor.\",token,token.value),this.first=c,this}),syntax[\"new\"].exps=!0,prefix(\"void\").exps=!0,infix(\".\",function(left,that){adjacent(prevtoken,token),nobreak();var m=identifier();return\"string\"==typeof m&&countMember(m),that.left=left,that.right=m,!left||\"arguments\"!==left.value||\"callee\"!==m&&\"caller\"!==m?option.evil||!left||\"document\"!==left.value||\"write\"!==m&&\"writeln\"!==m||warning(\"document.write can be a form of eval.\",left):option.noarg?warning(\"Avoid arguments.{a}.\",left,m):directive[\"use strict\"]&&error(\"Strict violation.\"),option.evil||\"eval\"!==m&&\"execScript\"!==m||warning(\"eval is evil.\"),that},160,!0),infix(\"(\",function(left,that){\"}\"!==prevtoken.id&&\")\"!==prevtoken.id&&nobreak(prevtoken,token),nospace(),option.immed&&!left.immed&&\"function\"===left.id&&warning(\"Wrap an immediate function invocation in parentheses to assist the reader in understanding that the expression is the result of a function, and not the function itself.\");var n=0,p=[];if(left&&\"(identifier)\"===left.type&&left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&-1===\"Number String Boolean Date Object\".indexOf(left.value)&&(\"Math\"===left.value?warning(\"Math is not a function.\",left):option.newcap&&warning(\"Missing \\'new\\' prefix when invoking a constructor.\",left)),\")\"!==nexttoken.id)for(;p[p.length]=expression(10),n+=1,\",\"===nexttoken.id;)comma();return advance(\")\"),nospace(prevtoken,token),\"object\"==typeof left&&(\"parseInt\"===left.value&&1===n&&warning(\"Missing radix parameter.\",token),option.evil||(\"eval\"===left.value||\"Function\"===left.value||\"execScript\"===left.value?(warning(\"eval is evil.\",left),p[0]&&\"(string)\"===[0].id&&addInternalSrc(left,p[0].value)):!p[0]||\"(string)\"!==p[0].id||\"setTimeout\"!==left.value&&\"setInterval\"!==left.value?!p[0]||\"(string)\"!==p[0].id||\".\"!==left.value||\"window\"!==left.left.value||\"setTimeout\"!==left.right&&\"setInterval\"!==left.right||(warning(\"Implied eval is evil. Pass a function instead of a string.\",left),addInternalSrc(left,p[0].value)):(warning(\"Implied eval is evil. Pass a function instead of a string.\",left),addInternalSrc(left,p[0].value))),left.identifier||\".\"===left.id||\"[\"===left.id||\"(\"===left.id||\"&&\"===left.id||\"||\"===left.id||\"?\"===left.id||warning(\"Bad invocation.\",left)),that.left=left,that},155,!0).exps=!0,prefix(\"(\",function(){nospace(),\"function\"===nexttoken.id&&(nexttoken.immed=!0);var v=expression(0);return advance(\")\",this),nospace(prevtoken,token),option.immed&&\"function\"===v.id&&\"(\"!==nexttoken.id&&(\".\"!==nexttoken.id||\"call\"!==peek().value&&\"apply\"!==peek().value)&&warning(\"Do not wrap function literals in parens unless they are to be immediately invoked.\",this),v}),infix(\"[\",function(left,that){nobreak(prevtoken,token),nospace();var s,e=expression(0);return e&&\"(string)\"===e.type&&(option.evil||\"eval\"!==e.value&&\"execScript\"!==e.value||warning(\"eval is evil.\",that),countMember(e.value),!option.sub&&ix.test(e.value)&&(s=syntax[e.value],s&&s.reserved||warning(\"[\\'{a}\\'] is better written in dot notation.\",prevtoken,e.value))),advance(\"]\",that),nospace(prevtoken,token),that.left=left,that.right=e,that},160,!0),prefix(\"[\",function(){var b=token.line!==nexttoken.line;for(this.first=[],b&&(indent+=option.indent,nexttoken.from===indent+option.indent&&(indent+=option.indent));\"(end)\"!==nexttoken.id;){for(;\",\"===nexttoken.id;)option.es5||warning(\"Extra comma.\"),advance(\",\");if(\"]\"===nexttoken.id)break;if(b&&token.line!==nexttoken.line&&indentation(),this.first.push(expression(10)),\",\"!==nexttoken.id)break;if(comma(),\"]\"===nexttoken.id&&!option.es5){warning(\"Extra comma.\",token);break}}return b&&(indent-=option.indent,indentation()),advance(\"]\",this),this},160),function(x){x.nud=function(){function saveProperty(name,token){props[name]&&is_own(props,name)?warning(\"Duplicate member \\'{a}\\'.\",nexttoken,i):props[name]={},props[name].basic=!0,props[name].basicToken=token}function saveSetter(name,token){props[name]&&is_own(props,name)?(props[name].basic||props[name].setter)&&warning(\"Duplicate member \\'{a}\\'.\",nexttoken,i):props[name]={},props[name].setter=!0,props[name].setterToken=token}function saveGetter(name){props[name]&&is_own(props,name)?(props[name].basic||props[name].getter)&&warning(\"Duplicate member \\'{a}\\'.\",nexttoken,i):props[name]={},props[name].getter=!0,props[name].getterToken=token}var b,f,i,p,t,props={};for(b=token.line!==nexttoken.line,b&&(indent+=option.indent,nexttoken.from===indent+option.indent&&(indent+=option.indent));\"}\"!==nexttoken.id;){if(b&&indentation(),\"get\"===nexttoken.value&&\":\"!==peek().id)advance(\"get\"),option.es5||error(\"get/set are ES5 features.\"),i=property_name(),i||error(\"Missing property name.\"),saveGetter(i),t=nexttoken,adjacent(token,nexttoken),f=doFunction(),p=f[\"(params)\"],p&&warning(\"Unexpected parameter \\'{a}\\' in get {b} function.\",t,p[0],i),adjacent(token,nexttoken);else if(\"set\"===nexttoken.value&&\":\"!==peek().id)advance(\"set\"),option.es5||error(\"get/set are ES5 features.\"),i=property_name(),i||error(\"Missing property name.\"),saveSetter(i,nexttoken),t=nexttoken,adjacent(token,nexttoken),f=doFunction(),p=f[\"(params)\"],p&&1===p.length||warning(\"Expected a single parameter in set {a} function.\",t,i);else{if(i=property_name(),saveProperty(i,nexttoken),\"string\"!=typeof i)break;advance(\":\"),nonadjacent(token,nexttoken),expression(10)}if(countMember(i),\",\"!==nexttoken.id)break;comma(),\",\"===nexttoken.id?warning(\"Extra comma.\",token):\"}\"!==nexttoken.id||option.es5||warning(\"Extra comma.\",token)}if(b&&(indent-=option.indent,indentation()),advance(\"}\",this),option.es5)for(var name in props)is_own(props,name)&&props[name].setter&&!props[name].getter&&warning(\"Setter is defined without getter.\",props[name].setterToken);return this},x.fud=function(){error(\"Expected to see a statement and instead saw a block.\",token)}}(delim(\"{\")),useESNextSyntax=function(){var conststatement=stmt(\"const\",function(prefix){var id,name,value;for(this.first=[];(nonadjacent(token,nexttoken),id=identifier(),\"const\"===funct[id]&&warning(\"const \\'\"+id+\"\\' has already been declared\"),funct[\"(global)\"]&&predefined[id]===!1&&warning(\"Redefinition of \\'{a}\\'.\",token,id),addlabel(id,\"const\"),!prefix)&&(name=token,this.first.push(token),\"=\"!==nexttoken.id&&warning(\"const \\'{a}\\' is initialized to \\'undefined\\'.\",token,id),\"=\"===nexttoken.id&&(nonadjacent(token,nexttoken),advance(\"=\"),nonadjacent(token,nexttoken),\"undefined\"===nexttoken.id&&warning(\"It is not necessary to initialize \\'{a}\\' to \\'undefined\\'.\",token,id),\"=\"===peek(0).id&&nexttoken.identifier&&error(\"Constant {a} was not declared correctly.\",nexttoken,nexttoken.value),value=expression(0),name.first=value),\",\"===nexttoken.id);)comma();return this});conststatement.exps=!0};var varstatement=stmt(\"var\",function(prefix){var id,name,value;for(funct[\"(onevar)\"]&&option.onevar?warning(\"Too many var statements.\"):funct[\"(global)\"]||(funct[\"(onevar)\"]=!0),this.first=[];(nonadjacent(token,nexttoken),id=identifier(),option.esnext&&\"const\"===funct[id]&&warning(\"const \\'\"+id+\"\\' has already been declared\"),funct[\"(global)\"]&&predefined[id]===!1&&warning(\"Redefinition of \\'{a}\\'.\",token,id),addlabel(id,\"unused\",token),!prefix)&&(name=token,this.first.push(token),\"=\"===nexttoken.id&&(nonadjacent(token,nexttoken),advance(\"=\"),nonadjacent(token,nexttoken),\"undefined\"===nexttoken.id&&warning(\"It is not necessary to initialize \\'{a}\\' to \\'undefined\\'.\",token,id),\"=\"===peek(0).id&&nexttoken.identifier&&error(\"Variable {a} was not declared correctly.\",nexttoken,nexttoken.value),value=expression(0),name.first=value),\",\"===nexttoken.id);)comma();return this});varstatement.exps=!0,blockstmt(\"function\",function(){inblock&&warning(\"Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.\",token);var i=identifier();return option.esnext&&\"const\"===funct[i]&&warning(\"const \\'\"+i+\"\\' has already been declared\"),adjacent(token,nexttoken),addlabel(i,\"unction\",token),doFunction(i,{statement:!0}),\"(\"===nexttoken.id&&nexttoken.line===token.line&&error(\"Function declarations are not invocable. Wrap the whole function invocation in parens.\"),this}),prefix(\"function\",function(){var i=optionalidentifier();return i?adjacent(token,nexttoken):nonadjacent(token,nexttoken),doFunction(i),!option.loopfunc&&funct[\"(loopage)\"]&&warning(\"Don\\'t make functions within a loop.\"),this}),blockstmt(\"if\",function(){var t=nexttoken;return increaseComplexityCount(),advance(\"(\"),nonadjacent(this,t),nospace(),expression(20),\"=\"===nexttoken.id&&(option.boss||warning(\"Assignment in conditional expression\"),advance(\"=\"),expression(20)),advance(\")\",t),nospace(prevtoken,token),block(!0,!0),\"else\"===nexttoken.id&&(nonadjacent(token,nexttoken),advance(\"else\"),\"if\"===nexttoken.id||\"switch\"===nexttoken.id?statement(!0):block(!0,!0)),this}),blockstmt(\"try\",function(){function doCatch(){var e,oldScope=scope;advance(\"catch\"),nonadjacent(token,nexttoken),advance(\"(\"),scope=Object.create(oldScope),e=nexttoken.value,\"(identifier)\"!==nexttoken.type&&(e=null,warning(\"Expected an identifier and instead saw \\'{a}\\'.\",nexttoken,e)),advance(),advance(\")\"),funct={\"(name)\":\"(catch)\",\"(line)\":nexttoken.line,\"(character)\":nexttoken.character,\"(context)\":funct,\"(breakage)\":funct[\"(breakage)\"],\"(loopage)\":funct[\"(loopage)\"],\"(scope)\":scope,\"(statement)\":!1,\"(metrics)\":createMetrics(nexttoken),\"(catch)\":!0,\"(tokens)\":{}},e&&addlabel(e,\"exception\"),token.funct=funct,functions.push(funct),block(!1),scope=oldScope,funct[\"(last)\"]=token.line,funct[\"(lastcharacter)\"]=token.character,funct=funct[\"(context)\"]}var b;return block(!1),\"catch\"===nexttoken.id&&(increaseComplexityCount(),doCatch(),b=!0),\"finally\"===nexttoken.id?(advance(\"finally\"),block(!1),void 0):(b||error(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",nexttoken,\"catch\",nexttoken.value),this)}),blockstmt(\"while\",function(){var t=nexttoken;return funct[\"(breakage)\"]+=1,funct[\"(loopage)\"]+=1,increaseComplexityCount(),advance(\"(\"),nonadjacent(this,t),nospace(),expression(20),\"=\"===nexttoken.id&&(option.boss||warning(\"Assignment in conditional expression\"),advance(\"=\"),expression(20)),advance(\")\",t),nospace(prevtoken,token),block(!0,!0),funct[\"(breakage)\"]-=1,funct[\"(loopage)\"]-=1,this}).labelled=!0,blockstmt(\"with\",function(){var t=nexttoken;return directive[\"use strict\"]?error(\"\\'with\\' is not allowed in strict mode.\",token):option.withstmt||warning(\"Don\\'t use \\'with\\'.\",token),advance(\"(\"),nonadjacent(this,t),nospace(),expression(0),advance(\")\",t),nospace(prevtoken,token),block(!0,!0),this}),blockstmt(\"switch\",function(){var t=nexttoken,g=!1;for(funct[\"(breakage)\"]+=1,advance(\"(\"),nonadjacent(this,t),nospace(),this.condition=expression(20),advance(\")\",t),nospace(prevtoken,token),nonadjacent(token,nexttoken),t=nexttoken,advance(\"{\"),nonadjacent(token,nexttoken),indent+=option.indent,this.cases=[];;)switch(nexttoken.id){case\"case\":switch(funct[\"(verb)\"]){case\"break\":case\"case\":case\"continue\":case\"return\":case\"switch\":case\"throw\":break;default:ft.test(lines[nexttoken.line-2])||warning(\"Expected a \\'break\\' statement before \\'case\\'.\",token)}indentation(-option.indent),advance(\"case\"),this.cases.push(expression(20)),increaseComplexityCount(),g=!0,advance(\":\"),funct[\"(verb)\"]=\"case\";break;case\"default\":switch(funct[\"(verb)\"]){case\"break\":case\"continue\":case\"return\":case\"throw\":break;default:ft.test(lines[nexttoken.line-2])||warning(\"Expected a \\'break\\' statement before \\'default\\'.\",token)}indentation(-option.indent),advance(\"default\"),g=!0,advance(\":\");break;case\"}\":return indent-=option.indent,indentation(),advance(\"}\",t),(1===this.cases.length||\"true\"===this.condition.id||\"false\"===this.condition.id)&&(option.onecase||warning(\"This \\'switch\\' should be an \\'if\\'.\",this)),funct[\"(breakage)\"]-=1,funct[\"(verb)\"]=void 0,void 0;case\"(end)\":return error(\"Missing \\'{a}\\'.\",nexttoken,\"}\"),void 0;default:if(g)switch(token.id){case\",\":return error(\"Each value should have its own case label.\"),void 0;case\":\":g=!1,statements();break;default:return error(\"Missing \\':\\' on a case clause.\",token),void 0}else{if(\":\"!==token.id)return error(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",nexttoken,\"case\",nexttoken.value),void 0;advance(\":\"),error(\"Unexpected \\'{a}\\'.\",token,\":\"),statements()}}}).labelled=!0,stmt(\"debugger\",function(){return option.debug||warning(\"All \\'debugger\\' statements should be removed.\"),this}).exps=!0,function(){var x=stmt(\"do\",function(){funct[\"(breakage)\"]+=1,funct[\"(loopage)\"]+=1,increaseComplexityCount(),this.first=block(!0),advance(\"while\");var t=nexttoken;return nonadjacent(token,t),advance(\"(\"),nospace(),expression(20),\"=\"===nexttoken.id&&(option.boss||warning(\"Assignment in conditional expression\"),advance(\"=\"),expression(20)),advance(\")\",t),nospace(prevtoken,token),funct[\"(breakage)\"]-=1,funct[\"(loopage)\"]-=1,this});x.labelled=!0,x.exps=!0}(),blockstmt(\"for\",function(){var s,t=nexttoken;if(funct[\"(breakage)\"]+=1,funct[\"(loopage)\"]+=1,increaseComplexityCount(),advance(\"(\"),nonadjacent(this,t),nospace(),\"in\"===peek(\"var\"===nexttoken.id?1:0).id){if(\"var\"===nexttoken.id)advance(\"var\"),varstatement.fud.call(varstatement,!0);else{switch(funct[nexttoken.value]){case\"unused\":funct[nexttoken.value]=\"var\";break;case\"var\":break;default:warning(\"Bad for in variable \\'{a}\\'.\",nexttoken,nexttoken.value)}advance()}return advance(\"in\"),expression(20),advance(\")\",t),s=block(!0,!0),option.forin&&s&&(s.length>1||\"object\"!=typeof s[0]||\"if\"!==s[0].value)&&warning(\"The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.\",this),funct[\"(breakage)\"]-=1,funct[\"(loopage)\"]-=1,this}if(\";\"!==nexttoken.id)if(\"var\"===nexttoken.id)advance(\"var\"),varstatement.fud.call(varstatement);else for(;expression(0,\"for\"),\",\"===nexttoken.id;)comma();if(nolinebreak(token),advance(\";\"),\";\"!==nexttoken.id&&(expression(20),\"=\"===nexttoken.id&&(option.boss||warning(\"Assignment in conditional expression\"),advance(\"=\"),expression(20))),nolinebreak(token),advance(\";\"),\";\"===nexttoken.id&&error(\"Expected \\'{a}\\' and instead saw \\'{b}\\'.\",nexttoken,\")\",\";\"),\")\"!==nexttoken.id)for(;expression(0,\"for\"),\",\"===nexttoken.id;)comma();return advance(\")\",t),nospace(prevtoken,token),block(!0,!0),funct[\"(breakage)\"]-=1,funct[\"(loopage)\"]-=1,this}).labelled=!0,stmt(\"break\",function(){var v=nexttoken.value;return 0===funct[\"(breakage)\"]&&warning(\"Unexpected \\'{a}\\'.\",nexttoken,this.value),option.asi||nolinebreak(this),\";\"!==nexttoken.id&&token.line===nexttoken.line&&(\"label\"!==funct[v]?warning(\"\\'{a}\\' is not a statement label.\",nexttoken,v):scope[v]!==funct&&warning(\"\\'{a}\\' is out of scope.\",nexttoken,v),this.first=nexttoken,advance()),reachable(\"break\"),this\\n}).exps=!0,stmt(\"continue\",function(){var v=nexttoken.value;return 0===funct[\"(breakage)\"]&&warning(\"Unexpected \\'{a}\\'.\",nexttoken,this.value),option.asi||nolinebreak(this),\";\"!==nexttoken.id?token.line===nexttoken.line&&(\"label\"!==funct[v]?warning(\"\\'{a}\\' is not a statement label.\",nexttoken,v):scope[v]!==funct&&warning(\"\\'{a}\\' is out of scope.\",nexttoken,v),this.first=nexttoken,advance()):funct[\"(loopage)\"]||warning(\"Unexpected \\'{a}\\'.\",nexttoken,this.value),reachable(\"continue\"),this}).exps=!0,stmt(\"return\",function(){return this.line===nexttoken.line?(\"(regexp)\"===nexttoken.id&&warning(\"Wrap the /regexp/ literal in parens to disambiguate the slash operator.\"),\";\"===nexttoken.id||nexttoken.reach||(nonadjacent(token,nexttoken),\"=\"!==peek().value||option.boss||warningAt(\"Did you mean to return a conditional instead of an assignment?\",token.line,token.character+1),this.first=expression(0))):option.asi||nolinebreak(this),reachable(\"return\"),this}).exps=!0,stmt(\"throw\",function(){return nolinebreak(this),nonadjacent(token,nexttoken),this.first=expression(20),reachable(\"throw\"),this}).exps=!0,reserve(\"class\"),reserve(\"const\"),reserve(\"enum\"),reserve(\"export\"),reserve(\"extends\"),reserve(\"import\"),reserve(\"super\"),reserve(\"let\"),reserve(\"yield\"),reserve(\"implements\"),reserve(\"interface\"),reserve(\"package\"),reserve(\"private\"),reserve(\"protected\"),reserve(\"public\"),reserve(\"static\");var itself=function(s,o,g){var a,i,k,x,optionKeys,newOptionObj={};if(o&&o.scope?JSHINT.scope=o.scope:(JSHINT.errors=[],JSHINT.undefs=[],JSHINT.internals=[],JSHINT.blacklist={},JSHINT.scope=\"(main)\"),predefined=Object.create(standard),declared=Object.create(null),combine(predefined,g||{}),o)for(a=o.predef,a&&(Array.isArray(a)||\"object\"!=typeof a||(a=Object.keys(a)),a.forEach(function(item){var slice;\"-\"===item[0]?(slice=item.slice(1),JSHINT.blacklist[slice]=slice):predefined[item]=!0})),optionKeys=Object.keys(o),x=0;optionKeys.length>x;x++)newOptionObj[optionKeys[x]]=o[optionKeys[x]],\"newcap\"===optionKeys[x]&&o[optionKeys[x]]===!1&&(newOptionObj[\"(explicitNewcap)\"]=!0),\"indent\"===optionKeys[x]&&(newOptionObj.white=!0);for(option=newOptionObj,option.indent=option.indent||4,option.maxerr=option.maxerr||50,tab=\"\",i=0;option.indent>i;i+=1)tab+=\" \";if(indent=1,global=Object.create(predefined),scope=global,funct={\"(global)\":!0,\"(name)\":\"(global)\",\"(scope)\":scope,\"(breakage)\":0,\"(loopage)\":0,\"(tokens)\":{},\"(metrics)\":createMetrics(nexttoken)},functions=[funct],urls=[],stack=null,member={},membersOnly=null,implied={},inblock=!1,lookahead=[],jsonmode=!1,warnings=0,lines=[],unuseds=[],!isString(s)&&!Array.isArray(s))return errorAt(\"Input is neither a string nor an array of strings.\",0),!1;if(isString(s)&&/^\\\\s*$/g.test(s))return errorAt(\"Input is an empty string.\",0),!1;if(0===s.length)return errorAt(\"Input is an empty array.\",0),!1;lex.init(s),prereg=!0,directive={},prevtoken=token=nexttoken=syntax[\"(begin)\"];for(var name in o)is_own(o,name)&&checkOption(name,token);assume(),combine(predefined,g||{}),comma.first=!0,quotmark=void 0;try{switch(advance(),nexttoken.id){case\"{\":case\"[\":option.laxbreak=!0,jsonmode=!0,jsonValue();break;default:directives(),directive[\"use strict\"]&&!option.globalstrict&&warning(\\'Use the function form of \"use strict\".\\',prevtoken),statements()}advance(nexttoken&&\".\"!==nexttoken.value?\"(end)\":void 0);var markDefined=function(name,context){do{if(\"string\"==typeof context[name])return\"unused\"===context[name]?context[name]=\"var\":\"unction\"===context[name]&&(context[name]=\"closure\"),!0;context=context[\"(context)\"]}while(context);return!1},clearImplied=function(name,line){if(implied[name]){for(var newImplied=[],i=0;implied[name].length>i;i+=1)implied[name][i]!==line&&newImplied.push(implied[name][i]);0===newImplied.length?delete implied[name]:implied[name]=newImplied}},warnUnused=function(name,token){var line=token.line,chr=token.character;option.unused&&warningAt(\"\\'{a}\\' is defined but never used.\",line,chr,name),unuseds.push({name:name,line:line,character:chr})},checkUnused=function(func,key){var type=func[key],token=func[\"(tokens)\"][key];\"(\"!==key.charAt(0)&&(\"unused\"===type||\"unction\"===type)&&(func[\"(params)\"]&&-1!==func[\"(params)\"].indexOf(key)||warnUnused(key,token))};for(i=0;JSHINT.undefs.length>i;i+=1)k=JSHINT.undefs[i].slice(0),markDefined(k[2].value,k[0])?clearImplied(k[2].value,k[2].line):warning.apply(warning,k.slice(1));functions.forEach(function(func){for(var key in func)is_own(func,key)&&checkUnused(func,key);if(func[\"(params)\"])for(var type,params=func[\"(params)\"].slice(),param=params.pop();param;){if(type=func[param],\"undefined\"===param)return;if(\"unused\"!==type&&\"unction\"!==type)return;warnUnused(param,func[\"(tokens)\"][param]),param=params.pop()}});for(var key in declared)is_own(declared,key)&&!is_own(global,key)&&warnUnused(key,declared[key])}catch(e){if(e){var nt=nexttoken||{};JSHINT.errors.push({raw:e.raw,reason:e.message,line:e.line||nt.line,character:e.character||nt.from},null)}}if(\"(main)\"===JSHINT.scope)for(o=o||{},i=0;JSHINT.internals.length>i;i+=1)k=JSHINT.internals[i],o.scope=k.elem,itself(k.value,o,g);return 0===JSHINT.errors.length};return itself.data=function(){var fu,f,i,j,n,globals,data={functions:[],options:option},implieds=[],members=[];itself.errors.length&&(data.errors=itself.errors),jsonmode&&(data.json=!0);for(n in implied)is_own(implied,n)&&implieds.push({name:n,line:implied[n]});for(implieds.length>0&&(data.implieds=implieds),urls.length>0&&(data.urls=urls),globals=Object.keys(scope),globals.length>0&&(data.globals=globals),i=1;functions.length>i;i+=1){for(f=functions[i],fu={},j=0;functionicity.length>j;j+=1)fu[functionicity[j]]=[];for(j=0;functionicity.length>j;j+=1)0===fu[functionicity[j]].length&&delete fu[functionicity[j]];fu.name=f[\"(name)\"],fu.param=f[\"(params)\"],fu.line=f[\"(line)\"],fu.character=f[\"(character)\"],fu.last=f[\"(last)\"],fu.lastcharacter=f[\"(lastcharacter)\"],data.functions.push(fu)}unuseds.length>0&&(data.unused=unuseds),members=[];for(n in member)if(\"number\"==typeof member[n]){data.member=member;break}return data},itself.jshint=itself,itself}();\"object\"==typeof exports&&exports&&(exports.JSHINT=JSHINT)});'\n})()},{}],23:[function(){\"use strict\";Function.prototype.bind||(Function.prototype.bind=function(this_){if(\"function\"!=typeof this)throw new TypeError(\"Function.prototype.bind - what is trying to be bound is not callable\");var args=Array.prototype.slice.call(arguments,1),fn=this,Noop=function(){},fnbound=function(){return fn.apply(this instanceof Noop&&this_?this:this_,args.concat(Array.prototype.slice.call(arguments)))};return Noop.prototype=this.prototype,fnbound.prototype=new Noop,fnbound})},{}],21:[function(require,module){\"use strict\";function scroll(elem){elem&&(elem.scrollTop=elem.scrollHeight)}var Terminal=require(\"./term\"),through=require(\"through\");module.exports=function(opts){var term=new Terminal(opts);term.open();var hypernal=through(term.write.bind(term));return hypernal.appendTo=function(elem){\"string\"==typeof elem&&(elem=document.querySelector(elem)),elem.appendChild(term.element),elem.setAttribute(\"style\",\"overflow-y : auto;\"),hypernal.container=elem,term.element.style.position=\"relative\"},hypernal.writeln=function(line){term.writeln(line),hypernal.tail&&scroll(hypernal.container)},hypernal.write=function(data){term.write(data),hypernal.tail&&scroll(hypernal.container)},hypernal.reset=term.reset.bind(term),hypernal.element=term.element,hypernal.term=term,hypernal}},{\"./term\":24,through:25}],22:[function(require,module){(function(process){\"use strict\";function highlightLines(script){return highlight(script,{linenos:!0}).split(\"\\n\")}require(\"./lib/shim-bind\");var highlight=require(\"cardinal\").highlight,snippetify=require(\"snippetify\"),evalSnippets=require(\"./lib/eval-snippets\"),resolveTales=require(\"./lib/resolve-tales\");process.browser,module.exports=function(script,scriptPath,opts){opts=opts||{};var toLines=opts.toLines||highlightLines,writeln=opts.writeln||(process.browser===!0?function(){}:console.log.bind(console)),snippets=snippetify(script,{nonstrict:!0});evalSnippets(snippets,scriptPath,opts.diff);var tales=resolveTales(snippets,opts),lines=toLines(script),offset=0;return tales.forEach(function(x){x.tale.length&&lines.splice(x.insertAfter+offset++,0,x.tale)}),lines=lines.filter(function(x){return x.length}),lines.forEach(function(line){writeln(line)}),lines}})(require(\"__browserify_process\"))},{\"./lib/shim-bind\":23,\"./lib/eval-snippets\":26,\"./lib/resolve-tales\":27,cardinal:28,snippetify:29,__browserify_process:16}],20:[function(require,module){(function(){(function(){function exportAce(ns){var acequire=function(module,callback){return _acequire(\"\",module,callback)},root=global;ns&&(global[ns]||(global[ns]={}),root=global[ns]),root.define&&root.define.packaged||(_define.original=root.define,root.define=_define,root.define.packaged=!0),root.acequire&&root.acequire.packaged||(_acequire.original=root.acequire,root.acequire=acequire,root.acequire.packaged=!0)}var ACE_NAMESPACE=\"ace\",global=function(){return this}();if(ACE_NAMESPACE||\"undefined\"==typeof acequirejs){var _define=function(module,deps,payload){return\"string\"!=typeof module?(_define.original?_define.original.apply(window,arguments):(console.error(\"dropping module because define wasn't a string.\"),console.trace()),void 0):(2==arguments.length&&(payload=deps),_define.modules||(_define.modules={}),_define.modules[module]=payload,void 0)},_acequire=function(parentId,module,callback){if(\"[object Array]\"===Object.prototype.toString.call(module)){for(var params=[],i=0,l=module.length;l>i;++i){var dep=lookup(parentId,module[i]);if(!dep&&_acequire.original)return _acequire.original.apply(window,arguments);params.push(dep)}callback&&callback.apply(null,params)}else{if(\"string\"==typeof module){var payload=lookup(parentId,module);return!payload&&_acequire.original?_acequire.original.apply(window,arguments):(callback&&callback(),payload)}if(_acequire.original)return _acequire.original.apply(window,arguments)}},normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\"!\")){var chunks=moduleName.split(\"!\");return normalizeModule(parentId,chunks[0])+\"!\"+normalizeModule(parentId,chunks[1])}if(\".\"==moduleName.charAt(0)){var base=parentId.split(\"/\").slice(0,-1).join(\"/\");for(moduleName=base+\"/\"+moduleName;-1!==moduleName.indexOf(\".\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return moduleName},lookup=function(parentId,moduleName){moduleName=normalizeModule(parentId,moduleName);var module=_define.modules[moduleName];if(!module)return null;if(\"function\"==typeof module){var exports={},mod={id:moduleName,uri:\"\",exports:exports,packaged:!0},req=function(module,callback){return _acequire(moduleName,module,callback)},returnValue=module(req,exports,mod);return exports=returnValue||mod.exports,_define.modules[moduleName]=exports,exports}return module};exportAce(ACE_NAMESPACE)}})(),ace.define(\"ace/ace\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/editor\",\"ace/edit_session\",\"ace/undomanager\",\"ace/virtual_renderer\",\"ace/multi_select\",\"ace/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/mode/folding/fold_mode\",\"ace/theme/textmate\",\"ace/config\"],function(acequire,exports){acequire(\"./lib/fixoldbrowsers\");var dom=acequire(\"./lib/dom\"),event=acequire(\"./lib/event\"),Editor=acequire(\"./editor\").Editor,EditSession=acequire(\"./edit_session\").EditSession,UndoManager=acequire(\"./undomanager\").UndoManager,Renderer=acequire(\"./virtual_renderer\").VirtualRenderer,MultiSelect=acequire(\"./multi_select\").MultiSelect;acequire(\"./worker/worker_client\"),acequire(\"./keyboard/hash_handler\"),acequire(\"./placeholder\"),acequire(\"./mode/folding/fold_mode\"),acequire(\"./theme/textmate\"),exports.config=acequire(\"./config\"),exports.acequire=acequire,exports.edit=function(el){if(\"string\"==typeof el){var _id=el,el=document.getElementById(_id);if(!el)throw\"ace.edit can't find div #\"+_id}if(el.env&&el.env.editor instanceof Editor)return el.env.editor;var doc=exports.createEditSession(dom.getInnerText(el));el.innerHTML=\"\";var editor=new Editor(new Renderer(el));new MultiSelect(editor),editor.setSession(doc);var env={document:doc,editor:editor,onResize:editor.resize.bind(editor,null)};return event.addListener(window,\"resize\",env.onResize),editor.on(\"destroy\",function(){event.removeListener(window,\"resize\",env.onResize)}),el.env=editor.env=env,editor},exports.createEditSession=function(text){var doc=new EditSession(text,doc);return doc.setUndoManager(new UndoManager),doc},exports.EditSession=EditSession,exports.UndoManager=UndoManager}),ace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"],function(acequire){acequire(\"./regexp\"),acequire(\"./es5-shim\")}),ace.define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"],function(){function getNativeFlags(regex){return(regex.global?\"g\":\"\")+(regex.ignoreCase?\"i\":\"\")+(regex.multiline?\"m\":\"\")+(regex.extended?\"x\":\"\")+(regex.sticky?\"y\":\"\")}function indexOf(array,item,from){if(Array.prototype.indexOf)return array.indexOf(item,from);for(var i=from||0;array.length>i;i++)if(array[i]===item)return i;return-1}var real={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},compliantExecNpcg=void 0===real.exec.call(/()??/,\"\")[1],compliantLastIndexIncrement=function(){var x=/^/g;return real.test.call(x,\"\"),!x.lastIndex}();compliantLastIndexIncrement&&compliantExecNpcg||(RegExp.prototype.exec=function(str){var name,r2,match=real.exec.apply(this,arguments);if(\"string\"==typeof str&&match){if(!compliantExecNpcg&&match.length>1&&indexOf(match,\"\")>-1&&(r2=RegExp(this.source,real.replace.call(getNativeFlags(this),\"g\",\"\")),real.replace.call(str.slice(match.index),r2,function(){for(var i=1;arguments.length-2>i;i++)void 0===arguments[i]&&(match[i]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var i=1;match.length>i;i++)name=this._xregexp.captureNames[i-1],name&&(match[name]=match[i]);!compliantLastIndexIncrement&&this.global&&!match[0].length&&this.lastIndex>match.index&&this.lastIndex--}return match},compliantLastIndexIncrement||(RegExp.prototype.test=function(str){var match=real.exec.call(this,str);return match&&this.global&&!match[0].length&&this.lastIndex>match.index&&this.lastIndex--,!!match}))}),ace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\"sentinel\",{}),\"sentinel\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\"function\"!=typeof target)throw new TypeError(\"Function.prototype.bind called on incompatible \"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\"__defineGetter__\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\"XXX\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\"[object Array]\"==_toString(obj)});var boxedString=Object(\"a\"),splitString=\"a\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduce of empty array with no initial value\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\"reduce of empty array with no initial value\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduceRight of empty array with no initial value\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\"reduceRight of empty array with no initial value\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(object,property){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\"undefined\"==typeof document||doesDefinePropertyWork(document.createElement(\"div\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\"Property description must be an object: \",ERR_NON_OBJECT_TARGET=\"Object.defineProperty called on non-object: \",ERR_ACCESSORS_NOT_SUPPORTED=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(object,property,descriptor){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\"object\"!=typeof descriptor&&\"function\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\"value\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\"get\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\"set\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\"function\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\"\";owns(object,name);)name+=\"?\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(\"Object.keys called on a non-object\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\"\t\\n\u000b\\f\\r  ᠎              \\u2028\\u2029\";if(!String.prototype.trim||ws.trim()){ws=\"[\"+ws+\"]\";var trimBeginRegexp=RegExp(\"^\"+ws+ws+\"*\"),trimEndRegexp=RegExp(ws+ws+\"*$\");String.prototype.trim=function(){return(this+\"\").replace(trimBeginRegexp,\"\").replace(trimEndRegexp,\"\")}}var toObject=function(o){if(null==o)throw new TypeError(\"can't convert \"+o+\" to object\");return Object(o)}}),ace.define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\"],function(acequire,exports){if(\"undefined\"!=typeof document){var XHTML_NS=\"http://www.w3.org/1999/xhtml\";exports.getDocumentHead=function(doc){return doc||(doc=document),doc.head||doc.getElementsByTagName(\"head\")[0]||doc.documentElement},exports.createElement=function(tag,ns){return document.createElementNS?document.createElementNS(ns||XHTML_NS,tag):document.createElement(tag)},exports.hasCssClass=function(el,name){var classes=el.className.split(/\\s+/g);return-1!==classes.indexOf(name)},exports.addCssClass=function(el,name){exports.hasCssClass(el,name)||(el.className+=\" \"+name)},exports.removeCssClass=function(el,name){for(var classes=el.className.split(/\\s+/g);;){var index=classes.indexOf(name);if(-1==index)break;classes.splice(index,1)}el.className=classes.join(\" \")},exports.toggleCssClass=function(el,name){for(var classes=el.className.split(/\\s+/g),add=!0;;){var index=classes.indexOf(name);if(-1==index)break;add=!1,classes.splice(index,1)}return add&&classes.push(name),el.className=classes.join(\" \"),add},exports.setCssClass=function(node,className,include){include?exports.addCssClass(node,className):exports.removeCssClass(node,className)},exports.hasCssString=function(id,doc){var sheets,index=0;if(doc=doc||document,doc.createStyleSheet&&(sheets=doc.styleSheets)){for(;sheets.length>index;)if(sheets[index++].owningElement.id===id)return!0}else if(sheets=doc.getElementsByTagName(\"style\"))for(;sheets.length>index;)if(sheets[index++].id===id)return!0;return!1},exports.importCssString=function(cssText,id,doc){if(doc=doc||document,id&&exports.hasCssString(id,doc))return null;var style;doc.createStyleSheet?(style=doc.createStyleSheet(),style.cssText=cssText,id&&(style.owningElement.id=id)):(style=doc.createElementNS?doc.createElementNS(XHTML_NS,\"style\"):doc.createElement(\"style\"),style.appendChild(doc.createTextNode(cssText)),id&&(style.id=id),exports.getDocumentHead(doc).appendChild(style))},exports.importCssStylsheet=function(uri,doc){if(doc.createStyleSheet)doc.createStyleSheet(uri);else{var link=exports.createElement(\"link\");link.rel=\"stylesheet\",link.href=uri,exports.getDocumentHead(doc).appendChild(link)}},exports.getInnerWidth=function(element){return parseInt(exports.computedStyle(element,\"paddingLeft\"),10)+parseInt(exports.computedStyle(element,\"paddingRight\"),10)+element.clientWidth},exports.getInnerHeight=function(element){return parseInt(exports.computedStyle(element,\"paddingTop\"),10)+parseInt(exports.computedStyle(element,\"paddingBottom\"),10)+element.clientHeight},void 0!==window.pageYOffset?(exports.getPageScrollTop=function(){return window.pageYOffset},exports.getPageScrollLeft=function(){return window.pageXOffset}):(exports.getPageScrollTop=function(){return document.body.scrollTop},exports.getPageScrollLeft=function(){return document.body.scrollLeft}),exports.computedStyle=window.getComputedStyle?function(element,style){return style?(window.getComputedStyle(element,\"\")||{})[style]||\"\":window.getComputedStyle(element,\"\")||{}}:function(element,style){return style?element.currentStyle[style]:element.currentStyle},exports.scrollbarWidth=function(document){var inner=exports.createElement(\"ace_inner\");inner.style.width=\"100%\",inner.style.minWidth=\"0px\",inner.style.height=\"200px\",inner.style.display=\"block\";var outer=exports.createElement(\"ace_outer\"),style=outer.style;style.position=\"absolute\",style.left=\"-10000px\",style.overflow=\"hidden\",style.width=\"200px\",style.minWidth=\"0px\",style.height=\"150px\",style.display=\"block\",outer.appendChild(inner);var body=document.documentElement;body.appendChild(outer);var noScrollbar=inner.offsetWidth;style.overflow=\"scroll\";var withScrollbar=inner.offsetWidth;return noScrollbar==withScrollbar&&(withScrollbar=outer.clientWidth),body.removeChild(outer),noScrollbar-withScrollbar},exports.setInnerHtml=function(el,innerHtml){var element=el.cloneNode(!1);return element.innerHTML=innerHtml,el.parentNode.replaceChild(element,el),element},\"textContent\"in document.documentElement?(exports.setInnerText=function(el,innerText){el.textContent=innerText},exports.getInnerText=function(el){return el.textContent}):(exports.setInnerText=function(el,innerText){el.innerText=innerText},exports.getInnerText=function(el){return el.innerText}),exports.getParentWindow=function(document){return document.defaultView||document.parentWindow}}}),ace.define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\",\"ace/lib/dom\"],function(acequire,exports){function normalizeCommandKeys(callback,e,keyCode){var hashId=0;if(hashId=!useragent.isOpera||\"KeyboardEvent\"in window||!useragent.isMac?0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0):0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0),keyCode in keys.MODIFIER_KEYS){switch(keys.MODIFIER_KEYS[keyCode]){case\"Alt\":hashId=2;break;case\"Shift\":hashId=4;break;case\"Ctrl\":hashId=1;break;default:hashId=8}keyCode=0}return 8&hashId&&(91==keyCode||93==keyCode)&&(keyCode=0),hashId||keyCode in keys.FUNCTION_KEYS||keyCode in keys.PRINTABLE_KEYS?callback(e,hashId,keyCode):!1}var keys=acequire(\"./keys\"),useragent=acequire(\"./useragent\");if(acequire(\"./dom\"),exports.addListener=function(elem,type,callback){if(elem.addEventListener)return elem.addEventListener(type,callback,!1);if(elem.attachEvent){var wrapper=function(){callback(window.event)};callback._wrapper=wrapper,elem.attachEvent(\"on\"+type,wrapper)}},exports.removeListener=function(elem,type,callback){return elem.removeEventListener?elem.removeEventListener(type,callback,!1):(elem.detachEvent&&elem.detachEvent(\"on\"+type,callback._wrapper||callback),void 0)},exports.stopEvent=function(e){return exports.stopPropagation(e),exports.preventDefault(e),!1},exports.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},exports.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},exports.getButton=function(e){return\"dblclick\"==e.type?0:\"contextmenu\"==e.type||e.ctrlKey&&useragent.isMac?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},exports.capture=document.documentElement.setCapture?function(el,eventHandler,releaseCaptureHandler){function onReleaseCapture(e){eventHandler(e),called||(called=!0,releaseCaptureHandler(e)),exports.removeListener(el,\"mousemove\",eventHandler),exports.removeListener(el,\"mouseup\",onReleaseCapture),exports.removeListener(el,\"losecapture\",onReleaseCapture),el.releaseCapture()}var called=!1;exports.addListener(el,\"mousemove\",eventHandler),exports.addListener(el,\"mouseup\",onReleaseCapture),exports.addListener(el,\"losecapture\",onReleaseCapture),el.setCapture()}:function(el,eventHandler,releaseCaptureHandler){function onMouseUp(e){eventHandler&&eventHandler(e),releaseCaptureHandler&&releaseCaptureHandler(e),document.removeEventListener(\"mousemove\",eventHandler,!0),document.removeEventListener(\"mouseup\",onMouseUp,!0),e.stopPropagation()}document.addEventListener(\"mousemove\",eventHandler,!0),document.addEventListener(\"mouseup\",onMouseUp,!0)},exports.addMouseWheelListener=function(el,callback){var factor=8,listener=function(e){void 0!==e.wheelDelta?void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/factor,e.wheelY=-e.wheelDeltaY/factor):(e.wheelX=0,e.wheelY=-e.wheelDelta/factor):e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),callback(e)};exports.addListener(el,\"DOMMouseScroll\",listener),exports.addListener(el,\"mousewheel\",listener)},exports.addMultiMouseDownListener=function(el,timeouts,eventHandler,callbackName){var startX,startY,timer,clicks=0,eventNames={2:\"dblclick\",3:\"tripleclick\",4:\"quadclick\"};exports.addListener(el,\"mousedown\",function(e){if(0!=exports.getButton(e))clicks=0;else{var isNewClick=Math.abs(e.clientX-startX)>5||Math.abs(e.clientY-startY)>5;(!timer||isNewClick)&&(clicks=0),clicks+=1,timer&&clearTimeout(timer),timer=setTimeout(function(){timer=null},timeouts[clicks-1]||600)}if(1==clicks&&(startX=e.clientX,startY=e.clientY),eventHandler[callbackName](\"mousedown\",e),clicks>4)clicks=0;else if(clicks>1)return eventHandler[callbackName](eventNames[clicks],e)}),useragent.isOldIE&&exports.addListener(el,\"dblclick\",function(e){clicks=2,timer&&clearTimeout(timer),timer=setTimeout(function(){timer=null},timeouts[clicks-1]||600),eventHandler[callbackName](\"mousedown\",e),eventHandler[callbackName](eventNames[clicks],e)})},exports.addCommandKeyListener=function(el,callback){var addListener=exports.addListener;if(useragent.isOldGecko||useragent.isOpera&&!(\"KeyboardEvent\"in window)){var lastKeyDownKeyCode=null;addListener(el,\"keydown\",function(e){lastKeyDownKeyCode=e.keyCode}),addListener(el,\"keypress\",function(e){return normalizeCommandKeys(callback,e,lastKeyDownKeyCode)})}else{var lastDown=null;addListener(el,\"keydown\",function(e){return lastDown=e.keyIdentifier||e.keyCode,normalizeCommandKeys(callback,e,e.keyCode)})}},window.postMessage&&!useragent.isOldIE){var postMessageId=1;exports.nextTick=function(callback,win){win=win||window;var messageName=\"zero-timeout-message-\"+postMessageId;exports.addListener(win,\"message\",function listener(e){e.data==messageName&&(exports.stopPropagation(e),exports.removeListener(win,\"message\",listener),callback())}),win.postMessage(messageName,\"*\")}}exports.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,exports.nextFrame=exports.nextFrame?exports.nextFrame.bind(window):function(callback){setTimeout(callback,17)}}),ace.define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\"],function(acequire,exports){var oop=acequire(\"./oop\"),Keys=function(){var ret={MODIFIER_KEYS:{16:\"Shift\",17:\"Ctrl\",18:\"Alt\",224:\"Meta\"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:\"Backspace\",9:\"Tab\",13:\"Return\",19:\"Pause\",27:\"Esc\",32:\"Space\",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"Left\",38:\"Up\",39:\"Right\",40:\"Down\",44:\"Print\",45:\"Insert\",46:\"Delete\",96:\"Numpad0\",97:\"Numpad1\",98:\"Numpad2\",99:\"Numpad3\",100:\"Numpad4\",101:\"Numpad5\",102:\"Numpad6\",103:\"Numpad7\",104:\"Numpad8\",105:\"Numpad9\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"Numlock\",145:\"Scrolllock\"},PRINTABLE_KEYS:{32:\" \",48:\"0\",49:\"1\",50:\"2\",51:\"3\",52:\"4\",53:\"5\",54:\"6\",55:\"7\",56:\"8\",57:\"9\",59:\";\",61:\"=\",65:\"a\",66:\"b\",67:\"c\",68:\"d\",69:\"e\",70:\"f\",71:\"g\",72:\"h\",73:\"i\",74:\"j\",75:\"k\",76:\"l\",77:\"m\",78:\"n\",79:\"o\",80:\"p\",81:\"q\",82:\"r\",83:\"s\",84:\"t\",85:\"u\",86:\"v\",87:\"w\",88:\"x\",89:\"y\",90:\"z\",107:\"+\",109:\"-\",110:\".\",188:\",\",190:\".\",191:\"/\",192:\"`\",219:\"[\",220:\"\\\\\",221:\"]\",222:\"'\"}};for(var i in ret.FUNCTION_KEYS){var name=ret.FUNCTION_KEYS[i].toLowerCase();ret[name]=parseInt(i,10)}return oop.mixin(ret,ret.MODIFIER_KEYS),oop.mixin(ret,ret.PRINTABLE_KEYS),oop.mixin(ret,ret.FUNCTION_KEYS),ret.enter=ret[\"return\"],ret.escape=ret.esc,ret.del=ret[\"delete\"],ret[173]=\"-\",ret}();oop.mixin(exports,Keys),exports.keyCodeToString=function(keyCode){return(Keys[keyCode]||String.fromCharCode(keyCode)).toLowerCase()}}),ace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(acequire,exports){exports.inherits=function(){var tempCtor=function(){};\nreturn function(ctor,superCtor){tempCtor.prototype=superCtor.prototype,ctor.super_=superCtor.prototype,ctor.prototype=new tempCtor,ctor.prototype.constructor=ctor}}(),exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"],function(acequire,exports){if(exports.OS={LINUX:\"LINUX\",MAC:\"MAC\",WINDOWS:\"WINDOWS\"},exports.getOS=function(){return exports.isMac?exports.OS.MAC:exports.isLinux?exports.OS.LINUX:exports.OS.WINDOWS},\"object\"==typeof navigator){var os=(navigator.platform.match(/mac|win|linux/i)||[\"other\"])[0].toLowerCase(),ua=navigator.userAgent;exports.isWin=\"win\"==os,exports.isMac=\"mac\"==os,exports.isLinux=\"linux\"==os,exports.isIE=(\"Microsoft Internet Explorer\"==navigator.appName||navigator.appName.indexOf(\"MSAppHost\")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\\.0-9]+)/)[1]),exports.isOldIE=exports.isIE&&9>exports.isIE,exports.isGecko=exports.isMozilla=window.controllers&&\"Gecko\"===window.navigator.product,exports.isOldGecko=exports.isGecko&&4>parseInt((navigator.userAgent.match(/rv\\:(\\d+)/)||[])[1],10),exports.isOpera=window.opera&&\"[object Opera]\"==Object.prototype.toString.call(window.opera),exports.isWebKit=parseFloat(ua.split(\"WebKit/\")[1])||void 0,exports.isChrome=parseFloat(ua.split(\" Chrome/\")[1])||void 0,exports.isAIR=ua.indexOf(\"AdobeAIR\")>=0,exports.isIPad=ua.indexOf(\"iPad\")>=0,exports.isTouchPad=ua.indexOf(\"TouchPad\")>=0}}),ace.define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/keyboard/textinput\",\"ace/mouse/mouse_handler\",\"ace/mouse/fold_handler\",\"ace/keyboard/keybinding\",\"ace/edit_session\",\"ace/search\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/commands/command_manager\",\"ace/commands/default_commands\",\"ace/config\"],function(acequire,exports){acequire(\"./lib/fixoldbrowsers\");var oop=acequire(\"./lib/oop\"),lang=acequire(\"./lib/lang\"),useragent=acequire(\"./lib/useragent\"),TextInput=acequire(\"./keyboard/textinput\").TextInput,MouseHandler=acequire(\"./mouse/mouse_handler\").MouseHandler,FoldHandler=acequire(\"./mouse/fold_handler\").FoldHandler,KeyBinding=acequire(\"./keyboard/keybinding\").KeyBinding,EditSession=acequire(\"./edit_session\").EditSession,Search=acequire(\"./search\").Search,Range=acequire(\"./range\").Range,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,CommandManager=acequire(\"./commands/command_manager\").CommandManager,defaultCommands=acequire(\"./commands/default_commands\").commands,config=acequire(\"./config\"),Editor=function(renderer,session){var container=renderer.getContainerElement();this.container=container,this.renderer=renderer,this.commands=new CommandManager(useragent.isMac?\"mac\":\"win\",defaultCommands),this.textInput=new TextInput(renderer.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new KeyBinding(this),this.$mouseHandler=new MouseHandler(this),new FoldHandler(this),this.$blockScrolling=0,this.$search=(new Search).set({wrap:!0}),this.setSession(session||new EditSession(\"\")),config.resetOptions(this),config._emit(\"editor\",this)};(function(){oop.implement(this,EventEmitter),this.setKeyboardHandler=function(keyboardHandler){if(keyboardHandler)if(\"string\"==typeof keyboardHandler){this.$keybindingId=keyboardHandler;var _self=this;config.loadModule([\"keybinding\",keyboardHandler],function(module){_self.$keybindingId==keyboardHandler&&_self.keyBinding.setKeyboardHandler(module&&module.handler)})}else delete this.$keybindingId,this.keyBinding.setKeyboardHandler(keyboardHandler);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(session){if(this.session!=session){if(this.session){var oldSession=this.session;this.session.removeEventListener(\"change\",this.$onDocumentChange),this.session.removeEventListener(\"changeMode\",this.$onChangeMode),this.session.removeEventListener(\"tokenizerUpdate\",this.$onTokenizerUpdate),this.session.removeEventListener(\"changeTabSize\",this.$onChangeTabSize),this.session.removeEventListener(\"changeWrapLimit\",this.$onChangeWrapLimit),this.session.removeEventListener(\"changeWrapMode\",this.$onChangeWrapMode),this.session.removeEventListener(\"onChangeFold\",this.$onChangeFold),this.session.removeEventListener(\"changeFrontMarker\",this.$onChangeFrontMarker),this.session.removeEventListener(\"changeBackMarker\",this.$onChangeBackMarker),this.session.removeEventListener(\"changeBreakpoint\",this.$onChangeBreakpoint),this.session.removeEventListener(\"changeAnnotation\",this.$onChangeAnnotation),this.session.removeEventListener(\"changeOverwrite\",this.$onCursorChange),this.session.removeEventListener(\"changeScrollTop\",this.$onScrollTopChange),this.session.removeEventListener(\"changeScrollLeft\",this.$onScrollLeftChange);var selection=this.session.getSelection();selection.removeEventListener(\"changeCursor\",this.$onCursorChange),selection.removeEventListener(\"changeSelection\",this.$onSelectionChange)}this.session=session,this.$onDocumentChange=this.onDocumentChange.bind(this),session.addEventListener(\"change\",this.$onDocumentChange),this.renderer.setSession(session),this.$onChangeMode=this.onChangeMode.bind(this),session.addEventListener(\"changeMode\",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),session.addEventListener(\"tokenizerUpdate\",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),session.addEventListener(\"changeTabSize\",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),session.addEventListener(\"changeWrapLimit\",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),session.addEventListener(\"changeWrapMode\",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),session.addEventListener(\"changeFold\",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener(\"changeFrontMarker\",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener(\"changeBackMarker\",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener(\"changeBreakpoint\",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener(\"changeAnnotation\",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener(\"changeOverwrite\",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener(\"changeScrollTop\",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener(\"changeScrollLeft\",this.$onScrollLeftChange),this.selection=session.getSelection(),this.selection.addEventListener(\"changeCursor\",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener(\"changeSelection\",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit(\"changeSession\",{session:session,oldSession:oldSession})}},this.getSession=function(){return this.session},this.setValue=function(val,cursorPos){return this.session.doc.setValue(val),cursorPos?1==cursorPos?this.navigateFileEnd():-1==cursorPos&&this.navigateFileStart():this.selectAll(),val},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(force){this.renderer.onResize(force)},this.setTheme=function(theme){this.renderer.setTheme(theme)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(style){this.renderer.setStyle(style)},this.unsetStyle=function(style){this.renderer.unsetStyle(style)},this.setFontSize=function(size){this.setOption(\"fontSize\",size)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var self=this;this.$highlightPending=!0,setTimeout(function(){self.$highlightPending=!1;var pos=self.session.findMatchingBracket(self.getCursorPosition());if(pos)var range=new Range(pos.row,pos.column,pos.row,pos.column+1);else if(self.session.$mode.getMatching)var range=self.session.$mode.getMatching(self.session);range&&(self.session.$bracketHighlight=self.session.addMarker(range,\"ace_bracket\",\"text\"))},50)}},this.focus=function(){var _self=this;setTimeout(function(){_self.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit(\"focus\"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit(\"blur\"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var lastRow,delta=e.data,range=delta.range;lastRow=range.start.row==range.end.row&&\"insertLines\"!=delta.action&&\"removeLines\"!=delta.action?range.end.row:1/0,this.renderer.updateLines(range.start.row,lastRow),this._emit(\"change\",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var rows=e.data;this.renderer.updateLines(rows.first,rows.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit(\"changeSelection\")},this.$updateHighlightActiveLine=function(){var highlight,session=this.getSession();if(this.$highlightActiveLine&&(\"line\"==this.$selectionStyle&&this.selection.isMultiLine()||(highlight=this.getCursorPosition())),session.$highlightLineMarker&&!highlight)session.removeMarker(session.$highlightLineMarker.id),session.$highlightLineMarker=null;else if(!session.$highlightLineMarker&&highlight){var range=new Range(highlight.row,highlight.column,highlight.row,1/0);range.id=session.addMarker(range,\"ace_active-line\",\"screenLine\"),session.$highlightLineMarker=range}else highlight&&(session.$highlightLineMarker.start.row=highlight.row,session.$highlightLineMarker.end.row=highlight.row,session.$highlightLineMarker.start.column=highlight.column,session._emit(\"changeBackMarker\"))},this.onSelectionChange=function(){var session=this.session;if(session.$selectionMarker&&session.removeMarker(session.$selectionMarker),session.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var range=this.selection.getRange(),style=this.getSelectionStyle();session.$selectionMarker=session.addMarker(range,\"ace_selection\",style)}var re=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(re),this._emit(\"changeSelection\")},this.$getSelectionHighLightRegexp=function(){var session=this.session,selection=this.getSelectionRange();if(!selection.isEmpty()&&!selection.isMultiLine()){var startOuter=selection.start.column-1,endOuter=selection.end.column+1,line=session.getLine(selection.start.row),lineCols=line.length,needle=line.substring(Math.max(startOuter,0),Math.min(endOuter,lineCols));if(!(startOuter>=0&&/^[\\w\\d]/.test(needle)||lineCols>=endOuter&&/[\\w\\d]$/.test(needle))&&(needle=line.substring(selection.start.column,selection.end.column),/^[\\w\\d]+$/.test(needle))){var re=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:needle});return re}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit(\"changeMode\",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getCopyText=function(){var text=\"\";return this.selection.isEmpty()||(text=this.session.getTextRange(this.getSelectionRange())),this._emit(\"copy\",text),text},this.onCopy=function(){this.commands.exec(\"copy\",this)},this.onCut=function(){this.commands.exec(\"cut\",this)},this.onPaste=function(text){this.$readOnly||(this._emit(\"paste\",text),this.insert(text))},this.execCommand=function(command,args){this.commands.exec(command,this,args)},this.insert=function(text){var session=this.session,mode=session.getMode(),cursor=this.getCursorPosition();if(this.getBehavioursEnabled()){var transform=mode.transformAction(session.getState(cursor.row),\"insertion\",this,session,text);transform&&(text=transform.text)}if(text=text.replace(\"\t\",this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var range=new Range.fromPoints(cursor,cursor);range.end.column+=text.length,this.session.remove(range)}}else cursor=this.session.remove(this.getSelectionRange()),this.clearSelection();this.clearSelection();var start=cursor.column,lineState=session.getState(cursor.row),line=session.getLine(cursor.row),shouldOutdent=mode.checkOutdent(lineState,line,text),end=session.insert(cursor,text);if(transform&&transform.selection&&(2==transform.selection.length?this.selection.setSelectionRange(new Range(cursor.row,start+transform.selection[0],cursor.row,start+transform.selection[1])):this.selection.setSelectionRange(new Range(cursor.row+transform.selection[0],transform.selection[1],cursor.row+transform.selection[2],transform.selection[3]))),session.getDocument().isNewLine(text)){var lineIndent=mode.getNextLineIndent(lineState,line.slice(0,cursor.column),session.getTabString());this.moveCursorTo(cursor.row+1,0);for(var size=session.getTabSize(),minIndent=Number.MAX_VALUE,row=cursor.row+1;end.row>=row;++row){var indent=0;line=session.getLine(row);for(var i=0;line.length>i;++i)if(\"\t\"==line.charAt(i))indent+=size;else{if(\" \"!=line.charAt(i))break;indent+=1}/[^\\s]/.test(line)&&(minIndent=Math.min(indent,minIndent))}for(var row=cursor.row+1;end.row>=row;++row){var outdent=minIndent;line=session.getLine(row);for(var i=0;line.length>i&&outdent>0;++i)\"\t\"==line.charAt(i)?outdent-=size:\" \"==line.charAt(i)&&(outdent-=1);session.remove(new Range(row,0,row,i))}session.indentRows(cursor.row+1,end.row,lineIndent)}shouldOutdent&&mode.autoOutdent(lineState,session,cursor.row)},this.onTextInput=function(text){this.keyBinding.onTextInput(text)},this.onCommandKey=function(e,hashId,keyCode){this.keyBinding.onCommandKey(e,hashId,keyCode)},this.setOverwrite=function(overwrite){this.session.setOverwrite(overwrite)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(speed){this.setOption(\"scrollSpeed\",speed)},this.getScrollSpeed=function(){return this.getOption(\"scrollSpeed\")},this.setDragDelay=function(dragDelay){this.setOption(\"dragDelay\",dragDelay)},this.getDragDelay=function(){return this.getOption(\"dragDelay\")},this.setSelectionStyle=function(val){this.setOption(\"selectionStyle\",val)},this.getSelectionStyle=function(){return this.getOption(\"selectionStyle\")},this.setHighlightActiveLine=function(shouldHighlight){this.setOption(\"highlightActiveLine\",shouldHighlight)},this.getHighlightActiveLine=function(){return this.getOption(\"highlightActiveLine\")},this.setHighlightGutterLine=function(shouldHighlight){this.setOption(\"highlightGutterLine\",shouldHighlight)},this.getHighlightGutterLine=function(){return this.getOption(\"highlightGutterLine\")},this.setHighlightSelectedWord=function(shouldHighlight){this.setOption(\"highlightSelectedWord\",shouldHighlight)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(shouldAnimate){this.renderer.setAnimatedScroll(shouldAnimate)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(showInvisibles){this.renderer.setShowInvisibles(showInvisibles)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(display){this.renderer.setDisplayIndentGuides(display)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(showPrintMargin){this.renderer.setShowPrintMargin(showPrintMargin)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(showPrintMargin){this.renderer.setPrintMarginColumn(showPrintMargin)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(readOnly){this.setOption(\"readOnly\",readOnly)},this.getReadOnly=function(){return this.getOption(\"readOnly\")},this.setBehavioursEnabled=function(enabled){this.setOption(\"behavioursEnabled\",enabled)},this.getBehavioursEnabled=function(){return this.getOption(\"behavioursEnabled\")},this.setWrapBehavioursEnabled=function(enabled){this.setOption(\"wrapBehavioursEnabled\",enabled)},this.getWrapBehavioursEnabled=function(){return this.getOption(\"wrapBehavioursEnabled\")},this.setShowFoldWidgets=function(show){this.setOption(\"showFoldWidgets\",show)},this.getShowFoldWidgets=function(){return this.getOption(\"showFoldWidgets\")},this.setFadeFoldWidgets=function(fade){this.setOption(\"fadeFoldWidgets\",fade)},this.getFadeFoldWidgets=function(){return this.getOption(\"fadeFoldWidgets\")},this.remove=function(dir){this.selection.isEmpty()&&(\"left\"==dir?this.selection.selectLeft():this.selection.selectRight());var range=this.getSelectionRange();if(this.getBehavioursEnabled()){var session=this.session,state=session.getState(range.start.row),new_range=session.getMode().transformAction(state,\"deletion\",this,session,range);new_range&&(range=new_range)}this.session.remove(range),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var range=this.getSelectionRange();range.start.column==range.end.column&&range.start.row==range.end.row&&(range.end.column=0,range.end.row++),this.session.remove(range),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var cursor=this.getCursorPosition();this.insert(\"\\n\"),this.moveCursorToPosition(cursor)},this.transposeLetters=function(){if(this.selection.isEmpty()){var cursor=this.getCursorPosition(),column=cursor.column;if(0!==column){var swap,range,line=this.session.getLine(cursor.row);line.length>column?(swap=line.charAt(column)+line.charAt(column-1),range=new Range(cursor.row,column-1,cursor.row,column+1)):(swap=line.charAt(column-1)+line.charAt(column-2),range=new Range(cursor.row,column-2,cursor.row,column)),this.session.replace(range,swap)}}},this.toLowerCase=function(){var originalRange=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var range=this.getSelectionRange(),text=this.session.getTextRange(range);this.session.replace(range,text.toLowerCase()),this.selection.setSelectionRange(originalRange)},this.toUpperCase=function(){var originalRange=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var range=this.getSelectionRange(),text=this.session.getTextRange(range);this.session.replace(range,text.toUpperCase()),this.selection.setSelectionRange(originalRange)},this.indent=function(){var session=this.session,range=this.getSelectionRange();if(!(range.start.row\u003Crange.end.row||range.start.column\u003Crange.end.column)){var indentString;if(this.session.getUseSoftTabs()){var size=session.getTabSize(),position=this.getCursorPosition(),column=session.documentToScreenColumn(position.row,position.column),count=size-column%size;indentString=lang.stringRepeat(\" \",count)}else indentString=\"\t\";return this.insert(indentString)}var rows=this.$getSelectedRows();session.indentRows(rows.first,rows.last,\"\t\")},this.blockIndent=function(){var rows=this.$getSelectedRows();this.session.indentRows(rows.first,rows.last,\"\t\")},this.blockOutdent=function(){var selection=this.session.getSelection();this.session.outdentRows(selection.getRange())},this.sortLines=function(){var rows=this.$getSelectedRows(),session=this.session,lines=[];for(i=rows.first;rows.last>=i;i++)lines.push(session.getLine(i));lines.sort(function(a,b){return a.toLowerCase()\u003Cb.toLowerCase()?-1:a.toLowerCase()>b.toLowerCase()?1:0});for(var deleteRange=new Range(0,0,0,0),i=rows.first;rows.last>=i;i++){var line=session.getLine(i);deleteRange.start.row=i,deleteRange.end.row=i,deleteRange.end.column=line.length,session.replace(deleteRange,lines[i-rows.first])}},this.toggleCommentLines=function(){var state=this.session.getState(this.getCursorPosition().row),rows=this.$getSelectedRows();this.session.getMode().toggleCommentLines(state,this.session,rows.first,rows.last)},this.getNumberAt=function(row,column){var _numberRx=/[\\-]?[0-9]+(?:\\.[0-9]+)?/g;_numberRx.lastIndex=0;for(var s=this.session.getLine(row);column>_numberRx.lastIndex;){var m=_numberRx.exec(s);if(column>=m.index&&m.index+m[0].length>=column){var number={value:m[0],start:m.index,end:m.index+m[0].length};return number}}return null},this.modifyNumber=function(amount){var row=this.selection.getCursor().row,column=this.selection.getCursor().column,charRange=new Range(row,column-1,row,column),c=this.session.getTextRange(charRange);if(!isNaN(parseFloat(c))&&isFinite(c)){var nr=this.getNumberAt(row,column);if(nr){var fp=nr.value.indexOf(\".\")>=0?nr.start+nr.value.indexOf(\".\")+1:nr.end,decimals=nr.start+nr.value.length-fp,t=parseFloat(nr.value);t*=Math.pow(10,decimals),amount*=fp!==nr.end&&fp>column?Math.pow(10,nr.end-column-1):Math.pow(10,nr.end-column),t+=amount,t/=Math.pow(10,decimals);var nnr=t.toFixed(decimals),replaceRange=new Range(row,nr.start,row,nr.end);this.session.replace(replaceRange,nnr),this.moveCursorTo(row,Math.max(nr.start+1,column+nnr.length-nr.value.length))}}},this.removeLines=function(){var range,rows=this.$getSelectedRows();range=0===rows.first||rows.last+1\u003Cthis.session.getLength()?new Range(rows.first,0,rows.last+1,0):new Range(rows.first-1,this.session.getLine(rows.first-1).length,rows.last,this.session.getLine(rows.last).length),this.session.remove(range),this.clearSelection()},this.duplicateSelection=function(){var sel=this.selection,doc=this.session,range=sel.getRange(),reverse=sel.isBackwards();if(range.isEmpty()){var row=range.start.row;doc.duplicateLines(row,row)}else{var point=reverse?range.start:range.end,endPoint=doc.insert(point,doc.getTextRange(range),!1);range.start=point,range.end=endPoint,sel.setSelectionRange(range,reverse)}},this.moveLinesDown=function(){this.$moveLines(function(firstRow,lastRow){return this.session.moveLinesDown(firstRow,lastRow)})},this.moveLinesUp=function(){this.$moveLines(function(firstRow,lastRow){return this.session.moveLinesUp(firstRow,lastRow)})},this.moveText=function(range,toPosition){return this.session.moveText(range,toPosition)},this.copyLinesUp=function(){this.$moveLines(function(firstRow,lastRow){return this.session.duplicateLines(firstRow,lastRow),0})},this.copyLinesDown=function(){this.$moveLines(function(firstRow,lastRow){return this.session.duplicateLines(firstRow,lastRow)})},this.$moveLines=function(mover){var selection=this.selection;if(!selection.inMultiSelectMode||this.inVirtualSelectionMode){var range=selection.toOrientedRange(),rows=this.$getSelectedRows(range),linesMoved=mover.call(this,rows.first,rows.last);range.moveBy(linesMoved,0),selection.fromOrientedRange(range)}else{var ranges=selection.rangeList.ranges;selection.rangeList.detach(this.session);for(var i=ranges.length;i--;){for(var rangeIndex=i,rows=ranges[i].collapseRows(),last=rows.end.row,first=rows.start.row;i--;){var rows=ranges[i].collapseRows();if(!(1>=first-rows.end.row))break;first=rows.end.row}i++;for(var linesMoved=mover.call(this,first,last);rangeIndex>=i;)ranges[rangeIndex].moveBy(linesMoved,0),rangeIndex--}selection.fromOrientedRange(selection.ranges[0]),selection.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var range=this.getSelectionRange().collapseRows();return{first:range.start.row,last:range.end.row}},this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(text){this.renderer.setCompositionText(text)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(row){return row>=this.getFirstVisibleRow()&&this.getLastVisibleRow()>=row},this.isRowFullyVisible=function(row){return row>=this.renderer.getFirstFullyVisibleRow()&&this.renderer.getLastFullyVisibleRow()>=row},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(dir,select){var renderer=this.renderer,config=this.renderer.layerConfig,rows=dir*Math.floor(config.height/config.lineHeight);this.$blockScrolling++,1==select?this.selection.$moveSelection(function(){this.moveCursorBy(rows,0)}):0==select&&(this.selection.moveCursorBy(rows,0),this.selection.clearSelection()),this.$blockScrolling--;var scrollTop=renderer.scrollTop;renderer.scrollBy(0,rows*config.lineHeight),null!=select&&renderer.scrollCursorIntoView(null,.5),renderer.animateScrolling(scrollTop)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(row){this.renderer.scrollToRow(row)},this.scrollToLine=function(line,center,animate,callback){this.renderer.scrollToLine(line,center,animate,callback)},this.centerSelection=function(){var range=this.getSelectionRange(),pos={row:Math.floor(range.start.row+(range.end.row-range.start.row)/2),column:Math.floor(range.start.column+(range.end.column-range.start.column)/2)};this.renderer.alignCursor(pos,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(row,column){this.selection.moveCursorTo(row,column)},this.moveCursorToPosition=function(pos){this.selection.moveCursorToPosition(pos)},this.jumpToMatching=function(select){var cursor=this.getCursorPosition(),range=this.session.getBracketRange(cursor);if(!range){if(range=this.find({needle:/[{}()\\[\\]]/g,preventScroll:!0,start:{row:cursor.row,column:cursor.column-1}}),!range)return;var pos=range.start;pos.row==cursor.row&&2>Math.abs(pos.column-cursor.column)&&(range=this.session.getBracketRange(pos))}pos=range&&range.cursor||pos,pos&&(select?range&&range.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(pos.row,pos.column):(this.clearSelection(),this.moveCursorTo(pos.row,pos.column)))},this.gotoLine=function(lineNumber,column,animate){this.selection.clearSelection(),this.session.unfold({row:lineNumber-1,column:column||0}),this.$blockScrolling+=1,this.moveCursorTo(lineNumber-1,column||0),this.$blockScrolling-=1,this.isRowFullyVisible(lineNumber-1)||this.scrollToLine(lineNumber-1,!0,animate)},this.navigateTo=function(row,column){this.clearSelection(),this.moveCursorTo(row,column)},this.navigateUp=function(times){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var selectionStart=this.selection.anchor.getPosition();return this.moveCursorToPosition(selectionStart)}this.selection.clearSelection(),times=times||1,this.selection.moveCursorBy(-times,0)},this.navigateDown=function(times){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var selectionEnd=this.selection.anchor.getPosition();return this.moveCursorToPosition(selectionEnd)}this.selection.clearSelection(),times=times||1,this.selection.moveCursorBy(times,0)},this.navigateLeft=function(times){if(this.selection.isEmpty())for(times=times||1;times--;)this.selection.moveCursorLeft();else{var selectionStart=this.getSelectionRange().start;this.moveCursorToPosition(selectionStart)}this.clearSelection()},this.navigateRight=function(times){if(this.selection.isEmpty())for(times=times||1;times--;)this.selection.moveCursorRight();else{var selectionEnd=this.getSelectionRange().end;this.moveCursorToPosition(selectionEnd)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var scrollTop=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(scrollTop)},this.navigateFileStart=function(){var scrollTop=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(scrollTop)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(replacement,options){options&&this.$search.set(options);var range=this.$search.find(this.session),replaced=0;return range?(this.$tryReplace(range,replacement)&&(replaced=1),null!==range&&(this.selection.setSelectionRange(range),this.renderer.scrollSelectionIntoView(range.start,range.end)),replaced):replaced},this.replaceAll=function(replacement,options){options&&this.$search.set(options);var ranges=this.$search.findAll(this.session),replaced=0;if(!ranges.length)return replaced;this.$blockScrolling+=1;var selection=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var i=ranges.length-1;i>=0;--i)this.$tryReplace(ranges[i],replacement)&&replaced++;return this.selection.setSelectionRange(selection),this.$blockScrolling-=1,replaced},this.$tryReplace=function(range,replacement){var input=this.session.getTextRange(range);return replacement=this.$search.replace(input,replacement),null!==replacement?(range.end=this.session.replace(range,replacement),range):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(needle,options,animate){options||(options={}),\"string\"==typeof needle||needle instanceof RegExp?options.needle=needle:\"object\"==typeof needle&&oop.mixin(options,needle);\nvar range=this.selection.getRange();null==options.needle&&(needle=this.session.getTextRange(range)||this.$search.$options.needle,needle||(range=this.session.getWordRange(range.start.row,range.start.column),needle=this.session.getTextRange(range)),this.$search.set({needle:needle})),this.$search.set(options),options.start||this.$search.set({start:range});var newRange=this.$search.find(this.session);return options.preventScroll?newRange:newRange?(this.revealRange(newRange,animate),newRange):(options.backwards?range.start=range.end:range.end=range.start,this.selection.setRange(range),void 0)},this.findNext=function(options,animate){this.find({skipCurrent:!0,backwards:!1},options,animate)},this.findPrevious=function(options,animate){this.find(options,{skipCurrent:!0,backwards:!0},animate)},this.revealRange=function(range,animate){this.$blockScrolling+=1,this.session.unfold(range),this.selection.setSelectionRange(range),this.$blockScrolling-=1;var scrollTop=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(range.start,range.end,.5),0!=animate&&this.renderer.animateScrolling(scrollTop)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit(\"destroy\",this)},this.setAutoScrollEditorIntoView=function(enable){if(enable!==!1){var rect,self=this,shouldScroll=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement(\"div\"));var scrollAnchor=this.$scrollAnchor;scrollAnchor.style.cssText=\"position:absolute\",this.container.insertBefore(scrollAnchor,this.container.firstChild);var onChangeSelection=this.on(\"changeSelection\",function(){shouldScroll=!0}),onBeforeRender=this.renderer.on(\"beforeRender\",function(){shouldScroll&&(rect=self.renderer.container.getBoundingClientRect())}),onAfterRender=this.renderer.on(\"afterRender\",function(){if(shouldScroll&&rect&&self.isFocused()){var renderer=self.renderer,pos=renderer.$cursorLayer.$pixelPos,config=renderer.layerConfig,top=pos.top-config.offset;shouldScroll=pos.top>=0&&0>top+rect.top?!0:pos.top\u003Cconfig.height&&pos.top+rect.top+config.lineHeight>window.innerHeight?!1:null,null!=shouldScroll&&(scrollAnchor.style.top=top+\"px\",scrollAnchor.style.left=pos.left+\"px\",scrollAnchor.style.height=config.lineHeight+\"px\",scrollAnchor.scrollIntoView(shouldScroll)),shouldScroll=rect=null}});this.setAutoScrollEditorIntoView=function(enable){enable!==!0&&(delete this.setAutoScrollEditorIntoView,this.removeEventListener(\"changeSelection\",onChangeSelection),this.renderer.removeEventListener(\"afterRender\",onAfterRender),this.renderer.removeEventListener(\"beforeRender\",onBeforeRender))}}}}).call(Editor.prototype),config.defineOptions(Editor.prototype,\"editor\",{selectionStyle:{set:function(style){this.onSelectionChange(),this._emit(\"changeSelectionStyle\",{data:style})},initialValue:\"line\"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(readOnly){this.textInput.setReadOnly(readOnly);var cursorLayer=this.renderer.$cursorLayer;cursorLayer&&cursorLayer.setBlinking(!readOnly)},initialValue:!1},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:\"renderer\",highlightGutterLine:\"renderer\",animatedScroll:\"renderer\",showInvisibles:\"renderer\",showPrintMargin:\"renderer\",printMarginColumn:\"renderer\",printMargin:\"renderer\",fadeFoldWidgets:\"renderer\",showFoldWidgets:\"renderer\",showGutter:\"renderer\",displayIndentGuides:\"renderer\",fontSize:\"renderer\",fontFamily:\"renderer\",scrollSpeed:\"$mouseHandler\",dragDelay:\"$mouseHandler\",focusTimout:\"$mouseHandler\",firstLineNumber:\"session\",overwrite:\"session\",newLineMode:\"session\",useWorker:\"session\",useSoftTabs:\"session\",tabSize:\"session\",wrap:\"session\",foldStyle:\"session\"}),exports.Editor=Editor}),ace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(acequire,exports){exports.stringReverse=function(string){return string.split(\"\").reverse().join(\"\")},exports.stringRepeat=function(string,count){for(var result=\"\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\"\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\"\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\"object\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function(obj){if(\"object\"!=typeof obj)return obj;var copy=obj.constructor();for(var key in obj)copy[key]=\"object\"==typeof obj[key]?this.deepCopy(obj[key]):obj[key];return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},exports.escapeHTML=function(str){return str.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/'/g,\"'\").replace(/\u003C/g,\"<\")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)};return _self.delay=_self,_self.schedule=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||0))},_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\"],function(acequire,exports){var event=acequire(\"../lib/event\"),useragent=acequire(\"../lib/useragent\"),dom=acequire(\"../lib/dom\"),lang=acequire(\"../lib/lang\"),BROKEN_SETDATA=18>useragent.isChrome,TextInput=function(parentNode,host){function resetSelection(isEmpty){if(!inComposition){if(inputHandler)selectionStart=0,selectionEnd=isEmpty?0:text.value.length-1;else var selectionStart=isEmpty?2:1,selectionEnd=2;try{text.setSelectionRange(selectionStart,selectionEnd)}catch(e){}}}function resetValue(){inComposition||(text.value=PLACEHOLDER,useragent.isWebKit&&syncValue.schedule())}function onContextMenuClose(){setTimeout(function(){tempStyle&&(text.style.cssText=tempStyle,tempStyle=\"\"),null==host.renderer.$keepTextAreaAtCursor&&(host.renderer.$keepTextAreaAtCursor=!0,host.renderer.$moveTextAreaToCursor())},0)}var text=dom.createElement(\"textarea\");text.className=\"ace_text-input\",useragent.isTouchPad&&text.setAttribute(\"x-palm-disable-auto-cap\",!0),text.wrap=\"off\",text.autocorrect=\"off\",text.autocapitalize=\"off\",text.spellcheck=!1,text.style.bottom=\"2000em\",parentNode.insertBefore(text,parentNode.firstChild);var PLACEHOLDER=\"\u0001\u0001\",cut=!1,copied=!1,pasted=!1,inComposition=!1,tempStyle=\"\",isSelectionEmpty=!0;try{var isFocused=document.activeElement===text}catch(e){}event.addListener(text,\"blur\",function(){host.onBlur(),isFocused=!1}),event.addListener(text,\"focus\",function(){isFocused=!0,host.onFocus(),resetSelection()}),this.focus=function(){text.focus()},this.blur=function(){text.blur()},this.isFocused=function(){return isFocused};var syncSelection=lang.delayedCall(function(){isFocused&&resetSelection(isSelectionEmpty)}),syncValue=lang.delayedCall(function(){inComposition||(text.value=PLACEHOLDER,isFocused&&resetSelection())});useragent.isWebKit||host.addEventListener(\"changeSelection\",function(){host.selection.isEmpty()!=isSelectionEmpty&&(isSelectionEmpty=!isSelectionEmpty,syncSelection.schedule())}),resetValue(),isFocused&&host.onFocus();var isAllSelected=function(text){return 0===text.selectionStart&&text.selectionEnd===text.value.length};if(!text.setSelectionRange&&text.createTextRange&&(text.setSelectionRange=function(selectionStart,selectionEnd){var range=this.createTextRange();range.collapse(!0),range.moveStart(\"character\",selectionStart),range.moveEnd(\"character\",selectionEnd),range.select()},isAllSelected=function(text){try{var range=text.ownerDocument.selection.createRange()}catch(e){}return range&&range.parentElement()==text?range.text==text.value:!1}),useragent.isOldIE){var inPropertyChange=!1,onPropertyChange=function(e){if(!inPropertyChange){var data=text.value;if(!inComposition&&data&&data!=PLACEHOLDER){if(e&&data==PLACEHOLDER[0])return syncProperty.schedule();sendText(data),inPropertyChange=!0,resetValue(),inPropertyChange=!1}}},syncProperty=lang.delayedCall(onPropertyChange);event.addListener(text,\"propertychange\",onPropertyChange);var keytable={13:1,27:1};event.addListener(text,\"keyup\",function(e){!inComposition||text.value&&!keytable[e.keyCode]||setTimeout(onCompositionEnd,0),129>(text.value.charCodeAt(0)||0)||(inComposition?onCompositionUpdate():onCompositionStart())})}var onSelect=function(){cut?cut=!1:copied?copied=!1:isAllSelected(text)?(host.selectAll(),resetSelection()):inputHandler&&resetSelection(host.selection.isEmpty())},inputHandler=null;this.setInputHandler=function(cb){inputHandler=cb},this.getInputHandler=function(){return inputHandler};var afterContextMenu=!1,sendText=function(data){inputHandler&&(data=inputHandler(data),inputHandler=null),pasted?(resetSelection(),data&&host.onPaste(data),pasted=!1):data==PLACEHOLDER[0]?afterContextMenu&&host.execCommand(\"del\",{source:\"ace\"}):(data.substring(0,2)==PLACEHOLDER?data=data.substr(2):data[0]==PLACEHOLDER[0]?data=data.substr(1):data[data.length-1]==PLACEHOLDER[0]&&(data=data.slice(0,-1)),data[data.length-1]==PLACEHOLDER[0]&&(data=data.slice(0,-1)),data&&host.onTextInput(data)),afterContextMenu&&(afterContextMenu=!1)},onInput=function(){if(!inComposition){var data=text.value;sendText(data),resetValue()}},onCut=function(e){var data=host.getCopyText();if(!data)return event.preventDefault(e),void 0;var clipboardData=e.clipboardData||window.clipboardData;if(clipboardData&&!BROKEN_SETDATA){var supported=clipboardData.setData(\"Text\",data);supported&&(host.onCut(),event.preventDefault(e))}supported||(cut=!0,text.value=data,text.select(),setTimeout(function(){cut=!1,resetValue(),resetSelection(),host.onCut()}))},onCopy=function(e){var data=host.getCopyText();if(!data)return event.preventDefault(e),void 0;var clipboardData=e.clipboardData||window.clipboardData;if(clipboardData&&!BROKEN_SETDATA){var supported=clipboardData.setData(\"Text\",data);supported&&(host.onCopy(),event.preventDefault(e))}supported||(copied=!0,text.value=data,text.select(),setTimeout(function(){copied=!1,resetValue(),resetSelection(),host.onCopy()}))},onPaste=function(e){var clipboardData=e.clipboardData||window.clipboardData;if(clipboardData){var data=clipboardData.getData(\"Text\");data&&host.onPaste(data),useragent.isIE&&setTimeout(resetSelection),event.preventDefault(e)}else text.value=\"\",pasted=!0};event.addCommandKeyListener(text,host.onCommandKey.bind(host)),event.addListener(text,\"select\",onSelect),event.addListener(text,\"input\",onInput),event.addListener(text,\"cut\",onCut),event.addListener(text,\"copy\",onCopy),event.addListener(text,\"paste\",onPaste),\"oncut\"in text&&\"oncopy\"in text&&\"onpaste\"in text||event.addListener(parentNode,\"keydown\",function(e){if((!useragent.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:onCopy(e);break;case 86:onPaste(e);break;case 88:onCut(e)}});var onCompositionStart=function(){inComposition={},host.onCompositionStart(),setTimeout(onCompositionUpdate,0),host.on(\"mousedown\",onCompositionEnd),host.selection.isEmpty()||(host.insert(\"\"),host.session.markUndoGroup(),host.selection.clearSelection()),host.session.markUndoGroup()},onCompositionUpdate=function(){if(inComposition&&(host.onCompositionUpdate(text.value),inComposition.lastValue&&host.undo(),inComposition.lastValue=text.value.replace(/\\x01/g,\"\"),inComposition.lastValue)){var r=host.selection.getRange();host.insert(inComposition.lastValue),host.session.markUndoGroup(),inComposition.range=host.selection.getRange(),host.selection.setRange(r),host.selection.clearSelection()}},onCompositionEnd=function(e){var c=inComposition;inComposition=!1;var timer=setTimeout(function(){var str=text.value.replace(/\\x01/g,\"\");inComposition||str!=c.lastValue||resetValue()});inputHandler=function(str){return clearTimeout(timer),str=str.replace(/\\x01/g,\"\"),str==c.lastValue?\"\":(str||c.lastValue&&host.undo(),str)},host.onCompositionEnd(),host.removeListener(\"mousedown\",onCompositionEnd),\"compositionend\"==e.type&&host.selection.setRange(c.range)},syncComposition=lang.delayedCall(onCompositionUpdate,50);event.addListener(text,\"compositionstart\",onCompositionStart),event.addListener(text,useragent.isGecko?\"text\":\"keyup\",function(){syncComposition.schedule()}),event.addListener(text,\"compositionend\",onCompositionEnd),this.getElement=function(){return text},this.setReadOnly=function(readOnly){text.readOnly=readOnly},this.onContextMenu=function(e){afterContextMenu=!0,tempStyle||(tempStyle=text.style.cssText),text.style.cssText=\"z-index:100000;\"+(useragent.isIE?\"opacity:0.1;\":\"\"),resetSelection(host.selection.isEmpty()),host._emit(\"nativecontextmenu\",{target:host});var rect=host.container.getBoundingClientRect(),style=dom.computedStyle(host.container),top=rect.top+(parseInt(style.borderTopWidth)||0),left=rect.left+(parseInt(rect.borderLeftWidth)||0),maxTop=rect.bottom-top-text.clientHeight,move=function(e){text.style.left=e.clientX-left-2+\"px\",text.style.top=Math.min(e.clientY-top-2,maxTop)+\"px\"};move(e),\"mousedown\"==e.type&&(host.renderer.$keepTextAreaAtCursor&&(host.renderer.$keepTextAreaAtCursor=null),useragent.isWin&&event.capture(host.container,move,onContextMenuClose))},this.onContextMenuClose=onContextMenuClose,useragent.isGecko||event.addListener(text,\"contextmenu\",function(e){host.textInput.onContextMenu(e),onContextMenuClose()})};exports.TextInput=TextInput}),ace.define(\"ace/mouse/mouse_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/mouse/default_handlers\",\"ace/mouse/default_gutter_handler\",\"ace/mouse/mouse_event\",\"ace/mouse/dragdrop\",\"ace/config\"],function(acequire,exports){var event=acequire(\"../lib/event\"),useragent=acequire(\"../lib/useragent\"),DefaultHandlers=acequire(\"./default_handlers\").DefaultHandlers,DefaultGutterHandler=acequire(\"./default_gutter_handler\").GutterHandler,MouseEvent=acequire(\"./mouse_event\").MouseEvent,DragdropHandler=acequire(\"./dragdrop\").DragdropHandler,config=acequire(\"../config\"),MouseHandler=function(editor){this.editor=editor,new DefaultHandlers(this),new DefaultGutterHandler(this),new DragdropHandler(this),event.addListener(editor.container,\"mousedown\",function(e){return editor.focus(),event.preventDefault(e)});var mouseTarget=editor.renderer.getMouseEventTarget();event.addListener(mouseTarget,\"click\",this.onMouseEvent.bind(this,\"click\")),event.addListener(mouseTarget,\"mousemove\",this.onMouseMove.bind(this,\"mousemove\")),event.addMultiMouseDownListener(mouseTarget,[300,300,250],this,\"onMouseEvent\"),event.addMouseWheelListener(editor.container,this.onMouseWheel.bind(this,\"mousewheel\"));var gutterEl=editor.renderer.$gutter;event.addListener(gutterEl,\"mousedown\",this.onMouseEvent.bind(this,\"guttermousedown\")),event.addListener(gutterEl,\"click\",this.onMouseEvent.bind(this,\"gutterclick\")),event.addListener(gutterEl,\"dblclick\",this.onMouseEvent.bind(this,\"gutterdblclick\")),event.addListener(gutterEl,\"mousemove\",this.onMouseEvent.bind(this,\"guttermousemove\"))};(function(){this.onMouseEvent=function(name,e){this.editor._emit(name,new MouseEvent(e,this.editor))},this.onMouseMove=function(name,e){var listeners=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;listeners&&listeners.length&&this.editor._emit(name,new MouseEvent(e,this.editor))},this.onMouseWheel=function(name,e){var mouseEvent=new MouseEvent(e,this.editor);mouseEvent.speed=2*this.$scrollSpeed,mouseEvent.wheelX=e.wheelX,mouseEvent.wheelY=e.wheelY,this.editor._emit(name,mouseEvent)},this.setState=function(state){this.state=state},this.captureMouse=function(ev,state){state&&this.setState(state),this.x=ev.x,this.y=ev.y,this.isMousePressed=!0;var renderer=this.editor.renderer;renderer.$keepTextAreaAtCursor&&(renderer.$keepTextAreaAtCursor=null);var self=this,onMouseMove=function(e){self.x=e.clientX,self.y=e.clientY},onCaptureEnd=function(e){clearInterval(timerId),onCaptureInterval(),self[self.state+\"End\"]&&self[self.state+\"End\"](e),self.$clickSelection=null,null==renderer.$keepTextAreaAtCursor&&(renderer.$keepTextAreaAtCursor=!0,renderer.$moveTextAreaToCursor()),self.isMousePressed=!1,self.onMouseEvent(\"mouseup\",e)},onCaptureInterval=function(){self[self.state]&&self[self.state]()};if(useragent.isOldIE&&\"dblclick\"==ev.domEvent.type)return setTimeout(function(){onCaptureEnd(ev.domEvent)});event.capture(this.editor.container,onMouseMove,onCaptureEnd);var timerId=setInterval(onCaptureInterval,20)}}).call(MouseHandler.prototype),config.defineOptions(MouseHandler.prototype,\"mouseHandler\",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:150},focusTimout:{initialValue:0}}),exports.MouseHandler=MouseHandler}),ace.define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/useragent\"],function(acequire,exports){function DefaultHandlers(mouseHandler){mouseHandler.$clickSelection=null;var editor=mouseHandler.editor;editor.setDefaultHandler(\"mousedown\",this.onMouseDown.bind(mouseHandler)),editor.setDefaultHandler(\"dblclick\",this.onDoubleClick.bind(mouseHandler)),editor.setDefaultHandler(\"tripleclick\",this.onTripleClick.bind(mouseHandler)),editor.setDefaultHandler(\"quadclick\",this.onQuadClick.bind(mouseHandler)),editor.setDefaultHandler(\"mousewheel\",this.onMouseWheel.bind(mouseHandler));var exports=[\"select\",\"startSelect\",\"drag\",\"dragEnd\",\"dragWait\",\"dragWaitEnd\",\"startDrag\",\"focusWait\"];exports.forEach(function(x){mouseHandler[x]=this[x]},this),mouseHandler.selectByLines=this.extendSelectionBy.bind(mouseHandler,\"getLineRange\"),mouseHandler.selectByWords=this.extendSelectionBy.bind(mouseHandler,\"getWordRange\")}function calcDistance(ax,ay,bx,by){return Math.sqrt(Math.pow(bx-ax,2)+Math.pow(by-ay,2))}function calcRangeOrientation(range,cursor){if(range.start.row==range.end.row)var cmp=2*cursor.column-range.start.column-range.end.column;else var cmp=2*cursor.row-range.start.row-range.end.row;return 0>cmp?{cursor:range.start,anchor:range.end}:{cursor:range.end,anchor:range.start}}var dom=acequire(\"../lib/dom\");acequire(\"../lib/useragent\");var DRAG_OFFSET=0;(function(){this.onMouseDown=function(ev){var inSelection=ev.inSelection(),pos=ev.getDocumentPosition();this.mousedownEvent=ev;var editor=this.editor,button=ev.getButton();if(0!==button){var selectionRange=editor.getSelectionRange(),selectionEmpty=selectionRange.isEmpty();return selectionEmpty&&(editor.moveCursorToPosition(pos),editor.selection.clearSelection()),editor.textInput.onContextMenu(ev.domEvent),void 0}return!inSelection||editor.isFocused()||(editor.focus(),!this.$focusTimout||this.$clickSelection||editor.inMultiSelectMode)?(!inSelection||this.$clickSelection||ev.getShiftKey()||editor.inMultiSelectMode?this.startSelect(pos):inSelection&&(this.mousedownEvent.time=(new Date).getTime(),this.setState(\"dragWait\")),this.captureMouse(ev),ev.preventDefault()):(this.setState(\"focusWait\"),this.captureMouse(ev),ev.preventDefault())},this.startSelect=function(pos){pos=pos||this.editor.renderer.screenToTextCoordinates(this.x,this.y),this.mousedownEvent.getShiftKey()?this.editor.selection.selectToPosition(pos):this.$clickSelection||(this.editor.moveCursorToPosition(pos),this.editor.selection.clearSelection()),this.setState(\"select\")},this.select=function(){var anchor,editor=this.editor,cursor=editor.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var cmp=this.$clickSelection.comparePoint(cursor);if(-1==cmp)anchor=this.$clickSelection.end;else if(1==cmp)anchor=this.$clickSelection.start;else{var orientedRange=calcRangeOrientation(this.$clickSelection,cursor);cursor=orientedRange.cursor,anchor=orientedRange.anchor}editor.selection.setSelectionAnchor(anchor.row,anchor.column)}editor.selection.selectToPosition(cursor),editor.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(unitName){var anchor,editor=this.editor,cursor=editor.renderer.screenToTextCoordinates(this.x,this.y),range=editor.selection[unitName](cursor.row,cursor.column);if(this.$clickSelection){var cmpStart=this.$clickSelection.comparePoint(range.start),cmpEnd=this.$clickSelection.comparePoint(range.end);if(-1==cmpStart&&0>=cmpEnd)anchor=this.$clickSelection.end,(range.end.row!=cursor.row||range.end.column!=cursor.column)&&(cursor=range.start);else if(1==cmpEnd&&cmpStart>=0)anchor=this.$clickSelection.start,(range.start.row!=cursor.row||range.start.column!=cursor.column)&&(cursor=range.end);else if(-1==cmpStart&&1==cmpEnd)cursor=range.end,anchor=range.start;else{var orientedRange=calcRangeOrientation(this.$clickSelection,cursor);cursor=orientedRange.cursor,anchor=orientedRange.anchor}editor.selection.setSelectionAnchor(anchor.row,anchor.column)}editor.selection.selectToPosition(cursor),editor.renderer.scrollCursorIntoView()},this.startDrag=function(){var editor=this.editor;this.setState(\"drag\"),this.dragRange=editor.getSelectionRange();var style=editor.getSelectionStyle();this.dragSelectionMarker=editor.session.addMarker(this.dragRange,\"ace_selection\",style),editor.clearSelection(),dom.addCssClass(editor.container,\"ace_dragging\"),this.$dragKeybinding||(this.$dragKeybinding={handleKeyboard:function(data,hashId,keyString){return\"esc\"==keyString?{command:this.command}:void 0},command:{exec:function(editor){var self=editor.$mouseHandler;self.dragCursor=null,self.dragEnd(),self.startSelect()}}}),editor.keyBinding.addKeyboardHandler(this.$dragKeybinding)},this.focusWait=function(){var distance=calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),time=(new Date).getTime();(distance>DRAG_OFFSET||time-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.dragWait=function(){var distance=calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),time=(new Date).getTime(),editor=this.editor;distance>DRAG_OFFSET?this.startSelect(this.mousedownEvent.getDocumentPosition()):time-this.mousedownEvent.time>editor.$mouseHandler.$dragDelay&&this.startDrag()},this.dragWaitEnd=function(e){this.mousedownEvent.domEvent=e,this.startSelect()},this.drag=function(){var editor=this.editor;this.dragCursor=editor.renderer.screenToTextCoordinates(this.x,this.y),editor.moveCursorToPosition(this.dragCursor),editor.renderer.scrollCursorIntoView()},this.dragEnd=function(e){var editor=this.editor,dragCursor=this.dragCursor,dragRange=this.dragRange;if(dom.removeCssClass(editor.container,\"ace_dragging\"),editor.session.removeMarker(this.dragSelectionMarker),editor.keyBinding.removeKeyboardHandler(this.$dragKeybinding),dragCursor){if(editor.clearSelection(),e&&(e.ctrlKey||e.altKey)){var session=editor.session,newRange=dragRange;newRange.end=session.insert(dragCursor,session.getTextRange(dragRange)),newRange.start=dragCursor}else{if(dragRange.contains(dragCursor.row,dragCursor.column))return;var newRange=editor.moveText(dragRange,dragCursor)}newRange&&editor.selection.setSelectionRange(newRange)}},this.onDoubleClick=function(ev){var pos=ev.getDocumentPosition(),editor=this.editor,session=editor.session,range=session.getBracketRange(pos);return range?(range.isEmpty()&&(range.start.column--,range.end.column++),this.$clickSelection=range,this.setState(\"select\"),void 0):(this.$clickSelection=editor.selection.getWordRange(pos.row,pos.column),this.setState(\"selectByWords\"),void 0)},this.onTripleClick=function(ev){var pos=ev.getDocumentPosition(),editor=this.editor;this.setState(\"selectByLines\"),this.$clickSelection=editor.selection.getLineRange(pos.row)},this.onQuadClick=function(){var editor=this.editor;editor.selectAll(),this.$clickSelection=editor.getSelectionRange(),this.setState(\"null\")},this.onMouseWheel=function(ev){if(!ev.getShiftKey()&&!ev.getAccelKey()){var t=ev.domEvent.timeStamp,dt=t-(this.$lastScrollTime||0),editor=this.editor,isScrolable=editor.renderer.isScrollableBy(ev.wheelX*ev.speed,ev.wheelY*ev.speed);return isScrolable||200>dt?(this.$lastScrollTime=t,editor.renderer.scrollBy(ev.wheelX*ev.speed,ev.wheelY*ev.speed),ev.stop()):void 0}}}).call(DefaultHandlers.prototype),exports.DefaultHandlers=DefaultHandlers}),ace.define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\"],function(acequire,exports){function GutterHandler(mouseHandler){function createTooltip(){tooltip=dom.createElement(\"div\"),tooltip.className=\"ace_gutter-tooltip\",tooltip.style.display=\"none\",editor.container.appendChild(tooltip)}function showTooltip(){tooltip||createTooltip();var row=mouseEvent.getDocumentPosition().row,annotation=gutter.$annotations[row];if(!annotation)return hideTooltip();var maxRow=editor.session.getLength();if(row==maxRow){var screenRow=editor.renderer.pixelToScreenCoordinates(0,mouseEvent.y).row,pos=mouseEvent.$pos;if(screenRow>editor.session.documentToScreenRow(pos.row,pos.column))return hideTooltip()}tooltipAnnotation!=annotation&&(tooltipAnnotation=annotation.text.join(\"\u003Cbr/>\"),tooltip.style.display=\"block\",tooltip.innerHTML=tooltipAnnotation,editor.on(\"mousewheel\",hideTooltip),moveTooltip(mouseEvent))}function hideTooltip(){tooltipTimeout&&(tooltipTimeout=clearTimeout(tooltipTimeout)),tooltipAnnotation&&(tooltip.style.display=\"none\",tooltipAnnotation=null,editor.removeEventListener(\"mousewheel\",hideTooltip))}function moveTooltip(e){var rect=editor.renderer.$gutter.getBoundingClientRect();tooltip.style.left=e.x+15+\"px\",e.y+3*editor.renderer.lineHeight+15\u003Crect.bottom?(tooltip.style.bottom=\"\",tooltip.style.top=e.y+15+\"px\"):(tooltip.style.top=\"\",tooltip.style.bottom=rect.bottom-e.y+5+\"px\")}var editor=mouseHandler.editor,gutter=editor.renderer.$gutterLayer;mouseHandler.editor.setDefaultHandler(\"guttermousedown\",function(e){if(editor.isFocused()){var gutterRegion=gutter.getRegion(e);if(\"foldWidgets\"!=gutterRegion){var row=e.getDocumentPosition().row,selection=editor.session.selection;if(e.getShiftKey())selection.selectTo(row,0);else{if(2==e.domEvent.detail)return editor.selectAll(),e.preventDefault();mouseHandler.$clickSelection=editor.selection.getLineRange(row)}return mouseHandler.captureMouse(e,\"selectByLines\"),e.preventDefault()}}});var tooltipTimeout,mouseEvent,tooltip,tooltipAnnotation;mouseHandler.editor.setDefaultHandler(\"guttermousemove\",function(e){var target=e.domEvent.target||e.domEvent.srcElement;return dom.hasCssClass(target,\"ace_fold-widget\")?hideTooltip():(tooltipAnnotation&&moveTooltip(e),mouseEvent=e,tooltipTimeout||(tooltipTimeout=setTimeout(function(){tooltipTimeout=null,mouseEvent&&!mouseHandler.isMousePressed?showTooltip():hideTooltip()},50)),void 0)}),event.addListener(editor.renderer.$gutter,\"mouseout\",function(){mouseEvent=null,tooltipAnnotation&&!tooltipTimeout&&(tooltipTimeout=setTimeout(function(){tooltipTimeout=null,hideTooltip()},50))})}var dom=acequire(\"../lib/dom\"),event=acequire(\"../lib/event\");exports.GutterHandler=GutterHandler}),ace.define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"],function(acequire,exports){var event=acequire(\"../lib/event\"),useragent=acequire(\"../lib/useragent\"),MouseEvent=exports.MouseEvent=function(domEvent,editor){this.domEvent=domEvent,this.editor=editor,this.x=this.clientX=domEvent.clientX,this.y=this.clientY=domEvent.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){event.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){event.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var editor=this.editor;if(editor.getReadOnly())this.$inSelection=!1;else{var selectionRange=editor.getSelectionRange();if(selectionRange.isEmpty())this.$inSelection=!1;else{var pos=this.getDocumentPosition();this.$inSelection=selectionRange.contains(pos.row,pos.column)}}return this.$inSelection},this.getButton=function(){return event.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=useragent.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(MouseEvent.prototype)}),ace.define(\"ace/mouse/dragdrop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"],function(acequire,exports){var event=acequire(\"../lib/event\"),DragdropHandler=function(mouseHandler){function addDragMarker(){range=editor.selection.toOrientedRange(),dragSelectionMarker=editor.session.addMarker(range,\"ace_selection\",editor.getSelectionStyle()),editor.clearSelection(),clearInterval(timerId),timerId=setInterval(onDragInterval,20),counter=0,event.addListener(document,\"mousemove\",onMouseMove)}function clearDragMarker(){clearInterval(timerId),editor.session.removeMarker(dragSelectionMarker),dragSelectionMarker=null,editor.selection.fromOrientedRange(range),counter=0,event.removeListener(document,\"mousemove\",onMouseMove)}function onMouseMove(){null==onMouseMoveTimer&&(onMouseMoveTimer=setTimeout(function(){null!=onMouseMoveTimer&&dragSelectionMarker&&clearDragMarker()},20))}var dragSelectionMarker,x,y,timerId,range,dragCursor,editor=mouseHandler.editor,counter=0,mouseTarget=editor.container;event.addListener(mouseTarget,\"dragenter\",function(e){if(!editor.getReadOnly()){var types=e.dataTransfer.types;if(!types||-1!==Array.prototype.indexOf.call(types,\"text/plain\"))return dragSelectionMarker||addDragMarker(),counter++,event.preventDefault(e)}}),event.addListener(mouseTarget,\"dragover\",function(e){if(!editor.getReadOnly()){var types=e.dataTransfer.types;if(!types||-1!==Array.prototype.indexOf.call(types,\"text/plain\"))return null!==onMouseMoveTimer&&(onMouseMoveTimer=null),x=e.clientX,y=e.clientY,event.preventDefault(e)}});var onDragInterval=function(){dragCursor=editor.renderer.screenToTextCoordinates(x,y),editor.moveCursorToPosition(dragCursor),editor.renderer.scrollCursorIntoView()};event.addListener(mouseTarget,\"dragleave\",function(e){return counter--,0>=counter&&dragSelectionMarker?(clearDragMarker(),event.preventDefault(e)):void 0}),event.addListener(mouseTarget,\"drop\",function(e){return dragSelectionMarker?(range.end=editor.session.insert(dragCursor,e.dataTransfer.getData(\"Text\")),range.start=dragCursor,clearDragMarker(),editor.focus(),event.preventDefault(e)):void 0});var onMouseMoveTimer=null};exports.DragdropHandler=DragdropHandler}),ace.define(\"ace/config\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\"],function(acequire,exports,module){\"no use strict\";\nfunction deHyphenate(str){return str.replace(/-(.)/g,function(m,m1){return m1.toUpperCase()})}var lang=acequire(\"./lib/lang\"),oop=acequire(\"./lib/oop\"),net=acequire(\"./lib/net\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,global=function(){return this}(),options={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:\"\",suffix:\".js\",$moduleUrls:{}};exports.get=function(key){if(!options.hasOwnProperty(key))throw Error(\"Unknown config key: \"+key);return options[key]},exports.set=function(key,value){if(!options.hasOwnProperty(key))throw Error(\"Unknown config key: \"+key);options[key]=value},exports.all=function(){return lang.copyObject(options)},oop.implement(exports,EventEmitter),exports.moduleUrl=function(name,component){if(options.$moduleUrls[name])return options.$moduleUrls[name];var parts=name.split(\"/\");component=component||parts[parts.length-2]||\"\";var base=parts[parts.length-1].replace(component,\"\").replace(/(^[\\-_])|([\\-_]$)/,\"\");!base&&parts.length>1&&(base=parts[parts.length-2]);var path=options[component+\"Path\"];return null==path&&(path=options.basePath),path&&\"/\"!=path.slice(-1)&&(path+=\"/\"),path+component+\"-\"+base+this.get(\"suffix\")},exports.setModuleUrl=function(name,subst){return options.$moduleUrls[name]=subst},exports.$loading={},exports.loadModule=function(moduleName,onLoad){var module,moduleType;Array.isArray(moduleName)&&(moduleType=moduleName[0],moduleName=moduleName[1]);try{module=acequire(moduleName)}catch(e){}if(module&&!exports.$loading[moduleName])return onLoad&&onLoad(module);if(exports.$loading[moduleName]||(exports.$loading[moduleName]=[]),exports.$loading[moduleName].push(onLoad),!(exports.$loading[moduleName].length>1)){var afterLoad=function(){acequire([moduleName],function(module){exports._emit(\"load.module\",{name:moduleName,module:module});var listeners=exports.$loading[moduleName];exports.$loading[moduleName]=null,listeners.forEach(function(onLoad){onLoad&&onLoad(module)})})};return exports.get(\"packaged\")?(net.loadScript(exports.moduleUrl(moduleName,moduleType),afterLoad),void 0):afterLoad()}},exports.init=function(){if(options.packaged=acequire.packaged||module.packaged||global.define&&define.packaged,!global.document)return\"\";for(var scriptOptions={},scriptUrl=\"\",scripts=document.getElementsByTagName(\"script\"),i=0;scripts.length>i;i++){var script=scripts[i],src=script.src||script.getAttribute(\"src\");if(src){for(var attributes=script.attributes,j=0,l=attributes.length;l>j;j++){var attr=attributes[j];0===attr.name.indexOf(\"data-ace-\")&&(scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/,\"\"))]=attr.value)}var m=src.match(/^(.*)\\/ace(\\-\\w+)?\\.js(\\?|$)/);m&&(scriptUrl=m[1])}}scriptUrl&&(scriptOptions.base=scriptOptions.base||scriptUrl,scriptOptions.packaged=!0),scriptOptions.basePath=scriptOptions.base,scriptOptions.workerPath=scriptOptions.workerPath||scriptOptions.base,scriptOptions.modePath=scriptOptions.modePath||scriptOptions.base,scriptOptions.themePath=scriptOptions.themePath||scriptOptions.base,delete scriptOptions.base;for(var key in scriptOptions)scriptOptions[key]!==void 0&&exports.set(key,scriptOptions[key])};var optionsProvider={setOptions:function(optList){Object.keys(optList).forEach(function(key){this.setOption(key,optList[key])},this)},getOptions:function(a){var b={};return Object.keys(a).forEach(function(key){b[key]=this.getOption(key)},this),b},setOption:function(name,value){if(this[\"$\"+name]!==value){var opt=this.$options[name];if(!opt)return void 0;if(opt.forwardTo)return this[opt.forwardTo]&&this[opt.forwardTo].setOption(name,value);opt.handlesSet||(this[\"$\"+name]=value),opt&&opt.set&&opt.set.call(this,value)}},getOption:function(name){var opt=this.$options[name];return opt?opt.forwardTo?this[opt.forwardTo]&&this[opt.forwardTo].getOption(name):opt&&opt.get?opt.get.call(this):this[\"$\"+name]:void 0}},defaultOptions={};exports.defineOptions=function(obj,path,options){return obj.$options||(defaultOptions[path]=obj.$options={}),Object.keys(options).forEach(function(key){var opt=options[key];\"string\"==typeof opt&&(opt={forwardTo:opt}),opt.name||(opt.name=key),obj.$options[opt.name]=opt,\"initialValue\"in opt&&(obj[\"$\"+opt.name]=opt.initialValue)}),oop.implement(obj,optionsProvider),this},exports.resetOptions=function(obj){Object.keys(obj.$options).forEach(function(key){var opt=obj.$options[key];\"value\"in opt&&obj.setOption(key,opt.value)})},exports.setDefaultValue=function(path,name,value){var opts=defaultOptions[path]||(defaultOptions[path]={});opts[name]&&(opts.forwardTo?exports.setDefaultValue(opts.forwardTo,name,value):opts[name].value=value)},exports.setDefaultValues=function(path,optionHash){Object.keys(optionHash).forEach(function(key){exports.setDefaultValue(path,key,optionHash[key])})}}),ace.define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"],function(acequire,exports){var dom=acequire(\"./dom\");exports.get=function(url,callback){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,!0),xhr.onreadystatechange=function(){4===xhr.readyState&&callback(xhr.responseText)},xhr.send(null)},exports.loadScript=function(path,callback){var head=dom.getDocumentHead(),s=document.createElement(\"script\");s.src=path,head.appendChild(s),s.onload=s.onreadystatechange=function(_,isAbort){(isAbort||!s.readyState||\"loaded\"==s.readyState||\"complete\"==s.readyState)&&(s=s.onload=s.onreadystatechange=null,isAbort||callback())}}}),ace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\"object\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault);for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners)for(var i=0;listeners.length>i;i++)listeners[i](e,this)},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){if(this._defaultHandlers=this._defaultHandlers||{},this._defaultHandlers[eventName])throw Error(\"The default handler for '\"+eventName+\"' is already set\");this._defaultHandlers[eventName]=callback},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\"unshift\":\"push\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\"ace/mouse/fold_handler\",[\"require\",\"exports\",\"module\"],function(acequire,exports){function FoldHandler(editor){editor.on(\"click\",function(e){var position=e.getDocumentPosition(),session=editor.session,fold=session.getFoldAt(position.row,position.column,1);fold&&(e.getAccelKey()?session.removeFold(fold):session.expandFold(fold),e.stop())}),editor.on(\"gutterclick\",function(e){var gutterRegion=editor.renderer.$gutterLayer.getRegion(e);if(\"foldWidgets\"==gutterRegion){var row=e.getDocumentPosition().row,session=editor.session;session.foldWidgets&&session.foldWidgets[row]&&editor.session.onFoldWidgetClick(row,e),editor.isFocused()||editor.focus(),e.stop()}}),editor.on(\"gutterdblclick\",function(e){var gutterRegion=editor.renderer.$gutterLayer.getRegion(e);if(\"foldWidgets\"==gutterRegion){var row=e.getDocumentPosition().row,session=editor.session,data=session.getParentFoldRangeData(row,!0),range=data.range||data.firstRange;if(range){var row=range.start.row,fold=session.getFoldAt(row,session.getLine(row).length,1);fold?session.removeFold(fold):(session.addFold(\"...\",range),editor.renderer.scrollCursorIntoView({row:range.start.row,column:0}))}e.stop()}})}exports.FoldHandler=FoldHandler}),ace.define(\"ace/keyboard/keybinding\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/event\"],function(acequire,exports){var keyUtil=acequire(\"../lib/keys\"),event=acequire(\"../lib/event\"),KeyBinding=function(editor){this.$editor=editor,this.$data={},this.$handlers=[],this.setDefaultHandler(editor.commands)};(function(){this.setDefaultHandler=function(kb){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=kb,this.addKeyboardHandler(kb,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(kb){var h=this.$handlers;if(h[h.length-1]!=kb){for(;h[h.length-1]&&h[h.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(h[h.length-1]);this.addKeyboardHandler(kb,1)}},this.addKeyboardHandler=function(kb,pos){if(kb){var i=this.$handlers.indexOf(kb);-1!=i&&this.$handlers.splice(i,1),void 0==pos?this.$handlers.push(kb):this.$handlers.splice(pos,0,kb),-1==i&&kb.attach&&kb.attach(this.$editor)}},this.removeKeyboardHandler=function(kb){var i=this.$handlers.indexOf(kb);return-1==i?!1:(this.$handlers.splice(i,1),kb.detach&&kb.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(hashId,keyString,keyCode,e){for(var toExecute,success=!1,commands=this.$editor.commands,i=this.$handlers.length;i--&&(toExecute=this.$handlers[i].handleKeyboard(this.$data,hashId,keyString,keyCode,e),!(toExecute&&toExecute.command&&(success=\"null\"==toExecute.command?1!=toExecute.passEvent:commands.exec(toExecute.command,this.$editor,toExecute.args,e),success&&e&&-1!=hashId&&event.stopEvent(e),success))););return success},this.onCommandKey=function(e,hashId,keyCode){var keyString=keyUtil.keyCodeToString(keyCode);this.$callKeyboardHandlers(hashId,keyString,keyCode,e)},this.onTextInput=function(text){var success=this.$callKeyboardHandlers(-1,text);success||this.$editor.commands.exec(\"insertstring\",this.$editor,text)}}).call(KeyBinding.prototype),exports.KeyBinding=KeyBinding}),ace.define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/config\",\"ace/lib/event_emitter\",\"ace/selection\",\"ace/mode/text\",\"ace/range\",\"ace/document\",\"ace/background_tokenizer\",\"ace/search_highlight\",\"ace/edit_session/folding\",\"ace/edit_session/bracket_match\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),lang=acequire(\"./lib/lang\"),config=acequire(\"./config\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Selection=acequire(\"./selection\").Selection,TextMode=acequire(\"./mode/text\").Mode,Range=acequire(\"./range\").Range,Document=acequire(\"./document\").Document,BackgroundTokenizer=acequire(\"./background_tokenizer\").BackgroundTokenizer,SearchHighlight=acequire(\"./search_highlight\").SearchHighlight,EditSession=function(text,mode){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join(\"\\n\")},this.on(\"changeFold\",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),\"object\"==typeof text&&text.getLine||(text=new Document(text)),this.setDocument(text),this.selection=new Selection(this),this.setMode(mode),config.resetOptions(this),config._emit(\"session\",this)};(function(){function isFullWidth(c){return 4352>c?!1:c>=4352&&4447>=c||c>=4515&&4519>=c||c>=4602&&4607>=c||c>=9001&&9002>=c||c>=11904&&11929>=c||c>=11931&&12019>=c||c>=12032&&12245>=c||c>=12272&&12283>=c||c>=12288&&12350>=c||c>=12353&&12438>=c||c>=12441&&12543>=c||c>=12549&&12589>=c||c>=12593&&12686>=c||c>=12688&&12730>=c||c>=12736&&12771>=c||c>=12784&&12830>=c||c>=12832&&12871>=c||c>=12880&&13054>=c||c>=13056&&19903>=c||c>=19968&&42124>=c||c>=42128&&42182>=c||c>=43360&&43388>=c||c>=44032&&55203>=c||c>=55216&&55238>=c||c>=55243&&55291>=c||c>=63744&&64255>=c||c>=65040&&65049>=c||c>=65072&&65106>=c||c>=65108&&65126>=c||c>=65128&&65131>=c||c>=65281&&65376>=c||c>=65504&&65510>=c}oop.implement(this,EventEmitter),this.setDocument=function(doc){this.doc&&this.doc.removeListener(\"change\",this.$onChange),this.doc=doc,doc.on(\"change\",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(docRow){if(!docRow)return this.$docRowCache=[],this.$screenRowCache=[],void 0;var l=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,docRow)+1;l>i&&(this.$docRowCache.splice(i,l),this.$screenRowCache.splice(i,l))},this.$getRowCacheIndex=function(cacheArray,val){for(var low=0,hi=cacheArray.length-1;hi>=low;){var mid=low+hi>>1,c=cacheArray[mid];if(val>c)low=mid+1;else{if(!(c>val))return mid;hi=mid-1}}return low-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var fold=e.data;this.$resetRowCache(fold.start.row)},this.onChange=function(e){var delta=e.data;this.$modified=!0,this.$resetRowCache(delta.range.start.row);var removedFolds=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||delta.ignore||(this.$deltasDoc.push(delta),removedFolds&&0!=removedFolds.length&&this.$deltasFold.push({action:\"removeFolds\",folds:removedFolds}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(delta),this._emit(\"change\",e)},this.setValue=function(text){this.doc.setValue(text),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(row){return this.bgTokenizer.getState(row)},this.getTokens=function(row){return this.bgTokenizer.getTokens(row)},this.getTokenAt=function(row,column){var token,tokens=this.bgTokenizer.getTokens(row),c=0;if(null==column)i=tokens.length-1,c=this.getLine(row).length;else for(var i=0;tokens.length>i&&(c+=tokens[i].value.length,!(c>=column));i++);return(token=tokens[i])?(token.index=i,token.start=c-token.value.length,token):null},this.setUndoManager=function(undoManager){if(this.$undoManager=undoManager,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),undoManager){var self=this;this.$syncInformUndoManager=function(){self.$informUndoManager.cancel(),self.$deltasFold.length&&(self.$deltas.push({group:\"fold\",deltas:self.$deltasFold}),self.$deltasFold=[]),self.$deltasDoc.length&&(self.$deltas.push({group:\"doc\",deltas:self.$deltasDoc}),self.$deltasDoc=[]),self.$deltas.length>0&&undoManager.execute({action:\"aceupdate\",args:[self.$deltas,self]}),self.$deltas=[]},this.$informUndoManager=lang.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?lang.stringRepeat(\" \",this.getTabSize()):\"\t\"},this.setUseSoftTabs=function(val){this.setOption(\"useSoftTabs\",val)},this.getUseSoftTabs=function(){return this.$useSoftTabs},this.setTabSize=function(tabSize){this.setOption(\"tabSize\",tabSize)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(position){return this.$useSoftTabs&&0==position.column%this.$tabSize},this.$overwrite=!1,this.setOverwrite=function(overwrite){this.setOption(\"overwrite\",overwrite)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(row,className){this.$decorations[row]||(this.$decorations[row]=\"\"),this.$decorations[row]+=\" \"+className,this._emit(\"changeBreakpoint\",{})},this.removeGutterDecoration=function(row,className){this.$decorations[row]=(this.$decorations[row]||\"\").replace(\" \"+className,\"\"),this._emit(\"changeBreakpoint\",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(rows){this.$breakpoints=[];for(var i=0;rows.length>i;i++)this.$breakpoints[rows[i]]=\"ace_breakpoint\";this._emit(\"changeBreakpoint\",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit(\"changeBreakpoint\",{})},this.setBreakpoint=function(row,className){void 0===className&&(className=\"ace_breakpoint\"),className?this.$breakpoints[row]=className:delete this.$breakpoints[row],this._emit(\"changeBreakpoint\",{})},this.clearBreakpoint=function(row){delete this.$breakpoints[row],this._emit(\"changeBreakpoint\",{})},this.addMarker=function(range,clazz,type,inFront){var id=this.$markerId++,marker={range:range,type:type||\"line\",renderer:\"function\"==typeof type?type:null,clazz:clazz,inFront:!!inFront,id:id};return inFront?(this.$frontMarkers[id]=marker,this._emit(\"changeFrontMarker\")):(this.$backMarkers[id]=marker,this._emit(\"changeBackMarker\")),id},this.addDynamicMarker=function(marker,inFront){if(marker.update){var id=this.$markerId++;return marker.id=id,marker.inFront=!!inFront,inFront?(this.$frontMarkers[id]=marker,this._emit(\"changeFrontMarker\")):(this.$backMarkers[id]=marker,this._emit(\"changeBackMarker\")),marker}},this.removeMarker=function(markerId){var marker=this.$frontMarkers[markerId]||this.$backMarkers[markerId];if(marker){var markers=marker.inFront?this.$frontMarkers:this.$backMarkers;marker&&(delete markers[markerId],this._emit(marker.inFront?\"changeFrontMarker\":\"changeBackMarker\"))}},this.getMarkers=function(inFront){return inFront?this.$frontMarkers:this.$backMarkers},this.highlight=function(re){if(!this.$searchHighlight){var highlight=new SearchHighlight(null,\"ace_selected-word\",\"text\");this.$searchHighlight=this.addDynamicMarker(highlight)}this.$searchHighlight.setRegexp(re)},this.highlightLines=function(startRow,endRow,clazz,inFront){\"number\"!=typeof endRow&&(clazz=endRow,endRow=startRow),clazz||(clazz=\"ace_step\");var range=new Range(startRow,0,endRow,1/0);return range.id=this.addMarker(range,clazz,\"fullLine\",inFront),range},this.setAnnotations=function(annotations){this.$annotations=annotations,this._emit(\"changeAnnotation\",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r?\\n)/m);this.$autoNewLine=match?match[1]:\"\\n\"},this.getWordRange=function(row,column){var line=this.getLine(row),inToken=!1;if(column>0&&(inToken=!!line.charAt(column-1).match(this.tokenRe)),inToken||(inToken=!!line.charAt(column).match(this.tokenRe)),inToken)var re=this.tokenRe;else if(/^\\s+$/.test(line.slice(column-1,column+1)))var re=/\\s/;else var re=this.nonTokenRe;var start=column;if(start>0){do start--;while(start>=0&&line.charAt(start).match(re));start++}for(var end=column;line.length>end&&line.charAt(end).match(re);)end++;return new Range(row,start,row,end)},this.getAWordRange=function(row,column){for(var wordRange=this.getWordRange(row,column),line=this.getLine(wordRange.end.row);line.charAt(wordRange.end.column).match(/[ \\t]/);)wordRange.end.column+=1;return wordRange},this.setNewLineMode=function(newLineMode){this.doc.setNewLineMode(newLineMode)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(useWorker){this.setOption(\"useWorker\",useWorker)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var rows=e.data;this.bgTokenizer.start(rows.first),this._emit(\"tokenizerUpdate\",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(mode){if(mode&&\"object\"==typeof mode){if(mode.getTokenizer)return this.$onChangeMode(mode);var options=mode,path=options.path}else path=mode||\"ace/mode/text\";return this.$modes[\"ace/mode/text\"]||(this.$modes[\"ace/mode/text\"]=new TextMode),this.$modes[path]&&!options?this.$onChangeMode(this.$modes[path]):(this.$modeId=path,config.loadModule([\"mode\",path],function(m){return this.$modeId===path?this.$modes[path]&&!options?this.$onChangeMode(this.$modes[path]):(m&&m.Mode&&(m=new m.Mode(options),options||(this.$modes[path]=m,m.$id=path),this.$onChangeMode(m)),void 0):void 0}.bind(this)),this.$mode||this.$onChangeMode(this.$modes[\"ace/mode/text\"],!0),void 0)},this.$onChangeMode=function(mode,$isPlaceholder){if(this.$mode!==mode){this.$mode=mode,this.$stopWorker(),this.$useWorker&&this.$startWorker();var tokenizer=mode.getTokenizer();if(void 0!==tokenizer.addEventListener){var onReloadTokenizer=this.onReloadTokenizer.bind(this);tokenizer.addEventListener(\"update\",onReloadTokenizer)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(tokenizer);else{this.bgTokenizer=new BackgroundTokenizer(tokenizer);var _self=this;this.bgTokenizer.addEventListener(\"update\",function(e){_self._emit(\"tokenizerUpdate\",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=mode.tokenRe,this.nonTokenRe=mode.nonTokenRe,$isPlaceholder||(this.$modeId=mode.$id,this.$setFolding(mode.foldingRules),this._emit(\"changeMode\"),this.bgTokenizer.start(0))}},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if(\"undefined\"==typeof Worker||acequire.noWorker)this.$worker=null;else try{this.$worker=this.$mode.createWorker(this)}catch(e){console.log(\"Could not load worker\"),console.log(e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(scrollTop){scrollTop=Math.round(Math.max(0,scrollTop)),this.$scrollTop===scrollTop||isNaN(scrollTop)||(this.$scrollTop=scrollTop,this._signal(\"changeScrollTop\",scrollTop))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(scrollLeft){scrollLeft=Math.round(Math.max(0,scrollLeft)),this.$scrollLeft===scrollLeft||isNaN(scrollLeft)||(this.$scrollLeft=scrollLeft,this._signal(\"changeScrollLeft\",scrollLeft))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(force){if(this.$modified||force){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var lines=this.doc.getAllLines(),cache=this.$rowLengthCache,longestScreenLine=0,foldIndex=0,foldLine=this.$foldData[foldIndex],foldStart=foldLine?foldLine.start.row:1/0,len=lines.length,i=0;len>i;i++){if(i>foldStart){if(i=foldLine.end.row+1,i>=len)break;foldLine=this.$foldData[foldIndex++],foldStart=foldLine?foldLine.start.row:1/0}null==cache[i]&&(cache[i]=this.$getStringScreenWidth(lines[i])[0]),cache[i]>longestScreenLine&&(longestScreenLine=cache[i])}this.screenWidth=longestScreenLine}},this.getLine=function(row){return this.doc.getLine(row)},this.getLines=function(firstRow,lastRow){return this.doc.getLines(firstRow,lastRow)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(range){return this.doc.getTextRange(range||this.selection.getRange())},this.insert=function(position,text){return this.doc.insert(position,text)},this.remove=function(range){return this.doc.remove(range)},this.undoChanges=function(deltas,dontSelect){if(deltas.length){this.$fromUndo=!0;for(var lastUndoRange=null,i=deltas.length-1;-1!=i;i--){var delta=deltas[i];\"doc\"==delta.group?(this.doc.revertDeltas(delta.deltas),lastUndoRange=this.$getUndoSelection(delta.deltas,!0,lastUndoRange)):delta.deltas.forEach(function(foldDelta){this.addFolds(foldDelta.folds)},this)}return this.$fromUndo=!1,lastUndoRange&&this.$undoSelect&&!dontSelect&&this.selection.setSelectionRange(lastUndoRange),lastUndoRange}},this.redoChanges=function(deltas,dontSelect){if(deltas.length){this.$fromUndo=!0;for(var lastUndoRange=null,i=0;deltas.length>i;i++){var delta=deltas[i];\"doc\"==delta.group&&(this.doc.applyDeltas(delta.deltas),lastUndoRange=this.$getUndoSelection(delta.deltas,!1,lastUndoRange))}return this.$fromUndo=!1,lastUndoRange&&this.$undoSelect&&!dontSelect&&this.selection.setSelectionRange(lastUndoRange),lastUndoRange}},this.setUndoSelect=function(enable){this.$undoSelect=enable},this.$getUndoSelection=function(deltas,isUndo,lastUndoRange){function isInsert(delta){var insert=\"insertText\"===delta.action||\"insertLines\"===delta.action;return isUndo?!insert:insert}var range,point,delta=deltas[0],lastDeltaIsInsert=!1;isInsert(delta)?(range=delta.range.clone(),lastDeltaIsInsert=!0):(range=Range.fromPoints(delta.range.start,delta.range.start),lastDeltaIsInsert=!1);for(var i=1;deltas.length>i;i++)delta=deltas[i],isInsert(delta)?(point=delta.range.start,-1==range.compare(point.row,point.column)&&range.setStart(delta.range.start),point=delta.range.end,1==range.compare(point.row,point.column)&&range.setEnd(delta.range.end),lastDeltaIsInsert=!0):(point=delta.range.start,-1==range.compare(point.row,point.column)&&(range=Range.fromPoints(delta.range.start,delta.range.start)),lastDeltaIsInsert=!1);if(null!=lastUndoRange){var cmp=lastUndoRange.compareRange(range);1==cmp?range.setStart(lastUndoRange.start):-1==cmp&&range.setEnd(lastUndoRange.end)}return range},this.replace=function(range,text){return this.doc.replace(range,text)},this.moveText=function(fromRange,toPosition,copy){var text=this.getTextRange(fromRange),folds=this.getFoldsInRange(fromRange),toRange=Range.fromPoints(toPosition,toPosition);if(!copy){this.remove(fromRange);var rowDiff=fromRange.start.row-fromRange.end.row,collDiff=rowDiff?-fromRange.end.column:fromRange.start.column-fromRange.end.column;collDiff&&(toRange.start.row==fromRange.end.row&&toRange.start.column>fromRange.end.column&&(toRange.start.column+=collDiff),toRange.end.row==fromRange.end.row&&toRange.end.column>fromRange.end.column&&(toRange.end.column+=collDiff)),rowDiff&&toRange.start.row>=fromRange.end.row&&(toRange.start.row+=rowDiff,toRange.end.row+=rowDiff)}if(this.insert(toRange.start,text),folds.length){var oldStart=fromRange.start,newStart=toRange.start,rowDiff=newStart.row-oldStart.row,collDiff=newStart.column-oldStart.column;this.addFolds(folds.map(function(x){return x=x.clone(),x.start.row==oldStart.row&&(x.start.column+=collDiff),x.end.row==oldStart.row&&(x.end.column+=collDiff),x.start.row+=rowDiff,x.end.row+=rowDiff,x}))}return toRange},this.indentRows=function(startRow,endRow,indentString){indentString=indentString.replace(/\\t/g,this.getTabString());for(var row=startRow;endRow>=row;row++)this.insert({row:row,column:0},indentString)},this.outdentRows=function(range){for(var rowRange=range.collapseRows(),deleteRange=new Range(0,0,0,0),size=this.getTabSize(),i=rowRange.start.row;rowRange.end.row>=i;++i){var line=this.getLine(i);deleteRange.start.row=i,deleteRange.end.row=i;for(var j=0;size>j&&\" \"==line.charAt(j);++j);size>j&&\"\t\"==line.charAt(j)?(deleteRange.start.column=j,deleteRange.end.column=j+1):(deleteRange.start.column=0,deleteRange.end.column=j),this.remove(deleteRange)}},this.$moveLines=function(firstRow,lastRow,dir){if(firstRow=this.getRowFoldStart(firstRow),lastRow=this.getRowFoldEnd(lastRow),0>dir){var row=this.getRowFoldStart(firstRow+dir);if(0>row)return 0;var diff=row-firstRow}else if(dir>0){var row=this.getRowFoldEnd(lastRow+dir);if(row>this.doc.getLength()-1)return 0;var diff=row-lastRow}else{firstRow=this.$clipRowToDocument(firstRow),lastRow=this.$clipRowToDocument(lastRow);var diff=lastRow-firstRow+1}var range=new Range(firstRow,0,lastRow,Number.MAX_VALUE),folds=this.getFoldsInRange(range).map(function(x){return x=x.clone(),x.start.row+=diff,x.end.row+=diff,x}),lines=0==dir?this.doc.getLines(firstRow,lastRow):this.doc.removeLines(firstRow,lastRow);return this.doc.insertLines(firstRow+diff,lines),folds.length&&this.addFolds(folds),diff},this.moveLinesUp=function(firstRow,lastRow){return this.$moveLines(firstRow,lastRow,-1)},this.moveLinesDown=function(firstRow,lastRow){return this.$moveLines(firstRow,lastRow,1)},this.duplicateLines=function(firstRow,lastRow){return this.$moveLines(firstRow,lastRow,0)},this.$clipRowToDocument=function(row){return Math.max(0,Math.min(row,this.doc.getLength()-1))},this.$clipColumnToRow=function(row,column){return 0>column?0:Math.min(this.doc.getLine(row).length,column)},this.$clipPositionToDocument=function(row,column){if(column=Math.max(0,column),0>row)row=0,column=0;else{var len=this.doc.getLength();row>=len?(row=len-1,column=this.doc.getLine(len-1).length):column=Math.min(this.doc.getLine(row).length,column)}return{row:row,column:column}},this.$clipRangeToDocument=function(range){0>range.start.row?(range.start.row=0,range.start.column=0):range.start.column=this.$clipColumnToRow(range.start.row,range.start.column);var len=this.doc.getLength()-1;return range.end.row>len?(range.end.row=len,range.end.column=this.doc.getLine(len).length):range.end.column=this.$clipColumnToRow(range.end.row,range.end.column),range},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(useWrapMode){if(useWrapMode!=this.$useWrapMode){if(this.$useWrapMode=useWrapMode,this.$modified=!0,this.$resetRowCache(0),useWrapMode){var len=this.getLength();this.$wrapData=[];for(var i=0;len>i;i++)this.$wrapData.push([]);this.$updateWrapData(0,len-1)}this._emit(\"changeWrapMode\")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(min,max){(this.$wrapLimitRange.min!==min||this.$wrapLimitRange.max!==max)&&(this.$wrapLimitRange.min=min,this.$wrapLimitRange.max=max,this.$modified=!0,this._emit(\"changeWrapMode\"))},this.adjustWrapLimit=function(desiredLimit,$printMargin){var limits=this.$wrapLimitRange;0>limits.max&&(limits={min:$printMargin,max:$printMargin});var wrapLimit=this.$constrainWrapLimit(desiredLimit,limits.min,limits.max);return wrapLimit!=this.$wrapLimit&&wrapLimit>1?(this.$wrapLimit=wrapLimit,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit(\"changeWrapLimit\")),!0):!1},this.$constrainWrapLimit=function(wrapLimit,min,max){return min&&(wrapLimit=Math.max(min,wrapLimit)),max&&(wrapLimit=Math.min(max,wrapLimit)),wrapLimit},this.getWrapLimit=function(){return this.$wrapLimit},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var len,useWrapMode=this.$useWrapMode,action=e.data.action,firstRow=e.data.range.start.row,lastRow=e.data.range.end.row,start=e.data.range.start,end=e.data.range.end,removedFolds=null;if(-1!=action.indexOf(\"Lines\")?(lastRow=\"insertLines\"==action?firstRow+e.data.lines.length:firstRow,len=e.data.lines?e.data.lines.length:lastRow-firstRow):len=lastRow-firstRow,this.$updating=!0,0!=len)if(-1!=action.indexOf(\"remove\")){this[useWrapMode?\"$wrapData\":\"$rowLengthCache\"].splice(firstRow,len);var foldLines=this.$foldData;removedFolds=this.getFoldsInRange(e.data.range),this.removeFolds(removedFolds);var foldLine=this.getFoldLine(end.row),idx=0;if(foldLine){foldLine.addRemoveChars(end.row,end.column,start.column-end.column),foldLine.shiftRow(-len);var foldLineBefore=this.getFoldLine(firstRow);foldLineBefore&&foldLineBefore!==foldLine&&(foldLineBefore.merge(foldLine),foldLine=foldLineBefore),idx=foldLines.indexOf(foldLine)+1\n}for(idx;foldLines.length>idx;idx++){var foldLine=foldLines[idx];foldLine.start.row>=end.row&&foldLine.shiftRow(-len)}lastRow=firstRow}else{var args;if(useWrapMode){args=[firstRow,0];for(var i=0;len>i;i++)args.push([]);this.$wrapData.splice.apply(this.$wrapData,args)}else args=Array(len),args.unshift(firstRow,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,args);var foldLines=this.$foldData,foldLine=this.getFoldLine(firstRow),idx=0;if(foldLine){var cmp=foldLine.range.compareInside(start.row,start.column);0==cmp?(foldLine=foldLine.split(start.row,start.column),foldLine.shiftRow(len),foldLine.addRemoveChars(lastRow,0,end.column-start.column)):-1==cmp&&(foldLine.addRemoveChars(firstRow,0,end.column-start.column),foldLine.shiftRow(len)),idx=foldLines.indexOf(foldLine)+1}for(idx;foldLines.length>idx;idx++){var foldLine=foldLines[idx];foldLine.start.row>=firstRow&&foldLine.shiftRow(len)}}else{len=Math.abs(e.data.range.start.column-e.data.range.end.column),-1!=action.indexOf(\"remove\")&&(removedFolds=this.getFoldsInRange(e.data.range),this.removeFolds(removedFolds),len=-len);var foldLine=this.getFoldLine(firstRow);foldLine&&foldLine.addRemoveChars(firstRow,start.column,len)}return useWrapMode&&this.$wrapData.length!=this.doc.getLength()&&console.error(\"doc.getLength() and $wrapData.length have to be the same!\"),this.$updating=!1,useWrapMode?this.$updateWrapData(firstRow,lastRow):this.$updateRowLengthCache(firstRow,lastRow),removedFolds},this.$updateRowLengthCache=function(firstRow,lastRow){this.$rowLengthCache[firstRow]=null,this.$rowLengthCache[lastRow]=null},this.$updateWrapData=function(firstRow,lastRow){var tokens,foldLine,lines=this.doc.getAllLines(),tabSize=this.getTabSize(),wrapData=this.$wrapData,wrapLimit=this.$wrapLimit,row=firstRow;for(lastRow=Math.min(lastRow,lines.length-1);lastRow>=row;)if(foldLine=this.getFoldLine(row,foldLine)){for(tokens=[],foldLine.walk(function(placeholder,row,column,lastColumn){var walkTokens;if(null!=placeholder){walkTokens=this.$getDisplayTokens(placeholder,tokens.length),walkTokens[0]=PLACEHOLDER_START;for(var i=1;walkTokens.length>i;i++)walkTokens[i]=PLACEHOLDER_BODY}else walkTokens=this.$getDisplayTokens(lines[row].substring(lastColumn,column),tokens.length);tokens=tokens.concat(walkTokens)}.bind(this),foldLine.end.row,lines[foldLine.end.row].length+1);0!=tokens.length&&tokens[tokens.length-1]>=SPACE;)tokens.pop();wrapData[foldLine.start.row]=this.$computeWrapSplits(tokens,wrapLimit,tabSize),row=foldLine.end.row+1}else tokens=this.$getDisplayTokens(lang.stringTrimRight(lines[row])),wrapData[row]=this.$computeWrapSplits(tokens,wrapLimit,tabSize),row++};var CHAR=1,CHAR_EXT=2,PLACEHOLDER_START=3,PLACEHOLDER_BODY=4,PUNCTUATION=9,SPACE=10,TAB=11,TAB_SPACE=12;this.$computeWrapSplits=function(tokens,wrapLimit){function addSplit(screenPos){var displayed=tokens.slice(lastSplit,screenPos),len=displayed.length;displayed.join(\"\").replace(/12/g,function(){len-=1}).replace(/2/g,function(){len-=1}),lastDocSplit+=len,splits.push(lastDocSplit),lastSplit=screenPos}if(0==tokens.length)return[];for(var splits=[],displayLength=tokens.length,lastSplit=0,lastDocSplit=0;displayLength-lastSplit>wrapLimit;){var split=lastSplit+wrapLimit;if(tokens[split]>=SPACE){for(;tokens[split]>=SPACE;)split++;addSplit(split)}else if(tokens[split]!=PLACEHOLDER_START&&tokens[split]!=PLACEHOLDER_BODY){for(var minSplit=Math.max(split-10,lastSplit-1);split>minSplit&&PLACEHOLDER_START>tokens[split];)split--;for(;split>minSplit&&tokens[split]==PUNCTUATION;)split--;split>minSplit?addSplit(++split):(split=lastSplit+wrapLimit,addSplit(split))}else{for(split;split!=lastSplit-1&&tokens[split]!=PLACEHOLDER_START;split--);if(split>lastSplit){addSplit(split);continue}for(split=lastSplit+wrapLimit;tokens.length>split&&tokens[split]==PLACEHOLDER_BODY;split++);if(split==tokens.length)break;addSplit(split)}}return splits},this.$getDisplayTokens=function(str,offset){var tabSize,arr=[];offset=offset||0;for(var i=0;str.length>i;i++){var c=str.charCodeAt(i);if(9==c){tabSize=this.getScreenTabSize(arr.length+offset),arr.push(TAB);for(var n=1;tabSize>n;n++)arr.push(TAB_SPACE)}else 32==c?arr.push(SPACE):c>39&&48>c||c>57&&64>c?arr.push(PUNCTUATION):c>=4352&&isFullWidth(c)?arr.push(CHAR,CHAR_EXT):arr.push(CHAR)}return arr},this.$getStringScreenWidth=function(str,maxScreenColumn,screenColumn){if(0==maxScreenColumn)return[0,0];null==maxScreenColumn&&(maxScreenColumn=1/0),screenColumn=screenColumn||0;var c,column;for(column=0;str.length>column&&(c=str.charCodeAt(column),screenColumn+=9==c?this.getScreenTabSize(screenColumn):c>=4352&&isFullWidth(c)?2:1,!(screenColumn>maxScreenColumn));column++);return[screenColumn,column]},this.getRowLength=function(row){return this.$useWrapMode&&this.$wrapData[row]?this.$wrapData[row].length+1:1},this.getScreenLastRowColumn=function(screenRow){var pos=this.screenToDocumentPosition(screenRow,Number.MAX_VALUE);return this.documentToScreenColumn(pos.row,pos.column)},this.getDocumentLastRowColumn=function(docRow,docColumn){var screenRow=this.documentToScreenRow(docRow,docColumn);return this.getScreenLastRowColumn(screenRow)},this.getDocumentLastRowColumnPosition=function(docRow,docColumn){var screenRow=this.documentToScreenRow(docRow,docColumn);return this.screenToDocumentPosition(screenRow,Number.MAX_VALUE/10)},this.getRowSplitData=function(row){return this.$useWrapMode?this.$wrapData[row]:void 0},this.getScreenTabSize=function(screenColumn){return this.$tabSize-screenColumn%this.$tabSize},this.screenToDocumentRow=function(screenRow,screenColumn){return this.screenToDocumentPosition(screenRow,screenColumn).row},this.screenToDocumentColumn=function(screenRow,screenColumn){return this.screenToDocumentPosition(screenRow,screenColumn).column},this.screenToDocumentPosition=function(screenRow,screenColumn){if(0>screenRow)return{row:0,column:0};var line,column,docRow=0,docColumn=0,row=0,rowLength=0,rowCache=this.$screenRowCache,i=this.$getRowCacheIndex(rowCache,screenRow),l=rowCache.length;if(l&&i>=0)var row=rowCache[i],docRow=this.$docRowCache[i],doCache=screenRow>rowCache[l-1];else var doCache=!l;for(var maxRow=this.getLength()-1,foldLine=this.getNextFoldLine(docRow),foldStart=foldLine?foldLine.start.row:1/0;screenRow>=row&&(rowLength=this.getRowLength(docRow),!(row+rowLength-1>=screenRow||docRow>=maxRow));)row+=rowLength,docRow++,docRow>foldStart&&(docRow=foldLine.end.row+1,foldLine=this.getNextFoldLine(docRow,foldLine),foldStart=foldLine?foldLine.start.row:1/0),doCache&&(this.$docRowCache.push(docRow),this.$screenRowCache.push(row));if(foldLine&&docRow>=foldLine.start.row)line=this.getFoldDisplayLine(foldLine),docRow=foldLine.start.row;else{if(screenRow>=row+rowLength||docRow>maxRow)return{row:maxRow,column:this.getLine(maxRow).length};line=this.getLine(docRow),foldLine=null}if(this.$useWrapMode){var splits=this.$wrapData[docRow];splits&&(column=splits[screenRow-row],screenRow>row&&splits.length&&(docColumn=splits[screenRow-row-1]||splits[splits.length-1],line=line.substring(docColumn)))}return docColumn+=this.$getStringScreenWidth(line,screenColumn)[1],this.$useWrapMode&&docColumn>=column&&(docColumn=column-1),foldLine?foldLine.idxToPosition(docColumn):{row:docRow,column:docColumn}},this.documentToScreenPosition=function(docRow,docColumn){if(docColumn===void 0)var pos=this.$clipPositionToDocument(docRow.row,docRow.column);else pos=this.$clipPositionToDocument(docRow,docColumn);docRow=pos.row,docColumn=pos.column;var screenRow=0,foldStartRow=null,fold=null;fold=this.getFoldAt(docRow,docColumn,1),fold&&(docRow=fold.start.row,docColumn=fold.start.column);var rowEnd,row=0,rowCache=this.$docRowCache,i=this.$getRowCacheIndex(rowCache,docRow),l=rowCache.length;if(l&&i>=0)var row=rowCache[i],screenRow=this.$screenRowCache[i],doCache=docRow>rowCache[l-1];else var doCache=!l;for(var foldLine=this.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;docRow>row;){if(row>=foldStart){if(rowEnd=foldLine.end.row+1,rowEnd>docRow)break;foldLine=this.getNextFoldLine(rowEnd,foldLine),foldStart=foldLine?foldLine.start.row:1/0}else rowEnd=row+1;screenRow+=this.getRowLength(row),row=rowEnd,doCache&&(this.$docRowCache.push(row),this.$screenRowCache.push(screenRow))}var textLine=\"\";if(foldLine&&row>=foldStart?(textLine=this.getFoldDisplayLine(foldLine,docRow,docColumn),foldStartRow=foldLine.start.row):(textLine=this.getLine(docRow).substring(0,docColumn),foldStartRow=docRow),this.$useWrapMode){for(var wrapRow=this.$wrapData[foldStartRow],screenRowOffset=0;textLine.length>=wrapRow[screenRowOffset];)screenRow++,screenRowOffset++;textLine=textLine.substring(wrapRow[screenRowOffset-1]||0,textLine.length)}return{row:screenRow,column:this.$getStringScreenWidth(textLine)[0]}},this.documentToScreenColumn=function(row,docColumn){return this.documentToScreenPosition(row,docColumn).column},this.documentToScreenRow=function(docRow,docColumn){return this.documentToScreenPosition(docRow,docColumn).row},this.getScreenLength=function(){var screenRows=0,fold=null;if(this.$useWrapMode)for(var lastRow=this.$wrapData.length,row=0,i=0,fold=this.$foldData[i++],foldStart=fold?fold.start.row:1/0;lastRow>row;)screenRows+=this.$wrapData[row].length+1,row++,row>foldStart&&(row=fold.end.row+1,fold=this.$foldData[i++],foldStart=fold?fold.start.row:1/0);else{screenRows=this.getLength();for(var foldData=this.$foldData,i=0;foldData.length>i;i++)fold=foldData[i],screenRows-=fold.end.row-fold.start.row}return screenRows}}).call(EditSession.prototype),acequire(\"./edit_session/folding\").Folding.call(EditSession.prototype),acequire(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype),config.defineOptions(EditSession.prototype,\"session\",{wrap:{set:function(value){if(value&&\"off\"!=value?\"free\"==value?value=!0:\"printMargin\"==value?value=-1:\"string\"==typeof value&&(value=parseInt(value,10)||!1):value=!1,this.$wrap!=value){if(value){var col=\"number\"==typeof value?value:null;this.setWrapLimitRange(col,col),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1);this.$wrap=value}},get:function(){return this.getUseWrapMode()?this.getWrapLimitRange().min||\"free\":\"off\"},handlesSet:!0},firstLineNumber:{set:function(){this._emit(\"changeBreakpoint\")},initialValue:1},useWorker:{set:function(useWorker){this.$useWorker=useWorker,this.$stopWorker(),useWorker&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(tabSize){isNaN(tabSize)||this.$tabSize===tabSize||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=tabSize,this._emit(\"changeTabSize\"))},initialValue:4,handlesSet:!0},overwrite:{set:function(){this._emit(\"changeOverwrite\")},initialValue:!1},newLineMode:{set:function(val){this.doc.setNewLineMode(val)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0}}),exports.EditSession=EditSession}),ace.define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),lang=acequire(\"./lib/lang\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Selection=function(session){this.session=session,this.doc=session.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var self=this;this.lead.on(\"change\",function(e){self._emit(\"changeCursor\"),self.$isEmpty||self._emit(\"changeSelection\"),self.$keepDesiredColumnOnChange||e.old.column==e.value.column||(self.$desiredColumn=null)}),this.selectionAnchor.on(\"change\",function(){self.$isEmpty||self._emit(\"changeSelection\")})};(function(){oop.implement(this,EventEmitter),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(row,column){this.anchor.setPosition(row,column),this.$isEmpty&&(this.$isEmpty=!1,this._emit(\"changeSelection\"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(columns){if(this.$isEmpty)return this.moveCursorTo(this.lead.row,this.lead.column+columns),void 0;var anchor=this.getSelectionAnchor(),lead=this.getSelectionLead(),isBackwards=this.isBackwards();isBackwards&&0===anchor.column||this.setSelectionAnchor(anchor.row,anchor.column+columns),(isBackwards||0!==lead.column)&&this.$moveSelection(function(){this.moveCursorTo(lead.row,lead.column+columns)})},this.isBackwards=function(){var anchor=this.anchor,lead=this.lead;return anchor.row>lead.row||anchor.row==lead.row&&anchor.column>lead.column},this.getRange=function(){var anchor=this.anchor,lead=this.lead;return this.isEmpty()?Range.fromPoints(lead,lead):this.isBackwards()?Range.fromPoints(lead,anchor):Range.fromPoints(anchor,lead)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit(\"changeSelection\"))},this.selectAll=function(){var lastRow=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(lastRow,this.doc.getLine(lastRow).length)},this.setRange=this.setSelectionRange=function(range,reverse){reverse?(this.setSelectionAnchor(range.end.row,range.end.column),this.selectTo(range.start.row,range.start.column)):(this.setSelectionAnchor(range.start.row,range.start.column),this.selectTo(range.end.row,range.end.column)),this.$desiredColumn=null},this.$moveSelection=function(mover){var lead=this.lead;this.$isEmpty&&this.setSelectionAnchor(lead.row,lead.column),mover.call(this)},this.selectTo=function(row,column){this.$moveSelection(function(){this.moveCursorTo(row,column)})},this.selectToPosition=function(pos){this.$moveSelection(function(){this.moveCursorToPosition(pos)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(row,column){if(column===void 0){var cursor=row||this.lead;row=cursor.row,column=cursor.column}return this.session.getWordRange(row,column)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var cursor=this.getCursor(),range=this.session.getAWordRange(cursor.row,cursor.column);this.setSelectionRange(range)},this.getLineRange=function(row,excludeLastChar){var rowEnd,rowStart=\"number\"==typeof row?row:this.lead.row,foldLine=this.session.getFoldLine(rowStart);return foldLine?(rowStart=foldLine.start.row,rowEnd=foldLine.end.row):rowEnd=rowStart,excludeLastChar?new Range(rowStart,0,rowEnd,this.session.getLine(rowEnd).length):new Range(rowStart,0,rowEnd+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var fold,cursor=this.lead.getPosition();if(fold=this.session.getFoldAt(cursor.row,cursor.column,-1))this.moveCursorTo(fold.start.row,fold.start.column);else if(0==cursor.column)cursor.row>0&&this.moveCursorTo(cursor.row-1,this.doc.getLine(cursor.row-1).length);else{var tabSize=this.session.getTabSize();this.session.isTabStop(cursor)&&this.doc.getLine(cursor.row).slice(cursor.column-tabSize,cursor.column).split(\" \").length-1==tabSize?this.moveCursorBy(0,-tabSize):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var fold,cursor=this.lead.getPosition();if(fold=this.session.getFoldAt(cursor.row,cursor.column,1))this.moveCursorTo(fold.end.row,fold.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row\u003Cthis.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var tabSize=this.session.getTabSize(),cursor=this.lead;this.session.isTabStop(cursor)&&this.doc.getLine(cursor.row).slice(cursor.column,cursor.column+tabSize).split(\" \").length-1==tabSize?this.moveCursorBy(0,tabSize):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var row=this.lead.row,column=this.lead.column,screenRow=this.session.documentToScreenRow(row,column),firstColumnPosition=this.session.screenToDocumentPosition(screenRow,0),beforeCursor=this.session.getDisplayLine(row,null,firstColumnPosition.row,firstColumnPosition.column),leadingSpace=beforeCursor.match(/^\\s*/);leadingSpace[0].length==column||this.session.$useEmacsStyleLineStart||(firstColumnPosition.column+=leadingSpace[0].length),this.moveCursorToPosition(firstColumnPosition)},this.moveCursorLineEnd=function(){var lead=this.lead,lineEnd=this.session.getDocumentLastRowColumnPosition(lead.row,lead.column);if(this.lead.column==lineEnd.column){var line=this.session.getLine(lineEnd.row);if(lineEnd.column==line.length){var textEnd=line.search(/\\s+$/);textEnd>0&&(lineEnd.column=textEnd)}}this.moveCursorTo(lineEnd.row,lineEnd.column)},this.moveCursorFileEnd=function(){var row=this.doc.getLength()-1,column=this.doc.getLine(row).length;this.moveCursorTo(row,column)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var match,row=this.lead.row,column=this.lead.column,line=this.doc.getLine(row),rightOfCursor=line.substring(column);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var fold=this.session.getFoldAt(row,column,1);return fold?(this.moveCursorTo(fold.end.row,fold.end.column),void 0):((match=this.session.nonTokenRe.exec(rightOfCursor))&&(column+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,rightOfCursor=line.substring(column)),column>=line.length?(this.moveCursorTo(row,line.length),this.moveCursorRight(),this.doc.getLength()-1>row&&this.moveCursorWordRight(),void 0):((match=this.session.tokenRe.exec(rightOfCursor))&&(column+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(row,column),void 0))},this.moveCursorLongWordLeft=function(){var fold,row=this.lead.row,column=this.lead.column;if(fold=this.session.getFoldAt(row,column,-1))return this.moveCursorTo(fold.start.row,fold.start.column),void 0;var str=this.session.getFoldStringAt(row,column,-1);null==str&&(str=this.doc.getLine(row).substring(0,column));var match,leftOfCursor=lang.stringReverse(str);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(match=this.session.nonTokenRe.exec(leftOfCursor))&&(column-=this.session.nonTokenRe.lastIndex,leftOfCursor=leftOfCursor.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),0>=column?(this.moveCursorTo(row,0),this.moveCursorLeft(),row>0&&this.moveCursorWordLeft(),void 0):((match=this.session.tokenRe.exec(leftOfCursor))&&(column-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(row,column),void 0)},this.$shortWordEndIndex=function(rightOfCursor){var match,ch,index=0,whitespaceRe=/\\s/,tokenRe=this.session.tokenRe;if(tokenRe.lastIndex=0,match=this.session.tokenRe.exec(rightOfCursor))index=this.session.tokenRe.lastIndex;else{for(;(ch=rightOfCursor[index])&&whitespaceRe.test(ch);)index++;if(1>=index)for(tokenRe.lastIndex=0;(ch=rightOfCursor[index])&&!tokenRe.test(ch);)if(tokenRe.lastIndex=0,index++,whitespaceRe.test(ch)){if(index>2){index--;break}for(;(ch=rightOfCursor[index])&&whitespaceRe.test(ch);)index++;if(index>2)break}}return tokenRe.lastIndex=0,index},this.moveCursorShortWordRight=function(){var row=this.lead.row,column=this.lead.column,line=this.doc.getLine(row),rightOfCursor=line.substring(column),fold=this.session.getFoldAt(row,column,1);if(fold)return this.moveCursorTo(fold.end.row,fold.end.column);if(column==line.length){var l=this.doc.getLength();do row++,rightOfCursor=this.doc.getLine(row);while(l>row&&/^\\s*$/.test(rightOfCursor));/^\\s+/.test(rightOfCursor)||(rightOfCursor=\"\"),column=0}var index=this.$shortWordEndIndex(rightOfCursor);this.moveCursorTo(row,column+index)},this.moveCursorShortWordLeft=function(){var fold,row=this.lead.row,column=this.lead.column;if(fold=this.session.getFoldAt(row,column,-1))return this.moveCursorTo(fold.start.row,fold.start.column);var line=this.session.getLine(row).substring(0,column);if(0==column){do row--,line=this.doc.getLine(row);while(row>0&&/^\\s*$/.test(line));column=line.length,/\\s+$/.test(line)||(line=\"\")}var leftOfCursor=lang.stringReverse(line),index=this.$shortWordEndIndex(leftOfCursor);return this.moveCursorTo(row,column-index)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(rows,chars){var screenPos=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===chars&&(this.$desiredColumn?screenPos.column=this.$desiredColumn:this.$desiredColumn=screenPos.column);var docPos=this.session.screenToDocumentPosition(screenPos.row+rows,screenPos.column);this.moveCursorTo(docPos.row,docPos.column+chars,0===chars)},this.moveCursorToPosition=function(position){this.moveCursorTo(position.row,position.column)},this.moveCursorTo=function(row,column,keepDesiredColumn){var fold=this.session.getFoldAt(row,column,1);fold&&(row=fold.start.row,column=fold.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(row,column),this.$keepDesiredColumnOnChange=!1,keepDesiredColumn||(this.$desiredColumn=null)},this.moveCursorToScreen=function(row,column,keepDesiredColumn){var pos=this.session.screenToDocumentPosition(row,column);this.moveCursorTo(pos.row,pos.column,keepDesiredColumn)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(range){this.setSelectionRange(range,range.cursor==range.start),this.$desiredColumn=range.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(range){var r=this.getRange();return range?(range.start.column=r.start.column,range.start.row=r.start.row,range.end.column=r.end.column,range.end.row=r.end.row):range=r,range.cursor=this.isBackwards()?range.start:range.end,range.desiredColumn=this.$desiredColumn,range}}).call(Selection.prototype),exports.Selection=Selection}),ace.define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\"object\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){\"object\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour\",\"ace/unicode\",\"ace/lib/lang\"],function(acequire,exports){var Tokenizer=acequire(\"../tokenizer\").Tokenizer,TextHighlightRules=acequire(\"./text_highlight_rules\").TextHighlightRules,Behaviour=acequire(\"./behaviour\").Behaviour,unicode=acequire(\"../unicode\"),lang=acequire(\"../lib/lang\"),Mode=function(){this.$tokenizer=new Tokenizer((new TextHighlightRules).getRules()),this.$behaviour=new Behaviour};(function(){this.tokenRe=RegExp(\"^[\"+unicode.packages.L+unicode.packages.Mn+unicode.packages.Mc+unicode.packages.Nd+unicode.packages.Pc+\"\\\\$_]+\",\"g\"),this.nonTokenRe=RegExp(\"^(?:[^\"+unicode.packages.L+unicode.packages.Mn+unicode.packages.Mc+unicode.packages.Nd+unicode.packages.Pc+\"\\\\$_]|s])+\",\"g\"),this.getTokenizer=function(){return this.$tokenizer},this.toggleCommentLines=function(state,session,startRow,endRow){var regexpStart,lineCommentStart,doc=session.doc;if(!this.lineCommentStart)return!1;Array.isArray(this.lineCommentStart)?(regexpStart=this.lineCommentStart.map(lang.escapeRegExp).join(\"|\"),lineCommentStart=this.lineCommentStart[0]):(regexpStart=lang.escapeRegExp(this.lineCommentStart),lineCommentStart=this.lineCommentStart),regexpStart=RegExp(\"^\\\\s*(?:\"+regexpStart+\") ?\");for(var removeComment=!0,minSpace=1/0,indentations=[],i=startRow;endRow>=i;i++){var line=doc.getLine(i),indent=line.search(/\\S|$/);indentations[i]=indent,minSpace>indent&&(minSpace=indent),removeComment&&!regexpStart.test(line)&&(removeComment=!1)}if(removeComment)for(var i=startRow;endRow>=i;i++){var line=doc.getLine(i),m=line.match(regexpStart);doc.removeInLine(i,indentations[i],m[0].length)}else{lineCommentStart+=\" \";for(var i=startRow;endRow>=i;i++)doc.insertInLine({row:i,column:minSpace},lineCommentStart)}},this.getNextLineIndent=function(state,line){return this.$getIndent(line)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(line){return line.match(/^\\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(mapping){if(this.$embeds){this.$modes={};for(var i=0;this.$embeds.length>i;i++)mapping[this.$embeds[i]]&&(this.$modes[this.$embeds[i]]=new mapping[this.$embeds[i]]);for(var delegations=[\"toggleCommentLines\",\"getNextLineIndent\",\"checkOutdent\",\"autoOutdent\",\"transformAction\"],i=0;delegations.length>i;i++)(function(scope){var functionName=delegations[i],defaultHandler=scope[functionName];scope[delegations[i]]=function(){return this.$delegator(functionName,arguments,defaultHandler)}})(this)}},this.$delegator=function(method,args,defaultHandler){for(var state=args[0],i=0;this.$embeds.length>i;i++)if(this.$modes[this.$embeds[i]]){var split=state.split(this.$embeds[i]);if(!split[0]&&split[1]){args[0]=split[1];var mode=this.$modes[this.$embeds[i]];return mode[method].apply(mode,args)}}var ret=defaultHandler.apply(this,args);return defaultHandler?ret:void 0},this.transformAction=function(state,action){if(this.$behaviour){var behaviours=this.$behaviour.getBehaviours();for(var key in behaviours)if(behaviours[key][action]){var ret=behaviours[key][action].apply(this,arguments);if(ret)return ret}}}}).call(Mode.prototype),exports.Mode=Mode}),ace.define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var MAX_TOKEN_COUNT=1e3,Tokenizer=function(rules){this.states=rules,this.regExps={},this.matchMappings={};for(var key in this.states){for(var state=this.states[key],ruleRegExps=[],matchTotal=0,mapping=this.matchMappings[key]={defaultToken:\"text\"},flag=\"g\",i=0;state.length>i;i++){var rule=state[i];if(rule.defaultToken&&(mapping.defaultToken=rule.defaultToken),rule.caseInsensitive&&(flag=\"gi\"),null!=rule.regex){rule.regex instanceof RegExp&&(rule.regex=(\"\"+rule.regex).slice(1,-1));var adjustedregex=rule.regex,matchcount=RegExp(\"(?:(\"+adjustedregex+\")|(.))\").exec(\"a\").length-2;if(Array.isArray(rule.token))if(1==rule.token.length||1==matchcount)rule.token=rule.token[0];else{if(matchcount-1!=rule.token.length)throw Error(\"number of classes and regexp groups in '\"+rule.token+\"'\\n'\"+rule.regex+\"' doesn't match\\n\"+(matchcount-1)+\"!=\"+rule.token.length);rule.tokenArray=rule.token,rule.onMatch=this.$arrayTokens}else\"function\"!=typeof rule.token||rule.onMatch||(rule.onMatch=matchcount>1?this.$applyToken:rule.token);matchcount>1&&(/\\\\\\d/.test(rule.regex)?adjustedregex=rule.regex.replace(/\\\\([0-9]+)/g,function(match,digit){return\"\\\\\"+(parseInt(digit,10)+matchTotal+1)}):(matchcount=1,adjustedregex=this.removeCapturingGroups(rule.regex)),rule.splitRegex||\"string\"==typeof rule.token||(rule.splitRegex=this.createSplitterRegexp(rule.regex,flag))),mapping[matchTotal]=i,matchTotal+=matchcount,ruleRegExps.push(adjustedregex),rule.onMatch||(rule.onMatch=null),rule.__proto__=null\n}}this.regExps[key]=RegExp(\"(\"+ruleRegExps.join(\")|(\")+\")|($)\",flag)}};(function(){this.$applyToken=function(str){var values=this.splitRegex.exec(str).slice(1),types=this.token.apply(this,values);if(\"string\"==typeof types)return[{type:types,value:str}];for(var tokens=[],i=0,l=types.length;l>i;i++)values[i]&&(tokens[tokens.length]={type:types[i],value:values[i]});return tokens},this.$arrayTokens=function(str){if(!str)return[];for(var values=this.splitRegex.exec(str),tokens=[],types=this.tokenArray,i=0,l=types.length;l>i;i++)values[i+1]&&(tokens[tokens.length]={type:types[i],value:values[i+1]});return tokens},this.removeCapturingGroups=function(src){var r=src.replace(/\\[(?:\\\\.|[^\\]])*?\\]|\\\\.|\\(\\?[:=!]|(\\()/g,function(x,y){return y?\"(?:\":x});return r},this.createSplitterRegexp=function(src,flag){if(-1!=src.indexOf(\"(?=\")){var stack=0,inChClass=!1,lastCapture={};src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g,function(m,esc,parenOpen,parenClose,square,index){return inChClass?inChClass=\"]\"!=square:square?inChClass=!0:parenClose?(stack==lastCapture.stack&&(lastCapture.end=index+1,lastCapture.stack=-1),stack--):parenOpen&&(stack++,1!=parenOpen.length&&(lastCapture.stack=stack,lastCapture.start=index)),m}),null!=lastCapture.end&&/^\\)*$/.test(src.substr(lastCapture.end))&&(src=src.substring(0,lastCapture.start)+src.substr(lastCapture.end))}return RegExp(src,(flag||\"\").replace(\"g\",\"\"))},this.getLineTokens=function(line,startState){if(startState&&\"string\"!=typeof startState){var stack=startState.slice(0);startState=stack[0]}else var stack=[];var currentState=startState||\"start\",state=this.states[currentState],mapping=this.matchMappings[currentState],re=this.regExps[currentState];re.lastIndex=0;for(var match,tokens=[],lastIndex=0,token={type:null,value:\"\"};match=re.exec(line);){var type=mapping.defaultToken,rule=null,value=match[0],index=re.lastIndex;if(index-value.length>lastIndex){var skipped=line.substring(lastIndex,index-value.length);token.type==type?token.value+=skipped:(token.type&&tokens.push(token),token={type:type,value:skipped})}for(var i=0;match.length-2>i;i++)if(void 0!==match[i+1]){rule=state[mapping[i]],type=rule.onMatch?rule.onMatch(value,currentState,stack):rule.token,rule.next&&(currentState=\"string\"==typeof rule.next?rule.next:rule.next(currentState,stack),state=this.states[currentState],state||(window.console&&console.error&&console.error(currentState,\"doesn't exist\"),currentState=\"start\",state=this.states[currentState]),mapping=this.matchMappings[currentState],lastIndex=index,re=this.regExps[currentState],re.lastIndex=index);break}if(value)if(\"string\"==typeof type)rule&&rule.merge===!1||token.type!==type?(token.type&&tokens.push(token),token={type:type,value:value}):token.value+=value;else if(type){token.type&&tokens.push(token),token={type:null,value:\"\"};for(var i=0;type.length>i;i++)tokens.push(type[i])}if(lastIndex==line.length)break;if(lastIndex=index,tokens.length>MAX_TOKEN_COUNT){token.value+=line.substr(lastIndex),currentState=\"start\";break}}return token.type&&tokens.push(token),{tokens:tokens,state:stack.length?stack:currentState}}}).call(Tokenizer.prototype),exports.Tokenizer=Tokenizer}),ace.define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\"],function(acequire,exports){var lang=acequire(\"../lib/lang\"),TextHighlightRules=function(){this.$rules={start:[{token:\"empty_line\",regex:\"^$\"},{defaultToken:\"text\"}]}};(function(){this.addRules=function(rules,prefix){for(var key in rules){for(var state=rules[key],i=0;state.length>i;i++){var rule=state[i];rule.next&&(rule.next=prefix+rule.next)}this.$rules[prefix+key]=state}},this.getRules=function(){return this.$rules},this.embedRules=function(HighlightRules,prefix,escapeRules,states,append){var embedRules=(new HighlightRules).getRules();if(states)for(var i=0;states.length>i;i++)states[i]=prefix+states[i];else{states=[];for(var key in embedRules)states.push(prefix+key)}if(this.addRules(embedRules,prefix),escapeRules)for(var addRules=Array.prototype[append?\"push\":\"unshift\"],i=0;states.length>i;i++)addRules.apply(this.$rules[states[i]],lang.deepCopy(escapeRules));this.$embeds||(this.$embeds=[]),this.$embeds.push(prefix)},this.getEmbeds=function(){return this.$embeds};var pushState=function(currentState,stack){return\"start\"!=currentState&&stack.unshift(this.nextState,currentState),this.nextState},popState=function(currentState,stack){return stack[0]!==currentState?\"start\":(stack.shift(),stack.shift())};this.normalizeRules=function(){function processState(key){var state=rules[key];state.processed=!0;for(var i=0;state.length>i;i++){var rule=state[i];!rule.regex&&rule.start&&(rule.regex=rule.start,rule.next||(rule.next=[]),rule.next.push({defaultToken:rule.token},{token:rule.token+\".end\",regex:rule.end||rule.start,next:\"pop\"}),rule.token=rule.token+\".start\",rule.push=!0);var next=rule.next||rule.push;if(next&&Array.isArray(next)){var stateName=rule.stateName||rule.token+id++;rules[stateName]=next,rule.next=stateName,processState(stateName)}else\"pop\"==next&&(rule.next=popState);if(rule.push&&(rule.nextState=rule.next||rule.push,rule.next=pushState,delete rule.push),rule.rules)for(var r in rule.rules)rules[r]?rules[r].push&&rules[r].push.apply(rules[r],rule.rules[r]):rules[r]=rule.rules[r];if(rule.include||\"string\"==typeof rule)var includeName=rule.include||rule,toInsert=rules[includeName];else Array.isArray(rule)&&(toInsert=rule);if(toInsert){var args=[i,1].concat(toInsert);rule.noEscape&&(args=args.filter(function(x){return!x.next})),state.splice.apply(state,args),i--,toInsert=null}}}var id=0,rules=this.$rules;Object.keys(rules).forEach(processState)},this.createKeywordMapper=function(map,defaultToken,ignoreCase,splitChar){var keywords=Object.create(null);return Object.keys(map).forEach(function(className){var a=map[className];ignoreCase&&(a=a.toLowerCase());for(var list=a.split(splitChar||\"|\"),i=list.length;i--;)keywords[list[i]]=className}),map=null,ignoreCase?function(value){return keywords[value.toLowerCase()]||defaultToken}:function(value){return keywords[value]||defaultToken}},this.getKeywords=function(){return this.$keywords}}).call(TextHighlightRules.prototype),exports.TextHighlightRules=TextHighlightRules}),ace.define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var Behaviour=function(){this.$behaviours={}};(function(){this.add=function(name,action,callback){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[name]:this.$behaviours[name]={}}this.$behaviours[name][action]=callback},this.addBehaviours=function(behaviours){for(var key in behaviours)for(var action in behaviours[key])this.add(key,action,behaviours[key][action])},this.remove=function(name){this.$behaviours&&this.$behaviours[name]&&delete this.$behaviours[name]},this.inherit=function(mode,filter){if(\"function\"==typeof mode)var behaviours=(new mode).getBehaviours(filter);else var behaviours=mode.getBehaviours(filter);this.addBehaviours(behaviours)},this.getBehaviours=function(filter){if(filter){for(var ret={},i=0;filter.length>i;i++)this.$behaviours[filter[i]]&&(ret[filter[i]]=this.$behaviours[filter[i]]);return ret}return this.$behaviours}}).call(Behaviour.prototype),exports.Behaviour=Behaviour}),ace.define(\"ace/unicode\",[\"require\",\"exports\",\"module\"],function(acequire,exports){function addUnicodePackage(pack){var codePoint=/\\w{4}/g;for(var name in pack)exports.packages[name]=pack[name].replace(codePoint,\"\\\\u$&\")}exports.packages={},addUnicodePackage({L:\"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC\",Ll:\"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A\",Lu:\"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A\",Lt:\"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC\",Lm:\"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F\",Lo:\"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC\",M:\"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26\",Mn:\"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26\",Mc:\"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC\",Me:\"0488048906DE20DD-20E020E2-20E4A670-A672\",N:\"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19\",Nd:\"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19\",Nl:\"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF\",No:\"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835\",P:\"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65\",Pd:\"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D\",Ps:\"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62\",Pe:\"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63\",Pi:\"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20\",Pf:\"00BB2019201D203A2E032E052E0A2E0D2E1D2E21\",Pc:\"005F203F20402054FE33FE34FE4D-FE4FFF3F\",Po:\"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65\",S:\"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD\",Sm:\"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC\",Sc:\"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6\",Sk:\"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3\",So:\"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD\",Z:\"002000A01680180E2000-200A20282029202F205F3000\",Zs:\"002000A01680180E2000-200A202F205F3000\",Zl:\"2028\",Zp:\"2029\",C:\"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF\",Cc:\"0000-001F007F-009F\",Cf:\"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB\",Co:\"E000-F8FF\",Cs:\"D800-DFFF\",Cn:\"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF\"})\n}),ace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Anchor=acequire(\"./anchor\").Anchor,Document=function(text){this.$lines=[],0==text.length?this.$lines=[\"\"]:Array.isArray(text)?this.insertLines(0,text):this.insert({row:0,column:0},text)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength();this.remove(new Range(0,0,len,this.getLine(len-1).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==\"aaa\".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:\"\\n\"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine}},this.$autoNewLine=\"\\n\",this.$newLineMode=\"auto\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\"\\r\\n\"==text||\"\\r\"==text||\"\\n\"==text},this.getLine=function(row){return this.$lines[row]||\"\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){if(range.start.row==range.end.row)return this.$lines[range.start.row].substring(range.start.column,range.end.column);var lines=this.getLines(range.start.row+1,range.end.row-1);return lines.unshift((this.$lines[range.start.row]||\"\").substring(range.start.column)),lines.push((this.$lines[range.end.row]||\"\").substring(0,range.end.column)),lines.join(this.getNewLineCharacter())},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):0>position.row&&(position.row=0),position},this.insert=function(position,text){if(!text||0===text.length)return position;position=this.$clipPosition(position),1>=this.getLength()&&this.$detectNewLine(text);var lines=this.$split(text),firstLine=lines.splice(0,1)[0],lastLine=0==lines.length?null:lines.splice(lines.length-1,1)[0];return position=this.insertInLine(position,firstLine),null!==lastLine&&(position=this.insertNewLine(position),position=this.insertLines(position.row,lines),position=this.insertInLine(position,lastLine||\"\")),position},this.insertLines=function(row,lines){if(0==lines.length)return{row:row,column:0};if(lines.length>65535){var end=this.insertLines(row,lines.slice(65535));lines=lines.slice(0,65535)}var args=[row,0];args.push.apply(args,lines),this.$lines.splice.apply(this.$lines,args);var range=new Range(row,0,row+lines.length,0),delta={action:\"insertLines\",range:range,lines:lines};return this._emit(\"change\",{data:delta}),end||range.end},this.insertNewLine=function(position){position=this.$clipPosition(position);var line=this.$lines[position.row]||\"\";this.$lines[position.row]=line.substring(0,position.column),this.$lines.splice(position.row+1,0,line.substring(position.column,line.length));var end={row:position.row+1,column:0},delta={action:\"insertText\",range:Range.fromPoints(position,end),text:this.getNewLineCharacter()};return this._emit(\"change\",{data:delta}),end},this.insertInLine=function(position,text){if(0==text.length)return position;var line=this.$lines[position.row]||\"\";this.$lines[position.row]=line.substring(0,position.column)+text+line.substring(position.column);var end={row:position.row,column:position.column+text.length},delta={action:\"insertText\",range:Range.fromPoints(position,end),text:text};return this._emit(\"change\",{data:delta}),end},this.remove=function(range){if(range.start=this.$clipPosition(range.start),range.end=this.$clipPosition(range.end),range.isEmpty())return range.start;var firstRow=range.start.row,lastRow=range.end.row;if(range.isMultiLine()){var firstFullRow=0==range.start.column?firstRow:firstRow+1,lastFullRow=lastRow-1;range.end.column>0&&this.removeInLine(lastRow,0,range.end.column),lastFullRow>=firstFullRow&&this.removeLines(firstFullRow,lastFullRow),firstFullRow!=firstRow&&(this.removeInLine(firstRow,range.start.column,this.getLine(firstRow).length),this.removeNewLine(range.start.row))}else this.removeInLine(firstRow,range.start.column,range.end.column);return range.start},this.removeInLine=function(row,startColumn,endColumn){if(startColumn!=endColumn){var range=new Range(row,startColumn,row,endColumn),line=this.getLine(row),removed=line.substring(startColumn,endColumn),newLine=line.substring(0,startColumn)+line.substring(endColumn,line.length);this.$lines.splice(row,1,newLine);var delta={action:\"removeText\",range:range,text:removed};return this._emit(\"change\",{data:delta}),range.start}},this.removeLines=function(firstRow,lastRow){var range=new Range(firstRow,0,lastRow+1,0),removed=this.$lines.splice(firstRow,lastRow-firstRow+1),delta={action:\"removeLines\",range:range,nl:this.getNewLineCharacter(),lines:removed};return this._emit(\"change\",{data:delta}),removed},this.removeNewLine=function(row){var firstLine=this.getLine(row),secondLine=this.getLine(row+1),range=new Range(row,firstLine.length,row+1,0),line=firstLine+secondLine;this.$lines.splice(row,2,line);var delta={action:\"removeText\",range:range,text:this.getNewLineCharacter()};this._emit(\"change\",{data:delta})},this.replace=function(range,text){if(0==text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;if(this.remove(range),text)var end=this.insert(range.start,text);else end=range.start;return end},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);\"insertLines\"==delta.action?this.insertLines(range.start.row,delta.lines):\"insertText\"==delta.action?this.insert(range.start,delta.text):\"removeLines\"==delta.action?this.removeLines(range.start.row,range.end.row-1):\"removeText\"==delta.action&&this.remove(range)}},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);\"insertLines\"==delta.action?this.removeLines(range.start.row,range.end.row-1):\"insertText\"==delta.action?this.remove(range):\"removeLines\"==delta.action?this.insertLines(range.start.row,delta.lines):\"removeText\"==delta.action&&this.insert(range.start,delta.text)}},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length;return index+newlineLength*i+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.document=doc,column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column),this.$onChange=this.onChange.bind(this),doc.on(\"change\",this.$onChange)};(function(){oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var delta=e.data,range=delta.range;if(!(range.start.row==range.end.row&&range.start.row!=this.row||range.start.row>this.row||range.start.row==this.row&&range.start.column>this.column)){var row=this.row,column=this.column,start=range.start,end=range.end;\"insertText\"===delta.action?start.row===row&&column>=start.column?start.row===end.row?column+=end.column-start.column:(column-=start.column,row+=end.row-start.row):start.row!==end.row&&row>start.row&&(row+=end.row-start.row):\"insertLines\"===delta.action?row>=start.row&&(row+=end.row-start.row):\"removeText\"===delta.action?start.row===row&&column>start.column?column=end.column>=column?start.column:Math.max(0,column-(end.column-start.column)):start.row!==end.row&&row>start.row?(end.row===row&&(column=Math.max(0,column-end.column)+start.column),row-=end.row-start.row):end.row===row&&(row-=end.row-start.row,column=Math.max(0,column-end.column)+start.column):\"removeLines\"==delta.action&&row>=start.row&&(row>=end.row?row-=end.row-start.row:(row=start.row,column=0)),this.setPosition(row,column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._emit(\"change\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,BackgroundTokenizer=function(tokenizer){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=tokenizer;var self=this;this.$worker=function(){if(self.running){for(var workerStart=new Date,startLine=self.currentLine,doc=self.doc,processedLines=0,len=doc.getLength();len>self.currentLine;){for(self.$tokenizeRow(self.currentLine);self.lines[self.currentLine];)self.currentLine++;if(processedLines++,0==processedLines%5&&new Date-workerStart>20)return self.fireUpdateEvent(startLine,self.currentLine-1),self.running=setTimeout(self.$worker,20),void 0}self.running=!1,self.fireUpdateEvent(startLine,len-1)}}};(function(){oop.implement(this,EventEmitter),this.setTokenizer=function(tokenizer){this.tokenizer=tokenizer,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(doc){this.doc=doc,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(firstRow,lastRow){var data={first:firstRow,last:lastRow};this._emit(\"update\",{data:data})},this.start=function(startRow){this.currentLine=Math.min(startRow||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.$updateOnChange=function(delta){var range=delta.range,startRow=range.start.row,len=range.end.row-startRow;if(0===len)this.lines[startRow]=null;else if(\"removeText\"==delta.action||\"removeLines\"==delta.action)this.lines.splice(startRow,len+1,null),this.states.splice(startRow,len+1,null);else{var args=Array(len+1);args.unshift(startRow,1),this.lines.splice.apply(this.lines,args),this.states.splice.apply(this.states,args)}this.currentLine=Math.min(startRow,this.currentLine,this.doc.getLength()),this.stop(),this.running=setTimeout(this.$worker,700)},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(row){return this.lines[row]||this.$tokenizeRow(row)},this.getState=function(row){return this.currentLine==row&&this.$tokenizeRow(row),this.states[row]||\"start\"},this.$tokenizeRow=function(row){var line=this.doc.getLine(row),state=this.states[row-1],data=this.tokenizer.getLineTokens(line,state,row);return this.states[row]+\"\"!=data.state+\"\"?(this.states[row]=data.state,this.lines[row+1]=null,this.currentLine>row+1&&(this.currentLine=row+1)):this.currentLine==row&&(this.currentLine=row+1),this.lines[row]=data.tokens}}).call(BackgroundTokenizer.prototype),exports.BackgroundTokenizer=BackgroundTokenizer}),ace.define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"],function(acequire,exports){var lang=acequire(\"./lib/lang\");acequire(\"./lib/oop\");var Range=acequire(\"./range\").Range,SearchHighlight=function(regExp,clazz,type){this.setRegexp(regExp),this.clazz=clazz,this.type=type||\"text\"};(function(){this.MAX_RANGES=500,this.setRegexp=function(regExp){this.regExp+\"\"!=regExp+\"\"&&(this.regExp=regExp,this.cache=[])},this.update=function(html,markerLayer,session,config){if(this.regExp)for(var start=config.firstRow,end=config.lastRow,i=start;end>=i;i++){var ranges=this.cache[i];null==ranges&&(ranges=lang.getMatchOffsets(session.getLine(i),this.regExp),ranges.length>this.MAX_RANGES&&(ranges=ranges.slice(0,this.MAX_RANGES)),ranges=ranges.map(function(match){return new Range(i,match.offset,i,match.offset+match.length)}),this.cache[i]=ranges.length?ranges:\"\");for(var j=ranges.length;j--;)markerLayer.drawSingleLineMarker(html,ranges[j].toScreenRange(session),this.clazz,config,null,this.type)}}}).call(SearchHighlight.prototype),exports.SearchHighlight=SearchHighlight}),ace.define(\"ace/edit_session/folding\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/edit_session/fold_line\",\"ace/edit_session/fold\",\"ace/token_iterator\"],function(acequire,exports){function Folding(){this.getFoldAt=function(row,column,side){var foldLine=this.getFoldLine(row);if(!foldLine)return null;for(var folds=foldLine.folds,i=0;folds.length>i;i++){var fold=folds[i];if(fold.range.contains(row,column)){if(1==side&&fold.range.isEnd(row,column))continue;if(-1==side&&fold.range.isStart(row,column))continue;return fold}}},this.getFoldsInRange=function(range){var start=range.start,end=range.end,foldLines=this.$foldData,foundFolds=[];start.column+=1,end.column-=1;for(var i=0;foldLines.length>i;i++){var cmp=foldLines[i].range.compareRange(range);if(2!=cmp){if(-2==cmp)break;for(var folds=foldLines[i].folds,j=0;folds.length>j;j++){var fold=folds[j];if(cmp=fold.range.compareRange(range),-2==cmp)break;if(2!=cmp){if(42==cmp)break;foundFolds.push(fold)}}}}return start.column-=1,end.column+=1,foundFolds},this.getAllFolds=function(){function addFold(fold){folds.push(fold)}for(var folds=[],foldLines=this.$foldData,i=0;foldLines.length>i;i++)for(var j=0;foldLines[i].folds.length>j;j++)addFold(foldLines[i].folds[j]);return folds},this.getFoldStringAt=function(row,column,trim,foldLine){if(foldLine=foldLine||this.getFoldLine(row),!foldLine)return null;for(var str,fold,lastFold={end:{column:0}},i=0;foldLine.folds.length>i;i++){fold=foldLine.folds[i];var cmp=fold.range.compareEnd(row,column);if(-1==cmp){str=this.getLine(fold.start.row).substring(lastFold.end.column,fold.start.column);break}if(0===cmp)return null;lastFold=fold}return str||(str=this.getLine(fold.start.row).substring(lastFold.end.column)),-1==trim?str.substring(0,column-lastFold.end.column):1==trim?str.substring(column-lastFold.end.column):str},this.getFoldLine=function(docRow,startFoldLine){var foldData=this.$foldData,i=0;for(startFoldLine&&(i=foldData.indexOf(startFoldLine)),-1==i&&(i=0),i;foldData.length>i;i++){var foldLine=foldData[i];if(docRow>=foldLine.start.row&&foldLine.end.row>=docRow)return foldLine;if(foldLine.end.row>docRow)return null}return null},this.getNextFoldLine=function(docRow,startFoldLine){var foldData=this.$foldData,i=0;for(startFoldLine&&(i=foldData.indexOf(startFoldLine)),-1==i&&(i=0),i;foldData.length>i;i++){var foldLine=foldData[i];if(foldLine.end.row>=docRow)return foldLine}return null},this.getFoldedRowCount=function(first,last){for(var foldData=this.$foldData,rowCount=last-first+1,i=0;foldData.length>i;i++){var foldLine=foldData[i],end=foldLine.end.row,start=foldLine.start.row;if(end>=last){last>start&&(start>=first?rowCount-=last-start:rowCount=0);break}end>=first&&(rowCount-=start>=first?end-start:end-first+1)}return rowCount},this.$addFoldLine=function(foldLine){return this.$foldData.push(foldLine),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),foldLine},this.addFold=function(placeholder,range){var fold,foldData=this.$foldData,added=!1;placeholder instanceof Fold?fold=placeholder:(fold=new Fold(range,placeholder),fold.collapseChildren=range.collapseChildren),this.$clipRangeToDocument(fold.range);var startRow=fold.start.row,startColumn=fold.start.column,endRow=fold.end.row,endColumn=fold.end.column;if(startRow==endRow&&2>endColumn-startColumn)throw\"The range has to be at least 2 characters width\";var startFold=this.getFoldAt(startRow,startColumn,1),endFold=this.getFoldAt(endRow,endColumn,-1);if(startFold&&endFold==startFold)return startFold.addSubFold(fold);if(startFold&&!startFold.range.isStart(startRow,startColumn)||endFold&&!endFold.range.isEnd(endRow,endColumn))throw\"A fold can't intersect already existing fold\"+fold.range+startFold.range;var folds=this.getFoldsInRange(fold.range);folds.length>0&&(this.removeFolds(folds),folds.forEach(function(subFold){fold.addSubFold(subFold)}));for(var i=0;foldData.length>i;i++){var foldLine=foldData[i];if(endRow==foldLine.start.row){foldLine.addFold(fold),added=!0;break}if(startRow==foldLine.end.row){if(foldLine.addFold(fold),added=!0,!fold.sameRow){var foldLineNext=foldData[i+1];if(foldLineNext&&foldLineNext.start.row==endRow){foldLine.merge(foldLineNext);break}}break}if(foldLine.start.row>=endRow)break}return added||(foldLine=this.$addFoldLine(new FoldLine(this.$foldData,fold))),this.$useWrapMode?this.$updateWrapData(foldLine.start.row,foldLine.start.row):this.$updateRowLengthCache(foldLine.start.row,foldLine.start.row),this.$modified=!0,this._emit(\"changeFold\",{data:fold}),fold},this.addFolds=function(folds){folds.forEach(function(fold){this.addFold(fold)},this)},this.removeFold=function(fold){var foldLine=fold.foldLine,startRow=foldLine.start.row,endRow=foldLine.end.row,foldLines=this.$foldData,folds=foldLine.folds;if(1==folds.length)foldLines.splice(foldLines.indexOf(foldLine),1);else if(foldLine.range.isEnd(fold.end.row,fold.end.column))folds.pop(),foldLine.end.row=folds[folds.length-1].end.row,foldLine.end.column=folds[folds.length-1].end.column;else if(foldLine.range.isStart(fold.start.row,fold.start.column))folds.shift(),foldLine.start.row=folds[0].start.row,foldLine.start.column=folds[0].start.column;else if(fold.sameRow)folds.splice(folds.indexOf(fold),1);else{var newFoldLine=foldLine.split(fold.start.row,fold.start.column);folds=newFoldLine.folds,folds.shift(),newFoldLine.start.row=folds[0].start.row,newFoldLine.start.column=folds[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(startRow,endRow):this.$updateRowLengthCache(startRow,endRow)),this.$modified=!0,this._emit(\"changeFold\",{data:fold})},this.removeFolds=function(folds){for(var cloneFolds=[],i=0;folds.length>i;i++)cloneFolds.push(folds[i]);cloneFolds.forEach(function(fold){this.removeFold(fold)},this),this.$modified=!0},this.expandFold=function(fold){this.removeFold(fold),fold.subFolds.forEach(function(subFold){fold.restoreRange(subFold),this.addFold(subFold)},this),fold.collapseChildren>0&&this.foldAll(fold.start.row+1,fold.end.row,fold.collapseChildren-1),fold.subFolds=[]},this.expandFolds=function(folds){folds.forEach(function(fold){this.expandFold(fold)},this)},this.unfold=function(location,expandInner){var range,folds;if(null==location?(range=new Range(0,0,this.getLength(),0),expandInner=!0):range=\"number\"==typeof location?new Range(location,0,location,this.getLine(location).length):\"row\"in location?Range.fromPoints(location,location):location,folds=this.getFoldsInRange(range),expandInner)this.removeFolds(folds);else for(;folds.length;)this.expandFolds(folds),folds=this.getFoldsInRange(range)},this.isRowFolded=function(docRow,startFoldRow){return!!this.getFoldLine(docRow,startFoldRow)},this.getRowFoldEnd=function(docRow,startFoldRow){var foldLine=this.getFoldLine(docRow,startFoldRow);return foldLine?foldLine.end.row:docRow},this.getRowFoldStart=function(docRow,startFoldRow){var foldLine=this.getFoldLine(docRow,startFoldRow);return foldLine?foldLine.start.row:docRow},this.getFoldDisplayLine=function(foldLine,endRow,endColumn,startRow,startColumn){null==startRow&&(startRow=foldLine.start.row,startColumn=0),null==endRow&&(endRow=foldLine.end.row,endColumn=this.getLine(endRow).length);var doc=this.doc,textLine=\"\";return foldLine.walk(function(placeholder,row,column,lastColumn){if(!(startRow>row)){if(row==startRow){if(startColumn>column)return;lastColumn=Math.max(startColumn,lastColumn)}textLine+=null!=placeholder?placeholder:doc.getLine(row).substring(lastColumn,column)}},endRow,endColumn),textLine},this.getDisplayLine=function(row,endColumn,startRow,startColumn){var foldLine=this.getFoldLine(row);if(foldLine)return this.getFoldDisplayLine(foldLine,row,endColumn,startRow,startColumn);var line;return line=this.doc.getLine(row),line.substring(startColumn||0,endColumn||line.length)},this.$cloneFoldData=function(){var fd=[];return fd=this.$foldData.map(function(foldLine){var folds=foldLine.folds.map(function(fold){return fold.clone()});return new FoldLine(fd,folds)})},this.toggleFold=function(tryToUnfold){var fold,bracketPos,selection=this.selection,range=selection.getRange();if(range.isEmpty()){var cursor=range.start;if(fold=this.getFoldAt(cursor.row,cursor.column))return this.expandFold(fold),void 0;(bracketPos=this.findMatchingBracket(cursor))?1==range.comparePoint(bracketPos)?range.end=bracketPos:(range.start=bracketPos,range.start.column++,range.end.column--):(bracketPos=this.findMatchingBracket({row:cursor.row,column:cursor.column+1}))?(1==range.comparePoint(bracketPos)?range.end=bracketPos:range.start=bracketPos,range.start.column++):range=this.getCommentFoldRange(cursor.row,cursor.column)||range}else{var folds=this.getFoldsInRange(range);if(tryToUnfold&&folds.length)return this.expandFolds(folds),void 0;1==folds.length&&(fold=folds[0])}if(fold||(fold=this.getFoldAt(range.start.row,range.start.column)),fold&&\"\"+fold.range==\"\"+range)return this.expandFold(fold),void 0;var placeholder=\"...\";if(!range.isMultiLine()){if(placeholder=this.getTextRange(range),4>placeholder.length)return;placeholder=placeholder.trim().substring(0,2)+\"..\"}this.addFold(placeholder,range)},this.getCommentFoldRange=function(row,column,dir){var iterator=new TokenIterator(this,row,column),token=iterator.getCurrentToken();if(token&&/^comment|string/.test(token.type)){var range=new Range,re=RegExp(token.type.replace(/\\..*/,\"\\\\.\"));if(1!=dir){do token=iterator.stepBackward();while(token&&re.test(token.type));iterator.stepForward()}if(range.start.row=iterator.getCurrentTokenRow(),range.start.column=iterator.getCurrentTokenColumn()+2,iterator=new TokenIterator(this,row,column),-1!=dir){do token=iterator.stepForward();while(token&&re.test(token.type));token=iterator.stepBackward()}else token=iterator.getCurrentToken();return range.end.row=iterator.getCurrentTokenRow(),range.end.column=iterator.getCurrentTokenColumn()+token.value.length-2,range}},this.foldAll=function(startRow,endRow,depth){void 0==depth&&(depth=1e5);var foldWidgets=this.foldWidgets;endRow=endRow||this.getLength();for(var row=startRow||0;endRow>row;row++)if(null==foldWidgets[row]&&(foldWidgets[row]=this.getFoldWidget(row)),\"start\"==foldWidgets[row]){var range=this.getFoldWidgetRange(row);if(range&&endRow>=range.end.row)try{var fold=this.addFold(\"...\",range);fold.collapseChildren=depth}catch(e){}row=range.end.row}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle=\"markbegin\",this.setFoldStyle=function(style){if(!this.$foldStyles[style])throw Error(\"invalid fold style: \"+style+\"[\"+Object.keys(this.$foldStyles).join(\", \")+\"]\");if(this.$foldStyle!=style){this.$foldStyle=style,\"manual\"==style&&this.unfold();var mode=this.$foldMode;this.$setFolding(null),this.$setFolding(mode)}},this.$setFolding=function(foldMode){if(this.$foldMode!=foldMode){if(this.$foldMode=foldMode,this.removeListener(\"change\",this.$updateFoldWidgets),this._emit(\"changeAnnotation\"),!foldMode||\"manual\"==this.$foldStyle)return this.foldWidgets=null,void 0;this.foldWidgets=[],this.getFoldWidget=foldMode.getFoldWidget.bind(foldMode,this,this.$foldStyle),this.getFoldWidgetRange=foldMode.getFoldWidgetRange.bind(foldMode,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on(\"change\",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(row,ignoreCurrent){var fw=this.foldWidgets;if(!fw||ignoreCurrent&&fw[row])return{};for(var firstRange,i=row-1;i>=0;){var c=fw[i];if(null==c&&(c=fw[i]=this.getFoldWidget(i)),\"start\"==c){var range=this.getFoldWidgetRange(i);if(firstRange||(firstRange=range),range&&range.end.row>=row)break}i--}return{range:-1!==i&&range,firstRange:firstRange}},this.onFoldWidgetClick=function(row,e){var type=this.getFoldWidget(row),line=this.getLine(row);e=e.domEvent;var children=e.shiftKey,all=e.ctrlKey||e.metaKey,siblings=e.altKey,dir=\"end\"===type?-1:1,fold=this.getFoldAt(row,-1===dir?0:line.length,dir);if(fold)return children||all?this.removeFold(fold):this.expandFold(fold),void 0;var range=this.getFoldWidgetRange(row);if(range&&!range.isMultiLine()&&(fold=this.getFoldAt(range.start.row,range.start.column,1),fold&&range.isEqual(fold.range)))return this.removeFold(fold),void 0;if(siblings){var data=this.getParentFoldRangeData(row);if(data.range)var startRow=data.range.start.row+1,endRow=data.range.end.row;this.foldAll(startRow,endRow,all?1e4:0)}else if(children){var endRow=range?range.end.row:this.getLength();this.foldAll(row+1,range.end.row,all?1e4:0)}else range&&(all&&(range.collapseChildren=1e4),this.addFold(\"...\",range));range||((e.target||e.srcElement).className+=\" ace_invalid\")},this.updateFoldWidgets=function(e){var delta=e.data,range=delta.range,firstRow=range.start.row,len=range.end.row-firstRow;if(0===len)this.foldWidgets[firstRow]=null;else if(\"removeText\"==delta.action||\"removeLines\"==delta.action)this.foldWidgets.splice(firstRow,len+1,null);else{var args=Array(len+1);args.unshift(firstRow,1),this.foldWidgets.splice.apply(this.foldWidgets,args)}}}var Range=acequire(\"../range\").Range,FoldLine=acequire(\"./fold_line\").FoldLine,Fold=acequire(\"./fold\").Fold,TokenIterator=acequire(\"../token_iterator\").TokenIterator;exports.Folding=Folding}),ace.define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(acequire,exports){function FoldLine(foldData,folds){this.foldData=foldData,Array.isArray(folds)?this.folds=folds:folds=this.folds=[folds];var last=folds[folds.length-1];this.range=new Range(folds[0].start.row,folds[0].start.column,last.end.row,last.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(fold){fold.setFoldLine(this)},this)}var Range=acequire(\"../range\").Range;(function(){this.shiftRow=function(shift){this.start.row+=shift,this.end.row+=shift,this.folds.forEach(function(fold){fold.start.row+=shift,fold.end.row+=shift})},this.addFold=function(fold){if(fold.sameRow){if(fold.start.row\u003Cthis.startRow||fold.endRow>this.endRow)throw\"Can't add a fold to this FoldLine as it has no connection\";this.folds.push(fold),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(fold.start.row,fold.start.column)>0?(this.end.row=fold.end.row,this.end.column=fold.end.column):0>this.range.compareStart(fold.end.row,fold.end.column)&&(this.start.row=fold.start.row,this.start.column=fold.start.column)}else if(fold.start.row==this.end.row)this.folds.push(fold),this.end.row=fold.end.row,this.end.column=fold.end.column;else{if(fold.end.row!=this.start.row)throw\"Trying to add fold to FoldRow that doesn't have a matching row\";this.folds.unshift(fold),this.start.row=fold.start.row,this.start.column=fold.start.column}fold.foldLine=this},this.containsRow=function(row){return row>=this.start.row&&this.end.row>=row},this.walk=function(callback,endRow,endColumn){var fold,comp,stop,lastEnd=0,folds=this.folds,isNewRow=!0;null==endRow&&(endRow=this.end.row,endColumn=this.end.column);for(var i=0;folds.length>i;i++){if(fold=folds[i],comp=fold.range.compareStart(endRow,endColumn),-1==comp)return callback(null,endRow,endColumn,lastEnd,isNewRow),void 0;if(stop=callback(null,fold.start.row,fold.start.column,lastEnd,isNewRow),stop=!stop&&callback(fold.placeholder,fold.start.row,fold.start.column,lastEnd),stop||0==comp)return;isNewRow=!fold.sameRow,lastEnd=fold.end.column}callback(null,endRow,endColumn,lastEnd,isNewRow)},this.getNextFoldTo=function(row,column){for(var fold,cmp,i=0;this.folds.length>i;i++){if(fold=this.folds[i],cmp=fold.range.compareEnd(row,column),-1==cmp)return{fold:fold,kind:\"after\"};if(0==cmp)return{fold:fold,kind:\"inside\"}}return null},this.addRemoveChars=function(row,column,len){var fold,folds,ret=this.getNextFoldTo(row,column);if(ret)if(fold=ret.fold,\"inside\"==ret.kind&&fold.start.column!=column&&fold.start.row!=row)window.console&&window.console.log(row,column,fold);else if(fold.start.row==row){folds=this.folds;var i=folds.indexOf(fold);for(0==i&&(this.start.column+=len),i;folds.length>i;i++){if(fold=folds[i],fold.start.column+=len,!fold.sameRow)return;fold.end.column+=len}this.end.column+=len}},this.split=function(row,column){var fold=this.getNextFoldTo(row,column).fold,folds=this.folds,foldData=this.foldData;if(!fold)return null;var i=folds.indexOf(fold),foldBefore=folds[i-1];this.end.row=foldBefore.end.row,this.end.column=foldBefore.end.column,folds=folds.splice(i,folds.length-i);var newFoldLine=new FoldLine(foldData,folds);return foldData.splice(foldData.indexOf(this)+1,0,newFoldLine),newFoldLine},this.merge=function(foldLineNext){for(var folds=foldLineNext.folds,i=0;folds.length>i;i++)this.addFold(folds[i]);var foldData=this.foldData;foldData.splice(foldData.indexOf(foldLineNext),1)},this.toString=function(){var ret=[\"\"+this.range+\": [\"];return this.folds.forEach(function(fold){ret.push(\" \"+(\"\"+fold))}),ret.push(\"]\"),ret.join(\"\\n\")},this.idxToPosition=function(idx){for(var fold,lastFoldEndColumn=0,i=0;this.folds.length>i;i++){var fold=this.folds[i];if(idx-=fold.start.column-lastFoldEndColumn,0>idx)return{row:fold.start.row,column:fold.start.column+idx};if(idx-=fold.placeholder.length,0>idx)return fold.start;lastFoldEndColumn=fold.end.column}return{row:this.end.row,column:this.end.column+idx}}}).call(FoldLine.prototype),exports.FoldLine=FoldLine}),ace.define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/range_list\",\"ace/lib/oop\"],function(acequire,exports){function consumePoint(point,anchor){point.row-=anchor.row,0==point.row&&(point.column-=anchor.column)}function consumeRange(range,anchor){consumePoint(range.start,anchor),consumePoint(range.end,anchor)}function restorePoint(point,anchor){0==point.row&&(point.column+=anchor.column),point.row+=anchor.row}function restoreRange(range,anchor){restorePoint(range.start,anchor),restorePoint(range.end,anchor)}acequire(\"../range\").Range;var RangeList=acequire(\"../range_list\").RangeList,oop=acequire(\"../lib/oop\"),Fold=exports.Fold=function(range,placeholder){this.foldLine=null,this.placeholder=placeholder,this.range=range,this.start=range.start,this.end=range.end,this.sameRow=range.start.row==range.end.row,this.subFolds=this.ranges=[]};oop.inherits(Fold,RangeList),function(){this.toString=function(){return'\"'+this.placeholder+'\" '+(\"\"+this.range)\n},this.setFoldLine=function(foldLine){this.foldLine=foldLine,this.subFolds.forEach(function(fold){fold.setFoldLine(foldLine)})},this.clone=function(){var range=this.range.clone(),fold=new Fold(range,this.placeholder);return this.subFolds.forEach(function(subFold){fold.subFolds.push(subFold.clone())}),fold.collapseChildren=this.collapseChildren,fold},this.addSubFold=function(fold){if(!this.range.isEqual(fold)){if(!this.range.containsRange(fold))throw\"A fold can't intersect already existing fold\"+fold.range+this.range;consumeRange(fold,this.start);for(var row=fold.start.row,column=fold.start.column,i=0,cmp=-1;this.subFolds.length>i&&(cmp=this.subFolds[i].range.compare(row,column),1==cmp);i++);var afterStart=this.subFolds[i];if(0==cmp)return afterStart.addSubFold(fold);for(var row=fold.range.end.row,column=fold.range.end.column,j=i,cmp=-1;this.subFolds.length>j&&(cmp=this.subFolds[j].range.compare(row,column),1==cmp);j++);if(this.subFolds[j],0==cmp)throw\"A fold can't intersect already existing fold\"+fold.range+this.range;return this.subFolds.splice(i,j-i,fold),fold.setFoldLine(this.foldLine),fold}},this.restoreRange=function(range){return restoreRange(range,this.start)}}.call(Fold.prototype)}),ace.define(\"ace/range_list\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(acequire,exports){var Range=acequire(\"./range\").Range,comparePoints=Range.comparePoints,RangeList=function(){this.ranges=[]};(function(){this.comparePoints=comparePoints,this.pointIndex=function(pos,excludeEdges,startIndex){for(var list=this.ranges,i=startIndex||0;list.length>i;i++){var range=list[i],cmpEnd=comparePoints(pos,range.end);if(!(cmpEnd>0)){var cmpStart=comparePoints(pos,range.start);return 0===cmpEnd?excludeEdges&&0!==cmpStart?-i-2:i:cmpStart>0||0===cmpStart&&!excludeEdges?i:-i-1}}return-i-1},this.add=function(range){var excludeEdges=!range.isEmpty(),startIndex=this.pointIndex(range.start,excludeEdges);0>startIndex&&(startIndex=-startIndex-1);var endIndex=this.pointIndex(range.end,excludeEdges,startIndex);return 0>endIndex?endIndex=-endIndex-1:endIndex++,this.ranges.splice(startIndex,endIndex-startIndex,range)},this.addList=function(list){for(var removed=[],i=list.length;i--;)removed.push.call(removed,this.add(list[i]));return removed},this.substractPoint=function(pos){var i=this.pointIndex(pos);return i>=0?this.ranges.splice(i,1):void 0},this.merge=function(){var removed=[],list=this.ranges;list=list.sort(function(a,b){return comparePoints(a.start,b.start)});for(var range,next=list[0],i=1;list.length>i;i++){range=next,next=list[i];var cmp=comparePoints(range.end,next.start);0>cmp||(0!=cmp||range.isEmpty()||next.isEmpty())&&(0>comparePoints(range.end,next.end)&&(range.end.row=next.end.row,range.end.column=next.end.column),list.splice(i,1),removed.push(next),next=range,i--)}return this.ranges=list,removed},this.contains=function(row,column){return this.pointIndex({row:row,column:column})>=0},this.containsPoint=function(pos){return this.pointIndex(pos)>=0},this.rangeAtPoint=function(pos){var i=this.pointIndex(pos);return i>=0?this.ranges[i]:void 0},this.clipRows=function(startRow,endRow){var list=this.ranges;if(list[0].start.row>endRow||startRow>list[list.length-1].start.row)return[];var startIndex=this.pointIndex({row:startRow,column:0});0>startIndex&&(startIndex=-startIndex-1);var endIndex=this.pointIndex({row:endRow,column:0},startIndex);0>endIndex&&(endIndex=-endIndex-1);for(var clipped=[],i=startIndex;endIndex>i;i++)clipped.push(list[i]);return clipped},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(session){this.session&&this.detach(),this.session=session,this.onChange=this.$onChange.bind(this),this.session.on(\"change\",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener(\"change\",this.onChange),this.session=null)},this.$onChange=function(e){var changeRange=e.data.range;if(\"i\"==e.data.action[0])var start=changeRange.start,end=changeRange.end;else var end=changeRange.start,start=changeRange.end;for(var startRow=start.row,endRow=end.row,lineDif=endRow-startRow,colDiff=-start.column+end.column,ranges=this.ranges,i=0,n=ranges.length;n>i;i++){var r=ranges[i];if(!(startRow>r.end.row)){if(r.start.row>startRow)break;r.start.row==startRow&&r.start.column>=start.column&&(r.start.column+=colDiff,r.start.row+=lineDif),r.end.row==startRow&&r.end.column>=start.column&&(r.end.column==start.column&&colDiff>0&&n-1>i&&r.end.column>r.start.column&&r.end.column==ranges[i+1].start.column&&(r.end.column-=colDiff),r.end.column+=colDiff,r.end.row+=lineDif)}}if(0!=lineDif&&n>i)for(;n>i;i++){var r=ranges[i];r.start.row+=lineDif,r.end.row+=lineDif}}}).call(RangeList.prototype),exports.RangeList=RangeList}),ace.define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var TokenIterator=function(session,initialRow,initialColumn){this.$session=session,this.$row=initialRow,this.$rowTokens=session.getTokens(initialRow);var token=session.getTokenAt(initialRow,initialColumn);this.$tokenIndex=token?token.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;0>this.$tokenIndex;){if(this.$row-=1,0>this.$row)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var rowCount;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,rowCount||(rowCount=this.$session.getLength()),this.$row>=rowCount)return this.$row=rowCount-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var rowTokens=this.$rowTokens,tokenIndex=this.$tokenIndex,column=rowTokens[tokenIndex].start;if(void 0!==column)return column;for(column=0;tokenIndex>0;)tokenIndex-=1,column+=rowTokens[tokenIndex].value.length;return column}}).call(TokenIterator.prototype),exports.TokenIterator=TokenIterator}),ace.define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"],function(acequire,exports){function BracketMatch(){this.findMatchingBracket=function(position,chr){if(0==position.column)return null;var charBeforeCursor=chr||this.getLine(position.row).charAt(position.column-1);if(\"\"==charBeforeCursor)return null;var match=charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);return match?match[1]?this.$findClosingBracket(match[1],position):this.$findOpeningBracket(match[2],position):null},this.getBracketRange=function(pos){var range,line=this.getLine(pos.row),before=!0,chr=line.charAt(pos.column-1),match=chr&&chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);if(match||(chr=line.charAt(pos.column),pos={row:pos.row,column:pos.column+1},match=chr&&chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/),before=!1),!match)return null;if(match[1]){var bracketPos=this.$findClosingBracket(match[1],pos);if(!bracketPos)return null;range=Range.fromPoints(pos,bracketPos),before||(range.end.column++,range.start.column--),range.cursor=range.end}else{var bracketPos=this.$findOpeningBracket(match[2],pos);if(!bracketPos)return null;range=Range.fromPoints(bracketPos,pos),before||(range.start.column++,range.end.column--),range.cursor=range.start}return range},this.$brackets={\")\":\"(\",\"(\":\")\",\"]\":\"[\",\"[\":\"]\",\"{\":\"}\",\"}\":\"{\"},this.$findOpeningBracket=function(bracket,position,typeRe){var openBracket=this.$brackets[bracket],depth=1,iterator=new TokenIterator(this,position.row,position.column),token=iterator.getCurrentToken();if(token||(token=iterator.stepForward()),token){typeRe||(typeRe=RegExp(\"(\\\\.?\"+token.type.replace(\".\",\"\\\\.\").replace(\"rparen\",\".paren\")+\")+\"));for(var valueIndex=position.column-iterator.getCurrentTokenColumn()-2,value=token.value;;){for(;valueIndex>=0;){var chr=value.charAt(valueIndex);if(chr==openBracket){if(depth-=1,0==depth)return{row:iterator.getCurrentTokenRow(),column:valueIndex+iterator.getCurrentTokenColumn()}}else chr==bracket&&(depth+=1);valueIndex-=1}do token=iterator.stepBackward();while(token&&!typeRe.test(token.type));if(null==token)break;value=token.value,valueIndex=value.length-1}return null}},this.$findClosingBracket=function(bracket,position,typeRe){var closingBracket=this.$brackets[bracket],depth=1,iterator=new TokenIterator(this,position.row,position.column),token=iterator.getCurrentToken();if(token||(token=iterator.stepForward()),token){typeRe||(typeRe=RegExp(\"(\\\\.?\"+token.type.replace(\".\",\"\\\\.\").replace(\"lparen\",\".paren\")+\")+\"));for(var valueIndex=position.column-iterator.getCurrentTokenColumn();;){for(var value=token.value,valueLength=value.length;valueLength>valueIndex;){var chr=value.charAt(valueIndex);if(chr==closingBracket){if(depth-=1,0==depth)return{row:iterator.getCurrentTokenRow(),column:valueIndex+iterator.getCurrentTokenColumn()}}else chr==bracket&&(depth+=1);valueIndex+=1}do token=iterator.stepForward();while(token&&!typeRe.test(token.type));if(null==token)break;valueIndex=0}return null}}}var TokenIterator=acequire(\"../token_iterator\").TokenIterator,Range=acequire(\"../range\").Range;exports.BracketMatch=BracketMatch}),ace.define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"],function(acequire,exports){var lang=acequire(\"./lib/lang\"),oop=acequire(\"./lib/oop\"),Range=acequire(\"./range\").Range,Search=function(){this.$options={}};(function(){this.set=function(options){return oop.mixin(this.$options,options),this},this.getOptions=function(){return lang.copyObject(this.$options)},this.setOptions=function(options){this.$options=options},this.find=function(session){var iterator=this.$matchIterator(session,this.$options);if(!iterator)return!1;var firstRange=null;return iterator.forEach(function(range,row,offset){if(range.start)firstRange=range;else{var column=range.offset+(offset||0);firstRange=new Range(row,column,row,column+range.length)}return!0}),firstRange},this.findAll=function(session){var options=this.$options;if(!options.needle)return[];this.$assembleRegExp(options);var range=options.range,lines=range?session.getLines(range.start.row,range.end.row):session.doc.getAllLines(),ranges=[],re=options.re;if(options.$isMultiLine)for(var len=re.length,maxRow=lines.length-len,row=re.offset||0;maxRow>=row;row++){for(var j=0;len>j&&-1!=lines[row+j].search(re[j]);j++);var startLine=lines[row],line=lines[row+len-1],startIndex=startLine.match(re[0])[0].length,endIndex=line.match(re[len-1])[0].length;ranges.push(new Range(row,startLine.length-startIndex,row+len-1,endIndex))}else for(var i=0;lines.length>i;i++)for(var matches=lang.getMatchOffsets(lines[i],re),j=0;matches.length>j;j++){var match=matches[j];ranges.push(new Range(i,match.offset,i,match.offset+match.length))}if(range){for(var startColumn=range.start.column,endColumn=range.start.column,i=0,j=ranges.length-1;j>i&&startColumn>ranges[i].start.column&&ranges[i].start.row==range.start.row;)i++;for(;j>i&&ranges[j].end.column>endColumn&&ranges[j].end.row==range.end.row;)j--;return ranges.slice(i,j+1)}return ranges},this.replace=function(input,replacement){var options=this.$options,re=this.$assembleRegExp(options);if(options.$isMultiLine)return replacement;if(re){var match=re.exec(input);if(!match||match[0].length!=input.length)return null;if(replacement=input.replace(re,replacement),options.preserveCase){replacement=replacement.split(\"\");for(var i=Math.min(input.length,input.length);i--;){var ch=input[i];replacement[i]=ch&&ch.toLowerCase()!=ch?replacement[i].toUpperCase():replacement[i].toLowerCase()}replacement=replacement.join(\"\")}return replacement}},this.$matchIterator=function(session,options){var re=this.$assembleRegExp(options);if(!re)return!1;var callback,self=this,backwards=options.backwards;if(options.$isMultiLine)var len=re.length,matchIterator=function(line,row,offset){var startIndex=line.search(re[0]);if(-1!=startIndex){for(var i=1;len>i;i++)if(line=session.getLine(row+i),-1==line.search(re[i]))return;var endIndex=line.match(re[len-1])[0].length,range=new Range(row,startIndex,row+len-1,endIndex);return 1==re.offset?(range.start.row--,range.start.column=Number.MAX_VALUE):offset&&(range.start.column+=offset),callback(range)?!0:void 0}};else if(backwards)var matchIterator=function(line,row,startIndex){for(var matches=lang.getMatchOffsets(line,re),i=matches.length-1;i>=0;i--)if(callback(matches[i],row,startIndex))return!0};else var matchIterator=function(line,row,startIndex){for(var matches=lang.getMatchOffsets(line,re),i=0;matches.length>i;i++)if(callback(matches[i],row,startIndex))return!0};return{forEach:function(_callback){callback=_callback,self.$lineIterator(session,options).forEach(matchIterator)}}},this.$assembleRegExp=function(options){if(options.needle instanceof RegExp)return options.re=options.needle;var needle=options.needle;if(!options.needle)return options.re=!1;options.regExp||(needle=lang.escapeRegExp(needle)),options.wholeWord&&(needle=\"\\\\b\"+needle+\"\\\\b\");var modifier=options.caseSensitive?\"g\":\"gi\";if(options.$isMultiLine=/[\\n\\r]/.test(needle),options.$isMultiLine)return options.re=this.$assembleMultilineRegExp(needle,modifier);try{var re=RegExp(needle,modifier)}catch(e){re=!1}return options.re=re},this.$assembleMultilineRegExp=function(needle,modifier){for(var parts=needle.replace(/\\r\\n|\\r|\\n/g,\"$\\n^\").split(\"\\n\"),re=[],i=0;parts.length>i;i++)try{re.push(RegExp(parts[i],modifier))}catch(e){return!1}return\"\"==parts[0]?(re.shift(),re.offset=1):re.offset=0,re},this.$lineIterator=function(session,options){var backwards=1==options.backwards,skipCurrent=0!=options.skipCurrent,range=options.range,start=options.start;start||(start=range?range[backwards?\"end\":\"start\"]:session.selection.getRange()),start.start&&(start=start[skipCurrent!=backwards?\"end\":\"start\"]);var firstRow=range?range.start.row:0,lastRow=range?range.end.row:session.getLength()-1,forEach=backwards?function(callback){var row=start.row,line=session.getLine(row).substring(0,start.column);if(!callback(line,row)){for(row--;row>=firstRow;row--)if(callback(session.getLine(row),row))return;if(0!=options.wrap)for(row=lastRow,firstRow=start.row;row>=firstRow;row--)if(callback(session.getLine(row),row))return}}:function(callback){var row=start.row,line=session.getLine(row).substr(start.column);if(!callback(line,row,start.column)){for(row+=1;lastRow>=row;row++)if(callback(session.getLine(row),row))return;if(0!=options.wrap)for(row=firstRow,lastRow=start.row;lastRow>=row;row++)if(callback(session.getLine(row),row))return}};return{forEach:forEach}}}).call(Search.prototype),exports.Search=Search}),ace.define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"],function(acequire,exports){var oop=acequire(\"../lib/oop\"),HashHandler=acequire(\"../keyboard/hash_handler\").HashHandler,EventEmitter=acequire(\"../lib/event_emitter\").EventEmitter,CommandManager=function(platform,commands){this.platform=platform,this.commands=this.byName={},this.commmandKeyBinding={},this.addCommands(commands),this.setDefaultHandler(\"exec\",function(e){return e.command.exec(e.editor,e.args||{})})};oop.inherits(CommandManager,HashHandler),function(){oop.implement(this,EventEmitter),this.exec=function(command,editor,args){if(\"string\"==typeof command&&(command=this.commands[command]),!command)return!1;if(editor&&editor.$readOnly&&!command.readOnly)return!1;var e={editor:editor,command:command,args:args},retvalue=this._emit(\"exec\",e);return this._signal(\"afterExec\",e),retvalue===!1?!1:!0},this.toggleRecording=function(editor){return this.$inReplay?void 0:(editor&&editor._emit(\"changeStatus\"),this.recording?(this.macro.pop(),this.removeEventListener(\"exec\",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on(\"exec\",this.$addCommandToMacro),this.recording=!0))},this.replay=function(editor){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(editor);try{this.$inReplay=!0,this.macro.forEach(function(x){\"string\"==typeof x?this.exec(x,editor):this.exec(x[0],editor,x[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(m){return m.map(function(x){return\"string\"!=typeof x[0]&&(x[0]=x[0].name),x[1]||(x=x[0]),x})}}.call(CommandManager.prototype),exports.CommandManager=CommandManager}),ace.define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"],function(acequire,exports){function HashHandler(config,platform){this.platform=platform||(useragent.isMac?\"mac\":\"win\"),this.commands={},this.commmandKeyBinding={},this.addCommands(config)}var keyUtil=acequire(\"../lib/keys\"),useragent=acequire(\"../lib/useragent\");(function(){this.addCommand=function(command){this.commands[command.name]&&this.removeCommand(command),this.commands[command.name]=command,command.bindKey&&this._buildKeyHash(command)},this.removeCommand=function(command){var name=\"string\"==typeof command?command:command.name;command=this.commands[name],delete this.commands[name];var ckb=this.commmandKeyBinding;for(var hashId in ckb)for(var key in ckb[hashId])ckb[hashId][key]==command&&delete ckb[hashId][key]},this.bindKey=function(key,command){if(key){if(\"function\"==typeof command)return this.addCommand({exec:command,bindKey:key,name:command.name||key}),void 0;var ckb=this.commmandKeyBinding;key.split(\"|\").forEach(function(keyPart){var binding=this.parseKeys(keyPart,command),hashId=binding.hashId;(ckb[hashId]||(ckb[hashId]={}))[binding.key]=command},this)}},this.addCommands=function(commands){commands&&Object.keys(commands).forEach(function(name){var command=commands[name];return\"string\"==typeof command?this.bindKey(command,name):(\"function\"==typeof command&&(command={exec:command}),command.name||(command.name=name),this.addCommand(command),void 0)},this)},this.removeCommands=function(commands){Object.keys(commands).forEach(function(name){this.removeCommand(commands[name])},this)},this.bindKeys=function(keyList){Object.keys(keyList).forEach(function(key){this.bindKey(key,keyList[key])},this)},this._buildKeyHash=function(command){var binding=command.bindKey;if(binding){var key=\"string\"==typeof binding?binding:binding[this.platform];this.bindKey(key,command)}},this.parseKeys=function(keys){-1!=keys.indexOf(\" \")&&(keys=keys.split(/\\s+/).pop());var parts=keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function(x){return x}),key=parts.pop(),keyCode=keyUtil[key];if(keyUtil.FUNCTION_KEYS[keyCode])key=keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();else{if(!parts.length)return{key:key,hashId:-1};if(1==parts.length&&\"shift\"==parts[0])return{key:key.toUpperCase(),hashId:-1}}for(var hashId=0,i=parts.length;i--;){var modifier=keyUtil.KEY_MODS[parts[i]];if(null==modifier)return\"undefined\"!=typeof console&&console.error(\"invalid modifier \"+parts[i]+\" in \"+keys),!1;hashId|=modifier}return{key:key,hashId:hashId}},this.findKeyCommand=function(hashId,keyString){var ckbr=this.commmandKeyBinding;return ckbr[hashId]&&ckbr[hashId][keyString]},this.handleKeyboard=function(data,hashId,keyString){return{command:this.findKeyCommand(hashId,keyString)}}}).call(HashHandler.prototype),exports.HashHandler=HashHandler}),ace.define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\"],function(acequire,exports){function bindKey(win,mac){return{win:win,mac:mac}}var lang=acequire(\"../lib/lang\"),config=acequire(\"../config\");exports.commands=[{name:\"selectall\",bindKey:bindKey(\"Ctrl-A\",\"Command-A\"),exec:function(editor){editor.selectAll()},readOnly:!0},{name:\"centerselection\",bindKey:bindKey(null,\"Ctrl-L\"),exec:function(editor){editor.centerSelection()},readOnly:!0},{name:\"gotoline\",bindKey:bindKey(\"Ctrl-L\",\"Command-L\"),exec:function(editor){var line=parseInt(prompt(\"Enter line number:\"),10);isNaN(line)||editor.gotoLine(line)},readOnly:!0},{name:\"fold\",bindKey:bindKey(\"Alt-L|Ctrl-F1\",\"Command-Alt-L|Command-F1\"),exec:function(editor){editor.session.toggleFold(!1)},readOnly:!0},{name:\"unfold\",bindKey:bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\",\"Command-Alt-Shift-L|Command-Shift-F1\"),exec:function(editor){editor.session.toggleFold(!0)},readOnly:!0},{name:\"foldall\",bindKey:bindKey(\"Alt-0\",\"Command-Option-0\"),exec:function(editor){editor.session.foldAll()},readOnly:!0},{name:\"unfoldall\",bindKey:bindKey(\"Alt-Shift-0\",\"Command-Option-Shift-0\"),exec:function(editor){editor.session.unfold()},readOnly:!0},{name:\"findnext\",bindKey:bindKey(\"Ctrl-K\",\"Command-G\"),exec:function(editor){editor.findNext()},readOnly:!0},{name:\"findprevious\",bindKey:bindKey(\"Ctrl-Shift-K\",\"Command-Shift-G\"),exec:function(editor){editor.findPrevious()},readOnly:!0},{name:\"find\",bindKey:bindKey(\"Ctrl-F\",\"Command-F\"),exec:function(editor){config.loadModule(\"ace/ext/searchbox\",function(e){e.Search(editor)})},readOnly:!0},{name:\"overwrite\",bindKey:\"Insert\",exec:function(editor){editor.toggleOverwrite()},readOnly:!0},{name:\"selecttostart\",bindKey:bindKey(\"Ctrl-Shift-Home\",\"Command-Shift-Up\"),exec:function(editor){editor.getSelection().selectFileStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotostart\",bindKey:bindKey(\"Ctrl-Home\",\"Command-Home|Command-Up\"),exec:function(editor){editor.navigateFileStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectup\",bindKey:bindKey(\"Shift-Up\",\"Shift-Up\"),exec:function(editor){editor.getSelection().selectUp()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"golineup\",bindKey:bindKey(\"Up\",\"Up|Ctrl-P\"),exec:function(editor,args){editor.navigateUp(args.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttoend\",bindKey:bindKey(\"Ctrl-Shift-End\",\"Command-Shift-Down\"),exec:function(editor){editor.getSelection().selectFileEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotoend\",bindKey:bindKey(\"Ctrl-End\",\"Command-End|Command-Down\"),exec:function(editor){editor.navigateFileEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectdown\",bindKey:bindKey(\"Shift-Down\",\"Shift-Down\"),exec:function(editor){editor.getSelection().selectDown()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"golinedown\",bindKey:bindKey(\"Down\",\"Down|Ctrl-N\"),exec:function(editor,args){editor.navigateDown(args.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectwordleft\",bindKey:bindKey(\"Ctrl-Shift-Left\",\"Option-Shift-Left\"),exec:function(editor){editor.getSelection().selectWordLeft()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotowordleft\",bindKey:bindKey(\"Ctrl-Left\",\"Option-Left\"),exec:function(editor){editor.navigateWordLeft()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttolinestart\",bindKey:bindKey(\"Alt-Shift-Left\",\"Command-Shift-Left\"),exec:function(editor){editor.getSelection().selectLineStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotolinestart\",bindKey:bindKey(\"Alt-Left|Home\",\"Command-Left|Home|Ctrl-A\"),exec:function(editor){editor.navigateLineStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectleft\",bindKey:bindKey(\"Shift-Left\",\"Shift-Left\"),exec:function(editor){editor.getSelection().selectLeft()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotoleft\",bindKey:bindKey(\"Left\",\"Left|Ctrl-B\"),exec:function(editor,args){editor.navigateLeft(args.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectwordright\",bindKey:bindKey(\"Ctrl-Shift-Right\",\"Option-Shift-Right\"),exec:function(editor){editor.getSelection().selectWordRight()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotowordright\",bindKey:bindKey(\"Ctrl-Right\",\"Option-Right\"),exec:function(editor){editor.navigateWordRight()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttolineend\",bindKey:bindKey(\"Alt-Shift-Right\",\"Command-Shift-Right\"),exec:function(editor){editor.getSelection().selectLineEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotolineend\",bindKey:bindKey(\"Alt-Right|End\",\"Command-Right|End|Ctrl-E\"),exec:function(editor){editor.navigateLineEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectright\",bindKey:bindKey(\"Shift-Right\",\"Shift-Right\"),exec:function(editor){editor.getSelection().selectRight()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"gotoright\",bindKey:bindKey(\"Right\",\"Right|Ctrl-F\"),exec:function(editor,args){editor.navigateRight(args.times)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectpagedown\",bindKey:\"Shift-PageDown\",exec:function(editor){editor.selectPageDown()},readOnly:!0},{name:\"pagedown\",bindKey:bindKey(null,\"Option-PageDown\"),exec:function(editor){editor.scrollPageDown()},readOnly:!0},{name:\"gotopagedown\",bindKey:bindKey(\"PageDown\",\"PageDown|Ctrl-V\"),exec:function(editor){editor.gotoPageDown()},readOnly:!0},{name:\"selectpageup\",bindKey:\"Shift-PageUp\",exec:function(editor){editor.selectPageUp()},readOnly:!0},{name:\"pageup\",bindKey:bindKey(null,\"Option-PageUp\"),exec:function(editor){editor.scrollPageUp()},readOnly:!0},{name:\"gotopageup\",bindKey:\"PageUp\",exec:function(editor){editor.gotoPageUp()},readOnly:!0},{name:\"scrollup\",bindKey:bindKey(\"Ctrl-Up\",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:\"scrolldown\",bindKey:bindKey(\"Ctrl-Down\",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:\"selectlinestart\",bindKey:\"Shift-Home\",exec:function(editor){editor.getSelection().selectLineStart()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selectlineend\",bindKey:\"Shift-End\",exec:function(editor){editor.getSelection().selectLineEnd()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"togglerecording\",bindKey:bindKey(\"Ctrl-Alt-E\",\"Command-Option-E\"),exec:function(editor){editor.commands.toggleRecording(editor)},readOnly:!0},{name:\"replaymacro\",bindKey:bindKey(\"Ctrl-Shift-E\",\"Command-Shift-E\"),exec:function(editor){editor.commands.replay(editor)},readOnly:!0},{name:\"jumptomatching\",bindKey:bindKey(\"Ctrl-P\",\"Ctrl-Shift-P\"),exec:function(editor){editor.jumpToMatching()},multiSelectAction:\"forEach\",readOnly:!0},{name:\"selecttomatching\",bindKey:bindKey(\"Ctrl-Shift-P\",null),exec:function(editor){editor.jumpToMatching(!0)},multiSelectAction:\"forEach\",readOnly:!0},{name:\"cut\",exec:function(editor){var range=editor.getSelectionRange();editor._emit(\"cut\",range),editor.selection.isEmpty()||(editor.session.remove(range),editor.clearSelection())},multiSelectAction:\"forEach\"},{name:\"removeline\",bindKey:bindKey(\"Ctrl-D\",\"Command-D\"),exec:function(editor){editor.removeLines()},multiSelectAction:\"forEachLine\"},{name:\"duplicateSelection\",bindKey:bindKey(\"Ctrl-Shift-D\",\"Command-Shift-D\"),exec:function(editor){editor.duplicateSelection()},multiSelectAction:\"forEach\"},{name:\"sortlines\",bindKey:bindKey(\"Ctrl-Alt-S\",\"Command-Alt-S\"),exec:function(editor){editor.sortLines()},multiSelectAction:\"forEachLine\"},{name:\"togglecomment\",bindKey:bindKey(\"Ctrl-/\",\"Command-/\"),exec:function(editor){editor.toggleCommentLines()},multiSelectAction:\"forEachLine\"},{name:\"modifyNumberUp\",bindKey:bindKey(\"Ctrl-Shift-Up\",\"Alt-Shift-Up\"),exec:function(editor){editor.modifyNumber(1)},multiSelectAction:\"forEach\"},{name:\"modifyNumberDown\",bindKey:bindKey(\"Ctrl-Shift-Down\",\"Alt-Shift-Down\"),exec:function(editor){editor.modifyNumber(-1)},multiSelectAction:\"forEach\"},{name:\"replace\",bindKey:bindKey(\"Ctrl-H\",\"Command-Option-F\"),exec:function(editor){config.loadModule(\"ace/ext/searchbox\",function(e){e.Search(editor,!0)})}},{name:\"undo\",bindKey:bindKey(\"Ctrl-Z\",\"Command-Z\"),exec:function(editor){editor.undo()}},{name:\"redo\",bindKey:bindKey(\"Ctrl-Shift-Z|Ctrl-Y\",\"Command-Shift-Z|Command-Y\"),exec:function(editor){editor.redo()}},{name:\"copylinesup\",bindKey:bindKey(\"Alt-Shift-Up\",\"Command-Option-Up\"),exec:function(editor){editor.copyLinesUp()}},{name:\"movelinesup\",bindKey:bindKey(\"Alt-Up\",\"Option-Up\"),exec:function(editor){editor.moveLinesUp()}},{name:\"copylinesdown\",bindKey:bindKey(\"Alt-Shift-Down\",\"Command-Option-Down\"),exec:function(editor){editor.copyLinesDown()}},{name:\"movelinesdown\",bindKey:bindKey(\"Alt-Down\",\"Option-Down\"),exec:function(editor){editor.moveLinesDown()}},{name:\"del\",bindKey:bindKey(\"Delete\",\"Delete|Ctrl-D\"),exec:function(editor){editor.remove(\"right\")},multiSelectAction:\"forEach\"},{name:\"backspace\",bindKey:bindKey(\"Command-Backspace|Option-Backspace|Shift-Backspace|Backspace\",\"Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H\"),exec:function(editor){editor.remove(\"left\")},multiSelectAction:\"forEach\"},{name:\"removetolinestart\",bindKey:bindKey(\"Alt-Backspace\",\"Command-Backspace\"),exec:function(editor){editor.removeToLineStart()},multiSelectAction:\"forEach\"},{name:\"removetolineend\",bindKey:bindKey(\"Alt-Delete\",\"Ctrl-K\"),exec:function(editor){editor.removeToLineEnd()},multiSelectAction:\"forEach\"},{name:\"removewordleft\",bindKey:bindKey(\"Ctrl-Backspace\",\"Alt-Backspace|Ctrl-Alt-Backspace\"),exec:function(editor){editor.removeWordLeft()},multiSelectAction:\"forEach\"},{name:\"removewordright\",bindKey:bindKey(\"Ctrl-Delete\",\"Alt-Delete\"),exec:function(editor){editor.removeWordRight()},multiSelectAction:\"forEach\"},{name:\"outdent\",bindKey:bindKey(\"Shift-Tab\",\"Shift-Tab\"),exec:function(editor){editor.blockOutdent()},multiSelectAction:\"forEach\"},{name:\"indent\",bindKey:bindKey(\"Tab\",\"Tab\"),exec:function(editor){editor.indent()},multiSelectAction:\"forEach\"},{name:\"blockoutdent\",bindKey:bindKey(\"Ctrl-[\",\"Ctrl-[\"),exec:function(editor){editor.blockOutdent()},multiSelectAction:\"forEachLine\"},{name:\"blockindent\",bindKey:bindKey(\"Ctrl-]\",\"Ctrl-]\"),exec:function(editor){editor.blockIndent()},multiSelectAction:\"forEachLine\"},{name:\"insertstring\",exec:function(editor,str){editor.insert(str)},multiSelectAction:\"forEach\"},{name:\"inserttext\",exec:function(editor,args){editor.insert(lang.stringRepeat(args.text||\"\",args.times||1))},multiSelectAction:\"forEach\"},{name:\"splitline\",bindKey:bindKey(null,\"Ctrl-O\"),exec:function(editor){editor.splitLine()},multiSelectAction:\"forEach\"},{name:\"transposeletters\",bindKey:bindKey(\"Ctrl-T\",\"Ctrl-T\"),exec:function(editor){editor.transposeLetters()},multiSelectAction:function(editor){editor.transposeSelections(1)}},{name:\"touppercase\",bindKey:bindKey(\"Ctrl-U\",\"Ctrl-U\"),exec:function(editor){editor.toUpperCase()},multiSelectAction:\"forEach\"},{name:\"tolowercase\",bindKey:bindKey(\"Ctrl-Shift-U\",\"Ctrl-Shift-U\"),exec:function(editor){editor.toLowerCase()},multiSelectAction:\"forEach\"}]}),ace.define(\"ace/undomanager\",[\"require\",\"exports\",\"module\"],function(acequire,exports){var UndoManager=function(){this.reset()};(function(){this.execute=function(options){var deltas=options.args[0];this.$doc=options.args[1],this.$undoStack.push(deltas),this.$redoStack=[]},this.undo=function(dontSelect){var deltas=this.$undoStack.pop(),undoSelectionRange=null;return deltas&&(undoSelectionRange=this.$doc.undoChanges(deltas,dontSelect),this.$redoStack.push(deltas)),undoSelectionRange},this.redo=function(dontSelect){var deltas=this.$redoStack.pop(),redoSelectionRange=null;return deltas&&(redoSelectionRange=this.$doc.redoChanges(deltas,dontSelect),this.$undoStack.push(deltas)),redoSelectionRange},this.reset=function(){this.$undoStack=[],this.$redoStack=[]},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0}}).call(UndoManager.prototype),exports.UndoManager=UndoManager}),ace.define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/config\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/renderloop\",\"ace/lib/event_emitter\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),dom=acequire(\"./lib/dom\"),event=acequire(\"./lib/event\"),useragent=acequire(\"./lib/useragent\"),config=acequire(\"./config\"),GutterLayer=acequire(\"./layer/gutter\").Gutter,MarkerLayer=acequire(\"./layer/marker\").Marker,TextLayer=acequire(\"./layer/text\").Text,CursorLayer=acequire(\"./layer/cursor\").Cursor,ScrollBar=acequire(\"./scrollbar\").ScrollBar,RenderLoop=acequire(\"./renderloop\").RenderLoop,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,editorCss=\".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;line-height: normal;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\\\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\\\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\\\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\\\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\\\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: scroll;right: 0;top: 0;bottom: 0;}.ace_scrollbar-inner {position: absolute;width: 1px;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: nowrap;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {color: black;font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\\\"opacity: 0\\\"]{-ms-filter: \\\"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\\\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_line {white-space: nowrap;}.ace_marker-layer .ace_step {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\\\"),url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\\\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\\\"),url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\\\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_editor.ace_dragging .ace_content {cursor: move;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 300;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: inline-block;width: 11px;vertical-align: top;background-image: url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\\\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;}.ace_fold-widget.ace_end {background-image: url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\\\");}.ace_fold-widget.ace_closed {background-image: url(\\\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\\\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}\";\ndom.importCssString(editorCss,\"ace_editor\");var VirtualRenderer=function(container,theme){var _self=this;this.container=container||dom.createElement(\"div\"),this.$keepTextAreaAtCursor=!useragent.isIE,dom.addCssClass(this.container,\"ace_editor\"),this.setTheme(theme),this.$gutter=dom.createElement(\"div\"),this.$gutter.className=\"ace_gutter\",this.container.appendChild(this.$gutter),this.scroller=dom.createElement(\"div\"),this.scroller.className=\"ace_scroller\",this.container.appendChild(this.scroller),this.content=dom.createElement(\"div\"),this.content.className=\"ace_content\",this.scroller.appendChild(this.content),this.$gutterLayer=new GutterLayer(this.$gutter),this.$gutterLayer.on(\"changeGutterWidth\",this.onGutterResize.bind(this)),this.$markerBack=new MarkerLayer(this.content);var textLayer=this.$textLayer=new TextLayer(this.content);this.canvas=textLayer.element,this.$markerFront=new MarkerLayer(this.content),this.$cursorLayer=new CursorLayer(this.content),this.$horizScroll=!1,this.scrollBar=new ScrollBar(this.container),this.scrollBar.addEventListener(\"scroll\",function(e){_self.$inScrollAnimation||_self.session.setScrollTop(e.data)}),this.scrollTop=0,this.scrollLeft=0,event.addListener(this.scroller,\"scroll\",function(){var scrollLeft=_self.scroller.scrollLeft;_self.scrollLeft=scrollLeft,_self.session.setScrollLeft(scrollLeft)}),this.cursorPos={row:0,column:0},this.$textLayer.addEventListener(\"changeCharacterSize\",function(){_self.updateCharacterSize(),_self.onResize(!0)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1},this.$loop=new RenderLoop(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),config.resetOptions(this),config._emit(\"renderer\",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,oop.implement(this,EventEmitter),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle(\"ace_nobold\",!this.$allowBoldFonts)),this.characterWidth=this.$textLayer.getCharacterWidth(),this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(session){this.session=session,this.scroller.className=\"ace_scroller\",this.$cursorLayer.setSession(session),this.$markerBack.setSession(session),this.$markerFront.setSession(session),this.$gutterLayer.setSession(session),this.$textLayer.setSession(session),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(firstRow,lastRow){void 0===lastRow&&(lastRow=1/0),this.$changedLines?(this.$changedLines.firstRow>firstRow&&(this.$changedLines.firstRow=firstRow),lastRow>this.$changedLines.lastRow&&(this.$changedLines.lastRow=lastRow)):this.$changedLines={firstRow:firstRow,lastRow:lastRow},this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow\u003Cthis.layerConfig.firstRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(force){force?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.onResize=function(force,gutterWidth,width,height){var changes=0,size=this.$size;if(!(this.resizing>2)){if(this.resizing>1?this.resizing++:this.resizing=force?1:0,height||(height=dom.getInnerHeight(this.container)),height&&(force||size.height!=height)&&(size.height=height,changes=this.CHANGE_SIZE,size.scrollerHeight=this.scroller.clientHeight,size.scrollerHeight||(size.scrollerHeight=size.height,this.$horizScroll&&(size.scrollerHeight-=this.scrollBar.getWidth())),this.scrollBar.setHeight(size.scrollerHeight),this.session&&(this.session.setScrollTop(this.getScrollTop()),changes|=this.CHANGE_FULL)),width||(width=dom.getInnerWidth(this.container)),width&&(force||this.resizing>1||size.width!=width)){changes=this.CHANGE_SIZE,size.width=width;var gutterWidth=this.$showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=gutterWidth+\"px\",size.scrollerWidth=Math.max(0,width-gutterWidth-this.scrollBar.getWidth()),this.scroller.style.right=this.scrollBar.getWidth()+\"px\",(this.session.getUseWrapMode()&&this.adjustWrapLimit()||force)&&(changes|=this.CHANGE_FULL)}this.$size.scrollerHeight&&(force?this.$renderChanges(changes,!0):this.$loop.schedule(changes),force&&(this.$gutterLayer.$padding=null),force&&delete this.resizing)}},this.onGutterResize=function(){var width=this.$size.width,gutterWidth=this.$showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=gutterWidth+\"px\",this.$size.scrollerWidth=Math.max(0,width-gutterWidth-this.scrollBar.getWidth()),this.session.getUseWrapMode()&&this.adjustWrapLimit()&&this.$loop.schedule(this.CHANGE_FULL)},this.adjustWrapLimit=function(){var availableWidth=this.$size.scrollerWidth-2*this.$padding,limit=Math.floor(availableWidth/this.characterWidth);return this.session.adjustWrapLimit(limit,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(shouldAnimate){this.setOption(\"animatedScroll\",shouldAnimate)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(showInvisibles){this.setOption(\"showInvisibles\",showInvisibles)},this.getShowInvisibles=function(){return this.getOption(\"showInvisibles\")},this.getDisplayIndentGuides=function(){return this.getOption(\"displayIndentGuides\")},this.setDisplayIndentGuides=function(display){this.setOption(\"displayIndentGuides\",display)},this.setShowPrintMargin=function(showPrintMargin){this.setOption(\"showPrintMargin\",showPrintMargin)},this.getShowPrintMargin=function(){return this.getOption(\"showPrintMargin\")},this.setPrintMarginColumn=function(showPrintMargin){this.setOption(\"printMarginColumn\",showPrintMargin)},this.getPrintMarginColumn=function(){return this.getOption(\"printMarginColumn\")},this.getShowGutter=function(){return this.getOption(\"showGutter\")},this.setShowGutter=function(show){return this.setOption(\"showGutter\",show)},this.getFadeFoldWidgets=function(){return this.getOption(\"fadeFoldWidgets\")},this.setFadeFoldWidgets=function(show){this.setOption(\"fadeFoldWidgets\",show)},this.setHighlightGutterLine=function(shouldHighlight){this.setOption(\"highlightGutterLine\",shouldHighlight)},this.getHighlightGutterLine=function(){return this.getOption(\"highlightGutterLine\")},this.$updateGutterLineHighlight=function(){var pos=this.$cursorLayer.$pixelPos,height=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var cursor=this.session.selection.getCursor();cursor.column=0,pos=this.$cursorLayer.getPixelPosition(cursor,!0),height*=this.session.getRowLength(cursor.row)}this.$gutterLineHighlight.style.top=pos.top-this.layerConfig.offset+\"px\",this.$gutterLineHighlight.style.height=height+\"px\"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var containerEl=dom.createElement(\"div\");containerEl.className=\"ace_layer ace_print-margin-layer\",this.$printMarginEl=dom.createElement(\"div\"),this.$printMarginEl.className=\"ace_print-margin\",containerEl.appendChild(this.$printMarginEl),this.content.insertBefore(containerEl,this.content.firstChild)}var style=this.$printMarginEl.style;style.left=this.characterWidth*this.$printMarginColumn+this.$padding+\"px\",style.visibility=this.$showPrintMargin?\"visible\":\"hidden\",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var config=this.layerConfig,posTop=this.$cursorLayer.$pixelPos.top,posLeft=this.$cursorLayer.$pixelPos.left;posTop-=config.offset;var h=this.lineHeight;if(!(0>posTop||posTop>config.height-h)){var w=this.characterWidth;if(this.$composition){var val=this.textarea.value.replace(/^\\x01+/,\"\");w*=this.session.$getStringScreenWidth(val)[0],h+=2,posTop-=1}posLeft-=this.scrollLeft,posLeft>this.$size.scrollerWidth-w&&(posLeft=this.$size.scrollerWidth-w),posLeft-=this.scrollBar.width,this.textarea.style.height=h+\"px\",this.textarea.style.width=w+\"px\",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-posLeft-w)+\"px\",this.textarea.style.bottom=Math.max(0,this.$size.height-posTop-h)+\"px\"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var flint=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+flint},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(padding){this.$padding=padding,this.$textLayer.setPadding(padding),this.$cursorLayer.setPadding(padding),this.$markerFront.setPadding(padding),this.$markerBack.setPadding(padding),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(alwaysVisible){this.setOption(\"hScrollBarAlwaysVisible\",alwaysVisible)},this.$updateScrollBar=function(){this.scrollBar.setInnerHeight(this.layerConfig.maxHeight),this.scrollBar.setScrollTop(this.scrollTop)},this.$renderChanges=function(changes,force){if(force||changes&&this.session&&this.container.offsetWidth){if(this._signal(\"beforeRender\"),(changes&this.CHANGE_FULL||changes&this.CHANGE_SIZE||changes&this.CHANGE_TEXT||changes&this.CHANGE_LINES||changes&this.CHANGE_SCROLL)&&this.$computeLayerConfig(),changes&this.CHANGE_H_SCROLL){this.scroller.scrollLeft=this.scrollLeft;var scrollLeft=this.scroller.scrollLeft;this.scrollLeft=scrollLeft,this.session.setScrollLeft(scrollLeft),this.scroller.className=0==this.scrollLeft?\"ace_scroller\":\"ace_scroller ace_scroll-left\"}if(changes&this.CHANGE_FULL)return this.$textLayer.checkForSizeChanges(),this.$updateScrollBar(),this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal(\"afterRender\"),void 0;if(changes&this.CHANGE_SCROLL)return changes&this.CHANGE_TEXT||changes&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this.$updateScrollBar(),this._signal(\"afterRender\"),void 0;changes&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig)):changes&this.CHANGE_LINES?(this.$updateLines()||changes&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(this.layerConfig):(changes&this.CHANGE_TEXT||changes&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(this.layerConfig),changes&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),changes&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),changes&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),changes&this.CHANGE_SIZE&&this.$updateScrollBar(),this._signal(\"afterRender\")}},this.$computeLayerConfig=function(){if(!this.$size.scrollerHeight)return this.onResize(!0);var session=this.session,offset=this.scrollTop%this.lineHeight,minHeight=this.$size.scrollerHeight+this.lineHeight,longestLine=this.$getLongestLine(),horizScroll=this.$hScrollBarAlwaysVisible||0>this.$size.scrollerWidth-longestLine,horizScrollChanged=this.$horizScroll!==horizScroll;this.$horizScroll=horizScroll,horizScrollChanged&&(this.scroller.style.overflowX=horizScroll?\"scroll\":\"hidden\",horizScroll||this.session.setScrollLeft(0));var maxHeight=this.session.getScreenLength()*this.lineHeight;this.session.setScrollTop(Math.max(0,Math.min(this.scrollTop,maxHeight-this.$size.scrollerHeight)));var firstRowScreen,firstRowHeight,lineCount=Math.ceil(minHeight/this.lineHeight)-1,firstRow=Math.max(0,Math.round((this.scrollTop-offset)/this.lineHeight)),lastRow=firstRow+lineCount,lineHeight=this.lineHeight;firstRow=session.screenToDocumentRow(firstRow,0);var foldLine=session.getFoldLine(firstRow);foldLine&&(firstRow=foldLine.start.row),firstRowScreen=session.documentToScreenRow(firstRow,0),firstRowHeight=session.getRowLength(firstRow)*lineHeight,lastRow=Math.min(session.screenToDocumentRow(lastRow,0),session.getLength()-1),minHeight=this.$size.scrollerHeight+session.getRowLength(lastRow)*lineHeight+firstRowHeight,offset=this.scrollTop-firstRowScreen*lineHeight,this.layerConfig={width:longestLine,padding:this.$padding,firstRow:firstRow,firstRowScreen:firstRowScreen,lastRow:lastRow,lineHeight:lineHeight,characterWidth:this.characterWidth,minHeight:minHeight,maxHeight:maxHeight,offset:offset,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-offset+\"px\",this.content.style.marginTop=-offset+\"px\",this.content.style.width=longestLine+2*this.$padding+\"px\",this.content.style.height=minHeight+\"px\",horizScrollChanged&&this.onResize(!0)},this.$updateLines=function(){var firstRow=this.$changedLines.firstRow,lastRow=this.$changedLines.lastRow;this.$changedLines=null;var layerConfig=this.layerConfig;return firstRow>layerConfig.lastRow+1||layerConfig.firstRow>lastRow?void 0:1/0===lastRow?(this.$showGutter&&this.$gutterLayer.update(layerConfig),this.$textLayer.update(layerConfig),void 0):(this.$textLayer.updateLines(layerConfig,firstRow,lastRow),!0)},this.$getLongestLine=function(){var charCount=this.session.getScreenWidth();return this.$textLayer.showInvisibles&&(charCount+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(charCount*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(row,className){this.$gutterLayer.addGutterDecoration(row,className)},this.removeGutterDecoration=function(row,className){this.$gutterLayer.removeGutterDecoration(row,className)},this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(annotations){this.$gutterLayer.setAnnotations(annotations),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(anchor,lead,offset){this.scrollCursorIntoView(anchor,offset),this.scrollCursorIntoView(lead,offset)},this.scrollCursorIntoView=function(cursor,offset){if(0!==this.$size.scrollerHeight){var pos=this.$cursorLayer.getPixelPosition(cursor),left=pos.left,top=pos.top;this.scrollTop>top?(offset&&(top-=offset*this.$size.scrollerHeight),this.session.setScrollTop(top)):this.scrollTop+this.$size.scrollerHeight\u003Ctop+this.lineHeight&&(offset&&(top+=offset*this.$size.scrollerHeight),this.session.setScrollTop(top+this.lineHeight-this.$size.scrollerHeight));var scrollLeft=this.scrollLeft;scrollLeft>left?(this.$padding+2*this.layerConfig.characterWidth>left&&(left=0),this.session.setScrollLeft(left)):scrollLeft+this.$size.scrollerWidth\u003Cleft+this.characterWidth&&this.session.setScrollLeft(Math.round(left+this.characterWidth-this.$size.scrollerWidth))}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(row){this.session.setScrollTop(row*this.lineHeight)},this.alignCursor=function(cursor,alignment){\"number\"==typeof cursor&&(cursor={row:cursor,column:0});var pos=this.$cursorLayer.getPixelPosition(cursor),h=this.$size.scrollerHeight-this.lineHeight,offset=pos.top-h*(alignment||0);return this.session.setScrollTop(offset),offset},this.STEPS=8,this.$calcSteps=function(fromValue,toValue){var i=0,l=this.STEPS,steps=[],func=function(t,x_min,dx){return dx*(Math.pow(t-1,3)+1)+x_min};for(i=0;l>i;++i)steps.push(func(i/this.STEPS,fromValue,toValue-fromValue));return steps},this.scrollToLine=function(line,center,animate,callback){var pos=this.$cursorLayer.getPixelPosition({row:line,column:0}),offset=pos.top;center&&(offset-=this.$size.scrollerHeight/2);var initialScroll=this.scrollTop;this.session.setScrollTop(offset),animate!==!1&&this.animateScrolling(initialScroll,callback)},this.animateScrolling=function(fromValue,callback){var toValue=this.scrollTop;if(this.$animatedScroll&&1e5>Math.abs(fromValue-toValue)){var _self=this,steps=_self.$calcSteps(fromValue,toValue);this.$inScrollAnimation=!0,clearInterval(this.$timer),_self.session.setScrollTop(steps.shift()),this.$timer=setInterval(function(){steps.length?(_self.session.setScrollTop(steps.shift()),_self.session.$scrollTop=toValue):null!=toValue?(_self.session.$scrollTop=-1,_self.session.setScrollTop(toValue),toValue=null):(_self.$timer=clearInterval(_self.$timer),_self.$inScrollAnimation=!1,callback&&callback())},10)}},this.scrollToY=function(scrollTop){this.scrollTop!==scrollTop&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=scrollTop)},this.scrollToX=function(scrollLeft){0>scrollLeft&&(scrollLeft=0),this.scrollLeft!==scrollLeft&&(this.scrollLeft=scrollLeft),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollBy=function(deltaX,deltaY){deltaY&&this.session.setScrollTop(this.session.getScrollTop()+deltaY),deltaX&&this.session.setScrollLeft(this.session.getScrollLeft()+deltaX)},this.isScrollableBy=function(deltaX,deltaY){return 0>deltaY&&this.session.getScrollTop()>=1?!0:deltaY>0&&-1>this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight?!0:void 0},this.pixelToScreenCoordinates=function(x,y){var canvasPos=this.scroller.getBoundingClientRect(),offset=(x+this.scrollLeft-canvasPos.left-this.$padding)/this.characterWidth,row=Math.floor((y+this.scrollTop-canvasPos.top)/this.lineHeight),col=Math.round(offset);return{row:row,column:col,side:offset-col>0?1:-1}},this.screenToTextCoordinates=function(x,y){var canvasPos=this.scroller.getBoundingClientRect(),col=Math.round((x+this.scrollLeft-canvasPos.left-this.$padding)/this.characterWidth),row=Math.floor((y+this.scrollTop-canvasPos.top)/this.lineHeight);return this.session.screenToDocumentPosition(row,Math.max(col,0))},this.textToScreenCoordinates=function(row,column){var canvasPos=this.scroller.getBoundingClientRect(),pos=this.session.documentToScreenPosition(row,column),x=this.$padding+Math.round(pos.column*this.characterWidth),y=pos.row*this.lineHeight;return{pageX:canvasPos.left+x-this.scrollLeft,pageY:canvasPos.top+y-this.scrollTop}},this.visualizeFocus=function(){dom.addCssClass(this.container,\"ace_focus\")},this.visualizeBlur=function(){dom.removeCssClass(this.container,\"ace_focus\")},this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,dom.addCssClass(this.textarea,\"ace_composition\"),this.textarea.style.cssText=\"\",this.$moveTextAreaToCursor()},this.setCompositionText=function(){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(dom.removeCssClass(this.textarea,\"ace_composition\"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(theme){function afterLoad(theme){if(theme.cssClass){dom.importCssString(theme.cssText,theme.cssClass,_self.container.ownerDocument),_self.theme&&dom.removeCssClass(_self.container,_self.theme.cssClass),_self.$theme=theme.cssClass,_self.theme=theme,dom.addCssClass(_self.container,theme.cssClass),dom.setCssClass(_self.container,\"ace_dark\",theme.isDark);var padding=theme.padding||4;_self.$padding&&padding!=_self.$padding&&_self.setPadding(padding),_self.$size&&(_self.$size.width=0,_self.onResize()),_self._dispatchEvent(\"themeLoaded\",{theme:theme})}}var _self=this;if(this.$themeValue=theme,_self._dispatchEvent(\"themeChange\",{theme:theme}),theme&&\"string\"!=typeof theme)afterLoad(theme);else{var moduleName=theme||\"ace/theme/textmate\";config.loadModule([\"theme\",moduleName],afterLoad)}},this.getTheme=function(){return this.$themeValue},this.setStyle=function(style,include){dom.setCssClass(this.container,style,0!=include)},this.unsetStyle=function(style){dom.removeCssClass(this.container,style)},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(VirtualRenderer.prototype),config.defineOptions(VirtualRenderer.prototype,\"renderer\",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(value){this.$textLayer.setShowInvisibles(value)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(val){\"number\"==typeof val&&(this.$printMarginColumn=val),this.$showPrintMargin=!!val,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(show){this.$gutter.style.display=show?\"block\":\"none\",this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(show){dom.setCssClass(this.$gutter,\"ace_fade-fold-widgets\",show)},initialValue:!1},showFoldWidgets:{set:function(show){this.$gutterLayer.setShowFoldWidgets(show)},initialValue:!0},displayIndentGuides:{set:function(show){this.$textLayer.setDisplayIndentGuides(show)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(shouldHighlight){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=shouldHighlight?\"\":\"none\",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight(),void 0):(this.$gutterLineHighlight=dom.createElement(\"div\"),this.$gutterLineHighlight.className=\"ace_gutter-active-line\",this.$gutter.appendChild(this.$gutterLineHighlight),void 0)},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(alwaysVisible){this.$hScrollBarAlwaysVisible=alwaysVisible,this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(size){\"number\"==typeof size&&(size+=\"px\"),this.container.style.fontSize=size,this.updateFontSize()},initialValue:12},fontFamily:{set:function(name){this.container.style.fontFamily=name,this.updateFontSize()}}}),exports.VirtualRenderer=VirtualRenderer}),ace.define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\"],function(acequire,exports){var dom=acequire(\"../lib/dom\"),oop=acequire(\"../lib/oop\"),lang=acequire(\"../lib/lang\"),EventEmitter=acequire(\"../lib/event_emitter\").EventEmitter,Gutter=function(parentEl){this.element=dom.createElement(\"div\"),this.element.className=\"ace_layer ace_gutter-layer\",parentEl.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this)};(function(){oop.implement(this,EventEmitter),this.setSession=function(session){this.session&&this.session.removeEventListener(\"change\",this.$updateAnnotations),this.session=session,session.on(\"change\",this.$updateAnnotations)},this.addGutterDecoration=function(row,className){window.console&&console.warn&&console.warn(\"deprecated use session.addGutterDecoration\"),this.session.addGutterDecoration(row,className)},this.removeGutterDecoration=function(row,className){window.console&&console.warn&&console.warn(\"deprecated use session.removeGutterDecoration\"),this.session.removeGutterDecoration(row,className)},this.setAnnotations=function(annotations){this.$annotations=[];for(var rowInfo,row,i=0;annotations.length>i;i++){var annotation=annotations[i],row=annotation.row,rowInfo=this.$annotations[row];rowInfo||(rowInfo=this.$annotations[row]={text:[]});var annoText=annotation.text;annoText=annoText?lang.escapeHTML(annoText):annotation.html||\"\",-1===rowInfo.text.indexOf(annoText)&&rowInfo.text.push(annoText);var type=annotation.type;\"error\"==type?rowInfo.className=\" ace_error\":\"warning\"==type&&\" ace_error\"!=rowInfo.className?rowInfo.className=\" ace_warning\":\"info\"!=type||rowInfo.className||(rowInfo.className=\" ace_info\")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var delta=e.data,range=delta.range,firstRow=range.start.row,len=range.end.row-firstRow;if(0===len);else if(\"removeText\"==delta.action||\"removeLines\"==delta.action)this.$annotations.splice(firstRow,len+1,null);else{var args=Array(len+1);args.unshift(firstRow,1),this.$annotations.splice.apply(this.$annotations,args)}}},this.update=function(config){for(var emptyAnno={className:\"\"},html=[],i=config.firstRow,lastRow=config.lastRow,fold=this.session.getNextFoldLine(i),foldStart=fold?fold.start.row:1/0,foldWidgets=this.$showFoldWidgets&&this.session.foldWidgets,breakpoints=this.session.$breakpoints,decorations=this.session.$decorations,firstLineNumber=this.session.$firstLineNumber,lastLineNumber=0;;){if(i>foldStart&&(i=fold.end.row+1,fold=this.session.getNextFoldLine(i,fold),foldStart=fold?fold.start.row:1/0),i>lastRow)break;var annotation=this.$annotations[i]||emptyAnno;if(html.push(\"\u003Cdiv class='ace_gutter-cell \",breakpoints[i]||\"\",decorations[i]||\"\",annotation.className,\"' style='height:\",this.session.getRowLength(i)*config.lineHeight,\"px;'>\",lastLineNumber=i+firstLineNumber),foldWidgets){var c=foldWidgets[i];null==c&&(c=foldWidgets[i]=this.session.getFoldWidget(i)),c&&html.push(\"\u003Cspan class='ace_fold-widget ace_\",c,\"start\"==c&&i==foldStart&&fold.end.row>i?\" ace_closed\":\" ace_open\",\"' style='height:\",config.lineHeight,\"px\",\"'>\u003C/span>\")}html.push(\"\u003C/div>\"),i++}this.element=dom.setInnerHtml(this.element,html.join(\"\")),this.element.style.height=config.minHeight+\"px\",this.session.$useWrapMode&&(lastLineNumber=this.session.getLength());var gutterWidth=(\"\"+lastLineNumber).length*config.characterWidth,padding=this.$padding||this.$computePadding();gutterWidth+=padding.left+padding.right,gutterWidth!==this.gutterWidth&&(this.gutterWidth=gutterWidth,this.element.style.width=Math.ceil(this.gutterWidth)+\"px\",this._emit(\"changeGutterWidth\",gutterWidth))},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(show){show?dom.addCssClass(this.element,\"ace_folding-enabled\"):dom.removeCssClass(this.element,\"ace_folding-enabled\"),this.$showFoldWidgets=show,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var style=dom.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(style.paddingLeft)+1,this.$padding.right=parseInt(style.paddingRight),this.$padding},this.getRegion=function(point){var padding=this.$padding||this.$computePadding(),rect=this.element.getBoundingClientRect();return point.x\u003Cpadding.left+rect.left?\"markers\":this.$showFoldWidgets&&point.x>rect.right-padding.right?\"foldWidgets\":void 0}}).call(Gutter.prototype),exports.Gutter=Gutter}),ace.define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"],function(acequire,exports){var Range=acequire(\"../range\").Range,dom=acequire(\"../lib/dom\"),Marker=function(parentEl){this.element=dom.createElement(\"div\"),this.element.className=\"ace_layer ace_marker-layer\",parentEl.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(padding){this.$padding=padding},this.setSession=function(session){this.session=session},this.setMarkers=function(markers){this.markers=markers},this.update=function(config){var config=config||this.config;if(config){this.config=config;var html=[];for(var key in this.markers){var marker=this.markers[key];if(marker.range){var range=marker.range.clipRows(config.firstRow,config.lastRow);if(!range.isEmpty())if(range=range.toScreenRange(this.session),marker.renderer){var top=this.$getTop(range.start.row,config),left=this.$padding+range.start.column*config.characterWidth;marker.renderer(html,range,left,top,config)}else\"fullLine\"==marker.type?this.drawFullLineMarker(html,range,marker.clazz,config):\"screenLine\"==marker.type?this.drawScreenLineMarker(html,range,marker.clazz,config):range.isMultiLine()?\"text\"==marker.type?this.drawTextMarker(html,range,marker.clazz,config):this.drawMultiLineMarker(html,range,marker.clazz,config):this.drawSingleLineMarker(html,range,marker.clazz+\" ace_start\",config)}else marker.update(html,this,this.session,config)}this.element=dom.setInnerHtml(this.element,html.join(\"\"))}},this.$getTop=function(row,layerConfig){return(row-layerConfig.firstRowScreen)*layerConfig.lineHeight},this.drawTextMarker=function(stringBuilder,range,clazz,layerConfig){var row=range.start.row,lineRange=new Range(row,range.start.column,row,this.session.getScreenLastRowColumn(row));for(this.drawSingleLineMarker(stringBuilder,lineRange,clazz+\" ace_start\",layerConfig,1,\"text\"),row=range.end.row,lineRange=new Range(row,0,row,range.end.column),this.drawSingleLineMarker(stringBuilder,lineRange,clazz,layerConfig,0,\"text\"),row=range.start.row+1;range.end.row>row;row++)lineRange.start.row=row,lineRange.end.row=row,lineRange.end.column=this.session.getScreenLastRowColumn(row),this.drawSingleLineMarker(stringBuilder,lineRange,clazz,layerConfig,1,\"text\")},this.drawMultiLineMarker=function(stringBuilder,range,clazz,config){var padding=this.$padding,height=config.lineHeight,top=this.$getTop(range.start.row,config),left=padding+range.start.column*config.characterWidth;stringBuilder.push(\"\u003Cdiv class='\",clazz,\" ace_start' style='\",\"height:\",height,\"px;\",\"right:0;\",\"top:\",top,\"px;\",\"left:\",left,\"px;'>\u003C/div>\"),top=this.$getTop(range.end.row,config);var width=range.end.column*config.characterWidth;stringBuilder.push(\"\u003Cdiv class='\",clazz,\"' style='\",\"height:\",height,\"px;\",\"width:\",width,\"px;\",\"top:\",top,\"px;\",\"left:\",padding,\"px;'>\u003C/div>\"),height=(range.end.row-range.start.row-1)*config.lineHeight,0>height||(top=this.$getTop(range.start.row+1,config),stringBuilder.push(\"\u003Cdiv class='\",clazz,\"' style='\",\"height:\",height,\"px;\",\"right:0;\",\"top:\",top,\"px;\",\"left:\",padding,\"px;'>\u003C/div>\"))},this.drawSingleLineMarker=function(stringBuilder,range,clazz,config,extraLength){var height=config.lineHeight,width=(range.end.column+(extraLength||0)-range.start.column)*config.characterWidth,top=this.$getTop(range.start.row,config),left=this.$padding+range.start.column*config.characterWidth;stringBuilder.push(\"\u003Cdiv class='\",clazz,\"' style='\",\"height:\",height,\"px;\",\"width:\",width,\"px;\",\"top:\",top,\"px;\",\"left:\",left,\"px;'>\u003C/div>\")\n},this.drawFullLineMarker=function(stringBuilder,range,clazz,config){var top=this.$getTop(range.start.row,config),height=config.lineHeight;range.start.row!=range.end.row&&(height+=this.$getTop(range.end.row,config)-top),stringBuilder.push(\"\u003Cdiv class='\",clazz,\"' style='\",\"height:\",height,\"px;\",\"top:\",top,\"px;\",\"left:0;right:0;'>\u003C/div>\")},this.drawScreenLineMarker=function(stringBuilder,range,clazz,config){var top=this.$getTop(range.start.row,config),height=config.lineHeight;stringBuilder.push(\"\u003Cdiv class='\",clazz,\"' style='\",\"height:\",height,\"px;\",\"top:\",top,\"px;\",\"left:0;right:0;'>\u003C/div>\")}}).call(Marker.prototype),exports.Marker=Marker}),ace.define(\"ace/layer/text\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"],function(acequire,exports){var oop=acequire(\"../lib/oop\"),dom=acequire(\"../lib/dom\"),lang=acequire(\"../lib/lang\"),useragent=acequire(\"../lib/useragent\"),EventEmitter=acequire(\"../lib/event_emitter\").EventEmitter,Text=function(parentEl){this.element=dom.createElement(\"div\"),this.element.className=\"ace_layer ace_text-layer\",parentEl.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){oop.implement(this,EventEmitter),this.EOF_CHAR=\"¶\",this.EOL_CHAR=\"¬\",this.TAB_CHAR=\"→\",this.SPACE_CHAR=\"·\",this.$padding=0,this.setPadding=function(padding){this.$padding=padding,this.element.style.padding=\"0 \"+padding+\"px\"},this.getLineHeight=function(){return this.$characterSize.height||1},this.getCharacterWidth=function(){return this.$characterSize.width||1},this.checkForSizeChanges=function(){var size=this.$measureSizes();if(size&&(this.$characterSize.width!==size.width||this.$characterSize.height!==size.height)){this.$measureNode.style.fontWeight=\"bold\";var boldSize=this.$measureSizes();this.$measureNode.style.fontWeight=\"\",this.$characterSize=size,this.allowBoldFonts=boldSize&&boldSize.width===size.width&&boldSize.height===size.height,this._emit(\"changeCharacterSize\",{data:size})}},this.$pollSizeChanges=function(){var self=this;this.$pollSizeChangesTimer=setInterval(function(){self.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=useragent.isIE||useragent.isOldGecko?function(){var n=1e3;if(!this.$measureNode){var measureNode=this.$measureNode=dom.createElement(\"div\"),style=measureNode.style;if(style.width=style.height=\"auto\",style.left=style.top=40*-n+\"px\",style.visibility=\"hidden\",style.position=\"fixed\",style.overflow=\"visible\",style.whiteSpace=\"nowrap\",measureNode.innerHTML=lang.stringRepeat(\"Xy\",n),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(measureNode);else{for(var container=this.element.parentNode;!dom.hasCssClass(container,\"ace_editor\");)container=container.parentNode;container.appendChild(measureNode)}}if(!this.element.offsetWidth)return null;var style=this.$measureNode.style,computedStyle=dom.computedStyle(this.element);for(var prop in this.$fontStyles)style[prop]=computedStyle[prop];var size={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*n)};return 0==size.width||0==size.height?null:size}:function(){if(!this.$measureNode){var measureNode=this.$measureNode=dom.createElement(\"div\"),style=measureNode.style;style.width=style.height=\"auto\",style.left=style.top=\"-100px\",style.visibility=\"hidden\",style.position=\"fixed\",style.overflow=\"visible\",style.whiteSpace=\"nowrap\",measureNode.innerHTML=\"X\";for(var container=this.element.parentNode;container&&!dom.hasCssClass(container,\"ace_editor\");)container=container.parentNode;if(!container)return this.$measureNode=null;container.appendChild(measureNode)}var rect=this.$measureNode.getBoundingClientRect(),size={height:rect.height,width:rect.width};return 0==size.width||0==size.height?null:size},this.setSession=function(session){this.session=session,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(showInvisibles){return this.showInvisibles==showInvisibles?!1:(this.showInvisibles=showInvisibles,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(display){return this.displayIndentGuides==display?!1:(this.displayIndentGuides=display,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var tabSize=this.session.getTabSize();this.tabSize=tabSize;for(var tabStr=this.$tabStrings=[0],i=1;tabSize+1>i;i++)this.showInvisibles?tabStr.push(\"\u003Cspan class='ace_invisible'>\"+this.TAB_CHAR+lang.stringRepeat(\" \",i-1)+\"\u003C/span>\"):tabStr.push(lang.stringRepeat(\" \",i));if(this.displayIndentGuides){this.$indentGuideRe=/\\s\\S| \\t|\\t |\\s$/;var className=\"ace_indent-guide\";if(this.showInvisibles){className+=\" ace_invisible\";var spaceContent=lang.stringRepeat(this.SPACE_CHAR,this.tabSize),tabContent=this.TAB_CHAR+lang.stringRepeat(\" \",this.tabSize-1)}else var spaceContent=lang.stringRepeat(\" \",this.tabSize),tabContent=spaceContent;this.$tabStrings[\" \"]=\"\u003Cspan class='\"+className+\"'>\"+spaceContent+\"\u003C/span>\",this.$tabStrings[\"\t\"]=\"\u003Cspan class='\"+className+\"'>\"+tabContent+\"\u003C/span>\"}},this.updateLines=function(config,firstRow,lastRow){(this.config.lastRow!=config.lastRow||this.config.firstRow!=config.firstRow)&&this.scrollLines(config),this.config=config;for(var first=Math.max(firstRow,config.firstRow),last=Math.min(lastRow,config.lastRow),lineElements=this.element.childNodes,lineElementsIdx=0,row=config.firstRow;first>row;row++){var foldLine=this.session.getFoldLine(row);if(foldLine){if(foldLine.containsRow(first)){first=foldLine.start.row;break}row=foldLine.end.row}lineElementsIdx++}for(var row=first,foldLine=this.session.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;;){if(row>foldStart&&(row=foldLine.end.row+1,foldLine=this.session.getNextFoldLine(row,foldLine),foldStart=foldLine?foldLine.start.row:1/0),row>last)break;var lineElement=lineElements[lineElementsIdx++];if(lineElement){var html=[];this.$renderLine(html,row,!this.$useLineGroups(),row==foldStart?foldLine:!1),dom.setInnerHtml(lineElement,html.join(\"\"))}row++}},this.scrollLines=function(config){var oldConfig=this.config;if(this.config=config,!oldConfig||oldConfig.lastRow\u003Cconfig.firstRow)return this.update(config);if(config.lastRow\u003ColdConfig.firstRow)return this.update(config);var el=this.element;if(oldConfig.firstRow\u003Cconfig.firstRow)for(var row=this.session.getFoldedRowCount(oldConfig.firstRow,config.firstRow-1);row>0;row--)el.removeChild(el.firstChild);if(oldConfig.lastRow>config.lastRow)for(var row=this.session.getFoldedRowCount(config.lastRow+1,oldConfig.lastRow);row>0;row--)el.removeChild(el.lastChild);if(config.firstRow\u003ColdConfig.firstRow){var fragment=this.$renderLinesFragment(config,config.firstRow,oldConfig.firstRow-1);el.firstChild?el.insertBefore(fragment,el.firstChild):el.appendChild(fragment)}if(config.lastRow>oldConfig.lastRow){var fragment=this.$renderLinesFragment(config,oldConfig.lastRow+1,config.lastRow);el.appendChild(fragment)}},this.$renderLinesFragment=function(config,firstRow,lastRow){for(var fragment=this.element.ownerDocument.createDocumentFragment(),row=firstRow,foldLine=this.session.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;;){if(row>foldStart&&(row=foldLine.end.row+1,foldLine=this.session.getNextFoldLine(row,foldLine),foldStart=foldLine?foldLine.start.row:1/0),row>lastRow)break;var container=dom.createElement(\"div\"),html=[];if(this.$renderLine(html,row,!1,row==foldStart?foldLine:!1),container.innerHTML=html.join(\"\"),this.$useLineGroups())container.className=\"ace_line_group\",fragment.appendChild(container);else for(var lines=container.childNodes;lines.length;)fragment.appendChild(lines[0]);row++}return fragment},this.update=function(config){this.config=config;for(var html=[],firstRow=config.firstRow,lastRow=config.lastRow,row=firstRow,foldLine=this.session.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;;){if(row>foldStart&&(row=foldLine.end.row+1,foldLine=this.session.getNextFoldLine(row,foldLine),foldStart=foldLine?foldLine.start.row:1/0),row>lastRow)break;this.$useLineGroups()&&html.push(\"\u003Cdiv class='ace_line_group'>\"),this.$renderLine(html,row,!1,row==foldStart?foldLine:!1),this.$useLineGroups()&&html.push(\"\u003C/div>\"),row++}this.element=dom.setInnerHtml(this.element,html.join(\"\"))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(stringBuilder,screenColumn,token,value){var self=this,replaceReg=/\\t|&|\u003C|( +)|([\\x00-\\x1f\\x80-\\xa0\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF])|[\\u1100-\\u115F\\u11A3-\\u11A7\\u11FA-\\u11FF\\u2329-\\u232A\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3000-\\u303E\\u3041-\\u3096\\u3099-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u31BA\\u31C0-\\u31E3\\u31F0-\\u321E\\u3220-\\u3247\\u3250-\\u32FE\\u3300-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFAFF\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFF01-\\uFF60\\uFFE0-\\uFFE6]/g,replaceFunc=function(c,a,b,tabIdx){if(a)return self.showInvisibles?\"\u003Cspan class='ace_invisible'>\"+lang.stringRepeat(self.SPACE_CHAR,c.length)+\"\u003C/span>\":lang.stringRepeat(\" \",c.length);if(\"&\"==c)return\"&\";if(\"\u003C\"==c)return\"<\";if(\"\t\"==c){var tabSize=self.session.getScreenTabSize(screenColumn+tabIdx);return screenColumn+=tabSize-1,self.$tabStrings[tabSize]}if(\" \"==c){var classToUse=self.showInvisibles?\"ace_cjk ace_invisible\":\"ace_cjk\",space=self.showInvisibles?self.SPACE_CHAR:\"\";return screenColumn+=1,\"\u003Cspan class='\"+classToUse+\"' style='width:\"+2*self.config.characterWidth+\"px'>\"+space+\"\u003C/span>\"}return b?\"\u003Cspan class='ace_invisible ace_invalid'>\"+self.SPACE_CHAR+\"\u003C/span>\":(screenColumn+=1,\"\u003Cspan class='ace_cjk' style='width:\"+2*self.config.characterWidth+\"px'>\"+c+\"\u003C/span>\")},output=value.replace(replaceReg,replaceFunc);if(this.$textToken[token.type])stringBuilder.push(output);else{var classes=\"ace_\"+token.type.replace(/\\./g,\" ace_\"),style=\"\";\"fold\"==token.type&&(style=\" style='width:\"+token.value.length*this.config.characterWidth+\"px;' \"),stringBuilder.push(\"\u003Cspan class='\",classes,\"'\",style,\">\",output,\"\u003C/span>\")}return screenColumn+value.length},this.renderIndentGuide=function(stringBuilder,value){var cols=value.search(this.$indentGuideRe);return 0>=cols?value:\" \"==value[0]?(cols-=cols%this.tabSize,stringBuilder.push(lang.stringRepeat(this.$tabStrings[\" \"],cols/this.tabSize)),value.substr(cols)):\"\t\"==value[0]?(stringBuilder.push(lang.stringRepeat(this.$tabStrings[\"\t\"],cols)),value.substr(cols)):value},this.$renderWrappedLine=function(stringBuilder,tokens,splits,onlyContents){for(var chars=0,split=0,splitChars=splits[0],screenColumn=0,i=0;tokens.length>i;i++){var token=tokens[i],value=token.value;if(0==i&&this.displayIndentGuides){if(chars=value.length,value=this.renderIndentGuide(stringBuilder,value),!value)continue;chars-=value.length}if(splitChars>chars+value.length)screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value),chars+=value.length;else{for(;chars+value.length>=splitChars;)screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value.substring(0,splitChars-chars)),value=value.substring(splitChars-chars),chars=splitChars,onlyContents||stringBuilder.push(\"\u003C/div>\",\"\u003Cdiv class='ace_line' style='height:\",this.config.lineHeight,\"px'>\"),split++,screenColumn=0,splitChars=splits[split]||Number.MAX_VALUE;0!=value.length&&(chars+=value.length,screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value))}}},this.$renderSimpleLine=function(stringBuilder,tokens){var screenColumn=0,token=tokens[0],value=token.value;this.displayIndentGuides&&(value=this.renderIndentGuide(stringBuilder,value)),value&&(screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value));for(var i=1;tokens.length>i;i++)token=tokens[i],value=token.value,screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value)},this.$renderLine=function(stringBuilder,row,onlyContents,foldLine){if(foldLine||0==foldLine||(foldLine=this.session.getFoldLine(row)),foldLine)var tokens=this.$getFoldLineTokens(row,foldLine);else var tokens=this.session.getTokens(row);if(onlyContents||stringBuilder.push(\"\u003Cdiv class='ace_line' style='height:\",this.config.lineHeight,\"px'>\"),tokens.length){var splits=this.session.getRowSplitData(row);splits&&splits.length?this.$renderWrappedLine(stringBuilder,tokens,splits,onlyContents):this.$renderSimpleLine(stringBuilder,tokens)}this.showInvisibles&&(foldLine&&(row=foldLine.end.row),stringBuilder.push(\"\u003Cspan class='ace_invisible'>\",row==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,\"\u003C/span>\")),onlyContents||stringBuilder.push(\"\u003C/div>\")},this.$getFoldLineTokens=function(row,foldLine){function addTokens(tokens,from,to){for(var idx=0,col=0;from>col+tokens[idx].value.length;)if(col+=tokens[idx].value.length,idx++,idx==tokens.length)return;if(col!=from){var value=tokens[idx].value.substring(from-col);value.length>to-from&&(value=value.substring(0,to-from)),renderTokens.push({type:tokens[idx].type,value:value}),col=from+value.length,idx+=1}for(;to>col&&tokens.length>idx;){var value=tokens[idx].value;value.length+col>to?renderTokens.push({type:tokens[idx].type,value:value.substring(0,to-col)}):renderTokens.push(tokens[idx]),col+=value.length,idx+=1}}var session=this.session,renderTokens=[],tokens=session.getTokens(row);return foldLine.walk(function(placeholder,row,column,lastColumn,isNewRow){null!=placeholder?renderTokens.push({type:\"fold\",value:placeholder}):(isNewRow&&(tokens=session.getTokens(row)),tokens.length&&addTokens(tokens,lastColumn,column))},foldLine.end.row,this.session.getLine(foldLine.end.row).length),renderTokens},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(Text.prototype),exports.Text=Text}),ace.define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"],function(acequire,exports){var dom=acequire(\"../lib/dom\"),Cursor=function(parentEl){this.element=dom.createElement(\"div\"),this.element.className=\"ace_layer ace_cursor-layer\",parentEl.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),dom.addCssClass(this.element,\"ace_hidden-cursors\")};(function(){this.$padding=0,this.setPadding=function(padding){this.$padding=padding},this.setSession=function(session){this.session=session},this.setBlinking=function(blinking){blinking!=this.isBlinking&&(this.isBlinking=blinking,this.restartTimer())},this.setBlinkInterval=function(blinkInterval){blinkInterval!=this.blinkInterval&&(this.blinkInterval=blinkInterval,this.restartTimer())},this.setSmoothBlinking=function(smoothBlinking){smoothBlinking!=this.smoothBlinking&&(this.smoothBlinking=smoothBlinking,smoothBlinking?dom.addCssClass(this.element,\"ace_smooth-blinking\"):dom.removeCssClass(this.element,\"ace_smooth-blinking\"),this.restartTimer())},this.addCursor=function(){var el=dom.createElement(\"div\");return el.className=\"ace_cursor\",this.element.appendChild(el),this.cursors.push(el),el},this.removeCursor=function(){if(this.cursors.length>1){var el=this.cursors.pop();return el.parentNode.removeChild(el),el}},this.hideCursor=function(){this.isVisible=!1,dom.addCssClass(this.element,\"ace_hidden-cursors\"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,dom.removeCssClass(this.element,\"ace_hidden-cursors\"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&dom.removeCssClass(this.element,\"ace_smooth-blinking\");for(var i=this.cursors.length;i--;)this.cursors[i].style.opacity=\"\";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){dom.addCssClass(this.element,\"ace_smooth-blinking\")}.bind(this));var blink=function(){this.timeoutId=setTimeout(function(){for(var i=this.cursors.length;i--;)this.cursors[i].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var i=this.cursors.length;i--;)this.cursors[i].style.opacity=\"\";blink()}.bind(this),this.blinkInterval),blink()}},this.getPixelPosition=function(position,onScreen){if(!this.config||!this.session)return{left:0,top:0};position||(position=this.session.selection.getCursor());var pos=this.session.documentToScreenPosition(position),cursorLeft=this.$padding+pos.column*this.config.characterWidth,cursorTop=(pos.row-(onScreen?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:cursorLeft,top:cursorTop}},this.update=function(config){this.config=config;var selections=this.session.$selectionMarkers,i=0,cursorIndex=0;(void 0===selections||0===selections.length)&&(selections=[{cursor:null}]);for(var i=0,n=selections.length;n>i;i++){var pixelPos=this.getPixelPosition(selections[i].cursor,!0);if(!((pixelPos.top>config.height+config.offset||pixelPos.top\u003C-config.offset)&&i>1)){var style=(this.cursors[cursorIndex++]||this.addCursor()).style;style.left=pixelPos.left+\"px\",style.top=pixelPos.top+\"px\",style.width=config.characterWidth+\"px\",style.height=config.lineHeight+\"px\"}}for(;this.cursors.length>cursorIndex;)this.removeCursor();var overwrite=this.session.getOverwrite();this.$setOverwrite(overwrite),this.$pixelPos=pixelPos,this.restartTimer()},this.$setOverwrite=function(overwrite){overwrite!=this.overwrite&&(this.overwrite=overwrite,overwrite?dom.addCssClass(this.element,\"ace_overwrite-cursors\"):dom.removeCssClass(this.element,\"ace_overwrite-cursors\"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(Cursor.prototype),exports.Cursor=Cursor}),ace.define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"],function(acequire,exports){var oop=acequire(\"./lib/oop\"),dom=acequire(\"./lib/dom\"),event=acequire(\"./lib/event\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,ScrollBar=function(parent){this.element=dom.createElement(\"div\"),this.element.className=\"ace_scrollbar\",this.inner=dom.createElement(\"div\"),this.inner.className=\"ace_scrollbar-inner\",this.element.appendChild(this.inner),parent.appendChild(this.element),this.width=dom.scrollbarWidth(parent.ownerDocument),this.element.style.width=(this.width||15)+5+\"px\",event.addListener(this.element,\"scroll\",this.onScroll.bind(this))};(function(){oop.implement(this,EventEmitter),this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit(\"scroll\",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.setHeight=function(height){this.element.style.height=height+\"px\"},this.setInnerHeight=function(height){this.inner.style.height=height+\"px\"},this.setScrollTop=function(scrollTop){this.scrollTop!=scrollTop&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=scrollTop)}}).call(ScrollBar.prototype),exports.ScrollBar=ScrollBar}),ace.define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"],function(acequire,exports){var event=acequire(\"./lib/event\"),RenderLoop=function(onRender,win){this.onRender=onRender,this.pending=!1,this.changes=0,this.window=win||window};(function(){this.schedule=function(change){if(this.changes=this.changes|change,!this.pending){this.pending=!0;var _self=this;event.nextFrame(function(){_self.pending=!1;for(var changes;changes=_self.changes;)_self.changes=0,_self.onRender(changes)},this.window)}}}).call(RenderLoop.prototype),exports.RenderLoop=RenderLoop}),ace.define(\"ace/multi_select\",[\"require\",\"exports\",\"module\",\"ace/range_list\",\"ace/range\",\"ace/selection\",\"ace/mouse/multi_select_handler\",\"ace/lib/event\",\"ace/lib/lang\",\"ace/commands/multi_select_commands\",\"ace/search\",\"ace/edit_session\",\"ace/editor\"],function(acequire,exports){function find(session,needle,dir){return search.$options.wrap=!0,search.$options.needle=needle,search.$options.backwards=-1==dir,search.find(session)}function isSamePoint(p1,p2){return p1.row==p2.row&&p1.column==p2.column}function MultiSelect(editor){editor.$onAddRange=editor.$onAddRange.bind(editor),editor.$onRemoveRange=editor.$onRemoveRange.bind(editor),editor.$onMultiSelect=editor.$onMultiSelect.bind(editor),editor.$onSingleSelect=editor.$onSingleSelect.bind(editor),exports.onSessionChange.call(editor,editor),editor.on(\"changeSession\",exports.onSessionChange.bind(editor)),editor.on(\"mousedown\",onMouseDown),editor.commands.addCommands(commands.defaultCommands),addAltCursorListeners(editor)}function addAltCursorListeners(editor){function reset(){altCursor&&(contentEl.style.cursor=\"\",altCursor=!1)}var el=editor.textInput.getElement(),altCursor=!1,contentEl=editor.renderer.content;event.addListener(el,\"keydown\",function(e){18!=e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?altCursor&&(contentEl.style.cursor=\"\"):altCursor||(contentEl.style.cursor=\"crosshair\",altCursor=!0)}),event.addListener(el,\"keyup\",reset),event.addListener(el,\"blur\",reset)}var RangeList=acequire(\"./range_list\").RangeList,Range=acequire(\"./range\").Range,Selection=acequire(\"./selection\").Selection,onMouseDown=acequire(\"./mouse/multi_select_handler\").onMouseDown,event=acequire(\"./lib/event\"),lang=acequire(\"./lib/lang\"),commands=acequire(\"./commands/multi_select_commands\");exports.commands=commands.defaultCommands.concat(commands.multiSelectCommands);var Search=acequire(\"./search\").Search,search=new Search,EditSession=acequire(\"./edit_session\").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(EditSession.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(range,$blockChangeEvents){if(range){if(!this.inMultiSelectMode&&0==this.rangeCount){var oldRange=this.toOrientedRange();if(this.rangeList.add(oldRange),this.rangeList.add(range),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),$blockChangeEvents||this.fromOrientedRange(range);this.rangeList.removeAll(),this.rangeList.add(oldRange),this.$onAddRange(oldRange)}range.cursor||(range.cursor=range.end);var removed=this.rangeList.add(range);return this.$onAddRange(range),removed.length&&this.$onRemoveRange(removed),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit(\"multiSelect\"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),$blockChangeEvents||this.fromOrientedRange(range)}},this.toSingleRange=function(range){range=range||this.ranges[0];var removed=this.rangeList.removeAll();removed.length&&this.$onRemoveRange(removed),range&&this.fromOrientedRange(range)},this.substractPoint=function(pos){var removed=this.rangeList.substractPoint(pos);return removed?(this.$onRemoveRange(removed),removed[0]):void 0},this.mergeOverlappingRanges=function(){var removed=this.rangeList.merge();removed.length?this.$onRemoveRange(removed):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(range){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(range),this._emit(\"addRange\",{range:range})},this.$onRemoveRange=function(removed){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var lastRange=this.rangeList.ranges.pop();removed.push(lastRange),this.rangeCount=0}for(var i=removed.length;i--;){var index=this.ranges.indexOf(removed[i]);this.ranges.splice(index,1)}this._emit(\"removeRange\",{ranges:removed}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit(\"singleSelect\"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),lastRange=lastRange||this.ranges[0],lastRange&&!lastRange.isEqual(this.getRange())&&this.fromOrientedRange(lastRange)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new RangeList,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeList.ranges.concat()},this.splitIntoLines=function(){if(this.rangeCount>1){var ranges=this.rangeList.ranges,lastRange=ranges[ranges.length-1],range=Range.fromPoints(ranges[0].start,lastRange.end);this.toSingleRange(),this.setSelectionRange(range,lastRange.cursor==lastRange.start)}else{var range=this.getRange(),isBackwards=this.isBackwards(),startRow=range.start.row,endRow=range.end.row;if(startRow==endRow){if(isBackwards)var start=range.end,end=range.start;else var start=range.start,end=range.end;return this.addRange(Range.fromPoints(end,end)),this.addRange(Range.fromPoints(start,start)),void 0}var rectSel=[],r=this.getLineRange(startRow,!0);r.start.column=range.start.column,rectSel.push(r);for(var i=startRow+1;endRow>i;i++)rectSel.push(this.getLineRange(i,!0));r=this.getLineRange(endRow,!0),r.end.column=range.end.column,rectSel.push(r),rectSel.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var ranges=this.rangeList.ranges,lastRange=ranges[ranges.length-1],range=Range.fromPoints(ranges[0].start,lastRange.end);this.toSingleRange(),this.setSelectionRange(range,lastRange.cursor==lastRange.start)}else{var cursor=this.session.documentToScreenPosition(this.selectionLead),anchor=this.session.documentToScreenPosition(this.selectionAnchor),rectSel=this.rectangularRangeBlock(cursor,anchor);rectSel.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(screenCursor,screenAnchor,includeEmptyLines){var rectSel=[],xBackwards=screenCursor.column\u003CscreenAnchor.column;if(xBackwards)var startColumn=screenCursor.column,endColumn=screenAnchor.column;else var startColumn=screenAnchor.column,endColumn=screenCursor.column;var yBackwards=screenCursor.row\u003CscreenAnchor.row;if(yBackwards)var startRow=screenCursor.row,endRow=screenAnchor.row;else var startRow=screenAnchor.row,endRow=screenCursor.row;0>startColumn&&(startColumn=0),0>startRow&&(startRow=0),startRow==endRow&&(includeEmptyLines=!0);for(var row=startRow;endRow>=row;row++){var range=Range.fromPoints(this.session.screenToDocumentPosition(row,startColumn),this.session.screenToDocumentPosition(row,endColumn));if(range.isEmpty()){if(docEnd&&isSamePoint(range.end,docEnd))break;var docEnd=range.end}range.cursor=xBackwards?range.start:range.end,rectSel.push(range)}if(yBackwards&&rectSel.reverse(),!includeEmptyLines){for(var end=rectSel.length-1;rectSel[end].isEmpty()&&end>0;)end--;if(end>0)for(var start=0;rectSel[start].isEmpty();)start++;for(var i=end;i>=start;i--)rectSel[i].isEmpty()&&rectSel.splice(i,1)}return rectSel}}.call(Selection.prototype);var Editor=acequire(\"./editor\").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(orientedRange){orientedRange.cursor||(orientedRange.cursor=orientedRange.end);var style=this.getSelectionStyle();return orientedRange.marker=this.session.addMarker(orientedRange,\"ace_selection\",style),this.session.$selectionMarkers.push(orientedRange),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,orientedRange},this.removeSelectionMarker=function(range){if(range.marker){this.session.removeMarker(range.marker);var index=this.session.$selectionMarkers.indexOf(range);-1!=index&&this.session.$selectionMarkers.splice(index,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(ranges){for(var markerList=this.session.$selectionMarkers,i=ranges.length;i--;){var range=ranges[i];if(range.marker){this.session.removeMarker(range.marker);var index=markerList.indexOf(range);-1!=index&&markerList.splice(index,1)}}this.session.selectionMarkerCount=markerList.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle(\"ace_multiselect\"),this.keyBinding.addKeyboardHandler(commands.keyboardHandler),this.commands.on(\"exec\",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle(\"ace_multiselect\"),this.keyBinding.removeKeyboardHandler(commands.keyboardHandler),this.commands.removeEventListener(\"exec\",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(e){var command=e.command,editor=e.editor;editor.multiSelect&&(command.multiSelectAction?\"forEach\"==command.multiSelectAction?editor.forEachSelection(command,e.args):\"forEachLine\"==command.multiSelectAction?editor.forEachSelection(command,e.args,!0):\"single\"==command.multiSelectAction?(editor.exitMultiSelectMode(),command.exec(editor,e.args||{})):command.multiSelectAction(editor,e.args||{}):(command.exec(editor,e.args||{}),editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()),editor.multiSelect.mergeOverlappingRanges()),e.preventDefault())},this.forEachSelection=function(cmd,args,$byLines){if(!this.inVirtualSelectionMode){var session=this.session,selection=this.selection,rangeList=selection.rangeList,reg=selection._eventRegistry;selection._eventRegistry={};var tmpSel=new Selection(session);this.inVirtualSelectionMode=!0;for(var i=rangeList.ranges.length;i--;){if($byLines)for(;i>0&&rangeList.ranges[i].start.row==rangeList.ranges[i-1].end.row;)i--;tmpSel.fromOrientedRange(rangeList.ranges[i]),this.selection=session.selection=tmpSel,cmd.exec(this,args||{}),tmpSel.toOrientedRange(rangeList.ranges[i])}tmpSel.detach(),this.selection=session.selection=selection,this.inVirtualSelectionMode=!1,selection._eventRegistry=reg,selection.mergeOverlappingRanges(),this.onCursorChange(),this.onSelectionChange()}},this.exitMultiSelectMode=function(){this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getCopyText=function(){var text=\"\";if(this.inMultiSelectMode){var ranges=this.multiSelect.rangeList.ranges;text=[];for(var i=0;ranges.length>i;i++)text.push(this.session.getTextRange(ranges[i]));text=text.join(this.session.getDocument().getNewLineCharacter())}else this.selection.isEmpty()||(text=this.session.getTextRange(this.getSelectionRange()));return text},this.onPaste=function(text){if(!this.$readOnly){if(this._signal(\"paste\",text),!this.inMultiSelectMode||this.inVirtualSelectionMode)return this.insert(text);var lines=text.split(/\\r\\n|\\r|\\n/),ranges=this.selection.rangeList.ranges;if(lines.length>ranges.length||2>=lines.length||!lines[1])return this.commands.exec(\"insertstring\",this,text);for(var i=ranges.length;i--;){var range=ranges[i];range.isEmpty()||this.session.remove(range),this.session.insert(range.start,lines[i])}}},this.findAll=function(needle,options,additive){options=options||{},options.needle=needle||options.needle,this.$search.set(options);var ranges=this.$search.findAll(this.session);if(!ranges.length)return 0;this.$blockScrolling+=1;var selection=this.multiSelect;additive||selection.toSingleRange(ranges[0]);for(var i=ranges.length;i--;)selection.addRange(ranges[i],!0);return this.$blockScrolling-=1,ranges.length},this.selectMoreLines=function(dir,skip){var range=this.selection.toOrientedRange(),isBackwards=range.cursor==range.end,screenLead=this.session.documentToScreenPosition(range.cursor);this.selection.$desiredColumn&&(screenLead.column=this.selection.$desiredColumn);var lead=this.session.screenToDocumentPosition(screenLead.row+dir,screenLead.column);if(range.isEmpty())var anchor=lead;else var screenAnchor=this.session.documentToScreenPosition(isBackwards?range.end:range.start),anchor=this.session.screenToDocumentPosition(screenAnchor.row+dir,screenAnchor.column);if(isBackwards){var newRange=Range.fromPoints(lead,anchor);newRange.cursor=newRange.start}else{var newRange=Range.fromPoints(anchor,lead);newRange.cursor=newRange.end\n}if(newRange.desiredColumn=screenLead.column,this.selection.inMultiSelectMode){if(skip)var toRemove=range.cursor}else this.selection.addRange(range);this.selection.addRange(newRange),toRemove&&this.selection.substractPoint(toRemove)},this.transposeSelections=function(dir){for(var session=this.session,sel=session.multiSelect,all=sel.ranges,i=all.length;i--;){var range=all[i];if(range.isEmpty()){var tmp=session.getWordRange(range.start.row,range.start.column);range.start.row=tmp.start.row,range.start.column=tmp.start.column,range.end.row=tmp.end.row,range.end.column=tmp.end.column}}sel.mergeOverlappingRanges();for(var words=[],i=all.length;i--;){var range=all[i];words.unshift(session.getTextRange(range))}0>dir?words.unshift(words.pop()):words.push(words.shift());for(var i=all.length;i--;){var range=all[i],tmp=range.clone();session.replace(range,words[i]),range.start.row=tmp.start.row,range.start.column=tmp.start.column}},this.selectMore=function(dir,skip){var session=this.session,sel=session.multiSelect,range=sel.toOrientedRange();if(range.isEmpty()){var range=session.getWordRange(range.start.row,range.start.column);range.cursor=range.end,this.multiSelect.addRange(range)}var needle=session.getTextRange(range),newRange=find(session,needle,dir);newRange&&(newRange.cursor=-1==dir?newRange.start:newRange.end,this.multiSelect.addRange(newRange)),skip&&this.multiSelect.substractPoint(range.cursor)},this.alignCursors=function(){var session=this.session,sel=session.multiSelect,ranges=sel.ranges;if(ranges.length){var row=-1,sameRowRanges=ranges.filter(function(r){return r.cursor.row==row?!0:(row=r.cursor.row,void 0)});sel.$onRemoveRange(sameRowRanges);var maxCol=0,minSpace=1/0,spaceOffsets=ranges.map(function(r){var p=r.cursor,line=session.getLine(p.row),spaceOffset=line.substr(p.column).search(/\\S/g);return-1==spaceOffset&&(spaceOffset=0),p.column>maxCol&&(maxCol=p.column),minSpace>spaceOffset&&(minSpace=spaceOffset),spaceOffset});ranges.forEach(function(r,i){var p=r.cursor,l=maxCol-p.column,d=spaceOffsets[i]-minSpace;l>d?session.insert(p,lang.stringRepeat(\" \",l-d)):session.remove(new Range(p.row,p.column,p.row,p.column-l+d)),r.start.column=r.end.column=maxCol,r.start.row=r.end.row=p.row,r.cursor=r.end}),sel.fromOrientedRange(ranges[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var range=this.selection.getRange(),fr=range.start.row,lr=range.end.row,lines=this.session.doc.removeLines(fr,lr);lines=this.$reAlignText(lines),this.session.doc.insertLines(fr,lines),range.start.column=0,range.end.column=lines[lines.length-1].length,this.selection.setRange(range)}},this.$reAlignText=function(lines){function spaces(n){return lang.stringRepeat(\" \",n)}function alignLeft(m){return m[2]?spaces(startW)+m[2]+spaces(textW-m[2].length+endW)+m[4].replace(/^([=:])\\s+/,\"$1 \"):m[0]}function alignRight(m){return m[2]?spaces(startW+textW-m[2].length)+m[2]+spaces(endW,\" \")+m[4].replace(/^([=:])\\s+/,\"$1 \"):m[0]}function unAlign(m){return m[2]?spaces(startW)+m[2]+spaces(endW)+m[4].replace(/^([=:])\\s+/,\"$1 \"):m[0]}var startW,textW,endW,isLeftAligned=!0,isRightAligned=!0;return lines.map(function(line){var m=line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);return m?null==startW?(startW=m[1].length,textW=m[2].length,endW=m[3].length,m):(startW+textW+endW!=m[1].length+m[2].length+m[3].length&&(isRightAligned=!1),startW!=m[1].length&&(isLeftAligned=!1),startW>m[1].length&&(startW=m[1].length),m[2].length>textW&&(textW=m[2].length),endW>m[3].length&&(endW=m[3].length),m):[line]}).map(isLeftAligned?isRightAligned?alignRight:alignLeft:unAlign)}}).call(Editor.prototype),exports.onSessionChange=function(e){var session=e.session;session.multiSelect||(session.$selectionMarkers=[],session.selection.$initRangeList(),session.multiSelect=session.selection),this.multiSelect=session.multiSelect;var oldSession=e.oldSession;oldSession&&(oldSession.multiSelect.removeEventListener(\"addRange\",this.$onAddRange),oldSession.multiSelect.removeEventListener(\"removeRange\",this.$onRemoveRange),oldSession.multiSelect.removeEventListener(\"multiSelect\",this.$onMultiSelect),oldSession.multiSelect.removeEventListener(\"singleSelect\",this.$onSingleSelect)),session.multiSelect.on(\"addRange\",this.$onAddRange),session.multiSelect.on(\"removeRange\",this.$onRemoveRange),session.multiSelect.on(\"multiSelect\",this.$onMultiSelect),session.multiSelect.on(\"singleSelect\",this.$onSingleSelect),this.inMultiSelectMode!=session.selection.inMultiSelectMode&&(session.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},exports.MultiSelect=MultiSelect}),ace.define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"],function(acequire,exports){function isSamePoint(p1,p2){return p1.row==p2.row&&p1.column==p2.column}function onMouseDown(e){var ev=e.domEvent,alt=ev.altKey,shift=ev.shiftKey,ctrl=e.getAccelKey(),button=e.getButton();if(e.editor.inMultiSelectMode&&2==button)return e.editor.textInput.onContextMenu(e.domEvent),void 0;if(!ctrl&&!alt)return 0==button&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode(),void 0;var editor=e.editor,selection=editor.selection,isMultiSelect=editor.inMultiSelectMode,pos=e.getDocumentPosition(),cursor=selection.getCursor(),inSelection=e.inSelection()||selection.isEmpty()&&isSamePoint(pos,cursor),mouseX=e.x,mouseY=e.y,onMouseSelection=function(e){mouseX=e.clientX,mouseY=e.clientY},blockSelect=function(){var newCursor=editor.renderer.pixelToScreenCoordinates(mouseX,mouseY),cursor=session.screenToDocumentPosition(newCursor.row,newCursor.column);isSamePoint(screenCursor,newCursor)&&isSamePoint(cursor,selection.selectionLead)||(screenCursor=newCursor,editor.selection.moveCursorToPosition(cursor),editor.selection.clearSelection(),editor.renderer.scrollCursorIntoView(),editor.removeSelectionMarkers(rectSel),rectSel=selection.rectangularRangeBlock(screenCursor,screenAnchor),rectSel.forEach(editor.addSelectionMarker,editor),editor.updateSelectionMarkers())},session=editor.session,screenAnchor=editor.renderer.pixelToScreenCoordinates(mouseX,mouseY),screenCursor=screenAnchor;if(!ctrl||shift||alt||0!=button){if(alt&&0==button){e.stop(),isMultiSelect&&!ctrl?selection.toSingleRange():!isMultiSelect&&ctrl&&selection.addRange();var rectSel=[];shift?(screenAnchor=session.documentToScreenPosition(selection.lead),blockSelect()):(selection.moveCursorToPosition(pos),selection.clearSelection());var onMouseSelectionEnd=function(){clearInterval(timerId),editor.removeSelectionMarkers(rectSel);for(var i=0;rectSel.length>i;i++)selection.addRange(rectSel[i])},onSelectionInterval=blockSelect;event.capture(editor.container,onMouseSelection,onMouseSelectionEnd);var timerId=setInterval(function(){onSelectionInterval()},20);return e.preventDefault()}}else{if(!isMultiSelect&&inSelection)return;if(!isMultiSelect){var range=selection.toOrientedRange();editor.addSelectionMarker(range)}var oldRange=selection.rangeList.rangeAtPoint(pos);editor.once(\"mouseup\",function(){var tmpSel=selection.toOrientedRange();oldRange&&tmpSel.isEmpty()&&isSamePoint(oldRange.cursor,tmpSel.cursor)?selection.substractPoint(tmpSel.cursor):(range&&(editor.removeSelectionMarker(range),selection.addRange(range)),selection.addRange(tmpSel))})}}var event=acequire(\"../lib/event\");exports.onMouseDown=onMouseDown}),ace.define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"],function(acequire,exports){exports.defaultCommands=[{name:\"addCursorAbove\",exec:function(editor){editor.selectMoreLines(-1)},bindKey:{win:\"Ctrl-Alt-Up\",mac:\"Ctrl-Alt-Up\"},readonly:!0},{name:\"addCursorBelow\",exec:function(editor){editor.selectMoreLines(1)},bindKey:{win:\"Ctrl-Alt-Down\",mac:\"Ctrl-Alt-Down\"},readonly:!0},{name:\"addCursorAboveSkipCurrent\",exec:function(editor){editor.selectMoreLines(-1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Up\",mac:\"Ctrl-Alt-Shift-Up\"},readonly:!0},{name:\"addCursorBelowSkipCurrent\",exec:function(editor){editor.selectMoreLines(1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Down\",mac:\"Ctrl-Alt-Shift-Down\"},readonly:!0},{name:\"selectMoreBefore\",exec:function(editor){editor.selectMore(-1)},bindKey:{win:\"Ctrl-Alt-Left\",mac:\"Ctrl-Alt-Left\"},readonly:!0},{name:\"selectMoreAfter\",exec:function(editor){editor.selectMore(1)},bindKey:{win:\"Ctrl-Alt-Right\",mac:\"Ctrl-Alt-Right\"},readonly:!0},{name:\"selectNextBefore\",exec:function(editor){editor.selectMore(-1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Left\",mac:\"Ctrl-Alt-Shift-Left\"},readonly:!0},{name:\"selectNextAfter\",exec:function(editor){editor.selectMore(1,!0)},bindKey:{win:\"Ctrl-Alt-Shift-Right\",mac:\"Ctrl-Alt-Shift-Right\"},readonly:!0},{name:\"splitIntoLines\",exec:function(editor){editor.multiSelect.splitIntoLines()},bindKey:{win:\"Ctrl-Alt-L\",mac:\"Ctrl-Alt-L\"},readonly:!0},{name:\"alignCursors\",exec:function(editor){editor.alignCursors()},bindKey:{win:\"Ctrl-Alt-A\",mac:\"Ctrl-Alt-A\"}}],exports.multiSelectCommands=[{name:\"singleSelection\",bindKey:\"esc\",exec:function(editor){editor.exitMultiSelectMode()},readonly:!0,isAvailable:function(editor){return editor&&editor.inMultiSelectMode}}];var HashHandler=acequire(\"../keyboard/hash_handler\").HashHandler;exports.keyboardHandler=new HashHandler(exports.multiSelectCommands)}),ace.define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/config\"],function(acequire,exports){var oop=acequire(\"../lib/oop\"),EventEmitter=acequire(\"../lib/event_emitter\").EventEmitter,config=acequire(\"../config\"),WorkerClient=function(topLevelNamespaces,mod,classname){this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this);var workerUrl;if(config.get(\"packaged\"))workerUrl=config.moduleUrl(mod.id,\"worker\");else{var normalizePath=this.$normalizePath;acequire.nameToUrl&&!acequire.toUrl&&(acequire.toUrl=acequire.nameToUrl),workerUrl=normalizePath(acequire.toUrl(\"ace/worker/worker.js\",null,\"_\"));var tlns={};topLevelNamespaces.forEach(function(ns){tlns[ns]=normalizePath(acequire.toUrl(ns,null,\"_\").replace(/(\\.js)?(\\?.*)?$/,\"\"))})}var workerSrc=mod.src,Blob=require(\"w3c-blob\"),blob=new Blob([workerSrc],{type:\"application/javascript\"}),blobUrl=(window.URL||window.webkitURL).createObjectURL(blob);this.$worker=new Worker(blobUrl),this.$worker.postMessage({init:!0,tlns:tlns,module:mod.id,classname:classname}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};(function(){oop.implement(this,EventEmitter),this.onError=function(e){throw window.console&&console.log&&console.log(e),e},this.onMessage=function(e){var msg=e.data;switch(msg.type){case\"log\":window.console&&console.log&&console.log.apply(console,msg.data);break;case\"event\":this._emit(msg.name,{data:msg.data});break;case\"call\":var callback=this.callbacks[msg.id];callback&&(callback(msg.data),delete this.callbacks[msg.id])}},this.$normalizePath=function(path){return location.host?(path=path.replace(/^[a-z]+:\\/\\/[^\\/]+/,\"\"),path=location.protocol+\"//\"+location.host+(\"/\"==path.charAt(0)?\"\":location.pathname.replace(/\\/[^\\/]*$/,\"\"))+\"/\"+path.replace(/^[\\/]+/,\"\")):path},this.terminate=function(){this._emit(\"terminate\",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener(\"change\",this.changeListener),this.$doc=null},this.send=function(cmd,args){this.$worker.postMessage({command:cmd,args:args})},this.call=function(cmd,args,callback){if(callback){var id=this.callbackId++;this.callbacks[id]=callback,args.push(id)}this.send(cmd,args)},this.emit=function(event,data){try{this.$worker.postMessage({event:event,data:{data:data.data}})}catch(ex){}},this.attachToDocument=function(doc){this.$doc&&this.terminate(),this.$doc=doc,this.call(\"setValue\",[doc.getValue()]),doc.on(\"change\",this.changeListener)},this.changeListener=function(e){e.range={start:e.data.range.start,end:e.data.range.end},this.emit(\"change\",e)}}).call(WorkerClient.prototype);var UIWorkerClient=function(topLevelNamespaces,mod,classname){this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var main=null,sender=Object.create(EventEmitter),_self=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){_self.messageBuffer.push(e),main&&setTimeout(processNext)};var processNext=function(){var msg=_self.messageBuffer.shift();msg.command?main[msg.command].apply(main,msg.args):msg.event&&sender._emit(msg.event,msg.data)};sender.postMessage=function(msg){_self.onMessage({data:msg})},sender.callback=function(data,callbackId){this.postMessage({type:\"call\",id:callbackId,data:data})},sender.emit=function(name,data){this.postMessage({type:\"event\",name:name,data:data})},config.loadModule([\"worker\",mod],function(Main){for(main=new Main[classname](sender);_self.messageBuffer.length;)processNext()})};UIWorkerClient.prototype=WorkerClient.prototype,exports.UIWorkerClient=UIWorkerClient,exports.WorkerClient=WorkerClient}),ace.define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"],function(acequire,exports){var Range=acequire(\"./range\").Range,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,oop=acequire(\"./lib/oop\"),PlaceHolder=function(session,length,pos,others,mainClass,othersClass){var _self=this;this.length=length,this.session=session,this.doc=session.getDocument(),this.mainClass=mainClass,this.othersClass=othersClass,this.$onUpdate=this.onUpdate.bind(this),this.doc.on(\"change\",this.$onUpdate),this.$others=others,this.$onCursorChange=function(){setTimeout(function(){_self.onCursorChange()})},this.$pos=pos;var undoStack=session.getUndoManager().$undoStack||session.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=undoStack.length,this.setup(),session.selection.on(\"changeCursor\",this.$onCursorChange)};(function(){oop.implement(this,EventEmitter),this.setup=function(){var _self=this,doc=this.doc,session=this.session,pos=this.$pos;this.pos=doc.createAnchor(pos.row,pos.column),this.markerId=session.addMarker(new Range(pos.row,pos.column,pos.row,pos.column+this.length),this.mainClass,null,!1),this.pos.on(\"change\",function(event){session.removeMarker(_self.markerId),_self.markerId=session.addMarker(new Range(event.value.row,event.value.column,event.value.row,event.value.column+_self.length),_self.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(other){var anchor=doc.createAnchor(other.row,other.column);_self.others.push(anchor)}),session.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var session=this.session,_self=this;this.othersActive=!0,this.others.forEach(function(anchor){anchor.markerId=session.addMarker(new Range(anchor.row,anchor.column,anchor.row,anchor.column+_self.length),_self.othersClass,null,!1),anchor.on(\"change\",function(event){session.removeMarker(anchor.markerId),anchor.markerId=session.addMarker(new Range(event.value.row,event.value.column,event.value.row,event.value.column+_self.length),_self.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;this.others.length>i;i++)this.session.removeMarker(this.others[i].markerId)}},this.onUpdate=function(event){var delta=event.data,range=delta.range;if(range.start.row===range.end.row&&range.start.row===this.pos.row&&!this.$updating){this.$updating=!0;var lengthDiff=\"insertText\"===delta.action?range.end.column-range.start.column:range.start.column-range.end.column;if(range.start.column>=this.pos.column&&range.start.column\u003C=this.pos.column+this.length+1){var distanceFromStart=range.start.column-this.pos.column;if(this.length+=lengthDiff,!this.session.$fromUndo){if(\"insertText\"===delta.action)for(var i=this.others.length-1;i>=0;i--){var otherPos=this.others[i],newPos={row:otherPos.row,column:otherPos.column+distanceFromStart};otherPos.row===range.start.row&&range.start.column\u003CotherPos.column&&(newPos.column+=lengthDiff),this.doc.insert(newPos,delta.text)}else if(\"removeText\"===delta.action)for(var i=this.others.length-1;i>=0;i--){var otherPos=this.others[i],newPos={row:otherPos.row,column:otherPos.column+distanceFromStart};otherPos.row===range.start.row&&range.start.column\u003CotherPos.column&&(newPos.column+=lengthDiff),this.doc.remove(new Range(newPos.row,newPos.column,newPos.row,newPos.column-lengthDiff))}range.start.column===this.pos.column&&\"insertText\"===delta.action?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-lengthDiff);for(var i=0;this.others.length>i;i++){var other=this.others[i],newPos={row:other.row,column:other.column-lengthDiff};other.row===range.start.row&&range.start.column\u003Cother.column&&(newPos.column+=lengthDiff),other.setPosition(newPos.row,newPos.column)}}.bind(this),0):range.start.column===this.pos.column&&\"removeText\"===delta.action&&setTimeout(function(){for(var i=0;this.others.length>i;i++){var other=this.others[i];other.row===range.start.row&&range.start.column\u003Cother.column&&other.setPosition(other.row,other.column-lengthDiff)}}.bind(this),0)}this.pos._emit(\"change\",{value:this.pos});for(var i=0;this.others.length>i;i++)this.others[i]._emit(\"change\",{value:this.others[i]})}this.$updating=!1}},this.onCursorChange=function(event){if(!this.$updating){var pos=this.session.selection.getCursor();pos.row===this.pos.row&&pos.column>=this.pos.column&&pos.column\u003C=this.pos.column+this.length?(this.showOtherMarkers(),this._emit(\"cursorEnter\",event)):(this.hideOtherMarkers(),this._emit(\"cursorLeave\",event))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener(\"change\",this.$onUpdate),this.session.selection.removeEventListener(\"changeCursor\",this.$onCursorChange),this.pos.detach();for(var i=0;this.others.length>i;i++)this.others[i].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(-1===this.$undoStackDepth)throw Error(\"Canceling placeholders only supported with undo manager attached to session.\");for(var undoManager=this.session.getUndoManager(),undosRequired=(undoManager.$undoStack||undoManager.$undostack).length-this.$undoStackDepth,i=0;undosRequired>i;i++)undoManager.undo(!0)}}).call(PlaceHolder.prototype),exports.PlaceHolder=PlaceHolder}),ace.define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"],function(acequire,exports){var Range=acequire(\"../../range\").Range,FoldMode=exports.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(session,foldStyle,row){var line=session.getLine(row);return this.foldingStartMarker.test(line)?\"start\":\"markbeginend\"==foldStyle&&this.foldingStopMarker&&this.foldingStopMarker.test(line)?\"end\":\"\"},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(session,row,column){var re=/\\S/,line=session.getLine(row),startLevel=line.search(re);if(-1!=startLevel){for(var startColumn=column||line.length,maxRow=session.getLength(),startRow=row,endRow=row;maxRow>++row;){var level=session.getLine(row).search(re);if(-1!=level){if(startLevel>=level)break;endRow=row}}if(endRow>startRow){var endColumn=session.getLine(endRow).length;return new Range(startRow,startColumn,endRow,endColumn)}}},this.openingBracketBlock=function(session,bracket,row,column,typeRe){var start={row:row,column:column+1},end=session.$findClosingBracket(bracket,start,typeRe);if(end){var fw=session.foldWidgets[end.row];return null==fw&&(fw=this.getFoldWidget(session,end.row)),\"start\"==fw&&end.row>start.row&&(end.row--,end.column=session.getLine(end.row).length),Range.fromPoints(start,end)}},this.closingBracketBlock=function(session,bracket,row,column){var end={row:row,column:column},start=session.$findOpeningBracket(bracket,end);return start?(start.column++,end.column--,Range.fromPoints(start,end)):void 0}}).call(FoldMode.prototype)}),ace.define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"],function(acequire,exports){exports.isDark=!1,exports.cssClass=\"ace-tm\",exports.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm .ace_scroller {background-color: #FFFFFF;}.ace-tm .ace_cursor {border-left: 2px solid black;}.ace-tm .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;}';var dom=acequire(\"../lib/dom\");dom.importCssString(exports.cssText,exports.cssClass)}),function(){ace.acequire([\"ace/ace\"],function(a){a&&a.config.init(),window.ace||(window.ace={});for(var key in a)a.hasOwnProperty(key)&&(ace[key]=a[key])})}(),module.exports=window.ace.acequire(\"ace/ace\")})()},{\"w3c-blob\":30}],31:[function(require,module,exports){var Object_keys=function(obj){if(Object.keys)return Object.keys(obj);var res=[];for(var key in obj)res.push(key);return res},forEach=function(xs,fn){if(xs.forEach)return xs.forEach(fn);for(var i=0;xs.length>i;i++)fn(xs[i],i,xs)},Script=exports.Script=function NodeScript(code){return this instanceof Script?(this.code=code,void 0):new Script(code)};Script.prototype.runInNewContext=function(context){context||(context={});var iframe=document.createElement(\"iframe\");iframe.style||(iframe.style={}),iframe.style.display=\"none\",document.body.appendChild(iframe);var win=iframe.contentWindow;forEach(Object_keys(context),function(key){win[key]=context[key]}),!win.eval&&win.execScript&&win.execScript(\"null\");var res=win.eval(this.code);return forEach(Object_keys(win),function(key){context[key]=win[key]}),document.body.removeChild(iframe),res},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInContext=function(context){return this.runInNewContext(context)},forEach(Object_keys(Script.prototype),function(name){exports[name]=Script[name]=function(code){var s=Script(code);return s[name].apply(s,[].slice.call(arguments,1))}}),exports.createScript=function(code){return exports.Script(code)},exports.createContext=Script.createContext=function(context){var copy={};return\"object\"==typeof context&&forEach(Object_keys(context),function(key){copy[key]=context[key]}),copy}},{}],24:[function(require,module){\"use strict\";function Terminal(opts){if(opts=opts||{},!(this instanceof Terminal))return new Terminal(opts);this.cols=opts.cols||500,this.rows=opts.rows||500,this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol=!1,this.state=states.normal,this.queue=\"\",this.scrollTop=0,this.scrollBottom=this.rows-1,this.applicationKeypad=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!1,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix=\"\",this.postfix=\"\",this.lines=[];for(var i=this.rows;i--;)this.lines.push(this.blankLine());this.tabs,this.setupStops()}var states=require(\"./lib/states\");module.exports=Terminal,require(\"./lib/colors\")(Terminal),require(\"./lib/options\")(Terminal),require(\"./lib/open\")(Terminal),require(\"./lib/destroy\")(Terminal),require(\"./lib/refresh\")(Terminal),require(\"./lib/write\")(Terminal),require(\"./lib/setgLevel\"),require(\"./lib/setgCharset\"),require(\"./lib/debug\")(Terminal),require(\"./lib/stops\")(Terminal),require(\"./lib/erase\")(Terminal),require(\"./lib/blankLine\")(Terminal),require(\"./lib/range\")(Terminal),require(\"./lib/util\")(Terminal),require(\"./lib/esc/index.js\")(Terminal),require(\"./lib/esc/reset.js\")(Terminal),require(\"./lib/esc/tabSet.js\")(Terminal),require(\"./lib/csi/charAttributes\")(Terminal),require(\"./lib/csi/insert-delete\")(Terminal),require(\"./lib/csi/position\")(Terminal),require(\"./lib/csi/cursor\")(Terminal),require(\"./lib/csi/repeatPrecedingCharacter\")(Terminal),require(\"./lib/csi/tabClear\")(Terminal),require(\"./lib/csi/softReset\")(Terminal),require(\"./lib/charsets.js\")(Terminal)},{\"./lib/esc/index.js\":32,\"./lib/esc/reset.js\":33,\"./lib/esc/tabSet.js\":34,\"./lib/charsets.js\":35,\"./lib/states\":36,\"./lib/colors\":37,\"./lib/options\":38,\"./lib/open\":39,\"./lib/destroy\":40,\"./lib/refresh\":41,\"./lib/write\":42,\"./lib/setgLevel\":43,\"./lib/setgCharset\":44,\"./lib/debug\":45,\"./lib/stops\":46,\"./lib/erase\":47,\"./lib/blankLine\":48,\"./lib/range\":49,\"./lib/util\":50,\"./lib/csi/charAttributes\":51,\"./lib/csi/insert-delete\":52,\"./lib/csi/position\":53,\"./lib/csi/cursor\":54,\"./lib/csi/repeatPrecedingCharacter\":55,\"./lib/csi/tabClear\":56,\"./lib/csi/softReset\":57}],25:[function(require,module,exports){(function(process){function through(write,end){function drain(){for(;buffer.length&&!stream.paused;){var data=buffer.shift();if(null===data)return stream.emit(\"end\");stream.emit(\"data\",data)}}function _end(){stream.writable=!1,end.call(stream),stream.readable||stream.destroy()}write=write||function(data){this.queue(data)},end=end||function(){this.queue(null)};var ended=!1,destroyed=!1,buffer=[],stream=new Stream;return stream.readable=stream.writable=!0,stream.paused=!1,stream.write=function(data){return write.call(this,data),!stream.paused},stream.queue=stream.push=function(data){return buffer.push(data),drain(),stream},stream.on(\"end\",function(){stream.readable=!1,stream.writable||process.nextTick(function(){stream.destroy()})}),stream.end=function(data){return ended?void 0:(ended=!0,arguments.length&&stream.write(data),_end(),stream)},stream.destroy=function(){return destroyed?void 0:(destroyed=!0,ended=!0,buffer.length=0,stream.writable=stream.readable=!1,stream.emit(\"close\"),stream)},stream.pause=function(){return stream.paused?void 0:(stream.paused=!0,stream.emit(\"pause\"),stream)},stream.resume=function(){return stream.paused&&(stream.paused=!1),drain(),stream.paused||stream.emit(\"drain\"),stream},stream}var Stream=require(\"stream\");exports=module.exports=through,through.through=through})(require(\"__browserify_process\"))},{stream:58,__browserify_process:16}],30:[function(require,module){(function(global){function get_blob(){if(global.Blob)try{return new Blob([\"asdf\"],{type:\"text/plain\"}),Blob}catch(err){}var Builder=global.BlobBuilder;return\"function\"!=typeof Builder&&(Builder=global.WebKitBlobBuilder||global.MozBlobBuilder||global.MSBlobBuilder),function(parts,bag){var builder=new Builder,endings=bag.endings,type=bag.type;if(endings)for(var i=0,len=parts.length;len>i;++i)builder.append(parts[i],endings);else for(var i=0,len=parts.length;len>i;++i)builder.append(parts[i]);return type?builder.getBlob(type):builder.getBlob()}}module.exports=get_blob()})(window)},{}],33:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.reset=function(){Terminal.call(this,this.cols,this.rows),this.refresh(0,this.rows-1)}}},{}],35:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.charsets={},Terminal.charsets.SCLD={\"`\":\"◆\",a:\"▒\",b:\"\t\",c:\"\\f\",d:\"\\r\",e:\"\\n\",f:\"°\",g:\"±\",h:\"␤\",i:\"\u000b\",j:\"┘\",k:\"┐\",l:\"┌\",m:\"└\",n:\"┼\",o:\"⎺\",p:\"⎻\",q:\"─\",r:\"⎼\",s:\"⎽\",t:\"├\",u:\"┤\",v:\"┴\",w:\"┬\",x:\"│\",y:\"≤\",z:\"≥\",\"{\":\"π\",\"|\":\"≠\",\"}\":\"£\",\"~\":\"·\"},Terminal.charsets.UK=null,Terminal.charsets.US=null,Terminal.charsets.Dutch=null,Terminal.charsets.Finnish=null,Terminal.charsets.French=null,Terminal.charsets.FrenchCanadian=null,Terminal.charsets.German=null,Terminal.charsets.Italian=null,Terminal.charsets.NorwegianDanish=null,Terminal.charsets.Spanish=null,Terminal.charsets.Swedish=null,Terminal.charsets.Swiss=null,Terminal.charsets.ISOLatin=null}},{}],36:[function(require,module){\"use strict\";module.exports={normal:0,escaped:1,csi:2,osc:3,charset:4,dcs:5,ignore:6}},{}],37:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.colors=[\"#2e3436\",\"#cc0000\",\"#4e9a06\",\"#c4a000\",\"#3465a4\",\"#75507b\",\"#06989a\",\"#d3d7cf\",\"#555753\",\"#ef2929\",\"#8ae234\",\"#fce94f\",\"#729fcf\",\"#ad7fa8\",\"#34e2e2\",\"#eeeeec\"],Terminal.colors=function(){function out(r,g,b){colors.push(\"#\"+hex(r)+hex(g)+hex(b))}function hex(c){return c=c.toString(16),2>c.length?\"0\"+c:c}var i,colors=Terminal.colors,r=[0,95,135,175,215,255];for(i=0;216>i;i++)out(r[0|i/36%6],r[0|i/6%6],r[i%6]);for(i=0;24>i;i++)r=8+10*i,out(r,r,r);return colors}(),Terminal.defaultColors={bg:\"#000000\",fg:\"#f0f0f0\"},Terminal.colors[256]=Terminal.defaultColors.bg,Terminal.colors[257]=Terminal.defaultColors.fg}},{}],38:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.termName=\"xterm\",Terminal.geometry=[80,24],Terminal.cursorBlink=!0,Terminal.visualBell=!1,Terminal.popOnBell=!1,Terminal.scrollback=1e3,Terminal.screenKeys=!1,Terminal.programFeatures=!1,Terminal.debug=!1}},{}],39:[function(require,module){\"use strict\";function isBoldBroken(){var el=document.createElement(\"span\");el.innerHTML=\"hello world\",document.body.appendChild(el);var w1=el.scrollWidth;el.style.fontWeight=\"bold\";var w2=el.scrollWidth;return document.body.removeChild(el),w1!==w2}module.exports=function(Terminal){Terminal.prototype.open=function(){var div,i=0;for(this.element=document.createElement(\"div\"),this.element.className=\"terminal\",this.children=[];this.rows>i;i++)div=document.createElement(\"div\"),this.element.appendChild(div),this.children.push(div);this.refresh(0,this.rows-1),null===Terminal.brokenBold&&(Terminal.brokenBold=isBoldBroken()),this.element.style.backgroundColor=Terminal.defaultColors.bg,this.element.style.color=Terminal.defaultColors.fg}}},{}],40:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){}}}},{}],41:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.refresh=function(start,end){var x,y,i,line,out,ch,width,data,attr,fgColor,bgColor,flags,row,parent;\nfor(width=this.cols,y=start;end>=y;y++){if(row=y+this.ydisp,line=this.lines[row],!line)return this.reset();for(out=\"\",x=y===this.y&&this.cursorState&&this.ydisp===this.ybase&&!this.cursorHidden?this.x:-1,attr=this.defAttr,i=0;width>i;i++){switch(data=line[i][0],ch=line[i][1],i===x&&(data=-1),data!==attr&&(attr!==this.defAttr&&(out+=\"\u003C/span>\"),data!==this.defAttr&&(-1===data?out+='\u003Cspan class=\"reverse-video\">':(out+='\u003Cspan style=\"',bgColor=511&data,fgColor=511&data>>9,flags=data>>18,1&flags&&(Terminal.brokenBold||(out+=\"font-weight:bold;\"),8>fgColor&&(fgColor+=8)),2&flags&&(out+=\"text-decoration:underline;\"),256!==bgColor&&(out+=\"background-color:\"+Terminal.colors[bgColor]+\";\"),257!==fgColor&&(out+=\"color:\"+Terminal.colors[fgColor]+\";\"),out+='\">'))),ch){case\"&\":out+=\"&\";break;case\"\u003C\":out+=\"\u003C\";break;case\">\":out+=\">\";break;default:out+=\" \">=ch?\" \":ch}attr=data}attr!==this.defAttr&&(out+=\"\u003C/span>\"),this.children[y].innerHTML=out}parent&&parent.appendChild(this.element)}}},{}],43:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.setgLevel=function(g){this.glevel=g,this.charset=this.charsets[g]}}},{}],44:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.setgCharset=function(g,charset){this.charsets[g]=charset,this.glevel===g&&(this.charset=charset)}}},{}],45:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.log=function(){if(Terminal.debug&&window.console&&window.console.log){var args=Array.prototype.slice.call(arguments);window.console.log.apply(window.console,args)}},Terminal.prototype.error=function(){if(Terminal.debug&&window.console&&window.console.error){var args=Array.prototype.slice.call(arguments);window.console.error.apply(window.console,args)}}}},{}],47:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.eraseRight=function(x,y){for(var line=this.lines[this.ybase+y],ch=[this.curAttr,\" \"];this.cols>x;x++)line[x]=ch;this.updateRange(y)},Terminal.prototype.eraseLeft=function(x,y){var line=this.lines[this.ybase+y],ch=[this.curAttr,\" \"];for(x++;x--;)line[x]=ch;this.updateRange(y)},Terminal.prototype.eraseLine=function(y){this.eraseRight(0,y)},Terminal.prototype.eraseInDisplay=function(params){var j;switch(params[0]){case 0:for(this.eraseRight(this.x,this.y),j=this.y+1;this.rows>j;j++)this.eraseLine(j);break;case 1:for(this.eraseLeft(this.x,this.y),j=this.y;j--;)this.eraseLine(j);break;case 2:for(j=this.rows;j--;)this.eraseLine(j);break;case 3:}},Terminal.prototype.eraseInLine=function(params){switch(params[0]){case 0:this.eraseRight(this.x,this.y);break;case 1:this.eraseLeft(this.x,this.y);break;case 2:this.eraseLine(this.y)}}}},{}],46:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.setupStops=function(i){for(null!=i?this.tabs[i]||(i=this.prevStop(i)):(this.tabs={},i=0);this.cols>i;i+=8)this.tabs[i]=!0},Terminal.prototype.prevStop=function(x){for(null==x&&(x=this.x);!this.tabs[--x]&&x>0;);return x>=this.cols?this.cols-1:0>x?0:x},Terminal.prototype.nextStop=function(x){for(null==x&&(x=this.x);!this.tabs[++x]&&this.cols>x;);return x>=this.cols?this.cols-1:0>x?0:x}}},{}],48:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.blankLine=function(cur){for(var attr=cur?this.curAttr:this.defAttr,ch=[attr,\" \"],line=[],i=0;this.cols>i;i++)line[i]=ch;return line}}},{}],49:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.updateRange=function(y){this.refreshStart>y&&(this.refreshStart=y),y>this.refreshEnd&&(this.refreshEnd=y)},Terminal.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1}}},{}],50:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.ch=function(cur){return cur?[this.curAttr,\" \"]:[this.defAttr,\" \"]},Terminal.prototype.is=function(term){var name=this.termName||Terminal.termName;return 0===(name+\"\").indexOf(term)}}},{}],51:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.charAttributes=function(params){for(var bg,fg,p,l=params.length,i=0;l>i;i++)if(p=params[i],p>=30&&37>=p)this.curAttr=-261633&this.curAttr|p-30\u003C\u003C9;else if(p>=40&&47>=p)this.curAttr=-512&this.curAttr|p-40;else if(p>=90&&97>=p)p+=8,this.curAttr=-261633&this.curAttr|p-90\u003C\u003C9;else if(p>=100&&107>=p)p+=8,this.curAttr=-512&this.curAttr|p-100;else if(0===p)this.curAttr=this.defAttr;else if(1===p)this.curAttr=this.curAttr|1\u003C\u003C18;else if(4===p)this.curAttr=this.curAttr|2\u003C\u003C18;else if(7===p||27===p){if(7===p){if(4&this.curAttr>>18)continue;this.curAttr=this.curAttr|4\u003C\u003C18}else if(27===p){if(4&~(this.curAttr>>18))continue;this.curAttr=-1048577&this.curAttr}bg=511&this.curAttr,fg=511&this.curAttr>>9,this.curAttr=-262144&this.curAttr|(bg\u003C\u003C9|fg)}else if(22===p)this.curAttr=-262145&this.curAttr;else if(24===p)this.curAttr=-524289&this.curAttr;else if(39===p)this.curAttr=-261633&this.curAttr,this.curAttr=this.curAttr|(511&this.defAttr>>9)\u003C\u003C9;else if(49===p)this.curAttr=-512&this.curAttr,this.curAttr=this.curAttr|511&this.defAttr;else if(38===p){if(5!==params[i+1])continue;i+=2,p=255¶ms[i],this.curAttr=-261633&this.curAttr|p\u003C\u003C9}else if(48===p){if(5!==params[i+1])continue;i+=2,p=255¶ms[i],this.curAttr=-512&this.curAttr|p}}}},{}],52:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.insertChars=function(params){var param,row,j,ch;for(param=params[0],1>param&&(param=1),row=this.y+this.ybase,j=this.x,ch=[this.curAttr,\" \"];param--&&this.cols>j;)this.lines[row].splice(j++,0,ch),this.lines[row].pop()},Terminal.prototype.insertLines=function(params){var param,row,j;for(param=params[0],1>param&&(param=1),row=this.y+this.ybase,j=this.rows-1-this.scrollBottom,j=this.rows-1+this.ybase-j+1;param--;)this.lines.splice(row,0,this.blankLine(!0)),this.lines.splice(j,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},Terminal.prototype.deleteLines=function(params){var param,row,j;for(param=params[0],1>param&&(param=1),row=this.y+this.ybase,j=this.rows-1-this.scrollBottom,j=this.rows-1+this.ybase-j;param--;)this.lines.splice(j+1,0,this.blankLine(!0)),this.lines.splice(row,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},Terminal.prototype.deleteChars=function(params){var param,row,ch;for(param=params[0],1>param&&(param=1),row=this.y+this.ybase,ch=[this.curAttr,\" \"];param--;)this.lines[row].splice(this.x,1),this.lines[row].push(ch)},Terminal.prototype.eraseChars=function(params){var param,row,j,ch;for(param=params[0],1>param&&(param=1),row=this.y+this.ybase,j=this.x,ch=[this.curAttr,\" \"];param--&&this.cols>j;)this.lines[row][j++]=ch}}},{}],53:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.charPosAbsolute=function(params){var param=params[0];1>param&&(param=1),this.x=param-1,this.x>=this.cols&&(this.x=this.cols-1)},Terminal.prototype.HPositionRelative=function(params){var param=params[0];1>param&&(param=1),this.x+=param,this.x>=this.cols&&(this.x=this.cols-1)},Terminal.prototype.linePosAbsolute=function(params){var param=params[0];1>param&&(param=1),this.y=param-1,this.y>=this.rows&&(this.y=this.rows-1)},Terminal.prototype.VPositionRelative=function(params){var param=params[0];1>param&&(param=1),this.y+=param,this.y>=this.rows&&(this.y=this.rows-1)},Terminal.prototype.HVPosition=function(params){1>params[0]&&(params[0]=1),1>params[1]&&(params[1]=1),this.y=params[0]-1,this.y>=this.rows&&(this.y=this.rows-1),this.x=params[1]-1,this.x>=this.cols&&(this.x=this.cols-1)}}},{}],54:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.saveCursor=function(){this.savedX=this.x,this.savedY=this.y},Terminal.prototype.restoreCursor=function(){this.x=this.savedX||0,this.y=this.savedY||0},Terminal.prototype.cursorUp=function(params){var param=params[0];1>param&&(param=1),this.y-=param,0>this.y&&(this.y=0)},Terminal.prototype.cursorDown=function(params){var param=params[0];1>param&&(param=1),this.y+=param,this.y>=this.rows&&(this.y=this.rows-1)},Terminal.prototype.cursorForward=function(params){var param=params[0];1>param&&(param=1),this.x+=param,this.x>=this.cols&&(this.x=this.cols-1)},Terminal.prototype.cursorBackward=function(params){var param=params[0];1>param&&(param=1),this.x-=param,0>this.x&&(this.x=0)},Terminal.prototype.cursorPos=function(params){var row,col;row=params[0]-1,col=params.length>=2?params[1]-1:0,0>row?row=0:row>=this.rows&&(row=this.rows-1),0>col?col=0:col>=this.cols&&(col=this.cols-1),this.x=col,this.y=row},Terminal.prototype.cursorNextLine=function(params){var param=params[0];1>param&&(param=1),this.y+=param,this.y>=this.rows&&(this.y=this.rows-1),this.x=0},Terminal.prototype.cursorPrecedingLine=function(params){var param=params[0];1>param&&(param=1),this.y-=param,0>this.y&&(this.y=0),this.x=0},Terminal.prototype.cursorCharAbsolute=function(params){var param=params[0];1>param&&(param=1),this.x=param-1},Terminal.prototype.cursorForwardTab=function(params){for(var param=params[0]||1;param--;)this.x=this.nextStop()},Terminal.prototype.cursorBackwardTab=function(params){for(var param=params[0]||1;param--;)this.x=this.prevStop()}}},{}],55:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.repeatPrecedingCharacter=function(params){for(var param=params[0]||1,line=this.lines[this.ybase+this.y],ch=line[this.x-1]||[this.defAttr,\" \"];param--;)line[this.x++]=ch}}},{}],56:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.tabClear=function(params){var param=params[0];0>=param?delete this.tabs[this.x]:3===param&&(this.tabs={})}}},{}],57:[function(require,module){\"use strict\";module.exports=function(Terminal){Terminal.prototype.softReset=function(){this.cursorHidden=!1,this.insertMode=!1,this.originMode=!1,this.wraparoundMode=!1,this.applicationKeypad=!1,this.scrollTop=0,this.scrollBottom=this.rows-1,this.curAttr=this.defAttr,this.x=this.y=0,this.charset=null,this.glevel=0,this.charsets=[null]}}},{}],58:[function(require,module){function Stream(){events.EventEmitter.call(this)}var events=require(\"events\"),util=require(\"util\");util.inherits(Stream,events.EventEmitter),module.exports=Stream,Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}function onend(){didOnEnd||(didOnEnd=!0,dest._pipeCount--,cleanup(),dest._pipeCount>0||dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,dest._pipeCount--,cleanup(),dest._pipeCount>0||dest.destroy())}function onerror(er){if(cleanup(),0===this.listeners(\"error\").length)throw er}function cleanup(){source.removeListener(\"data\",ondata),dest.removeListener(\"drain\",ondrain),source.removeListener(\"end\",onend),source.removeListener(\"close\",onclose),source.removeListener(\"error\",onerror),dest.removeListener(\"error\",onerror),source.removeListener(\"end\",cleanup),source.removeListener(\"close\",cleanup),dest.removeListener(\"end\",cleanup),dest.removeListener(\"close\",cleanup)}var source=this;source.on(\"data\",ondata),dest.on(\"drain\",ondrain),dest._isStdio||options&&options.end===!1||(dest._pipeCount=dest._pipeCount||0,dest._pipeCount++,source.on(\"end\",onend),source.on(\"close\",onclose));var didOnEnd=!1;return source.on(\"error\",onerror),dest.on(\"error\",onerror),source.on(\"end\",cleanup),source.on(\"close\",cleanup),dest.on(\"end\",cleanup),dest.on(\"close\",cleanup),dest.emit(\"pipe\",source),dest}},{events:15,util:6}],59:[function(require,module,exports){\"use strict\";var vm=require(\"vm\");exports.createCtx=function(sandbox){return vm.createContext(sandbox)},exports.runInCtx=function(code,ctx){return vm.runInContext(code,ctx)}},{vm:31}],60:[function(require,module){\"use strict\";module.exports=function(arr){return arr.filter(function(k){return!filterOut.hasOwnProperty(k)})};var filterOuts=[\"ArrayBuffer\",\"Attr\",\"BeforeLoadEvent\",\"Blob\",\"CDATASection\",\"CSSCharsetRule\",\"CSSImportRule\",\"CSSMediaRule\",\"CSSPageRule\",\"CSSPrimitiveValue\",\"CSSRuleList\",\"CSSStyleDeclaration\",\"CSSStyleSheet\",\"CSSValue\",\"CanvasGradient\",\"ClientRectList\",\"Clipboard\",\"CompositionEvent\",\"Counter\",\"DOMException\",\"DOMParser\",\"DOMStringMap\",\"DOMTokenList\",\"Document\",\"DocumentFragment\",\"DocumentType\",\"Element\",\"ErrorEvent\",\"Event\",\"EventSource\",\"File\",\"FileError\",\"FileList\",\"Float32Array\",\"HTMLAllCollection\",\"HTMLAreaElement\",\"HTMLBRElement\",\"HTMLButtonElement\",\"HTMLCanvasElement\",\"HTMLCollection\",\"HTMLDListElement\",\"HTMLDirectoryElement\",\"HTMLDivElement\",\"HTMLFormElement\",\"HTMLFrameElement\",\"HTMLHRElement\",\"HTMLIFrameElement\",\"HTMLImageElement\",\"HTMLInputElement\",\"HTMLLinkElement\",\"HTMLMapElement\",\"HTMLMediaElement\",\"HTMLMenuElement\",\"HTMLMeterElement\",\"HTMLOptGroupElement\",\"HTMLParamElement\",\"HTMLProgressElement\",\"HTMLQuoteElement\",\"HTMLSelectElement\",\"HTMLTableCaptionElement\",\"HTMLTableColElement\",\"HTMLTableSectionElement\",\"HTMLUListElement\",\"HTMLUnknownElement\",\"HashChangeEvent\",\"ImageData\",\"Int16Array\",\"Int8Array\",\"MediaController\",\"MediaError\",\"MediaList\",\"MessageChannel\",\"MimeType\",\"MutationEvent\",\"NamedNodeMap\",\"NodeFilter\",\"Notation\",\"OverflowEvent\",\"Plugin\",\"PluginArray\",\"PopStateEvent\",\"RGBColor\",\"Range\",\"Rect\",\"SQLException\",\"SVGAltGlyphItemElement\",\"SVGAnimateColorElement\",\"SVGAnimatedAngle\",\"SVGAnimatedEnumeration\",\"SVGAnimatedLength\",\"SVGAnimatedLengthList\",\"SVGAnimatedNumberList\",\"SVGAnimatedRect\",\"SVGAnimatedString\",\"SVGAnimatedTransformList\",\"SVGClipPathElement\",\"SVGDefsElement\",\"SVGElementInstanceList\",\"SVGEllipseElement\",\"SVGException\",\"SVGFEComponentTransferElement\",\"SVGFEConvolveMatrixElement\",\"SVGFEDiffuseLightingElement\",\"SVGFEDistantLightElement\",\"SVGFEFloodElement\",\"SVGFEFuncBElement\",\"SVGFEFuncGElement\",\"SVGFEFuncRElement\",\"SVGFEGaussianBlurElement\",\"SVGFEImageElement\",\"SVGFEMergeNodeElement\",\"SVGFEOffsetElement\",\"SVGFESpecularLightingElement\",\"SVGFilterElement\",\"SVGFontElement\",\"SVGFontFaceNameElement\",\"SVGFontFaceUriElement\",\"SVGGlyphElement\",\"SVGGlyphRefElement\",\"SVGGradientElement\",\"SVGHKernElement\",\"SVGLengthList\",\"SVGLinearGradientElement\",\"SVGMarkerElement\",\"SVGMatrix\",\"SVGNumber\",\"SVGPaint\",\"SVGPathSegArcAbs\",\"SVGPathSegArcRel\",\"SVGPathSegCurvetoCubicAbs\",\"SVGPathSegCurvetoCubicSmoothAbs\",\"SVGPathSegCurvetoCubicSmoothRel\",\"SVGPathSegCurvetoQuadraticRel\",\"SVGPathSegCurvetoQuadraticSmoothAbs\",\"SVGPathSegCurvetoQuadraticSmoothRel\",\"SVGPathSegLinetoHorizontalRel\",\"SVGPathSegLinetoVerticalRel\",\"SVGPathSegList\",\"SVGPathSegMovetoAbs\",\"SVGPatternElement\",\"SVGPointList\",\"SVGPolylineElement\",\"SVGPreserveAspectRatio\",\"SVGRectElement\",\"SVGSetElement\",\"SVGStopElement\",\"SVGStringList\",\"SVGSymbolElement\",\"SVGTSpanElement\",\"SVGTextPathElement\",\"SVGTransformList\",\"SVGZoomEvent\",\"Selection\",\"Storage\",\"StorageEvent\",\"TextEvent\",\"TextMetrics\",\"TextTrackCueList\",\"UIEvent\",\"Uint32Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"WebGLActiveInfo\",\"WebGLProgram\",\"WebGLRenderbuffer\",\"WebGLRenderingContext\",\"WebGLShader\",\"WebKitAnimationEvent\",\"WebKitCSSFilterValue\",\"WebKitCSSKeyframeRule\",\"WebKitCSSTransformValue\",\"WebKitPoint\",\"WebKitTransitionEvent\",\"Window\",\"Worker\",\"XMLDocument\",\"XMLHttpRequest\",\"XMLHttpRequestException\",\"XPathEvaluator\",\"XPathResult\",\"clientInformation\",\"console\",\"exports\",\"frameElement\",\"frames\",\"history\",\"localStorage\",\"location\",\"locationbar\",\"menubar\",\"navigator\",\"onbeforeunload\",\"onblur\",\"oncanplaythrough\",\"onclick\",\"ondragenter\",\"ondragleave\",\"ondragover\",\"ondragstart\",\"ondrop\",\"ondurationchange\",\"onemptied\",\"onerror\",\"onkeydown\",\"onkeypress\",\"onloadeddata\",\"onloadstart\",\"onmessage\",\"onmouseout\",\"onmouseover\",\"onoffline\",\"ononline\",\"onplay\",\"onplaying\",\"onprogress\",\"onratechange\",\"onscroll\",\"onsearch\",\"onselect\",\"onsuspend\",\"ontimeupdate\",\"onwebkittransitionend\",\"opener\",\"scrollbars\",\"styleMedia\",\"toolbar\",\"webkitAudioContext\",\"webkitAudioPannerNode\",\"webkitURL\",\"Audio\",\"AudioProcessingEvent\",\"CSSFontFaceRule\",\"CSSRule\",\"CSSStyleRule\",\"CSSValueList\",\"CanvasPattern\",\"CanvasRenderingContext2D\",\"CharacterData\",\"ClientRect\",\"CloseEvent\",\"Comment\",\"CustomEvent\",\"DOMImplementation\",\"DOMSettableTokenList\",\"DOMStringList\",\"DataView\",\"Entity\",\"EntityReference\",\"EventException\",\"FileReader\",\"Float64Array\",\"FormData\",\"HTMLAnchorElement\",\"HTMLAppletElement\",\"HTMLAudioElement\",\"HTMLBaseElement\",\"HTMLBaseFontElement\",\"HTMLBodyElement\",\"HTMLDocument\",\"HTMLElement\",\"HTMLEmbedElement\",\"HTMLFieldSetElement\",\"HTMLFontElement\",\"HTMLFrameSetElement\",\"HTMLHeadElement\",\"HTMLHeadingElement\",\"HTMLHtmlElement\",\"HTMLKeygenElement\",\"HTMLLIElement\",\"HTMLLabelElement\",\"HTMLLegendElement\",\"HTMLMarqueeElement\",\"HTMLMetaElement\",\"HTMLModElement\",\"HTMLOListElement\",\"HTMLObjectElement\",\"HTMLOptionElement\",\"HTMLOutputElement\",\"HTMLParagraphElement\",\"HTMLPreElement\",\"HTMLScriptElement\",\"HTMLSourceElement\",\"HTMLSpanElement\",\"HTMLStyleElement\",\"HTMLTableCellElement\",\"HTMLTableElement\",\"HTMLTableRowElement\",\"HTMLTextAreaElement\",\"HTMLTitleElement\",\"HTMLTrackElement\",\"HTMLVideoElement\",\"Image\",\"Int32Array\",\"KeyboardEvent\",\"MessageEvent\",\"MessagePort\",\"MimeTypeArray\",\"MouseEvent\",\"Node\",\"NodeList\",\"OfflineAudioCompletionEvent\",\"Option\",\"PageTransitionEvent\",\"ProcessingInstruction\",\"ProgressEvent\",\"RangeException\",\"SVGAElement\",\"SVGAltGlyphDefElement\",\"SVGAltGlyphElement\",\"SVGAngle\",\"SVGAnimateElement\",\"SVGAnimateMotionElement\",\"SVGAnimateTransformElement\",\"SVGAnimatedBoolean\",\"SVGAnimatedInteger\",\"SVGAnimatedNumber\",\"SVGAnimatedPreserveAspectRatio\",\"SVGCircleElement\",\"SVGColor\",\"SVGComponentTransferFunctionElement\",\"SVGCursorElement\",\"SVGDescElement\",\"SVGDocument\",\"SVGElement\",\"SVGElementInstance\",\"SVGFEBlendElement\",\"SVGFEColorMatrixElement\",\"SVGFECompositeElement\",\"SVGFEDisplacementMapElement\",\"SVGFEDropShadowElement\",\"SVGFEFuncAElement\",\"SVGFEMergeElement\",\"SVGFEMorphologyElement\",\"SVGFEPointLightElement\",\"SVGFESpotLightElement\",\"SVGFETileElement\",\"SVGFETurbulenceElement\",\"SVGFontFaceElement\",\"SVGFontFaceFormatElement\",\"SVGFontFaceSrcElement\",\"SVGForeignObjectElement\",\"SVGGElement\",\"SVGImageElement\",\"SVGLength\",\"SVGLineElement\",\"SVGMPathElement\",\"SVGMaskElement\",\"SVGMetadataElement\",\"SVGMissingGlyphElement\",\"SVGNumberList\",\"SVGPathElement\",\"SVGPathSeg\",\"SVGPathSegClosePath\",\"SVGPathSegCurvetoCubicRel\",\"SVGPathSegCurvetoQuadraticAbs\",\"SVGPathSegLinetoAbs\",\"SVGPathSegLinetoHorizontalAbs\",\"SVGPathSegLinetoRel\",\"SVGPathSegLinetoVerticalAbs\",\"SVGPathSegMovetoRel\",\"SVGPoint\",\"SVGPolygonElement\",\"SVGRadialGradientElement\",\"SVGRect\",\"SVGRenderingIntent\",\"SVGSVGElement\",\"SVGScriptElement\",\"SVGStyleElement\",\"SVGSwitchElement\",\"SVGTRefElement\",\"SVGTextContentElement\",\"SVGTextElement\",\"SVGTextPositioningElement\",\"SVGTitleElement\",\"SVGTransform\",\"SVGUnitTypes\",\"SVGUseElement\",\"SVGVKernElement\",\"SVGViewElement\",\"SharedWorker\",\"StyleSheet\",\"StyleSheetList\",\"Text\",\"TextTrack\",\"TextTrackCue\",\"TextTrackList\",\"TimeRanges\",\"TrackEvent\",\"Uint16Array\",\"WebGLBuffer\",\"WebGLContextEvent\",\"WebGLFramebuffer\",\"WebGLShaderPrecisionFormat\",\"WebGLTexture\",\"WebGLUniformLocation\",\"WebKitCSSKeyframesRule\",\"WebKitCSSMatrix\",\"WebKitMutationObserver\",\"WebSocket\",\"WheelEvent\",\"XMLHttpRequestProgressEvent\",\"XMLHttpRequestUpload\",\"XMLSerializer\",\"XPathException\",\"XSLTProcessor\",\"applicationCache\",\"closed\",\"crypto\",\"defaultStatus\",\"defaultstatus\",\"devicePixelRatio\",\"event\",\"innerHeight\",\"innerWidth\",\"length\",\"module\",\"name\",\"offscreenBuffering\",\"onabort\",\"oncanplay\",\"onchange\",\"oncontextmenu\",\"ondblclick\",\"ondrag\",\"ondragend\",\"onended\",\"onfocus\",\"onhashchange\",\"oninput\",\"oninvalid\",\"onkeyup\",\"onload\",\"onloadedmetadata\",\"onmousedown\",\"onmousemove\",\"onmouseup\",\"onmousewheel\",\"onpagehide\",\"onpageshow\",\"onpause\",\"onpopstate\",\"onreset\",\"onresize\",\"onseeked\",\"onseeking\",\"onstalled\",\"onstorage\",\"onsubmit\",\"onunload\",\"onvolumechange\",\"onwaiting\",\"onwebkitanimationend\",\"onwebkitanimationiteration\",\"onwebkitanimationstart\",\"outerHeight\",\"outerWidth\",\"pageXOffset\",\"pageYOffset\",\"parent\",\"personalbar\",\"screen\",\"screenLeft\",\"screenTop\",\"screenX\",\"screenY\",\"scrollX\",\"scrollY\",\"self\",\"sessionStorage\",\"status\",\"statusbar\",\"Touch\",\"TouchList\",\"TouchEvent\",\"DeviceMotionEvent\",\"DeviceOrientationEvent\",\"orientation\",\"onorientationchange\",\"ontouched\",\"ondeviceorientation\",\"ontouchmove\",\"ondevicemotion\",\"ontouchcancel\",\"ontouchstart\",\"ongestureend\",\"ontouchend\",\"ongesturestart\",\"ongesturechange\",\"getSearchEngine\",\"setSearchEngine\",\"canSetSearchEngine\",\"InstallTrigger\",\"getInterface\",\"sidebar\"],filterOut={};filterOuts.forEach(function(k){filterOut[k]=!0})},{}],61:[function(require,module){\"use strict\";var exclude={};module.exports=function(thing,exclude_){var t={},ex=exclude_||exclude;return thing?(Object.keys(thing).filter(function(k){return!ex[k]}).forEach(function(k){thing.hasOwnProperty(k)&&(t[k]=thing[k])}),t):t},[\"top\",\"Intl\",\"chrome\",\"document\",\"external\",\"v8Intl\",\"window\",\"frameElement\",\"parent\"].forEach(function(k){exclude[k]=!0})},{}],28:[function(require,module){module.exports={highlight:require(\"./lib/highlight\"),highlightFile:require(\"./lib/highlightFile\"),highlightFileSync:require(\"./lib/highlightFileSync\")}},{\"./lib/highlight\":62,\"./lib/highlightFile\":63,\"./lib/highlightFileSync\":64}],65:[function(require,module,exports){(function(process){function filter(xs,fn){for(var res=[],i=0;xs.length>i;i++)fn(xs[i],i,xs)&&res.push(xs[i]);return res}function normalizeArray(parts,allowAboveRoot){for(var up=0,i=parts.length;i>=0;i--){var last=parts[i];\".\"==last?parts.splice(i,1):\"..\"===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift(\"..\");return parts}var splitPathRe=/^(.+\\/(?!$)|\\/)?((?:.+?)?(\\.[^.]*)?)$/;exports.resolve=function(){for(var resolvedPath=\"\",resolvedAbsolute=!1,i=arguments.length;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();\"string\"==typeof path&&path&&(resolvedPath=path+\"/\"+resolvedPath,resolvedAbsolute=\"/\"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split(\"/\"),function(p){return!!p}),!resolvedAbsolute).join(\"/\"),(resolvedAbsolute?\"/\":\"\")+resolvedPath||\".\"},exports.normalize=function(path){var isAbsolute=\"/\"===path.charAt(0),trailingSlash=\"/\"===path.slice(-1);return path=normalizeArray(filter(path.split(\"/\"),function(p){return!!p}),!isAbsolute).join(\"/\"),path||isAbsolute||(path=\".\"),path&&trailingSlash&&(path+=\"/\"),(isAbsolute?\"/\":\"\")+path},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p){return p&&\"string\"==typeof p}).join(\"/\"))},exports.dirname=function(path){var dir=splitPathRe.exec(path)[1]||\"\",isWindows=!1;return dir?1===dir.length||isWindows&&3>=dir.length&&\":\"===dir.charAt(1)?dir:dir.substring(0,dir.length-1):\".\"},exports.basename=function(path,ext){var f=splitPathRe.exec(path)[2]||\"\";return ext&&f.substr(-1*ext.length)===ext&&(f=f.substr(0,f.length-ext.length)),f},exports.extname=function(path){return splitPathRe.exec(path)[3]||\"\"},exports.relative=function(from,to){function trim(arr){for(var start=0;arr.length>start&&\"\"===arr[start];start++);for(var end=arr.length-1;end>=0&&\"\"===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split(\"/\")),toParts=trim(to.split(\"/\")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;length>i;i++)if(fromParts[i]!==toParts[i]){samePartsLength=i;break}for(var outputParts=[],i=samePartsLength;fromParts.length>i;i++)outputParts.push(\"..\");return outputParts=outputParts.concat(toParts.slice(samePartsLength)),outputParts.join(\"/\")}})(require(\"__browserify_process\"))},{__browserify_process:16}],42:[function(require,module){\"use strict\";function fixLinefeed(data){return data.replace(/([^\\r])\\n/g,\"$1\\r\\n\")}function fixIndent(data){return/(^|\\n) /.test(data)?data.split(\"\\n\").map(function(line){for(var count=0;\" \"===line.charAt(0);)line=line.slice(1),count++;for(;count--;)line=\" \"+line;return line}).join(\"\\r\\n\"):data}var states=require(\"./states\");module.exports=function(Terminal){Terminal.prototype.write=function(data){data=fixLinefeed(data),data=fixIndent(data);var cs,ch,l=data.length,i=0;for(this.refreshStart=this.y,this.refreshEnd=this.y,this.ybase!==this.ydisp&&(this.ydisp=this.ybase,this.maxRange());l>i;i++)switch(ch=data[i],this.state){case states.normal:switch(ch){case\"\u0007\":this.bell();break;case\"\\n\":case\"\u000b\":case\"\\f\":this.convertEol&&(this.x=0),this.y++;break;case\"\\r\":this.x=0;break;case\"\\b\":this.x>0&&this.x--;break;case\"\t\":this.x=this.nextStop();break;case\"\u000e\":this.setgLevel(1);break;case\"\u000f\":this.setgLevel(0);break;case\"\u001b\":this.state=states.escaped;break;default:ch>=\" \"&&(this.charset&&this.charset[ch]&&(ch=this.charset[ch]),this.x>=this.cols&&(this.x=0,this.y++),this.lines[this.y+this.ybase][this.x]=[this.curAttr,ch],this.x++,this.updateRange(this.y))}break;case states.escaped:switch(ch){case\"[\":this.params=[],this.currentParam=0,this.state=states.csi;break;case\"]\":this.params=[],this.currentParam=0,this.state=states.osc;break;case\"P\":this.params=[],this.currentParam=0,this.state=states.dcs;break;case\"_\":this.stateType=\"apc\",this.state=states.ignore;break;case\"^\":this.stateType=\"pm\",this.state=states.ignore;break;case\"c\":this.reset();break;case\"E\":this.x=0;break;case\"D\":this.index();break;case\"M\":this.reverseIndex();break;case\"%\":this.setgLevel(0),this.setgCharset(0,Terminal.charsets.US),this.state=states.normal,i++;break;case\"(\":case\")\":case\"*\":case\"+\":case\"-\":case\".\":switch(ch){case\"(\":this.gcharset=0;break;case\")\":this.gcharset=1;break;case\"*\":this.gcharset=2;break;case\"+\":this.gcharset=3;break;case\"-\":this.gcharset=1;break;case\".\":this.gcharset=2}this.state=states.charset;break;case\"/\":this.gcharset=3,this.state=states.charset,i--;break;case\"N\":break;case\"O\":break;case\"n\":this.setgLevel(2);break;case\"o\":this.setgLevel(3);break;case\"|\":this.setgLevel(3);break;case\"}\":this.setgLevel(2);break;case\"~\":this.setgLevel(1);break;case\"7\":this.saveCursor(),this.state=states.normal;break;case\"8\":this.restoreCursor(),this.state=states.normal;break;case\"#\":this.state=states.normal,i++;break;case\"H\":this.tabSet();break;case\"=\":this.log(\"Serial port requested application keypad.\"),this.applicationKeypad=!0,this.state=states.normal;break;case\">\":this.log(\"Switching back to normal keypad.\"),this.applicationKeypad=!1,this.state=states.normal;break;default:this.state=states.normal,this.error(\"Unknown ESC control: %s.\",ch)}break;case states.charset:switch(ch){case\"0\":cs=Terminal.charsets.SCLD;break;case\"A\":cs=Terminal.charsets.UK;break;case\"B\":cs=Terminal.charsets.US;break;case\"4\":cs=Terminal.charsets.Dutch;break;case\"C\":case\"5\":cs=Terminal.charsets.Finnish;break;case\"R\":cs=Terminal.charsets.French;break;case\"Q\":cs=Terminal.charsets.FrenchCanadian;break;case\"K\":cs=Terminal.charsets.German;break;case\"Y\":cs=Terminal.charsets.Italian;break;case\"E\":case\"6\":cs=Terminal.charsets.NorwegianDanish;break;case\"Z\":cs=Terminal.charsets.Spanish;break;case\"H\":case\"7\":cs=Terminal.charsets.Swedish;break;case\"=\":cs=Terminal.charsets.Swiss;break;case\"/\":cs=Terminal.charsets.ISOLatin,i++;break;default:cs=Terminal.charsets.US}this.setgCharset(this.gcharset,cs),this.gcharset=null,this.state=states.normal;break;case states.osc:if(\"\u001b\"===ch||\"\u0007\"===ch){switch(\"\u001b\"===ch&&i++,this.params.push(this.currentParam),this.params[0]){case 0:case 1:case 2:this.params[1]&&(this.title=this.params[1],this.handleTitle(this.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this.params=[],this.currentParam=0,this.state=states.normal}else this.params.length?this.currentParam+=ch:ch>=\"0\"&&\"9\">=ch?this.currentParam=10*this.currentParam+ch.charCodeAt(0)-48:\";\"===ch&&(this.params.push(this.currentParam),this.currentParam=\"\");break;case states.csi:if(\"?\"===ch||\">\"===ch||\"!\"===ch){this.prefix=ch;break}if(ch>=\"0\"&&\"9\">=ch){this.currentParam=10*this.currentParam+ch.charCodeAt(0)-48;break}if(\"$\"===ch||'\"'===ch||\" \"===ch||\"'\"===ch){this.postfix=ch;break}if(this.params.push(this.currentParam),this.currentParam=0,\";\"===ch)break;switch(this.state=states.normal,ch){case\"A\":this.cursorUp(this.params);break;case\"B\":this.cursorDown(this.params);break;case\"C\":this.cursorForward(this.params);break;case\"D\":this.cursorBackward(this.params);break;case\"H\":this.cursorPos(this.params);break;case\"J\":this.eraseInDisplay(this.params);break;case\"K\":this.eraseInLine(this.params);break;case\"m\":this.charAttributes(this.params);break;case\"n\":this.deviceStatus(this.params);break;case\"@\":this.insertChars(this.params);break;case\"E\":this.cursorNextLine(this.params);break;case\"F\":this.cursorPrecedingLine(this.params);break;case\"G\":this.cursorCharAbsolute(this.params);break;case\"L\":this.insertLines(this.params);break;case\"M\":this.deleteLines(this.params);break;case\"P\":this.deleteChars(this.params);break;case\"X\":this.eraseChars(this.params);break;case\"`\":this.charPosAbsolute(this.params);break;case\"a\":this.HPositionRelative(this.params);break;case\"c\":break;case\"d\":this.linePosAbsolute(this.params);break;case\"e\":this.VPositionRelative(this.params);break;case\"f\":this.HVPosition(this.params);break;case\"h\":break;case\"l\":break;case\"r\":break;case\"s\":this.saveCursor(this.params);break;case\"u\":this.restoreCursor(this.params);break;case\"I\":this.cursorForwardTab(this.params);break;case\"S\":break;case\"T\":2>this.params.length&&!this.prefix;break;case\"Z\":this.cursorBackwardTab(this.params);break;case\"b\":this.repeatPrecedingCharacter(this.params);break;case\"g\":this.tabClear(this.params);break;case\"p\":switch(this.prefix){case\"!\":this.softReset(this.params)}break;default:this.error(\"Unknown CSI code: %s.\",ch)}this.prefix=\"\",this.postfix=\"\";break;case states.dcs:if(\"\u001b\"===ch||\"\u0007\"===ch){switch(\"\u001b\"===ch&&i++,this.prefix){case\"\":break;case\"$q\":var pt=this.currentParam;switch(pt){case'\"q':pt='0\"q';break;case'\"p':pt='61\"p';break;case\"r\":pt=\"\"+(this.scrollTop+1)+\";\"+(this.scrollBottom+1)+\"r\";break;case\"m\":pt=\"0m\";break;default:this.error(\"Unknown DCS Pt: %s.\",pt),pt=\"\"}break;case\"+p\":break;default:this.error(\"Unknown DCS prefix: %s.\",this.prefix)}this.currentParam=0,this.prefix=\"\",this.state=states.normal}else this.currentParam?this.currentParam+=ch:this.prefix||\"$\"===ch||\"+\"===ch?2===this.prefix.length?this.currentParam=ch:this.prefix+=ch:this.currentParam=ch;break;case states.ignore:\"\u001b\"===ch||\"\u0007\"===ch?(\"\u001b\"===ch&&i++,this.stateData=\"\",this.state=states.normal):(this.stateData||(this.stateData=\"\"),this.stateData+=ch)}this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)},Terminal.prototype.writeln=function(data){data=data.replace(/ /g,\" \"),this.write(data+\" \\r\\n\")}}},{\"./states\":36}],32:[function(require,module){\"use strict\";var states=require(\"../states\");module.exports=function(Terminal){Terminal.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.state=states.normal},Terminal.prototype.reverseIndex=function(){var j;this.y--,this.y\u003Cthis.scrollTop&&(this.y++,this.lines.splice(this.y+this.ybase,0,this.blankLine(!0)),j=this.rows-1-this.scrollBottom,this.lines.splice(this.rows-1+this.ybase-j+1,1),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)),this.state=states.normal}}},{\"../states\":36}],34:[function(require,module){\"use strict\";var states=require(\"../states\");module.exports=function(Terminal){Terminal.prototype.tabSet=function(){this.tabs[this.x]=!0,this.state=states.normal}}},{\"../states\":36}],26:[function(require,module){(function(process){\"use strict\";function isFunctionDeclaration(snippet){var firstStatement=snippet.ast.body&&snippet.ast.body[0]&&snippet.ast.body[0];return firstStatement&&\"FunctionDeclaration\"===firstStatement.type}function added(origKeys,keys){return keys.filter(function(k){return!~origKeys.indexOf(k)\n})}function changed(ctx,prevCtx,prevKeys){return prevKeys.filter(function(k){return!deepIs(prevCtx[k],ctx[k])})}function keyValues(keys,ctx,prevCtx){return keys.map(function(k){return{key:k,value:ctx[k],prevValue:prevCtx?prevCtx[k]:void 0}})}function cleaned(ctx,add){var cleanedCtx=removeProblematic(ctx);return Object.keys(add).forEach(function(k){cleanedCtx[k]=add[k]}),cleanedCtx}function evalSnippet(ctx,snippet,isStrict,allTrackedKeyValues){browser&&(ctx=cleaned(ctx,allTrackedKeyValues));var result,prevCtx=clone(ctx),prevKeys=Object.keys(prevCtx),code=snippet.code;try{isStrict&&!useStrictRx.test(code)&&parse('\"use strict\";'+snippet.code),result=runner.runInCtx(code,ctx)}catch(e){ctx[ErrorIndicator]=\"\"+e}browser&&(ctx=cleaned(ctx,{}));var crntCtx=clone(ctx),keys=Object.keys(crntCtx),addedValues=added(prevKeys,keys);browser&&(addedValues=removeIFrameGenerated(addedValues));var addedKeyValues=keyValues(addedValues,crntCtx),changedValues=changed(crntCtx,prevCtx,prevKeys),changedKeyValues=keyValues(changedValues,crntCtx,prevCtx);snippet.evaluated={result:result,ctx:prevCtx,added:clone(addedKeyValues),changed:clone(changedKeyValues)},browser&&(addedKeyValues.concat(changedKeyValues).forEach(function(x){allTrackedKeyValues[x.key]=x.value}),delete allTrackedKeyValues[ErrorIndicator]),delete ctx[ErrorIndicator]}var browser=process.browser,clone=(require(\"vm\"),require(\"clone\")),deepIs=require(\"deep-is\"),runner=require(\"./runner-vm\"),colors=require(\"ansicolors\"),parse=require(\"esprima\").parse,removeIFrameGenerated=require(\"./remove-iframe-generated\"),removeProblematic=require(\"./remove-problematic\"),createSandbox=require(\"./create-sandbox\"),ErrorIndicator=colors.red(\"!\"),useStrictRx=/^ *['\"]use strict['\"]/;module.exports=function(snippets,fullSrcPath){var fndecs,sandbox=createSandbox(fullSrcPath),ctx=runner.createCtx(sandbox),allTrackedKeyValues={},nonEmptySnippets=snippets.filter(function(snippet){return snippet.code.length}),isStrict=nonEmptySnippets.some(function(snippet){return useStrictRx.test(snippet.raw)});return browser||(fndecs=nonEmptySnippets.filter(function(snippet,idx){return isFunctionDeclaration(snippet)?(nonEmptySnippets.splice(idx,1),!0):!1}),fndecs.forEach(function(snippet){evalSnippet(ctx,snippet,isStrict,allTrackedKeyValues)})),nonEmptySnippets.forEach(function(snippet){evalSnippet(ctx,snippet,isStrict,allTrackedKeyValues)}),ctx}})(require(\"__browserify_process\"))},{vm:31,\"./runner-vm\":59,\"./remove-iframe-generated\":60,\"./remove-problematic\":61,\"./create-sandbox\":66,clone:67,ansicolors:68,\"deep-is\":69,esprima:70,__browserify_process:16}],66:[function(require,module){(function(process,global){\"use strict\";function cleanProcess(process){var exclude={stdout:!0,stderr:!0,stdin:!0,mainModule:!0};return removeProblematic(process,exclude)}var browser=process.browser,requireLikeName=\"require-like\",requireLike=browser?function(){}:require(requireLikeName),path=require(\"path\"),removeProblematic=require(\"./remove-problematic\");module.exports=function(fullSrcPath){var exports={},sandbox={console:global.console,module:{exports:exports,parent:null},exports:exports,process:cleanProcess(process)},serverside={require:requireLike(fullSrcPath),__filename:fullSrcPath,__dirname:path.dirname(fullSrcPath),Buffer:require(\"buffer\").Buffer,ArrayBuffer:global.ArrayBuffer,Int8Array:global.Int8Array,Uint8Array:global.Uint8Array,Uint8ClampedArray:global.Uint8ClampedArray,Int16Array:global.Int16Array,Uint16Array:global.Uint16Array,Int32Array:global.Int32Array,Uint32Array:global.Uint32Array,Float32Array:global.Float32Array,Float64Array:global.Float64Array,DataView:global.DataView};return browser||Object.keys(serverside).forEach(function(k){sandbox[k]=serverside[k]}),sandbox}})(require(\"__browserify_process\"),window)},{path:65,buffer:71,\"./remove-problematic\":61,__browserify_process:16}],27:[function(require,module){\"use strict\";function formatAdd(key,value,diffopts){return format(\"%s %s: %s\",colors.brightGreen(\"+\"),key,diffValues({},value,diffopts))}function formatChange(key,prevValue,value,diffopts){return format(\"%s %s: %s\",colors.brightBlue(\"~\"),key,diffValues(prevValue,value,diffopts))}function formatResult(result,diffopts){return format(\"%s %s\",colors.cyan(\"=>\"),diffValues({},result,diffopts))}function formatSectionEnd(multiLine,lastOne){return!multiLine||lastOne?\"\\n\":colors.brightBlack(\"\\n--------\\n\")}function resolveTale(evaluated,opts){if(!evaluated)return\"\";var tales=[];return evaluated.added.length&&evaluated.added.forEach(function(x){tales.push(opts.formatAdd(x.key,x.value,opts.diff))}),evaluated.changed.length&&evaluated.changed.forEach(function(x){tales.push(opts.formatChange(x.key,x.prevValue,x.value,opts.diff))}),evaluated.result!==void 0&&tales.push(opts.formatResult(evaluated.result,opts.diff)),tales.reduce(function(s,tale,idx,all){var lastOne=idx===all.length-1,multiLine=~tale.indexOf(\"\\n\");return s+tale+opts.formatSectionEnd(multiLine,lastOne)},\"\")}var diffValues=require(\"./diff-values\"),format=require(\"util\").format,colors=require(\"ansicolors\");module.exports=function(snippets,opts){return opts=opts||{},opts.formatAdd=opts.formatAdd||formatAdd,opts.formatChange=opts.formatChange||formatChange,opts.formatResult=opts.formatResult||formatResult,opts.formatSectionEnd=opts.formatSectionEnd||formatSectionEnd,snippets.map(function(snippet){var tale=resolveTale(snippet.evaluated,opts);return{tale:tale,insertAfter:snippet.end}})}},{util:6,\"./diff-values\":72,ansicolors:68}],73:[function(require,module){(function(){function objectKeys(object){if(Object.keys)return Object.keys(object);var result=[];for(var name in object)Object.prototype.hasOwnProperty.call(object,name)&&result.push(name);return result}function replacer(key,value){return void 0===value?\"\"+value:\"number\"!=typeof value||!isNaN(value)&&isFinite(value)?\"function\"==typeof value||value instanceof RegExp?\"\"+value:value:\"\"+value}function truncate(s,n){return\"string\"==typeof s?n>s.length?s:s.slice(0,n):s}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}function ok(value,message){value||fail(value,!0,message,\"==\",assert.ok)}function _deepEqual(actual,expected){if(actual===expected)return!0;if(Buffer.isBuffer(actual)&&Buffer.isBuffer(expected)){if(actual.length!=expected.length)return!1;for(var i=0;actual.length>i;i++)if(actual[i]!==expected[i])return!1;return!0}return actual instanceof Date&&expected instanceof Date?actual.getTime()===expected.getTime():\"object\"!=typeof actual&&\"object\"!=typeof expected?actual==expected:objEquiv(actual,expected)}function isUndefinedOrNull(value){return null===value||void 0===value}function isArguments(object){return\"[object Arguments]\"==Object.prototype.toString.call(object)}function objEquiv(a,b){if(isUndefinedOrNull(a)||isUndefinedOrNull(b))return!1;if(a.prototype!==b.prototype)return!1;if(isArguments(a))return isArguments(b)?(a=pSlice.call(a),b=pSlice.call(b),_deepEqual(a,b)):!1;try{var key,i,ka=objectKeys(a),kb=objectKeys(b)}catch(e){return!1}if(ka.length!=kb.length)return!1;for(ka.sort(),kb.sort(),i=ka.length-1;i>=0;i--)if(ka[i]!=kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!_deepEqual(a[key],b[key]))return!1;return!0}function expectedException(actual,expected){return actual&&expected?expected instanceof RegExp?expected.test(actual):actual instanceof expected?!0:expected.call({},actual)===!0?!0:!1:!1}function _throws(shouldThrow,block,expected,message){var actual;\"string\"==typeof expected&&(message=expected,expected=null);try{block()}catch(e){actual=e}if(message=(expected&&expected.name?\" (\"+expected.name+\").\":\".\")+(message?\" \"+message:\".\"),shouldThrow&&!actual&&fail(\"Missing expected exception\"+message),!shouldThrow&&expectedException(actual,expected)&&fail(\"Got unwanted exception\"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}var util=require(\"util\"),Buffer=require(\"buffer\").Buffer,pSlice=Array.prototype.slice,assert=module.exports=ok;assert.AssertionError=function(options){this.name=\"AssertionError\",this.message=options.message,this.actual=options.actual,this.expected=options.expected,this.operator=options.operator;var stackStartFunction=options.stackStartFunction||fail;Error.captureStackTrace&&Error.captureStackTrace(this,stackStartFunction)},util.inherits(assert.AssertionError,Error),assert.AssertionError.prototype.toString=function(){return this.message?[this.name+\":\",this.message].join(\" \"):[this.name+\":\",truncate(JSON.stringify(this.actual,replacer),128),this.operator,truncate(JSON.stringify(this.expected,replacer),128)].join(\" \")},assert.AssertionError.__proto__=Error.prototype,assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,\"==\",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,\"!=\",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected)||fail(actual,expected,message,\"deepEqual\",assert.deepEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected)&&fail(actual,expected,message,\"notDeepEqual\",assert.notDeepEqual)},assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,\"===\",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,\"!==\",assert.notStrictEqual)},assert.throws=function(){_throws.apply(this,[!0].concat(pSlice.call(arguments)))},assert.doesNotThrow=function(){_throws.apply(this,[!1].concat(pSlice.call(arguments)))},assert.ifError=function(err){if(err)throw err}})()},{util:6,buffer:71}],74:[function(){},{}],69:[function(require,module){function isUndefinedOrNull(value){return null===value||void 0===value}function isArguments(object){return\"[object Arguments]\"==Object.prototype.toString.call(object)}function isNumberNaN(value){return\"number\"==typeof value&&value!==value}function areZerosEqual(zeroA,zeroB){return 1/zeroA===1/zeroB}function objEquiv(a,b){if(isUndefinedOrNull(a)||isUndefinedOrNull(b))return!1;if(a.prototype!==b.prototype)return!1;if(isArguments(a))return isArguments(b)?(a=pSlice.call(a),b=pSlice.call(b),deepEqual(a,b)):!1;try{var key,i,ka=Object_keys(a),kb=Object_keys(b)}catch(e){return!1}if(ka.length!=kb.length)return!1;for(ka.sort(),kb.sort(),i=ka.length-1;i>=0;i--)if(ka[i]!=kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!deepEqual(a[key],b[key]))return!1;return!0}var pSlice=Array.prototype.slice,Object_keys=\"function\"==typeof Object.keys?Object.keys:function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},deepEqual=module.exports=function(actual,expected){return 0===actual&&0===expected?areZerosEqual(actual,expected):actual===expected?!0:actual instanceof Date&&expected instanceof Date?actual.getTime()===expected.getTime():isNumberNaN(actual)?isNumberNaN(expected):\"object\"!=typeof actual&&\"object\"!=typeof expected?actual==expected:objEquiv(actual,expected)}},{}],68:[function(require,module){\"use strict\";var colorNums={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},backgroundColorNums={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},colors={};Object.keys(colorNums).forEach(function(k){colors[k]=function(s){return\"\u001b[\"+colorNums[k]+\"m\"+s+\"\u001b[39m\"}}),Object.keys(backgroundColorNums).forEach(function(k){colors[k]=function(s){return\"\u001b[\"+backgroundColorNums[k]+\"m\"+s+\"\u001b[49m\"}}),module.exports=colors},{}],70:[function(require,module,exports){(function(){(function(root,factory){\"use strict\";\"function\"==typeof define&&define.amd?define([\"exports\"],factory):exports!==void 0?factory(exports):factory(root.esprima={})})(this,function(exports){\"use strict\";function assert(condition,message){if(!condition)throw Error(\"ASSERT: \"+message)}function sliceSource(from,to){return source.slice(from,to)}function isDecimalDigit(ch){return\"0123456789\".indexOf(ch)>=0}function isHexDigit(ch){return\"0123456789abcdefABCDEF\".indexOf(ch)>=0}function isOctalDigit(ch){return\"01234567\".indexOf(ch)>=0}function isWhiteSpace(ch){return\" \"===ch||\"\t\"===ch||\"\u000b\"===ch||\"\\f\"===ch||\" \"===ch||ch.charCodeAt(0)>=5760&&\" ᠎              \".indexOf(ch)>=0}function isLineTerminator(ch){return\"\\n\"===ch||\"\\r\"===ch||\"\\u2028\"===ch||\"\\u2029\"===ch}function isIdentifierStart(ch){return\"$\"===ch||\"_\"===ch||\"\\\\\"===ch||ch>=\"a\"&&\"z\">=ch||ch>=\"A\"&&\"Z\">=ch||ch.charCodeAt(0)>=128&&Regex.NonAsciiIdentifierStart.test(ch)}function isIdentifierPart(ch){return\"$\"===ch||\"_\"===ch||\"\\\\\"===ch||ch>=\"a\"&&\"z\">=ch||ch>=\"A\"&&\"Z\">=ch||ch>=\"0\"&&\"9\">=ch||ch.charCodeAt(0)>=128&&Regex.NonAsciiIdentifierPart.test(ch)}function isFutureReservedWord(id){switch(id){case\"class\":case\"enum\":case\"export\":case\"extends\":case\"import\":case\"super\":return!0}return!1}function isStrictModeReservedWord(id){switch(id){case\"implements\":case\"interface\":case\"package\":case\"private\":case\"protected\":case\"public\":case\"static\":case\"yield\":case\"let\":return!0}return!1}function isRestrictedWord(id){return\"eval\"===id||\"arguments\"===id}function isKeyword(id){var keyword=!1;switch(id.length){case 2:keyword=\"if\"===id||\"in\"===id||\"do\"===id;break;case 3:keyword=\"var\"===id||\"for\"===id||\"new\"===id||\"try\"===id;break;case 4:keyword=\"this\"===id||\"else\"===id||\"case\"===id||\"void\"===id||\"with\"===id;break;case 5:keyword=\"while\"===id||\"break\"===id||\"catch\"===id||\"throw\"===id;break;case 6:keyword=\"return\"===id||\"typeof\"===id||\"delete\"===id||\"switch\"===id;break;case 7:keyword=\"default\"===id||\"finally\"===id;break;case 8:keyword=\"function\"===id||\"continue\"===id||\"debugger\"===id;break;case 10:keyword=\"instanceof\"===id}if(keyword)return!0;switch(id){case\"const\":return!0;case\"yield\":case\"let\":return!0}return strict&&isStrictModeReservedWord(id)?!0:isFutureReservedWord(id)}function skipComment(){var ch,blockComment,lineComment;for(blockComment=!1,lineComment=!1;length>index;)if(ch=source[index],lineComment)ch=source[index++],isLineTerminator(ch)&&(lineComment=!1,\"\\r\"===ch&&\"\\n\"===source[index]&&++index,++lineNumber,lineStart=index);else if(blockComment)isLineTerminator(ch)?(\"\\r\"===ch&&\"\\n\"===source[index+1]&&++index,++lineNumber,++index,lineStart=index,index>=length&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")):(ch=source[index++],index>=length&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\"),\"*\"===ch&&(ch=source[index],\"/\"===ch&&(++index,blockComment=!1)));else if(\"/\"===ch)if(ch=source[index+1],\"/\"===ch)index+=2,lineComment=!0;else{if(\"*\"!==ch)break;index+=2,blockComment=!0,index>=length&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")}else if(isWhiteSpace(ch))++index;else{if(!isLineTerminator(ch))break;++index,\"\\r\"===ch&&\"\\n\"===source[index]&&++index,++lineNumber,lineStart=index}}function scanHexEscape(prefix){var i,len,ch,code=0;for(len=\"u\"===prefix?4:2,i=0;len>i;++i){if(!(length>index&&isHexDigit(source[index])))return\"\";ch=source[index++],code=16*code+\"0123456789abcdef\".indexOf(ch.toLowerCase())}return String.fromCharCode(code)}function scanIdentifier(){var ch,start,id,restore;if(ch=source[index],isIdentifierStart(ch)){if(start=index,\"\\\\\"===ch){if(++index,\"u\"!==source[index])return;if(++index,restore=index,ch=scanHexEscape(\"u\")){if(\"\\\\\"===ch||!isIdentifierStart(ch))return;id=ch}else index=restore,id=\"u\"}else id=source[index++];for(;length>index&&(ch=source[index],isIdentifierPart(ch));)if(\"\\\\\"===ch){if(++index,\"u\"!==source[index])return;if(++index,restore=index,ch=scanHexEscape(\"u\")){if(\"\\\\\"===ch||!isIdentifierPart(ch))return;id+=ch}else index=restore,id+=\"u\"}else id+=source[index++];return 1===id.length?{type:Token.Identifier,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}:isKeyword(id)?{type:Token.Keyword,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}:\"null\"===id?{type:Token.NullLiteral,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}:\"true\"===id||\"false\"===id?{type:Token.BooleanLiteral,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}:{type:Token.Identifier,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}function scanPunctuator(){var ch2,ch3,ch4,start=index,ch1=source[index];return\";\"===ch1||\"{\"===ch1||\"}\"===ch1?(++index,{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\",\"===ch1||\"(\"===ch1||\")\"===ch1?(++index,{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):(ch2=source[index+1],\".\"!==ch1||isDecimalDigit(ch2)?(ch3=source[index+2],ch4=source[index+3],\">\"===ch1&&\">\"===ch2&&\">\"===ch3&&\"=\"===ch4?(index+=4,{type:Token.Punctuator,value:\">>>=\",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\"=\"===ch1&&\"=\"===ch2&&\"=\"===ch3?(index+=3,{type:Token.Punctuator,value:\"===\",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\"!\"===ch1&&\"=\"===ch2&&\"=\"===ch3?(index+=3,{type:Token.Punctuator,value:\"!==\",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\">\"===ch1&&\">\"===ch2&&\">\"===ch3?(index+=3,{type:Token.Punctuator,value:\">>>\",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\"\u003C\"===ch1&&\"\u003C\"===ch2&&\"=\"===ch3?(index+=3,{type:Token.Punctuator,value:\"\u003C\u003C=\",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\">\"===ch1&&\">\"===ch2&&\"=\"===ch3?(index+=3,{type:Token.Punctuator,value:\">>=\",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\"=\"===ch2&&\"\u003C>=!+-*%&|^/\".indexOf(ch1)>=0?(index+=2,{type:Token.Punctuator,value:ch1+ch2,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):ch1===ch2&&\"+-\u003C>&|\".indexOf(ch1)>=0&&\"+-\u003C>&|\".indexOf(ch2)>=0?(index+=2,{type:Token.Punctuator,value:ch1+ch2,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}):\"[]\u003C>+-*%&|^!~?:=/\".indexOf(ch1)>=0?{type:Token.Punctuator,value:source[index++],lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}:void 0):{type:Token.Punctuator,value:source[index++],lineNumber:lineNumber,lineStart:lineStart,range:[start,index]})}function scanNumericLiteral(){var number,start,ch;if(ch=source[index],assert(isDecimalDigit(ch)||\".\"===ch,\"Numeric literal must start with a decimal digit or a decimal point\"),start=index,number=\"\",\".\"!==ch){if(number=source[index++],ch=source[index],\"0\"===number){if(\"x\"===ch||\"X\"===ch){for(number+=source[index++];length>index&&(ch=source[index],isHexDigit(ch));)number+=source[index++];return 2>=number.length&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\"),length>index&&(ch=source[index],isIdentifierStart(ch)&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")),{type:Token.NumericLiteral,value:parseInt(number,16),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(isOctalDigit(ch)){for(number+=source[index++];length>index&&(ch=source[index],isOctalDigit(ch));)number+=source[index++];return length>index&&(ch=source[index],(isIdentifierStart(ch)||isDecimalDigit(ch))&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")),{type:Token.NumericLiteral,value:parseInt(number,8),octal:!0,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}isDecimalDigit(ch)&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")}for(;length>index&&(ch=source[index],isDecimalDigit(ch));)number+=source[index++]}if(\".\"===ch)for(number+=source[index++];length>index&&(ch=source[index],isDecimalDigit(ch));)number+=source[index++];if(\"e\"===ch||\"E\"===ch)if(number+=source[index++],ch=source[index],(\"+\"===ch||\"-\"===ch)&&(number+=source[index++]),ch=source[index],isDecimalDigit(ch))for(number+=source[index++];length>index&&(ch=source[index],isDecimalDigit(ch));)number+=source[index++];else ch=\"character \"+ch,index>=length&&(ch=\"\u003Cend>\"),throwError({},Messages.UnexpectedToken,\"ILLEGAL\");return length>index&&(ch=source[index],isIdentifierStart(ch)&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")),{type:Token.NumericLiteral,value:parseFloat(number),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanStringLiteral(){var quote,start,ch,code,unescaped,restore,str=\"\",octal=!1;for(quote=source[index],assert(\"'\"===quote||'\"'===quote,\"String literal must starts with a quote\"),start=index,++index;length>index;){if(ch=source[index++],ch===quote){quote=\"\";break}if(\"\\\\\"===ch)if(ch=source[index++],isLineTerminator(ch))++lineNumber,\"\\r\"===ch&&\"\\n\"===source[index]&&++index;else switch(ch){case\"n\":str+=\"\\n\";break;case\"r\":str+=\"\\r\";break;case\"t\":str+=\"\t\";break;case\"u\":case\"x\":restore=index,unescaped=scanHexEscape(ch),unescaped?str+=unescaped:(index=restore,str+=ch);break;case\"b\":str+=\"\\b\";break;case\"f\":str+=\"\\f\";break;case\"v\":str+=\"\u000b\";break;default:isOctalDigit(ch)?(code=\"01234567\".indexOf(ch),0!==code&&(octal=!0),length>index&&isOctalDigit(source[index])&&(octal=!0,code=8*code+\"01234567\".indexOf(source[index++]),\"0123\".indexOf(ch)>=0&&length>index&&isOctalDigit(source[index])&&(code=8*code+\"01234567\".indexOf(source[index++]))),str+=String.fromCharCode(code)):str+=ch}else{if(isLineTerminator(ch))break;str+=ch}}return\"\"!==quote&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\"),{type:Token.StringLiteral,value:str,octal:octal,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanRegExp(){var str,ch,start,pattern,flags,value,restore,classMarker=!1,terminated=!1;for(buffer=null,skipComment(),start=index,ch=source[index],assert(\"/\"===ch,\"Regular expression literal must start with a slash\"),str=source[index++];length>index;)if(ch=source[index++],str+=ch,classMarker)\"]\"===ch&&(classMarker=!1);else if(\"\\\\\"===ch)ch=source[index++],isLineTerminator(ch)&&throwError({},Messages.UnterminatedRegExp),str+=ch;else{if(\"/\"===ch){terminated=!0;break}\"[\"===ch?classMarker=!0:isLineTerminator(ch)&&throwError({},Messages.UnterminatedRegExp)}for(terminated||throwError({},Messages.UnterminatedRegExp),pattern=str.substr(1,str.length-2),flags=\"\";length>index&&(ch=source[index],isIdentifierPart(ch));)if(++index,\"\\\\\"===ch&&length>index)if(ch=source[index],\"u\"===ch)if(++index,restore=index,ch=scanHexEscape(\"u\"))for(flags+=ch,str+=\"\\\\u\";index>restore;++restore)str+=source[restore];else index=restore,flags+=\"u\",str+=\"\\\\u\";else str+=\"\\\\\";else flags+=ch,str+=ch;try{value=RegExp(pattern,flags)}catch(e){throwError({},Messages.InvalidRegExp)}return{literal:str,value:value,range:[start,index]}}function isIdentifierName(token){return token.type===Token.Identifier||token.type===Token.Keyword||token.type===Token.BooleanLiteral||token.type===Token.NullLiteral}function advance(){var ch,token;return skipComment(),index>=length?{type:Token.EOF,lineNumber:lineNumber,lineStart:lineStart,range:[index,index]}:(token=scanPunctuator(),token!==void 0?token:(ch=source[index],\"'\"===ch||'\"'===ch?scanStringLiteral():\".\"===ch||isDecimalDigit(ch)?scanNumericLiteral():(token=scanIdentifier(),token!==void 0?token:(throwError({},Messages.UnexpectedToken,\"ILLEGAL\"),void 0))))}function lex(){var token;return buffer?(index=buffer.range[1],lineNumber=buffer.lineNumber,lineStart=buffer.lineStart,token=buffer,buffer=null,token):(buffer=null,advance())}function lookahead(){var pos,line,start;return null!==buffer?buffer:(pos=index,line=lineNumber,start=lineStart,buffer=advance(),index=pos,lineNumber=line,lineStart=start,buffer)}function peekLineTerminator(){var pos,line,start,found;return pos=index,line=lineNumber,start=lineStart,skipComment(),found=lineNumber!==line,index=pos,lineNumber=line,lineStart=start,found}function throwError(token,messageFormat){var error,args=Array.prototype.slice.call(arguments,2),msg=messageFormat.replace(/%(\\d)/g,function(whole,index){return args[index]||\"\"});throw\"number\"==typeof token.lineNumber?(error=Error(\"Line \"+token.lineNumber+\": \"+msg),error.index=token.range[0],error.lineNumber=token.lineNumber,error.column=token.range[0]-lineStart+1):(error=Error(\"Line \"+lineNumber+\": \"+msg),error.index=index,error.lineNumber=lineNumber,error.column=index-lineStart+1),error}function throwErrorTolerant(){try{throwError.apply(null,arguments)}catch(e){if(!extra.errors)throw e;extra.errors.push(e)}}function throwUnexpected(token){if(token.type===Token.EOF&&throwError(token,Messages.UnexpectedEOS),token.type===Token.NumericLiteral&&throwError(token,Messages.UnexpectedNumber),token.type===Token.StringLiteral&&throwError(token,Messages.UnexpectedString),token.type===Token.Identifier&&throwError(token,Messages.UnexpectedIdentifier),token.type===Token.Keyword){if(isFutureReservedWord(token.value))throwError(token,Messages.UnexpectedReserved);else if(strict&&isStrictModeReservedWord(token.value))return throwErrorTolerant(token,Messages.StrictReservedWord),void 0;throwError(token,Messages.UnexpectedToken,token.value)}throwError(token,Messages.UnexpectedToken,token.value)}function expect(value){var token=lex();(token.type!==Token.Punctuator||token.value!==value)&&throwUnexpected(token)}function expectKeyword(keyword){var token=lex();(token.type!==Token.Keyword||token.value!==keyword)&&throwUnexpected(token)}function match(value){var token=lookahead();return token.type===Token.Punctuator&&token.value===value}function matchKeyword(keyword){var token=lookahead();return token.type===Token.Keyword&&token.value===keyword}function matchAssign(){var token=lookahead(),op=token.value;return token.type!==Token.Punctuator?!1:\"=\"===op||\"*=\"===op||\"/=\"===op||\"%=\"===op||\"+=\"===op||\"-=\"===op||\"\u003C\u003C=\"===op||\">>=\"===op||\">>>=\"===op||\"&=\"===op||\"^=\"===op||\"|=\"===op}function consumeSemicolon(){var token,line;if(\";\"===source[index])return lex(),void 0;if(line=lineNumber,skipComment(),lineNumber===line){if(match(\";\"))return lex(),void 0;token=lookahead(),token.type===Token.EOF||match(\"}\")||throwUnexpected(token)}}function isLeftHandSide(expr){return expr.type===Syntax.Identifier||expr.type===Syntax.MemberExpression}function parseArrayInitialiser(){var elements=[];for(expect(\"[\");!match(\"]\");)match(\",\")?(lex(),elements.push(null)):(elements.push(parseAssignmentExpression()),match(\"]\")||expect(\",\"));return expect(\"]\"),{type:Syntax.ArrayExpression,elements:elements}}function parsePropertyFunction(param,first){var previousStrict,body;return previousStrict=strict,body=parseFunctionSourceElements(),first&&strict&&isRestrictedWord(param[0].name)&&throwErrorTolerant(first,Messages.StrictParamName),strict=previousStrict,{type:Syntax.FunctionExpression,id:null,params:param,defaults:[],body:body,rest:null,generator:!1,expression:!1}}function parseObjectPropertyKey(){var token=lex();return token.type===Token.StringLiteral||token.type===Token.NumericLiteral?(strict&&token.octal&&throwErrorTolerant(token,Messages.StrictOctalLiteral),createLiteral(token)):{type:Syntax.Identifier,name:token.value}}function parseObjectProperty(){var token,key,id,param;return token=lookahead(),token.type===Token.Identifier?(id=parseObjectPropertyKey(),\"get\"!==token.value||match(\":\")?\"set\"!==token.value||match(\":\")?(expect(\":\"),{type:Syntax.Property,key:id,value:parseAssignmentExpression(),kind:\"init\"}):(key=parseObjectPropertyKey(),expect(\"(\"),token=lookahead(),token.type!==Token.Identifier&&throwUnexpected(lex()),param=[parseVariableIdentifier()],expect(\")\"),{type:Syntax.Property,key:key,value:parsePropertyFunction(param,token),kind:\"set\"}):(key=parseObjectPropertyKey(),expect(\"(\"),expect(\")\"),{type:Syntax.Property,key:key,value:parsePropertyFunction([]),kind:\"get\"})):token.type!==Token.EOF&&token.type!==Token.Punctuator?(key=parseObjectPropertyKey(),expect(\":\"),{type:Syntax.Property,key:key,value:parseAssignmentExpression(),kind:\"init\"}):(throwUnexpected(token),void 0)}function parseObjectInitialiser(){var property,name,kind,properties=[],map={},toString=String;for(expect(\"{\");!match(\"}\");)property=parseObjectProperty(),name=property.key.type===Syntax.Identifier?property.key.name:toString(property.key.value),kind=\"init\"===property.kind?PropertyKind.Data:\"get\"===property.kind?PropertyKind.Get:PropertyKind.Set,Object.prototype.hasOwnProperty.call(map,name)?(map[name]===PropertyKind.Data?strict&&kind===PropertyKind.Data?throwErrorTolerant({},Messages.StrictDuplicateProperty):kind!==PropertyKind.Data&&throwErrorTolerant({},Messages.AccessorDataProperty):kind===PropertyKind.Data?throwErrorTolerant({},Messages.AccessorDataProperty):map[name]&kind&&throwErrorTolerant({},Messages.AccessorGetSet),map[name]|=kind):map[name]=kind,properties.push(property),match(\"}\")||expect(\",\");return expect(\"}\"),{type:Syntax.ObjectExpression,properties:properties}}function parseGroupExpression(){var expr;return expect(\"(\"),expr=parseExpression(),expect(\")\"),expr}function parsePrimaryExpression(){var token=lookahead(),type=token.type;if(type===Token.Identifier)return{type:Syntax.Identifier,name:lex().value};if(type===Token.StringLiteral||type===Token.NumericLiteral)return strict&&token.octal&&throwErrorTolerant(token,Messages.StrictOctalLiteral),createLiteral(lex());if(type===Token.Keyword){if(matchKeyword(\"this\"))return lex(),{type:Syntax.ThisExpression};if(matchKeyword(\"function\"))return parseFunctionExpression()}return type===Token.BooleanLiteral?(lex(),token.value=\"true\"===token.value,createLiteral(token)):type===Token.NullLiteral?(lex(),token.value=null,createLiteral(token)):match(\"[\")?parseArrayInitialiser():match(\"{\")?parseObjectInitialiser():match(\"(\")?parseGroupExpression():match(\"/\")||match(\"/=\")?createLiteral(scanRegExp()):throwUnexpected(lex())}function parseArguments(){var args=[];if(expect(\"(\"),!match(\")\"))for(;length>index&&(args.push(parseAssignmentExpression()),!match(\")\"));)expect(\",\");return expect(\")\"),args}function parseNonComputedProperty(){var token=lex();return isIdentifierName(token)||throwUnexpected(token),{type:Syntax.Identifier,name:token.value}}function parseNonComputedMember(){return expect(\".\"),parseNonComputedProperty()}function parseComputedMember(){var expr;return expect(\"[\"),expr=parseExpression(),expect(\"]\"),expr}function parseNewExpression(){var expr;return expectKeyword(\"new\"),expr={type:Syntax.NewExpression,callee:parseLeftHandSideExpression(),arguments:[]},match(\"(\")&&(expr.arguments=parseArguments()),expr}function parseLeftHandSideExpressionAllowCall(){var expr;for(expr=matchKeyword(\"new\")?parseNewExpression():parsePrimaryExpression();match(\".\")||match(\"[\")||match(\"(\");)expr=match(\"(\")?{type:Syntax.CallExpression,callee:expr,arguments:parseArguments()}:match(\"[\")?{type:Syntax.MemberExpression,computed:!0,object:expr,property:parseComputedMember()}:{type:Syntax.MemberExpression,computed:!1,object:expr,property:parseNonComputedMember()};return expr}function parseLeftHandSideExpression(){var expr;for(expr=matchKeyword(\"new\")?parseNewExpression():parsePrimaryExpression();match(\".\")||match(\"[\");)expr=match(\"[\")?{type:Syntax.MemberExpression,computed:!0,object:expr,property:parseComputedMember()}:{type:Syntax.MemberExpression,computed:!1,object:expr,property:parseNonComputedMember()};return expr}function parsePostfixExpression(){var token,expr=parseLeftHandSideExpressionAllowCall();return token=lookahead(),token.type!==Token.Punctuator?expr:(!match(\"++\")&&!match(\"--\")||peekLineTerminator()||(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)&&throwErrorTolerant({},Messages.StrictLHSPostfix),isLeftHandSide(expr)||throwError({},Messages.InvalidLHSInAssignment),expr={type:Syntax.UpdateExpression,operator:lex().value,argument:expr,prefix:!1}),expr)}function parseUnaryExpression(){var token,expr;return token=lookahead(),token.type!==Token.Punctuator&&token.type!==Token.Keyword?parsePostfixExpression():match(\"++\")||match(\"--\")?(token=lex(),expr=parseUnaryExpression(),strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)&&throwErrorTolerant({},Messages.StrictLHSPrefix),isLeftHandSide(expr)||throwError({},Messages.InvalidLHSInAssignment),expr={type:Syntax.UpdateExpression,operator:token.value,argument:expr,prefix:!0}):match(\"+\")||match(\"-\")||match(\"~\")||match(\"!\")?expr={type:Syntax.UnaryExpression,operator:lex().value,argument:parseUnaryExpression()}:matchKeyword(\"delete\")||matchKeyword(\"void\")||matchKeyword(\"typeof\")?(expr={type:Syntax.UnaryExpression,operator:lex().value,argument:parseUnaryExpression()},strict&&\"delete\"===expr.operator&&expr.argument.type===Syntax.Identifier&&throwErrorTolerant({},Messages.StrictDelete),expr):parsePostfixExpression()\n}function parseMultiplicativeExpression(){for(var expr=parseUnaryExpression();match(\"*\")||match(\"/\")||match(\"%\");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseUnaryExpression()};return expr}function parseAdditiveExpression(){for(var expr=parseMultiplicativeExpression();match(\"+\")||match(\"-\");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseMultiplicativeExpression()};return expr}function parseShiftExpression(){for(var expr=parseAdditiveExpression();match(\"\u003C\u003C\")||match(\">>\")||match(\">>>\");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseAdditiveExpression()};return expr}function parseRelationalExpression(){var expr,previousAllowIn;for(previousAllowIn=state.allowIn,state.allowIn=!0,expr=parseShiftExpression();match(\"\u003C\")||match(\">\")||match(\"\u003C=\")||match(\">=\")||previousAllowIn&&matchKeyword(\"in\")||matchKeyword(\"instanceof\");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseShiftExpression()};return state.allowIn=previousAllowIn,expr}function parseEqualityExpression(){for(var expr=parseRelationalExpression();match(\"==\")||match(\"!=\")||match(\"===\")||match(\"!==\");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseRelationalExpression()};return expr}function parseBitwiseANDExpression(){for(var expr=parseEqualityExpression();match(\"&\");)lex(),expr={type:Syntax.BinaryExpression,operator:\"&\",left:expr,right:parseEqualityExpression()};return expr}function parseBitwiseXORExpression(){for(var expr=parseBitwiseANDExpression();match(\"^\");)lex(),expr={type:Syntax.BinaryExpression,operator:\"^\",left:expr,right:parseBitwiseANDExpression()};return expr}function parseBitwiseORExpression(){for(var expr=parseBitwiseXORExpression();match(\"|\");)lex(),expr={type:Syntax.BinaryExpression,operator:\"|\",left:expr,right:parseBitwiseXORExpression()};return expr}function parseLogicalANDExpression(){for(var expr=parseBitwiseORExpression();match(\"&&\");)lex(),expr={type:Syntax.LogicalExpression,operator:\"&&\",left:expr,right:parseBitwiseORExpression()};return expr}function parseLogicalORExpression(){for(var expr=parseLogicalANDExpression();match(\"||\");)lex(),expr={type:Syntax.LogicalExpression,operator:\"||\",left:expr,right:parseLogicalANDExpression()};return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent;return expr=parseLogicalORExpression(),match(\"?\")&&(lex(),previousAllowIn=state.allowIn,state.allowIn=!0,consequent=parseAssignmentExpression(),state.allowIn=previousAllowIn,expect(\":\"),expr={type:Syntax.ConditionalExpression,test:expr,consequent:consequent,alternate:parseAssignmentExpression()}),expr}function parseAssignmentExpression(){var token,expr;return token=lookahead(),expr=parseConditionalExpression(),matchAssign()&&(isLeftHandSide(expr)||throwError({},Messages.InvalidLHSInAssignment),strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)&&throwErrorTolerant(token,Messages.StrictLHSAssignment),expr={type:Syntax.AssignmentExpression,operator:lex().value,left:expr,right:parseAssignmentExpression()}),expr}function parseExpression(){var expr=parseAssignmentExpression();if(match(\",\"))for(expr={type:Syntax.SequenceExpression,expressions:[expr]};length>index&&match(\",\");)lex(),expr.expressions.push(parseAssignmentExpression());return expr}function parseStatementList(){for(var statement,list=[];length>index&&!match(\"}\")&&(statement=parseSourceElement(),void 0!==statement);)list.push(statement);return list}function parseBlock(){var block;return expect(\"{\"),block=parseStatementList(),expect(\"}\"),{type:Syntax.BlockStatement,body:block}}function parseVariableIdentifier(){var token=lex();return token.type!==Token.Identifier&&throwUnexpected(token),{type:Syntax.Identifier,name:token.value}}function parseVariableDeclaration(kind){var id=parseVariableIdentifier(),init=null;return strict&&isRestrictedWord(id.name)&&throwErrorTolerant({},Messages.StrictVarName),\"const\"===kind?(expect(\"=\"),init=parseAssignmentExpression()):match(\"=\")&&(lex(),init=parseAssignmentExpression()),{type:Syntax.VariableDeclarator,id:id,init:init}}function parseVariableDeclarationList(kind){for(var list=[];length>index&&(list.push(parseVariableDeclaration(kind)),match(\",\"));)lex();return list}function parseVariableStatement(){var declarations;return expectKeyword(\"var\"),declarations=parseVariableDeclarationList(),consumeSemicolon(),{type:Syntax.VariableDeclaration,declarations:declarations,kind:\"var\"}}function parseConstLetDeclaration(kind){var declarations;return expectKeyword(kind),declarations=parseVariableDeclarationList(kind),consumeSemicolon(),{type:Syntax.VariableDeclaration,declarations:declarations,kind:kind}}function parseEmptyStatement(){return expect(\";\"),{type:Syntax.EmptyStatement}}function parseExpressionStatement(){var expr=parseExpression();return consumeSemicolon(),{type:Syntax.ExpressionStatement,expression:expr}}function parseIfStatement(){var test,consequent,alternate;return expectKeyword(\"if\"),expect(\"(\"),test=parseExpression(),expect(\")\"),consequent=parseStatement(),matchKeyword(\"else\")?(lex(),alternate=parseStatement()):alternate=null,{type:Syntax.IfStatement,test:test,consequent:consequent,alternate:alternate}}function parseDoWhileStatement(){var body,test,oldInIteration;return expectKeyword(\"do\"),oldInIteration=state.inIteration,state.inIteration=!0,body=parseStatement(),state.inIteration=oldInIteration,expectKeyword(\"while\"),expect(\"(\"),test=parseExpression(),expect(\")\"),match(\";\")&&lex(),{type:Syntax.DoWhileStatement,body:body,test:test}}function parseWhileStatement(){var test,body,oldInIteration;return expectKeyword(\"while\"),expect(\"(\"),test=parseExpression(),expect(\")\"),oldInIteration=state.inIteration,state.inIteration=!0,body=parseStatement(),state.inIteration=oldInIteration,{type:Syntax.WhileStatement,test:test,body:body}}function parseForVariableDeclaration(){var token=lex();return{type:Syntax.VariableDeclaration,declarations:parseVariableDeclarationList(),kind:token.value}}function parseForStatement(){var init,test,update,left,right,body,oldInIteration;return init=test=update=null,expectKeyword(\"for\"),expect(\"(\"),match(\";\")?lex():(matchKeyword(\"var\")||matchKeyword(\"let\")?(state.allowIn=!1,init=parseForVariableDeclaration(),state.allowIn=!0,1===init.declarations.length&&matchKeyword(\"in\")&&(lex(),left=init,right=parseExpression(),init=null)):(state.allowIn=!1,init=parseExpression(),state.allowIn=!0,matchKeyword(\"in\")&&(isLeftHandSide(init)||throwError({},Messages.InvalidLHSInForIn),lex(),left=init,right=parseExpression(),init=null)),left===void 0&&expect(\";\")),left===void 0&&(match(\";\")||(test=parseExpression()),expect(\";\"),match(\")\")||(update=parseExpression())),expect(\")\"),oldInIteration=state.inIteration,state.inIteration=!0,body=parseStatement(),state.inIteration=oldInIteration,left===void 0?{type:Syntax.ForStatement,init:init,test:test,update:update,body:body}:{type:Syntax.ForInStatement,left:left,right:right,body:body,each:!1}}function parseContinueStatement(){var token,label=null;return expectKeyword(\"continue\"),\";\"===source[index]?(lex(),state.inIteration||throwError({},Messages.IllegalContinue),{type:Syntax.ContinueStatement,label:null}):peekLineTerminator()?(state.inIteration||throwError({},Messages.IllegalContinue),{type:Syntax.ContinueStatement,label:null}):(token=lookahead(),token.type===Token.Identifier&&(label=parseVariableIdentifier(),Object.prototype.hasOwnProperty.call(state.labelSet,label.name)||throwError({},Messages.UnknownLabel,label.name)),consumeSemicolon(),null!==label||state.inIteration||throwError({},Messages.IllegalContinue),{type:Syntax.ContinueStatement,label:label})}function parseBreakStatement(){var token,label=null;return expectKeyword(\"break\"),\";\"===source[index]?(lex(),state.inIteration||state.inSwitch||throwError({},Messages.IllegalBreak),{type:Syntax.BreakStatement,label:null}):peekLineTerminator()?(state.inIteration||state.inSwitch||throwError({},Messages.IllegalBreak),{type:Syntax.BreakStatement,label:null}):(token=lookahead(),token.type===Token.Identifier&&(label=parseVariableIdentifier(),Object.prototype.hasOwnProperty.call(state.labelSet,label.name)||throwError({},Messages.UnknownLabel,label.name)),consumeSemicolon(),null!==label||state.inIteration||state.inSwitch||throwError({},Messages.IllegalBreak),{type:Syntax.BreakStatement,label:label})}function parseReturnStatement(){var token,argument=null;return expectKeyword(\"return\"),state.inFunctionBody||throwErrorTolerant({},Messages.IllegalReturn),\" \"===source[index]&&isIdentifierStart(source[index+1])?(argument=parseExpression(),consumeSemicolon(),{type:Syntax.ReturnStatement,argument:argument}):peekLineTerminator()?{type:Syntax.ReturnStatement,argument:null}:(match(\";\")||(token=lookahead(),match(\"}\")||token.type===Token.EOF||(argument=parseExpression())),consumeSemicolon(),{type:Syntax.ReturnStatement,argument:argument})}function parseWithStatement(){var object,body;return strict&&throwErrorTolerant({},Messages.StrictModeWith),expectKeyword(\"with\"),expect(\"(\"),object=parseExpression(),expect(\")\"),body=parseStatement(),{type:Syntax.WithStatement,object:object,body:body}}function parseSwitchCase(){var test,statement,consequent=[];for(matchKeyword(\"default\")?(lex(),test=null):(expectKeyword(\"case\"),test=parseExpression()),expect(\":\");length>index&&!(match(\"}\")||matchKeyword(\"default\")||matchKeyword(\"case\"))&&(statement=parseStatement(),void 0!==statement);)consequent.push(statement);return{type:Syntax.SwitchCase,test:test,consequent:consequent}}function parseSwitchStatement(){var discriminant,cases,clause,oldInSwitch,defaultFound;if(expectKeyword(\"switch\"),expect(\"(\"),discriminant=parseExpression(),expect(\")\"),expect(\"{\"),match(\"}\"))return lex(),{type:Syntax.SwitchStatement,discriminant:discriminant};for(cases=[],oldInSwitch=state.inSwitch,state.inSwitch=!0,defaultFound=!1;length>index&&!match(\"}\");)clause=parseSwitchCase(),null===clause.test&&(defaultFound&&throwError({},Messages.MultipleDefaultsInSwitch),defaultFound=!0),cases.push(clause);return state.inSwitch=oldInSwitch,expect(\"}\"),{type:Syntax.SwitchStatement,discriminant:discriminant,cases:cases}}function parseThrowStatement(){var argument;return expectKeyword(\"throw\"),peekLineTerminator()&&throwError({},Messages.NewlineAfterThrow),argument=parseExpression(),consumeSemicolon(),{type:Syntax.ThrowStatement,argument:argument}}function parseCatchClause(){var param;return expectKeyword(\"catch\"),expect(\"(\"),match(\")\")||(param=parseExpression(),strict&¶m.type===Syntax.Identifier&&isRestrictedWord(param.name)&&throwErrorTolerant({},Messages.StrictCatchVariable)),expect(\")\"),{type:Syntax.CatchClause,param:param,body:parseBlock()}}function parseTryStatement(){var block,handlers=[],finalizer=null;return expectKeyword(\"try\"),block=parseBlock(),matchKeyword(\"catch\")&&handlers.push(parseCatchClause()),matchKeyword(\"finally\")&&(lex(),finalizer=parseBlock()),0!==handlers.length||finalizer||throwError({},Messages.NoCatchOrFinally),{type:Syntax.TryStatement,block:block,guardedHandlers:[],handlers:handlers,finalizer:finalizer}}function parseDebuggerStatement(){return expectKeyword(\"debugger\"),consumeSemicolon(),{type:Syntax.DebuggerStatement}}function parseStatement(){var expr,labeledBody,token=lookahead();if(token.type===Token.EOF&&throwUnexpected(token),token.type===Token.Punctuator)switch(token.value){case\";\":return parseEmptyStatement();case\"{\":return parseBlock();case\"(\":return parseExpressionStatement();default:}if(token.type===Token.Keyword)switch(token.value){case\"break\":return parseBreakStatement();case\"continue\":return parseContinueStatement();case\"debugger\":return parseDebuggerStatement();case\"do\":return parseDoWhileStatement();case\"for\":return parseForStatement();case\"function\":return parseFunctionDeclaration();case\"if\":return parseIfStatement();case\"return\":return parseReturnStatement();case\"switch\":return parseSwitchStatement();case\"throw\":return parseThrowStatement();case\"try\":return parseTryStatement();case\"var\":return parseVariableStatement();case\"while\":return parseWhileStatement();case\"with\":return parseWithStatement();default:}return expr=parseExpression(),expr.type===Syntax.Identifier&&match(\":\")?(lex(),Object.prototype.hasOwnProperty.call(state.labelSet,expr.name)&&throwError({},Messages.Redeclaration,\"Label\",expr.name),state.labelSet[expr.name]=!0,labeledBody=parseStatement(),delete state.labelSet[expr.name],{type:Syntax.LabeledStatement,label:expr,body:labeledBody}):(consumeSemicolon(),{type:Syntax.ExpressionStatement,expression:expr})}function parseFunctionSourceElements(){var sourceElement,token,directive,firstRestricted,oldLabelSet,oldInIteration,oldInSwitch,oldInFunctionBody,sourceElements=[];for(expect(\"{\");length>index&&(token=lookahead(),token.type===Token.StringLiteral)&&(sourceElement=parseSourceElement(),sourceElements.push(sourceElement),sourceElement.expression.type===Syntax.Literal);)directive=sliceSource(token.range[0]+1,token.range[1]-1),\"use strict\"===directive?(strict=!0,firstRestricted&&throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)):!firstRestricted&&token.octal&&(firstRestricted=token);for(oldLabelSet=state.labelSet,oldInIteration=state.inIteration,oldInSwitch=state.inSwitch,oldInFunctionBody=state.inFunctionBody,state.labelSet={},state.inIteration=!1,state.inSwitch=!1,state.inFunctionBody=!0;length>index&&!match(\"}\")&&(sourceElement=parseSourceElement(),void 0!==sourceElement);)sourceElements.push(sourceElement);return expect(\"}\"),state.labelSet=oldLabelSet,state.inIteration=oldInIteration,state.inSwitch=oldInSwitch,state.inFunctionBody=oldInFunctionBody,{type:Syntax.BlockStatement,body:sourceElements}}function parseFunctionDeclaration(){var id,param,body,token,stricted,firstRestricted,message,previousStrict,paramSet,params=[];if(expectKeyword(\"function\"),token=lookahead(),id=parseVariableIdentifier(),strict?isRestrictedWord(token.value)&&throwErrorTolerant(token,Messages.StrictFunctionName):isRestrictedWord(token.value)?(firstRestricted=token,message=Messages.StrictFunctionName):isStrictModeReservedWord(token.value)&&(firstRestricted=token,message=Messages.StrictReservedWord),expect(\"(\"),!match(\")\"))for(paramSet={};length>index&&(token=lookahead(),param=parseVariableIdentifier(),strict?(isRestrictedWord(token.value)&&(stricted=token,message=Messages.StrictParamName),Object.prototype.hasOwnProperty.call(paramSet,token.value)&&(stricted=token,message=Messages.StrictParamDupe)):firstRestricted||(isRestrictedWord(token.value)?(firstRestricted=token,message=Messages.StrictParamName):isStrictModeReservedWord(token.value)?(firstRestricted=token,message=Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(paramSet,token.value)&&(firstRestricted=token,message=Messages.StrictParamDupe)),params.push(param),paramSet[param.name]=!0,!match(\")\"));)expect(\",\");return expect(\")\"),previousStrict=strict,body=parseFunctionSourceElements(),strict&&firstRestricted&&throwError(firstRestricted,message),strict&&stricted&&throwErrorTolerant(stricted,message),strict=previousStrict,{type:Syntax.FunctionDeclaration,id:id,params:params,defaults:[],body:body,rest:null,generator:!1,expression:!1}}function parseFunctionExpression(){var token,stricted,firstRestricted,message,param,body,previousStrict,paramSet,id=null,params=[];if(expectKeyword(\"function\"),match(\"(\")||(token=lookahead(),id=parseVariableIdentifier(),strict?isRestrictedWord(token.value)&&throwErrorTolerant(token,Messages.StrictFunctionName):isRestrictedWord(token.value)?(firstRestricted=token,message=Messages.StrictFunctionName):isStrictModeReservedWord(token.value)&&(firstRestricted=token,message=Messages.StrictReservedWord)),expect(\"(\"),!match(\")\"))for(paramSet={};length>index&&(token=lookahead(),param=parseVariableIdentifier(),strict?(isRestrictedWord(token.value)&&(stricted=token,message=Messages.StrictParamName),Object.prototype.hasOwnProperty.call(paramSet,token.value)&&(stricted=token,message=Messages.StrictParamDupe)):firstRestricted||(isRestrictedWord(token.value)?(firstRestricted=token,message=Messages.StrictParamName):isStrictModeReservedWord(token.value)?(firstRestricted=token,message=Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(paramSet,token.value)&&(firstRestricted=token,message=Messages.StrictParamDupe)),params.push(param),paramSet[param.name]=!0,!match(\")\"));)expect(\",\");return expect(\")\"),previousStrict=strict,body=parseFunctionSourceElements(),strict&&firstRestricted&&throwError(firstRestricted,message),strict&&stricted&&throwErrorTolerant(stricted,message),strict=previousStrict,{type:Syntax.FunctionExpression,id:id,params:params,defaults:[],body:body,rest:null,generator:!1,expression:!1}}function parseSourceElement(){var token=lookahead();if(token.type===Token.Keyword)switch(token.value){case\"const\":case\"let\":return parseConstLetDeclaration(token.value);case\"function\":return parseFunctionDeclaration();default:return parseStatement()}return token.type!==Token.EOF?parseStatement():void 0}function parseSourceElements(){for(var sourceElement,token,directive,firstRestricted,sourceElements=[];length>index&&(token=lookahead(),token.type===Token.StringLiteral)&&(sourceElement=parseSourceElement(),sourceElements.push(sourceElement),sourceElement.expression.type===Syntax.Literal);)directive=sliceSource(token.range[0]+1,token.range[1]-1),\"use strict\"===directive?(strict=!0,firstRestricted&&throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)):!firstRestricted&&token.octal&&(firstRestricted=token);for(;length>index&&(sourceElement=parseSourceElement(),void 0!==sourceElement);)sourceElements.push(sourceElement);return sourceElements}function parseProgram(){var program;return strict=!1,program={type:Syntax.Program,body:parseSourceElements()}}function addComment(type,value,start,end,loc){assert(\"number\"==typeof start,\"Comment must have valid position\"),extra.comments.length>0&&extra.comments[extra.comments.length-1].range[1]>start||extra.comments.push({type:type,value:value,range:[start,end],loc:loc})}function scanComment(){var comment,ch,loc,start,blockComment,lineComment;for(comment=\"\",blockComment=!1,lineComment=!1;length>index;)if(ch=source[index],lineComment)ch=source[index++],isLineTerminator(ch)?(loc.end={line:lineNumber,column:index-lineStart-1},lineComment=!1,addComment(\"Line\",comment,start,index-1,loc),\"\\r\"===ch&&\"\\n\"===source[index]&&++index,++lineNumber,lineStart=index,comment=\"\"):index>=length?(lineComment=!1,comment+=ch,loc.end={line:lineNumber,column:length-lineStart},addComment(\"Line\",comment,start,length,loc)):comment+=ch;else if(blockComment)isLineTerminator(ch)?(\"\\r\"===ch&&\"\\n\"===source[index+1]?(++index,comment+=\"\\r\\n\"):comment+=ch,++lineNumber,++index,lineStart=index,index>=length&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")):(ch=source[index++],index>=length&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\"),comment+=ch,\"*\"===ch&&(ch=source[index],\"/\"===ch&&(comment=comment.substr(0,comment.length-1),blockComment=!1,++index,loc.end={line:lineNumber,column:index-lineStart},addComment(\"Block\",comment,start,index,loc),comment=\"\")));else if(\"/\"===ch)if(ch=source[index+1],\"/\"===ch)loc={start:{line:lineNumber,column:index-lineStart}},start=index,index+=2,lineComment=!0,index>=length&&(loc.end={line:lineNumber,column:index-lineStart},lineComment=!1,addComment(\"Line\",comment,start,index,loc));else{if(\"*\"!==ch)break;start=index,index+=2,blockComment=!0,loc={start:{line:lineNumber,column:index-lineStart-2}},index>=length&&throwError({},Messages.UnexpectedToken,\"ILLEGAL\")}else if(isWhiteSpace(ch))++index;else{if(!isLineTerminator(ch))break;++index,\"\\r\"===ch&&\"\\n\"===source[index]&&++index,++lineNumber,lineStart=index}}function filterCommentLocation(){var i,entry,comment,comments=[];for(i=0;extra.comments.length>i;++i)entry=extra.comments[i],comment={type:entry.type,value:entry.value},extra.range&&(comment.range=entry.range),extra.loc&&(comment.loc=entry.loc),comments.push(comment);extra.comments=comments}function collectToken(){var start,loc,token,range,value;return skipComment(),start=index,loc={start:{line:lineNumber,column:index-lineStart}},token=extra.advance(),loc.end={line:lineNumber,column:index-lineStart},token.type!==Token.EOF&&(range=[token.range[0],token.range[1]],value=sliceSource(token.range[0],token.range[1]),extra.tokens.push({type:TokenName[token.type],value:value,range:range,loc:loc})),token}function collectRegex(){var pos,loc,regex,token;return skipComment(),pos=index,loc={start:{line:lineNumber,column:index-lineStart}},regex=extra.scanRegExp(),loc.end={line:lineNumber,column:index-lineStart},extra.tokens.length>0&&(token=extra.tokens[extra.tokens.length-1],token.range[0]===pos&&\"Punctuator\"===token.type&&(\"/\"===token.value||\"/=\"===token.value)&&extra.tokens.pop()),extra.tokens.push({type:\"RegularExpression\",value:regex.literal,range:[pos,index],loc:loc}),regex}function filterTokenLocation(){var i,entry,token,tokens=[];for(i=0;extra.tokens.length>i;++i)entry=extra.tokens[i],token={type:entry.type,value:entry.value},extra.range&&(token.range=entry.range),extra.loc&&(token.loc=entry.loc),tokens.push(token);extra.tokens=tokens}function createLiteral(token){return{type:Syntax.Literal,value:token.value}}function createRawLiteral(token){return{type:Syntax.Literal,value:token.value,raw:sliceSource(token.range[0],token.range[1])}}function createLocationMarker(){var marker={};return marker.range=[index,index],marker.loc={start:{line:lineNumber,column:index-lineStart},end:{line:lineNumber,column:index-lineStart}},marker.end=function(){this.range[1]=index,this.loc.end.line=lineNumber,this.loc.end.column=index-lineStart},marker.applyGroup=function(node){extra.range&&(node.groupRange=[this.range[0],this.range[1]]),extra.loc&&(node.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},marker.apply=function(node){extra.range&&(node.range=[this.range[0],this.range[1]]),extra.loc&&(node.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},marker}function trackGroupExpression(){var marker,expr;return skipComment(),marker=createLocationMarker(),expect(\"(\"),expr=parseExpression(),expect(\")\"),marker.end(),marker.applyGroup(expr),expr}function trackLeftHandSideExpression(){var marker,expr;for(skipComment(),marker=createLocationMarker(),expr=matchKeyword(\"new\")?parseNewExpression():parsePrimaryExpression();match(\".\")||match(\"[\");)match(\"[\")?(expr={type:Syntax.MemberExpression,computed:!0,object:expr,property:parseComputedMember()},marker.end(),marker.apply(expr)):(expr={type:Syntax.MemberExpression,computed:!1,object:expr,property:parseNonComputedMember()},marker.end(),marker.apply(expr));return expr}function trackLeftHandSideExpressionAllowCall(){var marker,expr;for(skipComment(),marker=createLocationMarker(),expr=matchKeyword(\"new\")?parseNewExpression():parsePrimaryExpression();match(\".\")||match(\"[\")||match(\"(\");)match(\"(\")?(expr={type:Syntax.CallExpression,callee:expr,arguments:parseArguments()},marker.end(),marker.apply(expr)):match(\"[\")?(expr={type:Syntax.MemberExpression,computed:!0,object:expr,property:parseComputedMember()},marker.end(),marker.apply(expr)):(expr={type:Syntax.MemberExpression,computed:!1,object:expr,property:parseNonComputedMember()},marker.end(),marker.apply(expr));return expr}function filterGroup(node){var n,i,entry;n=\"[object Array]\"===Object.prototype.toString.apply(node)?[]:{};for(i in node)node.hasOwnProperty(i)&&\"groupRange\"!==i&&\"groupLoc\"!==i&&(entry=node[i],n[i]=null===entry||\"object\"!=typeof entry||entry instanceof RegExp?entry:filterGroup(entry));return n}function wrapTrackingFunction(range,loc){return function(parseFunction){function isBinary(node){return node.type===Syntax.LogicalExpression||node.type===Syntax.BinaryExpression}function visit(node){var start,end;isBinary(node.left)&&visit(node.left),isBinary(node.right)&&visit(node.right),range&&(node.left.groupRange||node.right.groupRange?(start=node.left.groupRange?node.left.groupRange[0]:node.left.range[0],end=node.right.groupRange?node.right.groupRange[1]:node.right.range[1],node.range=[start,end]):node.range===void 0&&(start=node.left.range[0],end=node.right.range[1],node.range=[start,end])),loc&&(node.left.groupLoc||node.right.groupLoc?(start=node.left.groupLoc?node.left.groupLoc.start:node.left.loc.start,end=node.right.groupLoc?node.right.groupLoc.end:node.right.loc.end,node.loc={start:start,end:end}):node.loc===void 0&&(node.loc={start:node.left.loc.start,end:node.right.loc.end}))}return function(){var marker,node;return skipComment(),marker=createLocationMarker(),node=parseFunction.apply(null,arguments),marker.end(),range&&node.range===void 0&&marker.apply(node),loc&&node.loc===void 0&&marker.apply(node),isBinary(node)&&visit(node),node}}}function patch(){var wrapTracking;extra.comments&&(extra.skipComment=skipComment,skipComment=scanComment),extra.raw&&(extra.createLiteral=createLiteral,createLiteral=createRawLiteral),(extra.range||extra.loc)&&(extra.parseGroupExpression=parseGroupExpression,extra.parseLeftHandSideExpression=parseLeftHandSideExpression,extra.parseLeftHandSideExpressionAllowCall=parseLeftHandSideExpressionAllowCall,parseGroupExpression=trackGroupExpression,parseLeftHandSideExpression=trackLeftHandSideExpression,parseLeftHandSideExpressionAllowCall=trackLeftHandSideExpressionAllowCall,wrapTracking=wrapTrackingFunction(extra.range,extra.loc),extra.parseAdditiveExpression=parseAdditiveExpression,extra.parseAssignmentExpression=parseAssignmentExpression,extra.parseBitwiseANDExpression=parseBitwiseANDExpression,extra.parseBitwiseORExpression=parseBitwiseORExpression,extra.parseBitwiseXORExpression=parseBitwiseXORExpression,extra.parseBlock=parseBlock,extra.parseFunctionSourceElements=parseFunctionSourceElements,extra.parseCatchClause=parseCatchClause,extra.parseComputedMember=parseComputedMember,extra.parseConditionalExpression=parseConditionalExpression,extra.parseConstLetDeclaration=parseConstLetDeclaration,extra.parseEqualityExpression=parseEqualityExpression,extra.parseExpression=parseExpression,extra.parseForVariableDeclaration=parseForVariableDeclaration,extra.parseFunctionDeclaration=parseFunctionDeclaration,extra.parseFunctionExpression=parseFunctionExpression,extra.parseLogicalANDExpression=parseLogicalANDExpression,extra.parseLogicalORExpression=parseLogicalORExpression,extra.parseMultiplicativeExpression=parseMultiplicativeExpression,extra.parseNewExpression=parseNewExpression,extra.parseNonComputedProperty=parseNonComputedProperty,extra.parseObjectProperty=parseObjectProperty,extra.parseObjectPropertyKey=parseObjectPropertyKey,extra.parsePostfixExpression=parsePostfixExpression,extra.parsePrimaryExpression=parsePrimaryExpression,extra.parseProgram=parseProgram,extra.parsePropertyFunction=parsePropertyFunction,extra.parseRelationalExpression=parseRelationalExpression,extra.parseStatement=parseStatement,extra.parseShiftExpression=parseShiftExpression,extra.parseSwitchCase=parseSwitchCase,extra.parseUnaryExpression=parseUnaryExpression,extra.parseVariableDeclaration=parseVariableDeclaration,extra.parseVariableIdentifier=parseVariableIdentifier,parseAdditiveExpression=wrapTracking(extra.parseAdditiveExpression),parseAssignmentExpression=wrapTracking(extra.parseAssignmentExpression),parseBitwiseANDExpression=wrapTracking(extra.parseBitwiseANDExpression),parseBitwiseORExpression=wrapTracking(extra.parseBitwiseORExpression),parseBitwiseXORExpression=wrapTracking(extra.parseBitwiseXORExpression),parseBlock=wrapTracking(extra.parseBlock),parseFunctionSourceElements=wrapTracking(extra.parseFunctionSourceElements),parseCatchClause=wrapTracking(extra.parseCatchClause),parseComputedMember=wrapTracking(extra.parseComputedMember),parseConditionalExpression=wrapTracking(extra.parseConditionalExpression),parseConstLetDeclaration=wrapTracking(extra.parseConstLetDeclaration),parseEqualityExpression=wrapTracking(extra.parseEqualityExpression),parseExpression=wrapTracking(extra.parseExpression),parseForVariableDeclaration=wrapTracking(extra.parseForVariableDeclaration),parseFunctionDeclaration=wrapTracking(extra.parseFunctionDeclaration),parseFunctionExpression=wrapTracking(extra.parseFunctionExpression),parseLeftHandSideExpression=wrapTracking(parseLeftHandSideExpression),parseLogicalANDExpression=wrapTracking(extra.parseLogicalANDExpression),parseLogicalORExpression=wrapTracking(extra.parseLogicalORExpression),parseMultiplicativeExpression=wrapTracking(extra.parseMultiplicativeExpression),parseNewExpression=wrapTracking(extra.parseNewExpression),parseNonComputedProperty=wrapTracking(extra.parseNonComputedProperty),parseObjectProperty=wrapTracking(extra.parseObjectProperty),parseObjectPropertyKey=wrapTracking(extra.parseObjectPropertyKey),parsePostfixExpression=wrapTracking(extra.parsePostfixExpression),parsePrimaryExpression=wrapTracking(extra.parsePrimaryExpression),parseProgram=wrapTracking(extra.parseProgram),parsePropertyFunction=wrapTracking(extra.parsePropertyFunction),parseRelationalExpression=wrapTracking(extra.parseRelationalExpression),parseStatement=wrapTracking(extra.parseStatement),parseShiftExpression=wrapTracking(extra.parseShiftExpression),parseSwitchCase=wrapTracking(extra.parseSwitchCase),parseUnaryExpression=wrapTracking(extra.parseUnaryExpression),parseVariableDeclaration=wrapTracking(extra.parseVariableDeclaration),parseVariableIdentifier=wrapTracking(extra.parseVariableIdentifier)),extra.tokens!==void 0&&(extra.advance=advance,extra.scanRegExp=scanRegExp,advance=collectToken,scanRegExp=collectRegex)}function unpatch(){\"function\"==typeof extra.skipComment&&(skipComment=extra.skipComment),extra.raw&&(createLiteral=extra.createLiteral),(extra.range||extra.loc)&&(parseAdditiveExpression=extra.parseAdditiveExpression,parseAssignmentExpression=extra.parseAssignmentExpression,parseBitwiseANDExpression=extra.parseBitwiseANDExpression,parseBitwiseORExpression=extra.parseBitwiseORExpression,parseBitwiseXORExpression=extra.parseBitwiseXORExpression,parseBlock=extra.parseBlock,parseFunctionSourceElements=extra.parseFunctionSourceElements,parseCatchClause=extra.parseCatchClause,parseComputedMember=extra.parseComputedMember,parseConditionalExpression=extra.parseConditionalExpression,parseConstLetDeclaration=extra.parseConstLetDeclaration,parseEqualityExpression=extra.parseEqualityExpression,parseExpression=extra.parseExpression,parseForVariableDeclaration=extra.parseForVariableDeclaration,parseFunctionDeclaration=extra.parseFunctionDeclaration,parseFunctionExpression=extra.parseFunctionExpression,parseGroupExpression=extra.parseGroupExpression,parseLeftHandSideExpression=extra.parseLeftHandSideExpression,parseLeftHandSideExpressionAllowCall=extra.parseLeftHandSideExpressionAllowCall,parseLogicalANDExpression=extra.parseLogicalANDExpression,parseLogicalORExpression=extra.parseLogicalORExpression,parseMultiplicativeExpression=extra.parseMultiplicativeExpression,parseNewExpression=extra.parseNewExpression,parseNonComputedProperty=extra.parseNonComputedProperty,parseObjectProperty=extra.parseObjectProperty,parseObjectPropertyKey=extra.parseObjectPropertyKey,parsePrimaryExpression=extra.parsePrimaryExpression,parsePostfixExpression=extra.parsePostfixExpression,parseProgram=extra.parseProgram,parsePropertyFunction=extra.parsePropertyFunction,parseRelationalExpression=extra.parseRelationalExpression,parseStatement=extra.parseStatement,parseShiftExpression=extra.parseShiftExpression,parseSwitchCase=extra.parseSwitchCase,parseUnaryExpression=extra.parseUnaryExpression,parseVariableDeclaration=extra.parseVariableDeclaration,parseVariableIdentifier=extra.parseVariableIdentifier),\"function\"==typeof extra.scanRegExp&&(advance=extra.advance,scanRegExp=extra.scanRegExp)}function stringToArray(str){var i,length=str.length,result=[];for(i=0;length>i;++i)result[i]=str.charAt(i);return result}function parse(code,options){var program,toString;\ntoString=String,\"string\"==typeof code||code instanceof String||(code=toString(code)),source=code,index=0,lineNumber=source.length>0?1:0,lineStart=0,length=source.length,buffer=null,state={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},extra={},options!==void 0&&(extra.range=\"boolean\"==typeof options.range&&options.range,extra.loc=\"boolean\"==typeof options.loc&&options.loc,extra.raw=\"boolean\"==typeof options.raw&&options.raw,\"boolean\"==typeof options.tokens&&options.tokens&&(extra.tokens=[]),\"boolean\"==typeof options.comment&&options.comment&&(extra.comments=[]),\"boolean\"==typeof options.tolerant&&options.tolerant&&(extra.errors=[])),length>0&&source[0]===void 0&&(code instanceof String&&(source=code.valueOf()),source[0]===void 0&&(source=stringToArray(code))),patch();try{program=parseProgram(),extra.comments!==void 0&&(filterCommentLocation(),program.comments=extra.comments),extra.tokens!==void 0&&(filterTokenLocation(),program.tokens=extra.tokens),extra.errors!==void 0&&(program.errors=extra.errors),(extra.range||extra.loc)&&(program.body=filterGroup(program.body))}catch(e){throw e}finally{unpatch(),extra={}}return program}var Token,TokenName,Syntax,PropertyKind,Messages,Regex,source,strict,index,lineNumber,lineStart,length,buffer,state,extra;Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},TokenName={},TokenName[Token.BooleanLiteral]=\"Boolean\",TokenName[Token.EOF]=\"\u003Cend>\",TokenName[Token.Identifier]=\"Identifier\",TokenName[Token.Keyword]=\"Keyword\",TokenName[Token.NullLiteral]=\"Null\",TokenName[Token.NumericLiteral]=\"Numeric\",TokenName[Token.Punctuator]=\"Punctuator\",TokenName[Token.StringLiteral]=\"String\",Syntax={AssignmentExpression:\"AssignmentExpression\",ArrayExpression:\"ArrayExpression\",BlockStatement:\"BlockStatement\",BinaryExpression:\"BinaryExpression\",BreakStatement:\"BreakStatement\",CallExpression:\"CallExpression\",CatchClause:\"CatchClause\",ConditionalExpression:\"ConditionalExpression\",ContinueStatement:\"ContinueStatement\",DoWhileStatement:\"DoWhileStatement\",DebuggerStatement:\"DebuggerStatement\",EmptyStatement:\"EmptyStatement\",ExpressionStatement:\"ExpressionStatement\",ForStatement:\"ForStatement\",ForInStatement:\"ForInStatement\",FunctionDeclaration:\"FunctionDeclaration\",FunctionExpression:\"FunctionExpression\",Identifier:\"Identifier\",IfStatement:\"IfStatement\",Literal:\"Literal\",LabeledStatement:\"LabeledStatement\",LogicalExpression:\"LogicalExpression\",MemberExpression:\"MemberExpression\",NewExpression:\"NewExpression\",ObjectExpression:\"ObjectExpression\",Program:\"Program\",Property:\"Property\",ReturnStatement:\"ReturnStatement\",SequenceExpression:\"SequenceExpression\",SwitchStatement:\"SwitchStatement\",SwitchCase:\"SwitchCase\",ThisExpression:\"ThisExpression\",ThrowStatement:\"ThrowStatement\",TryStatement:\"TryStatement\",UnaryExpression:\"UnaryExpression\",UpdateExpression:\"UpdateExpression\",VariableDeclaration:\"VariableDeclaration\",VariableDeclarator:\"VariableDeclarator\",WhileStatement:\"WhileStatement\",WithStatement:\"WithStatement\"},PropertyKind={Data:1,Get:2,Set:4},Messages={UnexpectedToken:\"Unexpected token %0\",UnexpectedNumber:\"Unexpected number\",UnexpectedString:\"Unexpected string\",UnexpectedIdentifier:\"Unexpected identifier\",UnexpectedReserved:\"Unexpected reserved word\",UnexpectedEOS:\"Unexpected end of input\",NewlineAfterThrow:\"Illegal newline after throw\",InvalidRegExp:\"Invalid regular expression\",UnterminatedRegExp:\"Invalid regular expression: missing /\",InvalidLHSInAssignment:\"Invalid left-hand side in assignment\",InvalidLHSInForIn:\"Invalid left-hand side in for-in\",MultipleDefaultsInSwitch:\"More than one default clause in switch statement\",NoCatchOrFinally:\"Missing catch or finally after try\",UnknownLabel:\"Undefined label '%0'\",Redeclaration:\"%0 '%1' has already been declared\",IllegalContinue:\"Illegal continue statement\",IllegalBreak:\"Illegal break statement\",IllegalReturn:\"Illegal return statement\",StrictModeWith:\"Strict mode code may not include a with statement\",StrictCatchVariable:\"Catch variable may not be eval or arguments in strict mode\",StrictVarName:\"Variable name may not be eval or arguments in strict mode\",StrictParamName:\"Parameter name eval or arguments is not allowed in strict mode\",StrictParamDupe:\"Strict mode function may not have duplicate parameter names\",StrictFunctionName:\"Function name may not be eval or arguments in strict mode\",StrictOctalLiteral:\"Octal literals are not allowed in strict mode.\",StrictDelete:\"Delete of an unqualified identifier in strict mode.\",StrictDuplicateProperty:\"Duplicate data property in object literal not allowed in strict mode\",AccessorDataProperty:\"Object literal may not have data and accessor property with the same name\",AccessorGetSet:\"Object literal may not have multiple get/set accessors with the same name\",StrictLHSAssignment:\"Assignment to eval or arguments is not allowed in strict mode\",StrictLHSPostfix:\"Postfix increment/decrement may not have eval or arguments operand in strict mode\",StrictLHSPrefix:\"Prefix increment/decrement may not have eval or arguments operand in strict mode\",StrictReservedWord:\"Use of future reserved word in strict mode\"},Regex={NonAsciiIdentifierStart:RegExp(\"[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]\"),NonAsciiIdentifierPart:RegExp(\"[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]\")},\"esprima\"[0]===void 0&&(sliceSource=function(from,to){return source.slice(from,to).join(\"\")}),exports.version=\"1.0.2\",exports.parse=parse,exports.Syntax=function(){var name,types={};\"function\"==typeof Object.create&&(types=Object.create(null));for(name in Syntax)Syntax.hasOwnProperty(name)&&(types[name]=Syntax[name]);return\"function\"==typeof Object.freeze&&Object.freeze(types),types}()})})()},{}],63:[function(require,module){function isFunction(obj){return\"[object Function]\"==toString.call(obj)}var fs=require(\"fs\"),highlight=require(\"./highlight\");module.exports=function(fullPath,opts,cb){isFunction(opts)&&(cb=opts),fs.readFile(fullPath,\"utf-8\",function(err,code){if(err)return cb(err);try{cb(null,highlight(code,opts))}catch(e){cb(e)}})}},{fs:74,\"./highlight\":62}],64:[function(require,module){var fs=require(\"fs\"),highlight=require(\"./highlight\");module.exports=function(fullPath,opts){var code=fs.readFileSync(fullPath,\"utf-8\");return highlight(code,opts)}},{fs:74,\"./highlight\":62}],29:[function(require,module){\"use strict\";function fix(line,hideStrict){var fixed=line;if(commaFirstAssignment.test(line)){var idx=line.indexOf(\",\");fixed=\"var\"+fixed.slice(0,idx).trim()+\" \"+fixed.slice(idx+1).trim()}return hideStrict&&useStrict.test(line)&&(fixed=nonStrict+line),fixed}function unfix(code,hideStrict){return hideStrict&&(code=code.replace(nonStrict,\"\")),code}var parse=require(\"esprima\").parse,commaFirstAssignment=/^[\\t ]*,[\\t ]*\\S+[\\t ]*=[\\t ]*\\S+/,useStrict=/^ *['\"]use strict['\"][; ]*$/,nonStrict=\"// *** non strict snippetify fix +++***+++&&&\",snippetify=module.exports=function(script,opts){function nextChunk(code,raw){var line=(0===code.length,lines[lineno]),fixed=fix(line,opts.nonstrict);raw=line+raw,code=fixed+code;try{var ast=parse(code,opts);return code=unfix(code,opts.nonstrict),{code:code,raw:raw,ast:ast}}catch(e){if(-1===--lineno){var err=Error(\"unable to snippetify \"+code);throw err.inner=e,err}return nextChunk(\"\\n\"+code,\"\\n\"+raw)}}opts=opts||{};var snippets=[],lines=script.split(\"\\n\");if(!lines.length)return[];for(var lineno=lines.length;--lineno>-1;){var snippetEnd=lineno+1,snippet=nextChunk(\"\",\"\"),snippetStart=lineno+1;snippets.unshift({start:snippetStart,end:snippetEnd,code:snippet.code,raw:snippet.raw,ast:snippet.ast})}return snippets},code=\"function foo() {\\n\\\"use strict\\\";\\n var o = { a: 1, a: 2 };\\n}\\n\\n;function bar() {\\n'use strict';\\n var o = { a: 1, a: 2 };\\n}\";snippetify(code,{nonstrict:!0})},{esprima:70}],75:[function(require,module,exports){exports.readIEEE754=function(buffer,offset,isBE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1\u003C\u003CeLen)-1,eBias=eMax>>1,nBits=-7,i=isBE?0:nBytes-1,d=isBE?1:-1,s=buffer[offset+i];for(i+=d,e=s&(1\u003C\u003C-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1\u003C\u003C-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?0/0:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.writeIEEE754=function(buffer,value,offset,isBE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1\u003C\u003CeLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isBE?nBytes-1:0,d=isBE?-1:1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||1/0===value?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),1>value*(c=Math.pow(2,-e))&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e\u003C\u003CmLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],76:[function(require,module){var colorNums={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},colors={};Object.keys(colorNums).forEach(function(k){colors[k]=\"\u001b[\"+colorNums[k]+\"m:\u001b[39m\"}),module.exports=colors},{}],77:[function(require,module){require=function(e,t,n,r){function i(r){if(!n[r]){if(!t[r]){if(e)return e(r);throw Error(\"Cannot find module '\"+r+\"'\")}var s=n[r]={exports:{}};t[r][0](function(e){var n=t[r][1][e];return i(n?n:e)},s,s.exports)}return n[r].exports}for(var s=0;r.length>s;s++)i(r[s]);return i}(require!==void 0&&require,{1:[function(require,module,exports){exports.readIEEE754=function(buffer,offset,isBE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1\u003C\u003CeLen)-1,eBias=eMax>>1,nBits=-7,i=isBE?0:nBytes-1,d=isBE?1:-1,s=buffer[offset+i];for(i+=d,e=s&(1\u003C\u003C-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1\u003C\u003C-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?0/0:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.writeIEEE754=function(buffer,value,offset,isBE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1\u003C\u003CeLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isBE?nBytes-1:0,d=isBE?-1:1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||1/0===value?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),1>value*(c=Math.pow(2,-e))&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e\u003C\u003CmLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],2:[function(require,module){(function(){function objectKeys(object){if(Object.keys)return Object.keys(object);var result=[];for(var name in object)Object.prototype.hasOwnProperty.call(object,name)&&result.push(name);return result}function replacer(key,value){return void 0===value?\"\"+value:\"number\"!=typeof value||!isNaN(value)&&isFinite(value)?\"function\"==typeof value||value instanceof RegExp?\"\"+value:value:\"\"+value}function truncate(s,n){return\"string\"==typeof s?n>s.length?s:s.slice(0,n):s}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}function ok(value,message){value||fail(value,!0,message,\"==\",assert.ok)}function _deepEqual(actual,expected){if(actual===expected)return!0;if(Buffer.isBuffer(actual)&&Buffer.isBuffer(expected)){if(actual.length!=expected.length)return!1;for(var i=0;actual.length>i;i++)if(actual[i]!==expected[i])return!1;return!0}return actual instanceof Date&&expected instanceof Date?actual.getTime()===expected.getTime():\"object\"!=typeof actual&&\"object\"!=typeof expected?actual==expected:objEquiv(actual,expected)}function isUndefinedOrNull(value){return null===value||void 0===value}function isArguments(object){return\"[object Arguments]\"==Object.prototype.toString.call(object)}function objEquiv(a,b){if(isUndefinedOrNull(a)||isUndefinedOrNull(b))return!1;if(a.prototype!==b.prototype)return!1;if(isArguments(a))return isArguments(b)?(a=pSlice.call(a),b=pSlice.call(b),_deepEqual(a,b)):!1;try{var key,i,ka=objectKeys(a),kb=objectKeys(b)}catch(e){return!1}if(ka.length!=kb.length)return!1;for(ka.sort(),kb.sort(),i=ka.length-1;i>=0;i--)if(ka[i]!=kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!_deepEqual(a[key],b[key]))return!1;return!0}function expectedException(actual,expected){return actual&&expected?expected instanceof RegExp?expected.test(actual):actual instanceof expected?!0:expected.call({},actual)===!0?!0:!1:!1}function _throws(shouldThrow,block,expected,message){var actual;\"string\"==typeof expected&&(message=expected,expected=null);try{block()}catch(e){actual=e}if(message=(expected&&expected.name?\" (\"+expected.name+\").\":\".\")+(message?\" \"+message:\".\"),shouldThrow&&!actual&&fail(\"Missing expected exception\"+message),!shouldThrow&&expectedException(actual,expected)&&fail(\"Got unwanted exception\"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}var util=require(\"util\"),Buffer=require(\"buffer\").Buffer,pSlice=Array.prototype.slice,assert=module.exports=ok;assert.AssertionError=function(options){this.name=\"AssertionError\",this.message=options.message,this.actual=options.actual,this.expected=options.expected,this.operator=options.operator;var stackStartFunction=options.stackStartFunction||fail;Error.captureStackTrace&&Error.captureStackTrace(this,stackStartFunction)},util.inherits(assert.AssertionError,Error),assert.AssertionError.prototype.toString=function(){return this.message?[this.name+\":\",this.message].join(\" \"):[this.name+\":\",truncate(JSON.stringify(this.actual,replacer),128),this.operator,truncate(JSON.stringify(this.expected,replacer),128)].join(\" \")},assert.AssertionError.__proto__=Error.prototype,assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,\"==\",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,\"!=\",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected)||fail(actual,expected,message,\"deepEqual\",assert.deepEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected)&&fail(actual,expected,message,\"notDeepEqual\",assert.notDeepEqual)},assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,\"===\",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,\"!==\",assert.notStrictEqual)},assert.throws=function(){_throws.apply(this,[!0].concat(pSlice.call(arguments)))},assert.doesNotThrow=function(){_throws.apply(this,[!1].concat(pSlice.call(arguments)))},assert.ifError=function(err){if(err)throw err}})()},{util:3,buffer:4}],\"buffer-browserify\":[function(require,module){module.exports=require(\"q9TxCC\")},{}],q9TxCC:[function(require,module,exports){(function(){function SlowBuffer(size){this.length=size}function toHex(n){return 16>n?\"0\"+n.toString(16):n.toString(16)}function utf8ToBytes(str){for(var byteArray=[],i=0;str.length>i;i++)if(127>=str.charCodeAt(i))byteArray.push(str.charCodeAt(i));else for(var h=encodeURIComponent(str.charAt(i)).substr(1).split(\"%\"),j=0;h.length>j;j++)byteArray.push(parseInt(h[j],16));return byteArray}function asciiToBytes(str){for(var byteArray=[],i=0;str.length>i;i++)byteArray.push(255&str.charCodeAt(i));return byteArray}function base64ToBytes(str){return require(\"base64-js\").toByteArray(str)}function blitBuffer(src,dst,offset,length){for(var i=0;length>i&&!(i+offset>=dst.length||i>=src.length);)dst[i+offset]=src[i],i++;return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}function coerce(length){return length=~~Math.ceil(+length),0>length?0:length}function Buffer(subject,encoding,offset){if(!(this instanceof Buffer))return new Buffer(subject,encoding,offset);var type;if(\"number\"==typeof offset)this.length=coerce(encoding),this.parent=subject,this.offset=offset;else{switch(type=typeof subject){case\"number\":this.length=coerce(subject);break;case\"string\":this.length=Buffer.byteLength(subject,encoding);break;case\"object\":this.length=coerce(subject.length);break;default:throw Error(\"First argument needs to be a number, array or string.\")}if(this.length>Buffer.poolSize?(this.parent=new SlowBuffer(this.length),this.offset=0):((!pool||pool.length-pool.used\u003Cthis.length)&&allocPool(),this.parent=pool,this.offset=pool.used,pool.used+=this.length),isArrayIsh(subject))for(var i=0;this.length>i;i++)this.parent[i+this.offset]=subject instanceof Buffer?subject.readUInt8(i):subject[i];else\"string\"==type&&(this.length=this.write(subject,0,encoding))}}function isArrayIsh(subject){return Array.isArray(subject)||Buffer.isBuffer(subject)||subject&&\"object\"==typeof subject&&\"number\"==typeof subject.length}function allocPool(){pool=new SlowBuffer(Buffer.poolSize),pool.used=0}function readUInt16(buffer,offset,isBigEndian,noAssert){var val=0;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to read beyond buffer length\")),offset>=buffer.length?0:(isBigEndian?(val=buffer.parent[buffer.offset+offset]\u003C\u003C8,buffer.length>offset+1&&(val|=buffer.parent[buffer.offset+offset+1])):(val=buffer.parent[buffer.offset+offset],buffer.length>offset+1&&(val|=buffer.parent[buffer.offset+offset+1]\u003C\u003C8)),val)}function readUInt32(buffer,offset,isBigEndian,noAssert){var val=0;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),offset>=buffer.length?0:(isBigEndian?(buffer.length>offset+1&&(val=buffer.parent[buffer.offset+offset+1]\u003C\u003C16),buffer.length>offset+2&&(val|=buffer.parent[buffer.offset+offset+2]\u003C\u003C8),buffer.length>offset+3&&(val|=buffer.parent[buffer.offset+offset+3]),val+=buffer.parent[buffer.offset+offset]\u003C\u003C24>>>0):(buffer.length>offset+2&&(val=buffer.parent[buffer.offset+offset+2]\u003C\u003C16),buffer.length>offset+1&&(val|=buffer.parent[buffer.offset+offset+1]\u003C\u003C8),val|=buffer.parent[buffer.offset+offset],buffer.length>offset+3&&(val+=buffer.parent[buffer.offset+offset+3]\u003C\u003C24>>>0)),val)}function readInt16(buffer,offset,isBigEndian,noAssert){var neg,val;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to read beyond buffer length\")),val=readUInt16(buffer,offset,isBigEndian,noAssert),neg=32768&val,neg?-1*(65535-val+1):val}function readInt32(buffer,offset,isBigEndian,noAssert){var neg,val;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),val=readUInt32(buffer,offset,isBigEndian,noAssert),neg=2147483648&val,neg?-1*(4294967295-val+1):val}function readFloat(buffer,offset,isBigEndian,noAssert){return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),require(\"./buffer_ieee754\").readIEEE754(buffer,offset,isBigEndian,23,4)}function readDouble(buffer,offset,isBigEndian,noAssert){return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(buffer.length>offset+7,\"Trying to read beyond buffer length\")),require(\"./buffer_ieee754\").readIEEE754(buffer,offset,isBigEndian,52,8)}function verifuint(value,max){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(value>=0,\"specified a negative value for writing an unsigned value\"),assert.ok(max>=value,\"value is larger than maximum value for type\"),assert.ok(Math.floor(value)===value,\"value has a fractional component\")}function writeUInt16(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"trying to write beyond buffer length\"),verifuint(value,65535));for(var i=0;Math.min(buffer.length-offset,2)>i;i++)buffer.parent[buffer.offset+offset+i]=(value&255\u003C\u003C8*(isBigEndian?1-i:i))>>>8*(isBigEndian?1-i:i)}function writeUInt32(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"trying to write beyond buffer length\"),verifuint(value,4294967295));for(var i=0;Math.min(buffer.length-offset,4)>i;i++)buffer.parent[buffer.offset+offset+i]=255&value>>>8*(isBigEndian?3-i:i)}function verifsint(value,max,min){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(max>=value,\"value larger than maximum allowed value\"),assert.ok(value>=min,\"value smaller than minimum allowed value\"),assert.ok(Math.floor(value)===value,\"value has a fractional component\")}function verifIEEE754(value,max,min){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(max>=value,\"value larger than maximum allowed value\"),assert.ok(value>=min,\"value smaller than minimum allowed value\")}function writeInt16(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to write beyond buffer length\"),verifsint(value,32767,-32768)),value>=0?writeUInt16(buffer,value,offset,isBigEndian,noAssert):writeUInt16(buffer,65535+value+1,offset,isBigEndian,noAssert)}function writeInt32(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to write beyond buffer length\"),verifsint(value,2147483647,-2147483648)),value>=0?writeUInt32(buffer,value,offset,isBigEndian,noAssert):writeUInt32(buffer,4294967295+value+1,offset,isBigEndian,noAssert)}function writeFloat(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to write beyond buffer length\"),verifIEEE754(value,3.4028234663852886e38,-3.4028234663852886e38)),require(\"./buffer_ieee754\").writeIEEE754(buffer,value,offset,isBigEndian,23,4)}function writeDouble(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+7,\"Trying to write beyond buffer length\"),verifIEEE754(value,1.7976931348623157e308,-1.7976931348623157e308)),require(\"./buffer_ieee754\").writeIEEE754(buffer,value,offset,isBigEndian,52,8)}var assert=require(\"assert\");exports.INSPECT_MAX_BYTES=50,SlowBuffer.byteLength=function(str,encoding){switch(encoding||\"utf8\"){case\"hex\":return str.length/2;case\"utf8\":case\"utf-8\":return utf8ToBytes(str).length;case\"ascii\":case\"binary\":return str.length;case\"base64\":return base64ToBytes(str).length;default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.utf8Write=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(utf8ToBytes(string),this,offset,length)},SlowBuffer.prototype.asciiWrite=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(asciiToBytes(string),this,offset,length)},SlowBuffer.prototype.binaryWrite=SlowBuffer.prototype.asciiWrite,SlowBuffer.prototype.base64Write=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(base64ToBytes(string),this,offset,length)},SlowBuffer.prototype.base64Slice=function(){var bytes=Array.prototype.slice.apply(this,arguments);return require(\"base64-js\").fromByteArray(bytes)},SlowBuffer.prototype.utf8Slice=function(){for(var bytes=Array.prototype.slice.apply(this,arguments),res=\"\",tmp=\"\",i=0;bytes.length>i;)127>=bytes[i]?(res+=decodeUtf8Char(tmp)+String.fromCharCode(bytes[i]),tmp=\"\"):tmp+=\"%\"+bytes[i].toString(16),i++;return res+decodeUtf8Char(tmp)},SlowBuffer.prototype.asciiSlice=function(){for(var bytes=Array.prototype.slice.apply(this,arguments),ret=\"\",i=0;bytes.length>i;i++)ret+=String.fromCharCode(bytes[i]);return ret},SlowBuffer.prototype.binarySlice=SlowBuffer.prototype.asciiSlice,SlowBuffer.prototype.inspect=function(){for(var out=[],len=this.length,i=0;len>i;i++)if(out[i]=toHex(this[i]),i==exports.INSPECT_MAX_BYTES){out[i+1]=\"...\";break}return\"\u003CSlowBuffer \"+out.join(\" \")+\">\"},SlowBuffer.prototype.hexSlice=function(start,end){var len=this.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out=\"\",i=start;end>i;i++)out+=toHex(this[i]);return out},SlowBuffer.prototype.toString=function(encoding,start,end){if(encoding=((encoding||\"utf8\")+\"\").toLowerCase(),start=+start||0,end===void 0&&(end=this.length),+end==start)return\"\";switch(encoding){case\"hex\":return this.hexSlice(start,end);case\"utf8\":case\"utf-8\":return this.utf8Slice(start,end);case\"ascii\":return this.asciiSlice(start,end);case\"binary\":return this.binarySlice(start,end);case\"base64\":return this.base64Slice(start,end);case\"ucs2\":case\"ucs-2\":return this.ucs2Slice(start,end);default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.hexWrite=function(string,offset,length){offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2)throw Error(\"Invalid hex string\");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var byte=parseInt(string.substr(2*i,2),16);if(isNaN(byte))throw Error(\"Invalid hex string\");this[offset+i]=byte}return SlowBuffer._charsWritten=2*i,i},SlowBuffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;switch(length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||\"utf8\")+\"\").toLowerCase()){case\"hex\":return this.hexWrite(string,offset,length);case\"utf8\":case\"utf-8\":return this.utf8Write(string,offset,length);case\"ascii\":return this.asciiWrite(string,offset,length);case\"binary\":return this.binaryWrite(string,offset,length);case\"base64\":return this.base64Write(string,offset,length);case\"ucs2\":case\"ucs-2\":return this.ucs2Write(string,offset,length);default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");return new Buffer(this,end-start,+start)},SlowBuffer.prototype.copy=function(target,targetstart,sourcestart,sourceend){for(var temp=[],i=sourcestart;sourceend>i;i++)assert.ok(this[i]!==void 0,\"copying undefined buffer bytes!\"),temp.push(this[i]);for(var i=targetstart;targetstart+temp.length>i;i++)target[i]=temp[i-targetstart]},SlowBuffer.prototype.fill=function(value,start,end){if(end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");for(var i=start;end>i;i++)this[i]=value},exports.SlowBuffer=SlowBuffer,exports.Buffer=Buffer,Buffer.poolSize=8192;var pool;Buffer.isBuffer=function(b){return b instanceof Buffer||b instanceof SlowBuffer},Buffer.concat=function(list,totalLength){if(!Array.isArray(list))throw Error(\"Usage: Buffer.concat(list, [totalLength])\\n list should be an Array.\");if(0===list.length)return new Buffer(0);if(1===list.length)return list[0];if(\"number\"!=typeof totalLength){totalLength=0;for(var i=0;list.length>i;i++){var buf=list[i];totalLength+=buf.length}}for(var buffer=new Buffer(totalLength),pos=0,i=0;list.length>i;i++){var buf=list[i];buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.prototype.inspect=function(){for(var out=[],len=this.length,i=0;len>i;i++)if(out[i]=toHex(this.parent[i+this.offset]),i==exports.INSPECT_MAX_BYTES){out[i+1]=\"...\";break}return\"\u003CBuffer \"+out.join(\" \")+\">\"},Buffer.prototype.get=function(i){if(0>i||i>=this.length)throw Error(\"oob\");return this.parent[this.offset+i]},Buffer.prototype.set=function(i,v){if(0>i||i>=this.length)throw Error(\"oob\");return this.parent[this.offset+i]=v},Buffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||\"utf8\")+\"\").toLowerCase();var ret;switch(encoding){case\"hex\":ret=this.parent.hexWrite(string,this.offset+offset,length);break;\ncase\"utf8\":case\"utf-8\":ret=this.parent.utf8Write(string,this.offset+offset,length);break;case\"ascii\":ret=this.parent.asciiWrite(string,this.offset+offset,length);break;case\"binary\":ret=this.parent.binaryWrite(string,this.offset+offset,length);break;case\"base64\":ret=this.parent.base64Write(string,this.offset+offset,length);break;case\"ucs2\":case\"ucs-2\":ret=this.parent.ucs2Write(string,this.offset+offset,length);break;default:throw Error(\"Unknown encoding\")}return Buffer._charsWritten=SlowBuffer._charsWritten,ret},Buffer.prototype.toString=function(encoding,start,end){switch(encoding=((encoding||\"utf8\")+\"\").toLowerCase(),start===void 0||0>start?start=0:start>this.length&&(start=this.length),end===void 0||end>this.length?end=this.length:0>end&&(end=0),start+=this.offset,end+=this.offset,encoding){case\"hex\":return this.parent.hexSlice(start,end);case\"utf8\":case\"utf-8\":return this.parent.utf8Slice(start,end);case\"ascii\":return this.parent.asciiSlice(start,end);case\"binary\":return this.parent.binarySlice(start,end);case\"base64\":return this.parent.base64Slice(start,end);case\"ucs2\":case\"ucs-2\":return this.parent.ucs2Slice(start,end);default:throw Error(\"Unknown encoding\")}},Buffer.byteLength=SlowBuffer.byteLength,Buffer.prototype.fill=function(value,start,end){if(value||(value=0),start||(start=0),end||(end=this.length),\"string\"==typeof value&&(value=value.charCodeAt(0)),\"number\"!=typeof value||isNaN(value))throw Error(\"value is not a number\");if(start>end)throw Error(\"end \u003C start\");if(end===start)return 0;if(0==this.length)return 0;if(0>start||start>=this.length)throw Error(\"start out of bounds\");if(0>end||end>this.length)throw Error(\"end out of bounds\");return this.parent.fill(value,start+this.offset,end+this.offset)},Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(start||(start=0),end||(end=this.length),target_start||(target_start=0),start>end)throw Error(\"sourceEnd \u003C sourceStart\");if(end===start)return 0;if(0==target.length||0==source.length)return 0;if(0>target_start||target_start>=target.length)throw Error(\"targetStart out of bounds\");if(0>start||start>=source.length)throw Error(\"sourceStart out of bounds\");if(0>end||end>source.length)throw Error(\"sourceEnd out of bounds\");return end>this.length&&(end=this.length),end-start>target.length-target_start&&(end=target.length-target_start+start),this.parent.copy(target.parent,target_start+target.offset,start+this.offset,end+this.offset)},Buffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");return new Buffer(this.parent,end-start,+start+this.offset)},Buffer.prototype.utf8Slice=function(start,end){return this.toString(\"utf8\",start,end)},Buffer.prototype.binarySlice=function(start,end){return this.toString(\"binary\",start,end)},Buffer.prototype.asciiSlice=function(start,end){return this.toString(\"ascii\",start,end)},Buffer.prototype.utf8Write=function(string,offset){return this.write(string,offset,\"utf8\")},Buffer.prototype.binaryWrite=function(string,offset){return this.write(string,offset,\"binary\")},Buffer.prototype.asciiWrite=function(string,offset){return this.write(string,offset,\"ascii\")},Buffer.prototype.readUInt8=function(offset,noAssert){var buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to read beyond buffer length\")),offset>=buffer.length?void 0:buffer.parent[buffer.offset+offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return readUInt16(this,offset,!1,noAssert)},Buffer.prototype.readUInt16BE=function(offset,noAssert){return readUInt16(this,offset,!0,noAssert)},Buffer.prototype.readUInt32LE=function(offset,noAssert){return readUInt32(this,offset,!1,noAssert)},Buffer.prototype.readUInt32BE=function(offset,noAssert){return readUInt32(this,offset,!0,noAssert)},Buffer.prototype.readInt8=function(offset,noAssert){var neg,buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to read beyond buffer length\")),offset>=buffer.length?void 0:(neg=128&buffer.parent[buffer.offset+offset],neg?-1*(255-buffer.parent[buffer.offset+offset]+1):buffer.parent[buffer.offset+offset])},Buffer.prototype.readInt16LE=function(offset,noAssert){return readInt16(this,offset,!1,noAssert)},Buffer.prototype.readInt16BE=function(offset,noAssert){return readInt16(this,offset,!0,noAssert)},Buffer.prototype.readInt32LE=function(offset,noAssert){return readInt32(this,offset,!1,noAssert)},Buffer.prototype.readInt32BE=function(offset,noAssert){return readInt32(this,offset,!0,noAssert)},Buffer.prototype.readFloatLE=function(offset,noAssert){return readFloat(this,offset,!1,noAssert)},Buffer.prototype.readFloatBE=function(offset,noAssert){return readFloat(this,offset,!0,noAssert)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return readDouble(this,offset,!1,noAssert)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return readDouble(this,offset,!0,noAssert)},Buffer.prototype.writeUInt8=function(value,offset,noAssert){var buffer=this;noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"trying to write beyond buffer length\"),verifuint(value,255)),buffer.length>offset&&(buffer.parent[buffer.offset+offset]=value)},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){writeUInt16(this,value,offset,!1,noAssert)},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){writeUInt16(this,value,offset,!0,noAssert)},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){writeUInt32(this,value,offset,!1,noAssert)},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){writeUInt32(this,value,offset,!0,noAssert)},Buffer.prototype.writeInt8=function(value,offset,noAssert){var buffer=this;noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to write beyond buffer length\"),verifsint(value,127,-128)),value>=0?buffer.writeUInt8(value,offset,noAssert):buffer.writeUInt8(255+value+1,offset,noAssert)},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){writeInt16(this,value,offset,!1,noAssert)},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){writeInt16(this,value,offset,!0,noAssert)},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){writeInt32(this,value,offset,!1,noAssert)},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){writeInt32(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){writeDouble(this,value,offset,!0,noAssert)},SlowBuffer.prototype.readUInt8=Buffer.prototype.readUInt8,SlowBuffer.prototype.readUInt16LE=Buffer.prototype.readUInt16LE,SlowBuffer.prototype.readUInt16BE=Buffer.prototype.readUInt16BE,SlowBuffer.prototype.readUInt32LE=Buffer.prototype.readUInt32LE,SlowBuffer.prototype.readUInt32BE=Buffer.prototype.readUInt32BE,SlowBuffer.prototype.readInt8=Buffer.prototype.readInt8,SlowBuffer.prototype.readInt16LE=Buffer.prototype.readInt16LE,SlowBuffer.prototype.readInt16BE=Buffer.prototype.readInt16BE,SlowBuffer.prototype.readInt32LE=Buffer.prototype.readInt32LE,SlowBuffer.prototype.readInt32BE=Buffer.prototype.readInt32BE,SlowBuffer.prototype.readFloatLE=Buffer.prototype.readFloatLE,SlowBuffer.prototype.readFloatBE=Buffer.prototype.readFloatBE,SlowBuffer.prototype.readDoubleLE=Buffer.prototype.readDoubleLE,SlowBuffer.prototype.readDoubleBE=Buffer.prototype.readDoubleBE,SlowBuffer.prototype.writeUInt8=Buffer.prototype.writeUInt8,SlowBuffer.prototype.writeUInt16LE=Buffer.prototype.writeUInt16LE,SlowBuffer.prototype.writeUInt16BE=Buffer.prototype.writeUInt16BE,SlowBuffer.prototype.writeUInt32LE=Buffer.prototype.writeUInt32LE,SlowBuffer.prototype.writeUInt32BE=Buffer.prototype.writeUInt32BE,SlowBuffer.prototype.writeInt8=Buffer.prototype.writeInt8,SlowBuffer.prototype.writeInt16LE=Buffer.prototype.writeInt16LE,SlowBuffer.prototype.writeInt16BE=Buffer.prototype.writeInt16BE,SlowBuffer.prototype.writeInt32LE=Buffer.prototype.writeInt32LE,SlowBuffer.prototype.writeInt32BE=Buffer.prototype.writeInt32BE,SlowBuffer.prototype.writeFloatLE=Buffer.prototype.writeFloatLE,SlowBuffer.prototype.writeFloatBE=Buffer.prototype.writeFloatBE,SlowBuffer.prototype.writeDoubleLE=Buffer.prototype.writeDoubleLE,SlowBuffer.prototype.writeDoubleBE=Buffer.prototype.writeDoubleBE})()},{assert:2,\"./buffer_ieee754\":1,\"base64-js\":5}],3:[function(require,module,exports){function isArray(ar){return ar instanceof Array||Array.isArray(ar)||ar&&ar!==Object.prototype&&isArray(ar.__proto__)}function isRegExp(re){return re instanceof RegExp||\"object\"==typeof re&&\"[object RegExp]\"===Object.prototype.toString.call(re)}function isDate(d){if(d instanceof Date)return!0;if(\"object\"!=typeof d)return!1;var properties=Date.prototype&&Object_getOwnPropertyNames(Date.prototype),proto=d.__proto__&&Object_getOwnPropertyNames(d.__proto__);return JSON.stringify(proto)===JSON.stringify(properties)}require(\"events\"),exports.isArray=isArray,exports.isDate=function(obj){return\"[object Date]\"===Object.prototype.toString.call(obj)},exports.isRegExp=function(obj){return\"[object RegExp]\"===Object.prototype.toString.call(obj)},exports.print=function(){},exports.puts=function(){},exports.debug=function(){},exports.inspect=function(obj,showHidden,depth,colors){function format(value,recurseTimes){if(value&&\"function\"==typeof value.inspect&&value!==exports&&(!value.constructor||value.constructor.prototype!==value))return value.inspect(recurseTimes);switch(typeof value){case\"undefined\":return stylize(\"undefined\",\"undefined\");case\"string\":var simple=\"'\"+JSON.stringify(value).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return stylize(simple,\"string\");case\"number\":return stylize(\"\"+value,\"number\");case\"boolean\":return stylize(\"\"+value,\"boolean\")}if(null===value)return stylize(\"null\",\"null\");var visible_keys=Object_keys(value),keys=showHidden?Object_getOwnPropertyNames(value):visible_keys;if(\"function\"==typeof value&&0===keys.length){if(isRegExp(value))return stylize(\"\"+value,\"regexp\");var name=value.name?\": \"+value.name:\"\";return stylize(\"[Function\"+name+\"]\",\"special\")}if(isDate(value)&&0===keys.length)return stylize(value.toUTCString(),\"date\");var base,type,braces;if(isArray(value)?(type=\"Array\",braces=[\"[\",\"]\"]):(type=\"Object\",braces=[\"{\",\"}\"]),\"function\"==typeof value){var n=value.name?\": \"+value.name:\"\";base=isRegExp(value)?\" \"+value:\" [Function\"+n+\"]\"}else base=\"\";if(isDate(value)&&(base=\" \"+value.toUTCString()),0===keys.length)return braces[0]+base+braces[1];if(0>recurseTimes)return isRegExp(value)?stylize(\"\"+value,\"regexp\"):stylize(\"[Object]\",\"special\");seen.push(value);var output=keys.map(function(key){var name,str;if(value.__lookupGetter__&&(value.__lookupGetter__(key)?str=value.__lookupSetter__(key)?stylize(\"[Getter/Setter]\",\"special\"):stylize(\"[Getter]\",\"special\"):value.__lookupSetter__(key)&&(str=stylize(\"[Setter]\",\"special\"))),0>visible_keys.indexOf(key)&&(name=\"[\"+key+\"]\"),str||(0>seen.indexOf(value[key])?(str=null===recurseTimes?format(value[key]):format(value[key],recurseTimes-1),str.indexOf(\"\\n\")>-1&&(str=isArray(value)?str.split(\"\\n\").map(function(line){return\" \"+line}).join(\"\\n\").substr(2):\"\\n\"+str.split(\"\\n\").map(function(line){return\" \"+line}).join(\"\\n\"))):str=stylize(\"[Circular]\",\"special\")),name===void 0){if(\"Array\"===type&&key.match(/^\\d+$/))return str;name=JSON.stringify(\"\"+key),name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(name=name.substr(1,name.length-2),name=stylize(name,\"name\")):(name=name.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),name=stylize(name,\"string\"))}return name+\": \"+str});seen.pop();var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf(\"\\n\")>=0&&numLinesEst++,prev+cur.length+1},0);return output=length>50?braces[0]+(\"\"===base?\"\":base+\"\\n \")+\" \"+output.join(\",\\n \")+\" \"+braces[1]:braces[0]+base+\" \"+output.join(\", \")+\" \"+braces[1]}var seen=[],stylize=function(str,styleType){var styles={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},style={special:\"cyan\",number:\"blue\",\"boolean\":\"yellow\",undefined:\"grey\",\"null\":\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"}[styleType];return style?\"\u001b[\"+styles[style][0]+\"m\"+str+\"\u001b[\"+styles[style][1]+\"m\":str};return colors||(stylize=function(str){return str}),format(obj,depth===void 0?2:depth)},exports.log=function(){},exports.pump=null;var Object_keys=Object.keys||function(obj){var res=[];for(var key in obj)res.push(key);return res},Object_getOwnPropertyNames=Object.getOwnPropertyNames||function(obj){var res=[];for(var key in obj)Object.hasOwnProperty.call(obj,key)&&res.push(key);return res},Object_create=Object.create||function(prototype,properties){var object;if(null===prototype)object={__proto__:null};else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return properties!==void 0&&Object.defineProperties&&Object.defineProperties(object,properties),object};exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object_create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})};var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(\"string\"!=typeof f){for(var objects=[],i=0;arguments.length>i;i++)objects.push(exports.inspect(arguments[i]));return objects.join(\" \")}for(var i=1,args=arguments,len=args.length,str=(f+\"\").replace(formatRegExp,function(x){if(\"%%\"===x)return\"%\";if(i>=len)return x;switch(x){case\"%s\":return args[i++]+\"\";case\"%d\":return Number(args[i++]);case\"%j\":return JSON.stringify(args[i++]);default:return x}}),x=args[i];len>i;x=args[++i])str+=null===x||\"object\"!=typeof x?\" \"+x:\" \"+exports.inspect(x);return str}},{events:6}],5:[function(require,module){(function(){\"use strict\";function b64ToByteArray(b64){var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw\"Invalid string. Length must be a multiple of 4\";for(placeHolders=b64.indexOf(\"=\"),placeHolders=placeHolders>0?b64.length-placeHolders:0,arr=[],l=placeHolders>0?b64.length-4:b64.length,i=0,j=0;l>i;i+=4,j+=3)tmp=lookup.indexOf(b64[i])\u003C\u003C18|lookup.indexOf(b64[i+1])\u003C\u003C12|lookup.indexOf(b64[i+2])\u003C\u003C6|lookup.indexOf(b64[i+3]),arr.push((16711680&tmp)>>16),arr.push((65280&tmp)>>8),arr.push(255&tmp);return 2===placeHolders?(tmp=lookup.indexOf(b64[i])\u003C\u003C2|lookup.indexOf(b64[i+1])>>4,arr.push(255&tmp)):1===placeHolders&&(tmp=lookup.indexOf(b64[i])\u003C\u003C10|lookup.indexOf(b64[i+1])\u003C\u003C4|lookup.indexOf(b64[i+2])>>2,arr.push(255&tmp>>8),arr.push(255&tmp)),arr}function uint8ToBase64(uint8){function tripletToBase64(num){return lookup[63&num>>18]+lookup[63&num>>12]+lookup[63&num>>6]+lookup[63&num]}var i,temp,length,extraBytes=uint8.length%3,output=\"\";for(i=0,length=uint8.length-extraBytes;length>i;i+=3)temp=(uint8[i]\u003C\u003C16)+(uint8[i+1]\u003C\u003C8)+uint8[i+2],output+=tripletToBase64(temp);switch(extraBytes){case 1:temp=uint8[uint8.length-1],output+=lookup[temp>>2],output+=lookup[63&temp\u003C\u003C4],output+=\"==\";break;case 2:temp=(uint8[uint8.length-2]\u003C\u003C8)+uint8[uint8.length-1],output+=lookup[temp>>10],output+=lookup[63&temp>>4],output+=lookup[63&temp\u003C\u003C2],output+=\"=\"}return output}var lookup=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";module.exports.toByteArray=b64ToByteArray,module.exports.fromByteArray=uint8ToBase64})()},{}],7:[function(require,module,exports){exports.readIEEE754=function(buffer,offset,isBE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1\u003C\u003CeLen)-1,eBias=eMax>>1,nBits=-7,i=isBE?0:nBytes-1,d=isBE?1:-1,s=buffer[offset+i];for(i+=d,e=s&(1\u003C\u003C-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1\u003C\u003C-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?0/0:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.writeIEEE754=function(buffer,value,offset,isBE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1\u003C\u003CeLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isBE?nBytes-1:0,d=isBE?-1:1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||1/0===value?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),1>value*(c=Math.pow(2,-e))&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e\u003C\u003CmLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],8:[function(require,module){var process=module.exports={};process.nextTick=function(){var canSetImmediate=\"undefined\"!=typeof window&&window.setImmediate,canPost=\"undefined\"!=typeof window&&window.postMessage&&window.addEventListener;if(canSetImmediate)return function(f){return window.setImmediate(f)};if(canPost){var queue=[];return window.addEventListener(\"message\",function(ev){if(ev.source===window&&\"process-tick\"===ev.data&&(ev.stopPropagation(),queue.length>0)){var fn=queue.shift();fn()}},!0),function(fn){queue.push(fn),window.postMessage(\"process-tick\",\"*\")}}return function(fn){setTimeout(fn,0)}}(),process.title=\"browser\",process.browser=!0,process.env={},process.argv=[],process.binding=function(){throw Error(\"process.binding is not supported\")},process.cwd=function(){return\"/\"},process.chdir=function(){throw Error(\"process.chdir is not supported\")}},{}],6:[function(require,module,exports){(function(process){function indexOf(xs,x){if(xs.indexOf)return xs.indexOf(x);for(var i=0;xs.length>i;i++)if(x===xs[i])return i;return-1}process.EventEmitter||(process.EventEmitter=function(){});var EventEmitter=exports.EventEmitter=process.EventEmitter,isArray=\"function\"==typeof Array.isArray?Array.isArray:function(xs){return\"[object Array]\"===Object.prototype.toString.call(xs)},defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){this._events||(this._events={}),this._events.maxListeners=n},EventEmitter.prototype.emit=function(type){if(\"error\"===type&&(!this._events||!this._events.error||isArray(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error(\"Uncaught, unspecified 'error' event.\");if(!this._events)return!1;var handler=this._events[type];if(!handler)return!1;if(\"function\"==typeof handler){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:var args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}return!0}if(isArray(handler)){for(var args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),i=0,l=listeners.length;l>i;i++)listeners[i].apply(this,args);return!0}return!1},EventEmitter.prototype.addListener=function(type,listener){if(\"function\"!=typeof listener)throw Error(\"addListener only takes instances of Function\");if(this._events||(this._events={}),this.emit(\"newListener\",type,listener),this._events[type])if(isArray(this._events[type])){if(!this._events[type].warned){var m;m=void 0!==this._events.maxListeners?this._events.maxListeners:defaultMaxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[type].length),console.trace())}this._events[type].push(listener)}else this._events[type]=[this._events[type],listener];else this._events[type]=listener;return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){var self=this;return self.on(type,function g(){self.removeListener(type,g),listener.apply(this,arguments)}),this},EventEmitter.prototype.removeListener=function(type,listener){if(\"function\"!=typeof listener)throw Error(\"removeListener only takes instances of Function\");if(!this._events||!this._events[type])return this;var list=this._events[type];if(isArray(list)){var i=indexOf(list,listener);if(0>i)return this;list.splice(i,1),0==list.length&&delete this._events[type]}else this._events[type]===listener&&delete this._events[type];return this},EventEmitter.prototype.removeAllListeners=function(type){return 0===arguments.length?(this._events={},this):(type&&this._events&&this._events[type]&&(this._events[type]=null),this)},EventEmitter.prototype.listeners=function(type){return this._events||(this._events={}),this._events[type]||(this._events[type]=[]),isArray(this._events[type])||(this._events[type]=[this._events[type]]),this._events[type]}})(require(\"__browserify_process\"))},{__browserify_process:8}],4:[function(require,module,exports){(function(){function SlowBuffer(size){this.length=size}function toHex(n){return 16>n?\"0\"+n.toString(16):n.toString(16)}function utf8ToBytes(str){for(var byteArray=[],i=0;str.length>i;i++)if(127>=str.charCodeAt(i))byteArray.push(str.charCodeAt(i));else for(var h=encodeURIComponent(str.charAt(i)).substr(1).split(\"%\"),j=0;h.length>j;j++)byteArray.push(parseInt(h[j],16));return byteArray}function asciiToBytes(str){for(var byteArray=[],i=0;str.length>i;i++)byteArray.push(255&str.charCodeAt(i));return byteArray}function base64ToBytes(str){return require(\"base64-js\").toByteArray(str)}function blitBuffer(src,dst,offset,length){for(var i=0;length>i&&!(i+offset>=dst.length||i>=src.length);)dst[i+offset]=src[i],i++;return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}function coerce(length){return length=~~Math.ceil(+length),0>length?0:length}function Buffer(subject,encoding,offset){if(!(this instanceof Buffer))return new Buffer(subject,encoding,offset);var type;if(\"number\"==typeof offset)this.length=coerce(encoding),this.parent=subject,this.offset=offset;else{switch(type=typeof subject){case\"number\":this.length=coerce(subject);break;case\"string\":this.length=Buffer.byteLength(subject,encoding);break;case\"object\":this.length=coerce(subject.length);break;default:throw Error(\"First argument needs to be a number, array or string.\")}if(this.length>Buffer.poolSize?(this.parent=new SlowBuffer(this.length),this.offset=0):((!pool||pool.length-pool.used\u003Cthis.length)&&allocPool(),this.parent=pool,this.offset=pool.used,pool.used+=this.length),isArrayIsh(subject))for(var i=0;this.length>i;i++)this.parent[i+this.offset]=subject[i];else\"string\"==type&&(this.length=this.write(subject,0,encoding))}}function isArrayIsh(subject){return Array.isArray(subject)||Buffer.isBuffer(subject)||subject&&\"object\"==typeof subject&&\"number\"==typeof subject.length}function allocPool(){pool=new SlowBuffer(Buffer.poolSize),pool.used=0}function readUInt16(buffer,offset,isBigEndian,noAssert){var val=0;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to read beyond buffer length\")),isBigEndian?(val=buffer.parent[buffer.offset+offset]\u003C\u003C8,val|=buffer.parent[buffer.offset+offset+1]):(val=buffer.parent[buffer.offset+offset],val|=buffer.parent[buffer.offset+offset+1]\u003C\u003C8),val}function readUInt32(buffer,offset,isBigEndian,noAssert){var val=0;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),isBigEndian?(val=buffer.parent[buffer.offset+offset+1]\u003C\u003C16,val|=buffer.parent[buffer.offset+offset+2]\u003C\u003C8,val|=buffer.parent[buffer.offset+offset+3],val+=buffer.parent[buffer.offset+offset]\u003C\u003C24>>>0):(val=buffer.parent[buffer.offset+offset+2]\u003C\u003C16,val|=buffer.parent[buffer.offset+offset+1]\u003C\u003C8,val|=buffer.parent[buffer.offset+offset],val+=buffer.parent[buffer.offset+offset+3]\u003C\u003C24>>>0),val}function readInt16(buffer,offset,isBigEndian,noAssert){var neg,val;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to read beyond buffer length\")),val=readUInt16(buffer,offset,isBigEndian,noAssert),neg=32768&val,neg?-1*(65535-val+1):val}function readInt32(buffer,offset,isBigEndian,noAssert){var neg,val;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),val=readUInt32(buffer,offset,isBigEndian,noAssert),neg=2147483648&val,neg?-1*(4294967295-val+1):val}function readFloat(buffer,offset,isBigEndian,noAssert){return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),require(\"./buffer_ieee754\").readIEEE754(buffer,offset,isBigEndian,23,4)}function readDouble(buffer,offset,isBigEndian,noAssert){return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(buffer.length>offset+7,\"Trying to read beyond buffer length\")),require(\"./buffer_ieee754\").readIEEE754(buffer,offset,isBigEndian,52,8)}function verifuint(value,max){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(value>=0,\"specified a negative value for writing an unsigned value\"),assert.ok(max>=value,\"value is larger than maximum value for type\"),assert.ok(Math.floor(value)===value,\"value has a fractional component\")}function writeUInt16(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"trying to write beyond buffer length\"),verifuint(value,65535)),isBigEndian?(buffer.parent[buffer.offset+offset]=(65280&value)>>>8,buffer.parent[buffer.offset+offset+1]=255&value):(buffer.parent[buffer.offset+offset+1]=(65280&value)>>>8,buffer.parent[buffer.offset+offset]=255&value)}function writeUInt32(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"trying to write beyond buffer length\"),verifuint(value,4294967295)),isBigEndian?(buffer.parent[buffer.offset+offset]=255&value>>>24,buffer.parent[buffer.offset+offset+1]=255&value>>>16,buffer.parent[buffer.offset+offset+2]=255&value>>>8,buffer.parent[buffer.offset+offset+3]=255&value):(buffer.parent[buffer.offset+offset+3]=255&value>>>24,buffer.parent[buffer.offset+offset+2]=255&value>>>16,buffer.parent[buffer.offset+offset+1]=255&value>>>8,buffer.parent[buffer.offset+offset]=255&value)}function verifsint(value,max,min){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(max>=value,\"value larger than maximum allowed value\"),assert.ok(value>=min,\"value smaller than minimum allowed value\"),assert.ok(Math.floor(value)===value,\"value has a fractional component\")}function verifIEEE754(value,max,min){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(max>=value,\"value larger than maximum allowed value\"),assert.ok(value>=min,\"value smaller than minimum allowed value\")}function writeInt16(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to write beyond buffer length\"),verifsint(value,32767,-32768)),value>=0?writeUInt16(buffer,value,offset,isBigEndian,noAssert):writeUInt16(buffer,65535+value+1,offset,isBigEndian,noAssert)}function writeInt32(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to write beyond buffer length\"),verifsint(value,2147483647,-2147483648)),value>=0?writeUInt32(buffer,value,offset,isBigEndian,noAssert):writeUInt32(buffer,4294967295+value+1,offset,isBigEndian,noAssert)}function writeFloat(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to write beyond buffer length\"),verifIEEE754(value,3.4028234663852886e38,-3.4028234663852886e38)),require(\"./buffer_ieee754\").writeIEEE754(buffer,value,offset,isBigEndian,23,4)}function writeDouble(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+7,\"Trying to write beyond buffer length\"),verifIEEE754(value,1.7976931348623157e308,-1.7976931348623157e308)),require(\"./buffer_ieee754\").writeIEEE754(buffer,value,offset,isBigEndian,52,8)}var assert=require(\"assert\");exports.INSPECT_MAX_BYTES=50,SlowBuffer.byteLength=function(str,encoding){switch(encoding||\"utf8\"){case\"hex\":return str.length/2;case\"utf8\":case\"utf-8\":return utf8ToBytes(str).length;case\"ascii\":return str.length;case\"base64\":return base64ToBytes(str).length;default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.utf8Write=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(utf8ToBytes(string),this,offset,length)},SlowBuffer.prototype.asciiWrite=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(asciiToBytes(string),this,offset,length)},SlowBuffer.prototype.base64Write=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(base64ToBytes(string),this,offset,length)},SlowBuffer.prototype.base64Slice=function(){var bytes=Array.prototype.slice.apply(this,arguments);return require(\"base64-js\").fromByteArray(bytes)},SlowBuffer.prototype.utf8Slice=function(){for(var bytes=Array.prototype.slice.apply(this,arguments),res=\"\",tmp=\"\",i=0;bytes.length>i;)127>=bytes[i]?(res+=decodeUtf8Char(tmp)+String.fromCharCode(bytes[i]),tmp=\"\"):tmp+=\"%\"+bytes[i].toString(16),i++;return res+decodeUtf8Char(tmp)},SlowBuffer.prototype.asciiSlice=function(){for(var bytes=Array.prototype.slice.apply(this,arguments),ret=\"\",i=0;bytes.length>i;i++)ret+=String.fromCharCode(bytes[i]);return ret},SlowBuffer.prototype.inspect=function(){for(var out=[],len=this.length,i=0;len>i;i++)if(out[i]=toHex(this[i]),i==exports.INSPECT_MAX_BYTES){out[i+1]=\"...\";break}return\"\u003CSlowBuffer \"+out.join(\" \")+\">\"},SlowBuffer.prototype.hexSlice=function(start,end){var len=this.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out=\"\",i=start;end>i;i++)out+=toHex(this[i]);return out},SlowBuffer.prototype.toString=function(encoding,start,end){if(encoding=((encoding||\"utf8\")+\"\").toLowerCase(),start=+start||0,end===void 0&&(end=this.length),+end==start)return\"\";\nswitch(encoding){case\"hex\":return this.hexSlice(start,end);case\"utf8\":case\"utf-8\":return this.utf8Slice(start,end);case\"ascii\":return this.asciiSlice(start,end);case\"binary\":return this.binarySlice(start,end);case\"base64\":return this.base64Slice(start,end);case\"ucs2\":case\"ucs-2\":return this.ucs2Slice(start,end);default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.hexWrite=function(string,offset,length){offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2)throw Error(\"Invalid hex string\");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var byte=parseInt(string.substr(2*i,2),16);if(isNaN(byte))throw Error(\"Invalid hex string\");this[offset+i]=byte}return SlowBuffer._charsWritten=2*i,i},SlowBuffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;switch(length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||\"utf8\")+\"\").toLowerCase()){case\"hex\":return this.hexWrite(string,offset,length);case\"utf8\":case\"utf-8\":return this.utf8Write(string,offset,length);case\"ascii\":return this.asciiWrite(string,offset,length);case\"binary\":return this.binaryWrite(string,offset,length);case\"base64\":return this.base64Write(string,offset,length);case\"ucs2\":case\"ucs-2\":return this.ucs2Write(string,offset,length);default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");return new Buffer(this,end-start,+start)},SlowBuffer.prototype.copy=function(target,targetstart,sourcestart,sourceend){for(var temp=[],i=sourcestart;sourceend>i;i++)assert.ok(this[i]!==void 0,\"copying undefined buffer bytes!\"),temp.push(this[i]);for(var i=targetstart;targetstart+temp.length>i;i++)target[i]=temp[i-targetstart]},exports.SlowBuffer=SlowBuffer,exports.Buffer=Buffer,Buffer.poolSize=8192;var pool;Buffer.isBuffer=function(b){return b instanceof Buffer||b instanceof SlowBuffer},Buffer.concat=function(list,totalLength){if(!Array.isArray(list))throw Error(\"Usage: Buffer.concat(list, [totalLength])\\n list should be an Array.\");if(0===list.length)return new Buffer(0);if(1===list.length)return list[0];if(\"number\"!=typeof totalLength){totalLength=0;for(var i=0;list.length>i;i++){var buf=list[i];totalLength+=buf.length}}for(var buffer=new Buffer(totalLength),pos=0,i=0;list.length>i;i++){var buf=list[i];buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.prototype.inspect=function(){for(var out=[],len=this.length,i=0;len>i;i++)if(out[i]=toHex(this.parent[i+this.offset]),i==exports.INSPECT_MAX_BYTES){out[i+1]=\"...\";break}return\"\u003CBuffer \"+out.join(\" \")+\">\"},Buffer.prototype.get=function(i){if(0>i||i>=this.length)throw Error(\"oob\");return this.parent[this.offset+i]},Buffer.prototype.set=function(i,v){if(0>i||i>=this.length)throw Error(\"oob\");return this.parent[this.offset+i]=v},Buffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||\"utf8\")+\"\").toLowerCase();var ret;switch(encoding){case\"hex\":ret=this.parent.hexWrite(string,this.offset+offset,length);break;case\"utf8\":case\"utf-8\":ret=this.parent.utf8Write(string,this.offset+offset,length);break;case\"ascii\":ret=this.parent.asciiWrite(string,this.offset+offset,length);break;case\"binary\":ret=this.parent.binaryWrite(string,this.offset+offset,length);break;case\"base64\":ret=this.parent.base64Write(string,this.offset+offset,length);break;case\"ucs2\":case\"ucs-2\":ret=this.parent.ucs2Write(string,this.offset+offset,length);break;default:throw Error(\"Unknown encoding\")}return Buffer._charsWritten=SlowBuffer._charsWritten,ret},Buffer.prototype.toString=function(encoding,start,end){switch(encoding=((encoding||\"utf8\")+\"\").toLowerCase(),start===void 0||0>start?start=0:start>this.length&&(start=this.length),end===void 0||end>this.length?end=this.length:0>end&&(end=0),start+=this.offset,end+=this.offset,encoding){case\"hex\":return this.parent.hexSlice(start,end);case\"utf8\":case\"utf-8\":return this.parent.utf8Slice(start,end);case\"ascii\":return this.parent.asciiSlice(start,end);case\"binary\":return this.parent.binarySlice(start,end);case\"base64\":return this.parent.base64Slice(start,end);case\"ucs2\":case\"ucs-2\":return this.parent.ucs2Slice(start,end);default:throw Error(\"Unknown encoding\")}},Buffer.byteLength=SlowBuffer.byteLength,Buffer.prototype.fill=function(value,start,end){if(value||(value=0),start||(start=0),end||(end=this.length),\"string\"==typeof value&&(value=value.charCodeAt(0)),\"number\"!=typeof value||isNaN(value))throw Error(\"value is not a number\");if(start>end)throw Error(\"end \u003C start\");if(end===start)return 0;if(0==this.length)return 0;if(0>start||start>=this.length)throw Error(\"start out of bounds\");if(0>end||end>this.length)throw Error(\"end out of bounds\");return this.parent.fill(value,start+this.offset,end+this.offset)},Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(start||(start=0),end||(end=this.length),target_start||(target_start=0),start>end)throw Error(\"sourceEnd \u003C sourceStart\");if(end===start)return 0;if(0==target.length||0==source.length)return 0;if(0>target_start||target_start>=target.length)throw Error(\"targetStart out of bounds\");if(0>start||start>=source.length)throw Error(\"sourceStart out of bounds\");if(0>end||end>source.length)throw Error(\"sourceEnd out of bounds\");return end>this.length&&(end=this.length),end-start>target.length-target_start&&(end=target.length-target_start+start),this.parent.copy(target.parent,target_start+target.offset,start+this.offset,end+this.offset)},Buffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");return new Buffer(this.parent,end-start,+start+this.offset)},Buffer.prototype.utf8Slice=function(start,end){return this.toString(\"utf8\",start,end)},Buffer.prototype.binarySlice=function(start,end){return this.toString(\"binary\",start,end)},Buffer.prototype.asciiSlice=function(start,end){return this.toString(\"ascii\",start,end)},Buffer.prototype.utf8Write=function(string,offset){return this.write(string,offset,\"utf8\")},Buffer.prototype.binaryWrite=function(string,offset){return this.write(string,offset,\"binary\")},Buffer.prototype.asciiWrite=function(string,offset){return this.write(string,offset,\"ascii\")},Buffer.prototype.readUInt8=function(offset,noAssert){var buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to read beyond buffer length\")),buffer.parent[buffer.offset+offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return readUInt16(this,offset,!1,noAssert)},Buffer.prototype.readUInt16BE=function(offset,noAssert){return readUInt16(this,offset,!0,noAssert)},Buffer.prototype.readUInt32LE=function(offset,noAssert){return readUInt32(this,offset,!1,noAssert)},Buffer.prototype.readUInt32BE=function(offset,noAssert){return readUInt32(this,offset,!0,noAssert)},Buffer.prototype.readInt8=function(offset,noAssert){var neg,buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to read beyond buffer length\")),neg=128&buffer.parent[buffer.offset+offset],neg?-1*(255-buffer.parent[buffer.offset+offset]+1):buffer.parent[buffer.offset+offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){return readInt16(this,offset,!1,noAssert)},Buffer.prototype.readInt16BE=function(offset,noAssert){return readInt16(this,offset,!0,noAssert)},Buffer.prototype.readInt32LE=function(offset,noAssert){return readInt32(this,offset,!1,noAssert)},Buffer.prototype.readInt32BE=function(offset,noAssert){return readInt32(this,offset,!0,noAssert)},Buffer.prototype.readFloatLE=function(offset,noAssert){return readFloat(this,offset,!1,noAssert)},Buffer.prototype.readFloatBE=function(offset,noAssert){return readFloat(this,offset,!0,noAssert)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return readDouble(this,offset,!1,noAssert)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return readDouble(this,offset,!0,noAssert)},Buffer.prototype.writeUInt8=function(value,offset,noAssert){var buffer=this;noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"trying to write beyond buffer length\"),verifuint(value,255)),buffer.parent[buffer.offset+offset]=value},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){writeUInt16(this,value,offset,!1,noAssert)},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){writeUInt16(this,value,offset,!0,noAssert)},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){writeUInt32(this,value,offset,!1,noAssert)},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){writeUInt32(this,value,offset,!0,noAssert)},Buffer.prototype.writeInt8=function(value,offset,noAssert){var buffer=this;noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to write beyond buffer length\"),verifsint(value,127,-128)),value>=0?buffer.writeUInt8(value,offset,noAssert):buffer.writeUInt8(255+value+1,offset,noAssert)},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){writeInt16(this,value,offset,!1,noAssert)},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){writeInt16(this,value,offset,!0,noAssert)},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){writeInt32(this,value,offset,!1,noAssert)},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){writeInt32(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){writeDouble(this,value,offset,!0,noAssert)},SlowBuffer.prototype.readUInt8=Buffer.prototype.readUInt8,SlowBuffer.prototype.readUInt16LE=Buffer.prototype.readUInt16LE,SlowBuffer.prototype.readUInt16BE=Buffer.prototype.readUInt16BE,SlowBuffer.prototype.readUInt32LE=Buffer.prototype.readUInt32LE,SlowBuffer.prototype.readUInt32BE=Buffer.prototype.readUInt32BE,SlowBuffer.prototype.readInt8=Buffer.prototype.readInt8,SlowBuffer.prototype.readInt16LE=Buffer.prototype.readInt16LE,SlowBuffer.prototype.readInt16BE=Buffer.prototype.readInt16BE,SlowBuffer.prototype.readInt32LE=Buffer.prototype.readInt32LE,SlowBuffer.prototype.readInt32BE=Buffer.prototype.readInt32BE,SlowBuffer.prototype.readFloatLE=Buffer.prototype.readFloatLE,SlowBuffer.prototype.readFloatBE=Buffer.prototype.readFloatBE,SlowBuffer.prototype.readDoubleLE=Buffer.prototype.readDoubleLE,SlowBuffer.prototype.readDoubleBE=Buffer.prototype.readDoubleBE,SlowBuffer.prototype.writeUInt8=Buffer.prototype.writeUInt8,SlowBuffer.prototype.writeUInt16LE=Buffer.prototype.writeUInt16LE,SlowBuffer.prototype.writeUInt16BE=Buffer.prototype.writeUInt16BE,SlowBuffer.prototype.writeUInt32LE=Buffer.prototype.writeUInt32LE,SlowBuffer.prototype.writeUInt32BE=Buffer.prototype.writeUInt32BE,SlowBuffer.prototype.writeInt8=Buffer.prototype.writeInt8,SlowBuffer.prototype.writeInt16LE=Buffer.prototype.writeInt16LE,SlowBuffer.prototype.writeInt16BE=Buffer.prototype.writeInt16BE,SlowBuffer.prototype.writeInt32LE=Buffer.prototype.writeInt32LE,SlowBuffer.prototype.writeInt32BE=Buffer.prototype.writeInt32BE,SlowBuffer.prototype.writeFloatLE=Buffer.prototype.writeFloatLE,SlowBuffer.prototype.writeFloatBE=Buffer.prototype.writeFloatBE,SlowBuffer.prototype.writeDoubleLE=Buffer.prototype.writeDoubleLE,SlowBuffer.prototype.writeDoubleBE=Buffer.prototype.writeDoubleBE})()},{assert:2,\"./buffer_ieee754\":7,\"base64-js\":9}],9:[function(require,module){(function(){\"use strict\";function b64ToByteArray(b64){var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw\"Invalid string. Length must be a multiple of 4\";for(placeHolders=b64.indexOf(\"=\"),placeHolders=placeHolders>0?b64.length-placeHolders:0,arr=[],l=placeHolders>0?b64.length-4:b64.length,i=0,j=0;l>i;i+=4,j+=3)tmp=lookup.indexOf(b64[i])\u003C\u003C18|lookup.indexOf(b64[i+1])\u003C\u003C12|lookup.indexOf(b64[i+2])\u003C\u003C6|lookup.indexOf(b64[i+3]),arr.push((16711680&tmp)>>16),arr.push((65280&tmp)>>8),arr.push(255&tmp);return 2===placeHolders?(tmp=lookup.indexOf(b64[i])\u003C\u003C2|lookup.indexOf(b64[i+1])>>4,arr.push(255&tmp)):1===placeHolders&&(tmp=lookup.indexOf(b64[i])\u003C\u003C10|lookup.indexOf(b64[i+1])\u003C\u003C4|lookup.indexOf(b64[i+2])>>2,arr.push(255&tmp>>8),arr.push(255&tmp)),arr}function uint8ToBase64(uint8){function tripletToBase64(num){return lookup[63&num>>18]+lookup[63&num>>12]+lookup[63&num>>6]+lookup[63&num]}var i,temp,length,extraBytes=uint8.length%3,output=\"\";for(i=0,length=uint8.length-extraBytes;length>i;i+=3)temp=(uint8[i]\u003C\u003C16)+(uint8[i+1]\u003C\u003C8)+uint8[i+2],output+=tripletToBase64(temp);switch(extraBytes){case 1:temp=uint8[uint8.length-1],output+=lookup[temp>>2],output+=lookup[63&temp\u003C\u003C4],output+=\"==\";break;case 2:temp=(uint8[uint8.length-2]\u003C\u003C8)+uint8[uint8.length-1],output+=lookup[temp>>10],output+=lookup[63&temp>>4],output+=lookup[63&temp\u003C\u003C2],output+=\"=\"}return output}var lookup=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";module.exports.toByteArray=b64ToByteArray,module.exports.fromByteArray=uint8ToBase64})()},{}]},{},[]),module.exports=require(\"buffer-browserify\")},{}],67:[function(require,module){(function(Buffer){function clone(parent,circular){function _clone(parent,context,child,cIndex){var i;if(\"object\"==typeof parent){if(null==parent)return parent;for(i in circularParent)if(circularParent[i]===parent)return circularReplace.push({resolveTo:i,child:child,i:cIndex}),null;if(circularParent[context]=parent,util.isArray(parent)){child=[];for(i in parent)child[i]=_clone(parent[i],context+\"[\"+i+\"]\",child,i)}else if(util.isDate(parent))child=new Date(parent.getTime());else if(util.isRegExp(parent))child=RegExp(parent.source);else if(useBuffer&&Buffer.isBuffer(parent))child=new Buffer(parent.length),parent.copy(child);else{child={},child.__proto__=parent.__proto__;for(i in parent)child[i]=_clone(parent[i],context+\"[\"+i+\"]\",child,i)}circularResolved[context]=child}else child=parent;return child}circular===void 0&&(circular=!0);var i,useBuffer=Buffer!==void 0;if(circular){var circularParent={},circularResolved={},circularReplace=[],cloned=_clone(parent,\"*\");for(i in circularReplace){var c=circularReplace[i];c&&c.child&&c.i in c.child&&(c.child[c.i]=circularResolved[c.resolveTo])}return cloned}var child;if(\"object\"==typeof parent){if(null==parent)return parent;if(\"Array\"===parent.constructor.name){child=[];for(i in parent)child[i]=clone(parent[i],circular)}else if(util.isDate(parent))child=new Date(parent.getTime());else if(util.isRegExp(parent))child=RegExp(parent.source);else{child={},child.__proto__=parent.__proto__;for(i in parent)child[i]=clone(parent[i],circular)}}else child=parent;return child}var util=require(\"util\");module.exports=clone,clone.clonePrototype=require(\"./clonePrototype.js\")})(require(\"__browserify_buffer\").Buffer)},{util:6,\"./clonePrototype.js\":78,__browserify_buffer:77}],71:[function(require,module,exports){(function(){function SlowBuffer(size){this.length=size}function toHex(n){return 16>n?\"0\"+n.toString(16):n.toString(16)}function utf8ToBytes(str){for(var byteArray=[],i=0;str.length>i;i++)if(127>=str.charCodeAt(i))byteArray.push(str.charCodeAt(i));else for(var h=encodeURIComponent(str.charAt(i)).substr(1).split(\"%\"),j=0;h.length>j;j++)byteArray.push(parseInt(h[j],16));return byteArray}function asciiToBytes(str){for(var byteArray=[],i=0;str.length>i;i++)byteArray.push(255&str.charCodeAt(i));return byteArray}function base64ToBytes(str){return require(\"base64-js\").toByteArray(str)}function blitBuffer(src,dst,offset,length){for(var i=0;length>i&&!(i+offset>=dst.length||i>=src.length);)dst[i+offset]=src[i],i++;return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}function coerce(length){return length=~~Math.ceil(+length),0>length?0:length}function Buffer(subject,encoding,offset){if(!(this instanceof Buffer))return new Buffer(subject,encoding,offset);var type;if(\"number\"==typeof offset)this.length=coerce(encoding),this.parent=subject,this.offset=offset;else{switch(type=typeof subject){case\"number\":this.length=coerce(subject);break;case\"string\":this.length=Buffer.byteLength(subject,encoding);break;case\"object\":this.length=coerce(subject.length);break;default:throw Error(\"First argument needs to be a number, array or string.\")}if(this.length>Buffer.poolSize?(this.parent=new SlowBuffer(this.length),this.offset=0):((!pool||pool.length-pool.used\u003Cthis.length)&&allocPool(),this.parent=pool,this.offset=pool.used,pool.used+=this.length),isArrayIsh(subject))for(var i=0;this.length>i;i++)this.parent[i+this.offset]=subject instanceof Buffer?subject.readUInt8(i):subject[i];else\"string\"==type&&(this.length=this.write(subject,0,encoding))}}function isArrayIsh(subject){return Array.isArray(subject)||Buffer.isBuffer(subject)||subject&&\"object\"==typeof subject&&\"number\"==typeof subject.length}function allocPool(){pool=new SlowBuffer(Buffer.poolSize),pool.used=0}function readUInt16(buffer,offset,isBigEndian,noAssert){var val=0;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to read beyond buffer length\")),offset>=buffer.length?0:(isBigEndian?(val=buffer.parent[buffer.offset+offset]\u003C\u003C8,buffer.length>offset+1&&(val|=buffer.parent[buffer.offset+offset+1])):(val=buffer.parent[buffer.offset+offset],buffer.length>offset+1&&(val|=buffer.parent[buffer.offset+offset+1]\u003C\u003C8)),val)}function readUInt32(buffer,offset,isBigEndian,noAssert){var val=0;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),offset>=buffer.length?0:(isBigEndian?(buffer.length>offset+1&&(val=buffer.parent[buffer.offset+offset+1]\u003C\u003C16),buffer.length>offset+2&&(val|=buffer.parent[buffer.offset+offset+2]\u003C\u003C8),buffer.length>offset+3&&(val|=buffer.parent[buffer.offset+offset+3]),val+=buffer.parent[buffer.offset+offset]\u003C\u003C24>>>0):(buffer.length>offset+2&&(val=buffer.parent[buffer.offset+offset+2]\u003C\u003C16),buffer.length>offset+1&&(val|=buffer.parent[buffer.offset+offset+1]\u003C\u003C8),val|=buffer.parent[buffer.offset+offset],buffer.length>offset+3&&(val+=buffer.parent[buffer.offset+offset+3]\u003C\u003C24>>>0)),val)}function readInt16(buffer,offset,isBigEndian,noAssert){var neg,val;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to read beyond buffer length\")),val=readUInt16(buffer,offset,isBigEndian,noAssert),neg=32768&val,neg?-1*(65535-val+1):val}function readInt32(buffer,offset,isBigEndian,noAssert){var neg,val;return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),val=readUInt32(buffer,offset,isBigEndian,noAssert),neg=2147483648&val,neg?-1*(4294967295-val+1):val}function readFloat(buffer,offset,isBigEndian,noAssert){return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(buffer.length>offset+3,\"Trying to read beyond buffer length\")),require(\"./buffer_ieee754\").readIEEE754(buffer,offset,isBigEndian,23,4)}function readDouble(buffer,offset,isBigEndian,noAssert){return noAssert||(assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(buffer.length>offset+7,\"Trying to read beyond buffer length\")),require(\"./buffer_ieee754\").readIEEE754(buffer,offset,isBigEndian,52,8)}function verifuint(value,max){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(value>=0,\"specified a negative value for writing an unsigned value\"),assert.ok(max>=value,\"value is larger than maximum value for type\"),assert.ok(Math.floor(value)===value,\"value has a fractional component\")}function writeUInt16(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"trying to write beyond buffer length\"),verifuint(value,65535));for(var i=0;Math.min(buffer.length-offset,2)>i;i++)buffer.parent[buffer.offset+offset+i]=(value&255\u003C\u003C8*(isBigEndian?1-i:i))>>>8*(isBigEndian?1-i:i)}function writeUInt32(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"trying to write beyond buffer length\"),verifuint(value,4294967295));for(var i=0;Math.min(buffer.length-offset,4)>i;i++)buffer.parent[buffer.offset+offset+i]=255&value>>>8*(isBigEndian?3-i:i)}function verifsint(value,max,min){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(max>=value,\"value larger than maximum allowed value\"),assert.ok(value>=min,\"value smaller than minimum allowed value\"),assert.ok(Math.floor(value)===value,\"value has a fractional component\")}function verifIEEE754(value,max,min){assert.ok(\"number\"==typeof value,\"cannot write a non-number as a number\"),assert.ok(max>=value,\"value larger than maximum allowed value\"),assert.ok(value>=min,\"value smaller than minimum allowed value\")}function writeInt16(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+1,\"Trying to write beyond buffer length\"),verifsint(value,32767,-32768)),value>=0?writeUInt16(buffer,value,offset,isBigEndian,noAssert):writeUInt16(buffer,65535+value+1,offset,isBigEndian,noAssert)}function writeInt32(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to write beyond buffer length\"),verifsint(value,2147483647,-2147483648)),value>=0?writeUInt32(buffer,value,offset,isBigEndian,noAssert):writeUInt32(buffer,4294967295+value+1,offset,isBigEndian,noAssert)}function writeFloat(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+3,\"Trying to write beyond buffer length\"),verifIEEE754(value,3.4028234663852886e38,-3.4028234663852886e38)),require(\"./buffer_ieee754\").writeIEEE754(buffer,value,offset,isBigEndian,23,4)}function writeDouble(buffer,value,offset,isBigEndian,noAssert){noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(\"boolean\"==typeof isBigEndian,\"missing or invalid endian\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset+7,\"Trying to write beyond buffer length\"),verifIEEE754(value,1.7976931348623157e308,-1.7976931348623157e308)),require(\"./buffer_ieee754\").writeIEEE754(buffer,value,offset,isBigEndian,52,8)}var assert=require(\"assert\");exports.INSPECT_MAX_BYTES=50,SlowBuffer.byteLength=function(str,encoding){switch(encoding||\"utf8\"){case\"hex\":return str.length/2;case\"utf8\":case\"utf-8\":return utf8ToBytes(str).length;case\"ascii\":case\"binary\":return str.length;case\"base64\":return base64ToBytes(str).length;default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.utf8Write=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(utf8ToBytes(string),this,offset,length)},SlowBuffer.prototype.asciiWrite=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(asciiToBytes(string),this,offset,length)},SlowBuffer.prototype.binaryWrite=SlowBuffer.prototype.asciiWrite,SlowBuffer.prototype.base64Write=function(string,offset,length){return SlowBuffer._charsWritten=blitBuffer(base64ToBytes(string),this,offset,length)},SlowBuffer.prototype.base64Slice=function(){var bytes=Array.prototype.slice.apply(this,arguments);return require(\"base64-js\").fromByteArray(bytes)},SlowBuffer.prototype.utf8Slice=function(){for(var bytes=Array.prototype.slice.apply(this,arguments),res=\"\",tmp=\"\",i=0;bytes.length>i;)127>=bytes[i]?(res+=decodeUtf8Char(tmp)+String.fromCharCode(bytes[i]),tmp=\"\"):tmp+=\"%\"+bytes[i].toString(16),i++;return res+decodeUtf8Char(tmp)},SlowBuffer.prototype.asciiSlice=function(){for(var bytes=Array.prototype.slice.apply(this,arguments),ret=\"\",i=0;bytes.length>i;i++)ret+=String.fromCharCode(bytes[i]);return ret},SlowBuffer.prototype.binarySlice=SlowBuffer.prototype.asciiSlice,SlowBuffer.prototype.inspect=function(){for(var out=[],len=this.length,i=0;len>i;i++)if(out[i]=toHex(this[i]),i==exports.INSPECT_MAX_BYTES){out[i+1]=\"...\";break}return\"\u003CSlowBuffer \"+out.join(\" \")+\">\"},SlowBuffer.prototype.hexSlice=function(start,end){var len=this.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out=\"\",i=start;end>i;i++)out+=toHex(this[i]);return out},SlowBuffer.prototype.toString=function(encoding,start,end){if(encoding=((encoding||\"utf8\")+\"\").toLowerCase(),start=+start||0,end===void 0&&(end=this.length),+end==start)return\"\";switch(encoding){case\"hex\":return this.hexSlice(start,end);case\"utf8\":case\"utf-8\":return this.utf8Slice(start,end);case\"ascii\":return this.asciiSlice(start,end);case\"binary\":return this.binarySlice(start,end);case\"base64\":return this.base64Slice(start,end);case\"ucs2\":case\"ucs-2\":return this.ucs2Slice(start,end);default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.hexWrite=function(string,offset,length){offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2)throw Error(\"Invalid hex string\");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var byte=parseInt(string.substr(2*i,2),16);if(isNaN(byte))throw Error(\"Invalid hex string\");this[offset+i]=byte}return SlowBuffer._charsWritten=2*i,i},SlowBuffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;switch(length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||\"utf8\")+\"\").toLowerCase()){case\"hex\":return this.hexWrite(string,offset,length);case\"utf8\":case\"utf-8\":return this.utf8Write(string,offset,length);case\"ascii\":return this.asciiWrite(string,offset,length);case\"binary\":return this.binaryWrite(string,offset,length);case\"base64\":return this.base64Write(string,offset,length);case\"ucs2\":case\"ucs-2\":return this.ucs2Write(string,offset,length);default:throw Error(\"Unknown encoding\")}},SlowBuffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");return new Buffer(this,end-start,+start)},SlowBuffer.prototype.copy=function(target,targetstart,sourcestart,sourceend){for(var temp=[],i=sourcestart;sourceend>i;i++)assert.ok(this[i]!==void 0,\"copying undefined buffer bytes!\"),temp.push(this[i]);for(var i=targetstart;targetstart+temp.length>i;i++)target[i]=temp[i-targetstart]},SlowBuffer.prototype.fill=function(value,start,end){if(end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");for(var i=start;end>i;i++)this[i]=value},exports.SlowBuffer=SlowBuffer,exports.Buffer=Buffer,Buffer.poolSize=8192;var pool;Buffer.isBuffer=function(b){return b instanceof Buffer||b instanceof SlowBuffer},Buffer.concat=function(list,totalLength){if(!Array.isArray(list))throw Error(\"Usage: Buffer.concat(list, [totalLength])\\n list should be an Array.\");if(0===list.length)return new Buffer(0);if(1===list.length)return list[0];if(\"number\"!=typeof totalLength){totalLength=0;for(var i=0;list.length>i;i++){var buf=list[i];totalLength+=buf.length}}for(var buffer=new Buffer(totalLength),pos=0,i=0;list.length>i;i++){var buf=list[i];buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.prototype.inspect=function(){for(var out=[],len=this.length,i=0;len>i;i++)if(out[i]=toHex(this.parent[i+this.offset]),i==exports.INSPECT_MAX_BYTES){out[i+1]=\"...\";break}return\"\u003CBuffer \"+out.join(\" \")+\">\"},Buffer.prototype.get=function(i){if(0>i||i>=this.length)throw Error(\"oob\");return this.parent[this.offset+i]},Buffer.prototype.set=function(i,v){if(0>i||i>=this.length)throw Error(\"oob\");return this.parent[this.offset+i]=v},Buffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||\"utf8\")+\"\").toLowerCase();var ret;switch(encoding){case\"hex\":ret=this.parent.hexWrite(string,this.offset+offset,length);break;case\"utf8\":case\"utf-8\":ret=this.parent.utf8Write(string,this.offset+offset,length);break;case\"ascii\":ret=this.parent.asciiWrite(string,this.offset+offset,length);break;case\"binary\":ret=this.parent.binaryWrite(string,this.offset+offset,length);break;case\"base64\":ret=this.parent.base64Write(string,this.offset+offset,length);break;case\"ucs2\":case\"ucs-2\":ret=this.parent.ucs2Write(string,this.offset+offset,length);break;default:throw Error(\"Unknown encoding\")}return Buffer._charsWritten=SlowBuffer._charsWritten,ret},Buffer.prototype.toString=function(encoding,start,end){switch(encoding=((encoding||\"utf8\")+\"\").toLowerCase(),start===void 0||0>start?start=0:start>this.length&&(start=this.length),end===void 0||end>this.length?end=this.length:0>end&&(end=0),start+=this.offset,end+=this.offset,encoding){case\"hex\":return this.parent.hexSlice(start,end);case\"utf8\":case\"utf-8\":return this.parent.utf8Slice(start,end);case\"ascii\":return this.parent.asciiSlice(start,end);case\"binary\":return this.parent.binarySlice(start,end);case\"base64\":return this.parent.base64Slice(start,end);case\"ucs2\":case\"ucs-2\":return this.parent.ucs2Slice(start,end);default:throw Error(\"Unknown encoding\")}},Buffer.byteLength=SlowBuffer.byteLength,Buffer.prototype.fill=function(value,start,end){if(value||(value=0),start||(start=0),end||(end=this.length),\"string\"==typeof value&&(value=value.charCodeAt(0)),\"number\"!=typeof value||isNaN(value))throw Error(\"value is not a number\");if(start>end)throw Error(\"end \u003C start\");if(end===start)return 0;if(0==this.length)return 0;if(0>start||start>=this.length)throw Error(\"start out of bounds\");\nif(0>end||end>this.length)throw Error(\"end out of bounds\");return this.parent.fill(value,start+this.offset,end+this.offset)},Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(start||(start=0),end||(end=this.length),target_start||(target_start=0),start>end)throw Error(\"sourceEnd \u003C sourceStart\");if(end===start)return 0;if(0==target.length||0==source.length)return 0;if(0>target_start||target_start>=target.length)throw Error(\"targetStart out of bounds\");if(0>start||start>=source.length)throw Error(\"sourceStart out of bounds\");if(0>end||end>source.length)throw Error(\"sourceEnd out of bounds\");return end>this.length&&(end=this.length),end-start>target.length-target_start&&(end=target.length-target_start+start),this.parent.copy(target.parent,target_start+target.offset,start+this.offset,end+this.offset)},Buffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error(\"oob\");if(start>end)throw Error(\"oob\");return new Buffer(this.parent,end-start,+start+this.offset)},Buffer.prototype.utf8Slice=function(start,end){return this.toString(\"utf8\",start,end)},Buffer.prototype.binarySlice=function(start,end){return this.toString(\"binary\",start,end)},Buffer.prototype.asciiSlice=function(start,end){return this.toString(\"ascii\",start,end)},Buffer.prototype.utf8Write=function(string,offset){return this.write(string,offset,\"utf8\")},Buffer.prototype.binaryWrite=function(string,offset){return this.write(string,offset,\"binary\")},Buffer.prototype.asciiWrite=function(string,offset){return this.write(string,offset,\"ascii\")},Buffer.prototype.readUInt8=function(offset,noAssert){var buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to read beyond buffer length\")),offset>=buffer.length?void 0:buffer.parent[buffer.offset+offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return readUInt16(this,offset,!1,noAssert)},Buffer.prototype.readUInt16BE=function(offset,noAssert){return readUInt16(this,offset,!0,noAssert)},Buffer.prototype.readUInt32LE=function(offset,noAssert){return readUInt32(this,offset,!1,noAssert)},Buffer.prototype.readUInt32BE=function(offset,noAssert){return readUInt32(this,offset,!0,noAssert)},Buffer.prototype.readInt8=function(offset,noAssert){var neg,buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to read beyond buffer length\")),offset>=buffer.length?void 0:(neg=128&buffer.parent[buffer.offset+offset],neg?-1*(255-buffer.parent[buffer.offset+offset]+1):buffer.parent[buffer.offset+offset])},Buffer.prototype.readInt16LE=function(offset,noAssert){return readInt16(this,offset,!1,noAssert)},Buffer.prototype.readInt16BE=function(offset,noAssert){return readInt16(this,offset,!0,noAssert)},Buffer.prototype.readInt32LE=function(offset,noAssert){return readInt32(this,offset,!1,noAssert)},Buffer.prototype.readInt32BE=function(offset,noAssert){return readInt32(this,offset,!0,noAssert)},Buffer.prototype.readFloatLE=function(offset,noAssert){return readFloat(this,offset,!1,noAssert)},Buffer.prototype.readFloatBE=function(offset,noAssert){return readFloat(this,offset,!0,noAssert)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return readDouble(this,offset,!1,noAssert)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return readDouble(this,offset,!0,noAssert)},Buffer.prototype.writeUInt8=function(value,offset,noAssert){var buffer=this;noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"trying to write beyond buffer length\"),verifuint(value,255)),buffer.length>offset&&(buffer.parent[buffer.offset+offset]=value)},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){writeUInt16(this,value,offset,!1,noAssert)},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){writeUInt16(this,value,offset,!0,noAssert)},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){writeUInt32(this,value,offset,!1,noAssert)},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){writeUInt32(this,value,offset,!0,noAssert)},Buffer.prototype.writeInt8=function(value,offset,noAssert){var buffer=this;noAssert||(assert.ok(void 0!==value&&null!==value,\"missing value\"),assert.ok(void 0!==offset&&null!==offset,\"missing offset\"),assert.ok(buffer.length>offset,\"Trying to write beyond buffer length\"),verifsint(value,127,-128)),value>=0?buffer.writeUInt8(value,offset,noAssert):buffer.writeUInt8(255+value+1,offset,noAssert)},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){writeInt16(this,value,offset,!1,noAssert)},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){writeInt16(this,value,offset,!0,noAssert)},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){writeInt32(this,value,offset,!1,noAssert)},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){writeInt32(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){writeDouble(this,value,offset,!0,noAssert)},SlowBuffer.prototype.readUInt8=Buffer.prototype.readUInt8,SlowBuffer.prototype.readUInt16LE=Buffer.prototype.readUInt16LE,SlowBuffer.prototype.readUInt16BE=Buffer.prototype.readUInt16BE,SlowBuffer.prototype.readUInt32LE=Buffer.prototype.readUInt32LE,SlowBuffer.prototype.readUInt32BE=Buffer.prototype.readUInt32BE,SlowBuffer.prototype.readInt8=Buffer.prototype.readInt8,SlowBuffer.prototype.readInt16LE=Buffer.prototype.readInt16LE,SlowBuffer.prototype.readInt16BE=Buffer.prototype.readInt16BE,SlowBuffer.prototype.readInt32LE=Buffer.prototype.readInt32LE,SlowBuffer.prototype.readInt32BE=Buffer.prototype.readInt32BE,SlowBuffer.prototype.readFloatLE=Buffer.prototype.readFloatLE,SlowBuffer.prototype.readFloatBE=Buffer.prototype.readFloatBE,SlowBuffer.prototype.readDoubleLE=Buffer.prototype.readDoubleLE,SlowBuffer.prototype.readDoubleBE=Buffer.prototype.readDoubleBE,SlowBuffer.prototype.writeUInt8=Buffer.prototype.writeUInt8,SlowBuffer.prototype.writeUInt16LE=Buffer.prototype.writeUInt16LE,SlowBuffer.prototype.writeUInt16BE=Buffer.prototype.writeUInt16BE,SlowBuffer.prototype.writeUInt32LE=Buffer.prototype.writeUInt32LE,SlowBuffer.prototype.writeUInt32BE=Buffer.prototype.writeUInt32BE,SlowBuffer.prototype.writeInt8=Buffer.prototype.writeInt8,SlowBuffer.prototype.writeInt16LE=Buffer.prototype.writeInt16LE,SlowBuffer.prototype.writeInt16BE=Buffer.prototype.writeInt16BE,SlowBuffer.prototype.writeInt32LE=Buffer.prototype.writeInt32LE,SlowBuffer.prototype.writeInt32BE=Buffer.prototype.writeInt32BE,SlowBuffer.prototype.writeFloatLE=Buffer.prototype.writeFloatLE,SlowBuffer.prototype.writeFloatBE=Buffer.prototype.writeFloatBE,SlowBuffer.prototype.writeDoubleLE=Buffer.prototype.writeDoubleLE,SlowBuffer.prototype.writeDoubleBE=Buffer.prototype.writeDoubleBE})()},{assert:73,\"./buffer_ieee754\":75,\"base64-js\":79}],72:[function(require,module){\"use strict\";function newlinesIn(src){if(!src)return 0;var newlines=src.match(/\\n/g);return newlines?newlines.length:0}var difflet=require(\"difflet\"),prettydiff=difflet({comment:!0,indent:2}),compactdiff=difflet({comment:!0});module.exports=function(before,after,opts){opts=opts||{};var joinLinesAt=opts.joinLinesAt||20,maxLineLength=opts.maxLineLength||380,result=prettydiff.compare(before,after);return newlinesIn(result)>=joinLinesAt&&(result=compactdiff.compare(before,after)),result.split(\"\\n\").map(function(line){return line.length>=maxLineLength?line.slice(0,maxLineLength)+\"....\":line}).join(\"\\n\").replace(/\\/\\/ != undefined/g,\"\")}},{difflet:80}],78:[function(require,module){function clonePrototype(parent){if(null===parent)return null;var ctor=function(){};return ctor.prototype=parent,new ctor}module.exports=clonePrototype},{}],79:[function(require,module){(function(){\"use strict\";function b64ToByteArray(b64){var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw\"Invalid string. Length must be a multiple of 4\";for(placeHolders=b64.indexOf(\"=\"),placeHolders=placeHolders>0?b64.length-placeHolders:0,arr=[],l=placeHolders>0?b64.length-4:b64.length,i=0,j=0;l>i;i+=4,j+=3)tmp=lookup.indexOf(b64[i])\u003C\u003C18|lookup.indexOf(b64[i+1])\u003C\u003C12|lookup.indexOf(b64[i+2])\u003C\u003C6|lookup.indexOf(b64[i+3]),arr.push((16711680&tmp)>>16),arr.push((65280&tmp)>>8),arr.push(255&tmp);return 2===placeHolders?(tmp=lookup.indexOf(b64[i])\u003C\u003C2|lookup.indexOf(b64[i+1])>>4,arr.push(255&tmp)):1===placeHolders&&(tmp=lookup.indexOf(b64[i])\u003C\u003C10|lookup.indexOf(b64[i+1])\u003C\u003C4|lookup.indexOf(b64[i+2])>>2,arr.push(255&tmp>>8),arr.push(255&tmp)),arr}function uint8ToBase64(uint8){function tripletToBase64(num){return lookup[63&num>>18]+lookup[63&num>>12]+lookup[63&num>>6]+lookup[63&num]}var i,temp,length,extraBytes=uint8.length%3,output=\"\";for(i=0,length=uint8.length-extraBytes;length>i;i+=3)temp=(uint8[i]\u003C\u003C16)+(uint8[i+1]\u003C\u003C8)+uint8[i+2],output+=tripletToBase64(temp);switch(extraBytes){case 1:temp=uint8[uint8.length-1],output+=lookup[temp>>2],output+=lookup[63&temp\u003C\u003C4],output+=\"==\";break;case 2:temp=(uint8[uint8.length-2]\u003C\u003C8)+uint8[uint8.length-1],output+=lookup[temp>>10],output+=lookup[63&temp>>4],output+=lookup[63&temp\u003C\u003C2],output+=\"=\"}return output}var lookup=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";module.exports.toByteArray=b64ToByteArray,module.exports.fromByteArray=uint8ToBase64})()},{}],62:[function(require,module){function trimEmptyLines(lines){for(var line=lines.pop();!line||!line.length;)line=lines.pop();line&&lines.push(line)}function addLinenos(highlightedCode,firstline){function getDigits(n){return 10>n?1:100>n?2:1e3>n?3:1e4>n?4:5}function pad(n,totalDigits){var padDigits=totalDigits-getDigits(n);switch(padDigits){case 0:return\"\"+n;case 1:return\" \"+n;case 2:return\" \"+n;case 3:return\" \"+n;case 4:return\" \"+n;case 5:return\" \"+n}}var highlightedLines=highlightedCode.split(\"\\n\");trimEmptyLines(highlightedLines);var totalDigits,lineno,linesLen=highlightedLines.length,lines=[];totalDigits=getDigits(linesLen+firstline-1);for(var i=0;linesLen>i;i++)lineno=[colorSurround[0],pad(i+firstline,totalDigits),\": \",colorSurround[1]].join(\"\"),lines.push(lineno+highlightedLines[i]);return lines.join(\"\\n\")}var redeyed=require(\"redeyed\"),theme=require(\"../themes/default\"),colors=require(\"../colors\"),colorSurround=colors.brightBlack.split(\":\");module.exports=function(code,opts){opts=opts||{};try{var result=redeyed(code,opts.theme||theme),firstline=opts.firstline&&!isNaN(opts.firstline)?opts.firstline:1;return opts.linenos?addLinenos(result.code,firstline):result.code}catch(e){throw e.message=\"Unable to perform highlight. The code contained syntax errors: \"+e.message,e}}},{\"../themes/default\":81,\"../colors\":76,redeyed:82}],81:[function(require,module){var colors=require(\"../colors\");module.exports={Boolean:{\"true\":void 0,\"false\":void 0,_default:colors.brightRed},Identifier:{undefined:colors.brightBlack,self:colors.brightRed,console:colors.blue,log:colors.blue,warn:colors.red,error:colors.brightRed,_default:colors.white},Null:{_default:colors.brightBlack},Numeric:{_default:colors.blue},String:{_default:colors.brightGreen},Keyword:{\"break\":void 0,\"case\":void 0,\"catch\":colors.cyan,\"continue\":void 0,\"debugger\":void 0,\"default\":void 0,\"delete\":colors.red,\"do\":void 0,\"else\":void 0,\"finally\":colors.cyan,\"for\":void 0,\"function\":void 0,\"if\":void 0,\"in\":void 0,\"instanceof\":void 0,\"new\":colors.red,\"return\":colors.red,\"switch\":void 0,\"this\":colors.brightRed,\"throw\":void 0,\"try\":colors.cyan,\"typeof\":void 0,\"var\":colors.green,\"void\":void 0,\"while\":void 0,\"with\":void 0,_default:colors.brightBlue},Punctuator:{\";\":colors.brightBlack,\".\":colors.green,\",\":colors.green,\"{\":colors.yellow,\"}\":colors.yellow,\"(\":colors.brightBlack,\")\":colors.brightBlack,\"[\":colors.yellow,\"]\":colors.yellow,\"\u003C\":void 0,\">\":void 0,\"+\":void 0,\"-\":void 0,\"*\":void 0,\"%\":void 0,\"&\":void 0,\"|\":void 0,\"^\":void 0,\"!\":void 0,\"~\":void 0,\"?\":void 0,\":\":void 0,\"=\":void 0,\"\u003C=\":void 0,\">=\":void 0,\"==\":void 0,\"!=\":void 0,\"++\":void 0,\"--\":void 0,\"\u003C\u003C\":void 0,\">>\":void 0,\"&&\":void 0,\"||\":void 0,\"+=\":void 0,\"-=\":void 0,\"*=\":void 0,\"%=\":void 0,\"&=\":void 0,\"|=\":void 0,\"^=\":void 0,\"/=\":void 0,\"===\":void 0,\"!==\":void 0,\">>>\":void 0,\"\u003C\u003C=\":void 0,\">>=\":void 0,\">>>=\":void 0,_default:colors.brightYellow},Line:{_default:colors.brightBlack},Block:{_default:colors.brightBlack},_default:void 0}},{\"../colors\":76}],83:[function(require,module){function Traverse(obj){this.value=obj}function walk(root,cb,immutable){var path=[],parents=[],alive=!0;return function walker(node_){function updateState(){if(\"object\"==typeof state.node&&null!==state.node){state.keys&&state.node_===state.node||(state.keys=objectKeys(state.node)),state.isLeaf=0==state.keys.length;for(var i=0;parents.length>i;i++)if(parents[i].node_===node_){state.circular=parents[i];break}}else state.isLeaf=!0,state.keys=null;state.notLeaf=!state.isLeaf,state.notRoot=!state.isRoot}var node=immutable?copy(node_):node_,modifiers={},keepGoing=!0,state={node:node,node_:node_,path:[].concat(path),parent:parents[parents.length-1],parents:parents,key:path.slice(-1)[0],isRoot:0===path.length,level:path.length,circular:null,update:function(x,stopHere){state.isRoot||(state.parent.node[state.key]=x),state.node=x,stopHere&&(keepGoing=!1)},\"delete\":function(stopHere){delete state.parent.node[state.key],stopHere&&(keepGoing=!1)},remove:function(stopHere){isArray(state.parent.node)?state.parent.node.splice(state.key,1):delete state.parent.node[state.key],stopHere&&(keepGoing=!1)},keys:null,before:function(f){modifiers.before=f},after:function(f){modifiers.after=f},pre:function(f){modifiers.pre=f},post:function(f){modifiers.post=f},stop:function(){alive=!1},block:function(){keepGoing=!1}};if(!alive)return state;updateState();var ret=cb.call(state,state.node);return void 0!==ret&&state.update&&state.update(ret),modifiers.before&&modifiers.before.call(state,state.node),keepGoing?(\"object\"!=typeof state.node||null===state.node||state.circular||(parents.push(state),updateState(),forEach(state.keys,function(key,i){path.push(key),modifiers.pre&&modifiers.pre.call(state,state.node[key],key);var child=walker(state.node[key]);immutable&&Object.hasOwnProperty.call(state.node,key)&&(state.node[key]=child.node),child.isLast=i==state.keys.length-1,child.isFirst=0==i,modifiers.post&&modifiers.post.call(state,child),path.pop()}),parents.pop()),modifiers.after&&modifiers.after.call(state,state.node),state):state}(root).node}function copy(src){if(\"object\"==typeof src&&null!==src){var dst;if(isArray(src))dst=[];else if(isDate(src))dst=new Date(src);else if(isRegExp(src))dst=RegExp(src);else if(isError(src))dst={message:src.message};else if(isBoolean(src))dst=new Boolean(src);else if(isNumber(src))dst=new Number(src);else if(isString(src))dst=new String(src);else if(Object.create&&Object.getPrototypeOf)dst=Object.create(Object.getPrototypeOf(src));else if(src.constructor===Object)dst={};else{var proto=src.constructor&&src.constructor.prototype||src.__proto__||{},T=function(){};T.prototype=proto,dst=new T}return forEach(objectKeys(src),function(key){dst[key]=src[key]}),dst}return src}function toS(obj){return Object.prototype.toString.call(obj)}function isDate(obj){return\"[object Date]\"===toS(obj)}function isRegExp(obj){return\"[object RegExp]\"===toS(obj)}function isError(obj){return\"[object Error]\"===toS(obj)}function isBoolean(obj){return\"[object Boolean]\"===toS(obj)}function isNumber(obj){return\"[object Number]\"===toS(obj)}function isString(obj){return\"[object String]\"===toS(obj)}var traverse=module.exports=function(obj){return new Traverse(obj)};Traverse.prototype.get=function(ps){for(var node=this.value,i=0;ps.length>i;i++){var key=ps[i];if(!Object.hasOwnProperty.call(node,key)){node=void 0;break}node=node[key]}return node},Traverse.prototype.has=function(ps){for(var node=this.value,i=0;ps.length>i;i++){var key=ps[i];if(!Object.hasOwnProperty.call(node,key))return!1;node=node[key]}return!0},Traverse.prototype.set=function(ps,value){for(var node=this.value,i=0;ps.length-1>i;i++){var key=ps[i];Object.hasOwnProperty.call(node,key)||(node[key]={}),node=node[key]}return node[ps[i]]=value,value},Traverse.prototype.map=function(cb){return walk(this.value,cb,!0)},Traverse.prototype.forEach=function(cb){return this.value=walk(this.value,cb,!1),this.value},Traverse.prototype.reduce=function(cb,init){var skip=1===arguments.length,acc=skip?this.value:init;return this.forEach(function(x){this.isRoot&&skip||(acc=cb.call(this,acc,x))}),acc},Traverse.prototype.paths=function(){var acc=[];return this.forEach(function(){acc.push(this.path)}),acc},Traverse.prototype.nodes=function(){var acc=[];return this.forEach(function(){acc.push(this.node)}),acc},Traverse.prototype.clone=function(){var parents=[],nodes=[];return function clone(src){for(var i=0;parents.length>i;i++)if(parents[i]===src)return nodes[i];if(\"object\"==typeof src&&null!==src){var dst=copy(src);return parents.push(src),nodes.push(dst),forEach(objectKeys(src),function(key){dst[key]=clone(src[key])}),parents.pop(),nodes.pop(),dst}return src}(this.value)};var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj)res.push(key);return res},isArray=Array.isArray||function isArray(xs){return\"[object Array]\"===Object.prototype.toString.call(xs)},forEach=function(xs,fn){if(xs.forEach)return xs.forEach(fn);for(var i=0;xs.length>i;i++)fn(xs[i],i,xs)};forEach(objectKeys(Traverse.prototype),function(key){traverse[key]=function(obj){var args=[].slice.call(arguments,1),t=new Traverse(obj);return t[key].apply(t,args)}})},{}],80:[function(require,module){(function(process){function difflet(opts,prev,next){function set(type){0===levels&&opts.start(type,stream),levels++}function unset(type){0===--levels&&opts.stop(type,stream)}function stringifier(insertable,node,opts){var indent=opts.indent;if(insertable)var prevNode=traverse.get(prev,this.path||[]);var indentx,inserted=insertable&&void 0===prevNode;try{indentx=indent?Array(((this.path||[]).length+1)*indent+1).join(\" \"):\"\"}catch(e){indentx=\"\"}if(commaFirst&&(indentx=indentx.slice(indent)),Array.isArray(node)){var updated=(prevNode||traverse.has(prev,this.path))&&!Array.isArray(prevNode);updated&&set(\"updated\"),opts.comment&&!Array.isArray(prevNode)&&(indent=0),this.before(function(){inserted&&set(\"inserted\"),indent&&commaFirst?0===(this.path||[]).length||Array.isArray(this.parent.node)?write(\"[ \"):write(\"\\n\"+indentx+\"[ \"):indent?write(\"[\\n\"+indentx):write(\"[\")}),this.post(function(child){child.isLast||indent&&commaFirst||write(\",\");var prev=prevNode&&prevNode[child.key];indent&&opts.comment&&child.node!==prev&&(\"object\"!=typeof child.node||\"object\"!=typeof prev)&&(set(\"comment\"),write(\" // != \"),traverse(prev).forEach(function(x){plainStringify.call(this,x,{indent:0})}),unset(\"comment\")),child.isLast||(indent&&commaFirst?write(\"\\n\"+indentx+\", \"):indent&&write(\"\\n\"+indentx))}),this.after(function(){indent&&commaFirst?write(\"\\n\"+indentx):indent&&write(\"\\n\"+indentx.slice(indent)),write(\"]\"),updated&&unset(\"updated\"),inserted&&unset(\"inserted\")})}else if(isRegExp(node))this.block(),inserted?(set(\"inserted\"),write(\"\"+node),unset(\"inserted\")):insertable&&prevNode!==node?(set(\"updated\"),write(\"\"+node),unset(\"updated\")):write(\"\"+node);else if(\"object\"==typeof node&&node&&\"function\"==typeof node.inspect)this.block(),inserted?(set(\"inserted\"),write(node.inspect()),unset(\"inserted\")):prevNode&&\"function\"==typeof prevNode.inspect&&prevNode.inspect()===node.inspect()?write(node.inspect()):(set(\"updated\"),write(node.inspect()),unset(\"updated\"));else if(\"object\"==typeof node&&null!==node){var insertedKey=!1,deleted=insertable&&\"object\"==typeof prevNode&&prevNode?Object.keys(prevNode).filter(function(key){return!Object.hasOwnProperty.call(node,key)}):[];this.before(function(){inserted&&set(\"inserted\"),write(indent&&commaFirst&&!this.isRoot?\"\\n\"+indentx+\"{ \":\"{\")}),this.pre(function(x,key){if(insertable){var obj=traverse.get(prev,this.path.concat(key));void 0===obj&&(insertedKey=!0,set(\"inserted\"))}indent&&!commaFirst&&write(\"\\n\"+indentx),plainStringify(key),write(indent?\" : \":\":\")}),this.post(function(child){child.isLast||indent&&commaFirst||write(\",\"),child.isLast&&deleted.length?(insertedKey&&unset(\"inserted\"),insertedKey=!1):insertedKey&&(unset(\"inserted\"),insertedKey=!1);var prev=prevNode&&prevNode[child.key];indent&&opts.comment&&child.node!==prev&&(\"object\"!=typeof child.node||\"object\"!=typeof prev)&&(set(\"comment\"),write(\" // != \"),traverse(prev).forEach(function(x){plainStringify.call(this,x,{indent:0})}),unset(\"comment\")),child.isLast&&deleted.length?(insertedKey&&unset(\"inserted\"),insertedKey=!1,indent&&commaFirst?write(\"\\n\"+indentx+\", \"):opts.comment&&indent?write(\"\\n\"+indentx):indent?write(\",\\n\"+indentx):write(\",\")):child.isLast||indent&&commaFirst&&write(\"\\n\"+indentx+\", \")}),this.after(function(){inserted&&unset(\"inserted\"),deleted.length&&(indent&&!commaFirst&&0===Object.keys(node).length&&write(\"\\n\"+indentx),set(\"deleted\"),deleted.forEach(function(key,ix){indent&&opts.comment&&(unset(\"deleted\"),set(\"comment\"),write(\"// \"),unset(\"comment\"),set(\"deleted\")),plainStringify(key),write(indent?\" : \":\":\"),traverse(prevNode[key]).forEach(function(x){plainStringify.call(this,x,{indent:0})});var last=ix===deleted.length-1;insertable&&!last&&(indent&&commaFirst?write(\"\\n\"+indentx+\", \"):indent?write(\",\\n\"+indentx):write(\",\"))}),unset(\"deleted\")),commaFirst&&indent?write(indentx.slice(indent)+\" }\"):indent?write(\"\\n\"+indentx.slice(indent)+\"}\"):write(\"}\")})}else{var changed=!1;inserted?set(\"inserted\"):insertable&&!deepEqual(prevNode,node)&&(changed=!0,set(\"updated\")),\"string\"==typeof node?write('\"'+(\"\"+node).replace(/\"/g,'\\\\\"')+'\"'):isRegExp(node)?write(\"\"+node):\"function\"==typeof node?write(node.name?\"[Function: \"+node.name+\"]\":\"[Function]\"):void 0===node?write(\"undefined\"):null===node?write(\"null\"):write(\"\"+node),inserted?unset(\"inserted\"):changed&&unset(\"updated\")}}var stream=opts.stream||new Stream;if(opts.stream||(stream.readable=!0,stream.writable=!0,stream.write=function(buf){this.emit(\"data\",buf)},stream.end=function(){this.emit(\"end\")}),opts||(opts={}),void 0===opts.start&&void 0===opts.stop){var c=charm(stream);opts.start=function(type){c.foreground({inserted:\"green\",updated:\"blue\",deleted:\"red\",comment:\"cyan\"}[type]),c.display(\"bright\")},opts.stop=function(){c.display(\"reset\")}}var write=function(buf){opts.write?opts.write(buf,stream):stream.write(buf)},commaFirst=\"first\"===opts.comma,stringify=function(node,params){return stringifier.call(this,!0,node,params||opts)},plainStringify=function(node,params){return stringifier.call(this,!1,node,params||opts)},levels=0;return opts.stream?traverse(next).forEach(stringify):process.nextTick(function(){traverse(next).forEach(stringify),stream.emit(\"end\")}),stream}function isRegExp(node){return node instanceof RegExp||node&&\"function\"==typeof node.test&&\"function\"==typeof node.exec&&\"function\"==typeof node.compile&&node.constructor&&\"RegExp\"===node.constructor.name}var traverse=require(\"traverse\"),Stream=require(\"stream\").Stream,charm=require(\"charm\"),deepEqual=require(\"deep-is\"),exports=module.exports=function(opts_){var fn=difflet.bind(null,opts_);return fn.compare=function(prev,next){var opts=Object.keys(opts_||{}).reduce(function(acc,key){return acc[key]=opts_[key],acc},{}),s=opts.stream=new Stream,data=\"\";return s.write=function(buf){data+=buf},s.end=function(){},s.readable=!0,s.writable=!0,difflet(opts,prev,next),data},fn};exports.compare=function(prev,next){return exports({}).compare(prev,next)}})(require(\"__browserify_process\"))},{stream:58,traverse:83,charm:84,\"deep-is\":69,__browserify_process:16}],85:[function(require,module,exports){exports.isatty=function(){},exports.setRawMode=function(){}},{}],84:[function(require,module){(function(process){var tty=require(\"tty\"),encode=require(\"./lib/encode\"),EventEmitter=require(\"events\").EventEmitter,exports=module.exports=function(){function setInput(s){if(input)throw Error(\"multiple inputs specified\");input=s}function setOutput(s){if(output)throw Error(\"multiple outputs specified\");output=s}for(var input=null,output=null,i=0;arguments.length>i;i++){var arg=arguments[i];arg&&(arg.readable?setInput(arg):(arg.stdin||arg.input)&&setInput(arg.stdin||arg.input),arg.writable?setOutput(arg):(arg.stdout||arg.output)&&setOutput(arg.stdout||arg.output))}return new Charm(input,output)},Charm=exports.Charm=function(input,output){var self=this;self.input=input,self.output=output,self.pending=[],output||self.emit(\"error\",Error(\"output stream required\")),input&&\"number\"==typeof input.fd&&tty.isatty(input.fd)&&(process.stdin.setRawMode?process.stdin.setRawMode(!0):tty.setRawMode(!0),input.resume()),input&&input.on(\"data\",function(buf){if(self.pending.length){for(var codes=extractCodes(buf),matched=!1,i=0;codes.length>i;i++)for(var j=0;self.pending.length>j;j++){var cb=self.pending[j];if(cb(codes[i])){matched=!0,self.pending.splice(j,1);break}}if(matched)return}self.emit(\"data\",buf),1===buf.length&&(3===buf[0]&&self.emit(\"^C\"),4===buf[0]&&self.emit(\"^D\"))})};Charm.prototype=new EventEmitter,Charm.prototype.destroy=function(){this.input&&this.input.destroy()},Charm.prototype.write=function(msg){return this.output.write(msg),this},Charm.prototype.reset=function(){return this.write(encode(\"c\")),this},Charm.prototype.position=function(x,y){if(\"function\"==typeof x){var cb=x;this.pending.push(function(buf){if(27===buf[0]&&buf[1]===encode.ord(\"[\")&&buf[buf.length-1]===encode.ord(\"R\")){var pos=(\"\"+buf).slice(2,-1).split(\";\").map(Number);return cb(pos[1],pos[0]),!0}}),this.write(encode(\"[6n\"))}else this.write(encode(\"[\"+Math.floor(y)+\";\"+Math.floor(x)+\"f\"));return this},Charm.prototype.move=function(x,y){return 0>y?this.up(-y):y>0&&this.down(y),x>0?this.right(x):0>x&&this.left(-x),this},Charm.prototype.up=function(y){return void 0===y&&(y=1),this.write(encode(\"[\"+Math.floor(y)+\"A\")),this},Charm.prototype.down=function(y){return void 0===y&&(y=1),this.write(encode(\"[\"+Math.floor(y)+\"B\")),this},Charm.prototype.right=function(x){return void 0===x&&(x=1),this.write(encode(\"[\"+Math.floor(x)+\"C\")),this},Charm.prototype.left=function(x){return void 0===x&&(x=1),this.write(encode(\"[\"+Math.floor(x)+\"D\")),this},Charm.prototype.column=function(x){return this.write(encode(\"[\"+Math.floor(x)+\"G\")),this},Charm.prototype.push=function(withAttributes){return this.write(encode(withAttributes?\"7\":\"[s\")),this},Charm.prototype.pop=function(withAttributes){return this.write(encode(withAttributes?\"8\":\"[u\")),this},Charm.prototype.erase=function(s){return\"end\"===s||\"$\"===s?this.write(encode(\"[K\")):\"start\"===s||\"^\"===s?this.write(encode(\"[1K\")):\"line\"===s?this.write(encode(\"[2K\")):\"down\"===s?this.write(encode(\"[J\")):\"up\"===s?this.write(encode(\"[1J\")):\"screen\"===s?this.write(encode(\"[1J\")):this.emit(\"error\",Error(\"Unknown erase type: \"+s)),this},Charm.prototype.display=function(attr){var c={reset:0,bright:1,dim:2,underscore:4,blink:5,reverse:7,hidden:8}[attr];return void 0===c&&this.emit(\"error\",Error(\"Unknown attribute: \"+attr)),this.write(encode(\"[\"+c+\"m\")),this},Charm.prototype.foreground=function(color){if(\"number\"==typeof color)(0>color||color>=256)&&this.emit(\"error\",Error(\"Color out of range: \"+color)),this.write(encode(\"[38;5;\"+color+\"m\"));else{var c={black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37}[color.toLowerCase()];c||this.emit(\"error\",Error(\"Unknown color: \"+color)),this.write(encode(\"[\"+c+\"m\"))}return this},Charm.prototype.background=function(color){if(\"number\"==typeof color)(0>color||color>=256)&&this.emit(\"error\",Error(\"Color out of range: \"+color)),this.write(encode(\"[48;5;\"+color+\"m\"));else{var c={black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47}[color.toLowerCase()];c||this.emit(\"error\",Error(\"Unknown color: \"+color)),this.write(encode(\"[\"+c+\"m\"))}return this},Charm.prototype.cursor=function(visible){return this.write(encode(visible?\"[?25h\":\"[?25l\")),this};var extractCodes=exports.extractCodes=function(buf){for(var codes=[],start=-1,i=0;buf.length>i;i++)27===buf[i]?(start>=0&&codes.push(buf.slice(start,i)),start=i):start>=0&&i===buf.length-1&&codes.push(buf.slice(start));return codes}})(require(\"__browserify_process\"))},{tty:85,events:15,\"./lib/encode\":86,__browserify_process:16}],82:[function(require,module){(function(){(function(){\"use strict\";function bootstrap(esprima,exportFn){function isFunction(obj){return\"[object Function]\"===toString.call(obj)}function isString(obj){return\"[object String]\"===toString.call(obj)}function isObject(obj){return\"[object Object]\"===toString.call(obj)}function surroundWith(before,after){return function(s){return before+s+after}}function isNonCircular(key){return\"_parent\"!==key}function objectizeString(value){var vals=value.split(\":\");if(0===vals.length||vals.length>2)throw Error(\"illegal string config: \"+value+'\\nShould be of format \"before:after\"');return 1===vals.length||0===vals[1].length?0>vals.indexOf(\":\")?{_before:vals[0]}:{_after:vals[0]}:{_before:vals[0],_after:vals[1]}}function objectize(node){function resolve(value,key){if(!value._parent)return void 0;if(value._parent._default&&value._parent._default[key])return value._parent._default[key];var root=value._parent._parent;return root?root._default?root._default[key]:void 0:void 0}function process(key){var value=node[key];if(value&&!isFunction(value)){if(isString(value)&&(node[key]=value=objectizeString(value)),value._parent=node,isObject(value))return value._before||value._after?(value._before=value._before||resolve(value,\"_before\"),value._after=value._after||resolve(value,\"_after\"),void 0):objectize(value);throw Error(\"nodes need to be either {String}, {Object} or {Function}.\"+value+\" is neither.\")}}node._default&&process(\"_default\"),Object.keys(node).filter(function(key){return isNonCircular(key)&&node.hasOwnProperty(key)&&\"_before\"!==key&&\"_after\"!==key&&\"_default\"!==key}).forEach(process)}function functionize(node){Object.keys(node).filter(function(key){return isNonCircular(key)&&node.hasOwnProperty(key)}).forEach(function(key){var value=node[key];if(!isFunction(value)&&isObject(value)){if(!value._before&&!value._after)return functionize(value);var before=value._before||\"\",after=value._after||\"\";return node[key]=surroundWith(before,after)}})}function normalize(root){objectize(root),functionize(root)}function mergeTokensAndComments(tokens,comments){function addToAllByRangeStart(t){all[t.range[0]]=t}var all={};return tokens.forEach(addToAllByRangeStart),comments.forEach(addToAllByRangeStart),Object.keys(all).map(function(k){return all[k]})}function redeyed(code,config,opts){function tokenIndex(tokens,tkn,start){var current,rangeStart=tkn.range[0];for(current=start;tokens.length>current;current++)if(tokens[current].range[0]===rangeStart)return current;throw Error(\"Token %s not found at or after index: %d\",tkn,start)}function process(surround){var result,currentIndex,nextIndex,splitEnd,skip=0;return result=surround(code.slice(start,end),info),isObject(result)?(splits.push(result.replacement),currentIndex=info.tokenIndex,nextIndex=tokenIndex(info.tokens,result.skipPastToken,currentIndex),skip=nextIndex-currentIndex,splitEnd=skip>0?tokens[nextIndex-1].range[1]:end):(splits.push(result),splitEnd=end),{skip:skip,splitEnd:splitEnd}}function addSplit(start,end,surround){var result,skip=0;if(!(start>=end))return surround?(result=process(surround),skip=result.skip,lastSplitEnd=result.splitEnd):(splits.push(code.slice(start,end)),lastSplitEnd=end),skip}opts=opts||{},code=code.replace(/^\\#\\!.*/,\"\");var transformedCode,all,info,ast=esprima.parse(code,{tokens:!0,comment:!0,range:!0,tolerant:!0}),tokens=ast.tokens,comments=ast.comments,lastSplitEnd=0,splits=[];\nnormalize(config),all=mergeTokensAndComments(tokens,comments);for(var tokenIdx=0;all.length>tokenIdx;tokenIdx++){var surround,start,end,token=all[tokenIdx],surroundForType=config[token.type];surroundForType&&(surround=surroundForType&&surroundForType.hasOwnProperty(token.value)&&surroundForType[token.value]&&isFunction(surroundForType[token.value])?surroundForType[token.value]:surroundForType._default,start=token.range[0],end=token.range[1],addSplit(lastSplitEnd,start),info={tokenIndex:tokenIdx,tokens:all,ast:ast,code:code},tokenIdx+=addSplit(start,end,surround,info))}return code.length>lastSplitEnd&&addSplit(lastSplitEnd,code.length),transformedCode=opts.nojoin?void 0:splits.join(\"\"),{ast:ast,tokens:tokens,comments:comments,splits:splits,code:transformedCode}}return exportFn?exportFn(redeyed):redeyed}var esprima,exportFn,toString=Object.prototype.toString;\"object\"==typeof module&&\"object\"==typeof module.exports&&\"function\"==typeof require?(esprima=require(\"esprima\"),exportFn=function(redeyed){module.exports=redeyed},bootstrap(esprima,exportFn)):\"function\"==typeof define&&define.amd?define([\"esprima\"],function(esprima){return bootstrap(esprima)}):\"object\"==typeof window&&(window.redeyed=bootstrap(window.esprima))})()})()},{esprima:70}],86:[function(require,module){(function(Buffer){var encode=module.exports=function(xs){function bytes(s){return\"string\"==typeof s?s.split(\"\").map(ord):Array.isArray(s)?s.reduce(function(acc,c){return acc.concat(bytes(c))},[]):void 0}return new Buffer([27].concat(bytes(xs)))},ord=encode.ord=function ord(c){return c.charCodeAt(0)}})(require(\"__browserify_buffer\").Buffer)},{__browserify_buffer:77}]},{},[1]);\n\n\u003C/script>","tags":"$:/tags/RawMarkup","title":"$:/webxr-notebook/scriptie-talkie-embed.js","modified":"20230427072656645"},